stitchkit 0.68.11 → 0.70.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.
Files changed (125) hide show
  1. package/README.md +30 -1
  2. package/dist/agent-runtime/coding-tool-contract.d.ts +156 -0
  3. package/dist/agent-runtime/coding-tool-contract.d.ts.map +1 -0
  4. package/dist/agent-runtime/coding-tool-files.d.ts +3 -0
  5. package/dist/agent-runtime/coding-tool-files.d.ts.map +1 -0
  6. package/dist/agent-runtime/coding-tool-paths.d.ts +20 -0
  7. package/dist/agent-runtime/coding-tool-paths.d.ts.map +1 -0
  8. package/dist/agent-runtime/coding-tool-search-patch.d.ts +3 -0
  9. package/dist/agent-runtime/coding-tool-search-patch.d.ts.map +1 -0
  10. package/dist/agent-runtime/coding-tool-shell.d.ts +3 -0
  11. package/dist/agent-runtime/coding-tool-shell.d.ts.map +1 -0
  12. package/dist/agent-runtime/coding-tools.d.ts +17 -0
  13. package/dist/agent-runtime/coding-tools.d.ts.map +1 -0
  14. package/dist/agent-runtime/compaction.d.ts +2 -0
  15. package/dist/agent-runtime/compaction.d.ts.map +1 -1
  16. package/dist/agent-runtime/contained-files.d.ts +56 -0
  17. package/dist/agent-runtime/contained-files.d.ts.map +1 -0
  18. package/dist/agent-runtime/control-schema.d.ts +1074 -0
  19. package/dist/agent-runtime/control-schema.d.ts.map +1 -0
  20. package/dist/agent-runtime/conversations.d.ts +128 -0
  21. package/dist/agent-runtime/conversations.d.ts.map +1 -0
  22. package/dist/agent-runtime/event-schema.d.ts +96 -0
  23. package/dist/agent-runtime/event-schema.d.ts.map +1 -1
  24. package/dist/agent-runtime/harness-contract.d.ts +169 -0
  25. package/dist/agent-runtime/harness-contract.d.ts.map +1 -0
  26. package/dist/agent-runtime/harness-control.d.ts +25 -0
  27. package/dist/agent-runtime/harness-control.d.ts.map +1 -0
  28. package/dist/agent-runtime/harness-file-resources.d.ts +33 -0
  29. package/dist/agent-runtime/harness-file-resources.d.ts.map +1 -0
  30. package/dist/agent-runtime/harness-resources.d.ts +5 -0
  31. package/dist/agent-runtime/harness-resources.d.ts.map +1 -0
  32. package/dist/agent-runtime/harness.d.ts +12 -0
  33. package/dist/agent-runtime/harness.d.ts.map +1 -0
  34. package/dist/agent-runtime/history.d.ts +2 -0
  35. package/dist/agent-runtime/history.d.ts.map +1 -1
  36. package/dist/agent-runtime/models.d.ts +199 -0
  37. package/dist/agent-runtime/models.d.ts.map +1 -1
  38. package/dist/agent-runtime/prompt.d.ts +2 -0
  39. package/dist/agent-runtime/prompt.d.ts.map +1 -1
  40. package/dist/agent-runtime/run-execution.d.ts.map +1 -1
  41. package/dist/agent-runtime/runtime.d.ts +11 -3
  42. package/dist/agent-runtime/runtime.d.ts.map +1 -1
  43. package/dist/agent-runtime/schemas.d.ts +49 -0
  44. package/dist/agent-runtime/schemas.d.ts.map +1 -1
  45. package/dist/agent-runtime/sqlite.d.ts +2 -0
  46. package/dist/agent-runtime/sqlite.d.ts.map +1 -1
  47. package/dist/agent-runtime/store-driver.d.ts +61 -212
  48. package/dist/agent-runtime/store-driver.d.ts.map +1 -1
  49. package/dist/agent-runtime/store.d.ts +368 -1
  50. package/dist/agent-runtime/store.d.ts.map +1 -1
  51. package/dist/agent-runtime/terminal-commit.d.ts +12 -1
  52. package/dist/agent-runtime/terminal-commit.d.ts.map +1 -1
  53. package/dist/agent-runtime/terminal-status.d.ts +8 -0
  54. package/dist/agent-runtime/terminal-status.d.ts.map +1 -1
  55. package/dist/agent-runtime-browser.d.ts +1 -0
  56. package/dist/agent-runtime-browser.d.ts.map +1 -1
  57. package/dist/agent-runtime-browser.js +217 -1
  58. package/dist/agent-runtime-coding-tools.d.ts +2 -0
  59. package/dist/agent-runtime-coding-tools.d.ts.map +1 -0
  60. package/dist/agent-runtime-coding-tools.js +766 -0
  61. package/dist/agent-runtime-harness.d.ts +2 -0
  62. package/dist/agent-runtime-harness.d.ts.map +1 -0
  63. package/dist/agent-runtime-harness.js +704 -0
  64. package/dist/agent-runtime-openrouter.d.ts +14 -1
  65. package/dist/agent-runtime-openrouter.d.ts.map +1 -1
  66. package/dist/agent-runtime-openrouter.js +211 -0
  67. package/dist/agent-runtime-sqlite-bun.js +4 -3
  68. package/dist/agent-runtime-sqlite-node.js +4 -3
  69. package/dist/agent-runtime.d.ts +5 -3
  70. package/dist/agent-runtime.d.ts.map +1 -1
  71. package/dist/agent-runtime.js +108 -2580
  72. package/dist/application/diagnostic-journal-contract.d.ts +164 -0
  73. package/dist/application/diagnostic-journal-contract.d.ts.map +1 -0
  74. package/dist/application/diagnostic-journal-manager.d.ts +12 -0
  75. package/dist/application/diagnostic-journal-manager.d.ts.map +1 -0
  76. package/dist/application/diagnostic-journal-storage.d.ts +29 -0
  77. package/dist/application/diagnostic-journal-storage.d.ts.map +1 -0
  78. package/dist/application/diagnostic-journal.d.ts +11 -0
  79. package/dist/application/diagnostic-journal.d.ts.map +1 -0
  80. package/dist/application.d.ts +2 -0
  81. package/dist/application.d.ts.map +1 -1
  82. package/dist/application.js +561 -17
  83. package/dist/browser/socket-io.d.ts.map +1 -1
  84. package/dist/cli.js +9 -6
  85. package/dist/{index-t23p2b68.js → index-0yphgata.js} +1 -1
  86. package/dist/{index-8vpzxg55.js → index-10gbbbaa.js} +103 -2
  87. package/dist/{index-hcx9yypn.js → index-38hs3a58.js} +13 -11
  88. package/dist/index-3xnq72rz.js +21 -0
  89. package/dist/index-7rey2b8s.js +73 -0
  90. package/dist/{index-22tjt2rk.js → index-aczggrty.js} +1 -1
  91. package/dist/index-bd17ytae.js +192 -0
  92. package/dist/{index-xyvxez9r.js → index-da1aqnhb.js} +5 -5
  93. package/dist/index-es0h4w26.js +63 -0
  94. package/dist/{index-hqza5nde.js → index-hsabxjz0.js} +78 -77
  95. package/dist/{index-f24xg2cw.js → index-ktsps64f.js} +4 -2
  96. package/dist/{index-2t6zt5cg.js → index-mjx0wt4c.js} +11 -7
  97. package/dist/{index-y2ctppmg.js → index-qzbg46b6.js} +10 -74
  98. package/dist/{index-bt5179zb.js → index-s8nt8c22.js} +16 -11
  99. package/dist/index-tg3m2ec5.js +157 -0
  100. package/dist/{index-hxh98zbm.js → index-vbf2p6me.js} +1 -1
  101. package/dist/index-vc498pst.js +51 -0
  102. package/dist/{index-pgsyp3xh.js → index-vj3vvpaa.js} +1 -192
  103. package/dist/index-vy5bjy07.js +2569 -0
  104. package/dist/{index-hb0mncmj.js → index-wc80at9n.js} +2 -2
  105. package/dist/{index-eqqyd9v8.js → index-wwst0td5.js} +2 -46
  106. package/dist/{index-ysphyxax.js → index-x1th9s8c.js} +23 -2
  107. package/dist/index-xbtcszs7.js +202 -0
  108. package/dist/{index-grgvpbch.js → index-y3w12g8d.js} +4 -2
  109. package/dist/index.js +51 -37
  110. package/dist/internal/ai-sdk-typed.d.ts +14 -0
  111. package/dist/internal/ai-sdk-typed.d.ts.map +1 -0
  112. package/dist/node.js +6 -5
  113. package/dist/observability/index.js +5 -4
  114. package/dist/realtime/request.d.ts +5 -0
  115. package/dist/realtime/request.d.ts.map +1 -1
  116. package/dist/remote.js +7 -6
  117. package/dist/server/index.js +13 -11
  118. package/dist/testing.js +6 -5
  119. package/dist/tool-invoker.js +7 -5
  120. package/dist/tools/agent-tool-error.d.ts +14 -0
  121. package/dist/tools/agent-tool-error.d.ts.map +1 -0
  122. package/dist/tools/agent.d.ts.map +1 -1
  123. package/dist/tools.js +24 -17
  124. package/llms-full.txt +386 -29
  125. package/package.json +10 -2
