@kodax-ai/kodax 0.7.55 → 0.7.57

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 (70) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/README.md +22 -24
  3. package/README_CN.md +16 -18
  4. package/dist/builtin/code-review/SKILL.md +22 -3
  5. package/dist/chunks/agent-EHWQZA4C.js +2 -0
  6. package/dist/chunks/argument-completer-AYDAYGKL.js +2 -0
  7. package/dist/chunks/chunk-3WWPJGPQ.js +2 -0
  8. package/dist/chunks/chunk-4SHP3M67.js +2 -0
  9. package/dist/chunks/chunk-KN6IJMTB.js +636 -0
  10. package/dist/chunks/{chunk-ZBK3DZ3S.js → chunk-LZKGOR2C.js} +1 -1
  11. package/dist/chunks/chunk-MJFPFRGK.js +423 -0
  12. package/dist/chunks/chunk-N2N2W3AQ.js +584 -0
  13. package/dist/chunks/chunk-PCPFLPS4.js +5 -0
  14. package/dist/chunks/chunk-TCLSPUTR.js +31 -0
  15. package/dist/chunks/chunk-VACH6QWN.js +315 -0
  16. package/dist/chunks/chunk-YSVPF6SN.js +597 -0
  17. package/dist/chunks/{compaction-config-NAJEEPG5.js → compaction-config-TLDMFMZO.js} +1 -1
  18. package/dist/chunks/{construction-bootstrap-4CIVZMQ5.js → construction-bootstrap-55B7Q5RX.js} +4 -4
  19. package/dist/chunks/dist-IE4HVWP7.js +2 -0
  20. package/dist/chunks/dist-IKOK2MJQ.js +2 -0
  21. package/dist/chunks/paste-WTL2XN7P.js +2 -0
  22. package/dist/chunks/utils-EJ2VCRTC.js +2 -0
  23. package/dist/index.d.ts +21 -16
  24. package/dist/index.js +6 -6
  25. package/dist/kodax_cli.js +1128 -1099
  26. package/dist/provider-capabilities.json +986 -195
  27. package/dist/sdk-agent.d.ts +20 -12
  28. package/dist/sdk-agent.js +1 -1
  29. package/dist/sdk-coding.d.ts +223 -108
  30. package/dist/sdk-coding.js +1 -1
  31. package/dist/sdk-llm.d.ts +10 -5
  32. package/dist/sdk-llm.js +1 -1
  33. package/dist/sdk-mcp.d.ts +1 -1
  34. package/dist/sdk-mcp.js +1 -1
  35. package/dist/sdk-media.d.ts +142 -0
  36. package/dist/sdk-media.js +2 -0
  37. package/dist/sdk-repl.d.ts +106 -96
  38. package/dist/sdk-repl.js +1 -1
  39. package/dist/sdk-session.d.ts +6 -5
  40. package/dist/sdk-session.js +1 -1
  41. package/dist/sdk-skills.js +1 -1
  42. package/dist/semantic-worker.js +11 -0
  43. package/dist/types-chunks/base.d-BnjQrSVf.d.ts +301 -0
  44. package/dist/types-chunks/{bash-prefix-extractor.d-LUGkQHcd.d.ts → bash-prefix-extractor.d-BgvMbfq6.d.ts} +198 -139
  45. package/dist/types-chunks/{capsule.d-CNonpwAZ.d.ts → capsule.d-DwJp5r63.d.ts} +14 -11
  46. package/dist/types-chunks/{types.d-D4jL-gAA.d.ts → guardrail.d-BP3yyr6u.d.ts} +3 -121
  47. package/dist/types-chunks/{guardrail.d-B18oO1gt.d.ts → guardrail.d-C1DhxnvC.d.ts} +31 -9
  48. package/dist/types-chunks/{manager.d-DLmDhX3i.d.ts → manager.d-DBD7SOTT.d.ts} +7 -2
  49. package/dist/types-chunks/{process.d-Bj82oJhD.d.ts → process.d-BZncyzEj.d.ts} +2 -1
  50. package/dist/types-chunks/{resolver.d-CCX9NXWP.d.ts → resolver.d-ZvKQgl0X.d.ts} +82 -17
  51. package/dist/types-chunks/{sdk-session-SjrnWb4-.d.ts → sdk-session-DAScB0rW.d.ts} +6 -4
  52. package/dist/types-chunks/{storage.d-BAuJ0Ks7.d.ts → storage.d-CPvn9qI0.d.ts} +2 -2
  53. package/dist/types-chunks/{base.d-BBNUF9nz.d.ts → types.d-6VOXvF88.d.ts} +101 -290
  54. package/dist/types-chunks/types.d-D8WcfrOD.d.ts +143 -0
  55. package/dist/types-chunks/{utils.d-C9MUY8n3.d.ts → utils.d-CpgVIjYZ.d.ts} +16 -18
  56. package/package.json +15 -6
  57. package/dist/chunks/agent-PYSVWY7M.js +0 -2
  58. package/dist/chunks/argument-completer-CTDNNWV3.js +0 -2
  59. package/dist/chunks/chunk-7C2QUBLE.js +0 -31
  60. package/dist/chunks/chunk-EVIDQWMF.js +0 -5
  61. package/dist/chunks/chunk-FRI7UQSB.js +0 -2
  62. package/dist/chunks/chunk-HQCLPWRI.js +0 -551
  63. package/dist/chunks/chunk-JCDO2FR4.js +0 -584
  64. package/dist/chunks/chunk-MX4G42EV.js +0 -425
  65. package/dist/chunks/chunk-RGPPZOD5.js +0 -314
  66. package/dist/chunks/chunk-THAKTCPE.js +0 -652
  67. package/dist/chunks/dist-7KTO2PUU.js +0 -2
  68. package/dist/chunks/dist-BNKIZRCP.js +0 -2
  69. package/dist/chunks/paste-5DSTHQGK.js +0 -2
  70. package/dist/chunks/utils-2QXBKYPJ.js +0 -2
