stitchkit 0.127.0 → 0.128.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/CHANGELOG.md +137 -6
- package/dist/agent-executor/acp/v1-connect.d.ts +9 -1
- package/dist/agent-executor/acp/v1-connect.d.ts.map +1 -1
- package/dist/agent-executor/acp/v1-driver.d.ts +8 -2
- package/dist/agent-executor/acp/v1-driver.d.ts.map +1 -1
- package/dist/agent-executor/acp/v1-map.d.ts.map +1 -1
- package/dist/agent-executor/acp/v1-session.d.ts +8 -0
- package/dist/agent-executor/acp/v1-session.d.ts.map +1 -1
- package/dist/agent-executor/claude/cli-driver.d.ts +4 -0
- package/dist/agent-executor/claude/cli-driver.d.ts.map +1 -1
- package/dist/agent-executor/claude/protocol.d.ts +20 -2
- package/dist/agent-executor/claude/protocol.d.ts.map +1 -1
- package/dist/agent-executor/claude/session.d.ts +2 -1
- package/dist/agent-executor/claude/session.d.ts.map +1 -1
- package/dist/agent-executor/claude/transcript.d.ts +7 -4
- package/dist/agent-executor/claude/transcript.d.ts.map +1 -1
- package/dist/agent-executor/claude-sdk/driver.d.ts +4 -0
- package/dist/agent-executor/claude-sdk/driver.d.ts.map +1 -1
- package/dist/agent-executor/claude-sdk/session.d.ts.map +1 -1
- package/dist/agent-executor/codex/driver.d.ts +4 -0
- package/dist/agent-executor/codex/driver.d.ts.map +1 -1
- package/dist/agent-executor/codex/protocol.d.ts +26 -2
- package/dist/agent-executor/codex/protocol.d.ts.map +1 -1
- package/dist/agent-executor/codex/session.d.ts +3 -1
- package/dist/agent-executor/codex/session.d.ts.map +1 -1
- package/dist/agent-executor/image-input.d.ts +71 -0
- package/dist/agent-executor/image-input.d.ts.map +1 -0
- package/dist/agent-executor/session-primitives.d.ts +0 -3
- package/dist/agent-executor/session-primitives.d.ts.map +1 -1
- package/dist/agent-runtime/agent-tool.d.ts +21 -7
- package/dist/agent-runtime/agent-tool.d.ts.map +1 -1
- package/dist/agent-runtime/branch-contract.d.ts +1 -0
- package/dist/agent-runtime/branch-contract.d.ts.map +1 -1
- package/dist/agent-runtime/branch-identities.d.ts +5 -2
- package/dist/agent-runtime/branch-identities.d.ts.map +1 -1
- package/dist/agent-runtime/branch-messages.d.ts +9 -9
- package/dist/agent-runtime/branch-messages.d.ts.map +1 -1
- package/dist/agent-runtime/branch-observations.d.ts +45 -32
- package/dist/agent-runtime/branch-observations.d.ts.map +1 -1
- package/dist/agent-runtime/branch-provider.d.ts +12 -6
- package/dist/agent-runtime/branch-provider.d.ts.map +1 -1
- package/dist/agent-runtime/branch-source.d.ts +13 -1
- package/dist/agent-runtime/branch-source.d.ts.map +1 -1
- package/dist/agent-runtime/child-tools.d.ts +64 -0
- package/dist/agent-runtime/child-tools.d.ts.map +1 -1
- package/dist/agent-runtime/event-search-tools.d.ts +82 -5
- package/dist/agent-runtime/event-search-tools.d.ts.map +1 -1
- package/dist/agent-runtime/invocation-attempt.d.ts +1 -1
- package/dist/agent-runtime/invocation-attempt.d.ts.map +1 -1
- package/dist/agent-runtime/invocation-payload.d.ts +12 -0
- package/dist/agent-runtime/invocation-payload.d.ts.map +1 -1
- package/dist/agent-runtime/invocation-read.d.ts +6 -3
- package/dist/agent-runtime/invocation-read.d.ts.map +1 -1
- package/dist/agent-runtime/invocation-schema.d.ts +50 -8
- package/dist/agent-runtime/invocation-schema.d.ts.map +1 -1
- package/dist/agent-runtime/invocations.d.ts +20 -9
- package/dist/agent-runtime/invocations.d.ts.map +1 -1
- package/dist/agent-runtime/postgres.d.ts.map +1 -1
- package/dist/agent-runtime/schedule-tools.d.ts +30 -0
- package/dist/agent-runtime/schedule-tools.d.ts.map +1 -1
- package/dist/agent-runtime/schemas-invocation-payload.d.ts +48 -0
- package/dist/agent-runtime/schemas-invocation-payload.d.ts.map +1 -0
- package/dist/agent-runtime/sql-events.d.ts.map +1 -1
- package/dist/agent-runtime/sql-session.d.ts +11 -0
- package/dist/agent-runtime/sql-session.d.ts.map +1 -1
- package/dist/agent-runtime/sqlite-transactions.d.ts.map +1 -1
- package/dist/agent-runtime/state-tools.d.ts +55 -0
- package/dist/agent-runtime/state-tools.d.ts.map +1 -1
- package/dist/agent-runtime/store-branch.d.ts.map +1 -1
- package/dist/agent-runtime/store-conformance-lifecycle.d.ts +20 -20
- package/dist/agent-runtime/store-conformance-support.d.ts +10 -10
- package/dist/agent-runtime/store-create.d.ts.map +1 -1
- package/dist/agent-runtime/store-driver-contract.d.ts +12 -0
- package/dist/agent-runtime/store-driver-contract.d.ts.map +1 -1
- package/dist/agent-runtime/store-memory-events.d.ts.map +1 -1
- package/dist/agent-runtime/store.d.ts +7 -0
- package/dist/agent-runtime/store.d.ts.map +1 -1
- package/dist/declaration/declaration.d.ts +6 -3
- package/dist/declaration/declaration.d.ts.map +1 -1
- package/dist/entrypoints/agent-executor/acp.d.ts +1 -1
- package/dist/entrypoints/agent-executor/acp.d.ts.map +1 -1
- package/dist/entrypoints/agent-executor/acp.js +23 -12
- package/dist/entrypoints/agent-executor/claude-sdk.js +26 -10
- package/dist/entrypoints/agent-executor/claude.js +35 -16
- package/dist/entrypoints/agent-executor/codex.js +81 -21
- package/dist/entrypoints/agent-executor.js +1 -1
- package/dist/entrypoints/agent-runtime/harness.js +5 -6
- package/dist/entrypoints/agent-runtime/openrouter.js +2 -2
- package/dist/entrypoints/agent-runtime/postgres.js +8 -3
- package/dist/entrypoints/agent-runtime/sandbox.js +3 -3
- package/dist/entrypoints/agent-runtime/sqlite/bun.js +4 -4
- package/dist/entrypoints/agent-runtime/sqlite/node.js +4 -4
- package/dist/entrypoints/agent-runtime/testing.js +6 -6
- package/dist/entrypoints/agent-runtime.d.ts +9 -7
- package/dist/entrypoints/agent-runtime.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime.js +246 -199
- package/dist/entrypoints/application/diagnostic-journal.js +4 -4
- package/dist/entrypoints/application/directory-inbox.js +8 -8
- package/dist/entrypoints/cli/publish.js +8 -8
- package/dist/entrypoints/cli.js +10 -9
- package/dist/entrypoints/declaration.js +0 -1
- package/dist/entrypoints/files.js +40 -17
- package/dist/entrypoints/node.js +4 -4
- package/dist/entrypoints/observability.js +1 -1
- package/dist/entrypoints/process.js +1 -1
- package/dist/entrypoints/server.js +7 -7
- package/dist/entrypoints/service-host/macos.js +4 -4
- package/dist/entrypoints/service-host.d.ts +4 -1
- package/dist/entrypoints/service-host.d.ts.map +1 -1
- package/dist/entrypoints/service-host.js +831 -220
- package/dist/entrypoints/spend.js +1 -1
- package/dist/entrypoints/telegram.js +4 -4
- package/dist/entrypoints/tools/agent.js +4 -3
- package/dist/entrypoints/tools/invoker.js +3 -2
- package/dist/entrypoints/tools/mcp.js +4 -3
- package/dist/entrypoints/tools/toolkit.js +6 -5
- package/dist/entrypoints/tools.d.ts +1 -1
- package/dist/entrypoints/tools.d.ts.map +1 -1
- package/dist/entrypoints/tools.js +10 -8
- package/dist/files/directory-appearance.d.ts +20 -9
- package/dist/files/directory-appearance.d.ts.map +1 -1
- package/dist/files/polled-json.d.ts.map +1 -1
- package/dist/files/regular-file.d.ts +15 -5
- package/dist/files/regular-file.d.ts.map +1 -1
- package/dist/{index-z4k0hqp9.js → index-0gqs8ght.js} +106 -24
- package/dist/{index-caywx1c0.js → index-13dnv6d0.js} +107 -10
- package/dist/{index-a725ayvz.js → index-1qwrczr1.js} +1 -1
- package/dist/{index-xtkw9866.js → index-2c5w2d1d.js} +1 -1
- package/dist/{index-g1q7fwn9.js → index-2nwvn7m2.js} +1 -1
- package/dist/{index-4s2w4g37.js → index-3tnwtz38.js} +80 -2
- package/dist/{index-5e0zsbf7.js → index-4j8efqr3.js} +1 -1
- package/dist/{index-p1m9djt6.js → index-5v5vg85s.js} +1 -1
- package/dist/{index-x90w78yz.js → index-673drwkn.js} +23 -8
- package/dist/{index-7xp05h20.js → index-6wp4dn9d.js} +6 -6
- package/dist/{index-0hdm5sx6.js → index-8x22nprv.js} +6 -2
- package/dist/{index-j13gzgdv.js → index-bz3gn6cs.js} +8 -4
- package/dist/{index-d96c1n1q.js → index-c5gp2gh6.js} +20 -19
- package/dist/{index-wbnpa8z6.js → index-d54npte7.js} +4 -4
- package/dist/{index-kmbpej2y.js → index-emgrmavr.js} +102 -61
- package/dist/{index-bbzvrq66.js → index-g3e57qj6.js} +455 -202
- package/dist/index-gf92hc87.js +100 -0
- package/dist/{index-3djgv3ch.js → index-gzny6zsw.js} +25 -10
- package/dist/{index-3b31z0pc.js → index-hj1zq7mh.js} +12 -6
- package/dist/{index-8xr2eq99.js → index-jfecdk1e.js} +3 -3
- package/dist/{index-dvd1qdwa.js → index-ke02kxsr.js} +3 -3
- package/dist/{index-83n766x4.js → index-m18xm96h.js} +15 -9
- package/dist/{index-qnzhmk2s.js → index-n7f89hjw.js} +90 -47
- package/dist/{index-3agqmmrg.js → index-pn5b11ce.js} +7 -9
- package/dist/{index-3gwp8ez6.js → index-pwskmywy.js} +12 -17
- package/dist/{index-9wh98cpa.js → index-rxnyygke.js} +130 -90
- package/dist/{index-0djnptn8.js → index-rzeezh79.js} +10 -3
- package/dist/{index-nbv44x0x.js → index-s2e3h616.js} +137 -36
- package/dist/{index-5zwac8ft.js → index-t7wa7k12.js} +2 -2
- package/dist/{index-xypxnzhp.js → index-v1mxss62.js} +2 -2
- package/dist/index-vgzhw2zk.js +304 -0
- package/dist/{index-jrka9029.js → index-vmbxj75t.js} +2 -2
- package/dist/{index-j516jaaz.js → index-waa6t4zx.js} +49 -2
- package/dist/{index-fcw255hd.js → index-xv9jb84s.js} +2 -2
- package/dist/{index-dwa6pskj.js → index-y065r8g5.js} +82 -43
- package/dist/internal/bounded-file-confirm.d.ts +32 -0
- package/dist/internal/bounded-file-confirm.d.ts.map +1 -0
- package/dist/internal/bounded-file-read.d.ts +10 -7
- package/dist/internal/bounded-file-read.d.ts.map +1 -1
- package/dist/internal/file-observation.d.ts +5 -1
- package/dist/internal/file-observation.d.ts.map +1 -1
- package/dist/internal/process-instance.d.ts +8 -0
- package/dist/internal/process-instance.d.ts.map +1 -1
- package/dist/internal/unix-socket.d.ts +3 -1
- package/dist/internal/unix-socket.d.ts.map +1 -1
- package/dist/server/unix-client.d.ts +7 -0
- package/dist/server/unix-client.d.ts.map +1 -1
- package/dist/service-host/systemd-inspect.d.ts +3 -1
- package/dist/service-host/systemd-inspect.d.ts.map +1 -1
- package/dist/service-host/systemd-render-shared.d.ts +64 -0
- package/dist/service-host/systemd-render-shared.d.ts.map +1 -0
- package/dist/service-host/systemd-render.d.ts +31 -26
- package/dist/service-host/systemd-render.d.ts.map +1 -1
- package/dist/service-host/systemd-timer-render.d.ts +31 -0
- package/dist/service-host/systemd-timer-render.d.ts.map +1 -0
- package/dist/service-host/systemd-timer-rollback.d.ts +26 -0
- package/dist/service-host/systemd-timer-rollback.d.ts.map +1 -0
- package/dist/service-host/systemd-timer.d.ts +82 -0
- package/dist/service-host/systemd-timer.d.ts.map +1 -0
- package/dist/service-host/systemd-unit-ops.d.ts +26 -0
- package/dist/service-host/systemd-unit-ops.d.ts.map +1 -0
- package/dist/service-host/systemd.d.ts +1 -1
- package/dist/service-host/systemd.d.ts.map +1 -1
- package/dist/tools/access.d.ts +30 -1
- package/dist/tools/access.d.ts.map +1 -1
- package/dist/tools/agent.d.ts +2 -2
- package/dist/tools/agent.d.ts.map +1 -1
- package/dist/tools/cli/args-scan.d.ts +5 -0
- package/dist/tools/cli/args-scan.d.ts.map +1 -1
- package/dist/tools/cli/args.d.ts +11 -5
- package/dist/tools/cli/args.d.ts.map +1 -1
- package/dist/tools/cli/invoke.d.ts +2 -1
- package/dist/tools/cli/invoke.d.ts.map +1 -1
- package/dist/tools/cli/notices.d.ts.map +1 -1
- package/dist/tools/cli/run-managed.d.ts.map +1 -1
- package/dist/tools/cli/session.d.ts.map +1 -1
- package/dist/tools/execute.d.ts.map +1 -1
- package/dist/tools/invoker.d.ts +2 -1
- package/dist/tools/invoker.d.ts.map +1 -1
- package/dist/tools/list-names.d.ts +2 -3
- package/dist/tools/list-names.d.ts.map +1 -1
- package/dist/tools/manifest.d.ts +2 -3
- package/dist/tools/manifest.d.ts.map +1 -1
- package/dist/tools/mcp/mount.d.ts +5 -5
- package/dist/tools/mcp/mount.d.ts.map +1 -1
- package/dist/tools/mcp/register.d.ts +2 -1
- package/dist/tools/mcp/register.d.ts.map +1 -1
- package/dist/tools/mcp/runtime-tools.d.ts.map +1 -1
- package/llms/agent-executor-acp.txt +10 -6
- package/llms/agent-executor-claude-sdk.txt +1 -1
- package/llms/agent-executor-claude.txt +1 -1
- package/llms/agent-executor-codex.txt +1 -1
- package/llms/agent-runtime.4.txt +21 -9
- package/llms/cli.3.txt +4 -4
- package/llms/cli.txt +1 -0
- package/llms/declaration.txt +2 -2
- package/llms/files.txt +1 -1
- package/llms/node.txt +2 -2
- package/llms/server.5.txt +2 -2
- package/llms/service-host.txt +5 -5
- package/llms/stitchkit.txt +81 -77
- package/llms/tools.3.txt +3 -2
- package/llms/upgrading-0.128.0.txt +147 -0
- package/llms/upgrading.txt +1 -0
- package/llms-full.txt +272 -113
- package/llms.txt +14 -13
- package/package.json +1 -1
- package/dist/index-ajmtxsky.js +0 -193
- package/dist/index-ax3wns1a.js +0 -93
package/dist/tools/access.d.ts
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mandatory access policy for every mounted tool surface.
|
|
3
|
+
*
|
|
4
|
+
* Every tool mount declares its `access`: `{ gate }` carries the mandatory
|
|
5
|
+
* `beforeHandle` that HTTP enforces, `{ open }` a closed reason why no gate runs
|
|
6
|
+
* here, or `{ inspect: true }` for read-only surface inspection where mounting
|
|
7
|
+
* succeeds while every execution fails closed with `FORBIDDEN`. An optional policy
|
|
8
|
+
* is one a mount can forget, and a forgotten gate is an unauthenticated tool.
|
|
9
|
+
*/
|
|
10
|
+
import { AppError } from '../contract/errors.js';
|
|
1
11
|
import type { ToolLifecycle } from './execute-hooks.js';
|
|
2
12
|
/** Closed vocabulary explaining why a mounted tool surface has no `beforeHandle` gate. */
|
|
3
13
|
export declare const TOOL_OPEN_REASONS: readonly ['public', 'local-operator', 'remote'];
|
|
@@ -10,17 +20,36 @@ export interface ToolGate extends ToolLifecycle {
|
|
|
10
20
|
}
|
|
11
21
|
/**
|
|
12
22
|
* Required access declaration for mounting contract or runtime tools.
|
|
13
|
-
* Pass `{ gate }` with `beforeHandle`,
|
|
23
|
+
* Pass `{ gate }` with `beforeHandle`, explicitly mark the surface `{ open }`,
|
|
24
|
+
* or pass `{ inspect: true }` for read-only surface inspection where execution
|
|
25
|
+
* always fails closed with `FORBIDDEN`.
|
|
14
26
|
*/
|
|
15
27
|
export type ToolAccess = {
|
|
16
28
|
readonly gate: ToolGate;
|
|
17
29
|
readonly open?: never;
|
|
30
|
+
readonly inspect?: never;
|
|
18
31
|
readonly afterHandle?: never;
|
|
19
32
|
} | {
|
|
20
33
|
readonly open: ToolOpenReason;
|
|
21
34
|
readonly afterHandle?: ToolLifecycle['afterHandle'];
|
|
22
35
|
readonly gate?: never;
|
|
36
|
+
readonly inspect?: never;
|
|
37
|
+
} | {
|
|
38
|
+
/**
|
|
39
|
+
* Read-only surface inspection mode (catalog snapshots, schema checks,
|
|
40
|
+
* `--help` / `--schema`). Mounting succeeds, while any execution attempt
|
|
41
|
+
* fails closed with `FORBIDDEN` before extension resolution, hooks,
|
|
42
|
+
* durability, multi-round resolvers, or argument parsing.
|
|
43
|
+
*/
|
|
44
|
+
readonly inspect: true;
|
|
45
|
+
readonly gate?: never;
|
|
46
|
+
readonly open?: never;
|
|
47
|
+
readonly afterHandle?: never;
|
|
23
48
|
};
|
|
49
|
+
/** Whether `lifecycle` was created from `access: { inspect: true }`. */
|
|
50
|
+
export declare function isInspectOnlyLifecycle(lifecycle: ToolLifecycle | undefined): boolean;
|
|
51
|
+
/** Return the `FORBIDDEN` `AppError` when `lifecycle` is inspect-only; otherwise `undefined`. */
|
|
52
|
+
export declare function inspectOnlyError(lifecycle: ToolLifecycle | undefined): AppError | undefined;
|
|
24
53
|
/**
|
|
25
54
|
* Validate `config.access` at mount time — before the first call — and return
|
|
26
55
|
* the normalized `ToolLifecycle` for the shared tool runner.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"access.d.ts","sourceRoot":"","sources":["../../src/tools/access.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"access.d.ts","sourceRoot":"","sources":["../../src/tools/access.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,0FAA0F;AAC1F,eAAO,MAAM,iBAAiB,YAAI,QAAQ,EAAE,gBAAgB,EAAE,QAAQ,CAAU,CAAC;AAEjF,iFAAiF;AACjF,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhE,0EAA0E;AAC1E,MAAM,WAAW,QAAS,SAAQ,aAAa;IAC7C,oDAAoD;IACpD,YAAY,EAAE,WAAW,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC,CAAC;CAC1D;AAED;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAClB;IACE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC;IACtB,QAAQ,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC;IACzB,QAAQ,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC;CAC9B,GACD;IACE,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAC9B,QAAQ,CAAC,WAAW,CAAC,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC;IACpD,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC;IACtB,QAAQ,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC;CAC1B,GACD;IACE;;;;;OAKG;IACH,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC;IACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC;IACtB,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC;IACtB,QAAQ,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC;CAC9B,CAAC;AAoBN,wEAAwE;AACxE,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,aAAa,GAAG,SAAS,GAAG,OAAO,CAEpF;AAED,iGAAiG;AACjG,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,aAAa,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAI3F;AAkBD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,aAAa,CAmFnF;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAC1C,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,OAAO,GACd,aAAa,CAYf"}
|
package/dist/tools/agent.d.ts
CHANGED
|
@@ -15,8 +15,8 @@ export interface AgentMountConfig {
|
|
|
15
15
|
hooks?: ToolCallHooks;
|
|
16
16
|
/**
|
|
17
17
|
* Required access policy for every mounted tool call — pass `{ gate }` with
|
|
18
|
-
* `beforeHandle` (for example from `createAuthHook`)
|
|
19
|
-
*
|
|
18
|
+
* `beforeHandle` (for example from `createAuthHook`), `{ open: 'public' | 'local-operator' | 'remote' }`,
|
|
19
|
+
* or `{ inspect: true }` for read-only surface inspection that refuses every execution.
|
|
20
20
|
*/
|
|
21
21
|
access: ToolAccess;
|
|
22
22
|
extend?: ToolExtend;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/tools/agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAwB,OAAO,EAAE,MAAM,IAAI,CAAC;AAGxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,
|
|
1
|
+
{"version":3,"file":"agent.d.ts","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CAAC;IAC7B;;;;;;;;;OASG;IACH,UAAU,CAAC,EAAE,qBAAqB,CAAC;CACpC;AAED,wBAAgB,UAAU,CACxB,QAAQ,EAAE,UAAU,GAAG,UAAU,EAAE,EACnC,MAAM,EAAE,gBAAgB,GACvB,OAAO,CAoIT"}
|
|
@@ -28,6 +28,11 @@ export interface CliInvocationScan<TGlobals extends z.ZodObject = z.ZodObject> {
|
|
|
28
28
|
helpFilter?: string;
|
|
29
29
|
/** True when `--version` or `version` was requested before any command. */
|
|
30
30
|
version: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Argument refusal when the invocation cannot be scanned cleanly (returned as a field
|
|
33
|
+
* rather than thrown; `command` is omitted and `commandTokens` is `[]` when set).
|
|
34
|
+
*/
|
|
35
|
+
error?: CliArgumentError;
|
|
31
36
|
}
|
|
32
37
|
/** What the projections pass to the shared scan beyond the public options. */
|
|
33
38
|
interface InternalCliScanOptions<TGlobals extends z.ZodObject> extends CliInvocationScanOptions<TGlobals> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"args-scan.d.ts","sourceRoot":"","sources":["../../../src/tools/cli/args-scan.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,EAEL,KAAK,mBAAmB,EAmBzB,MAAM,iBAAiB,CAAC;AAOzB,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,YAAY,EAAE,mBAAmB,EAAE,CAAC;AAEpC,qDAAqD;AACrD,MAAM,WAAW,wBAAwB,CAAC,QAAQ,SAAS,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,SAAS;IAClF,iEAAiE;IACjE,UAAU,CAAC,EAAE,QAAQ,CAAC;IACtB,yFAAyF;IACzF,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,gEAAgE;AAChE,MAAM,WAAW,iBAAiB,CAAC,QAAQ,SAAS,CAAC,C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zG,mBAAmB,CAAC,EAAE,gBAAgB,CAAC;IACvC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,OAAO,CAAC;CAC3B;AAsCD,oGAAoG;AACpG,wBAAgB,WAAW,CAAC,QAAQ,SAAS,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,SAAS,EACpE,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,OAAO,GAAE,sBAAsB,CAAC,QAAQ,CAAM,GAC7C,eAAe,CAAC,QAAQ,CAAC,CA2L3B;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAErE;AAED,iFAAiF;AACjF,wBAAgB,iBAAiB,CAAC,QAAQ,SAAS,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,SAAS,EAC1E,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,OAAO,CAAC,EAAE,wBAAwB,CAAC,QAAQ,CAAC,GAC3C,iBAAiB,CAAC,QAAQ,CAAC,CA+C7B"}
|
package/dist/tools/cli/args.d.ts
CHANGED
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
import type { z } from 'zod';
|
|
21
21
|
import { type CliFrameworkOptions } from './args-scan.js';
|
|
22
22
|
import { type CliResultView } from './args-view.js';
|
|
23
|
+
import { CliArgumentError } from './argument-error.js';
|
|
23
24
|
/** CLI-behaviour flags, parsed out of argv before the tool arguments. */
|
|
24
25
|
export interface CliRunOptions {
|
|
25
26
|
/** `--json` — emit compact success/error JSON records for scripts. */
|
|
@@ -71,9 +72,8 @@ export declare function parseCliArgs(argv: string[], schema: z.ZodType | undefin
|
|
|
71
72
|
export interface CliGlobalOptionsParse {
|
|
72
73
|
/**
|
|
73
74
|
* argv with the application-global tokens removed, ready for routing; a `--` before the
|
|
74
|
-
* command stays, so the router refuses the line as `createCli` does.
|
|
75
|
-
* `
|
|
76
|
-
* or `false`: the remaining tokens would read as `--flag false`, which the line did not say.
|
|
75
|
+
* command stays, so the router refuses the line as `createCli` does. Empty (`[]`) when
|
|
76
|
+
* `error` is set.
|
|
77
77
|
*/
|
|
78
78
|
argv: string[];
|
|
79
79
|
/** The validated values, as the application's own schema types them. */
|
|
@@ -83,14 +83,20 @@ export interface CliGlobalOptionsParse {
|
|
|
83
83
|
* a value-shaped token; omitted when empty. Hand it to `routeCliArgv` with `argv`.
|
|
84
84
|
*/
|
|
85
85
|
separatedBefore?: ReadonlySet<number>;
|
|
86
|
+
/**
|
|
87
|
+
* Refusal when an application global option is malformed or when lifting a global broke
|
|
88
|
+
* the boundary between a bare framework boolean and `true`/`false`. Returned as a field
|
|
89
|
+
* instead of thrown so callers can inspect globals and hand refusal rendering to `createCli`.
|
|
90
|
+
*/
|
|
91
|
+
error?: CliArgumentError;
|
|
86
92
|
}
|
|
87
93
|
/**
|
|
88
94
|
* Lift the APPLICATION's global options out of argv, wherever they stand.
|
|
89
95
|
*
|
|
90
96
|
* Thin projection over the single-pass invocation scanner (`scanCliInvocation`),
|
|
91
97
|
* preserving the `argv`/`globals` shape for consumers that lift globals before
|
|
92
|
-
* routing.
|
|
93
|
-
*
|
|
98
|
+
* routing. Reports parse refusals in `error` (never via a throwing getter), and
|
|
99
|
+
* suppresses errors when help, `--version`, or `--schema` answers the line first.
|
|
94
100
|
*/
|
|
95
101
|
export declare function extractCliGlobalOptions(argv: readonly string[], schema: z.ZodObject | undefined): CliGlobalOptionsParse;
|
|
96
102
|
//# sourceMappingURL=args.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../../../src/tools/cli/args.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAU7B,OAAO,EAA0B,KAAK,mBAAmB,EAAe,MAAM,aAAa,CAAC;AAE5F,OAAO,EAAE,KAAK,aAAa,EAAkB,MAAM,aAAa,CAAC;
|
|
1
|
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MAAM,EAAE,CAAC;IAChC,OAAO,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,eAAe,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAClC,GACL,aAAa,CAYf;AA8BD,iFAAiF;AACjF,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,wEAAwE;IACxE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC;;;OAGG;IACH,eAAe,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACtC;;;;OAIG;IACH,KAAK,CAAC,EAAE,gBAAgB,CAAC;CAC1B;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,MAAM,EAAE,CAAC,CAAC,SAAS,GAAG,SAAS,GAC9B,qBAAqB,CA2BvB"}
|
|
@@ -103,7 +103,8 @@ type CliSurfaceAccessConfig<TAuth, TGlobals extends ZodObject, TServices extends
|
|
|
103
103
|
runtimeTools?: TRuntime | CliRuntimeToolsFactory<TAuth, TGlobals>;
|
|
104
104
|
/**
|
|
105
105
|
* Required access policy for every managed CLI command — pass `{ gate }` with
|
|
106
|
-
* `beforeHandle`
|
|
106
|
+
* `beforeHandle` (for example from `createAuthHook`), `{ open: 'public' | 'local-operator' | 'remote' }`,
|
|
107
|
+
* or `{ inspect: true }` for read-only surface inspection that refuses every execution.
|
|
107
108
|
*/
|
|
108
109
|
access: ToolAccess;
|
|
109
110
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoke.d.ts","sourceRoot":"","sources":["../../../src/tools/cli/invoke.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,KAAK,EAAE,SAAS,E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,WAAW,CAAC,MAAM,CAAC,EAC3C,UAAU,CAAC,EAAE,CACX,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,sBAAsB,EAClC,MAAM,EAAE,OAAO,EACf,gBAAgB,EAAE,MAAM,GAAG,SAAS,EACpC,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,KAC7B,MAAM,GAAG,SAAS,GACtB;IACD,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IAClC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;IACzC,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC;CAC3C,CA+EA;AAED,mFAAmF;AACnF,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,aAAa,GAClB,IAAI,CAAC,sBAAsB,EAAE,SAAS,GAAG,aAAa,CAAC,CAOzD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notices.d.ts","sourceRoot":"","sources":["../../../src/tools/cli/notices.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"notices.d.ts","sourceRoot":"","sources":["../../../src/tools/cli/notices.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAOlC,wBAAgB,cAAc,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,CAAC,CAE1F;AAED,uFAAuF;AACvF,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAWjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-managed.d.ts","sourceRoot":"","sources":["../../../src/tools/cli/run-managed.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"run-managed.d.ts","sourceRoot":"","sources":["../../../src/tools/cli/run-managed.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AAgBrC,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,UAAU,EAGhB,MAAM,WAAW,CAAC;AAQnB,wFAAwF;AACxF,wBAAsB,oBAAoB,CACxC,KAAK,EACL,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACxC,QAAQ,SAAS,SAAS,EAC1B,OAAO,EAAE,UAAU,CAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CA2B1F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/tools/cli/session.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExC,OAAO,EACL,KAAK,eAAe,EAGrB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGtD,OAAO,EAAE,KAAK,mBAAmB,EAAqB,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/tools/cli/session.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExC,OAAO,EACL,KAAK,eAAe,EAGrB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGtD,OAAO,EAAE,KAAK,mBAAmB,EAAqB,MAAM,aAAa,CAAC;AAC1E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAMtD,OAA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AI,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GACrB,OAAO,CAAC,CAAC,CAAC,CAuBZ"}
|
package/dist/tools/invoker.d.ts
CHANGED
|
@@ -10,7 +10,8 @@ export interface ToolInvokerConfig {
|
|
|
10
10
|
transport: ToolTransport;
|
|
11
11
|
/**
|
|
12
12
|
* Required access policy applied to every call through this invoker: pass
|
|
13
|
-
* `{ gate }` with `beforeHandle`
|
|
13
|
+
* `{ gate }` with `beforeHandle`, `{ open }`, or `{ inspect: true }` for
|
|
14
|
+
* read-only surface inspection that refuses every execution.
|
|
14
15
|
*/
|
|
15
16
|
access: ToolAccess;
|
|
16
17
|
extend?: ToolExtend;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoker.d.ts","sourceRoot":"","sources":["../../src/tools/invoker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAGzE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAqB,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACtE,OAAO,EAAE,KAAK,UAAU,EAAuB,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAsD,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAG9F,wEAAwE;AACxE,MAAM,WAAW,iBAAiB;IAChC,iFAAiF;IACjF,SAAS,EAAE,aAAa,CAAC;IACzB
|
|
1
|
+
{"version":3,"file":"invoker.d.ts","sourceRoot":"","sources":["../../src/tools/invoker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAGzE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAqB,KAAK,UAAU,EAAE,MAAM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AAO,CAAC,EAC7B,OAAO,CAAC,EAAE,qBAAqB,GAC9B,OAAO,CAAC,OAAO,CAAC,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,UAAU,GAAG,SAAS,UAAU,EAAE,EAC5C,MAAM,EAAE,iBAAiB,GACxB,WAAW,CAwEb"}
|
|
@@ -11,8 +11,7 @@
|
|
|
11
11
|
* drift when pathless runtime tools sit beside contract operations.
|
|
12
12
|
*/
|
|
13
13
|
import type { ContractDef, Transport } from '../contract/define.js';
|
|
14
|
-
import type
|
|
15
|
-
import type { RuntimeToolDefinition } from './runtime-tool-declaration.js';
|
|
14
|
+
import { type SurfaceRuntimeToolDefinition, type ToolSurfaceProjection } from './internal/surface-projector.js';
|
|
16
15
|
/** One mounted tool name and where it comes from. */
|
|
17
16
|
export interface ToolNameEntry {
|
|
18
17
|
/** Whether the operation comes from a contract or a pathless runtime definition. */
|
|
@@ -33,7 +32,7 @@ export interface ToolNameEntry {
|
|
|
33
32
|
* (never mounted as tools) and CLI appears only where `expose` opts in,
|
|
34
33
|
* mirroring the real mounts.
|
|
35
34
|
*/
|
|
36
|
-
export declare function listToolNames(surface: ToolSurfaceProjection<
|
|
35
|
+
export declare function listToolNames(surface: ToolSurfaceProjection<SurfaceRuntimeToolDefinition>): ToolNameEntry[];
|
|
37
36
|
/**
|
|
38
37
|
* The same listing straight from contracts — no handlers required. Names, kinds
|
|
39
38
|
* and exposure are deterministic contract facts, so a surface snapshot should
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-names.d.ts","sourceRoot":"","sources":["../../src/tools/list-names.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAGjE,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"list-names.d.ts","sourceRoot":"","sources":["../../src/tools/list-names.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAGjE,OAAO,EAEL,KAAK,4BAA4B,EACjC,KAAK,qBAAqB,EAC3B,MAAM,8BAA8B,CAAC;AAEtC,qDAAqD;AACrD,MAAM,WAAW,aAAa;IAC5B,oFAAoF;IACpF,IAAI,EAAE,UAAU,GAAG,SAAS,CAAC;IAC7B,6EAA6E;IAC7E,IAAI,EAAE,MAAM,CAAC;IACb,kEAAkE;IAClE,OAAO,EAAE,MAAM,CAAC;IAChB,2DAA2D;IAC3D,MAAM,EAAE,MAAM,CAAC;IACf,6EAA6E;IAC7E,MAAM,EAAE,SAAS,EAAE,CAAC;CACrB;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,qBAAqB,CAAC,4BAA4B,CAAC,GAC3D,aAAa,EAAE,CA2BjB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,SAAS,WAAW,EAAE,GAAG,aAAa,EAAE,CAExF"}
|
package/dist/tools/manifest.d.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import type { ToolTransport } from '../contract/define.js';
|
|
2
|
-
import type
|
|
2
|
+
import { type SurfaceRuntimeToolDefinition, type ToolSurfaceProjection } from './internal/surface-projector.js';
|
|
3
3
|
import type { CollectToolsConfig } from './mount.js';
|
|
4
|
-
import type { RuntimeToolDefinition } from './runtime-tool-declaration.js';
|
|
5
4
|
export interface ToolManifestEntry {
|
|
6
5
|
name: string;
|
|
7
6
|
description: string;
|
|
8
7
|
inputSchema: Record<string, unknown>;
|
|
9
8
|
}
|
|
10
|
-
export interface ToolManifestConfig extends ToolSurfaceProjection<
|
|
9
|
+
export interface ToolManifestConfig extends ToolSurfaceProjection<SurfaceRuntimeToolDefinition> {
|
|
11
10
|
/** Model-facing surface whose exposure rules the manifest must mirror. */
|
|
12
11
|
transport: ToolTransport;
|
|
13
12
|
extend?: CollectToolsConfig['extend'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/tools/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/tools/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAEL,KAAK,4BAA4B,EACjC,KAAK,qBAAqB,EAC3B,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AAED,MAAM,WAAW,kBACf,SAAQ,qBAAqB,CAAC,4BAA4B,CAAC;IAC3D,0EAA0E;IAC1E,SAAS,EAAE,aAAa,CAAC;IACzB,MAAM,CAAC,EAAE,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IACtC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,gGAAgG;IAChG,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,gBAAiB,SAAQ,iBAAiB;IACzD,MAAM,EAAE;QAAE,IAAI,EAAE,UAAU,GAAG,SAAS,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1E,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,iBAAkB,SAAQ,kBAAkB;IAC3D,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,+CAA+C;IAC/C,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAMD,0FAA0F;AAC1F,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,iBAAiB,GAAG,gBAAgB,EAAE,CAgCjF;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,kBAAkB,GAAG,iBAAiB,EAAE,CAWjF"}
|
|
@@ -10,7 +10,7 @@ import { type McpSchemaValidationConfig, type McpSurfaceRegistry, type PreparedM
|
|
|
10
10
|
import type { McpRoundRuntime } from './round.js';
|
|
11
11
|
/**
|
|
12
12
|
* Options for `mountMcp`; `access` is required — pass `{ gate }` with your auth
|
|
13
|
-
* `beforeHandle` hook
|
|
13
|
+
* `beforeHandle` hook, `{ open }`, or `{ inspect: true }` for read-only surface inspection.
|
|
14
14
|
*/
|
|
15
15
|
export interface McpMountConfig {
|
|
16
16
|
context?: Record<string, unknown>;
|
|
@@ -18,8 +18,8 @@ export interface McpMountConfig {
|
|
|
18
18
|
hooks?: ToolCallHooks;
|
|
19
19
|
/**
|
|
20
20
|
* Required access policy for every mounted tool call — pass `{ gate }` with
|
|
21
|
-
* `beforeHandle` (for example from `createAuthHook`)
|
|
22
|
-
*
|
|
21
|
+
* `beforeHandle` (for example from `createAuthHook`), `{ open: 'public' | 'local-operator' | 'remote' }`,
|
|
22
|
+
* or `{ inspect: true }` for read-only surface inspection that refuses every execution.
|
|
23
23
|
*/
|
|
24
24
|
access: ToolAccess;
|
|
25
25
|
extend?: ToolExtend;
|
|
@@ -81,8 +81,8 @@ export interface McpServerSharedConfig<TAuth> {
|
|
|
81
81
|
* `onToolError` adds the raw thrown value behind a failed one. */
|
|
82
82
|
hooks?: ToolCallHooks;
|
|
83
83
|
/** Required access policy for every tool call — pass `{ gate }` with
|
|
84
|
-
* `beforeHandle` (for example from `createAuthHook`)
|
|
85
|
-
*
|
|
84
|
+
* `beforeHandle` (for example from `createAuthHook`), `{ open: 'public' | 'local-operator' | 'remote' }`,
|
|
85
|
+
* or `{ inspect: true }` for read-only surface inspection that refuses every execution. */
|
|
86
86
|
access: ToolAccess;
|
|
87
87
|
/** Add extra tool arguments resolved into handler context (e.g. a `tenantId`
|
|
88
88
|
* for one API key serving many tenants). Same `ToolExtend` accepted by
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mount.d.ts","sourceRoot":"","sources":["../../../src/tools/mcp/mount.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,SAAS,EAET,KAAK,aAAa,EACnB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAqB,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AAC/D,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAoB,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,KAAK,cAAc,EAAsB,MAAM,OAAO,CAAC;AAEhE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAEL,KAAK,yBAAyB,EAE9B,KAAK,kBAAkB,EACvB,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,EAGvB,KAAK,wBAAwB,EAC9B,MAAM,WAAW,CAAC;AAEnB,OAAO,KAAK,EAAE,eAAe,EAAiB,MAAM,SAAS,CAAC;AAG9D;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,qCAAqC;IACrC,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB;;;;OAIG;IACH,MAAM,EAAE,UAAU,CAAC;IACnB,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,qEAAqE;IAC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AAa,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK,OAAO,CAAC,MAAM,SAAS,EAAE,MAAM,CAAC,CAAC;IACjE,QAAQ,CAAC,EAAE,KAAK,CAAC;IACjB,YAAY,CAAC,EAAE,KAAK,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,MAAM,oBAAoB,CAC9B,KAAK,EACL,SAAS,SAAS,kBAAkB,GAAG,kBAAkB,IACvD,qBAAqB,CAAC,KAAK,CAAC,GAC9B,CAAC,sBAAsB,CAAC,KAAK,CAAC,GAAG,sBAAsB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC;AAE7E;;;GAGG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,oBAAoB,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;AACnF,wBAAgB,cAAc,CAAC,KAAK,EAClC,MAAM,EAAE,oBAAoB,CAAC,KAAK,CAAC,EACnC,IAAI,EAAE,KAAK,GACV,SAAS,CAAC;AA4Cb;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,GAAG,eAAe,GAAG,SAAS,CAE/E;AAED,iFAAiF;AACjF,wBAAgB,0BAA0B,CAAC,KAAK,EAC9C,MAAM,EAAE,oBAAoB,CAAC,KAAK,CAAC,EACnC,IAAI,EAAE,KAAK,EACX,QAAQ,EAAE,wBAAwB,GACjC,SAAS,CA0EX;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,cAAc,GAAG,IAAI,CAmBlF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type CallToolResult, type McpServer } from '@modelcontextprotocol/server';
|
|
2
2
|
import type { EndpointUiMeta } from '../../contract/tool-options.js';
|
|
3
3
|
import type { ToolExecutionOptions } from '../execute.js';
|
|
4
|
-
import type { ToolCallHooks } from '../execute-hooks.js';
|
|
4
|
+
import type { ToolCallHooks, ToolLifecycle } from '../execute-hooks.js';
|
|
5
5
|
import { type ToolResult } from '../execute-result.js';
|
|
6
6
|
import type { MountableTool } from '../mount.js';
|
|
7
7
|
import type { McpCatalogStamp } from './catalog-stamp.js';
|
|
@@ -23,6 +23,7 @@ export interface McpToolRegistrationConfig {
|
|
|
23
23
|
catalog?: McpCatalogStamp;
|
|
24
24
|
multiRoundRuntime?: McpRoundRuntime;
|
|
25
25
|
hooks?: ToolCallHooks;
|
|
26
|
+
lifecycle?: ToolLifecycle;
|
|
26
27
|
context?: Record<string, unknown>;
|
|
27
28
|
}
|
|
28
29
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../src/tools/mcp/register.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EAEnB,KAAK,SAAS,EACf,MAAM,8BAA8B,CAAC;AAGtC,OAAO,KAAK,EAA2B,cAAc,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../src/tools/mcp/register.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EAEnB,KAAK,SAAS,EACf,MAAM,8BAA8B,CAAC;AAGtC,OAAO,KAAK,EAA2B,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAI3F,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,KAAK,EAAmB,aAAa,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtF,OAAO,EAAE,KAAK,UAAU,EAAuB,MAAM,mBAAmB,CAAC;AAEzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAK9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,KAAK,eAAe,EAAmB,MAAM,SAAS,CAAC;AAIhE,uFAAuF;AACvF,MA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AAC;AACrE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AAExD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,UAAU,sBAAsB;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,SAAS,EAAE,aAAa,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC5D,iBAAiB,CAAC,EAAE,eAAe,CAAC;IACpC,8EAA8E;IAC9E,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,YAAY,EAAE,CACZ,MAAM,EAAE,UAAU,EAClB,IAAI,EAAE,sBAAsB,CAAC,YAAY,CAAC,CAAC,YAAY,CAAC,EACxD,QAAQ,EAAE,MAAM,KACb,cAAc,CAAC;CACrB;AAaD;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,SAAS,EACjB,KAAK,EAAE,SAAS,sBAAsB,EAAE,EACxC,MAAM,EAAE,sBAAsB,GAC7B,IAAI,CAkCN"}
|
|
@@ -24,15 +24,19 @@ ACP keeps no client id, so reconcile is `none`: a send whose outcome is
|
|
|
24
24
|
unknown stays unknown. Unknown keys an agent adds — `_meta`, a vendor's own
|
|
25
25
|
fields — are let through; the keys the driver reads are typed. Evolving.
|
|
26
26
|
|
|
27
|
-
Whether an agent
|
|
28
|
-
|
|
29
|
-
`session/request_permission
|
|
30
|
-
|
|
27
|
+
Whether an agent pauses for host approval before running a tool is controlled by the agent
|
|
28
|
+
itself, not by ACP: the driver's `approvalEnforcement` is `'agent-initiated'`, meaning it
|
|
29
|
+
answers `session/request_permission` requests when the agent sends them and never synthesizes
|
|
30
|
+
approvals for unprompted tool calls. Some ACP agents execute tools without sending
|
|
31
|
+
`session/request_permission` in their default configuration; a host that requires interactive
|
|
32
|
+
tool approval must configure the agent's own approval policy (for example `toolPermission: "strict"`
|
|
33
|
+
in the agent's settings under `profile.home`, bearing in mind whether the agent's OAuth session
|
|
34
|
+
is bound to that profile directory).
|
|
31
35
|
|
|
32
36
|
| Export | Kind | Purpose |
|
|
33
37
|
|--------|------|---------|
|
|
34
|
-
| `createAcpDriver` / `AcpDriver` / `AcpDriverConfig` | function / _types_ | the driver: `executable` and `args`; `model`, `thoughtLevel` and `mode` set at open through the option of that category, in that order, a value the agent does not offer refused; `mcpServers` on every new, loaded or resumed session; `resolveFile` and `maxImageBytes` (5 MiB, eagerly validated as a positive safe integer) for images; `maxFrameBytes` (8 MiB) for one line from the agent; `requestTimeoutMs` (60 s) for each request, also capping `session/close` to at most `min(requestTimeoutMs, 5 s)`; each numeric option is refused when the driver is created, before any agent is spawned. The agent runs with `HOME` set to the profile's `home`. `info` answers the model option's values as `models: { answer: 'listed', ids }` (empty when the agent offers none) or `{ answer: 'failed', error }`, `status` opens and closes a session without a prompt — a session refused for auth is `signed-out`; `sessions` asks `session/list` |
|
|
35
|
-
| `AcpSession` / `AcpConfigOption` | _types_ | a session's settings, title and commands as the agent last reported them, and `setConfigOption(category or id, value)`, answered with every option, which may have narrowed |
|
|
38
|
+
| `createAcpDriver` / `AcpDriver` / `AcpDriverConfig` | function / _types_ | the driver (`approvalEnforcement: 'agent-initiated'`): `executable` and `args`; `model`, `thoughtLevel` and `mode` set at open through the option of that category, in that order, a value the agent does not offer refused; `mcpServers` on every new, loaded or resumed session; `resolveFile` and `maxImageBytes` (5 MiB, eagerly validated as a positive safe integer) for images; `maxFrameBytes` (8 MiB) for one line from the agent; `requestTimeoutMs` (60 s) for each request, also capping `session/close` to at most `min(requestTimeoutMs, 5 s)`; each numeric option is refused when the driver is created, before any agent is spawned. The agent runs with `HOME` set to the profile's `home`. `info` answers the model option's values as `models: { answer: 'listed', ids }` (empty when the agent offers none) or `{ answer: 'failed', error }`, `status` opens and closes a session without a prompt — a session refused for auth is `signed-out`; `sessions` asks `session/list` |
|
|
39
|
+
| `AcpSession` / `AcpConfigOption` / `AcpApprovalEnforcement` | _types_ | a session's settings, title and commands as the agent last reported them, its constant `approvalEnforcement` (`'agent-initiated'`: the host answers `session/request_permission` requests when the agent sends them and never synthesizes approvals for unprompted tool calls), and `setConfigOption(category or id, value)`, answered with every option, which may have narrowed |
|
|
36
40
|
| `AcpSessionSummary` | _type_ | a session the agent keeps: id, working directory, title, last update |
|
|
37
41
|
| `AcpMcpServerSchema` / `AcpMcpServer` | schema / _type_ | an MCP server as ACP v1 names it: a command with arguments and environment, or an `http`/`sse` URL with headers |
|
|
38
42
|
| `ACP_PROTOCOL_VERSION` | constant | `1`; an agent answering another version is refused at hello |
|
|
@@ -25,7 +25,7 @@ Evolving.
|
|
|
25
25
|
|
|
26
26
|
| Export | Kind | Purpose |
|
|
27
27
|
|--------|------|---------|
|
|
28
|
-
| `createClaudeSdkDriver` / `ClaudeSdkDriverConfig` | function / _type_ | the driver: `query` and `sdkVersion` required; `model`, `permissionMode` (default `default`) and the `ambient` environment the profile's allowlist reads. `status` reports the plan windows the session's `rate_limit_event` carried and the login as `unknown`: the SDK has no status call of its own |
|
|
28
|
+
| `createClaudeSdkDriver` / `ClaudeSdkDriverConfig` | function / _type_ | the driver: `query` and `sdkVersion` required; `model`, `permissionMode` (default `default`), optional `resolveFile` and `maxImageBytes` (default 5 MiB) for turn-input images, and the `ambient` environment the profile's allowlist reads. `status` reports the plan windows the session's `rate_limit_event` carried and the login as `unknown`: the SDK has no status call of its own |
|
|
29
29
|
| `ClaudeSdkQuery` / `ClaudeSdkRun` | _types_ | the `query` the leaf takes and the part of a running query it uses; the SDK's own `query` fits as it is |
|
|
30
30
|
|
|
31
31
|
---
|
|
@@ -21,7 +21,7 @@ Evolving.
|
|
|
21
21
|
|
|
22
22
|
| Export | Kind | Purpose |
|
|
23
23
|
|--------|------|---------|
|
|
24
|
-
| `createClaudeCliDriver` / `ClaudeCliDriverConfig` | function / _type_ | the driver; `permissionMode` defaults to `default`, so the server decides every tool the profile does not already allow |
|
|
24
|
+
| `createClaudeCliDriver` / `ClaudeCliDriverConfig` | function / _type_ | the driver; `permissionMode` defaults to `default`, so the server decides every tool the profile does not already allow; optional `resolveFile` and `maxImageBytes` (default 5 MiB) enable ordered turn-input image attachments |
|
|
25
25
|
| `claudeFakeScenarios` | constant | the conformance scenarios in this dialect, for a scripted engine |
|
|
26
26
|
| `claudeTranscriptPath` | function | where a profile keeps a session's transcript (`{ home, cwd, sessionId }`) |
|
|
27
27
|
| `claudePlanWindows` | function | Claude's `rate_limit_event` as plan windows (`five_hour`, `seven_day`) |
|
|
@@ -18,7 +18,7 @@ Codex through `codex app-server` over stdio. Evolving.
|
|
|
18
18
|
|
|
19
19
|
| Export | Kind | Purpose |
|
|
20
20
|
|--------|------|---------|
|
|
21
|
-
| `createCodexDriver` / `CodexDriverConfig` | function / _type_ | the driver: a thread per session, `turn/start` under the executor's client id, approvals and input asked of the host, limits from `account/rateLimits/read` |
|
|
21
|
+
| `createCodexDriver` / `CodexDriverConfig` | function / _type_ | the driver: a thread per session, `turn/start` under the executor's client id, optional `resolveFile` and `maxImageBytes` (default 5 MiB) for turn-input images, approvals and input asked of the host, limits from `account/rateLimits/read` |
|
|
22
22
|
| `codexFakeScenarios` | constant | the conformance scenarios in this dialect, for a scripted app-server |
|
|
23
23
|
| `codexPlanWindows` | function | Codex's `rateLimits` as plan windows (`primary`, `secondary`) |
|
|
24
24
|
|
package/llms/agent-runtime.4.txt
CHANGED
|
@@ -34,7 +34,7 @@ Server-only optional application runtime. See the
|
|
|
34
34
|
| `AgentMessageSchema` / `AgentRunSchema` / `AgentSnapshotSchema` | schema | versioned canonical engine records |
|
|
35
35
|
| `AgentRunQueuePrioritySchema` | schema | durable opt-in priority for queued `interrupt-next` runs |
|
|
36
36
|
| `AgentRuntimeStore` | _type_ | aggregate CAS transaction boundary for message, run and compaction mutations |
|
|
37
|
-
| `BranchAgentConversationInputSchema` / `BranchAgentConversationInput` | schema / _type_ | strict branch request: stable request key, empty destination, settled conversation boundary or archive bytes, fresh artifact authorization, and `applicationFiles` — `{ reference, destinationReference }` pairs for file parts the application stores; an undeclared non-spill file reference refuses the branch. `applicationKeys` declares, once each, runtime reference names such as `messageId` or `runId` that are the application's own data inside its JSON — `sourceIdentity: 'refuse'` (default) refuses a value naming the source, `'retain'` carries a value naming the source conversation, a run or a message byte for byte as a record of the past |
|
|
37
|
+
| `BranchAgentConversationInputSchema` / `BranchAgentConversationInput` | schema / _type_ | strict branch request: stable request key, empty destination, settled conversation boundary or archive bytes, fresh artifact authorization, and `applicationFiles` — `{ reference, destinationReference }` pairs for file parts the application stores; an undeclared non-spill file reference refuses the branch. Spills validly retired by `spill/deleted` cross as deterministic rekeyed history (emitting an inert `runtime/branch-observation` across `throughRunId` cutoffs) while missing or inconsistent spills refuse with `integrity`. `applicationKeys` declares, once each, runtime reference names such as `messageId` or `runId` that are the application's own data inside its JSON — `sourceIdentity: 'refuse'` (default) refuses a value naming the source, `'retain'` carries a value naming the source conversation, a run or a message byte for byte as a record of the past, and `'rekey-spill'` rekeys source spill references (live or legitimately expired) while still refusing foreign spills and all other source identities (→ ADR 0300, ADR 0328) |
|
|
38
38
|
| `AgentConversationBranchRefusedError` / `AgentBranchRefusalSchema` / `AgentBranchRefusal` / `AgentBranchRefusalCodeSchema` / `AgentBranchRefusalCode` | class / schemas / _types_ | a branch refusal: a `TypeError` whose `refusals` lists every refusal a declaration or authorization lifts (up to 100, `omittedRefusals` counts the rest), each with `code` and its address — event `seq`, `eventKind`, `messageId`, `toolName`, key `path`, attachment `reference` — never a value; `integrity` stops at once |
|
|
39
39
|
| `AgentConversationBranchPlanSchema` / `AgentConversationBranchPlan` / `AgentRuntimeStore.planConversationBranch` | schema / _type_ / method | what `branchConversation` would refuse for the same input, without writing: `ready`, `refusals`, `omittedRefusals`, `applicationFiles` (every non-spill attachment reference to grant and declare), `undeclaredKeys`, `fingerprint`, `sourceArchiveDigest` |
|
|
40
40
|
| `AgentConversationBranchReceiptSchema` / `AgentConversationBranchReceipt` | schema / _type_ | durable lineage: request fingerprint, source/destination identities, source sequence/version/digest and creation time |
|
|
@@ -119,18 +119,18 @@ Server-only optional application runtime. See the
|
|
|
119
119
|
| `agentSummaryProjection` / `agentUsageProjection` / `agentOutlineProjection` | constants | built-in list summary, provenance-carrying usage and request outline projections |
|
|
120
120
|
| `agentConversationCardProjection` / `agentStateSlotsProjection` / `agentScheduleSummaryProjection` | constants | focused card, durable-state and schedule lifecycle projections |
|
|
121
121
|
| `defineStateSlot` / `AgentStateSlotDefinition` / `AgentStateSlotStore` / `AgentStateSlotValue` / `AnyAgentStateSlot` / `createAgentStateSlotStore` / `renderAgentStateSlots` | functions / _types_ | typed durable state written as ledger events and injected on every provider request |
|
|
122
|
-
| `agentGoalStateSlot` / `agentTodoStateSlot` / `createAgentStateTools` / `AgentStateToolsConfig` | constants / function / _type_ | built-in goal/todo state
|
|
122
|
+
| `agentGoalStateSlot` / `agentTodoStateSlot` / `createAgentStateTools` / `AgentStateToolsConfig` / `AGENT_STATE_TOOL_DESCRIPTORS` | constants / function / _type_ | built-in goal/todo state, `goal_*` / `todo_write` Agent tools bound to the conversation of the run context `tools()` receives, and their deeply frozen non-executable static catalog descriptors |
|
|
123
123
|
| `AgentProcessSandbox` | _type_ | host-provided process sandbox handle accepted by agent coding tools (probe helpers and grade/restriction schemas live in `stitchkit/agent-runtime/sandbox`) |
|
|
124
124
|
| `AgentSandboxProcess` / `AgentSandboxOutputStream` | _types_ | structural child/output interface for optional lifecycle-owned `AgentProcessSandbox.spawn`, without Node ambient type dependencies |
|
|
125
|
-
| `AgentEventSearchResultSchema` / `AgentEventSearchResult` / `createAgentEventSearch` / `createAgentEventSearchTools` / `AgentEventSearchToolsConfig` | schema / _types_ / functions | authorized event search (SQLite FTS5 or Postgres `tsvector`, ADR 0315) with exact event addresses
|
|
125
|
+
| `AgentEventSearchResultSchema` / `AgentEventSearchResult` / `createAgentEventSearch` / `createAgentEventSearchTools` / `AgentEventSearchToolsConfig` / `AGENT_EVENT_SEARCH_TOOL_DESCRIPTORS` | schema / _types_ / functions / constant | authorized event search (SQLite FTS5 or Postgres `tsvector`, ADR 0315) with exact event addresses, `session_*` tools for the conversation of the run context `tools()` receives, and their deeply frozen non-executable static catalog descriptors |
|
|
126
126
|
| `PostgresAgentEventSearchConfig` | _type_ | the Postgres index's options for `createAgentEventSearch({ postgres })` — `diacritics` (`preserve` / `unaccent`), `maxIndexedChars`, `maxSyncEvents` |
|
|
127
127
|
| `createAgentSpillStore` | function | durable content-address-checked artifact storage, bounded read/search, retention facts and archive participation |
|
|
128
|
-
| `AgentScheduleSchema` / `AgentSchedule` / `AgentScheduleService` / `AgentScheduleDeliveryOutcomeSchema` / `AgentScheduleDeliveryOutcome` / `createAgentScheduleService` / `AgentScheduleServiceConfig` / `createAgentScheduleTools` / `AgentScheduleToolsConfig` | schemas / _types_ / functions | durable `at`/`after`/timezone-explicit `every` schedules over the store's `AgentCompanionHost`, required `maxActivePerConversation` and `minIntervalMs`, indexed retry eligibility, typed retry/terminal failure (any other returned value delivers), `maxAttempts` (default 1000) per occurrence — a one-off ends `failed`, a recurring schedule skips to its next slot — bounded dispatch and fenced stable occurrence identity (ADR 0202); the tools are bound to the conversation of the run context `tools()` receives |
|
|
128
|
+
| `AgentScheduleSchema` / `AgentSchedule` / `AgentScheduleService` / `AgentScheduleDeliveryOutcomeSchema` / `AgentScheduleDeliveryOutcome` / `createAgentScheduleService` / `AgentScheduleServiceConfig` / `createAgentScheduleTools` / `AgentScheduleToolsConfig` / `AGENT_SCHEDULE_TOOL_DESCRIPTORS` | schemas / _types_ / functions / constant | durable `at`/`after`/timezone-explicit `every` schedules over the store's `AgentCompanionHost`, required `maxActivePerConversation` and `minIntervalMs`, indexed retry eligibility, typed retry/terminal failure (any other returned value delivers), `maxAttempts` (default 1000) per occurrence — a one-off ends `failed`, a recurring schedule skips to its next slot — bounded dispatch and fenced stable occurrence identity (ADR 0202); the tools are bound to the conversation of the run context `tools()` receives, with deeply frozen non-executable static catalog descriptors |
|
|
129
129
|
| `AgentChildBudgetSchema` / `AgentChildBudget` / `AgentChildStateSchema` / `AgentChildState` / `AgentChildRecordSchema` / `AgentChildRecord` | schema / _type_ | durable child graph, bounded seed and measured budget state |
|
|
130
130
|
| `AgentChildBlockingKindSchema` / `AgentChildBlockingKind` / `AgentChildBlockingSourceSchema` / `AgentChildBlockingSource` / `AgentChildBlockingEventSchema` / `AgentChildBlockingEvent` / `AgentChildBlockingDecision` | schemas / _types_ | parent-owned request identities; responses discriminate approval decisions from JSON input values |
|
|
131
|
-
| `AgentChildHandle` / `AgentChildManager` / `AgentChildManagerConfig` / `AgentChildRemainingBudget` / `createAgentChildManager` / `createAgentChildTools` / `AgentChildToolsConfig` / `agentChildBudgetStopPolicy` | _types_ / functions | host execution port, child lifecycle with required `remainingBudget` and `maxActiveChildren`, cascade (given to `createAgentRuntime` as `children`), messaging, Agent tools bound to the parent conversation of the run context `tools()` receives, and the child runtime's own budget stop policy — `recordStepUsage` at every step boundary, `policy_stop` as `child-budget` when spent |
|
|
131
|
+
| `AgentChildHandle` / `AgentChildManager` / `AgentChildManagerConfig` / `AgentChildRemainingBudget` / `createAgentChildManager` / `createAgentChildTools` / `AgentChildToolsConfig` / `AGENT_CHILD_TOOL_DESCRIPTORS` / `agentChildBudgetStopPolicy` | _types_ / functions / constant | host execution port, child lifecycle with required `remainingBudget` and `maxActiveChildren`, cascade (given to `createAgentRuntime` as `children`), messaging, Agent tools bound to the parent conversation of the run context `tools()` receives (plus their deeply frozen static catalog descriptors), and the child runtime's own budget stop policy — `recordStepUsage` at every step boundary, `policy_stop` as `child-budget` when spent |
|
|
132
132
|
| `AgentCompanionHost` / `AgentCompanionScope` / `AgentSqlSession` / `AgentSqlTables` / `AgentSqlValue` | _types_ | the store's companion host — one store transaction with the purge check and the event append (`transaction(conversationId, work)`), a read transaction (`read(work)`), the companion tables — given by the SQLite and Postgres stores and taken by every companion |
|
|
133
|
-
| `AgentToolDefinition` |
|
|
133
|
+
| `AgentToolDefinition` / `AgentToolDescriptor` | _types_ | peer-neutral executable shape returned by the bound agent-only tool factories and its non-executable static catalog descriptor shape (assignable to `SurfaceRuntimeToolDefinition` without an active run) |
|
|
134
134
|
| `AgentProviderStreamCutError` | class | explicit retryable provider stream truncation evidence |
|
|
135
135
|
|
|
136
136
|
### Complete runtime inventory
|
|
@@ -303,14 +303,26 @@ or framework instructions; repeated keys return the existing invocation ID. It
|
|
|
303
303
|
resolves `{ invocationId, outcome, text?, receiptError? }`: `receiptError` says a
|
|
304
304
|
receipt could not be written and never changes `outcome` or drops `text`.
|
|
305
305
|
`read(input, context)` returns a bounded event page shared by agent and completion;
|
|
306
|
-
`readPayload(input, context)` requires a separate authorization action
|
|
307
|
-
|
|
306
|
+
`readPayload(input, context)` requires a separate authorization action and returns a
|
|
307
|
+
discriminated `ModelInvocationPayloadRead` (`available` with decrypted payload or `expired`
|
|
308
|
+
with `expiredAt` once redacted); `purgePayloads(input, context)` redacts expired ciphertext
|
|
309
|
+
in-place across the store and search indexes while retaining receipt metadata and digests.
|
|
310
|
+
When a request or response payload exceeds `maxPayloadBytes`, the provider call still succeeds
|
|
311
|
+
while recording `payloadOmitted: 'max-payload-bytes'` (with `artifactId` omitted and `payloadSha256`
|
|
312
|
+
preserved) and reporting `InvocationPayloadTooLargeError` through `complete().receiptError`. See the
|
|
313
|
+
[guide and migration example](../guide/agent-runtime.md#plain-completions-and-shared-invocation-receipts).
|
|
308
314
|
|
|
309
315
|
| Export | Kind | Purpose |
|
|
310
316
|
| --- | --- | --- |
|
|
311
317
|
| `CompletionInvocationInputSchema` / `CompletionInvocationInput` | schema/type | strict prompt, model-attempt list, deadline, idempotency key and trace input |
|
|
312
318
|
| `ModelInvocationTraceSchema` / `ModelInvocationTrace` | schema/type | operation, purpose, project, parent trace and optional experiment/case/profile |
|
|
313
|
-
| `ModelInvocationRecordSchema` / `ModelInvocationRecord` | schema/type | discriminated invocation start/finish and per-attempt requested/sent/effective evidence |
|
|
319
|
+
| `ModelInvocationRecordSchema` / `ModelInvocationRecord` | schema/type | discriminated invocation start/finish and per-attempt requested/sent/effective evidence (with optional `artifactId` and `payloadOmitted` when oversized, keeping `payloadSha256`) |
|
|
320
|
+
| `InvocationPayloadTooLargeError` | class | `RangeError` carrying `{ bytes, maxBytes, sha256 }` when a recorded invocation payload exceeds `maxPayloadBytes` without aborting the provider call |
|
|
321
|
+
| `InvocationPayloadOmissionReasonSchema` / `InvocationPayloadOmissionReason` | schema/type | reason a payload body was not stored (`'max-payload-bytes'`) |
|
|
322
|
+
| `ModelInvocationPayloadReadSchema` / `ModelInvocationPayloadRead` | schema/type | discriminated result of `readPayload`: `{ status: 'available', payload, ... }` or `{ status: 'expired', expiredAt, ... }` |
|
|
323
|
+
| `PurgeInvocationPayloadsInputSchema` / `PurgeInvocationPayloadsInput` | schema/type | input for `purgePayloads` / `store.purgeExpiredPayloads`: `before`, optional `conversationId` and `limit` |
|
|
324
|
+
| `PurgeInvocationPayloadsResultSchema` / `PurgeInvocationPayloadsResult` | schema/type | result of `purgePayloads`: `purged`, `freedBytes`, and `hasMore` |
|
|
325
|
+
| `ModelInvocationAuthorizationInput` | type | discriminated authorization payload passed to `ModelInvocationConfig.authorize` (`'complete'`, `'agent'`, `'read'`, `'read-payload'`, or `'purge-payloads'`) |
|
|
314
326
|
| `ModelInvocationAttemptContext` | type | conversation, operation, invocation, attempt, step and optional agent run identity |
|
|
315
327
|
| `currentModelInvocationAttempt` | function | returns causal IDs inside the provider transport; undefined outside an invocation |
|
|
316
328
|
| `modelInvocationSpendAttribution` | function | the current attempt as `stitchkit/spend` attribution fields (conversation, run, invocation, attempt, step) — a spend gateway's `context` |
|