stitchkit 0.106.1 → 0.108.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 +151 -0
- package/README.md +2 -0
- package/darwin-native.cjs +17 -4
- package/dist/agent-runtime/deferred-tool-types.d.ts +6 -27
- package/dist/agent-runtime/deferred-tool-types.d.ts.map +1 -1
- package/dist/browser/stream.d.ts +38 -12
- package/dist/browser/stream.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime/browser.js +2 -3
- package/dist/entrypoints/agent-runtime/coding-tools.js +6 -8
- package/dist/entrypoints/agent-runtime/harness.js +7 -11
- package/dist/entrypoints/agent-runtime/realtime.js +2 -3
- package/dist/entrypoints/agent-runtime/sandbox.js +6 -8
- package/dist/entrypoints/agent-runtime.d.ts +2 -1
- package/dist/entrypoints/agent-runtime.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime.js +20 -23
- package/dist/entrypoints/application/diagnostic-journal.js +3 -3
- package/dist/entrypoints/application/directory-inbox.js +8 -9
- package/dist/entrypoints/application/grammy.js +3 -3
- package/dist/entrypoints/application.js +7 -8
- package/dist/entrypoints/bin/upgrade-cli.d.ts +32 -0
- package/dist/entrypoints/bin/upgrade-cli.d.ts.map +1 -1
- package/dist/entrypoints/bin/upgrade-cli.js +451 -8
- package/dist/entrypoints/cli/publish.js +10 -11
- package/dist/entrypoints/cli.js +12 -16
- package/dist/entrypoints/contract.js +1 -1
- package/dist/entrypoints/files/packaging.d.ts +3 -1
- package/dist/entrypoints/files/packaging.d.ts.map +1 -1
- package/dist/entrypoints/files/packaging.js +171 -55
- package/dist/entrypoints/files.js +16 -16
- package/dist/entrypoints/index.d.ts +1 -1
- package/dist/entrypoints/index.d.ts.map +1 -1
- package/dist/entrypoints/index.js +47 -41
- package/dist/entrypoints/node.js +27 -29
- package/dist/entrypoints/observability.js +10 -12
- package/dist/entrypoints/process.js +2 -2
- package/dist/entrypoints/react.js +3 -4
- package/dist/entrypoints/remote.js +8 -9
- package/dist/entrypoints/server.js +48 -51
- package/dist/entrypoints/telegram/html.js +3 -3
- package/dist/entrypoints/telegram/screens.js +6 -6
- package/dist/entrypoints/telegram.d.ts +2 -0
- package/dist/entrypoints/telegram.d.ts.map +1 -1
- package/dist/entrypoints/telegram.js +344 -11
- package/dist/entrypoints/testing.d.ts +1 -0
- package/dist/entrypoints/testing.d.ts.map +1 -1
- package/dist/entrypoints/testing.js +138 -11
- package/dist/entrypoints/tools/connections.js +11 -11
- package/dist/entrypoints/tools/invoker.js +5 -9
- package/dist/entrypoints/tools/mcp.js +8 -14
- package/dist/entrypoints/tools.js +19 -25
- package/dist/entrypoints/tracking.js +3 -3
- package/dist/files/native-artifact.d.ts +14 -0
- package/dist/files/native-artifact.d.ts.map +1 -0
- package/dist/files/native-packaging-layout.d.ts +11 -2
- package/dist/files/native-packaging-layout.d.ts.map +1 -1
- package/dist/files/native-packaging-plugin.d.ts +53 -0
- package/dist/files/native-packaging-plugin.d.ts.map +1 -0
- package/dist/files/native-packaging.d.ts +44 -43
- package/dist/files/native-packaging.d.ts.map +1 -1
- package/dist/{index-v5ee8ath.js → index-1h2zv8rx.js} +10 -40
- package/dist/index-2kbysk9s.js +42 -0
- package/dist/{index-wbhdzxar.js → index-2s6fpehp.js} +5 -5
- package/dist/{index-ksfagmyz.js → index-4qh90tyw.js} +8 -8
- package/dist/{index-yvfk3y36.js → index-636mggad.js} +4 -3
- package/dist/{index-f199nfq5.js → index-6y9t2fwz.js} +7 -7
- package/dist/{index-w8etpm8j.js → index-9j2atjte.js} +1 -1
- package/dist/index-a5qr2rj6.js +26 -0
- package/dist/{index-azx12jgv.js → index-bh2ht9y5.js} +13 -7
- package/dist/{index-pz3y6b6g.js → index-cx2nh595.js} +3 -3
- package/dist/{index-2k91mewf.js → index-dm2fv45z.js} +9 -9
- package/dist/{index-9bskshe3.js → index-dwf0gymy.js} +10 -10
- package/dist/{index-qaqbdm7s.js → index-h7qms8f9.js} +8 -8
- package/dist/{index-drs41arz.js → index-ktjmgq9p.js} +1 -1
- package/dist/{index-916yh4e2.js → index-mep4sb48.js} +14 -14
- package/dist/{index-wdy68sh6.js → index-njs9gvrh.js} +17 -17
- package/dist/{index-1ptj98e0.js → index-nx49x0tw.js} +2 -2
- package/dist/{index-1pwwan01.js → index-p5kx5vqd.js} +214 -59
- package/dist/{index-sj28htvf.js → index-pvh3z03x.js} +1 -1
- package/dist/{index-r393tnfp.js → index-q6crhe1n.js} +4 -4
- package/dist/{index-dsnjzb62.js → index-t2bsd0hm.js} +1 -1
- package/dist/{index-4vsby8n8.js → index-w9mqgnz9.js} +1 -1
- package/dist/{index-z23rfxhj.js → index-xmgjtkvr.js} +1 -1
- package/dist/{index-e05cjgtf.js → index-xvj9h8yh.js} +28 -1
- package/dist/{index-gr5g3xfw.js → index-yz8x0hbx.js} +1 -1
- package/dist/{index-gxm9rc97.js → index-zrtrjkbf.js} +1 -1
- package/dist/internal/bounded-lines.d.ts +46 -2
- package/dist/internal/bounded-lines.d.ts.map +1 -1
- package/dist/internal/darwin-binding-error.d.ts +9 -1
- package/dist/internal/darwin-binding-error.d.ts.map +1 -1
- package/dist/internal/darwin-binding.d.ts.map +1 -1
- package/dist/internal/process-identity.d.ts.map +1 -1
- package/dist/internal/until-aborted.d.ts +9 -0
- package/dist/internal/until-aborted.d.ts.map +1 -0
- package/dist/internal/upgrade-affects.d.ts +58 -0
- package/dist/internal/upgrade-affects.d.ts.map +1 -0
- package/dist/internal/upgrade-plan.d.ts +20 -0
- package/dist/internal/upgrade-plan.d.ts.map +1 -1
- package/dist/internal/upgrade-usage.d.ts +61 -0
- package/dist/internal/upgrade-usage.d.ts.map +1 -0
- package/dist/telegram/bot-api.d.ts +10 -4
- package/dist/telegram/bot-api.d.ts.map +1 -1
- package/dist/telegram/broadcast.d.ts +2 -1
- package/dist/telegram/broadcast.d.ts.map +1 -1
- package/dist/telegram/not-dispatched.d.ts +26 -0
- package/dist/telegram/not-dispatched.d.ts.map +1 -0
- package/dist/telegram/operator-channel.d.ts +2 -1
- package/dist/telegram/operator-channel.d.ts.map +1 -1
- package/dist/telegram/send-failure.d.ts +4 -3
- package/dist/telegram/send-failure.d.ts.map +1 -1
- package/dist/telegram/transport-connect.d.ts +38 -0
- package/dist/telegram/transport-connect.d.ts.map +1 -0
- package/dist/telegram/transport.d.ts +43 -0
- package/dist/telegram/transport.d.ts.map +1 -0
- package/dist/telegram/webhook.d.ts +2 -1
- package/dist/telegram/webhook.d.ts.map +1 -1
- package/dist/testing/manual-clock.d.ts +82 -0
- package/dist/testing/manual-clock.d.ts.map +1 -0
- package/dist/tools/internal/surface-projector.d.ts +0 -7
- package/dist/tools/internal/surface-projector.d.ts.map +1 -1
- package/dist/tools/runtime-tool-declaration.d.ts +11 -0
- package/dist/tools/runtime-tool-declaration.d.ts.map +1 -1
- package/dist/tools/runtime-tool.d.ts +2 -3
- package/dist/tools/runtime-tool.d.ts.map +1 -1
- package/llms/files-packaging.txt +13 -6
- package/llms/process.txt +71 -15
- package/llms/stitchkit.2.txt +211 -628
- package/llms/stitchkit.txt +635 -10
- package/llms/telegram.txt +36 -3
- package/llms/testing.txt +47 -0
- package/llms/{upgrading-0.96.0-0.106.0.txt → upgrading-0.100.0-0.108.0.txt} +112 -144
- package/llms/{upgrading-0.37.0-0.53.0.txt → upgrading-0.37.0-0.58.0.txt} +209 -3
- package/llms/{upgrading-0.55.0-0.68.0.txt → upgrading-0.59.0-0.71.0.txt} +149 -209
- package/llms/{upgrading-0.69.0-0.95.0.txt → upgrading-0.72.0-0.99.0.txt} +137 -149
- package/llms/upgrading.txt +36 -4
- package/llms-full.txt +360 -39
- package/llms.txt +10 -10
- package/package.json +2 -1
- package/llms/stitchkit.3.txt +0 -177
- package/dist/{index-cazts87s.js → index-07dcf2yn.js} +3 -3
- package/dist/{index-n1nszyk0.js → index-7jvwrjqa.js} +3 -3
- package/dist/{index-cmzvhhtd.js → index-85qve8mq.js} +3 -3
- package/dist/{index-rpzewktb.js → index-fynr93w4.js} +3 -3
- package/dist/{index-37asdw3a.js → index-k7qdkh3n.js} +3 -3
- package/dist/{index-x7w1z6pf.js → index-q4hjtyye.js} +4 -4
- package/dist/{index-7n68nmc6.js → index-y3nemndz.js} +3 -3
- package/dist/{index-12zsej7b.js → index-y70v24cw.js} +3 -3
- package/dist/{index-pzb63z66.js → index-ykdcnq1f.js} +3 -3
|
@@ -23,13 +23,6 @@ export interface SurfaceRuntimeToolDefinition {
|
|
|
23
23
|
ui?: EndpointUiMeta;
|
|
24
24
|
mcp?: EndpointMcpPolicy;
|
|
25
25
|
}
|
|
26
|
-
/** Peer-free executable shape accepted by Agent-only composition entrypoints. */
|
|
27
|
-
export interface SurfaceAgentRuntimeToolDefinition extends SurfaceRuntimeToolDefinition {
|
|
28
|
-
handler: unknown;
|
|
29
|
-
present?: {
|
|
30
|
-
agent?: unknown;
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
26
|
/** One peer-free structural extension shared by executable mounts and projections. */
|
|
34
27
|
export interface SurfaceToolExtension<TContext extends Record<string, unknown> = Record<string, unknown>> {
|
|
35
28
|
schema: Record<string, ZodType>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"surface-projector.d.ts","sourceRoot":"","sources":["../../../src/tools/internal/surface-projector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,OAAO,EAAK,MAAM,KAAK,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,KAAK,EACV,iBAAiB,EACjB,uBAAuB,EACvB,cAAc,EACf,MAAM,6BAA6B,CAAC;AAErC,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAG9E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAUhE;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE;QACR,WAAW,EAAE,MAAM,CAAC;QACpB,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,UAAU,CAAC;QACnB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAChC,CAAC;IACF,KAAK,EAAE,SAAS,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,SAAS,aAAa,EAAE,CAAC;IACtC,WAAW,CAAC,EAAE,uBAAuB,CAAC;IACtC,EAAE,CAAC,EAAE,cAAc,CAAC;IACpB,GAAG,CAAC,EAAE,iBAAiB,CAAC;CACzB;AAED,
|
|
1
|
+
{"version":3,"file":"surface-projector.d.ts","sourceRoot":"","sources":["../../../src/tools/internal/surface-projector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,OAAO,EAAK,MAAM,KAAK,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,KAAK,EACV,iBAAiB,EACjB,uBAAuB,EACvB,cAAc,EACf,MAAM,6BAA6B,CAAC;AAErC,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAG9E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAUhE;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE;QACR,WAAW,EAAE,MAAM,CAAC;QACpB,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,UAAU,CAAC;QACnB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,M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,CAAC,KAAK,EAC5C,KAAK,EAAE,SAAS,sBAAsB,CAAC,KAAK,CAAC,EAAE,EAC/C,MAAM,GAAE,8BAAmC,GAC1C,wBAAwB,CAAC,KAAK,CAAC,EAAE,CA8GnC"}
|
|
@@ -84,5 +84,16 @@ export type RuntimeToolDefinition = (Omit<RuntimeToolDefinitionWithOutput<ZodObj
|
|
|
84
84
|
}) | (Omit<RuntimeToolDefinitionWithoutOutput<ZodObject, EndpointMcpPolicy | undefined>, 'handler'> & {
|
|
85
85
|
handler(context: RegisteredHandlerContext): void | Promise<void>;
|
|
86
86
|
});
|
|
87
|
+
/**
|
|
88
|
+
* The peer-free executable shape the Agent-only entrypoints accept (the deferred catalog,
|
|
89
|
+
* `executableAgentRuntimeTools`). `present` is open like `RuntimeToolDefinition`'s, so a
|
|
90
|
+
* registered list is a catalog without a cast; construction validates the Agent presenter
|
|
91
|
+
* (a function, with an `output` schema).
|
|
92
|
+
*/
|
|
93
|
+
export interface DeferredAgentRuntimeToolDefinition extends RuntimeToolDefinitionBase<ZodObject, EndpointMcpPolicy | undefined> {
|
|
94
|
+
output?: ZodType;
|
|
95
|
+
handler: unknown;
|
|
96
|
+
present?: unknown;
|
|
97
|
+
}
|
|
87
98
|
export {};
|
|
88
99
|
//# sourceMappingURL=runtime-tool-declaration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-tool-declaration.d.ts","sourceRoot":"","sources":["../../src/tools/runtime-tool-declaration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAClF,OAAO,KAAK,EACV,iBAAiB,EACjB,uBAAuB,EACvB,cAAc,EACf,MAAM,0BAA0B,C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AAO,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;IACpD,OAAO,CAAC,EAAE,QAAQ,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,kCAAkC,CACjD,MAAM,SAAS,SAAS,EACxB,IAAI,SAAS,iBAAiB,GAAG,SAAS,GAAG,SAAS,CACtD,SAAQ,yBAAyB,CAAC,MAAM,EAAE,IAAI,CAAC;IAC/C,MAAM,CAAC,EAAE,KAAK,CAAC;IACf,OAAO,EAAE,CAAC,OAAO,EAAE,yBAAyB,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpF,OAAO,CAAC,EAAE,KAAK,CAAC;CACjB;AAED;;GAEG;AACH,KAAK,wBAAwB,GAAG,yBAAyB,CACvD,SAAS,EACT,iBAAiB,GAAG,SAAS,CAC9B,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,qBAAqB,GAC7B,CAAC,IAAI,CACH,+BAA+B,CAC7B,SAAS,EACT,OAAO,EACP,iBAAiB,GAAG,SAAS,EAC7B,OAAO,CACR,EACD,SAAS,CACV,GAAG;IACF,OAAO,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC;CACrD,CAAC,GACF,CAAC,IAAI,CACH,kCAAkC,CAAC,SAAS,EAAE,iBAAiB,GAAG,SAAS,CAAC,EAC5E,SAAS,CACV,GAAG;IACF,OAAO,CAAC,OAAO,EAAE,wBAAwB,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAClE,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"runtime-tool-declaration.d.ts","sourceRoot":"","sources":["../../src/tools/runtime-tool-declaration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,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,SAAS,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAC3E,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"}
|
|
@@ -2,9 +2,8 @@ import type { Tool } from 'ai';
|
|
|
2
2
|
import type { ZodObject, ZodType, z } from 'zod';
|
|
3
3
|
import type { HttpMethod } from '../contract/define.js';
|
|
4
4
|
import type { EndpointMcpPolicy } from '../contract/tool-options.js';
|
|
5
|
-
import { type SurfaceAgentRuntimeToolDefinition } from './internal/surface-projector.js';
|
|
6
5
|
import type { MountableTool } from './mount.js';
|
|
7
|
-
import type { RuntimeToolDefinition, RuntimeToolDefinitionWithOutput, RuntimeToolDefinitionWithoutOutput, RuntimeToolFactoryHandlerContext } from './runtime-tool-declaration.js';
|
|
6
|
+
import type { DeferredAgentRuntimeToolDefinition, RuntimeToolDefinition, RuntimeToolDefinitionWithOutput, RuntimeToolDefinitionWithoutOutput, RuntimeToolFactoryHandlerContext } from './runtime-tool-declaration.js';
|
|
8
7
|
import type { RuntimeMcpToolPresenters } from './runtime-tool-mcp.js';
|
|
9
8
|
export type { RuntimeMcpInput, RuntimeToolDefinition, RuntimeToolDefinitionBase, RuntimeToolDefinitionWithOutput, RuntimeToolDefinitionWithoutOutput, RuntimeToolFactoryHandlerContext, RuntimeToolHandlerContext, RuntimeToolIdentity, RuntimeToolOutput, } from './runtime-tool-declaration.js';
|
|
10
9
|
export type { RuntimeMcpPresentation } from './runtime-tool-mcp.js';
|
|
@@ -54,5 +53,5 @@ export declare function runtimeToolMountable(definition: RuntimeToolDefinition,
|
|
|
54
53
|
* the richer internal definition consumed by the canonical mount. A named cast
|
|
55
54
|
* boundary (ADR 0003): the checks above are what make the cast true.
|
|
56
55
|
*/
|
|
57
|
-
export declare function executableAgentRuntimeTools(tools: readonly
|
|
56
|
+
export declare function executableAgentRuntimeTools(tools: readonly DeferredAgentRuntimeToolDefinition[]): readonly RuntimeToolDefinition[];
|
|
58
57
|
//# sourceMappingURL=runtime-tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-tool.d.ts","sourceRoot":"","sources":["../../src/tools/runtime-tool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;AAC/B,OAAO,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"runtime-tool.d.ts","sourceRoot":"","sources":["../../src/tools/runtime-tool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;AAC/B,OAAO,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAKlE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,EACV,kCAAkC,EAClC,qBAAqB,EACrB,+BAA+B,EAC/B,kCAAkC,EAClC,gCAAgC,EAGjC,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAEnE,YAAY,EACV,eAAe,EACf,qBAAqB,EACrB,yBAAyB,EACzB,+BAA+B,EAC/B,kCAAkC,EAClC,gCAAgC,EAChC,yBAAyB,EACzB,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,4BAA4B,CAAC;AACpC,YAAY,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAEjE,MAAM,MAAM,uB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,OAAO,CAAC,CAAC,CACzC,GACA,+BAA+B,CAChC,MAAM,EACN,OAAO,EACP,IAAI,EACJ,qBAAqB,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CACzC,CAAC;AACF,wBAAgB,iBAAiB,CAC/B,MAAM,SAAS,SAAS,EACxB,KAAK,CAAC,IAAI,SAAS,iBAAiB,GAAG,SAAS,GAAG,SAAS,EAE5D,UAAU,EAAE,kCAAkC,CAAC,MAAM,EAAE,IAAI,CAAC,GAC3D,kCAAkC,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AAQpD;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,SAAS,SAAS,EACjE,MAAM,EAAE,wBAAwB,CAAC,QAAQ,CAAC,GACzC,kBAAkB,CAAC,QAAQ,CAAC,CAiE9B;AAED,KAAK,cAAc,GAAG,CACpB,MAAM,EAAE,OAAO,KACZ,uBAAuB,GAAG,WAAW,CAAC,uBAAuB,CAAC,CAAC;AAYpE,8DAA8D;AAC9D,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,qBAAqB,GAChC,cAAc,GAAG,SAAS,CAG5B;AAiBD,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,qBAAqB,EACjC,UAAU,UAAO,GAChB,aAAa,CAef;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,SAAS,kCAAkC,EAAE,GACnD,SAAS,qBAAqB,EAAE,CAgBlC"}
|
package/llms/files-packaging.txt
CHANGED
|
@@ -15,13 +15,19 @@ Also read:
|
|
|
15
15
|
## `stitchkit/files/packaging`
|
|
16
16
|
|
|
17
17
|
`stitchkit/files/packaging` owns `createNativePackaging` and the types
|
|
18
|
-
`NativePackagingOptions`, `NativePackagingAsset`, `NativePackagingPlugin`, `NativePackagingResult
|
|
18
|
+
`NativePackagingOptions`, `NativePackagingAsset`, `NativePackagingPlugin`, `NativePackagingResult`,
|
|
19
|
+
and for a standalone executable `NativePackagingEmbeddedOptions`, `NativePackagingEmbeddedAsset`,
|
|
20
|
+
`NativePackagingEmbeddedResult`. `inspectNativeArtifact` classifies a built artifact's bytes by the
|
|
21
|
+
loader it carries as a `NativeArtifactLoader`: `packaged`, `unpackaged` or `no-loader`. The plugin
|
|
22
|
+
fails a build whose entry imports the default loader of another `stitchkit` installation, naming
|
|
23
|
+
both versions and roots.
|
|
19
24
|
It resolves the installed package's target/version, reads each selected addon once and checks it
|
|
20
25
|
against the `size` and `sha256` published in the package's `native-assets.json` (`formatVersion: 2`,
|
|
21
26
|
written when Stitchkit is built). Call it once per build and reuse the result.
|
|
22
|
-
`platform`, `architecture`, `delivery`, `entryPath` and `assetPath` are explicit
|
|
23
|
-
|
|
24
|
-
|
|
27
|
+
`platform`, `architecture`, `delivery`, `entryPath` and `assetPath` are the explicit inputs of
|
|
28
|
+
companion delivery; embedded delivery takes `platform`, one `architecture` and `delivery` only, and
|
|
29
|
+
refuses a path. `assetPath` accepts one template, `[hash]`, replaced by the first 16 hex digits of
|
|
30
|
+
the addon's published SHA256;
|
|
25
31
|
`platform` is the closed set `'darwin'`, and another name is a type error and a schema refusal.
|
|
26
32
|
The result is `ready` with verified assets and a structural Bun plugin, or `unsupported` /
|
|
27
33
|
`missing` / `mismatch` with the safe code `NATIVE_TARGET_UNSUPPORTED`, `NATIVE_ASSET_MISSING` or
|
|
@@ -38,7 +44,8 @@ and the published `size` and `sha256`.
|
|
|
38
44
|
Targets must be unique; entry and all asset paths must be disjoint. One lazy loader chooses only
|
|
39
45
|
the actual runtime architecture, with no fallback.
|
|
40
46
|
Companion mode places external addons relative to the emitted entry; embedded mode gives
|
|
41
|
-
Bun compile the verified bytes of the matching addon
|
|
42
|
-
|
|
47
|
+
Bun compile the verified bytes of the matching addon, and its asset (`bytes`, `size`, `sha256`)
|
|
48
|
+
has no `outputPath`, because nothing is written beside the executable. Keep companion JS builds
|
|
49
|
+
without splitting, preserve every output, and write each asset's `bytes` to its `outputPath`.
|
|
43
50
|
This evolving entrypoint is a build dependency; runtime imports do not reach it.
|
|
44
51
|
The detailed recipe is in [native IO](../guide/native-io.md#public-native-packaging).
|
package/llms/process.txt
CHANGED
|
@@ -443,23 +443,55 @@ version: carry their reachable relative `.d.ts` closure, rather than emitting re
|
|
|
443
443
|
instead emit declarations for only that DTO contract. Keep the library's manifest at runtime
|
|
444
444
|
`dependencies: {}` and `peerDependencies: { zod: ... }` when that is its declared promise.
|
|
445
445
|
|
|
446
|
-
The packaged Darwin loader
|
|
447
|
-
never follows it: bundling `stitchkit/server`,
|
|
448
|
-
the same single JS file on every operating
|
|
449
|
-
`bun build --outfile` works
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
plugin of the next section; it is the only way
|
|
446
|
+
The packaged Darwin loader computes its addon path at run time from its own file
|
|
447
|
+
(`module.filename`), so a bundler never follows it: bundling `stitchkit/server`,
|
|
448
|
+
`stitchkit/files` or `stitchkit/process` yields the same single JS file on every operating
|
|
449
|
+
system, with no `.node` output, `bun build --outfile` works, and no path of the build machine
|
|
450
|
+
becomes a literal of the artifact. A bundle has no installed package beside it, so without the
|
|
451
|
+
packaging plugin it never loads the addon: the first call that needs it reports the Darwin backend
|
|
452
|
+
`unavailable` with stage `packaging`, and the message names `createNativePackaging`. An artifact
|
|
453
|
+
that must carry the Darwin addon uses the packaging plugin of the next section; it is the only way
|
|
454
|
+
a static loader enters a bundle.
|
|
455
|
+
|
|
456
|
+
Only these calls load the addon, and only on macOS: process identity (`observeProcessInstance`
|
|
457
|
+
and `probeProcessOwner`), every exclusive lock (`withExclusiveLock` and what is built on it, such
|
|
458
|
+
as the file state store and the diagnostic journal) and the contained file operations of the Agent
|
|
459
|
+
coding tools. Without the addon a lock still works, but it cannot record or check its owner's
|
|
460
|
+
identity, so a lock held by a crashed owner is not reclaimed. The managed file boundary
|
|
461
|
+
(`createManagedFileBoundary` and the transfer tools built on it), atomic writes and the chunk
|
|
462
|
+
spool never load it, on any operating system. The package is free of import side effects
|
|
463
|
+
(`sideEffects: false`), so a bundle that imports only those parts carries no Darwin loader at all.
|
|
464
|
+
|
|
465
|
+
Check an artifact by its loader, never by whether it holds `.node` bytes: Bun can copy the addon
|
|
466
|
+
into a compiled executable even without the plugin, and the unpackaged loader does not use it.
|
|
467
|
+
`inspectNativeArtifact(bytes)` from `stitchkit/files/packaging` reads the marker every generated
|
|
468
|
+
loader carries and answers `packaged` (the plugin's static loader is inside), `unpackaged` (the
|
|
469
|
+
default loader is inside, and every call above refuses on macOS) or `no-loader` (nothing in the
|
|
470
|
+
artifact loads the addon). It reads both latin1 and UTF-16LE, because Bun stores source text with
|
|
471
|
+
non-ASCII characters as UTF-16, and it does not mistake the `STITCHKIT_NATIVE_NOT_PACKAGED` error
|
|
472
|
+
code, which every bundle with a lock carries, for a loader. Artifacts built by 0.107.0 or earlier
|
|
473
|
+
carry no marker and read `no-loader`.
|
|
474
|
+
|
|
475
|
+
```ts
|
|
476
|
+
import { inspectNativeArtifact } from 'stitchkit/files/packaging'
|
|
477
|
+
|
|
478
|
+
const loader = inspectNativeArtifact(await Bun.file('dist/cli').bytes())
|
|
479
|
+
if (loader === 'unpackaged') throw new Error('dist/cli was built without native packaging')
|
|
480
|
+
```
|
|
454
481
|
|
|
455
482
|
```sh
|
|
456
483
|
bun build src/native.ts --target=bun --minify --outfile=dist/native.js
|
|
457
484
|
```
|
|
458
485
|
|
|
486
|
+
That plain build serves Linux and the parts that never load the addon. A library whose consumers
|
|
487
|
+
take locks or read process identity on macOS builds each native entry with the companion plugin of
|
|
488
|
+
the next section (one entry per build, `naming.entry` equal to `entryPath`) and ships the addon it
|
|
489
|
+
writes beside the entries.
|
|
490
|
+
|
|
459
491
|
Qualify the complete output outside its build tree and installed dependency graph. Test process
|
|
460
492
|
identity, live-owner refusal, dead-owner recovery and contained file operations in artifacts built
|
|
461
493
|
with the packaging plugin, and check that an unpackaged build reports the backend `unavailable`
|
|
462
|
-
rather than certifying a dead owner. Bun and Node package imports retain the same
|
|
494
|
+
with stage `packaging` rather than certifying a dead owner. Bun and Node package imports retain the same
|
|
463
495
|
lazy loader; importing a portable leaf does not load a Darwin addon on another OS. Test
|
|
464
496
|
declarations too, and check that importing an unbundled Stitchkit leaf fails in a deliberately
|
|
465
497
|
isolated library distribution. A separate schema-only entry must not import the native entry.
|
|
@@ -467,7 +499,9 @@ isolated library distribution. A separate schema-only entry must not import the
|
|
|
467
499
|
If the Darwin backend cannot load, `observeProcessInstance` still returns `unavailable`.
|
|
468
500
|
Its backend `Error` preserves the original `cause`; JSON serialization carries only the stable
|
|
469
501
|
`DARWIN_BACKEND_UNAVAILABLE` code, architecture, safe message and failure stage
|
|
470
|
-
(`architecture`, `resolve`, `load` or `surface`), plus a recognized native error code
|
|
502
|
+
(`architecture`, `packaging`, `resolve`, `load` or `surface`), plus a recognized native error code
|
|
503
|
+
when present: `packaging` is a bundle built without the packaging plugin, with native code
|
|
504
|
+
`STITCHKIT_NATIVE_NOT_PACKAGED`.
|
|
471
505
|
It excludes stack, paths and nested cause. This backend diagnosis does not reclassify kernel
|
|
472
506
|
failures or turn unavailable identity into proof that an owner is dead. If a runtime provides
|
|
473
507
|
no recognized native error code, the stage stays `load`; the loader never infers errno from text.
|
|
@@ -514,7 +548,7 @@ for (const asset of native.assets) {
|
|
|
514
548
|
}
|
|
515
549
|
```
|
|
516
550
|
|
|
517
|
-
`entryPath` and `assetPath` are relative paths inside the application's output root, without
|
|
551
|
+
In companion delivery, `entryPath` and `assetPath` are relative paths inside the application's output root, without
|
|
518
552
|
absolute paths, traversal or overlapping file/directory paths. `assetPath` may contain `[hash]`,
|
|
519
553
|
which becomes the first 16 hex digits of that addon's published SHA256: the digest is known before
|
|
520
554
|
the build, so `addons/darwin-arm64-[hash].node` gives two installed versions of the package
|
|
@@ -523,6 +557,11 @@ addon path accepts. `entryPath` is fixed, without
|
|
|
523
557
|
Bun naming templates such as `[dir]` or `[name]`. Companion JS builds require one entry, no splitting,
|
|
524
558
|
and `naming.entry` exactly matching `entryPath`; the plugin rejects a mismatching layout.
|
|
525
559
|
Choose any application layout; the framework does not prescribe an app directory or installer.
|
|
560
|
+
The plugin packages the loader of the installation it was created from. A build whose entry
|
|
561
|
+
imports another `stitchkit` installation — another version, or the same version under another
|
|
562
|
+
path, as when a build tool carries its own copy — fails with an error naming both versions and
|
|
563
|
+
roots: that installation's loader would refuse the addon at run time, so the artifact is never
|
|
564
|
+
written. Call `createNativePackaging` from the `stitchkit` the entry imports.
|
|
526
565
|
Keep every bundler output and write `asset.bytes`; never read the addon from `node_modules` a
|
|
527
566
|
second time. An installed addon whose size or SHA256 differs from the published manifest refuses
|
|
528
567
|
with `mismatch` / `NATIVE_ASSET_DIGEST_MISMATCH`, so a file substituted after installation never
|
|
@@ -553,10 +592,27 @@ process primitives without loading Darwin assets. Qualify the exact same JS byte
|
|
|
553
592
|
Darwin arm64 and x64 machines, with both companions preserved through archive delivery.
|
|
554
593
|
Build-machine architecture and cross-build success cannot establish universal native support.
|
|
555
594
|
|
|
556
|
-
For a standalone executable use `delivery: 'embedded'` and
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
595
|
+
For a standalone executable use `delivery: 'embedded'` and its plugin in `Bun.build` with
|
|
596
|
+
`compile`. An executable carries the addon inside itself, so this form names no `entryPath` or
|
|
597
|
+
`assetPath`; passing one is a type error and a schema refusal, never silently ignored:
|
|
598
|
+
|
|
599
|
+
```ts
|
|
600
|
+
const native = createNativePackaging({
|
|
601
|
+
platform: 'darwin', architecture: 'arm64', delivery: 'embedded',
|
|
602
|
+
})
|
|
603
|
+
if (native.state !== 'ready') throw new Error(native.code)
|
|
604
|
+
const result = await Bun.build({
|
|
605
|
+
entrypoints: ['src/cli.ts'], minify: true,
|
|
606
|
+
compile: { target: 'bun-darwin-arm64', outfile: 'dist/cli' },
|
|
607
|
+
plugins: [native.plugin],
|
|
608
|
+
})
|
|
609
|
+
if (!result.success) throw new AggregateError(result.logs, 'Build failed')
|
|
610
|
+
```
|
|
611
|
+
|
|
612
|
+
Bun embeds the selected addon from the verified bytes the plugin holds, not from a second read of
|
|
613
|
+
the file, and the executable loads it from `/$bunfs/root/darwin-arm64-<hash>.node`. Its `assets`
|
|
614
|
+
(`NativePackagingEmbeddedAsset`: `bytes`, `size`, `sha256`) identify those bytes and their
|
|
615
|
+
published digest for qualification; there is nothing to write beside the executable.
|
|
560
616
|
Cross-builds must select the requested architecture explicitly; the artifact must run on that target.
|
|
561
617
|
The installed package must contain that target's addon. No automatic fallback/downgrade occurs.
|
|
562
618
|
|