@agent-native/core 0.129.1 → 0.130.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/corpus/README.md +2 -2
- package/corpus/core/CHANGELOG.md +78 -0
- package/corpus/core/docs/content/cloneable-saas.mdx +114 -0
- package/corpus/core/docs/content/creating-templates.mdx +28 -2
- package/corpus/core/docs/content/syncing-template-changes.mdx +7 -0
- package/corpus/core/docs/content/template-clips-developers.mdx +12 -5
- package/corpus/core/docs/content/template-dispatch-developers.mdx +1 -1
- package/corpus/core/docs/content/template-dispatch.mdx +1 -1
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/action-ui.ts +1 -0
- package/corpus/core/src/action.ts +5 -1
- package/corpus/core/src/agent/engine/ai-sdk-engine.ts +15 -5
- package/corpus/core/src/agent/harness/runner.ts +5 -0
- package/corpus/core/src/agent/production-agent.ts +33 -0
- package/corpus/core/src/agent/run-loop-with-resume.ts +5 -0
- package/corpus/core/src/agent/run-manager.ts +126 -1
- package/corpus/core/src/agent/thread-data-builder.ts +47 -2
- package/corpus/core/src/agent/types.ts +2 -0
- package/corpus/core/src/chat-threads/store.ts +4 -5
- package/corpus/core/src/cli/create.ts +1139 -65
- package/corpus/core/src/cli/design-connect.ts +3 -7
- package/corpus/core/src/cli/index.ts +5 -3
- package/corpus/core/src/cli/skills-content/design-visual-edit-skill.ts +83 -47
- package/corpus/core/src/client/AssistantChat.tsx +27 -16
- package/corpus/core/src/client/agent-chat-adapter.ts +24 -0
- package/corpus/core/src/client/blocks/library/wireframe-kit.tsx +17 -2
- package/corpus/core/src/client/chat/index.ts +1 -0
- package/corpus/core/src/client/chat/message-components.tsx +104 -1
- package/corpus/core/src/client/chat/run-recovery.tsx +15 -3
- package/corpus/core/src/client/chat/widgets/DataTableWidget.tsx +10 -29
- package/corpus/core/src/client/chat/widgets/WorkspaceFileWidget.tsx +71 -0
- package/corpus/core/src/client/chat/widgets/builtin-tool-renderers.tsx +22 -0
- package/corpus/core/src/client/chat/widgets/workspace-file-result.ts +49 -0
- package/corpus/core/src/client/embed-auth.ts +2 -0
- package/corpus/core/src/client/org/InvitationBanner.tsx +14 -1
- package/corpus/core/src/client/org/OrgSwitcher.tsx +23 -0
- package/corpus/core/src/client/org/TeamPage.tsx +130 -0
- package/corpus/core/src/client/org/WorkspaceNotice.tsx +85 -0
- package/corpus/core/src/client/org/hooks.ts +14 -0
- package/corpus/core/src/client/org/index.ts +2 -0
- package/corpus/core/src/client/resources/McpIntegrationDialog.tsx +27 -40
- package/corpus/core/src/client/resources/ResourcesPanel.tsx +134 -51
- package/corpus/core/src/client/resources/mcp-integration-catalog.ts +7 -0
- package/corpus/core/src/client/resources/use-resources.ts +6 -0
- package/corpus/core/src/client/use-action.ts +3 -1
- package/corpus/core/src/client/widgets/index.ts +1 -0
- package/corpus/core/src/coding-tools/run-code.ts +2 -1
- package/corpus/core/src/db/client.ts +28 -4
- package/corpus/core/src/deploy/build.ts +31 -3
- package/corpus/core/src/eject/remote-mcp-presets.ts +1 -1
- package/corpus/core/src/index.browser.ts +1 -0
- package/corpus/core/src/index.ts +1 -0
- package/corpus/core/src/integrations/google-docs-poller.ts +3 -0
- package/corpus/core/src/integrations/webhook-handler.ts +28 -11
- package/corpus/core/src/jobs/scheduler.ts +4 -0
- package/corpus/core/src/localization/default-messages.ts +3 -2
- package/corpus/core/src/mcp/build-server.ts +20 -2
- package/corpus/core/src/observability/traces.ts +48 -12
- package/corpus/core/src/org/handlers.ts +52 -1
- package/corpus/core/src/org/migrations.ts +4 -0
- package/corpus/core/src/org/plugin.ts +14 -0
- package/corpus/core/src/org/schema.ts +1 -0
- package/corpus/core/src/org/types.ts +8 -0
- package/corpus/core/src/org/workspace-url.ts +74 -0
- package/corpus/core/src/resources/handlers.ts +35 -5
- package/corpus/core/src/scripts/runner.ts +183 -5
- package/corpus/core/src/server/action-routes.ts +32 -2
- package/corpus/core/src/server/agent-chat-plugin.ts +29 -0
- package/corpus/core/src/server/agent-teams.ts +10 -1
- package/corpus/core/src/server/auth.ts +33 -7
- package/corpus/core/src/server/embed-route.ts +9 -0
- package/corpus/core/src/server/embed-session.ts +62 -3
- package/corpus/core/src/server/open-route.ts +20 -6
- package/corpus/core/src/server/prompts/framework-core-compact.ts +1 -1
- package/corpus/core/src/server/prompts/framework-core.ts +1 -0
- package/corpus/core/src/server/request-context.ts +36 -1
- package/corpus/core/src/shared/embed-auth.ts +1 -0
- package/corpus/core/src/shared/html-document.ts +115 -0
- package/corpus/core/src/shared/index.ts +1 -0
- package/corpus/core/src/sharing/access.ts +8 -1
- package/corpus/core/src/sharing/registry.ts +11 -2
- package/corpus/core/src/workspace-files/actions.ts +100 -0
- package/corpus/core/src/workspace-files/tool.ts +4 -0
- package/corpus/templates/analytics/.agents/skills/analysis-workspace/SKILL.md +4 -0
- package/corpus/templates/analytics/.agents/skills/hubspot/SKILL.md +9 -1
- package/corpus/templates/analytics/AGENTS.md +17 -24
- package/corpus/templates/analytics/actions/data-source-status.ts +11 -1
- package/corpus/templates/analytics/app/i18n-data.ts +34 -0
- package/corpus/templates/analytics/app/lib/data-source-status.ts +86 -0
- package/corpus/templates/analytics/app/lib/native-mcp-exclusions.ts +9 -0
- package/corpus/templates/analytics/app/pages/DataSources.tsx +184 -20
- package/corpus/templates/analytics/changelog/2026-07-28-native-analytics-data-sources-no-longer-show-duplicate-mc.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-29-exports-now-appear-in-chat-with-a-direct-download-instead-of.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-29-queued-chat-prompts-no-longer-resend-after-analytics-navigat.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-29-scheduled-dashboard-emails-load-every-panel-reliably-without.md +6 -0
- package/corpus/templates/analytics/scripts/emit-netlify-dashboard-report-cron.ts +6 -3
- package/corpus/templates/analytics/server/lib/credential-keys.ts +1 -1
- package/corpus/templates/analytics/server/lib/hubspot.ts +1 -1
- package/corpus/templates/analytics/server/lib/provider-credentials.ts +55 -1
- package/corpus/templates/analytics/server/plugins/agent-chat.ts +123 -27
- package/corpus/templates/analytics/server/routes/[...page].get.ts +2 -7
- package/corpus/templates/analytics/vite.config.ts +7 -0
- package/corpus/templates/brain/actions/list-connection-providers.ts +100 -2
- package/corpus/templates/brain/app/lib/brain.ts +10 -0
- package/corpus/templates/brain/app/routes/sources.tsx +15 -4
- package/corpus/templates/brain/changelog/2026-07-29-brain-automatically-retries-failed-source-syncs-and-guides-y.md +6 -0
- package/corpus/templates/brain/jobs/process-ingest-queue.ts +13 -0
- package/corpus/templates/brain/server/jobs/sync-sources.ts +27 -22
- package/corpus/templates/brain/server/plugins/agent-chat.ts +2 -1
- package/corpus/templates/brain/server/routes/api/brain/queue/run.post.ts +7 -1
- package/corpus/templates/clips/AGENTS.md +1 -1
- package/corpus/templates/clips/actions/create-recording-agent-link.ts +11 -1
- package/corpus/templates/clips/actions/update-comment.ts +68 -0
- package/corpus/templates/clips/app/components/editor/editor-layout.tsx +0 -1
- package/corpus/templates/clips/app/components/player/comments-panel.tsx +221 -65
- package/corpus/templates/clips/app/components/player/video-player.tsx +101 -27
- package/corpus/templates/clips/app/i18n/en-US.ts +2 -1
- package/corpus/templates/clips/app/routes/bug-report.done.tsx +48 -27
- package/corpus/templates/clips/app/routes/bug-report.tsx +43 -4
- package/corpus/templates/clips/app/routes/record.tsx +2 -0
- package/corpus/templates/clips/changelog/2026-07-29-clip-playback-now-recovers-instead-of-getting-stuck-when-a-b.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-29-comments-can-now-be-edited-after-posting.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-29-download-actions-now-use-a-shorter-clearer-label.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-29-embedded-bug-reports-now-return-a-temporary-agent-readable.md +6 -0
- package/corpus/templates/clips/desktop/src-tauri/src/native_screen.rs +1 -1
- package/corpus/templates/clips/desktop/src-tauri/src/system_audio.rs +21 -1
- package/corpus/templates/clips/shared/bug-report.ts +99 -0
- package/corpus/templates/content/actions/_content-database-personal-view.ts +7 -1
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +5 -2
- package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +20 -8
- package/corpus/templates/content/changelog/2026-07-29-missing-databases-no-longer-trigger-repeated-personal-view-e.md +6 -0
- package/corpus/templates/design/.agents/skills/visual-edit/SKILL.md +83 -47
- package/corpus/templates/design/.generated/bridge/editor-chrome.generated.ts +474 -55
- package/corpus/templates/design/.generated/bridge/embedded-wheel.generated.ts +3 -0
- package/corpus/templates/design/.generated/bridge/hit-test.generated.ts +18 -1
- package/corpus/templates/design/.generated/bridge/source-location.generated.ts +348 -0
- package/corpus/templates/design/actions/add-localhost-screens.ts +2 -7
- package/corpus/templates/design/actions/apply-visual-edit.ts +7 -1
- package/corpus/templates/design/actions/connect-localhost.ts +5 -9
- package/corpus/templates/design/actions/create-component.ts +16 -13
- package/corpus/templates/design/actions/grant-localhost-write-consent.ts +2 -7
- package/corpus/templates/design/actions/list-design-source-capabilities.ts +4 -7
- package/corpus/templates/design/actions/list-local-files.ts +26 -50
- package/corpus/templates/design/actions/list-localhost-connections.ts +2 -7
- package/corpus/templates/design/actions/migrate-board-objects-to-file.ts +2 -2
- package/corpus/templates/design/actions/open-visual-edit.ts +234 -135
- package/corpus/templates/design/actions/read-local-file.ts +26 -50
- package/corpus/templates/design/actions/request-localhost-write-consent.ts +2 -7
- package/corpus/templates/design/actions/write-local-file.ts +31 -73
- package/corpus/templates/design/app/components/design/DesignCanvas.tsx +307 -133
- package/corpus/templates/design/app/components/design/EditPanel.tsx +94 -22
- package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +137 -60
- package/corpus/templates/design/app/components/design/ResponsiveInteractBar.tsx +75 -14
- package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +755 -97
- package/corpus/templates/design/app/components/design/bridge/embedded-wheel.bridge.ts +8 -0
- package/corpus/templates/design/app/components/design/bridge/hit-test.bridge.ts +24 -1
- package/corpus/templates/design/app/components/design/bridge/source-location.bridge.ts +530 -0
- package/corpus/templates/design/app/components/design/code-workbench/CodeWorkbenchLoader.tsx +278 -0
- package/corpus/templates/design/app/components/design/code-workbench/editor/MonacoHost.tsx +32 -12
- package/corpus/templates/design/app/components/design/code-workbench/editor/monaco-setup.ts +14 -3
- package/corpus/templates/design/app/components/design/code-workbench/explorer/ExplorerView.tsx +87 -24
- package/corpus/templates/design/app/components/design/code-workbench/explorer/FileTree.tsx +36 -0
- package/corpus/templates/design/app/components/design/code-workbench/store.tsx +2 -1
- package/corpus/templates/design/app/components/design/code-workbench/workspace/localhost-provider.ts +48 -8
- package/corpus/templates/design/app/components/design/design-canvas/content-size-report.ts +3 -13
- package/corpus/templates/design/app/components/design/design-canvas/embedded-frame.ts +4 -2
- package/corpus/templates/design/app/components/design/design-canvas/hit-test.ts +3 -13
- package/corpus/templates/design/app/components/design/edit-panel/element-classification.ts +3 -1
- package/corpus/templates/design/app/components/design/edit-panel/inspect-code-source.ts +93 -0
- package/corpus/templates/design/app/components/design/multi-screen/board-surface-html.ts +4 -2
- package/corpus/templates/design/app/components/design/multi-screen/cross-screen-drop.ts +35 -0
- package/corpus/templates/design/app/components/design/multi-screen/iframe-targeting.ts +24 -0
- package/corpus/templates/design/app/components/design/multi-screen/types.ts +9 -0
- package/corpus/templates/design/app/components/design/types.ts +29 -0
- package/corpus/templates/design/app/components/layout/Layout.tsx +7 -4
- package/corpus/templates/design/app/hooks/use-navigation-state.ts +3 -0
- package/corpus/templates/design/app/i18n-data.ts +153 -46
- package/corpus/templates/design/app/i18n-responsive-interact.ts +12 -12
- package/corpus/templates/design/app/lib/design-editor-route.ts +23 -0
- package/corpus/templates/design/app/pages/VisualEdit.tsx +19 -6
- package/corpus/templates/design/app/pages/design-editor/action-error.ts +19 -0
- package/corpus/templates/design/app/pages/design-editor/canvas-primitive-insert.ts +29 -0
- package/corpus/templates/design/app/pages/design-editor/clone-and-pen-edit.ts +6 -0
- package/corpus/templates/design/app/pages/design-editor/code-layer-state.ts +277 -15
- package/corpus/templates/design/app/pages/design-editor/editor-state.ts +75 -9
- package/corpus/templates/design/app/pages/design-editor/layer-state-scope.ts +28 -0
- package/corpus/templates/design/app/pages/design-editor/live-screen-layer-drop.ts +41 -0
- package/corpus/templates/design/app/pages/design-editor/pending-edits.ts +496 -41
- package/corpus/templates/design/app/pages/design-editor/pending-live-edit-unload-guard.ts +27 -0
- package/corpus/templates/design/app/pages/design-editor/pending-structure-verification.ts +10 -0
- package/corpus/templates/design/app/pages/design-editor/react-semantic-handoff.ts +168 -9
- package/corpus/templates/design/app/pages/design-editor/responsive-interact.ts +41 -3
- package/corpus/templates/design/app/pages/design-editor/screen-command-utils.ts +5 -0
- package/corpus/templates/design/app/pages/design-editor/selection-state.ts +42 -13
- package/corpus/templates/design/app/pages/design-editor/source-location.ts +180 -0
- package/corpus/templates/design/app/pages/design-editor/tool-state.ts +17 -0
- package/corpus/templates/design/app/public-routes.ts +1 -0
- package/corpus/templates/design/app/routes/visual-edit.$id.tsx +15 -0
- package/corpus/templates/design/changelog/2026-06-29-screen-overview-is-easier-to-find-and-named-screens-open-dir.md +1 -1
- package/corpus/templates/design/changelog/2026-07-28-deleting-a-selected-element-now-removes-it-from-the-live-pre.md +6 -0
- package/corpus/templates/design/changelog/2026-07-28-deleting-an-element-on-a-connected-localhost-screen-now-queu.md +6 -0
- package/corpus/templates/design/changelog/2026-07-28-interact-mode-now-shows-a-responsive-device-preview-with-pre.md +6 -0
- package/corpus/templates/design/changelog/2026-07-28-layer-hide-and-lock-now-apply-to-the-live-preview-instead-of.md +6 -0
- package/corpus/templates/design/changelog/2026-07-28-layers-panel-selections-on-a-connected-localhost-screen-can-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-28-locked-layers-now-show-a-subtle-dashed-outline-in-the-live-p.md +6 -0
- package/corpus/templates/design/changelog/2026-07-28-the-apply-design-updates-button-now-counts-pending-live-text.md +6 -0
- package/corpus/templates/design/changelog/2026-07-28-the-design-canvas-no-longer-stalls-on-a-render-loop-while-a-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-28-visual-edit-on-a-local-dev-server-no-longer-requires-signing.md +6 -0
- package/corpus/templates/design/changelog/2026-07-28-visual-edits-on-a-react-19-app-no-longer-report-a-source-lin.md +6 -0
- package/corpus/templates/design/changelog/2026-07-29-an-edit-that-cannot-be-written-to-source-now-names-the-reaso.md +6 -0
- package/corpus/templates/design/changelog/2026-07-29-applying-a-primitive-dropped-onto-a-connected-localhost-scre.md +6 -0
- package/corpus/templates/design/changelog/2026-07-29-changing-a-style-in-the-inspector-now-updates-a-connected-lo.md +6 -0
- package/corpus/templates/design/changelog/2026-07-29-choosing-edit-or-annotate-from-a-focused-screen-now-returns-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-29-concurrent-source-edits-now-return-a-clear-conflict-response.md +6 -0
- package/corpus/templates/design/changelog/2026-07-29-creating-a-component-from-an-element-that-repeats-in-the-sou.md +6 -0
- package/corpus/templates/design/changelog/2026-07-29-deleting-an-element-you-just-dropped-onto-a-live-screen-no-l.md +6 -0
- package/corpus/templates/design/changelog/2026-07-29-dragging-a-layer-across-screens-no-longer-dies-when-the-poin.md +6 -0
- package/corpus/templates/design/changelog/2026-07-29-dragging-an-element-from-a-stored-screen-into-a-live-localho.md +6 -0
- package/corpus/templates/design/changelog/2026-07-29-drawing-a-box-on-the-canvas-and-dragging-it-into-a-connected.md +6 -0
- package/corpus/templates/design/changelog/2026-07-29-fixed-a-loading-screen-flicker-when-reopening-designs-with-a.md +6 -0
- package/corpus/templates/design/changelog/2026-07-29-interact-mode-has-edit-and-annotate-buttons-again-so-you-can.md +6 -0
- package/corpus/templates/design/changelog/2026-07-29-layer-groups-can-be-dropped-onto-live-localhost-screens.md +6 -0
- package/corpus/templates/design/changelog/2026-07-29-localhost-source-errors-now-say-what-actually-went-wrong-whi.md +6 -0
- package/corpus/templates/design/changelog/2026-07-29-opening-or-refreshing-a-live-localhost-screen-in-single-scre.md +6 -0
- package/corpus/templates/design/changelog/2026-07-29-redo-after-undoing-a-drop-onto-a-live-screen-puts-the-elemen.md +6 -0
- package/corpus/templates/design/changelog/2026-07-29-shapes-can-be-drawn-directly-onto-live-localhost-screens.md +6 -0
- package/corpus/templates/design/changelog/2026-07-29-shapes-drawn-on-the-canvas-board-now-appear-immediately-inst.md +6 -0
- package/corpus/templates/design/changelog/2026-07-29-style-edits-on-a-running-localhost-screen-now-preview-live-a.md +6 -0
- package/corpus/templates/design/changelog/2026-07-29-the-apply-design-updates-control-now-appears-as-a-clean-conn.md +6 -0
- package/corpus/templates/design/changelog/2026-07-29-visual-edits-on-a-mapped-component-instance-now-tell-the-age.md +6 -0
- package/corpus/templates/design/server/lib/design-data-access.ts +21 -7
- package/corpus/templates/design/server/lib/localhost-connection.ts +240 -0
- package/corpus/templates/design/server/routes/[...page].get.ts +2 -5
- package/corpus/templates/design/server/source-workspace.ts +2 -0
- package/corpus/templates/design/shared/code-layer.ts +43 -0
- package/corpus/templates/design/shared/html-content.ts +26 -0
- package/corpus/templates/design/shared/html-integrity.ts +21 -1
- package/corpus/templates/design/shared/local-jsx-visual-edit.ts +15 -0
- package/corpus/templates/design/shared/source-mode.ts +76 -0
- package/corpus/templates/dispatch/changelog/2026-07-29-workspace-members-without-admin-access-now-see-a-clear-permi.md +6 -0
- package/corpus/templates/dispatch/server/lib/usage-metrics.ts +2 -1
- package/corpus/templates/plan/app/lib/plan-annotation-runtime.ts +3 -4
- package/corpus/templates/plan/server/routes/[...page].get.ts +2 -5
- package/corpus/templates/slides/actions/patch-deck.ts +29 -17
- package/corpus/toolkit/CHANGELOG.md +6 -0
- package/corpus/toolkit/package.json +1 -1
- package/corpus/toolkit/src/composer/ComposerPlusMenu.tsx +3 -2
- package/dist/action-ui.d.ts +1 -0
- package/dist/action-ui.d.ts.map +1 -1
- package/dist/action-ui.js +1 -0
- package/dist/action-ui.js.map +1 -1
- package/dist/action.d.ts +5 -1
- package/dist/action.d.ts.map +1 -1
- package/dist/action.js.map +1 -1
- package/dist/agent/engine/ai-sdk-engine.d.ts.map +1 -1
- package/dist/agent/engine/ai-sdk-engine.js +13 -5
- package/dist/agent/engine/ai-sdk-engine.js.map +1 -1
- package/dist/agent/harness/runner.d.ts.map +1 -1
- package/dist/agent/harness/runner.js +5 -0
- package/dist/agent/harness/runner.js.map +1 -1
- package/dist/agent/production-agent.d.ts +16 -0
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +18 -1
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/agent/run-loop-with-resume.d.ts.map +1 -1
- package/dist/agent/run-loop-with-resume.js +6 -0
- package/dist/agent/run-loop-with-resume.js.map +1 -1
- package/dist/agent/run-manager.d.ts +14 -0
- package/dist/agent/run-manager.d.ts.map +1 -1
- package/dist/agent/run-manager.js +91 -1
- package/dist/agent/run-manager.js.map +1 -1
- package/dist/agent/thread-data-builder.d.ts +3 -0
- package/dist/agent/thread-data-builder.d.ts.map +1 -1
- package/dist/agent/thread-data-builder.js +35 -3
- package/dist/agent/thread-data-builder.js.map +1 -1
- package/dist/agent/types.d.ts +2 -0
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/agent/types.js.map +1 -1
- package/dist/chat-threads/store.d.ts.map +1 -1
- package/dist/chat-threads/store.js +4 -6
- package/dist/chat-threads/store.js.map +1 -1
- package/dist/cli/create.d.ts +66 -6
- package/dist/cli/create.d.ts.map +1 -1
- package/dist/cli/create.js +765 -66
- package/dist/cli/create.js.map +1 -1
- package/dist/cli/design-connect.d.ts.map +1 -1
- package/dist/cli/design-connect.js +2 -7
- package/dist/cli/design-connect.js.map +1 -1
- package/dist/cli/index.js +5 -3
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/skills-content/design-visual-edit-skill.d.ts +1 -1
- package/dist/cli/skills-content/design-visual-edit-skill.d.ts.map +1 -1
- package/dist/cli/skills-content/design-visual-edit-skill.js +83 -47
- package/dist/cli/skills-content/design-visual-edit-skill.js.map +1 -1
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +16 -9
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/agent-chat-adapter.d.ts.map +1 -1
- package/dist/client/agent-chat-adapter.js +21 -0
- package/dist/client/agent-chat-adapter.js.map +1 -1
- package/dist/client/blocks/library/wireframe-kit.d.ts +2 -0
- package/dist/client/blocks/library/wireframe-kit.d.ts.map +1 -1
- package/dist/client/blocks/library/wireframe-kit.js +8 -2
- package/dist/client/blocks/library/wireframe-kit.js.map +1 -1
- package/dist/client/chat/index.d.ts +1 -1
- package/dist/client/chat/index.d.ts.map +1 -1
- package/dist/client/chat/index.js +1 -1
- package/dist/client/chat/index.js.map +1 -1
- package/dist/client/chat/message-components.d.ts +17 -0
- package/dist/client/chat/message-components.d.ts.map +1 -1
- package/dist/client/chat/message-components.js +24 -2
- package/dist/client/chat/message-components.js.map +1 -1
- package/dist/client/chat/run-recovery.d.ts +6 -0
- package/dist/client/chat/run-recovery.d.ts.map +1 -1
- package/dist/client/chat/run-recovery.js +13 -3
- package/dist/client/chat/run-recovery.js.map +1 -1
- package/dist/client/chat/widgets/DataTableWidget.d.ts.map +1 -1
- package/dist/client/chat/widgets/DataTableWidget.js +2 -3
- package/dist/client/chat/widgets/DataTableWidget.js.map +1 -1
- package/dist/client/chat/widgets/WorkspaceFileWidget.d.ts +5 -0
- package/dist/client/chat/widgets/WorkspaceFileWidget.d.ts.map +1 -0
- package/dist/client/chat/widgets/WorkspaceFileWidget.js +34 -0
- package/dist/client/chat/widgets/WorkspaceFileWidget.js.map +1 -0
- package/dist/client/chat/widgets/builtin-tool-renderers.d.ts.map +1 -1
- package/dist/client/chat/widgets/builtin-tool-renderers.js +13 -1
- package/dist/client/chat/widgets/builtin-tool-renderers.js.map +1 -1
- package/dist/client/chat/widgets/workspace-file-result.d.ts +12 -0
- package/dist/client/chat/widgets/workspace-file-result.d.ts.map +1 -0
- package/dist/client/chat/widgets/workspace-file-result.js +34 -0
- package/dist/client/chat/widgets/workspace-file-result.js.map +1 -0
- package/dist/client/embed-auth.d.ts.map +1 -1
- package/dist/client/embed-auth.js +2 -1
- package/dist/client/embed-auth.js.map +1 -1
- package/dist/client/org/InvitationBanner.d.ts +5 -2
- package/dist/client/org/InvitationBanner.d.ts.map +1 -1
- package/dist/client/org/InvitationBanner.js +9 -2
- package/dist/client/org/InvitationBanner.js.map +1 -1
- package/dist/client/org/OrgSwitcher.d.ts.map +1 -1
- package/dist/client/org/OrgSwitcher.js +3 -2
- package/dist/client/org/OrgSwitcher.js.map +1 -1
- package/dist/client/org/TeamPage.d.ts.map +1 -1
- package/dist/client/org/TeamPage.js +27 -3
- package/dist/client/org/TeamPage.js.map +1 -1
- package/dist/client/org/WorkspaceNotice.d.ts +18 -0
- package/dist/client/org/WorkspaceNotice.d.ts.map +1 -0
- package/dist/client/org/WorkspaceNotice.js +56 -0
- package/dist/client/org/WorkspaceNotice.js.map +1 -0
- package/dist/client/org/hooks.d.ts +1 -0
- package/dist/client/org/hooks.d.ts.map +1 -1
- package/dist/client/org/hooks.js +12 -0
- package/dist/client/org/hooks.js.map +1 -1
- package/dist/client/org/index.d.ts +2 -1
- package/dist/client/org/index.d.ts.map +1 -1
- package/dist/client/org/index.js +2 -1
- package/dist/client/org/index.js.map +1 -1
- package/dist/client/resources/McpIntegrationDialog.d.ts.map +1 -1
- package/dist/client/resources/McpIntegrationDialog.js +8 -12
- package/dist/client/resources/McpIntegrationDialog.js.map +1 -1
- package/dist/client/resources/ResourcesPanel.d.ts +3 -0
- package/dist/client/resources/ResourcesPanel.d.ts.map +1 -1
- package/dist/client/resources/ResourcesPanel.js +49 -20
- package/dist/client/resources/ResourcesPanel.js.map +1 -1
- package/dist/client/resources/mcp-integration-catalog.d.ts +1 -0
- package/dist/client/resources/mcp-integration-catalog.d.ts.map +1 -1
- package/dist/client/resources/mcp-integration-catalog.js +3 -0
- package/dist/client/resources/mcp-integration-catalog.js.map +1 -1
- package/dist/client/resources/use-resources.d.ts +1 -0
- package/dist/client/resources/use-resources.d.ts.map +1 -1
- package/dist/client/resources/use-resources.js +3 -0
- package/dist/client/resources/use-resources.js.map +1 -1
- package/dist/client/use-action.d.ts +3 -1
- package/dist/client/use-action.d.ts.map +1 -1
- package/dist/client/use-action.js +3 -1
- package/dist/client/use-action.js.map +1 -1
- package/dist/client/widgets/index.d.ts +1 -1
- package/dist/client/widgets/index.d.ts.map +1 -1
- package/dist/client/widgets/index.js +1 -1
- package/dist/client/widgets/index.js.map +1 -1
- package/dist/coding-tools/run-code.js +2 -1
- package/dist/coding-tools/run-code.js.map +1 -1
- package/dist/collab/awareness.d.ts +2 -2
- package/dist/collab/awareness.d.ts.map +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/db/client.d.ts +1 -0
- package/dist/db/client.d.ts.map +1 -1
- package/dist/db/client.js +24 -3
- package/dist/db/client.js.map +1 -1
- package/dist/deploy/build.d.ts.map +1 -1
- package/dist/deploy/build.js +25 -3
- package/dist/deploy/build.js.map +1 -1
- package/dist/eject/remote-mcp-presets.js +1 -1
- package/dist/eject/remote-mcp-presets.js.map +1 -1
- package/dist/index.browser.d.ts +1 -1
- package/dist/index.browser.d.ts.map +1 -1
- package/dist/index.browser.js +1 -1
- package/dist/index.browser.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/integrations/google-docs-poller.d.ts.map +1 -1
- package/dist/integrations/google-docs-poller.js +4 -1
- package/dist/integrations/google-docs-poller.js.map +1 -1
- package/dist/integrations/webhook-handler.d.ts.map +1 -1
- package/dist/integrations/webhook-handler.js +23 -11
- package/dist/integrations/webhook-handler.js.map +1 -1
- package/dist/jobs/scheduler.js +4 -0
- package/dist/jobs/scheduler.js.map +1 -1
- package/dist/localization/default-messages.d.ts +3 -2
- package/dist/localization/default-messages.d.ts.map +1 -1
- package/dist/localization/default-messages.js +3 -2
- package/dist/localization/default-messages.js.map +1 -1
- package/dist/mcp/build-server.d.ts.map +1 -1
- package/dist/mcp/build-server.js +10 -1
- package/dist/mcp/build-server.js.map +1 -1
- package/dist/notifications/routes.d.ts +1 -1
- package/dist/observability/traces.d.ts.map +1 -1
- package/dist/observability/traces.js +27 -7
- package/dist/observability/traces.js.map +1 -1
- package/dist/org/handlers.d.ts +15 -0
- package/dist/org/handlers.d.ts.map +1 -1
- package/dist/org/handlers.js +45 -1
- package/dist/org/handlers.js.map +1 -1
- package/dist/org/migrations.d.ts.map +1 -1
- package/dist/org/migrations.js +4 -0
- package/dist/org/migrations.js.map +1 -1
- package/dist/org/plugin.d.ts +1 -0
- package/dist/org/plugin.d.ts.map +1 -1
- package/dist/org/plugin.js +10 -1
- package/dist/org/plugin.js.map +1 -1
- package/dist/org/schema.d.ts +19 -0
- package/dist/org/schema.d.ts.map +1 -1
- package/dist/org/schema.js +1 -0
- package/dist/org/schema.js.map +1 -1
- package/dist/org/types.d.ts +8 -0
- package/dist/org/types.d.ts.map +1 -1
- package/dist/org/types.js.map +1 -1
- package/dist/org/workspace-url.d.ts +32 -0
- package/dist/org/workspace-url.d.ts.map +1 -0
- package/dist/org/workspace-url.js +63 -0
- package/dist/org/workspace-url.js.map +1 -0
- package/dist/progress/routes.d.ts +1 -1
- package/dist/provider-api/actions/custom-provider-registration.d.ts +11 -11
- package/dist/provider-api/actions/provider-api.d.ts +7 -7
- package/dist/resources/handlers.d.ts +2 -3
- package/dist/resources/handlers.d.ts.map +1 -1
- package/dist/resources/handlers.js +25 -5
- package/dist/resources/handlers.js.map +1 -1
- package/dist/scripts/runner.d.ts +17 -0
- package/dist/scripts/runner.d.ts.map +1 -1
- package/dist/scripts/runner.js +130 -5
- package/dist/scripts/runner.js.map +1 -1
- package/dist/secrets/routes.d.ts +9 -9
- package/dist/server/action-routes.d.ts.map +1 -1
- package/dist/server/action-routes.js +24 -2
- package/dist/server/action-routes.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +26 -1
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/agent-teams.d.ts.map +1 -1
- package/dist/server/agent-teams.js +10 -1
- package/dist/server/agent-teams.js.map +1 -1
- package/dist/server/auth.d.ts +22 -0
- package/dist/server/auth.d.ts.map +1 -1
- package/dist/server/auth.js +33 -7
- package/dist/server/auth.js.map +1 -1
- package/dist/server/embed-route.d.ts.map +1 -1
- package/dist/server/embed-route.js +6 -1
- package/dist/server/embed-route.js.map +1 -1
- package/dist/server/embed-session.d.ts +7 -0
- package/dist/server/embed-session.d.ts.map +1 -1
- package/dist/server/embed-session.js +46 -4
- package/dist/server/embed-session.js.map +1 -1
- package/dist/server/open-route.d.ts.map +1 -1
- package/dist/server/open-route.js +17 -7
- package/dist/server/open-route.js.map +1 -1
- package/dist/server/prompts/framework-core-compact.js +1 -1
- package/dist/server/prompts/framework-core-compact.js.map +1 -1
- package/dist/server/prompts/framework-core.d.ts.map +1 -1
- package/dist/server/prompts/framework-core.js +1 -0
- package/dist/server/prompts/framework-core.js.map +1 -1
- package/dist/server/request-context.d.ts +26 -0
- package/dist/server/request-context.d.ts.map +1 -1
- package/dist/server/request-context.js +18 -1
- package/dist/server/request-context.js.map +1 -1
- package/dist/shared/embed-auth.d.ts +1 -0
- package/dist/shared/embed-auth.d.ts.map +1 -1
- package/dist/shared/embed-auth.js +1 -0
- package/dist/shared/embed-auth.js.map +1 -1
- package/dist/shared/html-document.d.ts +12 -0
- package/dist/shared/html-document.d.ts.map +1 -0
- package/dist/shared/html-document.js +92 -0
- package/dist/shared/html-document.js.map +1 -0
- package/dist/shared/index.d.ts +1 -0
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +1 -0
- package/dist/shared/index.js.map +1 -1
- package/dist/sharing/access.d.ts +1 -0
- package/dist/sharing/access.d.ts.map +1 -1
- package/dist/sharing/access.js +8 -2
- package/dist/sharing/access.js.map +1 -1
- package/dist/sharing/registry.d.ts +3 -0
- package/dist/sharing/registry.d.ts.map +1 -1
- package/dist/sharing/registry.js.map +1 -1
- package/dist/workspace-files/actions.d.ts +28 -0
- package/dist/workspace-files/actions.d.ts.map +1 -0
- package/dist/workspace-files/actions.js +75 -0
- package/dist/workspace-files/actions.js.map +1 -0
- package/dist/workspace-files/tool.d.ts.map +1 -1
- package/dist/workspace-files/tool.js +4 -0
- package/dist/workspace-files/tool.js.map +1 -1
- package/docs/content/cloneable-saas.mdx +114 -0
- package/docs/content/creating-templates.mdx +28 -2
- package/docs/content/syncing-template-changes.mdx +7 -0
- package/docs/content/template-clips-developers.mdx +12 -5
- package/docs/content/template-dispatch-developers.mdx +1 -1
- package/docs/content/template-dispatch.mdx +1 -1
- package/package.json +2 -2
- package/src/action-ui.ts +1 -0
- package/src/action.ts +5 -1
- package/src/agent/engine/ai-sdk-engine.ts +15 -5
- package/src/agent/harness/runner.ts +5 -0
- package/src/agent/production-agent.ts +33 -0
- package/src/agent/run-loop-with-resume.ts +5 -0
- package/src/agent/run-manager.ts +126 -1
- package/src/agent/thread-data-builder.ts +47 -2
- package/src/agent/types.ts +2 -0
- package/src/chat-threads/store.ts +4 -5
- package/src/cli/create.ts +1139 -65
- package/src/cli/design-connect.ts +3 -7
- package/src/cli/index.ts +5 -3
- package/src/cli/skills-content/design-visual-edit-skill.ts +83 -47
- package/src/client/AssistantChat.tsx +27 -16
- package/src/client/agent-chat-adapter.ts +24 -0
- package/src/client/blocks/library/wireframe-kit.tsx +17 -2
- package/src/client/chat/index.ts +1 -0
- package/src/client/chat/message-components.tsx +104 -1
- package/src/client/chat/run-recovery.tsx +15 -3
- package/src/client/chat/widgets/DataTableWidget.tsx +10 -29
- package/src/client/chat/widgets/WorkspaceFileWidget.tsx +71 -0
- package/src/client/chat/widgets/builtin-tool-renderers.tsx +22 -0
- package/src/client/chat/widgets/workspace-file-result.ts +49 -0
- package/src/client/embed-auth.ts +2 -0
- package/src/client/org/InvitationBanner.tsx +14 -1
- package/src/client/org/OrgSwitcher.tsx +23 -0
- package/src/client/org/TeamPage.tsx +130 -0
- package/src/client/org/WorkspaceNotice.tsx +85 -0
- package/src/client/org/hooks.ts +14 -0
- package/src/client/org/index.ts +2 -0
- package/src/client/resources/McpIntegrationDialog.tsx +27 -40
- package/src/client/resources/ResourcesPanel.tsx +134 -51
- package/src/client/resources/mcp-integration-catalog.ts +7 -0
- package/src/client/resources/use-resources.ts +6 -0
- package/src/client/use-action.ts +3 -1
- package/src/client/widgets/index.ts +1 -0
- package/src/coding-tools/run-code.ts +2 -1
- package/src/db/client.ts +28 -4
- package/src/deploy/build.ts +31 -3
- package/src/eject/remote-mcp-presets.ts +1 -1
- package/src/index.browser.ts +1 -0
- package/src/index.ts +1 -0
- package/src/integrations/google-docs-poller.ts +3 -0
- package/src/integrations/webhook-handler.ts +28 -11
- package/src/jobs/scheduler.ts +4 -0
- package/src/localization/default-messages.ts +3 -2
- package/src/mcp/build-server.ts +20 -2
- package/src/observability/traces.ts +48 -12
- package/src/org/handlers.ts +52 -1
- package/src/org/migrations.ts +4 -0
- package/src/org/plugin.ts +14 -0
- package/src/org/schema.ts +1 -0
- package/src/org/types.ts +8 -0
- package/src/org/workspace-url.ts +74 -0
- package/src/resources/handlers.ts +35 -5
- package/src/scripts/runner.ts +183 -5
- package/src/server/__snapshots__/agent-chat-plugin.surface.spec.ts.snap +2 -1
- package/src/server/action-routes.ts +32 -2
- package/src/server/agent-chat-plugin.ts +29 -0
- package/src/server/agent-teams.ts +10 -1
- package/src/server/auth.ts +33 -7
- package/src/server/embed-route.ts +9 -0
- package/src/server/embed-session.ts +62 -3
- package/src/server/open-route.ts +20 -6
- package/src/server/prompts/framework-core-compact.ts +1 -1
- package/src/server/prompts/framework-core.ts +1 -0
- package/src/server/request-context.ts +36 -1
- package/src/shared/embed-auth.ts +1 -0
- package/src/shared/html-document.ts +115 -0
- package/src/shared/index.ts +1 -0
- package/src/sharing/access.ts +8 -1
- package/src/sharing/registry.ts +11 -2
- package/src/workspace-files/actions.ts +100 -0
- package/src/workspace-files/tool.ts +4 -0
- package/corpus/templates/design/changelog/2026-07-28-interact-mode-can-preview-designs-in-responsive-device-sizes.md +0 -6
- package/corpus/templates/design/changelog/2026-07-28-interact-mode-now-opens-a-full-screen-responsive-preview-wit.md +0 -6
package/dist/cli/index.js
CHANGED
|
@@ -1084,7 +1084,8 @@ Usage:
|
|
|
1084
1084
|
agent-native typecheck Run TypeScript type checking
|
|
1085
1085
|
agent-native create [name] Scaffold a new agent-native workspace with a
|
|
1086
1086
|
multi-select template picker. Use --standalone
|
|
1087
|
-
for a single-app scaffold
|
|
1087
|
+
for a single-app scaffold, or choose Community
|
|
1088
|
+
template to install a public GitHub repository.
|
|
1088
1089
|
agent-native code Launch Agent-Native Code workspace. Type a task or
|
|
1089
1090
|
use goals like /migrate and /audit.
|
|
1090
1091
|
agent-native code serve Run the Agent-Native Code remote connector.
|
|
@@ -1169,8 +1170,9 @@ Options:
|
|
|
1169
1170
|
-h, --help Show this help message
|
|
1170
1171
|
-v, --version Show version number
|
|
1171
1172
|
--template <names> Comma-separated templates to pre-select
|
|
1172
|
-
(mail,calendar,analytics,...)
|
|
1173
|
-
|
|
1173
|
+
(mail,calendar,analytics,...), or install a
|
|
1174
|
+
community repo from a plain GitHub URL or
|
|
1175
|
+
community:owner/repo[?app=id][#ref]
|
|
1174
1176
|
--headless Create the primitive-first action-only scaffold
|
|
1175
1177
|
--standalone Scaffold a single standalone app (no workspace)
|
|
1176
1178
|
--emit [dir] With migrate, emit an own-agent dossier
|
package/dist/cli/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,aAAa,EAAE,MAAM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qBAChB,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC;qBAC1C,KAAK,CAAC,yBAAyB,CAAC,CAAC;gBACpC,MAAM;YACR,CAAC;YACD,OAAO,CAAC,KAAK,CAAC,oBAAoB,OAAO,EAAE,CAAC,CAAC;YAC7C,OAAO,CAAC,KAAK,CACX,sEAAsE;gBACpE,uBAAuB,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI;gBAClD,qCAAqC;gBACrC,wCAAwC,CAC3C,CAAC;YACF,OAAO,CAAC,KAAK,CAAC,sCAAsC,CAAC,CAAC;YACtD,OAAO,CAAC,KAAK,CAAC,SAAS,QAAQ,EAAE,CAAC,CAAC;YACnC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QACD,OAAO,CAAC,KAAK,CAAC,oBAAoB,OAAO,EAAE,CAAC,CAAC;QAC7C,OAAO,CAAC,KAAK,CAAC,sCAAsC,CAAC,CAAC;QACtD,OAAO,CAAC,KAAK,CAAC,SAAS,QAAQ,EAAE,CAAC,CAAC;QACnC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC","sourcesContent":["#!/usr/bin/env node\n\nimport { execSync, spawn } from \"child_process\";\nimport fs from \"fs\";\nimport { createRequire } from \"module\";\nimport path from \"path\";\nimport { fileURLToPath } from \"url\";\n\nimport * as Sentry from \"@sentry/node\";\n\nimport {\n clearAgentNativeNitroPresetMarker,\n resolveAgentNativeNitroPreset,\n} from \"../deploy/nitro-preset.js\";\nimport { resolveDeployPostBuildInvocation } from \"./deploy-build.js\";\nimport { shouldTrackCliRun } from \"./telemetry-routing.js\";\nimport { createCliTelemetry } from \"./telemetry.js\";\n\n// Resolve version once at module scope — used by both --version and --help\nlet _version = \"unknown\";\ntry {\n const __dirname = path.dirname(fileURLToPath(import.meta.url));\n // dist/cli/index.js → ../../package.json\n const pkg = JSON.parse(\n fs.readFileSync(path.resolve(__dirname, \"../../package.json\"), \"utf-8\"),\n );\n _version = pkg.version;\n} catch {}\n\n// Fail fast on unsupported Node versions. `engines.node: \">=22\"` is only\n// advisory — npx/pnpm merely warn — so without this an older Node (18/20)\n// first fails deep inside a scaffold dynamic import with a cryptic\n// ERR_MODULE / syntax error that `handleScaffoldImportError` misreports as a\n// corrupt npx cache. A clear up-front message saves that whole detour.\nconst REQUIRED_NODE_MAJOR = 22;\nconst _nodeMajor = Number(process.versions.node.split(\".\")[0]);\nif (Number.isFinite(_nodeMajor) && _nodeMajor < REQUIRED_NODE_MAJOR) {\n console.error(\n `agent-native requires Node.js ${REQUIRED_NODE_MAJOR} or newer, but you're on Node ${process.versions.node}.\\n` +\n `Upgrade Node (https://nodejs.org) and re-run. With nvm: \\`nvm install ${REQUIRED_NODE_MAJOR}\\`.`,\n );\n process.exit(1);\n}\n\n/**\n * Build a redacted \"command\" tag from process.argv. Strips the value that\n * follows any --token / --key / --secret / --password / --api-key flag so\n * we don't ship developer secrets to Sentry alongside the crash.\n *\n * Supports both `--token foo` (separate argv item) and `--token=foo`\n * (combined argv item) forms.\n */\nconst SECRET_FLAG_RE = /^--?(token|key|secret|password|api[_-]?key)$/i;\nconst SECRET_FLAG_EQ_RE =\n /^(--?(token|key|secret|password|api[_-]?key))=(.*)$/i;\nfunction buildRedactedCommandTag(argv: string[]): string {\n const out: string[] = [];\n for (let i = 0; i < argv.length; i++) {\n const a = argv[i];\n if (SECRET_FLAG_RE.test(a)) {\n out.push(a);\n // Consume the next argv item as the secret value\n if (i + 1 < argv.length) {\n out.push(\"<redacted>\");\n i++;\n }\n continue;\n }\n const m = a.match(SECRET_FLAG_EQ_RE);\n if (m) {\n out.push(`${m[1]}=<redacted>`);\n continue;\n }\n out.push(a);\n }\n return out.join(\" \");\n}\n\nSentry.init({\n dsn: \"https://0d384e9eff2f6542af468b92769f2f5b@o117565.ingest.us.sentry.io/4511270386466816\",\n release: `agent-native-cli@${_version}`,\n // Sentry's Http integration wraps outgoing fetch in a way that breaks the\n // hosted Plan MCP route negotiation used by recap CI smoke checks.\n integrations: (integrations) =>\n integrations.filter((integration) => integration.name !== \"Http\"),\n // sendDefaultPii MUST stay false — the CLI runs in third-party developer\n // environments and we never want to ship request headers, IPs, cookies,\n // or process env contents to Sentry without explicit consent.\n sendDefaultPii: false,\n beforeSend(event) {\n // Drop expected user-input rejections (validateRepoName, etc.) so they\n // don't pollute Sentry with non-bug noise.\n const exceptionType = event.exception?.values?.[0]?.type;\n if (\n exceptionType === \"ValidationError\" ||\n event.tags?.handled === \"validation\"\n ) {\n return null;\n }\n\n // Defense in depth: strip any sensitive fields that may have been\n // attached to the event despite sendDefaultPii: false (e.g. integrations\n // that capture request metadata).\n if (event.request) {\n if (event.request.headers) {\n const headers = event.request.headers as Record<string, string>;\n for (const k of Object.keys(headers)) {\n const lk = k.toLowerCase();\n if (\n lk === \"cookie\" ||\n lk === \"authorization\" ||\n lk === \"set-cookie\" ||\n lk === \"proxy-authorization\"\n ) {\n delete headers[k];\n }\n }\n }\n // Cookies are also exposed via event.request.cookies as a separate field\n delete (event.request as Record<string, unknown>).cookies;\n }\n // Keep user info that was explicitly set via Sentry.setUser (id/email)\n // so we can attribute crashes back to the operator. Always strip\n // ip_address — the CLI runs on third-party machines and the IP is auto-\n // collected without consent. If only auto-collected fields remain,\n // drop the user object entirely.\n if (event.user) {\n const user = event.user as Record<string, unknown>;\n delete user.ip_address;\n const hasIdentity =\n typeof user.id === \"string\" ||\n typeof user.email === \"string\" ||\n typeof user.username === \"string\";\n if (!hasIdentity) {\n delete event.user;\n }\n }\n // Sentry's contexts can carry process.env snapshots — strip env-shaped\n // contexts so we don't leak deployment secrets.\n if (event.contexts && typeof event.contexts === \"object\") {\n delete (event.contexts as Record<string, unknown>).runtime_env;\n }\n\n event.tags = {\n ...event.tags,\n // Build the command tag from process.argv with secrets redacted so\n // `agent-native ... --token foo` doesn't leak `foo` to Sentry.\n command: buildRedactedCommandTag(process.argv.slice(2)),\n subcommand: process.argv[2] ?? \"none\",\n nodeVersion: process.version,\n platform: process.platform,\n };\n return event;\n },\n});\n\n// Identify the operator so future CLI errors carry spaceId / builderUserId\n// that we can map back to a real Builder user. The CLI doesn't have a real\n// email today — only the env-managed identifiers from the workspace's .env.\n{\n const builderUserId = process.env.BUILDER_USER_ID;\n const builderPublicKey = process.env.BUILDER_PUBLIC_KEY;\n if (builderUserId) {\n Sentry.setUser({ id: builderUserId });\n Sentry.setTag(\"builderUserId\", builderUserId);\n }\n if (builderPublicKey) {\n Sentry.setTag(\"spaceId\", builderPublicKey);\n }\n}\n\nconst FEEDBACK_URL =\n \"https://forms.agent-native.com/f/agent-native-feedback/_16ewV?source=cli\";\nconst BUGS_URL = \"https://github.com/BuilderIO/agent-native/issues\";\n\nconst command = process.argv[2];\n// Filter out bare \"--\" separators that pnpm inserts between its args and script args\nconst args = process.argv.slice(3).filter((a) => a !== \"--\");\nconst cliTelemetry = createCliTelemetry({\n cli: \"core\",\n cliVersion: _version,\n command: command ?? \"none\",\n interactive: Boolean(process.stdin.isTTY && process.stdout.isTTY),\n});\n\nfunction parseScaffoldArgs(argv: string[]): {\n name?: string;\n template?: string;\n standalone: boolean;\n headless: boolean;\n} {\n let name: string | undefined;\n let template: string | undefined;\n let standalone = false;\n let headless = false;\n\n for (let i = 0; i < argv.length; i++) {\n const arg = argv[i];\n if (arg === \"--template\" && argv[i + 1]) {\n template = argv[++i];\n } else if (arg.startsWith(\"--template=\")) {\n template = arg.slice(\"--template=\".length);\n } else if (arg === \"--standalone\") {\n standalone = true;\n } else if (arg === \"--headless\") {\n headless = true;\n } else if (!arg.startsWith(\"-\") && !name) {\n name = arg;\n }\n }\n\n return { name, template, standalone, headless };\n}\n\n// Track CLI usage (best-effort, non-blocking)\nfunction trackCli(event: string, props?: Record<string, unknown>): void {\n try {\n cliTelemetry.track(event, { command, ...props });\n } catch {}\n}\n\nfunction captureCliException(\n error: unknown,\n context?: Parameters<typeof cliTelemetry.captureException>[1],\n): void {\n try {\n cliTelemetry.captureException(error, context);\n } catch {}\n}\n\nfunction flushTelemetryAndExit(code: number): void {\n void Promise.allSettled([cliTelemetry.flush(), Sentry.flush(2000)]).finally(\n () => process.exit(code),\n );\n}\n\n// Global error handler — show feedback link on unhandled crashes\nprocess.on(\"uncaughtException\", (err) => {\n console.error(`\\n Unexpected error: ${err.message}\\n`);\n console.error(` Report this bug: ${BUGS_URL}`);\n console.error(` Send feedback: ${FEEDBACK_URL}\\n`);\n trackCli(\"cli.crash\", { error: err.message });\n captureCliException(err, { handled: false, tags: { source: \"process\" } });\n Sentry.captureException(err);\n flushTelemetryAndExit(1);\n});\n\nprocess.on(\"unhandledRejection\", (reason: any) => {\n console.error(`\\n Unhandled error: ${reason?.message ?? reason}\\n`);\n console.error(` Report this bug: ${BUGS_URL}`);\n console.error(` Send feedback: ${FEEDBACK_URL}\\n`);\n trackCli(\"cli.crash\", { error: reason?.message ?? String(reason) });\n captureCliException(reason, {\n handled: false,\n tags: { source: \"unhandled-rejection\" },\n });\n Sentry.captureException(reason);\n flushTelemetryAndExit(1);\n});\n\n// Surface a self-heal hint when an interrupted `npx @agent-native/core@latest ...`\n// leaves a half-extracted package in the npx cache and a follow-up run fails\n// to load one of our own sub-modules.\nfunction handleScaffoldImportError(err: any): void {\n const msg = err?.message ?? String(err);\n const looksLikeCorruptCache =\n err?.code === \"ERR_MODULE_NOT_FOUND\" ||\n err?.code === \"MODULE_NOT_FOUND\" ||\n err?.code === \"ENOENT\" ||\n /Cannot find module|tarball|integrity|EINTEGRITY|corrupt|truncated/i.test(\n msg,\n );\n if (looksLikeCorruptCache) {\n console.error(\n `\\n Failed to load the scaffolder. This usually means an earlier\\n \\`npx\\` run was interrupted and left a corrupt cache.\\n\\n Clear the npx cache and try again:\\n rm -rf ~/.npm/_npx\\n npx @agent-native/core@latest create\\n\\n Original error: ${msg}\\n`,\n );\n } else {\n console.error(`\\n Failed to load the scaffolder: ${msg}\\n`);\n }\n trackCli(\"cli.scaffold.import_error\", { error: msg });\n captureCliException(err, {\n handled: false,\n tags: { source: \"scaffold-import\" },\n });\n Sentry.captureException(err);\n flushTelemetryAndExit(1);\n}\n\nfunction findBinUpwards(binName: string): string | undefined {\n let dir = process.cwd();\n for (let i = 0; i < 20; i++) {\n const candidate = path.join(dir, \"node_modules\", \".bin\", binName);\n if (fs.existsSync(candidate)) return candidate;\n const parent = path.dirname(dir);\n if (parent === dir) break;\n dir = parent;\n }\n return undefined;\n}\n\nfunction findViteBin(): string {\n return findBinUpwards(\"vite\") ?? \"vite\";\n}\n\nfunction findViteJsEntry(): string | null {\n try {\n const require = createRequire(path.join(process.cwd(), \"package.json\"));\n const pkgJsonPath = require.resolve(\"vite/package.json\");\n const pkg = JSON.parse(fs.readFileSync(pkgJsonPath, \"utf-8\")) as {\n bin?: string | Record<string, string>;\n };\n const rel = typeof pkg.bin === \"string\" ? pkg.bin : pkg.bin?.vite;\n if (!rel) return null;\n const entry = path.join(path.dirname(pkgJsonPath), rel);\n return fs.existsSync(entry) ? entry : null;\n } catch {\n return null;\n }\n}\n\nfunction findTsxBin(): string {\n const localTsx = path.resolve(\"node_modules/.bin/tsx\");\n if (fs.existsSync(localTsx)) return localTsx;\n return \"tsx\";\n}\n\nfunction findTypeScriptCompilerBin(): string {\n const localTsc = path.resolve(\"node_modules/.bin/tsc\");\n if (fs.existsSync(localTsc)) return localTsc;\n\n // Prefer TypeScript 7's tsc; fall back to legacy tsgo if present.\n const localTsgo = path.resolve(\"node_modules/.bin/tsgo\");\n if (fs.existsSync(localTsgo)) return localTsgo;\n\n return \"tsc\";\n}\n\nfunction findReactRouterBin(): string {\n return findBinUpwards(\"react-router\") ?? \"react-router\";\n}\n\n/** Check if the project uses React Router framework mode (has react-router.config.ts) */\nfunction isReactRouterFramework(): boolean {\n return (\n fs.existsSync(path.resolve(\"react-router.config.ts\")) ||\n fs.existsSync(path.resolve(\"react-router.config.js\"))\n );\n}\n\nfunction canResolveFromProject(specifier: string): boolean {\n try {\n const requireFromProject = createRequire(path.resolve(\"package.json\"));\n requireFromProject.resolve(specifier);\n return true;\n } catch {\n return false;\n }\n}\n\nfunction projectUsesFsRoutes(): boolean {\n for (const file of [\n path.resolve(\"app/routes.ts\"),\n path.resolve(\"app/routes.tsx\"),\n path.resolve(\"routes.ts\"),\n path.resolve(\"routes.tsx\"),\n ]) {\n try {\n if (\n fs.existsSync(file) &&\n fs.readFileSync(file, \"utf-8\").includes(\"@react-router/fs-routes\")\n ) {\n return true;\n }\n } catch {}\n }\n return false;\n}\n\nfunction validateReactRouterBuildDependencies(): void {\n const required: Array<[packageName: string, specifier: string]> = [\n [\"react-router\", \"react-router\"],\n [\"@react-router/dev\", \"@react-router/dev/vite\"],\n [\"vite\", \"vite\"],\n ];\n if (projectUsesFsRoutes()) {\n required.push([\"@react-router/fs-routes\", \"@react-router/fs-routes\"]);\n }\n\n const missing = required\n .filter(([, specifier]) => !canResolveFromProject(specifier))\n .map(([packageName]) => packageName);\n\n if (missing.length === 0) return;\n\n const packageManager = fs.existsSync(path.resolve(\"pnpm-lock.yaml\"))\n ? \"pnpm\"\n : fs.existsSync(path.resolve(\"yarn.lock\"))\n ? \"yarn\"\n : \"npm\";\n const installCommand =\n packageManager === \"pnpm\"\n ? `pnpm add ${missing.join(\" \")}`\n : packageManager === \"yarn\"\n ? `yarn add ${missing.join(\" \")}`\n : `npm install ${missing.join(\" \")}`;\n\n console.error(\n [\n \"React Router framework mode requires build packages that are not installed from this app root.\",\n `Missing: ${missing.join(\", \")}`,\n `Install them with: ${installCommand}`,\n ].join(\"\\n\"),\n );\n process.exit(1);\n}\n\nfunction isWorkspaceRoot(): boolean {\n const pkgPath = path.resolve(\"package.json\");\n if (!fs.existsSync(pkgPath)) return false;\n try {\n const pkg = JSON.parse(fs.readFileSync(pkgPath, \"utf-8\"));\n return (\n typeof pkg?.[\"agent-native\"]?.workspaceCore === \"string\" &&\n fs.existsSync(path.resolve(\"apps\"))\n );\n } catch {\n return false;\n }\n}\n\nfunction extractNodeInspectFlag(args: string[]): {\n inspectFlag: string | null;\n rest: string[];\n} {\n const rest: string[] = [];\n let inspectFlag: string | null = null;\n for (const arg of args) {\n if (/^--inspect(-brk)?(=.+)?$/.test(arg)) {\n inspectFlag = arg;\n continue;\n }\n rest.push(arg);\n }\n return { inspectFlag, rest };\n}\n\nfunction run(\n cmd: string,\n cmdArgs: string[],\n opts?: { stdio?: \"inherit\" | \"pipe\"; env?: NodeJS.ProcessEnv },\n) {\n const child = spawn(cmd, cmdArgs, {\n stdio: opts?.stdio ?? \"inherit\",\n shell: process.platform === \"win32\",\n env: opts?.env ?? process.env,\n });\n child.on(\"exit\", (code) => process.exit(code ?? 0));\n // Forward signals to child so Cmd+C doesn't leave zombie processes holding ports\n for (const sig of [\"SIGINT\", \"SIGTERM\", \"SIGHUP\"] as const) {\n process.on(sig, () => {\n child.kill(sig);\n setTimeout(() => {\n try {\n child.kill(\"SIGKILL\");\n } catch {}\n process.exit(1);\n }, 5000).unref();\n });\n }\n return child;\n}\n\n/**\n * Walk up from `cwd` and try to figure out which template / app this build\n * is running for. We look for two patterns:\n *\n * - `templates/<name>/...` — building inside the framework monorepo\n * - `apps/<name>/...` — building inside a scaffolded workspace\n *\n * Both, neither, or one may match. Used purely as Sentry tags so we can\n * filter the noisy \"Command failed: react-router build\" issues by template.\n */\nfunction inferBuildContext(cwd: string): {\n template?: string;\n app?: string;\n} {\n const segs = cwd.split(path.sep);\n let template: string | undefined;\n let app: string | undefined;\n for (let i = 0; i < segs.length - 1; i++) {\n if (segs[i] === \"templates\" && segs[i + 1] && !segs[i + 1].startsWith(\".\"))\n template = segs[i + 1];\n if (segs[i] === \"apps\" && segs[i + 1] && !segs[i + 1].startsWith(\".\"))\n app = segs[i + 1];\n }\n return { template, app };\n}\n\n/**\n * Run a build subcommand, streaming its stdout/stderr to the user's terminal\n * in real time while also capturing bounded tails for Sentry. On non-zero\n * exit we report a structured event (template, app, exit code, stderr/stdout\n * tails) and exit with the child's code. We deliberately do NOT throw — the\n * global uncaughtException handler would re-capture with a generic\n * \"Error: Command failed\" title, collapsing every template's failure into\n * one issue (which is exactly what we're trying to fix here).\n */\nfunction runBuildStep(\n cmd: string,\n cmdArgs: string[],\n opts: { label: string; env?: NodeJS.ProcessEnv },\n): Promise<void> {\n return new Promise<void>((resolve) => {\n const STDERR_TAIL_BYTES = 8000;\n const STDOUT_TAIL_BYTES = 4000;\n let stderrBuf = \"\";\n let stdoutBuf = \"\";\n\n const child = spawn(cmd, cmdArgs, {\n stdio: [\"inherit\", \"pipe\", \"pipe\"],\n shell: process.platform === \"win32\",\n env: opts.env ?? process.env,\n });\n\n child.stdout?.on(\"data\", (chunk: Buffer) => {\n process.stdout.write(chunk);\n const next = stdoutBuf + chunk.toString(\"utf-8\");\n stdoutBuf =\n next.length > STDOUT_TAIL_BYTES ? next.slice(-STDOUT_TAIL_BYTES) : next;\n });\n child.stderr?.on(\"data\", (chunk: Buffer) => {\n process.stderr.write(chunk);\n const next = stderrBuf + chunk.toString(\"utf-8\");\n stderrBuf =\n next.length > STDERR_TAIL_BYTES ? next.slice(-STDERR_TAIL_BYTES) : next;\n });\n\n child.on(\"error\", (err) => {\n // Failure to spawn (ENOENT, etc.).\n const cwd = process.cwd();\n const { template, app } = inferBuildContext(cwd);\n Sentry.captureException(err, {\n tags: {\n buildStep: opts.label,\n ...(template ? { template } : {}),\n ...(app ? { app } : {}),\n },\n extra: {\n command: `${cmd} ${cmdArgs.join(\" \")}`,\n cwd,\n stage: \"spawn\",\n },\n });\n captureCliException(err, {\n handled: false,\n tags: {\n source: \"build-step\",\n buildStep: opts.label,\n ...(template ? { template } : {}),\n ...(app ? { app } : {}),\n },\n extra: { stage: \"spawn\" },\n });\n flushTelemetryAndExit(1);\n });\n\n child.on(\"exit\", (code, signal) => {\n const exitCode = code ?? (signal ? 1 : 0);\n if (exitCode === 0) {\n resolve();\n return;\n }\n const cwd = process.cwd();\n const { template, app } = inferBuildContext(cwd);\n const childCommand = `${cmd} ${cmdArgs.join(\" \")}`;\n const err = new Error(\n `Build step \"${opts.label}\" failed with exit code ${exitCode}` +\n (template ? ` (template=${template})` : \"\") +\n (app ? ` (app=${app})` : \"\"),\n );\n Sentry.captureException(err, {\n tags: {\n buildStep: opts.label,\n ...(template ? { template } : {}),\n ...(app ? { app } : {}),\n },\n extra: {\n command: childCommand,\n cwd,\n exitCode,\n signal: signal ?? null,\n stderrTail: stderrBuf,\n stdoutTail: stdoutBuf,\n },\n });\n captureCliException(err, {\n handled: false,\n tags: {\n source: \"build-step\",\n buildStep: opts.label,\n ...(template ? { template } : {}),\n ...(app ? { app } : {}),\n },\n extra: { exitCode, signal: signal ?? null },\n });\n // Don't throw — see comment on runBuildStep above.\n flushTelemetryAndExit(exitCode);\n });\n });\n}\n\nif (shouldTrackCliRun(command, args)) trackCli(\"cli.run\");\n\nswitch (command) {\n case \"dev\": {\n if (isWorkspaceRoot()) {\n import(\"./workspace-dev.js\")\n .then((m) => m.runWorkspaceDev({ args }))\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n const vite = findViteBin();\n const { inspectFlag, rest } = extractNodeInspectFlag(args);\n if (!inspectFlag) {\n run(vite, rest);\n break;\n }\n const viteJsEntry = findViteJsEntry();\n if (!viteJsEntry) {\n console.warn(\n \"[agent-native] Could not resolve Vite's JS entry; starting dev \" +\n \"server without the debugger.\",\n );\n run(vite, rest);\n break;\n }\n // Attach inspect flag to server process (not Vite or Nitro process)\n const parsed = inspectFlag.match(/^--(inspect(?:-brk)?)(?:=(.+))?$/);\n const kind = parsed?.[1] ?? \"inspect\";\n const target = parsed?.[2] ?? \"9229\";\n const directive = `--${kind}=${target}`;\n const preload =\n \"data:text/javascript,\" +\n encodeURIComponent(\n `process.env.NODE_OPTIONS=((process.env.NODE_OPTIONS??\"\")+\" ${directive}\").trim();`,\n );\n const env = {\n ...process.env,\n NITRO_DEV_RUNNER: process.env.NITRO_DEV_RUNNER ?? \"node-process\",\n };\n console.log(`[agent-native] API server debugger listening on ${target}`);\n run(process.execPath, [\"--import\", preload, viteJsEntry, ...rest], { env });\n break;\n }\n\n case \"workspace-dev\": {\n import(\"./workspace-dev.js\")\n .then((m) => m.runWorkspaceDev({ args }))\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"build\": {\n // React Router framework mode uses `react-router build` which\n // internally runs `vite build` with proper environment orchestration.\n // Legacy SPA mode uses `vite build` directly.\n //\n // Each step uses runBuildStep so that on failure we get a Sentry event\n // tagged with template/app and including stderr/stdout tails. If the\n // child exits non-zero, runBuildStep calls process.exit itself; the\n // continuation only runs on success.\n (async () => {\n // Doctor pre-step: scans app source for the security-critical guard\n // invariants (see `agent-native doctor --help`). Warn-only by\n // default — prints findings to stderr and always continues. Only\n // fails the build when `agent-native build --strict` was passed or\n // `agent-native.json` sets `{ \"doctor\": { \"failOnBuild\": true } }`.\n try {\n const { runDoctorBuildHook } = await import(\"./doctor.js\");\n const hook = await runDoctorBuildHook({\n cwd: process.cwd(),\n strict: args.includes(\"--strict\"),\n });\n if (!hook.ok) {\n console.error(\n \"\\nBuild aborted by `agent-native doctor` (see findings above).\",\n );\n process.exit(1);\n }\n } catch (err) {\n console.warn(\n `[doctor] pre-build scan failed to run (continuing): ${err instanceof Error ? err.message : String(err)}`,\n );\n }\n\n if (isReactRouterFramework()) {\n clearAgentNativeNitroPresetMarker();\n validateReactRouterBuildDependencies();\n const rr = findReactRouterBin();\n console.log(\"Building (React Router framework mode)...\");\n await runBuildStep(rr, [\"build\"], { label: \"react-router-build\" });\n } else {\n const vite = findViteBin();\n console.log(\"Building...\");\n await runBuildStep(vite, [\"build\"], { label: \"vite-build\" });\n }\n\n // Post-build: framework-mode apps also need a Nitro server bundle for\n // `agent-native start` and for serverless presets.\n if (isReactRouterFramework()) {\n const configuredNitroPreset = resolveAgentNativeNitroPreset();\n const deployEnv = configuredNitroPreset\n ? { ...process.env, NITRO_PRESET: configuredNitroPreset }\n : process.env;\n const __dirname = path.dirname(fileURLToPath(import.meta.url));\n const deployBuild = resolveDeployPostBuildInvocation({\n cliDir: __dirname,\n env: deployEnv,\n findTsxBin,\n });\n if (deployBuild) {\n await runBuildStep(deployBuild.command, deployBuild.args, {\n label: \"deploy-build\",\n env: deployEnv,\n });\n } else {\n console.warn(\n \"[build] Deploy build script not found and no deploy preset is configured. Skipping post-build step.\",\n );\n }\n }\n\n console.log(\"\\nBuild complete.\");\n })().catch((err) => {\n // runBuildStep handles its own failures and exits, so reaching here\n // implies a programming error in the orchestration above. Capture\n // and exit so the global unhandledRejection handler doesn't double-\n // report with a generic title.\n captureCliException(err, {\n handled: false,\n tags: { source: \"orchestration\" },\n });\n Sentry.captureException(err);\n flushTelemetryAndExit(1);\n });\n break;\n }\n\n case \"start\": {\n // Like `next start` — runs Nitro production server\n const serverEntry = path.resolve(\".output/server/index.mjs\");\n if (!fs.existsSync(serverEntry)) {\n console.error(\n 'No production build found. Run \"agent-native build\" first.',\n );\n process.exit(1);\n }\n run(\"node\", [serverEntry, ...args]);\n break;\n }\n\n case \"action\": {\n // Run an action from actions/ (or scripts/ for backwards compat)\n const actionName = args[0];\n if (!actionName) {\n console.error(\n `Usage: agent-native action <name> ['{\"arg\":\"value\"}'] [--args]`,\n );\n process.exit(1);\n }\n const tsxAction = findTsxBin();\n // Try actions/run.ts first, fall back to scripts/run.ts\n const actionsRun = path.resolve(\"actions/run.ts\");\n const scriptsRun = path.resolve(\"scripts/run.ts\");\n const runFile = fs.existsSync(actionsRun) ? actionsRun : scriptsRun;\n run(tsxAction, [runFile, ...args]);\n break;\n }\n\n case \"agent\": {\n import(\"./agent.js\")\n .then(async (m) => {\n const code = await m.runAgent(args);\n if (code !== 0) process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"script\": {\n // @deprecated — use `agent-native action` instead\n const scriptName = args[0];\n if (!scriptName) {\n console.error(\"Usage: agent-native script <name> [--args]\");\n process.exit(1);\n }\n const tsx = findTsxBin();\n // Try actions/run.ts first, fall back to scripts/run.ts\n const actionsRunScript = path.resolve(\"actions/run.ts\");\n const scriptsRunScript = path.resolve(\"scripts/run.ts\");\n const runFileScript = fs.existsSync(actionsRunScript)\n ? actionsRunScript\n : scriptsRunScript;\n run(tsx, [runFileScript, ...args]);\n break;\n }\n\n case \"typecheck\": {\n // Run TypeScript type checking\n // React Router framework mode generates route types first\n if (isReactRouterFramework()) {\n validateReactRouterBuildDependencies();\n const rr = findReactRouterBin();\n try {\n execSync(`${rr} typegen`, { stdio: \"inherit\" });\n } catch {\n // typegen may fail if routes aren't set up yet; continue to TypeScript.\n }\n }\n run(findTypeScriptCompilerBin(), [\"--noEmit\", ...args]);\n break;\n }\n\n case \"create\": {\n // Defaults to creating a workspace with a multi-select template picker.\n // Use --standalone for the old single-app flow.\n // --template foo,bar Pre-select multiple templates in the picker\n // --standalone Scaffold a single standalone app\n const parsed = parseScaffoldArgs(args);\n import(\"./create.js\")\n .then((m) =>\n m.createApp(parsed.name, {\n template: parsed.headless ? \"headless\" : parsed.template,\n standalone: parsed.standalone,\n }),\n )\n .catch(handleScaffoldImportError);\n break;\n }\n\n case \"invoke\": {\n import(\"./invoke.js\")\n .then(async (m) => {\n const code = await m.runInvoke(args);\n process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"agents\": {\n import(\"./agents.js\")\n .then(async (m) => {\n const code = await m.runAgents(args);\n process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"migrate\": {\n import(\"./migrate.js\")\n .then((m) => m.runMigrate(args))\n .catch(handleScaffoldImportError);\n break;\n }\n\n case \"upgrade\": {\n // Bring an existing app/workspace to current @agent-native/* packages,\n // refresh scaffold skills, and verify — without framework patches.\n import(\"./upgrade.js\")\n .then(async (m) => {\n const code = await m.runUpgrade(args);\n process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"template\": {\n // Pull later upstream first-party template changes into a generated app\n // via a 3-way merge against the tree it was scaffolded from.\n import(\"./template-sync.js\")\n .then(async (m) => {\n const code = await m.runTemplate(args);\n process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"doctor\": {\n // Scan app source for security-critical guard invariants (see\n // `agent-native doctor --help`). For dependency-pin health, see\n // `agent-native upgrade check` instead.\n import(\"./doctor.js\")\n .then(async (m) => {\n const code = await m.runDoctor(args);\n process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"code\": {\n import(\"./code.js\")\n .then((m) => m.runCode(args))\n .catch(handleScaffoldImportError);\n break;\n }\n\n case \"mcp\": {\n // Connect external coding agents (Claude Code, Cowork, Codex) over MCP.\n // `mcp serve` runs the stdio transport; install/uninstall/status/token\n // manage client configs + the local token.\n import(\"./mcp.js\")\n .then((m) => m.runMcp(args))\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"connect\": {\n // Wire your local coding agent to a DEPLOYED agent-native app via a\n // browser device-code flow (no token copying). `--all` connects every\n // first-party hosted app; `--token` is the no-browser fallback.\n import(\"./connect.js\")\n .then(async (m) => {\n await m.runConnect(args);\n process.exit(process.exitCode ?? 0);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"reconnect\":\n case \"reauth\": {\n // Refresh an existing remote MCP auth/config entry without reinstalling\n // app skills or running the broader connector setup path.\n import(\"./connect.js\")\n .then((m) => m.runConnect([\"reconnect\", ...args]))\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"app-skill\": {\n // Package or install an agent-native app as a skill-backed MCP/app bundle.\n import(\"./app-skill.js\")\n .then((m) => m.runAppSkill(args))\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"skills\": {\n // Friendly skill install surface. Wraps open skills installation plus MCP.\n import(\"./skills.js\")\n .then((m) => m.runSkills(args))\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"content\": {\n import(\"./content-local.js\")\n .then(async (m) => {\n const code = await m.runContentLocal(args);\n process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"visualize-repo\": {\n import(\"./visualize-repo.js\")\n .then(async (m) => {\n const code = await m.runVisualizeRepo(args);\n process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"design\": {\n import(\"./design-connect.js\")\n .then(async (m) => {\n const code = await m.runDesign(args);\n process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"recap\": {\n // PR visual recap helpers used by the GitHub Action. Promoted to the CLI\n // so an installed repo's workflow can call `agent-native recap …` instead\n // of copying helper scripts. Run `agent-native recap help` for the full\n // subcommand list.\n import(\"./recap.js\")\n .then((m) => m.runRecap(args))\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"plan\": {\n // Plan authoring helpers: local MDX preview plus a no-auth block catalog\n // fetcher for text-only/local installs.\n import(\"./plan-local.js\")\n .then((m) => m.runPlan(args))\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"create-workspace\": {\n // Deprecated alias for `create` (since workspace is now the default).\n const parsed = parseScaffoldArgs(args);\n import(\"./create-workspace.js\")\n .then((m) =>\n m.createWorkspace({ name: parsed.name, template: parsed.template }),\n )\n .catch(handleScaffoldImportError);\n break;\n }\n\n case \"add-app\": {\n // Add one or more apps to the current workspace.\n const parsed = parseScaffoldArgs(args);\n import(\"./create.js\")\n .then((m) =>\n m.addAppToWorkspace(parsed.name, { template: parsed.template }),\n )\n .catch(handleScaffoldImportError);\n break;\n }\n\n case \"deploy\": {\n // Build and deploy the entire workspace as one unit. Each app is served\n // at /<app>/* under the same origin.\n import(\"../deploy/workspace-deploy.js\")\n .then((m) => m.runWorkspaceDeploy({ args }))\n .catch((err) => {\n console.error(\"Deploy failed:\", err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"setup-agents\": {\n import(\"./setup-agents.js\")\n .then((m) => m.runSetupAgents())\n .catch(handleScaffoldImportError);\n break;\n }\n\n case \"info\": {\n // Print read-only info about an installable package (e.g. @agent-native/scheduling).\n // Lists subpath exports, source paths in node_modules, and docs pointers.\n import(\"./info.js\")\n .then((m) => m.runInfo(args[0]))\n .catch(handleScaffoldImportError);\n break;\n }\n\n case \"add\": {\n // Blueprint installer (à la Flue's `flue add`): instead of scaffolding\n // files, emit a curated Markdown integration blueprint to stdout so it can\n // be piped into a coding agent — `agent-native add provider stripe | claude`.\n // A URL instead of a name yields a generic research-and-integrate blueprint.\n import(\"./add.js\")\n .then((m) => {\n const code = m.runAdd(args);\n process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"package\": {\n import(\"./package-lifecycle.js\")\n .then(async (m) => {\n const code = await m.runPackageLifecycle(args);\n process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"eject\": {\n import(\"./eject.js\")\n .then(async (m) => {\n const code = await m.runEject(args);\n process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"audit-agent-web\": {\n import(\"./audit-agent-web.js\")\n .then((m) => m.runAuditAgentWeb(args))\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"eval\": {\n // Discover and run the app's evals (**/*.eval.ts, evals/*.ts), score the\n // agent's output, and exit non-zero if any eval falls below its threshold.\n // Doubles as a CI deploy gate. `--json` emits a machine-readable report.\n import(\"./eval.js\")\n .then((m) => m.runEval(args))\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"changelog\": {\n // Author and roll up the app's user-facing changelog (changeset-style\n // pending entry files → a dated CHANGELOG.md section).\n import(\"./changelog.js\")\n .then(async (m) => {\n const code = await m.runChangelog(args);\n process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"--version\":\n case \"-v\": {\n console.log(_version);\n break;\n }\n\n case undefined:\n import(\"./code.js\")\n .then((m) => m.runCode([]))\n .catch(handleScaffoldImportError);\n break;\n\n case \"--help\":\n case \"-h\":\n console.log(`agent-native v${_version}\n\nUsage:\n agent-native Launch Agent-Native Code workspace\n agent-native \"fix tests\" Start an Agent-Native Code coding session\n agent-native dev Start development server\n (or the workspace gateway at a workspace root)\n agent-native build Build for production (client + server)\n agent-native start Start production server\n agent-native action <name> Run an action from actions/\n agent-native agent \"prompt\" Run the app-agent loop once against local actions\n agent-native agents list List connected/discoverable agents\n agent-native invoke <app> \"prompt\"\n Call another agent-native app over A2A\n agent-native script <name> Run an action (deprecated alias for 'action')\n agent-native typecheck Run TypeScript type checking\n agent-native create [name] Scaffold a new agent-native workspace with a\n multi-select template picker. Use --standalone\n for a single-app scaffold.\n agent-native code Launch Agent-Native Code workspace. Type a task or\n use goals like /migrate and /audit.\n agent-native code serve Run the Agent-Native Code remote connector.\n agent-native mcp <cmd> Connect external coding agents over MCP.\n cmds: serve | install | uninstall | status |\n token (--client claude-code|codex|cowork|\n cursor|opencode|github-copilot)\n agent-native connect <url> Authenticate your coding agent to a DEPLOYED app.\n OAuth-capable clients (Claude Code) get a /mcp\n authenticate prompt; Codex / Cowork use the\n browser device-code flow. --all connects every\n first-party app; --token is the no-browser\n fallback. Usually run for you by 'skills add'.\n agent-native reconnect [url] Re-authenticate an existing MCP entry without\n reinstalling app skills/connectors.\n agent-native app-skill <cmd> Install, launch, or package app-backed skills.\n cmds: ensure | launch | pack\n agent-native skills add assets|content|design-exploration|visual-edit|visual-plan|visual-recap|context-xray\n Install the skill instructions, register the MCP\n connector, AND authenticate it in one step.\n --no-connect skips auth (run 'connect' later);\n non-interactive shells print the connect command.\n --with-github-action also writes the PR Visual\n Recap workflow into .github/workflows/.\n agent-native content local-files <file-or-folder>\n Connect a local docs/content folder to normal\n database-backed Content. Use --no-open, --port N,\n or --profile docs/no-bookkeeping as needed.\n agent-native design connect Start a localhost Design bridge for a running\n dev server. Use --url, --port, --root, or\n --json to print the route/source manifest.\n agent-native recap <cmd> PR visual recap setup and GitHub Action helpers.\n Run 'agent-native recap help' for subcommands.\n agent-native plan <cmd> Plan helpers for block catalogs and local files.\n cmds: blocks | local init | local check |\n local serve | local verify | local preview\n agent-native migrate <source> Create an Agent-Native Code /migrate session, or use\n --emit for a portable own-agent dossier.\n agent-native upgrade Bring an existing app/workspace to current\n @agent-native/* packages, refresh scaffold\n skills, and typecheck. Prefer this over\n patching core/dispatch. 'upgrade check' is\n doctor-only.\n agent-native template <cmd> Pull later upstream template changes into an\n app generated from a first-party template, via\n a 3-way merge against the tree it was\n scaffolded from. cmds: status | diff | sync |\n baseline | accept. Run after 'upgrade'.\n agent-native add-app [name] Add one or more apps to the current workspace\n agent-native workspace-dev Start the multi-app workspace gateway\n agent-native deploy Build & deploy every app in the workspace to\n a single origin (your-agents.com/<app>/*)\n agent-native setup-agents Create symlinks for all agent tools\n agent-native info <pkg> Print info about an installed package:\n exports, source paths, and docs links.\n agent-native add <kind> <name|url>\n Emit an integration blueprint to stdout for your\n coding agent to apply. Pipe it in:\n 'agent-native add provider stripe | claude'.\n kinds: provider | channel | sandbox | action.\n Pass a URL instead of a name for a generic\n research-and-integrate blueprint. --list to\n browse available blueprints.\n agent-native package <cmd> <package>\n Manifest package lifecycle: inspect | add | eject.\n add/eject are dry-run unless --apply; --json emits\n a machine-readable compatibility/change report.\n agent-native eject <unit> Copy a supported feature into app-owned source.\n --list discovers units; inspect/diff are read-only;\n eject/restore are dry-run unless --apply.\n agent-native changelog <cmd> Author the app's user-facing changelog.\n cmds: add \"<summary>\" [--type added|fixed|...] |\n release | list. Pending entries live in\n changelog/; 'release' rolls them into CHANGELOG.md.\n agent-native audit-agent-web Audit a public URL for agent-readable surfaces\n agent-native eval [pattern] Run the app's evals (**/*.eval.ts, evals/*.ts)\n and exit non-zero if any scores below its\n threshold. A CI deploy gate. --json for CI,\n --threshold N to override all thresholds.\n\nOptions:\n -h, --help Show this help message\n -v, --version Show version number\n --template <names> Comma-separated templates to pre-select\n (mail,calendar,analytics,...) — or\n github:user/repo for community templates\n --headless Create the primitive-first action-only scaffold\n --standalone Scaffold a single standalone app (no workspace)\n --emit [dir] With migrate, emit an own-agent dossier\n --describe <text> With migrate, describe URL/prose-only sources\n --preset <name> Workspace deploy preset:\n cloudflare_pages (default), netlify, or vercel\n --build-only Build workspace deploy artifacts without publishing\n --eager With workspace dev, start every app immediately\n --url <url> URL to audit with audit-agent-web\n\nFeedback: ${FEEDBACK_URL}\nBugs: ${BUGS_URL}`);\n break;\n\n default:\n if (command && !command.startsWith(\"-\")) {\n // A bare, single command-like token with no further args is almost\n // always a mistyped subcommand (e.g. `agent-native destory`). Silently\n // forwarding it to the coding agent would run an LLM with file-write\n // powers on a typo — a real footgun on a code-modifying tool. Refuse it\n // and point at the explicit forms. Intentional natural-language tasks\n // are still dispatched: a quoted phrase (`agent-native \"fix tests\"`,\n // which arrives as one argv token containing a space) or multi-word\n // input (`agent-native fix the tests`, which has trailing args).\n const looksLikeMistypedSubcommand =\n args.length === 0 && /^[a-z][a-z0-9-]*$/i.test(command);\n if (!looksLikeMistypedSubcommand) {\n import(\"./code.js\")\n .then((m) => m.runCode([command, ...args]))\n .catch(handleScaffoldImportError);\n break;\n }\n console.error(`Unknown command: ${command}`);\n console.error(\n `If you meant to start a coding session with this as the task, run:\\n` +\n ` agent-native code ${JSON.stringify(command)}\\n` +\n `or quote a natural-language task:\\n` +\n ` agent-native \"fix the failing tests\"`,\n );\n console.error('Run \"agent-native --help\" for usage.');\n console.error(`Bugs: ${BUGS_URL}`);\n process.exit(1);\n }\n console.error(`Unknown command: ${command}`);\n console.error('Run \"agent-native --help\" for usage.');\n console.error(`Bugs: ${BUGS_URL}`);\n process.exit(1);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAEpC,OAAO,KAAK,MAAM,MAAM,cAAc,CAAC;AAEvC,OAAO,EACL,iCAAiC,EACjC,6BAA6B,GAC9B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,gCAAgC,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEpD,2EAA2E;AAC3E,IAAI,QAAQ,GAAG,SAAS,CAAC;AACzB,IAAI,CAAC;IACH,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/D,yCAAyC;IACzC,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CACpB,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,oBAAoB,CAAC,EAAE,OAAO,CAAC,CACxE,CAAC;IACF,QAAQ,GAAG,GAAG,CAAC,OAAO,CAAC;AACzB,CAAC;AAAC,MAAM,CAAC,CAAA,CAAC;AAEV,yEAAyE;AAC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bin/env node\n\nimport { execSync, spawn } from \"child_process\";\nimport fs from \"fs\";\nimport { createRequire } from \"module\";\nimport path from \"path\";\nimport { fileURLToPath } from \"url\";\n\nimport * as Sentry from \"@sentry/node\";\n\nimport {\n clearAgentNativeNitroPresetMarker,\n resolveAgentNativeNitroPreset,\n} from \"../deploy/nitro-preset.js\";\nimport { resolveDeployPostBuildInvocation } from \"./deploy-build.js\";\nimport { shouldTrackCliRun } from \"./telemetry-routing.js\";\nimport { createCliTelemetry } from \"./telemetry.js\";\n\n// Resolve version once at module scope — used by both --version and --help\nlet _version = \"unknown\";\ntry {\n const __dirname = path.dirname(fileURLToPath(import.meta.url));\n // dist/cli/index.js → ../../package.json\n const pkg = JSON.parse(\n fs.readFileSync(path.resolve(__dirname, \"../../package.json\"), \"utf-8\"),\n );\n _version = pkg.version;\n} catch {}\n\n// Fail fast on unsupported Node versions. `engines.node: \">=22\"` is only\n// advisory — npx/pnpm merely warn — so without this an older Node (18/20)\n// first fails deep inside a scaffold dynamic import with a cryptic\n// ERR_MODULE / syntax error that `handleScaffoldImportError` misreports as a\n// corrupt npx cache. A clear up-front message saves that whole detour.\nconst REQUIRED_NODE_MAJOR = 22;\nconst _nodeMajor = Number(process.versions.node.split(\".\")[0]);\nif (Number.isFinite(_nodeMajor) && _nodeMajor < REQUIRED_NODE_MAJOR) {\n console.error(\n `agent-native requires Node.js ${REQUIRED_NODE_MAJOR} or newer, but you're on Node ${process.versions.node}.\\n` +\n `Upgrade Node (https://nodejs.org) and re-run. With nvm: \\`nvm install ${REQUIRED_NODE_MAJOR}\\`.`,\n );\n process.exit(1);\n}\n\n/**\n * Build a redacted \"command\" tag from process.argv. Strips the value that\n * follows any --token / --key / --secret / --password / --api-key flag so\n * we don't ship developer secrets to Sentry alongside the crash.\n *\n * Supports both `--token foo` (separate argv item) and `--token=foo`\n * (combined argv item) forms.\n */\nconst SECRET_FLAG_RE = /^--?(token|key|secret|password|api[_-]?key)$/i;\nconst SECRET_FLAG_EQ_RE =\n /^(--?(token|key|secret|password|api[_-]?key))=(.*)$/i;\nfunction buildRedactedCommandTag(argv: string[]): string {\n const out: string[] = [];\n for (let i = 0; i < argv.length; i++) {\n const a = argv[i];\n if (SECRET_FLAG_RE.test(a)) {\n out.push(a);\n // Consume the next argv item as the secret value\n if (i + 1 < argv.length) {\n out.push(\"<redacted>\");\n i++;\n }\n continue;\n }\n const m = a.match(SECRET_FLAG_EQ_RE);\n if (m) {\n out.push(`${m[1]}=<redacted>`);\n continue;\n }\n out.push(a);\n }\n return out.join(\" \");\n}\n\nSentry.init({\n dsn: \"https://0d384e9eff2f6542af468b92769f2f5b@o117565.ingest.us.sentry.io/4511270386466816\",\n release: `agent-native-cli@${_version}`,\n // Sentry's Http integration wraps outgoing fetch in a way that breaks the\n // hosted Plan MCP route negotiation used by recap CI smoke checks.\n integrations: (integrations) =>\n integrations.filter((integration) => integration.name !== \"Http\"),\n // sendDefaultPii MUST stay false — the CLI runs in third-party developer\n // environments and we never want to ship request headers, IPs, cookies,\n // or process env contents to Sentry without explicit consent.\n sendDefaultPii: false,\n beforeSend(event) {\n // Drop expected user-input rejections (validateRepoName, etc.) so they\n // don't pollute Sentry with non-bug noise.\n const exceptionType = event.exception?.values?.[0]?.type;\n if (\n exceptionType === \"ValidationError\" ||\n event.tags?.handled === \"validation\"\n ) {\n return null;\n }\n\n // Defense in depth: strip any sensitive fields that may have been\n // attached to the event despite sendDefaultPii: false (e.g. integrations\n // that capture request metadata).\n if (event.request) {\n if (event.request.headers) {\n const headers = event.request.headers as Record<string, string>;\n for (const k of Object.keys(headers)) {\n const lk = k.toLowerCase();\n if (\n lk === \"cookie\" ||\n lk === \"authorization\" ||\n lk === \"set-cookie\" ||\n lk === \"proxy-authorization\"\n ) {\n delete headers[k];\n }\n }\n }\n // Cookies are also exposed via event.request.cookies as a separate field\n delete (event.request as Record<string, unknown>).cookies;\n }\n // Keep user info that was explicitly set via Sentry.setUser (id/email)\n // so we can attribute crashes back to the operator. Always strip\n // ip_address — the CLI runs on third-party machines and the IP is auto-\n // collected without consent. If only auto-collected fields remain,\n // drop the user object entirely.\n if (event.user) {\n const user = event.user as Record<string, unknown>;\n delete user.ip_address;\n const hasIdentity =\n typeof user.id === \"string\" ||\n typeof user.email === \"string\" ||\n typeof user.username === \"string\";\n if (!hasIdentity) {\n delete event.user;\n }\n }\n // Sentry's contexts can carry process.env snapshots — strip env-shaped\n // contexts so we don't leak deployment secrets.\n if (event.contexts && typeof event.contexts === \"object\") {\n delete (event.contexts as Record<string, unknown>).runtime_env;\n }\n\n event.tags = {\n ...event.tags,\n // Build the command tag from process.argv with secrets redacted so\n // `agent-native ... --token foo` doesn't leak `foo` to Sentry.\n command: buildRedactedCommandTag(process.argv.slice(2)),\n subcommand: process.argv[2] ?? \"none\",\n nodeVersion: process.version,\n platform: process.platform,\n };\n return event;\n },\n});\n\n// Identify the operator so future CLI errors carry spaceId / builderUserId\n// that we can map back to a real Builder user. The CLI doesn't have a real\n// email today — only the env-managed identifiers from the workspace's .env.\n{\n const builderUserId = process.env.BUILDER_USER_ID;\n const builderPublicKey = process.env.BUILDER_PUBLIC_KEY;\n if (builderUserId) {\n Sentry.setUser({ id: builderUserId });\n Sentry.setTag(\"builderUserId\", builderUserId);\n }\n if (builderPublicKey) {\n Sentry.setTag(\"spaceId\", builderPublicKey);\n }\n}\n\nconst FEEDBACK_URL =\n \"https://forms.agent-native.com/f/agent-native-feedback/_16ewV?source=cli\";\nconst BUGS_URL = \"https://github.com/BuilderIO/agent-native/issues\";\n\nconst command = process.argv[2];\n// Filter out bare \"--\" separators that pnpm inserts between its args and script args\nconst args = process.argv.slice(3).filter((a) => a !== \"--\");\nconst cliTelemetry = createCliTelemetry({\n cli: \"core\",\n cliVersion: _version,\n command: command ?? \"none\",\n interactive: Boolean(process.stdin.isTTY && process.stdout.isTTY),\n});\n\nfunction parseScaffoldArgs(argv: string[]): {\n name?: string;\n template?: string;\n standalone: boolean;\n headless: boolean;\n} {\n let name: string | undefined;\n let template: string | undefined;\n let standalone = false;\n let headless = false;\n\n for (let i = 0; i < argv.length; i++) {\n const arg = argv[i];\n if (arg === \"--template\" && argv[i + 1]) {\n template = argv[++i];\n } else if (arg.startsWith(\"--template=\")) {\n template = arg.slice(\"--template=\".length);\n } else if (arg === \"--standalone\") {\n standalone = true;\n } else if (arg === \"--headless\") {\n headless = true;\n } else if (!arg.startsWith(\"-\") && !name) {\n name = arg;\n }\n }\n\n return { name, template, standalone, headless };\n}\n\n// Track CLI usage (best-effort, non-blocking)\nfunction trackCli(event: string, props?: Record<string, unknown>): void {\n try {\n cliTelemetry.track(event, { command, ...props });\n } catch {}\n}\n\nfunction captureCliException(\n error: unknown,\n context?: Parameters<typeof cliTelemetry.captureException>[1],\n): void {\n try {\n cliTelemetry.captureException(error, context);\n } catch {}\n}\n\nfunction flushTelemetryAndExit(code: number): void {\n void Promise.allSettled([cliTelemetry.flush(), Sentry.flush(2000)]).finally(\n () => process.exit(code),\n );\n}\n\n// Global error handler — show feedback link on unhandled crashes\nprocess.on(\"uncaughtException\", (err) => {\n console.error(`\\n Unexpected error: ${err.message}\\n`);\n console.error(` Report this bug: ${BUGS_URL}`);\n console.error(` Send feedback: ${FEEDBACK_URL}\\n`);\n trackCli(\"cli.crash\", { error: err.message });\n captureCliException(err, { handled: false, tags: { source: \"process\" } });\n Sentry.captureException(err);\n flushTelemetryAndExit(1);\n});\n\nprocess.on(\"unhandledRejection\", (reason: any) => {\n console.error(`\\n Unhandled error: ${reason?.message ?? reason}\\n`);\n console.error(` Report this bug: ${BUGS_URL}`);\n console.error(` Send feedback: ${FEEDBACK_URL}\\n`);\n trackCli(\"cli.crash\", { error: reason?.message ?? String(reason) });\n captureCliException(reason, {\n handled: false,\n tags: { source: \"unhandled-rejection\" },\n });\n Sentry.captureException(reason);\n flushTelemetryAndExit(1);\n});\n\n// Surface a self-heal hint when an interrupted `npx @agent-native/core@latest ...`\n// leaves a half-extracted package in the npx cache and a follow-up run fails\n// to load one of our own sub-modules.\nfunction handleScaffoldImportError(err: any): void {\n const msg = err?.message ?? String(err);\n const looksLikeCorruptCache =\n err?.code === \"ERR_MODULE_NOT_FOUND\" ||\n err?.code === \"MODULE_NOT_FOUND\" ||\n err?.code === \"ENOENT\" ||\n /Cannot find module|tarball|integrity|EINTEGRITY|corrupt|truncated/i.test(\n msg,\n );\n if (looksLikeCorruptCache) {\n console.error(\n `\\n Failed to load the scaffolder. This usually means an earlier\\n \\`npx\\` run was interrupted and left a corrupt cache.\\n\\n Clear the npx cache and try again:\\n rm -rf ~/.npm/_npx\\n npx @agent-native/core@latest create\\n\\n Original error: ${msg}\\n`,\n );\n } else {\n console.error(`\\n Failed to load the scaffolder: ${msg}\\n`);\n }\n trackCli(\"cli.scaffold.import_error\", { error: msg });\n captureCliException(err, {\n handled: false,\n tags: { source: \"scaffold-import\" },\n });\n Sentry.captureException(err);\n flushTelemetryAndExit(1);\n}\n\nfunction findBinUpwards(binName: string): string | undefined {\n let dir = process.cwd();\n for (let i = 0; i < 20; i++) {\n const candidate = path.join(dir, \"node_modules\", \".bin\", binName);\n if (fs.existsSync(candidate)) return candidate;\n const parent = path.dirname(dir);\n if (parent === dir) break;\n dir = parent;\n }\n return undefined;\n}\n\nfunction findViteBin(): string {\n return findBinUpwards(\"vite\") ?? \"vite\";\n}\n\nfunction findViteJsEntry(): string | null {\n try {\n const require = createRequire(path.join(process.cwd(), \"package.json\"));\n const pkgJsonPath = require.resolve(\"vite/package.json\");\n const pkg = JSON.parse(fs.readFileSync(pkgJsonPath, \"utf-8\")) as {\n bin?: string | Record<string, string>;\n };\n const rel = typeof pkg.bin === \"string\" ? pkg.bin : pkg.bin?.vite;\n if (!rel) return null;\n const entry = path.join(path.dirname(pkgJsonPath), rel);\n return fs.existsSync(entry) ? entry : null;\n } catch {\n return null;\n }\n}\n\nfunction findTsxBin(): string {\n const localTsx = path.resolve(\"node_modules/.bin/tsx\");\n if (fs.existsSync(localTsx)) return localTsx;\n return \"tsx\";\n}\n\nfunction findTypeScriptCompilerBin(): string {\n const localTsc = path.resolve(\"node_modules/.bin/tsc\");\n if (fs.existsSync(localTsc)) return localTsc;\n\n // Prefer TypeScript 7's tsc; fall back to legacy tsgo if present.\n const localTsgo = path.resolve(\"node_modules/.bin/tsgo\");\n if (fs.existsSync(localTsgo)) return localTsgo;\n\n return \"tsc\";\n}\n\nfunction findReactRouterBin(): string {\n return findBinUpwards(\"react-router\") ?? \"react-router\";\n}\n\n/** Check if the project uses React Router framework mode (has react-router.config.ts) */\nfunction isReactRouterFramework(): boolean {\n return (\n fs.existsSync(path.resolve(\"react-router.config.ts\")) ||\n fs.existsSync(path.resolve(\"react-router.config.js\"))\n );\n}\n\nfunction canResolveFromProject(specifier: string): boolean {\n try {\n const requireFromProject = createRequire(path.resolve(\"package.json\"));\n requireFromProject.resolve(specifier);\n return true;\n } catch {\n return false;\n }\n}\n\nfunction projectUsesFsRoutes(): boolean {\n for (const file of [\n path.resolve(\"app/routes.ts\"),\n path.resolve(\"app/routes.tsx\"),\n path.resolve(\"routes.ts\"),\n path.resolve(\"routes.tsx\"),\n ]) {\n try {\n if (\n fs.existsSync(file) &&\n fs.readFileSync(file, \"utf-8\").includes(\"@react-router/fs-routes\")\n ) {\n return true;\n }\n } catch {}\n }\n return false;\n}\n\nfunction validateReactRouterBuildDependencies(): void {\n const required: Array<[packageName: string, specifier: string]> = [\n [\"react-router\", \"react-router\"],\n [\"@react-router/dev\", \"@react-router/dev/vite\"],\n [\"vite\", \"vite\"],\n ];\n if (projectUsesFsRoutes()) {\n required.push([\"@react-router/fs-routes\", \"@react-router/fs-routes\"]);\n }\n\n const missing = required\n .filter(([, specifier]) => !canResolveFromProject(specifier))\n .map(([packageName]) => packageName);\n\n if (missing.length === 0) return;\n\n const packageManager = fs.existsSync(path.resolve(\"pnpm-lock.yaml\"))\n ? \"pnpm\"\n : fs.existsSync(path.resolve(\"yarn.lock\"))\n ? \"yarn\"\n : \"npm\";\n const installCommand =\n packageManager === \"pnpm\"\n ? `pnpm add ${missing.join(\" \")}`\n : packageManager === \"yarn\"\n ? `yarn add ${missing.join(\" \")}`\n : `npm install ${missing.join(\" \")}`;\n\n console.error(\n [\n \"React Router framework mode requires build packages that are not installed from this app root.\",\n `Missing: ${missing.join(\", \")}`,\n `Install them with: ${installCommand}`,\n ].join(\"\\n\"),\n );\n process.exit(1);\n}\n\nfunction isWorkspaceRoot(): boolean {\n const pkgPath = path.resolve(\"package.json\");\n if (!fs.existsSync(pkgPath)) return false;\n try {\n const pkg = JSON.parse(fs.readFileSync(pkgPath, \"utf-8\"));\n return (\n typeof pkg?.[\"agent-native\"]?.workspaceCore === \"string\" &&\n fs.existsSync(path.resolve(\"apps\"))\n );\n } catch {\n return false;\n }\n}\n\nfunction extractNodeInspectFlag(args: string[]): {\n inspectFlag: string | null;\n rest: string[];\n} {\n const rest: string[] = [];\n let inspectFlag: string | null = null;\n for (const arg of args) {\n if (/^--inspect(-brk)?(=.+)?$/.test(arg)) {\n inspectFlag = arg;\n continue;\n }\n rest.push(arg);\n }\n return { inspectFlag, rest };\n}\n\nfunction run(\n cmd: string,\n cmdArgs: string[],\n opts?: { stdio?: \"inherit\" | \"pipe\"; env?: NodeJS.ProcessEnv },\n) {\n const child = spawn(cmd, cmdArgs, {\n stdio: opts?.stdio ?? \"inherit\",\n shell: process.platform === \"win32\",\n env: opts?.env ?? process.env,\n });\n child.on(\"exit\", (code) => process.exit(code ?? 0));\n // Forward signals to child so Cmd+C doesn't leave zombie processes holding ports\n for (const sig of [\"SIGINT\", \"SIGTERM\", \"SIGHUP\"] as const) {\n process.on(sig, () => {\n child.kill(sig);\n setTimeout(() => {\n try {\n child.kill(\"SIGKILL\");\n } catch {}\n process.exit(1);\n }, 5000).unref();\n });\n }\n return child;\n}\n\n/**\n * Walk up from `cwd` and try to figure out which template / app this build\n * is running for. We look for two patterns:\n *\n * - `templates/<name>/...` — building inside the framework monorepo\n * - `apps/<name>/...` — building inside a scaffolded workspace\n *\n * Both, neither, or one may match. Used purely as Sentry tags so we can\n * filter the noisy \"Command failed: react-router build\" issues by template.\n */\nfunction inferBuildContext(cwd: string): {\n template?: string;\n app?: string;\n} {\n const segs = cwd.split(path.sep);\n let template: string | undefined;\n let app: string | undefined;\n for (let i = 0; i < segs.length - 1; i++) {\n if (segs[i] === \"templates\" && segs[i + 1] && !segs[i + 1].startsWith(\".\"))\n template = segs[i + 1];\n if (segs[i] === \"apps\" && segs[i + 1] && !segs[i + 1].startsWith(\".\"))\n app = segs[i + 1];\n }\n return { template, app };\n}\n\n/**\n * Run a build subcommand, streaming its stdout/stderr to the user's terminal\n * in real time while also capturing bounded tails for Sentry. On non-zero\n * exit we report a structured event (template, app, exit code, stderr/stdout\n * tails) and exit with the child's code. We deliberately do NOT throw — the\n * global uncaughtException handler would re-capture with a generic\n * \"Error: Command failed\" title, collapsing every template's failure into\n * one issue (which is exactly what we're trying to fix here).\n */\nfunction runBuildStep(\n cmd: string,\n cmdArgs: string[],\n opts: { label: string; env?: NodeJS.ProcessEnv },\n): Promise<void> {\n return new Promise<void>((resolve) => {\n const STDERR_TAIL_BYTES = 8000;\n const STDOUT_TAIL_BYTES = 4000;\n let stderrBuf = \"\";\n let stdoutBuf = \"\";\n\n const child = spawn(cmd, cmdArgs, {\n stdio: [\"inherit\", \"pipe\", \"pipe\"],\n shell: process.platform === \"win32\",\n env: opts.env ?? process.env,\n });\n\n child.stdout?.on(\"data\", (chunk: Buffer) => {\n process.stdout.write(chunk);\n const next = stdoutBuf + chunk.toString(\"utf-8\");\n stdoutBuf =\n next.length > STDOUT_TAIL_BYTES ? next.slice(-STDOUT_TAIL_BYTES) : next;\n });\n child.stderr?.on(\"data\", (chunk: Buffer) => {\n process.stderr.write(chunk);\n const next = stderrBuf + chunk.toString(\"utf-8\");\n stderrBuf =\n next.length > STDERR_TAIL_BYTES ? next.slice(-STDERR_TAIL_BYTES) : next;\n });\n\n child.on(\"error\", (err) => {\n // Failure to spawn (ENOENT, etc.).\n const cwd = process.cwd();\n const { template, app } = inferBuildContext(cwd);\n Sentry.captureException(err, {\n tags: {\n buildStep: opts.label,\n ...(template ? { template } : {}),\n ...(app ? { app } : {}),\n },\n extra: {\n command: `${cmd} ${cmdArgs.join(\" \")}`,\n cwd,\n stage: \"spawn\",\n },\n });\n captureCliException(err, {\n handled: false,\n tags: {\n source: \"build-step\",\n buildStep: opts.label,\n ...(template ? { template } : {}),\n ...(app ? { app } : {}),\n },\n extra: { stage: \"spawn\" },\n });\n flushTelemetryAndExit(1);\n });\n\n child.on(\"exit\", (code, signal) => {\n const exitCode = code ?? (signal ? 1 : 0);\n if (exitCode === 0) {\n resolve();\n return;\n }\n const cwd = process.cwd();\n const { template, app } = inferBuildContext(cwd);\n const childCommand = `${cmd} ${cmdArgs.join(\" \")}`;\n const err = new Error(\n `Build step \"${opts.label}\" failed with exit code ${exitCode}` +\n (template ? ` (template=${template})` : \"\") +\n (app ? ` (app=${app})` : \"\"),\n );\n Sentry.captureException(err, {\n tags: {\n buildStep: opts.label,\n ...(template ? { template } : {}),\n ...(app ? { app } : {}),\n },\n extra: {\n command: childCommand,\n cwd,\n exitCode,\n signal: signal ?? null,\n stderrTail: stderrBuf,\n stdoutTail: stdoutBuf,\n },\n });\n captureCliException(err, {\n handled: false,\n tags: {\n source: \"build-step\",\n buildStep: opts.label,\n ...(template ? { template } : {}),\n ...(app ? { app } : {}),\n },\n extra: { exitCode, signal: signal ?? null },\n });\n // Don't throw — see comment on runBuildStep above.\n flushTelemetryAndExit(exitCode);\n });\n });\n}\n\nif (shouldTrackCliRun(command, args)) trackCli(\"cli.run\");\n\nswitch (command) {\n case \"dev\": {\n if (isWorkspaceRoot()) {\n import(\"./workspace-dev.js\")\n .then((m) => m.runWorkspaceDev({ args }))\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n const vite = findViteBin();\n const { inspectFlag, rest } = extractNodeInspectFlag(args);\n if (!inspectFlag) {\n run(vite, rest);\n break;\n }\n const viteJsEntry = findViteJsEntry();\n if (!viteJsEntry) {\n console.warn(\n \"[agent-native] Could not resolve Vite's JS entry; starting dev \" +\n \"server without the debugger.\",\n );\n run(vite, rest);\n break;\n }\n // Attach inspect flag to server process (not Vite or Nitro process)\n const parsed = inspectFlag.match(/^--(inspect(?:-brk)?)(?:=(.+))?$/);\n const kind = parsed?.[1] ?? \"inspect\";\n const target = parsed?.[2] ?? \"9229\";\n const directive = `--${kind}=${target}`;\n const preload =\n \"data:text/javascript,\" +\n encodeURIComponent(\n `process.env.NODE_OPTIONS=((process.env.NODE_OPTIONS??\"\")+\" ${directive}\").trim();`,\n );\n const env = {\n ...process.env,\n NITRO_DEV_RUNNER: process.env.NITRO_DEV_RUNNER ?? \"node-process\",\n };\n console.log(`[agent-native] API server debugger listening on ${target}`);\n run(process.execPath, [\"--import\", preload, viteJsEntry, ...rest], { env });\n break;\n }\n\n case \"workspace-dev\": {\n import(\"./workspace-dev.js\")\n .then((m) => m.runWorkspaceDev({ args }))\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"build\": {\n // React Router framework mode uses `react-router build` which\n // internally runs `vite build` with proper environment orchestration.\n // Legacy SPA mode uses `vite build` directly.\n //\n // Each step uses runBuildStep so that on failure we get a Sentry event\n // tagged with template/app and including stderr/stdout tails. If the\n // child exits non-zero, runBuildStep calls process.exit itself; the\n // continuation only runs on success.\n (async () => {\n // Doctor pre-step: scans app source for the security-critical guard\n // invariants (see `agent-native doctor --help`). Warn-only by\n // default — prints findings to stderr and always continues. Only\n // fails the build when `agent-native build --strict` was passed or\n // `agent-native.json` sets `{ \"doctor\": { \"failOnBuild\": true } }`.\n try {\n const { runDoctorBuildHook } = await import(\"./doctor.js\");\n const hook = await runDoctorBuildHook({\n cwd: process.cwd(),\n strict: args.includes(\"--strict\"),\n });\n if (!hook.ok) {\n console.error(\n \"\\nBuild aborted by `agent-native doctor` (see findings above).\",\n );\n process.exit(1);\n }\n } catch (err) {\n console.warn(\n `[doctor] pre-build scan failed to run (continuing): ${err instanceof Error ? err.message : String(err)}`,\n );\n }\n\n if (isReactRouterFramework()) {\n clearAgentNativeNitroPresetMarker();\n validateReactRouterBuildDependencies();\n const rr = findReactRouterBin();\n console.log(\"Building (React Router framework mode)...\");\n await runBuildStep(rr, [\"build\"], { label: \"react-router-build\" });\n } else {\n const vite = findViteBin();\n console.log(\"Building...\");\n await runBuildStep(vite, [\"build\"], { label: \"vite-build\" });\n }\n\n // Post-build: framework-mode apps also need a Nitro server bundle for\n // `agent-native start` and for serverless presets.\n if (isReactRouterFramework()) {\n const configuredNitroPreset = resolveAgentNativeNitroPreset();\n const deployEnv = configuredNitroPreset\n ? { ...process.env, NITRO_PRESET: configuredNitroPreset }\n : process.env;\n const __dirname = path.dirname(fileURLToPath(import.meta.url));\n const deployBuild = resolveDeployPostBuildInvocation({\n cliDir: __dirname,\n env: deployEnv,\n findTsxBin,\n });\n if (deployBuild) {\n await runBuildStep(deployBuild.command, deployBuild.args, {\n label: \"deploy-build\",\n env: deployEnv,\n });\n } else {\n console.warn(\n \"[build] Deploy build script not found and no deploy preset is configured. Skipping post-build step.\",\n );\n }\n }\n\n console.log(\"\\nBuild complete.\");\n })().catch((err) => {\n // runBuildStep handles its own failures and exits, so reaching here\n // implies a programming error in the orchestration above. Capture\n // and exit so the global unhandledRejection handler doesn't double-\n // report with a generic title.\n captureCliException(err, {\n handled: false,\n tags: { source: \"orchestration\" },\n });\n Sentry.captureException(err);\n flushTelemetryAndExit(1);\n });\n break;\n }\n\n case \"start\": {\n // Like `next start` — runs Nitro production server\n const serverEntry = path.resolve(\".output/server/index.mjs\");\n if (!fs.existsSync(serverEntry)) {\n console.error(\n 'No production build found. Run \"agent-native build\" first.',\n );\n process.exit(1);\n }\n run(\"node\", [serverEntry, ...args]);\n break;\n }\n\n case \"action\": {\n // Run an action from actions/ (or scripts/ for backwards compat)\n const actionName = args[0];\n if (!actionName) {\n console.error(\n `Usage: agent-native action <name> ['{\"arg\":\"value\"}'] [--args]`,\n );\n process.exit(1);\n }\n const tsxAction = findTsxBin();\n // Try actions/run.ts first, fall back to scripts/run.ts\n const actionsRun = path.resolve(\"actions/run.ts\");\n const scriptsRun = path.resolve(\"scripts/run.ts\");\n const runFile = fs.existsSync(actionsRun) ? actionsRun : scriptsRun;\n run(tsxAction, [runFile, ...args]);\n break;\n }\n\n case \"agent\": {\n import(\"./agent.js\")\n .then(async (m) => {\n const code = await m.runAgent(args);\n if (code !== 0) process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"script\": {\n // @deprecated — use `agent-native action` instead\n const scriptName = args[0];\n if (!scriptName) {\n console.error(\"Usage: agent-native script <name> [--args]\");\n process.exit(1);\n }\n const tsx = findTsxBin();\n // Try actions/run.ts first, fall back to scripts/run.ts\n const actionsRunScript = path.resolve(\"actions/run.ts\");\n const scriptsRunScript = path.resolve(\"scripts/run.ts\");\n const runFileScript = fs.existsSync(actionsRunScript)\n ? actionsRunScript\n : scriptsRunScript;\n run(tsx, [runFileScript, ...args]);\n break;\n }\n\n case \"typecheck\": {\n // Run TypeScript type checking\n // React Router framework mode generates route types first\n if (isReactRouterFramework()) {\n validateReactRouterBuildDependencies();\n const rr = findReactRouterBin();\n try {\n execSync(`${rr} typegen`, { stdio: \"inherit\" });\n } catch {\n // typegen may fail if routes aren't set up yet; continue to TypeScript.\n }\n }\n run(findTypeScriptCompilerBin(), [\"--noEmit\", ...args]);\n break;\n }\n\n case \"create\": {\n // Defaults to creating a workspace with a multi-select template picker.\n // Use --standalone for the old single-app flow.\n // --template foo,bar Pre-select multiple templates in the picker\n // --standalone Scaffold a single standalone app\n const parsed = parseScaffoldArgs(args);\n import(\"./create.js\")\n .then((m) =>\n m.createApp(parsed.name, {\n template: parsed.headless ? \"headless\" : parsed.template,\n standalone: parsed.standalone,\n }),\n )\n .catch(handleScaffoldImportError);\n break;\n }\n\n case \"invoke\": {\n import(\"./invoke.js\")\n .then(async (m) => {\n const code = await m.runInvoke(args);\n process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"agents\": {\n import(\"./agents.js\")\n .then(async (m) => {\n const code = await m.runAgents(args);\n process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"migrate\": {\n import(\"./migrate.js\")\n .then((m) => m.runMigrate(args))\n .catch(handleScaffoldImportError);\n break;\n }\n\n case \"upgrade\": {\n // Bring an existing app/workspace to current @agent-native/* packages,\n // refresh scaffold skills, and verify — without framework patches.\n import(\"./upgrade.js\")\n .then(async (m) => {\n const code = await m.runUpgrade(args);\n process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"template\": {\n // Pull later upstream first-party template changes into a generated app\n // via a 3-way merge against the tree it was scaffolded from.\n import(\"./template-sync.js\")\n .then(async (m) => {\n const code = await m.runTemplate(args);\n process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"doctor\": {\n // Scan app source for security-critical guard invariants (see\n // `agent-native doctor --help`). For dependency-pin health, see\n // `agent-native upgrade check` instead.\n import(\"./doctor.js\")\n .then(async (m) => {\n const code = await m.runDoctor(args);\n process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"code\": {\n import(\"./code.js\")\n .then((m) => m.runCode(args))\n .catch(handleScaffoldImportError);\n break;\n }\n\n case \"mcp\": {\n // Connect external coding agents (Claude Code, Cowork, Codex) over MCP.\n // `mcp serve` runs the stdio transport; install/uninstall/status/token\n // manage client configs + the local token.\n import(\"./mcp.js\")\n .then((m) => m.runMcp(args))\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"connect\": {\n // Wire your local coding agent to a DEPLOYED agent-native app via a\n // browser device-code flow (no token copying). `--all` connects every\n // first-party hosted app; `--token` is the no-browser fallback.\n import(\"./connect.js\")\n .then(async (m) => {\n await m.runConnect(args);\n process.exit(process.exitCode ?? 0);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"reconnect\":\n case \"reauth\": {\n // Refresh an existing remote MCP auth/config entry without reinstalling\n // app skills or running the broader connector setup path.\n import(\"./connect.js\")\n .then((m) => m.runConnect([\"reconnect\", ...args]))\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"app-skill\": {\n // Package or install an agent-native app as a skill-backed MCP/app bundle.\n import(\"./app-skill.js\")\n .then((m) => m.runAppSkill(args))\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"skills\": {\n // Friendly skill install surface. Wraps open skills installation plus MCP.\n import(\"./skills.js\")\n .then((m) => m.runSkills(args))\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"content\": {\n import(\"./content-local.js\")\n .then(async (m) => {\n const code = await m.runContentLocal(args);\n process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"visualize-repo\": {\n import(\"./visualize-repo.js\")\n .then(async (m) => {\n const code = await m.runVisualizeRepo(args);\n process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"design\": {\n import(\"./design-connect.js\")\n .then(async (m) => {\n const code = await m.runDesign(args);\n process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"recap\": {\n // PR visual recap helpers used by the GitHub Action. Promoted to the CLI\n // so an installed repo's workflow can call `agent-native recap …` instead\n // of copying helper scripts. Run `agent-native recap help` for the full\n // subcommand list.\n import(\"./recap.js\")\n .then((m) => m.runRecap(args))\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"plan\": {\n // Plan authoring helpers: local MDX preview plus a no-auth block catalog\n // fetcher for text-only/local installs.\n import(\"./plan-local.js\")\n .then((m) => m.runPlan(args))\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"create-workspace\": {\n // Deprecated alias for `create` (since workspace is now the default).\n const parsed = parseScaffoldArgs(args);\n import(\"./create-workspace.js\")\n .then((m) =>\n m.createWorkspace({ name: parsed.name, template: parsed.template }),\n )\n .catch(handleScaffoldImportError);\n break;\n }\n\n case \"add-app\": {\n // Add one or more apps to the current workspace.\n const parsed = parseScaffoldArgs(args);\n import(\"./create.js\")\n .then((m) =>\n m.addAppToWorkspace(parsed.name, { template: parsed.template }),\n )\n .catch(handleScaffoldImportError);\n break;\n }\n\n case \"deploy\": {\n // Build and deploy the entire workspace as one unit. Each app is served\n // at /<app>/* under the same origin.\n import(\"../deploy/workspace-deploy.js\")\n .then((m) => m.runWorkspaceDeploy({ args }))\n .catch((err) => {\n console.error(\"Deploy failed:\", err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"setup-agents\": {\n import(\"./setup-agents.js\")\n .then((m) => m.runSetupAgents())\n .catch(handleScaffoldImportError);\n break;\n }\n\n case \"info\": {\n // Print read-only info about an installable package (e.g. @agent-native/scheduling).\n // Lists subpath exports, source paths in node_modules, and docs pointers.\n import(\"./info.js\")\n .then((m) => m.runInfo(args[0]))\n .catch(handleScaffoldImportError);\n break;\n }\n\n case \"add\": {\n // Blueprint installer (à la Flue's `flue add`): instead of scaffolding\n // files, emit a curated Markdown integration blueprint to stdout so it can\n // be piped into a coding agent — `agent-native add provider stripe | claude`.\n // A URL instead of a name yields a generic research-and-integrate blueprint.\n import(\"./add.js\")\n .then((m) => {\n const code = m.runAdd(args);\n process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"package\": {\n import(\"./package-lifecycle.js\")\n .then(async (m) => {\n const code = await m.runPackageLifecycle(args);\n process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"eject\": {\n import(\"./eject.js\")\n .then(async (m) => {\n const code = await m.runEject(args);\n process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"audit-agent-web\": {\n import(\"./audit-agent-web.js\")\n .then((m) => m.runAuditAgentWeb(args))\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"eval\": {\n // Discover and run the app's evals (**/*.eval.ts, evals/*.ts), score the\n // agent's output, and exit non-zero if any eval falls below its threshold.\n // Doubles as a CI deploy gate. `--json` emits a machine-readable report.\n import(\"./eval.js\")\n .then((m) => m.runEval(args))\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"changelog\": {\n // Author and roll up the app's user-facing changelog (changeset-style\n // pending entry files → a dated CHANGELOG.md section).\n import(\"./changelog.js\")\n .then(async (m) => {\n const code = await m.runChangelog(args);\n process.exit(code);\n })\n .catch((err) => {\n console.error(err?.message ?? err);\n process.exit(1);\n });\n break;\n }\n\n case \"--version\":\n case \"-v\": {\n console.log(_version);\n break;\n }\n\n case undefined:\n import(\"./code.js\")\n .then((m) => m.runCode([]))\n .catch(handleScaffoldImportError);\n break;\n\n case \"--help\":\n case \"-h\":\n console.log(`agent-native v${_version}\n\nUsage:\n agent-native Launch Agent-Native Code workspace\n agent-native \"fix tests\" Start an Agent-Native Code coding session\n agent-native dev Start development server\n (or the workspace gateway at a workspace root)\n agent-native build Build for production (client + server)\n agent-native start Start production server\n agent-native action <name> Run an action from actions/\n agent-native agent \"prompt\" Run the app-agent loop once against local actions\n agent-native agents list List connected/discoverable agents\n agent-native invoke <app> \"prompt\"\n Call another agent-native app over A2A\n agent-native script <name> Run an action (deprecated alias for 'action')\n agent-native typecheck Run TypeScript type checking\n agent-native create [name] Scaffold a new agent-native workspace with a\n multi-select template picker. Use --standalone\n for a single-app scaffold, or choose Community\n template to install a public GitHub repository.\n agent-native code Launch Agent-Native Code workspace. Type a task or\n use goals like /migrate and /audit.\n agent-native code serve Run the Agent-Native Code remote connector.\n agent-native mcp <cmd> Connect external coding agents over MCP.\n cmds: serve | install | uninstall | status |\n token (--client claude-code|codex|cowork|\n cursor|opencode|github-copilot)\n agent-native connect <url> Authenticate your coding agent to a DEPLOYED app.\n OAuth-capable clients (Claude Code) get a /mcp\n authenticate prompt; Codex / Cowork use the\n browser device-code flow. --all connects every\n first-party app; --token is the no-browser\n fallback. Usually run for you by 'skills add'.\n agent-native reconnect [url] Re-authenticate an existing MCP entry without\n reinstalling app skills/connectors.\n agent-native app-skill <cmd> Install, launch, or package app-backed skills.\n cmds: ensure | launch | pack\n agent-native skills add assets|content|design-exploration|visual-edit|visual-plan|visual-recap|context-xray\n Install the skill instructions, register the MCP\n connector, AND authenticate it in one step.\n --no-connect skips auth (run 'connect' later);\n non-interactive shells print the connect command.\n --with-github-action also writes the PR Visual\n Recap workflow into .github/workflows/.\n agent-native content local-files <file-or-folder>\n Connect a local docs/content folder to normal\n database-backed Content. Use --no-open, --port N,\n or --profile docs/no-bookkeeping as needed.\n agent-native design connect Start a localhost Design bridge for a running\n dev server. Use --url, --port, --root, or\n --json to print the route/source manifest.\n agent-native recap <cmd> PR visual recap setup and GitHub Action helpers.\n Run 'agent-native recap help' for subcommands.\n agent-native plan <cmd> Plan helpers for block catalogs and local files.\n cmds: blocks | local init | local check |\n local serve | local verify | local preview\n agent-native migrate <source> Create an Agent-Native Code /migrate session, or use\n --emit for a portable own-agent dossier.\n agent-native upgrade Bring an existing app/workspace to current\n @agent-native/* packages, refresh scaffold\n skills, and typecheck. Prefer this over\n patching core/dispatch. 'upgrade check' is\n doctor-only.\n agent-native template <cmd> Pull later upstream template changes into an\n app generated from a first-party template, via\n a 3-way merge against the tree it was\n scaffolded from. cmds: status | diff | sync |\n baseline | accept. Run after 'upgrade'.\n agent-native add-app [name] Add one or more apps to the current workspace\n agent-native workspace-dev Start the multi-app workspace gateway\n agent-native deploy Build & deploy every app in the workspace to\n a single origin (your-agents.com/<app>/*)\n agent-native setup-agents Create symlinks for all agent tools\n agent-native info <pkg> Print info about an installed package:\n exports, source paths, and docs links.\n agent-native add <kind> <name|url>\n Emit an integration blueprint to stdout for your\n coding agent to apply. Pipe it in:\n 'agent-native add provider stripe | claude'.\n kinds: provider | channel | sandbox | action.\n Pass a URL instead of a name for a generic\n research-and-integrate blueprint. --list to\n browse available blueprints.\n agent-native package <cmd> <package>\n Manifest package lifecycle: inspect | add | eject.\n add/eject are dry-run unless --apply; --json emits\n a machine-readable compatibility/change report.\n agent-native eject <unit> Copy a supported feature into app-owned source.\n --list discovers units; inspect/diff are read-only;\n eject/restore are dry-run unless --apply.\n agent-native changelog <cmd> Author the app's user-facing changelog.\n cmds: add \"<summary>\" [--type added|fixed|...] |\n release | list. Pending entries live in\n changelog/; 'release' rolls them into CHANGELOG.md.\n agent-native audit-agent-web Audit a public URL for agent-readable surfaces\n agent-native eval [pattern] Run the app's evals (**/*.eval.ts, evals/*.ts)\n and exit non-zero if any scores below its\n threshold. A CI deploy gate. --json for CI,\n --threshold N to override all thresholds.\n\nOptions:\n -h, --help Show this help message\n -v, --version Show version number\n --template <names> Comma-separated templates to pre-select\n (mail,calendar,analytics,...), or install a\n community repo from a plain GitHub URL or\n community:owner/repo[?app=id][#ref]\n --headless Create the primitive-first action-only scaffold\n --standalone Scaffold a single standalone app (no workspace)\n --emit [dir] With migrate, emit an own-agent dossier\n --describe <text> With migrate, describe URL/prose-only sources\n --preset <name> Workspace deploy preset:\n cloudflare_pages (default), netlify, or vercel\n --build-only Build workspace deploy artifacts without publishing\n --eager With workspace dev, start every app immediately\n --url <url> URL to audit with audit-agent-web\n\nFeedback: ${FEEDBACK_URL}\nBugs: ${BUGS_URL}`);\n break;\n\n default:\n if (command && !command.startsWith(\"-\")) {\n // A bare, single command-like token with no further args is almost\n // always a mistyped subcommand (e.g. `agent-native destory`). Silently\n // forwarding it to the coding agent would run an LLM with file-write\n // powers on a typo — a real footgun on a code-modifying tool. Refuse it\n // and point at the explicit forms. Intentional natural-language tasks\n // are still dispatched: a quoted phrase (`agent-native \"fix tests\"`,\n // which arrives as one argv token containing a space) or multi-word\n // input (`agent-native fix the tests`, which has trailing args).\n const looksLikeMistypedSubcommand =\n args.length === 0 && /^[a-z][a-z0-9-]*$/i.test(command);\n if (!looksLikeMistypedSubcommand) {\n import(\"./code.js\")\n .then((m) => m.runCode([command, ...args]))\n .catch(handleScaffoldImportError);\n break;\n }\n console.error(`Unknown command: ${command}`);\n console.error(\n `If you meant to start a coding session with this as the task, run:\\n` +\n ` agent-native code ${JSON.stringify(command)}\\n` +\n `or quote a natural-language task:\\n` +\n ` agent-native \"fix the failing tests\"`,\n );\n console.error('Run \"agent-native --help\" for usage.');\n console.error(`Bugs: ${BUGS_URL}`);\n process.exit(1);\n }\n console.error(`Unknown command: ${command}`);\n console.error('Run \"agent-native --help\" for usage.');\n console.error(`Bugs: ${BUGS_URL}`);\n process.exit(1);\n}\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const DESIGN_VISUAL_EDIT_SKILL_MD = "---\nname: visual-edit\ndescription: >-\n Open a running local app in Design overview mode as URL-backed iframe screens\n for visual editing, flow review, duplication, and route-state exploration.\n Use when the user asks to inspect, compare, or edit a real local app visually\n in Design.\nmetadata:\n visibility: exported\n---\n\n# Visual Edit\n\nUse `/visual-edit` when the user wants to inspect or edit a real local app\nvisually instead of generating standalone Alpine HTML. The source of truth is\nthe running localhost app plus its route URLs. Design shows those routes as\niframe-backed screens on the infinite canvas.\n\n## Installing this skill for an external MCP host\n\nThe hosted install path\n(`npx @agent-native/core@latest skills add visual-edit`, or `design` for the\nfull Design bundle) installs the exported instructions and registers the\nhosted Design MCP connector together. The open Skills CLI path\n(`npx skills@latest add BuilderIO/agent-native --skill visual-edit`) installs\nexported instructions only, with no MCP connector registration.\n\n## Put Design Beside The Chat\n\nPrefer the interactive MCP App returned by `open-visual-edit` when the coding\nhost renders it. The user gets the Design canvas beside the conversation, and\n**Apply design updates** can submit the bounded source-edit handoff back to the\ncurrent host conversation through the standard MCP Apps message bridge. The\nhost may ask the user to confirm the current conversation or choose a new one.\n\nOtherwise, after `open-visual-edit` returns `openUrl`, open that URL in the\ncoding host's inline browser when one is available. This still keeps Design\nbeside the conversation, but an ordinary browser page has no trusted path into\nthe host's current composer. In that fallback surface, **Apply design updates**\nuses Design's local agent; use **Copy prompt to your agent** to hand the same\nstructured edit batch to the coding agent.\n\n- In Codex Desktop, use the in-app Browser tool to open `openUrl`. The built-in\n browser is the right surface for localhost and public pages that should stay\n inside the app.\n- In Claude Code Desktop's Code tab, open or preview `openUrl` in the Browser\n pane. Ask Claude to preview it rather than opening the system browser.\n- In VS Code, use the Agent Native Design webview/deep link described below.\n- Inline browser availability is host-dependent. CLI, remote, or restricted\n sessions may not expose one. If the inline surface is unavailable or disabled,\n return the normal **Open design** link instead of claiming it opened.\n\nPrefer the MCP App surface for a connected Design plugin, then the host's\nbrowser/preview tool as the universal fallback. Keep the canvas beside chat\nwhen the host supports rearrangeable panes.\n\nInside Design, use **Show/Hide UI** from the `Cmd+K` menu or press Figma's\n`Shift+\\` shortcut to toggle all editing chrome so only the canvas remains.\nThe same action is available from Design's empty-canvas context menu.\n\n## Core Model\n\n- Each screen is a URL-backed iframe, not copied HTML.\n- Each screen keeps URL metadata: `connectionId`, `routeId`, `path`,\n `url`, `bridgeUrl`, title, and viewport size.\n- Localhost Edit mode renders the running app through the local bridge as a live\n iframe with the same editor bridge used by HTML designs. It is never a frozen\n static DOM snapshot. Editing is direct DOM manipulation against that live\n document; the parallel `/snapshot` fetch feeds the editable source model only\n and must never be rendered in the frame.\n- A viewer holding the connection's `previewToken` gets the proxied\n `/live-edit` document with editor chrome. A viewer without one \u2014 a signed-out\n session, a public link, or an inline browser with no cookies \u2014 gets the plain\n dev-server URL: still live, but with no editor chrome, no layers, and no\n editing. If the canvas looks right but selection and the layers panel do\n nothing, the frame is unbridged; sign in rather than assuming Design is broken.\n- The live editor is same-origin through the local bridge proxy. This boots\n CSR apps and root-relative assets, but it is still a localhost editing proxy:\n app-origin cookies, WebSockets/HMR, SSE, and non-GET app API calls may need a\n future dev-server/plugin integration for perfect parity with the app's own\n origin.\n- Interact mode renders the app's normal URL so app navigation, scrolling,\n links, and form controls behave as they would in the browser.\n- While a localhost screen has pending live visual edits, do not switch back to\n Interact until the user either applies the edits to source or explicitly\n aborts/discards the preview.\n- Start in Design's screen overview mode. In overview, screens are static\n design frames; full-screen focus is for scrolling and app interaction.\n- Alt-drag duplicates a screen. For localhost screens, duplication copies the\n iframe frame and URL metadata; change the copy's path/query for a new state.\n- Flow visualization is multiple URL states: `/checkout?step=shipping`,\n `/checkout?step=payment`, `/checkout?step=done`, etc.\n- When the user gives a named flow or numbered screen list, preserve that order\n and create one screen per URL/path. Shorthand like\n `localhost:1234/onboarding/1` means\n `http://localhost:1234/onboarding/1`.\n\n## Useful Canvas Sets\n\nTranslate the user's requested review into the smallest useful set of frames:\n\n- **Multi-step flow:** one ordered frame per route or query state, such as cart,\n shipping, payment, and confirmation.\n- **Multiple pages:** one frame per meaningful route, such as home, pricing,\n docs, and account settings.\n- **Responsive comparison:** repeat the same route at the requested desktop,\n tablet, and mobile viewports so they align in one row.\n- **State review:** repeat a route for meaningful URL-addressable states such as\n empty, loading, error, modal-open, or selected-item views.\n\nDo not expand every discovered route or every viewport unless the user asks for\nan exhaustive audit. Preserve the user's labels and sequence so the canvas reads\nlike the workflow they described.\n\n## Select And Reprompt\n\nWhen a chat message begins with `[Reprompt selection]`, the selected subtree is\na hard write boundary. The only mutation path is `propose-node-rewrite` with\nthe exact `repromptId`, target, and `baseVersionHash` captured in\n`design-reprompt-pending:<designId>:<fileId>`. Never use `apply-visual-edit`,\n`apply-source-edit`, `write-source`, `write-local-file`, `edit-design`, or any\nother content-writing action for that request. Clarifying questions are allowed,\nbut a requested change must remain a proposal.\n\nProduce one variant by default. Produce two or three only when the instruction\nasks for options. A retry includes `priorProposalId`; keep the same target and\nbase version, incorporate the feedback, and call `propose-node-rewrite` again.\nThe UI previews the returned subtree without persisting it.\n\nUse `resolve-node-rewrite` for the accept/reject lifecycle. Accept applies the\nchosen variant as one version-checked inline/Yjs content transaction so one\nundo restores the prior structure; reject clears the proposal without changing\ncontent. For conversational resolution such as \"apply the second one,\" call\n`view-screen`, read the active `design.reprompt.proposal`, and pass its\n`proposalId` plus the zero-based `variantIndex` to `resolve-node-rewrite`.\n\n## Review Quality\n\n- Treat the running app as the truth. Preserve its component language, tokens,\n route state, and real content unless the user explicitly asks for a new visual\n direction.\n- Use multiple URL states to reveal meaningful UX moments: empty/loading/error\n states, focused panels, modals, responsive breakpoints, and completed flow\n steps when those matter to the review.\n- For visual edits, compare before/after at the relevant viewport sizes and\n check key hover/focus/scroll states when the app exposes them.\n\n## Account And Sharing Model\n\n- The `/visual-edit` entry route can open before the viewer signs in. Public\n `/design/:id` editor links can also render read-only public designs without a\n session.\n- Prefer links returned by Design actions or `/_agent-native/open` deep links.\n Do not surface URLs with `_session=` tokens. Query sessions are only a\n fallback after normal cookie resolution, so an existing browser session can\n still open the design as a different user and show \"Design not found\".\n- Do not attempt anonymous write actions. Bridge registration, design creation,\n screen placement, generation, saving, and sharing are account-backed. If a\n signed-out visitor wants to save or share, send them through the framework\n sign-in return flow, then save or copy the design into that account before\n opening the share dialog.\n\n## Required Local Bridge\n\nThe live-edit bridge is unlocked by a shared secret (the \"bridge token\") that\nmust match on two sides: the local bridge process, and the user's connection row\nin Design (which the browser reads to authorize `/live-edit-bridge`,\n`/read-file`, `/write-file`). Get them to match by letting the\n**authenticated** `open-visual-edit` action mint the token, then starting the\nbridge with it. This is the only ordering that works for the remote-MCP flow \u2014\nthe bridge cannot push its own token to the server without a CLI auth token, so\nthe server mints instead and the bridge adopts.\n\nFrom the target app repo, make sure its dev server is running, then:\n\n**1. Discover routes without starting a durable bridge** (one-shot, exits):\n\n```bash\nnpx @agent-native/core@latest design connect --url http://localhost:5173 --root . --json\n```\n\nThis prints the manifest (routes + capabilities). Parse it to build\n`routeManifest` for the next step. (Skip this if the user already gave explicit\npaths/URLs to place.)\n\nInside the agent-native monorepo itself, use the workspace CLI instead of\n`npx` \u2014 `npx` installs the last published `@agent-native/core`, which will not\ncontain local changes and costs a slow install on every call:\n\n```bash\npnpm dev:cli design connect --url http://localhost:5173 --root templates/<app> --json\n```\n\n**2. Call `open-visual-edit`** (see Action Flow below) with NO `bridgeToken`.\nThe server mints one, stores it on the user's connection row, copies it into the\nplaced screens' metadata, and returns it to you as `bridgeToken`. Capture it.\n\n**3. Start the persistent bridge adopting that token** (single line; prefer the\nenv var so the secret does not appear in `ps`):\n\n```bash\nAGENT_NATIVE_BRIDGE_TOKEN=\"<bridgeToken from step 2>\" npx @agent-native/core@latest design connect --url http://localhost:5173 --root . --daemon\n```\n\n(Equivalently, pass `--bridge-token <token>`.) This starts a detached bridge on\n`http://127.0.0.1:7331`, adopts the server-minted token \u2014 so bridge and row\nagree and live-edit authorizes with no self-registration \u2014 and stays alive after\nthe command exits.\n\nFor a manual health/manifest check on the running bridge:\n\n```bash\ncurl http://127.0.0.1:7331/health\n```\n\n`/health` needs no token. The full manifest at `/manifest.json` is\npreview-token protected, so an unauthenticated `curl` of it returns\n`{\"ok\":false,\"error\":\"invalid or missing preview token\"}` \u2014 that response means\nthe bridge is up, not that it is broken.\n\nOnly use `--json` for the step-1 route probe. Never use `--json`, `--once`,\nor `--dry-run` for the durable step-3 bridge: they print the manifest and exit,\nso Design falls back to a non-editable live iframe.\n\nThe bridge listens on a single fixed port (7331) and refuses to start for a\nsecond, different app. It is detached with no log file, so if `--daemon` reports\na timeout, check for a stale process (`lsof -ti:7331`) before retrying.\n\n## Action Flow\n\nPrefer the single authenticated `open-visual-edit` action. It registers or\nrefreshes the localhost bridge connection, mints and stores the bridge token,\ncreates or reuses a Design project, places URL-backed screens, stores the active\nvisual-edit context, and navigates to overview mode in one call. This avoids\ncreating a private design under a synthetic CLI user and then handing the browser\na tokenized URL that may be shadowed by an existing session.\n\nCall it BEFORE starting the durable bridge (step 3 above): it does not contact\nthe bridge, so the bridge need not be running yet, and you need its returned\n`bridgeToken` to start the bridge with a matching secret. Omit `bridgeToken`\non the call so the server mints one.\n\n```bash\npnpm action open-visual-edit '{\n \"title\": \"Docs homepage visual edit\",\n \"devServerUrl\": \"http://localhost:5173\",\n \"bridgeUrl\": \"http://127.0.0.1:7331\",\n \"rootPath\": \"/absolute/path/to/app\",\n \"routeManifest\": { \"...\": \"from /manifest.json\" },\n \"paths\": [\"/\", \"/pricing\", \"/checkout?step=payment\"]\n}'\n```\n\nThe action returns `designId`, `connectionId`, `bridgeToken`, `screens`,\n`urlPath`, and `openUrl`. Keep `designId`/`connectionId` in the chat context\nfor follow-ups, and pass `bridgeToken` to `design connect` (step 3) to start\nthe bridge. On follow-up calls reusing an existing `connectionId`, the same\ntoken is returned (it is minted once and reused), so the running bridge stays\nvalid.\n\n### Desktop and mobile side by side\n\nPass `viewports` to place every requested route once per viewport. Frames lay\nout as a grid: one row per route, one column per viewport. Presets are\n`desktop` (1280x900), `laptop` (1440x900), `tablet` (834x1112), and `mobile`\n(390x844); an explicit `{ \"label\": \"...\", \"width\": N, \"height\": N }` also works.\n\n```bash\npnpm action open-visual-edit '{\n \"title\": \"Tasks responsive visual edit\",\n \"devServerUrl\": \"http://localhost:5173\",\n \"bridgeUrl\": \"http://127.0.0.1:7331\",\n \"rootPath\": \"/absolute/path/to/app\",\n \"paths\": [\"/tasks\", \"/inbox\"],\n \"viewports\": [\"desktop\", \"mobile\"]\n}'\n```\n\nPrefer this over two separate calls with `defaultWidth`/`defaultHeight`: it\nkeeps each route's viewports aligned in a row and titles them\n`Tasks \u2014 Desktop` / `Tasks \u2014 Mobile` so the canvas reads clearly. `viewports`\noverrides `defaultWidth`/`defaultHeight`. With no `routes`/`paths`, it expands\nevery route in the localhost manifest, which is usually far more frames than\nthe user wants \u2014 name the paths.\n\n### Adding more page frames later\n\nCall `open-visual-edit` again with the same `designId` and `connectionId` and\nonly the new paths. Existing frames for the same route and viewport are\nrefreshed in place rather than duplicated, and a frame the user has dragged or\nresized keeps its position unless you explicitly pass `x`/`y`/`width`/`height`.\n\n```bash\npnpm action open-visual-edit '{\n \"designId\": \"<existing-design-id>\",\n \"connectionId\": \"<existing-connection-id>\",\n \"devServerUrl\": \"http://localhost:5173\",\n \"paths\": [\"/settings\", \"/team\"],\n \"startY\": 2200\n}'\n```\n\nDo NOT add `defaultWidth`/`defaultHeight` just to restate the default size:\nsupplying either one marks the viewport as explicitly requested, which\noverwrites frame sizes the user has already adjusted on the canvas.\n\nFor a numbered flow the user describes in chat, keep the labels and order:\n\n```bash\npnpm action open-visual-edit '{\n \"designId\": \"<existing-design-id>\",\n \"connectionId\": \"<existing-connection-id>\",\n \"devServerUrl\": \"http://localhost:1234\",\n \"routes\": [\n { \"url\": \"localhost:1234/onboarding/1\", \"title\": \"Screen 1\" },\n { \"url\": \"localhost:1234/onboarding/2\", \"title\": \"Screen 2\" },\n { \"url\": \"localhost:1234/onboarding/3\", \"title\": \"Screen 3\" }\n ]\n}'\n```\n\nIf no `routes` or `paths` are supplied, `open-visual-edit` uses every route\nfrom the localhost manifest.\n\nFallback, only when `open-visual-edit` is unavailable:\n\n1. Register or refresh the bridge with `connect-localhost`, passing the\n `/manifest.json` result as `routeManifest` and `capabilities`.\n2. Create or reuse a Design project with `create-design`.\n3. Place URL-backed screens with `add-localhost-screens`.\n4. Navigate to overview mode with `navigate`.\n\n## Open The Design Surface\n\n- Use the `link`, `deepLink`, or MCP App embed returned by Design actions so\n the user sees the canvas. Follow **Put Design Beside The Chat**: prefer the\n host's inline Browser, preview, or webview panel; otherwise surface the\n **Open design** link.\n- Return or open the `openUrl` / action link, not a hand-built\n `/design/:id?_session=...` URL.\n- If the user is working in VS Code, the Agent Native extension can open the\n same URL via\n `vscode://builder.agent-native/open?url=<encoded-design-url>`. Its\n `Agent Native: Open Design Canvas` command also starts the local bridge and\n opens hosted Design in the VS Code side panel.\n- After `open-visual-edit`, confirm the Design editor is in overview mode\n with the requested URL-backed frames visible, and that they render the app\n rather than a spinner. Do not stop at \"screens added\" when the user asked to\n inspect or edit visually.\n\n## Applying Visual Edits Back To Source\n\nCanvas edits on a localhost screen do not write source as you make them. They\naccumulate as pending edits and the editor shows an **Apply design updates**\nbutton on the canvas. In an MCP App, clicking it hands the bounded structured\nprompt to the current host coding conversation. In an ordinary browser or\nstandalone Design page, it falls back to the local Design agent. The dropdown's\n**Copy prompt to your agent** action is the universal manual fallback.\n\n- Style, text, and drag/drop structure edits all collect into the same pending\n batch, so the user can make several changes and apply once.\n- After the write lands, the target app's own dev-server HMR refreshes the\n frames \u2014 no manual reload. If frames do not refresh, the write did not land;\n say so rather than assuming.\n- The separate disk-icon \"Apply to source\" button is the deterministic\n whole-file HTML/CSS writer. It is intentionally disabled for compiled\n `.jsx`/`.tsx` routes \u2014 those must go through the agent path above.\n\n## Editing URLs\n\nKeep localhost screens as URL files plus `screenMetadata[fileId]`. Do not\nreplace them with copied `srcdoc` HTML unless the user explicitly asks for a\nfrozen snapshot. To change a state, rerun `open-visual-edit` with the new\npath/query or duplicate the screen and update the copy's URL metadata.\n\n## Local Files in the Code Tab\n\nOnce a connection is registered, the design editor's Code panel (left rail \u2192\nCode, or `navigate --view editor --designId <id> --leftPanel code`) shows a\nlocal-files workspace root for that connection next to the design's own files.\nTreat that root like VS Code opened at the connected project directory: file\ntree, search, open/edit, and save are backed by the real local files. It lists\nthe connected app's text/code files through the bridge\n(`list-local-files` / `read-local-file`); build output, `node_modules`,\n`.git`, and secret-looking paths (`.env*`, key files) are always excluded.\n\n- Browsing and reading need only editor access on the design plus the running\n bridge.\n- Saving goes through `write-local-file`: the first save opens the\n write-consent dialog (an 8-hour, folder-scoped grant) and retries\n automatically once granted. Only text/code files are writable; secret paths\n are always blocked.\n- If the agent calls `write-local-file` directly (not through a UI save) and it\n fails with \"no write-consent grant\", call `request-localhost-write-consent`.\n It opens the write-consent dialog in the editor, or reports `alreadyGranted`\n if one already exists. Granting is human-only \u2014\n `grant-localhost-write-consent` is hidden from agents, so you cannot approve\n it yourself. Tell the user to click \"Allow writes\", then retry\n `write-local-file` once. Do not keep retrying blindly: the write stays\n blocked until the user approves.\n- Saves are conflict-checked against the file's on-disk version \u2014 a file that\n changed since it was read fails with a version conflict instead of being\n overwritten.\n\n## React Source Writeback\n\n- Use compiler/debug provenance (project-relative file, line, column,\n component, and runtime multiplicity) to locate React/TSX source. Treat it as\n evidence, not as permission for a generic AST structural transform.\n- A single-instance leaf text edit, literal `className`/`class` edit, or flat\n literal `style={{ ... }}` property may use `apply-visual-edit` with a\n `local-file` source and exact `target.sourceAnchor`. Preview first (omit\n `persist`), inspect `proposedDiff`, then call with `persist: true`.\n- Reparenting, grouping/ungrouping, wrappers, dynamic expressions, repeated\n `.map()` instances, shared components, breakpoint-scoped edits, and\n cross-file changes go through the coding agent with exact subject/target\n anchors and their runtime relationship. `apply-visual-edit` refuses these\n with `status: \"needsAgent\"` rather than guessing.\n- Before each write, read the file and pass its exact `versionHash` to\n `write-local-file` with `requireExpectedVersionHash: true`; on conflict,\n re-read and re-plan. Keep the optimistic preview until HMR/runtime confirms\n the result. Human write consent remains mandatory and agents cannot grant it.\n\n## Verification\n\n- `list-localhost-connections` returns the expected connection and routes.\n- The Design editor opens in overview mode.\n- Every requested screen renders the intended localhost URL, showing real app\n content rather than an endless loading spinner.\n- The screen iframe carries a `src`, not a `srcdoc`. A localhost screen with a\n `srcdoc` is a bug, not a slow load \u2014 check it in the browser devtools before\n reporting the canvas as working.\n- Alt-dragging a screen copies the URL-backed frame, not an inline HTML clone.\n- A query/path edit changes only the target screen's URL metadata and iframe.\n- The Code tab shows a local-files root for the connection and opens its files.\n";
|
|
1
|
+
export declare const DESIGN_VISUAL_EDIT_SKILL_MD = "---\nname: visual-edit\ndescription: >-\n Open a running local app in Design overview mode as URL-backed iframe screens\n for visual editing, flow review, duplication, and route-state exploration.\n Use when the user asks to inspect, compare, or edit a real local app visually\n in Design.\nmetadata:\n visibility: exported\n---\n\n# Visual Edit\n\nUse `/visual-edit` when the user wants to inspect or edit a real local app\nvisually instead of generating standalone Alpine HTML. The source of truth is\nthe running localhost app plus its route URLs. Design shows those routes as\niframe-backed screens on the infinite canvas.\n\n## Installing this skill for an external MCP host\n\nThe hosted install path\n(`npx @agent-native/core@latest skills add visual-edit`, or `design` for the\nfull Design bundle) installs the exported instructions and registers the\nhosted Design MCP connector together. The open Skills CLI path\n(`npx skills@latest add BuilderIO/agent-native --skill visual-edit`) installs\nexported instructions only, with no MCP connector registration.\n\n## Put Design Beside The Chat\n\nPrefer the interactive MCP App returned by `open-visual-edit` when the coding\nhost renders it. The user gets the Design canvas beside the conversation, and\n**Apply design updates** can submit the bounded source-edit handoff back to the\ncurrent host conversation through the standard MCP Apps message bridge. The\nhost may ask the user to confirm the current conversation or choose a new one.\n\nOtherwise, `openUrl` is a credential-free, read-only fallback that is safe to\nshow in model text or retain in logs. Do not claim that fallback is editable:\nthe edit capability is intentionally available only to the host-managed MCP App\nlauncher, where it is hidden from the model and redeemed once.\n\n- In Codex Desktop, prefer the rendered MCP App. Use the in-app Browser for the\n credential-free `openUrl` only when a read-only fallback is acceptable.\n- In Claude Code Desktop's Code tab, prefer the rendered MCP App. Preview\n `openUrl` in the Browser pane only as the read-only fallback.\n- In VS Code, use the Agent Native Design webview/deep link described below.\n- Inline browser availability is host-dependent. CLI, remote, or restricted\n sessions may not expose one. If the inline surface is unavailable or disabled,\n return the normal **Open design** link instead of claiming it opened.\n\nPrefer the MCP App surface for a connected Design plugin, then the host's\nbrowser/preview tool as the universal fallback. Keep the canvas beside chat\nwhen the host supports rearrangeable panes.\n\nInside Design, use **Show/Hide UI** from the `Cmd+K` menu or press Figma's\n`Shift+\\` shortcut to toggle all editing chrome so only the canvas remains.\nThe same action is available from Design's empty-canvas context menu.\n\n## Core Model\n\n- Each screen is a URL-backed iframe, not copied HTML.\n- Each screen keeps URL metadata: `connectionId`, `routeId`, `path`,\n `url`, `bridgeUrl`, title, and viewport size.\n- Localhost Edit mode renders the running app through the local bridge as a live\n iframe with the same editor bridge used by HTML designs. It is never a frozen\n static DOM snapshot. Editing is direct DOM manipulation against that live\n document; the parallel `/snapshot` fetch feeds the editable source model only\n and must never be rendered in the frame.\n- **The `/visual-edit` skill needs no Design account sign-in.**\n `open-visual-edit` mints a five-minute, single-use capability for the exact\n `/visual-edit/:designId` local-editor route. The MCP host redeems it outside\n model-visible text, then opens the existing editor with localhost edit access.\n This capability is not an account session: `/_agent-native/session` remains\n signed out, and account-backed save/share/generate actions remain denied.\n- The skill enters through local `pnpm action open-visual-edit`. When that CLI\n has no account session, the action uses a stable, workspace-scoped local\n principal to register the bridge, create/reuse the local design, and place\n screens. That principal exists only inside the in-process CLI call; it is not\n a browser login and cannot be selected by an HTTP, MCP, or tunneled caller.\n- Public links are always read-only, including on loopback. Loopback peer\n identity is not an authentication boundary because a tunnel or reverse proxy\n can make a remote request appear local. A bare `/visual-edit/:designId` or\n `/design/:designId` URL carries no capability and must never release the\n connection's `previewToken`.\n- The live editor is same-origin through the local bridge proxy. This boots\n CSR apps and root-relative assets, but it is still a localhost editing proxy:\n app-origin cookies, WebSockets/HMR, SSE, and non-GET app API calls may need a\n future dev-server/plugin integration for perfect parity with the app's own\n origin.\n- **There are exactly two views.** The infinite canvas is where all editing\n happens, and the responsive interactive view (Interact) is where the app runs\n for real. There is no third \"full view\"/focused-edit state \u2014 clicking a screen\n in the Screens list, or the view toggle, opens the responsive view, and\n closing it returns to the canvas.\n- Interact keeps the left and right rails and adds a device bar above the canvas\n (device preset, editable width/height, zoom, close). It renders the app's\n normal URL so navigation, scrolling, links, and form controls behave as they\n would in the browser, and the wheel scrolls the app rather than panning the\n canvas. The canvas view is the opposite: the wheel pans and zooms it, and\n native interaction inside the frame is suppressed.\n- While a localhost screen has pending live visual edits, do not switch back to\n Interact until the user either applies the edits to source or explicitly\n aborts/discards the preview.\n- Alt-drag duplicates a screen. For localhost screens, duplication copies the\n iframe frame and URL metadata; change the copy's path/query for a new state.\n- Flow visualization is multiple URL states: `/checkout?step=shipping`,\n `/checkout?step=payment`, `/checkout?step=done`, etc.\n- When the user gives a named flow or numbered screen list, preserve that order\n and create one screen per URL/path. Shorthand like\n `localhost:1234/onboarding/1` means\n `http://localhost:1234/onboarding/1`.\n\n## Useful Canvas Sets\n\nTranslate the user's requested review into the smallest useful set of frames:\n\n- **Multi-step flow:** one ordered frame per route or query state, such as cart,\n shipping, payment, and confirmation.\n- **Multiple pages:** one frame per meaningful route, such as home, pricing,\n docs, and account settings.\n- **Responsive comparison:** repeat the same route at the requested desktop,\n tablet, and mobile viewports so they align in one row.\n- **State review:** repeat a route for meaningful URL-addressable states such as\n empty, loading, error, modal-open, or selected-item views.\n\nDo not expand every discovered route or every viewport unless the user asks for\nan exhaustive audit. Preserve the user's labels and sequence so the canvas reads\nlike the workflow they described.\n\n## Select And Reprompt\n\nWhen a chat message begins with `[Reprompt selection]`, the selected subtree is\na hard write boundary. The only mutation path is `propose-node-rewrite` with\nthe exact `repromptId`, target, and `baseVersionHash` captured in\n`design-reprompt-pending:<designId>:<fileId>`. Never use `apply-visual-edit`,\n`apply-source-edit`, `write-source`, `write-local-file`, `edit-design`, or any\nother content-writing action for that request. Clarifying questions are allowed,\nbut a requested change must remain a proposal.\n\nProduce one variant by default. Produce two or three only when the instruction\nasks for options. A retry includes `priorProposalId`; keep the same target and\nbase version, incorporate the feedback, and call `propose-node-rewrite` again.\nThe UI previews the returned subtree without persisting it.\n\nUse `resolve-node-rewrite` for the accept/reject lifecycle. Accept applies the\nchosen variant as one version-checked inline/Yjs content transaction so one\nundo restores the prior structure; reject clears the proposal without changing\ncontent. For conversational resolution such as \"apply the second one,\" call\n`view-screen`, read the active `design.reprompt.proposal`, and pass its\n`proposalId` plus the zero-based `variantIndex` to `resolve-node-rewrite`.\n\n## Review Quality\n\n- Treat the running app as the truth. Preserve its component language, tokens,\n route state, and real content unless the user explicitly asks for a new visual\n direction.\n- Use multiple URL states to reveal meaningful UX moments: empty/loading/error\n states, focused panels, modals, responsive breakpoints, and completed flow\n steps when those matter to the review.\n- For visual edits, compare before/after at the relevant viewport sizes and\n check key hover/focus/scroll states when the app exposes them.\n\n## Account And Sharing Model\n\n- `/visual-edit/:id` is the dedicated local-editor surface. The one-time\n handoff returned by `open-visual-edit` opens it with edit access without a\n Design login. A copied or bare `/visual-edit/:id` URL is read-only because it\n does not carry the capability.\n- The capability permits live iframe inspection and session-local edits,\n undo/redo, **Apply design updates** through the connected host/local agent,\n and **Copy prompt**. Those flows hand bounded source instructions back to the\n coding agent; they do not silently persist account-owned Design data.\n- Public `/design/:id` links stay read-only without a signed-in owner/editor\n session. Never use the local capability to upgrade that ordinary sharing\n surface.\n- Prefer links returned by Design actions or `/_agent-native/open` deep links.\n Do not surface URLs with `_session=` tokens or hand-build capability URLs.\n- Do not attempt account-backed write actions with the browser capability. The\n trusted local `open-visual-edit` CLI call may register its bridge, create or\n reuse its workspace-owned local design, and place screens without an account.\n Direct source-file action writes, generation, saving into an account, and\n sharing still require an authenticated action caller. If a signed-out visitor\n wants those durable account operations, send them through the framework\n sign-in return flow first.\n\n## Required Local Bridge\n\nThe live-edit bridge is unlocked by a shared secret (the \"bridge token\") that\nmust match on two sides: the local bridge process, and the user's connection row\nin Design (which the browser reads to authorize `/live-edit-bridge`,\n`/read-file`, `/write-file`). Get them to match by letting the\n`open-visual-edit` action mint the token, then starting the\nbridge with it. This is the only ordering that works for the remote-MCP flow \u2014\nthe bridge cannot push its own token to the server without a CLI auth token, so\nthe server mints instead and the bridge adopts.\n\nFrom the target app repo, make sure its dev server is running, then:\n\n**1. Discover routes without starting a durable bridge** (one-shot, exits):\n\n```bash\nnpx @agent-native/core@latest design connect --url http://localhost:5173 --root . --json\n```\n\nThis prints the manifest (routes + capabilities). Parse it to build\n`routeManifest` for the next step. (Skip this if the user already gave explicit\npaths/URLs to place.)\n\nInside the agent-native monorepo itself, use the workspace CLI instead of\n`npx` \u2014 `npx` installs the last published `@agent-native/core`, which will not\ncontain local changes and costs a slow install on every call:\n\n```bash\npnpm dev:cli design connect --url http://localhost:5173 --root templates/<app> --json\n```\n\n**2. Call `open-visual-edit`** (see Action Flow below) with NO `bridgeToken`.\nThe server mints one, stores it on the user's connection row, copies it into the\nplaced screens' metadata, and returns it to you as `bridgeToken`. Capture it.\n\n**3. Start the persistent bridge adopting that token** (single line; prefer the\nenv var so the secret does not appear in `ps`):\n\n```bash\nAGENT_NATIVE_BRIDGE_TOKEN=\"<bridgeToken from step 2>\" npx @agent-native/core@latest design connect --url http://localhost:5173 --root . --daemon\n```\n\n(Equivalently, pass `--bridge-token <token>`.) This starts a detached bridge on\n`http://127.0.0.1:7331`, adopts the server-minted token \u2014 so bridge and row\nagree and live-edit authorizes with no self-registration \u2014 and stays alive after\nthe command exits.\n\nFor a manual health/manifest check on the running bridge:\n\n```bash\ncurl http://127.0.0.1:7331/health\n```\n\n`/health` needs no token. The full manifest at `/manifest.json` is\npreview-token protected, so an unauthenticated `curl` of it returns\n`{\"ok\":false,\"error\":\"invalid or missing preview token\"}` \u2014 that response means\nthe bridge is up, not that it is broken.\n\nOnly use `--json` for the step-1 route probe. Never use `--json`, `--once`,\nor `--dry-run` for the durable step-3 bridge: they print the manifest and exit,\nso Design falls back to a non-editable live iframe.\n\nThe bridge listens on a single fixed port (7331) and refuses to start for a\nsecond, different app. It is detached with no log file, so if `--daemon` reports\na timeout, check for a stale process (`lsof -ti:7331`) before retrying.\n\n## Action Flow\n\nPrefer the single `open-visual-edit` action. It registers or\nrefreshes the localhost bridge connection, mints and stores the bridge token,\ncreates or reuses a Design project, places URL-backed screens, stores the active\nvisual-edit context, and navigates to overview mode in one call. This avoids\ncreating a private design under a synthetic CLI user and then handing the browser\na tokenized URL that may be shadowed by an existing session.\n\nCall it BEFORE starting the durable bridge (step 3 above): it does not contact\nthe bridge, so the bridge need not be running yet, and you need its returned\n`bridgeToken` to start the bridge with a matching secret. Omit `bridgeToken`\non the call so the server mints one.\n\n```bash\npnpm action open-visual-edit '{\n \"title\": \"Docs homepage visual edit\",\n \"devServerUrl\": \"http://localhost:5173\",\n \"bridgeUrl\": \"http://127.0.0.1:7331\",\n \"rootPath\": \"/absolute/path/to/app\",\n \"routeManifest\": { \"...\": \"from /manifest.json\" },\n \"paths\": [\"/\", \"/pricing\", \"/checkout?step=payment\"]\n}'\n```\n\nThe action returns `designId`, `connectionId`, `bridgeToken`, `screens`,\n`urlPath`, and a credential-free `openUrl`. Its MCP App metadata separately\ncarries the one-time editor launcher so the host can redeem it without showing\nthe capability to the model or retaining it in the action link. Keep\n`designId`/`connectionId` in the chat context for follow-ups, and pass\n`bridgeToken` to `design connect` (step 3) to start the bridge. On follow-up\ncalls reusing an existing `connectionId`, the same token is returned (it is\nminted once and reused), so the running bridge stays valid.\n\n### Desktop and mobile side by side\n\nPass `viewports` to place every requested route once per viewport. Frames lay\nout as a grid: one row per route, one column per viewport. Presets are\n`desktop` (1280x900), `laptop` (1440x900), `tablet` (834x1112), and `mobile`\n(390x844); an explicit `{ \"label\": \"...\", \"width\": N, \"height\": N }` also works.\n\n```bash\npnpm action open-visual-edit '{\n \"title\": \"Tasks responsive visual edit\",\n \"devServerUrl\": \"http://localhost:5173\",\n \"bridgeUrl\": \"http://127.0.0.1:7331\",\n \"rootPath\": \"/absolute/path/to/app\",\n \"paths\": [\"/tasks\", \"/inbox\"],\n \"viewports\": [\"desktop\", \"mobile\"]\n}'\n```\n\nPrefer this over two separate calls with `defaultWidth`/`defaultHeight`: it\nkeeps each route's viewports aligned in a row and titles them\n`Tasks \u2014 Desktop` / `Tasks \u2014 Mobile` so the canvas reads clearly. `viewports`\noverrides `defaultWidth`/`defaultHeight`. With no `routes`/`paths`, it expands\nevery route in the localhost manifest, which is usually far more frames than\nthe user wants \u2014 name the paths.\n\n### Adding more page frames later\n\nCall `open-visual-edit` again with the same `designId` and `connectionId` and\nonly the new paths. Existing frames for the same route and viewport are\nrefreshed in place rather than duplicated, and a frame the user has dragged or\nresized keeps its position unless you explicitly pass `x`/`y`/`width`/`height`.\n\n```bash\npnpm action open-visual-edit '{\n \"designId\": \"<existing-design-id>\",\n \"connectionId\": \"<existing-connection-id>\",\n \"devServerUrl\": \"http://localhost:5173\",\n \"paths\": [\"/settings\", \"/team\"],\n \"startY\": 2200\n}'\n```\n\nDo NOT add `defaultWidth`/`defaultHeight` just to restate the default size:\nsupplying either one marks the viewport as explicitly requested, which\noverwrites frame sizes the user has already adjusted on the canvas.\n\nFor a numbered flow the user describes in chat, keep the labels and order:\n\n```bash\npnpm action open-visual-edit '{\n \"designId\": \"<existing-design-id>\",\n \"connectionId\": \"<existing-connection-id>\",\n \"devServerUrl\": \"http://localhost:1234\",\n \"routes\": [\n { \"url\": \"localhost:1234/onboarding/1\", \"title\": \"Screen 1\" },\n { \"url\": \"localhost:1234/onboarding/2\", \"title\": \"Screen 2\" },\n { \"url\": \"localhost:1234/onboarding/3\", \"title\": \"Screen 3\" }\n ]\n}'\n```\n\nIf no `routes` or `paths` are supplied, `open-visual-edit` uses every route\nfrom the localhost manifest.\n\nFallback, only when `open-visual-edit` is unavailable:\n\n1. Register or refresh the bridge with `connect-localhost`, passing the\n `/manifest.json` result as `routeManifest` and `capabilities`.\n2. Create or reuse a Design project with `create-design`.\n3. Place URL-backed screens with `add-localhost-screens`.\n4. Navigate to overview mode with `navigate`.\n\n## Open The Design Surface\n\n- Use the `link`, `deepLink`, or MCP App embed returned by Design actions so\n the user sees the canvas. Follow **Put Design Beside The Chat**: prefer the\n MCP App; otherwise surface the credential-free **Open design** link.\n- Return or open the MCP App first. Its host-managed launcher carries the\n one-time local-editor capability. The credential-free `openUrl` / action link\n is the safe read-only fallback; never build a capability URL yourself.\n- Never return or open a hand-built `/design/:id?_session=...` URL.\n- If the user is working in VS Code, the Agent Native extension can open the\n same URL via\n `vscode://builder.agent-native/open?url=<encoded-design-url>`. Its\n `Agent Native: Open Design Canvas` command also starts the local bridge and\n opens hosted Design in the VS Code side panel.\n- After `open-visual-edit`, confirm the Design editor is in overview mode\n with the requested URL-backed frames visible, and that they render the app\n rather than a spinner. Do not stop at \"screens added\" when the user asked to\n inspect or edit visually.\n\n## Applying Visual Edits Back To Source\n\nCanvas edits on a localhost screen do not write source as you make them. They\naccumulate as pending edits and the editor shows an **Apply design updates**\nbutton on the canvas. In an MCP App, clicking it hands the bounded structured\nprompt to the current host coding conversation. In an ordinary browser or\nstandalone Design page, it falls back to the local Design agent. The dropdown's\n**Copy prompt to your agent** action is the universal manual fallback.\n\n- Style, text, and drag/drop structure edits all collect into the same pending\n batch, so the user can make several changes and apply once.\n- After the write lands, the target app's own dev-server HMR refreshes the\n frames \u2014 no manual reload. If frames do not refresh, the write did not land;\n say so rather than assuming.\n- The separate disk-icon \"Apply to source\" button is the deterministic\n whole-file HTML/CSS writer. It is intentionally disabled for compiled\n `.jsx`/`.tsx` routes \u2014 those must go through the agent path above.\n\n## Editing URLs\n\nKeep localhost screens as URL files plus `screenMetadata[fileId]`. Do not\nreplace them with copied `srcdoc` HTML unless the user explicitly asks for a\nfrozen snapshot. To change a state, rerun `open-visual-edit` with the new\npath/query or duplicate the screen and update the copy's URL metadata.\n\n## Local Files in the Code Tab\n\nOnce a connection is registered, the design editor's Code panel (left rail \u2192\nCode, or `navigate --view editor --designId <id> --leftPanel code`) shows a\nlocal-files workspace root for that connection next to the design's own files.\nTreat that root like VS Code opened at the connected project directory: file\ntree, search, open/edit, and save are backed by the real local files. It lists\nthe connected app's text/code files through the bridge\n(`list-local-files` / `read-local-file`); build output, `node_modules`,\n`.git`, and secret-looking paths (`.env*`, key files) are always excluded.\n\n- Browsing and reading need only editor access on the design plus the running\n bridge.\n- Saving goes through `write-local-file`: the first save opens the\n write-consent dialog (an 8-hour, folder-scoped grant) and retries\n automatically once granted. Only text/code files are writable; secret paths\n are always blocked.\n- If the agent calls `write-local-file` directly (not through a UI save) and it\n fails with \"no write-consent grant\", call `request-localhost-write-consent`.\n It opens the write-consent dialog in the editor, or reports `alreadyGranted`\n if one already exists. Granting is human-only \u2014\n `grant-localhost-write-consent` is hidden from agents, so you cannot approve\n it yourself. Tell the user to click \"Allow writes\", then retry\n `write-local-file` once. Do not keep retrying blindly: the write stays\n blocked until the user approves.\n- Saves are conflict-checked against the file's on-disk version \u2014 a file that\n changed since it was read fails with a version conflict instead of being\n overwritten.\n\n## React Source Writeback\n\n- Use compiler/debug provenance (project-relative file, line, column,\n component, and runtime multiplicity) to locate React/TSX source. Treat it as\n evidence, not as permission for a generic AST structural transform.\n- Read `positionPrecision` on every anchor before you trust `line`/`column`.\n `authored` means those are the real JSX coordinates. `transformed` means they\n are the dev server's own output coordinates \u2014 React 19 removed `_debugSource`\n and exposes only an owner stack, so this is the normal case on a Vite/Next\n dev server, and the line will not match the file. `unknown` means no tier was\n reported. On anything but `authored`, use the file and component to find the\n element by its JSX shape and re-derive the line from the file you read; never\n edit at the reported line.\n- A single-instance leaf text edit, literal `className`/`class` edit, or flat\n literal `style={{ ... }}` property may use `apply-visual-edit` with a\n `local-file` source and a complete `target.sourceAnchor`. Forward the\n anchor's `positionPrecision` with it \u2014 the action refuses a `transformed`\n anchor with `status: \"needsAgent\"` instead of seeking to a line that means\n something else in the authored file. Preview first (omit `persist`), inspect\n `proposedDiff`, then call with `persist: true`.\n- Reparenting, grouping/ungrouping, wrappers, dynamic expressions, repeated\n `.map()` instances, shared components, breakpoint-scoped edits, and\n cross-file changes go through the coding agent with complete subject/target\n anchors and their runtime relationship. `apply-visual-edit` refuses these\n with `status: \"needsAgent\"` rather than guessing.\n- Before each write, read the file and pass its exact `versionHash` to\n `write-local-file` with `requireExpectedVersionHash: true`; on conflict,\n re-read and re-plan. Keep the optimistic preview until HMR/runtime confirms\n the result. Human write consent remains mandatory and agents cannot grant it.\n\n## Verification\n\n- `list-localhost-connections` returns the expected connection and routes.\n- The Design editor opens in overview mode.\n- Every requested screen renders the intended localhost URL, showing real app\n content rather than an endless loading spinner.\n- The screen iframe carries a `src`, not a `srcdoc`. A localhost screen with a\n `srcdoc` is a bug, not a slow load \u2014 check it in the browser devtools before\n reporting the canvas as working.\n- Alt-dragging a screen copies the URL-backed frame, not an inline HTML clone.\n- A query/path edit changes only the target screen's URL metadata and iframe.\n- The Code tab shows a local-files root for the connection and opens its files.\n";
|
|
2
2
|
//# sourceMappingURL=design-visual-edit-skill.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"design-visual-edit-skill.d.ts","sourceRoot":"","sources":["../../../src/cli/skills-content/design-visual-edit-skill.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,2BAA2B,
|
|
1
|
+
{"version":3,"file":"design-visual-edit-skill.d.ts","sourceRoot":"","sources":["../../../src/cli/skills-content/design-visual-edit-skill.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,2BAA2B,2ixBAudvC,CAAC"}
|