usebeeline 0.0.4 → 0.0.5
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/usebeeline.mjs +9 -6
- package/package.json +1 -1
package/dist/usebeeline.mjs
CHANGED
|
@@ -56255,7 +56255,10 @@ async function installCurrentRelease(fetchImpl) {
|
|
|
56255
56255
|
}
|
|
56256
56256
|
});
|
|
56257
56257
|
await activateRelease(layout, releaseId);
|
|
56258
|
-
return
|
|
56258
|
+
return {
|
|
56259
|
+
binary: resolve37(layout.binDir, "beeline"),
|
|
56260
|
+
version: published.version ?? releaseId
|
|
56261
|
+
};
|
|
56259
56262
|
}
|
|
56260
56263
|
function providerEnvironment(selection) {
|
|
56261
56264
|
if (!selection.provider || !selection.apiKey)
|
|
@@ -56315,12 +56318,12 @@ async function runInstalledFinish(binary, grantPath) {
|
|
|
56315
56318
|
});
|
|
56316
56319
|
});
|
|
56317
56320
|
}
|
|
56318
|
-
async function brassSpinner(message2, action) {
|
|
56321
|
+
async function brassSpinner(message2, action, completion) {
|
|
56319
56322
|
const spinner2 = spinner({ output: clackPromptOutput() });
|
|
56320
56323
|
spinner2.start(brass(message2));
|
|
56321
56324
|
try {
|
|
56322
56325
|
const result = await action();
|
|
56323
|
-
spinner2.stop(brass(
|
|
56326
|
+
spinner2.stop(brass(completion(result)));
|
|
56324
56327
|
return result;
|
|
56325
56328
|
} catch (error) {
|
|
56326
56329
|
spinner2.stop("Failed");
|
|
@@ -56339,8 +56342,8 @@ async function runConnectCommand(code, options = {}) {
|
|
|
56339
56342
|
const selection = await collectConnectWizard();
|
|
56340
56343
|
const fetchImpl = options.fetchImpl ?? fetch;
|
|
56341
56344
|
const baseUrl = (process.env.BEELINE_AUTH_URL ?? "https://server.usebeeline.app").replace(/\/$/, "");
|
|
56342
|
-
const grant = await brassSpinner("Connecting to your Beeline Workspace\u2026", () => requestConnectGrant(baseUrl, pairingCode, selection, fetchImpl));
|
|
56343
|
-
const
|
|
56345
|
+
const grant = await brassSpinner("Connecting to your Beeline Workspace\u2026", () => requestConnectGrant(baseUrl, pairingCode, selection, fetchImpl), (connectedGrant) => `Connected to ${connectedGrant.workspace_name}`);
|
|
56346
|
+
const installedRelease = await brassSpinner("Installing the Beeline daemon\u2026", () => installCurrentRelease(fetchImpl), (release) => `Installed Beeline helper ${release.version}`);
|
|
56344
56347
|
const llmEnvFile = await writeProviderEnv(selection, grant.agent_pubkey);
|
|
56345
56348
|
const grantPath = resolve37(defaultSupervisorRoot(process.env), "beeline", "connect", `grant-${process.pid}-${Date.now()}.json`);
|
|
56346
56349
|
await writePrivateJson(grantPath, {
|
|
@@ -56357,7 +56360,7 @@ async function runConnectCommand(code, options = {}) {
|
|
|
56357
56360
|
daemonExchangeToken: grant.daemon_exchange_token,
|
|
56358
56361
|
...llmEnvFile ? { llmEnvFile } : {}
|
|
56359
56362
|
});
|
|
56360
|
-
await brassSpinner("Starting your agent\u2026", () => runInstalledFinish(
|
|
56363
|
+
await brassSpinner("Starting your agent\u2026", () => runInstalledFinish(installedRelease.binary, grantPath), () => `Started ${grant.agent_name}`);
|
|
56361
56364
|
console.log("");
|
|
56362
56365
|
console.log(`${brass("Agent")} ${grant.agent_name}`);
|
|
56363
56366
|
console.log(`${brass("Workspace")} ${grant.workspace_name}`);
|