stitchkit 0.103.7 → 0.103.9
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 +19 -0
- package/dist/agent-runtime/sandbox-process.d.ts +2 -2
- package/dist/agent-runtime/sandbox-process.d.ts.map +1 -1
- package/dist/durability/contract.d.ts +3 -2
- package/dist/durability/contract.d.ts.map +1 -1
- package/dist/durability/effect.d.ts.map +1 -1
- package/dist/durability/engine.d.ts.map +1 -1
- package/dist/durability/json.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime/harness.js +2 -2
- package/dist/entrypoints/agent-runtime/sandbox.js +29 -81
- package/dist/entrypoints/agent-runtime.js +2 -2
- package/dist/entrypoints/cli.js +1 -1
- package/dist/entrypoints/files.d.ts +2 -0
- package/dist/entrypoints/files.d.ts.map +1 -1
- package/dist/entrypoints/files.js +6 -2
- package/dist/entrypoints/primitives.js +77 -57
- package/dist/entrypoints/process.d.ts +4 -0
- package/dist/entrypoints/process.d.ts.map +1 -0
- package/dist/entrypoints/process.js +13 -0
- package/dist/entrypoints/tools.js +12 -3
- package/dist/files/boundary.d.ts +19 -1
- package/dist/files/boundary.d.ts.map +1 -1
- package/dist/files/file-io.d.ts +5 -1
- package/dist/files/file-io.d.ts.map +1 -1
- package/dist/files/read.d.ts +13 -0
- package/dist/files/read.d.ts.map +1 -0
- package/dist/index-12m2v2a9.js +98 -0
- package/dist/index-8a9ksm91.js +95 -0
- package/dist/{index-90ppdx3q.js → index-9jb61j5a.js} +1 -1
- package/dist/{index-5vyd0fkb.js → index-ary5s7k0.js} +40 -61
- package/dist/index-c1jmtxa0.js +74 -0
- package/dist/index-eeqmg7qm.js +202 -0
- package/dist/index-mbnnw3f2.js +25 -0
- package/dist/{index-v4a2fjtk.js → index-sybedc8b.js} +124 -55
- package/dist/internal/abort-race.d.ts +3 -0
- package/dist/internal/abort-race.d.ts.map +1 -0
- package/dist/internal/atomic-file.d.ts +20 -2
- package/dist/internal/atomic-file.d.ts.map +1 -1
- package/dist/internal/atomic-publication.d.ts +19 -0
- package/dist/internal/atomic-publication.d.ts.map +1 -0
- package/dist/internal/json-data.d.ts +8 -0
- package/dist/internal/json-data.d.ts.map +1 -0
- package/dist/primitives/canonical-json.d.ts +11 -0
- package/dist/primitives/canonical-json.d.ts.map +1 -0
- package/dist/primitives/index.d.ts +1 -0
- package/dist/primitives/index.d.ts.map +1 -1
- package/dist/process/command-owner.d.ts +13 -0
- package/dist/process/command-owner.d.ts.map +1 -0
- package/dist/process/command.d.ts +3 -0
- package/dist/process/command.d.ts.map +1 -0
- package/dist/process/contract.d.ts +35 -0
- package/dist/process/contract.d.ts.map +1 -0
- package/dist/process/group.d.ts +6 -0
- package/dist/process/group.d.ts.map +1 -0
- package/dist/tools/transfer/managed-file-error.d.ts.map +1 -1
- package/llms/files.txt +8 -0
- package/llms/primitives.txt +31 -1
- package/llms/process.txt +167 -0
- package/llms/stitchkit.txt +1 -0
- package/llms/tools.txt +18 -0
- package/llms-full.txt +216 -1
- package/llms.txt +6 -4
- package/package.json +5 -1
- package/dist/index-aan6hqb9.js +0 -65
package/llms.txt
CHANGED
|
@@ -9,18 +9,18 @@ Build with stitchkit: define a contract once, then `implement` it and serve it (
|
|
|
9
9
|
Load the slice for each entrypoint your code imports — `import … from 'stitchkit/server'` → `llms/server.txt`; the root `stitchkit` import → `llms/stitchkit.txt`. A slice holds that entrypoint's API reference section and the guide pages whose home it is; every guide lives in exactly one slice, and a slice that needs another's guide names it under "Also read". Each file is at most 50.0 KB; a longer one continues in numbered parts, each naming the next at its top. Moving across versions: load `llms/upgrading.txt` and the range slices it lists between your version and the target. `llms-full.txt` inlines everything; it is far larger than a context window, so do not read it whole.
|
|
10
10
|
|
|
11
11
|
## Entrypoint slices
|
|
12
|
-
- **stitchkit**: [llms/stitchkit.txt](llms/stitchkit.txt) 17.
|
|
12
|
+
- **stitchkit**: [llms/stitchkit.txt](llms/stitchkit.txt) 17.2 KB → [llms/stitchkit.2.txt](llms/stitchkit.2.txt) 45.2 KB → [llms/stitchkit.3.txt](llms/stitchkit.3.txt) 17.1 KB
|
|
13
13
|
- **stitchkit/live**: [llms/live.txt](llms/live.txt) 21.6 KB
|
|
14
14
|
- **stitchkit/react**: [llms/react.txt](llms/react.txt) 9.0 KB
|
|
15
15
|
- **stitchkit/react/keyboard**: [llms/react-keyboard.txt](llms/react-keyboard.txt) 9.4 KB
|
|
16
|
-
- **stitchkit/tools**: [llms/tools.txt](llms/tools.txt)
|
|
16
|
+
- **stitchkit/tools**: [llms/tools.txt](llms/tools.txt) 47.4 KB → [llms/tools.2.txt](llms/tools.2.txt) 26.9 KB → [llms/tools.3.txt](llms/tools.3.txt) 25.5 KB
|
|
17
17
|
- **stitchkit/tools/contract**: [llms/tools-contract.txt](llms/tools-contract.txt) 0.2 KB
|
|
18
18
|
- **stitchkit/tools/invoker**: [llms/tools-invoker.txt](llms/tools-invoker.txt) 0.2 KB
|
|
19
19
|
- **stitchkit/tools/connections**: [llms/tools-connections.txt](llms/tools-connections.txt) 3.1 KB
|
|
20
20
|
- **stitchkit/cli**: [llms/cli.txt](llms/cli.txt) 43.6 KB → [llms/cli.2.txt](llms/cli.2.txt) 8.1 KB
|
|
21
21
|
- **stitchkit/remote**: [llms/remote.txt](llms/remote.txt) 1.0 KB
|
|
22
22
|
- **stitchkit/contract**: [llms/contract.txt](llms/contract.txt) 31.9 KB
|
|
23
|
-
- **stitchkit/primitives**: [llms/primitives.txt](llms/primitives.txt)
|
|
23
|
+
- **stitchkit/primitives**: [llms/primitives.txt](llms/primitives.txt) 11.2 KB
|
|
24
24
|
- **stitchkit/server**: [llms/server.txt](llms/server.txt) 45.3 KB → [llms/server.2.txt](llms/server.2.txt) 14.6 KB → [llms/server.3.txt](llms/server.3.txt) 45.6 KB → [llms/server.4.txt](llms/server.4.txt) 38.1 KB → [llms/server.5.txt](llms/server.5.txt) 21.8 KB
|
|
25
25
|
- **stitchkit/observability**: [llms/observability.txt](llms/observability.txt) 44.8 KB
|
|
26
26
|
- **stitchkit/agent-runtime**: [llms/agent-runtime.txt](llms/agent-runtime.txt) 36.8 KB → [llms/agent-runtime.2.txt](llms/agent-runtime.2.txt) 46.7 KB → [llms/agent-runtime.3.txt](llms/agent-runtime.3.txt) 34.3 KB
|
|
@@ -39,7 +39,7 @@ Load the slice for each entrypoint your code imports — `import … from 'stitc
|
|
|
39
39
|
- **stitchkit/application/schemas**: [llms/application-schemas.txt](llms/application-schemas.txt) 1.8 KB
|
|
40
40
|
- **stitchkit/testing**: [llms/testing.txt](llms/testing.txt) 30.8 KB
|
|
41
41
|
- **stitchkit/agent-runtime/sandbox**: [llms/agent-runtime-sandbox.txt](llms/agent-runtime-sandbox.txt) 8.1 KB
|
|
42
|
-
- **stitchkit/files**: [llms/files.txt](llms/files.txt) 4.
|
|
42
|
+
- **stitchkit/files**: [llms/files.txt](llms/files.txt) 4.4 KB
|
|
43
43
|
- **stitchkit/telegram**: [llms/telegram.txt](llms/telegram.txt) 26.9 KB
|
|
44
44
|
- **stitchkit/telegram/html**: [llms/telegram-html.txt](llms/telegram-html.txt) 2.7 KB
|
|
45
45
|
- **stitchkit/telegram/screens**: [llms/telegram-screens.txt](llms/telegram-screens.txt) 21.2 KB
|
|
@@ -55,6 +55,7 @@ Load the slice for each entrypoint your code imports — `import … from 'stitc
|
|
|
55
55
|
- **stitchkit/agent-runtime/react**: [llms/agent-runtime-react.txt](llms/agent-runtime-react.txt) 1.0 KB
|
|
56
56
|
- **stitchkit/agent-runtime/realtime**: [llms/agent-runtime-realtime.txt](llms/agent-runtime-realtime.txt) 1.8 KB
|
|
57
57
|
- **stitchkit/agent-runtime/harness-tools**: [llms/agent-runtime-harness-tools.txt](llms/agent-runtime-harness-tools.txt) 1.3 KB
|
|
58
|
+
- **stitchkit/process**: [llms/process.txt](llms/process.txt) 10.7 KB
|
|
58
59
|
|
|
59
60
|
## Upgrading slices
|
|
60
61
|
- **Upgrading — how to move across versions**: [llms/upgrading.txt](llms/upgrading.txt) 10.3 KB
|
|
@@ -75,6 +76,7 @@ Load the slice for each entrypoint your code imports — `import … from 'stitc
|
|
|
75
76
|
- [Agent composition](https://github.com/max-listov/stitchkit/blob/master/docs/guide/agent-composition.md): tool factories, authorized realtime control, shared React views and exact-run behavior checks
|
|
76
77
|
- [Managed application kernel](https://github.com/max-listov/stitchkit/blob/master/docs/guide/application-kernel.md): process-local resources, readiness, admission, schedules, projections and optional provider adapters
|
|
77
78
|
- [Optional process sandbox](https://github.com/max-listov/stitchkit/blob/master/docs/guide/sandbox.md): Linux Bubblewrap sessions, durable workspace reconnect, network policy and host credential brokering
|
|
79
|
+
- [Native IO](https://github.com/max-listov/stitchkit/blob/master/docs/guide/native-io.md): finite commands, durable atomic publication and strict trusted-root file reads
|
|
78
80
|
- [Generic application primitives](https://github.com/max-listov/stitchkit/blob/master/docs/guide/primitives.md): lifecycle transitions, owner scope, permissions, exact money and quantities, deadlines, audit, delivery and exports — declared, not persisted
|
|
79
81
|
- [Application migration recipes](https://github.com/max-listov/stitchkit/blob/master/docs/guide/application-migration-recipes.md): executable database, poller, queue-consumer and operational publishing cutovers
|
|
80
82
|
- [CLI](https://github.com/max-listov/stitchkit/blob/master/docs/guide/cli.md): contracts as a command-line program
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stitchkit",
|
|
3
|
-
"version": "0.103.
|
|
3
|
+
"version": "0.103.9",
|
|
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",
|
|
@@ -233,6 +233,10 @@
|
|
|
233
233
|
"./agent-runtime/harness-tools": {
|
|
234
234
|
"types": "./dist/entrypoints/agent-runtime/harness-tools.d.ts",
|
|
235
235
|
"import": "./dist/entrypoints/agent-runtime/harness-tools.js"
|
|
236
|
+
},
|
|
237
|
+
"./process": {
|
|
238
|
+
"types": "./dist/entrypoints/process.d.ts",
|
|
239
|
+
"import": "./dist/entrypoints/process.js"
|
|
236
240
|
}
|
|
237
241
|
},
|
|
238
242
|
"publishConfig": {
|
package/dist/index-aan6hqb9.js
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
// src/internal/atomic-file.ts
|
|
2
|
-
import { randomBytes } from "node:crypto";
|
|
3
|
-
import {
|
|
4
|
-
closeSync,
|
|
5
|
-
fchmodSync,
|
|
6
|
-
fsyncSync,
|
|
7
|
-
openSync,
|
|
8
|
-
renameSync,
|
|
9
|
-
unlinkSync,
|
|
10
|
-
writeSync
|
|
11
|
-
} from "node:fs";
|
|
12
|
-
import { open, rename, unlink } from "node:fs/promises";
|
|
13
|
-
import { basename, dirname, join } from "node:path";
|
|
14
|
-
var DEFAULT_MODE = 384;
|
|
15
|
-
function stagingPath(target) {
|
|
16
|
-
return join(dirname(target), `.${basename(target)}.${randomBytes(12).toString("hex")}.tmp`);
|
|
17
|
-
}
|
|
18
|
-
function bytesOf(data) {
|
|
19
|
-
return typeof data === "string" ? new TextEncoder().encode(data) : data;
|
|
20
|
-
}
|
|
21
|
-
async function writeFileAtomic2(target, data, options = {}) {
|
|
22
|
-
const mode = options.mode ?? DEFAULT_MODE;
|
|
23
|
-
const staged = stagingPath(target);
|
|
24
|
-
const handle = await open(staged, "wx", mode);
|
|
25
|
-
try {
|
|
26
|
-
try {
|
|
27
|
-
await handle.writeFile(bytesOf(data));
|
|
28
|
-
await handle.chmod(mode);
|
|
29
|
-
await handle.sync();
|
|
30
|
-
} finally {
|
|
31
|
-
await handle.close();
|
|
32
|
-
}
|
|
33
|
-
await rename(staged, target);
|
|
34
|
-
} catch (error) {
|
|
35
|
-
await unlink(staged).catch(() => {
|
|
36
|
-
return;
|
|
37
|
-
});
|
|
38
|
-
throw error;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
function writeFileAtomicSync2(target, data, options = {}) {
|
|
42
|
-
const mode = options.mode ?? DEFAULT_MODE;
|
|
43
|
-
const bytes = bytesOf(data);
|
|
44
|
-
const staged = stagingPath(target);
|
|
45
|
-
const handle = openSync(staged, "wx", mode);
|
|
46
|
-
try {
|
|
47
|
-
try {
|
|
48
|
-
for (let offset = 0;offset < bytes.byteLength; ) {
|
|
49
|
-
offset += writeSync(handle, bytes, offset, bytes.byteLength - offset);
|
|
50
|
-
}
|
|
51
|
-
fchmodSync(handle, mode);
|
|
52
|
-
fsyncSync(handle);
|
|
53
|
-
} finally {
|
|
54
|
-
closeSync(handle);
|
|
55
|
-
}
|
|
56
|
-
renameSync(staged, target);
|
|
57
|
-
} catch (error) {
|
|
58
|
-
try {
|
|
59
|
-
unlinkSync(staged);
|
|
60
|
-
} catch {}
|
|
61
|
-
throw error;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export { writeFileAtomic2, writeFileAtomicSync2 };
|