@nocobase/app-plugin-agents 0.1.0-beta.2 → 0.1.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (194) hide show
  1. package/CHANGELOG.md +123 -0
  2. package/README.md +30 -4
  3. package/dist/client/api/client.d.ts +3 -1
  4. package/dist/client/api/client.d.ts.map +1 -1
  5. package/dist/client/api/client.js +5 -1
  6. package/dist/client/api/client.js.map +1 -1
  7. package/dist/client/components/model-entries.d.ts +12 -3
  8. package/dist/client/components/model-entries.d.ts.map +1 -1
  9. package/dist/client/components/model-entries.js +41 -19
  10. package/dist/client/components/model-entries.js.map +1 -1
  11. package/dist/client/components/variables/variable-dialogs.d.ts +3 -2
  12. package/dist/client/components/variables/variable-dialogs.d.ts.map +1 -1
  13. package/dist/client/components/variables/variable-dialogs.js +18 -8
  14. package/dist/client/components/variables/variable-dialogs.js.map +1 -1
  15. package/dist/client/components/variables/variables-panel.d.ts.map +1 -1
  16. package/dist/client/components/variables/variables-panel.js +3 -1
  17. package/dist/client/components/variables/variables-panel.js.map +1 -1
  18. package/dist/client/lib/agents.d.ts +5 -0
  19. package/dist/client/lib/agents.d.ts.map +1 -1
  20. package/dist/client/lib/agents.js +22 -0
  21. package/dist/client/lib/agents.js.map +1 -1
  22. package/dist/client/lib/model-suggestions.d.ts +28 -0
  23. package/dist/client/lib/model-suggestions.d.ts.map +1 -0
  24. package/dist/client/lib/model-suggestions.js +44 -0
  25. package/dist/client/lib/model-suggestions.js.map +1 -0
  26. package/dist/client/locales/en-US.d.ts +14 -0
  27. package/dist/client/locales/en-US.d.ts.map +1 -1
  28. package/dist/client/locales/en-US.js +14 -0
  29. package/dist/client/locales/en-US.js.map +1 -1
  30. package/dist/client/locales/runtimes.en-US.d.ts +6 -0
  31. package/dist/client/locales/runtimes.en-US.d.ts.map +1 -1
  32. package/dist/client/locales/runtimes.en-US.js +6 -0
  33. package/dist/client/locales/runtimes.en-US.js.map +1 -1
  34. package/dist/client/locales/runtimes.zh-CN.d.ts.map +1 -1
  35. package/dist/client/locales/runtimes.zh-CN.js +6 -0
  36. package/dist/client/locales/runtimes.zh-CN.js.map +1 -1
  37. package/dist/client/locales/zh-CN.d.ts.map +1 -1
  38. package/dist/client/locales/zh-CN.js +14 -0
  39. package/dist/client/locales/zh-CN.js.map +1 -1
  40. package/dist/client/pages/agents/index.d.ts.map +1 -1
  41. package/dist/client/pages/agents/index.js +6 -6
  42. package/dist/client/pages/agents/index.js.map +1 -1
  43. package/dist/client/pages/runtimes/runner-sheet.js +11 -3
  44. package/dist/client/pages/runtimes/runner-sheet.js.map +1 -1
  45. package/dist/database/migrations/.manifest.json +20 -0
  46. package/dist/database/migrations/202610090002_ag_create_run_requests.d.ts +10 -0
  47. package/dist/database/migrations/202610090002_ag_create_run_requests.d.ts.map +1 -0
  48. package/dist/database/migrations/202610090002_ag_create_run_requests.js +105 -0
  49. package/dist/database/migrations/202610090002_ag_create_run_requests.js.map +1 -0
  50. package/dist/database/migrations/202610090003_ag_add_execution_history.d.ts +4 -0
  51. package/dist/database/migrations/202610090003_ag_add_execution_history.d.ts.map +1 -0
  52. package/dist/database/migrations/202610090003_ag_add_execution_history.js +17 -0
  53. package/dist/database/migrations/202610090003_ag_add_execution_history.js.map +1 -0
  54. package/dist/database/migrations/202610090004_ag_add_runner_workspace_usage.d.ts +9 -0
  55. package/dist/database/migrations/202610090004_ag_add_runner_workspace_usage.d.ts.map +1 -0
  56. package/dist/database/migrations/202610090004_ag_add_runner_workspace_usage.js +22 -0
  57. package/dist/database/migrations/202610090004_ag_add_runner_workspace_usage.js.map +1 -0
  58. package/dist/database/migrations/202610090005_ag_add_runner_variables.d.ts +10 -0
  59. package/dist/database/migrations/202610090005_ag_add_runner_variables.d.ts.map +1 -0
  60. package/dist/database/migrations/202610090005_ag_add_runner_variables.js +36 -0
  61. package/dist/database/migrations/202610090005_ag_add_runner_variables.js.map +1 -0
  62. package/dist/database/migrations/202610100001_ag_index_run_event_types.d.ts +4 -0
  63. package/dist/database/migrations/202610100001_ag_index_run_event_types.d.ts.map +1 -0
  64. package/dist/database/migrations/202610100001_ag_index_run_event_types.js +17 -0
  65. package/dist/database/migrations/202610100001_ag_index_run_event_types.js.map +1 -0
  66. package/dist/package.json +1 -1
  67. package/dist/server/composition.d.ts +6 -1
  68. package/dist/server/composition.d.ts.map +1 -1
  69. package/dist/server/composition.js +6 -1
  70. package/dist/server/composition.js.map +1 -1
  71. package/dist/server/core/agents/agent.service.d.ts.map +1 -1
  72. package/dist/server/core/agents/agent.service.js +4 -1
  73. package/dist/server/core/agents/agent.service.js.map +1 -1
  74. package/dist/server/core/consultations/consultation.service.d.ts.map +1 -1
  75. package/dist/server/core/consultations/consultation.service.js +5 -2
  76. package/dist/server/core/consultations/consultation.service.js.map +1 -1
  77. package/dist/server/core/conversations/conversation.service.d.ts.map +1 -1
  78. package/dist/server/core/conversations/conversation.service.js +5 -5
  79. package/dist/server/core/conversations/conversation.service.js.map +1 -1
  80. package/dist/server/core/runs/claim.d.ts +4 -1
  81. package/dist/server/core/runs/claim.d.ts.map +1 -1
  82. package/dist/server/core/runs/claim.js +46 -2
  83. package/dist/server/core/runs/claim.js.map +1 -1
  84. package/dist/server/core/runs/execution-view.d.ts +10 -0
  85. package/dist/server/core/runs/execution-view.d.ts.map +1 -0
  86. package/dist/server/core/runs/execution-view.js +25 -0
  87. package/dist/server/core/runs/execution-view.js.map +1 -0
  88. package/dist/server/core/runs/execution.d.ts +13 -0
  89. package/dist/server/core/runs/execution.d.ts.map +1 -0
  90. package/dist/server/core/runs/execution.js +85 -0
  91. package/dist/server/core/runs/execution.js.map +1 -0
  92. package/dist/server/core/runs/index.d.ts +4 -2
  93. package/dist/server/core/runs/index.d.ts.map +1 -1
  94. package/dist/server/core/runs/index.js +3 -1
  95. package/dist/server/core/runs/index.js.map +1 -1
  96. package/dist/server/core/runs/lifecycle.d.ts.map +1 -1
  97. package/dist/server/core/runs/lifecycle.js +29 -2
  98. package/dist/server/core/runs/lifecycle.js.map +1 -1
  99. package/dist/server/core/runs/ports.d.ts +20 -0
  100. package/dist/server/core/runs/ports.d.ts.map +1 -1
  101. package/dist/server/core/runs/ports.js.map +1 -1
  102. package/dist/server/core/runs/preview.d.ts.map +1 -1
  103. package/dist/server/core/runs/preview.js +2 -0
  104. package/dist/server/core/runs/preview.js.map +1 -1
  105. package/dist/server/core/runs/run-requests.d.ts +217 -0
  106. package/dist/server/core/runs/run-requests.d.ts.map +1 -0
  107. package/dist/server/core/runs/run-requests.js +471 -0
  108. package/dist/server/core/runs/run-requests.js.map +1 -0
  109. package/dist/server/core/runs/run.service.d.ts +62 -7
  110. package/dist/server/core/runs/run.service.d.ts.map +1 -1
  111. package/dist/server/core/runs/run.service.js +209 -38
  112. package/dist/server/core/runs/run.service.js.map +1 -1
  113. package/dist/server/core/runs/run.store.d.ts +7 -1
  114. package/dist/server/core/runs/run.store.d.ts.map +1 -1
  115. package/dist/server/core/runs/run.store.js +33 -0
  116. package/dist/server/core/runs/run.store.js.map +1 -1
  117. package/dist/server/core/runs/runner-view.d.ts +4 -3
  118. package/dist/server/core/runs/runner-view.d.ts.map +1 -1
  119. package/dist/server/core/runs/runner-view.js +7 -3
  120. package/dist/server/core/runs/runner-view.js.map +1 -1
  121. package/dist/server/core/runs/transitions.d.ts.map +1 -1
  122. package/dist/server/core/runs/transitions.js +3 -0
  123. package/dist/server/core/runs/transitions.js.map +1 -1
  124. package/dist/server/core/variables/variable.service.d.ts +18 -3
  125. package/dist/server/core/variables/variable.service.d.ts.map +1 -1
  126. package/dist/server/core/variables/variable.service.js +130 -38
  127. package/dist/server/core/variables/variable.service.js.map +1 -1
  128. package/dist/server/kernel/errors.d.ts +1 -1
  129. package/dist/server/kernel/errors.d.ts.map +1 -1
  130. package/dist/server/kernel/errors.js +1 -0
  131. package/dist/server/kernel/errors.js.map +1 -1
  132. package/dist/server/kernel/events.d.ts +23 -8
  133. package/dist/server/kernel/events.d.ts.map +1 -1
  134. package/dist/server/kernel/events.js.map +1 -1
  135. package/dist/server/routes/admin.d.ts.map +1 -1
  136. package/dist/server/routes/admin.js +36 -12
  137. package/dist/server/routes/admin.js.map +1 -1
  138. package/dist/server/routes/index.d.ts.map +1 -1
  139. package/dist/server/routes/index.js +5 -0
  140. package/dist/server/routes/index.js.map +1 -1
  141. package/dist/server/routes/run-requests.d.ts +6 -0
  142. package/dist/server/routes/run-requests.d.ts.map +1 -0
  143. package/dist/server/routes/run-requests.js +216 -0
  144. package/dist/server/routes/run-requests.js.map +1 -0
  145. package/dist/server/routes/runners/runner.d.ts.map +1 -1
  146. package/dist/server/routes/runners/runner.js +21 -3
  147. package/dist/server/routes/runners/runner.js.map +1 -1
  148. package/dist/server/routes/schemas.d.ts +29 -2
  149. package/dist/server/routes/schemas.d.ts.map +1 -1
  150. package/dist/server/routes/schemas.js +208 -2
  151. package/dist/server/routes/schemas.js.map +1 -1
  152. package/dist/server/runners/index.d.ts +1 -0
  153. package/dist/server/runners/index.d.ts.map +1 -1
  154. package/dist/server/runners/index.js +1 -0
  155. package/dist/server/runners/index.js.map +1 -1
  156. package/dist/server/runners/runner.service.d.ts +3 -3
  157. package/dist/server/runners/runner.service.d.ts.map +1 -1
  158. package/dist/server/runners/runner.service.js +13 -8
  159. package/dist/server/runners/runner.service.js.map +1 -1
  160. package/dist/server/runners/runner.store.d.ts +7 -1
  161. package/dist/server/runners/runner.store.d.ts.map +1 -1
  162. package/dist/server/runners/runner.store.js +69 -4
  163. package/dist/server/runners/runner.store.js.map +1 -1
  164. package/dist/server/runners/sweeper.d.ts +5 -0
  165. package/dist/server/runners/sweeper.d.ts.map +1 -1
  166. package/dist/server/runners/sweeper.js +4 -2
  167. package/dist/server/runners/sweeper.js.map +1 -1
  168. package/dist/server/runners/workspaces.d.ts +30 -0
  169. package/dist/server/runners/workspaces.d.ts.map +1 -0
  170. package/dist/server/runners/workspaces.js +135 -0
  171. package/dist/server/runners/workspaces.js.map +1 -0
  172. package/dist/server/tokens.d.ts +3 -2
  173. package/dist/server/tokens.d.ts.map +1 -1
  174. package/dist/server/tokens.js +1 -0
  175. package/dist/server/tokens.js.map +1 -1
  176. package/dist/server/vendor/just-bash.js +117 -117
  177. package/dist/shared/agents.d.ts +2 -0
  178. package/dist/shared/agents.d.ts.map +1 -1
  179. package/dist/shared/agents.js.map +1 -1
  180. package/dist/shared/runners.d.ts +47 -1
  181. package/dist/shared/runners.d.ts.map +1 -1
  182. package/dist/shared/runners.js.map +1 -1
  183. package/dist/shared/runs.d.ts +123 -0
  184. package/dist/shared/runs.d.ts.map +1 -1
  185. package/dist/shared/runs.js +15 -0
  186. package/dist/shared/runs.js.map +1 -1
  187. package/dist/shared/variables.d.ts +10 -0
  188. package/dist/shared/variables.d.ts.map +1 -1
  189. package/dist/shared/variables.js +5 -1
  190. package/dist/shared/variables.js.map +1 -1
  191. package/package.json +11 -11
  192. package/skills/nocobase-app-plugin-agents/references/extension-points.md +3 -2
  193. package/skills/nocobase-app-plugin-agents/references/runners.md +8 -0
  194. package/skills/nocobase-app-plugin-agents/references/verification-and-troubleshooting.md +4 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,128 @@
