@nocobase/app-plugin-agents 1.0.0-beta.21 → 1.0.0-beta.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/README.md +72 -12
- package/dist/cli/runner-token.js +1 -1
- package/dist/cli/runner-token.js.map +1 -1
- package/dist/client/chat/message-model.d.ts +0 -1
- package/dist/client/chat/message-model.d.ts.map +1 -1
- package/dist/client/chat/message-model.js +13 -2
- package/dist/client/chat/message-model.js.map +1 -1
- package/dist/client/components/command-line.d.ts +2 -1
- package/dist/client/components/command-line.d.ts.map +1 -1
- package/dist/client/components/command-line.js +2 -2
- package/dist/client/components/command-line.js.map +1 -1
- package/dist/client/components/variables/variable-dialogs.js +2 -2
- package/dist/client/components/variables/variable-dialogs.js.map +1 -1
- package/dist/client/lib/install.d.ts +3 -3
- package/dist/client/lib/install.d.ts.map +1 -1
- package/dist/client/lib/install.js +3 -5
- package/dist/client/lib/install.js.map +1 -1
- package/dist/client/lib/runner-tools.d.ts +4 -0
- package/dist/client/lib/runner-tools.d.ts.map +1 -0
- package/dist/client/lib/runner-tools.js +5 -0
- package/dist/client/lib/runner-tools.js.map +1 -0
- package/dist/client/locales/chat.en-US.d.ts +17 -0
- package/dist/client/locales/chat.en-US.d.ts.map +1 -1
- package/dist/client/locales/chat.en-US.js +17 -0
- package/dist/client/locales/chat.en-US.js.map +1 -1
- package/dist/client/locales/chat.zh-CN.d.ts.map +1 -1
- package/dist/client/locales/chat.zh-CN.js +17 -0
- package/dist/client/locales/chat.zh-CN.js.map +1 -1
- package/dist/client/locales/de-DE.d.ts.map +1 -1
- package/dist/client/locales/de-DE.js +8 -1
- package/dist/client/locales/de-DE.js.map +1 -1
- package/dist/client/locales/en-US.js +9 -9
- package/dist/client/locales/en-US.js.map +1 -1
- package/dist/client/locales/es-ES.d.ts.map +1 -1
- package/dist/client/locales/es-ES.js +8 -1
- package/dist/client/locales/es-ES.js.map +1 -1
- package/dist/client/locales/fr-FR.d.ts.map +1 -1
- package/dist/client/locales/fr-FR.js +8 -1
- package/dist/client/locales/fr-FR.js.map +1 -1
- package/dist/client/locales/id-ID.d.ts.map +1 -1
- package/dist/client/locales/id-ID.js +8 -1
- package/dist/client/locales/id-ID.js.map +1 -1
- package/dist/client/locales/ja-JP.d.ts.map +1 -1
- package/dist/client/locales/ja-JP.js +8 -1
- package/dist/client/locales/ja-JP.js.map +1 -1
- package/dist/client/locales/pt-BR.d.ts.map +1 -1
- package/dist/client/locales/pt-BR.js +8 -1
- package/dist/client/locales/pt-BR.js.map +1 -1
- package/dist/client/locales/runWait.en-US.js +1 -1
- package/dist/client/locales/runWait.en-US.js.map +1 -1
- package/dist/client/locales/runWait.zh-CN.js +1 -1
- package/dist/client/locales/runtimes.en-US.d.ts +10 -1
- package/dist/client/locales/runtimes.en-US.d.ts.map +1 -1
- package/dist/client/locales/runtimes.en-US.js +18 -9
- package/dist/client/locales/runtimes.en-US.js.map +1 -1
- package/dist/client/locales/runtimes.zh-CN.d.ts.map +1 -1
- package/dist/client/locales/runtimes.zh-CN.js +18 -9
- package/dist/client/locales/runtimes.zh-CN.js.map +1 -1
- package/dist/client/locales/vi-VN.d.ts.map +1 -1
- package/dist/client/locales/vi-VN.js +8 -1
- package/dist/client/locales/vi-VN.js.map +1 -1
- package/dist/client/locales/zh-CN.js +9 -9
- package/dist/client/locales/zh-CN.js.map +1 -1
- package/dist/client/locales/zh-TW.d.ts.map +1 -1
- package/dist/client/locales/zh-TW.js +8 -1
- package/dist/client/locales/zh-TW.js.map +1 -1
- package/dist/client/pages/runtimes/connect.js +18 -8
- package/dist/client/pages/runtimes/connect.js.map +1 -1
- package/dist/client/pages/runtimes/index.js +1 -1
- package/dist/client/pages/runtimes/runner-overview.d.ts.map +1 -1
- package/dist/client/pages/runtimes/runner-overview.js +3 -2
- package/dist/client/pages/runtimes/runner-overview.js.map +1 -1
- package/dist/client/pages/usage/prices/model.d.ts +1 -1
- package/dist/client/pages/usage/prices/model.js +1 -1
- package/dist/client/plugin.js +1 -1
- package/dist/client/plugin.js.map +1 -1
- package/dist/client/routes.d.ts +1 -1
- package/dist/database/migrations/.manifest.json +4 -0
- package/dist/database/migrations/202610290001_ag_repair_runner_agents.d.ts +5 -0
- package/dist/database/migrations/202610290001_ag_repair_runner_agents.d.ts.map +1 -0
- package/dist/database/migrations/202610290001_ag_repair_runner_agents.js +72 -0
- package/dist/database/migrations/202610290001_ag_repair_runner_agents.js.map +1 -0
- package/dist/package.json +2 -1
- package/dist/server/composition.d.ts +2 -0
- package/dist/server/composition.d.ts.map +1 -1
- package/dist/server/composition.js +9 -3
- package/dist/server/composition.js.map +1 -1
- package/dist/server/core/agents/agent.store.d.ts +5 -3
- package/dist/server/core/agents/agent.store.d.ts.map +1 -1
- package/dist/server/core/agents/agent.store.js +25 -6
- package/dist/server/core/agents/agent.store.js.map +1 -1
- package/dist/server/core/conversations/availability.d.ts +1 -1
- package/dist/server/core/runs/claim.js +6 -6
- package/dist/server/core/runs/claim.js.map +1 -1
- package/dist/server/core/runs/eligibility.d.ts +3 -3
- package/dist/server/core/runs/eligibility.d.ts.map +1 -1
- package/dist/server/core/runs/run-requests.js +1 -1
- package/dist/server/core/runs/run-requests.js.map +1 -1
- package/dist/server/core/runs/run.service.d.ts +1 -1
- package/dist/server/core/runs/run.store.d.ts +1 -1
- package/dist/server/core/runs/run.store.d.ts.map +1 -1
- package/dist/server/core/runs/workload.js +1 -1
- package/dist/server/core/runs/workload.js.map +1 -1
- package/dist/server/core/variables/variable.service.d.ts +2 -2
- package/dist/server/core/variables/variable.service.js +1 -1
- package/dist/server/core/variables/variable.service.js.map +1 -1
- package/dist/server/index.d.ts +2 -0
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +1 -0
- package/dist/server/index.js.map +1 -1
- package/dist/server/jobs/job.service.d.ts +1 -1
- package/dist/server/jobs/job.service.js +1 -1
- package/dist/server/jobs/spec.d.ts +1 -1
- package/dist/server/jobs/spec.d.ts.map +1 -1
- package/dist/server/jobs/spec.js +2 -2
- package/dist/server/jobs/spec.js.map +1 -1
- package/dist/server/online/agent/contracts.d.ts +0 -3
- package/dist/server/online/agent/contracts.d.ts.map +1 -1
- package/dist/server/online/agent/messages/projection.d.ts.map +1 -1
- package/dist/server/online/agent/messages/projection.js +3 -0
- package/dist/server/online/agent/messages/projection.js.map +1 -1
- package/dist/server/online/agent/native/backend.d.ts +2 -0
- package/dist/server/online/agent/native/backend.d.ts.map +1 -1
- package/dist/server/online/agent/native/backend.js.map +1 -1
- package/dist/server/online/agent/native/execution.d.ts +2 -0
- package/dist/server/online/agent/native/execution.d.ts.map +1 -1
- package/dist/server/online/agent/native/execution.js +56 -11
- package/dist/server/online/agent/native/execution.js.map +1 -1
- package/dist/server/online/agent/persistence/manager.d.ts +1 -2
- package/dist/server/online/agent/persistence/manager.d.ts.map +1 -1
- package/dist/server/online/agent/persistence/manager.js +0 -7
- package/dist/server/online/agent/persistence/manager.js.map +1 -1
- package/dist/server/online/agent/persistence/store.d.ts +12 -11
- package/dist/server/online/agent/persistence/store.d.ts.map +1 -1
- package/dist/server/online/agent/persistence/store.js +56 -39
- package/dist/server/online/agent/persistence/store.js.map +1 -1
- package/dist/server/online/agent/service.d.ts +2 -0
- package/dist/server/online/agent/service.d.ts.map +1 -1
- package/dist/server/online/agent/service.js.map +1 -1
- package/dist/server/online/files/cache.d.ts +19 -0
- package/dist/server/online/files/cache.d.ts.map +1 -0
- package/dist/server/online/files/cache.js +52 -0
- package/dist/server/online/files/cache.js.map +1 -0
- package/dist/server/online/files/errors.d.ts +8 -0
- package/dist/server/online/files/errors.d.ts.map +1 -0
- package/dist/server/online/files/errors.js +14 -0
- package/dist/server/online/files/errors.js.map +1 -0
- package/dist/server/online/files/input.d.ts +23 -0
- package/dist/server/online/files/input.d.ts.map +1 -0
- package/dist/server/online/files/input.js +129 -0
- package/dist/server/online/files/input.js.map +1 -0
- package/dist/server/online/files/kimi.d.ts +11 -0
- package/dist/server/online/files/kimi.d.ts.map +1 -0
- package/dist/server/online/files/kimi.js +177 -0
- package/dist/server/online/files/kimi.js.map +1 -0
- package/dist/server/online/files/profiles.d.ts +13 -0
- package/dist/server/online/files/profiles.d.ts.map +1 -0
- package/dist/server/online/files/profiles.js +124 -0
- package/dist/server/online/files/profiles.js.map +1 -0
- package/dist/server/online/files/service.d.ts +35 -0
- package/dist/server/online/files/service.d.ts.map +1 -0
- package/dist/server/online/files/service.js +174 -0
- package/dist/server/online/files/service.js.map +1 -0
- package/dist/server/online/files/types.d.ts +32 -0
- package/dist/server/online/files/types.d.ts.map +1 -0
- package/dist/server/online/files/types.js +2 -0
- package/dist/server/online/files/types.js.map +1 -0
- package/dist/server/online/search/capabilities.d.ts.map +1 -1
- package/dist/server/online/search/capabilities.js +22 -7
- package/dist/server/online/search/capabilities.js.map +1 -1
- package/dist/server/providers/agents.d.ts +1 -0
- package/dist/server/providers/agents.d.ts.map +1 -1
- package/dist/server/providers/agents.js +1 -0
- package/dist/server/providers/agents.js.map +1 -1
- package/dist/server/providers/authorization.d.ts +2 -2
- package/dist/server/providers/authorization.js +2 -2
- package/dist/server/routes/admin.js +3 -3
- package/dist/server/routes/admin.js.map +1 -1
- package/dist/server/routes/run-requests.js +1 -1
- package/dist/server/routes/run-requests.js.map +1 -1
- package/dist/server/routes/runners/admin.js +6 -6
- package/dist/server/routes/runners/admin.js.map +1 -1
- package/dist/server/routes/runners/install.js +1 -1
- package/dist/server/routes/schemas.d.ts.map +1 -1
- package/dist/server/routes/schemas.js +17 -7
- package/dist/server/routes/schemas.js.map +1 -1
- package/dist/server/runners/runner.service.js +1 -1
- package/dist/server/vendor/just-bash.js +117 -117
- package/dist/shared/access.d.ts +2 -2
- package/dist/shared/access.js +2 -2
- package/dist/shared/agents.d.ts +2 -2
- package/dist/shared/agents.d.ts.map +1 -1
- package/dist/shared/conversations.d.ts +1 -1
- package/dist/shared/conversations.d.ts.map +1 -1
- package/dist/shared/file-input-failures.d.ts +5 -0
- package/dist/shared/file-input-failures.d.ts.map +1 -0
- package/dist/shared/file-input-failures.js +20 -0
- package/dist/shared/file-input-failures.js.map +1 -0
- package/dist/shared/locales/access.en-US.js +3 -3
- package/dist/shared/locales/access.en-US.js.map +1 -1
- package/dist/shared/locales/access.zh-CN.js +3 -3
- package/dist/shared/locales/access.zh-CN.js.map +1 -1
- package/dist/shared/models.d.ts +2 -0
- package/dist/shared/models.d.ts.map +1 -1
- package/dist/shared/models.js.map +1 -1
- package/dist/shared/runners.d.ts +4 -4
- package/dist/shared/runners.d.ts.map +1 -1
- package/dist/shared/runners.js +2 -2
- package/dist/shared/runs.d.ts +5 -5
- package/dist/shared/runs.d.ts.map +1 -1
- package/dist/shared/runs.js +1 -1
- package/dist/shared/variables.d.ts +3 -3
- package/dist/shared/variables.d.ts.map +1 -1
- package/dist/shared/variables.js +1 -1
- package/docs/execution-history.md +1 -1
- package/docs/runner-agents.md +3 -3
- package/package.json +3 -2
- package/skills/nocobase-app-plugin-agents/SKILL.md +7 -1
- package/skills/nocobase-app-plugin-agents/references/extension-points.md +1 -1
- package/skills/nocobase-app-plugin-agents/references/runners.md +7 -3
package/docs/runner-agents.md
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
# Agents discovered from runners
|
|
2
2
|
|
|
3
|
-
Each runner reports the coding tools it has, and for each tool whether it is signed in and the models its account lists (`tools[].models`). In the transaction of that report, `AgentService.syncRunner` keeps one agent for each tool and model the runner reports for a tool it has enabled, installed and signed in (`reportedModels` in `shared/runners.ts`): a combination no agent exists for yet becomes a new agent, `pending`, and the agents the runner still reports get their `lastReportedAt` refreshed, at most every ten minutes. The agent's id is `runnerAgentId(tool, model)`, so two runners reporting the same combination keep one agent.
|
|
3
|
+
Each runner reports the coding tools it has, and for each tool whether it is signed in and the models its account lists (`tools[].models`). In the transaction of that report, `AgentService.syncRunner` keeps one agent for each tool and model the runner reports for a tool it has enabled, installed and signed in (`reportedModels` in `shared/runners.ts`): a combination no agent exists for yet becomes a new agent, `pending`, and the agents the runner still reports get their `lastReportedAt` refreshed, at most every ten minutes. The agent's id is `runnerAgentId(tool, model)`, so two runners reporting the same combination keep one agent. Reports do not restore marked records or fill missing model entries. Runner agents are listed according to their status; their model entry is derived from their own tool and model when read, preserving a stored reasoning effort when present.
|
|
4
4
|
|
|
5
5
|
Models are normalized before they are compared (`normalizeModel` in `shared/model-catalog.ts`): a known alias such as Claude Code's `opus` becomes the catalog's id, a release suffix (a date or `-latest`) is dropped, and OpenCode and Pi keep their `provider/` prefix with the model after it normalized the same way. The catalog names each agent (`agentNameOf`, such as "Claude · Opus 5.5") and suggests, in English and Chinese, what it is good at; a model it does not know is named after its id with nothing suggested. Keep the catalog to the models the tools offer today, checked against `TOOL_MODEL_SUGGESTIONS` in `@nocobase/agent-protocol`; removing a model from it only loses its label and suggestion, never the agent.
|
|
6
6
|
|
|
7
7
|
A pending agent is offered no work. Someone who manages agents (`agents.agents` manage) enables it on the Agent page or with `PATCH /api/agents/:agentId` (`agent update` on the CLI), writing what it is good at (required: `GOOD_AT_REQUIRED` otherwise) and, optionally, its default reasoning effort among those its tool takes (`EFFORT_UNSUPPORTED` otherwise; `medium` by default when the tool takes it). Every change names the revision it was made against and is refused with `REVISION_CONFLICT` when the agent changed since. Disabling an agent withdraws its queued runs and announces `agent.removed` with `reason` `disabled`; its conversations report it as not enabled until it is enabled again.
|
|
8
8
|
|
|
9
|
-
Where an agent can run is worked out per caller (`GET /api/agents`, `AgentView`): the online
|
|
9
|
+
Where an agent can run is worked out per caller (`GET /api/agents`, `AgentView`): the online shared runners and personal runners whose tool is enabled, installed and signed in with the agent's model, not marked unavailable there, and whose owner's policy takes the agent. `personalOnly` says only personal runners have it, which take their owners' work only. `unusable` says why the caller's work cannot start now: `pending`, `disabled`, `unreported` (no runner reported it for 14 days, `AGENT_UNREPORTED_AFTER_MS`), `notConfigured` (an application's own agent with no tool and model yet), `noRunner` or `othersPersonal` (only other people's personal runners have it). The roster a project manager picks from (`GET /api/agents/available`, `Agents.roster`) lists the enabled agents reported recently, each with whether a runner would take the caller's work now.
|
|
10
10
|
|
|
11
11
|
A run fails `modelUnavailable` when the tool's account cannot use the model after all. The claim's runner then marks that tool and model unavailable (`Runner.unavailableModels`, with the models it reported at the time), and no claim offers the model there until the runner reports the tool's models differently, such as after its account changed. Other runners are unaffected.
|
|
12
12
|
|
|
13
13
|
An application keeps agents of its own with `ensureSystem` (`source` `system`), such as a project manager: their name, description, instructions, business actions and tools and models are what the application writes, and people do not change them (`AGENT_MANAGED`). Every discovered agent gets the application's instructions and business actions through `setDefaults(provider)`; `applyDefaults()` writes them to every agent that differs, so a change in the application reaches agents discovered before it. An application updating only its compatibility action catalog can use `applyDefaults({ preserveInstructions: true })` to retain existing instructions.
|
|
14
14
|
|
|
15
|
-
Upgrading removes every agent an earlier version kept, online agents included (`202610240020_ag_runner_agents`): their rows stay
|
|
15
|
+
Upgrading from before runner agents were introduced removes every agent an earlier version kept, online agents included (`202610240020_ag_runner_agents`): their rows stay marked `deletedAt` and disabled, so runs, comments and conversations that name them still show their names; their queued runs are cancelled, pending run requests withdrawn, and default chat agents that named them cleared. Those legacy records remain removed. A repair migration clears stale deletion and archive markers on runner agents and fills an empty model entry from the stored tool and model, using the tool's initial reasoning effort. It keeps each agent's status unchanged, and rolling back leaves the repaired data in place. Reads already show runner agents by status and derive a missing model entry, so an enabled agent can keep taking work before the migration runs. Older hand-configured and application-owned agents keep their existing removal behavior. The model services stay and keep serving the application's own model calls.
|
|
16
16
|
|
|
17
17
|
## Discovery management
|
|
18
18
|
|
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": "1.0.0-beta.
|
|
5
|
+
"version": "1.0.0-beta.22",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"prettier": "@nocobase/dev-config/prettier",
|
|
8
8
|
"engines": {
|
|
@@ -166,6 +166,7 @@
|
|
|
166
166
|
"sqlite-vec": "^0.1.9",
|
|
167
167
|
"yaml": "^2.9.0",
|
|
168
168
|
"zod": "^4.6.5",
|
|
169
|
+
"@nocobase/document-extractor": "^0.1.0-beta.0",
|
|
169
170
|
"@nocobase/agent-protocol": "^0.1.0-beta.14",
|
|
170
171
|
"@nocobase/app-cli-client": "^0.1.0-beta.15",
|
|
171
172
|
"@nocobase/cli-envelope": "^0.1.0-beta.1",
|
|
@@ -211,7 +212,7 @@
|
|
|
211
212
|
"react-dom": "^19.2.8",
|
|
212
213
|
"typescript": "^6.0.3",
|
|
213
214
|
"vitest": "^4.1.10",
|
|
214
|
-
"@nocobase/agent-runner": "0.1.0-beta.
|
|
215
|
+
"@nocobase/agent-runner": "0.1.0-beta.18",
|
|
215
216
|
"@nocobase/app-testing": "0.1.0-beta.6",
|
|
216
217
|
"@nocobase/db-postgres": "0.1.0-beta.5",
|
|
217
218
|
"@nocobase/db-sqlite": "0.1.0-beta.6",
|
|
@@ -13,10 +13,16 @@ The package README is the full reference: read it at `node_modules/@nocobase/app
|
|
|
13
13
|
|
|
14
14
|
## Key rules
|
|
15
15
|
|
|
16
|
-
- Runner tool selection is server-owned and explicit. New registrations default to Codex and Claude Code; additional catalog tools must be selected. Native adapters take precedence over ACP. Owners manage personal tools, and runner managers may also manage
|
|
16
|
+
- Runner tool selection is server-owned and explicit. New registrations default to Codex and Claude Code; additional catalog tools must be selected. Native adapters take precedence over ACP. Owners manage personal tools, and runner managers may also manage shared tools. Unknown tools and custom launch commands are not supported. See the README’s “Selecting runner tools and ACP agents” for protocol upgrades, detection triggers and default-model behavior.
|
|
17
17
|
|
|
18
18
|
- 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.
|
|
19
19
|
- 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. The `agentsToken.onlineAgent` service selects native SDK execution or an explicitly chosen Runner Agent through one realtime conversation contract. Native execution runs registered business tools directly through the SDK; Runner chat uses the existing queue and canonical history. The original chat API and shared browser controller use this service, and never silently change executors. Read [OnlineAgent chats and business tools](references/online-agent.md) to configure that service and its `OnlineAgentConfigurator`.
|
|
20
|
+
- Native files follow legacy Provider defaults: OpenAI/Anthropic/Google/OpenAI-compatible forward PDFs and images, Alibaba forwards images and extracts document text locally, and Moonshot forwards images and uploads supported documents to its selected Kimi Files service automatically. Ollama images remain native; PDF and other supported documents use local text extraction by default, not failure-triggered fallback. DeepSeek/Cohere retain local document extraction and do not forward undeclared images; existing exact profiles still override defaults. Read the package README's **Native document inputs** before configuring exact service/model/Provider/protocol/base URL overrides. Never promote extracted content above the user role, or silently change routes after failure.
|
|
21
|
+
- Unsupported user attachments must not terminate the conversation: replace only the model replay file part with an untrusted filename/MIME/controlled-limitation description, explicitly stating that the contents were not parsed. Apply the same policy to historical follow-up and explicit extractor `unsupported` results; never forward unsupported bytes, guess contents, persist the description as an original message or cache it as extracted text. Keep authorization, inline validation, format-mismatch, budget, cancellation and actual parsing/Provider failures unchanged.
|
|
22
|
+
- Local DOCX text extraction omits embedded binary images before budgeting; it does not perform OCR. Image-only documents fail as unreadable. Do not raise text limits to accommodate base64 image data or change Knowledge's default image representation.
|
|
23
|
+
- File preparation failures expose only controlled reason codes in execution-status notice params, with fixed fallback titles and viewer-localized wording. Keep parser/Provider errors and credentials private; never infer a historical failure reason from current model configuration or turn Stop into a failure.
|
|
24
|
+
- Local document cache hits still reauthorize and read current bytes; cache keys isolate users, sources and extractor instances. Historical/native/reference inputs count toward execution budgets; declare a verified lower native count through profile `maxNativeFiles` when the Provider requires it. Model changes and approvals rebuild replay copies from originals. Stop waits for file-stream cancellation and Worker termination; retryFinalization does not repeat extraction or tools.
|
|
25
|
+
- Kimi Files extraction is automatic for Moonshot; OpenAI-compatible services require an exact remote profile. An exact local profile opts out for a Moonshot model. Use the selected service's saved API key and bound endpoint, never a model-name heuristic, environment-key fallback or second service. Native support skips upload; remote results are execution-only. Upload/content have one five-minute deadline, while DELETE has an independent five-second cleanup window awaited by Stop/shutdown. Lost upload IDs and failed DELETE can leave remote objects; log only sanitized diagnostics. Read the README's **Kimi extraction and exact overrides** section.
|
|
20
26
|
- Native Skills and bash are opt-in server scope capabilities, not a Runner or default global tool set. Read [Native Skills and application CLI](../../docs/native-sandbox.md) before enabling them. Use `context.execution` only inside the current tool invocation, forward `context.signal`, and never retry unknown writes or restore approval-time `/tmp`.
|
|
21
27
|
- 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).
|
|
22
28
|
- 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`.
|
|
@@ -29,7 +29,7 @@ Rules that are easy to miss:
|
|
|
29
29
|
- `context.assemble`, brief sections and mounts run inside the claim's transaction and read the database through the claim's connection only (on SQLite it is the only connection). Read anything else in the provider's optional `prepare(run)`, which runs before the transaction. A throw leaves the run queued; three failures fail it `setupFailed`.
|
|
30
30
|
- `runs.enqueue` takes an optional outer transaction; inside another plugin's transaction, publish the collected events after it commits.
|
|
31
31
|
- When someone answers for the subject, pass `responsibleUserId` and the source (`requestedByUserId`, or `causedByRunId` for what a run did). Work another person causes then answers `outcome: 'pending'`: a run request only the responsible confirms (`runs.requests`, `/api/agents/runRequests`), unless `execution: 'mine'` runs it as the asker, which is refused with `NO_RUNNER_AVAILABLE` when no online runner would take the asker's work (`eligibility.canClaim` with the agent's variables). Both people must have agent access; identical pending snapshots are reused without renewing expiry. For mutable responsibility, bind `subjects.register({ …, responsibleUserId: (conn, subjectId) => … })` to read the current responsible using the supplied transaction connection, so old owners cannot confirm or reject before reassignment. Call `runs.requests.reassign` with each responsibility change; without a resolver this is the only protection against stale confirmation. If there is no usable new responsible, reassignment expires and notifies instead of dropping the work, preserving `runAsMe`. Forward `runRequest.*` events and `run_request_expired` notices to the App's inbox, and handle `outcome` before using a possibly null `runId`.
|
|
32
|
-
- To tell a person before queuing whether a runner would take their work, call `eligibility.canClaim` (online now) or `mayQueue` (some registered runner could) with the subject's variable scopes; a variable marked `teamRunnersOnly` needs a
|
|
32
|
+
- To tell a person before queuing whether a runner would take their work, call `eligibility.canClaim` (online now) or `mayQueue` (some registered runner could) with the subject's variable scopes; a variable marked `teamRunnersOnly` needs a shared runner. Enqueue itself does not refuse work run as the responsible or as whoever woke the agent: such work waits with `secretsNotAllowed`.
|
|
33
33
|
- Forward `notice` / `notice.cleared` using the exported `AgentsNotice` interface. Dispatch by its `type`: runner notices go to the runner's owner, `run_secrets_not_allowed` to the run's actor and owner, and `run_request_expired` to the requester. Subjects are of kind `runner`, `run` or `runRequest`. A secrets notice names the run, the agent and the team-only variables in its parameters. Deduplicate by the notice key. Existing copied queue components must merge the `secretsNotAllowed` type and label from the Registry.
|
|
34
34
|
- A repository provider minting credentials in `prepare` implements idempotent `discard(run, prepared)` to revoke undelivered credentials. The plugin calls it outside the transaction on a skipped or rolled-back claim; the App implements the code host revocation API.
|
|
35
35
|
- Name commands in a brief with `commandRef(cli, id, flag?)` rather than spelling them.
|
|
@@ -12,7 +12,7 @@ A runner (shown as a runtime) is `nocobase-runner` from `@nocobase/agent-runner`
|
|
|
12
12
|
|
|
13
13
|
A runner registers once per App with a one-time registration token (10 minutes):
|
|
14
14
|
|
|
15
|
-
- On the web: Runtimes page, "Add runtime". It asks
|
|
15
|
+
- On the web: Runtimes page, "Add runtime". It asks the usage scope (personal, or shared for someone who manages `agents.runners`), which coding tools it may run and its maximum concurrent runs, then offers Prompt and Manual installation for macOS, Linux and Windows (WSL Ubuntu), with a fresh one-time registration token, and waits for the runner to connect.
|
|
16
16
|
- Through the API: `POST /api/agents/runners/registrationTokens` (CLI: `runtime token create`).
|
|
17
17
|
- From the App's checkout or deployment: `pnpm nocobase agents runner-token --trust team` or `--trust ownerOnly --owner <user id>`, optionally `--tools claude,codex`. It prints the token (`--json` for the envelope).
|
|
18
18
|
|
|
@@ -24,7 +24,11 @@ Registering again with the same owner, name and hostname revokes previous regist
|
|
|
24
24
|
|
|
25
25
|
The install script requires an explicit `--server <App URL>` with `--runner` and rejects a missing or empty value before downloading or installing anything. CLI-only installation still defaults to the application that served the script.
|
|
26
26
|
|
|
27
|
-
A runner authenticates afterwards with its own key. Personal runners (`ownerOnly`) run only work their owner started, and receive its variables like any runner, except those marked "
|
|
27
|
+
A runner authenticates afterwards with its own key. Personal runners (`ownerOnly`) run only work their owner started, and receive its variables like any runner, except those marked "Shared runtimes only" (`teamRunnersOnly`): a run that gets one goes to a shared runner. Their owner may share them with all users. `nocobase-runner unregister --server <url>` or "Revoke" on the Runtimes page ends a registration.
|
|
28
|
+
|
|
29
|
+
The Prompt option asks the host’s agent to check Node.js 24 and signed-in coding tools, use the one-time command to register and install the background service, resolve service PATH, proxy and npm global-permission issues without snap packages, and confirm the connection with `nocobase-runner status`. The Windows prompt first asks the agent to check that it is inside WSL Ubuntu. Otherwise it must stop and tell the user to run `wsl --install` in PowerShell, restart Windows, reopen the agent inside WSL Ubuntu and run the prompt again; only inside WSL may it continue. Install Node.js and the coding tools there too, and enable mirrored networking if WSL cannot reach the internet. Manual installation shows one command on macOS/Linux, or the PowerShell step followed by that same Linux command in Ubuntu on Windows.
|
|
30
|
+
|
|
31
|
+
Personal (`ownerOnly`) and shared (`team`) both need a VM or isolated environment: agents have full access and the runner is not a sandbox. If no coding tools are found, run `nocobase-runner service install` again from a terminal where `which codex` / `which claude` works, then restart the service (or rerun `nocobase-runner start`) to capture PATH.
|
|
28
32
|
|
|
29
33
|
## How work reaches a runner
|
|
30
34
|
|
|
@@ -59,4 +63,4 @@ For application-owned system agents, `useAgentOption(id)` in the client kit read
|
|
|
59
63
|
|
|
60
64
|
## Online capacity
|
|
61
65
|
|
|
62
|
-
Each application's heartbeat supplies complete total and tool slots; updated runners count only that application's tasks and build jobs. Change capacity on the Runtimes page or the application's online CLI, never with local register/start flags. New registrations default to
|
|
66
|
+
Each application's heartbeat supplies complete total and tool slots; updated runners count only that application's tasks and build jobs. Change capacity on the Runtimes page or the application's online CLI, never with local register/start flags. New registrations default to three slots. Old servers without this heartbeat field use legacy local values temporarily; status labels that source. No local values are uploaded. A configuration change wakes waiting claims and adds one confirmation heartbeat; shrinking never kills existing leases. Custom application projections and installed page copies must forward reportedSlots, capacitySource, capacityReportedAt and toolLoad, and show pending sync or last-report time. See the package README's effective runner slots section.
|