@kodax-ai/kodax 0.7.45 → 0.7.47

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 (53) hide show
  1. package/CHANGELOG.md +57 -1
  2. package/README.md +1 -1
  3. package/README_CN.md +1 -1
  4. package/dist/builtin/skill-creator/scripts/utils.js +12 -27
  5. package/dist/chunks/{chunk-FKB7BWQT.js → chunk-2SMCCP44.js} +1 -1
  6. package/dist/chunks/chunk-66B6ZOU7.js +31 -0
  7. package/dist/chunks/chunk-ARUWXX25.js +2 -0
  8. package/dist/chunks/chunk-KRHAO2T3.js +567 -0
  9. package/dist/chunks/chunk-QZFZIGPF.js +2 -0
  10. package/dist/chunks/{chunk-X6EHEQWP.js → chunk-VGRG2F6H.js} +301 -263
  11. package/dist/chunks/chunk-VX6HN3JP.js +415 -0
  12. package/dist/chunks/{compaction-config-WCNGYWT3.js → compaction-config-YU7SI6L6.js} +1 -1
  13. package/dist/chunks/{construction-bootstrap-OB5SDNBD.js → construction-bootstrap-6UN3OY7X.js} +1 -1
  14. package/dist/chunks/devtools-4CRULTR2.js +2 -0
  15. package/dist/chunks/devtools-YINBSZC7.js +2 -0
  16. package/dist/chunks/dist-DS2KIZQG.js +2 -0
  17. package/dist/chunks/dist-IDNOAB4M.js +2 -0
  18. package/dist/chunks/{utils-CHXCBR3Q.js → utils-3ISOUEFC.js} +1 -1
  19. package/dist/index.d.ts +15 -12
  20. package/dist/index.js +5 -5
  21. package/dist/kodax_cli.js +986 -926
  22. package/dist/provider-capabilities.json +32 -23
  23. package/dist/sdk-agent.d.ts +42 -11
  24. package/dist/sdk-agent.js +1 -1
  25. package/dist/sdk-coding.d.ts +74 -14
  26. package/dist/sdk-coding.js +1 -1
  27. package/dist/sdk-llm.d.ts +84 -7
  28. package/dist/sdk-llm.js +1 -1
  29. package/dist/sdk-mcp.d.ts +1 -1
  30. package/dist/sdk-mcp.js +1 -1
  31. package/dist/sdk-repl.d.ts +19 -9
  32. package/dist/sdk-repl.js +2 -2
  33. package/dist/sdk-session.d.ts +27 -6
  34. package/dist/sdk-session.js +1 -1
  35. package/dist/sdk-skills.js +1 -1
  36. package/dist/types-chunks/{base.d-FUJahC0i.d.ts → base.d-BdJKSPO2.d.ts} +18 -1
  37. package/dist/types-chunks/{bash-prefix-extractor.d-HrTUwtV7.d.ts → bash-prefix-extractor.d-D6hL0Cuv.d.ts} +284 -6
  38. package/dist/types-chunks/{file-tracker.d-DOfaoCbJ.d.ts → file-tracker.d-BNTIvsdb.d.ts} +11 -4
  39. package/dist/types-chunks/{manager.d-87belpiS.d.ts → manager.d-U3UEwY1P.d.ts} +15 -0
  40. package/dist/types-chunks/{resolver.d-OMwxURit.d.ts → resolver.d-DkgJlEzr.d.ts} +79 -3
  41. package/dist/types-chunks/{storage.d-BvTdjYQF.d.ts → storage.d-B1Jk6ryM.d.ts} +79 -4
  42. package/dist/types-chunks/{types.d-HBbWT-iA.d.ts → types.d-B_MIIApc.d.ts} +1 -1
  43. package/dist/types-chunks/{types.d-B1uGoVTE.d.ts → types.d-Cf-GCzac.d.ts} +82 -1
  44. package/dist/types-chunks/{types.d-DM8zEJgF.d.ts → types.d-D2RNa5Y7.d.ts} +2 -2
  45. package/dist/types-chunks/{utils.d-DSEX6Rq1.d.ts → utils.d-umRKgMAu.d.ts} +19 -5
  46. package/package.json +2 -1
  47. package/dist/chunks/chunk-CZHIUJQS.js +0 -535
  48. package/dist/chunks/chunk-FT2XFFNP.js +0 -2
  49. package/dist/chunks/chunk-IJUB7QXG.js +0 -425
  50. package/dist/chunks/chunk-PGF5EZ7C.js +0 -31
  51. package/dist/chunks/devtools-EYGFOXEU.js +0 -2
  52. package/dist/chunks/dist-C2VOGY5Z.js +0 -2
  53. package/dist/chunks/dist-Q2PQM7U7.js +0 -2
