@nocobase/app-plugin-agents 0.1.0-beta.1 → 0.1.0-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (594) hide show
  1. package/CHANGELOG.md +355 -0
  2. package/README.md +107 -67
  3. package/dist/client/api/client.d.ts +25 -17
  4. package/dist/client/api/client.d.ts.map +1 -1
  5. package/dist/client/api/client.js +29 -27
  6. package/dist/client/api/client.js.map +1 -1
  7. package/dist/client/api/keys.d.ts +1 -1
  8. package/dist/client/api/keys.d.ts.map +1 -1
  9. package/dist/client/api/keys.js +1 -1
  10. package/dist/client/api/keys.js.map +1 -1
  11. package/dist/client/chat/api.d.ts +2 -7
  12. package/dist/client/chat/api.d.ts.map +1 -1
  13. package/dist/client/chat/api.js +0 -7
  14. package/dist/client/chat/api.js.map +1 -1
  15. package/dist/client/chat/consultation-identity.d.ts +7 -0
  16. package/dist/client/chat/consultation-identity.d.ts.map +1 -0
  17. package/dist/client/chat/consultation-identity.js +39 -0
  18. package/dist/client/chat/consultation-identity.js.map +1 -0
  19. package/dist/client/chat/message-model.d.ts +4 -2
  20. package/dist/client/chat/message-model.d.ts.map +1 -1
  21. package/dist/client/chat/message-model.js +28 -3
  22. package/dist/client/chat/message-model.js.map +1 -1
  23. package/dist/client/chat/use-chat.d.ts +2 -10
  24. package/dist/client/chat/use-chat.d.ts.map +1 -1
  25. package/dist/client/chat/use-chat.js +3 -10
  26. package/dist/client/chat/use-chat.js.map +1 -1
  27. package/dist/client/chat.d.ts +4 -1
  28. package/dist/client/chat.d.ts.map +1 -1
  29. package/dist/client/chat.js +3 -0
  30. package/dist/client/chat.js.map +1 -1
  31. package/dist/client/components/agent-picker.d.ts +6 -23
  32. package/dist/client/components/agent-picker.d.ts.map +1 -1
  33. package/dist/client/components/agent-picker.js +19 -39
  34. package/dist/client/components/agent-picker.js.map +1 -1
  35. package/dist/client/components/variables/variable-dialogs.d.ts +6 -1
  36. package/dist/client/components/variables/variable-dialogs.d.ts.map +1 -1
  37. package/dist/client/components/variables/variable-dialogs.js +27 -11
  38. package/dist/client/components/variables/variable-dialogs.js.map +1 -1
  39. package/dist/client/components/variables/variables-panel.d.ts.map +1 -1
  40. package/dist/client/components/variables/variables-panel.js +9 -2
  41. package/dist/client/components/variables/variables-panel.js.map +1 -1
  42. package/dist/client/hooks/use-agent-picker-labels.d.ts.map +1 -1
  43. package/dist/client/hooks/use-agent-picker-labels.js +3 -12
  44. package/dist/client/hooks/use-agent-picker-labels.js.map +1 -1
  45. package/dist/client/kit.d.ts +9 -12
  46. package/dist/client/kit.d.ts.map +1 -1
  47. package/dist/client/kit.js +12 -14
  48. package/dist/client/kit.js.map +1 -1
  49. package/dist/client/lib/agents.d.ts +5 -13
  50. package/dist/client/lib/agents.d.ts.map +1 -1
  51. package/dist/client/lib/agents.js +17 -32
  52. package/dist/client/lib/agents.js.map +1 -1
  53. package/dist/client/lib/install.js +1 -1
  54. package/dist/client/locales/chat.en-US.d.ts +9 -22
  55. package/dist/client/locales/chat.en-US.d.ts.map +1 -1
  56. package/dist/client/locales/chat.en-US.js +13 -25
  57. package/dist/client/locales/chat.en-US.js.map +1 -1
  58. package/dist/client/locales/chat.zh-CN.d.ts.map +1 -1
  59. package/dist/client/locales/chat.zh-CN.js +10 -22
  60. package/dist/client/locales/chat.zh-CN.js.map +1 -1
  61. package/dist/client/locales/en-US.d.ts +100 -219
  62. package/dist/client/locales/en-US.d.ts.map +1 -1
  63. package/dist/client/locales/en-US.js +105 -219
  64. package/dist/client/locales/en-US.js.map +1 -1
  65. package/dist/client/locales/runWait.en-US.d.ts +38 -0
  66. package/dist/client/locales/runWait.en-US.d.ts.map +1 -0
  67. package/dist/client/locales/runWait.en-US.js +37 -0
  68. package/dist/client/locales/runWait.en-US.js.map +1 -0
  69. package/dist/client/locales/runWait.zh-CN.d.ts +5 -0
  70. package/dist/client/locales/runWait.zh-CN.d.ts.map +1 -0
  71. package/dist/client/locales/runWait.zh-CN.js +32 -0
  72. package/dist/client/locales/runWait.zh-CN.js.map +1 -0
  73. package/dist/client/locales/runtimes.en-US.d.ts +55 -0
  74. package/dist/client/locales/runtimes.en-US.d.ts.map +1 -1
  75. package/dist/client/locales/runtimes.en-US.js +58 -3
  76. package/dist/client/locales/runtimes.en-US.js.map +1 -1
  77. package/dist/client/locales/runtimes.zh-CN.d.ts.map +1 -1
  78. package/dist/client/locales/runtimes.zh-CN.js +58 -3
  79. package/dist/client/locales/runtimes.zh-CN.js.map +1 -1
  80. package/dist/client/locales/zh-CN.d.ts.map +1 -1
  81. package/dist/client/locales/zh-CN.js +107 -221
  82. package/dist/client/locales/zh-CN.js.map +1 -1
  83. package/dist/client/online/services.d.ts.map +1 -1
  84. package/dist/client/online/services.js +5 -6
  85. package/dist/client/online/services.js.map +1 -1
  86. package/dist/client/pages/agents/agent-dialog.d.ts +9 -0
  87. package/dist/client/pages/agents/agent-dialog.d.ts.map +1 -0
  88. package/dist/client/pages/agents/agent-dialog.js +106 -0
  89. package/dist/client/pages/agents/agent-dialog.js.map +1 -0
  90. package/dist/client/pages/agents/agent-state.d.ts +11 -0
  91. package/dist/client/pages/agents/agent-state.d.ts.map +1 -0
  92. package/dist/client/pages/agents/agent-state.js +28 -0
  93. package/dist/client/pages/agents/agent-state.js.map +1 -0
  94. package/dist/client/pages/agents/index.d.ts +1 -1
  95. package/dist/client/pages/agents/index.d.ts.map +1 -1
  96. package/dist/client/pages/agents/index.js +6 -100
  97. package/dist/client/pages/agents/index.js.map +1 -1
  98. package/dist/client/pages/agents/runner-agents.d.ts +3 -0
  99. package/dist/client/pages/agents/runner-agents.d.ts.map +1 -0
  100. package/dist/client/pages/agents/runner-agents.js +172 -0
  101. package/dist/client/pages/agents/runner-agents.js.map +1 -0
  102. package/dist/client/pages/runtimes/connect.js +1 -1
  103. package/dist/client/pages/runtimes/connect.js.map +1 -1
  104. package/dist/client/pages/runtimes/index.d.ts.map +1 -1
  105. package/dist/client/pages/runtimes/index.js +3 -2
  106. package/dist/client/pages/runtimes/index.js.map +1 -1
  107. package/dist/client/pages/runtimes/runner-cells.d.ts +1 -1
  108. package/dist/client/pages/runtimes/runner-cells.d.ts.map +1 -1
  109. package/dist/client/pages/runtimes/runner-cells.js +4 -1
  110. package/dist/client/pages/runtimes/runner-cells.js.map +1 -1
  111. package/dist/client/pages/runtimes/runner-sheet.d.ts.map +1 -1
  112. package/dist/client/pages/runtimes/runner-sheet.js +12 -3
  113. package/dist/client/pages/runtimes/runner-sheet.js.map +1 -1
  114. package/dist/client/pages/runtimes/workspace-diagnostics.d.ts +9 -0
  115. package/dist/client/pages/runtimes/workspace-diagnostics.d.ts.map +1 -0
  116. package/dist/client/pages/runtimes/workspace-diagnostics.js +70 -0
  117. package/dist/client/pages/runtimes/workspace-diagnostics.js.map +1 -0
  118. package/dist/client/pages/usage/index.js +2 -2
  119. package/dist/client/pages/usage/index.js.map +1 -1
  120. package/dist/client/profile/default-agent.d.ts.map +1 -1
  121. package/dist/client/profile/default-agent.js +2 -4
  122. package/dist/client/profile/default-agent.js.map +1 -1
  123. package/dist/client/routes.d.ts +1 -1
  124. package/dist/client/routes.d.ts.map +1 -1
  125. package/dist/client/routes.js +1 -13
  126. package/dist/client/routes.js.map +1 -1
  127. package/dist/client/runs/format-wait.d.ts +21 -0
  128. package/dist/client/runs/format-wait.d.ts.map +1 -0
  129. package/dist/client/runs/format-wait.js +90 -0
  130. package/dist/client/runs/format-wait.js.map +1 -0
  131. package/dist/client/runs/subject-runs.d.ts +5 -0
  132. package/dist/client/runs/subject-runs.d.ts.map +1 -1
  133. package/dist/client/runs/subject-runs.js +13 -7
  134. package/dist/client/runs/subject-runs.js.map +1 -1
  135. package/dist/client/runs.d.ts +3 -1
  136. package/dist/client/runs.d.ts.map +1 -1
  137. package/dist/client/runs.js +3 -1
  138. package/dist/client/runs.js.map +1 -1
  139. package/dist/database/migrations/.manifest.json +48 -0
  140. package/dist/database/migrations/202610090001_ag_add_team_runner_variables.d.ts +9 -0
  141. package/dist/database/migrations/202610090001_ag_add_team_runner_variables.d.ts.map +1 -0
  142. package/dist/database/migrations/202610090001_ag_add_team_runner_variables.js +28 -0
  143. package/dist/database/migrations/202610090001_ag_add_team_runner_variables.js.map +1 -0
  144. package/dist/database/migrations/202610090002_ag_create_run_requests.d.ts +10 -0
  145. package/dist/database/migrations/202610090002_ag_create_run_requests.d.ts.map +1 -0
  146. package/dist/database/migrations/202610090002_ag_create_run_requests.js +105 -0
  147. package/dist/database/migrations/202610090002_ag_create_run_requests.js.map +1 -0
  148. package/dist/database/migrations/202610090003_ag_add_execution_history.d.ts +4 -0
  149. package/dist/database/migrations/202610090003_ag_add_execution_history.d.ts.map +1 -0
  150. package/dist/database/migrations/202610090003_ag_add_execution_history.js +17 -0
  151. package/dist/database/migrations/202610090003_ag_add_execution_history.js.map +1 -0
  152. package/dist/database/migrations/202610090004_ag_add_runner_workspace_usage.d.ts +9 -0
  153. package/dist/database/migrations/202610090004_ag_add_runner_workspace_usage.d.ts.map +1 -0
  154. package/dist/database/migrations/202610090004_ag_add_runner_workspace_usage.js +22 -0
  155. package/dist/database/migrations/202610090004_ag_add_runner_workspace_usage.js.map +1 -0
  156. package/dist/database/migrations/202610090005_ag_add_runner_variables.d.ts +10 -0
  157. package/dist/database/migrations/202610090005_ag_add_runner_variables.d.ts.map +1 -0
  158. package/dist/database/migrations/202610090005_ag_add_runner_variables.js +36 -0
  159. package/dist/database/migrations/202610090005_ag_add_runner_variables.js.map +1 -0
  160. package/dist/database/migrations/202610100001_ag_index_run_event_types.d.ts +4 -0
  161. package/dist/database/migrations/202610100001_ag_index_run_event_types.d.ts.map +1 -0
  162. package/dist/database/migrations/202610100001_ag_index_run_event_types.js +17 -0
  163. package/dist/database/migrations/202610100001_ag_index_run_event_types.js.map +1 -0
  164. package/dist/database/migrations/202610100002_ag_add_run_git_credentials.d.ts +9 -0
  165. package/dist/database/migrations/202610100002_ag_add_run_git_credentials.d.ts.map +1 -0
  166. package/dist/database/migrations/202610100002_ag_add_run_git_credentials.js +30 -0
  167. package/dist/database/migrations/202610100002_ag_add_run_git_credentials.js.map +1 -0
  168. package/dist/database/migrations/202610110001_ag_add_fresh_sessions.d.ts +4 -0
  169. package/dist/database/migrations/202610110001_ag_add_fresh_sessions.d.ts.map +1 -0
  170. package/dist/database/migrations/202610110001_ag_add_fresh_sessions.js +23 -0
  171. package/dist/database/migrations/202610110001_ag_add_fresh_sessions.js.map +1 -0
  172. package/dist/database/migrations/202610120001_ag_index_run_retries.d.ts +4 -0
  173. package/dist/database/migrations/202610120001_ag_index_run_retries.d.ts.map +1 -0
  174. package/dist/database/migrations/202610120001_ag_index_run_retries.js +17 -0
  175. package/dist/database/migrations/202610120001_ag_index_run_retries.js.map +1 -0
  176. package/dist/database/migrations/202610120002_ag_add_queue_entered_at.d.ts +4 -0
  177. package/dist/database/migrations/202610120002_ag_add_queue_entered_at.d.ts.map +1 -0
  178. package/dist/database/migrations/202610120002_ag_add_queue_entered_at.js +50 -0
  179. package/dist/database/migrations/202610120002_ag_add_queue_entered_at.js.map +1 -0
  180. package/dist/database/migrations/202610240020_ag_runner_agents.d.ts +4 -0
  181. package/dist/database/migrations/202610240020_ag_runner_agents.d.ts.map +1 -0
  182. package/dist/database/migrations/202610240020_ag_runner_agents.js +115 -0
  183. package/dist/database/migrations/202610240020_ag_runner_agents.js.map +1 -0
  184. package/dist/database/migrations/202610240040_ag_discovery_preferences.d.ts +4 -0
  185. package/dist/database/migrations/202610240040_ag_discovery_preferences.d.ts.map +1 -0
  186. package/dist/database/migrations/202610240040_ag_discovery_preferences.js +18 -0
  187. package/dist/database/migrations/202610240040_ag_discovery_preferences.js.map +1 -0
  188. package/dist/package.json +8 -10
  189. package/dist/server/cli/run-credential.js +1 -1
  190. package/dist/server/composition.d.ts +39 -37
  191. package/dist/server/composition.d.ts.map +1 -1
  192. package/dist/server/composition.js +53 -65
  193. package/dist/server/composition.js.map +1 -1
  194. package/dist/server/core/agents/agent.service.d.ts +51 -43
  195. package/dist/server/core/agents/agent.service.d.ts.map +1 -1
  196. package/dist/server/core/agents/agent.service.js +342 -317
  197. package/dist/server/core/agents/agent.service.js.map +1 -1
  198. package/dist/server/core/agents/agent.store.d.ts +24 -12
  199. package/dist/server/core/agents/agent.store.d.ts.map +1 -1
  200. package/dist/server/core/agents/agent.store.js +65 -64
  201. package/dist/server/core/agents/agent.store.js.map +1 -1
  202. package/dist/server/core/agents/agent.views.d.ts +29 -0
  203. package/dist/server/core/agents/agent.views.d.ts.map +1 -0
  204. package/dist/server/core/agents/agent.views.js +86 -0
  205. package/dist/server/core/agents/agent.views.js.map +1 -0
  206. package/dist/server/core/agents/discovery.d.ts +12 -0
  207. package/dist/server/core/agents/discovery.d.ts.map +1 -0
  208. package/dist/server/core/agents/discovery.js +39 -0
  209. package/dist/server/core/agents/discovery.js.map +1 -0
  210. package/dist/server/core/agents/index.d.ts +2 -1
  211. package/dist/server/core/agents/index.d.ts.map +1 -1
  212. package/dist/server/core/agents/index.js +2 -1
  213. package/dist/server/core/agents/index.js.map +1 -1
  214. package/dist/server/core/brief/brief.js +1 -1
  215. package/dist/server/core/brief/brief.js.map +1 -1
  216. package/dist/server/core/callers/index.d.ts +1 -1
  217. package/dist/server/core/conversations/availability.d.ts +11 -10
  218. package/dist/server/core/conversations/availability.d.ts.map +1 -1
  219. package/dist/server/core/conversations/availability.js +14 -32
  220. package/dist/server/core/conversations/availability.js.map +1 -1
  221. package/dist/server/core/conversations/chat-settings.d.ts.map +1 -1
  222. package/dist/server/core/conversations/chat-settings.js +5 -3
  223. package/dist/server/core/conversations/chat-settings.js.map +1 -1
  224. package/dist/server/core/conversations/conversation.service.d.ts +3 -5
  225. package/dist/server/core/conversations/conversation.service.d.ts.map +1 -1
  226. package/dist/server/core/conversations/conversation.service.js +161 -221
  227. package/dist/server/core/conversations/conversation.service.js.map +1 -1
  228. package/dist/server/core/conversations/ports.d.ts +3 -17
  229. package/dist/server/core/conversations/ports.d.ts.map +1 -1
  230. package/dist/server/core/reports/report.service.d.ts.map +1 -1
  231. package/dist/server/core/reports/report.service.js +5 -2
  232. package/dist/server/core/reports/report.service.js.map +1 -1
  233. package/dist/server/core/runs/availability.d.ts +18 -7
  234. package/dist/server/core/runs/availability.d.ts.map +1 -1
  235. package/dist/server/core/runs/availability.js +35 -24
  236. package/dist/server/core/runs/availability.js.map +1 -1
  237. package/dist/server/core/runs/claim.d.ts +33 -65
  238. package/dist/server/core/runs/claim.d.ts.map +1 -1
  239. package/dist/server/core/runs/claim.js +566 -307
  240. package/dist/server/core/runs/claim.js.map +1 -1
  241. package/dist/server/core/runs/eligibility.d.ts +51 -0
  242. package/dist/server/core/runs/eligibility.d.ts.map +1 -0
  243. package/dist/server/core/runs/eligibility.js +44 -0
  244. package/dist/server/core/runs/eligibility.js.map +1 -0
  245. package/dist/server/core/runs/execution-view.d.ts +10 -0
  246. package/dist/server/core/runs/execution-view.d.ts.map +1 -0
  247. package/dist/server/core/runs/execution-view.js +25 -0
  248. package/dist/server/core/runs/execution-view.js.map +1 -0
  249. package/dist/server/core/runs/execution.d.ts +13 -0
  250. package/dist/server/core/runs/execution.d.ts.map +1 -0
  251. package/dist/server/core/runs/execution.js +85 -0
  252. package/dist/server/core/runs/execution.js.map +1 -0
  253. package/dist/server/core/runs/extensions.d.ts +59 -4
  254. package/dist/server/core/runs/extensions.d.ts.map +1 -1
  255. package/dist/server/core/runs/extensions.js +45 -9
  256. package/dist/server/core/runs/extensions.js.map +1 -1
  257. package/dist/server/core/runs/git-credentials.d.ts +43 -0
  258. package/dist/server/core/runs/git-credentials.d.ts.map +1 -0
  259. package/dist/server/core/runs/git-credentials.js +129 -0
  260. package/dist/server/core/runs/git-credentials.js.map +1 -0
  261. package/dist/server/core/runs/identity.d.ts +6 -0
  262. package/dist/server/core/runs/identity.d.ts.map +1 -0
  263. package/dist/server/core/runs/identity.js +49 -0
  264. package/dist/server/core/runs/identity.js.map +1 -0
  265. package/dist/server/core/runs/index.d.ts +9 -5
  266. package/dist/server/core/runs/index.d.ts.map +1 -1
  267. package/dist/server/core/runs/index.js +9 -5
  268. package/dist/server/core/runs/index.js.map +1 -1
  269. package/dist/server/core/runs/input-gate.d.ts +34 -0
  270. package/dist/server/core/runs/input-gate.d.ts.map +1 -0
  271. package/dist/server/core/runs/input-gate.js +54 -0
  272. package/dist/server/core/runs/input-gate.js.map +1 -0
  273. package/dist/server/core/runs/lifecycle.d.ts +9 -19
  274. package/dist/server/core/runs/lifecycle.d.ts.map +1 -1
  275. package/dist/server/core/runs/lifecycle.js +76 -34
  276. package/dist/server/core/runs/lifecycle.js.map +1 -1
  277. package/dist/server/core/runs/policy.d.ts +8 -0
  278. package/dist/server/core/runs/policy.d.ts.map +1 -1
  279. package/dist/server/core/runs/policy.js +10 -0
  280. package/dist/server/core/runs/policy.js.map +1 -1
  281. package/dist/server/core/runs/ports.d.ts +84 -28
  282. package/dist/server/core/runs/ports.d.ts.map +1 -1
  283. package/dist/server/core/runs/ports.js +2 -13
  284. package/dist/server/core/runs/ports.js.map +1 -1
  285. package/dist/server/core/runs/preview.d.ts.map +1 -1
  286. package/dist/server/core/runs/preview.js +3 -3
  287. package/dist/server/core/runs/preview.js.map +1 -1
  288. package/dist/server/core/runs/run-requests.d.ts +220 -0
  289. package/dist/server/core/runs/run-requests.d.ts.map +1 -0
  290. package/dist/server/core/runs/run-requests.js +475 -0
  291. package/dist/server/core/runs/run-requests.js.map +1 -0
  292. package/dist/server/core/runs/run.service.d.ts +84 -11
  293. package/dist/server/core/runs/run.service.d.ts.map +1 -1
  294. package/dist/server/core/runs/run.service.js +433 -93
  295. package/dist/server/core/runs/run.service.js.map +1 -1
  296. package/dist/server/core/runs/run.store.d.ts +20 -3
  297. package/dist/server/core/runs/run.store.d.ts.map +1 -1
  298. package/dist/server/core/runs/run.store.js +49 -2
  299. package/dist/server/core/runs/run.store.js.map +1 -1
  300. package/dist/server/core/runs/runner-view.d.ts +6 -4
  301. package/dist/server/core/runs/runner-view.d.ts.map +1 -1
  302. package/dist/server/core/runs/runner-view.js +13 -11
  303. package/dist/server/core/runs/runner-view.js.map +1 -1
  304. package/dist/server/core/runs/selection.d.ts +13 -0
  305. package/dist/server/core/runs/selection.d.ts.map +1 -0
  306. package/dist/server/core/runs/selection.js +21 -0
  307. package/dist/server/core/runs/selection.js.map +1 -0
  308. package/dist/server/core/runs/sweeper.d.ts.map +1 -1
  309. package/dist/server/core/runs/sweeper.js +54 -10
  310. package/dist/server/core/runs/sweeper.js.map +1 -1
  311. package/dist/server/core/runs/transitions.d.ts +1 -1
  312. package/dist/server/core/runs/transitions.d.ts.map +1 -1
  313. package/dist/server/core/runs/transitions.js +69 -5
  314. package/dist/server/core/runs/transitions.js.map +1 -1
  315. package/dist/server/core/runs/workload.d.ts +3 -3
  316. package/dist/server/core/runs/workload.d.ts.map +1 -1
  317. package/dist/server/core/runs/workload.js +154 -45
  318. package/dist/server/core/runs/workload.js.map +1 -1
  319. package/dist/server/core/variables/index.d.ts +1 -1
  320. package/dist/server/core/variables/index.d.ts.map +1 -1
  321. package/dist/server/core/variables/index.js +1 -1
  322. package/dist/server/core/variables/index.js.map +1 -1
  323. package/dist/server/core/variables/variable.service.d.ts +38 -6
  324. package/dist/server/core/variables/variable.service.d.ts.map +1 -1
  325. package/dist/server/core/variables/variable.service.js +201 -30
  326. package/dist/server/core/variables/variable.service.js.map +1 -1
  327. package/dist/server/distribution/dist.service.d.ts +27 -5
  328. package/dist/server/distribution/dist.service.d.ts.map +1 -1
  329. package/dist/server/distribution/dist.service.js +41 -5
  330. package/dist/server/distribution/dist.service.js.map +1 -1
  331. package/dist/server/distribution/download-tokens.d.ts +1 -1
  332. package/dist/server/distribution/download-tokens.d.ts.map +1 -1
  333. package/dist/server/distribution/download-tokens.js +7 -4
  334. package/dist/server/distribution/download-tokens.js.map +1 -1
  335. package/dist/server/distribution/index.d.ts +11 -3
  336. package/dist/server/distribution/index.d.ts.map +1 -1
  337. package/dist/server/distribution/index.js +31 -8
  338. package/dist/server/distribution/index.js.map +1 -1
  339. package/dist/server/jobs/index.d.ts +1 -1
  340. package/dist/server/jobs/index.d.ts.map +1 -1
  341. package/dist/server/jobs/index.js +1 -1
  342. package/dist/server/jobs/index.js.map +1 -1
  343. package/dist/server/jobs/job.service.d.ts +3 -1
  344. package/dist/server/jobs/job.service.d.ts.map +1 -1
  345. package/dist/server/jobs/job.service.js +11 -3
  346. package/dist/server/jobs/job.service.js.map +1 -1
  347. package/dist/server/jobs/spec.d.ts +4 -0
  348. package/dist/server/jobs/spec.d.ts.map +1 -1
  349. package/dist/server/jobs/spec.js +6 -0
  350. package/dist/server/jobs/spec.js.map +1 -1
  351. package/dist/server/kernel/errors.d.ts +1 -1
  352. package/dist/server/kernel/errors.d.ts.map +1 -1
  353. package/dist/server/kernel/errors.js +1 -0
  354. package/dist/server/kernel/errors.js.map +1 -1
  355. package/dist/server/kernel/events.d.ts +34 -9
  356. package/dist/server/kernel/events.d.ts.map +1 -1
  357. package/dist/server/kernel/events.js.map +1 -1
  358. package/dist/server/kernel/redaction.d.ts +2 -0
  359. package/dist/server/kernel/redaction.d.ts.map +1 -1
  360. package/dist/server/kernel/redaction.js +17 -0
  361. package/dist/server/kernel/redaction.js.map +1 -1
  362. package/dist/server/online/index.d.ts +0 -5
  363. package/dist/server/online/index.d.ts.map +1 -1
  364. package/dist/server/online/index.js +0 -5
  365. package/dist/server/online/index.js.map +1 -1
  366. package/dist/server/online/routes.d.ts.map +1 -1
  367. package/dist/server/online/routes.js +6 -35
  368. package/dist/server/online/routes.js.map +1 -1
  369. package/dist/server/providers/agents.d.ts +4 -25
  370. package/dist/server/providers/agents.d.ts.map +1 -1
  371. package/dist/server/providers/agents.js +8 -75
  372. package/dist/server/providers/agents.js.map +1 -1
  373. package/dist/server/routes/admin.d.ts.map +1 -1
  374. package/dist/server/routes/admin.js +140 -201
  375. package/dist/server/routes/admin.js.map +1 -1
  376. package/dist/server/routes/chat.d.ts.map +1 -1
  377. package/dist/server/routes/chat.js +12 -70
  378. package/dist/server/routes/chat.js.map +1 -1
  379. package/dist/server/routes/index.d.ts.map +1 -1
  380. package/dist/server/routes/index.js +11 -1
  381. package/dist/server/routes/index.js.map +1 -1
  382. package/dist/server/routes/roster.d.ts.map +1 -1
  383. package/dist/server/routes/roster.js +6 -21
  384. package/dist/server/routes/roster.js.map +1 -1
  385. package/dist/server/routes/run-requests.d.ts +6 -0
  386. package/dist/server/routes/run-requests.d.ts.map +1 -0
  387. package/dist/server/routes/run-requests.js +216 -0
  388. package/dist/server/routes/run-requests.js.map +1 -0
  389. package/dist/server/routes/runners/admin.d.ts +9 -1
  390. package/dist/server/routes/runners/admin.d.ts.map +1 -1
  391. package/dist/server/routes/runners/admin.js +62 -24
  392. package/dist/server/routes/runners/admin.js.map +1 -1
  393. package/dist/server/routes/runners/dist.d.ts +5 -1
  394. package/dist/server/routes/runners/dist.d.ts.map +1 -1
  395. package/dist/server/routes/runners/dist.js +36 -9
  396. package/dist/server/routes/runners/dist.js.map +1 -1
  397. package/dist/server/routes/runners/install.d.ts.map +1 -1
  398. package/dist/server/routes/runners/install.js +98 -15
  399. package/dist/server/routes/runners/install.js.map +1 -1
  400. package/dist/server/routes/runners/runner.d.ts.map +1 -1
  401. package/dist/server/routes/runners/runner.js +25 -7
  402. package/dist/server/routes/runners/runner.js.map +1 -1
  403. package/dist/server/routes/runners/runs.d.ts +1 -1
  404. package/dist/server/routes/runners/runs.d.ts.map +1 -1
  405. package/dist/server/routes/runners/runs.js +23 -3
  406. package/dist/server/routes/runners/runs.js.map +1 -1
  407. package/dist/server/routes/schemas.d.ts +37 -8
  408. package/dist/server/routes/schemas.d.ts.map +1 -1
  409. package/dist/server/routes/schemas.js +367 -82
  410. package/dist/server/routes/schemas.js.map +1 -1
  411. package/dist/server/runners/index.d.ts +1 -0
  412. package/dist/server/runners/index.d.ts.map +1 -1
  413. package/dist/server/runners/index.js +1 -0
  414. package/dist/server/runners/index.js.map +1 -1
  415. package/dist/server/runners/runner.service.d.ts +22 -8
  416. package/dist/server/runners/runner.service.d.ts.map +1 -1
  417. package/dist/server/runners/runner.service.js +112 -14
  418. package/dist/server/runners/runner.service.js.map +1 -1
  419. package/dist/server/runners/runner.store.d.ts +10 -1
  420. package/dist/server/runners/runner.store.d.ts.map +1 -1
  421. package/dist/server/runners/runner.store.js +117 -4
  422. package/dist/server/runners/runner.store.js.map +1 -1
  423. package/dist/server/runners/sweeper.d.ts +5 -0
  424. package/dist/server/runners/sweeper.d.ts.map +1 -1
  425. package/dist/server/runners/sweeper.js +4 -2
  426. package/dist/server/runners/sweeper.js.map +1 -1
  427. package/dist/server/runners/workspaces.d.ts +33 -0
  428. package/dist/server/runners/workspaces.d.ts.map +1 -0
  429. package/dist/server/runners/workspaces.js +248 -0
  430. package/dist/server/runners/workspaces.js.map +1 -0
  431. package/dist/server/testing.d.ts +0 -2
  432. package/dist/server/testing.d.ts.map +1 -1
  433. package/dist/server/testing.js +1 -4
  434. package/dist/server/testing.js.map +1 -1
  435. package/dist/server/tokens.d.ts +12 -9
  436. package/dist/server/tokens.d.ts.map +1 -1
  437. package/dist/server/tokens.js +6 -2
  438. package/dist/server/tokens.js.map +1 -1
  439. package/dist/shared/access.d.ts +2 -6
  440. package/dist/shared/access.d.ts.map +1 -1
  441. package/dist/shared/access.js +2 -6
  442. package/dist/shared/access.js.map +1 -1
  443. package/dist/shared/agents.d.ts +128 -165
  444. package/dist/shared/agents.d.ts.map +1 -1
  445. package/dist/shared/agents.js +46 -97
  446. package/dist/shared/agents.js.map +1 -1
  447. package/dist/shared/conversations.d.ts +43 -89
  448. package/dist/shared/conversations.d.ts.map +1 -1
  449. package/dist/shared/conversations.js +5 -24
  450. package/dist/shared/conversations.js.map +1 -1
  451. package/dist/shared/model-catalog.d.ts +48 -0
  452. package/dist/shared/model-catalog.d.ts.map +1 -0
  453. package/dist/shared/model-catalog.js +148 -0
  454. package/dist/shared/model-catalog.js.map +1 -0
  455. package/dist/shared/models.js +1 -1
  456. package/dist/shared/models.js.map +1 -1
  457. package/dist/shared/runners.d.ts +107 -17
  458. package/dist/shared/runners.d.ts.map +1 -1
  459. package/dist/shared/runners.js +49 -7
  460. package/dist/shared/runners.js.map +1 -1
  461. package/dist/shared/runs.d.ts +203 -1
  462. package/dist/shared/runs.d.ts.map +1 -1
  463. package/dist/shared/runs.js +24 -0
  464. package/dist/shared/runs.js.map +1 -1
  465. package/dist/shared/variables.d.ts +22 -0
  466. package/dist/shared/variables.d.ts.map +1 -1
  467. package/dist/shared/variables.js +9 -1
  468. package/dist/shared/variables.js.map +1 -1
  469. package/package.json +24 -26
  470. package/skills/nocobase-app-plugin-agents/SKILL.md +8 -7
  471. package/skills/nocobase-app-plugin-agents/references/agents.md +30 -0
  472. package/skills/nocobase-app-plugin-agents/references/distribution.md +21 -4
  473. package/skills/nocobase-app-plugin-agents/references/extension-points.md +30 -20
  474. package/skills/nocobase-app-plugin-agents/references/model-services.md +17 -0
  475. package/skills/nocobase-app-plugin-agents/references/runners.md +15 -1
  476. package/skills/nocobase-app-plugin-agents/references/setup-and-config.md +4 -7
  477. package/skills/nocobase-app-plugin-agents/references/variables-skills-usage.md +4 -4
  478. package/skills/nocobase-app-plugin-agents/references/verification-and-troubleshooting.md +33 -32
  479. package/dist/client/chat/settings-section.d.ts +0 -5
  480. package/dist/client/chat/settings-section.d.ts.map +0 -1
  481. package/dist/client/chat/settings-section.js +0 -76
  482. package/dist/client/chat/settings-section.js.map +0 -1
  483. package/dist/client/components/agent-fields.d.ts +0 -45
  484. package/dist/client/components/agent-fields.d.ts.map +0 -1
  485. package/dist/client/components/agent-fields.js +0 -83
  486. package/dist/client/components/agent-fields.js.map +0 -1
  487. package/dist/client/components/agent-type.d.ts +0 -32
  488. package/dist/client/components/agent-type.d.ts.map +0 -1
  489. package/dist/client/components/agent-type.js +0 -80
  490. package/dist/client/components/agent-type.js.map +0 -1
  491. package/dist/client/components/model-entries.d.ts +0 -35
  492. package/dist/client/components/model-entries.d.ts.map +0 -1
  493. package/dist/client/components/model-entries.js +0 -82
  494. package/dist/client/components/model-entries.js.map +0 -1
  495. package/dist/client/hooks/use-agent-save.d.ts +0 -9
  496. package/dist/client/hooks/use-agent-save.d.ts.map +0 -1
  497. package/dist/client/hooks/use-agent-save.js +0 -40
  498. package/dist/client/hooks/use-agent-save.js.map +0 -1
  499. package/dist/client/hooks/use-model-catalog.d.ts +0 -9
  500. package/dist/client/hooks/use-model-catalog.d.ts.map +0 -1
  501. package/dist/client/hooks/use-model-catalog.js +0 -27
  502. package/dist/client/hooks/use-model-catalog.js.map +0 -1
  503. package/dist/client/lib/tool-policy.d.ts +0 -5
  504. package/dist/client/lib/tool-policy.d.ts.map +0 -1
  505. package/dist/client/lib/tool-policy.js +0 -10
  506. package/dist/client/lib/tool-policy.js.map +0 -1
  507. package/dist/client/online/default-model.d.ts +0 -5
  508. package/dist/client/online/default-model.d.ts.map +0 -1
  509. package/dist/client/online/default-model.js +0 -65
  510. package/dist/client/online/default-model.js.map +0 -1
  511. package/dist/client/pages/agents/agent-model.d.ts +0 -73
  512. package/dist/client/pages/agents/agent-model.d.ts.map +0 -1
  513. package/dist/client/pages/agents/agent-model.js +0 -172
  514. package/dist/client/pages/agents/agent-model.js.map +0 -1
  515. package/dist/client/pages/agents/detail/brief-preview.d.ts +0 -7
  516. package/dist/client/pages/agents/detail/brief-preview.d.ts.map +0 -1
  517. package/dist/client/pages/agents/detail/brief-preview.js +0 -43
  518. package/dist/client/pages/agents/detail/brief-preview.js.map +0 -1
  519. package/dist/client/pages/agents/detail/history.d.ts +0 -11
  520. package/dist/client/pages/agents/detail/history.d.ts.map +0 -1
  521. package/dist/client/pages/agents/detail/history.js +0 -149
  522. package/dist/client/pages/agents/detail/history.js.map +0 -1
  523. package/dist/client/pages/agents/detail/index.d.ts +0 -3
  524. package/dist/client/pages/agents/detail/index.d.ts.map +0 -1
  525. package/dist/client/pages/agents/detail/index.js +0 -241
  526. package/dist/client/pages/agents/detail/index.js.map +0 -1
  527. package/dist/client/pages/agents/detail/sections.d.ts +0 -22
  528. package/dist/client/pages/agents/detail/sections.d.ts.map +0 -1
  529. package/dist/client/pages/agents/detail/sections.js +0 -311
  530. package/dist/client/pages/agents/detail/sections.js.map +0 -1
  531. package/dist/client/pages/agents/detail/tab-draft.d.ts +0 -43
  532. package/dist/client/pages/agents/detail/tab-draft.d.ts.map +0 -1
  533. package/dist/client/pages/agents/detail/tab-draft.js +0 -115
  534. package/dist/client/pages/agents/detail/tab-draft.js.map +0 -1
  535. package/dist/client/pages/agents/detail/unsaved-bar.d.ts +0 -13
  536. package/dist/client/pages/agents/detail/unsaved-bar.d.ts.map +0 -1
  537. package/dist/client/pages/agents/detail/unsaved-bar.js +0 -21
  538. package/dist/client/pages/agents/detail/unsaved-bar.js.map +0 -1
  539. package/dist/client/pages/agents/new.d.ts +0 -3
  540. package/dist/client/pages/agents/new.d.ts.map +0 -1
  541. package/dist/client/pages/agents/new.js +0 -149
  542. package/dist/client/pages/agents/new.js.map +0 -1
  543. package/dist/client/pages/agents/preset-picker.d.ts +0 -8
  544. package/dist/client/pages/agents/preset-picker.d.ts.map +0 -1
  545. package/dist/client/pages/agents/preset-picker.js +0 -41
  546. package/dist/client/pages/agents/preset-picker.js.map +0 -1
  547. package/dist/server/core/consultations/consultation.service.d.ts +0 -59
  548. package/dist/server/core/consultations/consultation.service.d.ts.map +0 -1
  549. package/dist/server/core/consultations/consultation.service.js +0 -195
  550. package/dist/server/core/consultations/consultation.service.js.map +0 -1
  551. package/dist/server/core/consultations/index.d.ts +0 -3
  552. package/dist/server/core/consultations/index.d.ts.map +0 -1
  553. package/dist/server/core/consultations/index.js +0 -3
  554. package/dist/server/core/consultations/index.js.map +0 -1
  555. package/dist/server/core/consultations/prompt.d.ts +0 -41
  556. package/dist/server/core/consultations/prompt.d.ts.map +0 -1
  557. package/dist/server/core/consultations/prompt.js +0 -64
  558. package/dist/server/core/consultations/prompt.js.map +0 -1
  559. package/dist/server/core/presets/index.d.ts +0 -19
  560. package/dist/server/core/presets/index.d.ts.map +0 -1
  561. package/dist/server/core/presets/index.js +0 -28
  562. package/dist/server/core/presets/index.js.map +0 -1
  563. package/dist/server/online/cli-command.d.ts +0 -20
  564. package/dist/server/online/cli-command.d.ts.map +0 -1
  565. package/dist/server/online/cli-command.js +0 -345
  566. package/dist/server/online/cli-command.js.map +0 -1
  567. package/dist/server/online/consult-tool.d.ts +0 -54
  568. package/dist/server/online/consult-tool.d.ts.map +0 -1
  569. package/dist/server/online/consult-tool.js +0 -177
  570. package/dist/server/online/consult-tool.js.map +0 -1
  571. package/dist/server/online/executor.d.ts +0 -83
  572. package/dist/server/online/executor.d.ts.map +0 -1
  573. package/dist/server/online/executor.js +0 -714
  574. package/dist/server/online/executor.js.map +0 -1
  575. package/dist/server/online/sandbox.d.ts +0 -32
  576. package/dist/server/online/sandbox.d.ts.map +0 -1
  577. package/dist/server/online/sandbox.js +0 -246
  578. package/dist/server/online/sandbox.js.map +0 -1
  579. package/dist/server/online/scripted.d.ts +0 -12
  580. package/dist/server/online/scripted.d.ts.map +0 -1
  581. package/dist/server/online/scripted.js +0 -176
  582. package/dist/server/online/scripted.js.map +0 -1
  583. package/dist/server/online/tools.d.ts +0 -17
  584. package/dist/server/online/tools.d.ts.map +0 -1
  585. package/dist/server/online/tools.js +0 -31
  586. package/dist/server/online/tools.js.map +0 -1
  587. package/dist/server/vendor/THIRD_PARTY_LICENSES.txt +0 -782
  588. package/dist/server/vendor/just-bash.d.ts +0 -83
  589. package/dist/server/vendor/just-bash.js +0 -2102
  590. package/dist/shared/presets.d.ts +0 -30
  591. package/dist/shared/presets.d.ts.map +0 -1
  592. package/dist/shared/presets.js +0 -2
  593. package/dist/shared/presets.js.map +0 -1
  594. package/skills/nocobase-app-plugin-agents/references/online-agents.md +0 -31
