@tangle-network/agent-runtime 10.0.15 → 10.0.16
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 +12 -0
- package/dist/{activation-BmdINnh5.d.ts → activation-BJK66rbO.d.ts} +2 -2
- package/dist/{activation-b0nzPqca.js → activation-Lp7hDvJr.js} +2 -2
- package/dist/{activation-b0nzPqca.js.map → activation-Lp7hDvJr.js.map} +1 -1
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +4 -4
- package/dist/{continuation-Bccak14N.js → continuation-CDdjAkpk.js} +2 -2
- package/dist/{continuation-Bccak14N.js.map → continuation-CDdjAkpk.js.map} +1 -1
- package/dist/{coordination-map-routing-XZXTlCmn.js → coordination-map-routing-DovTCk1Y.js} +2 -2
- package/dist/{coordination-map-routing-XZXTlCmn.js.map → coordination-map-routing-DovTCk1Y.js.map} +1 -1
- package/dist/{delegate-CLaWDfML.js → delegate-BGsCSjPF.js} +2 -2
- package/dist/{delegate-CLaWDfML.js.map → delegate-BGsCSjPF.js.map} +1 -1
- package/dist/{driver-control-acknowledgers-NPX-VWeS.js → driver-control-acknowledgers-DOORX1XQ.js} +10 -10
- package/dist/{driver-control-acknowledgers-NPX-VWeS.js.map → driver-control-acknowledgers-DOORX1XQ.js.map} +1 -1
- package/dist/durable-writer-thread.js +4 -4
- package/dist/durable.d.ts +2 -1
- package/dist/durable.js +18 -16
- package/dist/durable.js.map +1 -1
- package/dist/{failure-cause-B2TBXIu-.js → failure-cause-DTXwfv7t.js} +12 -4
- package/dist/{failure-cause-B2TBXIu-.js.map → failure-cause-DTXwfv7t.js.map} +1 -1
- package/dist/{graph-B2OzHayc.js → graph-3l4oJsP4.js} +10 -10
- package/dist/{graph-B2OzHayc.js.map → graph-3l4oJsP4.js.map} +1 -1
- package/dist/{graph-registry-BmghD_VO.js → graph-registry-SgsCxCTZ.js} +5 -5
- package/dist/{graph-registry-BmghD_VO.js.map → graph-registry-SgsCxCTZ.js.map} +1 -1
- package/dist/{graph-registry-DQ2-dA0X.js → graph-registry-aMRd94PD.js} +1 -1
- package/dist/{improve-dYbnuXC8.js → improve-BC13IKeQ.js} +8 -8
- package/dist/{improve-dYbnuXC8.js.map → improve-BC13IKeQ.js.map} +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +12 -12
- package/dist/intelligence.d.ts +2 -2
- package/dist/intelligence.js +5 -5
- package/dist/{jsonl-file-vE9H9UXa.js → jsonl-file-B8xfYz9M.js} +14 -3
- package/dist/{jsonl-file-vE9H9UXa.js.map → jsonl-file-B8xfYz9M.js.map} +1 -1
- package/dist/kernel.d.ts +1 -1
- package/dist/kernel.js +19 -19
- package/dist/{loop-runner-UfFomLu5.js → loop-runner-CeOM1ppe.js} +2 -2
- package/dist/{loop-runner-UfFomLu5.js.map → loop-runner-CeOM1ppe.js.map} +1 -1
- package/dist/loop-runner-bin.d.ts +1 -1
- package/dist/loop-runner-bin.js +1 -1
- package/dist/{loop-runner-AQcWx9uu.d.ts → loop-runner-qtiWaXdo.d.ts} +2 -2
- package/dist/mcp/bin.js +3 -3
- package/dist/mcp/index.d.ts +1 -1
- package/dist/mcp/index.js +7 -7
- package/dist/mcp/memory-bin.js +1 -1
- package/dist/{model-policy-DTbTFyOG.js → model-policy-DFuhCC0-.js} +27 -2
- package/dist/model-policy-DFuhCC0-.js.map +1 -0
- package/dist/profiles.d.ts +1 -1
- package/dist/profiles.js +1 -1
- package/dist/{provision-supervisor-DSDkye8b.js → provision-supervisor-BbJEoPmX.js} +8 -8
- package/dist/{provision-supervisor-DSDkye8b.js.map → provision-supervisor-BbJEoPmX.js.map} +1 -1
- package/dist/{result-blob-store-nBpCKwFg.js → result-blob-store-CyfreDyt.js} +4 -4
- package/dist/{result-blob-store-nBpCKwFg.js.map → result-blob-store-CyfreDyt.js.map} +1 -1
- package/dist/{run-cancellation-BYnz8GlN.js → run-cancellation-CtDpDxro.js} +2 -2
- package/dist/{run-cancellation-BYnz8GlN.js.map → run-cancellation-CtDpDxro.js.map} +1 -1
- package/dist/{run-lock-Ckakh1Uq.js → run-lock-BOg7BaXF.js} +2 -2
- package/dist/{run-lock-Ckakh1Uq.js.map → run-lock-BOg7BaXF.js.map} +1 -1
- package/dist/{run-reopen-CQjs4kpp.js → run-reopen-DUdBD2Pc.js} +6 -6
- package/dist/{run-reopen-CQjs4kpp.js.map → run-reopen-DUdBD2Pc.js.map} +1 -1
- package/dist/{run-state-DI59zWDh.js → run-state-CiBZNBWb.js} +7 -7
- package/dist/{run-state-DI59zWDh.js.map → run-state-CiBZNBWb.js.map} +1 -1
- package/dist/{runtime-DZupdBai.js → runtime-B0TvwqD7.js} +45 -22
- package/dist/{runtime-DZupdBai.js.map → runtime-B0TvwqD7.js.map} +1 -1
- package/dist/{search-executor-DXKX36KX.js → search-executor-Bj6UWrEt.js} +5 -5
- package/dist/{search-executor-DXKX36KX.js.map → search-executor-Bj6UWrEt.js.map} +1 -1
- package/dist/{server-db_tgJ2j.js → server-N0qXiAuK.js} +4 -4
- package/dist/{server-db_tgJ2j.js.map → server-N0qXiAuK.js.map} +1 -1
- package/dist/{settle-record-DV7zCjhI.js → settle-record-DpNzbua7.js} +5 -4
- package/dist/{settle-record-DV7zCjhI.js.map → settle-record-DpNzbua7.js.map} +1 -1
- package/dist/{snapshot-BKI_w3JD.js → snapshot-BKLziJ5K.js} +12 -4
- package/dist/snapshot-BKLziJ5K.js.map +1 -0
- package/dist/{structural-rollout-BgGJOWEx.js → structural-rollout-QbwCbL0d.js} +5 -5
- package/dist/{structural-rollout-BgGJOWEx.js.map → structural-rollout-QbwCbL0d.js.map} +1 -1
- package/dist/{supervise-jfYp4dyB.js → supervise-CP4Vx2s5.js} +72 -37
- package/dist/supervise-CP4Vx2s5.js.map +1 -0
- package/dist/{supervise-identity-uI2Ke-Mm.js → supervise-identity-Cub-gKEi.js} +4 -4
- package/dist/{supervise-identity-uI2Ke-Mm.js.map → supervise-identity-Cub-gKEi.js.map} +1 -1
- package/dist/{supervision-discovery-CHRT0UXq.js → supervision-discovery-C633ZhS0.js} +4 -4
- package/dist/{supervision-discovery-CHRT0UXq.js.map → supervision-discovery-C633ZhS0.js.map} +1 -1
- package/dist/{supervisor-BVtN_Szy.js → supervisor-CYm4Nj9s.js} +14 -11
- package/dist/supervisor-CYm4Nj9s.js.map +1 -0
- package/dist/{supervisor-accounting--LFd8H4U.js → supervisor-accounting-BeQ8kv9H.js} +5 -5
- package/dist/{supervisor-accounting--LFd8H4U.js.map → supervisor-accounting-BeQ8kv9H.js.map} +1 -1
- package/dist/{supervisor-root-contract-xlqe8DE1.js → supervisor-root-contract-DKIxXap1.js} +3 -3
- package/dist/{supervisor-root-contract-xlqe8DE1.js.map → supervisor-root-contract-DKIxXap1.js.map} +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +11 -11
- package/dist/{tool-server-B_cNseNf.js → tool-server-B4TikIBL.js} +2 -2
- package/dist/{tool-server-B_cNseNf.js.map → tool-server-B4TikIBL.js.map} +1 -1
- package/dist/{top-web-CRmycSiU.js → top-web-D57bqE7a.js} +23 -18
- package/dist/top-web-D57bqE7a.js.map +1 -0
- package/dist/tui/bin.js +3 -3
- package/dist/tui/index.d.ts +3 -2
- package/dist/tui/index.js +2 -2
- package/dist/{types-Br9sWTWk.d.ts → types-CbvBgzJB.d.ts} +17 -10
- package/package.json +3 -2
- package/dist/model-policy-DTbTFyOG.js.map +0 -1
- package/dist/snapshot-BKI_w3JD.js.map +0 -1
- package/dist/supervise-jfYp4dyB.js.map +0 -1
- package/dist/supervisor-BVtN_Szy.js.map +0 -1
- package/dist/top-web-CRmycSiU.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { m as ValidationError, r as BackendTransportError, t as AgentEvalError } from "./errors-DG8yufqX.js";
|
|
2
2
|
import { A as withBudgetResources, C as unreportedSpend, D as addResourceSpend, E as zeroTokenUsage, O as assertResources, T as zeroSpend, i as chargedTokens, l as fnv1a32Hex, m as promptCacheTokenClasses, n as addSpend, o as cloneTokenUsage, r as addTokenUsage, u as hasCompleteCacheBreakdown } from "./util-qsH5cC9S.js";
|
|
3
|
-
import { a as errMessage, i as causeChain, n as detachedSnapshot, s as errorProperty } from "./snapshot-
|
|
3
|
+
import { a as errMessage, d as providerTraceIdPattern, i as causeChain, n as detachedSnapshot, s as errorProperty, u as providerTraceId } from "./snapshot-BKLziJ5K.js";
|
|
4
4
|
import { AgentTurnResultSchema, CanonicalStreamEventSchema, RuntimeEventEnvelopeSchema } from "@tangle-network/agent-interface";
|
|
5
5
|
import { isRecord } from "@tangle-network/agent-core";
|
|
6
6
|
import { collectAgentFinalMessageText, collectAgentResponseText } from "@tangle-network/sandbox";
|
|
@@ -3025,6 +3025,8 @@ const runtimeFailureCauseSchema = z.object({
|
|
|
3025
3025
|
cause: z.string().max(MAX_CAUSE_CHARS),
|
|
3026
3026
|
/** The upstream or provider machine code the failure carried, when it carried one. */
|
|
3027
3027
|
providerCode: z.string().regex(MACHINE_CODE_PATTERN).optional(),
|
|
3028
|
+
/** The upstream request's trace ID, copied from the provider error. */
|
|
3029
|
+
providerTraceId: z.string().regex(providerTraceIdPattern).optional(),
|
|
3028
3030
|
/** The HTTP status the provider's typed error carried with that code. */
|
|
3029
3031
|
providerStatus: z.number().int().min(100).max(599).optional(),
|
|
3030
3032
|
/** The provider's typed retry-after hint, in milliseconds. A hint, never an automatic retry. */
|
|
@@ -3157,6 +3159,7 @@ function runtimeFailureCause(error, context = {}) {
|
|
|
3157
3159
|
try {
|
|
3158
3160
|
const links = causeChain(error);
|
|
3159
3161
|
const providerCode = upstreamMachineCode(links);
|
|
3162
|
+
const traceId = providerTraceId(links);
|
|
3160
3163
|
const upstream = links.find((link) => link instanceof BackendTransportError && link.backend === "bridge" && link.status === 403 && link.upstreamCode === "subscription_required" && link.providerDispatch === "not_started");
|
|
3161
3164
|
const remedy = runtimeFailureRemediationSchema.readonly().safeParse(upstream?.remediation ?? turnRemediationOf(error));
|
|
3162
3165
|
const failure = ({ code, owner }) => ({
|
|
@@ -3164,6 +3167,7 @@ function runtimeFailureCause(error, context = {}) {
|
|
|
3164
3167
|
owner,
|
|
3165
3168
|
cause,
|
|
3166
3169
|
...providerCode === void 0 ? {} : { providerCode },
|
|
3170
|
+
...traceId === void 0 ? {} : { providerTraceId: traceId },
|
|
3167
3171
|
...upstreamResponse(links, providerCode),
|
|
3168
3172
|
...code === "credential-refused" && providerCode === "subscription_required" && remedy.success ? { remediation: remedy.data } : {}
|
|
3169
3173
|
});
|
|
@@ -3228,6 +3232,10 @@ function reportedFailureCause(outcome) {
|
|
|
3228
3232
|
*/
|
|
3229
3233
|
function settlementFailureCause(down) {
|
|
3230
3234
|
const cause = errMessage(down.reason).slice(0, MAX_CAUSE_CHARS);
|
|
3235
|
+
const providerEvidence = {
|
|
3236
|
+
...down.failure?.providerCode === void 0 ? {} : { providerCode: down.failure.providerCode },
|
|
3237
|
+
...down.failure?.providerTraceId === void 0 ? {} : { providerTraceId: down.failure.providerTraceId }
|
|
3238
|
+
};
|
|
3231
3239
|
if (down.retainedPendingCause !== void 0) {
|
|
3232
3240
|
const retained = retainedFailures[down.retainedPendingCause];
|
|
3233
3241
|
if (down.failure !== void 0 && down.failure.code === retained.code) return {
|
|
@@ -3237,7 +3245,7 @@ function settlementFailureCause(down) {
|
|
|
3237
3245
|
return {
|
|
3238
3246
|
...retained,
|
|
3239
3247
|
cause,
|
|
3240
|
-
...
|
|
3248
|
+
...providerEvidence
|
|
3241
3249
|
};
|
|
3242
3250
|
}
|
|
3243
3251
|
if (down.failure !== void 0 && down.failure.code !== "unknown") return {
|
|
@@ -3250,9 +3258,9 @@ function settlementFailureCause(down) {
|
|
|
3250
3258
|
owner: "work"
|
|
3251
3259
|
} : UNATTRIBUTED,
|
|
3252
3260
|
cause,
|
|
3253
|
-
...
|
|
3261
|
+
...providerEvidence
|
|
3254
3262
|
};
|
|
3255
3263
|
}
|
|
3256
3264
|
export { refreshBudgetLease as $, unavailableSignalOfFailure as A, recordValue as At, runtimeFailureRemediationSchema as B, cappedDoublingMs as C, sameModelId as Ct, reportedResetAt as D, sumSandboxUsage as Dt, printedStatus as E, sandboxTerminalUsageField as Et, contentRef as F, credentialCommandExit as G, turnFailurePolicy as H, executorFailure as I, budgetLeaseUpdates as J, isCredentialRefusal as K, executorFailureInfra as L, TRACE_SUMMARY_SCHEMA as M, traceRootWriter as N, unavailablePauseMs as O, decodeHarnessUsage as Ot, contentAddress as P, createBudgetPool as Q, executorFailureReason as R, UNAVAILABLE_STATUSES as S, notifySandboxEventObserver as St, placementRefusal as T, sandboxEventServedBackend as Tt, turnRemediationOf as U, turnFailureOf as V, hashJson as W, budgetRecoverySeeds as X, budgetLeases as Y, completedLeafBacking as Z, retainedExecutorContext as _, canonicalSandboxUsageMode as _t, settlementFailureCause as a, assertValidSpend as at, RATE_LIMIT_SIGNALS as b, extractLlmCallEvent as bt, DISPATCH_NOT_ADMITTED_CODE as c, mapSandboxToolEvent as ct, executorEvidenceWriter as d, sandboxProgressEvents as dt, meterUsageEvent as et, isProvisioningRefusal as f, terminalTextFromSandboxEvent as ft, registerRetainedExecutorPreparation as g, assertSandboxServedModel as gt, prepareRetainedExecutor as h, parseCanonicalTransportEvent as ht, runtimeProviderCode as i, assertValidBudget as it, TRACE_ROOT_SCHEMA as j, unavailableResumeAt as k, parseCodexUsageRecord as kt, RetainedExecutionPendingError as l, sandboxLeafOutputFromEvents as lt, leafContinuationExecutionId as m, extractTransportEventIdentity as mt, runtimeFailureCause as n, spendFromUsageEvents as nt, BUDGET_CONTINUATION_TASK as o, createSandboxToolPartState as ot, isSchemaRejection as p, canonicalStreamEventFromSandboxEvent as pt, BudgetReconcileFault as q, runtimeFailureCauseSchema as r, spendFromUsageTotals as rt, DISPATCH_EXECUTION_CHANGED_CODE as s, mapSandboxEvent as st, reportedFailureCause as t, newUsageTotals as tt, TRANSPORT_ERROR_CODES as u, sandboxOutputMarker as ut, retainedExecutorSeamKey as v, createSandboxTurnEventCollector as vt, jitteredMs as w, sandboxEventProviderModels as wt, UNAVAILABLE_CODES as x, isSandboxTerminalEvent as xt, PLACEMENT_SIGNALS as y, createSandboxUsageLedger as yt, harnessProcessDied as z };
|
|
3257
3265
|
|
|
3258
|
-
//# sourceMappingURL=failure-cause-
|
|
3266
|
+
//# sourceMappingURL=failure-cause-DTXwfv7t.js.map
|