@agent-native/core-corpus 0.201.0-nightly-20261005153421 → 0.201.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/security/SKILL.md +9 -2
- package/corpus/templates/analytics/.agents/skills/session-replay/SKILL.md +14 -4
- package/corpus/templates/analytics/.agents/skills/storing-data/SKILL.md +12 -7
- package/corpus/templates/analytics/CHANGELOG.md +6 -0
- package/corpus/templates/analytics/README.md +2 -2
- package/corpus/templates/analytics/changelog/2026-10-02-events-with-a-very-long-name-app-or-page-path-no-longer-caus.md +6 -0
- package/corpus/templates/analytics/package.json +1 -0
- package/corpus/templates/analytics/server/handlers/first-party-analytics.ts +9 -19
- package/corpus/templates/analytics/server/handlers/session-replay.ts +34 -47
- package/corpus/templates/analytics/server/lib/first-party-analytics-rollups.ts +9 -6
- package/corpus/templates/analytics/server/lib/first-party-analytics.ts +57 -36
- package/corpus/templates/analytics/server/lib/indexed-text.ts +53 -0
- package/corpus/templates/analytics/server/lib/request-errors.ts +73 -0
- package/corpus/templates/analytics/server/lib/session-event-index.ts +6 -16
- package/corpus/templates/analytics/server/lib/session-replay.ts +12 -2
- package/corpus/templates/analytics/server/plugins/auth.ts +2 -1
- package/corpus/templates/analytics/server/plugins/otel.ts +6 -0
- package/corpus/templates/assets/.agents/skills/security/SKILL.md +9 -2
- package/corpus/templates/assets/.agents/skills/storing-data/SKILL.md +12 -7
- package/corpus/templates/assets/CHANGELOG.md +7 -0
- package/corpus/templates/assets/README.md +2 -2
- package/corpus/templates/assets/package.json +1 -0
- package/corpus/templates/assets/server/plugins/auth.ts +2 -1
- package/corpus/templates/assets/server/plugins/otel.ts +6 -0
- package/corpus/templates/brain/.agents/skills/brain/RUNBOOK.md +2 -1
- package/corpus/templates/brain/.agents/skills/brain/SKILL.md +5 -4
- package/corpus/templates/brain/.agents/skills/security/SKILL.md +9 -2
- package/corpus/templates/brain/.agents/skills/storing-data/SKILL.md +12 -7
- package/corpus/templates/brain/CHANGELOG.md +6 -0
- package/corpus/templates/brain/README.md +12 -8
- package/corpus/templates/brain/changelog/2026-10-05-private-slack-channels-are-searchable-org-wide.md +6 -0
- package/corpus/templates/brain/package.json +1 -0
- package/corpus/templates/brain/server/lib/audiences.ts +1 -98
- package/corpus/templates/brain/server/lib/connectors.ts +2 -166
- package/corpus/templates/brain/server/plugins/otel.ts +6 -0
- package/corpus/templates/calendar/.agents/skills/security/SKILL.md +9 -2
- package/corpus/templates/calendar/.agents/skills/storing-data/SKILL.md +12 -7
- package/corpus/templates/calendar/CHANGELOG.md +7 -0
- package/corpus/templates/calendar/README.md +2 -2
- package/corpus/templates/calendar/package.json +1 -0
- package/corpus/templates/calendar/server/plugins/auth.ts +2 -1
- package/corpus/templates/calendar/server/plugins/otel.ts +6 -0
- package/corpus/templates/chat/.agents/skills/security/SKILL.md +9 -2
- package/corpus/templates/chat/.agents/skills/storing-data/SKILL.md +12 -7
- package/corpus/templates/chat/README.md +2 -2
- package/corpus/templates/clips/.agents/skills/ai-video-tools/SKILL.md +9 -0
- package/corpus/templates/clips/.agents/skills/security/SKILL.md +9 -2
- package/corpus/templates/clips/CHANGELOG.md +24 -0
- package/corpus/templates/clips/README.md +2 -2
- package/corpus/templates/clips/actions/lib/audio-chunk-list.ts +23 -0
- package/corpus/templates/clips/actions/lib/audio-only-transcription.ts +187 -292
- package/corpus/templates/clips/actions/lib/chunked-transcription.ts +151 -0
- package/corpus/templates/clips/actions/lib/recording-audio-source.ts +191 -0
- package/corpus/templates/clips/actions/request-transcript.ts +81 -135
- package/corpus/templates/clips/actions/search-recordings.ts +19 -5
- package/corpus/templates/clips/app/components/clips-command-menu.tsx +5 -0
- package/corpus/templates/clips/app/components/library/library-layout.tsx +3 -1
- package/corpus/templates/clips/app/components/library/search-bar.tsx +5 -0
- package/corpus/templates/clips/app/hooks/use-library.ts +1 -0
- package/corpus/templates/clips/app/lib/local-recording-upload.ts +13 -6
- package/corpus/templates/clips/app/lib/recording-section.ts +1 -1
- package/corpus/templates/clips/app/routes/_app.r.$recordingId.tsx +7 -5
- package/corpus/templates/clips/app/routes/record.tsx +16 -6
- package/corpus/templates/clips/changelog/2026-10-02-long-uploads-an-hour-or-more-now-transcribe-reliably-instead.md +6 -0
- package/corpus/templates/clips/changelog/2026-10-05-confirming-discard-recording-now-returns-you-to-your-library.md +6 -0
- package/corpus/templates/clips/changelog/2026-10-05-discarding-a-recording-now-removes-its-failed-upload-card-fr.md +6 -0
- package/corpus/templates/clips/changelog/2026-10-05-discarding-a-recovered-recording-no-longer-warns-that-it-s-o.md +6 -0
- package/corpus/templates/clips/changelog/2026-10-05-search-results-identify-recordings-in-trash-and-open-them-wi.md +6 -0
- package/corpus/templates/clips/package.json +1 -0
- package/corpus/templates/clips/server/lib/builder-cdn.ts +5 -0
- package/corpus/templates/clips/server/lib/builder-media-compression.ts +2 -2
- package/corpus/templates/clips/server/plugins/auth.ts +2 -1
- package/corpus/templates/clips/server/plugins/otel.ts +6 -0
- package/corpus/templates/clips/shared/transcript-failure.ts +5 -0
- package/corpus/templates/content/.agents/skills/document-editing/references/databases.md +8 -2
- package/corpus/templates/content/.agents/skills/security/SKILL.md +9 -2
- package/corpus/templates/content/.agents/skills/storing-data/SKILL.md +12 -7
- package/corpus/templates/content/CHANGELOG.md +41 -0
- package/corpus/templates/content/README.md +2 -2
- package/corpus/templates/content/actions/_database-navigation.ts +523 -344
- package/corpus/templates/content/actions/_database-row-mutation.ts +44 -10
- package/corpus/templates/content/actions/_database-setup-discovery.ts +9 -3
- package/corpus/templates/content/actions/_database-utils.ts +299 -271
- package/corpus/templates/content/actions/_property-utils.ts +293 -190
- package/corpus/templates/content/actions/_relation-values.ts +3 -1
- package/corpus/templates/content/actions/get-content-database.ts +1 -0
- package/corpus/templates/content/actions/query-content-database-items.ts +32 -5
- package/corpus/templates/content/actions/set-document-property.ts +17 -11
- package/corpus/templates/content/app/components/editor/DocumentBlockFields.tsx +21 -6
- package/corpus/templates/content/app/components/editor/DocumentEditor.tsx +127 -43
- package/corpus/templates/content/app/components/editor/DocumentEditorSkeleton.tsx +159 -50
- package/corpus/templates/content/app/components/editor/DocumentToolbar.tsx +12 -28
- package/corpus/templates/content/app/components/editor/PageDraftRecovery.tsx +6 -1
- package/corpus/templates/content/app/components/editor/TableHoverControls.tsx +139 -70
- package/corpus/templates/content/app/components/editor/VisualEditor.tsx +16 -1
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +180 -75
- package/corpus/templates/content/app/components/editor/database/DatabaseViewSkeleton.tsx +76 -0
- package/corpus/templates/content/app/components/editor/database/navigation-state.ts +60 -2
- package/corpus/templates/content/app/components/editor/database/sidebar.tsx +41 -42
- package/corpus/templates/content/app/components/editor/document-editor-layout.ts +18 -0
- package/corpus/templates/content/app/components/editor/extensions/NotionExtensions.tsx +11 -3
- package/corpus/templates/content/app/components/editor/suggestions/draft-session.ts +15 -7
- package/corpus/templates/content/app/components/editor/suggestions/model.ts +13 -0
- package/corpus/templates/content/app/components/editor/suggestions/read-only-blocks.ts +136 -0
- package/corpus/templates/content/app/components/editor/table-view.ts +73 -0
- package/corpus/templates/content/app/components/layout/ContentStartupShell.tsx +1 -1
- package/corpus/templates/content/app/components/layout/Layout.tsx +5 -1
- package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +57 -16
- package/corpus/templates/content/app/components/sidebar/MovePageDialog.tsx +4 -4
- package/corpus/templates/content/app/components/sidebar/SidebarNavigationRow.tsx +34 -10
- package/corpus/templates/content/app/global.css +16 -8
- package/corpus/templates/content/app/hooks/content-action-refresh.ts +14 -13
- package/corpus/templates/content/app/hooks/use-content-database.ts +72 -9
- package/corpus/templates/content/app/hooks/use-content-personal-navigation.ts +7 -3
- package/corpus/templates/content/app/hooks/use-documents.ts +27 -0
- package/corpus/templates/content/app/i18n-data.ts +3 -2
- package/corpus/templates/content/app/lib/content-landing.ts +3 -31
- package/corpus/templates/content/app/lib/files-navigation.ts +182 -10
- package/corpus/templates/content/app/lib/files-root-hint.ts +20 -32
- package/corpus/templates/content/app/lib/page-startup-hints.ts +108 -0
- package/corpus/templates/content/app/lib/private-link-redirect.ts +25 -0
- package/corpus/templates/content/app/lib/sidebar-layout-hint.ts +34 -1
- package/corpus/templates/content/app/lib/startup-timing.ts +2 -0
- package/corpus/templates/content/app/root.tsx +3 -1
- package/corpus/templates/content/app/routes/_app.home.tsx +10 -19
- package/corpus/templates/content/app/routes/p.$id.tsx +23 -5
- package/corpus/templates/content/changelog/2026-10-02-a-page-link-you-cant-open-now-says-so-instead-of-opening-an.md +6 -0
- package/corpus/templates/content/changelog/2026-10-02-after-a-refresh-the-files-sidebar-shows-the-open-page-s-fold.md +6 -0
- package/corpus/templates/content/changelog/2026-10-02-large-collections-open-faster.md +6 -0
- package/corpus/templates/content/changelog/2026-10-02-pages-stay-inside-the-window-at-every-width-long-inline-code.md +6 -0
- package/corpus/templates/content/changelog/2026-10-02-pages-with-open-comments-and-collections-with-sorted-or-filt.md +6 -0
- package/corpus/templates/content/changelog/2026-10-02-suggest-edits-works-on-pages-written-by-agents-including-pag.md +6 -0
- package/corpus/templates/content/changelog/2026-10-02-while-you-suggest-edits-tables-and-other-blocks-that-suggest.md +6 -0
- package/corpus/templates/content/changelog/2026-10-05-collection-view-context-now-survives-quick-page-changes-when.md +6 -0
- package/corpus/templates/content/changelog/2026-10-05-collection-views-keep-their-saved-rows-accurate-during-refre.md +6 -0
- package/corpus/templates/content/changelog/2026-10-05-exact-saved-view-links-keep-collection-retry-available.md +6 -0
- package/corpus/templates/content/changelog/2026-10-05-expanding-a-files-folder-now-shares-one-navigation-read-acro.md +6 -0
- package/corpus/templates/content/changelog/2026-10-05-files-navigation-retries-temporary-failures-consistently.md +6 -0
- package/corpus/templates/content/changelog/2026-10-05-shared-page-owners-keep-edit-and-manage-controls-in-files-an.md +6 -0
- package/corpus/templates/content/changelog/2026-10-05-tagging-an-ai-in-a-comment-works-again-instead-of-failing-ri.md +6 -0
- package/corpus/templates/content/changelog/2026-10-05-the-home-loading-shell-keeps-the-layout-of-your-last-opened-.md +6 -0
- package/corpus/templates/content/changelog/2026-10-05-typing-and-a-space-or-inserting-a-toggle-or-callout-no-longe.md +6 -0
- package/corpus/templates/content/docs/product/capabilities/content.workspace.session-restore.md +4 -1
- package/corpus/templates/content/e2e/playwright.config.ts +1 -1
- package/corpus/templates/content/package.json +2 -1
- package/corpus/templates/content/scripts/seed-perf-database.mjs +600 -0
- package/corpus/templates/content/scripts/trace-startup.mjs +25 -3
- package/corpus/templates/content/server/db/index.ts +1 -1
- package/corpus/templates/content/server/lib/suggested-edits.ts +23 -26
- package/corpus/templates/content/server/plugins/auth.ts +2 -1
- package/corpus/templates/content/server/plugins/otel.ts +6 -0
- package/corpus/templates/content/shared/api.ts +17 -0
- package/corpus/templates/content/shared/suggestion-diff.ts +124 -38
- package/corpus/templates/content/shared/suggestion-formatting.ts +134 -3
- package/corpus/templates/crm/.agents/skills/security/SKILL.md +9 -2
- package/corpus/templates/crm/.agents/skills/storing-data/SKILL.md +12 -7
- package/corpus/templates/crm/package.json +1 -0
- package/corpus/templates/crm/server/plugins/otel.ts +6 -0
- package/corpus/templates/design/.agents/skills/security/SKILL.md +9 -2
- package/corpus/templates/design/.agents/skills/storing-data/SKILL.md +12 -7
- package/corpus/templates/design/CHANGELOG.md +41 -0
- package/corpus/templates/design/README.md +2 -2
- package/corpus/templates/design/actions/list-designs.ts +11 -4
- package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +110 -32
- package/corpus/templates/design/app/components/design/multi-screen/cross-screen-drop.ts +28 -0
- package/corpus/templates/design/app/components/design/multi-screen/types.ts +1 -0
- package/corpus/templates/design/app/components/home/DesignHomeLibrary.tsx +79 -0
- package/corpus/templates/design/app/components/layout/Header.tsx +2 -4
- package/corpus/templates/design/app/components/ui/tabs.tsx +59 -1
- package/corpus/templates/design/app/global.css +1 -34
- package/corpus/templates/design/app/i18n/en-US.ts +4 -0
- package/corpus/templates/design/app/lib/design-filter.ts +4 -2
- package/corpus/templates/design/app/pages/Index.tsx +91 -59
- package/corpus/templates/design/app/pages/design-editor/commands/cross-screen-element-drop.ts +58 -17
- package/corpus/templates/design/changelog/2026-10-01-filter-designs-by-owner.md +6 -0
- package/corpus/templates/design/changelog/2026-10-03-layers-dropped-into-visible-canvas-space-beyond-a-screen-now.md +6 -0
- package/corpus/templates/design/changelog/2026-10-03-visible-screen-overflow-no-longer-routes-drops-to-the-canvas.md +6 -0
- package/corpus/templates/design/changelog/2026-10-05-the-recent-tab-shows-loading-placeholders-until-your-designs.md +6 -0
- package/corpus/templates/design/package.json +1 -0
- package/corpus/templates/design/server/plugins/auth.ts +2 -1
- package/corpus/templates/design/server/plugins/otel.ts +6 -0
- package/corpus/templates/dispatch/.agents/skills/security/SKILL.md +9 -2
- package/corpus/templates/dispatch/.agents/skills/storing-data/SKILL.md +12 -7
- package/corpus/templates/dispatch/README.md +2 -2
- package/corpus/templates/dispatch/package.json +1 -0
- package/corpus/templates/dispatch/server/plugins/otel.ts +6 -0
- package/corpus/templates/dispatch/server/plugins/setup-dispatch.ts +2 -1
- package/corpus/templates/factory/.agents/skills/security/SKILL.md +9 -2
- package/corpus/templates/factory/.agents/skills/storing-data/SKILL.md +12 -7
- package/corpus/templates/factory/package.json +1 -0
- package/corpus/templates/factory/server/plugins/otel.ts +6 -0
- package/corpus/templates/forms/.agents/skills/security/SKILL.md +9 -2
- package/corpus/templates/forms/.agents/skills/storing-data/SKILL.md +12 -7
- package/corpus/templates/forms/README.md +2 -2
- package/corpus/templates/forms/package.json +1 -0
- package/corpus/templates/forms/server/plugins/auth.ts +2 -1
- package/corpus/templates/forms/server/plugins/otel.ts +6 -0
- package/corpus/templates/mail/.agents/skills/security/SKILL.md +9 -2
- package/corpus/templates/mail/.agents/skills/storing-data/SKILL.md +12 -7
- package/corpus/templates/mail/CHANGELOG.md +6 -0
- package/corpus/templates/mail/README.md +2 -2
- package/corpus/templates/mail/package.json +1 -0
- package/corpus/templates/mail/server/plugins/auth.ts +2 -1
- package/corpus/templates/mail/server/plugins/otel.ts +6 -0
- package/corpus/templates/plan/.agents/skills/security/SKILL.md +9 -2
- package/corpus/templates/plan/.agents/skills/storing-data/SKILL.md +12 -7
- package/corpus/templates/plan/CHANGELOG.md +1 -0
- package/corpus/templates/plan/README.md +2 -2
- package/corpus/templates/plan/package.json +1 -0
- package/corpus/templates/plan/server/plugins/auth.ts +2 -1
- package/corpus/templates/plan/server/plugins/otel.ts +6 -0
- package/corpus/templates/slides/.agents/skills/security/SKILL.md +9 -2
- package/corpus/templates/slides/.agents/skills/storing-data/SKILL.md +12 -7
- package/corpus/templates/slides/CHANGELOG.md +23 -0
- package/corpus/templates/slides/README.md +2 -2
- package/corpus/templates/slides/actions/list-decks.ts +11 -4
- package/corpus/templates/slides/app/components/deck/DeckFilterMenu.tsx +44 -36
- package/corpus/templates/slides/app/components/home/SlidesHomeLibrary.tsx +79 -0
- package/corpus/templates/slides/app/components/layout/Header.tsx +2 -15
- package/corpus/templates/slides/app/components/ui/tabs.tsx +59 -0
- package/corpus/templates/slides/app/global.css +3 -54
- package/corpus/templates/slides/app/i18n/en-US.ts +4 -0
- package/corpus/templates/slides/app/lib/deck-filter.ts +5 -2
- package/corpus/templates/slides/app/pages/Index.tsx +102 -88
- package/corpus/templates/slides/changelog/2026-10-01-filter-decks-by-owner.md +6 -0
- package/corpus/templates/slides/changelog/2026-10-02-hide-recent-until-decks-available.md +6 -0
- package/corpus/templates/slides/changelog/2026-10-05-the-recent-tab-shows-loading-placeholders-until-your-decks-a.md +6 -0
- package/corpus/templates/slides/package.json +1 -0
- package/corpus/templates/slides/server/handlers/request-auth-context.ts +8 -0
- package/corpus/templates/slides/server/plugins/auth.ts +2 -1
- package/corpus/templates/slides/server/plugins/otel.ts +6 -0
- package/corpus/templates/tasks/.agents/skills/security/SKILL.md +9 -2
- package/corpus/templates/tasks/.agents/skills/storing-data/SKILL.md +12 -7
- package/package.json +1 -1
|
@@ -23,8 +23,6 @@ import {
|
|
|
23
23
|
} from "@agent-native/toolkit/agentkit";
|
|
24
24
|
import {
|
|
25
25
|
PromptHome,
|
|
26
|
-
PromptHomeLibrary,
|
|
27
|
-
type PromptHomeLibraryTab,
|
|
28
26
|
useHomeSearchShortcut,
|
|
29
27
|
useSetHeaderActions,
|
|
30
28
|
useSetPageTitle,
|
|
@@ -89,6 +87,10 @@ import PromptPopover, {
|
|
|
89
87
|
} from "@/components/editor/PromptDialog";
|
|
90
88
|
import { useSlidesComposerContext } from "@/components/editor/SlidesComposerContext";
|
|
91
89
|
import { usePromptImport } from "@/components/editor/use-prompt-import";
|
|
90
|
+
import {
|
|
91
|
+
SlidesHomeLibrary,
|
|
92
|
+
type SlidesHomeLibraryTab,
|
|
93
|
+
} from "@/components/home/SlidesHomeLibrary";
|
|
92
94
|
import { HomeHeaderActions } from "@/components/layout/Header";
|
|
93
95
|
import { useOpenMobileSidebar } from "@/components/layout/Layout";
|
|
94
96
|
import { DeckTemplateLibrary } from "@/components/templates/DeckTemplateLibrary";
|
|
@@ -202,7 +204,6 @@ function HomeChrome({ title, actions }: { title: string; actions: ReactNode }) {
|
|
|
202
204
|
return null;
|
|
203
205
|
}
|
|
204
206
|
const NEW_DECK_DRAFT_SCOPE = "slides-new-deck";
|
|
205
|
-
const HOME_LIBRARY_TAB_STORAGE_KEY = "slides:home-library-tab";
|
|
206
207
|
const PENDING_PROMPT_KEY = "slides:pending-deck-prompt";
|
|
207
208
|
const PENDING_PROMPT_CONTEXT_KEY = "slides:pending-deck-prompt-context";
|
|
208
209
|
const PENDING_PROMPT_MODEL_SELECTION_KEY =
|
|
@@ -210,24 +211,6 @@ const PENDING_PROMPT_MODEL_SELECTION_KEY =
|
|
|
210
211
|
const PENDING_PROMPT_REFERENCE_SELECTION_KEY =
|
|
211
212
|
"slides:pending-deck-reference-selection";
|
|
212
213
|
|
|
213
|
-
function readStoredHomeLibraryTab(): PromptHomeLibraryTab | undefined {
|
|
214
|
-
try {
|
|
215
|
-
const tab = window.localStorage.getItem(HOME_LIBRARY_TAB_STORAGE_KEY);
|
|
216
|
-
return tab === "templates" || tab === "recent" ? tab : undefined;
|
|
217
|
-
} catch {
|
|
218
|
-
// coercion-ok: the tab preference is optional when browser storage is unavailable.
|
|
219
|
-
return undefined;
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
function writeStoredHomeLibraryTab(tab: PromptHomeLibraryTab): void {
|
|
224
|
-
try {
|
|
225
|
-
window.localStorage.setItem(HOME_LIBRARY_TAB_STORAGE_KEY, tab);
|
|
226
|
-
} catch {
|
|
227
|
-
// coercion-ok: an unavailable preference store preserves the in-memory selection.
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
|
|
231
214
|
type DeckModelSelection = Pick<
|
|
232
215
|
PromptComposerSubmitOptions,
|
|
233
216
|
"model" | "engine" | "effort"
|
|
@@ -639,7 +622,6 @@ export default function Index({ active = true }: { active?: boolean }) {
|
|
|
639
622
|
prompt,
|
|
640
623
|
}));
|
|
641
624
|
const navigate = useNavigate();
|
|
642
|
-
useHomeSearchShortcut(isHome);
|
|
643
625
|
const [searchParams, setSearchParams] = useSearchParams();
|
|
644
626
|
const [deckToDelete, setDeckToDelete] = useState<string | null>(null);
|
|
645
627
|
const [workspaceDefaultCandidate, setWorkspaceDefaultCandidate] =
|
|
@@ -701,30 +683,20 @@ export default function Index({ active = true }: { active?: boolean }) {
|
|
|
701
683
|
string | null
|
|
702
684
|
>(null);
|
|
703
685
|
const [deckSearch, setDeckSearch] = useState("");
|
|
704
|
-
const
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
);
|
|
708
|
-
const homeLibraryTabWasSelectedRef = useRef(
|
|
709
|
-
storedHomeLibraryTab !== undefined,
|
|
710
|
-
);
|
|
686
|
+
const [homeSection, setHomeSection] =
|
|
687
|
+
useState<SlidesHomeLibraryTab>("templates");
|
|
688
|
+
const homeLibraryTabWasSelectedRef = useRef(false);
|
|
711
689
|
const deckFilterWasSelectedRef = useRef(false);
|
|
690
|
+
const revealRecentSearch = useCallback(() => {
|
|
691
|
+
if (decks.length === 0) return false;
|
|
692
|
+
homeLibraryTabWasSelectedRef.current = true;
|
|
693
|
+
setHomeSection("recent");
|
|
694
|
+
return true;
|
|
695
|
+
}, [decks.length]);
|
|
696
|
+
useHomeSearchShortcut(isHome, revealRecentSearch);
|
|
712
697
|
useEffect(() => {
|
|
713
698
|
if (deckSearch.trim()) setHomeSection("recent");
|
|
714
699
|
}, [deckSearch]);
|
|
715
|
-
useEffect(() => {
|
|
716
|
-
if (
|
|
717
|
-
isHome &&
|
|
718
|
-
!homeLibraryTabWasSelectedRef.current &&
|
|
719
|
-
!loading &&
|
|
720
|
-
!loadError &&
|
|
721
|
-
decks.length > 0
|
|
722
|
-
) {
|
|
723
|
-
setHomeSection("recent");
|
|
724
|
-
writeStoredHomeLibraryTab("recent");
|
|
725
|
-
homeLibraryTabWasSelectedRef.current = true;
|
|
726
|
-
}
|
|
727
|
-
}, [decks.length, isHome, loadError, loading]);
|
|
728
700
|
const [storedDeckFilter, setStoredDeckFilter] = useState<DeckFilter>("mine");
|
|
729
701
|
const referenceDeckAutoRef = useRef(true);
|
|
730
702
|
const [showSignInDialog, setShowSignInDialog] = useState(false);
|
|
@@ -779,6 +751,7 @@ export default function Index({ active = true }: { active?: boolean }) {
|
|
|
779
751
|
sortDecksByRecency(
|
|
780
752
|
decks.filter((deck) => {
|
|
781
753
|
if (deckFilter === "mine" && !deck.createdByMe) return false;
|
|
754
|
+
if (deckFilter === "not-mine" && deck.createdByMe) return false;
|
|
782
755
|
return (
|
|
783
756
|
normalizedDeckSearch.length === 0 ||
|
|
784
757
|
deck.title.toLowerCase().includes(normalizedDeckSearch)
|
|
@@ -879,7 +852,8 @@ export default function Index({ active = true }: { active?: boolean }) {
|
|
|
879
852
|
|
|
880
853
|
const setDeckFilter = useCallback(
|
|
881
854
|
(value: string) => {
|
|
882
|
-
const nextFilter =
|
|
855
|
+
const nextFilter: DeckFilter =
|
|
856
|
+
value === "mine" || value === "not-mine" ? value : "all";
|
|
883
857
|
deckFilterWasSelectedRef.current = true;
|
|
884
858
|
setStoredDeckFilter(nextFilter);
|
|
885
859
|
writeStoredDeckFilter(nextFilter);
|
|
@@ -888,6 +862,8 @@ export default function Index({ active = true }: { active?: boolean }) {
|
|
|
888
862
|
const next = new URLSearchParams(prev);
|
|
889
863
|
if (nextFilter === "mine") {
|
|
890
864
|
next.set("createdBy", "me");
|
|
865
|
+
} else if (nextFilter === "not-mine") {
|
|
866
|
+
next.set("createdBy", "not-me");
|
|
891
867
|
} else {
|
|
892
868
|
next.delete("createdBy");
|
|
893
869
|
}
|
|
@@ -2372,23 +2348,25 @@ export default function Index({ active = true }: { active?: boolean }) {
|
|
|
2372
2348
|
deckCount: decks.length,
|
|
2373
2349
|
});
|
|
2374
2350
|
const hasDecks = viewState === "decks";
|
|
2351
|
+
useEffect(() => {
|
|
2352
|
+
if (viewState === "loading") return;
|
|
2353
|
+
if (!hasDecks) {
|
|
2354
|
+
setHomeSection("templates");
|
|
2355
|
+
homeLibraryTabWasSelectedRef.current = false;
|
|
2356
|
+
return;
|
|
2357
|
+
}
|
|
2358
|
+
if (homeLibraryTabWasSelectedRef.current) return;
|
|
2359
|
+
|
|
2360
|
+
setHomeSection("recent");
|
|
2361
|
+
homeLibraryTabWasSelectedRef.current = true;
|
|
2362
|
+
}, [hasDecks, viewState]);
|
|
2375
2363
|
const homeHeaderActions = useMemo(
|
|
2376
2364
|
() => (
|
|
2377
|
-
<HomeHeaderActions
|
|
2378
|
-
search={
|
|
2379
|
-
hasDecks ? (
|
|
2380
|
-
<DeckSearchInput
|
|
2381
|
-
value={deckSearch}
|
|
2382
|
-
onChange={setDeckSearch}
|
|
2383
|
-
className="w-full"
|
|
2384
|
-
/>
|
|
2385
|
-
) : null
|
|
2386
|
-
}
|
|
2387
|
-
>
|
|
2365
|
+
<HomeHeaderActions>
|
|
2388
2366
|
<ImportDeckButton controller={deckImport} />
|
|
2389
2367
|
</HomeHeaderActions>
|
|
2390
2368
|
),
|
|
2391
|
-
[deckImport
|
|
2369
|
+
[deckImport],
|
|
2392
2370
|
);
|
|
2393
2371
|
if (isStartingNewDeck) {
|
|
2394
2372
|
return (
|
|
@@ -2423,13 +2401,6 @@ export default function Index({ active = true }: { active?: boolean }) {
|
|
|
2423
2401
|
<IconMenu2 className="size-4" aria-hidden="true" />
|
|
2424
2402
|
</button>
|
|
2425
2403
|
) : null}
|
|
2426
|
-
{hasDecks ? (
|
|
2427
|
-
<DeckSearchInput
|
|
2428
|
-
value={deckSearch}
|
|
2429
|
-
onChange={setDeckSearch}
|
|
2430
|
-
className="slides-home-mobile-search min-w-0 flex-1"
|
|
2431
|
-
/>
|
|
2432
|
-
) : null}
|
|
2433
2404
|
<div className="slides-home-mobile-import">
|
|
2434
2405
|
<ImportDeckButton controller={deckImport} />
|
|
2435
2406
|
</div>
|
|
@@ -2613,11 +2584,15 @@ export default function Index({ active = true }: { active?: boolean }) {
|
|
|
2613
2584
|
</div>
|
|
2614
2585
|
) : null}
|
|
2615
2586
|
<ClientOnly>
|
|
2616
|
-
<
|
|
2617
|
-
|
|
2587
|
+
<SlidesHomeLibrary
|
|
2588
|
+
recentVisible={hasDecks}
|
|
2589
|
+
value={
|
|
2590
|
+
hasDecks && !homeLibraryTabWasSelectedRef.current
|
|
2591
|
+
? "recent"
|
|
2592
|
+
: homeSection
|
|
2593
|
+
}
|
|
2618
2594
|
onValueChange={(value) => {
|
|
2619
2595
|
homeLibraryTabWasSelectedRef.current = true;
|
|
2620
|
-
writeStoredHomeLibraryTab(value);
|
|
2621
2596
|
setHomeSection(value);
|
|
2622
2597
|
}}
|
|
2623
2598
|
labels={{
|
|
@@ -2632,6 +2607,15 @@ export default function Index({ active = true }: { active?: boolean }) {
|
|
|
2632
2607
|
</Link>
|
|
2633
2608
|
</Button>
|
|
2634
2609
|
}
|
|
2610
|
+
search={
|
|
2611
|
+
hasDecks ? (
|
|
2612
|
+
<DeckSearchInput
|
|
2613
|
+
value={deckSearch}
|
|
2614
|
+
onChange={setDeckSearch}
|
|
2615
|
+
className="w-full sm:w-64 sm:shrink-0"
|
|
2616
|
+
/>
|
|
2617
|
+
) : null
|
|
2618
|
+
}
|
|
2635
2619
|
recentActions={
|
|
2636
2620
|
hasDecks ? (
|
|
2637
2621
|
<DeckFilterMenu value={deckFilter} onChange={setDeckFilter} />
|
|
@@ -2639,28 +2623,35 @@ export default function Index({ active = true }: { active?: boolean }) {
|
|
|
2639
2623
|
}
|
|
2640
2624
|
templates={<DeckTemplateLibrary enabled={isHome} />}
|
|
2641
2625
|
recent={
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2626
|
+
viewState === "loading" ? (
|
|
2627
|
+
<DeckListLoadingSkeleton />
|
|
2628
|
+
) : viewState === "error" ? null : (
|
|
2629
|
+
<div className="agent-template-library-grid">
|
|
2630
|
+
{visibleDecks.map((deck) => (
|
|
2631
|
+
<DeckCard
|
|
2632
|
+
key={deck.id}
|
|
2633
|
+
deck={deck}
|
|
2634
|
+
onDelete={(id) => setDeckToDelete(id)}
|
|
2635
|
+
onRename={handleRename}
|
|
2636
|
+
onDuplicate={handleDuplicate}
|
|
2637
|
+
onToggleStar={handleToggleStar}
|
|
2638
|
+
isWorkspaceDefault={workspaceReferenceDeck?.id === deck.id}
|
|
2639
|
+
canSetWorkspaceDefault={canManageWorkspaceDefaults}
|
|
2640
|
+
onSetWorkspaceDefault={handleSetWorkspaceDefaultDeck}
|
|
2641
|
+
/>
|
|
2642
|
+
))}
|
|
2643
|
+
{visibleDecks.length === 0 &&
|
|
2644
|
+
(normalizedDeckSearch ? (
|
|
2645
|
+
<div className="rounded-xl bg-card p-6 text-sm text-muted-foreground">
|
|
2646
|
+
{t("home.noDecksMatchSearch")}
|
|
2647
|
+
</div>
|
|
2648
|
+
) : (
|
|
2649
|
+
<div className="rounded-xl bg-card p-6 text-sm text-muted-foreground">
|
|
2650
|
+
{t("home.noDecksMatchFilter")}
|
|
2651
|
+
</div>
|
|
2652
|
+
))}
|
|
2653
|
+
</div>
|
|
2654
|
+
)
|
|
2664
2655
|
}
|
|
2665
2656
|
/>
|
|
2666
2657
|
</ClientOnly>
|
|
@@ -2827,6 +2818,29 @@ export default function Index({ active = true }: { active?: boolean }) {
|
|
|
2827
2818
|
);
|
|
2828
2819
|
}
|
|
2829
2820
|
|
|
2821
|
+
function DeckListLoadingSkeleton() {
|
|
2822
|
+
return (
|
|
2823
|
+
<div className="agent-template-library-grid" aria-busy="true">
|
|
2824
|
+
{Array.from({ length: 8 }, (_, index) => (
|
|
2825
|
+
<div
|
|
2826
|
+
key={index}
|
|
2827
|
+
className="agent-template-library-card group relative min-w-0"
|
|
2828
|
+
aria-hidden="true"
|
|
2829
|
+
>
|
|
2830
|
+
<div className="agent-template-library-primary overflow-hidden rounded-xl border border-border bg-card">
|
|
2831
|
+
<div className="agent-template-library-preview bg-muted/30">
|
|
2832
|
+
<Skeleton className="size-full rounded-none" />
|
|
2833
|
+
</div>
|
|
2834
|
+
<div className="agent-template-library-caption">
|
|
2835
|
+
<Skeleton className="h-4 w-3/4" />
|
|
2836
|
+
</div>
|
|
2837
|
+
</div>
|
|
2838
|
+
</div>
|
|
2839
|
+
))}
|
|
2840
|
+
</div>
|
|
2841
|
+
);
|
|
2842
|
+
}
|
|
2843
|
+
|
|
2830
2844
|
function DeckSearchInput({
|
|
2831
2845
|
value,
|
|
2832
2846
|
onChange,
|
|
@@ -2850,7 +2864,7 @@ function DeckSearchInput({
|
|
|
2850
2864
|
placeholder={t("root.searchDecks")}
|
|
2851
2865
|
aria-label={t("root.searchDecks")}
|
|
2852
2866
|
data-home-search="true"
|
|
2853
|
-
className="h-
|
|
2867
|
+
className="h-9 pe-3 ps-9"
|
|
2854
2868
|
/>
|
|
2855
2869
|
</div>
|
|
2856
2870
|
);
|
|
@@ -2,6 +2,7 @@ import { getOrgContext } from "@agent-native/core/org";
|
|
|
2
2
|
import {
|
|
3
3
|
getMcpOAuthBearerSession,
|
|
4
4
|
getSession,
|
|
5
|
+
isCredentialMembershipUnavailable,
|
|
5
6
|
runWithRequestContext,
|
|
6
7
|
} from "@agent-native/core/server";
|
|
7
8
|
import type { H3Event } from "h3";
|
|
@@ -47,6 +48,13 @@ export async function resolveSlidesRequestAuthContext(
|
|
|
47
48
|
throw new SlidesSessionLookupError(err);
|
|
48
49
|
}
|
|
49
50
|
}
|
|
51
|
+
// A bearer token that verified but whose organization membership could not
|
|
52
|
+
// be checked is not an anonymous caller. Answer the retryable 503.
|
|
53
|
+
if (!session?.email && isCredentialMembershipUnavailable(event)) {
|
|
54
|
+
throw new SlidesSessionLookupError(
|
|
55
|
+
new Error("Organization membership could not be verified"),
|
|
56
|
+
);
|
|
57
|
+
}
|
|
50
58
|
|
|
51
59
|
let orgId: string | undefined;
|
|
52
60
|
if (session?.email && !mcpSession?.email) {
|
|
@@ -6,7 +6,8 @@ export default createAuthPlugin({
|
|
|
6
6
|
workspaceAppPublicPaths: ["/"],
|
|
7
7
|
marketing: {
|
|
8
8
|
appName: "Slides",
|
|
9
|
-
learnMoreUrl:
|
|
9
|
+
learnMoreUrl:
|
|
10
|
+
"https://agent-native.com/apps/slides?utm_source=app&utm_medium=product&utm_content=onboarding-learn-more",
|
|
10
11
|
tagline:
|
|
11
12
|
"Your AI agent builds, edits, and refines presentations alongside you.",
|
|
12
13
|
features: [
|
|
@@ -290,9 +290,16 @@ export default defineEventHandler(async (event) => {
|
|
|
290
290
|
|
|
291
291
|
## Data Scoping
|
|
292
292
|
|
|
293
|
-
In production, the framework automatically restricts all agent SQL queries to the current user's data using temporary views
|
|
293
|
+
In production, the framework automatically restricts all agent SQL queries to the current user's data using temporary views, and checks every statement before it runs so it can only reach those views.
|
|
294
294
|
|
|
295
|
-
The `db-query` / `db-exec` tools (and the extension SQL bridge, which shares the same path)
|
|
295
|
+
The `db-query` / `db-exec` / `db-patch` tools (and the extension SQL bridge, which shares the same path) read each statement the way Postgres does and refuse anything that could reach data around the temp views:
|
|
296
|
+
|
|
297
|
+
- schema- or database-qualified names like `public.<table>`, which resolve to the base table;
|
|
298
|
+
- names that resolve to anything other than the current user's temp views, such as materialized views or tables the scoping does not cover;
|
|
299
|
+
- app-defined SQL or PL/pgSQL functions and operators, whose bodies read tables without the views;
|
|
300
|
+
- built-ins that run SQL text, change session settings, or reach outside the database (`query_to_xml`, `set_config`, `dblink`, most `pg_*` functions).
|
|
301
|
+
|
|
302
|
+
`db-query` runs in a read-only transaction, and an `INSERT` must list its columns when the table has access-control columns. Use bare table names and plain expressions; scoping is applied automatically. When the agent needs data the views do not expose, add an app action with its own access checks.
|
|
296
303
|
|
|
297
304
|
### Per-User Scoping (`owner_email`)
|
|
298
305
|
|
|
@@ -75,10 +75,11 @@ state their PostgreSQL types directly.
|
|
|
75
75
|
|
|
76
76
|
Member offboarding and email changes refuse to run while any column named
|
|
77
77
|
`email`, `*_email`, `*scope_id`, `created_by`, `updated_by`, `invited_by`,
|
|
78
|
-
`owner`, `principal_id`, `session_id`, or `user_id` has no policy.
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
78
|
+
`owner`, `principal_id`, `session_id`, or `user_id` has no policy.
|
|
79
|
+
`createSharesTable()` tables are handled for you, and undeclared `owner_email`
|
|
80
|
+
columns transfer to the successor, which is right only for owned content.
|
|
81
|
+
Declare every other one, including columns that are not member identities, from
|
|
82
|
+
the app's database plugin graph (Clips does it in `server/db/index.ts`):
|
|
82
83
|
|
|
83
84
|
```ts
|
|
84
85
|
import { registerIdentityColumns } from "@agent-native/core/org";
|
|
@@ -88,13 +89,17 @@ registerIdentityColumns([
|
|
|
88
89
|
{ table: "space_members", column: "email", emailChange: "rekey", offboard: "delete", orgScope: { column: "space_id", references: { table: "spaces", column: "id", orgColumn: "org_id" } }, reason: "Space membership grants access." },
|
|
89
90
|
// Someone else's address: never rewritten.
|
|
90
91
|
{ table: "meeting_participants", column: "email", emailChange: "retain", offboard: "retain", reason: "Attendee address from the calendar provider." },
|
|
92
|
+
// A credential in an owner_email table: never handed to the successor.
|
|
93
|
+
{ table: "api_keys", column: "owner_email", emailChange: "rekey", offboard: "revoke", reason: "Bearer keys act as their owner." },
|
|
91
94
|
]);
|
|
92
95
|
```
|
|
93
96
|
|
|
94
|
-
Choose `delete` for grants, credentials, and pending tokens
|
|
97
|
+
Choose `delete` for grants, credentials, and pending tokens, or `revoke` (sets
|
|
98
|
+
`revoked_at`) when a reader treats a missing row as "not revoked"; `retain` for
|
|
95
99
|
attribution, history, and third-party addresses; `transfer` only for owned
|
|
96
|
-
data.
|
|
97
|
-
|
|
100
|
+
data. Declare `owner_email` tables that hold credentials or grants, or
|
|
101
|
+
offboarding hands them to the successor. A table without `org_id` needs
|
|
102
|
+
`orgScope` or an organization-scoped removal leaves its rows alone.
|
|
98
103
|
|
|
99
104
|
| Template | Tables |
|
|
100
105
|
| ------------ | --------------------------------------------- |
|
package/package.json
CHANGED