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

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 (174) hide show
  1. package/CHANGELOG.md +93 -0
  2. package/README.md +41 -24
  3. package/dist/client/chat.d.ts +2 -0
  4. package/dist/client/chat.d.ts.map +1 -1
  5. package/dist/client/chat.js +2 -0
  6. package/dist/client/chat.js.map +1 -1
  7. package/dist/client/lib/install.js +1 -1
  8. package/dist/client/lib/tool-policy.d.ts +0 -2
  9. package/dist/client/lib/tool-policy.d.ts.map +1 -1
  10. package/dist/client/lib/tool-policy.js +1 -6
  11. package/dist/client/lib/tool-policy.js.map +1 -1
  12. package/dist/client/locales/en-US.d.ts +3 -9
  13. package/dist/client/locales/en-US.d.ts.map +1 -1
  14. package/dist/client/locales/en-US.js +3 -9
  15. package/dist/client/locales/en-US.js.map +1 -1
  16. package/dist/client/locales/runtimes.en-US.d.ts +38 -0
  17. package/dist/client/locales/runtimes.en-US.d.ts.map +1 -1
  18. package/dist/client/locales/runtimes.en-US.js +40 -2
  19. package/dist/client/locales/runtimes.en-US.js.map +1 -1
  20. package/dist/client/locales/runtimes.zh-CN.d.ts.map +1 -1
  21. package/dist/client/locales/runtimes.zh-CN.js +40 -2
  22. package/dist/client/locales/runtimes.zh-CN.js.map +1 -1
  23. package/dist/client/locales/zh-CN.d.ts.map +1 -1
  24. package/dist/client/locales/zh-CN.js +3 -9
  25. package/dist/client/locales/zh-CN.js.map +1 -1
  26. package/dist/client/pages/agents/agent-model.d.ts +0 -4
  27. package/dist/client/pages/agents/agent-model.d.ts.map +1 -1
  28. package/dist/client/pages/agents/agent-model.js +0 -19
  29. package/dist/client/pages/agents/agent-model.js.map +1 -1
  30. package/dist/client/pages/agents/detail/index.d.ts.map +1 -1
  31. package/dist/client/pages/agents/detail/index.js +2 -2
  32. package/dist/client/pages/agents/detail/index.js.map +1 -1
  33. package/dist/client/pages/agents/detail/sections.d.ts +0 -1
  34. package/dist/client/pages/agents/detail/sections.d.ts.map +1 -1
  35. package/dist/client/pages/agents/detail/sections.js +2 -33
  36. package/dist/client/pages/agents/detail/sections.js.map +1 -1
  37. package/dist/client/pages/runtimes/connect.js +1 -1
  38. package/dist/client/pages/runtimes/connect.js.map +1 -1
  39. package/dist/client/pages/runtimes/index.d.ts.map +1 -1
  40. package/dist/client/pages/runtimes/index.js +2 -1
  41. package/dist/client/pages/runtimes/index.js.map +1 -1
  42. package/dist/client/pages/runtimes/runner-sheet.d.ts.map +1 -1
  43. package/dist/client/pages/runtimes/runner-sheet.js +2 -1
  44. package/dist/client/pages/runtimes/runner-sheet.js.map +1 -1
  45. package/dist/client/pages/runtimes/workspace-diagnostics.d.ts +9 -0
  46. package/dist/client/pages/runtimes/workspace-diagnostics.d.ts.map +1 -0
  47. package/dist/client/pages/runtimes/workspace-diagnostics.js +58 -0
  48. package/dist/client/pages/runtimes/workspace-diagnostics.js.map +1 -0
  49. package/dist/client/runs/subject-runs.d.ts.map +1 -1
  50. package/dist/client/runs/subject-runs.js +2 -3
  51. package/dist/client/runs/subject-runs.js.map +1 -1
  52. package/dist/database/migrations/.manifest.json +8 -0
  53. package/dist/database/migrations/202610100002_ag_add_run_git_credentials.d.ts +9 -0
  54. package/dist/database/migrations/202610100002_ag_add_run_git_credentials.d.ts.map +1 -0
  55. package/dist/database/migrations/202610100002_ag_add_run_git_credentials.js +30 -0
  56. package/dist/database/migrations/202610100002_ag_add_run_git_credentials.js.map +1 -0
  57. package/dist/database/migrations/202610110001_ag_add_fresh_sessions.d.ts +4 -0
  58. package/dist/database/migrations/202610110001_ag_add_fresh_sessions.d.ts.map +1 -0
  59. package/dist/database/migrations/202610110001_ag_add_fresh_sessions.js +23 -0
  60. package/dist/database/migrations/202610110001_ag_add_fresh_sessions.js.map +1 -0
  61. package/dist/package.json +1 -1
  62. package/dist/server/composition.d.ts +3 -1
  63. package/dist/server/composition.d.ts.map +1 -1
  64. package/dist/server/composition.js +18 -2
  65. package/dist/server/composition.js.map +1 -1
  66. package/dist/server/core/runs/claim.d.ts +2 -0
  67. package/dist/server/core/runs/claim.d.ts.map +1 -1
  68. package/dist/server/core/runs/claim.js +53 -7
  69. package/dist/server/core/runs/claim.js.map +1 -1
  70. package/dist/server/core/runs/extensions.d.ts +57 -4
  71. package/dist/server/core/runs/extensions.d.ts.map +1 -1
  72. package/dist/server/core/runs/extensions.js +45 -9
  73. package/dist/server/core/runs/extensions.js.map +1 -1
  74. package/dist/server/core/runs/git-credentials.d.ts +43 -0
  75. package/dist/server/core/runs/git-credentials.d.ts.map +1 -0
  76. package/dist/server/core/runs/git-credentials.js +129 -0
  77. package/dist/server/core/runs/git-credentials.js.map +1 -0
  78. package/dist/server/core/runs/index.d.ts +2 -1
  79. package/dist/server/core/runs/index.d.ts.map +1 -1
  80. package/dist/server/core/runs/index.js +2 -1
  81. package/dist/server/core/runs/index.js.map +1 -1
  82. package/dist/server/core/runs/input-gate.d.ts +34 -0
  83. package/dist/server/core/runs/input-gate.d.ts.map +1 -0
  84. package/dist/server/core/runs/input-gate.js +56 -0
  85. package/dist/server/core/runs/input-gate.js.map +1 -0
  86. package/dist/server/core/runs/lifecycle.d.ts +2 -1
  87. package/dist/server/core/runs/lifecycle.d.ts.map +1 -1
  88. package/dist/server/core/runs/lifecycle.js +27 -8
  89. package/dist/server/core/runs/lifecycle.js.map +1 -1
  90. package/dist/server/core/runs/policy.d.ts +8 -0
  91. package/dist/server/core/runs/policy.d.ts.map +1 -1
  92. package/dist/server/core/runs/policy.js +10 -0
  93. package/dist/server/core/runs/policy.js.map +1 -1
  94. package/dist/server/core/runs/ports.d.ts +30 -3
  95. package/dist/server/core/runs/ports.d.ts.map +1 -1
  96. package/dist/server/core/runs/ports.js.map +1 -1
  97. package/dist/server/core/runs/run-requests.d.ts +3 -0
  98. package/dist/server/core/runs/run-requests.d.ts.map +1 -1
  99. package/dist/server/core/runs/run-requests.js +5 -0
  100. package/dist/server/core/runs/run-requests.js.map +1 -1
  101. package/dist/server/core/runs/run.service.d.ts +5 -1
  102. package/dist/server/core/runs/run.service.d.ts.map +1 -1
  103. package/dist/server/core/runs/run.service.js +51 -3
  104. package/dist/server/core/runs/run.service.js.map +1 -1
  105. package/dist/server/core/runs/run.store.d.ts +5 -0
  106. package/dist/server/core/runs/run.store.d.ts.map +1 -1
  107. package/dist/server/core/runs/run.store.js +7 -0
  108. package/dist/server/core/runs/run.store.js.map +1 -1
  109. package/dist/server/core/runs/runner-view.d.ts +1 -0
  110. package/dist/server/core/runs/runner-view.d.ts.map +1 -1
  111. package/dist/server/core/runs/runner-view.js +2 -1
  112. package/dist/server/core/runs/runner-view.js.map +1 -1
  113. package/dist/server/core/runs/transitions.d.ts +1 -1
  114. package/dist/server/core/runs/transitions.d.ts.map +1 -1
  115. package/dist/server/core/runs/transitions.js +39 -5
  116. package/dist/server/core/runs/transitions.js.map +1 -1
  117. package/dist/server/distribution/dist.service.d.ts +27 -5
  118. package/dist/server/distribution/dist.service.d.ts.map +1 -1
  119. package/dist/server/distribution/dist.service.js +41 -5
  120. package/dist/server/distribution/dist.service.js.map +1 -1
  121. package/dist/server/distribution/download-tokens.d.ts +1 -1
  122. package/dist/server/distribution/download-tokens.d.ts.map +1 -1
  123. package/dist/server/distribution/download-tokens.js +7 -4
  124. package/dist/server/distribution/download-tokens.js.map +1 -1
  125. package/dist/server/distribution/index.d.ts +11 -3
  126. package/dist/server/distribution/index.d.ts.map +1 -1
  127. package/dist/server/distribution/index.js +31 -8
  128. package/dist/server/distribution/index.js.map +1 -1
  129. package/dist/server/kernel/redaction.d.ts +2 -0
  130. package/dist/server/kernel/redaction.d.ts.map +1 -1
  131. package/dist/server/kernel/redaction.js +17 -0
  132. package/dist/server/kernel/redaction.js.map +1 -1
  133. package/dist/server/routes/runners/dist.d.ts +5 -1
  134. package/dist/server/routes/runners/dist.d.ts.map +1 -1
  135. package/dist/server/routes/runners/dist.js +36 -9
  136. package/dist/server/routes/runners/dist.js.map +1 -1
  137. package/dist/server/routes/runners/install.d.ts.map +1 -1
  138. package/dist/server/routes/runners/install.js +98 -15
  139. package/dist/server/routes/runners/install.js.map +1 -1
  140. package/dist/server/routes/runners/runner.js +4 -4
  141. package/dist/server/routes/runners/runner.js.map +1 -1
  142. package/dist/server/routes/runners/runs.d.ts +1 -1
  143. package/dist/server/routes/runners/runs.d.ts.map +1 -1
  144. package/dist/server/routes/runners/runs.js +23 -3
  145. package/dist/server/routes/runners/runs.js.map +1 -1
  146. package/dist/server/routes/schemas.d.ts +1 -0
  147. package/dist/server/routes/schemas.d.ts.map +1 -1
  148. package/dist/server/routes/schemas.js +23 -3
  149. package/dist/server/routes/schemas.js.map +1 -1
  150. package/dist/server/runners/runner.store.d.ts.map +1 -1
  151. package/dist/server/runners/runner.store.js +13 -3
  152. package/dist/server/runners/runner.store.js.map +1 -1
  153. package/dist/server/runners/workspaces.d.ts +7 -4
  154. package/dist/server/runners/workspaces.d.ts.map +1 -1
  155. package/dist/server/runners/workspaces.js +123 -26
  156. package/dist/server/runners/workspaces.js.map +1 -1
  157. package/dist/server/tokens.d.ts +3 -2
  158. package/dist/server/tokens.d.ts.map +1 -1
  159. package/dist/server/tokens.js +1 -0
  160. package/dist/server/tokens.js.map +1 -1
  161. package/dist/shared/models.js +1 -1
  162. package/dist/shared/models.js.map +1 -1
  163. package/dist/shared/runners.d.ts +6 -2
  164. package/dist/shared/runners.d.ts.map +1 -1
  165. package/dist/shared/runners.js.map +1 -1
  166. package/dist/shared/runs.d.ts +20 -0
  167. package/dist/shared/runs.d.ts.map +1 -1
  168. package/dist/shared/runs.js.map +1 -1
  169. package/package.json +5 -5
  170. package/skills/nocobase-app-plugin-agents/SKILL.md +1 -1
  171. package/skills/nocobase-app-plugin-agents/references/distribution.md +21 -4
  172. package/skills/nocobase-app-plugin-agents/references/extension-points.md +7 -1
  173. package/skills/nocobase-app-plugin-agents/references/runners.md +6 -0
  174. package/skills/nocobase-app-plugin-agents/references/setup-and-config.md +2 -0
@@ -1,6 +1,6 @@
1
1
  # Distribution: the CLI and runner tarballs
2
2
 
3
- The App serves two products itself, as standalone tarballs that bundle Node.js, one per platform: its own CLI (the `nocobase.cli.bin` of its `package.json`, such as `acme`) and the runner, `nocobase-runner`. Nothing is published to a registry and a machine needs nothing installed beforehand. The README's "What it does" (Distribution) and "The CLI runs get" sections, and `@nocobase/app-cli`'s README section "The application's own CLI: `cli build` and `cli link`", are the reference.
3
+ The App serves two products itself: its own CLI (the `nocobase.cli.bin` of its `package.json`, such as `acme`) and the runner, `nocobase-runner`, each as standalone tarballs that bundle Node.js, one per platform, or as one universal tarball without Node that runs on the machine's own Node.js 24 or newer on every platform. An App that serves no tarball of a product may instead name the exact npm version to install it from ("Naming a product on npm instead" below), as NocoBase Studio does. The README's "What it does" (Distribution) and "The CLI runs get" sections, and `@nocobase/app-cli`'s README section "The application's own CLI: `cli build` and `cli link`", are the reference.
4
4
 
5
5
  ## Building
6
6
 
@@ -10,6 +10,7 @@ pnpm nocobase cli build --runner # nocobase-runner, from @nocobase/agent-run
10
10
  ```
11
11
 
12
12
  - `--targets` takes a comma-separated list; the default is `darwin-arm64,darwin-x64,linux-x64,linux-arm64`. Windows is not supported.
13
+ - `--universal` also packs `<product>-v<version>-universal.tar.gz`, which carries no Node.js and runs on the machine's Node.js 24 or newer; without `--targets` it packs only that one (no Node download). The App serves it to every platform without a tarball of its own; one built for the platform wins.
13
14
  - Node.js for each target is downloaded from nodejs.org and checked against `SHASUMS256.txt` (cached in `node_modules/.cache/nocobase-cli/node`). `--node-version` picks the version (default: the one running the command). `--host-node` uses this machine's Node.js for its own platform instead of downloading, for a quick local build: `pnpm nocobase cli build --targets darwin-arm64 --host-node`.
14
15
  - `--out` (default `storage/runners/dist`), `--channel` (default `stable`), `--version` (default `nocobase.cli.version`, else the App's version; with `--runner`, the runner's), `--skip-build`, `--keep-staging`.
15
16
  - The App needs `@nocobase/app-cli-client` in its `devDependencies` for the CLI and `@nocobase/agent-runner` for the runner; `npm`, `pnpm` and `tar` come from the environment.
@@ -23,11 +24,22 @@ Each product lands in a directory of its own, with a manifest of every file's SH
23
24
 
24
25
  ## Serving
25
26
 
26
- The plugin serves `agents.dist.dir` (default `storage/runners/dist`, relative to the App root), channel `agents.dist.channel` (default `stable`). A product's current version is the highest in the channel, unless `agents.dist.versions` pins one. Only files a manifest lists are served. Routes (`DIST_ROUTES` of `@nocobase/agent-protocol`): `GET /api/agents/dist/manifest`, `GET /api/agents/dist/products/<product>/targets/<target>` (`?format=env` for a shell; 404 `PLATFORM_UNSUPPORTED` with the targets there are), the tarball itself, and `POST /api/agents/dist/downloadTokens`.
27
+ The plugin serves `agents.dist.dir` (default `storage/runners/dist`, relative to the App root), channel `agents.dist.channel` (default `stable`). A product's current version is the highest in the channel, unless `agents.dist.versions` pins one. Only files a manifest lists are served. Routes (`DIST_ROUTES` of `@nocobase/agent-protocol`): `GET /api/agents/dist/manifest`, `GET /api/agents/dist/products/<product>/targets/<target>` (`?format=env` for a shell; 404 `PLATFORM_UNSUPPORTED` with the targets there are; the universal tarball answers with the asked target and `universal: true`, `universal=true` in env form), the tarball itself, and `POST /api/agents/dist/downloadTokens`.
28
+
29
+ ### Naming a product on npm instead
30
+
31
+ `agents.dist.npm` names the npm package and exact version (never a range) of a product, such as `{ nocobase-runner: { package: '@nocobase/agent-runner', version: 1.0.0 } }`. It is used only when `agents.dist.dir` has no current version of that product; a product the directory has is served from it exactly as without the setting. The machine needs Node.js 24 or later already; nothing bundles it on this path.
32
+
33
+ Only callers that say they understand the answer get it, so an older runner, install script or CLI never sees one:
34
+
35
+ - The resolve route with `accept=npm` (a comma-separated list) answers `{ kind: 'npm', product, version, package, channel }`, or with `format=env` the lines `kind=npm`, `product=`, `version=`, `package=` and `channel=`. Without it, such a product is 404 as before.
36
+ - A heartbeat answer carries `npmUpgrade` (`latestVersion`, `package`, `channel`, `reason`) instead of `upgrade` only to a runner that declares the `npm` feature (protocol 8) and runs an older version; any other runner is offered no update for that product. The Runtimes page marks only those runners "Upgradable".
37
+
38
+ An App that builds its runner and CLI into its deployment pins them to the versions it was built with this way, so redeploying it moves every runner to that version.
27
39
 
28
40
  ## CI and deployment
29
41
 
30
- Build the two products as separate artifacts in CI, one job each (`pnpm nocobase cli build --out output/dist` and `pnpm nocobase cli build --runner --out output/dist`, uploading `output/dist`), and mount or copy each into the deployment's `storage/runners/dist` (or the directory `agents.dist.dir` names), keeping the `<channel>/<product>/` layout. Do not bake them into the App's image: they change on their own schedule and are large. Rebuild the runner whenever `@nocobase/agent-runner` or the agents plugin is upgraded, so runners can update to a version that speaks the App's protocol, and rebuild the CLI whenever the App's `nocobase.cli` or its CLI skills change.
42
+ There are two ways to deliver the packages. When the runner and CLI follow the App's own releases, build them with the App: an `afterServerBuild` build hook in `cli/plugins.ts` runs `pnpm nocobase cli build --universal --skip-build --out dist/runners` (and the same with `--runner`), and `agents.dist.dir` in the App's configuration points at that directory, so every build, archive and image serves the runner and CLI it was built with; universal packages keep the build small, and `cli build` needs the npm registry for their dependencies. NocoBase Studio does this. Otherwise build the two products as separate artifacts in CI, one job each (`pnpm nocobase cli build --out output/dist` and `pnpm nocobase cli build --runner --out output/dist`, uploading `output/dist`), and mount or copy each into the deployment's `storage/runners/dist` (or the directory `agents.dist.dir` names), keeping the `<channel>/<product>/` layout. Rebuild the runner whenever `@nocobase/agent-runner` or the agents plugin is upgraded, so runners can update to a version that speaks the App's protocol, and rebuild the CLI whenever the App's `nocobase.cli` or its CLI skills change.
31
43
 
32
44
  ## Installing on a machine
33
45
 
@@ -43,10 +55,15 @@ curl -fsSL https://app.example.com/api/agents/dist/installScript | sh -s -- --ru
43
55
 
44
56
  Options: `--prefix`, `--bin-dir`, `--dry-run`; with `--runner`, `--runner-prefix`, `--name`, `--label` and `--no-service` (register only). A token of the other kind fails before anything is installed. An App that serves no CLI still installs the runtime.
45
57
 
58
+ For a universal tarball the script checks, before downloading, that `node` on PATH is Node.js 24 or newer and stops with how to install it otherwise; it then links `<prefix>/node` to that `node`. The package's launcher tries `NOCOBASE_NODE`, `<prefix>/node`, `node` on PATH, and a Node an older standalone version in `<prefix>/versions/` still carries, so a runner's user service (launchd, systemd), whose PATH usually has no `node`, starts it. An update to a universal version leaves the Node it ran on in `<prefix>/node` before removing old versions. With `--runner`, a missing `pnpm` only prints a hint to run `corepack enable`.
59
+
60
+ The script resolves with `accept=npm`. For an npm answer it checks Node.js 24 the same way and that `npm` is on PATH (or `NOCOBASE_NPM` names one), stopping with how to get it otherwise, then runs `npm install --prefix <prefix>/versions/<version>.partial --no-save --no-audit --no-fund --omit=optional <package>@<version>` with the npm configuration (registry, proxy) of the person running it, writes a launcher at `bin/<command>` beside `node_modules`, renames the directory to `<prefix>/versions/<version>` and links `<prefix>/node`. `current`, the command link and the runner's service are then exactly as for a tarball. `--omit=optional` keeps the coding tools' per-platform SDK packages, each carrying a binary the runner never starts, off the machine.
61
+
46
62
  ## Updates
47
63
 
48
- - The runner reports its product and version on every heartbeat; the answer names a newer `nocobase-runner` when the channel serves one for its platform. An installed runner started by its service updates itself between runs; `nocobase-runner update` does it now (`--check` only checks, `--auto on|off` switches automatic updates). The Runtimes page marks such a runner "Upgradable".
64
+ - The runner reports its product and version on every heartbeat; the answer names a newer `nocobase-runner` when the channel serves one for its platform (`upgrade`), or the npm version `agents.dist.npm` pins (`npmUpgrade`, to runners with the `npm` feature). An installed runner started by its service updates itself between runs; `nocobase-runner update` does it now (`--check` only checks, `--auto on|off` switches automatic updates). The Runtimes page marks such a runner "Upgradable".
49
65
  - The App's CLI, installed by the script, has `<cli> update`, and says on stderr when a newer version is served.
66
+ - Both ask with `accept=npm` and install an npm answer into `<prefix>/versions/<version>` the way the install script does, with the machine's npm; an installation moves between tarball and npm versions in either direction. The runner and `@nocobase/app-cli-client` depend on exactly the `@nocobase/agent-protocol` they were built with, so an exact npm version speaks one known protocol.
50
67
  - A run gets the App's CLI as `agents.cli.package` says: by default the tarball the App serves for the runner's platform (`{ kind: served }`), downloaded once per version. A runner without the `archives` feature, or a platform with no build, falls back to the CLI installed beside it (`preinstalled`). `{ kind: npm, package, version }` names an npm package instead.
51
68
 
52
69
  ## The npm package as an alternative
@@ -17,7 +17,7 @@ Everything the App contributes goes through `agentsToken` (`@nocobase/app-plugin
17
17
  | `reporting.usage`, `reporting.runFigures`, `reporting.range`, `reporting.modelUsage` | What runs used and cost, grouped as the App needs | The App's report pages |
18
18
  | `briefs.sections.register(provider)` | Sections added to every brief's context layer | Project conventions every run should read |
19
19
  | `mounts.register(provider)` | Directories of files placed beside the agent | Reference material for a run |
20
- | `repoAccess.register(provider)` | Commit identity and short-lived push credentials per run | Git hosting integration |
20
+ | `repoAccess.register(provider)` | Commit identity and short-lived push credentials per run, at the claim or, with `issue`, whenever the runner's git needs one (`gitCredentials` runners) | Git hosting integration |
21
21
  | `online.skills`, `online.gateway` | Skills every online run gets; the model gateway for the App's own model calls | See [Online agents](online-agents.md) |
22
22
  | `vectors.collection(spec)`, `vectors.stores.register` | Vector collections searched by meaning; another vector store type | Semantic search for a knowledge base |
23
23
 
@@ -35,3 +35,9 @@ Rules that are easy to miss:
35
35
  - `GET /api/agents/vocabulary` hands the browser the subjects, sources and scopes the App contributed; the browser never imports server code for them.
36
36
 
37
37
  The README's example under "Extension points" shows a subject registered and work enqueued and withdrawn.
38
+
39
+ A subject assembly may return `inputs` containing only the effective inputs for its current task. Render the task and turn from that same selection. Runner and online claims use it for delivery, brief sections and mounts; omitted inputs are resolved in the claim transaction and retained in the audit history, so polling and completion do not replay obsolete work. Omit the field to deliver all queued inputs.
40
+
41
+ A working run is held to the same policy: before input joins a dispatched or running run, and before pending input is delivered to one, the plugin asks `admit` and then `selectInputs` with that input. New input either hook keeps from the working run waits in a queued run for the claim to admit or cancel; pending input rejected or left out by `selectInputs` is marked handled instead of being delivered. Implement `selectInputs` with the same selection the assembly returns as `inputs`.
42
+
43
+ For issue/card work indicators, use `runs.workingOn(subjectKind, subjectIds)` after filtering visible subjects. It returns unique `{ subjectId, agentId, working: true }` pairs for dispatched/running runs in that exact scope, with no run details or global board cap. Match the current executor and apply the application's pending approval rules separately; queued/terminal runs do not appear. Pass a bounded batch from a view, rather than querying each card's full history.
@@ -1,5 +1,11 @@
1
1
  # Runners
