@open-artifacts/bus 0.169.0 → 0.170.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 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.169.0";
14
+ const CLIENT_VERSION = "0.170.0";
15
15
 
16
16
  type Frame = Json & { type: string; id: string };
17
17
  type Ctx = {
@@ -27744,7 +27744,7 @@ var base2 = { v: external_exports.literal(V), id: external_exports.string().min(
27744
27744
  var late = { late: external_exports.array(external_exports.string().min(1)).optional() };
27745
27745
  var isWellFormed2 = (s) => s.isWellFormed();
27746
27746
  var WELL_FORMED = { message: "text is not well-formed unicode" };
27747
- var CLIENT_VERSION = true ? "0.169.0" : "0.0.0";
27747
+ var CLIENT_VERSION = true ? "0.170.0" : "0.0.0";
27748
27748
  var clientVersion = {
27749
27749
  client_version: external_exports.string().min(1).max(64).optional()
27750
27750
  };
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oa-bus",
3
- "version": "0.169.0",
3
+ "version": "0.170.0",
4
4
  "type": "module",
5
5
  "openclaw": {
6
6
  "extensions": [
package/dist/index.js CHANGED
@@ -21823,7 +21823,7 @@ var init_frames = __esm({
21823
21823
  late = { late: external_exports.array(external_exports.string().min(1)).optional() };
21824
21824
  isWellFormed2 = (s) => s.isWellFormed();
21825
21825
  WELL_FORMED = { message: "text is not well-formed unicode" };
21826
- CLIENT_VERSION = true ? "0.169.0" : "0.0.0";
21826
+ CLIENT_VERSION = true ? "0.170.0" : "0.0.0";
21827
21827
  clientVersion = {
21828
21828
  client_version: external_exports.string().min(1).max(64).optional()
21829
21829
  };
@@ -48425,6 +48425,7 @@ async function runDaemon(deps2 = {}) {
48425
48425
  );
48426
48426
  const wakeLogged = /* @__PURE__ */ new Set();
48427
48427
  const wakeAsked = /* @__PURE__ */ new Map();
48428
+ const wakeUnloadedLogged = /* @__PURE__ */ new Map();
48428
48429
  let waking = false;
48429
48430
  let wakeCheckedAt;
48430
48431
  const wakeSent = /* @__PURE__ */ new Map();
@@ -48447,6 +48448,8 @@ async function runDaemon(deps2 = {}) {
48447
48448
  );
48448
48449
  const away = new Set(rows.map((r) => r.ref));
48449
48450
  for (const [k, w] of wakeSent) if (!away.has(w.ref)) wakeSent.delete(k);
48451
+ for (const k of wakeUnloadedLogged.keys())
48452
+ if (!away.has(k)) wakeUnloadedLogged.delete(k);
48450
48453
  for (const m of [wakeAsked, wakeWaiting])
48451
48454
  for (const k of m.keys())
48452
48455
  if (!away.has(k.split(":")[1] ?? "")) m.delete(k);
@@ -48464,7 +48467,10 @@ async function runDaemon(deps2 = {}) {
48464
48467
  };
48465
48468
  let counts;
48466
48469
  if (hubWaitingQuery && hub.open && hubVersion !== void 0) {
48467
- const refs = rows.filter((r) => held2.has(r.ref)).map((r) => r.ref).slice(0, MAX_WAITING_QUERY);
48470
+ const refs = [
48471
+ ...rows.filter((r) => held2.has(r.ref)),
48472
+ ...rows.filter((r) => !held2.has(r.ref))
48473
+ ].map((r) => r.ref).slice(0, MAX_WAITING_QUERY);
48468
48474
  if (refs.length) {
48469
48475
  counts = await hubWaitingCounts(refs);
48470
48476
  if (!counts) log("codex wake skipped: the hub did not answer");
@@ -48472,7 +48478,14 @@ async function runDaemon(deps2 = {}) {
48472
48478
  }
48473
48479
  for (const r of rows) {
48474
48480
  const h = held2.get(r.ref);
48475
- if (!h) continue;
48481
+ if (!h) {
48482
+ const last = wakeUnloadedLogged.get(r.ref);
48483
+ if (counts?.[r.ref] && (last === void 0 || now - last >= 36e5)) {
48484
+ wakeUnloadedLogged.set(r.ref, now);
48485
+ ev("codex_wake_skipped", { thread: r.ref, reason: "not_loaded" });
48486
+ }
48487
+ continue;
48488
+ }
48476
48489
  const key2 = `wake:${r.ref}:${h.pid}:${h.start.replace(/\s+/g, "_")}`;
48477
48490
  const who = `codex wake ${r.ref.slice(0, 8)} pid ${h.pid}`;
48478
48491
  let n = 1;
@@ -50314,7 +50327,7 @@ var noService = {
50314
50327
  remove: async () => ({}),
50315
50328
  cli: () => ["oa-bus"]
50316
50329
  };
50317
- var VERSION = true ? "0.169.0" : JSON.parse(
50330
+ var VERSION = true ? "0.170.0" : JSON.parse(
50318
50331
  readFileSync16(new URL("../package.json", import.meta.url), "utf8")
50319
50332
  ).version;
50320
50333
  var which = (cmd) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@open-artifacts/bus",
3
3
  "type": "module",
4
- "version": "0.169.0",
4
+ "version": "0.170.0",
5
5
  "description": "The Open Artifacts bus: your AI agents reach each other across machines.",
6
6
  "license": "MIT",
7
7
  "repository": {