@kodax-ai/kodax 0.7.41 → 0.7.43
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.
- package/CHANGELOG.md +119 -3
- package/README.md +214 -286
- package/README_CN.md +173 -277
- package/dist/chunks/chunk-7G5PSL6C.js +830 -0
- package/dist/chunks/{chunk-6OB4AJOM.js → chunk-IYSK7LUK.js} +1 -1
- package/dist/chunks/chunk-K75O2CAE.js +31 -0
- package/dist/chunks/chunk-UG4262JI.js +502 -0
- package/dist/chunks/chunk-VHKAJDQD.js +425 -0
- package/dist/chunks/chunk-YMRZBS4G.js +2 -0
- package/dist/chunks/{compaction-config-LT5PEXPT.js → compaction-config-3E57ABCT.js} +1 -1
- package/dist/chunks/{construction-bootstrap-HBCWJFHC.js → construction-bootstrap-JR63KI5N.js} +4 -4
- package/dist/chunks/dist-KWHUKXEL.js +2 -0
- package/dist/chunks/dist-XANXEVTU.js +2 -0
- package/dist/chunks/utils-HQ2QCKJA.js +2 -0
- package/dist/index.d.ts +15 -10
- package/dist/index.js +5 -5
- package/dist/kodax_cli.js +1084 -1054
- package/dist/sdk-agent.d.ts +853 -135
- package/dist/sdk-agent.js +1 -1
- package/dist/sdk-coding.d.ts +932 -981
- package/dist/sdk-coding.js +1 -1
- package/dist/sdk-llm.d.ts +8 -5
- package/dist/sdk-llm.js +1 -1
- package/dist/sdk-mcp.d.ts +17 -0
- package/dist/sdk-mcp.js +2 -0
- package/dist/sdk-repl.d.ts +343 -10
- package/dist/sdk-repl.js +2 -1
- package/dist/sdk-session.d.ts +176 -0
- package/dist/sdk-session.js +2 -0
- package/dist/sdk-skills.d.ts +72 -4
- package/dist/sdk-skills.js +1 -1
- package/dist/types-chunks/{cost-tracker.d-C4dMlQuV.d.ts → base.d-FUJahC0i.d.ts} +22 -112
- package/dist/types-chunks/{bash-prefix-extractor.d-B2iliwdi.d.ts → bash-prefix-extractor.d-DMrGImMl.d.ts} +266 -228
- package/dist/types-chunks/capability.d-3C62G8Eq.d.ts +39 -0
- package/dist/types-chunks/config.d-BfJUXxC0.d.ts +41 -0
- package/dist/types-chunks/cost-tracker.d-wRtyEW9d.d.ts +110 -0
- package/dist/types-chunks/{history-cleanup.d-q1vAvCss.d.ts → file-tracker.d-zaLZeNBK.d.ts} +532 -15
- package/dist/types-chunks/manager.d-87belpiS.d.ts +370 -0
- package/dist/types-chunks/{resolver.d-BwD6TKz7.d.ts → resolver.d-CA68_NeH.d.ts} +150 -5
- package/dist/types-chunks/storage.d-DPAEX7zS.d.ts +115 -0
- package/dist/types-chunks/{capability.d-BxNgd1-c.d.ts → types.d-B1uGoVTE.d.ts} +72 -40
- package/dist/types-chunks/{instance-discovery.d-DZhp77vb.d.ts → types.d-CKJtjo-6.d.ts} +168 -258
- package/dist/types-chunks/types.d-mM8vqvhT.d.ts +254 -0
- package/dist/types-chunks/{storage.d-Bv9T99Qu.d.ts → utils.d-DkLZD_wa.d.ts} +38 -112
- package/package.json +15 -6
- package/dist/chunks/chunk-5TFLMGER.js +0 -2
- package/dist/chunks/chunk-6QO6HWGU.js +0 -30
- package/dist/chunks/chunk-EQ5DGS2W.js +0 -14
- package/dist/chunks/chunk-HYWVRTFA.js +0 -1233
- package/dist/chunks/chunk-SX2IS5JP.js +0 -16
- package/dist/chunks/chunk-ZPJPNLBK.js +0 -462
- package/dist/chunks/dist-M57GIWR4.js +0 -2
- package/dist/chunks/dist-V3BS2NKB.js +0 -2
- package/dist/chunks/utils-FAFUQJ2A.js +0 -2
package/README.md
CHANGED
|
@@ -1,36 +1,133 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<picture>
|
|
3
|
+
<source media="(prefers-color-scheme: dark)" srcset="assets/logo-dark.svg">
|
|
4
|
+
<source media="(prefers-color-scheme: light)" srcset="assets/logo-light.svg">
|
|
5
|
+
<img src="assets/logo-light.svg" alt="KodaX" width="640">
|
|
6
|
+
</picture>
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
10
|
+
<b>Open-source AI coding agent on every LLM you can reach.</b><br>
|
|
11
|
+
Anthropic · OpenAI · DeepSeek · Kimi · Zhipu · MiniMax · MiMo · Ark · Qwen · Gemini · Codex.<br>
|
|
12
|
+
REPL · CLI · library · Node-free single binary.
|
|
13
|
+
</p>
|
|
14
|
+
|
|
15
|
+
<p align="center">
|
|
16
|
+
<a href="https://www.npmjs.com/package/@kodax-ai/kodax"><img alt="npm version" src="https://img.shields.io/npm/v/@kodax-ai/kodax?style=flat-square&color=cb3837"></a>
|
|
17
|
+
<a href="LICENSE"><img alt="license" src="https://img.shields.io/badge/license-Apache--2.0-blue?style=flat-square"></a>
|
|
18
|
+
<a href="https://github.com/icetomoyo/KodaX/stargazers"><img alt="GitHub stars" src="https://img.shields.io/github/stars/icetomoyo/KodaX?style=flat-square&logo=github&color=f1c40f"></a>
|
|
19
|
+
<a href="https://github.com/icetomoyo/KodaX/actions"><img alt="CI" src="https://img.shields.io/github/actions/workflow/status/icetomoyo/KodaX/release.yml?style=flat-square&label=release"></a>
|
|
20
|
+
<img alt="providers" src="https://img.shields.io/badge/LLMs-13_native_+_OpenAI%2FAnthropic--compat-2ecc71?style=flat-square">
|
|
21
|
+
</p>
|
|
22
|
+
|
|
23
|
+
<p align="center">
|
|
24
|
+
<a href="#install-in-30-seconds">Install</a> ·
|
|
25
|
+
<a href="#four-ways-to-use-kodax">Usage</a> ·
|
|
26
|
+
<a href="#sdk-usage">SDK</a> ·
|
|
27
|
+
<a href="CHANGELOG.md">Changelog</a> ·
|
|
28
|
+
<a href="docs/FEATURE_LIST.md">Roadmap</a> ·
|
|
29
|
+
<a href="https://github.com/icetomoyo/KodaX/discussions">Discussions</a> ·
|
|
30
|
+
<a href="README_CN.md">中文 README</a>
|
|
31
|
+
</p>
|
|
32
|
+
|
|
33
|
+
<p align="center">
|
|
34
|
+
<img src="kodax.gif" alt="KodaX in action" width="880">
|
|
35
|
+
</p>
|
|
2
36
|
|
|
3
|
-
|
|
37
|
+
---
|
|
4
38
|
|
|
5
|
-
##
|
|
39
|
+
## Install in 30 seconds
|
|
6
40
|
|
|
7
|
-
|
|
41
|
+
```bash
|
|
42
|
+
npm i -g @kodax-ai/kodax
|
|
8
43
|
|
|
9
|
-
|
|
44
|
+
# Pick any one you have an API key for:
|
|
45
|
+
export ZHIPU_API_KEY=... # or ANTHROPIC_API_KEY / OPENAI_API_KEY / KIMI_API_KEY /
|
|
46
|
+
# MINIMAX_API_KEY / MIMO_API_KEY / ARK_API_KEY / QWEN_API_KEY /
|
|
47
|
+
# DEEPSEEK_API_KEY / GEMINI_API_KEY
|
|
10
48
|
|
|
11
|
-
|
|
49
|
+
kodax
|
|
50
|
+
```
|
|
12
51
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
| Why use it in production tools? | The packages are separated cleanly, so you can reuse only the layer you need. |
|
|
52
|
+
That's it. You're in the REPL — ask anything in natural language.
|
|
53
|
+
|
|
54
|
+
> **No-Node target machines:** download a Bun-compiled single binary for Windows / macOS / Linux × x64 + arm64 from the [GitHub Releases](https://github.com/icetomoyo/KodaX/releases) page. See [docs/release.md](docs/release.md) for the build pipeline.
|
|
55
|
+
|
|
56
|
+
---
|
|
19
57
|
|
|
20
|
-
|
|
58
|
+
## Four ways to use KodaX
|
|
21
59
|
|
|
22
|
-
|
|
|
23
|
-
|
|
24
|
-
| **
|
|
25
|
-
| **
|
|
26
|
-
| **
|
|
27
|
-
| **
|
|
28
|
-
| **Distribution** | npm install / global link / **standalone binary** (Bun --compile, no Node required on target) | Closed-source installer or web app |
|
|
29
|
-
| **Learning value** | Good for understanding agent internals | More black-box |
|
|
60
|
+
| Form | Command / Import | When to use it |
|
|
61
|
+
|---|---|---|
|
|
62
|
+
| **REPL** | `kodax` | Interactive multi-turn coding session with streaming UI, permissions, slash commands |
|
|
63
|
+
| **CLI** | `kodax -p "your task"` | One-shot scripted task, CI runs, batch processing |
|
|
64
|
+
| **Library** | `import { runKodaX } from '@kodax-ai/kodax'` | Embed in your own tool / agent / web service |
|
|
65
|
+
| **Single binary** | `./kodax` | Distribute to machines that don't have Node installed |
|
|
30
66
|
|
|
31
|
-
|
|
67
|
+
---
|
|
32
68
|
|
|
33
|
-
|
|
69
|
+
## Why KodaX
|
|
70
|
+
|
|
71
|
+
<table>
|
|
72
|
+
<tr>
|
|
73
|
+
<td width="33%" align="center" valign="top">
|
|
74
|
+
<h3>🇨🇳 6 China-native LLMs</h3>
|
|
75
|
+
<sub>Zhipu · Kimi · MiniMax · MiMo · Ark · Qwen</sub>
|
|
76
|
+
<br><br>
|
|
77
|
+
First-class adapters with cross-provider <a href="benchmark/EVAL_GUIDELINES.md">prompt-eval calibration</a> on a canonical 5-alias panel — not OpenAI-compat shims.
|
|
78
|
+
</td>
|
|
79
|
+
<td width="33%" align="center" valign="top">
|
|
80
|
+
<h3>📦 Single-file binary</h3>
|
|
81
|
+
<sub>Bun --compile · Win / macOS / Linux · x64 + arm64</sub>
|
|
82
|
+
<br><br>
|
|
83
|
+
No Node required on the target machine. Drop one file, run anywhere — restricted envs, CI runners, air-gapped boxes.
|
|
84
|
+
</td>
|
|
85
|
+
<td width="33%" align="center" valign="top">
|
|
86
|
+
<h3>🌳 Branchable session lineage</h3>
|
|
87
|
+
<sub>Fork · rewind · parallel edit</sub>
|
|
88
|
+
<br><br>
|
|
89
|
+
Conversation history is a DAG, not a list. Powers the upcoming <b>KodaX Space</b> desktop app.
|
|
90
|
+
</td>
|
|
91
|
+
</tr>
|
|
92
|
+
<tr>
|
|
93
|
+
<td align="center" valign="top">
|
|
94
|
+
<h3>🤖 Multi-agent by default</h3>
|
|
95
|
+
<sub>V2 Worker single-loop + Sidecar Verifier + async children</sub>
|
|
96
|
+
<br><br>
|
|
97
|
+
<code>dispatch_child_task</code>, <code>send_message</code>, <code>task_stop</code>, multi-instance auto-coordination with content-hash safety net.
|
|
98
|
+
</td>
|
|
99
|
+
<td align="center" valign="top">
|
|
100
|
+
<h3>🧩 Skills + self-construction</h3>
|
|
101
|
+
<sub>Markdown skills, NL triggers</sub>
|
|
102
|
+
<br><br>
|
|
103
|
+
5-stage self-modification staircase (scaffold → validate → stage → test → activate) gated by an 8-invariant admission contract.
|
|
104
|
+
</td>
|
|
105
|
+
<td align="center" valign="top">
|
|
106
|
+
<h3>🛠 30+ built-in tools</h3>
|
|
107
|
+
<sub>File · shell · search · MCP · ACP</sub>
|
|
108
|
+
<br><br>
|
|
109
|
+
Repo intelligence, semantic search, git worktree, web fetch — all addressable through one clean tool surface.
|
|
110
|
+
</td>
|
|
111
|
+
</tr>
|
|
112
|
+
</table>
|
|
113
|
+
|
|
114
|
+
## How KodaX compares
|
|
115
|
+
|
|
116
|
+
| Feature | **KodaX** | Claude Code | Aider | Codex CLI | Cursor | Cline |
|
|
117
|
+
|---|---|---|---|---|---|---|
|
|
118
|
+
| Open source | ✅ Apache 2.0 | ❌ Source-available | ✅ Apache 2.0 | ✅ Apache 2.0 | ❌ Proprietary | ✅ Apache 2.0 |
|
|
119
|
+
| Node-free single binary | ✅ Bun | ❌ Node | ❌ Python | ✅ Rust | ❌ Electron | ❌ Extension |
|
|
120
|
+
| Native China providers<br><sub>(Zhipu · Kimi · MiniMax · MiMo · Ark · Qwen)</sub> | ✅ 6 native | ❌ | ⚠ via LiteLLM | ❌ OpenAI-first | ❌ no provider menu | ⚠ Kimi / Qwen / DeepSeek |
|
|
121
|
+
| Branchable session lineage | ✅ fork & rewind | ⚠ routines / sessions | ❌ | ❌ | ❌ | ⚠ checkpoints |
|
|
122
|
+
| Multi-agent + MCP + 30+ tools | ✅ all three | ✅ all three | ⚠ tools, no MCP | ✅ all three | ⚠ Composer + MCP | ✅ all three |
|
|
123
|
+
|
|
124
|
+
<sub>Data verified May 2026 against public docs ([Claude Code](https://github.com/anthropics/claude-code) · [Aider](https://aider.chat/docs/llms.html) · [Codex CLI](https://github.com/openai/codex) · [Cursor](https://cursor.com) · [Cline](https://github.com/cline/cline)). ⚠ = partial / requires extra setup / not first-class. Corrections welcome via PR.</sub>
|
|
125
|
+
|
|
126
|
+
## Detailed Setup
|
|
127
|
+
|
|
128
|
+
> The `npm i -g @kodax-ai/kodax` one-liner above is the fastest path. This section is for building from source, configuring custom providers, or using KodaX as a library.
|
|
129
|
+
|
|
130
|
+
### 1. Build the CLI from source
|
|
34
131
|
|
|
35
132
|
```bash
|
|
36
133
|
git clone https://github.com/icetomoyo/KodaX.git
|
|
@@ -156,251 +253,53 @@ const result = await runKodaX(
|
|
|
156
253
|
);
|
|
157
254
|
```
|
|
158
255
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
- **Project Mode / harness engineering**: bootstrap a long-running project, keep project truth on disk, and execute through verifier-gated `/project` flows.
|
|
164
|
-
- **Embeddable library**: reuse the provider layer, session layer, or full coding agent in your own app.
|
|
165
|
-
|
|
166
|
-
## Repo Intelligence Premium
|
|
167
|
-
|
|
168
|
-
KodaX now supports a split repo-intelligence architecture:
|
|
169
|
-
|
|
170
|
-
- **Public OSS baseline** lives in the public `KodaX` repo and keeps `CLI`, `REPL`, `ACP`, library imports, and repo-aware tools working even when no premium component is installed.
|
|
171
|
-
- **Premium intelligence** lives in the sibling private repo `KodaX-private` and runs through the local `repointel` daemon / CLI frontdoor.
|
|
172
|
-
- **KodaX native mode** is the flagship experience. It can prefetch repo intelligence before routing and prompt building, while other hosts such as Codex / Claude Code / OpenCode use the same premium tool through thin skills.
|
|
173
|
-
|
|
174
|
-
### Runtime modes
|
|
175
|
-
|
|
176
|
-
KodaX supports these repo-intelligence modes:
|
|
256
|
+
> **Embedding KodaX inside another app?** (KodaX Space, IDE extensions, custom CLIs)
|
|
257
|
+
> See [docs/SDK_EMBEDDER_GUIDE.md](docs/SDK_EMBEDDER_GUIDE.md) for the runtime-mutation
|
|
258
|
+
> surface (`startKodaX` + `RunningSession`), MCP popout manager API (`McpManager`),
|
|
259
|
+
> Skill `` !`cmd` `` host hook, and per-app data dir namespacing (`getAppDataDir`).
|
|
177
260
|
|
|
178
|
-
|
|
179
|
-
- `oss`: use only the public OSS baseline.
|
|
180
|
-
- `premium-shared`: use the premium engine, but without the native KodaX auto lane. This is useful for comparing KodaX against other hosts.
|
|
181
|
-
- `premium-native`: use the premium engine through the KodaX native bridge. This is the best local experience.
|
|
182
|
-
- `auto`: user-facing convenience mode. KodaX resolves it to `premium-native` when the premium daemon is reachable, otherwise it falls back to `oss`.
|
|
261
|
+
## Repo Intelligence (optional premium engine)
|
|
183
262
|
|
|
184
|
-
|
|
263
|
+
KodaX ships with built-in OSS repo intelligence (`repo_overview`, `module_context`, `symbol_context`, `process_context`, `impact_estimate`, …) that helps the coding agent understand large codebases without ad-hoc grep/glob exploration.
|
|
185
264
|
|
|
186
|
-
|
|
265
|
+
An optional **premium engine** (`repointel` local daemon, distributed via the sibling `KodaX-private` repo) adds proactive context injection, deeper module capsules, and a native auto-lane integration. KodaX automatically falls back to OSS when premium is unavailable.
|
|
187
266
|
|
|
188
267
|
```bash
|
|
189
|
-
#
|
|
190
|
-
kodax --repo-intelligence oss
|
|
191
|
-
|
|
192
|
-
# Premium native mode with trace output
|
|
268
|
+
# Pick a runtime mode (off | oss | premium-shared | premium-native | auto)
|
|
193
269
|
kodax --repo-intelligence premium-native --repo-intelligence-trace
|
|
194
|
-
|
|
195
|
-
# Compare against the shared premium path
|
|
196
|
-
kodax --repo-intelligence premium-shared --repo-intelligence-trace
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
You can also set the same behavior through config or environment variables:
|
|
200
|
-
|
|
201
|
-
```powershell
|
|
202
|
-
$env:KODAX_REPO_INTELLIGENCE_MODE = "premium-native"
|
|
203
|
-
$env:KODAX_REPO_INTELLIGENCE_TRACE = "1"
|
|
204
|
-
$env:KODAX_REPOINTEL_BIN = "C:\Tools\repointel\repointel.exe"
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
Official `KodaX-private` releases should now publish only the native `repointel` package. The older offline bundle remains useful for internal/manual validation, but it should not be the normal end-user release artifact.
|
|
208
|
-
|
|
209
|
-
### REPL mode
|
|
210
|
-
|
|
211
|
-
It is not CLI-only. REPL mode supports the same repo-intelligence runtime modes.
|
|
212
|
-
|
|
213
|
-
The most direct premium-native REPL flow is:
|
|
214
|
-
|
|
215
|
-
```powershell
|
|
216
|
-
Set-Location <path-to-your-KodaX-clone>
|
|
217
|
-
kodax --repo-intelligence premium-native --repo-intelligence-trace
|
|
218
|
-
```
|
|
219
|
-
|
|
220
|
-
If you save the premium settings in `~/.kodax/config.json`, plain REPL startup is enough:
|
|
221
|
-
|
|
222
|
-
```powershell
|
|
223
|
-
kodax
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
Inside REPL, repo intelligence is still consumed automatically by the normal KodaX flow, and there are also lightweight status/control commands:
|
|
227
|
-
|
|
228
|
-
- `/status`: shows a compact repo-intelligence summary together with the normal session status output.
|
|
229
|
-
- `/repointel` or `/repointel status`: shows the current repo-intelligence state in more detail.
|
|
230
|
-
- `/repointel mode premium-native|premium-shared|oss|off|auto`: switches the current mode and writes it back to user config.
|
|
231
|
-
- `/repointel trace on|off|toggle`: turns repo-intelligence trace output on or off.
|
|
232
|
-
- `/repointel warm`: tries to warm or start the local premium service. If it cannot be started, KodaX reports the failure clearly and continues with the normal fallback path.
|
|
233
|
-
|
|
234
|
-
The most important fields to watch are:
|
|
235
|
-
|
|
236
|
-
- `mode`: the resolved runtime mode, such as `oss`, `premium-shared`, or `premium-native`
|
|
237
|
-
- `engine`: the actual engine in use, `oss` or `premium`
|
|
238
|
-
- `bridge`: `none`, `shared`, or `native`
|
|
239
|
-
- `status`: typically `ok`, `limited`, or `unavailable`
|
|
240
|
-
|
|
241
|
-
The practical difference between the two premium modes is:
|
|
242
|
-
|
|
243
|
-
- `premium-native`: the flagship KodaX path. KodaX can prefetch and inject repo intelligence earlier in its native runtime flow.
|
|
244
|
-
- `premium-shared`: still uses premium, but intentionally avoids the KodaX-native auto lane so you can compare against the shared multi-host path.
|
|
245
|
-
- `oss`: keep the public baseline repo tools and OSS intelligence only.
|
|
246
|
-
- `off`: strict disable for repo-intelligence working tools and auto injection. `/repointel` remains available as the control plane.
|
|
247
|
-
|
|
248
|
-
### User-level config
|
|
249
|
-
|
|
250
|
-
Repo-intelligence premium settings are supported in the user config file `~/.kodax/config.json`.
|
|
251
|
-
|
|
252
|
-
Supported fields:
|
|
253
|
-
|
|
254
|
-
- `repoIntelligenceMode`
|
|
255
|
-
- `repointelEndpoint`
|
|
256
|
-
- `repointelBin`
|
|
257
|
-
- `repoIntelligenceTrace`
|
|
258
|
-
|
|
259
|
-
Recommended end-user example when `repointel` is installed but not on `PATH`:
|
|
260
|
-
|
|
261
|
-
```json
|
|
262
|
-
{
|
|
263
|
-
"provider": "zhipu-coding",
|
|
264
|
-
"reasoningMode": "auto",
|
|
265
|
-
"repoIntelligenceMode": "premium-native",
|
|
266
|
-
"repointelBin": "C:\\Tools\\repointel\\repointel.exe",
|
|
267
|
-
"repoIntelligenceTrace": false
|
|
268
|
-
}
|
|
269
|
-
```
|
|
270
|
-
|
|
271
|
-
For normal user installs, the preferred setup is to install the premium tool so the `repointel` command is already on `PATH`, in which case this is usually enough:
|
|
272
|
-
|
|
273
|
-
```json
|
|
274
|
-
{
|
|
275
|
-
"repoIntelligenceMode": "premium-native"
|
|
276
|
-
}
|
|
277
270
|
```
|
|
278
271
|
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
```json
|
|
282
|
-
{
|
|
283
|
-
"repoIntelligenceMode": "premium-native",
|
|
284
|
-
"repointelBin": "C:\\Tools\\repointel\\repointel.exe"
|
|
285
|
-
}
|
|
286
|
-
```
|
|
287
|
-
|
|
288
|
-
For author same-parent local development, it is still valid to point `repointelBin` at the sibling private source build:
|
|
289
|
-
|
|
290
|
-
```json
|
|
291
|
-
{
|
|
292
|
-
"repoIntelligenceMode": "premium-native",
|
|
293
|
-
"repointelEndpoint": "http://127.0.0.1:47891",
|
|
294
|
-
"repointelBin": "C:\\path\\to\\KodaX-private\\packages\\repointel-cli\\dist\\index.js",
|
|
295
|
-
"repoIntelligenceTrace": true
|
|
296
|
-
}
|
|
297
|
-
```
|
|
298
|
-
|
|
299
|
-
`repointelEndpoint` is optional in normal installs. It only tells KodaX which local premium daemon address to use, and the default `http://127.0.0.1:47891` is usually enough unless you deliberately run a non-default endpoint.
|
|
300
|
-
|
|
301
|
-
For same-parent author local development, `repointelBin` can still point to the sibling private build output.
|
|
302
|
-
|
|
303
|
-
These config values are loaded by both CLI mode and REPL mode, and they are bridged into the runtime environment automatically.
|
|
304
|
-
|
|
305
|
-
### Config template
|
|
306
|
-
|
|
307
|
-
The repo now includes a user-facing config template:
|
|
308
|
-
|
|
309
|
-
- `config.example.jsonc`
|
|
310
|
-
|
|
311
|
-
Copy it to `~/.kodax/config.json`, then adjust provider and repo-intelligence settings as needed.
|
|
312
|
-
|
|
313
|
-
### Local same-parent development
|
|
314
|
-
|
|
315
|
-
The intended phase-1 development layout is to clone both repos under the same parent directory, for example:
|
|
316
|
-
|
|
317
|
-
- Public repo: `<parent>/KodaX`
|
|
318
|
-
- Private repo: `<parent>/KodaX-private`
|
|
319
|
-
|
|
320
|
-
Typical local workflow:
|
|
321
|
-
|
|
322
|
-
```powershell
|
|
323
|
-
# 1. Build the public repo
|
|
324
|
-
Set-Location <parent>\KodaX
|
|
325
|
-
npm install
|
|
326
|
-
npm run build
|
|
327
|
-
|
|
328
|
-
# 2. Build the private premium repo
|
|
329
|
-
Set-Location <parent>\KodaX-private
|
|
330
|
-
npm install
|
|
331
|
-
npm run build
|
|
332
|
-
|
|
333
|
-
# 3. Warm or start the premium daemon
|
|
334
|
-
node .\packages\repointel-cli\dist\index.js warm "{}"
|
|
335
|
-
|
|
336
|
-
# 4. Run KodaX in premium-native mode
|
|
337
|
-
Set-Location <parent>\KodaX
|
|
338
|
-
npm run dev -- --repo-intelligence premium-native --repo-intelligence-trace
|
|
339
|
-
```
|
|
340
|
-
|
|
341
|
-
### How KodaX behaves after the split
|
|
342
|
-
|
|
343
|
-
- If premium is unavailable, KodaX automatically falls back to the OSS baseline. Startup, imports, and public tools keep working.
|
|
344
|
-
- If premium is available, `premium-native` uses the daemon client directly and injects repo intelligence earlier than shared-host integrations.
|
|
345
|
-
- Trace-enabled runs can be used to compare `off`, `oss`, `premium-shared`, and `premium-native` on the same task, including mode, engine, bridge, daemon latency, cache hits, and capsule token estimates.
|
|
346
|
-
|
|
347
|
-
### External hosts
|
|
348
|
-
|
|
349
|
-
Codex, Claude Code, and OpenCode are intentionally thinner in phase 1:
|
|
350
|
-
|
|
351
|
-
- they install the shared Repointel skill
|
|
352
|
-
- they call the same local premium tool
|
|
353
|
-
- they do **not** ship a separate OSS fallback engine
|
|
354
|
-
|
|
355
|
-
Install the shared thin skill from the public repo:
|
|
356
|
-
|
|
357
|
-
```powershell
|
|
358
|
-
# Cross-platform primary entrypoint
|
|
359
|
-
node .\clients\repointel\scripts\install.mjs --host codex
|
|
360
|
-
node .\clients\repointel\scripts\install.mjs --host claude --workspace-root C:\path\to\workspace
|
|
361
|
-
node .\clients\repointel\scripts\install.mjs --host opencode --workspace-root C:\path\to\workspace
|
|
362
|
-
```
|
|
363
|
-
|
|
364
|
-
Useful helper scripts:
|
|
365
|
-
|
|
366
|
-
- `clients/repointel/scripts/demo.mjs`: run a local premium demo flow against a temporary endpoint.
|
|
367
|
-
- `clients/repointel/scripts/doctor.mjs`: inspect local premium setup, bridge status, daemon reachability, and host skill installation.
|
|
368
|
-
- `clients/repointel/scripts/install.mjs`: install the shared thin skill into Codex / Claude / OpenCode host paths.
|
|
369
|
-
|
|
370
|
-
The installable shared skill itself lives at:
|
|
371
|
-
|
|
372
|
-
- `clients/repointel/SKILL.md`
|
|
272
|
+
Setup, runtime modes, REPL controls, config schema, and external-host integrations: see [docs/REPOINTEL.md](docs/REPOINTEL.md).
|
|
373
273
|
|
|
374
274
|
## Architecture
|
|
375
275
|
|
|
376
|
-
KodaX uses a **monorepo architecture** with npm workspaces. Source layout has 9 workspace packages; published as a single bundled npm package `@kodax-ai/kodax` with
|
|
276
|
+
KodaX uses a **monorepo architecture** with npm workspaces. Source layout has 9 workspace packages; published as a single bundled npm package `@kodax-ai/kodax` with 6 SDK subpath exports (`/agent`, `/llm`, `/coding`, `/repl`, `/skills`, `/mcp`; ADR-022 + ADR-024 v0.7.39 + ADR-032 v0.7.42 added `/mcp`):
|
|
377
277
|
|
|
378
278
|
```
|
|
379
279
|
KodaX/
|
|
380
|
-
├── packages/
|
|
381
|
-
│ ├──
|
|
280
|
+
├── packages/ # 4 workspace packages (FEATURE_194 v0.7.43)
|
|
281
|
+
│ ├── llm/ # @kodax-ai/llm - LLM abstraction (12 providers)
|
|
382
282
|
│ │ └── providers/ # Anthropic, OpenAI, DeepSeek, Kimi, MiMo, MiniMax, Zhipu, Ark, …
|
|
383
283
|
│ │
|
|
384
284
|
│ ├── agent/ # @kodax-ai/agent - Generic Agent framework
|
|
385
|
-
│ │
|
|
386
|
-
│ │
|
|
387
|
-
│ ├──
|
|
388
|
-
│ │
|
|
285
|
+
│ │ ├── orchestration/ # Runner, runFanOut, runWithIdleYield, ChildTaskRegistry
|
|
286
|
+
│ │ ├── session-lineage/ # branchable session tree (inline v0.7.43)
|
|
287
|
+
│ │ ├── capabilities/
|
|
288
|
+
│ │ │ ├── mcp/ # MCP integration (inline v0.7.43)
|
|
289
|
+
│ │ │ └── skills/ # Skills standard implementation + builtin (inline v0.7.43)
|
|
290
|
+
│ │ └── tracing/ # tracing / observability (inline v0.7.43)
|
|
389
291
|
│ │
|
|
390
292
|
│ ├── coding/ # @kodax-ai/coding - Coding Agent (tools + prompts)
|
|
391
|
-
│ │
|
|
392
|
-
│ │
|
|
393
|
-
│ │
|
|
293
|
+
│ │ ├── tools/ # 30+ tools: read, write, edit, bash, glob, grep, undo,
|
|
294
|
+
│ │ │ # dispatch_child_task, send_message, task_stop,
|
|
295
|
+
│ │ │ # ask_user_question, repo-intelligence, …
|
|
296
|
+
│ │ └── repo-intelligence/ # incl. protocol.ts (inline v0.7.43)
|
|
394
297
|
│ │
|
|
395
|
-
│
|
|
396
|
-
│ ├── mcp/ # @kodax-ai/mcp - MCP integration
|
|
397
|
-
│ ├── repointel-protocol/ # @kodax-ai/repointel-protocol - repo-intel protocol
|
|
398
|
-
│ ├── session-lineage/ # @kodax-ai/session-lineage - branchable session tree
|
|
399
|
-
│ └── tracing/ # @kodax-ai/tracing - tracing / observability
|
|
298
|
+
│ └── repl/ # @kodax-ai/repl - Interactive terminal UI (Ink TUI)
|
|
400
299
|
│
|
|
401
|
-
├── src/ # CLI entry +
|
|
300
|
+
├── src/ # CLI entry + SDK subpath entries
|
|
402
301
|
│ ├── kodax_cli.ts # Main CLI entry point (bin: `kodax`)
|
|
403
|
-
│ └── sdk-*.ts # SDK subpath re-exports → @kodax-ai/kodax/{agent,llm,coding,repl
|
|
302
|
+
│ └── sdk-*.ts # SDK subpath re-exports → @kodax-ai/kodax/{agent,llm,coding,repl}
|
|
404
303
|
│
|
|
405
304
|
└── package.json # Root workspace config; release.mjs rewrites name + injects subpath exports
|
|
406
305
|
```
|
|
@@ -421,37 +320,57 @@ KodaX/
|
|
|
421
320
|
│ UI Layer │ │ Tools+Prompts │
|
|
422
321
|
└──────┬───────┘ └──────┬─────────┘
|
|
423
322
|
│ │
|
|
424
|
-
│
|
|
425
|
-
│ │
|
|
426
|
-
▼ ▼
|
|
427
|
-
┌──────────────┐
|
|
428
|
-
│@kodax-ai/ │ │@kodax-ai/
|
|
429
|
-
│
|
|
430
|
-
│
|
|
431
|
-
│ │ │
|
|
432
|
-
│ │ │
|
|
433
|
-
└──────────────┘
|
|
323
|
+
│ ┌──────────────┴──────────────┐
|
|
324
|
+
│ │ │
|
|
325
|
+
▼ ▼ ▼
|
|
326
|
+
┌──────────────┐ ┌──────────────────────────┐ ┌──────────────┐
|
|
327
|
+
│@kodax-ai/ │ │@kodax-ai/agent │ │@kodax-ai/llm │
|
|
328
|
+
│coding (via │ │Runner + fan-out + │ │LLM Abstract │
|
|
329
|
+
│above) │ │idle-yield + session- │ │(12 providers)│
|
|
330
|
+
│ │ │lineage + skills + mcp + │ │ │
|
|
331
|
+
│ │ │tracing (FEATURE_194) │ │ │
|
|
332
|
+
└──────────────┘ └──────────────────────────┘ └──────────────┘
|
|
434
333
|
```
|
|
435
334
|
|
|
436
335
|
### Package Overview
|
|
437
336
|
|
|
438
|
-
Source-side workspace package names (`@kodax-ai/*`). npm consumers install the single bundled `@kodax-ai/kodax` package and import from SDK subpaths — see [SDK Usage](#sdk-usage) below.
|
|
337
|
+
Source-side workspace package names (`@kodax-ai/*`). npm consumers install the single bundled `@kodax-ai/kodax` package and import from SDK subpaths — see [Source-side vs npm-published surface](#source-side-vs-npm-published-surface) and [SDK Usage](#sdk-usage) below.
|
|
439
338
|
|
|
440
339
|
| Workspace package | Purpose | Key Dependencies |
|
|
441
340
|
|---------|---------|------------------|
|
|
442
341
|
| `@kodax-ai/llm` | LLM abstraction (12 providers + custom registration) | @anthropic-ai/sdk, openai |
|
|
443
|
-
| `@kodax-ai/agent` | Generic Agent framework — Runner, fan-out, idle-yield, session,
|
|
444
|
-
| `@kodax-ai/
|
|
445
|
-
| `@kodax-ai/coding` | Coding Agent — 30+ tools (incl. `dispatch_child_task` / `send_message` / `task_stop`) + role prompts + auto-continue | @kodax-ai/llm, @kodax-ai/agent, @kodax-ai/skills |
|
|
342
|
+
| `@kodax-ai/agent` | Generic Agent framework — Runner, fan-out, idle-yield, session-lineage, capabilities (mcp + skills), tracing (ADR-036 v0.7.43 consolidation; subpaths: `/session-lineage`, `/capabilities/mcp`, `/capabilities/skills`, `/tracing`) | @kodax-ai/llm, js-tiktoken, fflate, yaml |
|
|
343
|
+
| `@kodax-ai/coding` | Coding Agent — 30+ tools (incl. `dispatch_child_task` / `send_message` / `task_stop`) + role prompts + auto-continue + repo-intelligence protocol | @kodax-ai/llm, @kodax-ai/agent |
|
|
446
344
|
| `@kodax-ai/repl` | Complete interactive terminal UI (Ink/React, permission modes, commands, streaming) | @kodax-ai/coding, ink, react |
|
|
447
345
|
|
|
346
|
+
### Source-side vs npm-published surface
|
|
347
|
+
|
|
348
|
+
KodaX has two layers that consumers should understand separately:
|
|
349
|
+
|
|
350
|
+
- **Source-side**: 4 workspace packages above (what developers see when reading the repo).
|
|
351
|
+
- **npm-published**: a single bundled package `@kodax-ai/kodax` with 7 SDK subpaths (what SDK consumers `import` from). The subpaths are split into two roles:
|
|
352
|
+
- **Full-package subpaths** (`/agent`, `/llm`, `/coding`, `/repl`) — each one maps 1:1 to a source workspace and exposes its complete public API.
|
|
353
|
+
- **Narrow-subset subpaths** (`/skills`, `/mcp`, `/session`) — each one exposes only a focused capability slice carved out of `/agent` or `/repl`. This lets consumers who only need (say) the Skills system import a much smaller surface without pulling in the full agent framework.
|
|
354
|
+
|
|
355
|
+
| Source package | npm subpath | Type | What you get | Example consumer |
|
|
356
|
+
|---|---|---|---|---|
|
|
357
|
+
| `packages/llm` | `@kodax-ai/kodax/llm` | Full package | 12-provider LLM abstraction (77 exports) | Standalone LLM clients |
|
|
358
|
+
| `packages/agent` | `@kodax-ai/kodax/agent` | Full package | Runner / fan-out / session-lineage / capabilities / tracing (202 exports) | Custom agent frameworks |
|
|
359
|
+
| `packages/agent` | `@kodax-ai/kodax/skills` | **Narrow subset** | Skills system only — `SkillRegistry` / `loadFullSkill` / `expandSkillForLLM` / ... (26 exports = pre-v0.7.43 `@kodax-ai/skills` complete API) | Skill loaders, IDE plugins |
|
|
360
|
+
| `packages/agent` | `@kodax-ai/kodax/mcp` | **Narrow subset** | MCP only — `McpCapabilityProvider` / `createMcpTransport` / `searchMcpCatalog` / ... (11 exports = pre-v0.7.43 `@kodax-ai/mcp` complete API) | MCP server hosts |
|
|
361
|
+
| `packages/coding` | `@kodax-ai/kodax/coding` | Full package | Coding agent + 30+ tools + repo-intelligence (342 exports) | Build a Claude Code-shape product |
|
|
362
|
+
| `packages/repl` | `@kodax-ai/kodax/repl` | Full package | Ink TUI + permission modes + commands (193 exports) | Terminal-UI consumers |
|
|
363
|
+
| `packages/repl` | `@kodax-ai/kodax/session` | **Narrow subset** | Session management only — `listSessions` / `forkSession` / `watchSessions` / ... (9 exports) | IDE plugins reading session history |
|
|
364
|
+
|
|
365
|
+
**Rule of thumb**: if you need Runner / Agent / fan-out, import from `/agent`. If you only need skills or mcp APIs, import from `/skills` or `/mcp` to get a smaller bundle. The narrow subsets are subsets of the full packages — they do **not** expose extra symbols.
|
|
366
|
+
|
|
448
367
|
---
|
|
449
368
|
|
|
450
369
|
## Features
|
|
451
370
|
|
|
452
371
|
- **Modular Architecture** - Use as CLI, as a library, or as a Node-free single binary
|
|
453
372
|
- **12 LLM Providers** - Anthropic, OpenAI, DeepSeek, Kimi, Kimi Code, Qwen, Zhipu, Zhipu Coding, MiniMax Coding, MiMo Coding (Xiaomi Token Plan), Gemini CLI, Codex CLI — plus user-defined OpenAI/Anthropic-compatible providers
|
|
454
|
-
- **Worker +
|
|
373
|
+
- **V2 Worker single-loop + Sidecar Verifier (default)** - Single-agent main loop with an out-of-band Sidecar Verifier as Stop-hook (claudecode-shape; FEATURE_184 v0.7.42, ADR-030). Verifier returns accept/revise/blocked verdict on Worker text-only termination. V1 Scout/Planner/Generator/Evaluator chain fully retired (FEATURE_193 v0.7.43); `emit_handoff` tool deleted (FEATURE_190 v0.7.43); accept-verdict UI silently passes through (FEATURE_195 v0.7.43); content-aware fire gate skips trivial-chat sidecar calls (FEATURE_196 v0.7.43). Async child steering via `dispatch_child_task` + `send_message` + `task_stop` with idle-yield wait (FEATURE_120 / FEATURE_155, v0.7.39); specialist routing via `subagent_type` (FEATURE_191 v0.7.43).
|
|
455
374
|
- **Reasoning Modes** - Unified `off/auto/quick/balanced/deep` interface across providers
|
|
456
375
|
- **Streaming Output** - Real-time response display
|
|
457
376
|
- **Session Management** - JSONL format with branchable session lineage tree
|
|
@@ -546,14 +465,17 @@ console.log(result.lastText);
|
|
|
546
465
|
For smaller surface and tree-shake-friendly imports, the SDK is also exposed via subpath exports — pick only the package(s) you need:
|
|
547
466
|
|
|
548
467
|
```typescript
|
|
549
|
-
import { Runner } from '@kodax-ai/kodax/agent';
|
|
550
|
-
import { createProvider } from '@kodax-ai/kodax/llm';
|
|
551
|
-
import { runKodaX } from '@kodax-ai/kodax/coding';
|
|
552
|
-
import { SkillRegistry } from '@kodax-ai/kodax/skills';
|
|
553
|
-
import { loadConfig } from '@kodax-ai/kodax/repl';
|
|
468
|
+
import { Runner } from '@kodax-ai/kodax/agent'; // agent runtime
|
|
469
|
+
import { createProvider } from '@kodax-ai/kodax/llm'; // LLM abstraction (12 providers)
|
|
470
|
+
import { runKodaX } from '@kodax-ai/kodax/coding'; // coding tools + prompts
|
|
471
|
+
import { SkillRegistry } from '@kodax-ai/kodax/skills'; // zero-dep skill loader
|
|
472
|
+
import { loadConfig } from '@kodax-ai/kodax/repl'; // REPL config / session helpers
|
|
473
|
+
import { createMcpManager } from '@kodax-ai/kodax/mcp'; // MCP popout manager (v0.7.42)
|
|
554
474
|
```
|
|
555
475
|
|
|
556
|
-
All
|
|
476
|
+
All 7 entries (root + 6 subpaths) share internal code via ESM chunk splitting — importing from `/agent` does not pull in `/repl`'s Ink + React surface.
|
|
477
|
+
|
|
478
|
+
> **ESM-only.** The SDK is published as ES Modules. In a CommonJS context (Electron main process, legacy Webpack CJS bundles, `require()`-based code) you must use `await import(...)` instead of `require()`. See [docs/SDK_EMBEDDER_GUIDE.md §5](docs/SDK_EMBEDDER_GUIDE.md#5-consuming-from-a-commonjs-context-electron-main-cjs-bundles) for the canonical recipe + the technical reason most subpaths cannot ship a dual ESM/CJS build.
|
|
557
479
|
|
|
558
480
|
For CLI users, provider defaults live in `~/.kodax/config.json`. For library users, API keys are still read from environment variables; if you need custom base URLs or provider aliases, use `registerCustomProviders()` as shown above.
|
|
559
481
|
|
|
@@ -711,7 +633,7 @@ KodaX recognizes a number of environment variables for tuning runtime behavior.
|
|
|
711
633
|
|
|
712
634
|
#### `KODAX_MAX_OUTPUT_TOKENS`
|
|
713
635
|
|
|
714
|
-
Overrides the per-turn `max_tokens` value sent to **every** provider (Anthropic, OpenAI, Zhipu, Kimi, MiniMax, Qwen, DeepSeek, MiMo, Gemini, Codex, …). Set to a positive integer; unset or non-numeric values are ignored. This is an **explicit user intent**: when set, it wins over the provider's model descriptor cap, over the provider config default, and over the global `KODAX_MAX_TOKENS` fallback.
|
|
636
|
+
Overrides the per-turn `max_tokens` value sent to **every** provider (Anthropic, OpenAI, Zhipu, Kimi, MiniMax, Qwen, DeepSeek, MiMo, Gemini, Codex, …). Set to a positive integer; unset or non-numeric values are ignored. This is an **explicit user intent**: when set, it wins over the provider's model descriptor cap, over the provider config default, and over the global `KODAX_MAX_TOKENS` fallback. RST defense is handled at the provider config layer (`streamMaxDurationMs` watchdog + non-streaming fallback in `packages/llm/src/providers/registry.ts`), so this variable is purely an output-budget knob.
|
|
715
637
|
|
|
716
638
|
```bash
|
|
717
639
|
# Allow up to 48K output tokens per turn (use a higher cap when generating long files)
|
|
@@ -730,7 +652,9 @@ Precedence used by every provider's `getEffectiveMaxOutputTokens()` (see `packag
|
|
|
730
652
|
4. Provider config default
|
|
731
653
|
5. Global `KODAX_MAX_TOKENS` fallback
|
|
732
654
|
|
|
733
|
-
Related variables: `KODAX_MAX_TOKENS` (global fallback when no provider/model cap applies), `
|
|
655
|
+
Related variables: `KODAX_MAX_TOKENS` (global fallback when no provider/model cap applies), `KODAX_ESCALATED_MAX_OUTPUT_TOKENS` (escalation budget used by the agent loop when a turn returns `stop_reason: max_tokens`).
|
|
656
|
+
|
|
657
|
+
> **Retired in v0.7.42**: `KODAX_RST_PRONE_PROVIDERS` and `KODAX_WRITE_TURN_MAX_TOKENS` (the v0.7.28 P2b write-turn cap mechanism) are no longer recognized. The 2026-04 bench measured RST as time-based (zhipu-coding 308s server kill window), not payload-size-based, so the cap was retired in favor of the per-provider `streamMaxDurationMs` watchdog + non-streaming fallback chain (configured in `registry.ts`). Existing env exports become silent no-ops; remove them from shell profiles when convenient.
|
|
734
658
|
|
|
735
659
|
## Advanced Library Usage
|
|
736
660
|
|
|
@@ -816,21 +740,24 @@ await runKodaX({
|
|
|
816
740
|
|
|
817
741
|
## SDK Usage
|
|
818
742
|
|
|
819
|
-
KodaX ships as a single npm package `@kodax-ai/kodax` with
|
|
743
|
+
KodaX ships as a single npm package `@kodax-ai/kodax` with 6 SDK subpath exports (ADR-024 v0.7.39 + ADR-032 v0.7.42 added `/mcp`). Each subpath is tree-shake-friendly so consumers pull only what they need:
|
|
820
744
|
|
|
821
745
|
```bash
|
|
822
746
|
npm install @kodax-ai/kodax
|
|
823
747
|
```
|
|
824
748
|
|
|
825
749
|
```typescript
|
|
826
|
-
import { runKodaX } from '@kodax-ai/kodax';
|
|
827
|
-
import { Runner, runFanOut } from '@kodax-ai/kodax/agent';
|
|
828
|
-
import { getProvider } from '@kodax-ai/kodax/llm';
|
|
829
|
-
import { KODAX_TOOLS } from '@kodax-ai/kodax/coding';
|
|
830
|
-
import { InkREPL } from '@kodax-ai/kodax/repl';
|
|
831
|
-
import { SkillRegistry } from '@kodax-ai/kodax/skills';
|
|
750
|
+
import { runKodaX } from '@kodax-ai/kodax'; // root: CLI helpers + runKodaX
|
|
751
|
+
import { Runner, runFanOut } from '@kodax-ai/kodax/agent'; // generic Agent framework
|
|
752
|
+
import { getProvider } from '@kodax-ai/kodax/llm'; // 12-provider LLM abstraction
|
|
753
|
+
import { KODAX_TOOLS } from '@kodax-ai/kodax/coding'; // tools + prompts + agent loop
|
|
754
|
+
import { InkREPL } from '@kodax-ai/kodax/repl'; // Ink TUI components
|
|
755
|
+
import { SkillRegistry } from '@kodax-ai/kodax/skills'; // zero-dep skill loader
|
|
756
|
+
import { createMcpManager } from '@kodax-ai/kodax/mcp'; // MCP popout manager (v0.7.42)
|
|
832
757
|
```
|
|
833
758
|
|
|
759
|
+
> The SDK is **ESM-only**. CommonJS consumers (Electron main / Webpack CJS / `require()` callers) must use `await import('@kodax-ai/kodax/...')` — see [docs/SDK_EMBEDDER_GUIDE.md §5](docs/SDK_EMBEDDER_GUIDE.md#5-consuming-from-a-commonjs-context-electron-main-cjs-bundles).
|
|
760
|
+
|
|
834
761
|
### `@kodax-ai/kodax/llm` — LLM Abstraction
|
|
835
762
|
|
|
836
763
|
12 built-in providers (Anthropic, OpenAI, DeepSeek, Kimi, Kimi-Code, Qwen, Zhipu, Zhipu-Coding, MiniMax-Coding, MiMo-Coding, Ark-Coding, Gemini-CLI, Codex-CLI) + custom provider registration.
|
|
@@ -911,7 +838,7 @@ const result = await executeSkill({
|
|
|
911
838
|
|
|
912
839
|
### `@kodax-ai/kodax/coding` — Coding Agent
|
|
913
840
|
|
|
914
|
-
Complete coding agent: 30+ tools (`read`/`write`/`edit`/`bash`/`grep`/`glob`/`dispatch_child_task`/`send_message`/`task_stop`/...) + role
|
|
841
|
+
Complete coding agent: 30+ tools (`read`/`write`/`edit`/`bash`/`grep`/`glob`/`dispatch_child_task`/`send_message`/`task_stop`/...) + Worker role prompt + Sidecar Verifier (out-of-band Stop-hook) + agent loop + auto-continue + session management.
|
|
915
842
|
|
|
916
843
|
```typescript
|
|
917
844
|
import { runKodaX, KodaXClient, KODAX_TOOLS } from '@kodax-ai/kodax/coding';
|
|
@@ -933,7 +860,7 @@ await client.send('Create a new file');
|
|
|
933
860
|
await client.send('Add a function to it'); // Has context from previous message
|
|
934
861
|
```
|
|
935
862
|
|
|
936
|
-
**Key Features**: 30+ built-in tools (see [Tools](#tools)) · Worker+
|
|
863
|
+
**Key Features**: 30+ built-in tools (see [Tools](#tools)) · V2 Worker single-loop + Sidecar Verifier (FEATURE_184 v0.7.42 / V1 chain fully retired by FEATURE_193 v0.7.43) · async child steering via `send_message` / `task_stop` (FEATURE_120, v0.7.39) · idle-yield wait mechanic (FEATURE_155, v0.7.38) · specialist routing via `subagent_type` (FEATURE_191, v0.7.43) · auto-continue · session lineage.
|
|
937
864
|
|
|
938
865
|
### `@kodax-ai/kodax/repl` — Interactive Terminal UI
|
|
939
866
|
|
|
@@ -957,11 +884,13 @@ import { InkREPL } from '@kodax-ai/kodax/repl';
|
|
|
957
884
|
```
|
|
958
885
|
@kodax-ai/llm (zero business-logic deps)
|
|
959
886
|
↓
|
|
960
|
-
@kodax-ai/agent (depends @kodax-ai/llm; ADR-021 standalone-consumable
|
|
887
|
+
@kodax-ai/agent (depends @kodax-ai/llm; ADR-021 standalone-consumable;
|
|
888
|
+
inlines session-lineage + capabilities/{mcp,skills} +
|
|
889
|
+
tracing per ADR-036 v0.7.43)
|
|
890
|
+
↓
|
|
891
|
+
@kodax-ai/coding (depends llm + agent; inlines repo-intelligence/protocol per ADR-036)
|
|
961
892
|
↓
|
|
962
|
-
@kodax-ai/
|
|
963
|
-
↓
|
|
964
|
-
@kodax-ai/repl (depends coding + ink + react)
|
|
893
|
+
@kodax-ai/repl (depends coding + ink + react)
|
|
965
894
|
```
|
|
966
895
|
|
|
967
896
|
**Subpath Recommendations**:
|
|
@@ -969,8 +898,7 @@ import { InkREPL } from '@kodax-ai/kodax/repl';
|
|
|
969
898
|
| Use Case | Subpath | Why |
|
|
970
899
|
|----------|---------|-----|
|
|
971
900
|
| Only need LLM abstraction | `@kodax-ai/kodax/llm` | Minimal deps; 12 providers |
|
|
972
|
-
| Building custom agent | `@kodax-ai/kodax/agent` | Runner + fan-out + idle-yield +
|
|
973
|
-
| Using skills system | `@kodax-ai/kodax/skills` | Zero deps, pure skills |
|
|
901
|
+
| Building custom agent | `@kodax-ai/kodax/agent` | Runner + fan-out + idle-yield + session-lineage + capabilities |
|
|
974
902
|
| Coding tasks | `@kodax-ai/kodax/coding` | Complete coding agent + tools |
|
|
975
903
|
| Terminal app | `@kodax-ai/kodax/repl` | Full interactive experience |
|
|
976
904
|
|
|
@@ -1013,7 +941,7 @@ kodax --session list
|
|
|
1013
941
|
# Parallel tool execution
|
|
1014
942
|
kodax --parallel "Read package.json and tsconfig.json"
|
|
1015
943
|
|
|
1016
|
-
# Adaptive multi-agent (AMA) mode —
|
|
944
|
+
# Adaptive multi-agent (AMA) mode — V2 Worker single-loop with `dispatch_child_task` fan-out
|
|
1017
945
|
kodax --agent-mode ama "Analyze code structure, check test coverage, find bugs"
|
|
1018
946
|
```
|
|
1019
947
|
|
|
@@ -1076,7 +1004,7 @@ KodaX ships 30+ built-in tools, grouped below. They are registered as a single f
|
|
|
1076
1004
|
| `task_stop` | Request graceful exit of a specific child. Current tool finishes atomically, then the child sees a `<coordinator-stop-request>` and emits a final summary. Coordinator-only. (FEATURE_120, v0.7.39) |
|
|
1077
1005
|
| `ask_user_question` | Single/multi-select or free-text prompt back to the user |
|
|
1078
1006
|
| `exit_plan_mode` | Present a finalized plan for approval (REPL only) |
|
|
1079
|
-
| `emit_managed_protocol` | Internal managed-task protocol side-channel for role payloads (
|
|
1007
|
+
| `emit_managed_protocol` | Internal managed-task protocol side-channel for role payloads (verdict). V2 Worker single-loop + Sidecar Verifier is the default since v0.7.42 (FEATURE_184); V1 chain retired in v0.7.43 (FEATURE_193). |
|
|
1080
1008
|
|
|
1081
1009
|
---
|
|
1082
1010
|
|