dexto 1.4.0 → 1.5.1

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 (231) hide show
  1. package/README.md +62 -7
  2. package/dist/agents/agent-template.yml +2 -2
  3. package/dist/agents/coding-agent/coding-agent.yml +22 -16
  4. package/dist/agents/database-agent/database-agent.yml +2 -2
  5. package/dist/agents/default-agent.yml +7 -5
  6. package/dist/agents/github-agent/github-agent.yml +2 -2
  7. package/dist/agents/product-name-researcher/product-name-researcher.yml +2 -2
  8. package/dist/agents/talk2pdf-agent/talk2pdf-agent.yml +2 -2
  9. package/dist/analytics/events.d.ts +13 -6
  10. package/dist/analytics/events.d.ts.map +1 -1
  11. package/dist/analytics/index.d.ts +1 -1
  12. package/dist/analytics/index.d.ts.map +1 -1
  13. package/dist/analytics/index.js +6 -2
  14. package/dist/api/server-hono.d.ts.map +1 -1
  15. package/dist/api/server-hono.js +27 -5
  16. package/dist/cli/cli-subscriber.d.ts +4 -0
  17. package/dist/cli/cli-subscriber.d.ts.map +1 -1
  18. package/dist/cli/cli-subscriber.js +40 -2
  19. package/dist/cli/commands/create-app.d.ts +16 -14
  20. package/dist/cli/commands/create-app.d.ts.map +1 -1
  21. package/dist/cli/commands/create-app.js +626 -102
  22. package/dist/cli/commands/create-image.d.ts +7 -0
  23. package/dist/cli/commands/create-image.d.ts.map +1 -0
  24. package/dist/cli/commands/create-image.js +201 -0
  25. package/dist/cli/commands/helpers/formatters.js +7 -7
  26. package/dist/cli/commands/index.d.ts +2 -1
  27. package/dist/cli/commands/index.d.ts.map +1 -1
  28. package/dist/cli/commands/index.js +2 -1
  29. package/dist/cli/commands/init-app.js +7 -7
  30. package/dist/cli/commands/install.d.ts +0 -3
  31. package/dist/cli/commands/install.d.ts.map +1 -1
  32. package/dist/cli/commands/install.js +10 -35
  33. package/dist/cli/commands/interactive-commands/command-parser.d.ts +1 -1
  34. package/dist/cli/commands/interactive-commands/command-parser.d.ts.map +1 -1
  35. package/dist/cli/commands/interactive-commands/command-parser.js +18 -8
  36. package/dist/cli/commands/interactive-commands/general-commands.d.ts.map +1 -1
  37. package/dist/cli/commands/interactive-commands/general-commands.js +64 -1
  38. package/dist/cli/commands/interactive-commands/prompt-commands.js +11 -11
  39. package/dist/cli/commands/interactive-commands/system/system-commands.d.ts.map +1 -1
  40. package/dist/cli/commands/interactive-commands/system/system-commands.js +6 -5
  41. package/dist/cli/commands/list-agents.js +2 -2
  42. package/dist/cli/commands/session-commands.js +16 -16
  43. package/dist/cli/commands/setup.d.ts +13 -5
  44. package/dist/cli/commands/setup.d.ts.map +1 -1
  45. package/dist/cli/commands/setup.js +995 -65
  46. package/dist/cli/commands/which.js +1 -1
  47. package/dist/cli/ink-cli/components/ApprovalPrompt.d.ts +2 -0
  48. package/dist/cli/ink-cli/components/ApprovalPrompt.d.ts.map +1 -1
  49. package/dist/cli/ink-cli/components/ApprovalPrompt.js +29 -7
  50. package/dist/cli/ink-cli/components/CustomInput.js +1 -1
  51. package/dist/cli/ink-cli/components/EditableMultiLineInput.js +4 -4
  52. package/dist/cli/ink-cli/components/ElicitationForm.d.ts.map +1 -1
  53. package/dist/cli/ink-cli/components/ElicitationForm.js +6 -6
  54. package/dist/cli/ink-cli/components/ErrorBoundary.d.ts.map +1 -1
  55. package/dist/cli/ink-cli/components/ErrorBoundary.js +1 -1
  56. package/dist/cli/ink-cli/components/Footer.d.ts.map +1 -1
  57. package/dist/cli/ink-cli/components/Footer.js +1 -1
  58. package/dist/cli/ink-cli/components/HistorySearchBar.d.ts.map +1 -1
  59. package/dist/cli/ink-cli/components/HistorySearchBar.js +1 -1
  60. package/dist/cli/ink-cli/components/MultiLineInput.d.ts.map +1 -1
  61. package/dist/cli/ink-cli/components/MultiLineInput.js +3 -3
  62. package/dist/cli/ink-cli/components/ResourceAutocomplete.d.ts.map +1 -1
  63. package/dist/cli/ink-cli/components/ResourceAutocomplete.js +4 -4
  64. package/dist/cli/ink-cli/components/SlashCommandAutocomplete.js +3 -3
  65. package/dist/cli/ink-cli/components/StatusBar.d.ts.map +1 -1
  66. package/dist/cli/ink-cli/components/StatusBar.js +7 -5
  67. package/dist/cli/ink-cli/components/TextBufferInput.d.ts.map +1 -1
  68. package/dist/cli/ink-cli/components/TextBufferInput.js +13 -9
  69. package/dist/cli/ink-cli/components/base/BaseAutocomplete.js +4 -4
  70. package/dist/cli/ink-cli/components/base/BaseSelector.js +2 -2
  71. package/dist/cli/ink-cli/components/chat/Footer.js +1 -1
  72. package/dist/cli/ink-cli/components/chat/Header.d.ts.map +1 -1
  73. package/dist/cli/ink-cli/components/chat/Header.js +2 -4
  74. package/dist/cli/ink-cli/components/chat/MessageItem.d.ts.map +1 -1
  75. package/dist/cli/ink-cli/components/chat/MessageItem.js +9 -6
  76. package/dist/cli/ink-cli/components/chat/MessageList.js +1 -1
  77. package/dist/cli/ink-cli/components/chat/QueuedMessagesDisplay.js +1 -1
  78. package/dist/cli/ink-cli/components/chat/ToolIcon.d.ts +1 -1
  79. package/dist/cli/ink-cli/components/chat/ToolIcon.js +4 -4
  80. package/dist/cli/ink-cli/components/chat/styled-boxes/ConfigBox.js +1 -1
  81. package/dist/cli/ink-cli/components/chat/styled-boxes/HelpBox.js +1 -1
  82. package/dist/cli/ink-cli/components/chat/styled-boxes/LogConfigBox.d.ts.map +1 -1
  83. package/dist/cli/ink-cli/components/chat/styled-boxes/LogConfigBox.js +2 -2
  84. package/dist/cli/ink-cli/components/chat/styled-boxes/SessionHistoryBox.js +5 -5
  85. package/dist/cli/ink-cli/components/chat/styled-boxes/SessionListBox.js +2 -2
  86. package/dist/cli/ink-cli/components/chat/styled-boxes/ShortcutsBox.js +1 -1
  87. package/dist/cli/ink-cli/components/chat/styled-boxes/StatsBox.js +1 -1
  88. package/dist/cli/ink-cli/components/chat/styled-boxes/StyledBox.js +2 -2
  89. package/dist/cli/ink-cli/components/modes/AlternateBufferCLI.d.ts.map +1 -1
  90. package/dist/cli/ink-cli/components/modes/AlternateBufferCLI.js +1 -1
  91. package/dist/cli/ink-cli/components/modes/StaticCLI.d.ts.map +1 -1
  92. package/dist/cli/ink-cli/components/modes/StaticCLI.js +1 -1
  93. package/dist/cli/ink-cli/components/overlays/ApiKeyInput.js +1 -1
  94. package/dist/cli/ink-cli/components/overlays/CustomModelWizard.d.ts +10 -2
  95. package/dist/cli/ink-cli/components/overlays/CustomModelWizard.d.ts.map +1 -1
  96. package/dist/cli/ink-cli/components/overlays/CustomModelWizard.js +209 -89
  97. package/dist/cli/ink-cli/components/overlays/LogLevelSelector.d.ts.map +1 -1
  98. package/dist/cli/ink-cli/components/overlays/LogLevelSelector.js +2 -2
  99. package/dist/cli/ink-cli/components/overlays/McpAddChoice.d.ts.map +1 -1
  100. package/dist/cli/ink-cli/components/overlays/McpAddChoice.js +1 -1
  101. package/dist/cli/ink-cli/components/overlays/McpAddSelector.js +1 -1
  102. package/dist/cli/ink-cli/components/overlays/McpCustomTypeSelector.d.ts.map +1 -1
  103. package/dist/cli/ink-cli/components/overlays/McpCustomTypeSelector.js +2 -2
  104. package/dist/cli/ink-cli/components/overlays/McpCustomWizard.js +1 -1
  105. package/dist/cli/ink-cli/components/overlays/McpRemoveSelector.d.ts.map +1 -1
  106. package/dist/cli/ink-cli/components/overlays/McpRemoveSelector.js +1 -1
  107. package/dist/cli/ink-cli/components/overlays/McpSelector.d.ts.map +1 -1
  108. package/dist/cli/ink-cli/components/overlays/McpSelector.js +1 -1
  109. package/dist/cli/ink-cli/components/overlays/McpServerActions.d.ts.map +1 -1
  110. package/dist/cli/ink-cli/components/overlays/McpServerActions.js +2 -2
  111. package/dist/cli/ink-cli/components/overlays/McpServerList.d.ts.map +1 -1
  112. package/dist/cli/ink-cli/components/overlays/McpServerList.js +1 -1
  113. package/dist/cli/ink-cli/components/overlays/ModelSelectorRefactored.d.ts +6 -5
  114. package/dist/cli/ink-cli/components/overlays/ModelSelectorRefactored.d.ts.map +1 -1
  115. package/dist/cli/ink-cli/components/overlays/ModelSelectorRefactored.js +284 -68
  116. package/dist/cli/ink-cli/components/overlays/PromptAddChoice.d.ts.map +1 -1
  117. package/dist/cli/ink-cli/components/overlays/PromptAddChoice.js +2 -2
  118. package/dist/cli/ink-cli/components/overlays/PromptAddWizard.js +1 -1
  119. package/dist/cli/ink-cli/components/overlays/PromptDeleteSelector.d.ts.map +1 -1
  120. package/dist/cli/ink-cli/components/overlays/PromptDeleteSelector.js +2 -2
  121. package/dist/cli/ink-cli/components/overlays/PromptList.d.ts.map +1 -1
  122. package/dist/cli/ink-cli/components/overlays/PromptList.js +2 -2
  123. package/dist/cli/ink-cli/components/overlays/SearchOverlay.d.ts.map +1 -1
  124. package/dist/cli/ink-cli/components/overlays/SearchOverlay.js +4 -4
  125. package/dist/cli/ink-cli/components/overlays/SessionSubcommandSelector.d.ts.map +1 -1
  126. package/dist/cli/ink-cli/components/overlays/SessionSubcommandSelector.js +1 -1
  127. package/dist/cli/ink-cli/components/overlays/StreamSelector.d.ts.map +1 -1
  128. package/dist/cli/ink-cli/components/overlays/StreamSelector.js +1 -1
  129. package/dist/cli/ink-cli/components/overlays/ToolBrowser.js +12 -12
  130. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/LocalModelWizard.d.ts +25 -0
  131. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/LocalModelWizard.d.ts.map +1 -0
  132. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/LocalModelWizard.js +609 -0
  133. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/index.d.ts +15 -0
  134. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/index.d.ts.map +1 -0
  135. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/index.js +14 -0
  136. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/provider-config.d.ts +33 -0
  137. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/provider-config.d.ts.map +1 -0
  138. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/provider-config.js +462 -0
  139. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ApiKeyStep.d.ts +25 -0
  140. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ApiKeyStep.d.ts.map +1 -0
  141. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ApiKeyStep.js +29 -0
  142. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ProviderSelector.d.ts +17 -0
  143. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ProviderSelector.d.ts.map +1 -0
  144. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ProviderSelector.js +11 -0
  145. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/SetupInfoBanner.d.ts +20 -0
  146. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/SetupInfoBanner.d.ts.map +1 -0
  147. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/SetupInfoBanner.js +10 -0
  148. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/WizardStepInput.d.ts +30 -0
  149. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/WizardStepInput.d.ts.map +1 -0
  150. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/WizardStepInput.js +13 -0
  151. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/index.d.ts +8 -0
  152. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/index.d.ts.map +1 -0
  153. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/index.js +7 -0
  154. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/types.d.ts +85 -0
  155. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/types.d.ts.map +1 -0
  156. package/dist/cli/ink-cli/components/overlays/custom-model-wizard/types.js +38 -0
  157. package/dist/cli/ink-cli/components/renderers/DiffRenderer.js +2 -2
  158. package/dist/cli/ink-cli/components/renderers/FilePreviewRenderer.js +1 -1
  159. package/dist/cli/ink-cli/components/renderers/FileRenderer.js +4 -4
  160. package/dist/cli/ink-cli/components/renderers/GenericRenderer.js +2 -2
  161. package/dist/cli/ink-cli/components/renderers/SearchRenderer.js +1 -1
  162. package/dist/cli/ink-cli/components/renderers/ShellRenderer.js +3 -3
  163. package/dist/cli/ink-cli/components/renderers/diff-shared.js +1 -1
  164. package/dist/cli/ink-cli/components/shared/MarkdownText.d.ts.map +1 -1
  165. package/dist/cli/ink-cli/components/shared/MarkdownText.js +8 -6
  166. package/dist/cli/ink-cli/containers/InputContainer.d.ts.map +1 -1
  167. package/dist/cli/ink-cli/containers/InputContainer.js +23 -1
  168. package/dist/cli/ink-cli/containers/OverlayContainer.d.ts.map +1 -1
  169. package/dist/cli/ink-cli/containers/OverlayContainer.js +81 -25
  170. package/dist/cli/ink-cli/hooks/useAgentEvents.d.ts +9 -2
  171. package/dist/cli/ink-cli/hooks/useAgentEvents.d.ts.map +1 -1
  172. package/dist/cli/ink-cli/hooks/useAgentEvents.js +148 -6
  173. package/dist/cli/ink-cli/hooks/useCLIState.d.ts +1 -1
  174. package/dist/cli/ink-cli/hooks/useCLIState.d.ts.map +1 -1
  175. package/dist/cli/ink-cli/hooks/useCLIState.js +7 -2
  176. package/dist/cli/ink-cli/hooks/useTokenCounter.d.ts +11 -7
  177. package/dist/cli/ink-cli/hooks/useTokenCounter.d.ts.map +1 -1
  178. package/dist/cli/ink-cli/hooks/useTokenCounter.js +41 -18
  179. package/dist/cli/ink-cli/services/processStream.d.ts.map +1 -1
  180. package/dist/cli/ink-cli/services/processStream.js +97 -17
  181. package/dist/cli/ink-cli/state/types.d.ts +5 -4
  182. package/dist/cli/ink-cli/state/types.d.ts.map +1 -1
  183. package/dist/cli/ink-cli/utils/messageFormatting.d.ts +5 -0
  184. package/dist/cli/ink-cli/utils/messageFormatting.d.ts.map +1 -1
  185. package/dist/cli/ink-cli/utils/messageFormatting.js +59 -1
  186. package/dist/cli/ink-cli/utils/toolUtils.d.ts.map +1 -1
  187. package/dist/cli/ink-cli/utils/toolUtils.js +2 -0
  188. package/dist/cli/utils/api-key-setup.d.ts +54 -4
  189. package/dist/cli/utils/api-key-setup.d.ts.map +1 -1
  190. package/dist/cli/utils/api-key-setup.js +433 -107
  191. package/dist/cli/utils/api-key-verification.d.ts +17 -0
  192. package/dist/cli/utils/api-key-verification.d.ts.map +1 -0
  193. package/dist/cli/utils/api-key-verification.js +211 -0
  194. package/dist/cli/utils/config-validation.d.ts +22 -2
  195. package/dist/cli/utils/config-validation.d.ts.map +1 -1
  196. package/dist/cli/utils/config-validation.js +354 -25
  197. package/dist/cli/utils/local-model-setup.d.ts +46 -0
  198. package/dist/cli/utils/local-model-setup.d.ts.map +1 -0
  199. package/dist/cli/utils/local-model-setup.js +662 -0
  200. package/dist/cli/utils/options.js +1 -1
  201. package/dist/cli/utils/prompt-helpers.d.ts +47 -0
  202. package/dist/cli/utils/prompt-helpers.d.ts.map +1 -0
  203. package/dist/cli/utils/prompt-helpers.js +66 -0
  204. package/dist/cli/utils/provider-setup.d.ts +66 -8
  205. package/dist/cli/utils/provider-setup.d.ts.map +1 -1
  206. package/dist/cli/utils/provider-setup.js +324 -84
  207. package/dist/cli/utils/scaffolding-utils.d.ts +76 -0
  208. package/dist/cli/utils/scaffolding-utils.d.ts.map +1 -0
  209. package/dist/cli/utils/scaffolding-utils.js +246 -0
  210. package/dist/cli/utils/setup-utils.d.ts +16 -0
  211. package/dist/cli/utils/setup-utils.d.ts.map +1 -1
  212. package/dist/cli/utils/setup-utils.js +72 -21
  213. package/dist/cli/utils/template-engine.d.ts +65 -0
  214. package/dist/cli/utils/template-engine.d.ts.map +1 -0
  215. package/dist/cli/utils/template-engine.js +1089 -0
  216. package/dist/config/cli-overrides.d.ts +44 -1
  217. package/dist/config/cli-overrides.d.ts.map +1 -1
  218. package/dist/config/cli-overrides.js +102 -0
  219. package/dist/index.js +339 -56
  220. package/dist/webui/assets/index-8j-KMkX1.js +2054 -0
  221. package/dist/webui/assets/index-c_AX24V4.css +1 -0
  222. package/dist/webui/index.html +3 -9
  223. package/dist/webui/logos/aws-color.svg +1 -0
  224. package/dist/webui/logos/dexto/dexto_logo.svg +1 -1
  225. package/dist/webui/logos/dexto/dexto_logo_light.svg +6 -6
  226. package/dist/webui/logos/glama.svg +7 -0
  227. package/dist/webui/logos/litellm.svg +7 -0
  228. package/dist/webui/logos/openrouter.svg +1 -0
  229. package/package.json +8 -7
  230. package/dist/webui/assets/index-BkwPkZpd.css +0 -1
  231. package/dist/webui/assets/index-D9u1XfyH.js +0 -2025
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Creates a Dexto image project - a distributable agent harness package
3
+ * @param name - Optional name of the image project
4
+ * @returns The absolute path to the created project directory
5
+ */
6
+ export declare function createImage(name?: string): Promise<string>;
7
+ //# sourceMappingURL=create-image.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-image.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/create-image.ts"],"names":[],"mappings":"AAsBA;;;;GAIG;AACH,wBAAsB,WAAW,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAkPhE"}
@@ -0,0 +1,201 @@
1
+ import path from 'path';
2
+ import * as p from '@clack/prompts';
3
+ import chalk from 'chalk';
4
+ import { selectOrExit, textOrExit, confirmOrExit } from '../utils/prompt-helpers.js';
5
+ import { promptForProjectName, createProjectDirectory, setupGitRepo, createGitignore, initPackageJson, createTsconfigForImage, installDependencies, ensureDirectory, } from '../utils/scaffolding-utils.js';
6
+ import { generateDextoImageFile, generateImageReadme, generateExampleTool, } from '../utils/template-engine.js';
7
+ import fs from 'fs-extra';
8
+ import { getExecutionContext } from '@dexto/agent-management';
9
+ /**
10
+ * Creates a Dexto image project - a distributable agent harness package
11
+ * @param name - Optional name of the image project
12
+ * @returns The absolute path to the created project directory
13
+ */
14
+ export async function createImage(name) {
15
+ console.log(chalk.blue('🎨 Creating a Dexto image - a distributable agent harness package\n'));
16
+ // Step 1: Get project name
17
+ const projectName = name
18
+ ? name
19
+ : await promptForProjectName('my-dexto-image', 'What do you want to name your image?');
20
+ // Step 2: Get description
21
+ const description = await textOrExit({
22
+ message: 'Describe your image:',
23
+ placeholder: 'Custom agent harness for my organization',
24
+ defaultValue: 'Custom agent harness for my organization',
25
+ }, 'Image creation cancelled');
26
+ // Step 3: Starting point - new base or extend existing
27
+ const startingPoint = await selectOrExit({
28
+ message: 'Starting point:',
29
+ options: [
30
+ { value: 'base', label: 'New base image (build from scratch)' },
31
+ { value: 'extend', label: 'Extend existing image (add providers to base)' },
32
+ ],
33
+ }, 'Image creation cancelled');
34
+ let baseImage;
35
+ if (startingPoint === 'extend') {
36
+ // Step 4: Which image to extend?
37
+ const baseImageChoice = await selectOrExit({
38
+ message: 'Which image to extend?',
39
+ options: [
40
+ {
41
+ value: '@dexto/image-local',
42
+ label: '@dexto/image-local (local development)',
43
+ },
44
+ { value: '@dexto/image-cloud', label: '@dexto/image-cloud (cloud production)' },
45
+ { value: '@dexto/image-edge', label: '@dexto/image-edge (edge/serverless)' },
46
+ { value: 'custom', label: 'Custom npm package...' },
47
+ ],
48
+ }, 'Image creation cancelled');
49
+ if (baseImageChoice === 'custom') {
50
+ const customBase = await textOrExit({
51
+ message: 'Enter the npm package name:',
52
+ placeholder: '@myorg/image-base',
53
+ validate: (value) => {
54
+ if (!value || value.trim() === '') {
55
+ return 'Package name is required';
56
+ }
57
+ return undefined;
58
+ },
59
+ }, 'Image creation cancelled');
60
+ baseImage = customBase;
61
+ }
62
+ else {
63
+ baseImage = baseImageChoice;
64
+ }
65
+ }
66
+ // Step 5: Target environment
67
+ const target = await selectOrExit({
68
+ message: 'Target environment:',
69
+ options: [
70
+ { value: 'local-development', label: 'Local development' },
71
+ { value: 'cloud-production', label: 'Cloud production' },
72
+ { value: 'edge-serverless', label: 'Edge/serverless' },
73
+ { value: 'custom', label: 'Custom' },
74
+ ],
75
+ }, 'Image creation cancelled');
76
+ // Step 6: Include example providers?
77
+ const includeExamples = await confirmOrExit({
78
+ message: 'Include example tool provider?',
79
+ initialValue: true,
80
+ }, 'Image creation cancelled');
81
+ // Start scaffolding
82
+ const spinner = p.spinner();
83
+ let projectPath;
84
+ try {
85
+ // Save original cwd before changing directories (for resolving relative paths)
86
+ const originalCwd = process.cwd();
87
+ // Create project directory
88
+ projectPath = await createProjectDirectory(projectName, spinner);
89
+ // Change to project directory
90
+ process.chdir(projectPath);
91
+ spinner.start('Setting up project structure...');
92
+ // Create convention-based folders
93
+ await ensureDirectory('tools');
94
+ await ensureDirectory('blob-store');
95
+ await ensureDirectory('compression');
96
+ await ensureDirectory('plugins');
97
+ // Create .gitkeep files for empty directories
98
+ await fs.writeFile('blob-store/.gitkeep', '');
99
+ await fs.writeFile('compression/.gitkeep', '');
100
+ await fs.writeFile('plugins/.gitkeep', '');
101
+ // Create example tool if requested
102
+ if (includeExamples) {
103
+ await ensureDirectory('tools/example-tool');
104
+ const exampleToolCode = generateExampleTool('example-tool');
105
+ await fs.writeFile('tools/example-tool/index.ts', exampleToolCode);
106
+ }
107
+ else {
108
+ await fs.writeFile('tools/.gitkeep', '');
109
+ }
110
+ spinner.message('Generating configuration files...');
111
+ // Create dexto.image.ts
112
+ const dextoImageContent = generateDextoImageFile({
113
+ projectName,
114
+ packageName: projectName,
115
+ description,
116
+ imageName: projectName,
117
+ ...(baseImage ? { baseImage } : {}),
118
+ target,
119
+ });
120
+ await fs.writeFile('dexto.image.ts', dextoImageContent);
121
+ // Create package.json
122
+ await initPackageJson(projectPath, projectName, 'image');
123
+ // Update package.json with build script
124
+ const packageJsonPath = path.join(projectPath, 'package.json');
125
+ const packageJson = JSON.parse(await fs.readFile(packageJsonPath, 'utf8'));
126
+ packageJson.scripts = {
127
+ build: 'dexto-bundle build',
128
+ typecheck: 'tsc --noEmit',
129
+ ...packageJson.scripts,
130
+ };
131
+ await fs.writeFile(packageJsonPath, JSON.stringify(packageJson, null, 2));
132
+ // Create tsconfig.json
133
+ await createTsconfigForImage(projectPath);
134
+ // Create README
135
+ const readmeContent = generateImageReadme({
136
+ projectName,
137
+ packageName: projectName,
138
+ description,
139
+ imageName: projectName,
140
+ ...(baseImage ? { baseImage } : {}),
141
+ });
142
+ await fs.writeFile('README.md', readmeContent);
143
+ // Create .gitignore
144
+ await createGitignore(projectPath, ['*.tsbuildinfo']);
145
+ // Initialize git
146
+ spinner.message('Initializing git repository...');
147
+ await setupGitRepo(projectPath);
148
+ spinner.message('Installing dependencies...');
149
+ // Detect if we're in dexto source - use workspace protocol for local development
150
+ const executionContext = getExecutionContext();
151
+ const isDextoSource = executionContext === 'dexto-source';
152
+ const coreVersion = isDextoSource ? 'workspace:*' : '^1.3.0';
153
+ const bundlerVersion = isDextoSource ? 'workspace:*' : '^1.3.0';
154
+ // Determine dependencies based on whether extending
155
+ const dependencies = [`@dexto/core@${coreVersion}`, 'zod'];
156
+ const devDependencies = [
157
+ 'typescript@^5.0.0',
158
+ '@types/node@^20.0.0',
159
+ `@dexto/image-bundler@${bundlerVersion}`,
160
+ ];
161
+ if (baseImage) {
162
+ // Resolve base image path if we're in dexto source
163
+ let resolvedBaseImage = baseImage;
164
+ if (isDextoSource && baseImage.startsWith('@dexto/image-')) {
165
+ // In dexto source, resolve official images to local workspace packages
166
+ // e.g., @dexto/image-local -> packages/image-local
167
+ const imagePkgName = baseImage.replace('@dexto/', '');
168
+ const imagePkgPath = path.resolve(originalCwd, 'packages', imagePkgName);
169
+ if (await fs.pathExists(imagePkgPath)) {
170
+ resolvedBaseImage = imagePkgPath;
171
+ }
172
+ }
173
+ dependencies.push(resolvedBaseImage);
174
+ }
175
+ // Install dependencies (use pnpm in dexto source for workspace protocol support)
176
+ await installDependencies(projectPath, {
177
+ dependencies,
178
+ devDependencies,
179
+ }, isDextoSource ? 'pnpm' : undefined);
180
+ spinner.stop(chalk.green(`✓ Successfully created image: ${projectName}`));
181
+ console.log(`\n${chalk.cyan('Next steps:')}`);
182
+ console.log(` ${chalk.gray('$')} cd ${projectName}`);
183
+ console.log(` ${chalk.gray('$')} pnpm run build`);
184
+ console.log(`\n${chalk.gray('Add your custom providers to the convention-based folders:')}`);
185
+ console.log(` ${chalk.gray('tools/')} - Custom tool providers`);
186
+ console.log(` ${chalk.gray('blob-store/')} - Blob storage providers`);
187
+ console.log(` ${chalk.gray('compression/')} - Compression strategies`);
188
+ console.log(` ${chalk.gray('plugins/')} - Plugin providers`);
189
+ console.log(`\n${chalk.gray('Learn more:')} https://docs.dexto.ai/docs/guides/images\n`);
190
+ }
191
+ catch (error) {
192
+ if (spinner) {
193
+ spinner.stop(chalk.red('✗ Failed to create image'));
194
+ }
195
+ throw error;
196
+ }
197
+ if (!projectPath) {
198
+ throw new Error('Failed to create project directory');
199
+ }
200
+ return projectPath;
201
+ }
@@ -18,9 +18,9 @@ export function formatSessionInfo(sessionId, metadata, isCurrent = false) {
18
18
  const activity = metadata.lastActivity && metadata.lastActivity > 0
19
19
  ? new Date(metadata.lastActivity).toLocaleString()
20
20
  : 'Never';
21
- info += chalk.dim(` (${messages} messages, last: ${activity})`);
21
+ info += chalk.gray(` (${messages} messages, last: ${activity})`);
22
22
  if (isCurrent) {
23
- info += chalk.yellow(' [ACTIVE]');
23
+ info += chalk.rgb(255, 165, 0)(' [ACTIVE]');
24
24
  }
25
25
  }
