@qontinui/shared-types 2.0.0 → 2.1.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.
Files changed (40) hide show
  1. package/dist/GlossaryTerm.d-orY3JZRJ.d.cts +40 -0
  2. package/dist/GlossaryTerm.d-orY3JZRJ.d.ts +40 -0
  3. package/dist/glossary.cjs +310 -0
  4. package/dist/glossary.cjs.map +1 -0
  5. package/dist/glossary.d.cts +52 -0
  6. package/dist/glossary.d.ts +52 -0
  7. package/dist/glossary.js +277 -0
  8. package/dist/glossary.js.map +1 -0
  9. package/dist/index.d.cts +2 -2
  10. package/dist/index.d.ts +2 -2
  11. package/dist/refusal.cjs +19 -0
  12. package/dist/refusal.cjs.map +1 -0
  13. package/dist/refusal.d.cts +158 -0
  14. package/dist/refusal.d.ts +158 -0
  15. package/dist/refusal.js +1 -0
  16. package/dist/refusal.js.map +1 -0
  17. package/dist/runner.d.cts +1 -1
  18. package/dist/runner.d.ts +1 -1
  19. package/dist/scheduler.d.cts +62 -1
  20. package/dist/scheduler.d.ts +62 -1
  21. package/package.json +11 -1
  22. package/src/generated/ConditionStatus.d.ts +12 -0
  23. package/src/generated/CreateScheduledTaskRequest.d.ts +1 -0
  24. package/src/generated/GlossaryTerm.d.ts +38 -0
  25. package/src/generated/NextAction.d.ts +33 -0
  26. package/src/generated/NextActionKind.d.ts +26 -0
  27. package/src/generated/ProbeCondition.d.ts +44 -0
  28. package/src/generated/Refusal.d.ts +63 -0
  29. package/src/generated/RefusalCode.d.ts +20 -0
  30. package/src/generated/RefusalSource.d.ts +12 -0
  31. package/src/generated/ScheduleConditions.d.ts +5 -0
  32. package/src/generated/ScheduledTask.d.ts +1 -0
  33. package/src/generated/UpdateScheduledTaskRequest.d.ts +1 -0
  34. package/src/generated/index.ts +7 -0
  35. package/src/glossary/__tests__/glossary.test.ts +46 -0
  36. package/src/glossary/generated.ts +276 -0
  37. package/src/glossary/index.ts +45 -0
  38. package/src/refusal/index.ts +17 -0
  39. package/src/runner/_api.ts +2 -0
  40. package/src/scheduler/_api.ts +1 -0
