@elizaos/plugin-agent-orchestrator 2.0.3-beta.2 → 2.0.3-beta.3

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.
Files changed (176) hide show
  1. package/dist/cjs/index.d.ts +2 -0
  2. package/dist/cjs/index.node.cjs +20962 -0
  3. package/dist/cjs/index.node.js.map +82 -0
  4. package/dist/index.d.ts +2 -0
  5. package/dist/node/index.d.ts +2 -0
  6. package/dist/node/index.d.ts.map +1 -0
  7. package/dist/node/index.node.d.ts +4 -0
  8. package/dist/node/index.node.d.ts.map +1 -0
  9. package/dist/node/index.node.js +20946 -0
  10. package/dist/node/index.node.js.map +82 -0
  11. package/dist/node/src/actions/common.d.ts +114 -0
  12. package/dist/node/src/actions/common.d.ts.map +1 -0
  13. package/dist/node/src/actions/elizaos-capability.d.ts +3 -0
  14. package/dist/node/src/actions/elizaos-capability.d.ts.map +1 -0
  15. package/dist/node/src/actions/sandbox-stub.d.ts +25 -0
  16. package/dist/node/src/actions/sandbox-stub.d.ts.map +1 -0
  17. package/dist/node/src/actions/tasks.d.ts +108 -0
  18. package/dist/node/src/actions/tasks.d.ts.map +1 -0
  19. package/dist/node/src/api/agent-routes.d.ts +18 -0
  20. package/dist/node/src/api/agent-routes.d.ts.map +1 -0
  21. package/dist/node/src/api/bridge-routes.d.ts +70 -0
  22. package/dist/node/src/api/bridge-routes.d.ts.map +1 -0
  23. package/dist/node/src/api/credential-prompt.d.ts +38 -0
  24. package/dist/node/src/api/credential-prompt.d.ts.map +1 -0
  25. package/dist/node/src/api/issue-routes.d.ts +17 -0
  26. package/dist/node/src/api/issue-routes.d.ts.map +1 -0
  27. package/dist/node/src/api/orchestrator-routes.d.ts +25 -0
  28. package/dist/node/src/api/orchestrator-routes.d.ts.map +1 -0
  29. package/dist/node/src/api/parent-context-routes.d.ts +17 -0
  30. package/dist/node/src/api/parent-context-routes.d.ts.map +1 -0
  31. package/dist/node/src/api/route-utils.d.ts +34 -0
  32. package/dist/node/src/api/route-utils.d.ts.map +1 -0
  33. package/dist/node/src/api/routes.d.ts +22 -0
  34. package/dist/node/src/api/routes.d.ts.map +1 -0
  35. package/dist/node/src/api/workspace-routes.d.ts +17 -0
  36. package/dist/node/src/api/workspace-routes.d.ts.map +1 -0
  37. package/dist/node/src/evaluators/sub-agent-completion.d.ts +3 -0
  38. package/dist/node/src/evaluators/sub-agent-completion.d.ts.map +1 -0
  39. package/dist/node/src/index.d.ts +57 -0
  40. package/dist/node/src/index.d.ts.map +1 -0
  41. package/dist/node/src/providers/action-examples.d.ts +14 -0
  42. package/dist/node/src/providers/action-examples.d.ts.map +1 -0
  43. package/dist/node/src/providers/active-sub-agents.d.ts +15 -0
  44. package/dist/node/src/providers/active-sub-agents.d.ts.map +1 -0
  45. package/dist/node/src/providers/active-workspace-context.d.ts +13 -0
  46. package/dist/node/src/providers/active-workspace-context.d.ts.map +1 -0
  47. package/dist/node/src/providers/available-agents.d.ts +4 -0
  48. package/dist/node/src/providers/available-agents.d.ts.map +1 -0
  49. package/dist/node/src/providers/coding-session-changes.d.ts +17 -0
  50. package/dist/node/src/providers/coding-session-changes.d.ts.map +1 -0
  51. package/dist/node/src/register-routes.d.ts +31 -0
  52. package/dist/node/src/register-routes.d.ts.map +1 -0
  53. package/dist/node/src/services/acceptance-criteria.d.ts +84 -0
  54. package/dist/node/src/services/acceptance-criteria.d.ts.map +1 -0
  55. package/dist/node/src/services/acp-native-transport.d.ts +111 -0
  56. package/dist/node/src/services/acp-native-transport.d.ts.map +1 -0
  57. package/dist/node/src/services/acp-service.d.ts +226 -0
  58. package/dist/node/src/services/acp-service.d.ts.map +1 -0
  59. package/dist/node/src/services/active-session-forward.d.ts +31 -0
  60. package/dist/node/src/services/active-session-forward.d.ts.map +1 -0
  61. package/dist/node/src/services/agent-name-assignment.d.ts +50 -0
  62. package/dist/node/src/services/agent-name-assignment.d.ts.map +1 -0
  63. package/dist/node/src/services/ansi-utils.d.ts +64 -0
  64. package/dist/node/src/services/ansi-utils.d.ts.map +1 -0
  65. package/dist/node/src/services/app-deploy-guidance.d.ts +52 -0
  66. package/dist/node/src/services/app-deploy-guidance.d.ts.map +1 -0
  67. package/dist/node/src/services/audit.d.ts +18 -0
  68. package/dist/node/src/services/audit.d.ts.map +1 -0
  69. package/dist/node/src/services/coding-account-selection.d.ts +79 -0
  70. package/dist/node/src/services/coding-account-selection.d.ts.map +1 -0
  71. package/dist/node/src/services/completion-envelope.d.ts +63 -0
  72. package/dist/node/src/services/completion-envelope.d.ts.map +1 -0
  73. package/dist/node/src/services/completion-evidence.d.ts +144 -0
  74. package/dist/node/src/services/completion-evidence.d.ts.map +1 -0
  75. package/dist/node/src/services/config-env.d.ts +27 -0
  76. package/dist/node/src/services/config-env.d.ts.map +1 -0
  77. package/dist/node/src/services/goal-contract.d.ts +25 -0
  78. package/dist/node/src/services/goal-contract.d.ts.map +1 -0
  79. package/dist/node/src/services/goal-llm-verifier.d.ts +157 -0
  80. package/dist/node/src/services/goal-llm-verifier.d.ts.map +1 -0
  81. package/dist/node/src/services/goal-prompt.d.ts +82 -0
  82. package/dist/node/src/services/goal-prompt.d.ts.map +1 -0
  83. package/dist/node/src/services/independent-verifier.d.ts +58 -0
  84. package/dist/node/src/services/independent-verifier.d.ts.map +1 -0
  85. package/dist/node/src/services/interruption-decider.d.ts +43 -0
  86. package/dist/node/src/services/interruption-decider.d.ts.map +1 -0
  87. package/dist/node/src/services/json-model-output.d.ts +2 -0
  88. package/dist/node/src/services/json-model-output.d.ts.map +1 -0
  89. package/dist/node/src/services/opencode-config.d.ts +21 -0
  90. package/dist/node/src/services/opencode-config.d.ts.map +1 -0
  91. package/dist/node/src/services/orchestrator-device-support-matrix.d.ts +46 -0
  92. package/dist/node/src/services/orchestrator-device-support-matrix.d.ts.map +1 -0
  93. package/dist/node/src/services/orchestrator-task-mapper.d.ts +192 -0
  94. package/dist/node/src/services/orchestrator-task-mapper.d.ts.map +1 -0
  95. package/dist/node/src/services/orchestrator-task-service.d.ts +370 -0
  96. package/dist/node/src/services/orchestrator-task-service.d.ts.map +1 -0
  97. package/dist/node/src/services/orchestrator-task-store.d.ts +156 -0
  98. package/dist/node/src/services/orchestrator-task-store.d.ts.map +1 -0
  99. package/dist/node/src/services/orchestrator-task-types.d.ts +334 -0
  100. package/dist/node/src/services/orchestrator-task-types.d.ts.map +1 -0
  101. package/dist/node/src/services/parent-agent-broker.d.ts +23 -0
  102. package/dist/node/src/services/parent-agent-broker.d.ts.map +1 -0
  103. package/dist/node/src/services/parent-agent-dispatch.d.ts +62 -0
  104. package/dist/node/src/services/parent-agent-dispatch.d.ts.map +1 -0
  105. package/dist/node/src/services/repo-input.d.ts +16 -0
  106. package/dist/node/src/services/repo-input.d.ts.map +1 -0
  107. package/dist/node/src/services/screenshot-delivery.d.ts +38 -0
  108. package/dist/node/src/services/screenshot-delivery.d.ts.map +1 -0
  109. package/dist/node/src/services/session-event-queue.d.ts +18 -0
  110. package/dist/node/src/services/session-event-queue.d.ts.map +1 -0
  111. package/dist/node/src/services/session-store.d.ts +108 -0
  112. package/dist/node/src/services/session-store.d.ts.map +1 -0
  113. package/dist/node/src/services/skill-lifeops-context-broker.d.ts +20 -0
  114. package/dist/node/src/services/skill-lifeops-context-broker.d.ts.map +1 -0
  115. package/dist/node/src/services/skill-manifest.d.ts +48 -0
  116. package/dist/node/src/services/skill-manifest.d.ts.map +1 -0
  117. package/dist/node/src/services/skill-recommender.d.ts +53 -0
  118. package/dist/node/src/services/skill-recommender.d.ts.map +1 -0
  119. package/dist/node/src/services/smithers-task-executor.d.ts +73 -0
  120. package/dist/node/src/services/smithers-task-executor.d.ts.map +1 -0
  121. package/dist/node/src/services/smithers-task-integration.d.ts +52 -0
  122. package/dist/node/src/services/smithers-task-integration.d.ts.map +1 -0
  123. package/dist/node/src/services/smithers-task-runner.d.ts +27 -0
  124. package/dist/node/src/services/smithers-task-runner.d.ts.map +1 -0
  125. package/dist/node/src/services/smithers-task-types.d.ts +96 -0
  126. package/dist/node/src/services/smithers-task-types.d.ts.map +1 -0
  127. package/dist/node/src/services/spawn-trajectory.d.ts +23 -0
  128. package/dist/node/src/services/spawn-trajectory.d.ts.map +1 -0
  129. package/dist/node/src/services/spend-allowance.d.ts +143 -0
  130. package/dist/node/src/services/spend-allowance.d.ts.map +1 -0
  131. package/dist/node/src/services/ssrf-guard.d.ts +66 -0
  132. package/dist/node/src/services/ssrf-guard.d.ts.map +1 -0
  133. package/dist/node/src/services/sub-agent-identity.d.ts +27 -0
  134. package/dist/node/src/services/sub-agent-identity.d.ts.map +1 -0
  135. package/dist/node/src/services/sub-agent-inbox.d.ts +26 -0
  136. package/dist/node/src/services/sub-agent-inbox.d.ts.map +1 -0
  137. package/dist/node/src/services/sub-agent-router.d.ts +178 -0
  138. package/dist/node/src/services/sub-agent-router.d.ts.map +1 -0
  139. package/dist/node/src/services/task-agent-frameworks.d.ts +103 -0
  140. package/dist/node/src/services/task-agent-frameworks.d.ts.map +1 -0
  141. package/dist/node/src/services/task-agent-routing.d.ts +33 -0
  142. package/dist/node/src/services/task-agent-routing.d.ts.map +1 -0
  143. package/dist/node/src/services/task-policy.d.ts +17 -0
  144. package/dist/node/src/services/task-policy.d.ts.map +1 -0
  145. package/dist/node/src/services/task-supervisor-service.d.ts +65 -0
  146. package/dist/node/src/services/task-supervisor-service.d.ts.map +1 -0
  147. package/dist/node/src/services/task-watchdog-service.d.ts +50 -0
  148. package/dist/node/src/services/task-watchdog-service.d.ts.map +1 -0
  149. package/dist/node/src/services/terminal-capabilities.d.ts +48 -0
  150. package/dist/node/src/services/terminal-capabilities.d.ts.map +1 -0
  151. package/dist/node/src/services/trajectory-context.d.ts +69 -0
  152. package/dist/node/src/services/trajectory-context.d.ts.map +1 -0
  153. package/dist/node/src/services/trajectory-feedback.d.ts +53 -0
  154. package/dist/node/src/services/trajectory-feedback.d.ts.map +1 -0
  155. package/dist/node/src/services/types.d.ts +188 -0
  156. package/dist/node/src/services/types.d.ts.map +1 -0
  157. package/dist/node/src/services/view-deploy-guidance.d.ts +14 -0
  158. package/dist/node/src/services/view-deploy-guidance.d.ts.map +1 -0
  159. package/dist/node/src/services/workdir-validation.d.ts +10 -0
  160. package/dist/node/src/services/workdir-validation.d.ts.map +1 -0
  161. package/dist/node/src/services/workspace-diff.d.ts +50 -0
  162. package/dist/node/src/services/workspace-diff.d.ts.map +1 -0
  163. package/dist/node/src/services/workspace-git-ops.d.ts +28 -0
  164. package/dist/node/src/services/workspace-git-ops.d.ts.map +1 -0
  165. package/dist/node/src/services/workspace-github.d.ts +60 -0
  166. package/dist/node/src/services/workspace-github.d.ts.map +1 -0
  167. package/dist/node/src/services/workspace-lifecycle.d.ts +5 -0
  168. package/dist/node/src/services/workspace-lifecycle.d.ts.map +1 -0
  169. package/dist/node/src/services/workspace-service.d.ts +126 -0
  170. package/dist/node/src/services/workspace-service.d.ts.map +1 -0
  171. package/dist/node/src/services/workspace-types.d.ts +81 -0
  172. package/dist/node/src/services/workspace-types.d.ts.map +1 -0
  173. package/dist/node/src/setup-routes.d.ts +9 -0
  174. package/dist/node/src/setup-routes.d.ts.map +1 -0
  175. package/docs/multi-account-orchestration.md +1 -1
  176. package/package.json +7 -4
