@cjhyy/code-shell 0.1.0-alpha.3 → 0.1.6

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 (157) hide show
  1. package/CHANGELOG.md +107 -0
  2. package/dist/anthropic-IBTI4WL2.cjs +10 -0
  3. package/dist/anthropic-PRZZKHEZ.js +10 -0
  4. package/dist/arena/index.cjs +7 -6
  5. package/dist/arena/index.js +6 -5
  6. package/dist/arena/model-presets.d.ts +10 -1
  7. package/dist/{arena-ENHBHB2W.js → arena-2LTLIXOL.js} +9 -7
  8. package/dist/{arena-HHDYYVHJ.cjs → arena-ADB7DRFI.cjs} +25 -23
  9. package/dist/{chunk-EL2RL5DG.cjs → chunk-2YW4FPFG.cjs} +2 -2
  10. package/dist/chunk-3OA5G4TM.js +47 -0
  11. package/dist/{chunk-FPFTIKEJ.js → chunk-3QO25N6E.js} +131 -173
  12. package/dist/chunk-3SBSUOWZ.js +447 -0
  13. package/dist/chunk-52LGZKT3.cjs +47 -0
  14. package/dist/{chunk-KOGV6PDQ.cjs → chunk-55XGPMAP.cjs} +44 -9
  15. package/dist/{chunk-YD7XTI7T.cjs → chunk-6QVAYW7C.cjs} +116 -28
  16. package/dist/{chunk-SCDKLTN3.js → chunk-6S4BJ65N.js} +5 -4
  17. package/dist/{chunk-ZLPJJZUW.js → chunk-76HYEPDM.js} +2 -2
  18. package/dist/chunk-7BI3V74Y.cjs +447 -0
  19. package/dist/{chunk-GZBD6QRS.cjs → chunk-7EG3V4JY.cjs} +13 -12
  20. package/dist/{chunk-LMEKCQX4.js → chunk-7JVTYEEC.js} +6 -6
  21. package/dist/{chunk-SW3L7HIM.js → chunk-7QIM3BKD.js} +2 -2
  22. package/dist/{chunk-5C5HIOML.js → chunk-7Y6S3OCX.js} +109 -21
  23. package/dist/{chunk-REFCCVDM.js → chunk-ABRRONJ7.js} +2 -2
  24. package/dist/{chunk-F5BS3GUC.js → chunk-BSW22MPA.js} +39 -4
  25. package/dist/{chunk-ZRVPCXI7.js → chunk-BXCY2FSE.js} +2 -1
  26. package/dist/{chunk-Y7TSCDF6.js → chunk-BZ5TNE7L.js} +347 -6
  27. package/dist/{chunk-X2DNIMPC.cjs → chunk-DDB6QOKJ.cjs} +32 -32
  28. package/dist/{chunk-C7C7ZZY4.cjs → chunk-HEKQCI7B.cjs} +10 -10
  29. package/dist/{chunk-JHNCK7JP.cjs → chunk-IK4EWJBP.cjs} +4 -3
  30. package/dist/{chunk-3CAZIWUA.cjs → chunk-ILHE7XLT.cjs} +9 -9
  31. package/dist/{chunk-M2QI5X3X.cjs → chunk-JMR33QVF.cjs} +2 -2
  32. package/dist/{chunk-TDXBHD24.js → chunk-KAQHULYN.js} +2 -2
  33. package/dist/chunk-KE4EQOWA.js +294 -0
  34. package/dist/{chunk-YAFCN7ZW.cjs → chunk-KOVYSDHZ.cjs} +15 -15
  35. package/dist/{chunk-IJSHQGMP.cjs → chunk-KS3RYAYL.cjs} +4 -4
  36. package/dist/{chunk-DI7RDLOS.js → chunk-MD32R22I.js} +7 -4
  37. package/dist/chunk-MV7YI4WO.cjs +293 -0
  38. package/dist/chunk-MY5XHADU.cjs +216 -0
  39. package/dist/{chunk-OP57WUWQ.cjs → chunk-NUNC3VFB.cjs} +6 -6
  40. package/dist/{chunk-ID6EJUHP.js → chunk-PKGRTCCY.js} +1307 -212
  41. package/dist/{chunk-OUC2DFA7.js → chunk-QARL3IDQ.js} +3 -3
  42. package/dist/{chunk-VIPLU4RY.cjs → chunk-S754JHLR.cjs} +4 -4
  43. package/dist/{chunk-FUOKLKR2.js → chunk-SFXHZSRF.js} +1 -1
  44. package/dist/{chunk-2EUAE7AY.js → chunk-SIHHIQLO.js} +2 -2
  45. package/dist/{chunk-SK62UVS6.js → chunk-T6VYG46N.js} +1 -1
  46. package/dist/{chunk-JHXNOB5G.cjs → chunk-TNLGBJYS.cjs} +6 -6
  47. package/dist/{chunk-3QR52LL5.cjs → chunk-TUY2T5KP.cjs} +2 -2
  48. package/dist/{chunk-VWFET3MG.cjs → chunk-UXOCVJJ6.cjs} +1519 -424
  49. package/dist/{chunk-I57ZD5IQ.js → chunk-VIAGTYYW.js} +1 -1
  50. package/dist/chunk-WASS5YWB.js +215 -0
  51. package/dist/{chunk-HOXQLX5R.cjs → chunk-WZJV6DJC.cjs} +444 -103
  52. package/dist/{chunk-BUJ5KYCI.cjs → chunk-YIQBXAYU.cjs} +13 -13
  53. package/dist/{chunk-BF4LXLQV.cjs → chunk-YKIAELDZ.cjs} +132 -174
  54. package/dist/{chunk-M2SVOKC6.js → chunk-ZBPSQCPU.js} +6 -6
  55. package/dist/cli/commands/builtin/export-md.d.ts +19 -0
  56. package/dist/cli/commands/builtin/init/detect.d.ts +25 -0
  57. package/dist/cli/commands/builtin/init/index.d.ts +19 -0
  58. package/dist/cli/main.cjs +2372 -1453
  59. package/dist/cli/main.js +2502 -1583
  60. package/dist/cli/migrate-models.d.ts +45 -0
  61. package/dist/cli/onboarding.d.ts +110 -5
  62. package/dist/cli/updater.d.ts +59 -4
  63. package/dist/client-base-HTF236ZD.cjs +9 -0
  64. package/dist/client-base-QKRKCOWB.js +9 -0
  65. package/dist/{compaction-YNWCEF7B.js → compaction-6VU2T643.js} +4 -2
  66. package/dist/compaction-OKUNTCA7.cjs +33 -0
  67. package/dist/context/compaction.d.ts +35 -3
  68. package/dist/context/manager.d.ts +40 -3
  69. package/dist/context/tool-result-storage.d.ts +96 -0
  70. package/dist/devtools-T2NIZBJK.cjs +6 -0
  71. package/dist/{devtools-IRQQPIRY.js → devtools-YXWHOVKR.js} +1 -1
  72. package/dist/engine/engine.d.ts +47 -0
  73. package/dist/engine/turn-loop.d.ts +6 -0
  74. package/dist/export-md-RXDW6F5W.cjs +135 -0
  75. package/dist/export-md-XXKZANW5.js +135 -0
  76. package/dist/file-history-KYPE3ECT.cjs +7 -0
  77. package/dist/file-history-LF4F7X26.js +7 -0
  78. package/dist/index.cjs +42 -22
  79. package/dist/index.d.ts +5 -2
  80. package/dist/index.js +38 -18
  81. package/dist/llm/client-base.d.ts +1 -1
  82. package/dist/llm/model-cache.d.ts +21 -0
  83. package/dist/llm/model-fetcher.d.ts +29 -0
  84. package/dist/llm/model-pool.d.ts +13 -0
  85. package/dist/llm/provider-catalog.d.ts +30 -0
  86. package/dist/llm/provider-kinds.d.ts +21 -0
  87. package/dist/llm/types.d.ts +8 -0
  88. package/dist/logging/session-recorder.d.ts +77 -0
  89. package/dist/manager-D65VFAPX.js +7 -0
  90. package/dist/manager-TTF5VHJC.cjs +7 -0
  91. package/dist/mcp-manager-QMKWPBZ4.js +8 -0
  92. package/dist/mcp-manager-Z3OKI74O.cjs +8 -0
  93. package/dist/memory-5LWZ6FI2.cjs +9 -0
  94. package/dist/{memory-EPFDBPII.js → memory-VIJLBAMQ.js} +2 -2
  95. package/dist/model-cache-5KIYL5SL.js +13 -0
  96. package/dist/model-cache-OED3IM4R.cjs +13 -0
  97. package/dist/model-fetcher-HKGICACL.js +8 -0
  98. package/dist/model-fetcher-UR6WJOQP.cjs +8 -0
  99. package/dist/openai-JR2WEKOF.js +10 -0
  100. package/dist/openai-YBTOET4O.cjs +10 -0
  101. package/dist/{openrouter-models-2FM3H4SQ.js → openrouter-models-H56GHBHN.js} +2 -2
  102. package/dist/openrouter-models-TWUFWZ5T.cjs +15 -0
  103. package/dist/openrouter-sync-5VMGN6C2.cjs +11 -0
  104. package/dist/{openrouter-sync-SO3AWEAM.js → openrouter-sync-ALEMF5IU.js} +3 -3
  105. package/dist/product/index.cjs +17 -15
  106. package/dist/product/index.js +16 -14
  107. package/dist/protocol/server.d.ts +3 -1
  108. package/dist/protocol/types.d.ts +36 -2
  109. package/dist/run/index.cjs +17 -15
  110. package/dist/run/index.js +16 -14
  111. package/dist/services/index.d.ts +0 -1
  112. package/dist/session-manager-Q22BBMD3.js +8 -0
  113. package/dist/session-manager-XODQVL3C.cjs +8 -0
  114. package/dist/settings/schema.d.ts +267 -42
  115. package/dist/{tool-summary-RYNR4DDB.cjs → tool-summary-63DPIS7G.cjs} +4 -4
  116. package/dist/{tool-summary-2RUFL5QK.js → tool-summary-NP5CDBKG.js} +2 -2
  117. package/dist/tool-system/builtin/ask-user.d.ts +9 -1
  118. package/dist/tool-system/context.d.ts +31 -2
  119. package/dist/tool-system/executor.d.ts +4 -0
  120. package/dist/tool-system/investigation-guard.d.ts +46 -0
  121. package/dist/types.d.ts +13 -2
  122. package/dist/ui/components/AskUserPrompt.d.ts +8 -1
  123. package/dist/ui/components/DiffLine.d.ts +33 -0
  124. package/dist/ui/components/ModelManager.d.ts +34 -1
  125. package/dist/ui/components/OnboardingPrompt.d.ts +10 -1
  126. package/dist/ui/components/ProviderModelFlow.d.ts +58 -0
  127. package/dist/ui/components/UpdateBanner.d.ts +1 -0
  128. package/dist/updater-I7QBW4DP.cjs +17 -0
  129. package/dist/updater-NVME5S3Z.js +17 -0
  130. package/dist/utils/semver.d.ts +1 -0
  131. package/dist/utils/task-sanitizer.d.ts +6 -0
  132. package/package.json +2 -1
  133. package/skills-builtin/codeshell-help.md +135 -0
  134. package/dist/anthropic-P5VETAFI.cjs +0 -10
  135. package/dist/anthropic-W2GU3D76.js +0 -10
  136. package/dist/chunk-75E4BBFC.js +0 -224
  137. package/dist/chunk-FV2ARONZ.cjs +0 -224
  138. package/dist/client-base-TOVE25FA.js +0 -9
  139. package/dist/client-base-VDDIADAC.cjs +0 -9
  140. package/dist/compaction-D3KV2NWY.cjs +0 -31
  141. package/dist/devtools-WTC3NFNE.cjs +0 -6
  142. package/dist/file-history-HZWO2WQ5.js +0 -7
  143. package/dist/file-history-UQQILIY7.cjs +0 -7
  144. package/dist/manager-FWLOVEEK.cjs +0 -7
  145. package/dist/manager-GEXJLOIS.js +0 -7
  146. package/dist/mcp-manager-37GQLFGX.js +0 -8
  147. package/dist/mcp-manager-U77NEXBY.cjs +0 -8
  148. package/dist/memory-ADGOWADP.cjs +0 -9
  149. package/dist/openai-RXU5URYI.js +0 -10
  150. package/dist/openai-SQW4H2K4.cjs +0 -10
  151. package/dist/openrouter-models-PLCWZZYE.cjs +0 -15
  152. package/dist/openrouter-sync-K2WK3A2A.cjs +0 -11
  153. package/dist/services/compact.d.ts +0 -56
  154. package/dist/session-manager-HRSKENKB.cjs +0 -8
  155. package/dist/session-manager-NEKFEHF3.js +0 -8
  156. package/dist/updater-J7L7R6BY.cjs +0 -185
  157. package/dist/updater-LDBNYCAO.js +0 -185
