@agent-native/core 0.154.5 → 0.157.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/corpus/README.md +1 -1
- package/corpus/templates/analytics/.agents/skills/account-health/SKILL.md +76 -0
- package/corpus/templates/analytics/.agents/skills/bigquery/SKILL.md +3 -0
- package/corpus/templates/analytics/.agents/skills/cross-source-analysis/SKILL.md +2 -1
- package/corpus/templates/analytics/.agents/skills/data-querying/SKILL.md +6 -5
- package/corpus/templates/analytics/AGENTS.md +3 -0
- package/corpus/templates/analytics/actions/account-deep-dive.ts +3 -2
- package/corpus/templates/analytics/actions/bigquery.ts +1 -1
- package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +4 -1
- package/corpus/templates/analytics/app/components/layout/NewDashboardDialog.tsx +1 -0
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/PropertyCombobox.tsx +12 -4
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/PropertyValueCombobox.tsx +5 -2
- package/corpus/templates/analytics/app/pages/adhoc/explorer/property-label.ts +32 -0
- package/corpus/templates/analytics/changelog/2026-08-13-account-health-readouts-verify-customer-scope-and-contract-metrics.md +7 -0
- package/corpus/templates/analytics/server/jobs/analytics-bigquery-backfill.ts +43 -17
- package/corpus/templates/analytics/server/lib/analytics-query-catalog.ts +17 -0
- package/corpus/templates/analytics/server/plugins/agent-chat.ts +4 -0
- package/corpus/templates/assets/app/components/asset/AssetPreviewDialog.tsx +3 -1
- package/corpus/templates/assets/app/i18n-data.ts +21 -1
- package/corpus/templates/assets/app/routes/brand-kits.$id.tsx +17 -13
- package/corpus/templates/calendar/AGENTS.md +2 -0
- package/corpus/templates/calendar/DEVELOPING.md +4 -4
- package/corpus/templates/calendar/actions/get-settings.ts +4 -11
- package/corpus/templates/calendar/actions/update-availability.ts +15 -4
- package/corpus/templates/calendar/actions/update-settings.ts +15 -4
- package/corpus/templates/calendar/app/components/booking/DatePicker.tsx +9 -3
- package/corpus/templates/calendar/app/components/calendar/CreateEventDialog.tsx +21 -19
- package/corpus/templates/calendar/app/components/calendar/EventDetailPopover.tsx +9 -6
- package/corpus/templates/calendar/app/components/calendar/FindTimePanel.tsx +25 -3
- package/corpus/templates/calendar/app/components/calendar/InlineEventPickers.tsx +10 -3
- package/corpus/templates/calendar/app/components/calendar/MonthView.tsx +9 -9
- package/corpus/templates/calendar/app/components/calendar/WeekView.tsx +11 -3
- package/corpus/templates/calendar/app/components/layout/Sidebar.tsx +10 -4
- package/corpus/templates/calendar/app/i18n-data.ts +30 -0
- package/corpus/templates/calendar/app/lib/availability-schedule.ts +53 -0
- package/corpus/templates/calendar/app/lib/event-form-utils.ts +5 -0
- package/corpus/templates/calendar/app/pages/AvailabilitySettings.tsx +90 -28
- package/corpus/templates/calendar/app/pages/BookingLinksPage.tsx +135 -61
- package/corpus/templates/calendar/app/pages/BookingPage.tsx +2 -0
- package/corpus/templates/calendar/app/pages/CalendarView.tsx +30 -15
- package/corpus/templates/calendar/app/pages/Settings.tsx +60 -1
- package/corpus/templates/calendar/changelog/2026-08-13-find-a-time-now-closes-from-a-clear-header-action.md +6 -0
- package/corpus/templates/calendar/server/handlers/bookings.ts +2 -1
- package/corpus/templates/calendar/server/handlers/settings.ts +12 -16
- package/corpus/templates/calendar/shared/api.ts +1 -0
- package/corpus/templates/calendar/shared/availability-schedule.ts +64 -0
- package/corpus/templates/calendar/shared/calendar-week.ts +21 -0
- package/corpus/templates/calendar/shared/settings.ts +44 -0
- package/corpus/templates/clips/AGENTS.md +2 -0
- package/corpus/templates/clips/actions/add-comment.ts +5 -2
- package/corpus/templates/clips/actions/finalize-recording.ts +31 -1
- package/corpus/templates/clips/actions/get-recording-player-data.ts +9 -0
- package/corpus/templates/clips/actions/lib/ensure-seekable-video.ts +21 -1
- package/corpus/templates/clips/actions/reply-to-comment.ts +5 -2
- package/corpus/templates/clips/actions/update-comment.ts +9 -2
- package/corpus/templates/clips/app/components/library/search-bar.tsx +26 -13
- package/corpus/templates/clips/app/components/meetings/share-meeting-dialog.tsx +135 -3
- package/corpus/templates/clips/app/components/player/comments-panel.tsx +5 -99
- package/corpus/templates/clips/app/components/player/playback-comment-overlay.tsx +7 -3
- package/corpus/templates/clips/app/components/player/share-dialog.tsx +102 -59
- package/corpus/templates/clips/app/components/player/video-player.tsx +84 -24
- package/corpus/templates/clips/app/components/workspace/notifications-list.tsx +11 -3
- package/corpus/templates/clips/app/i18n/en-US.ts +12 -0
- package/corpus/templates/clips/app/lib/public-meeting.ts +11 -3
- package/corpus/templates/clips/app/lib/search-focus.ts +15 -0
- package/corpus/templates/clips/app/root.tsx +2 -1
- package/corpus/templates/clips/app/routes/_app.meetings._index.tsx +94 -26
- package/corpus/templates/clips/app/routes/_app.settings._index.tsx +24 -7
- package/corpus/templates/clips/app/routes/embed.$shareId.tsx +8 -4
- package/corpus/templates/clips/app/routes/r.$recordingId.tsx +29 -8
- package/corpus/templates/clips/app/routes/share.$shareId.tsx +24 -6
- package/corpus/templates/clips/app/routes/share.meeting.$meetingId.tsx +72 -26
- package/corpus/templates/clips/changelog/2026-08-13-inline-markdown-comments.md +6 -0
- package/corpus/templates/clips/changelog/2026-08-13-private-meeting-agent-links.md +6 -0
- package/corpus/templates/clips/desktop/src/app.tsx +116 -19
- package/corpus/templates/clips/desktop/src/lib/recorder.ts +13 -29
- package/corpus/templates/clips/desktop/src/lib/recording-request.ts +39 -0
- package/corpus/templates/clips/desktop/src/lib/settings-navigation.ts +11 -0
- package/corpus/templates/clips/desktop/src/lib/whisper-model-picker.ts +7 -0
- package/corpus/templates/clips/desktop/src/styles.css +117 -0
- package/corpus/templates/clips/server/db/index.ts +10 -0
- package/corpus/templates/clips/server/db/schema.ts +1 -0
- package/corpus/templates/clips/server/lib/recordings.ts +3 -1
- package/corpus/templates/clips/server/lib/seekable-media-state.ts +90 -0
- package/corpus/templates/clips/server/plugins/db.ts +5 -0
- package/corpus/templates/clips/server/routes/api/public-meeting.get.ts +37 -4
- package/corpus/templates/clips/server/routes/api/public-recording.get.ts +16 -5
- package/corpus/templates/clips/shared/clips-ai-prefs.ts +3 -0
- package/corpus/templates/clips/shared/meeting-agent-access.ts +5 -0
- package/corpus/templates/content/actions/add-comment.ts +2 -1
- package/corpus/templates/content/actions/update-comment.ts +1 -1
- package/corpus/templates/content/app/components/editor/CommentsSidebar.tsx +24 -15
- package/corpus/templates/design/actions/generate-design.ts +10 -7
- package/corpus/templates/design/actions/present-design-variants.ts +35 -6
- package/corpus/templates/design/actions/run-design-audit.ts +33 -0
- package/corpus/templates/design/changelog/2026-08-13-the-design-audit-now-catches-a-screen-that-renders-behind-an.md +6 -0
- package/corpus/templates/design/shared/design-review.ts +1 -0
- package/corpus/templates/design/shared/html-integrity.ts +66 -0
- package/corpus/templates/dispatch/.env.example +5 -0
- package/corpus/templates/dispatch/AGENTS.md +24 -19
- package/corpus/templates/dispatch/app/i18n-data.ts +20 -0
- package/corpus/templates/dispatch/server/lib/identity-sso.ts +21 -90
- package/corpus/templates/dispatch/server/plugins/identity-sso.ts +3 -12
- package/corpus/templates/dispatch/shared/feature-flags.ts +4 -0
- package/corpus/templates/factory/AGENTS.md +5 -1
- package/corpus/templates/factory/README.md +23 -0
- package/corpus/templates/factory/actions/view-screen.ts +17 -0
- package/corpus/templates/factory/app/components/factory/FactoryAgentsView.tsx +239 -0
- package/corpus/templates/factory/app/components/factory/FactoryCanvas.tsx +2 -0
- package/corpus/templates/factory/app/components/factory/FactoryInspector.tsx +130 -7
- package/corpus/templates/factory/app/i18n/en-US.ts +20 -0
- package/corpus/templates/factory/app/routes/factory.tsx +41 -0
- package/corpus/templates/factory/package.json +1 -0
- package/corpus/templates/factory/server/factory-graph/contracts.ts +2 -0
- package/corpus/templates/factory/server/plugins/agent-chat.ts +9 -0
- package/corpus/templates/factory/server/plugins/dispatch-db.ts +1 -0
- package/corpus/templates/factory/server/plugins/setup-dispatch.ts +3 -0
- package/corpus/templates/mail/app/lib/native-mcp-exclusions.ts +3 -0
- package/corpus/templates/mail/vite.config.ts +7 -0
- package/corpus/templates/plan/actions/reply-to-plan-comment.ts +7 -2
- package/corpus/templates/plan/actions/resolve-plan-comment.ts +2 -2
- package/corpus/templates/plan/actions/update-visual-plan.ts +1 -1
- package/corpus/templates/plan/app/pages/PlansPage.tsx +29 -20
- package/corpus/templates/slides/actions/add-slide-comment.ts +1 -1
- package/corpus/templates/slides/actions/update-slide-comment.ts +1 -1
- package/corpus/templates/slides/app/components/comments/SlideCommentsPanel.tsx +9 -6
- package/corpus/templates/slides/app/components/editor/AddSlidePopover.tsx +98 -29
- package/corpus/templates/slides/app/components/editor/EditorActionCluster.tsx +45 -91
- package/corpus/templates/slides/app/components/editor/EditorSidebar.tsx +94 -2
- package/corpus/templates/slides/app/components/editor/EditorToolbar.tsx +17 -29
- package/corpus/templates/slides/app/components/editor/SlideContextToolbar.tsx +1 -1
- package/corpus/templates/slides/app/context/DeckContext.tsx +42 -2
- package/corpus/templates/slides/app/global.css +7 -40
- package/corpus/templates/slides/app/i18n/en-US.ts +4 -0
- package/corpus/templates/slides/app/pages/DeckEditor.tsx +130 -45
- package/dist/agent/index.d.ts +1 -1
- package/dist/agent/production-agent.d.ts +30 -0
- package/dist/agent/production-agent.js +105 -9
- package/dist/agent/thread-data-builder.js +17 -1
- package/dist/agent/types.d.ts +9 -0
- package/dist/cli/skills-content/help.js +6 -4
- package/dist/cli/skills.js +17 -2
- package/dist/cli/workspacify.d.ts +5 -0
- package/dist/cli/workspacify.js +65 -8
- package/dist/client/AgentPanel.d.ts +5 -0
- package/dist/client/AgentPanel.js +32 -13
- package/dist/client/AssistantChat.d.ts +36 -1
- package/dist/client/AssistantChat.js +175 -110
- package/dist/client/MultiTabAssistantChat.js +44 -27
- package/dist/client/active-run-state.d.ts +14 -1
- package/dist/client/active-run-state.js +0 -0
- package/dist/client/agent-chat-adapter.js +107 -5
- package/dist/client/analytics.js +9 -2
- package/dist/client/chat/markdown-renderer.js +4 -2
- package/dist/client/chat/message-components.d.ts +2 -2
- package/dist/client/chat/message-components.js +69 -35
- package/dist/client/chat/run-recovery.d.ts +4 -1
- package/dist/client/chat/run-recovery.js +62 -30
- package/dist/client/chat/tool-call-display.d.ts +12 -3
- package/dist/client/chat/tool-call-display.js +79 -40
- package/dist/client/chat/widgets/DataChartRenderer.js +3 -1
- package/dist/client/chat/widgets/DataChartWidget.js +8 -2
- package/dist/client/chat/widgets/DataInsightsWidget.js +3 -1
- package/dist/client/chat/widgets/DataTableWidget.js +23 -9
- package/dist/client/chat/widgets/builtin-tool-renderers.js +3 -1
- package/dist/client/chat-first/apps-rail.js +9 -4
- package/dist/client/chat-first/primary-nav.d.ts +2 -1
- package/dist/client/chat-first/primary-nav.js +3 -3
- package/dist/client/chat-first/types.d.ts +5 -1
- package/dist/client/components/ui/message-scroller.d.ts +1 -1
- package/dist/client/components/ui/message-scroller.js +7 -3
- package/dist/client/composer/runtime-adapters.js +3 -2
- package/dist/client/context-xray/ContextMeter.js +5 -1
- package/dist/client/context-xray/ContextXRayPanel.js +5 -5
- package/dist/client/error-format.d.ts +4 -0
- package/dist/client/error-format.js +93 -5
- package/dist/client/i18n.js +83 -17
- package/dist/client/markdown/InlineMarkdown.d.ts +23 -0
- package/dist/client/markdown/InlineMarkdown.js +65 -0
- package/dist/client/markdown/index.d.ts +1 -0
- package/dist/client/markdown/index.js +1 -0
- package/dist/client/observability/ThumbsFeedback.js +10 -8
- package/dist/client/review/ReviewThreadPanel.js +2 -1
- package/dist/client/run-stream-ownership.d.ts +39 -0
- package/dist/client/run-stream-ownership.js +65 -0
- package/dist/client/sharing/ShareButton.js +160 -54
- package/dist/coding-tools/run-code.js +2 -1
- package/dist/coding-tools/sandbox/background.d.ts +1 -0
- package/dist/coding-tools/sandbox/background.js +8 -1
- package/dist/coding-tools/sandbox/executions-store.d.ts +2 -0
- package/dist/coding-tools/sandbox/executions-store.js +41 -3
- package/dist/collab/awareness.d.ts +2 -2
- package/dist/collab/routes.d.ts +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/feature-flags/index.d.ts +1 -1
- package/dist/feature-flags/index.js +1 -1
- package/dist/feature-flags/store.d.ts +10 -0
- package/dist/feature-flags/store.js +112 -1
- package/dist/guards/no-env-credentials.js +4 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/integrations/adapters/slack.js +5 -1
- package/dist/localization/core-messages/ar-SA.d.ts +3 -0
- package/dist/localization/core-messages/ar-SA.js +541 -0
- package/dist/localization/core-messages/de-DE.d.ts +3 -0
- package/dist/localization/core-messages/de-DE.js +513 -0
- package/dist/localization/core-messages/en-US.d.ts +513 -0
- package/dist/localization/core-messages/en-US.js +513 -0
- package/dist/localization/core-messages/es-ES.d.ts +3 -0
- package/dist/localization/core-messages/es-ES.js +520 -0
- package/dist/localization/core-messages/fr-FR.d.ts +3 -0
- package/dist/localization/core-messages/fr-FR.js +520 -0
- package/dist/localization/core-messages/hi-IN.d.ts +3 -0
- package/dist/localization/core-messages/hi-IN.js +513 -0
- package/dist/localization/core-messages/ja-JP.d.ts +3 -0
- package/dist/localization/core-messages/ja-JP.js +506 -0
- package/dist/localization/core-messages/ko-KR.d.ts +3 -0
- package/dist/localization/core-messages/ko-KR.js +506 -0
- package/dist/localization/core-messages/pt-BR.d.ts +3 -0
- package/dist/localization/core-messages/pt-BR.js +520 -0
- package/dist/localization/core-messages/zh-CN.d.ts +3 -0
- package/dist/localization/core-messages/zh-CN.js +506 -0
- package/dist/localization/core-messages/zh-TW.d.ts +3 -0
- package/dist/localization/core-messages/zh-TW.js +506 -0
- package/dist/localization/core-messages.d.ts +524 -0
- package/dist/localization/core-messages.js +124 -0
- package/dist/localization/default-messages.d.ts +3 -0
- package/dist/localization/default-messages.js +3 -0
- package/dist/notifications/routes.d.ts +1 -1
- package/dist/observability/routes.d.ts +2 -2
- package/dist/progress/routes.d.ts +1 -1
- package/dist/provider-api/actions/custom-provider-registration.d.ts +11 -11
- package/dist/provider-api/actions/provider-api.d.ts +15 -15
- package/dist/resources/agents.js +40 -5
- package/dist/resources/metadata.d.ts +10 -0
- package/dist/resources/metadata.js +7 -3
- package/dist/review/actions/create-review-comment.js +1 -1
- package/dist/review/actions/reply-review-comment.js +1 -1
- package/dist/review/actions/resolve-review-thread.js +1 -1
- package/dist/secrets/routes.d.ts +6 -6
- package/dist/server/action-routes.js +32 -6
- package/dist/server/agent-chat/plugin-options.d.ts +7 -2
- package/dist/server/agent-chat-plugin.d.ts +10 -0
- package/dist/server/agent-chat-plugin.js +144 -41
- package/dist/server/agent-discovery.js +14 -3
- package/dist/server/agent-run-context.d.ts +7 -1
- package/dist/server/agent-run-context.js +9 -2
- package/dist/server/agent-teams-run-queue.d.ts +3 -0
- package/dist/server/agent-teams.js +38 -9
- package/dist/server/core-routes-plugin.js +1 -1
- package/dist/server/identity-sso-migrations.d.ts +7 -0
- package/dist/server/identity-sso-migrations.js +36 -0
- package/dist/server/identity-sso-store.d.ts +3 -2
- package/dist/server/identity-sso-store.js +8 -3
- package/dist/server/index.d.ts +1 -1
- package/dist/server/realtime-token.d.ts +1 -1
- package/dist/server/release-migrations.js +4 -0
- package/dist/server/request-context.d.ts +7 -0
- package/dist/server/request-context.js +15 -0
- package/dist/tracking/providers.js +13 -3
- package/dist/workspace-files/tool.js +1 -1
- package/docs/content/agent-surfaces.mdx +30 -0
- package/package.json +3 -2
|
@@ -327,6 +327,8 @@ const enUS = {
|
|
|
327
327
|
},
|
|
328
328
|
pages: {
|
|
329
329
|
adminDescription: "Workspace controls and operations",
|
|
330
|
+
simpleAgentsDescription:
|
|
331
|
+
"Create reusable agents in minutes, or import a setup you already made in Claude or another agent tool.",
|
|
330
332
|
adminNavigation: "Admin navigation",
|
|
331
333
|
adminWelcome: "Workspace control plane",
|
|
332
334
|
adminChooseArea:
|
|
@@ -1209,6 +1211,8 @@ export const messagesByLocale = {
|
|
|
1209
1211
|
pages: {
|
|
1210
1212
|
...chatFirstPageTranslations["zh-CN"],
|
|
1211
1213
|
adminDescription: "工作区控制与运营",
|
|
1214
|
+
simpleAgentsDescription:
|
|
1215
|
+
"几分钟内创建可复用的代理,或导入你已在 Claude 或其他代理工具中创建的设置。",
|
|
1212
1216
|
adminNavigation: "管理导航",
|
|
1213
1217
|
adminWelcome: "工作区控制中心",
|
|
1214
1218
|
adminChooseArea: "在一个地方管理应用、连接、自动化和运营工具。",
|
|
@@ -1623,6 +1627,8 @@ export const messagesByLocale = {
|
|
|
1623
1627
|
pages: {
|
|
1624
1628
|
...chatFirstPageTranslations["es-ES"],
|
|
1625
1629
|
adminDescription: "Controles y operaciones del espacio de trabajo",
|
|
1630
|
+
simpleAgentsDescription:
|
|
1631
|
+
"Crea agentes reutilizables en minutos o importa una configuración que ya hayas creado en Claude u otra herramienta de agentes.",
|
|
1626
1632
|
adminNavigation: "Navegación de administración",
|
|
1627
1633
|
adminWelcome: "Panel de control del espacio de trabajo",
|
|
1628
1634
|
adminChooseArea:
|
|
@@ -2048,6 +2054,8 @@ export const messagesByLocale = {
|
|
|
2048
2054
|
pages: {
|
|
2049
2055
|
...chatFirstPageTranslations["fr-FR"],
|
|
2050
2056
|
adminDescription: "Contrôles et opérations de l’espace de travail",
|
|
2057
|
+
simpleAgentsDescription:
|
|
2058
|
+
"Créez des agents réutilisables en quelques minutes ou importez une configuration déjà créée dans Claude ou un autre outil d’agents.",
|
|
2051
2059
|
adminNavigation: "Navigation d’administration",
|
|
2052
2060
|
adminWelcome: "Centre de contrôle de l’espace de travail",
|
|
2053
2061
|
adminChooseArea:
|
|
@@ -2463,6 +2471,8 @@ export const messagesByLocale = {
|
|
|
2463
2471
|
pages: {
|
|
2464
2472
|
...chatFirstPageTranslations["de-DE"],
|
|
2465
2473
|
adminDescription: "Arbeitsbereichssteuerung und -betrieb",
|
|
2474
|
+
simpleAgentsDescription:
|
|
2475
|
+
"Erstelle in wenigen Minuten wiederverwendbare Agents oder importiere eine Konfiguration, die du bereits in Claude oder einem anderen Agent-Tool erstellt hast.",
|
|
2466
2476
|
adminNavigation: "Administrationsnavigation",
|
|
2467
2477
|
adminWelcome: "Arbeitsbereichsleitstelle",
|
|
2468
2478
|
adminChooseArea:
|
|
@@ -2873,6 +2883,8 @@ export const messagesByLocale = {
|
|
|
2873
2883
|
pages: {
|
|
2874
2884
|
...chatFirstPageTranslations["ja-JP"],
|
|
2875
2885
|
adminDescription: "ワークスペースの管理と運用",
|
|
2886
|
+
simpleAgentsDescription:
|
|
2887
|
+
"数分で再利用可能なエージェントを作成するか、Claude などのエージェントツールで作成済みの設定をインポートします。",
|
|
2876
2888
|
adminNavigation: "管理ナビゲーション",
|
|
2877
2889
|
adminWelcome: "ワークスペースのコントロールプレーン",
|
|
2878
2890
|
adminChooseArea:
|
|
@@ -3277,6 +3289,8 @@ export const messagesByLocale = {
|
|
|
3277
3289
|
pages: {
|
|
3278
3290
|
...chatFirstPageTranslations["ko-KR"],
|
|
3279
3291
|
adminDescription: "워크스페이스 제어 및 운영",
|
|
3292
|
+
simpleAgentsDescription:
|
|
3293
|
+
"몇 분 만에 재사용 가능한 에이전트를 만들거나 Claude 또는 다른 에이전트 도구에서 만든 설정을 가져오세요.",
|
|
3280
3294
|
adminNavigation: "관리 탐색",
|
|
3281
3295
|
adminWelcome: "워크스페이스 제어 센터",
|
|
3282
3296
|
adminChooseArea:
|
|
@@ -3691,6 +3705,8 @@ export const messagesByLocale = {
|
|
|
3691
3705
|
pages: {
|
|
3692
3706
|
...chatFirstPageTranslations["pt-BR"],
|
|
3693
3707
|
adminDescription: "Controles e operações do espaço de trabalho",
|
|
3708
|
+
simpleAgentsDescription:
|
|
3709
|
+
"Crie agentes reutilizáveis em minutos ou importe uma configuração que você já criou no Claude ou em outra ferramenta de agentes.",
|
|
3694
3710
|
adminNavigation: "Navegação de administração",
|
|
3695
3711
|
adminWelcome: "Central de controle do espaço de trabalho",
|
|
3696
3712
|
adminChooseArea:
|
|
@@ -4096,6 +4112,8 @@ export const messagesByLocale = {
|
|
|
4096
4112
|
pages: {
|
|
4097
4113
|
...chatFirstPageTranslations["hi-IN"],
|
|
4098
4114
|
adminDescription: "वर्कस्पेस नियंत्रण और संचालन",
|
|
4115
|
+
simpleAgentsDescription:
|
|
4116
|
+
"कुछ ही मिनटों में दोबारा इस्तेमाल किए जा सकने वाले एजेंट बनाएं, या Claude या किसी अन्य एजेंट टूल में पहले से बनाई गई सेटअप इंपोर्ट करें।",
|
|
4099
4117
|
adminNavigation: "व्यवस्थापक नेविगेशन",
|
|
4100
4118
|
adminWelcome: "वर्कस्पेस नियंत्रण केंद्र",
|
|
4101
4119
|
adminChooseArea:
|
|
@@ -4529,6 +4547,8 @@ export const messagesByLocale = {
|
|
|
4529
4547
|
pages: {
|
|
4530
4548
|
...chatFirstPageTranslations["ar-SA"],
|
|
4531
4549
|
adminDescription: "عناصر التحكم في مساحة العمل وعملياتها",
|
|
4550
|
+
simpleAgentsDescription:
|
|
4551
|
+
"أنشئ وكلاء قابلين لإعادة الاستخدام خلال دقائق، أو استورد إعدادًا أنشأته بالفعل في Claude أو أداة وكلاء أخرى.",
|
|
4532
4552
|
adminNavigation: "تنقل الإدارة",
|
|
4533
4553
|
adminWelcome: "مركز التحكم في مساحة العمل",
|
|
4534
4554
|
adminChooseArea:
|
|
@@ -14,7 +14,15 @@
|
|
|
14
14
|
|
|
15
15
|
import { createHash, randomBytes, timingSafeEqual } from "node:crypto";
|
|
16
16
|
|
|
17
|
-
import {
|
|
17
|
+
import {
|
|
18
|
+
getDbExec,
|
|
19
|
+
intType,
|
|
20
|
+
isProductionServerlessFunctionRuntime,
|
|
21
|
+
} from "@agent-native/core/db";
|
|
22
|
+
import {
|
|
23
|
+
CANONICAL_WORKSPACE_SSO_APP_ORIGINS,
|
|
24
|
+
parseWorkspaceSsoAppRegistrations,
|
|
25
|
+
} from "@agent-native/dispatch/shared/workspace-sso";
|
|
18
26
|
|
|
19
27
|
const CONTROL_CHARS = /[\u0000-\u001f\u007f]/;
|
|
20
28
|
const APP_ID = /^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/;
|
|
@@ -62,22 +70,7 @@ export function normalizeIdentityAuthority(raw: unknown): string | null {
|
|
|
62
70
|
|
|
63
71
|
/** Exact first-party app origins. Never replace this with a suffix check. */
|
|
64
72
|
export const CANONICAL_IDENTITY_SSO_APP_ORIGINS = {
|
|
65
|
-
|
|
66
|
-
assets: "https://assets.agent-native.com",
|
|
67
|
-
brain: "https://brain.agent-native.com",
|
|
68
|
-
calendar: "https://calendar.agent-native.com",
|
|
69
|
-
chat: "https://chat.agent-native.com",
|
|
70
|
-
clips: "https://clips.agent-native.com",
|
|
71
|
-
content: "https://content.agent-native.com",
|
|
72
|
-
crm: "https://crm.agent-native.com",
|
|
73
|
-
design: "https://design.agent-native.com",
|
|
74
|
-
dispatch: "https://dispatch.agent-native.com",
|
|
75
|
-
forms: "https://forms.agent-native.com",
|
|
76
|
-
macros: "https://macros.agent-native.com",
|
|
77
|
-
mail: "https://mail.agent-native.com",
|
|
78
|
-
plan: "https://plan.agent-native.com",
|
|
79
|
-
slides: "https://slides.agent-native.com",
|
|
80
|
-
tasks: "https://tasks.agent-native.com",
|
|
73
|
+
...CANONICAL_WORKSPACE_SSO_APP_ORIGINS,
|
|
81
74
|
} as const;
|
|
82
75
|
|
|
83
76
|
export const DEFAULT_ALLOWED_ORIGINS: readonly string[] = Object.values(
|
|
@@ -102,82 +95,17 @@ function canonicalRegistrations(): IdentitySsoAppRegistration[] {
|
|
|
102
95
|
);
|
|
103
96
|
}
|
|
104
97
|
|
|
105
|
-
function exactOrigin(raw: unknown): string | null {
|
|
106
|
-
if (typeof raw !== "string" || !raw || CONTROL_CHARS.test(raw)) return null;
|
|
107
|
-
try {
|
|
108
|
-
const url = new URL(raw);
|
|
109
|
-
if (
|
|
110
|
-
url.protocol !== "https:" &&
|
|
111
|
-
!(url.protocol === "http:" && LOCALHOST_HOSTS.has(url.hostname))
|
|
112
|
-
) {
|
|
113
|
-
return null;
|
|
114
|
-
}
|
|
115
|
-
if (
|
|
116
|
-
url.username ||
|
|
117
|
-
url.password ||
|
|
118
|
-
url.pathname !== "/" ||
|
|
119
|
-
url.search ||
|
|
120
|
-
url.hash
|
|
121
|
-
) {
|
|
122
|
-
return null;
|
|
123
|
-
}
|
|
124
|
-
return url.origin;
|
|
125
|
-
} catch (error) {
|
|
126
|
-
void error;
|
|
127
|
-
return null;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
98
|
function parseCustomRegistrations(
|
|
132
99
|
env: NodeJS.ProcessEnv,
|
|
133
100
|
): IdentitySsoAppRegistration[] {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}
|
|
143
|
-
if (!Array.isArray(value)) return [];
|
|
144
|
-
|
|
145
|
-
const registrations: IdentitySsoAppRegistration[] = [];
|
|
146
|
-
const seen = new Set<string>();
|
|
147
|
-
for (const entry of value) {
|
|
148
|
-
if (!entry || typeof entry !== "object") continue;
|
|
149
|
-
const candidate = entry as Record<string, unknown>;
|
|
150
|
-
const appId = candidate.appId;
|
|
151
|
-
const clientId = candidate.clientId;
|
|
152
|
-
const origin = exactOrigin(candidate.origin);
|
|
153
|
-
const callbackPath = candidate.callbackPath;
|
|
154
|
-
const capabilities = candidate.capabilities;
|
|
155
|
-
if (
|
|
156
|
-
typeof appId !== "string" ||
|
|
157
|
-
!APP_ID.test(appId) ||
|
|
158
|
-
typeof clientId !== "string" ||
|
|
159
|
-
!CLIENT_ID.test(clientId) ||
|
|
160
|
-
!origin ||
|
|
161
|
-
callbackPath !== IDENTITY_SSO_CALLBACK_PATH ||
|
|
162
|
-
!Array.isArray(capabilities) ||
|
|
163
|
-
!capabilities.includes("identity-sso") ||
|
|
164
|
-
seen.has(appId) ||
|
|
165
|
-
Object.prototype.hasOwnProperty.call(
|
|
166
|
-
CANONICAL_IDENTITY_SSO_APP_ORIGINS,
|
|
167
|
-
appId,
|
|
168
|
-
)
|
|
169
|
-
) {
|
|
170
|
-
continue;
|
|
171
|
-
}
|
|
172
|
-
seen.add(appId);
|
|
173
|
-
registrations.push({
|
|
174
|
-
appId,
|
|
175
|
-
clientId,
|
|
176
|
-
origin,
|
|
177
|
-
callbackPath: IDENTITY_SSO_CALLBACK_PATH,
|
|
178
|
-
});
|
|
179
|
-
}
|
|
180
|
-
return registrations;
|
|
101
|
+
return parseWorkspaceSsoAppRegistrations(
|
|
102
|
+
env.IDENTITY_SSO_APP_REGISTRY_JSON,
|
|
103
|
+
).map((registration) => ({
|
|
104
|
+
appId: registration.appId,
|
|
105
|
+
clientId: registration.clientId,
|
|
106
|
+
origin: registration.origin,
|
|
107
|
+
callbackPath: IDENTITY_SSO_CALLBACK_PATH,
|
|
108
|
+
}));
|
|
181
109
|
}
|
|
182
110
|
|
|
183
111
|
/**
|
|
@@ -390,6 +318,9 @@ function buildCodeTableSql(): string {
|
|
|
390
318
|
}
|
|
391
319
|
|
|
392
320
|
async function ensureCodeTable(): Promise<void> {
|
|
321
|
+
// The Dispatch release migration owns this table in production serverless
|
|
322
|
+
// deployments. Do not turn a missing release migration into request-time DDL.
|
|
323
|
+
if (isProductionServerlessFunctionRuntime()) return;
|
|
393
324
|
if (!codeTableInitPromise) {
|
|
394
325
|
codeTableInitPromise = getDbExec()
|
|
395
326
|
.execute(buildCodeTableSql())
|
|
@@ -17,9 +17,8 @@
|
|
|
17
17
|
|
|
18
18
|
import { signA2AToken } from "@agent-native/core/a2a";
|
|
19
19
|
import {
|
|
20
|
-
|
|
20
|
+
hasActiveFeatureFlagRollout,
|
|
21
21
|
isFeatureFlagEnabled,
|
|
22
|
-
normalizeFeatureFlagRules,
|
|
23
22
|
} from "@agent-native/core/feature-flags";
|
|
24
23
|
import { getOrgDomain } from "@agent-native/core/org";
|
|
25
24
|
import { getH3App, getSession } from "@agent-native/core/server";
|
|
@@ -103,16 +102,8 @@ async function resolveOrgDomain(
|
|
|
103
102
|
}
|
|
104
103
|
|
|
105
104
|
export async function canAttemptWorkspaceSso(): Promise<boolean> {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
{},
|
|
109
|
-
).catch(() => null);
|
|
110
|
-
if (!stored) return false;
|
|
111
|
-
const rules = normalizeFeatureFlagRules(stored);
|
|
112
|
-
if (rules.mode === "off") return false;
|
|
113
|
-
if (rules.mode === "on") return true;
|
|
114
|
-
return (
|
|
115
|
-
rules.emails.length > 0 || rules.orgIds.length > 0 || rules.percentage > 0
|
|
105
|
+
return hasActiveFeatureFlagRollout(DESKTOP_WORKSPACE_SSO_FLAG.key).catch(
|
|
106
|
+
() => false,
|
|
116
107
|
);
|
|
117
108
|
}
|
|
118
109
|
|
|
@@ -2,6 +2,9 @@ import {
|
|
|
2
2
|
defineFeatureFlag,
|
|
3
3
|
defineFeatureFlags,
|
|
4
4
|
} from "@agent-native/core/feature-flags";
|
|
5
|
+
import { DISPATCH_WORKSPACE_SSO_FLAG } from "@agent-native/dispatch/shared/feature-flags";
|
|
6
|
+
|
|
7
|
+
export { DISPATCH_WORKSPACE_SSO_FLAG };
|
|
5
8
|
|
|
6
9
|
export const DESKTOP_WORKSPACE_SSO_FLAG = defineFeatureFlag({
|
|
7
10
|
key: "desktop.workspace-sso",
|
|
@@ -12,4 +15,5 @@ export const DESKTOP_WORKSPACE_SSO_FLAG = defineFeatureFlag({
|
|
|
12
15
|
|
|
13
16
|
export const DISPATCH_FEATURE_FLAGS = defineFeatureFlags([
|
|
14
17
|
DESKTOP_WORKSPACE_SSO_FLAG,
|
|
18
|
+
DISPATCH_WORKSPACE_SSO_FLAG,
|
|
15
19
|
]);
|
|
@@ -37,7 +37,7 @@ decisions, feedback, agent runs, and provider audit records.
|
|
|
37
37
|
|
|
38
38
|
- `navigation.view`: `factory` when the workspace is open.
|
|
39
39
|
- `navigation.factoryId`: selected Factory id when present.
|
|
40
|
-
- `navigation.factoryTab`: `map` | `inbox` | `rules` | `automations` | `audit` | `settings`.
|
|
40
|
+
- `navigation.factoryTab`: `map` | `inbox` | `rules` | `automations` | `agents` | `audit` | `settings`.
|
|
41
41
|
- `navigation.factoryAuditRunId`: selected automation run in the audit view when present.
|
|
42
42
|
- `navigation.factoryNodeId` / `navigation.factoryEdgeId`: selected graph item.
|
|
43
43
|
- A selected graph node or edge is part of `navigation` context. Read
|
|
@@ -68,6 +68,10 @@ decisions, feedback, agent runs, and provider audit records.
|
|
|
68
68
|
| `save-factory-graph` | Create or version a complete visual graph; never starts provider work. |
|
|
69
69
|
| `list-factory-comments` / `add-factory-comment` | Read or attach comments to a canvas, node, or edge. |
|
|
70
70
|
| `provider-api-catalog` / `provider-api-docs` / `provider-api-request` | Discover and use connected provider APIs with shared workspace credentials; never request raw keys. |
|
|
71
|
+
| `list-workspace-apps` / `update-workspace-app-metadata` | Inventory and edit mounted agentic apps in the shared workspace. |
|
|
72
|
+
| `list-workspace-resources` / `create-workspace-resource` / `update-workspace-resource` | Manage shared resource records used by agents and apps. |
|
|
73
|
+
| `import-agent` / `import-agent-pack` / `list-agent-pack` | Import a simple profile or a Claude/Cowork-style folder-backed agent pack. |
|
|
74
|
+
| `start-workspace-app-creation` | Promote an agent and all of its pack resource ids into an app-creation handoff. |
|
|
71
75
|
|
|
72
76
|
Rules start in shadow mode; hard guards always apply. Organization automations
|
|
73
77
|
execute stored prompts, and every external mutation needs a durable run,
|
|
@@ -74,6 +74,29 @@ signed callback secret belong in Dispatch workspace credentials and are
|
|
|
74
74
|
resolved at runtime. The app remains observe-only until a human explicitly
|
|
75
75
|
approves a Factory item.
|
|
76
76
|
|
|
77
|
+
## Agents and agentic apps
|
|
78
|
+
|
|
79
|
+
Factory's top-level Agents tab is a shared workspace surface, not a second
|
|
80
|
+
registry. It reads mounted agentic apps and their editable Dispatch metadata,
|
|
81
|
+
then embeds Dispatch's reusable-agent manager for create, chat, import, and
|
|
82
|
+
folder-backed pack editing. A simple agent's profile lives at
|
|
83
|
+
`agents/<slug>.md`; its optional context, references, and private skills live
|
|
84
|
+
under `agents/<slug>/`. Use the folder import to bring in a Claude Project,
|
|
85
|
+
Cowork-style folder, or another text-based agent setup. The importer strips
|
|
86
|
+
credentials, hooks, shell commands, and local environment settings, and All-app
|
|
87
|
+
imports remain subject to Dispatch approval policy.
|
|
88
|
+
|
|
89
|
+
When editing a factory flow, an agent step can bind to either a shared reusable
|
|
90
|
+
agent or a ready mounted agentic app from the same workspace database. The map
|
|
91
|
+
stores the selected target type and id, while the graph remains a reviewable
|
|
92
|
+
blueprint and does not silently change runtime routing.
|
|
93
|
+
|
|
94
|
+
Use **Build app** on an agent row when the agent needs a full workspace face.
|
|
95
|
+
The handoff carries the profile and every pack resource id into app creation;
|
|
96
|
+
the original agent remains reusable after the app is created. Mounted apps and
|
|
97
|
+
simple agents continue to use the same Dispatch actions, SQL resources, grants,
|
|
98
|
+
and application-state navigation.
|
|
99
|
+
|
|
77
100
|
## Development
|
|
78
101
|
|
|
79
102
|
```bash
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
import { defineAction } from "@agent-native/core/action";
|
|
11
11
|
import { readAppState } from "@agent-native/core/application-state";
|
|
12
|
+
import { dispatchActions } from "@agent-native/dispatch/actions";
|
|
12
13
|
import { z } from "zod";
|
|
13
14
|
|
|
14
15
|
import {
|
|
@@ -22,6 +23,12 @@ import {
|
|
|
22
23
|
workspaceMemberIdentityFromContext,
|
|
23
24
|
} from "../server/lib/require-workspace-member.js";
|
|
24
25
|
|
|
26
|
+
async function runDispatchAction(name: string, args: Record<string, unknown>) {
|
|
27
|
+
const action = dispatchActions[name];
|
|
28
|
+
if (!action) throw new Error(`Dispatch action not found: ${name}`);
|
|
29
|
+
return action.run(args);
|
|
30
|
+
}
|
|
31
|
+
|
|
25
32
|
export default defineAction({
|
|
26
33
|
description:
|
|
27
34
|
"See what the user is currently looking at on screen. Returns the current navigation state for chat or Factory. Always call this first when the visible selection matters.",
|
|
@@ -63,6 +70,16 @@ export default defineAction({
|
|
|
63
70
|
selectedNode: graph.nodes.find((node) => node.id === selectedNodeId),
|
|
64
71
|
selectedEdge: graph.edges.find((edge) => edge.id === selectedEdgeId),
|
|
65
72
|
};
|
|
73
|
+
|
|
74
|
+
if (state.factoryTab === "agents") {
|
|
75
|
+
const [apps, agents] = await Promise.all([
|
|
76
|
+
runDispatchAction("list-workspace-apps", {
|
|
77
|
+
includeAgentCards: false,
|
|
78
|
+
}),
|
|
79
|
+
runDispatchAction("list-workspace-resources", { kind: "agent" }),
|
|
80
|
+
]);
|
|
81
|
+
screen.factoryAgents = { apps, agents };
|
|
82
|
+
}
|
|
66
83
|
}
|
|
67
84
|
|
|
68
85
|
if (Object.keys(screen).length === 0) {
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useActionMutation,
|
|
3
|
+
useActionQuery,
|
|
4
|
+
} from "@agent-native/core/client/hooks";
|
|
5
|
+
import { useT } from "@agent-native/core/client/i18n";
|
|
6
|
+
import { SimpleAgentsPanel } from "@agent-native/dispatch/components";
|
|
7
|
+
import { ActionQueryError } from "@agent-native/dispatch/components";
|
|
8
|
+
import { Badge } from "@agent-native/dispatch/components/ui/badge";
|
|
9
|
+
import {
|
|
10
|
+
Dialog,
|
|
11
|
+
DialogContent,
|
|
12
|
+
DialogDescription,
|
|
13
|
+
DialogFooter,
|
|
14
|
+
DialogHeader,
|
|
15
|
+
DialogTitle,
|
|
16
|
+
DialogTrigger,
|
|
17
|
+
} from "@agent-native/dispatch/components/ui/dialog";
|
|
18
|
+
import {
|
|
19
|
+
IconEdit,
|
|
20
|
+
IconExternalLink,
|
|
21
|
+
IconLayoutGrid,
|
|
22
|
+
} from "@tabler/icons-react";
|
|
23
|
+
import { useEffect, useState } from "react";
|
|
24
|
+
import { toast } from "sonner";
|
|
25
|
+
|
|
26
|
+
import { Button } from "@/components/ui/button";
|
|
27
|
+
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
|
28
|
+
import { Input } from "@/components/ui/input";
|
|
29
|
+
import { Label } from "@/components/ui/label";
|
|
30
|
+
import { Textarea } from "@/components/ui/textarea";
|
|
31
|
+
|
|
32
|
+
interface WorkspaceAppSummary {
|
|
33
|
+
id: string;
|
|
34
|
+
name: string;
|
|
35
|
+
description?: string;
|
|
36
|
+
path: string;
|
|
37
|
+
url: string | null;
|
|
38
|
+
isDispatch: boolean;
|
|
39
|
+
status?: "ready" | "pending";
|
|
40
|
+
statusLabel?: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function EditAppDialog({
|
|
44
|
+
app,
|
|
45
|
+
onSaved,
|
|
46
|
+
t,
|
|
47
|
+
}: {
|
|
48
|
+
app: WorkspaceAppSummary;
|
|
49
|
+
onSaved: () => void;
|
|
50
|
+
t: ReturnType<typeof useT>;
|
|
51
|
+
}) {
|
|
52
|
+
const [open, setOpen] = useState(false);
|
|
53
|
+
const [name, setName] = useState(app.name);
|
|
54
|
+
const [description, setDescription] = useState(app.description ?? "");
|
|
55
|
+
const update = useActionMutation("update-workspace-app-metadata", {
|
|
56
|
+
onSuccess: () => {
|
|
57
|
+
toast.success(t("factoryRoute.appDetailsUpdated"));
|
|
58
|
+
setOpen(false);
|
|
59
|
+
onSaved();
|
|
60
|
+
},
|
|
61
|
+
onError: (error) => toast.error(error.message),
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
useEffect(() => {
|
|
65
|
+
if (!open) return;
|
|
66
|
+
setName(app.name);
|
|
67
|
+
setDescription(app.description ?? "");
|
|
68
|
+
}, [app, open]);
|
|
69
|
+
|
|
70
|
+
return (
|
|
71
|
+
<Dialog open={open} onOpenChange={setOpen}>
|
|
72
|
+
<DialogTrigger asChild>
|
|
73
|
+
<Button variant="ghost" size="icon" aria-label={`Edit ${app.name}`}>
|
|
74
|
+
<IconEdit size={16} />
|
|
75
|
+
</Button>
|
|
76
|
+
</DialogTrigger>
|
|
77
|
+
<DialogContent>
|
|
78
|
+
<DialogHeader>
|
|
79
|
+
<DialogTitle>{t("factoryRoute.editAppDetails")}</DialogTitle>
|
|
80
|
+
<DialogDescription className="sr-only">
|
|
81
|
+
{t("factoryRoute.editAppDetailsDescription")}
|
|
82
|
+
</DialogDescription>
|
|
83
|
+
</DialogHeader>
|
|
84
|
+
<div className="space-y-4 py-2">
|
|
85
|
+
<div className="space-y-2">
|
|
86
|
+
<Label htmlFor={`factory-app-name-${app.id}`}>
|
|
87
|
+
{t("factoryRoute.appName")}
|
|
88
|
+
</Label>
|
|
89
|
+
<Input
|
|
90
|
+
id={`factory-app-name-${app.id}`}
|
|
91
|
+
value={name}
|
|
92
|
+
onChange={(event) => setName(event.target.value)}
|
|
93
|
+
/>
|
|
94
|
+
</div>
|
|
95
|
+
<div className="space-y-2">
|
|
96
|
+
<Label htmlFor={`factory-app-description-${app.id}`}>
|
|
97
|
+
{t("factoryRoute.appDescription")}
|
|
98
|
+
</Label>
|
|
99
|
+
<Textarea
|
|
100
|
+
id={`factory-app-description-${app.id}`}
|
|
101
|
+
value={description}
|
|
102
|
+
onChange={(event) => setDescription(event.target.value)}
|
|
103
|
+
rows={4}
|
|
104
|
+
/>
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
<DialogFooter>
|
|
108
|
+
<Button
|
|
109
|
+
onClick={() =>
|
|
110
|
+
update.mutate({
|
|
111
|
+
appId: app.id,
|
|
112
|
+
name: name.trim(),
|
|
113
|
+
description: description.trim(),
|
|
114
|
+
})
|
|
115
|
+
}
|
|
116
|
+
disabled={!name.trim() || update.isPending}
|
|
117
|
+
>
|
|
118
|
+
{update.isPending
|
|
119
|
+
? t("factoryRoute.savingChanges")
|
|
120
|
+
: t("factoryRoute.saveChanges")}
|
|
121
|
+
</Button>
|
|
122
|
+
</DialogFooter>
|
|
123
|
+
</DialogContent>
|
|
124
|
+
</Dialog>
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
function AgenticAppsSection({ t }: { t: ReturnType<typeof useT> }) {
|
|
129
|
+
const query = useActionQuery<WorkspaceAppSummary[]>("list-workspace-apps", {
|
|
130
|
+
includeAgentCards: false,
|
|
131
|
+
});
|
|
132
|
+
const apps = (query.data ?? []).filter((app) => !app.isDispatch);
|
|
133
|
+
|
|
134
|
+
if (query.isError) {
|
|
135
|
+
return (
|
|
136
|
+
<ActionQueryError
|
|
137
|
+
error={query.error}
|
|
138
|
+
onRetry={() => void query.refetch()}
|
|
139
|
+
/>
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
return (
|
|
144
|
+
<Card>
|
|
145
|
+
<CardHeader>
|
|
146
|
+
<CardTitle className="flex items-center gap-2 text-base">
|
|
147
|
+
<IconLayoutGrid className="size-4 text-muted-foreground" />
|
|
148
|
+
{t("factoryRoute.agenticAppsTitle")}
|
|
149
|
+
</CardTitle>
|
|
150
|
+
</CardHeader>
|
|
151
|
+
<CardContent>
|
|
152
|
+
{query.isLoading && apps.length === 0 ? (
|
|
153
|
+
<div className="space-y-3">
|
|
154
|
+
{[0, 1].map((item) => (
|
|
155
|
+
<div
|
|
156
|
+
key={item}
|
|
157
|
+
className="h-16 animate-pulse rounded-xl bg-muted"
|
|
158
|
+
/>
|
|
159
|
+
))}
|
|
160
|
+
</div>
|
|
161
|
+
) : apps.length > 0 ? (
|
|
162
|
+
<div className="space-y-2">
|
|
163
|
+
{apps.map((app) => (
|
|
164
|
+
<div
|
|
165
|
+
key={app.id}
|
|
166
|
+
className="flex items-start gap-3 rounded-xl border px-4 py-3"
|
|
167
|
+
>
|
|
168
|
+
<div className="flex size-9 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground">
|
|
169
|
+
<IconLayoutGrid size={18} />
|
|
170
|
+
</div>
|
|
171
|
+
<div className="min-w-0 flex-1">
|
|
172
|
+
<div className="flex flex-wrap items-center gap-2">
|
|
173
|
+
<span className="text-sm font-medium">{app.name}</span>
|
|
174
|
+
{app.status ? (
|
|
175
|
+
<Badge variant="outline">
|
|
176
|
+
{app.statusLabel || app.status}
|
|
177
|
+
</Badge>
|
|
178
|
+
) : null}
|
|
179
|
+
</div>
|
|
180
|
+
{app.description ? (
|
|
181
|
+
<div className="mt-1 text-sm text-muted-foreground">
|
|
182
|
+
{app.description}
|
|
183
|
+
</div>
|
|
184
|
+
) : null}
|
|
185
|
+
<div className="mt-1 font-mono text-[11px] text-muted-foreground/70">
|
|
186
|
+
{app.path}
|
|
187
|
+
</div>
|
|
188
|
+
</div>
|
|
189
|
+
<div className="flex shrink-0 items-center gap-1">
|
|
190
|
+
{app.url ? (
|
|
191
|
+
<Button variant="ghost" size="icon" asChild>
|
|
192
|
+
<a
|
|
193
|
+
href={app.url}
|
|
194
|
+
target="_blank"
|
|
195
|
+
rel="noreferrer"
|
|
196
|
+
aria-label={t("factoryRoute.openApp")}
|
|
197
|
+
>
|
|
198
|
+
<IconExternalLink size={16} />
|
|
199
|
+
</a>
|
|
200
|
+
</Button>
|
|
201
|
+
) : null}
|
|
202
|
+
<EditAppDialog
|
|
203
|
+
app={app}
|
|
204
|
+
t={t}
|
|
205
|
+
onSaved={() => void query.refetch()}
|
|
206
|
+
/>
|
|
207
|
+
</div>
|
|
208
|
+
</div>
|
|
209
|
+
))}
|
|
210
|
+
</div>
|
|
211
|
+
) : (
|
|
212
|
+
<div className="rounded-xl border border-dashed px-6 py-10 text-center text-sm text-muted-foreground">
|
|
213
|
+
{t("factoryRoute.agenticAppsEmpty")}
|
|
214
|
+
</div>
|
|
215
|
+
)}
|
|
216
|
+
</CardContent>
|
|
217
|
+
</Card>
|
|
218
|
+
);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export function FactoryAgentsView() {
|
|
222
|
+
const t = useT();
|
|
223
|
+
|
|
224
|
+
return (
|
|
225
|
+
<div className="space-y-6 p-4 lg:p-6">
|
|
226
|
+
<AgenticAppsSection t={t} />
|
|
227
|
+
<Card>
|
|
228
|
+
<CardHeader>
|
|
229
|
+
<CardTitle className="text-base">
|
|
230
|
+
{t("factoryRoute.agentsTitle")}
|
|
231
|
+
</CardTitle>
|
|
232
|
+
</CardHeader>
|
|
233
|
+
<CardContent>
|
|
234
|
+
<SimpleAgentsPanel />
|
|
235
|
+
</CardContent>
|
|
236
|
+
</Card>
|
|
237
|
+
</div>
|
|
238
|
+
);
|
|
239
|
+
}
|