@@ -2,10 +2,78 @@
2
2
  * Runs as the browser and the server's admin API exchange them.
3
3
  */
4
4
  import type { ActorKind, AgentTool, FailureReason, RunEvent, RunEventType, RunInputType, RunnerFeature, RunStatus } from '@nocobase/agent-protocol';
5
+ import type { VariableRef } from './variables.js';
5
6
  /** The run subject kind of a consultation: an online agent asking another a question (`ask_agent`). */
6
7
  export declare const CONSULTATION_SUBJECT = "consultation";
7
8
  /** How deep consultations go: the agent asked may ask another, which may not ask further. */
8
9
  export declare const CONSULT_MAX_DEPTH = 2;
10
+ /** Execution facts captured at claim time, retained even after a retry releases its holder. */
11
+ export interface RunEffortReport {
12
+ readonly effort: string | null;
13
+ /** The tool response that reported the value, never the requested configuration. */
14
+ readonly source: string;
15
+ readonly at: string;
16
+ }
17
+ export interface RunExecutionSnapshot {
18
+ readonly selection?: {
19
+ readonly reason: 'preferredQueued' | 'preferredUnavailable';
20
+ readonly preferredTool: string;
21
+ readonly preferredModel: string | null;
22
+ readonly queueEnteredAt: string;
23
+ readonly waitedSeconds: number;
24
+ };
25
+ readonly attempt: number;
26
+ readonly runnerId: string;
27
+ readonly runnerName: string | null;
28
+ readonly runnerOwnerUserId: string | null;
29
+ readonly runnerOwnerName: string | null;
30
+ readonly runnerTrust: 'team' | 'ownerOnly' | null;
31
+ readonly tool: string | null;
32
+ readonly toolVersion: string | null;
33
+ readonly modelService: string | null;
34
+ /** Requested model; null means the tool's default. */
35
+ readonly model: string | null;
36
+ /** Models reported by this attempt's primary tool, excluding other tools' usage. */
37
+ readonly actualModels: readonly string[];
38
+ /** Requested effort, never evidence of what the tool used. */
39
+ readonly effort: string | null;
40
+ readonly effortReports?: readonly RunEffortReport[];
41
+ /** Latest accepted observation, including repeats; distinct from the value/source change time. */
42
+ readonly actualEffortObservedAt?: string;
43
+ readonly actualEffort?: string | null;
44
+ readonly actualEffortSource?: string | null;
45
+ readonly actualEffortAt?: string | null;
46
+ /** Machine fields were removed for this reader. */
47
+ readonly machineHidden?: boolean;
48
+ readonly dispatchedAt: string;
49
+ readonly finishedAt: string | null;
50
+ readonly failureReason: string | null;
51
+ }
52
+ export type ModelWaitReason = 'updatePending' | 'pruning' | 'ready' | 'busy' | 'incompatible' | 'offline' | 'restricted' | 'noSharedRunner' | 'toolNotInstalled' | 'toolUnavailable' | 'unknown' | 'concurrencyFull' | 'sameWorkActive' | 'delayed';
53
+ export interface ModelSelectionWait {
54
+ readonly queueEnteredAt: string;
55
+ readonly fallbackAfterSeconds: number;
56
+ readonly sampledAt: string;
57
+ readonly entries: readonly {
58
+ readonly tool: string;
59
+ readonly model: string | null;
60
+ readonly reason: ModelWaitReason;
61
+ readonly compatibleCount: number;
62
+ readonly blockers?: readonly ModelWaitReason[];
63
+ readonly runners: readonly {
64
+ readonly name: string;
65
+ readonly reason?: ModelWaitReason;
66
+ readonly lastSeenAt?: string | null;
67
+ readonly ownerUserId: string | null;
68
+ readonly used?: number;
69
+ readonly limit?: number;
70
+ readonly toolUsed?: number;
71
+ readonly toolLimit?: number;
72
+ readonly reportedFree?: number;
73
+ readonly reportedTotalFree?: number;
74
+ }[];
75
+ }[];
76
+ }
9
77
  export interface Run {
10
78
  readonly id: string;
11
79
  readonly agentId: string;
@@ -13,6 +81,18 @@ export interface Run {
13
81
  readonly agentType: 'online' | 'runner';
14
82
  /** The runner holding it; `server:<instance>` for an online run held by an application instance. */
15
83
  readonly runnerId: string | null;
84
+ /** Claim snapshots, oldest first. Absent on responses from older servers. */
85
+ readonly executions?: readonly RunExecutionSnapshot[];
86
+ /** The latest attempt's runner, including while queued again. Null when no snapshot exists. */
87
+ readonly runnerName?: string | null;
88
+ readonly runnerOwnerUserId?: string | null;
89
+ readonly runnerOwnerName?: string | null;
90
+ readonly toolVersion?: string | null;
91
+ readonly actualModels?: readonly string[];
92
+ readonly actualEffort?: string | null;
93
+ readonly actualEffortSource?: string | null;
94
+ readonly actualEffortAt?: string | null;
95
+ readonly machineHidden?: boolean;
16
96
  /**
17
97
  * The entry of the agent's list it works with (`AgentModelEntry`): a runner run's coding tool and model (null: the
18
98
  * tool's default), set when a runner claims it; an online run's model service and model, set when it is claimed (a
@@ -38,11 +118,23 @@ export interface Run {
38
118
  readonly id: string;
39
119
  };
40
120
  readonly threadScope: string;
121
+ /** The run was asked to start a new session; absent on older servers. */
122
+ readonly freshSession?: boolean;
123
+ /** The person the run acts as: their permissions bound it, and only their own runners (or team runners) take it. */
41
124
  readonly actorUserId: string;
125
+ /**
126
+ * Who the chain of work the run belongs to started with: the person whose action woke the agent, or for work a run
127
+ * caused, that run's source. The actor when they started it themselves.
128
+ */
129
+ readonly requestedByUserId: string;
130
+ /** Who confirmed the run request the run was queued from (`RunRequest`); null for work its actor started. */
131
+ readonly confirmedByUserId: string | null;
42
132
  readonly ownerUserId: string | null;
43
133
  readonly requires: readonly RunnerFeature[];
44
134
  readonly acceptsInput: boolean;
45
135
  readonly availableAt: string | null;
136
+ /** Start of this queue episode; older servers may omit it. */
137
+ readonly queueEnteredAt?: string | null;
46
138
  readonly leaseExpiresAt: string | null;
47
139
  readonly dispatchedAt: string | null;
48
140
  readonly startedAt: string | null;
@@ -74,6 +166,16 @@ export interface RunRepo {
74
166
  readonly branch: string;
75
167
  readonly pushed: boolean;
76
168
  readonly headSha: string | null;
169
+ /**
170
+ * Why the runner could not push it at the end of the run (`RepoReport.failure`: `authFailed`,
171
+ * `credentialUnavailable`, `credentialDenied`, `leaseLost`, `rejected` or `error`), with a redacted message; null
172
+ * when it pushed or did not try. Optional so existing application schemas and older reports remain compatible;
173
+ * this server always includes it.
174
+ */
175
+ readonly failure?: {
176
+ readonly reason: string;
177
+ readonly message: string;
178
+ } | null;
77
179
  readonly updatedAt: string;
78
180
  }
79
181
  export interface RunUsageTotal {
@@ -99,6 +201,10 @@ export interface RunChild {
99
201
  readonly finishedAt: string | null;
100
202
  }
101
203
  export interface RunDetail extends Run {
204
+ readonly actorName?: string;
205
+ readonly requestedByName?: string;
206
+ /** The first run that retried this one; absent on older servers. */
207
+ readonly retriedRunId?: string | null;
102
208
  readonly inputs: readonly RunInputRecord[];
103
209
  readonly repos: readonly RunRepo[];
104
210
  readonly usage: readonly RunUsageTotal[];
@@ -123,6 +229,8 @@ export interface RunEventPage {
123
229
  * signed in.
124
230
  * - `noSharedRunner`: only personal runners could take it, and none belongs to the person who woke the agent.
125
231
  * - `missingFeatures`: the runners that could take it lack what it needs (`missing`).
232
+ * - `secretsNotAllowed`: some of its variables are for team runners only (`variables` names them), and the runners
233
+ * that could take it are personal ones.
126
234
  * - `sameWorkActive`: the agent is already working on the same subject and thread; this run follows.
127
235
  * - `concurrencyFull`: the agent has as many runs held as it may have at once.
128
236
  * - `runnersBusy`: every runner that could take it has its slots full (the machine's slots).
@@ -131,8 +239,22 @@ export interface RunEventPage {
131
239
  * - `setupRetrying`: preparing it failed and is tried again (`detail` says why).
132
240
  * - `next`: nothing holds it; the next free runner that asks takes it.
133
241
  */
134
- export declare const RUN_WAIT_REASONS: readonly ["agentArchived", "delayed", "noRunnerOnline", "runnersOffline", "toolUnavailable", "noSharedRunner", "missingFeatures", "sameWorkActive", "concurrencyFull", "runnersBusy", "toolSlotsFull", "setupRetrying", "next"];
242
+ export declare const RUN_WAIT_REASONS: readonly ["updatePending", "pruning", "agentArchived", "incompatible", "toolNotInstalled", "restricted", "unknown", "delayed", "noRunnerOnline", "runnersOffline", "toolUnavailable", "noSharedRunner", "missingFeatures", "secretsNotAllowed", "sameWorkActive", "concurrencyFull", "runnersBusy", "toolSlotsFull", "setupRetrying", "next"];
135
243
  export type RunWaitReason = (typeof RUN_WAIT_REASONS)[number];
244
+ /**
245
+ * What a wait's words need, by reason: the server sends codes and these, never text, and the client words them
246
+ * (`formatRunWait` in `client/runs.ts`, or the application's own). Absent for a reason that needs nothing.
247
+ *
248
+ * - `delayed`: `until` (RFC 3339).
249
+ * - `toolUnavailable`: `tool`, the agent's default coding tool.
250
+ * - `missingFeatures`: `features`, what no fitting runner has.
251
+ * - `secretsNotAllowed`: `variables`, the names of the variables for team runners only.
252
+ * - `concurrencyFull`: `active`, `limit`, the agent's runs held and its limit.
253
+ * - `runnersBusy`: `runners`, how many fitting runners have their slots full.
254
+ * - `toolSlotsFull`: `tool`, `used`, `limit`, that tool's runs and limit on the fitting runner closest to room.
255
+ * - `setupRetrying`: `detail`, why preparing it failed.
256
+ */
257
+ export type RunWaitParams = Readonly<Record<string, string | number | readonly string[]>>;
136
258
  /** Where a queued run stands and what holds it. */
137
259
  export interface RunWait {
138
260
  readonly reason: RunWaitReason;
@@ -151,6 +273,10 @@ export interface RunWait {
151
273
  readonly missing: readonly RunnerFeature[];
152
274
  /** For `setupRetrying`: why preparing it failed. */
153
275
  readonly detail: string | null;
276
+ /** For `secretsNotAllowed`: the variables that ask for a team runner, by scope; absent when not provided. */
277
+ readonly variables?: readonly VariableRef[];
278
+ /** What its words need (`RunWaitParams`); absent when nothing, or from a server before they were sent. */
279
+ readonly params?: RunWaitParams;
154
280
  }
155
281
  /** The newest thing a held run reported, for a one-line "last activity". */
156
282
  export interface RunActivity {
@@ -202,4 +328,80 @@ export interface WorkloadQuery {
202
328
  /** At most this many runs (200 by default, at most 1000). */
203
329
  readonly limit?: number;
204
330
  }
331
+ /**
332
+ * What a run request can be: `pending` until the responsible confirms it (`confirmed`, queued as them) or rejects it
333
+ * (`rejected`), the requester withdraws it (`withdrawn`, also when they run it as themselves), it is handed to a new
334
+ * responsible (`superseded`), or nobody settles it in time (`expired`). Only a pending request changes.
335
+ */
336
+ export declare const RUN_REQUEST_STATUSES: readonly ["pending", "confirmed", "rejected", "withdrawn", "expired", "superseded"];
337
+ export type RunRequestStatus = (typeof RUN_REQUEST_STATUSES)[number];
338
+ /** How work someone asks of an agent is run (`EnqueueRequest.execution`). */
339
+ export declare const RUN_EXECUTIONS: readonly ["auto", "mine"];
340
+ /**
341
+ * `auto`: as the subject's responsible, once they confirm it when someone else asked; `mine`: as the person who asked,
342
+ * at once, on a runner they may use (their own, or a team runner).
343
+ */
344
+ export type RunExecution = (typeof RUN_EXECUTIONS)[number];
345
+ /** The input of a run request, as it was when asked: what confirming it runs. */
346
+ export interface RunRequestInput {
347
+ readonly type: RunInputType;
348
+ readonly actor: {
349
+ readonly kind: ActorKind;
350
+ readonly id: string;
351
+ readonly name: string;
352
+ };
353
+ readonly text: string;
354
+ readonly payload: unknown;
355
+ }
356
+ /**
357
+ * Work someone asked of an agent on a subject another person answers for (its responsible: an issue's owner, say). It
358
+ * runs only once the responsible confirms it, as them, or when the person who asked runs it as themselves.
359
+ */
360
+ export interface RunRequest {
361
+ readonly id: string;
362
+ readonly agentId: string;
363
+ readonly subject: {
364
+ readonly kind: string;
365
+ readonly id: string;
366
+ };
367
+ readonly threadScope: string;
368
+ /** The run was asked to start a new session; absent on older servers. */
369
+ readonly freshSession?: boolean;
370
+ /** Who answers for the subject: the only person who may confirm or reject the request. */
371
+ readonly responsibleUserId: string;
372
+ /** Who the chain of work started with: the only person who may withdraw it or run it as themselves. */
373
+ readonly requestedByUserId: string;
374
+ readonly ownerUserId: string | null;
375
+ /** The moment the work was not to be claimed before (`EnqueueRequest.fireAt`); null for as soon as it runs. */
376
+ readonly fireAt: string | null;
377
+ /** Attempts its run may take; null for the agent's default. */
378
+ readonly maxAttempts: number | null;
379
+ readonly input: RunRequestInput;
380
+ readonly status: RunRequestStatus;
381
+ /** Who settled it (confirmed, rejected, withdrew or handed it on); null while pending, and when it expired. */
382
+ readonly settledById: string | null;
383
+ readonly settledAt: string | null;
384
+ /** Why it was rejected or handed on, when someone said. */
385
+ readonly note: string | null;
386
+ readonly expiresAt: string;
387
+ /** The run it went into: on confirming, or when the requester ran it as themselves. */
388
+ readonly runId: string | null;
389
+ /** The request that took over when the subject's responsible changed. */
390
+ readonly supersededById: string | null;
391
+ readonly createdAt: string;
392
+ readonly updatedAt: string;
393
+ }
394
+ /** A run request as people's lists show it: with the names of its agent and of the people in it. */
395
+ export interface RunRequestItem extends RunRequest {
396
+ /** Null when the agent was deleted. */
397
+ readonly agentName: string | null;
398
+ readonly responsibleName: string | null;
399
+ readonly requestedByName: string | null;
400
+ }
401
+ /** A subject and agent with at least one dispatched or running run; no run details. */
402
+ export interface SubjectAgentWork {
403
+ readonly subjectId: string;
404
+ readonly agentId: string;
405
+ readonly working: boolean;
406
+ }
205
407
  //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AAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B"}
@@ -14,6 +14,8 @@ export const CONSULT_MAX_DEPTH = 2;
14
14
  * signed in.
15
15
  * - `noSharedRunner`: only personal runners could take it, and none belongs to the person who woke the agent.
16
16
  * - `missingFeatures`: the runners that could take it lack what it needs (`missing`).
17
+ * - `secretsNotAllowed`: some of its variables are for team runners only (`variables` names them), and the runners
18
+ * that could take it are personal ones.
17
19
  * - `sameWorkActive`: the agent is already working on the same subject and thread; this run follows.
18
20
  * - `concurrencyFull`: the agent has as many runs held as it may have at once.
19
21
  * - `runnersBusy`: every runner that could take it has its slots full (the machine's slots).
@@ -23,13 +25,20 @@ export const CONSULT_MAX_DEPTH = 2;
23
25
  * - `next`: nothing holds it; the next free runner that asks takes it.
24
26
  */
25
27
  export const RUN_WAIT_REASONS = [
28
+ 'updatePending',
29
+ 'pruning',
26
30
  'agentArchived',
31
+ 'incompatible',
32
+ 'toolNotInstalled',
33
+ 'restricted',
34
+ 'unknown',
27
35
  'delayed',
28
36
  'noRunnerOnline',
29
37
  'runnersOffline',
30
38
  'toolUnavailable',
31
39
  'noSharedRunner',
32
40
  'missingFeatures',
41
+ 'secretsNotAllowed',
33
42
  'sameWorkActive',
34
43
  'concurrencyFull',
35
44
  'runnersBusy',
@@ -38,4 +47,19 @@ export const RUN_WAIT_REASONS = [
38
47
  'next',
39
48
  ];
40
49
  export const RUN_ACTIVITY_TEXT_MAX = 200;
50
+ /**
51
+ * What a run request can be: `pending` until the responsible confirms it (`confirmed`, queued as them) or rejects it
52
+ * (`rejected`), the requester withdraws it (`withdrawn`, also when they run it as themselves), it is handed to a new
53
+ * responsible (`superseded`), or nobody settles it in time (`expired`). Only a pending request changes.
54
+ */
55
+ export const RUN_REQUEST_STATUSES = [
56
+ 'pending',
57
+ 'confirmed',
58
+ 'rejected',
59
+ 'withdrawn',
60
+ 'expired',
61
+ 'superseded',
62
+ ];
63
+ /** How work someone asks of an agent is run (`EnqueueRequest.execution`). */
64
+ export const RUN_EXECUTIONS = ['auto', 'mine'];
41
65
  //# sourceMappingURL=runs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"runs.js","sourceRoot":"","sources":["../../shared/runs.ts"],"names":[],"mappings":"AAcA,uGAAuG;AACvG,MAAM,CAAC,MAAM,oBAAoB,GAAG,cAAc,CAAC;AAEnD,6FAA6F;AAC7F,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC;AA+GnC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,eAAe;IACf,SAAS;IACT,gBAAgB;IAChB,gBAAgB;IAChB,iBAAiB;IACjB,gBAAgB;IAChB,iBAAiB;IACjB,gBAAgB;IAChB,iBAAiB;IACjB,aAAa;IACb,eAAe;IACf,eAAe;IACf,MAAM;CACE,CAAC;AAiCX,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAC"}
1
+ {"version":3,"file":"runs.js","sourceRoot":"","sources":["../../shared/runs.ts"],"names":[],"mappings":"AAgBA,uGAAuG;AACvG,MAAM,CAAC,MAAM,oBAAoB,GAAG,cAAc,CAAC;AAEnD,6FAA6F;AAC7F,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAyOnC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,eAAe;IACf,SAAS;IACT,eAAe;IACf,cAAc;IACd,kBAAkB;IAClB,YAAY;IACZ,SAAS;IACT,SAAS;IACT,gBAAgB;IAChB,gBAAgB;IAChB,iBAAiB;IACjB,gBAAgB;IAChB,iBAAiB;IACjB,mBAAmB;IACnB,gBAAgB;IAChB,iBAAiB;IACjB,aAAa;IACb,eAAe;IACf,eAAe;IACf,MAAM;CACE,CAAC;AAsDX,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAC;AAgDzC;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,SAAS;IACT,WAAW;IACX,UAAU;IACV,WAAW;IACX,SAAS;IACT,YAAY;CACJ,CAAC;AAIX,6EAA6E;AAC7E,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,MAAM,EAAE,MAAM,CAAU,CAAC"}
@@ -6,6 +6,14 @@
6
6
  * Variables are set on an agent, on a working directory (`workdir`), or on a scope the application registers (the
7
7
  * group a run's subject belongs to, say), and a run gets them merged: the subject's scopes < its working directories <
8
8
  * the agent, a later scope replacing an earlier one's value.
9
+ *
10
+ * A run's variables go to whichever runner takes it, including a personal runner of whoever may use the agent: sharing
11
+ * an agent shares the tokens it works with. A variable marked `teamRunnersOnly` keeps a run that gets it off personal
12
+ * runners: only a team runner takes such a run.
13
+ *
14
+ * A variable taken from the runner (`fromRunner`) is a name only: the runner that takes the run provides its value from
15
+ * its own configuration, and the value never reaches the application. It merges with the others by name, a later
16
+ * scope's entry replacing an earlier one's whichever kind each is.
9
17
  */
10
18
  /** The scopes this plugin knows; the application registers the others (`GET agents/vocabulary` lists them). */
11
19
  export declare const CORE_VARIABLE_SCOPES: readonly ["agent", "workdir"];
@@ -13,10 +21,24 @@ export declare const CORE_VARIABLE_SCOPES: readonly ["agent", "workdir"];
13
21
  export type VariableScope = string;
14
22
  export interface Variable {
15
23
  readonly name: string;
24
+ /** Only team runners receive it: a run that gets it waits for one (`secretsNotAllowed`); absent means false. */
25
+ readonly teamRunnersOnly?: boolean;
26
+ /**
27
+ * Taken from the runner: the variable has no value here, and the runner that takes the run provides it from its own
28
+ * configuration (`nocobase-runner env set NAME`, or `--pass-env NAME`); a runner that does not fails the run before
29
+ * the agent starts. Absent means false.
30
+ */
31
+ readonly fromRunner?: boolean;
16
32
  readonly updatedAt: string;
17
33
  readonly updatedById: string | null;
18
34
  readonly updatedByName: string | null;
19
35
  }
36
+ /** A variable named by where it is kept, such as one that asks for a team runner. */
37
+ export interface VariableRef {
38
+ readonly scope: VariableScope;
39
+ readonly scopeId: string;
40
+ readonly name: string;
41
+ }
20
42
  export interface VariableValue {
21
43
  readonly name: string;
22
44
  readonly value: string;
@@ -1 +1 @@
1
- {"version":3,"file":"variables.d.ts","sourceRoot":"","sources":["../../shared/variables.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,+GAA+G;AAC/G,eAAO,MAAM,oBAAoB,+BAAgC,CAAC;AAElE,oEAAoE;AACpE,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC;AAEnC,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CACvC;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,sBAAsB,iDAKzB,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1E,sGAAsG;AACtG,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,MAAM,EAAE,mBAAmB,CAAC;IACrC,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,CA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O,CAMtE;AAED,MAAM,MAAM,mBAAmB,GAC7B,UAAU,GAAG,SAAS,GAAG,UAAU,GAAG,WAAW,CAAC;AAEpD,qEAAqE;AACrE,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,EACZ,QAAQ,GAAE,SAAS,MAAM,EAAO,EAChC,GAAG,CAAC,EAAE,MAAM,GACX,mBAAmB,GAAG,IAAI,CAM5B"}
@@ -6,6 +6,14 @@
6
6
  * Variables are set on an agent, on a working directory (`workdir`), or on a scope the application registers (the
7
7
  * group a run's subject belongs to, say), and a run gets them merged: the subject's scopes < its working directories <
8
8
  * the agent, a later scope replacing an earlier one's value.
9
+ *
10
+ * A run's variables go to whichever runner takes it, including a personal runner of whoever may use the agent: sharing
11
+ * an agent shares the tokens it works with. A variable marked `teamRunnersOnly` keeps a run that gets it off personal
12
+ * runners: only a team runner takes such a run.
13
+ *
14
+ * A variable taken from the runner (`fromRunner`) is a name only: the runner that takes the run provides its value from
15
+ * its own configuration, and the value never reaches the application. It merges with the others by name, a later
16
+ * scope's entry replacing an earlier one's whichever kind each is.
9
17
  */
10
18
  /** The scopes this plugin knows; the application registers the others (`GET agents/vocabulary` lists them). */
11
19
  export const CORE_VARIABLE_SCOPES = ['agent', 'workdir'];
@@ -28,7 +36,7 @@ export function cliEnvPrefix(cli) {
28
36
  */
29
37
  export function isReservedVariable(name, cli) {
30
38
  return (['PATH', 'HOME', 'TMPDIR', 'SHELL', 'USER'].includes(name) ||
31
- /^(AGENT_RUN_|GIT_)/u.test(name) ||
39
+ /^(NOCOBASE_RUNNER_|AGENT_RUN_|GIT_)/u.test(name) ||
32
40
  (cli !== undefined && name.startsWith(cliEnvPrefix(cli))));
33
41
  }
34
42
  /** Why `name` cannot be a new variable among `existing`, or null. */
@@ -1 +1 @@
1
- {"version":3,"file":"variables.js","sourceRoot":"","sources":["../../shared/variables.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,+GAA+G;AAC/G,MAAM,CAAC,MAAM,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AAQ,CAAC,IAAI,CAAC;QAAE,OAAO,WAAW,CAAC;IAChD,OAAO,IAAI,CAAC;AACd,CAAC"}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@nocobase/app-plugin-agents",
3
3
  "displayName": "Agents",
4
4
  "description": "Agents for NocoBase applications: agents, the model services online agents call, their runs and conversations, and the runners people connect to run them (registration, the long-poll claim, slots, the sweeper, build jobs, and the runner and CLI tarballs the application serves).",
5
- "version": "0.1.0-beta.1",
5
+ "version": "0.1.0-beta.10",
6
6
  "type": "module",
7
7
  "prettier": "@nocobase/dev-config/prettier",
8
8
  "engines": {
@@ -66,9 +66,9 @@
66
66
  "types": "./dist/shared/conversations.d.ts",
67
67
  "import": "./dist/shared/conversations.js"
68
68
  },
69
- "./shared/presets": {
70
- "types": "./dist/shared/presets.d.ts",
71
- "import": "./dist/shared/presets.js"
69
+ "./shared/model-catalog": {
70
+ "types": "./dist/shared/model-catalog.d.ts",
71
+ "import": "./dist/shared/model-catalog.js"
72
72
  },
73
73
  "./shared/models": {
74
74
  "types": "./dist/shared/models.d.ts",
@@ -143,9 +143,9 @@
143
143
  "sqlite-vec": "^0.1.9",
144
144
  "yaml": "^2.9.0",
145
145
  "zod": "^4.6.5",
146
- "@nocobase/agent-protocol": "^0.1.0-beta.1",
147
- "@nocobase/app-cli-client": "^0.1.0-beta.0",
148
- "@nocobase/cli-envelope": "^0.1.0-beta.0"
146
+ "@nocobase/app-cli-client": "^0.1.0-beta.6",
147
+ "@nocobase/agent-protocol": "^0.1.0-beta.7",
148
+ "@nocobase/cli-envelope": "^0.1.0-beta.1"
149
149
  },
150
150
  "peerDependencies": {
151
151
  "@base-ui/react": "^1.6.0",
@@ -160,39 +160,37 @@
160
160
  "react-router": "^7.0.2",
161
161
  "recharts": "^3.8.0",
162
162
  "remark-gfm": "^4.0.1",
163
- "@nocobase/app-cli": "^1.0.0-beta.14",
164
- "@nocobase/app-client": "^2.0.0-beta.2",
165
- "@nocobase/app-plugin-authentication": "^2.0.0-beta.2",
166
- "@nocobase/app-plugin-authorization": "^1.0.0-beta.25",
167
- "@nocobase/app-plugin-file": "^1.0.0-beta.20",
168
- "@nocobase/app-server": "^2.0.0-beta.1",
169
- "@nocobase/authorization": "^1.0.0-beta.12",
170
- "@nocobase/db": "^1.0.0-beta.18",
171
- "@nocobase/i18n": "^1.0.0-beta.5",
172
- "@nocobase/markdown-mermaid": "^0.1.0-beta.0",
173
- "@nocobase/service-provider": "^0.0.2-beta.1"
163
+ "@nocobase/app-cli": "^1.0.0-beta.21",
164
+ "@nocobase/app-client": "^3.0.0-beta.1",
165
+ "@nocobase/app-plugin-authentication": "^2.0.0-beta.8",
166
+ "@nocobase/app-plugin-authorization": "^1.0.0-beta.27",
167
+ "@nocobase/app-plugin-file": "^1.0.0-beta.23",
168
+ "@nocobase/app-server": "^2.0.0-beta.6",
169
+ "@nocobase/authorization": "^1.0.0-beta.13",
170
+ "@nocobase/db": "^1.0.0-beta.19",
171
+ "@nocobase/i18n": "^1.0.0-beta.7",
172
+ "@nocobase/markdown-mermaid": "^0.1.0-beta.2",
173
+ "@nocobase/service-provider": "^0.0.2-beta.2"
174
174
  },
175
175
  "devDependencies": {
176
176
  "@testing-library/react": "^16.3.2",
177
177
  "@testing-library/user-event": "^14.6.3",
178
178
  "@types/node": "^24.0.0",
179
179
  "@types/react": "^19.2.0",
180
- "esbuild": "^0.28.2",
181
180
  "eslint": "^10.0.0",
182
181
  "jsdom": "^30.0.1",
183
- "just-bash": "^3.6.0",
184
182
  "prettier": "^3.9.6",
185
183
  "react-dom": "^19.2.8",
186
184
  "typescript": "^6.0.3",
187
185
  "vitest": "^4.1.10",
188
- "@nocobase/app-testing": "0.1.0-beta.1",
189
- "@nocobase/db-postgres": "0.1.0-beta.3",
190
- "@nocobase/db-sqlite": "0.1.0-beta.4",
191
- "@nocobase/dev-config": "0.1.0-beta.19",
192
- "@nocobase/jobs": "0.1.0-beta.2"
186
+ "@nocobase/app-testing": "0.1.0-beta.3",
187
+ "@nocobase/db-postgres": "0.1.0-beta.4",
188
+ "@nocobase/db-sqlite": "0.1.0-beta.5",
189
+ "@nocobase/dev-config": "0.1.0-beta.22",
190
+ "@nocobase/jobs": "0.1.0-beta.3"
193
191
  },
194
192
  "scripts": {
195
- "build": "tsc -p tsconfig.json && node ./scripts/bundle-just-bash.mjs && nocobase-db-manifests",
193
+ "build": "tsc -p tsconfig.json && nocobase-db-manifests",
196
194
  "typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.type-tests.json --noEmit",
197
195
  "test": "vitest run --passWithNoTests",
198
196
  "lint": "eslint . --max-warnings 0",
@@ -1,24 +1,24 @@
1
1
  ---
2
2
  name: nocobase-app-plugin-agents
3
- description: Register the Agents plugin in a NocoBase App and configure it (agents.* in config.yml), contribute subjects, scopes, business actions, presets, CLI commands and reports through agentsToken, set up online agents and model services, connect runners (registration tokens, protocol, upgrade_required), build and serve the CLI and runner tarballs (pnpm nocobase cli build, --runner), or work out why a run, a runner or a model fails.
3
+ description: Register the Agents plugin in a NocoBase App and configure it (agents.* in config.yml), contribute subjects, scopes, business actions, agent defaults, the App's own agents, CLI commands and reports through agentsToken, enable the agents discovered from runners, set up model services for the App's own model calls, connect runners (registration tokens, protocol, upgrade_required), build and serve the CLI and runner tarballs (pnpm nocobase cli build, --runner), or work out why a run, a runner or a model fails.
4
4
  metadata:
5
5
  short-description: Agents, runners, model services and their distribution
6
6
  ---
7
7
 
8
8
  # Agents App Plugin
9
9
 
10
- Use this Skill when an App gives people agents to work with: online agents that answer through a model service on the server, or work agents that drive a coding tool (Claude Code, Codex, OpenCode, Pi) on a runner someone connects. Use it as well to build the App's CLI and the runner as tarballs the App serves, and to diagnose a run, a runner or a model that does not work. Do not use it for the business data agents act on; that stays with `nocobase-app-development` and the plugins that own it.
10
+ Use this Skill when an App gives people agents to work with: agents that drive a coding tool (Claude Code, Codex, OpenCode, Pi) on a runner someone connects, one for each tool and model the runners report. Use it as well to build the App's CLI and the runner as tarballs the App serves, and to diagnose a run, a runner or a model that does not work. Do not use it for the business data agents act on; that stays with `nocobase-app-development` and the plugins that own it.
11
11
 
12
12
  The package README is the full reference: read it at `node_modules/@nocobase/app-plugin-agents/README.md` (in this repository, `packages/plugins/app-plugin-agents/README.md`). The references below say what to do and point to its sections rather than repeating them.
13
13
 
14
14
  ## Key rules
15
15
 
16
- - The plugin knows no business of its own. Subjects, scopes, business actions, presets, CLI commands and report pages are the App's, contributed through `agentsToken` from `@nocobase/app-plugin-agents/server/tokens` when the App's providers boot. With nothing contributed, agents still work in conversations.
17
- - An agent's type (`runner` or `online`) is chosen once and never changes. Online agents need a model service and no runner; runner agents need a runner that is online, has the agent's coding tool installed and signed in, and whose owner's local policy lets it take the work.
16
+ - The plugin knows no business of its own. Subjects, scopes, business actions, the instructions and actions every discovered agent gets, CLI commands and report pages are the App's, contributed through `agentsToken` from `@nocobase/app-plugin-agents/server/tokens` when the App's providers boot. With nothing contributed, agents still work in conversations.
17
+ - Nobody creates agents: each coding tool and model a runner reports becomes one, pending until someone who manages agents writes what it is good at and enables it. Only enabled agents get work, and only on a runner that is online, has the agent's tool signed in with its model, and whose owner's local policy lets it take the work. There are no online agents; model services serve the App's own model calls.
18
18
  - Variables and model service keys are sealed with the App's secrets service: configure `secrets.keys` before storing any, or the API answers `SECRETS_KEY_MISSING` (503).
19
19
  - The plugin registers no pages. The App routes the exported pages and mounts the chat; the App also binds `agentsAccessToken`, or every business action level is `none`.
20
20
  - `subjects.register`'s `context.assemble`, brief sections and mounts run inside the claim's transaction: database reads only, never a network or a model call. Read anything else in the optional `prepare(run)`.
21
- - Tarballs are built by `pnpm nocobase cli build` (the App's CLI) and `cli build --runner` (`nocobase-runner`) as separate CI artifacts and mounted into `storage/runners/dist` (or `agents.dist.dir`). Never bake them into the App's image or commit them.
21
+ - Tarballs are built by `pnpm nocobase cli build` (the App's CLI) and `cli build --runner` (`nocobase-runner`), either as separate CI artifacts mounted into `storage/runners/dist` (or `agents.dist.dir`), or by the App's own `pnpm build` into its build output (universal packages, at the versions it was built with) and served from there. Never commit them.
22
22
  - In examples, name the App's CLI after the App (`acme`), never `nocobase` or `nocobase-runner`.
23
23
 
24
24
  ## References
@@ -26,8 +26,9 @@ The package README is the full reference: read it at `node_modules/@nocobase/app
26
26
  | Task | Read |
27
27
  | --------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
28
28
  | Register the plugin, its prerequisites and `agents.*` configuration, mount the pages and the chat | [Setup and configuration](references/setup-and-config.md) |
29
- | Contribute subjects, scopes, actions, presets, CLI commands, people, reports, brief sections, mounts | [Extension points](references/extension-points.md) |
30
- | Online agents, model services, the model gateway, consultations, vectors | [Online agents and model services](references/online-agents.md) |
29
+ | Contribute subjects, scopes, actions, agent defaults, the App's own agents, CLI commands, people, reports, mounts | [Extension points](references/extension-points.md) |
30
+ | Agents discovered from runners, the model catalog, enabling agents, availability, the App's own agents | [Agents](references/agents.md) |
31
+ | Model services, the model gateway, vectors | [Model services](references/model-services.md) |
31
32
  | Register runners, how claims and heartbeats work, local policy, protocol and `upgrade_required` | [Runners](references/runners.md) |
32
33
  | Build the CLI and runner tarballs, serve them, CI artifacts, install script, download tokens, updates, the npm runner | [Distribution](references/distribution.md) |
33
34
  | Variables and secrets, the skill library, chat attachments, usage, prices and reports | [Variables, skills, attachments and usage](references/variables-skills-usage.md) |
@@ -0,0 +1,30 @@
1
+ # Agents
2
+
3
+ Nobody creates an agent. Each coding tool and model a runner reports signed in becomes one agent, named from the model catalog that ships with the plugin (such as "Claude · Opus 5.5"), and starts pending. `docs/runner-agents.md` in the package and the README's "What it does" (Agents) are the reference.
4
+
5
+ ## Enabling agents
6
+
7
+ - A pending agent gets no work. Someone who manages agents (`agents.agents` manage) enables it on the Agent page ("Fill in and enable") or with `PATCH /api/agents/:agentId` (`agent update`), writing what it is good at — the project manager hands it work by this — and optionally its default reasoning effort. The page starts the description from the catalog's suggestion.
8
+ - Every change names the agent's revision (`expectedRevision`); `REVISION_CONFLICT` means someone changed it since, so read it again. `GOOD_AT_REQUIRED`: enabling needs a description. `EFFORT_UNSUPPORTED`: the tool does not take that effort. `AGENT_MANAGED`: an App's own agent is changed through the App.
9
+ - Disabling an agent withdraws its queued runs and announces `agent.removed` (`reason` `disabled`); the App lets go of the work it gave the agent. Work for an agent that is not enabled is refused with `AGENT_NOT_ENABLED`.
10
+ - Anyone signed in reads the agents (`GET /api/agents`, `agent list-all`); `GET /api/agents/agentNames` names every agent there has been, for runs that name a removed one.
11
+
12
+ ## Discovery management
13
+
14
+ The page defaults to enabled agents. New discoveries are collapsed, grouped by tool and known catalog model, and searchable by model or provider; unknown provider-qualified models are kept separate. The enable dialog chooses an original provider candidate without changing its ID or execution model. Opening an enabled group exposes the other provider candidates, and disabled agents remain accessible.
15
+
16
+ Administrators ignore pending groups individually or in an atomic batch through `PUT /api/agents/discoveryPreferences` (`agent discovery set --input <file>`). Read `discoveryKey`, `discoveryRevision` and `ignored` from `GET /api/agents`, then send unique groups with their expected revision and `ignored: true` or `false`. Preferences survive reports and restarts, including new providers in the same group. Restoring returns pending discoveries without enabling them. Enabled groups cannot be ignored; stale revisions conflict with concurrent enabling. See `docs/runner-agents.md` for the body and migration.
17
+
18
+ ## Where an agent can run
19
+
20
+ `GET /api/agents` answers, per caller, how many team and personal runners online have the agent's tool signed in with its model, whether only personal runners have it (`personalOnly`: they take their owners' work only), and `unusable`, why the caller's work cannot start now: `pending`, `disabled`, `unreported` (no runner reported it for 14 days), `notConfigured`, `noRunner` or `othersPersonal`. The roster (`GET /api/agents/available`, `agent list`, `Agents.roster`) lists the enabled agents reported recently with whether each would take the caller's work now. A run that fails `modelUnavailable` marks that tool and model unavailable on its runner until the runner reports the tool's models differently.
21
+
22
+ ## The App's own agents and defaults
23
+
24
+ - `agents.ensureSystem(input)` keeps an agent of the App's own, such as a project manager: fixed id, name, description, instructions, business actions and the tools and models it runs with. Call it at boot; it creates the agent the first time and writes changes after.
25
+ - `agents.setDefaults(provider)` gives every discovered agent the App's instructions and business actions; call `agents.applyDefaults()` after the provider changes so agents discovered earlier get them too. Without a provider, business actions marked `defaultOn` apply.
26
+ - The system default chat agent is the App's to set (`PATCH /api/agents/chatSettings`); upgrading clears it along with every agent an earlier version kept.
27
+
28
+ ## Upgrading from configured agents
29
+
30
+ The `202610240020_ag_runner_agents` migration removes every agent an earlier version kept, online agents included: their rows stay disabled with `deletedAt` so history still names them, their queued runs are cancelled, their pending run requests withdrawn, and default chat agents cleared. After upgrading, wait for runners to report (or restart them), enable the agents that appear, and set the system default chat agent again.