@@ -1,8 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
- var _chunkOP57WUWQcjs = require('./chunk-OP57WUWQ.cjs');
4
- require('./chunk-EL2RL5DG.cjs');
5
- require('./chunk-IJSHQGMP.cjs');
6
-
7
-
8
- exports.SessionManager = _chunkOP57WUWQcjs.SessionManager;
@@ -1,8 +0,0 @@
1
- import {
2
- SessionManager
3
- } from "./chunk-ZLPJJZUW.js";
4
- import "./chunk-FUOKLKR2.js";
5
- import "./chunk-DI7RDLOS.js";
6
- export {
7
- SessionManager
8
- };
@@ -1,185 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
-
3
-
4
- var _chunkIJSHQGMPcjs = require('./chunk-IJSHQGMP.cjs');
5
-
6
- // package.json
7
- var require_package = _chunkIJSHQGMPcjs.__commonJS.call(void 0, {
8
- "package.json"(exports, module) {
9
- module.exports = {
10
- name: "@cjhyy/code-shell",
11
- version: "0.1.0-alpha.3",
12
- description: "Code Shell \u2014 general-purpose agent orchestration framework with a terminal coding preset",
13
- type: "module",
14
- main: "./dist/index.cjs",
15
- module: "./dist/index.js",
16
- types: "./dist/index.d.ts",
17
- exports: {
18
- ".": {
19
- types: "./dist/index.d.ts",
20
- import: "./dist/index.js",
21
- require: "./dist/index.cjs"
22
- },
23
- "./run": {
24
- types: "./dist/run/index.d.ts",
25
- import: "./dist/run/index.js",
26
- require: "./dist/run/index.cjs"
27
- },
28
- "./arena": {
29
- types: "./dist/arena/index.d.ts",
30
- import: "./dist/arena/index.js",
31
- require: "./dist/arena/index.cjs"
32
- },
33
- "./product": {
34
- types: "./dist/product/index.d.ts",
35
- import: "./dist/product/index.js",
36
- require: "./dist/product/index.cjs"
37
- },
38
- "./package.json": "./package.json"
39
- },
40
- bin: {
41
- "code-shell": "dist/cli/main.js"
42
- },
43
- repository: {
44
- type: "git",
45
- url: "git+https://github.com/cjhyy/codeshell.git"
46
- },
47
- homepage: "https://github.com/cjhyy/codeshell#readme",
48
- bugs: {
49
- url: "https://github.com/cjhyy/codeshell/issues"
50
- },
51
- publishConfig: {
52
- access: "public"
53
- },
54
- scripts: {
55
- preinstall: "node scripts/check-node.cjs",
56
- build: "bun run sync-models && bun run tsup && bun run build:dts",
57
- "build:dts": "tsc --emitDeclarationOnly --declaration --outDir dist || true",
58
- "sync-models": "bun run scripts/sync-models.ts",
59
- dev: "CODE_SHELL_DEV=1 bun run src/cli/main.ts",
60
- test: "bun test",
61
- "test:watch": "bun test --watch",
62
- lint: "eslint src/",
63
- format: "prettier --write 'src/**/*.ts'",
64
- typecheck: "bun run tsc --noEmit",
65
- prepublishOnly: "bun run build"
66
- },
67
- engines: {
68
- node: ">=20.10"
69
- },
70
- files: [
71
- "dist",
72
- "scripts/check-node.cjs",
73
- "README.md",
74
- "LICENSE",
75
- "CHANGELOG.md"
76
- ],
77
- keywords: [
78
- "ai",
79
- "agent",
80
- "orchestration",
81
- "coding-assistant",
82
- "cli",
83
- "claude-code",
84
- "mcp",
85
- "llm"
86
- ],
87
- author: "maki maki",
88
- license: "MIT",
89
- dependencies: {
90
- "@alcalzone/ansi-tokenize": "^0.3.0",
91
- "@anthropic-ai/sdk": "^0.39.0",
92
- "@modelcontextprotocol/sdk": "^1.12.1",
93
- asciichart: "^1.5.25",
94
- "auto-bind": "^5.0.1",
95
- "bidi-js": "^1.0.3",
96
- chalk: "^5.4.1",
97
- "cli-boxes": "^4.0.1",
98
- "cli-highlight": "^2.1.11",
99
- "code-excerpt": "^4.0.0",
100
- commander: "^13.1.0",
101
- diff: "^8.0.4",
102
- "emoji-regex": "^10.6.0",
103
- "get-east-asian-width": "^1.5.0",
104
- glob: "^11.0.0",
105
- "indent-string": "^5.0.0",
106
- "lodash-es": "^4.17.23",
107
- marked: "^17.0.5",
108
- "marked-terminal": "^7.3.0",
109
- nanoid: "^5.1.2",
110
- openai: "^4.82.0",
111
- ora: "^9.3.0",
112
- "proper-lockfile": "^4.1.2",
113
- react: "^19.2.4",
114
- "react-reconciler": "^0.33.0",
115
- semver: "^7.7.4",
116
- "signal-exit": "^4.1.0",
117
- "stack-utils": "^2.0.6",
118
- "strip-ansi": "^7.2.0",
119
- "supports-hyperlinks": "^4.4.0",
120
- "type-fest": "^5.5.0",
121
- "usehooks-ts": "^3.1.1",
122
- "wrap-ansi": "^10.0.0",
123
- yaml: "^2.7.0",
124
- "yoga-layout": "^3.2.1",
125
- zod: "^3.24.2"
126
- },
127
- devDependencies: {
128
- "@eslint/js": "^10.0.1",
129
- "@types/lodash": "^4.17.24",
130
- "@types/lodash-es": "^4.17.12",
131
- "@types/node": "^22.12.0",
132
- "@types/react": "^19.2.14",
133
- "@types/semver": "^7.7.1",
134
- eslint: "^9.19.0",
135
- prettier: "^3.4.2",
136
- tsup: "^8.3.6",
137
- typescript: "^5.7.3",
138
- "typescript-eslint": "^8.59.0"
139
- }
140
- };
141
- }
142
- });
143
-
144
- // src/cli/updater.ts
145
- _chunkIJSHQGMPcjs.init_cjs_shims.call(void 0, );
146
- var _child_process = require('child_process');
147
- var _updateAvailable;
148
- function checkForUpdate(packageName = "code-shell") {
149
- try {
150
- const currentVersion = getCurrentVersion();
151
- const latestVersion = _child_process.execSync.call(void 0, `npm view ${packageName} version 2>/dev/null`, {
152
- encoding: "utf-8",
153
- timeout: 5e3
154
- }).trim();
155
- if (latestVersion && latestVersion !== currentVersion && compareVersions(latestVersion, currentVersion) > 0) {
156
- _updateAvailable = latestVersion;
157
- }
158
- } catch (e) {
159
- }
160
- }
161
- function getUpdateAvailable() {
162
- return _updateAvailable;
163
- }
164
- function getCurrentVersion() {
165
- try {
166
- const pkg = require_package();
167
- return _nullishCoalesce(pkg.version, () => ( "0.1.0"));
168
- } catch (e2) {
169
- return "0.1.0";
170
- }
171
- }
172
- function compareVersions(a, b) {
173
- const pa = a.split(".").map(Number);
174
- const pb = b.split(".").map(Number);
175
- for (let i = 0; i < 3; i++) {
176
- const diff = (_nullishCoalesce(pa[i], () => ( 0))) - (_nullishCoalesce(pb[i], () => ( 0)));
177
- if (diff !== 0) return diff;
178
- }
179
- return 0;
180
- }
181
-
182
-
183
-
184
-
185
- exports.checkForUpdate = checkForUpdate; exports.getCurrentVersion = getCurrentVersion; exports.getUpdateAvailable = getUpdateAvailable;
@@ -1,185 +0,0 @@
1
- import {
2
- __commonJS,
3
- init_esm_shims
4
- } from "./chunk-DI7RDLOS.js";
5
-
6
- // package.json
7
- var require_package = __commonJS({
8
- "package.json"(exports, module) {
9
- module.exports = {
10
- name: "@cjhyy/code-shell",
11
- version: "0.1.0-alpha.3",
12
- description: "Code Shell \u2014 general-purpose agent orchestration framework with a terminal coding preset",
13
- type: "module",
14
- main: "./dist/index.cjs",
15
- module: "./dist/index.js",
16
- types: "./dist/index.d.ts",
17
- exports: {
18
- ".": {
19
- types: "./dist/index.d.ts",
20
- import: "./dist/index.js",
21
- require: "./dist/index.cjs"
22
- },
23
- "./run": {
24
- types: "./dist/run/index.d.ts",
25
- import: "./dist/run/index.js",
26
- require: "./dist/run/index.cjs"
27
- },
28
- "./arena": {
29
- types: "./dist/arena/index.d.ts",
30
- import: "./dist/arena/index.js",
31
- require: "./dist/arena/index.cjs"
32
- },
33
- "./product": {
34
- types: "./dist/product/index.d.ts",
35
- import: "./dist/product/index.js",
36
- require: "./dist/product/index.cjs"
37
- },
38
- "./package.json": "./package.json"
39
- },
40
- bin: {
41
- "code-shell": "dist/cli/main.js"
42
- },
43
- repository: {
44
- type: "git",
45
- url: "git+https://github.com/cjhyy/codeshell.git"
46
- },
47
- homepage: "https://github.com/cjhyy/codeshell#readme",
48
- bugs: {
49
- url: "https://github.com/cjhyy/codeshell/issues"
50
- },
51
- publishConfig: {
52
- access: "public"
53
- },
54
- scripts: {
55
- preinstall: "node scripts/check-node.cjs",
56
- build: "bun run sync-models && bun run tsup && bun run build:dts",
57
- "build:dts": "tsc --emitDeclarationOnly --declaration --outDir dist || true",
58
- "sync-models": "bun run scripts/sync-models.ts",
59
- dev: "CODE_SHELL_DEV=1 bun run src/cli/main.ts",
60
- test: "bun test",
61
- "test:watch": "bun test --watch",
62
- lint: "eslint src/",
63
- format: "prettier --write 'src/**/*.ts'",
64
- typecheck: "bun run tsc --noEmit",
65
- prepublishOnly: "bun run build"
66
- },
67
- engines: {
68
- node: ">=20.10"
69
- },
70
- files: [
71
- "dist",
72
- "scripts/check-node.cjs",
73
- "README.md",
74
- "LICENSE",
75
- "CHANGELOG.md"
76
- ],
77
- keywords: [
78
- "ai",
79
- "agent",
80
- "orchestration",
81
- "coding-assistant",
82
- "cli",
83
- "claude-code",
84
- "mcp",
85
- "llm"
86
- ],
87
- author: "maki maki",
88
- license: "MIT",
89
- dependencies: {
90
- "@alcalzone/ansi-tokenize": "^0.3.0",
91
- "@anthropic-ai/sdk": "^0.39.0",
92
- "@modelcontextprotocol/sdk": "^1.12.1",
93
- asciichart: "^1.5.25",
94
- "auto-bind": "^5.0.1",
95
- "bidi-js": "^1.0.3",
96
- chalk: "^5.4.1",
97
- "cli-boxes": "^4.0.1",
98
- "cli-highlight": "^2.1.11",
99
- "code-excerpt": "^4.0.0",
100
- commander: "^13.1.0",
101
- diff: "^8.0.4",
102
- "emoji-regex": "^10.6.0",
103
- "get-east-asian-width": "^1.5.0",
104
- glob: "^11.0.0",
105
- "indent-string": "^5.0.0",
106
- "lodash-es": "^4.17.23",
107
- marked: "^17.0.5",
108
- "marked-terminal": "^7.3.0",
109
- nanoid: "^5.1.2",
110
- openai: "^4.82.0",
111
- ora: "^9.3.0",
112
- "proper-lockfile": "^4.1.2",
113
- react: "^19.2.4",
114
- "react-reconciler": "^0.33.0",
115
- semver: "^7.7.4",
116
- "signal-exit": "^4.1.0",
117
- "stack-utils": "^2.0.6",
118
- "strip-ansi": "^7.2.0",
119
- "supports-hyperlinks": "^4.4.0",
120
- "type-fest": "^5.5.0",
121
- "usehooks-ts": "^3.1.1",
122
- "wrap-ansi": "^10.0.0",
123
- yaml: "^2.7.0",
124
- "yoga-layout": "^3.2.1",
125
- zod: "^3.24.2"
126
- },
127
- devDependencies: {
128
- "@eslint/js": "^10.0.1",
129
- "@types/lodash": "^4.17.24",
130
- "@types/lodash-es": "^4.17.12",
131
- "@types/node": "^22.12.0",
132
- "@types/react": "^19.2.14",
133
- "@types/semver": "^7.7.1",
134
- eslint: "^9.19.0",
135
- prettier: "^3.4.2",
136
- tsup: "^8.3.6",
137
- typescript: "^5.7.3",
138
- "typescript-eslint": "^8.59.0"
139
- }
140
- };
141
- }
142
- });
143
-
144
- // src/cli/updater.ts
145
- init_esm_shims();
146
- import { execSync } from "child_process";
147
- var _updateAvailable;
148
- function checkForUpdate(packageName = "code-shell") {
149
- try {
150
- const currentVersion = getCurrentVersion();
151
- const latestVersion = execSync(`npm view ${packageName} version 2>/dev/null`, {
152
- encoding: "utf-8",
153
- timeout: 5e3
154
- }).trim();
155
- if (latestVersion && latestVersion !== currentVersion && compareVersions(latestVersion, currentVersion) > 0) {
156
- _updateAvailable = latestVersion;
157
- }
158
- } catch {
159
- }
160
- }
161
- function getUpdateAvailable() {
162
- return _updateAvailable;
163
- }
164
- function getCurrentVersion() {
165
- try {
166
- const pkg = require_package();
167
- return pkg.version ?? "0.1.0";
168
- } catch {
169
- return "0.1.0";
170
- }
171
- }
172
- function compareVersions(a, b) {
173
- const pa = a.split(".").map(Number);
174
- const pb = b.split(".").map(Number);
175
- for (let i = 0; i < 3; i++) {
176
- const diff = (pa[i] ?? 0) - (pb[i] ?? 0);
177
- if (diff !== 0) return diff;
178
- }
179
- return 0;
180
- }
181
- export {
182
- checkForUpdate,
183
- getCurrentVersion,
184
- getUpdateAvailable
185
- };