@@ -0,0 +1,158 @@
1
+ import { G as GlossaryTerm } from './GlossaryTerm.d-orY3JZRJ.js';
2
+
3
+ /* eslint-disable */
4
+ /**
5
+ * This file was automatically generated.
6
+ * DO NOT MODIFY IT BY HAND. Regenerate with
7
+ * `qontinui-runner/src-tauri/scripts/generate_types.sh`.
8
+ */
9
+
10
+ /**
11
+ * What the reader does next. A closed set: every refusal names exactly one.
12
+ */
13
+ type NextActionKind =
14
+ | "retry_later"
15
+ | "run_command"
16
+ | "open_page"
17
+ | "sign_in"
18
+ | "pair_device"
19
+ | "set_setting"
20
+ | "wait_for_gate"
21
+ | "none_terminal"
22
+ | "report_defect"
23
+ | "fix_request"
24
+ | "resnapshot"
25
+ | "scroll_into_view"
26
+ | "wait_for_enabled"
27
+ | "broaden_selector"
28
+ | "unrecognised";
29
+
30
+ /* eslint-disable */
31
+ /**
32
+ * This file was automatically generated.
33
+ * DO NOT MODIFY IT BY HAND. Regenerate with
34
+ * `qontinui-runner/src-tauri/scripts/generate_types.sh`.
35
+ */
36
+
37
+
38
+
39
+ /**
40
+ * The typed next step of a [`Refusal`]. Decoding is lenient toward newer
41
+ * producers (module docs, "Forward compatibility").
42
+ */
43
+ interface NextAction {
44
+ kind: NextActionKind;
45
+ /**
46
+ * For [`NextActionKind::RetryLater`]: the earliest useful retry, in whole
47
+ * seconds. Absent when no delay is known.
48
+ */
49
+ retry_after_s?: number | null;
50
+ /**
51
+ * What the action applies to: the command to run, the page to open, the
52
+ * setting to set, the gate to wait for. Its meaning is fixed by `kind`.
53
+ */
54
+ target?: string | null;
55
+ /**
56
+ * READER-SIDE: the raw `kind` when this reader did not recognise it
57
+ * (`kind` is then [`NextActionKind::Unrecognised`]). Producers must not
58
+ * emit it.
59
+ */
60
+ unrecognised_kind?: string | null;
61
+ [k: string]: unknown;
62
+ }
63
+
64
+ /* eslint-disable */
65
+ /**
66
+ * This file was automatically generated.
67
+ * DO NOT MODIFY IT BY HAND. Regenerate with
68
+ * `qontinui-runner/src-tauri/scripts/generate_types.sh`.
69
+ */
70
+
71
+ /**
72
+ * What went wrong, as a stable machine-readable code.
73
+ *
74
+ * Extend by adding a variant (and its row in [`RefusalCode::headline`] and
75
+ * [`RefusalCode::from_wire`]); the tables are exhaustive `match`es, so a new
76
+ * code without a sentence is a compile error.
77
+ */
78
+ type RefusalCode =
79
+ | "workspace_root_unresolved"
80
+ | "sibling_checkout_absent"
81
+ | "endpoint_unresolved"
82
+ | "glossary_term_unknown"
83
+ | "unknown";
84
+
85
+ /* eslint-disable */
86
+ /**
87
+ * This file was automatically generated.
88
+ * DO NOT MODIFY IT BY HAND. Regenerate with
89
+ * `qontinui-runner/src-tauri/scripts/generate_types.sh`.
90
+ */
91
+
92
+ /**
93
+ * The component that produced a [`Refusal`].
94
+ */
95
+ type RefusalSource =
96
+ "runner" | "coord" | "web_backend" | "web_frontend" | "unrecognised";
97
+
98
+ /* eslint-disable */
99
+ /**
100
+ * This file was automatically generated.
101
+ * DO NOT MODIFY IT BY HAND. Regenerate with
102
+ * `qontinui-runner/src-tauri/scripts/generate_types.sh`.
103
+ */
104
+
105
+
106
+
107
+ /**
108
+ * One operator-facing refusal: what went wrong, and what to do next.
109
+ *
110
+ * Construct with [`Refusal::new`] and the `with_*` builders. `next_action` is
111
+ * deliberately not optional — see the module docs. Decoding is lenient toward
112
+ * newer producers (module docs, "Forward compatibility").
113
+ */
114
+ interface Refusal {
115
+ code: RefusalCode;
116
+ /**
117
+ * Raw diagnostic text (the underlying error, the unrecognised reason).
118
+ * Shown beside the rendered sentence, never inside it.
119
+ */
120
+ detail?: string | null;
121
+ /**
122
+ * Narrows `code` to the specific case (the setting that was empty, the
123
+ * service whose address was missing). Rendered after the headline.
124
+ */
125
+ discriminator?: string | null;
126
+ /**
127
+ * Glossary terms a reader may need to act on this refusal. Typed, so a
128
+ * producer cannot cite a term the glossary does not define. Always
129
+ * present on the wire (an empty list, never null).
130
+ */
131
+ glossary_terms: GlossaryTerm[];
132
+ next_action: NextAction;
133
+ /**
134
+ * When the refusal was observed (ISO 8601).
135
+ */
136
+ observed_at: string;
137
+ source: RefusalSource;
138
+ /**
139
+ * READER-SIDE: the raw `code` when this reader did not recognise it
140
+ * (`code` is then [`RefusalCode::Unknown`]). Absent when the producer
141
+ * itself said `unknown`. Producers must not emit it.
142
+ */
143
+ unrecognised_code?: string | null;
144
+ /**
145
+ * READER-SIDE: glossary ids this reader's glossary does not define,
146
+ * removed from `glossary_terms`. Producers must not emit it.
147
+ */
148
+ unrecognised_glossary_terms?: string[];
149
+ /**
150
+ * READER-SIDE: the raw `source` when this reader did not recognise it
151
+ * (`source` is then [`RefusalSource::Unrecognised`]). Producers must not
152
+ * emit it.
153
+ */
154
+ unrecognised_source?: string | null;
155
+ [k: string]: unknown;
156
+ }
157
+
158
+ export { GlossaryTerm, type NextAction, type NextActionKind, type Refusal, type RefusalCode, type RefusalSource };
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=refusal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/dist/runner.d.cts CHANGED
@@ -232,4 +232,4 @@ interface Runner {
232
232
  wsConnected: boolean;
233
233
  }
