@botbuddy/cli 1.6.0 → 1.6.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/package.json +1 -1
- package/src/profile-bootstrap.mjs +2 -1
- package/src/public-invocation.mjs +7 -0
- package/src/stack.mjs +1 -1
- package/src/wait.mjs +3 -2
package/package.json
CHANGED
|
@@ -3,6 +3,7 @@ import { randomUUID } from "node:crypto";
|
|
|
3
3
|
|
|
4
4
|
import { ensureProfileCredentialBackend, readProfileIdentity, readProfileRetryIdentity, recordProfileRetryIdentity, installProfileCredential, profileCredentialEnvironment } from "./agent-credential-store.mjs";
|
|
5
5
|
import { callToolJson } from "./api.mjs";
|
|
6
|
+
import { latestPublicCliCommand } from "./public-invocation.mjs";
|
|
6
7
|
|
|
7
8
|
const PROFILES = Object.freeze({
|
|
8
9
|
"botbuddy-dev": Object.freeze({ tenant: "botbuddy" }),
|
|
@@ -92,7 +93,7 @@ export async function bootstrapProfile(profileName, {
|
|
|
92
93
|
tenant_id: profile.tenant,
|
|
93
94
|
agent_id: data.agent_id,
|
|
94
95
|
credential_source: "keychain_profile_slot",
|
|
95
|
-
shell_refresh: `source <(
|
|
96
|
+
shell_refresh: `source <(${latestPublicCliCommand(`profile env ${profileName}`)})`,
|
|
96
97
|
gui_refresh: "$HOME/.local/bin/botbuddy-mcp-env.sh",
|
|
97
98
|
};
|
|
98
99
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// BOT-1425: npm cannot infer a package executable once @botbuddy/cli exposes
|
|
2
|
+
// both botbuddy and bb-pw. Keep every installation-free command explicit.
|
|
3
|
+
export const LATEST_PUBLIC_CLI_PREFIX = "npm exec --yes --package=@botbuddy/cli@latest -- botbuddy";
|
|
4
|
+
|
|
5
|
+
export function latestPublicCliCommand(command = "") {
|
|
6
|
+
return command ? `${LATEST_PUBLIC_CLI_PREFIX} ${command}` : LATEST_PUBLIC_CLI_PREFIX;
|
|
7
|
+
}
|
package/src/stack.mjs
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
// The canonical batch flow is: stack up → test → break → fix → test → stack done.
|
|
12
12
|
//
|
|
13
13
|
// Design contract (matches bb-wait):
|
|
14
|
-
// * Dependency-free (Node stdlib only) so `
|
|
14
|
+
// * Dependency-free (Node stdlib only) so an explicit `npm exec --package` invocation cold-starts fast.
|
|
15
15
|
// * Exactly ONE single-line JSON receipt to stdout; all diagnostics go to stderr.
|
|
16
16
|
// * Receipt ≤ 10 KB (documented, --receipt-max-bytes overridable).
|
|
17
17
|
// * Documented, meaningful exit codes.
|
package/src/wait.mjs
CHANGED
|
@@ -17,12 +17,13 @@ import { EXIT, parseConditions, parseSseFrames, runWaitLoop, normalizeSince, tru
|
|
|
17
17
|
import { resolveAgentProfile, withPrincipalReceipt } from "./wait-profile.mjs";
|
|
18
18
|
import { VERSION } from "./version.mjs";
|
|
19
19
|
import { fileURLToPath } from "node:url";
|
|
20
|
+
import { latestPublicCliCommand } from "./public-invocation.mjs";
|
|
20
21
|
|
|
21
22
|
// A protocol is deliberately distinct from package semver: compatible pinned
|
|
22
23
|
// clients keep working until the server raises this minimum, while a stale
|
|
23
24
|
// implementation gets a typed, safe upgrade instruction.
|
|
24
25
|
export const WAIT_PROTOCOL_VERSION = 1;
|
|
25
|
-
const CLI_UPGRADE_COMMAND = "
|
|
26
|
+
const CLI_UPGRADE_COMMAND = latestPublicCliCommand("wait");
|
|
26
27
|
const MIN_RECEIPT_MAX_BYTES = 512;
|
|
27
28
|
|
|
28
29
|
const HELP = `botbuddy wait — one wait command instead of a polling loop (BOT-989)
|
|
@@ -458,7 +459,7 @@ function emit(receipt, { versioned = false, maxBytes = null } = {}) {
|
|
|
458
459
|
}
|
|
459
460
|
|
|
460
461
|
function profileRecovery(profile) {
|
|
461
|
-
return `
|
|
462
|
+
return latestPublicCliCommand(`profile setup ${profile.name}`);
|
|
462
463
|
}
|
|
463
464
|
|
|
464
465
|
function typedProfileError(errorCode) {
|