26
26
  return info;
@@ -32,7 +32,7 @@ export function formatHistoryMessage(message, index) {
32
32
  const timestamp = message.timestamp
33
33
  ? new Date(message.timestamp).toLocaleTimeString()
34
34
  : `#${index + 1}`;
35
- let roleColor = chalk.dim;
35
+ let roleColor = chalk.gray;
36
36
  let displayLabel = message.role;
37
37
  switch (message.role) {
38
38
  case 'user':
@@ -44,11 +44,11 @@ export function formatHistoryMessage(message, index) {
44
44
  displayLabel = 'Assistant';
45
45
  break;
46
46
  case 'system':
47
- roleColor = chalk.yellow;
47
+ roleColor = chalk.rgb(255, 165, 0);
48
48
  displayLabel = 'System';
49
49
  break;
50
50
  case 'tool':
51
- roleColor = chalk.magenta;
51
+ roleColor = chalk.green;
52
52
  displayLabel = 'Tool';
53
53
  break;
54
54
  }
@@ -87,7 +87,7 @@ export function formatHistoryMessage(message, index) {
87
87
  const toolNames = message.toolCalls
88
88
  .map((tc) => tc.function?.name || 'unknown')
89
89
  .join(', ');
90
- toolInfo = chalk.dim(` [Tools: ${toolNames}]`);
90
+ toolInfo = chalk.gray(` [Tools: ${toolNames}]`);
91
91
  }
92
- return ` ${chalk.dim(timestamp)} ${roleColor.bold(displayLabel)}: ${content}${toolInfo}`;
92
+ return ` ${chalk.gray(timestamp)} ${roleColor.bold(displayLabel)}: ${content}${toolInfo}`;
93
93
  }
@@ -1,4 +1,5 @@
1
- export { createDextoProject, createTsconfigJson, addDextoScriptsToPackageJson, postCreateDexto, } from './create-app.js';
1
+ export { createDextoProject, type CreateAppOptions } from './create-app.js';
2
+ export { createImage } from './create-image.js';
2
3
  export { getUserInputToInitDextoApp, initDexto, postInitDexto } from './init-app.js';
3
4
  export { handleSetupCommand, type CLISetupOptions, type CLISetupOptionsInput } from './setup.js';
4
5
  export { handleInstallCommand, type InstallCommandOptions } from './install.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACH,kBAAkB,EAClB,kBAAkB,EAClB,4BAA4B,EAC5B,eAAe,GAClB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,0BAA0B,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAErF,OAAO,EAAE,kBAAkB,EAAE,KAAK,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,YAAY,CAAC;AACjG,OAAO,EAAE,oBAAoB,EAAE,KAAK,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAChF,OAAO,EAAE,sBAAsB,EAAE,KAAK,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AACtF,OAAO,EACH,uBAAuB,EACvB,KAAK,wBAAwB,EAC7B,KAAK,6BAA6B,GACrC,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,KAAK,mBAAmB,EAAE,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAE5E,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,0BAA0B,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAErF,OAAO,EAAE,kBAAkB,EAAE,KAAK,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,YAAY,CAAC;AACjG,OAAO,EAAE,oBAAoB,EAAE,KAAK,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAChF,OAAO,EAAE,sBAAsB,EAAE,KAAK,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AACtF,OAAO,EACH,uBAAuB,EACvB,KAAK,wBAAwB,EAC7B,KAAK,6BAA6B,GACrC,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,KAAK,mBAAmB,EAAE,MAAM,YAAY,CAAC"}
@@ -1,6 +1,7 @@
1
1
  // packages/cli/src/cli/commands/index.ts
2
2
  // Project setup commands
3
- export { createDextoProject, createTsconfigJson, addDextoScriptsToPackageJson, postCreateDexto, } from './create-app.js';
3
+ export { createDextoProject } from './create-app.js';
4
+ export { createImage } from './create-image.js';
4
5
  export { getUserInputToInitDextoApp, initDexto, postInitDexto } from './init-app.js';
5
6
  export { handleSetupCommand } from './setup.js';
6
7
  export { handleInstallCommand } from './install.js';
@@ -103,7 +103,7 @@ export async function initDexto(directory, createExampleFile = true, llmProvider
103
103
  installError instanceof Error &&
104
104
  /\bERR_PNPM_ADDING_TO_ROOT\b/.test(installError.message)) {
105
105
  spinner.stop(chalk.red('Error: Cannot install in pnpm workspace root'));
106
- p.note('You are initializing dexto in a pnpm workspace root. Go to a specific workspace package and run "pnpm add @dexto/core" there.', chalk.yellow('Workspace Error'));
106
+ p.note('You are initializing dexto in a pnpm workspace root. Go to a specific workspace package and run "pnpm add @dexto/core" there.', chalk.rgb(255, 165, 0)('Workspace Error'));
107
107
  process.exit(1);
108
108
  }
109
109
  throw installError; // Re-throw other errors
@@ -135,7 +135,7 @@ export async function initDexto(directory, createExampleFile = true, llmProvider
135
135
  catch (configError) {
136
136
  spinner.stop(chalk.red('Failed to create agent config file'));
137
137
  logger.error(`Config creation error: ${configError}`);
138
- throw new Error(`Failed to create default-agent.yml: ${configError instanceof Error ? configError.message : String(configError)}`);
138
+ throw new Error(`Failed to create coding-agent.yml: ${configError instanceof Error ? configError.message : String(configError)}`);
139
139
  }
140
140
  // update dexto config file based on llmProvider
141
141
  if (llmProvider) {
@@ -168,11 +168,11 @@ export async function postInitDexto(directory) {
168
168
  const nextSteps = [
169
169
  `1. Run the example: ${chalk.cyan(`node --loader ts-node/esm ${path.join(directory, 'dexto', 'dexto-example.ts')}`)}`,
170
170
  `2. Add/update your API key(s) in ${chalk.cyan('.env')}`,
171
- `3. Check out the agent configuration file ${chalk.cyan(path.join(directory, 'dexto', 'agents', 'default-agent.yml'))}`,
172
- `4. Try out different LLMs and MCP servers in the default-agent.yml file`,
171
+ `3. Check out the agent configuration file ${chalk.cyan(path.join(directory, 'dexto', 'agents', 'coding-agent.yml'))}`,
172
+ `4. Try out different LLMs and MCP servers in the coding-agent.yml file`,
173
173
  `5. Read more about Dexto: ${chalk.cyan('https://github.com/truffle-ai/dexto')}`,
174
174
  ].join('\n');
175
- p.note(nextSteps, chalk.yellow('Next steps:'));
175
+ p.note(nextSteps, chalk.rgb(255, 165, 0)('Next steps:'));
176
176
  }
177
177
  /**
178
178
  * Creates the dexto directories (dexto, dexto/agents) in the given directory.
@@ -215,7 +215,7 @@ export async function createDextoConfigFile(directory) {
215
215
  throw new Error(`Template file not found at: ${templateConfigSrc}. This indicates a build issue - the template should be included in the package.`);
216
216
  }
217
217
  // Path to the destination config file
218
- const destConfigPath = path.join(directory, 'default-agent.yml');
218
+ const destConfigPath = path.join(directory, 'coding-agent.yml');
219
219
  logger.debug(`Copying template to: ${destConfigPath}`);
220
220
  // Copy the config file from the Dexto package
221
221
  await fsExtra.copy(templateConfigSrc, destConfigPath);
@@ -235,7 +235,7 @@ export async function createDextoConfigFile(directory) {
235
235
  export async function createDextoExampleFile(directory) {
236
236
  // Extract the base directory from the given path (e.g., "src" from "src/dexto")
237
237
  const baseDir = path.dirname(directory);
238
- const configPath = `./${path.posix.join(baseDir, 'dexto/agents/default-agent.yml')}`;
238
+ const configPath = `./${path.posix.join(baseDir, 'dexto/agents/coding-agent.yml')}`;
239
239
  const indexTsLines = [
240
240
  "import 'dotenv/config';",
241
241
  "import { DextoAgent, loadAgentConfig } from '@dexto/core';",
@@ -2,18 +2,15 @@ import { z } from 'zod';
2
2
  declare const InstallCommandSchema: z.ZodObject<{
3
3
  agents: z.ZodArray<z.ZodString, "many">;
4
4
  all: z.ZodDefault<z.ZodBoolean>;
5
- injectPreferences: z.ZodDefault<z.ZodBoolean>;
6
5
  force: z.ZodDefault<z.ZodBoolean>;
7
6
  }, "strict", z.ZodTypeAny, {
8
7
  all: boolean;
9
8
  agents: string[];
10
9
  force: boolean;
11
- injectPreferences: boolean;
12
10
  }, {
13
11
  agents: string[];
14
12
  all?: boolean | undefined;
15
13
  force?: boolean | undefined;
16
- injectPreferences?: boolean | undefined;
17
14
  }>;
18
15
  export type InstallCommandOptions = z.output<typeof InstallCommandSchema>;
19
16
  export declare function handleInstallCommand(agents: string[], options: Partial<InstallCommandOptions>): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/install.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,QAAA,MAAM,oBAAoB;;;;;;;;;;;;;;;EAOb,CAAC;AAEd,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAgL1E,wBAAsB,oBAAoB,CACtC,MAAM,EAAE,MAAM,EAAE,EAChB,OAAO,EAAE,OAAO,CAAC,qBAAqB,CAAC,GACxC,OAAO,CAAC,IAAI,CAAC,CAqLf"}
1
+ {"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/install.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,QAAA,MAAM,oBAAoB;;;;;;;;;;;;EAMb,CAAC;AAEd,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAwK1E,wBAAsB,oBAAoB,CACtC,MAAM,EAAE,MAAM,EAAE,EAChB,OAAO,EAAE,OAAO,CAAC,qBAAqB,CAAC,GACxC,OAAO,CAAC,IAAI,CAAC,CAuKf"}
@@ -4,6 +4,7 @@ import path from 'path';
4
4
  import { z } from 'zod';
5
5
  import * as p from '@clack/prompts';
6
6
  import { getDextoGlobalPath, loadBundledRegistryAgents } from '@dexto/agent-management';
7
+ import { textOrExit } from '../utils/prompt-helpers.js';
7
8
  import { installBundledAgent, installCustomAgent } from '../../utils/agent-helpers.js';
8
9
  import { capture } from '../../analytics/index.js';
9
10
  // Zod schema for install command validation
@@ -11,7 +12,6 @@ const InstallCommandSchema = z
11
12
  .object({
12
13
  agents: z.array(z.string().min(1, 'Agent name cannot be empty')),
13
14
  all: z.boolean().default(false),
14
- injectPreferences: z.boolean().default(true),
15
15
  force: z.boolean().default(false),
16
16
  })
17
17
  .strict();
@@ -54,7 +54,7 @@ function extractAgentNameFromPath(filePath) {
54
54
  */
55
55
  async function promptForMetadata(suggestedName) {
56
56
  p.intro('📝 Custom Agent Installation');
57
- const agentName = (await p.text({
57
+ const agentName = await textOrExit({
58
58
  message: 'Agent name:',
59
59
  placeholder: suggestedName,
60
60
  defaultValue: suggestedName,
@@ -67,12 +67,8 @@ async function promptForMetadata(suggestedName) {
67
67
  }
68
68
  return undefined;
69
69
  },
70
- }));
71
- if (p.isCancel(agentName)) {
72
- p.cancel('Installation cancelled');
73
- process.exit(0);
74
- }
75
- const description = (await p.text({
70
+ }, 'Installation cancelled');
71
+ const description = await textOrExit({
76
72
  message: 'Description:',
77
73
  placeholder: 'A custom agent for...',
78
74
  validate: (value) => {
@@ -81,12 +77,8 @@ async function promptForMetadata(suggestedName) {
81
77
  }
82
78
  return undefined;
83
79
  },
84
- }));
85
- if (p.isCancel(description)) {
86
- p.cancel('Installation cancelled');
87
- process.exit(0);
88
- }
89
- const author = (await p.text({
80
+ }, 'Installation cancelled');
81
+ const author = await textOrExit({
90
82
  message: 'Author:',
91
83
  placeholder: 'Your Name',
92
84
  validate: (value) => {
@@ -95,20 +87,12 @@ async function promptForMetadata(suggestedName) {
95
87
  }
96
88
  return undefined;
97
89
  },
98
- }));
99
- if (p.isCancel(author)) {
100
- p.cancel('Installation cancelled');
101
- process.exit(0);
102
- }
103
- const tagsInput = (await p.text({
90
+ }, 'Installation cancelled');
91
+ const tagsInput = await textOrExit({
104
92
  message: 'Tags (comma-separated):',
105
93
  placeholder: 'custom, coding, productivity',
106
94
  defaultValue: 'custom',
107
- }));
108
- if (p.isCancel(tagsInput)) {
109
- p.cancel('Installation cancelled');
110
- process.exit(0);
111
- }
95
+ }, 'Installation cancelled');
112
96
  const tags = tagsInput
113
97
  .split(',')
114
98
  .map((tag) => tag.trim())
@@ -201,7 +185,6 @@ export async function handleInstallCommand(agents, options) {
201
185
  status: 'skipped',
202
186
  reason: 'already_installed',
203
187
  force: validated.force,
204
- injectPreferences: validated.injectPreferences,
205
188
  });
206
189
  continue;
207
190
  }
@@ -211,8 +194,6 @@ export async function handleInstallCommand(agents, options) {
211
194
  description: metadata.description,
212
195
  author: metadata.author,
213
196
  tags: metadata.tags,
214
- }, {
215
- injectPreferences: validated.injectPreferences,
216
197
  });
