@agent-native/core 0.149.1 → 0.149.3
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 +1 -1
- package/corpus/templates/analytics/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/analytics/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/analytics/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/analytics/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/analytics/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/analytics/.agents/skills/creative-context/SKILL.md +4 -2
- package/corpus/templates/analytics/.agents/skills/dashboard-management/SKILL.md +2 -0
- package/corpus/templates/analytics/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/analytics/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/analytics/AGENTS.md +25 -32
- package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +150 -46
- package/corpus/templates/analytics/app/global.css +1 -1
- package/corpus/templates/analytics/app/i18n-data.ts +37 -0
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/PanelEditorDialog.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/SqlChartCard.tsx +32 -0
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/types.ts +2 -0
- package/corpus/templates/analytics/changelog/2026-08-10-dashboard-tables-can-be-copied-and-sorted-by-multiple-column.md +6 -0
- package/corpus/templates/analytics/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
- package/corpus/templates/analytics/changelog/2026-08-11-full-page-chat-composers-stay-at-a-focused-750px-width.md +6 -0
- package/corpus/templates/assets/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/assets/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/assets/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/assets/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/assets/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/assets/.agents/skills/creative-context/SKILL.md +4 -2
- package/corpus/templates/assets/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/assets/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/assets/AGENTS.md +6 -9
- package/corpus/templates/assets/app/global.css +1 -1
- package/corpus/templates/assets/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
- package/corpus/templates/assets/changelog/2026-08-11-full-page-chat-composers-stay-at-a-focused-750px-width.md +6 -0
- package/corpus/templates/brain/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/brain/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/brain/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/brain/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/brain/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/brain/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/brain/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/brain/AGENTS.md +5 -12
- package/corpus/templates/brain/app/global.css +1 -1
- package/corpus/templates/brain/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
- package/corpus/templates/brain/changelog/2026-08-11-full-page-chat-composers-stay-at-a-focused-750px-width.md +6 -0
- package/corpus/templates/calendar/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/calendar/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/calendar/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/calendar/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/calendar/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/calendar/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/calendar/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/calendar/AGENTS.md +8 -9
- package/corpus/templates/chat/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/chat/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/chat/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/chat/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/chat/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/chat/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/chat/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/chat/AGENTS.md +32 -80
- package/corpus/templates/chat/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
- package/corpus/templates/clips/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/clips/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/clips/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/clips/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/clips/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/clips/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/clips/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/clips/AGENTS.md +25 -31
- package/corpus/templates/clips/changelog/2026-08-10-clips-desktop-sign-in-now-starts-with-magic-links-and-google.md +6 -0
- package/corpus/templates/clips/chrome-extension/src/overlay.css +1 -0
- package/corpus/templates/clips/desktop/src/app.tsx +274 -137
- package/corpus/templates/clips/desktop/src/styles.css +35 -0
- package/corpus/templates/content/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/content/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/content/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/content/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/content/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/content/.agents/skills/creative-context/SKILL.md +4 -2
- package/corpus/templates/content/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/content/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/content/AGENTS.md +5 -9
- package/corpus/templates/content/app/global.css +1 -0
- package/corpus/templates/crm/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/crm/AGENTS.md +7 -11
- package/corpus/templates/crm/app/global.css +1 -1
- package/corpus/templates/crm/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
- package/corpus/templates/crm/changelog/2026-08-11-full-page-chat-composers-stay-at-a-focused-750px-width.md +6 -0
- package/corpus/templates/design/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/design/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/design/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/design/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/design/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/design/.agents/skills/creative-context/SKILL.md +4 -2
- package/corpus/templates/design/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/design/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/design/.generated/bridge/editor-chrome.generated.ts +70 -3
- package/corpus/templates/design/AGENTS.md +13 -21
- package/corpus/templates/design/app/components/design/DesignCanvas.tsx +12 -0
- package/corpus/templates/design/app/components/design/LayersPanel.tsx +19 -2
- package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +115 -7
- package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +82 -7
- package/corpus/templates/design/app/components/design/design-trace.ts +120 -0
- package/corpus/templates/design/app/components/design/dnd-debug.ts +2 -1
- package/corpus/templates/design/app/components/design/edit-panel/position-layout-properties.tsx +40 -26
- package/corpus/templates/design/app/components/design/multi-screen/board-surface-html.ts +4 -1
- package/corpus/templates/design/app/components/design/multi-screen/frame-geometry.ts +12 -3
- package/corpus/templates/design/app/components/design/multi-screen/screen-content-cache.ts +4 -0
- package/corpus/templates/design/app/components/design/multi-screen/types.ts +7 -0
- package/corpus/templates/design/app/components/editor/PromptDialog.tsx +3 -2
- package/corpus/templates/design/app/components/layout/Sidebar.tsx +2 -2
- package/corpus/templates/design/app/hooks/useDesignHotkeys.ts +3 -0
- package/corpus/templates/design/app/i18n-data.ts +1 -0
- package/corpus/templates/design/app/pages/DesignSystemSetup.tsx +5 -5
- package/corpus/templates/design/app/pages/DesignSystems.tsx +3 -2
- package/corpus/templates/design/app/pages/design-editor/canvas-primitive-insert.ts +100 -13
- package/corpus/templates/design/app/pages/design-editor/cross-screen-text-color.ts +1 -1
- package/corpus/templates/design/app/pages/design-editor/data-operations.ts +14 -0
- package/corpus/templates/design/changelog/2026-08-10-marquee-selecting-layers-far-down-a-tall-screen-now-selects-.md +6 -0
- package/corpus/templates/design/changelog/2026-08-10-the-frame-tool-draws-a-plain-frame-by-default-with-screen-av.md +6 -0
- package/corpus/templates/design/e2e/global-setup.ts +27 -32
- package/corpus/templates/design/playwright.config.ts +3 -5
- package/corpus/templates/design/shared/breakpoint-media.ts +9 -2
- package/corpus/templates/dispatch/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/dispatch/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/dispatch/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/dispatch/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/dispatch/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/dispatch/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/dispatch/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/dispatch/AGENTS.md +9 -16
- package/corpus/templates/dispatch/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
- package/corpus/templates/factory/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/factory/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/factory/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/factory/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/factory/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/factory/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/factory/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/factory/AGENTS.md +10 -24
- package/corpus/templates/factory/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
- package/corpus/templates/forms/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/forms/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/forms/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/forms/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/forms/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/forms/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/forms/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/forms/AGENTS.md +11 -17
- package/corpus/templates/forms/app/global.css +1 -0
- package/corpus/templates/forms/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
- package/corpus/templates/forms/changelog/2026-08-11-full-page-chat-composers-stay-at-a-focused-750px-width.md +6 -0
- package/corpus/templates/macros/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/macros/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/macros/AGENTS.md +8 -8
- package/corpus/templates/mail/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/mail/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/mail/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/mail/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/mail/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/mail/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/mail/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/mail/AGENTS.md +5 -6
- package/corpus/templates/plan/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/plan/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/plan/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/plan/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/plan/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/plan/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/plan/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/plan/AGENTS.md +5 -14
- package/corpus/templates/plan/app/global.css +1 -0
- package/corpus/templates/plan/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
- package/corpus/templates/plan/changelog/2026-08-11-plan-no-longer-reloads-when-runtime-state-changes.md +6 -0
- package/corpus/templates/plan/server/ui-plan-html.ts +4 -1
- package/corpus/templates/plan/vite.config.ts +5 -0
- package/corpus/templates/slides/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/slides/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/slides/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/slides/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/slides/.agents/skills/create-deck/SKILL.md +2 -2
- package/corpus/templates/slides/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/slides/.agents/skills/creative-context/SKILL.md +6 -3
- package/corpus/templates/slides/.agents/skills/deck-management/SKILL.md +6 -1
- package/corpus/templates/slides/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/slides/.agents/skills/image-generation-via-a2a/SKILL.md +3 -2
- package/corpus/templates/slides/.agents/skills/slide-editing/SKILL.md +3 -0
- package/corpus/templates/slides/.agents/skills/slide-images/SKILL.md +3 -3
- package/corpus/templates/slides/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/slides/AGENTS.md +33 -35
- package/corpus/templates/slides/actions/add-deck.ts +2 -0
- package/corpus/templates/slides/actions/add-slide.ts +15 -1
- package/corpus/templates/slides/actions/create-deck.ts +18 -6
- package/corpus/templates/slides/actions/get-deck-reference-context.ts +2 -2
- package/corpus/templates/slides/actions/get-deck.ts +83 -7
- package/corpus/templates/slides/actions/import-file.ts +2 -1
- package/corpus/templates/slides/actions/patch-deck.ts +165 -9
- package/corpus/templates/slides/actions/save-deck.ts +24 -1
- package/corpus/templates/slides/actions/update-slide.ts +1 -1
- package/corpus/templates/slides/app/components/comments/SlideCommentsPanel.tsx +2 -2
- package/corpus/templates/slides/app/components/deck/DeckCard.tsx +1 -23
- package/corpus/templates/slides/app/components/design-system/DesignSystemCard.tsx +2 -2
- package/corpus/templates/slides/app/components/design-system/DesignSystemSetup.tsx +6 -6
- package/corpus/templates/slides/app/components/editor/AnimationsPanel.tsx +3 -3
- package/corpus/templates/slides/app/components/editor/DeckEditorSkeleton.tsx +4 -4
- package/corpus/templates/slides/app/components/editor/EditorSidebar.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/EditorToolbar.tsx +432 -668
- package/corpus/templates/slides/app/components/editor/ExportMenu.tsx +296 -259
- package/corpus/templates/slides/app/components/editor/GeneratingSlidePreview.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/GoogleDriveConnectionCta.tsx +13 -1
- package/corpus/templates/slides/app/components/editor/NewDeckReferenceStep.tsx +56 -174
- package/corpus/templates/slides/app/components/editor/PromptDialog.tsx +241 -116
- package/corpus/templates/slides/app/components/editor/SlideContextToolbar.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/SlideEditor.tsx +42 -14
- package/corpus/templates/slides/app/components/editor/SpeakerNotesPanel.tsx +6 -12
- package/corpus/templates/slides/app/components/editor/editor-command-model.ts +35 -0
- package/corpus/templates/slides/app/components/layout/AgentWorkIndicator.tsx +1 -1
- package/corpus/templates/slides/app/components/layout/Layout.tsx +34 -35
- package/corpus/templates/slides/app/components/layout/Sidebar.tsx +8 -10
- package/corpus/templates/slides/app/components/layout/layout-route-policy.ts +2 -5
- package/corpus/templates/slides/app/components/onboarding/FirstDeckOnboardingFlow.tsx +45 -40
- package/corpus/templates/slides/app/components/presentation/PresentationView.tsx +63 -16
- package/corpus/templates/slides/app/context/DeckContext.tsx +2 -1
- package/corpus/templates/slides/app/global.css +76 -1
- package/corpus/templates/slides/app/hooks/use-generating-slide-preview.ts +25 -3
- package/corpus/templates/slides/app/i18n/en-US.ts +2 -0
- package/corpus/templates/slides/app/lib/create-deck-generation.ts +52 -23
- package/corpus/templates/slides/app/lib/recent-references.ts +23 -1
- package/corpus/templates/slides/app/lib/slide-animation-elements.ts +104 -3
- package/corpus/templates/slides/app/pages/DeckEditor.tsx +17 -33
- package/corpus/templates/slides/app/pages/DesignSystems.tsx +2 -2
- package/corpus/templates/slides/app/pages/Index.tsx +315 -151
- package/corpus/templates/slides/app/root.tsx +43 -0
- package/corpus/templates/slides/changelog/2026-08-10-ai-editing-avatar-badge.md +6 -0
- package/corpus/templates/slides/changelog/2026-08-10-generated-decks-keep-a-clear-human-readable-title.md +6 -0
- package/corpus/templates/slides/changelog/2026-08-10-new-deck-creation-now-shows-progress-opens-the-editor-direct.md +6 -0
- package/corpus/templates/slides/changelog/2026-08-10-presentation-reveals-now-follow-valid-targets.md +6 -0
- package/corpus/templates/slides/changelog/2026-08-10-slides-editing-controls-are-consolidated-into-one-focused-me.md +6 -0
- package/corpus/templates/slides/changelog/2026-08-10-slides-now-verify-and-restyle-every-imported-slide-in-one-pa.md +6 -0
- package/corpus/templates/slides/changelog/2026-08-10-slides-only-suggests-a-google-connection-for-relevant-reques.md +6 -0
- package/corpus/templates/slides/changelog/2026-08-10-the-google-slides-import-option-is-now-labeled-slides.md +6 -0
- package/corpus/templates/slides/changelog/2026-08-11-faster-slides-chat-deck-reads.md +6 -0
- package/corpus/templates/slides/changelog/2026-08-11-slides-chat-can-read-one-slide-without-loading-the-full-deck.md +6 -0
- package/corpus/templates/slides/changelog/2026-08-11-slides-clearly-indicate-when-an-ai-agent-is-editing-alongsid.md +6 -0
- package/corpus/templates/slides/package.json +1 -0
- package/corpus/templates/slides/server/lib/chat-attachments.ts +1 -1
- package/corpus/templates/slides/server/lib/validate-slide-animations.ts +163 -0
- package/corpus/templates/slides/server/plugins/agent-chat.ts +8 -5
- package/corpus/templates/slides/shared/api.ts +47 -15
- package/corpus/templates/slides/shared/deck-title.ts +135 -0
- package/corpus/templates/tasks/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/tasks/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/tasks/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/tasks/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/tasks/.agents/skills/agent-watchdog/SKILL.md +1 -0
- package/corpus/templates/tasks/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/tasks/.agents/skills/efficient-fable/SKILL.md +1 -0
- package/corpus/templates/tasks/.agents/skills/efficient-frontier/SKILL.md +1 -0
- package/corpus/templates/tasks/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/tasks/.agents/skills/plan-arbiter/SKILL.md +1 -0
- package/corpus/templates/tasks/.agents/skills/plow-ahead/SKILL.md +1 -0
- package/corpus/templates/tasks/.agents/skills/quick-recap/SKILL.md +1 -0
- package/corpus/templates/tasks/.agents/skills/read-the-damn-docs/SKILL.md +1 -0
- package/corpus/templates/tasks/.agents/skills/stay-within-limits/SKILL.md +1 -0
- package/corpus/templates/tasks/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/tasks/AGENTS.md +5 -20
- package/corpus/templates/tasks/app/components/tasks/TaskListRow.tsx +4 -1
- package/dist/agent/engine/ai-sdk-engine.js +1 -1
- package/dist/agent/production-agent.d.ts +21 -1
- package/dist/agent/production-agent.js +505 -355
- package/dist/agent/run-manager.js +156 -14
- package/dist/agent/run-store.d.ts +11 -10
- package/dist/agent/run-store.js +17 -13
- package/dist/agent/tool-approval-store.d.ts +18 -0
- package/dist/agent/tool-approval-store.js +122 -0
- package/dist/agent/types.d.ts +1 -1
- package/dist/cli/code-agent-executor.js +11 -2
- package/dist/client/AgentPanel.js +31 -6
- package/dist/client/AssistantChat.d.ts +9 -4
- package/dist/client/AssistantChat.js +221 -149
- package/dist/client/active-run-state.d.ts +9 -1
- package/dist/client/active-run-state.js +34 -3
- package/dist/client/agent-chat/index.d.ts +1 -1
- package/dist/client/agent-chat-adapter.d.ts +8 -0
- package/dist/client/agent-chat-adapter.js +125 -28
- package/dist/client/agent-chat.d.ts +1 -1
- package/dist/client/chat/markdown-renderer.js +14 -2
- package/dist/client/chat/message-components.d.ts +13 -3
- package/dist/client/chat/message-components.js +57 -52
- package/dist/client/chat/run-recovery.d.ts +1 -0
- package/dist/client/chat/run-recovery.js +8 -0
- package/dist/client/chat/tool-call-display.d.ts +5 -5
- package/dist/client/chat/tool-call-display.js +9 -212
- package/dist/client/chat-first/apps-rail.js +3 -3
- package/dist/client/chat-first/browser-pane.js +4 -1
- package/dist/client/chat-first/chat-history.d.ts +3 -1
- package/dist/client/chat-first/chat-history.js +7 -4
- package/dist/client/chat-first/surface-tabs.d.ts +1 -1
- package/dist/client/chat-first/surface-tabs.js +52 -41
- package/dist/client/chat-first/types.d.ts +3 -0
- package/dist/client/chat-first.d.ts +10 -0
- package/dist/client/chat-first.js +37 -2
- package/dist/client/components/ui/message-scroller.js +4 -1
- package/dist/client/i18n.js +3 -1
- package/dist/client/resources/McpConnectionSuggestion.js +9 -1
- package/dist/client/sse-event-processor.d.ts +4 -2
- package/dist/client/sse-event-processor.js +46 -6
- package/dist/client/use-chat-models.js +156 -80
- package/dist/client/use-run-stuck-detection.d.ts +2 -0
- package/dist/client/use-run-stuck-detection.js +85 -9
- package/dist/collab/awareness.d.ts +2 -2
- package/dist/collab/routes.d.ts +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/integrations/adapters/slack.d.ts +0 -4
- package/dist/integrations/adapters/slack.js +6 -30
- package/dist/integrations/catalog.js +1 -1
- package/dist/integrations/pending-tasks-store.d.ts +0 -8
- package/dist/integrations/pending-tasks-store.js +0 -21
- package/dist/integrations/slack-manifest.d.ts +2 -2
- package/dist/integrations/slack-manifest.js +0 -3
- package/dist/integrations/webhook-handler.js +1 -1
- package/dist/mcp/screen-memory-stdio.d.ts +7 -7
- package/dist/observability/routes.d.ts +3 -3
- package/dist/provider-api/actions/custom-provider-registration.d.ts +4 -4
- package/dist/provider-api/actions/provider-api.d.ts +8 -8
- package/dist/scripts/docs/source-search.js +2 -2
- package/dist/server/agent-chat/framework-prompts.js +7 -2
- package/dist/server/agent-chat/prompt-resources.js +2 -2
- package/dist/server/agent-chat/skill-frontmatter.d.ts +31 -2
- package/dist/server/agent-chat/skill-frontmatter.js +41 -15
- package/dist/server/agent-chat-plugin.js +3 -3
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/agents-bundle.d.ts +16 -19
- package/dist/server/agents-bundle.js +19 -35
- package/dist/server/auth.js +262 -31
- package/dist/server/better-auth-instance.d.ts +1 -0
- package/dist/server/better-auth-instance.js +17 -2
- package/dist/server/onboarding-html.js +56 -9
- package/dist/server/prompts/framework-core-compact.d.ts +6 -1
- package/dist/server/prompts/framework-core-compact.js +12 -9
- package/dist/server/prompts/framework-core.d.ts +6 -1
- package/dist/server/prompts/framework-core.js +11 -9
- package/dist/server/prompts/index.d.ts +1 -1
- package/dist/server/prompts/index.js +1 -1
- package/dist/server/prompts/shared-rules.d.ts +15 -11
- package/dist/server/prompts/shared-rules.js +17 -13
- package/dist/server/realtime-token.d.ts +1 -1
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/dist/shared/reasoning-effort.d.ts +8 -8
- package/dist/shared/reasoning-effort.js +10 -10
- package/dist/shared/streaming-text-smoothing.js +41 -11
- package/dist/styles/agent-native.css +19 -32
- package/dist/templates/chat/.agents/skills/actions/SKILL.md +54 -488
- package/dist/templates/chat/.agents/skills/actions/references/action-fields.md +136 -0
- package/dist/templates/chat/.agents/skills/actions/references/examples.md +94 -0
- package/dist/templates/chat/.agents/skills/actions/references/provider-apis.md +95 -0
- package/dist/templates/chat/.agents/skills/create-skill/SKILL.md +9 -35
- package/dist/templates/chat/.agents/skills/frontend-design/SKILL.md +4 -5
- package/dist/templates/chat/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/dist/templates/chat/AGENTS.md +32 -80
- package/dist/templates/chat/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
- package/dist/templates/default/.agents/skills/actions/SKILL.md +54 -488
- package/dist/templates/default/.agents/skills/actions/references/action-fields.md +136 -0
- package/dist/templates/default/.agents/skills/actions/references/examples.md +94 -0
- package/dist/templates/default/.agents/skills/actions/references/provider-apis.md +95 -0
- package/dist/templates/default/.agents/skills/create-skill/SKILL.md +9 -35
- package/dist/templates/default/.agents/skills/frontend-design/SKILL.md +4 -5
- package/dist/templates/default/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/dist/templates/headless/.agents/skills/actions/SKILL.md +54 -488
- package/dist/templates/headless/.agents/skills/actions/references/action-fields.md +136 -0
- package/dist/templates/headless/.agents/skills/actions/references/examples.md +94 -0
- package/dist/templates/headless/.agents/skills/actions/references/provider-apis.md +95 -0
- package/dist/templates/headless/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/dist/templates/workspace-core/.agents/skills/actions/SKILL.md +54 -488
- package/dist/templates/workspace-core/.agents/skills/actions/references/action-fields.md +136 -0
- package/dist/templates/workspace-core/.agents/skills/actions/references/examples.md +94 -0
- package/dist/templates/workspace-core/.agents/skills/actions/references/provider-apis.md +95 -0
- package/dist/templates/workspace-core/.agents/skills/adding-workspace-apps/SKILL.md +1 -0
- package/dist/templates/workspace-core/.agents/skills/agent-page/SKILL.md +1 -0
- package/dist/templates/workspace-core/.agents/skills/create-skill/SKILL.md +9 -35
- package/dist/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +4 -5
- package/dist/templates/workspace-core/.agents/skills/recurring-jobs/SKILL.md +21 -29
- package/dist/templates/workspace-core/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/dist/templates/workspace-core/.agents/skills/workspace-conventions/SKILL.md +7 -17
- package/dist/templates/workspace-core/.agents/skills/writing-agent-instructions/SKILL.md +3 -3
- package/dist/templates/workspace-core/AGENTS.md +7 -16
- package/docs/content/messaging.mdx +6 -7
- package/docs/content/template-chat.mdx +1 -1
- package/package.json +2 -2
- package/src/templates/chat/.agents/skills/actions/SKILL.md +54 -488
- package/src/templates/chat/.agents/skills/actions/references/action-fields.md +136 -0
- package/src/templates/chat/.agents/skills/actions/references/examples.md +94 -0
- package/src/templates/chat/.agents/skills/actions/references/provider-apis.md +95 -0
- package/src/templates/chat/.agents/skills/create-skill/SKILL.md +9 -35
- package/src/templates/chat/.agents/skills/frontend-design/SKILL.md +4 -5
- package/src/templates/chat/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/src/templates/chat/AGENTS.md +32 -80
- package/src/templates/chat/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
- package/src/templates/default/.agents/skills/actions/SKILL.md +54 -488
- package/src/templates/default/.agents/skills/actions/references/action-fields.md +136 -0
- package/src/templates/default/.agents/skills/actions/references/examples.md +94 -0
- package/src/templates/default/.agents/skills/actions/references/provider-apis.md +95 -0
- package/src/templates/default/.agents/skills/create-skill/SKILL.md +9 -35
- package/src/templates/default/.agents/skills/frontend-design/SKILL.md +4 -5
- package/src/templates/default/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/src/templates/headless/.agents/skills/actions/SKILL.md +54 -488
- package/src/templates/headless/.agents/skills/actions/references/action-fields.md +136 -0
- package/src/templates/headless/.agents/skills/actions/references/examples.md +94 -0
- package/src/templates/headless/.agents/skills/actions/references/provider-apis.md +95 -0
- package/src/templates/headless/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/src/templates/workspace-core/.agents/skills/actions/SKILL.md +54 -488
- package/src/templates/workspace-core/.agents/skills/actions/references/action-fields.md +136 -0
- package/src/templates/workspace-core/.agents/skills/actions/references/examples.md +94 -0
- package/src/templates/workspace-core/.agents/skills/actions/references/provider-apis.md +95 -0
- package/src/templates/workspace-core/.agents/skills/adding-workspace-apps/SKILL.md +1 -0
- package/src/templates/workspace-core/.agents/skills/agent-page/SKILL.md +1 -0
- package/src/templates/workspace-core/.agents/skills/create-skill/SKILL.md +9 -35
- package/src/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +4 -5
- package/src/templates/workspace-core/.agents/skills/recurring-jobs/SKILL.md +21 -29
- package/src/templates/workspace-core/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/src/templates/workspace-core/.agents/skills/workspace-conventions/SKILL.md +7 -17
- package/src/templates/workspace-core/.agents/skills/writing-agent-instructions/SKILL.md +3 -3
- package/src/templates/workspace-core/AGENTS.md +7 -16
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# Action Field Reference
|
|
2
|
+
|
|
3
|
+
Full detail on the less-common `defineAction` fields and automatic behaviors.
|
|
4
|
+
Read this when you need output validation, authorization, human approval,
|
|
5
|
+
image results, or the exact rules for the auto-refresh behavior — the happy
|
|
6
|
+
path in SKILL.md doesn't need any of these.
|
|
7
|
+
|
|
8
|
+
## Screen Refresh (automatic)
|
|
9
|
+
|
|
10
|
+
The framework auto-refreshes the UI after any successful mutating action. On completion of a non-`GET` action, the framework emits a change event with `source: "action"` that the client's `useDbSync` picks up and uses to invalidate `["action"]` React Query keys — so `list-*` / `get-*` hooks refetch without a full page reload. In-process calls emit directly; dev-mode `pnpm action ...` calls also write a durable marker so the web server sees child-process action changes.
|
|
11
|
+
|
|
12
|
+
Rules:
|
|
13
|
+
|
|
14
|
+
- `http: { method: "GET" }` → read-only, does NOT trigger a refresh (inferred automatically).
|
|
15
|
+
- Any other action (default `POST`, `PUT`, `DELETE`, or `http: false`) → treated as mutating, triggers a refresh on success.
|
|
16
|
+
- To override the inference on an unusual action (e.g. a `POST` that only reads), pass `readOnly: true` on the action definition.
|
|
17
|
+
- To let a mutating action run concurrently with other same-turn tool calls, pass `parallelSafe: true`. Only do this when the action is internally concurrency-safe and order-independent (for example, it uses an app-level lock or idempotent upsert semantics). Mutating actions remain serialized by default.
|
|
18
|
+
|
|
19
|
+
Agents do NOT need to call `refresh-screen` after a normal action — it's already handled. `refresh-screen` is only needed when the agent mutates data via a path the framework can't see (e.g. writing to an external system the app mirrors) or when the agent wants to pass a `scope` hint for narrower invalidation.
|
|
20
|
+
|
|
21
|
+
## Returning Images the Agent Can See (`_agentImages`)
|
|
22
|
+
|
|
23
|
+
An action's return object may include the well-known optional field
|
|
24
|
+
`_agentImages` to attach vision images (screenshots, chart previews, rendered
|
|
25
|
+
designs) to the tool result. The agent literally sees them — enabling visual
|
|
26
|
+
self-review loops — while the field itself is stripped from the JSON text the
|
|
27
|
+
model reads.
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
run: async ({ dashboardId }) => {
|
|
31
|
+
const shot = await renderDashboardPng(dashboardId); // Buffer
|
|
32
|
+
return {
|
|
33
|
+
dashboardId,
|
|
34
|
+
panelCount: 6,
|
|
35
|
+
_agentImages: [
|
|
36
|
+
// Either a public https URL (preferred — the provider fetches it)…
|
|
37
|
+
{ url: "https://cdn.example.com/previews/dash-1.png", label: "overview" },
|
|
38
|
+
// …or base64 without a data: prefix (mediaType required; a full
|
|
39
|
+
// data:image/png;base64,… URL in `data` is also accepted and parsed).
|
|
40
|
+
{ data: shot.toString("base64"), mediaType: "image/png" },
|
|
41
|
+
],
|
|
42
|
+
};
|
|
43
|
+
},
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Rules and limits:
|
|
47
|
+
|
|
48
|
+
- Shape: `Array<{ url?: string; data?: string; mediaType?: string; label?: string }>`.
|
|
49
|
+
Each entry needs `url` (https only) **or** `data`. Supported media types:
|
|
50
|
+
`image/jpeg`, `image/png`, `image/gif`, `image/webp`.
|
|
51
|
+
- Caps: max **4 images** per result; max **~2MB of base64** per image.
|
|
52
|
+
Over-cap or invalid entries never fail the call — they become text notes in
|
|
53
|
+
the result telling the model what was dropped and why.
|
|
54
|
+
- Persistence: the run ledger stores only the string result plus compact
|
|
55
|
+
`[image: …]` notes (URLs verbatim; base64 as a byte-count placeholder) —
|
|
56
|
+
never the payload. Images are re-attached only for the live turn; replayed
|
|
57
|
+
history is text-only, so prefer stable `url` images the model can re-request.
|
|
58
|
+
- Engine support: native Anthropic and vision-capable AI-SDK providers
|
|
59
|
+
(anthropic, openai, google, openrouter) receive real image blocks; other
|
|
60
|
+
paths (Builder gateway, non-vision providers) degrade to the text notes.
|
|
61
|
+
- External MCP tools need no changes — standard MCP `image` content parts are
|
|
62
|
+
converted automatically under the same caps.
|
|
63
|
+
|
|
64
|
+
## Validating Return Values (`outputSchema`)
|
|
65
|
+
|
|
66
|
+
`schema` validates inputs; `outputSchema` validates what the action **returns**. Pass any Standard Schema-compatible schema (Zod, Valibot, ArkType) and the framework validates the result _after_ `run()` resolves — input validated before `run`, output after.
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
export default defineAction({
|
|
70
|
+
description: "Summarize a thread.",
|
|
71
|
+
schema: z.object({ threadId: z.string() }),
|
|
72
|
+
outputSchema: z.object({ summary: z.string(), messageCount: z.number() }),
|
|
73
|
+
outputErrorStrategy: "warn", // default; "strict" | "fallback"
|
|
74
|
+
// outputFallback: { summary: "", messageCount: 0 }, // used only by "fallback"
|
|
75
|
+
run: async ({ threadId }) => {
|
|
76
|
+
/* ... */
|
|
77
|
+
},
|
|
78
|
+
});
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
- `"warn"` (default) — `console.warn` the issues and return the **original** result unchanged. Non-breaking.
|
|
82
|
+
- `"strict"` — throw a clear error so a buggy action surfaces loudly.
|
|
83
|
+
- `"fallback"` — return `outputFallback` in place of the invalid result.
|
|
84
|
+
|
|
85
|
+
On success the validated value is returned, so coercion/defaults on `outputSchema` apply. Omit `outputSchema` and behavior is byte-for-byte unchanged (no wrapping).
|
|
86
|
+
|
|
87
|
+
## Authorization (`authorize`)
|
|
88
|
+
|
|
89
|
+
`authorize` decides whether the caller may run the action at all. It wraps
|
|
90
|
+
`run`, so it holds at **all six dispatch sites** — agent tool, HTTP, frontend
|
|
91
|
+
hook, MCP, A2A, CLI — unlike `needsApproval`, which is honoured only in the
|
|
92
|
+
agent loop. Use `authorize` for "not everyone may do this"; use `needsApproval`
|
|
93
|
+
to ask a human to bless one call a permitted caller is already allowed to make.
|
|
94
|
+
|
|
95
|
+
```ts
|
|
96
|
+
import { coachAccess } from "../lib/access.js"; // defineAppRoles(...)
|
|
97
|
+
|
|
98
|
+
export default defineAction({
|
|
99
|
+
description: "Archive a client roster.",
|
|
100
|
+
schema: z.object({ id: z.string() }),
|
|
101
|
+
authorize: coachAccess.requireAny("coach-admin"),
|
|
102
|
+
run: async (args) => {
|
|
103
|
+
/* ... */
|
|
104
|
+
},
|
|
105
|
+
});
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
The wrappers compose as `validate input -> authorize -> run -> validate output
|
|
109
|
+
-> audit`: the gate sits inside input validation, so a guard reading `args` gets
|
|
110
|
+
the parsed, coerced value, and auditing is outermost, so denials are recorded.
|
|
111
|
+
|
|
112
|
+
A guard that throws denies with its own message; returning `false` denies
|
|
113
|
+
generically; anything else (including `undefined`) allows. A guarded action
|
|
114
|
+
needs a user identity, so an unattended CLI/cron caller with no user email is
|
|
115
|
+
denied. `authorize` gates the operation; `accessFilter` / `assertAccess` still
|
|
116
|
+
scope which rows a permitted caller may touch. See the `authentication` skill
|
|
117
|
+
for `defineAppRoles` and the `sharing` skill for row scoping.
|
|
118
|
+
|
|
119
|
+
## Human-in-the-Loop Approval (`needsApproval`)
|
|
120
|
+
|
|
121
|
+
For high-consequence, outward-facing, hard-to-undo actions (sending an email, charging a card, deleting an account), set `needsApproval` so the agent **cannot** run the action without a human approving the specific call:
|
|
122
|
+
|
|
123
|
+
```ts
|
|
124
|
+
export default defineAction({
|
|
125
|
+
description: "Send an email via Gmail.",
|
|
126
|
+
schema: z.object({ to: z.string(), subject: z.string(), body: z.string() }),
|
|
127
|
+
needsApproval: true, // boolean, or (args, ctx) => boolean | Promise<boolean>
|
|
128
|
+
run: async (args) => {
|
|
129
|
+
/* ...actually send... */
|
|
130
|
+
},
|
|
131
|
+
});
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
When the gate is truthy and the call isn't yet approved, the loop emits an `approval_required` event and **stops the turn — `run()` never executes**. A predicate gates conditionally (e.g. only external recipients) and **fails closed**: a throw is treated as "approval required". The human approves via the chat UI's Approve affordance, which re-issues the turn with the call's `approvalKey`, and only then does the action run.
|
|
135
|
+
|
|
136
|
+
**Keep approvals rare** — the default is off and almost every action should leave it off. The canonical example is Mail's `send-email` (`needsApproval: true`). See the `security` skill and the Human Approval doc.
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Extra Examples, Legacy Pattern, and the Audit Script
|
|
2
|
+
|
|
3
|
+
Read this for a second worked example beyond the one in SKILL.md, for the
|
|
4
|
+
older bare-export action format you may find in existing code, or for the
|
|
5
|
+
advisory dead-action audit tool.
|
|
6
|
+
|
|
7
|
+
## Common Patterns
|
|
8
|
+
|
|
9
|
+
**Read action (GET):**
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { z } from "zod";
|
|
13
|
+
import { defineAction } from "@agent-native/core/action";
|
|
14
|
+
|
|
15
|
+
export default defineAction({
|
|
16
|
+
description: "List calendar events",
|
|
17
|
+
schema: z.object({
|
|
18
|
+
from: z.string().describe("Start date"),
|
|
19
|
+
to: z.string().describe("End date"),
|
|
20
|
+
}),
|
|
21
|
+
http: { method: "GET" },
|
|
22
|
+
run: async (args) => {
|
|
23
|
+
return await fetchEvents(args.from, args.to);
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
**Write action (POST, default):**
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
import { z } from "zod";
|
|
32
|
+
import { defineAction } from "@agent-native/core/action";
|
|
33
|
+
|
|
34
|
+
export default defineAction({
|
|
35
|
+
description: "Log a meal",
|
|
36
|
+
schema: z.object({
|
|
37
|
+
name: z.string().describe("Meal name"),
|
|
38
|
+
calories: z.coerce.number().describe("Calorie count"),
|
|
39
|
+
}),
|
|
40
|
+
run: async (args) => {
|
|
41
|
+
// args.calories is a number — z.coerce.number() handles string-to-number conversion from HTTP
|
|
42
|
+
const meal = await insertMeal(args);
|
|
43
|
+
return meal;
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**Agent-only action:**
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
import { z } from "zod";
|
|
52
|
+
import { defineAction } from "@agent-native/core/action";
|
|
53
|
+
|
|
54
|
+
export default defineAction({
|
|
55
|
+
description: "Navigate the UI to a view",
|
|
56
|
+
schema: z.object({
|
|
57
|
+
view: z.string().describe("Target view"),
|
|
58
|
+
}),
|
|
59
|
+
http: false,
|
|
60
|
+
run: async (args) => {
|
|
61
|
+
await writeAppState("navigate", { command: "go", view: args.view });
|
|
62
|
+
return "Navigated";
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Legacy `parameters` Field
|
|
68
|
+
|
|
69
|
+
Before Standard Schema support, `defineAction` took a plain JSON Schema object via `parameters` instead of a Zod `schema`. It still works — the action is still callable — but skips runtime validation and TypeScript inference. Migrate to `schema: z.object({...})` when you touch one of these.
|
|
70
|
+
|
|
71
|
+
## Legacy Pattern (bare export)
|
|
72
|
+
|
|
73
|
+
Older actions use a bare async function export with `parseArgs`:
|
|
74
|
+
|
|
75
|
+
```ts
|
|
76
|
+
import { parseArgs, loadEnv, fail } from "@agent-native/core";
|
|
77
|
+
|
|
78
|
+
export default async function myAction(args: string[]) {
|
|
79
|
+
loadEnv();
|
|
80
|
+
const parsed = parseArgs(args);
|
|
81
|
+
// ...
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
This still works but is not auto-exposed as HTTP. Prefer `defineAction` for all new actions.
|
|
86
|
+
|
|
87
|
+
## Audit Script (Advisory)
|
|
88
|
+
|
|
89
|
+
`pnpm actions:audit [template ...]` (or `node scripts/audit-template-actions.mjs`) statically scans a template's `actions/` and prints two kinds of suggestions:
|
|
90
|
+
|
|
91
|
+
1. **Likely UI-dead** — HTTP-exposed mutating actions whose name is never referenced under `app/` (candidates to delete or mark `agentTool: false`).
|
|
92
|
+
2. **Likely redundant clusters** — groups like `update-foo-name` / `update-foo-order` that could collapse into one orthogonal `update-foo`.
|
|
93
|
+
|
|
94
|
+
It is **advisory only**: it always exits 0, never fails CI, and uses conservative heuristics, so expect some false positives (e.g. an action the agent calls but the UI doesn't). Use it as a prompt to review, not a gate.
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# Provider API Integrations
|
|
2
|
+
|
|
3
|
+
Read this when an action needs to call an external provider API — HubSpot,
|
|
4
|
+
Gong, Slack, any credentialed third-party service — for ad hoc analysis,
|
|
5
|
+
querying, reporting, or cross-source research.
|
|
6
|
+
|
|
7
|
+
For provider integrations used in ad hoc analysis, querying, reporting, or
|
|
8
|
+
cross-source research, do not hardcode every provider endpoint as a separate
|
|
9
|
+
rigid action and do not encode one lookback window, filter shape, or pagination
|
|
10
|
+
strategy as the only path the agent can take. Expose the shared provider API
|
|
11
|
+
action trio instead:
|
|
12
|
+
|
|
13
|
+
- `provider-api-catalog`: lists provider base URLs, auth style, credential keys,
|
|
14
|
+
docs/spec URLs, placeholders, and examples without exposing secrets.
|
|
15
|
+
- `provider-api-docs`: fetches public provider docs/spec/changelog URLs when
|
|
16
|
+
the exact endpoint, filter operator, payload shape, or pagination contract is
|
|
17
|
+
uncertain. Registered docs URLs are curated starting points. Use
|
|
18
|
+
`responseMode: "markdown"` for clean readable docs, or
|
|
19
|
+
`responseMode: "matches"` with `search: { query | terms | regex }` for
|
|
20
|
+
compact snippets instead of flooding context with raw HTML.
|
|
21
|
+
- `provider-api-request`: makes a constrained authenticated HTTP request to the
|
|
22
|
+
provider host, injects configured credentials, blocks private/internal URLs,
|
|
23
|
+
and redacts secrets.
|
|
24
|
+
|
|
25
|
+
Use `@agent-native/core/provider-api` as the shared substrate, and build these
|
|
26
|
+
actions as thin factory imports rather than copying `defineAction` schemas and
|
|
27
|
+
handlers into each template:
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
import {
|
|
31
|
+
createProviderApiCatalogAction,
|
|
32
|
+
createProviderApiDocsAction,
|
|
33
|
+
createProviderApiRequestAction,
|
|
34
|
+
} from "@agent-native/core/provider-api/actions/provider-api";
|
|
35
|
+
import {
|
|
36
|
+
createDeleteStagedDatasetAction,
|
|
37
|
+
createListStagedDatasetsAction,
|
|
38
|
+
createQueryStagedDatasetAction,
|
|
39
|
+
} from "@agent-native/core/provider-api/actions/staged-datasets";
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Pass the app's existing provider runtime to the provider factories, and pass
|
|
43
|
+
its app id to the staged-dataset factories. Keep app-specific descriptions,
|
|
44
|
+
provider allow-lists, HTTP/tool-callability settings, and credential adapters
|
|
45
|
+
as factory options. Only add a thin credential adapter when the app has
|
|
46
|
+
app-specific credential lookup rules. If the app stores a built-in provider's
|
|
47
|
+
OAuth grant under a narrower local provider id, use the runtime's
|
|
48
|
+
`oauthProviderOverrides` instead of duplicating provider config. If credentials
|
|
49
|
+
are stored on shareable/resource rows rather than in the shared credential or
|
|
50
|
+
OAuth-token stores, build a resolver that enforces those access checks before
|
|
51
|
+
exposing raw provider requests. Keep `provider-api-request` `http: false`
|
|
52
|
+
unless a separate UI permission model authorizes arbitrary provider writes.
|
|
53
|
+
Specific actions such as `search-records`, `search-emails`, or `sync-source`
|
|
54
|
+
are convenience shortcuts, not capability limits; agents should fall back to
|
|
55
|
+
the provider API trio when a question requires an endpoint or filter that the
|
|
56
|
+
shortcut does not model.
|
|
57
|
+
|
|
58
|
+
This is a framework tenet. The safety boundary should be provider host
|
|
59
|
+
allow-listing, credential scoping, auth injection, private-network blocking,
|
|
60
|
+
secret redaction, and user/org access checks, not an artificially small set of
|
|
61
|
+
hand-authored read actions. If the upstream provider API supports a capability,
|
|
62
|
+
the agent should normally be able to reach it through `provider-api-request`
|
|
63
|
+
with the user's configured credentials. For large responses, expose staging
|
|
64
|
+
(`stageAs`, `itemsPath`, pagination, and `query-staged-dataset`) or sandboxed
|
|
65
|
+
code execution so the agent can reduce data without flooding context.
|
|
66
|
+
|
|
67
|
+
For broad provider questions, cross-source joins, corpus-wide mention/search
|
|
68
|
+
work, classification, or any answer where absence matters, design the action
|
|
69
|
+
surface for full coverage instead of convenience-only samples. The agent should
|
|
70
|
+
be able to fetch every relevant page or an explicitly bounded cohort, stage or
|
|
71
|
+
save the raw provider response outside chat, and then use
|
|
72
|
+
`query-staged-dataset`, `run-code`, or provider-side search to count, join,
|
|
73
|
+
grep, classify, and aggregate. Tool descriptions and AGENTS.md guidance should
|
|
74
|
+
teach agents to report source, filters, time window, row/record counts,
|
|
75
|
+
pagination status, truncation, failed pages, and uncovered gaps. They must not
|
|
76
|
+
turn default limits, sampled rows, truncated excerpts, or aborted calls into a
|
|
77
|
+
confident "none found", "all records", or exhaustive conclusion.
|
|
78
|
+
|
|
79
|
+
For public web pages and docs, prefer the token-efficient path: `web-search`
|
|
80
|
+
to find likely URLs, `web-request` or `provider-api-docs` with clean
|
|
81
|
+
`responseMode` output to read a page, and `run-code` with `webRead()` /
|
|
82
|
+
`webFetch()` when you need to grep, aggregate, or compare many pages before
|
|
83
|
+
returning a small result.
|
|
84
|
+
|
|
85
|
+
For LONG compute, `run-code` supports durable background executions: pass
|
|
86
|
+
`background: true` and the code is enqueued to a `sandbox_executions` row and
|
|
87
|
+
executed out-of-band with a generous budget (default 10 min), surviving the
|
|
88
|
+
hosted agent run's ~40s soft timeout. The call returns
|
|
89
|
+
`{ executionId, status: "queued" }` immediately with polling guidance; check
|
|
90
|
+
progress with `run-code` `{ executionId }` (or the `get-code-execution` tool
|
|
91
|
+
where registered) — results persist after completion. Use background for big
|
|
92
|
+
cross-source joins, multi-page provider sweeps, and heavy analysis scripts;
|
|
93
|
+
keep quick scripts in the default foreground mode. Agents should continue
|
|
94
|
+
other work between polls, and on `failed`/`timed_out` split the computation or
|
|
95
|
+
persist intermediate progress with `workspaceWrite` and re-run.
|
|
@@ -36,7 +36,6 @@ Before writing the skill, answer these:
|
|
|
36
36
|
or application state (see the **adding-a-feature** skill). Most skills are
|
|
37
37
|
about how to touch one or more of these correctly.
|
|
38
38
|
3. **When should it trigger?** — Describe the situations in natural language.
|
|
39
|
-
Be slightly pushy — over-triggering is better than under-triggering.
|
|
40
39
|
4. **Does it involve context awareness?** — Does the agent need to know what the
|
|
41
40
|
user is looking at? If so, reference the `navigation` application-state key and
|
|
42
41
|
the `view-screen` action pattern. See the **context-awareness** skill.
|
|
@@ -151,44 +150,21 @@ description: >-
|
|
|
151
150
|
- Workflow/generator skills: verb-noun (`create-skill`, `capture-learnings`).
|
|
152
151
|
- The directory name must match the `name` in frontmatter.
|
|
153
152
|
|
|
154
|
-
##
|
|
153
|
+
## Frontmatter Fields
|
|
155
154
|
|
|
156
|
-
|
|
155
|
+
| Field | Required | Value |
|
|
156
|
+
| ------------- | -------- | --------------------------------------------- |
|
|
157
|
+
| `name` | yes | Hyphen-case, matches the directory name |
|
|
158
|
+
| `description` | yes | What the skill covers AND when it triggers |
|
|
159
|
+
| `scope` | no | `both` (default) \| `runtime` \| `dev` |
|
|
157
160
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
- `runtime` — loaded only by the in-app runtime agent.
|
|
161
|
-
- `dev` — meant for the human's coding agent (e.g. Claude Code) only. **Excluded
|
|
162
|
-
from the runtime agent everywhere**: not in the system-prompt skills block and
|
|
163
|
-
not in `docs-search` results.
|
|
164
|
-
|
|
165
|
-
Use `scope: dev` for internal-only skills that should guide connected repo
|
|
166
|
-
agents such as Codex or Claude Code, but should not affect the deployed
|
|
167
|
-
production agent. Do not use `metadata.internal` for runtime visibility; that
|
|
168
|
-
field is catalog/package metadata and is intentionally not treated as
|
|
169
|
-
production exclusion.
|
|
170
|
-
|
|
171
|
-
```markdown
|
|
172
|
-
---
|
|
173
|
-
name: release-checklist
|
|
174
|
-
description: >-
|
|
175
|
-
Steps for cutting a release. Use when preparing or publishing a new version.
|
|
176
|
-
scope: dev
|
|
177
|
-
---
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
Leave `scope` off for normal skills — the default (`both`) keeps them loading at
|
|
181
|
-
runtime, so this is fully backward compatible. To make a dev-only skill visible
|
|
182
|
-
to your coding agent but hidden from the runtime agent, mark it `scope: dev` and
|
|
183
|
-
optionally mirror it under `.claude/skills/<name>/SKILL.md` (Claude Code reads
|
|
184
|
-
`.claude/skills/` independently of the runtime's `.agents/skills/`).
|
|
161
|
+
For how to word a `description` and which `scope` a skill should get, follow
|
|
162
|
+
**writing-agent-instructions** — it owns those rules.
|
|
185
163
|
|
|
186
164
|
## Tips
|
|
187
165
|
|
|
188
|
-
- **Keep descriptions under 40 words** — they load into context on every
|
|
189
|
-
conversation. State what the skill does AND when to trigger it.
|
|
190
166
|
- **Keep SKILL.md lean (under ~500 lines)** — move detailed content to
|
|
191
|
-
`references/` files
|
|
167
|
+
`references/` files.
|
|
192
168
|
- **Use standard markdown headings** — no XML tags or custom formats.
|
|
193
169
|
|
|
194
170
|
## Anti-Patterns
|
|
@@ -198,8 +174,6 @@ optionally mirror it under `.claude/skills/<name>/SKILL.md` (Claude Code reads
|
|
|
198
174
|
- **Introducing databases** — data lives in SQL via Drizzle (see **storing-data**).
|
|
199
175
|
- **Ignoring sync** — if a skill creates data, mention wiring `useDbSync` /
|
|
200
176
|
`useActionQuery` so the UI updates (see **real-time-sync**).
|
|
201
|
-
- **Vague descriptions** — "Helps with development" won't trigger. Be specific
|
|
202
|
-
about _when_.
|
|
203
177
|
- **Pure documentation** — skills should guide action, not just explain concepts.
|
|
204
178
|
|
|
205
179
|
## File Structure
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: frontend-design
|
|
3
3
|
description: >-
|
|
4
|
-
Sets the visual direction for
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
look good"). Do not load it only for purely mechanical wiring or formatting.
|
|
4
|
+
Sets the visual direction for UI work, avoiding generic AI aesthetics. Use
|
|
5
|
+
for any user-facing UI change: new surfaces, screenshot-driven feedback,
|
|
6
|
+
copy/density cleanup, settings, control placement, or a "make this look
|
|
7
|
+
good" pass. Do not load it only for purely mechanical wiring or formatting.
|
|
9
8
|
scope: dev
|
|
10
9
|
license: Complete terms in LICENSE.txt
|
|
11
10
|
source: https://github.com/anthropics/skills/blob/main/skills/frontend-design/SKILL.md
|
|
@@ -151,43 +151,30 @@ Generated apps must follow the shared Agent-Native surface model:
|
|
|
151
151
|
- Use the right `AgentSidebar` for contextual AI. Every button-triggered
|
|
152
152
|
`sendToAgentChat` handoff should open or focus that sidebar and keep the user
|
|
153
153
|
on the current domain page.
|
|
154
|
-
- Use a sans-first SaaS hierarchy for the app shell. Choose a named visual
|
|
155
|
-
direction in `DESIGN.md` before styling: product mode, audience, palette
|
|
156
|
-
family, type treatment, composition, shape language, and anti-references.
|
|
157
|
-
One restrained editorial cue is welcome, but warm beige plus terracotta is
|
|
158
|
-
not the default and serif type belongs in content previews or a deliberate
|
|
159
|
-
brand moment rather than the whole tool.
|
|
160
|
-
- Preserve existing brand tokens. For a new unbranded app, choose a
|
|
161
|
-
product-fitting palette family and compare sibling apps before reusing their
|
|
162
|
-
accent. Keep shared semantic tokens and Agent-Native behavior consistent
|
|
163
|
-
while varying the visual world, density, composition, and shape language.
|
|
164
|
-
- Give the AgentSidebar a subtle surface or divider boundary so it is visually
|
|
165
|
-
distinct from the domain page without becoming a heavy panel wall.
|
|
166
154
|
- Every AI-labeled button must actually call `sendToAgentChat` with bounded
|
|
167
|
-
context and `openSidebar: true`.
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
context. Pin the versions compatible with the installed core/toolkit peer
|
|
172
|
-
graph, and add Vite dedupe/aliases when linked or transitive packages resolve
|
|
173
|
-
duplicate assistant-ui modules. Verify a fresh AI handoff has no
|
|
174
|
-
`AssistantUiStaleIndexErrorBoundary` or stale-index console error.
|
|
155
|
+
context and `openSidebar: true`. Label deterministic local actions as local,
|
|
156
|
+
preview, or analyze instead of AI.
|
|
157
|
+
- Never use sparkle, wand, magic, robot, or similar decorative AI icons. Use a
|
|
158
|
+
message or neutral action icon, or no icon when the button label is enough.
|
|
175
159
|
- Make the left navigation describe domain destinations. Chat is a separate
|
|
176
160
|
destination, not the label for every app page.
|
|
177
161
|
- Start with one primary action and one compact state. Put setup choices,
|
|
178
162
|
advanced inputs, diagnostics, and long explanations behind progressive
|
|
179
163
|
disclosure or later workflow steps.
|
|
180
|
-
-
|
|
181
|
-
|
|
182
|
-
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
-
|
|
189
|
-
|
|
190
|
-
|
|
164
|
+
- Choose a named visual direction in `DESIGN.md` before styling and build to it.
|
|
165
|
+
Preserve existing brand tokens; a new unbranded app picks its own
|
|
166
|
+
product-fitting palette rather than inheriting a sibling app's accent.
|
|
167
|
+
- Standalone apps that render `AgentSidebar` must keep one assistant-ui runtime
|
|
168
|
+
context. Pin the versions compatible with the installed core/toolkit peer
|
|
169
|
+
graph, and add Vite dedupe/aliases when linked or transitive packages resolve
|
|
170
|
+
duplicate assistant-ui modules. Verify a fresh AI handoff has no
|
|
171
|
+
`AssistantUiStaleIndexErrorBoundary` or stale-index console error.
|
|
172
|
+
- Before handoff, inspect the first viewport and remove the text density,
|
|
173
|
+
repeated cards, unrelated forms, and generic helper copy the user does not
|
|
174
|
+
need until the next decision.
|
|
175
|
+
|
|
176
|
+
In a local code-agent runtime, read `frontend-design` for the visual direction
|
|
177
|
+
contract, aesthetic guidelines, and named review passes behind these rules.
|
|
191
178
|
|
|
192
179
|
## 1. Extract the workflow
|
|
193
180
|
|
|
@@ -6,11 +6,6 @@ actions and shared state.
|
|
|
6
6
|
|
|
7
7
|
## Skills
|
|
8
8
|
|
|
9
|
-
Before building common workspace or agent UI, read `agent-native-toolkit` to
|
|
10
|
-
inventory existing public kits and installed package seams. Use
|
|
11
|
-
`customizing-agent-native` for the configure → compose → eject → propose seam
|
|
12
|
-
ladder.
|
|
13
|
-
|
|
14
9
|
Read the matching skill before deeper work:
|
|
15
10
|
|
|
16
11
|
- `brain` — ingestion, distillation, retrieval, and review flows, the
|
|
@@ -24,13 +19,6 @@ Read the matching skill before deeper work:
|
|
|
24
19
|
worker, scheduled sync, Slack rollout, demo/eval, ingest payloads); read it
|
|
25
20
|
only when operating or debugging internals. It is a file inside the `brain`
|
|
26
21
|
skill, not its own skill slug.
|
|
27
|
-
- `agent-native-toolkit` — check existing kits and package seams before
|
|
28
|
-
building workspace or agent UI.
|
|
29
|
-
- `customizing-agent-native` — the configure → compose → eject → propose seam
|
|
30
|
-
ladder.
|
|
31
|
-
- `adding-a-feature` — Brain feature changes.
|
|
32
|
-
- `actions`, `real-time-sync`, `security`, `frontend-design`, and `shadcn-ui`
|
|
33
|
-
for framework work; `actions` covers the shared provider API pattern.
|
|
34
22
|
|
|
35
23
|
## Core Rules
|
|
36
24
|
|
|
@@ -101,3 +89,8 @@ Read the matching skill before deeper work:
|
|
|
101
89
|
| `test-slack-connection` / `run-slack-pilot` | Slack validation and first-sync report. |
|
|
102
90
|
| `provider-api-catalog` / `provider-api-docs` / `provider-api-request` | Raw provider HTTP. |
|
|
103
91
|
| `run-demo-eval` / `run-retrieval-eval` / `seed-demo-data` | Demo corpus and eval checks. |
|
|
92
|
+
|
|
93
|
+
## Source Changes
|
|
94
|
+
|
|
95
|
+
Before building common workspace or agent UI, read `agent-native-toolkit`; read
|
|
96
|
+
`customizing-agent-native` before adapting shared UI.
|