stitchkit 0.97.0 → 0.98.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.
- package/CHANGELOG.md +39 -0
- package/dist/entrypoints/application.js +1 -1
- package/dist/entrypoints/cli.js +1 -1
- package/dist/entrypoints/live.js +1 -1
- package/dist/entrypoints/tools.js +1 -1
- package/dist/{index-t9rhjr9f.js → index-f1nb70ae.js} +45 -9
- package/dist/{index-wdkt63w3.js → index-wt743f7f.js} +17 -4
- package/dist/live/watch-delta.d.ts.map +1 -1
- package/dist/tools/cli/config.d.ts +5 -1
- package/dist/tools/cli/config.d.ts.map +1 -1
- package/dist/tools/cli/io.d.ts.map +1 -1
- package/dist/tools/cli/stdin.d.ts +6 -0
- package/dist/tools/cli/stdin.d.ts.map +1 -0
- package/llms/cli.txt +15 -0
- package/llms/stitchkit.txt +3 -3
- package/llms/{upgrading-0.72.0-0.97.0.txt → upgrading-0.72.0-0.98.0.txt} +28 -3
- package/llms/upgrading.txt +1 -1
- package/llms-full.txt +43 -3
- package/llms.txt +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -15,6 +15,45 @@ additive**; the first breaking change landed in 0.10.0. Grep the file for
|
|
|
15
15
|
|
|
16
16
|
## [Unreleased]
|
|
17
17
|
|
|
18
|
+
## [0.98.2] — 2026-09-27
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
|
|
22
|
+
- `stitchkit/live` — prepending to a watched array preserves future copy bases,
|
|
23
|
+
so a sliding window sends the new head plus one copy run instead of rewriting
|
|
24
|
+
the window. Duplicate lookup advances through each signature bucket once;
|
|
25
|
+
full-value fallback and the delta wire format are unchanged.
|
|
26
|
+
- Package-scoped release commits now produce the same validated publication
|
|
27
|
+
artifacts as release trains; a green CI run no longer omits their npm tarball.
|
|
28
|
+
|
|
29
|
+
## [0.98.0] — 2026-09-26
|
|
30
|
+
|
|
31
|
+
### ⚠️ Breaking changes
|
|
32
|
+
|
|
33
|
+
- `stitchkit/cli` — automatic stdin routing waits only 250 ms for its first byte.
|
|
34
|
+
A producer that starts later now reaches required-field validation instead of
|
|
35
|
+
waiting indefinitely. Before: `slow-producer | myapp generate`. After:
|
|
36
|
+
`myapp generate --prompt "$(slow-producer)"`, or supply an explicit
|
|
37
|
+
`CliConfig.stdin` reader. Once input starts, it is still read fully to EOF.
|
|
38
|
+
→ ADR 0203
|
|
39
|
+
|
|
40
|
+
**Who must act:** CLI consumers whose piped producer may take more than 250 ms
|
|
41
|
+
before writing its first byte. See the 0.98.0 migration in `docs/guide/upgrading.md`.
|
|
42
|
+
|
|
43
|
+
### Fixed
|
|
44
|
+
|
|
45
|
+
- `stitchkit/cli` — a missing required argument on an empty, open stdin pipe
|
|
46
|
+
reaches validation after a 250 ms first-byte probe instead of hanging for EOF.
|
|
47
|
+
Once data starts, the full stream is read to EOF without truncating delayed
|
|
48
|
+
chunks. TTYs, explicit arguments, custom stdin readers and streaming commands
|
|
49
|
+
retain their separate input behavior; see the CLI guide for delayed producers.
|
|
50
|
+
|
|
51
|
+
### Changed
|
|
52
|
+
|
|
53
|
+
- Release validation no longer limits stable-breaking releases by calendar cadence.
|
|
54
|
+
Named entrypoints, stable ADR citations, minor versioning, dated changelogs,
|
|
55
|
+
migrations and exact-SHA CI remain mandatory. See ADR 0204.
|
|
56
|
+
|
|
18
57
|
## [0.97.0] — 2026-09-26
|
|
19
58
|
|
|
20
59
|
### ⚠️ Breaking changes
|
package/dist/entrypoints/cli.js
CHANGED
package/dist/entrypoints/live.js
CHANGED
|
@@ -1336,16 +1336,52 @@ async function pollUntilDone(params) {
|
|
|
1336
1336
|
|
|
1337
1337
|
// src/tools/cli/io.ts
|
|
1338
1338
|
import { writeSync } from "node:fs";
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1339
|
+
|
|
1340
|
+
// src/tools/cli/stdin.ts
|
|
1341
|
+
function readPipedStdin(input = process.stdin) {
|
|
1342
|
+
if (input.isTTY || input.readableEnded)
|
|
1343
|
+
return Promise.resolve(null);
|
|
1344
|
+
if (input.destroyed)
|
|
1345
|
+
return Promise.reject(new Error("stdin closed before EOF"));
|
|
1346
|
+
return new Promise((resolve, reject) => {
|
|
1347
|
+
const chunks = [];
|
|
1348
|
+
const cleanup = () => {
|
|
1349
|
+
clearTimeout(timer);
|
|
1350
|
+
input.pause();
|
|
1351
|
+
input.off("data", onData);
|
|
1352
|
+
input.off("end", onEnd);
|
|
1353
|
+
input.off("error", onError);
|
|
1354
|
+
input.off("close", onClose);
|
|
1355
|
+
};
|
|
1356
|
+
const onData = (chunk) => {
|
|
1357
|
+
if (chunk.length === 0)
|
|
1358
|
+
return;
|
|
1359
|
+
clearTimeout(timer);
|
|
1360
|
+
chunks.push(typeof chunk === "string" ? Buffer.from(chunk) : chunk);
|
|
1361
|
+
};
|
|
1362
|
+
const onEnd = () => {
|
|
1363
|
+
cleanup();
|
|
1364
|
+
const text = Buffer.concat(chunks).toString("utf8").trim();
|
|
1365
|
+
resolve(text.length > 0 ? text : null);
|
|
1366
|
+
};
|
|
1367
|
+
const onError = (error) => {
|
|
1368
|
+
cleanup();
|
|
1369
|
+
reject(error);
|
|
1370
|
+
};
|
|
1371
|
+
const onClose = () => onError(new Error("stdin closed before EOF"));
|
|
1372
|
+
const timer = setTimeout(() => {
|
|
1373
|
+
cleanup();
|
|
1374
|
+
resolve(null);
|
|
1375
|
+
}, 250);
|
|
1376
|
+
input.on("end", onEnd);
|
|
1377
|
+
input.on("error", onError);
|
|
1378
|
+
input.on("close", onClose);
|
|
1379
|
+
input.on("data", onData);
|
|
1380
|
+
input.resume();
|
|
1381
|
+
});
|
|
1348
1382
|
}
|
|
1383
|
+
|
|
1384
|
+
// src/tools/cli/io.ts
|
|
1349
1385
|
function createCliIo(config) {
|
|
1350
1386
|
let pendingWrite;
|
|
1351
1387
|
let writeFailed = false;
|
|
@@ -69,6 +69,10 @@ function objectDiff(previous, next) {
|
|
|
69
69
|
}
|
|
70
70
|
function arrayDiff(previous, next) {
|
|
71
71
|
const previousSignatures = previous.map(signature);
|
|
72
|
+
const nextSignatures = next.map(signature);
|
|
73
|
+
const remaining = new Map;
|
|
74
|
+
for (const value of nextSignatures)
|
|
75
|
+
remaining.set(value, (remaining.get(value) ?? 0) + 1);
|
|
72
76
|
const positions = new Map;
|
|
73
77
|
previousSignatures.forEach((value, index) => {
|
|
74
78
|
const bucket = positions.get(value);
|
|
@@ -77,6 +81,7 @@ function arrayDiff(previous, next) {
|
|
|
77
81
|
else
|
|
78
82
|
positions.set(value, [index]);
|
|
79
83
|
});
|
|
84
|
+
const offsets = new Map;
|
|
80
85
|
const taken = new Set;
|
|
81
86
|
const ops = [];
|
|
82
87
|
let cursor = 0;
|
|
@@ -87,8 +92,9 @@ function arrayDiff(previous, next) {
|
|
|
87
92
|
ops[ops.length - 1] = { o: "copy", from: last.from, count: last.count + 1 };
|
|
88
93
|
return true;
|
|
89
94
|
};
|
|
90
|
-
for (const
|
|
91
|
-
const
|
|
95
|
+
for (const [index, wanted] of nextSignatures.entries()) {
|
|
96
|
+
const element = next[index];
|
|
97
|
+
remaining.set(wanted, (remaining.get(wanted) ?? 0) - 1);
|
|
92
98
|
const last = ops.at(-1);
|
|
93
99
|
const continuation = last?.o === "copy" ? last.from + last.count : undefined;
|
|
94
100
|
if (continuation !== undefined && continuation < previous.length && previousSignatures[continuation] === wanted && !taken.has(continuation)) {
|
|
@@ -98,7 +104,13 @@ function arrayDiff(previous, next) {
|
|
|
98
104
|
continue;
|
|
99
105
|
}
|
|
100
106
|
const bucket = positions.get(wanted);
|
|
101
|
-
|
|
107
|
+
let offset = offsets.get(wanted) ?? 0;
|
|
108
|
+
let found = bucket?.[offset];
|
|
109
|
+
while (found !== undefined && taken.has(found)) {
|
|
110
|
+
offset += 1;
|
|
111
|
+
found = bucket?.[offset];
|
|
112
|
+
}
|
|
113
|
+
offsets.set(wanted, found === undefined ? offset : offset + 1);
|
|
102
114
|
if (found !== undefined) {
|
|
103
115
|
taken.add(found);
|
|
104
116
|
if (!extend(found))
|
|
@@ -106,7 +118,8 @@ function arrayDiff(previous, next) {
|
|
|
106
118
|
cursor = found + 1;
|
|
107
119
|
continue;
|
|
108
120
|
}
|
|
109
|
-
const
|
|
121
|
+
const candidate = previousSignatures[cursor];
|
|
122
|
+
const counterpart = candidate !== undefined && !taken.has(cursor) && !remaining.get(candidate) ? cursor : undefined;
|
|
110
123
|
const nested = counterpart === undefined ? undefined : diff(previous[counterpart], element);
|
|
111
124
|
if (counterpart !== undefined && nested !== undefined) {
|
|
112
125
|
taken.add(counterpart);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watch-delta.d.ts","sourceRoot":"","sources":["../../src/live/watch-delta.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,6DAA6D;AAC7D,MAAM,MAAM,YAAY;AACtB,wEAAwE;AACtE;IAAE,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE;AACvE,+DAA+D;GAC7D;IAAE,QAAQ,CAAC,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,CAAC,EAAE,UAAU,CAAA;CAAE;AACxE,4DAA4D;GAC1D;IAAE,QAAQ,CAAC,CAAC,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAE/C,yCAAyC;AACzC,MAAM,MAAM,UAAU;AACpB,gEAAgE;AAC9D;IAAE,QAAQ,CAAC,CAAC,EAAE,K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void;
|
|
85
85
|
/** Exit hook — default `process.exit`; injectable for tests. */
|
|
86
86
|
exit?: (code: number) => void;
|
|
87
|
-
/**
|
|
87
|
+
/**
|
|
88
|
+
* Read stdin for the first required unset field. The default skips TTYs,
|
|
89
|
+
* waits up to 250 ms for the first byte, then reads to EOF without a deadline.
|
|
90
|
+
* Override to explicitly wait for a delayed producer; no probe wraps this hook.
|
|
91
|
+
*/
|
|
88
92
|
stdin?: () => Promise<string | null>;
|
|
89
93
|
}
|
|
90
94
|
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/tools/cli/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxC,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAClF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAE5C,MAAM,WAAW,SAAS,CACxB,KAAK,GAAG,OAAO,EACf,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAClE,QAAQ,SAAS,SAAS,GAAG,SAAS,CACtC,SAAQ,gBAAgB,CAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,CAAC;IACnD,gDAAgD;IAChD,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IAC9B;;;;OAIG;IACH,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,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+1 @@
|
|
|
1
|
-
{"version":3,"file":"io.d.ts","sourceRoot":"","sources":["../../../src/tools/cli/io.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"io.d.ts","sourceRoot":"","sources":["../../../src/tools/cli/io.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAG1C,yFAAyF;AACzF,MAAM,WAAW,KAAK;IACpB,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,SAAS,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CACzC;AAED,wBAAgB,WAAW,CACzB,MAAM,EAAE,IAAI,CAAC,SAAS,EAAE,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC,GAC9D,KAAK,CAqEP"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Readable } from 'node:stream';
|
|
2
|
+
/** Probe automatic stdin routing briefly; once data starts, only EOF completes it. */
|
|
3
|
+
export declare function readPipedStdin(input?: Readable & {
|
|
4
|
+
isTTY?: boolean;
|
|
5
|
+
}): Promise<string | null>;
|
|
6
|
+
//# sourceMappingURL=stdin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stdin.d.ts","sourceRoot":"","sources":["../../../src/tools/cli/stdin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,sFAAsF;AACtF,wBAAgB,cAAc,CAC5B,KAAK,GAAE,QAAQ,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAkB,GACpD,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAwCxB"}
|
package/llms/cli.txt
CHANGED
|
@@ -205,6 +205,21 @@ fields in declaration order, so `myapp generate "a fox"` is
|
|
|
205
205
|
`--prompt "a fox"`. A piped value fills the first required unset field:
|
|
206
206
|
`echo "a fox" | myapp generate`.
|
|
207
207
|
|
|
208
|
+
Automatic stdin routing skips TTYs and waits at most **250 ms for the first byte**.
|
|
209
|
+
An empty open pipe or EOF without data leaves the field unset, so normal schema
|
|
210
|
+
validation reports the missing field instead of waiting indefinitely. Once any
|
|
211
|
+
byte arrives, the reader collects the entire stream until EOF, including chunks
|
|
212
|
+
separated by long pauses; it decodes UTF-8 after collecting all bytes and trims
|
|
213
|
+
surrounding whitespace. Read errors or a close before EOF fail the invocation.
|
|
214
|
+
Explicit arguments and commands without required unset fields never read stdin.
|
|
215
|
+
|
|
216
|
+
A producer that takes longer than 250 ms to start must supply its value as an
|
|
217
|
+
argument (for example, `myapp generate --prompt "$(slow-producer)"`) or the
|
|
218
|
+
application must provide an explicit `CliConfig.stdin` reader that waits for it.
|
|
219
|
+
That hook is not wrapped in the availability timeout. `-` remains literal data,
|
|
220
|
+
not a special stdin marker. JSONL stream/batch commands own their input and wait
|
|
221
|
+
for lines as usual; MCP/serve and long-running handlers have no new deadline.
|
|
222
|
+
|
|
208
223
|
A token is an option only when it is a long form (`--name`, `--name=value`,
|
|
209
224
|
`--`) or `-` followed by a letter. Anything else that starts with `-` is data:
|
|
210
225
|
`myapp note a "- item"` fills a positional, and after an option that expects a
|
package/llms/stitchkit.txt
CHANGED
|
@@ -77,11 +77,11 @@ own, recorded as an ADR.
|
|
|
77
77
|
| `stitchkit/geo` | server (Bun or Node) | evolving | managed GeoIP reader generations, last-known-good reload and the optional MaxMind adapter |
|
|
78
78
|
| `stitchkit/oauth` | browser **and** server | evolving | provider-neutral Authorization Code + PKCE request and one-shot callback transaction mechanics |
|
|
79
79
|
| `stitchkit/google` | server (Bun or Node) | evolving | optional Google code exchange and verified OIDC identity adapter |
|
|
80
|
-
| `stitchkit/observability` | server | stable<br>_redefined in 2 of the
|
|
80
|
+
| `stitchkit/observability` | server | stable<br>_redefined in 2 of the 43 minors since 0.56.2, most recently 0.92.0_ | request/tool event projections — `createObservability`, trace context, sanitisation |
|
|
81
81
|
| `stitchkit/testing` | tests on Bun or Node | stable | in-process generated clients over a real Fetch handler, plus the managed-resource conformance kit |
|
|
82
82
|
| `stitchkit/declaration` | browser + build and deployment tooling (Bun or Node) | evolving | `ProjectDeclarationSchema` — the one machine-readable statement a repository makes about itself |
|
|
83
83
|
| `stitchkit/react` | browser + server rendering | stable | `createCursorQuery`, `createCacheBridge`, QueryClient and `ApiError` retry policy |
|
|
84
|
-
| `stitchkit/agent-runtime` | server | evolving<br>_redefined in 22 of the
|
|
84
|
+
| `stitchkit/agent-runtime` | server | evolving<br>_redefined in 22 of the 43 minors since 0.56.2, most recently 0.97.0_ | optional durable conversation/run loop, history, models, prompts, fencing and events |
|
|
85
85
|
| `stitchkit/agent-runtime/sandbox` | server | evolving | optional Linux Bubblewrap sessions, durable workspaces and a host HTTP credential gateway; see [sandbox guide](sandbox.md) |
|
|
86
86
|
| `stitchkit/agent-runtime/testing` | tests on Bun or Node | evolving | credential-free replay, scripted provider faults, deterministic race controls and the agent-store conformance kit |
|
|
87
87
|
| `stitchkit/agent-runtime/harness` | server | evolving | resource-aware process-local facade over the canonical Agent runtime; supervision stays outside |
|
|
@@ -91,7 +91,7 @@ own, recorded as an ADR.
|
|
|
91
91
|
| `stitchkit/agent-runtime/sqlite/bun` | server (Bun) | evolving | durable built-in SQLite store for the agent runtime |
|
|
92
92
|
| `stitchkit/agent-runtime/sqlite/node` | server (Node ≥ 22.5) | evolving | durable built-in SQLite store for the agent runtime |
|
|
93
93
|
| `stitchkit-tui` | terminal (Bun) | evolving | optional official OpenTUI host over a caller-composed headless runtime |
|
|
94
|
-
| `stitchkit/application` | browser + server | evolving<br>_redefined in 9 of the
|
|
94
|
+
| `stitchkit/application` | browser + server | evolving<br>_redefined in 9 of the 43 minors since 0.56.2, most recently 0.96.0_ | managed resource graph, readiness, admission, schedules, subtree restart and bounded shutdown |
|
|
95
95
|
| `stitchkit/application/grammy` | server | evolving | a grammY bot as application resources — configuration, then polling with updates admitted by batch — and the webhook adapter |
|
|
96
96
|
| `stitchkit/application/opentelemetry` | server | evolving | maps application snapshots onto an injected OpenTelemetry `Meter` |
|
|
97
97
|
| `stitchkit/application/schemas` | browser + server | evolving | the application's snapshot, health and shutdown schemas alone, without the kernel |
|
|
@@ -1,14 +1,39 @@
|
|
|
1
|
-
# Upgrading 0.72.0 → 0.
|
|
1
|
+
# Upgrading 0.72.0 → 0.98.0 — stitchkit docs slice
|
|
2
2
|
|
|
3
3
|
> Generated from the `docs/` tree by `bun run gen:llms`. The index of all slices is
|
|
4
4
|
> `llms.txt` in this package.
|
|
5
5
|
|
|
6
|
-
Contains: Guide: Upgrading, 0.72.0 → 0.
|
|
6
|
+
Contains: Guide: Upgrading, 0.72.0 → 0.98.0 (docs/guide/upgrading.md)
|
|
7
7
|
|
|
8
8
|
==============================================================================
|
|
9
|
-
# Guide: Upgrading, 0.72.0 → 0.
|
|
9
|
+
# Guide: Upgrading, 0.72.0 → 0.98.0 (docs/guide/upgrading.md)
|
|
10
10
|
==============================================================================
|
|
11
11
|
|
|
12
|
+
## Released migration: 0.98.0
|
|
13
|
+
|
|
14
|
+
### automatic stdin availability
|
|
15
|
+
|
|
16
|
+
**Who must act:** CLI applications or scripts relying on automatic stdin routing
|
|
17
|
+
from a producer that can take more than 250 ms to write its first byte.
|
|
18
|
+
|
|
19
|
+
Automatic routing now probes for the first byte for 250 ms. An empty open pipe
|
|
20
|
+
leaves the required field unset and normal validation reports its name. Once
|
|
21
|
+
data arrives, the entire stream is read until EOF without a total deadline.
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
# before: may now fail if the producer starts late
|
|
25
|
+
slow-producer | myapp generate
|
|
26
|
+
# after: provide the value explicitly after the producer completes
|
|
27
|
+
myapp generate --prompt "$(slow-producer)"
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
For large input that should stay in a pipe, supply a `CliConfig.stdin` reader
|
|
31
|
+
that waits for the producer and EOF; this existing hook is not wrapped in the
|
|
32
|
+
availability probe. A custom reader owns its limits and error handling.
|
|
33
|
+
`-` remains literal data. TTY and empty EOF produce ordinary validation errors;
|
|
34
|
+
explicit arguments skip stdin. JSONL stream/batch commands, MCP/serve and
|
|
35
|
+
long-running handlers have no new deadline. See ADR 0203.
|
|
36
|
+
|
|
12
37
|
## Released migration: 0.97.0
|
|
13
38
|
|
|
14
39
|
### schedule delivery
|
package/llms/upgrading.txt
CHANGED
|
@@ -11,7 +11,7 @@ Contains: Guide: Upgrading, general (docs/guide/upgrading.md)
|
|
|
11
11
|
|
|
12
12
|
Load this slice, then every range slice between your installed version and the target:
|
|
13
13
|
|
|
14
|
-
- 0.72.0 → 0.
|
|
14
|
+
- 0.72.0 → 0.98.0: `llms/upgrading-0.72.0-0.98.0.txt`
|
|
15
15
|
- 0.59.0 → 0.71.0: `llms/upgrading-0.59.0-0.71.0.txt`
|
|
16
16
|
- 0.37.0 → 0.58.0: `llms/upgrading-0.37.0-0.58.0.txt`
|
|
17
17
|
|
package/llms-full.txt
CHANGED
|
@@ -68,11 +68,11 @@ own, recorded as an ADR.
|
|
|
68
68
|
| `stitchkit/geo` | server (Bun or Node) | evolving | managed GeoIP reader generations, last-known-good reload and the optional MaxMind adapter |
|
|
69
69
|
| `stitchkit/oauth` | browser **and** server | evolving | provider-neutral Authorization Code + PKCE request and one-shot callback transaction mechanics |
|
|
70
70
|
| `stitchkit/google` | server (Bun or Node) | evolving | optional Google code exchange and verified OIDC identity adapter |
|
|
71
|
-
| `stitchkit/observability` | server | stable<br>_redefined in 2 of the
|
|
71
|
+
| `stitchkit/observability` | server | stable<br>_redefined in 2 of the 43 minors since 0.56.2, most recently 0.92.0_ | request/tool event projections — `createObservability`, trace context, sanitisation |
|
|
72
72
|
| `stitchkit/testing` | tests on Bun or Node | stable | in-process generated clients over a real Fetch handler, plus the managed-resource conformance kit |
|
|
73
73
|
| `stitchkit/declaration` | browser + build and deployment tooling (Bun or Node) | evolving | `ProjectDeclarationSchema` — the one machine-readable statement a repository makes about itself |
|
|
74
74
|
| `stitchkit/react` | browser + server rendering | stable | `createCursorQuery`, `createCacheBridge`, QueryClient and `ApiError` retry policy |
|
|
75
|
-
| `stitchkit/agent-runtime` | server | evolving<br>_redefined in 22 of the
|
|
75
|
+
| `stitchkit/agent-runtime` | server | evolving<br>_redefined in 22 of the 43 minors since 0.56.2, most recently 0.97.0_ | optional durable conversation/run loop, history, models, prompts, fencing and events |
|
|
76
76
|
| `stitchkit/agent-runtime/sandbox` | server | evolving | optional Linux Bubblewrap sessions, durable workspaces and a host HTTP credential gateway; see [sandbox guide](sandbox.md) |
|
|
77
77
|
| `stitchkit/agent-runtime/testing` | tests on Bun or Node | evolving | credential-free replay, scripted provider faults, deterministic race controls and the agent-store conformance kit |
|
|
78
78
|
| `stitchkit/agent-runtime/harness` | server | evolving | resource-aware process-local facade over the canonical Agent runtime; supervision stays outside |
|
|
@@ -82,7 +82,7 @@ own, recorded as an ADR.
|
|
|
82
82
|
| `stitchkit/agent-runtime/sqlite/bun` | server (Bun) | evolving | durable built-in SQLite store for the agent runtime |
|
|
83
83
|
| `stitchkit/agent-runtime/sqlite/node` | server (Node ≥ 22.5) | evolving | durable built-in SQLite store for the agent runtime |
|
|
84
84
|
| `stitchkit-tui` | terminal (Bun) | evolving | optional official OpenTUI host over a caller-composed headless runtime |
|
|
85
|
-
| `stitchkit/application` | browser + server | evolving<br>_redefined in 9 of the
|
|
85
|
+
| `stitchkit/application` | browser + server | evolving<br>_redefined in 9 of the 43 minors since 0.56.2, most recently 0.96.0_ | managed resource graph, readiness, admission, schedules, subtree restart and bounded shutdown |
|
|
86
86
|
| `stitchkit/application/grammy` | server | evolving | a grammY bot as application resources — configuration, then polling with updates admitted by batch — and the webhook adapter |
|
|
87
87
|
| `stitchkit/application/opentelemetry` | server | evolving | maps application snapshots onto an injected OpenTelemetry `Meter` |
|
|
88
88
|
| `stitchkit/application/schemas` | browser + server | evolving | the application's snapshot, health and shutdown schemas alone, without the kernel |
|
|
@@ -7953,6 +7953,21 @@ fields in declaration order, so `myapp generate "a fox"` is
|
|
|
7953
7953
|
`--prompt "a fox"`. A piped value fills the first required unset field:
|
|
7954
7954
|
`echo "a fox" | myapp generate`.
|
|
7955
7955
|
|
|
7956
|
+
Automatic stdin routing skips TTYs and waits at most **250 ms for the first byte**.
|
|
7957
|
+
An empty open pipe or EOF without data leaves the field unset, so normal schema
|
|
7958
|
+
validation reports the missing field instead of waiting indefinitely. Once any
|
|
7959
|
+
byte arrives, the reader collects the entire stream until EOF, including chunks
|
|
7960
|
+
separated by long pauses; it decodes UTF-8 after collecting all bytes and trims
|
|
7961
|
+
surrounding whitespace. Read errors or a close before EOF fail the invocation.
|
|
7962
|
+
Explicit arguments and commands without required unset fields never read stdin.
|
|
7963
|
+
|
|
7964
|
+
A producer that takes longer than 250 ms to start must supply its value as an
|
|
7965
|
+
argument (for example, `myapp generate --prompt "$(slow-producer)"`) or the
|
|
7966
|
+
application must provide an explicit `CliConfig.stdin` reader that waits for it.
|
|
7967
|
+
That hook is not wrapped in the availability timeout. `-` remains literal data,
|
|
7968
|
+
not a special stdin marker. JSONL stream/batch commands own their input and wait
|
|
7969
|
+
for lines as usual; MCP/serve and long-running handlers have no new deadline.
|
|
7970
|
+
|
|
7956
7971
|
A token is an option only when it is a long form (`--name`, `--name=value`,
|
|
7957
7972
|
`--`) or `-` followed by a letter. Anything else that starts with `-` is data:
|
|
7958
7973
|
`myapp note a "- item"` fills a positional, and after an option that expects a
|
|
@@ -13019,6 +13034,31 @@ analytics policy belong to the application.
|
|
|
13019
13034
|
|
|
13020
13035
|
# Upgrading stitchkit
|
|
13021
13036
|
|
|
13037
|
+
## Released migration: 0.98.0
|
|
13038
|
+
|
|
13039
|
+
### automatic stdin availability
|
|
13040
|
+
|
|
13041
|
+
**Who must act:** CLI applications or scripts relying on automatic stdin routing
|
|
13042
|
+
from a producer that can take more than 250 ms to write its first byte.
|
|
13043
|
+
|
|
13044
|
+
Automatic routing now probes for the first byte for 250 ms. An empty open pipe
|
|
13045
|
+
leaves the required field unset and normal validation reports its name. Once
|
|
13046
|
+
data arrives, the entire stream is read until EOF without a total deadline.
|
|
13047
|
+
|
|
13048
|
+
```sh
|
|
13049
|
+
# before: may now fail if the producer starts late
|
|
13050
|
+
slow-producer | myapp generate
|
|
13051
|
+
# after: provide the value explicitly after the producer completes
|
|
13052
|
+
myapp generate --prompt "$(slow-producer)"
|
|
13053
|
+
```
|
|
13054
|
+
|
|
13055
|
+
For large input that should stay in a pipe, supply a `CliConfig.stdin` reader
|
|
13056
|
+
that waits for the producer and EOF; this existing hook is not wrapped in the
|
|
13057
|
+
availability probe. A custom reader owns its limits and error handling.
|
|
13058
|
+
`-` remains literal data. TTY and empty EOF produce ordinary validation errors;
|
|
13059
|
+
explicit arguments skip stdin. JSONL stream/batch commands, MCP/serve and
|
|
13060
|
+
long-running handlers have no new deadline. See ADR 0203.
|
|
13061
|
+
|
|
13022
13062
|
## Released migration: 0.97.0
|
|
13023
13063
|
|
|
13024
13064
|
### schedule delivery
|
package/llms.txt
CHANGED
|
@@ -16,7 +16,7 @@ Load the slice for each entrypoint your code imports — `import … from 'stitc
|
|
|
16
16
|
- **stitchkit/tools/contract**: [llms/tools-contract.txt](llms/tools-contract.txt) 0.2 KB
|
|
17
17
|
- **stitchkit/tools/invoker**: [llms/tools-invoker.txt](llms/tools-invoker.txt) 0.2 KB
|
|
18
18
|
- **stitchkit/tools/connections**: [llms/tools-connections.txt](llms/tools-connections.txt) 3.1 KB
|
|
19
|
-
- **stitchkit/cli**: [llms/cli.txt](llms/cli.txt)
|
|
19
|
+
- **stitchkit/cli**: [llms/cli.txt](llms/cli.txt) 42.3 KB → [llms/cli.2.txt](llms/cli.2.txt) 8.1 KB
|
|
20
20
|
- **stitchkit/remote**: [llms/remote.txt](llms/remote.txt) 1.0 KB
|
|
21
21
|
- **stitchkit/contract**: [llms/contract.txt](llms/contract.txt) 31.9 KB
|
|
22
22
|
- **stitchkit/primitives**: [llms/primitives.txt](llms/primitives.txt) 9.3 KB
|
|
@@ -52,7 +52,7 @@ Load the slice for each entrypoint your code imports — `import … from 'stitc
|
|
|
52
52
|
|
|
53
53
|
## Upgrading slices
|
|
54
54
|
- **Upgrading — how to move across versions**: [llms/upgrading.txt](llms/upgrading.txt) 10.3 KB
|
|
55
|
-
- **Upgrading 0.72.0 → 0.
|
|
55
|
+
- **Upgrading 0.72.0 → 0.98.0**: [llms/upgrading-0.72.0-0.98.0.txt](llms/upgrading-0.72.0-0.98.0.txt) 44.8 KB
|
|
56
56
|
- **Upgrading 0.59.0 → 0.71.0**: [llms/upgrading-0.59.0-0.71.0.txt](llms/upgrading-0.59.0-0.71.0.txt) 45.6 KB
|
|
57
57
|
- **Upgrading 0.37.0 → 0.58.0**: [llms/upgrading-0.37.0-0.58.0.txt](llms/upgrading-0.37.0-0.58.0.txt) 40.0 KB
|
|
58
58
|
|
package/package.json
CHANGED