@@ -0,0 +1,114 @@
1
+ import type { ActionResult, HandlerCallback, IAgentRuntime, Memory, State } from "@elizaos/core";
2
+ import type { AcpJsonRpcMessage, ApprovalPreset, AvailableAgentInfo, PromptResult, SessionEventName, SessionInfo, SpawnOptions, SpawnResult } from "../services/types.js";
3
+ export interface AcpActionService {
4
+ defaultApprovalPreset?: ApprovalPreset;
5
+ agentSelectionStrategy?: string;
6
+ spawnSession(opts: SpawnOptions): Promise<SpawnResult>;
7
+ sendPrompt?(sessionId: string, text: string, opts?: {
8
+ timeoutMs?: number;
9
+ model?: string;
10
+ }): Promise<PromptResult>;
11
+ sendToSession(sessionId: string, input: string): Promise<PromptResult>;
12
+ sendKeysToSession(sessionId: string, keys?: string): Promise<void>;
13
+ stopSession(sessionId: string, force?: boolean): Promise<void>;
14
+ cancelSession?(sessionId: string): Promise<void>;
15
+ getSessionOutput?(sessionId: string, lines?: number): Promise<string>;
16
+ listSessions(): SessionInfo[] | Promise<SessionInfo[]>;
17
+ getSession(sessionId: string): SessionInfo | undefined | Promise<SessionInfo | null | undefined>;
18
+ findResumableSessionByLabel?(label: string, workdir: string): Promise<SessionInfo | undefined>;
19
+ resumeOrphanedBusySessions?(): Promise<{
20
+ resumed: number;
21
+ skipped: number;
22
+ }>;
23
+ resolveAgentType?(selection?: Record<string, unknown>): Promise<string> | string;
24
+ checkAvailableAgents?(types?: string[]): Promise<AvailableAgentInfo[]>;
25
+ getAvailableAgents?(): Promise<AvailableAgentInfo[]>;
26
+ onSessionEvent?(handler: (sessionId: string, event: SessionEventName, data: unknown) => void): () => void;
27
+ onAcpEvent?(handler: (event: AcpJsonRpcMessage, sessionId?: string) => void): () => void;
28
+ emitSessionEvent?(sessionId: string, event: SessionEventName, data: unknown): void;
29
+ }
30
+ export type HandlerOptionsLike = {
31
+ parameters?: Record<string, unknown>;
32
+ } | Record<string, unknown>;
33
+ export declare function getAcpService(runtime: IAgentRuntime): AcpActionService | undefined;
34
+ export declare function logger(runtime: IAgentRuntime): IAgentRuntime["logger"];
35
+ export declare function contentRecord(message: Memory): Record<string, unknown>;
36
+ export declare function paramsRecord(options?: HandlerOptionsLike): Record<string, unknown>;
37
+ export declare function pickString(params: Record<string, unknown>, content: Record<string, unknown>, name: string): string | undefined;
38
+ export declare function pickBoolean(params: Record<string, unknown>, content: Record<string, unknown>, name: string): boolean | undefined;
39
+ export declare function messageText(message: Memory): string;
40
+ /**
41
+ * Resolve the genuine originating user request for workdir-route matching.
42
+ *
43
+ * Workdir routes (`TASK_AGENT_WORKDIR_ROUTES`) match keyword phrases like
44
+ * "web page" against `${userRequest}\n${task}`. Feeding only the planner's
45
+ * `task` argument is unreliable: with a verbose planner (gpt-oss /
46
+ * TASKS_CREATE) the user's wording survives, but with a terser planner
47
+ * (claude / TASKS_SPAWN_AGENT) the action arrives with the planner's
48
+ * rephrasing — and the orchestrator's `messageText()` only reads
49
+ * `content.text`, which may be envelope-wrapped or empty — dropping the route
50
+ * keyword and silently falling the spawn back to the default ACP workspace.
51
+ * Builds then land in the wrong directory and never get hosted.
52
+ *
53
+ * The fix is planner-independent and reads only sources that are guaranteed
54
+ * populated synchronously at action time (no DB round-trip, no persistence
55
+ * race — the failure mode of the earlier `getMemories`-first attempt):
56
+ * 1. the message's own `content.currentMessageText` (the raw human request
57
+ * the connector stamped), via `userRequestFromMessage`;
58
+ * 2. the newest non-agent message in the state-composed conversation window
59
+ * (`state.data.providers.RECENT_MESSAGES.data.recentMessages`) — covers
60
+ * the case where the action message is a synthetic re-plan trigger but
61
+ * the user's original request is still in the dialogue;
62
+ * 3. a bounded `getMemories` read, kept ONLY as a last resort.
63
+ *
64
+ * Fail-open: every source is optional and the result is unioned with the
65
+ * action's own text, so routing never regresses below today's behavior.
66
+ */
67
+ export declare function resolveOriginatingRequestText(runtime: IAgentRuntime, message: Memory, state?: State, opts?: {
68
+ timeoutMs?: number;
69
+ scanLimit?: number;
70
+ }): Promise<string>;
71
+ export declare function hasExplicitPayload(message: Memory, fields: string[]): boolean;
72
+ export declare function shortId(id: string): string;
73
+ export declare function labelFor(session: Pick<SessionInfo, "id" | "name" | "metadata">): string;
74
+ export declare function newestSession(sessions: SessionInfo[]): SessionInfo | undefined;
75
+ export declare function listSessionsWithin(service: AcpActionService, timeoutMs?: number): Promise<SessionInfo[]>;
76
+ /**
77
+ * Block until the number of in-flight sub-agent sessions drops below the
78
+ * configured ceiling, so concurrent spawns don't stampede the model
79
+ * provider.
80
+ *
81
+ * Why this exists: coding sub-agents (opencode + gpt-oss-class models on
82
+ * Cerebras / other OpenAI-compatible providers) degrade hard under
83
+ * concurrent load — the provider rate-limits, and the model responds by
84
+ * silently skipping its Write/tool calls and "completing" with a text-only
85
+ * answer. One build at a time succeeds; four at once produces one good
86
+ * build and three empty workdirs. Serialising spawns past a small ceiling
87
+ * trades a little latency for builds that actually land.
88
+ *
89
+ * Bounded and self-correcting: it polls real session state (no permits to
90
+ * leak), and gives up waiting after `maxWaitMs` so a wedged session can
91
+ * never deadlock the queue — the spawn just proceeds.
92
+ *
93
+ * Tunable via `ELIZA_MAX_CONCURRENT_SPAWNS` (default 2). Set to 0 or a
94
+ * negative value to disable the gate entirely.
95
+ */
96
+ export declare function waitForSpawnSlot(runtime: IAgentRuntime, service: AcpActionService, opts?: {
97
+ maxWaitMs?: number;
98
+ pollMs?: number;
99
+ }): Promise<void>;
100
+ export declare function callbackText(callback: HandlerCallback | undefined, text: string): Promise<void>;
101
+ export declare function errorResult(error: string, text?: string): ActionResult;
102
+ export declare function resolveSession(service: AcpActionService, sessionId: string | undefined, state?: State): Promise<{
103
+ session?: SessionInfo;
104
+ missingId?: string;
105
+ sessions: SessionInfo[];
106
+ }>;
107
+ export declare function setCurrentSession(state: State | undefined, session: SpawnResult | SessionInfo): void;
108
+ export declare function setCurrentSessions(state: State | undefined, sessions: SpawnResult[]): void;
109
+ export declare function emitSessionEvent(service: AcpActionService, sessionId: string, event: SessionEventName, data: unknown): void;
110
+ export declare function parseApproval(value: string | undefined): ApprovalPreset | undefined;
111
+ export declare function isAuthError(error: unknown): boolean;
112
+ export declare function failureMessage(error: unknown): string;
113
+ export declare function getTimeoutMs(params: Record<string, unknown>, content: Record<string, unknown>): number | undefined;
114
+ //# sourceMappingURL=common.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/actions/common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,eAAe,EACf,aAAa,EACb,MAAM,EACN,KAAK,EAGN,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAClB,YAAY,EACZ,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,WAAW,EACZ,MAAM,sBAAsB,CAAC;AAE9B,MAAM,WAAW,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AAgB,YAAY,CAC1B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,MAAM,GAAG,SAAS,CAKpB"}
@@ -0,0 +1,3 @@
1
+ import type { Action } from "@elizaos/core";
2
+ export declare const elizaOsCapabilityAction: Action;
3
+ //# sourceMappingURL=elizaos-capability.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"elizaos-capability.d.ts","sourceRoot":"","sources":["../../../../src/actions/elizaos-capability.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,MAAM,EAOP,MAAM,eAAe,CAAC;AA4HvB,eAAO,MAAM,uBAAuB,EAAE,MA2ErC,CAAC"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Sandbox-build fallback for the TASKS coding-agent surface.
3
+ *
4
+ * Store-distributed builds (Mac App Store, Microsoft Store, Flathub) run in
5
+ * an OS sandbox that forbids forking arbitrary user-installed binaries. The
6
+ * orchestrator's spawn paths (claude / codex / opencode CLIs via ACP) are
7
+ * therefore not viable in those builds, so we replace the TASKS action with
8
+ * a single unavailable action that explains the limitation and points the user at the
9
+ * direct-download artifact.
10
+ *
11
+ * Behavior:
12
+ * - validate(): always true — we want this action to win whenever the
13
+ * planner reaches for any coding-agent simile under sandbox.
14
+ * - handler(): returns a single user-facing error result; no spawn
15
+ * attempt, no workspace allocation, no subprocess session.
16
+ */
17
+ import type { Action } from "@elizaos/core";
18
+ import type { OrchestratorTerminalSupport } from "../services/terminal-capabilities.js";
19
+ export declare const tasksSandboxStubAction: Action & {
20
+ suppressPostActionContinuation: true;
21
+ };
22
+ export declare function createTerminalUnsupportedTasksAction(support: OrchestratorTerminalSupport): Action & {
23
+ suppressPostActionContinuation: true;
24
+ };
25
+ //# sourceMappingURL=sandbox-stub.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sandbox-stub.d.ts","sourceRoot":"","sources":["../../../../src/actions/sandbox-stub.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EACV,MAAM,EAOP,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AAoGxF,eAAO,MAAM,sBAAsB,EAAE,MAAM,GAAG;IAC5C,8BAA8B,EAAE,IAAI,CAAC;CAMrC,CAAC;AAEH,wBAAgB,oCAAoC,CAClD,OAAO,EAAE,2BAA2B,GACnC,MAAM,GAAG;IAAE,8BAA8B,EAAE,IAAI,CAAA;CAAE,CAenD"}
@@ -0,0 +1,108 @@
1
+ /**
2
+ * TASKS — single Pattern C parent action that subsumes the orchestrator's
3
+ * task-agent lifecycle, workspace lifecycle, GitHub issue management, and
4
+ * coding-task archive/reopen surface.
5
+ *
6
+ * Old leaf actions live as similes; their handlers were folded into per-action
7
+ * runners on this file.
8
+ *
9
+ * Actions:
10
+ * create — CREATE_AGENT_TASK / START_CODING_TASK
11
+ * spawn_agent — SPAWN_AGENT
12
+ * send — SEND_TO_AGENT
13
+ * stop_agent — STOP_AGENT
14
+ * list_agents — LIST_AGENTS
15
+ * cancel — CANCEL_TASK
16
+ * history — TASK_HISTORY
17
+ * control — TASK_CONTROL (action: pause|resume|stop|continue|archive|reopen)
18
+ * share — TASK_SHARE
19
+ * provision_workspace — CREATE_WORKSPACE / PROVISION_WORKSPACE
20
+ * submit_workspace — SUBMIT_WORKSPACE / FINALIZE_WORKSPACE
21
+ * manage_issues — MANAGE_ISSUES (action: create|list|get|update|comment|close|reopen|add_labels)
22
+ * archive — ARCHIVE_CODING_TASK
23
+ * reopen — REOPEN_CODING_TASK
24
+ *
25
+ * @module actions/tasks
26
+ */
27
+ import type { Action } from "@elizaos/core";
28
+ export declare const tasksAction: Action & {
29
+ suppressPostActionContinuation: true;
30
+ suppressEarlyReply: true;
31
+ };
32
+ export declare const createTaskAction: Action & {
33
+ suppressPostActionContinuation: true;
34
+ suppressEarlyReply: true;
35
+ };
36
+ export declare const startCodingTaskAction: Action & {
37
+ suppressPostActionContinuation: true;
38
+ suppressEarlyReply: true;
39
+ };
40
+ export declare const spawnAgentAction: Action & {
41
+ suppressPostActionContinuation: true;
42
+ suppressEarlyReply: true;
43
+ };
44
+ export declare const spawnTaskAgentAction: Action & {
45
+ suppressPostActionContinuation: true;
46
+ suppressEarlyReply: true;
47
+ };
48
+ export declare const sendToAgentAction: Action & {
49
+ suppressPostActionContinuation: true;
50
+ suppressEarlyReply: true;
51
+ };
52
+ export declare const sendToTaskAgentAction: Action & {
53
+ suppressPostActionContinuation: true;
54
+ suppressEarlyReply: true;
55
+ };
56
+ export declare const stopAgentAction: Action & {
57
+ suppressPostActionContinuation: true;
58
+ suppressEarlyReply: true;
59
+ };
60
+ export declare const stopTaskAgentAction: Action & {
61
+ suppressPostActionContinuation: true;
62
+ suppressEarlyReply: true;
63
+ };
64
+ export declare const listAgentsAction: Action & {
65
+ suppressPostActionContinuation: true;
66
+ suppressEarlyReply: true;
67
+ };
68
+ export declare const listTaskAgentsAction: Action & {
69
+ suppressPostActionContinuation: true;
70
+ suppressEarlyReply: true;
71
+ };
72
+ export declare const cancelTaskAction: Action & {
73
+ suppressPostActionContinuation: true;
74
+ suppressEarlyReply: true;
75
+ };
76
+ export declare const taskHistoryAction: Action & {
77
+ suppressPostActionContinuation: true;
78
+ suppressEarlyReply: true;
79
+ };
80
+ export declare const taskControlAction: Action & {
81
+ suppressPostActionContinuation: true;
82
+ suppressEarlyReply: true;
83
+ };
84
+ export declare const taskShareAction: Action & {
85
+ suppressPostActionContinuation: true;
86
+ suppressEarlyReply: true;
87
+ };
88
+ export declare const provisionWorkspaceAction: Action & {
89
+ suppressPostActionContinuation: true;
90
+ suppressEarlyReply: true;
91
+ };
92
+ export declare const finalizeWorkspaceAction: Action & {
93
+ suppressPostActionContinuation: true;
94
+ suppressEarlyReply: true;
95
+ };
96
+ export declare const manageIssuesAction: Action & {
97
+ suppressPostActionContinuation: true;
98
+ suppressEarlyReply: true;
99
+ };
100
+ export declare const archiveCodingTaskAction: Action & {
101
+ suppressPostActionContinuation: true;
102
+ suppressEarlyReply: true;
103
+ };
104
+ export declare const reopenCodingTaskAction: Action & {
105
+ suppressPostActionContinuation: true;
106
+ suppressEarlyReply: true;
107
+ };
108
+ //# sourceMappingURL=tasks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tasks.d.ts","sourceRoot":"","sources":["../../../../src/actions/tasks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAGH,OAAO,KAAK,EACV,MAAM,EAOP,MAAM,eAAe,CAAC;AA29EvB,eAAO,MAAM,WAAW,EAAE,MAAM,GAAG;IACjC,8BAA8B,EAAE,IAAI,CAAC;IACrC,kBAAkB,EAAE,IAAI,CAAC;CA2zB1B,CAAC;AAGF,eAAO,MAAM,gBAAgB;oCA/zBK,IAAI;wBAChB,IAAI;CA8zBiB,CAAC;AAC5C,eAAO,MAAM,qBAAqB;oCAh0BA,IAAI;wBAChB,IAAI;CA+zBsB,CAAC;AACjD,eAAO,MAAM,gBAAgB;oCAj0BK,IAAI;wBAChB,IAAI;CAg0BiB,CAAC;AAC5C,eAAO,MAAM,oBAAoB;oCAl0BC,IAAI;wBAChB,IAAI;CAi0BqB,CAAC;AAChD,eAAO,MAAM,iBAAiB;oCAn0BI,IAAI;wBAChB,IAAI;CAk0BkB,CAAC;AAC7C,eAAO,MAAM,qBAAqB;oCAp0BA,IAAI;wBAChB,IAAI;CAm0BsB,CAAC;AACjD,eAAO,MAAM,eAAe;oCAr0BM,IAAI;wBAChB,IAAI;CAo0BgB,CAAC;AAC3C,eAAO,MAAM,mBAAmB;oCAt0BE,IAAI;wBAChB,IAAI;CAq0BoB,CAAC;AAC/C,eAAO,MAAM,gBAAgB;oCAv0BK,IAAI;wBAChB,IAAI;CAs0BiB,CAAC;AAC5C,eAAO,MAAM,oBAAoB;oCAx0BC,IAAI;wBAChB,IAAI;CAu0BqB,CAAC;AAChD,eAAO,MAAM,gBAAgB;oCAz0BK,IAAI;wBAChB,IAAI;CAw0BiB,CAAC;AAC5C,eAAO,MAAM,iBAAiB;oCA10BI,IAAI;wBAChB,IAAI;CAy0BkB,CAAC;AAC7C,eAAO,MAAM,iBAAiB;oCA30BI,IAAI;wBAChB,IAAI;CA00BkB,CAAC;AAC7C,eAAO,MAAM,eAAe;oCA50BM,IAAI;wBAChB,IAAI;CA20BgB,CAAC;AAC3C,eAAO,MAAM,wBAAwB;oCA70BH,IAAI;wBAChB,IAAI;CA40ByB,CAAC;AACpD,eAAO,MAAM,uBAAuB;oCA90BF,IAAI;wBAChB,IAAI;CA60BwB,CAAC;AACnD,eAAO,MAAM,kBAAkB;oCA/0BG,IAAI;wBAChB,IAAI;CA80BmB,CAAC;AAC9C,eAAO,MAAM,uBAAuB;oCAh1BF,IAAI;wBAChB,IAAI;CA+0BwB,CAAC;AACnD,eAAO,MAAM,sBAAsB;oCAj1BD,IAAI;wBAChB,IAAI;CAg1BuB,CAAC"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Task Agent Route Handlers
3
+ *
4
+ * Handles routes for ACP-based task-agent management:
5
+ * - Preflight checks, metrics, workspace files
6
+ * - Approval presets and config
7
+ * - Agent CRUD: list, spawn, get, send, stop, output
8
+ *
9
+ * @module api/agent-routes
10
+ */
11
+ import type { IncomingMessage, ServerResponse } from "node:http";
12
+ import type { RouteContext } from "./route-utils.js";
13
+ /**
14
+ * Handle task-agent routes (/api/coding-agents/*)
15
+ * Returns true if the route was handled, false otherwise
16
+ */
17
+ export declare function handleAgentRoutes(req: IncomingMessage, res: ServerResponse, pathname: string, ctx: RouteContext): Promise<boolean>;
18
+ //# sourceMappingURL=agent-routes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-routes.d.ts","sourceRoot":"","sources":["../../../../src/api/agent-routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAcjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAkNrD;;;GAGG;AACH,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,eAAe,EACpB,GAAG,EAAE,cAAc,EACnB,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,YAAY,GAChB,OAAO,CAAC,OAAO,CAAC,CAwkBlB"}
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Sub-agent credential bridge — additive credential endpoints.
3
+ *
4
+ * These routes complement the existing read-only parent-context bridge
5
+ * (`parent-context-routes.ts`) by giving a spawned coding sub-agent a way
6
+ * to *request* a missing credential from the parent. The parent collects
7
+ * the value from the owner via the standard REQUEST_SECRET sensitive-request
8
+ * flow (owner-only actor policy, DM or owner-app-inline target), encrypts
9
+ * it under a one-time symmetric key, and the child long-polls the GET
10
+ * endpoint with the bearer token it received at scope declaration.
11
+ *
12
+ * Endpoints (loopback-only):
13
+ *
14
+ * POST /api/coding-agents/:sessionId/credentials/request
15
+ * body: { credentialKeys: string[] }
16
+ * → { credentialScopeId, scopedToken, expiresAt, sensitiveRequestIds }
17
+ *
18
+ * GET /api/coding-agents/:sessionId/credentials/:key?token=<scopedToken>
19
+ * long-poll up to 5 minutes for the encrypted value, one-shot redemption.
20
+ * → { key, value, retrievedAt } // value plaintext, recovered by the
21
+ * // service's decrypt-on-retrieve
22
+ *
23
+ * The orchestrator wires this module via `routes.ts`. The implementation is
24
+ * decoupled from the credential-tunnel service: callers pass a small
25
+ * `BridgeCredentialAdapter` so the same routes can be wired against a
26
+ * test-time mock or the production `CredentialTunnelService`.
27
+ */
28
+ import type { IncomingMessage, ServerResponse } from "node:http";
29
+ import type { RouteContext } from "./route-utils.js";
30
+ /**
31
+ * Adapter surface the bridge routes need from the parent runtime. The
32
+ * concrete implementation lives in app-core (`CredentialTunnelService`) and
33
+ * is registered into the parent runtime out-of-band; the route layer never
34
+ * imports it directly.
35
+ */
36
+ export interface BridgeCredentialAdapter {
37
+ requestCredentials(input: {
38
+ childSessionId: string;
39
+ credentialKeys: readonly string[];
40
+ }): Promise<{
41
+ credentialScopeId: string;
42
+ scopedToken: string;
43
+ expiresAt: number;
44
+ sensitiveRequestIds: readonly string[];
45
+ }>;
46
+ tryRetrieveCredential(input: {
47
+ childSessionId: string;
48
+ key: string;
49
+ scopedToken: string;
50
+ }): Promise<{
51
+ status: "pending";
52
+ } | {
53
+ status: "ready";
54
+ value: string;
55
+ } | {
56
+ status: "expired";
57
+ } | {
58
+ status: "rejected";
59
+ reason: string;
60
+ }>;
61
+ }
62
+ /**
63
+ * Dispatcher for the credential bridge routes. Returns true when the path
64
+ * matches one of our patterns (whether or not the response is a success).
65
+ *
66
+ * `routes.ts` calls this after parent-context routes and before generic
67
+ * `:agentId` routes.
68
+ */
69
+ export declare function handleBridgeRoutes(req: IncomingMessage, res: ServerResponse, pathname: string, ctx: RouteContext): Promise<boolean>;
70
+ //# sourceMappingURL=bridge-routes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bridge-routes.d.ts","sourceRoot":"","sources":["../../../../src/api/bridge-routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAOjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AASrD;;;;;GAKG;AACH,MAAM,WAAW,uBAAuB;IACtC,kBAAkB,CAAC,KAAK,EAAE;QACxB,cAAc,EAAE,MAAM,CAAC;QACvB,cAAc,EAAE,SAAS,MAAM,EAAE,CAAC;KACnC,GAAG,OAAO,CAAC;QACV,iBAAiB,EAAE,MAAM,CAAC;QAC1B,WAAW,EAAE,MAAM,CAAC;QACpB,SAAS,EAAE,MAAM,CAAC;QAClB,mBAAmB,EAAE,SAAS,MAAM,EAAE,CAAC;KACxC,CAAC,CAAC;IACH,qBAAqB,CAAC,KAAK,EAAE;QAC3B,cAAc,EAAE,MAAM,CAAC;QACvB,GAAG,EAAE,MAAM,CAAC;QACZ,WAAW,EAAE,MAAM,CAAC;KACrB,GAAG,OAAO,CACP;QAAE,MAAM,EAAE,SAAS,CAAA;KAAE,GACrB;QAAE,MAAM,EAAE,OAAO,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAClC;QAAE,MAAM,EAAE,SAAS,CAAA;KAAE,GACrB;QAAE,MAAM,EAAE,UAAU,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CACzC,CAAC;CACH;AAwOD;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CACtC,GAAG,EAAE,eAAe,EACpB,GAAG,EAAE,cAAc,EACnB,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,YAAY,GAChB,OAAO,CAAC,OAAO,CAAC,CA0DlB"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * In-chat surfacing of a sub-agent credential request (#8907).
3
+ *
4
+ * The credential bridge (`bridge-routes.ts`) already fires the sensitive-request
5
+ * flow (REQUEST_SECRET → owner DM / owner-app), but nothing told the user *in
6
+ * the originating task thread* that a sub-agent is blocked waiting on a secret —
7
+ * on Telegram (no side panels) that is the blocking gap. This module posts a
8
+ * compact prompt to the origin room when a request opens, and a status
9
+ * follow-up when the long-poll resolves, so the user can act without leaving
10
+ * chat.
11
+ *
12
+ * Kept decoupled from the route layer: it only needs the runtime's optional
13
+ * `sendMessageToTarget` and the origin keys the orchestrator stamps on
14
+ * `session.metadata` at spawn time (`roomId`, `source`).
15
+ */
16
+ import type { IAgentRuntime } from "@elizaos/core";
17
+ /**
18
+ * Post a chat prompt to the origin room announcing the pending credential
19
+ * request. Returns true when a message was dispatched. Best-effort: a runtime
20
+ * without `sendMessageToTarget`, or a session with no origin room, is a no-op.
21
+ */
22
+ export declare function emitCredentialPrompt(input: {
23
+ runtime: IAgentRuntime;
24
+ metadata: Record<string, unknown> | undefined;
25
+ credentialKeys: readonly string[];
26
+ label?: string;
27
+ }): Promise<boolean>;
28
+ /**
29
+ * Post a follow-up once a requested credential has been delivered, so the user
30
+ * sees the task is unblocked. Best-effort, same no-op conditions as above.
31
+ */
32
+ export declare function emitCredentialResolved(input: {
33
+ runtime: IAgentRuntime;
34
+ metadata: Record<string, unknown> | undefined;
35
+ key: string;
36
+ label?: string;
37
+ }): Promise<boolean>;
38
+ //# sourceMappingURL=credential-prompt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credential-prompt.d.ts","sourceRoot":"","sources":["../../../../src/api/credential-prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAW,aAAa,EAAQ,MAAM,eAAe,CAAC;AA4ClE;;;;GAIG;AACH,wBAAsB,oBAAoB,CAAC,KAAK,EAAE;IAChD,OAAO,EAAE,aAAa,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;IAC9C,cAAc,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,OAAO,CAAC,OAAO,CAAC,CAiCnB;AAED;;;GAGG;AACH,wBAAsB,sBAAsB,CAAC,KAAK,EAAE;IAClD,OAAO,EAAE,aAAa,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;IAC9C,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,OAAO,CAAC,OAAO,CAAC,CAuBnB"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Issue Route Handlers
3
+ *
4
+ * Handles routes for GitHub issue management:
5
+ * - List issues, create issue
6
+ * - Get issue, comment on issue, close issue
7
+ *
8
+ * @module api/issue-routes
9
+ */
10
+ import type { IncomingMessage, ServerResponse } from "node:http";
11
+ import type { RouteContext } from "./route-utils.js";
12
+ /**
13
+ * Handle issue routes (/api/issues/*)
14
+ * Returns true if the route was handled, false otherwise
15
+ */
16
+ export declare function handleIssueRoutes(req: IncomingMessage, res: ServerResponse, pathname: string, ctx: RouteContext): Promise<boolean>;
17
+ //# sourceMappingURL=issue-routes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"issue-routes.d.ts","sourceRoot":"","sources":["../../../../src/api/issue-routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGrD;;;GAGG;AACH,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,eAAe,EACpB,GAAG,EAAE,cAAc,EACnB,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,YAAY,GAChB,OAAO,CAAC,OAAO,CAAC,CA+JlB"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Orchestrator Task Route Handlers
3
+ *
4
+ * Mounts the durable task surface under `/api/orchestrator/*`:
5
+ * aggregate status, task CRUD, lifecycle (pause/resume/archive/reopen/fork/
6
+ * validate/delete), room messages, event log, usage rollup, and sub-agent
7
+ * add/stop. All orchestration logic lives in {@link OrchestratorTaskService};
8
+ * these handlers validate input at the boundary and forward to the service.
9
+ *
10
+ * @module api/orchestrator-routes
11
+ */
12
+ import type { IncomingMessage, ServerResponse } from "node:http";
13
+ import type { RouteContext } from "./route-utils.js";
14
+ /**
15
+ * Handle `/api/orchestrator/*` routes. Returns true when the path was matched
16
+ * (whether it succeeded or errored), false to let the dispatcher continue.
17
+ */
18
+ /**
19
+ * Single error boundary for every orchestrator endpoint. A thrown service call
20
+ * (DB / file / session failure) becomes a 500 instead of an unhandled promise
21
+ * rejection that leaves the request hanging forever. Paths outside the
22
+ * orchestrator prefix return false (not handled) untouched.
23
+ */
24
+ export declare function handleOrchestratorRoutes(req: IncomingMessage, res: ServerResponse, pathname: string, ctx: RouteContext): Promise<boolean>;
25
+ //# sourceMappingURL=orchestrator-routes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"orchestrator-routes.d.ts","sourceRoot":"","sources":["../../../../src/api/orchestrator-routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAkBjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAqHrD;;;GAGG;AACH;;;;;GAKG;AACH,wBAAsB,wBAAwB,CAC5C,GAAG,EAAE,eAAe,EACpB,GAAG,EAAE,cAAc,EACnB,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,YAAY,GAChB,OAAO,CAAC,OAAO,CAAC,CAalB"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Read-only parent-runtime context bridge for spawned task agents.
3
+ *
4
+ * Child CLI agents receive their session id in the injected memory file. These
5
+ * routes let that child read narrowly-scoped parent state without exposing any
6
+ * mutation surface back into the parent runtime.
7
+ *
8
+ * @module api/parent-context-routes
9
+ */
10
+ import type { IncomingMessage, ServerResponse } from "node:http";
11
+ import type { RouteContext } from "./route-utils.js";
12
+ /**
13
+ * Handle read-only parent-runtime bridge routes.
14
+ * Returns true if the route was handled, false otherwise.
15
+ */
16
+ export declare function handleParentContextRoutes(req: IncomingMessage, res: ServerResponse, pathname: string, ctx: RouteContext): Promise<boolean>;
17
+ //# sourceMappingURL=parent-context-routes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parent-context-routes.d.ts","sourceRoot":"","sources":["../../../../src/api/parent-context-routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAKjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AA+TrD;;;GAGG;AACH,wBAAsB,yBAAyB,CAC7C,GAAG,EAAE,eAAe,EACpB,GAAG,EAAE,cAAc,EACnB,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,YAAY,GAChB,OAAO,CAAC,OAAO,CAAC,CA8FlB"}
@@ -0,0 +1,34 @@
1
+ import type { IncomingMessage, ServerResponse } from "node:http";
2
+ import type { IAgentRuntime } from "@elizaos/core";
3
+ import type { AcpActionService } from "../actions/common.js";
4
+ import type { CodingWorkspaceService } from "../services/workspace-service.js";
5
+ export interface RouteContext {
6
+ runtime: IAgentRuntime;
7
+ acpService: AcpActionService | null;
8
+ workspaceService: CodingWorkspaceService | null;
9
+ }
10
+ /**
11
+ * Parse the JSON request body.
12
+ *
13
+ * The elizaOS runtime route dispatcher parses JSON bodies and attaches the
14
+ * result to `req.body` before invoking `rawPath` handlers (see
15
+ * `@elizaos/core` `readJsonBody`), draining the request stream in the process.
16
+ * Re-reading that already-ended stream would hang forever, so we return the
17
+ * pre-parsed body when present and only fall back to reading the stream for
18
+ * direct callers (e.g. unit tests) that pass an unconsumed request.
19
+ */
20
+ export declare function parseBody(req: IncomingMessage): Promise<Record<string, unknown>>;
21
+ export declare function sendJson(res: ServerResponse, data: unknown, status?: number): void;
22
+ export declare function sendError(res: ServerResponse, message: string, status?: number): void;
23
+ /**
24
+ * Send a 503 that honestly reports the backing service is still initializing,
25
+ * with a quiet-backoff signal for polling clients. This is NOT an empty-data
26
+ * fallback — the request genuinely cannot be served yet, so the status stays
27
+ * 503/unavailable. The `Retry-After` header (HTTP spec: integer seconds) plus
28
+ * the machine-readable `{ status: "initializing", retryAfterMs }` body let the
29
+ * dashboard back off instead of hammering the endpoint during the startup
30
+ * window. Callers pass the same human-readable message they would give
31
+ * `sendError(..., 503)`.
32
+ */
33
+ export declare function sendServiceUnavailable(res: ServerResponse, message: string, retryAfterMs?: number): void;
34
+ //# sourceMappingURL=route-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"route-utils.d.ts","sourceRoot":"","sources":["../../../../src/api/route-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAE/E,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,aAAa,CAAC;IACvB,UAAU,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACpC,gBAAgB,EAAE,sBAAsB,GAAG,IAAI,CAAC;CACjD;AAKD;;;;;;;;;GASG;AACH,wBAAsB,SAAS,CAC7B,GAAG,EAAE,eAAe,GACnB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CA8BlC;AAGD,wBAAgB,QAAQ,CACtB,GAAG,EAAE,cAAc,EACnB,IAAI,EAAE,OAAO,EACb,MAAM,SAAM,GACX,IAAI,CAGN;AAGD,wBAAgB,SAAS,CACvB,GAAG,EAAE,cAAc,EACnB,OAAO,EAAE,MAAM,EACf,MAAM,SAAM,GACX,IAAI,CAEN;AAYD;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,cAAc,EACnB,OAAO,EAAE,MAAM,EACf,YAAY,SAAsC,GACjD,IAAI,CASN"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Task Agent API Routes — Dispatcher
3
+ *
4
+ * Provides shared helpers (parseBody, sendJson, sendError), types, and the
5
+ * top-level route dispatcher that delegates to domain-specific route modules.
6
+ *
7
+ * @module api/routes
8
+ */
9
+ import type { IncomingMessage, ServerResponse } from "node:http";
10
+ import type { IAgentRuntime } from "@elizaos/core";
11
+ import type { RouteContext } from "./route-utils.js";
12
+ /**
13
+ * Handle task-agent routes
14
+ * Returns true if the route was handled, false otherwise
15
+ */
16
+ export declare function handleCodingAgentRoutes(req: IncomingMessage, res: ServerResponse, pathname: string, ctx: RouteContext): Promise<boolean>;
17
+ /**
18
+ * Create route handler with services from runtime
19
+ */
20
+ export declare function createCodingAgentRouteHandler(runtime: IAgentRuntime): (req: IncomingMessage, res: ServerResponse, pathname: string) => Promise<boolean>;
21
+ export declare const createTaskAgentRouteHandler: typeof createCodingAgentRouteHandler;
22
+ //# sourceMappingURL=routes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../../src/api/routes.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAQnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGrD;;;GAGG;AACH,wBAAsB,uBAAuB,CAC3C,GAAG,EAAE,eAAe,EACpB,GAAG,EAAE,cAAc,EACnB,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,YAAY,GAChB,OAAO,CAAC,OAAO,CAAC,CA8BlB;AAED;;GAEG;AACH,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,aAAa,IAC1D,KAAK,eAAe,EAAE,KAAK,cAAc,EAAE,UAAU,MAAM,sBAQpE;AAED,eAAO,MAAM,2BAA2B,sCAAgC,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Workspace Route Handlers
3
+ *
4
+ * Handles routes for git workspace management:
5
+ * - Provision (clone repos, create worktrees)
6
+ * - Get status, commit, push, create PR, delete
7
+ *
8
+ * @module api/workspace-routes
9
+ */
10
+ import type { IncomingMessage, ServerResponse } from "node:http";
11
+ import type { RouteContext } from "./route-utils.js";
12
+ /**
13
+ * Handle workspace routes (/api/workspace/*)
14
+ * Returns true if the route was handled, false otherwise
15
+ */
16
+ export declare function handleWorkspaceRoutes(req: IncomingMessage, res: ServerResponse, pathname: string, ctx: RouteContext): Promise<boolean>;
17
+ //# sourceMappingURL=workspace-routes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace-routes.d.ts","sourceRoot":"","sources":["../../../../src/api/workspace-routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGrD;;;GAGG;AACH,wBAAsB,qBAAqB,CACzC,GAAG,EAAE,eAAe,EACpB,GAAG,EAAE,cAAc,EACnB,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,YAAY,GAChB,OAAO,CAAC,OAAO,CAAC,CAkLlB"}
@@ -0,0 +1,3 @@
1
+ import { type ResponseHandlerEvaluator } from "@elizaos/core";
2
+ export declare const subAgentCompletionResponseEvaluator: ResponseHandlerEvaluator;
3
+ //# sourceMappingURL=sub-agent-completion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sub-agent-completion.d.ts","sourceRoot":"","sources":["../../../../src/evaluators/sub-agent-completion.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,wBAAwB,EAE9B,MAAM,eAAe,CAAC;AAmevB,eAAO,MAAM,mCAAmC,EAAE,wBAsOjD,CAAC"}