@the-vibe-company/armada 0.2.47 → 0.2.48

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 (2) hide show
  1. package/dist/armada.js +15 -7
  2. package/package.json +1 -1
package/dist/armada.js CHANGED
@@ -10491,7 +10491,7 @@ ${attachments.join(`
10491
10491
  };
10492
10492
  }
10493
10493
  // package.json
10494
- var version = "0.2.47";
10494
+ var version = "0.2.48";
10495
10495
 
10496
10496
  // src/attach.ts
10497
10497
  import { resolve } from "node:path";
@@ -11477,7 +11477,7 @@ class Herdr {
11477
11477
  "--",
11478
11478
  ...harnessArgs(profile)
11479
11479
  ]);
11480
- this.checkAgent(r, handle);
11480
+ await this.checkLaunchAgent(r, handle, profile.harness);
11481
11481
  if (verifyModel && herdrHarnessKind(profile.harness) === "opencode") {
11482
11482
  try {
11483
11483
  await verifyOpenCodeModel(this.io, handle.pane, profile.model);
@@ -11492,9 +11492,7 @@ class Herdr {
11492
11492
  }
11493
11493
  }
11494
11494
  async inspect(handle, harness) {
11495
- const agent = this.checkAgent(await this.call(["agent", "get", handle.pane], 5000), handle);
11496
- if (agent.agent !== undefined && agent.agent !== null && agent.agent !== herdrHarnessKind(harness))
11497
- throw new UsageError("herdr worker harness changed; inspect herdr agent list before retrying");
11495
+ const agent = await this.checkLaunchAgent(await this.call(["agent", "get", handle.pane], 5000), handle, harness);
11498
11496
  const state = agent.agent_status;
11499
11497
  if (!["working", "blocked", "idle", "done", "unknown"].includes(String(state)))
11500
11498
  throw new UsageError("invalid herdr agent state");
@@ -11510,7 +11508,7 @@ class Herdr {
11510
11508
  throw new Error("read failed");
11511
11509
  text = result.stdout;
11512
11510
  } catch {
11513
- throw new UsageError(`could not inspect the worker screen; run herdr agent attach ${handle.agent}`);
11511
+ throw new UsageError(`could not inspect the worker screen; run herdr agent attach ${handle.pane}`);
11514
11512
  }
11515
11513
  return {
11516
11514
  state,
@@ -11519,7 +11517,7 @@ class Herdr {
11519
11517
  };
11520
11518
  }
11521
11519
  screenError(handle, issue, message = "The harness needs the owner's attention") {
11522
- return new UsageError(`${issue?.message ?? message}: run armada setup local, or answer it with herdr agent attach ${handle.agent}`, `herdr agent attach ${handle.agent}`);
11520
+ return new UsageError(`${issue?.message ?? message}: run armada setup local, or answer it with herdr agent attach ${handle.pane}`, `herdr agent attach ${handle.pane}`);
11523
11521
  }
11524
11522
  async checkProfileModel(handle, profile) {
11525
11523
  if (herdrHarnessKind(profile.harness) !== "opencode")
@@ -11674,6 +11672,16 @@ class Herdr {
11674
11672
  if (result?.workspace_id !== handle.workspace || result?.path !== path || result?.forced !== false)
11675
11673
  throw new UsageError("invalid herdr worktree removal response; inspect herdr worktree list before retrying");
11676
11674
  }
11675
+ async checkLaunchAgent(reply, handle, harness) {
11676
+ const kind = herdrHarnessKind(harness);
11677
+ const occupant = object(object(reply.result)?.agent);
11678
+ if (occupant && (occupant.name === null || occupant.name === undefined) && occupant.agent === kind && occupant.pane_id === handle.pane && occupant.workspace_id === handle.workspace)
11679
+ reply = await this.call(["agent", "rename", handle.pane, handle.agent], 5000);
11680
+ const agent = this.checkAgent(reply, handle);
11681
+ if (agent.agent !== kind)
11682
+ throw new UsageError("herdr worker harness changed; inspect herdr agent list before retrying");
11683
+ return agent;
11684
+ }
11677
11685
  checkAgent(reply, handle) {
11678
11686
  const agent = object(object(reply.result)?.agent);
11679
11687
  if (!agent || agent.name !== handle.agent || agent.pane_id !== handle.pane || agent.workspace_id !== handle.workspace)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@the-vibe-company/armada",
3
- "version": "0.2.47",
3
+ "version": "0.2.48",
4
4
  "type": "module",
5
5
  "description": "Run a fleet of coding agents on one project: the armada command line.",
6
6
  "license": "MIT",