@tangle-network/agent-runtime 0.207.0 → 0.208.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/dist/{activation-D8FvmCf5.js → activation-B86jXbpE.js} +2 -2
- package/dist/{activation-D8FvmCf5.js.map → activation-B86jXbpE.js.map} +1 -1
- package/dist/{activation-3drfS9_j.d.ts → activation-Dan50rKs.d.ts} +2 -2
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +2 -2
- package/dist/{coordination-driver-CwT-9dXa.js → coordination-driver-D9dbnSA0.js} +22 -8
- package/dist/coordination-driver-D9dbnSA0.js.map +1 -0
- package/dist/{delegate-yLW9_OGW.js → delegate-DP3QsLAy.js} +2 -2
- package/dist/{delegate-yLW9_OGW.js.map → delegate-DP3QsLAy.js.map} +1 -1
- package/dist/durable.d.ts +2 -2
- package/dist/durable.js +2 -2
- package/dist/{graph-Dcb2PVEB.js → graph-BXa0AN64.js} +4 -4
- package/dist/{graph-Dcb2PVEB.js.map → graph-BXa0AN64.js.map} +1 -1
- package/dist/{improvement-cycle-ByIC070x.js → improvement-cycle-BFg94oh7.js} +3 -3
- package/dist/{improvement-cycle-ByIC070x.js.map → improvement-cycle-BFg94oh7.js.map} +1 -1
- package/dist/{index-B62R6dL9.d.ts → index-CHkf3b2C.d.ts} +4171 -4095
- package/dist/index.d.ts +4 -4
- package/dist/index.js +7 -7
- package/dist/intelligence.d.ts +2 -2
- package/dist/intelligence.js +3 -3
- package/dist/kernel.d.ts +3 -3
- package/dist/kernel.js +10 -10
- package/dist/{loop-runner-bin-CArH3v2c.d.ts → loop-runner-bin-BUVcdgNU.d.ts} +3 -3
- package/dist/{loop-runner-bin-CNNq7tcp.js → loop-runner-bin-Cv-sYY_b.js} +3 -3
- package/dist/{loop-runner-bin-CNNq7tcp.js.map → loop-runner-bin-Cv-sYY_b.js.map} +1 -1
- package/dist/loop-runner-bin.d.ts +1 -1
- package/dist/loop-runner-bin.js +1 -1
- package/dist/mcp/bin.js +3 -3
- package/dist/mcp/index.d.ts +2 -2
- package/dist/mcp/index.js +4 -4
- package/dist/{provision-supervisor-B8zEk1-7.js → provision-supervisor-DARqIVIZ.js} +5 -5
- package/dist/{provision-supervisor-B8zEk1-7.js.map → provision-supervisor-DARqIVIZ.js.map} +1 -1
- package/dist/{redact-CLRRxkXF.js → redact-DXxGazcg.js} +277 -51
- package/dist/redact-DXxGazcg.js.map +1 -0
- package/dist/{run-layout-B8I_LXN-.js → run-layout-hZREkcfu.js} +10 -5
- package/dist/run-layout-hZREkcfu.js.map +1 -0
- package/dist/{runtime-C-oKXuHJ.js → runtime-DXz65UHu.js} +264 -13
- package/dist/runtime-DXz65UHu.js.map +1 -0
- package/dist/{server-CLtEdwo_.js → server-DLxegwGE.js} +3 -3
- package/dist/{server-CLtEdwo_.js.map → server-DLxegwGE.js.map} +1 -1
- package/dist/{stream-agent-turn-CpRKkS19.d.ts → stream-agent-turn-B3NfR48z.d.ts} +34 -4
- package/dist/{structural-rollout-Bnewh9dN.js → structural-rollout-D3Su8Dla.js} +2 -2
- package/dist/{structural-rollout-Bnewh9dN.js.map → structural-rollout-D3Su8Dla.js.map} +1 -1
- package/dist/{supervise-BN5VMhRq.js → supervise-B5kRyFJj.js} +24 -22
- package/dist/supervise-B5kRyFJj.js.map +1 -0
- package/dist/testing.d.ts +2 -2
- package/dist/testing.js +12 -12
- package/dist/{top-app-KgIFpD9H.js → top-app-CMMd8DgR.js} +6 -2
- package/dist/top-app-CMMd8DgR.js.map +1 -0
- package/dist/tui/bin.js +1 -1
- package/dist/tui/index.d.ts +2 -1
- package/dist/tui/index.js +2 -2
- package/package.json +1 -1
- package/dist/coordination-driver-CwT-9dXa.js.map +0 -1
- package/dist/redact-CLRRxkXF.js.map +0 -1
- package/dist/run-layout-B8I_LXN-.js.map +0 -1
- package/dist/runtime-C-oKXuHJ.js.map +0 -1
- package/dist/supervise-BN5VMhRq.js.map +0 -1
- package/dist/top-app-KgIFpD9H.js.map +0 -1
|
@@ -4000,6 +4000,119 @@ async function defaultRunCommand(opts) {
|
|
|
4000
4000
|
};
|
|
4001
4001
|
}
|
|
4002
4002
|
//#endregion
|
|
4003
|
+
//#region src/runtime/provider-placement.ts
|
|
4004
|
+
const placementMetadataKey = "runtimeProviderPlacement";
|
|
4005
|
+
/** Select exactly one declaration before any provider effects. Shared defaults carry infrastructure only. */
|
|
4006
|
+
function selectProviderPlacement(profile, options) {
|
|
4007
|
+
if (options.placements === void 0) return { options };
|
|
4008
|
+
if (options.defaults?.backend !== void 0 || options.defaults?.secrets !== void 0 || options.promptOptions !== void 0) throw new ValidationError$1("provider placements: backend, secrets and promptOptions belong in each placement");
|
|
4009
|
+
for (const key of [
|
|
4010
|
+
"profile",
|
|
4011
|
+
"idempotencyKey",
|
|
4012
|
+
"requestedId"
|
|
4013
|
+
]) if (Object.hasOwn(options.defaults ?? {}, key)) throw new ValidationError$1(`provider placements: defaults.${key} is owned by Runtime`);
|
|
4014
|
+
const placements = detachedSnapshot(options.placements, "provider placements");
|
|
4015
|
+
const ids = /* @__PURE__ */ new Set();
|
|
4016
|
+
for (const placement of placements) {
|
|
4017
|
+
canonicalCandidateDigest(placement);
|
|
4018
|
+
if (Object.keys(placement).some((key) => ![
|
|
4019
|
+
"id",
|
|
4020
|
+
"match",
|
|
4021
|
+
"create",
|
|
4022
|
+
"promptOptions"
|
|
4023
|
+
].includes(key)) || Object.keys(placement.match).some((key) => ![
|
|
4024
|
+
"harness",
|
|
4025
|
+
"provider",
|
|
4026
|
+
"model"
|
|
4027
|
+
].includes(key))) throw new ValidationError$1("provider placements: unknown declaration or match field");
|
|
4028
|
+
if ([placement.match.provider, placement.match.model].some((value) => value !== void 0 && (typeof value !== "string" || !value.trim()))) throw new ValidationError$1("provider placements: provider and model selectors must be nonempty strings");
|
|
4029
|
+
if (!placement.id?.trim() || ids.has(placement.id)) throw new ValidationError$1("provider placements: ids must be nonempty and unique");
|
|
4030
|
+
ids.add(placement.id);
|
|
4031
|
+
if (!placement.match?.harness || placement.create?.backend !== placement.match.harness) throw new ValidationError$1("provider placements: create.backend must match the declared harness");
|
|
4032
|
+
for (const key of [
|
|
4033
|
+
"profile",
|
|
4034
|
+
"signal",
|
|
4035
|
+
"idempotencyKey",
|
|
4036
|
+
"requestedId",
|
|
4037
|
+
"runtimeAttachments"
|
|
4038
|
+
]) if (Object.hasOwn(placement.create, key)) throw new ValidationError$1(`provider placements: create.${key} is owned by Runtime`);
|
|
4039
|
+
const backend = placement.promptOptions?.backend;
|
|
4040
|
+
if (backend?.type !== void 0 && backend.type !== placement.match.harness || backend?.model?.provider !== void 0 && backend.model.provider !== placement.match.provider || backend?.model?.model !== void 0 && backend.model.model !== placement.match.model) throw new ValidationError$1("provider placements: turn backend/model must match the declared profile selector");
|
|
4041
|
+
}
|
|
4042
|
+
const matches = placements.filter(({ match }) => profile.harness === match.harness && (match.provider === void 0 || profile.model?.provider === match.provider) && (match.model === void 0 || concreteProfileModel(profile) === match.model));
|
|
4043
|
+
if (matches.length !== 1) throw new ValidationError$1(`provider placements: expected one matching declaration, found ${matches.length}`);
|
|
4044
|
+
const placement = matches[0];
|
|
4045
|
+
const common = options.defaults ?? {};
|
|
4046
|
+
if (Object.hasOwn(common.metadata ?? {}, placementMetadataKey) || Object.hasOwn(placement.create.metadata ?? {}, placementMetadataKey)) throw new ValidationError$1("provider placements: reserved placement metadata key");
|
|
4047
|
+
for (const key of Object.keys(placement.create.env ?? {})) if (Object.hasOwn(common.env ?? {}, key)) throw new ValidationError$1("provider placements: placement cannot replace a shared environment variable");
|
|
4048
|
+
const effectiveCreate = {
|
|
4049
|
+
...common,
|
|
4050
|
+
...placement.create,
|
|
4051
|
+
...common.env === void 0 && placement.create.env === void 0 ? {} : { env: {
|
|
4052
|
+
...common.env,
|
|
4053
|
+
...placement.create.env
|
|
4054
|
+
} },
|
|
4055
|
+
metadata: {
|
|
4056
|
+
...common.metadata,
|
|
4057
|
+
...placement.create.metadata
|
|
4058
|
+
}
|
|
4059
|
+
};
|
|
4060
|
+
const identity = {
|
|
4061
|
+
id: placement.id,
|
|
4062
|
+
digest: canonicalCandidateDigest({
|
|
4063
|
+
id: placement.id,
|
|
4064
|
+
match: placement.match,
|
|
4065
|
+
create: publicCreateOptions(effectiveCreate),
|
|
4066
|
+
promptOptions: publicPromptOptions(placement.promptOptions)
|
|
4067
|
+
})
|
|
4068
|
+
};
|
|
4069
|
+
return {
|
|
4070
|
+
identity,
|
|
4071
|
+
options: {
|
|
4072
|
+
...options,
|
|
4073
|
+
placements: void 0,
|
|
4074
|
+
defaults: {
|
|
4075
|
+
...effectiveCreate,
|
|
4076
|
+
metadata: {
|
|
4077
|
+
...effectiveCreate.metadata,
|
|
4078
|
+
[placementMetadataKey]: identity
|
|
4079
|
+
}
|
|
4080
|
+
},
|
|
4081
|
+
promptOptions: placement.promptOptions
|
|
4082
|
+
}
|
|
4083
|
+
};
|
|
4084
|
+
}
|
|
4085
|
+
function publicPromptOptions(options) {
|
|
4086
|
+
if (options === void 0) return null;
|
|
4087
|
+
const { backend, ...turn } = options;
|
|
4088
|
+
if (backend === void 0) return turn;
|
|
4089
|
+
const { model, ...backendOptions } = backend;
|
|
4090
|
+
if (model === void 0) return {
|
|
4091
|
+
...turn,
|
|
4092
|
+
backend: backendOptions
|
|
4093
|
+
};
|
|
4094
|
+
const { apiKey, authFiles, ...modelOptions } = model;
|
|
4095
|
+
return {
|
|
4096
|
+
...turn,
|
|
4097
|
+
backend: {
|
|
4098
|
+
...backendOptions,
|
|
4099
|
+
model: {
|
|
4100
|
+
...modelOptions,
|
|
4101
|
+
...apiKey === void 0 ? {} : { apiKeyPresent: true },
|
|
4102
|
+
...authFiles === void 0 ? {} : { authFiles: authFiles.map(({ content: _content, ...file }) => file) }
|
|
4103
|
+
}
|
|
4104
|
+
}
|
|
4105
|
+
};
|
|
4106
|
+
}
|
|
4107
|
+
function publicCreateOptions(create) {
|
|
4108
|
+
const { env, secrets, signal: _signal, profile: _profile, idempotencyKey: _idempotencyKey, requestedId: _requestedId, runtimeAttachments: _runtimeAttachments, ...configuration } = create;
|
|
4109
|
+
return {
|
|
4110
|
+
...configuration,
|
|
4111
|
+
...env === void 0 ? {} : { environmentVariableNames: Object.keys(env).sort() },
|
|
4112
|
+
...secrets === void 0 ? {} : { secretNames: Array.isArray(secrets) ? [...secrets].sort() : Object.keys(secrets).sort() }
|
|
4113
|
+
};
|
|
4114
|
+
}
|
|
4115
|
+
//#endregion
|
|
4003
4116
|
//#region src/sanitize.ts
|
|
4004
4117
|
/** Strip PII and large blobs from a `KnowledgeReadinessReport` for safe telemetry emission. @stable */
|
|
4005
4118
|
function sanitizeKnowledgeReadinessReport(report, options = {}) {
|
|
@@ -5978,6 +6091,7 @@ function createRetainedRunHandle(environment, session, initialControlRef, capabi
|
|
|
5978
6091
|
*/
|
|
5979
6092
|
function retainedCreateMaterial(environment) {
|
|
5980
6093
|
return {
|
|
6094
|
+
...environment.metadata?.runtimeProviderPlacement === void 0 ? {} : { placement: environment.metadata.runtimeProviderPlacement },
|
|
5981
6095
|
...environment.backend === void 0 ? {} : { backend: environment.backend },
|
|
5982
6096
|
...environment.workspace === void 0 ? {} : { workspaceDigest: canonicalCandidateDigest(publicWorkspaceMaterial(environment.workspace)) },
|
|
5983
6097
|
...environment.resources === void 0 ? {} : { resourcesDigest: canonicalCandidateDigest(publicResourceMaterial(environment.resources)) },
|
|
@@ -6036,30 +6150,23 @@ function retainedTurnMaterial(input, contextTransfer) {
|
|
|
6036
6150
|
}
|
|
6037
6151
|
//#endregion
|
|
6038
6152
|
//#region src/runtime/retained-run-start.ts
|
|
6039
|
-
const MAX_RETAINED_IDENTITY_BYTES = 128;
|
|
6040
6153
|
/**
|
|
6041
6154
|
* Mint deterministic dispatch coordinates from the two caller-supplied keys.
|
|
6042
6155
|
* The same `(idempotencyKey, turnId)` pair yields the same coordinates in
|
|
6043
6156
|
* every process, so a pre-dispatch admission record always names the exact
|
|
6044
|
-
* session and execution the dispatch will request.
|
|
6045
|
-
*
|
|
6046
|
-
* provider storage layers never receive an overlong composite identifier.
|
|
6157
|
+
* session and execution the dispatch will request. A full SHA-256 digest
|
|
6158
|
+
* keeps provider session identifiers bounded and safe for workspace paths.
|
|
6047
6159
|
*/
|
|
6048
6160
|
function mintRetainedIdentity(idempotencyKey, turnId) {
|
|
6049
|
-
const base = `${encodeURIComponent(idempotencyKey)}:${encodeURIComponent(turnId)}`;
|
|
6050
6161
|
const digest = canonicalCandidateDigest({
|
|
6051
6162
|
kind: "retained-identity.v1",
|
|
6052
|
-
base
|
|
6163
|
+
base: `${encodeURIComponent(idempotencyKey)}:${encodeURIComponent(turnId)}`
|
|
6053
6164
|
}).slice(7);
|
|
6054
6165
|
return {
|
|
6055
|
-
sessionId:
|
|
6056
|
-
executionId:
|
|
6166
|
+
sessionId: `retained-session-${digest}`,
|
|
6167
|
+
executionId: `retained-execution-${digest}`
|
|
6057
6168
|
};
|
|
6058
6169
|
}
|
|
6059
|
-
function boundedRetainedIdentity(prefix, base, digest) {
|
|
6060
|
-
const readable = `${prefix}:${base}`;
|
|
6061
|
-
return readable.length <= MAX_RETAINED_IDENTITY_BYTES ? readable : `${prefix}:${digest}`;
|
|
6062
|
-
}
|
|
6063
6170
|
/**
|
|
6064
6171
|
* Dispatch one detached, replayable run and return only after exact durable
|
|
6065
6172
|
* coordinates are confirmed by the provider and persisted by the caller.
|
|
@@ -6074,12 +6181,14 @@ function boundedRetainedIdentity(prefix, base, digest) {
|
|
|
6074
6181
|
async function startRetainedRun(options) {
|
|
6075
6182
|
assertStableText(options.environment.idempotencyKey, "environment idempotency key");
|
|
6076
6183
|
assertStableText(options.turn.turnId, "turn idempotency key");
|
|
6077
|
-
if (options.identity !== void 0) {
|
|
6078
|
-
assertStableText(options.identity.sessionId, "retained session id");
|
|
6079
|
-
assertStableText(options.identity.executionId, "retained execution id");
|
|
6080
|
-
}
|
|
6081
6184
|
if (typeof options.onAdmission !== "function") throw new Error("startRetainedRun requires an awaited onAdmission durability hook");
|
|
6082
|
-
const
|
|
6185
|
+
const { sessionId, executionId } = options.identity ?? options.intent ?? mintRetainedIdentity(options.environment.idempotencyKey, options.turn.turnId);
|
|
6186
|
+
const identity = {
|
|
6187
|
+
sessionId,
|
|
6188
|
+
executionId
|
|
6189
|
+
};
|
|
6190
|
+
assertStableText(identity.sessionId, "retained session id");
|
|
6191
|
+
assertStableText(identity.executionId, "retained execution id");
|
|
6083
6192
|
const contextTransfer = retainedContextTransfer(options.turn.contextTransfer);
|
|
6084
6193
|
if (!options.provider.get) throw new Error(`provider "${options.provider.name}" cannot reconstruct an environment by id`);
|
|
6085
6194
|
const intent = retainedRunIntent(options, identity, contextTransfer);
|
|
@@ -6308,7 +6417,9 @@ async function recoverRetainedRun(options) {
|
|
|
6308
6417
|
}
|
|
6309
6418
|
/** Check public replay material before reconnecting an already-dispatched execution. */
|
|
6310
6419
|
function assertRetainedRunReplayMaterial(provider, replay, admission) {
|
|
6311
|
-
const identity = replay.identity ??
|
|
6420
|
+
const identity = replay.identity ?? admission;
|
|
6421
|
+
assertStableText(identity.sessionId, "retained session id");
|
|
6422
|
+
assertStableText(identity.executionId, "retained execution id");
|
|
6312
6423
|
assertExactRetainedRunIntent(admission, retainedRunIntent({
|
|
6313
6424
|
...replay,
|
|
6314
6425
|
provider
|
|
@@ -6410,6 +6521,20 @@ function assertRetainedCapabilityRequirements(providerName, capabilities) {
|
|
|
6410
6521
|
}
|
|
6411
6522
|
//#endregion
|
|
6412
6523
|
//#region src/runtime/supervise/abortable.ts
|
|
6524
|
+
/** Provenance of an explicit cancellation, preserved through every abort link. */
|
|
6525
|
+
var RunCancellationReason = class extends Error {
|
|
6526
|
+
source;
|
|
6527
|
+
operationId;
|
|
6528
|
+
constructor(source, reason, operationId) {
|
|
6529
|
+
super(reason);
|
|
6530
|
+
this.source = source;
|
|
6531
|
+
this.operationId = operationId;
|
|
6532
|
+
this.name = "RunCancellationReason";
|
|
6533
|
+
}
|
|
6534
|
+
toString() {
|
|
6535
|
+
return this.message;
|
|
6536
|
+
}
|
|
6537
|
+
};
|
|
6413
6538
|
/**
|
|
6414
6539
|
* One abort race, and one abort cascade, for the supervision tree.
|
|
6415
6540
|
*
|
|
@@ -6431,6 +6556,7 @@ function assertRetainedCapabilityRequirements(providerName, capabilities) {
|
|
|
6431
6556
|
*/
|
|
6432
6557
|
function abortReason(signal, fallback) {
|
|
6433
6558
|
const reason = signal.reason;
|
|
6559
|
+
if (reason instanceof RunCancellationReason) return reason;
|
|
6434
6560
|
if (typeof reason === "string" && reason.length > 0) return reason;
|
|
6435
6561
|
if (reason instanceof Error && reason.name !== "AbortError" && reason.message.length > 0) return reason.message;
|
|
6436
6562
|
return fallback;
|
|
@@ -6438,7 +6564,7 @@ function abortReason(signal, fallback) {
|
|
|
6438
6564
|
/** An `AbortError` carrying the signal's own string reason, or `fallback` when it states none. */
|
|
6439
6565
|
function abortError$1(signal, fallback) {
|
|
6440
6566
|
const reason = abortReason(signal, fallback);
|
|
6441
|
-
const error = new Error(typeof reason === "string" && reason.length > 0 ? reason : fallback);
|
|
6567
|
+
const error = new Error(reason instanceof Error ? reason.message : typeof reason === "string" && reason.length > 0 ? reason : fallback);
|
|
6442
6568
|
error.name = "AbortError";
|
|
6443
6569
|
return error;
|
|
6444
6570
|
}
|
|
@@ -7034,6 +7160,11 @@ function providerAsSandboxClient(provider, options = {}) {
|
|
|
7034
7160
|
...defaults,
|
|
7035
7161
|
...sandboxInput,
|
|
7036
7162
|
...customInput,
|
|
7163
|
+
...defaults.env === void 0 && sandboxInput.env === void 0 && customInput.env === void 0 ? {} : { env: {
|
|
7164
|
+
...defaults.env,
|
|
7165
|
+
...sandboxInput.env,
|
|
7166
|
+
...customInput.env
|
|
7167
|
+
} },
|
|
7037
7168
|
providerOptions: {
|
|
7038
7169
|
...defaults.providerOptions ?? {},
|
|
7039
7170
|
...sandboxInput.providerOptions ?? {},
|
|
@@ -7142,9 +7273,18 @@ function providerTurnWithDefaults(defaults, turn, signal) {
|
|
|
7142
7273
|
*
|
|
7143
7274
|
* @experimental */
|
|
7144
7275
|
function providerAsExecutor(provider, options = {}) {
|
|
7145
|
-
|
|
7276
|
+
const captured = options.placements === void 0 ? options : {
|
|
7277
|
+
...options,
|
|
7278
|
+
placements: detachedSnapshot(options.placements, "provider placements"),
|
|
7279
|
+
defaults: detachedSnapshot(options.defaults, "provider placement defaults")
|
|
7280
|
+
};
|
|
7281
|
+
return (spec, ctx) => {
|
|
7282
|
+
const profile = captured.placements === void 0 ? spec.profile : detachedSnapshot(spec.profile, "provider placement profile");
|
|
7283
|
+
const selected = selectProviderPlacement(profile, captured);
|
|
7284
|
+
return createProviderExecutor(provider, profile, ctx, selected.options, selected.identity);
|
|
7285
|
+
};
|
|
7146
7286
|
}
|
|
7147
|
-
function createProviderExecutor(provider, profile, ctx, options) {
|
|
7287
|
+
function createProviderExecutor(provider, profile, ctx, options, placement) {
|
|
7148
7288
|
const controller = linkAbort(ctx.signal);
|
|
7149
7289
|
let environment;
|
|
7150
7290
|
let artifact;
|
|
@@ -7154,6 +7294,7 @@ function createProviderExecutor(provider, profile, ctx, options) {
|
|
|
7154
7294
|
let destroyed = false;
|
|
7155
7295
|
const runtime = options.runtime ?? provider.name;
|
|
7156
7296
|
const createProfile = options.profileForCreate?.(profile) ?? profile;
|
|
7297
|
+
if (placement && canonicalAgentProfileDigest(createProfile) !== canonicalAgentProfileDigest(profile)) throw new ValidationError("provider placement: profileForCreate cannot change the selected profile");
|
|
7157
7298
|
const executionId = retention?.executionId ?? ctx.node?.nodeId ?? `provider-run-${randomUUID()}`;
|
|
7158
7299
|
const attemptId = ctx.node?.attemptId ?? newExecutionAttemptId(executionId);
|
|
7159
7300
|
const providerModel = concreteProfileModel(createProfile);
|
|
@@ -7179,7 +7320,8 @@ function createProviderExecutor(provider, profile, ctx, options) {
|
|
|
7179
7320
|
destroyOnSettle: options.destroyOnSettle ?? true,
|
|
7180
7321
|
requireTerminalEvent: options.requireTerminalEvent ?? true,
|
|
7181
7322
|
tokenLimits,
|
|
7182
|
-
environmentId: null
|
|
7323
|
+
environmentId: null,
|
|
7324
|
+
...placement ? { placement } : {}
|
|
7183
7325
|
}
|
|
7184
7326
|
};
|
|
7185
7327
|
const plannedBinding = {
|
|
@@ -7187,12 +7329,17 @@ function createProviderExecutor(provider, profile, ctx, options) {
|
|
|
7187
7329
|
binding: {
|
|
7188
7330
|
provider: provider.name,
|
|
7189
7331
|
executionId,
|
|
7190
|
-
model: providerModel ?? null
|
|
7332
|
+
model: providerModel ?? null,
|
|
7333
|
+
...placement ? { placement } : {}
|
|
7191
7334
|
},
|
|
7192
7335
|
descriptor: {
|
|
7193
7336
|
kind: "agent-environment",
|
|
7194
7337
|
transport: "provider",
|
|
7195
|
-
backend: provider.name
|
|
7338
|
+
backend: provider.name,
|
|
7339
|
+
...placement ? {
|
|
7340
|
+
placementId: placement.id,
|
|
7341
|
+
placementDigest: placement.digest
|
|
7342
|
+
} : {}
|
|
7196
7343
|
}
|
|
7197
7344
|
};
|
|
7198
7345
|
let executor;
|
|
@@ -7295,7 +7442,18 @@ async function* streamProviderExecutor(args) {
|
|
|
7295
7442
|
const started = Date.now();
|
|
7296
7443
|
const linked = linkAbort(args.signal, args.controller.signal).signal;
|
|
7297
7444
|
const defaultTurn = taskToTurnInput(args.task, linked);
|
|
7298
|
-
|
|
7445
|
+
let turn = providerTurnWithDefaults(providerTurnDefaults(args.options.promptOptions, `providerAsExecutor(${args.provider.name})`), args.options.taskToTurn?.(args.task, args.profile, defaultTurn) ?? defaultTurn, linked);
|
|
7446
|
+
if (args.options.defaults?.metadata?.runtimeProviderPlacement !== void 0) {
|
|
7447
|
+
if (turn.model !== void 0 && turn.model !== concreteProfileModel(args.profile)) throw new ValidationError("provider placement: taskToTurn cannot replace the profile model");
|
|
7448
|
+
const declared = providerTurnDefaults(args.options.promptOptions, "provider placement");
|
|
7449
|
+
if (canonicalCandidateDigest(turn.providerOptions ?? {}) !== canonicalCandidateDigest(declared?.providerOptions ?? {})) throw new ValidationError("provider placement: taskToTurn cannot replace declared provider options");
|
|
7450
|
+
const { signal: _signal, ...material } = turn;
|
|
7451
|
+
turn = {
|
|
7452
|
+
...detachedSnapshot(material, "provider placement turn"),
|
|
7453
|
+
signal: linked
|
|
7454
|
+
};
|
|
7455
|
+
}
|
|
7456
|
+
const source = await providerExecutionSource(args, turn, linked);
|
|
7299
7457
|
const environment = source.environment;
|
|
7300
7458
|
args.onEnvironment(environment);
|
|
7301
7459
|
const events = [];
|
|
@@ -11743,7 +11901,7 @@ function aggregateProviderModelEvidence(forest) {
|
|
|
11743
11901
|
return;
|
|
11744
11902
|
}
|
|
11745
11903
|
if (node.ownedTreeRoot !== void 0) return;
|
|
11746
|
-
if (event.kind === "cancelled") {
|
|
11904
|
+
if (event.kind === "cancelled" && event.providerModel === void 0) {
|
|
11747
11905
|
markMissing();
|
|
11748
11906
|
return;
|
|
11749
11907
|
}
|
|
@@ -12000,8 +12158,9 @@ async function replaySpawnTree(journal, blobs, root) {
|
|
|
12000
12158
|
kind: "down",
|
|
12001
12159
|
handle: handleFor(ev.id, "cancelled"),
|
|
12002
12160
|
reason: ev.reason,
|
|
12003
|
-
infra:
|
|
12004
|
-
|
|
12161
|
+
infra: ev.infra === true,
|
|
12162
|
+
...ev.providerModel === void 0 ? {} : { providerModel: copyProviderModelEvidence(ev.providerModel) },
|
|
12163
|
+
trace: ev.trace ?? {
|
|
12005
12164
|
status: "unavailable",
|
|
12006
12165
|
reason: "execution-did-not-start"
|
|
12007
12166
|
},
|
|
@@ -12133,10 +12292,13 @@ function materializeTreeView(events) {
|
|
|
12133
12292
|
} else {
|
|
12134
12293
|
const node = requireNode(nodes, ev.id);
|
|
12135
12294
|
node.status = "cancelled";
|
|
12136
|
-
node.trace = {
|
|
12295
|
+
node.trace = ev.trace ?? {
|
|
12137
12296
|
status: "unavailable",
|
|
12138
12297
|
reason: "execution-did-not-start"
|
|
12139
12298
|
};
|
|
12299
|
+
if (ev.spent !== void 0) node.spent = cloneSpend(ev.spent);
|
|
12300
|
+
node.providerModel = copyProviderModelEvidence(ev.providerModel);
|
|
12301
|
+
node.outRef = ev.outRef;
|
|
12140
12302
|
const settledAt = Date.parse(ev.at);
|
|
12141
12303
|
if (Number.isFinite(settledAt)) node.settledAt = settledAt;
|
|
12142
12304
|
}
|
|
@@ -17057,7 +17219,9 @@ function createExecutor(config) {
|
|
|
17057
17219
|
case "cli-worktree": return cliWorktreeExecutor(spec, seamed);
|
|
17058
17220
|
case "cli-in-place": return cliInPlaceExecutor(spec, seamed);
|
|
17059
17221
|
case "provider": {
|
|
17060
|
-
const
|
|
17222
|
+
const originalSeam = readSeam(seamed, providerSeamKey, "provider");
|
|
17223
|
+
const selected = originalSeam.steering ? selectProviderPlacement(spec.profile, originalSeam) : void 0;
|
|
17224
|
+
const providerSeam = selected?.options ?? originalSeam;
|
|
17061
17225
|
const provider = resolveAgentEnvironmentProvider(providerSeam.provider, providerSeam.registry);
|
|
17062
17226
|
if (providerSeam.steering) {
|
|
17063
17227
|
if (providerSeam.taskToTurn) throw new ValidationError$1("createExecutor(provider, steering): taskToTurn is not representable by the text-only steerable session");
|
|
@@ -17087,10 +17251,33 @@ function createExecutor(config) {
|
|
|
17087
17251
|
...spec,
|
|
17088
17252
|
harness
|
|
17089
17253
|
}, providerCtx);
|
|
17090
|
-
|
|
17254
|
+
const wrapper = inheritRuntimeOwnedExecutorAttestation(executor, {
|
|
17091
17255
|
...executor,
|
|
17092
17256
|
runtime: providerSeam.runtime ?? provider.name
|
|
17093
17257
|
});
|
|
17258
|
+
if (selected?.identity) {
|
|
17259
|
+
const declaration = runtimeOwnedExecutorMaterialization(executor);
|
|
17260
|
+
const binding = runtimeOwnedExecutorExecutionBinding(executor);
|
|
17261
|
+
attestRuntimeOwnedExecutor(wrapper, {
|
|
17262
|
+
...declaration,
|
|
17263
|
+
plan: {
|
|
17264
|
+
...declaration.plan,
|
|
17265
|
+
placement: selected.identity
|
|
17266
|
+
}
|
|
17267
|
+
}, {
|
|
17268
|
+
...binding,
|
|
17269
|
+
binding: {
|
|
17270
|
+
...binding.binding,
|
|
17271
|
+
placement: selected.identity
|
|
17272
|
+
},
|
|
17273
|
+
descriptor: {
|
|
17274
|
+
...binding.descriptor,
|
|
17275
|
+
placementId: selected.identity.id,
|
|
17276
|
+
placementDigest: selected.identity.digest
|
|
17277
|
+
}
|
|
17278
|
+
});
|
|
17279
|
+
}
|
|
17280
|
+
return wrapper;
|
|
17094
17281
|
}
|
|
17095
17282
|
const profileForCreate = providerSeam.profileForCreate;
|
|
17096
17283
|
return providerAsExecutor(provider, {
|
|
@@ -17723,7 +17910,12 @@ async function startRetainedInteractiveRun(options) {
|
|
|
17723
17910
|
const profile = agentProfileSchema.parse(startOptions.environment.profile);
|
|
17724
17911
|
if (profile.harness === void 0) throw new Error("retained interactive runs require AgentProfile.harness");
|
|
17725
17912
|
const requestedProfileDigest = canonicalAgentProfileDigest(profile);
|
|
17726
|
-
const identity = mintRetainedIdentity(startOptions.environment.idempotencyKey, startOptions.interactiveIdempotencyKey)
|
|
17913
|
+
const identity = startOptions.intent === void 0 ? mintRetainedIdentity(startOptions.environment.idempotencyKey, startOptions.interactiveIdempotencyKey) : {
|
|
17914
|
+
sessionId: startOptions.intent.sessionId,
|
|
17915
|
+
executionId: startOptions.intent.executionId
|
|
17916
|
+
};
|
|
17917
|
+
assertStableText(identity.sessionId, "retained session id");
|
|
17918
|
+
assertStableText(identity.executionId, "retained execution id");
|
|
17727
17919
|
const intent = interactiveIntent(startOptions, profile, identity);
|
|
17728
17920
|
if (startOptions.intent === void 0) await admitDurably(startOptions.onAdmission, intent);
|
|
17729
17921
|
else assertExactInteractiveIntent(startOptions.intent, intent);
|
|
@@ -17797,9 +17989,21 @@ function exactRecoveryRequest(admission) {
|
|
|
17797
17989
|
assertStableText(admission.interactiveIdempotencyKey, "interactive idempotency key");
|
|
17798
17990
|
const request = exactAgentInteractiveSessionStart(admission.request);
|
|
17799
17991
|
const identity = mintRetainedIdentity(admission.idempotencyKey, admission.interactiveIdempotencyKey);
|
|
17800
|
-
if (request.run.provider !== admission.provider || request.run.environmentId !== admission.environmentId || request.run.sessionId !== identity.sessionId || request.run.executionId !== identity.executionId) throw new Error("interactive admission does not match its recovery coordinates");
|
|
17992
|
+
if (request.run.provider !== admission.provider || request.run.environmentId !== admission.environmentId || (request.run.sessionId !== identity.sessionId || request.run.executionId !== identity.executionId) && !matchesHistoricalInteractiveIdentity(admission, request)) throw new Error("interactive admission does not match its recovery coordinates");
|
|
17801
17993
|
return request;
|
|
17802
17994
|
}
|
|
17995
|
+
function matchesHistoricalInteractiveIdentity(admission, request) {
|
|
17996
|
+
const base = `${encodeURIComponent(admission.idempotencyKey)}:${encodeURIComponent(admission.interactiveIdempotencyKey)}`;
|
|
17997
|
+
const digest = canonicalCandidateDigest({
|
|
17998
|
+
kind: "retained-identity.v1",
|
|
17999
|
+
base
|
|
18000
|
+
}).slice(7);
|
|
18001
|
+
const historicalId = (prefix) => {
|
|
18002
|
+
const readable = `${prefix}:${base}`;
|
|
18003
|
+
return readable.length <= 128 ? readable : `${prefix}:${digest}`;
|
|
18004
|
+
};
|
|
18005
|
+
return request.run.sessionId === historicalId("retained-session") && request.run.executionId === historicalId("retained-execution");
|
|
18006
|
+
}
|
|
17803
18007
|
/** Rebuild controls for one exact provider-owned coding-agent process. @stable */
|
|
17804
18008
|
async function reconnectRetainedInteractiveRun(options) {
|
|
17805
18009
|
options.signal?.throwIfAborted();
|
|
@@ -18581,7 +18785,7 @@ function sumSpendFromEvents(events) {
|
|
|
18581
18785
|
function sumMeasuredSpendFromEvents(events) {
|
|
18582
18786
|
let childWork = zeroSpend();
|
|
18583
18787
|
let driverInference = zeroSpend();
|
|
18584
|
-
for (const ev of events) if (ev.kind === "settled") childWork = addSpend(childWork, ev.spent);
|
|
18788
|
+
for (const ev of events) if (ev.kind === "settled" || ev.kind === "cancelled" && ev.spent !== void 0) childWork = addSpend(childWork, ev.spent);
|
|
18585
18789
|
else if (ev.kind === "metered") driverInference = addSpend(driverInference, ev.spend);
|
|
18586
18790
|
return {
|
|
18587
18791
|
childWork,
|
|
@@ -19328,7 +19532,7 @@ function createScope(args) {
|
|
|
19328
19532
|
return bindings && bindings.length > 0 ? Object.freeze([...bindings]) : void 0;
|
|
19329
19533
|
},
|
|
19330
19534
|
abort(reason) {
|
|
19331
|
-
controller.abort(reason);
|
|
19535
|
+
controller.abort(new RunCancellationReason("worker-handle", reason ?? "worker cancelled"));
|
|
19332
19536
|
}
|
|
19333
19537
|
};
|
|
19334
19538
|
const live = {
|
|
@@ -19360,6 +19564,11 @@ function createScope(args) {
|
|
|
19360
19564
|
...executor.cancel ? { requestCancel: executor.cancel.bind(executor) } : {},
|
|
19361
19565
|
abortChild: (reason) => controller.abort(reason)
|
|
19362
19566
|
};
|
|
19567
|
+
const recordCancellation = () => {
|
|
19568
|
+
if (!live.executorDone && live.acceptedResult === void 0 && controller.signal.reason instanceof RunCancellationReason) live.cancellationReason = controller.signal.reason;
|
|
19569
|
+
};
|
|
19570
|
+
if (controller.signal.aborted) recordCancellation();
|
|
19571
|
+
else controller.signal.addEventListener("abort", recordCancellation, { once: true });
|
|
19363
19572
|
children.set(id, live);
|
|
19364
19573
|
if (opts.key !== void 0) keyed.set(opts.key, {
|
|
19365
19574
|
state: "live",
|
|
@@ -19803,7 +20012,7 @@ function createScope(args) {
|
|
|
19803
20012
|
const child = children.get(nodeId);
|
|
19804
20013
|
if (!child) throw new ValidationError$1(`scope.cancel: unknown node ${JSON.stringify(nodeId)}`);
|
|
19805
20014
|
if (child.requestCancel) return await child.requestCancel(request);
|
|
19806
|
-
child.abortChild("cancelled");
|
|
20015
|
+
child.abortChild(new RunCancellationReason("scope", "cancelled"));
|
|
19807
20016
|
return {
|
|
19808
20017
|
status: "unknown",
|
|
19809
20018
|
effect: "cancel_requested",
|
|
@@ -20215,13 +20424,19 @@ async function finalizeSettlement(child, settlement, seq, args, now) {
|
|
|
20215
20424
|
const at = new Date(settledAt).toISOString();
|
|
20216
20425
|
if (settlement.metered) await appendSettlementMetering(args.journal, args.root, child.id, settlement.metered, at);
|
|
20217
20426
|
if (settlement.kind === "down") {
|
|
20218
|
-
|
|
20427
|
+
const cancellation = child.cancellationReason;
|
|
20428
|
+
child.status = cancellation === void 0 ? "failed" : "cancelled";
|
|
20219
20429
|
child.trace = settlement.trace;
|
|
20220
20430
|
child.providerModel = settlement.providerModel;
|
|
20221
20431
|
if (!child.recoveryPending) await args.journal.appendEvent(args.root, {
|
|
20222
|
-
|
|
20432
|
+
...cancellation === void 0 ? {
|
|
20433
|
+
kind: "settled",
|
|
20434
|
+
status: "down"
|
|
20435
|
+
} : {
|
|
20436
|
+
kind: "cancelled",
|
|
20437
|
+
source: cancellation.source
|
|
20438
|
+
},
|
|
20223
20439
|
id: child.id,
|
|
20224
|
-
status: "down",
|
|
20225
20440
|
spent: child.spent,
|
|
20226
20441
|
infra: settlement.infra,
|
|
20227
20442
|
reason: settlement.reason,
|
|
@@ -21004,15 +21219,14 @@ const driverExecutorFactory = (rawSpec, ctx) => {
|
|
|
21004
21219
|
await finalizeScopeOwnerMaterialization(nestedScope);
|
|
21005
21220
|
await closeActive("driver completed");
|
|
21006
21221
|
const events = await loadTreeEvents(journal, nestedRoot);
|
|
21007
|
-
const
|
|
21008
|
-
const childWork = sumSpend(settled);
|
|
21222
|
+
const childWork = sumSpend(events.filter(isSettled));
|
|
21009
21223
|
const totalMetered = sumMetered(events);
|
|
21010
21224
|
meteredSpend = nonZeroOrUndef(unreportedSpend(totalMetered, previouslyMetered));
|
|
21011
21225
|
accounting = {
|
|
21012
21226
|
reported: childWork,
|
|
21013
21227
|
reservation: addSpend(childWork, totalMetered)
|
|
21014
21228
|
};
|
|
21015
|
-
const verdict = deriveDeliveryVerdict(settled, out, spec.acceptedSubmission?.() === true);
|
|
21229
|
+
const verdict = deriveDeliveryVerdict(events.filter((event) => event.kind === "settled"), out, spec.acceptedSubmission?.() === true);
|
|
21016
21230
|
artifact = {
|
|
21017
21231
|
outRef: `${driverRuntime}:${nestedRoot}`,
|
|
21018
21232
|
out: out === void 0 ? null : out,
|
|
@@ -21027,7 +21241,7 @@ const driverExecutorFactory = (rawSpec, ctx) => {
|
|
|
21027
21241
|
meteredSpend = partial?.metered ? nonZeroOrUndef(unreportedSpend(partial.metered, previouslyMetered)) : void 0;
|
|
21028
21242
|
accounting = partial?.accounting;
|
|
21029
21243
|
const events = await journal.loadTree(nestedRoot).catch(() => void 0);
|
|
21030
|
-
const settledIds = new Set(events?.filter((event) => event.kind === "settled").map((event) => event.id));
|
|
21244
|
+
const settledIds = new Set(events?.filter((event) => event.kind === "settled" || event.kind === "cancelled").map((event) => event.id));
|
|
21031
21245
|
if (events?.some((event) => event.kind === "execution-admitted" && event.id === seam.nodeId || event.kind === "spawned" && event.parent !== void 0 && event.runtime !== "inline" && !settledIds.has(event.id))) throw new RetainedExecutionPendingError(err);
|
|
21032
21246
|
if (cleanupError !== void 0) throw cleanupError;
|
|
21033
21247
|
throw err;
|
|
@@ -21098,7 +21312,7 @@ async function loadTreeEvents(journal, nestedRoot) {
|
|
|
21098
21312
|
return events;
|
|
21099
21313
|
}
|
|
21100
21314
|
function isSettled(ev) {
|
|
21101
|
-
return ev.kind === "settled";
|
|
21315
|
+
return ev.kind === "settled" || ev.kind === "cancelled" && ev.spent !== void 0;
|
|
21102
21316
|
}
|
|
21103
21317
|
/** Sum the conserved spend over the nested tree's settled events — the honest per-channel
|
|
21104
21318
|
* roll-up of the whole sub-tree's child WORK. */
|
|
@@ -21583,8 +21797,8 @@ function createSupervisor() {
|
|
|
21583
21797
|
controller.abort(reason);
|
|
21584
21798
|
return true;
|
|
21585
21799
|
};
|
|
21586
|
-
const onCallerAbort = () => cascadeAbort("caller signal aborted");
|
|
21587
|
-
if (opts.signal) if (opts.signal.aborted)
|
|
21800
|
+
const onCallerAbort = () => cascadeAbort(opts.signal?.reason instanceof RunCancellationReason ? opts.signal.reason : new RunCancellationReason("signal", typeof opts.signal?.reason === "string" ? opts.signal.reason : "caller signal aborted"));
|
|
21801
|
+
if (opts.signal) if (opts.signal.aborted) onCallerAbort();
|
|
21588
21802
|
else opts.signal.addEventListener("abort", onCallerAbort, { once: true });
|
|
21589
21803
|
const breaker = createIntensityBreaker(opts, () => cascadeAbort("intensity breaker tripped"));
|
|
21590
21804
|
const journal = wrapJournalForBreaker(opts.journal, breaker);
|
|
@@ -21619,7 +21833,7 @@ function createSupervisor() {
|
|
|
21619
21833
|
const openScope = scope;
|
|
21620
21834
|
if (rootLease) rootLease.bind({
|
|
21621
21835
|
scope: openScope,
|
|
21622
|
-
cascadeAbort,
|
|
21836
|
+
cascadeAbort: (reason) => cascadeAbort(new RunCancellationReason("root-handle", reason ?? "root handle aborted")),
|
|
21623
21837
|
signal: pushRootSignal(cascadeAbort),
|
|
21624
21838
|
deliver: rootDeliver ? (message) => rootDeliver(message) !== false : () => false
|
|
21625
21839
|
});
|
|
@@ -21687,6 +21901,7 @@ function createSupervisor() {
|
|
|
21687
21901
|
}
|
|
21688
21902
|
const tree = runTree(scope);
|
|
21689
21903
|
pool.assertNoOpenTickets();
|
|
21904
|
+
if (controller.signal.reason instanceof RunCancellationReason) return noWinner();
|
|
21690
21905
|
if (actOutcome.ok) {
|
|
21691
21906
|
if (executionAborted) return noWinner();
|
|
21692
21907
|
const out = actOutcome.out;
|
|
@@ -21724,6 +21939,16 @@ function createSupervisor() {
|
|
|
21724
21939
|
...gaps.length > 0 ? { spendGaps: gaps } : {}
|
|
21725
21940
|
};
|
|
21726
21941
|
const lifecycle = classifyNoWinner(executionAborted, pool, opts, breaker, deadlineExceeded, allChildrenDownAtSettle, downCountAtSettle);
|
|
21942
|
+
if (controller.signal.reason instanceof RunCancellationReason) {
|
|
21943
|
+
const cancellation = controller.signal.reason;
|
|
21944
|
+
return {
|
|
21945
|
+
...common,
|
|
21946
|
+
reason: "cancelled",
|
|
21947
|
+
source: cancellation.source,
|
|
21948
|
+
cancellationReason: cancellation.message,
|
|
21949
|
+
...cancellation.operationId === void 0 ? {} : { operationId: cancellation.operationId }
|
|
21950
|
+
};
|
|
21951
|
+
}
|
|
21727
21952
|
if (lifecycle !== void 0) return {
|
|
21728
21953
|
...common,
|
|
21729
21954
|
reason: lifecycle
|
|
@@ -21811,7 +22036,7 @@ function createRootHandle() {
|
|
|
21811
22036
|
* pause semantics — building them now would be mechanism ahead of the gate). */
|
|
21812
22037
|
function pushRootSignal(cascadeAbort) {
|
|
21813
22038
|
return (msg) => {
|
|
21814
|
-
if (msg.kind === "cancel") cascadeAbort(msg.reason ?? "root signal: cancel");
|
|
22039
|
+
if (msg.kind === "cancel") cascadeAbort(new RunCancellationReason("root-signal", msg.reason ?? "root signal: cancel"));
|
|
21815
22040
|
};
|
|
21816
22041
|
}
|
|
21817
22042
|
function createIntensityBreaker(opts, trip) {
|
|
@@ -21999,7 +22224,8 @@ function spendGapsFromEvents(events) {
|
|
|
21999
22224
|
});
|
|
22000
22225
|
};
|
|
22001
22226
|
for (const ev of events) if (ev.kind === "spawned" && ev.parent !== void 0 && !terminal.has(ev.id)) record(ev.id, "never-settled", ["tokens", "usd"]);
|
|
22002
|
-
else if (ev.kind === "
|
|
22227
|
+
else if (ev.kind === "cancelled" && ev.spent === void 0) record(ev.id, "unreported", ["tokens", "usd"]);
|
|
22228
|
+
else if (ev.kind === "settled" || ev.kind === "cancelled" && ev.spent !== void 0) record(ev.id, "unreported", unknownChannels(ev.spent));
|
|
22003
22229
|
else if (ev.kind === "metered") record(ev.id, "unreported", unknownChannels(ev.spend));
|
|
22004
22230
|
return [...gaps.values()].map((gap) => {
|
|
22005
22231
|
const label = labels.get(gap.id);
|
|
@@ -22108,6 +22334,6 @@ function resolveRedactor(redact) {
|
|
|
22108
22334
|
return (value) => defaultRedactor(redact(value));
|
|
22109
22335
|
}
|
|
22110
22336
|
//#endregion
|
|
22111
|
-
export { bridgeAdmissionRefusal as $,
|
|
22337
|
+
export { bridgeAdmissionRefusal as $, buildLoopSpanNodes as $n, newExecutionAttemptId as $r, spendFromUsageEvents as $t, consumeScopeRetainedOwnerResult as A, awaitAbortable$1 as Ai, throwIfAborted as An, fullProfileMaterialization as Ar, peerMailTools as At, workerInteractiveBindingFile as B, startRetainedRun as Bn, validateProfileMaterialization as Br, insideCursorNamespace as Bt, settledToIteration as C, mapSandboxToolEvent as Ci, hasCompleteCacheBreakdown as Cn, localHarnessExecutable as Cr, createInbox as Ct, timerAt as D, sumSandboxUsage as Di, sleep as Dn, assertProfileMaterialization as Dr, claimsAuthority as Dt, pollFor as E, sandboxProgressEvents as Ei, randomSuffix as En, AGENT_PROFILE_MATERIALIZATION_AXES as Er, PEER_MAIL_WIRE_KEY as Et, interactiveAdmissionSeamKey as F, RunCancellationReason as Fn, promptResourceProfileMaterialization as Fr, taskToPrompt as Ft, destroyInteractiveEnvironment as G, harnessUsageIsEmpty as Gn, writeAllBytes as Gr, WORKER_TOOL_TRACE_SCHEMA_VERSION as Gt, reconnectRetainedInteractiveRun as H, retainedCreateMaterial as Hn, isNoEntError as Hr, materializeTreeView as Ht, readWorkerInteractiveAdmissions as I, abortError$1 as In, renderProfileMaterializationIssues as Ir, FileResultBlobStore as It, queueOf as J, mergeTraceEnv as Jn, authoredProfileDigest as Jr, parseWorkerToolTraceArtifact as Jt, effectiveConcurrency as K, readCodexRolloutSession as Kn, attestRuntimeOwnedPendingExecutor as Kr, captureWorkerTraceEvidence as Kt, workerInteractiveAdmissionFile as L, linkAbort as Ln, renderUnsupported as Lr, FileSpawnJournal as Lt, scopeRetainedOwnerContext as M, promptOptionsFromAgentTurnInput as Mi, zeroSpend as Mn, promptControlProfileMaterialization as Mr, isLiveNodeStatus as Mt, scopeRetainedOwnerPriorSpend as N, providerMessageText as Ni, registerRetainedExecutorPreparation as Nn, promptModelProfileMaterialization as Nr, isTerminalNodeStatus as Nt, validateWaitSpec as O, decodeHarnessUsage as Oi, stringifySafe as On, controlProfileMaterialization as Or, createPeerMailbox as Ot, scopeRetainedOwnerResult as P, retainedExecutorSeamKey as Pn, promptOnlyProfileMaterialization as Pr, createInPlaceCliExecutor as Pt, bindReusableExecutorExecutionId as Q, buildLoopOtelSpans as Qn, knownMaterializationReceipt as Qr, createBudgetPool as Qt, attachWorker as R, reconnectRetainedRun as Rn, sandboxActProfileMaterialization as Rr, InMemoryResultBlobStore as Rt, scopeOwnerExecutorNodeContext as S, mapSandboxEvent as Si, deleteBoxSafe as Sn, harnessSupportsReasoningEffort as Sr, readWorkerProgress as St, isWaitOutcome as T, sandboxEventServedBackend as Ti, promptCacheTokenClasses as Tn, CodexExecutionDiagnosticError as Tr, DEFAULT_PEER_MAIL_LIMITS as Tt, recoverRetainedInteractiveRun as U, addHarnessUsage as Un, parseCommittedJsonLines as Ur, pendingWaits as Ut, workerInteractiveBindingsDir as V, startRetainedRunInEnvironment as Vn, worktreeCliProfileMaterialization as Vr, loadSpawnForest as Vt, startRetainedInteractiveRun as W, createCodexRolloutStoreReader as Wn, prepareJsonlAppend as Wr, replaySpawnTree as Wt, DEFAULT_SUCCESSFUL_SHUTDOWN_MS as X, traceContextToEnv as Xn, inheritRuntimeOwnedExecutorAttestation as Xr, contentAddress as Xt, rollingDispatch as Y, readTraceContextFromEnv as Yn, finalizeRuntimeOwnedPendingExecutor as Yr, workerTraceAnalysisStore as Yt, teardownExecutor as Z, INTELLIGENCE_WIRE_VERSION as Zn, knownExecutionBindingReceipt as Zr, assertValidBudget as Zt, deriveNodeExecutionIdentity as _, canonicalStreamEventFromSandboxEvent as _i, resolveAgentEnvironmentProvider as _n, captureWorktreeDiff as _r, createPushTraceSource as _t, createSupervisor as a, runtimeOwnedExecutorProviderEvidence as ai, createSandboxLineage as an, generateSpanId as ar, cliWorktreeExecutor as at, recordScopeOwnerMaterialization as b, extractLlmCallEvent as bi, chargedTokens as bn, DEFAULT_LOCAL_HARNESS as br, DEFAULT_STALL_AFTER_MS as bt, pickBestDelivered as c, unknownExecutionBindingReceipt as ci, assertBoxlessPromptOptions as cn, padTraceId as cr, snapshotExecutorConfig as ct, driverChild as d, executableAgentSpecSnapshot as di, runBrainLoop as dn, createRuntimeStreamEventCollector as dr, readWorkerTraceContext as dt, providerAttemptEvidence as ei, TERMINAL_DECISIONS as en, buildRuntimeEventOtelSpans as er, bridgeModelRouteRefusal as et, driverExecutorFactory as f, detachedFrozen as fi, canonicalObservedModelParts as fn, sanitizeAgentRuntimeEvent as fr, workerTraceEnv as ft, createScope as g, assertSandboxServedModel as gi, providerAsSandboxClient as gn, runWorktreeHarness as gr, createSteerableSandboxSession as gt, beginScopeOwnerAttempt as h, readSandboxOutcome as hi, providerAsExecutor as hn, runSettledCommand as hr, DEFAULT_SANDBOX_STEERING_MAX_TURNS as ht, createRootHandle as i, runtimeOwnedExecutorMaterialization as ii, runAgentRounds as in, flatOtelSpan as ir, cliInPlaceExecutor as it, prepareScopeRetainedOwnerTask as j, promptFromAgentTurnInput as ji, unmeteredSpend as jn, profileMaterializationAxes$1 as jr, peerMailVerbNames as jt, waitUntil as k, abortError$2 as ki, throwAbort as kn, defineProfileMaterializationContract as kr, isPeerMailEnvelope as kt, runFinalizer as l, unknownMaterializationReceipt as li, readPromptOptions as ln, toOtelAttributes as lr, createWorktreeCliExecutor as lt, withDriverExecutor as m, projectSandboxOutcome as mi, createAgentEnvironmentProviderRegistry as mn, sanitizeRuntimeStreamEvent as mr, workerTraceSeamKey as mt, defaultRedactorIdentityMaterial as n, runtimeOwnedDriveHarnessProviderEvidence as ni, defaultSelectWinner as nn, createOtelExporter as nr, bridgeStopSignalKey as nt, bestDelivered as o, runtimeOwnedPendingExecutorMaterialization as oi, probeSandboxCapabilities as on, loopEventToOtelSpan as or, createExecutor as ot, isDriverSpec as p, detachedSnapshot as pi, observedModelMatchesDeclared as pn, sanitizeKnowledgeReadinessReport as pr, workerTraceHeaders as pt, freeSlots as q, createPropagatingTraceEmitter as qn, attestRuntimeOwnedScopeOwner as qr, isTraceAnalysisStore as qt, resolveRedactor as r, runtimeOwnedExecutorExecutionBinding as ri, isTerminalDecision as rn, exportEvalRuns as rr, captureReusableExecutorConfig as rt, collectDelivered as s, runtimeOwnedScopeOwnerRuntime as si, acquireSandbox as sn, padSpanId as sr, createExecutorRegistry as st, defaultRedactor as t, recordRuntimeOwnedDriveHarnessProviderEvidence as ti, createSandboxForSpec as tn, createOpenInferenceFileExporter as tr, bridgeRuntimeAttachmentsKey as tt, runTree as u, executableAgentProfileSnapshot as ui, routerBrain as un, createRuntimeEventCollector as ur, WORKER_TRACE_PROPAGATION as ut, meterRuntimeOwnedAccounting as v, createSandboxToolPartState as vi, sandboxClientAsProvider as vn, createWorktree as vr, decodeToolPart as vt, createWaitProbes as w, notifySandboxEventObserver as wi, isAbortError$2 as wn, parseCodexTokenUsage as wr, AUTHORITY_MARKERS as wt, restoreScopeOwnerAcceptedExecution as x, isSandboxTerminalEvent as xi, cloneSpend as xn, LOCAL_HARNESSES as xr, createActivityLog as xt, meterRuntimeOwnedProviderAttempt as y, createSandboxUsageLedger as yi, addSpend as yn, removeWorktree as yr, sandboxSessionTraceSource as yt, readWorkerInteractiveBinding as z, recoverRetainedRun as zn, unsupportedProfileDimensions as zr, InMemorySpawnJournal as zt };
|
|
22112
22338
|
|
|
22113
|
-
//# sourceMappingURL=redact-
|
|
22339
|
+
//# sourceMappingURL=redact-DXxGazcg.js.map
|