@nocobase/app-plugin-agents 0.1.0-beta.10 → 0.1.0-beta.11
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 +43 -0
- package/README.md +23 -1
- package/dist/client/locales/en-US.d.ts +1 -0
- package/dist/client/locales/en-US.d.ts.map +1 -1
- package/dist/client/locales/en-US.js +1 -0
- package/dist/client/locales/en-US.js.map +1 -1
- package/dist/client/locales/runtimes.en-US.d.ts +0 -1
- package/dist/client/locales/runtimes.en-US.d.ts.map +1 -1
- package/dist/client/locales/runtimes.en-US.js +0 -1
- 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 +0 -1
- package/dist/client/locales/runtimes.zh-CN.js.map +1 -1
- package/dist/client/locales/skills.en-US.d.ts +1 -0
- package/dist/client/locales/skills.en-US.d.ts.map +1 -1
- package/dist/client/locales/skills.en-US.js +2 -1
- package/dist/client/locales/skills.en-US.js.map +1 -1
- package/dist/client/locales/skills.zh-CN.d.ts.map +1 -1
- package/dist/client/locales/skills.zh-CN.js +2 -1
- package/dist/client/locales/skills.zh-CN.js.map +1 -1
- package/dist/client/locales/zh-CN.d.ts.map +1 -1
- package/dist/client/locales/zh-CN.js +1 -0
- package/dist/client/locales/zh-CN.js.map +1 -1
- package/dist/client/pages/runtimes/workspace-diagnostics.d.ts.map +1 -1
- package/dist/client/pages/runtimes/workspace-diagnostics.js +3 -5
- package/dist/client/pages/runtimes/workspace-diagnostics.js.map +1 -1
- package/dist/client/pages/skills/detail/index.d.ts.map +1 -1
- package/dist/client/pages/skills/detail/index.js +7 -10
- package/dist/client/pages/skills/detail/index.js.map +1 -1
- package/dist/client/pages/skills/index.d.ts.map +1 -1
- package/dist/client/pages/skills/index.js +2 -2
- package/dist/client/pages/skills/index.js.map +1 -1
- package/dist/database/migrations/.manifest.json +14 -2
- package/dist/database/migrations/202610020003_ag_create_runs.d.ts.map +1 -1
- package/dist/database/migrations/202610020003_ag_create_runs.js +0 -1
- package/dist/database/migrations/202610020003_ag_create_runs.js.map +1 -1
- package/dist/database/migrations/202610250001_ag_comment_runner_consent.d.ts +4 -0
- package/dist/database/migrations/202610250001_ag_comment_runner_consent.d.ts.map +1 -0
- package/dist/database/migrations/202610250001_ag_comment_runner_consent.js +41 -0
- package/dist/database/migrations/202610250001_ag_comment_runner_consent.js.map +1 -0
- package/dist/database/migrations/202610260001_ag_drop_directory_index.d.ts +4 -0
- package/dist/database/migrations/202610260001_ag_drop_directory_index.d.ts.map +1 -0
- package/dist/database/migrations/202610260001_ag_drop_directory_index.js +24 -0
- package/dist/database/migrations/202610260001_ag_drop_directory_index.js.map +1 -0
- package/dist/database/migrations/202610260001_ag_run_revision.d.ts +4 -0
- package/dist/database/migrations/202610260001_ag_run_revision.d.ts.map +1 -0
- package/dist/database/migrations/202610260001_ag_run_revision.js +19 -0
- package/dist/database/migrations/202610260001_ag_run_revision.js.map +1 -0
- package/dist/package.json +1 -1
- package/dist/server/composition.d.ts +2 -0
- package/dist/server/composition.d.ts.map +1 -1
- package/dist/server/composition.js +13 -1
- package/dist/server/composition.js.map +1 -1
- package/dist/server/core/agents/agent.store.d.ts +1 -1
- package/dist/server/core/agents/agent.store.d.ts.map +1 -1
- package/dist/server/core/agents/agent.store.js +3 -6
- package/dist/server/core/agents/agent.store.js.map +1 -1
- package/dist/server/core/brief/brief.js +1 -1
- package/dist/server/core/brief/brief.js.map +1 -1
- package/dist/server/core/runs/claim.d.ts +15 -3
- package/dist/server/core/runs/claim.d.ts.map +1 -1
- package/dist/server/core/runs/claim.js +257 -24
- package/dist/server/core/runs/claim.js.map +1 -1
- package/dist/server/core/runs/comment-consent.d.ts +24 -0
- package/dist/server/core/runs/comment-consent.d.ts.map +1 -0
- package/dist/server/core/runs/comment-consent.js +116 -0
- package/dist/server/core/runs/comment-consent.js.map +1 -0
- package/dist/server/core/runs/identity.d.ts +3 -0
- package/dist/server/core/runs/identity.d.ts.map +1 -1
- package/dist/server/core/runs/identity.js +38 -12
- package/dist/server/core/runs/identity.js.map +1 -1
- package/dist/server/core/runs/input-gate.d.ts.map +1 -1
- package/dist/server/core/runs/input-gate.js +4 -0
- package/dist/server/core/runs/input-gate.js.map +1 -1
- package/dist/server/core/runs/lifecycle.d.ts.map +1 -1
- package/dist/server/core/runs/lifecycle.js +24 -18
- package/dist/server/core/runs/lifecycle.js.map +1 -1
- package/dist/server/core/runs/ports.d.ts +8 -1
- package/dist/server/core/runs/ports.d.ts.map +1 -1
- package/dist/server/core/runs/ports.js.map +1 -1
- package/dist/server/core/runs/run-data-purge.d.ts +15 -0
- package/dist/server/core/runs/run-data-purge.d.ts.map +1 -0
- package/dist/server/core/runs/run-data-purge.js +82 -0
- package/dist/server/core/runs/run-data-purge.js.map +1 -0
- package/dist/server/core/runs/run-requests.d.ts +25 -0
- package/dist/server/core/runs/run-requests.d.ts.map +1 -1
- package/dist/server/core/runs/run-requests.js +131 -63
- package/dist/server/core/runs/run-requests.js.map +1 -1
- package/dist/server/core/runs/run.service.d.ts +12 -0
- package/dist/server/core/runs/run.service.d.ts.map +1 -1
- package/dist/server/core/runs/run.service.js +518 -33
- package/dist/server/core/runs/run.service.js.map +1 -1
- package/dist/server/core/runs/run.store.d.ts +5 -0
- package/dist/server/core/runs/run.store.d.ts.map +1 -1
- package/dist/server/core/runs/run.store.js +3 -0
- package/dist/server/core/runs/run.store.js.map +1 -1
- package/dist/server/core/runs/sweeper.d.ts +1 -0
- package/dist/server/core/runs/sweeper.d.ts.map +1 -1
- package/dist/server/core/runs/sweeper.js +1 -0
- package/dist/server/core/runs/sweeper.js.map +1 -1
- package/dist/server/core/runs/transitions.d.ts +1 -1
- package/dist/server/core/runs/transitions.d.ts.map +1 -1
- package/dist/server/core/runs/transitions.js +11 -3
- package/dist/server/core/runs/transitions.js.map +1 -1
- package/dist/server/core/skills/skill.service.d.ts +6 -2
- package/dist/server/core/skills/skill.service.d.ts.map +1 -1
- package/dist/server/core/skills/skill.service.js +43 -58
- package/dist/server/core/skills/skill.service.js.map +1 -1
- package/dist/server/core/skills/skill.store.d.ts +14 -0
- package/dist/server/core/skills/skill.store.d.ts.map +1 -1
- package/dist/server/core/skills/skill.store.js +30 -0
- package/dist/server/core/skills/skill.store.js.map +1 -1
- package/dist/server/kernel/scopes.d.ts.map +1 -1
- package/dist/server/kernel/scopes.js +3 -1
- package/dist/server/kernel/scopes.js.map +1 -1
- package/dist/server/providers/agents.d.ts +4 -0
- package/dist/server/providers/agents.d.ts.map +1 -1
- package/dist/server/providers/agents.js +3 -0
- package/dist/server/providers/agents.js.map +1 -1
- package/dist/server/providers/runners.d.ts.map +1 -1
- package/dist/server/providers/runners.js +23 -0
- package/dist/server/providers/runners.js.map +1 -1
- package/dist/server/routes/admin.d.ts.map +1 -1
- package/dist/server/routes/admin.js +18 -8
- package/dist/server/routes/admin.js.map +1 -1
- package/dist/server/routes/run-requests.js +3 -3
- package/dist/server/routes/run-requests.js.map +1 -1
- package/dist/server/routes/runners/runner.d.ts.map +1 -1
- package/dist/server/routes/runners/runner.js +2 -0
- package/dist/server/routes/runners/runner.js.map +1 -1
- package/dist/server/routes/schemas.d.ts.map +1 -1
- package/dist/server/routes/schemas.js +14 -2
- package/dist/server/routes/schemas.js.map +1 -1
- package/dist/server/runners/runner.service.d.ts +11 -1
- package/dist/server/runners/runner.service.d.ts.map +1 -1
- package/dist/server/runners/runner.service.js +19 -1
- 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/agents.d.ts +0 -2
- package/dist/shared/agents.d.ts.map +1 -1
- package/dist/shared/agents.js.map +1 -1
- package/dist/shared/runs.d.ts +10 -0
- package/dist/shared/runs.d.ts.map +1 -1
- package/dist/shared/runs.js.map +1 -1
- package/dist/shared/skills.d.ts +8 -4
- package/dist/shared/skills.d.ts.map +1 -1
- package/dist/shared/skills.js +7 -2
- package/dist/shared/skills.js.map +1 -1
- package/dist/shared/variables.js +1 -1
- package/dist/shared/variables.js.map +1 -1
- package/package.json +8 -8
- package/skills/nocobase-app-plugin-agents/references/extension-points.md +19 -19
- package/skills/nocobase-app-plugin-agents/references/variables-skills-usage.md +3 -1
package/dist/shared/runs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;AA8OnC;;;;;;;;;;;;;;;;;;;;;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"}
|
package/dist/shared/skills.d.ts
CHANGED
|
@@ -6,11 +6,16 @@
|
|
|
6
6
|
* older one can be compared and restored (as a new version). A file's bytes are stored once per content, by their
|
|
7
7
|
* SHA-256, whichever versions and skills hold them; a version lists its files by that hash.
|
|
8
8
|
*
|
|
9
|
-
* Skills are
|
|
10
|
-
*
|
|
9
|
+
* Skills are team defaults (`global/default`), defaults of application scopes, or working directories (`workdir`).
|
|
10
|
+
* A run merges them in that order; a later target overrides a shared slug. Legacy agent attachments are ignored.
|
|
11
11
|
*/
|
|
12
|
-
/** `
|
|
12
|
+
/** `global`, `workdir` or a scope key the application registered. */
|
|
13
13
|
export type SkillScope = string;
|
|
14
|
+
/** The team defaults, always the lowest priority skill target. */
|
|
15
|
+
export declare const GLOBAL_SKILL_TARGET: {
|
|
16
|
+
readonly scope: "global";
|
|
17
|
+
readonly scopeId: "default";
|
|
18
|
+
};
|
|
14
19
|
export interface Skill {
|
|
15
20
|
readonly id: string;
|
|
16
21
|
/** The directory name: the `name` of its front matter, which renames it. */
|
|
@@ -32,7 +37,6 @@ export interface Skill {
|
|
|
32
37
|
readonly scriptCount: number;
|
|
33
38
|
/** Their paths. */
|
|
34
39
|
readonly scripts: readonly string[];
|
|
35
|
-
readonly agentCount: number;
|
|
36
40
|
readonly createdById: string | null;
|
|
37
41
|
readonly createdAt: string;
|
|
38
42
|
readonly updatedAt: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../../shared/skills.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,
|
|
1
|
+
{"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../../shared/skills.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,qEAAqE;AACrE,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAEh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M,aAAa,EAAE,SAAS,MAAM,EAI1C,CAAC;AAEF,+GAA+G;AAC/G,wBAAgB,aAAa,CAAC,IAAI,EAAE;IAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;CAC9B,GAAG,OAAO,CAEV;AAED,uDAAuD;AACvD,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIjD;AAED;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAC9B,UAAU,GAAG,SAAS,GAAG,WAAW,GAAG,UAAU,CAAC;AAEpD,wEAAwE;AACxE,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,MAAM,EACZ,MAAM,GAAE,SAAS,MAAM,EAAO,GAC7B,oBAAoB,GAAG,IAAI,CAyB7B;AAED,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,gBAAgB,EAChB,uBAAuB,EACvB,qBAAqB,EACrB,cAAc,EACd,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,GAC5B,MAAM,qBAAqB,CAAC"}
|
package/dist/shared/skills.js
CHANGED
|
@@ -6,9 +6,14 @@
|
|
|
6
6
|
* older one can be compared and restored (as a new version). A file's bytes are stored once per content, by their
|
|
7
7
|
* SHA-256, whichever versions and skills hold them; a version lists its files by that hash.
|
|
8
8
|
*
|
|
9
|
-
* Skills are
|
|
10
|
-
*
|
|
9
|
+
* Skills are team defaults (`global/default`), defaults of application scopes, or working directories (`workdir`).
|
|
10
|
+
* A run merges them in that order; a later target overrides a shared slug. Legacy agent attachments are ignored.
|
|
11
11
|
*/
|
|
12
|
+
/** The team defaults, always the lowest priority skill target. */
|
|
13
|
+
export const GLOBAL_SKILL_TARGET = {
|
|
14
|
+
scope: 'global',
|
|
15
|
+
scopeId: 'default',
|
|
16
|
+
};
|
|
12
17
|
/** Files a skill holds besides `SKILL.md`. */
|
|
13
18
|
export const SKILL_MAX_FILES = 200;
|
|
14
19
|
/** The largest file. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skills.js","sourceRoot":"","sources":["../../shared/skills.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;
|
|
1
|
+
{"version":3,"file":"skills.js","sourceRoot":"","sources":["../../shared/skills.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,kEAAkE;AAClE,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,KAAK,EAAE,QAAQ;IACf,OAAO,EAAE,SAAS;CACV,CAAC;AAgIX,8CAA8C;AAC9C,MAAM,CAAC,MAAM,eAAe,GAAW,GAAG,CAAC;AAC3C,wBAAwB;AACxB,MAAM,CAAC,MAAM,oBAAoB,GAAW,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC;AAC5D,iDAAiD;AACjD,MAAM,CAAC,MAAM,eAAe,GAAW,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AACxD,8BAA8B;AAC9B,MAAM,CAAC,MAAM,uBAAuB,GAAW,GAAG,GAAG,IAAI,CAAC;AAC1D,8CAA8C;AAC9C,MAAM,CAAC,MAAM,sBAAsB,GAAW,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAE/D,kHAAkH;AAClH,MAAM,CAAC,MAAM,aAAa,GAAsB;IAC9C,SAAS;IACT,YAAY;IACZ,QAAQ;CACT,CAAC;AAEF,+GAA+G;AAC/G,MAAM,UAAU,aAAa,CAAC,IAG7B;IACC,OAAO,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;AAC7D,CAAC;AAED,uDAAuD;AACvD,MAAM,UAAU,WAAW,CAAC,KAAa;IACvC,IAAI,KAAK,GAAG,IAAI;QAAE,OAAO,GAAG,KAAK,IAAI,CAAC;IACtC,IAAI,KAAK,GAAG,IAAI,GAAG,IAAI;QAAE,OAAO,G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ACrB,cAAc,GAMf,MAAM,qBAAqB,CAAC"}
|
package/dist/shared/variables.js
CHANGED
|
@@ -35,7 +35,7 @@ export function cliEnvPrefix(cli) {
|
|
|
35
35
|
* Names a run may not set: what the runner owns and, given the application's CLI command (`cli`), what reaches that CLI.
|
|
36
36
|
*/
|
|
37
37
|
export function isReservedVariable(name, cli) {
|
|
38
|
-
return (['PATH', 'HOME', 'TMPDIR', 'SHELL', 'USER'].includes(name) ||
|
|
38
|
+
return (['PATH', 'HOME', 'TMPDIR', 'TMP', 'TEMP', 'SHELL', 'USER'].includes(name) ||
|
|
39
39
|
/^(NOCOBASE_RUNNER_|AGENT_RUN_|GIT_)/u.test(name) ||
|
|
40
40
|
(cli !== undefined && name.startsWith(cliEnvPrefix(cli))));
|
|
41
41
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"variables.js","sourceRoot":"","sources":["../../shared/variables.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,+GAA+G;AAC/G,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,OAAO,EAAE,SAAS,CAAU,CAAC;AAgClE,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,E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AO,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.11",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"prettier": "@nocobase/dev-config/prettier",
|
|
8
8
|
"engines": {
|
|
@@ -143,8 +143,8 @@
|
|
|
143
143
|
"sqlite-vec": "^0.1.9",
|
|
144
144
|
"yaml": "^2.9.0",
|
|
145
145
|
"zod": "^4.6.5",
|
|
146
|
-
"@nocobase/
|
|
147
|
-
"@nocobase/
|
|
146
|
+
"@nocobase/agent-protocol": "^0.1.0-beta.8",
|
|
147
|
+
"@nocobase/app-cli-client": "^0.1.0-beta.7",
|
|
148
148
|
"@nocobase/cli-envelope": "^0.1.0-beta.1"
|
|
149
149
|
},
|
|
150
150
|
"peerDependencies": {
|
|
@@ -160,14 +160,14 @@
|
|
|
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.22",
|
|
164
164
|
"@nocobase/app-client": "^3.0.0-beta.1",
|
|
165
|
-
"@nocobase/app-plugin-authentication": "^2.0.0-beta.
|
|
165
|
+
"@nocobase/app-plugin-authentication": "^2.0.0-beta.9",
|
|
166
166
|
"@nocobase/app-plugin-authorization": "^1.0.0-beta.27",
|
|
167
167
|
"@nocobase/app-plugin-file": "^1.0.0-beta.23",
|
|
168
|
-
"@nocobase/app-server": "^2.0.0-beta.
|
|
168
|
+
"@nocobase/app-server": "^2.0.0-beta.7",
|
|
169
169
|
"@nocobase/authorization": "^1.0.0-beta.13",
|
|
170
|
-
"@nocobase/db": "^1.0.0-beta.
|
|
170
|
+
"@nocobase/db": "^1.0.0-beta.20",
|
|
171
171
|
"@nocobase/i18n": "^1.0.0-beta.7",
|
|
172
172
|
"@nocobase/markdown-mermaid": "^0.1.0-beta.2",
|
|
173
173
|
"@nocobase/service-provider": "^0.0.2-beta.2"
|
|
@@ -183,7 +183,7 @@
|
|
|
183
183
|
"react-dom": "^19.2.8",
|
|
184
184
|
"typescript": "^6.0.3",
|
|
185
185
|
"vitest": "^4.1.10",
|
|
186
|
-
"@nocobase/app-testing": "0.1.0-beta.
|
|
186
|
+
"@nocobase/app-testing": "0.1.0-beta.4",
|
|
187
187
|
"@nocobase/db-postgres": "0.1.0-beta.4",
|
|
188
188
|
"@nocobase/db-sqlite": "0.1.0-beta.5",
|
|
189
189
|
"@nocobase/dev-config": "0.1.0-beta.22",
|
|
@@ -2,25 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
Everything the App contributes goes through `agentsToken` (`@nocobase/app-plugin-agents/server/tokens`), resolved in one of the App's service providers when it boots. Text people read is an `I18nText` (`{ key, ns }`) in the App's own namespace. The README's "Extension points" section describes each field; this is the map. Where the two disagree, the types exported from `server/tokens` (the `Agents` interface) are authoritative.
|
|
4
4
|
|
|
5
|
-
| Extension point | Contributes
|
|
6
|
-
| -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
7
|
-
| `subjects.register(binding)` | A kind of subject runs work on: `kind`, `title`, `triggers`, `preview`, `context.assemble`, `sink.onRunFinished`, `queuedExpiryMs`, `reports.describe`
|
|
8
|
-
| `runs.enqueue(...)`, `runs.withdrawQueued(...)`, `runs.workload(...)` | Wake an agent on a subject, withdraw queued work, read the board of open runs
|
|
9
|
-
| `scopes.register(kind)` | A scope of variables and default skills (`key`, `title`, `description`, `access(scopeId, userId)`); `agent`
|
|
10
|
-
| `actions.provide(source)` | The business actions an agent may be given (`key`, `group`, `title`, `description`, `defaultOn`), and those never granted (`grantable: false` with a `reason`)
|
|
11
|
-
| `agents.setDefaults(provider)`, `agents.applyDefaults()` | The instructions and business actions every agent discovered from runners gets; `applyDefaults` writes them to the agents that differ
|
|
12
|
-
| `agents.ensureSystem(input)` | An agent of the App's own (fixed id, name, description, instructions, actions, tools and models), kept as given and enabled
|
|
13
|
-
| `gate.set(gate)` (`ActionGate`: `allowed(identity)`, optional `consultable(action)`) | Which business actions a caller holds now: a person their own (narrowed by an API key's scope), a run those its agent is configured with within the waking person's
|
|
14
|
-
| `conversations.sources.register`, `conversations.contextKinds.register`, `conversations.rules.provide`, `conversations.deliver`, `consultations.rules.provide` | Where conversations start from, what a page context may reference, extra system rules, news delivered into a conversation
|
|
15
|
-
| `people.provide(source)` | The App's directory: names, whom to pick, who can no longer act (`inactive`)
|
|
16
|
-
| `events.on('agent.removed' \| 'notice', listener)` | An agent disabled; people to be told, such as `runner_upgrade_required`
|
|
17
|
-
| `jobs.register(kind, registration)` | A build job kind, only for an off-by-default runner build method
|
|
18
|
-
| `reporting.usage`, `reporting.runFigures`, `reporting.range`, `reporting.modelUsage` | What runs used and cost, grouped as the App needs
|
|
19
|
-
| `briefs.sections.register(provider)` | Sections added to every brief's context layer
|
|
20
|
-
| `mounts.register(provider)` | Directories of files placed beside the agent
|
|
21
|
-
| `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)
|
|
22
|
-
| `models.gateway` | The model gateway for the App's own model calls
|
|
23
|
-
| `vectors.collection(spec)`, `vectors.stores.register` | Vector collections searched by meaning; another vector store type
|
|
5
|
+
| Extension point | Contributes | Typical use |
|
|
6
|
+
| -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
7
|
+
| `subjects.register(binding)` | A kind of subject runs work on: `kind`, `title`, `triggers`, `preview`, `context.assemble`, `sink.onRunFinished`, `queuedExpiryMs`, `reports.describe` | An issue, a ticket, a document an agent works on |
|
|
8
|
+
| `runs.enqueue(...)`, `runs.withdrawQueued(...)`, `runs.workload(...)` | Wake an agent on a subject, withdraw queued work, read the board of open runs | Assigning work to an agent from a business action |
|
|
9
|
+
| `scopes.register(kind)` | A scope of variables and default skills (`key`, `title`, `description`, `access(scopeId, userId)`); `agent` and the skill-only `global` are reserved, `workdir` is registered by the App | Per-project or per-team variables |
|
|
10
|
+
| `actions.provide(source)` | The business actions an agent may be given (`key`, `group`, `title`, `description`, `defaultOn`), and those never granted (`grantable: false` with a `reason`) | What the agent editor's Capabilities tab offers |
|
|
11
|
+
| `agents.setDefaults(provider)`, `agents.applyDefaults()` | The instructions and business actions every agent discovered from runners gets; `applyDefaults` writes them to the agents that differ |
|
|
12
|
+
| `agents.ensureSystem(input)` | An agent of the App's own (fixed id, name, description, instructions, actions, tools and models), kept as given and enabled |
|
|
13
|
+
| `gate.set(gate)` (`ActionGate`: `allowed(identity)`, optional `consultable(action)`) | Which business actions a caller holds now: a person their own (narrowed by an API key's scope), a run those its agent is configured with within the waking person's | Bounding the command manifest and every request a run makes; without a gate a caller holds only `agents.agents/view` (and `agents.runs/self` for a run) |
|
|
14
|
+
| `conversations.sources.register`, `conversations.contextKinds.register`, `conversations.rules.provide`, `conversations.deliver`, `consultations.rules.provide` | Where conversations start from, what a page context may reference, extra system rules, news delivered into a conversation | "Ask agent" buttons on business pages |
|
|
15
|
+
| `people.provide(source)` | The App's directory: names, whom to pick, who can no longer act (`inactive`) | Disabling a person stops their runners |
|
|
16
|
+
| `events.on('agent.removed' \| 'notice', listener)` | An agent disabled; people to be told, such as `runner_upgrade_required` | Releasing work given to an agent; forwarding notices to the App's inbox |
|
|
17
|
+
| `jobs.register(kind, registration)` | A build job kind, only for an off-by-default runner build method | Builds on runners |
|
|
18
|
+
| `reporting.usage`, `reporting.runFigures`, `reporting.range`, `reporting.modelUsage` | What runs used and cost, grouped as the App needs | The App's report pages |
|
|
19
|
+
| `briefs.sections.register(provider)` | Sections added to every brief's context layer | Project conventions every run should read |
|
|
20
|
+
| `mounts.register(provider)` | Directories of files placed beside the agent | Reference material for a run |
|
|
21
|
+
| `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 |
|
|
22
|
+
| `models.gateway` | The model gateway for the App's own model calls | See [Online agents](online-agents.md) |
|
|
23
|
+
| `vectors.collection(spec)`, `vectors.stores.register` | Vector collections searched by meaning; another vector store type | Semantic search for a knowledge base |
|
|
24
24
|
|
|
25
25
|
Rules that are easy to miss:
|
|
26
26
|
|
|
@@ -8,7 +8,9 @@ On the App's own pages, `VariablesSection` from `client/kit` edits a scope's var
|
|
|
8
8
|
|
|
9
9
|
## The skill library
|
|
10
10
|
|
|
11
|
-
Skills (`agSkills`) follow the open Agent Skills format: a directory with `SKILL.md` (front matter `name` and `description` required) and supporting files under `scripts/`, `references/` and `assets/`. Every save is a version runs get at once; saves name the revision they were made against and conflict with 409 `REVISION_CONFLICT`. Skills are attached to
|
|
11
|
+
Skills (`agSkills`) follow the open Agent Skills format: a directory with `SKILL.md` (front matter `name` and `description` required) and supporting files under `scripts/`, `references/` and `assets/`. Every save is a version runs get at once; saves name the revision they were made against and conflict with 409 `REVISION_CONFLICT`. Skills are attached to the fixed `global/default` target, a registered application scope, or a working directory (`DefaultSkillsSection` in `client/kit`). Agents may run a skill's scripts. File contents go to the Drive disk `agents.skills.disk` names. See the README's "What it does" (Skills) and "Configuration" sections.
|
|
12
|
+
|
|
13
|
+
Every run merges global → application scopes → workdir; later targets override the same slug. `skill attachment get/set global default` requires `agents.agents` read/manage for reading and manage for writing. An empty `skillIds` array clears the target. Agent skill attachments are refused and legacy rows are ignored; agent variables remain supported. `global` is reserved and cannot be registered as an application scope or used for variables. Global changes affect subsequent claims and their existing skill fingerprint; no runner protocol change is needed.
|
|
12
14
|
|
|
13
15
|
Skills the App's CLI ships (`nocobase.cli.skills`) reach every run beside the run's own.
|
|
14
16
|
|