@kodax-ai/kodax 0.7.41 → 0.7.42

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 (56) hide show
  1. package/CHANGELOG.md +89 -1
  2. package/README.md +129 -232
  3. package/README_CN.md +128 -253
  4. package/dist/chunks/chunk-3RKBXWZS.js +2 -0
  5. package/dist/chunks/chunk-7JLYVWAF.js +1033 -0
  6. package/dist/chunks/chunk-CD3R5YBH.js +16 -0
  7. package/dist/chunks/chunk-DKXUY5F2.js +209 -0
  8. package/dist/chunks/chunk-HMYEQJGT.js +31 -0
  9. package/dist/chunks/{chunk-6OB4AJOM.js → chunk-IYJ5EPRV.js} +1 -1
  10. package/dist/chunks/chunk-KUX5LRPP.js +2 -0
  11. package/dist/chunks/{chunk-EQ5DGS2W.js → chunk-OWSKU55I.js} +5 -6
  12. package/dist/chunks/chunk-ZZ4KRK2B.js +465 -0
  13. package/dist/chunks/compaction-config-FIFFP4FT.js +2 -0
  14. package/dist/chunks/{construction-bootstrap-HBCWJFHC.js → construction-bootstrap-J2WOCYEK.js} +1 -1
  15. package/dist/chunks/dist-2ZHWDXMQ.js +2 -0
  16. package/dist/chunks/dist-W4CJWLIH.js +2 -0
  17. package/dist/chunks/utils-A5MWDTWZ.js +2 -0
  18. package/dist/index.d.ts +15 -10
  19. package/dist/index.js +5 -5
  20. package/dist/kodax_cli.js +841 -833
  21. package/dist/sdk-agent.d.ts +9 -93
  22. package/dist/sdk-agent.js +1 -1
  23. package/dist/sdk-coding.d.ts +315 -250
  24. package/dist/sdk-coding.js +1 -1
  25. package/dist/sdk-llm.d.ts +6 -5
  26. package/dist/sdk-llm.js +1 -1
  27. package/dist/sdk-mcp.d.ts +17 -0
  28. package/dist/sdk-mcp.js +2 -0
  29. package/dist/sdk-repl.d.ts +342 -10
  30. package/dist/sdk-repl.js +2 -1
  31. package/dist/sdk-session.d.ts +164 -0
  32. package/dist/sdk-session.js +2 -0
  33. package/dist/sdk-skills.d.ts +72 -4
  34. package/dist/sdk-skills.js +1 -1
  35. package/dist/types-chunks/{bash-prefix-extractor.d-B2iliwdi.d.ts → bash-prefix-extractor.d-CkhaqKkg.d.ts} +237 -98
  36. package/dist/types-chunks/capability.d-3C62G8Eq.d.ts +39 -0
  37. package/dist/types-chunks/config.d-BfJUXxC0.d.ts +41 -0
  38. package/dist/types-chunks/{cost-tracker.d-C4dMlQuV.d.ts → cost-tracker.d-B6vMoLLF.d.ts} +20 -2
  39. package/dist/types-chunks/{history-cleanup.d-q1vAvCss.d.ts → history-cleanup.d-DznrzEiU.d.ts} +221 -12
  40. package/dist/types-chunks/{instance-discovery.d-DZhp77vb.d.ts → instance-discovery.d-BsKnIwpg.d.ts} +31 -258
  41. package/dist/types-chunks/{resolver.d-BwD6TKz7.d.ts → resolver.d-DX9au4NJ.d.ts} +4 -3
  42. package/dist/types-chunks/session-storage.d-Cci897iM.d.ts +68 -0
  43. package/dist/types-chunks/{storage.d-Bv9T99Qu.d.ts → storage.d-Bc5DoAwp.d.ts} +17 -69
  44. package/dist/types-chunks/transport.d-DuyjG30t.d.ts +180 -0
  45. package/dist/types-chunks/{capability.d-BxNgd1-c.d.ts → types.d-B1uGoVTE.d.ts} +72 -40
  46. package/dist/types-chunks/types.d-mM8vqvhT.d.ts +254 -0
  47. package/package.json +9 -1
  48. package/dist/chunks/chunk-5TFLMGER.js +0 -2
  49. package/dist/chunks/chunk-6QO6HWGU.js +0 -30
  50. package/dist/chunks/chunk-HYWVRTFA.js +0 -1233
  51. package/dist/chunks/chunk-SX2IS5JP.js +0 -16
  52. package/dist/chunks/chunk-ZPJPNLBK.js +0 -462
  53. package/dist/chunks/compaction-config-LT5PEXPT.js +0 -2
  54. package/dist/chunks/dist-M57GIWR4.js +0 -2
  55. package/dist/chunks/dist-V3BS2NKB.js +0 -2
  56. package/dist/chunks/utils-FAFUQJ2A.js +0 -2
