@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.
- package/README.md +2 -2
- package/dist/generated/capabilities.d.ts +71 -4
- package/dist/generated/capabilities.js +69 -3
- package/dist/generated/contracts.d.ts +10 -3
- package/dist/generated/history-line.d.ts +10 -3
- package/dist/generated/history-list-options.d.ts +25 -0
- package/dist/generated/history-lookup.d.ts +31 -0
- package/dist/generated/history-reindex-options.d.ts +16 -0
- package/dist/generated/history-reindex-report.d.ts +54 -0
- package/dist/generated/history-reindex-report.js +2 -0
- package/dist/generated/{history-records.d.ts → history-show-entries.d.ts} +99 -64
- package/dist/generated/history-show-entries.js +2 -0
- package/dist/generated/history-stream-envelope.d.ts +10 -3
- package/dist/generated/history-watch-options.d.ts +26 -0
- package/dist/generated/history.d.ts +10 -3
- package/dist/generated/run-stream-envelope.d.ts +10 -3
- package/dist/generated/schemas.json +453 -19
- package/dist/generated/zod.d.ts +14 -3
- package/dist/generated/zod.js +78 -1
- package/dist/index.d.ts +44 -3
- package/dist/index.js +57 -2
- package/package.json +2 -2
- /package/dist/generated/{history-records.js → history-reindex-options.js} +0 -0
|
@@ -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`
|
|
1450
|
-
*
|
|
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`
|
|
1400
|
-
*
|
|
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`
|
|
197
|
-
*
|
|
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
|
/**
|