stitchkit 0.113.1 → 0.113.2
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 +7 -0
- package/dist/contract/errors.d.ts +1 -0
- package/dist/contract/errors.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime/browser.js +2 -2
- package/dist/entrypoints/agent-runtime/coding-tools.js +4 -4
- package/dist/entrypoints/agent-runtime/harness.js +5 -5
- package/dist/entrypoints/agent-runtime/realtime.js +2 -2
- package/dist/entrypoints/agent-runtime/sandbox.js +4 -4
- package/dist/entrypoints/agent-runtime/sqlite/bun.js +6 -6
- package/dist/entrypoints/agent-runtime/sqlite/node.js +6 -6
- package/dist/entrypoints/agent-runtime/testing.js +6 -6
- package/dist/entrypoints/agent-runtime.js +11 -11
- package/dist/entrypoints/application/grammy.js +1 -1
- package/dist/entrypoints/application.js +2 -2
- package/dist/entrypoints/cli.js +8 -8
- package/dist/entrypoints/contract.js +2 -2
- package/dist/entrypoints/files.js +1 -1
- package/dist/entrypoints/index.js +5 -5
- package/dist/entrypoints/node.js +7 -7
- package/dist/entrypoints/observability.js +1 -1
- package/dist/entrypoints/realtime.js +3 -3
- package/dist/entrypoints/remote.js +1 -1
- package/dist/entrypoints/server.js +8 -8
- package/dist/entrypoints/testing.js +3 -3
- package/dist/entrypoints/tools/connections.js +5 -5
- package/dist/entrypoints/tools/invoker.js +5 -5
- package/dist/entrypoints/tools/mcp.js +7 -7
- package/dist/entrypoints/tools.js +13 -13
- package/dist/{index-yjnmac9b.js → index-09dyy94r.js} +1 -1
- package/dist/{index-v6mzw27b.js → index-0gbn42hr.js} +3 -3
- package/dist/{index-86sxnvpr.js → index-0pfk3c1p.js} +1 -1
- package/dist/{index-emrmgq3s.js → index-2s7wv547.js} +3 -3
- package/dist/{index-h1spd9kv.js → index-4e36ts8b.js} +1 -1
- package/dist/{index-556g5hsh.js → index-5gmrx6sc.js} +1 -1
- package/dist/{index-2qymcsq2.js → index-5zxe0f3h.js} +3 -3
- package/dist/{index-sjww6myv.js → index-6ez1r4j2.js} +4 -4
- package/dist/{index-8asb62xn.js → index-7ysby53h.js} +1 -1
- package/dist/{index-mhrtwttb.js → index-8swt2h9y.js} +1 -1
- package/dist/{index-tg2q89ps.js → index-a31p9ekx.js} +4 -4
- package/dist/{index-k8fbzggr.js → index-awbed0mk.js} +1 -1
- package/dist/{index-nk1mh535.js → index-bv51s0f4.js} +1 -1
- package/dist/{index-8jjzfts8.js → index-cn7xenet.js} +5 -5
- package/dist/{index-fynr93w4.js → index-e40rzw1m.js} +1 -1
- package/dist/{index-ykdcnq1f.js → index-grn4brx1.js} +1 -1
- package/dist/{index-nn6607y3.js → index-kvga921h.js} +4 -4
- package/dist/{index-j9gxbztg.js → index-pd578538.js} +1 -0
- package/dist/{index-dsxrcseb.js → index-ptjx84pr.js} +2 -2
- package/dist/{index-pvh3z03x.js → index-shg5xc9t.js} +1 -1
- package/dist/{index-xmgjtkvr.js → index-sps9s3aj.js} +1 -1
- package/dist/{index-jgwqc38k.js → index-vf9c59t3.js} +2 -2
- package/dist/{index-pzw0fpek.js → index-vgtzdykw.js} +1 -1
- package/dist/{index-fytsnhzj.js → index-xtc8k5n9.js} +170 -115
- package/dist/{index-k0zfcxf5.js → index-z8fnfj42.js} +1 -1
- package/dist/{index-gz9jf461.js → index-zbs0g0v2.js} +1 -1
- package/dist/tools/cli/command-shape.d.ts +4 -0
- package/dist/tools/cli/command-shape.d.ts.map +1 -0
- package/dist/tools/cli/format.d.ts.map +1 -1
- package/dist/tools/cli/help.d.ts.map +1 -1
- package/dist/tools/cli/invoke.d.ts +1 -1
- package/dist/tools/cli/invoke.d.ts.map +1 -1
- package/dist/tools/cli/managed-surface.d.ts +3 -2
- package/dist/tools/cli/managed-surface.d.ts.map +1 -1
- package/dist/tools/cli/policy.d.ts +2 -0
- package/dist/tools/cli/policy.d.ts.map +1 -1
- package/dist/tools/cli/run-managed.d.ts.map +1 -1
- package/dist/tools/cli/session.d.ts +0 -1
- package/dist/tools/cli/session.d.ts.map +1 -1
- package/dist/tools/cli/unavailable.d.ts +10 -0
- package/dist/tools/cli/unavailable.d.ts.map +1 -0
- package/llms/cli.2.txt +1 -1
- package/llms/cli.txt +31 -2
- package/llms/server.4.txt +1 -1
- package/llms-full.txt +33 -4
- package/llms.txt +1 -1
- package/package.json +1 -1
package/llms-full.txt
CHANGED
|
@@ -10289,13 +10289,42 @@ command name — validated against the declared schema, and kept out of every
|
|
|
10289
10289
|
operation's arguments: `handoff_read` above receives `{ handoffId: 'u' }` and
|
|
10290
10290
|
nothing else. The values reach `resolveAuth(globals)`, `context(auth, globals)`
|
|
10291
10291
|
and a native command's `globals`. An invalid value is an argument error naming
|
|
10292
|
-
the flag
|
|
10293
|
-
|
|
10292
|
+
the flag. An application global that collides with a framework option is refused
|
|
10293
|
+
at startup. Field collisions in authored commands are configuration errors;
|
|
10294
|
+
runtime catalogue entries are isolated as described below. Past a bare
|
|
10294
10295
|
`--` every token is a literal, so a positional value that reads like a global
|
|
10295
10296
|
survives intact.
|
|
10296
10297
|
|
|
10297
10298
|
Both help levels list them under `Application options:`.
|
|
10298
10299
|
|
|
10300
|
+
## When one runtime command cannot be represented in argv
|
|
10301
|
+
|
|
10302
|
+
A `runtimeTools` catalogue can change independently of the CLI application. An
|
|
10303
|
+
entry whose input declares a framework option such as `json`, or a field shadowed
|
|
10304
|
+
by an application global such as `caller`, cannot receive that field through argv.
|
|
10305
|
+
Only that entry becomes unavailable. Other commands still run, and top-level,
|
|
10306
|
+
filtered and command-specific help retain the entry and its full reason:
|
|
10307
|
+
|
|
10308
|
+
```text
|
|
10309
|
+
inspect Inspect an operation [unavailable]
|
|
10310
|
+
Unavailable: [stitchkit] CLI command "inspect" declares field(s) shadowed by application global options: caller
|
|
10311
|
+
```
|
|
10312
|
+
|
|
10313
|
+
Calling it returns `CLI_COMMAND_UNAVAILABLE`, `retryable: false`, and the same
|
|
10314
|
+
reason in `details.message` on stderr; the default exit code is 1. `--json`
|
|
10315
|
+
compacts the error as usual; `exitCodes` and `errorHint` apply. The refusal precedes
|
|
10316
|
+
command argument parsing, stdin, context, hooks and the handler; `--dry-run` cannot
|
|
10317
|
+
turn it into success. A known unavailable `--wait` target returns the same refusal;
|
|
10318
|
+
an unknown target keeps `NOT_FOUND`.
|
|
10319
|
+
|
|
10320
|
+
This isolates only reserved/global **field** conflicts in `runtimeTools`.
|
|
10321
|
+
Native commands and contract-defined `services` still fail at startup for those
|
|
10322
|
+
conflicts. Duplicate or reserved command names and invalid local aliases,
|
|
10323
|
+
positionals or passthrough policies remain configuration errors for every entry.
|
|
10324
|
+
`createCliInvoker` receives globals and command input separately and has no argv
|
|
10325
|
+
projection, so its own `caller` or `json` input stays callable without renaming.
|
|
10326
|
+
See [ADR 0273](../decisions/0273-a-runtime-cli-field-conflict-is-one-commands-unavailability.md).
|
|
10327
|
+
|
|
10299
10328
|
## When the managed surface cannot resolve
|
|
10300
10329
|
|
|
10301
10330
|
A CLI whose commands come from a running server declares them with a factory,
|
|
@@ -13068,7 +13097,7 @@ core never models them (ADR 0002). But stitchkit itself emits a set of its own:
|
|
|
13068
13097
|
`FILE_INSPECTION_REJECTED`, `FILE_TOO_LARGE`, `FILE_EXISTS`,
|
|
13069
13098
|
`REALTIME_CONTRACT_VIOLATION`, `APPLICATION_NOT_ACCEPTING`, `NOT_IMPLEMENTED`,
|
|
13070
13099
|
`WAIT_TIMEOUT`,
|
|
13071
|
-
`WAIT_FAILED`, `DOWNLOAD_NOT_FOUND`, `VIEW_HTTP_ERROR`,
|
|
13100
|
+
`WAIT_FAILED`, `CLI_COMMAND_UNAVAILABLE`, `DOWNLOAD_NOT_FOUND`, `VIEW_HTTP_ERROR`,
|
|
13072
13101
|
`CONNECTION_TIMEOUT`, `CONNECTION_RESPONSE_TOO_LARGE`,
|
|
13073
13102
|
`CONNECTION_REQUEST_FAILED`, `UPSTREAM_TOOL_ERROR`,
|
|
13074
13103
|
`OPERATION_NOT_SUCCEEDED`, `STREAM_ITEM_INVALID`, `STREAM_FRAME_TOO_LARGE`,
|
|
@@ -23593,7 +23622,7 @@ SDK nor the `ai` peer.
|
|
|
23593
23622
|
|
|
23594
23623
|
| Export | Kind | Summary |
|
|
23595
23624
|
|--------|------|---------|
|
|
23596
|
-
| `createCli` | function | build and run a CLI from contracts — [guide](../guide/cli.md) |
|
|
23625
|
+
| `createCli` | function | build and run a CLI from contracts; a runtime catalogue field conflicting with reserved/global argv options disables only that entry, retained in help with its reason; invocation returns `CLI_COMMAND_UNAVAILABLE` before side effects — [guide](../guide/cli.md#when-one-runtime-command-cannot-be-represented-in-argv) |
|
|
23597
23626
|
| `defineCliCommand` | function | define one Zod-typed CLI-only executable command with optional validated-result presentation/exit policy |
|
|
23598
23627
|
| `parseCliArgs` | function | argv → typed tool args against a schema; inline `--field:=JSON` assigns a whole JSON value, including null, while ordinary string flags remain lexical; named array options together with bare positionals require an explicit `positionals` policy (advanced) |
|
|
23599
23628
|
| `routeCliArgv` | function | select the command out of argv without duplicating the global-option grammar (advanced) |
|
package/llms.txt
CHANGED
|
@@ -18,7 +18,7 @@ Load the slice for each entrypoint your code imports — `import … from 'stitc
|
|
|
18
18
|
- **stitchkit/tools/contract**: [llms/tools-contract.txt](llms/tools-contract.txt) 0.2 KB
|
|
19
19
|
- **stitchkit/tools/invoker**: [llms/tools-invoker.txt](llms/tools-invoker.txt) 0.2 KB
|
|
20
20
|
- **stitchkit/tools/connections**: [llms/tools-connections.txt](llms/tools-connections.txt) 3.9 KB
|
|
21
|
-
- **stitchkit/cli**: [llms/cli.txt](llms/cli.txt)
|
|
21
|
+
- **stitchkit/cli**: [llms/cli.txt](llms/cli.txt) 47.0 KB → [llms/cli.2.txt](llms/cli.2.txt) 22.5 KB
|
|
22
22
|
- **stitchkit/cli/publish**: [llms/cli-publish.txt](llms/cli-publish.txt) 1.5 KB
|
|
23
23
|
- **stitchkit/remote**: [llms/remote.txt](llms/remote.txt) 1.0 KB
|
|
24
24
|
- **stitchkit/contract**: [llms/contract.txt](llms/contract.txt) 31.9 KB
|
package/package.json
CHANGED