@nocobase/app-plugin-agents 0.1.0-beta.8 → 1.0.0-beta.15
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/CHANGELOG.md +304 -0
- package/README.md +94 -51
- package/dist/client/api/client.d.ts +25 -19
- package/dist/client/api/client.d.ts.map +1 -1
- package/dist/client/api/client.js +23 -24
- package/dist/client/api/client.js.map +1 -1
- package/dist/client/api/keys.d.ts +4 -1
- package/dist/client/api/keys.d.ts.map +1 -1
- package/dist/client/api/keys.js +4 -1
- package/dist/client/api/keys.js.map +1 -1
- package/dist/client/api/runners.d.ts +8 -4
- package/dist/client/api/runners.d.ts.map +1 -1
- package/dist/client/api/runners.js +9 -0
- package/dist/client/api/runners.js.map +1 -1
- package/dist/client/chat/ai-form.d.ts +13 -0
- package/dist/client/chat/ai-form.d.ts.map +1 -0
- package/dist/client/chat/ai-form.js +57 -0
- package/dist/client/chat/ai-form.js.map +1 -0
- package/dist/client/chat/api.d.ts +16 -14
- package/dist/client/chat/api.d.ts.map +1 -1
- package/dist/client/chat/api.js +85 -18
- package/dist/client/chat/api.js.map +1 -1
- package/dist/client/chat/client-id.d.ts +3 -0
- package/dist/client/chat/client-id.d.ts.map +1 -0
- package/dist/client/chat/client-id.js +17 -0
- package/dist/client/chat/client-id.js.map +1 -0
- package/dist/client/chat/consultation-identity.d.ts +7 -0
- package/dist/client/chat/consultation-identity.d.ts.map +1 -0
- package/dist/client/chat/consultation-identity.js +39 -0
- package/dist/client/chat/consultation-identity.js.map +1 -0
- package/dist/client/chat/context-model.d.ts +21 -3
- package/dist/client/chat/context-model.d.ts.map +1 -1
- package/dist/client/chat/context-model.js +33 -4
- package/dist/client/chat/context-model.js.map +1 -1
- package/dist/client/chat/controller.d.ts +83 -0
- package/dist/client/chat/controller.d.ts.map +1 -0
- package/dist/client/chat/controller.js +767 -0
- package/dist/client/chat/controller.js.map +1 -0
- package/dist/client/chat/extensions.d.ts +8 -3
- package/dist/client/chat/extensions.d.ts.map +1 -1
- package/dist/client/chat/extensions.js.map +1 -1
- package/dist/client/chat/feedback.d.ts +18 -0
- package/dist/client/chat/feedback.d.ts.map +1 -0
- package/dist/client/chat/feedback.js +38 -0
- package/dist/client/chat/feedback.js.map +1 -0
- package/dist/client/chat/form-registry.d.ts +95 -0
- package/dist/client/chat/form-registry.d.ts.map +1 -0
- package/dist/client/chat/form-registry.js +384 -0
- package/dist/client/chat/form-registry.js.map +1 -0
- package/dist/client/chat/keys.d.ts +1 -0
- package/dist/client/chat/keys.d.ts.map +1 -1
- package/dist/client/chat/keys.js +3 -1
- package/dist/client/chat/keys.js.map +1 -1
- package/dist/client/chat/message-model.d.ts +38 -44
- package/dist/client/chat/message-model.d.ts.map +1 -1
- package/dist/client/chat/message-model.js +138 -56
- package/dist/client/chat/message-model.js.map +1 -1
- package/dist/client/chat/provider.d.ts +12 -2
- package/dist/client/chat/provider.d.ts.map +1 -1
- package/dist/client/chat/provider.js +130 -4
- package/dist/client/chat/provider.js.map +1 -1
- package/dist/client/chat/submissions.d.ts +67 -0
- package/dist/client/chat/submissions.d.ts.map +1 -0
- package/dist/client/chat/submissions.js +241 -0
- package/dist/client/chat/submissions.js.map +1 -0
- package/dist/client/chat/tool-renderer.d.ts +39 -0
- package/dist/client/chat/tool-renderer.d.ts.map +1 -0
- package/dist/client/chat/tool-renderer.js +27 -0
- package/dist/client/chat/tool-renderer.js.map +1 -0
- package/dist/client/chat/use-chat-scroll.d.ts +4 -0
- package/dist/client/chat/use-chat-scroll.d.ts.map +1 -0
- package/dist/client/chat/use-chat-scroll.js +73 -0
- package/dist/client/chat/use-chat-scroll.js.map +1 -0
- package/dist/client/chat/use-chat.d.ts +13 -24
- package/dist/client/chat/use-chat.d.ts.map +1 -1
- package/dist/client/chat/use-chat.js +250 -235
- package/dist/client/chat/use-chat.js.map +1 -1
- package/dist/client/chat.d.ts +20 -8
- package/dist/client/chat.d.ts.map +1 -1
- package/dist/client/chat.js +16 -4
- package/dist/client/chat.js.map +1 -1
- package/dist/client/components/agent-picker.d.ts +6 -23
- package/dist/client/components/agent-picker.d.ts.map +1 -1
- package/dist/client/components/agent-picker.js +20 -39
- package/dist/client/components/agent-picker.js.map +1 -1
- package/dist/client/components/quota-status.d.ts +16 -0
- package/dist/client/components/quota-status.d.ts.map +1 -0
- package/dist/client/components/quota-status.js +39 -0
- package/dist/client/components/quota-status.js.map +1 -0
- package/dist/client/components/runners-refresh.d.ts.map +1 -1
- package/dist/client/components/runners-refresh.js +1 -0
- package/dist/client/components/runners-refresh.js.map +1 -1
- package/dist/client/components/variables/variable-dialogs.d.ts.map +1 -1
- package/dist/client/components/variables/variable-dialogs.js +7 -7
- package/dist/client/components/variables/variable-dialogs.js.map +1 -1
- package/dist/client/config.d.ts +2 -0
- package/dist/client/config.d.ts.map +1 -1
- package/dist/client/config.js +2 -0
- package/dist/client/config.js.map +1 -1
- package/dist/client/hooks/use-agent-picker-labels.d.ts.map +1 -1
- package/dist/client/hooks/use-agent-picker-labels.js +4 -12
- package/dist/client/hooks/use-agent-picker-labels.js.map +1 -1
- package/dist/client/hooks/use-quota-expiry.d.ts +7 -0
- package/dist/client/hooks/use-quota-expiry.d.ts.map +1 -0
- package/dist/client/hooks/use-quota-expiry.js +92 -0
- package/dist/client/hooks/use-quota-expiry.js.map +1 -0
- package/dist/client/hooks/use-realtime-topic.d.ts +1 -4
- package/dist/client/hooks/use-realtime-topic.d.ts.map +1 -1
- package/dist/client/hooks/use-realtime-topic.js +7 -11
- package/dist/client/hooks/use-realtime-topic.js.map +1 -1
- package/dist/client/kit.d.ts +14 -12
- package/dist/client/kit.d.ts.map +1 -1
- package/dist/client/kit.js +37 -14
- package/dist/client/kit.js.map +1 -1
- package/dist/client/lib/agents.d.ts +5 -18
- package/dist/client/lib/agents.d.ts.map +1 -1
- package/dist/client/lib/agents.js +18 -55
- package/dist/client/lib/agents.js.map +1 -1
- package/dist/client/lib/format.d.ts +3 -1
- package/dist/client/lib/format.d.ts.map +1 -1
- package/dist/client/lib/format.js +25 -0
- package/dist/client/lib/format.js.map +1 -1
- package/dist/client/lib/skill-settings-context.d.ts +9 -0
- package/dist/client/lib/skill-settings-context.d.ts.map +1 -0
- package/dist/client/lib/skill-settings-context.js +4 -0
- package/dist/client/lib/skill-settings-context.js.map +1 -0
- package/dist/client/lib/skill-settings.d.ts +12 -0
- package/dist/client/lib/skill-settings.d.ts.map +1 -0
- package/dist/client/lib/skill-settings.js +37 -0
- package/dist/client/lib/skill-settings.js.map +1 -0
- package/dist/client/locales/chat.en-US.d.ts +8 -27
- package/dist/client/locales/chat.en-US.d.ts.map +1 -1
- package/dist/client/locales/chat.en-US.js +12 -30
- package/dist/client/locales/chat.en-US.js.map +1 -1
- package/dist/client/locales/chat.zh-CN.d.ts.map +1 -1
- package/dist/client/locales/chat.zh-CN.js +9 -27
- package/dist/client/locales/chat.zh-CN.js.map +1 -1
- package/dist/client/locales/en-US.d.ts +87 -217
- package/dist/client/locales/en-US.d.ts.map +1 -1
- package/dist/client/locales/en-US.js +92 -218
- package/dist/client/locales/en-US.js.map +1 -1
- package/dist/client/locales/runWait.en-US.d.ts +7 -0
- package/dist/client/locales/runWait.en-US.d.ts.map +1 -1
- package/dist/client/locales/runWait.en-US.js +10 -3
- package/dist/client/locales/runWait.en-US.js.map +1 -1
- package/dist/client/locales/runWait.zh-CN.d.ts +1 -1
- package/dist/client/locales/runWait.zh-CN.d.ts.map +1 -1
- package/dist/client/locales/runWait.zh-CN.js +11 -4
- package/dist/client/locales/runWait.zh-CN.js.map +1 -1
- package/dist/client/locales/runtimes.en-US.d.ts +83 -0
- package/dist/client/locales/runtimes.en-US.d.ts.map +1 -1
- package/dist/client/locales/runtimes.en-US.js +84 -1
- package/dist/client/locales/runtimes.en-US.js.map +1 -1
- package/dist/client/locales/runtimes.zh-CN.d.ts.map +1 -1
- package/dist/client/locales/runtimes.zh-CN.js +83 -0
- package/dist/client/locales/runtimes.zh-CN.js.map +1 -1
- package/dist/client/locales/skills.en-US.d.ts +7 -0
- package/dist/client/locales/skills.en-US.d.ts.map +1 -1
- package/dist/client/locales/skills.en-US.js +8 -1
- package/dist/client/locales/skills.en-US.js.map +1 -1
- package/dist/client/locales/skills.zh-CN.d.ts.map +1 -1
- package/dist/client/locales/skills.zh-CN.js +8 -1
- package/dist/client/locales/skills.zh-CN.js.map +1 -1
- package/dist/client/locales/zh-CN.d.ts.map +1 -1
- package/dist/client/locales/zh-CN.js +94 -220
- package/dist/client/locales/zh-CN.js.map +1 -1
- package/dist/client/online/services.d.ts.map +1 -1
- package/dist/client/online/services.js +5 -6
- package/dist/client/online/services.js.map +1 -1
- package/dist/client/pages/agents/agent-dialog.d.ts +9 -0
- package/dist/client/pages/agents/agent-dialog.d.ts.map +1 -0
- package/dist/client/pages/agents/agent-dialog.js +106 -0
- package/dist/client/pages/agents/agent-dialog.js.map +1 -0
- package/dist/client/pages/agents/agent-state.d.ts +11 -0
- package/dist/client/pages/agents/agent-state.d.ts.map +1 -0
- package/dist/client/pages/agents/agent-state.js +28 -0
- package/dist/client/pages/agents/agent-state.js.map +1 -0
- package/dist/client/pages/agents/index.d.ts +1 -1
- package/dist/client/pages/agents/index.d.ts.map +1 -1
- package/dist/client/pages/agents/index.js +7 -101
- package/dist/client/pages/agents/index.js.map +1 -1
- package/dist/client/pages/agents/runner-agents.d.ts +3 -0
- package/dist/client/pages/agents/runner-agents.d.ts.map +1 -0
- package/dist/client/pages/agents/runner-agents.js +185 -0
- package/dist/client/pages/agents/runner-agents.js.map +1 -0
- package/dist/client/pages/runtimes/connect.js.map +1 -1
- package/dist/client/pages/runtimes/index.d.ts.map +1 -1
- package/dist/client/pages/runtimes/index.js +1 -1
- package/dist/client/pages/runtimes/index.js.map +1 -1
- package/dist/client/pages/runtimes/quota-targets.d.ts +4 -0
- package/dist/client/pages/runtimes/quota-targets.d.ts.map +1 -0
- package/dist/client/pages/runtimes/quota-targets.js +18 -0
- package/dist/client/pages/runtimes/quota-targets.js.map +1 -0
- package/dist/client/pages/runtimes/quota.d.ts +17 -0
- package/dist/client/pages/runtimes/quota.d.ts.map +1 -0
- package/dist/client/pages/runtimes/quota.js +50 -0
- package/dist/client/pages/runtimes/quota.js.map +1 -0
- package/dist/client/pages/runtimes/runner-cells.d.ts +11 -4
- package/dist/client/pages/runtimes/runner-cells.d.ts.map +1 -1
- package/dist/client/pages/runtimes/runner-cells.js +6 -3
- package/dist/client/pages/runtimes/runner-cells.js.map +1 -1
- package/dist/client/pages/runtimes/runner-overview.d.ts +9 -0
- package/dist/client/pages/runtimes/runner-overview.d.ts.map +1 -0
- package/dist/client/pages/runtimes/runner-overview.js +109 -0
- package/dist/client/pages/runtimes/runner-overview.js.map +1 -0
- package/dist/client/pages/runtimes/runner-runs.d.ts +5 -0
- package/dist/client/pages/runtimes/runner-runs.d.ts.map +1 -0
- package/dist/client/pages/runtimes/runner-runs.js +35 -0
- package/dist/client/pages/runtimes/runner-runs.js.map +1 -0
- package/dist/client/pages/runtimes/runner-sheet.d.ts +2 -3
- package/dist/client/pages/runtimes/runner-sheet.d.ts.map +1 -1
- package/dist/client/pages/runtimes/runner-sheet.js +43 -171
- package/dist/client/pages/runtimes/runner-sheet.js.map +1 -1
- package/dist/client/pages/runtimes/runner-tools.d.ts +17 -0
- package/dist/client/pages/runtimes/runner-tools.d.ts.map +1 -0
- package/dist/client/pages/runtimes/runner-tools.js +75 -0
- package/dist/client/pages/runtimes/runner-tools.js.map +1 -0
- package/dist/client/pages/runtimes/runner-workspaces.d.ts +6 -0
- package/dist/client/pages/runtimes/runner-workspaces.d.ts.map +1 -0
- package/dist/client/pages/runtimes/runner-workspaces.js +37 -0
- package/dist/client/pages/runtimes/runner-workspaces.js.map +1 -0
- package/dist/client/pages/runtimes/tool-slots-fields.js +1 -1
- package/dist/client/pages/runtimes/tool-slots-fields.js.map +1 -1
- package/dist/client/pages/runtimes/workspace-diagnostics.d.ts +6 -4
- package/dist/client/pages/runtimes/workspace-diagnostics.d.ts.map +1 -1
- package/dist/client/pages/runtimes/workspace-diagnostics.js +67 -33
- package/dist/client/pages/runtimes/workspace-diagnostics.js.map +1 -1
- package/dist/client/pages/skills/detail/index.d.ts.map +1 -1
- package/dist/client/pages/skills/detail/index.js +11 -15
- package/dist/client/pages/skills/detail/index.js.map +1 -1
- package/dist/client/pages/skills/index.d.ts.map +1 -1
- package/dist/client/pages/skills/index.js +2 -2
- package/dist/client/pages/skills/index.js.map +1 -1
- package/dist/client/pages/usage/index.js +2 -2
- package/dist/client/pages/usage/index.js.map +1 -1
- package/dist/client/profile/default-agent.d.ts.map +1 -1
- package/dist/client/profile/default-agent.js +2 -4
- package/dist/client/profile/default-agent.js.map +1 -1
- package/dist/client/routes.d.ts +1 -1
- package/dist/client/routes.d.ts.map +1 -1
- package/dist/client/routes.js +1 -13
- package/dist/client/routes.js.map +1 -1
- package/dist/client/runs/format-wait.d.ts.map +1 -1
- package/dist/client/runs/format-wait.js +15 -1
- package/dist/client/runs/format-wait.js.map +1 -1
- package/dist/client/runs/subject-runs.d.ts +5 -0
- package/dist/client/runs/subject-runs.d.ts.map +1 -1
- package/dist/client/runs/subject-runs.js +24 -9
- package/dist/client/runs/subject-runs.js.map +1 -1
- package/dist/client/runs/use-run-events.d.ts +1 -1
- package/dist/client/runs/use-run-events.d.ts.map +1 -1
- package/dist/client/runs/use-run-events.js +5 -2
- package/dist/client/runs/use-run-events.js.map +1 -1
- package/dist/client/runs.d.ts +1 -1
- package/dist/client/runs.d.ts.map +1 -1
- package/dist/client/runs.js +1 -1
- package/dist/client/runs.js.map +1 -1
- package/dist/database/migrations/.manifest.json +42 -2
- package/dist/database/migrations/202610020003_ag_create_runs.d.ts.map +1 -1
- package/dist/database/migrations/202610020003_ag_create_runs.js +0 -1
- package/dist/database/migrations/202610020003_ag_create_runs.js.map +1 -1
- package/dist/database/migrations/202610120001_ag_index_run_retries.d.ts +4 -0
- package/dist/database/migrations/202610120001_ag_index_run_retries.d.ts.map +1 -0
- package/dist/database/migrations/202610120001_ag_index_run_retries.js +17 -0
- package/dist/database/migrations/202610120001_ag_index_run_retries.js.map +1 -0
- package/dist/database/migrations/202610120002_ag_add_queue_entered_at.d.ts +4 -0
- package/dist/database/migrations/202610120002_ag_add_queue_entered_at.d.ts.map +1 -0
- package/dist/database/migrations/202610120002_ag_add_queue_entered_at.js +50 -0
- package/dist/database/migrations/202610120002_ag_add_queue_entered_at.js.map +1 -0
- package/dist/database/migrations/202610170001_ag_runner_quota.d.ts +4 -0
- package/dist/database/migrations/202610170001_ag_runner_quota.d.ts.map +1 -0
- package/dist/database/migrations/202610170001_ag_runner_quota.js +19 -0
- package/dist/database/migrations/202610170001_ag_runner_quota.js.map +1 -0
- package/dist/database/migrations/202610240020_ag_runner_agents.d.ts +4 -0
- package/dist/database/migrations/202610240020_ag_runner_agents.d.ts.map +1 -0
- package/dist/database/migrations/202610240020_ag_runner_agents.js +115 -0
- package/dist/database/migrations/202610240020_ag_runner_agents.js.map +1 -0
- package/dist/database/migrations/202610240040_ag_discovery_preferences.d.ts +4 -0
- package/dist/database/migrations/202610240040_ag_discovery_preferences.d.ts.map +1 -0
- package/dist/database/migrations/202610240040_ag_discovery_preferences.js +18 -0
- package/dist/database/migrations/202610240040_ag_discovery_preferences.js.map +1 -0
- package/dist/database/migrations/202610250001_ag_comment_runner_consent.d.ts +4 -0
- package/dist/database/migrations/202610250001_ag_comment_runner_consent.d.ts.map +1 -0
- package/dist/database/migrations/202610250001_ag_comment_runner_consent.js +41 -0
- package/dist/database/migrations/202610250001_ag_comment_runner_consent.js.map +1 -0
- package/dist/database/migrations/202610260001_ag_drop_directory_index.d.ts +4 -0
- package/dist/database/migrations/202610260001_ag_drop_directory_index.d.ts.map +1 -0
- package/dist/database/migrations/202610260001_ag_drop_directory_index.js +24 -0
- package/dist/database/migrations/202610260001_ag_drop_directory_index.js.map +1 -0
- package/dist/database/migrations/202610260001_ag_run_revision.d.ts +4 -0
- package/dist/database/migrations/202610260001_ag_run_revision.d.ts.map +1 -0
- package/dist/database/migrations/202610260001_ag_run_revision.js +19 -0
- package/dist/database/migrations/202610260001_ag_run_revision.js.map +1 -0
- package/dist/database/migrations/202610270001_ag_online_agent.d.ts +4 -0
- package/dist/database/migrations/202610270001_ag_online_agent.d.ts.map +1 -0
- package/dist/database/migrations/202610270001_ag_online_agent.js +43 -0
- package/dist/database/migrations/202610270001_ag_online_agent.js.map +1 -0
- package/dist/database/migrations/202610270002_ag_chat_list_visibility.d.ts +4 -0
- package/dist/database/migrations/202610270002_ag_chat_list_visibility.d.ts.map +1 -0
- package/dist/database/migrations/202610270002_ag_chat_list_visibility.js +17 -0
- package/dist/database/migrations/202610270002_ag_chat_list_visibility.js.map +1 -0
- package/dist/package.json +34 -12
- package/dist/server/cli/run-credential.js +1 -1
- package/dist/server/cli/surface.d.ts.map +1 -1
- package/dist/server/cli/surface.js +4 -1
- package/dist/server/cli/surface.js.map +1 -1
- package/dist/server/composition.d.ts +36 -35
- package/dist/server/composition.d.ts.map +1 -1
- package/dist/server/composition.js +99 -66
- package/dist/server/composition.js.map +1 -1
- package/dist/server/core/agents/agent.service.d.ts +51 -43
- package/dist/server/core/agents/agent.service.d.ts.map +1 -1
- package/dist/server/core/agents/agent.service.js +347 -321
- package/dist/server/core/agents/agent.service.js.map +1 -1
- package/dist/server/core/agents/agent.store.d.ts +26 -12
- package/dist/server/core/agents/agent.store.d.ts.map +1 -1
- package/dist/server/core/agents/agent.store.js +74 -66
- package/dist/server/core/agents/agent.store.js.map +1 -1
- package/dist/server/core/agents/agent.views.d.ts +29 -0
- package/dist/server/core/agents/agent.views.d.ts.map +1 -0
- package/dist/server/core/agents/agent.views.js +88 -0
- package/dist/server/core/agents/agent.views.js.map +1 -0
- package/dist/server/core/agents/discovery.d.ts +12 -0
- package/dist/server/core/agents/discovery.d.ts.map +1 -0
- package/dist/server/core/agents/discovery.js +39 -0
- package/dist/server/core/agents/discovery.js.map +1 -0
- package/dist/server/core/agents/index.d.ts +3 -2
- package/dist/server/core/agents/index.d.ts.map +1 -1
- package/dist/server/core/agents/index.js +3 -2
- package/dist/server/core/agents/index.js.map +1 -1
- package/dist/server/core/brief/brief.js +3 -3
- package/dist/server/core/brief/brief.js.map +1 -1
- package/dist/server/core/callers/index.d.ts +10 -1
- package/dist/server/core/callers/index.d.ts.map +1 -1
- package/dist/server/core/callers/index.js +15 -0
- package/dist/server/core/callers/index.js.map +1 -1
- package/dist/server/core/conversations/attachments.d.ts.map +1 -1
- package/dist/server/core/conversations/attachments.js +6 -1
- package/dist/server/core/conversations/attachments.js.map +1 -1
- package/dist/server/core/conversations/availability.d.ts +6 -11
- package/dist/server/core/conversations/availability.d.ts.map +1 -1
- package/dist/server/core/conversations/availability.js +11 -15
- package/dist/server/core/conversations/availability.js.map +1 -1
- package/dist/server/core/conversations/chat-settings.d.ts +2 -2
- package/dist/server/core/conversations/chat-settings.d.ts.map +1 -1
- package/dist/server/core/conversations/chat-settings.js +17 -22
- package/dist/server/core/conversations/chat-settings.js.map +1 -1
- package/dist/server/core/conversations/conversation.service.d.ts +13 -8
- package/dist/server/core/conversations/conversation.service.d.ts.map +1 -1
- package/dist/server/core/conversations/conversation.service.js +397 -383
- package/dist/server/core/conversations/conversation.service.js.map +1 -1
- package/dist/server/core/conversations/conversation.store.d.ts +3 -0
- package/dist/server/core/conversations/conversation.store.d.ts.map +1 -1
- package/dist/server/core/conversations/conversation.store.js +2 -1
- package/dist/server/core/conversations/conversation.store.js.map +1 -1
- package/dist/server/core/conversations/page-context.d.ts +8 -2
- package/dist/server/core/conversations/page-context.d.ts.map +1 -1
- package/dist/server/core/conversations/page-context.js +61 -2
- package/dist/server/core/conversations/page-context.js.map +1 -1
- package/dist/server/core/conversations/ports.d.ts +18 -20
- package/dist/server/core/conversations/ports.d.ts.map +1 -1
- package/dist/server/core/reports/model-usage.d.ts.map +1 -1
- package/dist/server/core/reports/model-usage.js +42 -44
- package/dist/server/core/reports/model-usage.js.map +1 -1
- package/dist/server/core/reports/prices.d.ts.map +1 -1
- package/dist/server/core/reports/prices.js +29 -5
- package/dist/server/core/reports/prices.js.map +1 -1
- package/dist/server/core/reports/report.service.d.ts +4 -2
- package/dist/server/core/reports/report.service.d.ts.map +1 -1
- package/dist/server/core/reports/report.service.js +148 -66
- package/dist/server/core/reports/report.service.js.map +1 -1
- package/dist/server/core/runs/access.d.ts +5 -0
- package/dist/server/core/runs/access.d.ts.map +1 -0
- package/dist/server/core/runs/access.js +10 -0
- package/dist/server/core/runs/access.js.map +1 -0
- package/dist/server/core/runs/availability.d.ts +18 -6
- package/dist/server/core/runs/availability.d.ts.map +1 -1
- package/dist/server/core/runs/availability.js +40 -34
- package/dist/server/core/runs/availability.js.map +1 -1
- package/dist/server/core/runs/claim.d.ts +30 -106
- package/dist/server/core/runs/claim.d.ts.map +1 -1
- package/dist/server/core/runs/claim.js +630 -323
- package/dist/server/core/runs/claim.js.map +1 -1
- package/dist/server/core/runs/comment-consent.d.ts +24 -0
- package/dist/server/core/runs/comment-consent.d.ts.map +1 -0
- package/dist/server/core/runs/comment-consent.js +116 -0
- package/dist/server/core/runs/comment-consent.js.map +1 -0
- package/dist/server/core/runs/eligibility.d.ts +13 -1
- package/dist/server/core/runs/eligibility.d.ts.map +1 -1
- package/dist/server/core/runs/eligibility.js +41 -10
- package/dist/server/core/runs/eligibility.js.map +1 -1
- package/dist/server/core/runs/execution-view.d.ts +8 -0
- package/dist/server/core/runs/execution-view.d.ts.map +1 -1
- package/dist/server/core/runs/execution-view.js +9 -0
- package/dist/server/core/runs/execution-view.js.map +1 -1
- package/dist/server/core/runs/execution.d.ts +1 -1
- package/dist/server/core/runs/execution.d.ts.map +1 -1
- package/dist/server/core/runs/execution.js +8 -2
- package/dist/server/core/runs/execution.js.map +1 -1
- package/dist/server/core/runs/identity.d.ts +9 -0
- package/dist/server/core/runs/identity.d.ts.map +1 -0
- package/dist/server/core/runs/identity.js +75 -0
- package/dist/server/core/runs/identity.js.map +1 -0
- package/dist/server/core/runs/index.d.ts +6 -6
- package/dist/server/core/runs/index.d.ts.map +1 -1
- package/dist/server/core/runs/index.js +6 -6
- package/dist/server/core/runs/index.js.map +1 -1
- package/dist/server/core/runs/input-gate.d.ts +1 -1
- package/dist/server/core/runs/input-gate.d.ts.map +1 -1
- package/dist/server/core/runs/input-gate.js +4 -2
- package/dist/server/core/runs/input-gate.js.map +1 -1
- package/dist/server/core/runs/lifecycle.d.ts +16 -18
- package/dist/server/core/runs/lifecycle.d.ts.map +1 -1
- package/dist/server/core/runs/lifecycle.js +146 -60
- package/dist/server/core/runs/lifecycle.js.map +1 -1
- package/dist/server/core/runs/policy.d.ts +9 -2
- package/dist/server/core/runs/policy.d.ts.map +1 -1
- package/dist/server/core/runs/policy.js +17 -8
- package/dist/server/core/runs/policy.js.map +1 -1
- package/dist/server/core/runs/ports.d.ts +41 -31
- package/dist/server/core/runs/ports.d.ts.map +1 -1
- package/dist/server/core/runs/ports.js +2 -13
- package/dist/server/core/runs/ports.js.map +1 -1
- package/dist/server/core/runs/preview.d.ts.map +1 -1
- package/dist/server/core/runs/preview.js +1 -3
- package/dist/server/core/runs/preview.js.map +1 -1
- package/dist/server/core/runs/run-data-purge.d.ts +15 -0
- package/dist/server/core/runs/run-data-purge.d.ts.map +1 -0
- package/dist/server/core/runs/run-data-purge.js +82 -0
- package/dist/server/core/runs/run-data-purge.js.map +1 -0
- package/dist/server/core/runs/run-requests.d.ts +25 -0
- package/dist/server/core/runs/run-requests.d.ts.map +1 -1
- package/dist/server/core/runs/run-requests.js +131 -64
- package/dist/server/core/runs/run-requests.js.map +1 -1
- package/dist/server/core/runs/run.service.d.ts +39 -3
- package/dist/server/core/runs/run.service.d.ts.map +1 -1
- package/dist/server/core/runs/run.service.js +729 -102
- package/dist/server/core/runs/run.service.js.map +1 -1
- package/dist/server/core/runs/run.store.d.ts +11 -0
- package/dist/server/core/runs/run.store.d.ts.map +1 -1
- package/dist/server/core/runs/run.store.js +39 -11
- package/dist/server/core/runs/run.store.js.map +1 -1
- package/dist/server/core/runs/runner-view.d.ts +12 -2
- package/dist/server/core/runs/runner-view.d.ts.map +1 -1
- package/dist/server/core/runs/runner-view.js +55 -13
- package/dist/server/core/runs/runner-view.js.map +1 -1
- package/dist/server/core/runs/selection.d.ts +13 -0
- package/dist/server/core/runs/selection.d.ts.map +1 -0
- package/dist/server/core/runs/selection.js +21 -0
- package/dist/server/core/runs/selection.js.map +1 -0
- package/dist/server/core/runs/sweeper.d.ts +1 -0
- package/dist/server/core/runs/sweeper.d.ts.map +1 -1
- package/dist/server/core/runs/sweeper.js +66 -17
- package/dist/server/core/runs/sweeper.js.map +1 -1
- package/dist/server/core/runs/transitions.d.ts +6 -2
- package/dist/server/core/runs/transitions.d.ts.map +1 -1
- package/dist/server/core/runs/transitions.js +73 -19
- package/dist/server/core/runs/transitions.js.map +1 -1
- package/dist/server/core/runs/workload.d.ts +17 -5
- package/dist/server/core/runs/workload.d.ts.map +1 -1
- package/dist/server/core/runs/workload.js +203 -68
- package/dist/server/core/runs/workload.js.map +1 -1
- package/dist/server/core/skills/skill.service.d.ts +6 -2
- package/dist/server/core/skills/skill.service.d.ts.map +1 -1
- package/dist/server/core/skills/skill.service.js +87 -66
- package/dist/server/core/skills/skill.service.js.map +1 -1
- package/dist/server/core/skills/skill.store.d.ts +14 -0
- package/dist/server/core/skills/skill.store.d.ts.map +1 -1
- package/dist/server/core/skills/skill.store.js +30 -0
- package/dist/server/core/skills/skill.store.js.map +1 -1
- package/dist/server/core/transaction-read.d.ts +4 -0
- package/dist/server/core/transaction-read.d.ts.map +1 -0
- package/dist/server/core/transaction-read.js +30 -0
- package/dist/server/core/transaction-read.js.map +1 -0
- package/dist/server/core/variables/index.d.ts +1 -1
- package/dist/server/core/variables/index.d.ts.map +1 -1
- package/dist/server/core/variables/index.js.map +1 -1
- package/dist/server/core/variables/variable.service.d.ts +18 -0
- package/dist/server/core/variables/variable.service.d.ts.map +1 -1
- package/dist/server/core/variables/variable.service.js +95 -20
- package/dist/server/core/variables/variable.service.js.map +1 -1
- package/dist/server/index.d.ts +4 -0
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +3 -0
- package/dist/server/index.js.map +1 -1
- package/dist/server/jobs/job.service.d.ts +1 -1
- package/dist/server/jobs/job.service.d.ts.map +1 -1
- package/dist/server/jobs/job.service.js +8 -2
- package/dist/server/jobs/job.service.js.map +1 -1
- package/dist/server/kernel/events.d.ts +12 -3
- package/dist/server/kernel/events.d.ts.map +1 -1
- package/dist/server/kernel/events.js.map +1 -1
- package/dist/server/kernel/scopes.d.ts +6 -0
- package/dist/server/kernel/scopes.d.ts.map +1 -1
- package/dist/server/kernel/scopes.js +3 -1
- package/dist/server/kernel/scopes.js.map +1 -1
- package/dist/server/online/agent/configuration.d.ts +26 -0
- package/dist/server/online/agent/configuration.d.ts.map +1 -0
- package/dist/server/online/agent/configuration.js +261 -0
- package/dist/server/online/agent/configuration.js.map +1 -0
- package/dist/server/online/agent/contracts.d.ts +87 -0
- package/dist/server/online/agent/contracts.d.ts.map +1 -0
- package/dist/server/online/agent/contracts.js +2 -0
- package/dist/server/online/agent/contracts.js.map +1 -0
- package/dist/server/online/agent/errors.d.ts +11 -0
- package/dist/server/online/agent/errors.d.ts.map +1 -0
- package/dist/server/online/agent/errors.js +21 -0
- package/dist/server/online/agent/errors.js.map +1 -0
- package/dist/server/online/agent/index.d.ts +11 -0
- package/dist/server/online/agent/index.d.ts.map +1 -0
- package/dist/server/online/agent/index.js +9 -0
- package/dist/server/online/agent/index.js.map +1 -0
- package/dist/server/online/agent/messages/json.d.ts +5 -0
- package/dist/server/online/agent/messages/json.d.ts.map +1 -0
- package/dist/server/online/agent/messages/json.js +88 -0
- package/dist/server/online/agent/messages/json.js.map +1 -0
- package/dist/server/online/agent/messages/projection.d.ts +20 -0
- package/dist/server/online/agent/messages/projection.d.ts.map +1 -0
- package/dist/server/online/agent/messages/projection.js +495 -0
- package/dist/server/online/agent/messages/projection.js.map +1 -0
- package/dist/server/online/agent/messages/validation.d.ts +7 -0
- package/dist/server/online/agent/messages/validation.d.ts.map +1 -0
- package/dist/server/online/agent/messages/validation.js +159 -0
- package/dist/server/online/agent/messages/validation.js.map +1 -0
- package/dist/server/online/agent/native/backend.d.ts +60 -0
- package/dist/server/online/agent/native/backend.d.ts.map +1 -0
- package/dist/server/online/agent/native/backend.js +411 -0
- package/dist/server/online/agent/native/backend.js.map +1 -0
- package/dist/server/online/agent/native/execution.d.ts +41 -0
- package/dist/server/online/agent/native/execution.d.ts.map +1 -0
- package/dist/server/online/agent/native/execution.js +430 -0
- package/dist/server/online/agent/native/execution.js.map +1 -0
- package/dist/server/online/agent/native/session.d.ts +40 -0
- package/dist/server/online/agent/native/session.d.ts.map +1 -0
- package/dist/server/online/agent/native/session.js +104 -0
- package/dist/server/online/agent/native/session.js.map +1 -0
- package/dist/server/online/agent/native/types.d.ts +32 -0
- package/dist/server/online/agent/native/types.d.ts.map +1 -0
- package/dist/server/online/agent/native/types.js +2 -0
- package/dist/server/online/agent/native/types.js.map +1 -0
- package/dist/server/online/agent/persistence/manager.d.ts +16 -0
- package/dist/server/online/agent/persistence/manager.d.ts.map +1 -0
- package/dist/server/online/agent/persistence/manager.js +209 -0
- package/dist/server/online/agent/persistence/manager.js.map +1 -0
- package/dist/server/online/agent/persistence/state.d.ts +11 -0
- package/dist/server/online/agent/persistence/state.d.ts.map +1 -0
- package/dist/server/online/agent/persistence/state.js +45 -0
- package/dist/server/online/agent/persistence/state.js.map +1 -0
- package/dist/server/online/agent/persistence/store.d.ts +58 -0
- package/dist/server/online/agent/persistence/store.d.ts.map +1 -0
- package/dist/server/online/agent/persistence/store.js +634 -0
- package/dist/server/online/agent/persistence/store.js.map +1 -0
- package/dist/server/online/agent/persistence/types.d.ts +44 -0
- package/dist/server/online/agent/persistence/types.d.ts.map +1 -0
- package/dist/server/online/agent/persistence/types.js +2 -0
- package/dist/server/online/agent/persistence/types.js.map +1 -0
- package/dist/server/online/agent/runner/backend.d.ts +57 -0
- package/dist/server/online/agent/runner/backend.d.ts.map +1 -0
- package/dist/server/online/agent/runner/backend.js +501 -0
- package/dist/server/online/agent/runner/backend.js.map +1 -0
- package/dist/server/online/agent/runner/projection.d.ts +10 -0
- package/dist/server/online/agent/runner/projection.d.ts.map +1 -0
- package/dist/server/online/agent/runner/projection.js +171 -0
- package/dist/server/online/agent/runner/projection.js.map +1 -0
- package/dist/server/online/agent/runner/types.d.ts +44 -0
- package/dist/server/online/agent/runner/types.d.ts.map +1 -0
- package/dist/server/online/agent/runner/types.js +2 -0
- package/dist/server/online/agent/runner/types.js.map +1 -0
- package/dist/server/online/agent/service.d.ts +47 -0
- package/dist/server/online/agent/service.d.ts.map +1 -0
- package/dist/server/online/agent/service.js +111 -0
- package/dist/server/online/agent/service.js.map +1 -0
- package/dist/server/online/agent/transport/streams.d.ts +54 -0
- package/dist/server/online/agent/transport/streams.d.ts.map +1 -0
- package/dist/server/online/agent/transport/streams.js +440 -0
- package/dist/server/online/agent/transport/streams.js.map +1 -0
- package/dist/server/online/agent/types.d.ts +155 -0
- package/dist/server/online/agent/types.d.ts.map +1 -0
- package/dist/server/online/agent/types.js +2 -0
- package/dist/server/online/agent/types.js.map +1 -0
- package/dist/server/online/index.d.ts +0 -5
- package/dist/server/online/index.d.ts.map +1 -1
- package/dist/server/online/index.js +0 -5
- package/dist/server/online/index.js.map +1 -1
- package/dist/server/online/providers.d.ts.map +1 -1
- package/dist/server/online/providers.js +26 -2
- package/dist/server/online/providers.js.map +1 -1
- package/dist/server/online/routes.d.ts.map +1 -1
- package/dist/server/online/routes.js +6 -35
- package/dist/server/online/routes.js.map +1 -1
- package/dist/server/online/services.d.ts.map +1 -1
- package/dist/server/online/services.js +101 -24
- package/dist/server/online/services.js.map +1 -1
- package/dist/server/providers/agents.d.ts +18 -25
- package/dist/server/providers/agents.d.ts.map +1 -1
- package/dist/server/providers/agents.js +79 -100
- package/dist/server/providers/agents.js.map +1 -1
- package/dist/server/providers/runners.d.ts +3 -1
- package/dist/server/providers/runners.d.ts.map +1 -1
- package/dist/server/providers/runners.js +38 -9
- package/dist/server/providers/runners.js.map +1 -1
- package/dist/server/routes/admin.d.ts +4 -0
- package/dist/server/routes/admin.d.ts.map +1 -1
- package/dist/server/routes/admin.js +139 -212
- package/dist/server/routes/admin.js.map +1 -1
- package/dist/server/routes/chat.d.ts.map +1 -1
- package/dist/server/routes/chat.js +313 -164
- package/dist/server/routes/chat.js.map +1 -1
- package/dist/server/routes/index.d.ts.map +1 -1
- package/dist/server/routes/index.js +8 -0
- package/dist/server/routes/index.js.map +1 -1
- package/dist/server/routes/roster.d.ts.map +1 -1
- package/dist/server/routes/roster.js +6 -22
- package/dist/server/routes/roster.js.map +1 -1
- package/dist/server/routes/run-requests.js +3 -3
- package/dist/server/routes/run-requests.js.map +1 -1
- package/dist/server/routes/runners/admin.d.ts.map +1 -1
- package/dist/server/routes/runners/admin.js +219 -25
- package/dist/server/routes/runners/admin.js.map +1 -1
- package/dist/server/routes/runners/install.d.ts.map +1 -1
- package/dist/server/routes/runners/install.js +7 -2
- package/dist/server/routes/runners/install.js.map +1 -1
- package/dist/server/routes/runners/runner.d.ts.map +1 -1
- package/dist/server/routes/runners/runner.js +2 -0
- package/dist/server/routes/runners/runner.js.map +1 -1
- package/dist/server/routes/schemas.d.ts +18 -10
- package/dist/server/routes/schemas.d.ts.map +1 -1
- package/dist/server/routes/schemas.js +498 -153
- package/dist/server/routes/schemas.js.map +1 -1
- package/dist/server/runners/runner.service.d.ts +47 -4
- package/dist/server/runners/runner.service.d.ts.map +1 -1
- package/dist/server/runners/runner.service.js +423 -79
- package/dist/server/runners/runner.service.js.map +1 -1
- package/dist/server/runners/runner.store.d.ts +8 -3
- package/dist/server/runners/runner.store.d.ts.map +1 -1
- package/dist/server/runners/runner.store.js +63 -6
- package/dist/server/runners/runner.store.js.map +1 -1
- package/dist/server/runners/slots.d.ts +5 -2
- package/dist/server/runners/slots.d.ts.map +1 -1
- package/dist/server/runners/slots.js +3 -4
- package/dist/server/runners/slots.js.map +1 -1
- package/dist/server/runners/workspaces.d.ts.map +1 -1
- package/dist/server/runners/workspaces.js +18 -2
- package/dist/server/runners/workspaces.js.map +1 -1
- package/dist/server/testing.d.ts +0 -2
- package/dist/server/testing.d.ts.map +1 -1
- package/dist/server/testing.js +1 -4
- package/dist/server/testing.js.map +1 -1
- package/dist/server/tokens.d.ts +8 -7
- package/dist/server/tokens.d.ts.map +1 -1
- package/dist/server/tokens.js +4 -2
- package/dist/server/tokens.js.map +1 -1
- package/dist/shared/access.d.ts +2 -6
- package/dist/shared/access.d.ts.map +1 -1
- package/dist/shared/access.js +2 -6
- package/dist/shared/access.js.map +1 -1
- package/dist/shared/agents.d.ts +131 -169
- package/dist/shared/agents.d.ts.map +1 -1
- package/dist/shared/agents.js +36 -102
- package/dist/shared/agents.js.map +1 -1
- package/dist/shared/conversations.d.ts +93 -170
- package/dist/shared/conversations.d.ts.map +1 -1
- package/dist/shared/conversations.js +8 -30
- package/dist/shared/conversations.js.map +1 -1
- package/dist/shared/model-catalog.d.ts +53 -0
- package/dist/shared/model-catalog.d.ts.map +1 -0
- package/dist/shared/model-catalog.js +182 -0
- package/dist/shared/model-catalog.js.map +1 -0
- package/dist/shared/online-agent.d.ts +3 -0
- package/dist/shared/online-agent.d.ts.map +1 -0
- package/dist/shared/online-agent.js +3 -0
- package/dist/shared/online-agent.js.map +1 -0
- package/dist/shared/page-ui-context.d.ts +26 -0
- package/dist/shared/page-ui-context.d.ts.map +1 -0
- package/dist/shared/page-ui-context.js +129 -0
- package/dist/shared/page-ui-context.js.map +1 -0
- package/dist/shared/quota.d.ts +15 -0
- package/dist/shared/quota.d.ts.map +1 -0
- package/dist/shared/quota.js +2 -0
- package/dist/shared/quota.js.map +1 -0
- package/dist/shared/runners.d.ts +132 -14
- package/dist/shared/runners.d.ts.map +1 -1
- package/dist/shared/runners.js +171 -11
- package/dist/shared/runners.js.map +1 -1
- package/dist/shared/runs.d.ts +59 -1
- package/dist/shared/runs.d.ts.map +1 -1
- package/dist/shared/runs.js +28 -0
- package/dist/shared/runs.js.map +1 -1
- package/dist/shared/skills.d.ts +11 -5
- package/dist/shared/skills.d.ts.map +1 -1
- package/dist/shared/skills.js +7 -2
- package/dist/shared/skills.js.map +1 -1
- package/dist/shared/ui-message.d.ts +80 -0
- package/dist/shared/ui-message.d.ts.map +1 -0
- package/dist/shared/ui-message.js +153 -0
- package/dist/shared/ui-message.js.map +1 -0
- package/dist/shared/variables.js +1 -1
- package/dist/shared/variables.js.map +1 -1
- package/docs/ai-forms.md +346 -0
- package/docs/execution-history.md +19 -0
- package/docs/mysql-installation-upgrade.md +7 -0
- package/docs/runner-agents.md +27 -0
- package/docs/ui-message-clients.md +80 -0
- package/docs/ui-messages.md +209 -0
- package/docs/workspace-cleanup.md +13 -0
- package/package.json +39 -25
- package/skills/nocobase-app-plugin-agents/SKILL.md +16 -13
- package/skills/nocobase-app-plugin-agents/references/agents.md +30 -0
- package/skills/nocobase-app-plugin-agents/references/extension-points.md +21 -21
- package/skills/nocobase-app-plugin-agents/references/model-services.md +17 -0
- package/skills/nocobase-app-plugin-agents/references/online-agent.md +216 -0
- package/skills/nocobase-app-plugin-agents/references/runners.md +12 -0
- package/skills/nocobase-app-plugin-agents/references/setup-and-config.md +6 -7
- package/skills/nocobase-app-plugin-agents/references/variables-skills-usage.md +6 -4
- package/skills/nocobase-app-plugin-agents/references/verification-and-troubleshooting.md +29 -32
- package/dist/client/chat/settings-section.d.ts +0 -5
- package/dist/client/chat/settings-section.d.ts.map +0 -1
- package/dist/client/chat/settings-section.js +0 -86
- package/dist/client/chat/settings-section.js.map +0 -1
- package/dist/client/components/agent-fields.d.ts +0 -45
- package/dist/client/components/agent-fields.d.ts.map +0 -1
- package/dist/client/components/agent-fields.js +0 -83
- package/dist/client/components/agent-fields.js.map +0 -1
- package/dist/client/components/agent-type.d.ts +0 -32
- package/dist/client/components/agent-type.d.ts.map +0 -1
- package/dist/client/components/agent-type.js +0 -80
- package/dist/client/components/agent-type.js.map +0 -1
- package/dist/client/components/model-entries.d.ts +0 -44
- package/dist/client/components/model-entries.d.ts.map +0 -1
- package/dist/client/components/model-entries.js +0 -104
- package/dist/client/components/model-entries.js.map +0 -1
- package/dist/client/hooks/use-agent-save.d.ts +0 -9
- package/dist/client/hooks/use-agent-save.d.ts.map +0 -1
- package/dist/client/hooks/use-agent-save.js +0 -40
- package/dist/client/hooks/use-agent-save.js.map +0 -1
- package/dist/client/hooks/use-model-catalog.d.ts +0 -9
- package/dist/client/hooks/use-model-catalog.d.ts.map +0 -1
- package/dist/client/hooks/use-model-catalog.js +0 -27
- package/dist/client/hooks/use-model-catalog.js.map +0 -1
- package/dist/client/lib/model-suggestions.d.ts +0 -28
- package/dist/client/lib/model-suggestions.d.ts.map +0 -1
- package/dist/client/lib/model-suggestions.js +0 -44
- package/dist/client/lib/model-suggestions.js.map +0 -1
- package/dist/client/lib/tool-policy.d.ts +0 -3
- package/dist/client/lib/tool-policy.d.ts.map +0 -1
- package/dist/client/lib/tool-policy.js +0 -5
- package/dist/client/lib/tool-policy.js.map +0 -1
- package/dist/client/online/default-model.d.ts +0 -5
- package/dist/client/online/default-model.d.ts.map +0 -1
- package/dist/client/online/default-model.js +0 -65
- package/dist/client/online/default-model.js.map +0 -1
- package/dist/client/pages/agents/agent-model.d.ts +0 -69
- package/dist/client/pages/agents/agent-model.d.ts.map +0 -1
- package/dist/client/pages/agents/agent-model.js +0 -153
- package/dist/client/pages/agents/agent-model.js.map +0 -1
- package/dist/client/pages/agents/detail/brief-preview.d.ts +0 -7
- package/dist/client/pages/agents/detail/brief-preview.d.ts.map +0 -1
- package/dist/client/pages/agents/detail/brief-preview.js +0 -43
- package/dist/client/pages/agents/detail/brief-preview.js.map +0 -1
- package/dist/client/pages/agents/detail/history.d.ts +0 -11
- package/dist/client/pages/agents/detail/history.d.ts.map +0 -1
- package/dist/client/pages/agents/detail/history.js +0 -149
- package/dist/client/pages/agents/detail/history.js.map +0 -1
- package/dist/client/pages/agents/detail/index.d.ts +0 -3
- package/dist/client/pages/agents/detail/index.d.ts.map +0 -1
- package/dist/client/pages/agents/detail/index.js +0 -241
- package/dist/client/pages/agents/detail/index.js.map +0 -1
- package/dist/client/pages/agents/detail/sections.d.ts +0 -21
- package/dist/client/pages/agents/detail/sections.d.ts.map +0 -1
- package/dist/client/pages/agents/detail/sections.js +0 -280
- package/dist/client/pages/agents/detail/sections.js.map +0 -1
- package/dist/client/pages/agents/detail/tab-draft.d.ts +0 -43
- package/dist/client/pages/agents/detail/tab-draft.d.ts.map +0 -1
- package/dist/client/pages/agents/detail/tab-draft.js +0 -115
- package/dist/client/pages/agents/detail/tab-draft.js.map +0 -1
- package/dist/client/pages/agents/detail/unsaved-bar.d.ts +0 -13
- package/dist/client/pages/agents/detail/unsaved-bar.d.ts.map +0 -1
- package/dist/client/pages/agents/detail/unsaved-bar.js +0 -21
- package/dist/client/pages/agents/detail/unsaved-bar.js.map +0 -1
- package/dist/client/pages/agents/new.d.ts +0 -3
- package/dist/client/pages/agents/new.d.ts.map +0 -1
- package/dist/client/pages/agents/new.js +0 -149
- package/dist/client/pages/agents/new.js.map +0 -1
- package/dist/client/pages/agents/preset-picker.d.ts +0 -8
- package/dist/client/pages/agents/preset-picker.d.ts.map +0 -1
- package/dist/client/pages/agents/preset-picker.js +0 -41
- package/dist/client/pages/agents/preset-picker.js.map +0 -1
- package/dist/server/core/consultations/consultation.service.d.ts +0 -59
- package/dist/server/core/consultations/consultation.service.d.ts.map +0 -1
- package/dist/server/core/consultations/consultation.service.js +0 -198
- package/dist/server/core/consultations/consultation.service.js.map +0 -1
- package/dist/server/core/consultations/index.d.ts +0 -3
- package/dist/server/core/consultations/index.d.ts.map +0 -1
- package/dist/server/core/consultations/index.js +0 -3
- package/dist/server/core/consultations/index.js.map +0 -1
- package/dist/server/core/consultations/prompt.d.ts +0 -41
- package/dist/server/core/consultations/prompt.d.ts.map +0 -1
- package/dist/server/core/consultations/prompt.js +0 -64
- package/dist/server/core/consultations/prompt.js.map +0 -1
- package/dist/server/core/presets/index.d.ts +0 -19
- package/dist/server/core/presets/index.d.ts.map +0 -1
- package/dist/server/core/presets/index.js +0 -28
- package/dist/server/core/presets/index.js.map +0 -1
- package/dist/server/online/cli-command.d.ts +0 -20
- package/dist/server/online/cli-command.d.ts.map +0 -1
- package/dist/server/online/cli-command.js +0 -345
- package/dist/server/online/cli-command.js.map +0 -1
- package/dist/server/online/consult-tool.d.ts +0 -54
- package/dist/server/online/consult-tool.d.ts.map +0 -1
- package/dist/server/online/consult-tool.js +0 -177
- package/dist/server/online/consult-tool.js.map +0 -1
- package/dist/server/online/executor.d.ts +0 -83
- package/dist/server/online/executor.d.ts.map +0 -1
- package/dist/server/online/executor.js +0 -714
- package/dist/server/online/executor.js.map +0 -1
- package/dist/server/online/sandbox.d.ts +0 -32
- package/dist/server/online/sandbox.d.ts.map +0 -1
- package/dist/server/online/sandbox.js +0 -246
- package/dist/server/online/sandbox.js.map +0 -1
- package/dist/server/online/scripted.d.ts +0 -12
- package/dist/server/online/scripted.d.ts.map +0 -1
- package/dist/server/online/scripted.js +0 -176
- package/dist/server/online/scripted.js.map +0 -1
- package/dist/server/online/tools.d.ts +0 -17
- package/dist/server/online/tools.d.ts.map +0 -1
- package/dist/server/online/tools.js +0 -31
- package/dist/server/online/tools.js.map +0 -1
- package/dist/server/vendor/THIRD_PARTY_LICENSES.txt +0 -782
- package/dist/server/vendor/just-bash.d.ts +0 -83
- package/dist/server/vendor/just-bash.js +0 -2102
- package/dist/shared/presets.d.ts +0 -30
- package/dist/shared/presets.d.ts.map +0 -1
- package/dist/shared/presets.js +0 -2
- package/dist/shared/presets.js.map +0 -1
- package/skills/nocobase-app-plugin-agents/references/online-agents.md +0 -31
package/dist/shared/agents.js
CHANGED
|
@@ -1,130 +1,64 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Agents as the browser and the server's admin API exchange them.
|
|
3
|
-
*
|
|
4
|
-
* An agent is who works and how: its name and instructions, its type, the business actions it may perform. Its type is
|
|
5
|
-
* chosen when it is created and never changes:
|
|
6
|
-
*
|
|
7
|
-
* - `runner`: it drives a coding tool on a runner, with its skills, its tool policy and its own
|
|
8
|
-
* variables. Where it runs is not configured beyond an optional list of runners: a run goes to any online runner that
|
|
9
|
-
* has one of its tools installed and signed in, may run the waking person's work, and has a free slot.
|
|
10
|
-
* - `online`: it talks to a model of a model service directly, on the server: no runner, no working directory, no
|
|
11
|
-
* variables. Its tools are the application's commands it may run, and whatever else the application offers
|
|
12
|
-
* (knowledge search). It answers in seconds and runs only on subjects that need no working directory, such as
|
|
13
|
-
* conversations.
|
|
14
|
-
*
|
|
15
|
-
* Which tool or model it works with, and with what reasoning effort, is an ordered list (`modelEntries`), the first
|
|
16
|
-
* being its default. A runner takes a runner agent's run with the first entry whose tool it has enabled and signed in;
|
|
17
|
-
* nobody chooses. An online agent's runs use the first entry, except in a conversation, whose owner may pick another of
|
|
18
|
-
* its entries. The run records the entry it used (`Run.tool`, `Run.modelService`, `Run.model`, `Run.effort`).
|
|
19
|
-
*
|
|
20
|
-
* An online agent with no entry is not configured yet (such as an application's built-in assistant before a model service exists): it is
|
|
21
|
-
* kept, shown as needing a model, and offered no work until an entry is added. A runner agent always has one.
|
|
22
|
-
*/
|
|
23
1
|
import { TOOL_EFFORTS, } from '@nocobase/agent-protocol';
|
|
24
|
-
/**
|
|
25
|
-
export const
|
|
26
|
-
/** What kind of agent it is; chosen at creation and never changed (`runner`: a coding tool on a runner, `online`: a model on the server). */
|
|
27
|
-
export const AGENT_TYPES = ['online', 'runner'];
|
|
2
|
+
/** Where an agent comes from: discovered from what runners report, or kept by the application. */
|
|
3
|
+
export const AGENT_SOURCES = ['runner', 'system'];
|
|
28
4
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* rules, and anything larger goes through a plan). There is no "never": what the rules call larger (waking an agent,
|
|
32
|
-
* finishing an issue, changing an owner, …) always needs the person's confirmation.
|
|
5
|
+
* Whether an agent is offered work: `pending` (discovered, nobody enabled it yet), `enabled`, `disabled`. Only enabled
|
|
6
|
+
* agents are offered work, mentioned or chatted with.
|
|
33
7
|
*/
|
|
8
|
+
export const AGENT_STATUSES = ['pending', 'enabled', 'disabled'];
|
|
9
|
+
/** How long a tool and model may go unreported by every runner before its agent shows as having no runner. */
|
|
10
|
+
export const AGENT_UNREPORTED_AFTER_MS = 14 * 24 * 60 * 60_000;
|
|
11
|
+
/** When in a conversation an agent asks before changing data: every change, or only larger ones. */
|
|
34
12
|
export const CONFIRM_CHANGES = ['always', 'larger'];
|
|
35
|
-
/** The reasoning efforts an online agent's entry may name, weakest first, as the model gateway passes them to providers. */
|
|
36
|
-
export const ONLINE_EFFORTS = [
|
|
37
|
-
'minimal',
|
|
38
|
-
'low',
|
|
39
|
-
'medium',
|
|
40
|
-
'high',
|
|
41
|
-
'xhigh',
|
|
42
|
-
];
|
|
43
13
|
/** The most entries an agent's list holds. */
|
|
44
14
|
export const MAX_MODEL_ENTRIES = 20;
|
|
45
|
-
|
|
46
|
-
return 'tool' in entry;
|
|
47
|
-
}
|
|
48
|
-
export function isOnlineEntry(entry) {
|
|
49
|
-
return 'modelService' in entry;
|
|
50
|
-
}
|
|
51
|
-
/** The reasoning efforts `entry` may name: its tool's for a runner entry, `ONLINE_EFFORTS` for an online one. */
|
|
15
|
+
/** The reasoning efforts `entry`'s tool takes. */
|
|
52
16
|
export function effortsFor(entry) {
|
|
53
|
-
return
|
|
54
|
-
}
|
|
55
|
-
/** A runner agent's entries, in order; empty for an online agent. */
|
|
56
|
-
export function runnerEntries(agent) {
|
|
57
|
-
return agent.modelEntries.filter(isRunnerEntry);
|
|
58
|
-
}
|
|
59
|
-
/** An online agent's entries, in order; empty for a runner agent. */
|
|
60
|
-
export function onlineEntries(agent) {
|
|
61
|
-
return agent.modelEntries.filter(isOnlineEntry);
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* The entries an online agent answers with: its own, or, when it lists none, the system default chat model
|
|
65
|
-
* (`DefaultModels`) as its only one; empty for a runner agent or when there is no default either.
|
|
66
|
-
*/
|
|
67
|
-
export function onlineEntriesOrDefault(agent, defaultModel) {
|
|
68
|
-
if (agent.type !== 'online')
|
|
69
|
-
return [];
|
|
70
|
-
const own = onlineEntries(agent);
|
|
71
|
-
if (own.length > 0)
|
|
72
|
-
return own;
|
|
73
|
-
return defaultModel
|
|
74
|
-
? [{ modelService: defaultModel.modelService, model: defaultModel.model }]
|
|
75
|
-
: [];
|
|
17
|
+
return TOOL_EFFORTS[entry.tool];
|
|
76
18
|
}
|
|
77
|
-
/** The coding tools
|
|
19
|
+
/** The coding tools an agent's entries name, in order and once each. */
|
|
78
20
|
export function entryTools(agent) {
|
|
79
|
-
return [...new Set(
|
|
21
|
+
return [...new Set(agent.modelEntries.map((entry) => entry.tool))];
|
|
80
22
|
}
|
|
81
|
-
/** Whether two entries name the same tool
|
|
23
|
+
/** Whether two entries name the same tool and model, whatever their efforts. */
|
|
82
24
|
export function sameEntry(a, b) {
|
|
83
|
-
|
|
84
|
-
return (isRunnerEntry(b) &&
|
|
85
|
-
a.tool === b.tool &&
|
|
86
|
-
(a.model ?? null) === (b.model ?? null));
|
|
87
|
-
return (isOnlineEntry(b) && a.modelService === b.modelService && a.model === b.model);
|
|
25
|
+
return a.tool === b.tool && (a.model ?? null) === (b.model ?? null);
|
|
88
26
|
}
|
|
89
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Why an agent cannot take the caller's work now: `pending` and `disabled` (not enabled), `unreported` (no runner
|
|
29
|
+
* reported its tool and model for `AGENT_UNREPORTED_AFTER_MS`), `notConfigured` (an application's own agent with no
|
|
30
|
+
* tool and model yet), `noRunner` (no runner online that has it and would take the caller's work), `othersPersonal`
|
|
31
|
+
* (only other people's personal runners have it).
|
|
32
|
+
*/
|
|
33
|
+
export const AGENT_UNUSABLE_REASONS = [
|
|
34
|
+
'pending',
|
|
35
|
+
'disabled',
|
|
36
|
+
'unreported',
|
|
37
|
+
'notConfigured',
|
|
38
|
+
'noRunner',
|
|
39
|
+
'othersPersonal',
|
|
40
|
+
];
|
|
41
|
+
/** What a change to an agent was. */
|
|
90
42
|
export const AGENT_CHANGE_ACTIONS = [
|
|
91
43
|
'created',
|
|
92
44
|
'updated',
|
|
45
|
+
'enabled',
|
|
46
|
+
'disabled',
|
|
47
|
+
'variables',
|
|
48
|
+
// Recorded by earlier versions, which kept agents people configured.
|
|
93
49
|
'archived',
|
|
94
50
|
'restored',
|
|
95
|
-
'variables',
|
|
96
51
|
];
|
|
97
52
|
/** The fields of an agent whose changes its history records, in the order the history shows them. */
|
|
98
53
|
export const AGENT_HISTORY_FIELDS = [
|
|
99
54
|
'name',
|
|
100
55
|
'description',
|
|
101
|
-
'
|
|
102
|
-
'instructions',
|
|
103
|
-
'type',
|
|
56
|
+
'status',
|
|
104
57
|
'modelEntries',
|
|
105
|
-
'
|
|
58
|
+
'instructions',
|
|
106
59
|
'actions',
|
|
107
|
-
'confirmChanges',
|
|
108
|
-
'toolPolicy',
|
|
109
|
-
'runnerIds',
|
|
110
|
-
'maxConcurrentRuns',
|
|
111
|
-
'maxAttempts',
|
|
112
|
-
'access',
|
|
113
|
-
'userIds',
|
|
114
|
-
'ownerUserId',
|
|
115
|
-
];
|
|
116
|
-
/** Fields no longer recorded that older history entries still carry, so the history can still name them. */
|
|
117
|
-
export const RETIRED_AGENT_HISTORY_FIELDS = [
|
|
118
|
-
'tool',
|
|
119
|
-
'model',
|
|
120
|
-
'llmService',
|
|
121
|
-
'modelService',
|
|
122
|
-
'reasoningEffort',
|
|
123
60
|
];
|
|
124
|
-
/**
|
|
125
|
-
* The tool policy an agent starts from; an agent's `toolPolicy` overrides fields of it. The editor shows it so people
|
|
126
|
-
* see what they override.
|
|
127
|
-
*/
|
|
61
|
+
/** The tool policy every agent runs with; an agent's `toolPolicy` overrides fields of it. */
|
|
128
62
|
export const DEFAULT_TOOL_POLICY = {
|
|
129
63
|
permissionMode: 'acceptEdits',
|
|
130
64
|
allowedCommands: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.js","sourceRoot":"","sources":["../../shared/agents.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"agents.js","sourceRoot":"","sources":["../../shared/agents.ts"],"names":[],"mappings":"AAiBA,OAAO,EACL,YAAY,GAGb,MAAM,0BAA0B,CAAC;AAIlC,kGAAkG;AAClG,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAU,CAAC;AAI3D;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,UAAU,CAAU,CAAC;AAI1E,8GAA8G;AAC9G,MAAM,CAAC,MAAM,yBAAyB,GAAW,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,MAAM,CAAC;AAEvE,oGAAoG;AACpG,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAU,CAAC;AAc7D,8CAA8C;AAC9C,MAAM,CAAC,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAEpC,kDAAkD;AAClD,MAAM,UAAU,UAAU,CAAC,KAE1B;IACC,OAAO,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAClC,CAAC;AAED,wEAAwE;AACxE,MAAM,UAAU,UAAU,CAAC,KAE1B;IACC,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACrE,CAAC;AAED,gFAAgF;AAChF,MAAM,UAAU,SAAS,CAAC,CAAmB,EAAE,CAAmB;IAChE,OAAO,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC;AACtE,CAAC;AA4CD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,SAAS;IACT,UAAU;IACV,YAAY;IACZ,eAAe;IACf,UAAU;IACV,gBAAgB;CACR,CAAC;AA4FX,qCAAqC;AACrC,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,SAAS;IACT,SAAS;IACT,SAAS;IACT,UAAU;IACV,WAAW;IACX,qEAAqE;IACrE,UAAU;IACV,UAAU;CACF,CAAC;AAIX,qGAAqG;AACrG,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,MAAM;IACN,aAAa;IACb,QAAQ;IACR,cAAc;IACd,cAAc;IACd,SAAS;CACD,CAAC;AA8DX,6FAA6F;AAC7F,MAAM,CAAC,MAAM,mBAAmB,GAAe;IAC7C,cAAc,EAAE,aAAa;IAC7B,eAAe,EAAE;QACf,8GAA8G;QAC9G,kGAAkG;KACnG;IACD,cAAc,EAAE;QACd,uCAAuC;QACvC,YAAY;QACZ,wCAAwC;QACxC,oCAAoC;QACpC,0BAA0B;KAC3B;IACD,aAAa,EAAE,EAAE,GAAG,MAAM;CAC3B,CAAC"}
|
|
@@ -1,72 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* it answers with now (`online`: a model on the server answers in seconds; `runner`: a coding agent on a runner). It
|
|
10
|
-
* changes only while a runner conversation uses the online fallback agent in its agent's place (see Availability); a
|
|
11
|
-
* person who needs the other kind of agent otherwise starts another conversation. Only the owner reads its content:
|
|
12
|
-
* the API answers 404 to everyone else, administrators included, and the runs a conversation starts are hidden from
|
|
13
|
-
* anyone the run does not involve. Administrators see usage only.
|
|
14
|
-
* - A **message** is what the owner sent (`user`), what the agent replied (`assistant`), or a notice the server wrote
|
|
15
|
-
* (`system`: the agent was switched, a run failed). Field names follow the platform AI employee's
|
|
16
|
-
* `aiConversations` / `aiMessages`, so the two stores can be merged later.
|
|
17
|
-
* - Each message the owner sends wakes the agent: a run with the subject `{ kind: 'conversation', id }`, woken by the
|
|
18
|
-
* owner (whose permissions bound it). A message sent while the agent is working joins that run as input; a message
|
|
19
|
-
* sent while it waits for a runner joins the waiting run. Every text the agent writes in a run becomes an assistant
|
|
20
|
-
* message, in order, as the runner reports it. An online agent's reply appears as it is written: a draft message
|
|
21
|
-
* (`metadata.streaming`) whose content grows until the reply is final, in place, at the same `seq`. The run's
|
|
22
|
-
* step-by-step transcript stays readable through the runs API
|
|
23
|
-
* (`/api/agents/admin/runs/:runId/events`), for the "thinking / reading X" lines.
|
|
24
|
-
* - **Sessions**: a run resumes the session the same runner kept for the conversation. On another runner it starts a
|
|
25
|
-
* fresh session and its prompt carries the last `CONVERSATION_HISTORY_IN_PROMPT` messages and the previous run's
|
|
26
|
-
* summary. Switching the conversation's agent (to the system default and back) starts a new session every time.
|
|
27
|
-
* - **Availability**: a message is always saved. When the agent is archived, the owner may no longer use it, or no
|
|
28
|
-
* online, signed-in runner may run it, the conversation reports `offline` with the reason; the owner may switch the
|
|
29
|
-
* conversation to the system default agent and later switch back. A runner conversation may also switch to the online
|
|
30
|
-
* fallback agent (`ChatSettings.onlineFallbackAgentId`), and a conversation started with a runner agent that no runner
|
|
31
|
-
* may run for its owner now (including claim's feature and team-only variable restrictions) starts on that
|
|
32
|
-
* agent in its place, as if switched. Existing runner conversations check again on each message and transfer
|
|
33
|
-
* unanswered queued messages when switching. Manual fallback skips an unavailable system default, and restoring
|
|
34
|
-
* requires the original agent to be available again. The owner is the one answerable for their conversation, so none of this waits
|
|
35
|
-
* for anyone's confirmation.
|
|
36
|
-
* - **Titles**: the first message's first `CONVERSATION_TITLE_AUTO_CHARS` characters (`auto`), until the agent sets one
|
|
37
|
-
* of at most `CONVERSATION_TITLE_AGENT_MAX` characters (`agent`), which it may do until the owner renames the
|
|
38
|
-
* conversation (`user`); after that the agent's attempts answer `CONVERSATION_CONFLICT` with `reason: 'titleLocked'`.
|
|
39
|
-
* - No delete: conversations are archived (and unarchived). Sending a message to an archived conversation unarchives
|
|
40
|
-
* it.
|
|
41
|
-
*
|
|
42
|
-
* ## Page context
|
|
43
|
-
*
|
|
44
|
-
* A message may carry what the person's page shows (`PageContext`): references by id, never content. The server checks
|
|
45
|
-
* the limits (`PAGE_CONTEXT_LIMITS`, 400 otherwise), resolves each reference to a title, silently drops the ones the
|
|
46
|
-
* owner may not see or that no plugin knows how to resolve, and stores the rest with the message (`workContext`). The
|
|
47
|
-
* agent receives it marked as data, not instructions: nothing in a page context is ever followed as an instruction.
|
|
48
|
-
*
|
|
49
|
-
* ## Attachments
|
|
50
|
-
*
|
|
51
|
-
* The owner may send files with a message: each is uploaded first (`POST chatAttachments`, one file of at most
|
|
52
|
-
* `CHAT_ATTACHMENT_SIZE_MAX` bytes, stored through the file plugin), attached to nothing and readable by its uploader
|
|
53
|
-
* only, then sent with the message (`SendMessageRequest.attachmentIds`, at most `CHAT_ATTACHMENTS_PER_MESSAGE_MAX`),
|
|
54
|
-
* which attaches it to the conversation. From then on only the conversation's owner, and a run of its agent on that
|
|
55
|
-
* conversation (by its run token), may read it. An upload never sent is purged after `CHAT_ATTACHMENT_ORPHAN_HOURS`.
|
|
56
|
-
* The agent reads the files' names, types and ids with the message; a runner agent downloads one into its working
|
|
57
|
-
* directory with the CLI (`conversation attachment download <file-id>`), and an online agent is shown the images among
|
|
58
|
-
* them (`CHAT_IMAGE_TO_MODEL_MAX` bytes each at most) and only the names of the rest. Agents do not send files back.
|
|
59
|
-
*
|
|
60
|
-
* ## Realtime
|
|
61
|
-
*
|
|
62
|
-
* `CONVERSATIONS_TOPIC` is a per-user topic: each change is announced only to the owner's own connections, and carries
|
|
63
|
-
* no content (`ConversationChanged`). A page that hears one fetches through the API. Pages also poll while a run is
|
|
64
|
-
* open, because announcements reach only the browsers connected to the instance that made the change.
|
|
2
|
+
* Public chat contract. New conversations use the shared OnlineAgent runtime and ordinary IDs.
|
|
3
|
+
* Creation sends no input; first and later inputs both use messages. clientId only correlates
|
|
4
|
+
* display echoes, never durable request deduplication. Timeouts have unknown outcomes and must
|
|
5
|
+
* not trigger hidden resends. Current-stream events support the first subscription only;
|
|
6
|
+
* disconnects leave server execution running and require explicit saved-history refresh.
|
|
7
|
+
* Legacy IDs/text/files remain readable; unknown Runner effects are never automatically replayed.
|
|
8
|
+
* Internal SDK envelopes, tool payloads and provider metadata never enter this public DTO.
|
|
65
9
|
*/
|
|
10
|
+
import type { QuotaLocation } from './quota.js';
|
|
66
11
|
import type { FailureReason, RunStatus } from '@nocobase/agent-protocol';
|
|
67
|
-
import type { OnlineModelEntry } from './agents.js';
|
|
68
12
|
import type { I18nText } from './i18n.js';
|
|
69
|
-
import type {
|
|
13
|
+
import type { PageUIContext } from './page-ui-context.js';
|
|
14
|
+
export type { PageUIContext, PageUIItem } from './page-ui-context.js';
|
|
70
15
|
/** The run subject kind of a conversation. */
|
|
71
16
|
export declare const CONVERSATION_SUBJECT = "conversation";
|
|
72
17
|
/** The automatic title: the first message's first characters, without Markdown punctuation. */
|
|
@@ -83,8 +28,6 @@ export declare const CHAT_ATTACHMENT_SIZE_MAX: number;
|
|
|
83
28
|
export declare const CHAT_ATTACHMENTS_PER_MESSAGE_MAX = 10;
|
|
84
29
|
/** How long an upload not sent with a message is kept. */
|
|
85
30
|
export declare const CHAT_ATTACHMENT_ORPHAN_HOURS = 24;
|
|
86
|
-
/** The largest image an online agent's model is shown; a larger one is listed by name only. */
|
|
87
|
-
export declare const CHAT_IMAGE_TO_MODEL_MAX: number;
|
|
88
31
|
/** The raster images shown inline, by extension: the declared type must be the one listed. */
|
|
89
32
|
export declare const INLINE_IMAGE_TYPES: Readonly<Record<string, string>>;
|
|
90
33
|
/** A safe raster image, whose declared type matches its extension; anything else is only downloaded. */
|
|
@@ -143,10 +86,12 @@ export interface PageContextRef {
|
|
|
143
86
|
readonly id: string;
|
|
144
87
|
}
|
|
145
88
|
/**
|
|
146
|
-
* What the person's page shows when they send a message
|
|
147
|
-
*
|
|
89
|
+
* What the person's page shows when they send a message: authorized business ids, visible filters and explicitly
|
|
90
|
+
* selected browser UI snapshots. All browser-supplied values are untrusted data, never instructions.
|
|
148
91
|
*/
|
|
149
92
|
export interface PageContext {
|
|
93
|
+
/** Explicitly selected, untrusted browser UI snapshots; never resolved as business resources. */
|
|
94
|
+
readonly ui?: PageUIContext;
|
|
150
95
|
/** The page's route (path and query), at most `PAGE_CONTEXT_LIMITS.route` characters. */
|
|
151
96
|
readonly route: string;
|
|
152
97
|
/** The objects the page shows or the person pinned, at most `PAGE_CONTEXT_LIMITS.items`. */
|
|
@@ -176,8 +121,10 @@ export interface ResolvedPageContextItem extends PageContextRef {
|
|
|
176
121
|
/** Where it opens in the application, when it has a page. */
|
|
177
122
|
readonly url: string | null;
|
|
178
123
|
}
|
|
179
|
-
/** A page context
|
|
124
|
+
/** A page context stored with the message. Follow-ups may reauthorize only its references, never replay its stale page parameters. */
|
|
180
125
|
export interface ResolvedPageContext {
|
|
126
|
+
/** Detached browser data; its presence grants no resource or tool access. */
|
|
127
|
+
readonly ui?: PageUIContext;
|
|
181
128
|
readonly route: string;
|
|
182
129
|
readonly items: readonly ResolvedPageContextItem[];
|
|
183
130
|
readonly filter?: PageContext['filter'];
|
|
@@ -199,17 +146,17 @@ export interface ConversationAgent {
|
|
|
199
146
|
readonly archived: boolean;
|
|
200
147
|
}
|
|
201
148
|
/** Why a conversation's agent cannot answer now. */
|
|
202
|
-
export declare const OFFLINE_REASONS: readonly ["agentMissing", "agentArchived", "forbidden", "noRunner", "
|
|
149
|
+
export declare const OFFLINE_REASONS: readonly ["noModel", "agentMissing", "agentArchived", "forbidden", "noRunner", "othersPersonal"];
|
|
203
150
|
export type OfflineReason = (typeof OFFLINE_REASONS)[number];
|
|
204
151
|
/** Whether the agent can answer now. */
|
|
205
152
|
export interface ChatAvailability {
|
|
206
153
|
readonly online: boolean;
|
|
207
154
|
/** Null when online. */
|
|
208
155
|
readonly reason: OfflineReason | null;
|
|
209
|
-
/** Runners that may run the agent for the owner now
|
|
156
|
+
/** Runners that may run the agent for the owner now. */
|
|
210
157
|
readonly onlineRunners: number;
|
|
211
158
|
}
|
|
212
|
-
/** A conversation's mode:
|
|
159
|
+
/** A conversation's mode: `runner`, or `online` for a conversation an earlier version answered with an online agent. */
|
|
213
160
|
export type ConversationMode = 'online' | 'runner';
|
|
214
161
|
/** The conversation's open run: queued, waiting for a runner, or working. */
|
|
215
162
|
export interface ConversationRun {
|
|
@@ -220,26 +167,27 @@ export interface ConversationRun {
|
|
|
220
167
|
}
|
|
221
168
|
/** A conversation in the history list. */
|
|
222
169
|
export interface ConversationSummary {
|
|
170
|
+
readonly execution?: {
|
|
171
|
+
readonly status: 'running' | 'idle';
|
|
172
|
+
readonly outcome?: 'completed' | 'cancelled' | 'failed';
|
|
173
|
+
readonly requiresEffectReview?: boolean;
|
|
174
|
+
readonly waitingApproval?: boolean;
|
|
175
|
+
readonly interrupted?: boolean;
|
|
176
|
+
readonly messageId?: string;
|
|
177
|
+
readonly revision?: number;
|
|
178
|
+
};
|
|
223
179
|
readonly id: string;
|
|
224
180
|
/** Null until the first message gives it one. */
|
|
225
181
|
readonly title: string | null;
|
|
226
182
|
readonly titleSource: TitleSource;
|
|
227
183
|
readonly category: ConversationCategory;
|
|
184
|
+
/** Visibility in the default chat list; direct owned reads remain available. */
|
|
185
|
+
readonly showInChatList: boolean;
|
|
228
186
|
readonly source: ConversationSource;
|
|
229
|
-
/** `online` or `runner`: the type of `agent`. */
|
|
230
187
|
readonly mode: ConversationMode;
|
|
231
188
|
readonly agent: ConversationAgent;
|
|
232
|
-
/**
|
|
233
|
-
* While the conversation uses the system default or the online fallback agent in place of its own (`fallback`, or a
|
|
234
|
-
* new conversation whose runner agent could not run): the agent it switches back to. Null otherwise.
|
|
235
|
-
*/
|
|
189
|
+
/** While the conversation uses the system default agent in place of its own (`fallback`): the agent it switches back to. */
|
|
236
190
|
readonly fallbackFrom: ConversationAgent | null;
|
|
237
|
-
/**
|
|
238
|
-
* An online conversation: the entry of its agent's list it answers with, the owner's choice
|
|
239
|
-
* (`ConversationPatch.model`) while the agent lists it, else the agent's first. Null for a runner conversation, or
|
|
240
|
-
* when the agent is gone.
|
|
241
|
-
*/
|
|
242
|
-
readonly model: OnlineModelEntry | null;
|
|
243
191
|
/** False when the agent wrote since the owner last marked it read. */
|
|
244
192
|
readonly read: boolean;
|
|
245
193
|
readonly lastMessageAt: string;
|
|
@@ -249,24 +197,10 @@ export interface ConversationSummary {
|
|
|
249
197
|
/** The open run, if any: the panel shows "working" and offers to stop. */
|
|
250
198
|
readonly run: ConversationRun | null;
|
|
251
199
|
}
|
|
252
|
-
/** An entry a conversation may answer with, named as the person reads it: its service's title and the model's label. */
|
|
253
|
-
export interface ChatModelChoice extends OnlineModelEntry {
|
|
254
|
-
/** Its service's title; its name when no enabled service has it any more. */
|
|
255
|
-
readonly serviceTitle: string;
|
|
256
|
-
/** The model's label in its service; its id when the service no longer offers it. */
|
|
257
|
-
readonly modelLabel: string;
|
|
258
|
-
}
|
|
259
|
-
/** The entries named from the catalog (`ChatModelChoice`); what the catalog no longer has keeps its ids. */
|
|
260
|
-
export declare function chatModelChoices(entries: readonly OnlineModelEntry[], catalog: Pick<ModelCatalog, 'services'>): ChatModelChoice[];
|
|
261
200
|
/** One conversation as the panel opens it. */
|
|
262
201
|
export interface ConversationDetail extends ConversationSummary {
|
|
263
202
|
readonly availability: ChatAvailability;
|
|
264
|
-
/**
|
|
265
|
-
readonly models: readonly ChatModelChoice[];
|
|
266
|
-
/**
|
|
267
|
-
* Another agent may take over (`POST …/fallback`): an available system default of the conversation's mode, else,
|
|
268
|
-
* for a runner conversation, the online fallback agent (`ChatSettings.onlineFallbackAgentId`).
|
|
269
|
-
*/
|
|
203
|
+
/** Another agent may take over (`POST …/fallback`): the system default agent, when it can answer. */
|
|
270
204
|
readonly canFallback: boolean;
|
|
271
205
|
/** The conversation uses another agent and its original agent can answer again (`POST …/restore`). */
|
|
272
206
|
readonly canRestore: boolean;
|
|
@@ -288,13 +222,13 @@ export type ConversationNotice =
|
|
|
288
222
|
readonly agentId: string;
|
|
289
223
|
readonly fromAgentId: string;
|
|
290
224
|
}
|
|
291
|
-
/**
|
|
225
|
+
/** Written by earlier versions: the conversation used the online fallback agent in place of its runner agent. */
|
|
292
226
|
| {
|
|
293
227
|
readonly code: 'switchedToOnline';
|
|
294
228
|
readonly agentId: string;
|
|
295
229
|
readonly fromAgentId: string;
|
|
296
230
|
}
|
|
297
|
-
/**
|
|
231
|
+
/** Written by earlier versions: the configured online fallback could not answer. */
|
|
298
232
|
| {
|
|
299
233
|
readonly code: 'onlineFallbackUnavailable';
|
|
300
234
|
readonly fromAgentId: string;
|
|
@@ -312,7 +246,7 @@ export type ConversationNotice =
|
|
|
312
246
|
readonly runId: string;
|
|
313
247
|
readonly reason: FailureReason | null;
|
|
314
248
|
}
|
|
315
|
-
/**
|
|
249
|
+
/** Cancellation was requested; this notice does not confirm the run has ended. */
|
|
316
250
|
| {
|
|
317
251
|
readonly code: 'runCancelled';
|
|
318
252
|
readonly runId: string;
|
|
@@ -332,11 +266,12 @@ export type ConversationNotice =
|
|
|
332
266
|
export declare const CONSULTATION_STATES: readonly ["running", "completed", "failed", "refused"];
|
|
333
267
|
export type ConsultationState = (typeof CONSULTATION_STATES)[number];
|
|
334
268
|
/**
|
|
335
|
-
*
|
|
336
|
-
*
|
|
337
|
-
* transcript and usage.
|
|
269
|
+
* Written by earlier versions: the online agent consulted another one (`ask_agent`) while answering, one card per call.
|
|
270
|
+
* The consulted agent's own run (`runId`) has its transcript and usage.
|
|
338
271
|
*/
|
|
339
272
|
export interface ConsultationNotice {
|
|
273
|
+
/** Display-only marker: the requested subject could not be resolved; agentName is a historical snapshot. */
|
|
274
|
+
readonly identitySnapshot?: boolean;
|
|
340
275
|
readonly code: 'consultation';
|
|
341
276
|
/** The tool call: one card per call. */
|
|
342
277
|
readonly callId: string;
|
|
@@ -370,16 +305,13 @@ export interface MessageMetadata {
|
|
|
370
305
|
readonly runEventSeq?: number;
|
|
371
306
|
/** A system message: what happened. */
|
|
372
307
|
readonly notice?: ConversationNotice;
|
|
373
|
-
/**
|
|
308
|
+
/** Written by earlier versions: an online fallback failure no longer applied. */
|
|
374
309
|
readonly onlineFallbackResolved?: boolean;
|
|
375
310
|
/** The id the browser gave a message it sent, echoed so it can replace its optimistic copy. */
|
|
376
311
|
readonly clientId?: string;
|
|
377
|
-
/**
|
|
378
|
-
* An assistant message an online agent is still writing: its content grows in place (same id and `seq`) until the reply
|
|
379
|
-
* is final, when the flag goes. Fetch messages again from before the first streaming one to see it grow.
|
|
380
|
-
*/
|
|
312
|
+
/** Written by earlier versions: an online agent's reply still being written. */
|
|
381
313
|
readonly streaming?: boolean;
|
|
382
|
-
/**
|
|
314
|
+
/** Written by earlier versions: a draft whose run ended before the reply was final. */
|
|
383
315
|
readonly interrupted?: boolean;
|
|
384
316
|
}
|
|
385
317
|
/** A file sent with a message (`SendMessageRequest.attachmentIds`), or an upload not sent yet. */
|
|
@@ -425,17 +357,13 @@ export interface ConversationMessage {
|
|
|
425
357
|
* | ------ | --------------- | ------------------------------------------------- | -------------------------- |
|
|
426
358
|
* | GET | `conversations` | `ConversationListQuery` (cursor paging) | `ConversationSummary[]` |
|
|
427
359
|
* | POST | `conversations` | `CreateConversationRequest` | `ConversationDetail` (201) |
|
|
428
|
-
* | POST | `start` | `StartConversationRequest` | `SendMessageResult` |
|
|
429
360
|
* | GET | `conversation` | | `ConversationDetail` |
|
|
430
361
|
* | PATCH | `conversation` | `ConversationPatch` (rename, archive / unarchive) | `ConversationDetail` |
|
|
431
362
|
* | GET | `messages` | `MessageListQuery` (cursor paging) | `ConversationMessage[]` |
|
|
432
363
|
* | POST | `messages` | `SendMessageRequest` | `SendMessageResult` (201) |
|
|
433
364
|
* | POST | `markRead` | | `ConversationDetail` |
|
|
434
365
|
* | POST | `stop` | | `ConversationDetail` |
|
|
435
|
-
* | POST | `fallback` | | `ConversationDetail` |
|
|
436
|
-
* | POST | `restore` | | `ConversationDetail` |
|
|
437
366
|
* | GET | `agents` | | `ChatAgent[]` |
|
|
438
|
-
* | POST | `copyAgent` | `CopyAgentRequest` | `Agent` |
|
|
439
367
|
* | GET | `preferences` | | `ChatPreferences` |
|
|
440
368
|
* | PATCH | `preferences` | `ChatPreferencesPatch` | `ChatPreferences` |
|
|
441
369
|
* | GET | `settings` | | `ChatSettings` |
|
|
@@ -451,13 +379,11 @@ export declare const CHAT_ROUTES: {
|
|
|
451
379
|
readonly conversations: "agents/conversations";
|
|
452
380
|
readonly conversation: "agents/conversations/:conversationId";
|
|
453
381
|
readonly messages: "agents/conversations/:conversationId/messages";
|
|
382
|
+
readonly events: "agents/conversations/:conversationId/events";
|
|
383
|
+
readonly config: "agents/conversations/:conversationId/config";
|
|
454
384
|
readonly markRead: "agents/conversations/:conversationId/markRead";
|
|
455
385
|
readonly stop: "agents/conversations/:conversationId/stop";
|
|
456
|
-
readonly fallback: "agents/conversations/:conversationId/fallback";
|
|
457
|
-
readonly restore: "agents/conversations/:conversationId/restore";
|
|
458
|
-
readonly start: "agents/conversations/start";
|
|
459
386
|
readonly agents: "agents/chatAgents";
|
|
460
|
-
readonly copyAgent: "agents/:agentId/copy";
|
|
461
387
|
readonly preferences: "agents/chatPreferences";
|
|
462
388
|
readonly settings: "agents/chatSettings";
|
|
463
389
|
readonly attachments: "agents/chatAttachments";
|
|
@@ -489,36 +415,49 @@ export interface ConversationPage {
|
|
|
489
415
|
readonly nextCursor: string | null;
|
|
490
416
|
}
|
|
491
417
|
/** `POST conversations`. Creating starts no run; the first message does. */
|
|
418
|
+
export type OnlineChatJson = null | boolean | number | string | OnlineChatJson[] | {
|
|
419
|
+
[key: string]: OnlineChatJson;
|
|
420
|
+
};
|
|
421
|
+
export interface OnlineChatConfigSnapshot {
|
|
422
|
+
readonly agentId?: string;
|
|
423
|
+
readonly selectedModel: {
|
|
424
|
+
modelService: string;
|
|
425
|
+
model: string;
|
|
426
|
+
} | null;
|
|
427
|
+
readonly scope: string[];
|
|
428
|
+
readonly model: string[];
|
|
429
|
+
readonly thinking?: string;
|
|
430
|
+
readonly tool: string[];
|
|
431
|
+
readonly toolVersions: Record<string, string>;
|
|
432
|
+
readonly systemPrompt: string;
|
|
433
|
+
readonly variable?: OnlineChatJson;
|
|
434
|
+
}
|
|
492
435
|
export interface CreateConversationRequest {
|
|
493
|
-
/**
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
436
|
+
/** Defaults to true; background SDK sessions are always hidden. */
|
|
437
|
+
readonly showInChatList?: boolean;
|
|
438
|
+
readonly config?: {
|
|
439
|
+
agentId?: string;
|
|
440
|
+
context?: {
|
|
441
|
+
variable?: OnlineChatJson;
|
|
442
|
+
};
|
|
443
|
+
scope?: string[];
|
|
444
|
+
thinking?: string;
|
|
445
|
+
};
|
|
446
|
+
readonly selectedModel?: {
|
|
447
|
+
modelService: string;
|
|
448
|
+
model: string;
|
|
449
|
+
};
|
|
450
|
+
/** Selects the native `online` executor or a callable Runner agent for a new conversation. */
|
|
501
451
|
readonly agentId?: string;
|
|
502
452
|
/** An explicit title (`user`); otherwise the first message gives one. */
|
|
503
453
|
readonly title?: string;
|
|
504
454
|
/** `panel` by default; otherwise a registered source. */
|
|
505
455
|
readonly source?: ConversationSource;
|
|
506
|
-
/**
|
|
507
|
-
* An online agent: the entry of its list (`ChatAgent.models`) the conversation answers with, as `ConversationPatch.model`
|
|
508
|
-
* sets it later; null or left out for the agent's default. 400 `INVALID_REQUEST` (`MODEL_NOT_LISTED`) for one the
|
|
509
|
-
* agent does not list.
|
|
510
|
-
*/
|
|
511
|
-
readonly model?: OnlineModelEntry | null;
|
|
512
456
|
}
|
|
513
|
-
/**
|
|
514
|
-
* `PATCH conversation`: rename (the title becomes `user`'s and the agent may no longer change it), archive, or choose
|
|
515
|
-
* the model an online conversation answers with: one of `ConversationDetail.models`, or null for the agent's default.
|
|
516
|
-
* The choice applies from the next run; a model that fails fails the run, nothing falls back to another.
|
|
517
|
-
*/
|
|
457
|
+
/** `PATCH conversation`: rename (the title becomes `user`'s and the agent may no longer change it), or archive. */
|
|
518
458
|
export interface ConversationPatch {
|
|
519
459
|
readonly title?: string;
|
|
520
460
|
readonly archived?: boolean;
|
|
521
|
-
readonly model?: OnlineModelEntry | null;
|
|
522
461
|
}
|
|
523
462
|
/**
|
|
524
463
|
* `GET messages`: without a page token, the newest `pageSize` messages; `meta.nextPageToken` pages back through older
|
|
@@ -526,6 +465,8 @@ export interface ConversationPatch {
|
|
|
526
465
|
* highest `seq` in the conversation now.
|
|
527
466
|
*/
|
|
528
467
|
export interface MessageListQuery {
|
|
468
|
+
/** Native UIMessage IDs to reread after a message revision notification, comma-separated (at most 100). */
|
|
469
|
+
readonly ids?: string;
|
|
529
470
|
/** Messages with a higher `seq`. */
|
|
530
471
|
readonly after?: number;
|
|
531
472
|
/** The `meta.nextPageToken` of the previous page: older messages. */
|
|
@@ -541,7 +482,7 @@ export interface MessagePage {
|
|
|
541
482
|
/** The highest `seq` in the conversation now, to ask `after` with. */
|
|
542
483
|
readonly lastSeq: number;
|
|
543
484
|
}
|
|
544
|
-
/** `POST messages
|
|
485
|
+
/** `POST messages`. */
|
|
545
486
|
export interface SendMessageRequest {
|
|
546
487
|
/** Markdown, at most `MESSAGE_CONTENT_MAX` characters; empty only when files are sent. */
|
|
547
488
|
readonly content: string;
|
|
@@ -579,6 +520,8 @@ export interface SendMessageResult {
|
|
|
579
520
|
* `CreateConversationRequest`). The text is at most `MESSAGE_CONTENT_MAX` characters: 400 `INVALID_REQUEST` otherwise.
|
|
580
521
|
*/
|
|
581
522
|
export interface StartConversationRequest {
|
|
523
|
+
/** The caller's own unattached chat uploads for the first message. */
|
|
524
|
+
readonly attachmentIds?: readonly string[];
|
|
582
525
|
readonly source: Exclude<ConversationSource, 'panel'>;
|
|
583
526
|
readonly text: string;
|
|
584
527
|
readonly agentId?: string;
|
|
@@ -588,6 +531,9 @@ export interface StartConversationRequest {
|
|
|
588
531
|
}
|
|
589
532
|
/** An agent the person may chat with (`GET agents`). */
|
|
590
533
|
export interface ChatAgent {
|
|
534
|
+
readonly quota?: readonly QuotaLocation[];
|
|
535
|
+
/** Viewer-visible eligible runtimes, for partial quota availability. */
|
|
536
|
+
readonly runnerNames: readonly string[];
|
|
591
537
|
readonly id: string;
|
|
592
538
|
readonly name: string;
|
|
593
539
|
readonly description: string | null;
|
|
@@ -595,34 +541,11 @@ export interface ChatAgent {
|
|
|
595
541
|
readonly nameText: I18nText | null;
|
|
596
542
|
readonly descriptionText: I18nText | null;
|
|
597
543
|
readonly avatar: string | null;
|
|
598
|
-
/** `online` or `runner`: the mode of the conversations it is started in. */
|
|
599
|
-
readonly type: 'online' | 'runner';
|
|
600
|
-
/**
|
|
601
|
-
* An online agent: the entries of its list a new conversation may answer with (`CreateConversationRequest.model`), in
|
|
602
|
-
* order, the first its default; empty for a runner agent.
|
|
603
|
-
*/
|
|
604
|
-
readonly models: readonly ChatModelChoice[];
|
|
605
|
-
/** The person's own agent, which only they may use (a "copy for myself"). */
|
|
606
|
-
readonly personal: boolean;
|
|
607
544
|
readonly isSystemDefault: boolean;
|
|
608
545
|
readonly isMyDefault: boolean;
|
|
609
546
|
readonly availability: ChatAvailability;
|
|
610
|
-
/**
|
|
611
|
-
|
|
612
|
-
* instead (`ChatSettings.onlineFallbackAgentId`). Null otherwise.
|
|
613
|
-
*/
|
|
614
|
-
readonly fallbackAgentId: string | null;
|
|
615
|
-
}
|
|
616
|
-
/**
|
|
617
|
-
* `POST copyAgent`: a private copy of an agent the person may wake, owned by them and usable only by them. The copy
|
|
618
|
-
* takes the agent's description, avatar, tool, model, instructions, business actions, skills, runners and limits, not
|
|
619
|
-
* its variables.
|
|
620
|
-
*/
|
|
621
|
-
export interface CopyAgentRequest {
|
|
622
|
-
/** The copy's name; `<name> (copy)` by default. */
|
|
623
|
-
readonly name?: string;
|
|
624
|
-
/** Also make the copy the person's default online agent. */
|
|
625
|
-
readonly makeDefault?: boolean;
|
|
547
|
+
/** Only personal runners have it: it takes only their owners' work. */
|
|
548
|
+
readonly personalOnly: boolean;
|
|
626
549
|
}
|
|
627
550
|
/** The person's own chat settings ("Profile › Agent"). */
|
|
628
551
|
export interface ChatPreferences {
|
|
@@ -634,11 +557,6 @@ export type ChatPreferencesPatch = Partial<ChatPreferences>;
|
|
|
634
557
|
export interface ChatSettings {
|
|
635
558
|
/** The agent new conversations go to when a person has no default of their own; null when none is set. */
|
|
636
559
|
readonly defaultAgentId: string | null;
|
|
637
|
-
/**
|
|
638
|
-
* The online agent that answers in place of a runner agent no runner may run for the person now: a new conversation
|
|
639
|
-
* with that runner agent starts on it, and a runner conversation may switch to it. Null when none is set.
|
|
640
|
-
*/
|
|
641
|
-
readonly onlineFallbackAgentId: string | null;
|
|
642
560
|
}
|
|
643
561
|
export type ChatSettingsPatch = Partial<ChatSettings>;
|
|
644
562
|
/** A per-user topic: each announcement reaches only the conversation owner's connections. */
|
|
@@ -648,6 +566,11 @@ export declare const CONVERSATIONS_TOPIC = "agents:conversations";
|
|
|
648
566
|
* `after`); `conversation`: its title, agent, run, archive or read state changed (fetch it, and the list).
|
|
649
567
|
*/
|
|
650
568
|
export type ConversationChanged = {
|
|
569
|
+
readonly kind: 'conversation.messageUpdated';
|
|
570
|
+
readonly conversationId: string;
|
|
571
|
+
readonly messageId: string;
|
|
572
|
+
readonly revision: number;
|
|
573
|
+
} | {
|
|
651
574
|
readonly kind: 'conversation.messages';
|
|
652
575
|
readonly conversationId: string;
|
|
653
576
|
readonly lastSeq: number;
|