@nocobase/app-plugin-agents 0.1.0-beta.1 → 0.1.0-beta.2
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 +44 -0
- package/README.md +15 -9
- package/dist/client/api/client.d.ts +7 -2
- package/dist/client/api/client.d.ts.map +1 -1
- package/dist/client/api/client.js +11 -3
- package/dist/client/api/client.js.map +1 -1
- package/dist/client/chat/message-model.d.ts.map +1 -1
- package/dist/client/chat/message-model.js +10 -0
- package/dist/client/chat/message-model.js.map +1 -1
- package/dist/client/chat/settings-section.d.ts.map +1 -1
- package/dist/client/chat/settings-section.js +29 -19
- package/dist/client/chat/settings-section.js.map +1 -1
- package/dist/client/components/variables/variable-dialogs.d.ts +5 -1
- package/dist/client/components/variables/variable-dialogs.d.ts.map +1 -1
- package/dist/client/components/variables/variable-dialogs.js +14 -8
- package/dist/client/components/variables/variable-dialogs.js.map +1 -1
- package/dist/client/components/variables/variables-panel.d.ts.map +1 -1
- package/dist/client/components/variables/variables-panel.js +7 -2
- package/dist/client/components/variables/variables-panel.js.map +1 -1
- package/dist/client/lib/agents.d.ts.map +1 -1
- package/dist/client/lib/agents.js +1 -0
- package/dist/client/lib/agents.js.map +1 -1
- package/dist/client/locales/chat.en-US.d.ts +7 -0
- package/dist/client/locales/chat.en-US.d.ts.map +1 -1
- package/dist/client/locales/chat.en-US.js +8 -1
- 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 +8 -1
- package/dist/client/locales/chat.zh-CN.js.map +1 -1
- package/dist/client/locales/en-US.d.ts +6 -1
- package/dist/client/locales/en-US.d.ts.map +1 -1
- package/dist/client/locales/en-US.js +7 -1
- package/dist/client/locales/en-US.js.map +1 -1
- package/dist/client/locales/runWait.en-US.d.ts +31 -0
- package/dist/client/locales/runWait.en-US.d.ts.map +1 -0
- package/dist/client/locales/runWait.en-US.js +30 -0
- package/dist/client/locales/runWait.en-US.js.map +1 -0
- package/dist/client/locales/runWait.zh-CN.d.ts +5 -0
- package/dist/client/locales/runWait.zh-CN.d.ts.map +1 -0
- package/dist/client/locales/runWait.zh-CN.js +25 -0
- package/dist/client/locales/runWait.zh-CN.js.map +1 -0
- package/dist/client/locales/runtimes.en-US.js +1 -1
- package/dist/client/locales/runtimes.en-US.js.map +1 -1
- package/dist/client/locales/runtimes.zh-CN.js +1 -1
- package/dist/client/locales/runtimes.zh-CN.js.map +1 -1
- package/dist/client/locales/zh-CN.d.ts.map +1 -1
- package/dist/client/locales/zh-CN.js +7 -1
- package/dist/client/locales/zh-CN.js.map +1 -1
- package/dist/client/pages/runtimes/index.js +2 -2
- package/dist/client/pages/runtimes/index.js.map +1 -1
- package/dist/client/runs/format-wait.d.ts +21 -0
- package/dist/client/runs/format-wait.d.ts.map +1 -0
- package/dist/client/runs/format-wait.js +76 -0
- package/dist/client/runs/format-wait.js.map +1 -0
- package/dist/client/runs.d.ts +2 -0
- package/dist/client/runs.d.ts.map +1 -1
- package/dist/client/runs.js +2 -0
- package/dist/client/runs.js.map +1 -1
- package/dist/database/migrations/.manifest.json +4 -0
- package/dist/database/migrations/202610090001_ag_add_team_runner_variables.d.ts +9 -0
- package/dist/database/migrations/202610090001_ag_add_team_runner_variables.d.ts.map +1 -0
- package/dist/database/migrations/202610090001_ag_add_team_runner_variables.js +28 -0
- package/dist/database/migrations/202610090001_ag_add_team_runner_variables.js.map +1 -0
- package/dist/package.json +1 -1
- package/dist/server/composition.d.ts +6 -1
- package/dist/server/composition.d.ts.map +1 -1
- package/dist/server/composition.js +10 -2
- package/dist/server/composition.js.map +1 -1
- package/dist/server/core/conversations/availability.d.ts +10 -4
- package/dist/server/core/conversations/availability.d.ts.map +1 -1
- package/dist/server/core/conversations/availability.js +6 -20
- package/dist/server/core/conversations/availability.js.map +1 -1
- package/dist/server/core/conversations/chat-settings.d.ts +2 -2
- package/dist/server/core/conversations/chat-settings.d.ts.map +1 -1
- package/dist/server/core/conversations/chat-settings.js +19 -1
- package/dist/server/core/conversations/chat-settings.js.map +1 -1
- package/dist/server/core/conversations/conversation.service.d.ts +2 -1
- package/dist/server/core/conversations/conversation.service.d.ts.map +1 -1
- package/dist/server/core/conversations/conversation.service.js +250 -52
- package/dist/server/core/conversations/conversation.service.js.map +1 -1
- package/dist/server/core/runs/availability.d.ts +5 -2
- package/dist/server/core/runs/availability.d.ts.map +1 -1
- package/dist/server/core/runs/availability.js +17 -6
- package/dist/server/core/runs/availability.js.map +1 -1
- package/dist/server/core/runs/claim.d.ts +13 -2
- package/dist/server/core/runs/claim.d.ts.map +1 -1
- package/dist/server/core/runs/claim.js +175 -63
- package/dist/server/core/runs/claim.js.map +1 -1
- package/dist/server/core/runs/eligibility.d.ts +49 -0
- package/dist/server/core/runs/eligibility.d.ts.map +1 -0
- package/dist/server/core/runs/eligibility.js +44 -0
- package/dist/server/core/runs/eligibility.js.map +1 -0
- package/dist/server/core/runs/extensions.d.ts +2 -0
- package/dist/server/core/runs/extensions.d.ts.map +1 -1
- package/dist/server/core/runs/extensions.js.map +1 -1
- package/dist/server/core/runs/index.d.ts +2 -1
- package/dist/server/core/runs/index.d.ts.map +1 -1
- package/dist/server/core/runs/index.js +2 -1
- package/dist/server/core/runs/index.js.map +1 -1
- package/dist/server/core/runs/run.service.d.ts +3 -2
- package/dist/server/core/runs/run.service.d.ts.map +1 -1
- package/dist/server/core/runs/run.service.js +13 -4
- package/dist/server/core/runs/run.service.js.map +1 -1
- package/dist/server/core/runs/run.store.d.ts +7 -2
- package/dist/server/core/runs/run.store.d.ts.map +1 -1
- package/dist/server/core/runs/run.store.js +8 -2
- package/dist/server/core/runs/run.store.js.map +1 -1
- package/dist/server/core/runs/transitions.d.ts.map +1 -1
- package/dist/server/core/runs/transitions.js +1 -0
- package/dist/server/core/runs/transitions.js.map +1 -1
- package/dist/server/core/runs/workload.d.ts +1 -1
- package/dist/server/core/runs/workload.d.ts.map +1 -1
- package/dist/server/core/runs/workload.js +44 -13
- package/dist/server/core/runs/workload.js.map +1 -1
- package/dist/server/core/variables/index.d.ts +1 -1
- package/dist/server/core/variables/index.d.ts.map +1 -1
- package/dist/server/core/variables/index.js +1 -1
- package/dist/server/core/variables/index.js.map +1 -1
- package/dist/server/core/variables/variable.service.d.ts +21 -4
- package/dist/server/core/variables/variable.service.d.ts.map +1 -1
- package/dist/server/core/variables/variable.service.js +84 -5
- package/dist/server/core/variables/variable.service.js.map +1 -1
- package/dist/server/jobs/index.d.ts +1 -1
- package/dist/server/jobs/index.d.ts.map +1 -1
- package/dist/server/jobs/index.js +1 -1
- package/dist/server/jobs/index.js.map +1 -1
- package/dist/server/jobs/job.service.d.ts +2 -0
- package/dist/server/jobs/job.service.d.ts.map +1 -1
- package/dist/server/jobs/job.service.js +3 -1
- package/dist/server/jobs/job.service.js.map +1 -1
- package/dist/server/jobs/spec.d.ts +4 -0
- package/dist/server/jobs/spec.d.ts.map +1 -1
- package/dist/server/jobs/spec.js +6 -0
- package/dist/server/jobs/spec.js.map +1 -1
- package/dist/server/kernel/events.d.ts +7 -2
- package/dist/server/kernel/events.d.ts.map +1 -1
- package/dist/server/kernel/events.js.map +1 -1
- package/dist/server/routes/admin.d.ts.map +1 -1
- package/dist/server/routes/admin.js +9 -2
- package/dist/server/routes/admin.js.map +1 -1
- package/dist/server/routes/chat.d.ts.map +1 -1
- package/dist/server/routes/chat.js +9 -6
- package/dist/server/routes/chat.js.map +1 -1
- package/dist/server/routes/index.d.ts.map +1 -1
- package/dist/server/routes/index.js +6 -1
- package/dist/server/routes/index.js.map +1 -1
- package/dist/server/routes/roster.d.ts.map +1 -1
- package/dist/server/routes/roster.js +2 -1
- package/dist/server/routes/roster.js.map +1 -1
- package/dist/server/routes/runners/admin.d.ts +9 -1
- package/dist/server/routes/runners/admin.d.ts.map +1 -1
- package/dist/server/routes/runners/admin.js +62 -24
- package/dist/server/routes/runners/admin.js.map +1 -1
- package/dist/server/routes/schemas.d.ts +4 -2
- package/dist/server/routes/schemas.d.ts.map +1 -1
- package/dist/server/routes/schemas.js +35 -2
- package/dist/server/routes/schemas.js.map +1 -1
- package/dist/server/runners/runner.service.d.ts +7 -2
- package/dist/server/runners/runner.service.d.ts.map +1 -1
- package/dist/server/runners/runner.service.js +22 -2
- package/dist/server/runners/runner.service.js.map +1 -1
- package/dist/server/tokens.d.ts +1 -0
- package/dist/server/tokens.d.ts.map +1 -1
- package/dist/server/tokens.js +1 -0
- package/dist/server/tokens.js.map +1 -1
- package/dist/shared/conversations.d.ts +48 -13
- package/dist/shared/conversations.d.ts.map +1 -1
- package/dist/shared/conversations.js +2 -2
- package/dist/shared/conversations.js.map +1 -1
- package/dist/shared/runners.d.ts +9 -4
- package/dist/shared/runners.d.ts.map +1 -1
- package/dist/shared/runners.js.map +1 -1
- package/dist/shared/runs.d.ts +22 -1
- package/dist/shared/runs.d.ts.map +1 -1
- package/dist/shared/runs.js +3 -0
- package/dist/shared/runs.js.map +1 -1
- package/dist/shared/variables.d.ts +12 -0
- package/dist/shared/variables.d.ts.map +1 -1
- package/dist/shared/variables.js +4 -0
- package/dist/shared/variables.js.map +1 -1
- package/package.json +8 -8
- package/skills/nocobase-app-plugin-agents/references/extension-points.md +3 -0
- package/skills/nocobase-app-plugin-agents/references/runners.md +1 -1
- package/skills/nocobase-app-plugin-agents/references/verification-and-troubleshooting.md +1 -1
|
@@ -6,6 +6,10 @@
|
|
|
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.
|
|
9
13
|
*/
|
|
10
14
|
/** The scopes this plugin knows; the application registers the others (`GET agents/vocabulary` lists them). */
|
|
11
15
|
export declare const CORE_VARIABLE_SCOPES: readonly ["agent", "workdir"];
|
|
@@ -13,10 +17,18 @@ export declare const CORE_VARIABLE_SCOPES: readonly ["agent", "workdir"];
|
|
|
13
17
|
export type VariableScope = string;
|
|
14
18
|
export interface Variable {
|
|
15
19
|
readonly name: string;
|
|
20
|
+
/** Only team runners receive it: a run that gets it waits for one (`secretsNotAllowed`); absent means false. */
|
|
21
|
+
readonly teamRunnersOnly?: boolean;
|
|
16
22
|
readonly updatedAt: string;
|
|
17
23
|
readonly updatedById: string | null;
|
|
18
24
|
readonly updatedByName: string | null;
|
|
19
25
|
}
|
|
26
|
+
/** A variable named by where it is kept, such as one that asks for a team runner. */
|
|
27
|
+
export interface VariableRef {
|
|
28
|
+
readonly scope: VariableScope;
|
|
29
|
+
readonly scopeId: string;
|
|
30
|
+
readonly name: string;
|
|
31
|
+
}
|
|
20
32
|
export interface VariableValue {
|
|
21
33
|
readonly name: string;
|
|
22
34
|
readonly value: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"variables.d.ts","sourceRoot":"","sources":["../../shared/variables.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"variables.d.ts","sourceRoot":"","sources":["../../shared/variables.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;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,gHAAgH;IAChH,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;IACnC,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,qFAAqF;AACrF,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;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,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC;AAED,6EAA6E;AAC7E,eAAO,MAAM,qBAAqB,EAAE,MAAoC,CAAC;AAEzE,4CAA4C;AAC5C,eAAO,MAAM,wBAAwB,EAAE,MAAiB,CAAC;AAEzD,yHAAyH;AACzH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,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"}
|
package/dist/shared/variables.js
CHANGED
|
@@ -6,6 +6,10 @@
|
|
|
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.
|
|
9
13
|
*/
|
|
10
14
|
/** The scopes this plugin knows; the application registers the others (`GET agents/vocabulary` lists them). */
|
|
11
15
|
export const CORE_VARIABLE_SCOPES = ['agent', 'workdir'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"variables.js","sourceRoot":"","sources":["../../shared/variables.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"variables.js","sourceRoot":"","sources":["../../shared/variables.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,+GAA+G;AAC/G,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,OAAO,EAAE,SAAS,CAAU,CAAC;AA0BlE,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,KAAK;IACL,QAAQ;IACR,QAAQ;IACR,SAAS;CACD,CAAC;AAiBX,6EAA6E;AAC7E,MAAM,CAAC,MAAM,qBAAqB,GAAW,2BAA2B,CAAC;AAEzE,4CAA4C;AAC5C,MAAM,CAAC,MAAM,wBAAwB,GAAW,CAAC,GAAG,IAAI,CAAC;AAEzD,yHAAyH;AACzH,MAAM,UAAU,YAAY,CAAC,GAAW;IACtC,OAAO,GAAG,GAAG,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,cAAc,EAAE,GAAG,CAAC,GAAG,CAAC;AAC9D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAY,EAAE,GAAY;IAC3D,OAAO,CACL,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC;QAC1D,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC;QAChC,CAAC,GAAG,KAAK,SAAS,IAAI,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,CAC1D,CAAC;AACJ,CAAC;AAKD,qEAAqE;AACrE,MAAM,UAAU,mBAAmB,CACjC,IAAY,EACZ,WAA8B,EAAE,EAChC,GAAY;IAEZ,IAAI,CAAC,IAAI;QAAE,OAAO,UAAU,CAAC;IAC7B,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC;QAAE,OAAO,SAAS,CAAC;IACxD,IAAI,kBAAkB,CAAC,IAAI,EAAE,GAAG,CAAC;QAAE,OAAO,UAAU,CAAC;IACrD,IAAI,QAAQ,CAAC,QAAQ,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.
|
|
5
|
+
"version": "0.1.0-beta.2",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"prettier": "@nocobase/dev-config/prettier",
|
|
8
8
|
"engines": {
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
"yaml": "^2.9.0",
|
|
145
145
|
"zod": "^4.6.5",
|
|
146
146
|
"@nocobase/agent-protocol": "^0.1.0-beta.1",
|
|
147
|
-
"@nocobase/app-cli-client": "^0.1.0-beta.
|
|
147
|
+
"@nocobase/app-cli-client": "^0.1.0-beta.1",
|
|
148
148
|
"@nocobase/cli-envelope": "^0.1.0-beta.0"
|
|
149
149
|
},
|
|
150
150
|
"peerDependencies": {
|
|
@@ -160,16 +160,16 @@
|
|
|
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.
|
|
163
|
+
"@nocobase/app-cli": "^1.0.0-beta.15",
|
|
164
164
|
"@nocobase/app-client": "^2.0.0-beta.2",
|
|
165
165
|
"@nocobase/app-plugin-authentication": "^2.0.0-beta.2",
|
|
166
166
|
"@nocobase/app-plugin-authorization": "^1.0.0-beta.25",
|
|
167
|
-
"@nocobase/app-plugin-file": "^1.0.0-beta.
|
|
168
|
-
"@nocobase/app-server": "^2.0.0-beta.
|
|
167
|
+
"@nocobase/app-plugin-file": "^1.0.0-beta.21",
|
|
168
|
+
"@nocobase/app-server": "^2.0.0-beta.2",
|
|
169
169
|
"@nocobase/authorization": "^1.0.0-beta.12",
|
|
170
170
|
"@nocobase/db": "^1.0.0-beta.18",
|
|
171
171
|
"@nocobase/i18n": "^1.0.0-beta.5",
|
|
172
|
-
"@nocobase/markdown-mermaid": "^0.1.0-beta.
|
|
172
|
+
"@nocobase/markdown-mermaid": "^0.1.0-beta.1",
|
|
173
173
|
"@nocobase/service-provider": "^0.0.2-beta.1"
|
|
174
174
|
},
|
|
175
175
|
"devDependencies": {
|
|
@@ -185,10 +185,10 @@
|
|
|
185
185
|
"react-dom": "^19.2.8",
|
|
186
186
|
"typescript": "^6.0.3",
|
|
187
187
|
"vitest": "^4.1.10",
|
|
188
|
-
"@nocobase/app-testing": "0.1.0-beta.1",
|
|
189
188
|
"@nocobase/db-postgres": "0.1.0-beta.3",
|
|
190
189
|
"@nocobase/db-sqlite": "0.1.0-beta.4",
|
|
191
|
-
"@nocobase/
|
|
190
|
+
"@nocobase/app-testing": "0.1.0-beta.1",
|
|
191
|
+
"@nocobase/dev-config": "0.1.0-beta.20",
|
|
192
192
|
"@nocobase/jobs": "0.1.0-beta.2"
|
|
193
193
|
},
|
|
194
194
|
"scripts": {
|
|
@@ -25,6 +25,9 @@ Rules that are easy to miss:
|
|
|
25
25
|
|
|
26
26
|
- `context.assemble`, brief sections and mounts run inside the claim's transaction and read the database through the claim's connection only (on SQLite it is the only connection). Read anything else in the provider's optional `prepare(run)`, which runs before the transaction. A throw leaves the run queued; three failures fail it `setupFailed`.
|
|
27
27
|
- `runs.enqueue` takes an optional outer transaction; inside another plugin's transaction, publish the collected events after it commits.
|
|
28
|
+
- To tell a person before queuing whether a runner would take their work, call `eligibility.canClaim` (online now) or `mayQueue` (some registered runner could) with the subject's variable scopes; a variable marked `teamRunnersOnly` needs a team runner. Enqueue itself does not refuse: such work waits with `secretsNotAllowed`.
|
|
29
|
+
- Forward `notice` / `notice.cleared` for `run_secrets_not_allowed` to the actor and owner; its subject is a run and its parameters name the run, the agent and the team-only variables. Deduplicate by the notice key. Existing copied queue components must merge the `secretsNotAllowed` type and label from the Registry.
|
|
30
|
+
- 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.
|
|
28
31
|
- A subject kind takes runner agents only unless its binding lists `online` in `agentTypes`; a run of another type is refused with `AGENT_TYPE_NOT_ALLOWED`.
|
|
29
32
|
- Name commands in a brief with `commandRef(dialect, cli, id, flag?)` rather than spelling them, so online and runner agents both get the right form.
|
|
30
33
|
- The App's CLI commands are its API routes: a route declares `...cliRoute({ command, action, ... })` in `describeRoute()`, and lists `runToken` in its `security` when a run may call it. The command manifest (`GET /api/cli/manifest`) offers each caller only the commands whose `action` the gate allows. There is no separate command registry.
|
|
@@ -12,7 +12,7 @@ A runner registers once per App with a one-time registration token (10 minutes):
|
|
|
12
12
|
|
|
13
13
|
Then on the runner's machine: `nocobase-runner register --server <App URL> --token <token>`, and `nocobase-runner start` or `nocobase-runner service install` (launchd on macOS, a systemd user unit on Linux). The install script does all of this in one line; see [Distribution](distribution.md).
|
|
14
14
|
|
|
15
|
-
A runner authenticates afterwards with its own key. Personal runners (`ownerOnly`) run only work their owner started
|
|
15
|
+
A runner authenticates afterwards with its own key. Personal runners (`ownerOnly`) run only work their owner started, and receive its variables like any runner, except those marked "Team runtimes only" (`teamRunnersOnly`): a run that gets one goes to a team runner. Their owner may share them with the team. `nocobase-runner unregister --server <url>` or "Revoke" on the Runtimes page ends a registration.
|
|
16
16
|
|
|
17
17
|
## How work reaches a runner
|
|
18
18
|
|
|
@@ -15,7 +15,7 @@ Test what the App builds on the plugin, not the plugin itself. `@nocobase/app-pl
|
|
|
15
15
|
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
16
16
|
| Runners | `GET /api/agents/runners` (`runtime list`): `status` (`online`, `offline`, `revoked`, `upgrade_required`), `lastSeenAt`, `tools` (installed, version, signed in), `policy`, `updateVersion`, `requiredProtocol` |
|
|
17
17
|
| Agents that can take work | `GET /api/agents/available` (`agent list`): each agent and whether it can take work now |
|
|
18
|
-
| Why a run waits | The run's detail and `runs.workload()`: `RUN_WAIT_REASONS` (`noRunnerOnline`, `toolUnavailable`, `noSharedRunner`, `missingFeatures`, `concurrencyFull`, `runnersBusy`, …)
|
|
18
|
+
| Why a run waits | The run's detail and `runs.workload()`: `RUN_WAIT_REASONS` (`noRunnerOnline`, `toolUnavailable`, `noSharedRunner`, `missingFeatures`, `secretsNotAllowed`, `concurrencyFull`, `runnersBusy`, …) |
|
|
19
19
|
| A run's history | `GET /api/agents/runs/:runId` and its events (`run get`, `run events`); `failureReason` and `failureDetail` |
|
|
20
20
|
| Models | `GET /api/agents/models` (what agents may use), `POST /api/agents/checkModel` (`model check`), `GET /api/agents/defaultModels` |
|
|
21
21
|
| Tarballs served | `GET /api/agents/dist/manifest` signed in; `GET /api/agents/dist/products/<product>/targets/linux-x64?format=env` |
|