@@ -1,13 +1,20 @@
1
- import { o as KodaXMessage, a as CapabilityProvider, C as CapabilityKind, b as CapabilityResult, _ as KodaXToolDefinition, G as KodaXReasoningMode, a0 as KodaXToolUseBlock, i as KodaXContentBlock, s as KodaXProviderCapabilityProfile, F as KodaXReasoningCapability, T as KodaXTaskType, k as KodaXExecutionMode, S as KodaXTaskRoutingDecision, K as KodaXAmaControllerDecision, Y as KodaXThinkingDepth } from './types-chunks/capability.d-BxNgd1-c.js';
2
- export { c as KodaXAmaFanoutClass, d as KodaXAmaFanoutPolicy, e as KodaXAmaProfile, f as KodaXAmaTactic, j as KodaXCustomProviderConfig, n as KodaXImageBlock, p as KodaXModelDescriptor, r as KodaXProtocolFamily, t as KodaXProviderConfig, v as KodaXProviderConversationSemantics, y as KodaXProviderMcpSupport, B as KodaXProviderStreamOptions, E as KodaXProviderTransport, H as KodaXReasoningOverride, I as KodaXReasoningRequest, J as KodaXRedactedThinkingBlock, L as KodaXReviewScale, M as KodaXRiskLevel, N as KodaXStreamResult, P as KodaXTaskBudgetOverrides, V as KodaXTextBlock, W as KodaXThinkingBlock, X as KodaXThinkingBudgetMap, Z as KodaXTokenUsage, $ as KodaXToolResultBlock } from './types-chunks/capability.d-BxNgd1-c.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, i as KodaXOpenAICompatProvider, j as KodaXProviderError, k as KodaXRateLimitError, P as ProviderName, m as buildReasoningOverrideKey, o as clearReasoningOverride, p as clearRuntimeModelProviders, q as createCustomProvider, r as getAvailableProviderNames, s as getCustomProvider, t as getCustomProviderList, u as getCustomProviderModels, v as getCustomProviderNames, x as getProvider, y as getProviderConfiguredCapabilityProfile, z as getProviderConfiguredReasoningCapability, A as getProviderList, B as getProviderModel, C as getProviderModels, E as getRuntimeModelProvider, F as getRuntimeModelProviderNames, G as isCustomProviderName, H as isKnownProvider, I as isProviderConfigured, J as isProviderName, M as isRuntimeModelProviderName, N as loadReasoningOverride, R as reasoningCapabilityToOverride, S as reasoningOverrideToCapability, T as registerCustomProviders, U as registerModelProvider, V as resolveProvider, X as saveReasoningOverride } from './types-chunks/resolver.d-BwD6TKz7.js';
4
- import { K as KodaXBaseProvider, a as CostTracker } from './types-chunks/cost-tracker.d-C4dMlQuV.js';
5
- import { q as CompactionDetails, ay as McpServerConfig, az as McpServersConfig, as as KodaXToolExecutionContext, a2 as KodaXRepoIntelligenceCapability, a5 as KodaXRepoIntelligenceTrace, a3 as KodaXRepoIntelligenceMode, a7 as KodaXRepoRoutingSignals, a4 as KodaXRepoIntelligenceResolvedMode, _ as KodaXOptions, P as KodaXInputArtifact, G as KodaXContextOptions, a1 as KodaXProviderPolicyHints, aD as ProviderResilienceConfig, aE as ProviderResiliencePolicy, F as FailureStage, aJ as ResilienceClassification, aB as ProviderExecutionState, aG as RecoveryDecision, aI as RecoveryResult, a8 as KodaXResult, O as KodaXFanoutSchedulerPlan, M as KodaXFanoutBranchTransition, N as KodaXFanoutSchedulerInput, z as KodaXChildContextBundle, a0 as KodaXParentReductionContract, L as KodaXFanoutBranchRecord, R as KodaXManagedProtocolPayload, u as ExtensionRuntimeContract, I as KodaXEvents, k as AutoRules, aS as ToolCallSignal, aN as SignalCollector } from './types-chunks/bash-prefix-extractor.d-B2iliwdi.js';
6
- export { C as AUTO_MODE_DENIAL_CONSECUTIVE_THRESHOLD, n as AUTO_MODE_DENIAL_CUMULATIVE_THRESHOLD, A as AgentsFile, a as AskUserMultiOptions, b as AskUserQuestionItem, c as AskUserQuestionOptions, d as AutoModeAskUser, e as AutoModeAskUserVerdict, D as AutoModeDenialTracker, f as AutoModeEngine, g as AutoModeGuardrailConfig, h as AutoModeSharedState, i as AutoModeStats, j as AutoModeToolGuardrail, B as BASH_POLICY_SPEC, E as BREAKER_ERROR_THRESHOLD, aU as BREAKER_WINDOW_MS, l as BashPrefixExtractor, m as BashPrefixResult, o as CircuitBreaker, p as CompactionAnchor, r as CompactionResult, s as CompactionUpdate, t as CreateBashPrefixExtractorOptions, v as ExtractCommandPrefixOptions, K as KodaXAgentMode, w as KodaXBudgetDisclosureZone, x as KodaXBudgetExtensionRequest, y as KodaXChildAgentResult, H as KodaXContextTokenSnapshot, J as KodaXFanoutBranchLifecycle, Q as KodaXManagedBudgetSnapshot, S as KodaXManagedTask, T as KodaXManagedTaskRuntimeState, U as KodaXManagedTaskStatusEvent, V as KodaXMcpConnectMode, W as KodaXMcpServerConfig, X as KodaXMcpServersConfig, Y as KodaXMcpTransport, Z as KodaXMemoryStrategy, $ as KodaXOrchestrationVerdict, a6 as KodaXRepoIntelligenceTraceEvent, a9 as KodaXRoleRoundSummary, aa as KodaXRuntimeVerificationContract, ab as KodaXSessionOptions, ac as KodaXSkillInvocationContext, ad as KodaXSkillMap, ae as KodaXSkillProjectionConfidence, af as KodaXTaskCapabilityHint, ag as KodaXTaskContract, ah as KodaXTaskEvidenceArtifact, ai as KodaXTaskEvidenceBundle, aj as KodaXTaskEvidenceEntry, ak as KodaXTaskRole, al as KodaXTaskRoleAssignment, am as KodaXTaskStatus, an as KodaXTaskSurface, ao as KodaXTaskToolPolicy, ap as KodaXTaskVerificationContract, aq as KodaXTaskVerificationCriterion, ar as KodaXTaskWorkItem, at as KodaXVerificationScorecard, au as KodaXVerificationScorecardCriterion, av as LoadAgentsOptions, aw as LoadedRulesSource, ax as McpConnectMode, aA as McpTransportKind, aC as ProviderRecoveryEvent, aF as RecoveryAction, aH as RecoveryLadderStep, aK as ResilienceErrorClass, aL as RulesLoadError, aM as RulesLoadResult, aO as SkippedRulesSource, aP as TodoItem, aQ as TodoList, aR as TodoStatus, aT as TrustState, b9 as autoModeDenialShouldFallback, ba as breakerShouldFallback, aV as collectAllSignals, aW as computeRulesFingerprint, a_ as createAutoModeDenialTracker, aX as createAutoModeToolGuardrail, aY as createBashPrefixExtractor, aZ as createCircuitBreaker, a$ as extractCommandPrefix, b0 as formatAgentsForPrompt, b1 as getKodaxGlobalDir, b2 as loadAgentsFiles, b3 as loadAutoRules, b4 as parseAutoRules, b5 as readTrustState, b6 as recordAutoModeAllow, b7 as recordAutoModeBlock, b8 as recordBreakerError, bb as trustProjectRules } from './types-chunks/bash-prefix-extractor.d-B2iliwdi.js';
7
- import { N as SessionExtension, L as SessionEntry, g as CompactionPolicy, S as Session, C as CompactionContext, w as PolicyCompactionResult, Q as QualityInvariant, W as ToolCapability } from './types-chunks/history-cleanup.d-q1vAvCss.js';
8
- export { e as CompactionEntry, f as CompactionEntryPayload, h as DefaultSummaryCompaction, i as DefaultSummaryCompactionOptions, I as InMemorySessionOptions, K as KODAX_API_MIN_INTERVAL, n as KODAX_DEFAULT_TIMEOUT, o as KODAX_HARD_TIMEOUT, p as KODAX_MAX_INCOMPLETE_RETRIES, r as KODAX_MAX_RETRIES, s as KODAX_MAX_TOKENS, t as KODAX_RETRY_BASE_DELAY, u as KODAX_STAGGER_DELAY, v as MessageEntry, P as PROMISE_PATTERN, x as PresetDispatcher, B as RunEvent, E as RunOptions, F as RunResult, G as Runner, T as SessionForkOptions, $ as cleanupIncompleteToolCalls, a0 as countTokens, a1 as createInMemorySession, a4 as estimateTokens, a7 as registerPresetDispatcher, aa as validateAndFixToolHistory } from './types-chunks/history-cleanup.d-q1vAvCss.js';
9
- import { z as KodaXSessionLineage, q as KodaXJsonValue, l as KodaXCompactMemorySeed, w as KodaXSessionEntry, N as KodaXSessionTreeNode, y as KodaXSessionLabelEntry, F as KodaXSessionNavigationOptions, s as KodaXSessionArtifactLedgerEntry, m as KodaXExtensionSessionRecord, o as KodaXExtensionStore, a3 as SessionErrorMetadata, Y as RunnableTool, A as Agent, ae as ToolGuardrail, a as AgentMessage, _ as RunnerLlmReturn, $ as RunnerToolCall } from './types-chunks/instance-discovery.d-DZhp77vb.js';
10
- export { c as AgentReasoningProfile, d as AgentTool, G as Guardrail, H as Handoff, K as KodaXCompactMemoryProgress, n as KodaXExtensionSessionState, t as KodaXSessionBranchSummaryEntry, u as KodaXSessionCompactionEntry, v as KodaXSessionData, x as KodaXSessionEntryBase, B as KodaXSessionMessageEntry, E as KodaXSessionMeta, J as KodaXSessionRuntimeInfo, L as KodaXSessionScope, M as KodaXSessionStorage, O as KodaXSessionUiHistoryItem, P as KodaXSessionUiHistoryItemType, Q as KodaXSessionWorkspaceKind, U as ReasoningDepth, ai as createAgent, aj as createHandoff } from './types-chunks/instance-discovery.d-DZhp77vb.js';
1
+ import { m as KodaXMessage, X as KodaXToolDefinition, Z as KodaXToolResultContentItem, D as KodaXReasoningMode, a0 as KodaXToolUseBlock, g as KodaXContentBlock, q as KodaXProviderCapabilityProfile, C as KodaXReasoningCapability, Q as KodaXTaskType, i as KodaXExecutionMode, P as KodaXTaskRoutingDecision, K as KodaXAmaControllerDecision, V as KodaXThinkingDepth } from './types-chunks/types.d-B1uGoVTE.js';
2
+ export { a as KodaXAmaFanoutClass, b as KodaXAmaFanoutPolicy, c as KodaXAmaProfile, d as KodaXAmaTactic, h as KodaXCustomProviderConfig, l as KodaXImageBlock, n as KodaXModelDescriptor, p as KodaXProtocolFamily, r as KodaXProviderConfig, t as KodaXProviderConversationSemantics, w as KodaXProviderMcpSupport, z as KodaXProviderStreamOptions, B as KodaXProviderTransport, E as KodaXReasoningOverride, F as KodaXReasoningRequest, G as KodaXRedactedThinkingBlock, H as KodaXReviewScale, I as KodaXRiskLevel, J as KodaXStreamResult, M as KodaXTaskBudgetOverrides, S as KodaXTextBlock, T as KodaXThinkingBlock, U as KodaXThinkingBudgetMap, W as KodaXTokenUsage, Y as KodaXToolResultBlock } from './types-chunks/types.d-B1uGoVTE.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, i as KodaXOpenAICompatProvider, j as KodaXProviderError, k as KodaXRateLimitError, P as ProviderName, m as buildReasoningOverrideKey, o as clearReasoningOverride, p as clearRuntimeModelProviders, q as createCustomProvider, r as getAvailableProviderNames, s as getCustomProvider, t as getCustomProviderList, u as getCustomProviderModels, v as getCustomProviderNames, x as getProvider, y as getProviderConfiguredCapabilityProfile, z as getProviderConfiguredReasoningCapability, A as getProviderList, B as getProviderModel, C as getProviderModels, E as getRuntimeModelProvider, F as getRuntimeModelProviderNames, G as isCustomProviderName, H as isKnownProvider, I as isProviderConfigured, J as isProviderName, M as isRuntimeModelProviderName, N as loadReasoningOverride, R as reasoningCapabilityToOverride, S as reasoningOverrideToCapability, T as registerCustomProviders, U as registerModelProvider, V as resolveProvider, X as saveReasoningOverride, Y as validateCustomProviderConfig } from './types-chunks/resolver.d-DX9au4NJ.js';
4
+ import { K as KodaXBaseProvider, a as CostTracker } from './types-chunks/cost-tracker.d-B6vMoLLF.js';
5
+ import { C as CapabilityKind, a as CapabilityProvider, b as CapabilityResult } from './types-chunks/capability.d-3C62G8Eq.js';
6
+ import { q as CompactionDetails, au as KodaXToolExecutionContext, a2 as KodaXRepoIntelligenceCapability, a5 as KodaXRepoIntelligenceTrace, a3 as KodaXRepoIntelligenceMode, a7 as KodaXRepoRoutingSignals, a4 as KodaXRepoIntelligenceResolvedMode, _ as KodaXOptions, P as KodaXInputArtifact, G as KodaXContextOptions, a1 as KodaXProviderPolicyHints, aB as ProviderResilienceConfig, aC as ProviderResiliencePolicy, F as FailureStage, aH as ResilienceClassification, az as ProviderExecutionState, aE as RecoveryDecision, aG as RecoveryResult, a8 as KodaXResult, ab as KodaXSessionControl, ac as KodaXSessionMutators, O as KodaXFanoutSchedulerPlan, M as KodaXFanoutBranchTransition, N as KodaXFanoutSchedulerInput, z as KodaXChildContextBundle, a0 as KodaXParentReductionContract, L as KodaXFanoutBranchRecord, R as KodaXManagedProtocolPayload, u as ExtensionRuntimeContract, I as KodaXEvents, k as AutoRules, aQ as ToolCallSignal, aL as SignalCollector } from './types-chunks/bash-prefix-extractor.d-CkhaqKkg.js';
7
+ export { C as AUTO_MODE_DENIAL_CONSECUTIVE_THRESHOLD, n as AUTO_MODE_DENIAL_CUMULATIVE_THRESHOLD, A as AgentsFile, a as AskUserMultiOptions, b as AskUserQuestionItem, c as AskUserQuestionOptions, d as AutoModeAskUser, e as AutoModeAskUserVerdict, D as AutoModeDenialTracker, f as AutoModeEngine, g as AutoModeGuardrailConfig, h as AutoModeSharedState, i as AutoModeStats, j as AutoModeToolGuardrail, B as BASH_POLICY_SPEC, E as BREAKER_ERROR_THRESHOLD, aS as BREAKER_WINDOW_MS, l as BashPrefixExtractor, m as BashPrefixResult, o as CircuitBreaker, p as CompactionAnchor, r as CompactionResult, s as CompactionUpdate, t as CreateBashPrefixExtractorOptions, v as ExtractCommandPrefixOptions, K as KodaXAgentMode, w as KodaXBudgetDisclosureZone, x as KodaXBudgetExtensionRequest, y as KodaXChildAgentResult, H as KodaXContextTokenSnapshot, J as KodaXFanoutBranchLifecycle, Q as KodaXManagedBudgetSnapshot, S as KodaXManagedTask, T as KodaXManagedTaskRuntimeState, U as KodaXManagedTaskStatusEvent, V as KodaXMcpConnectMode, W as KodaXMcpServerConfig, X as KodaXMcpServersConfig, Y as KodaXMcpTransport, Z as KodaXMemoryStrategy, $ as KodaXOrchestrationVerdict, a6 as KodaXRepoIntelligenceTraceEvent, a9 as KodaXRoleRoundSummary, aa as KodaXRuntimeVerificationContract, ad as KodaXSessionOptions, ae as KodaXSkillInvocationContext, af as KodaXSkillMap, ag as KodaXSkillProjectionConfidence, ah as KodaXTaskCapabilityHint, ai as KodaXTaskContract, aj as KodaXTaskEvidenceArtifact, ak as KodaXTaskEvidenceBundle, al as KodaXTaskEvidenceEntry, am as KodaXTaskRole, an as KodaXTaskRoleAssignment, ao as KodaXTaskStatus, ap as KodaXTaskSurface, aq as KodaXTaskToolPolicy, ar as KodaXTaskVerificationContract, as as KodaXTaskVerificationCriterion, at as KodaXTaskWorkItem, av as KodaXVerificationScorecard, aw as KodaXVerificationScorecardCriterion, ax as LoadAgentsOptions, ay as LoadedRulesSource, aA as ProviderRecoveryEvent, aD as RecoveryAction, aF as RecoveryLadderStep, aI as ResilienceErrorClass, aJ as RulesLoadError, aK as RulesLoadResult, aM as SkippedRulesSource, aN as TodoItem, aO as TodoList, aP as TodoStatus, aR as TrustState, b7 as autoModeDenialShouldFallback, b8 as breakerShouldFallback, aT as collectAllSignals, aU as computeRulesFingerprint, aY as createAutoModeDenialTracker, aV as createAutoModeToolGuardrail, aW as createBashPrefixExtractor, aX as createCircuitBreaker, aZ as extractCommandPrefix, a_ as formatAgentsForPrompt, a$ as getKodaxGlobalDir, b0 as loadAgentsFiles, b1 as loadAutoRules, b2 as parseAutoRules, b3 as readTrustState, b4 as recordAutoModeAllow, b5 as recordAutoModeBlock, b6 as recordBreakerError, b9 as trustProjectRules } from './types-chunks/bash-prefix-extractor.d-CkhaqKkg.js';
8
+ import { N as SessionExtension, L as SessionEntry, g as CompactionPolicy, S as Session, C as CompactionContext, w as PolicyCompactionResult, Q as QualityInvariant, Z as ToolCapability } from './types-chunks/history-cleanup.d-DznrzEiU.js';
9
+ export { e as CompactionEntry, f as CompactionEntryPayload, h as DefaultSummaryCompaction, i as DefaultSummaryCompactionOptions, I as InMemorySessionOptions, K as KODAX_API_MIN_INTERVAL, n as KODAX_DEFAULT_TIMEOUT, o as KODAX_HARD_TIMEOUT, p as KODAX_MAX_INCOMPLETE_RETRIES, r as KODAX_MAX_RETRIES, s as KODAX_MAX_TOKENS, t as KODAX_RETRY_BASE_DELAY, u as KODAX_STAGGER_DELAY, v as MessageEntry, P as PROMISE_PATTERN, x as PresetDispatcher, B as RunEvent, E as RunOptions, F as RunResult, G as Runner, T as SessionForkOptions, a2 as cleanupIncompleteToolCalls, a3 as countTokens, a4 as createInMemorySession, a7 as estimateTokens, aa as getAgentConfigHome, ab as getAgentConfigPath, ac as getAppDataDir, ad as registerPresetDispatcher, ag as setAgentConfigHome, ah as validateAndFixToolHistory } from './types-chunks/history-cleanup.d-DznrzEiU.js';
10
+ import { o as KodaXSessionLineage, f as KodaXJsonValue, a as KodaXCompactMemorySeed, l as KodaXSessionEntry, v as KodaXSessionTreeNode, n as KodaXSessionLabelEntry, r as KodaXSessionNavigationOptions, h as KodaXSessionArtifactLedgerEntry, b as KodaXExtensionSessionRecord, d as KodaXExtensionStore, S as SessionErrorMetadata } from './types-chunks/types.d-mM8vqvhT.js';
11
+ export { K as KodaXCompactMemoryProgress, c as KodaXExtensionSessionState, i as KodaXSessionBranchSummaryEntry, j as KodaXSessionCompactionEntry, k as KodaXSessionData, m as KodaXSessionEntryBase, p as KodaXSessionMessageEntry, q as KodaXSessionMeta, s as KodaXSessionRuntimeInfo, t as KodaXSessionScope, u as KodaXSessionStorage, w as KodaXSessionUiHistoryItem, x as KodaXSessionUiHistoryItemType, y as KodaXSessionWorkspaceKind } from './types-chunks/types.d-mM8vqvhT.js';
12
+ import { o as RunnableTool, A as Agent, J as ToolGuardrail, a as AgentMessage, q as RunnerLlmReturn, r as RunnerToolCall } from './types-chunks/instance-discovery.d-BsKnIwpg.js';
13
+ export { c as AgentReasoningProfile, d as AgentTool, G as Guardrail, H as Handoff, R as ReasoningDepth, Q as createAgent, U as createHandoff } from './types-chunks/instance-discovery.d-BsKnIwpg.js';
14
+ import { b as McpServersConfig } from './types-chunks/config.d-BfJUXxC0.js';
15
+ export { M as McpConnectMode, a as McpServerConfig, c as McpTransportKind } from './types-chunks/config.d-BfJUXxC0.js';
16
+ import { e as McpProviderOptions, b as McpCapabilityProvider } from './types-chunks/transport.d-DuyjG30t.js';
17
+ export { M as McpCapabilityDescriptor, a as McpCapabilityKind, c as McpCapabilityRisk, d as McpCatalogItem, f as McpServerCatalogSnapshot, g as McpServerRuntime, h as McpServerRuntimeDiagnostics, i as McpTransport, j as McpTransportEvents, k as createMcpCapabilityId, l as createMcpTransport, m as defaultMcpCacheDir, n as getMcpCachePaths, p as parseMcpCapabilityId, s as searchMcpCatalog } from './types-chunks/transport.d-DuyjG30t.js';
11
18
  import '@anthropic-ai/sdk';
