@amodalai/amodal 0.1.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.
- package/CHANGELOG.md +21 -0
- package/LICENSE +21 -0
- package/README.md +42 -0
- package/dist/src/auth/index.d.ts +13 -0
- package/dist/src/auth/index.d.ts.map +1 -0
- package/dist/src/auth/index.js +10 -0
- package/dist/src/auth/index.js.map +1 -0
- package/dist/src/auth/oauth2.d.ts +51 -0
- package/dist/src/auth/oauth2.d.ts.map +1 -0
- package/dist/src/auth/oauth2.js +196 -0
- package/dist/src/auth/oauth2.js.map +1 -0
- package/dist/src/auth/prompt.d.ts +21 -0
- package/dist/src/auth/prompt.d.ts.map +1 -0
- package/dist/src/auth/prompt.js +81 -0
- package/dist/src/auth/prompt.js.map +1 -0
- package/dist/src/auth/test-connection.d.ts +27 -0
- package/dist/src/auth/test-connection.d.ts.map +1 -0
- package/dist/src/auth/test-connection.js +153 -0
- package/dist/src/auth/test-connection.js.map +1 -0
- package/dist/src/auth/types.d.ts +32 -0
- package/dist/src/auth/types.d.ts.map +1 -0
- package/dist/src/auth/types.js +7 -0
- package/dist/src/auth/types.js.map +1 -0
- package/dist/src/commands/audit.d.ts +18 -0
- package/dist/src/commands/audit.d.ts.map +1 -0
- package/dist/src/commands/audit.js +86 -0
- package/dist/src/commands/audit.js.map +1 -0
- package/dist/src/commands/automations.d.ts +28 -0
- package/dist/src/commands/automations.d.ts.map +1 -0
- package/dist/src/commands/automations.js +179 -0
- package/dist/src/commands/automations.js.map +1 -0
- package/dist/src/commands/build-manifest-types.d.ts +33 -0
- package/dist/src/commands/build-manifest-types.d.ts.map +1 -0
- package/dist/src/commands/build-manifest-types.js +30 -0
- package/dist/src/commands/build-manifest-types.js.map +1 -0
- package/dist/src/commands/build-tools.d.ts +33 -0
- package/dist/src/commands/build-tools.d.ts.map +1 -0
- package/dist/src/commands/build-tools.js +237 -0
- package/dist/src/commands/build-tools.js.map +1 -0
- package/dist/src/commands/build.d.ts +23 -0
- package/dist/src/commands/build.d.ts.map +1 -0
- package/dist/src/commands/build.js +120 -0
- package/dist/src/commands/build.js.map +1 -0
- package/dist/src/commands/chat.d.ts +26 -0
- package/dist/src/commands/chat.d.ts.map +1 -0
- package/dist/src/commands/chat.js +123 -0
- package/dist/src/commands/chat.js.map +1 -0
- package/dist/src/commands/connect.d.ts +18 -0
- package/dist/src/commands/connect.d.ts.map +1 -0
- package/dist/src/commands/connect.js +198 -0
- package/dist/src/commands/connect.js.map +1 -0
- package/dist/src/commands/deploy.d.ts +20 -0
- package/dist/src/commands/deploy.d.ts.map +1 -0
- package/dist/src/commands/deploy.js +137 -0
- package/dist/src/commands/deploy.js.map +1 -0
- package/dist/src/commands/deployments.d.ts +17 -0
- package/dist/src/commands/deployments.d.ts.map +1 -0
- package/dist/src/commands/deployments.js +77 -0
- package/dist/src/commands/deployments.js.map +1 -0
- package/dist/src/commands/dev.d.ts +17 -0
- package/dist/src/commands/dev.d.ts.map +1 -0
- package/dist/src/commands/dev.js +109 -0
- package/dist/src/commands/dev.js.map +1 -0
- package/dist/src/commands/diff.d.ts +19 -0
- package/dist/src/commands/diff.d.ts.map +1 -0
- package/dist/src/commands/diff.js +120 -0
- package/dist/src/commands/diff.js.map +1 -0
- package/dist/src/commands/docker.d.ts +21 -0
- package/dist/src/commands/docker.d.ts.map +1 -0
- package/dist/src/commands/docker.js +215 -0
- package/dist/src/commands/docker.js.map +1 -0
- package/dist/src/commands/eval.d.ts +20 -0
- package/dist/src/commands/eval.d.ts.map +1 -0
- package/dist/src/commands/eval.js +236 -0
- package/dist/src/commands/eval.js.map +1 -0
- package/dist/src/commands/experiment.d.ts +21 -0
- package/dist/src/commands/experiment.d.ts.map +1 -0
- package/dist/src/commands/experiment.js +133 -0
- package/dist/src/commands/experiment.js.map +1 -0
- package/dist/src/commands/index.d.ts +10 -0
- package/dist/src/commands/index.d.ts.map +1 -0
- package/dist/src/commands/index.js +75 -0
- package/dist/src/commands/index.js.map +1 -0
- package/dist/src/commands/init.d.ts +17 -0
- package/dist/src/commands/init.d.ts.map +1 -0
- package/dist/src/commands/init.js +73 -0
- package/dist/src/commands/init.js.map +1 -0
- package/dist/src/commands/inspect.d.ts +22 -0
- package/dist/src/commands/inspect.d.ts.map +1 -0
- package/dist/src/commands/inspect.js +131 -0
- package/dist/src/commands/inspect.js.map +1 -0
- package/dist/src/commands/install-pkg.d.ts +29 -0
- package/dist/src/commands/install-pkg.d.ts.map +1 -0
- package/dist/src/commands/install-pkg.js +202 -0
- package/dist/src/commands/install-pkg.js.map +1 -0
- package/dist/src/commands/link.d.ts +32 -0
- package/dist/src/commands/link.d.ts.map +1 -0
- package/dist/src/commands/link.js +227 -0
- package/dist/src/commands/link.js.map +1 -0
- package/dist/src/commands/list.d.ts +19 -0
- package/dist/src/commands/list.d.ts.map +1 -0
- package/dist/src/commands/list.js +78 -0
- package/dist/src/commands/list.js.map +1 -0
- package/dist/src/commands/login.d.ts +31 -0
- package/dist/src/commands/login.d.ts.map +1 -0
- package/dist/src/commands/login.js +205 -0
- package/dist/src/commands/login.js.map +1 -0
- package/dist/src/commands/promote.d.ts +16 -0
- package/dist/src/commands/promote.d.ts.map +1 -0
- package/dist/src/commands/promote.js +55 -0
- package/dist/src/commands/promote.js.map +1 -0
- package/dist/src/commands/publish.d.ts +18 -0
- package/dist/src/commands/publish.d.ts.map +1 -0
- package/dist/src/commands/publish.js +122 -0
- package/dist/src/commands/publish.js.map +1 -0
- package/dist/src/commands/rollback.d.ts +17 -0
- package/dist/src/commands/rollback.d.ts.map +1 -0
- package/dist/src/commands/rollback.js +62 -0
- package/dist/src/commands/rollback.js.map +1 -0
- package/dist/src/commands/search.d.ts +20 -0
- package/dist/src/commands/search.d.ts.map +1 -0
- package/dist/src/commands/search.js +133 -0
- package/dist/src/commands/search.js.map +1 -0
- package/dist/src/commands/secrets.d.ts +20 -0
- package/dist/src/commands/secrets.d.ts.map +1 -0
- package/dist/src/commands/secrets.js +137 -0
- package/dist/src/commands/secrets.js.map +1 -0
- package/dist/src/commands/serve.d.ts +23 -0
- package/dist/src/commands/serve.d.ts.map +1 -0
- package/dist/src/commands/serve.js +144 -0
- package/dist/src/commands/serve.js.map +1 -0
- package/dist/src/commands/status.d.ts +16 -0
- package/dist/src/commands/status.d.ts.map +1 -0
- package/dist/src/commands/status.js +83 -0
- package/dist/src/commands/status.js.map +1 -0
- package/dist/src/commands/sync.d.ts +21 -0
- package/dist/src/commands/sync.d.ts.map +1 -0
- package/dist/src/commands/sync.js +94 -0
- package/dist/src/commands/sync.js.map +1 -0
- package/dist/src/commands/test-query.d.ts +19 -0
- package/dist/src/commands/test-query.d.ts.map +1 -0
- package/dist/src/commands/test-query.js +116 -0
- package/dist/src/commands/test-query.js.map +1 -0
- package/dist/src/commands/uninstall.d.ts +19 -0
- package/dist/src/commands/uninstall.d.ts.map +1 -0
- package/dist/src/commands/uninstall.js +84 -0
- package/dist/src/commands/uninstall.js.map +1 -0
- package/dist/src/commands/update.d.ts +21 -0
- package/dist/src/commands/update.d.ts.map +1 -0
- package/dist/src/commands/update.js +145 -0
- package/dist/src/commands/update.js.map +1 -0
- package/dist/src/commands/validate.d.ts +19 -0
- package/dist/src/commands/validate.d.ts.map +1 -0
- package/dist/src/commands/validate.js +114 -0
- package/dist/src/commands/validate.js.map +1 -0
- package/dist/src/fixtures/incident-response.d.ts +91 -0
- package/dist/src/fixtures/incident-response.d.ts.map +1 -0
- package/dist/src/fixtures/incident-response.js +208 -0
- package/dist/src/fixtures/incident-response.js.map +1 -0
- package/dist/src/main.d.ts +8 -0
- package/dist/src/main.d.ts.map +1 -0
- package/dist/src/main.js +30 -0
- package/dist/src/main.js.map +1 -0
- package/dist/src/shared/platform-client.d.ts +92 -0
- package/dist/src/shared/platform-client.d.ts.map +1 -0
- package/dist/src/shared/platform-client.js +155 -0
- package/dist/src/shared/platform-client.js.map +1 -0
- package/dist/src/shared/repo-discovery.d.ts +11 -0
- package/dist/src/shared/repo-discovery.d.ts.map +1 -0
- package/dist/src/shared/repo-discovery.js +33 -0
- package/dist/src/shared/repo-discovery.js.map +1 -0
- package/dist/src/templates/compose-template.d.ts +10 -0
- package/dist/src/templates/compose-template.d.ts.map +1 -0
- package/dist/src/templates/compose-template.js +30 -0
- package/dist/src/templates/compose-template.js.map +1 -0
- package/dist/src/templates/config-template.d.ts +14 -0
- package/dist/src/templates/config-template.d.ts.map +1 -0
- package/dist/src/templates/config-template.js +35 -0
- package/dist/src/templates/config-template.js.map +1 -0
- package/dist/src/templates/dockerfile-template.d.ts +10 -0
- package/dist/src/templates/dockerfile-template.d.ts.map +1 -0
- package/dist/src/templates/dockerfile-template.js +30 -0
- package/dist/src/templates/dockerfile-template.js.map +1 -0
- package/dist/src/templates/env-template.d.ts +12 -0
- package/dist/src/templates/env-template.d.ts.map +1 -0
- package/dist/src/templates/env-template.js +24 -0
- package/dist/src/templates/env-template.js.map +1 -0
- package/dist/src/templates/knowledge-template.d.ts +10 -0
- package/dist/src/templates/knowledge-template.d.ts.map +1 -0
- package/dist/src/templates/knowledge-template.js +24 -0
- package/dist/src/templates/knowledge-template.js.map +1 -0
- package/dist/src/templates/skill-template.d.ts +10 -0
- package/dist/src/templates/skill-template.d.ts.map +1 -0
- package/dist/src/templates/skill-template.js +27 -0
- package/dist/src/templates/skill-template.js.map +1 -0
- package/dist/src/ui/AskUserPrompt.d.ts +14 -0
- package/dist/src/ui/AskUserPrompt.d.ts.map +1 -0
- package/dist/src/ui/AskUserPrompt.js +17 -0
- package/dist/src/ui/AskUserPrompt.js.map +1 -0
- package/dist/src/ui/AssistantMessage.d.ts +14 -0
- package/dist/src/ui/AssistantMessage.d.ts.map +1 -0
- package/dist/src/ui/AssistantMessage.js +8 -0
- package/dist/src/ui/AssistantMessage.js.map +1 -0
- package/dist/src/ui/ChatApp.d.ts +15 -0
- package/dist/src/ui/ChatApp.d.ts.map +1 -0
- package/dist/src/ui/ChatApp.js +144 -0
- package/dist/src/ui/ChatApp.js.map +1 -0
- package/dist/src/ui/ConfirmationPrompt.d.ts +17 -0
- package/dist/src/ui/ConfirmationPrompt.d.ts.map +1 -0
- package/dist/src/ui/ConfirmationPrompt.js +21 -0
- package/dist/src/ui/ConfirmationPrompt.js.map +1 -0
- package/dist/src/ui/DiffRenderer.d.ts +32 -0
- package/dist/src/ui/DiffRenderer.d.ts.map +1 -0
- package/dist/src/ui/DiffRenderer.js +118 -0
- package/dist/src/ui/DiffRenderer.js.map +1 -0
- package/dist/src/ui/ExpandableContent.d.ts +15 -0
- package/dist/src/ui/ExpandableContent.d.ts.map +1 -0
- package/dist/src/ui/ExpandableContent.js +22 -0
- package/dist/src/ui/ExpandableContent.js.map +1 -0
- package/dist/src/ui/ExploreIndicator.d.ts +13 -0
- package/dist/src/ui/ExploreIndicator.d.ts.map +1 -0
- package/dist/src/ui/ExploreIndicator.js +14 -0
- package/dist/src/ui/ExploreIndicator.js.map +1 -0
- package/dist/src/ui/Footer.d.ts +19 -0
- package/dist/src/ui/Footer.d.ts.map +1 -0
- package/dist/src/ui/Footer.js +57 -0
- package/dist/src/ui/Footer.js.map +1 -0
- package/dist/src/ui/FullScreenLayout.d.ts +18 -0
- package/dist/src/ui/FullScreenLayout.d.ts.map +1 -0
- package/dist/src/ui/FullScreenLayout.js +14 -0
- package/dist/src/ui/FullScreenLayout.js.map +1 -0
- package/dist/src/ui/Header.d.ts +14 -0
- package/dist/src/ui/Header.d.ts.map +1 -0
- package/dist/src/ui/Header.js +11 -0
- package/dist/src/ui/Header.js.map +1 -0
- package/dist/src/ui/InputBar.d.ts +17 -0
- package/dist/src/ui/InputBar.d.ts.map +1 -0
- package/dist/src/ui/InputBar.js +49 -0
- package/dist/src/ui/InputBar.js.map +1 -0
- package/dist/src/ui/MessageList.d.ts +18 -0
- package/dist/src/ui/MessageList.d.ts.map +1 -0
- package/dist/src/ui/MessageList.js +9 -0
- package/dist/src/ui/MessageList.js.map +1 -0
- package/dist/src/ui/NotificationBar.d.ts +14 -0
- package/dist/src/ui/NotificationBar.d.ts.map +1 -0
- package/dist/src/ui/NotificationBar.js +38 -0
- package/dist/src/ui/NotificationBar.js.map +1 -0
- package/dist/src/ui/ScrollableMessageList.d.ts +27 -0
- package/dist/src/ui/ScrollableMessageList.d.ts.map +1 -0
- package/dist/src/ui/ScrollableMessageList.js +16 -0
- package/dist/src/ui/ScrollableMessageList.js.map +1 -0
- package/dist/src/ui/SessionBrowser.d.ts +20 -0
- package/dist/src/ui/SessionBrowser.d.ts.map +1 -0
- package/dist/src/ui/SessionBrowser.js +93 -0
- package/dist/src/ui/SessionBrowser.js.map +1 -0
- package/dist/src/ui/StatusMessage.d.ts +13 -0
- package/dist/src/ui/StatusMessage.d.ts.map +1 -0
- package/dist/src/ui/StatusMessage.js +17 -0
- package/dist/src/ui/StatusMessage.js.map +1 -0
- package/dist/src/ui/StreamingView.d.ts +19 -0
- package/dist/src/ui/StreamingView.d.ts.map +1 -0
- package/dist/src/ui/StreamingView.js +18 -0
- package/dist/src/ui/StreamingView.js.map +1 -0
- package/dist/src/ui/SubagentDisplay.d.ts +13 -0
- package/dist/src/ui/SubagentDisplay.d.ts.map +1 -0
- package/dist/src/ui/SubagentDisplay.js +22 -0
- package/dist/src/ui/SubagentDisplay.js.map +1 -0
- package/dist/src/ui/ThinkingDisplay.d.ts +13 -0
- package/dist/src/ui/ThinkingDisplay.d.ts.map +1 -0
- package/dist/src/ui/ThinkingDisplay.js +15 -0
- package/dist/src/ui/ThinkingDisplay.js.map +1 -0
- package/dist/src/ui/ToolCallDisplay.d.ts +16 -0
- package/dist/src/ui/ToolCallDisplay.d.ts.map +1 -0
- package/dist/src/ui/ToolCallDisplay.js +136 -0
- package/dist/src/ui/ToolCallDisplay.js.map +1 -0
- package/dist/src/ui/UserMessage.d.ts +12 -0
- package/dist/src/ui/UserMessage.d.ts.map +1 -0
- package/dist/src/ui/UserMessage.js +5 -0
- package/dist/src/ui/UserMessage.js.map +1 -0
- package/dist/src/ui/commands/clear.d.ts +7 -0
- package/dist/src/ui/commands/clear.d.ts.map +1 -0
- package/dist/src/ui/commands/clear.js +13 -0
- package/dist/src/ui/commands/clear.js.map +1 -0
- package/dist/src/ui/commands/help.d.ts +7 -0
- package/dist/src/ui/commands/help.d.ts.map +1 -0
- package/dist/src/ui/commands/help.js +26 -0
- package/dist/src/ui/commands/help.js.map +1 -0
- package/dist/src/ui/commands/index.d.ts +14 -0
- package/dist/src/ui/commands/index.d.ts.map +1 -0
- package/dist/src/ui/commands/index.js +15 -0
- package/dist/src/ui/commands/index.js.map +1 -0
- package/dist/src/ui/commands/model.d.ts +7 -0
- package/dist/src/ui/commands/model.d.ts.map +1 -0
- package/dist/src/ui/commands/model.js +16 -0
- package/dist/src/ui/commands/model.js.map +1 -0
- package/dist/src/ui/commands/registry.d.ts +30 -0
- package/dist/src/ui/commands/registry.d.ts.map +1 -0
- package/dist/src/ui/commands/registry.js +45 -0
- package/dist/src/ui/commands/registry.js.map +1 -0
- package/dist/src/ui/commands/sessions.d.ts +7 -0
- package/dist/src/ui/commands/sessions.d.ts.map +1 -0
- package/dist/src/ui/commands/sessions.js +13 -0
- package/dist/src/ui/commands/sessions.js.map +1 -0
- package/dist/src/ui/commands/stats.d.ts +7 -0
- package/dist/src/ui/commands/stats.d.ts.map +1 -0
- package/dist/src/ui/commands/stats.js +33 -0
- package/dist/src/ui/commands/stats.js.map +1 -0
- package/dist/src/ui/commands/theme.d.ts +7 -0
- package/dist/src/ui/commands/theme.d.ts.map +1 -0
- package/dist/src/ui/commands/theme.js +35 -0
- package/dist/src/ui/commands/theme.js.map +1 -0
- package/dist/src/ui/markdown/CodeBlock.d.ts +14 -0
- package/dist/src/ui/markdown/CodeBlock.d.ts.map +1 -0
- package/dist/src/ui/markdown/CodeBlock.js +55 -0
- package/dist/src/ui/markdown/CodeBlock.js.map +1 -0
- package/dist/src/ui/markdown/InlineRenderer.d.ts +12 -0
- package/dist/src/ui/markdown/InlineRenderer.d.ts.map +1 -0
- package/dist/src/ui/markdown/InlineRenderer.js +70 -0
- package/dist/src/ui/markdown/InlineRenderer.js.map +1 -0
- package/dist/src/ui/markdown/MarkdownDisplay.d.ts +17 -0
- package/dist/src/ui/markdown/MarkdownDisplay.d.ts.map +1 -0
- package/dist/src/ui/markdown/MarkdownDisplay.js +142 -0
- package/dist/src/ui/markdown/MarkdownDisplay.js.map +1 -0
- package/dist/src/ui/markdown/Table.d.ts +14 -0
- package/dist/src/ui/markdown/Table.d.ts.map +1 -0
- package/dist/src/ui/markdown/Table.js +31 -0
- package/dist/src/ui/markdown/Table.js.map +1 -0
- package/dist/src/ui/theme.d.ts +39 -0
- package/dist/src/ui/theme.d.ts.map +1 -0
- package/dist/src/ui/theme.js +39 -0
- package/dist/src/ui/theme.js.map +1 -0
- package/dist/src/ui/themes/index.d.ts +45 -0
- package/dist/src/ui/themes/index.d.ts.map +1 -0
- package/dist/src/ui/themes/index.js +73 -0
- package/dist/src/ui/themes/index.js.map +1 -0
- package/dist/src/ui/themes/light.d.ts +8 -0
- package/dist/src/ui/themes/light.d.ts.map +1 -0
- package/dist/src/ui/themes/light.js +37 -0
- package/dist/src/ui/themes/light.js.map +1 -0
- package/dist/src/ui/themes/monochrome.d.ts +8 -0
- package/dist/src/ui/themes/monochrome.d.ts.map +1 -0
- package/dist/src/ui/themes/monochrome.js +37 -0
- package/dist/src/ui/themes/monochrome.js.map +1 -0
- package/dist/src/ui/types.d.ts +191 -0
- package/dist/src/ui/types.d.ts.map +1 -0
- package/dist/src/ui/types.js +7 -0
- package/dist/src/ui/types.js.map +1 -0
- package/dist/src/ui/useAlternateBuffer.d.ts +11 -0
- package/dist/src/ui/useAlternateBuffer.d.ts.map +1 -0
- package/dist/src/ui/useAlternateBuffer.js +25 -0
- package/dist/src/ui/useAlternateBuffer.js.map +1 -0
- package/dist/src/ui/useChat.d.ts +18 -0
- package/dist/src/ui/useChat.d.ts.map +1 -0
- package/dist/src/ui/useChat.js +599 -0
- package/dist/src/ui/useChat.js.map +1 -0
- package/dist/src/ui/useElapsedTime.d.ts +11 -0
- package/dist/src/ui/useElapsedTime.d.ts.map +1 -0
- package/dist/src/ui/useElapsedTime.js +39 -0
- package/dist/src/ui/useElapsedTime.js.map +1 -0
- package/dist/src/ui/useResponsiveLayout.d.ts +16 -0
- package/dist/src/ui/useResponsiveLayout.d.ts.map +1 -0
- package/dist/src/ui/useResponsiveLayout.js +24 -0
- package/dist/src/ui/useResponsiveLayout.js.map +1 -0
- package/dist/src/ui/useScroll.d.ts +20 -0
- package/dist/src/ui/useScroll.d.ts.map +1 -0
- package/dist/src/ui/useScroll.js +64 -0
- package/dist/src/ui/useScroll.js.map +1 -0
- package/dist/src/ui/useSessionResume.d.ts +20 -0
- package/dist/src/ui/useSessionResume.d.ts.map +1 -0
- package/dist/src/ui/useSessionResume.js +77 -0
- package/dist/src/ui/useSessionResume.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +60 -0
- package/src/auth/index.ts +13 -0
- package/src/auth/oauth2.test.ts +305 -0
- package/src/auth/oauth2.ts +269 -0
- package/src/auth/prompt.test.ts +205 -0
- package/src/auth/prompt.ts +111 -0
- package/src/auth/test-connection.test.ts +224 -0
- package/src/auth/test-connection.ts +196 -0
- package/src/auth/types.ts +34 -0
- package/src/commands/audit.test.ts +92 -0
- package/src/commands/audit.ts +113 -0
- package/src/commands/automations.test.ts +85 -0
- package/src/commands/automations.ts +205 -0
- package/src/commands/build-manifest-types.ts +35 -0
- package/src/commands/build-tools.ts +281 -0
- package/src/commands/build.test.ts +63 -0
- package/src/commands/build.ts +135 -0
- package/src/commands/chat.ts +147 -0
- package/src/commands/command-exports.test.ts +88 -0
- package/src/commands/connect.test.ts +343 -0
- package/src/commands/connect.ts +237 -0
- package/src/commands/deploy.test.ts +124 -0
- package/src/commands/deploy.ts +153 -0
- package/src/commands/deployments.ts +90 -0
- package/src/commands/dev.test.ts +63 -0
- package/src/commands/dev.ts +124 -0
- package/src/commands/diff.test.ts +183 -0
- package/src/commands/diff.ts +143 -0
- package/src/commands/docker.ts +232 -0
- package/src/commands/eval.test.ts +88 -0
- package/src/commands/eval.ts +268 -0
- package/src/commands/experiment.test.ts +125 -0
- package/src/commands/experiment.ts +153 -0
- package/src/commands/index.ts +76 -0
- package/src/commands/init.test.ts +109 -0
- package/src/commands/init.ts +98 -0
- package/src/commands/inspect.test.ts +234 -0
- package/src/commands/inspect.ts +157 -0
- package/src/commands/install-pkg.test.ts +265 -0
- package/src/commands/install-pkg.ts +234 -0
- package/src/commands/link.ts +270 -0
- package/src/commands/list.test.ts +152 -0
- package/src/commands/list.ts +95 -0
- package/src/commands/login.test.ts +195 -0
- package/src/commands/login.ts +258 -0
- package/src/commands/promote.ts +64 -0
- package/src/commands/publish.test.ts +203 -0
- package/src/commands/publish.ts +142 -0
- package/src/commands/rollback.ts +72 -0
- package/src/commands/search.test.ts +174 -0
- package/src/commands/search.ts +154 -0
- package/src/commands/secrets.test.ts +168 -0
- package/src/commands/secrets.ts +163 -0
- package/src/commands/serve.ts +166 -0
- package/src/commands/status.ts +94 -0
- package/src/commands/sync.test.ts +130 -0
- package/src/commands/sync.ts +119 -0
- package/src/commands/test-query.test.ts +42 -0
- package/src/commands/test-query.ts +129 -0
- package/src/commands/uninstall.test.ts +162 -0
- package/src/commands/uninstall.ts +107 -0
- package/src/commands/update.test.ts +281 -0
- package/src/commands/update.ts +180 -0
- package/src/commands/validate.test.ts +260 -0
- package/src/commands/validate.ts +139 -0
- package/src/e2e-automations.test.ts +305 -0
- package/src/e2e-commands.test.ts +587 -0
- package/src/e2e-incident-response.test.ts +345 -0
- package/src/e2e-plugin-connections.test.ts +415 -0
- package/src/e2e-plugins.test.ts +492 -0
- package/src/e2e.test.ts +602 -0
- package/src/fixtures/incident-response.ts +232 -0
- package/src/main.ts +35 -0
- package/src/shared/platform-client.test.ts +106 -0
- package/src/shared/platform-client.ts +193 -0
- package/src/shared/repo-discovery.test.ts +56 -0
- package/src/shared/repo-discovery.ts +40 -0
- package/src/templates/compose-template.ts +30 -0
- package/src/templates/config-template.ts +44 -0
- package/src/templates/deployment-templates.test.ts +99 -0
- package/src/templates/dockerfile-template.ts +30 -0
- package/src/templates/env-template.ts +27 -0
- package/src/templates/knowledge-template.ts +24 -0
- package/src/templates/skill-template.ts +27 -0
- package/src/ui/AskUserPrompt.tsx +58 -0
- package/src/ui/AssistantMessage.tsx +51 -0
- package/src/ui/ChatApp.tsx +283 -0
- package/src/ui/ConfirmationPrompt.tsx +75 -0
- package/src/ui/DiffRenderer.test.ts +104 -0
- package/src/ui/DiffRenderer.tsx +188 -0
- package/src/ui/ExpandableContent.tsx +68 -0
- package/src/ui/ExploreIndicator.tsx +44 -0
- package/src/ui/Footer.tsx +87 -0
- package/src/ui/FullScreenLayout.tsx +45 -0
- package/src/ui/Header.tsx +50 -0
- package/src/ui/InputBar.tsx +105 -0
- package/src/ui/MessageList.tsx +31 -0
- package/src/ui/NotificationBar.tsx +64 -0
- package/src/ui/ScrollableMessageList.tsx +82 -0
- package/src/ui/SessionBrowser.test.ts +49 -0
- package/src/ui/SessionBrowser.tsx +179 -0
- package/src/ui/StatusMessage.tsx +35 -0
- package/src/ui/StreamingView.tsx +87 -0
- package/src/ui/SubagentDisplay.tsx +57 -0
- package/src/ui/ThinkingDisplay.tsx +45 -0
- package/src/ui/ToolCallDisplay.tsx +268 -0
- package/src/ui/UserMessage.tsx +22 -0
- package/src/ui/chat-e2e.test.ts +581 -0
- package/src/ui/commands/clear.ts +15 -0
- package/src/ui/commands/help.ts +31 -0
- package/src/ui/commands/index.ts +22 -0
- package/src/ui/commands/model.ts +19 -0
- package/src/ui/commands/registry.test.ts +76 -0
- package/src/ui/commands/registry.ts +66 -0
- package/src/ui/commands/sessions.ts +16 -0
- package/src/ui/commands/stats.ts +35 -0
- package/src/ui/commands/theme.ts +41 -0
- package/src/ui/markdown/CodeBlock.tsx +118 -0
- package/src/ui/markdown/InlineRenderer.tsx +115 -0
- package/src/ui/markdown/MarkdownDisplay.tsx +223 -0
- package/src/ui/markdown/Table.tsx +75 -0
- package/src/ui/theme.ts +39 -0
- package/src/ui/themes/index.ts +113 -0
- package/src/ui/themes/light.ts +39 -0
- package/src/ui/themes/monochrome.ts +39 -0
- package/src/ui/types.ts +157 -0
- package/src/ui/useAlternateBuffer.ts +27 -0
- package/src/ui/useChat.test.ts +492 -0
- package/src/ui/useChat.ts +693 -0
- package/src/ui/useElapsedTime.test.ts +33 -0
- package/src/ui/useElapsedTime.ts +43 -0
- package/src/ui/useResponsiveLayout.test.ts +54 -0
- package/src/ui/useResponsiveLayout.ts +32 -0
- package/src/ui/useScroll.test.ts +99 -0
- package/src/ui/useScroll.ts +97 -0
- package/src/ui/useSessionResume.test.ts +80 -0
- package/src/ui/useSessionResume.ts +102 -0
- package/tsconfig.json +17 -0
- package/vitest.config.ts +20 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Amodal Labs, Inc.
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
5
|
+
*/
|
|
6
|
+
import { loadRepo, buildSyncPlan } from '@amodalai/core';
|
|
7
|
+
import { findRepoRoot } from '../shared/repo-discovery.js';
|
|
8
|
+
/**
|
|
9
|
+
* For each connection with an OpenAPI spec URL, fetch the spec,
|
|
10
|
+
* detect drift against the surface endpoints, and optionally
|
|
11
|
+
* apply updates interactively.
|
|
12
|
+
*/
|
|
13
|
+
export async function runSync(options = {}) {
|
|
14
|
+
let repoPath;
|
|
15
|
+
try {
|
|
16
|
+
repoPath = findRepoRoot(options.cwd);
|
|
17
|
+
}
|
|
18
|
+
catch (err) {
|
|
19
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
20
|
+
process.stderr.write(`[sync] ${msg}\n`);
|
|
21
|
+
return 1;
|
|
22
|
+
}
|
|
23
|
+
process.stderr.write(`[sync] Loading repo from ${repoPath}\n`);
|
|
24
|
+
const repo = await loadRepo({ localPath: repoPath });
|
|
25
|
+
let hasDrift = false;
|
|
26
|
+
for (const [name, conn] of repo.connections) {
|
|
27
|
+
if (options.connection && name !== options.connection) {
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
if (conn.spec.format !== 'openapi') {
|
|
31
|
+
process.stderr.write(`[sync] ${name}: not an openapi connection (${conn.spec.format}), skipping\n`);
|
|
32
|
+
continue;
|
|
33
|
+
}
|
|
34
|
+
process.stderr.write(`[sync] ${name}: checking for drift...\n`);
|
|
35
|
+
try {
|
|
36
|
+
const plan = await buildSyncPlan(conn);
|
|
37
|
+
printSyncPlan(name, plan);
|
|
38
|
+
if (plan.added.length > 0 || plan.removed.length > 0 || plan.changed.length > 0) {
|
|
39
|
+
hasDrift = true;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
catch (err) {
|
|
43
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
44
|
+
process.stderr.write(`[sync] ${name}: error — ${msg}\n`);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
if (options.check) {
|
|
48
|
+
return hasDrift ? 1 : 0;
|
|
49
|
+
}
|
|
50
|
+
return 0;
|
|
51
|
+
}
|
|
52
|
+
function printSyncPlan(connectionName, plan) {
|
|
53
|
+
const total = plan.added.length + plan.removed.length + plan.changed.length;
|
|
54
|
+
if (total === 0) {
|
|
55
|
+
process.stderr.write(`[sync] ${connectionName}: in sync (${plan.unchanged.length} endpoints)\n`);
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
process.stderr.write(`[sync] ${connectionName}: ${total} change(s) detected\n`);
|
|
59
|
+
for (const ep of plan.added) {
|
|
60
|
+
const label = 'method' in ep ? `${ep['method']} ${ep['path']}` : ep.name;
|
|
61
|
+
process.stderr.write(` + ${label}\n`);
|
|
62
|
+
}
|
|
63
|
+
for (const ep of plan.removed) {
|
|
64
|
+
process.stderr.write(` - ${ep.method} ${ep.path}\n`);
|
|
65
|
+
}
|
|
66
|
+
for (const change of plan.changed) {
|
|
67
|
+
const label = 'endpoint' in change ? change['endpoint'] : change.name;
|
|
68
|
+
process.stderr.write(` ~ ${label} (${change.changes.join(', ')})\n`);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
export const syncCommand = {
|
|
72
|
+
command: 'sync',
|
|
73
|
+
describe: 'Check for OpenAPI spec drift',
|
|
74
|
+
builder: {
|
|
75
|
+
check: {
|
|
76
|
+
type: 'boolean',
|
|
77
|
+
default: false,
|
|
78
|
+
describe: 'CI mode — exit 1 if drift detected',
|
|
79
|
+
},
|
|
80
|
+
connection: {
|
|
81
|
+
type: 'string',
|
|
82
|
+
describe: 'Only sync a specific connection',
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
handler: async (argv) => {
|
|
86
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
|
87
|
+
const check = argv['check'];
|
|
88
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
|
89
|
+
const connection = argv['connection'];
|
|
90
|
+
const code = await runSync({ check, connection });
|
|
91
|
+
process.exit(code);
|
|
92
|
+
},
|
|
93
|
+
};
|
|
94
|
+
//# sourceMappingURL=sync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync.js","sourceRoot":"","sources":["../../../src/commands/sync.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,QAAQ,EAAC,aAAa,EAAC,MAAM,gBAAgB,CAAC;AAGtD,OAAO,EAAC,YAAY,EAAC,MAAM,6BAA6B,CAAC;AAUzD;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,UAAuB,EAAE;IACrD,IAAI,QAAgB,CAAC;IACrB,IAAI,CAAC;QACH,QAAQ,GAAG,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACvC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,GAAG,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,M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IAAI,IAAI,CAAC,CAAC;IACxD,CAAC;IAED,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;QAClC,MAAM,KAAK,GAAG,UAAU,IAAI,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC;QACtE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,KAAK,KAAK,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACxE,CAAC;AACH,CAAC;AAED,MAAM,CAAC,MAAM,WAAW,GAAkB;IACxC,OAAO,EAAE,MAAM;IACf,QAAQ,EAAE,8BAA8B;IACxC,OAAO,EAAE;QACP,KAAK,EAAE;YACL,IAAI,EAAE,SAAkB;YACxB,OAAO,EAAE,KAAK;YACd,QAAQ,EAAE,oCAAoC;SAC/C;QACD,UAAU,EAAE;YACV,IAAI,EAAE,QAAiB;YACvB,QAAQ,EAAE,iCAAiC;SAC5C;KACF;IACD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;QACtB,uEAAuE;QACvE,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAY,CAAC;QACvC,uEAAuE;QACvE,MAAM,UAAU,GAAG,IAAI,CAAC,YAAY,CAAuB,CAAC;QAC5D,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,EAAC,KAAK,EAAE,UAAU,EAAC,CAAC,CAAC;QAChD,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrB,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Amodal Labs, Inc.
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
5
|
+
*/
|
|
6
|
+
import type { CommandModule } from 'yargs';
|
|
7
|
+
export interface TestQueryOptions {
|
|
8
|
+
cwd?: string;
|
|
9
|
+
message: string;
|
|
10
|
+
tenantId?: string;
|
|
11
|
+
port?: number;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Sends a single test query to an ephemeral repo server and streams
|
|
15
|
+
* the response to stdout.
|
|
16
|
+
*/
|
|
17
|
+
export declare function runTestQuery(options: TestQueryOptions): Promise<void>;
|
|
18
|
+
export declare const testQueryCommand: CommandModule;
|
|
19
|
+
//# sourceMappingURL=test-query.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-query.d.ts","sourceRoot":"","sources":["../../../src/commands/test-query.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,OAAO,CAAC;AAIzC,MAAM,WAAW,gBAAgB;IAC/B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CA6E3E;AAED,eAAO,MAAM,gBAAgB,EAAE,aA4B9B,CAAC"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Amodal Labs, Inc.
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
5
|
+
*/
|
|
6
|
+
import { createLocalServer } from '@amodalai/runtime';
|
|
7
|
+
import { findRepoRoot } from '../shared/repo-discovery.js';
|
|
8
|
+
/**
|
|
9
|
+
* Sends a single test query to an ephemeral repo server and streams
|
|
10
|
+
* the response to stdout.
|
|
11
|
+
*/
|
|
12
|
+
export async function runTestQuery(options) {
|
|
13
|
+
let repoPath;
|
|
14
|
+
try {
|
|
15
|
+
repoPath = findRepoRoot(options.cwd);
|
|
16
|
+
}
|
|
17
|
+
catch (err) {
|
|
18
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
19
|
+
process.stderr.write(`[test-query] ${msg}\n`);
|
|
20
|
+
process.exit(1);
|
|
21
|
+
}
|
|
22
|
+
const port = options.port ?? 0; // 0 = random available port
|
|
23
|
+
const tenantId = options.tenantId ?? 'test-user';
|
|
24
|
+
process.stderr.write(`[test-query] Loading repo from ${repoPath}\n`);
|
|
25
|
+
const server = await createLocalServer({
|
|
26
|
+
repoPath,
|
|
27
|
+
port,
|
|
28
|
+
host: '127.0.0.1',
|
|
29
|
+
hotReload: false,
|
|
30
|
+
});
|
|
31
|
+
const httpServer = await server.start();
|
|
32
|
+
const addr = httpServer.address();
|
|
33
|
+
const actualPort = typeof addr === 'object' && addr !== null ? addr.port : port;
|
|
34
|
+
try {
|
|
35
|
+
const url = `http://127.0.0.1:${actualPort}/chat`;
|
|
36
|
+
const response = await fetch(url, {
|
|
37
|
+
method: 'POST',
|
|
38
|
+
headers: { 'Content-Type': 'application/json' },
|
|
39
|
+
body: JSON.stringify({
|
|
40
|
+
message: options.message,
|
|
41
|
+
tenant_id: tenantId,
|
|
42
|
+
}),
|
|
43
|
+
});
|
|
44
|
+
if (!response.ok) {
|
|
45
|
+
process.stderr.write(`[test-query] HTTP ${response.status}: ${await response.text()}\n`);
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
// Parse SSE response
|
|
49
|
+
const text = await response.text();
|
|
50
|
+
const lines = text.split('\n');
|
|
51
|
+
for (const line of lines) {
|
|
52
|
+
if (!line.startsWith('data: '))
|
|
53
|
+
continue;
|
|
54
|
+
const jsonStr = line.substring(6);
|
|
55
|
+
try {
|
|
56
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- parsing SSE event
|
|
57
|
+
const event = JSON.parse(jsonStr);
|
|
58
|
+
if (event['type'] === 'text_delta') {
|
|
59
|
+
process.stdout.write(String(event['content'] ?? ''));
|
|
60
|
+
}
|
|
61
|
+
else if (event['type'] === 'tool_call_start') {
|
|
62
|
+
process.stderr.write(`\n[tool] ${event['tool_name']}(${JSON.stringify(event['parameters'])})\n`);
|
|
63
|
+
}
|
|
64
|
+
else if (event['type'] === 'tool_call_result') {
|
|
65
|
+
const status = event['status'];
|
|
66
|
+
if (status === 'error') {
|
|
67
|
+
process.stderr.write(`[tool] ERROR: ${event['error']}\n`);
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
const result = String(event['result'] ?? '');
|
|
71
|
+
const preview = result.length > 200 ? result.substring(0, 200) + '...' : result;
|
|
72
|
+
process.stderr.write(`[tool] OK (${event['duration_ms']}ms): ${preview}\n`);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
else if (event['type'] === 'error') {
|
|
76
|
+
process.stderr.write(`\n[error] ${event['message']}\n`);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
catch {
|
|
80
|
+
// Skip invalid JSON lines
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
process.stdout.write('\n');
|
|
84
|
+
}
|
|
85
|
+
finally {
|
|
86
|
+
await server.stop();
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
export const testQueryCommand = {
|
|
90
|
+
command: 'test-query <message>',
|
|
91
|
+
describe: 'Send a test query to the local server',
|
|
92
|
+
builder: (yargs) => yargs
|
|
93
|
+
.positional('message', {
|
|
94
|
+
type: 'string',
|
|
95
|
+
demandOption: true,
|
|
96
|
+
describe: 'The message to send',
|
|
97
|
+
})
|
|
98
|
+
.option('tenant-id', {
|
|
99
|
+
type: 'string',
|
|
100
|
+
describe: 'Tenant ID to use for the query',
|
|
101
|
+
})
|
|
102
|
+
.option('port', {
|
|
103
|
+
type: 'number',
|
|
104
|
+
describe: 'Port for the ephemeral server',
|
|
105
|
+
}),
|
|
106
|
+
handler: async (argv) => {
|
|
107
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
|
108
|
+
const message = argv['message'];
|
|
109
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
|
110
|
+
const tenantId = argv['tenant-id'];
|
|
111
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
|
112
|
+
const port = argv['port'];
|
|
113
|
+
await runTestQuery({ message, tenantId, port });
|
|
114
|
+
},
|
|
115
|
+
};
|
|
116
|
+
//# sourceMappingURL=test-query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-query.js","sourceRoot":"","sources":["../../../src/commands/test-query.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAC,iBAAiB,EAAC,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAC,YAAY,EAAC,MAAM,6BAA6B,CAAC;AASzD;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,OAAyB;IAC1D,IAAI,QAAgB,CAAC;IACrB,IAAI,CAAC;QACH,QAAQ,GAAG,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACvC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,GAAG,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAC7D,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;QAC9C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,4BAA4B;IAC5D,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,WAAW,CAAC;IAEjD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,kCAAkC,QAAQ,IAAI,CAAC,CAAC;IAErE,MAAM,MAAM,GAAG,MAAM,iBAAiB,CAAC;QACrC,QAAQ;QACR,IAAI;QACJ,IAAI,EAAE,WAAW;QACjB,S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from 'yargs';
|
|
7
|
+
import type { PackageType } from '@amodalai/core';
|
|
8
|
+
export interface UninstallOptions {
|
|
9
|
+
cwd?: string;
|
|
10
|
+
type: PackageType;
|
|
11
|
+
name: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Uninstall a package: npm uninstall + remove lock entry + remove symlink.
|
|
15
|
+
* Returns 0 on success, 1 on error.
|
|
16
|
+
*/
|
|
17
|
+
export declare function runUninstall(options: UninstallOptions): Promise<number>;
|
|
18
|
+
export declare const uninstallCommand: CommandModule;
|
|
19
|
+
//# sourceMappingURL=uninstall.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uninstall.d.ts","sourceRoot":"","sources":["../../../src/commands/uninstall.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,OAAO,CAAC;AAUzC,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAGhD,MAAM,WAAW,gBAAgB;IAC/B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,CA4D7E;AAED,eAAO,MAAM,gBAAgB,EAAE,aAY9B,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Amodal Labs, Inc.
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
5
|
+
*/
|
|
6
|
+
import { unlink, stat } from 'node:fs/promises';
|
|
7
|
+
import { join } from 'node:path';
|
|
8
|
+
import { getLockEntry, getNpmContextPaths, makePackageRef, npmUninstall, removeConfigDep, removeLockEntry, toSymlinkName, } from '@amodalai/core';
|
|
9
|
+
import { findRepoRoot } from '../shared/repo-discovery.js';
|
|
10
|
+
/**
|
|
11
|
+
* Uninstall a package: npm uninstall + remove lock entry + remove symlink.
|
|
12
|
+
* Returns 0 on success, 1 on error.
|
|
13
|
+
*/
|
|
14
|
+
export async function runUninstall(options) {
|
|
15
|
+
let repoPath;
|
|
16
|
+
try {
|
|
17
|
+
repoPath = findRepoRoot(options.cwd);
|
|
18
|
+
}
|
|
19
|
+
catch (err) {
|
|
20
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
21
|
+
process.stderr.write(`[uninstall] ${msg}\n`);
|
|
22
|
+
return 1;
|
|
23
|
+
}
|
|
24
|
+
const entry = await getLockEntry(repoPath, options.type, options.name);
|
|
25
|
+
if (!entry) {
|
|
26
|
+
process.stderr.write(`[uninstall] ${options.type}/${options.name} is not installed.\n`);
|
|
27
|
+
return 1;
|
|
28
|
+
}
|
|
29
|
+
const paths = getNpmContextPaths(repoPath);
|
|
30
|
+
const ref = makePackageRef(options.type, options.name);
|
|
31
|
+
try {
|
|
32
|
+
await npmUninstall(paths, ref.npmName);
|
|
33
|
+
}
|
|
34
|
+
catch (err) {
|
|
35
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
36
|
+
process.stderr.write(`[uninstall] npm uninstall failed: ${msg}\n`);
|
|
37
|
+
return 1;
|
|
38
|
+
}
|
|
39
|
+
await removeLockEntry(repoPath, options.type, options.name);
|
|
40
|
+
// Remove from amodal.json dependencies
|
|
41
|
+
try {
|
|
42
|
+
await removeConfigDep(repoPath, options.type, options.name);
|
|
43
|
+
}
|
|
44
|
+
catch {
|
|
45
|
+
// Non-fatal — the dependency may not have been in amodal.json
|
|
46
|
+
}
|
|
47
|
+
// Remove symlink (ignore if already gone)
|
|
48
|
+
const symlinkPath = join(paths.root, toSymlinkName(options.type, options.name));
|
|
49
|
+
try {
|
|
50
|
+
await unlink(symlinkPath);
|
|
51
|
+
}
|
|
52
|
+
catch (err) {
|
|
53
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
|
54
|
+
if (err.code !== 'ENOENT') {
|
|
55
|
+
process.stderr.write(`[uninstall] Warning: could not remove symlink: ${symlinkPath}\n`);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
// Check for repo override directory
|
|
59
|
+
const overrideDir = join(repoPath, `${options.type}s`, options.name);
|
|
60
|
+
try {
|
|
61
|
+
const s = await stat(overrideDir);
|
|
62
|
+
if (s.isDirectory()) {
|
|
63
|
+
process.stderr.write(`[uninstall] Note: local override directory still exists: ${overrideDir}\n`);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
catch {
|
|
67
|
+
// No override dir — nothing to note
|
|
68
|
+
}
|
|
69
|
+
process.stderr.write(`[uninstall] Removed ${options.type}/${options.name}\n`);
|
|
70
|
+
return 0;
|
|
71
|
+
}
|
|
72
|
+
export const uninstallCommand = {
|
|
73
|
+
command: 'uninstall <type> <name>',
|
|
74
|
+
describe: 'Uninstall a package',
|
|
75
|
+
builder: (yargs) => yargs
|
|
76
|
+
.positional('type', { type: 'string', demandOption: true, choices: ['connection', 'skill', 'automation', 'knowledge'], describe: 'Package type' })
|
|
77
|
+
.positional('name', { type: 'string', demandOption: true, describe: 'Package name' }),
|
|
78
|
+
handler: async (argv) => {
|
|
79
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
|
80
|
+
const code = await runUninstall({ type: argv['type'], name: argv['name'] });
|
|
81
|
+
process.exit(code);
|
|
82
|
+
},
|
|
83
|
+
};
|
|
84
|
+
//# sourceMappingURL=uninstall.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uninstall.js","sourceRoot":"","sources":["../../../src/commands/uninstall.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,MAAM,EAAE,IAAI,EAAC,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAC,IAAI,EAAC,MAAM,WAAW,CAAC;AAG/B,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,cAAc,EACd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M,CAAC,KAAK,CAAC,uBAAuB,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,IAAI,IAAI,CAAC,CAAC;IAC9E,OAAO,CAAC,CAAC;AACX,CAAC;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAkB;IAC7C,OAAO,EAAE,yBAAyB;IAClC,QAAQ,EAAE,qBAAqB;IAC/B,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CACjB,KAAK;SACF,UAAU,CAAC,MAAM,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAE,YAAY,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,YAAY,EAAE,OAAO,EAAE,YAAY,EAAE,WAAW,CAAU,EAAE,QAAQ,EAAE,cAAc,EAAC,CAAC;SACxJ,UAAU,CAAC,MAAM,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,cAAc,EAAC,CAAC;IACvF,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;QACtB,uEAAuE;QACvE,MAAM,IAAI,GAAG,MAAM,YAAY,CAAC,EAAC,IAAI,EAAE,IAAI,CAAC,MAAM,CAAgB,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,CAAW,EAAC,CAAC,CAAC;QACnG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrB,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Amodal Labs, Inc.
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
5
|
+
*/
|
|
6
|
+
import type { CommandModule } from 'yargs';
|
|
7
|
+
import type { PackageType } from '@amodalai/core';
|
|
8
|
+
export interface UpdateOptions {
|
|
9
|
+
cwd?: string;
|
|
10
|
+
type?: PackageType;
|
|
11
|
+
name?: string;
|
|
12
|
+
latest?: boolean;
|
|
13
|
+
dryRun?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Update installed packages to newer versions.
|
|
17
|
+
* Returns the number of failures (0 = success).
|
|
18
|
+
*/
|
|
19
|
+
export declare function runUpdate(options?: UpdateOptions): Promise<number>;
|
|
20
|
+
export declare const updateCommand: CommandModule;
|
|
21
|
+
//# sourceMappingURL=update.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../src/commands/update.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,OAAO,CAAC;AAWzC,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAIhD,MAAM,WAAW,aAAa;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AASD;;;GAGG;AACH,wBAAsB,SAAS,CAAC,OAAO,GAAE,aAAkB,GAAG,OAAO,CAAC,MAAM,CAAC,CAmH5E;AAED,eAAO,MAAM,aAAa,EAAE,aAsB3B,CAAC"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Amodal Labs, Inc.
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
5
|
+
*/
|
|
6
|
+
import { addLockEntry, ensureNpmContext, ensureSymlink, makePackageRef, npmInstall, npmViewVersions, parsePackageKey, readLockFile, } from '@amodalai/core';
|
|
7
|
+
import * as semver from 'semver';
|
|
8
|
+
import { findRepoRoot } from '../shared/repo-discovery.js';
|
|
9
|
+
/**
|
|
10
|
+
* Update installed packages to newer versions.
|
|
11
|
+
* Returns the number of failures (0 = success).
|
|
12
|
+
*/
|
|
13
|
+
export async function runUpdate(options = {}) {
|
|
14
|
+
let repoPath;
|
|
15
|
+
try {
|
|
16
|
+
repoPath = findRepoRoot(options.cwd);
|
|
17
|
+
}
|
|
18
|
+
catch (err) {
|
|
19
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
20
|
+
process.stderr.write(`[update] ${msg}\n`);
|
|
21
|
+
return 1;
|
|
22
|
+
}
|
|
23
|
+
const paths = await ensureNpmContext(repoPath);
|
|
24
|
+
const lockFile = await readLockFile(repoPath);
|
|
25
|
+
if (!lockFile) {
|
|
26
|
+
process.stderr.write('[update] No lock file found. Install packages first.\n');
|
|
27
|
+
return 1;
|
|
28
|
+
}
|
|
29
|
+
// Build list of targets
|
|
30
|
+
const targets = [];
|
|
31
|
+
for (const [key, entry] of Object.entries(lockFile.packages)) {
|
|
32
|
+
const parsed = parsePackageKey(key);
|
|
33
|
+
if (options.type && parsed.type !== options.type)
|
|
34
|
+
continue;
|
|
35
|
+
if (options.name && parsed.name !== options.name)
|
|
36
|
+
continue;
|
|
37
|
+
targets.push({
|
|
38
|
+
type: parsed.type,
|
|
39
|
+
name: parsed.name,
|
|
40
|
+
currentVersion: entry.version,
|
|
41
|
+
npmName: entry.npm,
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
if (targets.length === 0) {
|
|
45
|
+
if (options.type || options.name) {
|
|
46
|
+
process.stderr.write('[update] No matching packages found in lock file.\n');
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
process.stderr.write('[update] No packages installed.\n');
|
|
50
|
+
}
|
|
51
|
+
return 0;
|
|
52
|
+
}
|
|
53
|
+
// Check for updates
|
|
54
|
+
const updates = [];
|
|
55
|
+
let failures = 0;
|
|
56
|
+
for (const target of targets) {
|
|
57
|
+
try {
|
|
58
|
+
const versions = await npmViewVersions(paths, target.npmName);
|
|
59
|
+
let newVersion;
|
|
60
|
+
if (options.latest) {
|
|
61
|
+
// Take the absolute latest
|
|
62
|
+
newVersion = semver.maxSatisfying(versions, '*');
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
// Stay within current major (^current)
|
|
66
|
+
newVersion = semver.maxSatisfying(versions, `^${target.currentVersion}`);
|
|
67
|
+
}
|
|
68
|
+
if (!newVersion || newVersion === target.currentVersion) {
|
|
69
|
+
process.stderr.write(`[update] ${target.npmName}@${target.currentVersion} is already up to date.\n`);
|
|
70
|
+
continue;
|
|
71
|
+
}
|
|
72
|
+
updates.push({ target, newVersion });
|
|
73
|
+
}
|
|
74
|
+
catch (err) {
|
|
75
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
76
|
+
process.stderr.write(`[update] Failed to check ${target.npmName}: ${msg}\n`);
|
|
77
|
+
failures++;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
if (updates.length === 0) {
|
|
81
|
+
if (failures === 0) {
|
|
82
|
+
process.stderr.write('[update] All packages are up to date.\n');
|
|
83
|
+
}
|
|
84
|
+
return failures;
|
|
85
|
+
}
|
|
86
|
+
// Print what will be updated
|
|
87
|
+
if (options.dryRun) {
|
|
88
|
+
process.stderr.write('[update] Dry run — the following would be updated:\n');
|
|
89
|
+
for (const { target, newVersion } of updates) {
|
|
90
|
+
process.stderr.write(` ${target.npmName}: ${target.currentVersion} → ${newVersion}\n`);
|
|
91
|
+
}
|
|
92
|
+
return 0;
|
|
93
|
+
}
|
|
94
|
+
// Perform updates
|
|
95
|
+
for (const { target, newVersion } of updates) {
|
|
96
|
+
process.stderr.write(`[update] Updating ${target.npmName}: ${target.currentVersion} → ${newVersion}...\n`);
|
|
97
|
+
try {
|
|
98
|
+
const ref = makePackageRef(target.type, target.name);
|
|
99
|
+
const result = await npmInstall(paths, target.npmName, newVersion);
|
|
100
|
+
await addLockEntry(repoPath, target.type, target.name, {
|
|
101
|
+
version: result.version,
|
|
102
|
+
npm: target.npmName,
|
|
103
|
+
integrity: result.integrity,
|
|
104
|
+
});
|
|
105
|
+
await ensureSymlink(paths, ref);
|
|
106
|
+
process.stderr.write(`[update] Updated ${target.npmName}@${result.version}\n`);
|
|
107
|
+
}
|
|
108
|
+
catch (err) {
|
|
109
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
110
|
+
process.stderr.write(`[update] Failed to update ${target.npmName}: ${msg}\n`);
|
|
111
|
+
failures++;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
const successCount = updates.length - failures;
|
|
115
|
+
if (failures > 0) {
|
|
116
|
+
process.stderr.write(`[update] ${failures} of ${updates.length} update${updates.length === 1 ? '' : 's'} failed.\n`);
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
process.stderr.write(`[update] ${successCount} package${successCount === 1 ? '' : 's'} updated.\n`);
|
|
120
|
+
}
|
|
121
|
+
return failures;
|
|
122
|
+
}
|
|
123
|
+
export const updateCommand = {
|
|
124
|
+
command: 'update [type] [name]',
|
|
125
|
+
describe: 'Update installed packages',
|
|
126
|
+
builder: (yargs) => yargs
|
|
127
|
+
.positional('type', { type: 'string', choices: ['connection', 'skill', 'automation', 'knowledge'], describe: 'Package type' })
|
|
128
|
+
.positional('name', { type: 'string', describe: 'Package name' })
|
|
129
|
+
.option('latest', { type: 'boolean', default: false, describe: 'Allow major version updates' })
|
|
130
|
+
.option('dry-run', { type: 'boolean', default: false, describe: 'Show what would be updated' }),
|
|
131
|
+
handler: async (argv) => {
|
|
132
|
+
const code = await runUpdate({
|
|
133
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
|
134
|
+
type: argv['type'],
|
|
135
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
|
136
|
+
name: argv['name'],
|
|
137
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
|
138
|
+
latest: argv['latest'],
|
|
139
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
|
140
|
+
dryRun: argv['dryRun'],
|
|
141
|
+
});
|
|
142
|
+
process.exit(code);
|
|
143
|
+
},
|
|
144
|
+
};
|
|
145
|
+
//# sourceMappingURL=update.js.map
|
|
@@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vE,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAY;YACjC,uEAAuE;YACvE,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAY;SAClC,CAAC,CAAC;QACH,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrB,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Amodal Labs, Inc.
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
5
|
+
*/
|
|
6
|
+
import type { CommandModule } from 'yargs';
|
|
7
|
+
export interface ValidateOptions {
|
|
8
|
+
cwd?: string;
|
|
9
|
+
packages?: boolean;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Validates the amodal project configuration by loading the full repo
|
|
13
|
+
* and running cross-reference checks.
|
|
14
|
+
*
|
|
15
|
+
* Returns the number of errors found (0 = valid).
|
|
16
|
+
*/
|
|
17
|
+
export declare function runValidate(options?: ValidateOptions): Promise<number>;
|
|
18
|
+
export declare const validateCommand: CommandModule;
|
|
19
|
+
//# sourceMappingURL=validate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../src/commands/validate.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,OAAO,CAAC;AAIzC,MAAM,WAAW,eAAe;IAC9B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAOD;;;;;GAKG;AACH,wBAAsB,WAAW,CAAC,OAAO,GAAE,eAAoB,GAAG,OAAO,CAAC,MAAM,CAAC,CAoGhF;AAED,eAAO,MAAM,eAAe,EAAE,aAU7B,CAAC"}
|