@carboncode/cli 0.1.0

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 (159) hide show
  1. package/LICENSE +21 -0
  2. package/LICENSES/DeepSeek-Reasonix-MIT.txt +21 -0
  3. package/README.md +109 -0
  4. package/README.zh-CN.md +91 -0
  5. package/THIRD_PARTY_NOTICES.md +14 -0
  6. package/dashboard/app.css +3233 -0
  7. package/dashboard/dist/app.js +30444 -0
  8. package/dashboard/dist/app.js.map +1 -0
  9. package/dashboard/dist/vendor-hljs.css +10 -0
  10. package/dashboard/dist/vendor-uplot.css +1 -0
  11. package/dashboard/index.html +19 -0
  12. package/data/deepseek-tokenizer.json.gz +0 -0
  13. package/dist/cli/acp-35C4ME6Y.js +711 -0
  14. package/dist/cli/acp-35C4ME6Y.js.map +1 -0
  15. package/dist/cli/chat-A6UJDPGV.js +51 -0
  16. package/dist/cli/chat-A6UJDPGV.js.map +1 -0
  17. package/dist/cli/chunk-2425HK6U.js +54 -0
  18. package/dist/cli/chunk-2425HK6U.js.map +1 -0
  19. package/dist/cli/chunk-25T6CVUP.js +172 -0
  20. package/dist/cli/chunk-25T6CVUP.js.map +1 -0
  21. package/dist/cli/chunk-2UQP6H6T.js +31 -0
  22. package/dist/cli/chunk-2UQP6H6T.js.map +1 -0
  23. package/dist/cli/chunk-3OAR6NVL.js +96 -0
  24. package/dist/cli/chunk-3OAR6NVL.js.map +1 -0
  25. package/dist/cli/chunk-3T6VBZCL.js +54 -0
  26. package/dist/cli/chunk-3T6VBZCL.js.map +1 -0
  27. package/dist/cli/chunk-4IBIPQVB.js +153 -0
  28. package/dist/cli/chunk-4IBIPQVB.js.map +1 -0
  29. package/dist/cli/chunk-4MQ3VURH.js +3106 -0
  30. package/dist/cli/chunk-4MQ3VURH.js.map +1 -0
  31. package/dist/cli/chunk-4TVNJWMA.js +11619 -0
  32. package/dist/cli/chunk-4TVNJWMA.js.map +1 -0
  33. package/dist/cli/chunk-4VR6XF4P.js +341 -0
  34. package/dist/cli/chunk-4VR6XF4P.js.map +1 -0
  35. package/dist/cli/chunk-5QCB62C4.js +25319 -0
  36. package/dist/cli/chunk-5QCB62C4.js.map +1 -0
  37. package/dist/cli/chunk-6OWJV3YW.js +390 -0
  38. package/dist/cli/chunk-6OWJV3YW.js.map +1 -0
  39. package/dist/cli/chunk-7EO27TB3.js +130 -0
  40. package/dist/cli/chunk-7EO27TB3.js.map +1 -0
  41. package/dist/cli/chunk-7L2WTRNU.js +308 -0
  42. package/dist/cli/chunk-7L2WTRNU.js.map +1 -0
  43. package/dist/cli/chunk-BHTZFEYE.js +47 -0
  44. package/dist/cli/chunk-BHTZFEYE.js.map +1 -0
  45. package/dist/cli/chunk-BSGCXZQN.js +343 -0
  46. package/dist/cli/chunk-BSGCXZQN.js.map +1 -0
  47. package/dist/cli/chunk-BSINVTTL.js +464 -0
  48. package/dist/cli/chunk-BSINVTTL.js.map +1 -0
  49. package/dist/cli/chunk-CPKCNHRR.js +323 -0
  50. package/dist/cli/chunk-CPKCNHRR.js.map +1 -0
  51. package/dist/cli/chunk-CXVWUPA3.js +96 -0
  52. package/dist/cli/chunk-CXVWUPA3.js.map +1 -0
  53. package/dist/cli/chunk-D5NFKRGO.js +160 -0
  54. package/dist/cli/chunk-D5NFKRGO.js.map +1 -0
  55. package/dist/cli/chunk-ECHSFYOY.js +109 -0
  56. package/dist/cli/chunk-ECHSFYOY.js.map +1 -0
  57. package/dist/cli/chunk-FEZK652I.js +3644 -0
  58. package/dist/cli/chunk-FEZK652I.js.map +1 -0
  59. package/dist/cli/chunk-GALC45Q2.js +696 -0
  60. package/dist/cli/chunk-GALC45Q2.js.map +1 -0
  61. package/dist/cli/chunk-IAUOP25G.js +2984 -0
  62. package/dist/cli/chunk-IAUOP25G.js.map +1 -0
  63. package/dist/cli/chunk-ILJOIQ5W.js +163 -0
  64. package/dist/cli/chunk-ILJOIQ5W.js.map +1 -0
  65. package/dist/cli/chunk-IX6XI2RG.js +225 -0
  66. package/dist/cli/chunk-IX6XI2RG.js.map +1 -0
  67. package/dist/cli/chunk-J5BYPUB5.js +62795 -0
  68. package/dist/cli/chunk-J5BYPUB5.js.map +1 -0
  69. package/dist/cli/chunk-J5XJHLWM.js +55 -0
  70. package/dist/cli/chunk-J5XJHLWM.js.map +1 -0
  71. package/dist/cli/chunk-JKGYMRX5.js +101 -0
  72. package/dist/cli/chunk-JKGYMRX5.js.map +1 -0
  73. package/dist/cli/chunk-JMBMLOBP.js +26 -0
  74. package/dist/cli/chunk-JMBMLOBP.js.map +1 -0
  75. package/dist/cli/chunk-LN3B5PMX.js +128 -0
  76. package/dist/cli/chunk-LN3B5PMX.js.map +1 -0
  77. package/dist/cli/chunk-M2UFZUX3.js +635 -0
  78. package/dist/cli/chunk-M2UFZUX3.js.map +1 -0
  79. package/dist/cli/chunk-PJS34556.js +809 -0
  80. package/dist/cli/chunk-PJS34556.js.map +1 -0
  81. package/dist/cli/chunk-QJG7OF27.js +655 -0
  82. package/dist/cli/chunk-QJG7OF27.js.map +1 -0
  83. package/dist/cli/chunk-QVC75MR3.js +232 -0
  84. package/dist/cli/chunk-QVC75MR3.js.map +1 -0
  85. package/dist/cli/chunk-S2KIUQKQ.js +378 -0
  86. package/dist/cli/chunk-S2KIUQKQ.js.map +1 -0
  87. package/dist/cli/chunk-S4XVGLRW.js +499 -0
  88. package/dist/cli/chunk-S4XVGLRW.js.map +1 -0
  89. package/dist/cli/chunk-T5TQ4NDT.js +190 -0
  90. package/dist/cli/chunk-T5TQ4NDT.js.map +1 -0
  91. package/dist/cli/chunk-TH756VLN.js +1924 -0
  92. package/dist/cli/chunk-TH756VLN.js.map +1 -0
  93. package/dist/cli/chunk-TUK7OWJA.js +51 -0
  94. package/dist/cli/chunk-TUK7OWJA.js.map +1 -0
  95. package/dist/cli/chunk-U4IJVG32.js +363 -0
  96. package/dist/cli/chunk-U4IJVG32.js.map +1 -0
  97. package/dist/cli/chunk-UI66BH6D.js +624 -0
  98. package/dist/cli/chunk-UI66BH6D.js.map +1 -0
  99. package/dist/cli/chunk-VPMBGAND.js +53 -0
  100. package/dist/cli/chunk-VPMBGAND.js.map +1 -0
  101. package/dist/cli/chunk-WLHH3OSR.js +522 -0
  102. package/dist/cli/chunk-WLHH3OSR.js.map +1 -0
  103. package/dist/cli/chunk-WRN65TRD.js +908 -0
  104. package/dist/cli/chunk-WRN65TRD.js.map +1 -0
  105. package/dist/cli/chunk-X53B3JIX.js +34320 -0
  106. package/dist/cli/chunk-X53B3JIX.js.map +1 -0
  107. package/dist/cli/chunk-XJ5SRLKK.js +50 -0
  108. package/dist/cli/chunk-XJ5SRLKK.js.map +1 -0
  109. package/dist/cli/chunk-YZSXRGFH.js +54 -0
  110. package/dist/cli/chunk-YZSXRGFH.js.map +1 -0
  111. package/dist/cli/code-4TUTAGO5.js +163 -0
  112. package/dist/cli/code-4TUTAGO5.js.map +1 -0
  113. package/dist/cli/commands-KMOZEYCF.js +356 -0
  114. package/dist/cli/commands-KMOZEYCF.js.map +1 -0
  115. package/dist/cli/commit-DTFA56VQ.js +292 -0
  116. package/dist/cli/commit-DTFA56VQ.js.map +1 -0
  117. package/dist/cli/desktop-7N3MHNBD.js +1274 -0
  118. package/dist/cli/desktop-7N3MHNBD.js.map +1 -0
  119. package/dist/cli/devtools-HW3WDT3Q.js +91 -0
  120. package/dist/cli/devtools-HW3WDT3Q.js.map +1 -0
  121. package/dist/cli/diff-E5OWTF4C.js +165 -0
  122. package/dist/cli/diff-E5OWTF4C.js.map +1 -0
  123. package/dist/cli/doctor-IEJQRJMN.js +27 -0
  124. package/dist/cli/doctor-IEJQRJMN.js.map +1 -0
  125. package/dist/cli/events-4625EGXI.js +340 -0
  126. package/dist/cli/events-4625EGXI.js.map +1 -0
  127. package/dist/cli/index.js +3536 -0
  128. package/dist/cli/index.js.map +1 -0
  129. package/dist/cli/mcp-PDI2PDLG.js +277 -0
  130. package/dist/cli/mcp-PDI2PDLG.js.map +1 -0
  131. package/dist/cli/mcp-browse-OSPXOFPZ.js +178 -0
  132. package/dist/cli/mcp-browse-OSPXOFPZ.js.map +1 -0
  133. package/dist/cli/mcp-inspect-QRFVTHMF.js +148 -0
  134. package/dist/cli/mcp-inspect-QRFVTHMF.js.map +1 -0
  135. package/dist/cli/package.json +3 -0
  136. package/dist/cli/prompt-3CDII3UO.js +16 -0
  137. package/dist/cli/prompt-3CDII3UO.js.map +1 -0
  138. package/dist/cli/prune-sessions-KZX4SXKW.js +44 -0
  139. package/dist/cli/prune-sessions-KZX4SXKW.js.map +1 -0
  140. package/dist/cli/replay-HYOSRQIV.js +291 -0
  141. package/dist/cli/replay-HYOSRQIV.js.map +1 -0
  142. package/dist/cli/run-2ZHADOUP.js +220 -0
  143. package/dist/cli/run-2ZHADOUP.js.map +1 -0
  144. package/dist/cli/server-X75PAZG5.js +3572 -0
  145. package/dist/cli/server-X75PAZG5.js.map +1 -0
  146. package/dist/cli/sessions-POOZA5CQ.js +120 -0
  147. package/dist/cli/sessions-POOZA5CQ.js.map +1 -0
  148. package/dist/cli/setup-YLPFI3OH.js +618 -0
  149. package/dist/cli/setup-YLPFI3OH.js.map +1 -0
  150. package/dist/cli/stats-NXJ3TO2D.js +16 -0
  151. package/dist/cli/stats-NXJ3TO2D.js.map +1 -0
  152. package/dist/cli/update-ZUO5MKQ6.js +15 -0
  153. package/dist/cli/update-ZUO5MKQ6.js.map +1 -0
  154. package/dist/cli/version-NXXWE3WN.js +33 -0
  155. package/dist/cli/version-NXXWE3WN.js.map +1 -0
  156. package/dist/index.d.ts +2523 -0
  157. package/dist/index.js +15408 -0
  158. package/dist/index.js.map +1 -0
  159. package/package.json +112 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Reasonix Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Reasonix Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,109 @@
