@snowyroad/braid 0.96.3 → 0.96.4
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.
|
@@ -400,7 +400,7 @@ var InviteExpiredError = class extends Error {
|
|
|
400
400
|
}
|
|
401
401
|
};
|
|
402
402
|
async function redeemInvite(relayHttpUrl, code) {
|
|
403
|
-
const { boundedJsonFetch: boundedJsonFetch2 } = await import("./http-
|
|
403
|
+
const { boundedJsonFetch: boundedJsonFetch2 } = await import("./http-N3HN44KC.js");
|
|
404
404
|
const r = await boundedJsonFetch2(`${relayHttpUrl.replace(/\/$/, "")}/invites/redeem`, {
|
|
405
405
|
method: "POST",
|
|
406
406
|
headers: { "content-type": "application/json" },
|
|
@@ -492,7 +492,7 @@ function validateReplacementToken(newToken, currentToken, nowMs = Date.now()) {
|
|
|
492
492
|
return { ok: true };
|
|
493
493
|
}
|
|
494
494
|
async function mintAccessToken(relayHttpUrl, agentKey, fetchFn = fetch, dpopProof) {
|
|
495
|
-
const { boundedJsonFetch: boundedJsonFetch2 } = await import("./http-
|
|
495
|
+
const { boundedJsonFetch: boundedJsonFetch2 } = await import("./http-N3HN44KC.js");
|
|
496
496
|
const r = await boundedJsonFetch2(`${relayHttpUrl.replace(/\/$/, "")}/agents/token`, {
|
|
497
497
|
method: "POST",
|
|
498
498
|
headers: {
|
|
@@ -2691,6 +2691,9 @@ function modelLaunchFor(agent, model) {
|
|
|
2691
2691
|
}
|
|
2692
2692
|
}
|
|
2693
2693
|
|
|
2694
|
+
// src/adapter.ts
|
|
2695
|
+
import { execFileSync as execFileSync2 } from "child_process";
|
|
2696
|
+
|
|
2694
2697
|
// src/scope/sandbox.ts
|
|
2695
2698
|
import { SandboxManager, SandboxRuntimeConfigSchema, installWindowsSandbox, getSrtWinPath } from "@anthropic-ai/sandbox-runtime";
|
|
2696
2699
|
import path4 from "path";
|
|
@@ -6101,8 +6104,11 @@ function resolvePathBinary(binary, hint) {
|
|
|
6101
6104
|
function launchSpecFor(agent) {
|
|
6102
6105
|
const cwd = process.cwd();
|
|
6103
6106
|
switch (agent) {
|
|
6104
|
-
case "claude-code":
|
|
6105
|
-
|
|
6107
|
+
case "claude-code": {
|
|
6108
|
+
const bin = resolveClaudeBinary();
|
|
6109
|
+
const env = bin.source === "bundled" ? {} : { env: { CLAUDE_CODE_EXECUTABLE: bin.path } };
|
|
6110
|
+
return { ...npxSpec(pinned("@agentclientprotocol/claude-agent-acp")), cwd, ...env };
|
|
6111
|
+
}
|
|
6106
6112
|
// codex: canonical adapter (BL-120, 2026-06-28). 1.x prefers CODEX_API_KEY,
|
|
6107
6113
|
// falling back to OPENAI_API_KEY; both pass through buildAcpEnv unchanged.
|
|
6108
6114
|
case "codex":
|
|
@@ -6200,6 +6206,35 @@ function resolveHandoffBinary(name, install) {
|
|
|
6200
6206
|
handoffBinaryAbs.set(name, found);
|
|
6201
6207
|
return found;
|
|
6202
6208
|
}
|
|
6209
|
+
var claudeBinaryCached;
|
|
6210
|
+
function claudeVersion(bin) {
|
|
6211
|
+
try {
|
|
6212
|
+
const out = execFileSync2(bin, ["--version"], { encoding: "utf8", timeout: 8e3, stdio: ["ignore", "pipe", "ignore"] });
|
|
6213
|
+
return out.trim().split("\n")[0] || null;
|
|
6214
|
+
} catch {
|
|
6215
|
+
return null;
|
|
6216
|
+
}
|
|
6217
|
+
}
|
|
6218
|
+
function resolveClaudeBinary(env = process.env, home = homedir5(), platform = process.platform) {
|
|
6219
|
+
if (claudeBinaryCached) return claudeBinaryCached;
|
|
6220
|
+
const explicit = env.CLAUDE_CODE_EXECUTABLE?.trim();
|
|
6221
|
+
let out;
|
|
6222
|
+
if (explicit) {
|
|
6223
|
+
out = { path: explicit, version: claudeVersion(explicit), source: "env" };
|
|
6224
|
+
} else {
|
|
6225
|
+
const found = findHandoffBinary("claude", env.PATH ?? "", home, platform);
|
|
6226
|
+
out = found ? { path: found, version: claudeVersion(found), source: "path" } : { path: "", version: null, source: "bundled" };
|
|
6227
|
+
}
|
|
6228
|
+
claudeBinaryCached = out;
|
|
6229
|
+
return out;
|
|
6230
|
+
}
|
|
6231
|
+
function describeClaudeBinary(b) {
|
|
6232
|
+
if (b.source === "bundled") {
|
|
6233
|
+
return "adapter-bundled copy (no `claude` on PATH or ~/.local/bin; install Claude Code so `claude update` keeps this current)";
|
|
6234
|
+
}
|
|
6235
|
+
const ver = b.version ? ` (${b.version})` : "";
|
|
6236
|
+
return b.source === "env" ? `${b.path}${ver} [CLAUDE_CODE_EXECUTABLE]` : `${b.path}${ver}, the one \`claude update\` maintains`;
|
|
6237
|
+
}
|
|
6203
6238
|
var HANDOFF_RESUME_SPECS = {
|
|
6204
6239
|
"claude-code": (sessionId, cwd) => ({ command: resolveHandoffBinary("claude", "Claude Code"), args: ["--resume", sessionId], cwd }),
|
|
6205
6240
|
codex: (sessionId, cwd) => ({ command: resolveHandoffBinary("codex", "the Codex CLI"), args: ["resume", sessionId], cwd }),
|
|
@@ -7396,7 +7431,7 @@ function buildVersion() {
|
|
|
7396
7431
|
return "";
|
|
7397
7432
|
}
|
|
7398
7433
|
}
|
|
7399
|
-
function startingLines(cfg) {
|
|
7434
|
+
function startingLines(cfg, extras = {}) {
|
|
7400
7435
|
const row = (label, value) => `${label.padEnd(8)} : ${value}`;
|
|
7401
7436
|
const anthropicCredential = cfg.agentMode !== "acp" || cfg.agent === "claude-code";
|
|
7402
7437
|
const catchUpHours = cfg.catchUpTtlMs % 36e5 === 0 ? `${cfg.catchUpTtlMs / 36e5}h` : `${Math.round(cfg.catchUpTtlMs / 6e4)}min`;
|
|
@@ -7408,6 +7443,9 @@ function startingLines(cfg) {
|
|
|
7408
7443
|
row("agent", sanitizeForTty(cfg.agentName)),
|
|
7409
7444
|
row("relay", sanitizeForTty(cfg.relayWsUrl)),
|
|
7410
7445
|
row("provider", cfg.agentMode === "acp" ? cfg.agent : "bundled SDK (generic mode)"),
|
|
7446
|
+
// Which Claude Code binary claude-code turns run (2026-09-21): the user's own, so
|
|
7447
|
+
// `claude update` is the fix for a client-version refusal, never a braid release.
|
|
7448
|
+
...extras.claudeBinary ? [row("claude", sanitizeForTty(extras.claudeBinary))] : [],
|
|
7411
7449
|
row("model", sanitizeForTty(redactConfig(cfg).model)),
|
|
7412
7450
|
row("fallback", cfg.fallbackModel ? sanitizeForTty(cfg.fallbackModel) : "(none \u2014 a rate limit is surfaced, not switched)"),
|
|
7413
7451
|
row("tools", cfg.toolMode),
|
|
@@ -7685,6 +7723,8 @@ export {
|
|
|
7685
7723
|
scopedLaunch,
|
|
7686
7724
|
resetScope,
|
|
7687
7725
|
sandboxInstaller,
|
|
7726
|
+
resolveClaudeBinary,
|
|
7727
|
+
describeClaudeBinary,
|
|
7688
7728
|
interactiveHandoffSupported,
|
|
7689
7729
|
interactiveResumeSpecFor,
|
|
7690
7730
|
createAdapter,
|
package/dist/cli.js
CHANGED
|
@@ -32,6 +32,7 @@ import {
|
|
|
32
32
|
createEphemeralLisaAdapter,
|
|
33
33
|
createWorkspaceNoticeGate,
|
|
34
34
|
decodeInvite,
|
|
35
|
+
describeClaudeBinary,
|
|
35
36
|
distinctWorkspaceNames,
|
|
36
37
|
effectiveAnthropicCredential,
|
|
37
38
|
handoffCwdFor,
|
|
@@ -59,6 +60,7 @@ import {
|
|
|
59
60
|
relayHostSegment,
|
|
60
61
|
resetScope,
|
|
61
62
|
resolveAgentSelection,
|
|
63
|
+
resolveClaudeBinary,
|
|
62
64
|
resolveConfig,
|
|
63
65
|
resolveIpcProfile,
|
|
64
66
|
resolveKnobs,
|
|
@@ -76,7 +78,7 @@ import {
|
|
|
76
78
|
updateAgentWorkspace,
|
|
77
79
|
validateRelayWsUrl,
|
|
78
80
|
wsToHttp
|
|
79
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-4BKQMFLW.js";
|
|
80
82
|
import {
|
|
81
83
|
clampUntrusted,
|
|
82
84
|
externalSourceLabel,
|
|
@@ -6329,7 +6331,9 @@ async function main() {
|
|
|
6329
6331
|
}
|
|
6330
6332
|
assertKeystorePerms(dir, file);
|
|
6331
6333
|
}
|
|
6332
|
-
console.log(banner("braid", "STARTING", startingLines(cfg
|
|
6334
|
+
console.log(banner("braid", "STARTING", startingLines(cfg, {
|
|
6335
|
+
...cfg.agentMode === "acp" && cfg.agent === "claude-code" ? { claudeBinary: describeClaudeBinary(resolveClaudeBinary()) } : {}
|
|
6336
|
+
})));
|
|
6333
6337
|
if (cfg.toolMode === "full") {
|
|
6334
6338
|
console.error(
|
|
6335
6339
|
"[braid] WARNING full tool access: remote channel content can drive local tool use on this machine"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@snowyroad/braid",
|
|
3
|
-
"version": "0.96.
|
|
3
|
+
"version": "0.96.4",
|
|
4
4
|
"description": "Braid: connect your own coding agent (Claude Code, Codex, Gemini, Grok) to a Braid channel and collaborate with other agents and humans.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "SnowyRoad",
|
package/service-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@snowyroad/braid",
|
|
3
|
-
"version": "0.96.
|
|
3
|
+
"version": "0.96.4",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@snowyroad/braid",
|
|
9
|
-
"version": "0.96.
|
|
9
|
+
"version": "0.96.4",
|
|
10
10
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@agentclientprotocol/sdk": "0.25.1",
|