bamboo-agents 0.1.5-dev.17 → 0.1.5-dev.19
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/VERSION +1 -1
- package/dist/index.js +27 -9
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/dist/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.5-dev.
|
|
1
|
+
0.1.5-dev.19
|
package/dist/index.js
CHANGED
|
@@ -3037,7 +3037,7 @@ var VERSION;
|
|
|
3037
3037
|
var init_version = __esm({
|
|
3038
3038
|
"src/version.ts"() {
|
|
3039
3039
|
"use strict";
|
|
3040
|
-
VERSION = "0.1.5-dev.
|
|
3040
|
+
VERSION = "0.1.5-dev.19";
|
|
3041
3041
|
}
|
|
3042
3042
|
});
|
|
3043
3043
|
|
|
@@ -12277,9 +12277,8 @@ var init_provision_phase = __esm({
|
|
|
12277
12277
|
} catch (err) {
|
|
12278
12278
|
if (err instanceof ApiError && err.status === 401) {
|
|
12279
12279
|
return {
|
|
12280
|
-
status: "
|
|
12281
|
-
summary: "session expired"
|
|
12282
|
-
reason: "Your Bamboo session expired. Run `bamboo-agents login` to refresh, then re-run."
|
|
12280
|
+
status: "needs_relogin",
|
|
12281
|
+
summary: "session expired \u2014 refreshing"
|
|
12283
12282
|
};
|
|
12284
12283
|
}
|
|
12285
12284
|
return {
|
|
@@ -12626,18 +12625,18 @@ async function preflightSummary() {
|
|
|
12626
12625
|
const creds = await readCredentials();
|
|
12627
12626
|
const config = await readConfig();
|
|
12628
12627
|
if (!creds) {
|
|
12629
|
-
return "Bamboo: not
|
|
12628
|
+
return "Bamboo: not signed in \u2192 will set up your workspace and launch Claude.";
|
|
12630
12629
|
}
|
|
12631
12630
|
const handle = creds.github_username ? `@${creds.github_username}` : "you";
|
|
12632
12631
|
const ttlBufferMs = 5 * 60 * 1e3;
|
|
12633
12632
|
const ghExpired = creds.github_token_expires_at && new Date(creds.github_token_expires_at).getTime() - Date.now() <= ttlBufferMs;
|
|
12634
12633
|
if (ghExpired) {
|
|
12635
|
-
return `Bamboo:
|
|
12634
|
+
return `Bamboo: signed in as ${handle}, GitHub token expired \u2192 will refresh and launch Claude.`;
|
|
12636
12635
|
}
|
|
12637
12636
|
if (!config) {
|
|
12638
|
-
return `Bamboo:
|
|
12637
|
+
return `Bamboo: signed in as ${handle} \u2192 setting up your workspace and launching Claude.`;
|
|
12639
12638
|
}
|
|
12640
|
-
return `Bamboo:
|
|
12639
|
+
return `Bamboo: signed in as ${handle}, workspace at ${config.repo_path} \u2192 launching Claude.`;
|
|
12641
12640
|
}
|
|
12642
12641
|
function printNeedsAction(reason) {
|
|
12643
12642
|
console.error("");
|
|
@@ -12664,7 +12663,26 @@ async function runOrchestrator() {
|
|
|
12664
12663
|
cwd: process.cwd()
|
|
12665
12664
|
};
|
|
12666
12665
|
for (const phase of PHASES) {
|
|
12667
|
-
|
|
12666
|
+
let probe = await phase.probe(ctx);
|
|
12667
|
+
if (probe.status === "needs_relogin") {
|
|
12668
|
+
console.log("");
|
|
12669
|
+
console.log(
|
|
12670
|
+
" Your Bamboo session expired \u2014 refreshing in your browser\u2026"
|
|
12671
|
+
);
|
|
12672
|
+
console.log("");
|
|
12673
|
+
const reloginResult = await loginSpec.execute(ctx);
|
|
12674
|
+
if (reloginResult.kind === "needs_action") {
|
|
12675
|
+
printNeedsAction(reloginResult.reason);
|
|
12676
|
+
process.exit(2);
|
|
12677
|
+
}
|
|
12678
|
+
probe = await phase.probe(ctx);
|
|
12679
|
+
if (probe.status === "needs_relogin") {
|
|
12680
|
+
printNeedsAction(
|
|
12681
|
+
"Couldn't refresh your Bamboo session. Try again in a minute, or run `bamboo-agents doctor`."
|
|
12682
|
+
);
|
|
12683
|
+
process.exit(2);
|
|
12684
|
+
}
|
|
12685
|
+
}
|
|
12668
12686
|
if (probe.status === "needs_action") {
|
|
12669
12687
|
printNeedsAction(probe.reason ?? probe.summary);
|
|
12670
12688
|
process.exit(2);
|