12
19
  import 'openai';
13
20
 
@@ -253,187 +260,37 @@ declare function archiveOldIslands(lineage: KodaXSessionLineage): {
253
260
  };
254
261
 
255
262
  /**
256
- * @kodax-ai/agent File Tracking
263
+ * @kodax-ai/agent File Tracking — artifactLedger extraction.
264
+ *
265
+ * FEATURE_185 (v0.7.42) extends the previous input-only extractor to also
266
+ * read each tool_use's matching tool_result, enriching `metadata` with parsed
267
+ * hits / matchedPaths / exitCode / tail. Pipeline:
268
+ *
269
+ * Round end (REPL: repl.ts:1279/1371)
270
+ * → extractArtifactLedger(result.messages)
271
+ * → tool_result still raw (top-of-loop microcompact hasn't run on these)
272
+ * → buildArtifactEntry parses result content into metadata
273
+ * → mergeArtifactLedger commits enrichment to context.artifactLedger
274
+ * → storage.save persists the enriched ledger
275
+ *
276
+ * Top-of-loop microcompact (run-substrate.ts:621, iteration N+1)
277
+ * → clears tool_result.content older than maxAge to `[Cleared: ...]`
278
+ *
279
+ * Compaction time (compaction.ts:257)
280
+ * → extractArtifactLedger(toProcess) re-runs on cleared messages
281
+ * → buildArtifactEntry's parsers refuse `[Cleared: ...]` → no fresh hits
282
+ * → mergeArtifactLedger preserves the round-end enrichment via
283
+ * per-key non-empty preference (see `mergeLedgerMetadata`).
284
+ *
285
+ * The metadata-aware merge is the keystone — without it, every compaction
286
+ * would silently downgrade ledger entries to input-only. End-to-end
287
+ * preservation is exercised by the "end-to-end enrichment survives
288
+ * microcompact" tests in file-tracker.test.ts.
257
289
  */
258
290
 
259
291
  declare function extractArtifactLedger(messages: KodaXMessage[]): KodaXSessionArtifactLedgerEntry[];
260
292
  declare function mergeArtifactLedger(existing: KodaXSessionArtifactLedgerEntry[], next: KodaXSessionArtifactLedgerEntry[]): KodaXSessionArtifactLedgerEntry[];
261
293
 
