Skip to content

feat: sync SDK with upstream v1.0.9 - #162

Merged
krukow merged 3 commits into
mainfrom
krukow-sync-upstream-sdk-77f
Aug 7, 2026
Merged

feat: sync SDK with upstream v1.0.9#162
krukow merged 3 commits into
mainfrom
krukow-sync-upstream-sdk-77f

Conversation

@krukow

@krukow krukow commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Generated via Copilot on behalf of @krukow

Sync the Clojure SDK to the official Node SDK v1.0.9 surface plus the current post-release changes on github/copilot-sdk main. This advances the Clojure release to 1.0.9.0 and pins the runtime schema at 1.0.79-6.

Highlights

  • Adds the experimental Agent Factories authoring and run-management surface with idiomatic functions, core.async variants, reverse execution, durable steps, progress, cancellation, and resource limits.
  • Ports new session configuration, managed-permission behavior, userPromptTransformed, terminal tools, SQLite transactions, and history.clearContext.
  • Regenerates wire schemas and curated event coverage, including session.context_cleared and factory.run_updated.
  • Updates the API reference, MCP guide, Agent Factories guide/example, changelog, and generated Codox documentation.

Design notes

  • The Node SDK remains the canonical contract; Agent Factories are ported even though the Python SDK does not yet expose the authoring layer.
  • Factory handles are immutable data in a functional namespace rather than a JavaScript-style mutable session property.
  • Opaque factory and SQLite values bypass key conversion at method-specific protocol boundaries; managed permission handling remains fail-closed.
  • CLI-only generated RPCs and internal events are not promoted into the curated public API.

Validation

  • bb ci: 437 tests / 2,533 assertions, documentation validation, and the 1.0.9.0 JAR build pass.
  • Schema fetch/codegen, public API snapshot, Codox generation, and documentation example loading pass.
  • bb ci:full could not run because the locally installed Copilot CLI exits with no platform package found; real-CLI E2E tests and executable examples remain to be rerun after reinstalling the CLI platform package.

Review assessment

Finding Source Severity Decision
Fatal factory pipeline errors could be wrapped and swallowed GPT review High Fixed with nested fatal-error regression coverage
Pipeline fanout could stop at chunk boundaries GPT review Medium Fixed with 64-item concurrency coverage
Overlapping execution cleanup could remove a replacement Claude review Medium Fixed with identity-guarded cleanup
Factory facade, opaque snapshots, and permission specs were incomplete Claude/GPT review Medium Completed and covered
Invalid factory results/errors or limit maps could reach unencodable/invalid wire shapes Claude review Medium Rejected locally with regression coverage
:resume-from-run-id should use session.factory.run GPT review Medium Dismissed; current behavior matches canonical Node SDK behavior

Follow-up

The sync-skill references should add upstream factory.ts / extension.ts and Clojure factory.clj; AGENTS.md should list the new namespace. Those workflow-document edits are intentionally left for maintainer approval per the skill self-review policy.

krukow and others added 2 commits August 7, 2026 17:20
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings August 7, 2026 20:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Syncs this Clojure port to the upstream github/copilot-sdk v1.0.9 API surface (plus post-release mainline changes), bumping the library to 1.0.9.0 and updating the pinned runtime schema to 1.0.79-6. The main functional addition in the shown diff is the experimental Agent Factories surface plus protocol handling to preserve opaque factory payloads across the JSON-RPC boundary, along with corresponding docs/examples/test updates.

Changes:

  • Adds an experimental Agent Factories namespace (github.copilot-sdk.factory) and exposes it via the top-level public API.
  • Updates JSON-RPC protocol normalization + outgoing request encoding to preserve method-specific opaque fields (factories and SQLite transactions).
  • Updates tests, docs, examples, schema pin, and release metadata for the v1.0.9.0 sync.