217
198
  successCount++;
218
199
  console.log(`✅ ${metadata.agentName} installed successfully`);
@@ -222,7 +203,6 @@ export async function handleInstallCommand(agents, options) {
222
203
  agent: metadata.agentName,
223
204
  status: 'installed',
224
205
  force: validated.force,
225
- injectPreferences: validated.injectPreferences,
226
206
  });
227
207
  }
228
208
  else {
@@ -239,13 +219,10 @@ export async function handleInstallCommand(agents, options) {
239
219
  status: 'skipped',
240
220
  reason: 'already_installed',
241
221
  force: validated.force,
242
- injectPreferences: validated.injectPreferences,
243
222
  });
244
223
  continue;
245
224
  }
246
- await installBundledAgent(agentInput, {
247
- injectPreferences: validated.injectPreferences,
248
- });
225
+ await installBundledAgent(agentInput);
249
226
  successCount++;
250
227
  console.log(`✅ ${agentInput} installed successfully`);
251
228
  installed.push(agentInput);
@@ -253,7 +230,6 @@ export async function handleInstallCommand(agents, options) {
253
230
  agent: agentInput,
254
231
  status: 'installed',
255
232
  force: validated.force,
256
- injectPreferences: validated.injectPreferences,
257
233
  });
258
234
  }
