stitchkit 0.134.0 → 0.134.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.
Files changed (120) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +6 -6
  3. package/dist/agent-executor/claude/cli-driver.d.ts +6 -0
  4. package/dist/agent-executor/claude/cli-driver.d.ts.map +1 -1
  5. package/dist/agent-executor/claude/session.d.ts +2 -0
  6. package/dist/agent-executor/claude/session.d.ts.map +1 -1
  7. package/dist/agent-executor/claude-sdk/driver.d.ts +9 -1
  8. package/dist/agent-executor/claude-sdk/driver.d.ts.map +1 -1
  9. package/dist/agent-executor/claude-sdk/engine-spawn.d.ts +18 -5
  10. package/dist/agent-executor/claude-sdk/engine-spawn.d.ts.map +1 -1
  11. package/dist/agent-executor/claude-sdk/probe.d.ts.map +1 -1
  12. package/dist/agent-executor/claude-sdk/query-manager.d.ts.map +1 -1
  13. package/dist/agent-executor/claude-sdk/query-options.d.ts +16 -0
  14. package/dist/agent-executor/claude-sdk/query-options.d.ts.map +1 -1
  15. package/dist/agent-executor/claude-sdk/session.d.ts +1 -0
  16. package/dist/agent-executor/claude-sdk/session.d.ts.map +1 -1
  17. package/dist/agent-runtime/harness-contract.d.ts +5 -5
  18. package/dist/agent-runtime/harness-contract.d.ts.map +1 -1
  19. package/dist/agent-runtime/runtime.d.ts +13 -13
  20. package/dist/agent-runtime/runtime.d.ts.map +1 -1
  21. package/dist/agent-runtime/sandbox-process-macos.d.ts +5 -4
  22. package/dist/agent-runtime/sandbox-process-macos.d.ts.map +1 -1
  23. package/dist/agent-runtime/sandbox-process-spec.d.ts +6 -0
  24. package/dist/agent-runtime/sandbox-process-spec.d.ts.map +1 -1
  25. package/dist/agent-runtime/sandbox-process-wrapper.d.ts +2 -1
  26. package/dist/agent-runtime/sandbox-process-wrapper.d.ts.map +1 -1
  27. package/dist/agent-runtime/sql-rows.d.ts +10 -10
  28. package/dist/agent-runtime/sqlite-schema.d.ts +2 -2
  29. package/dist/agent-runtime/sqlite.d.ts +1 -1
  30. package/dist/agent-runtime/store-conformance-lifecycle.d.ts +20 -20
  31. package/dist/agent-runtime/store-conformance-support.d.ts +10 -10
  32. package/dist/agent-runtime/terminal-commit.d.ts +10 -10
  33. package/dist/application/grammy.d.ts +1 -1
  34. package/dist/browser/contract-identity.d.ts +1 -1
  35. package/dist/browser/http-fetch.d.ts +1 -1
  36. package/dist/browser/socket-io-contract.d.ts +1 -1
  37. package/dist/contract/bridge-envelope.d.ts +1 -1
  38. package/dist/contract/client-types.d.ts +1 -1
  39. package/dist/contract/define.d.ts +2 -2
  40. package/dist/contract/errors-factory.d.ts +1 -1
  41. package/dist/contract/fingerprint.d.ts +1 -1
  42. package/dist/device-relay/hub.d.ts +1 -1
  43. package/dist/entrypoints/agent-executor/claude-sdk.js +323 -153
  44. package/dist/entrypoints/agent-executor/claude.js +40 -26
  45. package/dist/entrypoints/agent-runtime/postgres.js +3 -3
  46. package/dist/entrypoints/agent-runtime/sandbox.js +21 -16
  47. package/dist/entrypoints/agent-runtime/sqlite/bun.js +1 -1
  48. package/dist/entrypoints/agent-runtime/sqlite/node.js +1 -1
  49. package/dist/entrypoints/bin/upgrade-cli.js +1 -1
  50. package/dist/entrypoints/files/packaging.js +2 -2
  51. package/dist/entrypoints/handler.js +2 -2
  52. package/dist/entrypoints/node.js +2 -2
  53. package/dist/entrypoints/server.js +2 -2
  54. package/dist/entrypoints/tools/mcp.js +3 -3
  55. package/dist/entrypoints/tools/toolkit.js +3 -3
  56. package/dist/entrypoints/tools.js +2 -2
  57. package/dist/files/native-packaging-layout.d.ts +1 -1
  58. package/dist/{index-654rhe5d.js → index-7mjsb7zv.js} +5 -1
  59. package/dist/{index-kdw0n92g.js → index-a09r9ff0.js} +1 -1
  60. package/dist/{index-epyj7ptp.js → index-a84wj6y8.js} +4 -4
  61. package/dist/{index-qymek778.js → index-m2b49tvc.js} +76 -22
  62. package/dist/{index-mrng24wq.js → index-zag9sjpd.js} +1 -1
  63. package/dist/internal/postgres-query.d.ts +1 -1
  64. package/dist/react/query-client.d.ts +1 -1
  65. package/dist/server/bridge-host.d.ts +1 -1
  66. package/dist/server/bun.d.ts +1 -1
  67. package/dist/server/endpoint-dispatch.d.ts.map +1 -1
  68. package/dist/server/middleware/cors.d.ts +3 -3
  69. package/dist/server/middleware/cors.d.ts.map +1 -1
  70. package/dist/server/socket-io-config.d.ts +1 -1
  71. package/dist/service-host/identity.d.ts +1 -1
  72. package/dist/service-host/systemd-inspect.d.ts +1 -1
  73. package/dist/testing/manual-clock.d.ts +1 -1
  74. package/dist/tools/connections/types.d.ts +1 -1
  75. package/dist/tools/mcp/handler.d.ts +1 -1
  76. package/dist/tools/mcp/lazy-discovery.d.ts +1 -1
  77. package/dist/tools/mcp/mount.d.ts +1 -1
  78. package/dist/tools/mcp/stdio.d.ts +1 -1
  79. package/llms/agent-executor-claude-sdk.txt +1 -1
  80. package/llms/agent-executor-claude.txt +1 -1
  81. package/llms/agent-runtime-browser.txt +1 -1
  82. package/llms/agent-runtime-sandbox.txt +12 -8
  83. package/llms/agent-runtime-sqlite-bun.txt +1 -1
  84. package/llms/agent-runtime.2.txt +1 -1
  85. package/llms/agent-runtime.3.txt +4 -4
  86. package/llms/agent-runtime.txt +3 -3
  87. package/llms/application.2.txt +4 -4
  88. package/llms/application.txt +4 -4
  89. package/llms/cli.2.txt +27 -6
  90. package/llms/cli.txt +2 -2
  91. package/llms/contract.txt +1 -1
  92. package/llms/files-packaging.txt +1 -1
  93. package/llms/geo.txt +1 -1
  94. package/llms/live.txt +1 -1
  95. package/llms/oauth.txt +4 -4
  96. package/llms/observability.txt +3 -3
  97. package/llms/primitives.txt +1 -1
  98. package/llms/process.2.txt +7 -7
  99. package/llms/react.txt +4 -4
  100. package/llms/server.2.txt +7 -7
  101. package/llms/server.3.txt +5 -5
  102. package/llms/server.4.txt +6 -6
  103. package/llms/server.txt +13 -5
  104. package/llms/stitchkit.2.txt +3 -3
  105. package/llms/stitchkit.3.txt +1 -1
  106. package/llms/stitchkit.txt +4 -4
  107. package/llms/telegram.txt +1 -1
  108. package/llms/testing.txt +4 -4
  109. package/llms/tools-connections.txt +1 -1
  110. package/llms/tools-toolkit.txt +3 -1
  111. package/llms/tools.2.txt +6 -6
  112. package/llms/tools.3.txt +8 -8
  113. package/llms/upgrading-0.106.0-0.126.0.txt +1 -1
  114. package/llms/upgrading-0.128.0-0.134.0.txt +7 -1
  115. package/llms/upgrading-0.37.0-0.53.0.txt +7 -7
  116. package/llms/upgrading-0.69.0-0.95.0.txt +1 -1
  117. package/llms/upgrading-0.96.0-0.105.0.txt +1 -1
  118. package/llms-full.txt +163 -122
  119. package/llms.txt +8 -8
  120. package/package.json +1 -1
