@copilot-swarm/core 0.0.0

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 (58) hide show
  1. package/defaults/swarm.config.yaml +62 -0
  2. package/dist/config.d.ts +19 -0
  3. package/dist/config.d.ts.map +1 -0
  4. package/dist/config.js +124 -0
  5. package/dist/config.js.map +1 -0
  6. package/dist/constants.d.ts +22 -0
  7. package/dist/constants.d.ts.map +1 -0
  8. package/dist/constants.js +32 -0
  9. package/dist/constants.js.map +1 -0
  10. package/dist/index.d.ts +3 -0
  11. package/dist/index.d.ts.map +1 -0
  12. package/dist/index.js +25 -0
  13. package/dist/index.js.map +1 -0
  14. package/dist/logger.d.ts +15 -0
  15. package/dist/logger.d.ts.map +1 -0
  16. package/dist/logger.js +36 -0
  17. package/dist/logger.js.map +1 -0
  18. package/dist/messages.d.ts +47 -0
  19. package/dist/messages.d.ts.map +1 -0
  20. package/dist/messages.js +57 -0
  21. package/dist/messages.js.map +1 -0
  22. package/dist/orchestrator.d.ts +14 -0
  23. package/dist/orchestrator.d.ts.map +1 -0
  24. package/dist/orchestrator.js +19 -0
  25. package/dist/orchestrator.js.map +1 -0
  26. package/dist/pipeline-config.d.ts +8 -0
  27. package/dist/pipeline-config.d.ts.map +1 -0
  28. package/dist/pipeline-config.js +230 -0
  29. package/dist/pipeline-config.js.map +1 -0
  30. package/dist/pipeline-config.test.d.ts +2 -0
  31. package/dist/pipeline-config.test.d.ts.map +1 -0
  32. package/dist/pipeline-config.test.js +132 -0
  33. package/dist/pipeline-config.test.js.map +1 -0
  34. package/dist/pipeline-engine.d.ts +20 -0
  35. package/dist/pipeline-engine.d.ts.map +1 -0
  36. package/dist/pipeline-engine.js +230 -0
  37. package/dist/pipeline-engine.js.map +1 -0
  38. package/dist/pipeline-types.d.ts +67 -0
  39. package/dist/pipeline-types.d.ts.map +1 -0
  40. package/dist/pipeline-types.js +7 -0
  41. package/dist/pipeline-types.js.map +1 -0
  42. package/dist/planning-engine.d.ts +15 -0
  43. package/dist/planning-engine.d.ts.map +1 -0
  44. package/dist/planning-engine.js +129 -0
  45. package/dist/planning-engine.js.map +1 -0
  46. package/dist/session.d.ts +26 -0
  47. package/dist/session.d.ts.map +1 -0
  48. package/dist/session.js +110 -0
  49. package/dist/session.js.map +1 -0
  50. package/dist/utils.d.ts +12 -0
  51. package/dist/utils.d.ts.map +1 -0
  52. package/dist/utils.js +40 -0
  53. package/dist/utils.js.map +1 -0
  54. package/dist/utils.test.d.ts +2 -0
  55. package/dist/utils.test.d.ts.map +1 -0
  56. package/dist/utils.test.js +66 -0
  57. package/dist/utils.test.js.map +1 -0
  58. package/package.json +44 -0
