stitchkit 0.113.2 → 0.113.3

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.
Files changed (65) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/contract/errors.d.ts +1 -0
  3. package/dist/contract/errors.d.ts.map +1 -1
  4. package/dist/entrypoints/agent-runtime/browser.js +2 -2
  5. package/dist/entrypoints/agent-runtime/coding-tools.js +4 -4
  6. package/dist/entrypoints/agent-runtime/harness.js +5 -5
  7. package/dist/entrypoints/agent-runtime/realtime.js +2 -2
  8. package/dist/entrypoints/agent-runtime/sandbox.js +4 -4
  9. package/dist/entrypoints/agent-runtime/sqlite/bun.js +6 -6
  10. package/dist/entrypoints/agent-runtime/sqlite/node.js +6 -6
  11. package/dist/entrypoints/agent-runtime/testing.js +6 -6
  12. package/dist/entrypoints/agent-runtime.js +11 -11
  13. package/dist/entrypoints/application/grammy.js +1 -1
  14. package/dist/entrypoints/application.js +2 -2
  15. package/dist/entrypoints/cli.js +8 -8
  16. package/dist/entrypoints/contract.js +2 -2
  17. package/dist/entrypoints/files.js +1 -1
  18. package/dist/entrypoints/index.js +5 -5
  19. package/dist/entrypoints/node.js +7 -7
  20. package/dist/entrypoints/observability.js +1 -1
  21. package/dist/entrypoints/realtime.js +3 -3
  22. package/dist/entrypoints/remote.js +1 -1
  23. package/dist/entrypoints/server.js +8 -8
  24. package/dist/entrypoints/testing.js +3 -3
  25. package/dist/entrypoints/tools/connections.js +5 -5
  26. package/dist/entrypoints/tools/invoker.js +5 -5
  27. package/dist/entrypoints/tools/mcp.js +7 -7
  28. package/dist/entrypoints/tools.js +13 -13
  29. package/dist/{index-cn7xenet.js → index-095ya5hm.js} +5 -5
  30. package/dist/{index-6ez1r4j2.js → index-1csp1hwm.js} +4 -4
  31. package/dist/{index-sps9s3aj.js → index-2bqf0a74.js} +1 -1
  32. package/dist/{index-grn4brx1.js → index-3za04re9.js} +1 -1
  33. package/dist/{index-09dyy94r.js → index-523tq7y4.js} +1 -1
  34. package/dist/{index-8swt2h9y.js → index-7fc0c2np.js} +1 -1
  35. package/dist/{index-2s7wv547.js → index-86nbfysb.js} +3 -3
  36. package/dist/{index-5gmrx6sc.js → index-98hv3sba.js} +1 -1
  37. package/dist/{index-4e36ts8b.js → index-9dyd8xzf.js} +1 -1
  38. package/dist/{index-zbs0g0v2.js → index-aykhzcnf.js} +1 -1
  39. package/dist/{index-0pfk3c1p.js → index-bjcjqj46.js} +1 -1
  40. package/dist/{index-vgtzdykw.js → index-cqmqyjax.js} +1 -1
  41. package/dist/{index-bv51s0f4.js → index-ega3yz4c.js} +1 -1
  42. package/dist/{index-awbed0mk.js → index-fy4av0hq.js} +1 -1
  43. package/dist/{index-0gbn42hr.js → index-htxh46ej.js} +3 -3
  44. package/dist/{index-shg5xc9t.js → index-jk29rwkr.js} +1 -1
  45. package/dist/{index-e40rzw1m.js → index-k42ckyzx.js} +1 -1
  46. package/dist/{index-xtc8k5n9.js → index-k7z3j3hr.js} +47 -16
  47. package/dist/{index-pd578538.js → index-qcn84byh.js} +1 -0
  48. package/dist/{index-vf9c59t3.js → index-rhzkndr5.js} +2 -2
  49. package/dist/{index-z8fnfj42.js → index-tpwbct8j.js} +1 -1
  50. package/dist/{index-7ysby53h.js → index-v1tswj0z.js} +1 -1
  51. package/dist/{index-a31p9ekx.js → index-v6vb5qx8.js} +4 -4
  52. package/dist/{index-5zxe0f3h.js → index-vtann8bz.js} +3 -3
  53. package/dist/{index-kvga921h.js → index-vwhrnp67.js} +4 -4
  54. package/dist/{index-ptjx84pr.js → index-zktz242w.js} +2 -2
  55. package/dist/tools/cli/command.d.ts +2 -1
  56. package/dist/tools/cli/command.d.ts.map +1 -1
  57. package/dist/tools/cli/format.d.ts +5 -1
  58. package/dist/tools/cli/format.d.ts.map +1 -1
  59. package/dist/tools/cli/run-native.d.ts.map +1 -1
  60. package/llms/cli.2.txt +281 -0
  61. package/llms/cli.txt +18 -285
  62. package/llms/server.4.txt +1 -1
  63. package/llms-full.txt +19 -5
  64. package/llms.txt +1 -1
  65. package/package.json +1 -1