234
234
 
235
- export type { Runner, RunnerCrash, RunnerStatus, RunnerUiError };
235
+ export type { Runner, RunnerCrash, RunnerInstance, RunnerInstanceRole, RunnerStatus, RunnerUiError };
package/dist/runner.d.ts CHANGED
@@ -232,4 +232,4 @@ interface Runner {
232
232
  wsConnected: boolean;
233
233
  }
234
234
 
235
- export type { Runner, RunnerCrash, RunnerStatus, RunnerUiError };
235
+ export type { Runner, RunnerCrash, RunnerInstance, RunnerInstanceRole, RunnerStatus, RunnerUiError };
@@ -74,6 +74,51 @@ interface IdleCondition {
74
74
  enabled: boolean;
75
75
  }
76
76
 
77
+ /* eslint-disable */
78
+ /**
79
+ * This file was automatically generated.
80
+ * DO NOT MODIFY IT BY HAND. Regenerate with
81
+ * `qontinui-runner/src-tauri/scripts/generate_types.sh`.
82
+ */
83
+
84
+ /**
85
+ * Condition that runs an external command and is met iff it exits 0.
86
+ *
87
+ * The runner execs `command` directly — argv, never a shell — so `command[0]`
88
+ * is the program and the rest are its arguments; wrap it in `sh -c` yourself
89
+ * if you want shell syntax. The condition is **NOT met** on a non-zero exit,
90
+ * on a timeout (the probe is killed at `timeout_seconds`) and on a spawn
91
+ * failure (including an empty `command`); each is logged distinctly. An
92
+ * unobserved or failed probe never reads as met.
93
+ *
94
+ * The probe is rate-limited to one run per `poll_seconds` per task: between
95
+ * polls the runner reuses the last result. `poll_seconds` is floored at 60
96
+ * because the scheduler re-evaluates conditions once per 60 s tick — a shorter
97
+ * interval could not be honoured. The runner's create/update API REFUSES a
98
+ * value below the floor (and an empty `command`, and a `timeout_seconds` of
99
+ * 0 or above 3600) rather than silently rewriting it; a stored row that
100
+ * predates that validation is clamped up to 60 at evaluation time.
101
+ */
102
+ interface ProbeCondition {
103
+ /**
104
+ * Program and arguments to exec (no shell). Must be non-empty.
105
+ */
106
+ command: string[];
107
+ /**
108
+ * Whether this condition is active.
109
+ */
110
+ enabled: boolean;
111
+ /**
112
+ * Minimum seconds between two probe runs for the same task. Minimum 60.
113
+ */
114
+ pollSeconds: number;
115
+ /**
116
+ * Seconds a single probe run may take before it is killed and counted as
117
+ * NOT met. 1..=3600.
118
+ */
119
+ timeoutSeconds: number;
120
+ }
121
+
77
122
  /* eslint-disable */
78
123
  /**
79
124
  * This file was automatically generated.
@@ -137,6 +182,10 @@ interface ScheduleConditions {
137
182
  * Require the runner to be idle.
138
183
  */
139
184
  requireIdle?: IdleCondition | null;
