@deliverd/sdk 0.34.0 → 0.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -826,6 +826,22 @@ import { deliverdCanUseTool } from "@deliverd/sdk/adapters";
826
826
  query({ prompt, options: { canUseTool: deliverdCanUseTool({ deliverd, when: (tool) => tool === "Bash" }) } });
827
827
  ```
828
828
 
829
+ **Claude Managed Agents** (hosted, or self-hosted on your own servers) — give the
830
+ toolset `permission_policy: always_ask` (MCP toolsets ask by default), then
831
+ answer the sessions that pause for confirmation:
832
+
833
+ ```ts
834
+ import { watchManagedAgentSessions } from "@deliverd/sdk/adapters";
835
+
836
+ // Self-hosted: ANTHROPIC_BASE_URL is your server, ANTHROPIC_API_KEY its API key.
837
+ await watchManagedAgentSessions(new Anthropic(), { deliverd, approvers: ["platform-team"] });
838
+ ```
839
+
840
+ Each held call is asked about once and answered with `user.tool_confirmation`;
841
+ a no carries the person's reason as the `deny_message`. A self-hosted server
842
+ sends no webhooks, so the watcher polls; `followManagedAgentSession(client,
843
+ sessionId, { deliverd })` follows one session's stream instead.
844
+
829
845
  **Vercel AI SDK**
830
846
 
831
847
  ```ts
