@tangle-network/agent-runtime 0.177.0 → 0.178.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-XVI_z1g3.js → activation-BVTPfwty.js} +2 -2
- package/dist/{activation-XVI_z1g3.js.map → activation-BVTPfwty.js.map} +1 -1
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +2 -2
- package/dist/{authoring-bXmPNfCI.js → authoring-dQjU4WrH.js} +2 -2
- package/dist/{authoring-bXmPNfCI.js.map → authoring-dQjU4WrH.js.map} +1 -1
- package/dist/conversation.d.ts +1 -1
- package/dist/{coordination-driver-xO1tkxy-.js → coordination-driver-kN2_UQaP.js} +2 -2
- package/dist/{coordination-driver-xO1tkxy-.js.map → coordination-driver-kN2_UQaP.js.map} +1 -1
- package/dist/durable.d.ts +2 -2
- package/dist/durable.js +1 -1
- package/dist/{environment-provider-5E82esWE.d.ts → environment-provider-ykohtWSr.d.ts} +2 -2
- package/dist/environment-provider.d.ts +1 -1
- package/dist/{graph-DwJXa1Ph.js → graph-CseWAx9q.js} +2 -2
- package/dist/{graph-DwJXa1Ph.js.map → graph-CseWAx9q.js.map} +1 -1
- package/dist/graph.d.ts +3 -3
- package/dist/graph.js +3 -3
- package/dist/{improvement-cycle-eiSv6aH4.js → improvement-cycle-2QG2XXyK.js} +3 -3
- package/dist/{improvement-cycle-eiSv6aH4.js.map → improvement-cycle-2QG2XXyK.js.map} +1 -1
- package/dist/{index-C9XTLVP1.d.ts → index-BL5K-qBf.d.ts} +4 -4
- package/dist/{index-BnAiQVLD.d.ts → index-CKjkp9Uh.d.ts} +5 -5
- package/dist/{index-Bs0uhf-y.d.ts → index-DG48MraH.d.ts} +2 -2
- package/dist/index.d.ts +7 -7
- package/dist/index.js +7 -7
- package/dist/intelligence.d.ts +4 -4
- package/dist/intelligence.js +3 -3
- package/dist/kernel.d.ts +6 -6
- package/dist/kernel.js +8 -8
- package/dist/{knowledge-Bmtj_7u7.js → knowledge-Ycq1urlg.js} +3 -3
- package/dist/{knowledge-Bmtj_7u7.js.map → knowledge-Ycq1urlg.js.map} +1 -1
- package/dist/knowledge.d.ts +1 -1
- package/dist/knowledge.js +1 -1
- package/dist/{loop-runner-bin-ChS5deJ0.d.ts → loop-runner-bin-Cv8_0WCC.d.ts} +3 -3
- package/dist/{loop-runner-bin-GTN5wqCt.js → loop-runner-bin-DkaB5edJ.js} +3 -3
- package/dist/{loop-runner-bin-GTN5wqCt.js.map → loop-runner-bin-DkaB5edJ.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 +3 -3
- package/dist/mcp/index.js +5 -5
- package/dist/{openai-tools-BBj1QGJp.js → openai-tools-Cv1ZVB-e.js} +2 -2
- package/dist/{openai-tools-BBj1QGJp.js.map → openai-tools-Cv1ZVB-e.js.map} +1 -1
- package/dist/primeintellect/index.d.ts +1 -1
- package/dist/{provision-supervisor-zA__ayUX.js → provision-supervisor-B4wOvmpW.js} +3 -3
- package/dist/{provision-supervisor-zA__ayUX.js.map → provision-supervisor-B4wOvmpW.js.map} +1 -1
- package/dist/{redact-DkRLcSiE.d.ts → redact-CptO2wfX.d.ts} +3 -3
- package/dist/{runtime-CJNlF5wM.js → runtime-7W9UYNMN.js} +8 -8
- package/dist/{runtime-CJNlF5wM.js.map → runtime-7W9UYNMN.js.map} +1 -1
- package/dist/{runtime-B2eZ76kG.d.ts → runtime-BhU1Bt3y.d.ts} +3 -3
- package/dist/{stream-agent-turn-ByY8po9W.d.ts → stream-agent-turn-CNyYxEc0.d.ts} +2 -2
- package/dist/{structural-rollout-BeAUK7Ta.js → structural-rollout-BSdSJ_Lr.js} +2 -2
- package/dist/{structural-rollout-BeAUK7Ta.js.map → structural-rollout-BSdSJ_Lr.js.map} +1 -1
- package/dist/{supervise-HsRKOlKY.js → supervise-DMgM9SYN.js} +3 -3
- package/dist/{supervise-HsRKOlKY.js.map → supervise-DMgM9SYN.js.map} +1 -1
- package/dist/{supervisor-ChLgoYhG.js → supervisor-DyDgxgpl.js} +175 -28
- package/dist/{supervisor-ChLgoYhG.js.map → supervisor-DyDgxgpl.js.map} +1 -1
- package/dist/testing.d.ts +2 -2
- package/dist/testing.js +12 -12
- package/dist/tui/index.d.ts +1 -1
- package/dist/tui/index.js +1 -1
- package/dist/{types-a2ZZUl80.d.ts → types-C6HjIpJ3.d.ts} +15 -3
- package/package.json +5 -4
|
@@ -11144,8 +11144,38 @@ function createRetainedRunHandle(environment, session, initialControlRef, capabi
|
|
|
11144
11144
|
const clock = now ?? Date.now;
|
|
11145
11145
|
const measuredCapabilities = structuredClone(capabilities);
|
|
11146
11146
|
let activeControlRef = freezeControlRef(initialControlRef);
|
|
11147
|
+
const knownControlRefDigests = /* @__PURE__ */ new Set([canonicalCandidateDigest(activeControlRef)]);
|
|
11148
|
+
const synchronizeActiveControlRef = () => {
|
|
11149
|
+
let candidate;
|
|
11150
|
+
try {
|
|
11151
|
+
candidate = session.controlRef;
|
|
11152
|
+
} catch (error) {
|
|
11153
|
+
throw new RetainedRunProviderContractError("provider retained session control reference read failed", {
|
|
11154
|
+
code: "RETAINED_CONTROL_REF_READ_FAILED",
|
|
11155
|
+
cause: error
|
|
11156
|
+
});
|
|
11157
|
+
}
|
|
11158
|
+
if (candidate === void 0) return;
|
|
11159
|
+
const parsed = AgentExactRunControlRefSchema.safeParse(candidate);
|
|
11160
|
+
if (!parsed.success) throw new RetainedRunProviderContractError("provider retained session returned an invalid current control reference", {
|
|
11161
|
+
code: "RETAINED_CONTROL_REF_INVALID",
|
|
11162
|
+
cause: parsed.error
|
|
11163
|
+
});
|
|
11164
|
+
const candidateDigest = canonicalCandidateDigest(parsed.data);
|
|
11165
|
+
if (sameControlCoordinates(parsed.data, activeControlRef) || knownControlRefDigests.has(candidateDigest)) return;
|
|
11166
|
+
try {
|
|
11167
|
+
activeControlRef = freezeControlRef(exactContinuedControlRef(parsed.data, activeControlRef));
|
|
11168
|
+
knownControlRefDigests.add(candidateDigest);
|
|
11169
|
+
} catch (error) {
|
|
11170
|
+
throw new RetainedRunProviderContractError("provider retained session advanced to an invalid control reference", {
|
|
11171
|
+
code: "RETAINED_CONTROL_REF_ADVANCE_INVALID",
|
|
11172
|
+
cause: error
|
|
11173
|
+
});
|
|
11174
|
+
}
|
|
11175
|
+
};
|
|
11147
11176
|
const snapshot = async (reason, signal) => {
|
|
11148
11177
|
if (signal?.aborted) throw abortError(signal.reason);
|
|
11178
|
+
synchronizeActiveControlRef();
|
|
11149
11179
|
let status;
|
|
11150
11180
|
try {
|
|
11151
11181
|
status = await awaitAbortable$1(Promise.resolve().then(() => session.status({ signal })), signal);
|
|
@@ -11153,6 +11183,7 @@ function createRetainedRunHandle(environment, session, initialControlRef, capabi
|
|
|
11153
11183
|
if (signal?.aborted) throw abortError(signal.reason);
|
|
11154
11184
|
status = "unknown";
|
|
11155
11185
|
}
|
|
11186
|
+
synchronizeActiveControlRef();
|
|
11156
11187
|
const effect = status === "cancelled" ? "cancelled" : status === "completed" || status === "failed" || status === "expired" ? "not_live" : "unknown";
|
|
11157
11188
|
return {
|
|
11158
11189
|
runId: activeControlRef.runId,
|
|
@@ -11164,8 +11195,137 @@ function createRetainedRunHandle(environment, session, initialControlRef, capabi
|
|
|
11164
11195
|
...signal?.aborted ? { signal: String(signal.reason ?? "aborted") } : {}
|
|
11165
11196
|
};
|
|
11166
11197
|
};
|
|
11198
|
+
const assertContinuationIsCurrent = (continuationSource, nextControlRef) => {
|
|
11199
|
+
if (!sameControlCoordinates(activeControlRef, continuationSource) && !sameControlCoordinates(activeControlRef, nextControlRef)) throw new Error("provider advanced the retained session while another native continuation was pending");
|
|
11200
|
+
};
|
|
11201
|
+
const missingContinuationAdmission = () => new RetainedRunProviderContractError("provider accepted a native continuation without an admission reference", { code: "RETAINED_NATIVE_CONTINUATION_ADMISSION_MISSING" });
|
|
11202
|
+
const executeNativeContinuation = async (request, turn, admission, expectedSource) => {
|
|
11203
|
+
synchronizeActiveControlRef();
|
|
11204
|
+
const exactRequest = NativeContextContinuationRequestSchema.parse(request);
|
|
11205
|
+
const continuationSource = expectedSource ?? activeControlRef;
|
|
11206
|
+
if (!sameControlCoordinates(activeControlRef, continuationSource)) throw new Error("native continuation retained-run control changed before admission");
|
|
11207
|
+
if (!sameControlCoordinates(exactRequest.run, continuationSource)) throw new Error("native continuation request targets another retained run");
|
|
11208
|
+
const { timeoutMs, signal, ...semanticTurn } = turn;
|
|
11209
|
+
if (nativeContextContinuationTurnDigest(semanticTurn) !== exactRequest.turnDigest) throw new Error("native continuation request targets another user turn");
|
|
11210
|
+
const nativeCapabilities = measuredCapabilities.nativeContinuation;
|
|
11211
|
+
if (nativeCapabilities?.atomicBoundary !== true || nativeCapabilities.requestIdempotency !== true || !session.continueNative) throw new Error(`provider "${activeControlRef.provider}" does not support retry-safe native continuation`);
|
|
11212
|
+
if (admission !== void 0 && nativeCapabilities.admissionControl !== true) throw new Error(`provider "${activeControlRef.provider}" does not advertise early native continuation admission control`);
|
|
11213
|
+
let outcome;
|
|
11214
|
+
try {
|
|
11215
|
+
outcome = AgentNativeContextContinuationResultSchema.parse(await awaitAbortable$1(Promise.resolve().then(() => {
|
|
11216
|
+
const providerOptions = {
|
|
11217
|
+
turn: semanticTurn,
|
|
11218
|
+
...timeoutMs === void 0 ? {} : { timeoutMs },
|
|
11219
|
+
...signal === void 0 ? {} : { signal },
|
|
11220
|
+
...admission === void 0 ? {} : { onAdmission: admission.onAdmission }
|
|
11221
|
+
};
|
|
11222
|
+
return session.continueNative(exactRequest, providerOptions);
|
|
11223
|
+
}), signal));
|
|
11224
|
+
} catch (error) {
|
|
11225
|
+
try {
|
|
11226
|
+
synchronizeActiveControlRef();
|
|
11227
|
+
} catch (syncError) {
|
|
11228
|
+
throw new AggregateError([error, syncError], "native continuation failed and its current control reference could not be read");
|
|
11229
|
+
}
|
|
11230
|
+
throw error;
|
|
11231
|
+
}
|
|
11232
|
+
const admissionFailure = admission?.failure();
|
|
11233
|
+
if (admissionFailure !== void 0) throw admissionFailure;
|
|
11234
|
+
synchronizeActiveControlRef();
|
|
11235
|
+
if (outcome.acknowledgement.operationId !== exactRequest.operationId || outcome.acknowledgement.requestDigest !== exactRequest.requestDigest) throw new Error("provider returned a native continuation result for another request");
|
|
11236
|
+
if (outcome.acknowledgement.actualBoundary !== void 0) {
|
|
11237
|
+
const actualBoundary = NativeContextBoundaryProofSchema.parse(outcome.acknowledgement.actualBoundary);
|
|
11238
|
+
assertBoundaryBinding(exactRequest.run, actualBoundary);
|
|
11239
|
+
}
|
|
11240
|
+
if (outcome.acknowledgement.status !== "accepted" && outcome.acknowledgement.status !== "replayed") return structuredClone(outcome);
|
|
11241
|
+
if (admission !== void 0 && !admission.isSettled() && outcome.acknowledgement.status === "accepted") throw missingContinuationAdmission();
|
|
11242
|
+
if (!("result" in outcome) || !("controlRef" in outcome)) throw new Error("provider omitted the successful native continuation result");
|
|
11243
|
+
if (!agentNativeContextContinuationResultMatchesRequest(exactRequest, outcome)) throw new Error("provider returned a native continuation result for another request");
|
|
11244
|
+
const nextControlRef = exactContinuedControlRef(outcome.controlRef, continuationSource);
|
|
11245
|
+
assertResultBinding(nextControlRef, outcome.result);
|
|
11246
|
+
assertContinuationIsCurrent(continuationSource, nextControlRef);
|
|
11247
|
+
if (admission !== void 0 && !admission.isSettled()) {
|
|
11248
|
+
if (outcome.acknowledgement.status !== "replayed") throw missingContinuationAdmission();
|
|
11249
|
+
admission.onAdmission(nextControlRef);
|
|
11250
|
+
}
|
|
11251
|
+
const admittedControlRef = admission?.controlRef();
|
|
11252
|
+
if (admission !== void 0 && admittedControlRef === void 0) throw missingContinuationAdmission();
|
|
11253
|
+
if (admittedControlRef !== void 0 && !sameControlCoordinates(nextControlRef, admittedControlRef)) throw new RetainedRunProviderContractError("provider changed the native continuation run after admission", { code: "RETAINED_NATIVE_CONTINUATION_RESULT_CHANGED" });
|
|
11254
|
+
activeControlRef = freezeControlRef(nextControlRef);
|
|
11255
|
+
knownControlRefDigests.add(canonicalCandidateDigest(activeControlRef));
|
|
11256
|
+
return structuredClone({
|
|
11257
|
+
...outcome,
|
|
11258
|
+
controlRef: copyControlRef(activeControlRef)
|
|
11259
|
+
});
|
|
11260
|
+
};
|
|
11261
|
+
const beginNativeContinuation = (request, turn) => {
|
|
11262
|
+
synchronizeActiveControlRef();
|
|
11263
|
+
if (measuredCapabilities.nativeContinuation?.admissionControl !== true) throw new Error(`provider "${activeControlRef.provider}" does not advertise early native continuation admission control`);
|
|
11264
|
+
const continuationSource = activeControlRef;
|
|
11265
|
+
let admissionSettled = false;
|
|
11266
|
+
let admissionCalled = false;
|
|
11267
|
+
let admittedControlRef;
|
|
11268
|
+
let admissionFailure;
|
|
11269
|
+
let resolveAdmission;
|
|
11270
|
+
let rejectAdmission;
|
|
11271
|
+
const admissionPromise = new Promise((resolve, reject) => {
|
|
11272
|
+
resolveAdmission = resolve;
|
|
11273
|
+
rejectAdmission = reject;
|
|
11274
|
+
});
|
|
11275
|
+
admissionPromise.catch(() => void 0);
|
|
11276
|
+
const failAdmission = (error) => {
|
|
11277
|
+
admissionFailure ??= error;
|
|
11278
|
+
if (admissionSettled) return;
|
|
11279
|
+
admissionSettled = true;
|
|
11280
|
+
rejectAdmission(error);
|
|
11281
|
+
};
|
|
11282
|
+
const onAdmission = (candidate) => {
|
|
11283
|
+
if (admissionCalled) {
|
|
11284
|
+
const error = new RetainedRunProviderContractError("provider called native continuation admission more than once", { code: "RETAINED_NATIVE_CONTINUATION_ADMISSION_DUPLICATE" });
|
|
11285
|
+
failAdmission(error);
|
|
11286
|
+
throw error;
|
|
11287
|
+
}
|
|
11288
|
+
admissionCalled = true;
|
|
11289
|
+
try {
|
|
11290
|
+
const nextControlRef = exactContinuedControlRef(AgentExactRunControlRefSchema.parse(candidate), continuationSource);
|
|
11291
|
+
assertContinuationIsCurrent(continuationSource, nextControlRef);
|
|
11292
|
+
activeControlRef = freezeControlRef(nextControlRef);
|
|
11293
|
+
knownControlRefDigests.add(canonicalCandidateDigest(activeControlRef));
|
|
11294
|
+
admittedControlRef = activeControlRef;
|
|
11295
|
+
if (!admissionSettled) {
|
|
11296
|
+
admissionSettled = true;
|
|
11297
|
+
resolveAdmission(copyControlRef(activeControlRef));
|
|
11298
|
+
}
|
|
11299
|
+
} catch (error) {
|
|
11300
|
+
const contractError = error instanceof RetainedRunProviderContractError ? error : new RetainedRunProviderContractError(error instanceof Error ? error.message : "provider returned an invalid native continuation admission reference", {
|
|
11301
|
+
code: "RETAINED_NATIVE_CONTINUATION_ADMISSION_INVALID",
|
|
11302
|
+
cause: error
|
|
11303
|
+
});
|
|
11304
|
+
failAdmission(contractError);
|
|
11305
|
+
throw contractError;
|
|
11306
|
+
}
|
|
11307
|
+
};
|
|
11308
|
+
const result = executeNativeContinuation(request, turn, {
|
|
11309
|
+
isSettled: () => admissionSettled,
|
|
11310
|
+
failure: () => admissionFailure,
|
|
11311
|
+
controlRef: () => admittedControlRef === void 0 ? void 0 : copyControlRef(admittedControlRef),
|
|
11312
|
+
onAdmission
|
|
11313
|
+
}, continuationSource);
|
|
11314
|
+
result.then((outcome) => {
|
|
11315
|
+
if (admissionSettled) return;
|
|
11316
|
+
const error = new RetainedRunProviderContractError(outcome.acknowledgement.status === "accepted" || outcome.acknowledgement.status === "replayed" ? "provider accepted a native continuation without an admission reference" : "native continuation ended without durable admission", { code: outcome.acknowledgement.status === "accepted" || outcome.acknowledgement.status === "replayed" ? "RETAINED_NATIVE_CONTINUATION_ADMISSION_MISSING" : "RETAINED_NATIVE_CONTINUATION_NOT_ADMITTED" });
|
|
11317
|
+
failAdmission(error);
|
|
11318
|
+
}, (error) => {
|
|
11319
|
+
failAdmission(error);
|
|
11320
|
+
});
|
|
11321
|
+
return {
|
|
11322
|
+
admission: admissionPromise,
|
|
11323
|
+
result
|
|
11324
|
+
};
|
|
11325
|
+
};
|
|
11167
11326
|
return {
|
|
11168
11327
|
get controlRef() {
|
|
11328
|
+
synchronizeActiveControlRef();
|
|
11169
11329
|
return copyControlRef(activeControlRef);
|
|
11170
11330
|
},
|
|
11171
11331
|
get capabilities() {
|
|
@@ -11185,8 +11345,12 @@ function createRetainedRunHandle(environment, session, initialControlRef, capabi
|
|
|
11185
11345
|
}
|
|
11186
11346
|
return current;
|
|
11187
11347
|
},
|
|
11188
|
-
events: (options) =>
|
|
11348
|
+
events: (options) => {
|
|
11349
|
+
synchronizeActiveControlRef();
|
|
11350
|
+
return retainedRunEvents(session, copyControlRef(activeControlRef), options, clock);
|
|
11351
|
+
},
|
|
11189
11352
|
result: async () => {
|
|
11353
|
+
synchronizeActiveControlRef();
|
|
11190
11354
|
let candidate;
|
|
11191
11355
|
try {
|
|
11192
11356
|
candidate = await exactSessionResult(session);
|
|
@@ -11202,6 +11366,7 @@ function createRetainedRunHandle(environment, session, initialControlRef, capabi
|
|
|
11202
11366
|
code: "RETAINED_RESULT_SCHEMA_INVALID",
|
|
11203
11367
|
cause: parsed.error
|
|
11204
11368
|
});
|
|
11369
|
+
synchronizeActiveControlRef();
|
|
11205
11370
|
try {
|
|
11206
11371
|
assertResultBinding(activeControlRef, parsed.data);
|
|
11207
11372
|
} catch (error) {
|
|
@@ -11213,51 +11378,33 @@ function createRetainedRunHandle(environment, session, initialControlRef, capabi
|
|
|
11213
11378
|
return structuredClone(parsed.data);
|
|
11214
11379
|
},
|
|
11215
11380
|
async respondToInteraction(command, options) {
|
|
11381
|
+
synchronizeActiveControlRef();
|
|
11216
11382
|
const exactCommand = InteractionResponseCommandSchema.parse(command);
|
|
11217
11383
|
assertInteractionBinding(activeControlRef, exactCommand);
|
|
11218
11384
|
if (measuredCapabilities.interactions?.replay !== true || measuredCapabilities.interactions.responseIdempotency !== true) throw new Error(`provider "${activeControlRef.provider}" does not promise retry-safe interaction responses`);
|
|
11219
11385
|
const respond = session.respondToInteraction ?? environment.respondToInteraction;
|
|
11220
11386
|
if (!respond) throw new Error(`provider "${activeControlRef.provider}" does not support interaction responses`);
|
|
11221
11387
|
const acknowledgement = InteractionAcknowledgementSchema.parse(await awaitAbortable$1(Promise.resolve().then(() => respond.call(session.respondToInteraction ? session : environment, exactCommand, options)), options?.signal));
|
|
11388
|
+
synchronizeActiveControlRef();
|
|
11222
11389
|
if (acknowledgement.operationId !== exactCommand.operationId || acknowledgement.commandDigest !== exactCommand.commandDigest || canonicalCandidateDigest(acknowledgement.binding) !== canonicalCandidateDigest(exactCommand.binding)) throw new Error("provider returned an interaction acknowledgement for another command");
|
|
11223
11390
|
return structuredClone(acknowledgement);
|
|
11224
11391
|
},
|
|
11225
11392
|
async contextBoundary(options) {
|
|
11393
|
+
synchronizeActiveControlRef();
|
|
11226
11394
|
if (!session.contextBoundary) return null;
|
|
11227
11395
|
const proof = await awaitAbortable$1(Promise.resolve().then(() => session.contextBoundary(options)), options?.signal);
|
|
11396
|
+
synchronizeActiveControlRef();
|
|
11228
11397
|
if (proof === null) return null;
|
|
11229
11398
|
const exactProof = NativeContextBoundaryProofSchema.parse(proof);
|
|
11230
11399
|
assertBoundaryBinding(activeControlRef, exactProof);
|
|
11231
11400
|
return structuredClone(exactProof);
|
|
11232
11401
|
},
|
|
11233
|
-
|
|
11234
|
-
|
|
11235
|
-
|
|
11236
|
-
const { timeoutMs, signal, ...semanticTurn } = turn;
|
|
11237
|
-
if (nativeContextContinuationTurnDigest(semanticTurn) !== exactRequest.turnDigest) throw new Error("native continuation request targets another user turn");
|
|
11238
|
-
if (measuredCapabilities.nativeContinuation?.atomicBoundary !== true || measuredCapabilities.nativeContinuation.requestIdempotency !== true || !session.continueNative) throw new Error(`provider "${activeControlRef.provider}" does not support retry-safe native continuation`);
|
|
11239
|
-
const outcome = AgentNativeContextContinuationResultSchema.parse(await awaitAbortable$1(Promise.resolve().then(() => session.continueNative(exactRequest, {
|
|
11240
|
-
turn: semanticTurn,
|
|
11241
|
-
...timeoutMs === void 0 ? {} : { timeoutMs },
|
|
11242
|
-
...signal === void 0 ? {} : { signal }
|
|
11243
|
-
})), signal));
|
|
11244
|
-
if (outcome.acknowledgement.operationId !== exactRequest.operationId || outcome.acknowledgement.requestDigest !== exactRequest.requestDigest) throw new Error("provider returned a native continuation result for another request");
|
|
11245
|
-
if (outcome.acknowledgement.actualBoundary !== void 0) {
|
|
11246
|
-
const actualBoundary = NativeContextBoundaryProofSchema.parse(outcome.acknowledgement.actualBoundary);
|
|
11247
|
-
assertBoundaryBinding(exactRequest.run, actualBoundary);
|
|
11248
|
-
}
|
|
11249
|
-
if (outcome.acknowledgement.status !== "accepted" && outcome.acknowledgement.status !== "replayed") return structuredClone(outcome);
|
|
11250
|
-
if (!("result" in outcome) || !("controlRef" in outcome)) throw new Error("provider omitted the successful native continuation result");
|
|
11251
|
-
if (!agentNativeContextContinuationResultMatchesRequest(exactRequest, outcome)) throw new Error("provider returned a native continuation result for another request");
|
|
11252
|
-
const nextControlRef = exactContinuedControlRef(outcome.controlRef, activeControlRef);
|
|
11253
|
-
assertResultBinding(nextControlRef, outcome.result);
|
|
11254
|
-
activeControlRef = freezeControlRef(nextControlRef);
|
|
11255
|
-
return structuredClone({
|
|
11256
|
-
...outcome,
|
|
11257
|
-
controlRef: copyControlRef(activeControlRef)
|
|
11258
|
-
});
|
|
11402
|
+
beginNativeContinuation,
|
|
11403
|
+
continueNative(request, turn) {
|
|
11404
|
+
return executeNativeContinuation(request, turn, void 0, void 0);
|
|
11259
11405
|
},
|
|
11260
11406
|
async cancel(options) {
|
|
11407
|
+
synchronizeActiveControlRef();
|
|
11261
11408
|
assertStableText(options.operationId, "retained cancellation operation id");
|
|
11262
11409
|
if (options.reason !== void 0) assertStableText(options.reason, "retained cancellation reason");
|
|
11263
11410
|
if (options.signal?.aborted) throw abortError(options.signal.reason);
|
|
@@ -15292,4 +15439,4 @@ function isNonEmptySpend(s) {
|
|
|
15292
15439
|
//#endregion
|
|
15293
15440
|
export { bridgeRuntimeAttachmentsKey as $, buildRuntimeEventOtelSpans as $t, readWorkerInteractiveBinding as A, profileMaterializationAxes$1 as An, isLiveNodeStatus as At, retainedCreateMaterial as B, worktreeCliProfileMaterialization as Bn, probeSandboxCapabilities as Bt, timerAt as C, parseCodexTokenUsage as Cn, DEFAULT_PEER_MAIL_LIMITS as Ct, readWorkerInteractiveAdmissions as D, controlProfileMaterialization as Dn, isPeerMailEnvelope as Dt, interactiveAdmissionSeamKey as E, assertProfileMaterialization as En, createPeerMailbox as Et, startRetainedInteractiveRun as F, renderProfileMaterializationIssues as Fn, createSandboxForSpec as Ft, DEFAULT_SUCCESSFUL_SHUTDOWN_MS as G, observedModelMatchesDeclared as Gt, freeSlots as H, routerBrain as Ht, reconnectRetainedRun as I, renderUnsupported as In, defaultSelectWinner as It, createBudgetPool as J, readTraceContextFromEnv as Jt, teardownExecutor as K, createPropagatingTraceEmitter as Kt, recoverRetainedRun as L, sandboxActProfileMaterialization as Ln, isTerminalDecision as Lt, workerInteractiveBindingsDir as M, promptModelProfileMaterialization as Mn, createInPlaceCliExecutor as Mt, reconnectRetainedInteractiveRun as N, promptOnlyProfileMaterialization as Nn, taskToPrompt as Nt, workerInteractiveAdmissionFile as O, defineProfileMaterializationContract as On, peerMailTools as Ot, recoverRetainedInteractiveRun as P, promptResourceProfileMaterialization as Pn, TERMINAL_DECISIONS as Pt, bridgeModelRouteRefusal as Q, buildLoopSpanNodes as Qt, startRetainedRun as R, unsupportedProfileDimensions as Rn, runAgentRounds as Rt, pollFor as S, localHarnessExecutable as Sn, AUTHORITY_MARKERS as St, waitUntil as T, AGENT_PROFILE_MATERIALIZATION_AXES as Tn, claimsAuthority as Tt, queueOf as U, runBrainLoop as Ut, effectiveConcurrency as V, acquireSandbox as Vt, rollingDispatch as W, canonicalObservedModel as Wt, bindReusableExecutorExecutionId as X, INTELLIGENCE_WIRE_VERSION as Xt, spendFromUsageEvents as Y, traceContextToEnv as Yt, bridgeAdmissionRead as Z, buildLoopOtelSpans as Zt, recordScopeOwnerMaterialization as _, createWorktree as _n, sandboxSessionTraceSource as _t, uncertainSpawnBudgets as a, loopEventToOtelSpan as an, createExecutorRegistry as at, createWaitProbes as b, LOCAL_HARNESSES as bn, readWorkerProgress as bt, pickBestDelivered as c, toOtelAttributes as cn, WORKER_TRACE_PROPAGATION as ct, driverChild as d, sanitizeAgentRuntimeEvent as dn, workerTraceHeaders as dt, createOpenInferenceFileExporter as en, bridgeStopSignalKey as et, withDriverExecutor as f, sanitizeKnowledgeReadinessReport as fn, workerTraceSeamKey as ft, meterRuntimeOwnedProviderAttempt as g, captureWorktreeDiff as gn, decodeToolPart as gt, meterRuntimeOwnedAccounting as h, runWorktreeHarness as hn, createPushTraceSource as ht, sumMeasuredSpendFromEvents as i, generateSpanId as in, createExecutor as it, workerInteractiveBindingFile as j, promptControlProfileMaterialization as jn, isTerminalNodeStatus as jt, attachWorker as k, fullProfileMaterialization as kn, peerMailVerbNames as kt, runFinalizer as l, createRuntimeEventCollector as ln, readWorkerTraceContext as lt, deriveNodeExecutionIdentity as m, runSettledCommand as mn, createSteerableSandboxSession as mt, createSupervisor as n, exportEvalRuns as nn, cliInPlaceExecutor as nt, bestDelivered as o, padSpanId as on, snapshotExecutorConfig as ot, createScope as p, sanitizeRuntimeStreamEvent as pn, DEFAULT_SANDBOX_STEERING_MAX_TURNS as pt, assertValidBudget as q, mergeTraceEnv as qt, maxSeqOf as r, flatOtelSpan as rn, cliWorktreeExecutor as rt, collectDelivered as s, padTraceId as sn, createWorktreeCliExecutor as st, createRootHandle as t, createOtelExporter as tn, captureReusableExecutorConfig as tt, runTree as u, createRuntimeStreamEventCollector as un, workerTraceEnv as ut, scopeOwnerExecutorNodeContext as v, removeWorktree as vn, DEFAULT_STALL_AFTER_MS as vt, validateWaitSpec as w, CodexExecutionDiagnosticError as wn, PEER_MAIL_WIRE_KEY as wt, isWaitOutcome as x, harnessSupportsReasoningEffort as xn, createInbox as xt, settledToIteration as y, DEFAULT_LOCAL_HARNESS as yn, createActivityLog as yt, startRetainedRunInEnvironment as z, validateProfileMaterialization as zn, createSandboxLineage as zt };
|
|
15294
15441
|
|
|
15295
|
-
//# sourceMappingURL=supervisor-
|
|
15442
|
+
//# sourceMappingURL=supervisor-DyDgxgpl.js.map
|