@nocobase/app-plugin-agents 0.1.0-beta.1 → 0.1.0-beta.10
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 +355 -0
- package/README.md +107 -67
- package/dist/client/api/client.d.ts +25 -17
- package/dist/client/api/client.d.ts.map +1 -1
- package/dist/client/api/client.js +29 -27
- package/dist/client/api/client.js.map +1 -1
- package/dist/client/api/keys.d.ts +1 -1
- package/dist/client/api/keys.d.ts.map +1 -1
- package/dist/client/api/keys.js +1 -1
- package/dist/client/api/keys.js.map +1 -1
- package/dist/client/chat/api.d.ts +2 -7
- package/dist/client/chat/api.d.ts.map +1 -1
- package/dist/client/chat/api.js +0 -7
- package/dist/client/chat/api.js.map +1 -1
- 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/message-model.d.ts +4 -2
- package/dist/client/chat/message-model.d.ts.map +1 -1
- package/dist/client/chat/message-model.js +28 -3
- package/dist/client/chat/message-model.js.map +1 -1
- package/dist/client/chat/use-chat.d.ts +2 -10
- package/dist/client/chat/use-chat.d.ts.map +1 -1
- package/dist/client/chat/use-chat.js +3 -10
- package/dist/client/chat/use-chat.js.map +1 -1
- package/dist/client/chat.d.ts +4 -1
- package/dist/client/chat.d.ts.map +1 -1
- package/dist/client/chat.js +3 -0
- 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 +19 -39
- package/dist/client/components/agent-picker.js.map +1 -1
- package/dist/client/components/variables/variable-dialogs.d.ts +6 -1
- package/dist/client/components/variables/variable-dialogs.d.ts.map +1 -1
- package/dist/client/components/variables/variable-dialogs.js +27 -11
- package/dist/client/components/variables/variable-dialogs.js.map +1 -1
- package/dist/client/components/variables/variables-panel.d.ts.map +1 -1
- package/dist/client/components/variables/variables-panel.js +9 -2
- package/dist/client/components/variables/variables-panel.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 +3 -12
- package/dist/client/hooks/use-agent-picker-labels.js.map +1 -1
- package/dist/client/kit.d.ts +9 -12
- package/dist/client/kit.d.ts.map +1 -1
- package/dist/client/kit.js +12 -14
- package/dist/client/kit.js.map +1 -1
- package/dist/client/lib/agents.d.ts +5 -13
- package/dist/client/lib/agents.d.ts.map +1 -1
- package/dist/client/lib/agents.js +17 -32
- package/dist/client/lib/agents.js.map +1 -1
- package/dist/client/lib/install.js +1 -1
- package/dist/client/locales/chat.en-US.d.ts +9 -22
- package/dist/client/locales/chat.en-US.d.ts.map +1 -1
- package/dist/client/locales/chat.en-US.js +13 -25
- 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 +10 -22
- package/dist/client/locales/chat.zh-CN.js.map +1 -1
- package/dist/client/locales/en-US.d.ts +100 -219
- package/dist/client/locales/en-US.d.ts.map +1 -1
- package/dist/client/locales/en-US.js +105 -219
- package/dist/client/locales/en-US.js.map +1 -1
- package/dist/client/locales/runWait.en-US.d.ts +38 -0
- package/dist/client/locales/runWait.en-US.d.ts.map +1 -0
- package/dist/client/locales/runWait.en-US.js +37 -0
- package/dist/client/locales/runWait.en-US.js.map +1 -0
- package/dist/client/locales/runWait.zh-CN.d.ts +5 -0
- package/dist/client/locales/runWait.zh-CN.d.ts.map +1 -0
- package/dist/client/locales/runWait.zh-CN.js +32 -0
- package/dist/client/locales/runWait.zh-CN.js.map +1 -0
- package/dist/client/locales/runtimes.en-US.d.ts +55 -0
- package/dist/client/locales/runtimes.en-US.d.ts.map +1 -1
- package/dist/client/locales/runtimes.en-US.js +58 -3
- 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 +58 -3
- package/dist/client/locales/runtimes.zh-CN.js.map +1 -1
- package/dist/client/locales/zh-CN.d.ts.map +1 -1
- package/dist/client/locales/zh-CN.js +107 -221
- 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 +6 -100
- 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 +172 -0
- package/dist/client/pages/agents/runner-agents.js.map +1 -0
- package/dist/client/pages/runtimes/connect.js +1 -1
- 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 +3 -2
- package/dist/client/pages/runtimes/index.js.map +1 -1
- package/dist/client/pages/runtimes/runner-cells.d.ts +1 -1
- package/dist/client/pages/runtimes/runner-cells.d.ts.map +1 -1
- package/dist/client/pages/runtimes/runner-cells.js +4 -1
- package/dist/client/pages/runtimes/runner-cells.js.map +1 -1
- package/dist/client/pages/runtimes/runner-sheet.d.ts.map +1 -1
- package/dist/client/pages/runtimes/runner-sheet.js +12 -3
- package/dist/client/pages/runtimes/runner-sheet.js.map +1 -1
- package/dist/client/pages/runtimes/workspace-diagnostics.d.ts +9 -0
- package/dist/client/pages/runtimes/workspace-diagnostics.d.ts.map +1 -0
- package/dist/client/pages/runtimes/workspace-diagnostics.js +70 -0
- package/dist/client/pages/runtimes/workspace-diagnostics.js.map +1 -0
- 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 +21 -0
- package/dist/client/runs/format-wait.d.ts.map +1 -0
- package/dist/client/runs/format-wait.js +90 -0
- package/dist/client/runs/format-wait.js.map +1 -0
- 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 +13 -7
- package/dist/client/runs/subject-runs.js.map +1 -1
- package/dist/client/runs.d.ts +3 -1
- package/dist/client/runs.d.ts.map +1 -1
- package/dist/client/runs.js +3 -1
- package/dist/client/runs.js.map +1 -1
- package/dist/database/migrations/.manifest.json +48 -0
- package/dist/database/migrations/202610090001_ag_add_team_runner_variables.d.ts +9 -0
- package/dist/database/migrations/202610090001_ag_add_team_runner_variables.d.ts.map +1 -0
- package/dist/database/migrations/202610090001_ag_add_team_runner_variables.js +28 -0
- package/dist/database/migrations/202610090001_ag_add_team_runner_variables.js.map +1 -0
- package/dist/database/migrations/202610090002_ag_create_run_requests.d.ts +10 -0
- package/dist/database/migrations/202610090002_ag_create_run_requests.d.ts.map +1 -0
- package/dist/database/migrations/202610090002_ag_create_run_requests.js +105 -0
- package/dist/database/migrations/202610090002_ag_create_run_requests.js.map +1 -0
- package/dist/database/migrations/202610090003_ag_add_execution_history.d.ts +4 -0
- package/dist/database/migrations/202610090003_ag_add_execution_history.d.ts.map +1 -0
- package/dist/database/migrations/202610090003_ag_add_execution_history.js +17 -0
- package/dist/database/migrations/202610090003_ag_add_execution_history.js.map +1 -0
- package/dist/database/migrations/202610090004_ag_add_runner_workspace_usage.d.ts +9 -0
- package/dist/database/migrations/202610090004_ag_add_runner_workspace_usage.d.ts.map +1 -0
- package/dist/database/migrations/202610090004_ag_add_runner_workspace_usage.js +22 -0
- package/dist/database/migrations/202610090004_ag_add_runner_workspace_usage.js.map +1 -0
- package/dist/database/migrations/202610090005_ag_add_runner_variables.d.ts +10 -0
- package/dist/database/migrations/202610090005_ag_add_runner_variables.d.ts.map +1 -0
- package/dist/database/migrations/202610090005_ag_add_runner_variables.js +36 -0
- package/dist/database/migrations/202610090005_ag_add_runner_variables.js.map +1 -0
- package/dist/database/migrations/202610100001_ag_index_run_event_types.d.ts +4 -0
- package/dist/database/migrations/202610100001_ag_index_run_event_types.d.ts.map +1 -0
- package/dist/database/migrations/202610100001_ag_index_run_event_types.js +17 -0
- package/dist/database/migrations/202610100001_ag_index_run_event_types.js.map +1 -0
- package/dist/database/migrations/202610100002_ag_add_run_git_credentials.d.ts +9 -0
- package/dist/database/migrations/202610100002_ag_add_run_git_credentials.d.ts.map +1 -0
- package/dist/database/migrations/202610100002_ag_add_run_git_credentials.js +30 -0
- package/dist/database/migrations/202610100002_ag_add_run_git_credentials.js.map +1 -0
- package/dist/database/migrations/202610110001_ag_add_fresh_sessions.d.ts +4 -0
- package/dist/database/migrations/202610110001_ag_add_fresh_sessions.d.ts.map +1 -0
- package/dist/database/migrations/202610110001_ag_add_fresh_sessions.js +23 -0
- package/dist/database/migrations/202610110001_ag_add_fresh_sessions.js.map +1 -0
- 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/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/package.json +8 -10
- package/dist/server/cli/run-credential.js +1 -1
- package/dist/server/composition.d.ts +39 -37
- package/dist/server/composition.d.ts.map +1 -1
- package/dist/server/composition.js +53 -65
- 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 +342 -317
- package/dist/server/core/agents/agent.service.js.map +1 -1
- package/dist/server/core/agents/agent.store.d.ts +24 -12
- package/dist/server/core/agents/agent.store.d.ts.map +1 -1
- package/dist/server/core/agents/agent.store.js +65 -64
- 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 +86 -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 +2 -1
- package/dist/server/core/agents/index.d.ts.map +1 -1
- package/dist/server/core/agents/index.js +2 -1
- package/dist/server/core/agents/index.js.map +1 -1
- package/dist/server/core/brief/brief.js +1 -1
- package/dist/server/core/brief/brief.js.map +1 -1
- package/dist/server/core/callers/index.d.ts +1 -1
- package/dist/server/core/conversations/availability.d.ts +11 -10
- package/dist/server/core/conversations/availability.d.ts.map +1 -1
- package/dist/server/core/conversations/availability.js +14 -32
- package/dist/server/core/conversations/availability.js.map +1 -1
- package/dist/server/core/conversations/chat-settings.d.ts.map +1 -1
- package/dist/server/core/conversations/chat-settings.js +5 -3
- package/dist/server/core/conversations/chat-settings.js.map +1 -1
- package/dist/server/core/conversations/conversation.service.d.ts +3 -5
- package/dist/server/core/conversations/conversation.service.d.ts.map +1 -1
- package/dist/server/core/conversations/conversation.service.js +161 -221
- package/dist/server/core/conversations/conversation.service.js.map +1 -1
- package/dist/server/core/conversations/ports.d.ts +3 -17
- package/dist/server/core/conversations/ports.d.ts.map +1 -1
- package/dist/server/core/reports/report.service.d.ts.map +1 -1
- package/dist/server/core/reports/report.service.js +5 -2
- package/dist/server/core/reports/report.service.js.map +1 -1
- package/dist/server/core/runs/availability.d.ts +18 -7
- package/dist/server/core/runs/availability.d.ts.map +1 -1
- package/dist/server/core/runs/availability.js +35 -24
- package/dist/server/core/runs/availability.js.map +1 -1
- package/dist/server/core/runs/claim.d.ts +33 -65
- package/dist/server/core/runs/claim.d.ts.map +1 -1
- package/dist/server/core/runs/claim.js +566 -307
- package/dist/server/core/runs/claim.js.map +1 -1
- package/dist/server/core/runs/eligibility.d.ts +51 -0
- package/dist/server/core/runs/eligibility.d.ts.map +1 -0
- package/dist/server/core/runs/eligibility.js +44 -0
- package/dist/server/core/runs/eligibility.js.map +1 -0
- package/dist/server/core/runs/execution-view.d.ts +10 -0
- package/dist/server/core/runs/execution-view.d.ts.map +1 -0
- package/dist/server/core/runs/execution-view.js +25 -0
- package/dist/server/core/runs/execution-view.js.map +1 -0
- package/dist/server/core/runs/execution.d.ts +13 -0
- package/dist/server/core/runs/execution.d.ts.map +1 -0
- package/dist/server/core/runs/execution.js +85 -0
- package/dist/server/core/runs/execution.js.map +1 -0
- package/dist/server/core/runs/extensions.d.ts +59 -4
- package/dist/server/core/runs/extensions.d.ts.map +1 -1
- package/dist/server/core/runs/extensions.js +45 -9
- package/dist/server/core/runs/extensions.js.map +1 -1
- package/dist/server/core/runs/git-credentials.d.ts +43 -0
- package/dist/server/core/runs/git-credentials.d.ts.map +1 -0
- package/dist/server/core/runs/git-credentials.js +129 -0
- package/dist/server/core/runs/git-credentials.js.map +1 -0
- package/dist/server/core/runs/identity.d.ts +6 -0
- package/dist/server/core/runs/identity.d.ts.map +1 -0
- package/dist/server/core/runs/identity.js +49 -0
- package/dist/server/core/runs/identity.js.map +1 -0
- package/dist/server/core/runs/index.d.ts +9 -5
- package/dist/server/core/runs/index.d.ts.map +1 -1
- package/dist/server/core/runs/index.js +9 -5
- package/dist/server/core/runs/index.js.map +1 -1
- package/dist/server/core/runs/input-gate.d.ts +34 -0
- package/dist/server/core/runs/input-gate.d.ts.map +1 -0
- package/dist/server/core/runs/input-gate.js +54 -0
- package/dist/server/core/runs/input-gate.js.map +1 -0
- package/dist/server/core/runs/lifecycle.d.ts +9 -19
- package/dist/server/core/runs/lifecycle.d.ts.map +1 -1
- package/dist/server/core/runs/lifecycle.js +76 -34
- package/dist/server/core/runs/lifecycle.js.map +1 -1
- package/dist/server/core/runs/policy.d.ts +8 -0
- package/dist/server/core/runs/policy.d.ts.map +1 -1
- package/dist/server/core/runs/policy.js +10 -0
- package/dist/server/core/runs/policy.js.map +1 -1
- package/dist/server/core/runs/ports.d.ts +84 -28
- 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 +3 -3
- package/dist/server/core/runs/preview.js.map +1 -1
- package/dist/server/core/runs/run-requests.d.ts +220 -0
- package/dist/server/core/runs/run-requests.d.ts.map +1 -0
- package/dist/server/core/runs/run-requests.js +475 -0
- package/dist/server/core/runs/run-requests.js.map +1 -0
- package/dist/server/core/runs/run.service.d.ts +84 -11
- package/dist/server/core/runs/run.service.d.ts.map +1 -1
- package/dist/server/core/runs/run.service.js +433 -93
- package/dist/server/core/runs/run.service.js.map +1 -1
- package/dist/server/core/runs/run.store.d.ts +20 -3
- package/dist/server/core/runs/run.store.d.ts.map +1 -1
- package/dist/server/core/runs/run.store.js +49 -2
- package/dist/server/core/runs/run.store.js.map +1 -1
- package/dist/server/core/runs/runner-view.d.ts +6 -4
- package/dist/server/core/runs/runner-view.d.ts.map +1 -1
- package/dist/server/core/runs/runner-view.js +13 -11
- 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.map +1 -1
- package/dist/server/core/runs/sweeper.js +54 -10
- package/dist/server/core/runs/sweeper.js.map +1 -1
- package/dist/server/core/runs/transitions.d.ts +1 -1
- package/dist/server/core/runs/transitions.d.ts.map +1 -1
- package/dist/server/core/runs/transitions.js +69 -5
- package/dist/server/core/runs/transitions.js.map +1 -1
- package/dist/server/core/runs/workload.d.ts +3 -3
- package/dist/server/core/runs/workload.d.ts.map +1 -1
- package/dist/server/core/runs/workload.js +154 -45
- package/dist/server/core/runs/workload.js.map +1 -1
- 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 +1 -1
- package/dist/server/core/variables/index.js.map +1 -1
- package/dist/server/core/variables/variable.service.d.ts +38 -6
- package/dist/server/core/variables/variable.service.d.ts.map +1 -1
- package/dist/server/core/variables/variable.service.js +201 -30
- package/dist/server/core/variables/variable.service.js.map +1 -1
- package/dist/server/distribution/dist.service.d.ts +27 -5
- package/dist/server/distribution/dist.service.d.ts.map +1 -1
- package/dist/server/distribution/dist.service.js +41 -5
- package/dist/server/distribution/dist.service.js.map +1 -1
- package/dist/server/distribution/download-tokens.d.ts +1 -1
- package/dist/server/distribution/download-tokens.d.ts.map +1 -1
- package/dist/server/distribution/download-tokens.js +7 -4
- package/dist/server/distribution/download-tokens.js.map +1 -1
- package/dist/server/distribution/index.d.ts +11 -3
- package/dist/server/distribution/index.d.ts.map +1 -1
- package/dist/server/distribution/index.js +31 -8
- package/dist/server/distribution/index.js.map +1 -1
- package/dist/server/jobs/index.d.ts +1 -1
- package/dist/server/jobs/index.d.ts.map +1 -1
- package/dist/server/jobs/index.js +1 -1
- package/dist/server/jobs/index.js.map +1 -1
- package/dist/server/jobs/job.service.d.ts +3 -1
- package/dist/server/jobs/job.service.d.ts.map +1 -1
- package/dist/server/jobs/job.service.js +11 -3
- package/dist/server/jobs/job.service.js.map +1 -1
- package/dist/server/jobs/spec.d.ts +4 -0
- package/dist/server/jobs/spec.d.ts.map +1 -1
- package/dist/server/jobs/spec.js +6 -0
- package/dist/server/jobs/spec.js.map +1 -1
- package/dist/server/kernel/errors.d.ts +1 -1
- package/dist/server/kernel/errors.d.ts.map +1 -1
- package/dist/server/kernel/errors.js +1 -0
- package/dist/server/kernel/errors.js.map +1 -1
- package/dist/server/kernel/events.d.ts +34 -9
- package/dist/server/kernel/events.d.ts.map +1 -1
- package/dist/server/kernel/events.js.map +1 -1
- package/dist/server/kernel/redaction.d.ts +2 -0
- package/dist/server/kernel/redaction.d.ts.map +1 -1
- package/dist/server/kernel/redaction.js +17 -0
- package/dist/server/kernel/redaction.js.map +1 -1
- 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/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/providers/agents.d.ts +4 -25
- package/dist/server/providers/agents.d.ts.map +1 -1
- package/dist/server/providers/agents.js +8 -75
- package/dist/server/providers/agents.js.map +1 -1
- package/dist/server/routes/admin.d.ts.map +1 -1
- package/dist/server/routes/admin.js +140 -201
- 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 +12 -70
- 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 +11 -1
- 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 -21
- package/dist/server/routes/roster.js.map +1 -1
- package/dist/server/routes/run-requests.d.ts +6 -0
- package/dist/server/routes/run-requests.d.ts.map +1 -0
- package/dist/server/routes/run-requests.js +216 -0
- package/dist/server/routes/run-requests.js.map +1 -0
- package/dist/server/routes/runners/admin.d.ts +9 -1
- package/dist/server/routes/runners/admin.d.ts.map +1 -1
- package/dist/server/routes/runners/admin.js +62 -24
- package/dist/server/routes/runners/admin.js.map +1 -1
- package/dist/server/routes/runners/dist.d.ts +5 -1
- package/dist/server/routes/runners/dist.d.ts.map +1 -1
- package/dist/server/routes/runners/dist.js +36 -9
- package/dist/server/routes/runners/dist.js.map +1 -1
- package/dist/server/routes/runners/install.d.ts.map +1 -1
- package/dist/server/routes/runners/install.js +98 -15
- 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 +25 -7
- package/dist/server/routes/runners/runner.js.map +1 -1
- package/dist/server/routes/runners/runs.d.ts +1 -1
- package/dist/server/routes/runners/runs.d.ts.map +1 -1
- package/dist/server/routes/runners/runs.js +23 -3
- package/dist/server/routes/runners/runs.js.map +1 -1
- package/dist/server/routes/schemas.d.ts +37 -8
- package/dist/server/routes/schemas.d.ts.map +1 -1
- package/dist/server/routes/schemas.js +367 -82
- package/dist/server/routes/schemas.js.map +1 -1
- package/dist/server/runners/index.d.ts +1 -0
- package/dist/server/runners/index.d.ts.map +1 -1
- package/dist/server/runners/index.js +1 -0
- package/dist/server/runners/index.js.map +1 -1
- package/dist/server/runners/runner.service.d.ts +22 -8
- package/dist/server/runners/runner.service.d.ts.map +1 -1
- package/dist/server/runners/runner.service.js +112 -14
- package/dist/server/runners/runner.service.js.map +1 -1
- package/dist/server/runners/runner.store.d.ts +10 -1
- package/dist/server/runners/runner.store.d.ts.map +1 -1
- package/dist/server/runners/runner.store.js +117 -4
- package/dist/server/runners/runner.store.js.map +1 -1
- package/dist/server/runners/sweeper.d.ts +5 -0
- package/dist/server/runners/sweeper.d.ts.map +1 -1
- package/dist/server/runners/sweeper.js +4 -2
- package/dist/server/runners/sweeper.js.map +1 -1
- package/dist/server/runners/workspaces.d.ts +33 -0
- package/dist/server/runners/workspaces.d.ts.map +1 -0
- package/dist/server/runners/workspaces.js +248 -0
- package/dist/server/runners/workspaces.js.map +1 -0
- 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 +12 -9
- package/dist/server/tokens.d.ts.map +1 -1
- package/dist/server/tokens.js +6 -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 +128 -165
- package/dist/shared/agents.d.ts.map +1 -1
- package/dist/shared/agents.js +46 -97
- package/dist/shared/agents.js.map +1 -1
- package/dist/shared/conversations.d.ts +43 -89
- package/dist/shared/conversations.d.ts.map +1 -1
- package/dist/shared/conversations.js +5 -24
- package/dist/shared/conversations.js.map +1 -1
- package/dist/shared/model-catalog.d.ts +48 -0
- package/dist/shared/model-catalog.d.ts.map +1 -0
- package/dist/shared/model-catalog.js +148 -0
- package/dist/shared/model-catalog.js.map +1 -0
- package/dist/shared/models.js +1 -1
- package/dist/shared/models.js.map +1 -1
- package/dist/shared/runners.d.ts +107 -17
- package/dist/shared/runners.d.ts.map +1 -1
- package/dist/shared/runners.js +49 -7
- package/dist/shared/runners.js.map +1 -1
- package/dist/shared/runs.d.ts +203 -1
- package/dist/shared/runs.d.ts.map +1 -1
- package/dist/shared/runs.js +24 -0
- package/dist/shared/runs.js.map +1 -1
- package/dist/shared/variables.d.ts +22 -0
- package/dist/shared/variables.d.ts.map +1 -1
- package/dist/shared/variables.js +9 -1
- package/dist/shared/variables.js.map +1 -1
- package/package.json +24 -26
- package/skills/nocobase-app-plugin-agents/SKILL.md +8 -7
- package/skills/nocobase-app-plugin-agents/references/agents.md +30 -0
- package/skills/nocobase-app-plugin-agents/references/distribution.md +21 -4
- package/skills/nocobase-app-plugin-agents/references/extension-points.md +30 -20
- package/skills/nocobase-app-plugin-agents/references/model-services.md +17 -0
- package/skills/nocobase-app-plugin-agents/references/runners.md +15 -1
- package/skills/nocobase-app-plugin-agents/references/setup-and-config.md +4 -7
- package/skills/nocobase-app-plugin-agents/references/variables-skills-usage.md +4 -4
- package/skills/nocobase-app-plugin-agents/references/verification-and-troubleshooting.md +33 -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 -76
- 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 -35
- package/dist/client/components/model-entries.d.ts.map +0 -1
- package/dist/client/components/model-entries.js +0 -82
- 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/tool-policy.d.ts +0 -5
- package/dist/client/lib/tool-policy.d.ts.map +0 -1
- package/dist/client/lib/tool-policy.js +0 -10
- 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 -73
- package/dist/client/pages/agents/agent-model.d.ts.map +0 -1
- package/dist/client/pages/agents/agent-model.js +0 -172
- 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 -22
- package/dist/client/pages/agents/detail/sections.d.ts.map +0 -1
- package/dist/client/pages/agents/detail/sections.js +0 -311
- 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 -195
- 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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Distribution: the CLI and runner tarballs
|
|
2
2
|
|
|
3
|
-
The App serves two products itself
|
|
3
|
+
The App serves two products itself: its own CLI (the `nocobase.cli.bin` of its `package.json`, such as `acme`) and the runner, `nocobase-runner`, each as standalone tarballs that bundle Node.js, one per platform, or as one universal tarball without Node that runs on the machine's own Node.js 24 or newer on every platform. An App that serves no tarball of a product may instead name the exact npm version to install it from ("Naming a product on npm instead" below), as NocoBase Studio does. The README's "What it does" (Distribution) and "The CLI runs get" sections, and `@nocobase/app-cli`'s README section "The application's own CLI: `cli build` and `cli link`", are the reference.
|
|
4
4
|
|
|
5
5
|
## Building
|
|
6
6
|
|
|
@@ -10,6 +10,7 @@ pnpm nocobase cli build --runner # nocobase-runner, from @nocobase/agent-run
|
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
- `--targets` takes a comma-separated list; the default is `darwin-arm64,darwin-x64,linux-x64,linux-arm64`. Windows is not supported.
|
|
13
|
+
- `--universal` also packs `<product>-v<version>-universal.tar.gz`, which carries no Node.js and runs on the machine's Node.js 24 or newer; without `--targets` it packs only that one (no Node download). The App serves it to every platform without a tarball of its own; one built for the platform wins.
|
|
13
14
|
- Node.js for each target is downloaded from nodejs.org and checked against `SHASUMS256.txt` (cached in `node_modules/.cache/nocobase-cli/node`). `--node-version` picks the version (default: the one running the command). `--host-node` uses this machine's Node.js for its own platform instead of downloading, for a quick local build: `pnpm nocobase cli build --targets darwin-arm64 --host-node`.
|
|
14
15
|
- `--out` (default `storage/runners/dist`), `--channel` (default `stable`), `--version` (default `nocobase.cli.version`, else the App's version; with `--runner`, the runner's), `--skip-build`, `--keep-staging`.
|
|
15
16
|
- The App needs `@nocobase/app-cli-client` in its `devDependencies` for the CLI and `@nocobase/agent-runner` for the runner; `npm`, `pnpm` and `tar` come from the environment.
|
|
@@ -23,11 +24,22 @@ Each product lands in a directory of its own, with a manifest of every file's SH
|
|
|
23
24
|
|
|
24
25
|
## Serving
|
|
25
26
|
|
|
26
|
-
The plugin serves `agents.dist.dir` (default `storage/runners/dist`, relative to the App root), channel `agents.dist.channel` (default `stable`). A product's current version is the highest in the channel, unless `agents.dist.versions` pins one. Only files a manifest lists are served. Routes (`DIST_ROUTES` of `@nocobase/agent-protocol`): `GET /api/agents/dist/manifest`, `GET /api/agents/dist/products/<product>/targets/<target>` (`?format=env` for a shell; 404 `PLATFORM_UNSUPPORTED` with the targets there are), the tarball itself, and `POST /api/agents/dist/downloadTokens`.
|
|
27
|
+
The plugin serves `agents.dist.dir` (default `storage/runners/dist`, relative to the App root), channel `agents.dist.channel` (default `stable`). A product's current version is the highest in the channel, unless `agents.dist.versions` pins one. Only files a manifest lists are served. Routes (`DIST_ROUTES` of `@nocobase/agent-protocol`): `GET /api/agents/dist/manifest`, `GET /api/agents/dist/products/<product>/targets/<target>` (`?format=env` for a shell; 404 `PLATFORM_UNSUPPORTED` with the targets there are; the universal tarball answers with the asked target and `universal: true`, `universal=true` in env form), the tarball itself, and `POST /api/agents/dist/downloadTokens`.
|
|
28
|
+
|
|
29
|
+
### Naming a product on npm instead
|
|
30
|
+
|
|
31
|
+
`agents.dist.npm` names the npm package and exact version (never a range) of a product, such as `{ nocobase-runner: { package: '@nocobase/agent-runner', version: 1.0.0 } }`. It is used only when `agents.dist.dir` has no current version of that product; a product the directory has is served from it exactly as without the setting. The machine needs Node.js 24 or later already; nothing bundles it on this path.
|
|
32
|
+
|
|
33
|
+
Only callers that say they understand the answer get it, so an older runner, install script or CLI never sees one:
|
|
34
|
+
|
|
35
|
+
- The resolve route with `accept=npm` (a comma-separated list) answers `{ kind: 'npm', product, version, package, channel }`, or with `format=env` the lines `kind=npm`, `product=`, `version=`, `package=` and `channel=`. Without it, such a product is 404 as before.
|
|
36
|
+
- A heartbeat answer carries `npmUpgrade` (`latestVersion`, `package`, `channel`, `reason`) instead of `upgrade` only to a runner that declares the `npm` feature (protocol 8) and runs an older version; any other runner is offered no update for that product. The Runtimes page marks only those runners "Upgradable".
|
|
37
|
+
|
|
38
|
+
An App that builds its runner and CLI into its deployment pins them to the versions it was built with this way, so redeploying it moves every runner to that version.
|
|
27
39
|
|
|
28
40
|
## CI and deployment
|
|
29
41
|
|
|
30
|
-
|
|
42
|
+
There are two ways to deliver the packages. When the runner and CLI follow the App's own releases, build them with the App: an `afterServerBuild` build hook in `cli/plugins.ts` runs `pnpm nocobase cli build --universal --skip-build --out dist/runners` (and the same with `--runner`), and `agents.dist.dir` in the App's configuration points at that directory, so every build, archive and image serves the runner and CLI it was built with; universal packages keep the build small, and `cli build` needs the npm registry for their dependencies. NocoBase Studio does this. Otherwise build the two products as separate artifacts in CI, one job each (`pnpm nocobase cli build --out output/dist` and `pnpm nocobase cli build --runner --out output/dist`, uploading `output/dist`), and mount or copy each into the deployment's `storage/runners/dist` (or the directory `agents.dist.dir` names), keeping the `<channel>/<product>/` layout. Rebuild the runner whenever `@nocobase/agent-runner` or the agents plugin is upgraded, so runners can update to a version that speaks the App's protocol, and rebuild the CLI whenever the App's `nocobase.cli` or its CLI skills change.
|
|
31
43
|
|
|
32
44
|
## Installing on a machine
|
|
33
45
|
|
|
@@ -43,10 +55,15 @@ curl -fsSL https://app.example.com/api/agents/dist/installScript | sh -s -- --ru
|
|
|
43
55
|
|
|
44
56
|
Options: `--prefix`, `--bin-dir`, `--dry-run`; with `--runner`, `--runner-prefix`, `--name`, `--label` and `--no-service` (register only). A token of the other kind fails before anything is installed. An App that serves no CLI still installs the runtime.
|
|
45
57
|
|
|
58
|
+
For a universal tarball the script checks, before downloading, that `node` on PATH is Node.js 24 or newer and stops with how to install it otherwise; it then links `<prefix>/node` to that `node`. The package's launcher tries `NOCOBASE_NODE`, `<prefix>/node`, `node` on PATH, and a Node an older standalone version in `<prefix>/versions/` still carries, so a runner's user service (launchd, systemd), whose PATH usually has no `node`, starts it. An update to a universal version leaves the Node it ran on in `<prefix>/node` before removing old versions. With `--runner`, a missing `pnpm` only prints a hint to run `corepack enable`.
|
|
59
|
+
|
|
60
|
+
The script resolves with `accept=npm`. For an npm answer it checks Node.js 24 the same way and that `npm` is on PATH (or `NOCOBASE_NPM` names one), stopping with how to get it otherwise, then runs `npm install --prefix <prefix>/versions/<version>.partial --no-save --no-audit --no-fund --omit=optional <package>@<version>` with the npm configuration (registry, proxy) of the person running it, writes a launcher at `bin/<command>` beside `node_modules`, renames the directory to `<prefix>/versions/<version>` and links `<prefix>/node`. `current`, the command link and the runner's service are then exactly as for a tarball. `--omit=optional` keeps the coding tools' per-platform SDK packages, each carrying a binary the runner never starts, off the machine.
|
|
61
|
+
|
|
46
62
|
## Updates
|
|
47
63
|
|
|
48
|
-
- The runner reports its product and version on every heartbeat; the answer names a newer `nocobase-runner` when the channel serves one for its platform. An installed runner started by its service updates itself between runs; `nocobase-runner update` does it now (`--check` only checks, `--auto on|off` switches automatic updates). The Runtimes page marks such a runner "Upgradable".
|
|
64
|
+
- The runner reports its product and version on every heartbeat; the answer names a newer `nocobase-runner` when the channel serves one for its platform (`upgrade`), or the npm version `agents.dist.npm` pins (`npmUpgrade`, to runners with the `npm` feature). An installed runner started by its service updates itself between runs; `nocobase-runner update` does it now (`--check` only checks, `--auto on|off` switches automatic updates). The Runtimes page marks such a runner "Upgradable".
|
|
49
65
|
- The App's CLI, installed by the script, has `<cli> update`, and says on stderr when a newer version is served.
|
|
66
|
+
- Both ask with `accept=npm` and install an npm answer into `<prefix>/versions/<version>` the way the install script does, with the machine's npm; an installation moves between tarball and npm versions in either direction. The runner and `@nocobase/app-cli-client` depend on exactly the `@nocobase/agent-protocol` they were built with, so an exact npm version speaks one known protocol.
|
|
50
67
|
- A run gets the App's CLI as `agents.cli.package` says: by default the tarball the App serves for the runner's platform (`{ kind: served }`), downloaded once per version. A runner without the `archives` feature, or a platform with no build, falls back to the CLI installed beside it (`preinstalled`). `{ kind: npm, package, version }` names an npm package instead.
|
|
51
68
|
|
|
52
69
|
## The npm package as an alternative
|
|
@@ -2,32 +2,42 @@
|
|
|
2
2
|
|
|
3
3
|
Everything the App contributes goes through `agentsToken` (`@nocobase/app-plugin-agents/server/tokens`), resolved in one of the App's service providers when it boots. Text people read is an `I18nText` (`{ key, ns }`) in the App's own namespace. The README's "Extension points" section describes each field; this is the map. Where the two disagree, the types exported from `server/tokens` (the `Agents` interface) are authoritative.
|
|
4
4
|
|
|
5
|
-
| Extension point | Contributes
|
|
6
|
-
| -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
7
|
-
| `subjects.register(binding)` | A kind of subject runs work on: `kind`, `title`, `triggers`, `preview`, `context.assemble`, `sink.onRunFinished`, `queuedExpiryMs`, `reports.describe
|
|
8
|
-
| `runs.enqueue(...)`, `runs.withdrawQueued(...)`, `runs.workload(...)` | Wake an agent on a subject, withdraw queued work, read the board of open runs
|
|
9
|
-
| `scopes.register(kind)` | A scope of variables and default skills (`key`, `title`, `description`, `access(scopeId, userId)`); `agent` is reserved, `workdir` is registered by the App
|
|
10
|
-
| `actions.provide(source)` | The business actions an agent may be given (`key`, `group`, `title`, `description`, `defaultOn`), and those never granted (`grantable: false` with a `reason`)
|
|
11
|
-
| `
|
|
12
|
-
| `
|
|
13
|
-
| `
|
|
14
|
-
| `
|
|
15
|
-
| `
|
|
16
|
-
| `
|
|
17
|
-
| `
|
|
18
|
-
| `
|
|
19
|
-
| `
|
|
20
|
-
| `
|
|
21
|
-
| `
|
|
22
|
-
| `
|
|
5
|
+
| Extension point | Contributes | Typical use |
|
|
6
|
+
| -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
7
|
+
| `subjects.register(binding)` | A kind of subject runs work on: `kind`, `title`, `triggers`, `preview`, `context.assemble`, `sink.onRunFinished`, `queuedExpiryMs`, `reports.describe` | An issue, a ticket, a document an agent works on |
|
|
8
|
+
| `runs.enqueue(...)`, `runs.withdrawQueued(...)`, `runs.workload(...)` | Wake an agent on a subject, withdraw queued work, read the board of open runs | Assigning work to an agent from a business action |
|
|
9
|
+
| `scopes.register(kind)` | A scope of variables and default skills (`key`, `title`, `description`, `access(scopeId, userId)`); `agent` is reserved, `workdir` is registered by the App | Per-project or per-team variables |
|
|
10
|
+
| `actions.provide(source)` | The business actions an agent may be given (`key`, `group`, `title`, `description`, `defaultOn`), and those never granted (`grantable: false` with a `reason`) | What the agent editor's Capabilities tab offers |
|
|
11
|
+
| `agents.setDefaults(provider)`, `agents.applyDefaults()` | The instructions and business actions every agent discovered from runners gets; `applyDefaults` writes them to the agents that differ |
|
|
12
|
+
| `agents.ensureSystem(input)` | An agent of the App's own (fixed id, name, description, instructions, actions, tools and models), kept as given and enabled |
|
|
13
|
+
| `gate.set(gate)` (`ActionGate`: `allowed(identity)`, optional `consultable(action)`) | Which business actions a caller holds now: a person their own (narrowed by an API key's scope), a run those its agent is configured with within the waking person's | Bounding the command manifest and every request a run makes; without a gate a caller holds only `agents.agents/view` (and `agents.runs/self` for a run) |
|
|
14
|
+
| `conversations.sources.register`, `conversations.contextKinds.register`, `conversations.rules.provide`, `conversations.deliver`, `consultations.rules.provide` | Where conversations start from, what a page context may reference, extra system rules, news delivered into a conversation | "Ask agent" buttons on business pages |
|
|
15
|
+
| `people.provide(source)` | The App's directory: names, whom to pick, who can no longer act (`inactive`) | Disabling a person stops their runners |
|
|
16
|
+
| `events.on('agent.removed' \| 'notice', listener)` | An agent disabled; people to be told, such as `runner_upgrade_required` | Releasing work given to an agent; forwarding notices to the App's inbox |
|
|
17
|
+
| `jobs.register(kind, registration)` | A build job kind, only for an off-by-default runner build method | Builds on runners |
|
|
18
|
+
| `reporting.usage`, `reporting.runFigures`, `reporting.range`, `reporting.modelUsage` | What runs used and cost, grouped as the App needs | The App's report pages |
|
|
19
|
+
| `briefs.sections.register(provider)` | Sections added to every brief's context layer | Project conventions every run should read |
|
|
20
|
+
| `mounts.register(provider)` | Directories of files placed beside the agent | Reference material for a run |
|
|
21
|
+
| `repoAccess.register(provider)` | Commit identity and short-lived push credentials per run, at the claim or, with `issue`, whenever the runner's git needs one (`gitCredentials` runners) | Git hosting integration |
|
|
22
|
+
| `models.gateway` | The model gateway for the App's own model calls | See [Online agents](online-agents.md) |
|
|
23
|
+
| `vectors.collection(spec)`, `vectors.stores.register` | Vector collections searched by meaning; another vector store type | Semantic search for a knowledge base |
|
|
23
24
|
|
|
24
25
|
Rules that are easy to miss:
|
|
25
26
|
|
|
26
27
|
- `context.assemble`, brief sections and mounts run inside the claim's transaction and read the database through the claim's connection only (on SQLite it is the only connection). Read anything else in the provider's optional `prepare(run)`, which runs before the transaction. A throw leaves the run queued; three failures fail it `setupFailed`.
|
|
27
28
|
- `runs.enqueue` takes an optional outer transaction; inside another plugin's transaction, publish the collected events after it commits.
|
|
28
|
-
-
|
|
29
|
-
-
|
|
29
|
+
- When someone answers for the subject, pass `responsibleUserId` and the source (`requestedByUserId`, or `causedByRunId` for what a run did). Work another person causes then answers `outcome: 'pending'`: a run request only the responsible confirms (`runs.requests`, `/api/agents/runRequests`), unless `execution: 'mine'` runs it as the asker, which is refused with `NO_RUNNER_AVAILABLE` when no online runner would take the asker's work (`eligibility.canClaim` with the agent's variables). Both people must have agent access; identical pending snapshots are reused without renewing expiry. For mutable responsibility, bind `subjects.register({ …, responsibleUserId: (conn, subjectId) => … })` to read the current responsible using the supplied transaction connection, so old owners cannot confirm or reject before reassignment. Call `runs.requests.reassign` with each responsibility change; without a resolver this is the only protection against stale confirmation. If there is no usable new responsible, reassignment expires and notifies instead of dropping the work, preserving `runAsMe`. Forward `runRequest.*` events and `run_request_expired` notices to the App's inbox, and handle `outcome` before using a possibly null `runId`.
|
|
30
|
+
- To tell a person before queuing whether a runner would take their work, call `eligibility.canClaim` (online now) or `mayQueue` (some registered runner could) with the subject's variable scopes; a variable marked `teamRunnersOnly` needs a team runner. Enqueue itself does not refuse work run as the responsible or as whoever woke the agent: such work waits with `secretsNotAllowed`.
|
|
31
|
+
- Forward `notice` / `notice.cleared` using the exported `AgentsNotice` interface. Dispatch by its `type`: runner notices go to the runner's owner, `run_secrets_not_allowed` to the run's actor and owner, and `run_request_expired` to the requester. Subjects are of kind `runner`, `run` or `runRequest`. A secrets notice names the run, the agent and the team-only variables in its parameters. Deduplicate by the notice key. Existing copied queue components must merge the `secretsNotAllowed` type and label from the Registry.
|
|
32
|
+
- A repository provider minting credentials in `prepare` implements idempotent `discard(run, prepared)` to revoke undelivered credentials. The plugin calls it outside the transaction on a skipped or rolled-back claim; the App implements the code host revocation API.
|
|
33
|
+
- Name commands in a brief with `commandRef(cli, id, flag?)` rather than spelling them.
|
|
30
34
|
- The App's CLI commands are its API routes: a route declares `...cliRoute({ command, action, ... })` in `describeRoute()`, and lists `runToken` in its `security` when a run may call it. The command manifest (`GET /api/cli/manifest`) offers each caller only the commands whose `action` the gate allows. There is no separate command registry.
|
|
31
35
|
- `GET /api/agents/vocabulary` hands the browser the subjects, sources and scopes the App contributed; the browser never imports server code for them.
|
|
32
36
|
|
|
33
37
|
The README's example under "Extension points" shows a subject registered and work enqueued and withdrawn.
|
|
38
|
+
|
|
39
|
+
A subject assembly may return `inputs` containing only the effective inputs for its current task. Render the task and turn from that same selection. Claims use it for delivery, brief sections and mounts; omitted inputs are resolved in the claim transaction and retained in the audit history, so polling and completion do not replay obsolete work. Omit the field to deliver all queued inputs.
|
|
40
|
+
|
|
41
|
+
A working run is held to the same policy: before input joins a dispatched or running run, and before pending input is delivered to one, the plugin asks `admit` and then `selectInputs` with that input. New input either hook keeps from the working run waits in a queued run for the claim to admit or cancel; pending input rejected or left out by `selectInputs` is marked handled instead of being delivered. Implement `selectInputs` with the same selection the assembly returns as `inputs`.
|
|
42
|
+
|
|
43
|
+
For issue/card work indicators, use `runs.workingOn(subjectKind, subjectIds)` after filtering visible subjects. It returns unique `{ subjectId, agentId, working: true }` pairs for dispatched/running runs in that exact scope, with no run details or global board cap. Match the current executor and apply the application's pending approval rules separately; queued/terminal runs do not appear. Pass a bounded batch from a view, rather than querying each card's full history.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Model services
|
|
2
|
+
|
|
3
|
+
Agents run on runners and do not use model services. The plugin keeps model services for the App's own model calls, such as a knowledge base's embeddings, reranking and short texts. The README's "Model services" and "Vectors" sections are the reference.
|
|
4
|
+
|
|
5
|
+
## Model services
|
|
6
|
+
|
|
7
|
+
- A service is a provider type (`MODEL_PROVIDERS` in `@nocobase/app-plugin-agents/shared/models`: OpenAI, Anthropic, Google, DeepSeek, Alibaba, Moonshot, Cohere, Ollama, and OpenAI-compatible endpoints), a name, a base URL, a write-only API key sealed with the secrets service, an on/off switch and the models it offers. OpenCode Zen and Go serve each model family through its own API under one base URL: DeepSeek, GLM, Kimi and MiMo through a DeepSeek or OpenAI-compatible service, Claude, MiniMax and Qwen through an Anthropic one, GPT and Grok through an OpenAI one; a call to an OpenCode base URL sends `x-opencode-session` automatically. Each model has a kind: `chat` (short texts), `embedding` or `rerank`.
|
|
8
|
+
- Services are added on the Models page (`modelsRoute`, behind `agents.services`) or through the API (`service create|discover|check` on the CLI). They are never configured in `config.yml`.
|
|
9
|
+
- `GET /api/agents/models` (anyone signed in) lists the models of a kind the enabled services offer; `POST /api/agents/checkModel` (who reads agents) tests one with a short call and never throws.
|
|
10
|
+
|
|
11
|
+
## The model gateway
|
|
12
|
+
|
|
13
|
+
`models.gateway` on `agentsToken` serves the App's own model calls: `catalog(kind)`, `check(ref)`, `embed({ model, values, source })`, `rerank({ model, query, documents, topN?, source })` and `generate({ model, system?, prompt, maxOutputTokens?, source })`. Each names who asks (`source`), is recorded in `agModelUsage` and priced from the service's model prices, and throws `ModelError` with a code (`config`, `auth`, `quota`, `rateLimit`, `network`, `contextOverflow`, `filtered`, `badResponse`, `aborted`, `unknown`). Use it rather than calling a provider SDK, so keys, usage and prices stay in one place.
|
|
14
|
+
|
|
15
|
+
## Vectors
|
|
16
|
+
|
|
17
|
+
`vectors.collection(spec)` gives the App semantic search over items it names, embedded with the model it chooses, in the store `agents.vectors` configures (`sqlite-vec` by default, `pgvector` for several instances or Alpine). `status()` answers availability and a `VectorUnavailableCode` when it is not available; then search answers null and the caller keeps its keyword search. See the README's "Vectors" section.
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Runners
|
|
2
2
|
|
|
3
|
+
## Ended workspace diagnostics
|
|
4
|
+
|
|
5
|
+
For application-owned task cleanup, keep `SubjectWorkspaces.settled` conservative and optionally register `resolveKeys` for legacy directory keys and `commits` for trusted merged PR heads by repository URL. The plugin checks current or historical runner ownership and excludes nonterminal runs; directory keys alone never authorize lookup or cleanup. Use the head at merge time, not a squash merge commit. See `packages/plugins/app-plugin-agents/docs/workspace-cleanup.md` in the source repository for protocol and integration details.
|
|
6
|
+
|
|
7
|
+
Runtime pages distinguish application settlement from the runner's local cleanup check. An allowed check is not a deletion receipt. Directory diagnostics require explicit `canSeeMachine: true`; disk warnings use the report's measurement time and show expired or offline readings as prior reports. An ended workspace still stays when tracked changes, unpushed submodule commits, missing local objects or insufficient evidence prevent verification. Upgrade and serve both plugin and runner before expecting new diagnostics.
|
|
8
|
+
|
|
3
9
|
A runner (shown as a runtime) is `nocobase-runner` from `@nocobase/agent-runner`, running on a server, a VM or someone's own device. It registers with one or more Apps, long-polls them for work and drives a coding tool for runner agents' runs. The wire protocol is `@nocobase/agent-protocol`. The README's "What it does" section (Runners, The claim, Runs, The sweep) and `@nocobase/agent-runner`'s README are the reference.
|
|
4
10
|
|
|
5
11
|
## Registering a runner
|
|
@@ -12,7 +18,7 @@ A runner registers once per App with a one-time registration token (10 minutes):
|
|
|
12
18
|
|
|
13
19
|
Then on the runner's machine: `nocobase-runner register --server <App URL> --token <token>`, and `nocobase-runner start` or `nocobase-runner service install` (launchd on macOS, a systemd user unit on Linux). The install script does all of this in one line; see [Distribution](distribution.md).
|
|
14
20
|
|
|
15
|
-
A runner authenticates afterwards with its own key. Personal runners (`ownerOnly`) run only work their owner started
|
|
21
|
+
A runner authenticates afterwards with its own key. Personal runners (`ownerOnly`) run only work their owner started, and receive its variables like any runner, except those marked "Team runtimes only" (`teamRunnersOnly`): a run that gets one goes to a team runner. Their owner may share them with the team. `nocobase-runner unregister --server <url>` or "Revoke" on the Runtimes page ends a registration.
|
|
16
22
|
|
|
17
23
|
## How work reaches a runner
|
|
18
24
|
|
|
@@ -29,4 +35,12 @@ What to do: upgrade the runner to a version that speaks the App's protocol. An i
|
|
|
29
35
|
|
|
30
36
|
## Coding tools
|
|
31
37
|
|
|
38
|
+
`RunnerSummary.tools` also carries optional advisory capabilities: `models` (model `id` and optional `efforts`), `modelsDetectedAt` (the last discovery attempt), `modelsDetectionStatus` (`detected`, `unsupported`, `failed`) and a fixed brief `modelsDetectionError` on failure. Missing status means capability information is unknown; missing efforts means unknown support, while an empty model list is a successful discovery of no available models. Discovery runs in the background every five minutes, so completed results arrive on a later heartbeat. The App stores these per runner in its existing tools JSON, keeps the same runner visibility and machine-information filtering, and never writes the suggestions into Agent configuration or uses them to authorize or route work. Pi reports provider/model IDs, and its table does not enumerate per-model efforts; OpenCode variants and Codex reasoning efforts do. Claude reports unsupported. Rebuild and serve the updated runner tarballs to enable reporting; upgrading the plugin alone does not update an already installed runner.
|
|
39
|
+
|
|
40
|
+
Capability reports are advisory across independently released runners and Apps: registration and heartbeats discard invalid model entries, individual invalid efforts, malformed detection timestamps and unfamiliar status or error values while still validating the tool's basic fields. A report containing only invalid models does not retain detected status; a valid empty list still means no models were found. Counts and identifier lengths remain bounded, and versioned model ids such as `claude-sonnet-4@20250514` are supported.
|
|
41
|
+
|
|
42
|
+
Run lists and details expose `executions`, one claim snapshot per attempt, with the runner's name, owner and trust, the tool version, requested model, reported `actualModels` and reasoning effort. Retries retain these facts after releasing `runnerId` to null; use the latest snapshot for historical display and the current holder for authorization. Only the primary tool's usage identifies its actual model, and multiple models remain visible. Older runs have no snapshots: their known usage models can be displayed, but their historical machine names and attempt boundaries must not be invented. Applications must forward the fields through custom CLI projections and update their installed UI Library run components.
|
|
43
|
+
|
|
44
|
+
`effort` is requested; `actualEffort` is only a tool report, with `actualEffortSource`, `actualEffortAt` and per-attempt `effortReports`. Show unreported actual values explicitly, never infer from requests or token counts. Import `runForViewer`/`executionForViewer` from `@nocobase/app-plugin-agents/server/tokens` and apply them to custom user-facing run/workload/CLI outputs, using the runner machine rights; `machineHidden` means a generic runtime label, not a fallback to the hostname/id. A projects viewer may provide `seesExecutionMachine` from those same rights. See `docs/execution-history.md` for the report and projection contracts.
|
|
45
|
+
|
|
32
46
|
The runner finds each coding tool on its PATH and reports whether it is signed in. A tool not found, or not signed in, is offered no runs: sign in on the runner's machine as the runner's user (for example `claude` and its login), then wait for the next heartbeat. Which tools a runner is offered work for is chosen on the Runtimes page (`enabledTools`). A model the tool's account cannot use fails the run `modelUnavailable`.
|
|
@@ -35,10 +35,8 @@ agents:
|
|
|
35
35
|
dir: storage/runners/dist # the default; relative to the App root
|
|
36
36
|
channel: stable
|
|
37
37
|
versions: { acme: 0.1.0 } # pin a product instead of the channel's highest
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
maxSteps: 16
|
|
41
|
-
consult: { timeoutMs: 120000, tokenBudget: 200000 }
|
|
38
|
+
npm: # a product with no tarball in dir, named on npm instead (exact versions)
|
|
39
|
+
nocobase-runner: { package: '@nocobase/agent-runner', version: 1.0.0 }
|
|
42
40
|
vectors:
|
|
43
41
|
store: sqlite-vec # the default; pgvector (own PostgreSQL), or false
|
|
44
42
|
path: storage/vectors.sqlite
|
|
@@ -47,14 +45,13 @@ agents:
|
|
|
47
45
|
```
|
|
48
46
|
|
|
49
47
|
- `agents.cli.name` defaults to `agents.app.id`; set it to the App's `nocobase.cli.bin` so runs install and call the same CLI the App serves.
|
|
50
|
-
- `agents.server.enabled: false` leaves online runs to the other instances.
|
|
51
48
|
- `sqlite-vec` is local to an instance and has no build for Alpine (musl), where it reports `SQLITE_VEC_UNSUPPORTED`; an App running several instances, or on Alpine, uses `pgvector`, which takes its own PostgreSQL connection and never the App's.
|
|
52
49
|
- Moving `agents.skills.disk` does not copy what is stored: copy `skills/blobs/` across first.
|
|
53
|
-
- Model services are not configured here; they are added on the Models page or through the API.
|
|
50
|
+
- Model services, for the App's own model calls, are not configured here; they are added on the Models page or through the API.
|
|
54
51
|
- `secrets.keys` (the App's secrets service) must be set before variables or model service keys can be stored. `pnpm nocobase secrets rotate` reseals both stores.
|
|
55
52
|
|
|
56
53
|
## Pages and chat
|
|
57
54
|
|
|
58
|
-
The plugin has no routes of its own. The App routes what `@nocobase/app-plugin-agents/client/routes` exports (`agentsRoute`, `runtimesRoute`, `skillsRoute`, `usageRoute`, `modelsRoute`), each behind a page grant named like its route (`PAGES` in `shared/access`); `modelsRoute` stands behind `agents.services` read. `client/kit` has the pieces for the App's own
|
|
55
|
+
The plugin has no routes of its own. The App routes what `@nocobase/app-plugin-agents/client/routes` exports (`agentsRoute`, `runtimesRoute`, `skillsRoute`, `usageRoute`, `modelsRoute`), each behind a page grant named like its route (`PAGES` in `shared/access`); `modelsRoute` stands behind `agents.services` read. `client/kit` has the pieces for the App's own pages (`RunnerAgentsSection`, the Agent page's list for an App that shows its own agents beside it, `VariablesSection`, `DefaultSkillsSection`, `useRunnerOptions`, `useAgentOptions`), `client/runs` the headless parts of a subject's runs, `client/profile` the person's default chat agent, and `client/config` the business-action catalog context.
|
|
59
56
|
|
|
60
57
|
The chat is headless in `client/chat`: wrap the App's routes in `ChatProvider` and install the UI Library's `agent-chat` block (`yes n | pnpm exec shadcn add @nocobase/agent-chat`) for its UI. The README's "Web UI" section describes every export.
|
|
@@ -8,14 +8,14 @@ On the App's own pages, `VariablesSection` from `client/kit` edits a scope's var
|
|
|
8
8
|
|
|
9
9
|
## The skill library
|
|
10
10
|
|
|
11
|
-
Skills (`agSkills`) follow the open Agent Skills format: a directory with `SKILL.md` (front matter `name` and `description` required) and supporting files under `scripts/`, `references/` and `assets/`. Every save is a version runs get at once; saves name the revision they were made against and conflict with 409 `REVISION_CONFLICT`. Skills are attached to agents, and as defaults to a working directory or a registered scope (`DefaultSkillsSection` in `client/kit`).
|
|
11
|
+
Skills (`agSkills`) follow the open Agent Skills format: a directory with `SKILL.md` (front matter `name` and `description` required) and supporting files under `scripts/`, `references/` and `assets/`. Every save is a version runs get at once; saves name the revision they were made against and conflict with 409 `REVISION_CONFLICT`. Skills are attached to agents, and as defaults to a working directory or a registered scope (`DefaultSkillsSection` in `client/kit`). Agents may run a skill's scripts. File contents go to the Drive disk `agents.skills.disk` names. See the README's "What it does" (Skills) and "Configuration" sections.
|
|
12
12
|
|
|
13
|
-
Skills the App's CLI ships (`nocobase.cli.skills`) reach every
|
|
13
|
+
Skills the App's CLI ships (`nocobase.cli.skills`) reach every run beside the run's own.
|
|
14
14
|
|
|
15
15
|
## Chat attachments
|
|
16
16
|
|
|
17
|
-
A person may send files with a message: each is uploaded first (`POST /api/agents/chatAttachments`, one file, stored through the file plugin), readable only by its uploader until sent, then sent with the message (`attachmentIds`). After that only the conversation's owner and a run of its agent on that conversation read it.
|
|
17
|
+
A person may send files with a message: each is uploaded first (`POST /api/agents/chatAttachments`, one file, stored through the file plugin), readable only by its uploader until sent, then sent with the message (`attachmentIds`). After that only the conversation's owner and a run of its agent on that conversation read it. The agent downloads a file with the CLI (`conversation attachment download <file-id>`). Uploads never sent are purged. Size and count limits are the `CHAT_ATTACHMENT_*` constants in `@nocobase/app-plugin-agents/shared/conversations`, whose header comment is the contract.
|
|
18
18
|
|
|
19
19
|
## Usage, prices and reports
|
|
20
20
|
|
|
21
|
-
Every run records what it used (tokens per model and tool) as it reports. The Usage page (`usageRoute`, `GET /api/agents/usage`) groups it by agent, person, group, subject, day, model, tool or type; who reads `agents.prices` sets prices on its prices sheet, and costs are computed from them. Model calls outside runs (embeddings, reranking, short generations through `
|
|
21
|
+
Every run records what it used (tokens per model and tool) as it reports. The Usage page (`usageRoute`, `GET /api/agents/usage`) groups it by agent, person, group, subject, day, model, tool or type; who reads `agents.prices` sets prices on its prices sheet, and costs are computed from them. Model calls outside runs (embeddings, reranking, short generations through `models.gateway`) appear as "Other model use" (`GET /api/agents/usage/models`). The App's own report pages read `reporting.usage`, `reporting.runFigures`, `reporting.range` and `reporting.modelUsage` from `agentsToken`, and each subject kind's `reports.describe` labels and groups its runs.
|
|
@@ -2,45 +2,46 @@
|
|
|
2
2
|
|
|
3
3
|
## What to test
|
|
4
4
|
|
|
5
|
-
Test what the App builds on the plugin, not the plugin itself. `@nocobase/app-plugin-agents/testing` assembles the services against a test database (`createAgents`, `AGENTS_MIGRATIONS`), mounts the run and runner routes on a test server
|
|
5
|
+
Test what the App builds on the plugin, not the plugin itself. `@nocobase/app-plugin-agents/testing` assembles the services against a test database (`createAgents`, `AGENTS_MIGRATIONS`), and mounts the run and runner routes on a test server; use it with `createAppTest()` from `@nocobase/app-testing/server`.
|
|
6
6
|
|
|
7
7
|
- Each subject kind: `assemble` returns the task, context and working directories for a sample subject, reads only the database, and `sink.onRunFinished` does what the App expects for completed and failed runs.
|
|
8
8
|
- The gate: a person holds exactly their actions; a run holds only the waking person's actions its agent is configured with; an API key's scope narrows a person.
|
|
9
9
|
- Routes a run may call: `findUndeclaredApiRoutes(app)` lists none, each route lists `runToken` in its `security`, and the command manifest for a run shows the command only when the gate allows its `action`.
|
|
10
|
-
- Contributed actions
|
|
10
|
+
- Contributed actions and scopes appear in `GET /api/agents/actions` and `GET /api/agents/vocabulary`, and the App's own agents (`ensureSystem`) in `GET /api/agents`.
|
|
11
11
|
|
|
12
12
|
## Health checks on a running App
|
|
13
13
|
|
|
14
|
-
| Check | How
|
|
15
|
-
| ------------------------- |
|
|
16
|
-
| Runners | `GET /api/agents/runners` (`runtime list`): `status` (`online`, `offline`, `revoked`, `upgrade_required`), `lastSeenAt`, `tools` (installed, version, signed in), `policy`, `updateVersion`, `requiredProtocol`
|
|
17
|
-
| Agents that can take work | `GET /api/agents/available` (`agent list`):
|
|
18
|
-
| Why a run waits | The run's detail and `runs.workload()`: `RUN_WAIT_REASONS` (`noRunnerOnline`, `toolUnavailable`, `noSharedRunner`, `missingFeatures`, `concurrencyFull`, `runnersBusy`, …)
|
|
19
|
-
| A run's history | `GET /api/agents/runs/:runId` and its events (`run get`, `run events`); `failureReason` and `failureDetail`
|
|
20
|
-
|
|
|
21
|
-
| Tarballs served | `GET /api/agents/dist/manifest` signed in; `GET /api/agents/dist/products/<product>/targets/linux-x64?format=env`
|
|
22
|
-
| Vectors | `vectors.status()` on `agentsToken`: availability, store and the `VectorUnavailableCode`
|
|
23
|
-
| The runner itself | `nocobase-runner status`, `nocobase-runner logs -f [--run <id>]`, `~/.nocobase-runner/policy.json`
|
|
14
|
+
| Check | How |
|
|
15
|
+
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
16
|
+
| Runners | `GET /api/agents/runners` (`runtime list`): `status` (`online`, `offline`, `revoked`, `upgrade_required`), `lastSeenAt`, `tools` (installed, version, signed in), `policy`, `updateVersion`, `requiredProtocol` |
|
|
17
|
+
| Agents that can take work | `GET /api/agents` (`agent list-all`): every agent, its state and why it cannot take the caller's work (`unusable`); `GET /api/agents/available` (`agent list`): the enabled ones and whether each can take work now |
|
|
18
|
+
| Why a run waits | The run's detail and `runs.workload()`: `RUN_WAIT_REASONS` (`noRunnerOnline`, `toolUnavailable`, `noSharedRunner`, `missingFeatures`, `secretsNotAllowed`, `concurrencyFull`, `runnersBusy`, …) |
|
|
19
|
+
| A run's history | `GET /api/agents/runs/:runId` and its events (`run get`, `run events`); `failureReason` and `failureDetail` |
|
|
20
|
+
| Model services | `GET /api/agents/models` (what the App's own model calls may use), `POST /api/agents/checkModel` (`model check`) |
|
|
21
|
+
| Tarballs served | `GET /api/agents/dist/manifest` signed in; `GET /api/agents/dist/products/<product>/targets/linux-x64?format=env` |
|
|
22
|
+
| Vectors | `vectors.status()` on `agentsToken`: availability, store and the `VectorUnavailableCode` |
|
|
23
|
+
| The runner itself | `nocobase-runner status`, `nocobase-runner logs -f [--run <id>]`, `~/.nocobase-runner/policy.json` |
|
|
24
|
+
|
|
25
|
+
## Filtering a run transcript
|
|
26
|
+
|
|
27
|
+
`GET /api/agents/runs/:runId/events` accepts repeated `type` query parameters (for example, `?type=text&type=input`). The generated `run events` command exposes repeatable `--type` flags. Values are raw protocol event types, not UI groups: `text`, `thinking`, `toolUse`, `toolResult`, `permission`, `input`, `checkout`, `status`, `error`, `usage`. Omitting the filter returns every type. The service equivalent is `agents.runs.events(runId, afterSeq, limit, types?)`. Filtering happens before pagination; retain the same types with `pageToken` or the returned `lastSeq`. These API/CLI filters are exact and do not automatically include errors. A UI that summarizes hidden events must load the complete history and filter locally.
|
|
24
28
|
|
|
25
29
|
## Troubleshooting
|
|
26
30
|
|
|
27
|
-
| Symptom
|
|
28
|
-
|
|
|
29
|
-
| Runner shows offline
|
|
30
|
-
| Runner shows `upgrade_required`
|
|
31
|
-
| Runs queue with `toolUnavailable` or fail `toolAuth`
|
|
32
|
-
| Runs queue with `noRunnerOnline`, `noSharedRunner` or `missingFeatures`
|
|
33
|
-
| Run fails `policyRefused`
|
|
34
|
-
| Run fails `modelUnavailable`
|
|
35
|
-
|
|
|
36
|
-
|
|
|
37
|
-
| Run fails `
|
|
38
|
-
|
|
|
39
|
-
|
|
|
40
|
-
| `
|
|
41
|
-
| `
|
|
42
|
-
| `
|
|
43
|
-
| `
|
|
44
|
-
| `REGISTRATION_TOKEN_INVALID` / `DOWNLOAD_TOKEN_INVALID` | The token expired (10 minutes for registration, 30 for downloads), was used up, or is of the other kind; mint a new one. |
|
|
45
|
-
| `VARIABLES_MISSING` | Not this plugin: a deployment refused because a required deployment variable is unset. Set it where the deploying plugin keeps variables; agent variables never cause it. |
|
|
46
|
-
| `SQLITE_VEC_UNSUPPORTED` | No sqlite-vec build for the platform (Alpine/musl); configure `agents.vectors.store: pgvector`. |
|
|
31
|
+
| Symptom | Cause and fix |
|
|
32
|
+
| ----------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
33
|
+
| Runner shows offline | No heartbeat for 150 s. Check `nocobase-runner status` and `logs`, that its service is installed (`nocobase-runner service install`) and that it reaches the App's URL. `RUNNER_KEY_INVALID` or `RUNNER_REVOKED`: register it again with a new token. `RUNNER_OWNER_DISABLED`: its owner can no longer act (`people.provide` `inactive`). |
|
|
34
|
+
| Runner shows `upgrade_required` | It speaks a protocol outside the App's range. Rebuild and remount the runner tarball from the App's `@nocobase/agent-runner`, then `nocobase-runner update` (an npm-installed runner: `npm install -g @nocobase/agent-runner@<version>`); one that reports no product: reinstall with the one-line install. See [Runners](runners.md). |
|
|
35
|
+
| Runs queue with `toolUnavailable` or fail `toolAuth` | The agent's coding tool is not installed, not enabled for that runner, or not signed in. Sign in on the runner's machine as the runner's user and check the Runtimes page's Tools tab. |
|
|
36
|
+
| Runs queue with `noRunnerOnline`, `noSharedRunner` or `missingFeatures` | No online runner fits: only other people's personal runners have the agent, or the runner is too old for what the run needs (skills, secrets, mounts). Add or share a runner, or update it. |
|
|
37
|
+
| Run fails `policyRefused` | The runner owner's `policy.json` excludes the agent, subject or repository. Retried on another runner; change the policy on the machine if this one should take it. |
|
|
38
|
+
| Run fails `modelUnavailable` | The tool's account on that runner cannot use the model. The runner is marked so and offered none of that model's runs until it reports the tool's models differently; sign in with an account that has the model, or use another agent. |
|
|
39
|
+
| Run fails `cliUnavailable` | The run's CLI could not be installed: no served tarball for the runner's platform (`PLATFORM_UNSUPPORTED`), or `agents.cli.name` differs from the App's `nocobase.cli.bin`. Build and mount the CLI tarballs. |
|
|
40
|
+
| Run fails `setupFailed` | `assemble`, a brief section or a mount threw three times; read the server log for the throw. |
|
|
41
|
+
| Run fails `queuedExpired` | Waited longer than the subject's `queuedExpiryMs`; see why it waited. |
|
|
42
|
+
| `SECRETS_KEY_MISSING` (503) | `secrets.keys` is not configured; set it before storing variables or model service keys. |
|
|
43
|
+
| `SCOPED_KEY_FORBIDDEN` | A scoped API key called a route outside the settings-only ones; use a session or an unscoped key. |
|
|
44
|
+
| `PLATFORM_UNSUPPORTED` / `PRODUCT_NOT_FOUND` from the install script | The product or the platform is not in `agents.dist.dir/<channel>/`; check the mount and the `--targets` the build used. |
|
|
45
|
+
| `REGISTRATION_TOKEN_INVALID` / `DOWNLOAD_TOKEN_INVALID` | The token expired (10 minutes for registration, 30 for downloads), was used up, or is of the other kind; mint a new one. |
|
|
46
|
+
| `VARIABLES_MISSING` | Not this plugin: a deployment refused because a required deployment variable is unset. Set it where the deploying plugin keeps variables; agent variables never cause it. |
|
|
47
|
+
| `SQLITE_VEC_UNSUPPORTED` | No sqlite-vec build for the platform (Alpine/musl); configure `agents.vectors.store: pgvector`. |
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"settings-section.d.ts","sourceRoot":"","sources":["../../../client/chat/settings-section.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAsB1C,wBAAgB,mBAAmB,CAAC,EAClC,SAAS,GACV,EAAE;IACD,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;CAC7B,GAAG,YAAY,CAoGf"}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
/**
|
|
3
|
-
* The system default chat agent, at the top of the agents page: new conversations go to it when a person has no
|
|
4
|
-
* default of their own (and a conversation may switch to it while its agent is offline). Those who manage agents
|
|
5
|
-
* change it with the agent picker as a form field (avatar with availability, the menu grouped by type, "None" first);
|
|
6
|
-
* everyone else reads its name.
|
|
7
|
-
*/
|
|
8
|
-
import { useTranslation } from '@nocobase/i18n/client';
|
|
9
|
-
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
|
|
10
|
-
import { agentsKeys } from '../api/keys.js';
|
|
11
|
-
import { AgentPicker } from '../components/agent-picker.js';
|
|
12
|
-
import { Field, FieldContent, FieldDescription, FieldGroup, FieldLabel, FieldTitle, } from '../components/ui/field.js';
|
|
13
|
-
import { Skeleton } from '../components/ui/skeleton.js';
|
|
14
|
-
import { useAgentPickerLabels } from '../hooks/use-agent-picker-labels.js';
|
|
15
|
-
import { useAgentsApi } from '../hooks/use-agents-api.js';
|
|
16
|
-
import { useNotify } from '../hooks/use-notify.js';
|
|
17
|
-
import { useAgentText } from '../hooks/use-vocabulary.js';
|
|
18
|
-
import { pickerAgentOf } from '../lib/agents.js';
|
|
19
|
-
import { chatKeys } from './keys.js';
|
|
20
|
-
import { useChatApi } from './use-chat.js';
|
|
21
|
-
export function ChatSettingsSection({ canManage, }) {
|
|
22
|
-
const { t } = useTranslation();
|
|
23
|
-
const text = useAgentText();
|
|
24
|
-
const chat = useChatApi();
|
|
25
|
-
const agentsApi = useAgentsApi();
|
|
26
|
-
const notify = useNotify();
|
|
27
|
-
const queryClient = useQueryClient();
|
|
28
|
-
const settings = useQuery({
|
|
29
|
-
queryKey: chatKeys.settings,
|
|
30
|
-
queryFn: () => chat.settings(),
|
|
31
|
-
});
|
|
32
|
-
const agents = useQuery({
|
|
33
|
-
queryKey: agentsKeys.agents,
|
|
34
|
-
queryFn: () => agentsApi.agents(),
|
|
35
|
-
});
|
|
36
|
-
const save = useMutation({
|
|
37
|
-
mutationFn: (defaultAgentId) => chat.updateSettings({ defaultAgentId }),
|
|
38
|
-
onSuccess: (next) => {
|
|
39
|
-
queryClient.setQueryData(chatKeys.settings, next);
|
|
40
|
-
void queryClient.invalidateQueries({ queryKey: chatKeys.agents });
|
|
41
|
-
notify.success(t('chat.settings.saved'));
|
|
42
|
-
},
|
|
43
|
-
onError: (error) => notify.error(error),
|
|
44
|
-
});
|
|
45
|
-
const id = 'ag-chat-default';
|
|
46
|
-
const current = settings.data?.defaultAgentId ?? null;
|
|
47
|
-
const labels = useAgentPickerLabels(t('chat.settings.title'));
|
|
48
|
-
// The picker's agents, as the chat lists them.
|
|
49
|
-
const options = (agents.data ?? [])
|
|
50
|
-
.filter((agent) => !agent.archivedAt)
|
|
51
|
-
.map((agent) => pickerAgentOf(agent, text.name(agent), agent.id === current));
|
|
52
|
-
const currentName = current === null
|
|
53
|
-
? t('chat.settings.none')
|
|
54
|
-
: (options.find((option) => option.id === current)?.name ??
|
|
55
|
-
t('chat.settings.unknown'));
|
|
56
|
-
let control;
|
|
57
|
-
if (!settings.data || !agents.data)
|
|
58
|
-
control = _jsx(Skeleton, { className: 'h-8 w-full sm:w-80' });
|
|
59
|
-
else if (!canManage)
|
|
60
|
-
control = (_jsx("p", { className: 'text-sm font-medium sm:max-w-80 sm:text-right', children: currentName }));
|
|
61
|
-
else
|
|
62
|
-
control = (_jsx(AgentPicker, { id: id, agents: options,
|
|
63
|
-
// None, or an agent the list does not hold, reads as such.
|
|
64
|
-
value: current, labels: { ...labels, unknown: t('chat.settings.unknown') }, noneOption: {
|
|
65
|
-
label: t('chat.settings.none'),
|
|
66
|
-
onSelect: () => {
|
|
67
|
-
if (current !== null)
|
|
68
|
-
save.mutate(null);
|
|
69
|
-
},
|
|
70
|
-
}, onSelect: (agentId) => {
|
|
71
|
-
if (agentId !== current)
|
|
72
|
-
save.mutate(agentId);
|
|
73
|
-
}, disabled: save.isPending, align: 'end', className: 'sm:w-80', "data-testid": 'chat-default-agent' }));
|
|
74
|
-
return (_jsx("section", { className: 'rounded-lg border p-4', "aria-labelledby": `${id}-title`, "data-testid": 'chat-settings', children: _jsx(FieldGroup, { children: _jsxs(Field, { orientation: 'responsive', children: [_jsxs(FieldContent, { children: [canManage ? (_jsx(FieldLabel, { id: `${id}-title`, htmlFor: id, children: t('chat.settings.title') })) : (_jsx(FieldTitle, { id: `${id}-title`, children: t('chat.settings.title') })), _jsx(FieldDescription, { children: t('chat.settings.description') })] }), control] }) }) }));
|
|
75
|
-
}
|
|
76
|
-
//# sourceMappingURL=settings-section.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"settings-section.js","sourceRoot":"","sources":["../../../client/chat/settings-section.tsx"],"names":[],"mappings":";AAAA;;;;;GAKG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAI9E,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EACL,KAAK,EACL,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,UAAU,GACX,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,UAAU,mBAAmB,CAAC,EAClC,SAAS,GAGV;IACC,MAAM,EAAE,CAAC,EAAE,GAAG,cAAc,EAAE,CAAC;IAC/B,MAAM,IAAI,GAAG,YAAY,EAAE,CAAC;IAC5B,MAAM,IAAI,GAAG,UAAU,EAAE,CAAC;IAC1B,MAAM,SAAS,GAAG,YAAY,EAAE,CAAC;IACjC,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,MAAM,WAAW,GAAG,cAAc,EAAE,CAAC;IACrC,MAAM,QAAQ,GAAG,QAAQ,CAAC;QACxB,QAAQ,EAAE,QAAQ,CAAC,QAAQ;QAC3B,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE;KAC/B,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,QAAQ,CAAC;QACtB,QAAQ,EAAE,UAAU,CAAC,MAAM;QAC3B,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,MAAM,EAAE;KAClC,CAAC,CAAC;IACH,MAAM,IAAI,GAAG,WAAW,CAAC;QACvB,UAAU,EAAE,CAAC,cAA6B,EAAE,EAAE,CAC5C,IAAI,CAAC,cAAc,CAAC,EAAE,cAAc,EAAE,CAAC;QACzC,SAAS,EAAE,CAAC,IAAI,EAAE,EAAE;YAClB,WAAW,CAAC,YAAY,CAAC,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;YAClD,KAAK,WAAW,CAAC,iBAAiB,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;YAClE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC;QAC3C,CAAC;QACD,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC;KACxC,CAAC,CAAC;IACH,MAAM,EAAE,GAAG,iBAAiB,CAAC;IAC7B,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,EAAE,cAAc,IAAI,IAAI,CAAC;IACtD,MAAM,MAAM,GAAG,oBAAoB,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC;IAC9D,+CAA+C;IAC/C,MAAM,OAAO,GAAgB,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC;SAC7C,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC;SACpC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CACb,aAAa,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,EAAE,KAAK,OAAO,CAAC,CAC7D,CAAC;IACJ,MAAM,WAAW,GACf,OAAO,KAAK,IAAI;QACd,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC;QACzB,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,KAAK,OAAO,CAAC,EAAE,IAAI;YACtD,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC;IAElC,IAAI,OAAqB,CAAC;IAC1B,IAAI,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI;QAChC,OAAO,GAAG,KAAC,QAAQ,IAAC,SAAS,EAAC,oBAAoB,GAAG,CAAC;SACnD,IAAI,CAAC,SAAS;QACjB,OAAO,GAAG,CACR,YAAG,SAAS,EAAC,+CAA+C,YACzD,WAAW,GACV,CACL,CAAC;;QAEF,OAAO,GAAG,CACR,KAAC,WAAW,IACV,EAAE,EAAE,EAAE,EACN,MAAM,EAAE,OAAO;YACf,2DAA2D;YAC3D,KAAK,EAAE,OAAO,EACd,MAAM,EAAE,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC,uBAAuB,CAAC,EAAE,EAC1D,UAAU,EAAE;gBACV,KAAK,EAAE,CAAC,CAAC,oBAAoB,CAAC;gBAC9B,QAAQ,EAAE,GAAG,EAAE;oBACb,IAAI,OAAO,KAAK,IAAI;wBAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;gBAC1C,CAAC;aACF,EACD,QAAQ,EAAE,CAAC,OAAO,EAAE,EAAE;gBACpB,IAAI,OAAO,KAAK,OAAO;oBAAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YAChD,CAAC,EACD,QAAQ,EAAE,IAAI,CAAC,SAAS,EACxB,KAAK,EAAC,KAAK,EACX,SAAS,EAAC,SAAS,iBACP,oBAAoB,GAChC,CACH,CAAC;IAEJ,OAAO,CACL,kBACE,SAAS,EAAC,uBAAuB,qBAChB,GAAG,EAAE,QAAQ,iBAClB,eAAe,YAE3B,KAAC,UAAU,cACT,MAAC,KAAK,IAAC,WAAW,EAAC,YAAY,aAC7B,MAAC,YAAY,eACV,SAAS,CAAC,CAAC,CAAC,CACX,KAAC,UAAU,IAAC,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,YACvC,CAAC,CAAC,qBAAqB,CAAC,GACd,CACd,CAAC,CAAC,CAAC,CACF,KAAC,UAAU,IAAC,EAAE,EAAE,GAAG,EAAE,QAAQ,YAC1B,CAAC,CAAC,qBAAqB,CAAC,GACd,CACd,EACD,KAAC,gBAAgB,cACd,CAAC,CAAC,2BAA2B,CAAC,GACd,IACN,EACd,OAAO,IACF,GACG,GACL,CACX,CAAC;AACJ,CAAC"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Fields the new-agent dialog and the agent page share: the coding tool (with how many runners offer it now), an
|
|
3
|
-
* entry's reasoning effort, and the business actions the application lets an agent be given.
|
|
4
|
-
*/
|
|
5
|
-
import { type AgentTool } from '@nocobase/agent-protocol';
|
|
6
|
-
import type { ReactElement } from 'react';
|
|
7
|
-
import { type AgentType } from '../../shared/agents.js';
|
|
8
|
-
import type { RunnerSummary } from '../../shared/runners.js';
|
|
9
|
-
export declare function ToolSelect({ id, value, runners, disabled, ariaLabel, onChange, }: {
|
|
10
|
-
readonly id: string;
|
|
11
|
-
readonly value: AgentTool;
|
|
12
|
-
/** For the count of runners each tool can run on now; none while loading. */
|
|
13
|
-
readonly runners: readonly RunnerSummary[] | undefined;
|
|
14
|
-
readonly disabled?: boolean;
|
|
15
|
-
/** For a select with no visible label. */
|
|
16
|
-
readonly ariaLabel?: string;
|
|
17
|
-
readonly onChange: (tool: AgentTool) => void;
|
|
18
|
-
}): ReactElement;
|
|
19
|
-
/** An entry's reasoning effort, among those its tool or service takes (`effortsFor`). */
|
|
20
|
-
export declare function EffortSelect({ id, efforts, value, disabled, ariaLabel, onChange, }: {
|
|
21
|
-
readonly id: string;
|
|
22
|
-
readonly efforts: readonly string[];
|
|
23
|
-
/** Empty: the tool's or provider's default. */
|
|
24
|
-
readonly value: string;
|
|
25
|
-
readonly disabled?: boolean;
|
|
26
|
-
/** For a select with no visible label. */
|
|
27
|
-
readonly ariaLabel?: string;
|
|
28
|
-
readonly onChange: (effort: string) => void;
|
|
29
|
-
}): ReactElement;
|
|
30
|
-
/**
|
|
31
|
-
* The business actions as checkboxes, grouped as the application groups them, with its titles. Actions meant for
|
|
32
|
-
* another type of agent (`AgentActionOption.types`) are left out. `detailed` (the agent page) adds each action's
|
|
33
|
-
* description, and lists the actions that are never granted to an agent greyed out with the reason, so people see the
|
|
34
|
-
* boundary; elsewhere those are left out.
|
|
35
|
-
*/
|
|
36
|
-
export declare function ActionCheckboxes({ idPrefix, value, type, disabled, detailed, onChange, }: {
|
|
37
|
-
readonly idPrefix: string;
|
|
38
|
-
readonly value: readonly string[];
|
|
39
|
-
/** The agent's type; every action when absent. */
|
|
40
|
-
readonly type?: AgentType;
|
|
41
|
-
readonly disabled?: boolean;
|
|
42
|
-
readonly detailed?: boolean;
|
|
43
|
-
readonly onChange: (actions: string[]) => void;
|
|
44
|
-
}): ReactElement;
|
|
45
|
-
//# sourceMappingURL=agent-fields.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agent-fields.d.ts","sourceRoot":"","sources":["../../../client/components/agent-fields.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAEvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,EAA0B,KAAK,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAChF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAkD7D,wBAAgB,UAAU,CAAC,EACzB,EAAE,EACF,KAAK,EACL,OAAO,EACP,QAAQ,EACR,SAAS,EACT,QAAQ,GACT,EAAE;IACD,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,6EAA6E;IAC7E,QAAQ,CAAC,OAAO,EAAE,SAAS,aAAa,EAAE,GAAG,SAAS,CAAC;IACvD,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,0CAA0C;IAC1C,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;CAC9C,GAAG,YAAY,CAiCf;AAED,yFAAyF;AACzF,wBAAgB,YAAY,CAAC,EAC3B,EAAE,EACF,OAAO,EACP,KAAK,EACL,QAAQ,EACR,SAAS,EACT,QAAQ,GACT,EAAE;IACD,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,+CAA+C;IAC/C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,0CAA0C;IAC1C,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7C,GAAG,YAAY,CAgCf;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,QAAQ,GACT,EAAE;IACD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,kDAAkD;IAClD,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC;IAC1B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;CAChD,GAAG,YAAY,CA2Ff"}
|