@agent-native/core 0.151.2 → 0.152.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 +1 -1
- package/corpus/templates/analytics/.agents/skills/sharing/SKILL.md +1 -1
- package/corpus/templates/analytics/.agents/skills/turn-into-app/SKILL.md +24 -0
- package/corpus/templates/analytics/actions/bigquery-query.ts +21 -0
- package/corpus/templates/analytics/app/components/ConnectionTestStatus.tsx +65 -0
- package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +3 -3
- package/corpus/templates/analytics/app/pages/DataSources.tsx +15 -37
- package/corpus/templates/analytics/app/root.tsx +0 -1
- package/corpus/templates/analytics/changelog/2026-08-11-analytics-custom-blocks-keep-loading-with-legacy-bigquery-action.md +6 -0
- package/corpus/templates/analytics/changelog/2026-08-11-analytics-routes-company-knowledge-and-slack-context-questio.md +6 -0
- package/corpus/templates/analytics/changelog/2026-08-11-browser-no-longer-offers-desktop-install.md +6 -0
- package/corpus/templates/analytics/public/manifest.json +0 -1
- package/corpus/templates/analytics/server/lib/agent-chat-plan-mode.ts +5 -0
- package/corpus/templates/analytics/server/plugins/agent-chat.ts +5 -0
- package/corpus/templates/assets/.agents/skills/sharing/SKILL.md +1 -1
- package/corpus/templates/assets/.agents/skills/turn-into-app/SKILL.md +24 -0
- package/corpus/templates/assets/app/root.tsx +0 -1
- package/corpus/templates/assets/changelog/2026-08-11-browser-no-longer-offers-desktop-install.md +6 -0
- package/corpus/templates/assets/public/manifest.json +0 -1
- package/corpus/templates/brain/.agents/skills/sharing/SKILL.md +1 -1
- package/corpus/templates/brain/.agents/skills/turn-into-app/SKILL.md +24 -0
- package/corpus/templates/brain/app/root.tsx +0 -1
- package/corpus/templates/brain/changelog/2026-08-11-browser-no-longer-offers-desktop-install.md +6 -0
- package/corpus/templates/brain/public/manifest.json +0 -1
- package/corpus/templates/calendar/.agents/skills/sharing/SKILL.md +1 -1
- package/corpus/templates/calendar/.agents/skills/turn-into-app/SKILL.md +24 -0
- package/corpus/templates/calendar/app/components/calendar/GoogleConnectBanner.tsx +0 -53
- package/corpus/templates/calendar/app/i18n-data.ts +0 -80
- package/corpus/templates/calendar/app/root.tsx +0 -1
- package/corpus/templates/calendar/changelog/2026-08-11-browser-no-longer-offers-desktop-install.md +6 -0
- package/corpus/templates/calendar/changelog/2026-08-11-google-calendar-connection-buttons-now-open-the-sign-in-flow.md +6 -0
- package/corpus/templates/calendar/public/manifest.json +0 -1
- package/corpus/templates/calendar/server/plugins/auth.ts +0 -10
- package/corpus/templates/chat/.agents/skills/sharing/SKILL.md +1 -1
- package/corpus/templates/chat/.agents/skills/turn-into-app/SKILL.md +24 -0
- package/corpus/templates/chat/app/root.tsx +0 -1
- package/corpus/templates/chat/changelog/2026-08-11-browser-no-longer-offers-desktop-install.md +6 -0
- package/corpus/templates/chat/public/manifest.json +0 -1
- package/corpus/templates/clips/.agents/skills/turn-into-app/SKILL.md +24 -0
- package/corpus/templates/clips/app/components/player/playback-comment-overlay.tsx +1 -1
- package/corpus/templates/clips/app/components/player/share-dialog.tsx +6 -0
- package/corpus/templates/clips/app/components/sharing/share-ui.tsx +20 -3
- package/corpus/templates/clips/app/i18n/en-US.ts +4 -4
- package/corpus/templates/clips/app/root.tsx +0 -1
- package/corpus/templates/clips/app/routes/_app.meetings._index.tsx +1 -3
- package/corpus/templates/clips/changelog/2026-08-11-browser-no-longer-offers-desktop-install.md +6 -0
- package/corpus/templates/clips/changelog/2026-08-11-clips-desktop-settings-are-now-easier-to-scan-with-a-wider-t.md +6 -0
- package/corpus/templates/clips/changelog/2026-08-11-google-calendar-connections-from-meetings-now-open-directly.md +6 -0
- package/corpus/templates/clips/changelog/2026-08-11-recording-viewers-can-comment-and-react.md +6 -0
- package/corpus/templates/clips/changelog/2026-08-11-system-audio-recording-now-lives-inside-the-microphone-menu-.md +6 -0
- package/corpus/templates/clips/changelog/2026-08-11-timestamped-comments-stay-on-the-video-for-three-seconds-wh.md +6 -0
- package/corpus/templates/clips/desktop/src/app.tsx +773 -1001
- package/corpus/templates/clips/desktop/src/components/MediaDeviceRow.tsx +15 -27
- package/corpus/templates/clips/desktop/src/styles.css +364 -5
- package/corpus/templates/clips/desktop/src-tauri/src/clips/mod.rs +1 -1
- package/corpus/templates/clips/public/manifest.json +0 -1
- package/corpus/templates/content/.agents/skills/sharing/SKILL.md +1 -1
- package/corpus/templates/content/.agents/skills/turn-into-app/SKILL.md +24 -0
- package/corpus/templates/content/AGENTS.md +3 -0
- package/corpus/templates/content/actions/resolve-content-landing.ts +120 -0
- package/corpus/templates/content/app/components/editor/DocumentEditor.tsx +9 -0
- package/corpus/templates/content/app/i18n-data.ts +58 -0
- package/corpus/templates/content/app/lib/content-landing.ts +22 -0
- package/corpus/templates/content/app/root.tsx +0 -1
- package/corpus/templates/content/app/routes/_app._index.tsx +36 -26
- package/corpus/templates/content/changelog/2026-08-11-browser-no-longer-offers-desktop-install.md +6 -0
- package/corpus/templates/content/changelog/2026-08-11-content-opens-your-last-page-on-return-and-gives-new-users-a.md +6 -0
- package/corpus/templates/content/docs/product/capabilities/content.workspace.session-restore.md +7 -1
- package/corpus/templates/content/parity/matrix.md +1 -0
- package/corpus/templates/content/parity/matrix.ts +22 -0
- package/corpus/templates/content/public/manifest.json +0 -1
- package/corpus/templates/content/shared/content-landing.ts +17 -0
- package/corpus/templates/crm/.agents/skills/sharing/SKILL.md +1 -1
- package/corpus/templates/crm/.agents/skills/turn-into-app/SKILL.md +24 -0
- package/corpus/templates/crm/app/root.tsx +0 -1
- package/corpus/templates/crm/changelog/2026-08-11-browser-no-longer-offers-desktop-install.md +6 -0
- package/corpus/templates/crm/public/manifest.json +0 -1
- package/corpus/templates/design/.agents/skills/sharing/SKILL.md +1 -1
- package/corpus/templates/design/.agents/skills/turn-into-app/SKILL.md +24 -0
- package/corpus/templates/design/app/i18n/en-US.ts +5 -0
- package/corpus/templates/design/app/root.tsx +0 -1
- package/corpus/templates/design/changelog/2026-08-11-browser-no-longer-offers-desktop-install.md +6 -0
- package/corpus/templates/design/changelog/2026-08-11-design-sharing-now-identifies-viewers-who-can-add-review-com.md +6 -0
- package/corpus/templates/design/public/manifest.json +0 -1
- package/corpus/templates/dispatch/.agents/skills/sharing/SKILL.md +1 -1
- package/corpus/templates/dispatch/.agents/skills/turn-into-app/SKILL.md +24 -0
- package/corpus/templates/dispatch/AGENTS.md +9 -0
- package/corpus/templates/dispatch/actions/list-dispatch-usage-metrics.ts +5 -19
- package/corpus/templates/dispatch/actions/view-screen.ts +10 -3
- package/corpus/templates/dispatch/app/root.tsx +0 -1
- package/corpus/templates/dispatch/app/routes/settings.tsx +13 -1
- package/corpus/templates/dispatch/changelog/2026-08-11-browser-no-longer-offers-desktop-install.md +6 -0
- package/corpus/templates/dispatch/changelog/2026-08-11-clicking-the-dispatch-logo-returns-to-the-overview-page.md +6 -0
- package/corpus/templates/dispatch/changelog/2026-08-11-dispatch-no-longer-links-to-itself-from-the-app-switcher.md +6 -0
- package/corpus/templates/dispatch/changelog/2026-08-11-dispatch-settings-now-link-directly-to-admin.md +6 -0
- package/corpus/templates/dispatch/changelog/2026-08-11-dispatch-shows-usage-trends-recent-prompts-and-an-agent-revi.md +6 -0
- package/corpus/templates/dispatch/changelog/2026-08-11-human-friendly-app-names.md +6 -0
- package/corpus/templates/dispatch/public/manifest.json +0 -1
- package/corpus/templates/dispatch/server/lib/identity-sso.ts +432 -158
- package/corpus/templates/dispatch/server/plugins/identity-sso.ts +204 -123
- package/corpus/templates/dispatch/server/plugins/setup-dispatch.ts +1 -0
- package/corpus/templates/factory/.agents/skills/sharing/SKILL.md +1 -1
- package/corpus/templates/factory/.agents/skills/turn-into-app/SKILL.md +24 -0
- package/corpus/templates/factory/app/root.tsx +0 -1
- package/corpus/templates/factory/changelog/2026-08-11-browser-no-longer-offers-desktop-install.md +6 -0
- package/corpus/templates/factory/public/manifest.json +0 -1
- package/corpus/templates/forms/.agents/skills/sharing/SKILL.md +1 -1
- package/corpus/templates/forms/.agents/skills/turn-into-app/SKILL.md +24 -0
- package/corpus/templates/forms/app/root.tsx +0 -1
- package/corpus/templates/forms/changelog/2026-08-11-browser-no-longer-offers-desktop-install.md +6 -0
- package/corpus/templates/forms/public/manifest.json +0 -1
- package/corpus/templates/macros/.agents/skills/sharing/SKILL.md +1 -1
- package/corpus/templates/macros/.agents/skills/turn-into-app/SKILL.md +24 -0
- package/corpus/templates/mail/.agents/skills/sharing/SKILL.md +1 -1
- package/corpus/templates/mail/.agents/skills/turn-into-app/SKILL.md +24 -0
- package/corpus/templates/mail/app/root.tsx +0 -1
- package/corpus/templates/mail/changelog/2026-08-11-browser-no-longer-offers-desktop-install.md +6 -0
- package/corpus/templates/mail/changelog/2026-08-11-google-sign-in-now-opens-the-gmail-connection-flow-directly.md +6 -0
- package/corpus/templates/mail/public/manifest.json +0 -1
- package/corpus/templates/mail/server/plugins/auth.ts +0 -10
- package/corpus/templates/plan/.agents/skills/sharing/SKILL.md +1 -1
- package/corpus/templates/plan/.agents/skills/turn-into-app/SKILL.md +24 -0
- package/corpus/templates/plan/app/i18n/en-US.ts +2 -0
- package/corpus/templates/plan/app/pages/PlansPage.tsx +6 -0
- package/corpus/templates/plan/app/root.tsx +0 -1
- package/corpus/templates/plan/changelog/2026-08-11-browser-no-longer-offers-desktop-install.md +6 -0
- package/corpus/templates/plan/changelog/2026-08-11-plan-sharing-now-identifies-viewers-who-can-add-comments.md +6 -0
- package/corpus/templates/plan/public/manifest.json +0 -1
- package/corpus/templates/slides/.agents/skills/sharing/SKILL.md +1 -1
- package/corpus/templates/slides/.agents/skills/turn-into-app/SKILL.md +24 -0
- package/corpus/templates/slides/app/components/editor/EditorToolbar.tsx +6 -0
- package/corpus/templates/slides/app/i18n/en-US.ts +2 -0
- package/corpus/templates/slides/app/root.tsx +0 -1
- package/corpus/templates/slides/changelog/2026-08-11-browser-no-longer-offers-desktop-install.md +6 -0
- package/corpus/templates/slides/changelog/2026-08-11-share-dialog-uses-commenter-terminology.md +6 -0
- package/corpus/templates/slides/public/manifest.json +0 -1
- package/corpus/templates/tasks/.agents/skills/sharing/SKILL.md +1 -1
- package/corpus/templates/tasks/.agents/skills/turn-into-app/SKILL.md +24 -0
- package/corpus/templates/tasks/app/root.tsx +0 -1
- package/corpus/templates/tasks/changelog/2026-08-11-browser-no-longer-offers-desktop-install.md +6 -0
- package/corpus/templates/tasks/public/manifest.json +0 -1
- package/dist/agent/production-agent.js +1 -22
- package/dist/agent/run-manager.d.ts +7 -0
- package/dist/agent/run-manager.js +46 -3
- package/dist/agent/tool-approval-migrations.d.ts +40 -0
- package/dist/agent/tool-approval-migrations.js +51 -0
- package/dist/agent/tool-approval-store.js +5 -20
- package/dist/cli/templates-meta.js +2 -2
- package/dist/client/AgentPanel.js +10 -1
- package/dist/client/AssistantChat.d.ts +3 -0
- package/dist/client/AssistantChat.js +148 -140
- package/dist/client/agent-page/AgentTabsPage.js +2 -2
- package/dist/client/chat/attachment-adapters.js +8 -2
- package/dist/client/chat/tool-call-display.d.ts +1 -0
- package/dist/client/chat/tool-call-display.js +3 -1
- package/dist/client/chat-first.js +11 -5
- package/dist/client/hooks/index.d.ts +1 -1
- package/dist/client/hooks/index.js +1 -1
- package/dist/client/org/OrgSwitcher.d.ts +3 -1
- package/dist/client/org/OrgSwitcher.js +22 -16
- package/dist/client/org/WorkspaceNotice.js +3 -1
- package/dist/client/resources/index.d.ts +1 -1
- package/dist/client/resources/index.js +1 -1
- package/dist/client/resources/use-mcp-servers.d.ts +1 -0
- package/dist/client/resources/use-mcp-servers.js +14 -0
- package/dist/client/settings/AccountSettingsCard.js +8 -4
- package/dist/client/settings/SettingsPanel.js +46 -13
- package/dist/client/settings/SettingsTabsPage.js +8 -3
- package/dist/client/sharing/ShareButton.d.ts +7 -1
- package/dist/client/sharing/ShareButton.js +14 -7
- package/dist/client/sharing/ShareDialog.js +5 -1
- package/dist/client/sharing/useShareButtonController.d.ts +4 -0
- package/dist/client/sharing/useShareButtonController.js +15 -0
- package/dist/client/sharing/useShareDialogController.d.ts +7 -0
- package/dist/client/sharing/useShareDialogController.js +14 -0
- package/dist/client/sse-event-processor.js +37 -0
- package/dist/client/use-session.d.ts +2 -0
- package/dist/client/use-session.js +69 -5
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/deploy/build.js +1 -1
- package/dist/file-upload/pre-upload-attachments.d.ts +3 -4
- package/dist/file-upload/pre-upload-attachments.js +65 -17
- package/dist/ingestion/index.d.ts +1 -0
- package/dist/ingestion/index.js +1 -0
- package/dist/ingestion/office.d.ts +3 -3
- package/dist/ingestion/office.js +24 -2
- package/dist/ingestion/spreadsheet.d.ts +41 -0
- package/dist/ingestion/spreadsheet.js +172 -0
- package/dist/integrations/adapters/slack.js +7 -3
- package/dist/localization/default-messages.d.ts +3 -0
- package/dist/localization/default-messages.js +3 -0
- package/dist/mcp/embed-app.js +20 -9
- package/dist/mcp/screen-memory-stdio.d.ts +7 -7
- package/dist/notifications/routes.d.ts +6 -6
- package/dist/oauth-tokens/migrations.d.ts +8 -0
- package/dist/oauth-tokens/migrations.js +36 -0
- package/dist/org/workspace-url.d.ts +8 -0
- package/dist/org/workspace-url.js +26 -2
- package/dist/secrets/routes.d.ts +3 -3
- package/dist/server/agent-chat-plugin.js +16 -8
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/auth.d.ts +0 -11
- package/dist/server/auth.js +37 -20
- package/dist/server/better-auth-migrations.js +23 -0
- package/dist/server/email-template.d.ts +5 -0
- package/dist/server/email-template.js +9 -0
- package/dist/server/embed-route.js +17 -5
- package/dist/server/identity-sso-store.d.ts +40 -66
- package/dist/server/identity-sso-store.js +187 -150
- package/dist/server/identity-sso.d.ts +17 -73
- package/dist/server/identity-sso.js +294 -297
- package/dist/server/onboarding-html.d.ts +0 -12
- package/dist/server/onboarding-html.js +46 -269
- package/dist/server/release-migrations.js +8 -0
- package/dist/shared/index.d.ts +1 -1
- package/dist/shared/index.js +1 -1
- package/dist/shared/workspace-app-id.d.ts +2 -0
- package/dist/shared/workspace-app-id.js +10 -0
- package/dist/sharing/actions/share-resource.d.ts +1 -0
- package/dist/sharing/actions/share-resource.js +20 -5
- package/dist/templates/chat/.agents/skills/sharing/SKILL.md +1 -1
- package/dist/templates/chat/.agents/skills/turn-into-app/SKILL.md +24 -0
- package/dist/templates/chat/app/root.tsx +0 -1
- package/dist/templates/chat/changelog/2026-08-11-browser-no-longer-offers-desktop-install.md +6 -0
- package/dist/templates/chat/public/manifest.json +0 -1
- package/dist/templates/default/.agents/skills/turn-into-app/SKILL.md +24 -0
- package/dist/templates/default/app/root.tsx +0 -1
- package/dist/templates/default/public/manifest.json +0 -1
- package/dist/templates/headless/.agents/skills/turn-into-app/SKILL.md +24 -0
- package/dist/templates/workspace-core/.agents/skills/authentication/SKILL.md +22 -11
- package/dist/templates/workspace-core/.agents/skills/sharing/SKILL.md +1 -1
- package/dist/templates/workspace-core/.agents/skills/turn-into-app/SKILL.md +24 -0
- package/docs/content/cross-app-sso.mdx +85 -27
- package/docs/content/template-mail.mdx +0 -6
- package/package.json +4 -3
- package/src/templates/chat/.agents/skills/sharing/SKILL.md +1 -1
- package/src/templates/chat/.agents/skills/turn-into-app/SKILL.md +24 -0
- package/src/templates/chat/app/root.tsx +0 -1
- package/src/templates/chat/changelog/2026-08-11-browser-no-longer-offers-desktop-install.md +6 -0
- package/src/templates/chat/public/manifest.json +0 -1
- package/src/templates/default/.agents/skills/turn-into-app/SKILL.md +24 -0
- package/src/templates/default/app/root.tsx +0 -1
- package/src/templates/default/public/manifest.json +0 -1
- package/src/templates/headless/.agents/skills/turn-into-app/SKILL.md +24 -0
- package/src/templates/workspace-core/.agents/skills/authentication/SKILL.md +22 -11
- package/src/templates/workspace-core/.agents/skills/sharing/SKILL.md +1 -1
- package/src/templates/workspace-core/.agents/skills/turn-into-app/SKILL.md +24 -0
- package/corpus/templates/calendar/changelog/2026-06-23-added-a-heads-up-explaining-google-s-app-not-verified-screen.md +0 -6
- package/corpus/templates/clips/app/components/meetings/google-oauth-identity-notice.tsx +0 -51
- package/corpus/templates/clips/changelog/2026-07-30-google-calendar-warning.md +0 -6
|
@@ -3041,6 +3041,11 @@ const enUS = {
|
|
|
3041
3041
|
agent: "Agent",
|
|
3042
3042
|
settings: "Settings",
|
|
3043
3043
|
},
|
|
3044
|
+
landing: {
|
|
3045
|
+
previousPageUnavailable:
|
|
3046
|
+
"Your previous page is no longer available, so we opened Welcome.",
|
|
3047
|
+
saveFailed: "Your place could not be saved",
|
|
3048
|
+
},
|
|
3044
3049
|
team: {
|
|
3045
3050
|
metaTitle: "Workspace access - Content",
|
|
3046
3051
|
pageTitle: "Workspace access",
|
|
@@ -8959,11 +8964,63 @@ const commentMessagesByLocale = {
|
|
|
8959
8964
|
"ar-SA": { unanchored: "التمييز غير متاح" },
|
|
8960
8965
|
} satisfies Partial<Record<LocaleCode, Partial<typeof enUS.comments>>>;
|
|
8961
8966
|
|
|
8967
|
+
const landingMessagesByLocale = {
|
|
8968
|
+
"zh-CN": {
|
|
8969
|
+
previousPageUnavailable: "您之前的页面已不可用,因此我们打开了欢迎页面。",
|
|
8970
|
+
saveFailed: "无法保存您的位置",
|
|
8971
|
+
},
|
|
8972
|
+
"zh-TW": {
|
|
8973
|
+
previousPageUnavailable: "您先前的頁面已無法使用,因此我們開啟了歡迎頁面。",
|
|
8974
|
+
saveFailed: "無法儲存您的位置",
|
|
8975
|
+
},
|
|
8976
|
+
"es-ES": {
|
|
8977
|
+
previousPageUnavailable:
|
|
8978
|
+
"Tu página anterior ya no está disponible, así que abrimos la página de bienvenida.",
|
|
8979
|
+
saveFailed: "No se pudo guardar tu ubicación",
|
|
8980
|
+
},
|
|
8981
|
+
"fr-FR": {
|
|
8982
|
+
previousPageUnavailable:
|
|
8983
|
+
"Votre page précédente n’est plus disponible. Nous avons donc ouvert la page de bienvenue.",
|
|
8984
|
+
saveFailed: "Votre emplacement n’a pas pu être enregistré",
|
|
8985
|
+
},
|
|
8986
|
+
"de-DE": {
|
|
8987
|
+
previousPageUnavailable:
|
|
8988
|
+
"Deine vorherige Seite ist nicht mehr verfügbar. Daher wurde die Willkommensseite geöffnet.",
|
|
8989
|
+
saveFailed: "Deine Position konnte nicht gespeichert werden",
|
|
8990
|
+
},
|
|
8991
|
+
"ja-JP": {
|
|
8992
|
+
previousPageUnavailable:
|
|
8993
|
+
"前回のページを利用できないため、ようこそページを開きました。",
|
|
8994
|
+
saveFailed: "現在位置を保存できませんでした",
|
|
8995
|
+
},
|
|
8996
|
+
"ko-KR": {
|
|
8997
|
+
previousPageUnavailable:
|
|
8998
|
+
"이전 페이지를 더 이상 사용할 수 없어 시작 페이지를 열었습니다.",
|
|
8999
|
+
saveFailed: "현재 위치를 저장하지 못했습니다",
|
|
9000
|
+
},
|
|
9001
|
+
"pt-BR": {
|
|
9002
|
+
previousPageUnavailable:
|
|
9003
|
+
"Sua página anterior não está mais disponível, então abrimos a página de boas-vindas.",
|
|
9004
|
+
saveFailed: "Não foi possível salvar sua localização",
|
|
9005
|
+
},
|
|
9006
|
+
"hi-IN": {
|
|
9007
|
+
previousPageUnavailable:
|
|
9008
|
+
"आपका पिछला पेज अब उपलब्ध नहीं है, इसलिए हमने स्वागत पेज खोल दिया है।",
|
|
9009
|
+
saveFailed: "आपकी जगह सेव नहीं की जा सकी",
|
|
9010
|
+
},
|
|
9011
|
+
"ar-SA": {
|
|
9012
|
+
previousPageUnavailable:
|
|
9013
|
+
"لم تعد صفحتك السابقة متاحة، لذلك فتحنا صفحة الترحيب.",
|
|
9014
|
+
saveFailed: "تعذر حفظ موضعك",
|
|
9015
|
+
},
|
|
9016
|
+
} satisfies Record<Exclude<LocaleCode, "en-US">, typeof enUS.landing>;
|
|
9017
|
+
|
|
8962
9018
|
function mergeMessages(overrides: PartialMessages): Messages {
|
|
8963
9019
|
return {
|
|
8964
9020
|
root: { ...enUS.root, ...overrides.root },
|
|
8965
9021
|
theme: { ...enUS.theme, ...overrides.theme },
|
|
8966
9022
|
navigation: { ...enUS.navigation, ...overrides.navigation },
|
|
9023
|
+
landing: { ...enUS.landing, ...overrides.landing },
|
|
8967
9024
|
team: { ...enUS.team, ...overrides.team },
|
|
8968
9025
|
settings: { ...enUS.settings, ...overrides.settings },
|
|
8969
9026
|
chat: { ...enUS.chat, ...overrides.chat },
|
|
@@ -9061,6 +9118,7 @@ function mergeMessagesForLocale(
|
|
|
9061
9118
|
return {
|
|
9062
9119
|
...base,
|
|
9063
9120
|
comments: { ...base.comments, ...commentMessagesByLocale[locale] },
|
|
9121
|
+
landing: { ...base.landing, ...landingMessagesByLocale[locale] },
|
|
9064
9122
|
root: { ...base.root, ...rawLiteralOverrides.root },
|
|
9065
9123
|
team: { ...base.team, ...rawLiteralOverrides.team },
|
|
9066
9124
|
settings: { ...base.settings, ...rawLiteralOverrides.settings },
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { writeClientAppState } from "@agent-native/core/client/application-state";
|
|
2
|
+
import {
|
|
3
|
+
CONTENT_LAST_LOCATION_STATE_KEY,
|
|
4
|
+
type ContentLastLocationState,
|
|
5
|
+
} from "@shared/content-landing";
|
|
6
|
+
|
|
7
|
+
let landingWriteQueue = Promise.resolve();
|
|
8
|
+
|
|
9
|
+
export function rememberContentLandingDocument(documentId: string) {
|
|
10
|
+
const write = landingWriteQueue.then(() =>
|
|
11
|
+
writeClientAppState<ContentLastLocationState>(
|
|
12
|
+
CONTENT_LAST_LOCATION_STATE_KEY,
|
|
13
|
+
{ documentId },
|
|
14
|
+
{ requestSource: "content-landing" },
|
|
15
|
+
),
|
|
16
|
+
);
|
|
17
|
+
landingWriteQueue = write.then(
|
|
18
|
+
() => undefined,
|
|
19
|
+
() => undefined,
|
|
20
|
+
);
|
|
21
|
+
return write;
|
|
22
|
+
}
|
|
@@ -212,7 +212,6 @@ export function Layout({ children }: { children: React.ReactNode }) {
|
|
|
212
212
|
suppressHydrationWarning
|
|
213
213
|
dangerouslySetInnerHTML={{ __html: localeInitScript }}
|
|
214
214
|
/>
|
|
215
|
-
<link rel="manifest" href={appPath("/manifest.json")} />
|
|
216
215
|
<meta name="theme-color" content="#10B981" />
|
|
217
216
|
<meta name="mobile-web-app-capable" content="yes" />
|
|
218
217
|
<meta
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import { useActionMutation } from "@agent-native/core/client/hooks";
|
|
2
|
+
import { useT } from "@agent-native/core/client/i18n";
|
|
3
|
+
import type { ContentLandingResult } from "@shared/content-landing";
|
|
4
|
+
import { useCallback, useEffect, useRef } from "react";
|
|
3
5
|
import { useNavigate } from "react-router";
|
|
6
|
+
import { toast } from "sonner";
|
|
4
7
|
|
|
5
|
-
import { EmptyState } from "@/components/EmptyState";
|
|
6
8
|
import { QueryErrorState } from "@/components/QueryErrorState";
|
|
7
9
|
import { Skeleton } from "@/components/ui/skeleton";
|
|
8
|
-
import { useDocuments } from "@/hooks/use-documents";
|
|
9
10
|
|
|
10
11
|
const SEO_TITLE = "Content - Open Source, agent-friendly Obsidian alternative";
|
|
11
12
|
const SEO_DESCRIPTION =
|
|
@@ -46,36 +47,45 @@ function DocumentSkeleton() {
|
|
|
46
47
|
}
|
|
47
48
|
|
|
48
49
|
export default function IndexRoute() {
|
|
50
|
+
const t = useT();
|
|
49
51
|
const navigate = useNavigate();
|
|
50
|
-
const
|
|
51
|
-
const
|
|
52
|
-
|
|
52
|
+
const startedRef = useRef(false);
|
|
53
|
+
const resolveLanding = useActionMutation<
|
|
54
|
+
ContentLandingResult,
|
|
55
|
+
Record<string, never>
|
|
56
|
+
>("resolve-content-landing");
|
|
53
57
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
)
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
58
|
+
const openLanding = useCallback(async () => {
|
|
59
|
+
if (startedRef.current) return;
|
|
60
|
+
startedRef.current = true;
|
|
61
|
+
try {
|
|
62
|
+
const result = await resolveLanding.mutateAsync({});
|
|
63
|
+
if (result.fallbackReason === "saved-document-unavailable") {
|
|
64
|
+
toast.info(t("landing.previousPageUnavailable"));
|
|
65
|
+
}
|
|
66
|
+
navigate(`/page/${result.documentId}`, { replace: true });
|
|
67
|
+
} catch (error) {
|
|
68
|
+
// Keep the typed mutation error available to QueryErrorState. Retrying
|
|
69
|
+
// starts a fresh resolver attempt rather than pretending arrival worked.
|
|
70
|
+
console.error("Failed to resolve the Content landing page", error);
|
|
64
71
|
}
|
|
65
|
-
}, [
|
|
72
|
+
}, [navigate, resolveLanding, t]);
|
|
66
73
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
74
|
+
useEffect(() => {
|
|
75
|
+
void openLanding();
|
|
76
|
+
}, [openLanding]);
|
|
70
77
|
|
|
71
|
-
if (
|
|
72
|
-
if (documentsQuery.isError) {
|
|
78
|
+
if (resolveLanding.isError) {
|
|
73
79
|
return (
|
|
74
80
|
<QueryErrorState
|
|
75
|
-
onRetry={() =>
|
|
76
|
-
|
|
81
|
+
onRetry={() => {
|
|
82
|
+
resolveLanding.reset();
|
|
83
|
+
startedRef.current = false;
|
|
84
|
+
void openLanding();
|
|
85
|
+
}}
|
|
86
|
+
retrying={resolveLanding.isPending}
|
|
77
87
|
/>
|
|
78
88
|
);
|
|
79
89
|
}
|
|
80
|
-
return <
|
|
90
|
+
return <DocumentSkeleton />;
|
|
81
91
|
}
|
package/corpus/templates/content/docs/product/capabilities/content.workspace.session-restore.md
CHANGED
|
@@ -42,6 +42,8 @@ If the Page was deleted or access changed, Content opens a safe fallback and exp
|
|
|
42
42
|
- Restoration reauthorizes every target before reopening it and drops invalid state safely.
|
|
43
43
|
- Saved or personal View focus restores when still authorized; ephemeral renderer state is bounded.
|
|
44
44
|
- Recovery distinguishes normal restoration, missing target, denied target, and unavailable source.
|
|
45
|
+
- At the root route, Content restores the last authorized Page. When no saved Page exists or the target is no longer available, it creates or reuses one private, editable Personal `Welcome to Agent-Native Content` Page.
|
|
46
|
+
- Explicit Page links take precedence over root-route restoration. A fallback does not reveal the unavailable Page's title, preview, or owning context.
|
|
45
47
|
|
|
46
48
|
## Boundaries and non-goals
|
|
47
49
|
|
|
@@ -60,6 +62,10 @@ Content reopens that object and View with a usable focus target.
|
|
|
60
62
|
Given saved state for an object whose access is revoked, when the session restores, then
|
|
61
63
|
Content omits the object and does not reveal its title, preview, or prior selection.
|
|
62
64
|
|
|
65
|
+
### Give a new person an honest starting place
|
|
66
|
+
|
|
67
|
+
Given a person with no saved Content location but with organization-visible Pages, when they open the root route, then Content opens one private Personal welcome Page instead of selecting an arbitrary organization Page.
|
|
68
|
+
|
|
63
69
|
## Current evidence
|
|
64
70
|
|
|
65
71
|
Persisted navigation donors do not prove reauthorization, fallback, and recovery. This
|
|
@@ -73,4 +79,4 @@ Capability remains `approved_shape`.
|
|
|
73
79
|
|
|
74
80
|
## Open questions
|
|
75
81
|
|
|
76
|
-
The
|
|
82
|
+
The first Page-level fallback order is settled. Full saved View, selection, and renderer-state restoration remains to be designed and proven.
|
|
@@ -30,4 +30,5 @@ This generated matrix tracks whether high-value Content UI operations use the sa
|
|
|
30
30
|
| source-sync.database-source-bindings | source-sync | Attach, inspect, refresh, disconnect, join, and bind database sources | action-backed | `add-content-database-source-field-property`, `attach-content-database-source`, `bind-content-database-source-field`, `change-content-database-source-role`, `disconnect-content-database-source`, `get-content-database-source`, `list-builder-cms-models`, `list-notion-database-sources`, `preview-content-database-source-attach`, `refresh-content-database-source`, `suggest-source-join-key` | `app/components/editor/DocumentDatabase.tsx`, `app/components/editor/DocumentProperties.tsx`, `app/components/editor/database/DatabaseView.tsx`, `app/hooks/use-content-database.ts` | Mounted database source metadata, fields, source role, join keys, and source-field/property bindings are stored and refreshed. | - | - | P0 | covered | `actions/bind-content-database-source-field.db.test.ts`, `actions/content-database-source-actions.test.ts`, `actions/resync-content-database-source.db.test.ts` | `database-source-scope` | - |
|
|
31
31
|
| source-sync.provider-api-and-staged-datasets | source-sync | Inspect provider APIs and stage/query/delete large provider datasets | action-backed | `delete-staged-dataset`, `list-staged-datasets`, `provider-api-catalog`, `provider-api-docs`, `provider-api-request`, `query-staged-dataset` | `actions/provider-api-catalog.ts`, `actions/provider-api-docs.ts`, `actions/provider-api-request.ts`, `actions/query-staged-dataset.ts` | Provider API metadata and staged dataset scratch storage support scoped agent/source analysis. | - | - | P1 | seeded | - | - | - |
|
|
32
32
|
| versions.history-and-restore | versions | Open version history and restore a previous document version | action-backed | `list-document-versions`, `restore-document-version` | `app/components/editor/VersionHistoryPanel.tsx`, `app/hooks/use-document-versions.ts` | Document versions are listed and selected versions can restore the document while snapshotting current state. | - | - | P0 | seeded | - | - | - |
|
|
33
|
+
| workspace.root-landing-resolver | workspace | Resolve the app root to the caller's last authorized page or a private welcome page | action-backed | `resolve-content-landing` | `app/routes/_app._index.tsx`, `app/lib/content-landing.ts` | The root route restores the most recent authorized page when possible and otherwise converges on one private personal welcome page while preserving last-location state. | - | - | P0 | covered | `actions/resolve-content-landing.db.test.ts`, `app/lib/content-landing.test.ts` | - | - |
|
|
33
34
|
| workspace.spaces-and-files-catalog | workspace | Provision, navigate, and delete Content spaces through Files and Workspaces with personal expansion state | action-backed | `backfill-content-files`, `create-content-space`, `delete-content-space`, `ensure-content-spaces`, `get-content-sidebar-state`, `list-content-spaces`, `update-content-sidebar-state` | `app/components/sidebar/DocumentSidebar.tsx`, `app/hooks/use-content-spaces.ts` | Personal and organization spaces, user-created workspaces, their canonical Files databases, the personal Workspaces catalog, and each user's sidebar expansion state are stored and reconciled in SQL; deleting a user-created workspace atomically removes its catalog row and contents. | - | - | P0 | covered | `actions/content-spaces.db.test.ts`, `actions/content-files.db.test.ts`, `actions/content-sidebar-state.test.ts` | - | - |
|
|
@@ -95,6 +95,28 @@ export const parityMatrix: ParityRow[] = [
|
|
|
95
95
|
testCoverage: "seeded",
|
|
96
96
|
followUpPR: null,
|
|
97
97
|
},
|
|
98
|
+
{
|
|
99
|
+
id: "workspace.root-landing-resolver",
|
|
100
|
+
surface: "workspace",
|
|
101
|
+
label:
|
|
102
|
+
"Resolve the app root to the caller's last authorized page or a private welcome page",
|
|
103
|
+
uiEntrypoints: ["app/routes/_app._index.tsx", "app/lib/content-landing.ts"],
|
|
104
|
+
durableEffect:
|
|
105
|
+
"The root route restores the most recent authorized page when possible and otherwise converges on one private personal welcome page while preserving last-location state.",
|
|
106
|
+
uiImplementation:
|
|
107
|
+
"The index route invokes the shared landing resolver on first load, then navigates to the resolved page and records the landing document in application state.",
|
|
108
|
+
status: "action-backed",
|
|
109
|
+
actions: ["resolve-content-landing"],
|
|
110
|
+
exception: null,
|
|
111
|
+
reliabilityRisk: "none",
|
|
112
|
+
spinePriority: "P0",
|
|
113
|
+
testCoverage: "covered",
|
|
114
|
+
followUpPR: null,
|
|
115
|
+
coverageRefs: [
|
|
116
|
+
"actions/resolve-content-landing.db.test.ts",
|
|
117
|
+
"app/lib/content-landing.test.ts",
|
|
118
|
+
],
|
|
119
|
+
},
|
|
98
120
|
{
|
|
99
121
|
id: "sidebar.chrome-state",
|
|
100
122
|
surface: "sidebar",
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export const CONTENT_LAST_LOCATION_STATE_KEY = "content-last-location-v1";
|
|
2
|
+
|
|
3
|
+
export type ContentLastLocationState = {
|
|
4
|
+
documentId: string;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export type ContentLandingResolution =
|
|
8
|
+
| "restored"
|
|
9
|
+
| "welcome-created"
|
|
10
|
+
| "welcome-reused"
|
|
11
|
+
| "fallback";
|
|
12
|
+
|
|
13
|
+
export type ContentLandingResult = {
|
|
14
|
+
documentId: string;
|
|
15
|
+
resolution: ContentLandingResolution;
|
|
16
|
+
fallbackReason?: "saved-document-unavailable";
|
|
17
|
+
};
|
|
@@ -189,7 +189,7 @@ The framework auto-mounts these actions in every template — no per-template bo
|
|
|
189
189
|
|
|
190
190
|
| Action | Args | Purpose |
|
|
191
191
|
| -------------------------- | ------------------------------------------------------------------------------ | ----------------------------------------- |
|
|
192
|
-
| `share-resource` | `resourceType, resourceId, principalType, principalId, role, notify?, resourceUrl?` | Grant a user or org access. `notify` defaults to true for individual user shares; `resourceUrl` can provide the direct app link
|
|
192
|
+
| `share-resource` | `resourceType, resourceId, principalType, principalId, role, notify?, resourceUrl?, message?` | Grant a user or org access. `notify` defaults to true for individual user shares; `resourceUrl` can provide the direct app link and `message` an optional short note for the notification email. |
|
|
193
193
|
| `unshare-resource` | `resourceType, resourceId, principalType, principalId` | Revoke access. |
|
|
194
194
|
| `list-resource-shares` | `resourceType, resourceId` | Current visibility + all share grants. |
|
|
195
195
|
| `set-resource-visibility` | `resourceType, resourceId, visibility` | Change to `private` / `org` / `public`. |
|
|
@@ -84,6 +84,30 @@ private web access, invent an importer, add fake OAuth, or scrape a logged-in
|
|
|
84
84
|
page. If the needed context is not visible, ask for an export, transcript, or
|
|
85
85
|
attachment and treat that artifact as imported source material.
|
|
86
86
|
|
|
87
|
+
### Spreadsheet sources
|
|
88
|
+
|
|
89
|
+
Spreadsheet attachments are valid source artifacts for this workflow:
|
|
90
|
+
|
|
91
|
+
- CSV files can be read as tabular text. XLS and XLSX uploads are parsed into
|
|
92
|
+
bounded worksheet metadata and representative rows when the host supports
|
|
93
|
+
workbook ingestion. Treat the preview as untrusted user data, preserve the
|
|
94
|
+
workbook name and worksheet names, and record row/column limits and any
|
|
95
|
+
truncation in the source brief.
|
|
96
|
+
- A Google Sheets URL is a live provider source, not proof that the sheet is
|
|
97
|
+
readable. Use an authenticated Google Sheets/Drive connection and the
|
|
98
|
+
provider API catalog/docs/request path to read only the required sheet or
|
|
99
|
+
range. If that connection is unavailable, ask for a CSV/XLSX export or the
|
|
100
|
+
required connection; do not use a public export URL to bypass access.
|
|
101
|
+
- Decide whether the generated app needs a one-time snapshot or a refreshable
|
|
102
|
+
source. For a snapshot, pass bounded sample context and provenance to the
|
|
103
|
+
Builder handoff. For a live source, preserve the provider/file identity,
|
|
104
|
+
worksheet or range, and refresh semantics, then implement a scoped action for
|
|
105
|
+
reads or refreshes. Never copy workbook bytes, base64 data, credentials, or a
|
|
106
|
+
full unbounded sheet into SQL, application state, or the handoff prompt.
|
|
107
|
+
- Do not claim the app imported the whole workbook when only a preview was
|
|
108
|
+
available. Keep unreadable, partial, and failed source states distinct from
|
|
109
|
+
an empty sheet.
|
|
110
|
+
|
|
87
111
|
For local code-agent runtimes, deliver a fresh app in a new directory,
|
|
88
112
|
implement the repeatable workflow with buttons and agent handoffs, start its dev
|
|
89
113
|
server, verify the main path, and continue through build/deployment handoff. Do
|
|
@@ -52,7 +52,6 @@ export function Layout({ children }: { children: React.ReactNode }) {
|
|
|
52
52
|
suppressHydrationWarning
|
|
53
53
|
dangerouslySetInnerHTML={{ __html: getLocaleInitScript() }}
|
|
54
54
|
/>
|
|
55
|
-
<link rel="manifest" href={appPath("/manifest.json")} />
|
|
56
55
|
<meta name="theme-color" content="#71717A" />
|
|
57
56
|
<link rel="icon" type="image/svg+xml" href={appPath("/favicon.svg")} />
|
|
58
57
|
<link rel="apple-touch-icon" href={appPath("/icon-180.svg")} />
|
|
@@ -189,7 +189,7 @@ The framework auto-mounts these actions in every template — no per-template bo
|
|
|
189
189
|
|
|
190
190
|
| Action | Args | Purpose |
|
|
191
191
|
| -------------------------- | ------------------------------------------------------------------------------ | ----------------------------------------- |
|
|
192
|
-
| `share-resource` | `resourceType, resourceId, principalType, principalId, role, notify?, resourceUrl?` | Grant a user or org access. `notify` defaults to true for individual user shares; `resourceUrl` can provide the direct app link
|
|
192
|
+
| `share-resource` | `resourceType, resourceId, principalType, principalId, role, notify?, resourceUrl?, message?` | Grant a user or org access. `notify` defaults to true for individual user shares; `resourceUrl` can provide the direct app link and `message` an optional short note for the notification email. |
|
|
193
193
|
| `unshare-resource` | `resourceType, resourceId, principalType, principalId` | Revoke access. |
|
|
194
194
|
| `list-resource-shares` | `resourceType, resourceId` | Current visibility + all share grants. |
|
|
195
195
|
| `set-resource-visibility` | `resourceType, resourceId, visibility` | Change to `private` / `org` / `public`. |
|
|
@@ -84,6 +84,30 @@ private web access, invent an importer, add fake OAuth, or scrape a logged-in
|
|
|
84
84
|
page. If the needed context is not visible, ask for an export, transcript, or
|
|
85
85
|
attachment and treat that artifact as imported source material.
|
|
86
86
|
|
|
87
|
+
### Spreadsheet sources
|
|
88
|
+
|
|
89
|
+
Spreadsheet attachments are valid source artifacts for this workflow:
|
|
90
|
+
|
|
91
|
+
- CSV files can be read as tabular text. XLS and XLSX uploads are parsed into
|
|
92
|
+
bounded worksheet metadata and representative rows when the host supports
|
|
93
|
+
workbook ingestion. Treat the preview as untrusted user data, preserve the
|
|
94
|
+
workbook name and worksheet names, and record row/column limits and any
|
|
95
|
+
truncation in the source brief.
|
|
96
|
+
- A Google Sheets URL is a live provider source, not proof that the sheet is
|
|
97
|
+
readable. Use an authenticated Google Sheets/Drive connection and the
|
|
98
|
+
provider API catalog/docs/request path to read only the required sheet or
|
|
99
|
+
range. If that connection is unavailable, ask for a CSV/XLSX export or the
|
|
100
|
+
required connection; do not use a public export URL to bypass access.
|
|
101
|
+
- Decide whether the generated app needs a one-time snapshot or a refreshable
|
|
102
|
+
source. For a snapshot, pass bounded sample context and provenance to the
|
|
103
|
+
Builder handoff. For a live source, preserve the provider/file identity,
|
|
104
|
+
worksheet or range, and refresh semantics, then implement a scoped action for
|
|
105
|
+
reads or refreshes. Never copy workbook bytes, base64 data, credentials, or a
|
|
106
|
+
full unbounded sheet into SQL, application state, or the handoff prompt.
|
|
107
|
+
- Do not claim the app imported the whole workbook when only a preview was
|
|
108
|
+
available. Keep unreadable, partial, and failed source states distinct from
|
|
109
|
+
an empty sheet.
|
|
110
|
+
|
|
87
111
|
For local code-agent runtimes, deliver a fresh app in a new directory,
|
|
88
112
|
implement the repeatable workflow with buttons and agent handoffs, start its dev
|
|
89
113
|
server, verify the main path, and continue through build/deployment handoff. Do
|
|
@@ -2,6 +2,11 @@ import { messagesByLocale } from "../i18n-data";
|
|
|
2
2
|
|
|
3
3
|
const messages = {
|
|
4
4
|
...messagesByLocale["en-US"],
|
|
5
|
+
designEditor: {
|
|
6
|
+
...messagesByLocale["en-US"].designEditor,
|
|
7
|
+
commenterRoleLabel: "Commenter",
|
|
8
|
+
commenterRoleDescription: "Can view and add review comments",
|
|
9
|
+
},
|
|
5
10
|
review: {
|
|
6
11
|
comments: "Comments",
|
|
7
12
|
commentsTab: "Comments · {{count}}",
|
|
@@ -79,7 +79,6 @@ export function Layout({ children }: { children: React.ReactNode }) {
|
|
|
79
79
|
suppressHydrationWarning
|
|
80
80
|
dangerouslySetInnerHTML={{ __html: LOCALE_INIT_SCRIPT }}
|
|
81
81
|
/>
|
|
82
|
-
<link rel="manifest" href={appPath("/manifest.json")} />
|
|
83
82
|
<meta name="theme-color" content="#71717A" />
|
|
84
83
|
<meta name="mobile-web-app-capable" content="yes" />
|
|
85
84
|
<meta
|
|
@@ -189,7 +189,7 @@ The framework auto-mounts these actions in every template — no per-template bo
|
|
|
189
189
|
|
|
190
190
|
| Action | Args | Purpose |
|
|
191
191
|
| -------------------------- | ------------------------------------------------------------------------------ | ----------------------------------------- |
|
|
192
|
-
| `share-resource` | `resourceType, resourceId, principalType, principalId, role, notify?, resourceUrl?` | Grant a user or org access. `notify` defaults to true for individual user shares; `resourceUrl` can provide the direct app link
|
|
192
|
+
| `share-resource` | `resourceType, resourceId, principalType, principalId, role, notify?, resourceUrl?, message?` | Grant a user or org access. `notify` defaults to true for individual user shares; `resourceUrl` can provide the direct app link and `message` an optional short note for the notification email. |
|
|
193
193
|
| `unshare-resource` | `resourceType, resourceId, principalType, principalId` | Revoke access. |
|
|
194
194
|
| `list-resource-shares` | `resourceType, resourceId` | Current visibility + all share grants. |
|
|
195
195
|
| `set-resource-visibility` | `resourceType, resourceId, visibility` | Change to `private` / `org` / `public`. |
|
|
@@ -84,6 +84,30 @@ private web access, invent an importer, add fake OAuth, or scrape a logged-in
|
|
|
84
84
|
page. If the needed context is not visible, ask for an export, transcript, or
|
|
85
85
|
attachment and treat that artifact as imported source material.
|
|
86
86
|
|
|
87
|
+
### Spreadsheet sources
|
|
88
|
+
|
|
89
|
+
Spreadsheet attachments are valid source artifacts for this workflow:
|
|
90
|
+
|
|
91
|
+
- CSV files can be read as tabular text. XLS and XLSX uploads are parsed into
|
|
92
|
+
bounded worksheet metadata and representative rows when the host supports
|
|
93
|
+
workbook ingestion. Treat the preview as untrusted user data, preserve the
|
|
94
|
+
workbook name and worksheet names, and record row/column limits and any
|
|
95
|
+
truncation in the source brief.
|
|
96
|
+
- A Google Sheets URL is a live provider source, not proof that the sheet is
|
|
97
|
+
readable. Use an authenticated Google Sheets/Drive connection and the
|
|
98
|
+
provider API catalog/docs/request path to read only the required sheet or
|
|
99
|
+
range. If that connection is unavailable, ask for a CSV/XLSX export or the
|
|
100
|
+
required connection; do not use a public export URL to bypass access.
|
|
101
|
+
- Decide whether the generated app needs a one-time snapshot or a refreshable
|
|
102
|
+
source. For a snapshot, pass bounded sample context and provenance to the
|
|
103
|
+
Builder handoff. For a live source, preserve the provider/file identity,
|
|
104
|
+
worksheet or range, and refresh semantics, then implement a scoped action for
|
|
105
|
+
reads or refreshes. Never copy workbook bytes, base64 data, credentials, or a
|
|
106
|
+
full unbounded sheet into SQL, application state, or the handoff prompt.
|
|
107
|
+
- Do not claim the app imported the whole workbook when only a preview was
|
|
108
|
+
available. Keep unreadable, partial, and failed source states distinct from
|
|
109
|
+
an empty sheet.
|
|
110
|
+
|
|
87
111
|
For local code-agent runtimes, deliver a fresh app in a new directory,
|
|
88
112
|
implement the repeatable workflow with buttons and agent handoffs, start its dev
|
|
89
113
|
server, verify the main path, and continue through build/deployment handoff. Do
|
|
@@ -68,6 +68,12 @@ Read the relevant skill before deeper work:
|
|
|
68
68
|
permalink before diagnosing it. It resolves child links to the parent thread,
|
|
69
69
|
preserves attachments and related URLs, and reports whether pagination is
|
|
70
70
|
complete. Never treat an unreadable Slack thread as an empty one.
|
|
71
|
+
- For usage investigations, use `list-dispatch-usage-metrics` with the smallest
|
|
72
|
+
useful scope (`me` or `workspace`), lookback, and optional `userEmail` filter.
|
|
73
|
+
Treat prompt attribution as evidence with gaps: `not-captured` and
|
|
74
|
+
`unavailable` are not zero usage or a reason to guess. Use `view-screen` on
|
|
75
|
+
`/admin/metrics` to keep the agent's analysis aligned with the visible scope
|
|
76
|
+
and selected user.
|
|
71
77
|
|
|
72
78
|
## Application State
|
|
73
79
|
|
|
@@ -76,6 +82,9 @@ Read the relevant skill before deeper work:
|
|
|
76
82
|
- On Thread Debug, `navigation.threadDebugMode`, `sourceId`,
|
|
77
83
|
`inspectSourceId`, `ownerEmail`, `failureStatus`, `range`, `query`, `runId`,
|
|
78
84
|
and `threadId` expose the visible failure or thread filters and selection.
|
|
85
|
+
- On Metrics, `navigation.usageScope` exposes whether the visible usage view is
|
|
86
|
+
personal or workspace-wide, and `navigation.usageUserEmail` exposes the
|
|
87
|
+
selected workspace member filter.
|
|
79
88
|
- `navigate` moves the UI to setup, vault, integrations, resources, routing,
|
|
80
89
|
approval, and operator surfaces.
|
|
81
90
|
|
|
@@ -1,20 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { z } from "zod";
|
|
1
|
+
import { dispatchActions } from "@agent-native/dispatch/actions";
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"Get workspace-level LLM usage, spend or Builder.io credit spend, users, app access, and recent activity metrics for Dispatch admins.",
|
|
9
|
-
schema: z.object({
|
|
10
|
-
sinceDays: z.coerce
|
|
11
|
-
.number()
|
|
12
|
-
.int()
|
|
13
|
-
.min(1)
|
|
14
|
-
.max(365)
|
|
15
|
-
.default(30)
|
|
16
|
-
.describe("Lookback window in days. Defaults to 30."),
|
|
17
|
-
}),
|
|
18
|
-
http: { method: "GET" },
|
|
19
|
-
run: async (args) => listDispatchUsageMetricsScoped(args),
|
|
20
|
-
});
|
|
3
|
+
// Keep the template action registry aligned with the package action. The
|
|
4
|
+
// package implementation is also what the shared Dispatch metrics screen
|
|
5
|
+
// exercises, including personal scope and prompt attribution.
|
|
6
|
+
export default dispatchActions["list-dispatch-usage-metrics"];
|
|
@@ -3,7 +3,6 @@ import { readAppState } from "@agent-native/core/application-state";
|
|
|
3
3
|
import { dispatchActions } from "@agent-native/dispatch/actions";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
|
|
6
|
-
import { listDispatchUsageMetricsScoped } from "../server/lib/usage-metrics.js";
|
|
7
6
|
import listWorkspaceConnections from "./list-workspace-connections.js";
|
|
8
7
|
|
|
9
8
|
async function runDispatchAction(name: string, args: Record<string, unknown>) {
|
|
@@ -101,14 +100,22 @@ export default defineAction({
|
|
|
101
100
|
}
|
|
102
101
|
if (navigation?.view === "metrics") {
|
|
103
102
|
try {
|
|
104
|
-
const
|
|
103
|
+
const usageScope =
|
|
104
|
+
navigation.usageScope === "workspace" ? "workspace" : "me";
|
|
105
|
+
const metrics = await runDispatchAction("list-dispatch-usage-metrics", {
|
|
106
|
+
sinceDays: 30,
|
|
107
|
+
scope: usageScope,
|
|
108
|
+
userEmail: navigation.usageUserEmail,
|
|
109
|
+
});
|
|
105
110
|
screen.usageMetrics = {
|
|
106
111
|
billing: metrics.billing,
|
|
112
|
+
viewScope: metrics.viewScope,
|
|
113
|
+
selectedUserEmail: metrics.selectedUserEmail,
|
|
107
114
|
totals: metrics.totals,
|
|
108
115
|
byApp: metrics.byApp.slice(0, 8),
|
|
109
116
|
byUser: metrics.byUser.slice(0, 8),
|
|
110
117
|
appAccess: metrics.appAccess
|
|
111
|
-
.filter((app) => !app.isDispatch)
|
|
118
|
+
.filter((app: { isDispatch?: boolean }) => !app.isDispatch)
|
|
112
119
|
.slice(0, 8),
|
|
113
120
|
};
|
|
114
121
|
} catch (error) {
|
|
@@ -68,7 +68,6 @@ export function Layout({ children }: { children: React.ReactNode }) {
|
|
|
68
68
|
suppressHydrationWarning
|
|
69
69
|
dangerouslySetInnerHTML={{ __html: LOCALE_INIT_SCRIPT }}
|
|
70
70
|
/>
|
|
71
|
-
<link rel="manifest" href={appPath("/manifest.json")} />
|
|
72
71
|
<meta name="theme-color" content="#0f172a" />
|
|
73
72
|
<meta name="mobile-web-app-capable" content="yes" />
|
|
74
73
|
<meta
|