@open-artifacts/bus 0.185.0 → 0.186.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/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.185.0";
14
+ const CLIENT_VERSION = "0.186.1";
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.185.0" : "0.0.0";
27747
+ var CLIENT_VERSION = true ? "0.186.1" : "0.0.0";
27748
27748
  var clientVersion = {
27749
27749
  client_version: external_exports.string().min(1).max(64).optional()
27750
27750
  };
@@ -30405,6 +30405,9 @@ function failed(r) {
30405
30405
  // ../bus-adapter-claude-code/src/codex.ts
30406
30406
  var RESTART_REFUSAL = `Open Artifacts bus did not accept this thread: the update is half done. Ask the user to run ${BUS_CMD} install.`;
30407
30407
 
30408
+ // ../bus-adapter-claude-code/src/connect.ts
30409
+ var NOT_CONNECTED_MESSAGE = `oa-bus: this session isn't connected to the bus. Tell your user. Installing restarts the bus for every session on this machine, so ask them before running \`${BUS_CMD} install\`.`;
30410
+
30408
30411
  // ../bus-adapter-claude-code/src/forward.ts
30409
30412
  var MAX_BODY = 16 * 1024 * 1024;
30410
30413
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oa-bus",
3
- "version": "0.185.0",
3
+ "version": "0.186.1",
4
4
  "type": "module",
5
5
  "openclaw": {
6
6
  "extensions": [
package/dist/index.js CHANGED
@@ -32729,7 +32729,7 @@ var init_frames = __esm({
32729
32729
  late = { late: external_exports.array(external_exports.string().min(1)).optional() };
32730
32730
  isWellFormed2 = (s) => s.isWellFormed();
32731
32731
  WELL_FORMED = { message: "text is not well-formed unicode" };
32732
- CLIENT_VERSION = true ? "0.185.0" : "0.0.0";
32732
+ CLIENT_VERSION = true ? "0.186.1" : "0.0.0";
32733
32733
  clientVersion = {
32734
32734
  client_version: external_exports.string().min(1).max(64).optional()
32735
32735
  };
@@ -34685,15 +34685,18 @@ async function connectOutcome(deps2) {
34685
34685
  let seen2 = false;
34686
34686
  for (let waited = 0; ; waited += RESTART_STEP_MS) {
34687
34687
  const out = await attempt(deps2);
34688
+ if (out.kind === "ok") connectedBefore = true;
34688
34689
  if (out.kind === "no-session") {
34689
- if (!RECOVERABLE_REASONS.includes(out.reason) || waited >= waitMs)
34690
- return out;
34690
+ const recoverable = RECOVERABLE_REASONS.includes(out.reason) || out.reason === "none" && connectedBefore;
34691
+ if (!recoverable || waited >= waitMs)
34692
+ return connectedBefore ? { ...out, priorSuccess: true } : out;
34691
34693
  await sleep(RESTART_STEP_MS);
34692
34694
  continue;
34693
34695
  }
34694
34696
  if (out.kind !== "no-socket") return out;
34695
34697
  seen2 ||= out.seen;
34696
- if (waited >= waitMs) return { kind: "no-socket", seen: seen2 };
34698
+ if (waited >= waitMs)
34699
+ return connectedBefore ? { kind: "no-socket", seen: seen2, priorSuccess: true } : { kind: "no-socket", seen: seen2 };
34697
34700
  await sleep(RESTART_STEP_MS);
34698
34701
  }
34699
34702
  }
@@ -34729,9 +34732,10 @@ function noSessionMessage(out, underClaude2) {
34729
34732
  return `oa-bus: the bus socket folder isn't safe to use; run \`${BUS_CMD} doctor\`.`;
34730
34733
  if (out.kind === "no-session" && out.reason !== "none")
34731
34734
  return underClaude2 ? `oa-bus: this Claude session isn't visible to the bus right now (${out.reason}); retry, or run /mcp and reconnect oa_bus.` : NOT_UNDER_CLAUDE;
34732
- return underClaude2 ? `oa-bus: no Claude session or daemon found. Run \`${BUS_CMD} install\`.` : NOT_UNDER_CLAUDE;
34735
+ if (!underClaude2) return NOT_UNDER_CLAUDE;
34736
+ return "priorSuccess" in out && out.priorSuccess ? UNREACHABLE_MESSAGE : NOT_CONNECTED_MESSAGE;
34733
34737
  }
34734
- var RESTARTING_MESSAGE, RESTART_WAIT_MS, RESTART_STEP_MS, BUSY_MESSAGE;
34738
+ var RESTARTING_MESSAGE, RESTART_WAIT_MS, RESTART_STEP_MS, UNREACHABLE_MESSAGE, NOT_CONNECTED_MESSAGE, connectedBefore, BUSY_MESSAGE;
34735
34739
  var init_connect = __esm({
34736
34740
  "../bus-adapter-claude-code/src/connect.ts"() {
34737
34741
  "use strict";
@@ -34740,6 +34744,9 @@ var init_connect = __esm({
34740
34744
  RESTARTING_MESSAGE = "oa-bus: the bus daemon is restarting; retry in a few seconds. If it keeps failing, run /mcp and reconnect oa_bus.";
34741
34745
  RESTART_WAIT_MS = 2e3;
34742
34746
  RESTART_STEP_MS = 200;
34747
+ UNREACHABLE_MESSAGE = "oa-bus: couldn't reach the bus just now. Wait a few seconds and try again. Don't run the installer.";
34748
+ NOT_CONNECTED_MESSAGE = `oa-bus: this session isn't connected to the bus. Tell your user. Installing restarts the bus for every session on this machine, so ask them before running \`${BUS_CMD} install\`.`;
34749
+ connectedBefore = false;
34743
34750
  BUSY_MESSAGE = "oa-bus: the bus daemon did not answer in time (busy?). Try again.";
34744
34751
  }
34745
34752
  });
@@ -50268,7 +50275,7 @@ var noService = {
50268
50275
  remove: async () => ({}),
50269
50276
  cli: () => ["oa-bus"]
50270
50277
  };
50271
- var VERSION = true ? "0.185.0" : JSON.parse(
50278
+ var VERSION = true ? "0.186.1" : JSON.parse(
50272
50279
  readFileSync15(new URL("../package.json", import.meta.url), "utf8")
50273
50280
  ).version;
50274
50281
  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.185.0",
4
+ "version": "0.186.1",
5
5
  "description": "The Open Artifacts bus: your AI agents reach each other across machines.",
6
6
  "license": "MIT",
7
7
  "repository": {