@kodax-ai/kodax 0.7.68 → 0.7.69

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 (102) hide show
  1. package/CHANGELOG.md +137 -3
  2. package/README.md +56 -9
  3. package/README_CN.md +53 -8
  4. package/config-templates/config.example.jsonc +26 -0
  5. package/config-templates/integrations/a2a.example.jsonc +54 -0
  6. package/config-templates/integrations/extensions.example.jsonc +7 -0
  7. package/config-templates/integrations/mcp.example.jsonc +16 -0
  8. package/dist/chunks/agent-DQRXT6M7.js +2 -0
  9. package/dist/chunks/argument-completer-RSK6CCGP.js +2 -0
  10. package/dist/chunks/chunk-4WIODYOH.js +329 -0
  11. package/dist/chunks/chunk-AWMTNUDS.js +37 -0
  12. package/dist/chunks/chunk-F7C7J6IM.js +7 -0
  13. package/dist/chunks/{chunk-PEGSHZAA.js → chunk-I4TPQEJN.js} +1 -1
  14. package/dist/chunks/chunk-M7TCFYTO.js +107 -0
  15. package/dist/chunks/chunk-NGHQIGVW.js +46 -0
  16. package/dist/chunks/chunk-NGJURAY5.js +306 -0
  17. package/dist/chunks/{chunk-KGAI32VS.js → chunk-PA76WUBL.js} +2 -2
  18. package/dist/chunks/chunk-PQ3XUSY2.js +357 -0
  19. package/dist/chunks/chunk-UJEMSPM5.js +78 -0
  20. package/dist/chunks/{chunk-CC4BVVE7.js → chunk-URC6ZI6P.js} +1 -1
  21. package/dist/chunks/{chunk-CTHUX5ZH.js → chunk-VAZ25MDX.js} +122 -122
  22. package/dist/chunks/chunk-VYKFM3TB.js +751 -0
  23. package/dist/chunks/{chunk-TOGESFRN.js → chunk-WW2O2DEP.js} +1 -1
  24. package/dist/chunks/chunk-Y4WOTWUC.js +2 -0
  25. package/dist/chunks/chunk-Z4PPLJF2.js +60 -0
  26. package/dist/chunks/chunk-ZG4DMYBS.js +422 -0
  27. package/dist/chunks/compaction-config-ABLL6UH3.js +2 -0
  28. package/dist/chunks/{construction-bootstrap-PYWJHO35.js → construction-bootstrap-GH6RW6ST.js} +1 -1
  29. package/dist/chunks/dist-DRBKYVHF.js +2 -0
  30. package/dist/chunks/dist-RWL2RBO4.js +2 -0
  31. package/dist/chunks/host-7SAB4WEC.js +2 -0
  32. package/dist/chunks/run-manager-XMDKTONJ.js +2 -0
  33. package/dist/chunks/utils-QYE5Y73D.js +2 -0
  34. package/dist/index.d.ts +19 -19
  35. package/dist/index.js +6 -6
  36. package/dist/kodax_cli.js +1590 -1316
  37. package/dist/runtime-worker.js +1355 -1105
  38. package/dist/sdk-a2a.d.ts +397 -0
  39. package/dist/sdk-a2a.js +9 -0
  40. package/dist/sdk-agent.d.ts +61 -30
  41. package/dist/sdk-agent.js +1 -1
  42. package/dist/sdk-coding.d.ts +126 -51
  43. package/dist/sdk-coding.js +1 -1
  44. package/dist/sdk-experimental-memory.d.ts +1 -1
  45. package/dist/sdk-experimental-memory.js +1 -1
  46. package/dist/sdk-llm.d.ts +16 -9
  47. package/dist/sdk-llm.js +1 -1
  48. package/dist/sdk-mcp.d.ts +1 -1
  49. package/dist/sdk-mcp.js +1 -1
  50. package/dist/sdk-media.d.ts +1 -1
  51. package/dist/sdk-media.js +1 -1
  52. package/dist/sdk-repl.d.ts +35 -101
  53. package/dist/sdk-repl.js +2 -2
  54. package/dist/sdk-runtime.d.ts +744 -21
  55. package/dist/sdk-runtime.js +1 -1
  56. package/dist/sdk-session.d.ts +7 -7
  57. package/dist/sdk-session.js +1 -1
  58. package/dist/sdk-skills.js +1 -1
  59. package/dist/semantic-worker.js +100 -12
  60. package/dist/types-chunks/{base.d-C8mXDhLL.d.ts → base.d-CYjtB68X.d.ts} +1 -1
  61. package/dist/types-chunks/{bash-prefix-extractor.d-Dm-T865v.d.ts → bash-prefix-extractor.d-BkIA8Wto.d.ts} +68 -17
  62. package/dist/types-chunks/{capability-learning.d-BLEmCib0.d.ts → capability-learning.d-WtsyRv3O.d.ts} +1 -1
  63. package/dist/types-chunks/{capsule.d-CzaamUUv.d.ts → capsule.d-xJvfh4YR.d.ts} +3 -3
  64. package/dist/types-chunks/{commands.d-DxKjVSNU.d.ts → commands.d-DkPfcQWG.d.ts} +4 -4
  65. package/dist/types-chunks/{cost-tracker.d-CBLk1fiD.d.ts → cost-tracker.d-BeaenODW.d.ts} +4 -1
  66. package/dist/types-chunks/{guardrail.d-D7r6zVSR.d.ts → guardrail.d-6ZDbNbHO.d.ts} +1 -1
  67. package/dist/types-chunks/{guardrail.d-CPDfZyJp.d.ts → guardrail.d-R7AiGfrI.d.ts} +4 -4
  68. package/dist/types-chunks/integration-config.d-ojG4swOP.d.ts +95 -0
  69. package/dist/types-chunks/{manager.d-Zum9cGHU.d.ts → manager.d-CoEuPRAo.d.ts} +4 -1
  70. package/dist/types-chunks/{public-api.d-BcKbBy1E.d.ts → public-api.d-7G4--RZE.d.ts} +3 -3
  71. package/dist/types-chunks/{resolver.d-DmBnoilY.d.ts → resolver.d-CIVoGc97.d.ts} +2 -2
  72. package/dist/types-chunks/{run-manager.d-CSj7_kWk.d.ts → run-manager.d-BaXtkryp.d.ts} +1 -1
  73. package/dist/types-chunks/{sdk-session-C6nDgyh8.d.ts → sdk-session-BQccrODn.d.ts} +6 -4
  74. package/dist/types-chunks/{types.d-D2frCRaY.d.ts → types.d-BtC4yLYO.d.ts} +35 -8
  75. package/dist/types-chunks/{types.d-CzscbsG0.d.ts → types.d-C9YHEAmA.d.ts} +38 -7
  76. package/dist/types-chunks/{types.d-D9FKbAmf.d.ts → types.d-CJR7t6iW.d.ts} +2 -2
  77. package/dist/types-chunks/{types.d-CO_ZkmOd.d.ts → types.d-TTvpAGWf.d.ts} +5 -0
  78. package/dist/types-chunks/{utils.d-DOXxnOnI.d.ts → utils.d-BbB5jzi1.d.ts} +15 -7
  79. package/docs/SDK_EMBEDDER_GUIDE.md +627 -9
  80. package/package.json +10 -2
  81. package/dist/chunks/agent-DATNZOBK.js +0 -2
  82. package/dist/chunks/argument-completer-X7MMM7Y6.js +0 -2
  83. package/dist/chunks/chunk-5GL55MOH.js +0 -36
  84. package/dist/chunks/chunk-67XJ4YUA.js +0 -703
  85. package/dist/chunks/chunk-C4SBXBWH.js +0 -346
  86. package/dist/chunks/chunk-D6QVXQNI.js +0 -1
  87. package/dist/chunks/chunk-HFM2D5BP.js +0 -2
  88. package/dist/chunks/chunk-HLBHSA2B.js +0 -325
  89. package/dist/chunks/chunk-K2NCKRVY.js +0 -33
  90. package/dist/chunks/chunk-KIQRCGVR.js +0 -419
  91. package/dist/chunks/chunk-MP52BDK5.js +0 -15
  92. package/dist/chunks/chunk-O5OJQFPY.js +0 -307
  93. package/dist/chunks/chunk-OIELNE6Z.js +0 -56
  94. package/dist/chunks/chunk-PZTG2C33.js +0 -7
  95. package/dist/chunks/chunk-QJJKMNZF.js +0 -2
  96. package/dist/chunks/compaction-config-BXEDHIQP.js +0 -2
  97. package/dist/chunks/dist-76PJHNSG.js +0 -2
  98. package/dist/chunks/dist-HTDJRAD6.js +0 -2
  99. package/dist/chunks/host-UAXIDZ6V.js +0 -2
  100. package/dist/chunks/paste-C33GZQV5.js +0 -2
  101. package/dist/chunks/run-manager-UCXB4G22.js +0 -2
  102. package/dist/chunks/utils-S63V5UCM.js +0 -2
