@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.
Files changed (75) hide show
  1. package/dist/{activation-BgRWFKZi.js → activation-D9WGuwcK.js} +2 -2
  2. package/dist/{activation-BgRWFKZi.js.map → activation-D9WGuwcK.js.map} +1 -1
  3. package/dist/agent.d.ts +1 -1
  4. package/dist/agent.js +2 -2
  5. package/dist/{authoring-dQQ2z1fT.js → authoring-BzMyFv9z.js} +7 -3
  6. package/dist/{authoring-dQQ2z1fT.js.map → authoring-BzMyFv9z.js.map} +1 -1
  7. package/dist/conversation.d.ts +1 -1
  8. package/dist/{coordination-driver-Da1IGdTP.js → coordination-driver-_wzRdIK_.js} +668 -35
  9. package/dist/coordination-driver-_wzRdIK_.js.map +1 -0
  10. package/dist/durable.d.ts +2 -2
  11. package/dist/durable.js +1 -1
  12. package/dist/{environment-provider-Bf-hgR6p.d.ts → environment-provider-CJ43FJfJ.d.ts} +2 -2
  13. package/dist/{environment-provider-DcelIawX.js → environment-provider-DEwsolvi.js} +43 -6
  14. package/dist/environment-provider-DEwsolvi.js.map +1 -0
  15. package/dist/environment-provider.d.ts +1 -1
  16. package/dist/environment-provider.js +1 -1
  17. package/dist/{graph-Bd1elhdL.js → graph-y0AW_Txn.js} +3 -2
  18. package/dist/graph-y0AW_Txn.js.map +1 -0
  19. package/dist/graph.d.ts +3 -3
  20. package/dist/graph.js +3 -3
  21. package/dist/{redact-Cv1GfOFO.d.ts → improve-Cbbt3jE6.d.ts} +4 -36
  22. package/dist/{improvement-cycle-BanlFMyL.js → improvement-cycle-BPyj98Id.js} +3 -3
  23. package/dist/{improvement-cycle-BanlFMyL.js.map → improvement-cycle-BPyj98Id.js.map} +1 -1
  24. package/dist/{index-DpNil9jh.d.ts → index-B_fEqr5V.d.ts} +328 -13
  25. package/dist/{index-C-gBk5M9.d.ts → index-COznK4kB.d.ts} +4 -4
  26. package/dist/{index-Clb7_qML.d.ts → index-OSRVFARy.d.ts} +2 -2
  27. package/dist/index.d.ts +9 -8
  28. package/dist/index.js +7 -8
  29. package/dist/index.js.map +1 -1
  30. package/dist/intelligence.d.ts +5 -4
  31. package/dist/intelligence.js +4 -5
  32. package/dist/intelligence.js.map +1 -1
  33. package/dist/kernel.d.ts +6 -6
  34. package/dist/kernel.js +9 -9
  35. package/dist/{knowledge-BXdXlv48.js → knowledge-BIo_3VwO.js} +3 -3
  36. package/dist/{knowledge-BXdXlv48.js.map → knowledge-BIo_3VwO.js.map} +1 -1
  37. package/dist/knowledge.d.ts +1 -1
  38. package/dist/knowledge.js +1 -1
  39. package/dist/{loop-runner-bin-CGQzzWAc.js → loop-runner-bin-C-FnTrM8.js} +3 -3
  40. package/dist/{loop-runner-bin-CGQzzWAc.js.map → loop-runner-bin-C-FnTrM8.js.map} +1 -1
  41. package/dist/{loop-runner-bin-Cy4f9M6p.d.ts → loop-runner-bin-DiiZMHw7.d.ts} +3 -3
  42. package/dist/loop-runner-bin.d.ts +1 -1
  43. package/dist/loop-runner-bin.js +1 -1
  44. package/dist/mcp/bin.js +3 -3
  45. package/dist/mcp/index.d.ts +4 -4
  46. package/dist/mcp/index.js +6 -6
  47. package/dist/{openai-tools-BSDk_umV.js → openai-tools-PzShuaP4.js} +2 -2
  48. package/dist/{openai-tools-BSDk_umV.js.map → openai-tools-PzShuaP4.js.map} +1 -1
  49. package/dist/primeintellect/index.d.ts +1 -1
  50. package/dist/{provision-supervisor-bwpzajiz.js → provision-supervisor-DkVH1f9I.js} +4 -4
  51. package/dist/{provision-supervisor-bwpzajiz.js.map → provision-supervisor-DkVH1f9I.js.map} +1 -1
  52. package/dist/{supervisor-CqJW4qap.js → redact-h5zAxyNV.js} +179 -12
  53. package/dist/redact-h5zAxyNV.js.map +1 -0
  54. package/dist/{runtime-Ddh7PyCy.js → runtime-1JqxyKDI.js} +84 -30
  55. package/dist/runtime-1JqxyKDI.js.map +1 -0
  56. package/dist/{runtime-BMWmSu4A.d.ts → runtime-DI4mJNXI.d.ts} +3 -3
  57. package/dist/{stream-agent-turn-uqzf9ZEh.d.ts → stream-agent-turn-_GgUW49y.d.ts} +35 -3
  58. package/dist/{structural-rollout-0NKvKuFm.js → structural-rollout-CunhVUWJ.js} +2 -2
  59. package/dist/{structural-rollout-0NKvKuFm.js.map → structural-rollout-CunhVUWJ.js.map} +1 -1
  60. package/dist/{supervise-yDiZAqlN.js → supervise-Bx1Ps8xQ.js} +21 -6
  61. package/dist/supervise-Bx1Ps8xQ.js.map +1 -0
  62. package/dist/testing.d.ts +2 -2
  63. package/dist/testing.js +12 -12
  64. package/dist/tui/index.d.ts +1 -1
  65. package/dist/tui/index.js +1 -1
  66. package/dist/{types-02hXqnSP.d.ts → types-DKA_PDv0.d.ts} +27 -2
  67. package/package.json +1 -1
  68. package/dist/coordination-driver-Da1IGdTP.js.map +0 -1
  69. package/dist/environment-provider-DcelIawX.js.map +0 -1
  70. package/dist/graph-Bd1elhdL.js.map +0 -1
  71. package/dist/redact-D-u-rrcn.js +0 -82
  72. package/dist/redact-D-u-rrcn.js.map +0 -1
  73. package/dist/runtime-Ddh7PyCy.js.map +0 -1
  74. package/dist/supervise-yDiZAqlN.js.map +0 -1
  75. 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-DcelIawX.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-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
