@agent-native/core 0.37.3 → 0.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -6
- package/dist/action.d.ts +60 -2
- package/dist/action.d.ts.map +1 -1
- package/dist/action.js +6 -2
- package/dist/action.js.map +1 -1
- package/dist/agent/production-agent.d.ts +12 -6
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +161 -11
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/agent/types.d.ts +2 -0
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/agent/types.js.map +1 -1
- package/dist/catalog.json +2 -2
- package/dist/cli/connect.d.ts.map +1 -1
- package/dist/cli/connect.js +15 -0
- package/dist/cli/connect.js.map +1 -1
- package/dist/cli/create.d.ts.map +1 -1
- package/dist/cli/create.js +8 -1
- package/dist/cli/create.js.map +1 -1
- package/dist/cli/index.js +10 -6
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/plan-publish-store.d.ts +52 -0
- package/dist/cli/plan-publish-store.d.ts.map +1 -0
- package/dist/cli/plan-publish-store.js +103 -0
- package/dist/cli/plan-publish-store.js.map +1 -0
- package/dist/cli/skills.d.ts +30 -4
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +1240 -339
- package/dist/cli/skills.js.map +1 -1
- package/dist/cli/templates-meta.js +12 -12
- package/dist/cli/templates-meta.js.map +1 -1
- package/dist/client/AssistantChat.d.ts +3 -1
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +65 -15
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
- package/dist/client/MultiTabAssistantChat.js +20 -2
- package/dist/client/MultiTabAssistantChat.js.map +1 -1
- package/dist/client/agent-chat-adapter.d.ts.map +1 -1
- package/dist/client/agent-chat-adapter.js +12 -0
- package/dist/client/agent-chat-adapter.js.map +1 -1
- package/dist/client/agent-engine-key.d.ts +24 -0
- package/dist/client/agent-engine-key.d.ts.map +1 -0
- package/dist/client/agent-engine-key.js +49 -0
- package/dist/client/agent-engine-key.js.map +1 -0
- package/dist/client/analytics.d.ts.map +1 -1
- package/dist/client/analytics.js +34 -0
- package/dist/client/analytics.js.map +1 -1
- package/dist/client/blocks/BlockView.d.ts +35 -0
- package/dist/client/blocks/BlockView.d.ts.map +1 -0
- package/dist/client/blocks/BlockView.js +45 -0
- package/dist/client/blocks/BlockView.js.map +1 -0
- package/dist/client/blocks/SchemaBlockEditor.d.ts +25 -0
- package/dist/client/blocks/SchemaBlockEditor.d.ts.map +1 -0
- package/dist/client/blocks/SchemaBlockEditor.js +165 -0
- package/dist/client/blocks/SchemaBlockEditor.js.map +1 -0
- package/dist/client/blocks/agent.d.ts +30 -0
- package/dist/client/blocks/agent.d.ts.map +1 -0
- package/dist/client/blocks/agent.js +61 -0
- package/dist/client/blocks/agent.js.map +1 -0
- package/dist/client/blocks/index.d.ts +51 -0
- package/dist/client/blocks/index.d.ts.map +1 -0
- package/dist/client/blocks/index.js +67 -0
- package/dist/client/blocks/index.js.map +1 -0
- package/dist/client/blocks/library/AnnotatedCodeBlock.d.ts +6 -0
- package/dist/client/blocks/library/AnnotatedCodeBlock.d.ts.map +1 -0
- package/dist/client/blocks/library/AnnotatedCodeBlock.js +135 -0
- package/dist/client/blocks/library/AnnotatedCodeBlock.js.map +1 -0
- package/dist/client/blocks/library/ApiEndpointBlock.d.ts +20 -0
- package/dist/client/blocks/library/ApiEndpointBlock.d.ts.map +1 -0
- package/dist/client/blocks/library/ApiEndpointBlock.js +131 -0
- package/dist/client/blocks/library/ApiEndpointBlock.js.map +1 -0
- package/dist/client/blocks/library/DataModelBlock.d.ts +28 -0
- package/dist/client/blocks/library/DataModelBlock.d.ts.map +1 -0
- package/dist/client/blocks/library/DataModelBlock.js +222 -0
- package/dist/client/blocks/library/DataModelBlock.js.map +1 -0
- package/dist/client/blocks/library/DiffBlock.d.ts +6 -0
- package/dist/client/blocks/library/DiffBlock.d.ts.map +1 -0
- package/dist/client/blocks/library/DiffBlock.js +293 -0
- package/dist/client/blocks/library/DiffBlock.js.map +1 -0
- package/dist/client/blocks/library/FileTreeBlock.d.ts +23 -0
- package/dist/client/blocks/library/FileTreeBlock.d.ts.map +1 -0
- package/dist/client/blocks/library/FileTreeBlock.js +225 -0
- package/dist/client/blocks/library/FileTreeBlock.js.map +1 -0
- package/dist/client/blocks/library/JsonExplorerBlock.d.ts +19 -0
- package/dist/client/blocks/library/JsonExplorerBlock.d.ts.map +1 -0
- package/dist/client/blocks/library/JsonExplorerBlock.js +171 -0
- package/dist/client/blocks/library/JsonExplorerBlock.js.map +1 -0
- package/dist/client/blocks/library/MermaidBlock.d.ts +17 -0
- package/dist/client/blocks/library/MermaidBlock.d.ts.map +1 -0
- package/dist/client/blocks/library/MermaidBlock.js +131 -0
- package/dist/client/blocks/library/MermaidBlock.js.map +1 -0
- package/dist/client/blocks/library/OpenApiSpecBlock.d.ts +19 -0
- package/dist/client/blocks/library/OpenApiSpecBlock.d.ts.map +1 -0
- package/dist/client/blocks/library/OpenApiSpecBlock.js +494 -0
- package/dist/client/blocks/library/OpenApiSpecBlock.js.map +1 -0
- package/dist/client/blocks/library/annotated-code.config.d.ts +58 -0
- package/dist/client/blocks/library/annotated-code.config.d.ts.map +1 -0
- package/dist/client/blocks/library/annotated-code.config.js +53 -0
- package/dist/client/blocks/library/annotated-code.config.js.map +1 -0
- package/dist/client/blocks/library/api-endpoint.config.d.ts +71 -0
- package/dist/client/blocks/library/api-endpoint.config.d.ts.map +1 -0
- package/dist/client/blocks/library/api-endpoint.config.js +91 -0
- package/dist/client/blocks/library/api-endpoint.config.js.map +1 -0
- package/dist/client/blocks/library/checklist.config.d.ts +36 -0
- package/dist/client/blocks/library/checklist.config.d.ts.map +1 -0
- package/dist/client/blocks/library/checklist.config.js +25 -0
- package/dist/client/blocks/library/checklist.config.js.map +1 -0
- package/dist/client/blocks/library/checklist.d.ts +26 -0
- package/dist/client/blocks/library/checklist.d.ts.map +1 -0
- package/dist/client/blocks/library/checklist.js +78 -0
- package/dist/client/blocks/library/checklist.js.map +1 -0
- package/dist/client/blocks/library/code-tabs.config.d.ts +36 -0
- package/dist/client/blocks/library/code-tabs.config.d.ts.map +1 -0
- package/dist/client/blocks/library/code-tabs.config.js +30 -0
- package/dist/client/blocks/library/code-tabs.config.js.map +1 -0
- package/dist/client/blocks/library/code-tabs.d.ts +3 -0
- package/dist/client/blocks/library/code-tabs.d.ts.map +1 -0
- package/dist/client/blocks/library/code-tabs.js +165 -0
- package/dist/client/blocks/library/code-tabs.js.map +1 -0
- package/dist/client/blocks/library/data-model.config.d.ts +72 -0
- package/dist/client/blocks/library/data-model.config.d.ts.map +1 -0
- package/dist/client/blocks/library/data-model.config.js +59 -0
- package/dist/client/blocks/library/data-model.config.js.map +1 -0
- package/dist/client/blocks/library/dev-doc-ui.d.ts +49 -0
- package/dist/client/blocks/library/dev-doc-ui.d.ts.map +1 -0
- package/dist/client/blocks/library/dev-doc-ui.js +50 -0
- package/dist/client/blocks/library/dev-doc-ui.js.map +1 -0
- package/dist/client/blocks/library/diff.config.d.ts +41 -0
- package/dist/client/blocks/library/diff.config.d.ts.map +1 -0
- package/dist/client/blocks/library/diff.config.js +34 -0
- package/dist/client/blocks/library/diff.config.js.map +1 -0
- package/dist/client/blocks/library/file-tree.config.d.ts +59 -0
- package/dist/client/blocks/library/file-tree.config.d.ts.map +1 -0
- package/dist/client/blocks/library/file-tree.config.js +45 -0
- package/dist/client/blocks/library/file-tree.config.js.map +1 -0
- package/dist/client/blocks/library/html.config.d.ts +37 -0
- package/dist/client/blocks/library/html.config.d.ts.map +1 -0
- package/dist/client/blocks/library/html.config.js +46 -0
- package/dist/client/blocks/library/html.config.js.map +1 -0
- package/dist/client/blocks/library/html.d.ts +21 -0
- package/dist/client/blocks/library/html.d.ts.map +1 -0
- package/dist/client/blocks/library/html.js +72 -0
- package/dist/client/blocks/library/html.js.map +1 -0
- package/dist/client/blocks/library/json-explorer.config.d.ts +46 -0
- package/dist/client/blocks/library/json-explorer.config.d.ts.map +1 -0
- package/dist/client/blocks/library/json-explorer.config.js +28 -0
- package/dist/client/blocks/library/json-explorer.config.js.map +1 -0
- package/dist/client/blocks/library/mermaid.config.d.ts +32 -0
- package/dist/client/blocks/library/mermaid.config.d.ts.map +1 -0
- package/dist/client/blocks/library/mermaid.config.js +24 -0
- package/dist/client/blocks/library/mermaid.config.js.map +1 -0
- package/dist/client/blocks/library/openapi-spec.config.d.ts +49 -0
- package/dist/client/blocks/library/openapi-spec.config.d.ts.map +1 -0
- package/dist/client/blocks/library/openapi-spec.config.js +24 -0
- package/dist/client/blocks/library/openapi-spec.config.js.map +1 -0
- package/dist/client/blocks/library/server-specs.d.ts +35 -0
- package/dist/client/blocks/library/server-specs.d.ts.map +1 -0
- package/dist/client/blocks/library/server-specs.js +171 -0
- package/dist/client/blocks/library/server-specs.js.map +1 -0
- package/dist/client/blocks/library/specs.d.ts +29 -0
- package/dist/client/blocks/library/specs.d.ts.map +1 -0
- package/dist/client/blocks/library/specs.js +229 -0
- package/dist/client/blocks/library/specs.js.map +1 -0
- package/dist/client/blocks/library/table.config.d.ts +30 -0
- package/dist/client/blocks/library/table.config.d.ts.map +1 -0
- package/dist/client/blocks/library/table.config.js +22 -0
- package/dist/client/blocks/library/table.config.js.map +1 -0
- package/dist/client/blocks/library/table.d.ts +8 -0
- package/dist/client/blocks/library/table.d.ts.map +1 -0
- package/dist/client/blocks/library/table.js +109 -0
- package/dist/client/blocks/library/table.js.map +1 -0
- package/dist/client/blocks/library/tabs.config.d.ts +56 -0
- package/dist/client/blocks/library/tabs.config.d.ts.map +1 -0
- package/dist/client/blocks/library/tabs.config.js +36 -0
- package/dist/client/blocks/library/tabs.config.js.map +1 -0
- package/dist/client/blocks/library/tabs.d.ts +20 -0
- package/dist/client/blocks/library/tabs.d.ts.map +1 -0
- package/dist/client/blocks/library/tabs.js +123 -0
- package/dist/client/blocks/library/tabs.js.map +1 -0
- package/dist/client/blocks/mdx.d.ts +74 -0
- package/dist/client/blocks/mdx.d.ts.map +1 -0
- package/dist/client/blocks/mdx.js +205 -0
- package/dist/client/blocks/mdx.js.map +1 -0
- package/dist/client/blocks/provider.d.ts +25 -0
- package/dist/client/blocks/provider.d.ts.map +1 -0
- package/dist/client/blocks/provider.js +19 -0
- package/dist/client/blocks/provider.js.map +1 -0
- package/dist/client/blocks/registry.d.ts +32 -0
- package/dist/client/blocks/registry.d.ts.map +1 -0
- package/dist/client/blocks/registry.js +65 -0
- package/dist/client/blocks/registry.js.map +1 -0
- package/dist/client/blocks/schema-form/introspect.d.ts +31 -0
- package/dist/client/blocks/schema-form/introspect.d.ts.map +1 -0
- package/dist/client/blocks/schema-form/introspect.js +164 -0
- package/dist/client/blocks/schema-form/introspect.js.map +1 -0
- package/dist/client/blocks/server.d.ts +31 -0
- package/dist/client/blocks/server.d.ts.map +1 -0
- package/dist/client/blocks/server.js +41 -0
- package/dist/client/blocks/server.js.map +1 -0
- package/dist/client/blocks/types.d.ts +252 -0
- package/dist/client/blocks/types.d.ts.map +1 -0
- package/dist/client/blocks/types.js +5 -0
- package/dist/client/blocks/types.js.map +1 -0
- package/dist/client/composer/ComposerPlusMenu.js +10 -1
- package/dist/client/composer/ComposerPlusMenu.js.map +1 -1
- package/dist/client/guided-questions.d.ts +68 -0
- package/dist/client/guided-questions.d.ts.map +1 -1
- package/dist/client/guided-questions.js +158 -3
- package/dist/client/guided-questions.js.map +1 -1
- package/dist/client/index.d.ts +6 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +24 -1
- package/dist/client/index.js.map +1 -1
- package/dist/client/rich-markdown-editor/BubbleToolbar.d.ts +37 -0
- package/dist/client/rich-markdown-editor/BubbleToolbar.d.ts.map +1 -0
- package/dist/client/rich-markdown-editor/BubbleToolbar.js +161 -0
- package/dist/client/rich-markdown-editor/BubbleToolbar.js.map +1 -0
- package/dist/client/rich-markdown-editor/DragHandle.d.ts +52 -0
- package/dist/client/rich-markdown-editor/DragHandle.d.ts.map +1 -0
- package/dist/client/rich-markdown-editor/DragHandle.js +403 -0
- package/dist/client/rich-markdown-editor/DragHandle.js.map +1 -0
- package/dist/client/rich-markdown-editor/ImageExtension.d.ts +63 -0
- package/dist/client/rich-markdown-editor/ImageExtension.d.ts.map +1 -0
- package/dist/client/rich-markdown-editor/ImageExtension.js +242 -0
- package/dist/client/rich-markdown-editor/ImageExtension.js.map +1 -0
- package/dist/client/rich-markdown-editor/RegistryBlockNode.d.ts +97 -0
- package/dist/client/rich-markdown-editor/RegistryBlockNode.d.ts.map +1 -0
- package/dist/client/rich-markdown-editor/RegistryBlockNode.js +214 -0
- package/dist/client/rich-markdown-editor/RegistryBlockNode.js.map +1 -0
- package/dist/client/rich-markdown-editor/RichMarkdownEditor.d.ts +51 -0
- package/dist/client/rich-markdown-editor/RichMarkdownEditor.d.ts.map +1 -0
- package/dist/client/rich-markdown-editor/RichMarkdownEditor.js +37 -0
- package/dist/client/rich-markdown-editor/RichMarkdownEditor.js.map +1 -0
- package/dist/client/rich-markdown-editor/RunId.d.ts +28 -0
- package/dist/client/rich-markdown-editor/RunId.d.ts.map +1 -0
- package/dist/client/rich-markdown-editor/RunId.js +60 -0
- package/dist/client/rich-markdown-editor/RunId.js.map +1 -0
- package/dist/client/rich-markdown-editor/SharedRichEditor.d.ts +85 -0
- package/dist/client/rich-markdown-editor/SharedRichEditor.d.ts.map +1 -0
- package/dist/client/rich-markdown-editor/SharedRichEditor.js +130 -0
- package/dist/client/rich-markdown-editor/SharedRichEditor.js.map +1 -0
- package/dist/client/rich-markdown-editor/SlashCommandMenu.d.ts +36 -0
- package/dist/client/rich-markdown-editor/SlashCommandMenu.d.ts.map +1 -0
- package/dist/client/rich-markdown-editor/SlashCommandMenu.js +193 -0
- package/dist/client/rich-markdown-editor/SlashCommandMenu.js.map +1 -0
- package/dist/client/rich-markdown-editor/extensions.d.ts +166 -0
- package/dist/client/rich-markdown-editor/extensions.d.ts.map +1 -0
- package/dist/client/rich-markdown-editor/extensions.js +222 -0
- package/dist/client/rich-markdown-editor/extensions.js.map +1 -0
- package/dist/client/rich-markdown-editor/gfmDoc.d.ts +24 -0
- package/dist/client/rich-markdown-editor/gfmDoc.d.ts.map +1 -0
- package/dist/client/rich-markdown-editor/gfmDoc.js +83 -0
- package/dist/client/rich-markdown-editor/gfmDoc.js.map +1 -0
- package/dist/client/rich-markdown-editor/index.d.ts +14 -0
- package/dist/client/rich-markdown-editor/index.d.ts.map +1 -0
- package/dist/client/rich-markdown-editor/index.js +14 -0
- package/dist/client/rich-markdown-editor/index.js.map +1 -0
- package/dist/client/rich-markdown-editor/registrySlashCommands.d.ts +46 -0
- package/dist/client/rich-markdown-editor/registrySlashCommands.d.ts.map +1 -0
- package/dist/client/rich-markdown-editor/registrySlashCommands.js +13 -0
- package/dist/client/rich-markdown-editor/registrySlashCommands.js.map +1 -0
- package/dist/client/rich-markdown-editor/uploadEditorImage.d.ts +18 -0
- package/dist/client/rich-markdown-editor/uploadEditorImage.d.ts.map +1 -0
- package/dist/client/rich-markdown-editor/uploadEditorImage.js +57 -0
- package/dist/client/rich-markdown-editor/uploadEditorImage.js.map +1 -0
- package/dist/client/rich-markdown-editor/useCollabReconcile.d.ts +91 -0
- package/dist/client/rich-markdown-editor/useCollabReconcile.d.ts.map +1 -0
- package/dist/client/rich-markdown-editor/useCollabReconcile.js +375 -0
- package/dist/client/rich-markdown-editor/useCollabReconcile.js.map +1 -0
- package/dist/client/track.d.ts +25 -0
- package/dist/client/track.d.ts.map +1 -0
- package/dist/client/track.js +53 -0
- package/dist/client/track.js.map +1 -0
- package/dist/client/use-action.d.ts.map +1 -1
- package/dist/client/use-action.js +6 -0
- package/dist/client/use-action.js.map +1 -1
- package/dist/client/use-session.d.ts +3 -2
- package/dist/client/use-session.d.ts.map +1 -1
- package/dist/client/use-session.js +3 -2
- package/dist/client/use-session.js.map +1 -1
- package/dist/deploy/build.d.ts +5 -0
- package/dist/deploy/build.d.ts.map +1 -1
- package/dist/deploy/build.js +67 -1
- package/dist/deploy/build.js.map +1 -1
- package/dist/extensions/schema.d.ts +1 -1
- package/dist/mcp/build-server.d.ts.map +1 -1
- package/dist/mcp/build-server.js +9 -2
- package/dist/mcp/build-server.js.map +1 -1
- package/dist/mcp/server.d.ts +1 -1
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +35 -2
- package/dist/mcp/server.js.map +1 -1
- package/dist/provider-api/index.d.ts +1 -1
- package/dist/provider-api/index.d.ts.map +1 -1
- package/dist/scripts/docs/search.d.ts.map +1 -1
- package/dist/scripts/docs/search.js +5 -2
- package/dist/scripts/docs/search.js.map +1 -1
- package/dist/scripts/runner.d.ts.map +1 -1
- package/dist/scripts/runner.js +16 -3
- package/dist/scripts/runner.js.map +1 -1
- package/dist/server/action-discovery.d.ts.map +1 -1
- package/dist/server/action-discovery.js +2 -0
- package/dist/server/action-discovery.js.map +1 -1
- package/dist/server/action-routes.d.ts.map +1 -1
- package/dist/server/action-routes.js +30 -4
- package/dist/server/action-routes.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +65 -19
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/agent-teams.d.ts.map +1 -1
- package/dist/server/agent-teams.js +8 -1
- package/dist/server/agent-teams.js.map +1 -1
- package/dist/server/agents-bundle.d.ts +27 -1
- package/dist/server/agents-bundle.d.ts.map +1 -1
- package/dist/server/agents-bundle.js +41 -3
- package/dist/server/agents-bundle.js.map +1 -1
- package/dist/server/auth.d.ts.map +1 -1
- package/dist/server/auth.js +76 -3
- package/dist/server/auth.js.map +1 -1
- package/dist/server/core-routes-plugin.d.ts.map +1 -1
- package/dist/server/core-routes-plugin.js +60 -0
- package/dist/server/core-routes-plugin.js.map +1 -1
- package/dist/server/onboarding-html.d.ts.map +1 -1
- package/dist/server/onboarding-html.js +160 -22
- package/dist/server/onboarding-html.js.map +1 -1
- package/dist/server/sentry.d.ts.map +1 -1
- package/dist/server/sentry.js +6 -0
- package/dist/server/sentry.js.map +1 -1
- package/dist/server/social-og-image.d.ts +2 -1
- package/dist/server/social-og-image.d.ts.map +1 -1
- package/dist/server/social-og-image.js +24 -4
- package/dist/server/social-og-image.js.map +1 -1
- package/dist/sharing/schema.d.ts +1 -1
- package/dist/styles/agent-native.css +1 -0
- package/dist/styles/rich-markdown-editor.css +439 -0
- package/dist/templates/default/.agents/skills/actions/SKILL.md +4 -1
- package/dist/templates/default/.agents/skills/security/SKILL.md +13 -4
- package/dist/templates/default/.agents/skills/storing-data/SKILL.md +15 -3
- package/dist/templates/default/AGENTS.md +1 -0
- package/dist/templates/default/DEVELOPING.md +2 -0
- package/dist/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +10 -3
- package/dist/templates/workspace-core/.agents/skills/actions/SKILL.md +98 -10
- package/dist/templates/workspace-core/.agents/skills/adding-a-feature/SKILL.md +45 -3
- package/dist/templates/workspace-core/.agents/skills/address-feedback/SKILL.md +2 -0
- package/dist/templates/workspace-core/.agents/skills/authentication/SKILL.md +37 -4
- package/dist/templates/workspace-core/.agents/skills/automations/SKILL.md +9 -4
- package/dist/templates/workspace-core/.agents/skills/capture-learnings/SKILL.md +2 -0
- package/dist/templates/workspace-core/.agents/skills/client-methods/SKILL.md +106 -0
- package/dist/templates/workspace-core/.agents/skills/client-methods/references/legacy-client-fetch-audit-2026-06-03.md +53 -0
- package/dist/templates/workspace-core/.agents/skills/client-side-routing/SKILL.md +2 -0
- package/dist/templates/workspace-core/.agents/skills/context-awareness/SKILL.md +62 -61
- package/dist/templates/workspace-core/.agents/skills/context-xray/SKILL.md +47 -0
- package/dist/templates/workspace-core/.agents/skills/create-skill/SKILL.md +28 -0
- package/dist/templates/workspace-core/.agents/skills/delegate-to-agent/SKILL.md +52 -1
- package/dist/templates/workspace-core/.agents/skills/extension-points/SKILL.md +2 -0
- package/dist/templates/workspace-core/.agents/skills/extensions/SKILL.md +95 -433
- package/dist/templates/workspace-core/.agents/skills/extensions/references/api.md +285 -0
- package/dist/templates/workspace-core/.agents/skills/extensions/references/examples.md +259 -0
- package/dist/templates/workspace-core/.agents/skills/external-agents/SKILL.md +398 -0
- package/dist/templates/workspace-core/.agents/skills/external-agents/references/mcp-apps-embedding.md +157 -0
- package/dist/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +17 -0
- package/dist/templates/workspace-core/.agents/skills/integration-webhooks/SKILL.md +13 -2
- package/dist/templates/workspace-core/.agents/skills/mvp-followup/SKILL.md +51 -0
- package/dist/templates/workspace-core/.agents/skills/observability/SKILL.md +14 -4
- package/dist/templates/workspace-core/.agents/skills/onboarding/SKILL.md +13 -1
- package/dist/templates/workspace-core/.agents/skills/portability/SKILL.md +27 -5
- package/dist/templates/workspace-core/.agents/skills/qa/SKILL.md +24 -8
- package/dist/templates/workspace-core/.agents/skills/real-time-collab/SKILL.md +53 -7
- package/dist/templates/workspace-core/.agents/skills/real-time-sync/SKILL.md +43 -10
- package/dist/templates/workspace-core/.agents/skills/recurring-jobs/SKILL.md +2 -0
- package/dist/templates/workspace-core/.agents/skills/secrets/SKILL.md +43 -14
- package/dist/templates/workspace-core/.agents/skills/security/SKILL.md +50 -1
- package/dist/templates/workspace-core/.agents/skills/self-modifying-code/SKILL.md +4 -2
- package/dist/templates/workspace-core/.agents/skills/server-plugins/SKILL.md +11 -1
- package/dist/templates/workspace-core/.agents/skills/shadcn-ui/SKILL.md +15 -0
- package/dist/templates/workspace-core/.agents/skills/sharing/SKILL.md +5 -1
- package/dist/templates/workspace-core/.agents/skills/storing-data/SKILL.md +48 -19
- package/dist/templates/workspace-core/.agents/skills/tracking/SKILL.md +7 -3
- package/dist/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +13 -6
- package/dist/templates/workspace-core/.agents/skills/writing-agent-instructions/SKILL.md +236 -0
- package/dist/templates/workspace-core/AGENTS.md +5 -1
- package/dist/templates/workspace-root/AGENTS.md +5 -2
- package/dist/tracking/route.d.ts +43 -0
- package/dist/tracking/route.d.ts.map +1 -0
- package/dist/tracking/route.js +85 -0
- package/dist/tracking/route.js.map +1 -0
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +15 -0
- package/dist/vite/client.js.map +1 -1
- package/docs/content/a2a-protocol.md +18 -4
- package/docs/content/actions.md +87 -0
- package/docs/content/agent-mentions.md +2 -1
- package/docs/content/authentication.md +2 -1
- package/docs/content/client.md +64 -13
- package/docs/content/cloneable-saas.md +1 -1
- package/docs/content/code-agents-ui.md +17 -11
- package/docs/content/context-awareness.md +23 -28
- package/docs/content/creating-templates.md +1 -1
- package/docs/content/drop-in-agent.md +2 -0
- package/docs/content/getting-started.md +2 -2
- package/docs/content/key-concepts.md +2 -2
- package/docs/content/messaging.md +57 -15
- package/docs/content/migration-workbench.md +1 -1
- package/docs/content/multi-app-workspace.md +1 -1
- package/docs/content/multi-tenancy.md +17 -15
- package/docs/content/real-time-collaboration.md +1 -1
- package/docs/content/recurring-jobs.md +1 -1
- package/docs/content/security.md +2 -2
- package/docs/content/server.md +4 -4
- package/docs/content/skills-guide.md +30 -0
- package/docs/content/template-analytics.md +2 -2
- package/docs/content/template-assets.md +17 -1
- package/docs/content/template-brain.md +2 -2
- package/docs/content/template-calendar.md +1 -1
- package/docs/content/template-clips.md +3 -3
- package/docs/content/template-content.md +2 -2
- package/docs/content/template-design.md +2 -2
- package/docs/content/template-dispatch.md +3 -3
- package/docs/content/template-forms.md +14 -2
- package/docs/content/template-mail.md +1 -3
- package/docs/content/template-plan.md +133 -0
- package/docs/content/template-slides.md +5 -4
- package/docs/content/template-starter.md +4 -4
- package/docs/content/template-videos.md +6 -11
- package/docs/content/tracking.md +21 -1
- package/docs/content/visual-plans.md +74 -0
- package/docs/content/workspace.md +9 -9
- package/package.json +26 -11
- package/src/templates/default/.agents/skills/actions/SKILL.md +4 -1
- package/src/templates/default/.agents/skills/security/SKILL.md +13 -4
- package/src/templates/default/.agents/skills/storing-data/SKILL.md +15 -3
- package/src/templates/default/AGENTS.md +1 -0
- package/src/templates/default/DEVELOPING.md +2 -0
- package/src/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +10 -3
- package/src/templates/workspace-core/.agents/skills/actions/SKILL.md +98 -10
- package/src/templates/workspace-core/.agents/skills/adding-a-feature/SKILL.md +45 -3
- package/src/templates/workspace-core/.agents/skills/address-feedback/SKILL.md +2 -0
- package/src/templates/workspace-core/.agents/skills/authentication/SKILL.md +37 -4
- package/src/templates/workspace-core/.agents/skills/automations/SKILL.md +9 -4
- package/src/templates/workspace-core/.agents/skills/capture-learnings/SKILL.md +2 -0
- package/src/templates/workspace-core/.agents/skills/client-methods/SKILL.md +106 -0
- package/src/templates/workspace-core/.agents/skills/client-methods/references/legacy-client-fetch-audit-2026-06-03.md +53 -0
- package/src/templates/workspace-core/.agents/skills/client-side-routing/SKILL.md +2 -0
- package/src/templates/workspace-core/.agents/skills/context-awareness/SKILL.md +62 -61
- package/src/templates/workspace-core/.agents/skills/context-xray/SKILL.md +47 -0
- package/src/templates/workspace-core/.agents/skills/create-skill/SKILL.md +28 -0
- package/src/templates/workspace-core/.agents/skills/delegate-to-agent/SKILL.md +52 -1
- package/src/templates/workspace-core/.agents/skills/extension-points/SKILL.md +2 -0
- package/src/templates/workspace-core/.agents/skills/extensions/SKILL.md +95 -433
- package/src/templates/workspace-core/.agents/skills/extensions/references/api.md +285 -0
- package/src/templates/workspace-core/.agents/skills/extensions/references/examples.md +259 -0
- package/src/templates/workspace-core/.agents/skills/external-agents/SKILL.md +398 -0
- package/src/templates/workspace-core/.agents/skills/external-agents/references/mcp-apps-embedding.md +157 -0
- package/src/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +17 -0
- package/src/templates/workspace-core/.agents/skills/integration-webhooks/SKILL.md +13 -2
- package/src/templates/workspace-core/.agents/skills/mvp-followup/SKILL.md +51 -0
- package/src/templates/workspace-core/.agents/skills/observability/SKILL.md +14 -4
- package/src/templates/workspace-core/.agents/skills/onboarding/SKILL.md +13 -1
- package/src/templates/workspace-core/.agents/skills/portability/SKILL.md +27 -5
- package/src/templates/workspace-core/.agents/skills/qa/SKILL.md +24 -8
- package/src/templates/workspace-core/.agents/skills/real-time-collab/SKILL.md +53 -7
- package/src/templates/workspace-core/.agents/skills/real-time-sync/SKILL.md +43 -10
- package/src/templates/workspace-core/.agents/skills/recurring-jobs/SKILL.md +2 -0
- package/src/templates/workspace-core/.agents/skills/secrets/SKILL.md +43 -14
- package/src/templates/workspace-core/.agents/skills/security/SKILL.md +50 -1
- package/src/templates/workspace-core/.agents/skills/self-modifying-code/SKILL.md +4 -2
- package/src/templates/workspace-core/.agents/skills/server-plugins/SKILL.md +11 -1
- package/src/templates/workspace-core/.agents/skills/shadcn-ui/SKILL.md +15 -0
- package/src/templates/workspace-core/.agents/skills/sharing/SKILL.md +5 -1
- package/src/templates/workspace-core/.agents/skills/storing-data/SKILL.md +48 -19
- package/src/templates/workspace-core/.agents/skills/tracking/SKILL.md +7 -3
- package/src/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +13 -6
- package/src/templates/workspace-core/.agents/skills/writing-agent-instructions/SKILL.md +236 -0
- package/src/templates/workspace-core/AGENTS.md +5 -1
- package/src/templates/workspace-root/AGENTS.md +5 -2
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Visual Plans"
|
|
3
|
+
description: "Turn your coding agent's plans into interactive, reviewable documents with /visual-plan. Install authenticates once; reviewers you share with edit as a guest, sign in only to save or share."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Visual Plans
|
|
7
|
+
|
|
8
|
+
`/visual-plan` is a coding-agent skill that turns the plan your agent would normally write in Markdown into a **structured visual document**: an optional pan/zoom wireframe canvas on top and a Notion-like technical document below, with diagrams, mockups, prototype options, answerable Open Questions, annotations, and comments you can react to before any code changes.
|
|
9
|
+
|
|
10
|
+
There are two ways into Plans:
|
|
11
|
+
|
|
12
|
+
- **From your coding agent (CLI)** — one command installs the skill, registers the hosted Plans connector, and authenticates it.
|
|
13
|
+
- **In the browser** — anyone you share with can open the editor and create or edit as a **guest, with no sign-up**. They sign in only when they want to save or share.
|
|
14
|
+
|
|
15
|
+
## Coding agent setup {#install}
|
|
16
|
+
|
|
17
|
+
Install with the Agent-Native CLI. The command installs the skill instructions, registers the hosted Plans MCP connector, **and authenticates it in the same step**, so your first tool call does not hit an OAuth wall:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
agent-native skills add visual-plan
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Authentication is a one-time browser sign-in at setup — this is intended, and it is what lets the agent persist and share the plans it generates. This also installs the companion commands `/ui-plan`, `/visual-questions`, and `/visualize-plan` (see [Invoking the skill](#invoke)).
|
|
24
|
+
|
|
25
|
+
What the auth step does depends on your client:
|
|
26
|
+
|
|
27
|
+
- **OAuth-capable hosts** (Claude Code) get a URL-only MCP entry plus a prompt to run `/mcp` and choose **Authenticate**.
|
|
28
|
+
- **Codex / Cowork** run a short browser device-code flow: the CLI prints a code, opens the verification page, and writes the connector once you approve.
|
|
29
|
+
- In a **non-interactive shell or CI**, the auth step is skipped and the exact command to run later is printed for you.
|
|
30
|
+
|
|
31
|
+
Pass `--no-connect` to register the connector without authenticating, then run `agent-native connect https://plan.agent-native.com` whenever you are ready:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
agent-native skills add visual-plan --no-connect
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Invoking the skill {#invoke}
|
|
38
|
+
|
|
39
|
+
Once installed, use the slash command that fits the work:
|
|
40
|
+
|
|
41
|
+
- `/visual-plan` — the canonical command for any rich plan (architecture, backend, refactors, UI).
|
|
42
|
+
- `/ui-plan` — UI-first work that should start with the screens.
|
|
43
|
+
- `/visual-questions` — a short visual intake form before planning.
|
|
44
|
+
- `/visualize-plan` — turn an existing Codex, Claude Code, Markdown, or pasted plan into a visual companion.
|
|
45
|
+
|
|
46
|
+
The agent gates hard: it only builds a polished visual plan when a wrong direction would be costly, and skips it for trivial, unambiguous work. Each command generates a plan and opens the editor.
|
|
47
|
+
|
|
48
|
+
When a plan has unresolved decisions that are useful to answer after the first pass, the agent can put them in an **Open Questions** form at the bottom of the same plan. You can choose single or multiple options, fill in freeform answers, and send the answers back to the agent to revise the plan.
|
|
49
|
+
|
|
50
|
+
## Editing in the browser as a guest {#guest}
|
|
51
|
+
|
|
52
|
+
People you share a plan with do not need to install anything. They open the Plans editor and **create and edit with no sign-up** — they work as a guest. Signing in is only required when someone wants to **save or share** their own work.
|
|
53
|
+
|
|
54
|
+
When a guest signs in, the plans they created as a guest are **claimed** into their account, so nothing they built is lost.
|
|
55
|
+
|
|
56
|
+
Plan prose edits inline: click into any text section, type, format with the rich editor toolbar or slash menu, and Plans autosaves the underlying markdown. Review annotation mode temporarily turns text sections read-only so clicks can pin feedback; leave review mode to keep editing prose.
|
|
57
|
+
|
|
58
|
+
## Sharing and commenting {#sharing}
|
|
59
|
+
|
|
60
|
+
Sharing and commenting are the workflows that need an account:
|
|
61
|
+
|
|
62
|
+
- **Viewing** a public or shared plan works for anyone with the link — no account required.
|
|
63
|
+
- **Commenting** on a shared plan requires an agent-native account.
|
|
64
|
+
- **Sharing** a plan (publishing it to a link, private sharing, reviewer access, cross-device or team review) requires signing in. Google sign-in appears when the standard Google OAuth env vars are configured.
|
|
65
|
+
|
|
66
|
+
The hosted Plans connector lives at `https://plan.agent-native.com/_agent-native/mcp`. Never put shared secrets in skill files.
|
|
67
|
+
|
|
68
|
+
## Local mode (advanced, offline) {#local}
|
|
69
|
+
|
|
70
|
+
For fully offline, no-account use, you can run the Plans app locally and sync your plans to your repo as MDX. This local mode is a separate, advanced path — not the default hosted flow — and is best when you need everything to stay on your machine and in version control.
|
|
71
|
+
|
|
72
|
+
## Recovering from auth errors {#auth-errors}
|
|
73
|
+
|
|
74
|
+
If a Plans tool ever returns `needs auth`, `Unauthorized`, or `Session terminated`, do not keep retrying it. Authenticate the connector with `agent-native connect https://plan.agent-native.com` (or re-run `/mcp` → **Authenticate** in an OAuth-capable host), then continue once the connector is available.
|
|
@@ -290,15 +290,15 @@ The resource system also seeds a personal `LEARNINGS.md` for compatibility with
|
|
|
290
290
|
|
|
291
291
|
**Where it fits.**
|
|
292
292
|
|
|
293
|
-
| Surface | Scope | Written by | Read when
|
|
294
|
-
| ------------------ | ------------------ | ------------------------------------ |
|
|
295
|
-
| `AGENTS.md` | Shared | Humans / agent on request | Every turn
|
|
296
|
-
| `LEARNINGS.md` | Shared | Humans / agent on request | Every turn
|
|
297
|
-
| `memory/MEMORY.md` | Personal | Agent / humans | Every turn
|
|
298
|
-
| `instructions/…` | Shared | Humans / agent on request | Every turn
|
|
299
|
-
| `skills/…` | Shared | Humans / agent on request | On demand (`/slash` command)
|
|
300
|
-
| `context/…` | Shared | Humans / agent on request | Indexed every turn, read when relevant
|
|
301
|
-
| `mcp-servers/…` | Workspace / shared | Humans via Dispatch or app workspace | MCP config refresh
|
|
293
|
+
| Surface | Scope | Written by | Read when |
|
|
294
|
+
| ------------------ | ------------------ | ------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
295
|
+
| `AGENTS.md` | Shared | Humans / agent on request | Every turn |
|
|
296
|
+
| `LEARNINGS.md` | Shared | Humans / agent on request | Every turn (Shared copy only — a personal `LEARNINGS.md` is seeded for back-compat but isn't preloaded; put personal context in `memory/MEMORY.md`) |
|
|
297
|
+
| `memory/MEMORY.md` | Personal | Agent / humans | Every turn |
|
|
298
|
+
| `instructions/…` | Shared | Humans / agent on request | Every turn |
|
|
299
|
+
| `skills/…` | Shared | Humans / agent on request | On demand (`/slash` command) |
|
|
300
|
+
| `context/…` | Shared | Humans / agent on request | Indexed every turn, read when relevant |
|
|
301
|
+
| `mcp-servers/…` | Workspace / shared | Humans via Dispatch or app workspace | MCP config refresh |
|
|
302
302
|
|
|
303
303
|
Users can edit these memory files directly in the Workspace tab — they're regular resources. Delete lines the agent got wrong, keep personal preferences in `memory/MEMORY.md`, or promote team-wide rules into `AGENTS.md`.
|
|
304
304
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-native/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.39.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=22"
|
|
@@ -41,6 +41,8 @@
|
|
|
41
41
|
"./db/schema": "./dist/db/schema.js",
|
|
42
42
|
"./db/drizzle-config": "./dist/db/drizzle-config.js",
|
|
43
43
|
"./client": "./dist/client/index.js",
|
|
44
|
+
"./blocks": "./dist/client/blocks/index.js",
|
|
45
|
+
"./blocks/server": "./dist/client/blocks/server.js",
|
|
44
46
|
"./client/AgentPanel": "./dist/client/AgentPanel.js",
|
|
45
47
|
"./client/application-state": "./dist/client/application-state.js",
|
|
46
48
|
"./client/api-path": "./dist/client/api-path.js",
|
|
@@ -120,7 +122,7 @@
|
|
|
120
122
|
"dev": "tsc --watch",
|
|
121
123
|
"typecheck": "tsc --noEmit",
|
|
122
124
|
"test": "vitest --run src",
|
|
123
|
-
"prepack": "npm run build && cp ../../README.md ./README.md",
|
|
125
|
+
"prepack": "tsx ../../scripts/sync-workspace-core-skills.ts --check && npm run build && cp ../../README.md ./README.md",
|
|
124
126
|
"prepublishOnly": "npm run build"
|
|
125
127
|
},
|
|
126
128
|
"dependencies": {
|
|
@@ -151,12 +153,23 @@
|
|
|
151
153
|
"@tabler/icons-react": "^3",
|
|
152
154
|
"@tailwindcss/typography": "^0.5.19",
|
|
153
155
|
"@tanstack/react-table": "^8.21.3",
|
|
154
|
-
"@tiptap/core": "^3.
|
|
155
|
-
"@tiptap/extension-
|
|
156
|
-
"@tiptap/extension-
|
|
157
|
-
"@tiptap/
|
|
158
|
-
"@tiptap/
|
|
159
|
-
"@tiptap/
|
|
156
|
+
"@tiptap/core": "^3.26.0",
|
|
157
|
+
"@tiptap/extension-code-block-lowlight": "^3.26.0",
|
|
158
|
+
"@tiptap/extension-collaboration": "^3.26.0",
|
|
159
|
+
"@tiptap/extension-collaboration-caret": "^3.26.0",
|
|
160
|
+
"@tiptap/extension-image": "^3.26.0",
|
|
161
|
+
"@tiptap/extension-link": "^3.26.0",
|
|
162
|
+
"@tiptap/extension-placeholder": "^3.26.0",
|
|
163
|
+
"@tiptap/extension-table": "^3.26.0",
|
|
164
|
+
"@tiptap/extension-table-cell": "^3.26.0",
|
|
165
|
+
"@tiptap/extension-table-header": "^3.26.0",
|
|
166
|
+
"@tiptap/extension-table-row": "^3.26.0",
|
|
167
|
+
"@tiptap/extension-task-item": "^3.26.0",
|
|
168
|
+
"@tiptap/extension-task-list": "^3.26.0",
|
|
169
|
+
"@tiptap/pm": "^3.26.0",
|
|
170
|
+
"@tiptap/react": "^3.26.0",
|
|
171
|
+
"@tiptap/starter-kit": "^3.26.0",
|
|
172
|
+
"@tiptap/y-tiptap": "^3.0.4",
|
|
160
173
|
"@uiw/react-codemirror": "^4.25.10",
|
|
161
174
|
"better-auth": "1.6.0",
|
|
162
175
|
"better-sqlite3": "^12.8.0",
|
|
@@ -167,10 +180,12 @@
|
|
|
167
180
|
"drizzle-orm": "^0.45.2",
|
|
168
181
|
"fzstd": "^0.1.1",
|
|
169
182
|
"h3": "^2.0.1-rc.20",
|
|
183
|
+
"highlight.js": "^11.11.1",
|
|
170
184
|
"isbot": "^5",
|
|
171
185
|
"jiti": "^2.6.1",
|
|
172
186
|
"jose": "^6.2.2",
|
|
173
187
|
"kiwi-schema": "^0.5.0",
|
|
188
|
+
"lowlight": "^3.3.0",
|
|
174
189
|
"minimatch": "^10.0.0",
|
|
175
190
|
"nanoid": "^5.1.9",
|
|
176
191
|
"nitro": "3.0.260415-beta",
|
|
@@ -186,7 +201,7 @@
|
|
|
186
201
|
"tiptap-markdown": "^0.9.0",
|
|
187
202
|
"tw-animate-css": "1.4.0",
|
|
188
203
|
"y-protocols": "^1.0.7",
|
|
189
|
-
"yjs": "^13.6.
|
|
204
|
+
"yjs": "^13.6.31",
|
|
190
205
|
"zod": "^4.3.6"
|
|
191
206
|
},
|
|
192
207
|
"peerDependencies": {
|
|
@@ -327,8 +342,8 @@
|
|
|
327
342
|
"express": "^5.2.1",
|
|
328
343
|
"node-pty": "^1.1.0",
|
|
329
344
|
"playwright": "^1.60.0",
|
|
330
|
-
"react": "^19.2.
|
|
331
|
-
"react-dom": "19.2.
|
|
345
|
+
"react": "^19.2.7",
|
|
346
|
+
"react-dom": "^19.2.7",
|
|
332
347
|
"react-router": "^7.16.0",
|
|
333
348
|
"tailwindcss": "catalog:",
|
|
334
349
|
"typescript": "^6.0.3",
|
|
@@ -171,6 +171,7 @@ Older actions use a bare async function export with `parseArgs`:
|
|
|
171
171
|
import { parseArgs, loadEnv, fail } from "@agent-native/core";
|
|
172
172
|
|
|
173
173
|
export default async function myAction(args: string[]) {
|
|
174
|
+
// Only for deploy-level runtime config. User/org credentials use secrets/OAuth.
|
|
174
175
|
loadEnv();
|
|
175
176
|
const parsed = parseArgs(args);
|
|
176
177
|
// ...
|
|
@@ -185,7 +186,9 @@ This still works but is not auto-exposed as HTTP. Prefer `defineAction` for all
|
|
|
185
186
|
- **Return structured data.** Return objects/arrays, not `JSON.stringify()`.
|
|
186
187
|
- **Use `http: { method: "GET" }`** for read-only actions. Default is POST.
|
|
187
188
|
- **Use `http: false`** for agent-only actions (`navigate`, `view-screen`).
|
|
188
|
-
- **Use `loadEnv()`**
|
|
189
|
+
- **Use `loadEnv()`** only for deploy-level configuration. User/org/workspace
|
|
190
|
+
credentials belong in the encrypted secrets/credential/OAuth stores, never as
|
|
191
|
+
hardcoded literals, shared env fallbacks, logs, or action responses.
|
|
189
192
|
- **Use `fail()`** for user-friendly error messages (exits with message, no stack trace).
|
|
190
193
|
- **Import from `@agent-native/core`** — Don't redefine `parseArgs()` or other utilities locally.
|
|
191
194
|
|
|
@@ -82,9 +82,16 @@ new Function(userInput); // NEVER
|
|
|
82
82
|
|
|
83
83
|
## Secrets Management
|
|
84
84
|
|
|
85
|
+
Never hardcode credential values or real private data. Source, docs, tests,
|
|
86
|
+
fixtures, prompts, screenshots, seed data, application state, action responses,
|
|
87
|
+
and generated app/extension content may name credential keys, but must never
|
|
88
|
+
contain API key values, tokens, webhook URLs, signing secrets, private
|
|
89
|
+
Builder/internal data, or customer data.
|
|
90
|
+
|
|
85
91
|
| Secret type | Where to store | Why |
|
|
86
|
-
|
|
87
|
-
| API keys
|
|
92
|
+
|-------------|----------------|-----|
|
|
93
|
+
| User/org/workspace API keys, service tokens, webhook secrets | Secrets registry / `app_secrets` vault or `saveCredential` / `resolveCredential` | Encrypted, scoped, never sent to the client |
|
|
94
|
+
| Deploy-only infrastructure secrets | Deployment env vars (`.env` only for local dev) | Server-side runtime configuration |
|
|
88
95
|
| OAuth tokens (Google, GitHub) | `oauth_tokens` store | Per-user, per-provider, server-side |
|
|
89
96
|
| App configuration | `settings` store | OK for non-secret config (themes, preferences) |
|
|
90
97
|
| Session tokens | Framework handles | Automatic via Better Auth |
|
|
@@ -94,6 +101,8 @@ new Function(userInput); // NEVER
|
|
|
94
101
|
- Never return secrets in action responses — they may appear in agent chat or client UI
|
|
95
102
|
- Never log secrets (tokens, keys, passwords)
|
|
96
103
|
- Never commit `.env` files — they're gitignored by default
|
|
104
|
+
- Use env vars only for deploy-level secrets. User/org/workspace credentials
|
|
105
|
+
must use the encrypted secrets/credential/OAuth stores.
|
|
97
106
|
- Access env vars via `process.env` in actions/server code, never send them to the client
|
|
98
107
|
|
|
99
108
|
## Auth Patterns
|
|
@@ -193,7 +202,7 @@ A2A_SECRET=your-shared-secret-at-least-32-chars
|
|
|
193
202
|
```
|
|
194
203
|
|
|
195
204
|
**How it works:**
|
|
196
|
-
1. App A signs a JWT with `A2A_SECRET` containing `sub: "
|
|
205
|
+
1. App A signs a JWT with `A2A_SECRET` containing `sub: "user@example.com"`
|
|
197
206
|
2. App B receives the call, verifies the JWT signature
|
|
198
207
|
3. App B sets `AGENT_USER_EMAIL` from the verified `sub` claim
|
|
199
208
|
4. Data scoping applies — App B only shows steve's data
|
|
@@ -206,7 +215,7 @@ Without `A2A_SECRET`, A2A calls are unauthenticated (fine for local dev, not pro
|
|
|
206
215
|
2. **Always use `defineAction` with a Zod `schema:`** for input validation on user-facing actions.
|
|
207
216
|
3. **Never concatenate user input into SQL** — use parameterized queries or Drizzle ORM.
|
|
208
217
|
4. **Never use `dangerouslySetInnerHTML`** or `innerHTML` with user-controlled content.
|
|
209
|
-
5. **Never
|
|
218
|
+
5. **Never hardcode or expose secrets** — no settings, application state, source code, fixtures, logs, or responses. Use the secrets registry / vault, scoped credentials, OAuth stores, or deploy-level env vars as appropriate.
|
|
210
219
|
6. **Never bypass scoping** — don't raw-query tables without going through `db-query`/`db-exec`.
|
|
211
220
|
7. **Never create unprotected routes that modify data** — use `defineAction` or check `getSession()`.
|
|
212
221
|
8. **Don't hardcode emails** — use `AGENT_USER_EMAIL` environment variable.
|
|
@@ -16,7 +16,7 @@ There are three storage layers, each for a different kind of data:
|
|
|
16
16
|
|
|
17
17
|
### 1. Settings — app configuration
|
|
18
18
|
|
|
19
|
-
Key-value store for persistent config that the user or agent can change. Theme, preferences, integration
|
|
19
|
+
Key-value store for persistent non-secret config that the user or agent can change. Theme, preferences, integration settings, availability schedules.
|
|
20
20
|
|
|
21
21
|
```ts
|
|
22
22
|
import { getSetting, putSetting } from "@agent-native/core/settings";
|
|
@@ -88,6 +88,15 @@ const tokens = await getOAuthTokens("google", "user@gmail.com");
|
|
|
88
88
|
const accounts = await listOAuthAccounts("google");
|
|
89
89
|
```
|
|
90
90
|
|
|
91
|
+
### 5. Secrets / Credentials — encrypted values
|
|
92
|
+
|
|
93
|
+
For API keys, service tokens, webhook secrets, and user/org/workspace
|
|
94
|
+
credentials. Register user-facing secrets with the secrets registry and read
|
|
95
|
+
them server-side with `readAppSecret`, or use `saveCredential` /
|
|
96
|
+
`resolveCredential` for scoped credential lookup. Never store these values in
|
|
97
|
+
settings, application state, source code, docs, examples, logs, or action
|
|
98
|
+
responses.
|
|
99
|
+
|
|
91
100
|
## Which Layer to Use
|
|
92
101
|
|
|
93
102
|
| Data | Layer | Why |
|
|
@@ -96,6 +105,7 @@ const accounts = await listOAuthAccounts("google");
|
|
|
96
105
|
| What the user sees on screen | Application State | Ephemeral, real-time sync, agent ↔ UI bridge |
|
|
97
106
|
| Compose drafts, wizard steps | Application State | Temporary, deleted when done |
|
|
98
107
|
| Domain records (forms, bookings) | Drizzle table | Needs schema, queries, relationships |
|
|
108
|
+
| API keys, service tokens, webhook secrets | Secrets / credentials | Encrypted and scoped; never client-readable |
|
|
99
109
|
| OAuth refresh tokens | OAuth Tokens | Secure, per-provider, per-account |
|
|
100
110
|
|
|
101
111
|
## Environment Variables
|
|
@@ -107,10 +117,12 @@ Infrastructure config stays in `.env` — these differ per deployment:
|
|
|
107
117
|
- `GOOGLE_CLIENT_ID`, `GOOGLE_CLIENT_SECRET` — OAuth app credentials
|
|
108
118
|
- `ACCESS_TOKEN` — production auth token
|
|
109
119
|
|
|
110
|
-
Everything else (user settings,
|
|
120
|
+
Everything else (user settings, app state, domain data) goes in SQL through the
|
|
121
|
+
appropriate store. User/org/workspace credential values go in the encrypted
|
|
122
|
+
secrets/credential stores, not plain settings rows.
|
|
111
123
|
|
|
112
124
|
## Security Rules
|
|
113
125
|
|
|
114
|
-
- **Never store API keys or secrets in Settings or Application State** — use
|
|
126
|
+
- **Never store API keys or secrets in Settings or Application State** — use the secrets registry / vault or `saveCredential` / `resolveCredential` for API keys and service tokens, deploy env vars only for deploy-level secrets, and `oauth_tokens` for OAuth credentials. Settings and application state are readable by the client.
|
|
115
127
|
- **Every Drizzle table with user data must have `owner_email`** — the framework auto-scopes queries in production so users only see their own data. Run `pnpm action db-check-scoping` to verify. See the `security` skill for the full model.
|
|
116
128
|
- **Never return secrets in action responses** — action responses may be visible in the agent chat or sent to the client. Keep credentials server-side only.
|
|
@@ -11,6 +11,7 @@ This is an **@agent-native/core** application -- the AI agent and UI share state
|
|
|
11
11
|
3. **Actions for app operations** -- `pnpm action <name>` dispatches to callable action files in `actions/`; `defineAction` also auto-exposes those operations at `/_agent-native/actions/:name` for the UI. Do not create custom REST routes that re-export actions.
|
|
12
12
|
4. **Live sync keeps the UI current** -- Database writes stream over `/_agent-native/events` first, with `/_agent-native/poll` as the fallback. **When you (the agent) write data, the UI must reflect the change without a manual refresh.** This is non-negotiable. Use `useActionQuery` / `useActionMutation` for action-backed data (preferred). If you use raw `useQuery`, fold `useChangeVersions([<source>, "action"])` into the key for targeted refreshes. See the `real-time-sync` and `adding-a-feature` skills.
|
|
13
13
|
5. **Agent can update code** -- The agent can modify this app's source code directly.
|
|
14
|
+
6. **No hardcoded secrets or private data** -- Never put API keys, tokens, webhook URLs, signing secrets, private Builder/internal data, customer data, or credential-looking literals in source, docs, tests, fixtures, prompts, screenshots, application state, action responses, or generated content. Use secrets/OAuth/runtime configuration and obvious placeholders in examples.
|
|
14
15
|
|
|
15
16
|
### Database Code
|
|
16
17
|
|
|
@@ -120,6 +120,8 @@ agentChat.submit("Generate something");
|
|
|
120
120
|
|
|
121
121
|
Local development defaults to a SQLite file at `data/app.db`. That local file is for development; containers, previews, and serverless deploys can reset their filesystem. For production/cloud deployment, set `DATABASE_URL` to point to a persistent SQL database. Turso is optional, not required; common choices include Neon, Supabase, Turso/libSQL, plain Postgres, durable SQLite, D1 bindings, and Builder.io-managed environments when available.
|
|
122
122
|
|
|
123
|
+
Real credential values belong only in local `.env` files, deployment configuration, or registered secrets/settings UI. Never commit, document, log, return, paste, or include real keys, tokens, webhook URLs, signing secrets, or private data in examples; use empty values or obvious placeholders.
|
|
124
|
+
|
|
123
125
|
When adding app data, define tables with `@agent-native/core/db/schema` helpers and use Drizzle's query builder for reads/writes. Do not import dialect-specific schema helpers from `drizzle-orm/sqlite-core` or `drizzle-orm/pg-core`, and do not write raw SQL in normal actions or handlers when Drizzle can express the query. Raw SQL belongs in additive migrations, health checks, or carefully scoped maintenance.
|
|
124
126
|
|
|
125
127
|
| Variable | Required | Description |
|
|
@@ -4,6 +4,8 @@ description: >-
|
|
|
4
4
|
How agents call other agents via the A2A (agent-to-agent) JSON-RPC protocol.
|
|
5
5
|
Use when enabling inter-agent communication, exposing agent skills to other
|
|
6
6
|
agents, or calling external agents from scripts.
|
|
7
|
+
metadata:
|
|
8
|
+
internal: true
|
|
7
9
|
---
|
|
8
10
|
|
|
9
11
|
# A2A Protocol (Agent-to-Agent)
|
|
@@ -175,10 +177,15 @@ submitted → working → completed
|
|
|
175
177
|
|
|
176
178
|
A2A uses bearer token auth. The server reads the token from the environment variable specified by `apiKeyEnv`:
|
|
177
179
|
|
|
178
|
-
- Set `A2A_API_KEY
|
|
179
|
-
- Callers pass it as `Authorization: Bearer
|
|
180
|
+
- Set `A2A_API_KEY=<A2A_API_KEY_VALUE>` in the server's deployment environment
|
|
181
|
+
- Callers pass it as `Authorization: Bearer <A2A_API_KEY_VALUE>`
|
|
180
182
|
- The agent card endpoint (`/.well-known/agent-card.json`) is public — no auth needed for discovery
|
|
181
183
|
|
|
184
|
+
Never hardcode the bearer token in source, docs, prompts, app state, action
|
|
185
|
+
descriptions, client bundles, or examples. A2A tokens are deploy-level secrets
|
|
186
|
+
unless a specific app designs a scoped credential flow; read them from secure
|
|
187
|
+
runtime configuration and never log or return them.
|
|
188
|
+
|
|
182
189
|
## Message Parts
|
|
183
190
|
|
|
184
191
|
Messages contain typed parts:
|
|
@@ -247,5 +254,5 @@ import type {
|
|
|
247
254
|
## Related Skills
|
|
248
255
|
|
|
249
256
|
- **delegate-to-agent** — For work the local agent handles. Use A2A when the work goes to a different agent.
|
|
250
|
-
- **
|
|
257
|
+
- **actions** — A2A calls typically happen inside actions
|
|
251
258
|
- **storing-data** — Results from A2A calls are stored in SQL like any other data
|
|
@@ -2,20 +2,45 @@
|
|
|
2
2
|
name: actions
|
|
3
3
|
description: >-
|
|
4
4
|
How to create and run agent actions. Actions are the single source of truth
|
|
5
|
-
for app operations — the agent calls them as tools
|
|
6
|
-
|
|
7
|
-
or wiring up frontend data fetching.
|
|
5
|
+
for app operations — the agent calls them as tools and frontend code calls
|
|
6
|
+
them through client hooks. Use when creating a new action, adding an API
|
|
7
|
+
integration, or wiring up frontend data fetching.
|
|
8
|
+
metadata:
|
|
9
|
+
internal: true
|
|
8
10
|
---
|
|
9
11
|
|
|
10
12
|
# Agent Actions
|
|
11
13
|
|
|
12
14
|
## Rule
|
|
13
15
|
|
|
14
|
-
Actions in `actions/` are the **single source of truth** for app operations. The agent calls them as tools, and the
|
|
16
|
+
Actions in `actions/` are the **single source of truth** for app operations. The agent calls them as tools, and the frontend calls them through `useActionQuery` / `useActionMutation`. The framework owns the HTTP transport behind those hooks. No duplicate `/api/` routes needed.
|
|
17
|
+
|
|
18
|
+
Before creating any custom REST/API route for app data, inspect `actions/` and the action table in `AGENTS.md`. If an action already exists, call it directly from the agent or with `useActionQuery` / `useActionMutation` from the UI. If the capability is missing, create or update a `defineAction`. Do not add `/api/*`, `server/routes/*`, or other pass-through endpoints whose main job is to call, repackage, or re-export an action.
|
|
15
19
|
|
|
16
20
|
## Why
|
|
17
21
|
|
|
18
|
-
Actions give the agent callable tools with structured input/output, AND they give the frontend
|
|
22
|
+
Actions give the agent callable tools with structured input/output, AND they give the frontend a typed client contract through hooks. One implementation serves both the agent and the UI. They keep the agent's chat context clean, they're reusable, and they can be tested independently.
|
|
23
|
+
|
|
24
|
+
## Keep the Action Surface Small and Orthogonal
|
|
25
|
+
|
|
26
|
+
Every agent-exposed action is a tool in the model's context window. There is a real cost to each one: more tools means more for the model to read, disambiguate, and choose between, which degrades tool-selection quality. Treat the action list like an API you have to maintain — add the fewest, most orthogonal actions that cover the capability, not one per UI affordance.
|
|
27
|
+
|
|
28
|
+
- **Prefer one CRUD-style `update` over N per-field actions.** A single `update-<thing>` that takes a patch of optional fields beats `update-<thing>-name`, `update-<thing>-order`, `update-<thing>-color`, … The agent (and the UI) pass only the fields that change. Same for `create`/`delete` — one orthogonal action per resource, not one per code path.
|
|
29
|
+
- **Reach for a generic query / escape hatch before minting a new read action.** If the agent needs more or different data, do not add `get-<thing>-by-x`, `list-<thing>-filtered-by-y`, etc. For provider data, expose the shared `provider-api-catalog` / `provider-api-docs` / `provider-api-request` trio (see `templates/dispatch/actions/`) so the agent can hit any endpoint or filter without a new action each time. For app data in dev, the `db-query` tool already answers arbitrary read questions.
|
|
30
|
+
- **Hide UI-only or purely programmatic actions from the model with `agentTool: false`.** An action that only the frontend or an HTTP/cron caller needs should not spend a slot in the model's tool list. `agentTool: false` keeps it callable from `useActionMutation` / `callAction` / `/_agent-native/actions/<name>` while removing it from every agent tool surface (in-app assistant, MCP, A2A).
|
|
31
|
+
- **`agentTool: false` is NOT `toolCallable: false`.** They are different switches:
|
|
32
|
+
- `agentTool: false` → hidden from the **model entirely** (it is no longer a tool the agent can see or call). Still frontend/HTTP-callable.
|
|
33
|
+
- `toolCallable: false` → only blocks the **sandboxed extension ("tools") iframe bridge** (`appAction(...)`). The action stays fully visible to the model, the UI, the CLI, MCP, and A2A. Use it for high-blast-radius operations (account/org/auth changes), not for trimming the tool list.
|
|
34
|
+
- **Remove or hide stale actions.** When the UI stops using an action, delete it or set `agentTool: false` — do not leave it exposed to the model as dead tool weight. The advisory audit below helps you spot these.
|
|
35
|
+
|
|
36
|
+
### Audit Script (Advisory)
|
|
37
|
+
|
|
38
|
+
`pnpm actions:audit [template ...]` (or `node scripts/audit-template-actions.mjs`) statically scans a template's `actions/` and prints two kinds of suggestions:
|
|
39
|
+
|
|
40
|
+
1. **Likely UI-dead** — HTTP-exposed mutating actions whose name is never referenced under `app/` (candidates to delete or mark `agentTool: false`).
|
|
41
|
+
2. **Likely redundant clusters** — groups like `update-foo-name` / `update-foo-order` that could collapse into one orthogonal `update-foo`.
|
|
42
|
+
|
|
43
|
+
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.
|
|
19
44
|
|
|
20
45
|
## How to Create an Action
|
|
21
46
|
|
|
@@ -45,14 +70,59 @@ export default defineAction({
|
|
|
45
70
|
|
|
46
71
|
The `schema` field accepts a Zod schema (or any Standard Schema-compatible library). It provides runtime validation with clear error messages (400 for HTTP, error result for agent), full TypeScript type inference for `run()` args, and auto-generated JSON Schema for the agent's tool definition. `zod` is a dependency of all templates.
|
|
47
72
|
|
|
73
|
+
When an action reads or writes app data, use Drizzle's query builder and portable operators from `drizzle-orm`. Do not use raw SQL, `getDbExec()`, or dialect-specific schema imports in normal actions unless there is a documented reason Drizzle cannot express the query.
|
|
74
|
+
|
|
75
|
+
When an action calls an external service, never hardcode API keys, bearer
|
|
76
|
+
tokens, webhook URLs, signing secrets, OAuth refresh tokens, private
|
|
77
|
+
Builder/internal data, or customer data. Read user/org/workspace credentials
|
|
78
|
+
from `readAppSecret`, `resolveCredential`, OAuth token helpers, or the provider
|
|
79
|
+
API credential adapter. Use `process.env` only for explicitly deploy-level
|
|
80
|
+
configuration, and keep examples to obvious placeholders.
|
|
81
|
+
|
|
48
82
|
Tips:
|
|
49
83
|
- Use `.describe()` for parameter descriptions
|
|
50
84
|
- Use `.optional()` for optional params
|
|
51
|
-
- Use `z.coerce.number()`
|
|
85
|
+
- Use `z.coerce.number()` for numeric params that arrive as strings from HTTP.
|
|
86
|
+
For booleans, use an explicit string parser/helper instead of
|
|
87
|
+
`z.coerce.boolean()` because JavaScript treats any non-empty string,
|
|
88
|
+
including `"false"`, as truthy.
|
|
52
89
|
- Use `z.enum(["draft", "published"])` for constrained values
|
|
53
90
|
|
|
54
91
|
The legacy `parameters` field (plain JSON Schema object) still works as a fallback but does not provide runtime validation or type inference.
|
|
55
92
|
|
|
93
|
+
## Decision Order
|
|
94
|
+
|
|
95
|
+
When you need app data or a mutation:
|
|
96
|
+
|
|
97
|
+
1. **Use an existing action** if one already performs the operation.
|
|
98
|
+
2. **Create or extend a `defineAction`** when the agent and UI both need a new operation.
|
|
99
|
+
3. **Create a custom route only for route-only concerns** such as uploads, streaming, webhooks, OAuth callbacks, or a non-JSON protocol.
|
|
100
|
+
|
|
101
|
+
Do not build an umbrella REST API to make actions "easier" to call. Actions are already callable by agents, CLIs, React hooks, HTTP, MCP/A2A exposure, and external hosts through the framework.
|
|
102
|
+
|
|
103
|
+
## Flexible Provider APIs
|
|
104
|
+
|
|
105
|
+
For provider integrations used in ad hoc analysis, querying, reporting, or
|
|
106
|
+
cross-source research, do not hardcode every provider endpoint as a separate
|
|
107
|
+
rigid action. Expose the shared provider API action trio instead:
|
|
108
|
+
|
|
109
|
+
- `provider-api-catalog`: lists provider base URLs, auth style, credential keys,
|
|
110
|
+
docs/spec URLs, placeholders, and examples without exposing secrets.
|
|
111
|
+
- `provider-api-docs`: fetches registered provider docs/spec URLs when the
|
|
112
|
+
exact endpoint, filter operator, payload shape, or pagination contract is
|
|
113
|
+
uncertain.
|
|
114
|
+
- `provider-api-request`: makes a constrained authenticated HTTP request to the
|
|
115
|
+
provider host, injects configured credentials, blocks private/internal URLs,
|
|
116
|
+
and redacts secrets.
|
|
117
|
+
|
|
118
|
+
Use `@agent-native/core/provider-api` as the shared substrate. A template should
|
|
119
|
+
only add a thin credential adapter when it has app-specific credential lookup
|
|
120
|
+
rules. Keep `provider-api-request` `http: false` unless you have a separate UI
|
|
121
|
+
permission model for arbitrary provider writes. Specific actions such as
|
|
122
|
+
`hubspot-deals`, `search-emails`, or `sync-source` are convenience shortcuts,
|
|
123
|
+
not capability limits; agents should fall back to the provider API trio when a
|
|
124
|
+
question requires an endpoint or filter that the shortcut does not model.
|
|
125
|
+
|
|
56
126
|
### The `http` Option
|
|
57
127
|
|
|
58
128
|
Controls how the action is exposed as an HTTP endpoint:
|
|
@@ -99,7 +169,7 @@ run: async (args) => {
|
|
|
99
169
|
|
|
100
170
|
## Frontend Hooks
|
|
101
171
|
|
|
102
|
-
The frontend calls
|
|
172
|
+
The frontend calls actions using React Query hooks from `@agent-native/core/client`. Components should not hand-write `fetch("/_agent-native/actions/...")`; add or reuse a client hook/helper instead. Use `callAction` from the same package for imperative cases that do not fit a hook, such as debounced search, prefetching, or non-React event handlers.
|
|
103
173
|
|
|
104
174
|
### `useActionQuery` — for GET actions
|
|
105
175
|
|
|
@@ -135,6 +205,17 @@ function AddMealButton() {
|
|
|
135
205
|
|
|
136
206
|
Mutations automatically invalidate all `["action"]` query keys on success, so GET queries refetch.
|
|
137
207
|
|
|
208
|
+
### `callAction` — for imperative client code
|
|
209
|
+
|
|
210
|
+
```ts
|
|
211
|
+
import { callAction } from "@agent-native/core/client";
|
|
212
|
+
|
|
213
|
+
const people = await callAction("search-people", { query }, { method: "GET" });
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
Prefer hooks in React data flows. Use `callAction` when a hook would be awkward;
|
|
217
|
+
do not hand-write action route fetches in components.
|
|
218
|
+
|
|
138
219
|
## How to Run (Agent)
|
|
139
220
|
|
|
140
221
|
```bash
|
|
@@ -161,7 +242,7 @@ Most operations should be actions. You only need custom routes in `server/routes
|
|
|
161
242
|
- **Webhooks** — external services POST to a specific URL
|
|
162
243
|
- **OAuth callbacks** — redirect-based flows that need specific URL patterns
|
|
163
244
|
|
|
164
|
-
If it's a standard CRUD operation
|
|
245
|
+
If it's a standard CRUD operation, data query, or a wrapper around an action, use the action instead.
|
|
165
246
|
|
|
166
247
|
## Legacy Pattern (bare export)
|
|
167
248
|
|
|
@@ -185,9 +266,15 @@ This still works but is not auto-exposed as HTTP. Prefer `defineAction` for all
|
|
|
185
266
|
- **Return structured data.** Return objects/arrays, not `JSON.stringify()`.
|
|
186
267
|
- **Use `http: { method: "GET" }`** for read-only actions. Default is POST.
|
|
187
268
|
- **Use `http: false`** for agent-only actions (`navigate`, `view-screen`).
|
|
188
|
-
- **Use `
|
|
269
|
+
- **Use `agentTool: false`** for UI-only / programmatic actions that should NOT be a tool in the model's context window. It stays frontend/HTTP-callable but is hidden from the agent. Distinct from `toolCallable: false`, which only blocks the sandboxed extension iframe bridge.
|
|
270
|
+
- **Document reusable actions.** If a new action should be called by agents outside one narrow screen, update `AGENTS.md` with when to use it, important args, and which return fields to preserve.
|
|
271
|
+
- **Promote workflow-heavy actions to skills.** If the action is part of a provider-backed, cross-app, MCP/A2A, or multi-step workflow, create or update a skill in `.agents/skills/` and add app-skill visibility (`internal`, `exported`, or `both`) when it should ship through a marketplace.
|
|
272
|
+
- **Use `loadEnv()`** only for deploy-level configuration. User/org/workspace
|
|
273
|
+
credentials belong in the encrypted secrets/credential/OAuth stores, never as
|
|
274
|
+
hardcoded literals or shared env fallbacks.
|
|
189
275
|
- **Use `fail()`** for user-friendly error messages (exits with message, no stack trace).
|
|
190
276
|
- **Import from `@agent-native/core`** — Don't redefine `parseArgs()` or other utilities locally.
|
|
277
|
+
- **Do not re-export actions as REST.** The mounted `/_agent-native/actions/:name` endpoint is the REST surface; duplicating it under `/api/*` creates drift and hides the operation from agents.
|
|
191
278
|
|
|
192
279
|
## Common Patterns
|
|
193
280
|
|
|
@@ -260,5 +347,6 @@ export default defineAction({
|
|
|
260
347
|
|
|
261
348
|
- **storing-data** — Actions read/write data in SQL
|
|
262
349
|
- **delegate-to-agent** — The agent invokes actions via `pnpm action <name>`
|
|
263
|
-
- **real-time-sync** — Database writes from actions trigger
|
|
350
|
+
- **real-time-sync** — Database writes from actions trigger change events to update the UI
|
|
264
351
|
- **adding-a-feature** — Actions are area 2 of the four-area checklist
|
|
352
|
+
- **client-methods** — Client code uses named helpers/hooks instead of raw REST calls
|