@kodax-ai/kodax 0.7.96 → 0.7.97-alpha.2

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 (127) hide show
  1. package/CHANGELOG.md +86 -0
  2. package/README.md +85 -62
  3. package/README_CN.md +57 -67
  4. package/config-templates/config.example.jsonc +0 -14
  5. package/dist/chunks/{agent-7N427EVB.js → agent-J7SHFM5N.js} +1 -1
  6. package/dist/chunks/argument-completer-ZJQOWTIS.js +2 -0
  7. package/dist/chunks/{chunk-ABZDFK2X.js → chunk-2GV6MQ4T.js} +14 -14
  8. package/dist/chunks/{chunk-6QI3GOYG.js → chunk-3PS3YEDS.js} +1 -1
  9. package/dist/chunks/chunk-4VJMQDTH.js +417 -0
  10. package/dist/chunks/{chunk-NI7PBPUR.js → chunk-5DSUVP46.js} +1 -1
  11. package/dist/chunks/chunk-5P7RTSZT.js +21 -0
  12. package/dist/chunks/{chunk-XXNR6S4Q.js → chunk-6ZAQKFIM.js} +1 -1
  13. package/dist/chunks/chunk-7V2QBZ73.js +137 -0
  14. package/dist/chunks/{chunk-C7U542KM.js → chunk-F7DHZH6T.js} +1 -1
  15. package/dist/chunks/{chunk-7IMWOR34.js → chunk-HSRYDDPF.js} +1 -1
  16. package/dist/chunks/chunk-K3DQGSQU.js +372 -0
  17. package/dist/chunks/chunk-NO23K2CB.js +2 -0
  18. package/dist/chunks/{chunk-NKT3B3DR.js → chunk-OT5WHAX4.js} +1 -1
  19. package/dist/chunks/{chunk-YEAUDI6U.js → chunk-QGWHJIO4.js} +1 -1
  20. package/dist/chunks/chunk-QOFFAY5C.js +261 -0
  21. package/dist/chunks/{chunk-4PFZ7BEE.js → chunk-QVDTORL3.js} +11 -11
  22. package/dist/chunks/chunk-QZ4B4AWG.js +473 -0
  23. package/dist/chunks/chunk-RXDS6CNA.js +355 -0
  24. package/dist/chunks/{chunk-WV3DJVW4.js → chunk-VDGPJQL7.js} +135 -135
  25. package/dist/chunks/chunk-VEZ4WHPN.js +641 -0
  26. package/dist/chunks/chunk-ZPPAT25E.js +5 -0
  27. package/dist/chunks/chunk-ZQYWDI4O.js +1 -0
  28. package/dist/chunks/chunk-ZS2GUADU.js +498 -0
  29. package/dist/chunks/{chunk-GN2IY5YE.js → chunk-ZTYZYXGV.js} +1 -1
  30. package/dist/chunks/{chunk-EM4XJBTK.js → chunk-ZZQ4GDVU.js} +1 -1
  31. package/dist/chunks/{client-6WZZTTSV.js → client-MXOJ5XUN.js} +1 -1
  32. package/dist/chunks/{compaction-config-ZMEJU4U7.js → compaction-config-5VZSGKBQ.js} +1 -1
  33. package/dist/chunks/{construction-bootstrap-RX4DMHI7.js → construction-bootstrap-U2ZU2WAT.js} +1 -1
  34. package/dist/chunks/dist-CSLNWLOE.js +2 -0
  35. package/dist/chunks/dist-XXMJMJDU.js +2 -0
  36. package/dist/chunks/host-RUXYZFYN.js +2 -0
  37. package/dist/chunks/readline-helpers-JCVULR4C.js +2 -0
  38. package/dist/chunks/run-manager-DRIM5VNE.js +2 -0
  39. package/dist/chunks/utils-MQEBGKIX.js +2 -0
  40. package/dist/index.d.ts +63 -30
  41. package/dist/index.js +10 -6
  42. package/dist/kodax_bootstrap.js +1 -1
  43. package/dist/kodax_cli.js +1745 -1734
  44. package/dist/kodax_resume.js +32 -35
  45. package/dist/native/win32-x64/kodax-windows-sandbox.exe +0 -0
  46. package/dist/native/win32-x64/kodax-windows-text-transaction.node +0 -0
  47. package/dist/native/win32-x64/manifest.json +2 -2
  48. package/dist/sandbox-network-broker.js +77 -77
  49. package/dist/sdk-a2a.d.ts +33 -18
  50. package/dist/sdk-a2a.js +8 -9
  51. package/dist/sdk-agent.d.ts +33 -26
  52. package/dist/sdk-agent.js +1 -1
  53. package/dist/sdk-client.d.ts +40 -0
  54. package/dist/sdk-client.js +2 -0
  55. package/dist/sdk-coding.d.ts +87 -499
  56. package/dist/sdk-coding.js +1 -1
  57. package/dist/sdk-experimental-memory.d.ts +3 -4
  58. package/dist/sdk-experimental-memory.js +1 -1
  59. package/dist/sdk-llm.d.ts +11 -9
  60. package/dist/sdk-llm.js +1 -1
  61. package/dist/sdk-mcp.d.ts +3 -3
  62. package/dist/sdk-mcp.js +1 -1
  63. package/dist/sdk-media.d.ts +3 -1
  64. package/dist/sdk-media.js +1 -1
  65. package/dist/sdk-repl.d.ts +317 -70
  66. package/dist/sdk-repl.js +2 -2
  67. package/dist/sdk-runtime.d.ts +580 -452
  68. package/dist/sdk-runtime.js +1 -1
  69. package/dist/sdk-sandbox.js +1 -1
  70. package/dist/sdk-session.d.ts +13 -9
  71. package/dist/sdk-session.js +1 -1
  72. package/dist/sdk-skills.js +1 -1
  73. package/dist/semantic-worker.js +57 -57
  74. package/dist/types-chunks/{base.d-Bt9lhwSV.d.ts → base.d-ZBOdjDUT.d.ts} +2 -1
  75. package/dist/types-chunks/{bash-prefix-extractor.d-DWFIMg0v.d.ts → bash-prefix-extractor.d-DvswAXKS.d.ts} +136 -66
  76. package/dist/types-chunks/{capability-learning.d-gRtO03f6.d.ts → capability-learning.d-B4pxKwP4.d.ts} +1 -1
  77. package/dist/types-chunks/{capability.d-Ch5Vos33.d.ts → capability.d-DOF3r0fJ.d.ts} +1 -1
  78. package/dist/types-chunks/{capsule.d-Dj1n6s0Y.d.ts → capsule.d-B4atvlxE.d.ts} +7 -19
  79. package/dist/types-chunks/client-contract-A1jdk6xz.d.ts +1993 -0
  80. package/dist/types-chunks/{controller.d-C0IM1Tud.d.ts → controller.d-BkUJ_3sl.d.ts} +1 -1
  81. package/dist/types-chunks/{controller.d-J2t1q8Ly.d.ts → controller.d-yyKajPTi.d.ts} +140 -1380
  82. package/dist/types-chunks/{cost-tracker.d-BWI4lFWn.d.ts → cost-tracker.d-BeaenODW.d.ts} +2 -47
  83. package/dist/types-chunks/{history-retrieval.d-CPN5PMBV.d.ts → history-retrieval.d-JdFfkeF3.d.ts} +2 -2
  84. package/dist/types-chunks/{manager.d-rtmywU9M.d.ts → manager.d-C_20XqCV.d.ts} +8 -1
  85. package/dist/types-chunks/manifest.d-Bw2i-zQi.d.ts +18 -0
  86. package/dist/types-chunks/provider-credential-context.d-BH2OaB1b.d.ts +47 -0
  87. package/dist/types-chunks/provider-request-observation.d-jL8T6wVO.d.ts +34 -0
  88. package/dist/types-chunks/{public-api.d-amBop8Nk.d.ts → public-api.d-Cq8ILMte.d.ts} +52 -13
  89. package/dist/types-chunks/{resolver.d-BrwLoWNr.d.ts → resolver.d-DLY01RHx.d.ts} +4 -2
  90. package/dist/types-chunks/{types.d-CSv0_cZC.d.ts → review-inbox.d-BeaLRNHx.d.ts} +251 -3
  91. package/dist/types-chunks/{shell-command-sets.d-oejwpP_7.d.ts → review-packet.d-D4bbTbq3.d.ts} +46 -3
  92. package/dist/types-chunks/{exec-policy.d-BPESl90L.d.ts → run-manager.d-C7Q71rin.d.ts} +385 -62
  93. package/dist/types-chunks/runtime-client-info-CxnlZlW5.d.ts +175 -0
  94. package/dist/types-chunks/{sdk-session-B6XjHNU1.d.ts → sdk-session-BDFjCpDn.d.ts} +12 -4
  95. package/dist/types-chunks/{side-query.d-DHWG1JZg.d.ts → side-query.d-DTrhVd_r.d.ts} +4 -3
  96. package/dist/types-chunks/trusted-repl-entry-vbUM8R6P.d.ts +445 -0
  97. package/dist/types-chunks/{types.d-CtO8mR1s.d.ts → types.d-BJTN-RZr.d.ts} +5 -5
  98. package/dist/types-chunks/{types.d-BrQMB-hy.d.ts → types.d-BjOq57-z.d.ts} +6 -0
  99. package/dist/types-chunks/types.d-o7t9dds4.d.ts +1484 -0
  100. package/dist/types-chunks/{utils.d-DcznBeQ3.d.ts → utils.d-CWiMhFfu.d.ts} +202 -36
  101. package/docs/CLIENT_CONTRACT.md +441 -0
  102. package/docs/SDK_MIGRATION.md +123 -0
  103. package/docs/SPACE_SDK_SEAMS.md +139 -0
  104. package/package.json +10 -5
  105. package/public_docs/README.md +12 -133
  106. package/public_docs/configuration/config-files.md +8 -14
  107. package/public_docs/sdk/embedder-guide.md +494 -420
  108. package/dist/chunks/argument-completer-FAIHW7HZ.js +0 -2
  109. package/dist/chunks/chunk-66XN5AFU.js +0 -417
  110. package/dist/chunks/chunk-7O2AIFNE.js +0 -373
  111. package/dist/chunks/chunk-DSXUXUZG.js +0 -5
  112. package/dist/chunks/chunk-GYO73UYQ.js +0 -275
  113. package/dist/chunks/chunk-HPCS3LZ5.js +0 -324
  114. package/dist/chunks/chunk-HZYRLIOC.js +0 -137
  115. package/dist/chunks/chunk-SC2ELSUS.js +0 -675
  116. package/dist/chunks/chunk-TEUD5VPJ.js +0 -471
  117. package/dist/chunks/chunk-TYZ2ZAYL.js +0 -487
  118. package/dist/chunks/dist-3UCCMCYR.js +0 -2
  119. package/dist/chunks/dist-F5IWZSAY.js +0 -2
  120. package/dist/chunks/host-W2JJ3V3Q.js +0 -2
  121. package/dist/chunks/run-manager-RBWU3EVE.js +0 -2
  122. package/dist/chunks/utils-DJ4ZFJGL.js +0 -2
  123. package/dist/runtime-worker.js +0 -5381
  124. package/dist/types-chunks/review-inbox.d-CTeUIKda.d.ts +0 -225
  125. package/dist/types-chunks/run-manager.d-hm1XgEou.d.ts +0 -94
  126. package/dist/types-chunks/trusted-repl-entry-D0w5M0UZ.d.ts +0 -323
  127. package/dist/types-chunks/types.d-B1l9pWyX.d.ts +0 -146
