@snowyroad/braid 0.77.0 → 0.78.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/dist/cli.js +50 -11
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -7225,6 +7225,52 @@ async function runEnroll(opts, io, env) {
|
|
|
7225
7225
|
}
|
|
7226
7226
|
}
|
|
7227
7227
|
|
|
7228
|
+
// src/agentList.ts
|
|
7229
|
+
var EMPTY_MESSAGE = "No saved agents. Run: npx @snowyroad/braid join <code>";
|
|
7230
|
+
function bareHost(relayUrl) {
|
|
7231
|
+
return relayUrl.replace(/^wss?:\/\//, "");
|
|
7232
|
+
}
|
|
7233
|
+
function padRight(s, width) {
|
|
7234
|
+
return s.length >= width ? s : s + " ".repeat(width - s.length);
|
|
7235
|
+
}
|
|
7236
|
+
function formatAgentList(entries) {
|
|
7237
|
+
if (entries.length === 0) return EMPTY_MESSAGE;
|
|
7238
|
+
const groups = /* @__PURE__ */ new Map();
|
|
7239
|
+
let nameWidth = "NAME".length;
|
|
7240
|
+
let toolsWidth = "TOOLS".length;
|
|
7241
|
+
for (const e of entries) {
|
|
7242
|
+
const host = sanitizeForTty(bareHost(e.agent.relayUrl));
|
|
7243
|
+
const name = sanitizeForTty(e.agent.agentName);
|
|
7244
|
+
const tools = toolModeLabel(e.agent.toolMode ?? "readonly");
|
|
7245
|
+
const id = sanitizeForTty(e.agent.agentUuid).slice(0, 8);
|
|
7246
|
+
nameWidth = Math.max(nameWidth, name.length);
|
|
7247
|
+
toolsWidth = Math.max(toolsWidth, tools.length);
|
|
7248
|
+
const rows = groups.get(host);
|
|
7249
|
+
if (rows) {
|
|
7250
|
+
rows.push({ name, tools, id });
|
|
7251
|
+
} else {
|
|
7252
|
+
groups.set(host, [{ name, tools, id }]);
|
|
7253
|
+
}
|
|
7254
|
+
}
|
|
7255
|
+
const header = ` ${padRight("NAME", nameWidth)} ${padRight("TOOLS", toolsWidth)} ID`;
|
|
7256
|
+
const lines = [];
|
|
7257
|
+
let relayCount = 0;
|
|
7258
|
+
for (const [host, rows] of groups) {
|
|
7259
|
+
relayCount++;
|
|
7260
|
+
lines.push("");
|
|
7261
|
+
lines.push(host);
|
|
7262
|
+
lines.push(header);
|
|
7263
|
+
for (const row of rows) {
|
|
7264
|
+
lines.push(` ${padRight(row.name, nameWidth)} ${padRight(row.tools, toolsWidth)} ${row.id}`);
|
|
7265
|
+
}
|
|
7266
|
+
}
|
|
7267
|
+
lines.push("");
|
|
7268
|
+
const agentWord = entries.length === 1 ? "agent" : "agents";
|
|
7269
|
+
const relayWord = relayCount === 1 ? "relay" : "relays";
|
|
7270
|
+
lines.push(`${entries.length} ${agentWord} across ${relayCount} ${relayWord}.`);
|
|
7271
|
+
return lines.join("\n");
|
|
7272
|
+
}
|
|
7273
|
+
|
|
7228
7274
|
// src/connectedBanner.ts
|
|
7229
7275
|
function connectedBannerLines(opts) {
|
|
7230
7276
|
const lines = [
|
|
@@ -7724,7 +7770,9 @@ function validateSpec(line) {
|
|
|
7724
7770
|
}
|
|
7725
7771
|
async function pickChannel(channels, filter, promptFn, write) {
|
|
7726
7772
|
if (channels.length === 0) {
|
|
7727
|
-
write(
|
|
7773
|
+
write(
|
|
7774
|
+
"[handoff] no active session to take over yet.\n[handoff] handoff drops you into a session the agent is ALREADY running - one exists\n[handoff] only once the agent is working in a channel (a message, a reply, a flow turn).\n[handoff] send the agent a message in a channel and let it reply, then run this again.\n"
|
|
7775
|
+
);
|
|
7728
7776
|
return null;
|
|
7729
7777
|
}
|
|
7730
7778
|
if (filter && filter.trim() !== "") {
|
|
@@ -9163,16 +9211,7 @@ function installTee(outWriter, errWriter) {
|
|
|
9163
9211
|
// src/cli.ts
|
|
9164
9212
|
import { homedir as homedir7 } from "os";
|
|
9165
9213
|
function printList() {
|
|
9166
|
-
|
|
9167
|
-
if (entries.length === 0) {
|
|
9168
|
-
console.log("No saved agents. Run: npx @snowyroad/braid join <code>");
|
|
9169
|
-
return;
|
|
9170
|
-
}
|
|
9171
|
-
for (const e of entries) {
|
|
9172
|
-
console.log(
|
|
9173
|
-
`${sanitizeForTty(e.agent.agentName)} relay=${e.agent.relayUrl} uuid=${sanitizeForTty(e.agent.agentUuid)} tools=${toolModeLabel(e.agent.toolMode ?? "readonly")}`
|
|
9174
|
-
);
|
|
9175
|
-
}
|
|
9214
|
+
console.log(formatAgentList(listAgents(configDir(process.env))));
|
|
9176
9215
|
}
|
|
9177
9216
|
function printStatus(agentName, json) {
|
|
9178
9217
|
const dir = configDir(process.env);
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@snowyroad/braid",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.78.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@snowyroad/braid",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.78.1",
|
|
10
10
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@agentclientprotocol/sdk": "0.25.1",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@snowyroad/braid",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.78.1",
|
|
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",
|