@oneharness/sdk 0.6.14 → 0.6.15

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 (47) hide show
  1. package/README.md +1 -1
  2. package/dist/generated/capabilities.d.ts +1010 -0
  3. package/dist/generated/capabilities.js +1162 -0
  4. package/dist/generated/config-options.d.ts +8 -0
  5. package/dist/generated/config-options.js +2 -0
  6. package/dist/generated/config-report.d.ts +283 -0
  7. package/dist/generated/config-report.js +2 -0
  8. package/dist/generated/detect-options.d.ts +19 -0
  9. package/dist/generated/detect-options.js +2 -0
  10. package/dist/generated/detection.d.ts +6 -0
  11. package/dist/generated/gate-options.d.ts +17 -0
  12. package/dist/generated/gate-options.js +2 -0
  13. package/dist/generated/history-clear-options.d.ts +15 -0
  14. package/dist/generated/history-clear-options.js +2 -0
  15. package/dist/generated/history-clear-report.d.ts +39 -0
  16. package/dist/generated/history-clear-report.js +2 -0
  17. package/dist/generated/history-list-options.d.ts +13 -0
  18. package/dist/generated/history-lookup.d.ts +26 -0
  19. package/dist/generated/history-migrate-options.d.ts +8 -0
  20. package/dist/generated/history-migrate-options.js +2 -0
  21. package/dist/generated/history-migrate-report.d.ts +31 -0
  22. package/dist/generated/history-migrate-report.js +2 -0
  23. package/dist/generated/history-watch-options.d.ts +13 -0
  24. package/dist/generated/init-options.d.ts +11 -0
  25. package/dist/generated/init-options.js +2 -0
  26. package/dist/generated/interrupt-options.d.ts +12 -0
  27. package/dist/generated/interrupt-options.js +2 -0
  28. package/dist/generated/interrupt-response.d.ts +40 -0
  29. package/dist/generated/interrupt-response.js +2 -0
  30. package/dist/generated/mock-options.d.ts +12 -0
  31. package/dist/generated/mock-options.js +2 -0
  32. package/dist/generated/options.d.ts +108 -0
  33. package/dist/generated/registry.d.ts +14 -4
  34. package/dist/generated/schemas.json +3245 -15
  35. package/dist/generated/sync-options.d.ts +14 -0
  36. package/dist/generated/sync-options.js +2 -0
  37. package/dist/generated/sync-report.d.ts +64 -0
  38. package/dist/generated/sync-report.js +2 -0
  39. package/dist/generated/usage-options.d.ts +15 -0
  40. package/dist/generated/usage-options.js +2 -0
  41. package/dist/generated/usage-report.d.ts +241 -0
  42. package/dist/generated/usage-report.js +2 -0
  43. package/dist/generated/zod.d.ts +70 -2
  44. package/dist/generated/zod.js +444 -0
  45. package/dist/index.d.ts +91 -1
  46. package/dist/index.js +271 -102
  47. package/package.json +2 -2
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Options accepted by the language SDKs' `config()`.
3
+ */
4
+ export interface ConfigOptions {
5
+ config?: string | undefined;
6
+ cwd?: string | undefined;
7
+ noConfig?: boolean | undefined;
8
+ }
@@ -0,0 +1,2 @@
1
+ /* Generated from oneharness-core. Do not edit. */
2
+ export {};
@@ -0,0 +1,283 @@
1
+ /**
2
+ * The unified approval mode, from least to most autonomy. A harness may not
3
+ * support every value (see [`crate::domain::harness::HarnessSpec::mode`]); the
4
+ * command layer refuses an unsupported one before spawning, never silently
5
+ * downgrading it.
6
+ */
7
+ export type PermissionMode = "read-only" | "plan" | "default" | "edit" | "auto" | "bypass";
8
+ /**
9
+ * How a harness emits its result, which decides how `text` is extracted.
10
+ *
11
+ * Also accepted as a CLI value (`--output-format`, parsed in the `oneharness`
12
+ * binary) and a config-file value (`output_format`, via `Deserialize`). The
13
+ * CLI parsing lives in the binary so this core crate stays free of `clap`.
14
+ */
15
+ export type OutputFormat = "text" | "json" | "stream-json";
16
+ /**
17
+ * How the selected harnesses are run. Accepted as a CLI value (`--run-mode`,
18
+ * parsed in the `oneharness` binary) and a config-file value (`run_mode`, via
19
+ * `Deserialize`); the CLI parsing lives in the binary so this core crate stays
20
+ * free of `clap`.
21
+ */
22
+ export type RunMode = "parallel" | "fallback";
23
+ /**
24
+ * The `oneharness config` report: the fully layered configuration with the
25
+ * provenance of every value, so a consumer can see exactly which file (or
26
+ * default) shaped each setting of a run.
27
+ */
28
+ export interface ConfigReport {
29
+ all: Field;
30
+ allowed_tools: Field2;
31
+ bypass: Field;
32
+ /**
33
+ * The files consulted, in layering order (user first, project last).
34
+ */
35
+ config_files: string[];
36
+ denied_tools: Field2;
37
+ /**
38
+ * Per-key provenance for the top-level `[env]`.
39
+ */
40
+ env: {
41
+ [k: string]: Field3;
42
+ };
43
+ exclude: Field2;
44
+ /**
45
+ * Per-harness overrides, with per-field provenance.
46
+ */
47
+ harness: {
48
+ [k: string]: HarnessReport;
49
+ };
50
+ harnesses: Field2;
51
+ history: Field;
52
+ history_dir: Field3;
53
+ /**
54
+ * Per-key provenance for history labels.
55
+ */
56
+ history_labels: {
57
+ [k: string]: Field3;
58
+ };
59
+ hooks: Field10;
60
+ max_parallel: Field8;
61
+ mode: Field4;
62
+ model: Field3;
63
+ models: Field21;
64
+ output_format: Field6;
65
+ reasoning: Field31;
66
+ require_available: Field;
67
+ run_mode: Field9;
68
+ schema_file: Field3;
69
+ schema_max_retries: Field7;
70
+ schema_version: string;
71
+ stream: Field1;
72
+ system: Field3;
73
+ timeout: Field5;
74
+ [k: string]: unknown;
75
+ }
76
+ /**
77
+ * One resolved field in the `oneharness config` report: the effective value
78
+ * plus where it came from (a config file path, or [`DEFAULT_SOURCE`]). Both
79
+ * are `null` when the field is unset everywhere and has no built-in default.
80
+ */
81
+ export interface Field {
82
+ source: string | null;
83
+ value: boolean | null;
84
+ [k: string]: unknown;
85
+ }
86
+ /**
87
+ * One resolved field in the `oneharness config` report: the effective value
88
+ * plus where it came from (a config file path, or [`DEFAULT_SOURCE`]). Both
89
+ * are `null` when the field is unset everywhere and has no built-in default.
90
+ */
91
+ export interface Field2 {
92
+ source: string | null;
93
+ value: string[] | null;
94
+ [k: string]: unknown;
95
+ }
96
+ /**
97
+ * One resolved field in the `oneharness config` report: the effective value
98
+ * plus where it came from (a config file path, or [`DEFAULT_SOURCE`]). Both
99
+ * are `null` when the field is unset everywhere and has no built-in default.
100
+ */
101
+ export interface Field3 {
102
+ source: string | null;
103
+ value: string | null;
104
+ [k: string]: unknown;
105
+ }
106
+ /**
107
+ * One harness's `[harness.<id>]` overrides, with provenance.
108
+ */
109
+ export interface HarnessReport {
110
+ allowed_tools: Field2;
111
+ args: Field2;
112
+ bin: Field3;
113
+ denied_tools: Field2;
114
+ env: {
115
+ [k: string]: Field3;
116
+ };
117
+ hooks: {
118
+ [k: string]: unknown;
119
+ };
120
+ model: Field3;
121
+ reasoning: Field3;
122
+ settings: {
123
+ [k: string]: unknown;
124
+ };
125
+ variant: {
126
+ [k: string]: VariantReport;
127
+ };
128
+ [k: string]: unknown;
129
+ }
130
+ export interface VariantReport {
131
+ allowed_tools: Field2;
132
+ args: Field2;
133
+ bin: Field3;
134
+ denied_tools: Field2;
135
+ env: {
136
+ [k: string]: Field3;
137
+ };
138
+ env_file: Field3;
139
+ env_from: {
140
+ [k: string]: Field3;
141
+ };
142
+ hooks: {
143
+ [k: string]: unknown;
144
+ };
145
+ model: Field3;
146
+ reasoning: Field3;
147
+ settings: {
148
+ [k: string]: unknown;
149
+ };
150
+ unset_env: Field2;
151
+ [k: string]: unknown;
152
+ }
153
+ /**
154
+ * One resolved field in the `oneharness config` report: the effective value
155
+ * plus where it came from (a config file path, or [`DEFAULT_SOURCE`]). Both
156
+ * are `null` when the field is unset everywhere and has no built-in default.
157
+ */
158
+ export interface Field10 {
159
+ source: string | null;
160
+ value: HookEntry[] | null;
161
+ [k: string]: unknown;
162
+ }
163
+ /**
164
+ * One `[[hooks]]` entry: a pre-tool gate installed into each targeted harness.
165
+ * The `command` may contain `{harness}`, replaced with the harness id when the
166
+ * hook is built (so one entry can route `mygate hook {harness}` to every CLI).
167
+ */
168
+ export interface HookEntry {
169
+ /**
170
+ * The command the harness runs before a tool call. `{harness}` is
171
+ * substituted with the harness id. Required and non-empty.
172
+ */
173
+ command: string;
174
+ /**
175
+ * Restrict this entry to these harness ids; absent means every harness
176
+ * being synced.
177
+ */
178
+ harnesses: string[] | null;
179
+ /**
180
+ * Tool-name matcher in the harness's dialect (most read it as a regex);
181
+ * applied to every targeted harness as written. Absent means match-all.
182
+ */
183
+ matcher: string | null;
184
+ /**
185
+ * Identity for plugin-delivered harnesses (Goose, OpenCode) and Copilot's
186
+ * per-owner file, so two tools' hooks never collide. Defaults to
187
+ * `oneharness`.
188
+ */
189
+ plugin_name: string | null;
190
+ /**
191
+ * Timeout in seconds, for the harnesses whose hook schema carries one
192
+ * (Goose, Crush); ignored by the others.
193
+ */
194
+ timeout: number | null;
195
+ }
196
+ /**
197
+ * One resolved field in the `oneharness config` report: the effective value
198
+ * plus where it came from (a config file path, or [`DEFAULT_SOURCE`]). Both
199
+ * are `null` when the field is unset everywhere and has no built-in default.
200
+ */
201
+ export interface Field8 {
202
+ source: string | null;
203
+ value: number | null;
204
+ [k: string]: unknown;
205
+ }
206
+ /**
207
+ * The configured `mode`, if any. Unset when only the legacy `bypass` field
208
+ * (or neither) is set — the effective mode then derives from `bypass`.
209
+ */
210
+ export interface Field4 {
211
+ source: string | null;
212
+ value: PermissionMode | null;
213
+ [k: string]: unknown;
214
+ }
215
+ /**
216
+ * One resolved field in the `oneharness config` report: the effective value
217
+ * plus where it came from (a config file path, or [`DEFAULT_SOURCE`]). Both
218
+ * are `null` when the field is unset everywhere and has no built-in default.
219
+ */
220
+ export interface Field21 {
221
+ source: string | null;
222
+ value: string[] | null;
223
+ [k: string]: unknown;
224
+ }
225
+ /**
226
+ * One resolved field in the `oneharness config` report: the effective value
227
+ * plus where it came from (a config file path, or [`DEFAULT_SOURCE`]). Both
228
+ * are `null` when the field is unset everywhere and has no built-in default.
229
+ */
230
+ export interface Field6 {
231
+ source: string | null;
232
+ value: OutputFormat | null;
233
+ [k: string]: unknown;
234
+ }
235
+ /**
236
+ * One resolved field in the `oneharness config` report: the effective value
237
+ * plus where it came from (a config file path, or [`DEFAULT_SOURCE`]). Both
238
+ * are `null` when the field is unset everywhere and has no built-in default.
239
+ */
240
+ export interface Field31 {
241
+ source: string | null;
242
+ value: string | null;
243
+ [k: string]: unknown;
244
+ }
245
+ /**
246
+ * The configured run mode, if any. Unset falls back to `parallel` (the
247
+ * built-in default) at run time.
248
+ */
249
+ export interface Field9 {
250
+ source: string | null;
251
+ value: RunMode | null;
252
+ [k: string]: unknown;
253
+ }
254
+ /**
255
+ * One resolved field in the `oneharness config` report: the effective value
256
+ * plus where it came from (a config file path, or [`DEFAULT_SOURCE`]). Both
257
+ * are `null` when the field is unset everywhere and has no built-in default.
258
+ */
259
+ export interface Field7 {
260
+ source: string | null;
261
+ value: number | null;
262
+ [k: string]: unknown;
263
+ }
264
+ /**
265
+ * One resolved field in the `oneharness config` report: the effective value
266
+ * plus where it came from (a config file path, or [`DEFAULT_SOURCE`]). Both
267
+ * are `null` when the field is unset everywhere and has no built-in default.
268
+ */
269
+ export interface Field1 {
270
+ source: string | null;
271
+ value: boolean | null;
272
+ [k: string]: unknown;
273
+ }
274
+ /**
275
+ * One resolved field in the `oneharness config` report: the effective value
276
+ * plus where it came from (a config file path, or [`DEFAULT_SOURCE`]). Both
277
+ * are `null` when the field is unset everywhere and has no built-in default.
278
+ */
279
+ export interface Field5 {
280
+ source: string | null;
281
+ value: number | null;
282
+ [k: string]: unknown;
283
+ }
@@ -0,0 +1,2 @@
1
+ /* Generated from oneharness-core. Do not edit. */
2
+ export {};
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Options accepted by the language SDKs' `detect()`.
3
+ */
4
+ export interface DetectOptions {
5
+ all?: boolean | undefined;
6
+ bins?: {
7
+ [k: string]: string;
8
+ } | undefined;
9
+ config?: string | undefined;
10
+ exclude?: string[] | undefined;
11
+ harnesses?: string[] | undefined;
12
+ noConfig?: boolean | undefined;
13
+ /**
14
+ * Exit non-zero if any probed harness is not installed. The SDKs surface
15
+ * that as a thrown process error rather than a report a caller must
16
+ * re-check.
17
+ */
18
+ requireAvailable?: boolean | undefined;
19
+ }
@@ -0,0 +1,2 @@
1
+ /* Generated from oneharness-core. Do not edit. */
2
+ export {};
@@ -1,8 +1,14 @@
1
+ /**
2
+ * The `oneharness detect` output contract.
3
+ */
1
4
  export interface DetectReport {
2
5
  detected: DetectInfo[];
3
6
  schema_version: string;
4
7
  [k: string]: unknown;
5
8
  }
