@agent-native/core 0.119.3 → 0.119.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/corpus/README.md +2 -2
- package/corpus/core/CHANGELOG.md +21 -0
- package/corpus/core/package.json +3 -3
- package/corpus/core/src/agent/engine/index.ts +2 -0
- package/corpus/core/src/agent/engine/registry.ts +95 -2
- package/corpus/core/src/agent/production-agent.ts +107 -125
- package/corpus/core/src/agent/run-manager.ts +45 -2
- package/corpus/core/src/agent/thread-data-builder.ts +85 -8
- package/corpus/core/src/client/AssistantChat.tsx +37 -9
- package/corpus/core/src/client/chat/message-components.tsx +9 -1
- package/corpus/core/src/client/chat/repo-helpers.ts +77 -0
- package/corpus/core/src/client/chat/tool-call-display.tsx +51 -15
- package/corpus/core/src/scripts/agent-engines/list-agent-engines.ts +8 -0
- package/corpus/core/src/scripts/agent-engines/manage-agent-engine.ts +5 -1
- package/corpus/core/src/scripts/agent-engines/set-agent-engine.ts +9 -1
- package/corpus/core/src/server/agent-chat/framework-prompts.ts +3 -1
- package/corpus/core/src/server/agent-chat/plugin-options.ts +9 -0
- package/corpus/core/src/server/agent-chat-plugin.ts +12 -3
- package/corpus/core/src/templates/chat/.agents/skills/actions/SKILL.md +512 -0
- package/corpus/core/src/templates/chat/.agents/skills/adding-a-feature/SKILL.md +189 -0
- package/corpus/core/src/templates/chat/.agents/skills/agent-native-docs/SKILL.md +115 -0
- package/corpus/core/src/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +177 -0
- package/corpus/core/src/templates/chat/.agents/skills/capture-learnings/SKILL.md +89 -0
- package/corpus/core/src/templates/chat/.agents/skills/create-skill/SKILL.md +221 -0
- package/corpus/core/src/templates/chat/.agents/skills/customizing-agent-native/SKILL.md +220 -0
- package/corpus/core/src/templates/chat/.agents/skills/delegate-to-agent/SKILL.md +263 -0
- package/corpus/core/src/templates/chat/.agents/skills/feature-flags/SKILL.md +169 -0
- package/corpus/core/src/templates/chat/.agents/skills/frontend-design/SKILL.md +160 -0
- package/corpus/core/src/templates/chat/.agents/skills/real-time-sync/SKILL.md +232 -0
- package/corpus/core/src/templates/chat/.agents/skills/security/SKILL.md +280 -0
- package/corpus/core/src/templates/chat/.agents/skills/self-modifying-code/SKILL.md +118 -0
- package/corpus/core/src/templates/chat/.agents/skills/shadcn-ui/SKILL.md +119 -0
- package/corpus/core/src/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +100 -0
- package/corpus/core/src/templates/chat/.env.example +5 -0
- package/corpus/core/src/templates/chat/.ignore +0 -0
- package/corpus/core/src/templates/chat/.oxfmtrc.json +8 -0
- package/corpus/core/src/templates/chat/AGENTS.md +69 -0
- package/corpus/core/src/templates/chat/CHANGELOG.md +10 -0
- package/corpus/core/src/templates/chat/DEVELOPING.md +185 -0
- package/corpus/core/src/templates/chat/README.md +32 -0
- package/corpus/core/src/templates/chat/_gitignore +43 -0
- package/corpus/core/src/templates/chat/actions/hello.ts +13 -0
- package/corpus/core/src/templates/chat/actions/navigate.ts +41 -0
- package/corpus/core/src/templates/chat/actions/run.ts +2 -0
- package/corpus/core/src/templates/chat/actions/view-screen.ts +31 -0
- package/corpus/core/src/templates/chat/app/components/layout/Header.tsx +60 -0
- package/corpus/core/src/templates/chat/app/components/layout/Layout.tsx +185 -0
- package/corpus/core/src/templates/chat/app/components/layout/Sidebar.tsx +450 -0
- package/corpus/core/src/templates/chat/app/components/ui/button.tsx +1 -0
- package/corpus/core/src/templates/chat/app/components/ui/card.tsx +1 -0
- package/corpus/core/src/templates/chat/app/components/ui/dropdown-menu.tsx +1 -0
- package/corpus/core/src/templates/chat/app/components/ui/input.tsx +1 -0
- package/corpus/core/src/templates/chat/app/components/ui/label.tsx +1 -0
- package/corpus/core/src/templates/chat/app/components/ui/sheet.tsx +1 -0
- package/corpus/core/src/templates/chat/app/components/ui/toolkit-provider.tsx +17 -0
- package/corpus/core/src/templates/chat/app/components/ui/tooltip.tsx +1 -0
- package/corpus/core/src/templates/chat/app/design-system.ts +3 -0
- package/corpus/core/src/templates/chat/app/entry.client.tsx +19 -0
- package/corpus/core/src/templates/chat/app/entry.server.tsx +10 -0
- package/corpus/core/src/templates/chat/app/global.css +93 -0
- package/corpus/core/src/templates/chat/app/hooks/use-navigation-state.ts +93 -0
- package/corpus/core/src/templates/chat/app/i18n/ar-SA.ts +68 -0
- package/corpus/core/src/templates/chat/app/i18n/de-DE.ts +71 -0
- package/corpus/core/src/templates/chat/app/i18n/en-US.ts +70 -0
- package/corpus/core/src/templates/chat/app/i18n/es-ES.ts +71 -0
- package/corpus/core/src/templates/chat/app/i18n/fr-FR.ts +71 -0
- package/corpus/core/src/templates/chat/app/i18n/hi-IN.ts +69 -0
- package/corpus/core/src/templates/chat/app/i18n/index.ts +34 -0
- package/corpus/core/src/templates/chat/app/i18n/ja-JP.ts +70 -0
- package/corpus/core/src/templates/chat/app/i18n/ko-KR.ts +70 -0
- package/corpus/core/src/templates/chat/app/i18n/pt-BR.ts +71 -0
- package/corpus/core/src/templates/chat/app/i18n/zh-CN.ts +66 -0
- package/corpus/core/src/templates/chat/app/i18n/zh-TW.ts +66 -0
- package/corpus/core/src/templates/chat/app/i18n-data.ts +556 -0
- package/corpus/core/src/templates/chat/app/lib/agent-page.tsx +49 -0
- package/corpus/core/src/templates/chat/app/lib/app-config.ts +11 -0
- package/corpus/core/src/templates/chat/app/lib/tab-id.ts +1 -0
- package/corpus/core/src/templates/chat/app/lib/utils.ts +1 -0
- package/corpus/core/src/templates/chat/app/root.tsx +173 -0
- package/corpus/core/src/templates/chat/app/routes/_index.tsx +94 -0
- package/corpus/core/src/templates/chat/app/routes/agent.tsx +24 -0
- package/corpus/core/src/templates/chat/app/routes/chat.$threadId.tsx +1 -0
- package/corpus/core/src/templates/chat/app/routes/database.tsx +17 -0
- package/corpus/core/src/templates/chat/app/routes/extensions.$id.$slug.tsx +2 -0
- package/corpus/core/src/templates/chat/app/routes/extensions.$id.tsx +11 -0
- package/corpus/core/src/templates/chat/app/routes/extensions._index.tsx +11 -0
- package/corpus/core/src/templates/chat/app/routes/extensions.tsx +5 -0
- package/corpus/core/src/templates/chat/app/routes/observability.tsx +19 -0
- package/corpus/core/src/templates/chat/app/routes/settings.tsx +89 -0
- package/corpus/core/src/templates/chat/app/routes/team.tsx +11 -0
- package/corpus/core/src/templates/chat/app/routes.ts +4 -0
- package/corpus/core/src/templates/chat/app/vite-env.d.ts +6 -0
- package/corpus/core/src/templates/chat/changelog/2026-06-24-a-new-settings-page-gives-quick-access-to-language-workspace.md +6 -0
- package/corpus/core/src/templates/chat/changelog/2026-06-24-added-a-language-picker-and-localized-app-chrome-for-support.md +6 -0
- package/corpus/core/src/templates/chat/changelog/2026-06-27-traditional-chinese-copy-uses-taiwan-terminology.md +6 -0
- package/corpus/core/src/templates/chat/changelog/2026-06-28-left-sidebar-collapse-motion-and-footer-chrome-are-quieter.md +6 -0
- package/corpus/core/src/templates/chat/changelog/2026-06-29-chat-layouts-adapt-when-the-agent-sidebar-is-open.md +6 -0
- package/corpus/core/src/templates/chat/changelog/2026-07-08-settings-are-cleaner-and-searchable.md +5 -0
- package/corpus/core/src/templates/chat/changelog/2026-07-10-chat-now-makes-ai-connection-setup-clear-without-shifting-th.md +6 -0
- package/corpus/core/src/templates/chat/changelog/2026-07-13-a-full-agent-page-now-brings-context-files-connections-jobs-.md +6 -0
- package/corpus/core/src/templates/chat/changelog/2026-07-14-chat-opens-reliably-on-hosted-deployments-instead-of-failing.md +6 -0
- package/corpus/core/src/templates/chat/changelog/2026-07-14-fixed-chat-template-startup-with-older-core-versions.md +6 -0
- package/corpus/core/src/templates/chat/changelog/2026-07-15-chat-navigation-focuses-on-chat-and-agent.md +6 -0
- package/corpus/core/src/templates/chat/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it-or-sta.md +6 -0
- package/corpus/core/src/templates/chat/changelog/2026-07-22-compact-sidebar-footer.md +6 -0
- package/corpus/core/src/templates/chat/changelog/2026-07-22-full-page-chat-keeps-the-active-conversation-when-moving-to-.md +6 -0
- package/corpus/core/src/templates/chat/changelog/2026-07-22-manage-agent-navigation-now-uses-the-connected-nodes-icon.md +6 -0
- package/corpus/core/src/templates/chat/changelog/2026-07-22-recent-chats-are-easier-to-scan-and-expand.md +6 -0
- package/corpus/core/src/templates/chat/changelog/2026-07-23-full-page-chat-is-better-centered-with-quieter-chat-history-.md +6 -0
- package/corpus/core/src/templates/chat/components.json +20 -0
- package/corpus/core/src/templates/chat/learnings.defaults.md +5 -0
- package/corpus/core/src/templates/chat/netlify.toml +10 -0
- package/corpus/core/src/templates/chat/package.json +92 -0
- package/corpus/core/src/templates/chat/public/agent-native-icon-dark.svg +10 -0
- package/corpus/core/src/templates/chat/public/agent-native-icon-light.svg +10 -0
- package/corpus/core/src/templates/chat/public/agent-native-logo-dark.svg +21 -0
- package/corpus/core/src/templates/chat/public/agent-native-logo-light.svg +21 -0
- package/corpus/core/src/templates/chat/public/favicon.svg +1 -0
- package/corpus/core/src/templates/chat/public/icon-180.svg +1 -0
- package/corpus/core/src/templates/chat/public/icon-192.svg +1 -0
- package/corpus/core/src/templates/chat/public/icon-512.svg +1 -0
- package/corpus/core/src/templates/chat/public/manifest.json +21 -0
- package/corpus/core/src/templates/chat/react-router.config.ts +7 -0
- package/corpus/core/src/templates/chat/server/middleware/auth.ts +15 -0
- package/corpus/core/src/templates/chat/server/plugins/agent-chat.ts +21 -0
- package/corpus/core/src/templates/chat/server/plugins/auth.ts +17 -0
- package/corpus/core/src/templates/chat/server/routes/[...page].get.ts +5 -0
- package/corpus/core/src/templates/chat/ssr-entry.ts +15 -0
- package/corpus/core/src/templates/chat/tsconfig.json +21 -0
- package/corpus/core/src/templates/chat/vite.config.ts +19 -0
- package/corpus/templates/analytics/AGENTS.md +19 -11
- package/corpus/templates/analytics/actions/list-data-dictionary.ts +3 -1
- package/corpus/templates/analytics/actions/save-data-dictionary-entry.ts +14 -0
- package/corpus/templates/analytics/actions/search-analytics-query-catalog.ts +41 -0
- package/corpus/templates/analytics/app/components/dashboard/DashboardPanelSkeleton.tsx +13 -0
- package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +12 -11
- package/corpus/templates/analytics/app/pages/adhoc/DashboardSkeleton.tsx +3 -3
- package/corpus/templates/analytics/changelog/2026-07-23-dashboard-chart-loading-placeholders-are-easier-to-see-in-da.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-23-routine-analytics-lookups-reuse-existing-query-definitions.md +6 -0
- package/corpus/templates/analytics/server/lib/agent-chat-plan-mode.ts +1 -12
- package/corpus/templates/analytics/server/lib/analytics-query-catalog.ts +405 -0
- package/corpus/templates/analytics/server/plugins/agent-chat.ts +11 -16
- package/corpus/templates/content/changelog/2026-07-23-database-toolbar-sort-and-filter-controls-open-reliably.md +6 -0
- package/corpus/templates/forms/app/lib/public-form-link.ts +14 -0
- package/corpus/templates/forms/app/pages/FormBuilderPage.tsx +6 -14
- package/corpus/templates/forms/changelog/2026-07-23-published-form-links-can-be-copied-without-being-asked-to-re.md +6 -0
- package/corpus/templates/mail/changelog/2026-07-23-scheduled-emails-now-send-only-once-when-multiple-requests-r.md +6 -0
- package/corpus/templates/mail/server/lib/jobs.ts +13 -4
- package/corpus/templates/mail/server/plugins/mail-jobs.ts +1 -1
- package/corpus/templates/slides/actions/patch-deck.ts +2 -1
- package/corpus/templates/slides/app/components/editor/EditorSidebar.tsx +7 -18
- package/corpus/templates/slides/app/lib/agent-visible-message.ts +28 -0
- package/corpus/templates/slides/app/pages/Index.tsx +6 -34
- package/corpus/templates/slides/changelog/2026-07-23-full-prompts-stay-visible-in-chat-when-creating-decks-or-add.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-23-opening-or-refining-a-deck-no-longer-crashes-with-a-blank-er.md +6 -0
- package/corpus/templates/slides/shared/aspect-ratios.ts +4 -1
- package/corpus/templates/tasks/.oxfmtrc.json +8 -0
- package/corpus/templates/tasks/AGENTS.md +34 -41
- package/corpus/templates/tasks/README.md +13 -6
- package/corpus/templates/tasks/actions/bulk-delete-inbox-items.ts +10 -8
- package/corpus/templates/tasks/actions/bulk-delete-tasks.ts +10 -8
- package/corpus/templates/tasks/actions/bulk-mark-inbox-items-ready.ts +1 -1
- package/corpus/templates/tasks/actions/bulk-update-tasks.ts +12 -10
- package/corpus/templates/tasks/actions/create-inbox-item.ts +7 -4
- package/corpus/templates/tasks/actions/create-task.ts +2 -1
- package/corpus/templates/tasks/actions/delete-inbox-item.ts +6 -4
- package/corpus/templates/tasks/actions/delete-task.ts +1 -1
- package/corpus/templates/tasks/actions/list-inbox-items.ts +4 -2
- package/corpus/templates/tasks/actions/list-visible-task-fields.ts +3 -1
- package/corpus/templates/tasks/actions/mark-inbox-item-ready.ts +6 -4
- package/corpus/templates/tasks/actions/navigate.ts +16 -14
- package/corpus/templates/tasks/actions/reorder-inbox-items.ts +9 -7
- package/corpus/templates/tasks/actions/update-inbox-item.ts +6 -4
- package/corpus/templates/tasks/actions/update-task.ts +12 -9
- package/corpus/templates/tasks/actions/update-visible-task-fields.ts +10 -8
- package/corpus/templates/tasks/actions/view-screen.ts +1 -1
- package/corpus/templates/tasks/app/components/tasks/fields/TaskFieldsSidebar.tsx +15 -0
- package/corpus/templates/tasks/changelog/2026-07-23-task-detail-extensions.md +6 -0
- package/corpus/templates/tasks/drizzle.config.ts +3 -0
- package/corpus/templates/tasks/package.json +4 -1
- package/corpus/templates/tasks/server/db/schema.ts +0 -10
- package/corpus/templates/tasks/server/db/test-tasks-table.ts +0 -5
- package/corpus/templates/tasks/server/plugins/agent-chat.ts +1 -1
- package/corpus/templates/tasks/server/plugins/db.ts +43 -10
- package/corpus/templates/tasks/server/user-config/store.ts +42 -81
- package/corpus/templates/tasks/tsconfig.json +1 -2
- package/corpus/templates/tasks/vitest.config.ts +10 -1
- package/corpus/toolkit/CHANGELOG.md +13 -0
- package/corpus/toolkit/package.json +1 -1
- package/corpus/toolkit/src/editor/SharedRichEditor.tsx +23 -2
- package/corpus/toolkit/src/editor/SlashCommandMenu.tsx +68 -2
- package/corpus/toolkit/src/editor/index.ts +1 -0
- package/corpus/toolkit/src/editor.css +75 -0
- package/corpus/toolkit/src/ui/button.tsx +3 -2
- package/dist/agent/engine/index.d.ts +1 -1
- package/dist/agent/engine/index.d.ts.map +1 -1
- package/dist/agent/engine/index.js +1 -1
- package/dist/agent/engine/index.js.map +1 -1
- package/dist/agent/engine/registry.d.ts +32 -1
- package/dist/agent/engine/registry.d.ts.map +1 -1
- package/dist/agent/engine/registry.js +75 -3
- package/dist/agent/engine/registry.js.map +1 -1
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +96 -115
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/agent/run-manager.d.ts +9 -1
- package/dist/agent/run-manager.d.ts.map +1 -1
- package/dist/agent/run-manager.js +26 -0
- package/dist/agent/run-manager.js.map +1 -1
- package/dist/agent/thread-data-builder.d.ts +2 -0
- package/dist/agent/thread-data-builder.d.ts.map +1 -1
- package/dist/agent/thread-data-builder.js +69 -9
- package/dist/agent/thread-data-builder.js.map +1 -1
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +32 -10
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/chat/message-components.d.ts +2 -1
- package/dist/client/chat/message-components.d.ts.map +1 -1
- package/dist/client/chat/message-components.js +9 -3
- package/dist/client/chat/message-components.js.map +1 -1
- package/dist/client/chat/repo-helpers.d.ts +4 -0
- package/dist/client/chat/repo-helpers.d.ts.map +1 -1
- package/dist/client/chat/repo-helpers.js +61 -0
- package/dist/client/chat/repo-helpers.js.map +1 -1
- package/dist/client/chat/tool-call-display.d.ts +2 -1
- package/dist/client/chat/tool-call-display.d.ts.map +1 -1
- package/dist/client/chat/tool-call-display.js +10 -9
- package/dist/client/chat/tool-call-display.js.map +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/observability/routes.d.ts +5 -5
- package/dist/progress/routes.d.ts +1 -1
- package/dist/provider-api/actions/custom-provider-registration.d.ts +7 -7
- package/dist/provider-api/actions/provider-api.d.ts +7 -7
- package/dist/provider-api/corpus-jobs.d.ts +2 -2
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/scripts/agent-engines/list-agent-engines.d.ts.map +1 -1
- package/dist/scripts/agent-engines/list-agent-engines.js +8 -2
- package/dist/scripts/agent-engines/list-agent-engines.js.map +1 -1
- package/dist/scripts/agent-engines/manage-agent-engine.d.ts.map +1 -1
- package/dist/scripts/agent-engines/manage-agent-engine.js +5 -2
- package/dist/scripts/agent-engines/manage-agent-engine.js.map +1 -1
- package/dist/scripts/agent-engines/set-agent-engine.d.ts.map +1 -1
- package/dist/scripts/agent-engines/set-agent-engine.js +9 -2
- package/dist/scripts/agent-engines/set-agent-engine.js.map +1 -1
- package/dist/secrets/routes.d.ts +9 -9
- package/dist/server/agent-chat/framework-prompts.d.ts.map +1 -1
- package/dist/server/agent-chat/framework-prompts.js +3 -1
- package/dist/server/agent-chat/framework-prompts.js.map +1 -1
- package/dist/server/agent-chat/plugin-options.d.ts +9 -0
- package/dist/server/agent-chat/plugin-options.d.ts.map +1 -1
- package/dist/server/agent-chat/plugin-options.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +11 -2
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/realtime-token.d.ts +1 -1
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/package.json +4 -4
- package/src/agent/engine/index.ts +2 -0
- package/src/agent/engine/registry.ts +95 -2
- package/src/agent/production-agent.ts +107 -125
- package/src/agent/run-manager.ts +45 -2
- package/src/agent/thread-data-builder.ts +85 -8
- package/src/client/AssistantChat.tsx +37 -9
- package/src/client/chat/message-components.tsx +9 -1
- package/src/client/chat/repo-helpers.ts +77 -0
- package/src/client/chat/tool-call-display.tsx +51 -15
- package/src/scripts/agent-engines/list-agent-engines.ts +8 -0
- package/src/scripts/agent-engines/manage-agent-engine.ts +5 -1
- package/src/scripts/agent-engines/set-agent-engine.ts +9 -1
- package/src/server/agent-chat/framework-prompts.ts +3 -1
- package/src/server/agent-chat/plugin-options.ts +9 -0
- package/src/server/agent-chat-plugin.ts +12 -3
- package/corpus/templates/tasks/.prettierrc +0 -5
- package/src/templates/chat/actions/hello.spec.ts +0 -23
- package/src/templates/chat/actions/navigate.spec.ts +0 -68
- package/src/templates/chat/actions/view-screen.spec.ts +0 -40
- package/src/templates/chat/app/lib/agent-page.spec.tsx +0 -61
|
@@ -36,6 +36,7 @@ import {
|
|
|
36
36
|
} from "@/components/ui/tooltip";
|
|
37
37
|
import type { Slide } from "@/context/DeckContext";
|
|
38
38
|
import { useAgentGenerating } from "@/hooks/use-agent-generating";
|
|
39
|
+
import { addSlideAgentMessage } from "@/lib/agent-visible-message";
|
|
39
40
|
import type { AspectRatio } from "@/lib/aspect-ratios";
|
|
40
41
|
|
|
41
42
|
interface EditorSidebarProps {
|
|
@@ -413,17 +414,15 @@ function AddSlidePopover({
|
|
|
413
414
|
}
|
|
414
415
|
|
|
415
416
|
const trimmedText = text.trim();
|
|
416
|
-
const
|
|
417
|
-
|
|
418
|
-
.join("\n\n");
|
|
419
|
-
const sourceForContext = truncateSourceForContext(description);
|
|
417
|
+
const googleDocSourceForContext =
|
|
418
|
+
truncateSourceForContext(googleDocContext);
|
|
420
419
|
const fileContext = describeUploadedFilesForAgent(uploaded, deckId);
|
|
421
420
|
const context = [
|
|
422
421
|
`Add a new slide to deck "${deckTitle}" (id: ${deckId}).`,
|
|
423
422
|
`Insert after slide ${activeSlideIndex + 1} of ${slideCount} (active slide id: ${activeSlideId}).`,
|
|
424
|
-
"The
|
|
425
|
-
|
|
426
|
-
|
|
423
|
+
"The visible user message above contains the user's request and/or pasted source material for the new slide(s). Treat pasted memo content as source material even if the user did not explicitly say they are pasting it.",
|
|
424
|
+
googleDocSourceForContext.text,
|
|
425
|
+
googleDocSourceForContext.truncated
|
|
427
426
|
? `The pasted source was longer than ${MAX_SOURCE_CONTEXT_CHARS} characters, so only the first ${MAX_SOURCE_CONTEXT_CHARS} characters were included to keep the agent request reliable.`
|
|
428
427
|
: "",
|
|
429
428
|
fileContext,
|
|
@@ -438,10 +437,7 @@ function AddSlidePopover({
|
|
|
438
437
|
"For larger requests, keep adding slides sequentially: wait for each add-slide result, then call add-slide for the next slide. Start slide 1 immediately; do not wait to design the entire sequence before adding it.",
|
|
439
438
|
].join("\n");
|
|
440
439
|
|
|
441
|
-
agentSubmit(
|
|
442
|
-
`Add slide: ${summarizePromptForChat(trimmedText || "a new slide")}`,
|
|
443
|
-
context,
|
|
444
|
-
);
|
|
440
|
+
agentSubmit(addSlideAgentMessage(trimmedText), context);
|
|
445
441
|
onOpenChange(false);
|
|
446
442
|
},
|
|
447
443
|
[
|
|
@@ -539,13 +535,6 @@ function AddSlidePopover({
|
|
|
539
535
|
);
|
|
540
536
|
}
|
|
541
537
|
|
|
542
|
-
function summarizePromptForChat(prompt: string): string {
|
|
543
|
-
const singleLine = prompt.trim().replace(/\s+/g, " ");
|
|
544
|
-
if (!singleLine) return "a new slide";
|
|
545
|
-
if (singleLine.length <= 180) return singleLine;
|
|
546
|
-
return `${singleLine.slice(0, 177)}...`;
|
|
547
|
-
}
|
|
548
|
-
|
|
549
538
|
export default function EditorSidebar({
|
|
550
539
|
slides,
|
|
551
540
|
activeSlideId,
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export const MAX_AGENT_VISIBLE_MESSAGE_CHARS = 60_000;
|
|
2
|
+
|
|
3
|
+
function formatVisibleAgentMessage(
|
|
4
|
+
action: string,
|
|
5
|
+
prompt: string,
|
|
6
|
+
fallback: string,
|
|
7
|
+
): string {
|
|
8
|
+
const prefix = `${action}: `;
|
|
9
|
+
const trimmedPrompt = prompt.trim() || fallback;
|
|
10
|
+
if (prefix.length + trimmedPrompt.length <= MAX_AGENT_VISIBLE_MESSAGE_CHARS) {
|
|
11
|
+
return `${prefix}${trimmedPrompt}`;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const suffix = "\n\n[Prompt truncated for reliability]";
|
|
15
|
+
const maxPromptChars = Math.max(
|
|
16
|
+
0,
|
|
17
|
+
MAX_AGENT_VISIBLE_MESSAGE_CHARS - prefix.length - suffix.length,
|
|
18
|
+
);
|
|
19
|
+
return `${prefix}${trimmedPrompt.slice(0, maxPromptChars)}${suffix}`;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function createDeckAgentMessage(prompt: string): string {
|
|
23
|
+
return formatVisibleAgentMessage("Create deck", prompt, "new deck");
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function addSlideAgentMessage(prompt: string): string {
|
|
27
|
+
return formatVisibleAgentMessage("Add slide", prompt, "a new slide");
|
|
28
|
+
}
|
|
@@ -44,9 +44,9 @@ import { ToggleGroup, ToggleGroupItem } from "@/components/ui/toggle-group";
|
|
|
44
44
|
import { useDecks } from "@/context/DeckContext";
|
|
45
45
|
import { useAgentGenerating } from "@/hooks/use-agent-generating";
|
|
46
46
|
import { useDesignSystems } from "@/hooks/use-design-systems";
|
|
47
|
+
import { createDeckAgentMessage } from "@/lib/agent-visible-message";
|
|
47
48
|
import { savePromptToComposerDraft } from "@/lib/composer-draft";
|
|
48
49
|
|
|
49
|
-
const MAX_SOURCE_CONTEXT_CHARS = 60_000;
|
|
50
50
|
const NEW_DECK_DRAFT_SCOPE = "slides-new-deck";
|
|
51
51
|
const PENDING_PROMPT_KEY = "slides:pending-deck-prompt";
|
|
52
52
|
|
|
@@ -84,26 +84,6 @@ function mergeUploadedFilesForRetry(
|
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
function summarizePromptForChat(prompt: string): string {
|
|
88
|
-
const singleLine = prompt.trim().replace(/\s+/g, " ");
|
|
89
|
-
if (!singleLine) return "new deck";
|
|
90
|
-
if (singleLine.length <= 180) return singleLine;
|
|
91
|
-
return `${singleLine.slice(0, 177)}...`;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
function truncateSourceForContext(prompt: string): {
|
|
95
|
-
text: string;
|
|
96
|
-
truncated: boolean;
|
|
97
|
-
} {
|
|
98
|
-
if (prompt.length <= MAX_SOURCE_CONTEXT_CHARS) {
|
|
99
|
-
return { text: prompt, truncated: false };
|
|
100
|
-
}
|
|
101
|
-
return {
|
|
102
|
-
text: prompt.slice(0, MAX_SOURCE_CONTEXT_CHARS),
|
|
103
|
-
truncated: true,
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
|
|
107
87
|
interface DesignSystemGenerationContextResult {
|
|
108
88
|
title?: string;
|
|
109
89
|
agentContext?: string;
|
|
@@ -386,7 +366,6 @@ export default function Index() {
|
|
|
386
366
|
: "";
|
|
387
367
|
|
|
388
368
|
const trimmedPrompt = prompt.trim();
|
|
389
|
-
const sourceForContext = truncateSourceForContext(trimmedPrompt);
|
|
390
369
|
const hasImportedGoogleDocContext = trimmedPrompt.includes("<google-doc ");
|
|
391
370
|
const googleDocUrls = hasImportedGoogleDocContext
|
|
392
371
|
? []
|
|
@@ -426,13 +405,7 @@ export default function Index() {
|
|
|
426
405
|
|
|
427
406
|
const context = [
|
|
428
407
|
`The user just created a new empty deck (id: "${deck.id}") and wants to create a presentation or standalone visual.`,
|
|
429
|
-
"The
|
|
430
|
-
trimmedPrompt
|
|
431
|
-
? `User request / source material:\n${sourceForContext.text}`
|
|
432
|
-
: "User request / source material: create a new deck.",
|
|
433
|
-
sourceForContext.truncated
|
|
434
|
-
? `The pasted source was longer than ${MAX_SOURCE_CONTEXT_CHARS} characters, so only the first ${MAX_SOURCE_CONTEXT_CHARS} characters were included to keep the agent request reliable.`
|
|
435
|
-
: "",
|
|
408
|
+
"The visible user message above contains the user's request and/or pasted source material for the deck. Treat pasted memo content as source material even if the user did not explicitly say they are pasting it.",
|
|
436
409
|
googleDocContext,
|
|
437
410
|
fileContext,
|
|
438
411
|
designSystemContext,
|
|
@@ -466,11 +439,10 @@ export default function Index() {
|
|
|
466
439
|
clearPendingPromptForRetry();
|
|
467
440
|
setNewDeckInitialPrompt(null);
|
|
468
441
|
setNewDeckRetryFiles([]);
|
|
469
|
-
agentSubmit(
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
);
|
|
442
|
+
agentSubmit(createDeckAgentMessage(trimmedPrompt), context, {
|
|
443
|
+
newTab: true,
|
|
444
|
+
openSidebar: true,
|
|
445
|
+
});
|
|
474
446
|
navigate(`/deck/${deck.id}?generating=1`);
|
|
475
447
|
};
|
|
476
448
|
|
|
@@ -30,5 +30,8 @@ export const ASPECT_RATIO_VALUES = ["16:9", "1:1", "9:16", "4:5"] as const;
|
|
|
30
30
|
export const DEFAULT_ASPECT_RATIO: AspectRatio = "16:9";
|
|
31
31
|
|
|
32
32
|
export function getAspectRatioDims(ratio: AspectRatio | undefined | null) {
|
|
33
|
-
|
|
33
|
+
if (ratio && Object.prototype.hasOwnProperty.call(ASPECT_RATIOS, ratio)) {
|
|
34
|
+
return ASPECT_RATIOS[ratio];
|
|
35
|
+
}
|
|
36
|
+
return ASPECT_RATIOS[DEFAULT_ASPECT_RATIO];
|
|
34
37
|
}
|
|
@@ -7,6 +7,11 @@ inventory existing public kits and installed package seams. Use
|
|
|
7
7
|
`customizing-agent-native` for the configure → compose → eject → propose seam
|
|
8
8
|
ladder.
|
|
9
9
|
|
|
10
|
+
## Authoritative References
|
|
11
|
+
|
|
12
|
+
- [Feature docs](./docs/features/README.md) define product behavior and feature status.
|
|
13
|
+
- [Action definitions](./actions/) contain the canonical tool descriptions, input schemas, and implementations.
|
|
14
|
+
|
|
10
15
|
## Core Rules
|
|
11
16
|
|
|
12
17
|
- Never hardcode API keys, tokens, webhook URLs, signing secrets, private Builder/internal data, customer data, or credential-looking literals. Use secrets/OAuth/runtime configuration and obvious placeholders in examples.
|
|
@@ -16,34 +21,38 @@ ladder.
|
|
|
16
21
|
- Keep the action surface small: task CRUD actions plus `reorder-tasks`, `view-screen`, and `navigate`.
|
|
17
22
|
- Do not use `db-query` for normal task operations.
|
|
18
23
|
- Call `view-screen` first when the user's visible task context matters (especially on `/tasks`).
|
|
24
|
+
- Tasks are private to each user. Preserve `ownerEmail` scoping unless intentionally implementing sharing.
|
|
25
|
+
- The task detail panel exposes `tasks.task-detail.bottom` as an `ExtensionSlot` with `slotContext` containing `taskId`, `title`, `done`, and `fieldValues`.
|
|
19
26
|
|
|
20
27
|
## Actions
|
|
21
28
|
|
|
22
|
-
| Action
|
|
23
|
-
|
|
|
24
|
-
| `list-tasks`
|
|
25
|
-
| `create-task`
|
|
26
|
-
| `update-task`
|
|
27
|
-
| `delete-task`
|
|
28
|
-
| `bulk-update-tasks`
|
|
29
|
-
| `bulk-delete-tasks`
|
|
30
|
-
| `reorder-tasks`
|
|
31
|
-
| `list-inbox-items`
|
|
32
|
-
| `create-inbox-item`
|
|
33
|
-
| `update-inbox-item`
|
|
34
|
-
| `delete-inbox-item`
|
|
35
|
-
| `
|
|
36
|
-
| `
|
|
37
|
-
| `
|
|
38
|
-
| `
|
|
39
|
-
| `
|
|
40
|
-
| `
|
|
41
|
-
| `
|
|
42
|
-
| `
|
|
43
|
-
| `
|
|
44
|
-
| `
|
|
45
|
-
| `
|
|
46
|
-
| `
|
|
29
|
+
| Action | Method | Purpose |
|
|
30
|
+
| ----------------------------- | ------ | -------------------------------------------------------------------------------------------- |
|
|
31
|
+
| `list-tasks` | GET | List current user's tasks; `includeDone` and `includeFields` default to false |
|
|
32
|
+
| `create-task` | POST | Create a task with `title` |
|
|
33
|
+
| `update-task` | POST | Patch `title`, `done`, and/or `fieldValues` by `taskId` |
|
|
34
|
+
| `delete-task` | POST | Delete a task by `taskId` (confirm with user first) |
|
|
35
|
+
| `bulk-update-tasks` | POST | Patch `title` and/or `done` on multiple tasks by id |
|
|
36
|
+
| `bulk-delete-tasks` | POST | Delete multiple tasks by id (confirm with user first) |
|
|
37
|
+
| `reorder-tasks` | POST | Reorder visible tasks by id list top-to-bottom |
|
|
38
|
+
| `list-inbox-items` | GET | List current user's inbox items |
|
|
39
|
+
| `create-inbox-item` | POST | Create a not-ready inbox item with `title` (default chat capture) |
|
|
40
|
+
| `update-inbox-item` | POST | Patch inbox item `title` by `inboxItemId` |
|
|
41
|
+
| `delete-inbox-item` | POST | Delete an inbox item (confirm with user first) |
|
|
42
|
+
| `bulk-delete-inbox-items` | POST | Delete multiple inbox items by id (confirm with user first) |
|
|
43
|
+
| `mark-inbox-item-ready` | POST | Promote inbox item to an incomplete task |
|
|
44
|
+
| `bulk-mark-inbox-items-ready` | POST | Promote multiple inbox items to incomplete tasks by id |
|
|
45
|
+
| `reorder-inbox-items` | POST | Reorder inbox items by id list top-to-bottom |
|
|
46
|
+
| `list-custom-fields` | GET | List custom field definitions |
|
|
47
|
+
| `create-custom-field` | POST | Create a custom field definition with `title`, `type`, and optional `config` |
|
|
48
|
+
| `update-custom-field` | POST | Patch a field definition `title` and/or type-compatible `config`; type is immutable |
|
|
49
|
+
| `delete-custom-field` | POST | Delete a field definition and its values on every task (confirm with user first) |
|
|
50
|
+
| `reorder-custom-fields` | POST | Reorder custom field definitions by id list top-to-bottom |
|
|
51
|
+
| `list-visible-task-fields` | GET | List custom field ids shown on task cards for the current user |
|
|
52
|
+
| `update-visible-task-fields` | POST | Replace which custom fields appear on task cards (max 3) |
|
|
53
|
+
| `view-screen` | — | Read navigation, UI bulk selection, visible tasks, and inbox snapshot |
|
|
54
|
+
| `navigate` | — | Move UI to a view: `tasks`, `inbox`, `fields`, `extensions`, `team` (`home`/`ask` → `tasks`) |
|
|
55
|
+
| `render-task-list-inline` | — | Render an interactive task-list widget inline in chat without leaving the current view |
|
|
47
56
|
|
|
48
57
|
## Store Functions And Transactions
|
|
49
58
|
|
|
@@ -80,22 +89,6 @@ export type DbHandle = Pick<
|
|
|
80
89
|
|
|
81
90
|
## Commit Message Conventions
|
|
82
91
|
|
|
83
|
-
- Never include `Made-with: Cursor` in commit messages. Remove it if it appears
|
|
84
|
-
in a generated message.
|
|
85
|
-
- Use one of these prefixes:
|
|
86
|
-
- `feature: ...` or `feature(PROJECT): ...`
|
|
87
|
-
- `fix: ...` or `fix(PROJECT): ...`
|
|
88
|
-
- `refactor: ...` or `refactor(PROJECT): ...`
|
|
89
|
-
- `technical: ...` or `technical(PROJECT): ...`
|
|
90
|
-
- `chore: ...` or `chore(PROJECT): ...`
|
|
91
|
-
- `PROJECT` is optional. If provided, it must be one of `generator` or `web`.
|
|
92
|
-
- Before creating any commit, always:
|
|
93
|
-
- ask for confirmation,
|
|
94
|
-
- show the proposed commit message first,
|
|
95
|
-
- commit only after explicit user approval.
|
|
96
|
-
|
|
97
|
-
## Commit Message Conventions
|
|
98
|
-
|
|
99
92
|
- Never include `Made-with: Cursor` in commit messages. Remove it if it appears
|
|
100
93
|
in a generated message.
|
|
101
94
|
- Use one of these prefixes:
|
|
@@ -4,13 +4,20 @@ Task-list-first agent-native app. Default home is `/tasks`; chat handles capture
|
|
|
4
4
|
|
|
5
5
|
## TODO
|
|
6
6
|
|
|
7
|
-
- [ ] **
|
|
8
|
-
- [ ] **
|
|
9
|
-
- [ ] Extract shared action schema helpers (e.g. `taskId` field, title patch) once the action surface grows beyond MVP.
|
|
10
|
-
- [ ] Add route-level `ErrorBoundary` and `Suspense` around task list loading (align with other agent-native templates).
|
|
7
|
+
- [ ] **Runtime action discovery filtering** — Update `@agent-native/core` development action discovery to exclude colocated `*.test.*`, `*.spec.*`, and helper-only modules so they are never exposed as agent tools or HTTP action routes.
|
|
8
|
+
- [ ] **Optional event-triggered automations** — If Tasks needs workflows such as “when a task is completed, notify another system,” register stable domain events in `server/plugins/agent-chat.ts` and emit owner-scoped payloads from the successful write paths. Add event discovery, payload-validation, transition, and failure-isolation tests before exposing the events as a public automation contract.
|
|
11
9
|
- [ ] **`view-screen` agent snapshot** — Revisit `AGENT_TASKS_LIST_CAP` in `actions/view-screen.ts`: it caps the agent tool payload (token budget), not the UI list. Confirm whether `list` / `selectedItem` / `inListSnapshot` correctly represent what the user sees, tune or document the cap, and align with UI limits if needed. Also review Zod parsing of `navigation` / app-state selection keys for strictness vs backward compatibility.
|
|
12
|
-
- [ ] **Selection context** — Revisit prop drilling through `TaskList` → header/bar/rows once the composer stabilizes; a narrow context for `{ state, actions }` would trim wiring but must not blur the `dnd/` ↔ `selection/` boundary.
|
|
13
10
|
- [ ] **`TaskList` optimistic state** — Refactor manual `allTasks` buffer in `app/components/tasks/TaskList.tsx` to TanStack Query `onMutate` once exit animations and reorder rollback can share one cache strategy.
|
|
14
11
|
- [ ] **Exit-animation list reconcile** — Move exit-animation reconcile / `exitingIdsRef` out of `app/components/tasks/TaskList.tsx` into a neutral list helper (e.g. `use-ordered-tasks-with-exit-animation.ts`). That logic keeps completed rows visible during CSS exit when Show all is off; it is not DnD. `TaskList` should pass an ordered list into generic `SortableList`.
|
|
15
|
-
- Shared `ListRowPreview` (`app/components/shared/dnd/ListRowPreview.tsx`) still duplicates row chrome; render the live row in the overlay when `SortableList` can mount previews safely (see TODO in that file).
|
|
16
12
|
- [ ] **`move-tasks` / relative reorder (try on a separate branch)** — Today DnD persistence is FE-heavy: `SortableList` runs `reorderMovingItems` (`app/components/dnd/reorder-moving-items.ts`) to compute the **full visible id list**, then `TaskList` calls `reorder-tasks` with every id top-to-bottom. The BE already persists order via `server/tasks/store.ts` `reorderTasks` — no separate `bulkReorder` needed, but the **drop → order** translation is brittle (multi-select before/after/top/bottom edge cases). **Proposal:** add a relative move action, e.g. `move-tasks` with `{ taskIds, beforeId? | afterId?, includeDone? }` (or extend `reorder-tasks` with a relative mode). BE applies the block move, validates visible list / ownership, rewrites `sortOrder`, returns updated tasks. Keep **absolute** full-list `taskIds[]` as an escape hatch for agent/import flows. **FE after refactor:** dnd-kit still handles overlay/collision/optimistic UI, but on drop only derives `{ selected ids, anchor id, before | after }` from `over` + drag direction — delete most of `computeBlockInsertIndex`. **Prefer `beforeId`/`afterId` over `toIndex`** — matches user/agent language (“put these after task Z”) and avoids index ambiguity with `includeDone` / hidden rows. **Touch:** new `actions/move-tasks.ts`, `server/tasks/store.ts`, `use-tasks.ts`, `TaskList.tsx` / `InboxList.tsx`, agent prompt in `server/plugins/agent-chat.ts`, unit tests on store + thin FE mapping tests; keep `reorder-tasks` until callers migrate.
|
|
13
|
+
- [ ] **List pagination + virtualization (when volume warrants)** — `listStoredItems` is unbounded and rows render unvirtualized. Fine at personal-list volumes; if lists grow, adopt mail's pattern (`useInfiniteQuery` with page size 25 + `@tanstack/react-virtual` in `EmailList.tsx`). Parked by the 2026-07-17 sibling-parity review as a latent scaling concern, not an active bug.
|
|
14
|
+
|
|
15
|
+
## Optional improvements
|
|
16
|
+
|
|
17
|
+
Reviewed against sibling templates (starter, mail, content, calendar, plan): none of these has an established cross-template convention to adopt, so they are optional polish rather than alignment work.
|
|
18
|
+
|
|
19
|
+
- [ ] **Delete dialog wiring** — `TaskList` and `InboxList` duplicate single/bulk delete dialog state (`pendingDeleteId`, `bulkDeleteOpen`, confirm handlers, toast on bulk success); a shared `useDeleteDialogs` hook could own that wiring. Siblings: no template has a shared delete-confirm hook — each inlines shadcn `AlertDialog` per call site (calendar's `DeleteEventDialog` is feature-specific). tasks' shared `DeleteItemDialog`/`BulkDeleteDialog` components already lead here; this would be a net-new pattern, not adoption.
|
|
20
|
+
- [ ] **Shared action schema helpers** — Extract shared helpers (e.g. `taskId` field, title patch) if duplication grows. Siblings: no template has generic schema helpers — every action inlines `z.object({...})` in `defineAction`; the only shared primitives are feature-specific (clips' `booleanParam`, tasks' own `boolean-query-param`). Wait for a concrete third duplication before abstracting.
|
|
21
|
+
- [ ] **Custom `ErrorBoundary` copy** — tasks already exports the root-level `ErrorBoundary` (re-export from `@agent-native/core/client`), which is full boundary parity: no template has per-route boundaries, and `Suspense` only wraps `lazy()` components — data loads through react-query, not loaders. The only optional delta: mail and content (2 of 4) replace the re-export with custom copy plus `ErrorReportActions` (send feedback / open issue).
|
|
22
|
+
- [ ] **Task attachments** — no `@agent-native/core/file-upload` usage anywhere, though `.gitignore` already carries the standard `data/uploads/` entry. mail/content/plan use the framework file-upload module. A product decision, not an alignment gap.
|
|
23
|
+
- [ ] **Selection context** — Revisit prop drilling through `TaskList` → header/bar/rows; a narrow `{ state, actions }` context would trim wiring but must not blur the `dnd/` ↔ `selection/` boundary. Siblings: no template uses a React context for list multi-select — the universal pattern is a `useState<Set<string>>` hook plus prop drilling (mail's `EmailList` passes `selectedIds` down as props), and tasks' `use-list-selection.ts` is already the most generalized version of it.
|
|
@@ -4,16 +4,18 @@ import { z } from "zod";
|
|
|
4
4
|
import { deleteInboxItems, requireUserEmail } from "../server/inbox/store.js";
|
|
5
5
|
import { BULK_ID_LIMIT } from "../shared/bulk-limits.js";
|
|
6
6
|
|
|
7
|
+
export const bulkDeleteInboxItemsSchema = z.object({
|
|
8
|
+
inboxItemIds: z
|
|
9
|
+
.array(z.string())
|
|
10
|
+
.min(1)
|
|
11
|
+
.max(BULK_ID_LIMIT)
|
|
12
|
+
.describe("Inbox item ids to delete"),
|
|
13
|
+
});
|
|
14
|
+
|
|
7
15
|
export default defineAction({
|
|
8
16
|
description:
|
|
9
|
-
"Delete multiple inbox items permanently. Ask the user to confirm before calling.",
|
|
10
|
-
schema:
|
|
11
|
-
inboxItemIds: z
|
|
12
|
-
.array(z.string())
|
|
13
|
-
.min(1)
|
|
14
|
-
.max(BULK_ID_LIMIT)
|
|
15
|
-
.describe("Inbox item ids to delete"),
|
|
16
|
-
}),
|
|
17
|
+
"Delete multiple inbox items permanently. Use delete-inbox-item for one item. Ask the user to confirm before calling.",
|
|
18
|
+
schema: bulkDeleteInboxItemsSchema,
|
|
17
19
|
run: async (args, ctx) => {
|
|
18
20
|
const ownerEmail = requireUserEmail(ctx?.userEmail);
|
|
19
21
|
return deleteInboxItems({
|
|
@@ -4,16 +4,18 @@ import { z } from "zod";
|
|
|
4
4
|
import { deleteTasks, requireUserEmail } from "../server/tasks/store.js";
|
|
5
5
|
import { BULK_ID_LIMIT } from "../shared/bulk-limits.js";
|
|
6
6
|
|
|
7
|
+
export const bulkDeleteTasksSchema = z.object({
|
|
8
|
+
taskIds: z
|
|
9
|
+
.array(z.string())
|
|
10
|
+
.min(1)
|
|
11
|
+
.max(BULK_ID_LIMIT)
|
|
12
|
+
.describe("Task ids to delete"),
|
|
13
|
+
});
|
|
14
|
+
|
|
7
15
|
export default defineAction({
|
|
8
16
|
description:
|
|
9
|
-
"Delete multiple tasks permanently. Ask the user to confirm before calling.",
|
|
10
|
-
schema:
|
|
11
|
-
taskIds: z
|
|
12
|
-
.array(z.string())
|
|
13
|
-
.min(1)
|
|
14
|
-
.max(BULK_ID_LIMIT)
|
|
15
|
-
.describe("Task ids to delete"),
|
|
16
|
-
}),
|
|
17
|
+
"Delete multiple tasks permanently. Use delete-task for one task. Ask the user to confirm before calling.",
|
|
18
|
+
schema: bulkDeleteTasksSchema,
|
|
17
19
|
run: async (args, ctx) => {
|
|
18
20
|
const ownerEmail = requireUserEmail(ctx?.userEmail);
|
|
19
21
|
return deleteTasks({ ownerEmail, ids: args.taskIds });
|
|
@@ -9,7 +9,7 @@ import { BULK_ID_LIMIT } from "../shared/bulk-limits.js";
|
|
|
9
9
|
|
|
10
10
|
export default defineAction({
|
|
11
11
|
description:
|
|
12
|
-
"Promote multiple inbox items to incomplete tasks in one atomic batch.",
|
|
12
|
+
"Promote multiple inbox items to incomplete tasks in one atomic batch, preserving their ids. Use mark-inbox-item-ready for one item.",
|
|
13
13
|
schema: z.object({
|
|
14
14
|
inboxItemIds: z
|
|
15
15
|
.array(z.string())
|
|
@@ -5,18 +5,20 @@ import { UserInputError } from "../server/errors.js";
|
|
|
5
5
|
import { requireUserEmail, updateTasks } from "../server/tasks/store.js";
|
|
6
6
|
import { BULK_ID_LIMIT } from "../shared/bulk-limits.js";
|
|
7
7
|
|
|
8
|
+
export const bulkUpdateTasksSchema = z.object({
|
|
9
|
+
taskIds: z
|
|
10
|
+
.array(z.string())
|
|
11
|
+
.min(1)
|
|
12
|
+
.max(BULK_ID_LIMIT)
|
|
13
|
+
.describe("Task ids to update"),
|
|
14
|
+
title: z.string().min(1).optional().describe("New title for every task"),
|
|
15
|
+
done: z.boolean().optional().describe("Completion state for every task"),
|
|
16
|
+
});
|
|
17
|
+
|
|
8
18
|
export default defineAction({
|
|
9
19
|
description:
|
|
10
|
-
"
|
|
11
|
-
schema:
|
|
12
|
-
taskIds: z
|
|
13
|
-
.array(z.string())
|
|
14
|
-
.min(1)
|
|
15
|
-
.max(BULK_ID_LIMIT)
|
|
16
|
-
.describe("Task ids to update"),
|
|
17
|
-
title: z.string().min(1).optional().describe("New title for every task"),
|
|
18
|
-
done: z.boolean().optional().describe("Completion state for every task"),
|
|
19
|
-
}),
|
|
20
|
+
"Apply the same title and/or completion state to multiple tasks. Use update-task for one task or custom field values.",
|
|
21
|
+
schema: bulkUpdateTasksSchema,
|
|
20
22
|
run: async (args, ctx) => {
|
|
21
23
|
const ownerEmail = requireUserEmail(ctx?.userEmail);
|
|
22
24
|
if (args.title === undefined && args.done === undefined) {
|
|
@@ -5,11 +5,14 @@ import { z } from "zod";
|
|
|
5
5
|
import { createInboxItem, requireUserEmail } from "../server/inbox/store.js";
|
|
6
6
|
import type { InboxItem } from "../server/inbox/store.js";
|
|
7
7
|
|
|
8
|
+
export const createInboxItemSchema = z.object({
|
|
9
|
+
title: z.string().min(1).describe("Inbox item title"),
|
|
10
|
+
});
|
|
11
|
+
|
|
8
12
|
export default defineAction({
|
|
9
|
-
description:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}),
|
|
13
|
+
description:
|
|
14
|
+
"Create a not-ready inbox item for later triage. Use create-task when the user explicitly wants it added directly to the task list.",
|
|
15
|
+
schema: createInboxItemSchema,
|
|
13
16
|
run: async (args, ctx) => {
|
|
14
17
|
const ownerEmail = requireUserEmail(ctx?.userEmail);
|
|
15
18
|
const item = await createInboxItem({ ownerEmail, title: args.title });
|
|
@@ -9,7 +9,8 @@ import {
|
|
|
9
9
|
} from "../server/tasks/store.js";
|
|
10
10
|
|
|
11
11
|
export default defineAction({
|
|
12
|
-
description:
|
|
12
|
+
description:
|
|
13
|
+
"Create an incomplete task directly on the task list. Use create-inbox-item for a quick capture to triage later.",
|
|
13
14
|
schema: z.object({
|
|
14
15
|
title: z.string().min(1).describe("Task title"),
|
|
15
16
|
}),
|
|
@@ -3,12 +3,14 @@ import { z } from "zod";
|
|
|
3
3
|
|
|
4
4
|
import { deleteInboxItem, requireUserEmail } from "../server/inbox/store.js";
|
|
5
5
|
|
|
6
|
+
export const deleteInboxItemSchema = z.object({
|
|
7
|
+
inboxItemId: z.string().describe("Inbox item id"),
|
|
8
|
+
});
|
|
9
|
+
|
|
6
10
|
export default defineAction({
|
|
7
11
|
description:
|
|
8
|
-
"Delete
|
|
9
|
-
schema:
|
|
10
|
-
inboxItemId: z.string().describe("Inbox item id"),
|
|
11
|
-
}),
|
|
12
|
+
"Delete one inbox item permanently. Use bulk-delete-inbox-items for multiple items. Ask the user to confirm before calling.",
|
|
13
|
+
schema: deleteInboxItemSchema,
|
|
12
14
|
run: async (args, ctx) => {
|
|
13
15
|
const ownerEmail = requireUserEmail(ctx?.userEmail);
|
|
14
16
|
await deleteInboxItem({ ownerEmail, id: args.inboxItemId });
|
|
@@ -5,7 +5,7 @@ import { deleteTask, requireUserEmail } from "../server/tasks/store.js";
|
|
|
5
5
|
|
|
6
6
|
export default defineAction({
|
|
7
7
|
description:
|
|
8
|
-
"Delete
|
|
8
|
+
"Delete one task permanently. Use bulk-delete-tasks for multiple tasks. Ask the user to confirm before calling.",
|
|
9
9
|
schema: z.object({
|
|
10
10
|
taskId: z.string().describe("Task id"),
|
|
11
11
|
}),
|
|
@@ -3,9 +3,11 @@ import { z } from "zod";
|
|
|
3
3
|
|
|
4
4
|
import { listInboxItems, requireUserEmail } from "../server/inbox/store.js";
|
|
5
5
|
|
|
6
|
+
export const listInboxItemsSchema = z.object({});
|
|
7
|
+
|
|
6
8
|
export default defineAction({
|
|
7
|
-
description: "List inbox items
|
|
8
|
-
schema:
|
|
9
|
+
description: "List not-ready inbox items awaiting triage.",
|
|
10
|
+
schema: listInboxItemsSchema,
|
|
9
11
|
http: { method: "GET" },
|
|
10
12
|
readOnly: true,
|
|
11
13
|
run: async (_args, ctx) => {
|
|
@@ -4,10 +4,12 @@ import { z } from "zod";
|
|
|
4
4
|
import { requireUserEmail } from "../server/custom-fields/store.js";
|
|
5
5
|
import { getTaskCardFieldIds } from "../server/user-config/store.js";
|
|
6
6
|
|
|
7
|
+
export const listVisibleTaskFieldsSchema = z.object({});
|
|
8
|
+
|
|
7
9
|
export default defineAction({
|
|
8
10
|
description:
|
|
9
11
|
"List custom field ids currently shown on task cards for the current user.",
|
|
10
|
-
schema:
|
|
12
|
+
schema: listVisibleTaskFieldsSchema,
|
|
11
13
|
http: { method: "GET" },
|
|
12
14
|
readOnly: true,
|
|
13
15
|
run: async (_args, ctx) => {
|
|
@@ -5,12 +5,14 @@ import { z } from "zod";
|
|
|
5
5
|
import { markInboxItemReady, requireUserEmail } from "../server/inbox/store.js";
|
|
6
6
|
import type { Task } from "../server/tasks/store.js";
|
|
7
7
|
|
|
8
|
+
export const markInboxItemReadySchema = z.object({
|
|
9
|
+
inboxItemId: z.string().describe("Inbox item id"),
|
|
10
|
+
});
|
|
11
|
+
|
|
8
12
|
export default defineAction({
|
|
9
13
|
description:
|
|
10
|
-
"
|
|
11
|
-
schema:
|
|
12
|
-
inboxItemId: z.string().describe("Inbox item id"),
|
|
13
|
-
}),
|
|
14
|
+
"Promote one inbox item to an incomplete task, preserving its id. Use bulk-mark-inbox-items-ready for multiple items.",
|
|
15
|
+
schema: markInboxItemReadySchema,
|
|
14
16
|
run: async (args, ctx) => {
|
|
15
17
|
const ownerEmail = requireUserEmail(ctx?.userEmail);
|
|
16
18
|
return markInboxItemReady({ ownerEmail, id: args.inboxItemId });
|
|
@@ -21,22 +21,24 @@ import { optionalBooleanQueryParam } from "./lib/boolean-query-param.js";
|
|
|
21
21
|
|
|
22
22
|
const viewSchema = z.enum(NAV_VIEW_INPUTS);
|
|
23
23
|
|
|
24
|
+
export const navigateSchema = z.object({
|
|
25
|
+
view: viewSchema.describe(
|
|
26
|
+
"View name to navigate to; home and ask are aliases for tasks",
|
|
27
|
+
),
|
|
28
|
+
taskId: z.string().optional().describe("Selected task id on /tasks"),
|
|
29
|
+
fieldId: z
|
|
30
|
+
.string()
|
|
31
|
+
.optional()
|
|
32
|
+
.describe("Selected custom field id on /fields"),
|
|
33
|
+
includeDone: optionalBooleanQueryParam().describe(
|
|
34
|
+
"When true, show completed tasks on /tasks",
|
|
35
|
+
),
|
|
36
|
+
});
|
|
37
|
+
|
|
24
38
|
export default defineAction({
|
|
25
39
|
description:
|
|
26
|
-
"Navigate the UI to a
|
|
27
|
-
schema:
|
|
28
|
-
view: viewSchema.describe(
|
|
29
|
-
"View name to navigate to; home and ask are aliases for tasks",
|
|
30
|
-
),
|
|
31
|
-
taskId: z.string().optional().describe("Selected task id on /tasks"),
|
|
32
|
-
fieldId: z
|
|
33
|
-
.string()
|
|
34
|
-
.optional()
|
|
35
|
-
.describe("Selected custom field id on /fields"),
|
|
36
|
-
includeDone: optionalBooleanQueryParam().describe(
|
|
37
|
-
"When true, show completed tasks on /tasks",
|
|
38
|
-
),
|
|
39
|
-
}),
|
|
40
|
+
"Navigate the Tasks UI to a view, optionally selecting a task or custom field.",
|
|
41
|
+
schema: navigateSchema,
|
|
40
42
|
http: false,
|
|
41
43
|
run: async (args) => {
|
|
42
44
|
const view = resolveNavView(args.view);
|
|
@@ -4,16 +4,18 @@ import { z } from "zod";
|
|
|
4
4
|
import { reorderInboxItems, requireUserEmail } from "../server/inbox/store.js";
|
|
5
5
|
import { BULK_ID_LIMIT } from "../shared/bulk-limits.js";
|
|
6
6
|
|
|
7
|
+
export const reorderInboxItemsSchema = z.object({
|
|
8
|
+
inboxItemIds: z
|
|
9
|
+
.array(z.string())
|
|
10
|
+
.min(1)
|
|
11
|
+
.max(BULK_ID_LIMIT)
|
|
12
|
+
.describe("Inbox item ids in the desired order from top to bottom."),
|
|
13
|
+
});
|
|
14
|
+
|
|
7
15
|
export default defineAction({
|
|
8
16
|
description:
|
|
9
17
|
"Reorder the inbox list by passing inbox item ids top-to-bottom.",
|
|
10
|
-
schema:
|
|
11
|
-
inboxItemIds: z
|
|
12
|
-
.array(z.string())
|
|
13
|
-
.min(1)
|
|
14
|
-
.max(BULK_ID_LIMIT)
|
|
15
|
-
.describe("Inbox item ids in the desired order from top to bottom."),
|
|
16
|
-
}),
|
|
18
|
+
schema: reorderInboxItemsSchema,
|
|
17
19
|
run: async (args, ctx) => {
|
|
18
20
|
const ownerEmail = requireUserEmail(ctx?.userEmail);
|
|
19
21
|
return reorderInboxItems({
|