@@ -1,7 +1,8 @@
1
- import { U as KodaXGoalState, f as AgentMessage, b0 as StopHookFn, a4 as KodaXSessionLineage, W as KodaXJsonValue, P as KodaXExtensionSessionRecord, a9 as KodaXSessionScope, aa as KodaXSessionStorage, Q as KodaXExtensionSessionState, C as ChildTaskRegistry, bl as WorkflowEventCorrelation, s as CompactionUpdate, bx as WorkflowProcessEvent, m as AskUserQuestionOptions, k as AskUserMultiOptions, y as Guardrail, bo as WorkflowIsolation, Y as KodaXSessionArtifactLedgerEntry, aN as SessionErrorMetadata, v as DiscoveredInstance, b4 as TaskAbortRegistry } from './process.d-Bj82oJhD.js';
2
- import { _ as KodaXTokenUsage, G as KodaXReasoningMode, o as KodaXMessage, l as KodaXHarnessProfile, V as KodaXTaskWorkIntent, M as KodaXReviewScale, R as KodaXTaskComplexity, a as KodaXAmaFanoutClass, T as KodaXTaskRoutingDecision, U as KodaXTaskType, N as KodaXRiskLevel, j as KodaXExecutionMode, c as KodaXAmaProfile, d as KodaXAmaTactic, b as KodaXAmaFanoutPolicy, f as KodaXBaseProvider } from './base.d-BBNUF9nz.js';
3
- import { Diagnostic, Position, Location, Hover, DocumentSymbol, SymbolInformation } from 'vscode-languageserver-protocol';
1
+ import { U as KodaXGoalState, f as AgentMessage, b0 as StopHookFn, a4 as KodaXSessionLineage, W as KodaXJsonValue, P as KodaXExtensionSessionRecord, a9 as KodaXSessionScope, aa as KodaXSessionStorage, Q as KodaXExtensionSessionState, C as ChildTaskRegistry, bl as WorkflowEventCorrelation, s as CompactionUpdate, bx as WorkflowProcessEvent, m as AskUserQuestionOptions, k as AskUserMultiOptions, y as Guardrail, bo as WorkflowIsolation, Y as KodaXSessionArtifactLedgerEntry, aN as SessionErrorMetadata, v as DiscoveredInstance, b4 as TaskAbortRegistry } from './process.d-BZncyzEj.js';
2
+ import { Z as KodaXTokenUsage, j as KodaXMessage, a6 as KodaXWireReasoningEffort, E as KodaXReasoningMode, g as KodaXHarnessProfile, T as KodaXTaskWorkIntent, I as KodaXReviewScale, P as KodaXTaskComplexity, b as KodaXChildFanoutClass, R as KodaXTaskRoutingDecision, S as KodaXTaskType, J as KodaXRiskLevel, e as KodaXExecutionMode } from './types.d-6VOXvF88.js';
3
+ import { Diagnostic, Position, Location, Hover, DocumentSymbol, SymbolInformation, WorkspaceSymbol, CallHierarchyItem, CallHierarchyIncomingCall, CallHierarchyOutgoingCall } from 'vscode-languageserver-protocol';
4
4
  import { C as CapabilityKind, b as CapabilityResult } from './capability.d-3C62G8Eq.js';
5
+ import { K as KodaXBaseProvider } from './base.d-BnjQrSVf.js';
5
6
  import { a as CostTracker } from './cost-tracker.d-wRtyEW9d.js';
6
7
 
7
8
  /**
@@ -523,6 +524,16 @@ interface LspClient {
523
524
  references(file: string, position: Position): Promise<Location[]>;
524
525
  /** The document's symbol outline. */
525
526
  documentSymbols(file: string): Promise<Array<DocumentSymbol | SymbolInformation>>;
527
+ /** Project-wide symbols matching a query string. */
528
+ workspaceSymbols(query: string): Promise<Array<SymbolInformation | WorkspaceSymbol>>;
529
+ /** Implementation site(s) of the symbol at a position. */
530
+ implementation(file: string, position: Position): Promise<Location[]>;
531
+ /** Prepare the call hierarchy item(s) for a symbol at a position. */
532
+ prepareCallHierarchy(file: string, position: Position): Promise<CallHierarchyItem[]>;
533
+ /** Incoming callers for a prepared call hierarchy item. */
534
+ incomingCalls(item: CallHierarchyItem): Promise<CallHierarchyIncomingCall[]>;
535
+ /** Outgoing callees for a prepared call hierarchy item. */
536
+ outgoingCalls(item: CallHierarchyItem): Promise<CallHierarchyOutgoingCall[]>;
526
537
  /** Graceful shutdown (await server exit so the OS releases handles). */
527
538
  shutdown(): Promise<void>;
528
539
  /** Synchronous best-effort kill, for a `process.on('exit')` last resort. */