- /** Canonicalize a served model for cross-route identity comparisons. */
3744
- function canonicalObservedModel(model) {
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
- return identity.snapshot === void 0 ? base : `${base}@${identity.snapshot}`;
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) return modelLeaf(model).length === 0 ? null : { base: model };
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
- return modelLeaf(observed) === modelLeaf(declared);
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("executor teardown reported destroyed=false");
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
- export { bridgeModelRouteRefusal as $, createPropagatingTraceEmitter as $t, readWorkerInteractiveBinding as A, parseCodexTokenUsage as An, peerMailVerbNames as At, retainedCreateMaterial as B, promptOnlyProfileMaterialization as Bn, createSandboxLineage as Bt, timerAt as C, captureWorktreeDiff as Cn, AUTHORITY_MARKERS as Ct, readWorkerInteractiveAdmissions as D, LOCAL_HARNESSES as Dn, createPeerMailbox as Dt, interactiveAdmissionSeamKey as E, DEFAULT_LOCAL_HARNESS as En, claimsAuthority as Et, startRetainedInteractiveRun as F, defineProfileMaterializationContract as Fn, TERMINAL_DECISIONS as Ft, rollingDispatch as G, unsupportedProfileDimensions as Gn, routerBrain as Gt, effectiveConcurrency as H, renderProfileMaterializationIssues as Hn, acquireSandbox as Ht, reconnectRetainedRun as I, fullProfileMaterialization as In, createSandboxForSpec as It, assertValidBudget as J, observedModelMatchesDeclared as Jt, DEFAULT_SUCCESSFUL_SHUTDOWN_MS as K, validateProfileMaterialization as Kn, runBrainLoop as Kt, recoverRetainedRun as L, profileMaterializationAxes$1 as Ln, defaultSelectWinner as Lt, workerInteractiveBindingsDir as M, AGENT_PROFILE_MATERIALIZATION_AXES as Mn, isTerminalNodeStatus as Mt, reconnectRetainedInteractiveRun as N, assertProfileMaterialization as Nn, createInPlaceCliExecutor as Nt, workerInteractiveAdmissionFile as O, harnessSupportsReasoningEffort as On, isPeerMailEnvelope as Ot, recoverRetainedInteractiveRun as P, controlProfileMaterialization as Pn, taskToPrompt as Pt, bridgeAdmissionRead as Q, readCodexRolloutSession as Qt, startRetainedRun as R, promptControlProfileMaterialization as Rn, isTerminalDecision as Rt, pollFor as S, runWorktreeHarness as Sn, createInbox as St, waitUntil as T, removeWorktree as Tn, PEER_MAIL_WIRE_KEY as Tt, freeSlots as U, renderUnsupported as Un, assertBoxlessPromptOptions as Ut, destroyInteractiveEnvironment as V, promptResourceProfileMaterialization as Vn, probeSandboxCapabilities as Vt, queueOf as W, sandboxActProfileMaterialization as Wn, readPromptOptions as Wt, spendFromUsageEvents as X, createCodexRolloutStoreReader as Xt, createBudgetPool as Y, addHarnessUsage as Yt, bindReusableExecutorExecutionId as Z, harnessUsageIsEmpty as Zt, recordScopeOwnerMaterialization as _, createRuntimeStreamEventCollector as _n, decodeToolPart as _t, uncertainSpawnBudgets as a, buildLoopSpanNodes as an, createExecutor as at, createWaitProbes as b, sanitizeRuntimeStreamEvent as bn, createActivityLog as bt, pickBestDelivered as c, createOtelExporter as cn, createWorktreeCliExecutor as ct, driverChild as d, generateSpanId as dn, workerTraceEnv as dt, mergeTraceEnv as en, bridgeRuntimeAttachmentsKey as et, withDriverExecutor as f, loopEventToOtelSpan as fn, workerTraceHeaders as ft, meterRuntimeOwnedProviderAttempt as g, createRuntimeEventCollector as gn, createPushTraceSource as gt, meterRuntimeOwnedAccounting as h, toOtelAttributes as hn, createSteerableSandboxSession as ht, sumMeasuredSpendFromEvents as i, buildLoopOtelSpans as in, cliWorktreeExecutor as it, workerInteractiveBindingFile as j, CodexExecutionDiagnosticError as jn, isLiveNodeStatus as jt, attachWorker as k, localHarnessExecutable as kn, peerMailTools as kt, runFinalizer as l, exportEvalRuns as ln, WORKER_TRACE_PROPAGATION as lt, deriveNodeExecutionIdentity as m, padTraceId as mn, DEFAULT_SANDBOX_STEERING_MAX_TURNS as mt, createSupervisor as n, traceContextToEnv as nn, captureReusableExecutorConfig as nt, bestDelivered as o, buildRuntimeEventOtelSpans as on, createExecutorRegistry as ot, createScope as p, padSpanId as pn, workerTraceSeamKey as pt, teardownExecutor as q, worktreeCliProfileMaterialization as qn, canonicalObservedModel as qt, maxSeqOf as r, INTELLIGENCE_WIRE_VERSION as rn, cliInPlaceExecutor as rt, collectDelivered as s, createOpenInferenceFileExporter as sn, snapshotExecutorConfig as st, createRootHandle as t, readTraceContextFromEnv as tn, bridgeStopSignalKey as tt, runTree as u, flatOtelSpan as un, readWorkerTraceContext as ut, scopeOwnerExecutorNodeContext as v, sanitizeAgentRuntimeEvent as vn, sandboxSessionTraceSource as vt, validateWaitSpec as w, createWorktree as wn, DEFAULT_PEER_MAIL_LIMITS as wt, isWaitOutcome as x, runSettledCommand as xn, readWorkerProgress as xt, settledToIteration as y, sanitizeKnowledgeReadinessReport as yn, DEFAULT_STALL_AFTER_MS as yt, startRetainedRunInEnvironment as z, promptModelProfileMaterialization as zn, runAgentRounds as zt };
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=supervisor-CqJW4qap.js.map
16318
+ //# sourceMappingURL=redact-h5zAxyNV.js.map