@agent-native/core 0.127.1 → 0.128.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/corpus/README.md +2 -2
- package/corpus/core/CHANGELOG.md +92 -0
- package/corpus/core/README.md +5 -26
- package/corpus/core/docs/content/actions.mdx +47 -4
- package/corpus/core/docs/content/native-chat-ui.mdx +7 -0
- package/corpus/core/docs/content/organizations-teams-permissions.mdx +109 -3
- package/corpus/core/docs/content/template-design-collaboration-and-full-apps.mdx +15 -0
- package/corpus/core/docs/content/toolkit-org-team.mdx +72 -12
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/a2a/artifact-response.ts +36 -29
- package/corpus/core/src/action.ts +83 -2
- package/corpus/core/src/chat-threads/store.ts +48 -43
- package/corpus/core/src/cli/skills-content/design-visual-edit-skill.ts +46 -3
- package/corpus/core/src/cli/template-sync.ts +96 -0
- package/corpus/core/src/client/AgentPanel.tsx +26 -6
- package/corpus/core/src/client/AssistantChat.tsx +63 -7
- package/corpus/core/src/client/DefaultSpinner.tsx +29 -0
- package/corpus/core/src/client/org/TeamPage.tsx +161 -6
- package/corpus/core/src/client/org/hooks.ts +67 -0
- package/corpus/core/src/client/org/index.ts +9 -0
- package/corpus/core/src/client/transcription/use-live-transcription.ts +62 -10
- package/corpus/core/src/db/client.ts +42 -3
- package/corpus/core/src/db/ensure-additive-columns.ts +60 -33
- package/corpus/core/src/deploy/build.ts +31 -2
- package/corpus/core/src/mcp-client/routes.ts +10 -1
- package/corpus/core/src/org/app-roles-handlers.ts +152 -0
- package/corpus/core/src/org/app-roles.ts +355 -0
- package/corpus/core/src/org/index.ts +27 -1
- package/corpus/core/src/org/migrations.ts +22 -0
- package/corpus/core/src/org/plugin.ts +27 -0
- package/corpus/core/src/org/schema.ts +15 -0
- package/corpus/core/src/scripts/docs/search.ts +17 -0
- package/corpus/core/src/scripts/docs/source-search.ts +10 -0
- package/corpus/core/src/server/agent-chat/script-entries.ts +3 -0
- package/corpus/core/src/server/agent-chat-plugin.ts +53 -52
- package/corpus/core/src/server/builder-design-systems.ts +1 -1
- package/corpus/core/src/server/core-routes-plugin.ts +6 -1
- package/corpus/core/src/server/framework-request-handler.ts +44 -6
- package/corpus/core/src/templates/default/.agents/skills/actions/SKILL.md +32 -0
- package/corpus/core/src/templates/default/.agents/skills/adding-a-feature/SKILL.md +7 -0
- package/corpus/core/src/templates/default/.agents/skills/security/SKILL.md +31 -0
- package/corpus/core/src/templates/headless/.agents/skills/actions/SKILL.md +32 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/actions/SKILL.md +32 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/adding-a-feature/SKILL.md +7 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/authentication/SKILL.md +40 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/security/SKILL.md +31 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/sharing/SKILL.md +4 -0
- package/corpus/templates/analytics/.agents/skills/actions/SKILL.md +32 -0
- package/corpus/templates/analytics/.agents/skills/security/SKILL.md +31 -0
- package/corpus/templates/analytics/.agents/skills/sharing/SKILL.md +4 -0
- package/corpus/templates/analytics/actions/data-source-status.ts +21 -12
- package/corpus/templates/analytics/app/global.css +7 -7
- package/corpus/templates/analytics/app/i18n-data.ts +30 -0
- package/corpus/templates/analytics/app/lib/data-source-status.ts +2 -1
- package/corpus/templates/analytics/app/pages/DataSources.tsx +54 -10
- package/corpus/templates/analytics/changelog/2026-07-28-analytics-pages-load-reliably-with-large-dashboard-workspaces.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-28-dashboard-loading-shimmer-now-flows-smoothly-in-one-directi.md +6 -0
- package/corpus/templates/analytics/server/lib/first-party-dashboard-repair.ts +5 -4
- package/corpus/templates/analytics/server/plugins/agent-chat.ts +54 -42
- package/corpus/templates/analytics/server/plugins/db.ts +1 -18
- package/corpus/templates/assets/.agents/skills/actions/SKILL.md +32 -0
- package/corpus/templates/assets/.agents/skills/security/SKILL.md +31 -0
- package/corpus/templates/assets/.agents/skills/sharing/SKILL.md +4 -0
- package/corpus/templates/brain/.agents/skills/actions/SKILL.md +32 -0
- package/corpus/templates/brain/.agents/skills/adding-a-feature/SKILL.md +7 -0
- package/corpus/templates/brain/.agents/skills/security/SKILL.md +31 -0
- package/corpus/templates/brain/.agents/skills/sharing/SKILL.md +4 -0
- package/corpus/templates/calendar/.agents/skills/actions/SKILL.md +32 -0
- package/corpus/templates/calendar/.agents/skills/security/SKILL.md +31 -0
- package/corpus/templates/calendar/.agents/skills/sharing/SKILL.md +4 -0
- package/corpus/templates/chat/.agents/skills/actions/SKILL.md +32 -0
- package/corpus/templates/chat/.agents/skills/adding-a-feature/SKILL.md +7 -0
- package/corpus/templates/chat/.agents/skills/security/SKILL.md +31 -0
- package/corpus/templates/chat/.agents/skills/sharing/SKILL.md +4 -0
- package/corpus/templates/chat/_gitignore +2 -0
- package/corpus/templates/clips/.agents/skills/actions/SKILL.md +32 -0
- package/corpus/templates/clips/.agents/skills/security/SKILL.md +31 -0
- package/corpus/templates/clips/actions/request-transcript.ts +77 -11
- package/corpus/templates/clips/actions/save-browser-transcript.ts +28 -7
- package/corpus/templates/clips/app/routes/record.tsx +11 -3
- package/corpus/templates/clips/changelog/2026-07-28-browser-recordings-no-longer-save-a-truncated-transcript-as-.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-28-browser-recordings-no-longer-stop-transcribing-partway-throu.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-28-desktop-full-screen-clips-now-get-an-instant-local-transcrip.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-28-long-transcriptions-no-longer-show-a-false-transcription-sto.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-28-restarting-for-an-update-now-installs-the-newest-release-ins.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-28-the-meeting-recording-pill-now-anchors-to-the-right-edge-of-.md +6 -0
- package/corpus/templates/clips/desktop/src/lib/audio-meter.ts +31 -2
- package/corpus/templates/clips/desktop/src/lib/recorder.ts +114 -13
- package/corpus/templates/clips/desktop/src/lib/updater.ts +12 -4
- package/corpus/templates/clips/desktop/src/overlays/live-audio-bars.tsx +40 -15
- package/corpus/templates/clips/desktop/src/styles.css +10 -7
- package/corpus/templates/clips/desktop/src-tauri/src/recording_indicator.rs +21 -14
- package/corpus/templates/clips/shared/transcript-status.ts +10 -0
- package/corpus/templates/content/.agents/skills/actions/SKILL.md +32 -0
- package/corpus/templates/content/.agents/skills/security/SKILL.md +31 -0
- package/corpus/templates/content/.agents/skills/sharing/SKILL.md +4 -0
- package/corpus/templates/crm/.agents/skills/sharing/SKILL.md +4 -0
- package/corpus/templates/design/.agents/skills/actions/SKILL.md +32 -0
- package/corpus/templates/design/.agents/skills/design-generation/SKILL.md +23 -0
- package/corpus/templates/design/.agents/skills/security/SKILL.md +31 -0
- package/corpus/templates/design/.agents/skills/sharing/SKILL.md +4 -0
- package/corpus/templates/design/.agents/skills/visual-edit/SKILL.md +46 -3
- package/corpus/templates/design/.generated/bridge/editor-chrome.generated.ts +7 -5
- package/corpus/templates/design/actions/create-file.ts +15 -0
- package/corpus/templates/design/actions/generate-design.ts +40 -0
- package/corpus/templates/design/actions/present-design-variants.ts +16 -0
- package/corpus/templates/design/app/components/design/CanvasContextMenu.tsx +2 -2
- package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +7 -4
- package/corpus/templates/design/app/components/design/keyboard-shortcuts.ts +1 -1
- package/corpus/templates/design/app/hooks/useDesignHotkeys.ts +10 -4
- package/corpus/templates/design/app/lib/design-ui-events.ts +5 -0
- package/corpus/templates/design/app/pages/design-editor/save-failure.ts +7 -1
- package/corpus/templates/design/app/root.tsx +18 -1
- package/corpus/templates/design/changelog/2026-07-28-generated-designs-with-malformed-html-are-now-rejected-at-sa.md +6 -0
- package/corpus/templates/design/changelog/2026-07-28-show-or-hide-design-editing-chrome-with-cmd-on-apple-devices.md +6 -0
- package/corpus/templates/design/server/source-workspace.ts +1 -0
- package/corpus/templates/design/shared/html-integrity.ts +608 -18
- package/corpus/templates/dispatch/.agents/skills/actions/SKILL.md +32 -0
- package/corpus/templates/dispatch/.agents/skills/security/SKILL.md +31 -0
- package/corpus/templates/dispatch/.agents/skills/sharing/SKILL.md +4 -0
- package/corpus/templates/forms/.agents/skills/actions/SKILL.md +32 -0
- package/corpus/templates/forms/.agents/skills/security/SKILL.md +31 -0
- package/corpus/templates/forms/.agents/skills/sharing/SKILL.md +4 -0
- package/corpus/templates/macros/.agents/skills/security/SKILL.md +31 -0
- package/corpus/templates/macros/.agents/skills/sharing/SKILL.md +4 -0
- package/corpus/templates/mail/.agents/skills/actions/SKILL.md +32 -0
- package/corpus/templates/mail/.agents/skills/security/SKILL.md +31 -0
- package/corpus/templates/mail/.agents/skills/sharing/SKILL.md +4 -0
- package/corpus/templates/plan/.agents/skills/actions/SKILL.md +32 -0
- package/corpus/templates/plan/.agents/skills/adding-a-feature/SKILL.md +7 -0
- package/corpus/templates/plan/.agents/skills/security/SKILL.md +31 -0
- package/corpus/templates/plan/.agents/skills/sharing/SKILL.md +4 -0
- package/corpus/templates/slides/.agents/skills/actions/SKILL.md +32 -0
- package/corpus/templates/slides/.agents/skills/security/SKILL.md +31 -0
- package/corpus/templates/slides/.agents/skills/sharing/SKILL.md +4 -0
- package/corpus/templates/slides/app/components/deck/DeckCard.tsx +2 -6
- package/corpus/templates/tasks/.agents/skills/actions/SKILL.md +32 -0
- package/corpus/templates/tasks/.agents/skills/adding-a-feature/SKILL.md +7 -0
- package/corpus/templates/tasks/.agents/skills/security/SKILL.md +31 -0
- package/corpus/templates/tasks/.agents/skills/sharing/SKILL.md +4 -0
- package/dist/a2a/artifact-response.d.ts.map +1 -1
- package/dist/a2a/artifact-response.js +30 -29
- package/dist/a2a/artifact-response.js.map +1 -1
- package/dist/action.d.ts +36 -0
- package/dist/action.d.ts.map +1 -1
- package/dist/action.js +37 -2
- package/dist/action.js.map +1 -1
- package/dist/chat-threads/store.d.ts +12 -0
- package/dist/chat-threads/store.d.ts.map +1 -1
- package/dist/chat-threads/store.js +48 -42
- package/dist/chat-threads/store.js.map +1 -1
- package/dist/cli/skills-content/design-visual-edit-skill.d.ts +1 -1
- package/dist/cli/skills-content/design-visual-edit-skill.d.ts.map +1 -1
- package/dist/cli/skills-content/design-visual-edit-skill.js +46 -3
- package/dist/cli/skills-content/design-visual-edit-skill.js.map +1 -1
- package/dist/cli/template-sync.d.ts.map +1 -1
- package/dist/cli/template-sync.js +88 -0
- package/dist/cli/template-sync.js.map +1 -1
- package/dist/client/AgentPanel.d.ts +3 -1
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +11 -9
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +57 -6
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/DefaultSpinner.d.ts +7 -0
- package/dist/client/DefaultSpinner.d.ts.map +1 -1
- package/dist/client/DefaultSpinner.js +25 -1
- package/dist/client/DefaultSpinner.js.map +1 -1
- package/dist/client/org/TeamPage.d.ts +13 -1
- package/dist/client/org/TeamPage.d.ts.map +1 -1
- package/dist/client/org/TeamPage.js +41 -11
- package/dist/client/org/TeamPage.js.map +1 -1
- package/dist/client/org/hooks.d.ts +37 -0
- package/dist/client/org/hooks.d.ts.map +1 -1
- package/dist/client/org/hooks.js +37 -0
- package/dist/client/org/hooks.js.map +1 -1
- package/dist/client/org/index.d.ts +3 -2
- package/dist/client/org/index.d.ts.map +1 -1
- package/dist/client/org/index.js +1 -1
- package/dist/client/org/index.js.map +1 -1
- package/dist/client/transcription/use-live-transcription.d.ts +8 -0
- package/dist/client/transcription/use-live-transcription.d.ts.map +1 -1
- package/dist/client/transcription/use-live-transcription.js +38 -11
- package/dist/client/transcription/use-live-transcription.js.map +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/db/client.d.ts +12 -0
- package/dist/db/client.d.ts.map +1 -1
- package/dist/db/client.js +40 -3
- package/dist/db/client.js.map +1 -1
- package/dist/db/ensure-additive-columns.d.ts.map +1 -1
- package/dist/db/ensure-additive-columns.js +54 -32
- package/dist/db/ensure-additive-columns.js.map +1 -1
- package/dist/deploy/build.d.ts +1 -0
- package/dist/deploy/build.d.ts.map +1 -1
- package/dist/deploy/build.js +23 -2
- package/dist/deploy/build.js.map +1 -1
- package/dist/mcp-client/routes.d.ts +3 -1
- package/dist/mcp-client/routes.d.ts.map +1 -1
- package/dist/mcp-client/routes.js +8 -2
- package/dist/mcp-client/routes.js.map +1 -1
- package/dist/notifications/routes.d.ts +1 -1
- package/dist/observability/routes.d.ts +3 -3
- package/dist/org/app-roles-handlers.d.ts +27 -0
- package/dist/org/app-roles-handlers.d.ts.map +1 -0
- package/dist/org/app-roles-handlers.js +125 -0
- package/dist/org/app-roles-handlers.js.map +1 -0
- package/dist/org/app-roles.d.ts +136 -0
- package/dist/org/app-roles.d.ts.map +1 -0
- package/dist/org/app-roles.js +216 -0
- package/dist/org/app-roles.js.map +1 -0
- package/dist/org/index.d.ts +4 -1
- package/dist/org/index.d.ts.map +1 -1
- package/dist/org/index.js +3 -1
- package/dist/org/index.js.map +1 -1
- package/dist/org/migrations.d.ts.map +1 -1
- package/dist/org/migrations.js +22 -0
- package/dist/org/migrations.js.map +1 -1
- package/dist/org/plugin.d.ts +2 -0
- package/dist/org/plugin.d.ts.map +1 -1
- package/dist/org/plugin.js +20 -0
- package/dist/org/plugin.js.map +1 -1
- package/dist/org/schema.d.ts +143 -0
- package/dist/org/schema.d.ts.map +1 -1
- package/dist/org/schema.js +14 -0
- package/dist/org/schema.js.map +1 -1
- package/dist/provider-api/actions/custom-provider-registration.d.ts +4 -4
- package/dist/provider-api/actions/provider-api.d.ts +12 -12
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/scripts/docs/search.d.ts.map +1 -1
- package/dist/scripts/docs/search.js +15 -0
- package/dist/scripts/docs/search.js.map +1 -1
- package/dist/scripts/docs/source-search.d.ts +7 -0
- package/dist/scripts/docs/source-search.d.ts.map +1 -1
- package/dist/scripts/docs/source-search.js +9 -0
- package/dist/scripts/docs/source-search.js.map +1 -1
- package/dist/server/agent-chat/script-entries.d.ts.map +1 -1
- package/dist/server/agent-chat/script-entries.js +3 -0
- package/dist/server/agent-chat/script-entries.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +46 -48
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/builder-design-systems.js +1 -1
- package/dist/server/builder-design-systems.js.map +1 -1
- package/dist/server/core-routes-plugin.d.ts.map +1 -1
- package/dist/server/core-routes-plugin.js +6 -1
- package/dist/server/core-routes-plugin.js.map +1 -1
- package/dist/server/framework-request-handler.d.ts.map +1 -1
- package/dist/server/framework-request-handler.js +42 -6
- package/dist/server/framework-request-handler.js.map +1 -1
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/dist/templates/chat/.agents/skills/actions/SKILL.md +32 -0
- package/dist/templates/chat/.agents/skills/adding-a-feature/SKILL.md +7 -0
- package/dist/templates/chat/.agents/skills/security/SKILL.md +31 -0
- package/dist/templates/chat/.agents/skills/sharing/SKILL.md +4 -0
- package/dist/templates/chat/_gitignore +2 -0
- package/dist/templates/default/.agents/skills/actions/SKILL.md +32 -0
- package/dist/templates/default/.agents/skills/adding-a-feature/SKILL.md +7 -0
- package/dist/templates/default/.agents/skills/security/SKILL.md +31 -0
- package/dist/templates/headless/.agents/skills/actions/SKILL.md +32 -0
- package/dist/templates/workspace-core/.agents/skills/actions/SKILL.md +32 -0
- package/dist/templates/workspace-core/.agents/skills/adding-a-feature/SKILL.md +7 -0
- package/dist/templates/workspace-core/.agents/skills/authentication/SKILL.md +40 -0
- package/dist/templates/workspace-core/.agents/skills/security/SKILL.md +31 -0
- package/dist/templates/workspace-core/.agents/skills/sharing/SKILL.md +4 -0
- package/docs/content/actions.mdx +47 -4
- package/docs/content/native-chat-ui.mdx +7 -0
- package/docs/content/organizations-teams-permissions.mdx +109 -3
- package/docs/content/template-design-collaboration-and-full-apps.mdx +15 -0
- package/docs/content/toolkit-org-team.mdx +72 -12
- package/package.json +1 -1
- package/src/a2a/artifact-response.ts +36 -29
- package/src/action.ts +83 -2
- package/src/chat-threads/store.ts +48 -43
- package/src/cli/skills-content/design-visual-edit-skill.ts +46 -3
- package/src/cli/template-sync.ts +96 -0
- package/src/client/AgentPanel.tsx +26 -6
- package/src/client/AssistantChat.tsx +63 -7
- package/src/client/DefaultSpinner.tsx +29 -0
- package/src/client/org/TeamPage.tsx +161 -6
- package/src/client/org/hooks.ts +67 -0
- package/src/client/org/index.ts +9 -0
- package/src/client/transcription/use-live-transcription.ts +62 -10
- package/src/db/client.ts +42 -3
- package/src/db/ensure-additive-columns.ts +60 -33
- package/src/deploy/build.ts +31 -2
- package/src/mcp-client/routes.ts +10 -1
- package/src/org/app-roles-handlers.ts +152 -0
- package/src/org/app-roles.ts +355 -0
- package/src/org/index.ts +27 -1
- package/src/org/migrations.ts +22 -0
- package/src/org/plugin.ts +27 -0
- package/src/org/schema.ts +15 -0
- package/src/scripts/docs/search.ts +17 -0
- package/src/scripts/docs/source-search.ts +10 -0
- package/src/server/agent-chat/script-entries.ts +3 -0
- package/src/server/agent-chat-plugin.ts +53 -52
- package/src/server/builder-design-systems.ts +1 -1
- package/src/server/core-routes-plugin.ts +6 -1
- package/src/server/framework-request-handler.ts +44 -6
- package/src/templates/chat/.agents/skills/actions/SKILL.md +32 -0
- package/src/templates/chat/.agents/skills/adding-a-feature/SKILL.md +7 -0
- package/src/templates/chat/.agents/skills/security/SKILL.md +31 -0
- package/src/templates/chat/.agents/skills/sharing/SKILL.md +4 -0
- package/src/templates/chat/_gitignore +2 -0
- package/src/templates/default/.agents/skills/actions/SKILL.md +32 -0
- package/src/templates/default/.agents/skills/adding-a-feature/SKILL.md +7 -0
- package/src/templates/default/.agents/skills/security/SKILL.md +31 -0
- package/src/templates/headless/.agents/skills/actions/SKILL.md +32 -0
- package/src/templates/workspace-core/.agents/skills/actions/SKILL.md +32 -0
- package/src/templates/workspace-core/.agents/skills/adding-a-feature/SKILL.md +7 -0
- package/src/templates/workspace-core/.agents/skills/authentication/SKILL.md +40 -0
- package/src/templates/workspace-core/.agents/skills/security/SKILL.md +31 -0
- package/src/templates/workspace-core/.agents/skills/sharing/SKILL.md +4 -0
- package/corpus/core/src/templates/chat/.agents/skills/actions/SKILL.md +0 -530
- package/corpus/core/src/templates/chat/.agents/skills/adding-a-feature/SKILL.md +0 -191
- package/corpus/core/src/templates/chat/.agents/skills/agent-native-docs/SKILL.md +0 -115
- package/corpus/core/src/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +0 -177
- package/corpus/core/src/templates/chat/.agents/skills/capture-learnings/SKILL.md +0 -89
- package/corpus/core/src/templates/chat/.agents/skills/create-skill/SKILL.md +0 -221
- package/corpus/core/src/templates/chat/.agents/skills/customizing-agent-native/SKILL.md +0 -220
- package/corpus/core/src/templates/chat/.agents/skills/delegate-to-agent/SKILL.md +0 -263
- package/corpus/core/src/templates/chat/.agents/skills/feature-flags/SKILL.md +0 -169
- package/corpus/core/src/templates/chat/.agents/skills/frontend-design/SKILL.md +0 -174
- package/corpus/core/src/templates/chat/.agents/skills/real-time-sync/SKILL.md +0 -232
- package/corpus/core/src/templates/chat/.agents/skills/security/SKILL.md +0 -282
- package/corpus/core/src/templates/chat/.agents/skills/self-modifying-code/SKILL.md +0 -119
- package/corpus/core/src/templates/chat/.agents/skills/shadcn-ui/SKILL.md +0 -123
- package/corpus/core/src/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +0 -122
- package/corpus/core/src/templates/chat/.env.example +0 -5
- package/corpus/core/src/templates/chat/.ignore +0 -0
- package/corpus/core/src/templates/chat/.oxfmtrc.json +0 -8
- package/corpus/core/src/templates/chat/AGENTS.md +0 -77
- package/corpus/core/src/templates/chat/CHANGELOG.md +0 -10
- package/corpus/core/src/templates/chat/DEVELOPING.md +0 -185
- package/corpus/core/src/templates/chat/README.md +0 -32
- package/corpus/core/src/templates/chat/_gitignore +0 -44
- package/corpus/core/src/templates/chat/actions/hello.ts +0 -13
- package/corpus/core/src/templates/chat/actions/navigate.ts +0 -41
- package/corpus/core/src/templates/chat/actions/run.ts +0 -2
- package/corpus/core/src/templates/chat/actions/view-screen.ts +0 -31
- package/corpus/core/src/templates/chat/app/components/layout/Header.tsx +0 -60
- package/corpus/core/src/templates/chat/app/components/layout/Layout.tsx +0 -188
- package/corpus/core/src/templates/chat/app/components/layout/Sidebar.tsx +0 -505
- package/corpus/core/src/templates/chat/app/components/ui/button.tsx +0 -1
- package/corpus/core/src/templates/chat/app/components/ui/card.tsx +0 -1
- package/corpus/core/src/templates/chat/app/components/ui/dropdown-menu.tsx +0 -1
- package/corpus/core/src/templates/chat/app/components/ui/input.tsx +0 -1
- package/corpus/core/src/templates/chat/app/components/ui/label.tsx +0 -1
- package/corpus/core/src/templates/chat/app/components/ui/sheet.tsx +0 -1
- package/corpus/core/src/templates/chat/app/components/ui/toolkit-provider.tsx +0 -17
- package/corpus/core/src/templates/chat/app/components/ui/tooltip.tsx +0 -1
- package/corpus/core/src/templates/chat/app/design-system.ts +0 -3
- package/corpus/core/src/templates/chat/app/entry.client.tsx +0 -22
- package/corpus/core/src/templates/chat/app/entry.server.tsx +0 -10
- package/corpus/core/src/templates/chat/app/global.css +0 -93
- package/corpus/core/src/templates/chat/app/hooks/use-navigation-state.ts +0 -93
- package/corpus/core/src/templates/chat/app/i18n/ar-SA.ts +0 -68
- package/corpus/core/src/templates/chat/app/i18n/de-DE.ts +0 -71
- package/corpus/core/src/templates/chat/app/i18n/en-US.ts +0 -70
- package/corpus/core/src/templates/chat/app/i18n/es-ES.ts +0 -71
- package/corpus/core/src/templates/chat/app/i18n/fr-FR.ts +0 -71
- package/corpus/core/src/templates/chat/app/i18n/hi-IN.ts +0 -69
- package/corpus/core/src/templates/chat/app/i18n/index.ts +0 -34
- package/corpus/core/src/templates/chat/app/i18n/ja-JP.ts +0 -70
- package/corpus/core/src/templates/chat/app/i18n/ko-KR.ts +0 -70
- package/corpus/core/src/templates/chat/app/i18n/pt-BR.ts +0 -71
- package/corpus/core/src/templates/chat/app/i18n/zh-CN.ts +0 -66
- package/corpus/core/src/templates/chat/app/i18n/zh-TW.ts +0 -66
- package/corpus/core/src/templates/chat/app/i18n-data.ts +0 -556
- package/corpus/core/src/templates/chat/app/lib/agent-page.tsx +0 -49
- package/corpus/core/src/templates/chat/app/lib/app-config.ts +0 -11
- package/corpus/core/src/templates/chat/app/lib/tab-id.ts +0 -1
- package/corpus/core/src/templates/chat/app/lib/utils.ts +0 -1
- package/corpus/core/src/templates/chat/app/root.tsx +0 -173
- package/corpus/core/src/templates/chat/app/routes/_index.tsx +0 -94
- package/corpus/core/src/templates/chat/app/routes/agent.tsx +0 -24
- package/corpus/core/src/templates/chat/app/routes/chat.$threadId.tsx +0 -1
- package/corpus/core/src/templates/chat/app/routes/database.tsx +0 -17
- package/corpus/core/src/templates/chat/app/routes/extensions.$id.$slug.tsx +0 -2
- package/corpus/core/src/templates/chat/app/routes/extensions.$id.tsx +0 -11
- package/corpus/core/src/templates/chat/app/routes/extensions._index.tsx +0 -11
- package/corpus/core/src/templates/chat/app/routes/extensions.tsx +0 -5
- package/corpus/core/src/templates/chat/app/routes/observability.tsx +0 -19
- package/corpus/core/src/templates/chat/app/routes/settings.tsx +0 -89
- package/corpus/core/src/templates/chat/app/routes/team.tsx +0 -11
- package/corpus/core/src/templates/chat/app/routes.ts +0 -4
- package/corpus/core/src/templates/chat/app/vite-env.d.ts +0 -6
- package/corpus/core/src/templates/chat/changelog/2026-06-24-a-new-settings-page-gives-quick-access-to-language-workspace.md +0 -6
- package/corpus/core/src/templates/chat/changelog/2026-06-24-added-a-language-picker-and-localized-app-chrome-for-support.md +0 -6
- package/corpus/core/src/templates/chat/changelog/2026-06-27-traditional-chinese-copy-uses-taiwan-terminology.md +0 -6
- package/corpus/core/src/templates/chat/changelog/2026-06-28-left-sidebar-collapse-motion-and-footer-chrome-are-quieter.md +0 -6
- package/corpus/core/src/templates/chat/changelog/2026-06-29-chat-layouts-adapt-when-the-agent-sidebar-is-open.md +0 -6
- package/corpus/core/src/templates/chat/changelog/2026-07-08-settings-are-cleaner-and-searchable.md +0 -5
- package/corpus/core/src/templates/chat/changelog/2026-07-10-chat-now-makes-ai-connection-setup-clear-without-shifting-th.md +0 -6
- package/corpus/core/src/templates/chat/changelog/2026-07-13-a-full-agent-page-now-brings-context-files-connections-jobs-.md +0 -6
- package/corpus/core/src/templates/chat/changelog/2026-07-14-chat-opens-reliably-on-hosted-deployments-instead-of-failing.md +0 -6
- package/corpus/core/src/templates/chat/changelog/2026-07-14-fixed-chat-template-startup-with-older-core-versions.md +0 -6
- package/corpus/core/src/templates/chat/changelog/2026-07-15-chat-navigation-focuses-on-chat-and-agent.md +0 -6
- package/corpus/core/src/templates/chat/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it-or-sta.md +0 -6
- package/corpus/core/src/templates/chat/changelog/2026-07-22-compact-sidebar-footer.md +0 -6
- package/corpus/core/src/templates/chat/changelog/2026-07-22-full-page-chat-keeps-the-active-conversation-when-moving-to-.md +0 -6
- package/corpus/core/src/templates/chat/changelog/2026-07-22-manage-agent-navigation-now-uses-the-connected-nodes-icon.md +0 -6
- package/corpus/core/src/templates/chat/changelog/2026-07-22-recent-chats-are-easier-to-scan-and-expand.md +0 -6
- package/corpus/core/src/templates/chat/changelog/2026-07-23-full-page-chat-is-better-centered-with-quieter-chat-history-.md +0 -6
- package/corpus/core/src/templates/chat/changelog/2026-07-24-borderless-secondary-surfaces.md +0 -6
- package/corpus/core/src/templates/chat/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +0 -6
- package/corpus/core/src/templates/chat/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +0 -6
- package/corpus/core/src/templates/chat/components.json +0 -20
- package/corpus/core/src/templates/chat/learnings.defaults.md +0 -5
- package/corpus/core/src/templates/chat/netlify.toml +0 -11
- package/corpus/core/src/templates/chat/package.json +0 -92
- package/corpus/core/src/templates/chat/public/agent-native-icon-dark.svg +0 -10
- package/corpus/core/src/templates/chat/public/agent-native-icon-light.svg +0 -10
- package/corpus/core/src/templates/chat/public/agent-native-logo-dark.svg +0 -21
- package/corpus/core/src/templates/chat/public/agent-native-logo-light.svg +0 -21
- package/corpus/core/src/templates/chat/public/favicon.svg +0 -1
- package/corpus/core/src/templates/chat/public/icon-180.svg +0 -1
- package/corpus/core/src/templates/chat/public/icon-192.svg +0 -1
- package/corpus/core/src/templates/chat/public/icon-512.svg +0 -1
- package/corpus/core/src/templates/chat/public/manifest.json +0 -21
- package/corpus/core/src/templates/chat/react-router.config.ts +0 -7
- package/corpus/core/src/templates/chat/server/middleware/auth.ts +0 -15
- package/corpus/core/src/templates/chat/server/plugins/agent-chat.ts +0 -21
- package/corpus/core/src/templates/chat/server/plugins/auth.ts +0 -17
- package/corpus/core/src/templates/chat/server/routes/[...page].get.ts +0 -5
- package/corpus/core/src/templates/chat/ssr-entry.ts +0 -15
- package/corpus/core/src/templates/chat/tsconfig.json +0 -21
- package/corpus/core/src/templates/chat/vite.config.ts +0 -19
package/corpus/README.md
CHANGED
package/corpus/core/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,97 @@
|
|
|
1
1
|
# @agent-native/core
|
|
2
2
|
|
|
3
|
+
## 0.128.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- ce559da: Add per-app member roles: `defineAppRoles`, an `authorize` gate on `defineAction`, and an `appRoles` column on `TeamPage`.
|
|
8
|
+
|
|
9
|
+
Apps that need permissions of their own no longer have to hand-roll a members table or collapse a rich vocabulary into the org's three roles. `defineAppRoles({ appId, roles })` declares an app's role set; `authorize: myApp.requireAny("admin")` gates an action for every caller (agent tool, HTTP, frontend, MCP, A2A, CLI) because it wraps `run` rather than hanging off a flag the dispatchers each have to remember; `<TeamPage appRoles={descriptor} />` adds the assignment column to the existing roster instead of forcing a second members view.
|
|
10
|
+
|
|
11
|
+
Org membership stays canonical — an app role only narrows what an existing member may do inside one app. Roles are an unordered set, not a ladder: authorization always names the accepted roles explicitly. `defaultRole` is a display value and never satisfies a guard, membership and assignment resolve in one statement so a stale row cannot authorize, and a failed lookup throws rather than resolving to a deny-shaped status.
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- ce559da: Keep serverless startup bounded by moving legacy chat-thread repair, global stale-run cleanup, and remote MCP connection setup out of route initialization, and batch additive Postgres schema introspection into one query.
|
|
16
|
+
- ce559da: Keep the hidden-mode agent sidebar on chat when restoring persisted panel state.
|
|
17
|
+
- ce559da: Fix browser live transcription silently freezing mid-recording. `useLiveTranscription` now restarts recognition off the event loop instead of synchronously inside `onend` (Chrome throws `InvalidStateError` there), retries a failed restart with backoff instead of giving up after one throw, and exposes `getIncompleteReason()` so callers can tell a partial capture from a finished one.
|
|
18
|
+
- ce559da: Make two first-run failures explain themselves instead of looking like a broken app.
|
|
19
|
+
|
|
20
|
+
The full-screen loading shell now reveals an explanatory line after 10 seconds
|
|
21
|
+
("a first run compiles dependencies…, otherwise check the terminal"). The reveal
|
|
22
|
+
is a pure-CSS `animation-delay`, not a timer, because the states that strand a
|
|
23
|
+
user on this screen — hydration never running, a route module 404ing, a cold dev
|
|
24
|
+
compile — are exactly the states where none of our JS executes. A featureless
|
|
25
|
+
spinner is indistinguishable from a blank page and reads as "the app is broken"
|
|
26
|
+
rather than "look at the terminal".
|
|
27
|
+
|
|
28
|
+
Missing-table database errors now name the likely cause. The driver reports
|
|
29
|
+
`no such table: x` from whichever query touched it first, so the stack lands in
|
|
30
|
+
an action and reads as a bug there; the real cause is almost always that no
|
|
31
|
+
migration created it, which is what a template with no `server/plugins/db.ts`
|
|
32
|
+
does. The hint is appended to the driver's original message, so existing error
|
|
33
|
+
classifiers that match its substrings are unaffected.
|
|
34
|
+
|
|
35
|
+
- ce559da: Stop refusing real deck URLs in A2A responses. The artifact guard only accepted
|
|
36
|
+
decks from `create-deck`, `duplicate-deck`, `get-deck`, `list-decks`, and
|
|
37
|
+
`add-slide`, and rejected a `create-deck` that saved an empty deck — so the
|
|
38
|
+
documented "create empty, then fill" flow, `patch-deck`, `save-deck`,
|
|
39
|
+
`update-slide`, `import-pptx`, and `restore-deck-version` all produced "I could
|
|
40
|
+
not verify the deck URL" for decks that were genuinely saved. Any successful
|
|
41
|
+
result that names a deck (an explicit `deckId`, or a canonical `/deck/<id>` URL
|
|
42
|
+
the action itself returned) now verifies it.
|
|
43
|
+
- ce559da: Fix the cold-start failure mode that turns a serverless page load into a burst of 502/504s, and stop the chat spinner from hanging forever when the run-status probe is unreachable.
|
|
44
|
+
|
|
45
|
+
**Container-killing 502.** `createCoreRoutesPlugin` rethrew after `rejectInit(error)`.
|
|
46
|
+
Nitro invokes plugins as `try { plugin(app) } catch`, which cannot catch an async
|
|
47
|
+
rejection, so that rethrow surfaced as an `unhandledRejection`: Node exits, the
|
|
48
|
+
serverless container dies, and every in-flight request on it returns a bare 502.
|
|
49
|
+
`rejectInit` already routes the failure to the readiness gate's retryable 503, so
|
|
50
|
+
the rethrow only destroyed the container.
|
|
51
|
+
|
|
52
|
+
**Unbounded readiness gate.** Requests to `/_agent-native/*` waited on plugin
|
|
53
|
+
bootstrap with no deadline, so a slow cold boot parked them until the platform
|
|
54
|
+
killed the invocation — the client got nothing it could act on. The gate now
|
|
55
|
+
releases after `AGENT_NATIVE_ROUTE_READY_TIMEOUT_MS` (default 25s, deliberately
|
|
56
|
+
below the shortest deployment target's request wall) and answers with a retryable
|
|
57
|
+
503 instead.
|
|
58
|
+
|
|
59
|
+
**155MB function bundles.** Serverless builds copied every platform variant of
|
|
60
|
+
`@libsql` and `@resvg` into the output — darwin, win32, android and 32-bit arm
|
|
61
|
+
binaries a Lambda can never execute, ~66MB of dead weight, paid again for each
|
|
62
|
+
additional emitted function. Cold start scales with bundle size, and a page that
|
|
63
|
+
opens several requests at once scales out to that many cold containers, which is
|
|
64
|
+
why this surfaced as 502/504 on a page's first burst rather than as a slow deploy.
|
|
65
|
+
|
|
66
|
+
**Eternal "Thinking…".** `AssistantChat` treated a failed `/runs/active` probe as
|
|
67
|
+
"no active run" and returned early. That probe is the only path that clears the
|
|
68
|
+
stored active run and no caller reschedules it, so a transient 5xx left the
|
|
69
|
+
spinner up permanently — surviving reloads, because the stored run lives in
|
|
70
|
+
`sessionStorage`. It now retries, then clears the stored run and raises a
|
|
71
|
+
recoverable `run_status_unavailable` error. `activeRunLooksStale` also falls back
|
|
72
|
+
to the heartbeat when a run was killed before recording any progress, so those
|
|
73
|
+
runs no longer read as perpetually fresh.
|
|
74
|
+
|
|
75
|
+
**Dead tools advertised in production.** `source-search` was registered for the
|
|
76
|
+
production agent even where its corpus is not deployed, so its only possible
|
|
77
|
+
answer was "not found". It is now registered only when the corpus exists, and
|
|
78
|
+
`docs-search` says when framework doc pages are absent from the deployment
|
|
79
|
+
instead of letting a miss read as "that page does not exist".
|
|
80
|
+
|
|
81
|
+
- ce559da: Teach visual-edit to open Design in supported inline browser panes and document multi-page, flow, state, and responsive canvas reviews.
|
|
82
|
+
|
|
83
|
+
## 0.127.3
|
|
84
|
+
|
|
85
|
+
### Patch Changes
|
|
86
|
+
|
|
87
|
+
- 750e90e: Add a `materialize --out <dir>` subcommand to `agent-native template` that writes the post-processed standalone template tree (e.g. `--template chat`, with the template's own identity, `_gitignore`→`.gitignore`, resolved deps, standalone `netlify.toml`) to a directory — no existing app required. This is the monorepo half of the vendor-branch starter mirror: the public monorepo materializes `templates/chat` and pushes it to the private starter's `template` branch, which the starter merges into `main` with git. Reuses the existing `materializeTemplate` engine.
|
|
88
|
+
|
|
89
|
+
## 0.127.2
|
|
90
|
+
|
|
91
|
+
### Patch Changes
|
|
92
|
+
|
|
93
|
+
- c6ca76a: Fix the Builder Design Systems API base URL fallback incorrectly including an `agent-native/` prefix. The real route is registered as `/design-systems/v1/...` with no `agent-native/` prefix, so requests using the fallback base URL (when `BUILDER_DESIGN_SYSTEMS_BASE_URL` is unset) were hitting the wrong path.
|
|
94
|
+
|
|
3
95
|
## 0.127.1
|
|
4
96
|
|
|
5
97
|
### Patch Changes
|
package/corpus/core/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## The framework for agentic apps
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Don't pick between apps or agents. Agent-Native apps are both.
|
|
6
6
|
|
|
7
7
|
```ts
|
|
8
8
|
// One action powers every app surface: UI, agent, HTTP, MCP, A2A, and CLI.
|
|
@@ -22,20 +22,11 @@ export default defineAction({
|
|
|
22
22
|
- **[Backend agnostic](https://agent-native.com/docs/database)**: Plug in any Drizzle-supported SQL database and Nitro-compatible host.
|
|
23
23
|
- **[Toolkits](https://agent-native.com/docs/agent-native-toolkit)**: Reusable building blocks for collaboration, sharing, settings, teams, and observability.
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
Agent-native apps are both
|
|
28
|
-
|
|
29
|
-
| | SaaS Tools | Raw AI Agents | Internal Tools | Agent-Native App |
|
|
30
|
-
| ----------------- | ------------------ | ----------------------- | -------------------------- | ----------------------- |
|
|
31
|
-
| **UI** | Polished but rigid | None | Mixed quality | Full UI, fork & go |
|
|
32
|
-
| **AI** | Bolted on | Powerful | Shallowly connected | Agent-first, integrated |
|
|
33
|
-
| **Customization** | Can't | Instructions and skills | Full, but high maintenance | Agent modifies the app |
|
|
34
|
-
| **Ownership** | Rented | Somewhat yours | You own the code | You own the code |
|
|
25
|
+
https://github.com/user-attachments/assets/ef51644b-6506-46d8-8083-0af7b7e5b65c
|
|
35
26
|
|
|
36
27
|
## Try an Agent-Native app
|
|
37
28
|
|
|
38
|
-
|
|
29
|
+
Start from a working app and let the agent evolve it. **You can customize everything.**
|
|
39
30
|
|
|
40
31
|
<table>
|
|
41
32
|
<tr>
|
|
@@ -47,8 +38,6 @@ Fork a working app and let the agent evolve it. **You can customize everything.*
|
|
|
47
38
|
|
|
48
39
|
**Agent-Native Loom**
|
|
49
40
|
|
|
50
|
-
Record your screen with auto-transcripts and captured browser debug logs, share a link, and let an agent read the transcript, see timestamped frames, and fix the bug.
|
|
51
|
-
|
|
52
41
|
</td>
|
|
53
42
|
<td width="33%" align="center" valign="top">
|
|
54
43
|
|
|
@@ -58,8 +47,6 @@ Record your screen with auto-transcripts and captured browser debug logs, share
|
|
|
58
47
|
|
|
59
48
|
**Visual plan mode for coding agents**
|
|
60
49
|
|
|
61
|
-
Install `/visual-plan` and `/visual-recap` so your coding agent can plan before it builds and recap changes after they land. High-level code reviews with diagrams, wireframes, annotations, and review links.
|
|
62
|
-
|
|
63
50
|
</td>
|
|
64
51
|
<td width="33%" align="center" valign="top">
|
|
65
52
|
|
|
@@ -69,8 +56,6 @@ Install `/visual-plan` and `/visual-recap` so your coding agent can plan before
|
|
|
69
56
|
|
|
70
57
|
**Agent-Native Figma**
|
|
71
58
|
|
|
72
|
-
Generate interactive HTML prototypes, compare variants, refine controls, and export the result.
|
|
73
|
-
|
|
74
59
|
</td>
|
|
75
60
|
</tr>
|
|
76
61
|
<tr>
|
|
@@ -82,8 +67,6 @@ Generate interactive HTML prototypes, compare variants, refine controls, and exp
|
|
|
82
67
|
|
|
83
68
|
**Agent-Native Notion/Obsidian**
|
|
84
69
|
|
|
85
|
-
Edit local Markdown/MDX files, generate rich interactive custom blocks, and draft, rewrite, or publish with an agent.
|
|
86
|
-
|
|
87
70
|
</td>
|
|
88
71
|
<td width="33%" align="center" valign="top">
|
|
89
72
|
|
|
@@ -93,8 +76,6 @@ Edit local Markdown/MDX files, generate rich interactive custom blocks, and draf
|
|
|
93
76
|
|
|
94
77
|
**Open-Source Alternative to Amplitude and FullStory**
|
|
95
78
|
|
|
96
|
-
Connect analytics data sources, prompt for real charts, and build reusable dashboards.
|
|
97
|
-
|
|
98
79
|
</td>
|
|
99
80
|
<td width="33%" align="center" valign="top">
|
|
100
81
|
|
|
@@ -104,13 +85,11 @@ Connect analytics data sources, prompt for real charts, and build reusable dashb
|
|
|
104
85
|
|
|
105
86
|
**A minimal ChatGPT-style app for your own agent**
|
|
106
87
|
|
|
107
|
-
Chat-first app scaffold with durable threads, actions, auth, live sync, and a clean path to add screens or plug in your own agent backend.
|
|
108
|
-
|
|
109
88
|
</td>
|
|
110
89
|
</tr>
|
|
111
90
|
</table>
|
|
112
91
|
|
|
113
|
-
View the full
|
|
92
|
+
View the [full gallery](https://agent-native.com/apps), or build from scratch with the **[framework guide](https://agent-native.com/docs/getting-started)**.
|
|
114
93
|
|
|
115
94
|
## Quick Start
|
|
116
95
|
|
|
@@ -123,7 +102,7 @@ pnpm install
|
|
|
123
102
|
pnpm dev
|
|
124
103
|
```
|
|
125
104
|
|
|
126
|
-
Prefer flags? `create my-app --template
|
|
105
|
+
Prefer flags? `create my-app --template chat`, `--headless`, or `--standalone` skip the prompt.
|
|
127
106
|
|
|
128
107
|
See the full [getting started docs](https://agent-native.com/docs).
|
|
129
108
|
|
|
@@ -94,7 +94,8 @@ For App Operations](/docs/server#actions-first).
|
|
|
94
94
|
|
|
95
95
|
On this page: [Start with one action](#hello-action), [Defining an action](#defining),
|
|
96
96
|
[Run context](#run-context), [Access control](#access-control),
|
|
97
|
-
[Human-in-the-loop approval](#needs-approval),
|
|
97
|
+
[Authorization](#authorize), [Human-in-the-loop approval](#needs-approval),
|
|
98
|
+
[Audit logging](#audit),
|
|
98
99
|
[Calling from the UI](#ui), [Native chat UI](#native-chat-ui),
|
|
99
100
|
[Calling from the CLI](#cli), [A2A](#a2a), [MCP](#mcp),
|
|
100
101
|
[Standard actions](#standard-actions), and [Feature flags](#feature-flags).
|
|
@@ -258,7 +259,7 @@ POST by default; `http: { method: "GET" }` makes it a GET. The React hooks and `
|
|
|
258
259
|
- **`http: { method: "GET" | "POST" | "PUT" | "DELETE" }`** — default `POST`. `GET` actions are auto-marked `readOnly` so successful calls don't trigger a UI poll-refresh.
|
|
259
260
|
- **`http: { path: "..." }`** — override the mounted URL under `/_agent-native/actions/`. Defaults to the filename. **Path overrides change the URL only for direct HTTP callers** — `useActionQuery`, `useActionMutation`, and `callAction` always call `/_agent-native/actions/<name>` regardless of this override, so overriding the path makes those hooks 404. Use path overrides only for external HTTP callers. Note also that `:param` route segments in the override path are **not** parsed into `run()` args — only query-string params and JSON body fields are.
|
|
260
261
|
- **`http: false`** — disable the HTTP endpoint entirely. Agent + CLI only.
|
|
261
|
-
- **`readOnly: true`** — explicitly skip the poll-refresh even for POST actions that don't mutate.
|
|
262
|
+
- **`readOnly: true`** — explicitly skip the poll-refresh even for POST actions that don't mutate. It is **not** access control: it does not restrict who may call the action, and it does not affect `useActionQuery`, `useActionMutation`, or any client hook. Its only effects are suppressing the post-call refresh event and opting the action out of write-auditing. To hide an action from the model use `agentTool: false`; to gate callers use the auth/access options above.
|
|
262
263
|
- **`parallelSafe: true`** — allow a mutating action to run concurrently with other same-turn tool calls. Only set this when the action is internally concurrency-safe and order-independent; mutating actions serialize by default.
|
|
263
264
|
|
|
264
265
|
### Keep the action surface small {#small-surface}
|
|
@@ -274,7 +275,7 @@ A repo-level advisory helper, `node scripts/audit-template-actions.mjs [template
|
|
|
274
275
|
|
|
275
276
|
### Exposure flags {#exposure-flags}
|
|
276
277
|
|
|
277
|
-
|
|
278
|
+
Five flags control _who_ can invoke an action. All default to the permissive value, so you only set one to tighten a specific surface. This table is the glanceable summary; the subsections add the one detail each needs.
|
|
278
279
|
|
|
279
280
|
| Flag | Default | Restrictive value → who can still call | Typical use |
|
|
280
281
|
| --------------- | ------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------- |
|
|
@@ -282,8 +283,9 @@ Four flags control _who_ can invoke an action. All default to the permissive val
|
|
|
282
283
|
| `toolCallable` | `true` | `false` → everything **except** the sandboxed extension iframe bridge (403) | Auth-adjacent ops (delete account, change org membership/roles) |
|
|
283
284
|
| `publicAgent` | off (private) | `{ expose: true }` → adds the action to **public** MCP/A2A/OpenAPI surfaces | Safe read/ingest tools reachable without authentication |
|
|
284
285
|
| `needsApproval` | `false` | `true` → the agent **pauses**; a human must approve the specific call | Consequential side effects (send email, charge a card, delete) |
|
|
286
|
+
| `authorize` | none | a guard function → only callers it accepts, on **every** surface | Operations restricted to a role (per-app RBAC, admin-only ops) |
|
|
285
287
|
|
|
286
|
-
These are independent: `agentTool` controls the model's view, `toolCallable` controls only the extension iframe, `publicAgent` adds an opt-in public surface (public web routes never imply public tool exposure),
|
|
288
|
+
These are independent: `agentTool` controls the model's view, `toolCallable` controls only the extension iframe, `publicAgent` adds an opt-in public surface (public web routes never imply public tool exposure), `needsApproval` gates execution after the call is made — see [Human-in-the-loop approval](#needs-approval) below — and `authorize` decides whether this caller may run the action at all, on every dispatch path, before `run` is entered — see [Authorization](#authorize).
|
|
287
289
|
|
|
288
290
|
#### `agentTool` — hide from the model {#agent-tool}
|
|
289
291
|
|
|
@@ -403,6 +405,47 @@ export default defineAction({
|
|
|
403
405
|
|
|
404
406
|
For list and read actions, use `accessFilter` to scope the query to the current user and org. For actions that update or delete a specific row, use `assertAccess` to confirm the caller is allowed before writing. See [Security](/docs/security#access-guards) and [Sharing](/docs/sharing) for the full helper API.
|
|
405
407
|
|
|
408
|
+
### Authorization {#authorize}
|
|
409
|
+
|
|
410
|
+
`accessFilter` / `assertAccess` scope _which rows_ a permitted caller may touch. `authorize` answers the question before that one: **may this caller run this operation at all?** Give it a guard function and it runs before `run()` on every caller — agent tool, HTTP, frontend, MCP, A2A, and CLI:
|
|
411
|
+
|
|
412
|
+
```ts
|
|
413
|
+
import { coachAccess } from "../server/lib/access.js";
|
|
414
|
+
|
|
415
|
+
export default defineAction({
|
|
416
|
+
description: "Archive a training plan.",
|
|
417
|
+
schema: z.object({ id: z.string() }),
|
|
418
|
+
authorize: coachAccess.requireAny("coach-admin"),
|
|
419
|
+
run: async ({ id }) => {
|
|
420
|
+
/* ... */
|
|
421
|
+
},
|
|
422
|
+
});
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
The guard wraps `run` itself rather than hanging off the action entry, because `run` is the one thing all six dispatch sites go through — there is no caller that can reach the body without passing the check. A guard that throws denies with its own message; one that returns `false` denies with a generic 403; anything else, including `undefined`, allows. Because the gate needs a caller identity, an unattended CLI or cron invocation with no user email is denied rather than waved through.
|
|
426
|
+
|
|
427
|
+
The wrappers compose in this order:
|
|
428
|
+
|
|
429
|
+
```text
|
|
430
|
+
validate input -> authorize -> run -> validate output -> audit
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
Authorization sits _inside_ input validation, so a guard that inspects `args` is handed the parsed, coerced value its type promises rather than whatever shape the caller sent. Auditing is outermost, so a denial is still recorded.
|
|
434
|
+
|
|
435
|
+
`requireAny` fails at definition time, not at request time: calling it with no roles, or with a role outside the declared vocabulary, throws when the module loads. `authorize: coachAccess.requireAny()` is a dropped argument, and it should break where the mistake is rather than surface later as an unexplained 403.
|
|
436
|
+
|
|
437
|
+
The three mechanisms are not interchangeable:
|
|
438
|
+
|
|
439
|
+
| Mechanism | Question it answers | Applies to |
|
|
440
|
+
| ----------------------------- | -------------------------------------------------- | --------------------------- |
|
|
441
|
+
| `authorize` | May this caller perform the operation at all? | All six dispatch sites |
|
|
442
|
+
| `needsApproval` | Should a human bless this specific permitted call? | The agent loop only |
|
|
443
|
+
| `accessFilter`/`assertAccess` | Which rows may this permitted caller see or write? | Inside `run`, per query/row |
|
|
444
|
+
|
|
445
|
+
A restricted write action typically needs both `authorize` and `assertAccess`: the first keeps non-coaches out of the operation, the second keeps a coach out of another org's plan. `needsApproval` is a separate axis again — it never restricts _who_ may call, only whether the agent may proceed unattended.
|
|
446
|
+
|
|
447
|
+
`coachAccess` above comes from `defineAppRoles`, the per-app role overlay on org membership. See [Organizations, Teams & Permissions → App roles](/docs/organizations-teams-permissions#app-roles-per-app-rbac) for the role model and its guarantees.
|
|
448
|
+
|
|
406
449
|
### Human-in-the-loop approval {#needs-approval}
|
|
407
450
|
|
|
408
451
|
A handful of actions are too consequential to let the agent run autonomously — sending an email, charging a card, deleting an account. Set `needsApproval: true` (or a predicate `(args, ctx) => boolean | Promise<boolean>`) on `defineAction` and the loop pauses before `run()`, requiring a human to approve that specific call. The default is **off**, and almost every action should stay that way.
|
|
@@ -246,6 +246,13 @@ export default defineAction({
|
|
|
246
246
|
Use this for first-party app UI. Keep cross-host iframe UI in `mcpApp`, and keep
|
|
247
247
|
arbitrary query execution behind typed read actions rather than raw SQL in chat.
|
|
248
248
|
|
|
249
|
+
Size renderers in absolute units, not percentages. The transcript grows to fit
|
|
250
|
+
its messages, so a renderer's container has no definite height to resolve a
|
|
251
|
+
percentage against — `height: 40%` on a chart bar collapses to zero rather than
|
|
252
|
+
erroring, which reads as a renderer that failed to draw. Give charts and other
|
|
253
|
+
height-driven visuals a pixel (or `rem`) basis; widths are fine as percentages
|
|
254
|
+
because the transcript column does have a definite width.
|
|
255
|
+
|
|
249
256
|
## BYO agent runtimes {#byo-agent-runtimes}
|
|
250
257
|
|
|
251
258
|
`AgentChatRuntime` is the bring-your-own-agent contract for the chat shell, and
|
|
@@ -41,8 +41,8 @@ server-side action or access guard must enforce the rule.
|
|
|
41
41
|
## Organizations and teams
|
|
42
42
|
|
|
43
43
|
Every scaffold includes the framework's own `org/` module. It is backed by
|
|
44
|
-
`organizations`, `org_members`, and `
|
|
45
|
-
organization plugin. The built-in flow supports:
|
|
44
|
+
`organizations`, `org_members`, `org_invitations`, and `app_member_roles`; it is
|
|
45
|
+
not Better Auth's organization plugin. The built-in flow supports:
|
|
46
46
|
|
|
47
47
|
- Creating an organization. The creator becomes the `owner`.
|
|
48
48
|
- Inviting people as `member` or `admin` and accepting invitations.
|
|
@@ -64,6 +64,8 @@ routes are:
|
|
|
64
64
|
| `GET /_agent-native/org/members` | List members in the active organization |
|
|
65
65
|
| `DELETE /_agent-native/org/members/:email` | Remove a member |
|
|
66
66
|
| `PUT /_agent-native/org/members/:email/role` | Change a member's role |
|
|
67
|
+
| `GET /_agent-native/org/app-roles?appId=X` | An app's role vocabulary plus its assignments in the active org |
|
|
68
|
+
| `PUT /_agent-native/org/app-roles/:email` | Assign or clear one member's app role (owner/admin only) |
|
|
67
69
|
| `GET /_agent-native/org/invitations` | List pending invites |
|
|
68
70
|
| `POST /_agent-native/org/invitations` | Invite one or more people |
|
|
69
71
|
| `POST /_agent-native/org/invitations/:id/accept` | Accept an invitation |
|
|
@@ -91,7 +93,8 @@ export function AppShell() {
|
|
|
91
93
|
export function TeamSettings() {
|
|
92
94
|
return (
|
|
93
95
|
<RequireActiveOrg>
|
|
94
|
-
|
|
96
|
+
{/* `appRoles` is optional — see App roles below */}
|
|
97
|
+
<TeamPage appRoles={coachRoles} />
|
|
95
98
|
</RequireActiveOrg>
|
|
96
99
|
);
|
|
97
100
|
}
|
|
@@ -162,11 +165,114 @@ The same helpers are available from
|
|
|
162
165
|
client checks as progressive disclosure only; repeat the authorization check
|
|
163
166
|
in the server action or route that changes org state.
|
|
164
167
|
|
|
168
|
+
## App roles (per-app RBAC)
|
|
169
|
+
|
|
170
|
+
App roles answer: **what may this person do inside _one app_?**
|
|
171
|
+
|
|
172
|
+
An organization role is a statement about the team, and a resource role is a
|
|
173
|
+
statement about a row. Neither can express "Dana runs the coaching program, but
|
|
174
|
+
is an ordinary member everywhere else." App roles are that overlay: an
|
|
175
|
+
app-defined vocabulary layered on the org roster, stored in `app_member_roles`
|
|
176
|
+
and edited from the same team surface. They are not a second roster — do not
|
|
177
|
+
create another organization to get app-specific permissions.
|
|
178
|
+
|
|
179
|
+
Declare the vocabulary once in app source, then guard actions with an explicit
|
|
180
|
+
list of accepted roles:
|
|
181
|
+
|
|
182
|
+
```ts
|
|
183
|
+
// server/lib/access.ts
|
|
184
|
+
import { defineAppRoles } from "@agent-native/core/org-team";
|
|
185
|
+
|
|
186
|
+
export const coachAccess = defineAppRoles({
|
|
187
|
+
appId: "coach",
|
|
188
|
+
roles: ["member", "coach-admin"] as const,
|
|
189
|
+
defaultRole: "member", // display only — never satisfies a guard
|
|
190
|
+
label: "Coach role", // column header in TeamPage
|
|
191
|
+
roleLabels: { "coach-admin": "Coach admin" },
|
|
192
|
+
});
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
```ts
|
|
196
|
+
// actions/archive-plan.ts
|
|
197
|
+
export default defineAction({
|
|
198
|
+
description: "Archive a training plan.",
|
|
199
|
+
schema: z.object({ id: z.string() }),
|
|
200
|
+
authorize: coachAccess.requireAny("coach-admin"),
|
|
201
|
+
run: async ({ id }) => {
|
|
202
|
+
/* ... */
|
|
203
|
+
},
|
|
204
|
+
});
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
Against `requireAny("coach-admin")`, the caller resolves to exactly one of:
|
|
208
|
+
|
|
209
|
+
| Caller | `resolve()` status | Passes the guard |
|
|
210
|
+
| ------------------------------------------ | ------------------ | ----------------------------- |
|
|
211
|
+
| Org member assigned `coach-admin` | `assigned` | Yes |
|
|
212
|
+
| Org member assigned `member` | `assigned` | No — not in the accepted list |
|
|
213
|
+
| Org member with no assignment row | `unassigned` | No, even with a `defaultRole` |
|
|
214
|
+
| Signed-in user who is not in this org | `not-a-member` | No |
|
|
215
|
+
| Request with no active organization | `no-org` | No |
|
|
216
|
+
| Unattended caller with no user (CLI, cron) | `no-identity` | No |
|
|
217
|
+
|
|
218
|
+
The caveats that make this safe to build on:
|
|
219
|
+
|
|
220
|
+
- **Roles are an unordered set, not a ladder.** Declaration order carries no
|
|
221
|
+
meaning; `["ae", "se", "csm"]` are classifications, and ranking them would
|
|
222
|
+
silently grant the last one everything the first one has. Authorization is
|
|
223
|
+
always an explicit accepted-role list, never "at least".
|
|
224
|
+
- **`defaultRole` is display only.** `requireAny` matches an explicit
|
|
225
|
+
assignment row and nothing else. If the default satisfied a guard, "nobody
|
|
226
|
+
has assigned this person" and "this person was granted the role" would be the
|
|
227
|
+
same answer, and later widening the default would silently widen every guard
|
|
228
|
+
that names it.
|
|
229
|
+
- **Org membership is a precondition.** Membership and assignment resolve in
|
|
230
|
+
one SQL statement, so an assignment left behind by a removed member can never
|
|
231
|
+
authorize.
|
|
232
|
+
- **A failed lookup throws.** It is not one of the deny statuses above: a
|
|
233
|
+
database error is not an answer, and reporting it as a denial would look
|
|
234
|
+
exactly like a legitimate one.
|
|
235
|
+
- **`requireAny` validates at definition time.** Calling it with no roles, or
|
|
236
|
+
with a role outside the declared vocabulary, throws when the module loads —
|
|
237
|
+
a dropped argument breaks where the mistake is instead of surfacing later as
|
|
238
|
+
an unexplained 403 in production.
|
|
239
|
+
- **An explicit `null` caller is not "unspecified".** `resolve({ userEmail:
|
|
240
|
+
null })` means "this run has no user" and does not fall back to the ambient
|
|
241
|
+
request context; only `undefined` does. Collapsing the two would let a system
|
|
242
|
+
or cron caller that deliberately declared no identity inherit whichever
|
|
243
|
+
request happens to be on the stack and authorize as that person.
|
|
244
|
+
- **`appId` comes from trusted server config, never from the request.** The
|
|
245
|
+
REST layer resolves descriptors out of the `defineAppRoles` registry and 404s
|
|
246
|
+
an app id the server never declared.
|
|
247
|
+
- **An app admin is not an org admin.** Only org owners and admins may change
|
|
248
|
+
app-role assignments, and nothing in the org handlers reads an app role. The
|
|
249
|
+
implication does not run in either direction.
|
|
250
|
+
|
|
251
|
+
In the browser, `<TeamPage appRoles={coachRoles} />` adds a role column and
|
|
252
|
+
picker next to the org role. The argument is the descriptor — the serializable
|
|
253
|
+
half of the declaration, free of database imports — so hoist that object literal
|
|
254
|
+
into a shared module as `coachRoles`, hand it to `defineAppRoles` on the server,
|
|
255
|
+
and pass the same object to `TeamPage`. Passing `coachAccess` itself would drag
|
|
256
|
+
the database into the browser bundle. To read the current user's own role:
|
|
257
|
+
|
|
258
|
+
```tsx
|
|
259
|
+
import { useAppRole } from "@agent-native/core/client/org-team";
|
|
260
|
+
|
|
261
|
+
const { role } = useAppRole("coach");
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
`useAppRoles`, `useAppRole`, and `useSetAppMemberRole` are progressive
|
|
265
|
+
disclosure only. Every guarded operation re-resolves the role on the server, so
|
|
266
|
+
a client that shows the wrong affordance still cannot perform the operation.
|
|
267
|
+
See [Actions → Authorization](/docs/actions#authorize) for how `authorize`
|
|
268
|
+
differs from `needsApproval` and from row-level access guards.
|
|
269
|
+
|
|
165
270
|
## Resource permissions (sharing RBAC)
|
|
166
271
|
|
|
167
272
|
Organization roles and resource roles are different systems:
|
|
168
273
|
|
|
169
274
|
- **Organization role** controls team administration.
|
|
275
|
+
- **App role** controls what a member may do inside one app.
|
|
170
276
|
- **Resource role** controls access to one document, dashboard, or other
|
|
171
277
|
shareable row.
|
|
172
278
|
|
|
@@ -11,6 +11,21 @@ Once a prototype is in good shape, this page covers what happens next: pulling i
|
|
|
11
11
|
|
|
12
12
|
Design isn't only for prototypes generated from a prompt — a coding agent can install `/visual-edit` to bring a real, already-running local app into Design as its own screens. Each requested path or URL becomes its own screen on the canvas, and a numbered flow (an onboarding step 1, 2, 3) stays as separate ordered screens instead of collapsing into one. The entry route renders before sign-in, and a shared design link works read-only without an account — but saving the layout, generating new screens, or sharing still requires signing in first.
|
|
13
13
|
|
|
14
|
+
### Keep the canvas beside your chat
|
|
15
|
+
|
|
16
|
+
When your coding app has an inline browser, ask `/visual-edit` to open the returned Design URL there. In Codex Desktop, that means the built-in Browser; in Claude Code Desktop's Code tab, it means the Browser pane. Both can keep the canvas inside the coding app beside the conversation. In VS Code, the Agent Native extension opens the same Design URL in its side-panel webview. Browser panes can be disabled or unavailable in CLI, remote, or restricted sessions, so `/visual-edit` falls back to an **Open design** link instead of claiming the canvas opened.
|
|
17
|
+
|
|
18
|
+
Once Design is open, choose **Show/Hide UI** from the `Cmd+K` menu or press `Cmd+Shift+\` on Apple devices / `Ctrl+Shift+\` elsewhere to toggle all editing chrome so only the canvas remains. The same action is available by right-clicking empty canvas space.
|
|
19
|
+
|
|
20
|
+
These are especially useful canvas sets:
|
|
21
|
+
|
|
22
|
+
- **A multi-step flow:** `/visual-edit localhost:5173 — cart, shipping, payment, confirmation; open it beside this chat`
|
|
23
|
+
- **Several pages:** `/visual-edit localhost:5173 — home, pricing, docs, and settings`
|
|
24
|
+
- **One page at several sizes:** `/visual-edit localhost:5173/dashboard — desktop, tablet, and mobile side by side`
|
|
25
|
+
- **Several states of one page:** `/visual-edit localhost:5173/inbox — empty, selected, and compose-open states`
|
|
26
|
+
|
|
27
|
+
The agent keeps named steps in order and places responsive variants in aligned columns, so the canvas reads like a flow or comparison board rather than a pile of screenshots. Name the routes and sizes you care about; requesting every discovered route at every viewport can create a noisy canvas.
|
|
28
|
+
|
|
14
29
|
<Diagram id="doc-block-design8" title="Three source modes" summary={"A design's source is inline, localhost, or fusion — the mode decides where an edit actually lands."}>
|
|
15
30
|
|
|
16
31
|
```html
|
|
@@ -21,17 +21,21 @@ connections, service tokens, and app switching.
|
|
|
21
21
|
|
|
22
22
|
## Pieces {#pieces}
|
|
23
23
|
|
|
24
|
-
| Piece
|
|
25
|
-
|
|
|
26
|
-
| `<TeamPage>`
|
|
27
|
-
| `<OrgSwitcher>`
|
|
28
|
-
| `<InvitationBanner>`
|
|
29
|
-
| `<RequireActiveOrg>`
|
|
30
|
-
| `useOrgRole()`
|
|
31
|
-
|
|
|
32
|
-
|
|
|
33
|
-
|
|
|
34
|
-
|
|
|
24
|
+
| Piece | Purpose |
|
|
25
|
+
| ----------------------- | ----------------------------------------------------------------------------------------------- |
|
|
26
|
+
| `<TeamPage>` | Standard team management page for members, invites, roles, and organization preferences. |
|
|
27
|
+
| `<OrgSwitcher>` | Current organization picker for sidebars and headers. |
|
|
28
|
+
| `<InvitationBanner>` | One-click invite and domain-match join prompts. |
|
|
29
|
+
| `<RequireActiveOrg>` | Guard for pages that need an active organization before rendering app data. |
|
|
30
|
+
| `useOrgRole()` | Shared role booleans for member, invite, settings, and domain controls. |
|
|
31
|
+
| `appRoles` prop | Adds a per-app role column and picker to `<TeamPage>` from a `defineAppRoles` descriptor. |
|
|
32
|
+
| `useAppRoles()` | An app's role vocabulary, its assignments in the active org, and whether the viewer may edit. |
|
|
33
|
+
| `useAppRole()` | The current user's role in one app, or `null` when unassigned. |
|
|
34
|
+
| `useSetAppMemberRole()` | Assign or clear one member's app role. Org owner/admin only, enforced server-side. |
|
|
35
|
+
| Organization handlers | Create, rename, switch, invite, accept, remove, and update roles/domains. |
|
|
36
|
+
| Roles | Owner, admin, and member gates for sharing, settings, service tokens, and provider connections. |
|
|
37
|
+
| Allowed domains | Automatic join and domain-scoped access policy. |
|
|
38
|
+
| App links | Workspace app-link parsing and visible app-switcher helpers. |
|
|
35
39
|
|
|
36
40
|
## API {#api}
|
|
37
41
|
|
|
@@ -66,12 +70,68 @@ export function AdminOnlyControl() {
|
|
|
66
70
|
|
|
67
71
|
Server code imports the same role helpers from `@agent-native/core/org-team`.
|
|
68
72
|
The route plugin mounts `/_agent-native/org/*` for org creation, switching,
|
|
69
|
-
invites, domains, member roles, and A2A secret sync.
|
|
73
|
+
invites, domains, member roles, app roles, and A2A secret sync.
|
|
74
|
+
|
|
75
|
+
### Per-app roles {#app-roles}
|
|
76
|
+
|
|
77
|
+
When an app needs its own permission vocabulary on top of team membership,
|
|
78
|
+
declare it with `defineAppRoles` and pass the descriptor to `TeamPage`. The
|
|
79
|
+
descriptor is the serializable half of the declaration — no database imports —
|
|
80
|
+
so the same object can be handed to `defineAppRoles` on the server and to the
|
|
81
|
+
component in the browser bundle:
|
|
82
|
+
|
|
83
|
+
```tsx
|
|
84
|
+
import {
|
|
85
|
+
RequireActiveOrg,
|
|
86
|
+
TeamPage,
|
|
87
|
+
useAppRole,
|
|
88
|
+
useAppRoles,
|
|
89
|
+
useSetAppMemberRole,
|
|
90
|
+
} from "@agent-native/core/client/org-team";
|
|
91
|
+
import { coachRoles } from "../shared/coach-roles";
|
|
92
|
+
|
|
93
|
+
export function SettingsTeamTab() {
|
|
94
|
+
return (
|
|
95
|
+
<RequireActiveOrg>
|
|
96
|
+
<TeamPage appRoles={coachRoles} />
|
|
97
|
+
</RequireActiveOrg>
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export function CoachOnlyControl() {
|
|
102
|
+
const { role } = useAppRole("coach");
|
|
103
|
+
return role === "coach-admin" ? <button type="button">Archive</button> : null;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export function RoleAdmin() {
|
|
107
|
+
const { data } = useAppRoles("coach");
|
|
108
|
+
const setRole = useSetAppMemberRole("coach");
|
|
109
|
+
if (!data?.canManage) return null;
|
|
110
|
+
return (
|
|
111
|
+
<button
|
|
112
|
+
type="button"
|
|
113
|
+
onClick={() => setRole.mutate({ email: "dana@acme.com", role: null })}
|
|
114
|
+
>
|
|
115
|
+
Clear role
|
|
116
|
+
</button>
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
`role`, `myRole`, and `canManage` are progressive disclosure only. The server
|
|
122
|
+
re-resolves the caller's app role on every guarded operation, and assignment
|
|
123
|
+
edits require the org `owner`/`admin` role regardless of what the client
|
|
124
|
+
believes. See
|
|
125
|
+
[Organizations, Teams & Permissions → App roles](/docs/organizations-teams-permissions#app-roles-per-app-rbac)
|
|
126
|
+
for the role model and [Actions → Authorization](/docs/actions#authorize) for
|
|
127
|
+
the server-side `authorize` guard.
|
|
70
128
|
|
|
71
129
|
## UX Standard {#ux-standard}
|
|
72
130
|
|
|
73
131
|
- Users can see which organization they are in before creating or sharing data.
|
|
74
132
|
- Invites and roles live in the team settings surface, not per-resource dialogs.
|
|
133
|
+
- App-specific roles appear as another column on that same team surface, never
|
|
134
|
+
as a separate permissions page or a second organization.
|
|
75
135
|
- Org domain changes are owner-only and explain who can auto-join.
|
|
76
136
|
- App switching lists workspace/default app links. Active-org continuity comes
|
|
77
137
|
from the target app sharing the same auth and organization state.
|
package/corpus/core/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-native/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.128.0",
|
|
4
4
|
"description": "Framework for agent-native application development — where AI agents and UI share SQL state, actions, and context",
|
|
5
5
|
"homepage": "https://github.com/BuilderIO/agent-native#readme",
|
|
6
6
|
"bugs": {
|