@@ -0,0 +1,62 @@
1
+ # Default pipeline configuration for Copilot Swarm.
2
+ # This mirrors the hardcoded behavior — every consuming repo gets this
3
+ # pipeline unless it provides its own swarm.config.yaml.
4
+
5
+ primaryModel: claude-opus-4-6-fast
6
+ reviewModel: gpt-5.2-codex
7
+
8
+ agents:
9
+ pm: builtin:pm
10
+ pm-reviewer: builtin:pm-reviewer
11
+ spec-reviewer: builtin:eng-spec-reviewer
12
+ designer: builtin:designer
13
+ design-reviewer: builtin:design-reviewer
14
+ engineer: builtin:engineer
15
+ code-reviewer: builtin:eng-code-reviewer
16
+ tester: builtin:tester
17
+ cross-model: builtin:cross-model-reviewer
18
+
19
+ pipeline:
20
+ - phase: spec
21
+ agent: pm
22
+ reviews:
23
+ - agent: pm-reviewer
24
+ maxIterations: 3
25
+ approvalKeyword: APPROVED
26
+ - agent: spec-reviewer
27
+ maxIterations: 3
28
+ approvalKeyword: APPROVED
29
+
30
+ - phase: decompose
31
+ agent: pm
32
+ frontendMarker: "[FRONTEND]"
33
+
34
+ - phase: design
35
+ condition: hasFrontendTasks
36
+ agent: designer
37
+ clarificationAgent: pm
38
+ reviews:
39
+ - agent: design-reviewer
40
+ maxIterations: 3
41
+ approvalKeyword: APPROVED
42
+ clarificationKeyword: CLARIFICATION_NEEDED
43
+ clarificationAgent: pm
44
+
45
+ - phase: implement
46
+ parallel: true
47
+ agent: engineer
48
+ reviews:
49
+ - agent: code-reviewer
50
+ maxIterations: 3
51
+ approvalKeyword: APPROVED
52
+ qa:
53
+ agent: tester
54
+ maxIterations: 5
55
+ approvalKeyword: ALL_PASSED
56
+
57
+ - phase: cross-model-review
58
+ condition: differentReviewModel
59
+ agent: cross-model
60
+ fixAgent: engineer
61
+ maxIterations: 3
62
+ approvalKeyword: APPROVED
@@ -0,0 +1,19 @@
1
+ export type SwarmCommand = "run" | "plan";
2
+ /**
3
+ * Core config loaded from environment variables and CLI arguments.
4
+ * CLI args take precedence over env vars.
5
+ * Model selection and pipeline structure are in `swarm.config.yaml` (PipelineConfig).
6
+ */
7
+ export interface SwarmConfig {
8
+ readonly command: SwarmCommand;
9
+ readonly repoRoot: string;
10
+ readonly verbose: boolean;
11
+ readonly issueBody: string;
12
+ readonly agentsDir: string;
13
+ readonly docDir: string;
14
+ readonly sessionTimeoutMs: number;
15
+ readonly maxRetries: number;
16
+ readonly summaryFileName: string;
17
+ }
18
+ export declare function loadConfig(): SwarmConfig;
19
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AA+BA,MAAM,MAAM,YAAY,GAAG,KAAK,GAAG,MAAM,CAAC;AAqF1C;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC;IAC/B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;CAClC;AAED,wBAAgB,UAAU,IAAI,WAAW,CA2BxC"}
package/dist/config.js ADDED
@@ -0,0 +1,124 @@
1
+ import { execSync } from "node:child_process";
2
+ import * as fs from "node:fs";
3
+ import * as path from "node:path";
4
+ import { parseArgs } from "node:util";
5
+ const repoRoot = execSync("git rev-parse --show-toplevel", { encoding: "utf-8" }).trim();
6
+ function readEnvString(key, fallback) {
7
+ const value = process.env[key];
8
+ if (value === undefined || value === "")
9
+ return fallback;
10
+ return value;
11
+ }
12
+ function readEnvBoolean(key, fallback) {
13
+ const value = process.env[key];
14
+ if (value === undefined || value === "")
15
+ return fallback;
16
+ if (value === "true")
17
+ return true;
18
+ if (value === "false")
19
+ return false;
20
+ throw new Error(`Invalid value for ${key}: "${value}". Must be "true" or "false".`);
21
+ }
22
+ function readEnvPositiveInt(key, fallback) {
23
+ const value = process.env[key];
24
+ if (value === undefined || value === "")
25
+ return fallback;
26
+ const parsed = Number(value);
27
+ if (!Number.isInteger(parsed) || parsed <= 0) {
28
+ throw new Error(`Invalid value for ${key}: "${value}". Must be a positive integer.`);
29
+ }
30
+ return parsed;
31
+ }
32
+ const HELP_TEXT = `Usage: swarm [command] [options] "<prompt>"
33
+
34
+ Commands:
35
+ run Run the full orchestration pipeline (default)
36
+ plan Interactive planning mode — clarify requirements before running
37
+
38
+ Options:
39
+ -v, --verbose Enable verbose streaming output
40
+ -p, --plan <file> Use a plan file as input (reads the refined requirements section)
41
+ -h, --help Show this help message
42
+
43
+ Examples:
44
+ swarm "Add a dark mode toggle"
45
+ swarm plan "Add a dark mode toggle"
46
+ swarm run -v "Fix the login bug"
47
+ swarm --plan doc/plan-latest.md
48
+ ISSUE_BODY="Add a feature" swarm plan
49
+
50
+ Environment variables override defaults; CLI args override env vars.
51
+ See documentation for all env var options.`;
52
+ function parseCliArgs() {
53
+ const { values, positionals } = parseArgs({
54
+ allowPositionals: true,
55
+ strict: false,
56
+ options: {
57
+ verbose: { type: "boolean", short: "v", default: false },
58
+ help: { type: "boolean", short: "h", default: false },
59
+ plan: { type: "string", short: "p" },
60
+ },
61
+ });
62
+ if (values.help) {
63
+ console.log(HELP_TEXT);
64
+ process.exit(0);
65
+ }
66
+ let command = "run";
67
+ let promptParts = positionals;
68
+ if (positionals.length > 0 && (positionals[0] === "plan" || positionals[0] === "run")) {
69
+ command = positionals[0];
70
+ promptParts = positionals.slice(1);
71
+ }
72
+ return {
73
+ command,
74
+ verbose: values.verbose,
75
+ prompt: promptParts.length > 0 ? promptParts.join(" ") : undefined,
76
+ planFile: values.plan,
77
+ };
78
+ }
79
+ /** Extract the "Refined Requirements" section from a plan file. */
80
+ function readPlanFile(filePath) {
81
+ const resolved = path.isAbsolute(filePath) ? filePath : path.join(repoRoot, filePath);
82
+ if (!fs.existsSync(resolved)) {
83
+ console.error(`Error: Plan file not found: ${resolved}`);
84
+ process.exit(1);
85
+ }
86
+ const content = fs.readFileSync(resolved, "utf-8");
87
+ const marker = "## Refined Requirements";
88
+ const start = content.indexOf(marker);
89
+ if (start === -1) {
90
+ console.error(`Error: Plan file does not contain a "${marker}" section: ${resolved}`);
91
+ process.exit(1);
92
+ }
93
+ // Extract from marker to the next ## heading or end of file
94
+ const afterMarker = content.substring(start + marker.length);
95
+ const nextHeading = afterMarker.indexOf("\n## ");
96
+ const section = nextHeading !== -1 ? afterMarker.substring(0, nextHeading) : afterMarker;
97
+ return section.trim();
98
+ }
99
+ export function loadConfig() {
100
+ const cli = parseCliArgs();
101
+ let issueBody;
102
+ if (cli.planFile) {
103
+ issueBody = readPlanFile(cli.planFile);
104
+ }
105
+ else {
106
+ issueBody = cli.prompt ?? process.env.ISSUE_BODY;
107
+ }
108
+ if (!issueBody || issueBody === "") {
109
+ console.error(`Error: No prompt provided. Pass it as an argument, use --plan, or set ISSUE_BODY.\n\n${HELP_TEXT}`);
110
+ process.exit(1);
111
+ }
112
+ return {
113
+ command: cli.command,
114
+ repoRoot,
115
+ verbose: cli.verbose || readEnvBoolean("VERBOSE", false),
116
+ issueBody,
117
+ agentsDir: readEnvString("AGENTS_DIR", ".github/agents"),
118
+ docDir: readEnvString("DOC_DIR", "doc"),
119
+ sessionTimeoutMs: readEnvPositiveInt("SESSION_TIMEOUT_MS", 300_000),
120
+ maxRetries: readEnvPositiveInt("MAX_RETRIES", 2),
121
+ summaryFileName: readEnvString("SUMMARY_FILE_NAME", "swarm-summary.md"),
122
+ };
123
+ }
124
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,MAAM,QAAQ,GAAG,QAAQ,CAAC,+BAA+B,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;AAEzF,SAAS,aAAa,CAAC,GAAW,EAAE,QAAgB;IAClD,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC/B,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE;QAAE,OAAO,QAAQ,CAAC;IACzD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,cAAc,CAAC,GAAW,EAAE,QAAiB;IACpD,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC/B,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE;QAAE,OAAO,QAAQ,CAAC;IACzD,IAAI,KAAK,KAAK,MAAM;QAAE,OAAO,IAAI,CAAC;IAClC,IAAI,KAAK,KAAK,OAAO;QAAE,OAAO,KAAK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B,EAAE,kBAAkB,CAAC,oBAAoB,EAAE,OAAO,CAAC;QACnE,UAAU,EAAE,kBAAkB,CAAC,aAAa,EAAE,CAAC,CAAC;QAChD,eAAe,EAAE,aAAa,CAAC,mBAAmB,EAAE,kBAAkB,CAAC;KACxE,CAAC;AACJ,CAAC"}
@@ -0,0 +1,22 @@
1
+ /** Copilot SDK session event names. */
2
+ export declare const SessionEvent: {
3
+ readonly MESSAGE_DELTA: "assistant.message_delta";
4
+ readonly TOOL_EXECUTION_START: "tool.execution_start";
5
+ readonly INTENT: "assistant.intent";
6
+ };
7
+ /** Response keywords used by agents to signal decisions. */
8
+ export declare const ResponseKeyword: {
9
+ readonly APPROVED: "APPROVED";
10
+ readonly ALL_PASSED: "ALL_PASSED";
11
+ readonly CLARIFICATION_NEEDED: "CLARIFICATION_NEEDED";
12
+ readonly REQUIREMENTS_CLEAR: "REQUIREMENTS_CLEAR";
13
+ };
14
+ /** Marker prefix for frontend tasks in task decomposition. */
15
+ export declare const FRONTEND_MARKER = "[FRONTEND]";
16
+ /** Keywords that indicate a task involves frontend work. */
17
+ export declare const FRONTEND_KEYWORDS: readonly ["frontend", "ui", "component", "page", "view", "layout", "style", "react", "design"];
18
+ /** System message injection mode for Copilot sessions. */
19
+ export declare const SYSTEM_MESSAGE_MODE: "append";
20
+ /** Prefix for built-in agent instruction references. */
21
+ export declare const BUILTIN_AGENT_PREFIX: "builtin:";
22
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,eAAO,MAAM,YAAY;;;;CAIf,CAAC;AAEX,4DAA4D;AAC5D,eAAO,MAAM,eAAe;;;;;CAKlB,CAAC;AAEX,8DAA8D;AAC9D,eAAO,MAAM,eAAe,eAAe,CAAC;AAE5C,4DAA4D;AAC5D,eAAO,MAAM,iBAAiB,gGAUpB,CAAC;AAEX,0DAA0D;AAC1D,eAAO,MAAM,mBAAmB,EAAG,QAAiB,CAAC;AAErD,wDAAwD;AACxD,eAAO,MAAM,oBAAoB,EAAG,UAAmB,CAAC"}
@@ -0,0 +1,32 @@
1
+ /** Copilot SDK session event names. */
2
+ export const SessionEvent = {
3
+ MESSAGE_DELTA: "assistant.message_delta",
4
+ TOOL_EXECUTION_START: "tool.execution_start",
5
+ INTENT: "assistant.intent",
6
+ };
7
+ /** Response keywords used by agents to signal decisions. */
8
+ export const ResponseKeyword = {
9
+ APPROVED: "APPROVED",
10
+ ALL_PASSED: "ALL_PASSED",
11
+ CLARIFICATION_NEEDED: "CLARIFICATION_NEEDED",
12
+ REQUIREMENTS_CLEAR: "REQUIREMENTS_CLEAR",
13
+ };
14
+ /** Marker prefix for frontend tasks in task decomposition. */
15
+ export const FRONTEND_MARKER = "[FRONTEND]";
16
+ /** Keywords that indicate a task involves frontend work. */
17
+ export const FRONTEND_KEYWORDS = [
18
+ "frontend",
19
+ "ui",
20
+ "component",
21
+ "page",
22
+ "view",
23
+ "layout",
24
+ "style",
25
+ "react",
26
+ "design",
27
+ ];
28
+ /** System message injection mode for Copilot sessions. */
29
+ export const SYSTEM_MESSAGE_MODE = "append";
30
+ /** Prefix for built-in agent instruction references. */
31
+ export const BUILTIN_AGENT_PREFIX = "builtin:";
32
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,aAAa,EAAE,yBAAyB;IACxC,oBAAoB,EAAE,sBAAsB;IAC5C,MAAM,EAAE,kBAAkB;CAClB,CAAC;AAEX,4DAA4D;AAC5D,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,QAAQ,EAAE,UAAU;IACpB,UAAU,EAAE,YAAY;IACxB,oBAAoB,EAAE,sBAAsB;IAC5C,kBAAkB,EAAE,oBAAoB;CAChC,CAAC;AAEX,8DAA8D;AAC9D,MAAM,CAAC,MAAM,eAAe,GAAG,YAAY,CAAC;AAE5C,4DAA4D;AAC5D,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,UAAU;IACV,IAAI;IACJ,WAAW;IACX,MAAM;IACN,MAAM;IACN,QAAQ;IACR,OAAO;IACP,OAAO;IACP,QAAQ;CACA,CAAC;AAEX,0DAA0D;AAC1D,MAAM,CAAC,MAAM,mBAAmB,GAAG,QAAiB,CAAC;AAErD,wDAAwD;AACxD,MAAM,CAAC,MAAM,oBAAoB,GAAG,UAAmB,CAAC"}
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
package/dist/index.js ADDED
@@ -0,0 +1,25 @@
1
+ #!/usr/bin/env node
2
+ import { loadConfig } from "./config.js";
3
+ import { Logger } from "./logger.js";
4
+ import { msg } from "./messages.js";
5
+ import { SwarmOrchestrator } from "./orchestrator.js";
6
+ import { PlanningEngine } from "./planning-engine.js";
7
+ const config = loadConfig();
8
+ const logger = new Logger(config.verbose);
9
+ if (config.command === "plan") {
10
+ const pipeline = (await import("./pipeline-config.js")).loadPipelineConfig(config.repoRoot);
11
+ const planner = new PlanningEngine(config, pipeline, logger);
12
+ planner
13
+ .start()
14
+ .then(() => planner.execute())
15
+ .finally(() => planner.stop());
16
+ }
17
+ else {
18
+ logger.info(msg.startingSwarm);
19
+ const swarm = new SwarmOrchestrator(config, logger);
20
+ swarm
21
+ .start()
22
+ .then(() => swarm.execute())
23
+ .finally(() => swarm.stop());
24
+ }
25
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,MAAM,MAAM,GAAG,UAAU,EAAE,CAAC;AAC5B,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AAE1C,IAAI,MAAM,CAAC,OAAO,KAAK,MAAM,EAAE,CAAC;IAC9B,MAAM,QAAQ,GAAG,CAAC,MAAM,MAAM,CAAC,sBAAsB,CAAC,CAAC,CAAC,kBAAkB,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC5F,MAAM,OAAO,GAAG,IAAI,cAAc,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC7D,OAAO;SACJ,KAAK,EAAE;SACP,IAAI,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;SAC7B,OAAO,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;AACnC,CAAC;KAAM,CAAC;IACN,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;IAC/B,MAAM,KAAK,GAAG,IAAI,iBAAiB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpD,KAAK;SACF,KAAK,EAAE;SACP,IAAI,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;SAC3B,OAAO,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;AACjC,CAAC"}
@@ -0,0 +1,15 @@
1
+ /** Thin logging wrapper for centralized output control. */
2
+ export declare class Logger {
3
+ private readonly verbose;
4
+ constructor(verbose: boolean);
5
+ info(message: string): void;
6
+ warn(message: string): void;
7
+ error(message: string, err?: unknown): void;
8
+ /** Write raw text to stdout (no newline). Used for streaming deltas. */
9
+ write(text: string): void;
10
+ /** Write a newline to stdout. Used after streaming completes. */
11
+ newline(): void;
12
+ /** Log only when verbose mode is enabled. */
13
+ debug(message: string): void;
14
+ }
15
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAC3D,qBAAa,MAAM;IACL,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,OAAO;IAE7C,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAI3B,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAI3B,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,GAAG,IAAI;IAK3C,wEAAwE;IACxE,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAMzB,iEAAiE;IACjE,OAAO,IAAI,IAAI;IAMf,6CAA6C;IAC7C,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;CAK7B"}
package/dist/logger.js ADDED
@@ -0,0 +1,36 @@
1
+ /** Thin logging wrapper for centralized output control. */
2
+ export class Logger {
3
+ verbose;
4
+ constructor(verbose) {
5
+ this.verbose = verbose;
6
+ }
7
+ info(message) {
8
+ console.log(message);
9
+ }
10
+ warn(message) {
11
+ console.warn(message);
12
+ }
13
+ error(message, err) {
14
+ const detail = err instanceof Error ? err.message : String(err ?? "");
15
+ console.error(detail ? `${message}: ${detail}` : message);
16
+ }
17
+ /** Write raw text to stdout (no newline). Used for streaming deltas. */
18
+ write(text) {
19
+ if (this.verbose) {
20
+ process.stdout.write(text);
21
+ }
22
+ }
23
+ /** Write a newline to stdout. Used after streaming completes. */
24
+ newline() {
25
+ if (this.verbose) {
26
+ process.stdout.write("\n");
27
+ }
28
+ }
29
+ /** Log only when verbose mode is enabled. */
30
+ debug(message) {
31
+ if (this.verbose) {
32
+ console.log(message);
33
+ }
34
+ }
35
+ }
36
+ //# sourceMappingURL=logger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAC3D,MAAM,OAAO,MAAM;IACY;IAA7B,YAA6B,OAAgB;QAAhB,YAAO,GAAP,OAAO,CAAS;IAAG,CAAC;IAEjD,IAAI,CAAC,OAAe;QAClB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACvB,CAAC;IAED,IAAI,CAAC,OAAe;QAClB,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACxB,CAAC;IAED,KAAK,CAAC,OAAe,EAAE,GAAa;QAClC,MAAM,MAAM,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC;QACtE,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,OAAO,KAAK,MAAM,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;IAC5D,CAAC;IAED,wEAAwE;IACxE,KAAK,CAAC,IAAY;QAChB,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACjB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC7B,CAAC;IACH,CAAC;IAED,iEAAiE;IACjE,OAAO;QACL,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACjB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC7B,CAAC;IACH,CAAC;IAED,6CAA6C;IAC7C,KAAK,CAAC,OAAe;QACnB,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACjB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACvB,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,47 @@
1
+ /** Centralized log messages. Edit this file to change any user-facing output. */
2
+ export declare const msg: {
3
+ readonly startingSwarm: "šŸš€ Starting Copilot Swarm...";
4
+ readonly swarmComplete: "šŸ All Swarm Streams Completed.";
5
+ readonly configLoaded: (model: string, review: string, verbose: boolean) => string;
6
+ readonly pipelineSource: (source: string) => string;
7
+ readonly pmPhaseStart: "šŸš€ Starting PM Phase...";
8
+ readonly pmDrafting: "\n[Phase: PM Drafting]";
9
+ readonly reviewPhase: (agent: string) => string;
10
+ readonly taskDecomposition: "\n[Phase: Task Decomposition]";
11
+ readonly tasksResult: (tasks: string[]) => string;
12
+ readonly designPhaseStart: "\nšŸŽØ Starting Design Phase...";
13
+ readonly designPhase: "\n[Phase: UI/UX Design]";
14
+ readonly designerClarification: " šŸ” Designer needs clarification — consulting PM...";
15
+ readonly reviewerClarification: " šŸ” Clarification needed — consulting PM...";
16
+ readonly launchingStreams: (count: number) => string;
17
+ readonly streamLabel: (idx: number) => string;
18
+ readonly streamStart: (label: string, task: string) => string;
19
+ readonly streamEngineering: (label: string) => string;
20
+ readonly streamCodeReview: (label: string, agent: string) => string;
21
+ readonly streamQa: (label: string) => string;
22
+ readonly crossModelSkipped: "\nā­ļø Skipping Cross-Model Review (review model equals primary model).";
23
+ readonly crossModelStart: (model: string) => string;
24
+ readonly crossModelStreamReview: (label: string) => string;
25
+ readonly reviewIteration: (i: number, max: number) => string;
26
+ readonly qaIteration: (i: number, max: number) => string;
27
+ readonly crossModelIteration: (i: number, max: number, model: string) => string;
28
+ readonly approved: (agent: string) => string;
29
+ readonly codeApproved: " āœ… Code approved";
30
+ readonly allTestsPassed: " āœ… All tests passed";
31
+ readonly crossModelApproved: " āœ… Approved by cross-model reviewer";
32
+ readonly feedbackReceived: (preview: string) => string;
33
+ readonly codeFeedback: (preview: string) => string;
34
+ readonly defectsFound: " šŸ› Defects found — fixing...";
35
+ readonly crossModelIssues: " āŒ Issues found — sending fixes back to original engineer...";
36
+ readonly emptyResponse: (agent: string, attempt: number, max: number) => string;
37
+ readonly callError: (agent: string, attempt: number, max: number) => string;
38
+ readonly toolExecution: (name: string) => string;
39
+ readonly intentUpdate: (intent: string) => string;
40
+ readonly planningStart: "🧠 Starting Planning Mode...";
41
+ readonly planningPmPhase: "\n[Planning: Requirements Clarification]";
42
+ readonly planningEngPhase: "\n[Planning: Technical Analysis]";
43
+ readonly planningComplete: "\nāœ… Planning complete.";
44
+ readonly planSaved: (path: string) => string;
45
+ readonly planningUserPrompt: "\nšŸ’¬ Your answer (or press Enter to skip): ";
46
+ };
47
+ //# sourceMappingURL=messages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../src/messages.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,eAAO,MAAM,GAAG;;;mCAIQ,MAAM,UAAU,MAAM,WAAW,OAAO;sCAErC,MAAM;;;kCAKV,MAAM;;kCAEN,MAAM,EAAE;;;;;uCASH,MAAM;gCACb,MAAM;kCACJ,MAAM,QAAQ,MAAM;wCACd,MAAM;uCACP,MAAM,SAAS,MAAM;+BAC7B,MAAM;;sCAIC,MAAM;6CACC,MAAM;kCAGjB,MAAM,OAAO,MAAM;8BACvB,MAAM,OAAO,MAAM;sCACX,MAAM,OAAO,MAAM,SAAS,MAAM;+BAIzC,MAAM;;;;yCAII,MAAM;qCACV,MAAM;;;oCAKP,MAAM,WAAW,MAAM,OAAO,MAAM;gCAExC,MAAM,WAAW,MAAM,OAAO,MAAM;mCAGjC,MAAM;oCACL,MAAM;;;;;+BAOX,MAAM;;CAEhB,CAAC"}
@@ -0,0 +1,57 @@
1
+ /** Centralized log messages. Edit this file to change any user-facing output. */
2
+ export const msg = {
3
+ // --- Lifecycle ---
4
+ startingSwarm: "šŸš€ Starting Copilot Swarm...",
5
+ swarmComplete: "šŸ All Swarm Streams Completed.",
6
+ configLoaded: (model, review, verbose) => `āš™ļø Config: primary=${model}, review=${review}, verbose=${verbose}`,
7
+ pipelineSource: (source) => `šŸ“‹ Pipeline: ${source}`,
8
+ // --- PM Phase ---
9
+ pmPhaseStart: "šŸš€ Starting PM Phase...",
10
+ pmDrafting: "\n[Phase: PM Drafting]",
11
+ reviewPhase: (agent) => `\n[Phase: Review by ${agent}]`,
12
+ taskDecomposition: "\n[Phase: Task Decomposition]",
13
+ tasksResult: (tasks) => ` šŸ“‹ Tasks: ${JSON.stringify(tasks)}`,
14
+ // --- Design Phase ---
15
+ designPhaseStart: "\nšŸŽØ Starting Design Phase...",
16
+ designPhase: "\n[Phase: UI/UX Design]",
17
+ designerClarification: " šŸ” Designer needs clarification — consulting PM...",
18
+ reviewerClarification: " šŸ” Clarification needed — consulting PM...",
19
+ // --- Task Streams ---
20
+ launchingStreams: (count) => `\nšŸš€ Launching ${count} Parallel Task Streams...`,
21
+ streamLabel: (idx) => `Stream ${idx + 1}`,
22
+ streamStart: (label, task) => `\n[${label}: ${task.substring(0, 60)}...]`,
23
+ streamEngineering: (label) => ` [${label}: Engineering]`,
24
+ streamCodeReview: (label, agent) => ` [${label}: Review by ${agent}]`,
25
+ streamQa: (label) => ` [${label}: QA]`,
26
+ // --- Cross-Model Review ---
27
+ crossModelSkipped: "\nā­ļø Skipping Cross-Model Review (review model equals primary model).",
28
+ crossModelStart: (model) => `\nšŸ”„ Starting Cross-Model Review Phase (model: ${model})...`,
29
+ crossModelStreamReview: (label) => ` [${label}: Cross-Model Review]`,
30
+ // --- Iteration messages ---
31
+ reviewIteration: (i, max) => ` └─ Iteration ${i}/${max}: Reviewing...`,
32
+ qaIteration: (i, max) => ` └─ QA Iteration ${i}/${max}: Testing...`,
33
+ crossModelIteration: (i, max, model) => ` └─ Iteration ${i}/${max}: Reviewing with ${model}...`,
34
+ // --- Outcomes ---
35
+ approved: (agent) => ` āœ… Approved by ${agent}`,
36
+ codeApproved: " āœ… Code approved",
37
+ allTestsPassed: " āœ… All tests passed",
38
+ crossModelApproved: " āœ… Approved by cross-model reviewer",
39
+ feedbackReceived: (preview) => ` āŒ Feedback: ${preview}...`,
40
+ codeFeedback: (preview) => ` āŒ Feedback: ${preview}...`,
41
+ defectsFound: " šŸ› Defects found — fixing...",
42
+ crossModelIssues: " āŒ Issues found — sending fixes back to original engineer...",
43
+ // --- Errors & Warnings ---
44
+ emptyResponse: (agent, attempt, max) => ` āš ļø Empty response from ${agent} (attempt ${attempt}/${max})`,
45
+ callError: (agent, attempt, max) => ` āš ļø Error calling ${agent} (attempt ${attempt}/${max})`,
46
+ // --- Verbose session events ---
47
+ toolExecution: (name) => ` šŸ”§ Tool: ${name}`,
48
+ intentUpdate: (intent) => ` šŸ’­ Intent: ${intent}`,
49
+ // --- Planning Mode ---
50
+ planningStart: "🧠 Starting Planning Mode...",
51
+ planningPmPhase: "\n[Planning: Requirements Clarification]",
52
+ planningEngPhase: "\n[Planning: Technical Analysis]",
53
+ planningComplete: "\nāœ… Planning complete.",
54
+ planSaved: (path) => `šŸ“„ Plan saved to ${path}`,
55
+ planningUserPrompt: "\nšŸ’¬ Your answer (or press Enter to skip): ",
56
+ };
57
+ //# sourceMappingURL=messages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messages.js","sourceRoot":"","sources":["../src/messages.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,MAAM,CAAC,MAAM,GAAG,GAAG;IACjB,oBAAoB;IACpB,aAAa,EAAE,8BAA8B;IAC7C,aAAa,EAAE,iCAAiC;IAChD,YAAY,EAAE,CAAC,KAAa,EAAE,MAAc,EAAE,OAAgB,EAAE,EAAE,CAChE,uBAAuB,KAAK,YAAY,MAAM,aAAa,OAAO,EAAE;IACtE,cAAc,EAAE,CAAC,MAAc,EAAE,EAAE,CAAC,gBAAgB,MAAM,EAAE;IAE5D,mBAAmB;IACnB,YAAY,EAAE,yBAAyB;IACvC,UAAU,EAAE,wBAAwB;IACpC,WAAW,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,uBAAuB,KAAK,GAAG;IAC/D,iBAAiB,EAAE,+BAA+B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AAC,IAAI,GAAG,oBAAoB,KAAK,KAAK;IAE5D,mBAAmB;IACnB,QAAQ,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,mBAAmB,KAAK,EAAE;IACvD,YAAY,EAAE,qBAAqB;IACnC,cAAc,EAAE,wBAAwB;IACxC,kBAAkB,EAAE,wCAAwC;IAC5D,gBAAgB,EAAE,CAAC,OAAe,EAAE,EAAE,CAAC,iBAAiB,OAAO,KAAK;IACpE,YAAY,EAAE,CAAC,OAAe,EAAE,EAAE,CAAC,mBAAmB,OAAO,KAAK;IAClE,YAAY,EAAE,kCAAkC;IAChD,gBAAgB,EAAE,iEAAiE;IAEnF,4BAA4B;IAC5B,aAAa,EAAE,CAAC,KAAa,EAAE,OAAe,EAAE,GAAW,EAAE,EAAE,CAC7D,6BAA6B,KAAK,aAAa,OAAO,IAAI,GAAG,GAAG;IAClE,SAAS,EAAE,CAAC,KAAa,EAAE,OAAe,EAAE,GAAW,EAAE,EAAE,CAAC,uBAAuB,KAAK,aAAa,OAAO,IAAI,GAAG,GAAG;IAEtH,iCAAiC;IACjC,aAAa,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,gBAAgB,IAAI,EAAE;IACvD,YAAY,EAAE,CAAC,MAAc,EAAE,EAAE,CAAC,kBAAkB,MAAM,EAAE;IAE5D,wBAAwB;IACxB,aAAa,EAAE,8BAA8B;IAC7C,eAAe,EAAE,0CAA0C;IAC3D,gBAAgB,EAAE,kCAAkC;IACpD,gBAAgB,EAAE,wBAAwB;IAC1C,SAAS,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,oBAAoB,IAAI,EAAE;IACvD,kBAAkB,EAAE,6CAA6C;CACzD,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * SwarmOrchestrator — thin wrapper that loads pipeline config and delegates to the engine.
3
+ * Kept for backward compatibility; new code can use PipelineEngine directly.
4
+ */
5
+ import type { SwarmConfig } from "./config.js";
6
+ import type { Logger } from "./logger.js";
7
+ export declare class SwarmOrchestrator {
8
+ private readonly engine;
9
+ constructor(config: SwarmConfig, logger: Logger);
10
+ start(): Promise<void>;
11
+ stop(): Promise<void>;
12
+ execute(): Promise<void>;
13
+ }
14
+ //# sourceMappingURL=orchestrator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["../src/orchestrator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAI1C,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAiB;gBAE5B,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM;IAKzC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAItB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAIrB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAG/B"}
@@ -0,0 +1,19 @@
1
+ import { loadPipelineConfig } from "./pipeline-config.js";
2
+ import { PipelineEngine } from "./pipeline-engine.js";
3
+ export class SwarmOrchestrator {
4
+ engine;
5
+ constructor(config, logger) {
6
+ const pipeline = loadPipelineConfig(config.repoRoot);
7
+ this.engine = new PipelineEngine(config, pipeline, logger);
8
+ }
9
+ async start() {
10
+ await this.engine.start();
11
+ }
12
+ async stop() {
13
+ await this.engine.stop();
14
+ }
15
+ async execute() {
16
+ await this.engine.execute();
17
+ }
18
+ }
19
+ //# sourceMappingURL=orchestrator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"orchestrator.js","sourceRoot":"","sources":["../src/orchestrator.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,MAAM,OAAO,iBAAiB;IACX,MAAM,CAAiB;IAExC,YAAY,MAAmB,EAAE,MAAc;QAC7C,MAAM,QAAQ,GAAG,kBAAkB,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QACrD,IAAI,CAAC,MAAM,GAAG,IAAI,cAAc,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC7D,CAAC;IAED,KAAK,CAAC,KAAK;QACT,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;IAC5B,CAAC;IAED,KAAK,CAAC,IAAI;QACR,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IAC3B,CAAC;IAED,KAAK,CAAC,OAAO;QACX,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;IAC9B,CAAC;CACF"}
@@ -0,0 +1,8 @@
1
+ import type { PipelineConfig } from "./pipeline-types.js";
2
+ export declare function parsePipelineConfig(raw: unknown): PipelineConfig;
3
+ /**
4
+ * Load pipeline config from the repo root, falling back to the built-in default.
5
+ * Env vars PRIMARY_MODEL and REVIEW_MODEL override the YAML values.
6
+ */
7
+ export declare function loadPipelineConfig(repoRoot: string): PipelineConfig;
8
+ //# sourceMappingURL=pipeline-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipeline-config.d.ts","sourceRoot":"","sources":["../src/pipeline-config.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAMV,cAAc,EAIf,MAAM,qBAAqB,CAAC;AAsL7B,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,GAAG,cAAc,CAehE;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,cAAc,CAkCnE"}