@kodax-ai/kodax 0.7.77 → 0.7.79

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 (133) hide show
  1. package/CHANGELOG.md +3651 -3201
  2. package/README.md +317 -110
  3. package/README_CN.md +255 -91
  4. package/config-templates/config.example.jsonc +124 -32
  5. package/config-templates/integrations/a2a.example.jsonc +23 -7
  6. package/dist/builtin/skill-creator/scripts/aggregate-benchmark.js +2 -1
  7. package/dist/builtin/skill-creator/scripts/analyze-benchmark.d.ts +1 -0
  8. package/dist/builtin/skill-creator/scripts/analyze-benchmark.js +4 -3
  9. package/dist/builtin/skill-creator/scripts/compare-runs.d.ts +1 -0
  10. package/dist/builtin/skill-creator/scripts/compare-runs.js +4 -3
  11. package/dist/builtin/skill-creator/scripts/generate-review.js +2 -1
  12. package/dist/builtin/skill-creator/scripts/grade-evals.d.ts +1 -0
  13. package/dist/builtin/skill-creator/scripts/grade-evals.js +4 -3
  14. package/dist/builtin/skill-creator/scripts/improve-description.js +2 -1
  15. package/dist/builtin/skill-creator/scripts/init-skill.d.ts +1 -0
  16. package/dist/builtin/skill-creator/scripts/init-skill.js +4 -3
  17. package/dist/builtin/skill-creator/scripts/install-skill.d.ts +1 -0
  18. package/dist/builtin/skill-creator/scripts/install-skill.js +4 -3
  19. package/dist/builtin/skill-creator/scripts/package-skill.d.ts +1 -0
  20. package/dist/builtin/skill-creator/scripts/package-skill.js +4 -3
  21. package/dist/builtin/skill-creator/scripts/quick-validate.d.ts +1 -0
  22. package/dist/builtin/skill-creator/scripts/quick-validate.js +4 -3
  23. package/dist/builtin/skill-creator/scripts/run-eval.d.ts +1 -0
  24. package/dist/builtin/skill-creator/scripts/run-eval.js +4 -3
  25. package/dist/builtin/skill-creator/scripts/run-loop.js +2 -1
  26. package/dist/builtin/skill-creator/scripts/run-trigger-eval.js +2 -1
  27. package/dist/builtin/skill-creator/scripts/utils.d.ts +3 -0
  28. package/dist/builtin/skill-creator/scripts/utils.js +5 -1
  29. package/dist/chunks/agent-V4AC5JZD.js +2 -0
  30. package/dist/chunks/argument-completer-ZPC2MLES.js +2 -0
  31. package/dist/chunks/chunk-5BNQXXGY.js +1 -0
  32. package/dist/chunks/{chunk-EH7AOMJ7.js → chunk-67THZRM6.js} +1 -1
  33. package/dist/chunks/chunk-6GVQDQTQ.js +292 -0
  34. package/dist/chunks/chunk-B6UY3VHV.js +348 -0
  35. package/dist/chunks/{chunk-HORNWBYR.js → chunk-BBOVVDQJ.js} +1 -1
  36. package/dist/chunks/chunk-CR2IF7VF.js +30 -0
  37. package/dist/chunks/{chunk-FNW2XUL5.js → chunk-CXHEZY5G.js} +1 -1
  38. package/dist/chunks/chunk-EDZ4QILG.js +266 -0
  39. package/dist/chunks/chunk-GEECPO2H.js +218 -0
  40. package/dist/chunks/chunk-H5LLM7DB.js +89 -0
  41. package/dist/chunks/chunk-KLWP7POA.js +467 -0
  42. package/dist/chunks/{chunk-XSA37BVM.js → chunk-M4N2JZTZ.js} +2 -2
  43. package/dist/chunks/chunk-OWQT3FTE.js +5 -0
  44. package/dist/chunks/chunk-Q4M7DJOD.js +319 -0
  45. package/dist/chunks/{chunk-3DD4QEBH.js → chunk-QCZLCLFL.js} +10 -10
  46. package/dist/chunks/chunk-RQPMGRTR.js +810 -0
  47. package/dist/chunks/chunk-SG6P4SZS.js +123 -0
  48. package/dist/chunks/chunk-TSTVAU5E.js +386 -0
  49. package/dist/chunks/chunk-ZCZZUE5E.js +662 -0
  50. package/dist/chunks/compaction-config-AEUGVROL.js +2 -0
  51. package/dist/chunks/{construction-bootstrap-RPRL3L7R.js → construction-bootstrap-K3ZGEN5N.js} +1 -1
  52. package/dist/chunks/dist-GFJFRPAV.js +2 -0
  53. package/dist/chunks/{dist-FDSOIR35.js → dist-JMO47GJV.js} +1 -1
  54. package/dist/chunks/host-23K2Q6RZ.js +2 -0
  55. package/dist/chunks/run-manager-PGIR6ITA.js +2 -0
  56. package/dist/chunks/utils-6LEKJPQN.js +2 -0
  57. package/dist/index.d.ts +22 -21
  58. package/dist/index.js +6 -6
  59. package/dist/kodax_bootstrap.js +2 -1
  60. package/dist/kodax_cli.js +2225 -1468
  61. package/dist/kodax_resume.js +570 -34
  62. package/dist/provider-capabilities.json +85 -50
  63. package/dist/runtime-worker.js +2076 -1343
  64. package/dist/sandbox-workspace-session.js +829 -0
  65. package/dist/sdk-a2a.d.ts +24 -18
  66. package/dist/sdk-a2a.js +8 -8
  67. package/dist/sdk-agent.d.ts +315 -168
  68. package/dist/sdk-agent.js +1 -1
  69. package/dist/sdk-coding.d.ts +42 -205
  70. package/dist/sdk-coding.js +1 -1
  71. package/dist/sdk-experimental-memory.d.ts +3 -3
  72. package/dist/sdk-experimental-memory.js +1 -1
  73. package/dist/sdk-llm.d.ts +7 -6
  74. package/dist/sdk-llm.js +1 -1
  75. package/dist/sdk-mcp.d.ts +1 -1
  76. package/dist/sdk-mcp.js +1 -1
  77. package/dist/sdk-media.d.ts +1 -1
  78. package/dist/sdk-media.js +1 -1
  79. package/dist/sdk-repl.d.ts +77 -36
  80. package/dist/sdk-repl.js +2 -2
  81. package/dist/sdk-runtime.d.ts +406 -163
  82. package/dist/sdk-runtime.js +1 -1
  83. package/dist/sdk-sandbox.d.ts +93 -0
  84. package/dist/sdk-sandbox.js +2 -0
  85. package/dist/sdk-session.d.ts +8 -9
  86. package/dist/sdk-session.js +1 -1
  87. package/dist/sdk-skills.d.ts +2 -2
  88. package/dist/sdk-skills.js +1 -1
  89. package/dist/semantic-worker.js +283 -18
  90. package/dist/types-chunks/{base.d-4e74xDdy.d.ts → base.d-DxG0m09Z.d.ts} +1 -1
  91. package/dist/types-chunks/{bash-prefix-extractor.d-pZdu6qt7.d.ts → bash-prefix-extractor.d-CNSidpmv.d.ts} +149 -10
  92. package/dist/types-chunks/{capability-learning.d-CVsdHw4j.d.ts → capability-learning.d-iPSiAmc_.d.ts} +1 -1
  93. package/dist/types-chunks/{capsule.d-CxCm1KZz.d.ts → capsule.d-B3q98pLQ.d.ts} +9 -7
  94. package/dist/types-chunks/{types.d-RdWRfUEs.d.ts → controller.d-RGV7Pjv9.d.ts} +785 -8
  95. package/dist/types-chunks/{guardrail.d-B0PwAZVR.d.ts → guardrail.d-1NLSFTyN.d.ts} +310 -70
  96. package/dist/types-chunks/{history-retrieval.d-B__aEN62.d.ts → history-retrieval.d-BAegI14A.d.ts} +16 -3
  97. package/dist/types-chunks/{integration-config.d-ojG4swOP.d.ts → integration-config.d-BNowXE8k.d.ts} +23 -8
  98. package/dist/types-chunks/{oauth-login.d-Bgb4rdLN.d.ts → oauth-login.d-6i-vidxv.d.ts} +6 -2
  99. package/dist/types-chunks/{public-api.d--fF88JrC.d.ts → public-api.d-BpJhHoa7.d.ts} +366 -28
  100. package/dist/types-chunks/{commands.d-BccESAMV.d.ts → repl.d-CZ12Ow3X.d.ts} +89 -78
  101. package/dist/types-chunks/{side-query.d-5JvXhuOZ.d.ts → resolver.d-C9IW4fmU.d.ts} +7 -67
  102. package/dist/types-chunks/{run-manager.d-B47hIqnI.d.ts → run-manager.d-CX3AUocA.d.ts} +1 -1
  103. package/dist/types-chunks/{sdk-session-CLWf8Adb.d.ts → sdk-session-B3cfJKqF.d.ts} +3 -3
  104. package/dist/types-chunks/side-query.d-CP1LiRiH.d.ts +83 -0
  105. package/dist/types-chunks/{types-LanCEDj8.d.ts → types-Bf3Y3mW-.d.ts} +42 -3
  106. package/dist/types-chunks/{types.d-CODuyyqy.d.ts → types.d-BZ9oXvTV.d.ts} +2 -2
  107. package/dist/types-chunks/{types.d-DCQVBqVn.d.ts → types.d-BbtGlKZu.d.ts} +25 -3
  108. package/dist/types-chunks/{types.d-DCsKM8aT.d.ts → types.d-C0_rn--1.d.ts} +4 -4
  109. package/dist/types-chunks/{types.d-DIpZJKUl.d.ts → types.d-CgrXrFrq.d.ts} +16 -2
  110. package/dist/types-chunks/{utils.d-CDduqbFw.d.ts → utils.d-CGpHavsU.d.ts} +32 -8
  111. package/docs/SDK_EMBEDDER_GUIDE.md +1117 -227
  112. package/package.json +11 -1
  113. package/dist/chunks/agent-NGSWFE73.js +0 -2
  114. package/dist/chunks/argument-completer-WGGZPEEO.js +0 -2
  115. package/dist/chunks/chunk-27QLRH3D.js +0 -5
  116. package/dist/chunks/chunk-2MQPVY6P.js +0 -770
  117. package/dist/chunks/chunk-6WAPVAGQ.js +0 -74
  118. package/dist/chunks/chunk-AOENDSVN.js +0 -448
  119. package/dist/chunks/chunk-FSXI4MAV.js +0 -78
  120. package/dist/chunks/chunk-HV2GMZUZ.js +0 -343
  121. package/dist/chunks/chunk-IQT4RPCE.js +0 -46
  122. package/dist/chunks/chunk-JS2BHGJP.js +0 -158
  123. package/dist/chunks/chunk-OAMKECRG.js +0 -381
  124. package/dist/chunks/chunk-ON2WG2LG.js +0 -622
  125. package/dist/chunks/chunk-RUGAAHTF.js +0 -321
  126. package/dist/chunks/chunk-TGCG7U2W.js +0 -37
  127. package/dist/chunks/compaction-config-BE7VYWH6.js +0 -2
  128. package/dist/chunks/dist-ZZBNVTKU.js +0 -2
  129. package/dist/chunks/host-QAKQVC4A.js +0 -2
  130. package/dist/chunks/run-manager-N4UFWA2D.js +0 -2
  131. package/dist/chunks/utils-AUHCI4D5.js +0 -2
  132. package/dist/types-chunks/center-types.d-BBT122uJ.d.ts +0 -91
  133. package/dist/types-chunks/guardrail.d-CJx9RRd3.d.ts +0 -156
