@kodax-ai/kodax 0.7.67 → 0.7.69

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/CHANGELOG.md +209 -3
  2. package/README.md +61 -9
  3. package/README_CN.md +58 -9
  4. package/config-templates/config.example.jsonc +26 -0
  5. package/config-templates/integrations/a2a.example.jsonc +54 -0
  6. package/config-templates/integrations/extensions.example.jsonc +7 -0
  7. package/config-templates/integrations/mcp.example.jsonc +16 -0
  8. package/dist/chunks/agent-DQRXT6M7.js +2 -0
  9. package/dist/chunks/argument-completer-RSK6CCGP.js +2 -0
  10. package/dist/chunks/chunk-4WIODYOH.js +329 -0
  11. package/dist/chunks/chunk-AWMTNUDS.js +37 -0
  12. package/dist/chunks/chunk-F7C7J6IM.js +7 -0
  13. package/dist/chunks/chunk-I4TPQEJN.js +5 -0
  14. package/dist/chunks/chunk-M7TCFYTO.js +107 -0
  15. package/dist/chunks/chunk-NGHQIGVW.js +46 -0
  16. package/dist/chunks/chunk-NGJURAY5.js +306 -0
  17. package/dist/chunks/{chunk-KBBGDRER.js → chunk-PA76WUBL.js} +2 -2
  18. package/dist/chunks/chunk-PQ3XUSY2.js +357 -0
  19. package/dist/chunks/chunk-UJEMSPM5.js +78 -0
  20. package/dist/chunks/{chunk-DEICMTHO.js → chunk-URC6ZI6P.js} +1 -1
  21. package/dist/chunks/{chunk-EN3O2C43.js → chunk-VAZ25MDX.js} +122 -122
  22. package/dist/chunks/chunk-VYKFM3TB.js +751 -0
  23. package/dist/chunks/chunk-WW2O2DEP.js +2 -0
  24. package/dist/chunks/chunk-Y4WOTWUC.js +2 -0
  25. package/dist/chunks/chunk-Z4PPLJF2.js +60 -0
  26. package/dist/chunks/chunk-ZG4DMYBS.js +422 -0
  27. package/dist/chunks/compaction-config-ABLL6UH3.js +2 -0
  28. package/dist/chunks/{construction-bootstrap-GLEHQ2KB.js → construction-bootstrap-GH6RW6ST.js} +1 -1
  29. package/dist/chunks/dist-DRBKYVHF.js +2 -0
  30. package/dist/chunks/dist-RWL2RBO4.js +2 -0
  31. package/dist/chunks/host-7SAB4WEC.js +2 -0
  32. package/dist/chunks/run-manager-XMDKTONJ.js +2 -0
  33. package/dist/chunks/utils-QYE5Y73D.js +2 -0
  34. package/dist/index.d.ts +19 -19
  35. package/dist/index.js +6 -6
  36. package/dist/kodax_cli.js +1497 -1209
  37. package/dist/runtime-worker.js +1371 -1107
  38. package/dist/sdk-a2a.d.ts +397 -0
  39. package/dist/sdk-a2a.js +9 -0
  40. package/dist/sdk-agent.d.ts +172 -33
  41. package/dist/sdk-agent.js +1 -1
  42. package/dist/sdk-coding.d.ts +126 -51
  43. package/dist/sdk-coding.js +1 -1
  44. package/dist/sdk-experimental-memory.d.ts +618 -0
  45. package/dist/sdk-experimental-memory.js +2 -0
  46. package/dist/sdk-llm.d.ts +16 -9
  47. package/dist/sdk-llm.js +1 -1
  48. package/dist/sdk-mcp.d.ts +1 -1
  49. package/dist/sdk-mcp.js +1 -1
  50. package/dist/sdk-media.d.ts +1 -1
  51. package/dist/sdk-media.js +1 -1
  52. package/dist/sdk-repl.d.ts +35 -101
  53. package/dist/sdk-repl.js +2 -2
  54. package/dist/sdk-runtime.d.ts +744 -21
  55. package/dist/sdk-runtime.js +1 -1
  56. package/dist/sdk-session.d.ts +7 -7
  57. package/dist/sdk-session.js +1 -1
  58. package/dist/sdk-skills.js +1 -1
  59. package/dist/semantic-worker.js +100 -12
  60. package/dist/types-chunks/{base.d-DalIRhbb.d.ts → base.d-CYjtB68X.d.ts} +1 -1
  61. package/dist/types-chunks/{bash-prefix-extractor.d-D57Gt6n8.d.ts → bash-prefix-extractor.d-BkIA8Wto.d.ts} +89 -18
  62. package/dist/types-chunks/{capability-learning.d-BQB0M70w.d.ts → capability-learning.d-WtsyRv3O.d.ts} +1 -1
  63. package/dist/types-chunks/{capsule.d-BZmqu_HL.d.ts → capsule.d-xJvfh4YR.d.ts} +5 -5
  64. package/dist/types-chunks/{commands.d-Cg26ud-Y.d.ts → commands.d-DkPfcQWG.d.ts} +4 -4
  65. package/dist/types-chunks/{cost-tracker.d-CBLk1fiD.d.ts → cost-tracker.d-BeaenODW.d.ts} +4 -1
  66. package/dist/types-chunks/{guardrail.d-Ds7JHxR1.d.ts → guardrail.d-6ZDbNbHO.d.ts} +1 -1
  67. package/dist/types-chunks/{guardrail.d-vSaBe64I.d.ts → guardrail.d-R7AiGfrI.d.ts} +4 -4
  68. package/dist/types-chunks/integration-config.d-ojG4swOP.d.ts +95 -0
  69. package/dist/types-chunks/{manager.d-Zum9cGHU.d.ts → manager.d-CoEuPRAo.d.ts} +4 -1
  70. package/dist/types-chunks/{public-api.d-CPBMPDiU.d.ts → public-api.d-7G4--RZE.d.ts} +6 -7
  71. package/dist/types-chunks/{resolver.d-CGkfRULj.d.ts → resolver.d-CIVoGc97.d.ts} +2 -2
  72. package/dist/types-chunks/{run-manager.d-lnwnfyNC.d.ts → run-manager.d-BaXtkryp.d.ts} +1 -1
  73. package/dist/types-chunks/{sdk-session-ByoMLoUS.d.ts → sdk-session-BQccrODn.d.ts} +6 -4
  74. package/dist/types-chunks/{types.d-DG9B4SMm.d.ts → types.d-BtC4yLYO.d.ts} +170 -13
  75. package/dist/types-chunks/{types.d-DYv3a1ka.d.ts → types.d-C9YHEAmA.d.ts} +38 -7
  76. package/dist/types-chunks/{types.d-DU9lLkmE.d.ts → types.d-CJR7t6iW.d.ts} +2 -2
  77. package/dist/types-chunks/{types.d-Bp4Lm1jv.d.ts → types.d-TTvpAGWf.d.ts} +11 -1
  78. package/dist/types-chunks/{utils.d-DMI-9GTR.d.ts → utils.d-BbB5jzi1.d.ts} +15 -7
  79. package/docs/SDK_EMBEDDER_GUIDE.md +732 -14
  80. package/package.json +14 -2
  81. package/dist/chunks/agent-E4V5SLX6.js +0 -2
  82. package/dist/chunks/argument-completer-N6RT5KYT.js +0 -2
  83. package/dist/chunks/chunk-AKMXJSGM.js +0 -56
  84. package/dist/chunks/chunk-CW32NQFO.js +0 -2
  85. package/dist/chunks/chunk-D6QVXQNI.js +0 -1
  86. package/dist/chunks/chunk-NVDK375I.js +0 -729
  87. package/dist/chunks/chunk-O7N22GJ3.js +0 -31
  88. package/dist/chunks/chunk-PZTG2C33.js +0 -7
  89. package/dist/chunks/chunk-QI6SQ2UQ.js +0 -306
  90. package/dist/chunks/chunk-QJJKMNZF.js +0 -2
  91. package/dist/chunks/chunk-RS2GAABJ.js +0 -328
  92. package/dist/chunks/chunk-W2XMNYLK.js +0 -15
  93. package/dist/chunks/chunk-WCSSXBHR.js +0 -419
  94. package/dist/chunks/chunk-YH5BTUQO.js +0 -343
  95. package/dist/chunks/chunk-YRBNXFHY.js +0 -2
  96. package/dist/chunks/compaction-config-56NO42ZI.js +0 -2
  97. package/dist/chunks/dist-4PXB7U22.js +0 -2
  98. package/dist/chunks/dist-4UIRSSFS.js +0 -2
  99. package/dist/chunks/host-DMREFNSO.js +0 -2
  100. package/dist/chunks/paste-C33GZQV5.js +0 -2
  101. package/dist/chunks/run-manager-P5XMSGZ7.js +0 -2
  102. package/dist/chunks/utils-JENPFKAE.js +0 -2
