stitchkit 0.109.3 → 0.110.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 +26 -0
- package/dist/agent-runtime/store-conformance-lifecycle.d.ts +10 -10
- package/dist/application/process-lifecycle-transitions.d.ts +10 -2
- package/dist/application/process-lifecycle-transitions.d.ts.map +1 -1
- package/dist/browser/http.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime/coding-tools.js +3 -3
- package/dist/entrypoints/agent-runtime/harness.js +6 -6
- package/dist/entrypoints/agent-runtime/realtime.js +2 -2
- package/dist/entrypoints/agent-runtime/sandbox.js +3 -3
- package/dist/entrypoints/agent-runtime.js +6 -6
- package/dist/entrypoints/application.js +16 -8
- package/dist/entrypoints/cli.js +7 -7
- package/dist/entrypoints/contract.js +1 -1
- package/dist/entrypoints/http.d.ts +5 -0
- package/dist/entrypoints/http.d.ts.map +1 -0
- package/dist/entrypoints/http.js +28 -0
- package/dist/entrypoints/index.js +8 -8
- package/dist/entrypoints/process/owner-loss.js +1 -1
- package/dist/entrypoints/process.js +2 -2
- package/dist/entrypoints/react.js +1 -1
- package/dist/entrypoints/remote.js +2 -2
- package/dist/entrypoints/server.js +3 -3
- package/dist/entrypoints/telegram/screens.js +3 -3
- package/dist/entrypoints/testing.js +2 -2
- package/dist/entrypoints/tools/invoker.js +3 -3
- package/dist/entrypoints/tools/mcp.js +4 -4
- package/dist/entrypoints/tools.js +9 -9
- package/dist/{index-tpk71wqn.js → index-064zxbwj.js} +1 -1
- package/dist/{index-68y3n9j3.js → index-2pevnh0x.js} +3 -3
- package/dist/{index-hjvje0pf.js → index-506kd458.js} +1 -1
- package/dist/{index-3wm2xp2a.js → index-61m15a18.js} +1 -1
- package/dist/{index-dasy32c8.js → index-7a1xhhdx.js} +73 -14
- package/dist/{index-dj1aycxw.js → index-84bf5spd.js} +0 -1
- package/dist/{index-5cw390s6.js → index-dmfr2cg5.js} +3 -3
- package/dist/{index-x5xs71dw.js → index-fnra8n1j.js} +9 -9
- package/dist/{index-sjntc4az.js → index-jyw90rps.js} +2 -2
- package/dist/{index-kvvpw1kq.js → index-mnhtbqrb.js} +2 -2
- package/dist/{index-00v1qz76.js → index-p6apg0jg.js} +1 -1
- package/dist/{index-ryv32myz.js → index-p6mvqcbq.js} +1 -1
- package/dist/{index-e32vy8jw.js → index-zgwkwr1g.js} +1 -1
- package/dist/process/command-owner.d.ts.map +1 -1
- package/dist/process/group-settlement.d.ts +5 -0
- package/dist/process/group-settlement.d.ts.map +1 -0
- package/dist/process/group.d.ts.map +1 -1
- package/dist/process/output-drain.d.ts +1 -1
- package/dist/process/output-drain.d.ts.map +1 -1
- package/dist/process/owner-loss-control.d.ts.map +1 -1
- package/llms/application.2.txt +8 -5
- package/llms/application.3.txt +3 -0
- package/llms/http.txt +19 -0
- package/llms/stitchkit.txt +4 -3
- package/llms/{upgrading-0.101.0-0.109.0.txt → upgrading-0.101.0-0.110.0.txt} +13 -3
- package/llms/upgrading.txt +1 -1
- package/llms-full.txt +35 -8
- package/llms.txt +4 -3
- package/package.json +5 -1
- /package/dist/{index-299sm5tr.js → index-616xh7f2.js} +0 -0
- /package/dist/{index-k4v2kq4q.js → index-73cz22ds.js} +0 -0
package/llms-full.txt
CHANGED
|
@@ -48,6 +48,7 @@ own, recorded as an ADR.
|
|
|
48
48
|
| Import | Use in | Maturity | Holds |
|
|
49
49
|
|--------|--------|----------|-------|
|
|
50
50
|
| `stitchkit` | browser **and** server | stable | `defineContract`, `createClient`, `createHttpClient`, `createSocketIOClient`, `parseSSE`, the error model |
|
|
51
|
+
| `stitchkit/http` | browser, React Native/Hermes **and** server | evolving | typed HTTP client factories and `ApiError`, without optional realtime peers |
|
|
51
52
|
| `stitchkit/contract` | browser **and** server | stable | the contract layer alone — `defineContract`, errors, pagination |
|
|
52
53
|
| `stitchkit/live` | browser **and** server | evolving | `defineEvents` — topic declarations beside the operation contract — and watched reads: `createWatchClient`, the value/difference frame and its reassembly |
|
|
53
54
|
| `stitchkit/primitives` | browser **and** server | evolving | generic values and declarations for lifecycle, access, audit, delivery and exports |
|
|
@@ -75,12 +76,12 @@ own, recorded as an ADR.
|
|
|
75
76
|
| `stitchkit/geo` | server (Bun or Node) | evolving | managed GeoIP reader generations, last-known-good reload and the optional MaxMind adapter |
|
|
76
77
|
| `stitchkit/oauth` | browser **and** server | evolving | provider-neutral Authorization Code + PKCE request and one-shot callback transaction mechanics |
|
|
77
78
|
| `stitchkit/google` | server (Bun or Node) | evolving | optional Google code exchange and verified OIDC identity adapter |
|
|
78
|
-
| `stitchkit/observability` | server | stable<br>_redefined in 2 of the
|
|
79
|
+
| `stitchkit/observability` | server | stable<br>_redefined in 2 of the 55 minors since 0.56.2, most recently 0.92.0_ | request/tool event projections — `createObservability`, trace context, sanitisation |
|
|
79
80
|
| `stitchkit/testing` | tests on Bun or Node | stable | in-process generated clients over a real Fetch handler, the managed-resource conformance kit and manual time for schedules and retries |
|
|
80
81
|
| `stitchkit/declaration` | browser + build and deployment tooling (Bun or Node) | evolving | `ProjectDeclarationSchema` — the one machine-readable statement a repository makes about itself |
|
|
81
82
|
| `stitchkit/react` | browser + server rendering | stable | `createCursorQuery`, `createCacheBridge`, QueryClient and `ApiError` retry policy |
|
|
82
83
|
| `stitchkit/react/keyboard` | browser | evolving | which part of a screen gets a key — ordered layers, one Escape per level, list zones with real focus; see [keyboard guide](keyboard.md) |
|
|
83
|
-
| `stitchkit/agent-runtime` | server | evolving<br>_redefined in 23 of the
|
|
84
|
+
| `stitchkit/agent-runtime` | server | evolving<br>_redefined in 23 of the 55 minors since 0.56.2, most recently 0.105.0_ | optional durable conversation/run loop, history, models, prompts, fencing and events |
|
|
84
85
|
| `stitchkit/agent-runtime/sandbox` | server | evolving | optional Linux Bubblewrap sessions, durable workspaces and a host HTTP credential gateway; see [sandbox guide](sandbox.md) |
|
|
85
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 |
|
|
86
87
|
| `stitchkit/agent-runtime/harness` | server | evolving | resource-aware process-local facade over the canonical Agent runtime; supervision stays outside |
|
|
@@ -92,7 +93,7 @@ own, recorded as an ADR.
|
|
|
92
93
|
| `stitchkit/agent-runtime/sqlite/bun` | server (Bun) | evolving | durable built-in SQLite store for the agent runtime |
|
|
93
94
|
| `stitchkit/agent-runtime/sqlite/node` | server (Node ≥ 22.5) | evolving | durable built-in SQLite store for the agent runtime |
|
|
94
95
|
| `stitchkit-tui` | terminal (Bun) | evolving | optional official OpenTUI host over a caller-composed headless runtime |
|
|
95
|
-
| `stitchkit/application` | browser + server | evolving<br>_redefined in
|
|
96
|
+
| `stitchkit/application` | browser + server | evolving<br>_redefined in 14 of the 55 minors since 0.56.2, most recently 0.110.0_ | managed resource graph, readiness, admission, schedules, subtree restart and bounded shutdown |
|
|
96
97
|
| `stitchkit/application/grammy` | server | evolving | a grammY bot as application resources — configuration, then polling with updates admitted by batch — and the webhook adapter |
|
|
97
98
|
| `stitchkit/application/opentelemetry` | server | evolving | maps application snapshots onto an injected OpenTelemetry `Meter` |
|
|
98
99
|
| `stitchkit/application/schemas` | browser + server | evolving | the application's snapshot, health and shutdown schemas alone, without the kernel |
|
|
@@ -7849,12 +7850,13 @@ ever became ready:
|
|
|
7849
7850
|
| newest run | same pid | version | `previousExit` | predecessor's `termination` |
|
|
7850
7851
|
|---|---|---|---|---|
|
|
7851
7852
|
| none | — | — | `first-boot` | — |
|
|
7852
|
-
| recorded `stoppedAt` | — | — |
|
|
7853
|
+
| recorded `stoppedAt` | — | — | the recorded termination, including `interrupted` | unchanged |
|
|
7853
7854
|
| still open | yes | — | `hot-reload` | `hot-reload`, closed at the new start |
|
|
7854
7855
|
| still open | no | changed | `handoff` (default) | stays open; it records its own stop later |
|
|
7855
|
-
| still open | no | changed, `versionChangeOverlap: 'abnormal'` | `abnormal` / `startup-failed` | closed at the new start, as for the same version |
|
|
7856
|
-
| still
|
|
7857
|
-
| still
|
|
7856
|
+
| still open | no | changed, `versionChangeOverlap: 'abnormal'` | `interrupted` / `abnormal` / `startup-failed` | closed at the new start, as for the same version |
|
|
7857
|
+
| still draining | no | same or non-overlapping build | `interrupted` | closed at the new start; its death time and kill signal are unknown |
|
|
7858
|
+
| still active, was ready | no | same | `abnormal` (default) | `abnormal`, closed at the new start — an upper bound, the crash time is unknown |
|
|
7859
|
+
| still active, never ready | no | same | `startup-failed` (default) | `startup-failed`, closed at the new start |
|
|
7858
7860
|
|
|
7859
7861
|
Every other open run the start finds was abandoned too and is closed the same
|
|
7860
7862
|
way — two crashes in a row leave two open runs, and both are closed, not only
|
|
@@ -7883,10 +7885,12 @@ The ledger records what the process says while it can say it. stitchkit never
|
|
|
7883
7885
|
calls `process.exit` (ADR 0074), so a stop is recorded on the kernel's `close`
|
|
7884
7886
|
or `force` path, both awaited. An application that exits the process on its
|
|
7885
7887
|
own before its shutdown settles loses that last write; the successor then
|
|
7886
|
-
finds the
|
|
7888
|
+
finds the unfinished drain and closes it as `interrupted`, keeping the `unavailableAt`
|
|
7887
7889
|
already recorded — which is why the drain moment is written first, at
|
|
7888
7890
|
`stopAdmission`, and the downtime survives a stop that was never recorded.
|
|
7889
7891
|
|
|
7892
|
+
An abandoned `draining` run closes as `interrupted`, including before readiness. `StartFact.previousDrainUpperBoundMs` is the elapsed time from recorded admission stop to successor start, or `null` when unknown. This is an upper bound, not proof of a supervisor timeout or a particular kill signal. Live handoff predecessors remain open; same-pid restarts remain `hot-reload`.
|
|
7893
|
+
|
|
7890
7894
|
The `abnormal` default is a choice, and it is the single-process deployment:
|
|
7891
7895
|
one process per build, a new pid of the same build means the old one stopped
|
|
7892
7896
|
answering. Where processes of **one** build overlap on purpose — a cluster, a
|
|
@@ -15890,6 +15894,17 @@ analytics policy belong to the application.
|
|
|
15890
15894
|
|
|
15891
15895
|
# Upgrading stitchkit
|
|
15892
15896
|
|
|
15897
|
+
## Released migration: 0.110.0
|
|
15898
|
+
|
|
15899
|
+
### Interrupted process drains
|
|
15900
|
+
|
|
15901
|
+
**Who must act:** applications with exhaustive switches or schemas over `LifecycleTermination` or `PreviousExit` from `stitchkit/application`.
|
|
15902
|
+
|
|
15903
|
+
A successor that closes an abandoned `draining` run now reports `interrupted`, rather than `abnormal` (or `startup-failed` before readiness). Add an `interrupted` case for an unfinished shutdown. `abnormal` still describes an abandoned active run. Handoff and same-pid hot reload retain their meaning.
|
|
15904
|
+
|
|
15905
|
+
`StartFact.previousDrainUpperBoundMs` measures from recorded admission stop to successor start, or is `null` without those facts. It is an upper bound: the ledger does not observe the actual kill signal, supervisor deadline, or death time. Before: `previousExit === "abnormal"` included unfinished drains; after: handle `previousExit === "interrupted"` separately.
|
|
15906
|
+
|
|
15907
|
+
|
|
15893
15908
|
## Released migration: 0.109.0
|
|
15894
15909
|
|
|
15895
15910
|
### free CLI record leaves are lexical
|
|
@@ -21313,6 +21328,9 @@ lane never reaches the hooks on either runtime.
|
|
|
21313
21328
|
|
|
21314
21329
|
## `stitchkit/application`
|
|
21315
21330
|
|
|
21331
|
+
`StartFact` also carries `previousDrainUpperBoundMs`: the time from a predecessor's recorded admission stop to this start when its exit is `interrupted`, otherwise `null`. This is an upper bound, and does not identify a kill signal or supervisor deadline.
|
|
21332
|
+
|
|
21333
|
+
|
|
21316
21334
|
Server-only process-local application composition. See the
|
|
21317
21335
|
[application kernel guide](../guide/application-kernel.md) and
|
|
21318
21336
|
[architecture](../architecture/application-kernel.md). Complete consumer
|
|
@@ -23311,3 +23329,12 @@ has no `outputPath`, because nothing is written beside the executable. Keep comp
|
|
|
23311
23329
|
without splitting, preserve every output, and write each asset's `bytes` to its `outputPath`.
|
|
23312
23330
|
This evolving entrypoint is a build dependency; runtime imports do not reach it.
|
|
23313
23331
|
The detailed recipe is in [native IO](../guide/native-io.md#public-native-packaging).
|
|
23332
|
+
|
|
23333
|
+
## `stitchkit/http`
|
|
23334
|
+
|
|
23335
|
+
An HTTP-only entrypoint for browsers, React Native/Hermes and servers. It exports the same `createClient`, `createClients`, `createHttpClient`, URL builders, client configuration types and `ApiError` as the root, without loading its optional Socket.IO graph. Import shared contracts from `stitchkit/contract`.
|
|
23336
|
+
|
|
23337
|
+
```ts
|
|
23338
|
+
import { createClients, createHttpClient } from 'stitchkit/http';
|
|
23339
|
+
import { defineContract } from 'stitchkit/contract';
|
|
23340
|
+
```
|
package/llms.txt
CHANGED
|
@@ -9,7 +9,7 @@ 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) 47.
|
|
12
|
+
- **stitchkit**: [llms/stitchkit.txt](llms/stitchkit.txt) 47.3 KB → [llms/stitchkit.2.txt](llms/stitchkit.2.txt) 36.5 KB
|
|
13
13
|
- **stitchkit/live**: [llms/live.txt](llms/live.txt) 21.2 KB
|
|
14
14
|
- **stitchkit/react**: [llms/react.txt](llms/react.txt) 8.6 KB
|
|
15
15
|
- **stitchkit/react/keyboard**: [llms/react-keyboard.txt](llms/react-keyboard.txt) 9.2 KB
|
|
@@ -33,7 +33,7 @@ Load the slice for each entrypoint your code imports — `import … from 'stitc
|
|
|
33
33
|
- **stitchkit/agent-runtime/openrouter**: [llms/agent-runtime-openrouter.txt](llms/agent-runtime-openrouter.txt) 1.1 KB
|
|
34
34
|
- **stitchkit/agent-runtime/sqlite/bun**: [llms/agent-runtime-sqlite-bun.txt](llms/agent-runtime-sqlite-bun.txt) 1.8 KB
|
|
35
35
|
- **stitchkit/agent-runtime/sqlite/node**: [llms/agent-runtime-sqlite-node.txt](llms/agent-runtime-sqlite-node.txt) 1.7 KB
|
|
36
|
-
- **stitchkit/application**: [llms/application.txt](llms/application.txt) 40.8 KB → [llms/application.2.txt](llms/application.2.txt)
|
|
36
|
+
- **stitchkit/application**: [llms/application.txt](llms/application.txt) 40.8 KB → [llms/application.2.txt](llms/application.2.txt) 31.3 KB → [llms/application.3.txt](llms/application.3.txt) 29.6 KB
|
|
37
37
|
- **stitchkit/application/grammy**: [llms/application-grammy.txt](llms/application-grammy.txt) 2.3 KB
|
|
38
38
|
- **stitchkit/application/opentelemetry**: [llms/application-opentelemetry.txt](llms/application-opentelemetry.txt) 1.6 KB
|
|
39
39
|
- **stitchkit/application/directory-inbox**: [llms/application-directory-inbox.txt](llms/application-directory-inbox.txt) 0.3 KB
|
|
@@ -59,10 +59,11 @@ Load the slice for each entrypoint your code imports — `import … from 'stitc
|
|
|
59
59
|
- **stitchkit/process**: [llms/process.txt](llms/process.txt) 45.8 KB
|
|
60
60
|
- **stitchkit/process/owner-loss**: [llms/process-owner-loss.txt](llms/process-owner-loss.txt) 0.9 KB
|
|
61
61
|
- **stitchkit/files/packaging**: [llms/files-packaging.txt](llms/files-packaging.txt) 3.5 KB
|
|
62
|
+
- **stitchkit/http**: [llms/http.txt](llms/http.txt) 0.9 KB
|
|
62
63
|
|
|
63
64
|
## Upgrading slices
|
|
64
65
|
- **Upgrading — how to move across versions**: [llms/upgrading.txt](llms/upgrading.txt) 12.2 KB
|
|
65
|
-
- **Upgrading 0.101.0 → 0.
|
|
66
|
+
- **Upgrading 0.101.0 → 0.110.0**: [llms/upgrading-0.101.0-0.110.0.txt](llms/upgrading-0.101.0-0.110.0.txt) 45.8 KB
|
|
66
67
|
- **Upgrading 0.74.0 → 0.100.0**: [llms/upgrading-0.74.0-0.100.0.txt](llms/upgrading-0.74.0-0.100.0.txt) 45.1 KB
|
|
67
68
|
- **Upgrading 0.61.0 → 0.73.0**: [llms/upgrading-0.61.0-0.73.0.txt](llms/upgrading-0.61.0-0.73.0.txt) 41.2 KB
|
|
68
69
|
- **Upgrading 0.44.0 → 0.60.0**: [llms/upgrading-0.44.0-0.60.0.txt](llms/upgrading-0.44.0-0.60.0.txt) 43.9 KB
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stitchkit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.110.0",
|
|
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",
|
|
@@ -256,6 +256,10 @@
|
|
|
256
256
|
"./files/packaging": {
|
|
257
257
|
"types": "./dist/entrypoints/files/packaging.d.ts",
|
|
258
258
|
"import": "./dist/entrypoints/files/packaging.js"
|
|
259
|
+
},
|
|
260
|
+
"./http": {
|
|
261
|
+
"types": "./dist/entrypoints/http.d.ts",
|
|
262
|
+
"import": "./dist/entrypoints/http.js"
|
|
259
263
|
}
|
|
260
264
|
},
|
|
261
265
|
"publishConfig": {
|
|
File without changes
|
|
File without changes
|