@@ -1,4 +1,4 @@
1
- import { n as KodaXSessionData, s as KodaXSessionLineage, v as KodaXSessionNavigationOptions, w as KodaXSessionRuntimeInfo, y as KodaXSessionStorage } from './types.d-HBbWT-iA.js';
1
+ import { n as KodaXSessionData, s as KodaXSessionLineage, v as KodaXSessionNavigationOptions, w as KodaXSessionRuntimeInfo, y as KodaXSessionStorage } from './types.d-B_MIIApc.js';
2
2
 
3
3
  /**
4
4
  * Session Storage - Session storage abstraction layer
@@ -70,17 +70,61 @@ declare function createMemorySessionStorage(): SessionStorage;
70
70
 
71
71
  declare class FileSessionStorage implements KodaXSessionStorage {
72
72
  private readonly sessionsDir;
73
+ /**
74
+ * v0.7.46 — optional explicit project cwd for in-process embedders
75
+ * (KodaX Space) serving multiple projects from a single runtime.
76
+ * Threaded through `getGitRoot(this.hostCwd)` and `inspectWorkspaceRuntime({cwd: this.hostCwd})`
77
+ * so the workspace-mismatch check in `load()` compares against the
78
+ * project the embedder opened, NOT the embedder's startup directory.
79
+ * Unset → all paths behave identically to the pre-v0.7.46 form.
80
+ */
81
+ private readonly hostCwd?;
82
+ /**
83
+ * v0.7.46 F7 — explicit opt-in for the CLI-style "[Warning] Session
84
+ * project mismatch" stderr notice emitted from `load()`. Pre-v0.7.46
85
+ * the gate was `!this.hostCwd` which fired whenever the embedder
86
+ * hadn't supplied a cwd — but that ALSO matched SDK consumers who
87
+ * don't set cwd (e.g. KodaX Space), bleeding the yellow warning into
88
+ * their stdout/stderr UI channels on every cross-project load. The
89
+ * v0.7.46 default is `false` — silent. CLI surfaces that want the
90
+ * old behavior (warn when user resumes a session from outside its
91
+ * original project) can pass `emitMismatchWarnings: true`.
92
+ */
93
+ private readonly emitMismatchWarnings;
73
94
  constructor(opts?: {
74
95
  sessionsDir?: string;
96
+ cwd?: string;
97
+ emitMismatchWarnings?: boolean;
75
98
  });
76
99
  private writeQueues;
77
100
  private serializedWrite;
78
101
  private appendState;
102
+ private sessionDirCache;
103
+ private projectJsonWritten;
104
+ private migrationPromise?;
105
+ private ensureMigrated;
79
106
  /** Update watermarks. Only overwrites fields the caller actually provided. */
80
107
  private syncAppendState;
