@kodax-ai/kodax-cli 0.7.38
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 +1304 -0
- package/LICENSE +191 -0
- package/README.md +1167 -0
- package/README_CN.md +631 -0
- package/dist/builtin/code-review/SKILL.md +63 -0
- package/dist/builtin/git-workflow/SKILL.md +84 -0
- package/dist/builtin/skill-creator/SKILL.md +122 -0
- package/dist/builtin/skill-creator/agents/analyzer.md +12 -0
- package/dist/builtin/skill-creator/agents/comparator.md +13 -0
- package/dist/builtin/skill-creator/agents/grader.md +13 -0
- package/dist/builtin/skill-creator/references/schemas.md +227 -0
- package/dist/builtin/skill-creator/scripts/aggregate-benchmark.d.ts +46 -0
- package/dist/builtin/skill-creator/scripts/aggregate-benchmark.js +209 -0
- package/dist/builtin/skill-creator/scripts/analyze-benchmark.d.ts +46 -0
- package/dist/builtin/skill-creator/scripts/analyze-benchmark.js +289 -0
- package/dist/builtin/skill-creator/scripts/compare-runs.d.ts +62 -0
- package/dist/builtin/skill-creator/scripts/compare-runs.js +333 -0
- package/dist/builtin/skill-creator/scripts/generate-review.d.ts +33 -0
- package/dist/builtin/skill-creator/scripts/generate-review.js +415 -0
- package/dist/builtin/skill-creator/scripts/grade-evals.d.ts +73 -0
- package/dist/builtin/skill-creator/scripts/grade-evals.js +405 -0
- package/dist/builtin/skill-creator/scripts/improve-description.d.ts +23 -0
- package/dist/builtin/skill-creator/scripts/improve-description.js +161 -0
- package/dist/builtin/skill-creator/scripts/init-skill.d.ts +14 -0
- package/dist/builtin/skill-creator/scripts/init-skill.js +153 -0
- package/dist/builtin/skill-creator/scripts/install-skill.d.ts +29 -0
- package/dist/builtin/skill-creator/scripts/install-skill.js +176 -0
- package/dist/builtin/skill-creator/scripts/package-skill.d.ts +38 -0
- package/dist/builtin/skill-creator/scripts/package-skill.js +124 -0
- package/dist/builtin/skill-creator/scripts/quick-validate.d.ts +8 -0
- package/dist/builtin/skill-creator/scripts/quick-validate.js +166 -0
- package/dist/builtin/skill-creator/scripts/run-eval.d.ts +66 -0
- package/dist/builtin/skill-creator/scripts/run-eval.js +356 -0
- package/dist/builtin/skill-creator/scripts/run-loop.d.ts +49 -0
- package/dist/builtin/skill-creator/scripts/run-loop.js +243 -0
- package/dist/builtin/skill-creator/scripts/run-trigger-eval.d.ts +58 -0
- package/dist/builtin/skill-creator/scripts/run-trigger-eval.js +225 -0
- package/dist/builtin/skill-creator/scripts/utils.js +278 -0
- package/dist/builtin/tdd/SKILL.md +56 -0
- package/dist/index.js +1717 -0
- package/dist/kodax_cli.js +1870 -0
- package/package.json +122 -0
- package/scripts/kodax-bin.cjs +27 -0
- package/scripts/production-env.cjs +16 -0
package/package.json
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@kodax-ai/kodax-cli",
|
|
3
|
+
"version": "0.7.38",
|
|
4
|
+
"description": "极致轻量化 Coding Agent - TypeScript 实现,支持 12 个 LLM 提供商,可发布为免 Node 单文件二进制",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"workspaces": [
|
|
7
|
+
"packages/*"
|
|
8
|
+
],
|
|
9
|
+
"main": "dist/index.js",
|
|
10
|
+
"types": "dist/index.d.ts",
|
|
11
|
+
"bin": {
|
|
12
|
+
"kodax": "scripts/kodax-bin.cjs"
|
|
13
|
+
},
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"import": "./dist/index.js"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "npm run build:packages && tsc",
|
|
22
|
+
"build:packages": "tsc -b tsconfig.build.json && npm run copy:builtin -w @kodax-ai/skills",
|
|
23
|
+
"build:bundle": "node scripts/build-bundle.mjs",
|
|
24
|
+
"dev": "node --max-old-space-size=4096 --require ./scripts/production-env.cjs --import tsx src/kodax_cli.ts",
|
|
25
|
+
"dev:cli": "node --max-old-space-size=4096 --require ./scripts/production-env.cjs --import tsx src/kodax_cli.ts",
|
|
26
|
+
"dev:mem-diag": "node scripts/mem-diag-launch.cjs",
|
|
27
|
+
"dev:mem-snapshot": "node scripts/mem-diag-launch.cjs 2",
|
|
28
|
+
"probe:reasoning": "tsx scripts/probe-reasoning.ts",
|
|
29
|
+
"repointel:install": "node clients/repointel/scripts/install.mjs",
|
|
30
|
+
"repointel:demo": "node clients/repointel/scripts/demo.mjs",
|
|
31
|
+
"repointel:doctor": "node clients/repointel/scripts/doctor.mjs",
|
|
32
|
+
"start": "node --max-old-space-size=4096 --require ./scripts/production-env.cjs dist/kodax_cli.js",
|
|
33
|
+
"build:binary": "node scripts/build-binary.mjs",
|
|
34
|
+
"build:binary:all": "node scripts/build-binary.mjs --all",
|
|
35
|
+
"test": "vitest run",
|
|
36
|
+
"test:watch": "vitest",
|
|
37
|
+
"test:eval": "vitest run -c vitest.eval.config.ts",
|
|
38
|
+
"clean": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\"",
|
|
39
|
+
"clean:packages": "npm run clean --workspaces"
|
|
40
|
+
},
|
|
41
|
+
"keywords": [
|
|
42
|
+
"ai",
|
|
43
|
+
"coding-agent",
|
|
44
|
+
"llm",
|
|
45
|
+
"anthropic",
|
|
46
|
+
"openai",
|
|
47
|
+
"cli"
|
|
48
|
+
],
|
|
49
|
+
"author": "",
|
|
50
|
+
"license": "Apache-2.0",
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"@agentclientprotocol/sdk": "^0.15.0",
|
|
53
|
+
"@alcalzone/ansi-tokenize": "^0.2.5",
|
|
54
|
+
"@anthropic-ai/sdk": "^0.80.0",
|
|
55
|
+
"ansi-escapes": "^7.3.0",
|
|
56
|
+
"auto-bind": "^5.0.1",
|
|
57
|
+
"chalk": "^5.4.1",
|
|
58
|
+
"cli-boxes": "^3.0.0",
|
|
59
|
+
"cli-cursor": "^4.0.0",
|
|
60
|
+
"cli-truncate": "^5.2.0",
|
|
61
|
+
"clipboardy": "^4.0.0",
|
|
62
|
+
"code-excerpt": "^4.0.0",
|
|
63
|
+
"commander": "^13.1.0",
|
|
64
|
+
"es-toolkit": "^1.46.1",
|
|
65
|
+
"fflate": "^0.8.2",
|
|
66
|
+
"glob": "^11.0.1",
|
|
67
|
+
"iconv-lite": "^0.6.3",
|
|
68
|
+
"indent-string": "^5.0.0",
|
|
69
|
+
"ink": "^6.7.0",
|
|
70
|
+
"ink-spinner": "^5.0.0",
|
|
71
|
+
"ink-text-input": "^6.0.0",
|
|
72
|
+
"is-in-ci": "^2.0.0",
|
|
73
|
+
"js-tiktoken": "^1.0.12",
|
|
74
|
+
"openai": "^6.32.0",
|
|
75
|
+
"partial-json": "^0.1.7",
|
|
76
|
+
"patch-console": "^2.0.0",
|
|
77
|
+
"react": ">=19.0.0",
|
|
78
|
+
"react-devtools-core": "^7.0.1",
|
|
79
|
+
"react-reconciler": "^0.33.0",
|
|
80
|
+
"scheduler": "^0.27.0",
|
|
81
|
+
"signal-exit": "^4.1.0",
|
|
82
|
+
"slice-ansi": "^8.0.0",
|
|
83
|
+
"stack-utils": "^2.0.6",
|
|
84
|
+
"string-width": "^7.0.0",
|
|
85
|
+
"terminal-size": "^4.0.1",
|
|
86
|
+
"tsx": "^4.21.0",
|
|
87
|
+
"typescript": "^5.9.3",
|
|
88
|
+
"widest-line": "^6.0.0",
|
|
89
|
+
"wrap-ansi": "^8.1.0",
|
|
90
|
+
"ws": "^8.18.0",
|
|
91
|
+
"yaml": "^2.8.2",
|
|
92
|
+
"yoga-layout": "^3.2.1",
|
|
93
|
+
"zod": "^3.25.0"
|
|
94
|
+
},
|
|
95
|
+
"devDependencies": {
|
|
96
|
+
"@types/node": "^22.13.4",
|
|
97
|
+
"@types/react": "^19.0.0",
|
|
98
|
+
"@vitest/coverage-v8": "^3.2.4",
|
|
99
|
+
"esbuild": "^0.27.7",
|
|
100
|
+
"ink-testing-library": "^4.0.0",
|
|
101
|
+
"vitest": "^3.2.4"
|
|
102
|
+
},
|
|
103
|
+
"engines": {
|
|
104
|
+
"node": ">=18.0.0"
|
|
105
|
+
},
|
|
106
|
+
"repository": {
|
|
107
|
+
"type": "git",
|
|
108
|
+
"url": "https://github.com/icetomoyo/KodaX.git"
|
|
109
|
+
},
|
|
110
|
+
"files": [
|
|
111
|
+
"dist",
|
|
112
|
+
"scripts/kodax-bin.cjs",
|
|
113
|
+
"scripts/production-env.cjs",
|
|
114
|
+
"README.md",
|
|
115
|
+
"README_CN.md",
|
|
116
|
+
"LICENSE",
|
|
117
|
+
"CHANGELOG.md"
|
|
118
|
+
],
|
|
119
|
+
"publishConfig": {
|
|
120
|
+
"access": "public"
|
|
121
|
+
}
|
|
122
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* KodaX bin entry — CJS shim.
|
|
4
|
+
*
|
|
5
|
+
* Purpose: set NODE_ENV=production BEFORE any ESM module is evaluated.
|
|
6
|
+
* Background: when users invoke `kodax` via `npm link` / global install,
|
|
7
|
+
* node runs this bin directly without the --require preload used by
|
|
8
|
+
* `npm run dev` / `npm run start`. ESM static imports are hoisted and
|
|
9
|
+
* evaluated before module-body code runs, so setting NODE_ENV inside
|
|
10
|
+
* `src/kodax_cli.ts` is too late — React would already have loaded its
|
|
11
|
+
* development reconciler, leaking ~100 MB/turn of profiling objects.
|
|
12
|
+
*
|
|
13
|
+
* This CJS file runs synchronously first, requires the env preload,
|
|
14
|
+
* then dynamic-imports the compiled ESM entry.
|
|
15
|
+
*
|
|
16
|
+
* Opt back into development by setting KODAX_DEV=1.
|
|
17
|
+
*/
|
|
18
|
+
'use strict';
|
|
19
|
+
|
|
20
|
+
require('./production-env.cjs');
|
|
21
|
+
|
|
22
|
+
import('../dist/kodax_cli.js').catch((err) => {
|
|
23
|
+
// Surface unexpected errors with a full stack — this path should be rare.
|
|
24
|
+
// eslint-disable-next-line no-console
|
|
25
|
+
console.error(err);
|
|
26
|
+
process.exit(1);
|
|
27
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Preload script — must execute before any ESM module evaluation.
|
|
3
|
+
* Loaded via: node --require ./scripts/production-env.cjs ...
|
|
4
|
+
*
|
|
5
|
+
* React ships two runtimes: development (with PerformanceMeasure tracking,
|
|
6
|
+
* prop diff strings, component profiling) and production (zero overhead).
|
|
7
|
+
* Development mode creates ~100 MB/turn of profiling objects that are never
|
|
8
|
+
* released, causing inevitable OOM after 10-20 conversation rounds.
|
|
9
|
+
*
|
|
10
|
+
* Default to production. Set KODAX_DEV=1 to opt-in to development mode.
|
|
11
|
+
*/
|
|
12
|
+
'use strict';
|
|
13
|
+
|
|
14
|
+
if (!process.env.NODE_ENV) {
|
|
15
|
+
process.env.NODE_ENV = process.env.KODAX_DEV === '1' ? 'development' : 'production';
|
|
16
|
+
}
|