@@ -1,25 +1,44 @@
1
- import { cE as Span, cX as Trace, f as Agent, ay as Handoff, cs as RunnerToolCall, cv as RunnerToolResult, I as AgentMessage, H as AgentManifest, bt as ManifestPatch, aC as InvariantId, cd as QualityInvariant, aS as KodaXInputArtifactSource, aQ as KodaXImageMediaType, bp as KodaXVideoMediaType, aL as KodaXFileInputArtifact, aP as KodaXImageInputArtifact, bo as KodaXVideoInputArtifact, aR as KodaXInputArtifact, a6 as ChildTaskRegistry, ah as DiscoveredInstance, cC as SessionMeta, cD as SessionStateSnapshot, cL as StateWriterFs, aB as InstanceDiscoveryFs, cK as StateWriter, cN as StopHookContext, cP as StopHookResult, cO as StopHookFn, bE as MemoryContextIdentity, bN as MemoryItemRef, b5 as KodaXSessionLineage, aY as KodaXSessionArtifactLedgerEntry, bJ as MemoryEvent, c3 as MemoryReviewRunner, bF as MemoryController, bu as MemoryActionProposal, bx as MemoryApplyResult, bX as MemoryRejectResult, bV as MemoryRefFilter, bC as MemoryBodySnapshot, bP as MemoryLifecycleOperationResult, bG as MemoryCuratorInput, bM as MemoryGovernanceReport, bA as MemoryAutoCuratorInput, bB as MemoryAutoCuratorResult, bS as MemoryPackInput, bQ as MemoryPack, b_ as MemoryReviewInput, c2 as MemoryReviewPlan, aV as KodaXMemoryOutcomeDigest, bI as MemoryEpisodeReviewResult, bv as MemoryApplicability, aN as KodaXGoalState, aM as KodaXGoalEventType, b1 as KodaXSessionEntry, b3 as KodaXSessionGoalEntry, a9 as CompactionDetails, a8 as CompactionConfig, aa as CompactionResult, aJ as KodaXExtensionStore, aK as KodaXExtensionStoreEntry, aT as KodaXJsonValue, d1 as WorkflowApi, df as WorkflowModule, d0 as WorkflowAgentBackend, db as WorkflowLimits, d6 as WorkflowEvent, dc as WorkflowLogEvent, dE as WorkflowTaskResult, dy as WorkflowRunState, C as AgentExecutorPlaneStore, ad as CreateAgentExecutorPlaneOptions, z as AgentExecutorPlane, aq as ExternalAgentProtocol, x as AgentExecutorFactory } from './types-chunks/types.d-D2frCRaY.js';
2
- export { A as ASK_USER_BACK_SIGNAL, a as ASK_USER_CUSTOM_INPUT_SIGNAL, b as AdmissionAuditOptions, c as AdmissionCtx, d as AdmissionVerdict, e as AdmittedHandle, g as AgentArtifactPolicy, h as AgentArtifactPolicyDecision, i as AgentArtifactPolicyInput, j as AgentArtifactReference, k as AgentCapabilityDeclaration, l as AgentCapabilityRequirements, m as AgentContinuationInput, n as AgentCredentialBroker, o as AgentDispatchContext, p as AgentDispatchPolicy, q as AgentDispatchPolicyDecision, r as AgentDispatchPolicyInput, s as AgentDispatchabilitySnapshot, t as AgentDispatchabilityStatus, u as AgentEffectDeclaration, v as AgentExecutor, w as AgentExecutorEvent, y as AgentExecutorFactoryContext, B as AgentExecutorPlaneBinding, D as AgentExecutorPreflightResult, E as AgentExecutorProtocol, F as AgentExecutorTaskReference, G as AgentExecutorTaskSnapshot, J as AgentMiddlewareDeclaration, K as AgentPreflightInput, L as AgentPreflightResult, M as AgentReasoningProfile, N as AgentRegistrationService, O as AgentSpanData, P as AgentTaskCancellation, Q as AgentTaskCorrelation, R as AgentTaskEvent, S as AgentTaskFilter, T as AgentTaskProgress, U as AgentTaskRegistrationSnapshot, V as AgentTaskService, W as AgentTaskSnapshot, X as AgentTaskStartInput, Y as AgentTaskState, Z as AgentTaskUsage, _ as AgentTool, $ as AskUserAnswer, a0 as AskUserCustomInputAnswer, a1 as AskUserMultiOptions, a2 as AskUserQuestionItem, a3 as AskUserQuestionOptions, a4 as AskUserSelectionAnswer, a5 as CapabilitySupport, a7 as CompactionAnchor, ab as CompactionSpanData, ac as CompactionUpdate, ae as CurrentTodoSummary, af as DEFAULT_SYSTEM_CAP, ag as Deliverable, ai as DiscoveryOptions, aj as DispatchableAgentDescriptor, ak as DispatchableAgentListing, al as DispatchableAgentOrigin, am as DispatchableAgentQuery, an as EvidenceSpanData, ao as ExternalAgentEffectDeclaration, ap as ExternalAgentHealth, ar as ExternalAgentRegistration, as as ExternalAgentRegistrationSummary, at as FanoutSpanData, au as FileOperations, av as GenerationSpanData, aw as Guardrail, ax as GuardrailSpanData, az as HandoffSpanData, aA as InMemorySessionOptions, aD as InvariantResult, aE as InvariantSession, aF as KodaXCompactMemoryProgress, aG as KodaXCompactMemorySeed, aH as KodaXExtensionSessionRecord, aI as KodaXExtensionSessionState, aO as KodaXGoalStatus, aU as KodaXMemoryInfluenceRef, aW as KodaXMemoryOutcomeEvidence, aX as KodaXSessionArchiveMarkerEntry, aZ as KodaXSessionBranchSummaryEntry, a_ as KodaXSessionClientNoticeEntry, a$ as KodaXSessionCompactionEntry, b0 as KodaXSessionData, b2 as KodaXSessionEntryBase, b4 as KodaXSessionLabelEntry, b6 as KodaXSessionMemoryOutcomeDigestEntry, b7 as KodaXSessionMemoryReviewReceiptEntry, b8 as KodaXSessionMessageEntry, b9 as KodaXSessionMeta, ba as KodaXSessionNavigationOptions, bb as KodaXSessionRewindMarkerEntry, bc as KodaXSessionRuntimeInfo, bd as KodaXSessionScope, be as KodaXSessionStorage, bf as KodaXSessionTreeNode, bg as KodaXSessionUiHistoryItem, bh as KodaXSessionUiHistoryItemType, bi as KodaXSessionUiTextHistoryItem, bj as KodaXSessionUiTextHistoryItemType, bk as KodaXSessionUiToolCall, bl as KodaXSessionUiToolCallStatus, bm as KodaXSessionUiToolGroupHistoryItem, bn as KodaXSessionWorkspaceKind, bq as LocalAgentTaskInput, br as LocalAgentTaskUpdate, bs as MAX_TOOL_LOOP_ITERATIONS, bw as MemoryApplyPreview, by as MemoryApproval, bz as MemoryAuthority, bD as MemoryClaimKind, bH as MemoryDecisionTraceReceipt, bK as MemoryGovernanceFinding, bL as MemoryGovernanceFindingKind, bO as MemoryLifecycle, bR as MemoryPackHint, bT as MemoryPackTraceMetadata, bU as MemoryProposalAction, bW as MemoryRefKind, bY as MemoryReviewCandidateRef, bZ as MemoryReviewDraftAction, b$ as MemoryReviewModelInput, c0 as MemoryReviewPersistenceDecision, c1 as MemoryReviewPersistenceKind, c4 as MemoryReviewTrigger, c5 as MemoryScope, c6 as MemorySourceAdapter, c7 as MemoryVisibility, c8 as MessageEntry, c9 as ObserveCtx, ca as PersistedSessionState, cb as PresetDispatcher, cc as PresetTracingContext, ce as ReadonlyMutationTracker, cf as ReadonlyRecorder, cg as ReasoningDepth, ch as RecentlyModifiedFile, ci as RequestTaskStopOptions, cj as RequestTaskStopResult, ck as RunEvent, cl as RunOptions, cm as RunResult, cn as RunnableTool, co as Runner, cp as RunnerEvent, cq as RunnerLlmResult, cr as RunnerLlmReturn, ct as RunnerToolContext, cu as RunnerToolObserver, cw as Session, cx as SessionDispatchResult, cy as SessionEntry, cz as SessionErrorMetadata, cA as SessionExtension, cB as SessionForkOptions, cF as SpanData, cG as SpanError, cH as SpanImpl, cI as SpanImplOptions, cJ as StartTraceOptions, cM as StateWriterOptions, cQ as StopHookSpanData, cR as SystemCap, cS as TaskAbortRegistry, cT as TerminalCtx, cU as ToolCallSpanData, cV as ToolCapability, cW as ToolPermission, cY as TraceOptions, cZ as Tracer, c_ as TracerOptions, c$ as UserInteraction, d2 as WorkflowApproval, d3 as WorkflowApprovalSummary, d4 as WorkflowArtifactRef, d5 as WorkflowBudget, d7 as WorkflowEventCorrelation, d8 as WorkflowEventRecorder, d9 as WorkflowEventType, da as WorkflowIsolation, dd as WorkflowMeta, de as WorkflowModelHint, dg as WorkflowParallelOptions, dh as WorkflowProcessArtifact, di as WorkflowProcessCounts, dj as WorkflowProcessEvent, dk as WorkflowProcessItem, dl as WorkflowProcessItemKind, dm as WorkflowProcessItemOrigin, dn as WorkflowProcessItemStatus, dp as WorkflowProcessProgress, dq as WorkflowProcessSnapshot, dr as WorkflowProcessSource, ds as WorkflowProcessStatus, dt as WorkflowProcessSummaryStatus, du as WorkflowProcessTokenUsage, dv as WorkflowProcessTracker, dw as WorkflowProcessTrackerOptions, dx as WorkflowRun, dz as WorkflowRunStatus, dA as WorkflowSpawnAgentInput, dB as WorkflowSynthesis, dC as WorkflowSynthesizeInput, dD as WorkflowTaskHandle, dF as WorkflowTaskSnapshot, dG as WorkflowTaskStatus, dH as WorkflowTaskSummaryEventUpdate, dI as WorkflowTaskSummaryKind, dJ as WorkflowTaskSummaryUpdate, dK as WorkflowTaskUsage, dL as WorkflowTaskVerification, dM as WorkflowTaskVerificationResult, dN as WorkflowWaitOptions, dO as _resetAdmittedAgentBindings, dP as _resetPresetDispatchers, dQ as asSingleSelection, dR as buildAssistantMessageFromLlmResult, dS as buildSystemPrompt, dT as buildToolResultMessage, dU as createAgent, dV as createHandoff, dW as createInMemorySession, dX as createInvariantSessionForAgent, dY as createStateWriter, dZ as createTrace, d_ as createWorkflowProcessTracker, d$ as defaultTracer, e0 as detectInstructionsInjection, e1 as discoverInstances, e2 as executeRunnerToolCall, e3 as extractAssistantTextFromMessage, e4 as getActiveUserInteraction, e5 as getAdmittedAgentBindings, e6 as hashMemoryIdentityComponent, e7 as isAskUserCustomInputAnswer, e8 as isFinalWorkflowProcessStatus, e9 as isRunnableTool, ea as isRunnerLlmResult, eb as matchesMemoryApplicability, ec as memoryApplicabilityFingerprint, ed as normalizeHostMetadata, ee as registerChildTask, ef as registerPresetDispatcher, eg as requestTaskStop, eh as runAdmissionAudit, ei as setActiveUserInteraction, ej as setAdmittedAgentBindings } from './types-chunks/types.d-D2frCRaY.js';
3
- import { M as MessageQueue, N as WorkflowScriptManifest } from './types-chunks/capsule.d-CzaamUUv.js';
4
- export { C as CompactionContext, a as CompactionEntry, b as CompactionEntryPayload, c as CompactionPolicy, d as CreateWorkflowCapsuleInput, D as DefaultSummaryCompaction, e as DefaultSummaryCompactionOptions, K as KODAX_API_MIN_INTERVAL, f as KODAX_DEFAULT_TIMEOUT, g as KODAX_HARD_TIMEOUT, h as KODAX_MAX_INCOMPLETE_RETRIES, i as KODAX_MAX_MAXTOKENS_RETRIES, j as KODAX_MAX_RETRIES, k as KODAX_MAX_TOKENS, l as KODAX_RETRY_BASE_DELAY, m as KODAX_STAGGER_DELAY, L as LINEAGE_ENTRY_TYPES, n as LineageArtifactLedgerPayload, o as LineageCompaction, p as LineageCompactionDelegates, q as LineageEntryType, r as LineageExtension, s as LineageLabelPayload, t as LineageTreeNode, P as PROMISE_PATTERN, u as PolicyCompactionResult, W as WORKFLOW_CAPSULE_API_VERSION, v as WORKFLOW_CAPSULE_FORMAT, w as WORKFLOW_CAPSULE_VERSION, x as WORKFLOW_PATTERN_IDS, y as WorkflowCapsule, z as WorkflowCapsuleEnvironmentRequirement, A as WorkflowCapsuleInputs, B as WorkflowCapsuleIntent, E as WorkflowCapsuleProvenance, F as WorkflowCapsuleRequirements, G as WorkflowPatternId, H as WorkflowQualityLintFinding, I as WorkflowQualityLintOptions, J as WorkflowQualityLintSeverity, _ as _resetMessageQueueForTests, O as appendSessionLineageLabel, Q as applyLineageTruncation, R as applySessionCompaction, S as archiveOldIslands, T as assertRestrictedWorkflowQuality, U as buildSessionTree, V as buildWorkflowCapsuleIntent, X as cleanupIncompleteToolCalls, Y as countActiveLineageMessages, Z as countTokens, $ as createSessionLineage, a0 as createWorkflowCapsule, a1 as createWorkflowModuleFromCapsule, a2 as estimateTokens, a3 as extractArtifactLedger, a4 as extractFileOps, a5 as extractTitleFromMessages, a6 as findPreviousUserEntryId, a7 as forkSessionLineage, a8 as generateSessionId, a9 as getAgentConfigHome, aa as getAgentConfigPath, ab as getAppDataDir, ac as getMessageQueue, ad as getSessionLineagePath, ae as getSessionMessagesFromLineage, af as lintRestrictedWorkflowSource, ag as mergeArtifactLedger, ah as mergeFileOps, ai as resolveSessionLineageTarget, aj as rewindSessionLineage, ak as setAgentConfigHome, al as setSessionLineageActiveEntry, am as validateAndFixToolHistory, an as validateWorkflowCapsule, ao as validateWorkflowScriptManifest } from './types-chunks/capsule.d-CzaamUUv.js';
5
- export { G as GuardrailBlockedError, a as GuardrailContext, b as GuardrailEscalateError, c as GuardrailVerdict, I as InputGuardrail, O as OutputGuardrail, T as ToolBeforeOutcome, d as ToolGuardrail, e as collectGuardrails, r as runInputGuardrails, f as runOutputGuardrails, g as runToolAfterGuardrails, h as runToolBeforeGuardrails } from './types-chunks/guardrail.d-D7r6zVSR.js';
6
- import { T as KodaXTaskResultSource, S as KodaXTaskResultMetadata, i as KodaXImageBlock, k as KodaXMessage, a1 as KodaXToolDefinition, a6 as KodaXToolUseBlock } from './types-chunks/types.d-CO_ZkmOd.js';
7
- export { K as KodaXAssuranceIntent, c as KodaXContentBlock, f as KodaXExecutionMode, g as KodaXExecutionPattern, m as KodaXMutationSurface, q as KodaXProviderConfig, y as KodaXProviderStreamOptions, B as KodaXReasoningCapability, F as KodaXReasoningMode, H as KodaXReasoningRequest, I as KodaXRedactedThinkingBlock, L as KodaXRiskLevel, N as KodaXStreamResult, O as KodaXTaskActionability, P as KodaXTaskBudgetOverrides, Q as KodaXTaskComplexity, R as KodaXTaskFamily, U as KodaXTaskRoutingDecision, V as KodaXTaskType, W as KodaXTaskWorkIntent, X as KodaXTextBlock, Y as KodaXThinkingBlock, Z as KodaXThinkingBudgetMap, _ as KodaXThinkingDepth, a0 as KodaXTokenUsage, a2 as KodaXToolResultBlock } from './types-chunks/types.d-CO_ZkmOd.js';
8
- import { C as CapabilityCache, b as CapabilityCacheSource } from './types-chunks/capability-learning.d-BLEmCib0.js';
9
- export { a as CapabilityCacheEntry } from './types-chunks/capability-learning.d-BLEmCib0.js';
1
+ import { cH as Span, c_ as Trace, f as Agent, ay as Handoff, ct as RunnerToolCall, cw as RunnerToolResult, I as AgentMessage, H as AgentManifest, bt as ManifestPatch, aC as InvariantId, cd as QualityInvariant, aS as KodaXInputArtifactSource, aQ as KodaXImageMediaType, bp as KodaXVideoMediaType, aL as KodaXFileInputArtifact, aP as KodaXImageInputArtifact, bo as KodaXVideoInputArtifact, aR as KodaXInputArtifact, a6 as ChildTaskRegistry, ah as DiscoveredInstance, cF as SessionMeta, cG as SessionStateSnapshot, cO as StateWriterFs, aB as InstanceDiscoveryFs, cN as StateWriter, cQ as StopHookContext, cS as StopHookResult, cR as StopHookFn, bE as MemoryContextIdentity, bN as MemoryItemRef, b5 as KodaXSessionLineage, aY as KodaXSessionArtifactLedgerEntry, bJ as MemoryEvent, c3 as MemoryReviewRunner, bF as MemoryController, bu as MemoryActionProposal, bx as MemoryApplyResult, bX as MemoryRejectResult, bV as MemoryRefFilter, bC as MemoryBodySnapshot, bP as MemoryLifecycleOperationResult, bG as MemoryCuratorInput, bM as MemoryGovernanceReport, bA as MemoryAutoCuratorInput, bB as MemoryAutoCuratorResult, bS as MemoryPackInput, bQ as MemoryPack, b_ as MemoryReviewInput, c2 as MemoryReviewPlan, aV as KodaXMemoryOutcomeDigest, bI as MemoryEpisodeReviewResult, bv as MemoryApplicability, aN as KodaXGoalState, aM as KodaXGoalEventType, b1 as KodaXSessionEntry, b3 as KodaXSessionGoalEntry, a9 as CompactionDetails, a8 as CompactionConfig, aa as CompactionResult, aJ as KodaXExtensionStore, aK as KodaXExtensionStoreEntry, aT as KodaXJsonValue, d4 as WorkflowApi, di as WorkflowModule, d3 as WorkflowAgentBackend, de as WorkflowLimits, d9 as WorkflowEvent, df as WorkflowLogEvent, dH as WorkflowTaskResult, dB as WorkflowRunState, C as AgentExecutorPlaneStore, ad as CreateAgentExecutorPlaneOptions, z as AgentExecutorPlane, aq as ExternalAgentProtocol, x as AgentExecutorFactory } from './types-chunks/types.d-BtC4yLYO.js';
2
+ export { A as ASK_USER_BACK_SIGNAL, a as ASK_USER_CUSTOM_INPUT_SIGNAL, b as AdmissionAuditOptions, c as AdmissionCtx, d as AdmissionVerdict, e as AdmittedHandle, g as AgentArtifactPolicy, h as AgentArtifactPolicyDecision, i as AgentArtifactPolicyInput, j as AgentArtifactReference, k as AgentCapabilityDeclaration, l as AgentCapabilityRequirements, m as AgentContinuationInput, n as AgentCredentialBroker, o as AgentDispatchContext, p as AgentDispatchPolicy, q as AgentDispatchPolicyDecision, r as AgentDispatchPolicyInput, s as AgentDispatchabilitySnapshot, t as AgentDispatchabilityStatus, u as AgentEffectDeclaration, v as AgentExecutor, w as AgentExecutorEvent, y as AgentExecutorFactoryContext, B as AgentExecutorPlaneBinding, D as AgentExecutorPreflightResult, E as AgentExecutorProtocol, F as AgentExecutorTaskReference, G as AgentExecutorTaskSnapshot, J as AgentMiddlewareDeclaration, K as AgentPreflightInput, L as AgentPreflightResult, M as AgentReasoningProfile, N as AgentRegistrationService, O as AgentSpanData, P as AgentTaskCancellation, Q as AgentTaskCorrelation, R as AgentTaskEvent, S as AgentTaskFilter, T as AgentTaskProgress, U as AgentTaskRegistrationSnapshot, V as AgentTaskService, W as AgentTaskSnapshot, X as AgentTaskStartInput, Y as AgentTaskState, Z as AgentTaskUsage, _ as AgentTool, $ as AskUserAnswer, a0 as AskUserCustomInputAnswer, a1 as AskUserMultiOptions, a2 as AskUserQuestionItem, a3 as AskUserQuestionOptions, a4 as AskUserSelectionAnswer, a5 as CapabilitySupport, a7 as CompactionAnchor, ab as CompactionSpanData, ac as CompactionUpdate, ae as CurrentTodoSummary, af as DEFAULT_SYSTEM_CAP, ag as Deliverable, ai as DiscoveryOptions, aj as DispatchableAgentDescriptor, ak as DispatchableAgentListing, al as DispatchableAgentOrigin, am as DispatchableAgentQuery, an as EvidenceSpanData, ao as ExternalAgentEffectDeclaration, ap as ExternalAgentHealth, ar as ExternalAgentRegistration, as as ExternalAgentRegistrationSummary, at as FanoutSpanData, au as FileOperations, av as GenerationSpanData, aw as Guardrail, ax as GuardrailSpanData, az as HandoffSpanData, aA as InMemorySessionOptions, aD as InvariantResult, aE as InvariantSession, aF as KodaXCompactMemoryProgress, aG as KodaXCompactMemorySeed, aH as KodaXExtensionSessionRecord, aI as KodaXExtensionSessionState, aO as KodaXGoalStatus, aU as KodaXMemoryInfluenceRef, aW as KodaXMemoryOutcomeEvidence, aX as KodaXSessionArchiveMarkerEntry, aZ as KodaXSessionBranchSummaryEntry, a_ as KodaXSessionClientNoticeEntry, a$ as KodaXSessionCompactionEntry, b0 as KodaXSessionData, b2 as KodaXSessionEntryBase, b4 as KodaXSessionLabelEntry, b6 as KodaXSessionMemoryOutcomeDigestEntry, b7 as KodaXSessionMemoryReviewReceiptEntry, b8 as KodaXSessionMessageEntry, b9 as KodaXSessionMeta, ba as KodaXSessionNavigationOptions, bb as KodaXSessionRewindMarkerEntry, bc as KodaXSessionRuntimeInfo, bd as KodaXSessionScope, be as KodaXSessionStorage, bf as KodaXSessionTreeNode, bg as KodaXSessionUiHistoryItem, bh as KodaXSessionUiHistoryItemType, bi as KodaXSessionUiTextHistoryItem, bj as KodaXSessionUiTextHistoryItemType, bk as KodaXSessionUiToolCall, bl as KodaXSessionUiToolCallStatus, bm as KodaXSessionUiToolGroupHistoryItem, bn as KodaXSessionWorkspaceKind, bq as LocalAgentTaskInput, br as LocalAgentTaskUpdate, bs as MAX_TOOL_LOOP_ITERATIONS, bw as MemoryApplyPreview, by as MemoryApproval, bz as MemoryAuthority, bD as MemoryClaimKind, bH as MemoryDecisionTraceReceipt, bK as MemoryGovernanceFinding, bL as MemoryGovernanceFindingKind, bO as MemoryLifecycle, bR as MemoryPackHint, bT as MemoryPackTraceMetadata, bU as MemoryProposalAction, bW as MemoryRefKind, bY as MemoryReviewCandidateRef, bZ as MemoryReviewDraftAction, b$ as MemoryReviewModelInput, c0 as MemoryReviewPersistenceDecision, c1 as MemoryReviewPersistenceKind, c4 as MemoryReviewTrigger, c5 as MemoryScope, c6 as MemorySourceAdapter, c7 as MemoryVisibility, c8 as MessageEntry, c9 as ObserveCtx, ca as PersistedSessionState, cb as PresetDispatcher, cc as PresetTracingContext, ce as ReadonlyMutationTracker, cf as ReadonlyRecorder, cg as ReasoningDepth, ch as RecentlyModifiedFile, ci as RequestTaskStopOptions, cj as RequestTaskStopResult, ck as RunEvent, cl as RunOptions, cm as RunResult, cn as RunnableTool, co as Runner, cp as RunnerEvent, cq as RunnerLlmResult, cr as RunnerLlmReturn, cs as RunnerRecoveryTranscriptCarrier, cu as RunnerToolContext, cv as RunnerToolObserver, cx as RunnerToolResultBatch, cy as RunnerToolResultBatchTransform, cz as Session, cA as SessionDispatchResult, cB as SessionEntry, cC as SessionErrorMetadata, cD as SessionExtension, cE as SessionForkOptions, cI as SpanData, cJ as SpanError, cK as SpanImpl, cL as SpanImplOptions, cM as StartTraceOptions, cP as StateWriterOptions, cT as StopHookSpanData, cU as SystemCap, cV as TaskAbortRegistry, cW as TerminalCtx, cX as ToolCallSpanData, cY as ToolCapability, cZ as ToolPermission, c$ as TraceOptions, d0 as Tracer, d1 as TracerOptions, d2 as UserInteraction, d5 as WorkflowApproval, d6 as WorkflowApprovalSummary, d7 as WorkflowArtifactRef, d8 as WorkflowBudget, da as WorkflowEventCorrelation, db as WorkflowEventRecorder, dc as WorkflowEventType, dd as WorkflowIsolation, dg as WorkflowMeta, dh as WorkflowModelHint, dj as WorkflowParallelOptions, dk as WorkflowProcessArtifact, dl as WorkflowProcessCounts, dm as WorkflowProcessEvent, dn as WorkflowProcessItem, dp as WorkflowProcessItemKind, dq as WorkflowProcessItemOrigin, dr as WorkflowProcessItemStatus, ds as WorkflowProcessProgress, dt as WorkflowProcessSnapshot, du as WorkflowProcessSource, dv as WorkflowProcessStatus, dw as WorkflowProcessSummaryStatus, dx as WorkflowProcessTokenUsage, dy as WorkflowProcessTracker, dz as WorkflowProcessTrackerOptions, dA as WorkflowRun, dC as WorkflowRunStatus, dD as WorkflowSpawnAgentInput, dE as WorkflowSynthesis, dF as WorkflowSynthesizeInput, dG as WorkflowTaskHandle, dI as WorkflowTaskSnapshot, dJ as WorkflowTaskStatus, dK as WorkflowTaskSummaryEventUpdate, dL as WorkflowTaskSummaryKind, dM as WorkflowTaskSummaryUpdate, dN as WorkflowTaskUsage, dO as WorkflowTaskVerification, dP as WorkflowTaskVerificationResult, dQ as WorkflowWaitOptions, dR as _resetAdmittedAgentBindings, dS as _resetPresetDispatchers, dT as asSingleSelection, dU as attachRunnerRecoveryTranscript, dV as buildAssistantMessageFromLlmResult, dW as buildSystemPrompt, dX as buildToolResultMessage, dY as createAgent, dZ as createHandoff, d_ as createInMemorySession, d$ as createInvariantSessionForAgent, e0 as createStateWriter, e1 as createTrace, e2 as createWorkflowProcessTracker, e3 as defaultTracer, e4 as detectInstructionsInjection, e5 as discoverInstances, e6 as executeRunnerToolCall, e7 as extractAssistantTextFromMessage, e8 as getActiveUserInteraction, e9 as getAdmittedAgentBindings, ea as hashMemoryIdentityComponent, eb as isAskUserCustomInputAnswer, ec as isFinalWorkflowProcessStatus, ed as isRunnableTool, ee as isRunnerLlmResult, ef as matchesMemoryApplicability, eg as memoryApplicabilityFingerprint, eh as normalizeHostMetadata, ei as readRunnerRecoveryTranscript, ej as registerChildTask, ek as registerPresetDispatcher, el as requestTaskStop, em as runAdmissionAudit, en as setActiveUserInteraction, eo as setAdmittedAgentBindings } from './types-chunks/types.d-BtC4yLYO.js';
3
+ import { M as MessageQueue, N as WorkflowScriptManifest } from './types-chunks/capsule.d-xJvfh4YR.js';
4
+ export { C as CompactionContext, a as CompactionEntry, b as CompactionEntryPayload, c as CompactionPolicy, d as CreateWorkflowCapsuleInput, D as DefaultSummaryCompaction, e as DefaultSummaryCompactionOptions, K as KODAX_API_MIN_INTERVAL, f as KODAX_DEFAULT_TIMEOUT, g as KODAX_HARD_TIMEOUT, h as KODAX_MAX_INCOMPLETE_RETRIES, i as KODAX_MAX_MAXTOKENS_RETRIES, j as KODAX_MAX_RETRIES, k as KODAX_MAX_TOKENS, l as KODAX_RETRY_BASE_DELAY, m as KODAX_STAGGER_DELAY, L as LINEAGE_ENTRY_TYPES, n as LineageArtifactLedgerPayload, o as LineageCompaction, p as LineageCompactionDelegates, q as LineageEntryType, r as LineageExtension, s as LineageLabelPayload, t as LineageTreeNode, P as PROMISE_PATTERN, u as PolicyCompactionResult, W as WORKFLOW_CAPSULE_API_VERSION, v as WORKFLOW_CAPSULE_FORMAT, w as WORKFLOW_CAPSULE_VERSION, x as WORKFLOW_PATTERN_IDS, y as WorkflowCapsule, z as WorkflowCapsuleEnvironmentRequirement, A as WorkflowCapsuleInputs, B as WorkflowCapsuleIntent, E as WorkflowCapsuleProvenance, F as WorkflowCapsuleRequirements, G as WorkflowPatternId, H as WorkflowQualityLintFinding, I as WorkflowQualityLintOptions, J as WorkflowQualityLintSeverity, _ as _resetMessageQueueForTests, O as appendSessionLineageLabel, Q as applyLineageTruncation, R as applySessionCompaction, S as archiveOldIslands, T as assertRestrictedWorkflowQuality, U as buildSessionTree, V as buildWorkflowCapsuleIntent, X as cleanupIncompleteToolCalls, Y as countActiveLineageMessages, Z as countTokens, $ as createSessionLineage, a0 as createWorkflowCapsule, a1 as createWorkflowModuleFromCapsule, a2 as estimateTokens, a3 as extractArtifactLedger, a4 as extractFileOps, a5 as extractTitleFromMessages, a6 as findPreviousUserEntryId, a7 as forkSessionLineage, a8 as generateSessionId, a9 as getAgentConfigHome, aa as getAgentConfigPath, ab as getAppDataDir, ac as getMessageQueue, ad as getSessionLineagePath, ae as getSessionMessagesFromLineage, af as lintRestrictedWorkflowSource, ag as mergeArtifactLedger, ah as mergeFileOps, ai as resolveSessionLineageTarget, aj as rewindSessionLineage, ak as setAgentConfigHome, al as setSessionLineageActiveEntry, am as validateAndFixToolHistory, an as validateWorkflowCapsule, ao as validateWorkflowScriptManifest } from './types-chunks/capsule.d-xJvfh4YR.js';
5
+ export { G as GuardrailBlockedError, a as GuardrailContext, b as GuardrailEscalateError, c as GuardrailVerdict, I as InputGuardrail, O as OutputGuardrail, T as ToolBeforeOutcome, d as ToolGuardrail, e as collectGuardrails, r as runInputGuardrails, f as runOutputGuardrails, g as runToolAfterGuardrails, h as runToolBeforeGuardrails } from './types-chunks/guardrail.d-6ZDbNbHO.js';
6
+ import { T as KodaXTaskResultSource, S as KodaXTaskResultMetadata, i as KodaXImageBlock, k as KodaXMessage, a1 as KodaXToolDefinition, a6 as KodaXToolUseBlock } from './types-chunks/types.d-TTvpAGWf.js';
7
+ export { K as KodaXAssuranceIntent, c as KodaXContentBlock, f as KodaXExecutionMode, g as KodaXExecutionPattern, m as KodaXMutationSurface, q as KodaXProviderConfig, y as KodaXProviderStreamOptions, B as KodaXReasoningCapability, F as KodaXReasoningMode, H as KodaXReasoningRequest, I as KodaXRedactedThinkingBlock, L as KodaXRiskLevel, N as KodaXStreamResult, O as KodaXTaskActionability, P as KodaXTaskBudgetOverrides, Q as KodaXTaskComplexity, R as KodaXTaskFamily, U as KodaXTaskRoutingDecision, V as KodaXTaskType, W as KodaXTaskWorkIntent, X as KodaXTextBlock, Y as KodaXThinkingBlock, Z as KodaXThinkingBudgetMap, _ as KodaXThinkingDepth, a0 as KodaXTokenUsage, a2 as KodaXToolResultBlock } from './types-chunks/types.d-TTvpAGWf.js';
8
+ import { C as CapabilityCache, b as CapabilityCacheSource } from './types-chunks/capability-learning.d-WtsyRv3O.js';
9
+ export { a as CapabilityCacheEntry } from './types-chunks/capability-learning.d-WtsyRv3O.js';
10
10
  export { C as CapabilityKind, a as CapabilityProvider, b as CapabilityResult } from './types-chunks/capability.d-3C62G8Eq.js';
