@botbuddy/cli 1.88.0 → 1.88.2
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/docker-hygiene.mjs +2 -2
- package/src/stack.mjs +21 -5
|
Binary file
|
|
Binary file
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"release_version": "1.88.
|
|
3
|
-
"source_commit": "
|
|
4
|
-
"source_sha256": "
|
|
2
|
+
"release_version": "1.88.2",
|
|
3
|
+
"source_commit": "bc1a21c76af18084bde267f81c9c1e4babfeea99",
|
|
4
|
+
"source_sha256": "1236729513ba83facc004c8af3b5b4e9a4327875d7e73ca66de02fb07c4a9bd9",
|
|
5
5
|
"target": "darwin-arm64",
|
|
6
|
-
"sha256": "
|
|
6
|
+
"sha256": "533ec720f588a3083b5ce0d685872cd0883a8604ee34b919c784c75b288e092c"
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"release_version": "1.88.
|
|
3
|
-
"source_commit": "
|
|
4
|
-
"source_sha256": "
|
|
2
|
+
"release_version": "1.88.2",
|
|
3
|
+
"source_commit": "bc1a21c76af18084bde267f81c9c1e4babfeea99",
|
|
4
|
+
"source_sha256": "1236729513ba83facc004c8af3b5b4e9a4327875d7e73ca66de02fb07c4a9bd9",
|
|
5
5
|
"target": "linux-x64",
|
|
6
|
-
"sha256": "
|
|
6
|
+
"sha256": "f2217b45cdf09496243e34e99414106750289ec0077a14f91d8268f3b071e6e8"
|
|
7
7
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema_version": 1,
|
|
3
|
-
"release_version": "1.88.
|
|
4
|
-
"source_commit": "
|
|
5
|
-
"source_sha256": "
|
|
3
|
+
"release_version": "1.88.2",
|
|
4
|
+
"source_commit": "bc1a21c76af18084bde267f81c9c1e4babfeea99",
|
|
5
|
+
"source_sha256": "1236729513ba83facc004c8af3b5b4e9a4327875d7e73ca66de02fb07c4a9bd9",
|
|
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": "533ec720f588a3083b5ce0d685872cd0883a8604ee34b919c784c75b288e092c",
|
|
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": "f2217b45cdf09496243e34e99414106750289ec0077a14f91d8268f3b071e6e8",
|
|
19
19
|
"mode": "0755"
|
|
20
20
|
}
|
|
21
21
|
}
|
package/package.json
CHANGED
package/src/docker-hygiene.mjs
CHANGED
|
@@ -156,7 +156,7 @@ LIFECYCLE
|
|
|
156
156
|
finish or reap that stack before starting another. Run preflight before start.
|
|
157
157
|
When pressure warns or refuses: on OrbStack, run ticket-scoped dry-run hygiene;
|
|
158
158
|
on Docker Desktop (where hygiene stays OrbStack-only) release your own idle stack
|
|
159
|
-
with 'botbuddy stack done <lease>' instead.
|
|
159
|
+
with 'botbuddy stack done <lease> --reap' instead.
|
|
160
160
|
|
|
161
161
|
PERSISTENT ORBSTACK GHOSTS
|
|
162
162
|
If an exact ID remains listed but OrbStack cannot inspect it, inventory is
|
|
@@ -1009,7 +1009,7 @@ function recommendationFor(opts, apply = false, candidates = [], engine = "orbst
|
|
|
1009
1009
|
// container removal here: it bypasses hygiene's ticket filter, reviewed
|
|
1010
1010
|
// candidate IDs, and file/stack locks, so on a shared host it could delete a
|
|
1011
1011
|
// stopped service belonging to another live stack (Codex round-7 P2).
|
|
1012
|
-
return `docker hygiene is OrbStack-only; on ${engine} reduce Docker load by releasing your own idle stack leases (botbuddy stack done <lease>), then retry`;
|
|
1012
|
+
return `docker hygiene is OrbStack-only; on ${engine} reduce Docker load by releasing your own idle stack leases (botbuddy stack done <lease> --reap), then retry`;
|
|
1013
1013
|
}
|
|
1014
1014
|
return `botbuddy docker hygiene ${selector}${ticket}`;
|
|
1015
1015
|
}
|
package/src/stack.mjs
CHANGED
|
@@ -390,7 +390,7 @@ ${bold("REMOTE LEASES")} (BOT-2142, stack run)
|
|
|
390
390
|
5 NO_HELPER_HOST no co-located host admits and no owned host qualifies as remote
|
|
391
391
|
5 NO_COLOCATED_HELPER_HOST --local-only (or stack up / --local-exec): this machine has no active Docker
|
|
392
392
|
host (none enrolled, or draining/maintenance/retired) — run without --local-only
|
|
393
|
-
4 STACK_EXECUTION_MODE_MISMATCH the slot already holds a lease in another mode/host — stack done it first
|
|
393
|
+
4 STACK_EXECUTION_MODE_MISMATCH the slot already holds a lease in another mode/host — stack done <lease> --reap it first
|
|
394
394
|
(the four codes above create NO lease)
|
|
395
395
|
5 BUNDLE_UPLOAD_FAILED the signed bundle upload failed (the lease is released first)
|
|
396
396
|
5 CALLBACK_NOT_LOOPBACK --callback-port (pinned legacy -R): the GatewayPorts probe (before any real -R)
|
|
@@ -1533,6 +1533,19 @@ export function staleContextFenceScope(data) {
|
|
|
1533
1533
|
return data?.code === "STALE_AGENT_CONTEXT" && (data.fence_scope === "session" || data.fence_scope === "agent") ? data.fence_scope : null;
|
|
1534
1534
|
}
|
|
1535
1535
|
|
|
1536
|
+
/** BOT-3275: the shape-checked fields of a stale-context refusal, kept when an admission answer is rebuilt. */
|
|
1537
|
+
export function staleContextRefusalFields(data) {
|
|
1538
|
+
const fenceScope = staleContextFenceScope(data);
|
|
1539
|
+
const ticketField = (value) => (typeof value === "string" && STALE_CONTEXT_TICKET_RE.test(value) ? value : null);
|
|
1540
|
+
const registered = ticketField(data?.registered_ticket_id);
|
|
1541
|
+
const requested = ticketField(data?.requested_ticket_id);
|
|
1542
|
+
return {
|
|
1543
|
+
...(registered ? { registered_ticket_id: registered } : {}),
|
|
1544
|
+
...(requested ? { requested_ticket_id: requested } : {}),
|
|
1545
|
+
...(fenceScope ? { fence_scope: fenceScope } : {}),
|
|
1546
|
+
};
|
|
1547
|
+
}
|
|
1548
|
+
|
|
1536
1549
|
/** BOT-2977: the ticket this checkout's branch names (null when none), read only for a stale-context refusal. */
|
|
1537
1550
|
export async function currentBranchTicket(cwd = process.cwd()) {
|
|
1538
1551
|
try {
|
|
@@ -2363,7 +2376,7 @@ export const HELPER_ERA_ACTIVATED_AT = Date.parse("2026-09-01T00:00:00Z");
|
|
|
2363
2376
|
export function targetlessHelperLeaseRefusal(lease, leaseId) {
|
|
2364
2377
|
const activatedAt = Date.parse(lease?.activated_at ?? "");
|
|
2365
2378
|
if (lease?.connection?.botbuddy_docker_target || !(activatedAt >= HELPER_ERA_ACTIVATED_AT)) return null;
|
|
2366
|
-
return `this lease was provisioned by the Helper; release it with \`bb stack done ${leaseId}\` (no --local-exec) ` +
|
|
2379
|
+
return `this lease was provisioned by the Helper; release it with \`bb stack done ${leaseId} --reap\` (no --local-exec) ` +
|
|
2367
2380
|
"from the owning session, or ask the operator; lease and slot remain fenced";
|
|
2368
2381
|
}
|
|
2369
2382
|
|
|
@@ -3351,7 +3364,7 @@ async function cmdUpOnce(opts, {
|
|
|
3351
3364
|
command: "up", outcome: "refused", lease_id: leaseId, state: "active", slot,
|
|
3352
3365
|
error: `refusing --local-exec: the active lease is bound to ${g.worktree_root || "<unknown>"} / stack_path "${leaseStackPath}", ` +
|
|
3353
3366
|
`not the validated ${execution.worktreeRoot} / "${execution.stackPath}" — an existing lease for this slot was reused and ` +
|
|
3354
|
-
|
|
3367
|
+
`points at a different (possibly shared) stack. Release that lease with \`bb stack done ${leaseId} --reap\`, or use a slot dedicated to this stack.`,
|
|
3355
3368
|
observed_worktree_root: g.worktree_root || null, observed_stack_path: leaseStackPath,
|
|
3356
3369
|
}), opts, EXIT.LEASE_FAILED);
|
|
3357
3370
|
}
|
|
@@ -3364,7 +3377,7 @@ async function cmdUpOnce(opts, {
|
|
|
3364
3377
|
command: "up", outcome: "refused", lease_id: leaseId, state: "active", slot,
|
|
3365
3378
|
error: "refusing --local-exec: reused an existing active lease with no persisted provisioned identity " +
|
|
3366
3379
|
"(project_id) — a pre-1.32 lease recorded this stack_path but may have provisioned the shared worktree root, so its " +
|
|
3367
|
-
|
|
3380
|
+
`connection cannot be trusted as the isolated stack. Release it with \`bb stack done ${leaseId} --reap\` and re-provision, or use a dedicated slot.`,
|
|
3368
3381
|
}), opts, EXIT.LEASE_FAILED);
|
|
3369
3382
|
}
|
|
3370
3383
|
}
|
|
@@ -4668,7 +4681,10 @@ async function runStackLifecycleOnce(opts, childArgv, adapters, incidentBox) {
|
|
|
4668
4681
|
...(res.data?.phase ? { phase: res.data.phase } : {}), ...(res.data?.wait ? { wait: res.data.wait } : {}),
|
|
4669
4682
|
// BOT-2812: the database ran the call and rolled it back; its SQLSTATE names the class.
|
|
4670
4683
|
...(code === "ADMISSION_FAILED" && SQLSTATE_RE.test(res.data?.sqlstate ?? "") ? { sqlstate: res.data.sqlstate } : {}),
|
|
4671
|
-
...(code === HOST_CAPACITY_SOURCE_STALE_CODE ? capacityStaleReceiptFields(res.data) : {})
|
|
4684
|
+
...(code === HOST_CAPACITY_SOURCE_STALE_CODE ? capacityStaleReceiptFields(res.data) : {}),
|
|
4685
|
+
// BOT-3275: the fence's own answer, so the hint names both tickets and the
|
|
4686
|
+
// receipt and outcome row carry which fence refused (BOT-2977).
|
|
4687
|
+
...(code === "STALE_AGENT_CONTEXT" ? staleContextRefusalFields(res.data) : {}) } };
|
|
4672
4688
|
} else {
|
|
4673
4689
|
const ack = identifiedAdmissionAck(res.data, leaseArgs.request_id);
|
|
4674
4690
|
// A malformed or foreign ACK is untrusted: never cleanup authority, never adopted.
|