9
+ /**
10
+ * One probed harness identity.
11
+ */
6
12
  export interface DetectInfo {
7
13
  available: boolean;
8
14
  bin: string;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Options accepted by the language SDKs' `gate()` — the pre-tool gate an
3
+ * installed hook invokes, driven directly so a consumer hosting its own hook
4
+ * runner never has to shell out and parse.
5
+ */
6
+ export interface GateOptions {
7
+ denyIfContains?: string | undefined;
8
+ /**
9
+ * The harness's pre-tool hook event, written to the gate's stdin.
10
+ */
11
+ event: string;
12
+ /**
13
+ * The harness whose hook protocol to speak.
14
+ */
15
+ harness: string;
16
+ reason?: string | undefined;
17
+ }
@@ -0,0 +1,2 @@
1
+ /* Generated from oneharness-core. Do not edit. */
2
+ export {};
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Options accepted by the language SDKs' `historyClear()`.
3
+ */
4
+ export interface HistoryClearOptions {
5
+ allProjects?: boolean | undefined;
6
+ config?: string | undefined;
7
+ historyDir?: string | undefined;
8
+ noConfig?: boolean | undefined;
9
+ project?: string | undefined;
10
+ /**
11
+ * Actually delete. Absent or false reports what would be removed and
12
+ * removes nothing, so a caller can always look first.
13
+ */
14
+ yes?: boolean | undefined;
15
+ }
@@ -0,0 +1,2 @@
1
+ /* Generated from oneharness-core. Do not edit. */
2
+ export {};
@@ -0,0 +1,39 @@
1
+ /**
2
+ * The `oneharness history clear` output contract.
3
+ *
4
+ * `clear` is a dry run until `--yes`, and the two phases have always printed
5
+ * *different* documents: a real run reports `removed`, a dry run reports
6
+ * `would_remove` plus the hint that makes it real. That difference is the
7
+ * contract, so this is a sum of the two frames rather than one struct with
8
+ * both counts optional — which would let a consumer read a deletion count off
9
+ * a run that deleted nothing. Untagged, because `dry_run` is the discriminant
10
+ * the published shape already carries.
11
+ */
12
+ export type HistoryClearReport = HistoryClearRemoved | HistoryClearDryRun;
13
+ /**
14
+ * The frame a `--yes` run prints: these files are gone.
15
+ */
16
+ export interface HistoryClearRemoved {
17
+ /**
18
+ * Always `false` — the field is what tells the two frames apart, so it is
19
+ * a literal rather than a flag either constructor could get wrong.
20
+ */
21
+ dry_run: false;
22
+ files: string[];
23
+ removed: number;
24
+ [k: string]: unknown;
25
+ }
26
+ /**
27
+ * The frame a run without `--yes` prints: these files *would* go.
28
+ */
29
+ export interface HistoryClearDryRun {
30
+ dry_run: true;
31
+ files: string[];
32
+ /**
33
+ * How to make the dry run real. Constant text, carried in the document so
34
+ * a JSON consumer gets the same guidance the text view prints.
35
+ */
36
+ hint: string;
37
+ would_remove: number;
38
+ [k: string]: unknown;
39
+ }
@@ -0,0 +1,2 @@
1
+ /* Generated from oneharness-core. Do not edit. */
2
+ export {};
@@ -3,6 +3,19 @@
3
3
  */
4
4
  export interface HistoryListOptions {
5
5
  allProjects?: boolean | undefined;
6
+ /**
7
+ * Load configuration from exactly this file, skipping user/project
8
+ * discovery.
9
+ */
10
+ config?: string | undefined;
6
11
  historyDir?: string | undefined;
12
+ /**
13
+ * Ignore every configuration file.
14
+ */
15
+ noConfig?: boolean | undefined;
7
16
  project?: string | undefined;
17
+ /**
18
+ * Narrow to one configured harness identity (`claude-code:work`).
19
+ */
20
+ variant?: string | undefined;
8
21
  }
@@ -28,13 +28,26 @@ export type HistoryLookup = HistoryLookupByLast | HistoryLookupBySession;
28
28
  * Select the most recent session.
29
29
  */
30
30
  export interface HistoryLookupByLast {
31
+ /**
32
+ * Show every record in the session rather than the run summaries.
33
+ */
34
+ all?: boolean | undefined;
31
35
  allProjects?: boolean | undefined;
36
+ /**
37
+ * Load configuration from exactly this file, skipping user/project
38
+ * discovery.
39
+ */
40
+ config?: string | undefined;
32
41
  historyDir?: string | undefined;
33
42
  /**
34
43
  * Select the most recent session. Only `true` selects, so this variant
35
44
  * accepts no other value.
36
45
  */
37
46
  last: true;
47
+ /**
48
+ * Ignore every configuration file.
49
+ */
50
+ noConfig?: boolean | undefined;
38
51
  project?: string | undefined;
39
52
  /**
40
53
  * A name may accompany `last: true` — it is what the caller would have
@@ -48,7 +61,16 @@ export interface HistoryLookupByLast {
48
61
  * Select the session named by `session`.
49
62
  */
50
63
  export interface HistoryLookupBySession {
64
+ /**
65
+ * Show every record in the session rather than the run summaries.
66
+ */
67
+ all?: boolean | undefined;
51
68
  allProjects?: boolean | undefined;
69
+ /**
70
+ * Load configuration from exactly this file, skipping user/project
71
+ * discovery.
72
+ */
73
+ config?: string | undefined;
52
74
  historyDir?: string | undefined;
53
75
  /**
54
76
  * Whether the most recent session was asked for instead. An ordinary
@@ -57,6 +79,10 @@ export interface HistoryLookupBySession {
57
79
  * first — so a lookup that reaches this variant always meant the name.
58
80
  */
59
81
  last?: boolean | undefined;
82
+ /**
83
+ * Ignore every configuration file.
84
+ */
85
+ noConfig?: boolean | undefined;
60
86
  project?: string | undefined;
61
87
  /**
62
88
  * The oneharness-derived session name recorded by `run --history`. This is
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Options accepted by the language SDKs' `historyMigrate()`.
3
+ */
4
+ export interface HistoryMigrateOptions {
5
+ config?: string | undefined;
6
+ historyDir?: string | undefined;
7
+ noConfig?: boolean | undefined;
8
+ }
@@ -0,0 +1,2 @@
1
+ /* Generated from oneharness-core. Do not edit. */
2
+ export {};
@@ -0,0 +1,31 @@
1
+ /**
2
+ * The `oneharness history migrate` output contract.
3
+ *
4
+ * A type rather than the inline `json!` literal it replaced, because an SDK
5
+ * cannot validate a document that has no schema — which is what left this
6
+ * capability's `output` unbacked in the capability manifest.
7
+ */
8
+ export interface HistoryMigrateReport {
9
+ /**
10
+ * One entry per session file the migration touched.
11
+ */
12
+ files: MigrationSummary[];
13
+ /**
14
+ * `files.len()`, carried so a consumer reading only the summary does not
15
+ * have to walk the array.
16
+ */
17
+ files_processed: number;
18
+ [k: string]: unknown;
19
+ }
20
+ /**
21
+ * Outcome for one session file processed by [`migrate`]. Counts refer to
22
+ * whole legacy records and current v1.0 lines; unreadable lines are preserved
23
+ * byte-for-byte and reported as skipped.
24
+ */
25
+ export interface MigrationSummary {
26
+ already_current: number;
27
+ path: string;
28
+ records_migrated: number;
29
+ skipped: number;
30
+ [k: string]: unknown;
31
+ }
@@ -0,0 +1,2 @@
1
+ /* Generated from oneharness-core. Do not edit. */
2
+ export {};
@@ -8,10 +8,23 @@
8
8
  export interface HistoryWatchOptions {
9
9
  after?: string | undefined;
10
10
  allProjects?: boolean | undefined;
11
+ /**
12
+ * Load configuration from exactly this file, skipping user/project
13
+ * discovery.
14
+ */
15
+ config?: string | undefined;
11
16
  events?: boolean | undefined;
12
17
  historyDir?: string | undefined;
13
18
  labels?: HistoryLabels | undefined;
19
+ /**
20
+ * Ignore every configuration file.
21
+ */
22
+ noConfig?: boolean | undefined;
14
23
  project?: string | undefined;
24
+ /**
25
+ * Narrow to one configured harness identity (`claude-code:work`).
26
+ */
27
+ variant?: string | undefined;
15
28
  }
16
29
  export interface HistoryLabels {
17
30
  [k: string]: string;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Options accepted by the language SDKs' `init()`.
3
+ */
4
+ export interface InitOptions {
5
+ force?: boolean | undefined;
6
+ /**
7
+ * Where to write the starter config. Absent means `oneharness.toml` in the
8
+ * working directory, exactly as the CLI's own default.
9
+ */
10
+ path?: string | undefined;
11
+ }
@@ -0,0 +1,2 @@
1
+ /* Generated from oneharness-core. Do not edit. */
2
+ export {};
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Options accepted by the language SDKs' `interrupt()`.
3
+ */
4
+ export interface InterruptOptions {
5
+ cwd?: string | undefined;
6
+ input?: string | undefined;
7
+ /**
8
+ * The caller-owned session handle the target run was started with.
9
+ */
10
+ session: string;
11
+ sessionDir?: string | undefined;
12
+ }
@@ -0,0 +1,2 @@
1
+ /* Generated from oneharness-core. Do not edit. */
2
+ export {};
@@ -0,0 +1,40 @@
1
+ /**
2
+ * The answer to one `oneharness interrupt`: either the abort was served, or it was refused with a reason.
3
+ */
4
+ export type InterruptResponse = {
5
+ error?: never | undefined;
6
+ mechanism: ControlShape;
7
+ ok: true;
8
+ reason?: never | undefined;
9
+ /**
10
+ * Whether the request's redirection was committed with the abort. Omitted rather than sent as `false`, so a plain interrupt's answer gains no field the supervisor did not ask for.
11
+ */
12
+ redirected?: boolean | undefined;
13
+ v: 2;
14
+ [k: string]: unknown;
15
+ } | {
16
+ error: string;
17
+ mechanism?: never | undefined;
18
+ ok: false;
19
+ reason: ControlReason;
20
+ redirected?: false | undefined;
21
+ v: 2;
22
+ [k: string]: unknown;
23
+ };
24
+ /**
25
+ * How a harness accepts an out-of-band interrupt for an in-flight turn.
26
+ *
27
+ * Registry data on [`crate::domain::harness::HarnessSpec::control`], sourced
28
+ * from a live interrupt against the real CLI — never guessed. `None` there
29
+ * means `oneharness interrupt` is a loud usage error for the harness, never a
30
+ * silent no-op: a supervisor that is told "ok" while the turn keeps running is
31
+ * worse off than one told the lever does not exist.
32
+ */
33
+ export type ControlShape = "claude-control-request" | "codex-app-server" | "opencode-http" | "acp-cancel" | "crush-http";
34
+ /**
35
+ * Why a control request could not be served. Distinct reasons because a
36
+ * supervisor reacts differently to each: `unsupported` is permanent for the
37
+ * harness, `not_running` means the dispatch is gone, `no_active_turn` means
38
+ * the run is alive but between turns.
39
+ */
40
+ export type ControlReason = "unsupported" | "no_active_turn" | "not_running";
@@ -0,0 +1,2 @@
1
+ /* Generated from oneharness-core. Do not edit. */
2
+ export {};
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Options accepted by the language SDKs' `mock()`.
3
+ */
4
+ export interface MockOptions {
5
+ /**
6
+ * The harness's pre-tool hook event, written to the responder's stdin.
7
+ */
8
+ event: string;
9
+ harness: string;
10
+ rules?: string | undefined;
11
+ spyFile?: string | undefined;
12
+ }
@@ -0,0 +1,2 @@
1
+ /* Generated from oneharness-core. Do not edit. */
2
+ export {};