11
11
  import { ChildProcess } from 'node:child_process';
12
- import { c as QueuedMessage, a as MessagePriority, b as QueuedInputArtifact, M as MessageMode } from './types-chunks/types.d-D9FKbAmf.js';
13
- export { D as DequeueFilter, E as EnqueueInput } from './types-chunks/types.d-D9FKbAmf.js';
14
- import { K as KodaXBaseProvider } from './types-chunks/base.d-C8mXDhLL.js';
12
+ import { c as QueuedMessage, a as MessagePriority, b as QueuedInputArtifact, M as MessageMode } from './types-chunks/types.d-CJR7t6iW.js';
13
+ export { D as DequeueFilter, E as EnqueueInput } from './types-chunks/types.d-CJR7t6iW.js';
14
+ import { K as KodaXBaseProvider } from './types-chunks/base.d-CYjtB68X.js';
15
15
  import { l as SkillSource } from './types-chunks/types.d-vJExiRje.js';
16
16
  export { I as ISkillRegistry, a as IVariableResolver, S as Skill, b as SkillArtifact, c as SkillContext, d as SkillDynamicContextExecutor, e as SkillFile, f as SkillFrontmatter, g as SkillHook, h as SkillHooks, i as SkillMetadata, j as SkillPathsConfig, k as SkillResult, m as getDefaultSkillPaths, n as getSkillPathsFlat } from './types-chunks/types.d-vJExiRje.js';
