@agent-native/core 0.69.0 → 0.70.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -15
- package/corpus/README.md +2 -2
- package/corpus/core/CHANGELOG.md +109 -0
- package/corpus/core/docs/design/durable-agent-runs.md +217 -0
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/action.ts +89 -0
- package/corpus/core/src/agent/model-config.ts +0 -2
- package/corpus/core/src/agent/run-loop-with-resume.ts +48 -0
- package/corpus/core/src/changelog/parse.ts +245 -0
- package/corpus/core/src/cli/changelog.ts +199 -0
- package/corpus/core/src/cli/index.ts +19 -0
- package/corpus/core/src/cli/recap.ts +24 -1
- package/corpus/core/src/cli/skills.ts +74 -47
- package/corpus/core/src/client/AgentPanel.tsx +5 -3
- package/corpus/core/src/client/AssistantChat.tsx +8 -0
- package/corpus/core/src/client/CommandMenu.tsx +183 -75
- package/corpus/core/src/client/agent-chat-adapter.ts +44 -7
- package/corpus/core/src/client/analytics.ts +181 -0
- package/corpus/core/src/client/changelog/Changelog.tsx +321 -0
- package/corpus/core/src/client/client-surface.ts +41 -0
- package/corpus/core/src/client/composer/TiptapComposer.tsx +123 -12
- package/corpus/core/src/client/feedback-context.ts +4 -0
- package/corpus/core/src/client/index.ts +12 -0
- package/corpus/core/src/client/mcp-apps/McpAppRenderer.tsx +54 -0
- package/corpus/core/src/client/settings/useBuilderStatus.ts +82 -20
- package/corpus/core/src/client/sse-event-processor.ts +7 -1
- package/corpus/core/src/mcp/build-server.ts +57 -1
- package/corpus/core/src/mcp/embed-app.ts +197 -7
- package/corpus/core/src/mcp/oauth-route.ts +109 -13
- package/corpus/core/src/server/attribution.ts +211 -0
- package/corpus/core/src/server/auth.ts +6 -0
- package/corpus/core/src/server/better-auth-instance.ts +49 -5
- package/corpus/core/src/server/builder-browser.ts +27 -1
- package/corpus/core/src/server/core-routes-plugin.ts +136 -0
- package/corpus/core/src/server/google-oauth.ts +19 -6
- package/corpus/core/src/server/onboarding-html.ts +35 -0
- package/corpus/core/src/shared/mcp-embed-headers.ts +1 -1
- package/corpus/core/src/styles/agent-conversation.css +21 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/changelog/SKILL.md +111 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/reliable-mutations/SKILL.md +72 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/tracking/SKILL.md +46 -14
- package/corpus/templates/analytics/.agents/skills/dashboard-management/SKILL.md +22 -0
- package/corpus/templates/analytics/AGENTS.md +8 -1
- package/corpus/templates/analytics/CHANGELOG.md +10 -0
- package/corpus/templates/analytics/actions/install-dashboard-template.ts +99 -4
- package/corpus/templates/analytics/actions/open-traffic-dashboard.ts +1 -1
- package/corpus/templates/analytics/actions/update-dashboard.ts +39 -8
- package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +30 -3
- package/corpus/templates/analytics/app/components/layout/CommandPalette.tsx +180 -144
- package/corpus/templates/analytics/app/components/layout/Header.tsx +2 -3
- package/corpus/templates/analytics/app/components/layout/Layout.tsx +7 -5
- package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +221 -215
- package/corpus/templates/analytics/app/hooks/use-navigation-state.ts +6 -6
- package/corpus/templates/analytics/app/lib/demo-dashboard-path.ts +1 -1
- package/corpus/templates/analytics/app/lib/last-opened.ts +2 -1
- package/corpus/templates/analytics/app/pages/Settings.tsx +4 -0
- package/corpus/templates/analytics/app/pages/adhoc/explorer-dashboard/index.tsx +3 -3
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/DashboardFilterBar.tsx +2 -2
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/SqlChartCard.tsx +32 -2
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +101 -99
- package/corpus/templates/analytics/app/pages/overview/OverviewPage.tsx +1 -1
- package/corpus/templates/analytics/app/routes/adhoc.$id.tsx +18 -5
- package/corpus/templates/analytics/app/routes/catalog.tsx +1 -1
- package/corpus/templates/analytics/app/routes/dashboards.$id.tsx +9 -0
- package/corpus/templates/analytics/app/routes/traffic.tsx +1 -1
- package/corpus/templates/analytics/changelog/2026-06-23-long-dashboard-and-analysis-names-in-the-sidebar-now-truncat.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-23-open-any-dashboard-chart-full-screen-in-a-modal-from-the-pan.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-23-the-dashboards-and-analyses-sidebar-settings-buttons-now-sta.md +6 -0
- package/corpus/templates/analytics/seeds/dashboards/agent-native-templates-first-party.json +145 -0
- package/corpus/templates/analytics/server/db/index.ts +1 -1
- package/corpus/templates/analytics/server/lib/dashboard-catalog.ts +9 -2
- package/corpus/templates/analytics/server/lib/demo-dashboards.ts +1 -1
- package/corpus/templates/analytics/server/plugins/agent-chat.ts +2 -2
- package/corpus/templates/analytics/server/plugins/core-routes.ts +6 -6
- package/corpus/templates/assets/CHANGELOG.md +10 -0
- package/corpus/templates/assets/actions/generate-image.ts +24 -0
- package/corpus/templates/assets/app/components/layout/Sidebar.tsx +2 -2
- package/corpus/templates/assets/app/global.css +17 -1
- package/corpus/templates/assets/app/root.tsx +7 -1
- package/corpus/templates/assets/app/routes/_index.tsx +94 -14
- package/corpus/templates/assets/app/routes/settings.tsx +6 -0
- package/corpus/templates/assets/changelog/2026-06-23-chat-dates-in-the-sidebar-no-longer-wrap-onto-two-lines.md +6 -0
- package/corpus/templates/assets/changelog/2026-06-23-clicking-image-video-or-refine-on-the-start-screen-now-drops.md +6 -0
- package/corpus/templates/assets/changelog/2026-06-23-pick-your-image-generation-model-right-from-the-chat-model-m.md +6 -0
- package/corpus/templates/brain/CHANGELOG.md +10 -0
- package/corpus/templates/brain/app/root.tsx +7 -1
- package/corpus/templates/brain/app/routes/settings.tsx +8 -1
- package/corpus/templates/calendar/CHANGELOG.md +10 -0
- package/corpus/templates/calendar/app/pages/Settings.tsx +4 -0
- package/corpus/templates/calendar/app/root.tsx +7 -1
- package/corpus/templates/chat/CHANGELOG.md +10 -0
- package/corpus/templates/chat/app/root.tsx +7 -1
- package/corpus/templates/clips/CHANGELOG.md +10 -0
- package/corpus/templates/clips/app/components/library/library-grid.tsx +1 -20
- package/corpus/templates/clips/app/components/player/share-dialog.tsx +33 -7
- package/corpus/templates/clips/app/components/player/sign-in-prompt-dialog.tsx +8 -0
- package/corpus/templates/clips/app/components/player/video-player.tsx +150 -20
- package/corpus/templates/clips/app/components/recorder/countdown-overlay.tsx +72 -48
- package/corpus/templates/clips/app/components/recorder/pre-record-panel.tsx +7 -11
- package/corpus/templates/clips/app/components/recorder/recorder-engine.ts +31 -0
- package/corpus/templates/clips/app/components/sharing/slack-share-hint.tsx +71 -0
- package/corpus/templates/clips/app/lib/countdown-audio-cue.ts +35 -17
- package/corpus/templates/clips/app/root.tsx +7 -1
- package/corpus/templates/clips/app/routes/_app.settings._index.tsx +15 -1
- package/corpus/templates/clips/app/routes/record.tsx +78 -5
- package/corpus/templates/clips/app/routes/share.$shareId.tsx +86 -5
- package/corpus/templates/clips/changelog/2026-06-23-clips-shared-in-slack-no-longer-show-a-could-not-start-playb.md +6 -0
- package/corpus/templates/clips/changelog/2026-06-23-made-the-play-button-on-shared-and-embedded-clips-scale-with.md +6 -0
- package/corpus/templates/clips/changelog/2026-06-23-public-clip-share-links-now-show-whether-they-ll-play-inline.md +6 -0
- package/corpus/templates/clips/changelog/2026-06-23-removed-select-button-from-library-hover-a-clip-to-select-it.md +6 -0
- package/corpus/templates/clips/changelog/2026-06-23-screen-camera-recordings-now-keep-the-presenter-s-face-in-th.md +6 -0
- package/corpus/templates/clips/changelog/2026-06-23-shared-video-links-now-play-for-anyone-without-signing-in.md +6 -0
- package/corpus/templates/clips/changelog/2026-06-23-skip-or-cancel-the-recording-countdown-with-buttons-beside-t.md +6 -0
- package/corpus/templates/clips/changelog/2026-06-23-the-desktop-camera-bubble-now-looks-sharp-the-instant-it-ope.md +6 -0
- package/corpus/templates/clips/changelog/2026-06-23-the-desktop-recording-widget-now-grows-downward-only-when-yo.md +6 -0
- package/corpus/templates/clips/changelog/2026-06-23-the-recording-start-sound-is-now-a-softer-more-modern-chime.md +6 -0
- package/corpus/templates/clips/chrome-extension/public/manifest.json +17 -8
- package/corpus/templates/clips/chrome-extension/src/background.ts +769 -180
- package/corpus/templates/clips/chrome-extension/src/content-script.ts +177 -0
- package/corpus/templates/clips/chrome-extension/src/offscreen.ts +466 -329
- package/corpus/templates/clips/chrome-extension/src/overlay.css +377 -0
- package/corpus/templates/clips/chrome-extension/src/overlay.html +12 -0
- package/corpus/templates/clips/chrome-extension/src/overlay.ts +330 -0
- package/corpus/templates/clips/chrome-extension/src/permission.html +227 -0
- package/corpus/templates/clips/chrome-extension/src/permission.ts +105 -0
- package/corpus/templates/clips/chrome-extension/src/popup.html +3 -0
- package/corpus/templates/clips/chrome-extension/src/popup.ts +50 -2
- package/corpus/templates/clips/chrome-extension/src/styles.css +50 -0
- package/corpus/templates/clips/chrome-extension/vite.config.ts +3 -0
- package/corpus/templates/clips/desktop/src/lib/audio-cue.ts +41 -24
- package/corpus/templates/clips/desktop/src/lib/bubble-webrtc.ts +119 -2
- package/corpus/templates/clips/desktop/src/lib/recorder.ts +20 -0
- package/corpus/templates/clips/desktop/src/main.tsx +3 -0
- package/corpus/templates/clips/desktop/src/overlays/countdown.tsx +21 -2
- package/corpus/templates/clips/desktop/src/overlays/region-record-border.tsx +76 -0
- package/corpus/templates/clips/desktop/src/styles.css +119 -2
- package/corpus/templates/clips/desktop/src-tauri/capabilities/default.json +2 -1
- package/corpus/templates/clips/desktop/src-tauri/src/clips/mod.rs +140 -1
- package/corpus/templates/clips/desktop/src-tauri/src/lib.rs +2 -0
- package/corpus/templates/clips/desktop/src-tauri/src/util.rs +4 -1
- package/corpus/templates/clips/server/routes/api/video/[recordingId].get.ts +85 -6
- package/corpus/templates/clips/shared/share-attribution.ts +79 -0
- package/corpus/templates/content/AGENTS.md +20 -3
- package/corpus/templates/content/CHANGELOG.md +10 -0
- package/corpus/templates/content/actions/_database-utils.ts +15 -0
- package/corpus/templates/content/actions/_property-utils.ts +371 -4
- package/corpus/templates/content/actions/configure-document-property.ts +35 -1
- package/corpus/templates/content/actions/create-content-database.ts +5 -1
- package/corpus/templates/content/actions/delete-document-property.ts +52 -2
- package/corpus/templates/content/actions/duplicate-document-property.ts +34 -17
- package/corpus/templates/content/actions/reorder-document-property.ts +79 -0
- package/corpus/templates/content/actions/set-document-property.ts +39 -0
- package/corpus/templates/content/app/components/editor/DocumentBlockFields.tsx +806 -0
- package/corpus/templates/content/app/components/editor/DocumentDatabase.tsx +226 -68
- package/corpus/templates/content/app/components/editor/DocumentEditor.tsx +59 -30
- package/corpus/templates/content/app/components/editor/DocumentProperties.tsx +25 -1
- package/corpus/templates/content/app/components/editor/blockFieldSaveController.ts +180 -0
- package/corpus/templates/content/app/components/editor/blockFieldSaveRegistry.ts +179 -0
- package/corpus/templates/content/app/components/editor/previewDocumentSaveController.ts +244 -0
- package/corpus/templates/content/app/components/editor/previewDocumentSaveRegistry.ts +132 -0
- package/corpus/templates/content/app/global.css +9 -0
- package/corpus/templates/content/app/hooks/use-document-properties.ts +21 -0
- package/corpus/templates/content/app/root.tsx +7 -1
- package/corpus/templates/content/server/db/schema.ts +30 -0
- package/corpus/templates/content/server/plugins/db.ts +87 -0
- package/corpus/templates/content/shared/api.ts +7 -0
- package/corpus/templates/content/shared/properties.ts +109 -0
- package/corpus/templates/design/CHANGELOG.md +10 -0
- package/corpus/templates/design/actions/generate-design.ts +4 -0
- package/corpus/templates/design/app/root.tsx +7 -1
- package/corpus/templates/design/app/routes/settings.tsx +10 -2
- package/corpus/templates/dispatch/CHANGELOG.md +10 -0
- package/corpus/templates/dispatch/app/root.tsx +7 -1
- package/corpus/templates/forms/.agents/skills/form-responses/SKILL.md +10 -0
- package/corpus/templates/forms/CHANGELOG.md +10 -0
- package/corpus/templates/forms/actions/export-responses.ts +6 -0
- package/corpus/templates/forms/actions/list-responses.ts +2 -0
- package/corpus/templates/forms/actions/response-insights.ts +2 -0
- package/corpus/templates/forms/app/pages/ResponsesPage.tsx +138 -1
- package/corpus/templates/forms/app/root.tsx +7 -1
- package/corpus/templates/forms/changelog/2026-06-23-response-tables-now-show-the-page-each-submission-came-from-.md +6 -0
- package/corpus/templates/forms/changelog/2026-06-23-response-tables-now-show-whether-feedback-came-from-the-web-.md +6 -0
- package/corpus/templates/forms/server/db/schema.ts +7 -0
- package/corpus/templates/forms/server/handlers/submissions.ts +19 -2
- package/corpus/templates/forms/server/lib/integrations.ts +76 -2
- package/corpus/templates/forms/server/plugins/db.ts +20 -0
- package/corpus/templates/forms/shared/types.ts +12 -0
- package/corpus/templates/macros/CHANGELOG.md +10 -0
- package/corpus/templates/macros/app/root.tsx +7 -1
- package/corpus/templates/mail/CHANGELOG.md +10 -0
- package/corpus/templates/mail/app/components/layout/CommandPalette.tsx +3 -0
- package/corpus/templates/mail/app/pages/SettingsPage.tsx +27 -0
- package/corpus/templates/plan/.agents/skills/visual-plan/SKILL.md +31 -17
- package/corpus/templates/plan/.agents/skills/visual-plan/references/wireframe.md +7 -4
- package/corpus/templates/plan/.agents/skills/visual-recap/SKILL.md +34 -24
- package/corpus/templates/plan/.agents/skills/visual-recap/references/wireframe.md +7 -4
- package/corpus/templates/plan/AGENTS.md +4 -0
- package/corpus/templates/plan/CHANGELOG.md +10 -0
- package/corpus/templates/plan/actions/view-screen.ts +5 -0
- package/corpus/templates/plan/app/components/layout/Sidebar.tsx +98 -1
- package/corpus/templates/plan/app/components/plan/wireframe/html-artboard.css +3 -1
- package/corpus/templates/plan/app/pages/PlansPage.tsx +107 -7
- package/corpus/templates/plan/app/root.tsx +7 -1
- package/corpus/templates/plan/changelog/2026-06-23-large-diagrams-in-a-plan-now-scroll-within-their-block-inste.md +6 -0
- package/corpus/templates/plan/shared/share-attribution.ts +72 -0
- package/corpus/templates/slides/CHANGELOG.md +10 -0
- package/corpus/templates/slides/app/root.tsx +7 -1
- package/corpus/templates/videos/CHANGELOG.md +4 -151
- package/corpus/templates/videos/app/root.tsx +7 -1
- package/dist/action.js +87 -0
- package/dist/action.js.map +1 -1
- package/dist/agent/engine/builder-engine.d.ts +1 -1
- package/dist/agent/engine/builder-engine.d.ts.map +1 -1
- package/dist/agent/model-config.d.ts +2 -2
- package/dist/agent/model-config.d.ts.map +1 -1
- package/dist/agent/model-config.js +0 -2
- package/dist/agent/model-config.js.map +1 -1
- package/dist/agent/run-loop-with-resume.d.ts +13 -0
- package/dist/agent/run-loop-with-resume.d.ts.map +1 -1
- package/dist/agent/run-loop-with-resume.js +44 -0
- package/dist/agent/run-loop-with-resume.js.map +1 -1
- package/dist/changelog/parse.d.ts +70 -0
- package/dist/changelog/parse.d.ts.map +1 -0
- package/dist/changelog/parse.js +200 -0
- package/dist/changelog/parse.js.map +1 -0
- package/dist/cli/changelog.d.ts +4 -0
- package/dist/cli/changelog.d.ts.map +1 -0
- package/dist/cli/changelog.js +166 -0
- package/dist/cli/changelog.js.map +1 -0
- package/dist/cli/index.js +18 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/recap.d.ts.map +1 -1
- package/dist/cli/recap.js +22 -1
- package/dist/cli/recap.js.map +1 -1
- package/dist/cli/skills.d.ts +3 -3
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +74 -47
- package/dist/cli/skills.js.map +1 -1
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +5 -3
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/AssistantChat.d.ts +6 -1
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +2 -2
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/CommandMenu.d.ts +17 -1
- package/dist/client/CommandMenu.d.ts.map +1 -1
- package/dist/client/CommandMenu.js +49 -13
- package/dist/client/CommandMenu.js.map +1 -1
- package/dist/client/agent-chat-adapter.d.ts.map +1 -1
- package/dist/client/agent-chat-adapter.js +43 -6
- package/dist/client/agent-chat-adapter.js.map +1 -1
- package/dist/client/analytics.d.ts +18 -0
- package/dist/client/analytics.d.ts.map +1 -1
- package/dist/client/analytics.js +177 -0
- package/dist/client/analytics.js.map +1 -1
- package/dist/client/changelog/Changelog.d.ts +47 -0
- package/dist/client/changelog/Changelog.d.ts.map +1 -0
- package/dist/client/changelog/Changelog.js +138 -0
- package/dist/client/changelog/Changelog.js.map +1 -0
- package/dist/client/client-surface.d.ts +17 -0
- package/dist/client/client-surface.d.ts.map +1 -0
- package/dist/client/client-surface.js +24 -0
- package/dist/client/client-surface.js.map +1 -0
- package/dist/client/composer/TiptapComposer.d.ts +26 -1
- package/dist/client/composer/TiptapComposer.d.ts.map +1 -1
- package/dist/client/composer/TiptapComposer.js +27 -5
- package/dist/client/composer/TiptapComposer.js.map +1 -1
- package/dist/client/feedback-context.d.ts +3 -0
- package/dist/client/feedback-context.d.ts.map +1 -1
- package/dist/client/feedback-context.js +2 -0
- package/dist/client/feedback-context.js.map +1 -1
- package/dist/client/index.d.ts +3 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +3 -1
- package/dist/client/index.js.map +1 -1
- package/dist/client/mcp-apps/McpAppRenderer.d.ts +1 -0
- package/dist/client/mcp-apps/McpAppRenderer.d.ts.map +1 -1
- package/dist/client/mcp-apps/McpAppRenderer.js +42 -1
- package/dist/client/mcp-apps/McpAppRenderer.js.map +1 -1
- package/dist/client/settings/useBuilderStatus.d.ts +2 -0
- package/dist/client/settings/useBuilderStatus.d.ts.map +1 -1
- package/dist/client/settings/useBuilderStatus.js +58 -10
- package/dist/client/settings/useBuilderStatus.js.map +1 -1
- package/dist/client/sse-event-processor.d.ts.map +1 -1
- package/dist/client/sse-event-processor.js +7 -1
- package/dist/client/sse-event-processor.js.map +1 -1
- package/dist/mcp/build-server.d.ts +21 -0
- package/dist/mcp/build-server.d.ts.map +1 -1
- package/dist/mcp/build-server.js +43 -1
- package/dist/mcp/build-server.js.map +1 -1
- package/dist/mcp/embed-app.d.ts.map +1 -1
- package/dist/mcp/embed-app.js +197 -7
- package/dist/mcp/embed-app.js.map +1 -1
- package/dist/mcp/oauth-route.d.ts.map +1 -1
- package/dist/mcp/oauth-route.js +95 -12
- package/dist/mcp/oauth-route.js.map +1 -1
- package/dist/server/attribution.d.ts +83 -0
- package/dist/server/attribution.d.ts.map +1 -0
- package/dist/server/attribution.js +178 -0
- package/dist/server/attribution.js.map +1 -0
- package/dist/server/auth.d.ts.map +1 -1
- package/dist/server/auth.js +7 -0
- package/dist/server/auth.js.map +1 -1
- package/dist/server/better-auth-instance.d.ts +9 -1
- package/dist/server/better-auth-instance.d.ts.map +1 -1
- package/dist/server/better-auth-instance.js +32 -2
- package/dist/server/better-auth-instance.js.map +1 -1
- package/dist/server/builder-browser.d.ts +4 -0
- package/dist/server/builder-browser.d.ts.map +1 -1
- package/dist/server/builder-browser.js +20 -1
- package/dist/server/builder-browser.js.map +1 -1
- package/dist/server/core-routes-plugin.d.ts +25 -0
- package/dist/server/core-routes-plugin.d.ts.map +1 -1
- package/dist/server/core-routes-plugin.js +101 -0
- package/dist/server/core-routes-plugin.js.map +1 -1
- package/dist/server/google-oauth.d.ts.map +1 -1
- package/dist/server/google-oauth.js +16 -2
- package/dist/server/google-oauth.js.map +1 -1
- package/dist/server/onboarding-html.d.ts.map +1 -1
- package/dist/server/onboarding-html.js +35 -0
- package/dist/server/onboarding-html.js.map +1 -1
- package/dist/shared/mcp-embed-headers.js +1 -1
- package/dist/shared/mcp-embed-headers.js.map +1 -1
- package/dist/styles/agent-conversation.css +21 -0
- package/dist/templates/workspace-core/.agents/skills/changelog/SKILL.md +111 -0
- package/dist/templates/workspace-core/.agents/skills/reliable-mutations/SKILL.md +72 -0
- package/dist/templates/workspace-core/.agents/skills/tracking/SKILL.md +46 -14
- package/docs/design/durable-agent-runs.md +217 -0
- package/package.json +1 -1
- package/src/templates/workspace-core/.agents/skills/changelog/SKILL.md +111 -0
- package/src/templates/workspace-core/.agents/skills/reliable-mutations/SKILL.md +72 -0
- package/src/templates/workspace-core/.agents/skills/tracking/SKILL.md +46 -14
- package/corpus/templates/analytics/app/pages/About.tsx +0 -108
- package/corpus/templates/analytics/app/routes/about.tsx +0 -9
- /package/corpus/templates/analytics/app/routes/{dashboards.tsx → dashboards._index.tsx} +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { defineAction } from "@agent-native/core";
|
|
2
2
|
import {
|
|
3
|
+
readAppState,
|
|
3
4
|
writeAppState,
|
|
4
5
|
deleteAppState,
|
|
5
6
|
} from "@agent-native/core/application-state";
|
|
@@ -55,6 +56,28 @@ function resolveModelForTier(
|
|
|
55
56
|
: "gemini-3.1-flash-image";
|
|
56
57
|
}
|
|
57
58
|
|
|
59
|
+
/**
|
|
60
|
+
* The user's default image model, chosen from the composer's model picker and
|
|
61
|
+
* persisted in per-user application state. Used as a fallback when no explicit
|
|
62
|
+
* model, tier, or preset model is supplied. Returns undefined when unset or
|
|
63
|
+
* invalid so the hardcoded default still applies.
|
|
64
|
+
*/
|
|
65
|
+
async function readUserDefaultImageModel(): Promise<ImageModel | undefined> {
|
|
66
|
+
try {
|
|
67
|
+
const stored = await readAppState("imageGenerationModel");
|
|
68
|
+
const model = stored?.model;
|
|
69
|
+
if (
|
|
70
|
+
typeof model === "string" &&
|
|
71
|
+
(IMAGE_MODELS as readonly string[]).includes(model)
|
|
72
|
+
) {
|
|
73
|
+
return model as ImageModel;
|
|
74
|
+
}
|
|
75
|
+
} catch {
|
|
76
|
+
// No request context or read failure — fall back to defaults below.
|
|
77
|
+
}
|
|
78
|
+
return undefined;
|
|
79
|
+
}
|
|
80
|
+
|
|
58
81
|
export default defineAction({
|
|
59
82
|
description:
|
|
60
83
|
"Generate one brand-consistent image from a library. This is synchronous for images and returns the final asset with preview/download/embed URLs. Use generate-image-batch for multiple independent slots; do not poll image runs after this action returns.",
|
|
@@ -226,6 +249,7 @@ export default defineAction({
|
|
|
226
249
|
const resolvedModel = (args.model ??
|
|
227
250
|
resolveModelForTier(resolvedTier, category) ??
|
|
228
251
|
preset?.model ??
|
|
252
|
+
(await readUserDefaultImageModel()) ??
|
|
229
253
|
"gemini-3.1-flash-image") as (typeof IMAGE_MODELS)[number];
|
|
230
254
|
const resolvedCategories =
|
|
231
255
|
args.categories ??
|
|
@@ -305,8 +305,8 @@ function AssetsChatsSection() {
|
|
|
305
305
|
{threadTitle(thread)}
|
|
306
306
|
</span>
|
|
307
307
|
</button>
|
|
308
|
-
<div className="relative flex
|
|
309
|
-
<span className="text-[11px] text-muted-foreground/75 transition-opacity group-hover:opacity-0 group-focus-within:opacity-0">
|
|
308
|
+
<div className="relative flex w-auto min-w-7 shrink-0 items-center justify-end pr-1">
|
|
309
|
+
<span className="whitespace-nowrap text-[11px] tabular-nums text-muted-foreground/75 transition-opacity group-hover:opacity-0 group-focus-within:opacity-0">
|
|
310
310
|
{isActive ? "" : formatThreadAge(threadUpdatedAt(thread))}
|
|
311
311
|
</span>
|
|
312
312
|
<DropdownMenu>
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
gap: 0.5rem;
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
.assets-create-chat-pill-row
|
|
138
|
+
.assets-create-chat-pill-row button {
|
|
139
139
|
display: inline-flex;
|
|
140
140
|
align-items: center;
|
|
141
141
|
gap: 0.375rem;
|
|
@@ -147,6 +147,22 @@
|
|
|
147
147
|
color: hsl(var(--muted-foreground));
|
|
148
148
|
font-size: 0.75rem;
|
|
149
149
|
font-weight: 500;
|
|
150
|
+
cursor: pointer;
|
|
151
|
+
transition:
|
|
152
|
+
background-color 0.15s ease,
|
|
153
|
+
color 0.15s ease,
|
|
154
|
+
border-color 0.15s ease;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.assets-create-chat-pill-row button:hover {
|
|
158
|
+
border-color: hsl(var(--foreground) / 0.25);
|
|
159
|
+
background: hsl(var(--accent));
|
|
160
|
+
color: hsl(var(--foreground));
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.assets-create-chat-pill-row button:focus-visible {
|
|
164
|
+
outline: 2px solid hsl(var(--ring));
|
|
165
|
+
outline-offset: 2px;
|
|
150
166
|
}
|
|
151
167
|
|
|
152
168
|
.assets-create-chat-panel
|
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
import { Toaster } from "@/components/ui/sonner";
|
|
17
17
|
import { IconSun, IconMoon } from "@tabler/icons-react";
|
|
18
18
|
import { Layout as AppLayout } from "@/components/layout/Layout";
|
|
19
|
+
import changelog from "../CHANGELOG.md?raw";
|
|
19
20
|
import type { LinksFunction } from "react-router";
|
|
20
21
|
import stylesheet from "./global.css?url";
|
|
21
22
|
|
|
@@ -106,7 +107,12 @@ export default function Root() {
|
|
|
106
107
|
<AppProviders queryClient={queryClient}>
|
|
107
108
|
<DbSyncSetup />
|
|
108
109
|
<Toaster richColors position="bottom-left" />
|
|
109
|
-
<CommandMenu
|
|
110
|
+
<CommandMenu
|
|
111
|
+
open={cmdkOpen}
|
|
112
|
+
onOpenChange={setCmdkOpen}
|
|
113
|
+
changelog={changelog}
|
|
114
|
+
changelogKey="assets"
|
|
115
|
+
>
|
|
110
116
|
<CommandMenu.Group heading="Actions">
|
|
111
117
|
<CommandMenu.Item onSelect={() => {}}>Search</CommandMenu.Item>
|
|
112
118
|
</CommandMenu.Group>
|
|
@@ -1,12 +1,49 @@
|
|
|
1
|
-
import { useEffect } from "react";
|
|
1
|
+
import { useCallback, useEffect, useState } from "react";
|
|
2
2
|
import {
|
|
3
3
|
AgentChatSurface,
|
|
4
4
|
getBrowserTabId,
|
|
5
5
|
markAgentChatHomeHandoff,
|
|
6
|
+
readClientAppState,
|
|
7
|
+
sendToAgentChat,
|
|
8
|
+
writeClientAppState,
|
|
6
9
|
} from "@agent-native/core/client";
|
|
7
10
|
import { IconPhoto, IconSparkles, IconVideo } from "@tabler/icons-react";
|
|
8
11
|
import { ASSETS_CHAT_STORAGE_KEY } from "@/lib/chat";
|
|
9
12
|
|
|
13
|
+
// The composer's model picker shows the chat LLM (Claude/OpenAI/Gemini). The
|
|
14
|
+
// Assets app also drives a separate *image* model, so we surface it in the same
|
|
15
|
+
// menu — otherwise "Claude" reads as the image generator, which it isn't. The
|
|
16
|
+
// choice persists in per-user application state so the generate-image action
|
|
17
|
+
// (server-side) can read it as the default model. Values must be valid
|
|
18
|
+
// IMAGE_MODELS ids from shared/api.
|
|
19
|
+
const IMAGE_MODEL_STATE_KEY = "imageGenerationModel";
|
|
20
|
+
const DEFAULT_IMAGE_MODEL = "gemini-3.1-flash-image";
|
|
21
|
+
const IMAGE_MODEL_OPTIONS = [
|
|
22
|
+
{ value: "gemini-3-pro-image", label: "Gemini 3 Pro · best quality" },
|
|
23
|
+
{ value: "gemini-3.1-flash-image", label: "Gemini 3.1 Flash · fast" },
|
|
24
|
+
{ value: "gemini-2.5-flash-image", label: "Gemini 2.5 Flash" },
|
|
25
|
+
] as const;
|
|
26
|
+
|
|
27
|
+
// Empty-state starters. Clicking one prefills the composer (without sending) so
|
|
28
|
+
// the user can finish the thought instead of staring at a chip that does
|
|
29
|
+
// nothing. `submit: false` = prefill only; `openSidebar: false` keeps focus on
|
|
30
|
+
// the page-level Create surface.
|
|
31
|
+
const CHAT_STARTERS = [
|
|
32
|
+
{
|
|
33
|
+
key: "image",
|
|
34
|
+
Icon: IconPhoto,
|
|
35
|
+
label: "image",
|
|
36
|
+
prompt: "Create an image of ",
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
key: "video",
|
|
40
|
+
Icon: IconVideo,
|
|
41
|
+
label: "video",
|
|
42
|
+
prompt: "Create a video of ",
|
|
43
|
+
},
|
|
44
|
+
{ key: "refine", Icon: IconSparkles, label: "refine", prompt: "Refine " },
|
|
45
|
+
] as const;
|
|
46
|
+
|
|
10
47
|
const SEO_TITLE =
|
|
11
48
|
"Agent-Native Assets - Open Source AI asset library for brand-safe images and video";
|
|
12
49
|
const SEO_DESCRIPTION =
|
|
@@ -25,6 +62,8 @@ export function meta() {
|
|
|
25
62
|
}
|
|
26
63
|
|
|
27
64
|
export default function CreatePage() {
|
|
65
|
+
const [imageModel, setImageModel] = useState<string>(DEFAULT_IMAGE_MODEL);
|
|
66
|
+
|
|
28
67
|
useEffect(() => {
|
|
29
68
|
function handleChatRunning(event: Event) {
|
|
30
69
|
const detail = (event as CustomEvent).detail;
|
|
@@ -38,6 +77,34 @@ export default function CreatePage() {
|
|
|
38
77
|
window.removeEventListener("agentNative.chatRunning", handleChatRunning);
|
|
39
78
|
}, []);
|
|
40
79
|
|
|
80
|
+
// Hydrate the saved image-model default so the picker reflects the user's
|
|
81
|
+
// last choice across sessions.
|
|
82
|
+
useEffect(() => {
|
|
83
|
+
let cancelled = false;
|
|
84
|
+
void readClientAppState<{ model?: string }>(IMAGE_MODEL_STATE_KEY)
|
|
85
|
+
.then((state) => {
|
|
86
|
+
const stored = state?.model;
|
|
87
|
+
if (
|
|
88
|
+
!cancelled &&
|
|
89
|
+
stored &&
|
|
90
|
+
IMAGE_MODEL_OPTIONS.some((option) => option.value === stored)
|
|
91
|
+
) {
|
|
92
|
+
setImageModel(stored);
|
|
93
|
+
}
|
|
94
|
+
})
|
|
95
|
+
.catch(() => {});
|
|
96
|
+
return () => {
|
|
97
|
+
cancelled = true;
|
|
98
|
+
};
|
|
99
|
+
}, []);
|
|
100
|
+
|
|
101
|
+
const handleImageModelChange = useCallback((value: string) => {
|
|
102
|
+
setImageModel(value);
|
|
103
|
+
void writeClientAppState(IMAGE_MODEL_STATE_KEY, { model: value }).catch(
|
|
104
|
+
() => {},
|
|
105
|
+
);
|
|
106
|
+
}, []);
|
|
107
|
+
|
|
41
108
|
return (
|
|
42
109
|
<div className="flex h-full min-h-0 flex-col bg-background">
|
|
43
110
|
<AgentChatSurface
|
|
@@ -47,6 +114,15 @@ export default function CreatePage() {
|
|
|
47
114
|
defaultMode="chat"
|
|
48
115
|
storageKey={ASSETS_CHAT_STORAGE_KEY}
|
|
49
116
|
browserTabId={getBrowserTabId()}
|
|
117
|
+
imageModelMenu={{
|
|
118
|
+
value: imageModel,
|
|
119
|
+
options: IMAGE_MODEL_OPTIONS.map((option) => ({
|
|
120
|
+
value: option.value,
|
|
121
|
+
label: option.label,
|
|
122
|
+
})),
|
|
123
|
+
onChange: handleImageModelChange,
|
|
124
|
+
label: "Image model",
|
|
125
|
+
}}
|
|
50
126
|
showHeader={false}
|
|
51
127
|
showTabBar={false}
|
|
52
128
|
dynamicSuggestions={false}
|
|
@@ -63,19 +139,23 @@ export default function CreatePage() {
|
|
|
63
139
|
Start with a hero image, product reveal, reference edit, or a
|
|
64
140
|
direction you want to explore.
|
|
65
141
|
</p>
|
|
66
|
-
<div className="assets-create-chat-pill-row"
|
|
67
|
-
|
|
68
|
-
<
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
142
|
+
<div className="assets-create-chat-pill-row">
|
|
143
|
+
{CHAT_STARTERS.map(({ key, Icon, label, prompt }) => (
|
|
144
|
+
<button
|
|
145
|
+
key={key}
|
|
146
|
+
type="button"
|
|
147
|
+
onClick={() =>
|
|
148
|
+
sendToAgentChat({
|
|
149
|
+
message: prompt,
|
|
150
|
+
submit: false,
|
|
151
|
+
openSidebar: false,
|
|
152
|
+
})
|
|
153
|
+
}
|
|
154
|
+
>
|
|
155
|
+
<Icon className="size-3.5" />
|
|
156
|
+
{label}
|
|
157
|
+
</button>
|
|
158
|
+
))}
|
|
79
159
|
</div>
|
|
80
160
|
</div>
|
|
81
161
|
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
|
+
ChangelogSettingsCard,
|
|
2
3
|
agentNativePath,
|
|
3
4
|
useActionQuery,
|
|
4
5
|
useBuilderConnectFlow,
|
|
5
6
|
useBuilderStatus,
|
|
6
7
|
} from "@agent-native/core/client";
|
|
8
|
+
import changelog from "../../CHANGELOG.md?raw";
|
|
7
9
|
import {
|
|
8
10
|
useOnboarding,
|
|
9
11
|
type OnboardingMethod,
|
|
@@ -75,6 +77,10 @@ export default function SettingsPage() {
|
|
|
75
77
|
description="Asset generation, storage, and brand kit access."
|
|
76
78
|
className="max-w-4xl space-y-6"
|
|
77
79
|
>
|
|
80
|
+
<div className="max-w-2xl">
|
|
81
|
+
<ChangelogSettingsCard markdown={changelog} />
|
|
82
|
+
</div>
|
|
83
|
+
|
|
78
84
|
<div className="max-w-2xl">
|
|
79
85
|
<h2 className="text-lg font-semibold tracking-tight">Connections</h2>
|
|
80
86
|
<p className="mt-1 text-sm leading-6 text-muted-foreground">
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable user-facing changes to Agent-Native Brain are documented here. Open it any
|
|
4
|
+
time from the command menu (Cmd+K → "What's new") or from Settings.
|
|
5
|
+
|
|
6
|
+
## 2026-06-23
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
|
|
10
|
+
- See what's new right inside Agent-Native Brain — a changelog now lives in the command menu (Cmd+K) and in Settings.
|
|
@@ -24,6 +24,7 @@ import { Layout as AppLayout } from "@/components/layout/Layout";
|
|
|
24
24
|
import { useDistillationBridge } from "@/hooks/use-distillation-bridge";
|
|
25
25
|
import { useNavigationState } from "@/hooks/use-navigation-state";
|
|
26
26
|
import { TAB_ID } from "@/lib/tab-id";
|
|
27
|
+
import changelog from "../CHANGELOG.md?raw";
|
|
27
28
|
import type { LinksFunction } from "react-router";
|
|
28
29
|
import stylesheet from "./global.css?url";
|
|
29
30
|
|
|
@@ -137,7 +138,12 @@ function AppContent() {
|
|
|
137
138
|
useCommandMenuShortcut(useCallback(() => setCmdkOpen(true), []));
|
|
138
139
|
return (
|
|
139
140
|
<>
|
|
140
|
-
<CommandMenu
|
|
141
|
+
<CommandMenu
|
|
142
|
+
open={cmdkOpen}
|
|
143
|
+
onOpenChange={setCmdkOpen}
|
|
144
|
+
changelog={changelog}
|
|
145
|
+
changelogKey="brain"
|
|
146
|
+
>
|
|
141
147
|
<CommandMenu.Group heading="Navigate">
|
|
142
148
|
<CommandMenu.Item onSelect={() => navigate("/")}>
|
|
143
149
|
Ask Brain
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { useEffect, useMemo, useState } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
ChangelogSettingsCard,
|
|
4
|
+
useActionMutation,
|
|
5
|
+
useActionQuery,
|
|
6
|
+
} from "@agent-native/core/client";
|
|
7
|
+
import changelog from "../../CHANGELOG.md?raw";
|
|
3
8
|
import {
|
|
4
9
|
IconAdjustments,
|
|
5
10
|
IconBuilding,
|
|
@@ -146,6 +151,8 @@ export default function SettingsRoute() {
|
|
|
146
151
|
|
|
147
152
|
<div className="grid gap-5 p-4 sm:p-5 lg:grid-cols-[minmax(0,1fr)_360px] lg:p-7">
|
|
148
153
|
<main className="grid gap-5">
|
|
154
|
+
<ChangelogSettingsCard markdown={changelog} />
|
|
155
|
+
|
|
149
156
|
<Card>
|
|
150
157
|
<CardHeader>
|
|
151
158
|
<CardTitle className="flex items-center gap-2 text-base">
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable user-facing changes to Agent-Native Calendar are documented here. Open it any
|
|
4
|
+
time from the command menu (Cmd+K → "What's new") or from Settings.
|
|
5
|
+
|
|
6
|
+
## 2026-06-23
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
|
|
10
|
+
- See what's new right inside Agent-Native Calendar — a changelog now lives in the command menu (Cmd+K) and in Settings.
|
|
@@ -26,8 +26,10 @@ import { useSettings, useUpdateSettings } from "@/hooks/use-settings";
|
|
|
26
26
|
import {
|
|
27
27
|
AppearancePicker,
|
|
28
28
|
callAction,
|
|
29
|
+
ChangelogSettingsCard,
|
|
29
30
|
type AppearancePresetId,
|
|
30
31
|
} from "@agent-native/core/client";
|
|
32
|
+
import changelog from "../../CHANGELOG.md?raw";
|
|
31
33
|
import {
|
|
32
34
|
useGoogleAuthStatus,
|
|
33
35
|
useGoogleAuthUrl,
|
|
@@ -151,6 +153,8 @@ export default function Settings() {
|
|
|
151
153
|
</p>
|
|
152
154
|
</div>
|
|
153
155
|
|
|
156
|
+
<ChangelogSettingsCard markdown={changelog} />
|
|
157
|
+
|
|
154
158
|
{/* Google Calendar Connection */}
|
|
155
159
|
<Card>
|
|
156
160
|
<CardHeader>
|
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
useDbSync,
|
|
23
23
|
} from "@agent-native/core/client";
|
|
24
24
|
import { IconSun, IconMoon } from "@tabler/icons-react";
|
|
25
|
+
import changelog from "../CHANGELOG.md?raw";
|
|
25
26
|
import type { LinksFunction } from "react-router";
|
|
26
27
|
import stylesheet from "./global.css?url";
|
|
27
28
|
configureTracking({
|
|
@@ -137,7 +138,12 @@ function AppContent() {
|
|
|
137
138
|
return (
|
|
138
139
|
<>
|
|
139
140
|
<DbSyncSetup />
|
|
140
|
-
<CommandMenu
|
|
141
|
+
<CommandMenu
|
|
142
|
+
open={cmdkOpen}
|
|
143
|
+
onOpenChange={setCmdkOpen}
|
|
144
|
+
changelog={changelog}
|
|
145
|
+
changelogKey="calendar"
|
|
146
|
+
>
|
|
141
147
|
<CommandMenu.Group heading="Actions">
|
|
142
148
|
<CommandMenu.Item onSelect={() => {}}>Search</CommandMenu.Item>
|
|
143
149
|
</CommandMenu.Group>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable user-facing changes to Chat are documented here. Open it any
|
|
4
|
+
time from the command menu (Cmd+K → "What's new").
|
|
5
|
+
|
|
6
|
+
## 2026-06-23
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
|
|
10
|
+
- See what's new right inside Chat — a changelog now lives in the command menu (Cmd+K).
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
useCommandMenuShortcut,
|
|
15
15
|
} from "@agent-native/core/client";
|
|
16
16
|
import { IconSun, IconMoon } from "@tabler/icons-react";
|
|
17
|
+
import changelog from "../CHANGELOG.md?raw";
|
|
17
18
|
import { Layout as AppLayout } from "@/components/layout/Layout";
|
|
18
19
|
import { TAB_ID } from "@/lib/tab-id";
|
|
19
20
|
import { APP_TITLE } from "@/lib/app-config";
|
|
@@ -97,7 +98,12 @@ function AppContent() {
|
|
|
97
98
|
useCommandMenuShortcut(useCallback(() => setCmdkOpen(true), []));
|
|
98
99
|
return (
|
|
99
100
|
<>
|
|
100
|
-
<CommandMenu
|
|
101
|
+
<CommandMenu
|
|
102
|
+
open={cmdkOpen}
|
|
103
|
+
onOpenChange={setCmdkOpen}
|
|
104
|
+
changelog={changelog}
|
|
105
|
+
changelogKey="chat"
|
|
106
|
+
>
|
|
101
107
|
<CommandMenu.Group heading="Actions">
|
|
102
108
|
<CommandMenu.Item onSelect={() => {}}>Search</CommandMenu.Item>
|
|
103
109
|
</CommandMenu.Group>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable user-facing changes to Clips are documented here. Open it any time
|
|
4
|
+
from the command menu (Cmd+K → "What's new") or from Settings.
|
|
5
|
+
|
|
6
|
+
## 2026-06-23
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
|
|
10
|
+
- See what's new right inside Clips — a changelog now lives in the command menu (Cmd+K) and in Settings.
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { useEffect, useMemo, useRef, useState } from "react";
|
|
2
2
|
import { toast } from "sonner";
|
|
3
|
-
import { cn } from "@/lib/utils";
|
|
4
3
|
import {
|
|
5
4
|
useFolders,
|
|
6
5
|
useRecordings,
|
|
@@ -34,7 +33,6 @@ import {
|
|
|
34
33
|
DialogTitle,
|
|
35
34
|
DialogFooter,
|
|
36
35
|
} from "@/components/ui/dialog";
|
|
37
|
-
import { IconChecks } from "@tabler/icons-react";
|
|
38
36
|
import { ShareRecordingDialog } from "@/components/player/share-dialog";
|
|
39
37
|
|
|
40
38
|
interface LibraryGridProps {
|
|
@@ -107,7 +105,7 @@ export function LibraryGrid({
|
|
|
107
105
|
}: LibraryGridProps) {
|
|
108
106
|
const [sort, setSort] = useState<SortKey>("recent");
|
|
109
107
|
const [selected, setSelected] = useState<Set<string>>(new Set());
|
|
110
|
-
const
|
|
108
|
+
const selectionMode = selected.size > 0;
|
|
111
109
|
const [renamingRec, setRenamingRec] = useState<RecordingSummary | null>(null);
|
|
112
110
|
const [renameValue, setRenameValue] = useState("");
|
|
113
111
|
const [sharingRec, setSharingRec] = useState<RecordingSummary | null>(null);
|
|
@@ -202,7 +200,6 @@ export function LibraryGrid({
|
|
|
202
200
|
|
|
203
201
|
const clearSelection = () => {
|
|
204
202
|
setSelected(new Set());
|
|
205
|
-
setSelectionMode(false);
|
|
206
203
|
};
|
|
207
204
|
|
|
208
205
|
const moveSelected = async (targetFolderId: string | null) => {
|
|
@@ -337,22 +334,6 @@ export function LibraryGrid({
|
|
|
337
334
|
</div>
|
|
338
335
|
<div className="ml-auto flex shrink-0 items-center gap-2">
|
|
339
336
|
{extraActions}
|
|
340
|
-
<Button
|
|
341
|
-
variant={selectionMode ? "default" : "outline"}
|
|
342
|
-
size="sm"
|
|
343
|
-
className={cn(
|
|
344
|
-
"h-8 gap-1.5",
|
|
345
|
-
selectionMode &&
|
|
346
|
-
"bg-primary text-primary-foreground hover:bg-primary/90",
|
|
347
|
-
)}
|
|
348
|
-
onClick={() => {
|
|
349
|
-
setSelectionMode((v) => !v);
|
|
350
|
-
if (selectionMode) setSelected(new Set());
|
|
351
|
-
}}
|
|
352
|
-
>
|
|
353
|
-
<IconChecks className="h-3.5 w-3.5" />
|
|
354
|
-
Select
|
|
355
|
-
</Button>
|
|
356
337
|
<SortMenu value={sort} onChange={setSort} />
|
|
357
338
|
</div>
|
|
358
339
|
</PageHeader>
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
appBasePath,
|
|
10
10
|
appPath,
|
|
11
11
|
useActionQuery,
|
|
12
|
+
useSession,
|
|
12
13
|
} from "@agent-native/core/client";
|
|
13
14
|
import {
|
|
14
15
|
Popover,
|
|
@@ -34,8 +35,10 @@ import {
|
|
|
34
35
|
type SharesResponse,
|
|
35
36
|
type Visibility,
|
|
36
37
|
} from "@/components/sharing/share-ui";
|
|
38
|
+
import { SlackShareHint } from "@/components/sharing/slack-share-hint";
|
|
37
39
|
import { buildAgentApiUrls } from "../../../shared/agent-context";
|
|
38
40
|
import { isLoomEmbedUrl } from "../../../shared/loom";
|
|
41
|
+
import { withShareAttribution } from "../../../shared/share-attribution";
|
|
39
42
|
|
|
40
43
|
const PUBLIC_DESCRIPTION =
|
|
41
44
|
"Anyone with the link can view — sign in to comment or react";
|
|
@@ -156,11 +159,6 @@ function ShareRecordingContent({
|
|
|
156
159
|
hasPassword?: boolean;
|
|
157
160
|
reserveCloseButton?: boolean;
|
|
158
161
|
}) {
|
|
159
|
-
const shareUrl =
|
|
160
|
-
typeof window === "undefined"
|
|
161
|
-
? ""
|
|
162
|
-
: absoluteAppUrl(`/share/${recordingId}`);
|
|
163
|
-
|
|
164
162
|
const sharesQuery = useActionQuery<SharesResponse>("list-resource-shares", {
|
|
165
163
|
resourceType: "recording",
|
|
166
164
|
resourceId: recordingId,
|
|
@@ -168,6 +166,23 @@ function ShareRecordingContent({
|
|
|
168
166
|
|
|
169
167
|
const data = sharesQuery.data;
|
|
170
168
|
const canManage = data?.role === "owner" || data?.role === "admin";
|
|
169
|
+
|
|
170
|
+
// Attribution `via` must be a stable non-PII id, never an email. The only
|
|
171
|
+
// owner id available client-side is the *current* session's userId, which is
|
|
172
|
+
// the clip owner only when the viewer is the owner. Anyone else (e.g. a
|
|
173
|
+
// share-admin) gets an untagged `via` so we never attribute the link to the
|
|
174
|
+
// wrong person or leak the owner's email.
|
|
175
|
+
const { session } = useSession();
|
|
176
|
+
const ownerViaId =
|
|
177
|
+
data?.role === "owner" ? (session?.userId ?? undefined) : undefined;
|
|
178
|
+
|
|
179
|
+
const shareUrl =
|
|
180
|
+
typeof window === "undefined"
|
|
181
|
+
? ""
|
|
182
|
+
: withShareAttribution(
|
|
183
|
+
absoluteAppUrl(`/share/${recordingId}`),
|
|
184
|
+
ownerViaId,
|
|
185
|
+
);
|
|
171
186
|
const titleText = recordingTitle
|
|
172
187
|
? `Share "${recordingTitle}"`
|
|
173
188
|
: "Share recording";
|
|
@@ -224,6 +239,7 @@ function ShareRecordingContent({
|
|
|
224
239
|
recordingId={recordingId}
|
|
225
240
|
sharesQuery={sharesQuery}
|
|
226
241
|
canManage={canManage}
|
|
242
|
+
ownerViaId={ownerViaId}
|
|
227
243
|
/>
|
|
228
244
|
</TabsContent>
|
|
229
245
|
</Tabs>
|
|
@@ -321,6 +337,10 @@ function LinkTab({
|
|
|
321
337
|
disabled={isPending || (!isPublic && canManage)}
|
|
322
338
|
/>
|
|
323
339
|
|
|
340
|
+
{/* Public links unfurl into a playable video in Slack; surface that here
|
|
341
|
+
(and a connect link) instead of leaving it buried in Settings. */}
|
|
342
|
+
{isPublic ? <SlackShareHint canManage={canManage} /> : null}
|
|
343
|
+
|
|
324
344
|
<CopyField
|
|
325
345
|
label="Share with agents"
|
|
326
346
|
value={agentContextUrl}
|
|
@@ -389,10 +409,12 @@ function ClipsEmbedConfigurator({
|
|
|
389
409
|
recordingId,
|
|
390
410
|
sharesQuery,
|
|
391
411
|
canManage,
|
|
412
|
+
ownerViaId,
|
|
392
413
|
}: {
|
|
393
414
|
recordingId: string;
|
|
394
415
|
sharesQuery: SharesQuery;
|
|
395
416
|
canManage: boolean;
|
|
417
|
+
ownerViaId?: string;
|
|
396
418
|
}) {
|
|
397
419
|
const [autoplay, setAutoplay] = useState(false);
|
|
398
420
|
const [startMs, setStartMs] = useState(0);
|
|
@@ -416,8 +438,12 @@ function ClipsEmbedConfigurator({
|
|
|
416
438
|
if (autoplay) params.push("autoplay=1");
|
|
417
439
|
if (startMs > 0) params.push(`t=${Math.round(startMs / 1000)}`);
|
|
418
440
|
const qs = params.length ? `?${params.join("&")}` : "";
|
|
419
|
-
|
|
420
|
-
|
|
441
|
+
// Keep autoplay/t intact and also self-attribute the embed.
|
|
442
|
+
return withShareAttribution(
|
|
443
|
+
absoluteAppUrl(`/embed/${recordingId}${qs}`),
|
|
444
|
+
ownerViaId,
|
|
445
|
+
);
|
|
446
|
+
}, [recordingId, autoplay, startMs, ownerViaId]);
|
|
421
447
|
|
|
422
448
|
const code =
|
|
423
449
|
mode === "responsive"
|
|
@@ -21,6 +21,12 @@ export interface SignInPromptDialogProps {
|
|
|
21
21
|
* fires there and forwards to `returnTo` once the viewer is signed in.
|
|
22
22
|
*/
|
|
23
23
|
returnTo?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Fired when the viewer activates the "Sign in" button, before navigation.
|
|
26
|
+
* Used by the public share page to emit the signin funnel event. Must not
|
|
27
|
+
* change navigation behavior.
|
|
28
|
+
*/
|
|
29
|
+
onSignIn?: () => void;
|
|
24
30
|
}
|
|
25
31
|
|
|
26
32
|
function buildSignInHref(returnTo: string | undefined): string {
|
|
@@ -34,6 +40,7 @@ export function SignInPromptDialog({
|
|
|
34
40
|
onOpenChange,
|
|
35
41
|
intent,
|
|
36
42
|
returnTo,
|
|
43
|
+
onSignIn,
|
|
37
44
|
}: SignInPromptDialogProps) {
|
|
38
45
|
return (
|
|
39
46
|
<Dialog open={open} onOpenChange={onOpenChange}>
|
|
@@ -51,6 +58,7 @@ export function SignInPromptDialog({
|
|
|
51
58
|
</Button>
|
|
52
59
|
<Button
|
|
53
60
|
onClick={() => {
|
|
61
|
+
onSignIn?.();
|
|
54
62
|
window.location.href = buildSignInHref(returnTo);
|
|
55
63
|
}}
|
|
56
64
|
>
|