Show a summary per file
File Description
test/github/copilot_sdk/mock_server.clj Extends mock RPC coverage for history.clearContext and factory-related session methods.
test/github/copilot_sdk/codegen_test.clj Adds new event fixtures for session.context_cleared, compaction events, and factory.run_updated.
src/github/copilot_sdk/tools.clj Adds :is-terminal? tool definition support (terminal tools end the turn on success).
src/github/copilot_sdk/protocol.clj Preserves opaque factory/SQLite payloads by normalizing responses with method context and adding outgoing “opaque field” escape hatches.
src/github/copilot_sdk/instrument.clj Registers spec instrumentation for new/updated public API (history clear-context, SQLite transaction failures, factory API).
src/github/copilot_sdk/factory.clj New experimental Agent Factories API: definition, validation, run/resume/wait/list/detail/progress/cancel, plus async variants.
src/github/copilot_sdk.clj Re-exports new experimental APIs (factories, context clearing, SQLite transaction helpers) and adds new curated events.
script/validate_docs.clj Recognizes github.copilot-sdk.factory as a public namespace for doc validation.
schemas/README.md Updates the documented pinned schema package version.
README.md Highlights Agent Factories and enterprise policy options; bumps dependency version to 1.0.9.0; adds :factory permission kind mention.
examples/README.md Documents new Agent Factories example and notes it runs manually (requires parent CLI session).
examples/agent_factories.clj Adds an extension-style example that registers a factory via join-session and services reverse-RPC runs.
doc/mcp/overview.md Documents disabling MCP servers and built-in GitHub MCP tool configuration options.
doc/index.md Adds Agent Factories to the documentation index and feature list.
doc/getting-started.md Bumps version and points to new v1.0.9 options and Agent Factories guide.
doc/api/upstream-doc-gap-matrix.html Regenerated Codox HTML output reflecting updated docs/topic navigation (includes Agent Factories).
doc/api/style.html Regenerated Codox HTML output reflecting updated docs/topic navigation (includes Agent Factories).
doc/api/index.html Regenerated Codox HTML output reflecting updated docs/topic navigation (includes Agent Factories).
doc/api/github.copilot-sdk.tool-set.html Regenerated Codox HTML output reflecting updated docs/topic navigation (includes Agent Factories).
doc/api/github.copilot-sdk.specs.html Regenerated Codox HTML output reflecting updated docs/topic navigation (includes Agent Factories).
doc/api/github.copilot-sdk.protocol.html Regenerated Codox HTML output reflecting updated docs/topic navigation (includes Agent Factories).
doc/api/github.copilot-sdk.logging.html Regenerated Codox HTML output reflecting updated docs/topic navigation (includes Agent Factories).
doc/api/github.copilot-sdk.instrument.html Regenerated Codox HTML output reflecting updated docs/topic navigation (includes Agent Factories).
doc/api/github.copilot-sdk.helpers.html Regenerated Codox HTML output reflecting updated docs/topic navigation (includes Agent Factories).
doc/api/github.copilot-sdk.generated.event-specs.html Regenerated Codox HTML output reflecting updated docs/topic navigation (includes Agent Factories).
doc/api/getting-started.html Regenerated Codox HTML output reflecting updated version and navigation (includes Agent Factories).
doc/api/debugging.html Regenerated Codox HTML output reflecting updated docs/topic navigation (includes Agent Factories).
doc/api/custom-agents.html Regenerated Codox HTML output reflecting updated docs/topic navigation (includes Agent Factories).
doc/api/codegen.html Regenerated Codox HTML output reflecting updated docs/topic navigation (includes Agent Factories).
doc/api/byok.html Regenerated Codox HTML output reflecting updated docs/topic navigation (includes Agent Factories).
doc/api/azure-managed-identity.html Regenerated Codox HTML output reflecting updated docs/topic navigation (includes Agent Factories).
deps.edn Sets an :exec-fn for the :examples alias (Agent Factories example entrypoint).
CHANGELOG.md Adds detailed v1.0.9 sync + post-sync entries covering factories, MCP options, history clear-context, schema regen, etc.
build.clj Bumps project version to 1.0.9.0.
.copilot-schema-version Updates pinned runtime schema package version to 1.0.79-6.

Review details

  • Files reviewed: 53/56 changed files
  • Comments generated: 0
  • Review effort level: Lite

@krukow
krukow marked this pull request as ready for review August 7, 2026 21:17
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 3049f599-cb12-49b8-a1bb-609af27a5f9e
Copilot AI review requested due to automatic review settings August 7, 2026 21:35
@krukow
krukow merged commit a2e282a into main Aug 7, 2026
3 checks passed
@krukow
krukow deleted the krukow-sync-upstream-sdk-77f branch August 7, 2026 21:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 53/56 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants