@elizaos/plugin-agent-orchestrator 2.0.0-alpha.4 → 2.0.0-alpha.537
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/README.md +233 -0
- package/assets/claude-code-skills/eliza-runtime/SKILL.md +123 -0
- package/assets/claude-code-skills/eliza-runtime/references/hooks.md +82 -0
- package/assets/claude-code-skills/eliza-runtime/references/orchestration.md +68 -0
- package/assets/claude-code-skills/eliza-runtime/references/synthesis.md +84 -0
- package/assets/claude-code-skills/eliza-runtime/scripts/eliza-context.sh +103 -0
- package/assets/claude-code-skills/eliza-runtime/scripts/eliza-decision.sh +48 -0
- package/assets/claude-code-skills/eliza-runtime/scripts/eliza-parent.sh +143 -0
- package/dist/actions/coding-task-handlers.d.ts +64 -0
- package/dist/actions/coding-task-handlers.d.ts.map +1 -0
- package/dist/actions/coding-task-helpers.d.ts +35 -0
- package/dist/actions/coding-task-helpers.d.ts.map +1 -0
- package/dist/actions/eval-metadata.d.ts +11 -0
- package/dist/actions/eval-metadata.d.ts.map +1 -0
- package/dist/actions/finalize-workspace.d.ts +11 -0
- package/dist/actions/finalize-workspace.d.ts.map +1 -0
- package/dist/actions/list-agents.d.ts +13 -0
- package/dist/actions/list-agents.d.ts.map +1 -0
- package/dist/actions/manage-issues.d.ts +11 -0
- package/dist/actions/manage-issues.d.ts.map +1 -0
- package/dist/actions/provision-workspace.d.ts +11 -0
- package/dist/actions/provision-workspace.d.ts.map +1 -0
- package/dist/actions/send-to-agent.d.ts +12 -0
- package/dist/actions/send-to-agent.d.ts.map +1 -0
- package/dist/actions/spawn-agent.d.ts +12 -0
- package/dist/actions/spawn-agent.d.ts.map +1 -0
- package/dist/actions/start-coding-task.d.ts +69 -0
- package/dist/actions/start-coding-task.d.ts.map +1 -0
- package/dist/actions/stop-agent.d.ts +12 -0
- package/dist/actions/stop-agent.d.ts.map +1 -0
- package/dist/actions/task-control.d.ts +3 -0
- package/dist/actions/task-control.d.ts.map +1 -0
- package/dist/actions/task-history.d.ts +3 -0
- package/dist/actions/task-history.d.ts.map +1 -0
- package/dist/actions/task-share.d.ts +3 -0
- package/dist/actions/task-share.d.ts.map +1 -0
- package/dist/actions/task-thread-target.d.ts +11 -0
- package/dist/actions/task-thread-target.d.ts.map +1 -0
- package/dist/api/agent-routes.d.ts +18 -0
- package/dist/api/agent-routes.d.ts.map +1 -0
- package/dist/api/bridge-routes.d.ts +32 -0
- package/dist/api/bridge-routes.d.ts.map +1 -0
- package/dist/api/coordinator-routes.d.ts +22 -0
- package/dist/api/coordinator-routes.d.ts.map +1 -0
- package/dist/api/hook-routes.d.ts +18 -0
- package/dist/api/hook-routes.d.ts.map +1 -0
- package/dist/api/issue-routes.d.ts +17 -0
- package/dist/api/issue-routes.d.ts.map +1 -0
- package/dist/api/parent-context-routes.d.ts +17 -0
- package/dist/api/parent-context-routes.d.ts.map +1 -0
- package/dist/api/routes.d.ts +37 -0
- package/dist/api/routes.d.ts.map +1 -0
- package/dist/api/workspace-routes.d.ts +17 -0
- package/dist/api/workspace-routes.d.ts.map +1 -0
- package/dist/index.d.ts +36 -15
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19824 -3408
- package/dist/index.js.map +72 -22
- package/dist/providers/action-examples.d.ts +14 -0
- package/dist/providers/action-examples.d.ts.map +1 -0
- package/dist/providers/active-workspace-context.d.ts +13 -0
- package/dist/providers/active-workspace-context.d.ts.map +1 -0
- package/dist/services/agent-credentials.d.ts +23 -0
- package/dist/services/agent-credentials.d.ts.map +1 -0
- package/dist/services/agent-metrics.d.ts +30 -0
- package/dist/services/agent-metrics.d.ts.map +1 -0
- package/dist/services/agent-selection.d.ts +53 -0
- package/dist/services/agent-selection.d.ts.map +1 -0
- package/dist/services/ansi-utils.d.ts +61 -0
- package/dist/services/ansi-utils.d.ts.map +1 -0
- package/dist/services/claude-code-skill-installer.d.ts +33 -0
- package/dist/services/claude-code-skill-installer.d.ts.map +1 -0
- package/dist/services/config-env.d.ts +23 -0
- package/dist/services/config-env.d.ts.map +1 -0
- package/dist/services/coordinator-event-normalizer.d.ts +50 -0
- package/dist/services/coordinator-event-normalizer.d.ts.map +1 -0
- package/dist/services/custom-validator-runner.d.ts +66 -0
- package/dist/services/custom-validator-runner.d.ts.map +1 -0
- package/dist/services/debug-capture.d.ts +38 -0
- package/dist/services/debug-capture.d.ts.map +1 -0
- package/dist/services/pty-auto-response.d.ts +30 -0
- package/dist/services/pty-auto-response.d.ts.map +1 -0
- package/dist/services/pty-init.d.ts +54 -0
- package/dist/services/pty-init.d.ts.map +1 -0
- package/dist/services/pty-service.d.ts +206 -0
- package/dist/services/pty-service.d.ts.map +1 -0
- package/dist/services/pty-session-io.d.ts +49 -0
- package/dist/services/pty-session-io.d.ts.map +1 -0
- package/dist/services/pty-spawn.d.ts +113 -0
- package/dist/services/pty-spawn.d.ts.map +1 -0
- package/dist/services/pty-types.d.ts +94 -0
- package/dist/services/pty-types.d.ts.map +1 -0
- package/dist/services/repo-input.d.ts +16 -0
- package/dist/services/repo-input.d.ts.map +1 -0
- package/dist/services/session-event-queue.d.ts +25 -0
- package/dist/services/session-event-queue.d.ts.map +1 -0
- package/dist/services/skill-callback-bridge.d.ts +78 -0
- package/dist/services/skill-callback-bridge.d.ts.map +1 -0
- package/dist/services/skill-essentials.d.ts +16 -0
- package/dist/services/skill-essentials.d.ts.map +1 -0
- package/dist/services/skill-lifeops-context-broker.d.ts +20 -0
- package/dist/services/skill-lifeops-context-broker.d.ts.map +1 -0
- package/dist/services/skill-manifest.d.ts +48 -0
- package/dist/services/skill-manifest.d.ts.map +1 -0
- package/dist/services/skill-recommender.d.ts +51 -0
- package/dist/services/skill-recommender.d.ts.map +1 -0
- package/dist/services/stall-classifier.d.ts +69 -0
- package/dist/services/stall-classifier.d.ts.map +1 -0
- package/dist/services/structured-proof-bridge.d.ts +99 -0
- package/dist/services/structured-proof-bridge.d.ts.map +1 -0
- package/dist/services/swarm-coordinator-prompts.d.ts +97 -0
- package/dist/services/swarm-coordinator-prompts.d.ts.map +1 -0
- package/dist/services/swarm-coordinator.d.ts +471 -0
- package/dist/services/swarm-coordinator.d.ts.map +1 -0
- package/dist/services/swarm-decision-loop.d.ts +52 -0
- package/dist/services/swarm-decision-loop.d.ts.map +1 -0
- package/dist/services/swarm-event-triage.d.ts +49 -0
- package/dist/services/swarm-event-triage.d.ts.map +1 -0
- package/dist/services/swarm-history.d.ts +27 -0
- package/dist/services/swarm-history.d.ts.map +1 -0
- package/dist/services/swarm-idle-watchdog.d.ts +22 -0
- package/dist/services/swarm-idle-watchdog.d.ts.map +1 -0
- package/dist/services/task-acceptance.d.ts +8 -0
- package/dist/services/task-acceptance.d.ts.map +1 -0
- package/dist/services/task-agent-auth.d.ts +69 -0
- package/dist/services/task-agent-auth.d.ts.map +1 -0
- package/dist/services/task-agent-frameworks.d.ts +90 -0
- package/dist/services/task-agent-frameworks.d.ts.map +1 -0
- package/dist/services/task-kind.d.ts +3 -0
- package/dist/services/task-kind.d.ts.map +1 -0
- package/dist/services/task-policy.d.ts +17 -0
- package/dist/services/task-policy.d.ts.map +1 -0
- package/dist/services/task-registry.d.ts +550 -0
- package/dist/services/task-registry.d.ts.map +1 -0
- package/dist/services/task-share.d.ts +18 -0
- package/dist/services/task-share.d.ts.map +1 -0
- package/dist/services/task-validation.d.ts +69 -0
- package/dist/services/task-validation.d.ts.map +1 -0
- package/dist/services/task-verifier-runner.d.ts +5 -0
- package/dist/services/task-verifier-runner.d.ts.map +1 -0
- package/dist/services/trajectory-context.d.ts +73 -0
- package/dist/services/trajectory-context.d.ts.map +1 -0
- package/dist/services/trajectory-feedback.d.ts +53 -0
- package/dist/services/trajectory-feedback.d.ts.map +1 -0
- package/dist/services/workspace-git-ops.d.ts +28 -0
- package/dist/services/workspace-git-ops.d.ts.map +1 -0
- package/dist/services/workspace-github.d.ts +60 -0
- package/dist/services/workspace-github.d.ts.map +1 -0
- package/dist/services/workspace-lifecycle.d.ts +18 -0
- package/dist/services/workspace-lifecycle.d.ts.map +1 -0
- package/dist/services/workspace-service.d.ts +121 -0
- package/dist/services/workspace-service.d.ts.map +1 -0
- package/dist/services/workspace-types.d.ts +81 -0
- package/dist/services/workspace-types.d.ts.map +1 -0
- package/package.json +28 -33
- package/scripts/ensure-node-pty.mjs +100 -0
- package/dist/src/actions/messaging.d.ts +0 -24
- package/dist/src/actions/messaging.d.ts.map +0 -1
- package/dist/src/actions/subagent-management.d.ts +0 -7
- package/dist/src/actions/subagent-management.d.ts.map +0 -1
- package/dist/src/actions/task-management.d.ts +0 -9
- package/dist/src/actions/task-management.d.ts.map +0 -1
- package/dist/src/config.d.ts +0 -4
- package/dist/src/config.d.ts.map +0 -1
- package/dist/src/providers/orchestrator-config.d.ts +0 -80
- package/dist/src/providers/orchestrator-config.d.ts.map +0 -1
- package/dist/src/providers/task-context.d.ts +0 -3
- package/dist/src/providers/task-context.d.ts.map +0 -1
- package/dist/src/services/agent-orchestrator-service.d.ts +0 -59
- package/dist/src/services/agent-orchestrator-service.d.ts.map +0 -1
- package/dist/src/services/messaging-service.d.ts +0 -111
- package/dist/src/services/messaging-service.d.ts.map +0 -1
- package/dist/src/services/sandbox-service.d.ts +0 -103
- package/dist/src/services/sandbox-service.d.ts.map +0 -1
- package/dist/src/services/subagent-service.d.ts +0 -110
- package/dist/src/services/subagent-service.d.ts.map +0 -1
- package/dist/src/types/index.d.ts +0 -12
- package/dist/src/types/index.d.ts.map +0 -1
- package/dist/src/types/messaging.d.ts +0 -202
- package/dist/src/types/messaging.d.ts.map +0 -1
- package/dist/src/types/sandbox.d.ts +0 -228
- package/dist/src/types/sandbox.d.ts.map +0 -1
- package/dist/src/types/subagent.d.ts +0 -224
- package/dist/src/types/subagent.d.ts.map +0 -1
- package/dist/src/types.d.ts +0 -113
- package/dist/src/types.d.ts.map +0 -1
- package/dist/src/utils/index.d.ts +0 -7
- package/dist/src/utils/index.d.ts.map +0 -1
- package/dist/src/utils/session.d.ts +0 -106
- package/dist/src/utils/session.d.ts.map +0 -1
|
@@ -1,224 +0,0 @@
|
|
|
1
|
-
import type { UUID } from "@elizaos/core";
|
|
2
|
-
/**
|
|
3
|
-
* Parsed components of a session key.
|
|
4
|
-
* Otto session keys follow patterns like:
|
|
5
|
-
* - "agent:mybot:dm:user123"
|
|
6
|
-
* - "agent:mybot:subagent:uuid"
|
|
7
|
-
* - "agent:mybot:group:channelId"
|
|
8
|
-
*/
|
|
9
|
-
export interface ParsedSessionKey {
|
|
10
|
-
agentId: string;
|
|
11
|
-
keyType: "dm" | "subagent" | "group" | "channel" | "unknown";
|
|
12
|
-
identifier: string;
|
|
13
|
-
parentKey?: string;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Delivery context for message routing.
|
|
17
|
-
* Captures the channel and target information for message delivery.
|
|
18
|
-
*/
|
|
19
|
-
export interface DeliveryContext {
|
|
20
|
-
channel?: string;
|
|
21
|
-
accountId?: string;
|
|
22
|
-
to?: string;
|
|
23
|
-
threadId?: string | number;
|
|
24
|
-
groupId?: string;
|
|
25
|
-
groupChannel?: string;
|
|
26
|
-
groupSpace?: string;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Outcome of a subagent run.
|
|
30
|
-
*/
|
|
31
|
-
export interface SubagentRunOutcome {
|
|
32
|
-
status: "ok" | "error" | "timeout" | "unknown";
|
|
33
|
-
error?: string;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Record tracking a subagent run's lifecycle.
|
|
37
|
-
*/
|
|
38
|
-
export interface SubagentRunRecord {
|
|
39
|
-
/** Unique run identifier */
|
|
40
|
-
runId: string;
|
|
41
|
-
/** The subagent's session key / room identifier */
|
|
42
|
-
childSessionKey: string;
|
|
43
|
-
/** The parent session that spawned this subagent */
|
|
44
|
-
requesterSessionKey: string;
|
|
45
|
-
/** Delivery context for announcing results */
|
|
46
|
-
requesterOrigin?: DeliveryContext;
|
|
47
|
-
/** Human-readable display key for the requester */
|
|
48
|
-
requesterDisplayKey: string;
|
|
49
|
-
/** The task description given to the subagent */
|
|
50
|
-
task: string;
|
|
51
|
-
/** Cleanup behavior after completion */
|
|
52
|
-
cleanup: "delete" | "keep";
|
|
53
|
-
/** Optional label for identification */
|
|
54
|
-
label?: string;
|
|
55
|
-
/** When the run was registered */
|
|
56
|
-
createdAt: number;
|
|
57
|
-
/** When execution actually started */
|
|
58
|
-
startedAt?: number;
|
|
59
|
-
/** When execution ended */
|
|
60
|
-
endedAt?: number;
|
|
61
|
-
/** Final outcome */
|
|
62
|
-
outcome?: SubagentRunOutcome;
|
|
63
|
-
/** When to archive/delete this record */
|
|
64
|
-
archiveAtMs?: number;
|
|
65
|
-
/** Whether cleanup has completed */
|
|
66
|
-
cleanupCompletedAt?: number;
|
|
67
|
-
/** Whether cleanup is in progress */
|
|
68
|
-
cleanupHandled?: boolean;
|
|
69
|
-
/** Eliza room ID associated with this subagent */
|
|
70
|
-
roomId?: UUID;
|
|
71
|
-
/** Eliza world ID for context */
|
|
72
|
-
worldId?: UUID;
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Parameters for spawning a subagent.
|
|
76
|
-
*/
|
|
77
|
-
export interface SpawnSubagentParams {
|
|
78
|
-
/** The task to execute */
|
|
79
|
-
task: string;
|
|
80
|
-
/** Optional label for identification */
|
|
81
|
-
label?: string;
|
|
82
|
-
/** Target agent ID (defaults to current agent) */
|
|
83
|
-
agentId?: string;
|
|
84
|
-
/** Model override (e.g., "anthropic/claude-3-sonnet") */
|
|
85
|
-
model?: string;
|
|
86
|
-
/** Thinking level override */
|
|
87
|
-
thinking?: string;
|
|
88
|
-
/** Timeout in seconds (0 = no timeout) */
|
|
89
|
-
runTimeoutSeconds?: number;
|
|
90
|
-
/** Cleanup behavior after completion */
|
|
91
|
-
cleanup?: "delete" | "keep";
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Result of spawning a subagent.
|
|
95
|
-
*/
|
|
96
|
-
export interface SpawnSubagentResult {
|
|
97
|
-
status: "accepted" | "forbidden" | "error";
|
|
98
|
-
childSessionKey?: string;
|
|
99
|
-
childRoomId?: UUID;
|
|
100
|
-
runId?: string;
|
|
101
|
-
modelApplied?: boolean;
|
|
102
|
-
warning?: string;
|
|
103
|
-
error?: string;
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Parameters for sending a message to another agent/session.
|
|
107
|
-
*/
|
|
108
|
-
export interface SendToAgentParams {
|
|
109
|
-
/** Target session key or room ID */
|
|
110
|
-
sessionKey?: string;
|
|
111
|
-
/** Target by label (alternative to sessionKey) */
|
|
112
|
-
label?: string;
|
|
113
|
-
/** Target agent ID (when using label) */
|
|
114
|
-
agentId?: string;
|
|
115
|
-
/** The message to send */
|
|
116
|
-
message: string;
|
|
117
|
-
/** Timeout in seconds */
|
|
118
|
-
timeoutSeconds?: number;
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* Result of sending a message to another agent.
|
|
122
|
-
*/
|
|
123
|
-
export interface SendToAgentResult {
|
|
124
|
-
status: "ok" | "accepted" | "timeout" | "forbidden" | "error";
|
|
125
|
-
runId: string;
|
|
126
|
-
sessionKey?: string;
|
|
127
|
-
reply?: string;
|
|
128
|
-
delivery?: {
|
|
129
|
-
status: string;
|
|
130
|
-
mode: string;
|
|
131
|
-
};
|
|
132
|
-
error?: string;
|
|
133
|
-
}
|
|
134
|
-
/**
|
|
135
|
-
* Agent-to-agent communication policy.
|
|
136
|
-
*/
|
|
137
|
-
export interface AgentToAgentPolicy {
|
|
138
|
-
enabled: boolean;
|
|
139
|
-
allowRules: Array<{
|
|
140
|
-
source: string | "*";
|
|
141
|
-
target: string | "*";
|
|
142
|
-
}>;
|
|
143
|
-
isAllowed(sourceAgentId: string, targetAgentId: string): boolean;
|
|
144
|
-
}
|
|
145
|
-
/**
|
|
146
|
-
* Configuration for subagent behavior.
|
|
147
|
-
* Stored in Character.settings.subagents or world metadata.
|
|
148
|
-
*/
|
|
149
|
-
export interface SubagentConfig {
|
|
150
|
-
/** Allow subagent spawning */
|
|
151
|
-
enabled?: boolean;
|
|
152
|
-
/** Default model for subagents */
|
|
153
|
-
model?: string;
|
|
154
|
-
/** Default thinking level */
|
|
155
|
-
thinking?: string;
|
|
156
|
-
/** Timeout in seconds */
|
|
157
|
-
timeoutSeconds?: number;
|
|
158
|
-
/** Allowed agent IDs for cross-agent spawning (* = all) */
|
|
159
|
-
allowAgents?: string[];
|
|
160
|
-
/** Minutes before archiving completed subagent records */
|
|
161
|
-
archiveAfterMinutes?: number;
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
* Event types emitted by the subagent system.
|
|
165
|
-
*/
|
|
166
|
-
export declare const SubagentEventType: {
|
|
167
|
-
/** Subagent spawn requested */
|
|
168
|
-
readonly SPAWN_REQUESTED: "SUBAGENT_SPAWN_REQUESTED";
|
|
169
|
-
/** Subagent run started */
|
|
170
|
-
readonly RUN_STARTED: "SUBAGENT_RUN_STARTED";
|
|
171
|
-
/** Subagent run completed */
|
|
172
|
-
readonly RUN_COMPLETED: "SUBAGENT_RUN_COMPLETED";
|
|
173
|
-
/** Subagent run failed */
|
|
174
|
-
readonly RUN_FAILED: "SUBAGENT_RUN_FAILED";
|
|
175
|
-
/** Subagent run timed out */
|
|
176
|
-
readonly RUN_TIMEOUT: "SUBAGENT_RUN_TIMEOUT";
|
|
177
|
-
/** Subagent announcement sent */
|
|
178
|
-
readonly ANNOUNCE_SENT: "SUBAGENT_ANNOUNCE_SENT";
|
|
179
|
-
/** Agent-to-agent message sent */
|
|
180
|
-
readonly A2A_MESSAGE_SENT: "A2A_MESSAGE_SENT";
|
|
181
|
-
/** Agent-to-agent message received */
|
|
182
|
-
readonly A2A_MESSAGE_RECEIVED: "A2A_MESSAGE_RECEIVED";
|
|
183
|
-
};
|
|
184
|
-
export type SubagentEventType = (typeof SubagentEventType)[keyof typeof SubagentEventType];
|
|
185
|
-
/**
|
|
186
|
-
* Payload for subagent events.
|
|
187
|
-
*/
|
|
188
|
-
export interface SubagentEventPayload {
|
|
189
|
-
runId: string;
|
|
190
|
-
childSessionKey?: string;
|
|
191
|
-
childRoomId?: UUID;
|
|
192
|
-
requesterSessionKey?: string;
|
|
193
|
-
requesterRoomId?: UUID;
|
|
194
|
-
task?: string;
|
|
195
|
-
label?: string;
|
|
196
|
-
status?: string;
|
|
197
|
-
outcome?: SubagentRunOutcome;
|
|
198
|
-
error?: string;
|
|
199
|
-
startedAt?: number;
|
|
200
|
-
endedAt?: number;
|
|
201
|
-
durationMs?: number;
|
|
202
|
-
}
|
|
203
|
-
/**
|
|
204
|
-
* Metadata stored on a room to track subagent context.
|
|
205
|
-
*/
|
|
206
|
-
export interface SubagentRoomMetadata {
|
|
207
|
-
/** Indicates this room is for a subagent */
|
|
208
|
-
isSubagent: true;
|
|
209
|
-
/** The subagent's session key */
|
|
210
|
-
sessionKey: string;
|
|
211
|
-
/** Parent room that spawned this subagent */
|
|
212
|
-
parentRoomId?: UUID;
|
|
213
|
-
/** Parent session key */
|
|
214
|
-
parentSessionKey?: string;
|
|
215
|
-
/** The task this subagent is executing */
|
|
216
|
-
task?: string;
|
|
217
|
-
/** Label for identification */
|
|
218
|
-
label?: string;
|
|
219
|
-
/** When the subagent was spawned */
|
|
220
|
-
spawnedAt: number;
|
|
221
|
-
/** Cleanup behavior */
|
|
222
|
-
cleanup: "delete" | "keep";
|
|
223
|
-
}
|
|
224
|
-
//# sourceMappingURL=subagent.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"subagent.d.ts","sourceRoot":"","sources":["../../../src/types/subagent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAE1C;;;;;;GAMG;AACH,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,IAAI,GAAG,UAAU,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;IAC7D,UAAU,EAAE,MAAM,CAAC;IAC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AACH,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,eAAe,CAAC,EAAE,IAAI,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,4CAA4C;IAC5C,UAAU,EAAE,IAAI,CAAC;IACjB,iCAAiC;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,6CAA6C;IAC7C,YAAY,CAAC,EAAE,IAAI,CAAC;IACpB,yBAAyB;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,0CAA0C;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+BAA+B;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oCAAoC;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,uBAAuB;IACvB,OAAO,EAAE,QAAQ,GAAG,MAAM,CAAC;CAC5B"}
|
package/dist/src/types.d.ts
DELETED
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import type { Task as CoreTask, UUID } from "@elizaos/core";
|
|
2
|
-
export type JsonPrimitive = string | number | boolean | null;
|
|
3
|
-
export type JsonValue = JsonPrimitive | JsonValue[] | {
|
|
4
|
-
[key: string]: JsonValue;
|
|
5
|
-
};
|
|
6
|
-
export type TaskStatus = "pending" | "running" | "completed" | "failed" | "paused" | "cancelled";
|
|
7
|
-
/**
|
|
8
|
-
* User-controlled lifecycle status (separate from execution status).
|
|
9
|
-
* Used by UIs to hide/show finished tasks without deleting history.
|
|
10
|
-
*/
|
|
11
|
-
export type TaskUserStatus = "open" | "done";
|
|
12
|
-
export interface TaskStep {
|
|
13
|
-
id: string;
|
|
14
|
-
description: string;
|
|
15
|
-
status: TaskStatus;
|
|
16
|
-
output?: string;
|
|
17
|
-
/** Additional metadata for the step */
|
|
18
|
-
metadata?: Record<string, JsonValue>;
|
|
19
|
-
}
|
|
20
|
-
export interface TaskResult {
|
|
21
|
-
success: boolean;
|
|
22
|
-
summary: string;
|
|
23
|
-
filesModified: string[];
|
|
24
|
-
filesCreated: string[];
|
|
25
|
-
error?: string;
|
|
26
|
-
/** Additional metadata for the result */
|
|
27
|
-
metadata?: Record<string, JsonValue>;
|
|
28
|
-
}
|
|
29
|
-
export type AgentProviderId = string;
|
|
30
|
-
export interface OrchestratedTaskMetadata {
|
|
31
|
-
status: TaskStatus;
|
|
32
|
-
progress: number;
|
|
33
|
-
output: string[];
|
|
34
|
-
steps: TaskStep[];
|
|
35
|
-
result?: TaskResult;
|
|
36
|
-
error?: string;
|
|
37
|
-
createdAt: number;
|
|
38
|
-
startedAt?: number;
|
|
39
|
-
completedAt?: number;
|
|
40
|
-
providerId: AgentProviderId;
|
|
41
|
-
/**
|
|
42
|
-
* Optional label (e.g. "Claude Code", "Codex", "SWE-agent") to show in UIs.
|
|
43
|
-
* Not used for routing execution (use `providerId`).
|
|
44
|
-
*/
|
|
45
|
-
providerLabel?: string;
|
|
46
|
-
/**
|
|
47
|
-
* A working directory string for display/prompting purposes.
|
|
48
|
-
* The orchestrator plugin does not read/verify the filesystem.
|
|
49
|
-
*/
|
|
50
|
-
workingDirectory: string;
|
|
51
|
-
/** Compatibility field for UIs that still refer to "subAgentType". */
|
|
52
|
-
subAgentType?: string;
|
|
53
|
-
/** User-controlled status for UI filtering. */
|
|
54
|
-
userStatus?: TaskUserStatus;
|
|
55
|
-
userStatusUpdatedAt?: number;
|
|
56
|
-
/** Optional result mirrors for UIs. */
|
|
57
|
-
filesCreated?: string[];
|
|
58
|
-
filesModified?: string[];
|
|
59
|
-
}
|
|
60
|
-
export interface OrchestratedTask extends Omit<CoreTask, "metadata"> {
|
|
61
|
-
metadata: OrchestratedTaskMetadata;
|
|
62
|
-
}
|
|
63
|
-
export interface ProviderTaskExecutionContext {
|
|
64
|
-
runtimeAgentId: UUID;
|
|
65
|
-
roomId?: UUID;
|
|
66
|
-
worldId?: UUID;
|
|
67
|
-
workingDirectory: string;
|
|
68
|
-
/** Best-effort telemetry channels back into task history */
|
|
69
|
-
appendOutput: (line: string) => Promise<void>;
|
|
70
|
-
updateProgress: (progress: number) => Promise<void>;
|
|
71
|
-
updateStep: (stepId: string, status: TaskStatus, output?: string) => Promise<void>;
|
|
72
|
-
/** Cooperative cancellation/pause. Providers should poll these. */
|
|
73
|
-
isCancelled: () => boolean;
|
|
74
|
-
isPaused: () => boolean;
|
|
75
|
-
}
|
|
76
|
-
export interface AgentProvider {
|
|
77
|
-
id: AgentProviderId;
|
|
78
|
-
label: string;
|
|
79
|
-
description?: string;
|
|
80
|
-
executeTask: (task: OrchestratedTask, ctx: ProviderTaskExecutionContext) => Promise<TaskResult>;
|
|
81
|
-
}
|
|
82
|
-
export interface AgentOrchestratorPluginOptions {
|
|
83
|
-
/**
|
|
84
|
-
* Providers available to the orchestrator.
|
|
85
|
-
*
|
|
86
|
-
* Examples:
|
|
87
|
-
* - "claude-code" (Claude Agent SDK)
|
|
88
|
-
* - "codex" (OpenAI Codex SDK)
|
|
89
|
-
* - "sweagent" (SWE-agent methodology worker)
|
|
90
|
-
* - "eliza+plugin-code" (Eliza worker that has @elizaos/plugin-code)
|
|
91
|
-
* - any custom provider id
|
|
92
|
-
*/
|
|
93
|
-
providers: readonly AgentProvider[];
|
|
94
|
-
/** Default provider id when user hasn’t selected one. */
|
|
95
|
-
defaultProviderId: AgentProviderId;
|
|
96
|
-
/**
|
|
97
|
-
* Function to supply a working directory string.
|
|
98
|
-
* The orchestrator plugin does not verify the path.
|
|
99
|
-
*/
|
|
100
|
-
getWorkingDirectory: () => string;
|
|
101
|
-
/**
|
|
102
|
-
* Environment variable that controls which provider is active for new tasks.
|
|
103
|
-
* Defaults to `ELIZA_CODE_ACTIVE_SUB_AGENT` for compatibility with `examples/code`.
|
|
104
|
-
*/
|
|
105
|
-
activeProviderEnvVar?: string;
|
|
106
|
-
}
|
|
107
|
-
export type TaskEventType = "task:created" | "task:started" | "task:progress" | "task:output" | "task:completed" | "task:failed" | "task:cancelled" | "task:paused" | "task:resumed" | "task:message";
|
|
108
|
-
export interface TaskEvent {
|
|
109
|
-
type: TaskEventType;
|
|
110
|
-
taskId: string;
|
|
111
|
-
data?: Record<string, JsonValue>;
|
|
112
|
-
}
|
|
113
|
-
//# sourceMappingURL=types.d.ts.map
|
package/dist/src/types.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,QAAQ,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAM5D,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;AAC7D,MAAM,MAAM,SAAS,GAAG,aAAa,GAAG,SAAS,EAAE,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AAMnF,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,QAAQ,GAAG,WAAW,CAAC;AAEjG;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,CAAC;AAE7C,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,UAAU,CAAC;IACnB,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WAAW,SAAS;IACxB,IAAI,EAAE,aAAa,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CAClC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Session and utility functions for the agent orchestrator.
|
|
3
|
-
*
|
|
4
|
-
* @module utils
|
|
5
|
-
*/
|
|
6
|
-
export { buildAcpSessionKey, buildAgentMainSessionKey, buildAgentPeerSessionKey, buildAgentSessionKey, buildGroupHistoryKey, buildSessionKey, buildSubagentSessionKey, createSendPolicyProvider, createSessionEntry, createSessionProvider, createSessionSkillsProvider, createSubagentSessionKey, deleteSessionEntry, extractAgentIdFromSessionKey, extractSessionContext, formatDurationShort, formatTokenCount, getSessionEntry, getSessionProviders, hashToUUID, isAcpSessionKey, isCoreSubagentSessionKey, isSubagentSessionKey, isValidSessionEntry, listSessionKeys, loadSessionStore, mergeDeliveryContext, mergeSessionEntry, normalizeAccountId, normalizeAgentId, normalizeCoreAgentId, normalizeDeliveryContext, normalizeMainKey, normalizeSessionKey, parseAgentSessionKey, parseSessionKey, resolveAgentIdFromSessionKey, resolveAgentSessionsDir, resolveDefaultSessionStorePath, resolveSessionTranscriptPath, resolveStateDir, resolveStorePath, resolveThreadParentSessionKey, resolveThreadSessionKeys, type SessionDeliveryContext, type SessionEntry, type SessionResolution, SessionStateManager, type SessionStore, saveSessionStore, sessionKeyToRoomId, toAgentRequestSessionKey, toAgentStoreSessionKey, updateSessionStore, updateSessionStoreEntry, upsertSessionEntry, } from "./session.js";
|
|
7
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EACL,kBAAkB,EAElB,wBAAwB,EACxB,wBAAwB,EACxB,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,EACf,uBAAuB,EACvB,wBAAwB,EAExB,kBAAkB,EAElB,qBAAqB,EACrB,2BAA2B,EAC3B,wBAAwB,EACxB,kBAAkB,EAClB,4BAA4B,EAC5B,qBAAqB,EACrB,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,mBAAmB,EACnB,UAAU,EACV,eAAe,EACf,wBAAwB,EACxB,oBAAoB,EACpB,mBAAmB,EACnB,eAAe,EAEf,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,wBAAwB,EACxB,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,eAAe,EACf,4BAA4B,EAC5B,uBAAuB,EACvB,8BAA8B,EAC9B,4BAA4B,EAE5B,eAAe,EACf,gBAAgB,EAChB,6BAA6B,EAC7B,wBAAwB,EACxB,KAAK,sBAAsB,EAE3B,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,mBAAmB,EACnB,KAAK,YAAY,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,wBAAwB,EACxB,sBAAsB,EACtB,kBAAkB,EAClB,uBAAuB,EACvB,kBAAkB,GACnB,MAAM,cAAc,CAAC"}
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import type { UUID } from "@elizaos/core";
|
|
2
|
-
import type { DeliveryContext, ParsedSessionKey } from "../types/subagent.js";
|
|
3
|
-
export { buildAcpSessionKey, buildAgentMainSessionKey, buildAgentPeerSessionKey, buildAgentSessionKey, buildGroupHistoryKey, buildSubagentSessionKey, createSendPolicyProvider, createSessionEntry, createSessionProvider, createSessionSkillsProvider, deleteSessionEntry, extractSessionContext, getSessionEntry, getSessionProviders, isAcpSessionKey, isSubagentSessionKey as isCoreSubagentSessionKey, isValidSessionEntry, listSessionKeys, loadSessionStore, mergeSessionEntry, normalizeAccountId, normalizeAgentId as normalizeCoreAgentId, normalizeMainKey, parseAgentSessionKey, resolveAgentIdFromSessionKey, resolveAgentSessionsDir, resolveDefaultSessionStorePath, resolveSessionTranscriptPath, resolveStateDir, resolveStorePath, resolveThreadParentSessionKey, resolveThreadSessionKeys, type SessionDeliveryContext, type SessionEntry, type SessionResolution, SessionStateManager, type SessionStore, saveSessionStore, toAgentRequestSessionKey, toAgentStoreSessionKey, updateSessionStore, updateSessionStoreEntry, upsertSessionEntry, } from "@elizaos/core";
|
|
4
|
-
/**
|
|
5
|
-
* Converts a string to a deterministic UUID v5.
|
|
6
|
-
* Uses SHA-256 to hash the input and formats it as a UUID.
|
|
7
|
-
*
|
|
8
|
-
* @param input - The string to convert
|
|
9
|
-
* @returns A deterministic UUID
|
|
10
|
-
*/
|
|
11
|
-
export declare function hashToUUID(input: string): UUID;
|
|
12
|
-
/**
|
|
13
|
-
* Converts a session key to a deterministic Eliza room ID.
|
|
14
|
-
*
|
|
15
|
-
* @param sessionKey - The Otto-style session key
|
|
16
|
-
* @param agentId - Optional agent ID to scope the room
|
|
17
|
-
* @returns A deterministic UUID for the room
|
|
18
|
-
*/
|
|
19
|
-
export declare function sessionKeyToRoomId(sessionKey: string, agentId?: string): UUID;
|
|
20
|
-
/**
|
|
21
|
-
* Normalizes a session key to a canonical format.
|
|
22
|
-
*
|
|
23
|
-
* @param sessionKey - The session key to normalize
|
|
24
|
-
* @returns Normalized session key
|
|
25
|
-
*/
|
|
26
|
-
export declare function normalizeSessionKey(sessionKey: string): string;
|
|
27
|
-
/**
|
|
28
|
-
* Parses a session key into its component parts.
|
|
29
|
-
*
|
|
30
|
-
* Supported formats:
|
|
31
|
-
* - "agent:botname:dm:user123" -> { agentId: "botname", keyType: "dm", identifier: "user123" }
|
|
32
|
-
* - "agent:botname:subagent:uuid" -> { agentId: "botname", keyType: "subagent", identifier: "uuid" }
|
|
33
|
-
* - "agent:botname:group:channelId" -> { agentId: "botname", keyType: "group", identifier: "channelId" }
|
|
34
|
-
* - "dm:user123" -> { agentId: "unknown", keyType: "dm", identifier: "user123" }
|
|
35
|
-
*
|
|
36
|
-
* @param sessionKey - The session key to parse
|
|
37
|
-
* @returns Parsed components
|
|
38
|
-
*/
|
|
39
|
-
export declare function parseSessionKey(sessionKey: string): ParsedSessionKey;
|
|
40
|
-
/**
|
|
41
|
-
* Builds a session key from its component parts.
|
|
42
|
-
*
|
|
43
|
-
* @param agentId - The agent ID
|
|
44
|
-
* @param keyType - The key type (dm, subagent, group, etc.)
|
|
45
|
-
* @param identifier - The unique identifier
|
|
46
|
-
* @returns Constructed session key
|
|
47
|
-
*/
|
|
48
|
-
export declare function buildSessionKey(agentId: string, keyType: string, identifier: string): string;
|
|
49
|
-
/**
|
|
50
|
-
* Normalizes an agent ID to lowercase.
|
|
51
|
-
*
|
|
52
|
-
* @param agentId - The agent ID to normalize
|
|
53
|
-
* @returns Normalized agent ID
|
|
54
|
-
*/
|
|
55
|
-
export declare function normalizeAgentId(agentId: string): string;
|
|
56
|
-
/**
|
|
57
|
-
* Checks if a session key represents a subagent.
|
|
58
|
-
*
|
|
59
|
-
* @param sessionKey - The session key to check
|
|
60
|
-
* @returns True if this is a subagent session
|
|
61
|
-
*/
|
|
62
|
-
export declare function isSubagentSessionKey(sessionKey: string): boolean;
|
|
63
|
-
/**
|
|
64
|
-
* Extracts the agent ID from a session key.
|
|
65
|
-
*
|
|
66
|
-
* @param sessionKey - The session key
|
|
67
|
-
* @returns The agent ID or "unknown"
|
|
68
|
-
*/
|
|
69
|
-
export declare function extractAgentIdFromSessionKey(sessionKey: string): string;
|
|
70
|
-
/**
|
|
71
|
-
* Creates a subagent session key with a unique identifier.
|
|
72
|
-
*
|
|
73
|
-
* @param agentId - The agent ID
|
|
74
|
-
* @returns A new subagent session key
|
|
75
|
-
*/
|
|
76
|
-
export declare function createSubagentSessionKey(agentId: string): string;
|
|
77
|
-
/**
|
|
78
|
-
* Normalizes a delivery context by removing undefined values.
|
|
79
|
-
*
|
|
80
|
-
* @param context - The context to normalize
|
|
81
|
-
* @returns Normalized delivery context or undefined
|
|
82
|
-
*/
|
|
83
|
-
export declare function normalizeDeliveryContext(context?: DeliveryContext | null): DeliveryContext | undefined;
|
|
84
|
-
/**
|
|
85
|
-
* Merges two delivery contexts, with the first taking priority.
|
|
86
|
-
*
|
|
87
|
-
* @param primary - Primary context (takes priority)
|
|
88
|
-
* @param secondary - Secondary context (fallback values)
|
|
89
|
-
* @returns Merged context
|
|
90
|
-
*/
|
|
91
|
-
export declare function mergeDeliveryContext(primary?: DeliveryContext, secondary?: DeliveryContext): DeliveryContext | undefined;
|
|
92
|
-
/**
|
|
93
|
-
* Formats a duration in milliseconds to a human-readable string.
|
|
94
|
-
*
|
|
95
|
-
* @param ms - Duration in milliseconds
|
|
96
|
-
* @returns Formatted duration (e.g., "1h2m", "45s")
|
|
97
|
-
*/
|
|
98
|
-
export declare function formatDurationShort(ms?: number): string | undefined;
|
|
99
|
-
/**
|
|
100
|
-
* Formats a token count to a human-readable string.
|
|
101
|
-
*
|
|
102
|
-
* @param count - Token count
|
|
103
|
-
* @returns Formatted count (e.g., "1.5k", "2.3m")
|
|
104
|
-
*/
|
|
105
|
-
export declare function formatTokenCount(count?: number): string;
|
|
106
|
-
//# sourceMappingURL=session.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/utils/session.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAG9E,OAAO,EACL,kBAAkB,EAElB,wBAAwB,EACxB,wBAAwB,EACxB,oBAAoB,EACpB,oBAAoB,EACpB,uBAAuB,EACvB,wBAAwB,EAExB,kBAAkB,EAElB,qBAAqB,EACrB,2BAA2B,EAC3B,kBAAkB,EAClB,qBAAqB,EACrB,eAAe,EACf,mBAAmB,EACnB,eAAe,EACf,oBAAoB,IAAI,wBAAwB,EAChD,mBAAmB,EACnB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