@tablation/crew 0.53.7 → 0.54.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.
- package/README.md +7 -0
- package/dist/cli.js +13 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -177,6 +177,13 @@ reality: the checkouts, the tools on PATH, the agent binary, the repo's hooks,
|
|
|
177
177
|
and whether the board answers. Nothing writes, wakes an agent or deploys until
|
|
178
178
|
a route has `enabled: true`.
|
|
179
179
|
|
|
180
|
+
A secondary workspace is addressed as `<primary>:<slug>`:
|
|
181
|
+
`crew connect paradium:issues` (or `paradium:issues/<project>`, or
|
|
182
|
+
`--workspace-id paradium:issues`) connects to it, and the route, keychain
|
|
183
|
+
entry, seat-key name and repos directory all carry that segment verbatim
|
|
184
|
+
(`paradium:issues/issues`, `~/Crew/paradium:issues/<repo>`). Finder shows
|
|
185
|
+
the colon in that directory as a slash; `--dir` overrides the location.
|
|
186
|
+
|
|
180
187
|
Then install it as a real service:
|
|
181
188
|
|
|
182
189
|
```sh
|
package/dist/cli.js
CHANGED
|
@@ -91,6 +91,11 @@ function pickWorktreeRoute(ticketNumber, candidates) {
|
|
|
91
91
|
error: `no open ticket ISSUE-${ticketNumber} served by this ship \u2014 looked on ${looked}` + (found.length ? `; found it only on ${found.join(", ")}, which has no checkout for its repo` : "")
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
|
+
function splitConnectArg(arg) {
|
|
95
|
+
if (!arg?.includes("/")) return [arg, void 0];
|
|
96
|
+
const i = arg.indexOf("/");
|
|
97
|
+
return [arg.slice(0, i), arg.slice(i + 1)];
|
|
98
|
+
}
|
|
94
99
|
|
|
95
100
|
// src/config.ts
|
|
96
101
|
import { readFileSync as readFileSync6, existsSync as existsSync7 } from "fs";
|
|
@@ -11359,7 +11364,7 @@ async function listWorkspaces(o) {
|
|
|
11359
11364
|
o,
|
|
11360
11365
|
"/auth/my-workspaces"
|
|
11361
11366
|
);
|
|
11362
|
-
return res.workspaces.map((w) => ({ slug: w.slug, name: w.name, role: w.role }));
|
|
11367
|
+
return res.workspaces.map((w) => ({ slug: w.path ?? w.slug, name: w.name, role: w.role }));
|
|
11363
11368
|
}
|
|
11364
11369
|
var eq = (a, b) => (a ?? "").trim().toLowerCase() === b.trim().toLowerCase();
|
|
11365
11370
|
function seatFor(rows, role) {
|
|
@@ -11374,10 +11379,10 @@ async function missingTables(o, projectId) {
|
|
|
11374
11379
|
async function discover(o) {
|
|
11375
11380
|
const problems = [];
|
|
11376
11381
|
const provisioning = [];
|
|
11377
|
-
const ws = await get(o, `/workspaces/${o.workspace}`);
|
|
11382
|
+
const ws = await get(o, `/workspaces/${encodeURIComponent(o.workspace).replace(/%3A/gi, ":")}`);
|
|
11378
11383
|
const out = {
|
|
11379
11384
|
workspaceId: ws.id,
|
|
11380
|
-
workspaceSlug: ws.slug,
|
|
11385
|
+
workspaceSlug: ws.path ?? ws.slug,
|
|
11381
11386
|
workspaceName: ws.name,
|
|
11382
11387
|
models: {},
|
|
11383
11388
|
seats: {},
|
|
@@ -15836,7 +15841,7 @@ ${reconstruction.prompt}
|
|
|
15836
15841
|
}
|
|
15837
15842
|
case "connect": {
|
|
15838
15843
|
const arg = positional[1];
|
|
15839
|
-
const [argWorkspace, argProject] =
|
|
15844
|
+
const [argWorkspace, argProject] = splitConnectArg(arg);
|
|
15840
15845
|
let workspace = argWorkspace ?? value("workspace-id") ?? value("workspace");
|
|
15841
15846
|
const project = argProject ?? value("project");
|
|
15842
15847
|
const baseUrl = value("base-url") ?? cfg.routes[0]?.baseUrl ?? DEFAULT_BASE_URL;
|
|
@@ -15905,10 +15910,11 @@ Signed in as ${result.identity.email} \u2014 minted an API key in workspace "${r
|
|
|
15905
15910
|
);
|
|
15906
15911
|
apiKey = result.apiKey.key;
|
|
15907
15912
|
mintedFromDevice = true;
|
|
15908
|
-
|
|
15913
|
+
const deviceWorkspace = "path" in result.workspace && typeof result.workspace.path === "string" ? result.workspace.path : result.workspace.slug;
|
|
15914
|
+
if (!workspace) workspace = deviceWorkspace;
|
|
15909
15915
|
if (store) {
|
|
15910
15916
|
try {
|
|
15911
|
-
await store.set(hostFromUrl3(baseUrl),
|
|
15917
|
+
await store.set(hostFromUrl3(baseUrl), deviceWorkspace, {
|
|
15912
15918
|
apiKey: result.apiKey.key,
|
|
15913
15919
|
shipId: getOrCreateShipId(),
|
|
15914
15920
|
workspaceId: result.workspace.id,
|
|
@@ -15917,7 +15923,7 @@ Signed in as ${result.identity.email} \u2014 minted an API key in workspace "${r
|
|
|
15917
15923
|
});
|
|
15918
15924
|
keychainBacked = true;
|
|
15919
15925
|
process.stderr.write(
|
|
15920
|
-
`API key stored in the OS keychain for ${hostFromUrl3(baseUrl)}/${
|
|
15926
|
+
`API key stored in the OS keychain for ${hostFromUrl3(baseUrl)}/${deviceWorkspace}.
|
|
15921
15927
|
`
|
|
15922
15928
|
);
|
|
15923
15929
|
} catch (e) {
|
package/package.json
CHANGED