@tangle-network/agent-runtime 0.338.0 → 0.340.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/dist/{activation-kbkAuSmY.js → activation-D2PVljaw.js} +5 -18
- package/dist/{activation-kbkAuSmY.js.map → activation-D2PVljaw.js.map} +1 -1
- package/dist/{activation-CsbNax2X.d.ts → activation-DGDl4wwI.d.ts} +4 -24
- package/dist/agent.d.ts +4 -18
- package/dist/agent.js +3 -21
- package/dist/agent.js.map +1 -1
- package/dist/analyst-loop.d.ts +2 -2
- package/dist/{bundle-DM60AI2B.js → bundle-DNUq-OPW.js} +2 -2
- package/dist/{bundle-DM60AI2B.js.map → bundle-DNUq-OPW.js.map} +1 -1
- package/dist/candidate-execution/index.d.ts +4 -101
- package/dist/candidate-execution/index.js +10 -395
- package/dist/candidate-execution/index.js.map +1 -1
- package/dist/{delegate-Se1YZKMb.js → delegate-CtJIS-tp.js} +2 -2
- package/dist/{delegate-Se1YZKMb.js.map → delegate-CtJIS-tp.js.map} +1 -1
- package/dist/{driver-control-acknowledgers-T2a1Ouay.js → driver-control-acknowledgers-MTrs8HAF.js} +15 -11
- package/dist/driver-control-acknowledgers-MTrs8HAF.js.map +1 -0
- package/dist/{durable-file-B_eJr6Mb.js → durable-file-gNI9ILAn.js} +1 -3
- package/dist/durable-file-gNI9ILAn.js.map +1 -0
- package/dist/durable.d.ts +3 -35
- package/dist/durable.js +10 -10
- package/dist/durable.js.map +1 -1
- package/dist/{graph-CY0wH838.js → graph-DfWqp_1e.js} +4 -4
- package/dist/graph-DfWqp_1e.js.map +1 -0
- package/dist/{graph-registry-By0tUj4S.js → graph-registry-BnO64cn8.js} +3 -3
- package/dist/{graph-registry-By0tUj4S.js.map → graph-registry-BnO64cn8.js.map} +1 -1
- package/dist/{improve-CWGBT13K.js → improve-CKRVQqzt.js} +8 -35
- package/dist/improve-CKRVQqzt.js.map +1 -0
- package/dist/{improvement-adapter-D5gwwoXQ.d.ts → improvement-adapter-sIthWkcN.d.ts} +3 -21
- package/dist/index.d.ts +10 -215
- package/dist/index.js +91 -302
- package/dist/index.js.map +1 -1
- package/dist/intelligence.d.ts +11 -143
- package/dist/intelligence.js +7 -81
- package/dist/intelligence.js.map +1 -1
- package/dist/{jsonl-file-DBv31uPi.js → jsonl-file-C9Kde_0Z.js} +2 -2
- package/dist/{jsonl-file-DBv31uPi.js.map → jsonl-file-C9Kde_0Z.js.map} +1 -1
- package/dist/kernel.d.ts +4 -3
- package/dist/kernel.js +12 -14
- package/dist/loop-runner-C4EWEcXf.d.ts +32 -0
- package/dist/loop-runner-DNWbTcVm.js +59 -0
- package/dist/loop-runner-DNWbTcVm.js.map +1 -0
- package/dist/loop-runner-bin.d.ts +32 -2
- package/dist/loop-runner-bin.js +93 -1
- package/dist/loop-runner-bin.js.map +1 -0
- package/dist/mcp/bin.js +3 -3
- package/dist/mcp/index.d.ts +99 -418
- package/dist/mcp/index.js +121 -203
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/memory-bin.js +231 -1
- package/dist/mcp/memory-bin.js.map +1 -1
- package/dist/model-policy-CyCUwHed.js.map +1 -1
- package/dist/placement.d.ts +2 -33
- package/dist/placement.js +1 -35
- package/dist/placement.js.map +1 -1
- package/dist/platform.d.ts +188 -1
- package/dist/platform.js +129 -1
- package/dist/platform.js.map +1 -1
- package/dist/{prepare-Bt0IouPq.js → prepare-FzJoS68l.js} +8 -160
- package/dist/prepare-FzJoS68l.js.map +1 -0
- package/dist/{profile-Do-5xO_D.js → profile-DToH0XEs.js} +2 -2
- package/dist/profile-DToH0XEs.js.map +1 -0
- package/dist/profile-materialization-bPm0gGLO.d.ts +49 -0
- package/dist/profiles.d.ts +2 -2
- package/dist/profiles.js +3 -40
- package/dist/profiles.js.map +1 -1
- package/dist/{protected-model-port-DGxQ8_YM.d.ts → protected-model-port-DVVh-hEk.d.ts} +3 -33
- package/dist/protected-redaction-DFCeo4vg.js.map +1 -1
- package/dist/{provision-supervisor-0jMufp4h.js → provision-supervisor-DqvWXmAE.js} +6 -6
- package/dist/{provision-supervisor-0jMufp4h.js.map → provision-supervisor-DqvWXmAE.js.map} +1 -1
- package/dist/{run-cancellation-BoW5Sg9Y.js → run-cancellation-C9oL62sW.js} +3 -7
- package/dist/{run-cancellation-BoW5Sg9Y.js.map → run-cancellation-C9oL62sW.js.map} +1 -1
- package/dist/{runtime-D37zRSs7.js → runtime-C55Zgo1R.js} +2531 -2889
- package/dist/runtime-C55Zgo1R.js.map +1 -0
- package/dist/{runtime-hooks-Bj6wJHlH.d.ts → runtime-hooks-nsqxSUFL.d.ts} +2 -6
- package/dist/{sandbox-profile-compat-xSoVtdWw.js → sandbox-profile-compat-DRr3JwDx.js} +2 -4
- package/dist/sandbox-profile-compat-DRr3JwDx.js.map +1 -0
- package/dist/{search-executor-DmgUm5p7.js → search-executor-ChOlRBgg.js} +3 -3
- package/dist/search-executor-ChOlRBgg.js.map +1 -0
- package/dist/{server-DQHJszfk.js → server-DkVBSN_S.js} +362 -67
- package/dist/server-DkVBSN_S.js.map +1 -0
- package/dist/{structural-rollout-DAvIE8mw.js → structural-rollout-C1LEk_zq.js} +80 -80
- package/dist/structural-rollout-C1LEk_zq.js.map +1 -0
- package/dist/{substrate-B0TYNrXn.js → substrate-CGDFTSRh.js} +2 -9
- package/dist/substrate-CGDFTSRh.js.map +1 -0
- package/dist/{supervise-WuPAwfPh.js → supervise-CaUAxZZP.js} +92 -75
- package/dist/supervise-CaUAxZZP.js.map +1 -0
- package/dist/{supervisor-CPG1I9UN.js → supervisor-VXuN2OHT.js} +205 -319
- package/dist/supervisor-VXuN2OHT.js.map +1 -0
- package/dist/testing.d.ts +2 -2
- package/dist/testing.js +13 -13
- package/dist/testing.js.map +1 -1
- package/dist/tool-loop.d.ts +1 -1
- package/dist/{tool-server-Dqer2M4_.js → tool-server-XV4aJwoQ.js} +2 -2
- package/dist/tool-server-XV4aJwoQ.js.map +1 -0
- package/dist/top-snapshot-CbZE1JsU.js +502 -0
- package/dist/top-snapshot-CbZE1JsU.js.map +1 -0
- package/dist/tui/bin.js +711 -1
- package/dist/tui/bin.js.map +1 -1
- package/dist/tui/index.d.ts +2 -70
- package/dist/tui/index.js +3 -3
- package/dist/{types-zWfqDjeL.d.ts → types-Cwrea-bU.d.ts} +2 -17
- package/dist/{types-CrNWif8-.d.ts → types-DZ6L0Bv3.d.ts} +765 -2152
- package/dist/workspace-store/index.d.ts +1 -107
- package/dist/workspace-store/index.js +1 -415
- package/dist/workspace-store/index.js.map +1 -1
- package/dist/{workspace-streams-BZZds1Fw.d.ts → workspace-streams-BiS4ABah.d.ts} +3 -18
- package/package.json +1 -1
- package/skills/agent-graphs/references/authoring.md +3 -2
- package/dist/coder-yhVWbdWc.js +0 -40
- package/dist/coder-yhVWbdWc.js.map +0 -1
- package/dist/delegation-status-CF4D0NZ_.js +0 -358
- package/dist/delegation-status-CF4D0NZ_.js.map +0 -1
- package/dist/driver-control-acknowledgers-T2a1Ouay.js.map +0 -1
- package/dist/durable-file-B_eJr6Mb.js.map +0 -1
- package/dist/graph-CY0wH838.js.map +0 -1
- package/dist/improve-CWGBT13K.js.map +0 -1
- package/dist/integrations-6xttbPi9.d.ts +0 -190
- package/dist/integrations-dFi-ALk7.js +0 -132
- package/dist/integrations-dFi-ALk7.js.map +0 -1
- package/dist/kb-gate-C8z2juK8.d.ts +0 -80
- package/dist/kb-gate-DpaSwXVx.js +0 -80
- package/dist/kb-gate-DpaSwXVx.js.map +0 -1
- package/dist/loop-runner-bin-CFnrAHpl.d.ts +0 -164
- package/dist/loop-runner-bin-CdPlhy9g.js +0 -246
- package/dist/loop-runner-bin-CdPlhy9g.js.map +0 -1
- package/dist/memory-server-DXQ8IxGR.js +0 -234
- package/dist/memory-server-DXQ8IxGR.js.map +0 -1
- package/dist/openai-tools-DoQ32vpe.js +0 -44
- package/dist/openai-tools-DoQ32vpe.js.map +0 -1
- package/dist/openai-tools-zh2I_uD7.d.ts +0 -24
- package/dist/prepare-Bt0IouPq.js.map +0 -1
- package/dist/profile-Do-5xO_D.js.map +0 -1
- package/dist/profile-materialization-BnoEf1co.d.ts +0 -96
- package/dist/runtime-D37zRSs7.js.map +0 -1
- package/dist/sandbox-profile-compat-xSoVtdWw.js.map +0 -1
- package/dist/search-executor-DmgUm5p7.js.map +0 -1
- package/dist/server-DQHJszfk.js.map +0 -1
- package/dist/structural-rollout-DAvIE8mw.js.map +0 -1
- package/dist/substrate-B0TYNrXn.js.map +0 -1
- package/dist/supervise-WuPAwfPh.js.map +0 -1
- package/dist/supervisor-CPG1I9UN.js.map +0 -1
- package/dist/tool-server-Dqer2M4_.js.map +0 -1
- package/dist/top-app-C55Wa7uy.js +0 -1214
- package/dist/top-app-C55Wa7uy.js.map +0 -1
|
@@ -26,10 +26,8 @@ var __exportAll = (all, no_symbols) => {
|
|
|
26
26
|
var durable_file_exports = /* @__PURE__ */ __exportAll({
|
|
27
27
|
appendDurableFile: () => appendDurableFile,
|
|
28
28
|
assertNoSymlinkDescendant: () => assertNoSymlinkDescendant,
|
|
29
|
-
isAlreadyExistsError: () => isAlreadyExistsError,
|
|
30
29
|
publishExclusiveDurableFile: () => publishExclusiveDurableFile,
|
|
31
30
|
syncDurableDirectory: () => syncDurableDirectory,
|
|
32
|
-
syncDurableFile: () => syncDurableFile,
|
|
33
31
|
writeAtomicDurableFile: () => writeAtomicDurableFile
|
|
34
32
|
});
|
|
35
33
|
/** Publish a new file without replacing a concurrent winner. */
|
|
@@ -160,4 +158,4 @@ function isNoEntryError(error) {
|
|
|
160
158
|
//#endregion
|
|
161
159
|
export { syncDurableDirectory as a, publishExclusiveDurableFile as i, assertNoSymlinkDescendant as n, writeAtomicDurableFile as o, durable_file_exports as r, __exportAll as s, appendDurableFile as t };
|
|
162
160
|
|
|
163
|
-
//# sourceMappingURL=durable-file-
|
|
161
|
+
//# sourceMappingURL=durable-file-gNI9ILAn.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"durable-file-gNI9ILAn.js","names":["fsConstants"],"sources":["../src/runtime/supervise/durable-file.ts"],"sourcesContent":["/**\n * Small filesystem durability primitives for Runtime-owned state.\n *\n * Callers must validate their path and parent directory before invoking these functions.\n * The exclusive writer protects a no-clobber publication race; the atomic writer replaces one\n * state file after its temporary contents reach stable storage.\n *\n * @internal\n */\n\nimport { randomUUID } from 'node:crypto'\nimport {\n closeSync,\n existsSync,\n fchmodSync,\n constants as fsConstants,\n fsyncSync,\n linkSync,\n lstatSync,\n openSync,\n renameSync,\n statSync,\n unlinkSync,\n writeFileSync,\n writeSync,\n} from 'node:fs'\nimport { dirname, join, relative, resolve } from 'node:path'\n\ninterface DurableFileOptions {\n readonly mode?: number\n}\n\n/** Publish a new file without replacing a concurrent winner. */\nexport function publishExclusiveDurableFile(\n filePath: string,\n content: string,\n options: DurableFileOptions = {},\n): boolean {\n const temporaryPath = `${filePath}.${randomUUID()}.tmp`\n let operationFailed = false\n let operationError: unknown\n let published = false\n try {\n writeExclusiveDurableFile(temporaryPath, content, options)\n try {\n linkSync(temporaryPath, filePath)\n syncDurableDirectory(dirname(filePath))\n published = true\n } catch (error) {\n if (!isAlreadyExistsError(error)) throw error\n }\n } catch (error) {\n operationFailed = true\n operationError = error\n }\n let cleanupError: unknown\n try {\n unlinkSync(temporaryPath)\n } catch (error) {\n if (!isNoEntryError(error)) cleanupError = error\n }\n if (operationFailed) throw operationError\n if (cleanupError !== undefined) throw cleanupError\n return published\n}\n\n/** Fsync a directory after publishing a durable file entry. */\nexport function syncDurableDirectory(directoryPath: string): void {\n const fd = openSync(directoryPath, 'r')\n try {\n fsyncSync(fd)\n } finally {\n closeSync(fd)\n }\n}\n\n/** Fsync one durable file after its contents reach stable storage. */\nfunction syncDurableFile(filePath: string, exactMode?: number): void {\n const fd = openSync(filePath, 'r')\n try {\n if (exactMode !== undefined && process.platform !== 'win32') fchmodSync(fd, exactMode)\n fsyncSync(fd)\n } finally {\n closeSync(fd)\n }\n}\n\n/** Append one record with O_APPEND, then fsync the file and containing directory. */\nexport function appendDurableFile(\n filePath: string,\n content: string,\n options: DurableFileOptions = {},\n): void {\n const flags =\n fsConstants.O_APPEND |\n fsConstants.O_CREAT |\n fsConstants.O_WRONLY |\n (typeof fsConstants.O_NOFOLLOW === 'number' ? fsConstants.O_NOFOLLOW : 0)\n const fd = openSync(filePath, flags, options.mode ?? 0o600)\n try {\n if (process.platform !== 'win32') fchmodSync(fd, options.mode ?? 0o600)\n const expectedBytes = Buffer.byteLength(content, 'utf8')\n const writtenBytes = writeSync(fd, content, undefined, 'utf8')\n if (writtenBytes !== expectedBytes) {\n throw new Error(\n `durable append wrote ${writtenBytes} of ${expectedBytes} bytes to '${filePath}'`,\n )\n }\n fsyncSync(fd)\n } finally {\n closeSync(fd)\n }\n syncDurableDirectory(dirname(filePath))\n}\n\n/** Reject a path that escapes its run directory or traverses a symbolic link. */\nexport function assertNoSymlinkDescendant(root: string, target: string, label = 'path'): void {\n const base = resolve(root)\n const exact = resolve(target)\n const rel = relative(base, exact)\n if (rel === '..' || rel.startsWith(`..${process.platform === 'win32' ? '\\\\' : '/'}`)) {\n throw new Error(`${label} path escapes its run directory`)\n }\n if (existsSync(base) && lstatSync(base).isSymbolicLink()) {\n throw new Error(`${label} path contains a symbolic link: ${base}`)\n }\n let current = base\n for (const part of rel.split(/[\\\\/]/u).filter(Boolean)) {\n current = join(current, part)\n if (!existsSync(current)) continue\n if (lstatSync(current).isSymbolicLink()) {\n throw new Error(`${label} path contains a symbolic link: ${current}`)\n }\n }\n}\n\n/** Write, fsync, atomically replace, and fsync one Runtime-owned state file.\n * preserveMode retains ordinary access permissions despite the current umask; a new\n * file keeps normal creation semantics. Callers still own path validation and write exclusion. */\nexport function writeAtomicDurableFile(\n filePath: string,\n content: string,\n options: DurableFileOptions & { readonly preserveMode?: boolean } = {},\n): void {\n const temporaryPath = `${filePath}.${randomUUID()}.tmp`\n let operationFailed = false\n let operationError: unknown\n try {\n let mode = options.mode\n let exactMode = false\n if (options.preserveMode) {\n try {\n mode = statSync(filePath).mode & 0o777\n exactMode = true\n } catch (error) {\n if (!isNoEntryError(error)) throw error\n }\n }\n writeExclusiveDurableFile(temporaryPath, content, { mode }, exactMode)\n renameSync(temporaryPath, filePath)\n syncDurableDirectory(dirname(filePath))\n } catch (error) {\n operationFailed = true\n operationError = error\n }\n let cleanupError: unknown\n try {\n unlinkSync(temporaryPath)\n } catch (error) {\n if (!isNoEntryError(error)) cleanupError = error\n // A successful rename removes the temporary directory entry.\n }\n if (operationFailed) throw operationError\n if (cleanupError !== undefined) throw cleanupError\n}\n\nfunction writeExclusiveDurableFile(\n filePath: string,\n content: string,\n options: DurableFileOptions,\n exactMode = false,\n): void {\n if (options.mode === undefined) {\n writeFileSync(filePath, content, { encoding: 'utf8', flag: 'wx' })\n } else {\n writeFileSync(filePath, content, { encoding: 'utf8', flag: 'wx', mode: options.mode })\n }\n syncDurableFile(filePath, exactMode ? options.mode : undefined)\n}\n\nfunction isAlreadyExistsError(error: unknown): boolean {\n return (\n error !== null &&\n typeof error === 'object' &&\n 'code' in error &&\n (error as { code?: unknown }).code === 'EEXIST'\n )\n}\n\nfunction isNoEntryError(error: unknown): boolean {\n return (\n error !== null &&\n typeof error === 'object' &&\n 'code' in error &&\n (error as { code?: unknown }).code === 'ENOENT'\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,SAAgB,4BACd,UACA,SACA,UAA8B,CAAC,GACtB;CACT,MAAM,gBAAgB,GAAG,SAAS,GAAG,WAAW,EAAE;CAClD,IAAI,kBAAkB;CACtB,IAAI;CACJ,IAAI,YAAY;CAChB,IAAI;EACF,0BAA0B,eAAe,SAAS,OAAO;EACzD,IAAI;GACF,SAAS,eAAe,QAAQ;GAChC,qBAAqB,QAAQ,QAAQ,CAAC;GACtC,YAAY;EACd,SAAS,OAAO;GACd,IAAI,CAAC,qBAAqB,KAAK,GAAG,MAAM;EAC1C;CACF,SAAS,OAAO;EACd,k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AA,GACnB,cAAc,UAAU,SAAS;EAAE,UAAU;EAAQ,MAAM;CAAK,CAAC;MAEjE,cAAc,UAAU,SAAS;EAAE,UAAU;EAAQ,MAAM;EAAM,MAAM,QAAQ;CAAK,CAAC;CAEvF,gBAAgB,UAAU,YAAY,QAAQ,OAAO,KAAA,CAAS;AAChE;AAEA,SAAS,qBAAqB,OAAyB;CACrD,OACE,UAAU,QACV,OAAO,UAAU,YACjB,UAAU,SACT,MAA6B,SAAS;AAE3C;AAEA,SAAS,eAAe,OAAyB;CAC/C,OACE,UAAU,QACV,OAAO,UAAU,YACjB,UAAU,SACT,MAA6B,SAAS;AAE3C"}
|
package/dist/durable.d.ts
CHANGED
|
@@ -1,37 +1,5 @@
|
|
|
1
|
-
import { $
|
|
2
|
-
|
|
3
|
-
/** The root stream: one JSONL line per progress event the root's executor observed. */
|
|
4
|
-
declare const ROOT_STREAM_FILE = "root-stream.jsonl";
|
|
5
|
-
/** One line of `root-stream.jsonl`. */
|
|
6
|
-
type RootStreamRecord = {
|
|
7
|
-
/** 1-based position in the file, continuing across drive attempts and across processes. */
|
|
8
|
-
readonly seq: number;
|
|
9
|
-
/** ISO instant the line was appended, from the run's own clock. */
|
|
10
|
-
readonly at: string;
|
|
11
|
-
/** The 1-based drive attempt of the root that produced it: a driver retry or re-prompt
|
|
12
|
-
* re-enters the harness and continues the same file with the next attempt number. */
|
|
13
|
-
readonly attempt: number;
|
|
14
|
-
} & ({
|
|
15
|
-
readonly event: ExecutorProgressEvent;
|
|
16
|
-
} | {
|
|
17
|
-
/** The event could not be written as JSON; its kind and the reason stand in so the gap
|
|
18
|
-
* is recorded in the file itself instead of silently narrowing the stream. */
|
|
19
|
-
readonly dropped: {
|
|
20
|
-
readonly kind: ExecutorProgressEvent['kind'];
|
|
21
|
-
readonly reason: string;
|
|
22
|
-
};
|
|
23
|
-
});
|
|
24
|
-
/**
|
|
25
|
-
* The receipt for the root stream a run directory holds, recomputed from the file's bytes, or
|
|
26
|
-
* `undefined` when the directory holds none. This is what a run that never settled — a root that
|
|
27
|
-
* died mid-turn — gets on its failure record, and it equals what `close()` returned for a run
|
|
28
|
-
* that did.
|
|
29
|
-
*/
|
|
30
|
-
declare function readRootStreamReceipt(runDir: string): Promise<RootStreamReceipt | undefined>;
|
|
31
|
-
/** Every committed line of the root stream, in order, or `undefined` when there is no file. A
|
|
32
|
-
* torn final line from a process that died mid-write is not a record and is left out. */
|
|
33
|
-
declare function readRootStream(runDir: string): Promise<RootStreamRecord[] | undefined>;
|
|
34
|
-
//#endregion
|
|
1
|
+
import { $l as PursuitVersions, Av as ContinuityMode, Bd as RootStreamRecord, Cu as projectPursuit, Cy as AnalyzeOnSettleRoute, D as RetainedPendingCause, Dd as DeadlineCheckIn, Du as ObserverRecordKind, Eu as ObserverRecord, Gm as ToolLoopCompactionOptions, Hd as readRootStreamReceipt, Jf as CoordinationTransportOptions, Jl as JudgedPursuitVersion, Kf as CoordinationPublicAddress, Ku as AuthorizedSpawn, Lv as MapOnSettleRoute, Ou as observerRecordDigest, Ov as AuthorizedDownMessage, Ql as PursuitVersionStop, Su as PursuitStatus, Tu as ObserverJournal, V as NodeId, Vd as readRootStream, Wf as CoordinationAuthentication, Xf as CoordinationHttpAudit, Xl as NextPursuitVersionInput, Xu as WorkerSlots, Yl as NextPursuitVersion, Zf as CoordinationRejectReason, Zl as PursuitVersionChain, _u as PursuitNodeTiming, au as SupervisePursuitError, av as WorkerWatchOptions, bu as PursuitRunProjection, cf as DriveHarnessOwnerContext, cu as superviseGraphPursuit, du as RUN_FORK_CORRELATION_KEYS, eu as SettledPursuitVersion, fd as SelectSeat, fu as PursuitObserverDelivery, gu as PursuitNodeProjection, hu as PursuitNodePlatform, hv as EscalateQuestion, it as SupervisedResult, iu as SuperviseGraphPursuitOptions, jv as DownMessageAuthorizationInput, ld as SeatSelection, lu as supervisePursuit, mu as PursuitNodeCost, nu as VersionVerdict, ou as SupervisePursuitOptions, pu as PursuitCostProvenance, qf as CoordinationReadAccess, qu as AuthorizedSpawnContext, rt as RootStreamReceipt, ru as assertPursuitVersions, su as SupervisedPursuitResult, tu as VersionJudge, ud as SeatSelectionInput, uf as ResolveDriveHarness, uu as PursuitFork, vf as ManagerWakePolicy, vu as PursuitNodeUsage, vv as QuestionEscalationOutcome, wu as FileObserverJournal, xu as PursuitRunTotals, yu as PursuitProjection } from "./types-DZ6L0Bv3.js";
|
|
2
|
+
import { n as RuntimeDecisionKind, r as RuntimeDecisionPoint, t as RuntimeDecisionEvidenceRef } from "./runtime-hooks-nsqxSUFL.js";
|
|
35
3
|
//#region src/durable/chat-engine.d.ts
|
|
36
4
|
/**
|
|
37
5
|
* `handleChatTurn` is a framework-neutral chat-turn HTTP orchestrator.
|
|
@@ -289,5 +257,5 @@ interface DurableSupervisionDiscovery {
|
|
|
289
257
|
*/
|
|
290
258
|
declare function discoverDurableSupervisionRun(runDir: string): Promise<DurableSupervisionDiscovery>;
|
|
291
259
|
//#endregion
|
|
292
|
-
export { type ChatStreamEvent, type ChatTurnHooks, type ChatTurnIdentity, type ChatTurnProducer, type ChatTurnResult, type DurableCoordinationStreamIdentity, type DurableFailureRecord, type DurableSupervisionDiscovery, FileObserverJournal, type JudgedPursuitVersion, type NextPursuitVersion, type NextPursuitVersionInput, type ObserverJournal, type ObserverRecord, type ObserverRecordKind, type PursuitCostProvenance, type PursuitFork, type PursuitNodeCost, type
|
|
260
|
+
export { type AnalyzeOnSettleRoute, type AuthorizedDownMessage, type AuthorizedSpawn, type AuthorizedSpawnContext, type ChatStreamEvent, type ChatTurnHooks, type ChatTurnIdentity, type ChatTurnProducer, type ChatTurnResult, type ContinuityMode, type CoordinationAuthentication, type CoordinationHttpAudit, type CoordinationPublicAddress, type CoordinationReadAccess, type CoordinationRejectReason, type CoordinationTransportOptions, type DeadlineCheckIn, type DownMessageAuthorizationInput, type DriveHarnessOwnerContext, type DurableCoordinationStreamIdentity, type DurableFailureRecord, type DurableSupervisionDiscovery, type EscalateQuestion, FileObserverJournal, type JudgedPursuitVersion, type ManagerWakePolicy, type MapOnSettleRoute, type NextPursuitVersion, type NextPursuitVersionInput, type ObserverJournal, type ObserverRecord, type ObserverRecordKind, type PursuitCostProvenance, type PursuitFork, type PursuitNodeCost, type PursuitNodePlatform, type PursuitNodeProjection, type PursuitNodeTiming, type PursuitNodeUsage, type PursuitObserverDelivery, type PursuitProjection, type PursuitRunProjection, type PursuitRunTotals, type PursuitStatus, type PursuitVersionChain, type PursuitVersionStop, type PursuitVersions, type QuestionEscalationOutcome, RUN_FORK_CORRELATION_KEYS, type ResolveDriveHarness, type RetainedPendingCause, type RootStreamRecord, type RunChatTurnInput, type RunDirectoryHolderLiveness, type RunDirectoryLock, type RunDirectoryLockHolder, RunDirectoryLockedError, type RuntimeDecisionEvidenceRef, type RuntimeDecisionKind, type RuntimeDecisionPoint, type SeatSelection, type SeatSelectionInput, type SelectSeat, type SettledPursuitVersion, SettledRunDirectoryError, type SuperviseGraphPursuitOptions, SupervisePursuitError, type SupervisePursuitOptions, type SupervisedPursuitResult, type ToolLoopCompactionOptions, type VersionJudge, type VersionVerdict, type WorkerSlots, type WorkerWatchOptions, acquireRunDirectoryLock, assertPursuitVersions, deriveExecutionId, discoverDurableSupervisionRun, handleChatTurn, observerRecordDigest, projectPursuit, readFailureRecord, readRootStream, readRootStreamReceipt, readRunDirectoryLock, readSettleRecord, runDirectoryHolderIsLive, superviseGraphPursuit, supervisePursuit };
|
|
293
261
|
//# sourceMappingURL=durable.d.ts.map
|
package/dist/durable.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { i as publishExclusiveDurableFile, o as writeAtomicDurableFile } from "./durable-file-
|
|
2
|
-
import {
|
|
1
|
+
import { i as publishExclusiveDurableFile, o as writeAtomicDurableFile } from "./durable-file-gNI9ILAn.js";
|
|
2
|
+
import { Hr as authoredProfileDigest, S as FileSpawnJournal, Si as contentAddress, ar as isFiniteNumber, at as loadSpawnForest, ir as failedItems, xi as detachedSnapshot } from "./supervisor-VXuN2OHT.js";
|
|
3
3
|
import { f as RuntimeRunStateError, m as ValidationError } from "./errors-DodWX-cb.js";
|
|
4
4
|
import { t as isRecord } from "./record-value-B6bwJxLa.js";
|
|
5
|
-
import {
|
|
5
|
+
import { W as addSpend, X as errorMessage, ft as zeroSpend, q as cloneSpend } from "./sandbox-profile-compat-DRr3JwDx.js";
|
|
6
6
|
import { a as withPursuitContext, t as composeRuntimeHooks } from "./runtime-hooks-tXpAarhW.js";
|
|
7
|
-
import { a as readCommittedJsonLines, n as isNoEntError, t as appendCommittedJsonLine } from "./jsonl-file-
|
|
8
|
-
import {
|
|
9
|
-
import { a as applyExactAgentProfileDiff } from "./profile-
|
|
10
|
-
import {
|
|
11
|
-
import { i as superviseAgentGraph } from "./graph-
|
|
7
|
+
import { a as readCommittedJsonLines, n as isNoEntError, t as appendCommittedJsonLine } from "./jsonl-file-C9Kde_0Z.js";
|
|
8
|
+
import { J as readRootStreamReceipt, a as superviseRootProfile, q as readRootStream, t as supervise } from "./supervise-CaUAxZZP.js";
|
|
9
|
+
import { a as applyExactAgentProfileDiff } from "./profile-DToH0XEs.js";
|
|
10
|
+
import { g as supervisorRunDir } from "./run-cancellation-C9oL62sW.js";
|
|
11
|
+
import { i as superviseAgentGraph } from "./graph-DfWqp_1e.js";
|
|
12
12
|
import { agentProfileSchema, canonicalAgentProfileDigest, canonicalCandidateDigest, canonicalCandidateJson, sha256Bytes } from "@tangle-network/agent-interface";
|
|
13
13
|
import { createHash } from "node:crypto";
|
|
14
14
|
import { basename, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
@@ -1157,7 +1157,7 @@ function reviewOfBest(runId, words) {
|
|
|
1157
1157
|
const page = reviewPage(best.version, best.verdict.score, verdict);
|
|
1158
1158
|
const earlier = best.change?.set?.prompt?.instructions ?? [];
|
|
1159
1159
|
const earlierInstructions = earlier.filter((text) => text !== instruction);
|
|
1160
|
-
const earlierMounts = (best.profile.resources?.files ?? []).map((file) => file.path).filter((mounted) => mounted.startsWith(
|
|
1160
|
+
const earlierMounts = (best.profile.resources?.files ?? []).map((file) => file.path).filter((mounted) => mounted.startsWith(REVIEW_DIR) && mounted !== path);
|
|
1161
1161
|
return {
|
|
1162
1162
|
kind: "agent-profile-diff",
|
|
1163
1163
|
id: `${runId}-v${n}-review-of-v${best.version}`,
|
|
@@ -2464,6 +2464,6 @@ function compareText(left, right) {
|
|
|
2464
2464
|
return left < right ? -1 : left > right ? 1 : 0;
|
|
2465
2465
|
}
|
|
2466
2466
|
//#endregion
|
|
2467
|
-
export { FileObserverJournal,
|
|
2467
|
+
export { FileObserverJournal, RUN_FORK_CORRELATION_KEYS, RunDirectoryLockedError, SettledRunDirectoryError, SupervisePursuitError, acquireRunDirectoryLock, assertPursuitVersions, deriveExecutionId, discoverDurableSupervisionRun, handleChatTurn, observerRecordDigest, projectPursuit, readFailureRecord, readRootStream, readRootStreamReceipt, readRunDirectoryLock, readSettleRecord, runDirectoryHolderIsLive, superviseGraphPursuit, supervisePursuit };
|
|
2468
2468
|
|
|
2469
2469
|
//# sourceMappingURL=durable.js.map
|