@open-artifacts/bus 0.212.0 → 0.214.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/oa-bus.ts +1 -1
- package/assets/openclaw/index.js +1 -1
- package/assets/openclaw/package.json +1 -1
- package/dist/index.js +68 -21
- package/package.json +2 -2
package/assets/oa-bus.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { StringDecoder } from "node:string_decoder";
|
|
|
11
11
|
type Json = Record<string, unknown>;
|
|
12
12
|
|
|
13
13
|
/** The IPC marker (CONTRACT.md): the package version, stamped by the CLI's bundler. */
|
|
14
|
-
const CLIENT_VERSION = "0.
|
|
14
|
+
const CLIENT_VERSION = "0.214.0";
|
|
15
15
|
|
|
16
16
|
type Frame = Json & { type: string; id: string };
|
|
17
17
|
type Ctx = {
|
package/assets/openclaw/index.js
CHANGED
|
@@ -27846,7 +27846,7 @@ var base2 = { v: external_exports.literal(V), id: external_exports.string().min(
|
|
|
27846
27846
|
var late = { late: external_exports.array(external_exports.string().min(1)).optional() };
|
|
27847
27847
|
var isWellFormed2 = (s) => s.isWellFormed();
|
|
27848
27848
|
var WELL_FORMED = { message: "text is not well-formed unicode" };
|
|
27849
|
-
var CLIENT_VERSION = true ? "0.
|
|
27849
|
+
var CLIENT_VERSION = true ? "0.214.0" : "0.0.0";
|
|
27850
27850
|
var clientVersion = {
|
|
27851
27851
|
client_version: external_exports.string().min(1).max(64).optional()
|
|
27852
27852
|
};
|
package/dist/index.js
CHANGED
|
@@ -32854,7 +32854,7 @@ var init_frames = __esm({
|
|
|
32854
32854
|
late = { late: external_exports.array(external_exports.string().min(1)).optional() };
|
|
32855
32855
|
isWellFormed2 = (s) => s.isWellFormed();
|
|
32856
32856
|
WELL_FORMED = { message: "text is not well-formed unicode" };
|
|
32857
|
-
CLIENT_VERSION = true ? "0.
|
|
32857
|
+
CLIENT_VERSION = true ? "0.214.0" : "0.0.0";
|
|
32858
32858
|
clientVersion = {
|
|
32859
32859
|
client_version: external_exports.string().min(1).max(64).optional()
|
|
32860
32860
|
};
|
|
@@ -44727,6 +44727,18 @@ import {
|
|
|
44727
44727
|
} from "node:fs";
|
|
44728
44728
|
import { join as join3 } from "node:path";
|
|
44729
44729
|
var home = () => busHome();
|
|
44730
|
+
var isDefaultHome = (h = home()) => h === busHome({});
|
|
44731
|
+
function procBusHome(pid) {
|
|
44732
|
+
if (process.platform !== "linux") return null;
|
|
44733
|
+
let env2;
|
|
44734
|
+
try {
|
|
44735
|
+
env2 = readFileSync2(`/proc/${pid}/environ`, "utf8");
|
|
44736
|
+
} catch {
|
|
44737
|
+
return null;
|
|
44738
|
+
}
|
|
44739
|
+
const v = env2.split("\0").find((e) => e.startsWith("OA_BUS_HOME="))?.slice("OA_BUS_HOME=".length);
|
|
44740
|
+
return v ? busHome({ OA_BUS_HOME: v }) : void 0;
|
|
44741
|
+
}
|
|
44730
44742
|
var socketPath = () => daemonSocketPath(home());
|
|
44731
44743
|
var claudeReturnDir2 = (h = home()) => claudeReturnDir(h);
|
|
44732
44744
|
function prepareSocketDir(listenPath, returnDir, h = home()) {
|
|
@@ -51551,7 +51563,7 @@ var PINS = {
|
|
|
51551
51563
|
payloadType: "application/vnd.in-toto+json",
|
|
51552
51564
|
tarballName: "bus"
|
|
51553
51565
|
};
|
|
51554
|
-
var MIN_COMMIT_VERSION = "
|
|
51566
|
+
var MIN_COMMIT_VERSION = "0.213.0";
|
|
51555
51567
|
var VERSION_RE = /^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$/;
|
|
51556
51568
|
var LIMITS2 = {
|
|
51557
51569
|
maxVersionLength: 32,
|
|
@@ -52252,7 +52264,7 @@ function verifyRelease(rel, opts = {}) {
|
|
|
52252
52264
|
}
|
|
52253
52265
|
|
|
52254
52266
|
// ../bus-daemon/src/update/updater.ts
|
|
52255
|
-
var UPDATER_LOOP_ENABLED =
|
|
52267
|
+
var UPDATER_LOOP_ENABLED = true;
|
|
52256
52268
|
var TICK_MS = 5e3;
|
|
52257
52269
|
var REQUEST_MAX_MS = 5 * 6e4;
|
|
52258
52270
|
var RETRY_MS = 10 * 6e4;
|
|
@@ -52370,7 +52382,9 @@ var Updater = class {
|
|
|
52370
52382
|
this.stepBackHeld = i;
|
|
52371
52383
|
return { kind: "retry_later" };
|
|
52372
52384
|
}
|
|
52373
|
-
|
|
52385
|
+
const r = await this.switchTo(i.version, false);
|
|
52386
|
+
if (r.kind === "retry_later") this.stepBackHeld = i;
|
|
52387
|
+
return r;
|
|
52374
52388
|
}
|
|
52375
52389
|
if (s.staged?.version === i.version && s.staged.manifest) {
|
|
52376
52390
|
if (treeMatches(versionDir(home2, i.version), s.staged.manifest))
|
|
@@ -52617,16 +52631,33 @@ var Updater = class {
|
|
|
52617
52631
|
person ? "requested" : "ok"
|
|
52618
52632
|
))
|
|
52619
52633
|
return { kind: "retry_later" };
|
|
52634
|
+
const backOut = (reason2) => queueReport(home2, {
|
|
52635
|
+
event: "ready_24h",
|
|
52636
|
+
// "held" on the wire
|
|
52637
|
+
from: running,
|
|
52638
|
+
to: version2,
|
|
52639
|
+
reason: reason2,
|
|
52640
|
+
at: this.now()
|
|
52641
|
+
});
|
|
52620
52642
|
const after = readPolicy(home2);
|
|
52621
|
-
if (after.unreadable || after.off)
|
|
52622
|
-
|
|
52643
|
+
if (after.unreadable || after.off) {
|
|
52644
|
+
backOut("other");
|
|
52645
|
+
return { kind: "retry_later" };
|
|
52646
|
+
}
|
|
52647
|
+
if (staged && !person && this.named !== version2) {
|
|
52648
|
+
backOut("nothing_staged");
|
|
52623
52649
|
return { kind: "retry_later" };
|
|
52624
|
-
|
|
52650
|
+
}
|
|
52651
|
+
if (staged && (after.staged?.version !== version2 || JSON.stringify(after.staged.manifest) !== JSON.stringify(proven) || !after.staged.manifest || !treeMatches(versionDir(home2, version2), after.staged.manifest))) {
|
|
52652
|
+
backOut("staged_changed");
|
|
52625
52653
|
return { kind: "proof_refused", code: "staged_changed" };
|
|
52654
|
+
}
|
|
52626
52655
|
if (staged && [after.newestRun, after.current, running].some(
|
|
52627
52656
|
(v) => v !== void 0 && compareVersions2(version2, v) !== 1
|
|
52628
|
-
))
|
|
52657
|
+
)) {
|
|
52658
|
+
backOut("not_forward");
|
|
52629
52659
|
return { kind: "refused", reason: "not_forward" };
|
|
52660
|
+
}
|
|
52630
52661
|
try {
|
|
52631
52662
|
setPending(home2, { from: running, to: version2, startedAt: now });
|
|
52632
52663
|
recordAttempt(home2, now);
|
|
@@ -52639,6 +52670,7 @@ var Updater = class {
|
|
|
52639
52670
|
this.d.log(
|
|
52640
52671
|
`update ${version2}: could not switch: ${e instanceof Error ? e.message : String(e)}`
|
|
52641
52672
|
);
|
|
52673
|
+
backOut("other");
|
|
52642
52674
|
return { kind: "disabled" };
|
|
52643
52675
|
}
|
|
52644
52676
|
prune(home2, [running, version2, s.previous]);
|
|
@@ -53100,6 +53132,8 @@ async function runDaemon(deps2 = {}) {
|
|
|
53100
53132
|
prepareSocketDir(listenPath, returnDir);
|
|
53101
53133
|
const startOfPid = cl.procStart ?? claudeProcStartOf;
|
|
53102
53134
|
const running = cl.isRunning ?? isRunning;
|
|
53135
|
+
const discoverClaude = cl.discover ?? isDefaultHome();
|
|
53136
|
+
const claudeHomeOf = cl.homeOf ?? procBusHome;
|
|
53103
53137
|
const claudeSessions = {
|
|
53104
53138
|
dir: cl.sessionsDir ?? claudeSessionsDir(),
|
|
53105
53139
|
procStart: cachedProcStart(cl.procStart ?? claudeProcStartOf, running),
|
|
@@ -53513,6 +53547,11 @@ async function runDaemon(deps2 = {}) {
|
|
|
53513
53547
|
for (const s of live) {
|
|
53514
53548
|
const prev = agents.byRef(s.ref);
|
|
53515
53549
|
if (prev && prev.kind !== "claude-code") continue;
|
|
53550
|
+
if (!prev && !discoverClaude) continue;
|
|
53551
|
+
if (!prev) {
|
|
53552
|
+
const h = claudeHomeOf(s.pid);
|
|
53553
|
+
if (typeof h === "string" && h !== home()) continue;
|
|
53554
|
+
}
|
|
53516
53555
|
if (prev && prev.procStart === void 0 && prev.pid === s.pid)
|
|
53517
53556
|
prev.procStart = s.procStart;
|
|
53518
53557
|
if (prev?.live) {
|
|
@@ -54870,7 +54909,10 @@ async function runDaemon(deps2 = {}) {
|
|
|
54870
54909
|
exit: upd.exit,
|
|
54871
54910
|
log,
|
|
54872
54911
|
...upd.enabled !== void 0 ? { enabled: upd.enabled } : {},
|
|
54873
|
-
...upd.every ? { every: upd.every } : {}
|
|
54912
|
+
...upd.every ? { every: upd.every } : {},
|
|
54913
|
+
...upd.now ? { now: upd.now } : {},
|
|
54914
|
+
...upd.fetch ? { fetch: upd.fetch } : {},
|
|
54915
|
+
...upd.verify ? { verify: upd.verify } : {}
|
|
54874
54916
|
}) : void 0;
|
|
54875
54917
|
updaterRef = updater;
|
|
54876
54918
|
updater?.start();
|
|
@@ -55273,11 +55315,16 @@ function copy(style, bus = BUS_CMD, approve) {
|
|
|
55273
55315
|
],
|
|
55274
55316
|
// Status and doctor, when the hub runs a newer release (C26h). Each
|
|
55275
55317
|
// version is cut to 19, so the line stays within 80 columns.
|
|
55276
|
-
|
|
55318
|
+
// The update goes through the instance's checked install step, never an
|
|
55319
|
+
// unchecked npx download.
|
|
55320
|
+
updateAvailable: (hub, mine, origin) => [
|
|
55277
55321
|
warn(
|
|
55278
55322
|
`Update available: ${cutMiddle(hub, 19, more)} (this machine runs ${cutMiddle(mine, 19, more)})`
|
|
55279
55323
|
),
|
|
55280
|
-
next(`
|
|
55324
|
+
next(`Ask your agent to follow "Install the bus" in`),
|
|
55325
|
+
next(
|
|
55326
|
+
origin ? `${origin.replace(/\/+$/, "")}/llms.txt.` : "your instance's llms.txt."
|
|
55327
|
+
)
|
|
55281
55328
|
],
|
|
55282
55329
|
// Status and doctor, when the hub's `/healthz` names a problem (#294).
|
|
55283
55330
|
hubProblem: (problem) => [
|
|
@@ -57575,9 +57622,9 @@ var real = (path, native = false) => {
|
|
|
57575
57622
|
return parent === abs ? abs : join26(real(parent, native), basename7(abs));
|
|
57576
57623
|
}
|
|
57577
57624
|
};
|
|
57578
|
-
var
|
|
57625
|
+
var isDefaultHome2 = (home2, userHome) => real(home2) === real(join26(userHome, ".oa-bus"));
|
|
57579
57626
|
function serviceNames(home2, userHome) {
|
|
57580
|
-
const suffix =
|
|
57627
|
+
const suffix = isDefaultHome2(home2, userHome) ? "" : createHash9("sha256").update(real(home2)).digest("hex").slice(0, 8);
|
|
57581
57628
|
return {
|
|
57582
57629
|
label: suffix ? `${LAUNCHD_LABEL}.${suffix}` : LAUNCHD_LABEL,
|
|
57583
57630
|
unit: suffix ? `oa-bus-${suffix}.service` : SYSTEMD_UNIT
|
|
@@ -57715,7 +57762,7 @@ function systemService(d) {
|
|
|
57715
57762
|
entry: join26(h, "bin", entryName(src)),
|
|
57716
57763
|
env: {
|
|
57717
57764
|
PATH: servicePath(d.env, d.execPath, d.platform),
|
|
57718
|
-
...
|
|
57765
|
+
...isDefaultHome2(h, d.userHome) ? {} : { OA_BUS_HOME: h },
|
|
57719
57766
|
// Attestation and wake read the Codex home this shell uses (C26e).
|
|
57720
57767
|
...codexHomeEnv(d.userHome, d.env)
|
|
57721
57768
|
},
|
|
@@ -57899,7 +57946,7 @@ var noService = {
|
|
|
57899
57946
|
remove: async () => ({}),
|
|
57900
57947
|
cli: () => ["oa-bus"]
|
|
57901
57948
|
};
|
|
57902
|
-
var VERSION = true ? "0.
|
|
57949
|
+
var VERSION = true ? "0.214.0" : JSON.parse(
|
|
57903
57950
|
readFileSync21(new URL("../package.json", import.meta.url), "utf8")
|
|
57904
57951
|
).version;
|
|
57905
57952
|
var which = (cmd) => {
|
|
@@ -62844,7 +62891,7 @@ function busCmd(o) {
|
|
|
62844
62891
|
}
|
|
62845
62892
|
}
|
|
62846
62893
|
function wiredTo(ctx) {
|
|
62847
|
-
if (
|
|
62894
|
+
if (isDefaultHome2(ctx.home, ctx.userHome)) return true;
|
|
62848
62895
|
try {
|
|
62849
62896
|
return Object.values(
|
|
62850
62897
|
checkAdapters({
|
|
@@ -62978,7 +63025,7 @@ function claudeProofChecks(ctx, hub) {
|
|
|
62978
63025
|
projectFile: join36(ctx.cwd, ".mcp.json"),
|
|
62979
63026
|
cwd: ctx.cwd,
|
|
62980
63027
|
recorded: rec.proofs,
|
|
62981
|
-
...
|
|
63028
|
+
...isDefaultHome2(ctx.home, ctx.userHome) ? {} : { busHome: ctx.home }
|
|
62982
63029
|
});
|
|
62983
63030
|
const out = [];
|
|
62984
63031
|
const install3 = `run ${ctx.busCmd} install`;
|
|
@@ -65063,7 +65110,7 @@ async function install2(opts, realCtx2) {
|
|
|
65063
65110
|
}
|
|
65064
65111
|
async function installRun(opts, realCtx2) {
|
|
65065
65112
|
const second = Boolean(opts.alongside);
|
|
65066
|
-
if (second &&
|
|
65113
|
+
if (second && isDefaultHome2(realCtx2.home, realCtx2.userHome)) {
|
|
65067
65114
|
sayErr(realCtx2, [
|
|
65068
65115
|
"--alongside sets up a second bus, so it needs --home <dir> for a folder other than the main one.",
|
|
65069
65116
|
`Run ${realCtx2.busCmd} install --alongside --home <dir> --instance <url>.`
|
|
@@ -65227,7 +65274,7 @@ async function status(ctx) {
|
|
|
65227
65274
|
st,
|
|
65228
65275
|
async () => (await health).version
|
|
65229
65276
|
);
|
|
65230
|
-
if (update2) say(ctx, c.updateAvailable(update2, st.version));
|
|
65277
|
+
if (update2) say(ctx, c.updateAvailable(update2, st.version, m.hub));
|
|
65231
65278
|
const habits = habitsLine(ctx);
|
|
65232
65279
|
if (habits) say(ctx, habits);
|
|
65233
65280
|
if (readRecord4(ctx.home)?.plugins?.length)
|
|
@@ -65393,7 +65440,7 @@ async function doctor(ctx) {
|
|
|
65393
65440
|
st,
|
|
65394
65441
|
async () => (await health()).version
|
|
65395
65442
|
);
|
|
65396
|
-
if (update2) warn(c.updateAvailable(update2, st.version));
|
|
65443
|
+
if (update2) warn(c.updateAvailable(update2, st.version, hub ?? ""));
|
|
65397
65444
|
} else
|
|
65398
65445
|
fail3(
|
|
65399
65446
|
probe2.state === "stalled" ? c.daemonNotResponding() : socketFolderLines(ctx) ?? c.daemonNotRunning()
|
|
@@ -65550,7 +65597,7 @@ async function doctor(ctx) {
|
|
|
65550
65597
|
else if (sh?.kind === "other") warn(c.shimDoctorOther(tilde(ctx, sh.path)));
|
|
65551
65598
|
else if (sh?.kind === "missing") warn(c.shimDoctorMissing());
|
|
65552
65599
|
}
|
|
65553
|
-
const others2 =
|
|
65600
|
+
const others2 = isDefaultHome2(ctx.home, ctx.userHome) ? ctx.service.others?.() ?? [] : [];
|
|
65554
65601
|
if (others2.length > 0) say(ctx, c.otherHomes(others2));
|
|
65555
65602
|
const habits = habitsLine(ctx);
|
|
65556
65603
|
if (habits) say(ctx, habits);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-artifacts/bus",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.214.0",
|
|
5
5
|
"description": "The Open Artifacts bus: your AI agents reach each other across machines.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -29,6 +29,6 @@
|
|
|
29
29
|
"typecheck": "tsc --noEmit"
|
|
30
30
|
},
|
|
31
31
|
"oaBus": {
|
|
32
|
-
"commit": "
|
|
32
|
+
"commit": "df5ab726c67c97504c73502bb3c6ebd788b758b1"
|
|
33
33
|
}
|
|
34
34
|
}
|