@cjhyy/code-shell 0.1.0-alpha.1 → 0.1.0-alpha.2

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 (274) hide show
  1. package/README.md +8 -0
  2. package/dist/anthropic-P5VETAFI.cjs +10 -0
  3. package/dist/{anthropic-NENYS535.js → anthropic-W2GU3D76.js} +3 -2
  4. package/dist/arena/context/context-tools.d.ts +1 -1
  5. package/dist/arena/index.cjs +4 -4
  6. package/dist/arena/index.js +3 -3
  7. package/dist/arena/providers/index.d.ts +19 -3
  8. package/dist/arena/strategies/utils.d.ts +6 -1
  9. package/dist/arena/types.d.ts +10 -1
  10. package/dist/{arena-46QQ6BZQ.js → arena-ENHBHB2W.js} +5 -7
  11. package/dist/{arena-HZZZ2GJH.cjs → arena-HHDYYVHJ.cjs} +19 -21
  12. package/dist/{chunk-BE6IPRDM.js → chunk-2EUAE7AY.js} +1 -1
  13. package/dist/{chunk-WYKNZ54E.cjs → chunk-3CAZIWUA.cjs} +6 -6
  14. package/dist/{chunk-J5XW6UYL.js → chunk-5C5HIOML.js} +63 -4
  15. package/dist/chunk-75E4BBFC.js +224 -0
  16. package/dist/{chunk-ZJV3YSY3.cjs → chunk-BUJ5KYCI.cjs} +53 -11
  17. package/dist/{chunk-BMH65OVB.cjs → chunk-C7C7ZZY4.cjs} +8 -8
  18. package/dist/{chunk-KO2FPF7G.js → chunk-F5BS3GUC.js} +20 -2
  19. package/dist/chunk-FA5KD34T.js +54 -0
  20. package/dist/chunk-FV2ARONZ.cjs +224 -0
  21. package/dist/chunk-G76E5FOB.cjs +54 -0
  22. package/dist/{chunk-DICG4AB7.cjs → chunk-GZBD6QRS.cjs} +42 -3
  23. package/dist/{chunk-FVP7XJGS.cjs → chunk-HOXQLX5R.cjs} +406 -196
  24. package/dist/{chunk-4PKZPFCD.js → chunk-I57ZD5IQ.js} +47 -14
  25. package/dist/{chunk-JUHRV2XF.js → chunk-ID6EJUHP.js} +1703 -438
  26. package/dist/chunk-JHNCK7JP.cjs +202 -0
  27. package/dist/{chunk-MOILS4WE.cjs → chunk-JHXNOB5G.cjs} +3 -3
  28. package/dist/{chunk-UK2SU23S.cjs → chunk-KOGV6PDQ.cjs} +20 -2
  29. package/dist/{chunk-VKGNCYRL.js → chunk-LMEKCQX4.js} +95 -13
  30. package/dist/{chunk-3EAEC566.cjs → chunk-M2QI5X3X.cjs} +51 -18
  31. package/dist/{chunk-YZ25SSWJ.js → chunk-M2SVOKC6.js} +46 -4
  32. package/dist/chunk-OMRGA6TI.js +4753 -0
  33. package/dist/{chunk-NG73UR3L.cjs → chunk-OP57WUWQ.cjs} +23 -1
  34. package/dist/{chunk-ZXYDDJEJ.js → chunk-OUC2DFA7.js} +2 -2
  35. package/dist/{chunk-AP5F6VYE.js → chunk-REFCCVDM.js} +1 -1
  36. package/dist/{chunk-O6F2EF2Z.js → chunk-SCDKLTN3.js} +41 -2
  37. package/dist/{chunk-FECTK5KJ.js → chunk-SW3L7HIM.js} +1 -1
  38. package/dist/chunk-TATCTZSB.cjs +4753 -0
  39. package/dist/{chunk-Q6BYFYGD.cjs → chunk-VWFET3MG.cjs} +1886 -621
  40. package/dist/{chunk-3EUDE77E.cjs → chunk-X2DNIMPC.cjs} +19 -19
  41. package/dist/{chunk-SQZHPD3S.js → chunk-Y7TSCDF6.js} +297 -87
  42. package/dist/{chunk-WHRTARDJ.cjs → chunk-YAFCN7ZW.cjs} +112 -30
  43. package/dist/{chunk-LRAY5IYC.cjs → chunk-YD7XTI7T.cjs} +65 -6
  44. package/dist/{chunk-S74VVJBF.js → chunk-ZLPJJZUW.js} +23 -1
  45. package/dist/chunk-ZRVPCXI7.js +202 -0
  46. package/dist/cli/commands/builtin/advanced-commands.d.ts +1 -1
  47. package/dist/cli/commands/builtin/extra-commands.d.ts +2 -2
  48. package/dist/cli/commands/builtin/more-commands.d.ts +1 -3
  49. package/dist/cli/commands/registry.d.ts +8 -0
  50. package/dist/cli/cost-tracker.d.ts +6 -0
  51. package/dist/cli/main.cjs +3534 -1996
  52. package/dist/cli/main.js +3646 -2108
  53. package/dist/cli/onboarding.d.ts +67 -14
  54. package/dist/client-base-TOVE25FA.js +9 -0
  55. package/dist/client-base-VDDIADAC.cjs +9 -0
  56. package/dist/compaction-D3KV2NWY.cjs +31 -0
  57. package/dist/{compaction-CCHWA4G6.js → compaction-YNWCEF7B.js} +1 -2
  58. package/dist/context/manager.d.ts +9 -0
  59. package/dist/data/openrouter-models.d.ts +35 -0
  60. package/dist/data/openrouter-sync.d.ts +16 -0
  61. package/dist/{devtools-KIY3LWQJ.js → devtools-IRQQPIRY.js} +1 -1
  62. package/dist/{devtools-LRP47DDV.cjs → devtools-WTC3NFNE.cjs} +1 -1
  63. package/dist/engine/engine.d.ts +29 -6
  64. package/dist/engine/turn-loop.d.ts +7 -0
  65. package/dist/engine/turn-state.d.ts +6 -0
  66. package/dist/index.cjs +19 -28
  67. package/dist/index.js +28 -37
  68. package/dist/llm/client-base.d.ts +7 -0
  69. package/dist/llm/model-pool.d.ts +4 -0
  70. package/dist/logging/logger.d.ts +69 -8
  71. package/dist/manager-FWLOVEEK.cjs +7 -0
  72. package/dist/manager-GEXJLOIS.js +7 -0
  73. package/dist/{mcp-manager-OKXHHWYR.js → mcp-manager-37GQLFGX.js} +2 -2
  74. package/dist/mcp-manager-U77NEXBY.cjs +8 -0
  75. package/dist/memory-ADGOWADP.cjs +9 -0
  76. package/dist/memory-EPFDBPII.js +9 -0
  77. package/dist/native-ts/yoga-layout/index.d.ts +2 -2
  78. package/dist/{openai-5HQGBL4L.js → openai-RXU5URYI.js} +3 -2
  79. package/dist/openai-SQW4H2K4.cjs +10 -0
  80. package/dist/openrouter-models-OL725CL6.js +15 -0
  81. package/dist/openrouter-models-UM3AOGZ4.cjs +15 -0
  82. package/dist/openrouter-sync-CWD5VNW2.js +11 -0
  83. package/dist/openrouter-sync-HYZZC6RX.cjs +11 -0
  84. package/dist/product/index.cjs +12 -16
  85. package/dist/product/index.js +11 -15
  86. package/dist/protocol/types.d.ts +11 -3
  87. package/dist/{ink → render}/hooks/use-input.d.ts +1 -1
  88. package/dist/run/index.cjs +12 -16
  89. package/dist/run/index.js +11 -15
  90. package/dist/session/memory.d.ts +23 -3
  91. package/dist/session/session-manager.d.ts +4 -1
  92. package/dist/{session-manager-UQKB564H.cjs → session-manager-HRSKENKB.cjs} +2 -2
  93. package/dist/{session-manager-JIIBCFTC.js → session-manager-NEKFEHF3.js} +1 -1
  94. package/dist/settings/manager.d.ts +9 -0
  95. package/dist/settings/schema.d.ts +48 -39
  96. package/dist/{tool-summary-J2ICNMWP.js → tool-summary-2RUFL5QK.js} +1 -1
  97. package/dist/{tool-summary-5P2GKRA4.cjs → tool-summary-RYNR4DDB.cjs} +2 -2
  98. package/dist/tool-system/builtin/agent.d.ts +3 -26
  99. package/dist/tool-system/builtin/apply-patch/applier.d.ts +26 -0
  100. package/dist/tool-system/builtin/apply-patch/index.d.ts +19 -0
  101. package/dist/tool-system/builtin/apply-patch/parser.d.ts +17 -0
  102. package/dist/tool-system/builtin/apply-patch/seek-sequence.d.ts +18 -0
  103. package/dist/tool-system/builtin/apply-patch/types.d.ts +49 -0
  104. package/dist/tool-system/builtin/arena.d.ts +18 -5
  105. package/dist/tool-system/builtin/ask-user.d.ts +6 -6
  106. package/dist/tool-system/builtin/index.d.ts +11 -1
  107. package/dist/tool-system/builtin/tool-search.d.ts +2 -3
  108. package/dist/tool-system/context.d.ts +74 -0
  109. package/dist/tool-system/executor.d.ts +16 -0
  110. package/dist/tool-system/permission.d.ts +40 -5
  111. package/dist/tool-system/registry.d.ts +2 -0
  112. package/dist/types.d.ts +28 -1
  113. package/dist/ui/App.d.ts +1 -1
  114. package/dist/ui/components/AgentBlock.d.ts +1 -1
  115. package/dist/ui/components/AskUserPrompt.d.ts +7 -0
  116. package/dist/ui/components/MessageContent.d.ts +7 -3
  117. package/dist/ui/components/ModelManager.d.ts +35 -0
  118. package/dist/ui/components/ModelSelector.d.ts +10 -0
  119. package/dist/ui/components/OnboardingPrompt.d.ts +7 -0
  120. package/dist/ui/components/PermissionPrompt.d.ts +5 -2
  121. package/dist/ui/components/SessionPicker.d.ts +14 -0
  122. package/dist/ui/components/StatusLine.d.ts +4 -2
  123. package/dist/ui/components/ThemedBox.d.ts +1 -1
  124. package/dist/ui/components/ToolCall.d.ts +8 -1
  125. package/dist/ui/components/WelcomeTips.d.ts +5 -0
  126. package/dist/ui/onboarding-runner.d.ts +2 -0
  127. package/dist/ui/store.d.ts +1 -0
  128. package/dist/{updater-2N6745WR.cjs → updater-M7L42ASZ.cjs} +4 -4
  129. package/dist/{updater-PV7FKSUI.js → updater-ZRTONIR4.js} +4 -4
  130. package/dist/utils/debug.d.ts +17 -33
  131. package/package.json +4 -4
  132. package/dist/anthropic-XMTTVNSH.cjs +0 -9
  133. package/dist/bridge-4ZRXVWBN.js +0 -98
  134. package/dist/bridge-W476QDFH.cjs +0 -98
  135. package/dist/chunk-4RRUP4MM.js +0 -86
  136. package/dist/chunk-4SFPFHMG.js +0 -132
  137. package/dist/chunk-5LHVI777.cjs +0 -246
  138. package/dist/chunk-6ZIROYXX.js +0 -207
  139. package/dist/chunk-C7JBCO5V.js +0 -80
  140. package/dist/chunk-CSO5EOEP.cjs +0 -132
  141. package/dist/chunk-FGZGCFJX.cjs +0 -207
  142. package/dist/chunk-HD7MT5XU.cjs +0 -86
  143. package/dist/chunk-IMMTBZ33.cjs +0 -63
  144. package/dist/chunk-JT2WSQSR.cjs +0 -335
  145. package/dist/chunk-NZ4DQ72D.cjs +0 -664
  146. package/dist/chunk-OG4MIQJ6.js +0 -335
  147. package/dist/chunk-WRZJUQ5Z.js +0 -664
  148. package/dist/chunk-X4HAERTQ.js +0 -63
  149. package/dist/chunk-XHC2JMEC.cjs +0 -80
  150. package/dist/chunk-ZRSSGYA5.js +0 -246
  151. package/dist/compaction-44I55TLI.cjs +0 -32
  152. package/dist/coordinator-5HY7ALO2.js +0 -7
  153. package/dist/coordinator-INDLPVMF.cjs +0 -7
  154. package/dist/cost-tracker-IWYAUPXH.js +0 -9
  155. package/dist/cost-tracker-JXTJQQWE.cjs +0 -9
  156. package/dist/loader-DXFSUB4R.cjs +0 -91
  157. package/dist/loader-J5UID6CV.js +0 -91
  158. package/dist/manager-ETWDOCHN.cjs +0 -9
  159. package/dist/manager-HGMQNEJB.cjs +0 -11
  160. package/dist/manager-HUAQOORS.js +0 -9
  161. package/dist/manager-VJIZ2CQC.js +0 -11
  162. package/dist/mcp-manager-G4G2QASE.cjs +0 -8
  163. package/dist/memory-AP747G5H.js +0 -7
  164. package/dist/memory-BH3BYUN5.cjs +0 -7
  165. package/dist/onboarding-6WEPV7C2.js +0 -11
  166. package/dist/onboarding-QM5DY2TU.cjs +0 -11
  167. package/dist/openai-656VWUQW.cjs +0 -9
  168. package/dist/skills-63RBYQRX.js +0 -13
  169. package/dist/skills-V3BPLW3D.cjs +0 -13
  170. package/dist/token-counter-CHAXW5O7.cjs +0 -13
  171. package/dist/token-counter-DSOZGZ5Q.js +0 -13
  172. package/dist/utils/log.d.ts +0 -56
  173. package/dist/voice-KTZ7PAGO.js +0 -80
  174. package/dist/voice-KZE25GKB.cjs +0 -80
  175. /package/dist/{ink → render}/Ansi.d.ts +0 -0
  176. /package/dist/{ink → render}/bidi.d.ts +0 -0
  177. /package/dist/{ink → render}/clearTerminal.d.ts +0 -0
  178. /package/dist/{ink → render}/colorize.d.ts +0 -0
  179. /package/dist/{ink → render}/components/AlternateScreen.d.ts +0 -0
  180. /package/dist/{ink → render}/components/App.d.ts +0 -0
  181. /package/dist/{ink → render}/components/AppContext.d.ts +0 -0
  182. /package/dist/{ink → render}/components/Box.d.ts +0 -0
  183. /package/dist/{ink → render}/components/Button.d.ts +0 -0
  184. /package/dist/{ink → render}/components/ClockContext.d.ts +0 -0
  185. /package/dist/{ink → render}/components/CursorDeclarationContext.d.ts +0 -0
  186. /package/dist/{ink → render}/components/ErrorOverview.d.ts +0 -0
  187. /package/dist/{ink → render}/components/Link.d.ts +0 -0
  188. /package/dist/{ink → render}/components/Newline.d.ts +0 -0
  189. /package/dist/{ink → render}/components/NoSelect.d.ts +0 -0
  190. /package/dist/{ink → render}/components/RawAnsi.d.ts +0 -0
  191. /package/dist/{ink → render}/components/ScrollBox.d.ts +0 -0
  192. /package/dist/{ink → render}/components/Spacer.d.ts +0 -0
  193. /package/dist/{ink → render}/components/StdinContext.d.ts +0 -0
  194. /package/dist/{ink → render}/components/TerminalFocusContext.d.ts +0 -0
  195. /package/dist/{ink → render}/components/TerminalSizeContext.d.ts +0 -0
  196. /package/dist/{ink → render}/components/Text.d.ts +0 -0
  197. /package/dist/{ink → render}/constants.d.ts +0 -0
  198. /package/dist/{ink → render}/cursor.d.ts +0 -0
  199. /package/dist/{ink → render}/devtools.d.ts +0 -0
  200. /package/dist/{ink → render}/dom.d.ts +0 -0
  201. /package/dist/{ink → render}/events/click-event.d.ts +0 -0
  202. /package/dist/{ink → render}/events/dispatcher.d.ts +0 -0
  203. /package/dist/{ink → render}/events/emitter.d.ts +0 -0
  204. /package/dist/{ink → render}/events/event-handlers.d.ts +0 -0
  205. /package/dist/{ink → render}/events/event.d.ts +0 -0
  206. /package/dist/{ink → render}/events/focus-event.d.ts +0 -0
  207. /package/dist/{ink → render}/events/input-event.d.ts +0 -0
  208. /package/dist/{ink → render}/events/keyboard-event.d.ts +0 -0
  209. /package/dist/{ink → render}/events/paste-event.d.ts +0 -0
  210. /package/dist/{ink → render}/events/resize-event.d.ts +0 -0
  211. /package/dist/{ink → render}/events/terminal-event.d.ts +0 -0
  212. /package/dist/{ink → render}/events/terminal-focus-event.d.ts +0 -0
  213. /package/dist/{ink → render}/focus.d.ts +0 -0
  214. /package/dist/{ink → render}/frame.d.ts +0 -0
  215. /package/dist/{ink → render}/get-max-width.d.ts +0 -0
  216. /package/dist/{ink → render}/hit-test.d.ts +0 -0
  217. /package/dist/{ink → render}/hooks/use-animation-frame.d.ts +0 -0
  218. /package/dist/{ink → render}/hooks/use-app.d.ts +0 -0
  219. /package/dist/{ink → render}/hooks/use-declared-cursor.d.ts +0 -0
  220. /package/dist/{ink → render}/hooks/use-interval.d.ts +0 -0
  221. /package/dist/{ink → render}/hooks/use-search-highlight.d.ts +0 -0
  222. /package/dist/{ink → render}/hooks/use-selection.d.ts +0 -0
  223. /package/dist/{ink → render}/hooks/use-stdin.d.ts +0 -0
  224. /package/dist/{ink → render}/hooks/use-tab-status.d.ts +0 -0
  225. /package/dist/{ink → render}/hooks/use-terminal-focus.d.ts +0 -0
  226. /package/dist/{ink → render}/hooks/use-terminal-title.d.ts +0 -0
  227. /package/dist/{ink → render}/hooks/use-terminal-viewport.d.ts +0 -0
  228. /package/dist/{ink → render}/index.d.ts +0 -0
  229. /package/dist/{ink → render}/ink.d.ts +0 -0
  230. /package/dist/{ink → render}/instances.d.ts +0 -0
  231. /package/dist/{ink → render}/layout/engine.d.ts +0 -0
  232. /package/dist/{ink → render}/layout/geometry.d.ts +0 -0
  233. /package/dist/{ink → render}/layout/node.d.ts +0 -0
  234. /package/dist/{ink → render}/layout/yoga.d.ts +0 -0
  235. /package/dist/{ink → render}/line-width-cache.d.ts +0 -0
  236. /package/dist/{ink → render}/log-update.d.ts +0 -0
  237. /package/dist/{ink → render}/measure-element.d.ts +0 -0
  238. /package/dist/{ink → render}/measure-text.d.ts +0 -0
  239. /package/dist/{ink → render}/node-cache.d.ts +0 -0
  240. /package/dist/{ink → render}/optimizer.d.ts +0 -0
  241. /package/dist/{ink → render}/output.d.ts +0 -0
  242. /package/dist/{ink → render}/parse-keypress.d.ts +0 -0
  243. /package/dist/{ink → render}/reconciler.d.ts +0 -0
  244. /package/dist/{ink → render}/render-border.d.ts +0 -0
  245. /package/dist/{ink → render}/render-node-to-output.d.ts +0 -0
  246. /package/dist/{ink → render}/render-to-screen.d.ts +0 -0
  247. /package/dist/{ink → render}/renderer.d.ts +0 -0
  248. /package/dist/{ink → render}/root.d.ts +0 -0
  249. /package/dist/{ink → render}/screen.d.ts +0 -0
  250. /package/dist/{ink → render}/searchHighlight.d.ts +0 -0
  251. /package/dist/{ink → render}/selection.d.ts +0 -0
  252. /package/dist/{ink → render}/squash-text-nodes.d.ts +0 -0
  253. /package/dist/{ink → render}/stringWidth.d.ts +0 -0
  254. /package/dist/{ink → render}/styles.d.ts +0 -0
  255. /package/dist/{ink → render}/supports-hyperlinks.d.ts +0 -0
  256. /package/dist/{ink → render}/tabstops.d.ts +0 -0
  257. /package/dist/{ink → render}/terminal-focus-state.d.ts +0 -0
  258. /package/dist/{ink → render}/terminal-querier.d.ts +0 -0
  259. /package/dist/{ink → render}/terminal.d.ts +0 -0
  260. /package/dist/{ink → render}/termio/ansi.d.ts +0 -0
  261. /package/dist/{ink → render}/termio/csi.d.ts +0 -0
  262. /package/dist/{ink → render}/termio/dec.d.ts +0 -0
  263. /package/dist/{ink → render}/termio/esc.d.ts +0 -0
  264. /package/dist/{ink → render}/termio/osc.d.ts +0 -0
  265. /package/dist/{ink → render}/termio/parser.d.ts +0 -0
  266. /package/dist/{ink → render}/termio/sgr.d.ts +0 -0
  267. /package/dist/{ink → render}/termio/tokenize.d.ts +0 -0
  268. /package/dist/{ink → render}/termio/types.d.ts +0 -0
  269. /package/dist/{ink → render}/termio.d.ts +0 -0
  270. /package/dist/{ink → render}/useTerminalNotification.d.ts +0 -0
  271. /package/dist/{ink → render}/warn.d.ts +0 -0
  272. /package/dist/{ink → render}/widest-line.d.ts +0 -0
  273. /package/dist/{ink → render}/wrap-text.d.ts +0 -0
  274. /package/dist/{ink → render}/wrapAnsi.d.ts +0 -0