259
235
  }
@@ -270,7 +246,6 @@ export async function handleInstallCommand(agents, options) {
270
246
  status: 'failed',
271
247
  error_message: error instanceof Error ? error.message : String(error),
272
248
  force: validated.force,
273
- injectPreferences: validated.injectPreferences,
274
249
  });
275
250
  }
276
251
  }
@@ -31,7 +31,7 @@ export interface CommandDefinition {
31
31
  handler: (args: string[], agent: DextoAgent, ctx: CommandContext) => Promise<CommandHandlerResult>;
32
32
  }
33
33
  /**
34
- * Parses user input to determine if it's a slash command or a regular prompt
34
+ * Parses user input to determine if it's a slash command, shell command, or regular prompt
35
35
  */
36
36
  export declare function parseInput(input: string): CommandResult;
37
37
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"command-parser.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/interactive-commands/command-parser.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAEhG,MAAM,WAAW,aAAa;IAC1B,IAAI,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,oBAAoB,GAAG,OAAO,GAAG,MAAM,GAAG,YAAY,GAAG,iBAAiB,CAAC;AAEvF;;GAEG;AACH,MAAM,WAAW,cAAc;IAC3B,uDAAuD;IACvD,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,MAAM,WAAW,iBAAiB;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,WAAW,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAClC,OAAO,EAAE,CACL,IAAI,EAAE,MAAM,EAAE,EACd,KAAK,EAAE,UAAU,EACjB,GAAG,EAAE,cAAc,KAClB,OAAO,CAAC,oBAAoB,CAAC,CAAC;CACtC;AA4CD;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,CAsBvD;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,iBAAiB,EAAE,GAAG,MAAM,EAAE,CAoB9F;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,iBAAiB,EAAE,QAAQ,GAAE,OAAe,GAAG,MAAM,CAmB3F;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,iBAAiB,EAAE,GAAG,IAAI,CAuDtE"}
1
+ {"version":3,"file":"command-parser.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/interactive-commands/command-parser.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAEhG,MAAM,WAAW,aAAa;IAC1B,IAAI,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,oBAAoB,GAAG,OAAO,GAAG,MAAM,GAAG,YAAY,GAAG,iBAAiB,CAAC;AAEvF;;GAEG;AACH,MAAM,WAAW,cAAc;IAC3B,uDAAuD;IACvD,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,MAAM,WAAW,iBAAiB;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,WAAW,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAClC,OAAO,EAAE,CACL,IAAI,EAAE,MAAM,EAAE,EACd,KAAK,EAAE,UAAU,EACjB,GAAG,EAAE,cAAc,KAClB,OAAO,CAAC,oBAAoB,CAAC,CAAC;CACtC;AA4CD;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,CAiCvD;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,iBAAiB,EAAE,GAAG,MAAM,EAAE,CAoB9F;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,iBAAiB,EAAE,QAAQ,GAAE,OAAe,GAAG,MAAM,CAmB3F;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,iBAAiB,EAAE,GAAG,IAAI,CAuDtE"}
@@ -41,10 +41,20 @@ function parseQuotedArguments(input) {
41
41
  return args.filter((arg) => arg.length > 0);
42
42
  }
