@miraland-labs/conduit-bridge 0.12.2 → 0.12.3
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/dist/ops.js +35 -6
- package/ops/env.example +3 -0
- package/package.json +1 -1
package/dist/ops.js
CHANGED
|
@@ -310,14 +310,43 @@ export async function runOps(verb, argv = [], deps = {}) {
|
|
|
310
310
|
return;
|
|
311
311
|
}
|
|
312
312
|
if (verb === "connect") {
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
313
|
+
const { values } = parseArgs({
|
|
314
|
+
args: argv,
|
|
315
|
+
options: {
|
|
316
|
+
organization: { type: "string", short: "o" },
|
|
317
|
+
url: { type: "string" },
|
|
318
|
+
},
|
|
319
|
+
allowPositionals: true,
|
|
320
|
+
});
|
|
321
|
+
const url = (values.url?.trim() || env.CONDUIT_URL).trim();
|
|
322
|
+
if (!url)
|
|
323
|
+
throw new Error(`Set CONDUIT_URL in ${defaultOpsEnvPath()} or pass --url`);
|
|
324
|
+
// Never silently reuse CONDUIT_ORG from ops.env — a leftover public-org slug skipped
|
|
325
|
+
// "Join which org?" and enrolled the wrong workspace. Pass --organization explicitly, or
|
|
326
|
+
// omit it so join prompts interactively (and suggest the prior slug when present).
|
|
327
|
+
const organization = values.organization?.trim().toLowerCase() || "";
|
|
328
|
+
if (organization && !/^[a-z0-9][a-z0-9-]{0,62}$/.test(organization)) {
|
|
329
|
+
throw new Error("Organization must be its lowercase workspace slug");
|
|
330
|
+
}
|
|
331
|
+
const envPath = env.loadedFrom ?? defaultOpsEnvPath();
|
|
332
|
+
writeOpsEnvFile(envPath, {
|
|
333
|
+
CONDUIT_URL: url,
|
|
334
|
+
...(organization ? { CONDUIT_ORG: organization } : {}),
|
|
335
|
+
});
|
|
336
|
+
const args = ["join", "--url", url];
|
|
337
|
+
if (organization)
|
|
338
|
+
args.push("--organization", organization);
|
|
318
339
|
for (const role of splitOpsList(env.CONDUIT_ROLES))
|
|
319
340
|
args.push("--capability", role);
|
|
320
|
-
console.log(`Connecting to ${
|
|
341
|
+
console.log(`Connecting to ${url} (roles: ${env.CONDUIT_ROLES})`);
|
|
342
|
+
if (organization) {
|
|
343
|
+
console.log(`Organization: ${organization}`);
|
|
344
|
+
}
|
|
345
|
+
else {
|
|
346
|
+
console.log(env.CONDUIT_ORG
|
|
347
|
+
? `Organization not set on the command — join will ask. (ops.env still has ${env.CONDUIT_ORG}; type the slug you want now.)`
|
|
348
|
+
: "Organization not set — join will ask which org to connect.");
|
|
349
|
+
}
|
|
321
350
|
console.log("Approve this computer in Connect when the browser opens.");
|
|
322
351
|
runBridge(args);
|
|
323
352
|
return;
|
package/ops/env.example
CHANGED
|
@@ -8,6 +8,9 @@
|
|
|
8
8
|
#
|
|
9
9
|
# Replace the placeholders below with YOUR org, local checkout, and (optional) git remote.
|
|
10
10
|
CONDUIT_URL=https://api.conduit.miraland.io
|
|
11
|
+
# Leave CONDUIT_ORG unset so `ops connect` asks "Join which org?".
|
|
12
|
+
# Or pass once: ops connect --organization your-org-slug
|
|
13
|
+
# Prefer the Connect UI join command (includes the org you are signed into).
|
|
11
14
|
# CONDUIT_ORG=your-org-slug
|
|
12
15
|
CONDUIT_WORKSPACE=$HOME/path/to/your-repo
|
|
13
16
|
# CONDUIT_REPO=https://github.com/your-org/your-repo.git
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@miraland-labs/conduit-bridge",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.3",
|
|
4
4
|
"description": "Conduit Bridge CLI — join, connect, disconnect, multi-driver lanes, and run Claude Code / Codex / Cursor / OpenCode / Pi / Kiro / Antigravity agents for a Conduit organization",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|