1
1
  # @nocobase/app-plugin-agents
2
2
 
3
+ ## 0.1.0-beta.4
4
+
5
+ ### Minor Changes
6
+
7
+ - 5aae93b: Add optional raw event type filtering to run event queries and the generated CLI. Apply filters before sequence pagination while preserving the default unfiltered history and existing access checks.
8
+
9
+ Add a reversible run/type/sequence index so following a sparse event type does not repeatedly scan unrelated events in long runs. Pagination cursors retain their existing meaning.
10
+
11
+ Document complete transcript loading, scoped filter preferences, and filter label translation in the UI Library catalog.
12
+
13
+ - c796cb9: Remove the Settings and Dev route surfaces. `@nocobase/app-client` no longer exports `defineSettingsRoutes()`, `defineDevRoutes()`, `isAppClientSettingsRouteGroup()`, `isAppClientDevRouteGroup()` or their definition, contribution and registered-route types, and the resolved runtime no longer carries `settingsRouteTree`, `devRouteTree`, `settings`, `settingGroups`, `devRoutes` or `devRouteGroups`. `AppClientSettingsRouteNavigation` is renamed `AppClientRouteNavigation` and `AppClientSettingIcon` is renamed `AppClientRouteIcon`. A contribution to any parent other than `app` now fails registration with a message that names `defineAppRoutes()`. Plugins contribute no settings or dev pages; an application that wants a configuration page declares it with `defineAppRoutes()` in its own navigation, for example under a Settings group.
14
+
15
+ The default and examples templates drop the settings layout, the `/settings/*` route, the dev route plumbing, and the Settings and Inbox buttons in the header; the `/inbox` page and the inbox block stay. The examples template no longer registers `@nocobase/app-plugin-departments-example`, which is removed. Upgrading an application means removing `defineSettingsRoutes([])` from `client/routes.ts`, the `settingsRouteTree` and `devRouteTree` props passed to `AppRouter`, and any settings layout it kept, and moving its own settings pages to `defineAppRoutes()`. Every package that depends on or peers with `@nocobase/app-client` is released again so that its published range accepts `3.0.0-beta.0`.
16
+
17
+ ### Patch Changes
18
+
19
+ - c796cb9: Remove the AI employee packages from the repository
20
+
21
+ `@nocobase/app-plugin-ai-employee`, `@nocobase/ai-employee` and `@nocobase/app-plugin-ai-employee-example` were already deprecated and no template installed them; they are now deleted and will not be released again. The Default and Examples templates drop `@nocobase/ai-employee-avatars`, which only the plugin's avatars used.
22
+
23
+ Generated plugins' `AGENTS.md` and the copies shipped with existing plugins no longer list `@nocobase/ai-employee` among the identity-sensitive packages. The HTTP API references in the application development Skill use other plugins for their examples, and the upgrade Skill tells an application that still depends on the removed packages to review their usage before removing them, because the runtime will move past what their peer ranges accept.
24
+
25
+ `pnpm build` no longer copies `ai/skills` into `dist/ai/skills`. The AI employee plugin was the only reader of that directory; an application that keeps Skills there for another purpose has to copy them itself, for example from a build hook.
26
+
27
+ - Updated dependencies [c796cb9]
28
+ - Updated dependencies [c796cb9]
29
+ - Updated dependencies [c796cb9]
30
+ - Updated dependencies [c796cb9]
31
+ - Updated dependencies [98e79a5]
32
+ - Updated dependencies [eea95a7]
33
+ - Updated dependencies [fb7b576]
34
+ - @nocobase/app-cli@1.0.0-beta.17
35
+ - @nocobase/app-server@2.0.0-beta.3
36
+ - @nocobase/app-plugin-authentication@2.0.0-beta.3
37
+ - @nocobase/app-plugin-authorization@1.0.0-beta.26
38
+ - @nocobase/app-client@3.0.0-beta.0
39
+ - @nocobase/app-plugin-file@1.0.0-beta.22
40
+ - @nocobase/i18n@1.0.0-beta.6
41
+ - @nocobase/authorization@1.0.0-beta.12
42
+ - @nocobase/db@1.0.0-beta.18
43
+ - @nocobase/markdown-mermaid@0.1.0-beta.1
44
+ - @nocobase/service-provider@0.0.2-beta.1
45
+
46
+ ## 0.1.0-beta.3
47
+
48
+ ### Minor Changes
49
+
50
+ - 97d94dc: Preserve each run attempt's runtime, owner, tool version, requested model and reasoning effort, and expose primary-tool models reported during execution in run lists and details. Retain execution history when a retry releases its holder. Existing runs expose known usage models without inventing historical runtime snapshots.
51
+
52
+ Allow applications to attach execution snapshots to agent activity traces and return the originating run and attempt on comments. Applications must wire these facts into their run views, CLI projections and activity badges; installed UI Library component copies require an explicit update.
53
+
54
+ Separate requested settings from tool-reported effort, retaining report provenance and change times. Codex reports resolved thread settings and explicitly marks per-turn overrides unreported when the tool returns no resolved value. Apply reader machine permissions to execution history and action sources, skip unchanged snapshot writes, and filter/deduplicate legacy model queries in the database. Custom application outputs must apply the provided machine projections, and projects hosts can supply the same rights through `Viewer.seesExecutionMachine`.
55
+
56
+ - d942ae9: Add run requests to the agents plugin: when someone other than the person who answers for a subject wakes an agent on it, the work waits for that person to confirm it, or runs on the asker's own account.
57
+
58
+ - `runs.enqueue` takes `responsibleUserId`, `requestedByUserId` (the source of the chain of work), `causedByRunId` (work a run caused keeps that run's source) and `execution: 'auto' | 'mine'`. When the source is the responsible, or no responsible is given, work is queued as before. When the source is someone else, `auto` stores a run request instead of queueing anything. `mine` queues the work at once as the source, on their own runner or a team runner, and is refused with `NO_RUNNER_AVAILABLE` when no online runner would take it by the claim's rules (`eligibility.canClaim`, the agent's team-only variables included).
59
+ - Breaking for callers that read the result: `EnqueueResult` is now `RunEnqueued | RunRequestPending`, and `outcome` gains `'pending'`. A pending result has a `requestId` and has `runId` and `inputId` set to `null`. Check `outcome` before using `runId`. Work that names no responsible is never pending.
60
+ - `actorUserId` is optional on `EnqueueRequest` when a `responsibleUserId` is given.
61
+ - New `runs.requests` service:
62
+ - `confirm` and `reject`: only by the responsible. Confirming queues the work as the responsible with the input as it was asked, and its actor is the asker.
63
+ - `withdraw` and `runAsRequester`: only by the asker.
64
+ - `list`, `get` and `pendingOn` read requests.
65
+ - `reassign`: for when the subject's responsible changes. A request whose seven days already ran out is expired instead of being renewed or queued.
66
+ - `expireDue`: run by the sweeper. A request expires after seven days and the asker gets a `run_request_expired` notice. Any path that finds a request past its expiry treats it as expired, even before the sweep.
67
+ - A request keeps the work's `fireAt` and `maxAttempts`, and confirming restores them. A `fireAt` that has already passed means the work runs now. Work with a `parentRunId` (a consultation) is never made to wait for confirmation and is refused instead.
68
+ - New routes, for people by session or unscoped API key only:
69
+ - `GET /api/agents/runRequests`
70
+ - `GET /api/agents/runRequests/{requestId}`
71
+ - `POST /api/agents/runRequests/{requestId}/confirm`, `reject`, `withdraw` and `runAsMe`
72
+ - CLI commands: `run request list|get|confirm|reject|withdraw|run-as-me`.
73
+ - New events: `runRequest.created`, `confirmed`, `rejected`, `withdrawn`, `superseded` and `expired`. Breaking type rename: `RunnerNotice` is now the single `AgentsNotice` interface, which adds `run_request_expired` alongside the existing runner and run notices, with subjects of kind `runner`, `run` or `runRequest`. Applications must replace imports and references to `RunnerNotice` with `AgentsNotice`; no old-name alias is exported. Both `notice` and `notice.cleared` use this interface.
74
+ - Runs record `requestedByUserId` and `confirmedByUserId`. Migration `202610090002_ag_create_run_requests` creates `agRunRequests`, adds both columns to `agRuns`, and fills `requestedByUserId` of existing runs from `actorUserId`. It runs after the team runner variables migration (`202610090001_ag_add_team_runner_variables`).
75
+ - The sweeper's report gains `requestsExpired`.
76
+ - Work is merged or appended only into runs with the same `actorUserId`, including `mine`, `runAsMe` and confirmed requests.
77
+ - Subjects can bind `responsibleUserId(conn, subjectId)` to recheck current responsibility when confirming or rejecting. Without a resolver, applications must reassign requests when responsibility changes. A reassignment that has no usable responsible expires the request, notifies its requester and preserves execution as the requester.
78
+ - `auto` requests require the requester's own agent permission. Identical pending snapshots reuse the existing request without renewing its expiry or emitting another creation event, including when database drivers return attempt counts as strings or equivalent scheduling times in different representations. Run request mutation routes declare concurrent settlement errors (409).
79
+ - `@nocobase/agent-protocol` adds the error reasons `RUN_REQUEST_NOT_FOUND`, `RUN_REQUEST_SETTLED` and `NO_RUNNER_AVAILABLE`.
80
+
81
+ - f94ebc6: Pass proxies and CA certificates to coding tools, let the runner's owner pass and set variables, and let an agent take a variable from the runner.
82
+
83
+ - The runner passes the proxy variables (`HTTP_PROXY`, `HTTPS_PROXY`, `ALL_PROXY`, `NO_PROXY`, upper and lower case) and the CA variables (`SSL_CERT_FILE`, `NODE_EXTRA_CA_CERTS`) from its own environment to every coding tool by default. The values of the proxy variables are redacted from what a run reports, since a proxy URL may carry a password.
84
+ - `nocobase-runner start --pass-env NAME` and `service install --pass-env NAME` (repeatable) pass a variable from the runner's environment to every run. The names are remembered in the settings for later starts; `nocobase-runner env unset NAME` forgets one.
85
+ - `service install` writes the installing shell's proxy, CA and `--pass-env` variables, with their current values, into the launchd plist or systemd unit beside `PATH`, and prints the names it wrote. The unit or plist is now written with mode 0600, `%` is escaped for systemd, and `--dry-run` and `--json` show `<hidden>` instead of the values.
86
+ - `nocobase-runner env set NAME [VALUE]`, `env unset NAME` and `env list` keep the runner's local variables (`apps/<key>.json`, 0600). `set` reads the value from standard input when it is left out, and `list` shows names only.
87
+ - Coding tool detection uses the whitelist, passed variables and local variables of its application, rather than the runner's whole environment. Heartbeats refresh detection when local variables or passed names change, without sharing local keys between applications.
88
+ - A run's `workspace.passthrough` names are now provided only by the runner's local variables and its `--pass-env` names, no longer by any variable of the runner's environment. A run that asks for a name the runner does not provide fails before anything is prepared, with `setupFailed` and a message naming `nocobase-runner env set NAME` and `--pass-env NAME`.
89
+ - Protocol: `RegisterRequest` and `HeartbeatRequest` gain an optional `variables`, the names of the variables the runner provides (names only, at most `MAX_RUNNER_VARIABLES`, validated by `RunnerVariableNamesSchema`). A server that does not know the field ignores it, and a runner that does not send it is shown as not reporting.
90
+ - Agents plugin: a variable can be taken from the runner. `PUT /api/agents/variables/{scopeKind}/{scopeId}/{name}` takes `fromRunner: true` without a value (`variable set ... --from-runner`), which keeps the name only (new collection `agRunnerVariables`, migration `202610090005_ag_add_runner_variables`), and `Variable.fromRunner` marks such variables in lists. Such names merge with the other variables by scope like any variable, and a claim puts those whose last entry is taken from the runner into `workspace.passthrough` instead of `workspace.env`. The variable dialog has a "Take from the runtime" option, and the list a badge. Runner-owned names are rejected; older declarations of reserved names fail preparation explicitly.
91
+ - Agents plugin: a runner's reported names are kept on the runner (`agRunners.variables`, `Runner.variables`, null when it reported none), and the runtime's sheet lists them under "Variables from this machine". Runners are not chosen by them.
92
+
93
+ - 1832cfc: Report models and available reasoning efforts detected by Pi, OpenCode and Codex through optional protocol 7 capability fields, with explicit detection status and periodic background refresh. Bound model counts and identifier lengths, and keep configuration, paths and credentials out of failure reasons. Store capabilities per runner and return model suggestions through existing visibility rules without changing Agent configuration. Discard invalid or unfamiliar advisory fields without rejecting registration or heartbeats.
94
+
95
+ Run model discovery with the agent environment whitelist in empty temporary directories, terminate discovery process groups on cancellation and wait for cleanup during runner shutdown. Preserve Pi provider/model identifiers, discard invalid efforts individually and avoid reporting successful detection when every received model is invalid.
96
+
97
+ Pi's startup version and authentication checks now also use the restricted environment. API keys supplied only through the runner daemon's environment no longer count as a Pi login during detection; configure Pi's persistent authentication for the runner user. Pass run-specific variables explicitly through the application's run environment or passthrough contract instead of relying on implicit daemon environment inheritance. Those run-specific variables are not used for host capability discovery.
98
+
99
+ - 0170880: Remove a runner's working directories once their work is over. Every ten minutes the runner reports each working directory it keeps for an application, with the last run that worked in it, whether it holds work that was never pushed and when it was last used, and the free space on the disk holding them (`POST /api/agents/runners/workspaces`). The application finds each run's subject and asks the subject's binding whether its work is over (the new optional `SubjectBinding.workspaces.settled`), never while a run on that subject has not finished, and answers which directories may go. Callers who may not see a runner's machine see only the counts and the disk of `Runner.workspaceUsage`, without the directories. The runner removes them, except a directory with unpushed work, which it keeps and reports as unpushed: changes not committed (untracked files included), or a HEAD past both where the runner started the checkout and what it last saw the remote task branch hold after pushing. The runner keeps its record of each working directory in its own directory (`~/.nocobase-runner/workspaces/`), out of the agent's reach, and checks a record an earlier runner left inside the working directory: caches are derived from the repository URL, paths must stay inside the directory, and what it says was pushed is ignored. The existing retention rules (7 days after a fully pushed run, 30 days unused) no longer remove a directory with unpushed work either. Whether a branch was merged is never judged from the default branch's history, so squash merges count as merged once the application says the work is over. A runner keeps reporting only to an application whose heartbeat answer announces it (`HeartbeatResponse.workspaces`); older runners and older applications keep the existing retention rules. The runner also watches the free space on the disk holding its working directories, reading it from the file system rather than measuring directories, against `min-free-disk`: 5 GB by default, or a size or a share of the disk (`nocobase-runner register --min-free-disk 20G`, or `nocobase-runner config set min-free-disk 20G|10%|off`). It removes on its own only the directories whose work is over, least recently used first, never a pushed directory whose work goes on; when the disk is still low after that, it logs once per collection how many pushed and unpushed directories remain and that `nocobase-runner gc` can remove them. `min-free-disk` replaces the earlier `workspace-limit` setting, which upgrading drops from the runner's settings with a one-time log line. `nocobase-runner gc` lists every working directory with its application, subject, server status, unpushed state and last use, with the disk's free space and the threshold, and with `--apply` removes what the rules allow, filtered by `--ended`, `--older-than` and `--subject`; `--force` also removes unpushed work. The application keeps each runner's last report (`agRunners.workspaceUsage`, added by a migration) and shows it as `Runner.workspaceUsage`.
100
+
101
+ ### Patch Changes
102
+
103
+ - d89339e: Claude Code now reports its models and their reasoning efforts through the Agent SDK's `supportedModels()`, without sending a prompt, instead of reporting model detection as unsupported.
104
+
105
+ Codex reasoning efforts are now `low`, `medium`, `high`, `xhigh`, `max` and `ultra`, as current Codex releases advertise them: `minimal` is gone, and `max` is passed to Codex as itself rather than as `xhigh`. An agent entry already saved with an effort its tool no longer takes keeps it until the entry is changed.
106
+
107
+ In an agent's tools and models, the effort select stays aligned with the rest of its row, and the reported efforts are listed on a line of their own below the entry, naming only efforts that can be chosen. Model suggestions no longer carry a "Built-in" badge. In the agents list, a long description wraps within the name column, two lines at most, with the full text on hover. The agents list now shows the agents everyone can use first, the application's own in the order it added them, then the viewer's own agents, then the ones others share with them, each group by the name shown in the viewer's language; list entries carry `owned`, whether the caller owns the agent.
108
+
109
+ The runner now gives agents its own Node.js and pnpm: it ships pnpm 11.7.0 and writes `node` and `pnpm` launchers first on each run's PATH, and keeps pnpm from switching to the version a repository's `packageManager` names, so `pnpm install` works on a machine without pnpm or with another Node.js. `nocobase-runner config set agent-tools system` keeps the machine's own instead. The runner's own `pnpm store prune` also uses the bundled pnpm, so garbage collection no longer needs pnpm on the runner's PATH.
110
+
111
+ - de5254b: Merge built-in model suggestions with visible runtimes' model reports in Agent editors, show reporting runtimes and their current readiness, and suggest their reported reasoning efforts without changing saved configuration. The model combobox expands to fit model names and source badges on one line, within the available viewport, and uses the correct singular or plural runtime count.
112
+ - 8974f9c: Retry a run's preparation when git fails for a passing cause. The runner retries cloning, fetching and the submodules' update three times, after 2, 5 and 15 seconds, when git's error names a cut-off TLS handshake, a reset, refused or timed-out connection, a name that did not resolve, or an HTTP 5xx or 429, and aborts a transfer slower than 1 KiB/s for a minute instead of hanging. Each retry is a `status` event in the run. A repository that does not exist, credentials the host refuses, a certificate the runner does not trust, any other HTTP 4xx, and an error that names no passing cause fail at once, with a hint of what to fix where git names the cause. When every retry fails, the run fails with the new retryable reason `prepareNetwork`, and the application queues it again under the run's retry policy. The failure's error event records how many retries were made and the last error, also when the last attempt failed for a permanent cause. Submodules an earlier preparation could not finish, nested ones included, are finished by the next preparation of the same worktree. The application announces the reasons it accepts on each run (`RunHeader.acceptedFailures`), and the runner reports `checkoutFailed` to an application that does not announce `prepareNetwork`.
113
+ - 97d94dc: Retain the latest actual reasoning effort observation across repeated reports so delayed reports cannot overwrite newer facts, while preserving value and source change times.
114
+ - Updated dependencies [d89339e]
115
+ - Updated dependencies [d942ae9]
116
+ - Updated dependencies [9235602]
117
+ - Updated dependencies [de5254b]
118
+ - Updated dependencies [f94ebc6]
119
+ - Updated dependencies [1832cfc]
120
+ - Updated dependencies [8974f9c]
121
+ - Updated dependencies [0170880]
122
+ - Updated dependencies [0daf996]
123
+ - @nocobase/agent-protocol@0.1.0-beta.2
124
+ - @nocobase/app-cli@1.0.0-beta.16
125
+
3
126
  ## 0.1.0-beta.2
4
127
 
5
128
  ### Minor Changes
package/README.md CHANGED
@@ -13,12 +13,13 @@ Applications forward the `notice` event of type `run_secrets_not_allowed` to the
13
13
  Repository access providers that mint credentials in `prepare` implement the idempotent `discard(run, prepared)` hook to revoke them when the claim is skipped or rolled back. It runs outside the transaction and receives the same prepared value as `forRun`. The application owns code host credentials and their revocation API; providers without this hook cannot revoke externally issued credentials.
14
14
 
15
15
  - **Agents** (`agAgents`): who an agent is and how it works: its name, description and avatar, optional instructions (the last layer of its brief, preferences that never override the rules or the task), its type (`runner` or `online`, immutable: a patch naming one is refused), the business actions it may perform, who may wake it and how many attempts a run gets. Which tool or model it works with is an ordered list, `modelEntries`, whose first entry is its default, each entry with its own reasoning effort (`effort`, null for the default). A runner agent's entries pair a coding tool with a model (null for the tool's default) and an effort its tool takes (`TOOL_EFFORTS` of `@nocobase/agent-protocol`), and it has its skills, its tool policy, its own variables, optionally the runners it may run on, and how many runs it may have at once; it has at least one entry. An online agent's entries pair a model service with one of its models (an entry is checked against what the model catalog offers when it is added) and an effort among `ONLINE_EFFORTS`, and it has none of a runner's settings; an online agent with no entry is not configured yet: it is listed as needing a model and left out of `GET /api/agents/available` until it has one; it is offered no business action meant for runner agents only (`AgentActionOption.types`). Its configuration carries a `revision`, raised by every change (editing, archiving, restoring): `PATCH /api/agents/:agentId` names the revision it was made against (`expectedRevision`) and is refused with 409 `REVISION_CONFLICT` (`metadata.revision` the current one) when someone saved the agent since, and a patch that changes nothing raises nothing. Every change is kept in its history (`agAgentChanges`, `GET /api/agents/:agentId/history`, with `afterRevision` for what came after a revision): who, when, and the fields that changed with their values before and after, except its variables, which are named with whether they were added, changed or removed, never valued. Archiving an agent withdraws its queued runs at once; archiving and deleting it announce `agent.removed`.
16
- - **Runners** (`agRunners`), shown as runtimes: registered with a one-time token (`POST /api/agents/runners/registrationTokens`, or `pnpm nocobase agents runner-token`). Anyone may add a personal runner (`ownerOnly`: it runs only work its owner started) and later share it with the team; adding a team runner needs `agents.runners` manage. A runner reports its system, its features, its coding tools with versions and whether each is signed in, and what its owner's local policy lets it take (`policy`); it authenticates with its key (`agRunnerCredentials`), sends heartbeats and long-polls for work. Which of its coding tools it is offered work for is chosen on the web (`enabledTools`, null for every tool), carried from "Add runtime" on the registration token (`agRegistrationTokens`). A runner speaking a protocol this application does not serve is kept connected as `upgrade_required`: it gets no work, has what it holds released, and its owner is told once per protocol through the `notice` event (`runner_upgrade_required`; `notice.cleared` once it no longer holds). Only its owner changes a runner (its name, slots, coding tools and trust), because it is their machine with their tools' sign-ins and credentials; a manager of runners changes only a runner whose owner can no longer act (none recorded, or disabled or deleted in the application's directory, `people.provide({ inactive })`). A manager of runners may still revoke anyone's runner in an emergency, and delete it once revoked: its owner is told (`runner_revoked`) and the application's `security` log records who did it. A runner whose owner can no longer act (`people.provide({ inactive })`) is refused with `RUNNER_OWNER_DISABLED`. A runner fits an agent's run only when its owner's local policy lets it take that agent's runs, on that subject, with those repositories; `availability` and the agents list count only such runners.
16
+ - **Runners** (`agRunners`), shown as runtimes: registered with a one-time token (`POST /api/agents/runners/registrationTokens`, or `pnpm nocobase agents runner-token`). Anyone may add a personal runner (`ownerOnly`: it runs only work its owner started) and later share it with the team; adding a team runner needs `agents.runners` manage. A runner reports its system, its features, its coding tools with versions and whether each is signed in, and what its owner's local policy lets it take (`policy`); it authenticates with its key (`agRunnerCredentials`), sends heartbeats and long-polls for work. Which of its coding tools it is offered work for is chosen on the web (`enabledTools`, null for every tool), carried from "Add runtime" on the registration token (`agRegistrationTokens`). A runner speaking a protocol this application does not serve is kept connected as `upgrade_required`: it gets no work, has what it holds released, and its owner is told once per protocol through the `notice` event (`runner_upgrade_required`; `notice.cleared` once it no longer holds). Only its owner changes a runner (its name, slots, coding tools and trust), because it is their machine with their tools' sign-ins and credentials; a manager of runners changes only a runner whose owner can no longer act (none recorded, or disabled or deleted in the application's directory, `people.provide({ inactive })`). A manager of runners may still revoke anyone's runner in an emergency, and delete it once revoked: its owner is told (`runner_revoked`) and the application's `security` log records who did it. A runner whose owner can no longer act (`people.provide({ inactive })`) is refused with `RUNNER_OWNER_DISABLED`. A runner fits an agent's run only when its owner's local policy lets it take that agent's runs, on that subject, with those repositories; `availability` and the agents list count only such runners. Every heartbeat answer announces workspace reports (`workspaces`): a runner reports the working directories it keeps for this application (`POST /api/agents/runners/workspaces`, each with the last run that worked there and whether it holds unpushed work, with the free space on the disk holding them) and is told which of those runs belong to subjects whose work is over (`remove`) or goes on (`keep`), as each subject kind's `workspaces.settled` says; a kind without it never counts as over, and only the runner's own runs are answered for. The last report is kept on the runner (`agRunners.workspaceUsage`, `Runner.workspaceUsage`) with each directory's subject and what was decided, for the Runtimes page.
17
17
  - **The claim**: one long-poll (`POST /api/agents/runners/claim?wait=true`) answers `jobs` and `runs` together, at most `free` items, from the runner's slots, which jobs and runs share (`slots`): jobs first. A heartbeat reconciles both, releasing what the server no longer thinks the runner holds and asking it to stop what was cancelled.
18
18
  - **Jobs** (`agJobs`, `agJobEvents`): only for the off-by-default runner build method (such as an application's `acme.builds.method: runner`): a `build` (check out a commit, run an administrator's command, upload its outputs), of kinds the application registers (`jobs.register(kind, { validate, prepare, onEvent, onDone })`, then `jobs.enqueue`, `get` and `watch`). A runner takes a job only when it reports `jobs.build`, someone turned on "Takes build jobs" (`acceptJobs`), it is shared or belongs to who started the job, and its policy lets it check out the job's repository. Jobs retry `runnerOffline`, `leaseExpired`, `startTimeout`, `checkoutFailed` and `policyRefused` while attempts remain, and open the stored variables they name through this plugin's variables at claim, audited as delivered.
19
19
  - **Distribution**: the application serves two products as standalone tarballs that bundle Node, one per platform (`server/distribution`): its CLI (`agents.cli.name`, such as `acme`) and the runner, `nocobase-runner` (`RUNNER_PRODUCT`). `pnpm nocobase cli build` of `@nocobase/app-cli` packs the CLI the application's `package.json` declares under `nocobase.cli`, and `cli build --runner` the runner, each into a directory of its own, `storage/runners/dist/<channel>/<product>/`, with a `manifest.json` of every file's SHA-256 and size, so CI builds them as separate artifacts mounted into storage. The install script installs the CLI under `~/.local/share/<cli>`: by default the CLI alone, with a download token any signed-in person mints (`POST /api/agents/dist/downloadTokens`, `agDownloadTokens`: the CLI for one platform, three downloads within 30 minutes), as `curl -fsSL <server>/api/agents/dist/installScript | sh -s -- --token <token>`; "Add runtime" shows the same line with `--runner --server <server>` and a registration token, which also installs `nocobase-runner` under `~/.local/share/nocobase-runner`, runs `nocobase-runner register` and `nocobase-runner service install` (an application that serves no CLI still gets its runtime). A token of the other kind fails before anything is installed. A runner reports the product it runs as on registration and every heartbeat (`agRunners.product`), and the heartbeat answer carries an `upgrade` notice when the channel serves a newer version of that product for the runner's platform; a runner that reports none (one from before) is offered no update, and the Runtimes page says to install it again.
20
20
 
21
21
  - **Runs** (`agRuns`): one agent working on one subject, keyed by (agent, subject, thread), with the agent's type kept on the run (`agentType`). A subject kind takes the agent types its binding names (`agentTypes`, runner only by default); a run of another type is refused (`AGENT_TYPE_NOT_ALLOWED`). New work joins the run already on it as the same person (`actorUserId`) while that run can still be told, else that person's queued one, else starts a new run: work woken by different people never shares a run, so it neither borrows another's identity nor waits for a runner that will not take it. Runs of one key are still claimed one at a time, whoever they work as. Queued runs are claimed by `priority` (lower first; 0 by default), then oldest first; a run given a `fireAt` is not claimed before that moment. Work merged into a queued run raises it to the more urgent priority and the earlier moment of the two. Runners take only runner agents' runs. A claim hands a run to a runner that fits in one transaction: one of the agent's tools enabled, installed and signed in there (the run takes the first entry of the agent's list whose tool is, recorded on the run as `tool` and `model` and passed to the tool; a model the tool's account cannot use fails the run `modelUnavailable`), the agent naming no runner or naming this one, the runner shared with the team or owned by the person who woke the agent, its features covering what the run needs (worked out from the payload: checkouts, directories, skills, secrets), a team runner when one of the variables the run gets is for team runners only (`teamRunnersOnly`), and a free slot within the agent's concurrency. The variables are checked and opened in the claim's transaction, so the runner receives what was checked; a personal runner left out for them notes on the run which variables asked for a team runner (`teamOnlyVariables`, cleared when the run is taken, requeued or given new input), and its wait is `secretsNotAllowed` with those variables. Before a run exists, `eligibility` (`runnersFor`, `canClaim`, `mayQueue`, `teamOnly`) answers by the same rules whether a runner would take an agent's work done as a person, with the scopes and features the caller names; `availability` and `GET /api/agents/available` use it for the caller. A working directory that is a directory on one runner pins the run to that runner, one run at a time per directory. The claim renders the brief (kept per run, `agRunBriefs`), mints a run token, and hands over the working directories, the merged variables, the skills and the CLI to install. Events, usage and branches are recorded as the runner reports them; completing requires every input to be handled.
22
+ - **Run requests** (`agRunRequests`): work someone asked of an agent on a subject another person answers for, waiting for that person to confirm it (see "Work someone else causes" below).
22
23
  - **Workload** (`runs.workload({ subjectKind, limit? })`, `shared/runs.ts`): the open runs on one kind of subject for a board of work, without claiming anything. Held runs come with their runner, the newest input's trigger and their newest text, tool call, status or error (`lastActivity`); queued runs with their place in the claim order (among the runs claimable now, and among the agent's) and why they wait, by the claim's own rules in its order (`RUN_WAIT_REASONS`: the agent archived, delayed until a moment, no runner online, the agent's named runners offline, its tool not signed in anywhere, only other people's personal runners, missing features, only personal runners whose owner may not receive the run's variables, the same work already held, the agent's concurrency full, every fitting runner busy, preparation retrying, or next). A wait is a code and the values its words need (`params`), never text: the client words it with `formatRunWait(t, wait)` from `client/runs.ts`, in this plugin's namespace (`runWait.reasons.<reason>`), which an application may override in its locale file or replace with its own formatter. It also answers each agent's load (held, queued, its limit, whether a runner could take its work) and the runners' (online, holding work, slots and slots used). It reads a bounded number of tables, never one query per subject; the caller decides what of it a person may see.
23
24
  - **Online runs** (`server/online`): every application instance runs an executor that takes online agents' runs through the same claim transaction (`claims.claimServer`, the run held by `server:<instance>`, so two instances never take one run), with the entry of the agent's list the subject asks for (a conversation's choice, `ConversationPatch.model`, while the agent still lists it) or else its first, recorded on the run as `modelService` and `model`; a failing model fails the run, nothing falls back to another entry and reports through the same lifecycle a runner's requests reach (start, events, lease, complete, fail, cancel-ack), so conversations, transcripts, retries, failed-run handling and the sweeper are unchanged. No slots and no per-agent concurrency limit apply. A run is a loop of model calls through the plugin's model gateway (`online.gateway`, below): each streams its text, which a conversation shows as a draft message growing in place, and ends with the tool calls to make and what the call used, recorded at once as the run's usage (tool `chat`, the model the provider named). It has two tools (`online/sandbox.ts`): `bash`, a sandboxed shell (`just-bash`, in process: no real processes, no network, a 10-second deadline per command, its output cut to what the model reads; the build bundles the part of `just-bash` it uses into `dist/server/vendor/just-bash.js` with `THIRD_PARTY_LICENSES.txt` beside it, so the plugin does not depend on `just-bash`, and leaves out Python, JavaScript, SQLite, curl, html-to-markdown and xz/zstd archives, which answer that they are not available), and `skill`, which reads one of the run's skills (its SKILL.md and its file tree). The shell mounts the run's skills read-only at `/skills/<slug>/` (text only, at most 5 MB per run; binary files are listed but not readable, and scripts are never run) with `/tmp` as scratch, and carries the application's CLI (`online/cli-command.ts`): `acme`, built from the run's command manifest (the application's `GET /api/cli/manifest`, the actions of the person who woke the agent that the agent is configured with), each command one request sent through the application itself with the run's token, so the route checks the permission again; the line is read by the CLI's own parser (`@nocobase/app-cli-client/parse`), so flags, `--<flag>-file` and the body's `--file` (read from the shell's files), `--from-env` (the shell's exported variables), usage errors and exit codes are the CLI's; help and `acme docs` work from the manifest, `--json` prints the cli-envelope, and commands that send or save files are refused. Skills every online run gets besides its own (the CLI's) are registered with `online.skills`. A refused or failed call is a result the model reads. Input that arrives meanwhile is answered in the same run; a run that calls tools for more than `maxSteps` model calls fails `stepLimit`. The gateway's errors become failure reasons: `config` → `modelUnavailable`, `auth` → `toolAuth`, `quota` → `toolQuota`, `rateLimit` → `toolRateLimit` and `network` → `toolNetwork` (both retried while attempts remain), `contextOverflow` → `contextOverflow`, anything else `unknown`. A cancel request aborts the model call within a second; at shutdown an instance hands its runs back (`runnerOffline`), and one that stops renewing its leases loses them to the sweeper (`leaseExpired`). The brief of an online run has a system layer of its own (`onlineSystemLayer`): the CLI in its shell instead of a terminal, no workspace, its skills by name and description (`onlineSkillsSection`), and links to the pages of what it relied on.
24
25
  - **Redaction**: what runners report is stored redacted. The runner redacts first; the server redacts every run event (content, output, input and meta), summary and failure detail, and every job event and failure detail again before storing them, with the protocol's redactor (`createRedactor` of `@nocobase/agent-protocol`): the secrets the claim handed out (a run's variables and token, a job's opened variables, repository token and upload headers, remembered in memory for recent claims) and the common secret patterns, each replaced with `[REDACTED]` (`server/kernel/redaction.ts`). After a restart, or on another instance, the patterns and the runner's own redaction still apply.
@@ -110,7 +111,7 @@ Everything the application contributes goes through `agentsToken` (`server/token
110
111
  | `conversations.deliver(tx, id, news)`, `conversations.lock(conn, id)` | A `news` notice (`type`, English `title`, `params`) written to a conversation, with input that wakes its agent. |
111
112
  | `people.provide(source)` | The application's directory: names, whom to pick from, and who can no longer act (`inactive`: their runners stop). |
112
113
  | `events.on('agent.removed', listener)` | An agent was archived or deleted (`agentId`, `name` then, `reason`, `byUserId`), after the transaction that withdrew its queued runs commits: the application lets go of the work it gave the agent. The assembling application clears it as executor of unfinished issues (`server/agents/removal.ts`). |
113
- | `events.on('notice', listener)` | People the plugin wants told (`RunnerNotice`: `key`, `type`, `userIds`, `subject`, English `title` and `body`, `params`): today `runner_upgrade_required`, to a runner's owner; `notice.cleared` names one that no longer holds. |
114
+ | `events.on('notice', listener)` | People the plugin wants told (`AgentsNotice`: `key`, `type`, `userIds`, `subject`, English `title` and `body`, `params`): runner notices to their owner, `run_secrets_not_allowed` to a run's actor and owner, and `run_request_expired` to its requester. Subjects are `runner`, `run` or `runRequest`; `notice.cleared` names one that no longer holds. |
114
115
  | `jobs.register(kind, registration)` | A kind of build job, for the off-by-default runner build method (see Jobs above). |
115
116
  | `reporting.usage`, `reporting.runFigures`, `reporting.range` | What runs used and cost, grouped by agent, person, `group`, `subject`, day, model, tool or agent `type`, and how the runs of a range went with their usage by type (`usageByType`) and day by day (`daily`: runs by outcome, cost by type), for the application's report pages. The plugin serves usage over HTTP for its usage page (`GET /api/agents/usage`, behind the `usage` page grant; every run for a reader of agents, else the caller's own; `series=true` breaks each day of `daily` down by the grouping). |
116
117
  | `briefs.sections.register(provider)` | Sections added to every brief's context layer after the subject's own context (`key`, `order`, `section(conn, claim, assembly)` answering Markdown or null), in claims and in brief previews. The context layer is outside the session fingerprint, so a section that changes does not end a resumable session. Database reads only. |
@@ -130,15 +131,40 @@ agents.subjects.register({
130
131
  await agents.runs.enqueue({ agentId, subject: { kind: 'ticket', id }, actorUserId, priority: -2, input });
131
132
  // Withdraws the work no runner took yet, keeping why as the run's failure detail.
132
133
  await agents.runs.withdrawQueued({ subject: { kind: 'ticket', id }, byUserId: null, detail: 'The ticket is on hold.' });
134
+
135
+ // Work on a subject someone answers for: the ticket's assignee confirms what anyone else causes.
136
+ const result = await agents.runs.enqueue({ agentId, subject, responsibleUserId: assigneeId, requestedByUserId: commenterId, input });
137
+ if (result.outcome === 'pending') {
138
+ // A run request (`agents.runs.requests`) waits for the assignee; nothing is queued.
139
+ }
140
+ // What a run itself causes (a status it changed) keeps that run's source rather than the assignee's.
141
+ await agents.runs.enqueue({ agentId, subject, responsibleUserId: assigneeId, causedByRunId: run.id, input });
142
+ // The assignee changed: pending requests go to the new one (or nowhere, with `toUserId: null`).
143
+ await agents.runs.requests.reassign({ subject, toUserId: newAssigneeId, byUserId });
133
144
  ```
134
145
 
135
146
  `assemble` runs inside the claim's transaction and must not call a network or a model (nor do brief sections and mounts, which read through the claim's connection only: on SQLite the transaction holds the one connection there is; a section or mount provider reads what it needs from elsewhere, such as a person's permissions, in its optional `prepare(run)`, which runs before the transaction and whose answer it gets back); throwing leaves the run queued, and three failures fail it `setupFailed`. `enqueue` takes an optional outer transaction; inside another plugin's transaction, publish the collected events after that transaction commits.
136
147
 
148
+ ### Work someone else causes
149
+
150
+ Work somebody causes on a subject another person answers for runs only with that person's consent, or on the asker's own account. `enqueue` takes the subject's `responsibleUserId`, the source of the chain of work `requestedByUserId` (the actor by default), or `causedByRunId` for work a run caused, and `execution`:
151
+
152
+ - The source is the responsible, or nobody answers for the subject: the work is queued as before, run as the responsible (or as `actorUserId`).
153
+ - The source is someone else and `execution` is `auto` (the default): nothing is queued. A run request (`agRunRequests`) keeps the input as it was asked and waits for the responsible; `enqueue` answers `outcome: 'pending'` with its `requestId`.
154
+ - `execution: 'mine'`: the work is queued at once as the source, on a runner they may use (their own or a team runner, never the responsible's own). With none online it is refused with `NO_RUNNER_AVAILABLE` instead of waiting unseen.
155
+ - `causedByRunId`: the source is that run's, who confirmed it or else who it was requested by, so a chain somebody else started never runs as the responsible unconfirmed. Runs record it as `requestedByUserId`, and the confirmer as `confirmedByUserId`.
156
+
157
+ Only the request's responsible confirms it (queued as them with the input as it was asked, its actor the asker, joining only a run acting as them while it takes input) or rejects it; not an administrator, a manager of agents or a run acting for them. Confirming checks again that they may still wake the agent. A subject with mutable responsibility should bind `SubjectBinding.responsibleUserId(conn, subjectId)`, which reads the current responsible inside the confirmation or rejection transaction; a changed or null responsible prevents the old responsible from acting even before `reassign` is called. Without that resolver the request uses its recorded responsible, so the application must call `reassign` with the subject's responsibility change. The asker withdraws it, or runs it as themselves. People do this over `GET /api/agents/runRequests` (`role=responsible&status=pending` is an inbox), `GET /api/agents/runRequests/{requestId}`, and `POST …/{requestId}/confirm`, `reject`, `withdraw` and `runAsMe`, by session or unscoped API key only. Concurrent settlement returns 409.
158
+
159
+ A request settles once, and keeps the work's `fireAt` and `maxAttempts` for its run. Nobody settling it within seven days (`RUN_REQUEST_TTL_MS`) expires it on the sweep, and the asker gets a `run_request_expired` notice offering to run it as themselves. A request past its time counts as expired everywhere, before the sweep too. When the responsible changes, `runs.requests.reassign` supersedes the pending requests and asks the new responsible; one already past its time expires instead of being renewed. If the new responsible is null, the agent is unavailable or the new responsible cannot invoke it, the request expires and notifies the asker instead, preserving `runAsMe`. Every change is announced as `runRequest.created`, `confirmed`, `rejected`, `withdrawn`, `superseded` or `expired`, with the request.
160
+
161
+ Creating an `auto` request requires that both the source and the responsible may invoke the agent. Repeated enqueues with identical pending work reuse its request without another creation event or a renewed expiry; comparison includes the input snapshot, execution options, subject, thread and both people. Different input or scheduling options remain separate requests.
162
+
137
163
  ## The CLI's commands
138
164
 
139
165
  The CLI's commands are the application's API routes: `GET /api/cli/manifest` (`@nocobase/app-server/router`) answers every command the API document describes for the caller, named and shaped by each route's `x-cli` extension, and this plugin tells it who calls (a run by its run token, a person by the application's authentication) and which business actions each holds (`gate.allowed`). A run token is also a credential of the application's authentication (`server/cli/run-credential.ts`): a request carrying it acts for the person who woke the agent, as a scoped session the routes accept only where their security lists `runToken`; the application bounds it by its scope (for example, `server/agents/run-principal.ts`). A route lists `runToken` and gives its `x-cli` an `action` for the commands a run may use.
140
166
 
141
- The plugin's own commands are its routes. A run uses `run self`, `run context` and `conversation title set` (`GET /api/agents/runs/current`, `/current/context`, `PATCH /current/conversation`, action `agents.runs/self`), and a run or a person `agent list` (`GET /api/agents/available`, action `agents.agents/view`: the agents the caller may give work to, with what each is good at and whether it can take work now). The rest are a person's: `agent list-all|get|create|update|archive|restore|delete|copy|history|brief`, `agent action list`, `agent preset list`, `skill …` (with `skill version …` and `skill attachment get|set`), `variable list|set|delete|reveal` and `variable audit list` (positional scope kind and scope), `runtime list|get|update|revoke|delete|work` and `runtime token create`, `model list|check|usage` and `model price get|set`, `service list|create|update|delete|discover|check`, `conversation list|get|create|update|stop|fallback|restore`, `conversation message list|send`, `conversation preferences|settings get|update`, and `run list|get|events|brief|cancel|retry|usage` and `run workspace reset`. The runner protocol, the downloads and the browser's helpers (the vocabulary, the people picker, the chat agent picker, starting a conversation from a page, marking one read) stay off the command line. The application's routes and custom commands are the rest.
167
+ The plugin's own commands are its routes. A run uses `run self`, `run context` and `conversation title set` (`GET /api/agents/runs/current`, `/current/context`, `PATCH /current/conversation`, action `agents.runs/self`), and a run or a person `agent list` (`GET /api/agents/available`, action `agents.agents/view`: the agents the caller may give work to, with what each is good at and whether it can take work now). The rest are a person's: `agent list-all|get|create|update|archive|restore|delete|copy|history|brief`, `agent action list`, `agent preset list`, `skill …` (with `skill version …` and `skill attachment get|set`), `variable list|set|delete|reveal` and `variable audit list` (positional scope kind and scope), `runtime list|get|update|revoke|delete|work` and `runtime token create`, `model list|check|usage` and `model price get|set`, `service list|create|update|delete|discover|check`, `conversation list|get|create|update|stop|fallback|restore`, `conversation message list|send`, `conversation preferences|settings get|update`, and `run list|get|events|brief|cancel|retry|usage`, `run workspace reset` and `run request list|get|confirm|reject|withdraw|run-as-me`. The runner protocol, the downloads and the browser's helpers (the vocabulary, the people picker, the chat agent picker, starting a conversation from a page, marking one read) stay off the command line. The application's routes and custom commands are the rest.
142
168
 
143
169
  ## Workspace
144
170
 
@@ -188,7 +214,7 @@ The plugin registers no routes of its own: an application mounts its pages and j
188
214
 
189
215
  - `@nocobase/app-plugin-agents/client/routes` exports `agentsRoute` (`/agents`, with the `new` dialog and the `:agentId` page), `runtimesRoute` (`/runtimes`, with the `connect` dialog), `skillsRoute` (`/skills`, with `new` and `:skillId`) and `usageRoute` (`/usage`: what runs used and cost over a date range, filtered by group, agent and person and summed by one of the groupings (`?groupBy=`, agent by default), with a daily chart of tokens or cost above the table, stacked by the top five agents or models when grouped by those (the usage route's `series`), its group and subject named and linked by the vocabulary's `groupTitle`, `path` and `groupPath`; for who reads `agents.prices` a "Set prices" header button opens the prices sheet, `?prices=1`: online models by service and model, coding tools by the models their runs report, each tool with its subscription switch and price rules, changed by who manages it; the note on missing prices links to it). Each page renders its own heading, and stands behind a page grant of the same id as its route name (`agents`, `runtimes`, `skills`, `usage`, exported as `PAGES` from `shared/access`); a page grant only opens the page, and what it shows is decided by the admin API on the settings items. It also exports `modelsRoute` (`/models`), which stands behind `agents.services` read instead: the model services (a page header with "Add service", the system default chat model's select, then a table with one row per service: its name and host, provider type, status and a menu to edit it, turn it on or off or delete it; "Add service" and clicking a row open one dialog with a single form saved at once: provider type when adding, name, base URL, the write-only key as a `SecretInput` (`client/components/secret-input.tsx`: a password field whose empty value keeps the saved key), an OpenCode base URL's note on which provider type serves which of its model families (its session header is sent automatically), connection test, models fetched from the provider or added by id and checked, each with its kind, changeable before and after it is checked, and a Test that checks it as that kind, and an on/off switch), changeable by who manages `agents.services`.
190
216
  - Runtimes (on `/api/agents/runners`): one overview row per runtime — its name with its system, its state with the slots in use ("Busy 1/1", "Offline · 3 hours ago"), its coding tools by sign-in, personal or team, its runner version (marked "Upgradable" when a newer version of the product it runs as is served, with `nocobase-runner update`, or `<cli> runner update` for a CLI that carries the runner; the runner also updates itself) and when it was last seen — with a "…" menu (Edit, then revoke or delete). A row opens the runtime's sheet: General (name, concurrent runs, personal or team after a warning, and "Allow build jobs" only when the application gives runners jobs, as an application's off-by-default runner build method does), Tools (a switch per reported tool with its version, sign-in and, when the API sent it, its path as small text), Local policy (read only: what its owner's policy on the machine lets it take) and Recent runs (`GET /agents/runners/:runnerId/runs`). Only its owner changes it (the managers of runners only a runner whose owner can no longer act); a manager of runners sees someone else's read only, with revoke or delete as the only menu items. Its owner, the managers of runners and anyone who may use an agent get its host name and its tools' paths from the API, everyone else neither. "Add runtime" asks who it works for (team only for managers of runners), which coding tools it may run (all by default) and its max concurrent runs (1 by default, carried by the token; a runner registered with its own `--slots` keeps that), then shows the one-line install and the `nocobase-runner register` command with a one-time token (copy buttons, expiry), and waits until the runtime connects, then shows the coding tools it reported.
191
- - Agents: the list (type, tools, the default model and how many more, where it runs with the runners online for it, or "on the server" and whether its model is offered, active runs, visibility; a type filter; archived ones on request) and an agent's page, whose header sums it up in one line (type, tool or model, where it runs, free or busy, owner), with four tabs kept in `?tab=`; the new-agent dialog asks for the type first, then the fields of that type (its tools and models, model services and models for an online agent from `GET /api/agents/models`; with none, the agent uses the system default chat model, which the dialog names with a link to change it, or says none is offered). General: basics, avatar and instructions with "Preview full prompt" (a scenario switch among the subject kinds that offer a sample, the application's first and a conversation, `?scenario=` on the API; it shows the system prompt in one, with the agent's own prompt marked at its end, and the first message, all rendered on a made-up subject whose values are marked `[sample]`), and who may use it. Capabilities: the tools and models, a compact ordered list (one header row, then one row per entry) whose first row is the default, with rows added, removed and moved up or down (a runner agent's rows a coding tool, a model typed freely with the tool's common models suggested, and an effort among the tool's; an online agent's rows a model service, a model and an effort, each with a Test button; the new-agent dialog uses the same list), skills, the business capabilities grouped by the application's groups with a description each, and the ones never granted to an agent greyed out with the reason (`AgentActionOption.grantable: false`), and whether it confirms before changing data. Runtime (runner agents only): where it runs (any runner, or named ones, and concurrency), the command allowlist and denied patterns, and its environment variables (write-only, revealing them is audited, saved row by row). Editable when the agent says `canEdit`; a bar appears while a tab has unsaved changes and saves them in one request against the revision the page shows, and switching tabs or following a link away asks first. When someone else saved the agent meanwhile, the page reloads and a dialog shows what they changed. History: who changed what and when, long text as a line diff, lists as what was added and removed, variables named without values.
217
+ - Agents: the list (type, tools, the default model and how many more, where it runs with the runners online for it, or "on the server" and whether its model is offered, active runs, visibility; a type filter; archived ones on request; agents everyone can use first, the application's own in the order it added them, then the viewer's own (`AgentSummary.owned`), then the ones shared with them, each group by the name shown) and an agent's page, whose header sums it up in one line (type, tool or model, where it runs, free or busy, owner), with four tabs kept in `?tab=`; the new-agent dialog asks for the type first, then the fields of that type (its tools and models, model services and models for an online agent from `GET /api/agents/models`; with none, the agent uses the system default chat model, which the dialog names with a link to change it, or says none is offered). General: basics, avatar and instructions with "Preview full prompt" (a scenario switch among the subject kinds that offer a sample, the application's first and a conversation, `?scenario=` on the API; it shows the system prompt in one, with the agent's own prompt marked at its end, and the first message, all rendered on a made-up subject whose values are marked `[sample]`), and who may use it. Capabilities: the tools and models, a compact ordered list (one header row, then one row per entry) whose first row is the default, with rows added, removed and moved up or down (a runner agent's rows a coding tool, a model typed freely with the tool's common models suggested, and an effort among the tool's; an online agent's rows a model service, a model and an effort, each with a Test button; the new-agent dialog uses the same list), skills, the business capabilities grouped by the application's groups with a description each, and the ones never granted to an agent greyed out with the reason (`AgentActionOption.grantable: false`), and whether it confirms before changing data. Runtime (runner agents only): where it runs (any runner, or named ones, and concurrency), the command allowlist and denied patterns, and its environment variables (write-only, revealing them is audited, saved row by row). Editable when the agent says `canEdit`; a bar appears while a tab has unsaved changes and saves them in one request against the revision the page shows, and switching tabs or following a link away asks first. When someone else saved the agent meanwhile, the page reloads and a dialog shows what they changed. History: who changed what and when, long text as a line diff, lists as what was added and removed, variables named without values.
192
218
  - Skills: the library (each skill's name, description, compatibility and whether it holds scripts), and a skill as a directory: its files in a tree beside the selected one (`client/pages/skills/workbench/`), SKILL.md rendered, other text shown, images and PDFs previewed. Editing uses the same workbench: files and folders are created (in a folder chosen from the skill's and the conventional `scripts/`, `references/`, `assets/`), uploaded (also by dropping files onto a folder), renamed and deleted from the tree, never by typing a path; SKILL.md and other Markdown are written beside their preview (in tabs on a narrow pane), with the front matter's problems listed above the source as it is typed. A new skill (`/skills/new`, a covering page) starts from a template of front matter and suggested sections. Versions can be compared with the current one and restored, and the page shows where the skill is attached. When someone saved a version while the editor was open, the draft stays and a banner offers to load the latest version. A scope's default skills list the scripts of the chosen skills, which online agents do not run (`SkillScriptsNotice`).
193
219
  - The new agent, new skill and variable dialogs ask "Discard unsaved changes?" before closing with input in them (NP-200), through `@nocobase/app-client`'s unsaved-changes guard.
194
220
  - `@nocobase/app-plugin-agents/client/kit` exports `VariablesSection` and `DefaultSkillsSection` for a scope's settings on the application's pages (`scope` `workdir` or a registered key, with an optional `description`), `useRunnerOptions` for picking the runner a directory is on (with how many runners are `online`), and `useAgentOptions` for picking an agent.
@@ -84,10 +84,12 @@ export declare class AgentsApi {
84
84
  variables(scope: VariableScope, scopeId: string): Promise<Variable[]>;
85
85
  /**
86
86
  * Creates or replaces a variable; the value is never read back except through `revealVariables`. Without `value`,
87
- * an existing variable keeps its value and changes only what `options` says.
87
+ * an existing variable keeps its value and changes only what `options` says. `fromRunner` keeps no value: the
88
+ * runner that takes a run provides it.
88
89
  */
89
90
  setVariable(scope: VariableScope, scopeId: string, name: string, value: string | undefined, options?: {
90
91
  readonly teamRunnersOnly?: boolean;
92
+ readonly fromRunner?: boolean;
91
93
  }): Promise<void>;
92
94
  deleteVariable(scope: VariableScope, scopeId: string, name: string): Promise<void>;
93
95
  /** Every value of the scope; recorded in its audit log. */
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../client/api/client.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAE1D,OAAO,KAAK,EACV,KAAK,EACL,iBAAiB,EACjB,WAAW,EACX,UAAU,EACV,UAAU,EACV,YAAY,EACZ,OAAO,EACR,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,KAAK,EACV,yBAAyB,EACzB,aAAa,EACb,YAAY,EACZ,UAAU,EACV,2BAA2B,EAC3B,sBAAsB,EACtB,SAAS,EACT,QAAQ,EACR,gBAAgB,EAChB,cAAc,EACd,yBAAyB,EAC1B,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EACV,iBAAiB,EACjB,sBAAsB,EACtB,MAAM,EACN,WAAW,EACX,eAAe,EACf,aAAa,EACd,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzE,OAAO,KAAK,EACV,KAAK,EACL,WAAW,EACX,WAAW,EACX,UAAU,EACV,SAAS,EACT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AAG,EAAE,CAAC;IAI9C,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;IAI7C,yEAAyE;IAC5D,SAAS,CACpB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,QAAQ,SAAM,GACb,OAAO,CAAC,YAAY,CAAC;IAQxB,8FAA8F;IACvF,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;IAIjD,0FAA0F;IACnF,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAOrE,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAI7C,wCAAwC;IACjC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;YAI9B,IAAI;IAIlB,OAAO,CAAC,IAAI;YAIE,IAAI;YAQJ,GAAG;IAIjB,OAAO,CAAC,IAAI;YAcE,IAAI;CAYnB"}
@@ -135,7 +135,8 @@ export class AgentsApi {
135
135
  }
136
136
  /**
137
137
  * Creates or replaces a variable; the value is never read back except through `revealVariables`. Without `value`,
138
- * an existing variable keeps its value and changes only what `options` says.
138
+ * an existing variable keeps its value and changes only what `options` says. `fromRunner` keeps no value: the
139
+ * runner that takes a run provides it.
139
140
  */
140
141
  async setVariable(scope, scopeId, name, value, options = {}) {
141
142
  await this.send(`variables/${scope}/${id(scopeId)}/${id(name)}`, 'PUT', {
@@ -143,6 +144,9 @@ export class AgentsApi {
143
144
  ...(options.teamRunnersOnly === undefined
144
145
  ? {}
145
146
  : { teamRunnersOnly: options.teamRunnersOnly }),
147
+ ...(options.fromRunner === undefined
148
+ ? {}
149
+ : { fromRunner: options.fromRunner }),
146
150
  });
147
151
  }
148
152
  deleteVariable(scope, scopeId, name) {
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../client/api/client.ts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tools and models, in order, as a compact list: one header row names the columns, and each row is one entry
3
+ * with its reasoning effort. A runner agent's rows pair a coding tool with a model (free text, suggested from built-ins
4
+ * and visible runner reports; empty for the tool's default), an online agent's rows a model service with one of its
5
+ * models. The efforts offered are the row's tool's or the online ones. The first row is the default. Rows are added,
6
+ * removed and moved up or down; an online agent may remove its last row and wait for a model, a runner agent may not.
7
+ */
1
8
  import { type AgentTool } from '@nocobase/agent-protocol';
2
9
  import type { ReactElement, ReactNode } from 'react';
3
10
  import { type AgentType } from '../../shared/agents.js';
4
11
  import type { ModelCatalog } from '../../shared/models.js';
5
12
  import type { RunnerSummary } from '../../shared/runners.js';
13
+ import { type ModelSuggestionRunner } from '../lib/model-suggestions.js';
6
14
  import { type EntryDraft } from '../pages/agents/agent-model.js';
7
- /** A model typed freely, with the tool's common models suggested as the person types. */
8
- export declare function ModelInput({ id, tool, value, disabled, placeholder, ariaLabel, onChange, }: {
15
+ /** A model typed freely, with common models and the visible runners' reports suggested as the person types. */
16
+ export declare function ModelInput({ id, tool, runners, value, disabled, placeholder, ariaLabel, onChange, }: {
9
17
  readonly id: string;
10
18
  readonly tool: AgentTool;
19
+ readonly runners?: readonly ModelSuggestionRunner[];
11
20
  readonly value: string;
12
21
  readonly disabled?: boolean;
13
22
  readonly placeholder?: string;
@@ -19,7 +28,7 @@ export declare function ModelEntriesEditor({ idPrefix, type, value, runners, cat
19
28
  readonly idPrefix: string;
20
29
  readonly type: AgentType;
21
30
  readonly value: readonly EntryDraft[];
22
- /** For the count of runners each tool can run on now. */
31
+ /** For each tool's readiness count and optional reported model suggestions. */
23
32
  readonly runners?: readonly RunnerSummary[] | undefined;
24
33
  /** The services and models online rows choose from. */
25
34
  readonly catalog?: ModelCatalog | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"model-entries.d.ts","sourceRoot":"","sources":["../../../client/components/model-entries.tsx"],"names":[],"mappings":"AAQA,OAAO,EAEL,KAAK,SAAS,EACf,MAAM,0BAA0B,CAAC;AASlC,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sx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- /**
3
- * An agent's tools and models, in order, as a compact list: one header row names the columns, and each row is one entry
4
- * with its reasoning effort. A runner agent's rows pair a coding tool with a model (free text, suggested from what the
5
- * tool is commonly run with; empty for the tool's default), an online agent's rows a model service with one of its
6
- * models. The efforts offered are the row's tool's or the online ones. The first row is the default. Rows are added,
7
- * removed and moved up or down; an online agent may remove its last row and wait for a model, a runner agent may not.
8
- */
9
- import { Autocomplete } from '@base-ui/react';
10
- import { TOOL_MODEL_SUGGESTIONS, } from '@nocobase/agent-protocol';
11
2
  import { useTranslation } from '@nocobase/i18n/client';
12
3
  import { ArrowDownIcon, ArrowUpIcon, FlaskConicalIcon, PlusIcon, Trash2Icon, } from 'lucide-react';
13
4
  import { effortsFor, MAX_MODEL_ENTRIES, } from '../../shared/agents.js';
5
+ import { modelSuggestions, } from '../lib/model-suggestions.js';
14
6
  import { cn } from 'cn';
15
7
  import { moveEntry, newEntryDraft, } from '../pages/agents/agent-model.js';
16
8
  import { EffortSelect, ToolSelect } from './agent-fields.js';
17
9
  import { ModelFields } from './agent-type.js';
18
10
  import { Badge } from './ui/badge.js';
19
11
  import { Button } from './ui/button.js';
20
- import { InputGroup, InputGroupInput } from './ui/input-group.js';
12
+ import { Combobox, ComboboxContent, ComboboxInput, ComboboxItem, ComboboxList, } from './ui/combobox.js';
21
13
  import { Tooltip, TooltipContent, TooltipTrigger } from './ui/tooltip.js';
22
- /** A model typed freely, with the tool's common models suggested as the person types. */
23
- export function ModelInput({ id, tool, value, disabled, placeholder, ariaLabel, onChange, }) {
14
+ function ModelSources({ suggestion, }) {
15
+ const { t } = useTranslation();
16
+ const available = suggestion.runners.filter((runner) => runner.available).length;
17
+ return (_jsx("span", { className: 'ml-auto inline-flex shrink-0 flex-nowrap items-center gap-1 whitespace-nowrap', children: suggestion.runners.length > 0 ? (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { render: _jsx(Badge, { variant: 'outline' }), children: t('modelEntries.availableRunners', { count: available }) }), _jsx(TooltipContent, { children: _jsx("ul", { children: suggestion.runners.map((runner) => (_jsxs("li", { children: [runner.name, " \u00B7", ' ', t(runner.available
18
+ ? 'modelEntries.runnerReady'
19
+ : 'modelEntries.runnerNotReady')] }, runner.id))) }) })] })) : null }));
20
+ }
21
+ /** A model typed freely, with common models and the visible runners' reports suggested as the person types. */
22
+ export function ModelInput({ id, tool, runners, value, disabled, placeholder, ariaLabel, onChange, }) {
24
23
  const { t } = useTranslation();
25
- return (_jsxs(Autocomplete.Root, { items: TOOL_MODEL_SUGGESTIONS[tool], value: value, openOnInputClick: true, disabled: disabled, onValueChange: (next) => onChange(next), children: [_jsx(InputGroup, { className: 'w-full', children: _jsx(Autocomplete.Input, { id: id, render: _jsx(InputGroupInput, { disabled: disabled }), placeholder: placeholder, "aria-label": ariaLabel, title: t('modelEntries.suggestions') }) }), _jsx(Autocomplete.Portal, { children: _jsx(Autocomplete.Positioner, { side: 'bottom', sideOffset: 6, align: 'start', className: 'isolate z-50', children: _jsx(Autocomplete.Popup, { "data-slot": 'combobox-content', className: 'max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) origin-(--transform-origin) overflow-hidden rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95', children: _jsx(Autocomplete.List, { className: 'max-h-72 scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0', children: (item) => (_jsx(Autocomplete.Item, { value: item, className: 'relative flex w-full cursor-default items-center gap-2 rounded-md px-1.5 py-1 font-mono text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground', children: item }, item)) }) }) }) })] }));
24
+ const suggestions = modelSuggestions(tool, runners);
25
+ const byId = new Map(suggestions.map((suggestion) => [suggestion.id, suggestion]));
26
+ return (_jsxs(Combobox, { items: suggestions.map((suggestion) => suggestion.id), value: value || null, inputValue: value, onValueChange: (next) => onChange(next ?? ''), onInputValueChange: (next) => onChange(next), openOnInputClick: true, disabled: disabled, children: [_jsx(ComboboxInput, { id: id, className: 'w-full', disabled: disabled, placeholder: placeholder, "aria-label": ariaLabel, title: t('modelEntries.suggestions') }), _jsx(ComboboxContent
27
+ // Fit the model and both source badges even when the form's input is narrow; cap growth at the viewport.
28
+ , {
29
+ // Fit the model and both source badges even when the form's input is narrow; cap growth at the viewport.
30
+ style: {
31
+ width: 'max-content',
32
+ minWidth: 'min(var(--available-width), max(var(--anchor-width), calc(var(--spacing) * 144)))',
33
+ maxWidth: 'var(--available-width)',
34
+ }, children: _jsx(ComboboxList, { children: (item) => (_jsxs(ComboboxItem, { value: item, className: 'flex-nowrap', children: [_jsx("span", { title: item, className: 'min-w-0 truncate font-mono', children: item }), _jsx(ModelSources, { suggestion: byId.get(item) })] }, item)) }) })] }));
26
35
  }
27
36
  /**
28
37
  * Columns: index and default badge, tool or service, model, effort, the row's buttons. The header and every row are
@@ -63,19 +72,32 @@ export function ModelEntriesEditor({ idPrefix, type, value, runners, catalog, di
63
72
  ? t('agentForm.modelService')
64
73
  : t('agentForm.tool') }), _jsx("span", { children: t('agentForm.model') }), _jsx("span", { children: t('agentForm.reasoningEffort') }), _jsx("span", {})] }), _jsx("ol", { className: cn(ROW, 'gap-y-1.5'), "aria-label": t('modelEntries.title'), children: value.map((entry, index) => {
65
74
  const rowId = `${idPrefix}-${index}`;
66
- return (_jsxs("li", { "data-testid": 'ag-model-entry', "aria-label": t('modelEntries.row', { index: index + 1 }), className: ROW, children: [_jsxs("div", { className: 'flex items-center gap-1.5', children: [_jsx("span", { className: 'w-4 text-right text-sm text-muted-foreground tabular-nums', children: index + 1 }), index === 0 ? (_jsx(Badge, { variant: 'secondary', children: t('modelEntries.default') })) : null] }), type === 'online' ? (_jsx(ModelFields, { idPrefix: rowId, catalog: catalog, modelService: entry.modelService, model: entry.model, disabled: disabled, onChange: (modelService, model) => replace(index, { modelService, model }) })) : (_jsxs(_Fragment, { children: [_jsx(ToolSelect, { id: `${rowId}-tool`, value: entry.tool, runners: runners, disabled: disabled, ariaLabel: t('agentForm.tool'), onChange: (tool) => replace(index, {
75
+ const reportedEfforts = type === 'runner'
76
+ ? modelSuggestions(entry.tool, runners).find((item) => item.id === entry.model.trim())?.efforts
77
+ : undefined;
78
+ const allowedEfforts = effortsFor(type === 'online'
79
+ ? { modelService: entry.modelService }
80
+ : { tool: entry.tool });
81
+ const offeredEfforts = reportedEfforts === undefined
82
+ ? allowedEfforts
83
+ : allowedEfforts.filter((effort) => reportedEfforts.includes(effort));
84
+ return (_jsxs("li", { "data-testid": 'ag-model-entry', "aria-label": t('modelEntries.row', { index: index + 1 }), className: cn(ROW, 'gap-y-1'), children: [_jsxs("div", { className: 'flex items-center gap-1.5', children: [_jsx("span", { className: 'w-4 text-right text-sm text-muted-foreground tabular-nums', children: index + 1 }), index === 0 ? (_jsx(Badge, { variant: 'secondary', children: t('modelEntries.default') })) : null] }), type === 'online' ? (_jsx(ModelFields, { idPrefix: rowId, catalog: catalog, modelService: entry.modelService, model: entry.model, disabled: disabled, onChange: (modelService, model) => replace(index, { modelService, model }) })) : (_jsxs(_Fragment, { children: [_jsx(ToolSelect, { id: `${rowId}-tool`, value: entry.tool, runners: runners, disabled: disabled, ariaLabel: t('agentForm.tool'), onChange: (tool) => replace(index, {
67
85
  tool,
68
86
  effort: effortFor(tool, entry.effort),
69
- }) }), _jsx(ModelInput, { id: `${rowId}-model`, tool: entry.tool, value: entry.model, disabled: disabled, placeholder: t('agents.defaultModel'), ariaLabel: t('agentForm.model'), onChange: (model) => replace(index, { model }) })] })), _jsx(EffortSelect, { id: `${rowId}-effort`, efforts: effortsFor(type === 'online'
70
- ? { modelService: entry.modelService }
71
- : { tool: entry.tool }), value: entry.effort, disabled: disabled, ariaLabel: t('agentForm.reasoningEffort'), onChange: (effort) => replace(index, { effort }) }), _jsxs("div", { className: 'flex items-center', children: [type === 'online' && onTest ? (_jsx(Button, { type: 'button', variant: 'ghost', size: 'icon-sm', "aria-label": t('modelSection.test'), title: t('modelSection.test'), disabled: !entry.modelService ||
87
+ }) }), _jsx(ModelInput, { id: `${rowId}-model`, tool: entry.tool, runners: runners, value: entry.model, disabled: disabled, placeholder: t('agents.defaultModel'), ariaLabel: t('agentForm.model'), onChange: (model) => replace(index, { model }) })] })), _jsx(EffortSelect, { id: `${rowId}-effort`, efforts: offeredEfforts, value: entry.effort, disabled: disabled, ariaLabel: t('agentForm.reasoningEffort'), onChange: (effort) => replace(index, { effort }) }), _jsxs("div", { className: 'flex items-center', children: [type === 'online' && onTest ? (_jsx(Button, { type: 'button', variant: 'ghost', size: 'icon-sm', "aria-label": t('modelSection.test'), title: t('modelSection.test'), disabled: !entry.modelService ||
72
88
  !entry.model ||
73
89
  testing === entry.key, onClick: () => onTest(entry), children: _jsx(FlaskConicalIcon, {}) })) : null, _jsx(Button, { type: 'button', variant: 'ghost', size: 'icon-sm', "aria-label": t('modelEntries.moveUp'), title: t('modelEntries.moveUp'), disabled: disabled || index === 0, onClick: () => onChange(moveEntry(value, index, index - 1)), children: _jsx(ArrowUpIcon, {}) }), _jsx(Button, { type: 'button', variant: 'ghost', size: 'icon-sm', "aria-label": t('modelEntries.moveDown'), title: t('modelEntries.moveDown'), disabled: disabled || index === value.length - 1, onClick: () => onChange(moveEntry(value, index, index + 1)), children: _jsx(ArrowDownIcon, {}) }), _jsx(RemoveButton
74
90
  // A runner agent needs an entry to run; an online one may wait for a model.
75
91
  , {
76
92
  // A runner agent needs an entry to run; an online one may wait for a model.
77
- required: type === 'runner' && value.length === 1, disabled: disabled, onClick: () => onChange(value.filter((_, at) => at !== index)) })] })] }, entry.key));
78
- }) })] }) })) : type === 'online' ? (empty) : (_jsx("p", { className: 'text-sm text-muted-foreground', children: t('modelEntries.required') })), _jsx("div", { children: _jsxs(Button, { type: 'button', variant: 'ghost', size: 'sm', disabled: disabled || value.length >= MAX_MODEL_ENTRIES, onClick: add, children: [_jsx(PlusIcon, { "data-icon": 'inline-start' }), type === 'online' && value.length === 0
93
+ required: type === 'runner' && value.length === 1, disabled: disabled, onClick: () => onChange(value.filter((_, at) => at !== index)) })] }), reportedEfforts !== undefined ? (_jsxs("p", { className: 'col-[2/-1] text-xs text-muted-foreground', children: [t('modelEntries.reportedEfforts', {
94
+ efforts: offeredEfforts.length
95
+ ? offeredEfforts.join(', ')
96
+ : t('modelEntries.noReportedEfforts'),
97
+ }), entry.effort && !offeredEfforts.includes(entry.effort)
98
+ ? ` ${t('modelEntries.effortNotReported', { effort: entry.effort })}`
99
+ : ''] })) : null] }, entry.key));
100
+ }) })] }) })) : type === 'online' ? (empty) : (_jsx("p", { className: 'text-sm text-muted-foreground', children: t('modelEntries.required') })), type === 'runner' ? (_jsx("p", { className: 'text-xs text-muted-foreground', children: t('modelEntries.reportHint') })) : null, _jsx("div", { children: _jsxs(Button, { type: 'button', variant: 'ghost', size: 'sm', disabled: disabled || value.length >= MAX_MODEL_ENTRIES, onClick: add, children: [_jsx(PlusIcon, { "data-icon": 'inline-start' }), type === 'online' && value.length === 0
79
101
  ? t('modelEntries.choose')
80
102
  : t('modelEntries.add')] }) })] }));
81
103
  }