@kodax-ai/kodax 0.7.48 → 0.7.50

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 (50) hide show
  1. package/CHANGELOG.md +1773 -1720
  2. package/README.md +91 -35
  3. package/README_CN.md +70 -23
  4. package/dist/builtin/code-review/SKILL.md +1 -1
  5. package/dist/chunks/argument-completer-3WX5B42G.js +2 -0
  6. package/dist/chunks/chunk-5UJQ2GKJ.js +574 -0
  7. package/dist/chunks/chunk-HR64F32V.js +2 -0
  8. package/dist/chunks/chunk-MFOMFMSK.js +1056 -0
  9. package/dist/chunks/{chunk-DEODZG6Q.js → chunk-SK4HOYT2.js} +1 -1
  10. package/dist/chunks/chunk-UB5IAZHF.js +476 -0
  11. package/dist/chunks/chunk-XZY4CIDV.js +31 -0
  12. package/dist/chunks/chunk-YJLRBIEW.js +301 -0
  13. package/dist/chunks/{compaction-config-YWCHOP2U.js → compaction-config-DDJSQ4OT.js} +1 -1
  14. package/dist/chunks/{construction-bootstrap-AIWATBWW.js → construction-bootstrap-4QNM2BVM.js} +1 -1
  15. package/dist/chunks/{dist-IDNOAB4M.js → dist-OJSNNI7P.js} +1 -1
  16. package/dist/chunks/dist-T256OSDI.js +2 -0
  17. package/dist/chunks/{utils-OG57XTPC.js → utils-JHIEOX6Z.js} +1 -1
  18. package/dist/index.d.ts +11 -11
  19. package/dist/index.js +2 -2
  20. package/dist/kodax_cli.js +1406 -892
  21. package/dist/provider-capabilities.json +193 -190
  22. package/dist/sdk-agent.d.ts +213 -103
  23. package/dist/sdk-agent.js +1 -1
  24. package/dist/sdk-coding.d.ts +644 -33
  25. package/dist/sdk-coding.js +1 -1
  26. package/dist/sdk-llm.d.ts +5 -5
  27. package/dist/sdk-llm.js +1 -1
  28. package/dist/sdk-mcp.js +1 -1
  29. package/dist/sdk-repl.d.ts +36 -13
  30. package/dist/sdk-repl.js +2 -2
  31. package/dist/sdk-session.d.ts +32 -5
  32. package/dist/sdk-session.js +1 -1
  33. package/dist/sdk-skills.js +1 -1
  34. package/dist/types-chunks/{base.d-BdJKSPO2.d.ts → base.d-C4jYVjJh.d.ts} +2 -1
  35. package/dist/types-chunks/{bash-prefix-extractor.d-DNO2-ycp.d.ts → bash-prefix-extractor.d-B0CIb0N3.d.ts} +137 -23
  36. package/dist/types-chunks/{file-tracker.d-D7L_SbRm.d.ts → capsule.d-CwBEm6M-.d.ts} +173 -5
  37. package/dist/types-chunks/{types.d-BCnbYG_A.d.ts → process.d-BbiXD24v.d.ts} +502 -4
  38. package/dist/types-chunks/{resolver.d-DkgJlEzr.d.ts → resolver.d-CQfaJbht.d.ts} +24 -6
  39. package/dist/types-chunks/{storage.d-B1Jk6ryM.d.ts → storage.d-J2GqOgaX.d.ts} +4 -1
  40. package/dist/types-chunks/{types.d-B_MIIApc.d.ts → types.d-BnjX2Gn4.d.ts} +6 -1
  41. package/dist/types-chunks/{types.d-Cf-GCzac.d.ts → types.d-rPRl2LSB.d.ts} +4 -0
  42. package/dist/types-chunks/{utils.d-Dgy5SVrq.d.ts → utils.d-D_-jrRku.d.ts} +44 -8
  43. package/package.json +1 -1
  44. package/dist/chunks/chunk-66B6ZOU7.js +0 -31
  45. package/dist/chunks/chunk-6Z75SHX3.js +0 -2
  46. package/dist/chunks/chunk-EP46H5P3.js +0 -415
  47. package/dist/chunks/chunk-LNJNRREL.js +0 -903
  48. package/dist/chunks/chunk-UHAP234X.js +0 -567
  49. package/dist/chunks/dist-4WABQRJU.js +0 -2
  50. package/dist/types-chunks/types.d-C5mHR87z.d.ts +0 -119
@@ -1,15 +1,16 @@
1
- import { Y as KodaXToolDefinition, _ as KodaXToolResultContentItem, E as KodaXReasoningMode, n as KodaXMessage, a1 as KodaXToolUseBlock, g as KodaXContentBlock, r as KodaXProviderCapabilityProfile, D as KodaXReasoningCapability, R as KodaXTaskType, i as KodaXExecutionMode, Q as KodaXTaskRoutingDecision, K as KodaXAmaControllerDecision, W as KodaXThinkingDepth, X as KodaXTokenUsage } from './types-chunks/types.d-Cf-GCzac.js';
2
- export { a as KodaXAmaFanoutClass, b as KodaXAmaFanoutPolicy, c as KodaXAmaProfile, d as KodaXAmaTactic, h as KodaXCustomProviderConfig, l as KodaXImageBlock, o as KodaXModelDescriptor, q as KodaXProtocolFamily, s as KodaXProviderConfig, u as KodaXProviderConversationSemantics, x as KodaXProviderMcpSupport, A as KodaXProviderStreamOptions, C as KodaXProviderTransport, F as KodaXReasoningOverride, G as KodaXReasoningRequest, H as KodaXRedactedThinkingBlock, I as KodaXReviewScale, J as KodaXRiskLevel, L as KodaXStreamResult, N as KodaXTaskBudgetOverrides, T as KodaXTextBlock, U as KodaXThinkingBlock, V as KodaXThinkingBudgetMap, Z as KodaXToolResultBlock } from './types-chunks/types.d-Cf-GCzac.js';
3
- export { K as KODAX_DEFAULT_PROVIDER, b as KODAX_PROVIDERS, c as KODAX_PROVIDER_SNAPSHOTS, d as KODAX_REASONING_MODE_SEQUENCE, f as KodaXAnthropicCompatProvider, g as KodaXError, h as KodaXModelCapabilities, j as KodaXOpenAICompatProvider, k as KodaXProviderError, l as KodaXRateLimitError, P as ProviderName, n as buildReasoningOverrideKey, p as clearReasoningOverride, q as clearRuntimeModelProviders, r as createCustomProvider, s as getAvailableProviderNames, t as getCustomModelCapabilities, u as getCustomProvider, v as getCustomProviderList, w as getCustomProviderModelDescriptors, x as getCustomProviderModels, y as getCustomProviderNames, A as getModelCapabilities, B as getProvider, C as getProviderConfiguredCapabilityProfile, D as getProviderConfiguredReasoningCapability, E as getProviderList, F as getProviderModel, G as getProviderModelDescriptors, H as getProviderModels, J as getRuntimeModelProvider, L as getRuntimeModelProviderNames, M as isCustomProviderName, N as isKnownProvider, O as isProviderConfigured, Q as isProviderName, S as isRuntimeModelProviderName, T as listAllModelCapabilities, U as listBuiltinModelCapabilities, V as listCustomProviderModelCapabilities, X as loadReasoningOverride, _ as reasoningCapabilityToOverride, $ as reasoningOverrideToCapability, a0 as registerCustomProviders, a1 as registerModelProvider, a2 as resolveModelCapabilities, a3 as resolveProvider, a4 as resolveProviderModelDescriptors, a6 as saveReasoningOverride, a7 as validateCustomProviderConfig } from './types-chunks/resolver.d-DkgJlEzr.js';
4
- import { K as KodaXBaseProvider } from './types-chunks/base.d-BdJKSPO2.js';
1
+ import { Y as KodaXToolDefinition, _ as KodaXToolResultContentItem, E as KodaXReasoningMode, n as KodaXMessage, a1 as KodaXToolUseBlock, g as KodaXContentBlock, r as KodaXProviderCapabilityProfile, D as KodaXReasoningCapability, R as KodaXTaskType, i as KodaXExecutionMode, Q as KodaXTaskRoutingDecision, K as KodaXAmaControllerDecision, W as KodaXThinkingDepth, X as KodaXTokenUsage } from './types-chunks/types.d-rPRl2LSB.js';
2
+ export { a as KodaXAmaFanoutClass, b as KodaXAmaFanoutPolicy, c as KodaXAmaProfile, d as KodaXAmaTactic, h as KodaXCustomProviderConfig, l as KodaXImageBlock, o as KodaXModelDescriptor, q as KodaXProtocolFamily, s as KodaXProviderConfig, u as KodaXProviderConversationSemantics, x as KodaXProviderMcpSupport, A as KodaXProviderStreamOptions, C as KodaXProviderTransport, F as KodaXReasoningOverride, G as KodaXReasoningRequest, H as KodaXRedactedThinkingBlock, I as KodaXReviewScale, J as KodaXRiskLevel, L as KodaXStreamResult, N as KodaXTaskBudgetOverrides, T as KodaXTextBlock, U as KodaXThinkingBlock, V as KodaXThinkingBudgetMap, Z as KodaXToolResultBlock } from './types-chunks/types.d-rPRl2LSB.js';
3
+ export { K as KODAX_DEFAULT_PROVIDER, b as KODAX_PROVIDERS, c as KODAX_PROVIDER_SNAPSHOTS, d as KODAX_REASONING_MODE_SEQUENCE, f as KodaXAnthropicCompatProvider, g as KodaXError, h as KodaXModelCapabilities, j as KodaXOpenAICompatProvider, k as KodaXProviderError, l as KodaXRateLimitError, P as ProviderName, n as buildReasoningOverrideKey, p as clearReasoningOverride, q as clearRuntimeModelProviders, r as createCustomProvider, s as getAvailableProviderNames, t as getCustomModelCapabilities, u as getCustomProvider, v as getCustomProviderList, w as getCustomProviderModelDescriptors, x as getCustomProviderModels, y as getCustomProviderNames, A as getModelCapabilities, B as getProvider, C as getProviderConfiguredCapabilityProfile, D as getProviderConfiguredReasoningCapability, E as getProviderList, F as getProviderModel, G as getProviderModelDescriptors, H as getProviderModels, J as getRuntimeModelProvider, L as getRuntimeModelProviderNames, M as isCustomProviderName, N as isKnownProvider, O as isProviderConfigured, Q as isProviderName, S as isRuntimeModelProviderName, T as listAllModelCapabilities, U as listBuiltinModelCapabilities, V as listCustomProviderModelCapabilities, X as loadReasoningOverride, _ as reasoningCapabilityToOverride, $ as reasoningOverrideToCapability, a0 as registerCustomProviders, a1 as registerModelProvider, a2 as resolveModelCapabilities, a3 as resolveProvider, a4 as resolveProviderModelDescriptors, a6 as saveReasoningOverride, a7 as validateCustomProviderConfig } from './types-chunks/resolver.d-CQfaJbht.js';
4
+ import { K as KodaXBaseProvider } from './types-chunks/base.d-C4jYVjJh.js';
5
5
  import { C as CapabilityKind, a as CapabilityProvider, b as CapabilityResult } from './types-chunks/capability.d-3C62G8Eq.js';
