@intelligo-dev/cli 1.0.0-beta.1 → 1.0.0-beta.14
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/NOTICE +6 -0
- package/README.md +102 -0
- package/dist/bin.js +122 -37
- package/dist/bin.js.map +1 -1
- package/dist/commands/add.d.ts +26 -1
- package/dist/commands/add.d.ts.map +1 -1
- package/dist/commands/add.js +70 -4
- package/dist/commands/add.js.map +1 -1
- package/dist/commands/create-flow.d.ts +37 -0
- package/dist/commands/create-flow.d.ts.map +1 -0
- package/dist/commands/create-flow.js +212 -0
- package/dist/commands/create-flow.js.map +1 -0
- package/dist/commands/create.d.ts +27 -6
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/create.js +53 -13
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/doctor.d.ts +14 -3
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +295 -37
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/migrate-check.d.ts +73 -1
- package/dist/commands/migrate-check.d.ts.map +1 -1
- package/dist/commands/migrate-check.js +130 -5
- package/dist/commands/migrate-check.js.map +1 -1
- package/dist/commands/migrate.d.ts +97 -0
- package/dist/commands/migrate.d.ts.map +1 -0
- package/dist/commands/migrate.js +141 -0
- package/dist/commands/migrate.js.map +1 -0
- package/dist/commands/sync-messages.d.ts +37 -0
- package/dist/commands/sync-messages.d.ts.map +1 -0
- package/dist/commands/sync-messages.js +88 -0
- package/dist/commands/sync-messages.js.map +1 -0
- package/dist/commands/sync-scaffold.d.ts +36 -0
- package/dist/commands/sync-scaffold.d.ts.map +1 -0
- package/dist/commands/sync-scaffold.js +53 -0
- package/dist/commands/sync-scaffold.js.map +1 -0
- package/dist/commands/sync.d.ts +103 -0
- package/dist/commands/sync.d.ts.map +1 -0
- package/dist/commands/sync.js +361 -0
- package/dist/commands/sync.js.map +1 -0
- package/dist/commands/upgrade-check.d.ts +5 -5
- package/dist/commands/upgrade-check.d.ts.map +1 -1
- package/dist/commands/upgrade-check.js +22 -6
- package/dist/commands/upgrade-check.js.map +1 -1
- package/dist/env-files.d.ts +12 -0
- package/dist/env-files.d.ts.map +1 -0
- package/dist/env-files.js +29 -0
- package/dist/env-files.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/dist/manifest.d.ts +36 -15
- package/dist/manifest.d.ts.map +1 -1
- package/dist/manifest.js +32 -16
- package/dist/manifest.js.map +1 -1
- package/dist/migrations.d.ts +3 -6
- package/dist/migrations.d.ts.map +1 -1
- package/dist/migrations.js +3 -6
- package/dist/migrations.js.map +1 -1
- package/dist/model-catalogue.d.ts +14 -0
- package/dist/model-catalogue.d.ts.map +1 -0
- package/dist/model-catalogue.js +34 -0
- package/dist/model-catalogue.js.map +1 -0
- package/dist/module-exports.d.ts +63 -0
- package/dist/module-exports.d.ts.map +1 -0
- package/dist/module-exports.js +231 -0
- package/dist/module-exports.js.map +1 -0
- package/dist/registry-bundle.d.ts +43 -0
- package/dist/registry-bundle.d.ts.map +1 -0
- package/dist/registry-bundle.js +74 -0
- package/dist/registry-bundle.js.map +1 -0
- package/dist/registry-items.d.ts +84 -0
- package/dist/registry-items.d.ts.map +1 -0
- package/dist/registry-items.js +187 -0
- package/dist/registry-items.js.map +1 -0
- package/package.json +36 -10
- package/src/bin.ts +316 -0
- package/src/commands/add.ts +255 -0
- package/src/commands/create-flow.ts +284 -0
- package/src/commands/create.ts +149 -0
- package/src/commands/doctor.ts +487 -0
- package/src/commands/migrate-check.ts +298 -0
- package/src/commands/migrate.ts +228 -0
- package/src/commands/sync-messages.ts +114 -0
- package/src/commands/sync-scaffold.ts +83 -0
- package/src/commands/sync.ts +534 -0
- package/src/commands/upgrade-check.ts +160 -0
- package/src/env-files.ts +31 -0
- package/src/index.ts +39 -0
- package/src/manifest.ts +147 -0
- package/src/migrations-dir.ts +25 -0
- package/src/migrations.ts +133 -0
- package/src/model-catalogue.ts +35 -0
- package/src/module-exports.ts +266 -0
- package/src/registry-bundle.ts +103 -0
- package/src/registry-items.ts +237 -0
- package/templates/admin-page/admin-page.tsx.tpl +2 -3
- package/templates/app-scaffold/assistant-route.ts.tpl +2 -2
- package/templates/app-scaffold/auth-route.ts.tpl +10 -0
- package/templates/app-scaffold/components.json.tpl +6 -2
- package/templates/app-scaffold/db-schema.ts.tpl +29 -0
- package/templates/app-scaffold/drizzle-journal.json.tpl +5 -0
- package/templates/app-scaffold/drizzle.config.ts.tpl +45 -0
- package/templates/app-scaffold/env.example.tpl +65 -1
- package/templates/app-scaffold/globals.css.tpl +172 -281
- package/templates/app-scaffold/i18n-request.ts.tpl +25 -0
- package/templates/app-scaffold/instrumentation.ts.tpl +21 -0
- package/templates/app-scaffold/intelligo.ts.tpl +95 -41
- package/templates/app-scaffold/layout.tsx.tpl +18 -1
- package/templates/app-scaffold/lib-utils.ts.tpl +1 -6
- package/templates/app-scaffold/next.config.mjs.tpl +2 -0
- package/templates/app-scaffold/package.json.tpl +31 -17
- package/templates/app-scaffold/page.tsx.tpl +16 -0
- package/templates/app-scaffold/plans.ts.tpl +32 -13
- package/templates/app-scaffold/{middleware.ts.tpl → proxy.ts.tpl} +6 -0
- package/templates/app-scaffold/sonner.tsx.tpl +42 -20
- package/templates/app-scaffold/stripe-webhook-route.ts.tpl +24 -0
- package/templates/app-scaffold/theme-provider.tsx.tpl +6 -4
- package/templates/app-scaffold/tsconfig.json.tpl +20 -4
- package/templates/app-scaffold/use-mobile.ts.tpl +19 -0
- package/templates/app-scaffold/workspace-bootstrap.ts.tpl +30 -0
- package/templates/maintenance/maintenance-route.ts.tpl +119 -0
- package/templates/manifest.json +75 -17
- package/templates/registry/ai-agent-activity.json +23 -0
- package/templates/registry/ai-agent-progress.json +21 -0
- package/templates/registry/ai-approval-card.json +27 -0
- package/templates/registry/ai-artifact.json +22 -0
- package/templates/registry/ai-branch.json +21 -0
- package/templates/registry/ai-citations.json +24 -0
- package/templates/registry/ai-code-block.json +23 -0
- package/templates/registry/ai-composer-menu.json +19 -0
- package/templates/registry/ai-file-diff.json +25 -0
- package/templates/registry/ai-image-generation.json +23 -0
- package/templates/registry/ai-markdown.json +23 -0
- package/templates/registry/ai-message-bubble.json +23 -0
- package/templates/registry/ai-message-scroller.json +22 -0
- package/templates/registry/ai-message.json +21 -0
- package/templates/registry/ai-motion.json +19 -0
- package/templates/registry/ai-prompt-input.json +28 -0
- package/templates/registry/ai-reasoning-text.json +22 -0
- package/templates/registry/ai-reasoning.json +22 -0
- package/templates/registry/ai-shimmer-text.json +19 -0
- package/templates/registry/ai-sidebar.json +25 -0
- package/templates/registry/ai-speech-input.json +21 -0
- package/templates/registry/ai-streaming-response.json +24 -0
- package/templates/registry/ai-suggestion.json +19 -0
- package/templates/registry/ai-todo-list.json +22 -0
- package/templates/registry/ai-tool-approval.json +26 -0
- package/templates/registry/ai-tool-result.json +25 -0
- package/templates/registry/alert-dialog.json +23 -0
- package/templates/registry/animated-list.json +21 -0
- package/templates/registry/app-shell.json +93 -0
- package/templates/registry/artifacts.json +82 -0
- package/templates/registry/attachment.json +22 -0
- package/templates/registry/auth-email-verification.json +39 -0
- package/templates/registry/auth-login.json +72 -0
- package/templates/registry/auth-password-reset.json +53 -0
- package/templates/registry/auth-signup.json +41 -0
- package/templates/registry/billing-settings.json +60 -0
- package/templates/registry/button.json +22 -0
- package/templates/registry/chat-eve.json +19 -0
- package/templates/registry/chat-panel.json +30 -0
- package/templates/registry/chat-share.json +42 -0
- package/templates/registry/chat-widget.json +34 -0
- package/templates/registry/chat.json +326 -0
- package/templates/registry/checkbox.json +22 -0
- package/templates/registry/checkout.json +40 -0
- package/templates/registry/collapsible.json +19 -0
- package/templates/registry/command.json +23 -0
- package/templates/registry/copy-button.json +21 -0
- package/templates/registry/dashboard.json +69 -0
- package/templates/registry/dialog.json +24 -0
- package/templates/registry/document-viewer.json +22 -0
- package/templates/registry/dropdown-menu.json +23 -0
- package/templates/registry/expandable-tabs.json +22 -0
- package/templates/registry/feature-gating.json +73 -0
- package/templates/registry/file-upload.json +24 -0
- package/templates/registry/hold-action-button.json +22 -0
- package/templates/registry/input-group.json +23 -0
- package/templates/registry/input.json +19 -0
- package/templates/registry/intelligo.json +187 -0
- package/templates/registry/invitation-accept.json +64 -0
- package/templates/registry/language-switcher.json +29 -0
- package/templates/registry/morphing-modal.json +24 -0
- package/templates/registry/notification-stack.json +24 -0
- package/templates/registry/notifications.json +87 -0
- package/templates/registry/onboarding.json +83 -0
- package/templates/registry/otp-input.json +22 -0
- package/templates/registry/page-header.json +15 -0
- package/templates/registry/payment-poll.json +52 -0
- package/templates/registry/popover-morph.json +22 -0
- package/templates/registry/popover.json +22 -0
- package/templates/registry/pricing.json +111 -0
- package/templates/registry/privacy-settings.json +65 -0
- package/templates/registry/profile-settings.json +68 -0
- package/templates/registry/progress.json +19 -0
- package/templates/registry/radio-group.json +22 -0
- package/templates/registry/registry.json +2945 -0
- package/templates/registry/route-error.json +65 -0
- package/templates/registry/select-morph.json +23 -0
- package/templates/registry/select.json +23 -0
- package/templates/registry/settings-shell.json +47 -0
- package/templates/registry/sheet.json +24 -0
- package/templates/registry/sidebar.json +28 -0
- package/templates/registry/smoke.json +34 -0
- package/templates/registry/spinner.json +16 -0
- package/templates/registry/stat-card.json +18 -0
- package/templates/registry/status-badge.json +18 -0
- package/templates/registry/switch.json +20 -0
- package/templates/registry/tabs.json +23 -0
- package/templates/registry/team-settings.json +97 -0
- package/templates/registry/textarea.json +16 -0
- package/templates/registry/tooltip.json +22 -0
- package/templates/registry/trial-banner.json +43 -0
- package/templates/registry/usage.json +84 -0
- package/templates/registry/workspace-settings.json +71 -0
- package/templates/registry-items.json +116 -0
- package/templates/registry-requires.json +180 -0
- package/templates/usage-page/usage-page.tsx.tpl +23 -8
- package/templates/vitest/server-only.ts.tpl +7 -0
- package/templates/vitest/vitest.config.ts.tpl +37 -0
- package/templates/billing-page/billing-page.tsx.tpl +0 -72
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "chat-widget",
|
|
4
|
+
"title": "Chat Widget",
|
|
5
|
+
"description": "The floating assistant: a launcher in a corner of every page and a compact chat over it, configured in lib/chat-widget-config.tsx. Requires the chat item.",
|
|
6
|
+
"dependencies": [
|
|
7
|
+
"lucide-react",
|
|
8
|
+
"next-intl"
|
|
9
|
+
],
|
|
10
|
+
"registryDependencies": [
|
|
11
|
+
"@intelligo/button"
|
|
12
|
+
],
|
|
13
|
+
"files": [
|
|
14
|
+
{
|
|
15
|
+
"path": "base/chat-widget/components/chat-widget.tsx",
|
|
16
|
+
"content": "\"use client\";\n\n/**\n * The floating assistant: a launcher in a corner of every page and a\n * compact chat that opens over the page — the same thread the chat\n * page runs, in the widget variant. Mounted once in the app layout;\n * `lib/chat-widget-config.tsx` says where it sits, which agent it\n * runs as, and which routes hide it.\n *\n * Each open conversation is a real one, minted when the widget first\n * opens and kept for the page's lifetime. `body` on the component adds\n * per-page context to every turn; `chatWidgetConfig.body` adds the\n * product's.\n *\n * Installed from the `chat-widget` item; requires the `chat` item.\n */\n\nimport { Suspense, useState } from \"react\";\nimport { useTranslations } from \"next-intl\";\nimport { MessageSquareIcon, XIcon } from \"lucide-react\";\n\nimport { ChatThread } from \"@/components/chat/chat-thread\";\nimport { Button } from \"@/components/ui/button\";\nimport { usePathname } from \"@/i18n/navigation\";\nimport { chatWidgetConfig } from \"@/lib/chat-widget-config\";\nimport { cn } from \"@/lib/utils\";\n\ninterface ChatWidgetProps {\n /** Per-page context, merged over `chatWidgetConfig.body`. */\n body?: Record<string, unknown>;\n className?: string;\n}\n\nexport function ChatWidget({ body, className }: ChatWidgetProps) {\n const t = useTranslations(\"chat-widget\");\n const pathname = usePathname();\n const [open, setOpen] = useState(false);\n const [id] = useState(() => crypto.randomUUID());\n\n // Segment-aware: hiding on `/chat` must not hide it on `/chatbots`.\n const hidden = (chatWidgetConfig.hideOn ?? []).some(\n (prefix) => pathname === prefix || pathname.startsWith(`${prefix}/`)\n );\n if (hidden) return null;\n\n const corner =\n chatWidgetConfig.position === \"bottom-left\"\n ? \"sm:right-auto sm:left-4\"\n : \"sm:left-auto sm:right-4\";\n const name = chatWidgetConfig.agent?.name ?? t(\"title\");\n\n return (\n <div\n className={cn(\n \"fixed inset-x-4 bottom-4 z-50 flex flex-col items-end gap-3\",\n corner,\n className\n )}\n >\n {open ? (\n <section\n role=\"dialog\"\n aria-label={name}\n className=\"flex h-128 max-h-dvh w-full flex-col overflow-hidden rounded-xl border bg-background shadow-lg sm:w-96\"\n >\n <header className=\"flex items-center justify-between gap-2 border-b px-3 py-2\">\n <span className=\"flex min-w-0 items-center gap-2 text-sm font-medium\">\n {chatWidgetConfig.agent?.icon ? (\n <span aria-hidden>{chatWidgetConfig.agent.icon}</span>\n ) : null}\n <span className=\"truncate\">{name}</span>\n </span>\n <Button\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label={t(\"close\")}\n onClick={() => setOpen(false)}\n >\n <XIcon />\n </Button>\n </header>\n <Suspense fallback={null}>\n <ChatThread\n conversationId={id}\n initialMessages={[]}\n variant=\"widget\"\n agentId={chatWidgetConfig.agent?.id}\n body={{ ...chatWidgetConfig.body, ...body }}\n autoFocus\n />\n </Suspense>\n </section>\n ) : null}\n <Button\n size=\"lg\"\n className=\"rounded-full shadow-lg\"\n aria-expanded={open}\n aria-label={open ? t(\"close\") : t(\"trigger\")}\n onClick={() => setOpen((value) => !value)}\n >\n {open ? <XIcon /> : <MessageSquareIcon />}\n <span className={open ? \"sr-only\" : undefined}>{t(\"trigger\")}</span>\n </Button>\n </div>\n );\n}\n",
|
|
17
|
+
"type": "registry:component",
|
|
18
|
+
"target": "components/chat/chat-widget.tsx"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"path": "base/chat-widget/lib/chat-widget-config.tsx",
|
|
22
|
+
"content": "/**\n * Chat widget config — the consumer-owned seam for the floating\n * assistant (composition through a config you own, never a\n * component edit).\n *\n * - `position`: which corner the launcher sits in.\n * - `agent`: which agent the widget's conversations run as, when it\n * differs from the chat page's (`chatConfig.agent`).\n * - `body`: sent with every turn — a static product context. For\n * per-page context pass `body` to `<ChatWidget>` where it mounts.\n * - `hideOn`: pathname prefixes where the launcher is not shown (the\n * chat page itself, auth pages).\n *\n * Mount the widget once, in your app layout:\n *\n * import { ChatWidget } from \"@/components/chat/chat-widget\";\n * …\n * <ChatWidget />\n */\n\nexport interface ChatWidgetConfig {\n position?: \"bottom-right\" | \"bottom-left\";\n agent?: { id?: string; name?: string; icon?: string };\n body?: Record<string, unknown>;\n hideOn?: string[];\n}\n\nexport const chatWidgetConfig: ChatWidgetConfig = {\n position: \"bottom-right\",\n hideOn: [\"/chat\", \"/login\", \"/signup\"],\n};\n",
|
|
23
|
+
"type": "registry:file",
|
|
24
|
+
"target": "lib/chat-widget-config.tsx"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"path": "base/chat-widget/messages/en.json",
|
|
28
|
+
"content": "{\n \"trigger\": \"Chat\",\n \"title\": \"Assistant\",\n \"close\": \"Close chat\"\n}\n",
|
|
29
|
+
"type": "registry:file",
|
|
30
|
+
"target": "messages/en/chat-widget.json"
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"type": "registry:block"
|
|
34
|
+
}
|