@ours.network/fleet 0.18.0-nightly.4 → 0.18.0-nightly.5

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.
@@ -1,9 +1,9 @@
1
1
  {
2
- "version": "0.18.0-nightly.4",
3
- "buildId": "35a3c2d21eb9",
4
- "commit": "1b5b2fa89f60b64b80877d23d45211fb970e4242",
2
+ "version": "0.18.0-nightly.5",
3
+ "buildId": "477f5cfc014b",
4
+ "commit": "d6e488fc1b991b1409134502ec0b59ba809d4cf6",
5
5
  "dirty": true,
6
- "builtAt": "2026-08-21T08:23:47.864Z",
6
+ "builtAt": "2026-08-21T12:28:55.193Z",
7
7
  "capabilities": [
8
8
  "monitor.interrupt.after_tool"
9
9
  ]
package/dist/doctor.d.ts CHANGED
@@ -1,7 +1,10 @@
1
+ import { type AttachOursClientOptions, type OursClient } from '@ours.network/sdk/client';
1
2
  import { type Exec } from './exec.js';
2
3
  import type { YamlMode } from './config-yaml.js';
3
4
  import { type FetchLike } from './monitor.js';
4
5
  import type { PrereqReport } from './harness/types.js';
6
+ type DoctorDaemonClient = Pick<OursClient, 'version'>;
7
+ type AttachDoctorDaemon = (options: AttachOursClientOptions) => Promise<DoctorDaemonClient>;
5
8
  /** Host-level + per-harness prerequisite report with actionable messages. */
6
9
  export declare function doctor(opts?: {
7
10
  harness?: string;
@@ -12,4 +15,5 @@ export declare function doctor(opts?: {
12
15
  path?: string;
13
16
  argv1?: string;
14
17
  };
15
- }, exec?: Exec, platform?: NodeJS.Platform, fetchImpl?: FetchLike): Promise<PrereqReport>;
18
+ }, exec?: Exec, platform?: NodeJS.Platform, fetchImpl?: FetchLike, attachDaemon?: AttachDoctorDaemon): Promise<PrereqReport>;
19
+ export {};
package/dist/doctor.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { userInfo } from 'node:os';
2
2
  import { existsSync, readFileSync } from 'node:fs';
3
+ import { attachOursClient, } from '@ours.network/sdk/client';
3
4
  import { realExec } from './exec.js';
4
5
  import { isolationContextFor, loadConfig } from './config.js';
5
6
  import { getAdapter, productionAdapters } from './harness/registry.js';
@@ -76,7 +77,7 @@ function installChecks(scan) {
76
77
  ];
77
78
  }
78
79
  /** Host-level + per-harness prerequisite report with actionable messages. */
79
- export async function doctor(opts = {}, exec = realExec, platform = process.platform, fetchImpl = (u, i) => globalThis.fetch(u, i)) {
80
+ export async function doctor(opts = {}, exec = realExec, platform = process.platform, fetchImpl = (u, i) => globalThis.fetch(u, i), attachDaemon = attachOursClient) {
80
81
  const checks = [];
81
82
  // First: which artifact is producing this report. Everything below is only as
82
83
  // trustworthy as the answer, and a second install with the same semver and
@@ -112,39 +113,22 @@ export async function doctor(opts = {}, exec = realExec, platform = process.plat
112
113
  detail: tmux.code === 0 ? tmux.stdout.trim() : 'not found — apt install tmux / brew install tmux',
113
114
  });
114
115
  }
115
- const ours = await exec('ours', ['version', '--json']);
116
- let oursVersion;
117
- if (ours.code === 0) {
118
- try {
119
- const value = JSON.parse(ours.stdout);
120
- if (value.name === '@ours.network/cli' && typeof value.version === 'string')
121
- oursVersion = value.version;
122
- }
123
- catch { /* malformed structured output is a failed prerequisite below */ }
116
+ try {
117
+ const client = await attachDaemon({
118
+ env: process.env,
119
+ leaseToken: `ours-fleet-doctor-${process.pid}`,
120
+ clientPid: process.pid,
121
+ });
122
+ const info = await client.version();
123
+ if (info.name !== 'ours' || typeof info.version !== 'string')
124
+ throw new Error('the selected endpoint did not return a valid ours daemon identity');
125
+ checks.push({ name: 'ours daemon', ok: true, detail: `running (${info.version})` });
124
126
  }
125
- checks.push({
126
- name: 'ours CLI', ok: oursVersion !== undefined,
127
- detail: oursVersion
128
- ? `@ours.network/cli ${oursVersion}`
129
- : 'not found or invalid structured output — npm i -g @ours.network/cli',
130
- });
131
- if (oursVersion !== undefined) {
132
- const st = await exec('ours', ['daemon', 'status', '--json']);
133
- let state;
134
- try {
135
- const value = JSON.parse(st.stdout);
136
- if (typeof value.state === 'string')
137
- state = value.state;
138
- }
139
- catch { /* malformed structured output fails closed */ }
140
- const running = st.code === 0 && state === 'running';
127
+ catch (error) {
141
128
  checks.push({
142
- name: 'ours daemon', ok: running,
143
- detail: running
144
- ? 'running'
145
- : state === 'stopped' || st.code === 3
146
- ? 'not running — start it with: ours daemon start'
147
- : 'status check returned invalid structured output — run: ours daemon status --json',
129
+ name: 'ours daemon', ok: false,
130
+ detail: `not reachable through the SDK — start it with: ours daemon start `
131
+ + `[${error?.message ?? String(error)}]`,
148
132
  });
149
133
  }
150
134
  if (platform === 'linux') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ours.network/fleet",
3
- "version": "0.18.0-nightly.4",
3
+ "version": "0.18.0-nightly.5",
4
4
  "description": "Harness-agnostic fleet of persistent, identity-bound AI agents. Declarative fleet.yaml, tmux or ACP sessions, supervision, and ours.network messaging.",
5
5
  "type": "module",
6
6
  "license": "FSL-1.1-Apache-2.0",