@tangle-network/agent-runtime 0.190.0 → 0.192.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-BgRWFKZi.js → activation-D9WGuwcK.js} +2 -2
- package/dist/{activation-BgRWFKZi.js.map → activation-D9WGuwcK.js.map} +1 -1
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +2 -2
- package/dist/{authoring-dQQ2z1fT.js → authoring-BzMyFv9z.js} +7 -3
- package/dist/{authoring-dQQ2z1fT.js.map → authoring-BzMyFv9z.js.map} +1 -1
- package/dist/conversation.d.ts +1 -1
- package/dist/{coordination-driver-Da1IGdTP.js → coordination-driver-_wzRdIK_.js} +668 -35
- package/dist/coordination-driver-_wzRdIK_.js.map +1 -0
- package/dist/durable.d.ts +2 -2
- package/dist/durable.js +1 -1
- package/dist/{environment-provider-Bf-hgR6p.d.ts → environment-provider-CJ43FJfJ.d.ts} +2 -2
- package/dist/{environment-provider-DcelIawX.js → environment-provider-DEwsolvi.js} +43 -6
- package/dist/environment-provider-DEwsolvi.js.map +1 -0
- package/dist/environment-provider.d.ts +1 -1
- package/dist/environment-provider.js +1 -1
- package/dist/{graph-Bd1elhdL.js → graph-y0AW_Txn.js} +3 -2
- package/dist/graph-y0AW_Txn.js.map +1 -0
- package/dist/graph.d.ts +3 -3
- package/dist/graph.js +3 -3
- package/dist/{redact-Cv1GfOFO.d.ts → improve-Cbbt3jE6.d.ts} +4 -36
- package/dist/{improvement-cycle-BanlFMyL.js → improvement-cycle-BPyj98Id.js} +3 -3
- package/dist/{improvement-cycle-BanlFMyL.js.map → improvement-cycle-BPyj98Id.js.map} +1 -1
- package/dist/{index-DpNil9jh.d.ts → index-B_fEqr5V.d.ts} +328 -13
- package/dist/{index-C-gBk5M9.d.ts → index-COznK4kB.d.ts} +4 -4
- package/dist/{index-Clb7_qML.d.ts → index-OSRVFARy.d.ts} +2 -2
- package/dist/index.d.ts +9 -8
- package/dist/index.js +7 -8
- package/dist/index.js.map +1 -1
- package/dist/intelligence.d.ts +5 -4
- package/dist/intelligence.js +4 -5
- package/dist/intelligence.js.map +1 -1
- package/dist/kernel.d.ts +6 -6
- package/dist/kernel.js +9 -9
- package/dist/{knowledge-BXdXlv48.js → knowledge-BIo_3VwO.js} +3 -3
- package/dist/{knowledge-BXdXlv48.js.map → knowledge-BIo_3VwO.js.map} +1 -1
- package/dist/knowledge.d.ts +1 -1
- package/dist/knowledge.js +1 -1
- package/dist/{loop-runner-bin-CGQzzWAc.js → loop-runner-bin-C-FnTrM8.js} +3 -3
- package/dist/{loop-runner-bin-CGQzzWAc.js.map → loop-runner-bin-C-FnTrM8.js.map} +1 -1
- package/dist/{loop-runner-bin-Cy4f9M6p.d.ts → loop-runner-bin-DiiZMHw7.d.ts} +3 -3
- 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 +4 -4
- package/dist/mcp/index.js +6 -6
- package/dist/{openai-tools-BSDk_umV.js → openai-tools-PzShuaP4.js} +2 -2
- package/dist/{openai-tools-BSDk_umV.js.map → openai-tools-PzShuaP4.js.map} +1 -1
- package/dist/primeintellect/index.d.ts +1 -1
- package/dist/{provision-supervisor-bwpzajiz.js → provision-supervisor-DkVH1f9I.js} +4 -4
- package/dist/{provision-supervisor-bwpzajiz.js.map → provision-supervisor-DkVH1f9I.js.map} +1 -1
- package/dist/{supervisor-CqJW4qap.js → redact-h5zAxyNV.js} +179 -12
- package/dist/redact-h5zAxyNV.js.map +1 -0
- package/dist/{runtime-Ddh7PyCy.js → runtime-1JqxyKDI.js} +84 -30
- package/dist/runtime-1JqxyKDI.js.map +1 -0
- package/dist/{runtime-BMWmSu4A.d.ts → runtime-DI4mJNXI.d.ts} +3 -3
- package/dist/{stream-agent-turn-uqzf9ZEh.d.ts → stream-agent-turn-_GgUW49y.d.ts} +35 -3
- package/dist/{structural-rollout-0NKvKuFm.js → structural-rollout-CunhVUWJ.js} +2 -2
- package/dist/{structural-rollout-0NKvKuFm.js.map → structural-rollout-CunhVUWJ.js.map} +1 -1
- package/dist/{supervise-yDiZAqlN.js → supervise-Bx1Ps8xQ.js} +21 -6
- package/dist/supervise-Bx1Ps8xQ.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-02hXqnSP.d.ts → types-DKA_PDv0.d.ts} +27 -2
- package/package.json +1 -1
- package/dist/coordination-driver-Da1IGdTP.js.map +0 -1
- package/dist/environment-provider-DcelIawX.js.map +0 -1
- package/dist/graph-Bd1elhdL.js.map +0 -1
- package/dist/redact-D-u-rrcn.js +0 -82
- package/dist/redact-D-u-rrcn.js.map +0 -1
- package/dist/runtime-Ddh7PyCy.js.map +0 -1
- package/dist/supervise-yDiZAqlN.js.map +0 -1
- package/dist/supervisor-CqJW4qap.js.map +0 -1
|
@@ -6,7 +6,7 @@ import { _ as throwIfAborted, a as cloneTokenUsage, b as zeroSpend, d as randomS
|
|
|
6
6
|
import { _ as parseCodexUsageRecord, c as mapSandboxToolEvent, d as sandboxProgressEvents, h as parseCanonicalTransportEvent, i as createSandboxUsageLedger, l as notifySandboxEventObserver, m as extractTransportEventIdentity, r as createSandboxToolPartState, t as assertSandboxServedModel, u as sandboxEventServedBackend } from "./sandbox-events-DWeQRWxg.js";
|
|
7
7
|
import { n as executableAgentSpecSnapshot, r as projectSandboxOutcome, t as executableAgentProfileSnapshot } from "./executable-spec-DxuiDFAU.js";
|
|
8
8
|
import { a as concreteProfileModel, c as profileModelExecutionSettings, d as agentHarness, l as profileProviderModel, o as enforceTokenLimits, s as profileBridgeWireModel, t as assertExecutableAgentProfile, u as resolveRouterRetryPolicy } from "./model-policy-Wf2MxXJ9.js";
|
|
9
|
-
import { c as linkAbort, i as resolveAgentEnvironmentProvider, l as runAbortable, n as providerAsExecutor, r as providerAsSandboxClient, s as abortError$1 } from "./environment-provider-
|
|
9
|
+
import { c as linkAbort, i as resolveAgentEnvironmentProvider, l as runAbortable, n as providerAsExecutor, r as providerAsSandboxClient, s as abortError$1 } from "./environment-provider-DEwsolvi.js";
|
|
10
10
|
import { i as notifyRuntimeHookEvent } from "./runtime-hooks-tXpAarhW.js";
|
|
11
11
|
import { n as assertNoSymlinkDescendant, r as publishExclusiveDurableFile } from "./durable-file-D24y9zg7.js";
|
|
12
12
|
import { AGENT_PROFILE_MATERIALIZATION_AXES, AgentEnvironmentCapabilitiesSchema, AgentExactRunControlRefSchema, AgentInteractiveSessionControlClaimAcknowledgementSchema, AgentInteractiveSessionControlClaimSchema, AgentInteractiveSessionPromptAcknowledgementSchema, AgentInteractiveSessionRefSchema, AgentInteractiveSessionStatusSchema, AgentInteractiveSessionStopAcknowledgementSchema, AgentNativeContextContinuationResultSchema, AgentTurnInputSchema, AgentTurnResultSchema, ContextTransferRequestSchema, InteractionAcknowledgementSchema, InteractionResponseCommandSchema, NativeContextBoundaryProofSchema, NativeContextContinuationRequestSchema, REASONING_EFFORTS, RuntimeEventEnvelopeSchema, TerminalReplayWindowSchema, TerminalSessionRefSchema, agentInteractiveSessionControlClaimAcknowledgementMatchesRequest, agentInteractiveSessionControlClaimMatchesRef, agentInteractiveSessionPromptAcknowledgementMatchesCommand, agentInteractiveSessionRefMatchesStart, agentInteractiveSessionRunRef, agentInteractiveSessionStatusMatchesRef, agentInteractiveSessionStopAcknowledgementMatchesCommand, agentNativeContextContinuationResultMatchesRequest, agentProfileSchema, canonicalAgentProfileDigest, canonicalCandidateDigest, exactAgentInteractiveSessionStart, harnessTypeSchema, nativeContextContinuationTurnDigest, nativeReasoningControl, profileMaterializationAxes, profileMaterializationAxes as profileMaterializationAxes$1, renderInputPartsAsText, sha256DigestSchema } from "@tangle-network/agent-interface";
|
|
@@ -3723,12 +3723,15 @@ function naturalNumber(value) {
|
|
|
3723
3723
|
//#endregion
|
|
3724
3724
|
//#region src/runtime/model-identity.ts
|
|
3725
3725
|
const SNAPSHOT_TOKEN = /^[A-Za-z0-9._-]+$/u;
|
|
3726
|
+
const datedIsoSuffix = /^(.*)-(\d{4})-(\d{2})-(\d{2})$/u;
|
|
3727
|
+
const datedCompactSuffix = /^(.*)-(\d{4})(\d{2})(\d{2})$/u;
|
|
3728
|
+
const datedMonthSuffix = /^(.*)-(\d{4})-(\d{2})$/u;
|
|
3726
3729
|
/** Match equivalent bare and provider-qualified spellings without discarding observed identity. */
|
|
3727
3730
|
function observedModelMatchesDeclared(observed, declared) {
|
|
3728
3731
|
const observedIdentity = modelIdentityParts(observed);
|
|
3729
3732
|
const declaredIdentity = modelIdentityParts(declared);
|
|
3730
3733
|
if (!observedIdentity || !declaredIdentity) return false;
|
|
3731
|
-
if (declaredIdentity.snapshot !== void 0 && observedIdentity.snapshot !== declaredIdentity.snapshot) return false;
|
|
3734
|
+
if (declaredIdentity.snapshot !== void 0 && (observedIdentity.snapshot !== declaredIdentity.snapshot || observedIdentity.snapshotKind !== declaredIdentity.snapshotKind)) return false;
|
|
3732
3735
|
return equivalentModelBase(observedIdentity.base, declaredIdentity.base);
|
|
3733
3736
|
}
|
|
3734
3737
|
/** Merge two observations of one served model while retaining a snapshot-bearing raw identity. */
|
|
@@ -3737,15 +3740,21 @@ function mergeObservedModelIdentity(current, next) {
|
|
|
3737
3740
|
const nextIdentity = modelIdentityParts(next);
|
|
3738
3741
|
if (!currentIdentity || !nextIdentity) return void 0;
|
|
3739
3742
|
if (!equivalentModelBase(currentIdentity.base, nextIdentity.base)) return void 0;
|
|
3740
|
-
if (currentIdentity.snapshot !== void 0 && nextIdentity.snapshot !== void 0 && currentIdentity.snapshot !== nextIdentity.snapshot) return;
|
|
3743
|
+
if (currentIdentity.snapshot !== void 0 && nextIdentity.snapshot !== void 0 && (currentIdentity.snapshot !== nextIdentity.snapshot || currentIdentity.snapshotKind !== nextIdentity.snapshotKind)) return;
|
|
3741
3744
|
return currentIdentity.snapshot === void 0 && nextIdentity.snapshot !== void 0 ? next : current;
|
|
3742
3745
|
}
|
|
3743
|
-
/**
|
|
3744
|
-
function
|
|
3746
|
+
/** Return the canonical model and its validated snapshot kind for runtime evidence reduction. */
|
|
3747
|
+
function canonicalObservedModelParts(model) {
|
|
3745
3748
|
const identity = modelIdentityParts(model);
|
|
3746
3749
|
if (!identity) return void 0;
|
|
3747
3750
|
const base = identity.base.slice(identity.base.lastIndexOf("/") + 1);
|
|
3748
|
-
|
|
3751
|
+
const canonical = identity.snapshot === void 0 ? base : identity.snapshotKind === "date" ? `${base}-${identity.snapshot}` : `${base}@${identity.snapshot}`;
|
|
3752
|
+
return {
|
|
3753
|
+
base,
|
|
3754
|
+
...identity.snapshot !== void 0 ? { snapshot: identity.snapshot } : {},
|
|
3755
|
+
...identity.snapshotKind !== void 0 ? { snapshotKind: identity.snapshotKind } : {},
|
|
3756
|
+
canonical
|
|
3757
|
+
};
|
|
3749
3758
|
}
|
|
3750
3759
|
/** Return whether an observed identity includes a provider snapshot. */
|
|
3751
3760
|
function observedModelHasSnapshot(model) {
|
|
@@ -3754,21 +3763,100 @@ function observedModelHasSnapshot(model) {
|
|
|
3754
3763
|
function modelIdentityParts(model) {
|
|
3755
3764
|
if (model.length === 0) return null;
|
|
3756
3765
|
const at = model.lastIndexOf("@");
|
|
3757
|
-
if (at < 0)
|
|
3766
|
+
if (at < 0) {
|
|
3767
|
+
const dated = datedModelIdentity(model);
|
|
3768
|
+
if (dated !== void 0) return dated;
|
|
3769
|
+
return modelLeaf(model).length === 0 ? null : { base: model };
|
|
3770
|
+
}
|
|
3758
3771
|
const base = model.slice(0, at);
|
|
3759
3772
|
const snapshot = model.slice(at + 1);
|
|
3760
3773
|
if (base.length === 0 || modelLeaf(base).length === 0 || !SNAPSHOT_TOKEN.test(snapshot)) return null;
|
|
3761
3774
|
return {
|
|
3762
3775
|
base,
|
|
3763
|
-
snapshot
|
|
3776
|
+
snapshot,
|
|
3777
|
+
snapshotKind: "opaque"
|
|
3764
3778
|
};
|
|
3765
3779
|
}
|
|
3766
3780
|
function equivalentModelBase(observed, declared) {
|
|
3767
|
-
|
|
3781
|
+
const observedPath = modelBaseParts(observed);
|
|
3782
|
+
const declaredPath = modelBaseParts(declared);
|
|
3783
|
+
if (!samePath(observedPath.path, declaredPath.path)) return false;
|
|
3784
|
+
if (observedPath.provider === void 0 || declaredPath.provider === void 0 || observedPath.provider === declaredPath.provider) return true;
|
|
3785
|
+
if (observedPath.provider === "tangle-router" || declaredPath.provider === "tangle-router") {
|
|
3786
|
+
const router = observedPath.provider === "tangle-router" ? observedPath : declaredPath;
|
|
3787
|
+
const upstream = observedPath.provider === "tangle-router" ? declaredPath : observedPath;
|
|
3788
|
+
if (upstream.provider === void 0) return false;
|
|
3789
|
+
return samePath(router.path, upstream.path) || router.path[0] === upstream.provider && samePath(router.path.slice(1), upstream.path);
|
|
3790
|
+
}
|
|
3791
|
+
return false;
|
|
3792
|
+
}
|
|
3793
|
+
function modelBaseParts(model) {
|
|
3794
|
+
const segments = model.split("/");
|
|
3795
|
+
const normalized = segments.length > 1 && isHarnessPrefix(segments[0]) ? segments.slice(1) : segments;
|
|
3796
|
+
if (normalized.length === 1) return {
|
|
3797
|
+
provider: void 0,
|
|
3798
|
+
path: normalized
|
|
3799
|
+
};
|
|
3800
|
+
return {
|
|
3801
|
+
provider: normalized[0],
|
|
3802
|
+
path: normalized.slice(1)
|
|
3803
|
+
};
|
|
3804
|
+
}
|
|
3805
|
+
function isHarnessPrefix(segment) {
|
|
3806
|
+
return segment !== void 0 && harnessTypeSchema.safeParse(segment).success;
|
|
3807
|
+
}
|
|
3808
|
+
function samePath(left, right) {
|
|
3809
|
+
return left.length === right.length && left.every((segment, index) => segment === right[index]);
|
|
3768
3810
|
}
|
|
3769
3811
|
function modelLeaf(model) {
|
|
3770
3812
|
return model.slice(model.lastIndexOf("/") + 1);
|
|
3771
3813
|
}
|
|
3814
|
+
/**
|
|
3815
|
+
* Parse the provider's documented dated snapshot forms.
|
|
3816
|
+
*
|
|
3817
|
+
* `undefined` means that the model has no dated shape and must be treated as a normal base.
|
|
3818
|
+
* `null` means that it has a dated shape but the date is invalid, so identity matching fails.
|
|
3819
|
+
*/
|
|
3820
|
+
function datedModelIdentity(model) {
|
|
3821
|
+
const iso = datedIsoSuffix.exec(model);
|
|
3822
|
+
if (iso) {
|
|
3823
|
+
const [, base, yearText, monthText, dayText] = iso;
|
|
3824
|
+
return buildDatedIdentity(base, `${yearText}-${monthText}-${dayText}`, isValidCalendarDate(yearText, monthText, dayText));
|
|
3825
|
+
}
|
|
3826
|
+
const compact = datedCompactSuffix.exec(model);
|
|
3827
|
+
if (compact) {
|
|
3828
|
+
const [, base, yearText, monthText, dayText] = compact;
|
|
3829
|
+
return buildDatedIdentity(base, `${yearText}-${monthText}-${dayText}`, isValidCalendarDate(yearText, monthText, dayText));
|
|
3830
|
+
}
|
|
3831
|
+
const month = datedMonthSuffix.exec(model);
|
|
3832
|
+
if (month) {
|
|
3833
|
+
const [, base, yearText, monthText] = month;
|
|
3834
|
+
return buildDatedIdentity(base, `${yearText}-${monthText}`, isValidCalendarMonth(yearText, monthText));
|
|
3835
|
+
}
|
|
3836
|
+
}
|
|
3837
|
+
function buildDatedIdentity(base, snapshot, valid) {
|
|
3838
|
+
if (base === void 0 || base.length === 0 || base.endsWith("/")) return void 0;
|
|
3839
|
+
return valid ? {
|
|
3840
|
+
base,
|
|
3841
|
+
snapshot,
|
|
3842
|
+
snapshotKind: "date"
|
|
3843
|
+
} : null;
|
|
3844
|
+
}
|
|
3845
|
+
function isValidCalendarDate(yearText, monthText, dayText) {
|
|
3846
|
+
if (yearText === void 0 || monthText === void 0 || dayText === void 0) return false;
|
|
3847
|
+
const year = Number(yearText);
|
|
3848
|
+
const month = Number(monthText);
|
|
3849
|
+
const day = Number(dayText);
|
|
3850
|
+
if (year < 2e3 || year > 2099 || month < 1 || month > 12 || day < 1 || day > 31) return false;
|
|
3851
|
+
const date = new Date(Date.UTC(year, month - 1, day));
|
|
3852
|
+
return date.getUTCFullYear() === year && date.getUTCMonth() === month - 1 && date.getUTCDate() === day;
|
|
3853
|
+
}
|
|
3854
|
+
function isValidCalendarMonth(yearText, monthText) {
|
|
3855
|
+
if (yearText === void 0 || monthText === void 0) return false;
|
|
3856
|
+
const year = Number(yearText);
|
|
3857
|
+
const month = Number(monthText);
|
|
3858
|
+
return year >= 2e3 && year <= 2099 && month >= 1 && month <= 12;
|
|
3859
|
+
}
|
|
3772
3860
|
//#endregion
|
|
3773
3861
|
//#region src/runtime/tool-loop.ts
|
|
3774
3862
|
/**
|
|
@@ -11343,7 +11431,7 @@ async function teardownExecutor(executor, grace, deadlineAtMs, now) {
|
|
|
11343
11431
|
if (timer !== void 0) clearTimeout(timer);
|
|
11344
11432
|
}
|
|
11345
11433
|
}
|
|
11346
|
-
if (!receipt.destroyed) throw new ValidationError(
|
|
11434
|
+
if (!receipt.destroyed) throw new ValidationError(`executor teardown reported destroyed=false${receipt.detail ? `: ${receipt.detail}` : ""}`);
|
|
11347
11435
|
}
|
|
11348
11436
|
//#endregion
|
|
11349
11437
|
//#region src/runtime/supervise/dispatch.ts
|
|
@@ -16146,6 +16234,85 @@ function isNonEmptySpend(s) {
|
|
|
16146
16234
|
return s.iterations > 0 || s.tokens.input > 0 || s.tokens.output > 0 || s.usd > 0 || s.ms > 0 || s.tokensKnown === false || s.usdKnown === false;
|
|
16147
16235
|
}
|
|
16148
16236
|
//#endregion
|
|
16149
|
-
|
|
16237
|
+
//#region src/redact.ts
|
|
16238
|
+
const redactedMarker = "[redacted]";
|
|
16239
|
+
/** Secret-bearing key names: when an object key matches, its value is fully
|
|
16240
|
+
* replaced regardless of the value's own content. Lowercased compare. */
|
|
16241
|
+
const secretKeyPattern = /(api[-_]?key|secret|token|password|passwd|authorization|auth|private[-_]?key|credential|access[-_]?key|client[-_]?secret|session[-_]?(id|token)|cookie|bearer)/i;
|
|
16242
|
+
/** In-value secret/PII patterns scrubbed from any string, regardless of key. */
|
|
16243
|
+
const valuePatterns = [
|
|
16244
|
+
/\bBearer\s+[A-Za-z0-9._\-+/=]{8,}/gi,
|
|
16245
|
+
/\b(?:sk|pk|rk|ak)[-_][A-Za-z0-9_-]{12,}/g,
|
|
16246
|
+
/\bgh[pousr]_[A-Za-z0-9]{20,}/g,
|
|
16247
|
+
/\bAKIA[0-9A-Z]{16}\b/g,
|
|
16248
|
+
/-----BEGIN [A-Z ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z ]*PRIVATE KEY-----/g,
|
|
16249
|
+
/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g
|
|
16250
|
+
];
|
|
16251
|
+
/** Secret assignments embedded inside an otherwise opaque string, including
|
|
16252
|
+
* serialized JSON and log-style `key=value` text. */
|
|
16253
|
+
const secretAssignmentPattern = /((?:"|')?(?:api[-_]?key|secret|token|password|passwd|authorization|auth|private[-_]?key|credential|access[-_]?key|client[-_]?secret|session[-_]?(?:id|token)|cookie|bearer)(?:"|')?\s*[:=]\s*)(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|[^\s,;}]+)/gi;
|
|
16254
|
+
/** Scrub a single string of in-value secret/PII patterns. */
|
|
16255
|
+
function scrubString(input) {
|
|
16256
|
+
let out = input;
|
|
16257
|
+
for (const pattern of valuePatterns) out = out.replace(pattern, redactedMarker);
|
|
16258
|
+
return out.replace(secretAssignmentPattern, `$1${redactedMarker}`);
|
|
16259
|
+
}
|
|
16260
|
+
/**
|
|
16261
|
+
* The built-in redactor. Walks objects and arrays; replaces values under
|
|
16262
|
+
* secret-bearing keys wholesale; scrubs in-value patterns from every string.
|
|
16263
|
+
* Cycle-safe (a seen-set short-circuits self-referential payloads to
|
|
16264
|
+
* `'[circular]'`), depth-bounded, and total — never throws on customer input.
|
|
16265
|
+
*/
|
|
16266
|
+
function defaultRedactor(value) {
|
|
16267
|
+
return walk(value, /* @__PURE__ */ new WeakSet(), 0);
|
|
16268
|
+
}
|
|
16269
|
+
const maxDepth = 32;
|
|
16270
|
+
function walk(value, seen, depth) {
|
|
16271
|
+
if (depth > maxDepth) return "[truncated]";
|
|
16272
|
+
if (typeof value === "string") return scrubString(value);
|
|
16273
|
+
if (value === null || typeof value !== "object") return value;
|
|
16274
|
+
if (seen.has(value)) return "[circular]";
|
|
16275
|
+
seen.add(value);
|
|
16276
|
+
if (Array.isArray(value)) return value.map((item) => walk(item, seen, depth + 1));
|
|
16277
|
+
const out = {};
|
|
16278
|
+
for (const [key, v] of Object.entries(value)) {
|
|
16279
|
+
if (secretKeyPattern.test(key)) {
|
|
16280
|
+
out[key] = redactedMarker;
|
|
16281
|
+
continue;
|
|
16282
|
+
}
|
|
16283
|
+
out[key] = walk(v, seen, depth + 1);
|
|
16284
|
+
}
|
|
16285
|
+
return out;
|
|
16286
|
+
}
|
|
16287
|
+
/** Stable identity input for saved work that depends on built-in redaction behavior. */
|
|
16288
|
+
function defaultRedactorIdentityMaterial() {
|
|
16289
|
+
const patternIdentity = (pattern) => ({
|
|
16290
|
+
source: pattern.source,
|
|
16291
|
+
flags: pattern.flags
|
|
16292
|
+
});
|
|
16293
|
+
return {
|
|
16294
|
+
marker: redactedMarker,
|
|
16295
|
+
secretKeyPattern: patternIdentity(secretKeyPattern),
|
|
16296
|
+
valuePatterns: valuePatterns.map(patternIdentity),
|
|
16297
|
+
secretAssignmentPattern: patternIdentity(secretAssignmentPattern),
|
|
16298
|
+
maxDepth,
|
|
16299
|
+
scrubString: Function.prototype.toString.call(scrubString),
|
|
16300
|
+
walk: Function.prototype.toString.call(walk),
|
|
16301
|
+
defaultRedactor: Function.prototype.toString.call(defaultRedactor)
|
|
16302
|
+
};
|
|
16303
|
+
}
|
|
16304
|
+
/**
|
|
16305
|
+
* Resolve the redactor a client uses. A caller-supplied hook handles
|
|
16306
|
+
* domain-specific values first, then the built-in scrubber still removes
|
|
16307
|
+
* common credentials and email addresses. Returning `false` is the explicit
|
|
16308
|
+
* opt-out for already-reviewed public values.
|
|
16309
|
+
*/
|
|
16310
|
+
function resolveRedactor(redact) {
|
|
16311
|
+
if (redact === false) return (value) => value;
|
|
16312
|
+
if (!redact) return defaultRedactor;
|
|
16313
|
+
return (value) => defaultRedactor(redact(value));
|
|
16314
|
+
}
|
|
16315
|
+
//#endregion
|
|
16316
|
+
export { spendFromUsageEvents as $, createCodexRolloutStoreReader as $t, readWorkerInteractiveAdmissions as A, LOCAL_HARNESSES as An, createPeerMailbox as At, recoverRetainedRun as B, profileMaterializationAxes$1 as Bn, defaultSelectWinner as Bt, createWaitProbes as C, sanitizeRuntimeStreamEvent as Cn, createActivityLog as Ct, validateWaitSpec as D, createWorktree as Dn, DEFAULT_PEER_MAIL_LIMITS as Dt, timerAt as E, captureWorktreeDiff as En, AUTHORITY_MARKERS as Et, workerInteractiveBindingsDir as F, AGENT_PROFILE_MATERIALIZATION_AXES as Fn, isTerminalNodeStatus as Ft, effectiveConcurrency as G, renderProfileMaterializationIssues as Gn, acquireSandbox as Gt, startRetainedRunInEnvironment as H, promptModelProfileMaterialization as Hn, runAgentRounds as Ht, reconnectRetainedInteractiveRun as I, assertProfileMaterialization as In, createInPlaceCliExecutor as It, rollingDispatch as J, unsupportedProfileDimensions as Jn, routerBrain as Jt, freeSlots as K, renderUnsupported as Kn, assertBoxlessPromptOptions as Kt, recoverRetainedInteractiveRun as L, controlProfileMaterialization as Ln, taskToPrompt as Lt, attachWorker as M, localHarnessExecutable as Mn, peerMailTools as Mt, readWorkerInteractiveBinding as N, parseCodexTokenUsage as Nn, peerMailVerbNames as Nt, waitUntil as O, removeWorktree as On, PEER_MAIL_WIRE_KEY as Ot, workerInteractiveBindingFile as P, CodexExecutionDiagnosticError as Pn, isLiveNodeStatus as Pt, createBudgetPool as Q, addHarnessUsage as Qt, startRetainedInteractiveRun as R, defineProfileMaterializationContract as Rn, TERMINAL_DECISIONS as Rt, settledToIteration as S, sanitizeKnowledgeReadinessReport as Sn, DEFAULT_STALL_AFTER_MS as St, pollFor as T, runWorktreeHarness as Tn, createInbox as Tt, retainedCreateMaterial as U, promptOnlyProfileMaterialization as Un, createSandboxLineage as Ut, startRetainedRun as V, promptControlProfileMaterialization as Vn, isTerminalDecision as Vt, destroyInteractiveEnvironment as W, promptResourceProfileMaterialization as Wn, probeSandboxCapabilities as Wt, teardownExecutor as X, worktreeCliProfileMaterialization as Xn, canonicalObservedModelParts as Xt, DEFAULT_SUCCESSFUL_SHUTDOWN_MS as Y, validateProfileMaterialization as Yn, runBrainLoop as Yt, assertValidBudget as Z, observedModelMatchesDeclared as Zt, deriveNodeExecutionIdentity as _, padTraceId as _n, DEFAULT_SANDBOX_STEERING_MAX_TURNS as _t, createSupervisor as a, traceContextToEnv as an, captureReusableExecutorConfig as at, recordScopeOwnerMaterialization as b, createRuntimeStreamEventCollector as bn, decodeToolPart as bt, uncertainSpawnBudgets as c, buildLoopSpanNodes as cn, createExecutor as ct, pickBestDelivered as d, createOtelExporter as dn, createWorktreeCliExecutor as dt, harnessUsageIsEmpty as en, bindReusableExecutorExecutionId as et, runFinalizer as f, exportEvalRuns as fn, WORKER_TRACE_PROPAGATION as ft, createScope as g, padSpanId as gn, workerTraceSeamKey as gt, withDriverExecutor as h, loopEventToOtelSpan as hn, workerTraceHeaders as ht, createRootHandle as i, readTraceContextFromEnv as in, bridgeStopSignalKey as it, workerInteractiveAdmissionFile as j, harnessSupportsReasoningEffort as jn, isPeerMailEnvelope as jt, interactiveAdmissionSeamKey as k, DEFAULT_LOCAL_HARNESS as kn, claimsAuthority as kt, bestDelivered as l, buildRuntimeEventOtelSpans as ln, createExecutorRegistry as lt, driverChild as m, generateSpanId as mn, workerTraceEnv as mt, defaultRedactorIdentityMaterial as n, createPropagatingTraceEmitter as nn, bridgeModelRouteRefusal as nt, maxSeqOf as o, INTELLIGENCE_WIRE_VERSION as on, cliInPlaceExecutor as ot, runTree as p, flatOtelSpan as pn, readWorkerTraceContext as pt, queueOf as q, sandboxActProfileMaterialization as qn, readPromptOptions as qt, resolveRedactor as r, mergeTraceEnv as rn, bridgeRuntimeAttachmentsKey as rt, sumMeasuredSpendFromEvents as s, buildLoopOtelSpans as sn, cliWorktreeExecutor as st, defaultRedactor as t, readCodexRolloutSession as tn, bridgeAdmissionRead as tt, collectDelivered as u, createOpenInferenceFileExporter as un, snapshotExecutorConfig as ut, meterRuntimeOwnedAccounting as v, toOtelAttributes as vn, createSteerableSandboxSession as vt, isWaitOutcome as w, runSettledCommand as wn, readWorkerProgress as wt, scopeOwnerExecutorNodeContext as x, sanitizeAgentRuntimeEvent as xn, sandboxSessionTraceSource as xt, meterRuntimeOwnedProviderAttempt as y, createRuntimeEventCollector as yn, createPushTraceSource as yt, reconnectRetainedRun as z, fullProfileMaterialization as zn, createSandboxForSpec as zt };
|
|
16150
16317
|
|
|
16151
|
-
//# sourceMappingURL=
|
|
16318
|
+
//# sourceMappingURL=redact-h5zAxyNV.js.map
|