@@ -595,6 +606,16 @@ declare class LspService {
595
606
  getReferences(file: string, position: Position, request?: DiagnosticsRequest): Promise<string>;
596
607
  /** The file's symbol outline, as indented text. */
597
608
  getDocumentSymbols(file: string, request?: DiagnosticsRequest): Promise<string>;
609
+ /** Project-wide symbols matching `query`, across all available language servers. */
610
+ getWorkspaceSymbols(query: string, request?: DiagnosticsRequest): Promise<string>;
611
+ /** Implementation site(s) of the symbol at `position` (0-based), as text. */
612
+ getImplementation(file: string, position: Position, request?: DiagnosticsRequest): Promise<string>;
613
+ /** Prepared call hierarchy item(s) for the symbol at `position` (0-based). */
614
+ getPrepareCallHierarchy(file: string, position: Position, request?: DiagnosticsRequest): Promise<string>;
615
+ /** Incoming callers of the symbol at `position` (0-based). */
616
+ getIncomingCalls(file: string, position: Position, request?: DiagnosticsRequest): Promise<string>;
617
+ /** Outgoing callees of the symbol at `position` (0-based). */
618
+ getOutgoingCalls(file: string, position: Position, request?: DiagnosticsRequest): Promise<string>;
598
619
  /**
599
620
  * Resolve the primary client for a navigation request, opening the file so
600
621
  * the server has current content. Returns guidance text when no server is
@@ -602,6 +623,7 @@ declare class LspService {
602
623
  * NOT silent), or an unsupported message for non-LSP file types.
603
624
  */
604
625
  private navClient;
626
+ private workspaceClients;
605
627
  /** Shut down all spawned servers gracefully (call on session teardown). */
606
628
  shutdownAll(): Promise<void>;
607
629
  /** Synchronous best-effort kill of all servers — for `process.on('exit')`. */
@@ -917,64 +939,6 @@ interface ResolveKodaXManualResult {
917
939
  readonly nextTopics: readonly string[];
918
940
  }
919
941
 
920
- /**
921
- * FEATURE_093 (v0.7.24): minimal contract interfaces for the coding extension
922
- * runtime. Extracted so `@kodax-ai/coding/src/types.ts` can reference the
923
- * extension runtime at the type level without importing `./extensions/runtime.js`,
924
- * which in turn imports from `types.ts` — a cycle that lasted since v0.7.20.
925
- *
926
- * Scope: the capability methods that tool execution consumes, plus optional
927
- * session lifecycle hooks that the coding run loop uses when the runtime
928
- * supports them.
929
- *
930
- * File must have NO imports from `../types.js` (that is the cycle we are
931
- * breaking). Shared capability/session value types come from `@kodax-ai/agent`.
932
- */
933
-
934
- interface ExtensionRuntimeModelSelection {
935
- provider?: string;
936
- model?: string;
937
- }
938
- interface RuntimeDefaultsSnapshot {
939
- activeTools?: string[];
940
- modelSelection: ExtensionRuntimeModelSelection;
941
- thinkingLevel?: KodaXReasoningMode;
942
- }
943
- interface BoundExtensionRuntimeController {
944
- queueUserMessage(message: string | KodaXMessage): void;
945
- getSessionState<T = KodaXJsonValue>(extensionId: string, key: string): T | undefined;
946
- setSessionState(extensionId: string, key: string, value: KodaXJsonValue | undefined): void;
947
- getSessionStateSnapshot(extensionId: string): Record<string, KodaXJsonValue>;
948
- appendSessionRecord(extensionId: string, type: string, data?: KodaXJsonValue, options?: {
949
- dedupeKey?: string;
950
- }): KodaXExtensionSessionRecord;
951
- listSessionRecords(extensionId: string, type?: string): KodaXExtensionSessionRecord[];
952
- clearSessionRecords(extensionId: string, type?: string): number;
953
- getActiveTools(): string[];
954
- setActiveTools(toolNames: string[]): void;
955
- getModelSelection(): ExtensionRuntimeModelSelection;
956
- setModelSelection(next: ExtensionRuntimeModelSelection): void;
957
- getThinkingLevel(): KodaXReasoningMode | undefined;
958
- setThinkingLevel(level: KodaXReasoningMode): void;
959
- }
960
- interface CapabilityRuntimeContract {
961
- searchCapabilities(providerId: string, query: string, options?: {
962
- kind?: CapabilityKind;
963
- limit?: number;
964
- server?: string;
965
- }): Promise<unknown[]>;
966
- describeCapability(providerId: string, capabilityId: string): Promise<unknown>;
967
- executeCapability(providerId: string, capabilityId: string, input: Record<string, unknown>): Promise<CapabilityResult>;
968
- readCapability(providerId: string, capabilityId: string, options?: Record<string, unknown>): Promise<CapabilityResult>;
969
- getCapabilityPrompt(providerId: string, capabilityId: string, args?: Record<string, unknown>): Promise<unknown>;
970
- getCapabilityPromptContext(providerId: string): Promise<string | undefined>;
971
- }
972
- interface ExtensionRuntimeContract extends CapabilityRuntimeContract {
973
- getDefaults?(): RuntimeDefaultsSnapshot;
974
- bindController?(controller: BoundExtensionRuntimeController): (() => void) | void;
975
- hydrateSession?(sessionId: string): Promise<void>;
976
- }
977
-
978
942
  /**
979
943
  * KodaX Provider Resilience Types (Feature 045)
980
944
  *
@@ -1106,6 +1070,92 @@ interface ProviderResiliencePolicy extends ProviderResilienceConfig {
1106
1070
  provider: string;
1107
1071
  }
1108
1072
 
1073
+ interface KodaXLlmTimeoutConfig {
1074
+ /** Main provider request hard timeout, in seconds. Default 600s. */
1075
+ readonly requestTimeoutSec?: number;
1076
+ /** Idle timeout between stream deltas, in seconds. Set 0 to disable. Default 0. */
1077
+ readonly streamIdleTimeoutSec?: number;
1078
+ /** Per stream chunk timeout, in seconds. Default 30s. */
1079
+ readonly chunkTimeoutSec?: number;
1080
+ /** Maximum retry delay, in seconds. Default 60s. */
1081
+ readonly maxRetryDelaySec?: number;
1082
+ }
1083
+ interface KodaXWorkflowTimeoutConfig {
1084
+ /** Workflow harness generation LLM call timeout, in seconds. Default 120s. */
1085
+ readonly generationTimeoutSec?: number;
1086
+ }
1087
+ /**
1088
+ * Public timeout budgets for user-facing waits. Internal cleanup and
1089
+ * resource-protection watchdogs intentionally stay outside this SDK contract.
1090
+ */
1091
+ interface KodaXTimeoutConfig {
1092
+ readonly llm?: KodaXLlmTimeoutConfig;
1093
+ readonly workflow?: KodaXWorkflowTimeoutConfig;
1094
+ }
1095
+ declare function timeoutSecToMs(value: number | undefined, label: string, opts?: {
1096
+ readonly allowZero?: boolean;
1097
+ }): number | undefined;
1098
+ declare function parseTimeoutSecEnvMs(raw: string | undefined): number | undefined;
1099
+ declare function providerResilienceConfigFromTimeouts(timeouts: KodaXTimeoutConfig | undefined): ProviderResilienceConfig | undefined;
1100
+
1101
+ /**
1102
+ * FEATURE_093 (v0.7.24): minimal contract interfaces for the coding extension
1103
+ * runtime. Extracted so `@kodax-ai/coding/src/types.ts` can reference the
1104
+ * extension runtime at the type level without importing `./extensions/runtime.js`,
1105
+ * which in turn imports from `types.ts` — a cycle that lasted since v0.7.20.
1106
+ *
1107
+ * Scope: the capability methods that tool execution consumes, plus optional
1108
+ * session lifecycle hooks that the coding run loop uses when the runtime
1109
+ * supports them.
1110
+ *
1111
+ * File must have NO imports from `../types.js` (that is the cycle we are
1112
+ * breaking). Shared capability/session value types come from `@kodax-ai/agent`.
1113
+ */
1114
+
1115
+ interface ExtensionRuntimeModelSelection {
1116
+ provider?: string;
1117
+ model?: string;
1118
+ }
1119
+ interface RuntimeDefaultsSnapshot {
1120
+ activeTools?: string[];
1121
+ modelSelection: ExtensionRuntimeModelSelection;
1122
+ thinkingLevel?: KodaXWireReasoningEffort;
1123
+ }
1124
+ interface BoundExtensionRuntimeController {
1125
+ queueUserMessage(message: string | KodaXMessage): void;
1126
+ getSessionState<T = KodaXJsonValue>(extensionId: string, key: string): T | undefined;
1127
+ setSessionState(extensionId: string, key: string, value: KodaXJsonValue | undefined): void;
1128
+ getSessionStateSnapshot(extensionId: string): Record<string, KodaXJsonValue>;
1129
+ appendSessionRecord(extensionId: string, type: string, data?: KodaXJsonValue, options?: {
1130
+ dedupeKey?: string;
1131
+ }): KodaXExtensionSessionRecord;
1132
+ listSessionRecords(extensionId: string, type?: string): KodaXExtensionSessionRecord[];
1133
+ clearSessionRecords(extensionId: string, type?: string): number;
1134
+ getActiveTools(): string[];
1135
+ setActiveTools(toolNames: string[]): void;
1136
+ getModelSelection(): ExtensionRuntimeModelSelection;
1137
+ setModelSelection(next: ExtensionRuntimeModelSelection): void;
1138
+ getThinkingLevel(): KodaXWireReasoningEffort | undefined;
1139
+ setThinkingLevel(level: KodaXWireReasoningEffort): void;
1140
+ }
1141
+ interface CapabilityRuntimeContract {
1142
+ searchCapabilities(providerId: string, query: string, options?: {
1143
+ kind?: CapabilityKind;
1144
+ limit?: number;
1145
+ server?: string;
1146
+ }): Promise<unknown[]>;
1147
+ describeCapability(providerId: string, capabilityId: string): Promise<unknown>;
1148
+ executeCapability(providerId: string, capabilityId: string, input: Record<string, unknown>): Promise<CapabilityResult>;
1149
+ readCapability(providerId: string, capabilityId: string, options?: Record<string, unknown>): Promise<CapabilityResult>;
1150
+ getCapabilityPrompt(providerId: string, capabilityId: string, args?: Record<string, unknown>): Promise<unknown>;
1151
+ getCapabilityPromptContext(providerId: string): Promise<string | undefined>;
1152
+ }
1153
+ interface ExtensionRuntimeContract extends CapabilityRuntimeContract {
1154
+ getDefaults?(): RuntimeDefaultsSnapshot;
1155
+ bindController?(controller: BoundExtensionRuntimeController): (() => void) | void;
1156
+ hydrateSession?(sessionId: string): Promise<void>;
1157
+ }
1158
+
1109
1159
  /**
1110
1160
  * FEATURE_200 Phase F (v0.7.45) — Todo domain types extracted from types.ts.
1111
1161
  * Self-contained (no other coding-type deps); re-exported from ../types.ts
@@ -1202,12 +1252,11 @@ type TodoList = readonly TodoItem[];
1202
1252
  * from types.ts. Self-contained; re-exported from ../types.ts (and 4 members
1203
1253
  * re-imported there for internal use). `../types` importers unaffected.
1204
1254
  */
