plugin-agent-orchestrator 1.0.16 → 1.0.18
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/dist/client/AgentRunsTab.d.ts +2 -0
- package/dist/client/HarnessProfilesTab.d.ts +2 -0
- package/dist/client/index.js +1 -1
- package/dist/client/skill-hub/components/LoopSettings.d.ts +2 -0
- package/dist/client/skill-hub/index.d.ts +2 -1
- package/dist/client/skill-hub/tools/InteractionSchemasProvider.d.ts +1 -14
- package/dist/client/skill-hub/tools/loopTemplates.d.ts +22 -0
- package/dist/client/skill-hub/tools/registerSkillLoopCards.d.ts +1 -0
- package/dist/client/tools/PlanApprovalCard.d.ts +3 -0
- package/dist/client/tools/registerOrchestratorCards.d.ts +1 -0
- package/dist/externalVersion.js +6 -6
- package/dist/server/collections/agent-harness-profiles.d.ts +2 -0
- package/dist/server/collections/agent-harness-profiles.js +89 -0
- package/dist/server/collections/agent-loop-events.d.ts +2 -0
- package/dist/server/collections/agent-loop-events.js +101 -0
- package/dist/server/collections/agent-loop-runs.d.ts +2 -0
- package/dist/server/collections/agent-loop-runs.js +188 -0
- package/dist/server/collections/agent-loop-steps.d.ts +2 -0
- package/dist/server/collections/agent-loop-steps.js +174 -0
- package/dist/server/collections/orchestrator-config.js +7 -0
- package/dist/server/collections/skill-executions.js +12 -0
- package/dist/server/collections/skill-loop-configs.d.ts +3 -0
- package/dist/server/collections/skill-loop-configs.js +94 -0
- package/dist/server/migrations/20260524000000-add-agent-loop-fields-to-skill-executions.d.ts +7 -0
- package/dist/server/migrations/20260524000000-add-agent-loop-fields-to-skill-executions.js +55 -0
- package/dist/server/migrations/20260524001000-add-plan-approval-and-harness-profiles.d.ts +12 -0
- package/dist/server/migrations/20260524001000-add-plan-approval-and-harness-profiles.js +162 -0
- package/dist/server/plugin.d.ts +2 -0
- package/dist/server/plugin.js +13 -0
- package/dist/server/resources/agent-loop.d.ts +3 -0
- package/dist/server/resources/agent-loop.js +205 -0
- package/dist/server/services/AgentHarness.d.ts +42 -0
- package/dist/server/services/AgentHarness.js +565 -0
- package/dist/server/services/AgentLoopController.d.ts +205 -0
- package/dist/server/services/AgentLoopController.js +940 -0
- package/dist/server/services/AgentLoopRepository.d.ts +20 -0
- package/dist/server/services/AgentLoopRepository.js +210 -0
- package/dist/server/services/AgentLoopService.d.ts +149 -0
- package/dist/server/services/AgentLoopService.js +133 -0
- package/dist/server/services/AgentPlanValidator.d.ts +4 -0
- package/dist/server/services/AgentPlanValidator.js +99 -0
- package/dist/server/services/AgentPlannerService.d.ts +8 -0
- package/dist/server/services/AgentPlannerService.js +119 -0
- package/dist/server/services/AgentRegistryService.d.ts +13 -0
- package/dist/server/services/AgentRegistryService.js +178 -0
- package/dist/server/services/ExecutionSpanService.d.ts +2 -0
- package/dist/server/skill-hub/plugin.d.ts +3 -0
- package/dist/server/skill-hub/plugin.js +137 -54
- package/dist/server/tools/agent-loop.d.ts +235 -0
- package/dist/server/tools/agent-loop.js +406 -0
- package/dist/server/tools/delegate-task.js +37 -350
- package/dist/server/tools/orchestrator-plan.d.ts +205 -0
- package/dist/server/tools/orchestrator-plan.js +291 -0
- package/dist/server/tools/skill-execute.js +2 -0
- package/package.json +2 -2
- package/src/client/AgentRunsTab.tsx +764 -0
- package/src/client/HarnessProfilesTab.tsx +247 -0
- package/src/client/OrchestratorSettings.tsx +40 -2
- package/src/client/RulesTab.tsx +103 -6
- package/src/client/plugin.tsx +27 -54
- package/src/client/skill-hub/components/LoopSettings.tsx +331 -0
- package/src/client/skill-hub/index.tsx +51 -75
- package/src/client/skill-hub/tools/InteractionSchemasProvider.tsx +56 -16
- package/src/client/skill-hub/tools/SkillHubCard.tsx +35 -4
- package/src/client/skill-hub/tools/loopTemplates.ts +52 -0
- package/src/client/skill-hub/tools/registerSkillLoopCards.ts +58 -0
- package/src/client/tools/PlanApprovalCard.tsx +175 -0
- package/src/client/tools/registerOrchestratorCards.ts +7 -0
- package/src/server/collections/agent-harness-profiles.ts +59 -0
- package/src/server/collections/agent-loop-events.ts +71 -0
- package/src/server/collections/agent-loop-runs.ts +158 -0
- package/src/server/collections/agent-loop-steps.ts +144 -0
- package/src/server/collections/orchestrator-config.ts +7 -0
- package/src/server/collections/skill-executions.ts +63 -51
- package/src/server/collections/skill-loop-configs.ts +65 -0
- package/src/server/migrations/20260524000000-add-agent-loop-fields-to-skill-executions.ts +30 -0
- package/src/server/migrations/20260524001000-add-plan-approval-and-harness-profiles.ts +142 -0
- package/src/server/plugin.ts +15 -0
- package/src/server/resources/agent-loop.ts +183 -0
- package/src/server/services/AgentHarness.ts +663 -0
- package/src/server/services/AgentLoopController.ts +1128 -0
- package/src/server/services/AgentLoopRepository.ts +194 -0
- package/src/server/services/AgentLoopService.ts +161 -0
- package/src/server/services/AgentPlanValidator.ts +73 -0
- package/src/server/services/AgentPlannerService.ts +93 -0
- package/src/server/services/AgentRegistryService.ts +169 -0
- package/src/server/services/ExecutionSpanService.ts +2 -0
- package/src/server/skill-hub/plugin.ts +881 -771
- package/src/server/tools/agent-loop.ts +399 -0
- package/src/server/tools/delegate-task.ts +48 -463
- package/src/server/tools/orchestrator-plan.ts +279 -0
- package/src/server/tools/skill-execute.ts +68 -64
|
@@ -2,9 +2,10 @@ import { Plugin } from '@nocobase/client';
|
|
|
2
2
|
import { SkillManager } from './components/SkillManager';
|
|
3
3
|
import { ExecutionHistory } from './components/ExecutionHistory';
|
|
4
4
|
import { SkillMetrics } from './components/SkillMetrics';
|
|
5
|
+
import { LoopSettings } from './components/LoopSettings';
|
|
5
6
|
export declare class PluginSkillHubClient extends Plugin {
|
|
6
7
|
load(): Promise<void>;
|
|
7
8
|
private registerSkillUiCards;
|
|
8
9
|
}
|
|
9
|
-
export { SkillManager, ExecutionHistory, SkillMetrics };
|
|
10
|
+
export { SkillManager, ExecutionHistory, SkillMetrics, LoopSettings };
|
|
10
11
|
export default PluginSkillHubClient;
|
|
@@ -1,18 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
type: 'form' | 'select' | 'confirm';
|
|
4
|
-
prompt: string;
|
|
5
|
-
options?: {
|
|
6
|
-
label: string;
|
|
7
|
-
value: string | number;
|
|
8
|
-
}[];
|
|
9
|
-
fields?: Record<string, {
|
|
10
|
-
type?: string;
|
|
11
|
-
title?: string;
|
|
12
|
-
required?: boolean;
|
|
13
|
-
enum?: any[];
|
|
14
|
-
}>;
|
|
15
|
-
};
|
|
2
|
+
import { InteractionSchema } from './loopTemplates';
|
|
16
3
|
export declare const useInteractionSchemas: () => Map<string, InteractionSchema>;
|
|
17
4
|
export declare const InteractionSchemasProvider: React.FC<{
|
|
18
5
|
children?: React.ReactNode;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type InteractionSchema = {
|
|
2
|
+
type: 'form' | 'select' | 'confirm';
|
|
3
|
+
prompt: string;
|
|
4
|
+
options?: {
|
|
5
|
+
label: string;
|
|
6
|
+
value: string | number;
|
|
7
|
+
}[];
|
|
8
|
+
fields?: Record<string, {
|
|
9
|
+
type?: string;
|
|
10
|
+
title?: string;
|
|
11
|
+
required?: boolean;
|
|
12
|
+
enum?: any[];
|
|
13
|
+
}>;
|
|
14
|
+
};
|
|
15
|
+
export type LoopTemplate = {
|
|
16
|
+
key: string;
|
|
17
|
+
title: string;
|
|
18
|
+
description: string;
|
|
19
|
+
schema: InteractionSchema;
|
|
20
|
+
};
|
|
21
|
+
export declare const LOOP_TEMPLATES: LoopTemplate[];
|
|
22
|
+
export declare function getLoopTemplate(key?: string): LoopTemplate;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function registerSkillLoopCards(app: any): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function registerOrchestratorCards(app: any): Promise<void>;
|
package/dist/externalVersion.js
CHANGED
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
11
|
"react": "18.2.0",
|
|
12
|
-
"@nocobase/client": "2.0.49",
|
|
13
12
|
"antd": "5.24.2",
|
|
14
13
|
"@ant-design/icons": "5.6.1",
|
|
15
|
-
"@nocobase/
|
|
16
|
-
"@nocobase/
|
|
17
|
-
"@nocobase/
|
|
14
|
+
"@nocobase/client": "2.0.56",
|
|
15
|
+
"@nocobase/server": "2.0.56",
|
|
16
|
+
"@nocobase/database": "2.0.56",
|
|
18
17
|
"@langchain/langgraph": "0.2.74",
|
|
19
18
|
"@langchain/core": "0.3.80",
|
|
20
|
-
"@nocobase/
|
|
21
|
-
"@nocobase/ai": "2.0.
|
|
19
|
+
"@nocobase/actions": "2.0.56",
|
|
20
|
+
"@nocobase/plugin-ai": "2.0.56",
|
|
21
|
+
"@nocobase/ai": "2.0.56"
|
|
22
22
|
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
+
var __export = (target, all) => {
|
|
15
|
+
for (var name in all)
|
|
16
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
+
};
|
|
18
|
+
var __copyProps = (to, from, except, desc) => {
|
|
19
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
+
for (let key of __getOwnPropNames(from))
|
|
21
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
+
}
|
|
24
|
+
return to;
|
|
25
|
+
};
|
|
26
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
+
var agent_harness_profiles_exports = {};
|
|
28
|
+
__export(agent_harness_profiles_exports, {
|
|
29
|
+
default: () => agent_harness_profiles_default
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(agent_harness_profiles_exports);
|
|
32
|
+
var import_database = require("@nocobase/database");
|
|
33
|
+
var agent_harness_profiles_default = (0, import_database.defineCollection)({
|
|
34
|
+
name: "agentHarnessProfiles",
|
|
35
|
+
title: "Agent Harness Profiles",
|
|
36
|
+
fields: [
|
|
37
|
+
{
|
|
38
|
+
name: "id",
|
|
39
|
+
type: "bigInt",
|
|
40
|
+
autoIncrement: true,
|
|
41
|
+
primaryKey: true
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: "tag",
|
|
45
|
+
type: "string",
|
|
46
|
+
length: 100,
|
|
47
|
+
allowNull: false,
|
|
48
|
+
unique: true,
|
|
49
|
+
comment: "Stable harness profile tag used by orchestration rules and agent loop runs."
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: "title",
|
|
53
|
+
type: "string",
|
|
54
|
+
length: 200
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: "description",
|
|
58
|
+
type: "text"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: "enabled",
|
|
62
|
+
type: "boolean",
|
|
63
|
+
defaultValue: true
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: "settings",
|
|
67
|
+
type: "json",
|
|
68
|
+
defaultValue: {},
|
|
69
|
+
comment: "Harness limits and behavior settings such as max parallel sub-agents, approval mode, and tool policy."
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: "createdAt",
|
|
73
|
+
type: "date"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: "updatedAt",
|
|
77
|
+
type: "date"
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
indexes: [
|
|
81
|
+
{
|
|
82
|
+
unique: true,
|
|
83
|
+
fields: ["tag"]
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
fields: ["enabled"]
|
|
87
|
+
}
|
|
88
|
+
]
|
|
89
|
+
});
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
+
var __export = (target, all) => {
|
|
15
|
+
for (var name in all)
|
|
16
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
+
};
|
|
18
|
+
var __copyProps = (to, from, except, desc) => {
|
|
19
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
+
for (let key of __getOwnPropNames(from))
|
|
21
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
+
}
|
|
24
|
+
return to;
|
|
25
|
+
};
|
|
26
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
+
var agent_loop_events_exports = {};
|
|
28
|
+
__export(agent_loop_events_exports, {
|
|
29
|
+
default: () => agent_loop_events_default
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(agent_loop_events_exports);
|
|
32
|
+
var import_database = require("@nocobase/database");
|
|
33
|
+
var agent_loop_events_default = (0, import_database.defineCollection)({
|
|
34
|
+
name: "agentLoopEvents",
|
|
35
|
+
title: "Agent Loop Events",
|
|
36
|
+
fields: [
|
|
37
|
+
{
|
|
38
|
+
name: "id",
|
|
39
|
+
type: "bigInt",
|
|
40
|
+
autoIncrement: true,
|
|
41
|
+
primaryKey: true
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: "run",
|
|
45
|
+
type: "belongsTo",
|
|
46
|
+
target: "agentLoopRuns",
|
|
47
|
+
foreignKey: "runId"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: "step",
|
|
51
|
+
type: "belongsTo",
|
|
52
|
+
target: "agentLoopSteps",
|
|
53
|
+
foreignKey: "stepId"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: "type",
|
|
57
|
+
type: "string",
|
|
58
|
+
length: 80
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: "title",
|
|
62
|
+
type: "string",
|
|
63
|
+
length: 500
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: "content",
|
|
67
|
+
type: "text"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: "status",
|
|
71
|
+
type: "string",
|
|
72
|
+
length: 30
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: "payload",
|
|
76
|
+
type: "json",
|
|
77
|
+
defaultValue: {}
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: "user",
|
|
81
|
+
type: "belongsTo",
|
|
82
|
+
target: "users",
|
|
83
|
+
foreignKey: "userId"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
name: "createdAt",
|
|
87
|
+
type: "date"
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
indexes: [
|
|
91
|
+
{
|
|
92
|
+
fields: ["runId"]
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
fields: ["stepId"]
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
fields: ["type"]
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
});
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
+
var __export = (target, all) => {
|
|
15
|
+
for (var name in all)
|
|
16
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
+
};
|
|
18
|
+
var __copyProps = (to, from, except, desc) => {
|
|
19
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
+
for (let key of __getOwnPropNames(from))
|
|
21
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
+
}
|
|
24
|
+
return to;
|
|
25
|
+
};
|
|
26
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
+
var agent_loop_runs_exports = {};
|
|
28
|
+
__export(agent_loop_runs_exports, {
|
|
29
|
+
default: () => agent_loop_runs_default
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(agent_loop_runs_exports);
|
|
32
|
+
var import_database = require("@nocobase/database");
|
|
33
|
+
var agent_loop_runs_default = (0, import_database.defineCollection)({
|
|
34
|
+
name: "agentLoopRuns",
|
|
35
|
+
title: "Agent Loop Runs",
|
|
36
|
+
fields: [
|
|
37
|
+
{
|
|
38
|
+
name: "id",
|
|
39
|
+
type: "bigInt",
|
|
40
|
+
autoIncrement: true,
|
|
41
|
+
primaryKey: true
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: "rootRunId",
|
|
45
|
+
type: "string",
|
|
46
|
+
length: 100,
|
|
47
|
+
allowNull: false
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: "sessionId",
|
|
51
|
+
type: "string",
|
|
52
|
+
length: 100
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: "messageId",
|
|
56
|
+
type: "string",
|
|
57
|
+
length: 100
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: "leaderUsername",
|
|
61
|
+
type: "string",
|
|
62
|
+
length: 100
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: "goal",
|
|
66
|
+
type: "text"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: "status",
|
|
70
|
+
type: "string",
|
|
71
|
+
length: 30,
|
|
72
|
+
defaultValue: "planning",
|
|
73
|
+
comment: "planning, waiting_plan_approval, approved, running, waiting_user, needs_replan, succeeded, failed, rejected, canceled"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: "currentStepId",
|
|
77
|
+
type: "bigInt"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: "policy",
|
|
81
|
+
type: "json",
|
|
82
|
+
defaultValue: {}
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: "iterationCount",
|
|
86
|
+
type: "integer",
|
|
87
|
+
defaultValue: 0
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: "approvalStatus",
|
|
91
|
+
type: "string",
|
|
92
|
+
length: 30,
|
|
93
|
+
defaultValue: "none",
|
|
94
|
+
comment: "none, pending, approved, rejected, changes_requested"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
name: "approvedBy",
|
|
98
|
+
type: "belongsTo",
|
|
99
|
+
target: "users",
|
|
100
|
+
foreignKey: "approvedById"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
name: "approvedAt",
|
|
104
|
+
type: "date"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
name: "rejectionReason",
|
|
108
|
+
type: "text"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
name: "changeRequest",
|
|
112
|
+
type: "text"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
name: "planVersion",
|
|
116
|
+
type: "integer",
|
|
117
|
+
defaultValue: 1
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
name: "planSource",
|
|
121
|
+
type: "string",
|
|
122
|
+
length: 50
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
name: "plannerModel",
|
|
126
|
+
type: "string",
|
|
127
|
+
length: 100
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
name: "lockedBy",
|
|
131
|
+
type: "string",
|
|
132
|
+
length: 100
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
name: "lockedUntil",
|
|
136
|
+
type: "date"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
name: "finalAnswer",
|
|
140
|
+
type: "text"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
name: "summary",
|
|
144
|
+
type: "text"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
name: "metadata",
|
|
148
|
+
type: "json",
|
|
149
|
+
defaultValue: {}
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
name: "user",
|
|
153
|
+
type: "belongsTo",
|
|
154
|
+
target: "users",
|
|
155
|
+
foreignKey: "userId"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
name: "startedAt",
|
|
159
|
+
type: "date"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
name: "endedAt",
|
|
163
|
+
type: "date"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
name: "createdAt",
|
|
167
|
+
type: "date"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
name: "updatedAt",
|
|
171
|
+
type: "date"
|
|
172
|
+
}
|
|
173
|
+
],
|
|
174
|
+
indexes: [
|
|
175
|
+
{
|
|
176
|
+
fields: ["rootRunId"]
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
fields: ["status"]
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
fields: ["leaderUsername"]
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
fields: ["sessionId"]
|
|
186
|
+
}
|
|
187
|
+
]
|
|
188
|
+
});
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
+
var __export = (target, all) => {
|
|
15
|
+
for (var name in all)
|
|
16
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
+
};
|
|
18
|
+
var __copyProps = (to, from, except, desc) => {
|
|
19
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
+
for (let key of __getOwnPropNames(from))
|
|
21
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
+
}
|
|
24
|
+
return to;
|
|
25
|
+
};
|
|
26
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
+
var agent_loop_steps_exports = {};
|
|
28
|
+
__export(agent_loop_steps_exports, {
|
|
29
|
+
default: () => agent_loop_steps_default
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(agent_loop_steps_exports);
|
|
32
|
+
var import_database = require("@nocobase/database");
|
|
33
|
+
var agent_loop_steps_default = (0, import_database.defineCollection)({
|
|
34
|
+
name: "agentLoopSteps",
|
|
35
|
+
title: "Agent Loop Steps",
|
|
36
|
+
fields: [
|
|
37
|
+
{
|
|
38
|
+
name: "id",
|
|
39
|
+
type: "bigInt",
|
|
40
|
+
autoIncrement: true,
|
|
41
|
+
primaryKey: true
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: "run",
|
|
45
|
+
type: "belongsTo",
|
|
46
|
+
target: "agentLoopRuns",
|
|
47
|
+
foreignKey: "runId"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: "parentStep",
|
|
51
|
+
type: "belongsTo",
|
|
52
|
+
target: "agentLoopSteps",
|
|
53
|
+
foreignKey: "parentStepId"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: "planKey",
|
|
57
|
+
type: "string",
|
|
58
|
+
length: 100
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: "index",
|
|
62
|
+
type: "integer",
|
|
63
|
+
defaultValue: 0
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: "title",
|
|
67
|
+
type: "string",
|
|
68
|
+
length: 500
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: "description",
|
|
72
|
+
type: "text"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: "type",
|
|
76
|
+
type: "string",
|
|
77
|
+
length: 30,
|
|
78
|
+
comment: "reasoning, skill, tool, sub_agent, verification"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: "target",
|
|
82
|
+
type: "string",
|
|
83
|
+
length: 200
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
name: "input",
|
|
87
|
+
type: "json",
|
|
88
|
+
defaultValue: {}
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
name: "output",
|
|
92
|
+
type: "json",
|
|
93
|
+
defaultValue: {}
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: "status",
|
|
97
|
+
type: "string",
|
|
98
|
+
length: 30,
|
|
99
|
+
defaultValue: "pending",
|
|
100
|
+
comment: "pending, running, waiting_user, succeeded, failed, skipped"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
name: "attempt",
|
|
104
|
+
type: "integer",
|
|
105
|
+
defaultValue: 0
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
name: "maxAttempts",
|
|
109
|
+
type: "integer",
|
|
110
|
+
defaultValue: 2
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
name: "dependsOn",
|
|
114
|
+
type: "json",
|
|
115
|
+
defaultValue: []
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
name: "dependencyPolicy",
|
|
119
|
+
type: "string",
|
|
120
|
+
length: 30,
|
|
121
|
+
defaultValue: "require_success",
|
|
122
|
+
comment: "require_success or allow_skipped"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
name: "approval",
|
|
126
|
+
type: "json",
|
|
127
|
+
defaultValue: {}
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
name: "error",
|
|
131
|
+
type: "text"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
name: "agentExecutionSpanId",
|
|
135
|
+
type: "bigInt"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
name: "skillExecutionId",
|
|
139
|
+
type: "bigInt"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
name: "metadata",
|
|
143
|
+
type: "json",
|
|
144
|
+
defaultValue: {}
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
name: "startedAt",
|
|
148
|
+
type: "date"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
name: "endedAt",
|
|
152
|
+
type: "date"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
name: "createdAt",
|
|
156
|
+
type: "date"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
name: "updatedAt",
|
|
160
|
+
type: "date"
|
|
161
|
+
}
|
|
162
|
+
],
|
|
163
|
+
indexes: [
|
|
164
|
+
{
|
|
165
|
+
fields: ["runId"]
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
fields: ["status"]
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
fields: ["planKey"]
|
|
172
|
+
}
|
|
173
|
+
]
|
|
174
|
+
});
|
|
@@ -75,6 +75,13 @@ var orchestrator_config_default = (0, import_database.defineCollection)({
|
|
|
75
75
|
defaultValue: 50,
|
|
76
76
|
comment: "Max LangGraph reasoning steps (tool-call + LLM-step iterations) per delegation. Lower = safer; higher = more complex multi-step tasks. Default 50."
|
|
77
77
|
},
|
|
78
|
+
{
|
|
79
|
+
name: "harnessTag",
|
|
80
|
+
type: "string",
|
|
81
|
+
length: 100,
|
|
82
|
+
defaultValue: "default",
|
|
83
|
+
comment: "Harness profile tag used by the orchestrator controller and approval flow."
|
|
84
|
+
},
|
|
78
85
|
{
|
|
79
86
|
name: "llmService",
|
|
80
87
|
type: "string",
|
|
@@ -109,6 +109,18 @@ var skill_executions_default = {
|
|
|
109
109
|
length: 100,
|
|
110
110
|
allowNull: true
|
|
111
111
|
},
|
|
112
|
+
{
|
|
113
|
+
name: "agentLoopRunId",
|
|
114
|
+
type: "string",
|
|
115
|
+
length: 100,
|
|
116
|
+
allowNull: true
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
name: "agentLoopStepId",
|
|
120
|
+
type: "string",
|
|
121
|
+
length: 100,
|
|
122
|
+
allowNull: true
|
|
123
|
+
},
|
|
112
124
|
{
|
|
113
125
|
name: "triggeredBy",
|
|
114
126
|
type: "belongsTo",
|