17
17
  export { M as McpConnectMode, a as McpServerConfig, b as McpServersConfig, c as McpTransportKind } from './types-chunks/config.d-CJy1WENT.js';
18
- export { M as McpCapabilityDescriptor, a as McpCapabilityKind, b as McpCapabilityProvider, c as McpCapabilityRisk, d as McpCatalogItem, e as McpElicitRequest, f as McpElicitResult, g as McpIcon, h as McpManager, i as McpProviderOptions, j as McpReverseCapabilities, k as McpRoot, l as McpSamplingRequest, m as McpSamplingResult, n as McpServerCatalog, o as McpServerCatalogSnapshot, p as McpServerLogs, q as McpServerRuntime, r as McpServerRuntimeDiagnostics, s as McpServerStatus, t as McpServerToolList, u as McpToolTaskSupport, v as buildInitializeCapabilities, w as createMcpCapabilityId, x as createMcpManager, y as defaultMcpCacheDir, z as getMcpCachePaths, A as normalizeMcpCapabilityId, B as parseMcpCapabilityId, C as searchMcpCatalog } from './types-chunks/manager.d-Zum9cGHU.js';
18
+ export { M as McpCapabilityDescriptor, a as McpCapabilityKind, b as McpCapabilityProvider, c as McpCapabilityRisk, d as McpCatalogItem, e as McpElicitRequest, f as McpElicitResult, g as McpIcon, h as McpManager, i as McpProviderOptions, j as McpReverseCapabilities, k as McpRoot, l as McpSamplingRequest, m as McpSamplingResult, n as McpServerCatalog, o as McpServerCatalogSnapshot, p as McpServerLogs, q as McpServerRuntime, r as McpServerRuntimeDiagnostics, s as McpServerStatus, t as McpServerToolList, u as McpToolTaskSupport, v as buildInitializeCapabilities, w as createMcpCapabilityId, x as createMcpManager, y as defaultMcpCacheDir, z as getMcpCachePaths, A as normalizeMcpCapabilityId, B as parseMcpCapabilityId, C as searchMcpCatalog } from './types-chunks/manager.d-CoEuPRAo.js';
19
19
  export { A as AuthorizationServerMetadata, D as DiscoveredOAuthEndpoints, M as McpAuthRequiredError, a as McpExpiredSessionError, b as McpTransport, c as McpTransportEvents, O as OAuthClientInfo, d as OAuthLoginConsent, P as PerformOAuthLoginOptions, e as ProtectedResourceMetadata, W as WwwAuthenticateChallenge, f as createMcpTransport, g as discoverAuthorizationServerMetadata, h as discoverOAuthEndpoints, i as discoverProtectedResourceMetadata, j as extractInsufficientScope, k as extractResourceMetadataUrl, l as loadValidToken, p as performOAuthLogin, r as registerOAuthClient } from './types-chunks/oauth-login.d-Bgb4rdLN.js';
20
20
  export { createMcpTestServerFixture } from './sdk-mcp.js';
21
21
  export { DiscoveryResult, ExecutionMode, ExecutionOptions, SkillExecutor, SkillExpansionResult, SkillRegistry, VariableResolver, clearPluginSkillPaths, createExecutor, createResolver, discoverSkills, discoverSkillsWithMonorepo, executeSkill, expandSkillForLLM, formatSkillActivationMessage, getNestedSkillPaths, getSkillRegistry, initializeSkillRegistry, listPluginSkillPaths, loadFullSkill, loadSkillFileContent, loadSkillMetadata, parseArguments, parseSkillMarkdown, registerPluginSkillPath, resetSkillRegistry, resolveSkillContent, unregisterPluginSkillPath } from './sdk-skills.js';
22
- export { M as ManagedRunClassification, a as ManagedRunHooks, b as ManagedWorkflowRun, c as ManagedWorkflowSnapshot, d as ManagedWorkflowStatus, S as StartManagedRunInput, W as WorkflowProcessMetadata, e as WorkflowRunManager, f as createWorkflowRunManager, g as getDefaultWorkflowRunManager } from './types-chunks/run-manager.d-CSj7_kWk.js';
22
+ export { M as ManagedRunClassification, a as ManagedRunHooks, b as ManagedWorkflowRun, c as ManagedWorkflowSnapshot, d as ManagedWorkflowStatus, S as StartManagedRunInput, W as WorkflowProcessMetadata, e as WorkflowRunManager, f as createWorkflowRunManager, g as getDefaultWorkflowRunManager } from './types-chunks/run-manager.d-BaXtkryp.js';
23
+
24
+ declare const CONTEXT_SAFETY_FLOOR_TOKENS = 2048;
25
+ declare const CONTEXT_SAFETY_RATIO = 0.03;
26
+ interface ContextCapacityInput {
27
+ readonly contextWindow: number;
28
+ readonly currentTokens: number;
29
+ readonly reservedResponseTokens?: number;
30
+ }
31
+ declare class ContextCapacityError extends Error {
32
+ readonly code = "KODAX_CONTEXT_CAPACITY_EXCEEDED";
33
+ readonly contextWindow: number;
34
+ readonly currentTokens: number;
35
+ readonly reservedResponseTokens: number;
36
+ constructor(input: ContextCapacityInput, operation?: string);
37
+ }
38
+ declare function calculateContextSafetyMargin(currentTokens: number): number;
39
+ declare function exceedsContextCapacity(input: ContextCapacityInput): boolean;
40
+ /** Largest complete request input that leaves response and safety capacity. */
41
+ declare function calculateMaxContextInputTokens(contextWindow: number, reservedResponseTokens?: number): number;
23
42
 
24
43
  type KodaXDiagnosticLevel = 'debug' | 'info' | 'warn' | 'error';