262
- type McpCapabilityKind = 'tool' | 'resource' | 'prompt';
263
- type McpCapabilityRisk = 'read' | 'write' | 'network' | 'exec';
264
- interface McpCatalogItem {
265
- id: string;
266
- serverId: string;
267
- kind: McpCapabilityKind;
268
- name: string;
269
- title?: string;
270
- summary: string;
271
- tags?: string[];
272
- risk?: McpCapabilityRisk;
273
- annotations?: Record<string, unknown>;
274
- cachedAt: string;
275
- }
276
- interface McpCapabilityDescriptor extends McpCatalogItem {
277
- inputSchema?: unknown;
278
- outputSchema?: unknown;
279
- promptArgsSchema?: unknown;
280
- uri?: string;
281
- mimeType?: string;
282
- }
283
- interface McpServerCatalogSnapshot {
284
- serverId: string;
285
- items: McpCatalogItem[];
286
- descriptors: McpCapabilityDescriptor[];
287
- updatedAt: string;
288
- }
289
- interface McpCatalogSearchOptions {
290
- kind?: McpCapabilityKind;
291
- limit?: number;
292
- }
293
- declare function defaultMcpCacheDir(): string;
294
- declare function createMcpCapabilityId(serverId: string, kind: McpCapabilityKind, name: string): string;
295
- declare function parseMcpCapabilityId(id: string): {
296
- serverId: string;
297
- kind: McpCapabilityKind;
298
- name: string;
299
- };
300
- declare function searchMcpCatalog(items: readonly McpCatalogItem[], query: string, options?: McpCatalogSearchOptions): McpCatalogItem[];
301
- declare function getMcpCachePaths(cacheDir: string, serverId: string): {
302
- catalogDir: string;
303
- indexPath: string;
304
- itemsPath: string;
305
- };
306
-
307
- interface McpServerRuntimeDiagnostics {
308
- serverId: string;
309
- connect: 'lazy' | 'prewarm' | 'disabled';
310
- status: 'idle' | 'connecting' | 'ready' | 'error' | 'disabled';
311
- dirty: boolean;
312
- lastError?: string;
313
- cachedAt?: string;
314
- tools: number;
315
- resources: number;
316
- prompts: number;
317
- }
318
- declare class McpServerRuntime {
319
- private readonly serverId;
320
- private readonly config;
321
- private readonly cacheDir;
322
- private transport?;
323
- private readonly pending;
324
- private nextRequestId;
325
- private initialized;
326
- private connectPromise?;
327
- private catalog?;
328
- private diagnostics;
329
- constructor(serverId: string, config: McpServerConfig, cacheDir: string);
330
- getDiagnostics(): McpServerRuntimeDiagnostics;
331
- prewarmIfNeeded(): Promise<void>;
332
- /** Load catalog from memory or disk only — never triggers a lazy connection. */
333
- getCachedCatalog(): Promise<McpServerCatalogSnapshot | undefined>;
334
- getCatalog(forceRefresh?: boolean): Promise<McpServerCatalogSnapshot>;
335
- describeCapability(capabilityId: string): Promise<McpCapabilityDescriptor | undefined>;
336
- callTool(name: string, args: Record<string, unknown>): Promise<{
337
- content?: string;
338
- structuredContent?: unknown;
339
- metadata?: Record<string, unknown>;
340
- }>;
341
- readResource(name: string, options: Record<string, unknown>): Promise<{
342
- content?: string;
343
- structuredContent?: unknown;
344
- metadata?: Record<string, unknown>;
345
- }>;
346
- getPrompt(name: string, args: Record<string, unknown>): Promise<unknown>;
347
- refreshCatalog(forceReconnect?: boolean): Promise<void>;
348
- /** Public teardown — clears everything including the connect lock. */
349
- dispose(): Promise<void>;
350
- /** Internal transport teardown — does NOT clear connectPromise so the
351
- * retry loop inside doConnect() can safely call it between attempts. */
352
- private resetTransport;
353
- private connect;
354
- private doConnect;
355
- private listDescriptors;
356
- private request;
357
- private notify;
358
- private handleMessage;
359
- private failPending;
360
- private applyCatalogSnapshot;
361
- }
362
-
363
- /**
364
- * `McpCapabilityProvider` — implements the Layer A `CapabilityProvider`
365
- * contract for an MCP server fleet.
366
- *
367
- * FEATURE_082 (v0.7.24): moved from
368
- * `@kodax-ai/coding/src/capabilities/providers/mcp/provider.ts` to this package.
369
- * The coding-specific `registerConfiguredMcpCapabilityProvider` adapter (which
370
- * pulls in `KodaXExtensionRuntime`) lives in
371
- * `@kodax-ai/coding/src/capabilities/providers/mcp-adapter.ts`.
372
- */
373
-
374
- interface McpProviderOptions {
375
- cacheDir?: string;
376
- }
377
- declare class McpCapabilityProvider implements CapabilityProvider {
378
- readonly id = "mcp";
379
- readonly kinds: CapabilityProvider['kinds'];
380
- private readonly runtimes;
381
- private readonly cacheDir;
382
- /**
383
- * Construct an MCP capability provider.
384
- *
385
- * **Cache-dir capture warning (v0.7.35.1 FEATURE_145)** — when
386
- * `options.cacheDir` is omitted, this constructor resolves
387
- * `defaultMcpCacheDir()` ONCE at instantiation time and threads the
388
- * result into every `McpServerRuntime` it spawns. If a substrate
389
- * consumer plans to redirect the agent config home via
390
- * `setAgentConfigHome()` from `@kodax-ai/agent`, that call MUST happen
391
- * BEFORE constructing this provider. Late calls have no effect on
392
- * already-constructed runtimes.
393
- *
394
- * To bypass the agent-home resolver entirely, pass
395
- * `options.cacheDir` explicitly — that path wins unconditionally.
396
- */
397
- constructor(servers: McpServersConfig | undefined, options?: McpProviderOptions);
398
- hasActiveServers(): boolean;
399
- prewarm(): Promise<void>;
400
- search(query: string, options?: {
401
- kind?: CapabilityKind;
402
- limit?: number;
403
- server?: string;
404
- }): Promise<unknown[]>;
405
- describe(id: string): Promise<unknown>;
406
- execute(id: string, input: Record<string, unknown>): Promise<CapabilityResult>;
407
- read(id: string, options?: Record<string, unknown>): Promise<CapabilityResult>;
408
- getPrompt(id: string, args?: Record<string, unknown>): Promise<unknown>;
409
- getPromptContext(): Promise<string | undefined>;
410
- getDiagnostics(): Record<string, unknown> | undefined;
411
- refresh(): Promise<void>;
412
- dispose(): Promise<void>;
413
- private collectCatalogItems;
414
- private listServerDiagnostics;
415
- private requireRuntime;
416
- }
417
-
418
- interface McpTransportEvents {
419
- /** Called with a complete JSON-RPC message (raw JSON string). */
420
- onMessage(raw: string): void;
421
- onError(error: Error): void;
422
- onClose(reason: string): void;
423
- }
424
- interface McpTransport {
425
- open(events: McpTransportEvents): Promise<void>;
426
- /** Send a JSON string. The transport handles framing. */
427
- send(json: string): Promise<void>;
428
- close(): Promise<void>;
429
- readonly connected: boolean;
430
- }
431
- type StdioFraming = 'content-length' | 'ndjson';
432
- interface McpTransportOptions {
433
- stdioFraming?: StdioFraming;
434
- }
435
- declare function createMcpTransport(config: McpServerConfig, options?: McpTransportOptions): McpTransport;
436
-
437
294
  /**
438
295
  * KodaX Core Errors
439
296
  *
@@ -506,12 +363,63 @@ interface ToolProgress {
506
363
  readonly stage: string;
507
364
  readonly message: string;
508
365
  }
509
- /** Standard tool handler — returns a single result string. */
510
- type ToolHandlerSync = (input: Record<string, unknown>, context: KodaXToolExecutionContext) => Promise<string>;
511
- /** Streaming tool handler yields progress updates, returns final result string. */
512
- type ToolHandlerStreaming = (input: Record<string, unknown>, context: KodaXToolExecutionContext) => AsyncGenerator<ToolProgress, string, void>;
366
+ /**
367
+ * Final result a tool may return. Either a plain string (the default for
368
+ * text-only tools) OR a typed-array form for multimodal returns (e.g.
369
+ * `read` on an image path returns `[{type:'text',...}, {type:'image',...}]`).
370
+ * Providers serialize each shape to their wire format; OpenAI-compat
371
+ * gateways downgrade image items to a placeholder rather than rejecting.
372
+ *
373
+ * The array form mirrors claudecode's FileReadTool image return — Claude
374
+ * Code packs image data into `tool_result` content so the model can
375
+ * re-fetch images via the tool path. See
376
+ * `c:/Works/claudecode/src/tools/FileReadTool/FileReadTool.ts:866-891`.
377
+ */
378
+ type ToolResult = string | readonly KodaXToolResultContentItem[];
379
+ /** Standard tool handler — returns a final result (text or multimodal). */
380
+ type ToolHandlerSync = (input: Record<string, unknown>, context: KodaXToolExecutionContext) => Promise<ToolResult>;
381
+ /** Streaming tool handler — yields progress updates, returns final result. */
382
+ type ToolHandlerStreaming = (input: Record<string, unknown>, context: KodaXToolExecutionContext) => AsyncGenerator<ToolProgress, ToolResult, void>;
513
383
  /** Union of both handler types. Existing tools use ToolHandlerSync; new long-running tools may use ToolHandlerStreaming. */
514
384
  type ToolHandler = ToolHandlerSync | ToolHandlerStreaming;
385
+ /**
386
+ * v0.7.42 — Declarative tool side-effect class.
387
+ *
388
+ * Required field on every {@link LocalToolDefinition}. Used by:
389
+ * - Plan mode: tools with `sideEffect !== 'readonly'` are blocked unless
390
+ * they explicitly opt in via `planModeAllowed: true` (e.g.
391
+ * `exit_plan_mode`, `task_stop`).
392
+ * - SDK embedders (KodaX Space etc.): iterate `getAllRegisteredTools()`
393
+ * and build their own blocklist by category — replaces the previous
394
+ * practice of hardcoding a `Set<string>` of tool names, which silently
395
+ * drifted whenever KodaX added a new tool.
396
+ * - Internal permission system: `FILE_MODIFICATION_TOOLS` and
397
+ * `MODIFICATION_TOOLS` exports in `@kodax-ai/repl` are now computed
398
+ * from this metadata at module load time, so adding a new
399
+ * `'mutates-fs'` tool here automatically reaches every callsite
400
+ * that consumes those sets.
401
+ *
402
+ * Categories (mutually exclusive; pick the dominant effect):
403
+ * - `'readonly'` — produces no observable side effect, just reads
404
+ * local state (FS, registry, computed views).
405
+ * - `'mutates-fs'` — writes to the local filesystem (write, edit,
406
+ * multi-edit, undo, worktree-*, construction
407
+ * artifacts). Bash is NOT in this bucket; it has
408
+ * its own.
409
+ * - `'mutates-shell'` — invokes an arbitrary shell command (bash).
410
+ * - `'mutates-network'` — performs a network request that may have side
411
+ * effects on the remote (web_fetch with any
412
+ * method, web_search, MCP server calls).
413
+ * - `'mutates-state'` — changes internal session/agent state without
414
+ * FS or shell side effects (todo_update,
415
+ * send_message, dispatch_child_task,
416
+ * exit_plan_mode, emit_managed_protocol).
417
+ *
418
+ * Pick the dominant effect when a tool touches multiple. e.g. `dispatch_
419
+ * child_task` may transitively run any tool, but its own direct effect is
420
+ * spawning a child agent (`mutates-state`).
421
+ */
422
+ type ToolSideEffect = 'readonly' | 'mutates-fs' | 'mutates-shell' | 'mutates-network' | 'mutates-state';
515
423
  /**
516
424
  * FEATURE_149 (v0.7.38) — interrupt-on-submit policy for in-flight tools.
517
425
  *
@@ -533,6 +441,28 @@ type ToolHandler = ToolHandlerSync | ToolHandlerStreaming;
533
441
  type ToolInterruptBehavior = 'cancel' | 'wait';
534
442
  interface LocalToolDefinition extends KodaXToolDefinition {
535
443
  handler: ToolHandler;
444
+ /**
445
+ * v0.7.42 — Required declarative side-effect class. See
446
+ * {@link ToolSideEffect} for category definitions and rationale. Plan
447
+ * mode and SDK embedders' permission brokers consume this; failure to
448
+ * declare is a TypeScript error (by design — `sideEffect` is required,
449
+ * not optional, to prevent silent drift when new tools are added).
450
+ */
451
+ sideEffect: ToolSideEffect;
452
+ /**
453
+ * v0.7.42 — Optional plan-mode override.
454
+ *
455
+ * - `undefined` (default): plan-mode permits only `sideEffect ===
456
+ * 'readonly'` tools.
457
+ * - `true`: explicitly permitted in plan mode even when sideEffect is
458
+ * not `'readonly'`. Reserve for tools whose effect is itself part of
459
+ * the planning loop (`exit_plan_mode`, `task_stop`, `todo_update`,
460
+ * `todo_create`, `ask_user_question`).
461
+ * - `false`: explicitly blocked in plan mode even when sideEffect is
462
+ * `'readonly'`. Rare — useful for read-only tools whose output would
463
+ * leak content the planner should not see.
464
+ */
465
+ planModeAllowed?: boolean;
536
466
  /**
537
467
  * FEATURE_149 (v0.7.38) — submit-time interrupt policy. See
538
468
  * {@link ToolInterruptBehavior}. Default `'wait'` when undefined.
@@ -643,12 +573,59 @@ declare function getBuiltinToolDefinition(name: string): KodaXToolDefinition | u
643
573
  declare function getBuiltinRegisteredToolDefinition(name: string): RegisteredToolDefinition | undefined;
644
574
  declare function createBuiltinToolDefinition(name: string): LocalToolDefinition | undefined;
645
575
  declare function listBuiltinToolDefinitions(): RegisteredToolDefinition[];
576
+ /**
577
+ * v0.7.42 — snapshot of every currently-active tool registration.
578
+ *
579
+ * Returns the most-recent registration for each tool name (mirroring
580
+ * {@link getRegisteredToolDefinition}'s single-name semantics across the
581
+ * full registry). Use this to drive metadata-based filters such as:
582
+ *
583
+ * - SDK embedder permission brokers building a blocklist by side-effect class:
584
+ * `getAllRegisteredTools().filter(t => t.sideEffect !== 'readonly')`
585
+ * - UI that displays available tools grouped by category.
586
+ * - Plan-mode gates that compute their own blocklist from metadata
587
+ * instead of hardcoded `Set<string>` of names.
588
+ *
589
+ * The returned array is a fresh copy per call (safe to mutate without
590
+ * affecting the registry). Order is registration order (sorted by name
591
+ * within each registration to keep the snapshot deterministic).
592
+ */
593
+ declare function getAllRegisteredTools(): RegisteredToolDefinition[];
594
+ /**
595
+ * v0.7.42 — plan-mode permit check driven by tool metadata.
596
+ *
597
+ * - `sideEffect === 'readonly'` ⇒ permitted (unless explicitly
598
+ * `planModeAllowed: false`).
599
+ * - `planModeAllowed: true` ⇒ permitted (overrides non-readonly).
600
+ * - any other sideEffect ⇒ blocked.
601
+ *
602
+ * Returns `false` for unknown tool names (fail-closed). Use this in
603
+ * preference to hardcoded `Set<string>` of tool names — adding a new
604
+ * `'mutates-fs'` builtin will flow through automatically.
605
+ */
606
+ declare function isToolPlanModeAllowed(name: string): boolean;
607
+ /**
608
+ * v0.7.42 — does this tool mutate the filesystem?
609
+ *
610
+ * Wraps `sideEffect === 'mutates-fs'`. Used by the REPL permission
611
+ * pipeline's gitRoot guard and Space's permission broker. Replaces the
612
+ * previous practice of hardcoding `Set(["write", "edit"])`-style lookups
613
+ * scattered across 5+ callsites.
614
+ */
615
+ declare function isToolFileMutation(name: string): boolean;
616
+ /**
617
+ * v0.7.42 — does this tool mutate anything (FS, shell, network, state)?
618
+ *
619
+ * True for every `sideEffect` except `'readonly'`. Fail-closed (unknown
620
+ * names return `true` — assumed mutating until proven otherwise).
621
+ */
622
+ declare function isToolMutation(name: string): boolean;
646
623
  declare function getRequiredToolParams(name: string): string[];
