@open-bus/cli 0.44.1 → 0.45.0
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/assets/openbus.ts +6 -1
- package/dist/index.js +30 -11
- package/package.json +2 -2
package/assets/openbus.ts
CHANGED
|
@@ -9,6 +9,11 @@ import { basename, dirname, join, resolve } from "node:path";
|
|
|
9
9
|
import { StringDecoder } from "node:string_decoder";
|
|
10
10
|
|
|
11
11
|
type Json = Record<string, unknown>;
|
|
12
|
+
|
|
13
|
+
/** Kinds this build knows; any other is shown as `other` (CONTRACT.md). */
|
|
14
|
+
const KINDS = ["claude-code", "opencode", "pi", "omp"];
|
|
15
|
+
const displayKind = (kind: unknown): string =>
|
|
16
|
+
typeof kind === "string" && KINDS.includes(kind) ? kind : "other";
|
|
12
17
|
type Frame = Json & { type: string; id: string };
|
|
13
18
|
type Ctx = {
|
|
14
19
|
cwd: string;
|
|
@@ -776,7 +781,7 @@ export default function openbus(pi: Pi): void {
|
|
|
776
781
|
.map((a) => {
|
|
777
782
|
const queued =
|
|
778
783
|
(a.state ?? (a.live ? "live" : "queued")) === "queued";
|
|
779
|
-
return `- ${a.name} (${a.kind}, ${a.namespace}${typeof a.machine_label === "string" ? `, ${a.machine_label}` : ""})${queued ? " (queued)" : ""}`;
|
|
784
|
+
return `- ${a.name} (${displayKind(a.kind)}, ${a.namespace}${typeof a.machine_label === "string" ? `, ${a.machine_label}` : ""})${queued ? " (queued)" : ""}`;
|
|
780
785
|
})
|
|
781
786
|
.join("\n")
|
|
782
787
|
: "No agents in your namespace.";
|
package/dist/index.js
CHANGED
|
@@ -20802,13 +20802,15 @@ var init_ids = __esm({
|
|
|
20802
20802
|
});
|
|
20803
20803
|
|
|
20804
20804
|
// ../shared/dist/kinds.js
|
|
20805
|
-
var AGENT_KINDS, AgentKindSchema;
|
|
20805
|
+
var AGENT_KINDS, AgentKindSchema, KindTokenSchema, displayKind;
|
|
20806
20806
|
var init_kinds = __esm({
|
|
20807
20807
|
"../shared/dist/kinds.js"() {
|
|
20808
20808
|
"use strict";
|
|
20809
20809
|
init_zod();
|
|
20810
|
-
AGENT_KINDS = ["claude-code", "opencode", "pi"];
|
|
20810
|
+
AGENT_KINDS = ["claude-code", "opencode", "pi", "omp"];
|
|
20811
20811
|
AgentKindSchema = external_exports.enum(AGENT_KINDS);
|
|
20812
|
+
KindTokenSchema = external_exports.string().regex(/^[a-z][a-z0-9-]{0,31}$/);
|
|
20813
|
+
displayKind = (kind2) => AGENT_KINDS.includes(kind2) ? kind2 : "other";
|
|
20812
20814
|
}
|
|
20813
20815
|
});
|
|
20814
20816
|
|
|
@@ -21093,7 +21095,11 @@ var init_protocol = __esm({
|
|
|
21093
21095
|
ReceiptFrame = external_exports.strictObject({ ...base, type: external_exports.literal("receipt"), ...receiptShape }).refine(receiptReasonMatchesState, "reason does not match state").refine((f) => f.state === "pending" || f.state === "refused", "send receipt is pending or refused");
|
|
21094
21096
|
RosterAgent = external_exports.strictObject({
|
|
21095
21097
|
bus_name: BusNameSchema,
|
|
21096
|
-
|
|
21098
|
+
/**
|
|
21099
|
+
* Any kind token, so a future kind never fails the whole roster (from
|
|
21100
|
+
* 0.45.0; older daemons are gated by the hub). Display it via displayKind.
|
|
21101
|
+
*/
|
|
21102
|
+
kind: KindTokenSchema,
|
|
21097
21103
|
namespace: WireNamespaceSchema,
|
|
21098
21104
|
global: external_exports.boolean(),
|
|
21099
21105
|
/**
|
|
@@ -21283,7 +21289,11 @@ var init_rest = __esm({
|
|
|
21283
21289
|
id: IdSchema,
|
|
21284
21290
|
namespace: WireNamespaceSchema,
|
|
21285
21291
|
name: BusNameSchema,
|
|
21286
|
-
|
|
21292
|
+
/**
|
|
21293
|
+
* Any kind token, so a dashboard tab built before a new kind keeps the
|
|
21294
|
+
* roster; it shows an unknown kind as Other.
|
|
21295
|
+
*/
|
|
21296
|
+
kind: KindTokenSchema,
|
|
21287
21297
|
machineId: IdSchema,
|
|
21288
21298
|
machineLabel: MachineLabelSchema,
|
|
21289
21299
|
global: external_exports.boolean(),
|
|
@@ -21399,17 +21409,19 @@ var init_dist = __esm({
|
|
|
21399
21409
|
});
|
|
21400
21410
|
|
|
21401
21411
|
// ../ipc/src/frames.ts
|
|
21402
|
-
var V, MAX_BODY_BYTES, MAX_LINE_BYTES, INLINE_CAP_BYTES, KIND, AGENT_REF, base2, late, isWellFormed2, WELL_FORMED, Hello2, optIn, Send2, List2, Self, Fetch2, Ack2, StatusRequest, AdapterFrame, AgentInfo, Welcome, Receipt, Roster2, Agent, Body, Deliver2, Notice2, ErrorFrame2, StatusReply, DaemonFrame;
|
|
21412
|
+
var V, MAX_BODY_BYTES, MAX_LINE_BYTES, INLINE_CAP_BYTES, KIND, KIND_TOKEN, AGENT_REF, base2, late, isWellFormed2, WELL_FORMED, Hello2, optIn, Send2, List2, Self, Fetch2, Ack2, StatusRequest, AdapterFrame, AgentInfo, Welcome, Receipt, Roster2, Agent, Body, Deliver2, Notice2, ErrorFrame2, StatusReply, DaemonFrame;
|
|
21403
21413
|
var init_frames = __esm({
|
|
21404
21414
|
"../ipc/src/frames.ts"() {
|
|
21405
21415
|
"use strict";
|
|
21406
21416
|
init_dist();
|
|
21407
21417
|
init_zod();
|
|
21418
|
+
init_dist();
|
|
21408
21419
|
V = 1;
|
|
21409
21420
|
MAX_BODY_BYTES = 1024 * 1024;
|
|
21410
21421
|
MAX_LINE_BYTES = 4 * 1024 * 1024;
|
|
21411
21422
|
INLINE_CAP_BYTES = 32 * 1024;
|
|
21412
21423
|
KIND = AgentKindSchema;
|
|
21424
|
+
KIND_TOKEN = KindTokenSchema;
|
|
21413
21425
|
AGENT_REF = AgentRefSchema;
|
|
21414
21426
|
base2 = { v: external_exports.literal(V), id: external_exports.string().min(1).max(64) };
|
|
21415
21427
|
late = { late: external_exports.array(external_exports.string().min(1)).optional() };
|
|
@@ -21473,7 +21485,7 @@ var init_frames = __esm({
|
|
|
21473
21485
|
AgentInfo = external_exports.object({
|
|
21474
21486
|
name: external_exports.string(),
|
|
21475
21487
|
namespace: external_exports.string(),
|
|
21476
|
-
kind:
|
|
21488
|
+
kind: KIND_TOKEN,
|
|
21477
21489
|
/** `state === "live"`; kept for older adapters. */
|
|
21478
21490
|
live: external_exports.boolean(),
|
|
21479
21491
|
/** Roster entries only: `queued` means the agent's machine is disconnected. */
|
|
@@ -21571,7 +21583,7 @@ var init_frames = __esm({
|
|
|
21571
21583
|
agents: external_exports.array(
|
|
21572
21584
|
external_exports.object({
|
|
21573
21585
|
name: external_exports.string(),
|
|
21574
|
-
kind:
|
|
21586
|
+
kind: KIND_TOKEN,
|
|
21575
21587
|
/** Empty when the hub does not say which machine. */
|
|
21576
21588
|
machine: external_exports.string(),
|
|
21577
21589
|
state: external_exports.enum(["live", "queued"])
|
|
@@ -22448,7 +22460,7 @@ async function run(name, args, request) {
|
|
|
22448
22460
|
if (r.type !== "roster") return failed(r);
|
|
22449
22461
|
return text(
|
|
22450
22462
|
r.agents.length ? r.agents.map(
|
|
22451
|
-
(a) => `- ${a.name} (${a.kind}, ${a.namespace}${a.machine_label ? `, ${a.machine_label}` : ""})${queued(a) ? " (queued)" : ""}`
|
|
22463
|
+
(a) => `- ${a.name} (${displayKind(a.kind)}, ${a.namespace}${a.machine_label ? `, ${a.machine_label}` : ""})${queued(a) ? " (queued)" : ""}`
|
|
22452
22464
|
).join("\n") : "No agents in your namespace."
|
|
22453
22465
|
);
|
|
22454
22466
|
}
|
|
@@ -37953,6 +37965,8 @@ function attest(hello, deps = {}) {
|
|
|
37953
37965
|
}
|
|
37954
37966
|
return { ok: true };
|
|
37955
37967
|
}
|
|
37968
|
+
case "omp":
|
|
37969
|
+
return { ok: false, reason: "omp is not supported yet" };
|
|
37956
37970
|
}
|
|
37957
37971
|
}
|
|
37958
37972
|
function attestClaude(hello, deps) {
|
|
@@ -40850,6 +40864,9 @@ import { execFileSync as execFileSync4, spawn as spawn2 } from "node:child_proce
|
|
|
40850
40864
|
import { closeSync as closeSync3, openSync as openSync3, readFileSync as readFileSync9 } from "node:fs";
|
|
40851
40865
|
import { homedir as homedir2, userInfo } from "node:os";
|
|
40852
40866
|
|
|
40867
|
+
// src/copy.ts
|
|
40868
|
+
init_dist();
|
|
40869
|
+
|
|
40853
40870
|
// ../ui/src/tokens/terminal.ts
|
|
40854
40871
|
var terminal = {
|
|
40855
40872
|
bg: { light: "#FFFFFF", dark: "#131518" },
|
|
@@ -40934,7 +40951,9 @@ var HARNESS_LABEL = {
|
|
|
40934
40951
|
var KIND_LABEL = {
|
|
40935
40952
|
"claude-code": "Claude Code",
|
|
40936
40953
|
opencode: "OpenCode",
|
|
40937
|
-
pi: "Pi"
|
|
40954
|
+
pi: "Pi",
|
|
40955
|
+
omp: "oh-my-pi",
|
|
40956
|
+
other: "Other"
|
|
40938
40957
|
};
|
|
40939
40958
|
var len = (s) => [...s].length;
|
|
40940
40959
|
function cutMiddle(value, max, more = "\u2026") {
|
|
@@ -41079,7 +41098,7 @@ function copy(style) {
|
|
|
41079
41098
|
const lead = `${n} agent${n === 1 ? "" : "s"} in namespace `;
|
|
41080
41099
|
return `${lead}${p("accent", clip(namespace, len(lead) + 2 + len(meta3)))} ${p("muted", meta3)}`;
|
|
41081
41100
|
},
|
|
41082
|
-
rosterRow: (a) => ` ${cell(a.name, 20, more)}${cell(KIND_LABEL[a.kind]
|
|
41101
|
+
rosterRow: (a) => ` ${cell(a.name, 20, more)}${cell(KIND_LABEL[displayKind(a.kind)], 13, more)}${cell(a.machine, 22, more)}${a.state === "live" ? p("success", `${g("live")} live`) : p("warning", `${g("queued")} queued`)}`,
|
|
41083
41102
|
rosterMore: (n) => ` ${p("muted", `and ${n} more ${g("sep")} npx @open-bus/cli status`)}`,
|
|
41084
41103
|
queuedFootnote: () => [
|
|
41085
41104
|
p(
|
|
@@ -41830,7 +41849,7 @@ var noService = {
|
|
|
41830
41849
|
remove: async () => ({}),
|
|
41831
41850
|
cli: () => ["open-bus"]
|
|
41832
41851
|
};
|
|
41833
|
-
var VERSION = true ? "0.
|
|
41852
|
+
var VERSION = true ? "0.45.0" : JSON.parse(
|
|
41834
41853
|
readFileSync9(new URL("../package.json", import.meta.url), "utf8")
|
|
41835
41854
|
).version;
|
|
41836
41855
|
var which = (cmd) => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-bus/cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.45.0",
|
|
5
5
|
"description": "One bus for all your AI coding agents, across machines.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"typescript": "^5.9.3",
|
|
30
30
|
"vitest": "^4.1.12",
|
|
31
31
|
"zod": "^4.1.0",
|
|
32
|
-
"@ob/adapter-opencode": "0.0.0",
|
|
33
32
|
"@ob/adapter-claude-code": "0.0.0",
|
|
33
|
+
"@ob/adapter-opencode": "0.0.0",
|
|
34
34
|
"@ob/adapter-mcp-json": "0.0.0",
|
|
35
35
|
"@ob/adapter-pi": "0.0.0",
|
|
36
36
|
"@ob/daemon": "0.0.0",
|