@@ -114,11 +114,6 @@ export declare function parseRunRow(value: unknown): {
114
114
  role: "assistant" | "summary" | "system" | "tool" | "user";
115
115
  status: "committed" | "completed" | "failed" | "interrupted" | "streaming" | "superseded";
116
116
  parts: ({
117
- type: "source";
118
- sourceId: string;
119
- url?: string | undefined;
120
- title?: string | undefined;
121
- } | {
122
117
  type: "text";
123
118
  text: string;
124
119
  provider?: {
@@ -134,11 +129,6 @@ export declare function parseRunRow(value: unknown): {
134
129
  provider: string;
135
130
  data: Record<string, z.JSONType>;
136
131
  } | undefined;
137
- } | {
138
- type: "file";
139
- mediaType: string;
140
- reference: string;
141
- filename?: string | undefined;
142
132
  } | {
143
133
  type: "tool-call";
144
134
  callId: string;
@@ -160,6 +150,16 @@ export declare function parseRunRow(value: unknown): {
160
150
  provider: string;
161
151
  data: Record<string, z.JSONType>;
162
152
  } | undefined;
153
+ } | {
154
+ type: "file";
155
+ mediaType: string;
156
+ reference: string;
157
+ filename?: string | undefined;
158
+ } | {
159
+ type: "source";
160
+ sourceId: string;
161
+ url?: string | undefined;
162
+ title?: string | undefined;
163
163
  } | {
164
164
  type: "tool-approval-request";
165
165
  approvalId: string;
@@ -1,7 +1,7 @@
1
1
  import { type SqliteDatabase } from '../internal/sqlite.js';
2
2
  /**
3
- * Create Stitchkit's schema without claiming an application's tables or SQLite user_version.
4
- * An orphaned partial Stitchkit schema is refused rather than destructively repaired.
3
+ * Create StitchKit's schema without claiming an application's tables or SQLite user_version.
4
+ * An orphaned partial StitchKit schema is refused rather than destructively repaired.
5
5
  */
6
6
  export declare function initializeAgentRuntimeSqlite(database: SqliteDatabase): void;
7
7
  //# sourceMappingURL=sqlite-schema.d.ts.map
@@ -5,7 +5,7 @@ import { createAgentRuntimeStore } from './store-create.js';
5
5
  export type { SqliteDatabase, SqliteStatement, SqliteValue } from '../internal/sqlite.js';
6
6
  export interface SqliteAgentRuntimeStoreConfig {
7
7
  database: SqliteDatabase;
8
- /** Create or validate Stitchkit's namespaced schema. Default true. */
8
+ /** Create or validate StitchKit's namespaced schema. Default true. */
9
9
  initialize?: boolean;
10
10
  }
11
11
  export interface SqliteAgentRuntimeStore {
@@ -131,6 +131,11 @@ export declare function fencingPhase(store: AgentRuntimeStore, conversationId: s
131
131
  role: "assistant" | "summary" | "system" | "tool" | "user";
132
132
  status: "committed" | "completed" | "failed" | "interrupted" | "streaming" | "superseded";
133
133
  parts: ({
134
+ type: "source";
135
+ sourceId: string;
136
+ url?: string | undefined;
137
+ title?: string | undefined;
138
+ } | {
134
139
  type: "text";
135
140
  text: string;
136
141
  provider?: {
@@ -146,6 +151,11 @@ export declare function fencingPhase(store: AgentRuntimeStore, conversationId: s
146
151
  provider: string;
147
152
  data: Record<string, import("zod").JSONType>;
148
153
  } | undefined;
154
+ } | {
155
+ type: "file";
156
+ mediaType: string;
157
+ reference: string;
158
+ filename?: string | undefined;
149
159
  } | {
150
160
  type: "tool-call";
151
161
  callId: string;
@@ -167,16 +177,6 @@ export declare function fencingPhase(store: AgentRuntimeStore, conversationId: s
167
177
  provider: string;
168
178
  data: Record<string, import("zod").JSONType>;
169
179
  } | undefined;
170
- } | {
171
- type: "file";
172
- mediaType: string;
173
- reference: string;
174
- filename?: string | undefined;
175
- } | {
176
- type: "source";
177
- sourceId: string;
178
- url?: string | undefined;
179
- title?: string | undefined;
180
180
  } | {
181
181
  type: "tool-approval-request";
182
182
  approvalId: string;
@@ -321,6 +321,11 @@ export declare function fencingPhase(store: AgentRuntimeStore, conversationId: s
321
321
  role: "assistant" | "summary" | "system" | "tool" | "user";
322
322
  status: "committed" | "completed" | "failed" | "interrupted" | "streaming" | "superseded";
323
323
  parts: ({
324
+ type: "source";
325
+ sourceId: string;
326
+ url?: string | undefined;
327
+ title?: string | undefined;
328
+ } | {
324
329
  type: "text";
325
330
  text: string;
326
331
  provider?: {
@@ -336,6 +341,11 @@ export declare function fencingPhase(store: AgentRuntimeStore, conversationId: s
336
341
  provider: string;
337
342
  data: Record<string, import("zod").JSONType>;
338
343
  } | undefined;
344
+ } | {
345
+ type: "file";
346
+ mediaType: string;
347
+ reference: string;
348
+ filename?: string | undefined;
339
349
  } | {
340
350
  type: "tool-call";
341
351
  callId: string;
@@ -357,16 +367,6 @@ export declare function fencingPhase(store: AgentRuntimeStore, conversationId: s
357
367
  provider: string;
358
368
  data: Record<string, import("zod").JSONType>;
359
369
  } | undefined;
360
- } | {
361
- type: "file";
362
- mediaType: string;
363
- reference: string;
364
- filename?: string | undefined;
365
- } | {
366
- type: "source";
367
- sourceId: string;
368
- url?: string | undefined;
369
- title?: string | undefined;
370
370
  } | {
371
371
  type: "tool-approval-request";
372
372
  approvalId: string;
@@ -6,11 +6,6 @@ export declare function userMessage(conversationId: string, id: string): {
6
6
  role: "assistant" | "summary" | "system" | "tool" | "user";
7
7
  status: "committed" | "completed" | "failed" | "interrupted" | "streaming" | "superseded";
8
8
  parts: ({
9
- type: "source";
10
- sourceId: string;
11
- url?: string | undefined;
12
- title?: string | undefined;
13
- } | {
14
9
  type: "text";
15
10
  text: string;
16
11
  provider?: {
@@ -26,11 +21,6 @@ export declare function userMessage(conversationId: string, id: string): {
26
21
  provider: string;
27
22
  data: Record<string, import("zod").JSONType>;
28
23
  } | undefined;
29
- } | {
30
- type: "file";
31
- mediaType: string;
32
- reference: string;
33
- filename?: string | undefined;
34
24
  } | {
35
25
  type: "tool-call";
36
26
  callId: string;
@@ -52,6 +42,16 @@ export declare function userMessage(conversationId: string, id: string): {
52
42
  provider: string;
53
43
  data: Record<string, import("zod").JSONType>;
54
44
  } | undefined;
45
+ } | {
46
+ type: "file";
47
+ mediaType: string;
48
+ reference: string;
49
+ filename?: string | undefined;
50
+ } | {
51
+ type: "source";
52
+ sourceId: string;
53
+ url?: string | undefined;
54
+ title?: string | undefined;
55
55
  } | {
56
56
  type: "tool-approval-request";
57
57
  approvalId: string;
@@ -46,16 +46,6 @@ export declare function appliedSnapshot(result: AgentStoreMutationResult, operat
46
46
  provider: string;
47
47
  data: Record<string, import("zod").JSONType>;
48
48
  } | undefined;
49
- } | {
50
- type: "file";
51
- mediaType: string;
52
- reference: string;
53
- filename?: string | undefined;
54
- } | {
55
- type: "source";
56
- sourceId: string;
57
- url?: string | undefined;
58
- title?: string | undefined;
59
49
  } | {
60
50
  type: "tool-call";
61
51
  callId: string;
@@ -77,6 +67,16 @@ export declare function appliedSnapshot(result: AgentStoreMutationResult, operat
77
67
  provider: string;
78
68
  data: Record<string, import("zod").JSONType>;
79
69
  } | undefined;
70
+ } | {
71
+ type: "file";
72
+ mediaType: string;
73
+ reference: string;
74
+ filename?: string | undefined;
75
+ } | {
76
+ type: "source";
77
+ sourceId: string;
78
+ url?: string | undefined;
79
+ title?: string | undefined;
80
80
  } | {
81
81
  type: "tool-approval-request";
82
82
  approvalId: string;
@@ -60,7 +60,7 @@ export declare class GrammyWebhookUnavailableError extends AppError<'GRAMMY_WEBH
60
60
  }
61
61
  /**
62
62
  * Create a managed admission gate around an injected grammY webhook bot.
63
- * HTTP parsing, webhook hosting and Telegram payload persistence remain outside Stitchkit.
63
+ * HTTP parsing, webhook hosting and Telegram payload persistence remain outside StitchKit.
64
64
  */
65
65
  export declare function createGrammyWebhookResource<C extends Context>(config: GrammyWebhookResourceConfig<C>): GrammyWebhookResource<C>;
66
66
  //# sourceMappingURL=grammy.d.ts.map
@@ -13,7 +13,7 @@ export interface ContractIdentity {
13
13
  }
14
14
  /**
15
15
  * Read the server's contract fingerprint in one call and return it beside the
16
- * client's own. A difference is a value to act on, never a throw: Stitchkit
16
+ * client's own. A difference is a value to act on, never a throw: StitchKit
17
17
  * computes both identities and the application decides what a mismatch means.
18
18
  * A failure to reach the server at all still rejects, as any call does.
19
19
  */
@@ -18,7 +18,7 @@ export declare function createRetryAwareFetch(transportFetch: ClientFetch, unix?
18
18
  /**
19
19
  * Query parameters as a serialized search string; `undefined` drops a key, an
20
20
  * array repeats it. Serializes here (rather than returning `URLSearchParams`)
21
- * so neither Stitchkit nor Ky reads `URLSearchParams.prototype.size`, which
21
+ * so neither StitchKit nor Ky reads `URLSearchParams.prototype.size`, which
22
22
  * polyfills such as `react-native-url-polyfill` omit (`undefined`).
23
23
  */
24
24
  export declare function searchParamsOf(params: Record<string, ParamValue | ParamArrayValue>): string | undefined;
@@ -165,7 +165,7 @@ export interface SocketIOClient<TServerEvents extends SocketEventMap, TClientEve
165
165
  */
166
166
  onConnectionChange(listener: (connected: boolean, reason?: string) => void): () => void;
167
167
  }
168
- /** Minimal Stitchkit client transport required by a validated realtime binding. */
168
+ /** Minimal StitchKit client transport required by a validated realtime binding. */
169
169
  export interface RealtimeClient<TServerToClient extends RealtimeEventRegistry, TClientToServer extends RealtimeEventRegistry> extends BoundRealtimeClient<TServerToClient, TClientToServer> {
170
170
  connect(): void;
171
171
  disconnect(): void;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Wire envelope for the `postMessage` bridge carrying Fetch `Request` and
3
- * `Response` frames between a WebView / DOM window and a Stitchkit handler host.
3
+ * `Response` frames between a WebView / DOM window and a StitchKit handler host.
4
4
  *
5
5
  * Textual payloads in one frame only in v1: binary bodies, streaming responses
6
6
  * and bytes that are not UTF-8 — under a text type or none — are refused
@@ -99,7 +99,7 @@ export interface ClientRequestOptions {
99
99
  timeout?: number;
100
100
  /**
101
101
  * Propagate the remaining relative timeout budget in `x-stitchkit-timeout-ms` so downstream
102
- * Stitchkit servers can bound admission waits and nested hops. Defaults to `true` when per-call
102
+ * StitchKit servers can bound admission waits and nested hops. Defaults to `true` when per-call
103
103
  * `timeout` is given, otherwise inherits the client's `propagateDeadline` setting (`false` by default).
104
104
  */
105
105
  propagateDeadline?: boolean;
@@ -19,7 +19,7 @@ export interface EndpointResponseMeta {
19
19
  export interface ResponseMetadata {
20
20
  headers: Headers;
21
21
  }
22
- /** Whether the wire carries Stitchkit protocol envelopes or schema-owned items. */
22
+ /** Whether the wire carries StitchKit protocol envelopes or schema-owned items. */
23
23
  export type ContractStreamFraming = 'envelope' | 'item';
24
24
  /** What conclusively completes one contract-first stream operation. */
25
25
  export type ContractStreamCompletion = 'stream-end' | 'terminal';
@@ -61,7 +61,7 @@ export type EndpointStreamDescriptor<TItem extends ZodType = ZodType> = (Endpoin
61
61
  /** Default `envelope`: `data` / safe `error` / `end` protocol frames. */
62
62
  framing?: 'envelope';
63
63
  } & (StreamEndCompletion | TerminalItemCompletion)) | (EndpointStreamDescriptorBase<TItem> & {
64
- /** Schema-owned NDJSON frames with no Stitchkit protocol envelope. */
64
+ /** Schema-owned NDJSON frames with no StitchKit protocol envelope. */
65
65
  framing: 'item';
66
66
  format?: 'ndjson';
67
67
  finalLine?: StreamFinalLinePolicy;
@@ -115,7 +115,7 @@ export type FrozenErrorDefinitions<TDefinitions extends ErrorDefinitions> = {
115
115
  /** The union of an application's declared error codes. */
116
116
  export type ErrorVocabularyCode<TDefinitions extends ErrorDefinitions> = Extract<keyof TDefinitions, string>;
117
117
  export type ErrorVocabularyMapping<TDefinitions extends ErrorDefinitions> = {
118
- /** Require an explicit application code for every Stitchkit code. */
118
+ /** Require an explicit application code for every StitchKit code. */
119
119
  exhaustive: true;
120
120
  map: Record<StitchErrorCode, ErrorVocabularyCode<TDefinitions>>;
121
121
  fallback?: never;
@@ -47,7 +47,7 @@ export interface FingerprintedOperation {
47
47
  export declare function fingerprintOperations(operations: Iterable<FingerprintedOperation>): ContractFingerprint;
48
48
  /**
49
49
  * The fingerprint of the operations a client of these contracts can call —
50
- * every endpoint HTTP carries. Stitchkit computes it; what a difference means
50
+ * every endpoint HTTP carries. StitchKit computes it; what a difference means
51
51
  * is the application's decision.
52
52
  */
53
53
  export declare function contractFingerprint(contracts: ContractDef<Record<string, EndpointDef>, string> | readonly ContractDef<Record<string, EndpointDef>, string>[]): ContractFingerprint;
@@ -112,6 +112,6 @@ export interface DeviceRelayHub<TIdentity = unknown> {
112
112
  sweepExpiredLeases(): Promise<void>;
113
113
  close(): Promise<void>;
114
114
  }
115
- /** Create a backend User Device Relay hub over existing Stitchkit realtime connections. */
115
+ /** Create a backend User Device Relay hub over existing StitchKit realtime connections. */
116
116
  export declare function createDeviceRelayHub<TIdentity = unknown>(config: DeviceRelayHubConfig<TIdentity>): DeviceRelayHub<TIdentity>;
117
117
  //# sourceMappingURL=hub.d.ts.map