dexto 1.4.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +62 -7
- package/dist/agents/agent-template.yml +2 -2
- package/dist/agents/coding-agent/coding-agent.yml +22 -16
- package/dist/agents/database-agent/database-agent.yml +2 -2
- package/dist/agents/default-agent.yml +7 -5
- package/dist/agents/github-agent/github-agent.yml +2 -2
- package/dist/agents/product-name-researcher/product-name-researcher.yml +2 -2
- package/dist/agents/talk2pdf-agent/talk2pdf-agent.yml +2 -2
- package/dist/analytics/events.d.ts +13 -6
- package/dist/analytics/events.d.ts.map +1 -1
- package/dist/analytics/index.d.ts +1 -1
- package/dist/analytics/index.d.ts.map +1 -1
- package/dist/analytics/index.js +6 -2
- package/dist/api/server-hono.d.ts.map +1 -1
- package/dist/api/server-hono.js +27 -5
- package/dist/cli/cli-subscriber.d.ts +4 -0
- package/dist/cli/cli-subscriber.d.ts.map +1 -1
- package/dist/cli/cli-subscriber.js +40 -2
- package/dist/cli/commands/create-app.d.ts +16 -14
- package/dist/cli/commands/create-app.d.ts.map +1 -1
- package/dist/cli/commands/create-app.js +626 -102
- package/dist/cli/commands/create-image.d.ts +7 -0
- package/dist/cli/commands/create-image.d.ts.map +1 -0
- package/dist/cli/commands/create-image.js +201 -0
- package/dist/cli/commands/helpers/formatters.js +7 -7
- package/dist/cli/commands/index.d.ts +2 -1
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/index.js +2 -1
- package/dist/cli/commands/init-app.js +7 -7
- package/dist/cli/commands/install.d.ts +0 -3
- package/dist/cli/commands/install.d.ts.map +1 -1
- package/dist/cli/commands/install.js +10 -35
- package/dist/cli/commands/interactive-commands/command-parser.js +7 -7
- package/dist/cli/commands/interactive-commands/general-commands.js +1 -1
- package/dist/cli/commands/interactive-commands/prompt-commands.js +11 -11
- package/dist/cli/commands/interactive-commands/system/system-commands.js +3 -3
- package/dist/cli/commands/list-agents.js +2 -2
- package/dist/cli/commands/session-commands.js +16 -16
- package/dist/cli/commands/setup.d.ts +13 -5
- package/dist/cli/commands/setup.d.ts.map +1 -1
- package/dist/cli/commands/setup.js +860 -65
- package/dist/cli/commands/which.js +1 -1
- package/dist/cli/ink-cli/components/ApprovalPrompt.d.ts +2 -0
- package/dist/cli/ink-cli/components/ApprovalPrompt.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/ApprovalPrompt.js +29 -7
- package/dist/cli/ink-cli/components/CustomInput.js +1 -1
- package/dist/cli/ink-cli/components/EditableMultiLineInput.js +4 -4
- package/dist/cli/ink-cli/components/ElicitationForm.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/ElicitationForm.js +6 -6
- package/dist/cli/ink-cli/components/ErrorBoundary.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/ErrorBoundary.js +1 -1
- package/dist/cli/ink-cli/components/Footer.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/Footer.js +1 -1
- package/dist/cli/ink-cli/components/HistorySearchBar.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/HistorySearchBar.js +1 -1
- package/dist/cli/ink-cli/components/MultiLineInput.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/MultiLineInput.js +3 -3
- package/dist/cli/ink-cli/components/ResourceAutocomplete.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/ResourceAutocomplete.js +4 -4
- package/dist/cli/ink-cli/components/SlashCommandAutocomplete.js +3 -3
- package/dist/cli/ink-cli/components/StatusBar.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/StatusBar.js +7 -5
- package/dist/cli/ink-cli/components/TextBufferInput.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/TextBufferInput.js +6 -6
- package/dist/cli/ink-cli/components/base/BaseAutocomplete.js +4 -4
- package/dist/cli/ink-cli/components/base/BaseSelector.js +2 -2
- package/dist/cli/ink-cli/components/chat/Footer.js +1 -1
- package/dist/cli/ink-cli/components/chat/Header.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/chat/Header.js +2 -4
- package/dist/cli/ink-cli/components/chat/MessageItem.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/chat/MessageItem.js +5 -5
- package/dist/cli/ink-cli/components/chat/MessageList.js +1 -1
- package/dist/cli/ink-cli/components/chat/QueuedMessagesDisplay.js +1 -1
- package/dist/cli/ink-cli/components/chat/ToolIcon.d.ts +1 -1
- package/dist/cli/ink-cli/components/chat/ToolIcon.js +4 -4
- package/dist/cli/ink-cli/components/chat/styled-boxes/ConfigBox.js +1 -1
- package/dist/cli/ink-cli/components/chat/styled-boxes/HelpBox.js +1 -1
- package/dist/cli/ink-cli/components/chat/styled-boxes/LogConfigBox.js +2 -2
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionHistoryBox.js +5 -5
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionListBox.js +2 -2
- package/dist/cli/ink-cli/components/chat/styled-boxes/ShortcutsBox.js +1 -1
- package/dist/cli/ink-cli/components/chat/styled-boxes/StatsBox.js +1 -1
- package/dist/cli/ink-cli/components/chat/styled-boxes/StyledBox.js +2 -2
- package/dist/cli/ink-cli/components/modes/AlternateBufferCLI.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/modes/AlternateBufferCLI.js +1 -1
- package/dist/cli/ink-cli/components/modes/StaticCLI.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/modes/StaticCLI.js +1 -1
- package/dist/cli/ink-cli/components/overlays/ApiKeyInput.js +1 -1
- package/dist/cli/ink-cli/components/overlays/CustomModelWizard.d.ts +10 -2
- package/dist/cli/ink-cli/components/overlays/CustomModelWizard.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/overlays/CustomModelWizard.js +198 -89
- package/dist/cli/ink-cli/components/overlays/LogLevelSelector.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/overlays/LogLevelSelector.js +2 -2
- package/dist/cli/ink-cli/components/overlays/McpAddChoice.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/overlays/McpAddChoice.js +1 -1
- package/dist/cli/ink-cli/components/overlays/McpAddSelector.js +1 -1
- package/dist/cli/ink-cli/components/overlays/McpCustomTypeSelector.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/overlays/McpCustomTypeSelector.js +2 -2
- package/dist/cli/ink-cli/components/overlays/McpCustomWizard.js +1 -1
- package/dist/cli/ink-cli/components/overlays/McpRemoveSelector.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/overlays/McpRemoveSelector.js +1 -1
- package/dist/cli/ink-cli/components/overlays/McpSelector.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/overlays/McpSelector.js +1 -1
- package/dist/cli/ink-cli/components/overlays/McpServerActions.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/overlays/McpServerActions.js +2 -2
- package/dist/cli/ink-cli/components/overlays/McpServerList.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/overlays/McpServerList.js +1 -1
- package/dist/cli/ink-cli/components/overlays/ModelSelectorRefactored.d.ts +5 -5
- package/dist/cli/ink-cli/components/overlays/ModelSelectorRefactored.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/overlays/ModelSelectorRefactored.js +222 -68
- package/dist/cli/ink-cli/components/overlays/PromptAddChoice.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/overlays/PromptAddChoice.js +2 -2
- package/dist/cli/ink-cli/components/overlays/PromptAddWizard.js +1 -1
- package/dist/cli/ink-cli/components/overlays/PromptDeleteSelector.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/overlays/PromptDeleteSelector.js +2 -2
- package/dist/cli/ink-cli/components/overlays/PromptList.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/overlays/PromptList.js +2 -2
- package/dist/cli/ink-cli/components/overlays/SearchOverlay.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/overlays/SearchOverlay.js +4 -4
- package/dist/cli/ink-cli/components/overlays/SessionSubcommandSelector.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/overlays/SessionSubcommandSelector.js +1 -1
- package/dist/cli/ink-cli/components/overlays/StreamSelector.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/overlays/StreamSelector.js +1 -1
- package/dist/cli/ink-cli/components/overlays/ToolBrowser.js +12 -12
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/LocalModelWizard.d.ts +25 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/LocalModelWizard.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/LocalModelWizard.js +609 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/index.d.ts +15 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/index.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/index.js +14 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/provider-config.d.ts +33 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/provider-config.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/provider-config.js +419 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ApiKeyStep.d.ts +25 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ApiKeyStep.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ApiKeyStep.js +29 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ProviderSelector.d.ts +17 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ProviderSelector.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ProviderSelector.js +11 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/SetupInfoBanner.d.ts +20 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/SetupInfoBanner.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/SetupInfoBanner.js +10 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/WizardStepInput.d.ts +30 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/WizardStepInput.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/WizardStepInput.js +13 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/index.d.ts +8 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/index.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/index.js +7 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/types.d.ts +79 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/types.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/types.js +38 -0
- package/dist/cli/ink-cli/components/renderers/DiffRenderer.js +2 -2
- package/dist/cli/ink-cli/components/renderers/FilePreviewRenderer.js +1 -1
- package/dist/cli/ink-cli/components/renderers/FileRenderer.js +4 -4
- package/dist/cli/ink-cli/components/renderers/GenericRenderer.js +2 -2
- package/dist/cli/ink-cli/components/renderers/SearchRenderer.js +1 -1
- package/dist/cli/ink-cli/components/renderers/ShellRenderer.js +3 -3
- package/dist/cli/ink-cli/components/renderers/diff-shared.js +1 -1
- package/dist/cli/ink-cli/components/shared/MarkdownText.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/shared/MarkdownText.js +8 -6
- package/dist/cli/ink-cli/containers/InputContainer.d.ts.map +1 -1
- package/dist/cli/ink-cli/containers/InputContainer.js +23 -1
- package/dist/cli/ink-cli/containers/OverlayContainer.d.ts.map +1 -1
- package/dist/cli/ink-cli/containers/OverlayContainer.js +80 -24
- package/dist/cli/ink-cli/hooks/useAgentEvents.d.ts +1 -1
- package/dist/cli/ink-cli/hooks/useAgentEvents.d.ts.map +1 -1
- package/dist/cli/ink-cli/hooks/useAgentEvents.js +5 -1
- package/dist/cli/ink-cli/hooks/useCLIState.d.ts +1 -1
- package/dist/cli/ink-cli/hooks/useCLIState.d.ts.map +1 -1
- package/dist/cli/ink-cli/hooks/useCLIState.js +4 -2
- package/dist/cli/ink-cli/services/processStream.d.ts.map +1 -1
- package/dist/cli/ink-cli/services/processStream.js +77 -9
- package/dist/cli/ink-cli/state/types.d.ts +3 -2
- package/dist/cli/ink-cli/state/types.d.ts.map +1 -1
- package/dist/cli/ink-cli/utils/messageFormatting.d.ts +5 -0
- package/dist/cli/ink-cli/utils/messageFormatting.d.ts.map +1 -1
- package/dist/cli/ink-cli/utils/messageFormatting.js +59 -1
- package/dist/cli/ink-cli/utils/toolUtils.d.ts.map +1 -1
- package/dist/cli/ink-cli/utils/toolUtils.js +2 -0
- package/dist/cli/utils/api-key-setup.d.ts +54 -4
- package/dist/cli/utils/api-key-setup.d.ts.map +1 -1
- package/dist/cli/utils/api-key-setup.js +433 -107
- package/dist/cli/utils/api-key-verification.d.ts +17 -0
- package/dist/cli/utils/api-key-verification.d.ts.map +1 -0
- package/dist/cli/utils/api-key-verification.js +211 -0
- package/dist/cli/utils/config-validation.d.ts +22 -2
- package/dist/cli/utils/config-validation.d.ts.map +1 -1
- package/dist/cli/utils/config-validation.js +354 -25
- package/dist/cli/utils/local-model-setup.d.ts +46 -0
- package/dist/cli/utils/local-model-setup.d.ts.map +1 -0
- package/dist/cli/utils/local-model-setup.js +662 -0
- package/dist/cli/utils/options.js +1 -1
- package/dist/cli/utils/prompt-helpers.d.ts +47 -0
- package/dist/cli/utils/prompt-helpers.d.ts.map +1 -0
- package/dist/cli/utils/prompt-helpers.js +66 -0
- package/dist/cli/utils/provider-setup.d.ts +66 -8
- package/dist/cli/utils/provider-setup.d.ts.map +1 -1
- package/dist/cli/utils/provider-setup.js +324 -84
- package/dist/cli/utils/scaffolding-utils.d.ts +76 -0
- package/dist/cli/utils/scaffolding-utils.d.ts.map +1 -0
- package/dist/cli/utils/scaffolding-utils.js +246 -0
- package/dist/cli/utils/setup-utils.d.ts +16 -0
- package/dist/cli/utils/setup-utils.d.ts.map +1 -1
- package/dist/cli/utils/setup-utils.js +72 -21
- package/dist/cli/utils/template-engine.d.ts +65 -0
- package/dist/cli/utils/template-engine.d.ts.map +1 -0
- package/dist/cli/utils/template-engine.js +1089 -0
- package/dist/config/cli-overrides.d.ts +44 -1
- package/dist/config/cli-overrides.d.ts.map +1 -1
- package/dist/config/cli-overrides.js +102 -0
- package/dist/index.js +315 -53
- package/dist/webui/assets/index-8j-KMkX1.js +2054 -0
- package/dist/webui/assets/index-c_AX24V4.css +1 -0
- package/dist/webui/index.html +3 -9
- package/dist/webui/logos/aws-color.svg +1 -0
- package/dist/webui/logos/dexto/dexto_logo.svg +1 -1
- package/dist/webui/logos/dexto/dexto_logo_light.svg +6 -6
- package/dist/webui/logos/glama.svg +7 -0
- package/dist/webui/logos/litellm.svg +7 -0
- package/dist/webui/logos/openrouter.svg +1 -0
- package/package.json +8 -7
- package/dist/webui/assets/index-BkwPkZpd.css +0 -1
- package/dist/webui/assets/index-D9u1XfyH.js +0 -2025
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import * as p from '@clack/prompts';
|
|
2
|
+
/**
|
|
3
|
+
* Validates a project name against the standard regex
|
|
4
|
+
* @param name - The project name to validate
|
|
5
|
+
* @returns Error message if invalid, undefined if valid
|
|
6
|
+
*/
|
|
7
|
+
export declare function validateProjectName(name: string): string | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* Prompts user for project name with validation
|
|
10
|
+
* @param defaultName - Default project name
|
|
11
|
+
* @param promptMessage - Custom prompt message
|
|
12
|
+
* @returns The validated project name
|
|
13
|
+
*/
|
|
14
|
+
export declare function promptForProjectName(defaultName?: string, promptMessage?: string): Promise<string>;
|
|
15
|
+
/**
|
|
16
|
+
* Creates a project directory with error handling
|
|
17
|
+
* @param projectName - The name of the project
|
|
18
|
+
* @param spinner - Clack spinner instance
|
|
19
|
+
* @returns The absolute path to the created project
|
|
20
|
+
*/
|
|
21
|
+
export declare function createProjectDirectory(projectName: string, spinner: ReturnType<typeof p.spinner>): Promise<string>;
|
|
22
|
+
/**
|
|
23
|
+
* Initializes a git repository in the project
|
|
24
|
+
* @param projectPath - The project directory path
|
|
25
|
+
*/
|
|
26
|
+
export declare function setupGitRepo(projectPath: string): Promise<void>;
|
|
27
|
+
/**
|
|
28
|
+
* Creates a .gitignore file with common entries
|
|
29
|
+
* @param projectPath - The project directory path
|
|
30
|
+
* @param additionalEntries - Additional entries to include
|
|
31
|
+
*/
|
|
32
|
+
export declare function createGitignore(projectPath: string, additionalEntries?: string[]): Promise<void>;
|
|
33
|
+
/**
|
|
34
|
+
* Initializes package.json for a project
|
|
35
|
+
* @param projectPath - The project directory path
|
|
36
|
+
* @param projectName - The project name
|
|
37
|
+
* @param type - Project type for package.json customization
|
|
38
|
+
*/
|
|
39
|
+
export declare function initPackageJson(projectPath: string, projectName: string, type: 'app' | 'image' | 'project'): Promise<void>;
|
|
40
|
+
/**
|
|
41
|
+
* Creates tsconfig.json for an app project
|
|
42
|
+
* @param projectPath - The project directory path
|
|
43
|
+
* @param srcDir - Source directory (e.g., 'src')
|
|
44
|
+
*/
|
|
45
|
+
export declare function createTsconfigForApp(projectPath: string, srcDir: string): Promise<void>;
|
|
46
|
+
/**
|
|
47
|
+
* Creates tsconfig.json for an image project
|
|
48
|
+
* @param projectPath - The project directory path
|
|
49
|
+
*/
|
|
50
|
+
export declare function createTsconfigForImage(projectPath: string): Promise<void>;
|
|
51
|
+
/**
|
|
52
|
+
* Creates tsconfig.json for a project (manual registration)
|
|
53
|
+
* @param projectPath - The project directory path
|
|
54
|
+
*/
|
|
55
|
+
export declare function createTsconfigForProject(projectPath: string): Promise<void>;
|
|
56
|
+
/**
|
|
57
|
+
* Installs dependencies for a project
|
|
58
|
+
* @param projectPath - The project directory path
|
|
59
|
+
* @param deps - Dependencies to install
|
|
60
|
+
*/
|
|
61
|
+
export declare function installDependencies(projectPath: string, deps: {
|
|
62
|
+
dependencies?: string[];
|
|
63
|
+
devDependencies?: string[];
|
|
64
|
+
}, packageManager?: string): Promise<void>;
|
|
65
|
+
/**
|
|
66
|
+
* Creates a .env.example file
|
|
67
|
+
* @param projectPath - The project directory path
|
|
68
|
+
* @param entries - Environment variables to include (key-value pairs)
|
|
69
|
+
*/
|
|
70
|
+
export declare function createEnvExample(projectPath: string, entries: Record<string, string>): Promise<void>;
|
|
71
|
+
/**
|
|
72
|
+
* Ensures a directory exists, creates if not
|
|
73
|
+
* @param dirPath - The directory path to ensure
|
|
74
|
+
*/
|
|
75
|
+
export declare function ensureDirectory(dirPath: string): Promise<void>;
|
|
76
|
+
//# sourceMappingURL=scaffolding-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scaffolding-utils.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/scaffolding-utils.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAC;AAKpC;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAMpE;AAED;;;;;GAKG;AACH,wBAAsB,oBAAoB,CACtC,WAAW,GAAE,MAA2B,EACxC,aAAa,GAAE,MAAiD,GACjE,OAAO,CAAC,MAAM,CAAC,CAmBjB;AAED;;;;;GAKG;AACH,wBAAsB,sBAAsB,CACxC,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,GACtC,OAAO,CAAC,MAAM,CAAC,CAiBjB;AAED;;;GAGG;AACH,wBAAsB,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAErE;AAED;;;;GAIG;AACH,wBAAsB,eAAe,CACjC,WAAW,EAAE,MAAM,EACnB,iBAAiB,GAAE,MAAM,EAAO,GACjC,OAAO,CAAC,IAAI,CAAC,CAIf;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CACjC,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,KAAK,GAAG,OAAO,GAAG,SAAS,GAClC,OAAO,CAAC,IAAI,CAAC,CAiCf;AAED;;;;GAIG;AACH,wBAAsB,oBAAoB,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAkB7F;AAED;;;GAGG;AACH,wBAAsB,sBAAsB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA8B/E;AAED;;;GAGG;AACH,wBAAsB,wBAAwB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA+BjF;AAED;;;;GAIG;AACH,wBAAsB,mBAAmB,CACrC,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE;IACF,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;CAC9B,EACD,cAAc,CAAC,EAAE,MAAM,GACxB,OAAO,CAAC,IAAI,CAAC,CAef;AAED;;;;GAIG;AACH,wBAAsB,gBAAgB,CAClC,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAChC,OAAO,CAAC,IAAI,CAAC,CAMf;AAED;;;GAGG;AACH,wBAAsB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEpE"}
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import fs from 'fs-extra';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import chalk from 'chalk';
|
|
4
|
+
import { executeWithTimeout } from './execute.js';
|
|
5
|
+
import { textOrExit } from './prompt-helpers.js';
|
|
6
|
+
import { getPackageManager, getPackageManagerInstallCommand } from './package-mgmt.js';
|
|
7
|
+
/**
|
|
8
|
+
* Validates a project name against the standard regex
|
|
9
|
+
* @param name - The project name to validate
|
|
10
|
+
* @returns Error message if invalid, undefined if valid
|
|
11
|
+
*/
|
|
12
|
+
export function validateProjectName(name) {
|
|
13
|
+
const nameRegex = /^[a-zA-Z][a-zA-Z0-9-_]*$/;
|
|
14
|
+
if (!nameRegex.test(name)) {
|
|
15
|
+
return 'Must start with a letter and contain only letters, numbers, hyphens, or underscores';
|
|
16
|
+
}
|
|
17
|
+
return undefined;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Prompts user for project name with validation
|
|
21
|
+
* @param defaultName - Default project name
|
|
22
|
+
* @param promptMessage - Custom prompt message
|
|
23
|
+
* @returns The validated project name
|
|
24
|
+
*/
|
|
25
|
+
export async function promptForProjectName(defaultName = 'my-dexto-project', promptMessage = 'What do you want to name your project?') {
|
|
26
|
+
let input;
|
|
27
|
+
do {
|
|
28
|
+
input = await textOrExit({
|
|
29
|
+
message: promptMessage,
|
|
30
|
+
placeholder: defaultName,
|
|
31
|
+
defaultValue: defaultName,
|
|
32
|
+
}, 'Project creation cancelled');
|
|
33
|
+
const error = validateProjectName(input);
|
|
34
|
+
if (error) {
|
|
35
|
+
console.log(chalk.red(`Invalid project name: ${error}`));
|
|
36
|
+
}
|
|
37
|
+
} while (validateProjectName(input));
|
|
38
|
+
return input;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Creates a project directory with error handling
|
|
42
|
+
* @param projectName - The name of the project
|
|
43
|
+
* @param spinner - Clack spinner instance
|
|
44
|
+
* @returns The absolute path to the created project
|
|
45
|
+
*/
|
|
46
|
+
export async function createProjectDirectory(projectName, spinner) {
|
|
47
|
+
const projectPath = path.resolve(process.cwd(), projectName);
|
|
48
|
+
try {
|
|
49
|
+
await fs.mkdir(projectPath);
|
|
50
|
+
return projectPath;
|
|
51
|
+
}
|
|
52
|
+
catch (error) {
|
|
53
|
+
if (error instanceof Error && 'code' in error && error.code === 'EEXIST') {
|
|
54
|
+
spinner.stop(`Directory "${projectName}" already exists. Please choose a different name or delete the existing directory.`);
|
|
55
|
+
process.exit(1);
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
spinner.stop(`Failed to create project: ${error}`);
|
|
59
|
+
throw error;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Initializes a git repository in the project
|
|
65
|
+
* @param projectPath - The project directory path
|
|
66
|
+
*/
|
|
67
|
+
export async function setupGitRepo(projectPath) {
|
|
68
|
+
await executeWithTimeout('git', ['init'], { cwd: projectPath });
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Creates a .gitignore file with common entries
|
|
72
|
+
* @param projectPath - The project directory path
|
|
73
|
+
* @param additionalEntries - Additional entries to include
|
|
74
|
+
*/
|
|
75
|
+
export async function createGitignore(projectPath, additionalEntries = []) {
|
|
76
|
+
const baseEntries = ['node_modules', '.env', 'dist', '.dexto', '*.log'];
|
|
77
|
+
const allEntries = [...baseEntries, ...additionalEntries];
|
|
78
|
+
await fs.writeFile(path.join(projectPath, '.gitignore'), allEntries.join('\n'));
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Initializes package.json for a project
|
|
82
|
+
* @param projectPath - The project directory path
|
|
83
|
+
* @param projectName - The project name
|
|
84
|
+
* @param type - Project type for package.json customization
|
|
85
|
+
*/
|
|
86
|
+
export async function initPackageJson(projectPath, projectName, type) {
|
|
87
|
+
// Initialize with npm (it creates package.json regardless of package manager)
|
|
88
|
+
await executeWithTimeout('npm', ['init', '-y'], { cwd: projectPath });
|
|
89
|
+
// Read and customize package.json
|
|
90
|
+
const packageJsonPath = path.join(projectPath, 'package.json');
|
|
91
|
+
const packageJson = JSON.parse(await fs.readFile(packageJsonPath, 'utf8'));
|
|
92
|
+
packageJson.name = projectName;
|
|
93
|
+
packageJson.version = '1.0.0';
|
|
94
|
+
packageJson.type = 'module';
|
|
95
|
+
// Customize based on type
|
|
96
|
+
if (type === 'app') {
|
|
97
|
+
packageJson.description = 'Dexto application';
|
|
98
|
+
}
|
|
99
|
+
else if (type === 'image') {
|
|
100
|
+
packageJson.description = `Dexto image providing agent harness`;
|
|
101
|
+
packageJson.main = './dist/index.js';
|
|
102
|
+
packageJson.types = './dist/index.d.ts';
|
|
103
|
+
packageJson.exports = {
|
|
104
|
+
'.': {
|
|
105
|
+
types: './dist/index.d.ts',
|
|
106
|
+
import: './dist/index.js',
|
|
107
|
+
},
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
else if (type === 'project') {
|
|
111
|
+
packageJson.description = 'Custom Dexto project';
|
|
112
|
+
packageJson.bin = {
|
|
113
|
+
[projectName]: './dist/src/index.js',
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
await fs.writeFile(packageJsonPath, JSON.stringify(packageJson, null, 2));
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Creates tsconfig.json for an app project
|
|
120
|
+
* @param projectPath - The project directory path
|
|
121
|
+
* @param srcDir - Source directory (e.g., 'src')
|
|
122
|
+
*/
|
|
123
|
+
export async function createTsconfigForApp(projectPath, srcDir) {
|
|
124
|
+
const tsconfig = {
|
|
125
|
+
compilerOptions: {
|
|
126
|
+
target: 'ES2022',
|
|
127
|
+
module: 'ESNext',
|
|
128
|
+
moduleResolution: 'node',
|
|
129
|
+
strict: true,
|
|
130
|
+
esModuleInterop: true,
|
|
131
|
+
forceConsistentCasingInFileNames: true,
|
|
132
|
+
skipLibCheck: true,
|
|
133
|
+
outDir: 'dist',
|
|
134
|
+
rootDir: srcDir,
|
|
135
|
+
},
|
|
136
|
+
include: [`${srcDir}/**/*.ts`],
|
|
137
|
+
exclude: ['node_modules', 'dist', '.dexto'],
|
|
138
|
+
};
|
|
139
|
+
await fs.writeJSON(path.join(projectPath, 'tsconfig.json'), tsconfig, { spaces: 4 });
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Creates tsconfig.json for an image project
|
|
143
|
+
* @param projectPath - The project directory path
|
|
144
|
+
*/
|
|
145
|
+
export async function createTsconfigForImage(projectPath) {
|
|
146
|
+
const tsconfig = {
|
|
147
|
+
compilerOptions: {
|
|
148
|
+
target: 'ES2022',
|
|
149
|
+
module: 'ES2022',
|
|
150
|
+
lib: ['ES2022'],
|
|
151
|
+
moduleResolution: 'bundler',
|
|
152
|
+
outDir: './dist',
|
|
153
|
+
declaration: true,
|
|
154
|
+
declarationMap: true,
|
|
155
|
+
sourceMap: true,
|
|
156
|
+
strict: true,
|
|
157
|
+
esModuleInterop: true,
|
|
158
|
+
skipLibCheck: true,
|
|
159
|
+
forceConsistentCasingInFileNames: true,
|
|
160
|
+
resolveJsonModule: true,
|
|
161
|
+
allowSyntheticDefaultImports: true,
|
|
162
|
+
types: ['node'],
|
|
163
|
+
},
|
|
164
|
+
include: [
|
|
165
|
+
'dexto.image.ts',
|
|
166
|
+
'tools/**/*',
|
|
167
|
+
'blob-store/**/*',
|
|
168
|
+
'compression/**/*',
|
|
169
|
+
'plugins/**/*',
|
|
170
|
+
],
|
|
171
|
+
exclude: ['node_modules', 'dist'],
|
|
172
|
+
};
|
|
173
|
+
await fs.writeJSON(path.join(projectPath, 'tsconfig.json'), tsconfig, { spaces: 2 });
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Creates tsconfig.json for a project (manual registration)
|
|
177
|
+
* @param projectPath - The project directory path
|
|
178
|
+
*/
|
|
179
|
+
export async function createTsconfigForProject(projectPath) {
|
|
180
|
+
const tsconfig = {
|
|
181
|
+
compilerOptions: {
|
|
182
|
+
target: 'ES2022',
|
|
183
|
+
module: 'ES2022',
|
|
184
|
+
lib: ['ES2022'],
|
|
185
|
+
moduleResolution: 'bundler',
|
|
186
|
+
outDir: './dist',
|
|
187
|
+
declaration: true,
|
|
188
|
+
declarationMap: true,
|
|
189
|
+
sourceMap: true,
|
|
190
|
+
strict: true,
|
|
191
|
+
esModuleInterop: true,
|
|
192
|
+
skipLibCheck: true,
|
|
193
|
+
forceConsistentCasingInFileNames: true,
|
|
194
|
+
resolveJsonModule: true,
|
|
195
|
+
allowSyntheticDefaultImports: true,
|
|
196
|
+
types: ['node'],
|
|
197
|
+
},
|
|
198
|
+
include: [
|
|
199
|
+
'src/**/*',
|
|
200
|
+
'storage/**/*',
|
|
201
|
+
'tools/**/*',
|
|
202
|
+
'plugins/**/*',
|
|
203
|
+
'shared/**/*',
|
|
204
|
+
'dexto.config.ts',
|
|
205
|
+
],
|
|
206
|
+
exclude: ['node_modules', 'dist'],
|
|
207
|
+
};
|
|
208
|
+
await fs.writeJSON(path.join(projectPath, 'tsconfig.json'), tsconfig, { spaces: 2 });
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Installs dependencies for a project
|
|
212
|
+
* @param projectPath - The project directory path
|
|
213
|
+
* @param deps - Dependencies to install
|
|
214
|
+
*/
|
|
215
|
+
export async function installDependencies(projectPath, deps, packageManager) {
|
|
216
|
+
const pm = packageManager || getPackageManager();
|
|
217
|
+
const installCommand = getPackageManagerInstallCommand(pm);
|
|
218
|
+
if (deps.dependencies && deps.dependencies.length > 0) {
|
|
219
|
+
await executeWithTimeout(pm, [installCommand, ...deps.dependencies], {
|
|
220
|
+
cwd: projectPath,
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
if (deps.devDependencies && deps.devDependencies.length > 0) {
|
|
224
|
+
await executeWithTimeout(pm, [installCommand, ...deps.devDependencies, '--save-dev'], {
|
|
225
|
+
cwd: projectPath,
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Creates a .env.example file
|
|
231
|
+
* @param projectPath - The project directory path
|
|
232
|
+
* @param entries - Environment variables to include (key-value pairs)
|
|
233
|
+
*/
|
|
234
|
+
export async function createEnvExample(projectPath, entries) {
|
|
235
|
+
const content = Object.entries(entries)
|
|
236
|
+
.map(([key, value]) => `${key}=${value}`)
|
|
237
|
+
.join('\n');
|
|
238
|
+
await fs.writeFile(path.join(projectPath, '.env.example'), content);
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Ensures a directory exists, creates if not
|
|
242
|
+
* @param dirPath - The directory path to ensure
|
|
243
|
+
*/
|
|
244
|
+
export async function ensureDirectory(dirPath) {
|
|
245
|
+
await fs.ensureDir(dirPath);
|
|
246
|
+
}
|
|
@@ -1,8 +1,24 @@
|
|
|
1
|
+
import { type GlobalPreferences } from '@dexto/agent-management';
|
|
1
2
|
/**
|
|
2
3
|
* Check if this is a first-time user (no preferences file exists)
|
|
3
4
|
* @returns true if user has never run setup
|
|
4
5
|
*/
|
|
5
6
|
export declare function isFirstTimeUser(): boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Result of checking setup state
|
|
9
|
+
*/
|
|
10
|
+
export interface SetupState {
|
|
11
|
+
needsSetup: boolean;
|
|
12
|
+
isFirstTime: boolean;
|
|
13
|
+
apiKeyPending: boolean;
|
|
14
|
+
baseURLPending: boolean;
|
|
15
|
+
preferences: GlobalPreferences | null;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Get detailed setup state including pending items
|
|
19
|
+
* @returns Setup state with detailed flags
|
|
20
|
+
*/
|
|
21
|
+
export declare function getSetupState(): Promise<SetupState>;
|
|
6
22
|
/**
|
|
7
23
|
* Check if user requires setup (missing, corrupted, or incomplete preferences)
|
|
8
24
|
* Context-aware:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup-utils.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/setup-utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"setup-utils.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/setup-utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAGH,KAAK,iBAAiB,EACzB,MAAM,yBAAyB,CAAC;AAGjC;;;GAGG;AACH,wBAAgB,eAAe,IAAI,OAAO,CAEzC;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACvB,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,aAAa,EAAE,OAAO,CAAC;IACvB,cAAc,EAAE,OAAO,CAAC;IACxB,WAAW,EAAE,iBAAiB,GAAG,IAAI,CAAC;CACzC;AAED;;;GAGG;AACH,wBAAsB,aAAa,IAAI,OAAO,CAAC,UAAU,CAAC,CAgFzD;AAED;;;;;;;;GAQG;AACH,wBAAsB,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC,CAGtD;AAED;;GAEG;AACH,wBAAsB,uBAAuB,IAAI,OAAO,CAAC,MAAM,CAAC,CAqB/D"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// packages/cli/src/cli/utils/setup-utils.ts
|
|
2
|
-
import { globalPreferencesExist, loadGlobalPreferences } from '@dexto/agent-management';
|
|
2
|
+
import { globalPreferencesExist, loadGlobalPreferences, } from '@dexto/agent-management';
|
|
3
3
|
import { getExecutionContext } from '@dexto/core';
|
|
4
4
|
/**
|
|
5
5
|
* Check if this is a first-time user (no preferences file exists)
|
|
@@ -9,46 +9,97 @@ export function isFirstTimeUser() {
|
|
|
9
9
|
return !globalPreferencesExist();
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* - Dev mode (source + DEXTO_DEV_MODE): Skip setup, uses repo configs
|
|
15
|
-
* - Project context: Skip setup (might have project-local config)
|
|
16
|
-
* - First-time user (source/global-cli): Require setup
|
|
17
|
-
* - Has preferences (source/global-cli): Validate them
|
|
18
|
-
* @returns true if setup is required
|
|
12
|
+
* Get detailed setup state including pending items
|
|
13
|
+
* @returns Setup state with detailed flags
|
|
19
14
|
*/
|
|
20
|
-
export async function
|
|
15
|
+
export async function getSetupState() {
|
|
21
16
|
const context = getExecutionContext();
|
|
22
|
-
// Skip setup in dev mode when in source context
|
|
17
|
+
// Skip setup checks in dev mode when in source context
|
|
23
18
|
if (context === 'dexto-source' && process.env.DEXTO_DEV_MODE === 'true') {
|
|
24
|
-
return
|
|
19
|
+
return {
|
|
20
|
+
needsSetup: false,
|
|
21
|
+
isFirstTime: false,
|
|
22
|
+
apiKeyPending: false,
|
|
23
|
+
baseURLPending: false,
|
|
24
|
+
preferences: null,
|
|
25
|
+
};
|
|
25
26
|
}
|
|
26
27
|
// Project context: skip (might have project-local config)
|
|
27
28
|
if (context === 'dexto-project') {
|
|
28
|
-
return
|
|
29
|
+
return {
|
|
30
|
+
needsSetup: false,
|
|
31
|
+
isFirstTime: false,
|
|
32
|
+
apiKeyPending: false,
|
|
33
|
+
baseURLPending: false,
|
|
34
|
+
preferences: null,
|
|
35
|
+
};
|
|
29
36
|
}
|
|
30
|
-
// First-time user (no preferences)
|
|
37
|
+
// First-time user (no preferences)
|
|
31
38
|
if (isFirstTimeUser()) {
|
|
32
|
-
return
|
|
39
|
+
return {
|
|
40
|
+
needsSetup: true,
|
|
41
|
+
isFirstTime: true,
|
|
42
|
+
apiKeyPending: false,
|
|
43
|
+
baseURLPending: false,
|
|
44
|
+
preferences: null,
|
|
45
|
+
};
|
|
33
46
|
}
|
|
34
|
-
// Has preferences -
|
|
47
|
+
// Has preferences - check state
|
|
35
48
|
try {
|
|
36
49
|
const preferences = await loadGlobalPreferences();
|
|
37
50
|
// Check setup completion flag
|
|
38
51
|
if (!preferences.setup.completed) {
|
|
39
|
-
return
|
|
52
|
+
return {
|
|
53
|
+
needsSetup: true,
|
|
54
|
+
isFirstTime: false,
|
|
55
|
+
apiKeyPending: false,
|
|
56
|
+
baseURLPending: false,
|
|
57
|
+
preferences,
|
|
58
|
+
};
|
|
40
59
|
}
|
|
41
|
-
// Check required fields
|
|
60
|
+
// Check required fields
|
|
42
61
|
if (!preferences.defaults.defaultAgent) {
|
|
43
|
-
return
|
|
62
|
+
return {
|
|
63
|
+
needsSetup: true,
|
|
64
|
+
isFirstTime: false,
|
|
65
|
+
apiKeyPending: false,
|
|
66
|
+
baseURLPending: false,
|
|
67
|
+
preferences,
|
|
68
|
+
};
|
|
44
69
|
}
|
|
45
|
-
|
|
70
|
+
// Setup is complete but may have pending items
|
|
71
|
+
return {
|
|
72
|
+
needsSetup: false,
|
|
73
|
+
isFirstTime: false,
|
|
74
|
+
apiKeyPending: preferences.setup.apiKeyPending ?? false,
|
|
75
|
+
baseURLPending: preferences.setup.baseURLPending ?? false,
|
|
76
|
+
preferences,
|
|
77
|
+
};
|
|
46
78
|
}
|
|
47
79
|
catch (_error) {
|
|
48
|
-
// Corrupted or invalid preferences
|
|
49
|
-
return
|
|
80
|
+
// Corrupted or invalid preferences
|
|
81
|
+
return {
|
|
82
|
+
needsSetup: true,
|
|
83
|
+
isFirstTime: false,
|
|
84
|
+
apiKeyPending: false,
|
|
85
|
+
baseURLPending: false,
|
|
86
|
+
preferences: null,
|
|
87
|
+
};
|
|
50
88
|
}
|
|
51
89
|
}
|
|
90
|
+
/**
|
|
91
|
+
* Check if user requires setup (missing, corrupted, or incomplete preferences)
|
|
92
|
+
* Context-aware:
|
|
93
|
+
* - Dev mode (source + DEXTO_DEV_MODE): Skip setup, uses repo configs
|
|
94
|
+
* - Project context: Skip setup (might have project-local config)
|
|
95
|
+
* - First-time user (source/global-cli): Require setup
|
|
96
|
+
* - Has preferences (source/global-cli): Validate them
|
|
97
|
+
* @returns true if setup is required
|
|
98
|
+
*/
|
|
99
|
+
export async function requiresSetup() {
|
|
100
|
+
const state = await getSetupState();
|
|
101
|
+
return state.needsSetup;
|
|
102
|
+
}
|
|
52
103
|
/**
|
|
53
104
|
* Get appropriate guidance message based on user state
|
|
54
105
|
*/
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Template Engine for Dexto Project Scaffolding
|
|
3
|
+
*
|
|
4
|
+
* Provides code generation functions for various project types.
|
|
5
|
+
* Uses the image/harness terminology strategy:
|
|
6
|
+
* - "Image" for distributable artifacts, packages, composition
|
|
7
|
+
* - "Harness" for runtime behavior, what it provides
|
|
8
|
+
*/
|
|
9
|
+
interface TemplateContext {
|
|
10
|
+
projectName: string;
|
|
11
|
+
packageName: string;
|
|
12
|
+
description: string;
|
|
13
|
+
imageName?: string;
|
|
14
|
+
baseImage?: string;
|
|
15
|
+
target?: string;
|
|
16
|
+
llmProvider?: string;
|
|
17
|
+
llmModel?: string;
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Generates src/index.ts for an app using an image
|
|
22
|
+
*/
|
|
23
|
+
export declare function generateIndexForImage(context: TemplateContext): string;
|
|
24
|
+
/**
|
|
25
|
+
* Generates src/index.ts for a web server application using an image
|
|
26
|
+
*/
|
|
27
|
+
export declare function generateWebServerIndex(context: TemplateContext): string;
|
|
28
|
+
/**
|
|
29
|
+
* Generates HTML for web app
|
|
30
|
+
*/
|
|
31
|
+
export declare function generateWebAppHTML(projectName: string): string;
|
|
32
|
+
/**
|
|
33
|
+
* Generates JavaScript for web app
|
|
34
|
+
*/
|
|
35
|
+
export declare function generateWebAppJS(): string;
|
|
36
|
+
/**
|
|
37
|
+
* Generates CSS for web app
|
|
38
|
+
*/
|
|
39
|
+
export declare function generateWebAppCSS(): string;
|
|
40
|
+
/**
|
|
41
|
+
* Generates dexto.image.ts file for an image project
|
|
42
|
+
*/
|
|
43
|
+
export declare function generateDextoImageFile(context: TemplateContext): string;
|
|
44
|
+
/**
|
|
45
|
+
* Generates dexto.config.ts file for manual registration projects
|
|
46
|
+
*/
|
|
47
|
+
export declare function generateDextoConfigFile(context: TemplateContext): string;
|
|
48
|
+
/**
|
|
49
|
+
* Generates README.md for an image project
|
|
50
|
+
*/
|
|
51
|
+
export declare function generateImageReadme(context: TemplateContext): string;
|
|
52
|
+
/**
|
|
53
|
+
* Generates an example custom tool provider
|
|
54
|
+
*/
|
|
55
|
+
export declare function generateExampleTool(toolName?: string): string;
|
|
56
|
+
/**
|
|
57
|
+
* Generates README for an app project
|
|
58
|
+
*/
|
|
59
|
+
export declare function generateAppReadme(context: TemplateContext): string;
|
|
60
|
+
/**
|
|
61
|
+
* Generates auto-discovery script for from-core mode
|
|
62
|
+
*/
|
|
63
|
+
export declare function generateDiscoveryScript(): string;
|
|
64
|
+
export {};
|
|
65
|
+
//# sourceMappingURL=template-engine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-engine.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/template-engine.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,UAAU,eAAe;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CA2CtE;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CA4EvE;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAsC9D;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAwKzC;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAqN1C;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CA8DvE;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CAgExE;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CAyGpE;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,GAAE,MAAuB,GAAG,MAAM,CAuD7E;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CA2DlE;AAED;;GAEG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,CA6JhD"}
|