@agent-native/core 0.6.1 → 0.7.1
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 +43 -3
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +154 -4
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/agent/types.d.ts +1 -1
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/cli/create-workspace.d.ts +8 -0
- package/dist/cli/create-workspace.d.ts.map +1 -0
- package/dist/cli/create-workspace.js +18 -0
- package/dist/cli/create-workspace.js.map +1 -0
- package/dist/cli/create.d.ts +35 -7
- package/dist/cli/create.d.ts.map +1 -1
- package/dist/cli/create.js +444 -251
- package/dist/cli/create.js.map +1 -1
- package/dist/cli/index.js +59 -5
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/workspacify.d.ts +18 -0
- package/dist/cli/workspacify.d.ts.map +1 -0
- package/dist/cli/workspacify.js +74 -0
- package/dist/cli/workspacify.js.map +1 -0
- package/dist/client/AgentPanel.d.ts +1 -1
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +63 -225
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/components/CodeRequiredDialog.d.ts.map +1 -1
- package/dist/client/components/CodeRequiredDialog.js +86 -5
- package/dist/client/components/CodeRequiredDialog.js.map +1 -1
- package/dist/client/composer/MentionPopover.d.ts.map +1 -1
- package/dist/client/composer/MentionPopover.js +15 -2
- package/dist/client/composer/MentionPopover.js.map +1 -1
- package/dist/client/composer/TiptapComposer.d.ts.map +1 -1
- package/dist/client/composer/TiptapComposer.js +3 -1
- package/dist/client/composer/TiptapComposer.js.map +1 -1
- package/dist/client/composer/types.d.ts +1 -1
- package/dist/client/composer/types.d.ts.map +1 -1
- package/dist/client/integrations/IntegrationsPanel.d.ts.map +1 -1
- package/dist/client/integrations/IntegrationsPanel.js +22 -9
- package/dist/client/integrations/IntegrationsPanel.js.map +1 -1
- package/dist/client/onboarding/OnboardingBanner.d.ts +13 -0
- package/dist/client/onboarding/OnboardingBanner.d.ts.map +1 -0
- package/dist/client/onboarding/OnboardingBanner.js +36 -0
- package/dist/client/onboarding/OnboardingBanner.js.map +1 -0
- package/dist/client/onboarding/OnboardingPanel.d.ts +16 -0
- package/dist/client/onboarding/OnboardingPanel.d.ts.map +1 -0
- package/dist/client/onboarding/OnboardingPanel.js +360 -0
- package/dist/client/onboarding/OnboardingPanel.js.map +1 -0
- package/dist/client/onboarding/SetupButton.d.ts +10 -0
- package/dist/client/onboarding/SetupButton.d.ts.map +1 -0
- package/dist/client/onboarding/SetupButton.js +26 -0
- package/dist/client/onboarding/SetupButton.js.map +1 -0
- package/dist/client/onboarding/index.d.ts +12 -0
- package/dist/client/onboarding/index.d.ts.map +1 -0
- package/dist/client/onboarding/index.js +11 -0
- package/dist/client/onboarding/index.js.map +1 -0
- package/dist/client/onboarding/use-onboarding.d.ts +34 -0
- package/dist/client/onboarding/use-onboarding.d.ts.map +1 -0
- package/dist/client/onboarding/use-onboarding.js +101 -0
- package/dist/client/onboarding/use-onboarding.js.map +1 -0
- package/dist/client/org/TeamPage.d.ts +6 -1
- package/dist/client/org/TeamPage.d.ts.map +1 -1
- package/dist/client/org/TeamPage.js +85 -14
- package/dist/client/org/TeamPage.js.map +1 -1
- package/dist/client/resources/ResourceEditor.d.ts.map +1 -1
- package/dist/client/resources/ResourceEditor.js +48 -77
- package/dist/client/resources/ResourceEditor.js.map +1 -1
- package/dist/client/resources/ResourceTree.d.ts.map +1 -1
- package/dist/client/resources/ResourceTree.js +16 -3
- package/dist/client/resources/ResourceTree.js.map +1 -1
- package/dist/client/resources/ResourcesPanel.d.ts.map +1 -1
- package/dist/client/resources/ResourcesPanel.js +135 -9
- package/dist/client/resources/ResourcesPanel.js.map +1 -1
- package/dist/client/resources/use-resources.d.ts +5 -0
- package/dist/client/resources/use-resources.d.ts.map +1 -1
- package/dist/client/resources/use-resources.js.map +1 -1
- package/dist/client/settings/AgentsSection.d.ts +2 -0
- package/dist/client/settings/AgentsSection.d.ts.map +1 -0
- package/dist/client/settings/AgentsSection.js +198 -0
- package/dist/client/settings/AgentsSection.js.map +1 -0
- package/dist/client/settings/BackgroundAgentSection.d.ts +2 -0
- package/dist/client/settings/BackgroundAgentSection.d.ts.map +1 -0
- package/dist/client/settings/BackgroundAgentSection.js +46 -0
- package/dist/client/settings/BackgroundAgentSection.js.map +1 -0
- package/dist/client/settings/BrowserSection.d.ts +2 -0
- package/dist/client/settings/BrowserSection.d.ts.map +1 -0
- package/dist/client/settings/BrowserSection.js +10 -0
- package/dist/client/settings/BrowserSection.js.map +1 -0
- package/dist/client/settings/ComingSoonSection.d.ts +13 -0
- package/dist/client/settings/ComingSoonSection.d.ts.map +1 -0
- package/dist/client/settings/ComingSoonSection.js +9 -0
- package/dist/client/settings/ComingSoonSection.js.map +1 -0
- package/dist/client/settings/LLMSection.d.ts +2 -0
- package/dist/client/settings/LLMSection.d.ts.map +1 -0
- package/dist/client/settings/LLMSection.js +64 -0
- package/dist/client/settings/LLMSection.js.map +1 -0
- package/dist/client/settings/SettingsPanel.d.ts +8 -0
- package/dist/client/settings/SettingsPanel.d.ts.map +1 -0
- package/dist/client/settings/SettingsPanel.js +118 -0
- package/dist/client/settings/SettingsPanel.js.map +1 -0
- package/dist/client/settings/SettingsSection.d.ts +19 -0
- package/dist/client/settings/SettingsSection.d.ts.map +1 -0
- package/dist/client/settings/SettingsSection.js +10 -0
- package/dist/client/settings/SettingsSection.js.map +1 -0
- package/dist/client/settings/index.d.ts +3 -0
- package/dist/client/settings/index.d.ts.map +1 -0
- package/dist/client/settings/index.js +3 -0
- package/dist/client/settings/index.js.map +1 -0
- package/dist/client/settings/useBuilderStatus.d.ts +22 -0
- package/dist/client/settings/useBuilderStatus.d.ts.map +1 -0
- package/dist/client/settings/useBuilderStatus.js +41 -0
- package/dist/client/settings/useBuilderStatus.js.map +1 -0
- package/dist/deploy/build.js +198 -54
- package/dist/deploy/build.js.map +1 -1
- package/dist/deploy/route-discovery.d.ts +5 -0
- package/dist/deploy/route-discovery.d.ts.map +1 -1
- package/dist/deploy/route-discovery.js +38 -7
- package/dist/deploy/route-discovery.js.map +1 -1
- package/dist/deploy/workspace-core.d.ts +28 -0
- package/dist/deploy/workspace-core.d.ts.map +1 -0
- package/dist/deploy/workspace-core.js +223 -0
- package/dist/deploy/workspace-core.js.map +1 -0
- package/dist/deploy/workspace-deploy.d.ts +11 -0
- package/dist/deploy/workspace-deploy.d.ts.map +1 -0
- package/dist/deploy/workspace-deploy.js +148 -0
- package/dist/deploy/workspace-deploy.js.map +1 -0
- package/dist/file-upload/builder.d.ts +11 -0
- package/dist/file-upload/builder.d.ts.map +1 -0
- package/dist/file-upload/builder.js +53 -0
- package/dist/file-upload/builder.js.map +1 -0
- package/dist/file-upload/index.d.ts +4 -0
- package/dist/file-upload/index.d.ts.map +1 -0
- package/dist/file-upload/index.js +3 -0
- package/dist/file-upload/index.js.map +1 -0
- package/dist/file-upload/registry.d.ts +23 -0
- package/dist/file-upload/registry.d.ts.map +1 -0
- package/dist/file-upload/registry.js +52 -0
- package/dist/file-upload/registry.js.map +1 -0
- package/dist/file-upload/types.d.ts +37 -0
- package/dist/file-upload/types.d.ts.map +1 -0
- package/dist/file-upload/types.js +10 -0
- package/dist/file-upload/types.js.map +1 -0
- package/dist/integrations/adapters/google-docs.d.ts +89 -0
- package/dist/integrations/adapters/google-docs.d.ts.map +1 -0
- package/dist/integrations/adapters/google-docs.js +261 -0
- package/dist/integrations/adapters/google-docs.js.map +1 -0
- package/dist/integrations/adapters/slack.d.ts.map +1 -1
- package/dist/integrations/adapters/slack.js +34 -0
- package/dist/integrations/adapters/slack.js.map +1 -1
- package/dist/integrations/adapters/telegram.d.ts.map +1 -1
- package/dist/integrations/adapters/telegram.js +32 -0
- package/dist/integrations/adapters/telegram.js.map +1 -1
- package/dist/integrations/google-docs-poller.d.ts +54 -0
- package/dist/integrations/google-docs-poller.d.ts.map +1 -0
- package/dist/integrations/google-docs-poller.js +442 -0
- package/dist/integrations/google-docs-poller.js.map +1 -0
- package/dist/integrations/index.d.ts +2 -0
- package/dist/integrations/index.d.ts.map +1 -1
- package/dist/integrations/index.js +3 -0
- package/dist/integrations/index.js.map +1 -1
- package/dist/integrations/plugin.d.ts.map +1 -1
- package/dist/integrations/plugin.js +49 -2
- package/dist/integrations/plugin.js.map +1 -1
- package/dist/integrations/types.d.ts +33 -0
- package/dist/integrations/types.d.ts.map +1 -1
- package/dist/integrations/webhook-handler.d.ts +10 -1
- package/dist/integrations/webhook-handler.d.ts.map +1 -1
- package/dist/integrations/webhook-handler.js +13 -3
- package/dist/integrations/webhook-handler.js.map +1 -1
- package/dist/jobs/scheduler.d.ts +3 -0
- package/dist/jobs/scheduler.d.ts.map +1 -1
- package/dist/jobs/scheduler.js +81 -60
- package/dist/jobs/scheduler.js.map +1 -1
- package/dist/jobs/tools.d.ts.map +1 -1
- package/dist/jobs/tools.js +20 -3
- package/dist/jobs/tools.js.map +1 -1
- package/dist/mcp-client/config.d.ts +46 -0
- package/dist/mcp-client/config.d.ts.map +1 -0
- package/dist/mcp-client/config.js +152 -0
- package/dist/mcp-client/config.js.map +1 -0
- package/dist/mcp-client/index.d.ts +17 -0
- package/dist/mcp-client/index.d.ts.map +1 -0
- package/dist/mcp-client/index.js +53 -0
- package/dist/mcp-client/index.js.map +1 -0
- package/dist/mcp-client/manager.d.ts +76 -0
- package/dist/mcp-client/manager.d.ts.map +1 -0
- package/dist/mcp-client/manager.js +212 -0
- package/dist/mcp-client/manager.js.map +1 -0
- package/dist/oauth-tokens/store.d.ts.map +1 -1
- package/dist/oauth-tokens/store.js +3 -1
- package/dist/oauth-tokens/store.js.map +1 -1
- package/dist/onboarding/default-steps.d.ts +10 -0
- package/dist/onboarding/default-steps.d.ts.map +1 -0
- package/dist/onboarding/default-steps.js +164 -0
- package/dist/onboarding/default-steps.js.map +1 -0
- package/dist/onboarding/index.d.ts +12 -0
- package/dist/onboarding/index.d.ts.map +1 -0
- package/dist/onboarding/index.js +11 -0
- package/dist/onboarding/index.js.map +1 -0
- package/dist/onboarding/plugin.d.ts +19 -0
- package/dist/onboarding/plugin.d.ts.map +1 -0
- package/dist/onboarding/plugin.js +147 -0
- package/dist/onboarding/plugin.js.map +1 -0
- package/dist/onboarding/registry.d.ts +24 -0
- package/dist/onboarding/registry.d.ts.map +1 -0
- package/dist/onboarding/registry.js +40 -0
- package/dist/onboarding/registry.js.map +1 -0
- package/dist/onboarding/types.d.ts +71 -0
- package/dist/onboarding/types.d.ts.map +1 -0
- package/dist/onboarding/types.js +10 -0
- package/dist/onboarding/types.js.map +1 -0
- package/dist/resources/agents.d.ts +4 -0
- package/dist/resources/agents.d.ts.map +1 -0
- package/dist/resources/agents.js +44 -0
- package/dist/resources/agents.js.map +1 -0
- package/dist/resources/handlers.d.ts +17 -0
- package/dist/resources/handlers.d.ts.map +1 -1
- package/dist/resources/handlers.js +49 -12
- package/dist/resources/handlers.js.map +1 -1
- package/dist/resources/metadata.d.ts +48 -0
- package/dist/resources/metadata.d.ts.map +1 -0
- package/dist/resources/metadata.js +150 -0
- package/dist/resources/metadata.js.map +1 -0
- package/dist/resources/script-helpers.d.ts.map +1 -1
- package/dist/resources/script-helpers.js +3 -2
- package/dist/resources/script-helpers.js.map +1 -1
- package/dist/resources/store.d.ts.map +1 -1
- package/dist/resources/store.js +32 -17
- package/dist/resources/store.js.map +1 -1
- package/dist/scripts/call-agent.d.ts.map +1 -1
- package/dist/scripts/call-agent.js +3 -2
- package/dist/scripts/call-agent.js.map +1 -1
- package/dist/scripts/chat/search-chats.d.ts.map +1 -1
- package/dist/scripts/chat/search-chats.js +2 -1
- package/dist/scripts/chat/search-chats.js.map +1 -1
- package/dist/scripts/core-scripts.d.ts.map +1 -1
- package/dist/scripts/core-scripts.js +2 -0
- package/dist/scripts/core-scripts.js.map +1 -1
- package/dist/scripts/db/scoping.d.ts.map +1 -1
- package/dist/scripts/db/scoping.js +3 -2
- package/dist/scripts/db/scoping.js.map +1 -1
- package/dist/scripts/docs/index.d.ts +2 -0
- package/dist/scripts/docs/index.d.ts.map +1 -0
- package/dist/scripts/docs/index.js +4 -0
- package/dist/scripts/docs/index.js.map +1 -0
- package/dist/scripts/docs/search.d.ts +13 -0
- package/dist/scripts/docs/search.d.ts.map +1 -0
- package/dist/scripts/docs/search.js +130 -0
- package/dist/scripts/docs/search.js.map +1 -0
- package/dist/scripts/resources/delete-memory.d.ts +7 -0
- package/dist/scripts/resources/delete-memory.d.ts.map +1 -0
- package/dist/scripts/resources/delete-memory.js +49 -0
- package/dist/scripts/resources/delete-memory.js.map +1 -0
- package/dist/scripts/resources/delete.d.ts.map +1 -1
- package/dist/scripts/resources/delete.js +2 -1
- package/dist/scripts/resources/delete.js.map +1 -1
- package/dist/scripts/resources/index.d.ts.map +1 -1
- package/dist/scripts/resources/index.js +2 -0
- package/dist/scripts/resources/index.js.map +1 -1
- package/dist/scripts/resources/list.d.ts.map +1 -1
- package/dist/scripts/resources/list.js +2 -1
- package/dist/scripts/resources/list.js.map +1 -1
- package/dist/scripts/resources/migrate-learnings.d.ts.map +1 -1
- package/dist/scripts/resources/migrate-learnings.js +2 -1
- package/dist/scripts/resources/migrate-learnings.js.map +1 -1
- package/dist/scripts/resources/read.d.ts.map +1 -1
- package/dist/scripts/resources/read.js +2 -1
- package/dist/scripts/resources/read.js.map +1 -1
- package/dist/scripts/resources/save-memory.d.ts +9 -0
- package/dist/scripts/resources/save-memory.d.ts.map +1 -0
- package/dist/scripts/resources/save-memory.js +78 -0
- package/dist/scripts/resources/save-memory.js.map +1 -0
- package/dist/scripts/resources/write.d.ts.map +1 -1
- package/dist/scripts/resources/write.js +2 -1
- package/dist/scripts/resources/write.js.map +1 -1
- package/dist/scripts/utils.d.ts +10 -1
- package/dist/scripts/utils.d.ts.map +1 -1
- package/dist/scripts/utils.js +45 -2
- package/dist/scripts/utils.js.map +1 -1
- package/dist/server/action-discovery.d.ts +5 -0
- package/dist/server/action-discovery.d.ts.map +1 -1
- package/dist/server/action-discovery.js +51 -20
- 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 +63 -57
- package/dist/server/action-routes.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts +3 -0
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +363 -48
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/agent-discovery.d.ts.map +1 -1
- package/dist/server/agent-discovery.js +11 -23
- package/dist/server/agent-discovery.js.map +1 -1
- package/dist/server/agent-teams.d.ts.map +1 -1
- package/dist/server/agent-teams.js +2 -1
- package/dist/server/agent-teams.js.map +1 -1
- package/dist/server/agents-bundle.d.ts +33 -5
- package/dist/server/agents-bundle.d.ts.map +1 -1
- package/dist/server/agents-bundle.js +108 -64
- package/dist/server/agents-bundle.js.map +1 -1
- package/dist/server/auth.d.ts +1 -0
- package/dist/server/auth.d.ts.map +1 -1
- package/dist/server/auth.js +172 -60
- package/dist/server/auth.js.map +1 -1
- package/dist/server/better-auth-instance.d.ts.map +1 -1
- package/dist/server/better-auth-instance.js +202 -6
- package/dist/server/better-auth-instance.js.map +1 -1
- package/dist/server/builder-browser.d.ts +40 -0
- package/dist/server/builder-browser.d.ts.map +1 -0
- package/dist/server/builder-browser.js +166 -0
- package/dist/server/builder-browser.js.map +1 -0
- package/dist/server/core-routes-plugin.d.ts.map +1 -1
- package/dist/server/core-routes-plugin.js +152 -6
- package/dist/server/core-routes-plugin.js.map +1 -1
- package/dist/server/credential-provider.d.ts +37 -0
- package/dist/server/credential-provider.d.ts.map +1 -0
- package/dist/server/credential-provider.js +49 -0
- package/dist/server/credential-provider.js.map +1 -0
- package/dist/server/framework-request-handler.d.ts.map +1 -1
- package/dist/server/framework-request-handler.js +42 -3
- package/dist/server/framework-request-handler.js.map +1 -1
- package/dist/server/google-auth-plugin.js +1 -1
- package/dist/server/google-oauth.d.ts +1 -1
- package/dist/server/google-oauth.d.ts.map +1 -1
- package/dist/server/google-oauth.js +15 -10
- package/dist/server/google-oauth.js.map +1 -1
- package/dist/server/index.d.ts +3 -0
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +3 -0
- package/dist/server/index.js.map +1 -1
- package/dist/server/oauth-helpers.d.ts +1 -0
- package/dist/server/oauth-helpers.d.ts.map +1 -1
- package/dist/server/oauth-helpers.js +5 -4
- package/dist/server/oauth-helpers.js.map +1 -1
- package/dist/server/onboarding-html.d.ts.map +1 -1
- package/dist/server/onboarding-html.js +94 -3
- package/dist/server/onboarding-html.js.map +1 -1
- package/dist/server/request-context.d.ts +20 -0
- package/dist/server/request-context.d.ts.map +1 -0
- package/dist/server/request-context.js +41 -0
- package/dist/server/request-context.js.map +1 -0
- package/dist/templates/default/.agents/skills/actions/SKILL.md +2 -1
- package/dist/templates/default/.agents/skills/security/SKILL.md +145 -40
- package/dist/templates/default/.agents/skills/storing-data/SKILL.md +7 -1
- package/dist/templates/default/_gitignore +1 -0
- package/dist/templates/default/app/root.tsx +4 -1
- package/dist/templates/workspace-core/AGENTS.md +62 -0
- package/dist/templates/workspace-core/actions/company-directory.ts +38 -0
- package/dist/templates/workspace-core/package.json +39 -0
- package/dist/templates/workspace-core/skills/company-policies/SKILL.md +42 -0
- package/dist/templates/workspace-core/src/client/AuthenticatedLayout.tsx +37 -0
- package/dist/templates/workspace-core/src/client/index.ts +26 -0
- package/dist/templates/workspace-core/src/credentials.ts +29 -0
- package/dist/templates/workspace-core/src/index.ts +21 -0
- package/dist/templates/workspace-core/src/server/agent-chat-plugin.ts +30 -0
- package/dist/templates/workspace-core/src/server/auth-plugin.ts +35 -0
- package/dist/templates/workspace-core/src/server/index.ts +22 -0
- package/dist/templates/workspace-core/tailwind.preset.ts +34 -0
- package/dist/templates/workspace-core/tsconfig.json +9 -0
- package/dist/templates/workspace-root/.env.example +37 -0
- package/dist/templates/workspace-root/README.md +62 -0
- package/dist/templates/workspace-root/_gitignore +23 -0
- package/dist/templates/workspace-root/package.json +18 -0
- package/dist/templates/workspace-root/pnpm-workspace.yaml +3 -0
- package/dist/templates/workspace-root/tsconfig.base.json +21 -0
- package/dist/vite/agents-bundle-plugin.d.ts.map +1 -1
- package/dist/vite/agents-bundle-plugin.js +65 -15
- package/dist/vite/agents-bundle-plugin.js.map +1 -1
- package/dist/vite/client.d.ts +16 -0
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +75 -0
- package/dist/vite/client.js.map +1 -1
- package/docs/content/a2a-protocol.md +223 -0
- package/docs/content/actions.md +129 -0
- package/docs/content/agent-mentions.md +171 -0
- package/docs/content/authentication.md +155 -0
- package/docs/content/cli-adapters.md +244 -0
- package/docs/content/client.md +175 -0
- package/docs/content/context-awareness.md +168 -0
- package/docs/content/creating-templates.md +311 -0
- package/docs/content/database.md +82 -0
- package/docs/content/deployment.md +180 -0
- package/docs/content/enterprise-workspace.md +235 -0
- package/docs/content/faq.md +101 -0
- package/docs/content/file-uploads.md +102 -0
- package/docs/content/frames.md +47 -0
- package/docs/content/getting-started.md +104 -0
- package/docs/content/integrations.md +198 -0
- package/docs/content/key-concepts.md +246 -0
- package/docs/content/mcp-clients.md +110 -0
- package/docs/content/mcp-protocol.md +168 -0
- package/docs/content/onboarding.md +107 -0
- package/docs/content/real-time-collaboration.md +185 -0
- package/docs/content/resources.md +277 -0
- package/docs/content/security.md +158 -0
- package/docs/content/server.md +200 -0
- package/docs/content/skills-guide.md +107 -0
- package/docs/content/what-is-agent-native.md +100 -0
- package/docs/content/workspace-management.md +224 -0
- package/package.json +12 -2
- package/src/templates/default/.agents/skills/actions/SKILL.md +2 -1
- package/src/templates/default/.agents/skills/security/SKILL.md +145 -40
- package/src/templates/default/.agents/skills/storing-data/SKILL.md +7 -1
- package/src/templates/default/_gitignore +1 -0
- package/src/templates/default/app/root.tsx +4 -1
- package/src/templates/workspace-core/AGENTS.md +62 -0
- package/src/templates/workspace-core/actions/company-directory.ts +38 -0
- package/src/templates/workspace-core/package.json +39 -0
- package/src/templates/workspace-core/skills/company-policies/SKILL.md +42 -0
- package/src/templates/workspace-core/src/client/AuthenticatedLayout.tsx +37 -0
- package/src/templates/workspace-core/src/client/index.ts +26 -0
- package/src/templates/workspace-core/src/credentials.ts +29 -0
- package/src/templates/workspace-core/src/index.ts +21 -0
- package/src/templates/workspace-core/src/server/agent-chat-plugin.ts +30 -0
- package/src/templates/workspace-core/src/server/auth-plugin.ts +35 -0
- package/src/templates/workspace-core/src/server/index.ts +22 -0
- package/src/templates/workspace-core/tailwind.preset.ts +34 -0
- package/src/templates/workspace-core/tsconfig.json +9 -0
- package/src/templates/workspace-root/.env.example +37 -0
- package/src/templates/workspace-root/README.md +62 -0
- package/src/templates/workspace-root/_gitignore +23 -0
- package/src/templates/workspace-root/package.json +18 -0
- package/src/templates/workspace-root/pnpm-workspace.yaml +3 -0
- package/src/templates/workspace-root/tsconfig.base.json +21 -0
- package/dist/templates/templates/default/.agents/skills/actions/SKILL.md +0 -142
- package/dist/templates/templates/default/.agents/skills/agent-engines/SKILL.md +0 -127
- package/dist/templates/templates/default/.agents/skills/capture-learnings/SKILL.md +0 -50
- package/dist/templates/templates/default/.agents/skills/create-skill/SKILL.md +0 -167
- package/dist/templates/templates/default/.agents/skills/delegate-to-agent/SKILL.md +0 -90
- package/dist/templates/templates/default/.agents/skills/frontend-design/SKILL.md +0 -69
- package/dist/templates/templates/default/.agents/skills/real-time-collab/SKILL.md +0 -183
- package/dist/templates/templates/default/.agents/skills/real-time-sync/SKILL.md +0 -112
- package/dist/templates/templates/default/.agents/skills/security/SKILL.md +0 -108
- package/dist/templates/templates/default/.agents/skills/self-modifying-code/SKILL.md +0 -79
- package/dist/templates/templates/default/.agents/skills/storing-data/SKILL.md +0 -110
- package/dist/templates/templates/default/.claude/settings.json +0 -100
- package/dist/templates/templates/default/.env.example +0 -5
- package/dist/templates/templates/default/.ignore +0 -0
- package/dist/templates/templates/default/.prettierrc +0 -5
- package/dist/templates/templates/default/AGENTS.md +0 -110
- package/dist/templates/templates/default/DEVELOPING.md +0 -117
- package/dist/templates/templates/default/_gitignore +0 -37
- package/dist/templates/templates/default/actions/hello.ts +0 -20
- package/dist/templates/templates/default/actions/navigate.ts +0 -53
- package/dist/templates/templates/default/actions/run.ts +0 -2
- package/dist/templates/templates/default/actions/view-screen.ts +0 -39
- package/dist/templates/templates/default/app/entry.client.tsx +0 -4
- package/dist/templates/templates/default/app/entry.server.tsx +0 -56
- package/dist/templates/templates/default/app/global.css +0 -95
- package/dist/templates/templates/default/app/lib/utils.ts +0 -1
- package/dist/templates/templates/default/app/root.tsx +0 -107
- package/dist/templates/templates/default/app/routes/_index.tsx +0 -62
- package/dist/templates/templates/default/app/routes.ts +0 -4
- package/dist/templates/templates/default/app/vite-env.d.ts +0 -6
- package/dist/templates/templates/default/components.json +0 -20
- package/dist/templates/templates/default/data/.gitkeep +0 -0
- package/dist/templates/templates/default/data/sync-config.json +0 -1
- package/dist/templates/templates/default/learnings.defaults.md +0 -5
- package/dist/templates/templates/default/learnings.md +0 -0
- package/dist/templates/templates/default/package.json +0 -46
- package/dist/templates/templates/default/postcss.config.js +0 -6
- package/dist/templates/templates/default/public/icon-180.svg +0 -4
- package/dist/templates/templates/default/public/icon-192.svg +0 -4
- package/dist/templates/templates/default/public/icon-512.svg +0 -4
- package/dist/templates/templates/default/public/manifest.json +0 -13
- package/dist/templates/templates/default/react-router.config.ts +0 -6
- package/dist/templates/templates/default/server/middleware/auth.ts +0 -15
- package/dist/templates/templates/default/server/plugins/.gitkeep +0 -0
- package/dist/templates/templates/default/server/routes/[...page].get.ts +0 -5
- package/dist/templates/templates/default/server/routes/api/hello.get.ts +0 -5
- package/dist/templates/templates/default/shared/api.ts +0 -6
- package/dist/templates/templates/default/ssr-entry.ts +0 -20
- package/dist/templates/templates/default/tailwind.config.ts +0 -7
- package/dist/templates/templates/default/tsconfig.json +0 -11
- package/dist/templates/templates/default/vite.config.ts +0 -6
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# {{APP_TITLE}} — Enterprise Agent Instructions
|
|
2
|
+
|
|
3
|
+
These instructions apply to **every app** in the {{APP_TITLE}} workspace. The
|
|
4
|
+
framework auto-injects this file into each app's agent system prompt as a
|
|
5
|
+
`<resource name="AGENTS.md" scope="workspace">` block. Individual apps can
|
|
6
|
+
add their own template-specific AGENTS.md on top.
|
|
7
|
+
|
|
8
|
+
## Company context
|
|
9
|
+
|
|
10
|
+
Write a short paragraph here describing your company and what you do. The
|
|
11
|
+
agent reads this first so every response can be grounded in the same
|
|
12
|
+
business context without you having to repeat it per app.
|
|
13
|
+
|
|
14
|
+
## Shared conventions
|
|
15
|
+
|
|
16
|
+
- **All cross-app state lives in the shared database.** Apps in this
|
|
17
|
+
workspace share `DATABASE_URL` by default, so a record created by one
|
|
18
|
+
app can be read by another as long as it respects the `owner_email` and
|
|
19
|
+
`org_id` scoping conventions.
|
|
20
|
+
- **All API secrets come from the central credential store.** Never
|
|
21
|
+
hardcode a token. Call `resolveCompanyCredential("KEY")` from
|
|
22
|
+
`@{{APP_NAME}}/core-module/credentials` — it pulls from env first and
|
|
23
|
+
falls back to the shared settings table so one rotation updates every
|
|
24
|
+
app.
|
|
25
|
+
- **UI chrome comes from the workspace core.** Wrap every screen in
|
|
26
|
+
`<AuthenticatedLayout>` from `@{{APP_NAME}}/core-module/client`. Don't
|
|
27
|
+
re-implement the brand header, sidebar, or org switcher per app.
|
|
28
|
+
- **Design system.** If the app needs a button, dialog, or form control,
|
|
29
|
+
import from our internal design system package (if you have one) or
|
|
30
|
+
from the shared UI re-exports in `@{{APP_NAME}}/core-module/client`.
|
|
31
|
+
|
|
32
|
+
## Compliance and policy
|
|
33
|
+
|
|
34
|
+
List any enterprise-wide rules the agent must follow — data handling, PII
|
|
35
|
+
guidelines, approval flows, deployment constraints. The agent will apply
|
|
36
|
+
these to every decision it makes in every app.
|
|
37
|
+
|
|
38
|
+
Example rules:
|
|
39
|
+
|
|
40
|
+
- Never expose raw customer email addresses in logs.
|
|
41
|
+
- Any action that modifies data must first be shown to the user with a
|
|
42
|
+
preview and wait for confirmation.
|
|
43
|
+
- Never make network calls to anything outside `*.{{APP_NAME}}.com` or
|
|
44
|
+
the approved third-party allowlist.
|
|
45
|
+
|
|
46
|
+
## How to add a new app
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
cd apps
|
|
50
|
+
pnpm exec agent-native create <app-name>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
The new app will automatically inherit:
|
|
54
|
+
|
|
55
|
+
1. The workspace auth plugin (Better Auth + company SSO)
|
|
56
|
+
2. The agent chat plugin with this AGENTS.md pre-loaded
|
|
57
|
+
3. Every skill in `packages/core-module/skills/`
|
|
58
|
+
4. Every action in `packages/core-module/actions/`
|
|
59
|
+
5. The shared Tailwind preset and React components
|
|
60
|
+
|
|
61
|
+
The only files the new app needs to own are its own routes/screens and any
|
|
62
|
+
template-specific actions.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared action: look up an employee in the company directory.
|
|
3
|
+
*
|
|
4
|
+
* Every app in the workspace inherits this action automatically — no
|
|
5
|
+
* wiring required. From the agent's perspective it behaves exactly like
|
|
6
|
+
* a template action: the tool shows up in every app's agent, and calling
|
|
7
|
+
* it from the UI via `useActionQuery("company-directory", { ... })` Just
|
|
8
|
+
* Works.
|
|
9
|
+
*
|
|
10
|
+
* Replace the stub implementation with a real call to your company
|
|
11
|
+
* directory (SCIM, Okta Users API, internal /people endpoint, etc.).
|
|
12
|
+
*/
|
|
13
|
+
import { z } from "zod";
|
|
14
|
+
import { defineAction } from "@agent-native/core";
|
|
15
|
+
|
|
16
|
+
export default defineAction({
|
|
17
|
+
description:
|
|
18
|
+
"Look up a person in the {{APP_TITLE}} company directory by name or email. Returns role, team, and manager.",
|
|
19
|
+
schema: z.object({
|
|
20
|
+
query: z.string().describe("Name, email, or partial match to search for"),
|
|
21
|
+
}),
|
|
22
|
+
run: async (args) => {
|
|
23
|
+
// TODO: replace with a real lookup. This stub just echoes the query
|
|
24
|
+
// so the agent has a reasonable no-op while you wire up the real
|
|
25
|
+
// directory integration.
|
|
26
|
+
return {
|
|
27
|
+
results: [
|
|
28
|
+
{
|
|
29
|
+
query: args.query,
|
|
30
|
+
name: "(stub) " + args.query,
|
|
31
|
+
role: "Unknown",
|
|
32
|
+
team: "Unknown",
|
|
33
|
+
manager: null,
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
};
|
|
37
|
+
},
|
|
38
|
+
});
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@{{APP_NAME}}/core-module",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "0.0.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./src/index.ts",
|
|
9
|
+
"default": "./src/index.ts"
|
|
10
|
+
},
|
|
11
|
+
"./server": {
|
|
12
|
+
"types": "./src/server/index.ts",
|
|
13
|
+
"default": "./src/server/index.ts"
|
|
14
|
+
},
|
|
15
|
+
"./client": {
|
|
16
|
+
"types": "./src/client/index.ts",
|
|
17
|
+
"default": "./src/client/index.ts"
|
|
18
|
+
},
|
|
19
|
+
"./credentials": {
|
|
20
|
+
"types": "./src/credentials.ts",
|
|
21
|
+
"default": "./src/credentials.ts"
|
|
22
|
+
},
|
|
23
|
+
"./tailwind": {
|
|
24
|
+
"types": "./tailwind.preset.ts",
|
|
25
|
+
"default": "./tailwind.preset.ts"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@agent-native/core": "^0.6.0"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@types/react": "^18.3.23",
|
|
33
|
+
"react": "^18.3.1",
|
|
34
|
+
"typescript": "^5.9.2"
|
|
35
|
+
},
|
|
36
|
+
"peerDependencies": {
|
|
37
|
+
"react": "^18.3.1"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: company-policies
|
|
3
|
+
description: {{APP_TITLE}}-wide policies the agent must enforce for every app — data handling, PII, approval flows, compliance rules.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# {{APP_TITLE}} Company Policies
|
|
7
|
+
|
|
8
|
+
Every app in the workspace shares these policies. Read this skill before
|
|
9
|
+
taking any action that touches customer data, external services, or
|
|
10
|
+
deployed state.
|
|
11
|
+
|
|
12
|
+
## Data handling
|
|
13
|
+
|
|
14
|
+
- **PII minimization.** Only load the fields you actually need. Never
|
|
15
|
+
`SELECT *` on a table that contains customer records.
|
|
16
|
+
- **No raw customer email in logs.** Hash or redact before logging.
|
|
17
|
+
- **Retention.** Deleted records are soft-deleted first and purged by a
|
|
18
|
+
scheduled job. Do not write actions that hard-delete customer data.
|
|
19
|
+
|
|
20
|
+
## Third-party calls
|
|
21
|
+
|
|
22
|
+
- **Allowlist only.** Only call domains on the approved allowlist
|
|
23
|
+
(documented in the root `README.md`). If an integration needs a new
|
|
24
|
+
domain, surface a warning and wait for human approval before making
|
|
25
|
+
the call.
|
|
26
|
+
- **Secrets come from `resolveCompanyCredential`.** Never hardcode.
|
|
27
|
+
Never check secrets into git. Rotating a key in the central store
|
|
28
|
+
updates every app on the next request.
|
|
29
|
+
|
|
30
|
+
## Approval flows
|
|
31
|
+
|
|
32
|
+
- **Destructive operations need a confirmation preview.** Any action
|
|
33
|
+
that modifies production data must first return a preview of the
|
|
34
|
+
change (what will be created / updated / deleted) and wait for
|
|
35
|
+
explicit user confirmation before executing.
|
|
36
|
+
|
|
37
|
+
## Apply across apps
|
|
38
|
+
|
|
39
|
+
This skill is loaded automatically in every workspace app. If an
|
|
40
|
+
individual app needs different behavior, it can add a same-named skill
|
|
41
|
+
under its own `.agents/skills/company-policies/SKILL.md` and that copy
|
|
42
|
+
will win for that app only.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared authenticated layout for every app in the @{{APP_NAME}} workspace.
|
|
3
|
+
*
|
|
4
|
+
* Provides the common chrome (brand header, user menu, agent chat sidebar)
|
|
5
|
+
* so individual apps only have to render their own content. Replace this
|
|
6
|
+
* with a real component that pulls in your design system. Every app
|
|
7
|
+
* imports it the same way:
|
|
8
|
+
*
|
|
9
|
+
* import { AuthenticatedLayout } from "@{{APP_NAME}}/core-module/client";
|
|
10
|
+
*
|
|
11
|
+
* export default function Home() {
|
|
12
|
+
* return (
|
|
13
|
+
* <AuthenticatedLayout>
|
|
14
|
+
* <h1>My app's screen</h1>
|
|
15
|
+
* </AuthenticatedLayout>
|
|
16
|
+
* );
|
|
17
|
+
* }
|
|
18
|
+
*/
|
|
19
|
+
import type { ReactNode } from "react";
|
|
20
|
+
|
|
21
|
+
export interface AuthenticatedLayoutProps {
|
|
22
|
+
children: ReactNode;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Workspace title — replaced at scaffold time by the create-workspace CLI.
|
|
26
|
+
const WORKSPACE_TITLE = "{{APP_TITLE}}";
|
|
27
|
+
|
|
28
|
+
export function AuthenticatedLayout({ children }: AuthenticatedLayoutProps) {
|
|
29
|
+
return (
|
|
30
|
+
<div className="min-h-screen flex flex-col">
|
|
31
|
+
<header className="border-b px-6 py-3">
|
|
32
|
+
<strong>{WORKSPACE_TITLE}</strong>
|
|
33
|
+
</header>
|
|
34
|
+
<main className="flex-1 p-6">{children}</main>
|
|
35
|
+
</div>
|
|
36
|
+
);
|
|
37
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Client-side entry for @{{APP_NAME}}/core-module.
|
|
3
|
+
*
|
|
4
|
+
* This is where shared React components, hooks, and providers that EVERY
|
|
5
|
+
* app in your workspace needs live. Think of it as the "app shell" layer
|
|
6
|
+
* between the framework's primitives (@agent-native/core/client) and the
|
|
7
|
+
* individual app's screens:
|
|
8
|
+
*
|
|
9
|
+
* - Authenticated layouts (header / sidebar / footer with brand)
|
|
10
|
+
* - Org switchers wired to your company's org plugin
|
|
11
|
+
* - Common chrome: loading states, error boundaries, empty states
|
|
12
|
+
* - Wrappers around @agent-native/core components that apply your
|
|
13
|
+
* enterprise design tokens
|
|
14
|
+
*
|
|
15
|
+
* Apps import from here instead of re-implementing or copy-pasting:
|
|
16
|
+
*
|
|
17
|
+
* import { AuthenticatedLayout } from "@{{APP_NAME}}/core-module/client";
|
|
18
|
+
*
|
|
19
|
+
* NOTE: This package does not ship shadcn/ui or a generic design system
|
|
20
|
+
* by default. If you already have an internal `@{{APP_NAME}}/design-system`
|
|
21
|
+
* package, add it as a dep here and re-export from this file. Otherwise
|
|
22
|
+
* you can drop any shadcn components the apps share into `./ui/` and
|
|
23
|
+
* export them from this index.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
export { AuthenticatedLayout } from "./AuthenticatedLayout.js";
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Centralized credential helpers for the @{{APP_NAME}} workspace.
|
|
3
|
+
*
|
|
4
|
+
* Every enterprise has a few API keys that multiple apps need to share:
|
|
5
|
+
* a Slack bot token, a Sentry DSN, an OpenAI key, internal service
|
|
6
|
+
* credentials. Instead of each app reading them separately, we namespace
|
|
7
|
+
* them here so there's a single place to update when a key rotates.
|
|
8
|
+
*
|
|
9
|
+
* Under the hood this is a thin wrapper over @agent-native/core's
|
|
10
|
+
* `resolveCredential()`, which reads `process.env.<KEY>` first and
|
|
11
|
+
* falls back to `credential:<KEY>` in the shared settings table.
|
|
12
|
+
* Apps inside the workspace share the same DATABASE_URL by default,
|
|
13
|
+
* so storing a credential once makes it available everywhere.
|
|
14
|
+
*/
|
|
15
|
+
import { resolveCredential } from "@agent-native/core/credentials";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Resolve a company-wide credential. Prefer this over `resolveCredential()`
|
|
19
|
+
* directly — it keeps your keys organized under a workspace namespace and
|
|
20
|
+
* makes "where does this secret come from" greppable.
|
|
21
|
+
*
|
|
22
|
+
* Example:
|
|
23
|
+
* const slackToken = await resolveCompanyCredential("SLACK_BOT_TOKEN");
|
|
24
|
+
*/
|
|
25
|
+
export async function resolveCompanyCredential(
|
|
26
|
+
key: string,
|
|
27
|
+
): Promise<string | undefined> {
|
|
28
|
+
return await resolveCredential(key);
|
|
29
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @{{APP_NAME}}/core-module — enterprise-wide workspace core.
|
|
3
|
+
*
|
|
4
|
+
* Every agent-native app in this workspace inherits from this package:
|
|
5
|
+
* - Server plugins (auth, org, agent-chat) — see src/server
|
|
6
|
+
* - Shared React components and hooks — see src/client
|
|
7
|
+
* - Shared agent actions — see actions/
|
|
8
|
+
* - Shared agent skills — see skills/
|
|
9
|
+
* - Enterprise-wide agent instructions — see AGENTS.md
|
|
10
|
+
* - Shared Tailwind preset — see tailwind.preset.ts
|
|
11
|
+
*
|
|
12
|
+
* Apps don't import from this root entry directly — they import from
|
|
13
|
+
* the specific sub-path they need:
|
|
14
|
+
*
|
|
15
|
+
* import { authPlugin } from "@{{APP_NAME}}/core-module/server";
|
|
16
|
+
* import { AuthenticatedLayout } from "@{{APP_NAME}}/core-module/client";
|
|
17
|
+
* import { resolveCompanyCredential } from "@{{APP_NAME}}/core-module/credentials";
|
|
18
|
+
*
|
|
19
|
+
* This root file is for package metadata only.
|
|
20
|
+
*/
|
|
21
|
+
export const WORKSPACE_CORE_NAME = "@{{APP_NAME}}/core-module";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workspace-wide agent-chat plugin for @{{APP_NAME}}/core-module.
|
|
3
|
+
*
|
|
4
|
+
* This mounts the framework's default agent-chat plugin so every app in
|
|
5
|
+
* the workspace gets the same chat endpoint, mention providers, and
|
|
6
|
+
* built-in tools. The ENTERPRISE-WIDE system prompt additions — things
|
|
7
|
+
* the agent should know across every app — live in the workspace's
|
|
8
|
+
* AGENTS.md file, which is loaded automatically into the prompt as a
|
|
9
|
+
* `<resource scope="workspace">` block.
|
|
10
|
+
*
|
|
11
|
+
* Customize this wrapper when you need agent behavior that can't be
|
|
12
|
+
* expressed in AGENTS.md — e.g. injecting enterprise-specific mention
|
|
13
|
+
* providers, pre-loading a custom set of MCP servers, or rewriting
|
|
14
|
+
* model choice based on your company's allowlist.
|
|
15
|
+
*/
|
|
16
|
+
import { defaultAgentChatPlugin } from "@agent-native/core/server";
|
|
17
|
+
|
|
18
|
+
export const agentChatPlugin = async (nitroApp: any): Promise<void> => {
|
|
19
|
+
await defaultAgentChatPlugin(nitroApp);
|
|
20
|
+
|
|
21
|
+
// Hook for enterprise customization:
|
|
22
|
+
//
|
|
23
|
+
// const chat = createAgentChatPlugin({
|
|
24
|
+
// systemPrompt: (base) => `${base}\n\nCompany policy: …`,
|
|
25
|
+
// mentionProviders: {
|
|
26
|
+
// people: async (query) => searchCompanyDirectory(query),
|
|
27
|
+
// },
|
|
28
|
+
// });
|
|
29
|
+
// await chat(nitroApp);
|
|
30
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workspace-wide auth plugin for @{{APP_NAME}}/core-module.
|
|
3
|
+
*
|
|
4
|
+
* Today this just re-uses the framework default, which already does the
|
|
5
|
+
* right thing for most enterprises (Better Auth with Google SSO when
|
|
6
|
+
* GOOGLE_CLIENT_ID/SECRET are set, email/password otherwise, local dev
|
|
7
|
+
* bypass via AUTH_MODE=local). Customize it here when your enterprise
|
|
8
|
+
* needs specific behavior — e.g.:
|
|
9
|
+
*
|
|
10
|
+
* - Wrap the default to force a specific SSO provider
|
|
11
|
+
* - Add a callback that provisions users into your directory
|
|
12
|
+
* - Pre-register organizations / role mappings from Okta groups
|
|
13
|
+
* - Fail closed on unauthenticated requests outside dev
|
|
14
|
+
*
|
|
15
|
+
* Every app in the workspace inherits this automatically (as long as the
|
|
16
|
+
* root package.json has `"agent-native": { "workspaceCore": "@{{APP_NAME}}/core-module" }`).
|
|
17
|
+
*/
|
|
18
|
+
import { defaultAuthPlugin } from "@agent-native/core/server";
|
|
19
|
+
|
|
20
|
+
export const authPlugin = async (nitroApp: any): Promise<void> => {
|
|
21
|
+
// Run the framework default first so Better Auth, org tables, and session
|
|
22
|
+
// middleware are all set up.
|
|
23
|
+
await defaultAuthPlugin(nitroApp);
|
|
24
|
+
|
|
25
|
+
// Add enterprise-specific post-auth behavior here. Examples:
|
|
26
|
+
//
|
|
27
|
+
// const h3 = getH3App(nitroApp);
|
|
28
|
+
// h3.use(defineEventHandler(async (event) => {
|
|
29
|
+
// const session = await getSession(event);
|
|
30
|
+
// if (session?.email && !session.email.endsWith("@{{APP_NAME}}.com")) {
|
|
31
|
+
// setResponseStatus(event, 403);
|
|
32
|
+
// return { error: "Only @{{APP_NAME}}.com accounts allowed" };
|
|
33
|
+
// }
|
|
34
|
+
// }));
|
|
35
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server-side entry for @{{APP_NAME}}/core-module.
|
|
3
|
+
*
|
|
4
|
+
* Exports plugin overrides for any framework slot you want to customize
|
|
5
|
+
* across every app in this workspace. The agent-native framework looks for
|
|
6
|
+
* these exports by name when deciding what to auto-mount — see the "three
|
|
7
|
+
* layer inheritance" section in the root README.
|
|
8
|
+
*
|
|
9
|
+
* Supported export names (any subset):
|
|
10
|
+
* - authPlugin → overrides @agent-native/core's auth
|
|
11
|
+
* - orgPlugin → overrides @agent-native/core's org
|
|
12
|
+
* - agentChatPlugin → overrides @agent-native/core's agent-chat
|
|
13
|
+
* - coreRoutesPlugin → overrides @agent-native/core's core-routes
|
|
14
|
+
* - integrationsPlugin → overrides @agent-native/core's integrations
|
|
15
|
+
* - resourcesPlugin → overrides @agent-native/core's resources
|
|
16
|
+
* - terminalPlugin → overrides @agent-native/core's terminal
|
|
17
|
+
*
|
|
18
|
+
* Anything you don't export falls through to the framework default.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
export { authPlugin } from "./auth-plugin.js";
|
|
22
|
+
export { agentChatPlugin } from "./agent-chat-plugin.js";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workspace-wide Tailwind preset for @{{APP_NAME}}/core-module.
|
|
3
|
+
*
|
|
4
|
+
* Extends the framework's base preset with enterprise brand tokens. Every
|
|
5
|
+
* app in the workspace should import THIS preset in its own
|
|
6
|
+
* tailwind.config.ts instead of importing @agent-native/core/tailwind
|
|
7
|
+
* directly, so brand updates in one place propagate to all apps.
|
|
8
|
+
*
|
|
9
|
+
* // apps/<name>/tailwind.config.ts
|
|
10
|
+
* import preset from "@{{APP_NAME}}/core-module/tailwind";
|
|
11
|
+
* export default { presets: [preset], content: ["./app/**\/*.{ts,tsx}"] };
|
|
12
|
+
*
|
|
13
|
+
* If your enterprise already has a design-system package with its own
|
|
14
|
+
* Tailwind preset, swap `corePreset` out for that one (or chain both).
|
|
15
|
+
*/
|
|
16
|
+
import corePreset from "@agent-native/core/tailwind";
|
|
17
|
+
import type { Config } from "tailwindcss";
|
|
18
|
+
|
|
19
|
+
const preset: Partial<Config> = {
|
|
20
|
+
presets: [corePreset],
|
|
21
|
+
theme: {
|
|
22
|
+
extend: {
|
|
23
|
+
colors: {
|
|
24
|
+
// Replace with your actual brand palette.
|
|
25
|
+
brand: {
|
|
26
|
+
DEFAULT: "#4f46e5",
|
|
27
|
+
foreground: "#ffffff",
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export default preset;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Shared across every app in this workspace.
|
|
2
|
+
# Copy to .env and fill in values, or override per-app in apps/<app>/.env.
|
|
3
|
+
# Per-app values win on conflict — use workspace-level for shared secrets.
|
|
4
|
+
|
|
5
|
+
# Database shared by every app in the workspace. Leave blank to default to
|
|
6
|
+
# SQLite per app (apps/<app>/data/app.db), or set DATABASE_URL per app.
|
|
7
|
+
DATABASE_URL=
|
|
8
|
+
|
|
9
|
+
# Better Auth — required for login to work. Generate with:
|
|
10
|
+
# openssl rand -hex 32
|
|
11
|
+
BETTER_AUTH_SECRET=
|
|
12
|
+
|
|
13
|
+
# Anthropic API key for the agent chat.
|
|
14
|
+
ANTHROPIC_API_KEY=
|
|
15
|
+
|
|
16
|
+
# Optional: OpenAI key if any app uses OpenAI engines.
|
|
17
|
+
OPENAI_API_KEY=
|
|
18
|
+
|
|
19
|
+
# Builder browser integration (run `agent-native dev` and visit any app,
|
|
20
|
+
# then click "Connect Builder" — these are written automatically by the
|
|
21
|
+
# callback handler to this workspace-level .env).
|
|
22
|
+
BUILDER_PRIVATE_KEY=
|
|
23
|
+
BUILDER_PUBLIC_KEY=
|
|
24
|
+
|
|
25
|
+
# A2A shared secret — required for cross-app JWT verification. Every app
|
|
26
|
+
# in the workspace should use the same value. Generate with:
|
|
27
|
+
# openssl rand -hex 32
|
|
28
|
+
A2A_SECRET=
|
|
29
|
+
|
|
30
|
+
# Google sign-in — optional. Leave blank to use email/password only.
|
|
31
|
+
# Both values come from Google Cloud Console → APIs & Services → Credentials.
|
|
32
|
+
GOOGLE_CLIENT_ID=
|
|
33
|
+
GOOGLE_CLIENT_SECRET=
|
|
34
|
+
|
|
35
|
+
# Optional: GitHub sign-in.
|
|
36
|
+
GITHUB_CLIENT_ID=
|
|
37
|
+
GITHUB_CLIENT_SECRET=
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# {{APP_TITLE}} — Agent-Native Workspace
|
|
2
|
+
|
|
3
|
+
A monorepo hosting multiple agent-native apps that all inherit from a single
|
|
4
|
+
private **workspace core** package. The core module provides shared auth,
|
|
5
|
+
agent instructions, skills, components, and plugins; each app just ships its
|
|
6
|
+
own screens and template-specific actions.
|
|
7
|
+
|
|
8
|
+
## Layout
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
{{APP_NAME}}/
|
|
12
|
+
├── packages/
|
|
13
|
+
│ └── core-module/ # @{{APP_NAME}}/core-module — the shared mid-layer
|
|
14
|
+
│ ├── src/server/ # Auth / org / agent-chat plugin overrides
|
|
15
|
+
│ ├── src/client/ # Shared React components (org switcher, layouts…)
|
|
16
|
+
│ ├── actions/ # Shared agent-callable actions
|
|
17
|
+
│ ├── skills/ # Shared .agents skills baked into every app
|
|
18
|
+
│ └── AGENTS.md # Enterprise-wide agent instructions
|
|
19
|
+
└── apps/
|
|
20
|
+
└── example/ # Sample app demonstrating inheritance
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Three-layer inheritance
|
|
24
|
+
|
|
25
|
+
Every app in this workspace inherits cross-cutting behavior automatically:
|
|
26
|
+
|
|
27
|
+
1. **App local** (highest priority) — anything under `apps/<name>/server/plugins/`,
|
|
28
|
+
`apps/<name>/actions/`, `apps/<name>/.agents/skills/`, `apps/<name>/AGENTS.md`.
|
|
29
|
+
2. **Workspace core** (middle) — `packages/core-module/src/server/`,
|
|
30
|
+
`packages/core-module/actions/`, `packages/core-module/skills/`,
|
|
31
|
+
`packages/core-module/AGENTS.md`.
|
|
32
|
+
3. **Framework** (lowest) — `@agent-native/core` defaults.
|
|
33
|
+
|
|
34
|
+
Apps don't need any configuration to opt in. Discovery happens via the
|
|
35
|
+
`agent-native.workspaceCore` field in this root `package.json`, which names
|
|
36
|
+
the workspace core package (`@{{APP_NAME}}/core-module`).
|
|
37
|
+
|
|
38
|
+
## Getting started
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
pnpm install
|
|
42
|
+
cp .env.example .env # fill in DATABASE_URL, BETTER_AUTH_SECRET, ANTHROPIC_API_KEY
|
|
43
|
+
pnpm dev # starts the example app
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Adding a new app
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
cd apps
|
|
50
|
+
pnpm exec agent-native create crm
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
The CLI detects the workspace root and scaffolds a minimal app that already
|
|
54
|
+
depends on `@{{APP_NAME}}/core-module`. Edit only the routes you care about;
|
|
55
|
+
auth, org switching, skills, and instructions come from the core module.
|
|
56
|
+
|
|
57
|
+
## Editing shared behavior
|
|
58
|
+
|
|
59
|
+
Everything cross-cutting lives in `packages/core-module/`. A change to
|
|
60
|
+
`packages/core-module/src/server/auth-plugin.ts`, for example, is picked up
|
|
61
|
+
by every app in the workspace on the next dev reload — no need to touch any
|
|
62
|
+
individual app.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
node_modules/
|
|
2
|
+
dist/
|
|
3
|
+
build/
|
|
4
|
+
.deploy-tmp/
|
|
5
|
+
|
|
6
|
+
# Env files — never commit secrets
|
|
7
|
+
.env
|
|
8
|
+
.env.local
|
|
9
|
+
apps/*/.env
|
|
10
|
+
apps/*/.env.local
|
|
11
|
+
packages/*/.env
|
|
12
|
+
|
|
13
|
+
# Editor / OS
|
|
14
|
+
.DS_Store
|
|
15
|
+
.vscode/
|
|
16
|
+
.idea/
|
|
17
|
+
|
|
18
|
+
# pnpm
|
|
19
|
+
.pnpm-store/
|
|
20
|
+
pnpm-debug.log*
|
|
21
|
+
|
|
22
|
+
# Personal agent memory — per-developer, not shared
|
|
23
|
+
learnings.md
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{APP_NAME}}",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "0.0.0",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "pnpm --filter example dev",
|
|
7
|
+
"build": "pnpm -r build",
|
|
8
|
+
"typecheck": "pnpm -r typecheck"
|
|
9
|
+
},
|
|
10
|
+
"agent-native": {
|
|
11
|
+
"workspaceCore": "@{{APP_NAME}}/core-module"
|
|
12
|
+
},
|
|
13
|
+
"devDependencies": {
|
|
14
|
+
"prettier": "^3.6.2",
|
|
15
|
+
"typescript": "^5.9.2"
|
|
16
|
+
},
|
|
17
|
+
"packageManager": "pnpm@10.14.0"
|
|
18
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "Bundler",
|
|
6
|
+
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
7
|
+
"types": ["node"],
|
|
8
|
+
"jsx": "react-jsx",
|
|
9
|
+
"strict": true,
|
|
10
|
+
"noUnusedLocals": false,
|
|
11
|
+
"noUnusedParameters": false,
|
|
12
|
+
"noFallthroughCasesInSwitch": true,
|
|
13
|
+
"noImplicitOverride": true,
|
|
14
|
+
"esModuleInterop": true,
|
|
15
|
+
"skipLibCheck": true,
|
|
16
|
+
"resolveJsonModule": true,
|
|
17
|
+
"isolatedModules": true,
|
|
18
|
+
"allowSyntheticDefaultImports": true,
|
|
19
|
+
"forceConsistentCasingInFileNames": true
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents-bundle-plugin.d.ts","sourceRoot":"","sources":["../../src/vite/agents-bundle-plugin.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"agents-bundle-plugin.d.ts","sourceRoot":"","sources":["../../src/vite/agents-bundle-plugin.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAwCnC,wBAAgB,kBAAkB,IAAI,MAAM,CA6F3C"}
|