stitchkit 0.128.0 → 0.129.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 +57 -0
- package/dist/agent-executor/claude/transcript.d.ts +2 -2
- package/dist/agent-executor/claude/transcript.d.ts.map +1 -1
- package/dist/agent-executor/claude-sdk/controls.d.ts +19 -0
- package/dist/agent-executor/claude-sdk/controls.d.ts.map +1 -0
- package/dist/agent-executor/claude-sdk/driver.d.ts +114 -4
- package/dist/agent-executor/claude-sdk/driver.d.ts.map +1 -1
- package/dist/agent-executor/claude-sdk/query-loop.d.ts +46 -0
- package/dist/agent-executor/claude-sdk/query-loop.d.ts.map +1 -0
- package/dist/agent-executor/claude-sdk/query-options.d.ts +27 -0
- package/dist/agent-executor/claude-sdk/query-options.d.ts.map +1 -0
- package/dist/agent-executor/claude-sdk/session.d.ts +6 -5
- package/dist/agent-executor/claude-sdk/session.d.ts.map +1 -1
- package/dist/agent-executor/codex/classify.d.ts.map +1 -1
- package/dist/agent-executor/codex/connect.d.ts +45 -0
- package/dist/agent-executor/codex/connect.d.ts.map +1 -0
- package/dist/agent-executor/codex/driver.d.ts +51 -10
- package/dist/agent-executor/codex/driver.d.ts.map +1 -1
- package/dist/agent-executor/codex/limits.d.ts +11 -2
- package/dist/agent-executor/codex/limits.d.ts.map +1 -1
- package/dist/agent-executor/codex/protocol.d.ts +49 -4
- package/dist/agent-executor/codex/protocol.d.ts.map +1 -1
- package/dist/agent-executor/codex/session-controls.d.ts +155 -0
- package/dist/agent-executor/codex/session-controls.d.ts.map +1 -0
- package/dist/agent-executor/codex/session.d.ts +27 -31
- package/dist/agent-executor/codex/session.d.ts.map +1 -1
- package/dist/agent-executor/codex/unix-socket-target.d.ts +26 -0
- package/dist/agent-executor/codex/unix-socket-target.d.ts.map +1 -0
- package/dist/agent-executor/codex/unix-socket.d.ts +26 -0
- package/dist/agent-executor/codex/unix-socket.d.ts.map +1 -0
- package/dist/agent-executor/codex/ws-frame.d.ts +15 -0
- package/dist/agent-executor/codex/ws-frame.d.ts.map +1 -0
- package/dist/agent-executor/contract.d.ts +2 -0
- package/dist/agent-executor/contract.d.ts.map +1 -1
- package/dist/agent-executor/engine-process.d.ts +9 -0
- package/dist/agent-executor/engine-process.d.ts.map +1 -1
- package/dist/agent-executor/hello.d.ts +8 -0
- package/dist/agent-executor/hello.d.ts.map +1 -1
- package/dist/agent-runtime/branch-observations.d.ts +5 -5
- package/dist/agent-runtime/branch-provider.d.ts +2 -2
- package/dist/agent-runtime/sql-rows.d.ts +10 -10
- package/dist/agent-runtime/terminal-commit.d.ts +10 -10
- package/dist/entrypoints/agent-executor/acp.js +7 -7
- package/dist/entrypoints/agent-executor/claude-sdk.d.ts +1 -1
- package/dist/entrypoints/agent-executor/claude-sdk.d.ts.map +1 -1
- package/dist/entrypoints/agent-executor/claude-sdk.js +532 -101
- package/dist/entrypoints/agent-executor/claude.js +8 -8
- package/dist/entrypoints/agent-executor/codex.d.ts +4 -0
- package/dist/entrypoints/agent-executor/codex.d.ts.map +1 -1
- package/dist/entrypoints/agent-executor/codex.js +1491 -228
- package/dist/entrypoints/agent-executor.js +7 -7
- package/dist/entrypoints/agent-runtime/browser.js +1 -1
- package/dist/entrypoints/agent-runtime/coding-tools.js +3 -3
- package/dist/entrypoints/agent-runtime/harness.js +8 -8
- package/dist/entrypoints/agent-runtime/openrouter.js +2 -2
- package/dist/entrypoints/agent-runtime/postgres.js +6 -6
- package/dist/entrypoints/agent-runtime/realtime.js +4 -4
- package/dist/entrypoints/agent-runtime/sandbox.js +5 -5
- package/dist/entrypoints/agent-runtime/sqlite/bun.js +6 -6
- package/dist/entrypoints/agent-runtime/sqlite/node.js +6 -6
- package/dist/entrypoints/agent-runtime/testing.js +5 -5
- package/dist/entrypoints/agent-runtime.js +17 -17
- package/dist/entrypoints/application/directory-inbox.js +2 -2
- package/dist/entrypoints/application/opentelemetry.js +2 -2
- package/dist/entrypoints/application.js +2 -2
- package/dist/entrypoints/cli/publish.js +3 -3
- package/dist/entrypoints/cli.js +8 -8
- package/dist/entrypoints/contract.js +2 -2
- package/dist/entrypoints/files/packaging.js +2 -2
- package/dist/entrypoints/files.js +7 -7
- package/dist/entrypoints/handler.js +4 -4
- package/dist/entrypoints/http.js +5 -5
- package/dist/entrypoints/index.js +7 -7
- package/dist/entrypoints/node.js +5 -5
- package/dist/entrypoints/observability.js +4 -4
- package/dist/entrypoints/primitives.js +2 -2
- package/dist/entrypoints/process.js +5 -5
- package/dist/entrypoints/react.js +1 -1
- package/dist/entrypoints/remote.js +2 -2
- package/dist/entrypoints/server.js +6 -6
- package/dist/entrypoints/service-host/macos.js +5 -5
- package/dist/entrypoints/service-host.js +7 -7
- package/dist/entrypoints/spend.js +1 -1
- package/dist/entrypoints/sync/postgres.js +1 -1
- package/dist/entrypoints/sync.js +2 -2
- package/dist/entrypoints/telegram.js +2 -2
- package/dist/entrypoints/testing.js +5 -5
- package/dist/entrypoints/tools/agent.js +5 -5
- package/dist/entrypoints/tools/connections.js +2 -2
- package/dist/entrypoints/tools/invoker.js +4 -4
- package/dist/entrypoints/tools/mcp.js +5 -5
- package/dist/entrypoints/tools/toolkit.js +8 -8
- package/dist/entrypoints/tools.js +12 -12
- package/dist/entrypoints/tracking/contract.js +1 -1
- package/dist/entrypoints/xlsx.js +1 -1
- package/dist/{index-prf6ayhf.js → index-13wmzpa6.js} +1 -1
- package/dist/{index-n7f89hjw.js → index-17qgm6xe.js} +3 -3
- package/dist/{index-wv8dqy7q.js → index-205456mf.js} +1 -1
- package/dist/{index-pwskmywy.js → index-21cfxc4z.js} +1 -1
- package/dist/{index-d4svrknj.js → index-39c2hj6h.js} +2 -2
- package/dist/{index-sfzfd2m2.js → index-39rmc00v.js} +1 -1
- package/dist/{index-ky3ardqn.js → index-3fym4j8n.js} +1 -1
- package/dist/{index-c5gp2gh6.js → index-5tdc0q43.js} +1 -1
- package/dist/{index-3ypvpkwr.js → index-669374qc.js} +1 -1
- package/dist/{index-m18xm96h.js → index-7jqn3b3g.js} +4 -4
- package/dist/{index-5jyjb4s0.js → index-80acsm27.js} +1 -1
- package/dist/{index-xmr47znh.js → index-827bgv33.js} +1 -1
- package/dist/{index-v1mxss62.js → index-93n6jwy0.js} +3 -3
- package/dist/{index-d54npte7.js → index-9kpxz49v.js} +2 -2
- package/dist/{index-xv9jb84s.js → index-9sfhje6y.js} +3 -3
- package/dist/{index-bh4pmtr9.js → index-afb6z77w.js} +3 -1
- package/dist/{index-9y0afd5f.js → index-apf5g7y9.js} +1 -1
- package/dist/{index-4qvyhn23.js → index-bjmj2q1z.js} +1 -1
- package/dist/{index-g3e57qj6.js → index-dcsxj68j.js} +2 -2
- package/dist/{index-waa6t4zx.js → index-dnzxxf8a.js} +1 -1
- package/dist/{index-gf92hc87.js → index-fgahdc7s.js} +2 -2
- package/dist/{index-kzavdze2.js → index-gr0kxymw.js} +5 -1
- package/dist/{index-e06z0tkb.js → index-gya4hwh3.js} +2 -2
- package/dist/{index-gzny6zsw.js → index-hab790s6.js} +5 -5
- package/dist/{index-bz3gn6cs.js → index-j0ef04jw.js} +2 -2
- package/dist/{index-rhb33thr.js → index-jcge9tx3.js} +1 -1
- package/dist/{index-pn5b11ce.js → index-mkfhpk11.js} +1 -1
- package/dist/{index-1qwrczr1.js → index-mttkdm5a.js} +1 -1
- package/dist/{index-rxnyygke.js → index-n3bm7zqq.js} +1 -1
- package/dist/{index-6wp4dn9d.js → index-p06z7g7w.js} +3 -3
- package/dist/{index-kt6dh1n6.js → index-p16q492v.js} +1 -1
- package/dist/{index-t7wa7k12.js → index-pp97q86a.js} +1 -1
- package/dist/{index-39n02e0q.js → index-psye60qn.js} +1 -1
- package/dist/{index-5ptwb6ka.js → index-pzhqydxb.js} +1 -1
- package/dist/{index-7kfcb576.js → index-qa2jjb65.js} +1 -1
- package/dist/{index-rzeezh79.js → index-qhjmmsm2.js} +2 -2
- package/dist/{index-7grgs8cx.js → index-qpzyahe3.js} +2 -2
- package/dist/{index-jfecdk1e.js → index-r97ppg0g.js} +2 -2
- package/dist/{index-bmaz3jzy.js → index-rjs94dny.js} +1 -1
- package/dist/{index-5v5vg85s.js → index-rxh3qy4x.js} +32 -5
- package/dist/{index-en8e5zsj.js → index-ryxb427v.js} +1 -1
- package/dist/{index-y065r8g5.js → index-sd4e5x5j.js} +7 -7
- package/dist/{index-g56ht6qf.js → index-t3qcac2a.js} +1 -1
- package/dist/{index-13dnv6d0.js → index-wv2amqm4.js} +4 -4
- package/dist/{index-4j8efqr3.js → index-x2fb37t0.js} +2 -2
- package/dist/{index-0gqs8ght.js → index-y71zn1gw.js} +32 -4
- package/dist/{index-wavv538x.js → index-ybdq8kk2.js} +3 -3
- package/dist/{index-4gk6k3zc.js → index-ycr4pk0z.js} +1 -1
- package/dist/{index-0tyt97nk.js → index-yrr3n391.js} +1 -1
- package/dist/{index-v37b2cd6.js → index-z20pdxeb.js} +2 -2
- package/dist/{index-8x22nprv.js → index-z9d74jmb.js} +3 -3
- package/dist/{index-3tnwtz38.js → index-zhshhxew.js} +1 -1
- package/dist/{index-hj1zq7mh.js → index-znd1b57f.js} +3 -3
- package/dist/internal/positive-integer.d.ts +2 -0
- package/dist/internal/positive-integer.d.ts.map +1 -1
- package/dist/internal/unix-socket.d.ts +7 -0
- package/dist/internal/unix-socket.d.ts.map +1 -1
- package/llms/agent-executor-claude-sdk.txt +13 -10
- package/llms/agent-executor-claude.txt +1 -1
- package/llms/agent-executor-codex.txt +9 -3
- package/llms/agent-executor.txt +2 -2
- package/llms/stitchkit.txt +74 -74
- package/llms/{upgrading-0.128.0.txt → upgrading-0.128.0-0.129.0.txt} +31 -3
- package/llms/upgrading.txt +1 -1
- package/llms-full.txt +127 -90
- package/llms.txt +6 -6
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from "./index-xrgn784x.js";
|
|
8
8
|
import {
|
|
9
9
|
stagingName
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-psye60qn.js";
|
|
11
11
|
|
|
12
12
|
// src/internal/contained-write.ts
|
|
13
13
|
import { constants, fchmod, open as openDescriptor, write as writeDescriptor } from "node:fs";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
streamNativeCommand2
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-3fym4j8n.js";
|
|
4
4
|
import {
|
|
5
5
|
createBoundedLineDecoder
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-39rmc00v.js";
|
|
7
7
|
import {
|
|
8
8
|
assertPositiveSafeInteger
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-gr0kxymw.js";
|
|
10
10
|
|
|
11
11
|
// src/agent-executor/engine-process.ts
|
|
12
12
|
var ENGINE_LINE_BYTES = 8 * 1024 * 1024;
|
|
@@ -20,7 +20,13 @@ function spawnEngineProcess2(input) {
|
|
|
20
20
|
const maxLineBytes = input.maxLineBytes ?? ENGINE_LINE_BYTES;
|
|
21
21
|
const maxPendingStdinBytes = input.maxPendingStdinBytes ?? ENGINE_PENDING_STDIN_BYTES;
|
|
22
22
|
const maxStdinBytes = input.maxStdinBytes ?? ENGINE_STDIN_BYTES;
|
|
23
|
+
const stdoutMode = input.stdoutMode ?? "lines";
|
|
24
|
+
if (stdoutMode !== "lines" && stdoutMode !== "drain") {
|
|
25
|
+
throw new TypeError(`stdoutMode must be "lines" or "drain", received ${String(stdoutMode)}`);
|
|
26
|
+
}
|
|
23
27
|
let written = 0;
|
|
28
|
+
let pid;
|
|
29
|
+
const pidReady = Promise.withResolvers();
|
|
24
30
|
const encoder = new TextEncoder;
|
|
25
31
|
let writer;
|
|
26
32
|
let open = true;
|
|
@@ -41,7 +47,11 @@ function spawnEngineProcess2(input) {
|
|
|
41
47
|
ownerLoss: "terminate",
|
|
42
48
|
stdin,
|
|
43
49
|
maxStdinBytes,
|
|
44
|
-
signal: input.signal
|
|
50
|
+
signal: input.signal,
|
|
51
|
+
onLeaderStarted: ({ pid: startedPid }) => {
|
|
52
|
+
pid = startedPid;
|
|
53
|
+
pidReady.resolve(startedPid);
|
|
54
|
+
}
|
|
45
55
|
});
|
|
46
56
|
let tail = "";
|
|
47
57
|
(async () => {
|
|
@@ -52,6 +62,13 @@ function spawnEngineProcess2(input) {
|
|
|
52
62
|
}
|
|
53
63
|
} catch {}
|
|
54
64
|
})();
|
|
65
|
+
if (stdoutMode === "drain") {
|
|
66
|
+
(async () => {
|
|
67
|
+
try {
|
|
68
|
+
for await (const _chunk of command.stdout) {}
|
|
69
|
+
} catch {}
|
|
70
|
+
})();
|
|
71
|
+
}
|
|
55
72
|
const closeInput = () => {
|
|
56
73
|
if (!open)
|
|
57
74
|
return;
|
|
@@ -60,9 +77,15 @@ function spawnEngineProcess2(input) {
|
|
|
60
77
|
writer.close();
|
|
61
78
|
} catch {}
|
|
62
79
|
};
|
|
63
|
-
|
|
80
|
+
const onCommandSettled = () => {
|
|
81
|
+
closeInput();
|
|
82
|
+
pidReady.resolve(pid);
|
|
83
|
+
};
|
|
84
|
+
command.result.then(onCommandSettled, onCommandSettled);
|
|
64
85
|
const cleanLine = (line) => line.endsWith("\r") ? line.slice(0, -1) : line;
|
|
65
86
|
async function* lines() {
|
|
87
|
+
if (stdoutMode === "drain")
|
|
88
|
+
return;
|
|
66
89
|
const decoder = createBoundedLineDecoder(maxLineBytes);
|
|
67
90
|
for await (const chunk of command.stdout) {
|
|
68
91
|
for (const line of decoder.push(chunk)) {
|
|
@@ -78,6 +101,10 @@ function spawnEngineProcess2(input) {
|
|
|
78
101
|
}
|
|
79
102
|
}
|
|
80
103
|
return {
|
|
104
|
+
get pid() {
|
|
105
|
+
return pid;
|
|
106
|
+
},
|
|
107
|
+
pidReady: pidReady.promise,
|
|
81
108
|
send(line) {
|
|
82
109
|
if (!open)
|
|
83
110
|
throw new Error("The engine process has closed its input");
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
assertUniqueToolName,
|
|
16
16
|
buildToolPresentationSchema,
|
|
17
17
|
projectedContractToolName
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-669374qc.js";
|
|
19
19
|
import {
|
|
20
20
|
unwrapZodWrappers,
|
|
21
21
|
objectShapeKeys,
|
|
@@ -34,11 +34,11 @@ import {
|
|
|
34
34
|
toolResultFromError,
|
|
35
35
|
toolErrorFromResult,
|
|
36
36
|
toolCauseFromResult
|
|
37
|
-
} from "./index-
|
|
37
|
+
} from "./index-n3bm7zqq.js";
|
|
38
38
|
import {
|
|
39
39
|
createToolRunner,
|
|
40
40
|
formatToolError
|
|
41
|
-
} from "./index-
|
|
41
|
+
} from "./index-fgahdc7s.js";
|
|
42
42
|
import {
|
|
43
43
|
isRepeatableRead
|
|
44
44
|
} from "./index-0x4mnwg5.js";
|
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
} from "./index-5y7j383h.js";
|
|
54
54
|
import {
|
|
55
55
|
writeContainedFile
|
|
56
|
-
} from "./index-
|
|
56
|
+
} from "./index-rjs94dny.js";
|
|
57
57
|
import {
|
|
58
58
|
openPinnedDirectory,
|
|
59
59
|
isSafeEntryName,
|
|
@@ -74,14 +74,14 @@ import {
|
|
|
74
74
|
} from "./index-n20tybgk.js";
|
|
75
75
|
import {
|
|
76
76
|
collectToolSurface
|
|
77
|
-
} from "./index-
|
|
77
|
+
} from "./index-x2fb37t0.js";
|
|
78
78
|
import {
|
|
79
79
|
assertNoLegacyTransports
|
|
80
80
|
} from "./index-akfgymyr.js";
|
|
81
81
|
import {
|
|
82
82
|
fetchGuarded,
|
|
83
83
|
readCapped
|
|
84
|
-
} from "./index-
|
|
84
|
+
} from "./index-apf5g7y9.js";
|
|
85
85
|
import {
|
|
86
86
|
isUnsafeKey,
|
|
87
87
|
safeJsonParse
|
|
@@ -98,7 +98,7 @@ import {
|
|
|
98
98
|
} from "./index-9pv126eh.js";
|
|
99
99
|
import {
|
|
100
100
|
assertPositiveSafeInteger
|
|
101
|
-
} from "./index-
|
|
101
|
+
} from "./index-gr0kxymw.js";
|
|
102
102
|
import {
|
|
103
103
|
isRecord,
|
|
104
104
|
isAsyncIterable,
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
} from "./index-09f7w2qq.js";
|
|
4
4
|
import {
|
|
5
5
|
engineEnvironment2
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-afb6z77w.js";
|
|
7
7
|
import {
|
|
8
8
|
runNativeCommand2
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-pzhqydxb.js";
|
|
10
10
|
import {
|
|
11
11
|
jsonDataRefusal
|
|
12
12
|
} from "./index-m6w6jtda.js";
|
|
13
13
|
import {
|
|
14
14
|
assertPositiveSafeInteger
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-gr0kxymw.js";
|
|
16
16
|
import {
|
|
17
17
|
abortReason,
|
|
18
18
|
raceAbort,
|
|
@@ -293,4 +293,4 @@ function loseEngineTurn(turn, answer, error) {
|
|
|
293
293
|
turn.channel.fail(error);
|
|
294
294
|
}
|
|
295
295
|
|
|
296
|
-
export { nonEmptyString, epochSecondsToIso, createTurnDeltaChannel, offerTurnDelta, sessionAbort, runEngineCli, stopConnection, withEphemeralConnection, safeJsonValue, DEFAULT_MAX_IMAGE_BYTES, CLAUDE_CLI_MAX_LINE_BYTES, isSupportedImageMediaType, validateImageOptions, bytesToBase64, resolveImageBytes, assertImageFrameBytes, imageTurnStarter, holdEngineRequest, answerEngineRequest, drainEngineRequests, endEngineTurn, loseEngineTurn };
|
|
296
|
+
export { nonEmptyString, epochSecondsToIso, createTurnDeltaChannel, offerTurnDelta, sessionAbort, runEngineCli, stopConnection, withEphemeralConnection, safeJsonValue, DEFAULT_MAX_IMAGE_BYTES, CLAUDE_CLI_MAX_LINE_BYTES, isSupportedImageMediaType, validateImageOptions, bytesToBase64, resolveImageBytes, inlineParts, assertImageFrameBytes, imageTurnStarter, holdEngineRequest, answerEngineRequest, drainEngineRequests, endEngineTurn, loseEngineTurn };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PlanWindowSchema2,
|
|
3
3
|
engineProfile
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-afb6z77w.js";
|
|
5
5
|
import {
|
|
6
6
|
nonEmptyString,
|
|
7
7
|
epochSecondsToIso,
|
|
8
8
|
safeJsonValue,
|
|
9
9
|
isSupportedImageMediaType
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-wv2amqm4.js";
|
|
11
11
|
import {
|
|
12
12
|
errnoOf
|
|
13
13
|
} from "./index-jj9228tt.js";
|
|
@@ -422,14 +422,42 @@ function claudePlanWindows2(info) {
|
|
|
422
422
|
}
|
|
423
423
|
|
|
424
424
|
// src/agent-executor/claude/transcript.ts
|
|
425
|
+
import { realpathSync } from "node:fs";
|
|
425
426
|
import { open } from "node:fs/promises";
|
|
426
|
-
import { join } from "node:path";
|
|
427
|
+
import { basename, dirname, join } from "node:path";
|
|
427
428
|
var SAFE_SESSION_ID = /^[A-Za-z0-9_-]+$/;
|
|
429
|
+
function stripTrailingSlashes(path) {
|
|
430
|
+
const stripped = path.replace(/\/+$/, "");
|
|
431
|
+
return stripped.length === 0 && path.startsWith("/") ? "/" : stripped;
|
|
432
|
+
}
|
|
433
|
+
function canonicalClaudeCwd(cwd) {
|
|
434
|
+
if (cwd.length === 0)
|
|
435
|
+
return cwd;
|
|
436
|
+
const normalized = stripTrailingSlashes(cwd);
|
|
437
|
+
const missingTail = [];
|
|
438
|
+
let probe = normalized;
|
|
439
|
+
for (;; ) {
|
|
440
|
+
try {
|
|
441
|
+
const resolved = realpathSync(probe);
|
|
442
|
+
return missingTail.length === 0 ? resolved : join(resolved, ...missingTail.reverse());
|
|
443
|
+
} catch (error) {
|
|
444
|
+
const code = errnoOf(error);
|
|
445
|
+
if (code !== "ENOENT" && code !== "ENOTDIR")
|
|
446
|
+
throw error;
|
|
447
|
+
const parent = dirname(probe);
|
|
448
|
+
if (parent === probe)
|
|
449
|
+
return normalized;
|
|
450
|
+
missingTail.push(basename(probe));
|
|
451
|
+
probe = parent;
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
}
|
|
428
455
|
function claudeTranscriptPath2(input) {
|
|
429
456
|
if (!SAFE_SESSION_ID.test(input.sessionId)) {
|
|
430
457
|
throw new TypeError(`Invalid Claude sessionId: ${input.sessionId}`);
|
|
431
458
|
}
|
|
432
|
-
|
|
459
|
+
const canonicalCwd = canonicalClaudeCwd(input.cwd);
|
|
460
|
+
return join(input.home, "projects", canonicalCwd.replace(/[^A-Za-z0-9-]/g, "-"), `${input.sessionId}.jsonl`);
|
|
433
461
|
}
|
|
434
462
|
var MAX_RECORD_BYTES = 16 * 1024 * 1024;
|
|
435
463
|
var INITIAL_RECORD_BYTES = 64 * 1024;
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
CommandStopped,
|
|
6
6
|
startNativeCommand
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-qa2jjb65.js";
|
|
8
8
|
import {
|
|
9
9
|
ScanStopped,
|
|
10
10
|
ContainedScanBudget,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from "./index-rj32hkkp.js";
|
|
14
14
|
import {
|
|
15
15
|
writeContainedFile
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-rjs94dny.js";
|
|
17
17
|
import {
|
|
18
18
|
openPinnedDirectory,
|
|
19
19
|
openContainedDirectory,
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
} from "./index-9pv126eh.js";
|
|
43
43
|
import {
|
|
44
44
|
assertPositiveSafeInteger
|
|
45
|
-
} from "./index-
|
|
45
|
+
} from "./index-gr0kxymw.js";
|
|
46
46
|
import {
|
|
47
47
|
withSignalDeadline
|
|
48
48
|
} from "./index-agy5fqgf.js";
|
|
@@ -66,10 +66,10 @@ import {
|
|
|
66
66
|
readBoundedChunks,
|
|
67
67
|
concatChunks,
|
|
68
68
|
readBoundedText
|
|
69
|
-
} from "./index-
|
|
69
|
+
} from "./index-827bgv33.js";
|
|
70
70
|
import {
|
|
71
71
|
assertPositiveSafeInteger
|
|
72
|
-
} from "./index-
|
|
72
|
+
} from "./index-gr0kxymw.js";
|
|
73
73
|
import {
|
|
74
74
|
isRecord,
|
|
75
75
|
isAsyncIterable
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
assertUnixSocketPathLength,
|
|
12
12
|
assertExpectedOwnerUid,
|
|
13
13
|
assertUnixSocketClientTarget
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-hab790s6.js";
|
|
15
15
|
import {
|
|
16
16
|
DEFAULT_PROCESS_SIGNALS,
|
|
17
17
|
defaultSignalSource,
|
|
@@ -44,10 +44,10 @@ import {
|
|
|
44
44
|
import {
|
|
45
45
|
readBoundedBody2,
|
|
46
46
|
readBoundedText
|
|
47
|
-
} from "./index-
|
|
47
|
+
} from "./index-827bgv33.js";
|
|
48
48
|
import {
|
|
49
49
|
assertPositiveSafeInteger
|
|
50
|
-
} from "./index-
|
|
50
|
+
} from "./index-gr0kxymw.js";
|
|
51
51
|
import {
|
|
52
52
|
isRecord,
|
|
53
53
|
transportResult
|
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
toolResultFromError,
|
|
8
8
|
toolCauseFromResult,
|
|
9
9
|
isToolExecutionControlError2
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-n3bm7zqq.js";
|
|
11
11
|
import {
|
|
12
12
|
createToolRunner,
|
|
13
13
|
formatToolError
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-fgahdc7s.js";
|
|
15
15
|
import {
|
|
16
16
|
resolveRuntimeToolCall
|
|
17
17
|
} from "./index-eh71zr32.js";
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
} from "./index-1psbyyhj.js";
|
|
21
21
|
import {
|
|
22
22
|
collectToolSurface
|
|
23
|
-
} from "./index-
|
|
23
|
+
} from "./index-x2fb37t0.js";
|
|
24
24
|
import {
|
|
25
25
|
agentPresenterOf
|
|
26
26
|
} from "./index-7csn6pva.js";
|
|
@@ -9,6 +9,8 @@ type ErrorType = new (message: string) => Error;
|
|
|
9
9
|
interface IntegerOptions {
|
|
10
10
|
readonly absent?: 'passes' | 'refused';
|
|
11
11
|
}
|
|
12
|
+
/** Return whether `value` is a positive safe integer (`>= 1`). */
|
|
13
|
+
export declare function isPositiveSafeInteger(value: unknown): value is number;
|
|
12
14
|
/** Refuse a limit that is not a positive safe integer. */
|
|
13
15
|
export declare function assertPositiveSafeInteger(name: string, value: number | undefined, errorType?: ErrorType, options?: IntegerOptions): void;
|
|
14
16
|
/** Refuse a count or a position that is not a non-negative safe integer. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"positive-integer.d.ts","sourceRoot":"","sources":["../../src/internal/positive-integer.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,KAAK,SAAS,GAAG,KAAK,OAAO,EAAE,MAAM,KAAK,KAAK,CAAC;AAEhD,UAAU,cAAc;IACtB,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;CACxC;AAeD,0DAA0D;AAC1D,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,SAAS,GAAE,SAAqB,EAChC,OAAO,GAAE,cAAmB,GAC3B,IAAI,CAEN;AAED,4EAA4E;AAC5E,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,SAAS,GAAE,SAAqB,EAChC,OAAO,GAAE,cAAmB,GAC3B,IAAI,CASN"}
|
|
1
|
+
{"version":3,"file":"positive-integer.d.ts","sourceRoot":"","sources":["../../src/internal/positive-integer.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,KAAK,SAAS,GAAG,KAAK,OAAO,EAAE,MAAM,KAAK,KAAK,CAAC;AAEhD,UAAU,cAAc;IACtB,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;CACxC;AAeD,kEAAkE;AAClE,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAGrE;AAED,0DAA0D;AAC1D,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,SAAS,GAAE,SAAqB,EAChC,OAAO,GAAE,cAAmB,GAC3B,IAAI,CAEN;AAED,4EAA4E;AAC5E,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,SAAS,GAAE,SAAqB,EAChC,OAAO,GAAE,cAAmB,GAC3B,IAAI,CASN"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { FileStatsView } from './file-observation.js';
|
|
1
2
|
/** Where a unix socket is bound and the exact permission bits it is born with. */
|
|
2
3
|
export interface UnixSocketBinding {
|
|
3
4
|
readonly path: string;
|
|
@@ -33,6 +34,12 @@ export declare function unlinkUnixSocketIfOwned(owned: OwnedUnixSocket): boolean
|
|
|
33
34
|
export declare function assertUnixSocketPathLength(socketPath: string, caller: string): void;
|
|
34
35
|
/** Validate an explicit expected Unix owner UID (`0`..`4294967295`). */
|
|
35
36
|
export declare function assertExpectedOwnerUid(uid: number | undefined, caller: string): void;
|
|
37
|
+
/**
|
|
38
|
+
* Inspect `dir`'s `lstat` result against private Unix socket directory rules (real non-symlink
|
|
39
|
+
* directory owned by `expectedUid ?? process.getuid()` and not writable by group or others).
|
|
40
|
+
* Returns a human-readable violation string, or `undefined` when compliant.
|
|
41
|
+
*/
|
|
42
|
+
export declare function unixSocketDirectoryViolation(dir: string, stats: Pick<FileStatsView, 'mode' | 'uid' | 'isDirectory' | 'isSymbolicLink'>, caller: string, expectedUid?: number): string | undefined;
|
|
36
43
|
/**
|
|
37
44
|
* Verify that `dirname(socketPath)` exists, is a real directory (not a symlink), is owned by
|
|
38
45
|
* the current user, and is not writable by group or others.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unix-socket.d.ts","sourceRoot":"","sources":["../../src/internal/unix-socket.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"unix-socket.d.ts","sourceRoot":"","sources":["../../src/internal/unix-socket.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAMxD,kFAAkF;AAClF,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,4FAA4F;IAC5F,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,uFAAuF;AACvF,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAED,+EAA+E;AAC/E,MAAM,WAAW,eAAgB,SAAQ,eAAe;IACtD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,MAAM,CAAC;AAe9C,6FAA6F;AAC7F,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAMvE;AAED,iGAAiG;AACjG,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe,GAAG,OAAO,CAiB3F;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAavE;AAED,sFAAsF;AACtF,wBAAgB,0BAA0B,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAOnF;AAID,wEAAwE;AACxE,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAQpF;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAC1C,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,IAAI,CAAC,aAAa,EAAE,MAAM,GAAG,KAAK,GAAG,aAAa,GAAG,gBAAgB,CAAC,EAC7E,MAAM,EAAE,MAAM,EACd,WAAW,CAAC,EAAE,MAAM,GACnB,MAAM,GAAG,SAAS,CAqBpB;AAED;;;GAGG;AACH,wBAAgB,gCAAgC,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAQzF;AAsBD;;;;;;;GAOG;AACH,wBAAgB,4BAA4B,CAC1C,UAAU,EAAE,MAAM,EAClB,MAAM,SAA8B,EACpC,gBAAgB,CAAC,EAAE,MAAM,GACxB,IAAI,CA+BN;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,MAAM,EACX,UAAU,EAAE,MAAM,EAClB,QAAQ,GAAE,MAAyB,GAClC,MAAM,CAaR;AAED;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,EACvC,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,CAAC,EAChC,IAAI,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,IAAI,GACxB;IAAE,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAA;CAAE,CAyCzD;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,CAAC,GAAG,CAAC,CAqCzF"}
|
|
@@ -14,18 +14,21 @@ Also read:
|
|
|
14
14
|
|
|
15
15
|
## `stitchkit/agent-executor/claude-sdk`
|
|
16
16
|
|
|
17
|
-
Claude through the Agent SDK. The application imports `query`
|
|
18
|
-
`@anthropic-ai/claude-agent-sdk` (an optional peer) and
|
|
19
|
-
imports only the SDK's types, so it loads without the
|
|
20
|
-
the same classifier as the CLI's, permissions arrive
|
|
21
|
-
interrupt is `Query.interrupt()` and denies a
|
|
22
|
-
query that breaks fails its turn — the next
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
Claude through the Agent SDK. The application imports `query` (and optionally
|
|
18
|
+
`forkSession`) from `@anthropic-ai/claude-agent-sdk` (an optional peer) and
|
|
19
|
+
passes them in; the leaf imports only the SDK's types, so it loads without the
|
|
20
|
+
SDK. Records are read by the same classifier as the CLI's, permissions arrive
|
|
21
|
+
through `canUseTool`, an interrupt is `Query.interrupt()` and denies a
|
|
22
|
+
permission still pending, and a query that breaks fails its turn — the next
|
|
23
|
+
turn opens a new one that resumes the session with live model, permission mode
|
|
24
|
+
and flag settings re-applied. Reconcile is by the input's `uuid` in the
|
|
25
|
+
profile's transcript. Evolving.
|
|
25
26
|
|
|
26
27
|
| Export | Kind | Purpose |
|
|
27
28
|
|--------|------|---------|
|
|
28
|
-
| `createClaudeSdkDriver` / `ClaudeSdkDriverConfig` | function /
|
|
29
|
-
| `
|
|
29
|
+
| `createClaudeSdkDriver` / `ClaudeSdkDriver` / `ClaudeSdkDriverConfig` | function / _types_ | the driver: `query` and `sdkVersion` required; optional `forkSession`, `model`, `permissionMode` (default `default`), `allowDangerouslySkipPermissions`, `pathToClaudeCodeExecutable`, `systemPrompt`, `settingSources`, `enableFileCheckpointing`, `supportedDialogKinds` / `onUserDialog`, `hooks`, `tools`, `allowedTools`, `disallowedTools`, `mcpServers`, `mcpServersDelivery`, `strictMcpConfig`, `plugins`, `agents`, `extraArgs`, `stderr`, `spawnClaudeCodeProcess`, `onProviderPid`, `verifyDelegation`, `resolveFile`, `maxImageBytes` (default 5 MiB), and `ambient`. `status` reports the plan windows the session's `rate_limit_event` carried and the login as `unknown`; `forkSession(sessionId, options?)` delegates to the injected SDK function |
|
|
30
|
+
| `ClaudeSdkSession` | _type_ | extended session returned by `open()`: exposes `providerPid`, `setModel`, `setPermissionMode`, `applyFlagSettings`, `initializationResult`, `supportedModels`, `supportedCommands`, `accountInfo`, `getContextUsage`, `mcpServerStatus`, `toggleMcpServer`, `reconnectMcpServer`, and `rewindFiles` |
|
|
31
|
+
| `ClaudeSdkDelegationCheck` | _type_ | fail-closed startup verification options (`requireHooksApplied`, `requireNoMcpServers`, `timeoutMs`) enforced at `open()` and on every query restart |
|
|
32
|
+
| `ClaudeSdkQuery` / `ClaudeSdkRun` / `ClaudeSdkForkSession` | _types_ | the SDK `query` / `forkSession` signatures the leaf takes and the subset of a running `Query` it uses; the SDK's own functions fit as they are |
|
|
30
33
|
|
|
31
34
|
---
|
|
@@ -23,7 +23,7 @@ Evolving.
|
|
|
23
23
|
|--------|------|---------|
|
|
24
24
|
| `createClaudeCliDriver` / `ClaudeCliDriverConfig` | function / _type_ | the driver; `permissionMode` defaults to `default`, so the server decides every tool the profile does not already allow; optional `resolveFile` and `maxImageBytes` (default 5 MiB) enable ordered turn-input image attachments |
|
|
25
25
|
| `claudeFakeScenarios` | constant | the conformance scenarios in this dialect, for a scripted engine |
|
|
26
|
-
| `claudeTranscriptPath` | function | where a profile keeps a session's transcript (`{ home, cwd, sessionId }`) |
|
|
26
|
+
| `claudeTranscriptPath` | function | where a profile keeps a session's transcript (`{ home, cwd, sessionId }`), resolving `realpath` of `cwd` (or its nearest existing ancestor) so symlinked workspaces match the canonical transcript location |
|
|
27
27
|
| `claudePlanWindows` | function | Claude's `rate_limit_event` as plan windows (`five_hour`, `seven_day`) |
|
|
28
28
|
|
|
29
29
|
---
|
|
@@ -14,12 +14,18 @@ Also read:
|
|
|
14
14
|
|
|
15
15
|
## `stitchkit/agent-executor/codex`
|
|
16
16
|
|
|
17
|
-
Codex through `codex app-server` over stdio
|
|
17
|
+
Codex through `codex app-server` over stdio (default) or RFC 6455
|
|
18
|
+
WebSocket-over-Unix-socket (`unix-listen` / `unix-connect`). Evolving.
|
|
18
19
|
|
|
19
20
|
| Export | Kind | Purpose |
|
|
20
21
|
|--------|------|---------|
|
|
21
|
-
| `createCodexDriver` / `CodexDriverConfig` | function /
|
|
22
|
+
| `createCodexDriver` / `CodexDriver` / `CodexDriverConfig` | function / _types_ | the driver: `transport` (`stdio`, `unix-listen`, `unix-connect`), `serverArgs`, thread policy (`model`, `modelProvider`, `approvalPolicy`, `sandbox`, `developerInstructions`, `runtimeWorkspaceRoots`, `config`), `prepareThread` / `verifyThread` lifecycle hooks, optional `resolveFile` and `maxImageBytes` (default 5 MiB) for turn-input images, approvals and input asked of the host, multi-bucket limits from `account/rateLimits/read` |
|
|
23
|
+
| `CodexTransportConfig` | _type_ | transport selector: `{ kind: 'stdio' }`, `{ kind: 'unix-listen', socketPath, listenTimeoutMs? }`, or `{ kind: 'unix-connect', socketPath, expectedOwnerUid? }` |
|
|
24
|
+
| `CodexSession` / `CodexControlClient` | _types_ | extended session returned by `open()`: exposes `providerPid`, applied `threadContext`, per-turn overrides on `startTurn`, `steerTurn`, non-mutating `forkThread`, `compactThread`, `readConfig`, `listMcpServerStatus`, `listSkills`, `listModels`, `readAccount`, and `readRateLimits` |
|
|
25
|
+
| `CodexThreadContext` / `CodexThreadPolicyOverrides` / `CodexApprovalPolicy` / `CodexSandboxMode` | _types_ | applied policy/model context reported by `thread/start`, `thread/resume`, or `thread/fork`, and overridable thread policy fields |
|
|
26
|
+
| `CodexTurnInput` / `CodexCollaborationMode` / `CodexSteerTurnInput` / `CodexForkThreadOptions` / `CodexForkedThread` | _types_ | per-turn `startTurn` overrides (`model`, fail-closed `modelProvider`, `reasoningEffort`, `collaborationMode`, `approvalPolicy`, `sandboxPolicy`, `runtimeWorkspaceRoots`), `steerTurn` input, and `forkThread` options/result |
|
|
27
|
+
| `CodexUnixSocketError` / `CodexUnixSocketErrorKind` | class / _type_ | typed Unix-socket refusal/transport error distinguishing `endpoint-absent`, `endpoint-not-listening`, `target-refused`, `upgrade-refused`, and `connection-lost` |
|
|
22
28
|
| `codexFakeScenarios` | constant | the conformance scenarios in this dialect, for a scripted app-server |
|
|
23
|
-
| `codexPlanWindows` | function | Codex's `rateLimits`
|
|
29
|
+
| `codexPlanWindows` | function | unfolds Codex's `account/rateLimits/read` envelope (including `rateLimitsByLimitId`) or a single snapshot into `<limitId\|limit>:<minutes>m\|<slot>` plan windows carrying optional `windowDurationMins` and `label` |
|
|
24
30
|
|
|
25
31
|
---
|
package/llms/agent-executor.txt
CHANGED
|
@@ -22,14 +22,14 @@ leaves of their own; this entrypoint knows no vendor. Evolving.
|
|
|
22
22
|
|--------|------|---------|
|
|
23
23
|
| `defineAgentExecutorContract` / `agentExecutorRealtimeContract` | functions / contract | the operations (`hello`, `claim`, `renew`, `release`, `report`) and the events the server pushes (`turn:offer`, `turn:interrupt`, `turn:reply`) |
|
|
24
24
|
| `ExecutorHelloSchema` / `ExecutorHello` / `ExecutorHelloAckSchema` / `ExecutorHelloAck` / `ExecutorEngineSchema` / `ExecutorEngine` / `ExecutorEngineInfoSchema` / `ExecutorReconcileSchema` / `ExecutorProfileSchema` / `ExecutorProfile` / `ExecutorResumableTurnSchema` | schemas / _types_ | what an executor announces — engines (their `models`: `listed` with ids, `not-asked` or `failed` with why), private profiles, resumable turns with their `turnOrdinal` — and what the server holds of each: `acked` up to `ackedSeq`, or `not-retained` |
|
|
25
|
-
| `PlanLimitsSchema` / `PlanLimits` / `PlanWindowSchema` / `PlanWindow` | schemas / _types_ | a subscription's limits: `known`, `no-plan-limit` or `unpublished`, with the last read's error beside the last answer |
|
|
25
|
+
| `PlanLimitsSchema` / `PlanLimits` / `PlanWindowSchema` / `PlanWindow` | schemas / _types_ | a subscription's limits: `known`, `no-plan-limit` or `unpublished`, with the last read's error beside the last answer; each window carries `name`, `usedPercent`, and optional `resetsAt`, `windowDurationMins` and `label` |
|
|
26
26
|
| `ThreadClaimSchema` / `ThreadClaim` / `ThreadLeaseSchema` / `ThreadLease` / `ThreadRenewSchema` / `ThreadReleaseSchema` | schemas / _types_ | thread leases pinned to an executor and profile, under a fence |
|
|
27
27
|
| `TurnOfferSchema` / `TurnOffer` / `TurnPhaseSchema` / `TurnPhase` / `TurnReportSchema` / `TurnReport` / `TurnReportAckSchema` / `TurnFailureKindSchema` / `TurnInterruptSchema` / `InteractionReplySchema` / `InteractionReply` / `EXECUTOR_ERRORS` | schemas / _types_ / constant | a turn offered under its thread's `turnOrdinal`, its phases and reports applied once by `executorSeq` (acknowledged `applied`, `duplicate` or `not-retained`), interrupts, answers to an engine's requests, and the refusal codes |
|
|
28
28
|
| `ExecutorDeltaSchema` / `ExecutorDelta` / `ExecutorErrorKindSchema` / `ExecutorErrorKind` / `ExecutorRawSchema` | schemas / _types_ | what an engine said: `agent-parts` blocks with `turnId`, `itemId` and `raw`, plus requests, usage, the context gauge (`context-usage`), the end of the turn, errors by kind and window resets |
|
|
29
29
|
| `projectExecutorDeltas` | function | fold a turn's deltas into the message parts the agent runtime stores |
|
|
30
30
|
| `AgentEngineDriver` / `AgentEngineSession` / `AgentEngineTurn` / `ExecutorEngineInfo` | _types_ | one vendor's engine behind one interface: info, login status, a session per connection, turns with `interrupt` and `respond`, `findInput` for a `client-id` engine |
|
|
31
31
|
| `dispatchTurn` / `DispatchOutcome` | function / _type_ | send a turn's input at most once through `LocalStepDurability.effect`: `sent`, `delivered` after a reconcile, or `unknown_after_restart` — never resent |
|
|
32
|
-
| `spawnEngineProcess` / `EngineProcess` | function / _type_ | an engine process talked to by lines over `stitchkit/process`: declared environment, owner-loss termination, bounded lines (`maxLineBytes`), stderr, queued stdin (`maxPendingStdinBytes`) and stdin written over the connection's life (`maxStdinBytes`, a refused `send()` that leaves the engine running); every option checked before the spawn |
|
|
32
|
+
| `spawnEngineProcess` / `EngineProcess` | function / _type_ | an engine process talked to by lines over `stitchkit/process`: declared environment, owner-loss termination, optional leader `pid` / `pidReady`, `stdoutMode` (`'lines'` default or `'drain'` for socket-serving engines), bounded lines (`maxLineBytes`), stderr, queued stdin (`maxPendingStdinBytes`) and stdin written over the connection's life (`maxStdinBytes`, a refused `send()` that leaves the engine running); every option checked before the spawn |
|
|
33
33
|
| `createExecutorLeases` / `memoryExecutorLeaseStore` / `ExecutorLeaseStateStore` / `ExecutorLeaseState` / `ExecutorLeaseStateSchema` / `ExecutorLeaseRefusal` | functions / _types_ / class | the server's thread leases and turn receipts over one atomically updated value, bounded by threads: each thread keeps the receipts of its last `retainedTurns` turns (default 64, at most 1024) and the highest `turnOrdinal` it let go, a report of a turn at or below it is `not-retained`, and `resume(resumable)` answers a hello the same way; a `StateStore` of `stitchkit/application` fits; a refusal is an `ExecutorLeaseRefusal` — an `AppError` with status 409 and a code of `EXECUTOR_ERRORS` — so an operation returning the service's promise answers `409 { error: { code } }` |
|
|
34
34
|
| `ExecutorProfileConfigSchema` / `ExecutorProfileConfig` / `engineEnvironment` / `ownCredentials` / `helloProfile` / `CREDENTIAL_VARIABLES` | schema / _type_ / functions / constant | a profile on the executor's machine, the engine's allowlisted environment with the profile's `home` as `CLAUDE_CONFIG_DIR`, `CODEX_HOME` or (ACP) `HOME`, and `helloProfile({ profile, status, ambient })` carrying no path and no value; a driver refuses a profile whose `engine` is not its own with a `TypeError`, before it reads a file or starts the engine |
|
|
35
35
|
| `mergeRateLimitEvent` / `planLimitsReadFailed` / `planLimitsDue` / `planWindowExpired` | functions | plan limits kept as three answers (`mergeRateLimitEvent`, `planLimitsReadFailed`, `planLimitsDue` take an options object), with a failed read beside the last answer |
|