Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .copilot-schema-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.49
1.0.51
39 changes: 29 additions & 10 deletions .github/skills/update-upstream/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,21 @@ Sync the copilot-sdk-clojure project with upstream [github/copilot-sdk](https://

### Phase 1: Discovery

1. Run `./update.sh` from the repo root to pull the latest upstream and list releases.
2. Check the current Clojure SDK version in `build.clj` (format: `UPSTREAM.CLJ_PATCH` — see AGENTS.md § Version Management).
3. List upstream commits since our last synced version:
1. **Sync local `main` first.** Recently-merged PRs may have already
ported some upstream changes, and your feature branch should sit on
top of the latest `main` to avoid duplicate work and rebase conflicts
later:
```
git checkout main && git pull --ff-only origin main
```
If `main` cannot fast-forward, stop and let the maintainer resolve.
2. Run `./update.sh` from the repo root to pull the latest upstream and list releases.
3. Check the current Clojure SDK version in `build.clj` (format: `UPSTREAM.CLJ_PATCH` — see AGENTS.md § Version Management).
4. List upstream commits since our last synced version:
```
cd ../copilot-sdk && git log --oneline <last-tag>..HEAD -- nodejs/
```
4. For each commit, classify:
5. For each commit, classify:
- **Port** — Code changes to `nodejs/src/` (types, client, session, generated)
- **Skip** — CI/tooling, language-specific (Python/Go/.NET only)

Expand Down Expand Up @@ -103,12 +111,23 @@ At minimum:

### Phase 8: PR Creation

1. Create a feature branch: `git checkout -b upstream-sync/v<version>`
2. Commit changes in logical commits to make them easy to review commit by commit and with descriptive message and `Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>`
3. Push and create PR with `gh pr create`
4. PR body should include: summary, changes list, validation results, review findings table

### Phase 9: Reflecing on code review feedback.
1. **Confirm `main` is current before branching.** Run
`git fetch origin main && git checkout main && git pull --ff-only` if
you haven't refreshed since Phase 1. A stale local `main` causes
rebase conflicts later, especially when prior sync PRs squash-merge.
2. Create a feature branch: `git checkout -b upstream-sync/v<version>`
3. Commit changes in logical commits to make them easy to review commit by commit and with descriptive message and `Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>`
4. Push and create PR with `gh pr create`
5. PR body should include: summary, changes list, validation results, review findings table

If the maintainer asks you to rebase a stale branch onto fresh `main`,
expect that previous round-N sync commits on your branch may already be
present in `origin/main` under squash-merge SHAs. Use `git rebase --skip`
for any commit whose patch is already upstream — Git will print
"patch contents already upstream" for the others and drop them
automatically.

### Phase 9: Reflecting on code review feedback.

Once the PR is created, Copilot Code Review (and possibly humans) will provide code review feedback.

Expand Down
47 changes: 47 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,53 @@ All notable changes to this project will be documented in this file. This change

## [Unreleased]

### Changed (post-v1.0.0-beta.4 sync, round 3)
- **`ping` `:timestamp` field type changed in CLI 1.0.51** — Upstream PR #1340
changed the `ping` RPC result `timestamp` field from epoch-millis number to
an ISO 8601 date-time string (e.g. `"2026-05-21T08:00:00.000Z"`). The SDK
forwards the server value verbatim, so callers of `sdk/ping` will see a
string `:timestamp` against CLI ≥ 1.0.51 and a numeric epoch-millis value
against older CLIs. The `::specs/timestamp` spec accepts both shapes
(`(s/or :iso-string string? :epoch-ms nat-int?)`) so spec instrumentation
passes against either CLI version. The mock test server was updated to
emit the ISO string form, and the ping docstring documents both shapes.
(upstream PR #1340)

### Added (post-v1.0.0-beta.4 sync, round 3)
- **`:mcp-args` is now optional on MCP stdio server configs** — Following
upstream PR #1347 (`MCPStdioServerConfig.args` made optional across all
SDKs), the `::mcp-local-server` / `::mcp-stdio-server` spec moves
`::mcp-args` from `:req-un` to `:opt-un`. Stdio MCP servers declared with
just `{:mcp-command "..." :mcp-tools [...]}` (no `:mcp-args`) now validate
and forward correctly. (upstream PR #1347)
- **`:time-to-first-token-ms` on `assistant.usage` event data** — The CLI
1.0.51 wire schema renamed the assistant-usage TTFT property from
`ttftMs` to `timeToFirstTokenMs`, which surfaces as the kebab-case key
`:time-to-first-token-ms` after wire normalization. The
`::assistant.usage-data` spec lists both keys in `:opt-un` so events from
older and newer CLIs both validate; the new key is the canonical name
going forward. The generated wire spec
(`generated/event_specs.clj`) only declares the new field, matching the
current schema. (upstream CLI 1.0.51 schema)
- **Schema bump** — `.copilot-schema-version` advanced from `1.0.49` to
`1.0.51`. Generated wire specs and coercions regenerated. Additive
changes only beyond the rename above: bounded-integer fields previously
typed as `number?` now generate as `integer?` (upstream PR #1329,
"Use 32-bit types for bounded schema integers").

### Tracked-but-not-ported (post-v1.0.0-beta.4 sync, round 3)
- **PR #1316** (re-export generated session-event types from `index.ts`) —
Node.js packaging concern only; the Clojure SDK already exposes generated
event specs via the `github.copilot-sdk.generated.event-specs` namespace.
- **PR #1327 `ToolBinaryResult.type` tightened to `"image" | "resource"`** —
Our `::binary-results-for-llm` spec is intentionally permissive
(`(coll-of map?)`). Tightening would require adding a dedicated
`::tool-binary-result` spec with string-valued `:type`; deferred since
the runtime helpers already emit valid values.
- Upstream test stabilization (#1346, #1317, #1314), other-language /
documentation / codegen-only PRs (#1336, #1291, #1331, #1338, #1339,
#1304, #1289, #1313) — no Clojure SDK action required.

### Added (post-v1.0.0-beta.4 sync, round 2)
- **SessionFs SQLite support** — `sessionFs.sqliteQuery` and `sessionFs.sqliteExists`
RPCs are now dispatched to a user-supplied provider. The provider-style handler
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Add to your `deps.edn`:

```clojure
;; From Maven Central
io.github.copilot-community-sdk/copilot-sdk-clojure {:mvn/version "1.0.0-beta.4.0"}
io.github.copilot-community-sdk/copilot-sdk-clojure {:mvn/version "1.0.0-beta.4.1"}

;; Or git dependency
io.github.copilot-community-sdk/copilot-sdk-clojure {:git/url "https://github.com/copilot-community-sdk/copilot-sdk-clojure.git"
Expand Down
2 changes: 1 addition & 1 deletion build.clj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
(:import [java.io File]))

(def lib 'io.github.copilot-community-sdk/copilot-sdk-clojure)
(def version "1.0.0-beta.4.0")
(def version "1.0.0-beta.4.1")
(def class-dir "target/classes")

(defn- try-sh
Expand Down
2 changes: 1 addition & 1 deletion doc/mcp/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Here's a complete working example using the official [`@modelcontextprotocol/ser
| Key | Type | Required | Description |
|-----|------|----------|-------------|
| `:mcp-command` | string | Yes | Command to execute |
| `:mcp-args` | vector | Yes | Command arguments |
| `:mcp-args` | vector | No | Command arguments (optional since CLI 1.0.51; omit for argument-less commands) |
| `:mcp-tools` | vector | Yes | Tools to enable (`["*"]` for all, `[]` for none, or specific tool names) |
| `:mcp-server-type` | keyword | No | `:local` or `:stdio` (defaults to local) |
| `:mcp-timeout` | number | No | Timeout in milliseconds |
Expand Down
2 changes: 1 addition & 1 deletion schemas/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ These files are fetched verbatim from the `@github/copilot` npm package at the v

**Do not edit by hand.** To update, run `bb schemas:fetch` after bumping `.copilot-schema-version`.

Currently pinned version: `1.0.49`
Currently pinned version: `1.0.51`
Loading
Loading