@@ -1,4 +1,4 @@
1
- import { p as KodaXProviderConfig, j as KodaXMessage, a0 as KodaXToolDefinition, G as KodaXReasoningRequest, x as KodaXProviderStreamOptions, M as KodaXStreamResult, a6 as KodaXVerifyCredentialResult, k as KodaXModelDescriptor, o as KodaXProviderCapabilityProfile, A as KodaXReasoningCapability, F as KodaXReasoningProfile, m as KodaXNormalizedReasoningRequest, a8 as KodaXWireReasoningEffort } from './types.d-Bp4Lm1jv.js';
1
+ import { q as KodaXProviderConfig, k as KodaXMessage, a1 as KodaXToolDefinition, H as KodaXReasoningRequest, y as KodaXProviderStreamOptions, N as KodaXStreamResult, a7 as KodaXVerifyCredentialResult, l as KodaXModelDescriptor, p as KodaXProviderCapabilityProfile, B as KodaXReasoningCapability, G as KodaXReasoningProfile, n as KodaXNormalizedReasoningRequest, a9 as KodaXWireReasoningEffort } from './types.d-TTvpAGWf.js';
2
2
 
3
3
  /**
4
4
  * Retry-After header parsing — FEATURE_130 (v0.7.36).
@@ -1,10 +1,10 @@
1
- import { aN as KodaXGoalState, I as AgentMessage, cB as StopHookFn, b2 as KodaXSessionLineage, aT as KodaXJsonValue, aH as KodaXExtensionSessionRecord, f as Agent, cZ as WorkflowIsolation, aI as KodaXExtensionSessionState, aV as KodaXSessionArtifactLedgerEntry, cm as SessionErrorMetadata, b8 as KodaXSessionScope, b9 as KodaXSessionStorage, aR as KodaXInputArtifact, B as AgentExecutorPlaneBinding, a6 as ChildTaskRegistry, cW as WorkflowEventCorrelation, ac as CompactionUpdate, d6 as WorkflowProcessEvent, cV as WorkflowEvent, a3 as AskUserQuestionOptions, $ as AskUserAnswer, a1 as AskUserMultiOptions, bR as MemoryReviewPlan, bS as MemoryReviewRunner, aw as Guardrail, ah as DiscoveredInstance, cF as TaskAbortRegistry } from './types.d-DG9B4SMm.js';
2
- import { $ as KodaXTokenUsage, j as KodaXMessage, a0 as KodaXToolDefinition, a8 as KodaXWireReasoningEffort, T as KodaXTaskRoutingDecision, U as KodaXTaskType, V as KodaXTaskWorkIntent, P as KodaXTaskComplexity, J as KodaXRiskLevel, g as KodaXHarnessProfile, e as KodaXExecutionMode, b as KodaXChildFanoutClass, E as KodaXReasoningMode, I as KodaXReviewScale } from './types.d-Bp4Lm1jv.js';
3
- import { d as SkillDynamicContextExecutor } from './types.d-vJExiRje.js';
1
+ import { aN as KodaXGoalState, I as AgentMessage, cR as StopHookFn, b5 as KodaXSessionLineage, aT as KodaXJsonValue, aH as KodaXExtensionSessionRecord, f as Agent, dd as WorkflowIsolation, aI as KodaXExtensionSessionState, aY as KodaXSessionArtifactLedgerEntry, cC as SessionErrorMetadata, bd as KodaXSessionScope, be as KodaXSessionStorage, bE as MemoryContextIdentity, bQ as MemoryPack, aR as KodaXInputArtifact, B as AgentExecutorPlaneBinding, a6 as ChildTaskRegistry, da as WorkflowEventCorrelation, ac as CompactionUpdate, dm as WorkflowProcessEvent, d9 as WorkflowEvent, a3 as AskUserQuestionOptions, $ as AskUserAnswer, a1 as AskUserMultiOptions, c2 as MemoryReviewPlan, aV as KodaXMemoryOutcomeDigest, c3 as MemoryReviewRunner, aw as Guardrail, ah as DiscoveredInstance, cV as TaskAbortRegistry } from './types.d-BtC4yLYO.js';
2
+ import { a0 as KodaXTokenUsage, k as KodaXMessage, a1 as KodaXToolDefinition, a9 as KodaXWireReasoningEffort, U as KodaXTaskRoutingDecision, V as KodaXTaskType, W as KodaXTaskWorkIntent, Q as KodaXTaskComplexity, L as KodaXRiskLevel, h as KodaXHarnessProfile, f as KodaXExecutionMode, b as KodaXChildFanoutClass, F as KodaXReasoningMode, J as KodaXReviewScale } from './types.d-TTvpAGWf.js';
3
+ import { I as ISkillRegistry, d as SkillDynamicContextExecutor } from './types.d-vJExiRje.js';
4
4
  import { Diagnostic, Position, Location, Hover, DocumentSymbol, SymbolInformation, WorkspaceSymbol, CallHierarchyItem, CallHierarchyIncomingCall, CallHierarchyOutgoingCall } from 'vscode-languageserver-protocol';
5
- import { K as KodaXLlmTimeoutConfig, a as CostTracker } from './cost-tracker.d-CBLk1fiD.js';
5
+ import { K as KodaXLlmTimeoutConfig, a as CostTracker } from './cost-tracker.d-BeaenODW.js';
6
6
  import { C as CapabilityKind, b as CapabilityResult } from './capability.d-3C62G8Eq.js';
7
- import { K as KodaXBaseProvider } from './base.d-DalIRhbb.js';
7
+ import { K as KodaXBaseProvider } from './base.d-CYjtB68X.js';
8
8
 
9
9
  /**
10
10
  * FEATURE_192 v0.7.44 Phase C — Goal-tools execution context.
@@ -910,12 +910,18 @@ declare function buildGoalRuntimeBinding(deps: GoalRuntimeBindingDeps): GoalRunt
910
910
  * configure / install / troubleshoot KodaX?" questions. Pure data + a
911
911
  * deterministic resolver — no RAG, no vector store, no network fetch.
912
912
  */
913
- type KodaXManualTopicId = 'overview' | 'install' | 'quickstart' | 'providers' | 'custom-providers' | 'config' | 'permissions' | 'commands' | 'tools' | 'agents' | 'skills' | 'extensions' | 'mcp' | 'repo-intelligence' | 'sessions' | 'doctor' | 'sdk' | 'troubleshooting';
913
+ type KodaXManualTopicId = 'overview' | 'install' | 'quickstart' | 'providers' | 'custom-providers' | 'config' | 'permissions' | 'commands' | 'tools' | 'agents' | 'skills' | 'extensions' | 'mcp' | 'repo-intelligence' | 'sessions' | 'memory' | 'doctor' | 'sdk' | 'troubleshooting';
914
914
  /** A pointer to the code/doc the topic is derived from (for traceability). */
