@agent-native/core 0.149.2 → 0.149.4
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/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/global.css +1 -1
- 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-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-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/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/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/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-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/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/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-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/changelog/2026-08-11-plan-no-longer-reloads-when-runtime-state-changes.md +6 -0
- 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 +22 -25
- package/corpus/templates/slides/actions/get-deck-reference-context.ts +2 -2
- package/corpus/templates/slides/actions/get-deck.ts +57 -9
- package/corpus/templates/slides/actions/import-file.ts +2 -1
- package/corpus/templates/slides/actions/patch-deck.ts +45 -2
- 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 +428 -180
- package/corpus/templates/slides/app/components/editor/ExportMenu.tsx +294 -266
- package/corpus/templates/slides/app/components/editor/PromptDialog.tsx +7 -5
- package/corpus/templates/slides/app/components/editor/SlideContextToolbar.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/SlideEditor.tsx +40 -12
- 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/Sidebar.tsx +8 -10
- package/corpus/templates/slides/app/context/DeckContext.tsx +2 -1
- package/corpus/templates/slides/app/global.css +76 -1
- package/corpus/templates/slides/app/i18n/en-US.ts +1 -0
- package/corpus/templates/slides/app/lib/create-deck-generation.ts +51 -23
- package/corpus/templates/slides/app/lib/slide-animation-elements.ts +68 -5
- package/corpus/templates/slides/app/pages/DeckEditor.tsx +13 -6
- package/corpus/templates/slides/app/pages/DesignSystems.tsx +2 -2
- package/corpus/templates/slides/app/pages/Index.tsx +87 -74
- package/corpus/templates/slides/app/root.tsx +43 -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/validate-slide-animations.ts +163 -0
- package/corpus/templates/slides/server/plugins/agent-chat.ts +4 -3
- package/corpus/templates/slides/shared/api.ts +46 -15
- 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/dist/agent/production-agent.js +376 -345
- 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/client/AssistantChat.d.ts +6 -2
- package/dist/client/AssistantChat.js +216 -131
- package/dist/client/active-run-state.d.ts +9 -1
- package/dist/client/active-run-state.js +34 -3
- package/dist/client/agent-chat-adapter.d.ts +8 -0
- package/dist/client/agent-chat-adapter.js +114 -28
- package/dist/client/chat/message-components.d.ts +7 -1
- package/dist/client/chat/message-components.js +32 -5
- 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 +2 -0
- package/dist/client/chat/tool-call-display.js +2 -0
- package/dist/client/chat-first/apps-rail.js +1 -1
- package/dist/client/chat-first/chat-history.d.ts +1 -1
- package/dist/client/chat-first/chat-history.js +5 -2
- package/dist/client/sse-event-processor.d.ts +4 -2
- package/dist/client/sse-event-processor.js +36 -6
- package/dist/client/use-run-stuck-detection.d.ts +2 -0
- package/dist/client/use-run-stuck-detection.js +85 -9
- package/dist/collab/routes.d.ts +1 -1
- package/dist/deploy/build.d.ts +4 -0
- package/dist/deploy/build.js +5 -0
- package/dist/deploy/workspace-deploy.js +5 -0
- 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/notifications/routes.d.ts +3 -3
- 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/resources/handlers.d.ts +1 -1
- package/dist/scripts/docs/source-search.js +2 -2
- package/dist/secrets/routes.d.ts +9 -9
- 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/better-auth-instance.d.ts +1 -0
- package/dist/server/better-auth-instance.js +17 -2
- 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/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/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/package.json +1 -1
- 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/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
|
@@ -76,8 +76,8 @@ export declare function createCustomProviderRegistrationAction<TSchema extends Z
|
|
|
76
76
|
}>>;
|
|
77
77
|
}, z.core.$strip>>, {
|
|
78
78
|
id?: undefined;
|
|
79
|
-
provider?: undefined;
|
|
80
79
|
deleted?: undefined;
|
|
80
|
+
provider?: undefined;
|
|
81
81
|
providers: {
|
|
82
82
|
id: string;
|
|
83
83
|
label: string;
|
|
@@ -94,8 +94,8 @@ export declare function createCustomProviderRegistrationAction<TSchema extends Z
|
|
|
94
94
|
message?: undefined;
|
|
95
95
|
} | {
|
|
96
96
|
id?: undefined;
|
|
97
|
-
count?: undefined;
|
|
98
97
|
deleted?: undefined;
|
|
98
|
+
count?: undefined;
|
|
99
99
|
providers?: undefined;
|
|
100
100
|
found: boolean;
|
|
101
101
|
provider: import("../custom-registry.js").CustomProviderConfig;
|
|
@@ -103,9 +103,9 @@ export declare function createCustomProviderRegistrationAction<TSchema extends Z
|
|
|
103
103
|
label?: undefined;
|
|
104
104
|
message?: undefined;
|
|
105
105
|
} | {
|
|
106
|
+
deleted?: undefined;
|
|
106
107
|
count?: undefined;
|
|
107
108
|
provider?: undefined;
|
|
108
|
-
deleted?: undefined;
|
|
109
109
|
providers?: undefined;
|
|
110
110
|
found: boolean;
|
|
111
111
|
id: string;
|
|
@@ -123,9 +123,9 @@ export declare function createCustomProviderRegistrationAction<TSchema extends Z
|
|
|
123
123
|
label?: undefined;
|
|
124
124
|
message?: undefined;
|
|
125
125
|
} | {
|
|
126
|
+
deleted?: undefined;
|
|
126
127
|
count?: undefined;
|
|
127
128
|
provider?: undefined;
|
|
128
|
-
deleted?: undefined;
|
|
129
129
|
providers?: undefined;
|
|
130
130
|
found?: undefined;
|
|
131
131
|
registered: boolean;
|
|
@@ -311,8 +311,9 @@ export declare function createProviderApiActions(runtime: Pick<ProviderApiRuntim
|
|
|
311
311
|
notes?: string | undefined;
|
|
312
312
|
scope?: "org" | "user" | undefined;
|
|
313
313
|
}, {
|
|
314
|
-
|
|
314
|
+
message?: undefined;
|
|
315
315
|
id?: undefined;
|
|
316
|
+
deleted?: undefined;
|
|
316
317
|
providers: {
|
|
317
318
|
id: string;
|
|
318
319
|
label: string;
|
|
@@ -327,28 +328,28 @@ export declare function createProviderApiActions(runtime: Pick<ProviderApiRuntim
|
|
|
327
328
|
found?: undefined;
|
|
328
329
|
registered?: undefined;
|
|
329
330
|
label?: undefined;
|
|
330
|
-
message?: undefined;
|
|
331
331
|
} | {
|
|
332
|
-
|
|
332
|
+
message?: undefined;
|
|
333
333
|
count?: undefined;
|
|
334
334
|
id?: undefined;
|
|
335
|
+
deleted?: undefined;
|
|
335
336
|
providers?: undefined;
|
|
336
337
|
found: boolean;
|
|
337
338
|
provider: import("../custom-registry.js").CustomProviderConfig;
|
|
338
339
|
registered?: undefined;
|
|
339
340
|
label?: undefined;
|
|
340
|
-
message?: undefined;
|
|
341
341
|
} | {
|
|
342
|
-
|
|
342
|
+
message?: undefined;
|
|
343
343
|
count?: undefined;
|
|
344
|
+
deleted?: undefined;
|
|
344
345
|
providers?: undefined;
|
|
345
346
|
provider?: undefined;
|
|
346
347
|
found: boolean;
|
|
347
348
|
id: string;
|
|
348
349
|
registered?: undefined;
|
|
349
350
|
label?: undefined;
|
|
350
|
-
message?: undefined;
|
|
351
351
|
} | {
|
|
352
|
+
message?: undefined;
|
|
352
353
|
count?: undefined;
|
|
353
354
|
providers?: undefined;
|
|
354
355
|
provider?: undefined;
|
|
@@ -357,10 +358,9 @@ export declare function createProviderApiActions(runtime: Pick<ProviderApiRuntim
|
|
|
357
358
|
id: string;
|
|
358
359
|
registered?: undefined;
|
|
359
360
|
label?: undefined;
|
|
360
|
-
message?: undefined;
|
|
361
361
|
} | {
|
|
362
|
-
deleted?: undefined;
|
|
363
362
|
count?: undefined;
|
|
363
|
+
deleted?: undefined;
|
|
364
364
|
providers?: undefined;
|
|
365
365
|
provider?: undefined;
|
|
366
366
|
found?: undefined;
|
|
@@ -48,8 +48,8 @@ export declare function handleUpdateResource(event: any): Promise<import("./stor
|
|
|
48
48
|
}>;
|
|
49
49
|
/** DELETE /_agent-native/resources/:id — delete a resource */
|
|
50
50
|
export declare function handleDeleteResource(event: any): Promise<{
|
|
51
|
-
ok?: undefined;
|
|
52
51
|
error: string;
|
|
52
|
+
ok?: undefined;
|
|
53
53
|
} | {
|
|
54
54
|
error?: undefined;
|
|
55
55
|
ok: boolean;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
import fs from "node:fs";
|
|
16
16
|
import path from "node:path";
|
|
17
17
|
import { fileURLToPath } from "node:url";
|
|
18
|
-
import { parseSkillFrontmatter } from "../../server/agents-bundle.js";
|
|
18
|
+
import { isRuntimeVisibleScope, parseSkillFrontmatter, } from "../../server/agents-bundle.js";
|
|
19
19
|
import { isValidPath, parseArgs } from "../utils.js";
|
|
20
20
|
const MAX_FILE_BYTES = 1_000_000;
|
|
21
21
|
const MAX_READ_CHARS = 40_000;
|
|
@@ -155,7 +155,7 @@ function isRuntimeVisibleCorpusPath(corpusRoot, absolutePath) {
|
|
|
155
155
|
return true;
|
|
156
156
|
try {
|
|
157
157
|
const raw = fs.readFileSync(skillEntryPath, "utf-8");
|
|
158
|
-
return parseSkillFrontmatter(raw).scope
|
|
158
|
+
return isRuntimeVisibleScope(parseSkillFrontmatter(raw).scope);
|
|
159
159
|
}
|
|
160
160
|
catch {
|
|
161
161
|
return true;
|
package/dist/secrets/routes.d.ts
CHANGED
|
@@ -34,37 +34,37 @@ export declare function createListSecretsHandler(): import("h3").EventHandlerWit
|
|
|
34
34
|
/** POST /_agent-native/secrets/:key — write a secret. */
|
|
35
35
|
export declare function createWriteSecretHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
|
|
36
36
|
error: string;
|
|
37
|
-
ok?: undefined;
|
|
38
37
|
status?: undefined;
|
|
38
|
+
ok?: undefined;
|
|
39
39
|
} | {
|
|
40
|
-
error?: undefined;
|
|
41
40
|
ok: boolean;
|
|
42
41
|
status: string;
|
|
42
|
+
error?: undefined;
|
|
43
43
|
} | {
|
|
44
|
-
ok?: undefined;
|
|
45
44
|
error: string;
|
|
46
45
|
removed?: undefined;
|
|
46
|
+
ok?: undefined;
|
|
47
47
|
} | {
|
|
48
|
-
error?: undefined;
|
|
49
48
|
ok: boolean;
|
|
50
49
|
removed: boolean;
|
|
50
|
+
error?: undefined;
|
|
51
51
|
}>>;
|
|
52
52
|
/**
|
|
53
53
|
* POST /_agent-native/secrets/:key/test — validate an optional candidate value
|
|
54
54
|
* or the current stored value without changing anything.
|
|
55
55
|
*/
|
|
56
56
|
export declare function createTestSecretHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
|
|
57
|
-
ok?: undefined;
|
|
58
57
|
error: string;
|
|
59
58
|
note?: undefined;
|
|
59
|
+
ok?: undefined;
|
|
60
60
|
} | {
|
|
61
|
-
error?: undefined;
|
|
62
61
|
ok: boolean;
|
|
63
62
|
note?: undefined;
|
|
64
|
-
} | {
|
|
65
63
|
error?: undefined;
|
|
64
|
+
} | {
|
|
66
65
|
ok: boolean;
|
|
67
66
|
note: string;
|
|
67
|
+
error?: undefined;
|
|
68
68
|
} | {
|
|
69
69
|
note?: undefined;
|
|
70
70
|
ok: boolean;
|
|
@@ -95,11 +95,11 @@ export interface AdHocSecretPayload {
|
|
|
95
95
|
export declare function createAdHocSecretHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<AdHocSecretPayload[] | {
|
|
96
96
|
error: string;
|
|
97
97
|
} | {
|
|
98
|
-
error?: undefined;
|
|
99
98
|
ok: boolean;
|
|
100
99
|
key: string;
|
|
101
|
-
} | {
|
|
102
100
|
error?: undefined;
|
|
101
|
+
} | {
|
|
103
102
|
ok: boolean;
|
|
104
103
|
removed: boolean;
|
|
104
|
+
error?: undefined;
|
|
105
105
|
}>>;
|
|
@@ -22,6 +22,11 @@ import { lazyFs } from "./lazy-fs.js";
|
|
|
22
22
|
export function buildFrameworkPrompts(examples, options) {
|
|
23
23
|
const FRAMEWORK_CORE = buildFrameworkCore(examples, options);
|
|
24
24
|
const FRAMEWORK_CORE_COMPACT = buildFrameworkCoreCompact(examples, options);
|
|
25
|
+
// Dev agents edit source directly, so their copy of the core drops the
|
|
26
|
+
// production-only "hand code changes to Builder" sentence.
|
|
27
|
+
const devCoreOptions = { ...options, canEditSource: true };
|
|
28
|
+
const DEV_FRAMEWORK_CORE = buildFrameworkCore(examples, devCoreOptions);
|
|
29
|
+
const DEV_FRAMEWORK_CORE_COMPACT = buildFrameworkCoreCompact(examples, devCoreOptions);
|
|
25
30
|
const extensionToolsEnabled = options?.extensionTools === true;
|
|
26
31
|
const planModeArtifactList = extensionToolsEnabled
|
|
27
32
|
? "source-code handoffs and app-created artifacts such as extensions, widgets, dashboards, calculators, mini-apps, documents, designs, slides, or videos"
|
|
@@ -107,7 +112,7 @@ When editing code, follow the agent-native architecture:
|
|
|
107
112
|
- All SQL must be dialect-agnostic (works on SQLite and Postgres)
|
|
108
113
|
- No Node.js-specific APIs in server routes (must work on Cloudflare Workers, etc.)
|
|
109
114
|
- Use shadcn/ui components and Tabler Icons for all UI work
|
|
110
|
-
${
|
|
115
|
+
${DEV_FRAMEWORK_CORE}`;
|
|
111
116
|
const PROD_FRAMEWORK_PROMPT_COMPACT = `## Agent-Native Framework — Production Mode
|
|
112
117
|
|
|
113
118
|
You are an AI agent in an agent-native application, running in **production mode**.
|
|
@@ -141,7 +146,7 @@ When editing code, follow the agent-native architecture:
|
|
|
141
146
|
- All SQL must be dialect-agnostic (works on SQLite and Postgres)
|
|
142
147
|
- No Node.js-specific APIs in server routes (must work on Cloudflare Workers, etc.)
|
|
143
148
|
- Use shadcn/ui components and Tabler Icons for all UI work
|
|
144
|
-
${
|
|
149
|
+
${DEV_FRAMEWORK_CORE_COMPACT}`;
|
|
145
150
|
return {
|
|
146
151
|
FRAMEWORK_CORE,
|
|
147
152
|
FRAMEWORK_CORE_COMPACT,
|
|
@@ -3,7 +3,7 @@ import { getFrontmatterValue, getSkillNameFromPath, parseFrontmatter, } from "..
|
|
|
3
3
|
import { ensurePersonalDefaults, organizationIdFromResourceOwner, resourceGet, resourceGetByPath, resourceList, resourceListAccessible, SHARED_OWNER, sharedResourceOwner, WORKSPACE_OWNER, } from "../../resources/store.js";
|
|
4
4
|
import { discoverAgents } from "../agent-discovery.js";
|
|
5
5
|
import { getRequestOrgId } from "../request-context.js";
|
|
6
|
-
import { parseSkillFrontmatter } from "./skill-frontmatter.js";
|
|
6
|
+
import { isRuntimeVisibleScope, parseSkillFrontmatter, } from "./skill-frontmatter.js";
|
|
7
7
|
// ---------------------------------------------------------------------------
|
|
8
8
|
// System-prompt resource loading: AGENTS.md, instructions/*.md, skills
|
|
9
9
|
// summaries, and the shared/workspace resource index. Assembled by
|
|
@@ -523,7 +523,7 @@ async function loadResourceSkillsPromptBlock(owner, orgId) {
|
|
|
523
523
|
const meta = parseSkillFrontmatter(full.content);
|
|
524
524
|
if (meta.userInvocable === false)
|
|
525
525
|
continue;
|
|
526
|
-
if (meta.scope
|
|
526
|
+
if (!isRuntimeVisibleScope(meta.scope))
|
|
527
527
|
continue;
|
|
528
528
|
const name = meta.name || getSkillNameFromPath(resource.path);
|
|
529
529
|
if (!name || seen.has(name))
|
|
@@ -1,6 +1,35 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Where a skill is meant to be used:
|
|
3
|
+
* - `runtime` — only the in-app agent at runtime.
|
|
4
|
+
* - `dev` — only the human's development/coding agent (e.g. Claude Code).
|
|
5
|
+
* Hidden from the runtime agent everywhere.
|
|
6
|
+
* - `both` — loaded everywhere. The default when `scope` is absent.
|
|
7
|
+
* - `invalid` — never written by hand: the parse result for a `scope:` nobody
|
|
8
|
+
* recognizes. See `normalizeSkillScope`.
|
|
9
|
+
*/
|
|
10
|
+
export type SkillScope = "runtime" | "dev" | "both" | "invalid";
|
|
11
|
+
export declare const DEFAULT_SKILL_SCOPE: SkillScope;
|
|
12
|
+
/**
|
|
13
|
+
* An unrecognized `scope:` can neither throw nor fall back to `both`.
|
|
14
|
+
* Throwing would be swallowed: every caller parses inside a `catch` that skips
|
|
15
|
+
* the skill (`readSkillsDir`) or falls back to a permissive default, so at
|
|
16
|
+
* production cold start the skill would vanish with no log — the same
|
|
17
|
+
* invisible failure pointed the other way. Falling back to `both` ships a
|
|
18
|
+
* dev-only skill's body to the deployed agent, which is the bug this sentinel
|
|
19
|
+
* exists to prevent. So `invalid` stays distinguishable from an absent scope,
|
|
20
|
+
* is loud once per file+value, and is excluded from the runtime agent's view
|
|
21
|
+
* while the development agent still sees the skill and the mistake.
|
|
22
|
+
*/
|
|
23
|
+
export declare function normalizeSkillScope(raw: string | undefined, sourceLabel?: string): SkillScope;
|
|
24
|
+
/**
|
|
25
|
+
* The one runtime-visibility gate. A skill whose scope could not be read is
|
|
26
|
+
* withheld alongside `dev`, so a typo fails closed instead of leaking the body
|
|
27
|
+
* into the deployed agent's prompt and docs-search.
|
|
28
|
+
*/
|
|
29
|
+
export declare function isRuntimeVisibleScope(scope: SkillScope | undefined): boolean;
|
|
30
|
+
export declare function parseSkillFrontmatter(content: string, sourceLabel?: string): {
|
|
2
31
|
name?: string;
|
|
3
32
|
description?: string;
|
|
4
33
|
userInvocable?: boolean;
|
|
5
|
-
scope?:
|
|
34
|
+
scope?: SkillScope;
|
|
6
35
|
};
|
|
@@ -1,25 +1,51 @@
|
|
|
1
1
|
import { getFrontmatterValue, parseFrontmatter, } from "../../resources/metadata.js";
|
|
2
|
-
export
|
|
2
|
+
export const DEFAULT_SKILL_SCOPE = "both";
|
|
3
|
+
const warnedBadScopes = new Set();
|
|
4
|
+
/**
|
|
5
|
+
* An unrecognized `scope:` can neither throw nor fall back to `both`.
|
|
6
|
+
* Throwing would be swallowed: every caller parses inside a `catch` that skips
|
|
7
|
+
* the skill (`readSkillsDir`) or falls back to a permissive default, so at
|
|
8
|
+
* production cold start the skill would vanish with no log — the same
|
|
9
|
+
* invisible failure pointed the other way. Falling back to `both` ships a
|
|
10
|
+
* dev-only skill's body to the deployed agent, which is the bug this sentinel
|
|
11
|
+
* exists to prevent. So `invalid` stays distinguishable from an absent scope,
|
|
12
|
+
* is loud once per file+value, and is excluded from the runtime agent's view
|
|
13
|
+
* while the development agent still sees the skill and the mistake.
|
|
14
|
+
*/
|
|
15
|
+
export function normalizeSkillScope(raw, sourceLabel) {
|
|
16
|
+
if (!raw?.trim())
|
|
17
|
+
return DEFAULT_SKILL_SCOPE;
|
|
18
|
+
const value = raw.trim().toLowerCase();
|
|
19
|
+
if (value === "runtime" || value === "dev" || value === "both")
|
|
20
|
+
return value;
|
|
21
|
+
const warnKey = `${sourceLabel ?? ""}\u0000${value}`;
|
|
22
|
+
if (!warnedBadScopes.has(warnKey)) {
|
|
23
|
+
warnedBadScopes.add(warnKey);
|
|
24
|
+
console.error(`[skill-frontmatter] Invalid scope "${raw.trim()}" in ${sourceLabel ?? "an unidentified SKILL.md"} — valid values are runtime, dev, both. Hiding this skill from the runtime agent until it is fixed.`);
|
|
25
|
+
}
|
|
26
|
+
return "invalid";
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The one runtime-visibility gate. A skill whose scope could not be read is
|
|
30
|
+
* withheld alongside `dev`, so a typo fails closed instead of leaking the body
|
|
31
|
+
* into the deployed agent's prompt and docs-search.
|
|
32
|
+
*/
|
|
33
|
+
export function isRuntimeVisibleScope(scope) {
|
|
34
|
+
return scope !== "dev" && scope !== "invalid";
|
|
35
|
+
}
|
|
36
|
+
export function parseSkillFrontmatter(content, sourceLabel) {
|
|
3
37
|
const frontmatter = parseFrontmatter(content);
|
|
4
38
|
const userInvocable = getFrontmatterValue(frontmatter, "user-invocable");
|
|
5
|
-
const
|
|
39
|
+
const rawScope = getFrontmatterValue(frontmatter, "scope");
|
|
40
|
+
const name = getFrontmatterValue(frontmatter, "name");
|
|
6
41
|
return {
|
|
7
|
-
name
|
|
42
|
+
name,
|
|
8
43
|
description: getFrontmatterValue(frontmatter, "description"),
|
|
9
|
-
scope
|
|
44
|
+
scope: rawScope
|
|
45
|
+
? normalizeSkillScope(rawScope, sourceLabel ?? name)
|
|
46
|
+
: undefined,
|
|
10
47
|
userInvocable: userInvocable === undefined
|
|
11
48
|
? undefined
|
|
12
49
|
: userInvocable.toLowerCase() === "true",
|
|
13
50
|
};
|
|
14
51
|
}
|
|
15
|
-
function normalizeSkillFrontmatterScope(value) {
|
|
16
|
-
if (!value)
|
|
17
|
-
return undefined;
|
|
18
|
-
const normalized = value.trim().toLowerCase();
|
|
19
|
-
if (normalized === "runtime" ||
|
|
20
|
-
normalized === "dev" ||
|
|
21
|
-
normalized === "both") {
|
|
22
|
-
return normalized;
|
|
23
|
-
}
|
|
24
|
-
return "both";
|
|
25
|
-
}
|
|
@@ -118,7 +118,7 @@ import { isNetlifyRecurringJobsRuntime, shouldDisableRecurringJobsRuntime, } fro
|
|
|
118
118
|
import { isLocalhost, shouldBlockInProductCodeEditingSurface, } from "./agent-chat/request-surface.js";
|
|
119
119
|
import { loadRunCodeToolEntries } from "./agent-chat/run-code-tools.js";
|
|
120
120
|
import { createAgentEngineScriptEntries, createAgentLoopSettingsScriptEntries, createCallAgentScriptEntry, createChatScriptEntries, createDbScriptEntries, createDocsScriptEntries, createResourceScriptEntries, } from "./agent-chat/script-entries.js";
|
|
121
|
-
import { parseSkillFrontmatter } from "./agent-chat/skill-frontmatter.js";
|
|
121
|
+
import { isRuntimeVisibleScope, parseSkillFrontmatter, } from "./agent-chat/skill-frontmatter.js";
|
|
122
122
|
import { shouldDisableInProcessSweeps } from "./sweep-runtime.js";
|
|
123
123
|
export { loadResourcesForPrompt };
|
|
124
124
|
export { _agentChatPromptSectionsForTests };
|
|
@@ -3373,7 +3373,7 @@ Non-code requests are still fine on this surface: read data, navigate the UI, su
|
|
|
3373
3373
|
const fm = parseSkillFrontmatter(content);
|
|
3374
3374
|
if (fm.userInvocable === false)
|
|
3375
3375
|
continue;
|
|
3376
|
-
if (fm.scope
|
|
3376
|
+
if (!isRuntimeVisibleScope(fm.scope))
|
|
3377
3377
|
continue;
|
|
3378
3378
|
const skillName = fm.name || entry.name.replace(/\.md$/, "");
|
|
3379
3379
|
if (!seenNames.has(skillName)) {
|
|
@@ -3455,7 +3455,7 @@ Non-code requests are still fine on this surface: read data, navigate the UI, su
|
|
|
3455
3455
|
: undefined);
|
|
3456
3456
|
if (full) {
|
|
3457
3457
|
const fm = parseSkillFrontmatter(full.content);
|
|
3458
|
-
if (fm.scope
|
|
3458
|
+
if (!isRuntimeVisibleScope(fm.scope))
|
|
3459
3459
|
continue;
|
|
3460
3460
|
if (fm.name)
|
|
3461
3461
|
skillName = fm.name;
|
|
@@ -27,10 +27,10 @@ export declare function resolveAgentEngineApiKeyWriteTarget(event: H3Event, scop
|
|
|
27
27
|
export declare function createAgentEngineApiKeyHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
|
|
28
28
|
error: any;
|
|
29
29
|
} | {
|
|
30
|
-
error?: undefined;
|
|
31
30
|
ok: boolean;
|
|
32
31
|
key: string;
|
|
33
32
|
baseUrlKey?: string;
|
|
34
33
|
scope: AgentEngineApiKeyScope;
|
|
34
|
+
error?: undefined;
|
|
35
35
|
}>>;
|
|
36
36
|
export {};
|
|
@@ -20,23 +20,16 @@
|
|
|
20
20
|
*
|
|
21
21
|
* Result is cached in module scope so it's only computed once per cold start.
|
|
22
22
|
*/
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
* - `runtime` — only the in-app agent at runtime (not the human's coding agent).
|
|
26
|
-
* - `dev` — only the human's development/coding agent (e.g. Claude Code).
|
|
27
|
-
* EXCLUDED from the runtime agent's prompt block and docs-search.
|
|
28
|
-
* - `both` — loaded everywhere. This is the default when `scope` is absent
|
|
29
|
-
* or set to an unrecognized value (fully backward compatible).
|
|
30
|
-
*/
|
|
31
|
-
export type SkillScope = "runtime" | "dev" | "both";
|
|
32
|
-
export declare const DEFAULT_SKILL_SCOPE: SkillScope;
|
|
23
|
+
import { DEFAULT_SKILL_SCOPE, isRuntimeVisibleScope, normalizeSkillScope, type SkillScope } from "./agent-chat/skill-frontmatter.js";
|
|
24
|
+
export { DEFAULT_SKILL_SCOPE, isRuntimeVisibleScope, normalizeSkillScope, type SkillScope, };
|
|
33
25
|
export interface SkillMeta {
|
|
34
26
|
name: string;
|
|
35
27
|
description: string;
|
|
36
28
|
/**
|
|
37
29
|
* Audience for the skill. Defaults to `both` when the SKILL.md frontmatter
|
|
38
|
-
* omits `scope
|
|
39
|
-
* from the runtime agent everywhere (prompt block + docs-search)
|
|
30
|
+
* omits `scope`. An unrecognized value parses to `invalid`, which is hidden
|
|
31
|
+
* from the runtime agent everywhere (prompt block + docs-search) exactly
|
|
32
|
+
* like `dev`. `dev`-scoped skills are likewise hidden from the runtime agent.
|
|
40
33
|
*/
|
|
41
34
|
scope: SkillScope;
|
|
42
35
|
}
|
|
@@ -104,7 +97,6 @@ export interface AgentInstructionPaths {
|
|
|
104
97
|
development: string;
|
|
105
98
|
}
|
|
106
99
|
export declare function resolveAgentInstructionPaths(instructions?: AgentNativeInstructionsConfig): AgentInstructionPaths;
|
|
107
|
-
export declare function normalizeSkillScope(raw: string | undefined): SkillScope;
|
|
108
100
|
/**
|
|
109
101
|
* Parse the YAML frontmatter at the top of a skill file.
|
|
110
102
|
* Only pulls out `name`, `description`, and `scope` — deliberately simple, no
|
|
@@ -113,8 +105,11 @@ export declare function normalizeSkillScope(raw: string | undefined): SkillScope
|
|
|
113
105
|
* - Inline: `description: Some text`
|
|
114
106
|
* - Folded scalar: `description: >-\n multi\n line` → "multi line"
|
|
115
107
|
* - Literal scalar: `description: |\n multi\n line` → "multi\nline"
|
|
108
|
+
*
|
|
109
|
+
* `sourceLabel` only names the file in the invalid-scope log; pass it wherever
|
|
110
|
+
* a path is known so a typo is traceable to the SKILL.md that carries it.
|
|
116
111
|
*/
|
|
117
|
-
export declare function parseSkillFrontmatter(content: string): Partial<SkillMeta>;
|
|
112
|
+
export declare function parseSkillFrontmatter(content: string, sourceLabel?: string): Partial<SkillMeta>;
|
|
118
113
|
import type { AgentNativeInstructionsConfig } from "../config.js";
|
|
119
114
|
/**
|
|
120
115
|
* Paths to a workspace-core's agent resources, for merging into a template's
|
|
@@ -160,15 +155,17 @@ export declare function loadAgentsBundle(): Promise<AgentsBundle>;
|
|
|
160
155
|
*/
|
|
161
156
|
/**
|
|
162
157
|
* Skills visible to the agent-native RUNTIME agent. Excludes `scope: dev`
|
|
163
|
-
* skills (those are for the human's coding agent only)
|
|
164
|
-
* `scope: runtime`, or `scope: both`
|
|
165
|
-
* runtime agent's view of skills is
|
|
166
|
-
* dev-scoped skill is invisible to the
|
|
158
|
+
* skills (those are for the human's coding agent only) and skills whose scope
|
|
159
|
+
* could not be read. Skills with no scope, `scope: runtime`, or `scope: both`
|
|
160
|
+
* are all included. Use this anywhere the runtime agent's view of skills is
|
|
161
|
+
* built (prompt block + docs-search) so a dev-scoped skill is invisible to the
|
|
162
|
+
* runtime agent everywhere.
|
|
167
163
|
*/
|
|
168
164
|
export declare function getRuntimeSkills(bundle: AgentsBundle): Skill[];
|
|
169
165
|
/**
|
|
170
166
|
* Skills visible to development/coding agents. Excludes `scope: runtime`
|
|
171
|
-
* skills that are intended only for the deployed in-app agent.
|
|
167
|
+
* skills that are intended only for the deployed in-app agent. An `invalid`
|
|
168
|
+
* scope stays visible here on purpose — this is the audience that can fix it.
|
|
172
169
|
*/
|
|
173
170
|
export declare function getDevelopmentSkills(bundle: AgentsBundle): Skill[];
|
|
174
171
|
export declare function skillDocsSlug(name: string): string;
|
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
*
|
|
21
21
|
* Result is cached in module scope so it's only computed once per cold start.
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
import { DEFAULT_SKILL_SCOPE, isRuntimeVisibleScope, normalizeSkillScope, } from "./agent-chat/skill-frontmatter.js";
|
|
24
|
+
export { DEFAULT_SKILL_SCOPE, isRuntimeVisibleScope, normalizeSkillScope, };
|
|
24
25
|
const DEFAULT_AGENT_INSTRUCTIONS_PATH = "AGENTS.md";
|
|
25
26
|
export function resolveAgentInstructionPaths(instructions) {
|
|
26
27
|
return {
|
|
@@ -29,26 +30,6 @@ export function resolveAgentInstructionPaths(instructions) {
|
|
|
29
30
|
};
|
|
30
31
|
}
|
|
31
32
|
let cached = null;
|
|
32
|
-
/**
|
|
33
|
-
* Coerce a raw frontmatter `scope` value into a known `SkillScope`. Unknown,
|
|
34
|
-
* empty, or malformed values fall back to the default (`both`) so a typo never
|
|
35
|
-
* silently hides a skill from the runtime agent. Optionally warns once per
|
|
36
|
-
* distinct bad value to aid debugging without spamming logs.
|
|
37
|
-
*/
|
|
38
|
-
const warnedBadScopes = new Set();
|
|
39
|
-
export function normalizeSkillScope(raw) {
|
|
40
|
-
if (!raw)
|
|
41
|
-
return DEFAULT_SKILL_SCOPE;
|
|
42
|
-
const value = raw.trim().toLowerCase();
|
|
43
|
-
if (value === "runtime" || value === "dev" || value === "both") {
|
|
44
|
-
return value;
|
|
45
|
-
}
|
|
46
|
-
if (value && !warnedBadScopes.has(value)) {
|
|
47
|
-
warnedBadScopes.add(value);
|
|
48
|
-
console.warn(`[agents-bundle] Unknown skill scope "${raw}" — treating as "${DEFAULT_SKILL_SCOPE}". Valid values: runtime, dev, both.`);
|
|
49
|
-
}
|
|
50
|
-
return DEFAULT_SKILL_SCOPE;
|
|
51
|
-
}
|
|
52
33
|
/**
|
|
53
34
|
* Parse the YAML frontmatter at the top of a skill file.
|
|
54
35
|
* Only pulls out `name`, `description`, and `scope` — deliberately simple, no
|
|
@@ -57,8 +38,11 @@ export function normalizeSkillScope(raw) {
|
|
|
57
38
|
* - Inline: `description: Some text`
|
|
58
39
|
* - Folded scalar: `description: >-\n multi\n line` → "multi line"
|
|
59
40
|
* - Literal scalar: `description: |\n multi\n line` → "multi\nline"
|
|
41
|
+
*
|
|
42
|
+
* `sourceLabel` only names the file in the invalid-scope log; pass it wherever
|
|
43
|
+
* a path is known so a typo is traceable to the SKILL.md that carries it.
|
|
60
44
|
*/
|
|
61
|
-
export function parseSkillFrontmatter(content) {
|
|
45
|
+
export function parseSkillFrontmatter(content, sourceLabel) {
|
|
62
46
|
const match = content.match(/^---\r?\n([\s\S]+?)\r?\n---/);
|
|
63
47
|
if (!match)
|
|
64
48
|
return {};
|
|
@@ -106,7 +90,7 @@ export function parseSkillFrontmatter(content) {
|
|
|
106
90
|
else if (key === "description" && value)
|
|
107
91
|
result.description = value;
|
|
108
92
|
else if (key === "scope" && value)
|
|
109
|
-
result.scope = normalizeSkillScope(value);
|
|
93
|
+
result.scope = normalizeSkillScope(value, sourceLabel ?? result.name);
|
|
110
94
|
}
|
|
111
95
|
return result;
|
|
112
96
|
}
|
|
@@ -170,7 +154,7 @@ function readSkillsDir(skillsDir, rootForRelative, out, skipExistingNames) {
|
|
|
170
154
|
if (!fs.existsSync(realSkillFile))
|
|
171
155
|
continue;
|
|
172
156
|
const content = fs.readFileSync(realSkillFile, "utf-8");
|
|
173
|
-
const meta = parseSkillFrontmatter(content);
|
|
157
|
+
const meta = parseSkillFrontmatter(content, path.relative(rootForRelative, skillFile).replace(/\\/g, "/"));
|
|
174
158
|
const name = meta.name ?? entry.name;
|
|
175
159
|
if (skipExistingNames && out[name])
|
|
176
160
|
continue; // Template wins
|
|
@@ -375,17 +359,19 @@ export async function loadAgentsBundle() {
|
|
|
375
359
|
*/
|
|
376
360
|
/**
|
|
377
361
|
* Skills visible to the agent-native RUNTIME agent. Excludes `scope: dev`
|
|
378
|
-
* skills (those are for the human's coding agent only)
|
|
379
|
-
* `scope: runtime`, or `scope: both`
|
|
380
|
-
* runtime agent's view of skills is
|
|
381
|
-
* dev-scoped skill is invisible to the
|
|
362
|
+
* skills (those are for the human's coding agent only) and skills whose scope
|
|
363
|
+
* could not be read. Skills with no scope, `scope: runtime`, or `scope: both`
|
|
364
|
+
* are all included. Use this anywhere the runtime agent's view of skills is
|
|
365
|
+
* built (prompt block + docs-search) so a dev-scoped skill is invisible to the
|
|
366
|
+
* runtime agent everywhere.
|
|
382
367
|
*/
|
|
383
368
|
export function getRuntimeSkills(bundle) {
|
|
384
|
-
return Object.values(bundle.skills).filter((skill) => skill.meta.scope
|
|
369
|
+
return Object.values(bundle.skills).filter((skill) => isRuntimeVisibleScope(skill.meta.scope));
|
|
385
370
|
}
|
|
386
371
|
/**
|
|
387
372
|
* Skills visible to development/coding agents. Excludes `scope: runtime`
|
|
388
|
-
* skills that are intended only for the deployed in-app agent.
|
|
373
|
+
* skills that are intended only for the deployed in-app agent. An `invalid`
|
|
374
|
+
* scope stays visible here on purpose — this is the audience that can fix it.
|
|
389
375
|
*/
|
|
390
376
|
export function getDevelopmentSkills(bundle) {
|
|
391
377
|
return Object.values(bundle.skills).filter((skill) => skill.meta.scope !== "runtime");
|
|
@@ -437,14 +423,12 @@ function generateSkillsPromptBlockForEntries(entries, mode) {
|
|
|
437
423
|
extras = ` (also contains: ${s.extraFiles.join(", ")})`;
|
|
438
424
|
}
|
|
439
425
|
}
|
|
440
|
-
const runtimeHint = mode === "runtime"
|
|
441
|
-
? ` Read with \`docs-search --slug "${skillDocsSlug(s.meta.name)}"\` before starting a task it applies to.`
|
|
442
|
-
: "";
|
|
426
|
+
const runtimeHint = mode === "runtime" ? ` [${skillDocsSlug(s.meta.name)}]` : "";
|
|
443
427
|
return `- \`${s.meta.name}\` at \`${s.dir}/\` — ${s.meta.description || "(no description)"}${extras}${runtimeHint}`;
|
|
444
428
|
});
|
|
445
429
|
const readHint = mode === "runtime"
|
|
446
|
-
? `To read a skill in the in-app runtime agent:
|
|
447
|
-
\`docs-search --slug "
|
|
430
|
+
? `To read a skill in the in-app runtime agent, before starting a task it applies to:
|
|
431
|
+
\`docs-search --slug "<slug>"\` — each skill's slug is the [bracketed] token ending its line
|
|
448
432
|
\`docs-search --query "<topic>"\` to discover matching docs/skills`
|
|
449
433
|
: `To read a skill in dev mode (when you have bash access):
|
|
450
434
|
\`bash(command="cat <skill-dir>/SKILL.md")\`
|
|
@@ -253,3 +253,4 @@ export declare function resetBetterAuth(): Promise<void>;
|
|
|
253
253
|
export declare function configureLocalSqlite(sqlite: {
|
|
254
254
|
pragma(statement: string): unknown;
|
|
255
255
|
}): void;
|
|
256
|
+
export declare function buildDatabaseConfig(dialect: string): Promise<BetterAuthOptions["database"]>;
|
|
@@ -16,7 +16,7 @@ import { pgTable, text as pgText, timestamp as pgTimestamp, boolean as pgBoolean
|
|
|
16
16
|
import { sqliteTable, text as sqliteText, integer as sqliteInteger, } from "drizzle-orm/sqlite-core";
|
|
17
17
|
import { TEMPLATES } from "../cli/templates-meta.js";
|
|
18
18
|
import { getDbExec, isPostgres } from "../db/client.js";
|
|
19
|
-
import { getDialect, getDatabaseUrl, getDatabaseAuthToken, closePgliteClients, getPgliteClient, isPgliteUrl, loadPgliteDrizzle, pgPoolOptions, neonPoolOptions, guardNeonPool, sharedDbPool, onSharedDbPoolsClosed, onSharedDbPoolReplaced, } from "../db/client.js";
|
|
19
|
+
import { getDialect, getCloudflareD1Binding, getDatabaseUrl, getDatabaseAuthToken, closePgliteClients, getPgliteClient, isPgliteUrl, loadPgliteDrizzle, pgPoolOptions, neonPoolOptions, guardNeonPool, sharedDbPool, onSharedDbPoolsClosed, onSharedDbPoolReplaced, } from "../db/client.js";
|
|
20
20
|
import { CORE_RESET_PASSWORD_EMAIL_ID, CORE_VERIFY_SIGNUP_EMAIL_ID, } from "../email-catalog/system-emails.js";
|
|
21
21
|
import { saveOAuthTokens } from "../oauth-tokens/store.js";
|
|
22
22
|
import { acceptPendingInvitationsForEmail } from "../org/accept-pending.js";
|
|
@@ -1126,7 +1126,7 @@ export function configureLocalSqlite(sqlite) {
|
|
|
1126
1126
|
sqlite.pragma("busy_timeout = 10000");
|
|
1127
1127
|
sqlite.pragma("journal_mode = WAL");
|
|
1128
1128
|
}
|
|
1129
|
-
async function buildDatabaseConfig(dialect) {
|
|
1129
|
+
export async function buildDatabaseConfig(dialect) {
|
|
1130
1130
|
if (dialect === "postgres") {
|
|
1131
1131
|
const url = getDatabaseUrl();
|
|
1132
1132
|
const { buildResilientNeonPool, buildResilientPostgresJsClient, isNeonUrl, } = await import("../db/create-get-db.js");
|
|
@@ -1180,6 +1180,21 @@ async function buildDatabaseConfig(dialect) {
|
|
|
1180
1180
|
schema: pgAuthSchema,
|
|
1181
1181
|
});
|
|
1182
1182
|
}
|
|
1183
|
+
if (dialect === "d1") {
|
|
1184
|
+
const d1 = getCloudflareD1Binding();
|
|
1185
|
+
if (!d1) {
|
|
1186
|
+
throw new Error("Cloudflare D1 database binding is unavailable; configure the DB binding before initializing Better Auth.");
|
|
1187
|
+
}
|
|
1188
|
+
const { drizzle } = await import("drizzle-orm/d1");
|
|
1189
|
+
const db = drizzle(d1, {
|
|
1190
|
+
schema: sqliteAuthSchema,
|
|
1191
|
+
});
|
|
1192
|
+
const { drizzleAdapter } = await import("better-auth/adapters/drizzle");
|
|
1193
|
+
return drizzleAdapter(db, {
|
|
1194
|
+
provider: "sqlite",
|
|
1195
|
+
schema: sqliteAuthSchema,
|
|
1196
|
+
});
|
|
1197
|
+
}
|
|
1183
1198
|
// SQLite / libsql
|
|
1184
1199
|
const url = getDatabaseUrl("file:./data/app.db");
|
|
1185
1200
|
if (url.startsWith("file:") || !url.includes("://")) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Compact framework core instructions (FRAMEWORK_CORE_COMPACT).
|
|
3
3
|
* Used in lazy-context mode (lazyContext: true — the default).
|
|
4
4
|
*
|
|
5
|
-
* Shares rules 8–9,
|
|
5
|
+
* Shares rules 8–9, 13–15 with the full variant via shared-rules.ts.
|
|
6
6
|
* The compact version omits:
|
|
7
7
|
* - Verbose "Extended Capabilities" section (agent uses get-framework-context)
|
|
8
8
|
* - Detailed "Parallel Tool Calls" prose (replaced with one-liner)
|
|
@@ -18,6 +18,11 @@ export interface FrameworkCoreCompactPromptOptions {
|
|
|
18
18
|
* a group's tool by name is gated on this — a prompt naming an absent tool
|
|
19
19
|
* makes the model call it, fail, and often report the capability as missing. */
|
|
20
20
|
disabledFrameworkGroups?: ReadonlySet<FrameworkToolGroup>;
|
|
21
|
+
/** True for surfaces whose agent really can edit source (dev mode). This core
|
|
22
|
+
* prompt is appended to both the production and development prompts, so the
|
|
23
|
+
* Builder-handoff sentence must be dropped here or it contradicts the dev
|
|
24
|
+
* prompt's own "you have full local access". */
|
|
25
|
+
canEditSource?: boolean;
|
|
21
26
|
}
|
|
22
27
|
/**
|
|
23
28
|
* Build the compact FRAMEWORK_CORE prompt string.
|