@agent-native/core 0.109.2 → 0.109.4
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 +16 -0
- package/corpus/core/docs/content/agent-native-toolkit.mdx +46 -13
- package/corpus/core/docs/content/locales/ar-SA/agent-native-toolkit.mdx +79 -55
- package/corpus/core/docs/content/locales/ar-SA/toolkit-capability-packages.mdx +21 -0
- package/corpus/core/docs/content/locales/ar-SA/toolkit-context-knowledge.mdx +12 -0
- package/corpus/core/docs/content/locales/ar-SA/toolkit-editors-canvases.mdx +17 -0
- package/corpus/core/docs/content/locales/de-DE/agent-native-toolkit.mdx +82 -54
- package/corpus/core/docs/content/locales/de-DE/toolkit-capability-packages.mdx +21 -0
- package/corpus/core/docs/content/locales/de-DE/toolkit-context-knowledge.mdx +12 -0
- package/corpus/core/docs/content/locales/de-DE/toolkit-editors-canvases.mdx +17 -0
- package/corpus/core/docs/content/locales/es-ES/agent-native-toolkit.mdx +81 -52
- package/corpus/core/docs/content/locales/es-ES/toolkit-capability-packages.mdx +21 -0
- package/corpus/core/docs/content/locales/es-ES/toolkit-context-knowledge.mdx +12 -0
- package/corpus/core/docs/content/locales/es-ES/toolkit-editors-canvases.mdx +21 -0
- package/corpus/core/docs/content/locales/fr-FR/agent-native-toolkit.mdx +84 -54
- package/corpus/core/docs/content/locales/fr-FR/toolkit-capability-packages.mdx +21 -0
- package/corpus/core/docs/content/locales/fr-FR/toolkit-context-knowledge.mdx +12 -0
- package/corpus/core/docs/content/locales/fr-FR/toolkit-editors-canvases.mdx +21 -0
- package/corpus/core/docs/content/locales/hi-IN/agent-native-toolkit.mdx +69 -62
- package/corpus/core/docs/content/locales/hi-IN/toolkit-capability-packages.mdx +21 -0
- package/corpus/core/docs/content/locales/hi-IN/toolkit-context-knowledge.mdx +12 -0
- package/corpus/core/docs/content/locales/hi-IN/toolkit-editors-canvases.mdx +17 -0
- package/corpus/core/docs/content/locales/ja-JP/agent-native-toolkit.mdx +69 -62
- package/corpus/core/docs/content/locales/ja-JP/toolkit-capability-packages.mdx +21 -0
- package/corpus/core/docs/content/locales/ja-JP/toolkit-context-knowledge.mdx +12 -0
- package/corpus/core/docs/content/locales/ja-JP/toolkit-editors-canvases.mdx +17 -0
- package/corpus/core/docs/content/locales/ko-KR/agent-native-toolkit.mdx +69 -62
- package/corpus/core/docs/content/locales/ko-KR/toolkit-capability-packages.mdx +21 -0
- package/corpus/core/docs/content/locales/ko-KR/toolkit-context-knowledge.mdx +12 -0
- package/corpus/core/docs/content/locales/ko-KR/toolkit-editors-canvases.mdx +17 -0
- package/corpus/core/docs/content/locales/pt-BR/agent-native-toolkit.mdx +82 -54
- package/corpus/core/docs/content/locales/pt-BR/toolkit-capability-packages.mdx +21 -0
- package/corpus/core/docs/content/locales/pt-BR/toolkit-context-knowledge.mdx +12 -0
- package/corpus/core/docs/content/locales/pt-BR/toolkit-editors-canvases.mdx +17 -0
- package/corpus/core/docs/content/locales/zh-CN/agent-native-toolkit.mdx +69 -62
- package/corpus/core/docs/content/locales/zh-CN/toolkit-capability-packages.mdx +21 -0
- package/corpus/core/docs/content/locales/zh-CN/toolkit-context-knowledge.mdx +12 -0
- package/corpus/core/docs/content/locales/zh-CN/toolkit-editors-canvases.mdx +17 -0
- package/corpus/core/docs/content/locales/zh-TW/agent-native-toolkit.mdx +69 -62
- package/corpus/core/docs/content/locales/zh-TW/toolkit-capability-packages.mdx +21 -0
- package/corpus/core/docs/content/locales/zh-TW/toolkit-context-knowledge.mdx +12 -0
- package/corpus/core/docs/content/locales/zh-TW/toolkit-editors-canvases.mdx +17 -0
- package/corpus/core/docs/content/toolkit-capability-packages.mdx +52 -0
- package/corpus/core/docs/content/toolkit-context-knowledge.mdx +46 -0
- package/corpus/core/docs/content/toolkit-editors-canvases.mdx +55 -0
- package/corpus/core/package.json +35 -34
- package/corpus/core/src/cli/create.ts +57 -15
- package/corpus/core/src/cli/package-lifecycle.ts +2 -0
- package/corpus/core/src/cli/skills-content/visual-plan-skill.ts +2 -0
- package/corpus/core/src/client/context-xray/ContextMeter.tsx +31 -111
- package/corpus/core/src/client/context-xray/ContextSegmentRow.tsx +8 -111
- package/corpus/core/src/client/context-xray/ContextTreemap.tsx +6 -111
- package/corpus/core/src/client/context-xray/ContextXRayPanel.tsx +31 -391
- package/corpus/core/src/client/context-xray/SegmentProvenancePopover.tsx +4 -52
- package/corpus/core/src/client/context-xray/format.ts +0 -33
- package/corpus/core/src/client/require-session.tsx +19 -3
- package/corpus/core/src/client/rich-markdown-editor/index.ts +42 -57
- package/corpus/core/src/client/rich-markdown-editor/uploadEditorImage.ts +2 -1
- package/corpus/core/src/client/use-action.ts +145 -2
- package/corpus/core/src/client/use-session.ts +79 -48
- package/corpus/core/src/client/visual-style-controls.tsx +1 -1088
- package/corpus/core/src/collab/agent-identity.ts +5 -22
- package/corpus/core/src/collab/client.ts +1 -53
- package/corpus/core/src/db/client.ts +13 -7
- package/corpus/core/src/db/create-get-db.ts +20 -13
- package/corpus/core/src/db/request-telemetry.ts +154 -0
- package/corpus/core/src/integrations/index.ts +1 -0
- package/corpus/core/src/integrations/plugin.ts +9 -3
- package/corpus/core/src/integrations/remote-push-delivery-job.ts +48 -0
- package/corpus/core/src/integrations/remote-push-delivery.ts +370 -0
- package/corpus/core/src/integrations/remote-push-store.ts +275 -26
- package/corpus/core/src/server/better-auth-instance.ts +11 -3
- package/corpus/core/src/server/core-routes-plugin.ts +36 -14
- package/corpus/core/src/server/framework-request-handler.ts +11 -1
- package/corpus/core/src/server/http-response-telemetry.ts +233 -31
- package/corpus/core/src/styles/rich-markdown-editor.css +1 -510
- package/corpus/core/src/templates/workspace-core/.agents/skills/tracking/SKILL.md +19 -0
- package/corpus/core/src/testing.ts +1 -1
- package/corpus/core/src/vite/client.ts +3 -0
- package/corpus/templates/clips/actions/finalize-recording.ts +3 -1
- package/corpus/templates/clips/actions/set-mobile-capture-state.ts +4 -1
- package/corpus/templates/clips/app/components/library/library-layout.tsx +1 -6
- package/corpus/templates/clips/changelog/2026-07-18-new-recording-is-now-emphasized-as-the-primary-action-in-the.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-18-recordings-now-remain-safely-recoverable-until-the-stored-me.md +6 -0
- package/corpus/templates/content/app/components/editor/VisualEditor.tsx +5 -3
- package/corpus/templates/content/app/components/editor/extensions/DragHandle.tsx +4 -4
- package/corpus/templates/content/package.json +25 -25
- package/corpus/templates/design/app/components/design/TweaksPanel.tsx +2 -1
- package/corpus/templates/design/package.json +1 -1
- package/corpus/templates/mail/package.json +9 -9
- package/corpus/templates/plan/.agents/skills/visual-plan/SKILL.md +2 -0
- package/corpus/templates/plan/app/components/editor/PlanDocumentEditor.tsx +8 -8
- package/corpus/templates/plan/app/components/editor/planSlashCommands.ts +6 -6
- package/corpus/templates/plan/app/components/plan/PlanImageNode.tsx +4 -7
- package/corpus/templates/plan/app/components/plan/PlanMarkdownEditor.tsx +6 -4
- package/corpus/templates/plan/app/components/plan/PlanVisualSurface.tsx +1 -1
- package/corpus/templates/plan/changelog/2026-07-18-visual-plans-now-open-on-wireframes-by-default-when-a-protot.md +6 -0
- package/corpus/templates/plan/package.json +3 -3
- package/corpus/templates/slides/app/components/editor/SlideStyleInspector.tsx +2 -2
- package/corpus/templates/slides/app/components/editor/TweaksPanel.tsx +2 -2
- package/corpus/templates/slides/package.json +13 -13
- package/corpus/templates/tasks/AGENTS.md +3 -0
- package/corpus/templates/tasks/actions/render-task-list-inline.ts +202 -0
- package/corpus/templates/tasks/changelog/2026-07-18-task-lists-can-now-appear-as-interactive-widgets-inline-in-c.md +6 -0
- package/corpus/templates/tasks/docs/features/f8-chat.mdx +2 -0
- package/corpus/templates/tasks/server/plugins/agent-chat.ts +2 -0
- package/dist/catalog.json +39 -1
- package/dist/cli/create.d.ts +10 -1
- package/dist/cli/create.d.ts.map +1 -1
- package/dist/cli/create.js +49 -16
- package/dist/cli/create.js.map +1 -1
- package/dist/cli/package-lifecycle.d.ts.map +1 -1
- package/dist/cli/package-lifecycle.js +2 -0
- package/dist/cli/package-lifecycle.js.map +1 -1
- package/dist/cli/skills-content/visual-plan-skill.d.ts +1 -1
- package/dist/cli/skills-content/visual-plan-skill.d.ts.map +1 -1
- package/dist/cli/skills-content/visual-plan-skill.js +2 -0
- package/dist/cli/skills-content/visual-plan-skill.js.map +1 -1
- package/dist/client/context-xray/ContextMeter.d.ts.map +1 -1
- package/dist/client/context-xray/ContextMeter.js +8 -23
- package/dist/client/context-xray/ContextMeter.js.map +1 -1
- package/dist/client/context-xray/ContextSegmentRow.d.ts.map +1 -1
- package/dist/client/context-xray/ContextSegmentRow.js +3 -19
- package/dist/client/context-xray/ContextSegmentRow.js.map +1 -1
- package/dist/client/context-xray/ContextTreemap.d.ts.map +1 -1
- package/dist/client/context-xray/ContextTreemap.js +3 -54
- package/dist/client/context-xray/ContextTreemap.js.map +1 -1
- package/dist/client/context-xray/ContextXRayPanel.d.ts.map +1 -1
- package/dist/client/context-xray/ContextXRayPanel.js +21 -163
- package/dist/client/context-xray/ContextXRayPanel.js.map +1 -1
- package/dist/client/context-xray/SegmentProvenancePopover.d.ts.map +1 -1
- package/dist/client/context-xray/SegmentProvenancePopover.js +3 -4
- package/dist/client/context-xray/SegmentProvenancePopover.js.map +1 -1
- package/dist/client/context-xray/format.d.ts +0 -4
- package/dist/client/context-xray/format.d.ts.map +1 -1
- package/dist/client/context-xray/format.js +0 -49
- package/dist/client/context-xray/format.js.map +1 -1
- package/dist/client/require-session.d.ts.map +1 -1
- package/dist/client/require-session.js +6 -3
- package/dist/client/require-session.js.map +1 -1
- package/dist/client/rich-markdown-editor/index.d.ts +1 -12
- package/dist/client/rich-markdown-editor/index.d.ts.map +1 -1
- package/dist/client/rich-markdown-editor/index.js +1 -12
- package/dist/client/rich-markdown-editor/index.js.map +1 -1
- package/dist/client/rich-markdown-editor/uploadEditorImage.d.ts +1 -1
- package/dist/client/rich-markdown-editor/uploadEditorImage.d.ts.map +1 -1
- package/dist/client/rich-markdown-editor/uploadEditorImage.js.map +1 -1
- package/dist/client/use-action.d.ts.map +1 -1
- package/dist/client/use-action.js +117 -1
- package/dist/client/use-action.js.map +1 -1
- package/dist/client/use-session.d.ts.map +1 -1
- package/dist/client/use-session.js +72 -50
- package/dist/client/use-session.js.map +1 -1
- package/dist/client/visual-style-controls.d.ts +1 -89
- package/dist/client/visual-style-controls.d.ts.map +1 -1
- package/dist/client/visual-style-controls.js +1 -498
- package/dist/client/visual-style-controls.js.map +1 -1
- package/dist/collab/agent-identity.d.ts +1 -14
- package/dist/collab/agent-identity.d.ts.map +1 -1
- package/dist/collab/agent-identity.js +1 -13
- package/dist/collab/agent-identity.js.map +1 -1
- package/dist/collab/awareness.d.ts +2 -2
- package/dist/collab/awareness.d.ts.map +1 -1
- package/dist/collab/client.d.ts +1 -19
- package/dist/collab/client.d.ts.map +1 -1
- package/dist/collab/client.js +1 -53
- package/dist/collab/client.js.map +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/db/client.d.ts.map +1 -1
- package/dist/db/client.js +7 -1
- package/dist/db/client.js.map +1 -1
- package/dist/db/create-get-db.d.ts +3 -6
- package/dist/db/create-get-db.d.ts.map +1 -1
- package/dist/db/create-get-db.js +9 -2
- package/dist/db/create-get-db.js.map +1 -1
- package/dist/db/request-telemetry.d.ts +23 -0
- package/dist/db/request-telemetry.d.ts.map +1 -0
- package/dist/db/request-telemetry.js +95 -0
- package/dist/db/request-telemetry.js.map +1 -0
- package/dist/integrations/index.d.ts +1 -0
- package/dist/integrations/index.d.ts.map +1 -1
- package/dist/integrations/index.js +1 -0
- package/dist/integrations/index.js.map +1 -1
- package/dist/integrations/plugin.d.ts.map +1 -1
- package/dist/integrations/plugin.js +8 -3
- package/dist/integrations/plugin.js.map +1 -1
- package/dist/integrations/remote-push-delivery-job.d.ts +4 -0
- package/dist/integrations/remote-push-delivery-job.d.ts.map +1 -0
- package/dist/integrations/remote-push-delivery-job.js +44 -0
- package/dist/integrations/remote-push-delivery-job.js.map +1 -0
- package/dist/integrations/remote-push-delivery.d.ts +11 -0
- package/dist/integrations/remote-push-delivery.d.ts.map +1 -0
- package/dist/integrations/remote-push-delivery.js +265 -0
- package/dist/integrations/remote-push-delivery.js.map +1 -0
- package/dist/integrations/remote-push-store.d.ts +33 -0
- package/dist/integrations/remote-push-store.d.ts.map +1 -1
- package/dist/integrations/remote-push-store.js +195 -26
- package/dist/integrations/remote-push-store.js.map +1 -1
- package/dist/notifications/routes.d.ts +3 -3
- package/dist/progress/routes.d.ts +1 -1
- package/dist/provider-api/corpus-jobs.d.ts +2 -2
- package/dist/resources/handlers.d.ts +3 -3
- package/dist/secrets/routes.d.ts +9 -9
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/better-auth-instance.js +7 -3
- package/dist/server/better-auth-instance.js.map +1 -1
- package/dist/server/core-routes-plugin.d.ts +8 -0
- package/dist/server/core-routes-plugin.d.ts.map +1 -1
- package/dist/server/core-routes-plugin.js +23 -8
- package/dist/server/core-routes-plugin.js.map +1 -1
- package/dist/server/framework-request-handler.d.ts.map +1 -1
- package/dist/server/framework-request-handler.js +9 -1
- package/dist/server/framework-request-handler.js.map +1 -1
- package/dist/server/http-response-telemetry.d.ts +3 -2
- package/dist/server/http-response-telemetry.d.ts.map +1 -1
- package/dist/server/http-response-telemetry.js +160 -27
- package/dist/server/http-response-telemetry.js.map +1 -1
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/dist/styles/rich-markdown-editor.css +1 -510
- package/dist/templates/workspace-core/.agents/skills/tracking/SKILL.md +19 -0
- package/dist/testing.d.ts +1 -1
- package/dist/testing.d.ts.map +1 -1
- package/dist/testing.js +1 -1
- package/dist/testing.js.map +1 -1
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +3 -0
- package/dist/vite/client.js.map +1 -1
- package/docs/content/agent-native-toolkit.mdx +46 -13
- package/docs/content/locales/ar-SA/agent-native-toolkit.mdx +79 -55
- package/docs/content/locales/ar-SA/toolkit-capability-packages.mdx +21 -0
- package/docs/content/locales/ar-SA/toolkit-context-knowledge.mdx +12 -0
- package/docs/content/locales/ar-SA/toolkit-editors-canvases.mdx +17 -0
- package/docs/content/locales/de-DE/agent-native-toolkit.mdx +82 -54
- package/docs/content/locales/de-DE/toolkit-capability-packages.mdx +21 -0
- package/docs/content/locales/de-DE/toolkit-context-knowledge.mdx +12 -0
- package/docs/content/locales/de-DE/toolkit-editors-canvases.mdx +17 -0
- package/docs/content/locales/es-ES/agent-native-toolkit.mdx +81 -52
- package/docs/content/locales/es-ES/toolkit-capability-packages.mdx +21 -0
- package/docs/content/locales/es-ES/toolkit-context-knowledge.mdx +12 -0
- package/docs/content/locales/es-ES/toolkit-editors-canvases.mdx +21 -0
- package/docs/content/locales/fr-FR/agent-native-toolkit.mdx +84 -54
- package/docs/content/locales/fr-FR/toolkit-capability-packages.mdx +21 -0
- package/docs/content/locales/fr-FR/toolkit-context-knowledge.mdx +12 -0
- package/docs/content/locales/fr-FR/toolkit-editors-canvases.mdx +21 -0
- package/docs/content/locales/hi-IN/agent-native-toolkit.mdx +69 -62
- package/docs/content/locales/hi-IN/toolkit-capability-packages.mdx +21 -0
- package/docs/content/locales/hi-IN/toolkit-context-knowledge.mdx +12 -0
- package/docs/content/locales/hi-IN/toolkit-editors-canvases.mdx +17 -0
- package/docs/content/locales/ja-JP/agent-native-toolkit.mdx +69 -62
- package/docs/content/locales/ja-JP/toolkit-capability-packages.mdx +21 -0
- package/docs/content/locales/ja-JP/toolkit-context-knowledge.mdx +12 -0
- package/docs/content/locales/ja-JP/toolkit-editors-canvases.mdx +17 -0
- package/docs/content/locales/ko-KR/agent-native-toolkit.mdx +69 -62
- package/docs/content/locales/ko-KR/toolkit-capability-packages.mdx +21 -0
- package/docs/content/locales/ko-KR/toolkit-context-knowledge.mdx +12 -0
- package/docs/content/locales/ko-KR/toolkit-editors-canvases.mdx +17 -0
- package/docs/content/locales/pt-BR/agent-native-toolkit.mdx +82 -54
- package/docs/content/locales/pt-BR/toolkit-capability-packages.mdx +21 -0
- package/docs/content/locales/pt-BR/toolkit-context-knowledge.mdx +12 -0
- package/docs/content/locales/pt-BR/toolkit-editors-canvases.mdx +17 -0
- package/docs/content/locales/zh-CN/agent-native-toolkit.mdx +69 -62
- package/docs/content/locales/zh-CN/toolkit-capability-packages.mdx +21 -0
- package/docs/content/locales/zh-CN/toolkit-context-knowledge.mdx +12 -0
- package/docs/content/locales/zh-CN/toolkit-editors-canvases.mdx +17 -0
- package/docs/content/locales/zh-TW/agent-native-toolkit.mdx +69 -62
- package/docs/content/locales/zh-TW/toolkit-capability-packages.mdx +21 -0
- package/docs/content/locales/zh-TW/toolkit-context-knowledge.mdx +12 -0
- package/docs/content/locales/zh-TW/toolkit-editors-canvases.mdx +17 -0
- package/docs/content/toolkit-capability-packages.mdx +52 -0
- package/docs/content/toolkit-context-knowledge.mdx +46 -0
- package/docs/content/toolkit-editors-canvases.mdx +55 -0
- package/package.json +27 -26
- package/src/templates/workspace-core/.agents/skills/tracking/SKILL.md +19 -0
- package/corpus/core/src/client/rich-markdown-editor/BubbleToolbar.tsx +0 -253
- package/corpus/core/src/client/rich-markdown-editor/CodeBlockNode.tsx +0 -258
- package/corpus/core/src/client/rich-markdown-editor/DragHandle.ts +0 -1437
- package/corpus/core/src/client/rich-markdown-editor/ImageExtension.ts +0 -306
- package/corpus/core/src/client/rich-markdown-editor/RichMarkdownEditor.tsx +0 -80
- package/corpus/core/src/client/rich-markdown-editor/RunId.ts +0 -61
- package/corpus/core/src/client/rich-markdown-editor/SharedRichEditor.tsx +0 -321
- package/corpus/core/src/client/rich-markdown-editor/SlashCommandMenu.tsx +0 -310
- package/corpus/core/src/client/rich-markdown-editor/extensions.ts +0 -402
- package/corpus/core/src/client/rich-markdown-editor/gfmDoc.ts +0 -92
- package/corpus/core/src/client/rich-markdown-editor/surgical-apply.ts +0 -192
- package/corpus/core/src/client/rich-markdown-editor/useCollabReconcile.ts +0 -590
- package/dist/client/rich-markdown-editor/BubbleToolbar.d.ts +0 -37
- package/dist/client/rich-markdown-editor/BubbleToolbar.d.ts.map +0 -1
- package/dist/client/rich-markdown-editor/BubbleToolbar.js +0 -171
- package/dist/client/rich-markdown-editor/BubbleToolbar.js.map +0 -1
- package/dist/client/rich-markdown-editor/CodeBlockNode.d.ts +0 -49
- package/dist/client/rich-markdown-editor/CodeBlockNode.d.ts.map +0 -1
- package/dist/client/rich-markdown-editor/CodeBlockNode.js +0 -127
- package/dist/client/rich-markdown-editor/CodeBlockNode.js.map +0 -1
- package/dist/client/rich-markdown-editor/DragHandle.d.ts +0 -97
- package/dist/client/rich-markdown-editor/DragHandle.d.ts.map +0 -1
- package/dist/client/rich-markdown-editor/DragHandle.js +0 -1066
- package/dist/client/rich-markdown-editor/DragHandle.js.map +0 -1
- package/dist/client/rich-markdown-editor/ImageExtension.d.ts +0 -63
- package/dist/client/rich-markdown-editor/ImageExtension.d.ts.map +0 -1
- package/dist/client/rich-markdown-editor/ImageExtension.js +0 -243
- package/dist/client/rich-markdown-editor/ImageExtension.js.map +0 -1
- package/dist/client/rich-markdown-editor/RichMarkdownEditor.d.ts +0 -51
- package/dist/client/rich-markdown-editor/RichMarkdownEditor.d.ts.map +0 -1
- package/dist/client/rich-markdown-editor/RichMarkdownEditor.js +0 -37
- package/dist/client/rich-markdown-editor/RichMarkdownEditor.js.map +0 -1
- package/dist/client/rich-markdown-editor/RunId.d.ts +0 -28
- package/dist/client/rich-markdown-editor/RunId.d.ts.map +0 -1
- package/dist/client/rich-markdown-editor/RunId.js +0 -60
- package/dist/client/rich-markdown-editor/RunId.js.map +0 -1
- package/dist/client/rich-markdown-editor/SharedRichEditor.d.ts +0 -110
- package/dist/client/rich-markdown-editor/SharedRichEditor.d.ts.map +0 -1
- package/dist/client/rich-markdown-editor/SharedRichEditor.js +0 -144
- package/dist/client/rich-markdown-editor/SharedRichEditor.js.map +0 -1
- package/dist/client/rich-markdown-editor/SlashCommandMenu.d.ts +0 -41
- package/dist/client/rich-markdown-editor/SlashCommandMenu.d.ts.map +0 -1
- package/dist/client/rich-markdown-editor/SlashCommandMenu.js +0 -221
- package/dist/client/rich-markdown-editor/SlashCommandMenu.js.map +0 -1
- package/dist/client/rich-markdown-editor/extensions.d.ts +0 -178
- package/dist/client/rich-markdown-editor/extensions.d.ts.map +0 -1
- package/dist/client/rich-markdown-editor/extensions.js +0 -224
- package/dist/client/rich-markdown-editor/extensions.js.map +0 -1
- package/dist/client/rich-markdown-editor/gfmDoc.d.ts +0 -24
- package/dist/client/rich-markdown-editor/gfmDoc.d.ts.map +0 -1
- package/dist/client/rich-markdown-editor/gfmDoc.js +0 -83
- package/dist/client/rich-markdown-editor/gfmDoc.js.map +0 -1
- package/dist/client/rich-markdown-editor/surgical-apply.d.ts +0 -66
- package/dist/client/rich-markdown-editor/surgical-apply.d.ts.map +0 -1
- package/dist/client/rich-markdown-editor/surgical-apply.js +0 -147
- package/dist/client/rich-markdown-editor/surgical-apply.js.map +0 -1
- package/dist/client/rich-markdown-editor/useCollabReconcile.d.ts +0 -110
- package/dist/client/rich-markdown-editor/useCollabReconcile.d.ts.map +0 -1
- package/dist/client/rich-markdown-editor/useCollabReconcile.js +0 -441
- package/dist/client/rich-markdown-editor/useCollabReconcile.js.map +0 -1
|
@@ -31,41 +31,41 @@
|
|
|
31
31
|
"@radix-ui/react-alert-dialog": "^1.1.15",
|
|
32
32
|
"@radix-ui/react-popover": "^1.1.15",
|
|
33
33
|
"@tabler/icons-react": "catalog:",
|
|
34
|
-
"@tiptap/core": "
|
|
35
|
-
"@tiptap/extension-blockquote": "
|
|
36
|
-
"@tiptap/extension-bubble-menu": "
|
|
37
|
-
"@tiptap/extension-code-block-lowlight": "
|
|
38
|
-
"@tiptap/extension-collaboration": "
|
|
39
|
-
"@tiptap/extension-collaboration-caret": "
|
|
40
|
-
"@tiptap/extension-horizontal-rule": "
|
|
41
|
-
"@tiptap/extension-image": "
|
|
42
|
-
"@tiptap/extension-link": "
|
|
43
|
-
"@tiptap/extension-placeholder": "
|
|
44
|
-
"@tiptap/extension-table": "
|
|
45
|
-
"@tiptap/extension-table-cell": "
|
|
46
|
-
"@tiptap/extension-table-header": "
|
|
47
|
-
"@tiptap/extension-table-row": "
|
|
48
|
-
"@tiptap/extension-task-item": "
|
|
49
|
-
"@tiptap/extension-task-list": "
|
|
50
|
-
"@tiptap/pm": "
|
|
51
|
-
"@tiptap/react": "
|
|
52
|
-
"@tiptap/starter-kit": "
|
|
53
|
-
"@tiptap/y-tiptap": "
|
|
34
|
+
"@tiptap/core": "catalog:",
|
|
35
|
+
"@tiptap/extension-blockquote": "catalog:",
|
|
36
|
+
"@tiptap/extension-bubble-menu": "catalog:",
|
|
37
|
+
"@tiptap/extension-code-block-lowlight": "catalog:",
|
|
38
|
+
"@tiptap/extension-collaboration": "catalog:",
|
|
39
|
+
"@tiptap/extension-collaboration-caret": "catalog:",
|
|
40
|
+
"@tiptap/extension-horizontal-rule": "catalog:",
|
|
41
|
+
"@tiptap/extension-image": "catalog:",
|
|
42
|
+
"@tiptap/extension-link": "catalog:",
|
|
43
|
+
"@tiptap/extension-placeholder": "catalog:",
|
|
44
|
+
"@tiptap/extension-table": "catalog:",
|
|
45
|
+
"@tiptap/extension-table-cell": "catalog:",
|
|
46
|
+
"@tiptap/extension-table-header": "catalog:",
|
|
47
|
+
"@tiptap/extension-table-row": "catalog:",
|
|
48
|
+
"@tiptap/extension-task-item": "catalog:",
|
|
49
|
+
"@tiptap/extension-task-list": "catalog:",
|
|
50
|
+
"@tiptap/pm": "catalog:",
|
|
51
|
+
"@tiptap/react": "catalog:",
|
|
52
|
+
"@tiptap/starter-kit": "catalog:",
|
|
53
|
+
"@tiptap/y-tiptap": "catalog:",
|
|
54
54
|
"drizzle-orm": "^0.45.2",
|
|
55
55
|
"ffmpeg-static": "^5.3.0",
|
|
56
56
|
"h3": "catalog:",
|
|
57
|
-
"highlight.js": "
|
|
57
|
+
"highlight.js": "catalog:",
|
|
58
58
|
"isbot": "^5",
|
|
59
59
|
"katex": "0.17.0",
|
|
60
|
-
"lowlight": "
|
|
60
|
+
"lowlight": "catalog:",
|
|
61
61
|
"prosemirror-markdown": "^1.13.4",
|
|
62
62
|
"remark-mdx": "^3.1.1",
|
|
63
63
|
"remark-parse": "^11.0.0",
|
|
64
64
|
"remark-stringify": "^11.0.0",
|
|
65
|
-
"tiptap-markdown": "
|
|
65
|
+
"tiptap-markdown": "catalog:",
|
|
66
66
|
"unified": "^11.0.5",
|
|
67
|
-
"y-protocols": "
|
|
68
|
-
"yjs": "
|
|
67
|
+
"y-protocols": "catalog:",
|
|
68
|
+
"yjs": "catalog:",
|
|
69
69
|
"zod": "^4.3.6"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { useT
|
|
1
|
+
import { useT } from "@agent-native/core/client";
|
|
2
|
+
import { VisualTweakControl } from "@agent-native/toolkit/design-tweaks";
|
|
2
3
|
import type { TweakDefinition } from "@shared/api";
|
|
3
4
|
import {
|
|
4
5
|
IconX,
|
|
@@ -70,13 +70,13 @@
|
|
|
70
70
|
"@tailwindcss/typography": "^0.5.16",
|
|
71
71
|
"@tailwindcss/vite": "catalog:",
|
|
72
72
|
"@tanstack/react-query": "^5.99.2",
|
|
73
|
-
"@tiptap/extension-code-block-lowlight": "
|
|
74
|
-
"@tiptap/extension-image": "
|
|
75
|
-
"@tiptap/extension-link": "
|
|
76
|
-
"@tiptap/extension-placeholder": "
|
|
77
|
-
"@tiptap/pm": "
|
|
78
|
-
"@tiptap/react": "
|
|
79
|
-
"@tiptap/starter-kit": "
|
|
73
|
+
"@tiptap/extension-code-block-lowlight": "catalog:",
|
|
74
|
+
"@tiptap/extension-image": "catalog:",
|
|
75
|
+
"@tiptap/extension-link": "catalog:",
|
|
76
|
+
"@tiptap/extension-placeholder": "catalog:",
|
|
77
|
+
"@tiptap/pm": "catalog:",
|
|
78
|
+
"@tiptap/react": "catalog:",
|
|
79
|
+
"@tiptap/starter-kit": "catalog:",
|
|
80
80
|
"@types/node": "^24.2.1",
|
|
81
81
|
"@types/react": "catalog:",
|
|
82
82
|
"@types/react-dom": "catalog:",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"dotenv": "^17.3.1",
|
|
89
89
|
"drizzle-kit": "^0.31.10",
|
|
90
90
|
"globals": "^16.3.0",
|
|
91
|
-
"lowlight": "
|
|
91
|
+
"lowlight": "catalog:",
|
|
92
92
|
"motion": "^12.38.0",
|
|
93
93
|
"next-themes": "^0.4.6",
|
|
94
94
|
"oxfmt": "catalog:",
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"sonner": "^2.0.7",
|
|
101
101
|
"tailwind-merge": "^3.5.0",
|
|
102
102
|
"tailwindcss": "catalog:",
|
|
103
|
-
"tiptap-markdown": "
|
|
103
|
+
"tiptap-markdown": "catalog:",
|
|
104
104
|
"tsx": "^4.20.3",
|
|
105
105
|
"typescript-7": "catalog:",
|
|
106
106
|
"vaul": "^1.1.2",
|
|
@@ -290,6 +290,8 @@ folding framework chrome into the product UI.
|
|
|
290
290
|
needs to operate the behavior. Keep the static wireframes in
|
|
291
291
|
`content.canvas`, add the aligned functional prototype in
|
|
292
292
|
`content.prototype`, and rely on the top visual tabs to switch between them.
|
|
293
|
+
When both surfaces are present, open the Wireframes tab by default; the
|
|
294
|
+
prototype remains available as the interactive follow-up view.
|
|
293
295
|
- **Prototype-first** when the user asks to operate the UI or when interaction is
|
|
294
296
|
the main question. Use `create-prototype-plan`, which still preserves static
|
|
295
297
|
mocks where useful.
|
|
@@ -4,21 +4,21 @@ import {
|
|
|
4
4
|
type BlockDataChangeMeta,
|
|
5
5
|
} from "@agent-native/core/blocks";
|
|
6
6
|
import {
|
|
7
|
+
generateTabId,
|
|
8
|
+
useT,
|
|
9
|
+
useCollaborativeDoc,
|
|
10
|
+
type UseCollaborativeDocResult,
|
|
11
|
+
} from "@agent-native/core/client";
|
|
12
|
+
import {
|
|
13
|
+
applyDocSurgically,
|
|
7
14
|
DragHandle,
|
|
8
15
|
RICH_MARKDOWN_PROGRAMMATIC_TRANSACTION,
|
|
9
16
|
RunId,
|
|
10
17
|
SharedRichEditor,
|
|
11
|
-
generateTabId,
|
|
12
|
-
useT,
|
|
13
|
-
useCollaborativeDoc,
|
|
14
18
|
type DragHandleDropContext,
|
|
15
19
|
type DragHandleOptions,
|
|
16
20
|
type RichMarkdownCollabUser,
|
|
17
|
-
|
|
18
|
-
} from "@agent-native/core/client";
|
|
19
|
-
// `applyDocSurgically` is re-exported from the editor subpath barrel (the top
|
|
20
|
-
// `@agent-native/core/client` barrel doesn't surface the surgical helpers).
|
|
21
|
-
import { applyDocSurgically } from "@agent-native/core/client/editor";
|
|
21
|
+
} from "@agent-native/toolkit/editor";
|
|
22
22
|
import { isNotionCompatibleBlockType } from "@shared/notion-compat";
|
|
23
23
|
import {
|
|
24
24
|
createPlanBlockId,
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
buildRegistryBlockSlashItems,
|
|
4
4
|
getRegistryBlockSlashDescription,
|
|
5
5
|
getRegistryBlockSlashSearchText,
|
|
6
|
-
type SlashCommandItem,
|
|
7
6
|
} from "@agent-native/core/client";
|
|
7
|
+
import type { SlashCommandItem } from "@agent-native/toolkit/editor";
|
|
8
8
|
import { isNotionCompatibleBlockType } from "@shared/notion-compat";
|
|
9
9
|
import { createPlanBlockId } from "@shared/plan-content";
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
|
-
* The Tiptap editor handed to a slash command's `action`. Derived from the
|
|
12
|
+
* The Tiptap editor handed to a slash command's `action`. Derived from the Toolkit
|
|
13
13
|
* {@link SlashCommandItem} contract instead of importing `@tiptap/react`
|
|
14
14
|
* directly, so this file carries no extra tiptap dependency (the plan template
|
|
15
|
-
* uses tiptap
|
|
15
|
+
* uses tiptap through `@agent-native/toolkit/editor`).
|
|
16
16
|
*/
|
|
17
17
|
type SlashEditor = Parameters<SlashCommandItem["action"]>[0];
|
|
18
18
|
|
|
@@ -20,7 +20,7 @@ type SlashEditor = Parameters<SlashCommandItem["action"]>[0];
|
|
|
20
20
|
* The `insertTable` command is contributed by `@tiptap/extension-table`, which
|
|
21
21
|
* the shared editor registers at runtime but whose `ChainedCommands` type
|
|
22
22
|
* augmentation is not visible from this template (it has no direct tiptap
|
|
23
|
-
* dependency — tiptap is transitive through `@agent-native/
|
|
23
|
+
* dependency — tiptap is transitive through `@agent-native/toolkit/editor`). This
|
|
24
24
|
* narrow shape re-adds just that one command signature so the Table slash item
|
|
25
25
|
* stays type-safe without importing tiptap here.
|
|
26
26
|
*/
|
|
@@ -34,7 +34,7 @@ type TableChain = {
|
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
36
|
* Build the plan document editor's slash command list, returned in the exact
|
|
37
|
-
* shape the shared
|
|
37
|
+
* shape the shared Toolkit {@link SlashCommandItem} contract expects. `icon` is a
|
|
38
38
|
* short text glyph; `description` is compact visible copy; `searchText` carries
|
|
39
39
|
* raw block types and aliases. `SharedRichEditor`/`RichMarkdownEditor` forward
|
|
40
40
|
* this array to `SlashCommandMenu` via its `items` prop.
|
|
@@ -42,7 +42,7 @@ type TableChain = {
|
|
|
42
42
|
* Two tiers of commands:
|
|
43
43
|
* - Base prose commands (Text, Headings, lists, quote, code, divider, table,
|
|
44
44
|
* image) drive standard Tiptap chains — mirroring the content app's slash set
|
|
45
|
-
* but emitting the
|
|
45
|
+
* but emitting the Toolkit menu item type.
|
|
46
46
|
* - Registry block commands are derived from every `BlockSpec` whose
|
|
47
47
|
* `placement` includes `"block"`. Each inserts a `planBlock` node referencing
|
|
48
48
|
* the spec by `blockType` with a freshly minted `blockId`. The editor seeds
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
uploadEditorImage,
|
|
4
|
-
useT,
|
|
5
|
-
} from "@agent-native/core/client";
|
|
1
|
+
import { uploadEditorImage, useT } from "@agent-native/core/client";
|
|
2
|
+
import { SharedImage } from "@agent-native/toolkit/editor";
|
|
6
3
|
import {
|
|
7
4
|
NodeViewWrapper,
|
|
8
5
|
ReactNodeViewRenderer,
|
|
@@ -14,13 +11,13 @@ import { toast } from "sonner";
|
|
|
14
11
|
import { PlanImageViewer } from "./PlanImageViewer";
|
|
15
12
|
|
|
16
13
|
/**
|
|
17
|
-
* The plan editor's image node. It extends the shared
|
|
14
|
+
* The plan editor's image node. It extends the shared Toolkit `SharedImage` node —
|
|
18
15
|
* inheriting its byte-stable GFM `` serializer and the paste / drop /
|
|
19
16
|
* `/image` upload plugin — and adds a React node view so editor images get the
|
|
20
17
|
* same hover zoom button, lightbox, and three-dots menu (swap / download / copy)
|
|
21
18
|
* as the read-only reader and structured image blocks.
|
|
22
19
|
*
|
|
23
|
-
* Plans inject this via `extraExtensions` with `features.image` off, so the
|
|
20
|
+
* Plans inject this via `extraExtensions` with `features.image` off, so the shared
|
|
24
21
|
* default image node never coexists with it. Content keeps its own richer image
|
|
25
22
|
* node and is unaffected.
|
|
26
23
|
*/
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
|
-
RichMarkdownEditor,
|
|
3
|
-
useCollaborativeDoc,
|
|
4
2
|
generateTabId,
|
|
5
3
|
uploadEditorImage,
|
|
4
|
+
useCollaborativeDoc,
|
|
5
|
+
type CollabUser,
|
|
6
|
+
} from "@agent-native/core/client";
|
|
7
|
+
import {
|
|
6
8
|
createImageSlashCommand,
|
|
7
9
|
DEFAULT_SLASH_COMMANDS,
|
|
10
|
+
RichMarkdownEditor,
|
|
8
11
|
type RichMarkdownCollabUser,
|
|
9
|
-
|
|
10
|
-
} from "@agent-native/core/client";
|
|
12
|
+
} from "@agent-native/toolkit/editor";
|
|
11
13
|
import { useCallback, useEffect, useRef } from "react";
|
|
12
14
|
|
|
13
15
|
import { cn } from "@/lib/utils";
|
|
@@ -67,7 +67,7 @@ export function PlanVisualSurface({
|
|
|
67
67
|
? `${selectedDesignElement.frameId ?? ""}::${selectedDesignElement.blockId ?? ""}::${selectedDesignElement.elementId}`
|
|
68
68
|
: null;
|
|
69
69
|
const [tabValue, setTabValue] = useState<"prototype" | "wireframes">(
|
|
70
|
-
|
|
70
|
+
"wireframes",
|
|
71
71
|
);
|
|
72
72
|
const requestedTabValue =
|
|
73
73
|
requestedVisualMode === "prototype" || requestedVisualMode === "wireframes"
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"@fontsource-variable/vazirmatn": "^5.2.8",
|
|
23
23
|
"@libsql/client": "^0.15.8",
|
|
24
24
|
"@tabler/icons-react": "catalog:",
|
|
25
|
-
"@tiptap/core": "
|
|
26
|
-
"@tiptap/pm": "
|
|
27
|
-
"@tiptap/react": "
|
|
25
|
+
"@tiptap/core": "catalog:",
|
|
26
|
+
"@tiptap/pm": "catalog:",
|
|
27
|
+
"@tiptap/react": "catalog:",
|
|
28
28
|
"diff": "9.0.0",
|
|
29
29
|
"drizzle-orm": "^0.45.2",
|
|
30
30
|
"gray-matter": "^4.0.3",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
import { useT } from "@agent-native/core/client";
|
|
1
2
|
import {
|
|
2
|
-
useT,
|
|
3
3
|
VisualColorPicker,
|
|
4
4
|
VisualControlRow,
|
|
5
5
|
VisualInspectorPanel,
|
|
6
6
|
VisualInspectorSection,
|
|
7
7
|
VisualScrubInput,
|
|
8
8
|
VisualSegmentedControl,
|
|
9
|
-
} from "@agent-native/
|
|
9
|
+
} from "@agent-native/toolkit/design-tweaks";
|
|
10
10
|
import type { DesignSystemData } from "@shared/api";
|
|
11
11
|
import {
|
|
12
12
|
IconAlignCenter,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { useT } from "@agent-native/core/client";
|
|
1
2
|
import {
|
|
2
|
-
useT,
|
|
3
3
|
VisualInspectorPanel,
|
|
4
4
|
VisualInspectorSection,
|
|
5
5
|
VisualTweakControl,
|
|
6
|
-
} from "@agent-native/
|
|
6
|
+
} from "@agent-native/toolkit/design-tweaks";
|
|
7
7
|
import { IconAdjustmentsHorizontal, IconX } from "@tabler/icons-react";
|
|
8
8
|
|
|
9
9
|
import { Button } from "@/components/ui/button";
|
|
@@ -28,17 +28,17 @@
|
|
|
28
28
|
"@google/genai": "^1.42.0",
|
|
29
29
|
"@libsql/client": "^0.15.0",
|
|
30
30
|
"@tabler/icons-react": "catalog:",
|
|
31
|
-
"@tiptap/core": "
|
|
32
|
-
"@tiptap/extension-collaboration": "
|
|
33
|
-
"@tiptap/extension-collaboration-caret": "
|
|
34
|
-
"@tiptap/extension-color": "
|
|
35
|
-
"@tiptap/extension-link": "
|
|
36
|
-
"@tiptap/extension-placeholder": "
|
|
37
|
-
"@tiptap/extension-text-style": "
|
|
38
|
-
"@tiptap/pm": "
|
|
39
|
-
"@tiptap/react": "
|
|
40
|
-
"@tiptap/starter-kit": "
|
|
41
|
-
"@tiptap/y-tiptap": "
|
|
31
|
+
"@tiptap/core": "catalog:",
|
|
32
|
+
"@tiptap/extension-collaboration": "catalog:",
|
|
33
|
+
"@tiptap/extension-collaboration-caret": "catalog:",
|
|
34
|
+
"@tiptap/extension-color": "catalog:",
|
|
35
|
+
"@tiptap/extension-link": "catalog:",
|
|
36
|
+
"@tiptap/extension-placeholder": "catalog:",
|
|
37
|
+
"@tiptap/extension-text-style": "catalog:",
|
|
38
|
+
"@tiptap/pm": "catalog:",
|
|
39
|
+
"@tiptap/react": "catalog:",
|
|
40
|
+
"@tiptap/starter-kit": "catalog:",
|
|
41
|
+
"@tiptap/y-tiptap": "catalog:",
|
|
42
42
|
"dom-to-pptx": "2.0.2",
|
|
43
43
|
"dompurify": "^3.3.1",
|
|
44
44
|
"dotenv": "^17.2.1",
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
"pptxgenjs": "4.0.1",
|
|
58
58
|
"react-markdown": "^10.1.0",
|
|
59
59
|
"rehype-raw": "^7.0.0",
|
|
60
|
-
"y-protocols": "
|
|
61
|
-
"yjs": "
|
|
60
|
+
"y-protocols": "catalog:",
|
|
61
|
+
"yjs": "catalog:",
|
|
62
62
|
"zod": "^4.3.6"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
@@ -38,6 +38,7 @@ Tasks is a task-list-first agent-native app. The task list at `/tasks` is the de
|
|
|
38
38
|
| `update-visible-task-fields` | POST | Replace which custom fields appear on task cards (max 3) |
|
|
39
39
|
| `view-screen` | — | Read navigation, UI bulk selection, visible tasks, and inbox snapshot |
|
|
40
40
|
| `navigate` | — | Move UI to a view: `tasks`, `inbox`, `fields`, `extensions`, `team` (`home`/`ask` → `tasks`) |
|
|
41
|
+
| `render-task-list-inline` | — | Render an interactive task-list widget inline in chat without leaving the current view |
|
|
41
42
|
|
|
42
43
|
## Store Functions And Transactions
|
|
43
44
|
|
|
@@ -128,6 +129,8 @@ Default navigation shape on `/tasks`:
|
|
|
128
129
|
- Capture in chat → `create-inbox-item` by default; use `create-task` only when the user asks to add directly to the task list.
|
|
129
130
|
- Call `view-screen` before ambiguous edits when the user says "this task", "these tasks", "this inbox item", or "the list".
|
|
130
131
|
- On `/tasks` or `/inbox`, `view-screen` returns `list` (with `items`), optional `selectedItem` (`inListSnapshot`), and optional `selection` (`selectedItems`, `selectedIdsNotInVisibleList`) when bulk-select is active.
|
|
132
|
+
- When the user asks to see, review, or manage tasks while `navigation.view` is not `tasks`, call `render-task-list-inline` instead of navigating away. Pass `includeDone: true` when completed tasks should be included. The widget can add tasks and toggle completion through the existing task actions.
|
|
133
|
+
- When the user is already on `/tasks`, use `view-screen` and the native task list for task-list context unless the user explicitly asks for an inline widget.
|
|
131
134
|
- Prefer `selection.selectedItems` when the user has UI rows selected; fall back to `selectedItem` for a single deep-link highlight.
|
|
132
135
|
- `delete-task`, `bulk-delete-tasks`, and `delete-inbox-item` only after explicit user confirmation in chat.
|
|
133
136
|
- Use `navigation.includeDone` and `list` from `view-screen` to match what the user sees on `/tasks`.
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ACTION_CHAT_UI_INLINE_EXTENSION_RENDERER,
|
|
3
|
+
defineAction,
|
|
4
|
+
} from "@agent-native/core";
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
|
|
7
|
+
export const TASK_LIST_INLINE_CONTENT = `
|
|
8
|
+
<script>
|
|
9
|
+
document.addEventListener("alpine:init", () => {
|
|
10
|
+
Alpine.data("taskListWidget", () => ({
|
|
11
|
+
tasks: [],
|
|
12
|
+
draft: "",
|
|
13
|
+
includeDone: false,
|
|
14
|
+
isLoading: true,
|
|
15
|
+
isSaving: false,
|
|
16
|
+
pending: {},
|
|
17
|
+
error: "",
|
|
18
|
+
hasCompletedTasks: false,
|
|
19
|
+
init() {
|
|
20
|
+
this.includeDone = Boolean(window.slotContext?.includeDone);
|
|
21
|
+
window.onSlotContext?.((context) => {
|
|
22
|
+
if (context?.includeDone === undefined) return;
|
|
23
|
+
this.includeDone = Boolean(context.includeDone);
|
|
24
|
+
void this.refresh();
|
|
25
|
+
});
|
|
26
|
+
void this.refresh();
|
|
27
|
+
},
|
|
28
|
+
parseResult(result) {
|
|
29
|
+
if (typeof result === "string") {
|
|
30
|
+
try {
|
|
31
|
+
return JSON.parse(result);
|
|
32
|
+
} catch {
|
|
33
|
+
return {};
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return result && typeof result === "object" ? result : {};
|
|
37
|
+
},
|
|
38
|
+
async refresh() {
|
|
39
|
+
this.isLoading = true;
|
|
40
|
+
this.error = "";
|
|
41
|
+
try {
|
|
42
|
+
const data = this.parseResult(
|
|
43
|
+
await appAction("list-tasks", { includeDone: this.includeDone }),
|
|
44
|
+
);
|
|
45
|
+
this.tasks = Array.isArray(data.tasks) ? data.tasks : [];
|
|
46
|
+
this.hasCompletedTasks = data.hasCompletedTasks === true;
|
|
47
|
+
} catch (error) {
|
|
48
|
+
this.error = error?.message || "Could not load tasks.";
|
|
49
|
+
} finally {
|
|
50
|
+
this.isLoading = false;
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
summaryLabel() {
|
|
54
|
+
if (this.isLoading) return "Loading your task list…";
|
|
55
|
+
const remaining = this.tasks.filter((task) => !task.done).length;
|
|
56
|
+
return this.includeDone
|
|
57
|
+
? this.tasks.length + " shown · " + remaining + " remaining"
|
|
58
|
+
: remaining + " remaining";
|
|
59
|
+
},
|
|
60
|
+
setIncludeDone(value) {
|
|
61
|
+
this.includeDone = Boolean(value);
|
|
62
|
+
void this.refresh();
|
|
63
|
+
},
|
|
64
|
+
async toggle(task, done) {
|
|
65
|
+
const previous = task.done;
|
|
66
|
+
task.done = Boolean(done);
|
|
67
|
+
this.pending[task.id] = true;
|
|
68
|
+
this.error = "";
|
|
69
|
+
try {
|
|
70
|
+
await appAction("update-task", { taskId: task.id, done: task.done });
|
|
71
|
+
if (!this.includeDone && task.done) {
|
|
72
|
+
this.tasks = this.tasks.filter((item) => item.id !== task.id);
|
|
73
|
+
}
|
|
74
|
+
this.hasCompletedTasks = this.hasCompletedTasks || task.done;
|
|
75
|
+
} catch (error) {
|
|
76
|
+
task.done = previous;
|
|
77
|
+
this.error = error?.message || "Could not update that task.";
|
|
78
|
+
} finally {
|
|
79
|
+
delete this.pending[task.id];
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
async addTask() {
|
|
83
|
+
const title = this.draft.trim();
|
|
84
|
+
if (!title || this.isSaving) return;
|
|
85
|
+
this.isSaving = true;
|
|
86
|
+
this.error = "";
|
|
87
|
+
try {
|
|
88
|
+
await appAction("create-task", { title });
|
|
89
|
+
this.draft = "";
|
|
90
|
+
await this.refresh();
|
|
91
|
+
} catch (error) {
|
|
92
|
+
this.error = error?.message || "Could not add that task.";
|
|
93
|
+
} finally {
|
|
94
|
+
this.isSaving = false;
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
}));
|
|
98
|
+
});
|
|
99
|
+
</script>
|
|
100
|
+
|
|
101
|
+
<div x-data="taskListWidget" class="w-full max-w-xl rounded-xl border border-border bg-card p-4 text-card-foreground shadow-sm">
|
|
102
|
+
<div class="flex items-start justify-between gap-3">
|
|
103
|
+
<div class="min-w-0">
|
|
104
|
+
<h2 class="text-sm font-semibold">Tasks</h2>
|
|
105
|
+
<p class="mt-1 text-xs text-muted-foreground" x-text="summaryLabel()"></p>
|
|
106
|
+
</div>
|
|
107
|
+
<button
|
|
108
|
+
type="button"
|
|
109
|
+
class="shrink-0 rounded-md px-2 py-1 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground"
|
|
110
|
+
@click="refresh()"
|
|
111
|
+
:disabled="isLoading"
|
|
112
|
+
>Refresh</button>
|
|
113
|
+
</div>
|
|
114
|
+
|
|
115
|
+
<form class="mt-4 flex gap-2" @submit.prevent="addTask()">
|
|
116
|
+
<input
|
|
117
|
+
x-model="draft"
|
|
118
|
+
class="min-w-0 flex-1 rounded-md border border-input bg-background px-3 py-2 text-sm outline-none placeholder:text-muted-foreground focus:ring-2 focus:ring-ring"
|
|
119
|
+
aria-label="New task"
|
|
120
|
+
placeholder="Add a task"
|
|
121
|
+
:disabled="isSaving"
|
|
122
|
+
/>
|
|
123
|
+
<button
|
|
124
|
+
type="submit"
|
|
125
|
+
class="rounded-md bg-primary px-3 py-2 text-sm font-medium text-primary-foreground transition-opacity hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50"
|
|
126
|
+
:disabled="isSaving || !draft.trim()"
|
|
127
|
+
>Add</button>
|
|
128
|
+
</form>
|
|
129
|
+
|
|
130
|
+
<label class="mt-3 flex items-center gap-2 text-xs text-muted-foreground">
|
|
131
|
+
<input
|
|
132
|
+
type="checkbox"
|
|
133
|
+
class="size-3.5 accent-primary"
|
|
134
|
+
:checked="includeDone"
|
|
135
|
+
@change="setIncludeDone($event.target.checked)"
|
|
136
|
+
/>
|
|
137
|
+
<span>Show completed</span>
|
|
138
|
+
</label>
|
|
139
|
+
|
|
140
|
+
<div x-show="error" class="mt-3 rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-xs text-destructive" role="alert">
|
|
141
|
+
<span x-text="error"></span>
|
|
142
|
+
</div>
|
|
143
|
+
|
|
144
|
+
<div x-show="isLoading" class="mt-4 space-y-2" aria-label="Loading tasks">
|
|
145
|
+
<div class="h-10 animate-pulse rounded-md bg-muted"></div>
|
|
146
|
+
<div class="h-10 animate-pulse rounded-md bg-muted"></div>
|
|
147
|
+
</div>
|
|
148
|
+
|
|
149
|
+
<div x-show="!isLoading && tasks.length === 0" class="mt-5 rounded-lg border border-dashed border-border px-3 py-5 text-center">
|
|
150
|
+
<p class="text-sm font-medium" x-text="hasCompletedTasks && !includeDone ? 'All tasks complete' : 'No tasks yet'"></p>
|
|
151
|
+
<p class="mt-1 text-xs text-muted-foreground" x-text="hasCompletedTasks && !includeDone ? 'Show completed to review them.' : 'Add a task above to get started.'"></p>
|
|
152
|
+
</div>
|
|
153
|
+
|
|
154
|
+
<ul x-show="!isLoading && tasks.length > 0" class="mt-4 divide-y divide-border rounded-lg border border-border" aria-label="Tasks list">
|
|
155
|
+
<template x-for="task in tasks" :key="task.id">
|
|
156
|
+
<li class="flex items-center gap-3 px-3 py-3" :class="task.done ? 'text-muted-foreground' : ''">
|
|
157
|
+
<input
|
|
158
|
+
type="checkbox"
|
|
159
|
+
class="size-4 shrink-0 accent-primary"
|
|
160
|
+
:checked="task.done"
|
|
161
|
+
:disabled="pending[task.id]"
|
|
162
|
+
@change="toggle(task, $event.target.checked)"
|
|
163
|
+
:aria-label="task.done ? 'Mark ' + task.title + ' incomplete' : 'Mark ' + task.title + ' complete'"
|
|
164
|
+
/>
|
|
165
|
+
<span class="min-w-0 flex-1 break-words text-sm" :class="task.done ? 'line-through' : ''" x-text="task.title"></span>
|
|
166
|
+
</li>
|
|
167
|
+
</template>
|
|
168
|
+
</ul>
|
|
169
|
+
</div>
|
|
170
|
+
`;
|
|
171
|
+
|
|
172
|
+
export default defineAction({
|
|
173
|
+
description:
|
|
174
|
+
"Render the current task list as an interactive widget inline in chat without navigating away from the current page. Use when the user asks to see, review, or manage tasks while they are not on /tasks.",
|
|
175
|
+
schema: z.object({
|
|
176
|
+
includeDone: z
|
|
177
|
+
.boolean()
|
|
178
|
+
.default(false)
|
|
179
|
+
.describe("When true, show completed tasks in the widget."),
|
|
180
|
+
}),
|
|
181
|
+
http: false,
|
|
182
|
+
readOnly: true,
|
|
183
|
+
chatUI: {
|
|
184
|
+
renderer: ACTION_CHAT_UI_INLINE_EXTENSION_RENDERER,
|
|
185
|
+
title: "Task list",
|
|
186
|
+
description: "Render the task list inline in the conversation.",
|
|
187
|
+
},
|
|
188
|
+
run: async (args) => ({
|
|
189
|
+
ok: true,
|
|
190
|
+
inlineExtension: {
|
|
191
|
+
mode: "transient" as const,
|
|
192
|
+
id: `tasks-inline-${Date.now().toString(36)}-${Math.random()
|
|
193
|
+
.toString(36)
|
|
194
|
+
.slice(2, 8)}`,
|
|
195
|
+
name: "Task list",
|
|
196
|
+
description: args.includeDone ? "Open and completed tasks" : "Open tasks",
|
|
197
|
+
content: TASK_LIST_INLINE_CONTENT,
|
|
198
|
+
context: { includeDone: args.includeDone },
|
|
199
|
+
initialHeight: 360,
|
|
200
|
+
},
|
|
201
|
+
}),
|
|
202
|
+
});
|
|
@@ -24,6 +24,7 @@ The **chat** is a first-class surface of the Tasks app — not a side panel bolt
|
|
|
24
24
|
- **Triage inbox** — list, edit, delete, reorder, and **mark ready** ([F4](./f4-inbox.mdx)).
|
|
25
25
|
- **Filter** the task list the same way as the UI (e.g. hide completed tasks).
|
|
26
26
|
- **Ask what's on screen** — the agent can read the user's current view and selection before acting.
|
|
27
|
+
- **Keep the current page open while reviewing tasks** — when the user is elsewhere in the app, the agent can show an interactive task-list widget inline in chat.
|
|
27
28
|
|
|
28
29
|
<!-- status: todo -->
|
|
29
30
|
|
|
@@ -51,6 +52,7 @@ Every UI capability maps to agent tools (actions). The agent uses these — not
|
|
|
51
52
|
| **[F2 Custom fields](./f2-custom-fields.mdx)** | Create, rename, configure options; set field values; delete fields |
|
|
52
53
|
| **Navigation** | Open inbox, main task page, or a specific task via `navigate` |
|
|
53
54
|
| **Context** | Read current screen and bulk `selection` via `view-screen` |
|
|
55
|
+
| **Inline task list** | Render the task list in chat with `render-task-list-inline` when the user is not on `/tasks` |
|
|
54
56
|
|
|
55
57
|
<!-- status: todo -->
|
|
56
58
|
|
|
@@ -9,6 +9,7 @@ import actionsRegistry from "../../.generated/actions-registry.js";
|
|
|
9
9
|
const INITIAL_TOOL_NAMES = [
|
|
10
10
|
"view-screen",
|
|
11
11
|
"navigate",
|
|
12
|
+
"render-task-list-inline",
|
|
12
13
|
"list-tasks",
|
|
13
14
|
"create-task",
|
|
14
15
|
"update-task",
|
|
@@ -38,6 +39,7 @@ Use reorder-tasks when the user asks to move or reorder tasks in the visible lis
|
|
|
38
39
|
Use reorder-inbox-items when the user asks to reorder the inbox list.
|
|
39
40
|
Use inbox actions to list, edit, delete, and promote inbox items.
|
|
40
41
|
Call view-screen first when the user's visible task or inbox context matters.
|
|
42
|
+
When the user asks to see, review, or manage the task list, check the current-screen navigation first. If the current view is not \`tasks\`, call render-task-list-inline so the task list appears in chat without navigating away. Pass includeDone when the user asks to include completed tasks. If the current view is already \`tasks\`, use view-screen and the native task list unless the user explicitly asks for an inline widget.
|
|
41
43
|
When view-screen returns selection, treat selectedItems as the user's current UI multi-select on /tasks or /inbox.
|
|
42
44
|
Prefer bulk-update-tasks and bulk-delete-tasks when the user clearly means multiple tasks (e.g. "mark these done", "delete the selected ones", or several titles at once). Use single-task actions for one task or when bulk selection is not in play.
|
|
43
45
|
Prefer bulk-delete-inbox-items when the user clearly means multiple inbox items.
|