6
- import { ay as KodaXToolExecutionContext, a5 as KodaXRepoIntelligenceCapability, a8 as KodaXRepoIntelligenceTrace, a6 as KodaXRepoIntelligenceMode, aa as KodaXRepoRoutingSignals, a7 as KodaXRepoIntelligenceResolvedMode, a1 as KodaXOptions, Q as KodaXInputArtifact, H as KodaXContextOptions, a4 as KodaXProviderPolicyHints, aJ as ProviderResilienceConfig, aK as ProviderResiliencePolicy, F as FailureStage, aP as ResilienceClassification, aH as ProviderExecutionState, aM as RecoveryDecision, aO as RecoveryResult, ab as KodaXResult, af as KodaXSessionControl, ag as KodaXSessionMutators, P as KodaXFanoutSchedulerPlan, N as KodaXFanoutBranchTransition, O as KodaXFanoutSchedulerInput, z as KodaXChildContextBundle, a3 as KodaXParentReductionContract, M as KodaXFanoutBranchRecord, S as KodaXManagedProtocolPayload, o as ExtensionRuntimeContract, J as KodaXEvents, h as AutoRules, a$ as ToolCallSignal, aW as SignalCollector, q as GoalCompleteResult, aR as ResolveKodaXManualInput, aS as ResolveKodaXManualOptions, aT as ResolveKodaXManualResult, W as KodaXManualTopicId } from './types-chunks/bash-prefix-extractor.d-DNO2-ycp.js';
7
- export { C as AUTO_MODE_DENIAL_CONSECUTIVE_THRESHOLD, k as AUTO_MODE_DENIAL_CUMULATIVE_THRESHOLD, A as AgentsFile, a as AutoModeAskUser, b as AutoModeAskUserVerdict, D as AutoModeDenialTracker, c as AutoModeEngine, d as AutoModeGuardrailConfig, e as AutoModeSharedState, f as AutoModeStats, g as AutoModeToolGuardrail, B as BASH_POLICY_SPEC, E as BREAKER_ERROR_THRESHOLD, b1 as BREAKER_WINDOW_MS, i as BashPrefixExtractor, j as BashPrefixResult, l as CircuitBreaker, m as CreateBashPrefixExtractorOptions, n as DiagnosticsRequest, p as ExtractCommandPrefixOptions, G as GoalBlockedResult, r as GoalCreateInput, s as GoalLifecycleContext, t as GoalRuntimeBinding, u as GoalRuntimeBindingDeps, v as GoalToolsContext, K as KodaXAgentMode, w as KodaXBudgetDisclosureZone, x as KodaXBudgetExtensionRequest, y as KodaXChildAgentResult, I as KodaXContextTokenSnapshot, L as KodaXFanoutBranchLifecycle, R as KodaXManagedBudgetSnapshot, T as KodaXManagedTask, U as KodaXManagedTaskRuntimeState, V as KodaXManagedTaskStatusEvent, X as KodaXManualTopicInput, Y as KodaXMcpConnectMode, Z as KodaXMcpServerConfig, _ as KodaXMcpServersConfig, $ as KodaXMcpTransport, a0 as KodaXMemoryStrategy, a2 as KodaXOrchestrationVerdict, a9 as KodaXRepoIntelligenceTraceEvent, ac as KodaXRoleRoundSummary, ad as KodaXRuntimeVerificationContract, ae as KodaXSelfManualConfig, ah as KodaXSessionOptions, ai as KodaXSkillInvocationContext, aj as KodaXSkillMap, ak as KodaXSkillProjectionConfidence, al as KodaXTaskCapabilityHint, am as KodaXTaskContract, an as KodaXTaskEvidenceArtifact, ao as KodaXTaskEvidenceBundle, ap as KodaXTaskEvidenceEntry, aq as KodaXTaskRole, ar as KodaXTaskRoleAssignment, as as KodaXTaskStatus, at as KodaXTaskSurface, au as KodaXTaskToolPolicy, av as KodaXTaskVerificationContract, aw as KodaXTaskVerificationCriterion, ax as KodaXTaskWorkItem, az as KodaXVerificationScorecard, aA as KodaXVerificationScorecardCriterion, aB as LSP_SERVERS, aC as LoadAgentsOptions, aD as LoadedRulesSource, aE as LspServerInfo, aF as LspService, aG as LspServiceConfig, aI as ProviderRecoveryEvent, aL as RecoveryAction, aN as RecoveryLadderStep, aQ as ResilienceErrorClass, aU as RulesLoadError, aV as RulesLoadResult, aX as SkippedRulesSource, aY as TodoItem, aZ as TodoList, a_ as TodoStatus, b0 as TrustState, bl as autoModeDenialShouldFallback, bm as breakerShouldFallback, b2 as buildGoalRuntimeBinding, b3 as collectAllSignals, b4 as computeRulesFingerprint, b8 as createAutoModeDenialTracker, b5 as createAutoModeToolGuardrail, b6 as createBashPrefixExtractor, b7 as createCircuitBreaker, b9 as extractCommandPrefix, ba as formatAgentsForPrompt, bb as getDefaultLspService, bc as getKodaxGlobalDir, bd as loadAgentsFiles, be as loadAutoRules, bf as makeDisabledGoalToolsContext, bg as parseAutoRules, bh as readTrustState, bi as recordAutoModeAllow, bj as recordAutoModeBlock, bk as recordBreakerError, bn as shutdownDefaultLspService, bo as trustProjectRules, bp as withGoalBeforeNextTurn, bq as withGoalStopHook } from './types-chunks/bash-prefix-extractor.d-DNO2-ycp.js';
8
- import { i as KodaXJsonValue, b as KodaXExtensionSessionRecord, d as KodaXExtensionStore, S as SessionErrorMetadata, g as KodaXGoalState } from './types-chunks/types.d-B_MIIApc.js';
9
- export { K as KodaXCompactMemoryProgress, a as KodaXCompactMemorySeed, c as KodaXExtensionSessionState, k as KodaXSessionArtifactLedgerEntry, l as KodaXSessionBranchSummaryEntry, m as KodaXSessionCompactionEntry, n as KodaXSessionData, o as KodaXSessionEntry, p as KodaXSessionEntryBase, r as KodaXSessionLabelEntry, s as KodaXSessionLineage, t as KodaXSessionMessageEntry, u as KodaXSessionMeta, v as KodaXSessionNavigationOptions, w as KodaXSessionRuntimeInfo, x as KodaXSessionScope, y as KodaXSessionStorage, z as KodaXSessionTreeNode, A as KodaXSessionUiHistoryItem, B as KodaXSessionUiHistoryItemType, C as KodaXSessionWorkspaceKind } from './types-chunks/types.d-B_MIIApc.js';
10
- export { C as CompactionContext, a as CompactionEntry, b as CompactionEntryPayload, c as CompactionPolicy, D as DefaultSummaryCompaction, d as DefaultSummaryCompactionOptions, K as KODAX_API_MIN_INTERVAL, e as KODAX_DEFAULT_TIMEOUT, f as KODAX_HARD_TIMEOUT, g as KODAX_MAX_INCOMPLETE_RETRIES, i as KODAX_MAX_RETRIES, j as KODAX_MAX_TOKENS, k as KODAX_RETRY_BASE_DELAY, l as KODAX_STAGGER_DELAY, L as LINEAGE_ENTRY_TYPES, m as LineageArtifactLedgerPayload, n as LineageCompaction, o as LineageCompactionDelegates, p as LineageEntryType, q as LineageExtension, r as LineageLabelPayload, s as LineageTreeNode, P as PROMISE_PATTERN, u as appendSessionLineageLabel, w as applySessionCompaction, x as archiveOldIslands, y as buildSessionTree, z as cleanupIncompleteToolCalls, A as countActiveLineageMessages, B as countTokens, E as createSessionLineage, F as estimateTokens, G as extractArtifactLedger, I as extractTitleFromMessages, J as findPreviousUserEntryId, M as forkSessionLineage, N as generateSessionId, O as getAgentConfigHome, Q as getAgentConfigPath, R as getAppDataDir, S as getSessionLineagePath, T as getSessionMessagesFromLineage, U as mergeArtifactLedger, W as resolveSessionLineageTarget, X as rewindSessionLineage, Y as setAgentConfigHome, Z as setSessionLineageActiveEntry, _ as validateAndFixToolHistory } from './types-chunks/file-tracker.d-D7L_SbRm.js';
11
- import { _ as QualityInvariant, aG as ToolCapability, a8 as RunnableTool, d as Agent, aH as ToolGuardrail, f as AgentMessage, ac as RunnerLlmReturn, ad as RunnerToolCall } from './types-chunks/types.d-BCnbYG_A.js';
12
- export { h as AgentReasoningProfile, j as AgentTool, k as AskUserMultiOptions, l as AskUserQuestionItem, m as AskUserQuestionOptions, n as CompactionAnchor, q as CompactionResult, s as CompactionUpdate, y as Guardrail, K as Handoff, M as InMemorySessionOptions, U as MessageEntry, Y as PresetDispatcher, a1 as ReasoningDepth, a5 as RunEvent, a6 as RunOptions, a7 as RunResult, a9 as Runner, ah as Session, aj as SessionEntry, ak as SessionExtension, al as SessionForkOptions, aU as createAgent, aV as createHandoff, aW as createInMemorySession, b8 as registerPresetDispatcher } from './types-chunks/types.d-BCnbYG_A.js';
6
+ import { aD as KodaXToolExecutionContext, a9 as KodaXRepoIntelligenceCapability, ac as KodaXRepoIntelligenceTrace, aa as KodaXRepoIntelligenceMode, ae as KodaXRepoRoutingSignals, ab as KodaXRepoIntelligenceResolvedMode, a5 as KodaXOptions, U as KodaXInputArtifact, M as KodaXContextOptions, a8 as KodaXProviderPolicyHints, aP as ProviderResilienceConfig, aQ as ProviderResiliencePolicy, F as FailureStage, aV as ResilienceClassification, aN as ProviderExecutionState, aS as RecoveryDecision, aU as RecoveryResult, af as KodaXResult, aj as KodaXSessionControl, ak as KodaXSessionMutators, T as KodaXFanoutSchedulerPlan, R as KodaXFanoutBranchTransition, S as KodaXFanoutSchedulerInput, I as KodaXChildContextBundle, a7 as KodaXParentReductionContract, Q as KodaXFanoutBranchRecord, W as KodaXManagedProtocolPayload, p as ExtensionRuntimeContract, O as KodaXEvents, h as AutoRules, b5 as ToolCallSignal, b0 as SignalCollector, r as GoalCompleteResult, aX as ResolveKodaXManualInput, aY as ResolveKodaXManualOptions, aZ as ResolveKodaXManualResult, _ as KodaXManualTopicId, l as ChildSnapshotEvent, J as KodaXChildExecutionResult, b8 as WorkflowHostPolicy } from './types-chunks/bash-prefix-extractor.d-B0CIb0N3.js';
7
+ export { C as AUTO_MODE_DENIAL_CONSECUTIVE_THRESHOLD, k as AUTO_MODE_DENIAL_CUMULATIVE_THRESHOLD, A as AgentsFile, a as AutoModeAskUser, b as AutoModeAskUserVerdict, D as AutoModeDenialTracker, c as AutoModeEngine, d as AutoModeGuardrailConfig, e as AutoModeSharedState, f as AutoModeStats, g as AutoModeToolGuardrail, B as BASH_POLICY_SPEC, E as BREAKER_ERROR_THRESHOLD, b7 as BREAKER_WINDOW_MS, i as BashPrefixExtractor, j as BashPrefixResult, m as CircuitBreaker, n as CreateBashPrefixExtractorOptions, o as DiagnosticsRequest, q as ExtractCommandPrefixOptions, G as GoalBlockedResult, s as GoalCreateInput, t as GoalLifecycleContext, u as GoalRuntimeBinding, v as GoalRuntimeBindingDeps, w as GoalToolsContext, K as KodaXActivityEventMeta, x as KodaXAgentMode, y as KodaXBudgetDisclosureZone, z as KodaXBudgetExtensionRequest, H as KodaXChildAgentResult, L as KodaXCompactionOverride, N as KodaXContextTokenSnapshot, P as KodaXFanoutBranchLifecycle, V as KodaXManagedBudgetSnapshot, X as KodaXManagedTask, Y as KodaXManagedTaskRuntimeState, Z as KodaXManagedTaskStatusEvent, $ as KodaXManualTopicInput, a0 as KodaXMcpConnectMode, a1 as KodaXMcpServerConfig, a2 as KodaXMcpServersConfig, a3 as KodaXMcpTransport, a4 as KodaXMemoryStrategy, a6 as KodaXOrchestrationVerdict, ad as KodaXRepoIntelligenceTraceEvent, ag as KodaXRoleRoundSummary, ah as KodaXRuntimeVerificationContract, ai as KodaXSelfManualConfig, al as KodaXSessionOptions, am as KodaXSkillInvocationContext, an as KodaXSkillMap, ao as KodaXSkillProjectionConfidence, ap as KodaXTaskCapabilityHint, aq as KodaXTaskContract, ar as KodaXTaskEvidenceArtifact, as as KodaXTaskEvidenceBundle, at as KodaXTaskEvidenceEntry, au as KodaXTaskRole, av as KodaXTaskRoleAssignment, aw as KodaXTaskStatus, ax as KodaXTaskSurface, ay as KodaXTaskToolPolicy, az as KodaXTaskVerificationContract, aA as KodaXTaskVerificationCriterion, aB as KodaXTaskWorkItem, aC as KodaXToolEventMeta, aE as KodaXVerificationScorecard, aF as KodaXVerificationScorecardCriterion, aG as KodaXWorkflowEventMeta, aH as LSP_SERVERS, aI as LoadAgentsOptions, aJ as LoadedRulesSource, aK as LspServerInfo, aL as LspService, aM as LspServiceConfig, aO as ProviderRecoveryEvent, aR as RecoveryAction, aT as RecoveryLadderStep, aW as ResilienceErrorClass, a_ as RulesLoadError, a$ as RulesLoadResult, b1 as SkippedRulesSource, b2 as TodoItem, b3 as TodoList, b4 as TodoStatus, b6 as TrustState, b9 as WorkflowInvocationAction, ba as WorkflowInvocationPolicyDecision, bb as WorkflowInvocationPolicyInput, bc as WorkflowInvocationSource, bd as WorkflowInvocationTrigger, be as WorkflowStartOutcome, bz as autoModeDenialShouldFallback, bA as breakerShouldFallback, bf as buildGoalRuntimeBinding, bg as collectAllSignals, bh as computeRulesFingerprint, bl as createAutoModeDenialTracker, bi as createAutoModeToolGuardrail, bj as createBashPrefixExtractor, bk as createCircuitBreaker, bm as decideWorkflowInvocation, bn as extractCommandPrefix, bo as formatAgentsForPrompt, bp as getDefaultLspService, bq as getKodaxGlobalDir, br as loadAgentsFiles, bs as loadAutoRules, bt as makeDisabledGoalToolsContext, bu as parseAutoRules, bv as readTrustState, bw as recordAutoModeAllow, bx as recordAutoModeBlock, by as recordBreakerError, bB as shutdownDefaultLspService, bC as trustProjectRules, bD as withGoalBeforeNextTurn, bE as withGoalStopHook, bF as workflowStartOutcomeConsumesTurn } from './types-chunks/bash-prefix-extractor.d-B0CIb0N3.js';
8
+ import { i as KodaXJsonValue, b as KodaXExtensionSessionRecord, d as KodaXExtensionStore, S as SessionErrorMetadata, g as KodaXGoalState } from './types-chunks/types.d-BnjX2Gn4.js';
9
+ export { K as KodaXCompactMemoryProgress, a as KodaXCompactMemorySeed, c as KodaXExtensionSessionState, k as KodaXSessionArtifactLedgerEntry, l as KodaXSessionBranchSummaryEntry, m as KodaXSessionCompactionEntry, n as KodaXSessionData, o as KodaXSessionEntry, p as KodaXSessionEntryBase, r as KodaXSessionLabelEntry, s as KodaXSessionLineage, t as KodaXSessionMessageEntry, u as KodaXSessionMeta, v as KodaXSessionNavigationOptions, w as KodaXSessionRuntimeInfo, x as KodaXSessionScope, y as KodaXSessionStorage, z as KodaXSessionTreeNode, A as KodaXSessionUiHistoryItem, B as KodaXSessionUiHistoryItemType, C as KodaXSessionWorkspaceKind } from './types-chunks/types.d-BnjX2Gn4.js';
10
+ import { M as MessageQueue, H as WorkflowScriptManifest, y as WorkflowCapsule, B as WorkflowCapsuleIntent, A as WorkflowCapsuleInputs, F as WorkflowCapsuleRequirements, E as WorkflowCapsuleProvenance, G as WorkflowPatternId } from './types-chunks/capsule.d-CwBEm6M-.js';
11
+ export { C as CompactionContext, a as CompactionEntry, b as CompactionEntryPayload, c as CompactionPolicy, 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, 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, I as appendSessionLineageLabel, N as applySessionCompaction, O as archiveOldIslands, Q as buildSessionTree, R as cleanupIncompleteToolCalls, S as countActiveLineageMessages, T as countTokens, U as createSessionLineage, Y as estimateTokens, Z as extractArtifactLedger, a0 as extractTitleFromMessages, a1 as findPreviousUserEntryId, a2 as forkSessionLineage, a3 as generateSessionId, a4 as getAgentConfigHome, a5 as getAgentConfigPath, a6 as getAppDataDir, a8 as getSessionLineagePath, a9 as getSessionMessagesFromLineage, aa as mergeArtifactLedger, ac as resolveSessionLineageTarget, ad as rewindSessionLineage, ae as setAgentConfigHome, af as setSessionLineageActiveEntry, ag as validateAndFixToolHistory } from './types-chunks/capsule.d-CwBEm6M-.js';
12
+ import { a2 as QualityInvariant, aM as ToolCapability, ae as RunnableTool, d as Agent, aN as ToolGuardrail, f as AgentMessage, ai as RunnerLlmReturn, aj as RunnerToolCall, a$ as WorkflowEventCorrelation, B as Guardrail, bx as WorkflowTaskSummaryEventUpdate, aU as WorkflowAgentBackend, b7 as WorkflowModule, bm as WorkflowProcessTrackerOptions, a_ as WorkflowEvent, aY as WorkflowArtifactRef, b5 as WorkflowMeta, bo as WorkflowRunState, aW as WorkflowApproval, bb as WorkflowProcessEvent, aX as WorkflowApprovalSummary, b3 as WorkflowLimits, bg as WorkflowProcessSnapshot } from './types-chunks/process.d-BbiXD24v.js';
13
+ export { h as AgentReasoningProfile, j as AgentTool, k as AskUserMultiOptions, l as AskUserQuestionItem, m as AskUserQuestionOptions, n as CompactionAnchor, q as CompactionResult, s as CompactionUpdate, M as Handoff, O as InMemorySessionOptions, W as MessageEntry, a0 as PresetDispatcher, a7 as ReasoningDepth, ab as RunEvent, ac as RunOptions, ad as RunResult, af as Runner, an as Session, ap as SessionEntry, aq as SessionExtension, ar as SessionForkOptions, bI as createAgent, bJ as createHandoff, bK as createInMemorySession, b_ as registerPresetDispatcher } from './types-chunks/process.d-BbiXD24v.js';
13
14
  import { b as McpServersConfig } from './types-chunks/config.d-CJy1WENT.js';
