oasis_test 0.1.19 → 0.1.21

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 +9 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -33425,9 +33425,11 @@ function nodesDomain(deps) {
33425
33425
  wireHub(hub);
33426
33426
  await Promise.all(hub.connectedDaemons().map((d) => syncConnectedDaemon(d.daemonId, hub)));
33427
33427
  }
33428
+ const daemonVersionById = new Map((hub?.connectedDaemons() ?? []).map((d) => [d.daemonId, d.meta.daemonVersion]));
33428
33429
  const nodes = await deps.nodeStore.listNodes();
33429
33430
  const items = await Promise.all(nodes.map(async (n) => {
33430
33431
  const rts = await deps.nodeStore.listRuntimes(n.id);
33432
+ const daemonVersion = daemonVersionById.get(n.id);
33431
33433
  return {
33432
33434
  id: n.id,
33433
33435
  hostname: n.hostname,
@@ -33444,6 +33446,7 @@ function nodesDomain(deps) {
33444
33446
  lastReportAt: r.lastSeenAt
33445
33447
  })),
33446
33448
  nodeVersion: n.nodeVersion,
33449
+ ...daemonVersion ? { daemonVersion } : {},
33447
33450
  ...n.name ? { name: n.name } : {}
33448
33451
  };
33449
33452
  }));
@@ -49312,7 +49315,7 @@ async function preflightOasisAccess(job) {
49312
49315
  }
49313
49316
  }
49314
49317
  var DaemonWsClient = class {
49315
- constructor(serverUrl, daemonId, sessions, adapters = ["claude-code"], token, runtimes = adapters.map((kind) => ({ kind })), nodeName, reportRuntimes = true, preflight = true, onUpdate) {
49318
+ constructor(serverUrl, daemonId, sessions, adapters = ["claude-code"], token, runtimes = adapters.map((kind) => ({ kind })), nodeName, reportRuntimes = true, preflight = true, onUpdate, daemonVersion) {
49316
49319
  this.serverUrl = serverUrl;
49317
49320
  this.daemonId = daemonId;
49318
49321
  this.sessions = sessions;
@@ -49323,6 +49326,7 @@ var DaemonWsClient = class {
49323
49326
  this.reportRuntimes = reportRuntimes;
49324
49327
  this.preflight = preflight;
49325
49328
  this.onUpdate = onUpdate;
49329
+ this.daemonVersion = daemonVersion;
49326
49330
  }
49327
49331
  ws = null;
49328
49332
  pingTimer = null;
@@ -49431,7 +49435,7 @@ var DaemonWsClient = class {
49431
49435
  if (this.ws?.readyState === import_websocket.default.OPEN) this.ws.send(JSON.stringify(msg));
49432
49436
  }
49433
49437
  buildMeta() {
49434
- return { hostname: (0, import_node_os3.hostname)(), adapters: this.adapters, ...this.reportRuntimes ? { runtimes: this.runtimes } : {}, nodeVersion: process.version, ...this.nodeName ? { nodeName: this.nodeName } : {} };
49438
+ return { hostname: (0, import_node_os3.hostname)(), adapters: this.adapters, ...this.reportRuntimes ? { runtimes: this.runtimes } : {}, nodeVersion: process.version, ...this.daemonVersion ? { daemonVersion: this.daemonVersion } : {}, ...this.nodeName ? { nodeName: this.nodeName } : {} };
49435
49439
  }
49436
49440
  };
49437
49441
 
@@ -49533,7 +49537,7 @@ async function startNode(opts) {
49533
49537
  claude
49534
49538
  )
49535
49539
  );
49536
- const client = new DaemonWsClient(opts.serverUrl, opts.nodeId, sessions, adapters, opts.token, runtimes, opts.nodeName, opts.reportRuntimes ?? false, true, opts.onUpdate);
49540
+ const client = new DaemonWsClient(opts.serverUrl, opts.nodeId, sessions, adapters, opts.token, runtimes, opts.nodeName, opts.reportRuntimes ?? false, true, opts.onUpdate, opts.daemonVersion);
49537
49541
  console.log(`[oasis node] ${opts.nodeId} \u2192 ${opts.serverUrl}`);
49538
49542
  client.start();
49539
49543
  await new Promise((resolve3) => {
@@ -50984,6 +50988,7 @@ async function runCli(argv, println = console.log) {
50984
50988
  }
50985
50989
 
50986
50990
  // src/index.ts
50991
+ var PKG_VERSION = true ? "0.1.21" : "dev";
50987
50992
  var OASIS_DIR = path13.join(os8.homedir(), ".oasis");
50988
50993
  var CONFIG_FILE = path13.join(OASIS_DIR, "node-config.json");
50989
50994
  var PID_FILE = path13.join(OASIS_DIR, "node.pid");
@@ -51195,6 +51200,7 @@ void (async () => {
51195
51200
  })(),
51196
51201
  nodeName: cfg.name ?? cfg.nodeId,
51197
51202
  reportRuntimes,
51203
+ daemonVersion: PKG_VERSION,
51198
51204
  onUpdate: () => {
51199
51205
  try {
51200
51206
  selfUpdate();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oasis_test",
3
- "version": "0.1.19",
3
+ "version": "0.1.21",
4
4
  "description": "Oasis node daemon + CLI — background daemon, auto-start, full server CLI",
5
5
  "bin": {
6
6
  "oasis": "./dist/index.js"