81
- private getSessionFilePath;
82
- private getArchiveFilePath;
108
+ private legacyFlatPath;
109
+ private legacyFlatArchivePath;
110
+ private projectDir;
111
+ /** Resolve (and cache) the project directory a write for `id` should land in. */
112
+ private resolveWriteDir;
113
+ private writeFilePath;
114
+ /**
115
+ * id-only locator (ADR-038 §7). Resolution order:
116
+ * 1. cached project dir for this id
117
+ * 2. bounded scan of project dirs: <key>/<id>.jsonl
118
+ * 3. bounded scan of archived: <key>/archived/<id>.jsonl
119
+ * 4. legacy flat: <sessionsDir>/<id>.jsonl
120
+ * On multiple matches (only possible for pre-FEATURE_219 same-second
121
+ * duplicate ids) it prefers the current process's project dir, else
122
+ * returns null with a warning rather than guessing.
123
+ */
124
+ private resolveSessionLocation;
83
125
  private readSession;
126
+ /** Write `<dir>/project.json` once per process per directory (best-effort). */
127
+ private ensureProjectJson;
84
128
  private writeSessionInternal;
85
129
  private mergeAndWriteInternal;
86
130
  appendSessionDelta(id: string, data: SessionData): Promise<void>;
@@ -101,12 +145,43 @@ declare class FileSessionStorage implements KodaXSessionStorage {
101
145
  sessionId: string;
102
146
  data: SessionData;
103
147
  } | null>;