25
44
  interface KodaXDiagnostic {
@@ -1033,7 +1052,13 @@ declare function waitForWakeEvent<TChildResult = unknown>(options: WaitForWakeEv
1033
1052
  * may leak into this signature**, otherwise ADR-021 layer
1034
1053
  * independence breaks and `@kodax/agent` cannot build standalone.
1035
1054
  */
1036
- type EnvelopeAggregateEnforcer = (fragments: readonly string[]) => readonly string[] | Promise<readonly string[]>;
1055
+ interface EnvelopeAggregateCapacityContext {
1056
+ /** Authoritative transcript immediately before the resume messages. */
1057
+ readonly transcript: readonly KodaXMessage[];
1058
+ /** Non-synthetic messages that will share the same next request. */
1059
+ readonly pendingMessages: readonly KodaXMessage[];
1060
+ }
1061
+ type EnvelopeAggregateEnforcer = (fragments: readonly string[], context?: EnvelopeAggregateCapacityContext) => readonly string[] | Promise<readonly string[]>;
1037
1062
  /**
1038
1063
  * FEATURE_159 (v0.7.40) — mode-split synthetic.
1039
1064
  *
@@ -1064,7 +1089,7 @@ type EnvelopeAggregateEnforcer = (fragments: readonly string[]) => readonly stri
1064
1089
  * `readonly KodaXMessage[]` (possibly empty). Callers must spread the
1065
1090
  * result into their next-iteration input.
1066
1091
  */
1067
- declare function composeIdleYieldUserMessage<TChildResult = unknown>(wakeEvent: WakeEvent<TChildResult>, drainBackgroundQueue: () => readonly QueuedMessage[], enforceAggregate?: EnvelopeAggregateEnforcer, onUserPrompts?: (prompts: readonly string[]) => void, resolveTurnId?: () => string | undefined): Promise<readonly KodaXMessage[]>;
1092
+ declare function composeIdleYieldUserMessage<TChildResult = unknown>(wakeEvent: WakeEvent<TChildResult>, drainBackgroundQueue: () => readonly QueuedMessage[], enforceAggregate?: EnvelopeAggregateEnforcer, onUserPrompts?: (prompts: readonly string[]) => void, resolveTurnId?: () => string | undefined, priorMessages?: readonly KodaXMessage[]): Promise<readonly KodaXMessage[]>;
1068
1093
 
1069
1094
  /**
1070
1095
  * Generic outer loop for async fan-out + idle-yield resume.
@@ -1191,6 +1216,10 @@ interface RunWithIdleYieldOptions<TRunResult extends RunWithIdleYieldRunResult,
1191
1216
  */
1192
1217
  readonly maxIterations?: number;
1193
1218
  /**
1219
+ * Current contract: the host receives the completed transcript and any
1220
+ * same-request user prompt, then admits the complete synthetic banner batch
1221
+ * once against physical model capacity. Enqueue-time fixed caps are not used.
1222
+ *
1194
1223
  * FEATURE_121 (v0.7.40): optional aggregate budget enforcer for the
1195
1224
  * synthetic user message built from drained background banners. When
1196
1225
  * provided, it transforms the fragment array before they're joined
@@ -2683,14 +2712,15 @@ declare const COMPACTION_SUMMARY_PREFIX = "[\u5BF9\u8BDD\u5386\u53F2\u6458\u8981
2683
2712
  * Exported for unit testing.
2684
2713
  */
2685
2714
  declare function isEmptyLikeSummary(summary: string): boolean;
2686
- declare function needsCompaction(messages: KodaXMessage[], config: CompactionConfig, contextWindow?: number, tokenCountOverride?: number): boolean;
2687
- declare function compact(messages: KodaXMessage[], config: CompactionConfig, provider: KodaXBaseProvider, contextWindow?: number, customInstructions?: string, systemPrompt?: string, tokenCountOverride?: number, summaryPrompt?: string, updateSummaryPrompt?: string, modelOverride?: string): Promise<CompactionResult>;
2715
+ declare function needsCompaction(messages: KodaXMessage[], config: CompactionConfig, contextWindow?: number, tokenCountOverride?: number, reservedResponseTokens?: number): boolean;
2716
+ declare function compact(messages: KodaXMessage[], config: CompactionConfig, provider: KodaXBaseProvider, contextWindow?: number, customInstructions?: string, systemPrompt?: string, tokenCountOverride?: number, summaryPrompt?: string, updateSummaryPrompt?: string, modelOverride?: string, force?: boolean, reservedResponseTokens?: number): Promise<CompactionResult>;
2688
2717
 
2689
2718
  /**
2690
- * KodaX Microcompaction - Time-driven context cleanup
2719
+ * KodaX Microcompaction - Explicit legacy context cleanup
2691
2720
  *
2692
- * Clears old tool result content from messages to slow context growth.
2693
- * Pure function, no LLM calls, runs after each agent turn.
2721
+ * Clears old tool result content only when a caller explicitly enables it.
2722
+ * The default is disabled because age alone is not evidence that deleting a
2723
+ * complete result will reduce end-to-end token use.
2694
2724
  *
2695
2725
  * Design:
2696
2726
  * - Tracks "turns" (role switches from assistant to user)
@@ -2878,10 +2908,10 @@ declare function createExtensionStore(namespaceId: string): KodaXExtensionStore;
2878
2908
  *
2879
2909
  * Capability inventory: docs/features/v0.7.29-capability-inventory.md#cap-059-compaction-trigger-decision
2880
2910
  *
2881
- * Class 1 (substrate). Per-turn predicate read BEFORE the provider
2882
- * stream call to decide whether the compaction lifecycle (CAP-060)
2883
- * should run this turn. Time-ordering: AFTER microcompact (CAP-014);
2884
- * BEFORE intelligentCompact orchestration (CAP-060).
2911
+ * Class 1 (substrate). Per-turn predicate read before the provider stream
2912
+ * call. The default policy compares the final physical request, provider
2913
+ * output reserve, and shared safety margin against the model window. A
2914
+ * trigger below 100 remains an explicit early-compaction opt-in.
2885
2915
  *
2886
2916
  * The wrapper preserves the historical short-circuit `compactionConfig.enabled`
2887
2917
  * gate from `agent.ts` even though the underlying `needsCompaction`
@@ -2907,11 +2937,12 @@ interface ShouldCompactInput {
2907
2937
  readonly compactionConfig: CompactionConfig;
2908
2938
  readonly contextWindow: number;
2909
2939
  readonly currentTokens: number;
2940
+ readonly reservedResponseTokens?: number;
2910
2941
  }
2911
2942
  /**
2912
- * Returns `true` iff the compaction lifecycle should run this turn.
2913
- * Combines the config-enabled gate with the underlying trigger
2914
- * threshold check from `@kodax-ai/session-lineage`'s `needsCompaction`.
2943
+ * Returns `true` iff the complete request exceeds physical capacity or an
2944
+ * explicitly configured early trigger. `currentTokens` must already include
2945
+ * the final system/tool/framing overhead selected for this provider turn.
2915
2946
  */
2916
2947
  declare function shouldCompact(input: ShouldCompactInput): boolean;
2917
2948
 
@@ -3181,5 +3212,5 @@ interface ReferenceAgentExecutorFactoryOptions {
3181
3212
  }
3182
3213
  declare function createReferenceAgentExecutorFactory(options: ReferenceAgentExecutorFactoryOptions): AgentExecutorFactory;
3183
3214
 
3184
- export { Agent, AgentCancellationUncertainError, AgentExecutorFactory, AgentExecutorPlane, AgentExecutorPlaneStore, AgentManifest, AgentMessage, AgentStartUncertainError, CAPABILITY_CACHE_FILENAME, COMPACTION_SUMMARY_PREFIX, CORE_INVARIANTS, CapabilityCache, CapabilityCacheSource, ChildTaskRegistry, CompactionConfig, CompactionDetails, CompactionResult, ConsoleTracingProcessor, CreateAgentExecutorPlaneOptions, DEFAULT_CONTEXT_WINDOW, DEFAULT_IDLE_YIELD_MAX_ITERATIONS, DEFAULT_MICROCOMPACTION_CONFIG, DEFAULT_POST_COMPACT_CONFIG, DEFAULT_SUMMARY_PROMPT, DEFAULT_UPDATE_SUMMARY_PROMPT, DiscoveredInstance, ExternalAgentProtocol, FileExtensionStore, FileTracingProcessor, HARDENED_ENV_VARS, HARDENING_OPT_OUT_ENV, Handoff, ImageResizeError, InstanceDiscoveryFs, InvariantId, KODAX_FILE_MEDIA_TYPES, KODAX_IMAGE_MEDIA_TYPES, KODAX_VIDEO_MEDIA_TYPES, KodaXExtensionStore, KodaXExtensionStoreEntry, KodaXFileInputArtifact, KodaXGoalEventType, KodaXGoalState, KodaXImageBlock, KodaXImageInputArtifact, KodaXImageMediaType, KodaXInputArtifact, KodaXInputArtifactSource, KodaXJsonValue, KodaXMediaError, KodaXMemoryOutcomeDigest, KodaXMessage, KodaXSessionArtifactLedgerEntry, KodaXSessionEntry, KodaXSessionGoalEntry, KodaXSessionLineage, KodaXTaskResultMetadata, KodaXTaskResultSource, KodaXToolDefinition, KodaXToolUseBlock, KodaXVideoInputArtifact, KodaXVideoMediaType, MAX_DIMENSION, MAX_ENTRYPOINT_BYTES, MAX_ENTRYPOINT_LINES, MAX_SKILL_MD_BYTES, MAX_SKILL_SUPPORT_FILE_BYTES, MEMORY_POLICY_VERSION, ManifestPatch, MemoryActionProposal, MemoryApplicability, MemoryApplyResult, MemoryBodySnapshot, MemoryContextIdentity, MemoryControlPlane, MemoryController, MemoryCuratorInput, MemoryEpisodeReviewResult, MemoryEvent, MemoryGovernanceReport, MemoryItemRef, MemoryLifecycleOperationResult, MemoryPack, MemoryPackInput, MemoryRefFilter, MemoryRejectResult, MemoryReviewInput, MemoryReviewPlan, MemoryReviewRunner, MessageMode, MessagePriority, MessageQueue, PASTE_TMP_DIR_ENV, PASTE_TMP_TTL_MS, POST_COMPACT_MAX_TOKENS_PER_FILE, POST_COMPACT_TOKEN_BUDGET, PROTECTED_TOOL_NAMES, QualityInvariant, QueuedInputArtifact, QueuedInputArtifactError, QueuedMessage, RunnerToolCall, RunnerToolResult, SessionMeta, SessionStateSnapshot, SkillSource, Span, StateWriter, StateWriterFs, StopHookContext, StopHookFn, StopHookResult, TARGET_RAW_SIZE_BYTES, Trace, WorkflowAbortError, WorkflowAgentBackend, WorkflowApi, WorkflowBudgetError, WorkflowEvent, WorkflowLimitError, WorkflowLimits, WorkflowLogEvent, WorkflowModule, WorkflowRunState, WorkflowScriptExecutionError, WorkflowScriptManifest, WorkflowTaskFailedError, WorkflowTaskResult, YIELD_TOOL_NAMES, _emitSpanEnd, _emitSpanStart, _emitTraceEnd, _getRegisteredProcessors, _resetAdmissionMetrics, _resetInvariantRegistry, addTracingProcessor, appendGoalEntry, appendMemoryClientNotice, appendMemoryOutcomeDigest, appendMemoryReviewReceipt, applyManifestPatch, applyProcessHardening, applySkillLearningProposal, approveStoredLearningProposal, bootstrapTeamMode, buildCompactionPromptSnapshot, buildFileContentMessages, buildOtherInstancesPromptBlock, buildPostCompactAttachments, buildRecoverySeed, canMarkCreatedByAgent, cleanupRegisteredManagedChildren, clearCapabilityCache, compact, completeEpisodeReview, composeIdleYieldUserMessage, composePatches, computeSkillConsumerImpact, countLastAssistantToolCalls, createAgentExecutorPlane, createExtensionStore, createFileArtifactFromPath, createImageArtifactFromPath, createLlmJudgedStopHook, createMemoryAgentExecutorPlaneStore, createMemoryControlPlane, createReferenceAgentExecutorFactory, createRestrictedWorkflowModule, createVideoArtifactFromPath, createWorkflowRuntime, decideSkillGovernance, detectHandoffSignal, detectIdleYield, drainPendingEpisodeReviews, editDistance, emitHandoffSpan, emitKodaXDiagnostic, enqueueChildTaskNotification, enqueueWithArtifacts, evidenceTrail, finalOwner, findFuzzyToolMatch, formatKodaXDiagnostic, generateSummary, getActiveTeamModeWriter, getAdmissionMetricsSnapshot, getCachedRejectedEfforts, getCapabilityCacheFile, getInvariant, getModelInputCapabilities, gracefulCompactDegradation, handoffLegality, hashCwd, inferImageMediaType, inferVideoMediaType, injectPostCompactAttachments, invokeLlmJudge, isAdmissionDebugEnabled, isAutoManagedMemoryFile, isChildProcessExited, isEmptyLikeSummary, isGoalEntry, isIdleYieldEnabled, killChildProcessTree, killChildProcessTreeSync, killPidTree, killPidTreeSync, listPendingEpisodeReviews, listRegisteredInvariants, loadCapabilityCache, maybeDrainMidTurn, microcompact, midTurnDrainPriority, needsCompaction, normalizePastedImage, normalizeRecoveryPrompt, normalizeWorkflowLimits, parseMemoryFile, parseMemoryType, parseMemoryTypeFromFilename, parseScalarFields, persistImageAsBlock, persistPendingEpisodeReview, prunePasteTmpDir, readAndNormalizeClipboardImage, readClipboardImage, readLatestGoalFromBranch, readLatestGoalState, readLearningProposalStore, readSkillTrustLedger, readSkillUsageLedger, recordCompletedTurnLearning, recordProceduralLearning, recordRejectedEffort, recordSkillUsage, registerCoreInvariants, registerInvariant, registerManagedChildProcess, replaceSystemMessage, resetCapabilityCacheMemoForTesting, resolveContextWindow, resolveEffectiveInvariants, resolveLearningProposalStore, resolveMemoryEntrypoint, resolveMemoryRoot, resolveRequiredInvariants, resolveScopedMemoryRoot, resolveSkillSnapshotLocation, resolveSkillTrustLedger, resolveSkillUsageLedger, rewindPendingEpisodeReviews, routeMessage, runFanOut, runRestrictedWorkflowScript, runWithIdleYield, runWorkflow, sanitizeProjectKey, serializeConversation, setActiveTeamModeWriter, setKodaXDiagnosticSink, setTracingProcessors, shouldCompact, shutdownTracing, stripHardenedEnvVars, triageProceduralLearning, truncateEntrypointContent, tryGitRemote, updateActiveTeamMode, updateLearningProposalStatus, updateSkillTrustLedger, upsertLearningProposal, validateInputArtifactsForModel, validateRestrictedWorkflowSource, waitForChildProcessExit, waitForWakeEvent };
3185
- export type { AdmissionMetricsSnapshot, ApproveStoredLearningProposalOptions, CompletedTurnLearningCandidate, CompletedTurnLearningInput, CompletedTurnLearningRecordResult, ConsoleTracingProcessorOptions, CreateFileArtifactFromPathOptions, CreateImageArtifactFromPathOptions, CreateLlmJudgedStopHookOptions, CreateMemoryControlPlaneOptions, CreateVideoArtifactFromPathOptions, CreateWorkflowRuntimeOptions, DiscardedLearningReport, DurableMemoryScope, EnqueueChildTaskNotificationInput, EnqueueWithArtifactsInput, EntrypointTruncation, EnvelopeAggregateEnforcer, EpisodeReviewDrainEligibility, EpisodeReviewDrainOptions, EpisodeReviewDrainResult, EpisodeReviewReceipt, FanOutOutcome, FanOutProgressEvent, FileTracingProcessorOptions, GetModelInputCapabilitiesInput, GovernedSkillSource, HandoffSignal, IdleYieldSnapshot, InvokeLlmJudgeOptions, KodaXCompactionPromptSection, KodaXCompactionPromptSnapshot, KodaXCompactionPromptVariant, KodaXDiagnostic, KodaXDiagnosticLevel, KodaXDiagnosticSink, KodaXInputCapabilityStatus, KodaXMediaErrorCode, KodaXMediaErrorOptions, KodaXModalityInputCapability, LearningCandidate, LearningIntakeRecordResult, LearningProposalReviewStatus, LearningProposalStoreReadResult, LearningRisk, LearningUserLabel, LlmJudgeFailureReason, ManagedChildCleanupSummary, ManagedChildProcessMetadata, ManagedChildRegistrationOptions, MaybeDrainMidTurnInput, MemoryExecutionContext, MemoryFrontmatter, MemoryHandoffMetadata, MemoryLearningHandoff, MemoryType, MemoryWriteOrigin, MicrocompactionConfig, ModelInputCapabilities, NormalizeImageOptions, NormalizedImage, ParsedMemoryFile, PendingEpisodeReview, PersistImageAsBlockOptions, PostCompactAttachments, PostCompactConfig, ProceduralLearningDestination, ProceduralLearningInput, ProceduralLearningResult, ProcessTreeKillOptions, ReasoningLearningHandoff, RecordProceduralLearningInput, RecoverySeed, RecoverySeedInput, ReferenceAgentExecutorFactoryOptions, RenderOptions, RestrictedWorkflowModuleInput, ReviewableLearningProposal, RouteMessageOptions, RouteMessageResult, RunFanOutOptions, RunFanOutResult, RunRestrictedWorkflowScriptOptions, RunWithIdleYieldOptions, RunWithIdleYieldRunResult, ShouldCompactInput, SkillConsumerImpact, SkillConsumerImpactScanInput, SkillGovernanceAction, SkillGovernanceDecision, SkillGovernanceInput, SkillGovernanceMode, SkillLearningApplyInput, SkillLearningProposal, SkillMutationApplyResult, SkillMutationChange, SkillOwnership, SkillSnapshotLocation, SkillTrustLedgerReadResult, SkillTrustRecord, SkillTrustState, SkillTrustUpdateInput, SkillTrustUpdateResult, SkillUsageEvent, SkillUsageEventInput, SkillUsageLedgerReadResult, SkillUsageRecord, SkillUsageRecordResult, SkillWriteOrigin, StoredLearningApplyPlan, StoredLearningApprovalResult, StoredLearningProposal, StoredSkillLearningApplyPlan, TeamModeBootstrapOptions, TeamModeHandle, TraceOnlyLearningReport, TracingProcessor, ValidateInputArtifactsOptions, ValidateRestrictedWorkflowSourceOptions, WaitForWakeEventOptions, WakeEvent, WorkflowLearningHandoff, WorkflowLearningSuggestedAction, WorkflowModuleResolver, WorkflowResultCache, WorkflowRunOutcome, WorkflowRuntimeHandle };
3215
+ export { Agent, AgentCancellationUncertainError, AgentExecutorFactory, AgentExecutorPlane, AgentExecutorPlaneStore, AgentManifest, AgentMessage, AgentStartUncertainError, CAPABILITY_CACHE_FILENAME, COMPACTION_SUMMARY_PREFIX, CONTEXT_SAFETY_FLOOR_TOKENS, CONTEXT_SAFETY_RATIO, CORE_INVARIANTS, CapabilityCache, CapabilityCacheSource, ChildTaskRegistry, CompactionConfig, CompactionDetails, CompactionResult, ConsoleTracingProcessor, ContextCapacityError, CreateAgentExecutorPlaneOptions, DEFAULT_CONTEXT_WINDOW, DEFAULT_IDLE_YIELD_MAX_ITERATIONS, DEFAULT_MICROCOMPACTION_CONFIG, DEFAULT_POST_COMPACT_CONFIG, DEFAULT_SUMMARY_PROMPT, DEFAULT_UPDATE_SUMMARY_PROMPT, DiscoveredInstance, ExternalAgentProtocol, FileExtensionStore, FileTracingProcessor, HARDENED_ENV_VARS, HARDENING_OPT_OUT_ENV, Handoff, ImageResizeError, InstanceDiscoveryFs, InvariantId, KODAX_FILE_MEDIA_TYPES, KODAX_IMAGE_MEDIA_TYPES, KODAX_VIDEO_MEDIA_TYPES, KodaXExtensionStore, KodaXExtensionStoreEntry, KodaXFileInputArtifact, KodaXGoalEventType, KodaXGoalState, KodaXImageBlock, KodaXImageInputArtifact, KodaXImageMediaType, KodaXInputArtifact, KodaXInputArtifactSource, KodaXJsonValue, KodaXMediaError, KodaXMemoryOutcomeDigest, KodaXMessage, KodaXSessionArtifactLedgerEntry, KodaXSessionEntry, KodaXSessionGoalEntry, KodaXSessionLineage, KodaXTaskResultMetadata, KodaXTaskResultSource, KodaXToolDefinition, KodaXToolUseBlock, KodaXVideoInputArtifact, KodaXVideoMediaType, MAX_DIMENSION, MAX_ENTRYPOINT_BYTES, MAX_ENTRYPOINT_LINES, MAX_SKILL_MD_BYTES, MAX_SKILL_SUPPORT_FILE_BYTES, MEMORY_POLICY_VERSION, ManifestPatch, MemoryActionProposal, MemoryApplicability, MemoryApplyResult, MemoryBodySnapshot, MemoryContextIdentity, MemoryControlPlane, MemoryController, MemoryCuratorInput, MemoryEpisodeReviewResult, MemoryEvent, MemoryGovernanceReport, MemoryItemRef, MemoryLifecycleOperationResult, MemoryPack, MemoryPackInput, MemoryRefFilter, MemoryRejectResult, MemoryReviewInput, MemoryReviewPlan, MemoryReviewRunner, MessageMode, MessagePriority, MessageQueue, PASTE_TMP_DIR_ENV, PASTE_TMP_TTL_MS, POST_COMPACT_MAX_TOKENS_PER_FILE, POST_COMPACT_TOKEN_BUDGET, PROTECTED_TOOL_NAMES, QualityInvariant, QueuedInputArtifact, QueuedInputArtifactError, QueuedMessage, RunnerToolCall, RunnerToolResult, SessionMeta, SessionStateSnapshot, SkillSource, Span, StateWriter, StateWriterFs, StopHookContext, StopHookFn, StopHookResult, TARGET_RAW_SIZE_BYTES, Trace, WorkflowAbortError, WorkflowAgentBackend, WorkflowApi, WorkflowBudgetError, WorkflowEvent, WorkflowLimitError, WorkflowLimits, WorkflowLogEvent, WorkflowModule, WorkflowRunState, WorkflowScriptExecutionError, WorkflowScriptManifest, WorkflowTaskFailedError, WorkflowTaskResult, YIELD_TOOL_NAMES, _emitSpanEnd, _emitSpanStart, _emitTraceEnd, _getRegisteredProcessors, _resetAdmissionMetrics, _resetInvariantRegistry, addTracingProcessor, appendGoalEntry, appendMemoryClientNotice, appendMemoryOutcomeDigest, appendMemoryReviewReceipt, applyManifestPatch, applyProcessHardening, applySkillLearningProposal, approveStoredLearningProposal, bootstrapTeamMode, buildCompactionPromptSnapshot, buildFileContentMessages, buildOtherInstancesPromptBlock, buildPostCompactAttachments, buildRecoverySeed, calculateContextSafetyMargin, calculateMaxContextInputTokens, canMarkCreatedByAgent, cleanupRegisteredManagedChildren, clearCapabilityCache, compact, completeEpisodeReview, composeIdleYieldUserMessage, composePatches, computeSkillConsumerImpact, countLastAssistantToolCalls, createAgentExecutorPlane, createExtensionStore, createFileArtifactFromPath, createImageArtifactFromPath, createLlmJudgedStopHook, createMemoryAgentExecutorPlaneStore, createMemoryControlPlane, createReferenceAgentExecutorFactory, createRestrictedWorkflowModule, createVideoArtifactFromPath, createWorkflowRuntime, decideSkillGovernance, detectHandoffSignal, detectIdleYield, drainPendingEpisodeReviews, editDistance, emitHandoffSpan, emitKodaXDiagnostic, enqueueChildTaskNotification, enqueueWithArtifacts, evidenceTrail, exceedsContextCapacity, finalOwner, findFuzzyToolMatch, formatKodaXDiagnostic, generateSummary, getActiveTeamModeWriter, getAdmissionMetricsSnapshot, getCachedRejectedEfforts, getCapabilityCacheFile, getInvariant, getModelInputCapabilities, gracefulCompactDegradation, handoffLegality, hashCwd, inferImageMediaType, inferVideoMediaType, injectPostCompactAttachments, invokeLlmJudge, isAdmissionDebugEnabled, isAutoManagedMemoryFile, isChildProcessExited, isEmptyLikeSummary, isGoalEntry, isIdleYieldEnabled, killChildProcessTree, killChildProcessTreeSync, killPidTree, killPidTreeSync, listPendingEpisodeReviews, listRegisteredInvariants, loadCapabilityCache, maybeDrainMidTurn, microcompact, midTurnDrainPriority, needsCompaction, normalizePastedImage, normalizeRecoveryPrompt, normalizeWorkflowLimits, parseMemoryFile, parseMemoryType, parseMemoryTypeFromFilename, parseScalarFields, persistImageAsBlock, persistPendingEpisodeReview, prunePasteTmpDir, readAndNormalizeClipboardImage, readClipboardImage, readLatestGoalFromBranch, readLatestGoalState, readLearningProposalStore, readSkillTrustLedger, readSkillUsageLedger, recordCompletedTurnLearning, recordProceduralLearning, recordRejectedEffort, recordSkillUsage, registerCoreInvariants, registerInvariant, registerManagedChildProcess, replaceSystemMessage, resetCapabilityCacheMemoForTesting, resolveContextWindow, resolveEffectiveInvariants, resolveLearningProposalStore, resolveMemoryEntrypoint, resolveMemoryRoot, resolveRequiredInvariants, resolveScopedMemoryRoot, resolveSkillSnapshotLocation, resolveSkillTrustLedger, resolveSkillUsageLedger, rewindPendingEpisodeReviews, routeMessage, runFanOut, runRestrictedWorkflowScript, runWithIdleYield, runWorkflow, sanitizeProjectKey, serializeConversation, setActiveTeamModeWriter, setKodaXDiagnosticSink, setTracingProcessors, shouldCompact, shutdownTracing, stripHardenedEnvVars, triageProceduralLearning, truncateEntrypointContent, tryGitRemote, updateActiveTeamMode, updateLearningProposalStatus, updateSkillTrustLedger, upsertLearningProposal, validateInputArtifactsForModel, validateRestrictedWorkflowSource, waitForChildProcessExit, waitForWakeEvent };
3216
+ export type { AdmissionMetricsSnapshot, ApproveStoredLearningProposalOptions, CompletedTurnLearningCandidate, CompletedTurnLearningInput, CompletedTurnLearningRecordResult, ConsoleTracingProcessorOptions, ContextCapacityInput, CreateFileArtifactFromPathOptions, CreateImageArtifactFromPathOptions, CreateLlmJudgedStopHookOptions, CreateMemoryControlPlaneOptions, CreateVideoArtifactFromPathOptions, CreateWorkflowRuntimeOptions, DiscardedLearningReport, DurableMemoryScope, EnqueueChildTaskNotificationInput, EnqueueWithArtifactsInput, EntrypointTruncation, EnvelopeAggregateCapacityContext, EnvelopeAggregateEnforcer, EpisodeReviewDrainEligibility, EpisodeReviewDrainOptions, EpisodeReviewDrainResult, EpisodeReviewReceipt, FanOutOutcome, FanOutProgressEvent, FileTracingProcessorOptions, GetModelInputCapabilitiesInput, GovernedSkillSource, HandoffSignal, IdleYieldSnapshot, InvokeLlmJudgeOptions, KodaXCompactionPromptSection, KodaXCompactionPromptSnapshot, KodaXCompactionPromptVariant, KodaXDiagnostic, KodaXDiagnosticLevel, KodaXDiagnosticSink, KodaXInputCapabilityStatus, KodaXMediaErrorCode, KodaXMediaErrorOptions, KodaXModalityInputCapability, LearningCandidate, LearningIntakeRecordResult, LearningProposalReviewStatus, LearningProposalStoreReadResult, LearningRisk, LearningUserLabel, LlmJudgeFailureReason, ManagedChildCleanupSummary, ManagedChildProcessMetadata, ManagedChildRegistrationOptions, MaybeDrainMidTurnInput, MemoryExecutionContext, MemoryFrontmatter, MemoryHandoffMetadata, MemoryLearningHandoff, MemoryType, MemoryWriteOrigin, MicrocompactionConfig, ModelInputCapabilities, NormalizeImageOptions, NormalizedImage, ParsedMemoryFile, PendingEpisodeReview, PersistImageAsBlockOptions, PostCompactAttachments, PostCompactConfig, ProceduralLearningDestination, ProceduralLearningInput, ProceduralLearningResult, ProcessTreeKillOptions, ReasoningLearningHandoff, RecordProceduralLearningInput, RecoverySeed, RecoverySeedInput, ReferenceAgentExecutorFactoryOptions, RenderOptions, RestrictedWorkflowModuleInput, ReviewableLearningProposal, RouteMessageOptions, RouteMessageResult, RunFanOutOptions, RunFanOutResult, RunRestrictedWorkflowScriptOptions, RunWithIdleYieldOptions, RunWithIdleYieldRunResult, ShouldCompactInput, SkillConsumerImpact, SkillConsumerImpactScanInput, SkillGovernanceAction, SkillGovernanceDecision, SkillGovernanceInput, SkillGovernanceMode, SkillLearningApplyInput, SkillLearningProposal, SkillMutationApplyResult, SkillMutationChange, SkillOwnership, SkillSnapshotLocation, SkillTrustLedgerReadResult, SkillTrustRecord, SkillTrustState, SkillTrustUpdateInput, SkillTrustUpdateResult, SkillUsageEvent, SkillUsageEventInput, SkillUsageLedgerReadResult, SkillUsageRecord, SkillUsageRecordResult, SkillWriteOrigin, StoredLearningApplyPlan, StoredLearningApprovalResult, StoredLearningProposal, StoredSkillLearningApplyPlan, TeamModeBootstrapOptions, TeamModeHandle, TraceOnlyLearningReport, TracingProcessor, ValidateInputArtifactsOptions, ValidateRestrictedWorkflowSourceOptions, WaitForWakeEventOptions, WakeEvent, WorkflowLearningHandoff, WorkflowLearningSuggestedAction, WorkflowModuleResolver, WorkflowResultCache, WorkflowRunOutcome, WorkflowRuntimeHandle };
package/dist/sdk-agent.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
2
- import{$ as Go,$a as Kr,$b as Mf,$c as Mm,A as mo,Aa as br,Ab as cf,Ac as dm,Ad as dp,B as po,Ba as cr,Bb as df,Bc as gm,Bd as gp,C as to,Ca as dr,Cb as gf,Cc as hm,Cd as hp,D as xo,Da as gr,Db as hf,Dc as im,Dd as ip,E as ao,Ea as hr,Eb as jf,Ec as jm,Ed as jp,F as bo,Fa as ir,Fb as kf,Fc as km,Fd as kp,G as co,Ga as jr,Gb as lf,Gc as lm,Gd as lp,H as go,Ha as kr,Hb as nf,Hc as nm,Hd as np,I as ho,Ia as lr,Ib as qf,Ic as qm,Id as qp,J as io,Ja as nr,Jb as sf,Jc as sm,Jd as sp,K as jo,Ka as qr,Kb as uf,Kc as um,Kd as up,L as ko,La as sr,Lb as vf,Lc as vm,M as lo,Ma as ur,Mb as wf,Mc as wm,N as no,Na as vr,Nb as yf,Nc as ym,O as qo,Oa as wr,Ob as zf,Oc as zm,P as so,Pa as yr,Pb as Af,Pc as Am,Q as uo,Qa as zr,Qb as Bf,Qc as Bm,R as vo,Ra as Ar,Rb as Cf,Rc as Cm,S as wo,Sa as Br,Sb as Df,Sc as Dm,T as yo,Ta as Cr,Tb as Ef,Tc as Em,U as zo,Ua as Dr,Ub as Ff,Uc as Fm,V as Ao,Va as Er,Vb as Gf,Vc as Gm,W as Bo,Wa as Fr,Wb as Hf,Wc as Hm,X as Co,Xa as Gr,Xb as If,Xc as Im,Y as Do,Ya as Hr,Yb as Jf,Yc as Jm,Z as Eo,Za as Ir,Zb as Kf,Zc as Km,_ as Fo,_a as Jr,_b as Lf,_c as Lm,a as D,aa as Ho,ab as Lr,ac as Nf,ad as Nm,b as E,ba as Io,bb as Mr,bc as Of,bd as Om,c as F,ca as Jo,cb as Nr,cc as Pf,cd as Pm,d as G,da as Ko,db as Or,dc as Qf,dd as Qm,e as H,ea as Lo,eb as Pr,ec as Rf,ed as Rm,f as I,fa as Mo,fb as Qr,fc as Sf,fd as Sm,g as J,ga as No,gb as Rr,gc as Tf,gd as Tm,h as K,ha as Oo,hb as Sr,hc as Uf,hd as Um,i as L,ia as Po,ib as Tr,ic as Vf,id as Vm,j as M,ja as Qo,jb as Ur,jc as Wf,jd as Wm,k as N,ka as Ro,kb as Vr,kc as Xf,kd as Xm,l as O,la as So,lb as Wr,lc as Yf,ld as Ym,m as S,ma as To,mb as Xr,mc as Zf,md as Zm,n as T,na as Uo,nb as Yr,nc as _f,nd as _m,o as U,oa as Vo,ob as Zr,oc as $f,od as $m,p as V,pa as Wo,pb as _r,pc as om,pd as op,q as W,qa as Xo,qb as of,qc as rm,qd as rp,r as X,ra as Yo,rb as rf,rc as em,rd as ep,s as Y,sa as Zo,sb as ef,sc as fm,sd as fp,t as Z,ta as _o,tb as ff,tc as mm,td as mp,u as _,ua as fr,ub as mf,uc as pm,ud as pp,v as $,va as mr,vb as pf,vc as tm,vd as tp,w as oo,wa as pr,wb as tf,wc as xm,wd as xp,x as ro,xa as tr,xb as xf,xc as am,xd as ap,y as eo,ya as xr,yb as af,yc as bm,yd as bp,z as fo,za as ar,zb as bf,zc as cm,zd as cp}from"./chunks/chunk-67XJ4YUA.js";import{$ as Qe,A as ne,B as qe,C as se,D as ue,E as ve,I as we,J as ye,K as ze,L as Ae,M as Be,N as Ce,O as De,P as Ee,Q as Fe,R as Ge,S as He,T as Ie,U as Je,V as Ke,W as Le,X as Me,Y as Ne,Z as Oe,_ as Pe,a as P,aa as Re,b as Q,ba as Se,c as R,ca as Te,d as $o,da as Ue,e as or,ea as Ve,f as rr,fa as We,g as er,ga as Xe,h as $r,ha as Ye,i as oe,ia as Ze,j as re,ja as _e,k as ee,ka as $e,l as fe,m as me,n as pe,o as te,p as xe,q as ae,r as be,s as ce,t as de,u as ge,v as he,w as ie,x as je,y as ke,z as le}from"./chunks/chunk-5GL55MOH.js";import{A as u,B as v,C as w,D as y,E as z,F as A,G as B,H as C,a as o,b as r,c as e,d as f,e as m,f as p,g as t,h as x,i as a,j as b,k as c,l as d,m as g,n as h,o as i,p as j,v as k,w as l,x as n,y as q,z as s}from"./chunks/chunk-PZTG2C33.js";import"./chunks/chunk-ONUPGMER.js";export{vr as ASK_USER_BACK_SIGNAL,wr as ASK_USER_CUSTOM_INPUT_SIGNAL,qp as AgentCancellationUncertainError,np as AgentStartUncertainError,fr as CAPABILITY_CACHE_FILENAME,Dm as COMPACTION_SUMMARY_PREFIX,Zo as CORE_INVARIANTS,po as ConsoleTracingProcessor,Pm as DEFAULT_CONTEXT_WINDOW,Jr as DEFAULT_IDLE_YIELD_MAX_ITERATIONS,Hm as DEFAULT_MICROCOMPACTION_CONFIG,Zf as DEFAULT_POST_COMPACT_CONFIG,ym as DEFAULT_SUMMARY_PROMPT,qo as DEFAULT_SYSTEM_CAP,zm as DEFAULT_UPDATE_SUMMARY_PROMPT,V as DefaultSummaryCompaction,Lm as FileExtensionStore,to as FileTracingProcessor,Ho as GuardrailBlockedError,Io as GuardrailEscalateError,cr as HARDENED_ENV_VARS,dr as HARDENING_OPT_OUT_ENV,r as ImageResizeError,zo as InvariantSession,L as KODAX_API_MIN_INTERVAL,E as KODAX_DEFAULT_TIMEOUT,n as KODAX_FILE_MEDIA_TYPES,F as KODAX_HARD_TIMEOUT,k as KODAX_IMAGE_MEDIA_TYPES,I as KODAX_MAX_INCOMPLETE_RETRIES,J as KODAX_MAX_MAXTOKENS_RETRIES,G as KODAX_MAX_RETRIES,D as KODAX_MAX_TOKENS,H as KODAX_RETRY_BASE_DELAY,K as KODAX_STAGGER_DELAY,l as KODAX_VIDEO_MEDIA_TYPES,o as KodaXMediaError,Pf as LINEAGE_ENTRY_TYPES,Rf as LineageCompaction,Qf as LineageExtension,x as MAX_DIMENSION,je as MAX_ENTRYPOINT_BYTES,ie as MAX_ENTRYPOINT_LINES,ff as MAX_SKILL_MD_BYTES,mf as MAX_SKILL_SUPPORT_FILE_BYTES,Bo as MAX_TOOL_LOOP_ITERATIONS,ee as MEMORY_POLICY_VERSION,zf as McpAuthRequiredError,Lf as McpCapabilityProvider,yf as McpExpiredSessionError,Mf as McpManager,Kf as McpServerRuntime,We as MemoryControlPlane,u as MessageQueue,g as PASTE_TMP_DIR_ENV,h as PASTE_TMP_TTL_MS,Yf as POST_COMPACT_MAX_TOKENS_PER_FILE,Xf as POST_COMPACT_TOKEN_BUDGET,M as PROMISE_PATTERN,Cm as PROTECTED_TOOL_NAMES,Dr as QueuedInputArtifactError,Uo as Runner,Me as SkillExecutor,Ie as SkillRegistry,W as SpanImpl,a as TARGET_RAW_SIZE_BYTES,fo as Tracer,Fe as VariableResolver,fp as WORKFLOW_CAPSULE_API_VERSION,rp as WORKFLOW_CAPSULE_FORMAT,ep as WORKFLOW_CAPSULE_VERSION,Vm as WORKFLOW_PATTERN_IDS,ap as WorkflowAbortError,cp as WorkflowBudgetError,Rm as WorkflowEventRecorder,bp as WorkflowLimitError,Zm as WorkflowScriptExecutionError,dp as WorkflowTaskFailedError,y as YIELD_TOOL_NAMES,oo as _emitSpanEnd,$ as _emitSpanStart,ro as _emitTraceEnd,_ as _getRegisteredProcessors,lo as _resetAdmissionMetrics,yo as _resetAdmittedAgentBindings,ho as _resetInvariantRegistry,w as _resetMessageQueueForTests,So as _resetPresetDispatchers,Y as addTracingProcessor,lm as appendGoalEntry,Uf as appendMemoryClientNotice,Sf as appendMemoryOutcomeDigest,Tf as appendMemoryReviewReceipt,tm as appendSessionLineageLabel,am as applyLineageTruncation,xo as applyManifestPatch,gr as applyProcessHardening,xm as applySessionCompaction,tf as applySkillLearningProposal,xf as approveStoredLearningProposal,im as archiveOldIslands,zr as asSingleSelection,Ym as assertRestrictedWorkflowQuality,Ur as bootstrapTeamMode,Fo as buildAssistantMessageFromLlmResult,Am as buildCompactionPromptSnapshot,om as buildFileContentMessages,Jf as buildInitializeCapabilities,Qr as buildOtherInstancesPromptBlock,_f as buildPostCompactAttachments,Km as buildRecoverySeed,gm as buildSessionTree,To as buildSystemPrompt,Go as buildToolResultMessage,xp as buildWorkflowCapsuleIntent,rf as canMarkCreatedByAgent,Wr as cleanupIncompleteToolCalls,ur as cleanupRegisteredManagedChildren,ar as clearCapabilityCache,se as clearPluginSkillPaths,Jo as collectGuardrails,Gm as compact,Ze as completeEpisodeReview,Ir as composeIdleYieldUserMessage,ao as composePatches,kf as computeSkillConsumerImpact,hm as countActiveLineageMessages,Fr as countLastAssistantToolCalls,O as countTokens,S as createAgent,sp as createAgentExecutorPlane,Ne as createExecutor,Mm as createExtensionStore,p as createFileArtifactFromPath,T as createHandoff,m as createImageArtifactFromPath,U as createInMemorySession,Ao as createInvariantSessionForAgent,_r as createLlmJudgedStopHook,qf as createMcpCapabilityId,Nf as createMcpManager,Of as createMcpTestServerFixture,Af as createMcpTransport,lp as createMemoryAgentExecutorPlaneStore,Ve as createMemoryControlPlane,up as createReferenceAgentExecutorFactory,Ge as createResolver,op as createRestrictedWorkflowModule,rm as createSessionLineage,Or as createStateWriter,X as createTrace,t as createVideoArtifactFromPath,pp as createWorkflowCapsule,tp as createWorkflowModuleFromCapsule,Um as createWorkflowProcessTracker,jp as createWorkflowRunManager,hp as createWorkflowRuntime,ef as decideSkillGovernance,nf as defaultMcpCacheDir,mo as defaultTracer,Oo as detectHandoffSignal,Gr as detectIdleYield,so as detectInstructionsInjection,Ef as discoverAuthorizationServerMetadata,Pr as discoverInstances,Ff as discoverOAuthEndpoints,Df as discoverProtectedResourceMetadata,Be as discoverSkills,De as discoverSkillsWithMonorepo,$e as drainPendingEpisodeReviews,Xr as editDistance,Qo as emitHandoffSpan,Q as emitKodaXDiagnostic,B as enqueueChildTaskNotification,C as enqueueWithArtifacts,N as estimateTokens,Wo as evidenceTrail,Eo as executeRunnerToolCall,Oe as executeSkill,Pe as expandSkillForLLM,um as extractArtifactLedger,Vo as extractAssistantTextFromMessage,qm as extractFileOps,Cf as extractInsufficientScope,Bf as extractResourceMetadataUrl,Wf as extractTitleFromMessages,Xo as finalOwner,Yr as findFuzzyToolMatch,bm as findPreviousUserEntryId,dm as forkSessionLineage,R as formatKodaXDiagnostic,Qe as formatSkillActivationMessage,Vf as generateSessionId,Bm as generateSummary,Sr as getActiveTeamModeWriter,Br as getActiveUserInteraction,ko as getAdmissionMetricsSnapshot,wo as getAdmittedAgentBindings,or as getAgentConfigHome,rr as getAgentConfigPath,er as getAppDataDir,tr as getCachedRejectedEfforts,mr as getCapabilityCacheFile,ue as getDefaultSkillPaths,kp as getDefaultWorkflowRunManager,co as getInvariant,wf as getMcpCachePaths,v as getMessageQueue,q as getModelInputCapabilities,Ce as getNestedSkillPaths,em as getSessionLineagePath,fm as getSessionMessagesFromLineage,ve as getSkillPathsFlat,Je as getSkillRegistry,Om as gracefulCompactDegradation,Yo as handoffLegality,me as hashCwd,oe as hashMemoryIdentityComponent,e as inferImageMediaType,f as inferVideoMediaType,Ke as initializeSkillRegistry,$f as injectPostCompactAttachments,Zr as invokeLlmJudge,no as isAdmissionDebugEnabled,yr as isAskUserCustomInputAnswer,be as isAutoManagedMemoryFile,ir as isChildProcessExited,Em as isEmptyLikeSummary,Sm as isFinalWorkflowProcessStatus,nm as isGoalEntry,Er as isIdleYieldEnabled,Co as isRunnableTool,Do as isRunnerLlmResult,nr as killChildProcessTree,qr as killChildProcessTreeSync,kr as killPidTree,lr as killPidTreeSync,Xm as lintRestrictedWorkflowSource,Ye as listPendingEpisodeReviews,qe as listPluginSkillPaths,go as listRegisteredInvariants,pr as loadCapabilityCache,ze as loadFullSkill,Ae as loadSkillFileContent,ye as loadSkillMetadata,If as loadValidToken,$r as matchesMemoryApplicability,A as maybeDrainMidTurn,re as memoryApplicabilityFingerprint,vm as mergeArtifactLedger,sm as mergeFileOps,Im as microcompact,z as midTurnDrainPriority,Fm as needsCompaction,Tm as normalizeHostMetadata,sf as normalizeMcpCapabilityId,b as normalizePastedImage,Jm as normalizeRecoveryPrompt,gp as normalizeWorkflowLimits,Ee as parseArguments,uf as parseMcpCapabilityId,ge as parseMemoryFile,de as parseMemoryType,ce as parseMemoryTypeFromFilename,he as parseScalarFields,we as parseSkillMarkdown,Hf as performOAuthLogin,i as persistImageAsBlock,Xe as persistPendingEpisodeReview,j as prunePasteTmpDir,d as readAndNormalizeClipboardImage,c as readClipboardImage,jm as readLatestGoalFromBranch,km as readLatestGoalState,Re as readLearningProposalStore,hf as readSkillTrustLedger,df as readSkillUsageLedger,lf as recordCompletedTurnLearning,af as recordProceduralLearning,xr as recordRejectedEffort,gf as recordSkillUsage,Cr as registerChildTask,_o as registerCoreInvariants,bo as registerInvariant,sr as registerManagedChildProcess,Gf as registerOAuthClient,le as registerPluginSkillPath,Ro as registerPresetDispatcher,Po as replaceSystemMessage,Nr as requestTaskStop,br as resetCapabilityCacheMemoForTesting,Le as resetSkillRegistry,Qm as resolveContextWindow,jo as resolveEffectiveInvariants,Te as resolveLearningProposalStore,xe as resolveMemoryEntrypoint,te as resolveMemoryRoot,io as resolveRequiredInvariants,ae as resolveScopedMemoryRoot,mm as resolveSessionLineageTarget,He as resolveSkillContent,pf as resolveSkillSnapshotLocation,cf as resolveSkillTrustLedger,bf as resolveSkillUsageLedger,_e as rewindPendingEpisodeReviews,cm as rewindSessionLineage,Mr as routeMessage,uo as runAdmissionAudit,Lr as runFanOut,Ko as runInputGuardrails,Lo as runOutputGuardrails,$m as runRestrictedWorkflowScript,No as runToolAfterGuardrails,Mo as runToolBeforeGuardrails,Kr as runWithIdleYield,ip as runWorkflow,fe as sanitizeProjectKey,vf as searchMcpCatalog,wm as serializeConversation,Rr as setActiveTeamModeWriter,Ar as setActiveUserInteraction,vo as setAdmittedAgentBindings,$o as setAgentConfigHome,P as setKodaXDiagnosticSink,pm as setSessionLineageActiveEntry,Z as setTracingProcessors,Nm as shouldCompact,eo as shutdownTracing,hr as stripHardenedEnvVars,of as triageProceduralLearning,ke as truncateEntrypointContent,pe as tryGitRemote,ne as unregisterPluginSkillPath,Tr as updateActiveTeamMode,Ue as updateLearningProposalStatus,jf as updateSkillTrustLedger,Se as upsertLearningProposal,Vr as validateAndFixToolHistory,s as validateInputArtifactsForModel,_m as validateRestrictedWorkflowSource,mp as validateWorkflowCapsule,Wm as validateWorkflowScriptManifest,jr as waitForChildProcessExit,Hr as waitForWakeEvent};
2
+ import{$ as Go,$a as Kr,$b as Mf,$c as Mm,A as mo,Aa as pr,Ab as cf,Ac as dm,Ad as dp,B as po,Ba as tr,Bb as df,Bc as gm,Bd as gp,C as to,Ca as dr,Cb as gf,Cc as hm,Cd as hp,D as xo,Da as gr,Db as hf,Dc as im,Dd as ip,E as ao,Ea as hr,Eb as jf,Ec as jm,Ed as jp,F as bo,Fa as ir,Fb as kf,Fc as km,Fd as kp,G as co,Ga as jr,Gb as lf,Gc as lm,Gd as lp,H as go,Ha as kr,Hb as nf,Hc as nm,Hd as np,I as ho,Ia as lr,Ib as qf,Ic as qm,Id as qp,J as io,Ja as nr,Jb as sf,Jc as sm,Jd as sp,K as jo,Ka as qr,Kb as uf,Kc as um,Kd as up,L as ko,La as sr,Lb as vf,Lc as vm,Ld as vp,M as lo,Ma as ur,Mb as wf,Mc as wm,Md as wp,N as no,Na as vr,Nb as yf,Nc as ym,Nd as yp,O as qo,Oa as wr,Ob as zf,Oc as zm,Od as zp,P as so,Pa as yr,Pb as Af,Pc as Am,Pd as Ap,Q as uo,Qa as zr,Qb as Bf,Qc as Bm,Qd as Bp,R as vo,Ra as Ar,Rb as Cf,Rc as Cm,Rd as Cp,S as wo,Sa as Br,Sb as Df,Sc as Dm,Sd as Dp,T as yo,Ta as Cr,Tb as Ef,Tc as Em,U as zo,Ua as Dr,Ub as Ff,Uc as Fm,V as Ao,Va as Er,Vb as Gf,Vc as Gm,W as Bo,Wa as Fr,Wb as Hf,Wc as Hm,X as Co,Xa as Gr,Xb as If,Xc as Im,Y as Do,Ya as Hr,Yb as Jf,Yc as Jm,Z as Eo,Za as Ir,Zb as Kf,Zc as Km,_ as Fo,_a as Jr,_b as Lf,_c as Lm,a as D,aa as Ho,ab as Lr,ac as Nf,ad as Nm,b as E,ba as Io,bb as Mr,bc as Of,bd as Om,c as F,ca as Jo,cb as Nr,cc as Pf,cd as Pm,d as G,da as Ko,db as Or,dc as Qf,dd as Qm,e as H,ea as Lo,eb as Pr,ec as Rf,ed as Rm,f as I,fa as Mo,fb as Qr,fc as Sf,fd as Sm,g as J,ga as No,gb as Rr,gc as Tf,gd as Tm,h as K,ha as Oo,hb as Sr,hc as Uf,hd as Um,i as L,ia as Po,ib as Tr,ic as Vf,id as Vm,j as M,ja as Qo,jb as Ur,jc as Wf,jd as Wm,k as N,ka as Ro,kb as Vr,kc as Xf,kd as Xm,l as O,la as So,lb as Wr,lc as Yf,ld as Ym,m as P,ma as To,mb as Xr,mc as Zf,md as Zm,n as Q,na as Uo,nb as Yr,nc as _f,nd as _m,o as R,oa as Vo,ob as Zr,oc as $f,od as $m,p as S,pa as Wo,pb as _r,pc as om,pd as op,q as T,qa as Xo,qb as $r,qc as rm,qd as rp,r as U,ra as Yo,rb as oe,rc as em,rd as ep,s as Y,sa as Zo,sb as re,sc as fm,sd as fp,t as Z,ta as _o,tb as ee,tc as mm,td as mp,u as _,ua as $o,ub as fe,uc as pm,ud as pp,v as $,va as or,vb as me,vc as tm,vd as tp,w as oo,wa as rr,wb as pe,wc as xm,wd as xp,x as ro,xa as er,xb as te,xc as am,xd as ap,y as eo,ya as fr,yb as af,yc as bm,yd as bp,z as fo,za as mr,zb as bf,zc as cm,zd as cp}from"./chunks/chunk-VYKFM3TB.js";import{$ as Ye,A as Ae,B as Be,C as Ce,D as De,E as Ee,I as Fe,J as Ge,K as He,L as Ie,M as Je,N as Ke,O as Le,P as Me,Q as Ne,R as Oe,S as Pe,T as Qe,U as Re,V as Se,W as Te,X as Ue,Y as Ve,Z as We,_ as Xe,a as V,aa as Ze,b as W,ba as _e,c as X,ca as $e,d as xr,da as of,e as ar,ea as rf,f as br,fa as ef,g as cr,ga as ff,h as xe,ha as mf,i as ae,ia as pf,j as be,ja as tf,k as ce,ka as xf,l as de,m as ge,n as he,o as ie,p as je,q as ke,r as le,s as ne,t as qe,u as se,v as ue,w as ve,x as we,y as ye,z as ze}from"./chunks/chunk-AWMTNUDS.js";import{A,B,C,a as o,b as r,c as e,d as f,e as m,f as p,g as t,h as x,i as a,j as b,k as c,l as d,m as g,n as h,o as i,p as j,q as k,r as l,s as n,t as q,u as s,v as u,w as v,x as w,y,z}from"./chunks/chunk-F7C7J6IM.js";import"./chunks/chunk-NGHQIGVW.js";import"./chunks/chunk-ONUPGMER.js";export{Er as ASK_USER_BACK_SIGNAL,Fr as ASK_USER_CUSTOM_INPUT_SIGNAL,Bp as AgentCancellationUncertainError,Ap as AgentStartUncertainError,dr as CAPABILITY_CACHE_FILENAME,Lm as COMPACTION_SUMMARY_PREFIX,P as CONTEXT_SAFETY_FLOOR_TOKENS,Q as CONTEXT_SAFETY_RATIO,pr as CORE_INVARIANTS,go as ConsoleTracingProcessor,R as ContextCapacityError,Xm as DEFAULT_CONTEXT_WINDOW,Rr as DEFAULT_IDLE_YIELD_MAX_ITERATIONS,Pm as DEFAULT_MICROCOMPACTION_CONFIG,pm as DEFAULT_POST_COMPACT_CONFIG,Gm as DEFAULT_SUMMARY_PROMPT,zo as DEFAULT_SYSTEM_CAP,Hm as DEFAULT_UPDATE_SUMMARY_PROMPT,$ as DefaultSummaryCompaction,Tm as FileExtensionStore,ho as FileTracingProcessor,No as GuardrailBlockedError,Oo as GuardrailEscalateError,nr as HARDENED_ENV_VARS,qr as HARDENING_OPT_OUT_ENV,r as ImageResizeError,Fo as InvariantSession,L as KODAX_API_MIN_INTERVAL,E as KODAX_DEFAULT_TIMEOUT,n as KODAX_FILE_MEDIA_TYPES,F as KODAX_HARD_TIMEOUT,k as KODAX_IMAGE_MEDIA_TYPES,I as KODAX_MAX_INCOMPLETE_RETRIES,J as KODAX_MAX_MAXTOKENS_RETRIES,G as KODAX_MAX_RETRIES,D as KODAX_MAX_TOKENS,H as KODAX_RETRY_BASE_DELAY,K as KODAX_STAGGER_DELAY,l as KODAX_VIDEO_MEDIA_TYPES,o as KodaXMediaError,Xf as LINEAGE_ENTRY_TYPES,Zf as LineageCompaction,Yf as LineageExtension,x as MAX_DIMENSION,we as MAX_ENTRYPOINT_BYTES,ve as MAX_ENTRYPOINT_LINES,df as MAX_SKILL_MD_BYTES,gf as MAX_SKILL_SUPPORT_FILE_BYTES,Ho as MAX_TOOL_LOOP_ITERATIONS,ce as MEMORY_POLICY_VERSION,Hf as McpAuthRequiredError,Tf as McpCapabilityProvider,Gf as McpExpiredSessionError,Uf as McpManager,Sf as McpServerRuntime,ef as MemoryControlPlane,u as MessageQueue,g as PASTE_TMP_DIR_ENV,h as PASTE_TMP_TTL_MS,mm as POST_COMPACT_MAX_TOKENS_PER_FILE,fm as POST_COMPACT_TOKEN_BUDGET,M as PROMISE_PATTERN,Km as PROTECTED_TOOL_NAMES,Lr as QueuedInputArtifactError,or as Runner,Ue as SkillExecutor,Qe as SkillRegistry,oo as SpanImpl,a as TARGET_RAW_SIZE_BYTES,bo as Tracer,Ne as VariableResolver,dp as WORKFLOW_CAPSULE_API_VERSION,bp as WORKFLOW_CAPSULE_FORMAT,cp as WORKFLOW_CAPSULE_VERSION,rp as WORKFLOW_PATTERN_IDS,kp as WorkflowAbortError,np as WorkflowBudgetError,Zm as WorkflowEventRecorder,lp as WorkflowLimitError,pp as WorkflowScriptExecutionError,qp as WorkflowTaskFailedError,y as YIELD_TOOL_NAMES,to as _emitSpanEnd,po as _emitSpanStart,xo as _emitTraceEnd,mo as _getRegisteredProcessors,wo as _resetAdmissionMetrics,Eo as _resetAdmittedAgentBindings,qo as _resetInvariantRegistry,w as _resetMessageQueueForTests,_o as _resetPresetDispatchers,eo as addTracingProcessor,zm as appendGoalEntry,om as appendMemoryClientNotice,_f as appendMemoryOutcomeDigest,$f as appendMemoryReviewReceipt,im as appendSessionLineageLabel,km as applyLineageTruncation,io as applyManifestPatch,sr as applyProcessHardening,jm as applySessionCompaction,jf as applySkillLearningProposal,kf as approveStoredLearningProposal,vm as archiveOldIslands,Hr as asSingleSelection,mp as assertRestrictedWorkflowQuality,Xo as attachRunnerRecoveryTranscript,oe as bootstrapTeamMode,Lo as buildAssistantMessageFromLlmResult,Im as buildCompactionPromptSnapshot,am as buildFileContentMessages,Rf as buildInitializeCapabilities,Yr as buildOtherInstancesPromptBlock,tm as buildPostCompactAttachments,Sm as buildRecoverySeed,sm as buildSessionTree,$o as buildSystemPrompt,Mo as buildToolResultMessage,jp as buildWorkflowCapsuleIntent,S as calculateContextSafetyMargin,U as calculateMaxContextInputTokens,bf as canMarkCreatedByAgent,ee as cleanupIncompleteToolCalls,Dr as cleanupRegisteredManagedChildren,kr as clearCapabilityCache,Ce as clearPluginSkillPaths,Po as collectGuardrails,Om as compact,pf as completeEpisodeReview,Qr as composeIdleYieldUserMessage,jo as composePatches,yf as computeSkillConsumerImpact,um as countActiveLineageMessages,Nr as countLastAssistantToolCalls,O as countTokens,Y as createAgent,Cp as createAgentExecutorPlane,Ve as createExecutor,Um as createExtensionStore,p as createFileArtifactFromPath,Z as createHandoff,m as createImageArtifactFromPath,_ as createInMemorySession,Go as createInvariantSessionForAgent,te as createLlmJudgedStopHook,Bf as createMcpCapabilityId,Vf as createMcpManager,Wf as createMcpTestServerFixture,If as createMcpTransport,zp as createMemoryAgentExecutorPlaneStore,rf as createMemoryControlPlane,Dp as createReferenceAgentExecutorFactory,Oe as createResolver,ap as createRestrictedWorkflowModule,bm as createSessionLineage,Wr as createStateWriter,ro as createTrace,t as createVideoArtifactFromPath,hp as createWorkflowCapsule,ip as createWorkflowModuleFromCapsule,op as createWorkflowProcessTracker,wp as createWorkflowRunManager,up as createWorkflowRuntime,cf as decideSkillGovernance,Af as defaultMcpCacheDir,co as defaultTracer,Uo as detectHandoffSignal,Or as detectIdleYield,Ao as detectInstructionsInjection,Mf as discoverAuthorizationServerMetadata,Xr as discoverInstances,Nf as discoverOAuthEndpoints,Lf as discoverProtectedResourceMetadata,Je as discoverSkills,Le as discoverSkillsWithMonorepo,xf as drainPendingEpisodeReviews,fe as editDistance,Wo as emitHandoffSpan,W as emitKodaXDiagnostic,B as enqueueChildTaskNotification,C as enqueueWithArtifacts,N as estimateTokens,er as evidenceTrail,T as exceedsContextCapacity,Ko as executeRunnerToolCall,We as executeSkill,Xe as expandSkillForLLM,Dm as extractArtifactLedger,rr as extractAssistantTextFromMessage,Bm as extractFileOps,Kf as extractInsufficientScope,Jf as extractResourceMetadataUrl,em as extractTitleFromMessages,fr as finalOwner,me as findFuzzyToolMatch,lm as findPreviousUserEntryId,qm as forkSessionLineage,X as formatKodaXDiagnostic,Ye as formatSkillActivationMessage,rm as generateSessionId,Jm as generateSummary,_r as getActiveTeamModeWriter,Jr as getActiveUserInteraction,vo as getAdmissionMetricsSnapshot,Do as getAdmittedAgentBindings,ar as getAgentConfigHome,br as getAgentConfigPath,cr as getAppDataDir,ir as getCachedRejectedEfforts,gr as getCapabilityCacheFile,De as getDefaultSkillPaths,yp as getDefaultWorkflowRunManager,lo as getInvariant,Ff as getMcpCachePaths,v as getMessageQueue,q as getModelInputCapabilities,Ke as getNestedSkillPaths,cm as getSessionLineagePath,dm as getSessionMessagesFromLineage,Ee as getSkillPathsFlat,Re as getSkillRegistry,Wm as gracefulCompactDegradation,mr as handoffLegality,ge as hashCwd,ae as hashMemoryIdentityComponent,e as inferImageMediaType,f as inferVideoMediaType,Se as initializeSkillRegistry,xm as injectPostCompactAttachments,pe as invokeLlmJudge,yo as isAdmissionDebugEnabled,Gr as isAskUserCustomInputAnswer,le as isAutoManagedMemoryFile,vr as isChildProcessExited,Mm as isEmptyLikeSummary,_m as isFinalWorkflowProcessStatus,Am as isGoalEntry,Mr as isIdleYieldEnabled,Io as isRunnableTool,Jo as isRunnerLlmResult,Ar as killChildProcessTree,Br as killChildProcessTreeSync,yr as killPidTree,zr as killPidTreeSync,fp as lintRestrictedWorkflowSource,mf as listPendingEpisodeReviews,Be as listPluginSkillPaths,no as listRegisteredInvariants,hr as loadCapabilityCache,He as loadFullSkill,Ie as loadSkillFileContent,Ge as loadSkillMetadata,Qf as loadValidToken,xe as matchesMemoryApplicability,A as maybeDrainMidTurn,be as memoryApplicabilityFingerprint,Em as mergeArtifactLedger,Cm as mergeFileOps,Qm as microcompact,z as midTurnDrainPriority,Nm as needsCompaction,$m as normalizeHostMetadata,Cf as normalizeMcpCapabilityId,b as normalizePastedImage,Rm as normalizeRecoveryPrompt,sp as normalizeWorkflowLimits,Me as parseArguments,Df as parseMcpCapabilityId,se as parseMemoryFile,qe as parseMemoryType,ne as parseMemoryTypeFromFilename,ue as parseScalarFields,Fe as parseSkillMarkdown,Pf as performOAuthLogin,i as persistImageAsBlock,ff as persistPendingEpisodeReview,j as prunePasteTmpDir,d as readAndNormalizeClipboardImage,c as readClipboardImage,wm as readLatestGoalFromBranch,ym as readLatestGoalState,Ze as readLearningProposalStore,Yo as readRunnerRecoveryTranscript,vf as readSkillTrustLedger,sf as readSkillUsageLedger,zf as recordCompletedTurnLearning,lf as recordProceduralLearning,jr as recordRejectedEffort,uf as recordSkillUsage,Kr as registerChildTask,tr as registerCoreInvariants,ko as registerInvariant,Cr as registerManagedChildProcess,Of as registerOAuthClient,ze as registerPluginSkillPath,Zo as registerPresetDispatcher,Vo as replaceSystemMessage,Vr as requestTaskStop,lr as resetCapabilityCacheMemoForTesting,Te as resetSkillRegistry,Ym as resolveContextWindow,uo as resolveEffectiveInvariants,$e as resolveLearningProposalStore,je as resolveMemoryEntrypoint,ie as resolveMemoryRoot,so as resolveRequiredInvariants,ke as resolveScopedMemoryRoot,gm as resolveSessionLineageTarget,Pe as resolveSkillContent,hf as resolveSkillSnapshotLocation,qf as resolveSkillTrustLedger,nf as resolveSkillUsageLedger,tf as rewindPendingEpisodeReviews,nm as rewindSessionLineage,Ur as routeMessage,Bo as runAdmissionAudit,Tr as runFanOut,Qo as runInputGuardrails,Ro as runOutputGuardrails,xp as runRestrictedWorkflowScript,To as runToolAfterGuardrails,So as runToolBeforeGuardrails,Sr as runWithIdleYield,vp as runWorkflow,de as sanitizeProjectKey,Ef as searchMcpCatalog,Fm as serializeConversation,Zr as setActiveTeamModeWriter,Ir as setActiveUserInteraction,Co as setAdmittedAgentBindings,xr as setAgentConfigHome,V as setKodaXDiagnosticSink,hm as setSessionLineageActiveEntry,fo as setTracingProcessors,Vm as shouldCompact,ao as shutdownTracing,ur as stripHardenedEnvVars,af as triageProceduralLearning,ye as truncateEntrypointContent,he as tryGitRemote,Ae as unregisterPluginSkillPath,$r as updateActiveTeamMode,of as updateLearningProposalStatus,wf as updateSkillTrustLedger,_e as upsertLearningProposal,re as validateAndFixToolHistory,s as validateInputArtifactsForModel,tp as validateRestrictedWorkflowSource,gp as validateWorkflowCapsule,ep as validateWorkflowScriptManifest,wr as waitForChildProcessExit,Pr as waitForWakeEvent};