@agent-native/core 0.101.13 → 0.102.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/core/CHANGELOG.md +13 -0
- package/corpus/core/package.json +4 -2
- package/corpus/core/src/cli/create.ts +32 -10
- package/corpus/core/src/cli/templates-meta.ts +13 -0
- package/corpus/core/src/client/AgentPanel.tsx +61 -48
- package/corpus/core/src/client/chat/message-components.tsx +1 -0
- package/corpus/core/src/client/chat/tool-call-display.tsx +12 -2
- package/corpus/core/src/client/org/OrgSwitcher.tsx +2 -0
- package/corpus/templates/clips/app/components/player/share-dialog.tsx +1 -1
- package/corpus/templates/clips/app/i18n/ar-SA.ts +1 -0
- package/corpus/templates/clips/app/i18n/de-DE.ts +1 -0
- package/corpus/templates/clips/app/i18n/en-US.ts +1 -0
- package/corpus/templates/clips/app/i18n/es-ES.ts +1 -0
- package/corpus/templates/clips/app/i18n/fr-FR.ts +1 -0
- package/corpus/templates/clips/app/i18n/hi-IN.ts +1 -0
- package/corpus/templates/clips/app/i18n/ja-JP.ts +1 -0
- package/corpus/templates/clips/app/i18n/ko-KR.ts +1 -0
- package/corpus/templates/clips/app/i18n/pt-BR.ts +1 -0
- package/corpus/templates/clips/app/i18n/zh-CN.ts +1 -0
- package/corpus/templates/clips/app/i18n/zh-TW.ts +1 -0
- package/corpus/templates/clips/changelog/2026-07-15-public-clip-links-are-labeled-share-with-humans-for-clarity.md +6 -0
- package/corpus/templates/content/actions/_database-source-utils.ts +59 -4
- package/corpus/templates/content/actions/prepare-builder-source-review.ts +9 -0
- package/corpus/templates/content/actions/preview-builder-source-review.ts +6 -4
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +4 -0
- package/corpus/templates/content/changelog/2026-07-15-selected-builder-reviews-now-load-only-the-chosen-rows-avoid.md +6 -0
- package/corpus/templates/content/shared/api.ts +1 -0
- package/corpus/templates/forms/actions/delete-form.ts +4 -0
- package/corpus/templates/forms/actions/patch-form-fields.ts +3 -0
- package/corpus/templates/forms/actions/restore-form.ts +3 -0
- package/corpus/templates/forms/actions/update-form.ts +3 -0
- package/corpus/templates/forms/app/pages/FormBuilderPage.tsx +2 -2
- package/corpus/templates/forms/app/pages/ResponsesPage.tsx +2 -2
- package/corpus/templates/forms/changelog/2026-07-15-published-forms-now-reflect-field-updates-immediately-at-the.md +6 -0
- package/corpus/templates/forms/changelog/2026-07-15-response-rows-now-keep-every-column-aligned-to-the-top-for-c.md +6 -0
- package/corpus/templates/forms/server/handlers/forms.ts +1 -0
- package/corpus/templates/forms/server/lib/public-form-ssr.ts +47 -4
- package/corpus/templates/slides/app/components/editor/SlideEditor.tsx +189 -82
- package/corpus/templates/slides/app/pages/DeckEditor.tsx +1 -1
- package/corpus/templates/tasks/.agents/commands/visual-plan.md +9 -0
- package/corpus/templates/tasks/.agents/commands/visual-recap.md +8 -0
- package/corpus/templates/tasks/.agents/skills/actions/SKILL.md +492 -0
- package/corpus/templates/tasks/.agents/skills/adding-a-feature/SKILL.md +189 -0
- package/corpus/templates/tasks/.agents/skills/agent-native-docs/SKILL.md +76 -0
- package/corpus/templates/tasks/.agents/skills/agent-watchdog/README.md +43 -0
- package/corpus/templates/tasks/.agents/skills/agent-watchdog/SKILL.md +110 -0
- package/corpus/templates/tasks/.agents/skills/agent-watchdog/agents/openai.yaml +4 -0
- package/corpus/templates/tasks/.agents/skills/capture-learnings/SKILL.md +89 -0
- package/corpus/templates/tasks/.agents/skills/change-summary/SKILL.md +83 -0
- package/corpus/templates/tasks/.agents/skills/create-skill/SKILL.md +221 -0
- package/corpus/templates/tasks/.agents/skills/delegate-to-agent/SKILL.md +263 -0
- package/corpus/templates/tasks/.agents/skills/efficient-fable/README.md +75 -0
- package/corpus/templates/tasks/.agents/skills/efficient-fable/SKILL.md +95 -0
- package/corpus/templates/tasks/.agents/skills/efficient-frontier/README.md +53 -0
- package/corpus/templates/tasks/.agents/skills/efficient-frontier/SKILL.md +73 -0
- package/corpus/templates/tasks/.agents/skills/frontend-design/SKILL.md +112 -0
- package/corpus/templates/tasks/.agents/skills/plan-arbiter/README.md +41 -0
- package/corpus/templates/tasks/.agents/skills/plan-arbiter/SKILL.md +114 -0
- package/corpus/templates/tasks/.agents/skills/plan-arbiter/agents/openai.yaml +4 -0
- package/corpus/templates/tasks/.agents/skills/plow-ahead/README.md +42 -0
- package/corpus/templates/tasks/.agents/skills/plow-ahead/SKILL.md +104 -0
- package/corpus/templates/tasks/.agents/skills/plow-ahead/agents/openai.yaml +4 -0
- package/corpus/templates/tasks/.agents/skills/quick-recap/README.md +55 -0
- package/corpus/templates/tasks/.agents/skills/quick-recap/SKILL.md +54 -0
- package/corpus/templates/tasks/.agents/skills/read-the-damn-docs/README.md +54 -0
- package/corpus/templates/tasks/.agents/skills/read-the-damn-docs/SKILL.md +126 -0
- package/corpus/templates/tasks/.agents/skills/read-the-damn-docs/agents/openai.yaml +4 -0
- package/corpus/templates/tasks/.agents/skills/real-time-sync/SKILL.md +232 -0
- package/corpus/templates/tasks/.agents/skills/security/SKILL.md +280 -0
- package/corpus/templates/tasks/.agents/skills/self-modifying-code/SKILL.md +106 -0
- package/corpus/templates/tasks/.agents/skills/shadcn-ui/SKILL.md +95 -0
- package/corpus/templates/tasks/.agents/skills/stay-within-limits/README.md +61 -0
- package/corpus/templates/tasks/.agents/skills/stay-within-limits/SKILL.md +83 -0
- package/corpus/templates/tasks/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/tasks/.agents/skills/visual-plan/SKILL.md +547 -0
- package/corpus/templates/tasks/.agents/skills/visual-plan/agent-native-skill.json +12 -0
- package/corpus/templates/tasks/.agents/skills/visual-plan/references/canvas.md +121 -0
- package/corpus/templates/tasks/.agents/skills/visual-plan/references/document-quality.md +178 -0
- package/corpus/templates/tasks/.agents/skills/visual-plan/references/exemplar.md +62 -0
- package/corpus/templates/tasks/.agents/skills/visual-plan/references/wireframe.md +264 -0
- package/corpus/templates/tasks/.agents/skills/visual-recap/SKILL.md +634 -0
- package/corpus/templates/tasks/.agents/skills/visual-recap/agent-native-skill.json +12 -0
- package/corpus/templates/tasks/.agents/skills/visual-recap/references/wireframe.md +264 -0
- package/corpus/templates/tasks/.claude/commands/visual-plan.md +9 -0
- package/corpus/templates/tasks/.claude/commands/visual-recap.md +8 -0
- package/corpus/templates/tasks/.env.example +5 -0
- package/corpus/templates/tasks/.ignore +0 -0
- package/corpus/templates/tasks/.prettierrc +5 -0
- package/corpus/templates/tasks/AGENTS.md +158 -0
- package/corpus/templates/tasks/DEVELOPING.md +185 -0
- package/corpus/templates/tasks/README.md +16 -0
- package/corpus/templates/tasks/actions/bulk-delete-inbox-items.ts +24 -0
- package/corpus/templates/tasks/actions/bulk-delete-tasks.ts +21 -0
- package/corpus/templates/tasks/actions/bulk-mark-inbox-items-ready.ts +27 -0
- package/corpus/templates/tasks/actions/bulk-update-tasks.ts +35 -0
- package/corpus/templates/tasks/actions/create-custom-field.ts +22 -0
- package/corpus/templates/tasks/actions/create-inbox-item.ts +30 -0
- package/corpus/templates/tasks/actions/create-task.ts +33 -0
- package/corpus/templates/tasks/actions/delete-custom-field.ts +19 -0
- package/corpus/templates/tasks/actions/delete-inbox-item.ts +17 -0
- package/corpus/templates/tasks/actions/delete-task.ts +17 -0
- package/corpus/templates/tasks/actions/lib/boolean-query-param.ts +30 -0
- package/corpus/templates/tasks/actions/list-custom-fields.ts +18 -0
- package/corpus/templates/tasks/actions/list-inbox-items.ts +16 -0
- package/corpus/templates/tasks/actions/list-tasks.ts +52 -0
- package/corpus/templates/tasks/actions/list-visible-task-fields.ts +18 -0
- package/corpus/templates/tasks/actions/mark-inbox-item-ready.ts +31 -0
- package/corpus/templates/tasks/actions/navigate.ts +51 -0
- package/corpus/templates/tasks/actions/reorder-custom-fields.ts +27 -0
- package/corpus/templates/tasks/actions/reorder-inbox-items.ts +24 -0
- package/corpus/templates/tasks/actions/reorder-tasks.ts +29 -0
- package/corpus/templates/tasks/actions/run.ts +2 -0
- package/corpus/templates/tasks/actions/update-custom-field.ts +33 -0
- package/corpus/templates/tasks/actions/update-inbox-item.ts +24 -0
- package/corpus/templates/tasks/actions/update-task.ts +68 -0
- package/corpus/templates/tasks/actions/update-visible-task-fields.ts +27 -0
- package/corpus/templates/tasks/actions/view-screen-helpers.ts +68 -0
- package/corpus/templates/tasks/actions/view-screen.ts +207 -0
- package/corpus/templates/tasks/app/components/custom-fields/FieldCreateBar.tsx +121 -0
- package/corpus/templates/tasks/app/components/custom-fields/FieldListRow.tsx +116 -0
- package/corpus/templates/tasks/app/components/custom-fields/FieldsList.tsx +225 -0
- package/corpus/templates/tasks/app/components/custom-fields/FieldsListSkeleton.tsx +18 -0
- package/corpus/templates/tasks/app/components/custom-fields/FieldsPage.tsx +42 -0
- package/corpus/templates/tasks/app/components/custom-fields/editor/FieldEditorSidebar.tsx +69 -0
- package/corpus/templates/tasks/app/components/custom-fields/editor/FieldTitleSection.tsx +32 -0
- package/corpus/templates/tasks/app/components/custom-fields/editor/config/CurrencyConfigControl.tsx +49 -0
- package/corpus/templates/tasks/app/components/custom-fields/editor/config/FieldConfigControl.tsx +56 -0
- package/corpus/templates/tasks/app/components/custom-fields/editor/config/NumberConfigControl.tsx +52 -0
- package/corpus/templates/tasks/app/components/custom-fields/editor/config/PercentConfigControl.tsx +30 -0
- package/corpus/templates/tasks/app/components/custom-fields/editor/config/SelectConfigControl.tsx +135 -0
- package/corpus/templates/tasks/app/components/custom-fields/editor/config/select-colors.ts +23 -0
- package/corpus/templates/tasks/app/components/custom-fields/editor/config/utils.ts +52 -0
- package/corpus/templates/tasks/app/components/custom-fields/editor/types.ts +7 -0
- package/corpus/templates/tasks/app/components/dnd/SortableItem.tsx +72 -0
- package/corpus/templates/tasks/app/components/dnd/SortableList.tsx +136 -0
- package/corpus/templates/tasks/app/components/dnd/reorder-moving-items.ts +160 -0
- package/corpus/templates/tasks/app/components/dnd/sortable-drag-props.ts +60 -0
- package/corpus/templates/tasks/app/components/inbox/InboxList.tsx +222 -0
- package/corpus/templates/tasks/app/components/inbox/InboxListPage.tsx +39 -0
- package/corpus/templates/tasks/app/components/inbox/InboxListRow.tsx +122 -0
- package/corpus/templates/tasks/app/components/layout/Header.tsx +55 -0
- package/corpus/templates/tasks/app/components/layout/HeaderActions.tsx +84 -0
- package/corpus/templates/tasks/app/components/layout/Layout.tsx +134 -0
- package/corpus/templates/tasks/app/components/layout/Sidebar.tsx +211 -0
- package/corpus/templates/tasks/app/components/shared/AddListItemInput.tsx +57 -0
- package/corpus/templates/tasks/app/components/shared/AlertDialog.tsx +53 -0
- package/corpus/templates/tasks/app/components/shared/BulkDeleteDialog.tsx +76 -0
- package/corpus/templates/tasks/app/components/shared/ChipSelect.tsx +240 -0
- package/corpus/templates/tasks/app/components/shared/DeleteItemDialog.tsx +40 -0
- package/corpus/templates/tasks/app/components/shared/InlineEditable.tsx +166 -0
- package/corpus/templates/tasks/app/components/shared/ListEmptyState.tsx +13 -0
- package/corpus/templates/tasks/app/components/shared/ListErrorMessage.tsx +15 -0
- package/corpus/templates/tasks/app/components/shared/ListViewHeader.tsx +75 -0
- package/corpus/templates/tasks/app/components/shared/PageHeader.tsx +25 -0
- package/corpus/templates/tasks/app/components/shared/RowActionsMenu.tsx +42 -0
- package/corpus/templates/tasks/app/components/shared/SidePanel.tsx +99 -0
- package/corpus/templates/tasks/app/components/shared/dnd/ListRowPreview.tsx +37 -0
- package/corpus/templates/tasks/app/components/shared/list/List.tsx +63 -0
- package/corpus/templates/tasks/app/components/shared/list/ListRow.tsx +159 -0
- package/corpus/templates/tasks/app/components/shared/list/ListRowDragHandle.tsx +52 -0
- package/corpus/templates/tasks/app/components/shared/list/ListSkeletonRows.tsx +11 -0
- package/corpus/templates/tasks/app/components/shared/list/SortableListItemShell.tsx +32 -0
- package/corpus/templates/tasks/app/components/shared/list/types.ts +1 -0
- package/corpus/templates/tasks/app/components/shared/selection/ListSelectionBar.tsx +158 -0
- package/corpus/templates/tasks/app/components/shared/selection/ListSelectionHeaderToggle.tsx +28 -0
- package/corpus/templates/tasks/app/components/shared/selection/ListSelectionToolbar.tsx +81 -0
- package/corpus/templates/tasks/app/components/shared/selection/get-list-row-selection-ui.ts +41 -0
- package/corpus/templates/tasks/app/components/shared/selection/use-list-selection.ts +196 -0
- package/corpus/templates/tasks/app/components/tasks/TaskList.tsx +333 -0
- package/corpus/templates/tasks/app/components/tasks/TaskListHeaderRow.tsx +46 -0
- package/corpus/templates/tasks/app/components/tasks/TaskListPage.tsx +115 -0
- package/corpus/templates/tasks/app/components/tasks/TaskListRow.css +49 -0
- package/corpus/templates/tasks/app/components/tasks/TaskListRow.tsx +307 -0
- package/corpus/templates/tasks/app/components/tasks/fields/TaskFieldsSidebar.tsx +102 -0
- package/corpus/templates/tasks/app/components/tasks/fields/TaskTitleSection.tsx +27 -0
- package/corpus/templates/tasks/app/components/tasks/fields/controls/DateValueControl.tsx +21 -0
- package/corpus/templates/tasks/app/components/tasks/fields/controls/FieldValueControl.tsx +76 -0
- package/corpus/templates/tasks/app/components/tasks/fields/controls/MultiSelectValueControl.tsx +52 -0
- package/corpus/templates/tasks/app/components/tasks/fields/controls/NumberValueControl.tsx +56 -0
- package/corpus/templates/tasks/app/components/tasks/fields/controls/RichTextValueControl.tsx +115 -0
- package/corpus/templates/tasks/app/components/tasks/fields/controls/SingleSelectValueControl.tsx +61 -0
- package/corpus/templates/tasks/app/components/tasks/fields/controls/TextValueControl.tsx +20 -0
- package/corpus/templates/tasks/app/components/tasks/use-task-row-completion-animation.ts +181 -0
- package/corpus/templates/tasks/app/components/ui/accordion.tsx +56 -0
- package/corpus/templates/tasks/app/components/ui/alert-dialog.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/alert.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/aspect-ratio.tsx +5 -0
- package/corpus/templates/tasks/app/components/ui/avatar.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/badge.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/breadcrumb.tsx +115 -0
- package/corpus/templates/tasks/app/components/ui/button.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/calendar.tsx +70 -0
- package/corpus/templates/tasks/app/components/ui/card.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/carousel.tsx +260 -0
- package/corpus/templates/tasks/app/components/ui/chart.tsx +379 -0
- package/corpus/templates/tasks/app/components/ui/checkbox.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/collapsible.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/command.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/context-menu.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/dialog.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/drawer.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/dropdown-menu.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/form.tsx +177 -0
- package/corpus/templates/tasks/app/components/ui/hover-card.tsx +27 -0
- package/corpus/templates/tasks/app/components/ui/input-otp.tsx +69 -0
- package/corpus/templates/tasks/app/components/ui/input.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/label.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/menubar.tsx +254 -0
- package/corpus/templates/tasks/app/components/ui/navigation-menu.tsx +128 -0
- package/corpus/templates/tasks/app/components/ui/pagination.tsx +121 -0
- package/corpus/templates/tasks/app/components/ui/popover.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/progress.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/radio-group.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/resizable.tsx +43 -0
- package/corpus/templates/tasks/app/components/ui/scroll-area.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/select.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/separator.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/sheet.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/sidebar.tsx +782 -0
- package/corpus/templates/tasks/app/components/ui/skeleton.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/slider.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/sonner.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/spinner.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/switch.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/table.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/tabs.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/textarea.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/toast.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/toaster.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/toggle-group.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/toggle.tsx +43 -0
- package/corpus/templates/tasks/app/components/ui/tooltip.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/use-toast.ts +3 -0
- package/corpus/templates/tasks/app/entry.client.tsx +19 -0
- package/corpus/templates/tasks/app/entry.server.tsx +10 -0
- package/corpus/templates/tasks/app/global.css +93 -0
- package/corpus/templates/tasks/app/hooks/cache.ts +31 -0
- package/corpus/templates/tasks/app/hooks/use-custom-fields.ts +93 -0
- package/corpus/templates/tasks/app/hooks/use-inbox-items.ts +196 -0
- package/corpus/templates/tasks/app/hooks/use-mobile.tsx +21 -0
- package/corpus/templates/tasks/app/hooks/use-navigation-state.ts +40 -0
- package/corpus/templates/tasks/app/hooks/use-tasks.ts +276 -0
- package/corpus/templates/tasks/app/hooks/use-toast.ts +188 -0
- package/corpus/templates/tasks/app/hooks/use-visible-task-fields.ts +140 -0
- package/corpus/templates/tasks/app/lib/app-config.ts +11 -0
- package/corpus/templates/tasks/app/lib/tab-id.ts +1 -0
- package/corpus/templates/tasks/app/lib/utils.ts +1 -0
- package/corpus/templates/tasks/app/root.tsx +130 -0
- package/corpus/templates/tasks/app/routes/_index.tsx +22 -0
- package/corpus/templates/tasks/app/routes/extensions.$id.$slug.tsx +2 -0
- package/corpus/templates/tasks/app/routes/extensions.$id.tsx +11 -0
- package/corpus/templates/tasks/app/routes/extensions._index.tsx +11 -0
- package/corpus/templates/tasks/app/routes/extensions.tsx +5 -0
- package/corpus/templates/tasks/app/routes/fields.tsx +16 -0
- package/corpus/templates/tasks/app/routes/inbox.tsx +16 -0
- package/corpus/templates/tasks/app/routes/tasks.tsx +17 -0
- package/corpus/templates/tasks/app/routes/team.tsx +17 -0
- package/corpus/templates/tasks/app/routes.ts +4 -0
- package/corpus/templates/tasks/app/vite-env.d.ts +6 -0
- package/corpus/templates/tasks/components.json +20 -0
- package/corpus/templates/tasks/data/sync-config.json +1 -0
- package/corpus/templates/tasks/docs/features/README.md +81 -0
- package/corpus/templates/tasks/docs/features/f1-tasks.mdx +67 -0
- package/corpus/templates/tasks/docs/features/f2-custom-fields.mdx +68 -0
- package/corpus/templates/tasks/docs/features/f3-projects.mdx +33 -0
- package/corpus/templates/tasks/docs/features/f4-inbox.mdx +55 -0
- package/corpus/templates/tasks/docs/features/f5-views.mdx +65 -0
- package/corpus/templates/tasks/docs/features/f6-search.mdx +43 -0
- package/corpus/templates/tasks/docs/features/f7-first-run.mdx +66 -0
- package/corpus/templates/tasks/docs/features/f8-chat.mdx +120 -0
- package/corpus/templates/tasks/e2e/global-setup.ts +42 -0
- package/corpus/templates/tasks/e2e/helpers/inbox.ts +71 -0
- package/corpus/templates/tasks/e2e/helpers/tasks.ts +99 -0
- package/corpus/templates/tasks/learnings.defaults.md +5 -0
- package/corpus/templates/tasks/netlify.toml +10 -0
- package/corpus/templates/tasks/package.json +104 -0
- package/corpus/templates/tasks/playwright.config.ts +34 -0
- package/corpus/templates/tasks/public/agent-native-icon-dark.svg +10 -0
- package/corpus/templates/tasks/public/agent-native-icon-light.svg +10 -0
- package/corpus/templates/tasks/public/agent-native-logo-dark.svg +21 -0
- package/corpus/templates/tasks/public/agent-native-logo-light.svg +21 -0
- package/corpus/templates/tasks/public/favicon.svg +1 -0
- package/corpus/templates/tasks/public/icon-180.svg +1 -0
- package/corpus/templates/tasks/public/icon-192.svg +1 -0
- package/corpus/templates/tasks/public/icon-512.svg +1 -0
- package/corpus/templates/tasks/public/manifest.json +21 -0
- package/corpus/templates/tasks/react-router.config.ts +7 -0
- package/corpus/templates/tasks/server/custom-fields/normalize.ts +163 -0
- package/corpus/templates/tasks/server/custom-fields/parse.ts +146 -0
- package/corpus/templates/tasks/server/custom-fields/schema.ts +147 -0
- package/corpus/templates/tasks/server/custom-fields/store.ts +425 -0
- package/corpus/templates/tasks/server/custom-fields/task-fields.ts +104 -0
- package/corpus/templates/tasks/server/custom-fields/types.ts +98 -0
- package/corpus/templates/tasks/server/custom-fields/validate.ts +210 -0
- package/corpus/templates/tasks/server/custom-fields/values/store.ts +386 -0
- package/corpus/templates/tasks/server/db/bulk-write.ts +30 -0
- package/corpus/templates/tasks/server/db/index.ts +5 -0
- package/corpus/templates/tasks/server/db/record-utils.ts +7 -0
- package/corpus/templates/tasks/server/db/schema.ts +67 -0
- package/corpus/templates/tasks/server/db/test-tasks-table.ts +76 -0
- package/corpus/templates/tasks/server/db/transaction.ts +6 -0
- package/corpus/templates/tasks/server/errors.ts +31 -0
- package/corpus/templates/tasks/server/inbox/store.ts +216 -0
- package/corpus/templates/tasks/server/middleware/auth.ts +15 -0
- package/corpus/templates/tasks/server/plugins/agent-chat.ts +46 -0
- package/corpus/templates/tasks/server/plugins/auth.ts +15 -0
- package/corpus/templates/tasks/server/plugins/db.ts +90 -0
- package/corpus/templates/tasks/server/routes/[...page].get.ts +5 -0
- package/corpus/templates/tasks/server/stored-items/store.ts +548 -0
- package/corpus/templates/tasks/server/tasks/store.ts +306 -0
- package/corpus/templates/tasks/server/user-config/store.ts +138 -0
- package/corpus/templates/tasks/shared/app-state-tabs.ts +15 -0
- package/corpus/templates/tasks/shared/boolean-param.ts +22 -0
- package/corpus/templates/tasks/shared/bulk-limits.ts +7 -0
- package/corpus/templates/tasks/shared/list-screen-snapshot.ts +90 -0
- package/corpus/templates/tasks/shared/navigation.ts +104 -0
- package/corpus/templates/tasks/shared/visible-task-fields.ts +2 -0
- package/corpus/templates/tasks/ssr-entry.ts +15 -0
- package/corpus/templates/tasks/tsconfig.json +24 -0
- package/corpus/templates/tasks/vite.config.ts +19 -0
- package/corpus/templates/tasks/vitest.config.ts +8 -0
- package/dist/cli/create.d.ts +5 -2
- package/dist/cli/create.d.ts.map +1 -1
- package/dist/cli/create.js +22 -11
- package/dist/cli/create.js.map +1 -1
- package/dist/cli/templates-meta.d.ts.map +1 -1
- package/dist/cli/templates-meta.js +13 -0
- package/dist/cli/templates-meta.js.map +1 -1
- package/dist/client/AgentPanel.d.ts +2 -0
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +24 -13
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/chat/message-components.d.ts.map +1 -1
- package/dist/client/chat/message-components.js +1 -1
- package/dist/client/chat/message-components.js.map +1 -1
- package/dist/client/chat/tool-call-display.d.ts +3 -1
- package/dist/client/chat/tool-call-display.d.ts.map +1 -1
- package/dist/client/chat/tool-call-display.js +6 -5
- package/dist/client/chat/tool-call-display.js.map +1 -1
- package/dist/client/org/OrgSwitcher.d.ts.map +1 -1
- package/dist/client/org/OrgSwitcher.js +2 -1
- package/dist/client/org/OrgSwitcher.js.map +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/templates/chat/.agents/skills/actions/SKILL.md +492 -0
- package/dist/templates/chat/.agents/skills/adding-a-feature/SKILL.md +189 -0
- package/dist/templates/chat/.agents/skills/agent-native-docs/SKILL.md +76 -0
- package/dist/templates/chat/.agents/skills/capture-learnings/SKILL.md +89 -0
- package/dist/templates/chat/.agents/skills/create-skill/SKILL.md +221 -0
- package/dist/templates/chat/.agents/skills/delegate-to-agent/SKILL.md +263 -0
- package/dist/templates/chat/.agents/skills/frontend-design/SKILL.md +112 -0
- package/dist/templates/chat/.agents/skills/real-time-sync/SKILL.md +232 -0
- package/dist/templates/chat/.agents/skills/security/SKILL.md +280 -0
- package/dist/templates/chat/.agents/skills/self-modifying-code/SKILL.md +106 -0
- package/dist/templates/chat/.agents/skills/shadcn-ui/SKILL.md +95 -0
- package/dist/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/dist/templates/chat/.env.example +5 -0
- package/dist/templates/chat/.ignore +0 -0
- package/dist/templates/chat/.oxfmtrc.json +8 -0
- package/dist/templates/chat/.react-router/types/+server-build.d.ts +18 -0
- package/dist/templates/chat/.react-router/types/app/+types/root.ts +68 -0
- package/dist/templates/chat/AGENTS.md +62 -0
- package/dist/templates/chat/CHANGELOG.md +10 -0
- package/dist/templates/chat/DEVELOPING.md +185 -0
- package/dist/templates/chat/README.md +32 -0
- package/dist/templates/chat/_gitignore +43 -0
- package/dist/templates/chat/actions/hello.ts +13 -0
- package/dist/templates/chat/actions/navigate.ts +41 -0
- package/dist/templates/chat/actions/run.ts +2 -0
- package/dist/templates/chat/actions/view-screen.ts +31 -0
- package/dist/templates/chat/app/components/layout/Header.tsx +59 -0
- package/dist/templates/chat/app/components/layout/Layout.tsx +184 -0
- package/dist/templates/chat/app/components/layout/Sidebar.tsx +580 -0
- package/dist/templates/chat/app/components/ui/button.tsx +1 -0
- package/dist/templates/chat/app/components/ui/card.tsx +1 -0
- package/dist/templates/chat/app/components/ui/dropdown-menu.tsx +1 -0
- package/dist/templates/chat/app/components/ui/input.tsx +1 -0
- package/dist/templates/chat/app/components/ui/label.tsx +1 -0
- package/dist/templates/chat/app/components/ui/sheet.tsx +1 -0
- package/dist/templates/chat/app/components/ui/toolkit-provider.tsx +12 -0
- package/dist/templates/chat/app/components/ui/tooltip.tsx +1 -0
- package/dist/templates/chat/app/entry.client.tsx +19 -0
- package/dist/templates/chat/app/entry.server.tsx +10 -0
- package/dist/templates/chat/app/global.css +93 -0
- package/dist/templates/chat/app/hooks/use-navigation-state.ts +111 -0
- package/dist/templates/chat/app/i18n/ar-SA.ts +68 -0
- package/dist/templates/chat/app/i18n/de-DE.ts +71 -0
- package/dist/templates/chat/app/i18n/en-US.ts +70 -0
- package/dist/templates/chat/app/i18n/es-ES.ts +71 -0
- package/dist/templates/chat/app/i18n/fr-FR.ts +71 -0
- package/dist/templates/chat/app/i18n/hi-IN.ts +69 -0
- package/dist/templates/chat/app/i18n/index.ts +34 -0
- package/dist/templates/chat/app/i18n/ja-JP.ts +70 -0
- package/dist/templates/chat/app/i18n/ko-KR.ts +70 -0
- package/dist/templates/chat/app/i18n/pt-BR.ts +71 -0
- package/dist/templates/chat/app/i18n/zh-CN.ts +67 -0
- package/dist/templates/chat/app/i18n/zh-TW.ts +67 -0
- package/dist/templates/chat/app/i18n-data.ts +556 -0
- package/dist/templates/chat/app/lib/agent-page.tsx +40 -0
- package/dist/templates/chat/app/lib/app-config.ts +11 -0
- package/dist/templates/chat/app/lib/tab-id.ts +1 -0
- package/dist/templates/chat/app/lib/utils.ts +1 -0
- package/dist/templates/chat/app/root.tsx +172 -0
- package/dist/templates/chat/app/routes/_index.tsx +91 -0
- package/dist/templates/chat/app/routes/agent.tsx +17 -0
- package/dist/templates/chat/app/routes/chat.$threadId.tsx +1 -0
- package/dist/templates/chat/app/routes/database.tsx +17 -0
- package/dist/templates/chat/app/routes/extensions.$id.$slug.tsx +2 -0
- package/dist/templates/chat/app/routes/extensions.$id.tsx +11 -0
- package/dist/templates/chat/app/routes/extensions._index.tsx +11 -0
- package/dist/templates/chat/app/routes/extensions.tsx +5 -0
- package/dist/templates/chat/app/routes/observability.tsx +18 -0
- package/dist/templates/chat/app/routes/settings.tsx +88 -0
- package/dist/templates/chat/app/routes/team.tsx +11 -0
- package/dist/templates/chat/app/routes.ts +4 -0
- package/dist/templates/chat/app/vite-env.d.ts +6 -0
- package/dist/templates/chat/changelog/2026-06-24-a-new-settings-page-gives-quick-access-to-language-workspace.md +6 -0
- package/dist/templates/chat/changelog/2026-06-24-added-a-language-picker-and-localized-app-chrome-for-support.md +6 -0
- package/dist/templates/chat/changelog/2026-06-27-traditional-chinese-copy-uses-taiwan-terminology.md +6 -0
- package/dist/templates/chat/changelog/2026-06-28-left-sidebar-collapse-motion-and-footer-chrome-are-quieter.md +6 -0
- package/dist/templates/chat/changelog/2026-06-29-chat-layouts-adapt-when-the-agent-sidebar-is-open.md +6 -0
- package/dist/templates/chat/changelog/2026-07-08-settings-are-cleaner-and-searchable.md +5 -0
- package/dist/templates/chat/changelog/2026-07-10-chat-now-makes-ai-connection-setup-clear-without-shifting-th.md +6 -0
- package/dist/templates/chat/changelog/2026-07-13-a-full-agent-page-now-brings-context-files-connections-jobs-.md +6 -0
- package/dist/templates/chat/changelog/2026-07-14-chat-opens-reliably-on-hosted-deployments-instead-of-failing.md +6 -0
- package/dist/templates/chat/changelog/2026-07-14-fixed-chat-template-startup-with-older-core-versions.md +6 -0
- package/dist/templates/chat/changelog/2026-07-15-chat-navigation-focuses-on-chat-and-agent.md +6 -0
- package/dist/templates/chat/components.json +20 -0
- package/dist/templates/chat/data/.gitkeep +0 -0
- package/dist/templates/chat/data/sync-config.json +1 -0
- package/dist/templates/chat/learnings.defaults.md +5 -0
- package/dist/templates/chat/netlify.toml +10 -0
- package/dist/templates/chat/package.json +92 -0
- package/dist/templates/chat/public/agent-native-icon-dark.svg +10 -0
- package/dist/templates/chat/public/agent-native-icon-light.svg +10 -0
- package/dist/templates/chat/public/agent-native-logo-dark.svg +21 -0
- package/dist/templates/chat/public/agent-native-logo-light.svg +21 -0
- package/dist/templates/chat/public/favicon.svg +1 -0
- package/dist/templates/chat/public/icon-180.svg +1 -0
- package/dist/templates/chat/public/icon-192.svg +1 -0
- package/dist/templates/chat/public/icon-512.svg +1 -0
- package/dist/templates/chat/public/manifest.json +21 -0
- package/dist/templates/chat/react-router.config.ts +7 -0
- package/dist/templates/chat/server/middleware/auth.ts +15 -0
- package/dist/templates/chat/server/plugins/agent-chat.ts +21 -0
- package/dist/templates/chat/server/plugins/auth.ts +17 -0
- package/dist/templates/chat/server/routes/[...page].get.ts +5 -0
- package/dist/templates/chat/ssr-entry.ts +15 -0
- package/dist/templates/chat/tsconfig.json +21 -0
- package/dist/templates/chat/vite.config.ts +19 -0
- package/package.json +2 -1
- package/src/templates/chat/.agents/skills/actions/SKILL.md +492 -0
- package/src/templates/chat/.agents/skills/adding-a-feature/SKILL.md +189 -0
- package/src/templates/chat/.agents/skills/agent-native-docs/SKILL.md +76 -0
- package/src/templates/chat/.agents/skills/capture-learnings/SKILL.md +89 -0
- package/src/templates/chat/.agents/skills/create-skill/SKILL.md +221 -0
- package/src/templates/chat/.agents/skills/delegate-to-agent/SKILL.md +263 -0
- package/src/templates/chat/.agents/skills/frontend-design/SKILL.md +112 -0
- package/src/templates/chat/.agents/skills/real-time-sync/SKILL.md +232 -0
- package/src/templates/chat/.agents/skills/security/SKILL.md +280 -0
- package/src/templates/chat/.agents/skills/self-modifying-code/SKILL.md +106 -0
- package/src/templates/chat/.agents/skills/shadcn-ui/SKILL.md +95 -0
- package/src/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/src/templates/chat/.env.example +5 -0
- package/src/templates/chat/.ignore +0 -0
- package/src/templates/chat/.oxfmtrc.json +8 -0
- package/src/templates/chat/.react-router/types/+server-build.d.ts +18 -0
- package/src/templates/chat/.react-router/types/app/+types/root.ts +68 -0
- package/src/templates/chat/AGENTS.md +62 -0
- package/src/templates/chat/CHANGELOG.md +10 -0
- package/src/templates/chat/DEVELOPING.md +185 -0
- package/src/templates/chat/README.md +32 -0
- package/src/templates/chat/_gitignore +43 -0
- package/src/templates/chat/actions/hello.spec.ts +23 -0
- package/src/templates/chat/actions/hello.ts +13 -0
- package/src/templates/chat/actions/navigate.spec.ts +68 -0
- package/src/templates/chat/actions/navigate.ts +41 -0
- package/src/templates/chat/actions/run.ts +2 -0
- package/src/templates/chat/actions/view-screen.spec.ts +40 -0
- package/src/templates/chat/actions/view-screen.ts +31 -0
- package/src/templates/chat/app/components/layout/Header.tsx +59 -0
- package/src/templates/chat/app/components/layout/Layout.tsx +184 -0
- package/src/templates/chat/app/components/layout/Sidebar.tsx +580 -0
- package/src/templates/chat/app/components/ui/button.tsx +1 -0
- package/src/templates/chat/app/components/ui/card.tsx +1 -0
- package/src/templates/chat/app/components/ui/dropdown-menu.tsx +1 -0
- package/src/templates/chat/app/components/ui/input.tsx +1 -0
- package/src/templates/chat/app/components/ui/label.tsx +1 -0
- package/src/templates/chat/app/components/ui/sheet.tsx +1 -0
- package/src/templates/chat/app/components/ui/toolkit-provider.tsx +12 -0
- package/src/templates/chat/app/components/ui/tooltip.tsx +1 -0
- package/src/templates/chat/app/entry.client.tsx +19 -0
- package/src/templates/chat/app/entry.server.tsx +10 -0
- package/src/templates/chat/app/global.css +93 -0
- package/src/templates/chat/app/hooks/use-navigation-state.ts +111 -0
- package/src/templates/chat/app/i18n/ar-SA.ts +68 -0
- package/src/templates/chat/app/i18n/de-DE.ts +71 -0
- package/src/templates/chat/app/i18n/en-US.ts +70 -0
- package/src/templates/chat/app/i18n/es-ES.ts +71 -0
- package/src/templates/chat/app/i18n/fr-FR.ts +71 -0
- package/src/templates/chat/app/i18n/hi-IN.ts +69 -0
- package/src/templates/chat/app/i18n/index.ts +34 -0
- package/src/templates/chat/app/i18n/ja-JP.ts +70 -0
- package/src/templates/chat/app/i18n/ko-KR.ts +70 -0
- package/src/templates/chat/app/i18n/pt-BR.ts +71 -0
- package/src/templates/chat/app/i18n/zh-CN.ts +67 -0
- package/src/templates/chat/app/i18n/zh-TW.ts +67 -0
- package/src/templates/chat/app/i18n-data.ts +556 -0
- package/src/templates/chat/app/lib/agent-page.spec.tsx +52 -0
- package/src/templates/chat/app/lib/agent-page.tsx +40 -0
- package/src/templates/chat/app/lib/app-config.ts +11 -0
- package/src/templates/chat/app/lib/tab-id.ts +1 -0
- package/src/templates/chat/app/lib/utils.ts +1 -0
- package/src/templates/chat/app/root.tsx +172 -0
- package/src/templates/chat/app/routes/_index.tsx +91 -0
- package/src/templates/chat/app/routes/agent.tsx +17 -0
- package/src/templates/chat/app/routes/chat.$threadId.tsx +1 -0
- package/src/templates/chat/app/routes/database.tsx +17 -0
- package/src/templates/chat/app/routes/extensions.$id.$slug.tsx +2 -0
- package/src/templates/chat/app/routes/extensions.$id.tsx +11 -0
- package/src/templates/chat/app/routes/extensions._index.tsx +11 -0
- package/src/templates/chat/app/routes/extensions.tsx +5 -0
- package/src/templates/chat/app/routes/observability.tsx +18 -0
- package/src/templates/chat/app/routes/settings.tsx +88 -0
- package/src/templates/chat/app/routes/team.tsx +11 -0
- package/src/templates/chat/app/routes.ts +4 -0
- package/src/templates/chat/app/vite-env.d.ts +6 -0
- package/src/templates/chat/changelog/2026-06-24-a-new-settings-page-gives-quick-access-to-language-workspace.md +6 -0
- package/src/templates/chat/changelog/2026-06-24-added-a-language-picker-and-localized-app-chrome-for-support.md +6 -0
- package/src/templates/chat/changelog/2026-06-27-traditional-chinese-copy-uses-taiwan-terminology.md +6 -0
- package/src/templates/chat/changelog/2026-06-28-left-sidebar-collapse-motion-and-footer-chrome-are-quieter.md +6 -0
- package/src/templates/chat/changelog/2026-06-29-chat-layouts-adapt-when-the-agent-sidebar-is-open.md +6 -0
- package/src/templates/chat/changelog/2026-07-08-settings-are-cleaner-and-searchable.md +5 -0
- package/src/templates/chat/changelog/2026-07-10-chat-now-makes-ai-connection-setup-clear-without-shifting-th.md +6 -0
- package/src/templates/chat/changelog/2026-07-13-a-full-agent-page-now-brings-context-files-connections-jobs-.md +6 -0
- package/src/templates/chat/changelog/2026-07-14-chat-opens-reliably-on-hosted-deployments-instead-of-failing.md +6 -0
- package/src/templates/chat/changelog/2026-07-14-fixed-chat-template-startup-with-older-core-versions.md +6 -0
- package/src/templates/chat/changelog/2026-07-15-chat-navigation-focuses-on-chat-and-agent.md +6 -0
- package/src/templates/chat/components.json +20 -0
- package/src/templates/chat/data/.gitkeep +0 -0
- package/src/templates/chat/data/sync-config.json +1 -0
- package/src/templates/chat/learnings.defaults.md +5 -0
- package/src/templates/chat/netlify.toml +10 -0
- package/src/templates/chat/package.json +92 -0
- package/src/templates/chat/public/agent-native-icon-dark.svg +10 -0
- package/src/templates/chat/public/agent-native-icon-light.svg +10 -0
- package/src/templates/chat/public/agent-native-logo-dark.svg +21 -0
- package/src/templates/chat/public/agent-native-logo-light.svg +21 -0
- package/src/templates/chat/public/favicon.svg +1 -0
- package/src/templates/chat/public/icon-180.svg +1 -0
- package/src/templates/chat/public/icon-192.svg +1 -0
- package/src/templates/chat/public/icon-512.svg +1 -0
- package/src/templates/chat/public/manifest.json +21 -0
- package/src/templates/chat/react-router.config.ts +7 -0
- package/src/templates/chat/server/middleware/auth.ts +15 -0
- package/src/templates/chat/server/plugins/agent-chat.ts +21 -0
- package/src/templates/chat/server/plugins/auth.ts +17 -0
- package/src/templates/chat/server/routes/[...page].get.ts +5 -0
- package/src/templates/chat/ssr-entry.ts +15 -0
- package/src/templates/chat/tsconfig.json +21 -0
- package/src/templates/chat/vite.config.ts +19 -0
|
@@ -3017,6 +3017,7 @@ export async function getContentDatabaseSourceSnapshotById(
|
|
|
3017
3017
|
export async function getContentDatabaseSourceSnapshotForWrite(
|
|
3018
3018
|
database: ContentDatabaseRow | ContentDatabase,
|
|
3019
3019
|
sourceId?: string | null,
|
|
3020
|
+
documentIds?: string[],
|
|
3020
3021
|
): Promise<ContentDatabaseSource | null> {
|
|
3021
3022
|
const db = getDb();
|
|
3022
3023
|
if (sourceId) {
|
|
@@ -3032,6 +3033,7 @@ export async function getContentDatabaseSourceSnapshotForWrite(
|
|
|
3032
3033
|
return source
|
|
3033
3034
|
? loadSourceSnapshot(source, database, {
|
|
3034
3035
|
includeHeavyBuilderBodyValues: true,
|
|
3036
|
+
documentIds,
|
|
3035
3037
|
})
|
|
3036
3038
|
: null;
|
|
3037
3039
|
}
|
|
@@ -3046,6 +3048,7 @@ export async function getContentDatabaseSourceSnapshotForWrite(
|
|
|
3046
3048
|
return source
|
|
3047
3049
|
? loadSourceSnapshot(source, database, {
|
|
3048
3050
|
includeHeavyBuilderBodyValues: true,
|
|
3051
|
+
documentIds,
|
|
3049
3052
|
})
|
|
3050
3053
|
: null;
|
|
3051
3054
|
}
|
|
@@ -3086,8 +3089,12 @@ async function readSourceSnapshotRowsOnce(args: {
|
|
|
3086
3089
|
database: ContentDatabaseRow | ContentDatabase;
|
|
3087
3090
|
isBuilderSource: boolean;
|
|
3088
3091
|
includeHeavyBuilderBodyValues: boolean;
|
|
3092
|
+
documentIds?: string[];
|
|
3089
3093
|
}) {
|
|
3090
3094
|
const db = getDb();
|
|
3095
|
+
const documentScope = args.documentIds?.length
|
|
3096
|
+
? new Set(args.documentIds)
|
|
3097
|
+
: null;
|
|
3091
3098
|
const rowRows = await db
|
|
3092
3099
|
.select(
|
|
3093
3100
|
sourceSnapshotRowSelection({
|
|
@@ -3096,7 +3103,16 @@ async function readSourceSnapshotRowsOnce(args: {
|
|
|
3096
3103
|
}),
|
|
3097
3104
|
)
|
|
3098
3105
|
.from(schema.contentDatabaseSourceRows)
|
|
3099
|
-
.where(
|
|
3106
|
+
.where(
|
|
3107
|
+
documentScope
|
|
3108
|
+
? and(
|
|
3109
|
+
eq(schema.contentDatabaseSourceRows.sourceId, args.source.id),
|
|
3110
|
+
inArray(schema.contentDatabaseSourceRows.documentId, [
|
|
3111
|
+
...documentScope,
|
|
3112
|
+
]),
|
|
3113
|
+
)
|
|
3114
|
+
: eq(schema.contentDatabaseSourceRows.sourceId, args.source.id),
|
|
3115
|
+
)
|
|
3100
3116
|
.orderBy(asc(schema.contentDatabaseSourceRows.createdAt));
|
|
3101
3117
|
// For Builder sources, load ALL database items (not just synced source rows)
|
|
3102
3118
|
// so brand-new local rows (no source link) can become create_draft change-sets.
|
|
@@ -3112,6 +3128,13 @@ async function readSourceSnapshotRowsOnce(args: {
|
|
|
3112
3128
|
and(
|
|
3113
3129
|
eq(schema.contentDatabaseItems.databaseId, args.database.id),
|
|
3114
3130
|
eq(schema.contentDatabaseItems.ownerEmail, args.source.ownerEmail),
|
|
3131
|
+
...(documentScope
|
|
3132
|
+
? [
|
|
3133
|
+
inArray(schema.contentDatabaseItems.documentId, [
|
|
3134
|
+
...documentScope,
|
|
3135
|
+
]),
|
|
3136
|
+
]
|
|
3137
|
+
: []),
|
|
3115
3138
|
),
|
|
3116
3139
|
)
|
|
3117
3140
|
: [];
|
|
@@ -3180,8 +3203,12 @@ async function sourceSnapshotConsistencyMarker(args: {
|
|
|
3180
3203
|
database: ContentDatabaseRow | ContentDatabase;
|
|
3181
3204
|
isBuilderSource: boolean;
|
|
3182
3205
|
includeHeavyBuilderBodyValues: boolean;
|
|
3206
|
+
documentIds?: string[];
|
|
3183
3207
|
}) {
|
|
3184
3208
|
const db = getDb();
|
|
3209
|
+
const documentScope = args.documentIds?.length
|
|
3210
|
+
? new Set(args.documentIds)
|
|
3211
|
+
: null;
|
|
3185
3212
|
const [rows] = await db
|
|
3186
3213
|
.select({
|
|
3187
3214
|
count: sql<number>`COUNT(*)`,
|
|
@@ -3190,7 +3217,16 @@ async function sourceSnapshotConsistencyMarker(args: {
|
|
|
3190
3217
|
>`MAX(${schema.contentDatabaseSourceRows.updatedAt})`,
|
|
3191
3218
|
})
|
|
3192
3219
|
.from(schema.contentDatabaseSourceRows)
|
|
3193
|
-
.where(
|
|
3220
|
+
.where(
|
|
3221
|
+
documentScope
|
|
3222
|
+
? and(
|
|
3223
|
+
eq(schema.contentDatabaseSourceRows.sourceId, args.source.id),
|
|
3224
|
+
inArray(schema.contentDatabaseSourceRows.documentId, [
|
|
3225
|
+
...documentScope,
|
|
3226
|
+
]),
|
|
3227
|
+
)
|
|
3228
|
+
: eq(schema.contentDatabaseSourceRows.sourceId, args.source.id),
|
|
3229
|
+
);
|
|
3194
3230
|
const [items] = args.isBuilderSource
|
|
3195
3231
|
? await db
|
|
3196
3232
|
.select({
|
|
@@ -3204,6 +3240,13 @@ async function sourceSnapshotConsistencyMarker(args: {
|
|
|
3204
3240
|
and(
|
|
3205
3241
|
eq(schema.contentDatabaseItems.databaseId, args.database.id),
|
|
3206
3242
|
eq(schema.contentDatabaseItems.ownerEmail, args.source.ownerEmail),
|
|
3243
|
+
...(documentScope
|
|
3244
|
+
? [
|
|
3245
|
+
inArray(schema.contentDatabaseItems.documentId, [
|
|
3246
|
+
...documentScope,
|
|
3247
|
+
]),
|
|
3248
|
+
]
|
|
3249
|
+
: []),
|
|
3207
3250
|
),
|
|
3208
3251
|
)
|
|
3209
3252
|
: [{ count: 0, maxUpdatedAt: null }];
|
|
@@ -3232,6 +3275,7 @@ async function loadSourceSnapshotRowsOptimistically(args: {
|
|
|
3232
3275
|
database: ContentDatabaseRow | ContentDatabase;
|
|
3233
3276
|
isBuilderSource: boolean;
|
|
3234
3277
|
includeHeavyBuilderBodyValues: boolean;
|
|
3278
|
+
documentIds?: string[];
|
|
3235
3279
|
}) {
|
|
3236
3280
|
let latest: Awaited<ReturnType<typeof readSourceSnapshotRowsOnce>> | null =
|
|
3237
3281
|
null;
|
|
@@ -3247,7 +3291,7 @@ async function loadSourceSnapshotRowsOptimistically(args: {
|
|
|
3247
3291
|
async function loadSourceSnapshot(
|
|
3248
3292
|
source: ContentDatabaseSourceRowDb,
|
|
3249
3293
|
database: ContentDatabaseRow | ContentDatabase,
|
|
3250
|
-
options: { includeHeavyBuilderBodyValues: boolean },
|
|
3294
|
+
options: { includeHeavyBuilderBodyValues: boolean; documentIds?: string[] },
|
|
3251
3295
|
): Promise<ContentDatabaseSource> {
|
|
3252
3296
|
const db = getDb();
|
|
3253
3297
|
const [fieldRows, changeRows, reviewRows, executionRows, propertyDefs] =
|
|
@@ -3260,7 +3304,17 @@ async function loadSourceSnapshot(
|
|
|
3260
3304
|
db
|
|
3261
3305
|
.select()
|
|
3262
3306
|
.from(schema.contentDatabaseSourceChangeSets)
|
|
3263
|
-
.where(
|
|
3307
|
+
.where(
|
|
3308
|
+
options.documentIds?.length
|
|
3309
|
+
? and(
|
|
3310
|
+
eq(schema.contentDatabaseSourceChangeSets.sourceId, source.id),
|
|
3311
|
+
inArray(
|
|
3312
|
+
schema.contentDatabaseSourceChangeSets.documentId,
|
|
3313
|
+
options.documentIds,
|
|
3314
|
+
),
|
|
3315
|
+
)
|
|
3316
|
+
: eq(schema.contentDatabaseSourceChangeSets.sourceId, source.id),
|
|
3317
|
+
)
|
|
3264
3318
|
.orderBy(asc(schema.contentDatabaseSourceChangeSets.createdAt)),
|
|
3265
3319
|
db
|
|
3266
3320
|
.select()
|
|
@@ -3341,6 +3395,7 @@ async function loadSourceSnapshot(
|
|
|
3341
3395
|
database,
|
|
3342
3396
|
isBuilderSource,
|
|
3343
3397
|
includeHeavyBuilderBodyValues: options.includeHeavyBuilderBodyValues,
|
|
3398
|
+
documentIds: options.documentIds,
|
|
3344
3399
|
});
|
|
3345
3400
|
const rows = rowRows.map((row) =>
|
|
3346
3401
|
serializeSourceRowRecord(row, {
|
|
@@ -618,6 +618,13 @@ export default defineAction({
|
|
|
618
618
|
.max(BUILDER_SOURCE_REVIEW_PREPARE_LIMIT)
|
|
619
619
|
.optional()
|
|
620
620
|
.describe("Optional bounded set of Builder change-set IDs to prepare"),
|
|
621
|
+
documentIds: z
|
|
622
|
+
.array(z.string())
|
|
623
|
+
.max(BUILDER_SOURCE_REVIEW_PREPARE_LIMIT)
|
|
624
|
+
.optional()
|
|
625
|
+
.describe(
|
|
626
|
+
"Optional document IDs that bound heavy Builder snapshot loading",
|
|
627
|
+
),
|
|
621
628
|
pushModeConfirmation: z
|
|
622
629
|
.enum(["autosave", "draft", "publish"])
|
|
623
630
|
.optional()
|
|
@@ -663,6 +670,7 @@ export default defineAction({
|
|
|
663
670
|
const snapshot = await getContentDatabaseSourceSnapshotForWrite(
|
|
664
671
|
database,
|
|
665
672
|
args.sourceId,
|
|
673
|
+
args.documentIds,
|
|
666
674
|
);
|
|
667
675
|
return { database, snapshot };
|
|
668
676
|
},
|
|
@@ -765,6 +773,7 @@ export default defineAction({
|
|
|
765
773
|
reviewedSnapshot: await getContentDatabaseSourceSnapshotForWrite(
|
|
766
774
|
database,
|
|
767
775
|
args.sourceId,
|
|
776
|
+
args.documentIds,
|
|
768
777
|
),
|
|
769
778
|
response: await getContentDatabaseResponse(database.id),
|
|
770
779
|
}),
|
|
@@ -40,18 +40,20 @@ export default defineAction({
|
|
|
40
40
|
if (!database) throw new Error("Database not found.");
|
|
41
41
|
await assertAccess("document", database.documentId, "editor");
|
|
42
42
|
|
|
43
|
+
const selectedDocumentIds = new Set(args.documentIds ?? []);
|
|
44
|
+
if (args.scope === "selected" && selectedDocumentIds.size === 0) {
|
|
45
|
+
throw new Error("Select at least one Builder row before reviewing it.");
|
|
46
|
+
}
|
|
47
|
+
|
|
43
48
|
const source = await getContentDatabaseSourceSnapshotForWrite(
|
|
44
49
|
database,
|
|
45
50
|
args.sourceId,
|
|
51
|
+
args.scope === "selected" ? args.documentIds : undefined,
|
|
46
52
|
);
|
|
47
53
|
if (!source || source.sourceType !== "builder-cms") {
|
|
48
54
|
throw new Error("Attach a Builder CMS source before reviewing updates.");
|
|
49
55
|
}
|
|
50
56
|
|
|
51
|
-
const selectedDocumentIds = new Set(args.documentIds ?? []);
|
|
52
|
-
if (args.scope === "selected" && selectedDocumentIds.size === 0) {
|
|
53
|
-
throw new Error("Select at least one Builder row before reviewing it.");
|
|
54
|
-
}
|
|
55
57
|
const allReviewableChanges = source.changeSets.filter((changeSet) => {
|
|
56
58
|
if (
|
|
57
59
|
changeSet.direction !== "outbound" ||
|
|
@@ -1720,6 +1720,10 @@ function DatabaseTable({
|
|
|
1720
1720
|
documentId: document.id,
|
|
1721
1721
|
sourceId: session.sourceId,
|
|
1722
1722
|
changeSetIds: selectedChangeSetIds,
|
|
1723
|
+
documentIds:
|
|
1724
|
+
selectedItemIds.length > 0
|
|
1725
|
+
? selectedItems.map((item) => item.document.id)
|
|
1726
|
+
: undefined,
|
|
1723
1727
|
pushModeConfirmation:
|
|
1724
1728
|
activeBuilderReview.pushMode === "none"
|
|
1725
1729
|
? undefined
|
|
@@ -1018,6 +1018,7 @@ export interface PrepareBuilderSourceReviewRequest {
|
|
|
1018
1018
|
documentId?: string;
|
|
1019
1019
|
sourceId?: string;
|
|
1020
1020
|
changeSetIds?: string[];
|
|
1021
|
+
documentIds?: string[];
|
|
1021
1022
|
pushModeConfirmation?: ContentDatabaseSourcePushMode;
|
|
1022
1023
|
publicationTransition?: BuilderCmsPublicationTransitionIntent;
|
|
1023
1024
|
confirmUnpublish?: boolean;
|
|
@@ -4,6 +4,7 @@ import { eq } from "drizzle-orm";
|
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
|
|
6
6
|
import { getDb, schema } from "../server/db/index.js";
|
|
7
|
+
import { invalidatePublicFormCache } from "../server/lib/public-form-ssr.js";
|
|
7
8
|
|
|
8
9
|
export default defineAction({
|
|
9
10
|
description:
|
|
@@ -37,6 +38,7 @@ export default defineAction({
|
|
|
37
38
|
.delete(schema.responses)
|
|
38
39
|
.where(eq(schema.responses.formId, args.id));
|
|
39
40
|
await db.delete(schema.forms).where(eq(schema.forms.id, args.id));
|
|
41
|
+
invalidatePublicFormCache(existing);
|
|
40
42
|
return { success: true, purged: true };
|
|
41
43
|
}
|
|
42
44
|
|
|
@@ -46,6 +48,8 @@ export default defineAction({
|
|
|
46
48
|
.set({ deletedAt: now, updatedAt: now })
|
|
47
49
|
.where(eq(schema.forms.id, args.id));
|
|
48
50
|
|
|
51
|
+
invalidatePublicFormCache(existing);
|
|
52
|
+
|
|
49
53
|
return { success: true, purged: false, deletedAt: now };
|
|
50
54
|
},
|
|
51
55
|
});
|
|
@@ -23,6 +23,7 @@ import { z } from "zod";
|
|
|
23
23
|
|
|
24
24
|
import { getDb, schema } from "../server/db/index.js";
|
|
25
25
|
import { applyFieldOps } from "../server/lib/merge-fields.js";
|
|
26
|
+
import { invalidatePublicFormCache } from "../server/lib/public-form-ssr.js";
|
|
26
27
|
import { assertValidFields } from "../server/lib/validate-fields.js";
|
|
27
28
|
import type { FormField } from "../shared/types.js";
|
|
28
29
|
import { assertPublishableForm } from "./lib/assert-publishable-form.js";
|
|
@@ -139,6 +140,8 @@ export default defineAction({
|
|
|
139
140
|
.set({ fields: JSON.stringify(nextFields), updatedAt: now })
|
|
140
141
|
.where(eq(schema.forms.id, args.id));
|
|
141
142
|
|
|
143
|
+
invalidatePublicFormCache(existing);
|
|
144
|
+
|
|
142
145
|
return { id: args.id, fields: nextFields, updatedAt: now };
|
|
143
146
|
});
|
|
144
147
|
},
|
|
@@ -4,6 +4,7 @@ import { eq } from "drizzle-orm";
|
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
|
|
6
6
|
import { getDb, schema } from "../server/db/index.js";
|
|
7
|
+
import { invalidatePublicFormCache } from "../server/lib/public-form-ssr.js";
|
|
7
8
|
|
|
8
9
|
export default defineAction({
|
|
9
10
|
description:
|
|
@@ -31,6 +32,8 @@ export default defineAction({
|
|
|
31
32
|
.set({ deletedAt: null, updatedAt: now })
|
|
32
33
|
.where(eq(schema.forms.id, args.id));
|
|
33
34
|
|
|
35
|
+
invalidatePublicFormCache(existing);
|
|
36
|
+
|
|
34
37
|
return { success: true };
|
|
35
38
|
},
|
|
36
39
|
});
|
|
@@ -5,6 +5,7 @@ import { z } from "zod";
|
|
|
5
5
|
|
|
6
6
|
import { getDb, schema } from "../server/db/index.js";
|
|
7
7
|
import { assertIntegrationUrlsAllowed } from "../server/lib/integrations.js";
|
|
8
|
+
import { invalidatePublicFormCache } from "../server/lib/public-form-ssr.js";
|
|
8
9
|
import { assertValidFields } from "../server/lib/validate-fields.js";
|
|
9
10
|
import type { FormField, FormSettings } from "../shared/types.js";
|
|
10
11
|
import { assertPublishableForm } from "./lib/assert-publishable-form.js";
|
|
@@ -136,6 +137,8 @@ export default defineAction({
|
|
|
136
137
|
.where(eq(schema.forms.id, args.id))
|
|
137
138
|
.limit(1);
|
|
138
139
|
|
|
140
|
+
invalidatePublicFormCache(existing, row);
|
|
141
|
+
|
|
139
142
|
return {
|
|
140
143
|
id: row!.id,
|
|
141
144
|
title: row!.title,
|
|
@@ -1468,10 +1468,10 @@ function ResultsContent({ formId, form }: { formId: string; form: any }) {
|
|
|
1468
1468
|
key={response.id}
|
|
1469
1469
|
className="border-b border-border hover:bg-muted/20"
|
|
1470
1470
|
>
|
|
1471
|
-
<td className="px-4 py-2.5 text-xs text-muted-foreground">
|
|
1471
|
+
<td className="px-4 py-2.5 align-top text-xs text-muted-foreground">
|
|
1472
1472
|
{responses.length - idx}
|
|
1473
1473
|
</td>
|
|
1474
|
-
<td className="min-w-36 px-4 py-2.5 text-xs text-muted-foreground whitespace-nowrap">
|
|
1474
|
+
<td className="min-w-36 px-4 py-2.5 align-top text-xs text-muted-foreground whitespace-nowrap">
|
|
1475
1475
|
{format(new Date(response.submittedAt), "MMM d, h:mm a")}
|
|
1476
1476
|
</td>
|
|
1477
1477
|
{hasSubmitterEmail && (
|
|
@@ -428,10 +428,10 @@ export function ResponsesPage() {
|
|
|
428
428
|
key={response.id}
|
|
429
429
|
className="border-b border-border transition-[background-color] duration-150 hover:bg-muted/20 motion-reduce:transition-none"
|
|
430
430
|
>
|
|
431
|
-
<td className="px-4 py-2.5 text-xs text-muted-foreground">
|
|
431
|
+
<td className="px-4 py-2.5 align-top text-xs text-muted-foreground">
|
|
432
432
|
{filteredSorted.length - idx}
|
|
433
433
|
</td>
|
|
434
|
-
<td className="min-w-36 px-4 py-2.5 text-xs text-muted-foreground whitespace-nowrap">
|
|
434
|
+
<td className="min-w-36 px-4 py-2.5 align-top text-xs text-muted-foreground whitespace-nowrap">
|
|
435
435
|
{formatDate(response.submittedAt, {
|
|
436
436
|
month: "short",
|
|
437
437
|
day: "numeric",
|
|
@@ -53,6 +53,7 @@ export const getPublicForm = defineEventHandler(async (event: H3Event) => {
|
|
|
53
53
|
const settings = JSON.parse(row.settings) as FormSettings;
|
|
54
54
|
const result = {
|
|
55
55
|
id: row.id,
|
|
56
|
+
updatedAt: row.updatedAt,
|
|
56
57
|
title: row.title,
|
|
57
58
|
description: row.description,
|
|
58
59
|
fields: JSON.parse(row.fields),
|
|
@@ -22,14 +22,38 @@ import { getDb, schema } from "../db/index.js";
|
|
|
22
22
|
const cache = new Map<string, { data: any; ts: number }>();
|
|
23
23
|
const TTL = 60_000;
|
|
24
24
|
|
|
25
|
+
type PublicFormCacheKeys = {
|
|
26
|
+
id?: string | null;
|
|
27
|
+
slug?: string | null;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export function invalidatePublicFormCache(
|
|
31
|
+
...forms: Array<PublicFormCacheKeys | null | undefined>
|
|
32
|
+
) {
|
|
33
|
+
for (const form of forms) {
|
|
34
|
+
for (const key of [form?.id, form?.slug]) {
|
|
35
|
+
if (!key) continue;
|
|
36
|
+
cache.delete(key);
|
|
37
|
+
const versionPrefix = `${key}?v=`;
|
|
38
|
+
for (const cachedKey of cache.keys()) {
|
|
39
|
+
if (cachedKey.startsWith(versionPrefix)) cache.delete(cachedKey);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
25
45
|
function getCached(key: string) {
|
|
26
46
|
const entry = cache.get(key);
|
|
27
47
|
if (entry && Date.now() - entry.ts < TTL) return entry.data;
|
|
28
48
|
return null;
|
|
29
49
|
}
|
|
30
50
|
|
|
31
|
-
export async function getPublicFormBySlugOrId(
|
|
32
|
-
|
|
51
|
+
export async function getPublicFormBySlugOrId(
|
|
52
|
+
slugOrId: string,
|
|
53
|
+
version?: string,
|
|
54
|
+
) {
|
|
55
|
+
const cacheKey = version ? `${slugOrId}?v=${version}` : slugOrId;
|
|
56
|
+
const cached = getCached(cacheKey);
|
|
33
57
|
if (cached) return cached;
|
|
34
58
|
|
|
35
59
|
const db = getDb();
|
|
@@ -66,7 +90,7 @@ export async function getPublicFormBySlugOrId(slugOrId: string) {
|
|
|
66
90
|
settings: toPublicFormSettings(settings),
|
|
67
91
|
};
|
|
68
92
|
|
|
69
|
-
cache.set(
|
|
93
|
+
cache.set(cacheKey, { data: result, ts: Date.now() });
|
|
70
94
|
return result;
|
|
71
95
|
}
|
|
72
96
|
|
|
@@ -103,6 +127,7 @@ const FALLBACK_PUBLIC_FORM_ORIGIN = "http://agent-native.local";
|
|
|
103
127
|
function parsePublicFormUrl(url: string): {
|
|
104
128
|
pathname: string;
|
|
105
129
|
origin?: string;
|
|
130
|
+
version?: string;
|
|
106
131
|
} {
|
|
107
132
|
try {
|
|
108
133
|
const parsed = new URL(url, FALLBACK_PUBLIC_FORM_ORIGIN);
|
|
@@ -110,6 +135,7 @@ function parsePublicFormUrl(url: string): {
|
|
|
110
135
|
return {
|
|
111
136
|
pathname: parsed.pathname,
|
|
112
137
|
origin: isAbsolute ? parsed.origin : undefined,
|
|
138
|
+
version: parsed.searchParams.get("v") || undefined,
|
|
113
139
|
};
|
|
114
140
|
} catch {
|
|
115
141
|
return { pathname: url.split("?")[0] || "/" };
|
|
@@ -261,7 +287,9 @@ export async function renderPublicFormHtml(
|
|
|
261
287
|
? pathname.slice(basePath.length)
|
|
262
288
|
: pathname;
|
|
263
289
|
const slugOrId = decodeURIComponent(pathWithoutBase.replace(/^\/f\//, ""));
|
|
264
|
-
const form = slugOrId
|
|
290
|
+
const form = slugOrId
|
|
291
|
+
? await getPublicFormBySlugOrId(slugOrId, parsedUrl.version)
|
|
292
|
+
: null;
|
|
265
293
|
|
|
266
294
|
if (!form) {
|
|
267
295
|
return { html: notFoundPage(parsedUrl.origin), status: 404 };
|
|
@@ -402,10 +430,25 @@ function renderFormPage(
|
|
|
402
430
|
<script>
|
|
403
431
|
(function(){
|
|
404
432
|
var FORM_ID = ${JSON.stringify(form.id)};
|
|
433
|
+
var FORM_VERSION = ${JSON.stringify(form.updatedAt || "")};
|
|
434
|
+
var PUBLIC_FORM_API = ${JSON.stringify(`${appBasePath}/api/forms/public/${encodeURIComponent(form.slug || form.id)}`)};
|
|
405
435
|
var REDIRECT = ${JSON.stringify(safeRedirectUrl(settings.redirectUrl))};
|
|
406
436
|
var TURNSTILE_KEY = ${JSON.stringify(turnstileSiteKey)};
|
|
407
437
|
var FIELDS = ${JSON.stringify(fields.map((f) => ({ id: f.id, type: f.type, required: f.required, validation: f.validation, label: f.label, conditional: f.conditional })))};
|
|
408
438
|
|
|
439
|
+
function revalidateFormVersion() {
|
|
440
|
+
fetch(PUBLIC_FORM_API, { cache: "no-store" })
|
|
441
|
+
.then(function(response) { return response.ok ? response.json() : null; })
|
|
442
|
+
.then(function(latest) {
|
|
443
|
+
if (!latest || typeof latest.updatedAt !== "string" || !latest.updatedAt || latest.updatedAt === FORM_VERSION) return;
|
|
444
|
+
var currentUrl = new URL(window.location.href);
|
|
445
|
+
currentUrl.searchParams.set("v", latest.updatedAt);
|
|
446
|
+
window.location.replace(currentUrl.toString());
|
|
447
|
+
})
|
|
448
|
+
.catch(function() {});
|
|
449
|
+
}
|
|
450
|
+
revalidateFormVersion();
|
|
451
|
+
|
|
409
452
|
// Theme toggle
|
|
410
453
|
var html = document.documentElement;
|
|
411
454
|
var saved = localStorage.getItem("theme");
|