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.79-9
1.0.80
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,24 @@ All notable changes to this project will be documented in this file. This change

## [Unreleased]

### Added (v1.0.11 sync)
- Added client-level `:builtin-plugin-directories` for absolute, trusted plugin
directories bundled by a host. A non-empty vector is registered exactly once
after protocol negotiation and before sessions can be created; registration
failure force-stops startup.
([upstream PR #2330](https://github.com/github/copilot-sdk/pull/2330))
- Added `attributed-permission-result` and
`attributed-permission-result?`, with closed idiomatic decision-context specs.
Permission handlers can attach outcome, source, and surface context without
changing the decision; plain decisions preserve legacy wire omission and
attributed `:no-result` still suppresses the response RPC.
([upstream PR #2294](https://github.com/github/copilot-sdk/pull/2294))

### Changed (v1.0.11 sync)
- Synced the library version to `1.0.11.0` and the runtime schema pin to
`1.0.80`. The API and session-event schemas are unchanged at the new pin, so
deterministic code generation produces no generated source delta.

### Changed (performance)
- Avoided unnecessary camel/snake-case conversion work for already-normalized
protocol keywords while preserving exact conversion semantics for camel,
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Add to your `deps.edn`:

```clojure
;; From Maven Central
io.github.copilot-community-sdk/copilot-sdk-clojure {:mvn/version "1.0.9.0"}
io.github.copilot-community-sdk/copilot-sdk-clojure {:mvn/version "1.0.11.0"}

;; 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.9.0")
(def version "1.0.11.0")
(def class-dir "target/classes")

(defn- try-sh
Expand Down
29 changes: 28 additions & 1 deletion doc/api/API.html
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ <h3><a href="#constructor" id="constructor"></a>Constructor</h3>
<tbody>
<tr><td> <code>:cli-path</code> </td><td> string </td><td> <code>"copilot"</code> </td><td> Path to CLI executable. Falls back to <code>COPILOT_CLI_PATH</code> env var when not set </td></tr>
<tr><td> <code>:cli-args</code> </td><td> vector </td><td> <code>[]</code> </td><td> Extra arguments prepended before SDK-managed flags </td></tr>
<tr><td> <code>:builtin-plugin-directories</code> </td><td> vector of strings </td><td> <code>[]</code> </td><td> Absolute paths to trusted plugin directories bundled by the host. The complete non-empty set is registered once after the protocol handshake and before any session or session filesystem provider. A registration failure force-stops the client and fails <code>start!</code>. Distinct from the per-session <code>:plugin-directories</code> option. (<a href="https://github.com/github/copilot-sdk/pull/2330">upstream PR #2330</a>) </td></tr>
<tr><td> <code>:cli-url</code> </td><td> string </td><td> nil </td><td> URL of existing CLI server (e.g., <code>"localhost:8080"</code>). When provided, no CLI process is spawned </td></tr>
<tr><td> <code>:port</code> </td><td> number </td><td> <code>0</code> </td><td> Server port (0 = random) </td></tr>
<tr><td> <code>:use-stdio?</code> </td><td> boolean </td><td> <code>true</code> </td><td> Use stdio transport instead of TCP </td></tr>
Expand Down Expand Up @@ -2022,7 +2023,7 @@ <h3><a href="#infinite-sessions" id="infinite-sessions"></a>Infinite Sessions</h
</code></pre>
<h3><a href="#agent-factories-experimental" id="agent-factories-experimental"></a>Agent Factories (Experimental)</h3>
<blockquote>
<p><strong>Note:</strong> Agent Factories are <code>@experimental</code> upstream (<a href="https://github.com/github/copilot-sdk/pull/2114">upstream PR #2114</a>). The API may change in future releases.</p>
<p><strong>Note:</strong> Agent Factories are <code>@experimental</code> upstream (<a href="https://github.com/github/copilot-sdk/pull/2114">upstream PR #2114</a>). The API may change in future releases. The upstream <code>v1.0.11</code> experimental <code>argsSchema</code> authoring addition is intentionally not exposed while this surface remains experimental.</p>
</blockquote>
<p>An Agent Factory is an extension-authored, named workflow that a session can run: it declares its own phases and limits, executes with reverse-RPC access to the parent session (spawn nested agent turns, run journaled/idempotent steps, fan out work in parallel or as a pipeline), and reports durable, resumable progress back to the CLI. Factories are registered per-session via <a href="#join-session"><code>join-session</code></a>’s <code>:factories</code> option and approved via the <a href="#permission-handling"><code>:factory</code> permission kind</a>.</p>
<p>Most of this API is namespace-qualified only — require the namespace directly:</p>
Expand Down Expand Up @@ -2251,6 +2252,32 @@ <h3><a href="#permission-handling" id="permission-handling"></a>Permission Handl
<p>Legacy Clojure permission result kinds such as <code>:approved</code> and <code>:denied-by-rules</code> remain accepted and are normalized before the SDK sends the decision to the CLI.</p>
<h4><a href="#resolvedbyhook-hook-resolved-permissions" id="resolvedbyhook-hook-resolved-permissions"></a><code>resolvedByHook</code> — Hook-Resolved Permissions</h4>
<p>When the runtime resolves a permission request via a <code>permissionRequest</code> hook, the <code>permission.requested</code> event includes <code>:resolved-by-hook true</code>. The SDK automatically skips the client’s <code>:on-permission-request</code> handler and does not send the <code>handlePendingPermissionRequest</code> RPC — the event is still published to event subscribers for observability.</p>
<h4><a href="#attributed-permission-result" id="attributed-permission-result"></a><code>attributed-permission-result</code></h4>
<pre><code class="language-clojure">(require '[github.copilot-sdk :as copilot])

(defn permission-handler [_request _ctx]
(copilot/attributed-permission-result
{:kind :approve-once}
{:outcome :auto-approved
:source :host-policy
:surface :sdk}))

(copilot/attributed-permission-result?
(permission-handler nil nil))
;; =&gt; true
</code></pre>
<p>Attach informational context describing how and where a permission decision was made. Reapplying <code>attributed-permission-result</code> replaces the previous context rather than nesting it. Permission behavior is determined only by the inner result.</p>
<table>
<thead>
<tr><th> Context key </th><th> Allowed values </th></tr>
</thead>
<tbody>
<tr><td> <code>:outcome</code> </td><td> <code>:auto-approved</code>, <code>:autopilot-denied</code>, <code>:prompted-user</code> </td></tr>
<tr><td> <code>:source</code> </td><td> <code>:judge-recommendation</code>, <code>:human-response</code>, <code>:host-policy</code>, <code>:unattended-fallback</code> </td></tr>
<tr><td> <code>:surface</code> </td><td> <code>:tui</code>, <code>:prompt-mode</code>, <code>:copilot-app</code>, <code>:sdk</code> </td></tr>
</tbody>
</table>
<p>The SDK converts these keywords to the runtime’s snake-case strings and sends <code>decisionContext</code> beside <code>result</code>. Plain permission decisions omit <code>decisionContext</code> entirely. An attributed <code>{:kind :no-result}</code> still suppresses the response RPC. Handlers may return attributed results directly or through a core.async channel. (<a href="https://github.com/github/copilot-sdk/pull/2294">upstream PR #2294</a>)</p>
<h4><a href="#approve-all" id="approve-all"></a><code>approve-all</code></h4>
<pre><code class="language-clojure">(copilot/approve-all request ctx)
</code></pre>
Expand Down
4 changes: 2 additions & 2 deletions doc/api/getting-started.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ <h2><a href="#prerequisites" id="prerequisites"></a>Prerequisites</h2>
</code></pre>
<h2><a href="#step-1-add-the-sdk-dependency" id="step-1-add-the-sdk-dependency"></a>Step 1: Add the SDK Dependency</h2>
<p>Add to your <code>deps.edn</code>:</p>
<pre><code class="language-clojure">{:deps {io.github.copilot-community-sdk/copilot-sdk-clojure {:mvn/version "1.0.9.0"}}}
<pre><code class="language-clojure">{:deps {io.github.copilot-community-sdk/copilot-sdk-clojure {:mvn/version "1.0.11.0"}}}
</code></pre>
<p>Or use as a Git dependency:</p>
<pre><code class="language-clojure">{:deps {io.github.copilot-community-sdk/copilot-sdk-clojure
{:git/url "https://github.com/copilot-community-sdk/copilot-sdk-clojure"
:git/sha "49b0d5e1e701d3ed312a37867fd79f082b8c59b3"}}}
:git/sha "0b6668e66abd328d1f3e837ca8826c71202290a6"}}}
</code></pre>
<h2><a href="#step-2-send-your-first-message" id="step-2-send-your-first-message"></a>Step 2: Send Your First Message</h2>
<p>The simplest way to use the SDK — about 3 lines of code:</p>
Expand Down
7 changes: 5 additions & 2 deletions doc/api/github.copilot-sdk.client.html

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion doc/api/github.copilot-sdk.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions doc/api/index.html

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion doc/api/style.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ <h2><a href="#terminology" id="terminology"></a>Terminology</h2>
<h2><a href="#cross-references" id="cross-references"></a>Cross-References</h2>
<ul>
<li>Use <strong>relative paths</strong> between doc files: <code>[API Reference](reference/API.md)</code></li>
<li>From repo root (README, AGENTS.md): <code>[API Reference](./doc/reference/API.md)</code></li>
<li>From repo root README: <code>[API Reference](./doc/reference/API.md)</code></li>
<li><code>AGENTS.md</code> is a symlink to <code>.github/copilot-instructions.md</code>; links in that shared file must use full canonical GitHub URLs so both rendered paths work</li>
<li>From examples/: <code>[BYOK](../doc/auth/byok.md)</code></li>
<li>Never use absolute filesystem paths</li>
<li>Link to specific sections with anchors: <code>[Events](reference/API.md#event-types)</code></li>
Expand Down
Loading
Loading