@@ -1,10 +1,11 @@
1
- import { k as KodaXMessage, G as KodaXReasoningMode, d as KodaXCustomProviderConfig, q as KodaXProviderCapabilityProfile } from './types.d-BrQMB-hy.js';
2
- import { ar as KodaXSessionUiHistoryItem, ag as KodaXSessionLineage, a7 as KodaXSessionArtifactLedgerEntry, W as KodaXExtensionSessionState, V as KodaXExtensionSessionRecord, an as KodaXSessionRuntimeInfo } from './types.d-CSv0_cZC.js';
3
- import { dl as WorkflowProcessSource } from './controller.d-J2t1q8Ly.js';
4
- import { S as KodaXContextTokenSnapshot, aN as KodaXSkillDynamicContextPolicy, v as KodaXAgentMode, an as KodaXRepoIntelligenceMode, a9 as KodaXOptions, as as KodaXResult, aO as KodaXSkillInvocationContext } from './bash-prefix-extractor.d-DWFIMg0v.js';
5
- import { d as AgentsFile, r as AutoModeStats, Z as KodaXMcpServersConfig } from './exec-policy.d-BPESl90L.js';
1
+ import { aI as KodaXSessionUiHistoryItem, ax as KodaXSessionLineage, ao as KodaXSessionArtifactLedgerEntry, ab as KodaXExtensionSessionState, aa as KodaXExtensionSessionRecord, aE as KodaXSessionRuntimeInfo, af as KodaXGoalState, b9 as MemoryManagementController, by as PendingEpisodeReviewSummary } from './review-inbox.d-BeaLRNHx.js';
2
+ import { k as KodaXMessage, G as KodaXReasoningMode, d as KodaXCustomProviderConfig, q as KodaXProviderCapabilityProfile } from './types.d-BjOq57-z.js';
3
+ import { bu as WorkflowProcessSource, bt as WorkflowProcessSnapshot, bm as WorkflowProcessEvent } from './types.d-o7t9dds4.js';
4
+ import { T as KodaXContextTokenSnapshot, aO as KodaXSkillDynamicContextPolicy, aP as KodaXSkillInvocationContext, w as KodaXAgentMode, ao as KodaXRepoIntelligenceMode, aa as KodaXOptions, at as KodaXResult } from './bash-prefix-extractor.d-DvswAXKS.js';
5
+ import { d as AgentsFile, al as WorkflowRunProcessMetadata, a4 as ManagedWorkflowSnapshot, r as AutoModeStats, _ as KodaXMcpServersConfig } from './run-manager.d-C7Q71rin.js';
6
+ import { aB as KodaXProductClient, ai as ClientSessionSettings } from './client-contract-A1jdk6xz.js';
6
7
  import * as readline from 'readline';