1205
- type KodaXRepoIntelligenceMode = 'auto' | 'off' | 'oss' | 'premium-shared' | 'premium-native';
1206
- type KodaXRepoIntelligenceResolvedMode = 'off' | 'oss' | 'premium-shared' | 'premium-native';
1255
+ type KodaXRepoIntelligenceMode = 'auto' | 'off' | 'light' | 'full';
1256
+ type KodaXRepoIntelligenceResolvedMode = 'off' | 'light' | 'full';
1207
1257
  interface KodaXRepoIntelligenceCapability {
1208
1258
  mode: KodaXRepoIntelligenceResolvedMode;
1209
- engine: 'oss' | 'premium';
1210
- bridge: 'none' | 'shared' | 'native';
1259
+ engine: 'light' | 'full';
1211
1260
  level: 'basic' | 'enhanced';
1212
1261
  status: 'ok' | 'limited' | 'unavailable' | 'warming';
1213
1262
  warnings: string[];
@@ -1215,12 +1264,9 @@ interface KodaXRepoIntelligenceCapability {
1215
1264
  }
1216
1265
  interface KodaXRepoIntelligenceTrace {
1217
1266
  mode: KodaXRepoIntelligenceResolvedMode;
1218
- engine: 'oss' | 'premium';
1219
- bridge: 'none' | 'shared' | 'native';
1267
+ engine: 'light' | 'full';
1220
1268
  triggeredAt: string;
1221
- source: 'fallback' | 'premium';
1222
- daemonLatencyMs?: number;
1223
- cliLatencyMs?: number;
1269
+ source: 'light' | 'full';
1224
1270
  cacheHit?: boolean;
1225
1271
  capsuleBytes?: number;
1226
1272
  capsuleEstimatedTokens?: number;
@@ -1376,8 +1422,7 @@ interface KodaXEvents {
1376
1422
  * Fires whenever a provider's `withRateLimit` loop catches a 429 /
1377
1423
  * 503 / 529 (overloaded) response and decides to wait before
1378
1424
  * retrying. Supersedes the legacy `onProviderRateLimit` (kept for
1379
- * back-compat) by carrying the parsed source of the wait duration —
1380
- * UI layers (InkREPL spinner, cost tracker) can surface the
1425
+ * back-compat) by carrying the parsed source of the wait duration — * UI layers (InkREPL spinner, cost tracker) can surface the
1381
1426
  * difference between "provider told us to wait 45s" and "no header,
1382
1427
  * we're guessing 4s exp-backoff".
1383
1428
  *
@@ -1395,6 +1440,16 @@ interface KodaXEvents {
1395
1440
  attempt: number;
1396
1441
  maxAttempts: number;
1397
1442
  }, meta?: KodaXActivityEventMeta) => void;
1443
+ /**
1444
+ * Passive capability learning — fired when a provider HARD-rejects a
1445
+ * reasoning-effort value. The REPL records it in `capability-cache.json` so
1446
+ * the rung is narrowed out of the ladder and never offered/sent again.
1447
+ */
1448
+ onReasoningEffortRejected?: (event: {
1449
+ provider: string;
1450
+ model: string;
1451
+ effort: string;
1452
+ }) => void;
1398
1453
  onRepoIntelligenceTrace?: (event: KodaXRepoIntelligenceTraceEvent) => void;
1399
1454
  /**
1400
1455
  * Fired when the Sidecar Verifier produces an actionable message.
@@ -1469,7 +1524,7 @@ interface KodaXEvents {
1469
1524
  beforeToolExecute?: (tool: string, input: Record<string, unknown>, meta?: KodaXToolEventMeta) => Promise<boolean | string>;
1470
1525
  /** Ask user a question interactively - Issue 069 - 交互式向用户提问 */
1471
1526
  askUser?: (options: AskUserQuestionOptions, meta?: KodaXToolEventMeta) => Promise<string>;
1472
- /** Ask user multiple independent questions sequentially - 多问题顺序提问 */
1527
+ /** Ask user multiple independent questions sequentially - 澶氶棶棰橀『搴忔彁闂?*/
1473
1528
  askUserMulti?: (options: AskUserMultiOptions, meta?: KodaXToolEventMeta) => Promise<Record<string, string> | undefined>;
1474
1529
  /** Ask user for free-text input - 自由文本输入 (Issue 112) */
1475
1530
  askUserInput?: (options: {
@@ -1658,7 +1713,7 @@ interface KodaXTaskToolPolicy {
1658
1713
  }
1659
1714
  interface KodaXChildContextBundle {
1660
1715
  id: string;
1661
- fanoutClass: KodaXAmaFanoutClass;
1716
+ fanoutClass: KodaXChildFanoutClass;
1662
1717
  objective: string;
1663
1718
  scopeSummary?: string;
1664
1719
  evidenceRefs: string[];
@@ -1699,6 +1754,8 @@ interface KodaXChildContextBundle {
1699
1754
  */
1700
1755
  provider?: string;
1701
1756
  model?: string;
1757
+ /** Optional per-dispatch reasoning effort. Omit to inherit the parent effort. */
1758
+ effort?: KodaXWireReasoningEffort;
1702
1759
  }
1703
1760
  /**
1704
1761
  * FEATURE_120 v0.7.39 Phase 4 — model tier hint. Tier semantics:
@@ -1713,7 +1770,7 @@ interface KodaXChildContextBundle {
1713
1770
  type KodaXChildModelHint = 'fast' | 'balanced' | 'deep';
1714
1771
  interface KodaXChildAgentResult {
1715
1772
  childId: string;
1716
- fanoutClass: KodaXAmaFanoutClass;
1773
+ fanoutClass: KodaXChildFanoutClass;
1717
1774
  status: 'completed' | 'blocked' | 'failed';
1718
1775
  disposition: 'candidate' | 'valid' | 'false-positive' | 'needs-more-evidence';
1719
1776
  summary: string;
@@ -1766,46 +1823,6 @@ interface KodaXChildFinding {
1766
1823
  readonly evidence: readonly string[];
1767
1824
  readonly artifacts: readonly string[];
1768
1825
  }
1769
- interface KodaXFanoutSchedulerInput {
1770
- profile: KodaXAmaProfile;
1771
- fanoutClass: KodaXAmaFanoutClass;
1772
- maxChildren?: number;
1773
- bundles: KodaXChildContextBundle[];
1774
- reductionStrategy: KodaXParentReductionContract['strategy'];
1775
- }
1776
- type KodaXFanoutBranchLifecycle = 'scheduled' | 'deferred' | 'completed' | 'cancelled';
1777
- interface KodaXFanoutBranchRecord {
1778
- bundleId: string;
1779
- status: KodaXFanoutBranchLifecycle;
1780
- workerId?: string;
1781
- childId?: string;
1782
- reason?: string;
1783
- }
1784
- type KodaXFanoutBranchTransition = {
1785
- type: 'assign';
1786
- bundleId: string;
1787
- workerId: string;
1788
- } | {
1789
- type: 'complete';
1790
- bundleId: string;
1791
- childId?: string;
1792
- } | {
1793
- type: 'cancel';
1794
- bundleId: string;
1795
- reason: string;
1796
- };
1797
- interface KodaXFanoutSchedulerPlan {
1798
- enabled: boolean;
1799
- profile: KodaXAmaProfile;
1800
- fanoutClass: KodaXAmaFanoutClass;
1801
- branches: KodaXFanoutBranchRecord[];
1802
- scheduledBundleIds: string[];
1803
- deferredBundleIds: string[];
1804
- maxParallel: number;
1805
- mergeStrategy: KodaXParentReductionContract['strategy'];
1806
- cancellationPolicy: 'none' | 'winner-cancel' | 'budget-cancel';
1807
- reason: string;
1808
- }
1809
1826
  type KodaXAgentMode = 'ama' | 'sa' | 'amaw';
1810
1827
  type KodaXMemoryStrategy = 'continuous' | 'compact' | 'reset-handoff';
1811
1828
  type KodaXBudgetDisclosureZone = 'green' | 'yellow' | 'orange' | 'red';
@@ -1836,7 +1853,7 @@ interface KodaXManagedTaskStatusEvent {
1836
1853
  harnessProfile: KodaXHarnessProfile;
1837
1854
  activeWorkerId?: string;
1838
1855
  activeWorkerTitle?: string;
1839
- childFanoutClass?: KodaXAmaFanoutClass;
1856
+ childFanoutClass?: KodaXChildFanoutClass;
1840
1857
  childFanoutCount?: number;
1841
1858
  currentRound?: number;
1842
1859
  maxRounds?: number;
@@ -1877,8 +1894,7 @@ interface KodaXManagedTaskStatusEvent {
1877
1894
  * can tell how many outstanding pieces of work are pending. 0 with
1878
1895
  * `idleWaiting=true` is the transitional "background banner queued,
1879
1896
  * registry already drained" state (fast-child race recovery path,
1880
- * see FEATURE_155 hotfix follow-up #2) and renders as "idle —
1881
- * resuming".
1897
+ * see FEATURE_155 hotfix follow-up #2) and renders as "idle — * resuming".
1882
1898
  */
1883
1899
  idleWaitingPendingCount?: number;
1884
1900
  }
@@ -1943,10 +1959,30 @@ interface KodaXManagedBudgetSnapshot {
1943
1959
  extensionDenied?: boolean;
1944
1960
  extensionReason?: string;
1945
1961
  }
1946
- /** Mutable tracker for Scout mutation scope shared between worker events and protocol tool. */
1962
+ /** Mutable tracker for filesystem/shell mutations observed during managed Worker execution. */
1947
1963
  interface ManagedMutationTracker {
1948
1964
  readonly files: Map<string, number>;
1949
1965
  totalOps: number;
1966
+ /**
1967
+ * Count of high-risk shell mutations (git push/commit/rm, npm install/publish,
1968
+ * rm/mv/cp, etc.) the Worker ran via `bash`. Tracked separately from `totalOps`
1969
+ * because bash writes are a blind spot — we cannot know which file / how many
1970
+ * lines a shell command touched — so the Verifier gate fires conservatively on
1971
+ * any risky shell op rather than inferring risk back out of `totalOps`.
1972
+ * Optional: defaults to 0 when absent (read as `riskyShellOps ?? 0`).
1973
+ */
1974
+ riskyShellOps?: number;
1975
+ /**
1976
+ * Count of filesystem mutations whose touched file could NOT be attributed
1977
+ * from the tool input (the path is computed inside the handler): `undo`,
1978
+ * `worktree_create` / `worktree_remove`, `stage_construction` /
1979
+ * `stage_agent_construction`, or `stage_self_modify`. These bump `totalOps`
1980
+ * but leave `files` empty,
1981
+ * so without a separate count they would look like trivial no-op work to the
1982
+ * Verifier gate. Like `riskyShellOps`, an unattributable write is a blind spot
1983
+ * the gate fires on conservatively. Optional: read as `unattributedWriteOps ?? 0`.
1984
+ */
1985
+ unattributedWriteOps?: number;
1950
1986
  /** Set to true after scope reflection has been injected once. Prevents repeated injection. */
1951
1987
  reflectionInjected?: boolean;
1952
1988
  }
@@ -1981,8 +2017,7 @@ interface KodaXContextOptions {
1981
2017
  /**
1982
2018
  * FEATURE_087/088 (v0.7.28): when true, the prompt builder injects a
1983
2019
  * Tool Construction section that orients the LLM to the
1984
- * scaffold_tool → validate_tool → stage_construction → test_tool →
1985
- * activate_tool staircase. Off by default; the surrounding agent (REPL
2020
+ * scaffold_tool → validate_tool → stage_construction → test_tool → * activate_tool staircase. Off by default; the surrounding agent (REPL
1986
2021
  * config or task router) flips this on when self-construction is
1987
2022
  * authorized for the session. The corresponding builtin tool handlers
1988
2023
  * are still gated independently by the active-tool set.
@@ -2116,6 +2151,7 @@ interface KodaXOptions {
2116
2151
  provider: string;
2117
2152
  model?: string;
2118
2153
  modelOverride?: string;
2154
+ effort?: KodaXWireReasoningEffort;
2119
2155
  thinking?: boolean;
2120
2156
  reasoningMode?: KodaXReasoningMode;
2121
2157
  agentMode?: KodaXAgentMode;
@@ -2155,6 +2191,12 @@ interface KodaXOptions {
2155
2191
  * and `~/.kodax/config.json`. See {@link KodaXCompactionOverride}.
2156
2192
  */
2157
2193
  compaction?: KodaXCompactionOverride;
2194
+ /**
2195
+ * SDK-consumer timeout budgets for user-facing waits. Values are seconds at
2196
+ * the public API boundary; KodaX converts them to milliseconds internally.
2197
+ * This does not control internal cleanup/resource-protection watchdogs.
2198
+ */
2199
+ timeouts?: KodaXTimeoutConfig;
2158
2200
  }
2159
2201
  /**
2160
2202
  * Low-level mutators handed to a `KodaXSessionControl` by the substrate.
@@ -2225,13 +2267,34 @@ interface KodaXTaskEvidenceArtifact {
2225
2267
  path: string;
2226
2268
  description?: string;
2227
2269
  }
2228
- interface KodaXInputArtifact {
2229
- kind: 'image';
2230
- path: string;
2231
- mediaType?: string;
2232
- source: 'user-inline';
2233
- description?: string;
2270
+ type KodaXImageMediaType = 'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif';
2271
+ type KodaXVideoMediaType = 'video/mp4' | 'video/mpeg' | 'video/quicktime' | 'video/x-msvideo' | 'video/x-flv' | 'video/webm' | 'video/x-ms-wmv' | 'video/3gpp';
2272
+ type KodaXInputArtifactSource = 'user-inline' | 'clipboard' | 'drag-drop' | 'file-picker';
2273
+ interface KodaXImageInputArtifact {
2274
+ readonly kind: 'image';
2275
+ readonly path: string;
2276
+ readonly mediaType?: KodaXImageMediaType;
2277
+ readonly source?: KodaXInputArtifactSource;
2278
+ readonly description?: string;
2279
+ }
2280
+ interface KodaXFileInputArtifact {
2281
+ readonly kind: 'file';
2282
+ readonly path: string;
2283
+ readonly mediaType?: string;
2284
+ readonly mimeType?: string;
2285
+ readonly name?: string;
2286
+ readonly source?: KodaXInputArtifactSource;
2287
+ readonly description?: string;
2288
+ }
2289
+ interface KodaXVideoInputArtifact {
2290
+ readonly kind: 'video';
2291
+ readonly path: string;
2292
+ readonly mediaType: KodaXVideoMediaType;
2293
+ readonly name?: string;
2294
+ readonly source?: KodaXInputArtifactSource;
2295
+ readonly description?: string;
2234
2296
  }
2297
+ type KodaXInputArtifact = KodaXImageInputArtifact | KodaXFileInputArtifact | KodaXVideoInputArtifact;
2235
2298
  interface KodaXTaskEvidenceEntry {
2236
2299
  assignmentId: string;
2237
2300
  role: KodaXTaskRole;
@@ -2261,14 +2324,9 @@ interface KodaXOrchestrationVerdict {
2261
2324
  disposition?: 'complete' | 'blocked' | 'needs_continuation';
2262
2325
  }
2263
2326
  interface KodaXManagedTaskRuntimeState {
2264
- amaProfile?: KodaXAmaProfile;
2265
- amaTactics?: KodaXAmaTactic[];
2266
- amaFanout?: KodaXAmaFanoutPolicy;
2267
- amaControllerReason?: string;
2268
2327
  childContextBundles?: KodaXChildContextBundle[];
2269
2328
  childAgentResults?: KodaXChildAgentResult[];
2270
2329
  parentReductionContract?: KodaXParentReductionContract;
2271
- fanoutSchedulerPlan?: KodaXFanoutSchedulerPlan;
2272
2330
  budget?: KodaXManagedBudgetSnapshot;
2273
2331
  scorecard?: KodaXVerificationScorecard;
2274
2332
  qualityAssuranceMode?: 'required' | 'optional';
@@ -2323,8 +2381,7 @@ interface KodaXManagedTask {
2323
2381
  runtime?: KodaXManagedTaskRuntimeState;
2324
2382
  }
2325
2383
  interface KodaXManagedVerdictPayload {
2326
- /** FEATURE_184 (v0.7.45): `'sidecar'` is the new architectural source —
2327
- * Sidecar Verifier replaces the in-chain Evaluator role. `'evaluator'`
2384
+ /** FEATURE_184 (v0.7.45): `'sidecar'` is the new architectural source — * Sidecar Verifier replaces the in-chain Evaluator role. `'evaluator'`
2328
2385
  * / `'worker'` are retained for backward-compat reads of session jsonl
2329
2386
  * written before v0.7.45. New writes use `'sidecar'`. */
2330
2387
  source: 'evaluator' | 'worker' | 'sidecar';
@@ -2412,7 +2469,7 @@ interface KodaXResult {
2412
2469
  interface KodaXToolExecutionContext {
2413
2470
  /** File backups for undo functionality - 文件备份用于撤销功能 */
2414
2471
  backups: Map<string, string>;
2415
- /** Git root directory - Git 根目录 */
2472
+ /** Git root directory - Git 鏍圭洰褰?*/
2416
2473
  gitRoot?: string;
2417
2474
  /** FEATURE_221: SDK-consumer self-manual injection, forwarded from KodaXOptions. */
2418
2475
  selfManual?: KodaXSelfManualConfig;
@@ -2436,7 +2493,7 @@ interface KodaXToolExecutionContext {
2436
2493
  extensionRuntime?: CapabilityRuntimeContract;
2437
2494
  /** Ask user a question interactively (select mode) - 交互式向用户提问 (Issue 069) */
2438
2495
  askUser?: (options: AskUserQuestionOptions) => Promise<string>;
2439
- /** Ask user multiple independent questions sequentially - 多问题顺序提问 */
2496
+ /** Ask user multiple independent questions sequentially - 澶氶棶棰橀『搴忔彁闂?*/
2440
2497
  askUserMulti?: (options: AskUserMultiOptions) => Promise<Record<string, string> | undefined>;
2441
2498
  /** Ask user for free-text input - 自由文本输入 (Issue 112) */
2442
2499
  askUserInput?: (options: {
@@ -2478,6 +2535,9 @@ interface KodaXToolExecutionContext {
2478
2535
  readonly provider: string;
2479
2536
  readonly model?: string;
2480
2537
  readonly reasoningMode?: KodaXReasoningMode;
2538
+ readonly effort?: KodaXWireReasoningEffort;
2539
+ readonly repoIntelligenceMode?: KodaXRepoIntelligenceMode;
2540
+ readonly repoIntelligenceTrace?: boolean;
2481
2541
  };
2482
2542
  /**
2483
2543
  * Parent SDK/REPL callback surface available to child-dispatch tools.
@@ -2558,7 +2618,6 @@ interface KodaXToolExecutionContext {
2558
2618
  * child's `Runner.run` via `KodaXOptions.guardrails`. Sharing the SAME
2559
2619
  * guardrail instance means the auto-mode `engine` + `denialTracker` +
2560
2620
  * `circuitBreaker` state is observed across the parent/child boundary —
2561
- * design doc "防绕阈值" defense (a child can't escape the parent's
2562
2621
  * rate-limit by hitting the threshold from a fresh tracker).
2563
2622
  *
2564
2623
  * Single-process / single-thread execution makes the shared mutable state
@@ -2865,5 +2924,5 @@ interface CreateBashPrefixExtractorOptions {
2865
2924
  */
2866
2925
  declare function createBashPrefixExtractor(opts: CreateBashPrefixExtractorOptions): BashPrefixExtractor;
2867
2926
 
2868
- export { BASH_POLICY_SPEC as B, withGoalBeforeNextTurn as a$, buildGoalRuntimeBinding as aU, createBashPrefixExtractor as aV, decideWorkflowInvocation as aW, extractCommandPrefix as aX, getDefaultLspService as aY, makeDisabledGoalToolsContext as aZ, shutdownDefaultLspService as a_, LSP_SERVERS as as, LspService as au, withGoalStopHook as b0, workflowStartOutcomeConsumesTurn as b1 };
2869
- export type { KodaXResult as $, KodaXFanoutSchedulerPlan as A, CapabilityRuntimeContract as C, DiagnosticsRequest as D, ExtensionRuntimeContract as E, FailureStage as F, GoalBlockedResult as G, KodaXInputArtifact as H, KodaXManagedBudgetSnapshot as I, KodaXManagedProtocolPayload as J, KodaXActivityEventMeta as K, KodaXManagedTask as L, KodaXManagedTaskRuntimeState as M, KodaXManagedTaskStatusEvent as N, KodaXManualTopicId as O, KodaXManualTopicInput as P, KodaXMemoryStrategy as Q, KodaXOptions as R, KodaXOrchestrationVerdict as S, KodaXParentReductionContract as T, KodaXProviderPolicyHints as U, KodaXRepoIntelligenceCapability as V, KodaXRepoIntelligenceMode as W, KodaXRepoIntelligenceResolvedMode as X, KodaXRepoIntelligenceTrace as Y, KodaXRepoIntelligenceTraceEvent as Z, KodaXRepoRoutingSignals as _, BashPrefixExtractor as a, KodaXRoleRoundSummary as a0, KodaXRuntimeVerificationContract as a1, KodaXSelfManualConfig as a2, KodaXSessionControl as a3, KodaXSessionMutators as a4, KodaXSessionOptions as a5, KodaXSidecarMessageEvent as a6, KodaXSkillInvocationContext as a7, KodaXSkillMap as a8, KodaXSkillProjectionConfidence as a9, RecoveryAction as aA, RecoveryDecision as aB, RecoveryLadderStep as aC, RecoveryResult as aD, ResilienceClassification as aE, ResilienceErrorClass as aF, ResolveKodaXManualInput as aG, ResolveKodaXManualOptions as aH, ResolveKodaXManualResult as aI, RuntimeDefaultsSnapshot as aJ, TodoItem as aK, TodoList as aL, TodoStatus as aM, WorkflowHostPolicy as aN, WorkflowInvocationAction as aO, WorkflowInvocationPolicyDecision as aP, WorkflowInvocationPolicyInput as aQ, WorkflowInvocationSource as aR, WorkflowInvocationTrigger as aS, WorkflowStartOutcome as aT, KodaXTaskCapabilityHint as aa, KodaXTaskContract as ab, KodaXTaskEvidenceArtifact as ac, KodaXTaskEvidenceBundle as ad, KodaXTaskEvidenceEntry as ae, KodaXTaskRole as af, KodaXTaskRoleAssignment as ag, KodaXTaskStatus as ah, KodaXTaskSurface as ai, KodaXTaskToolPolicy as aj, KodaXTaskVerificationContract as ak, KodaXTaskVerificationCriterion as al, KodaXTaskWorkItem as am, KodaXToolEventMeta as an, KodaXToolExecutionContext as ao, KodaXVerificationScorecard as ap, KodaXVerificationScorecardCriterion as aq, KodaXWorkflowEventMeta as ar, LspServerInfo as at, LspServiceConfig as av, ProviderExecutionState as aw, ProviderRecoveryEvent as ax, ProviderResilienceConfig as ay, ProviderResiliencePolicy as az, BashPrefixResult as b, BoundExtensionRuntimeController as c, ChildSnapshotEvent as d, CreateBashPrefixExtractorOptions as e, ExtractCommandPrefixOptions as f, GoalCompleteResult as g, GoalCreateInput as h, GoalLifecycleContext as i, GoalRuntimeBinding as j, GoalRuntimeBindingDeps as k, GoalToolsContext as l, KodaXAgentMode as m, KodaXBudgetDisclosureZone as n, KodaXBudgetExtensionRequest as o, KodaXChildAgentResult as p, KodaXChildContextBundle as q, KodaXChildExecutionResult as r, KodaXCompactionOverride as s, KodaXContextOptions as t, KodaXContextTokenSnapshot as u, KodaXEvents as v, KodaXFanoutBranchLifecycle as w, KodaXFanoutBranchRecord as x, KodaXFanoutBranchTransition as y, KodaXFanoutSchedulerInput as z };
2927
+ export { BASH_POLICY_SPEC as B, extractCommandPrefix as a$, buildGoalRuntimeBinding as aY, createBashPrefixExtractor as aZ, decideWorkflowInvocation as a_, LSP_SERVERS as aw, LspService as ay, getDefaultLspService as b0, makeDisabledGoalToolsContext as b1, parseTimeoutSecEnvMs as b2, providerResilienceConfigFromTimeouts as b3, shutdownDefaultLspService as b4, timeoutSecToMs as b5, withGoalBeforeNextTurn as b6, withGoalStopHook as b7, workflowStartOutcomeConsumesTurn as b8 };
2928
+ export type { KodaXResult as $, KodaXInputArtifactSource as A, CapabilityRuntimeContract as C, DiagnosticsRequest as D, ExtensionRuntimeContract as E, FailureStage as F, GoalBlockedResult as G, KodaXLlmTimeoutConfig as H, KodaXManagedBudgetSnapshot as I, KodaXManagedProtocolPayload as J, KodaXActivityEventMeta as K, KodaXManagedTask as L, KodaXManagedTaskRuntimeState as M, KodaXManagedTaskStatusEvent as N, KodaXManualTopicId as O, KodaXManualTopicInput as P, KodaXMemoryStrategy as Q, KodaXOptions as R, KodaXOrchestrationVerdict as S, KodaXParentReductionContract as T, KodaXProviderPolicyHints as U, KodaXRepoIntelligenceCapability as V, KodaXRepoIntelligenceMode as W, KodaXRepoIntelligenceResolvedMode as X, KodaXRepoIntelligenceTrace as Y, KodaXRepoIntelligenceTraceEvent as Z, KodaXRepoRoutingSignals as _, BashPrefixExtractor as a, KodaXRoleRoundSummary as a0, KodaXRuntimeVerificationContract as a1, KodaXSelfManualConfig as a2, KodaXSessionControl as a3, KodaXSessionMutators as a4, KodaXSessionOptions as a5, KodaXSidecarMessageEvent as a6, KodaXSkillInvocationContext as a7, KodaXSkillMap as a8, KodaXSkillProjectionConfidence as a9, ProviderExecutionState as aA, ProviderRecoveryEvent as aB, ProviderResilienceConfig as aC, ProviderResiliencePolicy as aD, RecoveryAction as aE, RecoveryDecision as aF, RecoveryLadderStep as aG, RecoveryResult as aH, ResilienceClassification as aI, ResilienceErrorClass as aJ, ResolveKodaXManualInput as aK, ResolveKodaXManualOptions as aL, ResolveKodaXManualResult as aM, RuntimeDefaultsSnapshot as aN, TodoItem as aO, TodoList as aP, TodoStatus as aQ, WorkflowHostPolicy as aR, WorkflowInvocationAction as aS, WorkflowInvocationPolicyDecision as aT, WorkflowInvocationPolicyInput as aU, WorkflowInvocationSource as aV, WorkflowInvocationTrigger as aW, WorkflowStartOutcome as aX, KodaXTaskCapabilityHint as aa, KodaXTaskContract as ab, KodaXTaskEvidenceArtifact as ac, KodaXTaskEvidenceBundle as ad, KodaXTaskEvidenceEntry as ae, KodaXTaskRole as af, KodaXTaskRoleAssignment as ag, KodaXTaskStatus as ah, KodaXTaskSurface as ai, KodaXTaskToolPolicy as aj, KodaXTaskVerificationContract as ak, KodaXTaskVerificationCriterion as al, KodaXTaskWorkItem as am, KodaXTimeoutConfig as an, KodaXToolEventMeta as ao, KodaXToolExecutionContext as ap, KodaXVerificationScorecard as aq, KodaXVerificationScorecardCriterion as ar, KodaXVideoInputArtifact as as, KodaXVideoMediaType as at, KodaXWorkflowEventMeta as au, KodaXWorkflowTimeoutConfig as av, LspServerInfo as ax, LspServiceConfig as az, BashPrefixResult as b, BoundExtensionRuntimeController as c, ChildSnapshotEvent as d, CreateBashPrefixExtractorOptions as e, ExtractCommandPrefixOptions as f, GoalCompleteResult as g, GoalCreateInput as h, GoalLifecycleContext as i, GoalRuntimeBinding as j, GoalRuntimeBindingDeps as k, GoalToolsContext as l, KodaXAgentMode as m, KodaXBudgetDisclosureZone as n, KodaXBudgetExtensionRequest as o, KodaXChildAgentResult as p, KodaXChildContextBundle as q, KodaXChildExecutionResult as r, KodaXCompactionOverride as s, KodaXContextOptions as t, KodaXContextTokenSnapshot as u, KodaXEvents as v, KodaXFileInputArtifact as w, KodaXImageInputArtifact as x, KodaXImageMediaType as y, KodaXInputArtifact as z };
@@ -1,6 +1,6 @@
1
- import { o as KodaXMessage } from './base.d-BBNUF9nz.js';
2
- import { Q as QueueEventListener, e as QueuedMessage, E as EnqueueInput, D as DequeueFilter } from './types.d-D4jL-gAA.js';
3
- import { f as AgentMessage, aM as SessionEntry, aK as Session, aO as SessionExtension, a4 as KodaXSessionLineage, W as KodaXJsonValue, p as CompactionDetails, O as KodaXCompactMemorySeed, a0 as KodaXSessionEntry, ab as KodaXSessionTreeNode, a3 as KodaXSessionLabelEntry, a2 as KodaXSessionGoalEntry, a7 as KodaXSessionNavigationOptions, Y as KodaXSessionArtifactLedgerEntry, x as FileOperations, br as WorkflowMeta, bs as WorkflowModelHint, bt as WorkflowModule } from './process.d-Bj82oJhD.js';
1
+ import { j as KodaXMessage } from './types.d-6VOXvF88.js';
2
+ import { Q as QueueEventListener, c as QueuedMessage, E as EnqueueInput, D as DequeueFilter } from './types.d-D8WcfrOD.js';
3
+ import { f as AgentMessage, aM as SessionEntry, aK as Session, aO as SessionExtension, a4 as KodaXSessionLineage, W as KodaXJsonValue, p as CompactionDetails, O as KodaXCompactMemorySeed, a0 as KodaXSessionEntry, ab as KodaXSessionTreeNode, a3 as KodaXSessionLabelEntry, a2 as KodaXSessionGoalEntry, a7 as KodaXSessionNavigationOptions, Y as KodaXSessionArtifactLedgerEntry, x as FileOperations, br as WorkflowMeta, bs as WorkflowModelHint, bt as WorkflowModule } from './process.d-BZncyzEj.js';
4
4
 
5
5
  /**
6
6
  * @kodax-ai/agent Constants
@@ -188,8 +188,8 @@ declare class DefaultSummaryCompaction implements CompactionPolicy {
188
188
  * before any subsystem reads the path.
189
189
  * 2. **`KODAX_HOME` env var** — middle priority. Used by shell / CI /
190
190
  * test isolation / multi-tenant shared machines. (Already honored
191
- * historically by `@kodax-ai/llm/src/reasoning-overrides.ts`; this
192
- * helper makes it the canonical path for all packages.)
191
+ * historically by the llm-layer config helpers; this helper makes it
192
+ * the canonical path for all packages.)
193
193
  * 3. **`~/.kodax/`** — lowest priority. Default for the standalone
194
194
  * kodax CLI. With DI not set + env not set, the resolver returns
195
195
  * the same byte sequence as the prior hardcoded
@@ -209,9 +209,9 @@ declare class DefaultSummaryCompaction implements CompactionPolicy {
209
209
  * `~/.opsagent/` simultaneously).
210
210
  *
211
211
  * NOT migrated:
212
- * - `@kodax-ai/llm/src/reasoning-overrides.ts:49` keeps its inline
212
+ * - llm-layer config helpers keep their inline
213
213
  * `process.env.KODAX_HOME ?? path.join(os.homedir(), '.kodax')`
214
- * fallback because moving it to this helper would create an
214
+ * fallback because moving them to this helper would create an
215
215
  * `@kodax-ai/llm → @kodax-ai/agent` dependency cycle (agent already
216
216
  * imports ai). The two implementations have identical observable
217
217
  * behavior at the env / default tiers; the programmatic override
@@ -382,8 +382,10 @@ declare function _resetMessageQueueForTests(): void;
382
382
  * history and fixes mis-pairings on both sides — orphan `tool_use` in
383
383
  * assistant messages, orphan `tool_result` in user messages, and ensures
384
384
  * no message becomes empty after stripping (Kimi specifically rejects
385
- * empty assistant messages with 400, so we inject a `'...'` placeholder
386
- * when stripping would empty an assistant message).
385
+ * empty assistant messages with 400, so we inject an EMPTY text-block
386
+ * marker when stripping would empty an assistant message — the visible
387
+ * `'...'` is synthesized wire-only by the provider serializer, never
388
+ * persisted into history).
387
389
  *
388
390
  * Migration history: extracted from `agent.ts` (originally lines 517–758)
389
391
  * during FEATURE_100 P2. Both `agent.ts` and `task-engine/runner-driven.ts`
@@ -407,8 +409,9 @@ declare function _resetMessageQueueForTests(): void;
407
409
  * message → removed
408
410
  * - user `tool_result` with empty / missing tool_use_id → removed
409
411
  * - assistant message that becomes content-empty after stripping → inject
410
- * a `'...'` placeholder text block (preserves message-alternation invariant
411
- * downstream providers like Kimi require)
412
+ * an EMPTY text-block marker (preserves message-alternation invariant
413
+ * downstream providers like Kimi require; the visible '...' is added
414
+ * wire-only by the serializer, never persisted)
412
415
  */
413
416
  declare function validateAndFixToolHistory(messages: KodaXMessage[]): KodaXMessage[];
414
417
  /**