@tablation/crew 0.126.5 → 0.126.6

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/cli.js +12 -7
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -690,9 +690,9 @@ function urlPort(url) {
690
690
  return void 0;
691
691
  }
692
692
  }
693
- function portListening(port, timeoutMs = 500) {
693
+ function hostListening(port, host, timeoutMs) {
694
694
  return new Promise((resolve8) => {
695
- const s = connect({ port, host: "127.0.0.1" });
695
+ const s = connect({ port, host });
696
696
  const done = (ok) => {
697
697
  s.destroy();
698
698
  resolve8(ok);
@@ -702,6 +702,10 @@ function portListening(port, timeoutMs = 500) {
702
702
  s.once("error", () => done(false));
703
703
  });
704
704
  }
705
+ async function portListening(port, timeoutMs = 500) {
706
+ if (await hostListening(port, "127.0.0.1", timeoutMs)) return true;
707
+ return hostListening(port, "::1", timeoutMs);
708
+ }
705
709
  async function periscopesForStatus(stateDir, probe = portListening) {
706
710
  return Promise.all(readPeriscopeSidecars(stateDir).map(async (sc) => {
707
711
  const port = urlPort(sc.url);
@@ -28951,11 +28955,12 @@ Signed in as ${result.identity.email} \u2014 minted an API key in workspace "${r
28951
28955
  });
28952
28956
  };
28953
28957
  if (subP === "list") {
28954
- const entries = periscopeListEntries(
28955
- (await Promise.all(routesP.map(gather))).flat().map((r) => ({ ...r, pointedAt: readPointedAt(r.worktree) })),
28956
- /* @__PURE__ */ new Date(),
28957
- (r) => pidsInWorktree(r.worktree, Number(r.number)).length > 0
28958
- );
28958
+ const listRows = (await Promise.all(routesP.map(gather))).flat().map((r) => ({ ...r, pointedAt: readPointedAt(r.worktree) }));
28959
+ const serving = new Map(await Promise.all(listRows.map(async (r) => {
28960
+ const port = urlPort(r.url);
28961
+ return [r.id, port === void 0 ? false : await portListening(port)];
28962
+ })));
28963
+ const entries = periscopeListEntries(listRows, /* @__PURE__ */ new Date(), (r) => serving.get(r.id) ?? false);
28959
28964
  process.stdout.write(jsonP ? `${JSON.stringify(entries)}
28960
28965
  ` : `${formatPeriscopeList(entries)}
28961
28966
  `);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tablation/crew",
3
- "version": "0.126.5",
3
+ "version": "0.126.6",
4
4
  "description": "A standing team of headless agents that picks work off a Tablation board, does it on a machine you control, and reports back.",
5
5
  "type": "module",
6
6
  "license": "MIT",