@kodax-ai/kodax 0.7.67 → 0.7.68

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 (79) hide show
  1. package/CHANGELOG.md +72 -0
  2. package/README.md +11 -6
  3. package/README_CN.md +12 -8
  4. package/dist/chunks/agent-DATNZOBK.js +2 -0
  5. package/dist/chunks/argument-completer-X7MMM7Y6.js +2 -0
  6. package/dist/chunks/chunk-5GL55MOH.js +36 -0
  7. package/dist/chunks/chunk-67XJ4YUA.js +703 -0
  8. package/dist/chunks/{chunk-YH5BTUQO.js → chunk-C4SBXBWH.js} +193 -190
  9. package/dist/chunks/{chunk-DEICMTHO.js → chunk-CC4BVVE7.js} +1 -1
  10. package/dist/chunks/{chunk-EN3O2C43.js → chunk-CTHUX5ZH.js} +2 -2
  11. package/dist/chunks/{chunk-YRBNXFHY.js → chunk-HFM2D5BP.js} +1 -1
  12. package/dist/chunks/chunk-HLBHSA2B.js +325 -0
  13. package/dist/chunks/{chunk-O7N22GJ3.js → chunk-K2NCKRVY.js} +16 -14
  14. package/dist/chunks/{chunk-KBBGDRER.js → chunk-KGAI32VS.js} +2 -2
  15. package/dist/chunks/{chunk-WCSSXBHR.js → chunk-KIQRCGVR.js} +13 -13
  16. package/dist/chunks/{chunk-W2XMNYLK.js → chunk-MP52BDK5.js} +12 -12
  17. package/dist/chunks/chunk-O5OJQFPY.js +307 -0
  18. package/dist/chunks/chunk-OIELNE6Z.js +56 -0
  19. package/dist/chunks/chunk-PEGSHZAA.js +5 -0
  20. package/dist/chunks/chunk-TOGESFRN.js +2 -0
  21. package/dist/chunks/compaction-config-BXEDHIQP.js +2 -0
  22. package/dist/chunks/{construction-bootstrap-GLEHQ2KB.js → construction-bootstrap-PYWJHO35.js} +1 -1
  23. package/dist/chunks/dist-76PJHNSG.js +2 -0
  24. package/dist/chunks/{dist-4PXB7U22.js → dist-HTDJRAD6.js} +1 -1
  25. package/dist/chunks/host-UAXIDZ6V.js +2 -0
  26. package/dist/chunks/run-manager-UCXB4G22.js +2 -0
  27. package/dist/chunks/utils-S63V5UCM.js +2 -0
  28. package/dist/index.d.ts +15 -15
  29. package/dist/index.js +1 -1
  30. package/dist/kodax_cli.js +1199 -1185
  31. package/dist/runtime-worker.js +1021 -1007
  32. package/dist/sdk-agent.d.ts +126 -18
  33. package/dist/sdk-agent.js +1 -1
  34. package/dist/sdk-coding.d.ts +18 -18
  35. package/dist/sdk-coding.js +1 -1
  36. package/dist/sdk-experimental-memory.d.ts +618 -0
  37. package/dist/sdk-experimental-memory.js +2 -0
  38. package/dist/sdk-llm.d.ts +6 -6
  39. package/dist/sdk-llm.js +1 -1
  40. package/dist/sdk-mcp.js +1 -1
  41. package/dist/sdk-media.d.ts +1 -1
  42. package/dist/sdk-repl.d.ts +15 -15
  43. package/dist/sdk-repl.js +1 -1
  44. package/dist/sdk-runtime.d.ts +11 -11
  45. package/dist/sdk-runtime.js +1 -1
  46. package/dist/sdk-session.d.ts +6 -6
  47. package/dist/sdk-session.js +1 -1
  48. package/dist/sdk-skills.js +1 -1
  49. package/dist/semantic-worker.js +12 -12
  50. package/dist/types-chunks/{base.d-DalIRhbb.d.ts → base.d-C8mXDhLL.d.ts} +1 -1
  51. package/dist/types-chunks/{bash-prefix-extractor.d-D57Gt6n8.d.ts → bash-prefix-extractor.d-Dm-T865v.d.ts} +24 -4
  52. package/dist/types-chunks/{capability-learning.d-BQB0M70w.d.ts → capability-learning.d-BLEmCib0.d.ts} +1 -1
  53. package/dist/types-chunks/{capsule.d-BZmqu_HL.d.ts → capsule.d-CzaamUUv.d.ts} +5 -5
  54. package/dist/types-chunks/{commands.d-Cg26ud-Y.d.ts → commands.d-DxKjVSNU.d.ts} +4 -4
  55. package/dist/types-chunks/{guardrail.d-vSaBe64I.d.ts → guardrail.d-CPDfZyJp.d.ts} +3 -3
  56. package/dist/types-chunks/{guardrail.d-Ds7JHxR1.d.ts → guardrail.d-D7r6zVSR.d.ts} +1 -1
  57. package/dist/types-chunks/{public-api.d-CPBMPDiU.d.ts → public-api.d-BcKbBy1E.d.ts} +6 -7
  58. package/dist/types-chunks/{resolver.d-CGkfRULj.d.ts → resolver.d-DmBnoilY.d.ts} +2 -2
  59. package/dist/types-chunks/{run-manager.d-lnwnfyNC.d.ts → run-manager.d-CSj7_kWk.d.ts} +1 -1
  60. package/dist/types-chunks/{sdk-session-ByoMLoUS.d.ts → sdk-session-C6nDgyh8.d.ts} +4 -4
  61. package/dist/types-chunks/{types.d-Bp4Lm1jv.d.ts → types.d-CO_ZkmOd.d.ts} +6 -1
  62. package/dist/types-chunks/{types.d-DYv3a1ka.d.ts → types.d-CzscbsG0.d.ts} +4 -4
  63. package/dist/types-chunks/{types.d-DG9B4SMm.d.ts → types.d-D2frCRaY.d.ts} +138 -8
  64. package/dist/types-chunks/{types.d-DU9lLkmE.d.ts → types.d-D9FKbAmf.d.ts} +2 -2
  65. package/dist/types-chunks/{utils.d-DMI-9GTR.d.ts → utils.d-DOXxnOnI.d.ts} +5 -5
  66. package/docs/SDK_EMBEDDER_GUIDE.md +108 -8
  67. package/package.json +5 -1
  68. package/dist/chunks/agent-E4V5SLX6.js +0 -2
  69. package/dist/chunks/argument-completer-N6RT5KYT.js +0 -2
  70. package/dist/chunks/chunk-AKMXJSGM.js +0 -56
  71. package/dist/chunks/chunk-CW32NQFO.js +0 -2
  72. package/dist/chunks/chunk-NVDK375I.js +0 -729
  73. package/dist/chunks/chunk-QI6SQ2UQ.js +0 -306
  74. package/dist/chunks/chunk-RS2GAABJ.js +0 -328
  75. package/dist/chunks/compaction-config-56NO42ZI.js +0 -2
  76. package/dist/chunks/dist-4UIRSSFS.js +0 -2
  77. package/dist/chunks/host-DMREFNSO.js +0 -2
  78. package/dist/chunks/run-manager-P5XMSGZ7.js +0 -2
  79. package/dist/chunks/utils-JENPFKAE.js +0 -2