104
- list(gitRoot?: string): Promise<Array<{
148
+ /**
149
+ * v0.7.46 — `opts.limit` added so SDK consumers can request more than
150
+ * the legacy 10-entry cap. Default stays at 10 to preserve the
151
+ * interactive REPL picker's behavior. The `public-api.ts` fast path
152
+ * forwards the caller's `limit`; `deleteAll()` passes a large value
153
+ * so it can enumerate ALL sessions for the gitRoot.
154
+ *
155
+ * v0.7.46 — return now carries `createdAt` so the fast path in
156
+ * `public-api.ts` no longer silently strips it. Pre-v0.7.46 callers
157
+ * that only destructured `{id, title, msgCount, runtimeInfo}` are
158
+ * unaffected (extra fields are ignored).
159
+ */
160
+ list(gitRoot?: string, opts?: {
161
+ limit?: number;
162
+ includeArchived?: boolean;
163
+ }): Promise<Array<{
105
164
  id: string;
106
165
  title: string;
107
166
  msgCount: number;
108
167
  runtimeInfo?: KodaXSessionRuntimeInfo;
168
+ archived?: boolean;
169
+ createdAt?: string;
109
170
  }>>;
171
+ /**
172
+ * FEATURE_219 Phase 4 — whole-session archive (ADR-038 §4). Moves the session
173
+ * file together with its island sidecar into `<projectKey>/archived/`. Paired
174
+ * (never orphans the sidecar). No-op + returns false for a missing session.
175
+ */
176
+ archive(id: string): Promise<boolean>;
177
+ /** Restore an archived session back into its project directory. */
178
+ unarchive(id: string): Promise<boolean>;
179
+ /**
180
+ * Move a session + its island sidecar between two directories. Propagates a
181
+ * non-ENOENT rename error (e.g. Windows file-in-use) so a partial move is
182
+ * surfaced as a failure instead of silently splitting main + sidecar.
183
+ */
184
+ private movePair;
110
185
  delete(id: string): Promise<void>;
111
186
  deleteAll(gitRoot?: string): Promise<void>;
112
187
  /**
@@ -1,4 +1,4 @@
1
- import { m as KodaXMessage } from './types.d-B1uGoVTE.js';
1
+ import { n as KodaXMessage } from './types.d-Cf-GCzac.js';
2
2
 
3
3
  /**
4
4
  * @kodax-ai/agent Types
@@ -240,6 +240,69 @@ interface KodaXModelDescriptor {
240
240
  }
241
241
  type KodaXProtocolFamily = 'anthropic' | 'openai';
242
242
  type KodaXProviderUserAgentMode = 'compat' | 'sdk';
243
+ /**
244
+ * FEATURE_216 v0.7.45 — Strategy KodaX uses to verify a provider's API
245
+ * credentials. Per-provider data-driven (set in `provider-capabilities.json`)
246
+ * because the 14 providers KodaX ships do not share a single zero-token
247
+ * verify primitive — empirically 3 distinct strategies are needed:
248
+ *
249
+ * - `count-tokens`: Anthropic-protocol `messages.countTokens()` —
250
+ * true 0-token (input_tokens reported but no model invocation).
251
+ * Use for Anthropic-compat providers whose upstream implements
252
+ * `/v1/messages/count_tokens`.
253
+ * - `models-list`: `models.list()` — 0-token, authenticated GET.
254
+ * Use ONLY when the provider's `/v1/models` endpoint actually
255
+ * gates on auth (some compat layers expose it publicly → false
256
+ * positives; others 401 even for valid keys → false negatives).
257
+ * - `minimal-message`: `{messages,chat.completions}.create({max_tokens:1})`
258
+ * — ~6-7 tokens / call. Universal fallback for providers where
259
+ * the above two are unreliable. Cost is trivial for UI-button
260
+ * "test connection" use cases (≈ $0.00001 per verify).
261
+ * - `unsupported`: Provider has no verify primitive (CLI bridges
262
+ * own credentials in their own subprocess token store; the SDK
263
+ * does not enter that surface).
264
+ */
265
+ type KodaXVerifyStrategy = 'count-tokens' | 'models-list' | 'minimal-message' | 'unsupported';
266
+ /**
267
+ * FEATURE_216 v0.7.45 — Never-throws result envelope for
268
+ * `provider.verifyCredential()` / `verifyProviderCredential(name)`.
269
+ * Mirrors `side-query.ts` `SideQueryResult` pattern: every failure
270
+ * mode is captured in the returned object — no rejection, no throw.
271
+ */
272
+ interface KodaXVerifyCredentialResult {
273
+ readonly ok: boolean;
274
+ /** HTTP status when applicable (verify primitives that hit the wire). */
275
+ readonly status?: number;
276
+ /**
277
+ * Error category. Stable for UI consumers to map to user-facing
278
+ * states ("invalid key", "no network", "provider doesn't support
279
+ * verification", etc.). `unconfigured` is set by the top-level
280
+ * helper when env var is missing — avoids the provider ctor throw
281
+ * (per FEATURE_198 model-capabilities exposure pattern).
282
+ */
283
+ readonly error?: 'unauthorized' | 'network' | 'timeout' | 'unsupported' | 'unconfigured' | 'server_error' | 'rate_limited' | 'unknown';
284
+ /** Upstream error body or short diagnostic, capped to 240 chars. */
285
+ readonly message?: string;
286
+ readonly durationMs: number;
287
+ /** Estimated token cost: 0 (count-tokens / models-list) or ~6-7 (minimal-message). */
288
+ readonly approxTokensSpent: number;
289
+ /** Which strategy ran (or 'unsupported' if no primitive was attempted). */
290
+ readonly strategy: KodaXVerifyStrategy;
291
+ }
292
+ /**
293
+ * FEATURE_216 v0.7.45 — Best-effort upstream model listing. Distinct from
294
+ * credential verification: this is for "model picker" UIs. Mixes upstream
295
+ * `/v1/models` data with static `provider-capabilities.json` fallback when
296
+ * the upstream endpoint is unreliable. NOT a cred test — for that, call
297
+ * `verifyProviderCredential()`.
298
+ */
299
+ interface KodaXListModelsResult {
300
+ readonly ok: boolean;
301
+ readonly source: 'upstream' | 'static' | 'failed';
302
+ readonly models?: readonly string[];
303
+ readonly error?: string;
304
+ readonly durationMs: number;
305
+ }
243
306
  interface KodaXCustomProviderConfig {
244
307
  name: string;
245
308
  protocol: KodaXProtocolFamily;
@@ -287,6 +350,15 @@ interface KodaXCustomProviderConfig {
287
350
  * override.
288
351
  */
289
352
  streamMaxDurationMs?: number;
353
+ /**
354
+ * FEATURE_216 v0.7.45 — Which verify primitive this provider supports.
355
+ * Optional: when unset, the SDK derives a default from `protocol`
356
+ * (anthropic → count-tokens / openai → models-list). Set explicitly when
357
+ * the upstream `/v1/models` is public (false-positive risk) or the
358
+ * `messages.count_tokens` endpoint is unimplemented (404), in which
359
+ * case `minimal-message` is the only safe fallback.
360
+ */
361
+ verifyStrategy?: KodaXVerifyStrategy;
290
362
  }
291
363
  interface KodaXProviderConfig {
292
364
  apiKeyEnv: string;
@@ -349,6 +421,15 @@ interface KodaXProviderConfig {
349
421
  * the ~RTT margin between client send and server kill timestamp).
350
422
  */
351
423
  streamMaxDurationMs?: number;
424
+ /**
425
+ * FEATURE_216 v0.7.45 — Which verify primitive this provider's compat
426
+ * base class uses for `verifyCredential()`. Sourced from
427
+ * `provider-capabilities.json` for built-in providers; for custom
428
+ * providers, falls back to a protocol-derived default
429
+ * (anthropic → count-tokens / openai → models-list) when the custom
430
+ * config does not set it explicitly.
431
+ */
432
+ verifyStrategy?: KodaXVerifyStrategy;
352
433
  }
353
434
  interface KodaXProviderStreamOptions {
354
435
  onTextDelta?: (text: string) => void;
@@ -397,4 +478,4 @@ interface KodaXProviderStreamOptions {
397
478
  signal?: AbortSignal;
398
479
  }
399
480
 
400
- export type { KodaXToolResultTextItem as $, KodaXProviderToolCallingFidelity as A, KodaXProviderTransport as B, KodaXReasoningCapability as C, KodaXReasoningMode as D, KodaXReasoningOverride as E, KodaXReasoningRequest as F, KodaXRedactedThinkingBlock as G, KodaXReviewScale as H, KodaXRiskLevel as I, KodaXStreamResult as J, KodaXAmaControllerDecision as K, KodaXTaskActionability as L, KodaXTaskBudgetOverrides as M, KodaXTaskComplexity as N, KodaXTaskFamily as O, KodaXTaskRoutingDecision as P, KodaXTaskType as Q, KodaXTaskWorkIntent as R, KodaXTextBlock as S, KodaXThinkingBlock as T, KodaXThinkingBudgetMap as U, KodaXThinkingDepth as V, KodaXTokenUsage as W, KodaXToolDefinition as X, KodaXToolResultBlock as Y, KodaXToolResultContentItem as Z, KodaXToolResultImageItem as _, KodaXAmaFanoutClass as a, KodaXToolUseBlock as a0, KodaXAmaFanoutPolicy as b, KodaXAmaProfile as c, KodaXAmaTactic as d, KodaXAssuranceIntent as e, KodaXCacheBoundary as f, KodaXContentBlock as g, KodaXCustomProviderConfig as h, KodaXExecutionMode as i, KodaXExecutionPattern as j, KodaXHarnessProfile as k, KodaXImageBlock as l, KodaXMessage as m, KodaXModelDescriptor as n, KodaXMutationSurface as o, KodaXProtocolFamily as p, KodaXProviderCapabilityProfile as q, KodaXProviderConfig as r, KodaXProviderContextFidelity as s, KodaXProviderConversationSemantics as t, KodaXProviderEvidenceSupport as u, KodaXProviderLongRunningSupport as v, KodaXProviderMcpSupport as w, KodaXProviderMultimodalSupport as x, KodaXProviderSessionSupport as y, KodaXProviderStreamOptions as z };
481
+ export type { KodaXToolResultImageItem as $, KodaXProviderStreamOptions as A, KodaXProviderToolCallingFidelity as B, KodaXProviderTransport as C, KodaXReasoningCapability as D, KodaXReasoningMode as E, KodaXReasoningOverride as F, KodaXReasoningRequest as G, KodaXRedactedThinkingBlock as H, KodaXReviewScale as I, KodaXRiskLevel as J, KodaXAmaControllerDecision as K, KodaXStreamResult as L, KodaXTaskActionability as M, KodaXTaskBudgetOverrides as N, KodaXTaskComplexity as O, KodaXTaskFamily as P, KodaXTaskRoutingDecision as Q, KodaXTaskType as R, KodaXTaskWorkIntent as S, KodaXTextBlock as T, KodaXThinkingBlock as U, KodaXThinkingBudgetMap as V, KodaXThinkingDepth as W, KodaXTokenUsage as X, KodaXToolDefinition as Y, KodaXToolResultBlock as Z, KodaXToolResultContentItem as _, KodaXAmaFanoutClass as a, KodaXToolResultTextItem as a0, KodaXToolUseBlock as a1, KodaXVerifyCredentialResult as a2, KodaXVerifyStrategy as a3, KodaXAmaFanoutPolicy as b, KodaXAmaProfile as c, KodaXAmaTactic as d, KodaXAssuranceIntent as e, KodaXCacheBoundary as f, KodaXContentBlock as g, KodaXCustomProviderConfig as h, KodaXExecutionMode as i, KodaXExecutionPattern as j, KodaXHarnessProfile as k, KodaXImageBlock as l, KodaXListModelsResult as m, KodaXMessage as n, KodaXModelDescriptor as o, KodaXMutationSurface as p, KodaXProtocolFamily as q, KodaXProviderCapabilityProfile as r, KodaXProviderConfig as s, KodaXProviderContextFidelity as t, KodaXProviderConversationSemantics as u, KodaXProviderEvidenceSupport as v, KodaXProviderLongRunningSupport as w, KodaXProviderMcpSupport as x, KodaXProviderMultimodalSupport as y, KodaXProviderSessionSupport as z };
@@ -1,5 +1,5 @@
1
- import { X as KodaXToolDefinition, m as KodaXMessage, D as KodaXReasoningMode, Z as KodaXToolResultContentItem, T as KodaXThinkingBlock, G as KodaXRedactedThinkingBlock } from './types.d-B1uGoVTE.js';
2
- import { a as KodaXCompactMemorySeed, k as KodaXSessionArtifactLedgerEntry } from './types.d-HBbWT-iA.js';
1
+ import { Y as KodaXToolDefinition, n as KodaXMessage, E as KodaXReasoningMode, _ as KodaXToolResultContentItem, U as KodaXThinkingBlock, H as KodaXRedactedThinkingBlock } from './types.d-Cf-GCzac.js';
2
+ import { a as KodaXCompactMemorySeed, k as KodaXSessionArtifactLedgerEntry } from './types.d-B_MIIApc.js';
3
3
 
4
4
  /**
5
5
  * Layer A Primitive: Agent / Handoff / Guardrail / AgentReasoningProfile
@@ -1,7 +1,7 @@
1
- import { l as BashPrefixExtractor, a1 as KodaXOptions, L as KodaXContextTokenSnapshot, K as KodaXAgentMode, a6 as KodaXRepoIntelligenceMode, A as AgentsFile, i as AutoModeStats, ah as KodaXSkillInvocationContext, _ as KodaXMcpServersConfig } from './bash-prefix-extractor.d-HrTUwtV7.js';
2
- import { a as SessionStorage$1 } from './storage.d-BvTdjYQF.js';
3
- import { y as KodaXSessionStorage, n as KodaXSessionData, A as KodaXSessionUiHistoryItem, s as KodaXSessionLineage, k as KodaXSessionArtifactLedgerEntry, w as KodaXSessionRuntimeInfo } from './types.d-HBbWT-iA.js';
4
- import { m as KodaXMessage, D as KodaXReasoningMode, q as KodaXProviderCapabilityProfile, E as KodaXReasoningOverride, h as KodaXCustomProviderConfig } from './types.d-B1uGoVTE.js';
1
+ import { l as BashPrefixExtractor, a4 as KodaXOptions, M as KodaXContextTokenSnapshot, K as KodaXAgentMode, a9 as KodaXRepoIntelligenceMode, A as AgentsFile, i as AutoModeStats, al as KodaXSkillInvocationContext, a1 as KodaXMcpServersConfig } from './bash-prefix-extractor.d-D6hL0Cuv.js';
2
+ import { a as SessionStorage$1 } from './storage.d-B1Jk6ryM.js';
3
+ import { y as KodaXSessionStorage, n as KodaXSessionData, A as KodaXSessionUiHistoryItem, s as KodaXSessionLineage, k as KodaXSessionArtifactLedgerEntry, w as KodaXSessionRuntimeInfo } from './types.d-B_MIIApc.js';
4
+ import { n as KodaXMessage, E as KodaXReasoningMode, r as KodaXProviderCapabilityProfile, F as KodaXReasoningOverride, h as KodaXCustomProviderConfig } from './types.d-Cf-GCzac.js';
5
5
  import * as readline from 'readline';
6
6
  import { SpawnSyncReturns } from 'child_process';
7
7
 
@@ -515,7 +515,21 @@ declare function saveConfig(config: {
515
515
  /** FEATURE_102 Phase 3 — cross-provider child fallback chain. */
516
516
  fallbackProviders?: string[];
517
517
  }): void;
518
- declare function getGitRoot(): Promise<string | null>;
518
+ /**
519
+ * Get git root directory.
520
+ *
521
+ * v0.7.46 fix — accepts optional `cwd` so in-process SDK embedders (KodaX
522
+ * Space) that serve multiple projects from a single runtime can resolve
523
+ * the git root of the project the user opened, NOT the embedder's
524
+ * startup directory. Without `cwd`, `git rev-parse --show-toplevel`
525
+ * inherits the host process's cwd, which mis-tags storage operations
526
+ * for multi-project embedders (the same root cause as the
527
+ * `saveSessionSnapshot` gitRoot bug in agent-runtime/middleware/ shipped in v0.7.45).
528
+ *
529
+ * No `cwd` arg → behaves identically to the pre-v0.7.46 form
530
+ * (process.cwd() of the host).
531
+ */
532
+ declare function getGitRoot(cwd?: string): Promise<string | null>;
519
533
  declare function rateLimitedCall<T>(fn: () => Promise<T>): Promise<T>;
520
534
 
521
535
  export { processSpecialSyntax as A, BUILTIN_COMMANDS as B, rateLimitedCall as D, registerConfiguredCustomProviders as E, runInkInteractiveMode as F, runInteractiveMode as G, saveConfig as H, touchContext as J, KODAX_CONFIG_FILE as K, PERMISSION_MODES as P, KODAX_DIR as f, KODAX_SESSIONS_DIR as g, KODAX_VERSION as h, PREVIEW_MAX_LENGTH as i, computeConfirmTools as l, createInteractiveContext as m, executeCommand as n, getGitRoot as o, getProviderList as p, getProviderModel as q, getVersion as r, hydrateProcessEnvFromShell as s, isPermissionMode as t, isProviderConfigured as u, loadConfig as v, normalizePermissionMode as w, parseCommand as x, permissionModeDisplayName as y, prepareRuntimeConfig as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kodax-ai/kodax",
3
- "version": "0.7.45",
3
+ "version": "0.7.47",
4
4
  "description": "极致轻量化 Coding Agent - TypeScript 实现,支持 12 个 LLM 提供商,可发布为免 Node 单文件二进制",
5
5
  "type": "module",
6
6
  "private": false,
@@ -122,6 +122,7 @@
122
122
  "terminal-size": "^4.0.1",
123
123
  "tsx": "^4.21.0",
124
124
  "typescript": "^5.9.3",
125
+ "vscode-languageserver-protocol": "^3.17.5",
125
126
  "widest-line": "^6.0.0",
126
127
  "wrap-ansi": "^8.1.0",
127
128
  "ws": "^8.18.0",