@@ -1,8 +1,8 @@
1
- import { X as SessionStorage$1, R as PermissionMode, L as LearningBinding } from './public-api.d--fF88JrC.js';
2
- import { a1 as KodaXOptions, ac as KodaXResult } from './bash-prefix-extractor.d-pZdu6qt7.js';
3
- import { n as ResolvedAutoModeSettings, p 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-CDduqbFw.js';
4
- import { bV as KodaXSessionStorage, bH as KodaXSessionData } from './types.d-RdWRfUEs.js';
5
- import { r as AutoModeStats } from './guardrail.d-B0PwAZVR.js';
1
+ import { n as ResolvedAutoModeSettings, 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, p as RuntimeSurfaceStatus } from './utils.d-CGpHavsU.js';
2
+ import { af as SessionStorage$1, T as PermissionMode, L as LearningBinding } from './public-api.d-BpJhHoa7.js';
3
+ import { a1 as KodaXOptions, ad as KodaXResult } from './bash-prefix-extractor.d-CNSidpmv.js';
4
+ import { ca as KodaXSessionStorage, bY as KodaXSessionData } from './controller.d-RGV7Pjv9.js';
5
+ import { s as AutoModeStats } from './guardrail.d-1NLSFTyN.js';
6
6
 
7
7
  interface ReplRuntimePermissionGrantSuggestion {
8
8
  readonly id: string;
@@ -49,77 +49,6 @@ interface ReplRuntimeAutoModeSettings {
49
49
  }
50
50
  declare function toReplRuntimeAutoModeSettings(settings: ResolvedAutoModeSettings): ReplRuntimeAutoModeSettings;
51
51
 
52
- /**
53
- * InkREPL - Ink-based REPL Adapter
54
- *
55
- * Bridges Ink UI components with existing KodaX command processing logic.
56
- * Replaces the Node.js readline-based input with Ink's React components.
57
- *
58
- * Architecture based on Gemini CLI:
59
- * - Uses UIStateContext for global state
60
- * - Uses KeypressContext for priority-based keyboard handling
61
- * - Uses StreamingContext for streaming response management
62
- */
63
-
64
- interface InkRuntimeRunnerInput {
65
- readonly options: KodaXOptions;
66
- readonly prompt: string;
67
- readonly sessionId: string;
68
- readonly permissionMode: PermissionMode;
69
- readonly autoModeSettings?: ReplRuntimeAutoModeSettings;
70
- readonly requestPermission?: ReplRuntimePermissionPrompt;
71
- /** Marks the callback installed by the REPL's legacy permission UI. */
72
- readonly legacyPermissionHook?: true;
73
- }
74
- type InkRuntimeRunner = (input: InkRuntimeRunnerInput) => Promise<KodaXResult>;
75
- type InkRuntimeStatusProvider = () => Promise<RuntimeSurfaceStatus | undefined>;
76
- interface InkREPLOptions extends KodaXOptions {
77
- storage?: SessionStorage$1;
78
- hardExitOnClose?: boolean;
79
- runtimeRunner?: InkRuntimeRunner;
80
- runtimeAutoModeControl?: ReplRuntimeAutoModeControl;
81
- getRuntimeStatus?: InkRuntimeStatusProvider;
82
- learning?: LearningBinding;
83
- }
84
- /**
85
- * Run Ink-based interactive mode
86
- */
87
- declare function runInkInteractiveMode(options: InkREPLOptions): Promise<void>;
88
-
89
- interface SessionStorage extends KodaXSessionStorage {
90
- list(gitRoot?: string, options?: {
91
- limit?: number;
92
- includeArchived?: boolean;
93
- }): Promise<Array<{
94
- id: string;
95
- title: string;
96
- msgCount: number;
97
- tag?: string;
98
- runtimeInfo?: KodaXSessionData['runtimeInfo'];
99
- }>>;
100
- }
101
- interface ReplRuntimeRunnerInput {
102
- readonly options: KodaXOptions;
103
- readonly prompt: string;
104
- readonly sessionId: string;
105
- readonly permissionMode: PermissionMode;
106
- readonly autoModeSettings?: ReplRuntimeAutoModeSettings;
107
- readonly requestPermission?: ReplRuntimePermissionPrompt;
108
- /** Marks the callback installed by the REPL's legacy permission UI. */
109
- readonly legacyPermissionHook?: true;
110
- }
111
- type ReplRuntimeRunner = (input: ReplRuntimeRunnerInput) => Promise<KodaXResult>;
112
- type ReplRuntimeStatusProvider = () => Promise<RuntimeSurfaceStatus | undefined>;
113
- interface RepLOptions extends KodaXOptions {
114
- storage?: SessionStorage;
115
- runtimeRunner?: ReplRuntimeRunner;
116
- runtimeAutoModeControl?: ReplRuntimeAutoModeControl;
117
- getRuntimeStatus?: ReplRuntimeStatusProvider;
118
- learning?: LearningBinding;
119
- }
120
- declare function runInteractiveMode(options: RepLOptions): Promise<void>;
121
- declare function processSpecialSyntax(input: string, executionCwd?: string): Promise<string>;
122
-
123
52
  /**
124
53
  * Command Registry - Dynamic command registration system
125
54
  * 命令注册表 - 动态命令注册系统
@@ -270,5 +199,87 @@ declare function executeCommand(parsed: {
270
199
  };
271
200
  }, context: InteractiveContext, callbacks: CommandCallbacks, currentConfig: CurrentConfig): Promise<CommandResult>;
272
201
 
273
- export { BUILTIN_COMMANDS as B, RUNTIME_PERMISSION_PENDING_NOTICE as R, executeCommand as n, getCommandRegistry as o, parseCommand as p, processSpecialSyntax as q, runInkInteractiveMode as r, runInteractiveMode as s, toReplRuntimeAutoModeSettings as t };
274
- export type { Command as C, InkREPLOptions as I, InkRuntimeRunner as a, InkRuntimeRunnerInput as b, InkRuntimeStatusProvider as c, RepLOptions as d, ReplRuntimeAutoModeControl as e, ReplRuntimeAutoModeSettings as f, ReplRuntimePermissionDecision as g, ReplRuntimePermissionGrantSuggestion as h, ReplRuntimePermissionPrompt as i, ReplRuntimePermissionRequest as j, ReplRuntimeRunner as k, ReplRuntimeRunnerInput as l, ReplRuntimeStatusProvider as m };
202
+ /**
203
+ * InkREPL - Ink-based REPL Adapter
204
+ *
205
+ * Bridges Ink UI components with existing KodaX command processing logic.
206
+ * Replaces the Node.js readline-based input with Ink's React components.
207
+ *
208
+ * Architecture based on Gemini CLI:
209
+ * - Uses UIStateContext for global state
210
+ * - Uses KeypressContext for priority-based keyboard handling
211
+ * - Uses StreamingContext for streaming response management
212
+ */
213
+
214
+ interface InkRuntimeRunnerInput {
215
+ readonly options: KodaXOptions;
216
+ readonly prompt: string;
217
+ readonly sessionId: string;
218
+ readonly permissionMode: PermissionMode;
219
+ readonly autoModeSettings?: ReplRuntimeAutoModeSettings;
220
+ readonly requestPermission?: ReplRuntimePermissionPrompt;
221
+ /** Marks the callback installed by the REPL's legacy permission UI. */
222
+ readonly legacyPermissionHook?: true;
223
+ }
224
+ type InkRuntimeRunner = (input: InkRuntimeRunnerInput) => Promise<KodaXResult>;
225
+ type InkRuntimeStatusProvider = () => Promise<RuntimeSurfaceStatus | undefined>;
226
+ interface InkTransientNotice {
227
+ readonly text: string;
228
+ readonly tone: "success" | "warning";
229
+ }
230
+ interface InkREPLOptions extends KodaXOptions {
231
+ storage?: SessionStorage$1;
232
+ hardExitOnClose?: boolean;
233
+ runtimeRunner?: InkRuntimeRunner;
234
+ runtimeAutoModeControl?: ReplRuntimeAutoModeControl;
235
+ getRuntimeStatus?: InkRuntimeStatusProvider;
236
+ validateSetupA2AConfig?: (value: unknown) => unknown;
237
+ prepareSetupSandbox?: CommandCallbacks['prepareSetupSandbox'];
238
+ inspectSandbox?: CommandCallbacks['inspectSandbox'];
239
+ learning?: LearningBinding;
240
+ subscribeTransientNotices?: (listener: (notice: InkTransientNotice) => void) => () => void;
241
+ }
242
+ /**
243
+ * Run Ink-based interactive mode
244
+ */
245
+ declare function runInkInteractiveMode(options: InkREPLOptions): Promise<void>;
246
+
247
+ interface SessionStorage extends KodaXSessionStorage {
248
+ list(gitRoot?: string, options?: {
249
+ limit?: number;
250
+ includeArchived?: boolean;
251
+ }): Promise<Array<{
252
+ id: string;
253
+ title: string;
254
+ msgCount: number;
255
+ tag?: string;
256
+ runtimeInfo?: KodaXSessionData['runtimeInfo'];
257
+ }>>;
258
+ }
259
+ interface ReplRuntimeRunnerInput {
260
+ readonly options: KodaXOptions;
261
+ readonly prompt: string;
262
+ readonly sessionId: string;
263
+ readonly permissionMode: PermissionMode;
264
+ readonly autoModeSettings?: ReplRuntimeAutoModeSettings;
265
+ readonly requestPermission?: ReplRuntimePermissionPrompt;
266
+ /** Marks the callback installed by the REPL's legacy permission UI. */
267
+ readonly legacyPermissionHook?: true;
268
+ }
269
+ type ReplRuntimeRunner = (input: ReplRuntimeRunnerInput) => Promise<KodaXResult>;
270
+ type ReplRuntimeStatusProvider = () => Promise<RuntimeSurfaceStatus | undefined>;
271
+ interface RepLOptions extends KodaXOptions {
272
+ storage?: SessionStorage;
273
+ runtimeRunner?: ReplRuntimeRunner;
274
+ runtimeAutoModeControl?: ReplRuntimeAutoModeControl;
275
+ getRuntimeStatus?: ReplRuntimeStatusProvider;
276
+ validateSetupA2AConfig?: (value: unknown) => unknown;
277
+ prepareSetupSandbox?: CommandCallbacks['prepareSetupSandbox'];
278
+ inspectSandbox?: CommandCallbacks['inspectSandbox'];
279
+ learning?: LearningBinding;
280
+ }
281
+ declare function runInteractiveMode(options: RepLOptions): Promise<void>;
282
+ declare function processSpecialSyntax(input: string, executionCwd?: string): Promise<string>;
283
+
284
+ export { BUILTIN_COMMANDS as B, RUNTIME_PERMISSION_PENDING_NOTICE as R, executeCommand as o, getCommandRegistry as p, parseCommand as q, processSpecialSyntax as r, runInkInteractiveMode as s, runInteractiveMode as t, toReplRuntimeAutoModeSettings as u };
285
+ export type { Command as C, InkREPLOptions as I, InkRuntimeRunner as a, InkRuntimeRunnerInput as b, InkRuntimeStatusProvider as c, InkTransientNotice as d, RepLOptions as e, ReplRuntimeAutoModeControl as f, ReplRuntimeAutoModeSettings as g, ReplRuntimePermissionDecision as h, ReplRuntimePermissionGrantSuggestion as i, ReplRuntimePermissionPrompt as j, ReplRuntimePermissionRequest as k, ReplRuntimeRunner as l, ReplRuntimeRunnerInput as m, ReplRuntimeStatusProvider as n };
@@ -1,8 +1,7 @@
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, a0 as KodaXTokenUsage } from './types.d-DIpZJKUl.js';
1
+ import { G as KodaXReasoningMode, N as KodaXStableEffortIntent, aa as KodaXWireReasoningEffort, H as KodaXReasoningProfile, _ as KodaXThinkingBudgetMap, $ as KodaXThinkingDepth, r as KodaXProviderConfig, C as KodaXReasoningCapability, I as KodaXReasoningRequest, n as KodaXNormalizedReasoningRequest, W as KodaXTaskType, a8 as KodaXVerifyCredentialResult, a2 as KodaXToolDefinition, k as KodaXMessage, z as KodaXProviderStreamOptions, O as KodaXStreamResult, l as KodaXModelDescriptor, q as KodaXProviderCapabilityProfile, o as KodaXOpenAICompatMaxOutputTokensField, a9 as KodaXVerifyStrategy, d as KodaXCustomProviderConfig, j as KodaXListModelsResult } from './types.d-CgrXrFrq.js';
2
2
  import Anthropic from '@anthropic-ai/sdk';
3
- import { K as KodaXBaseProvider } from './base.d-4e74xDdy.js';
3
+ import { K as KodaXBaseProvider } from './base.d-DxG0m09Z.js';
4
4
  import OpenAI from 'openai';
5
- import { a as CostTracker } from './cost-tracker.d-BeaenODW.js';
6
5
 
7
6
  /**
8
7
  * KodaX AI Errors
@@ -283,6 +282,7 @@ declare abstract class KodaXOpenAICompatProvider extends KodaXBaseProvider {
283
282
  protected get client(): OpenAI;
284
283
  protected set client(client: OpenAI);
285
284
  protected buildClient(): OpenAI;
285
+ private getEffectiveMaxOutputTokensField;
286
286
  protected onStaleConnection(): void;
287
287
  /**
288
288
  * FEATURE_216 v0.7.45 — Lightweight credential verification.
@@ -390,6 +390,8 @@ type ProviderSnapshot = {
390
390
  readonly contextWindow?: number;
391
391
  /** Per-turn output token cap KodaX requests. Provider-level default. */
392
392
  readonly maxOutputTokens?: number;
393
+ /** OpenAI Chat Completions field used for the output-token cap. */
394
+ readonly maxOutputTokensField?: KodaXOpenAICompatMaxOutputTokensField;
393
395
  /** Upper bound on `thinking_budget` for native-budget reasoning providers. */
394
396
  readonly thinkingBudgetCap?: number;
395
397
  /** Whether the provider supports `thinking_budget` / native reasoning. */
@@ -661,67 +663,5 @@ declare function listProviderModels(name: string, _opts?: {
661
663
  signal?: AbortSignal;
662
664
  }): Promise<KodaXListModelsResult>;
663
665
 
664
- /**
665
- * sideQuery — independent one-shot LLM invocation.
666
- *
667
- * Used by features that need a clean LLM call outside the main agent loop.
668
- * The auto mode classifier (FEATURE_092) is the first consumer; future
669
- * users include compaction, title generation, and SA mutation reflection.
670
- *
671
- * Constraints (deliberate):
672
- * - tools=[] hardcoded — sideQuery is single-turn, no tool loop
673
- * - text-only output — tool_use blocks from the model produce stopReason='error'
674
- * - independent timeout (default 30s; callers may supply a bounded deadline)
675
- * - independent cost bucket via querySource (mapped to TokenUsageRecord.role)
676
- *
677
- * Failure handling: never throws. Timeout, abort, provider error, and
678
- * unexpected tool_use all produce a result with stopReason='timeout' /
679
- * 'aborted' / 'error' so callers implement their own degradation.
680
- */
681
-
682
- type SideQueryStopReason = 'end_turn' | 'max_tokens' | 'timeout' | 'aborted' | 'error';
683
- interface SideQueryRequest {
684
- readonly provider: KodaXBaseProvider;
685
- readonly model: string;
686
- readonly system: string;
687
- readonly messages: readonly KodaXMessage[];
688
- readonly reasoning?: KodaXReasoningRequest;
689
- /** Optional per-request cap for small structured sidecar responses. */
690
- readonly maxOutputTokens?: number;
691
- readonly timeoutMs?: number;
692
- readonly abortSignal?: AbortSignal;
693
- readonly querySource: string;
694
- readonly costTracker?: CostTracker;
695
- }
696
- interface SideQueryResult {
697
- readonly text: string;
698
- readonly usage: KodaXTokenUsage;
699
- readonly costTracker?: CostTracker;
700
- readonly stopReason: SideQueryStopReason;
701
- /**
702
- * Bounded request metadata only; prompts and response text are never copied.
703
- * The built-in `sideQuery()` always supplies it. Optionality preserves source
704
- * compatibility for existing SDK mocks and structural result adapters.
705
- */
706
- readonly diagnostics?: SideQueryDiagnostics;
707
- readonly error?: Error;
708
- }
709
- type SideQueryTerminalPhase = 'completed' | 'pre_output' | 'streaming' | 'contract_error';
710
- interface SideQueryDiagnostics {
711
- readonly provider: string;
712
- readonly model: string;
713
- readonly timeoutMs: number;
714
- readonly elapsedMs: number;
715
- readonly retryCount: number;
716
- readonly retryWaitMs: number;
717
- /** Time until the first non-empty text delta, when the adapter exposes it. */
718
- readonly firstOutputMs?: number;
719
- /** Time from the first observed text delta until termination. */
720
- readonly streamMs?: number;
721
- /** Honest coarse phase; provider adapters cannot split DNS/connect/remote queue. */
722
- readonly terminalPhase: SideQueryTerminalPhase;
723
- }
724
- declare function sideQuery(req: SideQueryRequest): Promise<SideQueryResult>;
725
-
726
- export { isRuntimeModelProviderName as $, getCustomProviderList as A, getCustomProviderModelDescriptors as B, getCustomProviderModels as C, getCustomProviderNames as D, getDefaultThinkingDepthForMode as E, getModelCapabilities as F, getProvider as G, getProviderConfiguredCapabilityProfile as H, getProviderConfiguredReasoningCapability as I, getProviderCredentialEnvironmentNames as J, KODAX_DEFAULT_PROVIDER as K, getProviderList as L, getProviderModel as M, getProviderModelDescriptors as N, getProviderModels as O, getReasoningCapability as Q, getRuntimeModelProvider as T, getRuntimeModelProviderCredentialEnvironmentNames as U, getRuntimeModelProviderNames as V, isCustomProviderName as W, isKnownProvider as X, isProviderConfigured as Y, isProviderName as Z, isReasoningEnabled as _, KODAX_DEFAULT_THINKING_BUDGETS as a, listAllModelCapabilities as a0, listBuiltinModelCapabilities as a1, listCustomProviderModelCapabilities as a2, listProviderModels as a3, mapDepthToOpenAIReasoningEffort as a4, mapLegacyReasoningModeToEffortIntent as a5, normalizeReasoningEffortValue as a6, normalizeReasoningRequest as a7, parseReasoningEffortEnv as a8, registerCustomProviders as a9, registerModelProvider as aa, resolveModelCapabilities as ab, resolveProvider as ac, resolveProviderModelDescriptors as ad, resolveReasoningEffort as ae, resolveReasoningEffortForModelSwitch as af, resolveThinkingBudget as ag, resolveWireEffort as ah, sideQuery as ai, validateCustomProviderConfig as aj, verifyProviderCredential as ak, KODAX_PROVIDERS as b, KODAX_PROVIDER_SNAPSHOTS as c, KODAX_REASONING_MODE_SEQUENCE as d, KODAX_REASONING_SAFETY_RESERVE as e, KODAX_STABLE_EFFORT_INTENTS as f, KodaXAnthropicCompatProvider as g, KodaXError as h, KodaXNetworkError as j, KodaXOpenAICompatProvider as k, KodaXProviderError as l, KodaXRateLimitError as m, KodaXToolCallIdError as n, clampThinkingBudget as t, clearRuntimeModelProviders as u, createCustomProvider as v, effortToLegacyReasoningMode as w, getAvailableProviderNames as x, getCustomModelCapabilities as y, getCustomProvider as z };
727
- export type { ProviderName as P, ResolveWireEffortInput as R, SideQueryDiagnostics as S, KodaXModelCapabilities as i, ResolvedWireEffort as o, SideQueryRequest as p, SideQueryResult as q, SideQueryStopReason as r, SideQueryTerminalPhase as s };
666
+ export { mapDepthToOpenAIReasoningEffort as $, getDefaultThinkingDepthForMode as A, getModelCapabilities as B, getProvider as C, getProviderConfiguredCapabilityProfile as D, getProviderConfiguredReasoningCapability as E, getProviderCredentialEnvironmentNames as F, getProviderList as G, getProviderModel as H, getProviderModelDescriptors as I, getProviderModels as J, KODAX_DEFAULT_PROVIDER as K, getReasoningCapability as L, getRuntimeModelProvider as M, getRuntimeModelProviderCredentialEnvironmentNames as N, getRuntimeModelProviderNames as O, isCustomProviderName as Q, isKnownProvider as S, isProviderConfigured as T, isProviderName as U, isReasoningEnabled as V, isRuntimeModelProviderName as W, listAllModelCapabilities as X, listBuiltinModelCapabilities as Y, listCustomProviderModelCapabilities as Z, listProviderModels as _, KODAX_DEFAULT_THINKING_BUDGETS as a, mapLegacyReasoningModeToEffortIntent as a0, normalizeReasoningEffortValue as a1, normalizeReasoningRequest as a2, parseReasoningEffortEnv as a3, registerCustomProviders as a4, registerModelProvider as a5, resolveModelCapabilities as a6, resolveProvider as a7, resolveProviderModelDescriptors as a8, resolveReasoningEffort as a9, resolveReasoningEffortForModelSwitch as aa, resolveThinkingBudget as ab, resolveWireEffort as ac, validateCustomProviderConfig as ad, verifyProviderCredential as ae, KODAX_PROVIDERS as b, KODAX_PROVIDER_SNAPSHOTS as c, KODAX_REASONING_MODE_SEQUENCE as d, KODAX_REASONING_SAFETY_RESERVE as e, KODAX_STABLE_EFFORT_INTENTS as f, KodaXAnthropicCompatProvider as g, KodaXError as h, KodaXNetworkError as j, KodaXOpenAICompatProvider as k, KodaXProviderError as l, KodaXRateLimitError as m, KodaXToolCallIdError as n, clampThinkingBudget as p, clearRuntimeModelProviders as q, createCustomProvider as r, effortToLegacyReasoningMode as s, getAvailableProviderNames as t, getCustomModelCapabilities as u, getCustomProvider as v, getCustomProviderList as w, getCustomProviderModelDescriptors as x, getCustomProviderModels as y, getCustomProviderNames as z };
667
+ export type { ProviderName as P, ResolveWireEffortInput as R, KodaXModelCapabilities as i, ResolvedWireEffort as o };
@@ -1,4 +1,4 @@
1
- import { eg as WorkflowProcessTrackerOptions, dO as WorkflowEvent, ea as WorkflowProcessSnapshot, e4 as WorkflowProcessEvent } from './types.d-RdWRfUEs.js';
1
+ import { fg as WorkflowProcessTrackerOptions, eO as WorkflowEvent, fa as WorkflowProcessSnapshot, f4 as WorkflowProcessEvent } from './controller.d-RGV7Pjv9.js';
2
2
 
3
3
  /**
4
4
  * FEATURE_246 Part A0 (ADR-046) — neutral workflow run lifecycle manager.
@@ -1,6 +1,6 @@
1
- import { g as CreatableHistoryItem, a8 as ToolCall } from './public-api.d--fF88JrC.js';
2
- import { k as KodaXMessage, c as KodaXContentBlock } from './types.d-DIpZJKUl.js';
3
- import { bX as KodaXSessionUiHistoryItem, b$ as KodaXSessionUiToolCall } from './types.d-RdWRfUEs.js';
1
+ import { h as CreatableHistoryItem, as as ToolCall } from './public-api.d-BpJhHoa7.js';
2
+ import { k as KodaXMessage, c as KodaXContentBlock } from './types.d-CgrXrFrq.js';
3
+ import { cc as KodaXSessionUiHistoryItem, cg as KodaXSessionUiToolCall } from './controller.d-RGV7Pjv9.js';
4
4
 
5
5
  interface RestoreHistoryItemsFromSessionInput {
6
6
  messages: readonly KodaXMessage[];
@@ -0,0 +1,83 @@
1
+ import { k as KodaXMessage, I as KodaXReasoningRequest, a1 as KodaXTokenUsage } from './types.d-CgrXrFrq.js';
2
+ import { K as KodaXBaseProvider } from './base.d-DxG0m09Z.js';
3
+ import { a as CostTracker } from './cost-tracker.d-BeaenODW.js';
4
+
5
+ /**
6
+ * sideQuery — independent one-shot LLM invocation.
7
+ *
8
+ * Used by features that need a clean LLM call outside the main agent loop.
9
+ * The auto mode classifier (FEATURE_092) is the first consumer; future
10
+ * users include compaction, title generation, and SA mutation reflection.
11
+ *
12
+ * Constraints (deliberate):
13
+ * - tools=[] hardcoded — sideQuery is single-turn, no tool loop
14
+ * - text-only output — tool_use blocks from the model produce stopReason='error'
15
+ * - independent timeout (default 30s; callers may supply a bounded deadline)
16
+ * - independent cost bucket via querySource (mapped to TokenUsageRecord.role)
17
+ *
18
+ * Failure handling: never throws. Timeout, abort, provider error, and
19
+ * unexpected tool_use all produce a result with stopReason='timeout' /
20
+ * 'aborted' / 'error' so callers implement their own degradation.
21
+ */
22
+
23
+ type SideQueryStopReason = 'end_turn' | 'max_tokens' | 'timeout' | 'aborted' | 'error';
24
+ interface SideQueryRequest {
25
+ readonly provider: KodaXBaseProvider;
26
+ readonly model: string;
27
+ readonly system: string;
28
+ readonly messages: readonly KodaXMessage[];
29
+ readonly reasoning?: KodaXReasoningRequest;
30
+ /** Optional per-request cap for small structured sidecar responses. */
31
+ readonly maxOutputTokens?: number;
32
+ readonly timeoutMs?: number;
33
+ readonly abortSignal?: AbortSignal;
34
+ readonly querySource: string;
35
+ readonly costTracker?: CostTracker;
36
+ }
37
+ interface SideQueryResult {
38
+ readonly text: string;
39
+ readonly usage: KodaXTokenUsage;
40
+ readonly costTracker?: CostTracker;
41
+ readonly stopReason: SideQueryStopReason;
42
+ /**
43
+ * Bounded request metadata only; prompts and response text are never copied.
44
+ * The built-in `sideQuery()` always supplies it. Optionality preserves source
45
+ * compatibility for existing SDK mocks and structural result adapters.
46
+ */
47
+ readonly diagnostics?: SideQueryDiagnostics;
48
+ readonly error?: Error;
49
+ }
50
+ type SideQueryTerminalPhase = 'completed' | 'pre_output' | 'awaiting_text' | 'thinking' | 'streaming' | 'contract_error';
51
+ interface SideQueryDiagnostics {
52
+ readonly provider: string;
53
+ readonly model: string;
54
+ readonly timeoutMs: number;
55
+ readonly elapsedMs: number;
56
+ readonly systemBytes: number;
57
+ readonly messageBytes: number;
58
+ readonly promptBytes: number;
59
+ readonly retryCount: number;
60
+ readonly retryWaitMs: number;
61
+ /** Provider completion mapped to the stable side-query stop taxonomy. */
62
+ readonly stopReason?: SideQueryStopReason;
63
+ /** UTF-8 size of returned text only; response content is never persisted. */
64
+ readonly responseBytes?: number;
65
+ /** Number of provider text blocks concatenated into the returned text. */
66
+ readonly textBlockCount?: number;
67
+ /** Time until the first lifecycle/data event exposed by the provider adapter. */
68
+ readonly firstUpstreamEventMs?: number;
69
+ /** Time until the first non-empty thinking delta. */
70
+ readonly firstThinkingDeltaMs?: number;
71
+ /** Time until the first non-empty text delta. */
72
+ readonly firstTextDeltaMs?: number;
73
+ /** Time until the first non-empty text delta, when the adapter exposes it. */
74
+ readonly firstOutputMs?: number;
75
+ /** Time from the first observed text delta until termination. */
76
+ readonly streamMs?: number;
77
+ /** Honest coarse phase; provider adapters cannot split DNS/connect/remote queue. */
78
+ readonly terminalPhase: SideQueryTerminalPhase;
79
+ }
80
+ declare function sideQuery(req: SideQueryRequest): Promise<SideQueryResult>;
81
+
82
+ export { sideQuery as s };
83
+ export type { SideQueryDiagnostics as S, SideQueryRequest as a, SideQueryResult as b, SideQueryStopReason as c, SideQueryTerminalPhase as d };
@@ -1,4 +1,4 @@
1
- import { k as KodaXMessage } from './types.d-DIpZJKUl.js';
1
+ import { k as KodaXMessage } from './types.d-CgrXrFrq.js';
2
2
 
3
3
  /**
4
4
  * @kodax-ai/agent Types
@@ -86,26 +86,47 @@ interface KodaXSessionClientNoticeEntry extends KodaXSessionEntryBase {
86
86
  interface KodaXMemoryOutcomeDigest {
87
87
  readonly id: string;
88
88
  readonly reviewKey: string;
89
+ /** Stable root-episode identity; absent on pre-F263 digests. */
90
+ readonly episodeId?: string;
89
91
  readonly sessionId: string;
90
92
  readonly branchId: string;
91
93
  readonly sequence: number;
92
94
  readonly objective: string;
93
95
  readonly actionSignature?: string;
94
96
  readonly approach: string;
95
- readonly outcome: 'succeeded' | 'failed';
97
+ /**
98
+ * `cancelled` is reserved for a host-bound explicit Memory intent. Ordinary
99
+ * cancelled episodes do not produce an outcome digest.
100
+ */
101
+ readonly outcome: 'succeeded' | 'failed' | 'cancelled';
96
102
  readonly summary: string;
97
103
  readonly preconditions?: string;
98
104
  readonly lesson?: string;
99
105
  readonly evidenceRefs: readonly string[];
100
106
  readonly evidence?: readonly KodaXMemoryOutcomeEvidence[];
107
+ /**
108
+ * Explicit durable intent captured from the Action LLM and bound by the
109
+ * host to an exact quote in the current user turn. It is evidence for the
110
+ * governed reviewer, never proof that Memory was queued or applied.
111
+ */
112
+ readonly memoryIntent?: KodaXMemoryIntent;
101
113
  readonly memoryInfluence?: readonly KodaXMemoryInfluenceRef[];
102
114
  readonly visibility: 'prompt_safe' | 'private' | 'sensitive';
103
115
  readonly createdAt: string;
104
116
  }