2
2
 
3
+ ## Ended workspace diagnostics
4
+
5
+ For application-owned task cleanup, keep `SubjectWorkspaces.settled` conservative and optionally register `resolveKeys` for legacy directory keys and `commits` for trusted merged PR heads by repository URL. The plugin checks current or historical runner ownership and excludes nonterminal runs; directory keys alone never authorize lookup or cleanup. Use the head at merge time, not a squash merge commit. See `packages/plugins/app-plugin-agents/docs/workspace-cleanup.md` in the source repository for protocol and integration details.
6
+
7
+ Runtime pages distinguish application settlement from the runner's local cleanup check. An allowed check is not a deletion receipt. Directory diagnostics require explicit `canSeeMachine: true`; disk warnings use the report's measurement time and show expired or offline readings as prior reports. An ended workspace still stays when tracked changes, unpushed submodule commits, missing local objects or insufficient evidence prevent verification. Upgrade and serve both plugin and runner before expecting new diagnostics.
8
+
3
9
  A runner (shown as a runtime) is `nocobase-runner` from `@nocobase/agent-runner`, running on a server, a VM or someone's own device. It registers with one or more Apps, long-polls them for work and drives a coding tool for runner agents' runs. The wire protocol is `@nocobase/agent-protocol`. The README's "What it does" section (Runners, The claim, Runs, The sweep) and `@nocobase/agent-runner`'s README are the reference.
4
10
 
5
11
  ## Registering a runner
@@ -35,6 +35,8 @@ agents:
35
35
  dir: storage/runners/dist # the default; relative to the App root
36
36
  channel: stable
37
37
  versions: { acme: 0.1.0 } # pin a product instead of the channel's highest
38
+ npm: # a product with no tarball in dir, named on npm instead (exact versions)
39
+ nocobase-runner: { package: '@nocobase/agent-runner', version: 1.0.0 }
38
40
  server: # online agents, run by every instance
39
41
  enabled: true
40
42
  maxSteps: 16