@open-bus/cli 0.44.0 → 0.44.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.
Files changed (2) hide show
  1. package/dist/index.js +20 -4
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -22276,6 +22276,22 @@ function ancestorChain(pid) {
22276
22276
  }
22277
22277
  return out;
22278
22278
  }
22279
+ function statStartTicks(stat) {
22280
+ const close = stat.lastIndexOf(")");
22281
+ if (close < 0) return null;
22282
+ const start = stat.slice(close + 1).trim().split(/\s+/)[19];
22283
+ return start && /^\d+$/.test(start) ? start : null;
22284
+ }
22285
+ function claudeProcStartOf(pid, deps = {}) {
22286
+ if ((deps.platform ?? process.platform) !== "linux") return procStartOf(pid);
22287
+ try {
22288
+ return statStartTicks(
22289
+ (deps.readStat ?? ((p) => readFileSync(`/proc/${p}/stat`, "utf8")))(pid)
22290
+ );
22291
+ } catch {
22292
+ return null;
22293
+ }
22294
+ }
22279
22295
  function sessionHello(session, pid, cwd) {
22280
22296
  return Hello2.parse({
22281
22297
  v: 1,
@@ -37442,7 +37458,7 @@ async function connect4() {
37442
37458
  const session = findSession(process.pid, {
37443
37459
  sessionsDir: SESSIONS,
37444
37460
  ancestors: ancestorChain,
37445
- procStart: procStartOf
37461
+ procStart: claudeProcStartOf
37446
37462
  });
37447
37463
  if (!session || socketDirProblem(HOME)) return null;
37448
37464
  return await connectDaemon({
@@ -37956,7 +37972,7 @@ function attestClaude(hello, deps) {
37956
37972
  if (typeof raw.procStart !== "string") {
37957
37973
  return { ok: false, reason: "Claude session has no procStart" };
37958
37974
  }
37959
- const start = (deps.procStart ?? procStartOf)(pid);
37975
+ const start = (deps.procStart ?? claudeProcStartOf)(pid);
37960
37976
  if (!start) return { ok: false, reason: "session process is not running" };
37961
37977
  if (raw.procStart !== start) {
37962
37978
  return { ok: false, reason: "session process start time moved" };
@@ -40171,7 +40187,7 @@ async function runDaemon(deps = {}) {
40171
40187
  const running = cl.isRunning ?? isRunning;
40172
40188
  const claudeSessions = {
40173
40189
  dir: cl.sessionsDir ?? claudeSessionsDir(),
40174
- procStart: cachedProcStart(cl.procStart ?? procStartOf, running, {
40190
+ procStart: cachedProcStart(cl.procStart ?? claudeProcStartOf, running, {
40175
40191
  ttlMs: cl.syncMs ?? 2e3
40176
40192
  }),
40177
40193
  isRunning: running
@@ -41814,7 +41830,7 @@ var noService = {
41814
41830
  remove: async () => ({}),
41815
41831
  cli: () => ["open-bus"]
41816
41832
  };
41817
- var VERSION = true ? "0.44.0" : JSON.parse(
41833
+ var VERSION = true ? "0.44.1" : JSON.parse(
41818
41834
  readFileSync9(new URL("../package.json", import.meta.url), "utf8")
41819
41835
  ).version;
41820
41836
  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.44.0",
4
+ "version": "0.44.1",
5
5
  "description": "One bus for all your AI coding agents, across machines.",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -29,11 +29,11 @@
29
29
  "typescript": "^5.9.3",
30
30
  "vitest": "^4.1.12",
31
31
  "zod": "^4.1.0",
32
- "@ob/adapter-mcp-json": "0.0.0",
33
- "@ob/daemon": "0.0.0",
32
+ "@ob/adapter-opencode": "0.0.0",
34
33
  "@ob/adapter-claude-code": "0.0.0",
34
+ "@ob/adapter-mcp-json": "0.0.0",
35
35
  "@ob/adapter-pi": "0.0.0",
36
- "@ob/adapter-opencode": "0.0.0",
36
+ "@ob/daemon": "0.0.0",
37
37
  "@ob/ipc": "0.0.0",
38
38
  "@ob/shared": "0.0.0",
39
39
  "@ob/ui": "0.0.0"