@bakers-build/addon-herdr-core 0.8.1-next.2 → 0.8.1-next.4

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.
@@ -48,10 +48,6 @@ export declare class HerdrCoreExecutor implements BbExecutor {
48
48
  * leave an agent running.
49
49
  */
50
50
  cleanupRun(branch: string, runId: number): Promise<void>;
51
- /** Whether a terminal of the run still lives; an `hc` failure throws. */
52
- runAlive(branch: string, runId: number): Promise<boolean>;
53
- /** The run's terminals, found by its branch and run labels, finished ones included. */
54
- private runTerminals;
55
51
  /** `hc kill` (when live) then `hc rm`; each step best-effort. */
56
52
  private drop;
57
53
  private commandFor;
package/dist/src/index.js CHANGED
@@ -145,7 +145,15 @@ export class HerdrCoreExecutor {
145
145
  */
146
146
  async cleanupRun(branch, runId) {
147
147
  try {
148
- const terminals = await this.runTerminals(branch, runId);
148
+ const terminals = parseTerminals(await this.hc([
149
+ 'ls',
150
+ '--all',
151
+ '--label',
152
+ `bakers.branch=${branch}`,
153
+ '--label',
154
+ `bakers.run=${runId}`,
155
+ '--json',
156
+ ]));
149
157
  if (terminals.length === 0) {
150
158
  this.logger.warn({ branch, runId }, 'no herdr-core terminal found for this run; its agent may still be running');
151
159
  return;
@@ -157,22 +165,6 @@ export class HerdrCoreExecutor {
157
165
  this.logger.warn({ branch, runId, err: String(err) }, 'herdr-core cleanup failed (best-effort)');
158
166
  }
159
167
  }
160
- /** Whether a terminal of the run still lives; an `hc` failure throws. */
161
- async runAlive(branch, runId) {
162
- return (await this.runTerminals(branch, runId)).some((t) => t.live);
163
- }
164
- /** The run's terminals, found by its branch and run labels, finished ones included. */
165
- async runTerminals(branch, runId) {
166
- return parseTerminals(await this.hc([
167
- 'ls',
168
- '--all',
169
- '--label',
170
- `bakers.branch=${branch}`,
171
- '--label',
172
- `bakers.run=${runId}`,
173
- '--json',
174
- ]));
175
- }
176
168
  /** `hc kill` (when live) then `hc rm`; each step best-effort. */
177
169
  async drop(terminal, live) {
178
170
  if (live) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bakers-build/addon-herdr-core",
3
- "version": "0.8.1-next.2",
3
+ "version": "0.8.1-next.4",
4
4
  "description": "bakers.build herdr-core integration: executor running each agent in a herdr-core (hc) terminal.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -22,14 +22,14 @@
22
22
  "directory": "bakers-cli/addons/herdr-core"
23
23
  },
24
24
  "dependencies": {
25
- "@bakers-build/addon-herdr": "^0.8.1-next.2"
25
+ "@bakers-build/addon-herdr": "^0.8.1-next.4"
26
26
  },
27
27
  "peerDependencies": {
28
- "@bakers-build/conductor": "^0.8.1-next.2",
29
- "@bakers-build/core": "^0.8.1-next.2"
28
+ "@bakers-build/conductor": "^0.8.1-next.4",
29
+ "@bakers-build/core": "^0.8.1-next.4"
30
30
  },
31
31
  "bakersBuild": {
32
- "commit": "0177880667693d1c36c65ffced82d2f3a17cbf2a",
32
+ "commit": "ba56bec9e0a2d128491f52088a07061938e77832",
33
33
  "channel": "next"
34
34
  }
35
35
  }