14
15
  export { M as McpConnectMode, a as McpServerConfig, c as McpTransportKind } from './types-chunks/config.d-CJy1WENT.js';
15
16
  import { k as McpProviderOptions, c as McpCapabilityProvider, l as McpReverseCapabilities, m as McpRoot } from './types-chunks/manager.d-DLmDhX3i.js';
@@ -4726,8 +4727,8 @@ declare function isValidTokenBudget(value: unknown): value is number | null;
4726
4727
  * agent-layer `RunOptions.stopHook` fires. This module:
4727
4728
  *
4728
4729
  * 1. Runs a second-pass LLM verification call (independent context,
4729
- * configurable model — usually a strong family) via
4730
- * `provider.stream` with a forced `emit_sidecar_verdict` tool call
4730
+ * configurable model — usually a strong family) with a forced
4731
+ * `emit_sidecar_verdict` tool call
4731
4732
  * 2. Maps the 3-state verdict ('accept' / 'revise' / 'blocked') to
4732
4733
  * the agent-layer `StopHookResult` 3-state surface
4733
4734
  * (undefined / string / {abort, reason})
@@ -4735,26 +4736,23 @@ declare function isValidTokenBudget(value: unknown): value is number | null;
4735
4736
  * call, or parse failure → default `'accept'` (do not block the
4736
4737
  * happy path)
4737
4738
  *
4739
+ * **FEATURE_215 (v0.7.49)**: the domain-neutral invocation skeleton
4740
+ * (stream → fuzzy-match → parse → timeout-race → fail-open) now lives in
4741
+ * `@kodax-ai/agent` as `invokeLlmJudge` / `createLlmJudgedStopHook`. This
4742
+ * module is a thin consumer: it injects the verifier-specific prompt,
4743
+ * report tool, verdict parser, default-verdict mapping, and verdict
4744
+ * landing. Per ADR-030 the concrete judging (prompt, file-edit evidence,
4745
+ * recorder bridge) stays here in coding.
4746
+ *
4738
4747
  * **Model selection**: by default the verifier **inherits the Main
4739
- * Agent's provider+model** (see `verifier-provider-resolver.ts`). The
4740
- * core architectural value of FEATURE_184 is the Stop-hook shape (out-
4741
- * of-chain verification after Worker text-only termination, replacing
4742
- * the in-chain Evaluator role), NOT automatic model-family decoupling.
4743
- * Users who want to route around model quirks (e.g. zhipu/glm-5.1
4744
- * intent-vs-action floor, memory: project_feature_167) can opt into
4745
- * cross-family verification via `KODAX_VERIFIER_PROVIDER` +
4746
- * `KODAX_VERIFIER_MODEL` env vars — provider injection here is the
4747
- * indirection that makes that override possible.
4748
- *
4749
- * Phase D.1 scope (this commit): substrate module only. The
4750
- * `createSidecarVerifierStopHook` factory returns a `StopHookFn` but it
4751
- * is NOT yet wired into `runner-driven.ts`'s `runOnce` RunOptions —
4752
- * that wiring is Phase D.2 (atomic swap with C.1/C.2/C.3).
4748
+ * Agent's provider+model** (see `verifier-provider-resolver.ts`). Users
4749
+ * who want cross-family verification can opt in via
4750
+ * `KODAX_VERIFIER_PROVIDER` + `KODAX_VERIFIER_MODEL` env vars.
4753
4751
  *
4754
4752
  * Design references:
4755
4753
  * - ADR-030 (docs/ADR.md)
4756
4754
  * - v0.7.45.md §FEATURE_184 Phase D
4757
- * - F178 stall-sidecar.tsinvocation / fuzzy-match / fail-open patterns
4755
+ * - v0.7.49.md §FEATURE_215 kernel extraction
4758
4756
  *
4759
4757
  * DI-clean: provider injection is the only external surface. Tests
4760
4758
  * pass a fake provider returning canned `{textBlocks, toolBlocks}`.
@@ -4812,15 +4810,15 @@ interface SidecarVerifierInvokeOptions {
4812
4810
  readonly provider: KodaXBaseProvider;
4813
4811
  /** Specific model id on the provider. When omitted, the provider's
4814
4812
  * registered default model is used. Production wiring passes the
4815
- * resolved model string from `resolveVerifierProvider()` so model
4816
- * selection is explicit (rather than implicitly inheriting whatever
4817
- * default model the provider happens to ship). */
4813
+ * resolved model string from `resolveVerifierProvider()`. */
4818
4814
  readonly model?: string;
4819
4815
  /** Verifier context built by the caller (`buildVerifierContext`). */
4820
4816
  readonly inputs: SidecarVerifierContextInputs;
4821
4817
  /** Timeout in ms. Default 15000 (verification is heavier than F178
4822
4818
  * anomaly detection's 5s budget). */
4823
4819
  readonly timeoutMs?: number;
4820
+ /** Caller cancellation signal; forwarded to the verifier provider call. */
4821
+ readonly abortSignal?: AbortSignal;
4824
4822
  }
4825
4823
 
4826
4824
  /**
@@ -4959,5 +4957,618 @@ declare function languageIdForPath(filePath: string): string | undefined;
4959
4957
  */
4960
4958
  declare function report(file: string, issues: readonly Diagnostic[]): string;
4961
4959
 
