@botbuddy/cli 1.65.0 → 1.66.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/daemon/bin/darwin-arm64/botbuddy-daemon +0 -0
- package/daemon/bin/linux-x64/botbuddy-daemon +0 -0
- package/daemon-release/darwin-arm64.json +4 -4
- package/daemon-release/linux-x64.json +4 -4
- package/daemon-release/manifest.json +5 -5
- package/package.json +1 -1
- package/src/agent-doctor.mjs +15 -1
- package/src/agent-session.mjs +5 -0
- package/src/commands.mjs +6 -1
- package/src/wait-core.mjs +12 -0
- package/src/wait.mjs +4 -0
|
Binary file
|
|
Binary file
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"release_version": "1.
|
|
3
|
-
"source_commit": "
|
|
4
|
-
"source_sha256": "
|
|
2
|
+
"release_version": "1.66.1",
|
|
3
|
+
"source_commit": "186cf2389659c39f7a7c4caa3f6fda5bdc54d670",
|
|
4
|
+
"source_sha256": "9809bace87147ec12fee985d3b4877bbefd1b39eabc5f0f047df553f0afcd3a9",
|
|
5
5
|
"target": "darwin-arm64",
|
|
6
|
-
"sha256": "
|
|
6
|
+
"sha256": "c3afe8d4c99efe77db044d4d7bb4aef532436e46cdc75179b0e0a847b3e8b190"
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"release_version": "1.
|
|
3
|
-
"source_commit": "
|
|
4
|
-
"source_sha256": "
|
|
2
|
+
"release_version": "1.66.1",
|
|
3
|
+
"source_commit": "186cf2389659c39f7a7c4caa3f6fda5bdc54d670",
|
|
4
|
+
"source_sha256": "9809bace87147ec12fee985d3b4877bbefd1b39eabc5f0f047df553f0afcd3a9",
|
|
5
5
|
"target": "linux-x64",
|
|
6
|
-
"sha256": "
|
|
6
|
+
"sha256": "d8756014b7ba81cdb244425c82728e42892a5ce701fb435abd65ac8cb2743403"
|
|
7
7
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema_version": 1,
|
|
3
|
-
"release_version": "1.
|
|
4
|
-
"source_commit": "
|
|
5
|
-
"source_sha256": "
|
|
3
|
+
"release_version": "1.66.1",
|
|
4
|
+
"source_commit": "186cf2389659c39f7a7c4caa3f6fda5bdc54d670",
|
|
5
|
+
"source_sha256": "9809bace87147ec12fee985d3b4877bbefd1b39eabc5f0f047df553f0afcd3a9",
|
|
6
6
|
"targets": {
|
|
7
7
|
"darwin-arm64": {
|
|
8
8
|
"goos": "darwin",
|
|
9
9
|
"goarch": "arm64",
|
|
10
10
|
"binary": "daemon/bin/darwin-arm64/botbuddy-daemon",
|
|
11
|
-
"sha256": "
|
|
11
|
+
"sha256": "c3afe8d4c99efe77db044d4d7bb4aef532436e46cdc75179b0e0a847b3e8b190",
|
|
12
12
|
"mode": "0755"
|
|
13
13
|
},
|
|
14
14
|
"linux-x64": {
|
|
15
15
|
"goos": "linux",
|
|
16
16
|
"goarch": "amd64",
|
|
17
17
|
"binary": "daemon/bin/linux-x64/botbuddy-daemon",
|
|
18
|
-
"sha256": "
|
|
18
|
+
"sha256": "d8756014b7ba81cdb244425c82728e42892a5ce701fb435abd65ac8cb2743403",
|
|
19
19
|
"mode": "0755"
|
|
20
20
|
}
|
|
21
21
|
}
|
package/package.json
CHANGED
package/src/agent-doctor.mjs
CHANGED
|
@@ -126,8 +126,19 @@ export function repairFailureRecovery(code, error = null) {
|
|
|
126
126
|
*/
|
|
127
127
|
function applyStackLeaseCapability(report, capability) {
|
|
128
128
|
if (!capability || typeof capability.status !== "string") return;
|
|
129
|
-
|
|
129
|
+
// BOT-3144: the server names this owner's own revoked (disabled) host record; say
|
|
130
|
+
// "refused" rather than a generic "unattested", and make its fix the recovery.
|
|
131
|
+
const revoked = typeof capability.host_state === "string" && capability.host_state.length > 0 && capability.status !== "established";
|
|
132
|
+
report.stack_lease.capability = revoked ? "refused" : capability.status;
|
|
130
133
|
if (capability.reason) report.stack_lease.reason = capability.reason;
|
|
134
|
+
if (revoked) {
|
|
135
|
+
report.stack_lease.host_state = capability.host_state;
|
|
136
|
+
if (typeof capability.host_key === "string") report.stack_lease.host_key = capability.host_key;
|
|
137
|
+
// Codex #1609 P2: the server names the fix (withdrawn consent needs the Helper first).
|
|
138
|
+
if (typeof capability.fix === "string" && capability.fix) report.stack_lease.fix = capability.fix;
|
|
139
|
+
if (!report.recovery) report.recovery = capability.reason ?? `this machine's host record is ${capability.host_state}; set it to maintenance or re-enable it on /docker, then run \`bb doctor --fix\``;
|
|
140
|
+
}
|
|
141
|
+
if (typeof capability.checked_at === "string") report.stack_lease.checked_at = capability.checked_at;
|
|
131
142
|
if (capability.reported_host && capability.enrolled_host) {
|
|
132
143
|
report.stack_lease.hostname_drift = {
|
|
133
144
|
reported: capability.reported_host,
|
|
@@ -207,6 +218,9 @@ export async function doctorAgentAuth({
|
|
|
207
218
|
remediation: "ticketed Codex requires --codex-thread-id <UUID>; ticketed Claude Desktop requires CLAUDE_CODE_HOST_SESSION_ID=local_<uuid>; use --no-ticket-reason for terminal or cloud work without a native link",
|
|
208
219
|
},
|
|
209
220
|
};
|
|
221
|
+
// BOT-3144: a plain `bb doctor` registers nothing, so report the verdict cached by the
|
|
222
|
+
// last registration (with when it was checked) instead of a bare `unverified`.
|
|
223
|
+
if (fresh && !fix) applyStackLeaseCapability(report, state.stack_lease_capability);
|
|
210
224
|
let credential = fresh
|
|
211
225
|
? { token: state.agent_session_token, sessionId: state.session_id, agentId: state.agent_id, source: "cache" }
|
|
212
226
|
: null;
|
package/src/agent-session.mjs
CHANGED
|
@@ -439,6 +439,11 @@ export async function selfHealAgentSession({
|
|
|
439
439
|
...(typeof data.session_token_generation === "string" && data.session_token_generation
|
|
440
440
|
? { session_token_generation: data.session_token_generation }
|
|
441
441
|
: {}),
|
|
442
|
+
// BOT-3144: the registration's stack-lease verdict, so a plain `bb doctor` can
|
|
443
|
+
// report "refused" for a revoked host record instead of `unverified`.
|
|
444
|
+
...(data.stack_lease_capability && typeof data.stack_lease_capability.status === "string"
|
|
445
|
+
? { stack_lease_capability: { ...data.stack_lease_capability, checked_at: issued.toISOString() } }
|
|
446
|
+
: {}),
|
|
442
447
|
};
|
|
443
448
|
if (renewal && !isAgentStateFresh(state, issued, 0)) {
|
|
444
449
|
throw missing("session_mint_invalid", "register_agent returned an invalid replacement session record.");
|
package/src/commands.mjs
CHANGED
|
@@ -423,7 +423,12 @@ export async function cmdDoctor(args, {
|
|
|
423
423
|
log(`agent session: ${result.report.session.status}${result.report.session.minted_with ? ` (minted_with: ${result.report.session.minted_with})` : ""}`);
|
|
424
424
|
if (result.report.stack_lease) {
|
|
425
425
|
const sl = result.report.stack_lease;
|
|
426
|
-
|
|
426
|
+
// BOT-3144: a revoked host record leads with the cause and the fix.
|
|
427
|
+
if (sl.capability === "refused" && sl.host_state) {
|
|
428
|
+
log(`stack lease: refused — this machine's host record is ${sl.host_state}${sl.host_key ? ` (${sl.host_key})` : ""}: ${sl.fix ?? "set it to maintenance or re-enable it on /docker, then run \`bb doctor --fix\`"} (host ${sl.host}${sl.checked_at ? `, checked ${sl.checked_at}` : ""})`);
|
|
429
|
+
} else {
|
|
430
|
+
log(`stack lease: ${sl.capability} (host ${sl.host}, machine id ${sl.machine_id_readable ? "readable" : "unavailable"})${sl.reason ? ` — ${sl.reason}` : ""}${publish ? ` ${formatPublishIp(publish)}` : ""}`);
|
|
431
|
+
}
|
|
427
432
|
if (publish && !isLoopbackIp(publish.publish_ip)) {
|
|
428
433
|
log(`stack publish: leased stacks on this host are reachable beyond loopback (\`bb stack up --local-exec\` refuses; the Helper refuses ports_exposed_beyond_loopback) — fix: ${publishIpFix(publish.engine)}`);
|
|
429
434
|
}
|
package/src/wait-core.mjs
CHANGED
|
@@ -116,6 +116,9 @@ export const SIGNAL_TYPES = Object.freeze([
|
|
|
116
116
|
// It is intentionally consumed through the existing raw `event:` escape
|
|
117
117
|
// hatch rather than adding another parallel wait grammar.
|
|
118
118
|
"host_approval",
|
|
119
|
+
// BOT-3136: one signal per member-issue change of a Linear project (an epic),
|
|
120
|
+
// subject = the project's lower-case UUID. Tenant-primary like linear_issue.
|
|
121
|
+
"linear_project",
|
|
119
122
|
]);
|
|
120
123
|
|
|
121
124
|
const LOCK_SUBTYPES = Object.freeze(["playwright_lane", "vite_port", "backend_port", "supabase_local"]);
|
|
@@ -525,6 +528,15 @@ const VALIDATORS = {
|
|
|
525
528
|
if (p.type === "host_approval" && (!subject || !HOST_APPROVAL_HOST_KEY_RE.test(subject))) {
|
|
526
529
|
throw new Error("event:type=host_approval needs subject=<canonical bbh- host key>");
|
|
527
530
|
}
|
|
531
|
+
// BOT-3136: a project subject is its Linear UUID, matched exactly as the
|
|
532
|
+
// emitter writes it (lower-case), so normalize here and refuse anything else.
|
|
533
|
+
if (p.type === "linear_project") {
|
|
534
|
+
const id = subject ? subject.toLowerCase() : "";
|
|
535
|
+
if (!CANONICAL_UUID_RE.test(id)) {
|
|
536
|
+
throw new Error("event:type=linear_project needs subject=<Linear project UUID>");
|
|
537
|
+
}
|
|
538
|
+
return { type: p.type, subject: id };
|
|
539
|
+
}
|
|
528
540
|
return { type: p.type, subject };
|
|
529
541
|
},
|
|
530
542
|
};
|
package/src/wait.mjs
CHANGED
|
@@ -251,6 +251,10 @@ CONDITIONS (TYPE:key=val,key=val — repeat for several; --any wakes on the fir
|
|
|
251
251
|
event:type=host_approval,subject=bbh-<24 lowercase hex>;
|
|
252
252
|
it wakes only for the authenticated owner's one bound
|
|
253
253
|
tenant after current server-side approval revalidation.
|
|
254
|
+
Epic progress uses
|
|
255
|
+
event:type=linear_project,subject=<Linear project UUID>;
|
|
256
|
+
it wakes when any issue in that project changes, joins
|
|
257
|
+
or leaves it (the band's epic row, BOT-3136).
|
|
254
258
|
|
|
255
259
|
OPTIONS
|
|
256
260
|
Review intervention: exact-head Codex waits have a durable one-shot diagnostic.
|