@@ -1,8 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
- var _chunkBMH65OVBcjs = require('./chunk-BMH65OVB.cjs');
4
- require('./chunk-IMMTBZ33.cjs');
5
- require('./chunk-IJSHQGMP.cjs');
6
-
7
-
8
- exports.MCPManager = _chunkBMH65OVBcjs.MCPManager;
@@ -1,7 +0,0 @@
1
- import {
2
- MemoryManager
3
- } from "./chunk-4PKZPFCD.js";
4
- import "./chunk-DI7RDLOS.js";
5
- export {
6
- MemoryManager
7
- };
@@ -1,7 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
- var _chunk3EAEC566cjs = require('./chunk-3EAEC566.cjs');
4
- require('./chunk-IJSHQGMP.cjs');
5
-
6
-
7
- exports.MemoryManager = _chunk3EAEC566cjs.MemoryManager;
@@ -1,11 +0,0 @@
1
- import {
2
- hasApiKey,
3
- reconfigure,
4
- runOnboarding
5
- } from "./chunk-WRZJUQ5Z.js";
6
- import "./chunk-DI7RDLOS.js";
7
- export {
8
- hasApiKey,
9
- reconfigure,
10
- runOnboarding
11
- };
@@ -1,11 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
-
4
-
5
- var _chunkNZ4DQ72Dcjs = require('./chunk-NZ4DQ72D.cjs');
6
- require('./chunk-IJSHQGMP.cjs');
7
-
8
-
9
-
10
-
11
- exports.hasApiKey = _chunkNZ4DQ72Dcjs.hasApiKey; exports.reconfigure = _chunkNZ4DQ72Dcjs.reconfigure; exports.runOnboarding = _chunkNZ4DQ72Dcjs.runOnboarding;
@@ -1,9 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
- var _chunkWHRTARDJcjs = require('./chunk-WHRTARDJ.cjs');
4
- require('./chunk-DICG4AB7.cjs');
5
- require('./chunk-EL2RL5DG.cjs');
6
- require('./chunk-IJSHQGMP.cjs');
7
-
8
-
9
- exports.OpenAIClient = _chunkWHRTARDJcjs.OpenAIClient;
@@ -1,13 +0,0 @@
1
- import {
2
- buildSkillListing,
3
- matchSkillsByInput,
4
- matchSkillsByTool,
5
- scanSkills
6
- } from "./chunk-4SFPFHMG.js";
7
- import "./chunk-DI7RDLOS.js";
8
- export {
9
- buildSkillListing,
10
- matchSkillsByInput,
11
- matchSkillsByTool,
12
- scanSkills
13
- };
@@ -1,13 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
-
4
-
5
-
6
- var _chunkCSO5EOEPcjs = require('./chunk-CSO5EOEP.cjs');
7
- require('./chunk-IJSHQGMP.cjs');
8
-
9
-
10
-
11
-
12
-
13
- exports.buildSkillListing = _chunkCSO5EOEPcjs.buildSkillListing; exports.matchSkillsByInput = _chunkCSO5EOEPcjs.matchSkillsByInput; exports.matchSkillsByTool = _chunkCSO5EOEPcjs.matchSkillsByTool; exports.scanSkills = _chunkCSO5EOEPcjs.scanSkills;
@@ -1,13 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
-
4
-
5
-
6
- var _chunkHD7MT5XUcjs = require('./chunk-HD7MT5XU.cjs');
7
- require('./chunk-IJSHQGMP.cjs');
8
- _chunkHD7MT5XUcjs.init_token_counter.call(void 0, );
9
-
10
-
11
-
12
-
13
- exports.calculateContextUsage = _chunkHD7MT5XUcjs.calculateContextUsage; exports.estimateMessagesTokens = _chunkHD7MT5XUcjs.estimateMessagesTokens; exports.estimateStringTokens = _chunkHD7MT5XUcjs.estimateStringTokens;
@@ -1,13 +0,0 @@
1
- import {
2
- calculateContextUsage,
3
- estimateMessagesTokens,
4
- estimateStringTokens,
5
- init_token_counter
6
- } from "./chunk-4RRUP4MM.js";
7
- import "./chunk-DI7RDLOS.js";
8
- init_token_counter();
9
- export {
10
- calculateContextUsage,
11
- estimateMessagesTokens,
12
- estimateStringTokens
13
- };
@@ -1,56 +0,0 @@
1
- /**
2
- * Persistent logging — writes to ~/.code-shell/logs/ with daily rotation.
3
- *
4
- * Also provides an in-memory error log (last 100 errors) for bug reports,
5
- * and a pluggable ErrorLogSink architecture for decoupled error routing.
6
- */
7
- /**
8
- * Get recent in-memory errors for inclusion in bug reports.
9
- */
10
- export declare function getInMemoryErrors(): Array<{
11
- error: string;
12
- timestamp: string;
13
- }>;
14
- /**
15
- * Sink interface for pluggable error logging backends.
16
- */
17
- export type ErrorLogSink = {
18
- logError: (error: Error) => void;
19
- logMCPError: (serverName: string, error: unknown) => void;
20
- logMCPDebug: (serverName: string, message: string) => void;
21
- getErrorsPath: () => string;
22
- getMCPLogsPath: (serverName: string) => string;
23
- };
24
- /**
25
- * Attach a sink to receive all error events.
26
- * Queued events are drained immediately. Idempotent.
27
- */
28
- export declare function attachErrorLogSink(newSink: ErrorLogSink): void;
29
- /**
30
- * Log an error to multiple destinations:
31
- * - In-memory error log (for bug reports)
32
- * - Persistent log file
33
- * - ErrorLogSink (if attached)
34
- */
35
- export declare function logError(msgOrError: string | Error | unknown, err?: unknown): void;
36
- export declare function logInfo(msg: string): void;
37
- export declare function logWarn(msg: string): void;
38
- export declare function logMCPDebug(serverNameOrMsg: string, message?: string): void;
39
- export declare function logMCPError(serverNameOrMsg: string, err?: unknown): void;
40
- /**
41
- * Read the most recent N lines from today's log.
42
- */
43
- export declare function getRecentLogs(n?: number): string[];
44
- /**
45
- * Clean up old log files (keep last MAX_LOG_FILES days).
46
- */
47
- export declare function rotateLogs(): void;
48
- /**
49
- * Get the logs directory path.
50
- */
51
- export declare function getLogsDir(): string;
52
- /**
53
- * Reset error log state for testing purposes only.
54
- * @internal
55
- */
56
- export declare function _resetErrorLogForTesting(): void;
@@ -1,80 +0,0 @@
1
- import {
2
- init_esm_shims
3
- } from "./chunk-DI7RDLOS.js";
4
-
5
- // src/voice/index.ts
6
- init_esm_shims();
7
- import { execSync, spawn } from "child_process";
8
- var _enabled = false;
9
- var _config = {};
10
- function isVoiceEnabled() {
11
- return _enabled;
12
- }
13
- function enableVoice(config) {
14
- _enabled = true;
15
- _config = config ?? {};
16
- }
17
- function disableVoice() {
18
- _enabled = false;
19
- }
20
- function speak(text) {
21
- if (!_enabled) return;
22
- if (_config.ttsProvider === "none") return;
23
- const platform = process.platform;
24
- try {
25
- if (platform === "darwin") {
26
- const child = spawn("say", [text], { stdio: "ignore", detached: true });
27
- child.unref();
28
- } else if (platform === "linux") {
29
- const child = spawn("espeak", [text], { stdio: "ignore", detached: true });
30
- child.unref();
31
- } else if (platform === "win32") {
32
- const child = spawn("powershell", [
33
- "-Command",
34
- `Add-Type -AssemblyName System.Speech; $synth = New-Object System.Speech.Synthesis.SpeechSynthesizer; $synth.Speak('${text.replace(/'/g, "''")}')`
35
- ], { stdio: "ignore", detached: true });
36
- child.unref();
37
- }
38
- } catch {
39
- }
40
- }
41
- function stopSpeaking() {
42
- try {
43
- if (process.platform === "darwin") {
44
- execSync("killall say 2>/dev/null", { timeout: 3e3 });
45
- } else if (process.platform === "linux") {
46
- execSync("killall espeak 2>/dev/null", { timeout: 3e3 });
47
- }
48
- } catch {
49
- }
50
- }
51
- function isRecordingAvailable() {
52
- try {
53
- if (process.platform === "darwin") {
54
- execSync("which rec 2>/dev/null || which sox 2>/dev/null", { timeout: 3e3 });
55
- return true;
56
- }
57
- if (process.platform === "linux") {
58
- execSync("which arecord 2>/dev/null || which sox 2>/dev/null", { timeout: 3e3 });
59
- return true;
60
- }
61
- return false;
62
- } catch {
63
- return false;
64
- }
65
- }
66
- async function recordAndTranscribe(_durationSeconds = 10) {
67
- if (!_config.apiKey) {
68
- return "Error: API key required for voice transcription. Set in settings.";
69
- }
70
- return "Voice transcription is not yet fully implemented. Use text input.";
71
- }
72
- export {
73
- disableVoice,
74
- enableVoice,
75
- isRecordingAvailable,
76
- isVoiceEnabled,
77
- recordAndTranscribe,
78
- speak,
79
- stopSpeaking
80
- };
@@ -1,80 +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
- var _chunkIJSHQGMPcjs = require('./chunk-IJSHQGMP.cjs');
4
-
5
- // src/voice/index.ts
6
- _chunkIJSHQGMPcjs.init_cjs_shims.call(void 0, );
7
- var _child_process = require('child_process');
8
- var _enabled = false;
9
- var _config = {};
10
- function isVoiceEnabled() {
11
- return _enabled;
12
- }
13
- function enableVoice(config) {
14
- _enabled = true;
15
- _config = _nullishCoalesce(config, () => ( {}));
16
- }
17
- function disableVoice() {
18
- _enabled = false;
19
- }
20
- function speak(text) {
21
- if (!_enabled) return;
22
- if (_config.ttsProvider === "none") return;
23
- const platform = process.platform;
24
- try {
25
- if (platform === "darwin") {
26
- const child = _child_process.spawn.call(void 0, "say", [text], { stdio: "ignore", detached: true });
27
- child.unref();
28
- } else if (platform === "linux") {
29
- const child = _child_process.spawn.call(void 0, "espeak", [text], { stdio: "ignore", detached: true });
30
- child.unref();
31
- } else if (platform === "win32") {
32
- const child = _child_process.spawn.call(void 0, "powershell", [
33
- "-Command",
34
- `Add-Type -AssemblyName System.Speech; $synth = New-Object System.Speech.Synthesis.SpeechSynthesizer; $synth.Speak('${text.replace(/'/g, "''")}')`
35
- ], { stdio: "ignore", detached: true });
36
- child.unref();
37
- }
38
- } catch (e) {
39
- }
40
- }
41
- function stopSpeaking() {
42
- try {
43
- if (process.platform === "darwin") {
44
- _child_process.execSync.call(void 0, "killall say 2>/dev/null", { timeout: 3e3 });
45
- } else if (process.platform === "linux") {
46
- _child_process.execSync.call(void 0, "killall espeak 2>/dev/null", { timeout: 3e3 });
47
- }
48
- } catch (e2) {
49
- }
50
- }
51
- function isRecordingAvailable() {
52
- try {
53
- if (process.platform === "darwin") {
54
- _child_process.execSync.call(void 0, "which rec 2>/dev/null || which sox 2>/dev/null", { timeout: 3e3 });
55
- return true;
56
- }
57
- if (process.platform === "linux") {
58
- _child_process.execSync.call(void 0, "which arecord 2>/dev/null || which sox 2>/dev/null", { timeout: 3e3 });
59
- return true;
60
- }
61
- return false;
62
- } catch (e3) {
63
- return false;
64
- }
65
- }
66
- async function recordAndTranscribe(_durationSeconds = 10) {
67
- if (!_config.apiKey) {
68
- return "Error: API key required for voice transcription. Set in settings.";
69
- }
70
- return "Voice transcription is not yet fully implemented. Use text input.";
71
- }
72
-
73
-
74
-
75
-
76
-
77
-
78
-
79
-
80
- exports.disableVoice = disableVoice; exports.enableVoice = enableVoice; exports.isRecordingAvailable = isRecordingAvailable; exports.isVoiceEnabled = isVoiceEnabled; exports.recordAndTranscribe = recordAndTranscribe; exports.speak = speak; exports.stopSpeaking = stopSpeaking;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes