@agent-native/core 0.131.4 → 0.131.6
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 +3 -3
- package/corpus/core/CHANGELOG.md +69 -0
- package/corpus/core/docs/content/agent-native-toolkit.mdx +13 -6
- package/corpus/core/docs/content/cloneable-saas.mdx +5 -5
- package/corpus/core/docs/content/creating-templates.mdx +9 -0
- package/corpus/core/docs/content/deployment.mdx +14 -10
- package/corpus/core/docs/content/docs-components.mdx +491 -0
- package/corpus/core/docs/content/doctor.mdx +8 -1
- package/corpus/core/docs/content/drop-in-agent.mdx +1 -1
- package/corpus/core/docs/content/extensions.mdx +18 -18
- package/corpus/core/docs/content/faq.mdx +4 -4
- package/corpus/core/docs/content/key-concepts.mdx +30 -21
- package/corpus/core/docs/content/template-brain-developers.mdx +4 -1
- package/corpus/core/docs/content/template-mail-developers.mdx +4 -1
- package/corpus/core/docs/content/what-is-agent-native.mdx +6 -6
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/a2a/client.ts +449 -66
- package/corpus/core/src/a2a/correlation.ts +31 -0
- package/corpus/core/src/a2a/types.ts +4 -0
- package/corpus/core/src/action.ts +3 -0
- package/corpus/core/src/agent/engine/registry.ts +45 -5
- package/corpus/core/src/agent/production-agent.ts +151 -18
- package/corpus/core/src/agent/run-loop-with-resume.ts +190 -3
- package/corpus/core/src/agent/run-manager.ts +117 -41
- package/corpus/core/src/agent/thread-debug-history.ts +86 -0
- package/corpus/core/src/agent/types.ts +3 -1
- package/corpus/core/src/cli/create.ts +11 -1
- package/corpus/core/src/cli/templates-meta.ts +2 -2
- package/corpus/core/src/client/agent-chat-adapter.ts +91 -13
- package/corpus/core/src/client/resources/McpIntegrationDialog.tsx +11 -9
- package/corpus/core/src/client/sse-event-processor.ts +17 -3
- package/corpus/core/src/db/client.ts +57 -17
- package/corpus/core/src/integrations/adapters/slack.ts +8 -3
- package/corpus/core/src/localization/default-messages.ts +44 -0
- package/corpus/core/src/observability/traces.ts +78 -5
- package/corpus/core/src/scripts/call-agent.ts +290 -9
- package/corpus/core/src/scripts/describe-workspace-apps.ts +2 -2
- package/corpus/core/src/secrets/crypto.ts +126 -34
- package/corpus/core/src/secrets/storage.ts +61 -25
- package/corpus/core/src/server/agent-capabilities.ts +1 -1
- package/corpus/core/src/server/agent-chat/action-filters-a2a.ts +111 -7
- package/corpus/core/src/server/agent-chat/context-tools.ts +2 -0
- package/corpus/core/src/server/agent-chat/plugin-options.ts +34 -1
- package/corpus/core/src/server/agent-chat/prompt-resources.ts +1 -1
- package/corpus/core/src/server/agent-chat-plugin.ts +91 -59
- package/corpus/core/src/templates/default/.agents/skills/secrets/SKILL.md +14 -7
- package/corpus/core/src/templates/headless/.agents/skills/secrets/SKILL.md +14 -7
- package/corpus/core/src/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +18 -7
- package/corpus/core/src/templates/workspace-core/.agents/skills/composable-mini-apps/SKILL.md +15 -14
- package/corpus/core/src/templates/workspace-core/.agents/skills/secrets/SKILL.md +14 -7
- package/corpus/core/src/vite/client.ts +1 -0
- package/corpus/templates/analytics/.agents/skills/dashboard-ops/SKILL.md +5 -4
- package/corpus/templates/analytics/.agents/skills/gong/SKILL.md +6 -4
- package/corpus/templates/analytics/AGENTS.md +6 -4
- package/corpus/templates/analytics/actions/query-agent-native-analytics.ts +4 -3
- package/corpus/templates/analytics/changelog/2026-07-30-scheduled-dashboard-emails-complete-every-panel-without-pool.md +6 -0
- package/corpus/templates/analytics/scripts/emit-netlify-dashboard-report-cron.ts +28 -1
- package/corpus/templates/analytics/server/jobs/dashboard-report.ts +18 -11
- package/corpus/templates/analytics/server/lib/analytics-connector-catalog.ts +4 -4
- package/corpus/templates/analytics/server/lib/canonical-first-party-dashboard-repair.ts +9 -5
- package/corpus/templates/analytics/server/lib/dashboard-panel-query.ts +6 -2
- package/corpus/templates/analytics/server/lib/dashboard-panel-source-resolver.ts +11 -4
- package/corpus/templates/analytics/server/lib/dashboard-report-render.ts +49 -31
- package/corpus/templates/analytics/server/lib/first-party-analytics.ts +16 -8
- package/corpus/templates/analytics/server/lib/first-party-metric-catalog.ts +9 -3
- package/corpus/templates/analytics/server/lib/production-serverless-runtime.ts +11 -0
- package/corpus/templates/analytics/server/plugins/agent-chat.ts +3 -2
- package/corpus/templates/analytics/server/plugins/analytics-alert-jobs.ts +2 -1
- package/corpus/templates/analytics/server/plugins/dashboard-report-jobs.ts +2 -1
- package/corpus/templates/analytics/server/plugins/uptime-monitor-jobs.ts +1 -12
- package/corpus/templates/brain/.agents/skills/brain/RUNBOOK.md +54 -6
- package/corpus/templates/brain/.agents/skills/brain/SKILL.md +20 -9
- package/corpus/templates/brain/.agents/skills/ingestion-and-connectors/SKILL.md +33 -1
- package/corpus/templates/brain/AGENTS.md +3 -1
- package/corpus/templates/brain/README.md +4 -1
- package/corpus/templates/brain/actions/_schemas.ts +30 -8
- package/corpus/templates/brain/actions/ask-brain.ts +124 -14
- package/corpus/templates/brain/actions/create-source.ts +18 -2
- package/corpus/templates/brain/actions/enqueue-captures-distillation.ts +8 -123
- package/corpus/templates/brain/actions/enqueue-distillation.ts +6 -127
- package/corpus/templates/brain/actions/import-capture.ts +17 -5
- package/corpus/templates/brain/actions/import-transcript.ts +17 -5
- package/corpus/templates/brain/actions/update-source.ts +25 -5
- package/corpus/templates/brain/app/components/layout/Sidebar.tsx +1 -1
- package/corpus/templates/brain/changelog/2026-07-30-blessed-resources-can-feed-cited-company-answers.md +6 -0
- package/corpus/templates/brain/changelog/2026-07-30-the-left-sidebar-no-longer-shows-a-blank-organization-placeh.md +6 -0
- package/corpus/templates/brain/server/lib/brain.ts +49 -19
- package/corpus/templates/brain/server/lib/distillation-queue.ts +147 -0
- package/corpus/templates/brain/server/lib/source-policy.ts +264 -0
- package/corpus/templates/brain/server/plugins/agent-chat.ts +3 -2
- package/corpus/templates/brain/server/routes/api/_agent-native/brain/ingest.post.ts +116 -19
- package/corpus/templates/clips/app/components/meetings/google-oauth-identity-notice.tsx +51 -0
- package/corpus/templates/clips/app/i18n/en-US.ts +4 -0
- package/corpus/templates/clips/app/routes/_app.meetings._index.tsx +3 -1
- package/corpus/templates/clips/changelog/2026-07-30-google-calendar-warning.md +6 -0
- package/corpus/templates/content/.agents/skills/content-product-development/SKILL.md +47 -0
- package/corpus/templates/content/app/components/editor/VisualEditor.tsx +72 -8
- package/corpus/templates/content/changelog/2026-07-30-the-slash-command-hint-now-stays-on-only-the-active-empty-li.md +6 -0
- package/corpus/templates/design/.generated/bridge/editor-chrome.generated.ts +506 -11
- package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +148 -17
- package/corpus/templates/design/app/components/design/canvas-interactions/design-canvas-interactions.ts +357 -0
- package/corpus/templates/design/app/components/design/inspector/ScrubInput.tsx +7 -466
- package/corpus/templates/design/app/components/design/inspector/scrub-input-utils.ts +15 -311
- package/corpus/templates/design/app/components/visual-editor/CanvasCommentPins.tsx +19 -997
- package/corpus/templates/design/app/components/visual-editor/DrawOverlay.tsx +8 -1216
- package/corpus/templates/design/app/hooks/useDesignHotkeys.ts +31 -38
- package/corpus/templates/design/package.json +0 -1
- package/corpus/templates/dispatch/AGENTS.md +8 -0
- package/corpus/templates/dispatch/DEVELOPING.md +29 -0
- package/corpus/templates/dispatch/actions/view-screen.ts +34 -2
- package/corpus/templates/dispatch/app/i18n-data.ts +457 -0
- package/corpus/templates/dispatch/changelog/2026-07-30-delegated-dispatch-work-continues-reliably-in-the-background.md +6 -0
- package/corpus/templates/dispatch/changelog/2026-07-30-find-failed-runs-across-apps.md +6 -0
- package/corpus/templates/dispatch/netlify.toml +3 -0
- package/corpus/templates/slides/.agents/skills/analytics-data-for-decks/SKILL.md +8 -12
- package/corpus/templates/slides/AGENTS.md +4 -4
- package/corpus/templates/slides/actions/duplicate-deck.ts +19 -4
- package/corpus/templates/slides/app/components/deck/DeckCard.tsx +2 -10
- package/corpus/templates/slides/app/components/deck/MermaidRenderer.tsx +12 -1
- package/corpus/templates/slides/app/components/deck/SlideRenderer.tsx +30 -13
- package/corpus/templates/slides/app/components/editor/DeckEditorSkeleton.tsx +35 -0
- package/corpus/templates/slides/app/components/editor/EditorSidebar.tsx +63 -56
- package/corpus/templates/slides/app/components/editor/EditorToolbar.tsx +21 -76
- package/corpus/templates/slides/app/components/editor/SlideEditor.tsx +1110 -292
- package/corpus/templates/slides/app/components/editor/SlideOverflowWarning.tsx +53 -0
- package/corpus/templates/slides/app/components/editor/SlideStyleInspector.tsx +235 -18
- package/corpus/templates/slides/app/components/editor/SpeakerNotesPanel.tsx +4 -1
- package/corpus/templates/slides/app/components/editor/canvas-interactions/index.ts +11 -0
- package/corpus/templates/slides/app/components/editor/canvas-interactions/slides-canvas-adapter.ts +129 -0
- package/corpus/templates/slides/app/components/editor/selection-overlay-measurement.ts +70 -0
- package/corpus/templates/slides/app/components/editor/slide-object-interactions.ts +519 -65
- package/corpus/templates/slides/app/components/visual-editor/CanvasCommentPins.tsx +36 -426
- package/corpus/templates/slides/app/components/visual-editor/DrawOverlay.tsx +19 -458
- package/corpus/templates/slides/app/context/DeckContext.tsx +179 -72
- package/corpus/templates/slides/app/global.css +105 -0
- package/corpus/templates/slides/app/i18n/en-US.ts +8 -0
- package/corpus/templates/slides/app/lib/deck-editor-loading.ts +26 -0
- package/corpus/templates/slides/app/lib/mermaid-blocks.ts +27 -0
- package/corpus/templates/slides/app/pages/DeckEditor.tsx +71 -38
- package/corpus/templates/slides/app/pages/Index.tsx +98 -41
- package/corpus/templates/slides/changelog/2026-07-30-deck-loading-no-longer-flashes-an-unavailable-message.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-30-duplicating-a-deck-from-the-deck-list-now-opens-the-copy-imm.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-30-layout-overflow-warning-is-readable-and-dismissible.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-30-shared-canvas-annotations.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-30-slide-objects-can-be-moved-as-a-group-copied-and-pasted-with.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-30-slide-text-editing-and-object-controls-now-match-google-slides.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-30-style-panel-now-scrolls-with-speaker-notes-open-shows-the-sl.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-30-top-toolbar-controls-now-use-consistent-sizing-with-undo-and.md +6 -0
- package/corpus/templates/slides/netlify.toml +3 -1
- package/corpus/templates/slides/package.json +0 -1
- package/corpus/templates/slides/server/lib/chat-attachments.ts +18 -0
- package/corpus/templates/slides/server/plugins/agent-chat.ts +5 -0
- package/corpus/templates/slides/vite.config.ts +0 -1
- package/corpus/toolkit/CHANGELOG.md +13 -0
- package/corpus/toolkit/README.md +19 -0
- package/corpus/toolkit/agent-native.eject.json +38 -0
- package/corpus/toolkit/package.json +29 -1
- package/corpus/toolkit/src/canvas-annotations/CanvasCommentPins.tsx +861 -0
- package/corpus/toolkit/src/canvas-annotations/DrawOverlay.tsx +1233 -0
- package/corpus/toolkit/src/canvas-annotations/index.ts +15 -0
- package/corpus/toolkit/src/canvas-annotations/types.ts +14 -0
- package/corpus/toolkit/src/canvas-interactions/canvas-interactions.ts +933 -0
- package/corpus/toolkit/src/canvas-interactions/index.ts +67 -0
- package/corpus/toolkit/src/design-tweaks/scrub-input-utils.ts +311 -0
- package/corpus/toolkit/src/design-tweaks/scrub-input.tsx +491 -0
- package/corpus/toolkit/src/design-tweaks/visual-style-controls.tsx +26 -171
- package/corpus/toolkit/src/index.ts +1 -0
- package/dist/a2a/client.d.ts +23 -0
- package/dist/a2a/client.d.ts.map +1 -1
- package/dist/a2a/client.js +309 -44
- package/dist/a2a/client.js.map +1 -1
- package/dist/a2a/correlation.d.ts +1 -0
- package/dist/a2a/correlation.d.ts.map +1 -1
- package/dist/a2a/correlation.js +27 -0
- package/dist/a2a/correlation.js.map +1 -1
- package/dist/a2a/types.d.ts +4 -0
- package/dist/a2a/types.d.ts.map +1 -1
- package/dist/a2a/types.js.map +1 -1
- package/dist/action.d.ts +3 -0
- package/dist/action.d.ts.map +1 -1
- package/dist/action.js.map +1 -1
- package/dist/agent/engine/registry.d.ts.map +1 -1
- package/dist/agent/engine/registry.js +34 -7
- package/dist/agent/engine/registry.js.map +1 -1
- package/dist/agent/production-agent.d.ts +40 -1
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +113 -15
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/agent/run-loop-with-resume.d.ts +21 -0
- package/dist/agent/run-loop-with-resume.d.ts.map +1 -1
- package/dist/agent/run-loop-with-resume.js +163 -4
- package/dist/agent/run-loop-with-resume.js.map +1 -1
- package/dist/agent/run-manager.d.ts +16 -9
- package/dist/agent/run-manager.d.ts.map +1 -1
- package/dist/agent/run-manager.js +93 -42
- package/dist/agent/run-manager.js.map +1 -1
- package/dist/agent/thread-debug-history.d.ts +10 -0
- package/dist/agent/thread-debug-history.d.ts.map +1 -0
- package/dist/agent/thread-debug-history.js +68 -0
- package/dist/agent/thread-debug-history.js.map +1 -0
- package/dist/agent/types.d.ts +3 -1
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/agent/types.js.map +1 -1
- package/dist/cli/create.d.ts.map +1 -1
- package/dist/cli/create.js +6 -1
- package/dist/cli/create.js.map +1 -1
- package/dist/cli/templates-meta.js +2 -2
- package/dist/cli/templates-meta.js.map +1 -1
- package/dist/client/agent-chat-adapter.d.ts +1 -1
- package/dist/client/agent-chat-adapter.d.ts.map +1 -1
- package/dist/client/agent-chat-adapter.js +76 -13
- package/dist/client/agent-chat-adapter.js.map +1 -1
- package/dist/client/resources/McpIntegrationDialog.d.ts.map +1 -1
- package/dist/client/resources/McpIntegrationDialog.js +1 -1
- package/dist/client/resources/McpIntegrationDialog.js.map +1 -1
- package/dist/client/sse-event-processor.d.ts.map +1 -1
- package/dist/client/sse-event-processor.js +12 -3
- package/dist/client/sse-event-processor.js.map +1 -1
- package/dist/collab/awareness.d.ts +2 -2
- package/dist/collab/awareness.d.ts.map +1 -1
- package/dist/db/client.d.ts.map +1 -1
- package/dist/db/client.js +48 -17
- package/dist/db/client.js.map +1 -1
- package/dist/file-upload/actions/upload-image.d.ts +1 -1
- package/dist/integrations/adapters/slack.js +7 -3
- package/dist/integrations/adapters/slack.js.map +1 -1
- package/dist/localization/default-messages.d.ts +43 -0
- package/dist/localization/default-messages.d.ts.map +1 -1
- package/dist/localization/default-messages.js +43 -0
- package/dist/localization/default-messages.js.map +1 -1
- package/dist/notifications/routes.d.ts +2 -2
- package/dist/observability/traces.d.ts +3 -1
- package/dist/observability/traces.d.ts.map +1 -1
- package/dist/observability/traces.js +73 -4
- package/dist/observability/traces.js.map +1 -1
- package/dist/progress/routes.d.ts +1 -1
- package/dist/provider-api/actions/custom-provider-registration.d.ts +12 -12
- package/dist/provider-api/actions/provider-api.d.ts +13 -13
- package/dist/provider-api/corpus-jobs.d.ts +2 -2
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/scripts/call-agent.d.ts.map +1 -1
- package/dist/scripts/call-agent.js +233 -10
- package/dist/scripts/call-agent.js.map +1 -1
- package/dist/scripts/describe-workspace-apps.js +2 -2
- package/dist/scripts/describe-workspace-apps.js.map +1 -1
- package/dist/secrets/crypto.d.ts +31 -21
- package/dist/secrets/crypto.d.ts.map +1 -1
- package/dist/secrets/crypto.js +108 -33
- package/dist/secrets/crypto.js.map +1 -1
- package/dist/secrets/storage.d.ts +3 -5
- package/dist/secrets/storage.d.ts.map +1 -1
- package/dist/secrets/storage.js +40 -25
- package/dist/secrets/storage.js.map +1 -1
- package/dist/server/agent-capabilities.js +1 -1
- package/dist/server/agent-capabilities.js.map +1 -1
- package/dist/server/agent-chat/action-filters-a2a.d.ts +17 -3
- package/dist/server/agent-chat/action-filters-a2a.d.ts.map +1 -1
- package/dist/server/agent-chat/action-filters-a2a.js +92 -3
- package/dist/server/agent-chat/action-filters-a2a.js.map +1 -1
- package/dist/server/agent-chat/context-tools.d.ts.map +1 -1
- package/dist/server/agent-chat/context-tools.js +2 -0
- package/dist/server/agent-chat/context-tools.js.map +1 -1
- package/dist/server/agent-chat/plugin-options.d.ts +23 -0
- package/dist/server/agent-chat/plugin-options.d.ts.map +1 -1
- package/dist/server/agent-chat/plugin-options.js +4 -1
- package/dist/server/agent-chat/plugin-options.js.map +1 -1
- package/dist/server/agent-chat/prompt-resources.js +1 -1
- package/dist/server/agent-chat/prompt-resources.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts +2 -1
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +79 -56
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/templates/default/.agents/skills/secrets/SKILL.md +14 -7
- package/dist/templates/headless/.agents/skills/secrets/SKILL.md +14 -7
- package/dist/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +18 -7
- package/dist/templates/workspace-core/.agents/skills/composable-mini-apps/SKILL.md +15 -14
- package/dist/templates/workspace-core/.agents/skills/secrets/SKILL.md +14 -7
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +1 -0
- package/dist/vite/client.js.map +1 -1
- package/docs/content/agent-native-toolkit.mdx +13 -6
- package/docs/content/cloneable-saas.mdx +5 -5
- package/docs/content/creating-templates.mdx +9 -0
- package/docs/content/deployment.mdx +14 -10
- package/docs/content/docs-components.mdx +491 -0
- package/docs/content/doctor.mdx +8 -1
- package/docs/content/drop-in-agent.mdx +1 -1
- package/docs/content/extensions.mdx +18 -18
- package/docs/content/faq.mdx +4 -4
- package/docs/content/key-concepts.mdx +30 -21
- package/docs/content/template-brain-developers.mdx +4 -1
- package/docs/content/template-mail-developers.mdx +4 -1
- package/docs/content/what-is-agent-native.mdx +6 -6
- package/package.json +2 -2
- package/src/a2a/client.ts +449 -66
- package/src/a2a/correlation.ts +31 -0
- package/src/a2a/types.ts +4 -0
- package/src/action.ts +3 -0
- package/src/agent/engine/registry.ts +45 -5
- package/src/agent/production-agent.ts +151 -18
- package/src/agent/run-loop-with-resume.ts +190 -3
- package/src/agent/run-manager.ts +117 -41
- package/src/agent/thread-debug-history.ts +86 -0
- package/src/agent/types.ts +3 -1
- package/src/cli/create.ts +11 -1
- package/src/cli/templates-meta.ts +2 -2
- package/src/client/agent-chat-adapter.ts +91 -13
- package/src/client/resources/McpIntegrationDialog.tsx +11 -9
- package/src/client/sse-event-processor.ts +17 -3
- package/src/db/client.ts +57 -17
- package/src/integrations/adapters/slack.ts +8 -3
- package/src/localization/default-messages.ts +44 -0
- package/src/observability/traces.ts +78 -5
- package/src/scripts/call-agent.ts +290 -9
- package/src/scripts/describe-workspace-apps.ts +2 -2
- package/src/secrets/crypto.ts +126 -34
- package/src/secrets/storage.ts +61 -25
- package/src/server/agent-capabilities.ts +1 -1
- package/src/server/agent-chat/action-filters-a2a.ts +111 -7
- package/src/server/agent-chat/context-tools.ts +2 -0
- package/src/server/agent-chat/plugin-options.ts +34 -1
- package/src/server/agent-chat/prompt-resources.ts +1 -1
- package/src/server/agent-chat-plugin.ts +91 -59
- package/src/templates/default/.agents/skills/secrets/SKILL.md +14 -7
- package/src/templates/headless/.agents/skills/secrets/SKILL.md +14 -7
- package/src/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +18 -7
- package/src/templates/workspace-core/.agents/skills/composable-mini-apps/SKILL.md +15 -14
- package/src/templates/workspace-core/.agents/skills/secrets/SKILL.md +14 -7
- package/src/vite/client.ts +1 -0
|
@@ -30,23 +30,25 @@ being rebuilt in slightly different ways every time.
|
|
|
30
30
|
/>
|
|
31
31
|
</WireframeBlock>
|
|
32
32
|
|
|
33
|
-
<Diagram id="doc-block-toolkits-boundary" title="How
|
|
33
|
+
<Diagram id="doc-block-toolkits-boundary" title="How the three layers fit" summary={"Core is the framework foundation. Toolkit is optional reusable infrastructure and UI. Templates are optional apps built on Core, often using Toolkit."}>
|
|
34
34
|
|
|
35
35
|
```html
|
|
36
36
|
<div class="diagram-row">
|
|
37
37
|
<div class="diagram-card">
|
|
38
|
-
<span class="diagram-pill accent">
|
|
39
|
-
actions, SQL, auth, app state, access checks,
|
|
38
|
+
<span class="diagram-pill accent">Core</span><br />
|
|
39
|
+
framework runtime: actions, SQL, auth, app state, access checks, live sync
|
|
40
40
|
</div>
|
|
41
41
|
<div class="diagram-arrow diagram-muted" aria-hidden="true">→</div>
|
|
42
42
|
<div class="diagram-card">
|
|
43
43
|
<span class="diagram-pill accent">Toolkit</span><br />
|
|
44
|
-
collaboration, sharing, setup, review, history,
|
|
44
|
+
optional reusable pieces: collaboration, sharing, setup, review, history,
|
|
45
|
+
observability
|
|
45
46
|
</div>
|
|
46
47
|
<div class="diagram-arrow diagram-muted" aria-hidden="true">→</div>
|
|
47
48
|
<div class="diagram-card">
|
|
48
|
-
<span class="diagram-pill accent">
|
|
49
|
-
domain schema, routes, actions, branding, specialized
|
|
49
|
+
<span class="diagram-pill accent">Templates</span><br />
|
|
50
|
+
optional apps: domain schema, routes, actions, branding, specialized
|
|
51
|
+
workflows
|
|
50
52
|
</div>
|
|
51
53
|
</div>
|
|
52
54
|
```
|
|
@@ -70,6 +72,11 @@ being rebuilt in slightly different ways every time.
|
|
|
70
72
|
|
|
71
73
|
</Diagram>
|
|
72
74
|
|
|
75
|
+
Core is the framework. Toolkit is an optional shelf of reusable pieces for the
|
|
76
|
+
framework. Templates are optional apps built on Core; they can use Toolkit and
|
|
77
|
+
can be forked and used as complete starting points. An app can also use Core
|
|
78
|
+
directly without adopting Toolkit or a template.
|
|
79
|
+
|
|
73
80
|
## Catalog {#catalog}
|
|
74
81
|
|
|
75
82
|
| Area | Start here | What it covers |
|
|
@@ -216,28 +216,28 @@ The path from "I want my own SaaS" to "I have my own SaaS" is short:
|
|
|
216
216
|
|
|
217
217
|
1. **Pick an example app.** Use the CLI picker, or browse the docs and pick one to start from.
|
|
218
218
|
2. **Brand it.** Change the name, colors, logo, and copy. Most example apps expose this in a single config file.
|
|
219
|
-
3. **Customize it.**
|
|
219
|
+
3. **Customize it.** Make source changes in your own repository and development workflow. An agent can help when its frame is intentionally granted workspace and write tooling; otherwise the embedded agent operates the resulting app through its actions, data, and configured integrations.
|
|
220
220
|
4. **Ship it.** Run the deploy command. You now have your own production SaaS at your own domain.
|
|
221
221
|
|
|
222
|
-
Steps 2–4 typically take days, not months. Step 3 is open-ended
|
|
222
|
+
Steps 2–4 typically take days, not months. Step 3 is open-ended because the app is yours to evolve, while the embedded agent remains available to operate the deployed product and can assist with source changes when code access is explicitly enabled.
|
|
223
223
|
|
|
224
224
|
## Why this is practical {#why}
|
|
225
225
|
|
|
226
226
|
A separate-codebase-per-user model breaks down at scale: every user maintaining their own inbox sounds like a maintenance nightmare. Two framework decisions make it work:
|
|
227
227
|
|
|
228
|
-
1. **The
|
|
228
|
+
1. **The app keeps the framework contract.** Your source owns the domain behavior, while Core keeps actions, SQL, state, and sync consistent as the app evolves.
|
|
229
229
|
2. **Per-user customization without per-user code.** Skills, memory, instructions, connected MCP servers, and sub-agents all live in SQL. Every user gets their own customization layer; the shared codebase hosts all of them at once.
|
|
230
230
|
|
|
231
231
|
The result: Claude-Code-level flexibility for each user, with normal SaaS deployment economics.
|
|
232
232
|
|
|
233
|
-
<Diagram id="doc-block-bhg7mw" title="Why per-user customization scales" summary={"Two ideas keep the start-from-a-working-app model practical: the
|
|
233
|
+
<Diagram id="doc-block-bhg7mw" title="Why per-user customization scales" summary={"Two ideas keep the start-from-a-working-app model practical: the app keeps the framework contract, and per-user customization lives in SQL — not in per-user code."}>
|
|
234
234
|
|
|
235
235
|
```html
|
|
236
236
|
<div class="diagram-why">
|
|
237
237
|
<div class="diagram-panel" data-rough>
|
|
238
238
|
<strong>Shared codebase</strong
|
|
239
239
|
><small class="diagram-muted">one app, deployed once</small>
|
|
240
|
-
<div class="diagram-pill accent">
|
|
240
|
+
<div class="diagram-pill accent">app keeps the framework contract</div>
|
|
241
241
|
</div>
|
|
242
242
|
<div class="diagram-arrow diagram-muted" aria-hidden="true">↔</div>
|
|
243
243
|
<div class="diagram-panel" data-rough>
|
|
@@ -14,6 +14,15 @@ shadcn-style primitives, toast/mobile hooks, date pickers, and simple app shell
|
|
|
14
14
|
slots. Keep template-specific variants local when they encode product behavior
|
|
15
15
|
or visual identity.
|
|
16
16
|
|
|
17
|
+
Keep the three layers in mind when deciding where a capability belongs:
|
|
18
|
+
|
|
19
|
+
- **Core - the framework:** the required runtime and data contract every app can use.
|
|
20
|
+
- **Toolkit - optional reusable pieces:** shared UI and product systems that apps can adopt, compose, or fork.
|
|
21
|
+
- **Templates - optional apps:** complete domain products built on Core, commonly using Toolkit, that people can fork and use as starting points.
|
|
22
|
+
|
|
23
|
+
Toolkit and Templates are optional. A template is not the framework itself, and
|
|
24
|
+
Toolkit does not replace Core.
|
|
25
|
+
|
|
17
26
|
A good template:
|
|
18
27
|
|
|
19
28
|
- Solves one workflow end-to-end, with useful seed data or an empty-state flow.
|
|
@@ -536,14 +536,14 @@ Database connection variables (`DATABASE_URL`, `DATABASE_AUTH_TOKEN`, per-app `<
|
|
|
536
536
|
|
|
537
537
|
These must be set before promoting an app to a real prod deploy. Missing values either fail-closed (the framework refuses to start / refuses to handle requests) or fall back to weaker behavior with a loud warning.
|
|
538
538
|
|
|
539
|
-
| Variable | Description
|
|
540
|
-
| ------------------------ |
|
|
541
|
-
| `BETTER_AUTH_SECRET` | 32+ char random string. Signs session cookies
|
|
542
|
-
| `BETTER_AUTH_URL` | Public origin of this app (e.g. `https://mail.example.com`). Used for cookie domain and OAuth redirect construction.
|
|
543
|
-
| `ANTHROPIC_API_KEY` | API key for the embedded production agent. **In multi-tenant deploys**, the framework refuses to fall back to this when the user has no per-user key — bring-your-own-key is required. Single-tenant self-hosted installs use it as a global key.
|
|
544
|
-
| `OAUTH_STATE_SECRET` | Dedicated HMAC key for OAuth state envelopes (Google, Atlassian, Zoom). Falls back to `BETTER_AUTH_SECRET` when unset, but a dedicated value is recommended so rotating one doesn't invalidate the other. Generate via `openssl rand -hex 32`.
|
|
545
|
-
| `A2A_SECRET` | Shared HMAC for inter-app A2A JSON-RPC. Without it, every A2A endpoint and the `/_agent-native/integrations/process-task` self-fire endpoint return 503 in production.
|
|
546
|
-
| `SECRETS_ENCRYPTION_KEY` | AES-256-GCM key for the encrypted-at-rest secrets vault.
|
|
539
|
+
| Variable | Description |
|
|
540
|
+
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
541
|
+
| `BETTER_AUTH_SECRET` | 32+ char random string. Signs session cookies and is the fallback for `OAUTH_STATE_SECRET` and app-local encrypted values. It is also a legacy read candidate for existing shared vault ciphertext. Hard-required: the framework throws on startup if missing in production. |
|
|
542
|
+
| `BETTER_AUTH_URL` | Public origin of this app (e.g. `https://mail.example.com`). Used for cookie domain and OAuth redirect construction. |
|
|
543
|
+
| `ANTHROPIC_API_KEY` | API key for the embedded production agent. **In multi-tenant deploys**, the framework refuses to fall back to this when the user has no per-user key — bring-your-own-key is required. Single-tenant self-hosted installs use it as a global key. |
|
|
544
|
+
| `OAUTH_STATE_SECRET` | Dedicated HMAC key for OAuth state envelopes (Google, Atlassian, Zoom). Falls back to `BETTER_AUTH_SECRET` when unset, but a dedicated value is recommended so rotating one doesn't invalidate the other. Generate via `openssl rand -hex 32`. |
|
|
545
|
+
| `A2A_SECRET` | Shared HMAC for inter-app A2A JSON-RPC. Without it, every A2A endpoint and the `/_agent-native/integrations/process-task` self-fire endpoint return 503 in production. When `SECRETS_ENCRYPTION_KEY` is unset, shared vault ciphertext uses a purpose-derived key from this value, so rotating it also rotates the vault key. |
|
|
546
|
+
| `SECRETS_ENCRYPTION_KEY` | Preferred stable AES-256-GCM key for the shared encrypted-at-rest secrets vault. Set the same value in every app that reads the vault. Shared vault reads fall back to purpose-derived `A2A_SECRET`, then legacy Better Auth and app-scoped keys. Before rotating A2A, add this key everywhere and read/migrate every existing row while the old A2A material remains available. |
|
|
547
547
|
|
|
548
548
|
### Auth & Identity {#env-auth}
|
|
549
549
|
|
|
@@ -628,13 +628,17 @@ The `run-code` sandbox is process-level isolation, not an OS container. It strip
|
|
|
628
628
|
|
|
629
629
|
## Updating UI in Production {#updating-ui-in-production}
|
|
630
630
|
|
|
631
|
-
|
|
631
|
+
The ordinary deployed app agent works through app tools — actions, database,
|
|
632
|
+
MCP, and configured integrations — rather than receiving ambient access to the
|
|
633
|
+
app's source code. Source changes belong in the repository's development
|
|
634
|
+
workflow. An embedded, local, or Builder frame can edit the repository when
|
|
635
|
+
that frame is intentionally granted workspace and write tooling.
|
|
632
636
|
|
|
633
637
|
In a standard production deployment with [production code execution](#production-code-execution) left off, the agent has access to app tools (actions, database, MCP) but not the filesystem. This means the agent can read and write data, run actions, and interact with external services — but it can't edit your React components or add new routes on a deployed instance.
|
|
634
638
|
|
|
635
639
|
### Builder.io: Visual Editing in Production {#builderio}
|
|
636
640
|
|
|
637
|
-
[Builder.io](https://www.builder.io?utm_source=agent-native&utm_medium=docs&utm_campaign=framework&utm_content=deployment)
|
|
641
|
+
[Builder.io](https://www.builder.io?utm_source=agent-native&utm_medium=docs&utm_campaign=framework&utm_content=deployment) is a separate managed code-capable workflow where an agent can modify your app's UI in production. Connect your repo to Builder.io and prompt for UI changes directly — no redeploy needed.
|
|
638
642
|
|
|
639
643
|
**How it works:**
|
|
640
644
|
|
|
@@ -0,0 +1,491 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Docs components"
|
|
3
|
+
description: "Reference for every MDX component available in the Agent Native docs, with live rendered examples and copy-paste syntax."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Docs components
|
|
7
|
+
|
|
8
|
+
The docs site renders standard Markdown plus a set of MDX block components for
|
|
9
|
+
richer content. Each section below shows a live rendered example followed by
|
|
10
|
+
the exact MDX syntax that produced it.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Callout
|
|
15
|
+
|
|
16
|
+
<Callout tone="info">
|
|
17
|
+
|
|
18
|
+
This is an `info` callout. Use it for background context or neutral notes. You can use **bold**, `inline code`, and [links](/docs/getting-started) inside.
|
|
19
|
+
|
|
20
|
+
</Callout>
|
|
21
|
+
|
|
22
|
+
<Callout tone="warning">
|
|
23
|
+
|
|
24
|
+
This is a `warning` callout. Use it for potential data loss, breaking changes, or hard-to-reverse steps. For example: restart `pnpm dev` after adding a new route file — the router only picks up files present at startup.
|
|
25
|
+
|
|
26
|
+
</Callout>
|
|
27
|
+
|
|
28
|
+
<Callout tone="success">
|
|
29
|
+
|
|
30
|
+
This is a `success` callout. Use it for the recommended path or to confirm a working approach.
|
|
31
|
+
|
|
32
|
+
</Callout>
|
|
33
|
+
|
|
34
|
+
<Callout tone="risk">
|
|
35
|
+
|
|
36
|
+
This is a `risk` callout. Use it for security implications or production caveats.
|
|
37
|
+
|
|
38
|
+
</Callout>
|
|
39
|
+
|
|
40
|
+
<Callout tone="decision">
|
|
41
|
+
|
|
42
|
+
This is a `decision` callout. Use it to surface a deliberate tradeoff the reader should understand.
|
|
43
|
+
|
|
44
|
+
</Callout>
|
|
45
|
+
|
|
46
|
+
```mdx
|
|
47
|
+
<Callout tone="info">
|
|
48
|
+
|
|
49
|
+
This is an `info` callout. Use it for background context or neutral notes. You can use **bold**, `inline code`, and [links](/docs/getting-started) inside.
|
|
50
|
+
|
|
51
|
+
</Callout>
|
|
52
|
+
|
|
53
|
+
<Callout tone="warning">
|
|
54
|
+
|
|
55
|
+
This is a `warning` callout. Use it for potential data loss, breaking changes, or hard-to-reverse steps. For example: restart `pnpm dev` after adding a new route file — the router only picks up files present at startup.
|
|
56
|
+
|
|
57
|
+
</Callout>
|
|
58
|
+
|
|
59
|
+
<Callout tone="success">
|
|
60
|
+
|
|
61
|
+
This is a `success` callout. Use it for the recommended path or to confirm a working approach.
|
|
62
|
+
|
|
63
|
+
</Callout>
|
|
64
|
+
|
|
65
|
+
<Callout tone="risk">
|
|
66
|
+
|
|
67
|
+
This is a `risk` callout. Use it for security implications or production caveats.
|
|
68
|
+
|
|
69
|
+
</Callout>
|
|
70
|
+
|
|
71
|
+
<Callout tone="decision">
|
|
72
|
+
|
|
73
|
+
This is a `decision` callout. Use it to surface a deliberate tradeoff the reader should understand.
|
|
74
|
+
|
|
75
|
+
</Callout>
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
| Tone | When to use |
|
|
79
|
+
| ---------- | ------------------------------------------------------------ |
|
|
80
|
+
| `info` | Background context, neutral notes |
|
|
81
|
+
| `warning` | Potential data loss, breaking changes, hard-to-reverse steps |
|
|
82
|
+
| `success` | Recommended option, confirmed working path |
|
|
83
|
+
| `risk` | Security implications, production caveats |
|
|
84
|
+
| `decision` | Deliberate tradeoffs the reader should understand |
|
|
85
|
+
|
|
86
|
+
Leave a blank line between the opening tag and the body, and another before the closing tag.
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## Steps
|
|
91
|
+
|
|
92
|
+
<Steps>
|
|
93
|
+
|
|
94
|
+
### Install dependencies
|
|
95
|
+
|
|
96
|
+
Run the following inside your project directory:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
pnpm install
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Start the dev server
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
pnpm dev
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Open `http://localhost:3000`. The app is ready when **VITE ready** appears in the terminal.
|
|
109
|
+
|
|
110
|
+
### Sign in
|
|
111
|
+
|
|
112
|
+
The first run shows a login screen. Use any credentials — local development does not send email.
|
|
113
|
+
|
|
114
|
+
</Steps>
|
|
115
|
+
|
|
116
|
+
````mdx
|
|
117
|
+
<Steps>
|
|
118
|
+
|
|
119
|
+
### Install dependencies
|
|
120
|
+
|
|
121
|
+
Run the following inside your project directory:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
pnpm install
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Start the dev server
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
pnpm dev
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Open `http://localhost:3000`. The app is ready when **VITE ready** appears in the terminal.
|
|
134
|
+
|
|
135
|
+
### Sign in
|
|
136
|
+
|
|
137
|
+
The first run shows a login screen. Use any credentials — local development does not send email.
|
|
138
|
+
|
|
139
|
+
</Steps>
|
|
140
|
+
````
|
|
141
|
+
|
|
142
|
+
Each step is a `###` heading followed by the body content. Steps work best for 3–8 items. For 2 items a numbered list is fine. For longer procedures, split into multiple `<Steps>` blocks with a prose bridge between them.
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## Cards
|
|
147
|
+
|
|
148
|
+
<Cards>
|
|
149
|
+
|
|
150
|
+
### [Actions](/docs/actions)
|
|
151
|
+
|
|
152
|
+
Typed operations callable from the agent, UI, CLI, and HTTP. Define once, call from anywhere.
|
|
153
|
+
|
|
154
|
+
### [Database](/docs/database)
|
|
155
|
+
|
|
156
|
+
SQL persistence with automatic migrations. SQLite locally, Postgres/Turso in production.
|
|
157
|
+
|
|
158
|
+
### [Agent Surfaces](/docs/agent-surfaces)
|
|
159
|
+
|
|
160
|
+
Configure where the agent appears: full-page chat, sidebar panel, or embedded in a route.
|
|
161
|
+
|
|
162
|
+
### Skills
|
|
163
|
+
|
|
164
|
+
Plain-text instruction files that give the agent domain knowledge and task-specific behavior without code changes.
|
|
165
|
+
|
|
166
|
+
</Cards>
|
|
167
|
+
|
|
168
|
+
```mdx
|
|
169
|
+
<Cards>
|
|
170
|
+
|
|
171
|
+
### [Actions](/docs/actions)
|
|
172
|
+
|
|
173
|
+
Typed operations callable from the agent, UI, CLI, and HTTP. Define once, call from anywhere.
|
|
174
|
+
|
|
175
|
+
### [Database](/docs/database)
|
|
176
|
+
|
|
177
|
+
SQL persistence with automatic migrations. SQLite locally, Postgres/Turso in production.
|
|
178
|
+
|
|
179
|
+
### [Agent Surfaces](/docs/agent-surfaces)
|
|
180
|
+
|
|
181
|
+
Configure where the agent appears: full-page chat, sidebar panel, or embedded in a route.
|
|
182
|
+
|
|
183
|
+
### Skills
|
|
184
|
+
|
|
185
|
+
Plain-text instruction files that give the agent domain knowledge and task-specific behavior without code changes.
|
|
186
|
+
|
|
187
|
+
</Cards>
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
Each card is a `###` heading (optionally linked) followed by the description. Cards without a link render as plain info boxes with no hover state or arrow.
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## Comparison
|
|
195
|
+
|
|
196
|
+
<Comparison>
|
|
197
|
+
|
|
198
|
+
### Before
|
|
199
|
+
|
|
200
|
+
Every feature needs a separate API endpoint, a separate React query, and manual wiring between the AI response and UI state.
|
|
201
|
+
|
|
202
|
+
### After
|
|
203
|
+
|
|
204
|
+
Define one action. The agent calls it as a tool, the UI calls it through a React hook, and both read the same validated output.
|
|
205
|
+
|
|
206
|
+
</Comparison>
|
|
207
|
+
|
|
208
|
+
```mdx
|
|
209
|
+
<Comparison>
|
|
210
|
+
|
|
211
|
+
### Before
|
|
212
|
+
|
|
213
|
+
Every feature needs a separate API endpoint, a separate React query, and manual wiring between the AI response and UI state.
|
|
214
|
+
|
|
215
|
+
### After
|
|
216
|
+
|
|
217
|
+
Define one action. The agent calls it as a tool, the UI calls it through a React hook, and both read the same validated output.
|
|
218
|
+
|
|
219
|
+
</Comparison>
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
Add more `###` sections to get 3 or 4 columns (max 4). The red/green label accent only applies to headings that exactly match `Before`, `Old`, `Without` (red) or `After`, `New`, `With` (green).
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
## kbd — keyboard shortcut
|
|
227
|
+
|
|
228
|
+
Press [[⌘K]] to open the command palette. Save with [[Ctrl+S]] before running the dev server. Navigate fields with [[Tab]] and [[Shift+Tab]].
|
|
229
|
+
|
|
230
|
+
```mdx
|
|
231
|
+
Press [[⌘K]] to open the command palette. Save with [[Ctrl+S]] before running the dev server. Navigate fields with [[Tab]] and [[Shift+Tab]].
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
Double brackets around the key sequence; no MDX component needed. Works anywhere in regular Markdown paragraphs.
|
|
235
|
+
|
|
236
|
+
---
|
|
237
|
+
|
|
238
|
+
## Mermaid diagram
|
|
239
|
+
|
|
240
|
+
```mermaid
|
|
241
|
+
graph LR
|
|
242
|
+
A[defineAction] --> B[Agent calls it as a tool]
|
|
243
|
+
A --> C[UI calls it via useActionQuery]
|
|
244
|
+
A --> D[CLI calls it directly]
|
|
245
|
+
A --> E[HTTP API]
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
````mdx
|
|
249
|
+
```mermaid
|
|
250
|
+
graph LR
|
|
251
|
+
A[defineAction] --> B[Agent calls it as a tool]
|
|
252
|
+
A --> C[UI calls it via useActionQuery]
|
|
253
|
+
A --> D[CLI calls it directly]
|
|
254
|
+
A --> E[HTTP API]
|
|
255
|
+
```
|
|
256
|
+
````
|
|
257
|
+
|
|
258
|
+
Use a fenced code block with the `mermaid` language tag. Mermaid supports flowcharts (`graph`), sequence diagrams (`sequenceDiagram`), entity-relationship diagrams (`erDiagram`), and more. See [mermaid.js.org](https://mermaid.js.org/intro/) for the full syntax reference.
|
|
259
|
+
|
|
260
|
+
---
|
|
261
|
+
|
|
262
|
+
## FileTree
|
|
263
|
+
|
|
264
|
+
<FileTree
|
|
265
|
+
id="docs-components-filetree"
|
|
266
|
+
entries={[
|
|
267
|
+
{
|
|
268
|
+
path: "actions/analyze-text.ts",
|
|
269
|
+
change: "added",
|
|
270
|
+
note: "New action — callable from agent, UI, and CLI",
|
|
271
|
+
},
|
|
272
|
+
{ path: "actions/list-text-analyses.ts", change: "added" },
|
|
273
|
+
{ path: "app/routes/analyses.tsx", change: "modified" },
|
|
274
|
+
{
|
|
275
|
+
path: "app/config/nav.ts",
|
|
276
|
+
change: "modified",
|
|
277
|
+
note: "Add the new route to the sidebar nav",
|
|
278
|
+
},
|
|
279
|
+
{ path: "db/migrations/001_analyses.sql" },
|
|
280
|
+
]}
|
|
281
|
+
/>
|
|
282
|
+
|
|
283
|
+
```mdx
|
|
284
|
+
<FileTree
|
|
285
|
+
id="docs-components-filetree"
|
|
286
|
+
entries={[
|
|
287
|
+
{
|
|
288
|
+
path: "actions/analyze-text.ts",
|
|
289
|
+
change: "added",
|
|
290
|
+
note: "New action — callable from agent, UI, and CLI",
|
|
291
|
+
},
|
|
292
|
+
{ path: "actions/list-text-analyses.ts", change: "added" },
|
|
293
|
+
{ path: "app/routes/analyses.tsx", change: "modified" },
|
|
294
|
+
{
|
|
295
|
+
path: "app/config/nav.ts",
|
|
296
|
+
change: "modified",
|
|
297
|
+
note: "Add the new route to the sidebar nav",
|
|
298
|
+
},
|
|
299
|
+
{ path: "db/migrations/001_analyses.sql" },
|
|
300
|
+
]}
|
|
301
|
+
/>
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
FileTree is **self-closing** (`/>`). It does not accept Markdown children — if you use open/close tags with content inside you will get a parse error.
|
|
305
|
+
|
|
306
|
+
Each entry in `entries` is an object with a `path` key (slash-delimited) and optional fields:
|
|
307
|
+
|
|
308
|
+
| Field | Values | Effect |
|
|
309
|
+
| ---------- | ------------------------------------------------------- | ------------------------------------ |
|
|
310
|
+
| `change` | `"added"` \| `"modified"` \| `"removed"` \| `"renamed"` | Colored badge on the row |
|
|
311
|
+
| `note` | any string | Expandable annotation shown on hover |
|
|
312
|
+
| `snippet` | code string | Expandable code preview |
|
|
313
|
+
| `language` | e.g. `"ts"` | Syntax highlighting for the snippet |
|
|
314
|
+
|
|
315
|
+
---
|
|
316
|
+
|
|
317
|
+
## Tabs
|
|
318
|
+
|
|
319
|
+
<TabsBlock
|
|
320
|
+
id="docs-components-tabs"
|
|
321
|
+
tabs={[
|
|
322
|
+
{
|
|
323
|
+
id: "pnpm",
|
|
324
|
+
label: "pnpm",
|
|
325
|
+
blocks: [
|
|
326
|
+
{
|
|
327
|
+
type: "code",
|
|
328
|
+
id: "pnpm-install",
|
|
329
|
+
data: { code: "pnpm install", language: "bash" },
|
|
330
|
+
},
|
|
331
|
+
],
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
id: "npm",
|
|
335
|
+
label: "npm",
|
|
336
|
+
blocks: [
|
|
337
|
+
{
|
|
338
|
+
type: "code",
|
|
339
|
+
id: "npm-install",
|
|
340
|
+
data: { code: "npm install", language: "bash" },
|
|
341
|
+
},
|
|
342
|
+
],
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
id: "yarn",
|
|
346
|
+
label: "yarn",
|
|
347
|
+
blocks: [
|
|
348
|
+
{
|
|
349
|
+
type: "code",
|
|
350
|
+
id: "yarn-install",
|
|
351
|
+
data: { code: "yarn install", language: "bash" },
|
|
352
|
+
},
|
|
353
|
+
],
|
|
354
|
+
},
|
|
355
|
+
]}
|
|
356
|
+
/>
|
|
357
|
+
|
|
358
|
+
```mdx
|
|
359
|
+
<TabsBlock
|
|
360
|
+
id="docs-components-tabs"
|
|
361
|
+
tabs={[
|
|
362
|
+
{
|
|
363
|
+
id: "pnpm",
|
|
364
|
+
label: "pnpm",
|
|
365
|
+
blocks: [
|
|
366
|
+
{
|
|
367
|
+
type: "code",
|
|
368
|
+
id: "pnpm-install",
|
|
369
|
+
data: { code: "pnpm install", language: "bash" },
|
|
370
|
+
},
|
|
371
|
+
],
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
id: "npm",
|
|
375
|
+
label: "npm",
|
|
376
|
+
blocks: [
|
|
377
|
+
{
|
|
378
|
+
type: "code",
|
|
379
|
+
id: "npm-install",
|
|
380
|
+
data: { code: "npm install", language: "bash" },
|
|
381
|
+
},
|
|
382
|
+
],
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
id: "yarn",
|
|
386
|
+
label: "yarn",
|
|
387
|
+
blocks: [
|
|
388
|
+
{
|
|
389
|
+
type: "code",
|
|
390
|
+
id: "yarn-install",
|
|
391
|
+
data: { code: "yarn install", language: "bash" },
|
|
392
|
+
},
|
|
393
|
+
],
|
|
394
|
+
},
|
|
395
|
+
]}
|
|
396
|
+
/>
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
`TabsBlock` is self-closing. The entire structure is one JSON `tabs` attribute. Each tab's content is a `blocks` array where each item is a block object with `type`, `id`, and `data` matching that block's schema. Tabs works best for short parallel code snippets (one code block per tab). For richer multi-block content per tab, use a visual editor rather than hand-authoring the JSON.
|
|
400
|
+
|
|
401
|
+
---
|
|
402
|
+
|
|
403
|
+
## Columns
|
|
404
|
+
|
|
405
|
+
<Columns
|
|
406
|
+
id="docs-components-columns"
|
|
407
|
+
columns={[
|
|
408
|
+
{
|
|
409
|
+
id: "col-manual",
|
|
410
|
+
label: "Manual approach",
|
|
411
|
+
blocks: [
|
|
412
|
+
{
|
|
413
|
+
type: "code",
|
|
414
|
+
id: "manual-code",
|
|
415
|
+
data: {
|
|
416
|
+
code: "const res = await fetch('/api/analyses')\nconst data = await res.json()",
|
|
417
|
+
language: "ts",
|
|
418
|
+
},
|
|
419
|
+
},
|
|
420
|
+
],
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
id: "col-actions",
|
|
424
|
+
label: "With actions",
|
|
425
|
+
blocks: [
|
|
426
|
+
{
|
|
427
|
+
type: "code",
|
|
428
|
+
id: "action-code",
|
|
429
|
+
data: {
|
|
430
|
+
code: "const { data } = useActionQuery('list-text-analyses', {})",
|
|
431
|
+
language: "ts",
|
|
432
|
+
},
|
|
433
|
+
},
|
|
434
|
+
],
|
|
435
|
+
},
|
|
436
|
+
]}
|
|
437
|
+
/>
|
|
438
|
+
|
|
439
|
+
```mdx
|
|
440
|
+
<Columns
|
|
441
|
+
id="docs-components-columns"
|
|
442
|
+
columns={[
|
|
443
|
+
{
|
|
444
|
+
id: "col-manual",
|
|
445
|
+
label: "Manual approach",
|
|
446
|
+
blocks: [
|
|
447
|
+
{
|
|
448
|
+
type: "code",
|
|
449
|
+
id: "manual-code",
|
|
450
|
+
data: {
|
|
451
|
+
code: "const res = await fetch('/api/analyses')\nconst data = await res.json()",
|
|
452
|
+
language: "ts",
|
|
453
|
+
},
|
|
454
|
+
},
|
|
455
|
+
],
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
id: "col-actions",
|
|
459
|
+
label: "With actions",
|
|
460
|
+
blocks: [
|
|
461
|
+
{
|
|
462
|
+
type: "code",
|
|
463
|
+
id: "action-code",
|
|
464
|
+
data: {
|
|
465
|
+
code: "const { data } = useActionQuery('list-text-analyses', {})",
|
|
466
|
+
language: "ts",
|
|
467
|
+
},
|
|
468
|
+
},
|
|
469
|
+
],
|
|
470
|
+
},
|
|
471
|
+
]}
|
|
472
|
+
/>
|
|
473
|
+
```
|
|
474
|
+
|
|
475
|
+
Like `TabsBlock`, `Columns` is self-closing with a single JSON `columns` attribute. Each column has an optional `label` header and a `blocks` array. For comparing prose rather than code, `Comparison` is easier to hand-author.
|
|
476
|
+
|
|
477
|
+
---
|
|
478
|
+
|
|
479
|
+
## When to use which component
|
|
480
|
+
|
|
481
|
+
| Situation | Component |
|
|
482
|
+
| ----------------------------------------- | ------------------------------------ |
|
|
483
|
+
| Reader must not miss something | `Callout` (warning / info / success) |
|
|
484
|
+
| Sequential procedure with titled steps | `Steps` |
|
|
485
|
+
| Navigation or feature overview grid | `Cards` |
|
|
486
|
+
| Before vs. after, old vs. new (prose) | `Comparison` |
|
|
487
|
+
| Same task in multiple tools or frameworks | `Tabs` |
|
|
488
|
+
| Side-by-side code (labeled columns) | `Columns` |
|
|
489
|
+
| Project directory structure | `FileTree` |
|
|
490
|
+
| Inline keyboard shortcut | `[[Key]]` |
|
|
491
|
+
| Architecture or flow diagram | Mermaid fence |
|
package/docs/content/doctor.mdx
CHANGED
|
@@ -5,7 +5,14 @@ description: "agent-native doctor scans a generated app's source for the framewo
|
|
|
5
5
|
|
|
6
6
|
# Doctor (Code Checks)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Generated apps contain source code that can be changed through the repository's
|
|
9
|
+
development workflow, including by an agent frame intentionally granted
|
|
10
|
+
workspace and write tooling. `agent-native doctor` is the automated check for that: it
|
|
11
|
+
scans app source for the framework's security-critical code-safety invariants —
|
|
12
|
+
the same class of check that lives in this framework's own CI as
|
|
13
|
+
`scripts/guard-*.mjs` — ported to run against a single generated app instead of
|
|
14
|
+
the framework's multi-template monorepo layout. It's read-only: doctor never
|
|
15
|
+
edits your code, it only reports.
|
|
9
16
|
|
|
10
17
|
## Quick start {#quick-start}
|
|
11
18
|
|
|
@@ -209,7 +209,7 @@ import { sendToAgentChat } from "@agent-native/core/client/agent-chat";
|
|
|
209
209
|
- **`newTab`** — create a separate chat thread for this prompt.
|
|
210
210
|
- **`background`** — with `newTab`, run without focusing the new thread. The hidden run is tracked in `RunsTray`.
|
|
211
211
|
- **`openSidebar`** — set to `false` for background/silent sends. Default opens the sidebar so the user sees the response.
|
|
212
|
-
- **`type`** — `"content"` (default) keeps the work in the embedded app agent. `"code"` routes to
|
|
212
|
+
- **`type`** — `"content"` (default) keeps the work in the embedded app agent, which operates through app tools unless its frame is intentionally granted workspace and write tooling. `"code"` routes to a separate code-capable frame (for repository source changes, see [Frames](/docs/frames)).
|
|
213
213
|
|
|
214
214
|
`sendToAgentChat` returns a stable `tabId` you can use to track the chat run.
|
|
215
215
|
|