@botbuddy/cli 1.60.9 → 1.60.10
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/commands.mjs +2 -2
- package/src/pw/run.mjs +9 -1
- package/src/staging-pool/errors.mjs +8 -1
|
Binary file
|
|
Binary file
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"release_version": "1.60.
|
|
3
|
-
"source_commit": "
|
|
4
|
-
"source_sha256": "
|
|
2
|
+
"release_version": "1.60.10",
|
|
3
|
+
"source_commit": "311044889f28c3b22902954ec29c3c117f46d638",
|
|
4
|
+
"source_sha256": "a82e951ccda7aa65571953e874a01cf30f75bc218ed5592a2bffa2e7b0d3219a",
|
|
5
5
|
"target": "darwin-arm64",
|
|
6
|
-
"sha256": "
|
|
6
|
+
"sha256": "c078605d49201ad3532212bbac322216b06c108c425024a7f68f6ecdab89fd5a"
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"release_version": "1.60.
|
|
3
|
-
"source_commit": "
|
|
4
|
-
"source_sha256": "
|
|
2
|
+
"release_version": "1.60.10",
|
|
3
|
+
"source_commit": "311044889f28c3b22902954ec29c3c117f46d638",
|
|
4
|
+
"source_sha256": "a82e951ccda7aa65571953e874a01cf30f75bc218ed5592a2bffa2e7b0d3219a",
|
|
5
5
|
"target": "linux-x64",
|
|
6
|
-
"sha256": "
|
|
6
|
+
"sha256": "af6bfdf5e66b133356c620a5dd9aaacc1cee11d8f0f594bb8f5e8447cb932704"
|
|
7
7
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema_version": 1,
|
|
3
|
-
"release_version": "1.60.
|
|
4
|
-
"source_commit": "
|
|
5
|
-
"source_sha256": "
|
|
3
|
+
"release_version": "1.60.10",
|
|
4
|
+
"source_commit": "311044889f28c3b22902954ec29c3c117f46d638",
|
|
5
|
+
"source_sha256": "a82e951ccda7aa65571953e874a01cf30f75bc218ed5592a2bffa2e7b0d3219a",
|
|
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": "c078605d49201ad3532212bbac322216b06c108c425024a7f68f6ecdab89fd5a",
|
|
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": "af6bfdf5e66b133356c620a5dd9aaacc1cee11d8f0f594bb8f5e8447cb932704",
|
|
19
19
|
"mode": "0755"
|
|
20
20
|
}
|
|
21
21
|
}
|
package/package.json
CHANGED
package/src/commands.mjs
CHANGED
|
@@ -278,8 +278,8 @@ ${bold("STAGING SIGN-IN")} (BOT-2084)
|
|
|
278
278
|
persona, no password (${cyan("bb pw auth --help")})
|
|
279
279
|
staging-pool status [--check]
|
|
280
280
|
Pool health: one reason, who acts, the next command
|
|
281
|
-
staging-pool install|tick|mint-one|uninstall
|
|
282
|
-
Human only,
|
|
281
|
+
staging-pool install --tenant <slug> | tick | mint-one | uninstall
|
|
282
|
+
Human only, any directory (${cyan("bb staging-pool --help")})
|
|
283
283
|
help symptom staging-pool Every refusal code with its cause and next command
|
|
284
284
|
|
|
285
285
|
${bold("OTHER")}
|
package/src/pw/run.mjs
CHANGED
|
@@ -11,6 +11,7 @@ import { VERSION } from "../version.mjs";
|
|
|
11
11
|
import { readAgentSessionTokenEnv, AGENT_KEY_RE, legacyAgentAliasHint } from "../agent-key.mjs";
|
|
12
12
|
import { clearAgentState, isRejectedCachedMcpSession, resolveAgentSessionCredential } from "../agent-session.mjs";
|
|
13
13
|
import * as stagingAuth from "./staging-auth.mjs";
|
|
14
|
+
import { DOC_SECTIONS, DOC_URL } from "../staging-pool/errors.mjs";
|
|
14
15
|
// BOT-1488: canonicalize the raw hostname the SAME way acquire_resources does
|
|
15
16
|
// server-side, so the lane name bb-pw builds/matches/prints is the one the lock
|
|
16
17
|
// kernel actually stored ("jonos-mbp:8", not "Jonos-MBP.localdomain:8").
|
|
@@ -134,7 +135,12 @@ export async function runPw(argv, deps = {}) {
|
|
|
134
135
|
// while-loop in runPwInner). Everything after the first non-option (the lane) is a
|
|
135
136
|
// Playwright workload argument and is never a BotBuddy credential.
|
|
136
137
|
const PW_LEADING_FLAGS = ["--tenant", "--session-id", "--agent-session-token", "--agent-key", "--session-token", "--environment"];
|
|
137
|
-
|
|
138
|
+
// BOT-2648 acceptance: with no tenant binding, `bb doctor --fix` cannot help: the
|
|
139
|
+
// caller is outside a registered agent worktree, which lane locks need.
|
|
140
|
+
const NO_BINDING_NEXT = "Agent: run this from your registered project worktree (the checkout with .botbuddy-agent.json; run `bb setup` there once), then retry. bb help symptom tenant_binding_required";
|
|
141
|
+
const selfHealErrorLine = (error) => error?.code === "tenant_binding_required"
|
|
142
|
+
? `bb-pw: tenant_binding_required — ${error?.message ?? "no BotBuddy tenant binding here"} ${NO_BINDING_NEXT}. Docs: ${DOC_URL}#${DOC_SECTIONS.take}\n`
|
|
143
|
+
: `bb-pw: ${error?.message ?? "agent session unavailable"}. ${error?.code === "client_key_required" ? "Run `bb login` then retry." : "Run `bb doctor --fix` then retry."}\n`;
|
|
138
144
|
// The leading credential options, NORMALIZED to split `flag value` pairs so an
|
|
139
145
|
// inline `--agent-key=<token>` is recognized by legacyAgentAliasHint (which
|
|
140
146
|
// matches exact flag tokens) exactly like the split form. Credential flags are
|
|
@@ -247,6 +253,8 @@ async function runPwInner(argv, deps = {}) {
|
|
|
247
253
|
// BOT-2648 (Codex P2, #1323): the credential's tenant picks the installed staging pool.
|
|
248
254
|
deps = { ...deps, sessionToken: credential.token, sessionId: deps.sessionId ?? credential.sessionId ?? null, credentialAgentId: credential.agentId ?? null, credentialTenant: credential.identity?.tenant ?? null };
|
|
249
255
|
} catch (error) {
|
|
256
|
+
// BOT-2648 acceptance: an auth refusal is the standard JSON receipt (actor, next, doc, symptom).
|
|
257
|
+
if (plan.mode === "auth" && error?.code === "tenant_binding_required") return stagingAuth.refuse({ stdout, stderr }, "tenant_binding_required", 3, {}, authVars(plan, deps));
|
|
250
258
|
stderr.write(selfHealErrorLine(error)); return 3;
|
|
251
259
|
}
|
|
252
260
|
}
|
|
@@ -52,6 +52,13 @@ export const ERROR_CODES = Object.freeze({
|
|
|
52
52
|
"The lane lock is held by another agent session of your owner, not by this session.",
|
|
53
53
|
"The lane was claimed from a different session or sub-agent; auth needs the exact holder.",
|
|
54
54
|
`bb locks -m --lane {lane}{ticketFlag} # from THIS session, then: ${AUTH}`),
|
|
55
|
+
// BOT-2648 acceptance: the take runs from a registered agent worktree. Lane locks
|
|
56
|
+
// are per agent worktree, so a directory with no .botbuddy-agent.json has no
|
|
57
|
+
// agent identity to hold the lane (the pool itself never needs a checkout).
|
|
58
|
+
tenant_binding_required: entry("agent", "take",
|
|
59
|
+
"bb pw needs a registered agent worktree, and this directory has no BotBuddy tenant binding.",
|
|
60
|
+
"No .botbuddy-agent.json was found here or above, so there is no per-worktree agent identity to hold the lane lock.",
|
|
61
|
+
`bb setup # run inside your registered project worktree (the checkout with .botbuddy-agent.json); then from there: bb locks -m --lane {lane}{ticketFlag} && ${AUTH}`),
|
|
55
62
|
persona_not_allowlisted: entry("agent", "take",
|
|
56
63
|
"Persona \"{persona}\" is not one of this repository's staging_session_pool personas.",
|
|
57
64
|
"A typo, or an email where the alias is expected. Allowed aliases: {allowed}.",
|
|
@@ -310,7 +317,7 @@ export const ERROR_CODES = Object.freeze({
|
|
|
310
317
|
// Codes only `bb pw … auth` can raise; every other code can come from `bb staging-pool`.
|
|
311
318
|
export const AUTH_ONLY_CODES = Object.freeze(new Set([
|
|
312
319
|
"auth_requires_staging_environment", "auth_requires_lane_lock", "lane_not_claimed", "exact_lane_holder_required",
|
|
313
|
-
"persona_not_allowlisted", "lane_browser_not_open", "browser_session_not_staging", "persistent_profile_refused",
|
|
320
|
+
"tenant_binding_required", "persona_not_allowlisted", "lane_browser_not_open", "browser_session_not_staging", "persistent_profile_refused",
|
|
314
321
|
"session_install_failed", "staging_session_cleanup_pending", "session_not_aal2", "session_expired",
|
|
315
322
|
"session_persona_mismatch", "slot_state_invalid", "slot_state_unreadable", "daemon_node_unsupported",
|
|
316
323
|
"daemon_run_failed", "daemon_result_missing", "daemon_result_invalid", "pool_take_failed", "pool_empty",
|