4962
- export { Agent, AgentMessage, AutoRules, BLOCKER_REQUIRED_CONSECUTIVE_TURNS, CANCELLED_TOOL_RESULT_MESSAGE, CANCELLED_TOOL_RESULT_PREFIX, CODING_AGENT_MARKER, CODING_INVARIANTS, CODING_SUMMARY_PROMPT, CODING_UPDATE_SUMMARY_PROMPT, CapabilityDeniedError, CapabilityKind, CapabilityProvider, CapabilityResult, KodaXClient as Client, ConstructionManifestError, DEFAULT_CODING_AGENT_NAME, DEFAULT_DANGEROUS_PATTERNS, DEFAULT_HANDLER_TIMEOUT_MS, DEFAULT_RESILIENCE_CONFIG, DEFAULT_SAFE_PATTERNS, DEFAULT_SELF_MODIFY_BUDGET, DEFAULT_WINDOW_MS as DEFAULT_SPECULATIVE_WINDOW_MS, DEFAULT_TOOL_OUTPUT_MAX_BYTES, DEFAULT_TOOL_OUTPUT_MAX_LINES, EMIT_VERDICT_TOOL_NAME, ErrorCategory, FailureStage, GENERATOR_AGENT_NAME, GoalCompleteResult, KODAX_TOOLS, KodaXAmaControllerDecision, KodaXBaseProvider, KodaXChildContextBundle, KodaXClient, KodaXContentBlock, KodaXContextOptions, KodaXEvents, KodaXExecutionMode, KodaXExtensionRuntime, KodaXExtensionSessionRecord, KodaXFanoutBranchRecord, KodaXFanoutBranchTransition, KodaXFanoutSchedulerInput, KodaXFanoutSchedulerPlan, KodaXInputArtifact, KodaXJsonValue, KodaXManualTopicId, KodaXMessage, KodaXOptions, KodaXParentReductionContract, KodaXProviderCapabilityProfile, KodaXProviderPolicyHints, KodaXReasoningCapability, KodaXReasoningMode, KodaXRepoIntelligenceCapability, KodaXRepoIntelligenceMode, KodaXRepoIntelligenceResolvedMode, KodaXRepoIntelligenceTrace, KodaXRepoRoutingSignals, KodaXResult, KodaXSessionControl, KodaXSessionError, KodaXSessionMutators, KodaXTaskRoutingDecision, KodaXTaskType, KodaXTerminalError, KodaXThinkingDepth, KodaXTokenUsage, KodaXToolDefinition, KodaXToolError, KodaXToolExecutionContext, KodaXToolUseBlock, MANUAL_TOPIC_IDS, McpCapabilityProvider, McpProviderOptions, McpReverseCapabilities, McpRoot, McpServersConfig, PLANNER_AGENT_NAME, PROMPT_SECTION_REGISTRY, PROTOCOL_EMITTER_TOOLS, ProviderExecutionState, ProviderRecoveryCoordinator, ProviderResilienceConfig, ProviderResiliencePolicy, READ_DEFAULT_LIMIT, READ_MAX_LINE_CHARS, READ_PREFLIGHT_SIZE_BYTES, REPOINTEL_DEFAULT_ENDPOINT, RecoveryDecision, RecoveryResult, ResilienceClassification, ResolveKodaXManualInput, ResolveKodaXManualOptions, ResolveKodaXManualResult, SCOUT_AGENT_NAME, SELF_KNOWLEDGE_ROUTING_RULE, SYSTEM_PROMPT, SessionErrorMetadata, SignalCollector, StableBoundaryTracker, TASK_ENGINE_ROLE_AGENTS, TOOL_RESULT_TRUNCATION_GUARDRAIL_NAME, TRACING_ENV, ToolCallSignal, WORKER_AGENT_NAME, _resetRuntimeForTesting, activate, analyzeChangedScope, appendAuditEntry, applyAccountingDelta, applyFanoutBranchTransition, applyToolResultGuardrail, assignFanoutBranchWorker, bashSignalCollector, bootstrapTracing, boundedRevise, budgetCeiling, buildAmaControllerDecision, buildBlockedGoal, buildCapabilityContextSections, buildClassifierPrompt, buildCompleteGoal, buildCreatedGoal, buildFallbackRoutingDecision, buildFanoutSchedulerPlan, buildLlmReviewPrompt, buildMcpReverseCapabilities, buildPausedGoal, buildPromptMessageContent, buildPromptOverlay, buildPromptSnapshot, buildProviderCapabilitySnapshot, buildProviderPolicyHintsForDecision, buildProviderPolicyPromptNotes, buildRepoIntelligenceContext, buildRepoIntelligenceIndex, buildRepoOverview, buildResumedGoal, buildSelfKnowledgeRoutingRule, buildSystemPrompt, buildSystemPromptSnapshot, checkAbsoluteDeny, checkIncompleteToolCalls, checkPromiseSignal, classify, classifyBashCommand, classifyError, classifyResilienceError, computeInputSignature, configureRuntime, convertCapabilityReadResult, convertProviderSearchResults, countActiveFanoutBranches, createBashClassifierConfig, createBuiltinToolDefinition, createCtxProxy, createDefaultCodingAgent, createDenialTracker, createExtensionRuntime, createFanoutSchedulerInput, createKodaXTaskRunner, createPromptSection, createReasoningPlan, createSessionControl, createToolResultTruncationGuardrail, defaultPolicy, disableSelfModify, discoverMarkdownAgents, drainPendingSwaps, emitVerdict, evaluateProviderPolicy, exec, executeTool, extractComparableUserMessageText, extractHtmlTitle, extractPromptComparableText, fileSignalCollector, finalizeRetrievalResult, findByVersion, formatParallelDispatchResult, formatSize, getActiveExtensionRuntime, getAllRegisteredTools, getBuiltinRegisteredToolDefinition, getBuiltinToolDefinition, getDenialContext, getFanoutBranch, getImpactEstimate, getModuleContext, getProcessContext, getRegisteredToolDefinition, getRepoIntelligenceIndex, getRepoOverview, getRepoRoutingSignals, getRequiredToolParams, getSymbolContext, getTool, getToolDefinition, getToolRegistrations, getToolResultPolicy, goalTokenDelta, hasPendingSwap, inferTaskType, inspectEditFailure, inspectRepoIntelligenceRuntime, isDeniedRecently, isParallelDispatchDirective, isToolFileMutation, isToolMutation, isToolPlanModeAllowed, isValidTokenBudget, languageIdForPath, listAll, list as listArtifacts, listBuiltinToolDefinitions, listConstructed, listToolDefinitions, listTools, loadAgentsFromMarkdown, loadHandler, markFanoutBranchCancelled, markFanoutBranchCompleted, mcpRootsFromWorkspace, orderPromptSections, parseClassifierOutput, parseEditToolError, parseLlmReviewVerdict, parseModelSpec, persistToolOutput, prewarmRepoIntelligenceCaches, readArtifact, readAuditEntries, readBudget, readDisableState, readWindowFromEnv as readSpeculativeWindowFromEnv, reasoningModeToDepth, reconstructMessagesWithToolGuard, recordBlockerAttempt, recordDenial, registerCodingInvariants, registerConfiguredMcpCapabilityProvider, registerOfficialSandboxExtension, registerTool, rehydrateActiveArtifacts, remaining as remainingSelfModifyBudget, renderChangedScope, renderImpactEstimate, renderModuleContext, renderProcessContext, renderPromptSections, renderRepoOverview, renderRetrievalResult, renderSymbolContext, report as reportLspDiagnostics, resetBlockerCounter, resetBudget, resolveClassifierModel, resolveConstructedAgent, resolveKodaXManual, resolveReasoningMode, resolveRepoIntelligenceMode, resolveRepoIntelligenceRuntimeConfig, resolveResilienceConfig, resolveToolCapability, revoke, rollbackSelfModify, runAstRules, runKodaX, runLlmReview, runManagedTask, runOrchestration, setActiveExtensionRuntime, shouldFlipBudgetLimited, speculativeRace, stage, startKodaX, stripAssistantText, stripHtmlToText, test as testArtifact, toolAskUserQuestion, toolBash, toolChangedDiff, toolChangedScope, toolCodeSearch, toolEdit, toolGlob, toolGrep, toolImpactEstimate, toolInsertAfterAnchor, toolModuleContext, toolPermission, toolProcessContext, toolRead, toolRepoOverview, toolSemanticLookup, toolSymbolContext, toolUndo, toolWebFetch, toolWebSearch, toolWrite, truncateHead, truncateLine, truncateTail, turnWallTimeDelta, validateSubtaskIndependence, validateToolSchemaForProvider, verifyGoalCompletion, warmRepoIntelligenceRuntime, webhook, workerAgent };
4963
- export type { AbsoluteDenyMatch, AbsoluteDenyMiss, AbsoluteDenyResult, AgentArtifact, ArtifactStatus, AstCheckResult, AstRuleId, AstRuleViolation, AuditEntry, AuditEventKind, BashClassificationResult, BashClassifierConfig, BashRiskLevel, BlockerAttemptResult, BootstrapTracingOptions, BudgetState, BuildClassifierPromptInput, BuildPromptInput, Capabilities, ChangedFileEntry, ChangedFileStatus, ChangedScopeAreaSummary, ChangedScopeReport, ClassifierDecision, ClassifierPrompt, ClassifyDecision, ClassifyOptions, ConstructionArtifact, ConstructionPolicy, ConstructionPolicyVerdict, CreateCtxProxyOptions, CreateKodaXTaskRunnerOptions, DenialRecord, DenialTracker, DisableState, DiscoverMarkdownAgentsResult, DiscoveredMarkdownAgent, EditRecoveryDiagnostic, EditToolErrorCode, ErrorClassification, ExecOptions, ExecResult, ExtensionCommandContext, ExtensionCommandDefinition, ExtensionCommandInvocation, ExtensionCommandResult, ExtensionContributionSource, ExtensionEventMap, ExtensionFailureDiagnostic, ExtensionFailureStage, ExtensionHookMap, ExtensionLoadSource, ExtensionLogger, ExtensionRuntimeController, ExtensionRuntimeDiagnostics, ExtensionToolBeforeHookContext, GoalCompletionVerifier, ImpactEstimateResult, KodaXAgentWorkerSpec, KodaXExtensionAPI, KodaXExtensionActivationResult, KodaXExtensionModule, KodaXPromptSection, KodaXPromptSectionDefinition, KodaXPromptSectionSlot, KodaXPromptSectionStability, KodaXPromptSnapshot, KodaXPromptSnapshotMetadata, KodaXProviderCapabilitySnapshot, KodaXProviderPolicyDecision, KodaXProviderPolicyIssue, KodaXProviderPolicyIssueSeverity, KodaXProviderSourceKind, KodaXRetrievalArtifact, KodaXRetrievalFreshness, KodaXRetrievalItem, KodaXRetrievalResult, KodaXRetrievalScope, KodaXRetrievalToolName, KodaXRetrievalTrust, LanguageCapabilityTier, LlmReviewClient, LlmReviewResult, LlmReviewVerdict, LoadAgentsFromMarkdownOptions, LoadAgentsFromMarkdownResult, LoadHandlerOptions, LoadHandlerScope, LoadedExtensionDiagnostic, LocalToolDefinition, MarkdownLoadFailure, McpReverseWorkspace, ModelProviderRegistration, ModuleCapsule, ModuleContextResult, OfficialSandboxMode, OfficialSandboxOptions, OrchestrationArtifact, OrchestrationCompletedTask, OrchestrationRunEvents, OrchestrationRunOptions, OrchestrationRunResult, OrchestrationTaskBudget, OrchestrationTaskContext, OrchestrationTaskExecution, OrchestrationTaskStatus, OrchestrationTraceEvent, OrchestrationWorkerResult, OrchestrationWorkerRunner, OrchestrationWorkerSpec, ParallelDispatchDirective, ParallelDispatchResult, ParallelSubtask, ParsedModelSpec, ProcessCapsule, ProcessContextResult, ProcessStep, ProtocolEmitterMetadata, RegisteredCapabilityProviderDiagnostic, RegisteredCommandDiagnostic, RegisteredHookDiagnostic, RegisteredToolDefinition, RegisteredToolDiagnostic, RepoAreaKind, RepoAreaOverview, RepoIntelligenceIndex, RepoIntelligenceRuntimeInspection, RepoIntelligenceRuntimeWarmResult, RepoLanguageId, RepoLanguageSupport, RepoOverview, RepoSymbolKind, RepoSymbolRecord, RepoSymbolReference, ResolveClassifierModelOptions, ResolveSource, ResolvedClassifierModel, RollbackResult, RunningSession, SchemaProvider, SchemaValidationResult, ScriptSource, SelfModifyAskUser, SelfModifyAskUserInput, SelfModifyDiffSeverity, SelfModifyDiffSummary, SpeculativeResult, StagedHandle, StripOptions, SymbolContextResult, TestArtifactOptions, TestResult, TierZeroPatternId, ToolContent, ToolDefinitionSource, ToolHandler, ToolRegistrationOptions, ToolRegistry, ToolSideEffect, VerifyGoalCompletionOptions, WebhookOptions, WebhookResult };
4960
+ /**
4961
+ * Predicate the parent REPL injects so the child executor can enforce plan-mode
4962
+ * constraints without `packages/coding` reverse-depending on `packages/repl`.
4963
+ *
4964
+ * The predicate MUST read the parent's permission mode lazily (e.g., through a
4965
+ * closure over a ref), so mid-run mode toggles propagate to in-flight child tool
4966
+ * calls. Returns the block reason (string) for tools/inputs that are currently
4967
+ * plan-mode-violating, or `null` when the call is allowed right now.
4968
+ */
4969
+ type PlanModeBlockCheck = (tool: string, input: Record<string, unknown>) => string | null;
4970
+ interface WorkflowChildDigestUpdate {
4971
+ readonly childId: string;
4972
+ readonly digest?: string;
4973
+ readonly digestFailed?: boolean;
4974
+ readonly totalTokensUsed: number;
4975
+ }
4976
+ interface ChildExecutorOptions {
4977
+ readonly maxParallel: number;
4978
+ readonly maxIterationsPerChild: number;
4979
+ readonly abortSignal?: AbortSignal;
4980
+ readonly parentOptions: Readonly<Partial<Pick<KodaXOptions, 'provider' | 'model' | 'reasoningMode' | 'extensionRuntime' | 'events'>>>;
4981
+ readonly parentRole: string;
4982
+ readonly parentHarness: string;
4983
+ /**
4984
+ * FEATURE_217 (v0.7.49): set by the workflow agent backend to enable the
4985
+ * one-turn, no-tool self-distill digest for workflow-launched children.
4986
+ * Distinct from `parentHarness` because workflow children must keep
4987
+ * `parentHarness:'tool-dispatch'` so `validateWriteBundles` still admits
4988
+ * write children — the two concerns cannot share one field.
4989
+ */
4990
+ readonly workflowChild?: boolean;
4991
+ /**
4992
+ * Workflow child digest mode. `blocking` preserves FEATURE_217 behavior.
4993
+ * `async` returns the child result immediately and reports the digest through
4994
+ * `onWorkflowChildDigest`; worktree-isolated children still use blocking mode
4995
+ * so the digest runs before cleanup removes the worktree.
4996
+ */
4997
+ readonly workflowDigestMode?: 'blocking' | 'async';
4998
+ readonly onWorkflowChildDigest?: (update: WorkflowChildDigestUpdate) => void;
4999
+ readonly workflowCorrelation?: WorkflowEventCorrelation;
5000
+ /** User-facing child label for live telemetry surfaces. Defaults to bundle id. */
5001
+ readonly childActivityName?: string;
5002
+ /** Progress callback for REPL status display. Called when children start, progress, and complete. */
5003
+ readonly onProgress?: (status: string) => void;
5004
+ /**
5005
+ * FEATURE_074: Predicate provided by the parent REPL to evaluate plan-mode block
5006
+ * reasons at each child tool call. The predicate closes over parent state so
5007
+ * mid-run mode toggles propagate to in-flight children. When absent, children
5008
+ * run without plan-mode enforcement.
5009
+ */
5010
+ readonly planModeBlockCheck?: PlanModeBlockCheck;
5011
+ /**
5012
+ * FEATURE_092 phase 2b.7b slice D: parent-Runner guardrails forwarded into
5013
+ * each child's `Runner.run` via `KodaXOptions.guardrails`. The auto-mode
5014
+ * guardrail's mutable state (engine + denialTracker + circuitBreaker) is
5015
+ * shared by passing the SAME instance — preventing children from reaching
5016
+ * a fresh threshold and bypassing the parent's downgrade.
5017
+ */
5018
+ readonly guardrails?: readonly Guardrail[];
5019
+ /**
5020
+ * FEATURE_177 v0.7.45: optional bridge that feeds per-child events
5021
+ * (iteration start, tool-use start) into the parent's snapshot map.
5022
+ * Closes over `ctx.childProgressSnapshots` at the dispatch site so
5023
+ * the writer and `task_output` reader share one Map instance. Absent
5024
+ * on the sync-dispatch path (no in-flight state to peek at).
5025
+ */
5026
+ readonly snapshotUpdater?: (event: ChildSnapshotEvent) => void;
5027
+ }
5028
+
5029
+ /**
5030
+ * FEATURE_217 (v0.7.49) Phase B — Coding workflow agent backend.
5031
+ *
5032
+ * Bridges the domain-neutral `WorkflowAgentBackend` (from
5033
+ * `@kodax-ai/agent/workflow`) onto KodaX's existing child-dispatch
5034
+ * substrate: `executeChildAgents` + per-child AbortController registry +
5035
+ * `childProgressSnapshots` + `MessageQueue` routing. It does NOT
5036
+ * duplicate the child state model — spawn/wait/output/stop/send all
5037
+ * reuse the same primitives `dispatch_child_task` / `task_output` /
5038
+ * `task_stop` / `send_message` already use.
5039
+ *
5040
+ * Each `spawn` launches one bundle through `executeChildAgents`
5041
+ * (maxParallel:1) without awaiting; the workflow runtime owns the
5042
+ * concurrency gate (Semaphore) so each backend spawn is a single child.
5043
+ *
5044
+ * Test seams (DI): `runChild` (defaults to `executeChildAgents`),
5045
+ * `queue`, `generateId`, `now`. Tests inject a fake `runChild` + a
5046
+ * minimal ctx so no real agents run.
5047
+ */
5048
+
5049
+ /** The subset of `ChildExecutorOptions` the caller fixes once per run;
5050
+ * the adapter adds `maxParallel` / `abortSignal` / `snapshotUpdater`
5051
+ * per spawn. */
5052
+ type WorkflowChildOptions = Omit<ChildExecutorOptions, 'maxParallel' | 'abortSignal' | 'snapshotUpdater' | 'workflowChild' | 'workflowDigestMode' | 'onWorkflowChildDigest' | 'workflowCorrelation'>;
5053
+ interface CodingWorkflowBackendDeps {
5054
+ /** Parent tool-execution context (carries abort + snapshot registries). */
5055
+ readonly ctx: KodaXToolExecutionContext;
5056
+ /** Fixed per-run child options (parentRole / parentHarness / parentOptions
5057
+ * / maxIterationsPerChild / guardrails / …). */
5058
+ readonly childOptions: WorkflowChildOptions;
5059
+ /** Seam: child runner. Defaults to `executeChildAgents`. */
5060
+ readonly runChild?: (bundles: readonly KodaXChildContextBundle[], ctx: KodaXToolExecutionContext, options: ChildExecutorOptions) => Promise<KodaXChildExecutionResult>;
5061
+ /** Seam: message queue. Defaults to the process-global singleton. */
5062
+ readonly queue?: MessageQueue;
5063
+ /** Seam: unique child id generator. */
5064
+ readonly generateId?: () => string;
5065
+ /** Seam: clock for snapshot timestamps. */
5066
+ readonly now?: () => number;
5067
+ /** Workflow run id for correlating child-agent SDK callbacks. */
5068
+ readonly runId?: string;
5069
+ readonly onTaskSummary?: (taskId: string, update: WorkflowTaskSummaryEventUpdate) => void;
5070
+ }
5071
+ /**
5072
+ * Build a `WorkflowAgentBackend` over the coding child-dispatch substrate.
5073
+ */
5074
+ declare function createCodingWorkflowBackend(deps: CodingWorkflowBackendDeps): WorkflowAgentBackend;
5075
+
5076
+ /**
5077
+ * FEATURE_217 (v0.7.49) Phase C — Built-in read-only workflow.
5078
+ *
5079
+ * `parallel-investigation`: fan out several READ-ONLY investigators over
5080
+ * a question (optionally split by target areas), then synthesize their
5081
+ * findings into one ranked, evidence-keeping report. A failing
5082
+ * investigator degrades the synthesis (its gap is noted) rather than
5083
+ * crashing the whole run. Writes nothing — purely investigative.
5084
+ */
5085
+
5086
+ interface ParallelInvestigationArgs {
5087
+ /** What to investigate. */
5088
+ readonly question: string;
5089
+ /** Optional target areas/paths — one investigator per target. When
5090
+ * absent, a small default set of generic angles is used. */
5091
+ readonly targets?: readonly string[];
5092
+ /** Synthesis rubric; sensible default when omitted. */
5093
+ readonly rubric?: string;
5094
+ /** Lifetime agent cap (investigators + 1 synthesizer). */
5095
+ readonly maxAgents?: number;
5096
+ /** In-flight investigator cap. */
5097
+ readonly maxConcurrency?: number;
5098
+ }
5099
+ interface InvestigationFinding {
5100
+ readonly angle: string;
5101
+ readonly status: 'completed' | 'failed';
5102
+ readonly text: string;
5103
+ }
5104
+ interface ParallelInvestigationResult {
5105
+ readonly synthesis: string;
5106
+ readonly findings: readonly InvestigationFinding[];
5107
+ /** True when ≥1 investigator failed and the synthesis ran degraded. */
5108
+ readonly degraded: boolean;
5109
+ }
5110
+ declare const parallelInvestigation: WorkflowModule<ParallelInvestigationArgs, ParallelInvestigationResult>;
5111
+
5112
+ /**
5113
+ * FEATURE_217 (v0.7.49) Phase D — Durable workflow run graph.
5114
+ *
5115
+ * Persists a workflow run as `run.json` + append-only `events.jsonl` +
5116
+ * `artifacts/` under a caller-supplied run directory (the REPL points
5117
+ * this at `~/.kodax/workflow-runs/<project-key>/<runId>/` via
5118
+ * `getAgentConfigPath`). Modelling the run as an event stream — not a
5119
+ * single summary blob — keeps the agent relationships (spawn / message /
5120
+ * complete / synthesize) inspectable after the fact.
5121
+ *
5122
+ * `appendFileSync` is used for events so the on-disk order matches the
5123
+ * recorder's `seq` order with no async interleave.
5124
+ */
5125
+
5126
+ type WorkflowRunProcessMetadata = Pick<WorkflowProcessTrackerOptions, 'displayName' | 'goal' | 'source' | 'savedWorkflowName' | 'sourceRunId' | 'sourceWorkflowName' | 'revisionOf'>;
5127
+ interface RunGraphWriterDeps {
5128
+ /** Clock for the per-event `ts` stamp. Defaults to `Date.now`. */
5129
+ readonly now?: () => number;
5130
+ }
5131
+ interface RunJsonInput {
5132
+ readonly meta: WorkflowMeta;
5133
+ readonly args: unknown;
5134
+ readonly state: WorkflowRunState;
5135
+ readonly startedAt: number;
5136
+ readonly endedAt: number;
5137
+ readonly scriptSnapshot?: WorkflowScriptSnapshotRef;
5138
+ readonly resultSummary?: string;
5139
+ readonly processMetadata?: WorkflowRunProcessMetadata;
5140
+ }
5141
+ interface WorkflowScriptSnapshotInput {
5142
+ readonly source: string;
5143
+ readonly manifest?: WorkflowScriptManifest;
5144
+ }
5145
+ interface WorkflowScriptSnapshotRef {
5146
+ readonly scriptPath: string;
5147
+ readonly manifestPath?: string;
5148
+ }
5149
+ interface RunGraphWriter {
5150
+ readonly runDir: string;
5151
+ /** Append one event to `events.jsonl`. */
5152
+ onEvent(event: WorkflowEvent): void;
5153
+ /** Persist an artifact under `artifacts/<safe-name>.json`. */
5154
+ writeArtifact(name: string, value: unknown): WorkflowArtifactRef;
5155
+ /** Persist generated workflow source + optional manifest beside run.json. */
5156
+ writeScriptSnapshot(input: WorkflowScriptSnapshotInput): WorkflowScriptSnapshotRef;
5157
+ /** Write the terminal `run.json` summary. */
5158
+ writeRunJson(input: RunJsonInput): void;
5159
+ }
5160
+ declare function safeWorkflowArtifactName(name: string): string;
5161
+ declare function createRunGraphWriter(runDir: string, deps?: RunGraphWriterDeps): RunGraphWriter;
5162
+
5163
+ interface WorktreeSweepDeps {
5164
+ /** Run a git subcommand from `cwd`, resolving stdout. Defaults to `execFile`. */
5165
+ readonly runGit?: (args: readonly string[], cwd: string) => Promise<string>;
5166
+ /** Worktree directory mtime in ms. Defaults to `statSync`. Layer 3 only. */
5167
+ readonly mtimeMs?: (path: string) => number;
5168
+ /** Clock for staleness comparison. Defaults to `Date.now`. Layer 3 only. */
5169
+ readonly now?: () => number;
5170
+ }
5171
+
5172
+ /**
5173
+ * FEATURE_217 (v0.7.49) Phase D — Headless workflow orchestrator.
5174
+ *
5175
+ * Ties together: the approval gate, the coding agent backend (Phase B),
5176
+ * the durable run-graph writer, and the agent-layer `runWorkflow`
5177
+ * envelope. This is the REPL-agnostic core the `/workflow` command
5178
+ * (Phase D.2) drives; it is fully testable with a fake backend + temp
5179
+ * run dir + a stub approval callback.
5180
+ */
5181
+
5182
+ declare const SYSTEM_WORKFLOW_LIMITS: {
5183
+ readonly maxAgents: 64;
5184
+ readonly maxConcurrency: 16;
5185
+ readonly tokenBudget: 200000;
5186
+ };
5187
+ interface RunWorkflowModuleOptions {
5188
+ readonly module: WorkflowModule;
5189
+ readonly args: unknown;
5190
+ readonly runId: string;
5191
+ /** Directory for the durable run graph (run.json / events.jsonl / artifacts). */
5192
+ readonly runDir: string;
5193
+ /** Parent context — required when the backend is built internally. */
5194
+ readonly ctx?: KodaXToolExecutionContext;
5195
+ /** Per-run child options — required when the backend is built internally. */
5196
+ readonly childOptions?: WorkflowChildOptions;
5197
+ /** Pre-built backend (test seam). When omitted, built from ctx + childOptions. */
5198
+ readonly backend?: WorkflowAgentBackend;
5199
+ /** Approval gate. When omitted, the run auto-proceeds (SDK / headless). */
5200
+ readonly approval?: WorkflowApproval;
5201
+ /** Optional host/SDK ceilings. These may only lower manifest/system limits. */
5202
+ readonly hostPolicy?: WorkflowHostPolicy;
5203
+ readonly signal?: AbortSignal;
5204
+ /** Extra event sink (e.g. live UI), in addition to the durable writer. */
5205
+ readonly onEvent?: (event: WorkflowEvent) => void;
5206
+ /** Host/SDK process snapshot stream. */
5207
+ readonly onWorkflowProcessEvent?: (event: WorkflowProcessEvent) => void;
5208
+ readonly now?: () => number;
5209
+ readonly scriptSnapshot?: WorkflowScriptSnapshotInput;
5210
+ readonly processMetadata?: WorkflowRunProcessMetadata;
5211
+ /** Optional lifecycle gate, used by WorkflowRunManager pause/resume. */
5212
+ readonly beforeSpawn?: () => Promise<void>;
5213
+ /** Test seam: inject git/mtime for the worktree sweep (FEATURE_217 Layer 2/3). */
5214
+ readonly worktreeSweepDeps?: WorktreeSweepDeps;
5215
+ }
5216
+ type RunWorkflowModuleOutcome = {
5217
+ readonly kind: 'denied';
5218
+ readonly summary: WorkflowApprovalSummary;
5219
+ } | {
5220
+ readonly kind: 'completed';
5221
+ readonly result: unknown;
5222
+ readonly state: WorkflowRunState;
5223
+ } | {
5224
+ readonly kind: 'failed';
5225
+ readonly error: Error;
5226
+ readonly state: WorkflowRunState;
5227
+ };
5228
+ /** Build the pre-run approval summary from a workflow module's metadata. */
5229
+ declare function buildApprovalSummary(module: WorkflowModule, hostPolicy?: WorkflowHostPolicy): WorkflowApprovalSummary;
5230
+ declare function clampWorkflowLimits(meta: WorkflowMeta, hostPolicy?: WorkflowHostPolicy): WorkflowLimits;
5231
+ /**
5232
+ * Run a workflow module end-to-end: approval → runtime + backend +
5233
+ * durable run graph → terminal `run.json`. A workflow execution failure
5234
+ * surfaces as `{ kind: 'failed' }` and a denied approval as
5235
+ * `{ kind: 'denied' }`. Only a misconfiguration (no backend AND no
5236
+ * ctx+childOptions) throws — that is a programmer precondition error.
5237
+ */
5238
+ declare function runWorkflowModule(opts: RunWorkflowModuleOptions): Promise<RunWorkflowModuleOutcome>;
5239
+ interface RunWorkflowFromOptionsInput {
5240
+ readonly module: WorkflowModule;
5241
+ readonly args: unknown;
5242
+ readonly options: KodaXOptions;
5243
+ readonly runId: string;
5244
+ readonly runDir: string;
5245
+ readonly approval?: WorkflowApproval;
5246
+ readonly signal?: AbortSignal;
5247
+ readonly onEvent?: (event: WorkflowEvent) => void;
5248
+ readonly onWorkflowProcessEvent?: (event: WorkflowProcessEvent) => void;
5249
+ readonly now?: () => number;
5250
+ readonly scriptSnapshot?: WorkflowScriptSnapshotInput;
5251
+ readonly processMetadata?: WorkflowRunProcessMetadata;
5252
+ readonly beforeSpawn?: () => Promise<void>;
5253
+ }
5254
+ /**
5255
+ * High-level entry: build a tool-execution context + child options from
5256
+ * `KodaXOptions` (provider / model / extensionRuntime) and run the
5257
+ * workflow module. ctx construction stays inside `@kodax-ai/coding` — the
5258
+ * REPL passes plain `KodaXOptions` (from `createKodaXOptions`) rather than
5259
+ * reaching into run-loop internals.
5260
+ */
5261
+ declare function runWorkflowFromOptions(input: RunWorkflowFromOptionsInput): Promise<RunWorkflowModuleOutcome>;
5262
+
5263
+ /**
5264
+ * FEATURE_217 (v0.7.49) Phase E — Saved workflow discovery + loading.
5265
+ *
5266
+ * Discovers user-authored workflows from `.kodax/workflows/` (project)
5267
+ * and `~/.kodax/workflows/` (personal), project winning on name
5268
+ * conflict. Loading reuses the proven Self-Construction pattern
5269
+ * (`await import(pathToFileURL(...))`, FEATURE_088 load-handler) — no
5270
+ * transpiler dependency: `.ts` resolves under a tsx runtime (dev), `.js`
5271
+ * / `.mjs` resolve in compiled binaries.
5272
+ *
5273
+ * SECURITY: loading a saved workflow EXECUTES local code. The REPL gates
5274
+ * the first run of any discovered file behind a trusted-local
5275
+ * confirmation (Phase D.2 command) — discovery itself only reads paths.
5276
+ */
5277
+
5278
+ type SavedWorkflowSource = 'project' | 'personal';
5279
+ type SavedWorkflowExecution = 'trusted-local' | 'capability-generated';
5280
+ interface SavedWorkflowRef {
5281
+ /** Workflow name = filename without extension. */
5282
+ readonly name: string;
5283
+ readonly path: string;
5284
+ readonly source: SavedWorkflowSource;
5285
+ readonly execution: SavedWorkflowExecution;
5286
+ }
5287
+ interface SavedWorkflowDirs {
5288
+ /** `.kodax/workflows` relative to the project root. */
5289
+ readonly project?: string;
5290
+ /** `~/.kodax/workflows`. */
5291
+ readonly personal?: string;
5292
+ }
5293
+ interface SavedGeneratedWorkflowFile {
5294
+ readonly manifest: WorkflowScriptManifest;
5295
+ readonly source: string;
5296
+ readonly capsule?: WorkflowCapsule;
5297
+ readonly legacy?: boolean;
5298
+ }
5299
+ interface SaveGeneratedWorkflowInput {
5300
+ readonly dir: string;
5301
+ readonly name: string;
5302
+ readonly manifest: WorkflowScriptManifest;
5303
+ readonly source: string;
5304
+ readonly intent?: WorkflowCapsuleIntent;
5305
+ readonly inputs?: WorkflowCapsuleInputs;
5306
+ readonly requires?: WorkflowCapsuleRequirements;
5307
+ readonly provenance?: WorkflowCapsuleProvenance;
5308
+ readonly minKodaxVersion?: string;
5309
+ }
5310
+ interface SaveGeneratedWorkflowFromRunInput {
5311
+ readonly runDir: string;
5312
+ readonly targetDir: string;
5313
+ readonly name: string;
5314
+ }
5315
+ interface RenameSavedWorkflowInput {
5316
+ readonly dirs: SavedWorkflowDirs;
5317
+ readonly name: string;
5318
+ readonly newName: string;
5319
+ readonly source?: SavedWorkflowSource;
5320
+ }
5321
+ interface ReplaceSavedWorkflowInput extends Omit<SaveGeneratedWorkflowInput, 'dir'> {
5322
+ readonly dirs: SavedWorkflowDirs;
5323
+ readonly savedSource?: SavedWorkflowSource;
5324
+ }
5325
+ interface ReplaceSavedWorkflowResult extends SavedWorkflowRef {
5326
+ readonly previousPath: string;
5327
+ }
5328
+ interface LoadGeneratedWorkflowFromRunInput {
5329
+ readonly runDir: string;
5330
+ }
5331
+ interface LoadedGeneratedWorkflowFromRun {
5332
+ readonly capsule: WorkflowCapsule;
5333
+ readonly module: WorkflowModule;
5334
+ }
5335
+ interface WorkflowCapsulePreflightIssue {
5336
+ readonly severity: 'error' | 'warning';
5337
+ readonly requirement: string;
5338
+ readonly message: string;
5339
+ }
5340
+ interface WorkflowCapsulePreflightResult {
5341
+ readonly ok: boolean;
5342
+ readonly issues: readonly WorkflowCapsulePreflightIssue[];
5343
+ }
5344
+ interface WorkflowCapsulePreflightEnvironment {
5345
+ readonly kodaxVersion?: string;
5346
+ readonly isGitRepo?: boolean;
5347
+ readonly worktreeCapable?: boolean;
5348
+ readonly availableTools?: readonly string[];
5349
+ readonly availableMcp?: readonly string[];
5350
+ readonly availableSkills?: readonly string[];
5351
+ }
5352
+ /**
5353
+ * Discover saved workflows across the project + personal dirs. On a name
5354
+ * conflict the project copy wins. Result is sorted by name.
5355
+ */
5356
+ declare function discoverSavedWorkflows(dirs: SavedWorkflowDirs): Promise<SavedWorkflowRef[]>;
5357
+ /**
5358
+ * Normalize a loaded module into a `WorkflowModule`. Accepts:
5359
+ * - `export default { meta, run }`
5360
+ * - `export const workflow = {...}` (meta) + `export default <run fn>`
5361
+ * - `export const meta` + `export const run`
5362
+ */
5363
+ declare function normalizeWorkflowModule(mod: Record<string, unknown>): WorkflowModule;
5364
+ declare function loadSavedWorkflowCapsule(filePath: string): Promise<WorkflowCapsule>;
5365
+ /** Dynamically import + normalize a saved workflow file. Executes local code. */
5366
+ declare function loadSavedWorkflow(filePath: string): Promise<WorkflowModule>;
5367
+ declare function saveGeneratedWorkflow(input: SaveGeneratedWorkflowInput): Promise<SavedWorkflowRef>;
5368
+ declare function renameSavedWorkflow(input: RenameSavedWorkflowInput): Promise<SavedWorkflowRef>;
5369
+ declare function replaceSavedWorkflow(input: ReplaceSavedWorkflowInput): Promise<ReplaceSavedWorkflowResult>;
5370
+ declare function loadGeneratedWorkflowFromRun(input: LoadGeneratedWorkflowFromRunInput): Promise<LoadedGeneratedWorkflowFromRun>;
5371
+ declare function saveGeneratedWorkflowFromRun(input: SaveGeneratedWorkflowFromRunInput): Promise<SavedWorkflowRef>;
5372
+ declare function preflightWorkflowCapsule(capsule: WorkflowCapsule, env?: WorkflowCapsulePreflightEnvironment): WorkflowCapsulePreflightResult;
5373
+
5374
+ type ManagedWorkflowStatus = 'running' | 'paused' | 'completed' | 'failed' | 'denied' | 'stopped';
5375
+ interface ManagedWorkflowSnapshot {
5376
+ readonly runId: string;
5377
+ readonly workflow: string;
5378
+ readonly status: ManagedWorkflowStatus;
5379
+ readonly runDir: string;
5380
+ readonly totalSpawned: number;
5381
+ readonly eventCount: number;
5382
+ readonly startedAt: number;
5383
+ readonly endedAt?: number;
5384
+ readonly error?: string;
5385
+ readonly resultText?: string;
5386
+ }
5387
+ interface ManagedWorkflowRun {
5388
+ readonly runId: string;
5389
+ readonly done: Promise<RunWorkflowModuleOutcome>;
5390
+ readonly getSnapshot?: () => ManagedWorkflowSnapshot | undefined;
5391
+ readonly getProcessSnapshot?: () => WorkflowProcessSnapshot | undefined;
5392
+ }
5393
+ interface WorkflowRunManager {
5394
+ start(opts: RunWorkflowModuleOptions): ManagedWorkflowRun;
5395
+ startFromOptions(input: RunWorkflowFromOptionsInput): ManagedWorkflowRun;
5396
+ list(): readonly ManagedWorkflowSnapshot[];
5397
+ get(runId: string): ManagedWorkflowSnapshot | undefined;
5398
+ subscribeWorkflowProcess(listener: (event: WorkflowProcessEvent) => void): () => void;
5399
+ getWorkflowProcessSnapshot(runId: string): WorkflowProcessSnapshot | undefined;
5400
+ listWorkflowProcessSnapshots(options?: {
5401
+ readonly activeOnly?: boolean;
5402
+ readonly limit?: number;
5403
+ }): readonly WorkflowProcessSnapshot[];
5404
+ pause(runId: string): boolean;
5405
+ resume(runId: string): boolean;
5406
+ stop(runId: string, reason?: string): boolean;
5407
+ }
5408
+ declare function createWorkflowRunManager(deps?: {
5409
+ readonly now?: () => number;
5410
+ }): WorkflowRunManager;
5411
+ declare function getDefaultWorkflowRunManager(): WorkflowRunManager;
5412
+
5413
+ type WorkflowIdentityResolution = {
5414
+ readonly kind: 'run';
5415
+ readonly target: string;
5416
+ readonly runId: string;
5417
+ readonly runDir: string;
5418
+ readonly workflowName?: string;
5419
+ readonly displayName?: string;
5420
+ } | {
5421
+ readonly kind: 'saved';
5422
+ readonly target: string;
5423
+ readonly savedWorkflow: SavedWorkflowRef;
5424
+ } | {
5425
+ readonly kind: 'ambiguous';
5426
+ readonly target: string;
5427
+ readonly matches: readonly ('run' | 'saved')[];
5428
+ } | {
5429
+ readonly kind: 'missing';
5430
+ readonly target: string;
5431
+ };
5432
+ interface WorkflowIdentityResolverInput {
5433
+ readonly target: string;
5434
+ readonly runBaseDir?: string;
5435
+ readonly savedWorkflowDirs?: SavedWorkflowDirs;
5436
+ }
5437
+ declare function resolveWorkflowIdentity(input: WorkflowIdentityResolverInput): Promise<WorkflowIdentityResolution>;
5438
+
5439
+ interface WorkflowRunListOptions {
5440
+ readonly activeOnly?: boolean;
5441
+ readonly limit?: number;
5442
+ }
5443
+ interface WorkflowRunRetentionOptions {
5444
+ readonly keep?: number;
5445
+ readonly olderThanDays?: number;
5446
+ readonly dryRun?: boolean;
5447
+ }
5448
+ interface WorkflowRunRetentionResult {
5449
+ readonly deleted: number;
5450
+ readonly protectedRuns: number;
5451
+ readonly candidates: readonly string[];
5452
+ readonly dryRun: boolean;
5453
+ }
5454
+ interface DeleteWorkflowRunOptions {
5455
+ readonly force?: boolean;
5456
+ }
5457
+ interface WorkflowCapsulePreflightInput {
5458
+ readonly capsule: WorkflowCapsule;
5459
+ readonly env?: WorkflowCapsulePreflightEnvironment;
5460
+ }
5461
+ interface WorkflowLifecycleController {
5462
+ subscribeWorkflowProcess(listener: (event: WorkflowProcessEvent) => void): () => void;
5463
+ getWorkflowProcessSnapshot(runId: string): WorkflowProcessSnapshot | undefined;
5464
+ listWorkflowProcessSnapshots(options?: WorkflowRunListOptions): readonly WorkflowProcessSnapshot[];
5465
+ resolveWorkflowIdentity(target: string): Promise<WorkflowIdentityResolution>;
5466
+ preflightWorkflowCapsule(input: WorkflowCapsulePreflightInput): Promise<WorkflowCapsulePreflightResult>;
5467
+ stopWorkflow(runId: string, reason?: string): Promise<boolean>;
5468
+ pauseWorkflow(runId: string): Promise<boolean>;
5469
+ resumeWorkflow(runId: string): Promise<boolean>;
5470
+ renameWorkflowRun(runId: string, displayName: string): Promise<boolean>;
5471
+ renameSavedWorkflow(name: string, newName: string): Promise<SavedWorkflowRef | undefined>;
5472
+ replaceSavedWorkflow(input: Omit<ReplaceSavedWorkflowInput, 'dirs'>): Promise<ReplaceSavedWorkflowResult | undefined>;
5473
+ readWorkflowResult(runId: string): Promise<string | undefined>;
5474
+ readWorkflowArtifact(runId: string, name: string): Promise<unknown | undefined>;
5475
+ deleteWorkflowRun(runId: string, options?: DeleteWorkflowRunOptions): Promise<boolean>;
5476
+ pruneWorkflowRuns(options: WorkflowRunRetentionOptions): Promise<WorkflowRunRetentionResult>;
5477
+ }
5478
+ interface CreateWorkflowLifecycleControllerOptions {
5479
+ readonly runManager: WorkflowRunManager;
5480
+ readonly runBaseDir: string;
5481
+ readonly savedWorkflowDirs?: SavedWorkflowDirs;
5482
+ readonly now?: () => number;
5483
+ }
5484
+ declare function createWorkflowLifecycleController(options: CreateWorkflowLifecycleControllerOptions): WorkflowLifecycleController;
5485
+
5486
+ /**
5487
+ * FEATURE_217 (v0.7.49) Phase G — LLM-generated workflow scripts.
5488
+ *
5489
+ * The generator is intentionally small: one text-only LLM call must return
5490
+ * structured JSON, which is validated before it can become a capability-routed
5491
+ * workflow module. Execution safety belongs to the WorkflowApi command bridge;
5492
+ * this file adds an earlier prompt/output gate so bad generations fail closed.
5493
+ */
5494
+
5495
+ declare const WORKFLOW_GENERATION_SYSTEM_PROMPT: string;
5496
+ declare const DEFAULT_WORKFLOW_GENERATION_TIMEOUT_MS = 120000;
5497
+ interface WorkflowGenerationTextRequest {
5498
+ readonly system: string;
5499
+ readonly prompt: string;
5500
+ readonly signal?: AbortSignal;
5501
+ }
5502
+ type WorkflowGenerationTextFn = (request: WorkflowGenerationTextRequest) => Promise<string>;
5503
+ interface GenerateWorkflowInput {
5504
+ readonly request: string;
5505
+ readonly generateText: WorkflowGenerationTextFn;
5506
+ readonly signal?: AbortSignal;
5507
+ }
5508
+ interface GenerateWorkflowFromOptionsInput {
5509
+ readonly request: string;
5510
+ readonly options: KodaXOptions;
5511
+ readonly timeoutMs?: number;
5512
+ readonly signal?: AbortSignal;
5513
+ }
5514
+ interface GeneratedWorkflow {
5515
+ readonly manifest: WorkflowScriptManifest;
5516
+ readonly source: string;
5517
+ readonly module: WorkflowModule;
5518
+ readonly scriptSnapshot: WorkflowScriptSnapshotInput;
5519
+ readonly approvalSummary: string;
5520
+ readonly rawText: string;
5521
+ }
5522
+ type WorkflowGenerationResult = {
5523
+ readonly kind: 'declined';
5524
+ readonly reason: string;
5525
+ readonly rawText: string;
5526
+ } | ({
5527
+ readonly kind: 'generated';
5528
+ } & GeneratedWorkflow);
5529
+ declare function resolveWorkflowGenerationTimeoutMs(env?: NodeJS.ProcessEnv): number;
5530
+ declare function validateGeneratedWorkflowSource(source: string): string;
5531
+ declare function buildWorkflowGenerationUserPrompt(request: string): string;
5532
+ interface ParseWorkflowGenerationOptions {
5533
+ readonly request?: string;
5534
+ }
5535
+ declare function parseWorkflowGeneration(rawText: string, options?: ParseWorkflowGenerationOptions): WorkflowGenerationResult;
5536
+ declare function generateWorkflow(input: GenerateWorkflowInput): Promise<WorkflowGenerationResult>;
5537
+ declare function generateWorkflowFromOptions(input: GenerateWorkflowFromOptionsInput): Promise<WorkflowGenerationResult>;
5538
+
5539
+ /**
5540
+ * FEATURE_217 (v0.7.49) Phase J — small reusable workflow pattern templates.
5541
+ *
5542
+ * These are examples, not a new abstraction layer. They give the generator
5543
+ * and users concrete Claude-style workflow shapes without forcing every task
5544
+ * through a static harness.
5545
+ */
5546
+
5547
+ interface WorkflowPatternTemplate {
5548
+ readonly name: string;
5549
+ readonly pattern: WorkflowPatternId;
5550
+ readonly description: string;
5551
+ readonly manifest: WorkflowScriptManifest;
5552
+ readonly source: string;
5553
+ }
5554
+ declare function listWorkflowPatternTemplates(): readonly WorkflowPatternTemplate[];
5555
+ declare function getWorkflowPatternTemplate(name: string): WorkflowPatternTemplate | undefined;
5556
+ declare function createWorkflowPatternTemplateModule(name: string): WorkflowModule;
5557
+
5558
+ /**
5559
+ * FEATURE_217 (v0.7.49) — `@kodax-ai/coding` workflows barrel.
5560
+ *
5561
+ * Exposes the workflow agent backend (Phase B), the built-in read-only
5562
+ * workflows (Phase C), and a name-keyed registry the REPL `/workflow`
5563
+ * command (Phase D) resolves against.
5564
+ */
5565
+
5566
+ /** All built-in workflows shipped with KodaX. */
5567
+ declare const BUILTIN_WORKFLOWS: readonly WorkflowModule[];
5568
+ /** Resolve a built-in workflow by its declared `meta.name`. */
5569
+ declare function getBuiltinWorkflow(name: string): WorkflowModule | undefined;
5570
+ /** List built-in workflow metadata (for `/workflow` listing). */
5571
+ declare function listBuiltinWorkflows(): readonly WorkflowModule['meta'][];
5572
+
5573
+ export { Agent, AgentMessage, AutoRules, BLOCKER_REQUIRED_CONSECUTIVE_TURNS, BUILTIN_WORKFLOWS, CANCELLED_TOOL_RESULT_MESSAGE, CANCELLED_TOOL_RESULT_PREFIX, CODING_AGENT_MARKER, CODING_INVARIANTS, CODING_SUMMARY_PROMPT, CODING_UPDATE_SUMMARY_PROMPT, CapabilityDeniedError, CapabilityKind, CapabilityProvider, CapabilityResult, KodaXClient as Client, ConstructionManifestError, DEFAULT_CODING_AGENT_NAME, DEFAULT_DANGEROUS_PATTERNS, DEFAULT_HANDLER_TIMEOUT_MS, DEFAULT_RESILIENCE_CONFIG, DEFAULT_SAFE_PATTERNS, DEFAULT_SELF_MODIFY_BUDGET, DEFAULT_WINDOW_MS as DEFAULT_SPECULATIVE_WINDOW_MS, DEFAULT_TOOL_OUTPUT_MAX_BYTES, DEFAULT_TOOL_OUTPUT_MAX_LINES, DEFAULT_WORKFLOW_GENERATION_TIMEOUT_MS, EMIT_VERDICT_TOOL_NAME, ErrorCategory, FailureStage, GENERATOR_AGENT_NAME, GoalCompleteResult, Guardrail, KODAX_TOOLS, KodaXAmaControllerDecision, KodaXBaseProvider, KodaXChildContextBundle, KodaXClient, KodaXContentBlock, KodaXContextOptions, KodaXEvents, KodaXExecutionMode, KodaXExtensionRuntime, KodaXExtensionSessionRecord, KodaXFanoutBranchRecord, KodaXFanoutBranchTransition, KodaXFanoutSchedulerInput, KodaXFanoutSchedulerPlan, KodaXInputArtifact, KodaXJsonValue, KodaXManualTopicId, KodaXMessage, KodaXOptions, KodaXParentReductionContract, KodaXProviderCapabilityProfile, KodaXProviderPolicyHints, KodaXReasoningCapability, KodaXReasoningMode, KodaXRepoIntelligenceCapability, KodaXRepoIntelligenceMode, KodaXRepoIntelligenceResolvedMode, KodaXRepoIntelligenceTrace, KodaXRepoRoutingSignals, KodaXResult, KodaXSessionControl, KodaXSessionError, KodaXSessionMutators, KodaXTaskRoutingDecision, KodaXTaskType, KodaXTerminalError, KodaXThinkingDepth, KodaXTokenUsage, KodaXToolDefinition, KodaXToolError, KodaXToolExecutionContext, KodaXToolUseBlock, MANUAL_TOPIC_IDS, McpCapabilityProvider, McpProviderOptions, McpReverseCapabilities, McpRoot, McpServersConfig, PLANNER_AGENT_NAME, PROMPT_SECTION_REGISTRY, PROTOCOL_EMITTER_TOOLS, ProviderExecutionState, ProviderRecoveryCoordinator, ProviderResilienceConfig, ProviderResiliencePolicy, READ_DEFAULT_LIMIT, READ_MAX_LINE_CHARS, READ_PREFLIGHT_SIZE_BYTES, REPOINTEL_DEFAULT_ENDPOINT, RecoveryDecision, RecoveryResult, ResilienceClassification, ResolveKodaXManualInput, ResolveKodaXManualOptions, ResolveKodaXManualResult, SCOUT_AGENT_NAME, SELF_KNOWLEDGE_ROUTING_RULE, SYSTEM_PROMPT, SYSTEM_WORKFLOW_LIMITS, SessionErrorMetadata, SignalCollector, StableBoundaryTracker, TASK_ENGINE_ROLE_AGENTS, TOOL_RESULT_TRUNCATION_GUARDRAIL_NAME, TRACING_ENV, ToolCallSignal, WORKER_AGENT_NAME, WORKFLOW_GENERATION_SYSTEM_PROMPT, WorkflowEventCorrelation, WorkflowHostPolicy, _resetRuntimeForTesting, activate, analyzeChangedScope, appendAuditEntry, applyAccountingDelta, applyFanoutBranchTransition, applyToolResultGuardrail, assignFanoutBranchWorker, bashSignalCollector, bootstrapTracing, boundedRevise, budgetCeiling, buildAmaControllerDecision, buildApprovalSummary, buildBlockedGoal, buildCapabilityContextSections, buildClassifierPrompt, buildCompleteGoal, buildCreatedGoal, buildFallbackRoutingDecision, buildFanoutSchedulerPlan, buildLlmReviewPrompt, buildMcpReverseCapabilities, buildPausedGoal, buildPromptMessageContent, buildPromptOverlay, buildPromptSnapshot, buildProviderCapabilitySnapshot, buildProviderPolicyHintsForDecision, buildProviderPolicyPromptNotes, buildRepoIntelligenceContext, buildRepoIntelligenceIndex, buildRepoOverview, buildResumedGoal, buildSelfKnowledgeRoutingRule, buildSystemPrompt, buildSystemPromptSnapshot, buildWorkflowGenerationUserPrompt, checkAbsoluteDeny, checkIncompleteToolCalls, checkPromiseSignal, clampWorkflowLimits, classify, classifyBashCommand, classifyError, classifyResilienceError, computeInputSignature, configureRuntime, convertCapabilityReadResult, convertProviderSearchResults, countActiveFanoutBranches, createBashClassifierConfig, createBuiltinToolDefinition, createCodingWorkflowBackend, createCtxProxy, createDefaultCodingAgent, createDenialTracker, createExtensionRuntime, createFanoutSchedulerInput, createKodaXTaskRunner, createPromptSection, createReasoningPlan, createRunGraphWriter, createSessionControl, createToolResultTruncationGuardrail, createWorkflowLifecycleController, createWorkflowPatternTemplateModule, createWorkflowRunManager, defaultPolicy, disableSelfModify, discoverMarkdownAgents, discoverSavedWorkflows, drainPendingSwaps, emitVerdict, evaluateProviderPolicy, exec, executeTool, extractComparableUserMessageText, extractHtmlTitle, extractPromptComparableText, fileSignalCollector, finalizeRetrievalResult, findByVersion, formatParallelDispatchResult, formatSize, generateWorkflow, generateWorkflowFromOptions, getActiveExtensionRuntime, getAllRegisteredTools, getBuiltinRegisteredToolDefinition, getBuiltinToolDefinition, getBuiltinWorkflow, getDefaultWorkflowRunManager, getDenialContext, getFanoutBranch, getImpactEstimate, getModuleContext, getProcessContext, getRegisteredToolDefinition, getRepoIntelligenceIndex, getRepoOverview, getRepoRoutingSignals, getRequiredToolParams, getSymbolContext, getTool, getToolDefinition, getToolRegistrations, getToolResultPolicy, getWorkflowPatternTemplate, goalTokenDelta, hasPendingSwap, inferTaskType, inspectEditFailure, inspectRepoIntelligenceRuntime, isDeniedRecently, isParallelDispatchDirective, isToolFileMutation, isToolMutation, isToolPlanModeAllowed, isValidTokenBudget, languageIdForPath, listAll, list as listArtifacts, listBuiltinToolDefinitions, listBuiltinWorkflows, listConstructed, listToolDefinitions, listTools, listWorkflowPatternTemplates, loadAgentsFromMarkdown, loadGeneratedWorkflowFromRun, loadHandler, loadSavedWorkflow, loadSavedWorkflowCapsule, markFanoutBranchCancelled, markFanoutBranchCompleted, mcpRootsFromWorkspace, normalizeWorkflowModule, orderPromptSections, parallelInvestigation, parseClassifierOutput, parseEditToolError, parseLlmReviewVerdict, parseModelSpec, parseWorkflowGeneration, persistToolOutput, preflightWorkflowCapsule, prewarmRepoIntelligenceCaches, readArtifact, readAuditEntries, readBudget, readDisableState, readWindowFromEnv as readSpeculativeWindowFromEnv, reasoningModeToDepth, reconstructMessagesWithToolGuard, recordBlockerAttempt, recordDenial, registerCodingInvariants, registerConfiguredMcpCapabilityProvider, registerOfficialSandboxExtension, registerTool, rehydrateActiveArtifacts, remaining as remainingSelfModifyBudget, renameSavedWorkflow, renderChangedScope, renderImpactEstimate, renderModuleContext, renderProcessContext, renderPromptSections, renderRepoOverview, renderRetrievalResult, renderSymbolContext, replaceSavedWorkflow, report as reportLspDiagnostics, resetBlockerCounter, resetBudget, resolveClassifierModel, resolveConstructedAgent, resolveKodaXManual, resolveReasoningMode, resolveRepoIntelligenceMode, resolveRepoIntelligenceRuntimeConfig, resolveResilienceConfig, resolveToolCapability, resolveWorkflowGenerationTimeoutMs, resolveWorkflowIdentity, revoke, rollbackSelfModify, runAstRules, runKodaX, runLlmReview, runManagedTask, runOrchestration, runWorkflowFromOptions, runWorkflowModule, safeWorkflowArtifactName, saveGeneratedWorkflow, saveGeneratedWorkflowFromRun, setActiveExtensionRuntime, shouldFlipBudgetLimited, speculativeRace, stage, startKodaX, stripAssistantText, stripHtmlToText, test as testArtifact, toolAskUserQuestion, toolBash, toolChangedDiff, toolChangedScope, toolCodeSearch, toolEdit, toolGlob, toolGrep, toolImpactEstimate, toolInsertAfterAnchor, toolModuleContext, toolPermission, toolProcessContext, toolRead, toolRepoOverview, toolSemanticLookup, toolSymbolContext, toolUndo, toolWebFetch, toolWebSearch, toolWrite, truncateHead, truncateLine, truncateTail, turnWallTimeDelta, validateGeneratedWorkflowSource, validateSubtaskIndependence, validateToolSchemaForProvider, verifyGoalCompletion, warmRepoIntelligenceRuntime, webhook, workerAgent };
5574
+ export type { AbsoluteDenyMatch, AbsoluteDenyMiss, AbsoluteDenyResult, AgentArtifact, ArtifactStatus, AstCheckResult, AstRuleId, AstRuleViolation, AuditEntry, AuditEventKind, BashClassificationResult, BashClassifierConfig, BashRiskLevel, BlockerAttemptResult, BootstrapTracingOptions, BudgetState, BuildClassifierPromptInput, BuildPromptInput, Capabilities, ChangedFileEntry, ChangedFileStatus, ChangedScopeAreaSummary, ChangedScopeReport, ClassifierDecision, ClassifierPrompt, ClassifyDecision, ClassifyOptions, CodingWorkflowBackendDeps, ConstructionArtifact, ConstructionPolicy, ConstructionPolicyVerdict, CreateCtxProxyOptions, CreateKodaXTaskRunnerOptions, CreateWorkflowLifecycleControllerOptions, DeleteWorkflowRunOptions, DenialRecord, DenialTracker, DisableState, DiscoverMarkdownAgentsResult, DiscoveredMarkdownAgent, EditRecoveryDiagnostic, EditToolErrorCode, ErrorClassification, ExecOptions, ExecResult, ExtensionCommandContext, ExtensionCommandDefinition, ExtensionCommandInvocation, ExtensionCommandResult, ExtensionContributionSource, ExtensionEventMap, ExtensionFailureDiagnostic, ExtensionFailureStage, ExtensionHookMap, ExtensionLoadSource, ExtensionLogger, ExtensionRuntimeController, ExtensionRuntimeDiagnostics, ExtensionToolBeforeHookContext, GenerateWorkflowFromOptionsInput, GenerateWorkflowInput, GeneratedWorkflow, GoalCompletionVerifier, ImpactEstimateResult, InvestigationFinding, KodaXAgentWorkerSpec, KodaXExtensionAPI, KodaXExtensionActivationResult, KodaXExtensionModule, KodaXPromptSection, KodaXPromptSectionDefinition, KodaXPromptSectionSlot, KodaXPromptSectionStability, KodaXPromptSnapshot, KodaXPromptSnapshotMetadata, KodaXProviderCapabilitySnapshot, KodaXProviderPolicyDecision, KodaXProviderPolicyIssue, KodaXProviderPolicyIssueSeverity, KodaXProviderSourceKind, KodaXRetrievalArtifact, KodaXRetrievalFreshness, KodaXRetrievalItem, KodaXRetrievalResult, KodaXRetrievalScope, KodaXRetrievalToolName, KodaXRetrievalTrust, LanguageCapabilityTier, LlmReviewClient, LlmReviewResult, LlmReviewVerdict, LoadAgentsFromMarkdownOptions, LoadAgentsFromMarkdownResult, LoadGeneratedWorkflowFromRunInput, LoadHandlerOptions, LoadHandlerScope, LoadedExtensionDiagnostic, LoadedGeneratedWorkflowFromRun, LocalToolDefinition, ManagedWorkflowRun, ManagedWorkflowSnapshot, ManagedWorkflowStatus, MarkdownLoadFailure, McpReverseWorkspace, ModelProviderRegistration, ModuleCapsule, ModuleContextResult, OfficialSandboxMode, OfficialSandboxOptions, OrchestrationArtifact, OrchestrationCompletedTask, OrchestrationRunEvents, OrchestrationRunOptions, OrchestrationRunResult, OrchestrationTaskBudget, OrchestrationTaskContext, OrchestrationTaskExecution, OrchestrationTaskStatus, OrchestrationTraceEvent, OrchestrationWorkerResult, OrchestrationWorkerRunner, OrchestrationWorkerSpec, ParallelDispatchDirective, ParallelDispatchResult, ParallelInvestigationArgs, ParallelInvestigationResult, ParallelSubtask, ParsedModelSpec, ProcessCapsule, ProcessContextResult, ProcessStep, ProtocolEmitterMetadata, RegisteredCapabilityProviderDiagnostic, RegisteredCommandDiagnostic, RegisteredHookDiagnostic, RegisteredToolDefinition, RegisteredToolDiagnostic, RenameSavedWorkflowInput, ReplaceSavedWorkflowInput, ReplaceSavedWorkflowResult, RepoAreaKind, RepoAreaOverview, RepoIntelligenceIndex, RepoIntelligenceRuntimeInspection, RepoIntelligenceRuntimeWarmResult, RepoLanguageId, RepoLanguageSupport, RepoOverview, RepoSymbolKind, RepoSymbolRecord, RepoSymbolReference, ResolveClassifierModelOptions, ResolveSource, ResolvedClassifierModel, RollbackResult, RunGraphWriter, RunGraphWriterDeps, RunJsonInput, RunWorkflowFromOptionsInput, RunWorkflowModuleOptions, RunWorkflowModuleOutcome, RunningSession, SaveGeneratedWorkflowFromRunInput, SaveGeneratedWorkflowInput, SavedGeneratedWorkflowFile, SavedWorkflowDirs, SavedWorkflowExecution, SavedWorkflowRef, SavedWorkflowSource, SchemaProvider, SchemaValidationResult, ScriptSource, SelfModifyAskUser, SelfModifyAskUserInput, SelfModifyDiffSeverity, SelfModifyDiffSummary, SpeculativeResult, StagedHandle, StripOptions, SymbolContextResult, TestArtifactOptions, TestResult, TierZeroPatternId, ToolContent, ToolDefinitionSource, ToolHandler, ToolRegistrationOptions, ToolRegistry, ToolSideEffect, VerifyGoalCompletionOptions, WebhookOptions, WebhookResult, WorkflowCapsulePreflightEnvironment, WorkflowCapsulePreflightInput, WorkflowCapsulePreflightIssue, WorkflowCapsulePreflightResult, WorkflowChildOptions, WorkflowGenerationResult, WorkflowGenerationTextFn, WorkflowGenerationTextRequest, WorkflowIdentityResolution, WorkflowIdentityResolverInput, WorkflowLifecycleController, WorkflowPatternTemplate, WorkflowRunListOptions, WorkflowRunManager, WorkflowRunProcessMetadata, WorkflowRunRetentionOptions, WorkflowRunRetentionResult, WorkflowScriptSnapshotInput, WorkflowScriptSnapshotRef };