@@ -0,0 +1,152 @@
1
+ import { type Duration } from "../duration.js";
2
+ import { type ToolApprovalOptions } from "./shared.js";
3
+ /**
4
+ * Claude Managed Agents, hosted by Anthropic or self-hosted: a person answers
5
+ * the tool calls a permission policy holds for confirmation.
6
+ *
7
+ * Give the agent a toolset with `permission_policy: { type: "always_ask" }`
8
+ * (MCP toolsets ask by default) and the session pauses on each such call with
9
+ * `session.status_idle`, `stop_reason.type: "requires_action"`. These answer
10
+ * the pause with a person's decision, as `user.tool_confirmation` events:
11
+ *
12
+ * ```ts
13
+ * import Anthropic from "@anthropic-ai/sdk";
14
+ * import { Deliverd } from "@deliverd/sdk";
15
+ * import { watchManagedAgentSessions } from "@deliverd/sdk/adapters";
16
+ *
17
+ * // Self-hosted: ANTHROPIC_BASE_URL is your server, ANTHROPIC_API_KEY its key.
18
+ * const client = new Anthropic();
19
+ * await watchManagedAgentSessions(client, {
20
+ * deliverd: new Deliverd(),
21
+ * approvers: ["platform-team"],
22
+ * });
23
+ * ```
24
+ *
25
+ * A self-hosted server sends no webhooks, so something has to look. The
26
+ * watcher polls for idle sessions and answers the ones waiting on a
27
+ * confirmation; `followManagedAgentSession` follows one session's stream; and
28
+ * `answerManagedAgentConfirmations` does one pass over one session, for a loop
29
+ * you own. Each call is one request in Deliverd keyed by its event id
30
+ * (`managed-agents:<id>`), so a second pass finds the request it already made
31
+ * rather than asking twice.
32
+ *
33
+ * - **Approved**, the call runs.
34
+ * - **Declined**, it does not, and the person's reason reaches the model as
35
+ * the `deny_message`.
36
+ * - **Approved only with changes**, it is declined: a confirmation is a yes or
37
+ * a no and cannot carry corrected input. The model is told the approved
38
+ * values, so it can call again with them.
39
+ * - **Undecided** before `timeout`, nothing is sent. The session waits
40
+ * indefinitely, so a later pass picks the same request up.
41
+ *
42
+ * Only calls the server marked `evaluated_permission: "ask"` are answered.
43
+ * A call `auto` already ran or denied, a worker-run tool on a self-hosted
44
+ * environment and a custom tool (your own code, where `deliverd.approve()`
45
+ * belongs) are left alone.
46
+ *
47
+ * Shapes follow `client.beta.sessions` in `@anthropic-ai/sdk` 1.8 (beta
48
+ * header `managed-agents-2026-04-01`), which self-hosted servers serve too.
49
+ * Nothing is imported from it.
50
+ */
51
+ /** The events this reads. Every other event passes through untouched. */
52
+ export interface ManagedAgentsEvent {
53
+ id: string;
54
+ type: string;
55
+ /** `agent.tool_use` and `agent.mcp_tool_use`: the tool. */
56
+ name?: string;
57
+ input?: Record<string, unknown>;
58
+ /** `agent.mcp_tool_use`: the server that offers the tool. */
59
+ mcp_server_name?: string;
60
+ /** `"ask"` on a call that is waiting for a confirmation. */
61
+ evaluated_permission?: string;
62
+ /** `session.status_idle`: why it stopped. */
63
+ stop_reason?: {
64
+ type: string;
65
+ event_ids?: string[];
66
+ } | null;
67
+ }
68
+ /** What a stream carries: the events above, and `event_start` / `event_delta` frames with no id. */
69
+ export type ManagedAgentsStreamEvent = Omit<ManagedAgentsEvent, "id"> & {
70
+ id?: string;
71
+ };
72
+ export interface ManagedAgentsToolConfirmation {
73
+ type: "user.tool_confirmation";
74
+ tool_use_id: string;
75
+ result: "allow" | "deny";
76
+ deny_message?: string;
77
+ }
78
+ /** The part of `new Anthropic()` these use. */
79
+ export interface ManagedAgentsClient {
80
+ beta: {
81
+ sessions: {
82
+ list(params?: {
83
+ statuses?: Array<"rescheduling" | "running" | "idle" | "terminated">;
84
+ agent_id?: string;
85
+ }): AsyncIterable<{
86
+ id: string;
87
+ }>;
88
+ events: {
89
+ list(sessionId: string, params?: {
90
+ order?: "asc" | "desc";
91
+ types?: Array<"session.status_idle" | "agent.tool_use" | "agent.mcp_tool_use">;
92
+ }): AsyncIterable<ManagedAgentsEvent>;
93
+ send(sessionId: string, params: {
94
+ events: ManagedAgentsToolConfirmation[];
95
+ }): PromiseLike<unknown>;
96
+ stream(sessionId: string): PromiseLike<AsyncIterable<ManagedAgentsStreamEvent>>;
97
+ };
98
+ };
99
+ };
100
+ }
101
+ export interface ManagedAgentsApprovalOptions extends ToolApprovalOptions {
102
+ /**
103
+ * Stop waiting on a person after this and leave the call for a later pass.
104
+ * The session waits indefinitely, so nothing is refused for being slow.
105
+ */
106
+ timeout?: Duration;
107
+ /** Cancels the wait. */
108
+ signal?: AbortSignal;
109
+ }
110
+ /** What one pass over a session came to. */
111
+ export interface ManagedAgentsResolution {
112
+ /** The confirmations sent, in the order the calls were asked about. */
113
+ sent: ManagedAgentsToolConfirmation[];
114
+ /** Event ids nobody decided before `timeout`. Still open in Deliverd and in the session. */
115
+ pending: string[];
116
+ /** Why each declined call was declined, by event id. */
117
+ reasons: Record<string, string>;
118
+ }
119
+ /**
120
+ * One pass over one session: if it is waiting on confirmations, ask a person
121
+ * about each and send the answers that came back.
122
+ */
123
+ export declare function answerManagedAgentConfirmations(client: ManagedAgentsClient, sessionId: string, options: ManagedAgentsApprovalOptions,
124
+ /** The ids from a `requires_action` you already hold, to skip looking them up. */
125
+ eventIds?: string[]): Promise<ManagedAgentsResolution>;
126
+ /**
127
+ * Follow one session's stream, answering each confirmation it pauses on,
128
+ * until its turn ends, it stops for another reason, or it terminates.
129
+ * Open it before you send the message that starts the turn: a stream carries
130
+ * only what happens after it opens.
131
+ */
132
+ export declare function followManagedAgentSession(client: ManagedAgentsClient, sessionId: string, options: ManagedAgentsApprovalOptions & {
133
+ /** Every event, for printing the agent's messages as they arrive. */
134
+ onEvent?: (event: ManagedAgentsStreamEvent) => void;
135
+ }): Promise<void>;
136
+ /**
137
+ * Keep answering, for every idle session the key can see (or one agent's,
138
+ * with `agentId`), until `signal` aborts. For a self-hosted server, which
139
+ * sends no webhooks; it works the same against Anthropic's API.
140
+ *
141
+ * Each pass waits on a person for at most `timeout` per call (default ten
142
+ * seconds), so one slow decision does not hold up another session. An
143
+ * undecided call is picked up again next pass, from the same request.
144
+ */
145
+ export declare function watchManagedAgentSessions(client: ManagedAgentsClient, options: ManagedAgentsApprovalOptions & {
146
+ agentId?: string;
147
+ /** Time between passes. Default five seconds. */
148
+ interval?: Duration;
149
+ /** A session that could not be answered this pass; the watcher carries on. */
150
+ onError?: (error: unknown, sessionId: string) => void;
151
+ }): Promise<void>;
152
+ //# sourceMappingURL=claude-managed-agents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claude-managed-agents.d.ts","sourceRoot":"","sources":["../../src/adapters/claude-managed-agents.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE3D,OAAO,EAA2E,KAAK,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEhI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAEH,yEAAyE;AACzE,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,I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4BAA4B,GAAG;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iDAAiD;IACjD,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,8EAA8E;IAC9E,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CACvD,GACA,OAAO,CAAC,IAAI,CAAC,CAwBf"}
@@ -0,0 +1,165 @@
1
+ import { DeliverdTimeoutError } from "../errors.js";
2
+ import { durationMs } from "../duration.js";
3
+ import { DEFAULT_TOOL_EXPIRY, defaultDescription, refusalReason, structuredInput } from "./shared.js";
4
+ const PREFIX = "managed-agents:";
5
+ const TOOL_USE = ["agent.tool_use", "agent.mcp_tool_use"];
6
+ /** The event ids the session is blocked on, from its latest idle event; none when it is not. */
7
+ async function blockingIds(client, sessionId) {
8
+ for await (const event of client.beta.sessions.events.list(sessionId, { order: "desc", types: ["session.status_idle"] })) {
9
+ return event.stop_reason?.type === "requires_action" ? [...(event.stop_reason.event_ids ?? [])] : [];
10
+ }
11
+ return [];
12
+ }
13
+ /** The tool-use events behind those ids, newest first, stopping once all are found. */
14
+ async function toolUses(client, sessionId, ids) {
15
+ const wanted = new Set(ids);
16
+ const found = new Map();
17
+ for await (const event of client.beta.sessions.events.list(sessionId, { order: "desc", types: TOOL_USE })) {
18
+ if (wanted.has(event.id))
19
+ found.set(event.id, event);
20
+ if (found.size === wanted.size)
21
+ break;
22
+ }
23
+ return ids.flatMap((id) => (found.has(id) ? [found.get(id)] : []));
24
+ }
25
+ function changedReason(tool, changes) {
26
+ const parts = changes.map((c) => `${c.field} from ${JSON.stringify(c.from)} to ${JSON.stringify(c.to)}`);
27
+ return `A person approved ${tool} only with changes: ${parts.join("; ")}. It was not run as proposed. If it is still needed, call it again with those values.`;
28
+ }
29
+ function toolLabel(event) {
30
+ const name = event.name ?? "a tool";
31
+ return event.mcp_server_name ? `${name} on ${event.mcp_server_name}` : name;
32
+ }
33
+ async function decideCall(event, sessionId, options) {
34
+ const tool = event.name ?? "a tool";
35
+ const input = event.input ?? {};
36
+ if (options.when && !(await options.when(tool, input)))
37
+ return { kind: "allow" };
38
+ const described = (options.describe ?? defaultDescription)(toolLabel(event), input);
39
+ const structured = structuredInput(input);
40
+ try {
41
+ const decision = await options.deliverd.approve({
42
+ ...described,
43
+ approvers: options.approvers,
44
+ externalId: PREFIX + event.id,
45
+ flowId: options.flowId,
46
+ metadata: {
47
+ ...options.metadata,
48
+ tool,
49
+ session: sessionId,
50
+ ...(event.mcp_server_name ? { mcp_server: event.mcp_server_name } : {}),
51
+ },
52
+ ...(structured ? { input: structured } : {}),
53
+ expiresIn: options.expiresIn ?? DEFAULT_TOOL_EXPIRY,
54
+ timeout: options.timeout,
55
+ signal: options.signal,
56
+ });
57
+ if (decision.approved) {
58
+ return decision.changes?.length ? { kind: "deny", reason: changedReason(tool, decision.changes) } : { kind: "allow" };
59
+ }
60
+ return { kind: "deny", reason: refusalReason(tool, decision) };
61
+ }
62
+ catch (err) {
63
+ if (err instanceof DeliverdTimeoutError)
64
+ return { kind: "pending" };
65
+ throw err;
66
+ }
67
+ }
68
+ /**
69
+ * One pass over one session: if it is waiting on confirmations, ask a person
70
+ * about each and send the answers that came back.
71
+ */
72
+ export async function answerManagedAgentConfirmations(client, sessionId, options,
73
+ /** The ids from a `requires_action` you already hold, to skip looking them up. */
74
+ eventIds) {
75
+ const resolution = { sent: [], pending: [], reasons: {} };
76
+ const ids = eventIds ?? (await blockingIds(client, sessionId));
77
+ if (ids.length === 0)
78
+ return resolution;
79
+ const calls = (await toolUses(client, sessionId, ids)).filter((e) => e.evaluated_permission === "ask");
80
+ const answers = await Promise.all(calls.map((event) => decideCall(event, sessionId, options)));
81
+ calls.forEach((event, i) => {
82
+ const answer = answers[i];
83
+ if (answer.kind === "pending") {
84
+ resolution.pending.push(event.id);
85
+ }
86
+ else if (answer.kind === "allow") {
87
+ resolution.sent.push({ type: "user.tool_confirmation", tool_use_id: event.id, result: "allow" });
88
+ }
89
+ else {
90
+ resolution.reasons[event.id] = answer.reason;
91
+ resolution.sent.push({ type: "user.tool_confirmation", tool_use_id: event.id, result: "deny", deny_message: answer.reason });
92
+ }
93
+ });
94
+ if (resolution.sent.length > 0)
95
+ await client.beta.sessions.events.send(sessionId, { events: resolution.sent });
96
+ return resolution;
97
+ }
98
+ /**
99
+ * Follow one session's stream, answering each confirmation it pauses on,
100
+ * until its turn ends, it stops for another reason, or it terminates.
101
+ * Open it before you send the message that starts the turn: a stream carries
102
+ * only what happens after it opens.
103
+ */
104
+ export async function followManagedAgentSession(client, sessionId, options) {
105
+ const stream = await client.beta.sessions.events.stream(sessionId);
106
+ for await (const event of stream) {
107
+ options.onEvent?.(event);
108
+ if (event.type === "session.status_terminated")
109
+ return;
110
+ if (event.type !== "session.status_idle")
111
+ continue;
112
+ if (event.stop_reason?.type !== "requires_action")
113
+ return;
114
+ await answerManagedAgentConfirmations(client, sessionId, options, event.stop_reason.event_ids ?? []);
115
+ }
116
+ }
117
+ /**
118
+ * Keep answering, for every idle session the key can see (or one agent's,
119
+ * with `agentId`), until `signal` aborts. For a self-hosted server, which
120
+ * sends no webhooks; it works the same against Anthropic's API.
121
+ *
122
+ * Each pass waits on a person for at most `timeout` per call (default ten
123
+ * seconds), so one slow decision does not hold up another session. An
124
+ * undecided call is picked up again next pass, from the same request.
125
+ */
126
+ export async function watchManagedAgentSessions(client, options) {
127
+ const interval = options.interval === undefined ? 5_000 : durationMs(options.interval);
128
+ const perPass = { ...options, timeout: options.timeout ?? "10s" };
129
+ while (!options.signal?.aborted) {
130
+ const idle = [];
131
+ for await (const session of client.beta.sessions.list({
132
+ statuses: ["idle"],
133
+ ...(options.agentId ? { agent_id: options.agentId } : {}),
134
+ })) {
135
+ idle.push(session.id);
136
+ }
137
+ await Promise.all(idle.map(async (id) => {
138
+ try {
139
+ await answerManagedAgentConfirmations(client, id, perPass);
140
+ }
141
+ catch (err) {
142
+ if (options.signal?.aborted)
143
+ return;
144
+ if (options.onError)
145
+ options.onError(err, id);
146
+ else
147
+ throw err;
148
+ }
149
+ }));
150
+ await sleep(interval, options.signal);
151
+ }
152
+ }
153
+ function sleep(ms, signal) {
154
+ return new Promise((resolve) => {
155
+ if (signal?.aborted)
156
+ return resolve();
157
+ const timer = setTimeout(done, ms);
158
+ function done() {
159
+ clearTimeout(timer);
160
+ signal?.removeEventListener("abort", done);
161
+ resolve();
162
+ }
163
+ signal?.addEventListener("abort", done, { once: true });
164
+ });
165
+ }
@@ -8,6 +8,8 @@
8
8
  */