package/llms-full.txt CHANGED
@@ -10012,9 +10012,11 @@ const doctor = defineCliCommand({
10012
10012
  it the canonical JSON output is unchanged. `exitCode` classifies a successfully
10013
10013
  validated result and must return an integer in `0..255`; failed `ToolResult`
10014
10014
  envelopes and the application-wide `exitCodes` mapping remain authoritative for
10015
- failures. A throwing callback, invalid status or non-string presenter becomes a
10016
- normalized `INTERNAL_SERVER_ERROR`, never partial success output. Void native
10017
- commands cannot declare either callback.
10015
+ failures. A throwing or invalid exit-status callback becomes a normalized
10016
+ `INTERNAL_SERVER_ERROR`. A throwing or non-string `present` preserves the validated
10017
+ result on stdout and reports `CLI_PRESENTATION_FAILED` separately, as described
10018
+ under [Aggregate views](#aggregate-views). Void native commands cannot declare
10019
+ either callback.
10018
10020
 
10019
10021
  `--version`, a selected native command and its command help run before
10020
10022
  `resolveAuth`, services, context or runtime-tool factories. Top-level help is
@@ -10229,6 +10231,7 @@ newline-terminated JSON record on its respective stream; progress and CLI usage
10229
10231
  diagnostics remain ordinary stderr text. This keeps stdout pipeable and
10230
10232
  `2>/dev/null` clean. The process exit code carries the error class (`0` ok,
10231
10233
  `VALIDATION_ERROR → 1`, `UNAUTHORIZED → 2`, `FORBIDDEN → 3`, `NOT_FOUND → 4`,
10234
+ `CLI_PRESENTATION_FAILED → 8`,
10232
10235
  …) — override per app with `exitCodes`.
10233
10236
 
10234
10237
  ### A narrower question than "all of them"
@@ -10450,7 +10453,7 @@ would answer a question nobody asked.
10450
10453
 
10451
10454
  Three rules worth knowing before you rely on them:
10452
10455
 
10453
- - **A field the result does not carry is an argument error.** A group of zero
10456
+ - **A field the result does not carry is a presentation error.** A group of zero
10454
10457
  over a misspelled field is indistinguishable from a true empty answer, and the
10455
10458
  caller reads it as data. The message names the fields that *are* there.
10456
10459
  - **An aggregate needs a collection** — the result itself when it is an array,
@@ -10464,6 +10467,17 @@ Three rules worth knowing before you rely on them:
10464
10467
  A failed call still reports its own error and exit code. An aggregate over an
10465
10468
  error is not an answer to the question that was asked.
10466
10469
 
10470
+ If the command succeeds but its requested view cannot be built, the CLI writes
10471
+ the complete original result to stdout, using the normal JSON format (`--json`
10472
+ still selects compact output). It writes a separate structured
10473
+ `CLI_PRESENTATION_FAILED` diagnostic to stderr and exits with `8`, configurable
10474
+ through `exitCodes`. Its `details.operationSucceeded: true` and `retryable: false`
10475
+ distinguish a presentation refusal from a failed operation; `details.cause`
10476
+ preserves the safe reason. Recover the answer from stdout instead of repeating
10477
+ the mutation. Domain retry hints are not appended to this diagnostic. CLI
10478
+ argument errors detected before execution still exit with `2`
10479
+ and have no successful result to preserve.
10480
+
10467
10481
  ## Named profiles
10468
10482
 
10469
10483
  A CLI that talks to a deployed server needs an address and a credential per
@@ -13097,7 +13111,7 @@ core never models them (ADR 0002). But stitchkit itself emits a set of its own:
13097
13111
  `FILE_INSPECTION_REJECTED`, `FILE_TOO_LARGE`, `FILE_EXISTS`,
13098
13112
  `REALTIME_CONTRACT_VIOLATION`, `APPLICATION_NOT_ACCEPTING`, `NOT_IMPLEMENTED`,
13099
13113
  `WAIT_TIMEOUT`,
13100
- `WAIT_FAILED`, `CLI_COMMAND_UNAVAILABLE`, `DOWNLOAD_NOT_FOUND`, `VIEW_HTTP_ERROR`,
13114
+ `WAIT_FAILED`, `CLI_COMMAND_UNAVAILABLE`, `CLI_PRESENTATION_FAILED`, `DOWNLOAD_NOT_FOUND`, `VIEW_HTTP_ERROR`,
13101
13115
  `CONNECTION_TIMEOUT`, `CONNECTION_RESPONSE_TOO_LARGE`,
13102
13116
  `CONNECTION_REQUEST_FAILED`, `UPSTREAM_TOOL_ERROR`,
13103
13117
  `OPERATION_NOT_SUCCEEDED`, `STREAM_ITEM_INVALID`, `STREAM_FRAME_TOO_LARGE`,
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) 47.0 KB → [llms/cli.2.txt](llms/cli.2.txt) 22.5 KB
21
+ - **stitchkit/cli**: [llms/cli.txt](llms/cli.txt) 33.9 KB → [llms/cli.2.txt](llms/cli.2.txt) 36.4 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stitchkit",
3
- "version": "0.113.2",
3
+ "version": "0.113.3",
4
4
  "description": "Contract-first backend framework — one defineContract() into an HTTP API, MCP tools, AI-agent tools and a typed client. Bun and Node.",
5
5
  "keywords": [
6
6
  "bun",