@@ -28,6 +28,7 @@ are NOT obvious from inspecting the type definitions alone:
28
28
  18. [External-agent executor plane](#18-external-agent-executor-plane-feature_258-v0767)
29
29
  19. [Session surface filtering and cursor pagination](#19-session-surface-filtering-and-cursor-pagination-feature_261-v0767)
30
30
  20. [Cost-disciplined workflow routing and telemetry](#20-cost-disciplined-workflow-routing-and-telemetry-feature_259-v0767)
31
+ 21. [Experimental governed memory — `/experimental-memory`](#21-experimental-governed-memory--experimental-memory-feature_260-v0768)
31
32
 
32
33
  §1–§3 (and the Phase-7/8 MCP-popout surface in §1) land in v0.7.42
33
34
  under FEATURE_186 (see [ADR-032](ADR.md#adr-032-sdk-embedder-surface-closure-feature_186-v0742)).
@@ -964,7 +965,7 @@ running your project's test suite against `main` — you can `npm link`
964
965
  the in-tree KodaX checkout instead of waiting for a published version.
965
966
 
966
967
  As of v0.7.43 the root `package.json` is in **already-published shape**:
967
- `"name": "@kodax-ai/kodax"` is baked in along with all 8 SDK subpath
968
+ `"name": "@kodax-ai/kodax"` is baked in along with all 10 SDK subpath
968
969
  exports. `npm link` "just works" — no need to run `scripts/release.mjs`
969
970
  first.
970
971
 
@@ -2000,9 +2001,14 @@ By default your `topics` **extend** the KodaX base manual. v0.7.58 adds
2000
2001
 
2001
2002
  `KODAX_UNDERLYING_CAPABILITY_TOPICS` (exported) is the recommended mechanism-topic
2002
2003
  subset a product built on KodaX should keep even in a full replace — so your users
2003
- still get correct answers about the underlying engine (providers / config /
2004
- permissions / tools / skills / extensions / mcp / repo-intelligence / sessions /
2005
- sdk / custom-providers) without the KodaX brand:
2004
+ still get correct answers about the underlying engine (providers / config /
2005
+ permissions / tools / skills / extensions / mcp / repo-intelligence / sessions /
2006
+ sdk / custom-providers) without the KodaX brand:
2007
+
2008
+ The default full manual also includes the `memory` topic. It is intentionally
2009
+ not part of `KODAX_UNDERLYING_CAPABILITY_TOPICS` because `/experimental-memory`
2010
+ is opt-in; hosts that expose it should add `memory` explicitly or provide a
2011
+ product-specific override.
2006
2012
 
2007
2013
  ```ts
2008
2014
  import {
@@ -2733,9 +2739,10 @@ fields requires a protocol version bump.
2733
2739
 
2734
2740
  ### Current verification status
2735
2741
 
2736
- The v0.7.67 release validation covers the runtime migration, the Worker
2742
+ The v0.7.68 release validation covers the runtime migration, the Worker
2737
2743
  isolation follow-ups delivered ahead of their original v0.7.71/v0.7.72
2738
- planning slots, and the v0.7.67 external-agent/session additions:
2744
+ planning slots, the v0.7.67 external-agent/session additions, and the v0.7.68
2745
+ experimental Memory Agent surface:
2739
2746
 
2740
2747
  - complete repository test suite on Node 20 and Node 22;
2741
2748
  - package builds, Worker sidecar builds, and self-contained
@@ -2751,6 +2758,9 @@ planning slots, and the v0.7.67 external-agent/session additions:
2751
2758
  recovery, policy/credential/artifact gates, and disabled-plane failure;
2752
2759
  - exact session `surface` filtering plus opaque cursor continuation through the
2753
2760
  narrow `/session` API, embedded Runtime, and daemon transport;
2761
+ - scoped zero-wait memory recall, read-only deliberate query, trace-only
2762
+ receipts, bounded episode review, governed consult-before-write promotion,
2763
+ and the self-contained `/experimental-memory` bundle/DTS surface;
2754
2764
  - external fresh npm consumer installation of the `0.7.67` tarball, proving
2755
2765
  Worker isolation and a distinct daemon PID through the published subpath;
2756
2766
  - Ubuntu Node 22 Unix-domain-socket daemon gate, including two clients sharing
@@ -3070,8 +3080,98 @@ The report is an audit/optimization artifact; correctness still comes from the
3070
3080
  workflow's structured findings, verification results, and quality gates.
3071
3081
 
3072
3082
  ---
3073
-
3074
- ## See also
3083
+
3084
+ ## 21. Experimental governed memory — `/experimental-memory` (FEATURE_260, v0.7.68)
3085
+
3086
+ KodaX has one durable memory plane: the F228 Memory Control Plane. FEATURE_260
3087
+ adds a thin, opt-in agent/session API over that plane; it does not add a second
3088
+ database, filesystem memory actions, a resident memory specialist, or online
3089
+ self-modification.
3090
+
3091
+ Top-level `runKodaX()` coding runs wire this lifecycle automatically. They build
3092
+ an exact-scoped memory pack at session start, keep passive recall off the
3093
+ blocking hot path, expose `memory_recall` only when the memory session starts,
3094
+ record bounded observations/outcomes, and close the session at the run boundary.
3095
+ Use the direct SDK below when a custom host needs to own those boundaries.
3096
+
3097
+ ### Minimal direct session
3098
+
3099
+ ```ts
3100
+ import { createMemoryControlPlane } from '@kodax-ai/kodax/agent';
3101
+ import { createMemoryAgent } from '@kodax-ai/kodax/experimental-memory';
3102
+
3103
+ const identity = {
3104
+ tenantId: 'tenant:acme',
3105
+ workspaceId: 'workspace:desktop',
3106
+ userId: 'user:42',
3107
+ agentId: 'agent:reviewer',
3108
+ projectId: 'project:kodax',
3109
+ sessionId: 'session:20260712',
3110
+ };
3111
+
3112
+ const controlPlane = createMemoryControlPlane({
3113
+ cwd: process.cwd(),
3114
+ identity,
3115
+ projectDocs: [],
3116
+ discoverSkills: false,
3117
+ });
3118
+ const memory = createMemoryAgent({ controlPlane });
3119
+ const session = await memory.startSession({
3120
+ identity,
3121
+ objective: 'Review the runtime shutdown change',
3122
+ });
3123
+
3124
+ const immediate = session.recall({
3125
+ decisionRevision: 'decision:1',
3126
+ objective: 'Review the runtime shutdown change',
3127
+ decisionContext: 'Choosing the first verification step',
3128
+ decisionIntent: 'runtime shutdown regression',
3129
+ throughSequence: 0,
3130
+ });
3131
+ const deliberate = await session.query({
3132
+ decisionRevision: 'decision:2',
3133
+ need: 'What uncommon daemon cleanup failure happened before?',
3134
+ throughSequence: 0,
3135
+ });
3136
+
3137
+ await session.complete({
3138
+ status: 'succeeded',
3139
+ summary: 'Shutdown state replacement verified',
3140
+ evidence: [],
3141
+ });
3142
+ await session.close();
3143
+ ```
3144
+
3145
+ `recall()` is synchronous: exact observations/hints can be returned immediately,
3146
+ while an optional semantic prefetch finishes for a later matching decision.
3147
+ `query()` is deliberate and read-only; one distinct query is admitted per
3148
+ decision epoch, and the result is bounded to at most three prompt-safe hints and
3149
+ 512 estimated tokens. `undefined` means there is no governed reminder to inject.
3150
+
3151
+ ### Evidence, tracing, and persistence boundaries
3152
+
3153
+ - Recalled content is low-authority evidence. Current repository/config/runtime
3154
+ facts must still come from current tools or host state.
3155
+ - `observe()` accepts monotonic, evidence-linked observations and rejects secret
3156
+ material. `rewind()` removes observations after a sequence boundary.
3157
+ - `complete()` can emit an Outcome Digest through `persistOutcomeDigest` and run
3158
+ bounded episode review through `reviewEpisode`; cancellation creates neither.
3159
+ - `onTrace` receives policy-versioned `MemoryDecisionReceipt` metadata that links
3160
+ candidates, selection, injection, and later outcome influence. Receipts are
3161
+ trace-only and contain no hidden reasoning.
3162
+ - Durable memory mutation remains owned by F228's
3163
+ proposal/preview/fingerprint/apply flow. `/memory` is the CLI governance
3164
+ surface; direct file/shell writes to managed memory roots are denied.
3165
+ - Identity/applicability matching is exact and fail-closed. Hosts should supply
3166
+ stable tenant/workspace/user/agent/project/session identifiers and must not put
3167
+ credentials into those identifiers.
3168
+
3169
+ The subpath is experimental and ESM-only. Treat its exported types as opt-in
3170
+ v0.7.x contracts; keep persistence and product policy behind your own adapter.
3171
+
3172
+ ---
3173
+
3174
+ ## See also
3075
3175
 
3076
3176
  - [README.md](../README.md) — end-user CLI quick start
3077
3177
  - [docs/ADR.md ADR-024](ADR.md#adr-024-npm-发布物正名-kodax-aikodax--sdk-subpath-exports-形式化-v0739) — SDK subpath architecture rationale
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kodax-ai/kodax",
3
- "version": "0.7.67",
3
+ "version": "0.7.68",
4
4
  "description": "KodaX lightweight coding agent - TypeScript implementation with 15 built-in LLM provider aliases, published as a Node-free single-file CLI and SDK",
5
5
  "type": "module",
6
6
  "private": false,
@@ -56,6 +56,10 @@
56
56
  "types": "./dist/sdk-runtime.d.ts",
57
57
  "import": "./dist/sdk-runtime.js"
58
58
  },
59
+ "./experimental-memory": {
60
+ "types": "./dist/sdk-experimental-memory.d.ts",
61
+ "import": "./dist/sdk-experimental-memory.js"
62
+ },
59
63
  "./package.json": "./package.json"
60
64
  },
61
65
  "scripts": {
@@ -1,2 +0,0 @@
1
- // @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
2
- import{I as c,J as d,K as e,L as f,Z as g,_ as h,ra as i,za as j}from"./chunk-RS2GAABJ.js";import"./chunk-D6QVXQNI.js";import"./chunk-YRBNXFHY.js";import"./chunk-YH5BTUQO.js";import"./chunk-O7N22GJ3.js";import{rb as a,sb as b}from"./chunk-NVDK375I.js";import"./chunk-PZTG2C33.js";import"./chunk-ONUPGMER.js";export{d as bucketProviderPayloadSize,g as buildAutoRepoIntelligenceContext,e as checkPromiseSignal,b as cleanupIncompleteToolCalls,h as describeTransientProviderRetry,f as emitResilienceDebug,c as estimateProviderPayloadBytes,j as runKodaX,i as saveSessionSnapshot,a as validateAndFixToolHistory};
@@ -1,2 +0,0 @@
1
- // @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
2
- import{Ba as a,Ca as b}from"./chunk-EN3O2C43.js";import"./chunk-AKMXJSGM.js";import"./chunk-CW32NQFO.js";import"./chunk-WCSSXBHR.js";import"./chunk-DEICMTHO.js";import"./chunk-KBBGDRER.js";import"./chunk-RS2GAABJ.js";import"./chunk-D6QVXQNI.js";import"./chunk-YRBNXFHY.js";import"./chunk-YH5BTUQO.js";import"./chunk-O7N22GJ3.js";import"./chunk-NVDK375I.js";import"./chunk-PZTG2C33.js";import"./chunk-ONUPGMER.js";export{a as ArgumentCompleter,b as createArgumentCompleter};
@@ -1,56 +0,0 @@
1
- // @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
2
- import{w as q,y as J}from"./chunk-RS2GAABJ.js";import{C as k,D as X,E as R,Ja as B,Na as z,ja as F,ka as j,la as G,ma as U,n as K,na as V,oa as A,va as $,wa as E,z as x,za as I}from"./chunk-O7N22GJ3.js";import{Ea as H,ya as W}from"./chunk-NVDK375I.js";import{a as o}from"./chunk-ONUPGMER.js";import c from"fs";import f from"path";import{exec as ce,spawnSync as le}from"child_process";import{promisify as ue}from"util";import{fileURLToPath as fe}from"url";var L="en";function ae(){return(process.env.LC_ALL||process.env.LC_MESSAGES||process.env.LANG||"").toLowerCase().startsWith("zh")?"zh":"en"}o(ae,"detectSystemLocale");function Q(e){if(!e||e==="auto"){L=ae();return}L=e.toLowerCase().replace(/[-_].*/,"")==="zh"?"zh":"en"}o(Q,"setLocale");var Y={en:{"dialog.confirm":"[Confirm]","dialog.select":"[Select]","dialog.input":"[Input]","confirm.instruction.basic":"Press (y) yes, (n) no","confirm.instruction.always":"Press (y) yes, (a) always yes for this tool, (n) no","confirm.instruction.protected":"Press (y) to confirm, (n) to cancel (protected path)","confirm.result.approved":"Approved","confirm.result.approved_always":"Approved (always)","confirm.result.denied":"Denied","tool.bash.title":"Execute bash command?","tool.shell.title":"Execute shell command?","tool.write.title":"Write to file?","tool.edit.title":"Edit file?","tool.generic.title":"Execute {tool}?","field.reason":"Reason","field.intent":"Intent","field.target":"Target","field.scope":"Scope","field.risk":"Risk","field.summary":"Summary","intent.read":"Read project files","intent.delete":"Delete files","intent.deps":"Modify dependencies or environment","intent.modify":"Modify files","intent.execute":"Execute command","intent.write_file":"Write file","intent.edit_file":"Edit file","intent.use_tool":"Use {tool}","risk.destructive":"Destructive change","risk.deps":"May change dependencies or local tools","risk.modify":"May modify files","risk.unknown":"Command effects depend on its arguments","risk.network":"May access network","scope.outside":"Outside project","scope.protected":"Protected path","waiting.confirm":"Waiting: approval required","waiting.select":"Waiting: choose an option","waiting.input":"Waiting: answer the prompt","placeholder.confirm":"Respond to the approval prompt above...","placeholder.select":"Choose an option above...","placeholder.input":"Answer the prompt above...","placeholder.busy":"Agent is busy...","placeholder.queue":"Queue a follow-up for the next round...","placeholder.idle":"Type a message...","select.choice":"Choice:","select.type_number":"(type a number)","select.more":"{count} more choices...","select.more_above":"\u2191 {count} more above","select.more_below":"\u2193 {count} more below","select.confirm_hint":"Press Enter to confirm, Esc to cancel","select.navigate_hint":"Use \u2191\u2193 to navigate, Enter to confirm, Esc to cancel","select.multiselect_hint":"Use \u2191\u2193 to navigate, Space to toggle, Enter to confirm, Esc to cancel","select.multiselect_empty":"Select at least one option with Space before confirming.","select.multiselect_min":"Select at least {min} option(s) with Space before confirming.","select.multiselect_max":"Select at most {max} option(s) with Space before confirming.","select.back_prev":"\u2190 Back to previous question","input.default":"Default:","input.value":"Value:","input.type_response":"(type your response)","managed.completed":"Task completed","managed.completed.blocked":"Task blocked","managed.completed.continuation":"Task needs continuation",cancelled:"[Cancelled] Operation cancelled by user"},zh:{"dialog.confirm":"[\u786E\u8BA4]","dialog.select":"[\u9009\u62E9]","dialog.input":"[\u8F93\u5165]","confirm.instruction.basic":"\u6309 (y) \u786E\u8BA4, (n) \u62D2\u7EDD","confirm.instruction.always":"\u6309 (y) \u786E\u8BA4, (a) \u59CB\u7EC8\u5141\u8BB8\u6B64\u5DE5\u5177, (n) \u62D2\u7EDD","confirm.instruction.protected":"\u6309 (y) \u786E\u8BA4, (n) \u53D6\u6D88 (\u53D7\u4FDD\u62A4\u8DEF\u5F84)","confirm.result.approved":"\u5DF2\u6279\u51C6","confirm.result.approved_always":"\u5DF2\u6279\u51C6 (\u59CB\u7EC8\u5141\u8BB8)","confirm.result.denied":"\u5DF2\u62D2\u7EDD","tool.bash.title":"\u6267\u884C bash \u547D\u4EE4\uFF1F","tool.shell.title":"\u6267\u884C shell \u547D\u4EE4\uFF1F","tool.write.title":"\u5199\u5165\u6587\u4EF6\uFF1F","tool.edit.title":"\u7F16\u8F91\u6587\u4EF6\uFF1F","tool.generic.title":"\u6267\u884C {tool}\uFF1F","field.reason":"\u539F\u56E0","field.intent":"\u610F\u56FE","field.target":"\u76EE\u6807","field.scope":"\u8303\u56F4","field.risk":"\u98CE\u9669","field.summary":"\u6458\u8981","intent.read":"\u8BFB\u53D6\u9879\u76EE\u6587\u4EF6","intent.delete":"\u5220\u9664\u6587\u4EF6","intent.deps":"\u4FEE\u6539\u4F9D\u8D56\u6216\u73AF\u5883","intent.modify":"\u4FEE\u6539\u6587\u4EF6","intent.execute":"\u6267\u884C\u547D\u4EE4","intent.write_file":"\u5199\u5165\u6587\u4EF6","intent.edit_file":"\u7F16\u8F91\u6587\u4EF6","intent.use_tool":"\u4F7F\u7528 {tool}","risk.destructive":"\u7834\u574F\u6027\u53D8\u66F4","risk.deps":"\u53EF\u80FD\u4FEE\u6539\u4F9D\u8D56\u6216\u672C\u5730\u5DE5\u5177","risk.modify":"\u53EF\u80FD\u4FEE\u6539\u6587\u4EF6","risk.unknown":"\u547D\u4EE4\u6548\u679C\u53D6\u51B3\u4E8E\u53C2\u6570","risk.network":"\u53EF\u80FD\u8BBF\u95EE\u7F51\u7EDC","scope.outside":"\u9879\u76EE\u5916\u90E8","scope.protected":"\u53D7\u4FDD\u62A4\u8DEF\u5F84","waiting.confirm":"\u7B49\u5F85\u4E2D\uFF1A\u9700\u8981\u5BA1\u6279","waiting.select":"\u7B49\u5F85\u4E2D\uFF1A\u8BF7\u9009\u62E9","waiting.input":"\u7B49\u5F85\u4E2D\uFF1A\u8BF7\u56DE\u7B54","placeholder.confirm":"\u8BF7\u56DE\u5E94\u4E0A\u65B9\u7684\u5BA1\u6279\u63D0\u793A...","placeholder.select":"\u8BF7\u5728\u4E0A\u65B9\u9009\u62E9\u4E00\u4E2A\u9009\u9879...","placeholder.input":"\u8BF7\u56DE\u7B54\u4E0A\u65B9\u7684\u63D0\u793A...","placeholder.busy":"\u667A\u80FD\u4F53\u6B63\u5728\u5DE5\u4F5C\u4E2D...","placeholder.queue":"\u6392\u961F\u7B49\u5F85\u4E0B\u4E00\u8F6E\u8DDF\u8FDB...","placeholder.idle":"\u8F93\u5165\u6D88\u606F...","select.choice":"\u9009\u9879\uFF1A","select.type_number":"(\u8F93\u5165\u7F16\u53F7)","select.more":"\u8FD8\u6709 {count} \u4E2A\u9009\u9879...","select.more_above":"\u2191 \u4E0A\u65B9\u8FD8\u6709 {count} \u4E2A","select.more_below":"\u2193 \u4E0B\u65B9\u8FD8\u6709 {count} \u4E2A","select.confirm_hint":"\u6309 Enter \u786E\u8BA4\uFF0CEsc \u53D6\u6D88","select.navigate_hint":"\u4F7F\u7528 \u2191\u2193 \u5BFC\u822A\uFF0CEnter \u786E\u8BA4\uFF0CEsc \u53D6\u6D88","select.multiselect_hint":"\u4F7F\u7528 \u2191\u2193 \u5BFC\u822A\uFF0C\u7A7A\u683C \u5207\u6362\u9009\u4E2D\uFF0CEnter \u786E\u8BA4\uFF0CEsc \u53D6\u6D88","select.multiselect_empty":"\u8BF7\u5148\u4F7F\u7528\u7A7A\u683C\u9009\u62E9\u81F3\u5C11\u4E00\u4E2A\u9009\u9879\u3002","select.multiselect_min":"\u8BF7\u5148\u4F7F\u7528\u7A7A\u683C\u81F3\u5C11\u9009\u62E9 {min} \u4E2A\u9009\u9879\u3002","select.multiselect_max":"\u6700\u591A\u53EA\u80FD\u9009\u62E9 {max} \u4E2A\u9009\u9879\u3002","select.back_prev":"\u2190 \u8FD4\u56DE\u4E0A\u4E00\u9898","input.default":"\u9ED8\u8BA4\u503C\uFF1A","input.value":"\u503C\uFF1A","input.type_response":"(\u8F93\u5165\u4F60\u7684\u56DE\u7B54)","managed.completed":"\u4EFB\u52A1\u5B8C\u6210","managed.completed.blocked":"\u4EFB\u52A1\u53D7\u963B","managed.completed.continuation":"\u4EFB\u52A1\u9700\u8981\u7EE7\u7EED",cancelled:"[\u5DF2\u53D6\u6D88] \u64CD\u4F5C\u5DF2\u88AB\u7528\u6237\u53D6\u6D88"}};function Ne(e,t){let r=Y[L][e]??Y.en[e]??e;if(t)for(let[i,s]of Object.entries(t))r=r.replace(`{${i}}`,String(s));return r}o(Ne,"t");var de=ue(ce),S=W(),He=f.join(S,"sessions"),d=f.join(S,"config.json"),qe=60,p=null,D=!1,pe="dumb";function me(e){let t=f.basename(e).toLowerCase(),n="__KODAX_SHELL_ENV_START__",r=`printf '%s\\0' '${n}'; env -0`;return t==="fish"?{args:["-i","-c",r],sentinel:n}:{args:t==="bash"||t==="zsh"?["-ic",r]:["-lc",r],sentinel:n}}o(me,"buildShellEnvCommand");function ge(e,t){let n=`${t}\0`,r=e.lastIndexOf(n);if(r===-1)return{};let i=e.slice(r+n.length),s={};for(let a of i.split("\0")){if(!a)continue;let u=a.indexOf("=");u<=0||(s[a.slice(0,u)]=a.slice(u+1))}return s}o(ge,"parseNullDelimitedShellEnv");function ve(e={}){let t=e.env??process.env;if((e.platform??process.platform)==="win32"||t.KODAX_DISABLE_SHELL_ENV_HYDRATION==="1")return!1;let r=e.shell??t.SHELL;if(!r||!f.isAbsolute(r))return!1;let{args:i,sentinel:s}=me(r),a=e.run??le,u={...t,TERM:pe},l=a(r,i,{encoding:"utf8",env:u,maxBuffer:1024*1024,timeout:5e3,windowsHide:!0,detached:!0,stdio:["ignore","pipe","pipe"]});if(l.status!==0||!l.stdout)return!1;let re=typeof l.stdout=="string"?l.stdout:l.stdout.toString("utf8"),ie=ge(re,s),N=!1;for(let[C,se]of Object.entries(ie))C!=="TERM"&&t[C]===void 0&&(t[C]=se,N=!0);return N}o(ve,"hydrateProcessEnvFromShell");function he(){if(!D){D=!0;try{ve()}catch{}}}o(he,"ensureShellEnvironmentHydrated");function Je(){D=!1}o(Je,"resetShellEnvironmentHydrationForTesting");function ye(e){$(e.customProviders??[])}o(ye,"registerConfiguredCustomProviders");function te(e){if(!Array.isArray(e))return;let t=e.filter(n=>typeof n=="string").map(n=>n.trim()).filter(n=>n.length>0);return t.length>0?t:[]}o(te,"normalizeConfiguredExtensions");function Ee(e){if(e.permissionMode!=="default")return e;let t={...e,permissionMode:"accept-edits"};try{c.mkdirSync(f.dirname(d),{recursive:!0}),c.writeFileSync(d,JSON.stringify(t,null,2))}catch{}return t}o(Ee,"migrateLegacyPermissionModeInConfig");function Pe(e){if(e.permissionMode!=="auto-in-project")return e;try{let t=c.readFileSync(d,"utf-8"),n=t.replace(/("permissionMode"\s*:\s*)"auto-in-project"/,'$1"auto"');n!==t&&c.writeFileSync(d,n)}catch{}return{...e,permissionMode:"auto"}}o(Pe,"migrateAutoInProjectAliasInConfig");function be(){if(p)return p;let e="0.7.67";if(e)return p=e,p;let t=f.join(f.dirname(fe(import.meta.url)),"../../package.json");if(c.existsSync(t))try{return p=JSON.parse(c.readFileSync(t,"utf-8")).version??"0.0.0",p??"0.0.0"}catch{}return p="0.0.0",p}o(be,"getVersion");var Ye=be();function _e(e){return j(e)}o(_e,"getProviderModel");function T(e,t){let n=new Set(e.map(i=>i.toLowerCase())),r=[...e];for(let i of t)n.has(i.toLowerCase())||r.push(i);return r}o(T,"mergeModels");function Se(e,t){t||(t=w().providerModels);let n=t?.[e];if(n&&n.length>0){try{let r=A(e);if(r.length>0)return T(n,r)}catch{}try{let r=E(e);if(r)return T(n,r.getAvailableModels())}catch{}return n}try{let r=A(e);if(r.length>0)return r}catch{}try{let r=E(e);if(r)return r.getAvailableModels()}catch{}return[]}o(Se,"getProviderAvailableModels");function Oe(e,t){let n=G(e,t);if(n!=="unknown")return n;try{let r=E(e);if(r)return r.getReasoningCapability(t)}catch{}return"unknown"}o(Oe,"getProviderReasoningCapability");function we(e){let t=U(e);if(t)return t;try{return I().find(r=>r.name===e)?.capabilityProfile??null}catch{return null}}o(we,"getProviderCapabilityProfile");function ne(e,t){let n=we(e),r=Oe(e,t);if(n)return{capabilityProfile:n,reasoningCapability:r};try{let i=B(e);return{capabilityProfile:i.getCapabilityProfile(),reasoningCapability:i.getReasoningCapability(t)}}catch{return null}}o(ne,"getProviderCapabilityMetadata");function Qe(e,t){let n=ne(e,t);return n?q({providerName:e,model:t,capabilityProfile:n.capabilityProfile,reasoningCapability:n.reasoningCapability==="unknown"?void 0:n.reasoningCapability}):null}o(Qe,"getProviderCapabilitySnapshot");function Ce(e,t,n,r){let i=ne(e,t);return i?J({providerName:e,model:t,capabilityProfile:i.capabilityProfile,reasoningCapability:i.reasoningCapability==="unknown"?void 0:i.reasoningCapability,reasoningMode:n,hints:r}):null}o(Ce,"getProviderPolicyDecision");function Ze(e){let t=e.transport==="cli-bridge"?"CLI bridge":"Native API",n=e.conversationSemantics==="last-user-message"?"forwards only the latest user message":"preserves full conversation history",r=e.mcpSupport==="native"?"MCP available":"MCP unavailable";return`${t}; ${n}; ${r}`}o(Ze,"describeProviderCapabilitySummary");function et(e){switch(e){case"native-budget":return"B";case"native-effort":return"E";case"native-toggle":return"T";case"native-adaptive":return"A";default:return"-"}}o(et,"formatReasoningCapabilityShort");function y(e){if(e)return e==="none"?"off":e}o(y,"formatReasoningEffortForDisplay");function _(e,t){let n=y(t);n&&!e.includes(n)&&e.push(n)}o(_,"pushUniqueEffortDisplay");function tt(e,t){let n=["auto"],i=O(e,t)?.supportedEfforts?.filter(s=>s.isUserVisible!==!1);if(!i||i.length===0){for(let s of["off","low","medium","high"])_(n,s);return n}for(let s of i)_(n,s.value);return n}o(tt,"getProviderReasoningEffortOptions");function nt(e,t){let n=O(e,t),r=new Set(n?.disabledEfforts??[]),i=n?.supportedEfforts?.filter(l=>l.isUserVisible!==!1),s=[],a=n?.supportsDisabledThinking===!0;if(!i||i.length===0){for(let l of["low","medium","high"])_(s,l);a=!0}else for(let l of i){if(l.value==="none"){a=!0;continue}if(r.has(l.value)){a=!0;continue}_(s,l.value)}let u=[];return a&&u.push("off"),u.push(...s),u.push("auto"),u}o(nt,"getProviderReasoningEffortCycle");function xe(e,t){if(t===!1)return"off";switch(e){case"off":return"off";case"quick":return"low";case"balanced":return"medium";case"deep":return"high";default:return"auto"}}o(xe,"legacyReasoningModeToEffortDisplay");function O(e,t){let n=t??_e(e);if(!n)return;let r=z(e,n)?.reasoningProfile;if(r)return K(r,H(e,n))}o(O,"resolveReasoningProfileForDisplay");function ot(e){let t=y(e.effort)??xe(e.reasoningMode,e.thinking),n=O(e.provider,e.model);if(!n)return t;try{let r=X({capability:n,explicitEffort:e.effortOverride?e.effort:void 0,sessionEffort:e.effortOverride?void 0:e.effort,legacyReasoningMode:e.reasoningMode,thinking:e.thinking}),i=y(r.configuredEffort)??t,a=r.configuredEffort!==void 0&&n.disabledEfforts?.includes(r.configuredEffort)===!0?"off":y(r.effectiveEffort);return a&&a!==i?`${i}->${a}`:i}catch{if(e.effort)try{let r=R({currentEffort:e.effort,capability:n}),i=y(e.effort)??t,s=y(r.effectiveEffort);return s&&s!==i?`${i}->${s}`:i}catch{return t}return t}}o(ot,"formatReasoningEffortStatusLabel");function rt(e){let t=De(e);if(!t)return{preserved:!0};let n=O(e.provider,e.model);if(!n)return{configuredEffort:t,runtimeEffort:t,preserved:!0};let r=R({currentEffort:t,capability:n});return{configuredEffort:t,runtimeEffort:r.effectiveEffort,preserved:r.preserved,diagnostic:r.diagnostic}}o(rt,"resolveProviderReasoningRuntimeEffort");function ke(e){switch(e){case"native-budget":return"budget";case"native-effort":return"effort";case"native-toggle":return"toggle";case"native-adaptive":return"adaptive";default:return"none"}}o(ke,"describeReasoningCapabilityControl");function it(e,t){if(e==="off")return"Reasoning disabled";switch(t){case"native-budget":return"Uses native thinking budget control";case"native-effort":return"Uses native reasoning effort control";case"native-toggle":return"Uses provider-native thinking toggle only";case"native-adaptive":return"Model adaptively decides thinking depth (Opus 4.7+)";case"none":return"Runs without native reasoning parameters";case"prompt-only":return"Uses prompt overlays only; no native reasoning parameter";default:return"Runs without native reasoning parameters"}}o(it,"describeReasoningExecution");function st(e){let t=[];e||(e=w().providerModels);for(let n of V())t.push({name:n.name,model:n.model,models:Se(n.name,e),configured:n.capabilityProfile.transport==="cli-bridge"?!0:n.configured,reasoningCapability:n.reasoningCapability,capabilityProfile:n.capabilityProfile});try{let n=I().map(r=>({...r,models:(()=>{let i=e?.[r.name];return i&&i.length>0?T(i,r.models):r.models})()}));t.push(...n)}catch{}return t}o(st,"getProviderList");function at(e){if(F(e))return!0;try{return E(e)?.isConfigured()??!1}catch{return!1}}o(at,"isProviderConfigured");function w(){try{if(c.existsSync(d)){let e=JSON.parse(c.readFileSync(d,"utf-8")),t=e.reasoningCeiling??e.reasoningMode;return Pe(Ee({...e,reasoningMode:t,extensions:te(e.extensions)}))}}catch{}return{}}o(w,"loadConfig");var M=f.join(S,"config.example.jsonc"),Re=`// KodaX example configuration \u2014 copy what you need into config.json (in this same
3
- // folder). config.json must be STRICT JSON: no comments, no trailing commas. Most
4
- // settings also have a semantic KODAX_* env counterpart that overrides the file.
5
- // Priority: explicit option > environment > config.json > default. Delete anything
6
- // you don't use; everything here is optional.
7
- {
8
- // Default provider + model. Override live with /provider and /model.
9
- // "provider": "deepseek",
10
- // "model": "deepseek-v4",
11
-
12
- // Task runtime: "embedded" (default) or shared local "daemon".
13
- // "runtimeMode": "embedded",
14
-
15
- // Reasoning effort for normal turns: off | auto | low | medium | high | xhigh | max.
16
- // "effort": "high",
17
-
18
- // Permission mode: "accept-edits" | "plan" | "auto".
19
- // "permissionMode": "accept-edits",
20
-
21
- // Custom providers \u2014 point KodaX at an OpenAI/Anthropic-compatible endpoint.
22
- // "customProviders": [
23
- // {
24
- // "name": "my-relay", // unique; do NOT reuse a built-in provider name
25
- // "protocol": "openai", // "openai" or "anthropic" = the wire format the endpoint speaks
26
- // "baseUrl": "https://api.example.com/v1",
27
- // "apiKeyEnv": "MY_RELAY_API_KEY", // env var that holds the key (never put the key here)
28
- // "model": "deepseek/deepseek-v4",
29
- // "models": ["deepseek/deepseek-v4"],
30
- //
31
- // // --- Thinking / reasoning (optional) ---
32
- // // For most NON-Claude models this single line is all you need:
33
- // "supportsThinking": true
34
- // // openai-compat : KodaX sends no thinking toggle and just shows whatever
35
- // // reasoning the model emits (deepseek/qwen/etc. via relays).
36
- // // anthropic-compat: KodaX sends thinking:{type:"enabled"} \u2014 what the Anthropic
37
- // // endpoints of zhipu / kimi / minimax / deepseek expect.
38
- // //
39
- // // openai-compat MULTI-TURN: some models (notably DeepSeek V4) reject later turns
40
- // // whose history drops the previous reasoning_content. If thinking shows on turn 1
41
- // // but turn 2 errors, also set: "replayReasoningContent": true
42
- // //
43
- // // To expose a TUNABLE effort level, use "reasoning" instead. Include "off" to
44
- // // allow disabling thinking:
45
- // // "reasoning": { "efforts": ["off", "low", "high"], "default": "high" }
46
- // //
47
- // // Pointing anthropic-compat at REAL Claude (4.6+)? Claude needs ADAPTIVE
48
- // // thinking, not the enable toggle \u2014 set instead:
49
- // // "reasoningCapability": "native-adaptive"
50
- // }
51
- // ],
52
-
53
- // MCP servers (stdio or remote). See the /mcp command and manual topic "mcp".
54
- // "mcpServers": {}
55
- }
56
- `;function ct(){try{return c.existsSync(d)||c.existsSync(M)?void 0:(c.mkdirSync(S,{recursive:!0}),c.writeFileSync(M,Re,"utf-8"),M)}catch{return}}o(ct,"ensureExampleConfigFile");var b=new Map;function Ae(e,t){let n=process.env[e],r=b.get(e),i=r!==void 0&&n===r;if(n!==void 0&&!i){b.delete(e);return}if(t===void 0){i&&delete process.env[e],b.delete(e);return}process.env[e]=t,b.set(e,t)}o(Ae,"projectConfigEnvironment");var oe=[{configPath:"streamIdleTimeoutMs",env:"KODAX_STREAM_IDLE_TIMEOUT_MS",value:o(e=>v(e.streamIdleTimeoutMs),"value")},{configPath:"repoIntelligenceMode",env:"KODAX_REPO_INTELLIGENCE",value:o(e=>e.repoIntelligenceMode,"value")},{configPath:"repoIntelligenceTrace",env:"KODAX_REPO_INTELLIGENCE_TRACE",value:o(e=>h(e.repoIntelligenceTrace),"value")},{configPath:"verifierLog",env:"KODAX_VERIFIER_LOG",value:o(e=>h(e.verifierLog),"value")},{configPath:"stallLog",env:"KODAX_STALL_LOG",value:o(e=>h(e.stallLog),"value")},{configPath:"fallbackProviders",env:"KODAX_FALLBACK_PROVIDERS",value:o(e=>Le(e.fallbackProviders),"value")},{configPath:"fastProvider",env:"KODAX_FAST_PROVIDER",value:o(e=>m(e.fastProvider),"value")},{configPath:"fastModel",env:"KODAX_FAST_MODEL",value:o(e=>m(e.fastModel),"value")},{configPath:"deepProvider",env:"KODAX_DEEP_PROVIDER",value:o(e=>m(e.deepProvider),"value")},{configPath:"deepModel",env:"KODAX_DEEP_MODEL",value:o(e=>m(e.deepModel),"value")},{configPath:"provider",env:"KODAX_PROVIDER",value:o(e=>m(e.provider),"value")},{configPath:"effort",env:"KODAX_EFFORT",value:o(e=>m(e.effort),"value")},{configPath:"runtimeMode",env:"KODAX_RUNTIME_MODE",value:o(e=>e.runtimeMode,"value")},{configPath:"sessionRetentionDays",env:"KODAX_SESSION_RETENTION_DAYS",value:o(e=>v(e.sessionRetentionDays),"value")},{configPath:"maxOutputTokens",env:"KODAX_MAX_OUTPUT_TOKENS",value:o(e=>v(e.maxOutputTokens),"value")},{configPath:"disablePromptCache",env:"KODAX_DISABLE_PROMPT_CACHE",value:o(e=>h(e.disablePromptCache),"value")},{configPath:"lsp",env:"KODAX_LSP",value:o(e=>h(e.lsp),"value")},{configPath:"lspAutoDownload",env:"KODAX_LSP_DOWNLOAD",value:o(e=>h(e.lspAutoDownload),"value")},{configPath:"acpLogLevel",env:"KODAX_ACP_LOG",value:o(e=>m(e.acpLogLevel),"value")},{configPath:"repoIntelligence.toolWaitMs",env:"KODAX_REPO_INTELLIGENCE_TOOL_WAIT_MS",value:o(e=>v(e.repoIntelligence?.toolWaitMs),"value")},{configPath:"repoIntelligence.workerTimeoutMs",env:"KODAX_REPO_INTELLIGENCE_WORKER_TIMEOUT_MS",value:o(e=>v(e.repoIntelligence?.workerTimeoutMs),"value")},{configPath:"repoIntelligence.workerOldSpaceMb",env:"KODAX_REPO_INTELLIGENCE_WORKER_OLD_SPACE_MB",value:o(e=>v(e.repoIntelligence?.workerOldSpaceMb),"value")},{configPath:"repoIntelligence.storageDir",env:"KODAX_REPO_INTELLIGENCE_STORAGE_DIR",value:o(e=>m(e.repoIntelligence?.storageDir),"value")},{configPath:"workflow.maxConcurrency",env:"KODAX_WORKFLOW_MAX_CONCURRENCY",value:o(e=>v(e.workflow?.maxConcurrency),"value")}];function Ie(e){for(let t of oe)Ae(t.env,t.value(e))}o(Ie,"applyConfigSurfaceBridges");function m(e){return e?.trim()||void 0}o(m,"normalizedConfigString");function v(e){return typeof e=="number"&&Number.isFinite(e)?String(e):void 0}o(v,"configNumberString");function h(e){return e===void 0?void 0:e?"1":"0"}o(h,"configBooleanString");function Le(e){return e?.filter(t=>t.trim().length>0).join(",")}o(Le,"configStringList");var lt=[...oe.map(({configPath:e,env:t})=>({configPath:e,env:t}))];function Me(e){Ie(e)}o(Me,"applyConfigEnvironment");function ut(){he();let e=w();return Me(e),ye(e),Q(e.locale),e}o(ut,"prepareRuntimeConfig");function ft(e){let n={...w(),...e},r=te(n.extensions);r!==void 0&&(n.extensions=r);for(let i of Object.keys(e))e[i]===void 0&&delete n[i];c.mkdirSync(f.dirname(d),{recursive:!0}),c.writeFileSync(d,JSON.stringify(n,null,2))}o(ft,"saveConfig");function dt(e,t,n){return e.effort!==void 0||k(n).kind==="value"||t.effort!==void 0}o(dt,"resolveInitialEffortOverride");function g(e){return e?.trim()?e:void 0}o(g,"nonEmptySelection");function pt(e){return g(e.explicitProvider)??g(e.environmentProvider)??g(e.configuredProvider)??e.defaultProvider}o(pt,"resolveRuntimeProviderSelection");function mt(e){let t=g(e.explicitModel);if(t)return t;let n=g(e.configuredModel);if(!n)return;let r=g(e.explicitProvider)??g(e.environmentProvider);return r?g(e.configuredProvider)===r?n:void 0:n}o(mt,"resolveRuntimeModelSelection");function gt(e){if(e.explicitEffort!==void 0)return x(e.explicitEffort);let t=k(e.environmentEffort);return t.kind==="value"?t.value:e.configuredEffort===void 0?void 0:x(e.configuredEffort)}o(gt,"resolveRuntimeEffortSelection");function De(e){return e.permissionMode==="plan"&&e.effortOverride!==!0&&e.planModeEffort!==void 0?e.planModeEffort:e.effort}o(De,"resolvePermissionModeEffort");async function vt(e){try{let{stdout:t}=await de("git rev-parse --show-toplevel",{cwd:e});return t.trim()}catch{return null}}o(vt,"getGitRoot");function Te(e){switch(e){case"builtin":return"Built-in";case"runtime":return"Runtime extension";case"custom":return"Custom config";default:return"Unknown"}}o(Te,"formatProviderSourceKind");function ht(e){let t=e.transport==="cli-bridge"?"CLI bridge":"Native API",n=e.conversationSemantics==="last-user-message"?"latest-user-message only":"full conversation history";return[`Source: ${Te(e.sourceKind)}`,`Transport: ${t}`,`Conversation semantics: ${n}`,`Context fidelity: ${e.contextFidelity}`,`Tool calling: ${e.toolCallingFidelity}`,`Session behavior: ${e.sessionSupport}`,`Long-running support: ${e.longRunningSupport}`,`Evidence-heavy flows: ${e.evidenceSupport}`,`Multimodal support: ${e.multimodalSupport}`,`MCP support: ${e.mcpSupport}`,`Reasoning control: ${ke(e.reasoningCapability)}`]}o(ht,"formatProviderCapabilityDetailLines");function yt(e,t,n){return[{label:"General coding",hints:{}},{label:"Evidence-heavy review",hints:{evidenceHeavy:!0}},{label:"Long-running task",hints:{longRunning:!0}}].map(i=>({label:i.label,decision:Ce(e,t,n,i.hints)})).filter(i=>i.decision!==null)}o(yt,"getProviderCommonPolicyScenarios");var Z=.5,ee=0,P={locked:!1,queue:[]};async function Et(e){for(;P.locked;)await new Promise(t=>P.queue.push(t));P.locked=!0;try{let t=(Date.now()-ee)/1e3;t<Z&&await new Promise(r=>setTimeout(r,(Z-t)*1e3));let n=await e();return ee=Date.now(),n}finally{P.locked=!1;let t=P.queue.shift();t&&t()}}o(Et,"rateLimitedCall");export{Ne as a,S as b,He as c,d,qe as e,ve as f,Je as g,ye as h,be as i,Ye as j,_e as k,Se as l,Oe as m,we as n,Qe as o,Ce as p,Ze as q,et as r,y as s,tt as t,nt as u,ot as v,rt as w,ke as x,it as y,st as z,at as A,w as B,M as C,ct as D,lt as E,Me as F,ut as G,ft as H,dt as I,pt as J,mt as K,gt as L,De as M,vt as N,Te as O,ht as P,yt as Q,Et as R};
@@ -1,2 +0,0 @@
1
- // @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
2
- import{za as e}from"./chunk-NVDK375I.js";import{a as n}from"./chunk-ONUPGMER.js";import{readFile as i}from"fs/promises";var c={enabled:!0,triggerPercent:75};async function g(o){let t=e("config.json");try{let r=await a(t);if(r?.compaction)return{...c,...r.compaction}}catch{}return c}n(g,"loadCompactionConfig");async function a(o){try{let t=await i(o,"utf-8");return JSON.parse(t)}catch{return null}}n(a,"readConfigFile");export{g as a};