185
+ /**
186
+ * Require an external probe command to exit 0 (see [`ProbeCondition`]).
187
+ */
188
+ requireProbe?: ProbeCondition | null;
140
189
  /**
141
190
  * Require repository file inactivity across one or more paths.
142
191
  */
@@ -164,6 +213,18 @@ interface ConditionStatus {
164
213
  * `Some(true)` if idle, `Some(false)` if busy.
165
214
  */
166
215
  idleMet?: boolean | null;
216
+ /**
217
+ * Human-readable outcome of the last probe evaluation — e.g. `exit 0`,
218
+ * `exit 3`, `timed out after 30s`, `spawn failed: ...`, `probe running;
219
+ * awaiting its result`, `not run: another condition is not met` — with a
220
+ * bounded stderr tail appended when the probe wrote one.
221
+ */
222
+ probeDetail?: string | null;
223
+ /**
224
+ * Current probe-condition result. `None` if no probe is configured or
225
+ * none has been evaluated yet, `Some(true)` if the last probe exited 0.
226
+ */
227
+ probeMet?: boolean | null;
167
228
  /**
168
229
  * Current repository-inactive status per repository: `(path, is_inactive)`.
169
230
  */
@@ -741,4 +802,4 @@ interface UpdateScheduledTaskRequest {
741
802
  task?: ScheduledTaskType | null;
742
803
  }
743
804
 
744
- export type { CatchUpPolicy, ConditionScheduleConfig, ConditionStatus, CreateScheduledTaskRequest, IdleCondition, McpConnectionRef, NextTaskInfo, RepositoryInactiveCondition, RepositoryWatch, ScheduleConditions, ScheduleExpression, ScheduledTask, ScheduledTaskStatus, ScheduledTaskType, SchedulerSettings, SchedulerStatus, TaskExecutionRecord, UpdateScheduledTaskRequest };
805
+ export type { CatchUpPolicy, ConditionScheduleConfig, ConditionStatus, CreateScheduledTaskRequest, IdleCondition, McpConnectionRef, NextTaskInfo, ProbeCondition, RepositoryInactiveCondition, RepositoryWatch, ScheduleConditions, ScheduleExpression, ScheduledTask, ScheduledTaskStatus, ScheduledTaskType, SchedulerSettings, SchedulerStatus, TaskExecutionRecord, UpdateScheduledTaskRequest };
@@ -74,6 +74,51 @@ interface IdleCondition {
74
74
  enabled: boolean;
75
75
  }
76
76
 
77
+ /* eslint-disable */
78
+ /**
79
+ * This file was automatically generated.
80
+ * DO NOT MODIFY IT BY HAND. Regenerate with
81
+ * `qontinui-runner/src-tauri/scripts/generate_types.sh`.
82
+ */
83
+
84
+ /**
85
+ * Condition that runs an external command and is met iff it exits 0.
86
+ *
87
+ * The runner execs `command` directly — argv, never a shell — so `command[0]`
88
+ * is the program and the rest are its arguments; wrap it in `sh -c` yourself
89
+ * if you want shell syntax. The condition is **NOT met** on a non-zero exit,
90
+ * on a timeout (the probe is killed at `timeout_seconds`) and on a spawn
91
+ * failure (including an empty `command`); each is logged distinctly. An
92
+ * unobserved or failed probe never reads as met.
93
+ *
94
+ * The probe is rate-limited to one run per `poll_seconds` per task: between
95
+ * polls the runner reuses the last result. `poll_seconds` is floored at 60
96
+ * because the scheduler re-evaluates conditions once per 60 s tick — a shorter
97
+ * interval could not be honoured. The runner's create/update API REFUSES a
98
+ * value below the floor (and an empty `command`, and a `timeout_seconds` of
99
+ * 0 or above 3600) rather than silently rewriting it; a stored row that
100
+ * predates that validation is clamped up to 60 at evaluation time.
101
+ */
102
+ interface ProbeCondition {
103
+ /**
104
+ * Program and arguments to exec (no shell). Must be non-empty.
105
+ */
106
+ command: string[];
107
+ /**
108
+ * Whether this condition is active.
109
+ */
110
+ enabled: boolean;
111
+ /**
112
+ * Minimum seconds between two probe runs for the same task. Minimum 60.
113
+ */
114
+ pollSeconds: number;
115
+ /**
116
+ * Seconds a single probe run may take before it is killed and counted as
117
+ * NOT met. 1..=3600.
118
+ */
119
+ timeoutSeconds: number;
120
+ }
121
+
77
122
  /* eslint-disable */
78
123
  /**
79
124
  * This file was automatically generated.
@@ -137,6 +182,10 @@ interface ScheduleConditions {
137
182
  * Require the runner to be idle.
138
183
  */
139
184
  requireIdle?: IdleCondition | null;
185
+ /**
186
+ * Require an external probe command to exit 0 (see [`ProbeCondition`]).
187
+ */
188
+ requireProbe?: ProbeCondition | null;
140
189
  /**
141
190
  * Require repository file inactivity across one or more paths.
142
191
  */
@@ -164,6 +213,18 @@ interface ConditionStatus {
164
213
  * `Some(true)` if idle, `Some(false)` if busy.
165
214
  */
166
215
  idleMet?: boolean | null;
216
+ /**
217
+ * Human-readable outcome of the last probe evaluation — e.g. `exit 0`,
218
+ * `exit 3`, `timed out after 30s`, `spawn failed: ...`, `probe running;
219
+ * awaiting its result`, `not run: another condition is not met` — with a
220
+ * bounded stderr tail appended when the probe wrote one.
221
+ */
222
+ probeDetail?: string | null;
223
+ /**
224
+ * Current probe-condition result. `None` if no probe is configured or
225
+ * none has been evaluated yet, `Some(true)` if the last probe exited 0.
226
+ */
227
+ probeMet?: boolean | null;
167
228
  /**
168
229
  * Current repository-inactive status per repository: `(path, is_inactive)`.
169
230
  */
@@ -741,4 +802,4 @@ interface UpdateScheduledTaskRequest {
741
802
  task?: ScheduledTaskType | null;
742
803
  }
743
804
 
744
- export type { CatchUpPolicy, ConditionScheduleConfig, ConditionStatus, CreateScheduledTaskRequest, IdleCondition, McpConnectionRef, NextTaskInfo, RepositoryInactiveCondition, RepositoryWatch, ScheduleConditions, ScheduleExpression, ScheduledTask, ScheduledTaskStatus, ScheduledTaskType, SchedulerSettings, SchedulerStatus, TaskExecutionRecord, UpdateScheduledTaskRequest };
805
+ export type { CatchUpPolicy, ConditionScheduleConfig, ConditionStatus, CreateScheduledTaskRequest, IdleCondition, McpConnectionRef, NextTaskInfo, ProbeCondition, RepositoryInactiveCondition, RepositoryWatch, ScheduleConditions, ScheduleExpression, ScheduledTask, ScheduledTaskStatus, ScheduledTaskType, SchedulerSettings, SchedulerStatus, TaskExecutionRecord, UpdateScheduledTaskRequest };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qontinui/shared-types",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "Shared TypeScript types for the Qontinui ecosystem",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -97,6 +97,16 @@
97
97
  "types": "./dist/tauri-events.d.ts",
98
98
  "import": "./dist/tauri-events.js",
99
99
  "require": "./dist/tauri-events.cjs"
100
+ },
101
+ "./glossary": {
102
+ "types": "./dist/glossary.d.ts",
103
+ "import": "./dist/glossary.js",
104
+ "require": "./dist/glossary.cjs"
105
+ },
106
+ "./refusal": {
107
+ "types": "./dist/refusal.d.ts",
108
+ "import": "./dist/refusal.js",
109
+ "require": "./dist/refusal.cjs"
100
110
  }
101
111
  },