9
9
  export { deliverdCanUseTool } from "./claude-agent-sdk.js";
10
10
  export type { ClaudeCanUseTool, ClaudeCanUseToolContext, ClaudePermissionResult, ClaudeToolApprovalOptions, } from "./claude-agent-sdk.js";
11
+ export { answerManagedAgentConfirmations, followManagedAgentSession, watchManagedAgentSessions, } from "./claude-managed-agents.js";
12
+ export type { ManagedAgentsApprovalOptions, ManagedAgentsClient, ManagedAgentsEvent, ManagedAgentsResolution, ManagedAgentsStreamEvent, ManagedAgentsToolConfirmation, } from "./claude-managed-agents.js";
11
13
  export { deliverdToolApproval } from "./ai-sdk.js";
12
14
  export type { AiSdkApprovalCall, AiSdkApprovalStatus } from "./ai-sdk.js";
13
15
  export { resolveInterruptions, runWithDeliverdApprovals } from "./openai-agents.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/adapters/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,YAAY,EACV,gBAAgB,EAChB,uBAAuB,EACvB,sBAAsB,EACtB,yBAAyB,GAC1B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,YAAY,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,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9
9
  export { deliverdCanUseTool } from "./claude-agent-sdk.js";
10
+ export { answerManagedAgentConfirmations, followManagedAgentSession, watchManagedAgentSessions, } from "./claude-managed-agents.js";
10
11
  export { deliverdToolApproval } from "./ai-sdk.js";
