@creativeintelligence/abbie 0.1.5 → 0.1.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.
- package/dist/cli/commands/login.js +26 -0
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
|
@@ -141,6 +141,32 @@ If already authenticated, shows current status. Use --force to re-authenticate.`
|
|
|
141
141
|
}
|
|
142
142
|
// Step 4: Save credentials
|
|
143
143
|
saveClerkId(clerkId);
|
|
144
|
+
// Step 4b: Fetch bridge secret for auto-bridge startup
|
|
145
|
+
try {
|
|
146
|
+
const deployConfig = await client.query(api.functions.auth.tokens.getDeploymentConfig, {
|
|
147
|
+
code,
|
|
148
|
+
deviceId: device.deviceId,
|
|
149
|
+
});
|
|
150
|
+
if (deployConfig.bridgeSecret) {
|
|
151
|
+
const { existsSync, readFileSync, writeFileSync, mkdirSync } = await import("node:fs");
|
|
152
|
+
const { join } = await import("node:path");
|
|
153
|
+
const { homedir } = await import("node:os");
|
|
154
|
+
const configPath = join(homedir(), ".abbie", "config.json");
|
|
155
|
+
const dir = join(homedir(), ".abbie");
|
|
156
|
+
if (!existsSync(dir))
|
|
157
|
+
mkdirSync(dir, { recursive: true });
|
|
158
|
+
let cfg = {};
|
|
159
|
+
try {
|
|
160
|
+
cfg = JSON.parse(readFileSync(configPath, "utf8"));
|
|
161
|
+
}
|
|
162
|
+
catch { /* new file */ }
|
|
163
|
+
cfg.bridgeSecret = deployConfig.bridgeSecret;
|
|
164
|
+
writeFileSync(configPath, JSON.stringify(cfg, null, 2));
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
catch {
|
|
168
|
+
// Non-fatal — bridge can still be started manually
|
|
169
|
+
}
|
|
144
170
|
this.log("");
|
|
145
171
|
this.log(" ✓ authenticated");
|
|
146
172
|
this.log(` user: ${clerkId.slice(0, 16)}...`);
|
package/oclif.manifest.json
CHANGED
|
@@ -11672,5 +11672,5 @@
|
|
|
11672
11672
|
"summary": "Watch workspace windows (tmux panes) and stream updates"
|
|
11673
11673
|
}
|
|
11674
11674
|
},
|
|
11675
|
-
"version": "0.1.
|
|
11675
|
+
"version": "0.1.6"
|
|
11676
11676
|
}
|