@tangle-network/agent-runtime 0.132.5 → 0.132.7
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-Djhlt6gA.js → activation-Cb1vGSdK.js} +2 -2
- package/dist/{activation-Djhlt6gA.js.map → activation-Cb1vGSdK.js.map} +1 -1
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +2 -2
- package/dist/{authoring-4Yyp4Get.js → authoring-CQP4S4uc.js} +2 -2
- package/dist/{authoring-4Yyp4Get.js.map → authoring-CQP4S4uc.js.map} +1 -1
- package/dist/{conversation-D95pue6P.js → conversation-BiII3X_6.js} +3 -3
- package/dist/{conversation-D95pue6P.js.map → conversation-BiII3X_6.js.map} +1 -1
- package/dist/conversation.d.ts +1 -1
- package/dist/conversation.js +1 -1
- package/dist/{environment-provider-DlYw_pjo.d.ts → environment-provider-CkSDxRZd.d.ts} +2 -2
- package/dist/environment-provider.d.ts +1 -1
- package/dist/{graph-C-2FjZYl.js → graph-DgDaI3KK.js} +2 -2
- package/dist/{graph-C-2FjZYl.js.map → graph-DgDaI3KK.js.map} +1 -1
- package/dist/{improvement-cycle-CcNYXtV3.js → improvement-cycle-DCBmuhht.js} +4 -4
- package/dist/{improvement-cycle-CcNYXtV3.js.map → improvement-cycle-DCBmuhht.js.map} +1 -1
- package/dist/{index-CcpNgmQY.d.ts → index-BsrFZu0N.d.ts} +4 -4
- package/dist/{index-iwZ0at5o.d.ts → index-Cdf9NET5.d.ts} +2 -2
- package/dist/{index-D9dVsozT.d.ts → index-DixXnx07.d.ts} +73 -7
- package/dist/index.d.ts +8 -8
- package/dist/index.js +9 -9
- package/dist/intelligence.d.ts +4 -4
- package/dist/intelligence.js +3 -3
- package/dist/kernel.d.ts +6 -6
- package/dist/kernel.js +7 -7
- package/dist/{knowledge-DHC3bfYP.js → knowledge-B8pmbGqF.js} +3 -3
- package/dist/{knowledge-DHC3bfYP.js.map → knowledge-B8pmbGqF.js.map} +1 -1
- package/dist/knowledge.d.ts +1 -1
- package/dist/knowledge.js +1 -1
- package/dist/{loop-runner-bin-D9OAFkP_.d.ts → loop-runner-bin-BqJGlXju.d.ts} +3 -3
- package/dist/{loop-runner-bin-BDKC-Pfw.js → loop-runner-bin-D9qLc2dD.js} +3 -3
- package/dist/{loop-runner-bin-BDKC-Pfw.js.map → loop-runner-bin-D9qLc2dD.js.map} +1 -1
- package/dist/loop-runner-bin.d.ts +1 -1
- package/dist/loop-runner-bin.js +1 -1
- package/dist/{materialization-DBXuH34A.js → materialization-JR_nN_oT.js} +18 -2
- package/dist/materialization-JR_nN_oT.js.map +1 -0
- package/dist/mcp/bin.js +3 -3
- package/dist/mcp/index.d.ts +3 -3
- package/dist/mcp/index.js +4 -4
- package/dist/{openai-tools-DWfAhx1n.js → openai-tools-C6KQ6aVK.js} +2 -2
- package/dist/{openai-tools-DWfAhx1n.js.map → openai-tools-C6KQ6aVK.js.map} +1 -1
- package/dist/primeintellect/index.d.ts +1 -1
- package/dist/{redact-mWj5eu4X.d.ts → redact-BAnM2avI.d.ts} +3 -3
- package/dist/{runtime-B3Ty5dJP.js → runtime-B5z9C4gn.js} +65 -15
- package/dist/runtime-B5z9C4gn.js.map +1 -0
- package/dist/{runtime-aXvRThzL.d.ts → runtime-CKk_poJ-.d.ts} +3 -3
- package/dist/{stream-agent-turn-BxwZJVfZ.js → stream-agent-turn-Bo5ZSAUR.js} +2 -2
- package/dist/{stream-agent-turn-BxwZJVfZ.js.map → stream-agent-turn-Bo5ZSAUR.js.map} +1 -1
- package/dist/{stream-agent-turn-BXiMHdCf.d.ts → stream-agent-turn-By46GZlo.d.ts} +2 -2
- package/dist/{structural-rollout-lRYq5ra9.js → structural-rollout-DBYiyyE-.js} +4 -4
- package/dist/{structural-rollout-lRYq5ra9.js.map → structural-rollout-DBYiyyE-.js.map} +1 -1
- package/dist/{supervise-CxYIRLFa.js → supervise-oLZHae_v.js} +40 -5
- package/dist/supervise-oLZHae_v.js.map +1 -0
- package/dist/{supervisor-CRYhRmN7.js → supervisor-D5ar0Rs6.js} +6 -5
- package/dist/{supervisor-CRYhRmN7.js.map → supervisor-D5ar0Rs6.js.map} +1 -1
- package/dist/testing.d.ts +2 -2
- package/dist/testing.js +11 -11
- package/dist/{types-B9KAen_0.d.ts → types-BjUQODeG.d.ts} +21 -2
- package/package.json +1 -1
- package/dist/materialization-DBXuH34A.js.map +0 -1
- package/dist/runtime-B3Ty5dJP.js.map +0 -1
- package/dist/supervise-CxYIRLFa.js.map +0 -1
|
@@ -2,8 +2,8 @@ import { c as RuntimeRunStateError, i as ConfigError, o as NotFoundError, r as B
|
|
|
2
2
|
import { t as detachedSnapshot } from "./snapshot-CXiiuHhL.js";
|
|
3
3
|
import { b as workerTraceAnalysisStore, d as writeAllBytes, i as InMemorySpawnJournal, l as parseCommittedJsonLines, n as FileSpawnJournal, r as InMemoryResultBlobStore, t as FileResultBlobStore, u as prepareJsonlAppend, x as contentAddress, y as parseWorkerToolTraceArtifact } from "./spawn-journal-Cd5L-Ie9.js";
|
|
4
4
|
import { a as concreteProfileModel, d as harnessRunsAgent, n as assertModelAllowed, r as assertProfileModelsAllowed, s as profileModelExecutionSettings, t as assertExecutableAgentProfile, u as agentHarness } from "./model-policy-mWSoToiQ.js";
|
|
5
|
-
import {
|
|
6
|
-
import { A as bindReusableExecutorExecutionId, Bt as controlProfileMaterialization, D as assertValidBudget, E as teardownExecutor, F as snapshotExecutorConfig, Gt as promptModelProfileMaterialization, Ht as fullProfileMaterialization, L as WORKER_TRACE_PROPAGATION, N as createExecutor, P as createExecutorRegistry, S as freeSlots, T as DEFAULT_SUCCESSFUL_SHUTDOWN_MS, Ut as profileMaterializationAxes$1, Vt as defineProfileMaterializationContract, Wt as promptControlProfileMaterialization, X as createInbox, Zt as worktreeCliProfileMaterialization, _t as generateSpanId, a as pickBestDelivered, c as driverChild, d as deriveNodeExecutionIdentity, dt as buildLoopSpanNodes, f as recordScopeOwnerMaterialization, it as runBrainLoop, j as captureReusableExecutorConfig, k as spendFromUsageEvents, l as withDriverExecutor, mt as createOtelExporter, n as createSupervisor, o as runFinalizer, p as scopeOwnerExecutorNodeContext, r as bestDelivered, rt as routerBrain, s as runTree, xt as toOtelAttributes, zt as assertProfileMaterialization } from "./supervisor-
|
|
5
|
+
import { _ as runtimeOwnedScopeOwnerRuntime, d as recordRuntimeOwnedDriveHarnessModel, g as runtimeOwnedPendingExecutorMaterialization, h as runtimeOwnedExecutorMaterialization, i as attestRuntimeOwnedScopeOwner, m as runtimeOwnedExecutorExecutionBinding, p as runtimeOwnedDriveHarnessModels, s as inheritRuntimeOwnedExecutorAttestation } from "./materialization-JR_nN_oT.js";
|
|
6
|
+
import { A as bindReusableExecutorExecutionId, Bt as controlProfileMaterialization, D as assertValidBudget, E as teardownExecutor, F as snapshotExecutorConfig, Gt as promptModelProfileMaterialization, Ht as fullProfileMaterialization, L as WORKER_TRACE_PROPAGATION, N as createExecutor, P as createExecutorRegistry, S as freeSlots, T as DEFAULT_SUCCESSFUL_SHUTDOWN_MS, Ut as profileMaterializationAxes$1, Vt as defineProfileMaterializationContract, Wt as promptControlProfileMaterialization, X as createInbox, Zt as worktreeCliProfileMaterialization, _t as generateSpanId, a as pickBestDelivered, c as driverChild, d as deriveNodeExecutionIdentity, dt as buildLoopSpanNodes, f as recordScopeOwnerMaterialization, it as runBrainLoop, j as captureReusableExecutorConfig, k as spendFromUsageEvents, l as withDriverExecutor, mt as createOtelExporter, n as createSupervisor, o as runFinalizer, p as scopeOwnerExecutorNodeContext, r as bestDelivered, rt as routerBrain, s as runTree, xt as toOtelAttributes, zt as assertProfileMaterialization } from "./supervisor-D5ar0Rs6.js";
|
|
7
7
|
import { t as composeRuntimeHooks } from "./runtime-hooks-C7iJOWm3.js";
|
|
8
8
|
import { t as createStdioToolServer } from "./tool-server-Gs3VvfSK.js";
|
|
9
9
|
import { n as UI_LENSES } from "./substrate-B0TYNrXn.js";
|
|
@@ -2829,6 +2829,7 @@ function driverAgent(opts) {
|
|
|
2829
2829
|
throw error;
|
|
2830
2830
|
}
|
|
2831
2831
|
let evidenceError;
|
|
2832
|
+
opts.onProviderModel?.(res.model);
|
|
2832
2833
|
if (opts.expectedModel !== void 0) {
|
|
2833
2834
|
if (res.model === void 0) evidenceError = new ValidationError(`driverAgent: Router response omitted model identity; expected ${JSON.stringify(opts.expectedModel)}`);
|
|
2834
2835
|
else if (res.model !== opts.expectedModel) evidenceError = new ValidationError(`driverAgent: Router response reported model ${JSON.stringify(res.model)}; expected ${JSON.stringify(opts.expectedModel)}`);
|
|
@@ -5365,6 +5366,7 @@ function buildSupervisorAgent(profile, deps, testBrain) {
|
|
|
5365
5366
|
name,
|
|
5366
5367
|
brain,
|
|
5367
5368
|
...testBrain === void 0 ? { expectedModel: resolveSupervisorModelId(stableProfile) } : {},
|
|
5369
|
+
...deps.onProviderModel ? { onProviderModel: deps.onProviderModel } : {},
|
|
5368
5370
|
blobs: deps.blobs,
|
|
5369
5371
|
makeWorkerAgent: deps.makeWorkerAgent,
|
|
5370
5372
|
...deps.authorizeDownMessage ? { authorizeDownMessage: deps.authorizeDownMessage } : {},
|
|
@@ -5742,6 +5744,7 @@ function driveHarnessFromBackend(backend, executionId, now = Date.now) {
|
|
|
5742
5744
|
let completed = false;
|
|
5743
5745
|
let started = false;
|
|
5744
5746
|
let terminalAccountingCaptured = false;
|
|
5747
|
+
let settledOutput;
|
|
5745
5748
|
let pendingUsage = [];
|
|
5746
5749
|
let teardownStarted = false;
|
|
5747
5750
|
const deadlineAtMs = scope.budget.deadlineMs || void 0;
|
|
@@ -5813,6 +5816,7 @@ function driveHarnessFromBackend(backend, executionId, now = Date.now) {
|
|
|
5813
5816
|
else pendingUsage.push(event);
|
|
5814
5817
|
await meterPending();
|
|
5815
5818
|
const artifact = executor.resultArtifact();
|
|
5819
|
+
settledOutput = artifact.out;
|
|
5816
5820
|
terminalAccountingCaptured = true;
|
|
5817
5821
|
if (artifact.spent.tokensKnown === false || artifact.spent.usdKnown === false) await scope.meter({
|
|
5818
5822
|
iterations: 0,
|
|
@@ -5831,6 +5835,7 @@ function driveHarnessFromBackend(backend, executionId, now = Date.now) {
|
|
|
5831
5835
|
});
|
|
5832
5836
|
} else {
|
|
5833
5837
|
const artifact = await run;
|
|
5838
|
+
settledOutput = artifact.out;
|
|
5834
5839
|
terminalAccountingCaptured = true;
|
|
5835
5840
|
await scope.meter({
|
|
5836
5841
|
...artifact.spent,
|
|
@@ -5840,6 +5845,7 @@ function driveHarnessFromBackend(backend, executionId, now = Date.now) {
|
|
|
5840
5845
|
runtime: executor.runtime
|
|
5841
5846
|
});
|
|
5842
5847
|
}
|
|
5848
|
+
recordRuntimeOwnedDriveHarnessModel(drive, extractExecutorModel(settledOutput));
|
|
5843
5849
|
if (pending !== void 0) {
|
|
5844
5850
|
const acknowledged = runtimeOwnedExecutorMaterialization(executor);
|
|
5845
5851
|
const acknowledgedBinding = runtimeOwnedExecutorExecutionBinding(executor);
|
|
@@ -5898,6 +5904,11 @@ function driveHarnessFromBackend(backend, executionId, now = Date.now) {
|
|
|
5898
5904
|
};
|
|
5899
5905
|
return attestRuntimeOwnedScopeOwner(drive, "cli");
|
|
5900
5906
|
}
|
|
5907
|
+
function extractExecutorModel(value) {
|
|
5908
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return void 0;
|
|
5909
|
+
const model = value.model;
|
|
5910
|
+
return typeof model === "string" && model.length > 0 ? model : void 0;
|
|
5911
|
+
}
|
|
5901
5912
|
function isAsyncIterable(value) {
|
|
5902
5913
|
return value !== null && typeof value === "object" && Symbol.asyncIterator in value && typeof value[Symbol.asyncIterator] === "function";
|
|
5903
5914
|
}
|
|
@@ -6130,6 +6141,7 @@ function superviseInternal(profile, task, opts, testBrain) {
|
|
|
6130
6141
|
const runNamespace = supervisionRunNamespace(options.runDir, runId);
|
|
6131
6142
|
const log = ctx.coordinationLog;
|
|
6132
6143
|
const rootOwnerId = rootCoordinationOwner(rootExecution.identity);
|
|
6144
|
+
const rootProviderModels = [];
|
|
6133
6145
|
const observeNodeEvent = options.onCoordinationEvent ? async (context, event, record) => {
|
|
6134
6146
|
await options.onCoordinationEvent?.(context, coordinationEventId(context, event), record);
|
|
6135
6147
|
} : void 0;
|
|
@@ -6309,6 +6321,9 @@ function superviseInternal(profile, task, opts, testBrain) {
|
|
|
6309
6321
|
perWorker,
|
|
6310
6322
|
...log ? { onEvent: (_event, record) => log.append(runId, record, rootOwnerId) } : {},
|
|
6311
6323
|
...deliverable ? { deliverable } : {},
|
|
6324
|
+
onProviderModel(model) {
|
|
6325
|
+
rootProviderModels.push(model);
|
|
6326
|
+
},
|
|
6312
6327
|
...priorCoordination && (priorCoordination.questions.length > 0 || priorCoordination.findings.length > 0 || priorCoordination.continuations.length > 0 || priorCoordination.deliveryEvidence.length > 0) ? { priorCoordination } : {},
|
|
6313
6328
|
...finalizer ? { finalizer } : {},
|
|
6314
6329
|
...options.coordination ? { coordination: options.coordination } : {},
|
|
@@ -6377,9 +6392,17 @@ function superviseInternal(profile, task, opts, testBrain) {
|
|
|
6377
6392
|
...recorder ? { workerTrace: recorder.workerTrace } : {},
|
|
6378
6393
|
...recorder && traceUnpropagated ? { workerTraceUnpropagated: traceUnpropagated } : {}
|
|
6379
6394
|
});
|
|
6380
|
-
|
|
6381
|
-
try {
|
|
6395
|
+
const settle = async () => {
|
|
6382
6396
|
const result = await run;
|
|
6397
|
+
const observed = rootProviderModels.length > 0 ? rootProviderModels : rootDriveHarness === void 0 ? [] : runtimeOwnedDriveHarnessModels(rootDriveHarness) ?? [];
|
|
6398
|
+
return {
|
|
6399
|
+
...result,
|
|
6400
|
+
rootProviderModel: rootProviderModelEvidence(observed)
|
|
6401
|
+
};
|
|
6402
|
+
};
|
|
6403
|
+
if (!recorder) return settle();
|
|
6404
|
+
try {
|
|
6405
|
+
const result = await settle();
|
|
6383
6406
|
await recorder.finish({ result });
|
|
6384
6407
|
return result;
|
|
6385
6408
|
} catch (error) {
|
|
@@ -6389,7 +6412,19 @@ function superviseInternal(profile, task, opts, testBrain) {
|
|
|
6389
6412
|
};
|
|
6390
6413
|
return start();
|
|
6391
6414
|
}
|
|
6415
|
+
function rootProviderModelEvidence(observations) {
|
|
6416
|
+
const models = [...new Set(observations.filter((model) => model !== void 0))];
|
|
6417
|
+
if (observations.length === 0 || observations.some((model) => model === void 0)) return Object.freeze({
|
|
6418
|
+
status: "unknown",
|
|
6419
|
+
models: Object.freeze(models),
|
|
6420
|
+
reason: "provider-model-missing"
|
|
6421
|
+
});
|
|
6422
|
+
return Object.freeze({
|
|
6423
|
+
status: "known",
|
|
6424
|
+
models: Object.freeze(models)
|
|
6425
|
+
});
|
|
6426
|
+
}
|
|
6392
6427
|
//#endregion
|
|
6393
6428
|
export { DELEGATION_TRACE_MAX_BYTES as $, DELEGATION_HISTORY_INPUT_SCHEMA as A, defaultToolDetectors as At, DELEGATE_FEEDBACK_INPUT_SCHEMA as B, createMcpServer as C, plateauLength as Ct, createDelegationStatusHandler as D, createCoordinationTools as Dt, DELEGATION_STATUS_TOOL_NAME as E, canonicalFindingEvent as Et, DELEGATE_UI_AUDIT_INPUT_SCHEMA as F, createSupervisorSpanRecorder as Ft, DELEGATE_INPUT_SCHEMA as G, createDelegateFeedbackHandler as H, DELEGATE_UI_AUDIT_TOOL_NAME as I, gateOnDeliverable as It, validateDelegateArgs as J, DELEGATE_TOOL_NAME as K, createDelegateUiAuditHandler as L, mapExecutorResult as Lt, createDelegationHistoryHandler as M, createFileRunContext as Mt, validateDelegationHistoryArgs as N, createInMemoryRunContext as Nt, validateDelegationStatusArgs as O, normalizeAnalyzeOnSettle as Ot, DELEGATE_UI_AUDIT_DESCRIPTION as P, FileCoordinationLog as Pt, hashIdempotencyInput as Q, validateDelegateUiAuditArgs as R, createInProcessTransport as S, bestSoFar as St, DELEGATION_STATUS_INPUT_SCHEMA as T, DEFAULT_AWAIT_EVENT_TIMEOUT_MS as Tt, validateDelegateFeedbackArgs as U, DELEGATE_FEEDBACK_TOOL_NAME as V, DELEGATE_DESCRIPTION as W, delegate as X, defaultDelegateBudget as Y, DelegationTaskQueue as Z, promptHandle as _, noProgressFor as _t, assertCoordinationBinding as a, DelegationPersistenceError as at, classifyDriverFailure as b, anytimeReport as bt, supervisorAgentWithTestBrain as c, InMemoryDelegationStore as ct, delegatesWorkerBriefPrompt as d, driverAgent as dt, DELEGATION_TRACE_MAX_SPANS as et, dumbContinuationFailPrompt as f, finalizeBestDelivered as ft, naiveContinuationPrompt as g, createProgressTracker as gt, kernelPromptRegistry as h, anyOf as ht, workerFromBackend as i, createDelegationTraceCollector as it, DELEGATION_HISTORY_TOOL_NAME as j, watchTrace as jt, DELEGATION_HISTORY_DESCRIPTION as k, createEventBus as kt, analyzesFindingsReportPrompt as l, InMemoryFeedbackStore as lt, formatPromptHandle as m, allWorkersStalled as mt, supervise as n, capDelegationTrace as nt, resolveSupervisorProfile as o, DelegationStateCorruptError as ot, dumbContinuationPassPrompt as p, allOf as pt, createDelegateHandler as q, superviseWithTestBrain as r, composeLoopTraceEmitters as rt, supervisorAgent as s, FileDelegationStore as st, DEFAULT_AUTHORED_PROFILE_SECURITY_POLICY as t, buildDelegationTraceSpans as tt, createPromptRegistry as u, eventToSnapshot as ut, supervisorPolicyPrompt as v, plateau as vt, DELEGATION_STATUS_DESCRIPTION as w, renderAnytimeTable as wt, serveCoordinationMcp as x, areaUnderCurve as xt, DriverAttemptsExhaustedError as y, sampleFromSettled as yt, DELEGATE_FEEDBACK_DESCRIPTION as z };
|
|
6394
6429
|
|
|
6395
|
-
//# sourceMappingURL=supervise-
|
|
6430
|
+
//# sourceMappingURL=supervise-oLZHae_v.js.map
|