@elyracode/swarm 0.9.56 → 0.9.57

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/CHANGELOG.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.9.57] - 2026-11-10
4
+
3
5
  ## [0.9.56] - 2026-11-01
4
6
 
5
7
  ## [0.9.55] - 2026-10-21
@@ -260,15 +260,12 @@ function renderPipeline(pipeline: Pipeline, activeIndex: number, completedIndice
260
260
  return lines.join("\n");
261
261
  }
262
262
 
263
- function renderStageHeader(pipeline: Pipeline, stageIndex: number, task: string): string {
263
+ function renderStageHeader(pipeline: Pipeline, stageIndex: number, _task: string): string {
264
264
  const stage = pipeline.stages[stageIndex]!;
265
265
  const progress = `[${stageIndex + 1}/${pipeline.stages.length}]`;
266
266
  const readOnly = stage.readOnly ? " (read-only)" : "";
267
267
 
268
- return (
269
- `---\n\n` +
270
- `### ${progress} ${stage.label}${readOnly}\n\n`
271
- );
268
+ return `---\n\n### ${progress} ${stage.label}${readOnly}\n\n`;
272
269
  }
273
270
 
274
271
  // ── Extension ───────────────────────────────────────────────────────────────
@@ -296,9 +293,13 @@ function buildInlineResult(pipeline: Pipeline, task: string, note?: string) {
296
293
  }
297
294
 
298
295
  if (i < pipeline.stages.length - 1) {
299
- parts.push(`When done, write your output under a "#### ${stage.label} Output" heading, then proceed to the next stage.\n\n`);
296
+ parts.push(
297
+ `When done, write your output under a "#### ${stage.label} Output" heading, then proceed to the next stage.\n\n`,
298
+ );
300
299
  } else {
301
- parts.push(`This is the final stage. Write your output under a "#### ${stage.label} Output" heading, then provide a "## Swarm Summary" with the overall result.\n\n`);
300
+ parts.push(
301
+ `This is the final stage. Write your output under a "#### ${stage.label} Output" heading, then provide a "## Swarm Summary" with the overall result.\n\n`,
302
+ );
302
303
  }
303
304
 
304
305
  completedIndices.add(i);
@@ -335,7 +336,9 @@ function buildStagePrompt(pipeline: Pipeline, stageIndex: number, task: string,
335
336
  if (previousOutputs.length > 0) {
336
337
  parts.push(`\n\n**Output from previous stages**:\n\n${previousOutputs.join("\n\n---\n\n")}`);
337
338
  }
338
- parts.push(`\n\nWork directly in the current directory. When done, end with a concise summary of what you did/found.`);
339
+ parts.push(
340
+ `\n\nWork directly in the current directory. When done, end with a concise summary of what you did/found.`,
341
+ );
339
342
  return parts.join("");
340
343
  }
341
344
 
@@ -345,19 +348,29 @@ async function runWorktreePipeline(
345
348
  task: string,
346
349
  ctx: ExtensionContext,
347
350
  signal: AbortSignal | undefined,
348
- onUpdate: ((partial: { content: Array<{ type: "text"; text: string }>; details: Record<string, unknown> }) => void) | undefined,
351
+ onUpdate:
352
+ | ((partial: { content: Array<{ type: "text"; text: string }>; details: Record<string, unknown> }) => void)
353
+ | undefined,
349
354
  ) {
350
355
  const cwd = ctx.cwd;
351
356
  const exec = elyra.exec.bind(elyra);
352
357
 
353
358
  if (!(await isGitRepo(exec, cwd))) {
354
- return buildInlineResult(pipeline, task, "Worktree mode requested but this is not a git repository — running inline instead.");
359
+ return buildInlineResult(
360
+ pipeline,
361
+ task,
362
+ "Worktree mode requested but this is not a git repository — running inline instead.",
363
+ );
355
364
  }
356
365
 
357
366
  const mainBefore = await changedFiles(exec, cwd);
358
367
  const worktree = await createWorktree(exec, cwd);
359
368
  if ("error" in worktree) {
360
- return buildInlineResult(pipeline, task, `Worktree mode requested but worktree creation failed (${worktree.error}) — running inline instead.`);
369
+ return buildInlineResult(
370
+ pipeline,
371
+ task,
372
+ `Worktree mode requested but worktree creation failed (${worktree.error}) — running inline instead.`,
373
+ );
361
374
  }
362
375
 
363
376
  const modelArgs = ctx.model ? ["--model", `${ctx.model.provider}/${ctx.model.id}`] : [];
@@ -553,7 +566,10 @@ export default function (elyra: ExtensionAPI): void {
553
566
  elyra.registerCommand("swarm", {
554
567
  description: "Run a multi-agent swarm pipeline: /swarm [--worktrees] <pipeline> <task>",
555
568
  handler: async (args, ctx) => {
556
- const tokens = args.trim().split(/\s+/).filter((t) => t.length > 0);
569
+ const tokens = args
570
+ .trim()
571
+ .split(/\s+/)
572
+ .filter((t) => t.length > 0);
557
573
  const worktrees = tokens.includes("--worktrees");
558
574
  const parts = tokens.filter((t) => t !== "--worktrees");
559
575
  const pipelineName = parts[0];
@@ -11,17 +11,23 @@ import { mkdtempSync, writeFileSync } from "node:fs";
11
11
  import { tmpdir } from "node:os";
12
12
  import { join } from "node:path";
13
13
 
14
- export interface ExecFn {
15
- (command: string, args: string[], options?: { cwd?: string; timeout?: number; signal?: AbortSignal }): Promise<{
16
- stdout: string;
17
- stderr: string;
18
- code: number;
19
- }>;
20
- }
14
+ export type ExecFn = (
15
+ command: string,
16
+ args: string[],
17
+ options?: { cwd?: string; timeout?: number; signal?: AbortSignal },
18
+ ) => Promise<{
19
+ stdout: string;
20
+ stderr: string;
21
+ code: number;
22
+ }>;
21
23
 
22
24
  const GIT_TIMEOUT = 30_000;
23
25
 
24
- async function git(exec: ExecFn, cwd: string, args: string[]): Promise<{ stdout: string; code: number; stderr: string }> {
26
+ async function git(
27
+ exec: ExecFn,
28
+ cwd: string,
29
+ args: string[],
30
+ ): Promise<{ stdout: string; code: number; stderr: string }> {
25
31
  const result = await exec("git", args, { cwd, timeout: GIT_TIMEOUT });
26
32
  return { stdout: result.stdout, code: result.code, stderr: result.stderr };
27
33
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elyracode/swarm",
3
- "version": "0.9.56",
3
+ "version": "0.9.57",
4
4
  "description": "Multi-agent swarm orchestration for Elyra -- automated pipelines with visual progress tracking",
5
5
  "type": "module",
6
6
  "keywords": [