package/dist/testing.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  AgentMessageSchema,
3
3
  AgentRunSchema
4
- } from "./index-ysphyxax.js";
4
+ } from "./index-x1th9s8c.js";
5
5
  import {
6
6
  createApplication
7
7
  } from "./index-6wzr93cg.js";
@@ -24,15 +24,16 @@ import {
24
24
  import {
25
25
  createClient,
26
26
  createClients
27
- } from "./index-hb0mncmj.js";
28
- import"./index-t23p2b68.js";
27
+ } from "./index-wc80at9n.js";
28
+ import"./index-0yphgata.js";
29
+ import"./index-bd17ytae.js";
29
30
  import {
30
31
  joinRoutePath
31
- } from "./index-pgsyp3xh.js";
32
+ } from "./index-vj3vvpaa.js";
33
+ import"./index-0w9abg87.js";
32
34
  import {
33
35
  isRecord
34
36
  } from "./index-qyrqwr4c.js";
35
- import"./index-0w9abg87.js";
36
37
  import"./index-6k1937bx.js";
37
38
 
38
39
  // src/agent-runtime/testing.ts
@@ -1,13 +1,15 @@
1
1
  import {
2
2
  createToolInvoker
3
- } from "./index-grgvpbch.js";
4
- import"./index-y2ctppmg.js";
5
- import"./index-f24xg2cw.js";
3
+ } from "./index-y3w12g8d.js";
4
+ import"./index-7rey2b8s.js";
5
+ import"./index-qzbg46b6.js";
6
+ import"./index-ktsps64f.js";
6
7
  import"./index-22by16v6.js";