915
915
  interface KodaXManualSource {
916
916
  readonly label: string;
917
917
  readonly path: string;
918
918
  }
919
+ /** Lightweight index metadata; topic bodies stay behind exact-topic lookup. */
920
+ interface KodaXManualIndexTopic {
921
+ readonly id: string;
922
+ readonly title: string;
923
+ readonly summary: string;
924
+ }
919
925
  interface KodaXManualTopic {
920
926
  readonly id: KodaXManualTopicId;
921
927
  /** Human title, shown as the answer heading. */
@@ -924,10 +930,7 @@ interface KodaXManualTopic {
924
930
  readonly aliases: readonly string[];
925
931
  /** One-line summary, shown in the index listing. */
926
932
  readonly summary: string;
927
- /**
928
- * Bounded topic body. Built at module load — dynamic parts (e.g. the
929
- * provider list) read live constants so the manual cannot drift from code.
930
- */
933
+ /** Exact topic body. Dynamic parts read live constants so it cannot drift from code. */
931
934
  readonly body: string;
932
935
  readonly sources: readonly KodaXManualSource[];
933
936
  readonly nextTopics: readonly KodaXManualTopicId[];
@@ -943,7 +946,8 @@ interface ResolveKodaXManualInput {
943
946
  * injects via `KodaXOptions.selfManual.topics`. Same shape as a KodaX base
944
947
  * topic but `id` is a free string (new id = add; existing base id = override),
945
948
  * and aliases/nextTopics/sources are optional to lower the authoring burden.
946
- * Bodies are still byte-capped by the resolver (no unbounded items).
949
+ * Exact-topic bodies are returned completely; normal tool-result admission
950
+ * owns any request-level capacity fallback.
947
951
  */
948
952
  interface KodaXManualTopicInput {
949
953
  readonly id: string;
@@ -965,8 +969,8 @@ interface ResolveKodaXManualOptions {
965
969
  * layered on top. Orthogonal to `extraTopics` (whose override-by-id/append
966
970
  * semantics are unchanged).
967
971
  *
968
- * - `undefined` → seed all base topics (`MANUAL_TOPIC_IDS`). Today's exact
969
- * behavior (byte-identical default).
972
+ * - `undefined` → seed all base topics (`MANUAL_TOPIC_IDS`), preserving the
973
+ * legacy topic selection behavior.
970
974
  * - `[]` → seed ZERO base topics; only `extraTopics` populate the manual
971
975
  * (full white-label replace).
972
976
  * - `KodaXManualTopicId[]` → seed exactly this curated subset (e.g.
@@ -979,8 +983,10 @@ interface ResolveKodaXManualResult {
979
983
  /** A topic id (KodaX base or injected consumer topic), or 'index'. */
980
984
  readonly matchedTopic: string;
981
985
  readonly title: string;
982
- /** Assembled, byte-capped content (scope anchor + body, or index list). */
986
+ /** Complete exact-topic content, or a short index/search instruction. */
983
987
  readonly content: string;
988
+ /** Structured index candidates; empty for an exact-topic result. */
989
+ readonly topics: readonly KodaXManualIndexTopic[];
984
990
  readonly sources: readonly KodaXManualSource[];
985
991
  readonly nextTopics: readonly string[];
986
992
  }
@@ -1155,6 +1161,7 @@ interface RuntimeContextBudgetSnapshot {
1155
1161
  readonly pressure: RuntimeContextPressure;
1156
1162
  readonly tokenBreakdown: RuntimeContextBudgetBreakdown;
1157
1163
  readonly usedTokens: number;
1164
+ /** Diagnostic slack for the existing snapshot; never an append budget. */
1158
1165
  readonly availableTokens: number;
1159
1166
  readonly usedRatio: number;
1160
1167
  readonly toolSchemaRatio: number;
@@ -1299,6 +1306,7 @@ interface BoundExtensionRuntimeController {
1299
1306
  setThinkingLevel(level: KodaXWireReasoningEffort): void;
1300
1307
  }
1301
1308
  interface CapabilityRuntimeContract {
1309
+ hasCapabilityProvider?(providerId: string): boolean;
1302
1310
  searchCapabilities(providerId: string, query: string, options?: {
1303
1311
  kind?: CapabilityKind;
1304
1312
  limit?: number;
@@ -1952,6 +1960,17 @@ interface KodaXEvents {
1952
1960
  exitPlanMode?: (plan: string) => Promise<boolean | 'not-in-plan-mode'>;
1953
1961
  /** Semantic memory review plan produced from explicit user feedback. */
1954
1962
  onMemoryReview?: (plan: MemoryReviewPlan) => void;
1963
+ onMemoryNotice?: (notice: {
1964
+ readonly episodeId: string;
1965
+ readonly summaries: readonly string[];
1966
+ readonly proposalIds: readonly string[];
1967
+ }) => void;
1968
+ onMemoryOutcomeDigest?: (digest: KodaXMemoryOutcomeDigest) => void;
1969
+ onMemoryReviewReceipt?: (receipt: {
1970
+ readonly reviewKey: string;
1971
+ readonly proposalIds: readonly string[];
1972
+ readonly completedAt: string;
1973
+ }) => void;
1955
1974
  }
1956
1975
  /**
1957
1976
  * Structured event emitted during provider recovery.
@@ -2535,7 +2554,38 @@ interface KodaXToolVisibilityMeta {
2535
2554
  * metadata is hidden (fail-closed).
2536
2555
  */
2537
2556
  type KodaXToolVisibilityPolicy = (tool: KodaXToolVisibilityMeta) => boolean;
2557
+ interface KodaXSkillScriptInputFile {
2558
+ /** Workspace-relative source path copied into the isolated staging directory. */
2559
+ readonly path: string;
2560
+ /** Optional staging-relative name; defaults to the source basename. */
2561
+ readonly as?: string;
2562
+ }
2563
+ interface KodaXSkillScriptOutputFile {
2564
+ /** Staging-relative path produced by the script. */
2565
+ readonly path: string;
2566
+ /** Workspace-relative destination populated after a successful run. */
2567
+ readonly target: string;
2568
+ }
2569
+ interface KodaXSkillScriptRunInput {
2570
+ readonly skill: string;
2571
+ readonly script: string;
2572
+ readonly args: readonly string[];
2573
+ readonly inputs: readonly KodaXSkillScriptInputFile[];
2574
+ readonly outputs: readonly KodaXSkillScriptOutputFile[];
2575
+ }
2576
+ /** Run-scoped, fail-closed broker used by the remote-only Skill script tool. */
2577
+ interface KodaXSkillScriptRunner {
2578
+ run(input: KodaXSkillScriptRunInput, context: {
2579
+ readonly workspaceRoot: string;
2580
+ readonly signal?: AbortSignal;
2581
+ }): Promise<string>;
2582
+ dispose(): Promise<void>;
2583
+ }
2538
2584
  interface KodaXContextOptions {
2585
+ /** FEATURE_260 runtime-owned identity used for scoped memory reads. */
2586
+ memoryIdentity?: MemoryContextIdentity;
2587
+ /** Runtime-built F228 pack reused by prompt rendering and MemorySession. */
2588
+ memoryPack?: MemoryPack;
2539
2589
  /** Project root used for project-scoped prompts, permissions, and path policy. */
2540
2590
  gitRoot?: string | null;
2541
2591
  /**
@@ -2579,6 +2629,10 @@ interface KodaXContextOptions {
2579
2629
  toolConstructionMode?: boolean;
2580
2630
  /** Skills system prompt snippet for progressive disclosure - Skills 系统提示词片段(渐进式披露) */
2581
2631
  skillsPrompt?: string;
2632
+ /** Optional run-scoped registry used to pin and restrict Skill invocation. */
2633
+ skillRegistry?: ISkillRegistry;
2634
+ /** Remote-runtime broker for explicitly admitted, OS-sandboxed Skill scripts. */
2635
+ skillScriptRunner?: KodaXSkillScriptRunner;
2582
2636
  rawUserInput?: string;
2583
2637
  skillInvocation?: KodaXSkillInvocationContext;
2584
2638
  /** Optional repository-intelligence snapshot injected into the system prompt. */
@@ -2711,8 +2765,8 @@ interface KodaXContextOptions {
2711
2765
  * injects its own product manual so that when ITS users ask "how do I use /
2712
2766
  * configure <product>?", the kodax_manual tool answers with the consumer's
2713
2767
  * topics. `topics` extend the seeded base (override by id, then append);
2714
- * `productName` re-brands the routing rule + scope anchor. Topics are still
2715
- * byte-capped.
2768
+ * `productName` re-brands the routing rule + scope anchor. Exact topic bodies
2769
+ * remain complete; the shared tool-result admission layer owns capacity.
2716
2770
  *
2717
2771
  * `baseTopics` controls how much of KodaX's own manual is present underneath:
2718
2772
  * omit it for the default full base, `[]` for a full white-label replace, or a
@@ -3117,6 +3171,11 @@ interface KodaXResult {
3117
3171
  interface KodaXToolExecutionContext {
3118
3172
  /** File backups for undo functionality - 文件备份用于撤销功能 */
3119
3173
  backups: Map<string, string>;
3174
+ /** FEATURE_260: current exactly-scoped read-only MemorySession query binding. */
3175
+ memoryRecall?: (need: string) => Promise<{
3176
+ readonly content: string;
3177
+ readonly evidenceRefs: readonly string[];
3178
+ } | undefined>;
3120
3179
  /** Git root directory - Git 鏍圭洰褰?*/
3121
3180
  gitRoot?: string;
3122
3181
  /**
@@ -3153,8 +3212,20 @@ interface KodaXToolExecutionContext {
3153
3212
  /** FEATURE_222 skill security — host policy for skill `!`cmd`` dynamic-context,
3154
3213
  * forwarded from `KodaXOptions.skillDynamicContext`. Consumed by the `skill` tool. */
3155
3214
  skillDynamicContext?: KodaXSkillDynamicContextPolicy;
3215
+ /** Runtime-bound Skill registry; avoids process-global cross-session drift. */
3216
+ skillRegistry?: ISkillRegistry;
3217
+ /** Present only when the host admitted exact Skill scripts for this run. */
3218
+ skillScriptRunner?: KodaXSkillScriptRunner;
3156
3219
  /** Working directory used to resolve relative paths and execute shell commands. */
3157
3220
  executionCwd?: string;
3221
+ /** Maximum physical input capacity of the active model request. */
3222
+ maximumInputTokens?: number;
3223
+ /** Remaining capacity for the complete tool-result batch in this request. */
3224
+ toolResultCapacityTokens?: number;
3225
+ /** Runner path resolver for the transcript that the current batch extends. */
3226
+ resolveToolResultCapacityTokens?: (messages: readonly KodaXMessage[]) => number;
3227
+ /** Trusted side-channel for a tool-owned recovery artifact. */
3228
+ recordToolResultArtifact?: (toolCallId: string, outputPath: string) => void;
3158
3229
  /** Session-scoped directory for helper scripts and scratch outputs. */
3159
3230
  sessionScratchDir?: string;
3160
3231
  /**
@@ -3713,5 +3784,5 @@ interface CreateBashPrefixExtractorOptions {
3713
3784
  */
3714
3785
  declare function createBashPrefixExtractor(opts: CreateBashPrefixExtractorOptions): BashPrefixExtractor;
3715
3786
 
3716
- export { ALWAYS_RESIDENT_TOOL_NAMES as A, BASH_POLICY_SPEC as B, LSP_SERVERS as aI, LspService as aK, makeDisabledGoalToolsContext as bA, planToolExposure as bB, providerResilienceConfigFromTimeouts as bC, recordCompactionSavings as bD, resolveConstructedAgent as bE, shouldSkipLlmCompaction as bF, shutdownDefaultLspService as bG, withGoalBeforeNextTurn as bH, withGoalStopHook as bI, workflowStartOutcomeConsumesTurn as bJ, buildGoalRuntimeBinding as bp, consumeCompactionCooldown as bq, createBashPrefixExtractor as br, createCompactionAntiThrashState as bs, createRuntimeContextBudgetSnapshot as bt, decideWorkflowInvocation as bu, drainPendingSwaps as bv, estimateToolSchemaTokens as bw, extractCommandPrefix as bx, getDefaultLspService as by, hasPendingSwap as bz };
3717
- export type { KodaXRepoIntelligenceCapability as $, CapabilityRuntimeContract as C, DiagnosticsRequest as D, ExtensionRuntimeContract as E, FailureStage as F, GoalBlockedResult as G, KodaXContextOptions as H, KodaXContextTokenSnapshot as I, KodaXEffectiveTaskConfig as J, KodaXActivityEventMeta as K, KodaXEvents as L, KodaXLiveEventMeta as M, KodaXManagedBudgetSnapshot as N, KodaXManagedProtocolPayload as O, KodaXManagedTask as P, KodaXManagedTaskRuntimeState as Q, KodaXManagedTaskStatusEvent as R, KodaXManualSource as S, KodaXManualTopic as T, KodaXManualTopicId as U, KodaXManualTopicInput as V, KodaXMemoryStrategy as W, KodaXOptions as X, KodaXOrchestrationVerdict as Y, KodaXParentReductionContract as Z, KodaXProviderPolicyHints as _, BashPrefixExtractor as a, RuntimeContextBudgetRecommendation as a$, KodaXRepoIntelligenceMode as a0, KodaXRepoIntelligenceResolvedMode as a1, KodaXRepoIntelligenceTrace as a2, KodaXRepoIntelligenceTraceEvent as a3, KodaXRepoRoutingSignals as a4, KodaXResult as a5, KodaXRoleRoundSummary as a6, KodaXRuntimeVerificationContract as a7, KodaXSelfManualConfig as a8, KodaXSessionControl as a9, KodaXTurnDeliveryKind as aA, KodaXTurnFailedEvent as aB, KodaXTurnStartedEvent as aC, KodaXVerificationScorecard as aD, KodaXVerificationScorecardCriterion as aE, KodaXWorkflowAgentDigestEvent as aF, KodaXWorkflowEventMeta as aG, KodaXWorkflowTimeoutConfig as aH, LspServerInfo as aJ, LspServiceConfig as aL, ProviderExecutionState as aM, ProviderRecoveryEvent as aN, ProviderResilienceConfig as aO, ProviderResiliencePolicy as aP, RecoveryAction as aQ, RecoveryDecision as aR, RecoveryLadderStep as aS, RecoveryResult as aT, ResilienceClassification as aU, ResilienceErrorClass as aV, ResolveKodaXManualInput as aW, ResolveKodaXManualOptions as aX, ResolveKodaXManualResult as aY, RuntimeCompactionSkippedEvent as aZ, RuntimeContextBudgetBreakdown as a_, KodaXSessionMutators as aa, KodaXSessionOptions as ab, KodaXSidecarMessageEvent as ac, KodaXSkillDynamicContextPolicy as ad, KodaXSkillInvocationContext as ae, KodaXSkillMap as af, KodaXSkillProjectionConfidence as ag, KodaXTaskCapabilityHint as ah, KodaXTaskContract as ai, KodaXTaskEvidenceArtifact as aj, KodaXTaskEvidenceBundle as ak, KodaXTaskEvidenceEntry as al, KodaXTaskRole as am, KodaXTaskRoleAssignment as an, KodaXTaskStatus as ao, KodaXTaskSurface as ap, KodaXTaskToolPolicy as aq, KodaXTaskVerificationContract as ar, KodaXTaskVerificationCriterion as as, KodaXTaskWorkItem as at, KodaXTimeoutConfig as au, KodaXToolEventMeta as av, KodaXToolExecutionContext as aw, KodaXToolVisibilityMeta as ax, KodaXToolVisibilityPolicy as ay, KodaXTurnCompletedEvent as az, BashPrefixResult as b, RuntimeContextBudgetSnapshot as b0, RuntimeContextBudgetSnapshotInput as b1, RuntimeContextOptimizationProfile as b2, RuntimeContextPressure as b3, RuntimeDefaultsSnapshot as b4, RuntimeToolExposureDecision as b5, RuntimeToolExposureMode as b6, RuntimeToolExposurePlan as b7, RuntimeToolExposurePlanInput as b8, RuntimeToolExposureReason as b9, TodoItem as ba, TodoList as bb, TodoStatus as bc, ToolSideEffect as bd, WorkflowHostPolicy as be, WorkflowInvocationAction as bf, WorkflowInvocationPolicyDecision as bg, WorkflowInvocationPolicyInput as bh, WorkflowInvocationSource as bi, WorkflowRunProgressView as bj, WorkflowStartOutcome as bk, WorkflowToolHost as bl, WorkflowToolHostInlineInput as bm, WorkflowToolHostResult as bn, WorkflowToolHostStartResult as bo, BoundExtensionRuntimeController as c, ChildSnapshotEvent as d, CompactionAntiThrashConfig as e, CompactionAntiThrashState as f, CompactionSavingsDecision as g, CompactionSavingsSample as h, CompactionSkipReason as i, CreateBashPrefixExtractorOptions as j, ExtractCommandPrefixOptions as k, GoalCompleteResult as l, GoalCreateInput as m, GoalLifecycleContext as n, GoalRuntimeBinding as o, GoalRuntimeBindingDeps as p, GoalToolsContext as q, KodaXAgentMode as r, KodaXAgentProfile as s, KodaXAgentScope as t, KodaXBudgetDisclosureZone as u, KodaXBudgetExtensionRequest as v, KodaXChildAgentResult as w, KodaXChildContextBundle as x, KodaXChildExecutionResult as y, KodaXCompactionOverride as z };
3787
+ export { ALWAYS_RESIDENT_TOOL_NAMES as A, BASH_POLICY_SPEC as B, LSP_SERVERS as aN, LspService as aP, drainPendingSwaps as bA, estimateToolSchemaTokens as bB, extractCommandPrefix as bC, getDefaultLspService as bD, hasPendingSwap as bE, makeDisabledGoalToolsContext as bF, planToolExposure as bG, providerResilienceConfigFromTimeouts as bH, recordCompactionSavings as bI, resolveConstructedAgent as bJ, shouldSkipLlmCompaction as bK, shutdownDefaultLspService as bL, withGoalBeforeNextTurn as bM, withGoalStopHook as bN, workflowStartOutcomeConsumesTurn as bO, buildGoalRuntimeBinding as bu, consumeCompactionCooldown as bv, createBashPrefixExtractor as bw, createCompactionAntiThrashState as bx, createRuntimeContextBudgetSnapshot as by, decideWorkflowInvocation as bz };
3788
+ export type { KodaXProviderPolicyHints as $, CapabilityRuntimeContract as C, DiagnosticsRequest as D, ExtensionRuntimeContract as E, FailureStage as F, GoalBlockedResult as G, KodaXContextOptions as H, KodaXContextTokenSnapshot as I, KodaXEffectiveTaskConfig as J, KodaXActivityEventMeta as K, KodaXEvents as L, KodaXLiveEventMeta as M, KodaXManagedBudgetSnapshot as N, KodaXManagedProtocolPayload as O, KodaXManagedTask as P, KodaXManagedTaskRuntimeState as Q, KodaXManagedTaskStatusEvent as R, KodaXManualIndexTopic as S, KodaXManualSource as T, KodaXManualTopic as U, KodaXManualTopicId as V, KodaXManualTopicInput as W, KodaXMemoryStrategy as X, KodaXOptions as Y, KodaXOrchestrationVerdict as Z, KodaXParentReductionContract as _, BashPrefixExtractor as a, ResolveKodaXManualInput as a$, KodaXRepoIntelligenceCapability as a0, KodaXRepoIntelligenceMode as a1, KodaXRepoIntelligenceResolvedMode as a2, KodaXRepoIntelligenceTrace as a3, KodaXRepoIntelligenceTraceEvent as a4, KodaXRepoRoutingSignals as a5, KodaXResult as a6, KodaXRoleRoundSummary as a7, KodaXRuntimeVerificationContract as a8, KodaXSelfManualConfig as a9, KodaXToolEventMeta as aA, KodaXToolExecutionContext as aB, KodaXToolVisibilityMeta as aC, KodaXToolVisibilityPolicy as aD, KodaXTurnCompletedEvent as aE, KodaXTurnDeliveryKind as aF, KodaXTurnFailedEvent as aG, KodaXTurnStartedEvent as aH, KodaXVerificationScorecard as aI, KodaXVerificationScorecardCriterion as aJ, KodaXWorkflowAgentDigestEvent as aK, KodaXWorkflowEventMeta as aL, KodaXWorkflowTimeoutConfig as aM, LspServerInfo as aO, LspServiceConfig as aQ, ProviderExecutionState as aR, ProviderRecoveryEvent as aS, ProviderResilienceConfig as aT, ProviderResiliencePolicy as aU, RecoveryAction as aV, RecoveryDecision as aW, RecoveryLadderStep as aX, RecoveryResult as aY, ResilienceClassification as aZ, ResilienceErrorClass as a_, KodaXSessionControl as aa, KodaXSessionMutators as ab, KodaXSessionOptions as ac, KodaXSidecarMessageEvent as ad, KodaXSkillDynamicContextPolicy as ae, KodaXSkillInvocationContext as af, KodaXSkillMap as ag, KodaXSkillProjectionConfidence as ah, KodaXSkillScriptInputFile as ai, KodaXSkillScriptOutputFile as aj, KodaXSkillScriptRunInput as ak, KodaXSkillScriptRunner as al, KodaXTaskCapabilityHint as am, KodaXTaskContract as an, KodaXTaskEvidenceArtifact as ao, KodaXTaskEvidenceBundle as ap, KodaXTaskEvidenceEntry as aq, KodaXTaskRole as ar, KodaXTaskRoleAssignment as as, KodaXTaskStatus as at, KodaXTaskSurface as au, KodaXTaskToolPolicy as av, KodaXTaskVerificationContract as aw, KodaXTaskVerificationCriterion as ax, KodaXTaskWorkItem as ay, KodaXTimeoutConfig as az, BashPrefixResult as b, ResolveKodaXManualOptions as b0, ResolveKodaXManualResult as b1, RuntimeCompactionSkippedEvent as b2, RuntimeContextBudgetBreakdown as b3, RuntimeContextBudgetRecommendation as b4, RuntimeContextBudgetSnapshot as b5, RuntimeContextBudgetSnapshotInput as b6, RuntimeContextOptimizationProfile as b7, RuntimeContextPressure as b8, RuntimeDefaultsSnapshot as b9, RuntimeToolExposureDecision as ba, RuntimeToolExposureMode as bb, RuntimeToolExposurePlan as bc, RuntimeToolExposurePlanInput as bd, RuntimeToolExposureReason as be, TodoItem as bf, TodoList as bg, TodoStatus as bh, ToolSideEffect as bi, WorkflowHostPolicy as bj, WorkflowInvocationAction as bk, WorkflowInvocationPolicyDecision as bl, WorkflowInvocationPolicyInput as bm, WorkflowInvocationSource as bn, WorkflowRunProgressView as bo, WorkflowStartOutcome as bp, WorkflowToolHost as bq, WorkflowToolHostInlineInput as br, WorkflowToolHostResult as bs, WorkflowToolHostStartResult as bt, BoundExtensionRuntimeController as c, ChildSnapshotEvent as d, CompactionAntiThrashConfig as e, CompactionAntiThrashState as f, CompactionSavingsDecision as g, CompactionSavingsSample as h, CompactionSkipReason as i, CreateBashPrefixExtractorOptions as j, ExtractCommandPrefixOptions as k, GoalCompleteResult as l, GoalCreateInput as m, GoalLifecycleContext as n, GoalRuntimeBinding as o, GoalRuntimeBindingDeps as p, GoalToolsContext as q, KodaXAgentMode as r, KodaXAgentProfile as s, KodaXAgentScope as t, KodaXBudgetDisclosureZone as u, KodaXBudgetExtensionRequest as v, KodaXChildAgentResult as w, KodaXChildContextBundle as x, KodaXChildExecutionResult as y, KodaXCompactionOverride as z };
@@ -1,4 +1,4 @@
1
- import { F as KodaXReasoningProfile } from './types.d-Bp4Lm1jv.js';
1
+ import { G as KodaXReasoningProfile } from './types.d-TTvpAGWf.js';
2
2
 
3
3
  type CapabilityCacheSource = 'observed' | 'probed';
4
4
  interface CapabilityCacheEntry {
@@ -1,6 +1,6 @@
1
- import { j as KodaXMessage } from './types.d-Bp4Lm1jv.js';
2
- import { Q as QueueEventListener, c as QueuedMessage, E as EnqueueInput, D as DequeueFilter } from './types.d-DU9lLkmE.js';
3
- import { I as AgentMessage, cl as SessionEntry, cj as Session, cn as SessionExtension, b2 as KodaXSessionLineage, aT as KodaXJsonValue, a9 as CompactionDetails, aG as KodaXCompactMemorySeed, a_ as KodaXSessionEntry, ba as KodaXSessionTreeNode, b1 as KodaXSessionLabelEntry, b0 as KodaXSessionGoalEntry, aX as KodaXSessionClientNoticeEntry, b6 as KodaXSessionRewindMarkerEntry, b5 as KodaXSessionNavigationOptions, aV as KodaXSessionArtifactLedgerEntry, au as FileOperations, d0 as WorkflowMeta, d1 as WorkflowModelHint, d2 as WorkflowModule } from './types.d-DG9B4SMm.js';
1
+ import { k as KodaXMessage } from './types.d-TTvpAGWf.js';
2
+ import { Q as QueueEventListener, c as QueuedMessage, E as EnqueueInput, D as DequeueFilter } from './types.d-CJR7t6iW.js';
3
+ import { I as AgentMessage, cB as SessionEntry, cz as Session, cD as SessionExtension, b5 as KodaXSessionLineage, aT as KodaXJsonValue, a9 as CompactionDetails, aG as KodaXCompactMemorySeed, b1 as KodaXSessionEntry, bf as KodaXSessionTreeNode, b4 as KodaXSessionLabelEntry, b3 as KodaXSessionGoalEntry, a_ as KodaXSessionClientNoticeEntry, bb as KodaXSessionRewindMarkerEntry, b6 as KodaXSessionMemoryOutcomeDigestEntry, b7 as KodaXSessionMemoryReviewReceiptEntry, ba as KodaXSessionNavigationOptions, aY as KodaXSessionArtifactLedgerEntry, au as FileOperations, dg as WorkflowMeta, dh as WorkflowModelHint, di as WorkflowModule } from './types.d-BtC4yLYO.js';
4
4
 
5
5
  /**
6
6
  * @kodax-ai/agent Constants
@@ -456,7 +456,7 @@ declare function cleanupIncompleteToolCalls(messages: KodaXMessage[]): KodaXMess
456
456
  * legacy lineage records rewinds via `activeEntryId` mutation; Session is
457
457
  * linear, so a marker entry is the equivalent).
458
458
  */
459
- declare const LINEAGE_ENTRY_TYPES: readonly ["message", "label", "compaction", "branch_summary", "archive_marker", "rewind_marker", "artifact_ledger"];
459
+ declare const LINEAGE_ENTRY_TYPES: readonly ["message", "label", "compaction", "branch_summary", "archive_marker", "rewind_marker", "artifact_ledger", "memory_outcome_digest", "memory_review_receipt"];
460
460
  type LineageEntryType = (typeof LINEAGE_ENTRY_TYPES)[number];
461
461
  /**
462
462
  * Payload shape for a `label` entry. Mirrors
@@ -568,7 +568,7 @@ declare function generateSessionId(): Promise<string>;
568
568
  */
569
569
  declare function extractTitleFromMessages(messages: KodaXMessage[]): string;
570
570
 
571
- type NavigableSessionEntry = Exclude<KodaXSessionEntry, KodaXSessionLabelEntry | KodaXSessionGoalEntry | KodaXSessionClientNoticeEntry | KodaXSessionRewindMarkerEntry>;
571
+ type NavigableSessionEntry = Exclude<KodaXSessionEntry, KodaXSessionLabelEntry | KodaXSessionGoalEntry | KodaXSessionClientNoticeEntry | KodaXSessionRewindMarkerEntry | KodaXSessionMemoryOutcomeDigestEntry | KodaXSessionMemoryReviewReceiptEntry>;
572
572
  /**
573
573
  * Reconcile a linear message list against an existing lineage tree.
574
574
  *
@@ -1,7 +1,7 @@
1
- import { h as SessionStorage$1, f as PermissionMode } from './public-api.d-CPBMPDiU.js';
2
- import { X as KodaXOptions, a5 as KodaXResult } from './bash-prefix-extractor.d-D57Gt6n8.js';
3
- import { m as RuntimeSurfaceStatus, b as CommandDefinition, e as CommandSource, c as CommandInfo, C as Command$1, I as InteractiveContext, a as CommandCallbacks, g as CurrentConfig, d as CommandInvocationRequest, f as CommandWorkflowInvocationRequest } from './utils.d-DMI-9GTR.js';
4
- import { b9 as KodaXSessionStorage, aZ as KodaXSessionData } from './types.d-DG9B4SMm.js';
1
+ import { h as SessionStorage$1, f as PermissionMode } from './public-api.d-7G4--RZE.js';
2
+ import { Y as KodaXOptions, a6 as KodaXResult } from './bash-prefix-extractor.d-BkIA8Wto.js';
3
+ import { n as RuntimeSurfaceStatus, b as CommandDefinition, e as CommandSource, c as CommandInfo, C as Command$1, I as InteractiveContext, a as CommandCallbacks, g as CurrentConfig, d as CommandInvocationRequest, f as CommandWorkflowInvocationRequest } from './utils.d-BbB5jzi1.js';
4
+ import { be as KodaXSessionStorage, b0 as KodaXSessionData } from './types.d-BtC4yLYO.js';
5
5
 
6
6
  /**
7
7
  * InkREPL - Ink-based REPL Adapter
@@ -29,11 +29,14 @@ declare function resolveLlmTimeoutConfig(timeouts: KodaXLlmTimeoutConfig | undef
29
29
  interface CostRate {
30
30
  readonly inputPer1M: number;
31
31
  readonly outputPer1M: number;
32
+ /** @deprecated Use cacheReadPer1M/cacheWritePer1M when the provider prices them separately. */
32
33
  readonly cachePer1M?: number;
34
+ readonly cacheReadPer1M?: number;
35
+ readonly cacheWritePer1M?: number;
33
36
  }
34
37
  declare const DEFAULT_COST_RATES: Readonly<Record<string, Readonly<Record<string, CostRate>>>>;
35
38
  declare function getCostRate(provider: string, model: string, userOverrides?: Readonly<Record<string, Readonly<Record<string, CostRate>>>>): CostRate | undefined;
36
- declare function calculateCost(rate: CostRate, inputTokens: number, outputTokens: number, cacheTokens?: number): number;
39
+ declare function calculateCost(rate: CostRate, totalInputTokens: number, outputTokens: number, cacheReadTokens?: number, cacheWriteTokens?: number): number;
37
40
 
38
41
  /**
39
42
  * KodaX Cost Tracker - Immutable session cost tracking
@@ -1,4 +1,4 @@
1
- import { aw as Guardrail, cf as RunnerToolCall, f as Agent, I as AgentMessage, ci as RunnerToolResult, cr as Span } from './types.d-DG9B4SMm.js';
1
+ import { aw as Guardrail, ct as RunnerToolCall, f as Agent, I as AgentMessage, cw as RunnerToolResult, cH as Span } from './types.d-BtC4yLYO.js';
2
2
 
3
3
  /**
4
4
  * Guardrail Runtime — FEATURE_085 (v0.7.26).
@@ -1,8 +1,8 @@
1
1
  import { b as McpServersConfig, M as McpConnectMode, a as McpServerConfig, c as McpTransportKind } from './config.d-CJy1WENT.js';
2
- import { K as KodaXBaseProvider } from './base.d-DalIRhbb.js';
3
- import { a as CostTracker } from './cost-tracker.d-CBLk1fiD.js';
4
- import { cf as RunnerToolCall } from './types.d-DG9B4SMm.js';
5
- import { d as ToolGuardrail } from './guardrail.d-Ds7JHxR1.js';
2
+ import { K as KodaXBaseProvider } from './base.d-CYjtB68X.js';
3
+ import { a as CostTracker } from './cost-tracker.d-BeaenODW.js';
4
+ import { ct as RunnerToolCall } from './types.d-BtC4yLYO.js';
5
+ import { d as ToolGuardrail } from './guardrail.d-6ZDbNbHO.js';
6
6
 
7
7
  /**
8
8
  * FEATURE_200 Phase F (v0.7.45) — MCP domain types extracted from types.ts.
@@ -0,0 +1,95 @@
1
+ import { b as McpServersConfig } from './config.d-CJy1WENT.js';
2
+
3
+ type IntegrationDomain = 'mcp' | 'a2a' | 'extensions';
4
+ type IntegrationConfigSource = 'user' | 'legacy-user' | 'default';
5
+ interface McpIntegrationDocument {
6
+ readonly version: 1;
7
+ readonly servers: McpServersConfig;
8
+ }
9
+ interface ExtensionsIntegrationDocument {
10
+ readonly version: 1;
11
+ readonly paths: readonly string[];
12
+ }
13
+ interface IntegrationConfigSnapshot<T extends object> {
14
+ readonly domain: IntegrationDomain;
15
+ readonly source: IntegrationConfigSource;
16
+ readonly path: string;
17
+ readonly revision: string;
18
+ readonly document: T;
19
+ readonly loadedAt: string;
20
+ }
21
+ interface IntegrationConfigDiagnostic {
22
+ readonly code: 'invalid-config' | 'activation-failed' | 'watcher-degraded';
23
+ readonly message: string;
24
+ readonly time: string;
25
+ }
26
+ interface IntegrationConfigStatus {
27
+ readonly domain: IntegrationDomain;
28
+ readonly path: string;
29
+ readonly revision?: string;
30
+ readonly source?: IntegrationConfigSource;
31
+ readonly lastReloadAt?: string;
32
+ readonly diagnostic?: IntegrationConfigDiagnostic;
33
+ readonly watching: boolean;
34
+ }
35
+ interface LegacyIntegrationMigrationDomainPlan {
36
+ readonly action: 'create' | 'none';
37
+ readonly entries: number;
38
+ readonly destination: string;
39
+ readonly reason?: string;
40
+ }
41
+ interface LegacyIntegrationMigrationPlan {
42
+ readonly mcp: LegacyIntegrationMigrationDomainPlan;
43
+ readonly extensions: LegacyIntegrationMigrationDomainPlan;
44
+ readonly warnings: readonly string[];
45
+ }
46
+ interface LegacyIntegrationMigrationResult extends LegacyIntegrationMigrationPlan {
47
+ readonly applied: readonly ('mcp' | 'extensions')[];
48
+ readonly cleanedLegacy: boolean;
49
+ }
50
+ type IntegrationDocumentValidator<T extends object> = (value: unknown) => T;
51
+ type IntegrationConfigListener<T extends object> = (snapshot: IntegrationConfigSnapshot<T>, previous: IntegrationConfigSnapshot<T> | undefined) => Promise<void> | void;
52
+ type IntegrationReloadResult<T extends object> = {
53
+ readonly ok: true;
54
+ readonly snapshot: IntegrationConfigSnapshot<T>;
55
+ } | {
56
+ readonly ok: false;
57
+ readonly error: string;
58
+ };
59
+ declare function parseMcpIntegrationDocument(value: unknown): McpIntegrationDocument;
60
+ declare function parseExtensionsIntegrationDocument(value: unknown): ExtensionsIntegrationDocument;
61
+ declare function resolveIntegrationConfigPath(domain: IntegrationDomain, configHome: string): string;
62
+ declare function readMcpIntegration(configHome: string): IntegrationConfigSnapshot<McpIntegrationDocument>;
63
+ declare function readExtensionsIntegration(configHome: string): IntegrationConfigSnapshot<ExtensionsIntegrationDocument>;
64
+ declare function planLegacyIntegrationMigration(configHome: string): LegacyIntegrationMigrationPlan;
65
+ declare function migrateLegacyIntegrationConfig(input: {
66
+ readonly configHome: string;
67
+ readonly cleanupLegacy?: boolean;
68
+ }): LegacyIntegrationMigrationResult;
69
+ declare function writeIntegrationDocument<T extends object>(input: {
70
+ readonly domain: IntegrationDomain;
71
+ readonly configHome: string;
72
+ readonly document: T;
73
+ readonly validate: IntegrationDocumentValidator<T>;
74
+ readonly expectedRevision?: string;
75
+ }): IntegrationConfigSnapshot<T>;
76
+ declare class IntegrationConfigController<T extends object> {
77
+ #private;
78
+ constructor(options: {
79
+ readonly domain: IntegrationDomain;
80
+ readonly configHome: string;
81
+ readonly validate: IntegrationDocumentValidator<T>;
82
+ readonly read: () => IntegrationConfigSnapshot<T>;
83
+ });
84
+ initialize(): Promise<IntegrationConfigSnapshot<T>>;
85
+ snapshot(): IntegrationConfigSnapshot<T> | undefined;
86
+ status(): IntegrationConfigStatus;
87
+ subscribe(listener: IntegrationConfigListener<T>): () => void;
88
+ reload(): Promise<IntegrationReloadResult<T>>;
89
+ ensureCurrent(): Promise<IntegrationReloadResult<T>>;
90
+ startWatching(debounceMs?: number, fallbackMs?: number): void;
91
+ close(): void;
92
+ }
93
+
94
+ export { IntegrationConfigController as I, parseMcpIntegrationDocument as j, planLegacyIntegrationMigration as k, readMcpIntegration as l, migrateLegacyIntegrationConfig as m, resolveIntegrationConfigPath as n, parseExtensionsIntegrationDocument as p, readExtensionsIntegration as r, writeIntegrationDocument as w };
95
+ export type { ExtensionsIntegrationDocument as E, LegacyIntegrationMigrationDomainPlan as L, McpIntegrationDocument as M, IntegrationConfigDiagnostic as a, IntegrationConfigListener as b, IntegrationConfigSnapshot as c, IntegrationConfigSource as d, IntegrationConfigStatus as e, IntegrationDocumentValidator as f, IntegrationDomain as g, LegacyIntegrationMigrationPlan as h, LegacyIntegrationMigrationResult as i };
@@ -294,6 +294,9 @@ interface McpProviderOptions {
294
294
  */
295
295
  reverse?: McpReverseCapabilities;
296
296
  }
297
+ interface McpPrewarmOptions {
298
+ readonly failOnError?: boolean;
299
+ }
297
300
  declare class McpCapabilityProvider implements CapabilityProvider {
298
301
  readonly id = "mcp";
299
302
  readonly kinds: CapabilityProvider['kinds'];
@@ -329,7 +332,7 @@ declare class McpCapabilityProvider implements CapabilityProvider {
329
332
  * higher-level lifecycle control.
330
333
  */
331
334
  getRuntime(serverId: string): McpServerRuntime | undefined;
332
- prewarm(): Promise<void>;
335
+ prewarm(options?: McpPrewarmOptions): Promise<void>;
333
336
  search(query: string, options?: {
334
337
  kind?: CapabilityKind;
335
338
  limit?: number;
@@ -1,6 +1,6 @@
1
- import { a as BashPrefixExtractor } from './bash-prefix-extractor.d-D57Gt6n8.js';
2
- import { aZ as KodaXSessionData, b2 as KodaXSessionLineage, b5 as KodaXSessionNavigationOptions, b7 as KodaXSessionRuntimeInfo, b9 as KodaXSessionStorage, aT as KodaXJsonValue } from './types.d-DG9B4SMm.js';
3
- import { j as KodaXMessage, R as KodaXTaskResultMetadata } from './types.d-Bp4Lm1jv.js';
1
+ import { a as BashPrefixExtractor } from './bash-prefix-extractor.d-BkIA8Wto.js';
2
+ import { b0 as KodaXSessionData, b5 as KodaXSessionLineage, ba as KodaXSessionNavigationOptions, bc as KodaXSessionRuntimeInfo, be as KodaXSessionStorage, aT as KodaXJsonValue } from './types.d-BtC4yLYO.js';
3
+ import { k as KodaXMessage, S as KodaXTaskResultMetadata } from './types.d-TTvpAGWf.js';
4
4
 
5
5
  /**
6
6
  * Permission Types
@@ -30,10 +30,9 @@ declare const PERMISSION_MODES: PermissionMode[];
30
30
  * display name; the deprecation notice
31
31
  * surfaces once per session at startup)
32
32
  *
33
- * Single source of truth both the readline status-bar
34
- * (`packages/repl/src/interactive/status-bar.ts`) and the Ink view-model
35
- * (`packages/repl/src/ui/view-models/status-bar.ts`) consume this so the two
36
- * surfaces never drift on capitalization or short-form choice.
33
+ * Single source of truth for command output, startup summaries, and the live
34
+ * Ink status-bar view-model. The former write-only readline StatusBar was
35
+ * removed; Classic continues to use the same display helper in text surfaces.
37
36
  */
38
37
  declare function permissionModeDisplayName(mode: PermissionMode): string;
39
38
  interface ConfirmResult {
@@ -1,6 +1,6 @@
1
- import { E as KodaXReasoningMode, L as KodaXStableEffortIntent, a8 as KodaXWireReasoningEffort, F as KodaXReasoningProfile, Y as KodaXThinkingBudgetMap, Z as KodaXThinkingDepth, p as KodaXProviderConfig, A as KodaXReasoningCapability, G as KodaXReasoningRequest, m as KodaXNormalizedReasoningRequest, U as KodaXTaskType, a6 as KodaXVerifyCredentialResult, a0 as KodaXToolDefinition, j as KodaXMessage, x as KodaXProviderStreamOptions, M as KodaXStreamResult, k as KodaXModelDescriptor, o as KodaXProviderCapabilityProfile, a7 as KodaXVerifyStrategy, d as KodaXCustomProviderConfig, i as KodaXListModelsResult } from './types.d-Bp4Lm1jv.js';
1
+ import { F as KodaXReasoningMode, M as KodaXStableEffortIntent, a9 as KodaXWireReasoningEffort, G as KodaXReasoningProfile, Z as KodaXThinkingBudgetMap, _ as KodaXThinkingDepth, q as KodaXProviderConfig, B as KodaXReasoningCapability, H as KodaXReasoningRequest, n as KodaXNormalizedReasoningRequest, V as KodaXTaskType, a7 as KodaXVerifyCredentialResult, a1 as KodaXToolDefinition, k as KodaXMessage, y as KodaXProviderStreamOptions, N as KodaXStreamResult, l as KodaXModelDescriptor, p as KodaXProviderCapabilityProfile, a8 as KodaXVerifyStrategy, d as KodaXCustomProviderConfig, j as KodaXListModelsResult } from './types.d-TTvpAGWf.js';
2
2
  import Anthropic from '@anthropic-ai/sdk';
3
- import { K as KodaXBaseProvider } from './base.d-DalIRhbb.js';
3
+ import { K as KodaXBaseProvider } from './base.d-CYjtB68X.js';
4
4
  import OpenAI from 'openai';
5
5
 
6
6
  /**
@@ -1,4 +1,4 @@
1
- import { di as WorkflowProcessTrackerOptions, cV as WorkflowEvent, dc as WorkflowProcessSnapshot, d6 as WorkflowProcessEvent } from './types.d-DG9B4SMm.js';
1
+ import { dz as WorkflowProcessTrackerOptions, d9 as WorkflowEvent, dt as WorkflowProcessSnapshot, dm as WorkflowProcessEvent } from './types.d-BtC4yLYO.js';
2
2
 
3
3
  /**
4
4
  * FEATURE_246 Part A0 (ADR-046) — neutral workflow run lifecycle manager.
@@ -1,7 +1,7 @@
1
- import { f as PermissionMode } from './public-api.d-CPBMPDiU.js';
2
- import { E as KodaXReasoningMode, j as KodaXMessage, c as KodaXContentBlock } from './types.d-Bp4Lm1jv.js';
3
- import { r as KodaXAgentMode } from './bash-prefix-extractor.d-D57Gt6n8.js';
4
- import { bb as KodaXSessionUiHistoryItem, bf as KodaXSessionUiToolCall } from './types.d-DG9B4SMm.js';
1
+ import { f as PermissionMode } from './public-api.d-7G4--RZE.js';
2
+ import { F as KodaXReasoningMode, k as KodaXMessage, c as KodaXContentBlock } from './types.d-TTvpAGWf.js';
3
+ import { r as KodaXAgentMode } from './bash-prefix-extractor.d-BkIA8Wto.js';
4
+ import { bg as KodaXSessionUiHistoryItem, bk as KodaXSessionUiToolCall } from './types.d-BtC4yLYO.js';
5
5
 
6
6
  /**
7
7
  * TextBuffer - Text buffer management class - 文本缓冲区管理类
@@ -439,6 +439,8 @@ interface StatusBarProps {
439
439
  contextWindow: number;
440
440
  /** Compaction trigger percentage (0-100) */
441
441
  triggerPercent: number;
442
+ /** Provider output capacity reserved from the physical context window. */
443
+ reservedResponseTokens?: number;
442
444
  };
443
445
  /** Whether current busy/thinking status should be visible in the bar */
444
446
  showBusyStatus?: boolean;