1
+ # Carbon Code
2
+
3
+ Chinese-first, DeepSeek-powered terminal coding agent derived from
4
+ DeepSeek-Reasonix.
5
+
6
+ Carbon Code is aimed at personal developer workflows: open a repository, let the
7
+ agent read and search the codebase, review planned edits, approve shell commands,
8
+ run validation, and keep a concise session trail.
9
+
10
+ ## Install
11
+
12
+ Requires Node.js 22 or newer.
13
+
14
+ ```bash
15
+ npm install -g @carboncode/cli
16
+ cd path/to/project
17
+ carboncode
18
+ ```
19
+
20
+ Short command:
21
+
22
+ ```bash
23
+ ccode
24
+ ```
25
+
26
+ One-off usage without a global install:
27
+
28
+ ```bash
29
+ npx @carboncode/cli
30
+ ```
31
+
32
+ ## Commands
33
+
34
+ | Command | Purpose |
35
+ | --- | --- |
36
+ | `carboncode` / `carboncode code [dir]` | Coding agent rooted at the current project. |
37
+ | `carboncode chat` | Chat without filesystem or shell tools. |
38
+ | `carboncode run "task"` | Non-interactive one-shot task. |
39
+ | `carboncode doctor` | Local health check. |
40
+ | `carboncode update` | Check and install the latest CLI package. |
41
+
42
+ Carbon Code also installs `ccode`. It intentionally does not install `cc`,
43
+ because that name commonly points to the system C compiler.
44
+
45
+ ## Configuration
46
+
47
+ Carbon Code stores user configuration in:
48
+
49
+ ```text
50
+ ~/.carboncode/config.json
51
+ ```
52
+
53
+ Set a DeepSeek API key with the first-run setup wizard, or export it directly:
54
+
55
+ ```bash
56
+ export DEEPSEEK_API_KEY=sk-...
57
+ ```
58
+
59
+ Project rules should live in `AGENTS.md` or `CARBON.md` in the repository.
60
+
61
+ Model presets use the current DeepSeek V4 API IDs: `flash` maps to
62
+ `deepseek-v4-flash`, `pro` maps to `deepseek-v4-pro`, and `auto` starts on Flash
63
+ with one-turn Pro escalation for harder turns.
64
+
65
+ ## Release
66
+
67
+ The first npm publish is a one-time bootstrap because npm trusted publishing can
68
+ only be configured after the package exists:
69
+
70
+ ```bash
71
+ npm whoami
72
+ npm publish --dry-run --access public
73
+ npm publish --access public
74
+ npm install -g npm@^11.10.0
75
+ npm trust github @carboncode/cli --repo Yapie0/carboncode --file publish.yml --env npm
76
+ ```
77
+
78
+ After trusted publishing is configured, releases are tag-driven through GitHub
79
+ Actions. Update `package.json`, commit the release, then push a matching semver
80
+ tag:
81
+
82
+ ```bash
83
+ git tag v0.1.0
84
+ git push origin main --tags
85
+ ```
86
+
87
+ The `Publish npm package` workflow verifies the package, checks that the tag
88
+ matches `package.json`, and runs `npm publish --access public --provenance`. If
89
+ the exact version already exists with the same `gitHead`, the workflow treats the
90
+ tag as an idempotent release marker and skips the publish step.
91
+
92
+ ## Current Scope
93
+
94
+ This repository currently imports the Reasonix main codebase and productizes it
95
+ as Carbon Code. The first productization pass covers package identity, command
96
+ names, Carbon config paths, update/install commands, Chinese-first CLI copy, npm
97
+ publishing, and license attribution.
98
+
99
+ ## License And Attribution
100
+
101
+ Carbon Code is MIT licensed. It is derived from DeepSeek-Reasonix, which is also
102
+ MIT licensed.
103
+
104
+ The upstream notice is preserved in:
105
+
106
+ - `THIRD_PARTY_NOTICES.md`
107
+ - `LICENSES/DeepSeek-Reasonix-MIT.txt`
108
+
109
+ Do not remove upstream copyright or MIT notices from derived files.
@@ -0,0 +1,91 @@
1
+ # Carbon Code
2
+
3
+ 中文优先、DeepSeek 驱动的终端代码智能体,基于 DeepSeek-Reasonix 主体进行
4
+ Carbon Code 产品化。
5
+
6
+ Carbon Code 面向个人开发者工作流:进入一个仓库,让智能体读取和搜索代码、规划
7
+ 修改、展示 diff、在执行 shell 命令前请求确认、按需运行验证,并输出简洁结果。
8
+
9
+ ## 安装
10
+
11
+ 要求 Node.js 22 或更新版本。
12
+
13
+ ```bash
14
+ npm install -g @carboncode/cli
15
+ cd path/to/project
16
+ carboncode
17
+ ```
18
+
19
+ 短命令:
20
+
21
+ ```bash
22
+ ccode
23
+ ```
24
+
25
+ 不全局安装也可以临时运行:
26
+
27
+ ```bash
28
+ npx @carboncode/cli
29
+ ```
30
+
31
+ ## 常用命令
32
+
33
+ | 命令 | 用途 |
34
+ | --- | --- |
35
+ | `carboncode` / `carboncode code [dir]` | 以当前项目为根目录的编码智能体。 |
36
+ | `carboncode chat` | 不带文件系统和 shell 工具的纯聊天。 |
37
+ | `carboncode run "task"` | 非交互式执行一次任务。 |
38
+ | `carboncode doctor` | 本地环境健康检查。 |
39
+ | `carboncode update` | 检查并安装最新 CLI 包。 |
40
+
41
+ Carbon Code 也安装 `ccode`。默认不会安装 `cc`,因为这个名字通常是系统 C 编译器。
42
+
43
+ ## 配置
44
+
45
+ 用户配置文件位置:
46
+
47
+ ```text
48
+ ~/.carboncode/config.json
49
+ ```
50
+
51
+ 可以通过首次运行向导配置 DeepSeek API Key,也可以直接导出环境变量:
52
+
53
+ ```bash
54
+ export DEEPSEEK_API_KEY=sk-...
55
+ ```
56
+
57
+ 项目规则建议写在仓库里的 `AGENTS.md` 或 `CARBON.md`。
58
+
59
+ 模型预设使用当前 DeepSeek V4 API ID:`flash` 对应 `deepseek-v4-flash`,
60
+ `pro` 对应 `deepseek-v4-pro`,`auto` 默认从 Flash 开始,并在困难回合一次性升级
61
+ 到 Pro。
62
+
63
+ ## 发布
64
+
65
+ npm 发布由 GitHub Actions 的 tag 流程触发。先更新 `package.json`,提交发布版本,
66
+ 再推送匹配的 semver tag:
67
+
68
+ ```bash
69
+ git tag v0.1.0
70
+ git push origin main --tags
71
+ ```
72
+
73
+ `Publish npm package` workflow 会先验证包、检查 tag 是否与 `package.json` 版本一致,
74
+ 然后执行 `npm publish --access public --provenance`。
75
+
76
+ ## 当前范围
77
+
78
+ 当前策略是“导入 Reasonix 主体,然后做 Carbon Code 产品化”。第一轮产品化覆盖
79
+ 包名、命令名、Carbon 配置目录、更新/安装命令、中文优先 CLI 文案、npm 发布流程
80
+ 和开源许可归因。
81
+
82
+ ## 许可与归因
83
+
84
+ Carbon Code 使用 MIT 许可证。项目基于 MIT 许可的 DeepSeek-Reasonix 派生。
85
+
86
+ 上游声明保留在:
87
+
88
+ - `THIRD_PARTY_NOTICES.md`
89
+ - `LICENSES/DeepSeek-Reasonix-MIT.txt`
90
+
91
+ 不要移除派生源码中的上游 copyright 或 MIT notice。
@@ -0,0 +1,14 @@
1
+ # Third Party Notices
2
+
3
+ Carbon Code imports the DeepSeek-Reasonix repository body and productizes it as
4
+ Carbon Code. The CLI/TUI, agent loop, tooling, session, memory, MCP, transcript,
5
+ dashboard, repair, and validation subsystems are derived from DeepSeek-Reasonix.
6
+
7
+ ## DeepSeek-Reasonix
8
+
9
+ - Upstream: https://github.com/esengine/DeepSeek-Reasonix
10
+ - License: MIT
11
+ - Notice file: `LICENSES/DeepSeek-Reasonix-MIT.txt`
12
+
13
+ The upstream MIT license text is preserved in this repository and is included in
14
+ the npm package through the `files` list in `package.json`.