647
624
  declare function listTools(): string[];
648
625
  declare function listToolDefinitions(): KodaXToolDefinition[];
649
626
  declare function executeTool(name: string, input: Record<string, unknown>, ctx: KodaXToolExecutionContext): Promise<string>;
650
627
 
651
- declare function toolRead(input: Record<string, unknown>, ctx: KodaXToolExecutionContext): Promise<string>;
628
+ declare function toolRead(input: Record<string, unknown>, ctx: KodaXToolExecutionContext): Promise<string | readonly KodaXToolResultContentItem[]>;
652
629
 
653
630
  declare function toolWrite(input: Record<string, unknown>, ctx: KodaXToolExecutionContext): Promise<string>;
654
631
 
@@ -907,6 +884,51 @@ interface ExtensionTurnSettleHookContext {
907
884
  setModelSelection: (next: ExtensionModelSelection) => void;
908
885
  setThinkingLevel: (level: KodaXReasoningMode) => void;
909
886
  }
887
+ /**
888
+ * FEATURE_184 (v0.7.45) — Stop Hook bridge context for extensions.
889
+ *
890
+ * Fires ONLY when the model terminates a turn text-only (no tool_use)
891
+ * — a strict subset of `turn:settle`, which fires on every turn end
892
+ * including mid-task tool turns. Use this hook for verification or
893
+ * "is the task actually done?" checks. The three-state return surface
894
+ * mirrors `RunOptions.stopHook` at the agent layer; the bridge passes
895
+ * the extension's return through unchanged.
896
+ *
897
+ * Coding-layer first-party consumers (Sidecar Verifier, FEATURE_184
898
+ * Phase D) wire directly to the agent `stopHook`. Third-party
899
+ * extensions write `api.hook('turn:complete', handler)` and the bridge
900
+ * dispatches to them inside the agent's `stopHook` callback. Handlers
901
+ * fire in registration order, first non-`void` return short-circuits
902
+ * the chain (matches `tool:before` semantics).
903
+ *
904
+ * Scope note: this hook fires on the AMA `runner-driven` path only
905
+ * (main loop, B1 retry, V2 worker). SA-path child agents dispatched
906
+ * via `dispatch_child_task` go through `runKodaX` and do NOT trigger
907
+ * this hook — observe their lifecycle via `turn:settle` on the SA
908
+ * path. Extensions wanting "every agent termination" semantics must
909
+ * register both hooks.
910
+ */
911
+ interface ExtensionTurnCompleteHookContext {
912
+ sessionId: string;
913
+ lastAssistantText: string;
914
+ signal: 'natural-end';
915
+ reanimateCount: number;
916
+ reanimateBudget: number;
917
+ }
918
+ /**
919
+ * FEATURE_184 (v0.7.45) — Extension `turn:complete` return surface.
920
+ *
921
+ * - `void` / `undefined` → accept the termination, defer to next
922
+ * handler (or fall through to agent terminal path if none).
923
+ * - `string` → reanimate: synthesize a user message, run another
924
+ * turn. Bounded by Runner's `stopHookReanimateBudget`.
925
+ * - `{ abort: true, reason }` → halt the run, surface reason to
926
+ * caller via `RunResult.output` + `stoppedByHook = true`.
927
+ */
928
+ type ExtensionTurnCompleteHookResult = void | string | {
929
+ readonly abort: true;
930
+ readonly reason: string;
931
+ };
910
932
  interface ExtensionSessionHydrateHookContext {
911
933
  sessionId: string;
912
934
  getState: <T = KodaXJsonValue>(key: string) => T | undefined;
@@ -1018,9 +1040,14 @@ type TodoMutationSource = 'tool' | 'internal';
1018
1040
  * FEATURE_170 v0.7.41 — seed shape passed to `'todo:before-create'`.
1019
1041
  * Mirrors `TodoAddSeed` from todo-store.ts (kept structurally compatible
1020
1042
  * to avoid coupling extension authors to the internal task-engine type).
1043
+ *
1044
+ * v0.7.42 — `content` renamed to `subject` + optional `description` to
1045
+ * match claudecode V2 `TaskCreateTool` schema. See `TodoItem` JSDoc in
1046
+ * packages/coding/src/types.ts.
1021
1047
  */
1022
1048
  interface ExtensionTodoCreateSeed {
1023
- readonly content: string;
1049
+ readonly subject: string;
1050
+ readonly description?: string;
1024
1051
  readonly activeForm?: string;
1025
1052
  readonly evaluator?: 'build' | 'test' | 'lint';
1026
1053
  readonly owner?: string;
@@ -1040,7 +1067,9 @@ interface ExtensionTodoCreateSeed {
1040
1067
  */
1041
1068
  interface KodaXTodoItem {
1042
1069
  readonly id: string;
1043
- readonly content: string;
1070
+ /** v0.7.42 — see TodoItem.subject JSDoc in packages/coding/src/types.ts. */
1071
+ readonly subject: string;
1072
+ readonly description?: string;
1044
1073
  readonly status: 'pending' | 'in_progress' | 'completed' | 'failed' | 'skipped' | 'cancelled';
1045
1074
  readonly owner?: string;
1046
1075
  readonly sourceObligationIndex?: number;
@@ -1053,6 +1082,7 @@ interface ExtensionHookMap {
1053
1082
  'tool:before': (context: ExtensionToolBeforeHookContext) => Promise<void | string | false> | void | string | false;
1054
1083
  'provider:before': (context: ExtensionProviderBeforeHookContext) => Promise<void> | void;
1055
1084
  'turn:settle': (context: ExtensionTurnSettleHookContext) => Promise<void> | void;
1085
+ 'turn:complete': (context: ExtensionTurnCompleteHookContext) => Promise<ExtensionTurnCompleteHookResult> | ExtensionTurnCompleteHookResult;
1056
1086
  'session:hydrate': (context: ExtensionSessionHydrateHookContext) => Promise<void> | void;
1057
1087
  'todo:before-create': (context: {
1058
1088
  seed: ExtensionTodoCreateSeed;
@@ -2041,10 +2071,79 @@ declare function reconstructMessagesWithToolGuard(stableMessages: KodaXMessage[]
2041
2071
  * per ADR-020 / v0.7.29 §239 §371). Substrate body lives in
2042
2072
  * `agent-runtime/run-substrate.ts` (`runSubstrate`) and is wired via
2043
2073
  * the `Agent.substrateExecutor` closure attached in `coding-preset.ts`.
2074
+ *
2075
+ * v0.7.42: `runRunKodaXInternal` is the shared implementation. The
2076
+ * embedder-facing `startKodaX` (non-blocking, returns `RunningSession`)
2077
+ * lives in `./running-session.ts` and wraps the same internal path —
2078
+ * no dual route (per feedback_no_parallel_refactor_paths).
2044
2079
  */
2045
2080
 
2046
2081
  declare function runKodaX(options: KodaXOptions, prompt: string): Promise<KodaXResult>;
2047
2082
 
2083
+ /**
2084
+ * RunningSession — v0.7.42 (closes gap 6 reported by KodaX Space).
2085
+ *
2086
+ * `runKodaX(opts, prompt)` is a blocking `Promise<KodaXResult>` — once
2087
+ * a run is in-flight the SDK consumer cannot observe its session id,
2088
+ * flip provider / model / reasoning mid-run, or abort cooperatively
2089
+ * without forging an external `AbortSignal` and squinting at the
2090
+ * resolved `KodaXResult` after the fact.
2091
+ *
2092
+ * `startKodaX(opts, prompt)` returns a `RunningSession` handle
2093
+ * immediately (the run starts on the next microtask). The handle
2094
+ * exposes:
2095
+ *
2096
+ * - `id` — the resolved session id (from
2097
+ * `options.session.id` or freshly generated)
2098
+ * - `currentProvider` / `currentModel` / `currentReasoning`
2099
+ * — last value the embedder requested
2100
+ * (mirrors what the next turn will see)
2101
+ * - `setProvider` / `setModel` / `setReasoning`
2102
+ * — apply between turns; the next CAP-055
2103
+ * re-resolution picks them up
2104
+ * - `abort(reason?)` — cooperative abort via internal
2105
+ * `AbortController`; honors external
2106
+ * `options.abortSignal` too (forwarded)
2107
+ * - `result` — `Promise<KodaXResult>` (same shape
2108
+ * `runKodaX` returns)
2109
+ *
2110
+ * `runKodaX` is now a thin wrapper over `startKodaX(...).result` so
2111
+ * there is no dual code path (per feedback_no_parallel_refactor_paths).
2112
+ */
2113
+
2114
+ interface RunningSession {
2115
+ /** Session id used by the underlying run (echoes options.session.id when supplied). */
2116
+ readonly id: string;
2117
+ /** Last provider value requested via constructor or `setProvider`. */
2118
+ readonly currentProvider: string;
2119
+ /** Last model value requested via constructor or `setModel`. Undefined = provider default. */
2120
+ readonly currentModel: string | undefined;
2121
+ /** Last reasoning mode requested via constructor or `setReasoning`. */
2122
+ readonly currentReasoning: KodaXReasoningMode | undefined;
2123
+ /** Whether `abort` has been called (or the external signal has fired). */
2124
+ readonly aborted: boolean;
2125
+ /** Whether the substrate has wired up the live mutators yet. */
2126
+ readonly attached: boolean;
2127
+ /** Switch provider mid-run. Applies on the next turn. */
2128
+ setProvider(name: string): void;
2129
+ /** Switch model mid-run. Pass undefined to clear an override. */
2130
+ setModel(model: string | undefined): void;
2131
+ /** Switch reasoning mode mid-run. */
2132
+ setReasoning(mode: KodaXReasoningMode | undefined): void;
2133
+ /** Cooperatively abort. The underlying provider stream sees an AbortError. */
2134
+ abort(reason?: unknown): void;
2135
+ /** Resolves to the same shape `runKodaX` returns. */
2136
+ readonly result: Promise<KodaXResult>;
2137
+ }
2138
+ /**
2139
+ * Public-friendly factory for {@link KodaXSessionControl}. Callers that
2140
+ * want the mid-run mutation surface WITHOUT the `startKodaX` wrapper
2141
+ * (e.g. building their own abort + lifecycle) can instantiate this and
2142
+ * pass it as `KodaXOptions.sessionControl`.
2143
+ */
2144
+ declare function createSessionControl(): KodaXSessionControl & KodaXSessionMutators;
2145
+ declare function startKodaX(options: KodaXOptions, prompt: string): RunningSession;
2146
+
2048
2147
  /**
2049
2148
  * v0.7.35.1 FEATURE_142 (B-R1) — Coding-flavored compaction summary prompts.
2050
2149
  *
@@ -2143,33 +2242,6 @@ declare const boundedRevise: QualityInvariant;
2143
2242
 
2144
2243
  declare const budgetCeiling: QualityInvariant;
2145
2244
 
2146
- /**
2147
- * FEATURE_101 invariant: `independentReview`.
2148
- *
2149
- * Verifier-binding invariant: when a manifest's role topology includes
2150
- * a Generator (mutation-producing) role, an Evaluator must also be
2151
- * reachable so the generator's output is independently verified. v1
2152
- * uses agent name conventions (`generator` / `evaluator`) — the
2153
- * canonical role names declared by `@kodax-ai/core/task-engine-agents.ts`.
2154
- *
2155
- * Hooks:
2156
- * - admit: walk the reachable handoff graph from the manifest. If
2157
- * any node has name === 'generator', some node must also have name
2158
- * === 'evaluator'. Single-role manifests (scout / planner / direct
2159
- * execution) admit unconditionally.
2160
- * - assertTerminal: if the deliverable recorded mutations, it must
2161
- * carry a `verdict` field (the evaluator's accept/revise/blocked
2162
- * emission). A mutating run with no verdict means the generator
2163
- * bypassed verification — reject.
2164
- *
2165
- * The verifier-can't-read-generator-reasoning contract from
2166
- * FEATURE_101 §verifier separation lives at the message-routing layer
2167
- * (handoff inputFilter); admission's job here is to ensure the role
2168
- * pairing exists, not to police the message flow.
2169
- */
2170
-
2171
- declare const independentReview: QualityInvariant;
2172
-
2173
2245
  /**
2174
2246
  * FEATURE_101 invariant: `toolPermission`.
2175
2247
  *
@@ -2211,10 +2283,11 @@ declare const toolPermission: QualityInvariant;
2211
2283
  *
2212
2284
  * - Three pure invariants (finalOwner, handoffLegality, evidenceTrail)
2213
2285
  * are pure functions of admission types and live in @kodax-ai/agent.
2214
- * - Four coupled invariants (budgetCeiling, toolPermission,
2215
- * boundedRevise, independentReview) tie into @kodax-ai/coding's budget
2216
- * controller / tool registry / revise tracker / role conventions and
2217
- * live here.
2286
+ * - Three coupled invariants (budgetCeiling, toolPermission,
2287
+ * boundedRevise) tie into @kodax-ai/coding's budget controller /
2288
+ * tool registry / revise tracker and live here.
2289
+ * (FEATURE_184 Phase C.1: `independentReview` deleted — superseded by
2290
+ * Sidecar Verifier.)
2218
2291
  * - `harnessSelectionTiming` (FEATURE_106 external) reads coding's AMA
2219
2292
  * `ctx.recorder.scout.payload.scout.confirmedHarness` and lives here
2220
2293
  * too (v0.7.35.1 FEATURE_142 A-R2 moved it from @kodax-ai/agent per
@@ -2703,14 +2776,14 @@ declare function getDenialContext(tracker: DenialTracker): string;
2703
2776
 
2704
2777
  /**
2705
2778
  * Placeholder Agent declarations for the coding-AMA H2 task-engine roles
2706
- * (Scout / Planner / Generator / Evaluator).
2779
+ * (Scout / Planner / Generator / Worker).
2707
2780
  *
2708
2781
  * FEATURE_080 (v0.7.23): these declarations exist so the role identities
2709
2782
  * are represented as Layer A `Agent` data, which downstream features need:
2710
2783
  *
2711
- * - FEATURE_084 (v0.7.26): runtime rewrite of Scout/Planner/Generator/
2712
- * Evaluator on top of `Runner` consumes these declarations as the
2713
- * source of truth for role metadata.
2784
+ * - FEATURE_084 (v0.7.26): runtime rewrite of Scout/Planner/Generator
2785
+ * on top of `Runner` consumes these declarations as the source of
2786
+ * truth for role metadata.
2714
2787
  * - FEATURE_078 (v0.7.29): reasoning profiles attach to the `reasoning`
2715
2788
  * field on these declarations.
2716
2789
  * - FEATURE_087+ self-construction: Agent-as-data means role specs can
@@ -2730,16 +2803,15 @@ declare function getDenialContext(tracker: DenialTracker): string;
2730
2803
  *
2731
2804
  * v0.7.35.1 FEATURE_142 (A-R1): moved from `@kodax-ai/agent/src/primitives/`
2732
2805
  * back to `@kodax-ai/coding/src/agents/`. These role declarations are
2733
- * coding-AMA-specific (Scout / Planner / Generator / Evaluator are the
2734
- * H2 state-machine roles, not generic Agent platform primitives). Per
2735
- * ADR-021, the universal `@kodax-ai/agent` framework must not predeclare
2736
- * coding's H2 role identities.
2806
+ * coding-AMA-specific (Scout / Planner / Generator are the H2 state-machine
2807
+ * roles, not generic Agent platform primitives). Per ADR-021, the universal
2808
+ * `@kodax-ai/agent` framework must not predeclare coding's H2 role
2809
+ * identities.
2737
2810
  */
2738
2811
 
2739
2812
  declare const SCOUT_AGENT_NAME = "kodax/role/scout";
2740
2813
  declare const PLANNER_AGENT_NAME = "kodax/role/planner";
2741
2814
  declare const GENERATOR_AGENT_NAME = "kodax/role/generator";
2742
- declare const EVALUATOR_AGENT_NAME = "kodax/role/evaluator";
2743
2815
  /**
2744
2816
  * Scout role declaration. Scout is the AMA entry point that both judges
2745
2817
  * task complexity and executes the H0 direct case; on H1/H2 it hands off
@@ -2753,20 +2825,15 @@ declare const scoutAgent: Agent;
2753
2825
  declare const plannerAgent: Agent;
2754
2826
  /**
2755
2827
  * Generator role declaration. Performs the actual code changes /
2756
- * investigations in both H1 and H2 harnesses.
2828
+ * investigations in both H1 harness; text-only terminates so Sidecar
2829
+ * Verifier (FEATURE_184 Phase D.2) takes over verification.
2757
2830
  */
2758
2831
  declare const generatorAgent: Agent;
2759
- /**
2760
- * Evaluator role declaration. Lightweight verifier in H1, structured
2761
- * revise/replan gate in H2.
2762
- */
2763
- declare const evaluatorAgent: Agent;
2764
- /** All four placeholder role agents, exposed for iteration in downstream features. */
2832
+ /** All three placeholder role agents, exposed for iteration in downstream features. */
2765
2833
  declare const TASK_ENGINE_ROLE_AGENTS: Readonly<{
2766
2834
  readonly scout: Agent<unknown>;
2767
2835
  readonly planner: Agent<unknown>;
2768
2836
  readonly generator: Agent<unknown>;
2769
- readonly evaluator: Agent<unknown>;
2770
2837
  }>;
2771
2838
 
2772
2839
  /**
@@ -2809,10 +2876,10 @@ declare function createDefaultCodingAgent(overrides?: Partial<Omit<Agent, 'name'
2809
2876
  * Coding Agent declarations — FEATURE_084 (v0.7.26).
2810
2877
  *
2811
2878
  * **These are declarative references exposing the canonical Scout /
2812
- * Planner / Generator / Evaluator topology to SDK consumers.** Each
2813
- * exported Agent carries the role's emit tool + the H0/H1/H2 handoff
2814
- * graph, but carries ONLY a short identifier `instructions` string and
2815
- * NO coding tools (read / grep / bash / write / edit / etc.).
2879
+ * Planner / Generator topology to SDK consumers.** Each exported Agent
2880
+ * carries the role's emit tool + the H0/H1/H2 handoff graph, but carries
2881
+ * ONLY a short identifier `instructions` string and NO coding tools
2882
+ * (read / grep / bash / write / edit / etc.).
2816
2883
  *
2817
2884
  * **The runtime agents are built fresh by
2818
2885
  * `task-engine/runner-driven.ts::buildRunnerAgentChain` on every run**,
@@ -2841,16 +2908,14 @@ declare const CODING_AGENT_MARKER: "kodax-coding-agent@0.7.26";
2841
2908
  declare const scoutCodingAgent: Agent;
2842
2909
  declare const plannerCodingAgent: Agent;
2843
2910
  declare const generatorCodingAgent: Agent;
2844
- declare const evaluatorCodingAgent: Agent;
2845
2911
  /**
2846
- * Topology record — iterable form of the four coding agents. Shard 5's
2912
+ * Topology record — iterable form of the three coding agents. Shard 5's
2847
2913
  * Runner-driven dispatcher uses this as the agent lookup.
2848
2914
  */
2849
2915
  declare const CODING_AGENTS: Readonly<{
2850
2916
  readonly scout: Agent<unknown>;
2851
2917
  readonly planner: Agent<unknown>;
2852
2918
  readonly generator: Agent<unknown>;
2853
- readonly evaluator: Agent<unknown>;
2854
2919
  }>;
2855
2920
 
2856
2921
  /**
@@ -4545,5 +4610,5 @@ declare function readWindowFromEnv(): number | undefined;
4545
4610
  */
4546
4611
  declare function speculativeRace<T>(promise: Promise<T>, windowMs?: number): Promise<SpeculativeResult<T>>;
4547
4612
 
4548
- export { Agent, AgentMessage, AutoRules, CANCELLED_TOOL_RESULT_MESSAGE, CANCELLED_TOOL_RESULT_PREFIX, CODING_AGENTS, CODING_AGENT_MARKER, CODING_INVARIANTS, CODING_SUMMARY_PROMPT, CODING_UPDATE_SUMMARY_PROMPT, CapabilityDeniedError, CapabilityKind, CapabilityProvider, CapabilityResult, KodaXClient as Client, CompactionContext, CompactionPolicy, 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_CONTRACT_TOOL_NAME, EMIT_HANDOFF_TOOL_NAME, EMIT_SCOUT_VERDICT_TOOL_NAME, EMIT_VERDICT_TOOL_NAME, EVALUATOR_AGENT_NAME, ErrorCategory, FailureStage, GENERATOR_AGENT_NAME, KODAX_TOOLS, KodaXAmaControllerDecision, KodaXBaseProvider, KodaXChildContextBundle, KodaXClient, KodaXCompactMemorySeed, KodaXContentBlock, KodaXContextOptions, KodaXEvents, KodaXExecutionMode, KodaXExtensionRuntime, KodaXExtensionSessionRecord, KodaXFanoutBranchRecord, KodaXFanoutBranchTransition, KodaXFanoutSchedulerInput, KodaXFanoutSchedulerPlan, KodaXInputArtifact, KodaXJsonValue, KodaXMessage, KodaXOptions, KodaXParentReductionContract, KodaXProviderCapabilityProfile, KodaXProviderPolicyHints, KodaXReasoningCapability, KodaXReasoningMode, KodaXRepoIntelligenceCapability, KodaXRepoIntelligenceMode, KodaXRepoIntelligenceResolvedMode, KodaXRepoIntelligenceTrace, KodaXRepoRoutingSignals, KodaXResult, KodaXSessionArtifactLedgerEntry, KodaXSessionEntry, KodaXSessionError, KodaXSessionLabelEntry, KodaXSessionLineage, KodaXSessionNavigationOptions, KodaXSessionTreeNode, KodaXTaskRoutingDecision, KodaXTaskType, KodaXTerminalError, KodaXThinkingDepth, KodaXToolDefinition, KodaXToolError, KodaXToolExecutionContext, KodaXToolUseBlock, LINEAGE_ENTRY_TYPES, LineageCompaction, LineageExtension, McpCapabilityProvider, McpServerConfig, McpServerRuntime, 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, SCOUT_AGENT_NAME, SYSTEM_PROMPT, Session, SessionEntry, SessionErrorMetadata, SessionExtension, SignalCollector, StableBoundaryTracker, TASK_ENGINE_ROLE_AGENTS, TOOL_RESULT_TRUNCATION_GUARDRAIL_NAME, ToolCallSignal, _resetRuntimeForTesting, activate, analyzeChangedScope, appendAuditEntry, appendSessionLineageLabel, applyFanoutBranchTransition, applySessionCompaction, applyToolResultGuardrail, archiveOldIslands, assignFanoutBranchWorker, bashSignalCollector, boundedRevise, budgetCeiling, buildAmaControllerDecision, buildCapabilityContextSections, buildClassifierPrompt, buildFallbackRoutingDecision, buildFanoutSchedulerPlan, buildLlmReviewPrompt, buildPromptMessageContent, buildPromptOverlay, buildPromptSnapshot, buildProviderCapabilitySnapshot, buildProviderPolicyHintsForDecision, buildProviderPolicyPromptNotes, buildRepoIntelligenceContext, buildRepoIntelligenceIndex, buildRepoOverview, buildSessionTree, buildSystemPrompt, buildSystemPromptSnapshot, checkAbsoluteDeny, checkIncompleteToolCalls, checkPromiseSignal, classify, classifyBashCommand, classifyError, classifyResilienceError, computeInputSignature, configureRuntime, convertCapabilityReadResult, convertProviderSearchResults, countActiveFanoutBranches, countActiveLineageMessages, createBashClassifierConfig, createBuiltinToolDefinition, createCtxProxy, createDefaultCodingAgent, createDenialTracker, createExtensionRuntime, createFanoutSchedulerInput, createKodaXTaskRunner, createMcpCapabilityId, createMcpTransport, createPromptSection, createReasoningPlan, createSessionLineage, createToolResultTruncationGuardrail, defaultMcpCacheDir, defaultPolicy, disableSelfModify, drainPendingSwaps, emitContract, emitHandoff, emitScoutVerdict, emitVerdict, evaluateProviderPolicy, evaluatorAgent, evaluatorCodingAgent, exec, executeTool, extractArtifactLedger, extractComparableUserMessageText, extractHtmlTitle, extractPromptComparableText, extractTitleFromMessages, fileSignalCollector, finalizeRetrievalResult, findByVersion, findPreviousUserEntryId, forkSessionLineage, formatParallelDispatchResult, formatSize, generateSessionId, generatorAgent, generatorCodingAgent, getActiveExtensionRuntime, getBuiltinRegisteredToolDefinition, getBuiltinToolDefinition, getDenialContext, getFanoutBranch, getImpactEstimate, getMcpCachePaths, getModuleContext, getProcessContext, getRegisteredToolDefinition, getRepoIntelligenceIndex, getRepoOverview, getRepoRoutingSignals, getRequiredToolParams, getSessionLineagePath, getSessionMessagesFromLineage, getSymbolContext, getTool, getToolDefinition, getToolRegistrations, getToolResultPolicy, hasPendingSwap, independentReview, inferTaskType, inspectEditFailure, inspectRepoIntelligenceRuntime, isDeniedRecently, isParallelDispatchDirective, listAll, list as listArtifacts, listBuiltinToolDefinitions, listConstructed, listToolDefinitions, listTools, loadHandler, markFanoutBranchCancelled, markFanoutBranchCompleted, mergeArtifactLedger, orderPromptSections, parseClassifierOutput, parseEditToolError, parseLlmReviewVerdict, parseMcpCapabilityId, parseModelSpec, persistToolOutput, plannerAgent, plannerCodingAgent, prewarmRepoIntelligenceCaches, readArtifact, readAuditEntries, readBudget, readDisableState, readWindowFromEnv as readSpeculativeWindowFromEnv, reasoningModeToDepth, reconstructMessagesWithToolGuard, recordDenial, registerCodingInvariants, registerConfiguredMcpCapabilityProvider, registerOfficialSandboxExtension, registerTool, rehydrateActiveArtifacts, remaining as remainingSelfModifyBudget, renderChangedScope, renderImpactEstimate, renderModuleContext, renderProcessContext, renderPromptSections, renderRepoOverview, renderRetrievalResult, renderSymbolContext, resetBudget, resolveClassifierModel, resolveConstructedAgent, resolveReasoningMode, resolveRepoIntelligenceMode, resolveRepoIntelligenceRuntimeConfig, resolveResilienceConfig, resolveSessionLineageTarget, resolveToolCapability, revoke, rewindSessionLineage, rollbackSelfModify, runAstRules, runKodaX, runLlmReview, runManagedTask, runOrchestration, scoutAgent, scoutCodingAgent, searchMcpCatalog, setActiveExtensionRuntime, setSessionLineageActiveEntry, speculativeRace, stage, 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, validateSubtaskIndependence, validateToolSchemaForProvider, warmRepoIntelligenceRuntime, webhook };
4549
- export type { AbsoluteDenyMatch, AbsoluteDenyMiss, AbsoluteDenyResult, AgentArtifact, ArtifactStatus, AstCheckResult, AstRuleId, AstRuleViolation, AuditEntry, AuditEventKind, BashClassificationResult, BashClassifierConfig, BashRiskLevel, BudgetState, BuildClassifierPromptInput, BuildPromptInput, Capabilities, ChangedFileEntry, ChangedFileStatus, ChangedScopeAreaSummary, ChangedScopeReport, ClassifierDecision, ClassifierPrompt, ClassifyDecision, ClassifyOptions, ConstructionArtifact, ConstructionPolicy, ConstructionPolicyVerdict, CreateCtxProxyOptions, CreateKodaXTaskRunnerOptions, DenialRecord, DenialTracker, DisableState, EditRecoveryDiagnostic, EditToolErrorCode, ErrorClassification, ExecOptions, ExecResult, ExtensionCommandContext, ExtensionCommandDefinition, ExtensionCommandInvocation, ExtensionCommandResult, ExtensionContributionSource, ExtensionEventMap, ExtensionFailureDiagnostic, ExtensionFailureStage, ExtensionHookMap, ExtensionLoadSource, ExtensionLogger, ExtensionRuntimeController, ExtensionRuntimeDiagnostics, ExtensionToolBeforeHookContext, ImpactEstimateResult, KodaXAgentWorkerSpec, KodaXExtensionAPI, KodaXExtensionActivationResult, KodaXExtensionModule, KodaXPromptSection, KodaXPromptSectionDefinition, KodaXPromptSectionSlot, KodaXPromptSectionStability, KodaXPromptSnapshot, KodaXPromptSnapshotMetadata, KodaXProviderCapabilitySnapshot, KodaXProviderPolicyDecision, KodaXProviderPolicyIssue, KodaXProviderPolicyIssueSeverity, KodaXProviderSourceKind, KodaXRetrievalArtifact, KodaXRetrievalFreshness, KodaXRetrievalItem, KodaXRetrievalResult, KodaXRetrievalScope, KodaXRetrievalToolName, KodaXRetrievalTrust, LanguageCapabilityTier, LineageArtifactLedgerPayload, LineageCompactionDelegates, LineageEntryType, LineageLabelPayload, LineageTreeNode, LlmReviewClient, LlmReviewResult, LlmReviewVerdict, LoadHandlerOptions, LoadHandlerScope, LoadedExtensionDiagnostic, LocalToolDefinition, McpCapabilityDescriptor, McpCapabilityKind, McpCapabilityRisk, McpCatalogItem, McpProviderOptions, McpServerCatalogSnapshot, McpServerRuntimeDiagnostics, McpTransport, McpTransportEvents, 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, SchemaProvider, SchemaValidationResult, ScriptSource, SelfModifyAskUser, SelfModifyAskUserInput, SelfModifyDiffSeverity, SelfModifyDiffSummary, SpeculativeResult, StagedHandle, StripOptions, SymbolContextResult, TestArtifactOptions, TestResult, TierZeroPatternId, ToolContent, ToolDefinitionSource, ToolHandler, ToolRegistrationOptions, ToolRegistry, WebhookOptions, WebhookResult };
4613
+ export { Agent, AgentMessage, AutoRules, CANCELLED_TOOL_RESULT_MESSAGE, CANCELLED_TOOL_RESULT_PREFIX, CODING_AGENTS, CODING_AGENT_MARKER, CODING_INVARIANTS, CODING_SUMMARY_PROMPT, CODING_UPDATE_SUMMARY_PROMPT, CapabilityDeniedError, CapabilityKind, CapabilityProvider, CapabilityResult, KodaXClient as Client, CompactionContext, CompactionPolicy, 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_CONTRACT_TOOL_NAME, EMIT_HANDOFF_TOOL_NAME, EMIT_SCOUT_VERDICT_TOOL_NAME, EMIT_VERDICT_TOOL_NAME, ErrorCategory, FailureStage, GENERATOR_AGENT_NAME, KODAX_TOOLS, KodaXAmaControllerDecision, KodaXBaseProvider, KodaXChildContextBundle, KodaXClient, KodaXCompactMemorySeed, KodaXContentBlock, KodaXContextOptions, KodaXEvents, KodaXExecutionMode, KodaXExtensionRuntime, KodaXExtensionSessionRecord, KodaXFanoutBranchRecord, KodaXFanoutBranchTransition, KodaXFanoutSchedulerInput, KodaXFanoutSchedulerPlan, KodaXInputArtifact, KodaXJsonValue, KodaXMessage, KodaXOptions, KodaXParentReductionContract, KodaXProviderCapabilityProfile, KodaXProviderPolicyHints, KodaXReasoningCapability, KodaXReasoningMode, KodaXRepoIntelligenceCapability, KodaXRepoIntelligenceMode, KodaXRepoIntelligenceResolvedMode, KodaXRepoIntelligenceTrace, KodaXRepoRoutingSignals, KodaXResult, KodaXSessionArtifactLedgerEntry, KodaXSessionControl, KodaXSessionEntry, KodaXSessionError, KodaXSessionLabelEntry, KodaXSessionLineage, KodaXSessionMutators, KodaXSessionNavigationOptions, KodaXSessionTreeNode, KodaXTaskRoutingDecision, KodaXTaskType, KodaXTerminalError, KodaXThinkingDepth, KodaXToolDefinition, KodaXToolError, KodaXToolExecutionContext, KodaXToolUseBlock, LINEAGE_ENTRY_TYPES, LineageCompaction, LineageExtension, McpCapabilityProvider, McpProviderOptions, 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, SCOUT_AGENT_NAME, SYSTEM_PROMPT, Session, SessionEntry, SessionErrorMetadata, SessionExtension, SignalCollector, StableBoundaryTracker, TASK_ENGINE_ROLE_AGENTS, TOOL_RESULT_TRUNCATION_GUARDRAIL_NAME, ToolCallSignal, _resetRuntimeForTesting, activate, analyzeChangedScope, appendAuditEntry, appendSessionLineageLabel, applyFanoutBranchTransition, applySessionCompaction, applyToolResultGuardrail, archiveOldIslands, assignFanoutBranchWorker, bashSignalCollector, boundedRevise, budgetCeiling, buildAmaControllerDecision, buildCapabilityContextSections, buildClassifierPrompt, buildFallbackRoutingDecision, buildFanoutSchedulerPlan, buildLlmReviewPrompt, buildPromptMessageContent, buildPromptOverlay, buildPromptSnapshot, buildProviderCapabilitySnapshot, buildProviderPolicyHintsForDecision, buildProviderPolicyPromptNotes, buildRepoIntelligenceContext, buildRepoIntelligenceIndex, buildRepoOverview, buildSessionTree, buildSystemPrompt, buildSystemPromptSnapshot, checkAbsoluteDeny, checkIncompleteToolCalls, checkPromiseSignal, classify, classifyBashCommand, classifyError, classifyResilienceError, computeInputSignature, configureRuntime, convertCapabilityReadResult, convertProviderSearchResults, countActiveFanoutBranches, countActiveLineageMessages, createBashClassifierConfig, createBuiltinToolDefinition, createCtxProxy, createDefaultCodingAgent, createDenialTracker, createExtensionRuntime, createFanoutSchedulerInput, createKodaXTaskRunner, createPromptSection, createReasoningPlan, createSessionControl, createSessionLineage, createToolResultTruncationGuardrail, defaultPolicy, disableSelfModify, drainPendingSwaps, emitContract, emitHandoff, emitScoutVerdict, emitVerdict, evaluateProviderPolicy, exec, executeTool, extractArtifactLedger, extractComparableUserMessageText, extractHtmlTitle, extractPromptComparableText, extractTitleFromMessages, fileSignalCollector, finalizeRetrievalResult, findByVersion, findPreviousUserEntryId, forkSessionLineage, formatParallelDispatchResult, formatSize, generateSessionId, generatorAgent, generatorCodingAgent, getActiveExtensionRuntime, getAllRegisteredTools, getBuiltinRegisteredToolDefinition, getBuiltinToolDefinition, getDenialContext, getFanoutBranch, getImpactEstimate, getModuleContext, getProcessContext, getRegisteredToolDefinition, getRepoIntelligenceIndex, getRepoOverview, getRepoRoutingSignals, getRequiredToolParams, getSessionLineagePath, getSessionMessagesFromLineage, getSymbolContext, getTool, getToolDefinition, getToolRegistrations, getToolResultPolicy, hasPendingSwap, inferTaskType, inspectEditFailure, inspectRepoIntelligenceRuntime, isDeniedRecently, isParallelDispatchDirective, isToolFileMutation, isToolMutation, isToolPlanModeAllowed, listAll, list as listArtifacts, listBuiltinToolDefinitions, listConstructed, listToolDefinitions, listTools, loadHandler, markFanoutBranchCancelled, markFanoutBranchCompleted, mergeArtifactLedger, orderPromptSections, parseClassifierOutput, parseEditToolError, parseLlmReviewVerdict, parseModelSpec, persistToolOutput, plannerAgent, plannerCodingAgent, prewarmRepoIntelligenceCaches, readArtifact, readAuditEntries, readBudget, readDisableState, readWindowFromEnv as readSpeculativeWindowFromEnv, reasoningModeToDepth, reconstructMessagesWithToolGuard, recordDenial, registerCodingInvariants, registerConfiguredMcpCapabilityProvider, registerOfficialSandboxExtension, registerTool, rehydrateActiveArtifacts, remaining as remainingSelfModifyBudget, renderChangedScope, renderImpactEstimate, renderModuleContext, renderProcessContext, renderPromptSections, renderRepoOverview, renderRetrievalResult, renderSymbolContext, resetBudget, resolveClassifierModel, resolveConstructedAgent, resolveReasoningMode, resolveRepoIntelligenceMode, resolveRepoIntelligenceRuntimeConfig, resolveResilienceConfig, resolveSessionLineageTarget, resolveToolCapability, revoke, rewindSessionLineage, rollbackSelfModify, runAstRules, runKodaX, runLlmReview, runManagedTask, runOrchestration, scoutAgent, scoutCodingAgent, setActiveExtensionRuntime, setSessionLineageActiveEntry, 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, validateSubtaskIndependence, validateToolSchemaForProvider, warmRepoIntelligenceRuntime, webhook };
4614
+ export type { AbsoluteDenyMatch, AbsoluteDenyMiss, AbsoluteDenyResult, AgentArtifact, ArtifactStatus, AstCheckResult, AstRuleId, AstRuleViolation, AuditEntry, AuditEventKind, BashClassificationResult, BashClassifierConfig, BashRiskLevel, BudgetState, BuildClassifierPromptInput, BuildPromptInput, Capabilities, ChangedFileEntry, ChangedFileStatus, ChangedScopeAreaSummary, ChangedScopeReport, ClassifierDecision, ClassifierPrompt, ClassifyDecision, ClassifyOptions, ConstructionArtifact, ConstructionPolicy, ConstructionPolicyVerdict, CreateCtxProxyOptions, CreateKodaXTaskRunnerOptions, DenialRecord, DenialTracker, DisableState, EditRecoveryDiagnostic, EditToolErrorCode, ErrorClassification, ExecOptions, ExecResult, ExtensionCommandContext, ExtensionCommandDefinition, ExtensionCommandInvocation, ExtensionCommandResult, ExtensionContributionSource, ExtensionEventMap, ExtensionFailureDiagnostic, ExtensionFailureStage, ExtensionHookMap, ExtensionLoadSource, ExtensionLogger, ExtensionRuntimeController, ExtensionRuntimeDiagnostics, ExtensionToolBeforeHookContext, ImpactEstimateResult, KodaXAgentWorkerSpec, KodaXExtensionAPI, KodaXExtensionActivationResult, KodaXExtensionModule, KodaXPromptSection, KodaXPromptSectionDefinition, KodaXPromptSectionSlot, KodaXPromptSectionStability, KodaXPromptSnapshot, KodaXPromptSnapshotMetadata, KodaXProviderCapabilitySnapshot, KodaXProviderPolicyDecision, KodaXProviderPolicyIssue, KodaXProviderPolicyIssueSeverity, KodaXProviderSourceKind, KodaXRetrievalArtifact, KodaXRetrievalFreshness, KodaXRetrievalItem, KodaXRetrievalResult, KodaXRetrievalScope, KodaXRetrievalToolName, KodaXRetrievalTrust, LanguageCapabilityTier, LineageArtifactLedgerPayload, LineageCompactionDelegates, LineageEntryType, LineageLabelPayload, LineageTreeNode, LlmReviewClient, LlmReviewResult, LlmReviewVerdict, LoadHandlerOptions, LoadHandlerScope, LoadedExtensionDiagnostic, LocalToolDefinition, 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, WebhookOptions, WebhookResult };