102
112
  "files": [
@@ -14,6 +14,18 @@ export interface ConditionStatus {
14
14
  * `Some(true)` if idle, `Some(false)` if busy.
15
15
  */
16
16
  idleMet?: boolean | null;
17
+ /**
18
+ * Human-readable outcome of the last probe evaluation — e.g. `exit 0`,
19
+ * `exit 3`, `timed out after 30s`, `spawn failed: ...`, `probe running;
20
+ * awaiting its result`, `not run: another condition is not met` — with a
21
+ * bounded stderr tail appended when the probe wrote one.
22
+ */
23
+ probeDetail?: string | null;
24
+ /**
25
+ * Current probe-condition result. `None` if no probe is configured or
26
+ * none has been evaluated yet, `Some(true)` if the last probe exited 0.
27
+ */
28
+ probeMet?: boolean | null;
17
29
  /**
18
30
  * Current repository-inactive status per repository: `(path, is_inactive)`.
19
31
  */
@@ -9,6 +9,7 @@ import type { CatchUpPolicy } from "./CatchUpPolicy";
9
9
  import type { ConditionScheduleConfig } from "./ConditionScheduleConfig";
10
10
  import type { IdleCondition } from "./IdleCondition";
11
11
  import type { McpConnectionRef } from "./McpConnectionRef";
12
+ import type { ProbeCondition } from "./ProbeCondition";
12
13
  import type { RepositoryInactiveCondition } from "./RepositoryInactiveCondition";
13
14
  import type { RepositoryWatch } from "./RepositoryWatch";
14
15
  import type { ScheduleConditions } from "./ScheduleConditions";
@@ -0,0 +1,38 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file was automatically generated.
4
+ * DO NOT MODIFY IT BY HAND. Regenerate with
5
+ * `qontinui-runner/src-tauri/scripts/generate_types.sh`.
6
+ */
7
+
8
+ /**
9
+ * A term the product glossary defines, by its stable snake_case id.
10
+ */
11
+ export type GlossaryTerm =
12
+ | "gate"
13
+ | "continuation"
14
+ | "attestation"
15
+ | "work_unit"
16
+ | "plan"
17
+ | "claim"
18
+ | "tier"
19
+ | "merge_train"
20
+ | "merge_verdict"
21
+ | "landed"
22
+ | "finding"
23
+ | "dossier"
24
+ | "policy"
25
+ | "clause"
26
+ | "intent_document"
27
+ | "drain"
28
+ | "restart_readiness"
29
+ | "agent_session"
30
+ | "session_status"
31
+ | "rung"
32
+ | "tenant"
33
+ | "device"
34
+ | "runner"
35
+ | "coord"
36
+ | "worktree_allocation"
37
+ | "operator"
38
+ | "unknown";
@@ -0,0 +1,33 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file was automatically generated.
4
+ * DO NOT MODIFY IT BY HAND. Regenerate with
5
+ * `qontinui-runner/src-tauri/scripts/generate_types.sh`.
6
+ */
7
+
8
+ import type { NextActionKind } from "./NextActionKind";
9
+
10
+ /**
11
+ * The typed next step of a [`Refusal`]. Decoding is lenient toward newer
12
+ * producers (module docs, "Forward compatibility").
13
+ */
14
+ export interface NextAction {
15
+ kind: NextActionKind;
16
+ /**
17
+ * For [`NextActionKind::RetryLater`]: the earliest useful retry, in whole
18
+ * seconds. Absent when no delay is known.
19
+ */
20
+ retry_after_s?: number | null;
21
+ /**
22
+ * What the action applies to: the command to run, the page to open, the
23
+ * setting to set, the gate to wait for. Its meaning is fixed by `kind`.
24
+ */
25
+ target?: string | null;
26
+ /**
27
+ * READER-SIDE: the raw `kind` when this reader did not recognise it
28
+ * (`kind` is then [`NextActionKind::Unrecognised`]). Producers must not
29
+ * emit it.
30
+ */
31
+ unrecognised_kind?: string | null;
32
+ [k: string]: unknown;
33
+ }
@@ -0,0 +1,26 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file was automatically generated.
4
+ * DO NOT MODIFY IT BY HAND. Regenerate with
5
+ * `qontinui-runner/src-tauri/scripts/generate_types.sh`.
6
+ */
7
+
8
+ /**
9
+ * What the reader does next. A closed set: every refusal names exactly one.
10
+ */
11
+ export type NextActionKind =
12
+ | "retry_later"
13
+ | "run_command"
14
+ | "open_page"
15
+ | "sign_in"
16
+ | "pair_device"
17
+ | "set_setting"
18
+ | "wait_for_gate"
19
+ | "none_terminal"
20
+ | "report_defect"
21
+ | "fix_request"
22
+ | "resnapshot"
23
+ | "scroll_into_view"
24
+ | "wait_for_enabled"
25
+ | "broaden_selector"
26
+ | "unrecognised";
@@ -0,0 +1,44 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file was automatically generated.
4
+ * DO NOT MODIFY IT BY HAND. Regenerate with
5
+ * `qontinui-runner/src-tauri/scripts/generate_types.sh`.
6
+ */
7
+
8
+ /**
9
+ * Condition that runs an external command and is met iff it exits 0.
10
+ *
11
+ * The runner execs `command` directly — argv, never a shell — so `command[0]`
12
+ * is the program and the rest are its arguments; wrap it in `sh -c` yourself
13
+ * if you want shell syntax. The condition is **NOT met** on a non-zero exit,
14
+ * on a timeout (the probe is killed at `timeout_seconds`) and on a spawn
15
+ * failure (including an empty `command`); each is logged distinctly. An
16
+ * unobserved or failed probe never reads as met.
17
+ *
18
+ * The probe is rate-limited to one run per `poll_seconds` per task: between
19
+ * polls the runner reuses the last result. `poll_seconds` is floored at 60
20
+ * because the scheduler re-evaluates conditions once per 60 s tick — a shorter
21
+ * interval could not be honoured. The runner's create/update API REFUSES a
22
+ * value below the floor (and an empty `command`, and a `timeout_seconds` of
23
+ * 0 or above 3600) rather than silently rewriting it; a stored row that
24
+ * predates that validation is clamped up to 60 at evaluation time.
25
+ */
26
+ export interface ProbeCondition {
27
+ /**
28
+ * Program and arguments to exec (no shell). Must be non-empty.
29
+ */
30
+ command: string[];
31
+ /**
32
+ * Whether this condition is active.
33
+ */
34
+ enabled: boolean;
35
+ /**
36
+ * Minimum seconds between two probe runs for the same task. Minimum 60.
37
+ */
38
+ pollSeconds: number;
39
+ /**
40
+ * Seconds a single probe run may take before it is killed and counted as
41
+ * NOT met. 1..=3600.
42
+ */
43
+ timeoutSeconds: number;
44
+ }
@@ -0,0 +1,63 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file was automatically generated.
4
+ * DO NOT MODIFY IT BY HAND. Regenerate with
5
+ * `qontinui-runner/src-tauri/scripts/generate_types.sh`.
6
+ */
7
+
8
+ import type { GlossaryTerm } from "./GlossaryTerm";
9
+ import type { NextAction } from "./NextAction";
10
+ import type { NextActionKind } from "./NextActionKind";
11
+ import type { RefusalCode } from "./RefusalCode";
12
+ import type { RefusalSource } from "./RefusalSource";
13
+
14
+ /**
15
+ * One operator-facing refusal: what went wrong, and what to do next.
16
+ *
17
+ * Construct with [`Refusal::new`] and the `with_*` builders. `next_action` is
18
+ * deliberately not optional — see the module docs. Decoding is lenient toward
19
+ * newer producers (module docs, "Forward compatibility").
20
+ */
21
+ export interface Refusal {
22
+ code: RefusalCode;
23
+ /**
24
+ * Raw diagnostic text (the underlying error, the unrecognised reason).
25
+ * Shown beside the rendered sentence, never inside it.
26
+ */
27
+ detail?: string | null;
28
+ /**
29
+ * Narrows `code` to the specific case (the setting that was empty, the
30
+ * service whose address was missing). Rendered after the headline.
31
+ */
32
+ discriminator?: string | null;
33
+ /**
34
+ * Glossary terms a reader may need to act on this refusal. Typed, so a
35
+ * producer cannot cite a term the glossary does not define. Always
36
+ * present on the wire (an empty list, never null).
37
+ */
38
+ glossary_terms: GlossaryTerm[];
39
+ next_action: NextAction;
40
+ /**
41
+ * When the refusal was observed (ISO 8601).
42
+ */
43
+ observed_at: string;
44
+ source: RefusalSource;
45
+ /**
46
+ * READER-SIDE: the raw `code` when this reader did not recognise it
47
+ * (`code` is then [`RefusalCode::Unknown`]). Absent when the producer
48
+ * itself said `unknown`. Producers must not emit it.
49
+ */
50
+ unrecognised_code?: string | null;
51
+ /**
52
+ * READER-SIDE: glossary ids this reader's glossary does not define,
53
+ * removed from `glossary_terms`. Producers must not emit it.
54
+ */
55
+ unrecognised_glossary_terms?: string[];
56
+ /**
57
+ * READER-SIDE: the raw `source` when this reader did not recognise it
58
+ * (`source` is then [`RefusalSource::Unrecognised`]). Producers must not
59
+ * emit it.
60
+ */
61
+ unrecognised_source?: string | null;
62
+ [k: string]: unknown;
63
+ }
@@ -0,0 +1,20 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file was automatically generated.
4
+ * DO NOT MODIFY IT BY HAND. Regenerate with
5
+ * `qontinui-runner/src-tauri/scripts/generate_types.sh`.
6
+ */
7
+
8
+ /**
9
+ * What went wrong, as a stable machine-readable code.
10
+ *
11
+ * Extend by adding a variant (and its row in [`RefusalCode::headline`] and
12
+ * [`RefusalCode::from_wire`]); the tables are exhaustive `match`es, so a new
13
+ * code without a sentence is a compile error.
14
+ */
15
+ export type RefusalCode =
16
+ | "workspace_root_unresolved"
17
+ | "sibling_checkout_absent"
18
+ | "endpoint_unresolved"
19
+ | "glossary_term_unknown"
20
+ | "unknown";
@@ -0,0 +1,12 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file was automatically generated.
4
+ * DO NOT MODIFY IT BY HAND. Regenerate with
5
+ * `qontinui-runner/src-tauri/scripts/generate_types.sh`.
6
+ */
7
+
8
+ /**
9
+ * The component that produced a [`Refusal`].
10
+ */
11
+ export type RefusalSource =
12
+ "runner" | "coord" | "web_backend" | "web_frontend" | "unrecognised";
@@ -6,6 +6,7 @@
6
6
  */
7
7
 
8
8
  import type { IdleCondition } from "./IdleCondition";
9
+ import type { ProbeCondition } from "./ProbeCondition";
9
10
  import type { RepositoryInactiveCondition } from "./RepositoryInactiveCondition";
10
11
  import type { RepositoryWatch } from "./RepositoryWatch";
11
12
 
@@ -17,6 +18,10 @@ export interface ScheduleConditions {
17
18
  * Require the runner to be idle.
18
19
  */
19
20
  requireIdle?: IdleCondition | null;
21
+ /**
22
+ * Require an external probe command to exit 0 (see [`ProbeCondition`]).
23
+ */
24
+ requireProbe?: ProbeCondition | null;
20
25
  /**
21
26
  * Require repository file inactivity across one or more paths.
22
27
  */
@@ -10,6 +10,7 @@ import type { ConditionScheduleConfig } from "./ConditionScheduleConfig";
10
10
  import type { ConditionStatus } from "./ConditionStatus";
11
11
  import type { IdleCondition } from "./IdleCondition";
12
12
  import type { McpConnectionRef } from "./McpConnectionRef";
13
+ import type { ProbeCondition } from "./ProbeCondition";
13
14
  import type { RepositoryInactiveCondition } from "./RepositoryInactiveCondition";
14
15
  import type { RepositoryWatch } from "./RepositoryWatch";
15
16
  import type { ScheduleConditions } from "./ScheduleConditions";