7
8
  import"./index-cby4ar3v.js";
8
- import"./index-pgsyp3xh.js";
9
- import"./index-qyrqwr4c.js";
9
+ import"./index-bd17ytae.js";
10
+ import"./index-vj3vvpaa.js";
10
11
  import"./index-0w9abg87.js";
12
+ import"./index-qyrqwr4c.js";
11
13
  import"./index-6k1937bx.js";
12
14
  export {
13
15
  createToolInvoker
@@ -0,0 +1,14 @@
1
+ /**
2
+ * A mounted tool failed with a model-safe, transport-shaped error envelope.
3
+ *
4
+ * The AI SDK must observe a throw so it emits `tool-error`; returning this
5
+ * envelope would incorrectly mark the call successful. The original cause is
6
+ * retained for local observability while `message` contains only the safe
7
+ * envelope that may be sent to the model provider.
8
+ */
9
+ export declare class AgentToolError extends Error {
10
+ readonly output: Record<string, unknown>;
11
+ constructor(output: Record<string, unknown>, cause?: unknown);
12
+ }
13
+ export declare function isAgentToolError(value: unknown): value is AgentToolError;
14
+ //# sourceMappingURL=agent-tool-error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-tool-error.d.ts","sourceRoot":"","sources":["../../src/tools/agent-tool-error.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,qBAAa,cAAe,SAAQ,KAAK;IACvC,SAA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,MAAM,GAAE,gBAAqB,GAC5B,OAAO,CA4ET"}
package/dist/tools.js CHANGED
@@ -1,14 +1,15 @@
1
1
  import {
2
2
  redact
3
- } from "./index-22tjt2rk.js";
3
+ } from "./index-aczggrty.js";
4
4
  import {
5
5
  buildToolManifest,
6
6
  mountAgent
7
- } from "./index-bt5179zb.js";
7
+ } from "./index-s8nt8c22.js";
8
+ import"./index-3xnq72rz.js";
8
9
  import {
9
10
  signJwt,
10
11
  verifyPkce
11
- } from "./index-xyvxez9r.js";
12
+ } from "./index-da1aqnhb.js";
12
13
  import {
13
14
  DEFAULT_CORS_ALLOW_HEADERS,
14
15
  DEFAULT_PROCESS_SIGNALS,
@@ -16,10 +17,10 @@ import {
16
17
  defaultSignalSource,
17
18
  guardSignalCallback,
18
19
  reportSignalError
19
- } from "./index-hxh98zbm.js";
20
+ } from "./index-vbf2p6me.js";
20
21
  import {
21
22
  createToolInvoker
22
- } from "./index-grgvpbch.js";
23
+ } from "./index-y3w12g8d.js";
23
24
  import {
24
25
  WaitTimeoutError,
25
26
  createCli,
@@ -28,27 +29,31 @@ import {
28
29
  fetchPinnedDocument,
29
30
  readCapped,
30
31
  runWaitOperation
31
- } from "./index-2t6zt5cg.js";
32
+ } from "./index-mjx0wt4c.js";
33
+ import {
34
+ collectToolSurface
35
+ } from "./index-vc498pst.js";
32
36
  import {
33
- collectToolSurface,
34
37
  createRuntimeToolFactory,
35
38
  defineRuntimeTool
36
- } from "./index-eqqyd9v8.js";
39
+ } from "./index-wwst0td5.js";
37
40
  import {
38
- ToolExecutionControlError,
39
- coerceJsonArgs,
40
41
  collectTools,
41
42
  createToolRunner,
43
+ formatToolError
44
+ } from "./index-7rey2b8s.js";
45
+ import {
46
+ ToolExecutionControlError,
47
+ coerceJsonArgs,
42
48
  executeToolMethod,
43
- formatToolError,
44
49
  isToolExecutionControlError,
45
50
  toolResultFromError
46
- } from "./index-y2ctppmg.js";
51
+ } from "./index-qzbg46b6.js";
47
52
  import {
48
53
  getRequestContext,
49
54
  getTraceId,
50
55
  runWithRequestContext
51
- } from "./index-f24xg2cw.js";
56
+ } from "./index-ktsps64f.js";
52
57
  import {
53
58
  ManagedFileError
54
59
  } from "./index-bfcpjw20.js";
@@ -66,17 +71,19 @@ import {
66
71
  } from "./index-22by16v6.js";
67
72
  import"./index-cby4ar3v.js";
68
73
  import {
69
- defineContract,
70
74
  normalizeError,
71
75
  resolvePropagationContext
72
- } from "./index-pgsyp3xh.js";
76
+ } from "./index-bd17ytae.js";
73
77
  import {
74
- isRecord
75
- } from "./index-qyrqwr4c.js";
78
+ defineContract
79
+ } from "./index-vj3vvpaa.js";
76
80
  import {
77
81
  AppError,
78
82
  STITCH_ERROR_STATUS
79
83
  } from "./index-0w9abg87.js";
84
+ import {
85
+ isRecord
86
+ } from "./index-qyrqwr4c.js";
80
87
  import {
81
88
  ManagedFilePathSchema,
82
89
  ManagedFileRefSchema