11
12
  export { resolveInterruptions, runWithDeliverdApprovals } from "./openai-agents.js";
12
13
  export { approveInGraph, resumeFromCallback } from "./langgraph.js";
@@ -43,7 +43,7 @@
43
43
  * **Add the version here when you publish it, not before.** An entry is a
44
44
  * claim that `npm install @deliverd/sdk@x` works today.
45
45
  */
46
- export declare const PUBLISHED_TO_NPM: readonly ["0.1.0", "0.2.0", "0.3.0", "0.4.0", "0.5.0", "0.6.0", "0.6.1", "0.6.2", "0.7.0", "0.7.1", "0.8.0", "0.8.1", "0.8.2", "0.9.0", "0.10.0", "0.11.0", "0.11.1", "0.12.0", "0.13.0", "0.14.0", "0.15.0", "0.16.0", "0.17.0", "0.18.0", "0.19.0", "0.20.0", "0.21.0", "0.22.0", "0.23.0", "0.24.0", "0.24.1", "0.25.0", "0.25.1", "0.26.0", "0.27.0", "0.28.0", "0.29.0", "0.30.0", "0.31.0", "0.32.0", "0.33.0"];
46
+ export declare const PUBLISHED_TO_NPM: readonly ["0.1.0", "0.2.0", "0.3.0", "0.4.0", "0.5.0", "0.6.0", "0.6.1", "0.6.2", "0.7.0", "0.7.1", "0.8.0", "0.8.1", "0.8.2", "0.9.0", "0.10.0", "0.11.0", "0.11.1", "0.12.0", "0.13.0", "0.14.0", "0.15.0", "0.16.0", "0.17.0", "0.18.0", "0.19.0", "0.20.0", "0.21.0", "0.22.0", "0.23.0", "0.24.0", "0.24.1", "0.25.0", "0.25.1", "0.26.0", "0.27.0", "0.28.0", "0.29.0", "0.30.0", "0.31.0", "0.32.0", "0.33.0", "0.34.0"];
47
47
  /**
48
48
  * A fingerprint of what each *published* version recorded.
49
49
  *
@@ -1 +1 @@
1
- {"version":3,"file":"released.d.ts","sourceRoot":"","sources":["../src/released.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,gBAAgB,uZA0CnB,CAAC;AAEX;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAiHzC,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAmi+BtD,CAAC"}
1
+ {"version":3,"file":"released.d.ts","sourceRoot":"","sources":["../src/released.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,gBAAgB,iaA2CnB,CAAC;AAEX;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAmHzC,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAq/gCtD,CAAC"}