7
- import { U as PermissionMode, L as LearningBinding, M as LearningSurfaceSnapshot } from './public-api.d-amBop8Nk.js';
8
+ import { U as PermissionMode, L as LearningBinding, M as LearningSurfaceSnapshot } from './public-api.d-Cq8ILMte.js';
8
9
  import { SpawnSyncReturns } from 'child_process';
9
10
 
10
11
  /**
@@ -34,17 +35,11 @@ interface AutoReviewSettings {
34
35
  * `permissionMode`'s scope) plus the classifier-model environment override.
35
36
  */
36
37
  interface AutoModeSettings {
37
- /** @deprecated Legacy input accepted and ignored at the read boundary. */
38
- engine?: 'llm' | 'rules';
39
38
  /**
40
39
  * Classifier model spec — `"provider:model"` or `"model"` (provider then
41
40
  * inherits from the main session). Feeds layer 4 of `resolveClassifierModel`.
42
41
  */
43
42
  classifierModel?: string;
44
- /** @deprecated Accepted as inert migration input. Reviewer deadlines are fixed. */
45
- timeoutMs?: number;
46
- /** @deprecated Accepted as inert migration input. Sandbox-first routing has no speculative window. */
47
- speculativeWindowMs?: number;
48
43
  }
49
44
  interface ResolvedAutoModeSettings {
50
45
  readonly classifierModel?: string;
@@ -64,7 +59,6 @@ interface ResolveAutoModeSettingsInput {
64
59
  * Env priority (highest first):
65
60
  * - KODAX_AUTO_MODE_CLASSIFIER_MODEL: model spec — surfaced as `classifierModelEnv`
66
61
  * so it reaches `AutoModeGuardrailConfig.envVar` (the resolver's layer 2)
67
- * Legacy timeout/window inputs and environment variables are ignored.
68
62
  */
69
63
  declare function loadAutoModeSettings(env?: NodeJS.ProcessEnv): ResolvedAutoModeSettings;
70
64
  /**
@@ -188,6 +182,8 @@ interface CommandExecutionMetadata {
188
182
  frontmatter?: Record<string, unknown>;
189
183
  }
190
184
  interface CurrentConfig {
185
+ /** Present on Host-bound displays; omitted values remain unknown rather than local defaults. */
186
+ hostSettings?: ClientSessionSettings;
191
187
  provider: string;
192
188
  model?: string;
193
189
  effort?: string;
@@ -222,26 +218,129 @@ type SessionBranchSwitchStatus = 'switched' | 'missing' | 'blocked';
222
218
  type SessionForkStatus = 'forked' | 'failed' | 'blocked';
223
219
  type SessionRewindStatus = 'rewound' | 'failed' | 'blocked';
224
220
  type SessionRecoverStatus = 'recovered' | 'empty' | 'failed' | 'blocked';
221
+ /**
222
+ * FEATURE_298 T34 — goal persistence is Host-owned: the command plane
223
+ * sends the session id and objective; lineage mutation and journal
224
+ * writes happen inside the Host. Unbound REPLs keep the local
225
+ * appendGoalEntry + saveSession path (standalone capability).
226
+ */
227
+ interface SessionGoalBinding {
228
+ read(sessionId: string): Promise<KodaXGoalState | null>;
229
+ create(input: {
230
+ readonly sessionId: string;
231
+ readonly objective: string;
232
+ readonly tokenBudget?: number;
233
+ }): Promise<KodaXGoalState>;
234
+ pause(sessionId: string): Promise<KodaXGoalState>;
235
+ resume(sessionId: string): Promise<KodaXGoalState>;
236
+ clear(sessionId: string): Promise<void>;
237
+ }
238
+ /**
239
+ * FEATURE_298 T34 — session-command mutations are Host-owned: the surface
240
+ * sends ids/selectors only and reads the resulting Host projections;
241
+ * unbound REPLs keep the direct SessionStorage paths (standalone).
242
+ */
243
+ interface SessionCommandBinding {
244
+ list?: KodaXProductClient['sessions']['list'];
245
+ read?: KodaXProductClient['sessions']['read'];
246
+ getSettings?: KodaXProductClient['sessions']['getSettings'];
247
+ readLineage?: KodaXProductClient['sessions']['readLineage'];
248
+ delete(sessionId: string): Promise<void>;
249
+ deleteAll(input: {
250
+ readonly gitRoot?: string;
251
+ }): Promise<void>;
252
+ /** Returns false when no lineage entry matches the selector. */
253
+ setActiveEntry(input: {
254
+ readonly sessionId: string;
255
+ readonly selector: string;
256
+ readonly summarizeCurrentBranch?: boolean;
257
+ }): Promise<boolean>;
258
+ /** Returns false when no lineage entry matches the selector. */
259
+ setLabel(input: {
260
+ readonly sessionId: string;
261
+ readonly selector: string;
262
+ readonly label?: string;
263
+ }): Promise<boolean>;
264
+ /** Returns the new session id, or undefined when the fork failed. */
265
+ fork(input: {
266
+ readonly sessionId: string;
267
+ readonly selector?: string;
268
+ }): Promise<string | undefined>;
269
+ /** Returns false when the rewind failed. */
270
+ rewind(input: {
271
+ readonly sessionId: string;
272
+ readonly selector?: string;
273
+ readonly expectedHead?: string | null;
274
+ }): Promise<boolean>;
275
+ /** Recovers into a fresh Host-derived seed session; returns its id. */
276
+ recover(input: {
277
+ readonly sessionId: string;
278
+ readonly reason?: string;
279
+ }): Promise<string | undefined>;
280
+ create(input: {
281
+ readonly sessionId: string;
282
+ readonly title: string;
283
+ readonly gitRoot?: string;
284
+ readonly projectPath?: string;
285
+ readonly surface: string;
286
+ }): Promise<void>;
287
+ }
288
+ /**
289
+ * FEATURE_298 T34 — manual compaction is a Host session command: the Host
290
+ * replays its journal through the compaction domain and persists the
291
+ * result; the REPL only refreshes its display context.
292
+ */
293
+ interface SessionCompactBinding {
294
+ compact(input: {
295
+ readonly sessionId: string;
296
+ readonly customInstructions?: string;
297
+ }): Promise<{
298
+ readonly compacted: boolean;
299
+ readonly tokensBefore: number;
300
+ readonly tokensAfter: number;
301
+ readonly messages: readonly KodaXMessage[];
302
+ readonly reason?: string;
303
+ }>;
304
+ }
225
305
  interface CommandCallbacks {
306
+ config?: KodaXProductClient['config'];
307
+ catalog?: Pick<KodaXProductClient['catalog'], 'providers' | 'models' | 'reasoningEfforts'>;
308
+ commandClient?: KodaXProductClient['commands'];
309
+ listHostCommands?: KodaXProductClient['catalog']['commands'];
310
+ inspectExtensions?: KodaXProductClient['catalog']['extensions'];
311
+ mcp?: Pick<KodaXProductClient['mcp'], 'status' | 'listTools'>;
312
+ /** Host-owned reasoning-effort probing; unbound keeps the local provider path. */
313
+ providerCapabilities?: Pick<KodaXProductClient['catalog'], 'reasoningEfforts' | 'probeReasoningEfforts' | 'forgetCapabilities'>;
314
+ startReview?: KodaXProductClient['review']['start'];
315
+ reviewAgentsLean?: KodaXProductClient['agents']['reviewLean'];
226
316
  exit: () => void | Promise<void>;
227
317
  /** Compaction supplies authoritative lineage; ordinary saves may omit it. */
228
318
  saveSession: (compactionLineage?: KodaXSessionLineage) => Promise<void>;
229
- startNewSession?: () => void;
319
+ /** FEATURE_298 T34 — Host-owned goal plane; unbound keeps the local lineage path. */
320
+ readonly goal?: SessionGoalBinding;
321
+ /**
322
+ * FEATURE_298 T34 — after a bound session mutation, re-read the lineage
323
+ * the Host just wrote so local display and the embedded goal runtime
324
+ * stay coherent without a second writer.
325
+ */
326
+ readonly refreshSessionLineage?: () => Promise<KodaXSessionLineage | undefined>;
327
+ /** FEATURE_298 T34 — Host-owned manual compaction; unbound compacts locally. */
328
+ readonly compactSession?: SessionCompactBinding;
329
+ startNewSession?: () => void | Promise<void>;
230
330
  loadSession: (id: string) => Promise<SessionLoadStatus>;
231
- listSessions: () => Promise<void>;
331
+ listSessions: () => Promise<void | CommandResultData>;
232
332
  /** Clear presentation only. Commands own changes to messages/token state. */
233
333
  clearHistory: () => void;
234
- printHistory: () => void;
235
- switchProvider?: (provider: string, model?: string) => void;
236
- setEffort?: (effort?: string) => void;
237
- setThinking?: (enabled: boolean) => void;
238
- setReasoningMode?: (mode: KodaXReasoningMode) => void;
239
- setAgentMode?: (mode: KodaXAgentMode) => void;
334
+ printHistory: () => void | CommandResultData | Promise<void | CommandResultData>;
335
+ switchProvider?: (provider: string, model?: string) => void | Promise<void>;
336
+ setEffort?: (effort?: string) => void | Promise<void>;
337
+ setReasoningMode?: (mode: KodaXReasoningMode) => void | Promise<void>;
338
+ setAgentMode?: (mode: KodaXAgentMode) => void | Promise<void>;
240
339
  setPermissionMode?: (mode: PermissionMode) => void | Promise<void>;
241
340
  setRepoIntelligenceRuntime?: (update: {
242
341
  mode?: KodaXRepoIntelligenceMode;
243
342
  trace?: boolean;
244
- }) => void;
343
+ }) => void | Promise<void>;
245
344
  deleteSession?: (id: string) => Promise<void>;
246
345
  deleteAllSessions?: () => Promise<void>;
247
346
  createKodaXOptions?: () => KodaXOptions;
@@ -305,6 +404,10 @@ interface CommandCallbacks {
305
404
  rewindSession?: (selector?: string) => Promise<SessionRewindStatus>;
306
405
  getCostReport?: () => string | null;
307
406
  getRuntimeStatus?: () => Promise<RuntimeSurfaceStatus | undefined>;
407
+ getSessionStatus?: () => Promise<{
408
+ messageCount?: number;
409
+ tokens?: number;
410
+ }>;
308
411
  /** Canonical host parser used by `/setup` for the root-owned A2A schema. */
309
412
  validateSetupA2AConfig?: (value: unknown) => unknown;
310
413
  /** Root-owned sandbox activation because ASRT is distributed by the host package. */
@@ -322,6 +425,18 @@ interface CommandCallbacks {
322
425
  readonly guidance: readonly string[];
323
426
  }>;
324
427
  learning?: LearningBinding;
428
+ /**
429
+ * FEATURE_298 T36 — Host-owned Memory management plane for a project
430
+ * root. Absent means Memory controls report unavailable; the UI never
431
+ * builds its own identity/controller.
432
+ */
433
+ memory?: (projectRoot: string) => MemoryCommandPlane | Promise<MemoryCommandPlane>;
434
+ /**
435
+ * FEATURE_298 T22 — Host-owned workflow control plane. When present,
436
+ * run/control operations (list/get/pause/resume/stop/start) route to the
437
+ * Host manager so every client of the same Host sees the same work.
438
+ */
439
+ workflows?: WorkflowHostControl;
325
440
  getLearningSummary?: () => Promise<LearningSurfaceSnapshot>;
326
441
  openLearningCenter?: (nameOrSlug?: string) => Promise<void>;
327
442
  /**
@@ -335,6 +450,7 @@ interface CommandCallbacks {
335
450
  ui: UIContext;
336
451
  }
337
452
  interface CommandResultData {
453
+ startedRunId?: string;
338
454
  success?: boolean;
339
455
  message?: string;
340
456
  data?: unknown;
@@ -425,6 +541,65 @@ interface Command {
425
541
  hooks?: CommandHooks;
426
542
  frontmatter?: Record<string, unknown>;
427
543
  }
544
+ interface MemoryRebuildResult {
545
+ readonly status: 'missing-dir' | 'no-topics' | 'rebuilt';
546
+ readonly memoryRoot: string;
547
+ readonly entrypointPath: string;
548
+ readonly entryCount: number;
549
+ readonly malformedFiles: readonly string[];
550
+ readonly warnings: readonly string[];
551
+ }
552
+ interface MemoryCommandPlane {
553
+ readonly controller: Pick<MemoryManagementController, 'listInbox' | 'showProposal' | 'approveProposal' | 'rejectProposal' | 'listRefs' | 'readRef' | 'remember' | 'forgetRef'>;
554
+ readonly memoryRoot: string;
555
+ readonly entrypointPath: string;
556
+ listReviews(): Promise<readonly PendingEpisodeReviewSummary[]>;
557
+ reviewerProviderConfigured(): boolean;
558
+ rebuild(): Promise<MemoryRebuildResult>;
559
+ ensureOpenTarget(targetPath: string): Promise<string>;
560
+ }
561
+ interface WorkflowHostControl {
562
+ start(input: {
563
+ readonly sessionId?: string;
564
+ readonly projectRoot: string;
565
+ readonly source: {
566
+ readonly kind: 'inline';
567
+ readonly manifest: unknown;
568
+ readonly source: string;
569
+ } | {
570
+ readonly kind: 'request';
571
+ readonly request: string;
572
+ } | {
573
+ readonly kind: 'name';
574
+ readonly name: string;
575
+ };
576
+ readonly args?: unknown;
577
+ readonly provider?: string;
578
+ readonly model?: string;
579
+ /** FEATURE_298 T22 — serializable run lineage the Host attaches verbatim. */
580
+ readonly metadata?: WorkflowRunProcessMetadata;
581
+ }): Promise<{
582
+ readonly kind: 'declined';
583
+ readonly reason: string;
584
+ } | {
585
+ readonly kind: 'started';
586
+ readonly runId: string;
587
+ }>;
588
+ list(): Promise<readonly ManagedWorkflowSnapshot[]>;
589
+ get(runId: string): Promise<WorkflowProcessSnapshot | undefined>;
590
+ /** FEATURE_298 T22 — live process events for a Host-minted run. */
591
+ subscribe(filter: {
592
+ readonly runId?: string;
593
+ }, listener: (event: WorkflowProcessEvent) => void, onError?: (error: unknown) => void): {
594
+ readonly ready?: Promise<void>;
595
+ close(): void;
596
+ };
597
+ pause(runId: string): Promise<boolean>;
598
+ resume(runId: string): Promise<boolean>;
599
+ stop(runId: string, options?: {
600
+ readonly sessionId: string;
601
+ }): Promise<boolean>;
602
+ }
428
603
 
