@agent-native/core 0.99.3 → 0.100.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/corpus/README.md +2 -2
- package/corpus/core/CHANGELOG.md +15 -0
- package/corpus/core/docs/content/agent-surfaces.mdx +43 -0
- package/corpus/core/docs/content/external-agents.mdx +11 -0
- package/corpus/core/docs/content/locales/ar-SA/agent-surfaces.mdx +30 -0
- package/corpus/core/docs/content/locales/ar-SA/external-agents.mdx +9 -0
- package/corpus/core/docs/content/locales/de-DE/agent-surfaces.mdx +34 -0
- package/corpus/core/docs/content/locales/de-DE/external-agents.mdx +10 -0
- package/corpus/core/docs/content/locales/es-ES/agent-surfaces.mdx +34 -0
- package/corpus/core/docs/content/locales/es-ES/external-agents.mdx +10 -0
- package/corpus/core/docs/content/locales/fr-FR/agent-surfaces.mdx +34 -0
- package/corpus/core/docs/content/locales/fr-FR/external-agents.mdx +11 -0
- package/corpus/core/docs/content/locales/hi-IN/agent-surfaces.mdx +31 -0
- package/corpus/core/docs/content/locales/hi-IN/external-agents.mdx +9 -0
- package/corpus/core/docs/content/locales/ja-JP/agent-surfaces.mdx +32 -0
- package/corpus/core/docs/content/locales/ja-JP/external-agents.mdx +10 -0
- package/corpus/core/docs/content/locales/ko-KR/agent-surfaces.mdx +32 -0
- package/corpus/core/docs/content/locales/ko-KR/external-agents.mdx +9 -0
- package/corpus/core/docs/content/locales/pt-BR/agent-surfaces.mdx +33 -0
- package/corpus/core/docs/content/locales/pt-BR/external-agents.mdx +10 -0
- package/corpus/core/docs/content/locales/zh-CN/agent-surfaces.mdx +29 -0
- package/corpus/core/docs/content/locales/zh-CN/external-agents.mdx +8 -0
- package/corpus/core/docs/content/locales/zh-TW/agent-surfaces.mdx +29 -0
- package/corpus/core/docs/content/locales/zh-TW/external-agents.mdx +8 -0
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/agent/context-xray/actions/context-evict.ts +11 -0
- package/corpus/core/src/agent/context-xray/actions/context-pin.ts +11 -0
- package/corpus/core/src/agent/context-xray/actions/context-preview-get.ts +134 -0
- package/corpus/core/src/agent/context-xray/actions/context-restore.ts +11 -0
- package/corpus/core/src/agent/context-xray/actions/errors.ts +20 -0
- package/corpus/core/src/agent/context-xray/manifest.ts +106 -7
- package/corpus/core/src/agent/engine/context-directives-transform.ts +5 -1
- package/corpus/core/src/agent/production-agent.ts +100 -38
- package/corpus/core/src/agent/run-loop-with-resume.ts +7 -2
- package/corpus/core/src/client/AgentPanel.tsx +35 -8
- package/corpus/core/src/client/agent-page/AgentContextTab.tsx +501 -0
- package/corpus/core/src/client/agent-page/AgentJobsTab.tsx +370 -0
- package/corpus/core/src/client/agent-page/AgentTabsPage.tsx +1084 -0
- package/corpus/core/src/client/agent-page/types.ts +18 -0
- package/corpus/core/src/client/agent-page/use-jobs.ts +150 -0
- package/corpus/core/src/client/context-xray/ContextMeter.tsx +22 -5
- package/corpus/core/src/client/context-xray/ContextTreemap.tsx +16 -1
- package/corpus/core/src/client/context-xray/ContextXRayPanel.tsx +168 -3
- package/corpus/core/src/client/context-xray/format.ts +6 -0
- package/corpus/core/src/client/index.ts +6 -0
- package/corpus/core/src/client/resources/ResourcesPanel.tsx +51 -23
- package/corpus/core/src/client/settings/AutomationsSection.tsx +407 -387
- package/corpus/core/src/jobs/actions/list-recurring-jobs.ts +105 -0
- package/corpus/core/src/jobs/actions/manage-recurring-job.ts +85 -0
- package/corpus/core/src/jobs/tools.ts +1 -1
- package/corpus/core/src/localization/default-messages.ts +110 -0
- package/corpus/core/src/mcp/build-server.ts +1 -0
- package/corpus/core/src/mcp/connect-route.ts +62 -65
- package/corpus/core/src/server/action-discovery.ts +23 -0
- package/corpus/core/src/server/agent-chat/prompt-resources.ts +174 -2
- package/corpus/core/src/server/agent-chat-plugin.ts +175 -2
- package/corpus/core/src/server/auth.ts +1 -7
- package/corpus/core/src/server/google-oauth.ts +1 -7
- package/corpus/core/src/server/workspace-oauth.ts +31 -0
- package/corpus/core/src/shared/context-xray.ts +84 -1
- package/corpus/core/src/shared/mcp-connect-content.ts +130 -0
- package/corpus/core/src/templates/default/app/routes/_index.tsx +11 -0
- package/corpus/core/src/templates/default/app/routes/agent.tsx +33 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +6 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/agent-page/SKILL.md +59 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/context-xray/SKILL.md +25 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/external-agents/SKILL.md +7 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/recurring-jobs/SKILL.md +9 -0
- package/corpus/core/src/triggers/actions/list-automations.ts +99 -0
- package/corpus/core/src/triggers/actions/manage-automation.ts +78 -0
- package/corpus/templates/analytics/actions/data-source-status.ts +33 -15
- package/corpus/templates/analytics/actions/query-agent-native-analytics.ts +1 -1
- package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +149 -24
- package/corpus/templates/analytics/app/components/layout/CommandPalette.tsx +17 -0
- package/corpus/templates/analytics/app/components/layout/Header.tsx +1 -0
- package/corpus/templates/analytics/app/components/layout/Layout.tsx +1 -0
- package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +8 -0
- package/corpus/templates/analytics/app/i18n/zh-TW.ts +1 -0
- package/corpus/templates/analytics/app/i18n-data.ts +1 -0
- package/corpus/templates/analytics/app/routes/agent.tsx +5 -0
- package/corpus/templates/analytics/changelog/2026-07-13-a-full-agent-page-now-brings-context-files-connections-jobs-.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-13-analytics-answers-can-use-built-in-first-party-event-data.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-13-chart-legends-can-filter-to-one-series-or-hide-a-series-on-h.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-13-gpt-5-6-luna-answers-now-recover-normally-instead-of-showing.md +6 -0
- package/corpus/templates/analytics/server/plugins/agent-chat.ts +11 -2
- package/corpus/templates/assets/app/components/layout/Header.tsx +1 -0
- package/corpus/templates/assets/app/components/layout/Layout.tsx +1 -0
- package/corpus/templates/assets/app/components/layout/Sidebar.tsx +2 -0
- package/corpus/templates/assets/app/routes/agent.tsx +5 -0
- package/corpus/templates/assets/changelog/2026-07-13-a-full-agent-page-now-brings-context-files-connections-jobs-.md +6 -0
- package/corpus/templates/brain/app/components/layout/Layout.tsx +1 -0
- package/corpus/templates/brain/app/components/layout/Sidebar.tsx +4 -1
- package/corpus/templates/brain/app/lib/brain.ts +11 -0
- package/corpus/templates/brain/app/root.tsx +15 -1
- package/corpus/templates/brain/app/routes/agent.tsx +11 -0
- package/corpus/templates/brain/changelog/2026-07-13-a-full-agent-page-now-brings-context-files-connections-jobs-.md +6 -0
- package/corpus/templates/calendar/app/components/layout/AppLayout.tsx +1 -0
- package/corpus/templates/calendar/app/components/layout/Sidebar.tsx +2 -0
- package/corpus/templates/calendar/app/root.tsx +17 -1
- package/corpus/templates/calendar/app/routes/_app.agent.tsx +25 -0
- package/corpus/templates/calendar/changelog/2026-07-13-a-full-agent-page-now-brings-context-files-connections-jobs-.md +6 -0
- package/corpus/templates/chat/app/components/layout/Header.tsx +1 -0
- package/corpus/templates/chat/app/components/layout/Layout.tsx +1 -0
- package/corpus/templates/chat/app/components/layout/Sidebar.tsx +7 -0
- package/corpus/templates/chat/app/hooks/use-navigation-state.ts +3 -0
- package/corpus/templates/chat/app/root.tsx +24 -2
- package/corpus/templates/chat/app/routes/agent.tsx +15 -0
- package/corpus/templates/chat/changelog/2026-07-13-a-full-agent-page-now-brings-context-files-connections-jobs-.md +6 -0
- package/corpus/templates/clips/app/components/library/library-layout.tsx +8 -0
- package/corpus/templates/clips/app/i18n/ar-SA.ts +2 -0
- package/corpus/templates/clips/app/i18n/de-DE.ts +2 -0
- package/corpus/templates/clips/app/i18n/en-US.ts +2 -0
- package/corpus/templates/clips/app/i18n/es-ES.ts +2 -0
- package/corpus/templates/clips/app/i18n/fr-FR.ts +2 -0
- package/corpus/templates/clips/app/i18n/hi-IN.ts +2 -0
- package/corpus/templates/clips/app/i18n/ja-JP.ts +2 -0
- package/corpus/templates/clips/app/i18n/ko-KR.ts +2 -0
- package/corpus/templates/clips/app/i18n/pt-BR.ts +2 -0
- package/corpus/templates/clips/app/i18n/zh-CN.ts +2 -0
- package/corpus/templates/clips/app/i18n/zh-TW.ts +2 -0
- package/corpus/templates/clips/app/root.tsx +7 -1
- package/corpus/templates/clips/app/routes/_app.agent.tsx +15 -0
- package/corpus/templates/clips/changelog/2026-07-13-new-agent-page-see-and-manage-your-agent-s-context-files-con.md +6 -0
- package/corpus/templates/content/app/components/layout/Layout.tsx +1 -0
- package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +36 -0
- package/corpus/templates/content/app/i18n/zh-TW.ts +2 -0
- package/corpus/templates/content/app/i18n-data.ts +44 -6
- package/corpus/templates/content/app/root.tsx +8 -0
- package/corpus/templates/content/app/routes/_app.agent.tsx +15 -0
- package/corpus/templates/content/changelog/2026-07-13-new-agent-page-see-and-manage-your-agent-s-context-files-con.md +6 -0
- package/corpus/templates/design/app/components/layout/Layout.tsx +1 -0
- package/corpus/templates/design/app/components/layout/Sidebar.tsx +2 -0
- package/corpus/templates/design/app/i18n/zh-TW.ts +2 -0
- package/corpus/templates/design/app/i18n-data.ts +20 -0
- package/corpus/templates/design/app/root.tsx +7 -1
- package/corpus/templates/design/app/routes/agent.tsx +15 -0
- package/corpus/templates/design/changelog/2026-07-13-new-agent-page-see-and-manage-your-agent-s-context-files-con.md +6 -0
- package/corpus/templates/dispatch/app/dispatch-extensions.tsx +10 -1
- package/corpus/templates/dispatch/app/i18n/zh-TW.ts +2 -0
- package/corpus/templates/dispatch/app/i18n-data.ts +20 -0
- package/corpus/templates/dispatch/app/root.tsx +7 -2
- package/corpus/templates/dispatch/app/routes/agent.tsx +18 -0
- package/corpus/templates/dispatch/changelog/2026-07-13-new-agent-page-see-and-manage-your-agent-s-context-files-con.md +6 -0
- package/corpus/templates/forms/app/components/layout/Layout.tsx +1 -0
- package/corpus/templates/forms/app/components/layout/Sidebar.tsx +35 -0
- package/corpus/templates/forms/app/i18n/ar-SA.ts +2 -0
- package/corpus/templates/forms/app/i18n/de-DE.ts +2 -0
- package/corpus/templates/forms/app/i18n/en-US.ts +2 -0
- package/corpus/templates/forms/app/i18n/es-ES.ts +2 -0
- package/corpus/templates/forms/app/i18n/fr-FR.ts +2 -0
- package/corpus/templates/forms/app/i18n/hi-IN.ts +2 -0
- package/corpus/templates/forms/app/i18n/ja-JP.ts +2 -0
- package/corpus/templates/forms/app/i18n/ko-KR.ts +2 -0
- package/corpus/templates/forms/app/i18n/pt-BR.ts +2 -0
- package/corpus/templates/forms/app/i18n/zh-CN.ts +2 -0
- package/corpus/templates/forms/app/i18n/zh-TW.ts +2 -0
- package/corpus/templates/forms/app/root.tsx +6 -1
- package/corpus/templates/forms/app/routes/_app.agent.tsx +15 -0
- package/corpus/templates/forms/changelog/2026-07-13-new-agent-page-see-and-manage-your-agent-s-context-files-con.md +6 -0
- package/corpus/templates/macros/app/components/layout/AppLayout.tsx +14 -2
- package/corpus/templates/macros/app/components/layout/Header.tsx +1 -0
- package/corpus/templates/macros/app/root.tsx +17 -2
- package/corpus/templates/macros/app/routes/agent.tsx +15 -0
- package/corpus/templates/macros/changelog/2026-07-13-new-agent-page-see-and-manage-your-agent-s-context-files-con.md +6 -0
- package/corpus/templates/mail/app/components/layout/AppLayout.tsx +42 -0
- package/corpus/templates/mail/app/components/layout/CommandPalette.tsx +6 -0
- package/corpus/templates/mail/app/routes/agent.tsx +15 -0
- package/corpus/templates/mail/changelog/2026-07-13-new-agent-page-see-and-manage-your-agent-s-context-files-con.md +6 -0
- package/corpus/templates/plan/app/components/layout/Header.tsx +1 -0
- package/corpus/templates/plan/app/components/layout/Layout.tsx +1 -0
- package/corpus/templates/plan/app/components/layout/Sidebar.tsx +2 -0
- package/corpus/templates/plan/app/root.tsx +8 -0
- package/corpus/templates/plan/app/routes/agent.tsx +15 -0
- package/corpus/templates/plan/changelog/2026-07-13-new-agent-page-see-and-manage-your-agent-s-context-files-con.md +6 -0
- package/corpus/templates/slides/app/components/layout/Header.tsx +1 -0
- package/corpus/templates/slides/app/components/layout/Layout.tsx +1 -0
- package/corpus/templates/slides/app/components/layout/Sidebar.tsx +2 -0
- package/corpus/templates/slides/app/root.tsx +10 -1
- package/corpus/templates/slides/app/routes/agent.tsx +15 -0
- package/corpus/templates/slides/changelog/2026-07-13-new-agent-page-see-and-manage-your-agent-s-context-files-con.md +6 -0
- package/dist/agent/context-xray/actions/context-evict.js +5 -2
- package/dist/agent/context-xray/actions/context-evict.js.map +1 -1
- package/dist/agent/context-xray/actions/context-pin.js +5 -2
- package/dist/agent/context-xray/actions/context-pin.js.map +1 -1
- package/dist/agent/context-xray/actions/context-preview-get.d.ts +17 -0
- package/dist/agent/context-xray/actions/context-preview-get.d.ts.map +1 -0
- package/dist/agent/context-xray/actions/context-preview-get.js +94 -0
- package/dist/agent/context-xray/actions/context-preview-get.js.map +1 -0
- package/dist/agent/context-xray/actions/context-restore.js +5 -2
- package/dist/agent/context-xray/actions/context-restore.js.map +1 -1
- package/dist/agent/context-xray/actions/errors.d.ts +3 -0
- package/dist/agent/context-xray/actions/errors.d.ts.map +1 -1
- package/dist/agent/context-xray/actions/errors.js +6 -0
- package/dist/agent/context-xray/actions/errors.js.map +1 -1
- package/dist/agent/context-xray/manifest.d.ts +18 -1
- package/dist/agent/context-xray/manifest.d.ts.map +1 -1
- package/dist/agent/context-xray/manifest.js +68 -6
- package/dist/agent/context-xray/manifest.js.map +1 -1
- package/dist/agent/engine/context-directives-transform.d.ts +2 -0
- package/dist/agent/engine/context-directives-transform.d.ts.map +1 -1
- package/dist/agent/engine/context-directives-transform.js +2 -1
- package/dist/agent/engine/context-directives-transform.js.map +1 -1
- package/dist/agent/production-agent.d.ts +15 -0
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +74 -36
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/agent/run-loop-with-resume.d.ts.map +1 -1
- package/dist/agent/run-loop-with-resume.js +6 -3
- package/dist/agent/run-loop-with-resume.js.map +1 -1
- package/dist/client/AgentPanel.d.ts +5 -1
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +9 -11
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/agent-page/AgentContextTab.d.ts +5 -0
- package/dist/client/agent-page/AgentContextTab.d.ts.map +1 -0
- package/dist/client/agent-page/AgentContextTab.js +202 -0
- package/dist/client/agent-page/AgentContextTab.js.map +1 -0
- package/dist/client/agent-page/AgentJobsTab.d.ts +3 -0
- package/dist/client/agent-page/AgentJobsTab.d.ts.map +1 -0
- package/dist/client/agent-page/AgentJobsTab.js +98 -0
- package/dist/client/agent-page/AgentJobsTab.js.map +1 -0
- package/dist/client/agent-page/AgentTabsPage.d.ts +20 -0
- package/dist/client/agent-page/AgentTabsPage.d.ts.map +1 -0
- package/dist/client/agent-page/AgentTabsPage.js +420 -0
- package/dist/client/agent-page/AgentTabsPage.js.map +1 -0
- package/dist/client/agent-page/types.d.ts +17 -0
- package/dist/client/agent-page/types.d.ts.map +1 -0
- package/dist/client/agent-page/types.js +9 -0
- package/dist/client/agent-page/types.js.map +1 -0
- package/dist/client/agent-page/use-jobs.d.ts +61 -0
- package/dist/client/agent-page/use-jobs.d.ts.map +1 -0
- package/dist/client/agent-page/use-jobs.js +71 -0
- package/dist/client/agent-page/use-jobs.js.map +1 -0
- package/dist/client/context-xray/ContextMeter.d.ts +3 -1
- package/dist/client/context-xray/ContextMeter.d.ts.map +1 -1
- package/dist/client/context-xray/ContextMeter.js +14 -5
- package/dist/client/context-xray/ContextMeter.js.map +1 -1
- package/dist/client/context-xray/ContextTreemap.d.ts +3 -2
- package/dist/client/context-xray/ContextTreemap.d.ts.map +1 -1
- package/dist/client/context-xray/ContextTreemap.js +9 -1
- 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 +95 -20
- package/dist/client/context-xray/ContextXRayPanel.js.map +1 -1
- package/dist/client/context-xray/format.d.ts.map +1 -1
- package/dist/client/context-xray/format.js +12 -0
- package/dist/client/context-xray/format.js.map +1 -1
- package/dist/client/index.d.ts +3 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +1 -0
- package/dist/client/index.js.map +1 -1
- package/dist/client/resources/ResourcesPanel.d.ts +9 -1
- package/dist/client/resources/ResourcesPanel.d.ts.map +1 -1
- package/dist/client/resources/ResourcesPanel.js +26 -10
- package/dist/client/resources/ResourcesPanel.js.map +1 -1
- package/dist/client/settings/AutomationsSection.d.ts +9 -0
- package/dist/client/settings/AutomationsSection.d.ts.map +1 -1
- package/dist/client/settings/AutomationsSection.js +128 -147
- package/dist/client/settings/AutomationsSection.js.map +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/file-upload/actions/upload-image.d.ts +1 -1
- package/dist/jobs/actions/list-recurring-jobs.d.ts +21 -0
- package/dist/jobs/actions/list-recurring-jobs.d.ts.map +1 -0
- package/dist/jobs/actions/list-recurring-jobs.js +74 -0
- package/dist/jobs/actions/list-recurring-jobs.js.map +1 -0
- package/dist/jobs/actions/manage-recurring-job.d.ts +18 -0
- package/dist/jobs/actions/manage-recurring-job.d.ts.map +1 -0
- package/dist/jobs/actions/manage-recurring-job.js +68 -0
- package/dist/jobs/actions/manage-recurring-job.js.map +1 -0
- package/dist/jobs/tools.d.ts +13 -0
- package/dist/jobs/tools.d.ts.map +1 -1
- package/dist/jobs/tools.js +1 -1
- package/dist/jobs/tools.js.map +1 -1
- package/dist/localization/default-messages.d.ts +96 -0
- package/dist/localization/default-messages.d.ts.map +1 -1
- package/dist/localization/default-messages.js +96 -0
- package/dist/localization/default-messages.js.map +1 -1
- package/dist/mcp/build-server.d.ts.map +1 -1
- package/dist/mcp/build-server.js +1 -0
- package/dist/mcp/build-server.js.map +1 -1
- package/dist/mcp/connect-route.d.ts.map +1 -1
- package/dist/mcp/connect-route.js +44 -59
- package/dist/mcp/connect-route.js.map +1 -1
- package/dist/notifications/routes.d.ts +2 -2
- package/dist/observability/routes.d.ts +5 -5
- package/dist/progress/routes.d.ts +1 -1
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/secrets/routes.d.ts +9 -9
- package/dist/server/action-discovery.d.ts.map +1 -1
- package/dist/server/action-discovery.js +23 -0
- package/dist/server/action-discovery.js.map +1 -1
- package/dist/server/agent-chat/prompt-resources.d.ts +14 -0
- package/dist/server/agent-chat/prompt-resources.d.ts.map +1 -1
- package/dist/server/agent-chat/prompt-resources.js +139 -2
- package/dist/server/agent-chat/prompt-resources.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts +1 -0
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +136 -3
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/auth.d.ts.map +1 -1
- package/dist/server/auth.js +1 -4
- package/dist/server/auth.js.map +1 -1
- package/dist/server/google-oauth.d.ts.map +1 -1
- package/dist/server/google-oauth.js +1 -4
- package/dist/server/google-oauth.js.map +1 -1
- package/dist/server/workspace-oauth.d.ts +11 -0
- package/dist/server/workspace-oauth.d.ts.map +1 -0
- package/dist/server/workspace-oauth.js +25 -0
- package/dist/server/workspace-oauth.js.map +1 -0
- package/dist/shared/context-xray.d.ts +45 -1
- package/dist/shared/context-xray.d.ts.map +1 -1
- package/dist/shared/context-xray.js +12 -0
- package/dist/shared/context-xray.js.map +1 -1
- package/dist/shared/mcp-connect-content.d.ts +37 -0
- package/dist/shared/mcp-connect-content.d.ts.map +1 -0
- package/dist/shared/mcp-connect-content.js +92 -0
- package/dist/shared/mcp-connect-content.js.map +1 -0
- package/dist/templates/default/app/routes/_index.tsx +11 -0
- package/dist/templates/default/app/routes/agent.tsx +33 -0
- package/dist/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +6 -0
- package/dist/templates/workspace-core/.agents/skills/agent-page/SKILL.md +59 -0
- package/dist/templates/workspace-core/.agents/skills/context-xray/SKILL.md +25 -0
- package/dist/templates/workspace-core/.agents/skills/external-agents/SKILL.md +7 -0
- package/dist/templates/workspace-core/.agents/skills/recurring-jobs/SKILL.md +9 -0
- package/dist/triggers/actions/list-automations.d.ts +24 -0
- package/dist/triggers/actions/list-automations.d.ts.map +1 -0
- package/dist/triggers/actions/list-automations.js +72 -0
- package/dist/triggers/actions/list-automations.js.map +1 -0
- package/dist/triggers/actions/manage-automation.d.ts +18 -0
- package/dist/triggers/actions/manage-automation.d.ts.map +1 -0
- package/dist/triggers/actions/manage-automation.js +60 -0
- package/dist/triggers/actions/manage-automation.js.map +1 -0
- package/docs/content/agent-surfaces.mdx +43 -0
- package/docs/content/external-agents.mdx +11 -0
- package/docs/content/locales/ar-SA/agent-surfaces.mdx +30 -0
- package/docs/content/locales/ar-SA/external-agents.mdx +9 -0
- package/docs/content/locales/de-DE/agent-surfaces.mdx +34 -0
- package/docs/content/locales/de-DE/external-agents.mdx +10 -0
- package/docs/content/locales/es-ES/agent-surfaces.mdx +34 -0
- package/docs/content/locales/es-ES/external-agents.mdx +10 -0
- package/docs/content/locales/fr-FR/agent-surfaces.mdx +34 -0
- package/docs/content/locales/fr-FR/external-agents.mdx +11 -0
- package/docs/content/locales/hi-IN/agent-surfaces.mdx +31 -0
- package/docs/content/locales/hi-IN/external-agents.mdx +9 -0
- package/docs/content/locales/ja-JP/agent-surfaces.mdx +32 -0
- package/docs/content/locales/ja-JP/external-agents.mdx +10 -0
- package/docs/content/locales/ko-KR/agent-surfaces.mdx +32 -0
- package/docs/content/locales/ko-KR/external-agents.mdx +9 -0
- package/docs/content/locales/pt-BR/agent-surfaces.mdx +33 -0
- package/docs/content/locales/pt-BR/external-agents.mdx +10 -0
- package/docs/content/locales/zh-CN/agent-surfaces.mdx +29 -0
- package/docs/content/locales/zh-CN/external-agents.mdx +8 -0
- package/docs/content/locales/zh-TW/agent-surfaces.mdx +29 -0
- package/docs/content/locales/zh-TW/external-agents.mdx +8 -0
- package/package.json +1 -1
- package/src/templates/default/app/routes/_index.tsx +11 -0
- package/src/templates/default/app/routes/agent.tsx +33 -0
- package/src/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +6 -0
- package/src/templates/workspace-core/.agents/skills/agent-page/SKILL.md +59 -0
- package/src/templates/workspace-core/.agents/skills/context-xray/SKILL.md +25 -0
- package/src/templates/workspace-core/.agents/skills/external-agents/SKILL.md +7 -0
- package/src/templates/workspace-core/.agents/skills/recurring-jobs/SKILL.md +9 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare const _default: import("../../action.js").ActionDefinition<{
|
|
2
|
+
operation: "delete" | "update";
|
|
3
|
+
name: string;
|
|
4
|
+
scope?: "organization" | "personal";
|
|
5
|
+
enabled?: boolean;
|
|
6
|
+
}, {
|
|
7
|
+
deleted: boolean;
|
|
8
|
+
name: string;
|
|
9
|
+
enabled?: undefined;
|
|
10
|
+
nextRun?: undefined;
|
|
11
|
+
} | {
|
|
12
|
+
deleted?: undefined;
|
|
13
|
+
name: string;
|
|
14
|
+
enabled: boolean;
|
|
15
|
+
nextRun: string;
|
|
16
|
+
}>;
|
|
17
|
+
export default _default;
|
|
18
|
+
//# sourceMappingURL=manage-recurring-job.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manage-recurring-job.d.ts","sourceRoot":"","sources":["../../../src/jobs/actions/manage-recurring-job.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { defineAction } from "../../action.js";
|
|
3
|
+
import { organizationResourceOwner, resourceDelete, resourceGetByPath, resourcePut, } from "../../resources/store.js";
|
|
4
|
+
import { isValidCron, nextOccurrence } from "../cron.js";
|
|
5
|
+
import { buildJobContent, parseJobFrontmatter } from "../scheduler.js";
|
|
6
|
+
import { authorizeJobMutation } from "../tools.js";
|
|
7
|
+
const scopeSchema = z.enum(["personal", "organization"]);
|
|
8
|
+
function hasTriggerFrontmatter(content) {
|
|
9
|
+
const header = content.match(/^---\n([\s\S]*?)\n---/m)?.[1] ?? "";
|
|
10
|
+
return /^triggerType\s*:/m.test(header);
|
|
11
|
+
}
|
|
12
|
+
export default defineAction({
|
|
13
|
+
description: "Enable, pause, or delete one recurring cron job from the Agent Jobs page.",
|
|
14
|
+
agentTool: false,
|
|
15
|
+
schema: z.object({
|
|
16
|
+
operation: z.enum(["update", "delete"]),
|
|
17
|
+
name: z.string().min(1),
|
|
18
|
+
scope: scopeSchema.default("personal"),
|
|
19
|
+
enabled: z.boolean().optional(),
|
|
20
|
+
}),
|
|
21
|
+
run: async ({ operation, name, scope, enabled }, ctx) => {
|
|
22
|
+
const userEmail = ctx?.userEmail;
|
|
23
|
+
if (!userEmail)
|
|
24
|
+
throw new Error("Not authenticated.");
|
|
25
|
+
if (scope === "organization" && !ctx?.orgId) {
|
|
26
|
+
throw new Error("An organization is required for organization jobs.");
|
|
27
|
+
}
|
|
28
|
+
const owner = scope === "organization"
|
|
29
|
+
? organizationResourceOwner(ctx.orgId)
|
|
30
|
+
: userEmail;
|
|
31
|
+
const path = `jobs/${name}.md`;
|
|
32
|
+
const resource = await resourceGetByPath(owner, path);
|
|
33
|
+
if (!resource) {
|
|
34
|
+
throw Object.assign(new Error(`Job "${name}" not found.`), {
|
|
35
|
+
statusCode: 404,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
const { meta, body } = parseJobFrontmatter(resource.content);
|
|
39
|
+
if (hasTriggerFrontmatter(resource.content)) {
|
|
40
|
+
throw Object.assign(new Error(`Job "${name}" is an automation.`), {
|
|
41
|
+
statusCode: 400,
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
const denied = await authorizeJobMutation(resource.owner, meta);
|
|
45
|
+
if (denied)
|
|
46
|
+
throw Object.assign(new Error(denied), { statusCode: 403 });
|
|
47
|
+
if (operation === "delete") {
|
|
48
|
+
await resourceDelete(resource.id);
|
|
49
|
+
return { deleted: true, name };
|
|
50
|
+
}
|
|
51
|
+
if (enabled === undefined) {
|
|
52
|
+
throw Object.assign(new Error("enabled is required for update."), {
|
|
53
|
+
statusCode: 400,
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
meta.enabled = enabled;
|
|
57
|
+
if (enabled && meta.schedule && isValidCron(meta.schedule)) {
|
|
58
|
+
meta.nextRun = nextOccurrence(meta.schedule).toISOString();
|
|
59
|
+
}
|
|
60
|
+
await resourcePut(resource.owner, resource.path, buildJobContent(meta, body));
|
|
61
|
+
return {
|
|
62
|
+
name,
|
|
63
|
+
enabled: meta.enabled,
|
|
64
|
+
nextRun: meta.nextRun ?? null,
|
|
65
|
+
};
|
|
66
|
+
},
|
|
67
|
+
});
|
|
68
|
+
//# sourceMappingURL=manage-recurring-job.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manage-recurring-job.js","sourceRoot":"","sources":["../../../src/jobs/actions/manage-recurring-job.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EACL,yBAAyB,EACzB,cAAc,EACd,iBAAiB,EACjB,WAAW,GACZ,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEnD,MAAM,WAAW,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC,CAAC;AAEzD,SAAS,qBAAqB,CAAC,OAAe;IAC5C,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,CA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AAK,EACd,QAAQ,CAAC,IAAI,EACb,eAAe,CAAC,IAAI,EAAE,IAAI,CAAC,CAC5B,CAAC;QAEF,OAAO;YACL,IAAI;YACJ,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,IAAI;SAC9B,CAAC;IACJ,CAAC;CACF,CAAC,CAAC","sourcesContent":["import { z } from \"zod\";\n\nimport { defineAction } from \"../../action.js\";\nimport {\n organizationResourceOwner,\n resourceDelete,\n resourceGetByPath,\n resourcePut,\n} from \"../../resources/store.js\";\nimport { isValidCron, nextOccurrence } from \"../cron.js\";\nimport { buildJobContent, parseJobFrontmatter } from \"../scheduler.js\";\nimport { authorizeJobMutation } from \"../tools.js\";\n\nconst scopeSchema = z.enum([\"personal\", \"organization\"]);\n\nfunction hasTriggerFrontmatter(content: string): boolean {\n const header = content.match(/^---\\n([\\s\\S]*?)\\n---/m)?.[1] ?? \"\";\n return /^triggerType\\s*:/m.test(header);\n}\n\nexport default defineAction({\n description:\n \"Enable, pause, or delete one recurring cron job from the Agent Jobs page.\",\n agentTool: false,\n schema: z.object({\n operation: z.enum([\"update\", \"delete\"]),\n name: z.string().min(1),\n scope: scopeSchema.default(\"personal\"),\n enabled: z.boolean().optional(),\n }),\n run: async ({ operation, name, scope, enabled }, ctx) => {\n const userEmail = ctx?.userEmail;\n if (!userEmail) throw new Error(\"Not authenticated.\");\n if (scope === \"organization\" && !ctx?.orgId) {\n throw new Error(\"An organization is required for organization jobs.\");\n }\n\n const owner =\n scope === \"organization\"\n ? organizationResourceOwner(ctx.orgId as string)\n : userEmail;\n const path = `jobs/${name}.md`;\n const resource = await resourceGetByPath(owner, path);\n if (!resource) {\n throw Object.assign(new Error(`Job \"${name}\" not found.`), {\n statusCode: 404,\n });\n }\n\n const { meta, body } = parseJobFrontmatter(resource.content);\n if (hasTriggerFrontmatter(resource.content)) {\n throw Object.assign(new Error(`Job \"${name}\" is an automation.`), {\n statusCode: 400,\n });\n }\n const denied = await authorizeJobMutation(resource.owner, meta);\n if (denied) throw Object.assign(new Error(denied), { statusCode: 403 });\n\n if (operation === \"delete\") {\n await resourceDelete(resource.id);\n return { deleted: true, name };\n }\n\n if (enabled === undefined) {\n throw Object.assign(new Error(\"enabled is required for update.\"), {\n statusCode: 400,\n });\n }\n meta.enabled = enabled;\n if (enabled && meta.schedule && isValidCron(meta.schedule)) {\n meta.nextRun = nextOccurrence(meta.schedule).toISOString();\n }\n await resourcePut(\n resource.owner,\n resource.path,\n buildJobContent(meta, body),\n );\n\n return {\n name,\n enabled: meta.enabled,\n nextRun: meta.nextRun ?? null,\n };\n },\n});\n"]}
|
package/dist/jobs/tools.d.ts
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
1
|
import type { ActionEntry } from "../agent/production-agent.js";
|
|
2
|
+
import { type JobFrontmatter } from "./scheduler.js";
|
|
3
|
+
/**
|
|
4
|
+
* Authorise a mutation (update / delete) against a job resource. When the
|
|
5
|
+
* job is in the SHARED scope the caller must either be the original
|
|
6
|
+
* `createdBy` user or an org owner/admin — otherwise any user could rewrite
|
|
7
|
+
* another user's shared job and have it run as that user on the next cron
|
|
8
|
+
* tick (the privilege-escalation chain documented in audit
|
|
9
|
+
* `/tmp/security-audit/12-mcp-a2a-agent.md`, finding #3).
|
|
10
|
+
*
|
|
11
|
+
* Returns null when the mutation is allowed, or an error string suitable
|
|
12
|
+
* for returning to the caller when not.
|
|
13
|
+
*/
|
|
14
|
+
export declare function authorizeJobMutation(resourceOwner: string, meta: JobFrontmatter): Promise<string | null>;
|
|
2
15
|
export declare function createJobTools(): Record<string, ActionEntry>;
|
|
3
16
|
//# sourceMappingURL=tools.d.ts.map
|
package/dist/jobs/tools.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/jobs/tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/jobs/tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAiBhE,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,gBAAgB,CAAC;AAsCxB;;;;;;;;;;GAUG;AACH,wBAAsB,oBAAoB,CACxC,aAAa,EAAE,MAAM,EACrB,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAkBxB;AAkMD,wBAAgB,cAAc,IAAI,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAiF5D"}
|
package/dist/jobs/tools.js
CHANGED
|
@@ -50,7 +50,7 @@ async function isCurrentUserOrgAdmin(orgId) {
|
|
|
50
50
|
* Returns null when the mutation is allowed, or an error string suitable
|
|
51
51
|
* for returning to the caller when not.
|
|
52
52
|
*/
|
|
53
|
-
async function authorizeJobMutation(resourceOwner, meta) {
|
|
53
|
+
export async function authorizeJobMutation(resourceOwner, meta) {
|
|
54
54
|
const resourceOrgId = organizationIdFromResourceOwner(resourceOwner);
|
|
55
55
|
if (resourceOwner !== SHARED_OWNER && !resourceOrgId) {
|
|
56
56
|
// Personal-scope job — owner is the request's user. resourceGetByPath is
|
package/dist/jobs/tools.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/jobs/tools.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,YAAY,EACZ,cAAc,EACd,+BAA+B,EAC/B,mBAAmB,EACnB,YAAY,GACb,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,4BAA4B,GAC7B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,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AC,CAAC;gBACP,CAAC;YACH,CAAC;SACF;KACF,CAAC;AACJ,CAAC","sourcesContent":["import type { ActionEntry } from \"../agent/production-agent.js\";\nimport { getDbExec } from \"../db/client.js\";\nimport {\n resourcePut,\n resourceGetByPath,\n resourceList,\n resourceDelete,\n organizationIdFromResourceOwner,\n sharedResourceOwner,\n SHARED_OWNER,\n} from \"../resources/store.js\";\nimport {\n getRequestUserEmail,\n getRequestOrgId,\n getIntegrationRequestContext,\n} from \"../server/request-context.js\";\nimport { isValidCron, nextOccurrence, describeCron } from \"./cron.js\";\nimport {\n parseJobFrontmatter,\n buildJobContent,\n type JobFrontmatter,\n} from \"./scheduler.js\";\n\nfunction getOwner(): string {\n const email = getRequestUserEmail();\n if (!email) throw new Error(\"no authenticated user\");\n return email;\n}\n\nfunction getSharedOwner(): string {\n return sharedResourceOwner(getRequestOrgId());\n}\n\n/**\n * Determine if the current request's user is an org owner/admin in the\n * given org. Used to allow privileged users to update or delete shared\n * jobs created by other org members. Returns false when there is no org,\n * no user, no membership, or any error querying — fail closed.\n */\nasync function isCurrentUserOrgAdmin(\n orgId: string | undefined,\n): Promise<boolean> {\n if (!orgId) return false;\n const email = getRequestUserEmail();\n if (!email) return false;\n try {\n const client = getDbExec();\n const { rows } = await client.execute({\n sql: `SELECT role FROM org_members WHERE org_id = ? AND LOWER(email) = ? LIMIT 1`,\n args: [orgId, email.toLowerCase()],\n });\n if (rows.length === 0) return false;\n const role = String((rows[0] as any).role ?? \"\").toLowerCase();\n return role === \"owner\" || role === \"admin\";\n } catch {\n return false;\n }\n}\n\n/**\n * Authorise a mutation (update / delete) against a job resource. When the\n * job is in the SHARED scope the caller must either be the original\n * `createdBy` user or an org owner/admin — otherwise any user could rewrite\n * another user's shared job and have it run as that user on the next cron\n * tick (the privilege-escalation chain documented in audit\n * `/tmp/security-audit/12-mcp-a2a-agent.md`, finding #3).\n *\n * Returns null when the mutation is allowed, or an error string suitable\n * for returning to the caller when not.\n */\nasync function authorizeJobMutation(\n resourceOwner: string,\n meta: JobFrontmatter,\n): Promise<string | null> {\n const resourceOrgId = organizationIdFromResourceOwner(resourceOwner);\n if (resourceOwner !== SHARED_OWNER && !resourceOrgId) {\n // Personal-scope job — owner is the request's user. resourceGetByPath is\n // already scoped to the caller, so we know meta.createdBy must match.\n return null;\n }\n const caller = getOwner();\n const createdBy = meta.createdBy?.toLowerCase();\n if (createdBy && createdBy === caller.toLowerCase()) return null;\n\n // Allow org owners/admins to manage shared jobs created by other members.\n const isAdmin = await isCurrentUserOrgAdmin(\n resourceOrgId ?? meta.orgId ?? getRequestOrgId() ?? undefined,\n );\n if (isAdmin) return null;\n\n return \"Only the job's creator (or an org admin) can update or delete it.\";\n}\n\nasync function runCreate(args: Record<string, any>): Promise<string> {\n const { name, schedule, instructions, scope, runAs, model } = args;\n\n if (!name || !schedule || !instructions) {\n return JSON.stringify({\n error: \"name, schedule, and instructions are required\",\n });\n }\n\n if (!isValidCron(schedule)) {\n return JSON.stringify({\n error: `Invalid cron expression: \"${schedule}\". Use 5 fields: minute hour day-of-month month day-of-week.`,\n });\n }\n\n const owner = scope === \"personal\" ? getOwner() : getSharedOwner();\n const path = `jobs/${name}.md`;\n const now = new Date();\n const next = nextOccurrence(schedule, now);\n const integration = getIntegrationRequestContext();\n const channelId = integration?.incoming.platformContext.channelId;\n const threadRef = integration?.incoming.threadRef;\n\n const meta: JobFrontmatter = {\n schedule,\n enabled: true,\n createdBy: getOwner(),\n orgId: getRequestOrgId() || undefined,\n runAs: runAs === \"shared\" ? \"shared\" : \"creator\",\n nextRun: next.toISOString(),\n ...(integration?.scopeId ? { originScopeId: integration.scopeId } : {}),\n ...(integration?.incoming.platform\n ? { deliveryPlatform: integration.incoming.platform }\n : {}),\n ...(typeof channelId === \"string\"\n ? { deliveryDestination: channelId }\n : {}),\n ...(typeof threadRef === \"string\" ? { deliveryThreadRef: threadRef } : {}),\n ...(integration?.incoming.tenantId\n ? { deliveryTenantId: integration.incoming.tenantId }\n : {}),\n ...(typeof model === \"string\" && model.trim()\n ? { model: model.trim() }\n : {}),\n };\n\n const content = buildJobContent(meta, instructions);\n await resourcePut(owner, path, content);\n\n return JSON.stringify({\n created: true,\n name,\n path,\n schedule,\n scheduleDescription: describeCron(schedule),\n nextRun: next.toISOString(),\n scope: scope || \"shared\",\n });\n}\n\nasync function runList(args: Record<string, any>): Promise<string> {\n const owner = getOwner();\n const sharedOwner = getSharedOwner();\n // Fetch only current user's and shared jobs (not other users')\n const [personal, shared] = await Promise.all([\n resourceList(owner, \"jobs/\"),\n resourceList(sharedOwner, \"jobs/\"),\n ]);\n let resources = [...personal, ...shared];\n if (args.scope === \"personal\") resources = personal;\n else if (args.scope === \"shared\") resources = shared;\n const metas = resources.filter(\n (r) => r.path.endsWith(\".md\") && !r.path.endsWith(\".keep\"),\n );\n const jobs = await Promise.all(\n metas.map(async (r) => {\n const full = await resourceGetByPath(r.owner, r.path);\n const { meta } = parseJobFrontmatter(full?.content || \"\");\n return {\n name: r.path.replace(/^jobs\\//, \"\").replace(/\\.md$/, \"\"),\n path: r.path,\n scope: r.owner === sharedOwner ? \"shared\" : \"personal\",\n schedule: meta.schedule,\n scheduleDescription: meta.schedule ? describeCron(meta.schedule) : \"\",\n enabled: meta.enabled,\n lastRun: meta.lastRun || null,\n lastStatus: meta.lastStatus || null,\n lastError: meta.lastError || null,\n nextRun: meta.nextRun || null,\n originScopeId: meta.originScopeId || null,\n deliveryPlatform: meta.deliveryPlatform || null,\n deliveryDestination: meta.deliveryDestination || null,\n model: meta.model || null,\n };\n }),\n );\n\n if (jobs.length === 0) {\n return \"No recurring jobs configured. Use manage-jobs with action 'create' to create one.\";\n }\n\n return JSON.stringify(jobs, null, 2);\n}\n\nasync function runUpdate(args: Record<string, any>): Promise<string> {\n const { name, schedule, instructions, enabled, scope, runAs, model } = args;\n const path = `jobs/${name}.md`;\n\n // Try to find the resource\n let resource = await resourceGetByPath(getSharedOwner(), path);\n if (!resource && scope !== \"shared\") {\n resource = await resourceGetByPath(getOwner(), path);\n }\n\n if (!resource) {\n return JSON.stringify({ error: `Job \"${name}\" not found` });\n }\n\n const { meta, body } = parseJobFrontmatter(resource.content);\n\n // Reject when the caller doesn't own the shared job and isn't an org\n // admin. Without this check, any user could rewrite a shared job whose\n // `createdBy` is alice@…, and the next cron tick would run the\n // attacker's instructions as alice (creator-runAs schedules in\n // jobs/scheduler.ts line 273-278).\n const denied = await authorizeJobMutation(resource.owner, meta);\n if (denied) {\n return JSON.stringify({ error: denied });\n }\n\n if (schedule) {\n if (!isValidCron(schedule)) {\n return JSON.stringify({\n error: `Invalid cron expression: \"${schedule}\"`,\n });\n }\n meta.schedule = schedule;\n meta.nextRun = nextOccurrence(schedule).toISOString();\n }\n\n if (enabled !== undefined) {\n // Accept both the schema's string enum (\"true\"/\"false\") and a real boolean\n // from non-LLM callers. `enabled === \"true\"` alone treats a boolean `true`\n // as false — silently *disabling* a job the caller meant to enable.\n meta.enabled = enabled === true || enabled === \"true\";\n }\n\n if (runAs === \"creator\" || runAs === \"shared\") {\n meta.runAs = runAs;\n }\n if (typeof model === \"string\" && model.trim()) meta.model = model.trim();\n\n const newBody = instructions || body;\n const content = buildJobContent(meta, newBody);\n await resourcePut(resource.owner, resource.path, content);\n\n return JSON.stringify({\n updated: true,\n name,\n schedule: meta.schedule,\n scheduleDescription: describeCron(meta.schedule),\n enabled: meta.enabled,\n nextRun: meta.nextRun,\n });\n}\n\nasync function runDelete(args: Record<string, any>): Promise<string> {\n const { name, scope } = args;\n const path = `jobs/${name}.md`;\n\n let resource = await resourceGetByPath(getSharedOwner(), path);\n if (!resource && scope !== \"shared\") {\n resource = await resourceGetByPath(getOwner(), path);\n }\n\n if (!resource) {\n return JSON.stringify({ error: `Job \"${name}\" not found` });\n }\n\n // Same access check as runUpdate — only the creator or an org admin can\n // remove a shared job. Otherwise any user could break another tenant's\n // recurring schedule.\n const { meta } = parseJobFrontmatter(resource.content);\n const denied = await authorizeJobMutation(resource.owner, meta);\n if (denied) {\n return JSON.stringify({ error: denied });\n }\n\n await resourceDelete(resource.id);\n return JSON.stringify({ deleted: true, name });\n}\n\nexport function createJobTools(): Record<string, ActionEntry> {\n return {\n \"manage-jobs\": {\n tool: {\n description: `Manage recurring jobs that run on a cron schedule.\n\nActions:\n- \"create\": Create a new recurring job. Requires name, schedule, and instructions.\n- \"list\": List all recurring jobs and their status (schedule, enabled, last run, next run).\n- \"update\": Update a job's schedule, instructions, or enabled state. Requires name.\n- \"delete\": Delete a recurring job. Requires name. Always confirm with the user first.\n\nCron format is 5 fields: minute hour day-of-month month day-of-week. Common patterns: '0 9 * * *' (daily 9am), '0 9 * * 1-5' (weekdays 9am), '0 * * * *' (every hour), '0 9 * * 1' (Mondays 9am), '*/30 * * * *' (every 30 min).`,\n parameters: {\n type: \"object\",\n properties: {\n action: {\n type: \"string\",\n description: \"The action to perform.\",\n enum: [\"create\", \"list\", \"update\", \"delete\"],\n },\n name: {\n type: \"string\",\n description:\n \"Job name (hyphen-case, e.g. 'daily-scorecard-check'). Required for create and update.\",\n },\n schedule: {\n type: \"string\",\n description:\n \"Cron expression (5 fields: minute hour day-of-month month day-of-week). Required for create, optional for update.\",\n },\n instructions: {\n type: \"string\",\n description:\n \"What the agent should do when this job runs. Be specific — include which actions to call and what to do with the results. Required for create, optional for update.\",\n },\n enabled: {\n type: \"string\",\n description:\n \"Enable or disable a job: 'true' or 'false'. Only used with update.\",\n enum: [\"true\", \"false\"],\n },\n scope: {\n type: \"string\",\n description:\n \"For create: personal or shared (default: shared). For list: personal, shared, or all (default: all). For update: which scope to search (default: all).\",\n enum: [\"personal\", \"shared\", \"all\"],\n },\n runAs: {\n type: \"string\",\n description:\n \"Who shared jobs execute as: creator or shared. Default: creator. Used with create and update.\",\n enum: [\"creator\", \"shared\"],\n },\n model: {\n type: \"string\",\n description:\n \"Optional model id for this routine. The channel/app/engine default is used when omitted.\",\n },\n },\n required: [\"action\"],\n },\n },\n run: async (args) => {\n switch (args.action) {\n case \"create\":\n return runCreate(args);\n case \"list\":\n return runList(args);\n case \"update\":\n return runUpdate(args);\n case \"delete\":\n return runDelete(args);\n default:\n return JSON.stringify({\n error: `Unknown action \"${args.action}\". Use \"create\", \"list\", or \"update\".`,\n });\n }\n },\n },\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/jobs/tools.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,YAAY,EACZ,cAAc,EACd,+BAA+B,EAC/B,mBAAmB,EACnB,YAAY,GACb,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,4BAA4B,GAC7B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACtE,OAAO,EACL,mBAAmB,EACnB,eAAe,GAEhB,MAAM,gBAAgB,CAAC;AAExB,SAAS,QAAQ;IACf,MAAM,KAAK,GAAG,mBAAmB,EAAE,CAAC;IACpC,IAAI,CAAC,KAAK;QAAE,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;IACrD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,cAAc;IACrB,OAAO,mBAAmB,CAAC,eAAe,EAAE,CAAC,CAAC;AAChD,CAAC;AAED;;;;;GAKG;AACH,KAAK,UAAU,qBAAqB,CAClC,KAAyB;IAEzB,IAAI,CAAC,KAAK;QAAE,OAAO,KAAK,CAAC;IACzB,MAAM,KAAK,GAAG,mBAAmB,EAAE,CAAC;IACpC,IAAI,CAAC,KAAK;QAAE,OAAO,KAAK,CAAC;IACzB,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAC3B,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC;YACpC,GAAG,EAAE,4EAA4E;Y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,QAAQ;4BACd,WAAW,EACT,0FAA0F;yBAC7F;qBACF;oBACD,QAAQ,EAAE,CAAC,QAAQ,CAAC;iBACrB;aACF;YACD,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;gBAClB,QAAQ,IAAI,CAAC,MAAM,EAAE,CAAC;oBACpB,KAAK,QAAQ;wBACX,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC;oBACzB,KAAK,MAAM;wBACT,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC;oBACvB,KAAK,QAAQ;wBACX,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC;oBACzB,KAAK,QAAQ;wBACX,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC;oBACzB;wBACE,OAAO,IAAI,CAAC,SAAS,CAAC;4BACpB,KAAK,EAAE,mBAAmB,IAAI,CAAC,MAAM,uCAAuC;yBAC7E,CAAC,CAAC;gBACP,CAAC;YACH,CAAC;SACF;KACF,CAAC;AACJ,CAAC","sourcesContent":["import type { ActionEntry } from \"../agent/production-agent.js\";\nimport { getDbExec } from \"../db/client.js\";\nimport {\n resourcePut,\n resourceGetByPath,\n resourceList,\n resourceDelete,\n organizationIdFromResourceOwner,\n sharedResourceOwner,\n SHARED_OWNER,\n} from \"../resources/store.js\";\nimport {\n getRequestUserEmail,\n getRequestOrgId,\n getIntegrationRequestContext,\n} from \"../server/request-context.js\";\nimport { isValidCron, nextOccurrence, describeCron } from \"./cron.js\";\nimport {\n parseJobFrontmatter,\n buildJobContent,\n type JobFrontmatter,\n} from \"./scheduler.js\";\n\nfunction getOwner(): string {\n const email = getRequestUserEmail();\n if (!email) throw new Error(\"no authenticated user\");\n return email;\n}\n\nfunction getSharedOwner(): string {\n return sharedResourceOwner(getRequestOrgId());\n}\n\n/**\n * Determine if the current request's user is an org owner/admin in the\n * given org. Used to allow privileged users to update or delete shared\n * jobs created by other org members. Returns false when there is no org,\n * no user, no membership, or any error querying — fail closed.\n */\nasync function isCurrentUserOrgAdmin(\n orgId: string | undefined,\n): Promise<boolean> {\n if (!orgId) return false;\n const email = getRequestUserEmail();\n if (!email) return false;\n try {\n const client = getDbExec();\n const { rows } = await client.execute({\n sql: `SELECT role FROM org_members WHERE org_id = ? AND LOWER(email) = ? LIMIT 1`,\n args: [orgId, email.toLowerCase()],\n });\n if (rows.length === 0) return false;\n const role = String((rows[0] as any).role ?? \"\").toLowerCase();\n return role === \"owner\" || role === \"admin\";\n } catch {\n return false;\n }\n}\n\n/**\n * Authorise a mutation (update / delete) against a job resource. When the\n * job is in the SHARED scope the caller must either be the original\n * `createdBy` user or an org owner/admin — otherwise any user could rewrite\n * another user's shared job and have it run as that user on the next cron\n * tick (the privilege-escalation chain documented in audit\n * `/tmp/security-audit/12-mcp-a2a-agent.md`, finding #3).\n *\n * Returns null when the mutation is allowed, or an error string suitable\n * for returning to the caller when not.\n */\nexport async function authorizeJobMutation(\n resourceOwner: string,\n meta: JobFrontmatter,\n): Promise<string | null> {\n const resourceOrgId = organizationIdFromResourceOwner(resourceOwner);\n if (resourceOwner !== SHARED_OWNER && !resourceOrgId) {\n // Personal-scope job — owner is the request's user. resourceGetByPath is\n // already scoped to the caller, so we know meta.createdBy must match.\n return null;\n }\n const caller = getOwner();\n const createdBy = meta.createdBy?.toLowerCase();\n if (createdBy && createdBy === caller.toLowerCase()) return null;\n\n // Allow org owners/admins to manage shared jobs created by other members.\n const isAdmin = await isCurrentUserOrgAdmin(\n resourceOrgId ?? meta.orgId ?? getRequestOrgId() ?? undefined,\n );\n if (isAdmin) return null;\n\n return \"Only the job's creator (or an org admin) can update or delete it.\";\n}\n\nasync function runCreate(args: Record<string, any>): Promise<string> {\n const { name, schedule, instructions, scope, runAs, model } = args;\n\n if (!name || !schedule || !instructions) {\n return JSON.stringify({\n error: \"name, schedule, and instructions are required\",\n });\n }\n\n if (!isValidCron(schedule)) {\n return JSON.stringify({\n error: `Invalid cron expression: \"${schedule}\". Use 5 fields: minute hour day-of-month month day-of-week.`,\n });\n }\n\n const owner = scope === \"personal\" ? getOwner() : getSharedOwner();\n const path = `jobs/${name}.md`;\n const now = new Date();\n const next = nextOccurrence(schedule, now);\n const integration = getIntegrationRequestContext();\n const channelId = integration?.incoming.platformContext.channelId;\n const threadRef = integration?.incoming.threadRef;\n\n const meta: JobFrontmatter = {\n schedule,\n enabled: true,\n createdBy: getOwner(),\n orgId: getRequestOrgId() || undefined,\n runAs: runAs === \"shared\" ? \"shared\" : \"creator\",\n nextRun: next.toISOString(),\n ...(integration?.scopeId ? { originScopeId: integration.scopeId } : {}),\n ...(integration?.incoming.platform\n ? { deliveryPlatform: integration.incoming.platform }\n : {}),\n ...(typeof channelId === \"string\"\n ? { deliveryDestination: channelId }\n : {}),\n ...(typeof threadRef === \"string\" ? { deliveryThreadRef: threadRef } : {}),\n ...(integration?.incoming.tenantId\n ? { deliveryTenantId: integration.incoming.tenantId }\n : {}),\n ...(typeof model === \"string\" && model.trim()\n ? { model: model.trim() }\n : {}),\n };\n\n const content = buildJobContent(meta, instructions);\n await resourcePut(owner, path, content);\n\n return JSON.stringify({\n created: true,\n name,\n path,\n schedule,\n scheduleDescription: describeCron(schedule),\n nextRun: next.toISOString(),\n scope: scope || \"shared\",\n });\n}\n\nasync function runList(args: Record<string, any>): Promise<string> {\n const owner = getOwner();\n const sharedOwner = getSharedOwner();\n // Fetch only current user's and shared jobs (not other users')\n const [personal, shared] = await Promise.all([\n resourceList(owner, \"jobs/\"),\n resourceList(sharedOwner, \"jobs/\"),\n ]);\n let resources = [...personal, ...shared];\n if (args.scope === \"personal\") resources = personal;\n else if (args.scope === \"shared\") resources = shared;\n const metas = resources.filter(\n (r) => r.path.endsWith(\".md\") && !r.path.endsWith(\".keep\"),\n );\n const jobs = await Promise.all(\n metas.map(async (r) => {\n const full = await resourceGetByPath(r.owner, r.path);\n const { meta } = parseJobFrontmatter(full?.content || \"\");\n return {\n name: r.path.replace(/^jobs\\//, \"\").replace(/\\.md$/, \"\"),\n path: r.path,\n scope: r.owner === sharedOwner ? \"shared\" : \"personal\",\n schedule: meta.schedule,\n scheduleDescription: meta.schedule ? describeCron(meta.schedule) : \"\",\n enabled: meta.enabled,\n lastRun: meta.lastRun || null,\n lastStatus: meta.lastStatus || null,\n lastError: meta.lastError || null,\n nextRun: meta.nextRun || null,\n originScopeId: meta.originScopeId || null,\n deliveryPlatform: meta.deliveryPlatform || null,\n deliveryDestination: meta.deliveryDestination || null,\n model: meta.model || null,\n };\n }),\n );\n\n if (jobs.length === 0) {\n return \"No recurring jobs configured. Use manage-jobs with action 'create' to create one.\";\n }\n\n return JSON.stringify(jobs, null, 2);\n}\n\nasync function runUpdate(args: Record<string, any>): Promise<string> {\n const { name, schedule, instructions, enabled, scope, runAs, model } = args;\n const path = `jobs/${name}.md`;\n\n // Try to find the resource\n let resource = await resourceGetByPath(getSharedOwner(), path);\n if (!resource && scope !== \"shared\") {\n resource = await resourceGetByPath(getOwner(), path);\n }\n\n if (!resource) {\n return JSON.stringify({ error: `Job \"${name}\" not found` });\n }\n\n const { meta, body } = parseJobFrontmatter(resource.content);\n\n // Reject when the caller doesn't own the shared job and isn't an org\n // admin. Without this check, any user could rewrite a shared job whose\n // `createdBy` is alice@…, and the next cron tick would run the\n // attacker's instructions as alice (creator-runAs schedules in\n // jobs/scheduler.ts line 273-278).\n const denied = await authorizeJobMutation(resource.owner, meta);\n if (denied) {\n return JSON.stringify({ error: denied });\n }\n\n if (schedule) {\n if (!isValidCron(schedule)) {\n return JSON.stringify({\n error: `Invalid cron expression: \"${schedule}\"`,\n });\n }\n meta.schedule = schedule;\n meta.nextRun = nextOccurrence(schedule).toISOString();\n }\n\n if (enabled !== undefined) {\n // Accept both the schema's string enum (\"true\"/\"false\") and a real boolean\n // from non-LLM callers. `enabled === \"true\"` alone treats a boolean `true`\n // as false — silently *disabling* a job the caller meant to enable.\n meta.enabled = enabled === true || enabled === \"true\";\n }\n\n if (runAs === \"creator\" || runAs === \"shared\") {\n meta.runAs = runAs;\n }\n if (typeof model === \"string\" && model.trim()) meta.model = model.trim();\n\n const newBody = instructions || body;\n const content = buildJobContent(meta, newBody);\n await resourcePut(resource.owner, resource.path, content);\n\n return JSON.stringify({\n updated: true,\n name,\n schedule: meta.schedule,\n scheduleDescription: describeCron(meta.schedule),\n enabled: meta.enabled,\n nextRun: meta.nextRun,\n });\n}\n\nasync function runDelete(args: Record<string, any>): Promise<string> {\n const { name, scope } = args;\n const path = `jobs/${name}.md`;\n\n let resource = await resourceGetByPath(getSharedOwner(), path);\n if (!resource && scope !== \"shared\") {\n resource = await resourceGetByPath(getOwner(), path);\n }\n\n if (!resource) {\n return JSON.stringify({ error: `Job \"${name}\" not found` });\n }\n\n // Same access check as runUpdate — only the creator or an org admin can\n // remove a shared job. Otherwise any user could break another tenant's\n // recurring schedule.\n const { meta } = parseJobFrontmatter(resource.content);\n const denied = await authorizeJobMutation(resource.owner, meta);\n if (denied) {\n return JSON.stringify({ error: denied });\n }\n\n await resourceDelete(resource.id);\n return JSON.stringify({ deleted: true, name });\n}\n\nexport function createJobTools(): Record<string, ActionEntry> {\n return {\n \"manage-jobs\": {\n tool: {\n description: `Manage recurring jobs that run on a cron schedule.\n\nActions:\n- \"create\": Create a new recurring job. Requires name, schedule, and instructions.\n- \"list\": List all recurring jobs and their status (schedule, enabled, last run, next run).\n- \"update\": Update a job's schedule, instructions, or enabled state. Requires name.\n- \"delete\": Delete a recurring job. Requires name. Always confirm with the user first.\n\nCron format is 5 fields: minute hour day-of-month month day-of-week. Common patterns: '0 9 * * *' (daily 9am), '0 9 * * 1-5' (weekdays 9am), '0 * * * *' (every hour), '0 9 * * 1' (Mondays 9am), '*/30 * * * *' (every 30 min).`,\n parameters: {\n type: \"object\",\n properties: {\n action: {\n type: \"string\",\n description: \"The action to perform.\",\n enum: [\"create\", \"list\", \"update\", \"delete\"],\n },\n name: {\n type: \"string\",\n description:\n \"Job name (hyphen-case, e.g. 'daily-scorecard-check'). Required for create and update.\",\n },\n schedule: {\n type: \"string\",\n description:\n \"Cron expression (5 fields: minute hour day-of-month month day-of-week). Required for create, optional for update.\",\n },\n instructions: {\n type: \"string\",\n description:\n \"What the agent should do when this job runs. Be specific — include which actions to call and what to do with the results. Required for create, optional for update.\",\n },\n enabled: {\n type: \"string\",\n description:\n \"Enable or disable a job: 'true' or 'false'. Only used with update.\",\n enum: [\"true\", \"false\"],\n },\n scope: {\n type: \"string\",\n description:\n \"For create: personal or shared (default: shared). For list: personal, shared, or all (default: all). For update: which scope to search (default: all).\",\n enum: [\"personal\", \"shared\", \"all\"],\n },\n runAs: {\n type: \"string\",\n description:\n \"Who shared jobs execute as: creator or shared. Default: creator. Used with create and update.\",\n enum: [\"creator\", \"shared\"],\n },\n model: {\n type: \"string\",\n description:\n \"Optional model id for this routine. The channel/app/engine default is used when omitted.\",\n },\n },\n required: [\"action\"],\n },\n },\n run: async (args) => {\n switch (args.action) {\n case \"create\":\n return runCreate(args);\n case \"list\":\n return runList(args);\n case \"update\":\n return runUpdate(args);\n case \"delete\":\n return runDelete(args);\n default:\n return JSON.stringify({\n error: `Unknown action \"${args.action}\". Use \"create\", \"list\", or \"update\".`,\n });\n }\n },\n },\n };\n}\n"]}
|
|
@@ -185,6 +185,7 @@ declare const messages: {
|
|
|
185
185
|
cliRequiresDevMode: string;
|
|
186
186
|
cliRequiresDevModeDescription: string;
|
|
187
187
|
toggleAgent: string;
|
|
188
|
+
openFullView: string;
|
|
188
189
|
checkingAiConnection: string;
|
|
189
190
|
voiceMode: {
|
|
190
191
|
entryButtonLabel: string;
|
|
@@ -258,6 +259,101 @@ declare const messages: {
|
|
|
258
259
|
};
|
|
259
260
|
};
|
|
260
261
|
};
|
|
262
|
+
contextXray: {
|
|
263
|
+
provenance: {
|
|
264
|
+
frameworkCore: string;
|
|
265
|
+
actionsPrompt: string;
|
|
266
|
+
template: string;
|
|
267
|
+
enterpriseWorkspaceCore: string;
|
|
268
|
+
sqlWorkspace: string;
|
|
269
|
+
legacyAppDefault: string;
|
|
270
|
+
organization: string;
|
|
271
|
+
personal: string;
|
|
272
|
+
memory: string;
|
|
273
|
+
dbSchema: string;
|
|
274
|
+
tools: string;
|
|
275
|
+
modelOverlay: string;
|
|
276
|
+
runtimeContext: string;
|
|
277
|
+
};
|
|
278
|
+
governance: {
|
|
279
|
+
required: string;
|
|
280
|
+
inherited: string;
|
|
281
|
+
user: string;
|
|
282
|
+
};
|
|
283
|
+
system: string;
|
|
284
|
+
conversation: string;
|
|
285
|
+
free: string;
|
|
286
|
+
noSystemContext: string;
|
|
287
|
+
pageTitle: string;
|
|
288
|
+
agent: string;
|
|
289
|
+
headerDescription: string;
|
|
290
|
+
whatAgentKnows: string;
|
|
291
|
+
orderedSystemDescription: string;
|
|
292
|
+
list: string;
|
|
293
|
+
treemap: string;
|
|
294
|
+
loadingPreview: string;
|
|
295
|
+
previewUnavailable: string;
|
|
296
|
+
noPreview: string;
|
|
297
|
+
liveThread: string;
|
|
298
|
+
liveThreadDescription: string;
|
|
299
|
+
latestThread: string;
|
|
300
|
+
noLiveThread: string;
|
|
301
|
+
orderedTokensTitle: string;
|
|
302
|
+
orderedTokensDescription: string;
|
|
303
|
+
systemOrdered: string;
|
|
304
|
+
};
|
|
305
|
+
jobs: {
|
|
306
|
+
agent: string;
|
|
307
|
+
pageTitle: string;
|
|
308
|
+
pageDescription: string;
|
|
309
|
+
recurringTitle: string;
|
|
310
|
+
organizationRecurringDescription: string;
|
|
311
|
+
recurringDescription: string;
|
|
312
|
+
organizationMemberNote: string;
|
|
313
|
+
loading: string;
|
|
314
|
+
recurringLoadError: string;
|
|
315
|
+
organizationEmpty: string;
|
|
316
|
+
recurringEmpty: string;
|
|
317
|
+
enabled: string;
|
|
318
|
+
paused: string;
|
|
319
|
+
disabled: string;
|
|
320
|
+
nextRun: string;
|
|
321
|
+
lastRun: string;
|
|
322
|
+
details: string;
|
|
323
|
+
pause: string;
|
|
324
|
+
resume: string;
|
|
325
|
+
delete: string;
|
|
326
|
+
recurringUpdateError: string;
|
|
327
|
+
automationUpdateError: string;
|
|
328
|
+
automationsTitle: string;
|
|
329
|
+
organizationAutomationsDescription: string;
|
|
330
|
+
automationsDescription: string;
|
|
331
|
+
automationsPersonalOnly: string;
|
|
332
|
+
deleteRecurringTitle: string;
|
|
333
|
+
deleteRecurringDescription: string;
|
|
334
|
+
cancel: string;
|
|
335
|
+
recurringDetails: string;
|
|
336
|
+
instructions: string;
|
|
337
|
+
automationsLoadError: string;
|
|
338
|
+
automationsEmpty: string;
|
|
339
|
+
automationEventTrigger: string;
|
|
340
|
+
automationScheduleTrigger: string;
|
|
341
|
+
deleteAutomationTitle: string;
|
|
342
|
+
deleteAutomationDescription: string;
|
|
343
|
+
automationDetails: string;
|
|
344
|
+
automationEventDetails: string;
|
|
345
|
+
condition: string;
|
|
346
|
+
firingTestEvent: string;
|
|
347
|
+
fireEventError: string;
|
|
348
|
+
eventFired: string;
|
|
349
|
+
fireEventErrorGeneric: string;
|
|
350
|
+
newAutomation: string;
|
|
351
|
+
automationPlaceholder: string;
|
|
352
|
+
personal: string;
|
|
353
|
+
organization: string;
|
|
354
|
+
fireTestEvent: string;
|
|
355
|
+
automationsEmptySettings: string;
|
|
356
|
+
};
|
|
261
357
|
share: {
|
|
262
358
|
titleWithResource: string;
|
|
263
359
|
titleWithType: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-messages.d.ts","sourceRoot":"","sources":["../../src/localization/default-messages.ts"],"names":[],"mappings":"AAKA,QAAA,MAAM,QAAQ;IACZ,IAAI;QACF,aAAa;QACb,mBAAmB;QACnB,KAAK;QACL,KAAK;QACL,eAAe;QACf,aAAa;QACb,SAAS;QACT,eAAe;QACf,UAAU;QACV,gBAAgB;;IAElB,QAAQ;QACN,KAAK;QACL,WAAW;QACX,aAAa;QACb,mBAAmB;QAEnB,aAAa;QACb,UAAU;QACV,gBAAgB;QAEhB,iBAAiB;QACjB,cAAc;QACd,oBAAoB;QACpB,gBAAgB;QAChB,oBAAoB;QACpB,QAAQ;;IAEV,QAAQ;QACN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BACN,WAAW;gBACX,OAAO;;YAET,IAAI;gBACF,WAAW;gBACX,OAAO;;YAET,MAAM;gBACJ,WAAW;gBACX,OAAO;;YAET,SAAS;gBACP,WAAW;gBACX,OAAO;gBAEP,SAAS;;;QAIb,IAAI;YACF,IAAI;YACJ,OAAO;YACP,KAAK;;;IAGT,aAAa;QACX,MAAM;QACN,eAAe;QACf,OAAO;QACP,aAAa;QACb,SAAS;QACT,SAAS;QACT,UAAU;QACV,WAAW;QACX,QAAQ;QACR,YAAY;QACZ,GAAG;QACH,KAAK;QACL,QAAQ;QACR,IAAI;QACJ,KAAK;QACL,IAAI;QACJ,WAAW;QACX,UAAU;QACV,KAAK;QACL,IAAI;QACJ,IAAI;QACJ,MAAM;QACN,MAAM;QACN,UAAU;QACV,QAAQ;QACR,gBAAgB;QAChB,QAAQ;QACR,aAAa;QACb,KAAK;QACL,WAAW;QACX,QAAQ;QACR,QAAQ;QACR,OAAO;QACP,iBAAiB;QACjB,OAAO;QACP,KAAK;QACL,OAAO;QACP,OAAO;QACP,MAAM;QACN,KAAK;QACL,aAAa;QACb,UAAU;QACV,WAAW;QACX,YAAY;QACZ,UAAU;;IAEZ,KAAK;QACH,YAAY;QACZ,cAAc;QACd,aAAa;QACb,eAAe;QAEf,WAAW;QACX,MAAM;;CAET,CAAC;eAEa,QAAQ"}
|
|
1
|
+
{"version":3,"file":"default-messages.d.ts","sourceRoot":"","sources":["../../src/localization/default-messages.ts"],"names":[],"mappings":"AAKA,QAAA,MAAM,QAAQ;IACZ,IAAI;QACF,aAAa;QACb,mBAAmB;QACnB,KAAK;QACL,KAAK;QACL,eAAe;QACf,aAAa;QACb,SAAS;QACT,eAAe;QACf,UAAU;QACV,gBAAgB;;IAElB,QAAQ;QACN,KAAK;QACL,WAAW;QACX,aAAa;QACb,mBAAmB;QAEnB,aAAa;QACb,UAAU;QACV,gBAAgB;QAEhB,iBAAiB;QACjB,cAAc;QACd,oBAAoB;QACpB,gBAAgB;QAChB,oBAAoB;QAC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;gBACX,OAAO;;YAET,MAAM;gBACJ,WAAW;gBACX,OAAO;;YAET,SAAS;gBACP,WAAW;gBACX,OAAO;gBAEP,SAAS;;;QAIb,IAAI;YACF,IAAI;YACJ,OAAO;YACP,KAAK;;;IAGT,aAAa;QACX,MAAM;QACN,eAAe;QACf,OAAO;QACP,aAAa;QACb,SAAS;QACT,SAAS;QACT,UAAU;QACV,WAAW;QACX,QAAQ;QACR,YAAY;QACZ,GAAG;QACH,KAAK;QACL,QAAQ;QACR,IAAI;QACJ,KAAK;QACL,IAAI;QACJ,WAAW;QACX,UAAU;QACV,KAAK;QACL,IAAI;QACJ,IAAI;QACJ,MAAM;QACN,MAAM;QACN,UAAU;QACV,QAAQ;QACR,gBAAgB;QAChB,QAAQ;QACR,aAAa;QACb,KAAK;QACL,WAAW;QACX,QAAQ;QACR,QAAQ;QACR,OAAO;QACP,iBAAiB;QACjB,OAAO;QACP,KAAK;QACL,OAAO;QACP,OAAO;QACP,MAAM;QACN,KAAK;QACL,aAAa;QACb,UAAU;QACV,WAAW;QACX,YAAY;QACZ,UAAU;;IAEZ,KAAK;QACH,YAAY;QACZ,cAAc;QACd,aAAa;QACb,eAAe;QAEf,WAAW;QACX,MAAM;;CAET,CAAC;eAEa,QAAQ"}
|
|
@@ -190,6 +190,7 @@ const messages = {
|
|
|
190
190
|
cliRequiresDevMode: "CLI requires dev mode",
|
|
191
191
|
cliRequiresDevModeDescription: "Run this app locally with pnpm dev or use Builder.io to access the CLI terminal.",
|
|
192
192
|
toggleAgent: "Toggle agent",
|
|
193
|
+
openFullView: "Open full view",
|
|
193
194
|
checkingAiConnection: "Checking AI connection...",
|
|
194
195
|
voiceMode: {
|
|
195
196
|
entryButtonLabel: "Use microphone",
|
|
@@ -263,6 +264,101 @@ const messages = {
|
|
|
263
264
|
},
|
|
264
265
|
},
|
|
265
266
|
},
|
|
267
|
+
contextXray: {
|
|
268
|
+
provenance: {
|
|
269
|
+
frameworkCore: "Framework",
|
|
270
|
+
actionsPrompt: "Actions",
|
|
271
|
+
template: "Template",
|
|
272
|
+
enterpriseWorkspaceCore: "Enterprise workspace core",
|
|
273
|
+
sqlWorkspace: "Workspace",
|
|
274
|
+
legacyAppDefault: "App defaults",
|
|
275
|
+
organization: "Organization",
|
|
276
|
+
personal: "Personal",
|
|
277
|
+
memory: "Memory",
|
|
278
|
+
dbSchema: "SQL schema",
|
|
279
|
+
tools: "Tools",
|
|
280
|
+
modelOverlay: "Model overlay",
|
|
281
|
+
runtimeContext: "Runtime context",
|
|
282
|
+
},
|
|
283
|
+
governance: {
|
|
284
|
+
required: "Required",
|
|
285
|
+
inherited: "Inherited",
|
|
286
|
+
user: "Your context",
|
|
287
|
+
},
|
|
288
|
+
system: "System",
|
|
289
|
+
conversation: "Conversation",
|
|
290
|
+
free: "free",
|
|
291
|
+
noSystemContext: "No system context is available for this scope yet.",
|
|
292
|
+
pageTitle: "Context",
|
|
293
|
+
agent: "Agent",
|
|
294
|
+
headerDescription: "See the system instructions and conversation tokens that shape the agent.",
|
|
295
|
+
whatAgentKnows: "What the agent knows",
|
|
296
|
+
orderedSystemDescription: "Ordered system context is grouped by where it comes from. System sections are visible here but cannot be evicted from a thread.",
|
|
297
|
+
list: "List",
|
|
298
|
+
treemap: "Treemap",
|
|
299
|
+
loadingPreview: "Loading context preview…",
|
|
300
|
+
previewUnavailable: "Context preview is not available yet.",
|
|
301
|
+
noPreview: "No context preview is available for this scope yet.",
|
|
302
|
+
liveThread: "Live thread",
|
|
303
|
+
liveThreadDescription: "The latest thread snapshot, when one exists. This is a single current snapshot, not an append-only history.",
|
|
304
|
+
latestThread: "Latest thread",
|
|
305
|
+
noLiveThread: "No live thread snapshot is available yet.",
|
|
306
|
+
orderedTokensTitle: "Context is ordered tokens, not weighted tokens.",
|
|
307
|
+
orderedTokensDescription: "Required framework and enterprise policy come first, followed by inherited template, workspace, and organization instructions. Personal instructions and memory arrive later and can narrow or override earlier guidance where the prompt permits. These system sections are not evictable; only run-local conversation segments support pin, evict, and restore.",
|
|
308
|
+
systemOrdered: "System · ordered, not evictable",
|
|
309
|
+
},
|
|
310
|
+
jobs: {
|
|
311
|
+
agent: "Agent",
|
|
312
|
+
pageTitle: "Jobs",
|
|
313
|
+
pageDescription: "See recurring jobs and automations that run work for you.",
|
|
314
|
+
recurringTitle: "Recurring jobs",
|
|
315
|
+
organizationRecurringDescription: "Cron jobs shared with this organization. Members can view them; creators and admins can manage them.",
|
|
316
|
+
recurringDescription: "Scheduled prompts that ask the agent to do work automatically.",
|
|
317
|
+
organizationMemberNote: "You can manage jobs you created.",
|
|
318
|
+
loading: "Loading…",
|
|
319
|
+
recurringLoadError: "Could not load recurring jobs.",
|
|
320
|
+
organizationEmpty: "No organization jobs yet.",
|
|
321
|
+
recurringEmpty: "No recurring jobs yet. Ask the agent: “every morning, summarize my inbox”.",
|
|
322
|
+
enabled: "Enabled",
|
|
323
|
+
paused: "Paused",
|
|
324
|
+
disabled: "Disabled",
|
|
325
|
+
nextRun: "Next run",
|
|
326
|
+
lastRun: "Last run",
|
|
327
|
+
details: "Details",
|
|
328
|
+
pause: "Pause",
|
|
329
|
+
resume: "Resume",
|
|
330
|
+
delete: "Delete",
|
|
331
|
+
recurringUpdateError: "Could not update recurring job.",
|
|
332
|
+
automationUpdateError: "Could not update automation.",
|
|
333
|
+
automationsTitle: "Automations",
|
|
334
|
+
organizationAutomationsDescription: "Automations are personal today, so none are shown in the organization view.",
|
|
335
|
+
automationsDescription: "Event-triggered and scheduled agent tasks managed from one place.",
|
|
336
|
+
automationsPersonalOnly: "Automations are personal today.",
|
|
337
|
+
deleteRecurringTitle: "Delete recurring job?",
|
|
338
|
+
deleteRecurringDescription: "This permanently removes the job and cannot be undone.",
|
|
339
|
+
cancel: "Cancel",
|
|
340
|
+
recurringDetails: "Recurring job details",
|
|
341
|
+
instructions: "Instructions",
|
|
342
|
+
automationsLoadError: "Could not load automations.",
|
|
343
|
+
automationsEmpty: "No automations yet. Ask the agent to set up an event-triggered or scheduled task.",
|
|
344
|
+
automationEventTrigger: "On {{event}}",
|
|
345
|
+
automationScheduleTrigger: "Scheduled task",
|
|
346
|
+
deleteAutomationTitle: "Delete automation?",
|
|
347
|
+
deleteAutomationDescription: "This permanently removes the automation and cannot be undone.",
|
|
348
|
+
automationDetails: "Automation details",
|
|
349
|
+
automationEventDetails: "Runs when {{event}}.",
|
|
350
|
+
condition: "Condition",
|
|
351
|
+
firingTestEvent: "Firing test event…",
|
|
352
|
+
fireEventError: "Failed to fire event ({{status}})",
|
|
353
|
+
eventFired: "Event fired",
|
|
354
|
+
fireEventErrorGeneric: "Failed to fire event.",
|
|
355
|
+
newAutomation: "New automation",
|
|
356
|
+
automationPlaceholder: "Describe what you want to automate…",
|
|
357
|
+
personal: "Personal",
|
|
358
|
+
organization: "Organization",
|
|
359
|
+
fireTestEvent: "Fire test event",
|
|
360
|
+
automationsEmptySettings: 'No automations yet. Click "New automation" or ask the agent to set one up.',
|
|
361
|
+
},
|
|
266
362
|
share: {
|
|
267
363
|
titleWithResource: 'Share "{{title}}"',
|
|
268
364
|
titleWithType: "Share {{type}}",
|