@oneharness/sdk 0.20.0 → 0.21.2

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.
@@ -0,0 +1,2 @@
1
+ /* Generated from oneharness-core. Do not edit. */
2
+ export {};
@@ -1446,8 +1446,10 @@ export interface ActionEvent {
1446
1446
  */
1447
1447
  kind: string;
1448
1448
  /**
1449
- * Normalized tool name where knowable (e.g. `bash`, `Edit`); `null` for a
1450
- * `tool_result`, or when the harness did not name the tool.
1449
+ * Normalized tool name where knowable (e.g. `bash`, `Edit`); `null` when
1450
+ * the harness did not name the tool. A `tool_result` carries the name of
1451
+ * the `tool_call` it answers (matched by `tool_call_id`) when that call
1452
+ * was seen earlier in the same run, else `null`.
1451
1453
  */
1452
1454
  name: string | null;
1453
1455
  /**
@@ -1459,7 +1461,12 @@ export interface ActionEvent {
1459
1461
  */
1460
1462
  started_at: string | null;
1461
1463
  /**
1462
- * Terminal tool state, populated on history tool-call events.
1464
+ * Terminal tool state, populated on history tool-call events. On a
1465
+ * `tool_result` it is the outcome the harness reported for the call:
1466
+ * `failed` when the result is marked an error (a Claude Code / Qwen
1467
+ * `is_error: true` block), else `completed`; `null` when the harness
1468
+ * reports no error state for its results, and in a history record with
1469
+ * no tool timing, which makes no tool-state claim on any event.
1463
1470
  */
1464
1471
  status: ToolCallStatus | null;
1465
1472
  /**
@@ -1,3 +1,22 @@
1
+ /**
2
+ * Which dates of the index a listing reads.
3
+ *
4
+ * It is also the one value an SDK history lookup, listing or watch takes as
5
+ * its `window`, so "from this date" and "from the beginning" cannot both be
6
+ * stated. On the wire it is externally tagged in camelCase —
7
+ * `{"recent": {"days": 3}}`, `{"since": "2026-01-05"}`, or `"allTime"` — and
8
+ * renders to the CLI's `--days`, `--since` or `--all-time`.
9
+ */
10
+ export type HistoryWindow = {
11
+ recent: {
12
+ /**
13
+ * How many UTC days, today included; at least one.
14
+ */
15
+ days: number;
16
+ };
17
+ } | {
18
+ since: string;
19
+ } | "allTime";
1
20
  /**
2
21
  * Options accepted by the language SDKs' continuous history iterators.
3
22
  *
@@ -32,6 +51,13 @@ export interface HistoryWatchOptions {
32
51
  * Narrow to one configured harness identity (`claude-code:work`).
33
52
  */
34
53
  variant?: string | undefined;
54
+ /**
55
+ * Where the watch starts when no `after` cursor is given: the beginning
56
+ * of the last `days` UTC days, of a UTC date, or of all time (the legacy
57
+ * index an older oneharness kept included). Omitted, the current UTC
58
+ * day. Refused beside `after`, the other answer to where a watch begins.
59
+ */
60
+ window?: HistoryWindow | null | undefined;
35
61
  }
36
62
  export interface HistoryLabels {
37
63
  [k: string]: string;
@@ -1396,8 +1396,10 @@ export interface ActionEvent {
1396
1396
  */
1397
1397
  kind: string;
1398
1398
  /**
1399
- * Normalized tool name where knowable (e.g. `bash`, `Edit`); `null` for a
1400
- * `tool_result`, or when the harness did not name the tool.
1399
+ * Normalized tool name where knowable (e.g. `bash`, `Edit`); `null` when
1400
+ * the harness did not name the tool. A `tool_result` carries the name of
1401
+ * the `tool_call` it answers (matched by `tool_call_id`) when that call
1402
+ * was seen earlier in the same run, else `null`.
1401
1403
  */
1402
1404
  name: string | null;
1403
1405
  /**
@@ -1409,7 +1411,12 @@ export interface ActionEvent {
1409
1411
  */
1410
1412
  started_at: string | null;
1411
1413
  /**
1412
- * Terminal tool state, populated on history tool-call events.
1414
+ * Terminal tool state, populated on history tool-call events. On a
1415
+ * `tool_result` it is the outcome the harness reported for the call:
1416
+ * `failed` when the result is marked an error (a Claude Code / Qwen
1417
+ * `is_error: true` block), else `completed`; `null` when the harness
1418
+ * reports no error state for its results, and in a history record with
1419
+ * no tool timing, which makes no tool-state claim on any event.
1413
1420
  */
1414
1421
  status: ToolCallStatus | null;
1415
1422
  /**
@@ -193,8 +193,10 @@ export interface ActionEvent {
193
193
  */
194
194
  kind: string;
195
195
  /**
196
- * Normalized tool name where knowable (e.g. `bash`, `Edit`); `null` for a
197
- * `tool_result`, or when the harness did not name the tool.
196
+ * Normalized tool name where knowable (e.g. `bash`, `Edit`); `null` when
197
+ * the harness did not name the tool. A `tool_result` carries the name of
198
+ * the `tool_call` it answers (matched by `tool_call_id`) when that call
199
+ * was seen earlier in the same run, else `null`.
198
200
  */
199
201
  name: string | null;
200
202
  /**
@@ -206,7 +208,12 @@ export interface ActionEvent {
206
208
  */
207
209
  started_at: string | null;
208
210
  /**
209
- * Terminal tool state, populated on history tool-call events.
211
+ * Terminal tool state, populated on history tool-call events. On a
212
+ * `tool_result` it is the outcome the harness reported for the call:
213
+ * `failed` when the result is marked an error (a Claude Code / Qwen
214
+ * `is_error: true` block), else `completed`; `null` when the harness
215
+ * reports no error state for its results, and in a history record with
216
+ * no tool timing, which makes no tool-state claim on any event.
210
217
  */
211
218
  status: ToolCallStatus | null;
212
219
  /**