429
604
  /**
430
605
  * KodaX CLI Utilities
@@ -487,6 +662,7 @@ declare function registerConfiguredCustomProviders(config: {
487
662
  declare function getVersion(): string;
488
663
  declare const KODAX_VERSION: string;
489
664
  declare function getProviderModel(name: string): string | null;
665
+ declare function getProviderReasoningEffortOptions(provider: string, model?: string, configHome?: string): string[];
490
666
  declare function getProviderList(providerModelsConfig?: Record<string, string[]>): Array<{
491
667
  name: string;
492
668
  model: string;
@@ -500,7 +676,6 @@ declare function isProviderConfigured(name: string): boolean;
500
676
  declare function loadConfig(): {
501
677
  provider?: string;
502
678
  model?: string;
503
- runtimeMode?: 'embedded' | 'daemon';
504
679
  effort?: string;
505
680
  planModeEffort?: string;
506
681
  thinking?: boolean;
@@ -582,16 +757,6 @@ declare function loadConfig(): {
582
757
  workflow?: {
583
758
  maxConcurrency?: number;
584
759
  };
585
- /**
586
- * Worker-hosted embedded Runtime options. `configuredA2A` lets a
587
- * Worker-hosted embedded Runtime load and reconcile
588
- * `<homeDir>/.kodax/integrations/a2a.json` inside the Worker owner,
589
- * installing the full list/describe/preflight and external Actor dispatch
590
- * surface so configured A2A Agents appear as `external:<name>`.
591
- */
592
- worker?: {
593
- configuredA2A?: boolean;
594
- };
595
760
  };
