@tangle-network/agent-runtime 9.0.0 → 9.0.2
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/CHANGELOG.md +14 -0
- package/dist/{activation-jAPhmkOb.js → activation-BrBDs0Yj.js} +2 -2
- package/dist/{activation-jAPhmkOb.js.map → activation-BrBDs0Yj.js.map} +1 -1
- package/dist/{activation-Cvw_7nrn.d.ts → activation-CoVktVKr.d.ts} +2 -2
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +2 -2
- package/dist/{coordination-manager-T9_VZ_Gh.js → coordination-manager-DKmQGzBB.js} +3 -3
- package/dist/{coordination-manager-T9_VZ_Gh.js.map → coordination-manager-DKmQGzBB.js.map} +1 -1
- package/dist/{delegate-BCMyrm5n.js → delegate-CHGMIC6s.js} +2 -2
- package/dist/{delegate-BCMyrm5n.js.map → delegate-CHGMIC6s.js.map} +1 -1
- package/dist/durable.d.ts +1 -1
- package/dist/durable.js +4 -4
- package/dist/{graph-CajniLnc.js → graph-BRlI0CEL.js} +12 -14
- package/dist/graph-BRlI0CEL.js.map +1 -0
- package/dist/{graph-registry-D3cY0BJU.js → graph-registry-D0FE9VpR.js} +2 -1
- package/dist/graph-registry-D0FE9VpR.js.map +1 -0
- package/dist/{graph-registry-DTeb6qhB.js → graph-registry-Dbm8QhbA.js} +1 -1
- package/dist/{improve-Bv419bnu.js → improve-CnTEGkF6.js} +5 -5
- package/dist/{improve-Bv419bnu.js.map → improve-CnTEGkF6.js.map} +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +8 -8
- package/dist/intelligence.d.ts +2 -2
- package/dist/intelligence.js +3 -3
- package/dist/kernel.d.ts +1 -1
- package/dist/kernel.js +11 -11
- package/dist/{loop-runner-DaMM2vSj.js → loop-runner-CqPsP7uW.js} +2 -2
- package/dist/{loop-runner-DaMM2vSj.js.map → loop-runner-CqPsP7uW.js.map} +1 -1
- package/dist/{loop-runner-Bd9Ieh5w.d.ts → loop-runner-DZeXWH78.d.ts} +2 -2
- package/dist/loop-runner-bin.d.ts +1 -1
- package/dist/loop-runner-bin.js +1 -1
- package/dist/mcp/bin.js +2 -2
- package/dist/mcp/index.d.ts +1 -1
- package/dist/mcp/index.js +4 -4
- package/dist/profiles.d.ts +1 -1
- package/dist/{provision-supervisor-mJuBx86X.js → provision-supervisor-B-ULubUf.js} +3 -3
- package/dist/{provision-supervisor-mJuBx86X.js.map → provision-supervisor-B-ULubUf.js.map} +1 -1
- package/dist/{run-state-ZjIxcjfp.js → run-state-nbF5NNGy.js} +2 -2
- package/dist/{run-state-ZjIxcjfp.js.map → run-state-nbF5NNGy.js.map} +1 -1
- package/dist/{runtime-C-G9MAGo.js → runtime-9ZCcT0kP.js} +13 -13
- package/dist/{runtime-C-G9MAGo.js.map → runtime-9ZCcT0kP.js.map} +1 -1
- package/dist/{search-executor-D3la0D_r.js → search-executor-2xqDTDNO.js} +2 -2
- package/dist/{search-executor-D3la0D_r.js.map → search-executor-2xqDTDNO.js.map} +1 -1
- package/dist/{server-CrckVQDt.js → server-D3RV-84X.js} +2 -2
- package/dist/{server-CrckVQDt.js.map → server-D3RV-84X.js.map} +1 -1
- package/dist/{structural-rollout-U49dEq3i.js → structural-rollout-BHNqBUV0.js} +6 -3
- package/dist/structural-rollout-BHNqBUV0.js.map +1 -0
- package/dist/{supervise-CSB-Kl6S.js → supervise-CULDLjjS.js} +4 -4
- package/dist/{supervise-CSB-Kl6S.js.map → supervise-CULDLjjS.js.map} +1 -1
- package/dist/{supervisor-K2sskHJV.js → supervisor-BhcXPxAk.js} +35 -28
- package/dist/supervisor-BhcXPxAk.js.map +1 -0
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +11 -11
- package/dist/tui/index.d.ts +1 -1
- package/dist/tui/index.js +1 -1
- package/dist/{types-CwGD-823.d.ts → types-CTp7j9jD.d.ts} +167 -159
- package/package.json +2 -2
- package/dist/graph-CajniLnc.js.map +0 -1
- package/dist/graph-registry-D3cY0BJU.js.map +0 -1
- package/dist/structural-rollout-U49dEq3i.js.map +0 -1
- package/dist/supervisor-K2sskHJV.js.map +0 -1
|
@@ -6959,14 +6959,8 @@ function createInPlaceCliExecutor(options) {
|
|
|
6959
6959
|
});
|
|
6960
6960
|
const result = await running;
|
|
6961
6961
|
const spent = {
|
|
6962
|
-
|
|
6963
|
-
|
|
6964
|
-
input: 0,
|
|
6965
|
-
output: 0
|
|
6966
|
-
},
|
|
6967
|
-
tokensKnown: false,
|
|
6968
|
-
usd: 0,
|
|
6969
|
-
ms: Date.now() - started
|
|
6962
|
+
...unmeteredSpend(Date.now() - started),
|
|
6963
|
+
iterations: 1
|
|
6970
6964
|
};
|
|
6971
6965
|
const exit = result.harness;
|
|
6972
6966
|
const failed = exit.exitCode !== 0 || exit.timedOut;
|
|
@@ -7145,7 +7139,7 @@ function createWorktreeCliExecutor(options) {
|
|
|
7145
7139
|
},
|
|
7146
7140
|
...usage ? {} : { tokensKnown: false },
|
|
7147
7141
|
usd: 0,
|
|
7148
|
-
|
|
7142
|
+
usdKnown: false,
|
|
7149
7143
|
ms: Date.now() - started
|
|
7150
7144
|
};
|
|
7151
7145
|
artifact = {
|
|
@@ -7498,13 +7492,6 @@ async function captureBeforeDestroy(scope, target, signal) {
|
|
|
7498
7492
|
if (capture.status === "captured") state.harnessTranscript = capture;
|
|
7499
7493
|
}
|
|
7500
7494
|
}
|
|
7501
|
-
// src/runtime/environment-provider/provider-validation-error.ts
|
|
7502
|
-
var ValidationError = class extends Error {
|
|
7503
|
-
constructor(message, options) {
|
|
7504
|
-
super(message, options);
|
|
7505
|
-
this.name = "ValidationError";
|
|
7506
|
-
}
|
|
7507
|
-
};
|
|
7508
7495
|
// src/runtime/environment-provider/provider-event-projection.ts
|
|
7509
7496
|
function sandboxEventFromEnvironmentEvent(event) {
|
|
7510
7497
|
const normalized = event.normalized;
|
|
@@ -7751,28 +7738,41 @@ function resultFromEvents(events, fallbackText) {
|
|
|
7751
7738
|
events
|
|
7752
7739
|
};
|
|
7753
7740
|
}
|
|
7754
|
-
/**
|
|
7741
|
+
/** A non-JSON final message settles the fenced block ending it; trailing text keeps it refused. */
|
|
7742
|
+
function finalJsonValue(text) {
|
|
7743
|
+
if (text === void 0) return "";
|
|
7744
|
+
try {
|
|
7745
|
+
JSON.parse(text);
|
|
7746
|
+
return text;
|
|
7747
|
+
} catch {}
|
|
7748
|
+
return /```(?:json)?[ \t]*\r?\n((?:(?!```)[\s\S])*)```\s*$/i.exec(text)?.[1] ?? text;
|
|
7749
|
+
}
|
|
7750
|
+
/** Decode only the final assistant message, keeping the stream as evidence. A stream not wholly
|
|
7751
|
+
* read is refused, not left pending: no later read completes an ended turn's stream. */
|
|
7755
7752
|
function jsonResultFromEvents(events) {
|
|
7756
|
-
if (events.some((event) => event.type === "result" && event.data.eventStreamComplete === false))
|
|
7753
|
+
if (events.some((event) => event.type === "result" && event.data.eventStreamComplete === false)) return refusedJson("complete native event observation is required");
|
|
7757
7754
|
const projected = events.map(sandboxEventFromEnvironmentEvent);
|
|
7758
7755
|
const text = collectAgentFinalMessageText(projected) ?? (projected.some(isToolBearingEvent) ? void 0 : collectAgentResponseText(projected));
|
|
7759
7756
|
try {
|
|
7760
|
-
return { out: JSON.parse(text
|
|
7757
|
+
return { out: JSON.parse(finalJsonValue(text), (_key, value) => {
|
|
7761
7758
|
if (typeof value === "number" && !Number.isFinite(value)) throw new SyntaxError("JSON number is not finite");
|
|
7762
7759
|
return value;
|
|
7763
7760
|
}) };
|
|
7764
7761
|
} catch (error) {
|
|
7765
7762
|
if (!(error instanceof SyntaxError)) throw error;
|
|
7766
|
-
return {
|
|
7767
|
-
out: null,
|
|
7768
|
-
outcome: {
|
|
7769
|
-
success: false,
|
|
7770
|
-
error: `provider JSON output: ${text === void 0 ? "missing final assistant message" : "invalid final assistant JSON"}; return only a JSON value after tool use`,
|
|
7771
|
-
errorCode: "RUNTIME_OUTPUT_FORMAT_INVALID"
|
|
7772
|
-
}
|
|
7773
|
-
};
|
|
7763
|
+
return refusedJson(`${text === void 0 ? "missing final assistant message" : "invalid final assistant JSON"}; return only a JSON value after tool use`);
|
|
7774
7764
|
}
|
|
7775
7765
|
}
|
|
7766
|
+
function refusedJson(reason) {
|
|
7767
|
+
return {
|
|
7768
|
+
out: null,
|
|
7769
|
+
outcome: {
|
|
7770
|
+
success: false,
|
|
7771
|
+
error: `provider JSON output: ${reason}`,
|
|
7772
|
+
errorCode: "RUNTIME_OUTPUT_FORMAT_INVALID"
|
|
7773
|
+
}
|
|
7774
|
+
};
|
|
7775
|
+
}
|
|
7776
7776
|
function textFromEnvironmentEvent(event) {
|
|
7777
7777
|
if (event.normalized?.type === "message.part.updated") return typeof event.normalized.delta === "string" ? event.normalized.delta : "";
|
|
7778
7778
|
const data = event.data;
|
|
@@ -8120,6 +8120,13 @@ var RetainedObservation = class {
|
|
|
8120
8120
|
}
|
|
8121
8121
|
}
|
|
8122
8122
|
};
|
|
8123
|
+
// src/runtime/environment-provider/provider-validation-error.ts
|
|
8124
|
+
var ValidationError = class extends Error {
|
|
8125
|
+
constructor(message, options) {
|
|
8126
|
+
super(message, options);
|
|
8127
|
+
this.name = "ValidationError";
|
|
8128
|
+
}
|
|
8129
|
+
};
|
|
8123
8130
|
// src/runtime/environment-provider/provider-turn-input.ts
|
|
8124
8131
|
/**
|
|
8125
8132
|
* Lower the seam's prompt options onto turn fields, through the one mapper this module already
|
|
@@ -16216,4 +16223,4 @@ async function noWinner(settled, rejection) {
|
|
|
16216
16223
|
}
|
|
16217
16224
|
export { AUTHORITY_MARKERS as $, readSandboxOutcome as $t, readPromptOptions as A, createPushTraceSource as At, toolResultText as B, assertProfileMaterializes as Bt, captureReusableExecutorConfig as C, bridgeModelRouteRefusal as Ct, createSteerableSandboxSession as D, createCodexRolloutStoreReader as Dt, DEFAULT_SANDBOX_STEERING_MAX_TURNS as E, addHarnessUsage as Et, defaultSelectWinner as F, runWorktreeHarness as Ft, providerAsExecutor as G, promptControlProfileMaterialization as Gt, routerBrain as H, defineProfileMaterializationContract as Ht, codeModeArguments as I, LOCAL_HARNESSES as It, createWorktreeCliExecutor as J, sandboxActProfileMaterialization as Jt, LEAF_CONTINUATION_TASK as K, promptModelProfileMaterialization as Kt, codeModeModelOutput as L, harnessInvocation as Lt, createSandboxLineage as M, bridgeStopSignalKey as Mt, acquireSandbox as N, defaultRunCommand as Nt, runAgentRounds as O, harnessUsageIsEmpty as Ot, TERMINAL_DECISIONS as P, runSettledCommand as Pt, failPendingAfter as Q, projectSandboxOutcome as Qt, createCodeModeTools as R, terminateProcessTreeAndConfirm as Rt, bindReusableExecutorExecutionId as S, bridgeAdmissionRefusal as St, snapshotExecutorConfig as T, ROUTER_PRICE_SOURCE as Tt, createAgentEnvironmentProviderRegistry as U, fullProfileMaterialization as Ut, createRouterTranscript as V, controlProfileMaterialization as Vt, resolveAgentEnvironmentProvider as W, profileMaterializationAxes$1 as Wt, INBOX_RECEIPT_KEY as X, unsupportedProfileDimensions as Xt, createInPlaceCliExecutor as Y, sandboxProfileMaterialization as Yt, createInbox as Z, worktreeCliProfileMaterialization as Zt, isDriverSpec as _, CheckUnavailableError as _t, assertRunParking as a, peerMailTools as at, InMemorySpawnJournal as b, mapExecutorResult as bt, readRunParking as c, DriverAttemptsExhaustedError as ct, bestDelivered as d, classifyDriverFailure as dt, DEFAULT_PEER_MAIL_LIMITS as et, runFinalizer as f, summarizeDriverAttempts as ft, driverExecutorFactory as g, preflightPublicCoordination as gt, driverChild as h, upstreamUnavailableSignal as ht, RunParkedError as i, isPeerMailEnvelope as it, createSandboxForSpec as j, bridgeRuntimeAttachmentsKey as jt, assertBoxlessPromptOptions as k, readCodexRolloutSession as kt, sleepScopeWait as l, HarnessTurnFailedError as lt, createRootHandle as m, undispatchedCredentialExit as mt, createSupervisor as n, claimsAuthority as nt, bindScopeParkingDrain as o, peerMailVerbNames as ot, runTree as p, transientFailureKind as pt, providerAsSandboxClient as q, renderUnsupported as qt, assertResumeLimits as r, createPeerMailbox as rt, isRunParked as s, taskToPrompt$1 as st, DEFAULT_MAX_DEPTH as t, PEER_MAIL_WIRE_KEY as tt, withRunParking as u, abandonablePending as ut, withDriverExecutor as v, gateFactoryOnDeliverable as vt, createExecutor as w, priceTokens as wt, createExecutorRegistry as x, verdictFromJudgeScore as xt, InMemoryResultBlobStore as y, gateOnDeliverable as yt, runCodeMode as z, assertProfileMaterialization as zt };
|
|
16218
16225
|
|
|
16219
|
-
//# sourceMappingURL=supervisor-
|
|
16226
|
+
//# sourceMappingURL=supervisor-BhcXPxAk.js.map
|