@kodax-ai/kodax 0.7.40 → 0.7.42
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 +146 -1
- package/README.md +129 -232
- package/README_CN.md +128 -253
- package/dist/chunks/chunk-3RKBXWZS.js +2 -0
- package/dist/chunks/chunk-7JLYVWAF.js +1033 -0
- package/dist/chunks/chunk-CD3R5YBH.js +16 -0
- package/dist/chunks/chunk-DKXUY5F2.js +209 -0
- package/dist/chunks/chunk-HMYEQJGT.js +31 -0
- package/dist/chunks/{chunk-FAVPT4P7.js → chunk-IYJ5EPRV.js} +1 -1
- package/dist/chunks/chunk-KUX5LRPP.js +2 -0
- package/dist/chunks/{chunk-EQ5DGS2W.js → chunk-OWSKU55I.js} +5 -6
- package/dist/chunks/chunk-ZZ4KRK2B.js +465 -0
- package/dist/chunks/compaction-config-FIFFP4FT.js +2 -0
- package/dist/chunks/{construction-bootstrap-OFPUZTXQ.js → construction-bootstrap-J2WOCYEK.js} +1 -1
- package/dist/chunks/dist-2ZHWDXMQ.js +2 -0
- package/dist/chunks/dist-W4CJWLIH.js +2 -0
- package/dist/chunks/utils-A5MWDTWZ.js +2 -0
- package/dist/index.d.ts +237 -7
- package/dist/index.js +5 -5
- package/dist/kodax_cli.js +935 -917
- package/dist/sdk-agent.d.ts +1375 -10
- package/dist/sdk-agent.js +1 -1
- package/dist/sdk-coding.d.ts +4608 -14
- package/dist/sdk-coding.js +1 -1
- package/dist/sdk-llm.d.ts +210 -10
- 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 +3026 -13
- package/dist/sdk-repl.js +2 -1
- package/dist/sdk-session.d.ts +164 -0
- package/dist/sdk-session.js +2 -0
- package/dist/sdk-skills.d.ts +553 -9
- package/dist/sdk-skills.js +1 -1
- package/dist/types-chunks/bash-prefix-extractor.d-CkhaqKkg.d.ts +2571 -0
- 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-B6vMoLLF.d.ts +360 -0
- package/dist/types-chunks/history-cleanup.d-DznrzEiU.d.ts +1475 -0
- package/dist/types-chunks/instance-discovery.d-BsKnIwpg.d.ts +990 -0
- package/dist/types-chunks/resolver.d-DX9au4NJ.d.ts +263 -0
- package/dist/types-chunks/session-storage.d-Cci897iM.d.ts +68 -0
- package/dist/types-chunks/storage.d-Bc5DoAwp.d.ts +532 -0
- package/dist/types-chunks/transport.d-DuyjG30t.d.ts +180 -0
- package/dist/types-chunks/types.d-B1uGoVTE.d.ts +400 -0
- package/dist/types-chunks/types.d-C5mHR87z.d.ts +119 -0
- package/dist/types-chunks/types.d-mM8vqvhT.d.ts +254 -0
- package/package.json +16 -3
- package/dist/acp_events.d.ts +0 -109
- package/dist/acp_logger.d.ts +0 -20
- package/dist/acp_server.d.ts +0 -92
- package/dist/chunks/chunk-6QO6HWGU.js +0 -30
- package/dist/chunks/chunk-CLS57NPX.js +0 -460
- package/dist/chunks/chunk-NDNILSTR.js +0 -2
- package/dist/chunks/chunk-QZEDWITG.js +0 -1226
- package/dist/chunks/chunk-Z5EBDA6R.js +0 -15
- package/dist/chunks/compaction-config-A7XZ6H5Y.js +0 -2
- package/dist/chunks/dist-M57GIWR4.js +0 -2
- package/dist/chunks/dist-OTUF22DA.js +0 -2
- package/dist/chunks/utils-DFMYJUTE.js +0 -2
- package/dist/cli_commands.d.ts +0 -17
- package/dist/cli_option_helpers.d.ts +0 -49
- package/dist/cli_option_helpers.test.d.ts +0 -1
- package/dist/constructed_cli.d.ts +0 -82
- package/dist/constructed_cli.test.d.ts +0 -1
- package/dist/kodax_cli.d.ts +0 -7
- package/dist/self_modify_cli.d.ts +0 -81
- package/dist/self_modify_cli.test.d.ts +0 -9
- package/dist/skill_cli.d.ts +0 -15
- package/dist/skill_cli.test.d.ts +0 -1
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
|
-
| Why not only use Claude Code? | KodaX is easier to inspect, modify, self-host, and switch across providers. |
|
|
16
|
-
| Why not only use an SDK? | KodaX already gives you a CLI, sessions, tools, permissions, and skills out of the box. |
|
|
17
|
-
| Why use it as a codebase? | The architecture is small enough to understand and customize without wading through thousands of files. |
|
|
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.
|
|
19
53
|
|
|
20
|
-
**KodaX
|
|
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.
|
|
21
55
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
| **Provider choice** | 12 providers (incl. Anthropic, OpenAI, DeepSeek, Kimi, Qwen, Zhipu, MiniMax, MiMo, Gemini CLI, Codex CLI) + custom OpenAI/Anthropic-compatible providers | Often optimized for one provider |
|
|
26
|
-
| **Customization** | Edit prompts, tools, skills, session flow directly | Limited extension surface |
|
|
27
|
-
| **Codebase clarity** | Small TypeScript monorepo | Often much larger and harder to trace |
|
|
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 |
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Four ways to use KodaX
|
|
30
59
|
|
|
31
|
-
|
|
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 |
|
|
32
66
|
|
|
33
|
-
|
|
67
|
+
---
|
|
68
|
+
|
|
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 + Evaluator + 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,220 +253,18 @@ const result = await runKodaX(
|
|
|
156
253
|
);
|
|
157
254
|
```
|
|
158
255
|
|
|
159
|
-
##
|
|
160
|
-
|
|
161
|
-
- **CLI coding assistant**: run one-off tasks or stay in a session for multi-step work.
|
|
162
|
-
- **Skills-driven workflows**: trigger built-in or custom skills from natural language.
|
|
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
|
|
256
|
+
## Repo Intelligence (optional premium engine)
|
|
175
257
|
|
|
176
|
-
KodaX
|
|
258
|
+
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.
|
|
177
259
|
|
|
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`.
|
|
183
|
-
|
|
184
|
-
### Quick usage
|
|
185
|
-
|
|
186
|
-
Run KodaX with explicit repo-intelligence mode flags:
|
|
260
|
+
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
261
|
|
|
188
262
|
```bash
|
|
189
|
-
#
|
|
190
|
-
kodax --repo-intelligence oss
|
|
191
|
-
|
|
192
|
-
# Premium native mode with trace output
|
|
263
|
+
# Pick a runtime mode (off | oss | premium-shared | premium-native | auto)
|
|
193
264
|
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
265
|
```
|
|
278
266
|
|
|
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`
|
|
267
|
+
Setup, runtime modes, REPL controls, config schema, and external-host integrations: see [docs/REPOINTEL.md](docs/REPOINTEL.md).
|
|
373
268
|
|
|
374
269
|
## Architecture
|
|
375
270
|
|
|
@@ -711,7 +606,7 @@ KodaX recognizes a number of environment variables for tuning runtime behavior.
|
|
|
711
606
|
|
|
712
607
|
#### `KODAX_MAX_OUTPUT_TOKENS`
|
|
713
608
|
|
|
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.
|
|
609
|
+
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
610
|
|
|
716
611
|
```bash
|
|
717
612
|
# Allow up to 48K output tokens per turn (use a higher cap when generating long files)
|
|
@@ -730,7 +625,9 @@ Precedence used by every provider's `getEffectiveMaxOutputTokens()` (see `packag
|
|
|
730
625
|
4. Provider config default
|
|
731
626
|
5. Global `KODAX_MAX_TOKENS` fallback
|
|
732
627
|
|
|
733
|
-
Related variables: `KODAX_MAX_TOKENS` (global fallback when no provider/model cap applies), `
|
|
628
|
+
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`).
|
|
629
|
+
|
|
630
|
+
> **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
631
|
|
|
735
632
|
## Advanced Library Usage
|
|
736
633
|
|