@elizaos/plugin-agent-orchestrator 2.0.0-alpha.5 → 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 +19823 -3387
- 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 -43
- 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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task-validation.d.ts","sourceRoot":"","sources":["../../src/services/task-validation.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,uBAAuB,EACvB,WAAW,EACZ,MAAM,wBAAwB,CAAC;AAIhC,KAAK,iBAAiB,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,CAAC;AAiBxD,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,iBAAiB,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,KAAK,CAAC;QACf,YAAY,EAAE,MAAM,CAAC;QACrB,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACrB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACpB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACzB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACpC,CAAC,CAAC;CACJ;AAED,MAAM,WAAW,2BAA2B;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,WAAW,CAAC;IACrB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;CACpB;AAmSD;;;;;;;;;GASG;AACH,UAAU,iBAAiB;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,iFAAiF;IACjF,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,wEAAwE;IACxE,SAAS,EAAE,MAAM,CAAC;IAClB,sDAAsD;IACtD,SAAS,EAAE,OAAO,CAAC;IACnB,qFAAqF;IACrF,SAAS,EAAE,MAAM,CAAC;IAClB,kFAAkF;IAClF,WAAW,EAAE,MAAM,CAAC;IACpB,uEAAuE;IACvE,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,eAAO,MAAM,6BAA6B,MAAM,CAAC;AACjD,eAAO,MAAM,4BAA4B,IAAI,CAAC;AAI9C,eAAO,MAAM,2BAA2B,OAAQ,CAAC;AAiBjD;;;;;;;;;;;;;GAaG;AACH,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GACjC,OAAO,CAAC,iBAAiB,CAAC,CAuI5B;AAyJD,wBAAsB,sBAAsB,CAC1C,GAAG,EAAE,uBAAuB,EAC5B,KAAK,EAAE,2BAA2B,GACjC,OAAO,CAAC,oBAAoB,CAAC,CA+I/B"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type IAgentRuntime } from "@elizaos/core";
|
|
2
|
+
import type { TaskNodeRecord, TaskRegistry } from "./task-registry.js";
|
|
3
|
+
export declare function runReadyTaskVerifiers(runtime: IAgentRuntime, taskRegistry: TaskRegistry, threadId: string): Promise<void>;
|
|
4
|
+
export declare function isTerminalTaskNodeStatus(status: TaskNodeRecord["status"]): boolean;
|
|
5
|
+
//# sourceMappingURL=task-verifier-runner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task-verifier-runner.d.ts","sourceRoot":"","sources":["../../src/services/task-verifier-runner.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,aAAa,EAAa,MAAM,eAAe,CAAC;AAC9D,OAAO,KAAK,EACV,cAAc,EACd,YAAY,EAGb,MAAM,oBAAoB,CAAC;AAmY5B,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,aAAa,EACtB,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,CAAC,CAkFf;AAED,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,cAAc,CAAC,QAAQ,CAAC,GAC/B,OAAO,CAET"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Trajectory Context — Tag orchestrator LLM calls for trajectory logging.
|
|
3
|
+
*
|
|
4
|
+
* Sets a lightweight context object on the runtime before `useModel()` calls
|
|
5
|
+
* so the trajectory logger can identify orchestrator-specific LLM invocations
|
|
6
|
+
* (coordination decisions, stall classification, idle checks, etc.) and tag
|
|
7
|
+
* them with meaningful metadata instead of the generic "action" / "runtime.useModel".
|
|
8
|
+
*
|
|
9
|
+
* The eliza trajectory-persistence layer reads `runtime.__orchestratorTrajectoryCtx`
|
|
10
|
+
* in its `appendLlmCall` patch and writes the context into the trajectory record.
|
|
11
|
+
*
|
|
12
|
+
* @module services/trajectory-context
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Any runtime-like object. We accept both `AgentRuntime` and `IAgentRuntime`
|
|
16
|
+
* since different call sites use different types. Using a minimal interface
|
|
17
|
+
* avoids index-signature incompatibilities with ElizaOS types.
|
|
18
|
+
*/
|
|
19
|
+
type RuntimeLike = object;
|
|
20
|
+
/**
|
|
21
|
+
* Orchestrator decision types that map to specific LLM call sites.
|
|
22
|
+
*/
|
|
23
|
+
export type OrchestratorDecisionType = "coordination" | "turn-complete" | "idle-check" | "stall-classification" | "stall-classify-decide" | "swarm-context-generation" | "event-triage" | "launch-failure-message" | "task-validation" | "acceptance-verifier";
|
|
24
|
+
export interface OrchestratorTrajectoryContext {
|
|
25
|
+
/** Source identifier — always "orchestrator" */
|
|
26
|
+
source: "orchestrator";
|
|
27
|
+
/** Which decision type triggered this LLM call */
|
|
28
|
+
decisionType: OrchestratorDecisionType;
|
|
29
|
+
/** PTY session ID of the agent being evaluated */
|
|
30
|
+
sessionId?: string;
|
|
31
|
+
/** Durable task thread identifier */
|
|
32
|
+
threadId?: string;
|
|
33
|
+
/** Acceptance verifier job identifier */
|
|
34
|
+
verifierJobId?: string;
|
|
35
|
+
/** Human-readable task label */
|
|
36
|
+
taskLabel?: string;
|
|
37
|
+
/** Repository URL or identifier (for trajectory feedback filtering) */
|
|
38
|
+
repo?: string;
|
|
39
|
+
/** Workspace directory path */
|
|
40
|
+
workdir?: string;
|
|
41
|
+
/** Original task description assigned to the agent */
|
|
42
|
+
originalTask?: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Set orchestrator trajectory context on the runtime.
|
|
46
|
+
* Call this before `runtime.useModel()` and clear it after.
|
|
47
|
+
*/
|
|
48
|
+
export declare function setTrajectoryContext(runtime: RuntimeLike, ctx: OrchestratorTrajectoryContext): void;
|
|
49
|
+
/**
|
|
50
|
+
* Clear orchestrator trajectory context from the runtime.
|
|
51
|
+
*/
|
|
52
|
+
export declare function clearTrajectoryContext(runtime: RuntimeLike): void;
|
|
53
|
+
/**
|
|
54
|
+
* Read the current orchestrator trajectory context (if any).
|
|
55
|
+
* Used by the trajectory logger on the eliza side.
|
|
56
|
+
*/
|
|
57
|
+
export declare function readTrajectoryContext(runtime: unknown): OrchestratorTrajectoryContext | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* Wrap a `useModel()` call with trajectory context tagging.
|
|
60
|
+
* Ensures the context is always cleared, even if the call throws.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```ts
|
|
64
|
+
* const result = await withTrajectoryContext(
|
|
65
|
+
* ctx.runtime,
|
|
66
|
+
* { source: "orchestrator", decisionType: "coordination", sessionId },
|
|
67
|
+
* () => ctx.runtime.useModel(ModelType.TEXT_SMALL, { prompt }),
|
|
68
|
+
* );
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
export declare function withTrajectoryContext<T>(runtime: RuntimeLike, ctx: OrchestratorTrajectoryContext, fn: () => Promise<T>): Promise<T>;
|
|
72
|
+
export {};
|
|
73
|
+
//# sourceMappingURL=trajectory-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trajectory-context.d.ts","sourceRoot":"","sources":["../../src/services/trajectory-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH;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ajectory Feedback — Past Experience Injection
|
|
3
|
+
*
|
|
4
|
+
* Queries the trajectory database for past orchestrator decisions and
|
|
5
|
+
* formats relevant experience as agent memory context. This closes the
|
|
6
|
+
* loop between trajectory *output* (logging decisions) and trajectory
|
|
7
|
+
* *input* (feeding experience back to agents at spawn time).
|
|
8
|
+
*
|
|
9
|
+
* Inspired by "Codified Context" (arXiv:2602.20478) — known failure
|
|
10
|
+
* modes and past decisions are pre-loaded into agent context so they
|
|
11
|
+
* don't repeat mistakes or re-derive solutions.
|
|
12
|
+
*
|
|
13
|
+
* @module services/trajectory-feedback
|
|
14
|
+
*/
|
|
15
|
+
import { type IAgentRuntime } from "@elizaos/core";
|
|
16
|
+
/** A distilled experience entry from a past trajectory. */
|
|
17
|
+
interface PastExperience {
|
|
18
|
+
/** When this experience was recorded */
|
|
19
|
+
timestamp: number;
|
|
20
|
+
/** The orchestrator decision type (coordination, turn-complete, etc.) */
|
|
21
|
+
decisionType: string;
|
|
22
|
+
/** Agent label that produced this experience */
|
|
23
|
+
taskLabel: string;
|
|
24
|
+
/** The key insight or decision (extracted from LLM response) */
|
|
25
|
+
insight: string;
|
|
26
|
+
}
|
|
27
|
+
/** Options for querying past experience. */
|
|
28
|
+
export interface TrajectoryFeedbackOptions {
|
|
29
|
+
/** Maximum number of recent trajectories to scan (default: 30) */
|
|
30
|
+
maxTrajectories?: number;
|
|
31
|
+
/** Maximum number of experience entries to return (default: 8) */
|
|
32
|
+
maxEntries?: number;
|
|
33
|
+
/** Only include trajectories from the last N hours (default: 48) */
|
|
34
|
+
lookbackHours?: number;
|
|
35
|
+
/** Task description for relevance filtering */
|
|
36
|
+
taskDescription?: string;
|
|
37
|
+
/** Repository URL — only return experience from the same repo */
|
|
38
|
+
repo?: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Query the trajectory database for past orchestrator decisions and
|
|
42
|
+
* return distilled experience entries relevant to the current task.
|
|
43
|
+
*/
|
|
44
|
+
export declare function queryPastExperience(runtime: IAgentRuntime, options?: TrajectoryFeedbackOptions): Promise<PastExperience[]>;
|
|
45
|
+
/**
|
|
46
|
+
* Format past experience entries as a markdown section suitable for
|
|
47
|
+
* injection into agent memory (CLAUDE.md / GEMINI.md).
|
|
48
|
+
*
|
|
49
|
+
* Returns empty string if no relevant experience is found.
|
|
50
|
+
*/
|
|
51
|
+
export declare function formatPastExperience(experiences: PastExperience[]): string;
|
|
52
|
+
export {};
|
|
53
|
+
//# sourceMappingURL=trajectory-feedback.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trajectory-feedback.d.ts","sourceRoot":"","sources":["../../src/services/trajectory-feedback.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAyB,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAoB1E,2DAA2D;AAC3D,UAAU,cAAc;IACtB,wCAAwC;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,yEAAyE;IACzE,YAAY,EAAE,MAAM,CAAC;IACrB,gDAAgD;IAChD,SAAS,EAAE,MAAM,CAAC;IAClB,gEAAgE;IAChE,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,4CAA4C;AAC5C,MAAM,WAAW,yBAAyB;IACxC,kEAAkE;IAClE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,kEAAkE;IAClE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oEAAoE;IACpE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,+CAA+C;IAC/C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iEAAiE;IACjE,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAuJD;;;GAGG;AACH,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,aAAa,EACtB,OAAO,GAAE,yBAA8B,GACtC,OAAO,CAAC,cAAc,EAAE,CAAC,CA0J3B;AAID;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,cAAc,EAAE,GAAG,MAAM,CAe1E"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Git operations for Coding Workspace Service
|
|
3
|
+
*
|
|
4
|
+
* Extracted from workspace-service.ts — provides git status, commit, push,
|
|
5
|
+
* and PR creation as standalone functions operating on workspace paths.
|
|
6
|
+
*
|
|
7
|
+
* @module services/workspace-git-ops
|
|
8
|
+
*/
|
|
9
|
+
import type { PullRequestInfo, WorkspaceService } from "git-workspace-service";
|
|
10
|
+
import type { CommitOptions, PROptions, PushOptions, WorkspaceResult, WorkspaceStatusResult } from "./workspace-service.js";
|
|
11
|
+
/**
|
|
12
|
+
* Get workspace git status (branch, staged/modified/untracked files).
|
|
13
|
+
*/
|
|
14
|
+
export declare function getStatus(workspacePath: string): Promise<WorkspaceStatusResult>;
|
|
15
|
+
/**
|
|
16
|
+
* Commit changes in a workspace directory.
|
|
17
|
+
* Returns the commit hash.
|
|
18
|
+
*/
|
|
19
|
+
export declare function commit(workspacePath: string, options: CommitOptions, log: (msg: string) => void): Promise<string>;
|
|
20
|
+
/**
|
|
21
|
+
* Push changes to remote for a workspace.
|
|
22
|
+
*/
|
|
23
|
+
export declare function push(workspacePath: string, branch: string, options: PushOptions | undefined, log: (msg: string) => void): Promise<void>;
|
|
24
|
+
/**
|
|
25
|
+
* Create a pull request for a workspace via the underlying WorkspaceService.
|
|
26
|
+
*/
|
|
27
|
+
export declare function createPR(workspaceService: WorkspaceService, workspace: WorkspaceResult, workspaceId: string, options: PROptions, log: (msg: string) => void): Promise<PullRequestInfo>;
|
|
28
|
+
//# sourceMappingURL=workspace-git-ops.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace-git-ops.d.ts","sourceRoot":"","sources":["../../src/services/workspace-git-ops.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACV,eAAe,EAEf,gBAAgB,EACjB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EACV,aAAa,EACb,SAAS,EACT,WAAW,EACX,eAAe,EACf,qBAAqB,EACtB,MAAM,wBAAwB,CAAC;AAEhC;;GAEG;AACH,wBAAsB,SAAS,CAC7B,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,qBAAqB,CAAC,CAuChC;AAED;;;GAGG;AACH,wBAAsB,MAAM,CAC1B,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,aAAa,EACtB,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,GACzB,OAAO,CAAC,MAAM,CAAC,CAkBjB;AAED;;GAEG;AACH,wBAAsB,IAAI,CACxB,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,WAAW,GAAG,SAAS,EAChC,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,GACzB,OAAO,CAAC,IAAI,CAAC,CAaf;AAED;;GAEG;AACH,wBAAsB,QAAQ,CAC5B,gBAAgB,EAAE,gBAAgB,EAClC,SAAS,EAAE,eAAe,EAC1B,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,SAAS,EAClB,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,GACzB,OAAO,CAAC,eAAe,CAAC,CAsB1B"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitHub integration for Coding Workspace Service
|
|
3
|
+
*
|
|
4
|
+
* Extracted from workspace-service.ts — provides GitHub API access
|
|
5
|
+
* via PAT or OAuth device flow, plus all issue management operations.
|
|
6
|
+
*
|
|
7
|
+
* @module services/workspace-github
|
|
8
|
+
*/
|
|
9
|
+
import type { IAgentRuntime } from "@elizaos/core";
|
|
10
|
+
import { type CreateIssueOptions, GitHubPatClient, type IssueComment, type IssueInfo, type IssueState } from "git-workspace-service";
|
|
11
|
+
/**
|
|
12
|
+
* Callback for surfacing auth prompts to the user.
|
|
13
|
+
* Returns true only when the prompt was delivered through an immediate
|
|
14
|
+
* user-visible channel. Buffered action callbacks are unsafe here because the
|
|
15
|
+
* device flow blocks until the user sees and completes the prompt.
|
|
16
|
+
*/
|
|
17
|
+
export type AuthPromptCallback = (prompt: {
|
|
18
|
+
verificationUri: string;
|
|
19
|
+
userCode: string;
|
|
20
|
+
expiresIn: number;
|
|
21
|
+
}) => boolean | Promise<boolean>;
|
|
22
|
+
/**
|
|
23
|
+
* Context object passed by CodingWorkspaceService into every GitHub function.
|
|
24
|
+
* Lets us keep the extracted functions stateless while still mutating shared state.
|
|
25
|
+
*/
|
|
26
|
+
export interface GitHubContext {
|
|
27
|
+
runtime: IAgentRuntime;
|
|
28
|
+
githubClient: GitHubPatClient | null;
|
|
29
|
+
setGithubClient: (client: GitHubPatClient) => void;
|
|
30
|
+
githubAuthInProgress: Promise<GitHubPatClient> | null;
|
|
31
|
+
setGithubAuthInProgress: (p: Promise<GitHubPatClient> | null) => void;
|
|
32
|
+
authPromptCallback: AuthPromptCallback | null;
|
|
33
|
+
log: (msg: string) => void;
|
|
34
|
+
}
|
|
35
|
+
export declare function parseOwnerRepo(repo: string): {
|
|
36
|
+
owner: string;
|
|
37
|
+
repo: string;
|
|
38
|
+
};
|
|
39
|
+
export declare function ensureGitHubClient(ctx: GitHubContext): Promise<GitHubPatClient>;
|
|
40
|
+
export declare function performOAuthFlow(ctx: GitHubContext, clientId: string): Promise<GitHubPatClient>;
|
|
41
|
+
export declare function createIssue(ctx: GitHubContext, repo: string, options: CreateIssueOptions): Promise<IssueInfo>;
|
|
42
|
+
export declare function getIssue(ctx: GitHubContext, repo: string, issueNumber: number): Promise<IssueInfo>;
|
|
43
|
+
export declare function listIssues(ctx: GitHubContext, repo: string, options?: {
|
|
44
|
+
state?: IssueState | "all";
|
|
45
|
+
labels?: string[];
|
|
46
|
+
assignee?: string;
|
|
47
|
+
}): Promise<IssueInfo[]>;
|
|
48
|
+
export declare function updateIssue(ctx: GitHubContext, repo: string, issueNumber: number, options: {
|
|
49
|
+
title?: string;
|
|
50
|
+
body?: string;
|
|
51
|
+
state?: IssueState;
|
|
52
|
+
labels?: string[];
|
|
53
|
+
assignees?: string[];
|
|
54
|
+
}): Promise<IssueInfo>;
|
|
55
|
+
export declare function addComment(ctx: GitHubContext, repo: string, issueNumber: number, body: string): Promise<IssueComment>;
|
|
56
|
+
export declare function listComments(ctx: GitHubContext, repo: string, issueNumber: number): Promise<IssueComment[]>;
|
|
57
|
+
export declare function closeIssue(ctx: GitHubContext, repo: string, issueNumber: number): Promise<IssueInfo>;
|
|
58
|
+
export declare function reopenIssue(ctx: GitHubContext, repo: string, issueNumber: number): Promise<IssueInfo>;
|
|
59
|
+
export declare function addLabels(ctx: GitHubContext, repo: string, issueNumber: number, labels: string[]): Promise<void>;
|
|
60
|
+
//# sourceMappingURL=workspace-github.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace-github.d.ts","sourceRoot":"","sources":["../../src/services/workspace-github.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EACL,KAAK,kBAAkB,EACvB,eAAe,EACf,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,UAAU,EAEhB,MAAM,uBAAuB,CAAC;AAE/B;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,MAAM,EAAE;IACxC,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAEjC;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,aAAa,CAAC;IACvB,YAAY,EAAE,eAAe,GAAG,IAAI,CAAC;IACrC,eAAe,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;IACnD,oBAAoB,EAAE,OAAO,CAAC,eAAe,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,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB,GACA,OAAO,CAAC,SAAS,CAAC,CAIpB;AAED,wBAAsB,UAAU,CAC9B,GAAG,EAAE,aAAa,EAClB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,YAAY,CAAC,CAIvB;AAED,wBAAsB,YAAY,CAChC,GAAG,EAAE,aAAa,EAClB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,YAAY,EAAE,CAAC,CAIzB;AAED,wBAAsB,UAAU,CAC9B,GAAG,EAAE,aAAa,EAClB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,SAAS,CAAC,CAMpB;AAED,wBAAsB,WAAW,CAC/B,GAAG,EAAE,aAAa,EAClB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,SAAS,CAAC,CAIpB;AAED,wBAAsB,SAAS,CAC7B,GAAG,EAAE,aAAa,EAClB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,EAAE,GACf,OAAO,CAAC,IAAI,CAAC,CAIf"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workspace lifecycle utilities — garbage collection and scratch directory cleanup.
|
|
3
|
+
*
|
|
4
|
+
* Extracted from workspace-service.ts to reduce module size.
|
|
5
|
+
*
|
|
6
|
+
* @module services/workspace-lifecycle
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Remove a scratch directory (non-git workspace used for ad-hoc tasks).
|
|
10
|
+
* Safe to call for any path under the workspaces base dir.
|
|
11
|
+
*/
|
|
12
|
+
export declare function removeScratchDir(dirPath: string, baseDir: string, log: (msg: string) => void, allowedDirs?: string[]): Promise<void>;
|
|
13
|
+
/**
|
|
14
|
+
* Garbage-collect orphaned workspace directories.
|
|
15
|
+
* Removes directories older than the given TTL that aren't tracked by the current session.
|
|
16
|
+
*/
|
|
17
|
+
export declare function gcOrphanedWorkspaces(baseDir: string, workspaceTtlMs: number, trackedWorkspaceIds: Set<string>, log: (msg: string) => void): Promise<void>;
|
|
18
|
+
//# sourceMappingURL=workspace-lifecycle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace-lifecycle.d.ts","sourceRoot":"","sources":["../../src/services/workspace-lifecycle.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH;;;GAGG;AACH,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,EAC1B,WAAW,CAAC,EAAE,MAAM,EAAE,GACrB,OAAO,CAAC,IAAI,CAAC,CA8Bf;AAED;;;GAGG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,MAAM,EACf,cAAc,EAAE,MAAM,EACtB,mBAAmB,EAAE,GAAG,CAAC,MAAM,CAAC,EAChC,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,GACzB,OAAO,CAAC,IAAI,CAAC,CAkDf"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Coding Workspace Service - Manages git workspaces for coding tasks
|
|
3
|
+
*
|
|
4
|
+
* Delegates to:
|
|
5
|
+
* - workspace-github.ts (issue management, OAuth, PAT auth)
|
|
6
|
+
* - workspace-git-ops.ts (status, commit, push, PR creation)
|
|
7
|
+
* - workspace-lifecycle.ts (GC, scratch dir cleanup)
|
|
8
|
+
* - workspace-types.ts (shared interface definitions)
|
|
9
|
+
*
|
|
10
|
+
* @module services/workspace-service
|
|
11
|
+
*/
|
|
12
|
+
import type { IAgentRuntime } from "@elizaos/core";
|
|
13
|
+
import { type CreateIssueOptions, type IssueComment, type IssueInfo, type IssueState, type PullRequestInfo, type WorkspaceEvent } from "git-workspace-service";
|
|
14
|
+
import type { AuthPromptCallback } from "./workspace-github.js";
|
|
15
|
+
export type { AuthPromptCallback } from "./workspace-github.js";
|
|
16
|
+
export type { CodingWorkspaceConfig, CommitOptions, PROptions, ProvisionWorkspaceOptions, PushOptions, WorkspaceResult, WorkspaceStatusResult, } from "./workspace-types.js";
|
|
17
|
+
import type { CodingWorkspaceConfig, CommitOptions, PROptions, ProvisionWorkspaceOptions, PushOptions, WorkspaceResult, WorkspaceStatusResult } from "./workspace-types.js";
|
|
18
|
+
type WorkspaceEventCallback = (event: WorkspaceEvent) => void;
|
|
19
|
+
type ScratchTerminalEvent = "stopped" | "task_complete" | "error";
|
|
20
|
+
export interface ScratchWorkspaceRecord {
|
|
21
|
+
sessionId: string;
|
|
22
|
+
label: string;
|
|
23
|
+
path: string;
|
|
24
|
+
status: "pending_decision" | "kept" | "promoted";
|
|
25
|
+
createdAt: number;
|
|
26
|
+
terminalAt: number;
|
|
27
|
+
terminalEvent: ScratchTerminalEvent;
|
|
28
|
+
expiresAt?: number;
|
|
29
|
+
}
|
|
30
|
+
export declare function resolveDefaultBranch(repoUrl: string): Promise<string>;
|
|
31
|
+
/** Test hook: drop the per-repo cache so each test starts clean. */
|
|
32
|
+
export declare function _clearDefaultBranchCache(): void;
|
|
33
|
+
export declare class CodingWorkspaceService {
|
|
34
|
+
static serviceType: string;
|
|
35
|
+
capabilityDescription: string;
|
|
36
|
+
private runtime;
|
|
37
|
+
private workspaceService;
|
|
38
|
+
private credentialService;
|
|
39
|
+
private githubClient;
|
|
40
|
+
private githubAuthInProgress;
|
|
41
|
+
private serviceConfig;
|
|
42
|
+
private workspaces;
|
|
43
|
+
private labels;
|
|
44
|
+
private scratchBySession;
|
|
45
|
+
private scratchCleanupTimers;
|
|
46
|
+
private eventCallbacks;
|
|
47
|
+
private authPromptCallback;
|
|
48
|
+
/** Callback fired when a scratch workspace enters pending_decision state. */
|
|
49
|
+
private scratchDecisionCallback;
|
|
50
|
+
constructor(runtime: IAgentRuntime, config?: CodingWorkspaceConfig);
|
|
51
|
+
static start(runtime: IAgentRuntime): Promise<CodingWorkspaceService>;
|
|
52
|
+
static stopRuntime(runtime: IAgentRuntime): Promise<void>;
|
|
53
|
+
private initialize;
|
|
54
|
+
stop(): Promise<void>;
|
|
55
|
+
/** Provision a new workspace */
|
|
56
|
+
provisionWorkspace(options: ProvisionWorkspaceOptions): Promise<WorkspaceResult>;
|
|
57
|
+
getWorkspace(id: string): WorkspaceResult | undefined;
|
|
58
|
+
listWorkspaces(): WorkspaceResult[];
|
|
59
|
+
/**
|
|
60
|
+
* Assign a semantic label to a workspace (e.g. "auth-bugfix").
|
|
61
|
+
* If the label already exists, it is reassigned to the new workspace.
|
|
62
|
+
*/
|
|
63
|
+
setLabel(workspaceId: string, label: string): void;
|
|
64
|
+
getWorkspaceByLabel(label: string): WorkspaceResult | undefined;
|
|
65
|
+
/** Resolve a workspace by label or ID. */
|
|
66
|
+
resolveWorkspace(labelOrId: string): WorkspaceResult | undefined;
|
|
67
|
+
getStatus(workspaceId: string): Promise<WorkspaceStatusResult>;
|
|
68
|
+
commit(workspaceId: string, options: CommitOptions): Promise<string>;
|
|
69
|
+
push(workspaceId: string, options?: PushOptions): Promise<void>;
|
|
70
|
+
createPR(workspaceId: string, options: PROptions): Promise<PullRequestInfo>;
|
|
71
|
+
private getGitHubContext;
|
|
72
|
+
/** Set a callback to surface OAuth auth prompts to the user. */
|
|
73
|
+
setAuthPromptCallback(callback: AuthPromptCallback): void;
|
|
74
|
+
/**
|
|
75
|
+
* Register a callback fired when a scratch workspace enters pending_decision.
|
|
76
|
+
* Used to prompt the user via chat: "Want to keep this code?"
|
|
77
|
+
*/
|
|
78
|
+
setScratchDecisionCallback(callback: (record: ScratchWorkspaceRecord) => Promise<void>): void;
|
|
79
|
+
createIssue(repo: string, options: CreateIssueOptions): Promise<IssueInfo>;
|
|
80
|
+
getIssue(repo: string, issueNumber: number): Promise<IssueInfo>;
|
|
81
|
+
listIssues(repo: string, options?: {
|
|
82
|
+
state?: IssueState | "all";
|
|
83
|
+
labels?: string[];
|
|
84
|
+
assignee?: string;
|
|
85
|
+
}): Promise<IssueInfo[]>;
|
|
86
|
+
updateIssue(repo: string, issueNumber: number, options: {
|
|
87
|
+
title?: string;
|
|
88
|
+
body?: string;
|
|
89
|
+
state?: IssueState;
|
|
90
|
+
labels?: string[];
|
|
91
|
+
assignees?: string[];
|
|
92
|
+
}): Promise<IssueInfo>;
|
|
93
|
+
addComment(repo: string, issueNumber: number, body: string): Promise<IssueComment>;
|
|
94
|
+
listComments(repo: string, issueNumber: number): Promise<IssueComment[]>;
|
|
95
|
+
closeIssue(repo: string, issueNumber: number): Promise<IssueInfo>;
|
|
96
|
+
reopenIssue(repo: string, issueNumber: number): Promise<IssueInfo>;
|
|
97
|
+
addLabels(repo: string, issueNumber: number, labels: string[]): Promise<void>;
|
|
98
|
+
removeWorkspace(workspaceId: string): Promise<void>;
|
|
99
|
+
onEvent(callback: WorkspaceEventCallback): () => void;
|
|
100
|
+
private emitEvent;
|
|
101
|
+
/** Remove a scratch directory — allowed under base dir or user coding directory. */
|
|
102
|
+
removeScratchDir(dirPath: string): Promise<void>;
|
|
103
|
+
listScratchWorkspaces(): ScratchWorkspaceRecord[];
|
|
104
|
+
registerScratchWorkspace(sessionId: string, dirPath: string, label: string, terminalEvent: ScratchTerminalEvent): Promise<ScratchWorkspaceRecord | null>;
|
|
105
|
+
keepScratchWorkspace(sessionId: string): Promise<ScratchWorkspaceRecord>;
|
|
106
|
+
deleteScratchWorkspace(sessionId: string): Promise<void>;
|
|
107
|
+
promoteScratchWorkspace(sessionId: string, name?: string): Promise<ScratchWorkspaceRecord>;
|
|
108
|
+
/** GC orphaned workspace directories older than workspaceTtlMs. */
|
|
109
|
+
private gcOrphanedWorkspaces;
|
|
110
|
+
private log;
|
|
111
|
+
/** Read a key from the config file's env section (live, no restart needed). */
|
|
112
|
+
private readConfigEnvKey;
|
|
113
|
+
private getScratchRetentionPolicy;
|
|
114
|
+
private getScratchDecisionTtlMs;
|
|
115
|
+
private requireScratchWorkspace;
|
|
116
|
+
private clearScratchCleanupTimer;
|
|
117
|
+
private scheduleScratchCleanup;
|
|
118
|
+
private sanitizeWorkspaceName;
|
|
119
|
+
private allocatePromotedPath;
|
|
120
|
+
}
|
|
121
|
+
//# sourceMappingURL=workspace-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace-service.d.ts","sourceRoot":"","sources":["../../src/services/workspace-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EACL,KAAK,kBAAkB,EAGvB,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,UAAU,EAEf,KAAK,eAAe,EAEpB,KAAK,cAAc,EAEpB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAchE,YAAY,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAehE,YAAY,EACV,qBAAqB,EACrB,aAAa,EACb,SAAS,EACT,yBAAyB,EACzB,WAAW,EACX,eAAe,EACf,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EACV,qBAAqB,EACrB,aAAa,EACb,SAAS,EACT,yBAAyB,EACzB,WAAW,EACX,eAAe,EACf,qBAAqB,EACtB,MAAM,sBAAsB,CAAC;AAE9B,KAAK,sBAAsB,GAAG,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;AAE9D,KAAK,oBAAoB,GAAG,SAAS,GAAG,eAAe,GAAG,OAAO,CAAC;AAElE,MAAM,WAAW,sBAAsB;IACrC,SAAS,E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jB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EACb,aAAa,EAAE,oBAAoB,GAClC,OAAO,CAAC,sBAAsB,GAAG,IAAI,CAAC;IAwDnC,oBAAoB,CACxB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,sBAAsB,CAAC;IAY5B,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAOxD,uBAAuB,CAC3B,SAAS,EAAE,MAAM,EACjB,IAAI,CAAC,EAAE,MAAM,GACZ,OAAO,CAAC,sBAAsB,CAAC;IA8BlC,mEAAmE;YACrD,oBAAoB;IASlC,OAAO,CAAC,GAAG;IAMX,+EAA+E;IAC/E,OAAO,CAAC,gBAAgB;IAIxB,OAAO,CAAC,yBAAyB;IAsBjC,OAAO,CAAC,uBAAuB;IAW/B,OAAO,CAAC,uBAAuB;IAQ/B,OAAO,CAAC,wBAAwB;IAQhC,OAAO,CAAC,sBAAsB;IAmB9B,OAAO,CAAC,qBAAqB;YASf,oBAAoB;CAsBnC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type definitions for the Coding Workspace Service.
|
|
3
|
+
*
|
|
4
|
+
* Extracted from workspace-service.ts to reduce module size.
|
|
5
|
+
*
|
|
6
|
+
* @module services/workspace-types
|
|
7
|
+
*/
|
|
8
|
+
import type { WorkspaceStatus } from "git-workspace-service";
|
|
9
|
+
export interface CodingWorkspaceConfig {
|
|
10
|
+
/** Base directory for workspaces (default: ~/.eliza/workspaces) */
|
|
11
|
+
baseDir?: string;
|
|
12
|
+
/** Branch prefix (default: "eliza") */
|
|
13
|
+
branchPrefix?: string;
|
|
14
|
+
/** Enable debug logging */
|
|
15
|
+
debug?: boolean;
|
|
16
|
+
/** Max age for orphaned workspace directories in ms (default: 24 hours). Set to 0 to disable GC. */
|
|
17
|
+
workspaceTtlMs?: number;
|
|
18
|
+
}
|
|
19
|
+
export interface ProvisionWorkspaceOptions {
|
|
20
|
+
/** Git repository URL */
|
|
21
|
+
repo: string;
|
|
22
|
+
/** Base branch to create from (default: "main") */
|
|
23
|
+
baseBranch?: string;
|
|
24
|
+
/** Exact branch name to use (overrides auto-generated name) */
|
|
25
|
+
branchName?: string;
|
|
26
|
+
/** Use worktree instead of clone */
|
|
27
|
+
useWorktree?: boolean;
|
|
28
|
+
/** Parent workspace ID for worktree */
|
|
29
|
+
parentWorkspaceId?: string;
|
|
30
|
+
/** Execution context */
|
|
31
|
+
execution?: {
|
|
32
|
+
id: string;
|
|
33
|
+
patternName: string;
|
|
34
|
+
};
|
|
35
|
+
/** Task context */
|
|
36
|
+
task?: {
|
|
37
|
+
id: string;
|
|
38
|
+
role: string;
|
|
39
|
+
slug?: string;
|
|
40
|
+
};
|
|
41
|
+
/** User-provided credentials */
|
|
42
|
+
userCredentials?: {
|
|
43
|
+
type: "pat" | "oauth" | "ssh";
|
|
44
|
+
token?: string;
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
export interface WorkspaceResult {
|
|
48
|
+
id: string;
|
|
49
|
+
path: string;
|
|
50
|
+
branch: string;
|
|
51
|
+
baseBranch: string;
|
|
52
|
+
isWorktree: boolean;
|
|
53
|
+
repo: string;
|
|
54
|
+
status: WorkspaceStatus;
|
|
55
|
+
/** Semantic label for referencing this workspace (e.g. "auth-bugfix", "api-tests") */
|
|
56
|
+
label?: string;
|
|
57
|
+
}
|
|
58
|
+
export interface CommitOptions {
|
|
59
|
+
message: string;
|
|
60
|
+
all?: boolean;
|
|
61
|
+
}
|
|
62
|
+
export interface PushOptions {
|
|
63
|
+
setUpstream?: boolean;
|
|
64
|
+
force?: boolean;
|
|
65
|
+
}
|
|
66
|
+
export interface PROptions {
|
|
67
|
+
title: string;
|
|
68
|
+
body: string;
|
|
69
|
+
base?: string;
|
|
70
|
+
draft?: boolean;
|
|
71
|
+
labels?: string[];
|
|
72
|
+
reviewers?: string[];
|
|
73
|
+
}
|
|
74
|
+
export interface WorkspaceStatusResult {
|
|
75
|
+
branch: string;
|
|
76
|
+
clean: boolean;
|
|
77
|
+
modified: string[];
|
|
78
|
+
staged: string[];
|
|
79
|
+
untracked: string[];
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=workspace-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace-types.d.ts","sourceRoot":"","sources":["../../src/services/workspace-types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,MAAM,WAAW,qBAAqB;IACpC,mEAAmE;IACnE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uCAAuC;IACvC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,2BAA2B;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,oGAAoG;IACpG,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,yBAAyB;IACxC,yBAAyB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,mDAAmD;IACnD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,+DAA+D;IAC/D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oCAAoC;IACpC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,uCAAuC;IACvC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,wBAAwB;IACxB,SAAS,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC;IAChD,mBAAmB;IACnB,IAAI,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACnD,gCAAgC;IAChC,eAAe,CAAC,EAAE;QAAE,IAAI,EAAE,KAAK,GAAG,OAAO,GAAG,KAAK,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACrE;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,eAAe,CAAC;IACxB,sFAAsF;IACtF,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,WAAW;IAC1B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB"}
|
package/package.json
CHANGED
|
@@ -1,26 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elizaos/plugin-agent-orchestrator",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
3
|
+
"version": "2.0.0-alpha.537",
|
|
4
|
+
"description": "Task-agent orchestration plugin - spawn and manage open-ended CLI task agents via PTY",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
8
8
|
"types": "dist/index.d.ts",
|
|
9
|
-
"packageType": "plugin",
|
|
10
|
-
"platform": "node",
|
|
11
|
-
"license": "MIT",
|
|
12
|
-
"keywords": [
|
|
13
|
-
"plugin",
|
|
14
|
-
"elizaos",
|
|
15
|
-
"orchestrator",
|
|
16
|
-
"agents",
|
|
17
|
-
"tasks",
|
|
18
|
-
"multi-agent"
|
|
19
|
-
],
|
|
20
|
-
"repository": {
|
|
21
|
-
"type": "git",
|
|
22
|
-
"url": "https://github.com/elizaos/eliza"
|
|
23
|
-
},
|
|
24
9
|
"exports": {
|
|
25
10
|
"./package.json": "./package.json",
|
|
26
11
|
".": {
|
|
@@ -31,43 +16,43 @@
|
|
|
31
16
|
}
|
|
32
17
|
},
|
|
33
18
|
"files": [
|
|
19
|
+
"assets",
|
|
34
20
|
"dist",
|
|
21
|
+
"scripts",
|
|
35
22
|
"README.md",
|
|
36
23
|
"package.json"
|
|
37
24
|
],
|
|
38
|
-
"
|
|
39
|
-
"
|
|
25
|
+
"scripts": {
|
|
26
|
+
"postinstall": "node ./scripts/ensure-node-pty.mjs",
|
|
27
|
+
"build": "bun run build.ts",
|
|
28
|
+
"test": "bun run build && bun run test:live",
|
|
29
|
+
"test:live": "ORCHESTRATOR_LIVE=1 vitest run --config ./vitest.config.ts",
|
|
30
|
+
"test:watch": "bun test --watch",
|
|
31
|
+
"typecheck": "tsc --noEmit",
|
|
32
|
+
"test:e2e": "bun run test:live"
|
|
40
33
|
},
|
|
41
34
|
"peerDependencies": {
|
|
42
|
-
"@elizaos/core": "2.0.0-alpha.
|
|
35
|
+
"@elizaos/core": "^2.0.0-alpha.537",
|
|
36
|
+
"git-workspace-service": "0.4.5",
|
|
37
|
+
"pty-manager": "1.11.0"
|
|
43
38
|
},
|
|
44
39
|
"devDependencies": {
|
|
45
|
-
"@
|
|
46
|
-
"
|
|
40
|
+
"@electric-sql/pglite": "^0.4.0",
|
|
41
|
+
"@elizaos/core": "^2.0.0-alpha.537",
|
|
42
|
+
"@types/node": "^25.2.3",
|
|
43
|
+
"bun-types": "latest",
|
|
44
|
+
"git-workspace-service": "0.4.5",
|
|
45
|
+
"pty-manager": "1.11.0",
|
|
46
|
+
"typescript": "^6.0.0"
|
|
47
47
|
},
|
|
48
|
-
"
|
|
49
|
-
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"lint:check": "bunx @biomejs/biome check .",
|
|
55
|
-
"build": "bun run build.ts",
|
|
56
|
-
"build:ts": "bun run build.ts",
|
|
57
|
-
"format": "bunx @biomejs/biome format --write .",
|
|
58
|
-
"format:check": "bunx @biomejs/biome format ."
|
|
48
|
+
"license": "MIT",
|
|
49
|
+
"dependencies": {
|
|
50
|
+
"coding-agent-adapters": "0.16.3",
|
|
51
|
+
"drizzle-orm": "^0.45.1",
|
|
52
|
+
"pty-console": "0.3.1",
|
|
53
|
+
"pty-state-capture": "0.2.0"
|
|
59
54
|
},
|
|
60
55
|
"publishConfig": {
|
|
61
56
|
"access": "public"
|
|
62
|
-
},
|
|
63
|
-
"agentConfig": {
|
|
64
|
-
"pluginParameters": {
|
|
65
|
-
"ORCHESTRATOR_ACTIVE_PROVIDER": {
|
|
66
|
-
"type": "string",
|
|
67
|
-
"description": "Provider selection",
|
|
68
|
-
"required": false,
|
|
69
|
-
"sensitive": false
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
57
|
}
|
|
73
58
|
}
|