@tablation/crew 0.39.0 → 0.39.1

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 +48 -3
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -6,6 +6,41 @@ import { fileURLToPath } from "url";
6
6
  import { hostname as hostname2, homedir as homedir7 } from "os";
7
7
  import { spawnSync as spawnSync5 } from "child_process";
8
8
 
9
+ // src/argv.ts
10
+ var VALUE_FLAGS = /* @__PURE__ */ new Set([
11
+ "area",
12
+ "base-url",
13
+ "dir",
14
+ "harness",
15
+ "key",
16
+ "level",
17
+ "limit",
18
+ "max-roles",
19
+ "mcp",
20
+ "member",
21
+ "name",
22
+ "project",
23
+ "repo",
24
+ "role",
25
+ "route",
26
+ "tail",
27
+ "ticket",
28
+ "workspace",
29
+ "workspace-id"
30
+ ]);
31
+ function positionalArgs(argv2) {
32
+ const out = [];
33
+ for (let i = 0; i < argv2.length; i++) {
34
+ const a = argv2[i];
35
+ if (a.startsWith("--")) {
36
+ if (!a.includes("=") && VALUE_FLAGS.has(a.slice(2))) i++;
37
+ continue;
38
+ }
39
+ out.push(a);
40
+ }
41
+ return out;
42
+ }
43
+
9
44
  // src/config.ts
10
45
  import { readFileSync as readFileSync5, existsSync as existsSync5 } from "fs";
11
46
  import { resolve, dirname as dirname3, isAbsolute, join as join6, basename as basename3 } from "path";
@@ -11978,9 +12013,15 @@ var value = (name) => {
11978
12013
  const i = argv.indexOf(`--${name}`);
11979
12014
  return i >= 0 ? argv[i + 1] : void 0;
11980
12015
  };
11981
- var positional = argv.filter((a, i) => !a.startsWith("--") && !argv[i - 1]?.startsWith("--"));
12016
+ var positional = positionalArgs(argv);
11982
12017
  var command = positional[0];
11983
12018
  if (!command) usage();
12019
+ function findSyncRoute(c, name) {
12020
+ if (!name && c.routes.length > 1) {
12021
+ throw new ConfigError(`this ship has ${c.routes.length} routes \u2014 name one: ${c.routes.map((r) => r.route).join(", ")}`);
12022
+ }
12023
+ return findRoute(c, name);
12024
+ }
11984
12025
  function daemonConfigPaths(c) {
11985
12026
  const files = [c.configFile];
11986
12027
  for (const r of c.routes) if (r.apiKeyFile && !files.includes(r.apiKeyFile)) files.push(r.apiKeyFile);
@@ -13381,7 +13422,7 @@ ${changed2.map((c) => ` - ${c}
13381
13422
  }
13382
13423
  let target;
13383
13424
  try {
13384
- target = findRoute(cfg, positional[2]);
13425
+ target = findSyncRoute(cfg, positional[2]);
13385
13426
  } catch (e) {
13386
13427
  if (e instanceof ConfigError) {
13387
13428
  process.stderr.write(`crew: ${e.message}
@@ -13406,6 +13447,8 @@ ${changed2.map((c) => ` - ${c}
13406
13447
  }
13407
13448
  throw e;
13408
13449
  }
13450
+ process.stdout.write(`route: ${target.route}
13451
+ `);
13409
13452
  for (const o of personaResult.outcomes) process.stdout.write(`${describeSyncOutcome(o)}
13410
13453
  `);
13411
13454
  for (const o of personaResult.crewLinks) process.stdout.write(`${describeCrewLink(o)}
@@ -13448,7 +13491,7 @@ ${changed2.map((c) => ` - ${c}
13448
13491
  }
13449
13492
  let target;
13450
13493
  try {
13451
- target = findRoute(cfg, positional[2]);
13494
+ target = findSyncRoute(cfg, positional[2]);
13452
13495
  } catch (e) {
13453
13496
  if (e instanceof ConfigError) {
13454
13497
  process.stderr.write(`crew: ${e.message}
@@ -13473,6 +13516,8 @@ ${changed2.map((c) => ` - ${c}
13473
13516
  }
13474
13517
  throw e;
13475
13518
  }
13519
+ process.stdout.write(`route: ${target.route}
13520
+ `);
13476
13521
  for (const o of result.outcomes) process.stdout.write(`${describeSkillSyncOutcome(o)}
13477
13522
  `);
13478
13523
  if (!dryRun) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tablation/crew",
3
- "version": "0.39.0",
3
+ "version": "0.39.1",
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",