43
43
  /**
44
- * Parses user input to determine if it's a slash command or a regular prompt
44
+ * Parses user input to determine if it's a slash command, shell command, or regular prompt
45
45
  */
46
46
  export function parseInput(input) {
47
47
  const trimmed = input.trim();
48
+ // Check if it's a shell command (! prefix)
49
+ if (trimmed.startsWith('!')) {
50
+ const shellCommand = trimmed.slice(1).trim();
51
+ return {
52
+ type: 'command',
53
+ command: 'shell',
54
+ args: [shellCommand],
55
+ rawInput: trimmed,
56
+ };
57
+ }
48
58
  // Check if it's a slash command
49
59
  if (trimmed.startsWith('/')) {
50
60
  const args = parseQuotedArguments(trimmed.slice(1));
@@ -90,12 +100,12 @@ export function getCommandSuggestions(partial, commands) {
90
100
  export function formatCommandHelp(cmd, detailed = false) {
91
101
  let help = chalk.cyan(`/${cmd.name}`) + ' - ' + cmd.description;
92
102
  if (detailed) {
93
- help += '\n' + chalk.dim(`Usage: ${cmd.usage}`);
103
+ help += '\n' + chalk.gray(`Usage: ${cmd.usage}`);
94
104
  if (cmd.aliases && cmd.aliases.length > 0) {
95
- help += '\n' + chalk.dim(`Aliases: ${cmd.aliases.map((a) => `/${a}`).join(', ')}`);
105
+ help += '\n' + chalk.gray(`Aliases: ${cmd.aliases.map((a) => `/${a}`).join(', ')}`);
96
106
  }
97
107
  if (cmd.subcommands && cmd.subcommands.length > 0) {
98
- help += '\n' + chalk.dim('Subcommands:');
108
+ help += '\n' + chalk.gray('Subcommands:');
99
109
  for (const sub of cmd.subcommands) {
100
110
  help += '\n ' + chalk.cyan(`/${cmd.name} ${sub.name}`) + ' - ' + sub.description;
101
111
  }
@@ -135,7 +145,7 @@ export function displayAllCommands(commands) {
135
145
  for (const category of categoryOrder) {
136
146
  const cmds = categories[category];
137
147
  if (cmds && cmds.length > 0) {
138
- console.log(chalk.bold.yellow(`${category}:`));
148
+ console.log(chalk.bold.rgb(255, 165, 0)(`${category}:`));
139
149
  for (const cmd of cmds) {
140
150
  console.log(' ' + formatCommandHelp(cmd));
141
151
  }
@@ -145,13 +155,13 @@ export function displayAllCommands(commands) {
145
155
  // Display any uncategorized commands (fallback)
146
156
  for (const [category, cmds] of Object.entries(categories)) {
147
157
  if (!categoryOrder.includes(category) && cmds.length > 0) {
148
- console.log(chalk.bold.yellow(`${category}:`));
158
+ console.log(chalk.bold.rgb(255, 165, 0)(`${category}:`));
149
159
  for (const cmd of cmds) {
150
160
  console.log(' ' + formatCommandHelp(cmd));
151
161
  }
152
162
  console.log();
153
163
  }
154
164
  }
155
- console.log(chalk.dim('💡 Tip: Use /help <command> for detailed help on any command'));
156
- console.log(chalk.dim('💡 Tip: Type your message normally (without /) to chat with the AI\n'));
165
+ console.log(chalk.gray('💡 Tip: Use /help <command> for detailed help on any command'));
166
+ console.log(chalk.gray('💡 Tip: Type your message normally (without /) to chat with the AI\n'));
157
167
  }
@@ -1 +1 @@
1
- {"version":3,"file":"general-commands.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/interactive-commands/general-commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,KAAK,EAAE,iBAAiB,EAAwC,MAAM,qBAAqB,CAAC;AAMnG;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,cAAc,EAAE,MAAM,iBAAiB,EAAE,GAAG,iBAAiB,CAgC9F;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,iBAAiB,EAiM9C,CAAC"}
1
+ {"version":3,"file":"general-commands.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/interactive-commands/general-commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,OAAO,KAAK,EAAE,iBAAiB,EAAwC,MAAM,qBAAqB,CAAC;AAiDnG;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,cAAc,EAAE,MAAM,iBAAiB,EAAE,GAAG,iBAAiB,CAgC9F;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,iBAAiB,EAyO9C,CAAC"}