@tangle-network/agent-runtime 0.192.4 → 0.193.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-kJTTNmYq.js → activation-BismttgN.js} +2 -2
- package/dist/{activation-kJTTNmYq.js.map → activation-BismttgN.js.map} +1 -1
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +2 -2
- package/dist/{authoring-p17Phgst.js → authoring-DWiqKSDY.js} +2 -2
- package/dist/{authoring-p17Phgst.js.map → authoring-DWiqKSDY.js.map} +1 -1
- package/dist/conversation.d.ts +1 -1
- package/dist/{coordination-driver-DvrsHtkE.js → coordination-driver-DujHiIGa.js} +8 -8
- package/dist/coordination-driver-DujHiIGa.js.map +1 -0
- package/dist/durable.d.ts +2 -2
- package/dist/durable.js +1 -1
- package/dist/{environment-provider-CJ43FJfJ.d.ts → environment-provider-DpPGJfK-.d.ts} +2 -2
- package/dist/environment-provider.d.ts +1 -1
- package/dist/{graph-Ca0nrifu.js → graph-DORfp9WX.js} +2 -2
- package/dist/{graph-Ca0nrifu.js.map → graph-DORfp9WX.js.map} +1 -1
- package/dist/graph.d.ts +3 -3
- package/dist/graph.js +3 -3
- package/dist/{improve-Cbbt3jE6.d.ts → improve-Bn1zpWHF.d.ts} +3 -3
- package/dist/{improvement-cycle-CyFNQ2EL.js → improvement-cycle-BbsiYcpH.js} +3 -3
- package/dist/{improvement-cycle-CyFNQ2EL.js.map → improvement-cycle-BbsiYcpH.js.map} +1 -1
- package/dist/{index-B_fEqr5V.d.ts → index-DV1lzp9p.d.ts} +22 -24
- package/dist/{index-OSRVFARy.d.ts → index-RM2oRI9s.d.ts} +2 -2
- package/dist/{index-COznK4kB.d.ts → index-Vz-13VZq.d.ts} +4 -4
- package/dist/index.d.ts +8 -8
- package/dist/index.js +7 -7
- package/dist/intelligence.d.ts +5 -5
- package/dist/intelligence.js +3 -3
- package/dist/kernel.d.ts +5 -5
- package/dist/kernel.js +8 -8
- package/dist/{knowledge-Cd1ENZ8E.js → knowledge-RW1pbZCH.js} +3 -3
- package/dist/{knowledge-Cd1ENZ8E.js.map → knowledge-RW1pbZCH.js.map} +1 -1
- package/dist/knowledge.d.ts +1 -1
- package/dist/knowledge.js +1 -1
- package/dist/{loop-runner-bin-DiiZMHw7.d.ts → loop-runner-bin-CGraqNiA.d.ts} +3 -3
- package/dist/{loop-runner-bin-s9LfOKHv.js → loop-runner-bin-sBwcyQTc.js} +3 -3
- package/dist/{loop-runner-bin-s9LfOKHv.js.map → loop-runner-bin-sBwcyQTc.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-DQnYmRfB.js → openai-tools-6jUqkGG7.js} +2 -2
- package/dist/{openai-tools-DQnYmRfB.js.map → openai-tools-6jUqkGG7.js.map} +1 -1
- package/dist/primeintellect/index.d.ts +1 -1
- package/dist/{provision-supervisor-C_XCahxF.js → provision-supervisor-CddfH9mg.js} +9 -9
- package/dist/provision-supervisor-CddfH9mg.js.map +1 -0
- package/dist/{redact-Cn-WvchV.js → redact-D0OzQsyt.js} +123 -44
- package/dist/redact-D0OzQsyt.js.map +1 -0
- package/dist/{runtime-DI4mJNXI.d.ts → runtime-V91N6sPc.d.ts} +3 -3
- package/dist/{runtime-Cp6TEJ_9.js → runtime-ZM4i-jEF.js} +26 -16
- package/dist/{runtime-Cp6TEJ_9.js.map → runtime-ZM4i-jEF.js.map} +1 -1
- package/dist/{stream-agent-turn-_GgUW49y.d.ts → stream-agent-turn-1ahpdeIo.d.ts} +2 -2
- package/dist/{structural-rollout-DG_xaKhc.js → structural-rollout-CktnUTCC.js} +2 -2
- package/dist/{structural-rollout-DG_xaKhc.js.map → structural-rollout-CktnUTCC.js.map} +1 -1
- package/dist/{supervise-Bxox1rW4.js → supervise-Dj6zd2C7.js} +29 -23
- package/dist/supervise-Dj6zd2C7.js.map +1 -0
- 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-DKA_PDv0.d.ts → types-CGez_ZHQ.d.ts} +21 -28
- package/package.json +1 -1
- package/skills/supervise/SKILL.md +75 -26
- package/dist/coordination-driver-DvrsHtkE.js.map +0 -1
- package/dist/provision-supervisor-C_XCahxF.js.map +0 -1
- package/dist/redact-Cn-WvchV.js.map +0 -1
- package/dist/supervise-Bxox1rW4.js.map +0 -1
|
@@ -2,11 +2,11 @@ import { C as runtimeOwnedScopeOwnerRuntime, S as runtimeOwnedPendingExecutorMat
|
|
|
2
2
|
import { f as RuntimeRunStateError, i as ConfigError, m as ValidationError, o as NotFoundError, r as BackendTransportError, t as AgentEvalError } from "./errors-CDZ8XsVj.js";
|
|
3
3
|
import { n as detachedSnapshot } from "./snapshot-CTAf4uuA.js";
|
|
4
4
|
import { x as contentAddress } from "./spawn-journal-B9eTmVAn.js";
|
|
5
|
-
import { v as unmeteredSpend } from "./util-mCNUeboW.js";
|
|
5
|
+
import { b as zeroSpend, v as unmeteredSpend } from "./util-mCNUeboW.js";
|
|
6
6
|
import { a as concreteProfileModel, c as profileModelExecutionSettings, d as agentHarness, f as harnessRunsAgent, n as assertModelAllowed, o as enforceTokenLimits, r as assertProfileModelsAllowed, s as profileBridgeWireModel, t as assertExecutableAgentProfile } from "./model-policy-Wf2MxXJ9.js";
|
|
7
|
-
import { Bn as fullProfileMaterialization, Et as createInbox, Hn as promptControlProfileMaterialization, Ln as assertProfileMaterialization, Q as assertValidBudget, Rn as controlProfileMaterialization, S as scopeOwnerExecutorNodeContext, Un as promptModelProfileMaterialization, Vn as profileMaterializationAxes$1, X as DEFAULT_SUCCESSFUL_SHUTDOWN_MS, Yn as unsupportedProfileDimensions, Yt as routerBrain, Z as teardownExecutor, Zn as worktreeCliProfileMaterialization, a as createSupervisor, at as bridgeStopSignalKey, b as meterRuntimeOwnedProviderAttempt, dt as snapshotExecutorConfig, et as spendFromUsageEvents, f as runFinalizer, fn as createOtelExporter, g as beginScopeOwnerAttempt, hn as generateSpanId, i as createRootHandle, it as bridgeRuntimeAttachmentsKey, l as bestDelivered, ln as buildLoopSpanNodes, lt as createExecutor, m as driverChild, nt as
|
|
7
|
+
import { Bn as fullProfileMaterialization, Et as createInbox, Hn as promptControlProfileMaterialization, Ln as assertProfileMaterialization, Q as assertValidBudget, Rn as controlProfileMaterialization, S as scopeOwnerExecutorNodeContext, Un as promptModelProfileMaterialization, Vn as profileMaterializationAxes$1, X as DEFAULT_SUCCESSFUL_SHUTDOWN_MS, Yn as unsupportedProfileDimensions, Yt as routerBrain, Z as teardownExecutor, Zn as worktreeCliProfileMaterialization, a as createSupervisor, at as bridgeStopSignalKey, b as meterRuntimeOwnedProviderAttempt, dt as snapshotExecutorConfig, et as spendFromUsageEvents, f as runFinalizer, fn as createOtelExporter, g as beginScopeOwnerAttempt, hn as generateSpanId, i as createRootHandle, it as bridgeRuntimeAttachmentsKey, l as bestDelivered, ln as buildLoopSpanNodes, lt as createExecutor, m as driverChild, nt as bridgeAdmissionRefusal, ot as captureReusableExecutorConfig, p as runTree, pt as WORKER_TRACE_PROPAGATION, qn as renderUnsupported, rt as bridgeModelRouteRefusal, tt as bindReusableExecutorExecutionId, v as deriveNodeExecutionIdentity, x as recordScopeOwnerMaterialization, y as meterRuntimeOwnedAccounting, yn as toOtelAttributes, zn as defineProfileMaterializationContract } from "./redact-D0OzQsyt.js";
|
|
8
8
|
import { t as composeRuntimeHooks } from "./runtime-hooks-tXpAarhW.js";
|
|
9
|
-
import { E as createCoordinationTools, T as coordinationVerbNames, c as createProgressTracker, d as progressStop, r as driverAgent, v as createFileRunContext, y as createInMemoryRunContext } from "./coordination-driver-
|
|
9
|
+
import { E as createCoordinationTools, T as coordinationVerbNames, c as createProgressTracker, d as progressStop, r as driverAgent, v as createFileRunContext, y as createInMemoryRunContext } from "./coordination-driver-DujHiIGa.js";
|
|
10
10
|
import { k as writeRunCancellation, o as readRunCancelRequest, s as readRunCancellation } from "./run-layout-B8I_LXN-.js";
|
|
11
11
|
import { t as createStdioToolServer } from "./tool-server-DEmLr9YY.js";
|
|
12
12
|
import { n as UI_LENSES } from "./substrate-B0TYNrXn.js";
|
|
@@ -2239,11 +2239,11 @@ async function serveCoordinationMcp(opts) {
|
|
|
2239
2239
|
...opts.peerMail ? { peerMail: typeof opts.peerMail === "object" && opts.peerMail.limits ? { limits: opts.peerMail.limits } : {} } : {}
|
|
2240
2240
|
});
|
|
2241
2241
|
await coord.ready();
|
|
2242
|
-
opts.onCoordinationTools?.(coord.tools);
|
|
2243
2242
|
const mcp = createMcpServer({
|
|
2244
2243
|
extraTools: [...coord.tools, ...opts.nodeTools ?? []],
|
|
2245
2244
|
serverName: "coordination"
|
|
2246
2245
|
});
|
|
2246
|
+
opts.onCoordinationTools?.([...mcp.tools.values()]);
|
|
2247
2247
|
const server = createServer((req, res) => {
|
|
2248
2248
|
if (req.method !== "POST") {
|
|
2249
2249
|
res.writeHead(405, { allow: "POST" });
|
|
@@ -2961,8 +2961,8 @@ function createVerbSlot() {
|
|
|
2961
2961
|
if (bound === void 0) throw new ValidationError("supervisorAgent: coordinationTools() was called before this manager's coordination tools were bound");
|
|
2962
2962
|
return Object.freeze(bound.map(({ name, description, inputSchema }) => Object.freeze({
|
|
2963
2963
|
name,
|
|
2964
|
-
|
|
2965
|
-
|
|
2964
|
+
description,
|
|
2965
|
+
inputSchema
|
|
2966
2966
|
})));
|
|
2967
2967
|
},
|
|
2968
2968
|
bind(tools) {
|
|
@@ -3142,6 +3142,7 @@ function buildSupervisorAgent(profile, deps, testBrain) {
|
|
|
3142
3142
|
onCoordinationTools: (tools) => slot.bind(tools)
|
|
3143
3143
|
});
|
|
3144
3144
|
ledger = mcp;
|
|
3145
|
+
const coordinationTools = slot.descriptors();
|
|
3145
3146
|
try {
|
|
3146
3147
|
const baseTokensLeft = scope.budget.tokensLeft;
|
|
3147
3148
|
const contractDeclared = deps.deliverable !== void 0;
|
|
@@ -3169,11 +3170,7 @@ function buildSupervisorAgent(profile, deps, testBrain) {
|
|
|
3169
3170
|
scope,
|
|
3170
3171
|
coordinationMcpUrl: mcp.url,
|
|
3171
3172
|
stopSignal: stopController.signal,
|
|
3172
|
-
coordinationTools
|
|
3173
|
-
name,
|
|
3174
|
-
description,
|
|
3175
|
-
inputSchema
|
|
3176
|
-
}))
|
|
3173
|
+
coordinationTools
|
|
3177
3174
|
});
|
|
3178
3175
|
} catch (error) {
|
|
3179
3176
|
if (!mcp.submittedResult() && !mcp.isStopped()) throw error;
|
|
@@ -3819,10 +3816,9 @@ function unmountedCoordinationTools(profile) {
|
|
|
3819
3816
|
* question and 404s `no backend matches model "…"`. FAIL CLOSED: any answer that is not a route
|
|
3820
3817
|
* refuses, including a transport error or an unexpected status, because a pre-flight that skips
|
|
3821
3818
|
* itself on an error is the silent admission it exists to remove.
|
|
3822
|
-
* - `bridge-full` — `GET /health`
|
|
3823
|
-
*
|
|
3824
|
-
*
|
|
3825
|
-
* evidence that the bridge is full and admits the spawn.
|
|
3819
|
+
* - `bridge-full` — `GET /health` checks the bulk lane that an unreserved Runtime request uses.
|
|
3820
|
+
* Older bridges fall back to the overall admission counters. Capacity is advisory, so only a
|
|
3821
|
+
* positive reading of fullness refuses the spawn.
|
|
3826
3822
|
*/
|
|
3827
3823
|
function bridgeSpawnPreflight(seam) {
|
|
3828
3824
|
return async (profile) => {
|
|
@@ -3839,12 +3835,12 @@ function bridgeSpawnPreflight(seam) {
|
|
|
3839
3835
|
const routeRefusal = await bridgeModelRouteRefusal(seam, wireModel);
|
|
3840
3836
|
if (routeRefusal !== void 0) return {
|
|
3841
3837
|
cause: "model-route",
|
|
3842
|
-
detail: routeRefusal
|
|
3838
|
+
detail: routeRefusal.detail
|
|
3843
3839
|
};
|
|
3844
|
-
const
|
|
3845
|
-
if (
|
|
3840
|
+
const admissionRefusal = await bridgeAdmissionRefusal(seam);
|
|
3841
|
+
if (admissionRefusal !== void 0) return {
|
|
3846
3842
|
cause: "bridge-full",
|
|
3847
|
-
detail:
|
|
3843
|
+
detail: admissionRefusal
|
|
3848
3844
|
};
|
|
3849
3845
|
};
|
|
3850
3846
|
}
|
|
@@ -3932,6 +3928,14 @@ function driveHarnessFromBackend(backend, executionId, now = Date.now, maxTurns)
|
|
|
3932
3928
|
};
|
|
3933
3929
|
const meterPending = async (forceUnknown = false) => {
|
|
3934
3930
|
if (pendingUsage.length === 0) return;
|
|
3931
|
+
for (;;) {
|
|
3932
|
+
if ((runtimeOwnedExecutorProviderEvidence(executor)?.attempts[meteredProviderAttempts])?.providerDispatch !== "not_started") break;
|
|
3933
|
+
await meterRuntimeOwnedProviderAttempt(scope, zeroSpend(), providerEvidenceForNextMeter(), {
|
|
3934
|
+
role: "driver",
|
|
3935
|
+
runtime: executor.runtime,
|
|
3936
|
+
telemetry: "known-zero-before-dispatch"
|
|
3937
|
+
});
|
|
3938
|
+
}
|
|
3935
3939
|
const batch = pendingUsage;
|
|
3936
3940
|
pendingUsage = [];
|
|
3937
3941
|
const measured = spendFromUsageEvents(batch);
|
|
@@ -4058,11 +4062,13 @@ function driveHarnessFromBackend(backend, executionId, now = Date.now, maxTurns)
|
|
|
4058
4062
|
}
|
|
4059
4063
|
if (failed && started && !terminalAccountingCaptured) try {
|
|
4060
4064
|
for (;;) {
|
|
4061
|
-
|
|
4062
|
-
|
|
4065
|
+
const evidence = runtimeOwnedExecutorProviderEvidence(executor);
|
|
4066
|
+
if ((evidence?.attempts.length ?? 0) <= meteredProviderAttempts) break;
|
|
4067
|
+
const providerDispatchDidNotStart = evidence?.attempts[meteredProviderAttempts]?.providerDispatch === "not_started";
|
|
4068
|
+
await meterRuntimeOwnedProviderAttempt(scope, providerDispatchDidNotStart ? zeroSpend() : unmeteredSpend(0), providerEvidenceForNextMeter(), {
|
|
4063
4069
|
role: "driver",
|
|
4064
4070
|
runtime: executor.runtime,
|
|
4065
|
-
telemetry: "unknown-after-failure"
|
|
4071
|
+
telemetry: providerDispatchDidNotStart ? "known-zero-before-dispatch" : "unknown-after-failure"
|
|
4066
4072
|
});
|
|
4067
4073
|
}
|
|
4068
4074
|
if (meteredProviderAttempts === 0) await meterRuntimeOwnedProviderAttempt(scope, unmeteredSpend(0), providerEvidenceForNextMeter(), {
|
|
@@ -4823,4 +4829,4 @@ function rootProviderModelEvidenceFromExecution(evidence) {
|
|
|
4823
4829
|
//#endregion
|
|
4824
4830
|
export { createDelegateHandler as $, DELEGATION_STATUS_INPUT_SCHEMA as A, DELEGATE_UI_AUDIT_DESCRIPTION as B, DriverAttemptsExhaustedError as C, createInProcessTransport as D, serveCoordinationMcp as E, DELEGATION_HISTORY_INPUT_SCHEMA as F, DELEGATE_FEEDBACK_DESCRIPTION as G, DELEGATE_UI_AUDIT_TOOL_NAME as H, DELEGATION_HISTORY_TOOL_NAME as I, createDelegateFeedbackHandler as J, DELEGATE_FEEDBACK_INPUT_SCHEMA as K, createDelegationHistoryHandler as L, createDelegationStatusHandler as M, validateDelegationStatusArgs as N, createMcpServer as O, DELEGATION_HISTORY_DESCRIPTION as P, DELEGATE_TOOL_NAME as Q, validateDelegationHistoryArgs as R, supervisorPolicyPrompt as S, defaultUnmetContractSteer as T, createDelegateUiAuditHandler as U, DELEGATE_UI_AUDIT_INPUT_SCHEMA as V, validateDelegateUiAuditArgs as W, DELEGATE_DESCRIPTION as X, validateDelegateFeedbackArgs as Y, DELEGATE_INPUT_SCHEMA as Z, dumbContinuationPassPrompt as _, createSupervisorSpanRecorder as _t, isPreSpawnExecutorFailure as a, DELEGATION_TRACE_MAX_BYTES as at, naiveContinuationPrompt as b, withWorkerSpawnRetry as c, capDelegationTrace as ct, supervisorAgent as d, DelegationPersistenceError as dt, validateDelegateArgs as et, supervisorAgentWithTestBrain as f, DelegationStateCorruptError as ft, dumbContinuationFailPrompt as g, eventToSnapshot as gt, delegatesWorkerBriefPrompt as h, InMemoryFeedbackStore as ht, workerFromBackend as i, hashIdempotencyInput as it, DELEGATION_STATUS_TOOL_NAME as j, DELEGATION_STATUS_DESCRIPTION as k, assertCoordinationBinding as l, composeLoopTraceEmitters as lt, createPromptRegistry as m, InMemoryDelegationStore as mt, supervise as n, delegate as nt, resolveWorkerSpawnRetry as o, DELEGATION_TRACE_MAX_SPANS as ot, analyzesFindingsReportPrompt as p, FileDelegationStore as pt, DELEGATE_FEEDBACK_TOOL_NAME as q, superviseWithTestBrain as r, DelegationTaskQueue as rt, retryPreSpawnRefusals as s, buildDelegationTraceSpans as st, DEFAULT_AUTHORED_PROFILE_SECURITY_POLICY as t, defaultDelegateBudget as tt, resolveSupervisorProfile as u, createDelegationTraceCollector as ut, formatPromptHandle as v, gateOnDeliverable as vt, classifyDriverFailure as w, promptHandle as x, kernelPromptRegistry as y, mapExecutorResult as yt, delegationProfiles as z };
|
|
4825
4831
|
|
|
4826
|
-
//# sourceMappingURL=supervise-
|
|
4832
|
+
//# sourceMappingURL=supervise-Dj6zd2C7.js.map
|