stitchkit 0.109.4 → 0.110.1
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 +28 -0
- package/dist/agent-runtime/store-conformance-support.d.ts +5 -5
- 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/browser/socket-io-client.d.ts +6 -0
- package/dist/browser/socket-io-client.d.ts.map +1 -0
- package/dist/browser/socket-io-contract.d.ts +183 -0
- package/dist/browser/socket-io-contract.d.ts.map +1 -0
- package/dist/browser/socket-io-default-peer.d.ts +3 -0
- package/dist/browser/socket-io-default-peer.d.ts.map +1 -0
- package/dist/browser/socket-io-explicit-peer.d.ts +12 -0
- package/dist/browser/socket-io-explicit-peer.d.ts.map +1 -0
- package/dist/browser/socket-io-peer.d.ts +2 -11
- package/dist/browser/socket-io-peer.d.ts.map +1 -1
- package/dist/browser/socket-io.d.ts +5 -224
- package/dist/browser/socket-io.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 +4 -4
- package/dist/entrypoints/agent-runtime/sandbox.js +3 -3
- package/dist/entrypoints/agent-runtime.js +6 -6
- package/dist/entrypoints/application/directory-inbox.js +6 -6
- package/dist/entrypoints/application.js +17 -9
- package/dist/entrypoints/cli/publish.js +2 -2
- package/dist/entrypoints/cli.js +9 -9
- package/dist/entrypoints/contract.js +2 -2
- package/dist/entrypoints/files.js +1 -1
- package/dist/entrypoints/http.d.ts +6 -0
- package/dist/entrypoints/http.d.ts.map +1 -0
- package/dist/entrypoints/http.js +32 -0
- package/dist/entrypoints/index.js +21 -412
- package/dist/entrypoints/node.js +3 -3
- package/dist/entrypoints/observability.js +1 -1
- 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/realtime.d.ts +6 -0
- package/dist/entrypoints/realtime.d.ts.map +1 -0
- package/dist/entrypoints/realtime.js +25 -0
- package/dist/entrypoints/remote.js +2 -2
- package/dist/entrypoints/server.js +8 -8
- package/dist/entrypoints/telegram/screens.js +6 -6
- package/dist/entrypoints/telegram.js +3 -3
- package/dist/entrypoints/testing.js +3 -3
- package/dist/entrypoints/tools/connections.js +3 -3
- package/dist/entrypoints/tools/invoker.js +3 -3
- package/dist/entrypoints/tools/mcp.js +4 -4
- package/dist/entrypoints/tools.js +24 -24
- package/dist/{index-3wm2xp2a.js → index-0d8m0kee.js} +1 -1
- package/dist/{index-5cw390s6.js → index-2tazbwhv.js} +6 -6
- package/dist/{index-hjvje0pf.js → index-506kd458.js} +1 -1
- package/dist/{index-dj1aycxw.js → index-84bf5spd.js} +0 -1
- package/dist/index-86sxnvpr.js +336 -0
- package/dist/{index-68y3n9j3.js → index-8rstkvcf.js} +3 -3
- package/dist/{index-tpk71wqn.js → index-924500c3.js} +1 -1
- package/dist/{index-kvvpw1kq.js → index-dd1z5kxb.js} +2 -2
- package/dist/{index-k3ty2b88.js → index-e1sjcjfy.js} +95 -20
- package/dist/{index-ryv32myz.js → index-ghwntn9n.js} +1 -1
- package/dist/index-hqsbtvta.js +92 -0
- package/dist/{index-e32vy8jw.js → index-jk44mbqb.js} +1 -1
- package/dist/{index-k4v2kq4q.js → index-mha6b4vk.js} +6 -6
- package/dist/{index-00v1qz76.js → index-p6apg0jg.js} +1 -1
- package/dist/{index-x5xs71dw.js → index-s2eybn7b.js} +8 -8
- package/dist/{index-njs9gvrh.js → index-s6d8zsha.js} +6 -6
- package/dist/{index-kc3jqqew.js → index-tjdsyrys.js} +2 -2
- package/dist/process/command-owner.d.ts.map +1 -1
- package/dist/process/group-presence.d.ts +3 -0
- package/dist/process/group-presence.d.ts.map +1 -0
- 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/realtime.txt +31 -0
- package/llms/stitchkit.txt +5 -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 +57 -8
- package/llms.txt +5 -3
- package/package.json +9 -1
- package/dist/{index-9j2atjte.js → index-2f9r0jgr.js} +3 -3
- package/dist/{index-299sm5tr.js → index-616xh7f2.js} +0 -0
- package/dist/{index-y70v24cw.js → index-8asb62xn.js} +0 -0
- package/dist/{index-k7qdkh3n.js → index-h1spd9kv.js} +3 -3
- package/dist/{index-qd8x73e8.js → index-k8fbzggr.js} +0 -0
- package/dist/{index-85qve8mq.js → index-pzw0fpek.js} +0 -0
- package/dist/{index-y3nemndz.js → index-r6v4mc67.js} +3 -3
- package/dist/{index-ktjmgq9p.js → index-s0xbnpfh.js} +3 -3
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
spawnBunChild,
|
|
12
12
|
spawnBunInheritedChild,
|
|
13
13
|
ownerLossGuardEntry
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-84bf5spd.js";
|
|
15
15
|
import {
|
|
16
16
|
raceAbort
|
|
17
17
|
} from "./index-b0kddvzw.js";
|
|
@@ -23,6 +23,73 @@ import {
|
|
|
23
23
|
assertPositiveSafeInteger
|
|
24
24
|
} from "./index-0s4xebbg.js";
|
|
25
25
|
|
|
26
|
+
// src/process/group-presence.ts
|
|
27
|
+
function processGroupExists(pid) {
|
|
28
|
+
try {
|
|
29
|
+
process.kill(-pid, 0);
|
|
30
|
+
return true;
|
|
31
|
+
} catch (error) {
|
|
32
|
+
if (error instanceof Error && "code" in error) {
|
|
33
|
+
if (error.code === "ESRCH")
|
|
34
|
+
return false;
|
|
35
|
+
if (process.platform === "darwin" && error.code === "EPERM")
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
throw error;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// src/process/group-settlement.ts
|
|
43
|
+
import { execFile } from "node:child_process";
|
|
44
|
+
function hasLiveGroupMember(table, group) {
|
|
45
|
+
for (const row of table.split(/\r?\n/)) {
|
|
46
|
+
if (!row.trim())
|
|
47
|
+
continue;
|
|
48
|
+
const fields = /^\s*(\d+)\s+(\S+)\s*$/.exec(row);
|
|
49
|
+
if (!fields)
|
|
50
|
+
throw new Error("Invalid process group observation");
|
|
51
|
+
if (Number(fields[1]) === group && !/^[ZX]/.test(fields[2] ?? ""))
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
function processGroups(timeoutMs) {
|
|
57
|
+
return new Promise((resolve, reject) => {
|
|
58
|
+
execFile("ps", ["-axo", "pgid=,stat="], { encoding: "utf8", timeout: timeoutMs, killSignal: "SIGKILL", maxBuffer: 1024 * 1024 }, (error, stdout) => {
|
|
59
|
+
if (error)
|
|
60
|
+
reject(new Error("Could not observe command process group settlement", { cause: error }));
|
|
61
|
+
else
|
|
62
|
+
resolve(stdout);
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
async function waitForProcessGroupExit(pid, deadline) {
|
|
67
|
+
if (pid === undefined)
|
|
68
|
+
return;
|
|
69
|
+
let observations = 0;
|
|
70
|
+
let lastStates = [];
|
|
71
|
+
for (;; ) {
|
|
72
|
+
const remaining = Math.ceil(deadline - performance.now());
|
|
73
|
+
if (remaining <= 0)
|
|
74
|
+
throw new Error("Command process group settlement was not confirmed after SIGKILL", {
|
|
75
|
+
cause: { groupId: pid, observations, lastStates }
|
|
76
|
+
});
|
|
77
|
+
if (!processGroupExists(pid))
|
|
78
|
+
return;
|
|
79
|
+
const table = await processGroups(remaining);
|
|
80
|
+
observations++;
|
|
81
|
+
if (!hasLiveGroupMember(table, pid))
|
|
82
|
+
return;
|
|
83
|
+
lastStates = table.split(/\r?\n/).flatMap((row) => {
|
|
84
|
+
const fields = /^\s*(\d+)\s+(\S+)\s*$/.exec(row);
|
|
85
|
+
return Number(fields?.[1]) === pid ? [fields?.[2] ?? "unknown"] : [];
|
|
86
|
+
}).slice(0, 16);
|
|
87
|
+
if (!processGroupExists(pid))
|
|
88
|
+
return;
|
|
89
|
+
await sleep(Math.min(5, Math.max(0, deadline - performance.now())));
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
26
93
|
// src/process/group.ts
|
|
27
94
|
function createCommandDeadline(timeoutMs, reason) {
|
|
28
95
|
assertPositiveSafeInteger("Command deadline", timeoutMs, RangeError);
|
|
@@ -66,16 +133,7 @@ function signalGroup(pid, signal) {
|
|
|
66
133
|
function exists(pid) {
|
|
67
134
|
if (pid === undefined)
|
|
68
135
|
return false;
|
|
69
|
-
|
|
70
|
-
process.kill(-pid, 0);
|
|
71
|
-
return true;
|
|
72
|
-
} catch (error) {
|
|
73
|
-
if (isErrno(error, "ESRCH"))
|
|
74
|
-
return false;
|
|
75
|
-
if (deniedOnDarwin(error))
|
|
76
|
-
return true;
|
|
77
|
-
throw error;
|
|
78
|
-
}
|
|
136
|
+
return processGroupExists(pid);
|
|
79
137
|
}
|
|
80
138
|
async function signalUntilSettled(pid, signal, deadline) {
|
|
81
139
|
for (;; ) {
|
|
@@ -89,11 +147,18 @@ async function signalUntilSettled(pid, signal, deadline) {
|
|
|
89
147
|
}
|
|
90
148
|
}
|
|
91
149
|
}
|
|
150
|
+
async function killAndSettleGroup(pid, deadline, cleanupTimeoutMs) {
|
|
151
|
+
const cleanupDeadline = Math.min(deadline, performance.now() + cleanupTimeoutMs);
|
|
152
|
+
const signalled = await signalUntilSettled(pid, "SIGKILL", cleanupDeadline);
|
|
153
|
+
if (signalled)
|
|
154
|
+
await waitForProcessGroupExit(pid, cleanupDeadline);
|
|
155
|
+
return signalled;
|
|
156
|
+
}
|
|
92
157
|
async function stopCommandGroup(stop) {
|
|
93
158
|
const { pid, policy } = stop;
|
|
94
159
|
const deadline = performance.now() + policy.graceMs + stop.cleanupTimeoutMs;
|
|
95
160
|
if (stop.force || policy.killOn?.aborted)
|
|
96
|
-
return
|
|
161
|
+
return killAndSettleGroup(pid, deadline, stop.cleanupTimeoutMs);
|
|
97
162
|
if (!await signalUntilSettled(pid, policy.signal, deadline))
|
|
98
163
|
return false;
|
|
99
164
|
const until = performance.now() + policy.graceMs;
|
|
@@ -110,7 +175,7 @@ async function stopCommandGroup(stop) {
|
|
|
110
175
|
present = exists(pid);
|
|
111
176
|
}
|
|
112
177
|
if (present)
|
|
113
|
-
await
|
|
178
|
+
await killAndSettleGroup(pid, deadline, stop.cleanupTimeoutMs);
|
|
114
179
|
return true;
|
|
115
180
|
}
|
|
116
181
|
async function stopCommandLeader(stop) {
|
|
@@ -136,7 +201,7 @@ async function stopCommandLeader(stop) {
|
|
|
136
201
|
policy.killOn?.removeEventListener("abort", end);
|
|
137
202
|
grace.abort();
|
|
138
203
|
}
|
|
139
|
-
return await
|
|
204
|
+
return await killAndSettleGroup(pid, deadline, stop.cleanupTimeoutMs) || signalled;
|
|
140
205
|
}
|
|
141
206
|
async function stopLeaderAlone(stop) {
|
|
142
207
|
const { leader, policy } = stop;
|
|
@@ -676,8 +741,13 @@ function createLeaderSettlement(options, signal) {
|
|
|
676
741
|
function createOutputDrain(options, signal) {
|
|
677
742
|
const captured = { stdout: [], stderr: [] };
|
|
678
743
|
let total = 0;
|
|
679
|
-
const drain = async (stream, channel) => {
|
|
744
|
+
const drain = async (stream, channel, admitted) => {
|
|
745
|
+
let admission = admitted;
|
|
680
746
|
for await (const chunk of stream) {
|
|
747
|
+
if (admission) {
|
|
748
|
+
await admission;
|
|
749
|
+
admission = undefined;
|
|
750
|
+
}
|
|
681
751
|
if (signal.aborted)
|
|
682
752
|
continue;
|
|
683
753
|
if (!(chunk instanceof Uint8Array))
|
|
@@ -877,15 +947,19 @@ function startNativeCommand(input, onSpawn, driver) {
|
|
|
877
947
|
throw commandCleanupError(cause);
|
|
878
948
|
}
|
|
879
949
|
};
|
|
950
|
+
const admitted = Promise.withResolvers();
|
|
880
951
|
const run = (async () => {
|
|
881
952
|
try {
|
|
882
|
-
const
|
|
883
|
-
if (pid !== undefined)
|
|
884
|
-
options.onLeaderStarted?.({ pid });
|
|
953
|
+
const started = launched.start();
|
|
885
954
|
const drains = Promise.all([
|
|
886
|
-
output.drain(stdout, "stdout"),
|
|
887
|
-
output.drain(stderr, "stderr")
|
|
955
|
+
output.drain(stdout, "stdout", admitted.promise),
|
|
956
|
+
output.drain(stderr, "stderr", admitted.promise)
|
|
888
957
|
]);
|
|
958
|
+
drains.catch((error) => controller.abort(error));
|
|
959
|
+
const pid = await raceAbort(started, controller.signal);
|
|
960
|
+
if (pid !== undefined)
|
|
961
|
+
options.onLeaderStarted?.({ pid });
|
|
962
|
+
admitted.resolve();
|
|
889
963
|
await raceAbort(Promise.all([drains, leader.then(settleLeader)]), controller.signal);
|
|
890
964
|
const status = await raceAbort(closed, controller.signal);
|
|
891
965
|
if (spawnFailure !== undefined)
|
|
@@ -897,6 +971,7 @@ function startNativeCommand(input, onSpawn, driver) {
|
|
|
897
971
|
};
|
|
898
972
|
} catch (error) {
|
|
899
973
|
controller.abort(error);
|
|
974
|
+
admitted.resolve();
|
|
900
975
|
await cleanupNativeCommand({
|
|
901
976
|
error,
|
|
902
977
|
transport: acquired,
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ApiError2
|
|
3
|
+
} from "./index-kfjkb396.js";
|
|
4
|
+
import {
|
|
5
|
+
sleep
|
|
6
|
+
} from "./index-eemvahkc.js";
|
|
7
|
+
|
|
8
|
+
// src/browser/chunked-upload.ts
|
|
9
|
+
function isRetryableUploadFailure(error) {
|
|
10
|
+
if (ApiError2.is(error)) {
|
|
11
|
+
if (error.status === 0)
|
|
12
|
+
return error.code === "UNKNOWN_ERROR" || error.code === "REQUEST_TIMEOUT";
|
|
13
|
+
return error.status === 429 || error.status >= 500;
|
|
14
|
+
}
|
|
15
|
+
return error instanceof TypeError;
|
|
16
|
+
}
|
|
17
|
+
async function uploadInChunks2(config) {
|
|
18
|
+
const { file, chunkBytes, signal } = config;
|
|
19
|
+
if (!Number.isSafeInteger(chunkBytes) || chunkBytes <= 0) {
|
|
20
|
+
throw new TypeError("uploadInChunks: chunkBytes must be a positive integer");
|
|
21
|
+
}
|
|
22
|
+
if (!Number.isSafeInteger(file.size) || file.size < 0) {
|
|
23
|
+
throw new TypeError("uploadInChunks: the file size must be a whole number of bytes");
|
|
24
|
+
}
|
|
25
|
+
if (file.size === 0)
|
|
26
|
+
throw new TypeError("uploadInChunks: the file is empty");
|
|
27
|
+
const totalBytes = file.size;
|
|
28
|
+
const chunkCount = Math.ceil(totalBytes / chunkBytes);
|
|
29
|
+
const uploadId = config.uploadId ?? crypto.randomUUID();
|
|
30
|
+
const retries = config.retries ?? 3;
|
|
31
|
+
const retryDelayMs = config.retryDelayMs ?? 1000;
|
|
32
|
+
const report = (sentBytes, index, attempt) => {
|
|
33
|
+
if (!config.onProgress)
|
|
34
|
+
return;
|
|
35
|
+
try {
|
|
36
|
+
config.onProgress({ sentBytes, totalBytes, index, chunkCount, attempt });
|
|
37
|
+
} catch {}
|
|
38
|
+
};
|
|
39
|
+
throwIfAborted(signal);
|
|
40
|
+
const opened = await repeating(() => config.init({ uploadId, totalBytes, chunkBytes, chunkCount }, { signal }), { retries, retryDelayMs, signal });
|
|
41
|
+
if (opened) {
|
|
42
|
+
report(totalBytes, chunkCount, 1);
|
|
43
|
+
return opened.finished;
|
|
44
|
+
}
|
|
45
|
+
report(0, 0, 1);
|
|
46
|
+
for (let index = 0;index < chunkCount; index += 1) {
|
|
47
|
+
throwIfAborted(signal);
|
|
48
|
+
const start = index * chunkBytes;
|
|
49
|
+
const end = Math.min(totalBytes, start + chunkBytes);
|
|
50
|
+
const partBytes = end - start;
|
|
51
|
+
const bytes = file.slice(start, end);
|
|
52
|
+
await repeating((attempt) => config.chunk({ uploadId, index, bytes }, {
|
|
53
|
+
...signal && { signal },
|
|
54
|
+
onUploadProgress: (progress) => report(start + fileShare(progress, partBytes), index, attempt)
|
|
55
|
+
}), { retries, retryDelayMs, signal });
|
|
56
|
+
report(end, index + 1, 1);
|
|
57
|
+
}
|
|
58
|
+
throwIfAborted(signal);
|
|
59
|
+
return config.finalize({ uploadId }, { signal });
|
|
60
|
+
}
|
|
61
|
+
function fileShare(progress, partBytes) {
|
|
62
|
+
if (progress.totalBytes === 0)
|
|
63
|
+
return 0;
|
|
64
|
+
return Math.floor(partBytes * progress.sentBytes / progress.totalBytes);
|
|
65
|
+
}
|
|
66
|
+
async function repeating(call, {
|
|
67
|
+
retries,
|
|
68
|
+
retryDelayMs,
|
|
69
|
+
signal
|
|
70
|
+
}) {
|
|
71
|
+
for (let attempt = 1;; attempt += 1) {
|
|
72
|
+
try {
|
|
73
|
+
return await call(attempt);
|
|
74
|
+
} catch (error) {
|
|
75
|
+
if (signal?.aborted || attempt > retries || !isRetryableUploadFailure(error))
|
|
76
|
+
throw error;
|
|
77
|
+
try {
|
|
78
|
+
await sleep(retryDelayMs * 2 ** (attempt - 1), signal);
|
|
79
|
+
} catch (aborted) {
|
|
80
|
+
throwIfAborted(signal);
|
|
81
|
+
throw aborted;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
function throwIfAborted(signal) {
|
|
87
|
+
if (signal?.aborted) {
|
|
88
|
+
throw new ApiError2("REQUEST_ABORTED", { status: 0, message: "Request was aborted" });
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export { uploadInChunks2 };
|
|
@@ -10,13 +10,16 @@ import {
|
|
|
10
10
|
projectToolView,
|
|
11
11
|
objectShapeKeys
|
|
12
12
|
} from "./index-q6crhe1n.js";
|
|
13
|
+
import {
|
|
14
|
+
runWithRequestContext2,
|
|
15
|
+
getRequestContext2
|
|
16
|
+
} from "./index-r6v4mc67.js";
|
|
13
17
|
import {
|
|
14
18
|
projectedToolError
|
|
15
19
|
} from "./index-556g5hsh.js";
|
|
16
20
|
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} from "./index-y3nemndz.js";
|
|
21
|
+
isUnsafeKey
|
|
22
|
+
} from "./index-zsarb5xp.js";
|
|
20
23
|
import {
|
|
21
24
|
formatZodError2
|
|
22
25
|
} from "./index-1eeqpadm.js";
|
|
@@ -26,9 +29,6 @@ import {
|
|
|
26
29
|
isRetryableStatus2,
|
|
27
30
|
isStitchErrorCode2
|
|
28
31
|
} from "./index-j9gxbztg.js";
|
|
29
|
-
import {
|
|
30
|
-
isUnsafeKey
|
|
31
|
-
} from "./index-zsarb5xp.js";
|
|
32
32
|
import {
|
|
33
33
|
isRecord
|
|
34
34
|
} from "./index-9jfdm5tg.js";
|
|
@@ -383,7 +383,7 @@ function shouldRetryBunNetworkError(error) {
|
|
|
383
383
|
if (!(error instanceof Error))
|
|
384
384
|
return;
|
|
385
385
|
const code = Object.getOwnPropertyDescriptor(error, "code");
|
|
386
|
-
return code && "value" in code && code.value === "ConnectionRefused" ? true : undefined;
|
|
386
|
+
return code && "value" in code && (code.value === "ConnectionRefused" || code.value === "ECONNREFUSED") ? true : undefined;
|
|
387
387
|
}
|
|
388
388
|
function parseApiErrorBody(body) {
|
|
389
389
|
if (!isRecord(body) || !isRecord(body.error))
|
|
@@ -13,15 +13,12 @@ import {
|
|
|
13
13
|
parseToolCallArguments,
|
|
14
14
|
toolResultFromError,
|
|
15
15
|
observed
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-mha6b4vk.js";
|
|
17
17
|
import {
|
|
18
18
|
collectTools2,
|
|
19
19
|
createToolRunner,
|
|
20
20
|
formatToolError
|
|
21
|
-
} from "./index-
|
|
22
|
-
import {
|
|
23
|
-
collectToolSurface
|
|
24
|
-
} from "./index-3wm2xp2a.js";
|
|
21
|
+
} from "./index-ghwntn9n.js";
|
|
25
22
|
import {
|
|
26
23
|
DEFAULT_CORS_ALLOW_HEADERS2,
|
|
27
24
|
DEFAULT_PROCESS_SIGNALS,
|
|
@@ -33,15 +30,18 @@ import {
|
|
|
33
30
|
redact2
|
|
34
31
|
} from "./index-e6c2spsd.js";
|
|
35
32
|
import {
|
|
36
|
-
|
|
37
|
-
} from "./index-
|
|
33
|
+
collectToolSurface
|
|
34
|
+
} from "./index-0d8m0kee.js";
|
|
38
35
|
import {
|
|
39
36
|
runWithRequestContext2,
|
|
40
37
|
getRequestContext2
|
|
41
|
-
} from "./index-
|
|
38
|
+
} from "./index-r6v4mc67.js";
|
|
42
39
|
import {
|
|
43
40
|
AppError2
|
|
44
41
|
} from "./index-j9gxbztg.js";
|
|
42
|
+
import {
|
|
43
|
+
argumentsDigest
|
|
44
|
+
} from "./index-r7a7r7ha.js";
|
|
45
45
|
import {
|
|
46
46
|
compareCodeUnits,
|
|
47
47
|
serializeCanonicalJson
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
import {
|
|
27
27
|
bindContract,
|
|
28
28
|
mediaTypeEssence
|
|
29
|
-
} from "./index-
|
|
29
|
+
} from "./index-pzw0fpek.js";
|
|
30
30
|
import {
|
|
31
31
|
assertPositiveSafeInteger
|
|
32
32
|
} from "./index-0s4xebbg.js";
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
getRequestContext2,
|
|
47
47
|
setRequestEndpoint2,
|
|
48
48
|
setRequestError2
|
|
49
|
-
} from "./index-
|
|
49
|
+
} from "./index-r6v4mc67.js";
|
|
50
50
|
import {
|
|
51
51
|
resolveTraceId2,
|
|
52
52
|
resolveSocketIp2,
|
|
@@ -54,6 +54,10 @@ import {
|
|
|
54
54
|
getClientInfo2,
|
|
55
55
|
parseQueryParams
|
|
56
56
|
} from "./index-kw1ws0cs.js";
|
|
57
|
+
import {
|
|
58
|
+
isUnsafeKey,
|
|
59
|
+
safeJsonParse
|
|
60
|
+
} from "./index-zsarb5xp.js";
|
|
57
61
|
import {
|
|
58
62
|
AppError2,
|
|
59
63
|
badRequest2,
|
|
@@ -62,10 +66,6 @@ import {
|
|
|
62
66
|
import {
|
|
63
67
|
resolveTraceContext2
|
|
64
68
|
} from "./index-yex7eg1v.js";
|
|
65
|
-
import {
|
|
66
|
-
isUnsafeKey,
|
|
67
|
-
safeJsonParse
|
|
68
|
-
} from "./index-zsarb5xp.js";
|
|
69
69
|
import {
|
|
70
70
|
isRecord,
|
|
71
71
|
transportResult
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./index-2kbysk9s.js";
|
|
4
4
|
import {
|
|
5
5
|
NativeCommandError2
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-84bf5spd.js";
|
|
7
7
|
import {
|
|
8
8
|
probeAgentProcessSandboxOutcome,
|
|
9
9
|
missingSandboxRestrictions2,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
import {
|
|
15
15
|
CommandStopped,
|
|
16
16
|
startNativeCommand
|
|
17
|
-
} from "./index-
|
|
17
|
+
} from "./index-e1sjcjfy.js";
|
|
18
18
|
import {
|
|
19
19
|
NumericFileHandle,
|
|
20
20
|
descriptorPath,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-owner.d.ts","sourceRoot":"","sources":["../../src/process/command-owner.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG9C,OAAO,EAEL,KAAK,oBAAoB,EAI1B,MAAM,YAAY,CAAC;AAEpB,OAAO,EAEL,KAAK,yBAAyB,EAG/B,MAAM,UAAU,CAAC;AAQlB,wFAAwF;AACxF,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,oBAAoB,EAC3B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,EACrC,MAAM,CAAC,EAAE,yBAAyB;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"command-owner.d.ts","sourceRoot":"","sources":["../../src/process/command-owner.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG9C,OAAO,EAEL,KAAK,oBAAoB,EAI1B,MAAM,YAAY,CAAC;AAEpB,OAAO,EAEL,KAAK,yBAAyB,EAG/B,MAAM,UAAU,CAAC;AAQlB,wFAAwF;AACxF,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,oBAAoB,EAC3B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,EACrC,MAAM,CAAC,EAAE,yBAAyB;;;;;;;;;;EAqLnC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group-presence.d.ts","sourceRoot":"","sources":["../../src/process/group-presence.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAWvD"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** `killpg(..., 0)` also sees Linux zombies; only live members can still perform work. */
|
|
2
|
+
export declare function hasLiveGroupMember(table: string, group: number): boolean;
|
|
3
|
+
/** A delivered SIGKILL is asynchronous; do not report cleanup until every group member is dead. */
|
|
4
|
+
export declare function waitForProcessGroupExit(pid: number | undefined, deadline: number): Promise<void>;
|
|
5
|
+
//# sourceMappingURL=group-settlement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group-settlement.d.ts","sourceRoot":"","sources":["../../src/process/group-settlement.ts"],"names":[],"mappings":"AAIA,0FAA0F;AAC1F,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAQxE;AAmBD,mGAAmG;AACnG,wBAAsB,uBAAuB,CAC3C,GAAG,EAAE,MAAM,GAAG,SAAS,EACvB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,CAAC,CA0Bf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group.d.ts","sourceRoot":"","sources":["../../src/process/group.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,KAAK,6BAA6B,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"group.d.ts","sourceRoot":"","sources":["../../src/process/group.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,KAAK,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAIpF,+FAA+F;AAC/F,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO;IAYpE,MAAM;IACN,MAAM;EAIT;AAeD,gGAAgG;AAChG,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,OAAO,GAAG,OAAO,CASpF;AAsCD,sGAAsG;AACtG,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,6BAA6B,CAAC;IAC/C,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,gEAAgE;IAChE,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;CACzB;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC,CAmB/E;AAED,gGAAgG;AAChG,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CACpC;AAED;;;;;;;;GAQG;AACH,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,gBAAgB,GAAG;IAAE,MAAM,EAAE,aAAa,CAAC;IAAC,UAAU,EAAE,OAAO,CAAC,OAAO,CAAC,CAAA;CAAE,GAC/E,OAAO,CAAC,OAAO,CAAC,CAsBlB;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CAAC,IAAI,EAAE;IAC1C,MAAM,EAAE,aAAa,CAAC;IACtB,MAAM,EAAE,6BAA6B,CAAC;IACtC,UAAU,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7B,KAAK,EAAE,OAAO,CAAC;CAChB,GAAG,OAAO,CAAC,OAAO,CAAC,CAyBnB;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,kBAAkB,CAItE;AAED,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAMxF"}
|
|
@@ -4,7 +4,7 @@ import { type ParsedNativeCommandOptions } from './contract.js';
|
|
|
4
4
|
* captured bytes per channel and the `onOutput` sink, all under the command's lifetime signal.
|
|
5
5
|
*/
|
|
6
6
|
export declare function createOutputDrain(options: ParsedNativeCommandOptions, signal: AbortSignal): {
|
|
7
|
-
drain: (stream: AsyncIterable<Uint8Array>, channel: 'stdout' | 'stderr') => Promise<void>;
|
|
7
|
+
drain: (stream: AsyncIterable<Uint8Array>, channel: 'stdout' | 'stderr', admitted?: Promise<void>) => Promise<void>;
|
|
8
8
|
/** The captured bytes of each channel; empty unless `capture` was set. */
|
|
9
9
|
captured: () => {
|
|
10
10
|
stdout: Buffer<ArrayBuffer>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output-drain.d.ts","sourceRoot":"","sources":["../../src/process/output-drain.ts"],"names":[],"mappings":"AACA,OAAO,EAAsB,KAAK,0BAA0B,EAAE,MAAM,YAAY,CAAC;AAEjF;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,0BAA0B,EAAE,MAAM,EAAE,WAAW;
|
|
1
|
+
{"version":3,"file":"output-drain.d.ts","sourceRoot":"","sources":["../../src/process/output-drain.ts"],"names":[],"mappings":"AACA,OAAO,EAAsB,KAAK,0BAA0B,EAAE,MAAM,YAAY,CAAC;AAEjF;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,0BAA0B,EAAE,MAAM,EAAE,WAAW;oBAI9E,aAAa,CAAC,UAAU,CAAC,WACxB,QAAQ,GAAG,QAAQ,aACjB,OAAO,CAAC,IAAI,CAAC;IAuCxB,0EAA0E;;QAExE,MAAM;QACN,MAAM;;EAGX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"owner-loss-control.d.ts","sourceRoot":"","sources":["../../src/process/owner-loss-control.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAe1C,UAAU,YAAY;IACpB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,GAAG,OAAO,CAAC;CAC5F;AASD,2FAA2F;AAC3F,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAOlE;AAQD,mFAAmF;AACnF,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"owner-loss-control.d.ts","sourceRoot":"","sources":["../../src/process/owner-loss-control.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAe1C,UAAU,YAAY;IACpB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,GAAG,OAAO,CAAC;CAC5F;AASD,2FAA2F;AAC3F,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAOlE;AAQD,mFAAmF;AACnF,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAwDjF;AAED,gGAAgG;AAChG,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAG7E;AAED,oGAAoG;AACpG,wBAAsB,iBAAiB,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAIxF"}
|
package/llms/application.2.txt
CHANGED
|
@@ -32,12 +32,13 @@ ever became ready:
|
|
|
32
32
|
| newest run | same pid | version | `previousExit` | predecessor's `termination` |
|
|
33
33
|
|---|---|---|---|---|
|
|
34
34
|
| none | — | — | `first-boot` | — |
|
|
35
|
-
| recorded `stoppedAt` | — | — |
|
|
35
|
+
| recorded `stoppedAt` | — | — | the recorded termination, including `interrupted` | unchanged |
|
|
36
36
|
| still open | yes | — | `hot-reload` | `hot-reload`, closed at the new start |
|
|
37
37
|
| still open | no | changed | `handoff` (default) | stays open; it records its own stop later |
|
|
38
|
-
| still open | no | changed, `versionChangeOverlap: 'abnormal'` | `abnormal` / `startup-failed` | closed at the new start, as for the same version |
|
|
39
|
-
| still
|
|
40
|
-
| still
|
|
38
|
+
| still open | no | changed, `versionChangeOverlap: 'abnormal'` | `interrupted` / `abnormal` / `startup-failed` | closed at the new start, as for the same version |
|
|
39
|
+
| still draining | no | same or non-overlapping build | `interrupted` | closed at the new start; its death time and kill signal are unknown |
|
|
40
|
+
| still active, was ready | no | same | `abnormal` (default) | `abnormal`, closed at the new start — an upper bound, the crash time is unknown |
|
|
41
|
+
| still active, never ready | no | same | `startup-failed` (default) | `startup-failed`, closed at the new start |
|
|
41
42
|
|
|
42
43
|
Every other open run the start finds was abandoned too and is closed the same
|
|
43
44
|
way — two crashes in a row leave two open runs, and both are closed, not only
|
|
@@ -66,10 +67,12 @@ The ledger records what the process says while it can say it. stitchkit never
|
|
|
66
67
|
calls `process.exit` (ADR 0074), so a stop is recorded on the kernel's `close`
|
|
67
68
|
or `force` path, both awaited. An application that exits the process on its
|
|
68
69
|
own before its shutdown settles loses that last write; the successor then
|
|
69
|
-
finds the
|
|
70
|
+
finds the unfinished drain and closes it as `interrupted`, keeping the `unavailableAt`
|
|
70
71
|
already recorded — which is why the drain moment is written first, at
|
|
71
72
|
`stopAdmission`, and the downtime survives a stop that was never recorded.
|
|
72
73
|
|
|
74
|
+
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`.
|
|
75
|
+
|
|
73
76
|
The `abnormal` default is a choice, and it is the single-process deployment:
|
|
74
77
|
one process per build, a new pid of the same build means the old one stopped
|
|
75
78
|
answering. Where processes of **one** build overlap on purpose — a cluster, a
|
package/llms/application.3.txt
CHANGED
|
@@ -14,6 +14,9 @@ Parts of this slice:
|
|
|
14
14
|
|
|
15
15
|
## `stitchkit/application`
|
|
16
16
|
|
|
17
|
+
`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.
|
|
18
|
+
|
|
19
|
+
|
|
17
20
|
Server-only process-local application composition. See the
|
|
18
21
|
[application kernel guide](../guide/application-kernel.md) and
|
|
19
22
|
[architecture](../architecture/application-kernel.md). Complete consumer
|
package/llms/http.txt
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# stitchkit/http — stitchkit docs slice
|
|
2
|
+
|
|
3
|
+
> Generated from the `docs/` tree by `bun run gen:llms`. The index of all slices is
|
|
4
|
+
> `llms.txt` in this package.
|
|
5
|
+
|
|
6
|
+
Contains: API reference: `stitchkit/http` (docs/api/reference.md)
|
|
7
|
+
|
|
8
|
+
==============================================================================
|
|
9
|
+
# API reference: `stitchkit/http` (docs/api/reference.md)
|
|
10
|
+
==============================================================================
|
|
11
|
+
|
|
12
|
+
## `stitchkit/http`
|
|
13
|
+
|
|
14
|
+
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`.
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
import { createClients, createHttpClient } from 'stitchkit/http';
|
|
18
|
+
import { defineContract } from 'stitchkit/contract';
|
|
19
|
+
```
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# stitchkit/realtime — stitchkit docs slice
|
|
2
|
+
|
|
3
|
+
> Generated from the `docs/` tree by `bun run gen:llms`. The index of all slices is
|
|
4
|
+
> `llms.txt` in this package.
|
|
5
|
+
|
|
6
|
+
Contains: API reference: `stitchkit/realtime` (docs/api/reference.md)
|
|
7
|
+
|
|
8
|
+
==============================================================================
|
|
9
|
+
# API reference: `stitchkit/realtime` (docs/api/reference.md)
|
|
10
|
+
==============================================================================
|
|
11
|
+
|
|
12
|
+
## `stitchkit/realtime`
|
|
13
|
+
|
|
14
|
+
Hermes-safe realtime clients reuse the root transport and contract implementation. Both
|
|
15
|
+
`createRealtimeClient` and `createSocketIOClient` require `peers.client` here; no default
|
|
16
|
+
computed import enters this graph. Root clients retain their optional lazy runtime loader.
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
import { createRealtimeClient, defineRealtimeContract } from 'stitchkit/realtime';
|
|
20
|
+
const client = createRealtimeClient(contract, {
|
|
21
|
+
url,
|
|
22
|
+
peers: { client: () => import('socket.io-client') },
|
|
23
|
+
});
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Native consumers import HTTP factories, `ApiError`, `createUrlBuilder`,
|
|
27
|
+
`contractEndpointMatchers` and `uploadInChunks` from `stitchkit/http`; schema factories,
|
|
28
|
+
`ContractDef` and `paginatedSchema` from `stitchkit/contract`; realtime factories,
|
|
29
|
+
`RealtimeClient`, `defineRealtimeContract`, `InferRealtimeEventMap`, `createRetainedTopics`
|
|
30
|
+
and `RetainedTopics` from `stitchkit/realtime`. `createQueryClientFactory` remains in
|
|
31
|
+
`stitchkit/react`. Shared modules must use the same public leaves throughout their graph.
|
package/llms/stitchkit.txt
CHANGED
|
@@ -56,6 +56,8 @@ own, recorded as an ADR.
|
|
|
56
56
|
| Import | Use in | Maturity | Holds |
|
|
57
57
|
|--------|--------|----------|-------|
|
|
58
58
|
| `stitchkit` | browser **and** server | stable | `defineContract`, `createClient`, `createHttpClient`, `createSocketIOClient`, `parseSSE`, the error model |
|
|
59
|
+
| `stitchkit/http` | browser, React Native/Hermes **and** server | evolving | typed HTTP client factories and `ApiError`, without optional realtime peers |
|
|
60
|
+
| `stitchkit/realtime` | browser, React Native/Hermes **and** server | evolving | typed realtime clients and retained topics with a required explicit Socket.IO peer loader |
|
|
59
61
|
| `stitchkit/contract` | browser **and** server | stable | the contract layer alone — `defineContract`, errors, pagination |
|
|
60
62
|
| `stitchkit/live` | browser **and** server | evolving | `defineEvents` — topic declarations beside the operation contract — and watched reads: `createWatchClient`, the value/difference frame and its reassembly |
|
|
61
63
|
| `stitchkit/primitives` | browser **and** server | evolving | generic values and declarations for lifecycle, access, audit, delivery and exports |
|
|
@@ -83,12 +85,12 @@ own, recorded as an ADR.
|
|
|
83
85
|
| `stitchkit/geo` | server (Bun or Node) | evolving | managed GeoIP reader generations, last-known-good reload and the optional MaxMind adapter |
|
|
84
86
|
| `stitchkit/oauth` | browser **and** server | evolving | provider-neutral Authorization Code + PKCE request and one-shot callback transaction mechanics |
|
|
85
87
|
| `stitchkit/google` | server (Bun or Node) | evolving | optional Google code exchange and verified OIDC identity adapter |
|
|
86
|
-
| `stitchkit/observability` | server | stable<br>_redefined in 2 of the
|
|
88
|
+
| `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 |
|
|
87
89
|
| `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 |
|
|
88
90
|
| `stitchkit/declaration` | browser + build and deployment tooling (Bun or Node) | evolving | `ProjectDeclarationSchema` — the one machine-readable statement a repository makes about itself |
|
|
89
91
|
| `stitchkit/react` | browser + server rendering | stable | `createCursorQuery`, `createCacheBridge`, QueryClient and `ApiError` retry policy |
|
|
90
92
|
| `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) |
|
|
91
|
-
| `stitchkit/agent-runtime` | server | evolving<br>_redefined in 23 of the
|
|
93
|
+
| `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 |
|
|
92
94
|
| `stitchkit/agent-runtime/sandbox` | server | evolving | optional Linux Bubblewrap sessions, durable workspaces and a host HTTP credential gateway; see [sandbox guide](sandbox.md) |
|
|
93
95
|
| `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 |
|
|
94
96
|
| `stitchkit/agent-runtime/harness` | server | evolving | resource-aware process-local facade over the canonical Agent runtime; supervision stays outside |
|
|
@@ -100,7 +102,7 @@ own, recorded as an ADR.
|
|
|
100
102
|
| `stitchkit/agent-runtime/sqlite/bun` | server (Bun) | evolving | durable built-in SQLite store for the agent runtime |
|
|
101
103
|
| `stitchkit/agent-runtime/sqlite/node` | server (Node ≥ 22.5) | evolving | durable built-in SQLite store for the agent runtime |
|
|
102
104
|
| `stitchkit-tui` | terminal (Bun) | evolving | optional official OpenTUI host over a caller-composed headless runtime |
|
|
103
|
-
| `stitchkit/application` | browser + server | evolving<br>_redefined in
|
|
105
|
+
| `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 |
|
|
104
106
|
| `stitchkit/application/grammy` | server | evolving | a grammY bot as application resources — configuration, then polling with updates admitted by batch — and the webhook adapter |
|
|
105
107
|
| `stitchkit/application/opentelemetry` | server | evolving | maps application snapshots onto an injected OpenTelemetry `Meter` |
|
|
106
108
|
| `stitchkit/application/schemas` | browser + server | evolving | the application's snapshot, health and shutdown schemas alone, without the kernel |
|