596
761
  /**
597
762
  * F1 — first-launch onboarding. config.json must be STRICT JSON (no comments), so we
@@ -623,11 +788,12 @@ declare const KODAX_CONFIG_ENV_BINDINGS: ReadonlyArray<{
623
788
  readonly configPath: string;
624
789
  readonly env: string;
625
790
  }>;
791
+ /** Only these existing commands promise immediate control of later execution. */
792
+ declare function applyExecutionConfigEnvironment(config: ReturnType<typeof loadConfig>, explicit?: boolean): void;
626
793
  declare function prepareRuntimeConfig(): ReturnType<typeof loadConfig>;
627
794
  declare function saveConfig(config: {
628
795
  provider?: string;
629
796
  model?: string;
630
- runtimeMode?: 'embedded' | 'daemon';
631
797
  effort?: string;
632
798
  planModeEffort?: string;
633
799
  thinking?: boolean;
@@ -704,5 +870,5 @@ declare function resolveRuntimeEffortSelection(input: {
704
870
  declare function getGitRoot(cwd?: string): Promise<string | null>;
705
871
  declare function rateLimitedCall<T>(fn: () => Promise<T>): Promise<T>;
706
872
 
707
- export { inspectConfigEnvironmentSource as B, isProviderConfigured as D, loadAutoModeSettings as E, loadConfig as F, prepareRuntimeConfig as G, rateLimitedCall as H, registerConfiguredCustomProviders as J, KODAX_CONFIG_ENV_BINDINGS as K, resolveAutoModeSettings as L, resolveRuntimeEffortSelection as M, resolveRuntimeModelSelection as N, resolveRuntimeProviderSelection as O, PREVIEW_MAX_LENGTH as P, saveConfig as Q, touchContext as S, KODAX_CONFIG_FILE as j, KODAX_DIR as k, KODAX_EXAMPLE_CONFIG_FILE as l, KODAX_INTEGRATION_EXAMPLE_FILES as m, KODAX_SESSIONS_DIR as n, KODAX_VERSION as o, createInteractiveContext as s, ensureExampleConfigFile as t, ensureExampleConfigFiles as u, getGitRoot as v, getProviderList as w, getProviderModel as x, getVersion as y, hydrateProcessEnvFromShell as z };
708
- export type { AutoModeSettings as A, Command as C, InteractiveContext as I, ResolveAutoModeSettingsInput as R, CommandCallbacks as a, CommandDefinition as b, CommandInfo as c, CommandInvocationRequest as d, CommandSource as e, CommandWorkflowInvocationRequest as f, ConfigEnvironmentSource as g, CurrentConfig as h, InteractiveMode as i, ResolvedAutoModeSettings as p, RuntimeSurfaceMode as q, RuntimeSurfaceStatus as r };
873
+ export { getGitRoot as B, getProviderList as D, getProviderModel as E, getProviderReasoningEffortOptions as F, getVersion as G, hydrateProcessEnvFromShell as H, inspectConfigEnvironmentSource as J, KODAX_CONFIG_ENV_BINDINGS as K, isProviderConfigured as L, loadAutoModeSettings as M, loadConfig as N, prepareRuntimeConfig as O, PREVIEW_MAX_LENGTH as P, rateLimitedCall as Q, registerConfiguredCustomProviders as T, resolveAutoModeSettings as U, resolveRuntimeEffortSelection as V, resolveRuntimeModelSelection as W, resolveRuntimeProviderSelection as X, saveConfig as Y, touchContext as Z, KODAX_CONFIG_FILE as l, KODAX_DIR as m, KODAX_EXAMPLE_CONFIG_FILE as n, KODAX_INTEGRATION_EXAMPLE_FILES as o, KODAX_SESSIONS_DIR as p, KODAX_VERSION as q, applyExecutionConfigEnvironment as w, createInteractiveContext as x, ensureExampleConfigFile as y, ensureExampleConfigFiles as z };
874
+ export type { AutoModeSettings as A, Command as C, InteractiveContext as I, ResolveAutoModeSettingsInput as R, SessionCommandBinding as S, CommandCallbacks as a, CommandDefinition as b, CommandExecutionMetadata as c, CommandInfo as d, CommandInvocationRequest as e, CommandPriority as f, CommandSource as g, CommandWorkflowInvocationRequest as h, ConfigEnvironmentSource as i, CurrentConfig as j, InteractiveMode as k, ResolvedAutoModeSettings as r, RuntimeSurfaceMode as s, RuntimeSurfaceStatus as t, SessionCompactBinding as u, SessionGoalBinding as v };