@oneharness/sdk 0.14.0 → 0.15.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/README.md CHANGED
@@ -29,6 +29,8 @@ for await (const envelope of oneharness.historyWatch({
29
29
  }
30
30
  ```
31
31
 
32
+ Every JSON-returning method passes `--format json --compact` itself, so the CLI's own default (a human-readable text view) never reaches the SDK. A `run` over several harnesses is a **fallback chain** by default — the first candidate that can run does, and the report's `fallback` block says which; pass `runMode: "parallel"` to run them all at once.
33
+
32
34
  Breaking or returning from either iterator terminates its oneharness subprocess. Every line is validated before it is yielded; malformed or unknown envelope variants fail the iterator. Additive fields within known output envelopes are accepted and preserved.
33
35
 
34
36
  `null` usage fields mean the harness did not report the value; zero remains a real measured zero. String-valued harness/model/event identifiers should be treated as open sets for forward compatibility. `history` and `historyWatch` raise the exported `HistoryNotFoundError` when a session, record, or watch cursor cannot be resolved.
@@ -244,8 +244,9 @@ export interface Field31 {
244
244
  [k: string]: unknown;
245
245
  }
246
246
  /**
247
- * The configured run mode, if any. Unset falls back to `parallel` (the
248
- * built-in default) at run time.
247
+ * The effective run mode: a configured value, else `fallback` (the
248
+ * built-in default, attributed to [`DEFAULT_SOURCE`]) — the report says what
249
+ * a run would do, so an unset mode is never shown as `null`.
249
250
  */
250
251
  export interface Field9 {
251
252
  source: string | null;
@@ -4016,12 +4016,12 @@
4016
4016
  "description": "How the selected harnesses are run. Accepted as a CLI value (`--run-mode`,\nparsed in the `oneharness` binary) and a config-file value (`run_mode`, via\n`Deserialize`); the CLI parsing lives in the binary so this core crate stays\nfree of `clap`.",
4017
4017
  "oneOf": [
4018
4018
  {
4019
- "description": "Run every selected harness at once, each an independent subprocess, and\nreport them all. The default — the historical behavior.",
4019
+ "description": "Run every selected harness at once, each an independent subprocess, and\nreport them all. The opt-in (`--run-mode parallel`, `run_mode =\n\"parallel\"`, `ONEHARNESS_RUN_MODE=parallel`); it was the default before\nthe fallback chain became one.",
4020
4020
  "type": "string",
4021
4021
  "const": "parallel"
4022
4022
  },
4023
4023
  {
4024
- "description": "Run the selected harnesses in priority order (the `--harness` / config\norder, else registry order under `--all`), stopping at the first that\nactually runs the task; fall through only the candidates that cannot run\nat all (see [`startup_failure_reason`]).",
4024
+ "description": "Run the selected harnesses in priority order (the `--harness` / config\norder, else registry order under `--all`), stopping at the first that\nactually runs the task; fall through only the candidates that cannot run\nat all (see [`startup_failure_reason`]). The default wherever a run mode\nis left unset — in the request, every config layer and the environment.",
4025
4025
  "type": "string",
4026
4026
  "const": "fallback"
4027
4027
  }
@@ -15986,7 +15986,7 @@
15986
15986
  "$ref": "#/$defs/Field"
15987
15987
  },
15988
15988
  "run_mode": {
15989
- "description": "The configured run mode, if any. Unset falls back to `parallel` (the\nbuilt-in default) at run time.",
15989
+ "description": "The effective run mode: a configured value, else `fallback` (the\nbuilt-in default, attributed to [`DEFAULT_SOURCE`]) — the report says what\na run would do, so an unset mode is never shown as `null`.",
15990
15990
  "$ref": "#/$defs/Field9"
15991
15991
  },
15992
15992
  "schema_file": {
@@ -16453,12 +16453,12 @@
16453
16453
  "description": "How the selected harnesses are run. Accepted as a CLI value (`--run-mode`,\nparsed in the `oneharness` binary) and a config-file value (`run_mode`, via\n`Deserialize`); the CLI parsing lives in the binary so this core crate stays\nfree of `clap`.",
16454
16454
  "oneOf": [
16455
16455
  {
16456
- "description": "Run every selected harness at once, each an independent subprocess, and\nreport them all. The default — the historical behavior.",
16456
+ "description": "Run every selected harness at once, each an independent subprocess, and\nreport them all. The opt-in (`--run-mode parallel`, `run_mode =\n\"parallel\"`, `ONEHARNESS_RUN_MODE=parallel`); it was the default before\nthe fallback chain became one.",
16457
16457
  "type": "string",
16458
16458
  "const": "parallel"
16459
16459
  },
16460
16460
  {
16461
- "description": "Run the selected harnesses in priority order (the `--harness` / config\norder, else registry order under `--all`), stopping at the first that\nactually runs the task; fall through only the candidates that cannot run\nat all (see [`startup_failure_reason`]).",
16461
+ "description": "Run the selected harnesses in priority order (the `--harness` / config\norder, else registry order under `--all`), stopping at the first that\nactually runs the task; fall through only the candidates that cannot run\nat all (see [`startup_failure_reason`]). The default wherever a run mode\nis left unset — in the request, every config layer and the environment.",
16462
16462
  "type": "string",
16463
16463
  "const": "fallback"
16464
16464
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oneharness/sdk",
3
- "version": "0.14.0",
3
+ "version": "0.15.0",
4
4
  "description": "Typed Node.js SDK for oneharness",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -19,7 +19,7 @@
19
19
  "node": ">=20"
20
20
  },
21
21
  "dependencies": {
22
- "oneharness-cli": "0.14.0",
22
+ "oneharness-cli": "0.15.0",
23
23
  "zod": "^4.4.3"
24
24
  }
25
25
  }