@botbuddy/cli 1.106.0 → 1.106.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/CHANGELOG.md +8 -0
- 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/commands.mjs +2 -1
- package/src/run.mjs +13 -0
- package/src/stack.mjs +24 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.106.2
|
|
4
|
+
|
|
5
|
+
- BOT-3025: `bb stack run --host <host> --callback-port N` now goes through the identified admission like an unpinned run: it asks for `callback_policy auto` (the pin is sent as `host_key`) and reserves a requester origin. On a Linux Go host (protocol 5) the lease answers `native_origin_v1` and the callback takes the native route, instead of the loopback `-R` that a Linux container cannot reach through `host.docker.internal`; generated GoTrue links name the requester origin, never the unforwarded remote API port. A pin to a host that cannot serve the native route is refused `HOST_CALLBACK_TRANSPORT_UNSUPPORTED` before the child starts (never a fallback to `-R`). A pin that names this machine stays co-located and unchanged. `--stack-path` and fixed-nonce runs keep the legacy path, and a beta-ring `--host` pin is still refused a requester origin.
|
|
6
|
+
|
|
7
|
+
## 1.106.1
|
|
8
|
+
|
|
9
|
+
- `bb run status --help` shows the status, inspection and log commands without reporting an invalid run or contacting BotBuddy.
|
|
10
|
+
|
|
3
11
|
## 1.106.0
|
|
4
12
|
|
|
5
13
|
- BOT-3464: a test child on a fleet host can report its own timing. `bb stack run --test-child` binds the test run it records (`BOTBUDDY_TEST_RUN_ID`, set by `bb test`), and the host daemon gives the child a credential of its own run, 0600 at `$BOTBUDDY_HOST_CHILD_CREDENTIAL_FILE`. Inside the child `bb` is the daemon binary, whose `bb call` now sends `get_stack_lease` and `update_test_run` (only those) with that credential to the daemon's own control plane (`BOTBUDDY_SERVER_URL`); the Node CLI's `bb call` does the same in a host child when no other credential resolves. Both read it only from an owner-only regular file. It reads only the run's lease (`get_stack_lease`) and merges only `<name>_timing` metadata into only the bound test run (`update_test_run`), while the run is live. Needs MCP 2.146.0 and this daemon on the host; an older side keeps today's behaviour.
|
|
Binary file
|
|
Binary file
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"release_version": "1.106.
|
|
3
|
-
"source_commit": "
|
|
4
|
-
"source_sha256": "
|
|
2
|
+
"release_version": "1.106.2",
|
|
3
|
+
"source_commit": "b0bab35ab46bec60cf4554a7c4df08554d8c5624",
|
|
4
|
+
"source_sha256": "916aff86d976c832370e70811cb633b742aa0cb722c8ce0c21282d14981dc3e7",
|
|
5
5
|
"target": "darwin-arm64",
|
|
6
|
-
"sha256": "
|
|
6
|
+
"sha256": "67e07a4b8f1bbc17582df37f4758650542e145b7ebbdf26e0f5579a73cbca367"
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"release_version": "1.106.
|
|
3
|
-
"source_commit": "
|
|
4
|
-
"source_sha256": "
|
|
2
|
+
"release_version": "1.106.2",
|
|
3
|
+
"source_commit": "b0bab35ab46bec60cf4554a7c4df08554d8c5624",
|
|
4
|
+
"source_sha256": "916aff86d976c832370e70811cb633b742aa0cb722c8ce0c21282d14981dc3e7",
|
|
5
5
|
"target": "linux-x64",
|
|
6
|
-
"sha256": "
|
|
6
|
+
"sha256": "19b110b0ef1bf918cdaf02791bb25c0991f5963fad0bf35dfc0ab705d79a43df"
|
|
7
7
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema_version": 1,
|
|
3
|
-
"release_version": "1.106.
|
|
4
|
-
"source_commit": "
|
|
5
|
-
"source_sha256": "
|
|
3
|
+
"release_version": "1.106.2",
|
|
4
|
+
"source_commit": "b0bab35ab46bec60cf4554a7c4df08554d8c5624",
|
|
5
|
+
"source_sha256": "916aff86d976c832370e70811cb633b742aa0cb722c8ce0c21282d14981dc3e7",
|
|
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": "67e07a4b8f1bbc17582df37f4758650542e145b7ebbdf26e0f5579a73cbca367",
|
|
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": "19b110b0ef1bf918cdaf02791bb25c0991f5963fad0bf35dfc0ab705d79a43df",
|
|
19
19
|
"mode": "0755"
|
|
20
20
|
}
|
|
21
21
|
}
|
package/package.json
CHANGED
package/src/commands.mjs
CHANGED
|
@@ -15,7 +15,7 @@ import { CallUsageError, discoveryUrlFor, formatDiscovery, parseCallArgs } from
|
|
|
15
15
|
import { cmdStack } from "./stack.mjs";
|
|
16
16
|
import { cmdManagedAllocation } from "./managed-allocation.mjs";
|
|
17
17
|
import { cmdDocker } from "./docker-hygiene.mjs";
|
|
18
|
-
import { cmdRun } from "./run.mjs";
|
|
18
|
+
import { cmdRun, isRunStatusHelp } from "./run.mjs";
|
|
19
19
|
import { cmdPush } from "./push.mjs";
|
|
20
20
|
import { cmdTest } from "./test-lane.mjs";
|
|
21
21
|
import { cmdEvidence } from "./evidence.mjs";
|
|
@@ -118,6 +118,7 @@ export async function run(argv, {
|
|
|
118
118
|
// Creating or reading local feedback guidance must work even when the
|
|
119
119
|
// credential store or network is the reason the agent is blocked.
|
|
120
120
|
if (command === "feedback" && (args[0] === "init" || HELP_WORDS.has(args[0]))) return cmdFeedback(args);
|
|
121
|
+
if (command === "run" && isRunStatusHelp(args)) return cmdRun(args);
|
|
121
122
|
|
|
122
123
|
await load();
|
|
123
124
|
if (shouldCheckForUpdates([command, ...args])) await warnStale({ version: VERSION });
|
package/src/run.mjs
CHANGED
|
@@ -1280,6 +1280,13 @@ export async function retryTerminalUpdate(context, update, call, {
|
|
|
1280
1280
|
}
|
|
1281
1281
|
}
|
|
1282
1282
|
|
|
1283
|
+
export function isRunStatusHelp(args) {
|
|
1284
|
+
if (args[0] !== "status") return false;
|
|
1285
|
+
const separator = args.indexOf("--");
|
|
1286
|
+
const flags = separator < 0 ? args : args.slice(0, separator);
|
|
1287
|
+
return flags.includes("--help") || flags.includes("-h");
|
|
1288
|
+
}
|
|
1289
|
+
|
|
1283
1290
|
export async function cmdRun(args) {
|
|
1284
1291
|
if (args[0] === "--worker") {
|
|
1285
1292
|
await runWorker(args[1]);
|
|
@@ -1300,6 +1307,12 @@ export async function cmdRun(args) {
|
|
|
1300
1307
|
process.exitCode = result.classification === "rejected" ? EXIT.INVALID : EXIT.OK;
|
|
1301
1308
|
return;
|
|
1302
1309
|
}
|
|
1310
|
+
if (isRunStatusHelp(args)) {
|
|
1311
|
+
const candidate = args.slice(1).find((arg) => !arg.startsWith("-"));
|
|
1312
|
+
const id = candidate && /^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$/.test(candidate) ? candidate : "<run_id>";
|
|
1313
|
+
console.log(`bb run status ${id}\n Show observed test counts and exact receipt, test-event and log commands when available. Unknown counts remain unknown.\n\nbb run inspect ${id}\n Inspect the owned detached run and its observed state.\n\nbb run logs ${id} --tail 100\n Read the owned local log snapshot when available.\n\n${id === "<run_id>" ? "Replace <run_id> with your run ID. " : ""}The status response contains the exact available local commands and paths for this run.`);
|
|
1314
|
+
return;
|
|
1315
|
+
}
|
|
1303
1316
|
if (args[0] === "status") {
|
|
1304
1317
|
const result = await statusRun(args[1] ?? "");
|
|
1305
1318
|
oneLine(result, false);
|
package/src/stack.mjs
CHANGED
|
@@ -73,9 +73,10 @@ export const STACK_SCHEMA_VERSION = 1;
|
|
|
73
73
|
* BOT-2780 / BOT-2788: a `stack run` that may be served by another host reserves a requester
|
|
74
74
|
* origin and allocates through BOT-2499's identified admission. Stable (the default ring):
|
|
75
75
|
* auto or remote placement, with or without `--reap` (an idle stack is continued on the same
|
|
76
|
-
* logical origin by a later run), callback runs included (BOT-2775 stable
|
|
77
|
-
* for callback_policy auto, see runStackLifecycle
|
|
78
|
-
* path, a fixed nonce or a co-located placement
|
|
76
|
+
* logical origin by a later run), callback runs and `--host` pins included (BOT-2775 stable
|
|
77
|
+
* activation: they ask for callback_policy auto, see runStackLifecycle; BOT-3025: the pin is
|
|
78
|
+
* placement only); runs with a prepared stack path, a fixed nonce or a co-located placement
|
|
79
|
+
* keep the legacy path unchanged. Beta:
|
|
79
80
|
* BOT-2780's `--remote --reap` gate, which refuses those contexts instead.
|
|
80
81
|
*/
|
|
81
82
|
export const requesterOriginEnabled = (opts) => {
|
|
@@ -83,7 +84,11 @@ export const requesterOriginEnabled = (opts) => {
|
|
|
83
84
|
// Beta keeps BOT-2780's gate (remote + --reap); its idle/callback runs stay on BOT-2775's path.
|
|
84
85
|
if (opts.executionRing === "beta") return opts.execution === "remote" && opts.reap === true;
|
|
85
86
|
if (opts.execution != null && opts.execution !== "auto" && opts.execution !== "remote") return false;
|
|
86
|
-
|
|
87
|
+
// BOT-3025: a --host pin only constrains placement (the identified admission carries it as
|
|
88
|
+
// host_key), so a pinned run gets the same origin and callback_policy auto as an unpinned one.
|
|
89
|
+
// Without them a pinned callback took the loopback -R, which a Linux container cannot reach, and
|
|
90
|
+
// GoTrue links named the unforwarded remote API port.
|
|
91
|
+
return opts.stackNonce == null && (opts.stackPath == null || opts.stackPath === "" || opts.stackPath === ".");
|
|
87
92
|
};
|
|
88
93
|
// Exact replays of one identified request after an uncertain answer (lost response, 5xx,
|
|
89
94
|
// ADMISSION_UNCERTAIN, pending delivery). The same request_id can never create a second lease.
|
|
@@ -345,7 +350,8 @@ ${bold("run OPTIONS")}
|
|
|
345
350
|
--execution-ring R Capacity rollout ring: stable (default) excludes beta daemon hosts.
|
|
346
351
|
beta is explicit opt-in and requires \`stack run --remote\`.
|
|
347
352
|
Requester origin (BOT-2780/BOT-2788): a stable \`stack run\` that may be
|
|
348
|
-
served remotely (auto or --remote
|
|
353
|
+
served remotely (auto or --remote, --host and --callback-port included;
|
|
354
|
+
no --stack-path or fixed nonce)
|
|
349
355
|
and --remote --execution-ring beta --reap reserve a loopback origin first;
|
|
350
356
|
only the remote bundle's config names it as [auth] external_url, so
|
|
351
357
|
generated auth links (/auth/v1/verify…) reach the stack unchanged even when
|
|
@@ -359,14 +365,16 @@ ${bold("run OPTIONS")}
|
|
|
359
365
|
host.docker.internal:N (e.g. 4600): sent as callback_port. A remote
|
|
360
366
|
callback is served by a Linux Go runtime with native callbacks (protocol
|
|
361
367
|
5): a private SSH Unix-socket route to a fixed requester gateway, renewed
|
|
362
|
-
against current owned authorization (BOT-2775).
|
|
363
|
-
asks for callback_policy auto: it runs
|
|
364
|
-
callbacks, and Swift Helper hosts no
|
|
368
|
+
against current owned authorization (BOT-2775). A stable/auto run, pinned
|
|
369
|
+
with --host or not (BOT-3025), asks for callback_policy auto: it runs
|
|
370
|
+
co-located or on a host with native callbacks, and Swift Helper hosts no
|
|
371
|
+
longer take it remotely (a pin to one is refused
|
|
372
|
+
HOST_CALLBACK_TRANSPORT_UNSUPPORTED before the child starts). With --remote
|
|
365
373
|
--execution-ring beta the native transport is required explicitly. A remote
|
|
366
374
|
lease the backend does not acknowledge with it fails
|
|
367
375
|
HOST_CALLBACK_TRANSPORT_UNSUPPORTED (never a legacy -R); the child never
|
|
368
|
-
receives the route capability. A run
|
|
369
|
-
|
|
376
|
+
receives the route capability. A run with --stack-path or a fixed nonce
|
|
377
|
+
keeps the legacy -R forward: it first probes the host with a
|
|
370
378
|
throwaway reverse forward and opens -R 127.0.0.1:N:127.0.0.1:N only when
|
|
371
379
|
the host keeps it on loopback (sshd GatewayPorts no/clientspecified);
|
|
372
380
|
otherwise exit 5 CALLBACK_NOT_LOOPBACK (BOT-2184).
|
|
@@ -1166,13 +1174,15 @@ export async function resolveRunExecution(cwd, opts, { materialize = materialize
|
|
|
1166
1174
|
}
|
|
1167
1175
|
return execution;
|
|
1168
1176
|
};
|
|
1169
|
-
// BOT-2780: the requester origin is only for a CLI-managed stack context. A prepared path
|
|
1170
|
-
//
|
|
1171
|
-
//
|
|
1177
|
+
// BOT-2780: the requester origin is only for a CLI-managed stack context. A prepared path or
|
|
1178
|
+
// fixed nonce could resume a stack whose generated links name another invocation's listener
|
|
1179
|
+
// (a stable run with one of them is simply not an origin run). BOT-3025: a stable --host pin
|
|
1180
|
+
// is placement only and is an origin run; beta still refuses it.
|
|
1172
1181
|
// A stable origin run is the caller's choice to supply its admission identity (runStack
|
|
1173
1182
|
// always does); a beta run without one is refused below.
|
|
1174
1183
|
const originRun = requesterOriginEnabled(opts) && (opts.executionRing === "beta" || (UUID_RE.test(opts.admissionRequestId ?? "") && Boolean(opts.requesterMachineId)));
|
|
1175
|
-
|
|
1184
|
+
// BOT-3025: a --host pin is refused only on the beta ring; a stable pinned run is an origin run.
|
|
1185
|
+
if (originRun && ((opts.host != null && opts.executionRing === "beta") || opts.stackNonce != null || (opts.stackPath && opts.stackPath !== ".") ||
|
|
1176
1186
|
!UUID_RE.test(opts.admissionRequestId ?? "") || !opts.requesterMachineId)) {
|
|
1177
1187
|
const error = new Error("beta requester origins require a fresh CLI-managed stack context (no --host, --stack-path or fixed nonce)");
|
|
1178
1188
|
error.code = "REQUESTER_ORIGIN_CONTEXT_REFUSED";
|