plugin-agent-orchestrator 1.0.21 → 1.0.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/dist/server/plugin.js +9 -0
- package/package.json +1 -1
- package/src/server/plugin.ts +15 -0
- package/dist/client/AIEmployeeSelect.d.ts +0 -11
- package/dist/client/AIEmployeesContext.d.ts +0 -30
- package/dist/client/AgentRunsTab.d.ts +0 -2
- package/dist/client/HarnessProfilesTab.d.ts +0 -2
- package/dist/client/OrchestratorSettings.d.ts +0 -3
- package/dist/client/RulesTab.d.ts +0 -2
- package/dist/client/TracingTab.d.ts +0 -2
- package/dist/client/hooks/useRunEventStream.d.ts +0 -22
- package/dist/client/index.d.ts +0 -2
- package/dist/client/plugin.d.ts +0 -6
- package/dist/client/skill-hub/components/ExecutionHistory.d.ts +0 -2
- package/dist/client/skill-hub/components/ExecutionProgress.d.ts +0 -20
- package/dist/client/skill-hub/components/GitSkillImport.d.ts +0 -7
- package/dist/client/skill-hub/components/LoopSettings.d.ts +0 -2
- package/dist/client/skill-hub/components/SkillEditor.d.ts +0 -7
- package/dist/client/skill-hub/components/SkillManager.d.ts +0 -2
- package/dist/client/skill-hub/components/SkillMetrics.d.ts +0 -2
- package/dist/client/skill-hub/components/SkillTestPanel.d.ts +0 -7
- package/dist/client/skill-hub/index.d.ts +0 -11
- package/dist/client/skill-hub/locale.d.ts +0 -3
- package/dist/client/skill-hub/tools/InteractionSchemasProvider.d.ts +0 -6
- package/dist/client/skill-hub/tools/SkillHubCard.d.ts +0 -3
- package/dist/client/skill-hub/tools/loopTemplates.d.ts +0 -22
- package/dist/client/skill-hub/tools/registerSkillLoopCards.d.ts +0 -1
- package/dist/client/skill-hub/utils/jsonFields.d.ts +0 -3
- package/dist/client/tools/PlanApprovalCard.d.ts +0 -3
- package/dist/client/tools/registerOrchestratorCards.d.ts +0 -1
- package/dist/index.d.ts +0 -2
- package/dist/server/collections/agent-execution-spans.d.ts +0 -9
- package/dist/server/collections/agent-harness-profiles.d.ts +0 -2
- package/dist/server/collections/agent-loop-events.d.ts +0 -2
- package/dist/server/collections/agent-loop-runs.d.ts +0 -2
- package/dist/server/collections/agent-loop-steps.d.ts +0 -2
- package/dist/server/collections/orchestrator-config.d.ts +0 -2
- package/dist/server/collections/orchestrator-logs.d.ts +0 -8
- package/dist/server/collections/skill-definitions.d.ts +0 -3
- package/dist/server/collections/skill-executions.d.ts +0 -3
- package/dist/server/collections/skill-loop-configs.d.ts +0 -3
- package/dist/server/collections/skill-worker-configs.d.ts +0 -3
- package/dist/server/index.d.ts +0 -1
- package/dist/server/migrations/20260423000000-add-progress-fields.d.ts +0 -4
- package/dist/server/migrations/20260425000000-add-interaction-schema.d.ts +0 -4
- package/dist/server/migrations/20260427000000-add-tracing-detail-fields.d.ts +0 -7
- package/dist/server/migrations/20260427000000-change-packages-to-text.d.ts +0 -4
- package/dist/server/migrations/20260427000001-change-other-json-to-text.d.ts +0 -4
- package/dist/server/migrations/20260429000000-add-llm-fields.d.ts +0 -7
- package/dist/server/migrations/20260429000000-fix-inputargs-json-to-text.d.ts +0 -16
- package/dist/server/migrations/20260503000000-add-orchestrator-trace-fields.d.ts +0 -7
- package/dist/server/migrations/20260524000000-add-agent-loop-fields-to-skill-executions.d.ts +0 -7
- package/dist/server/migrations/20260524001000-add-plan-approval-and-harness-profiles.d.ts +0 -12
- package/dist/server/migrations/20260601000000-add-token-fields.d.ts +0 -7
- package/dist/server/plugin.d.ts +0 -16
- package/dist/server/resources/agent-loop.d.ts +0 -3
- package/dist/server/resources/tracing.d.ts +0 -7
- package/dist/server/services/AgentHarness.d.ts +0 -44
- package/dist/server/services/AgentLoopController.d.ts +0 -218
- package/dist/server/services/AgentLoopRepository.d.ts +0 -20
- package/dist/server/services/AgentLoopService.d.ts +0 -159
- package/dist/server/services/AgentPlanValidator.d.ts +0 -4
- package/dist/server/services/AgentPlannerService.d.ts +0 -8
- package/dist/server/services/AgentRegistryService.d.ts +0 -21
- package/dist/server/services/CircuitBreaker.d.ts +0 -40
- package/dist/server/services/CodeValidator.d.ts +0 -32
- package/dist/server/services/ContextAggregator.d.ts +0 -45
- package/dist/server/services/ExecutionSpanService.d.ts +0 -46
- package/dist/server/services/FileManager.d.ts +0 -28
- package/dist/server/services/RunEventBus.d.ts +0 -9
- package/dist/server/services/SandboxRunner.d.ts +0 -41
- package/dist/server/services/SkillManager.d.ts +0 -6
- package/dist/server/services/SkillRepositoryService.d.ts +0 -22
- package/dist/server/services/TokenTracker.d.ts +0 -62
- package/dist/server/services/WorkerEnvManager.d.ts +0 -26
- package/dist/server/skill-hub/actions/git-import.d.ts +0 -21
- package/dist/server/skill-hub/mcp/McpController.d.ts +0 -15
- package/dist/server/skill-hub/plugin.d.ts +0 -61
- package/dist/server/skill-hub/tasks/SkillExecutionTask.d.ts +0 -16
- package/dist/server/skill-hub/utils/json-fields.d.ts +0 -7
- package/dist/server/tools/agent-loop.d.ts +0 -235
- package/dist/server/tools/delegate-task.d.ts +0 -19
- package/dist/server/tools/external-rag-search.d.ts +0 -42
- package/dist/server/tools/orchestrator-plan.d.ts +0 -205
- package/dist/server/tools/skill-execute.d.ts +0 -36
- package/dist/server/types.d.ts +0 -47
- package/dist/server/utils/ctx-utils.d.ts +0 -30
- package/dist/server/utils/logging.d.ts +0 -6
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { AgentLoopService } from '../services/AgentLoopService';
|
|
3
|
-
export declare function createOrchestratorPlanTools(plugin: any, service: AgentLoopService): ({
|
|
4
|
-
scope: "CUSTOM";
|
|
5
|
-
execution: "backend";
|
|
6
|
-
defaultPermission: "ALLOW";
|
|
7
|
-
introduction: {
|
|
8
|
-
title: string;
|
|
9
|
-
about: string;
|
|
10
|
-
};
|
|
11
|
-
definition: {
|
|
12
|
-
name: string;
|
|
13
|
-
description: string;
|
|
14
|
-
schema: z.ZodObject<{
|
|
15
|
-
goal: z.ZodString;
|
|
16
|
-
runId: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
17
|
-
leaderUsername: z.ZodOptional<z.ZodString>;
|
|
18
|
-
sessionId: z.ZodOptional<z.ZodString>;
|
|
19
|
-
messageId: z.ZodOptional<z.ZodString>;
|
|
20
|
-
harnessTag: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
21
|
-
targetAgent: z.ZodOptional<z.ZodString>;
|
|
22
|
-
plannerModel: z.ZodOptional<z.ZodString>;
|
|
23
|
-
policy: z.ZodOptional<z.ZodObject<{
|
|
24
|
-
maxIterations: z.ZodOptional<z.ZodNumber>;
|
|
25
|
-
maxStepAttempts: z.ZodOptional<z.ZodNumber>;
|
|
26
|
-
allowReplan: z.ZodOptional<z.ZodBoolean>;
|
|
27
|
-
requireVerification: z.ZodOptional<z.ZodBoolean>;
|
|
28
|
-
stopOnApprovalRequired: z.ZodOptional<z.ZodBoolean>;
|
|
29
|
-
}, "strip", z.ZodTypeAny, {
|
|
30
|
-
maxIterations?: number;
|
|
31
|
-
maxStepAttempts?: number;
|
|
32
|
-
allowReplan?: boolean;
|
|
33
|
-
requireVerification?: boolean;
|
|
34
|
-
stopOnApprovalRequired?: boolean;
|
|
35
|
-
}, {
|
|
36
|
-
maxIterations?: number;
|
|
37
|
-
maxStepAttempts?: number;
|
|
38
|
-
allowReplan?: boolean;
|
|
39
|
-
requireVerification?: boolean;
|
|
40
|
-
stopOnApprovalRequired?: boolean;
|
|
41
|
-
}>>;
|
|
42
|
-
metadata: z.ZodOptional<z.ZodAny>;
|
|
43
|
-
plan: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
44
|
-
id: z.ZodOptional<z.ZodString>;
|
|
45
|
-
key: z.ZodOptional<z.ZodString>;
|
|
46
|
-
planKey: z.ZodOptional<z.ZodString>;
|
|
47
|
-
parentStepId: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
48
|
-
title: z.ZodOptional<z.ZodString>;
|
|
49
|
-
description: z.ZodOptional<z.ZodString>;
|
|
50
|
-
type: z.ZodOptional<z.ZodEnum<["reasoning", "skill", "tool", "sub_agent", "verification"]>>;
|
|
51
|
-
target: z.ZodOptional<z.ZodString>;
|
|
52
|
-
input: z.ZodOptional<z.ZodAny>;
|
|
53
|
-
dependsOn: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
54
|
-
dependencyPolicy: z.ZodOptional<z.ZodEnum<["require_success", "allow_skipped"]>>;
|
|
55
|
-
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
56
|
-
metadata: z.ZodOptional<z.ZodAny>;
|
|
57
|
-
}, "strip", z.ZodTypeAny, {
|
|
58
|
-
type?: "reasoning" | "skill" | "tool" | "sub_agent" | "verification";
|
|
59
|
-
key?: string;
|
|
60
|
-
title?: string;
|
|
61
|
-
description?: string;
|
|
62
|
-
metadata?: any;
|
|
63
|
-
input?: any;
|
|
64
|
-
id?: string;
|
|
65
|
-
planKey?: string;
|
|
66
|
-
target?: string;
|
|
67
|
-
dependsOn?: string[];
|
|
68
|
-
parentStepId?: string | number;
|
|
69
|
-
dependencyPolicy?: "require_success" | "allow_skipped";
|
|
70
|
-
maxAttempts?: number;
|
|
71
|
-
}, {
|
|
72
|
-
type?: "reasoning" | "skill" | "tool" | "sub_agent" | "verification";
|
|
73
|
-
key?: string;
|
|
74
|
-
title?: string;
|
|
75
|
-
description?: string;
|
|
76
|
-
metadata?: any;
|
|
77
|
-
input?: any;
|
|
78
|
-
id?: string;
|
|
79
|
-
planKey?: string;
|
|
80
|
-
target?: string;
|
|
81
|
-
dependsOn?: string[];
|
|
82
|
-
parentStepId?: string | number;
|
|
83
|
-
dependencyPolicy?: "require_success" | "allow_skipped";
|
|
84
|
-
maxAttempts?: number;
|
|
85
|
-
}>, "many">>;
|
|
86
|
-
}, "strip", z.ZodTypeAny, {
|
|
87
|
-
leaderUsername?: string;
|
|
88
|
-
metadata?: any;
|
|
89
|
-
runId?: string | number;
|
|
90
|
-
sessionId?: string;
|
|
91
|
-
goal?: string;
|
|
92
|
-
messageId?: string;
|
|
93
|
-
policy?: {
|
|
94
|
-
maxIterations?: number;
|
|
95
|
-
maxStepAttempts?: number;
|
|
96
|
-
allowReplan?: boolean;
|
|
97
|
-
requireVerification?: boolean;
|
|
98
|
-
stopOnApprovalRequired?: boolean;
|
|
99
|
-
};
|
|
100
|
-
harnessTag?: string;
|
|
101
|
-
targetAgent?: string;
|
|
102
|
-
plannerModel?: string;
|
|
103
|
-
plan?: {
|
|
104
|
-
type?: "reasoning" | "skill" | "tool" | "sub_agent" | "verification";
|
|
105
|
-
key?: string;
|
|
106
|
-
title?: string;
|
|
107
|
-
description?: string;
|
|
108
|
-
metadata?: any;
|
|
109
|
-
input?: any;
|
|
110
|
-
id?: string;
|
|
111
|
-
planKey?: string;
|
|
112
|
-
target?: string;
|
|
113
|
-
dependsOn?: string[];
|
|
114
|
-
parentStepId?: string | number;
|
|
115
|
-
dependencyPolicy?: "require_success" | "allow_skipped";
|
|
116
|
-
maxAttempts?: number;
|
|
117
|
-
}[];
|
|
118
|
-
}, {
|
|
119
|
-
leaderUsername?: string;
|
|
120
|
-
metadata?: any;
|
|
121
|
-
runId?: string | number;
|
|
122
|
-
sessionId?: string;
|
|
123
|
-
goal?: string;
|
|
124
|
-
messageId?: string;
|
|
125
|
-
policy?: {
|
|
126
|
-
maxIterations?: number;
|
|
127
|
-
maxStepAttempts?: number;
|
|
128
|
-
allowReplan?: boolean;
|
|
129
|
-
requireVerification?: boolean;
|
|
130
|
-
stopOnApprovalRequired?: boolean;
|
|
131
|
-
};
|
|
132
|
-
harnessTag?: string;
|
|
133
|
-
targetAgent?: string;
|
|
134
|
-
plannerModel?: string;
|
|
135
|
-
plan?: {
|
|
136
|
-
type?: "reasoning" | "skill" | "tool" | "sub_agent" | "verification";
|
|
137
|
-
key?: string;
|
|
138
|
-
title?: string;
|
|
139
|
-
description?: string;
|
|
140
|
-
metadata?: any;
|
|
141
|
-
input?: any;
|
|
142
|
-
id?: string;
|
|
143
|
-
planKey?: string;
|
|
144
|
-
target?: string;
|
|
145
|
-
dependsOn?: string[];
|
|
146
|
-
parentStepId?: string | number;
|
|
147
|
-
dependencyPolicy?: "require_success" | "allow_skipped";
|
|
148
|
-
maxAttempts?: number;
|
|
149
|
-
}[];
|
|
150
|
-
}>;
|
|
151
|
-
};
|
|
152
|
-
invoke: (ctx: any, args: any) => Promise<{
|
|
153
|
-
status: "success" | "error";
|
|
154
|
-
content: string;
|
|
155
|
-
}>;
|
|
156
|
-
} | {
|
|
157
|
-
scope: "CUSTOM";
|
|
158
|
-
execution: "backend";
|
|
159
|
-
defaultPermission: "ALLOW";
|
|
160
|
-
introduction: {
|
|
161
|
-
title: string;
|
|
162
|
-
about: string;
|
|
163
|
-
};
|
|
164
|
-
definition: {
|
|
165
|
-
name: string;
|
|
166
|
-
description: string;
|
|
167
|
-
schema: z.ZodObject<{
|
|
168
|
-
runId: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
|
|
169
|
-
}, "strip", z.ZodTypeAny, {
|
|
170
|
-
runId?: string | number;
|
|
171
|
-
}, {
|
|
172
|
-
runId?: string | number;
|
|
173
|
-
}>;
|
|
174
|
-
};
|
|
175
|
-
invoke: (_ctx: any, args: any) => Promise<{
|
|
176
|
-
status: "success" | "error";
|
|
177
|
-
content: string;
|
|
178
|
-
}>;
|
|
179
|
-
} | {
|
|
180
|
-
scope: "CUSTOM";
|
|
181
|
-
execution: "backend";
|
|
182
|
-
defaultPermission: "ASK";
|
|
183
|
-
introduction: {
|
|
184
|
-
title: string;
|
|
185
|
-
about: string;
|
|
186
|
-
};
|
|
187
|
-
definition: {
|
|
188
|
-
name: string;
|
|
189
|
-
description: string;
|
|
190
|
-
schema: z.ZodObject<{
|
|
191
|
-
runId: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
|
|
192
|
-
reason: z.ZodOptional<z.ZodString>;
|
|
193
|
-
}, "strip", z.ZodTypeAny, {
|
|
194
|
-
reason?: string;
|
|
195
|
-
runId?: string | number;
|
|
196
|
-
}, {
|
|
197
|
-
reason?: string;
|
|
198
|
-
runId?: string | number;
|
|
199
|
-
}>;
|
|
200
|
-
};
|
|
201
|
-
invoke: (ctx: any, args: any) => Promise<{
|
|
202
|
-
status: "success" | "error";
|
|
203
|
-
content: string;
|
|
204
|
-
}>;
|
|
205
|
-
})[];
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
export declare function createSkillExecuteTool(plugin: any): {
|
|
2
|
-
scope: string;
|
|
3
|
-
execution: string;
|
|
4
|
-
defaultPermission: string;
|
|
5
|
-
introduction: {
|
|
6
|
-
title: string;
|
|
7
|
-
about: string;
|
|
8
|
-
};
|
|
9
|
-
definition: {
|
|
10
|
-
name: string;
|
|
11
|
-
description: string;
|
|
12
|
-
schema: {
|
|
13
|
-
type: string;
|
|
14
|
-
properties: {
|
|
15
|
-
action: {
|
|
16
|
-
type: string;
|
|
17
|
-
enum: string[];
|
|
18
|
-
description: string;
|
|
19
|
-
};
|
|
20
|
-
skillName: {
|
|
21
|
-
type: string;
|
|
22
|
-
description: string;
|
|
23
|
-
};
|
|
24
|
-
input: {
|
|
25
|
-
type: string;
|
|
26
|
-
description: string;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
required: string[];
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
invoke(ctx: any, args: Record<string, any>, _id?: string): Promise<{
|
|
33
|
-
status: string;
|
|
34
|
-
content: string;
|
|
35
|
-
}>;
|
|
36
|
-
};
|
package/dist/server/types.d.ts
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
export interface TokenUsage {
|
|
2
|
-
inputTokens: number;
|
|
3
|
-
outputTokens: number;
|
|
4
|
-
totalTokens: number;
|
|
5
|
-
cost: number;
|
|
6
|
-
}
|
|
7
|
-
export interface BudgetConfig {
|
|
8
|
-
budgetMaxTokens?: number;
|
|
9
|
-
budgetMaxCost?: number;
|
|
10
|
-
}
|
|
11
|
-
export interface BudgetCheckResult {
|
|
12
|
-
allowed: boolean;
|
|
13
|
-
reason?: string;
|
|
14
|
-
}
|
|
15
|
-
export interface CircuitState {
|
|
16
|
-
failures: number;
|
|
17
|
-
lastFailureTime: number;
|
|
18
|
-
state: 'closed' | 'open' | 'half-open';
|
|
19
|
-
}
|
|
20
|
-
export interface TraceEvent {
|
|
21
|
-
type: string;
|
|
22
|
-
at: string;
|
|
23
|
-
title: string;
|
|
24
|
-
content?: string;
|
|
25
|
-
toolName?: string;
|
|
26
|
-
args?: any;
|
|
27
|
-
status?: string;
|
|
28
|
-
}
|
|
29
|
-
export interface DelegationLogData {
|
|
30
|
-
id?: number | string;
|
|
31
|
-
leaderUsername: string;
|
|
32
|
-
subAgentUsername: string;
|
|
33
|
-
toolName: string;
|
|
34
|
-
task: string;
|
|
35
|
-
context?: string;
|
|
36
|
-
result: string;
|
|
37
|
-
status: string;
|
|
38
|
-
depth: number;
|
|
39
|
-
durationMs: number;
|
|
40
|
-
error?: string;
|
|
41
|
-
trace?: TraceEvent[];
|
|
42
|
-
messages?: any[];
|
|
43
|
-
userId?: number | string;
|
|
44
|
-
}
|
|
45
|
-
export type CtxSnapshot = {
|
|
46
|
-
userId?: number;
|
|
47
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/** Normalize a record to a plain JS object. */
|
|
2
|
-
export declare function toPlain(record: any): any;
|
|
3
|
-
/** Coerce a value to a plain object (JSON parse if needed). */
|
|
4
|
-
export declare function asObject(value: any): any;
|
|
5
|
-
/** Coerce value to array. */
|
|
6
|
-
export declare function asArray(value: any): any[];
|
|
7
|
-
/** Trim text to max length with ellipsis suffix. */
|
|
8
|
-
export declare function trimText(value: any, max?: number): string;
|
|
9
|
-
/** Get the current user id from ctx. */
|
|
10
|
-
export declare function currentUserId(ctx: any): any;
|
|
11
|
-
/** Get action params values from ctx. */
|
|
12
|
-
export declare function valuesFromCtx(ctx: any): any;
|
|
13
|
-
/** Normalize raw employee username input (string | object → string | null). */
|
|
14
|
-
export declare function normalizeEmployeeUsername(raw: any): any;
|
|
15
|
-
/** Resolve session id from args or ctx. */
|
|
16
|
-
export declare function resolveSessionId(ctx: any, args: any): any;
|
|
17
|
-
/** Resolve message id from args or ctx. */
|
|
18
|
-
export declare function resolveMessageId(ctx: any, args: any): any;
|
|
19
|
-
/** Resolve leader employee username from args, ctx state, or conversation record. */
|
|
20
|
-
export declare function resolveLeaderUsername(ctx: any, plugin: any, args: any): Promise<any>;
|
|
21
|
-
/** Snapshot ctx user id for later use (avoids stale ctx). */
|
|
22
|
-
export declare function captureCtxSnapshot(ctx: any): {
|
|
23
|
-
userId?: number;
|
|
24
|
-
};
|
|
25
|
-
/** Normalize step type to a known value. */
|
|
26
|
-
export declare function normalizeStepType(value: any): any;
|
|
27
|
-
/** Normalize plan key from step input. */
|
|
28
|
-
export declare function normalizePlanKey(step: any, index: number): string;
|
|
29
|
-
/** Now ISO string. */
|
|
30
|
-
export declare function nowIso(): string;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { DelegationLogData } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* Log (or update) a delegation event in the orchestratorLogs collection.
|
|
4
|
-
* Used by both delegate-task.ts and AgentHarness.ts.
|
|
5
|
-
*/
|
|
6
|
-
export declare function logDelegation(ctx: any, plugin: any, data: DelegationLogData): Promise<any>;
|