117
+ interface KodaXMemoryIntent {
118
+ readonly operation: 'remember' | 'correct';
119
+ readonly evidenceRef: string;
120
+ /** Sanitized model-derived claim proposed for governed review. */
121
+ readonly candidateStatement: string;
122
+ /** Sanitized representation of the exact current-user quote verified by the host. */
123
+ readonly userQuote: string;
124
+ }
105
125
  interface KodaXMemoryOutcomeEvidence {
106
126
  readonly ref: string;
107
127
  readonly grade: 'authoritative' | 'verified' | 'corroborated' | 'observed' | 'inferred';
108
128
  readonly source: 'user' | 'host' | 'tool' | 'environment' | 'agent';
129
+ readonly verdict?: 'passed' | 'failed' | 'inconclusive';
109
130
  readonly observedAt: string;
110
131
  }
111
132
  interface KodaXMemoryInfluenceRef {
@@ -115,9 +136,13 @@ interface KodaXMemoryInfluenceRef {
115
136
  interface KodaXSessionMemoryOutcomeDigestEntry extends KodaXSessionEntryBase {
116
137
  readonly type: 'memory_outcome_digest';
117
138
  readonly digest: KodaXMemoryOutcomeDigest;
139
+ /** Durable F263 review job identity. Absent on pre-F263 lineage records. */
140
+ readonly jobId?: string;
118
141
  }
119
142
  interface KodaXSessionMemoryReviewReceiptEntry extends KodaXSessionEntryBase {
120
143
  readonly type: 'memory_review_receipt';
144
+ /** Distinguishes repeated review keys across branch epochs. */
145
+ readonly jobId?: string;
121
146
  readonly reviewKey: string;
122
147
  readonly proposalIds: readonly string[];
123
148
  readonly status: 'completed' | 'no_action';
@@ -196,6 +221,8 @@ interface KodaXSessionLineage {
196
221
  }
197
222
 
198
223
  interface MemoryContextIdentity {
224
+ /** Explicit owner home for durable runtime state; never persisted in review envelopes. */
225
+ readonly configHome?: string;
199
226
  readonly tenantId: string;
200
227
  readonly workspaceId?: string;
201
228
  readonly userId?: string;
@@ -452,7 +479,15 @@ interface MemoryController {
452
479
  maybeRunAutoCurator(input?: MemoryAutoCuratorInput): Promise<MemoryAutoCuratorResult>;
453
480
  buildMemoryPack(input: MemoryPackInput): Promise<MemoryPack>;
454
481
  reviewMemoryFeedback(input: MemoryReviewInput): Promise<MemoryReviewPlan>;
482
+ prepareEpisodeReview?(digest: KodaXMemoryOutcomeDigest): Promise<MemoryReviewModelInput>;
483
+ applyReviewedEpisode?(plan: MemoryReviewPlan, digest: KodaXMemoryOutcomeDigest, signal?: AbortSignal, revalidateAuthority?: () => Promise<void>): Promise<MemoryEpisodeReviewResult>;
455
484
  persistReviewPlan(plan: MemoryReviewPlan): Promise<readonly string[]>;
485
+ /**
486
+ * Resolves which episode-review proposals were actually auto-applied by the
487
+ * governed host policy. Used to keep durable receipts complete while user
488
+ * notices remain truthful.
489
+ */
490
+ listHostAppliedEpisodeProposalIds?(proposalIds: readonly string[]): Promise<readonly string[]>;
456
491
  reviewEpisode(digest: KodaXMemoryOutcomeDigest, signal?: AbortSignal): Promise<MemoryEpisodeReviewResult>;
457
492
  archiveRef(id: string): Promise<MemoryLifecycleOperationResult>;
458
493
  forgetRef(id: string): Promise<MemoryLifecycleOperationResult>;
@@ -484,6 +519,7 @@ interface MemoryEvidenceRef {
484
519
  readonly ref: string;
485
520
  readonly requestedGrade: MemoryEvidenceGrade;
486
521
  readonly source: 'user' | 'host' | 'tool' | 'environment' | 'agent';
522
+ readonly verdict?: 'passed' | 'failed' | 'inconclusive';
487
523
  readonly observedAt: string;
488
524
  }
489
525
  type MemorySourcePolicy = (evidence: MemoryEvidenceRef) => MemoryEvidenceGrade;
@@ -575,7 +611,7 @@ type MemoryAgentTraceEvent = {
575
611
  /** @deprecated Retained for source compatibility; F275 no longer emits prefetch events. */
576
612
  | 'recall.prefetch.failed'
577
613
  /** @deprecated Retained for source compatibility; F275 no longer emits prefetch events. */
578
- | 'recall.prefetch.discarded' | 'query.failed' | 'review.timed_out';
614
+ | 'recall.prefetch.discarded' | 'query.failed' | 'review.failed' | 'review.timed_out';
579
615
  readonly key: string;
580
616
  readonly detail?: string;
581
617
  } | {
@@ -585,11 +621,14 @@ type MemoryAgentTraceEvent = {
585
621
  interface MemorySessionInput {
586
622
  readonly identity: MemoryContextIdentity;
587
623
  readonly objective: string;
624
+ /** Stable caller-owned identity for this root episode. */
625
+ readonly episodeId?: string;
588
626
  }
589
627
  interface MemoryEpisodeOutcome {
590
628
  readonly status: 'succeeded' | 'failed' | 'cancelled';
591
629
  readonly summary: string;
592
630
  readonly evidence: readonly MemoryEvidenceRef[];
631
+ readonly memoryIntent?: KodaXMemoryIntent;
593
632
  }
594
633
  type PersistedOutcomeDigest = KodaXMemoryOutcomeDigest;
595
634
  interface MemorySession {
@@ -1,5 +1,5 @@
1
- import { bw as KodaXInputArtifact } from './types.d-RdWRfUEs.js';
2
- import { S as KodaXTaskResultMetadata } from './types.d-DIpZJKUl.js';
1
+ import { bM as KodaXInputArtifact } from './controller.d-RGV7Pjv9.js';
2
+ import { T as KodaXTaskResultMetadata } from './types.d-CgrXrFrq.js';
3
3
 
4
4
  /**
5
5
  * @kodax-ai/agent/messaging — Message queue types
@@ -56,6 +56,11 @@ interface SkillMetadata {
56
56
  argumentHint?: string;
57
57
  path: string;
58
58
  source: ResolvedSkillSource;
59
+ readonly learned?: {
60
+ readonly capabilityId: string;
61
+ readonly revision: number;
62
+ readonly fingerprint: string;
63
+ };
59
64
  /** If true, exclude from system prompt; still invokable by explicit slash forms. */
60
65
  disableModelInvocation: boolean;
61
66
  }
@@ -204,7 +209,22 @@ interface SkillPathsConfig {
204
209
  userPaths: string[];
205
210
  pluginPaths: string[];
206
211
  builtinPath: string;
212
+ /**
213
+ * Deprecated loose-file path. It remains in the public shape for source
214
+ * compatibility but is intentionally not discovered without a manifest.
215
+ */
207
216
  learnedPath?: string;
217
+ learnedArea?: LearnedSkillDiscoveryConfig;
218
+ }
219
+ interface LearnedSkillDiscoveryConfig {
220
+ readonly rootDir: string;
221
+ readonly expectedScope: {
222
+ readonly configHomeHash: string;
223
+ readonly tenantHash: string;
224
+ readonly projectHash: string;
225
+ };
226
+ readonly testingBindings?: Readonly<Record<string, string>>;
227
+ readonly now?: string;
208
228
  }
209
229
  /**
210
230
  * Get default skill discovery paths
@@ -215,13 +235,15 @@ interface SkillPathsConfig {
215
235
  * 3. User - ~/.agents/skills/ (AgentSkills standard)
216
236
  * 4. Plugin - (dynamic)
217
237
  * 5. Builtin - packages/skills/src/builtin/
218
- * 6. Learned - ~/.kodax/learned/skills/ (never shadows a formal source)
238
+ * Learned Skills are supplied separately through a record-gated Learned Area
239
+ * and never through a loose directory.
219
240
  */
220
241
  declare function getDefaultSkillPaths(projectRoot?: string): SkillPathsConfig;
221
242
  /**
222
243
  * All skill paths in priority order (highest to lowest)
223
244
  *
224
- * Priority: Project > User > Plugin > Builtin > Learned
245
+ * Priority: Project > User > Plugin > Builtin. Record-gated Learned Skills
246
+ * are appended by discovery after these formal sources.
225
247
  * - Project: Project-specific skills override everything else
226
248
  * - User: User preferences (~/.kodax/ and ~/.agents/)
227
249
  * - Plugin: Third-party plugins
@@ -234,4 +256,4 @@ declare function getSkillPathsFlat(config: SkillPathsConfig): Array<{
234
256
  }>;
235
257
 
236
258
  export { getDefaultSkillPaths as m, getSkillPathsFlat as n };
237
- export type { ISkillRegistry as I, ResolvedSkillSource as R, Skill as S, IVariableResolver as a, SkillArtifact as b, SkillContext as c, SkillDynamicContextExecutor as d, SkillFile as e, SkillFrontmatter as f, SkillHook as g, SkillHooks as h, SkillMetadata as i, SkillPathsConfig as j, SkillResult as k, SkillSource as l };
259
+ export type { ISkillRegistry as I, LearnedSkillDiscoveryConfig as L, ResolvedSkillSource as R, Skill as S, IVariableResolver as a, SkillArtifact as b, SkillContext as c, SkillDynamicContextExecutor as d, SkillFile as e, SkillFrontmatter as f, SkillHook as g, SkillHooks as h, SkillMetadata as i, SkillPathsConfig as j, SkillResult as k, SkillSource as l };
@@ -1,8 +1,8 @@
1
- import { a9 as KodaXWireReasoningEffort, a1 as KodaXToolDefinition, a3 as KodaXToolResultContentItem, k as KodaXMessage } from './types.d-DIpZJKUl.js';
2
- import { K as KodaXBaseProvider } from './base.d-4e74xDdy.js';
1
+ import { aa as KodaXWireReasoningEffort, a2 as KodaXToolDefinition, a4 as KodaXToolResultContentItem, k as KodaXMessage } from './types.d-CgrXrFrq.js';
2
+ import { K as KodaXBaseProvider } from './base.d-DxG0m09Z.js';
3
3
  import { C as CapabilityKind, a as CapabilityProvider } from './capability.d-K664nHOS.js';
4
- import { by as KodaXJsonValue, bm as KodaXExtensionSessionRecord, bo as KodaXExtensionStore } from './types.d-RdWRfUEs.js';
5
- import { aK as KodaXToolExecutionContext, br as ToolSideEffect } from './bash-prefix-extractor.d-pZdu6qt7.js';
4
+ import { bO as KodaXJsonValue, bC as KodaXExtensionSessionRecord, bE as KodaXExtensionStore } from './controller.d-RGV7Pjv9.js';
5
+ import { aQ as KodaXToolExecutionContext, by as ToolSideEffect } from './bash-prefix-extractor.d-CNSidpmv.js';
6
6
 
7
7
  /**
8
8
  * KodaX Constructed-World types (FEATURE_087, v0.7.28).