@qontinui/shared-types 2.0.0 → 2.2.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 (45) 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 +175 -0
  14. package/dist/refusal.d.ts +175 -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/FrontierEntry.d.ts +62 -0
  25. package/src/generated/GlossaryTerm.d.ts +38 -0
  26. package/src/generated/JourneyEdgeObservation.d.ts +91 -0
  27. package/src/generated/JourneyLedgerHealth.d.ts +21 -0
  28. package/src/generated/JourneyNode.d.ts +72 -0
  29. package/src/generated/JourneyTrigger.d.ts +47 -0
  30. package/src/generated/NextAction.d.ts +37 -0
  31. package/src/generated/NextActionKind.d.ts +26 -0
  32. package/src/generated/ProbeCondition.d.ts +44 -0
  33. package/src/generated/Refusal.d.ts +63 -0
  34. package/src/generated/RefusalCode.d.ts +33 -0
  35. package/src/generated/RefusalSource.d.ts +12 -0
  36. package/src/generated/ScheduleConditions.d.ts +5 -0
  37. package/src/generated/ScheduledTask.d.ts +1 -0
  38. package/src/generated/UpdateScheduledTaskRequest.d.ts +1 -0
  39. package/src/generated/index.ts +12 -0
  40. package/src/glossary/__tests__/glossary.test.ts +46 -0
  41. package/src/glossary/generated.ts +276 -0
  42. package/src/glossary/index.ts +45 -0
  43. package/src/refusal/index.ts +17 -0
  44. package/src/runner/_api.ts +2 -0
  45. package/src/scheduler/_api.ts +1 -0
@@ -0,0 +1,175 @@
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
+ * On [`NextActionKind::RetryLater`] it is what to re-check BEFORE
54
+ * retrying, because the earlier attempt may already have taken effect (a
55
+ * [`RefusalCode::UpstreamTimeout`] write); [`NextAction::render`] then
56
+ * says so. Omit it on a retry that is safe to repeat blindly.
57
+ */
58
+ target?: string | null;
59
+ /**
60
+ * READER-SIDE: the raw `kind` when this reader did not recognise it
61
+ * (`kind` is then [`NextActionKind::Unrecognised`]). Producers must not
62
+ * emit it.
63
+ */
64
+ unrecognised_kind?: string | null;
65
+ [k: string]: unknown;
66
+ }
67
+
68
+ /* eslint-disable */
69
+ /**
70
+ * This file was automatically generated.
71
+ * DO NOT MODIFY IT BY HAND. Regenerate with
72
+ * `qontinui-runner/src-tauri/scripts/generate_types.sh`.
73
+ */
74
+
75
+ /**
76
+ * What went wrong, as a stable machine-readable code.
77
+ *
78
+ * Extend by adding a variant (and its row in [`RefusalCode::headline`] and
79
+ * [`RefusalCode::from_wire`]); the tables are exhaustive `match`es, so a new
80
+ * code without a sentence is a compile error.
81
+ */
82
+ type RefusalCode =
83
+ | "workspace_root_unresolved"
84
+ | "sibling_checkout_absent"
85
+ | "endpoint_unresolved"
86
+ | "glossary_term_unknown"
87
+ | "authentication_required"
88
+ | "credential_rejected"
89
+ | "permission_denied"
90
+ | "not_found"
91
+ | "conflict"
92
+ | "invalid_request"
93
+ | "rate_limited"
94
+ | "quota_exceeded"
95
+ | "upstream_unavailable"
96
+ | "upstream_timeout"
97
+ | "device_not_connected"
98
+ | "service_unavailable"
99
+ | "internal_error"
100
+ | "unknown";
101
+
102
+ /* eslint-disable */
103
+ /**
104
+ * This file was automatically generated.
105
+ * DO NOT MODIFY IT BY HAND. Regenerate with
106
+ * `qontinui-runner/src-tauri/scripts/generate_types.sh`.
107
+ */
108
+
109
+ /**
110
+ * The component that produced a [`Refusal`].
111
+ */
112
+ type RefusalSource =
113
+ "runner" | "coord" | "web_backend" | "web_frontend" | "unrecognised";
114
+
115
+ /* eslint-disable */
116
+ /**
117
+ * This file was automatically generated.
118
+ * DO NOT MODIFY IT BY HAND. Regenerate with
119
+ * `qontinui-runner/src-tauri/scripts/generate_types.sh`.
120
+ */
121
+
122
+
123
+
124
+ /**
125
+ * One operator-facing refusal: what went wrong, and what to do next.
126
+ *
127
+ * Construct with [`Refusal::new`] and the `with_*` builders. `next_action` is
128
+ * deliberately not optional — see the module docs. Decoding is lenient toward
129
+ * newer producers (module docs, "Forward compatibility").
130
+ */
131
+ interface Refusal {
132
+ code: RefusalCode;
133
+ /**
134
+ * Raw diagnostic text (the underlying error, the unrecognised reason).
135
+ * Shown beside the rendered sentence, never inside it.
136
+ */
137
+ detail?: string | null;
138
+ /**
139
+ * Narrows `code` to the specific case (the setting that was empty, the
140
+ * service whose address was missing). Rendered after the headline.
141
+ */
142
+ discriminator?: string | null;
143
+ /**
144
+ * Glossary terms a reader may need to act on this refusal. Typed, so a
145
+ * producer cannot cite a term the glossary does not define. Always
146
+ * present on the wire (an empty list, never null).
147
+ */
148
+ glossary_terms: GlossaryTerm[];
149
+ next_action: NextAction;
150
+ /**
151
+ * When the refusal was observed (ISO 8601).
152
+ */
153
+ observed_at: string;
154
+ source: RefusalSource;
155
+ /**
156
+ * READER-SIDE: the raw `code` when this reader did not recognise it
157
+ * (`code` is then [`RefusalCode::Unknown`]). Absent when the producer
158
+ * itself said `unknown`. Producers must not emit it.
159
+ */
160
+ unrecognised_code?: string | null;
161
+ /**
162
+ * READER-SIDE: glossary ids this reader's glossary does not define,
163
+ * removed from `glossary_terms`. Producers must not emit it.
164
+ */
165
+ unrecognised_glossary_terms?: string[];
166
+ /**
167
+ * READER-SIDE: the raw `source` when this reader did not recognise it
168
+ * (`source` is then [`RefusalSource::Unrecognised`]). Producers must not
169
+ * emit it.
170
+ */
171
+ unrecognised_source?: string | null;
172
+ [k: string]: unknown;
173
+ }
174
+
175
+ 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.2.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,62 @@
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 { JourneyNode } from "./JourneyNode";
9
+
10
+ /**
11
+ * An interactive affordance seen at a node and not yet the trigger of an
12
+ * edge from it — a row of `project.journey_frontier`, keyed
13
+ * `(app_id, node_key, affordance_fingerprint)`.
14
+ */
15
+ export interface FrontierEntry {
16
+ /**
17
+ * Structural fingerprint of the affordance.
18
+ */
19
+ affordanceFingerprint: string;
20
+ /**
21
+ * ARIA role of the affordance; `None` = not reported.
22
+ */
23
+ affordanceRole?: string | null;
24
+ /**
25
+ * The registered app id.
26
+ */
27
+ appId: string;
28
+ /**
29
+ * The affordance's declared effect; `None` = undeclared.
30
+ */
31
+ declaredEffect?: ("read" | "write" | "destructive") | null;
32
+ /**
33
+ * First time it was seen at this node (ISO 8601).
34
+ */
35
+ firstSeenAt: string;
36
+ /**
37
+ * Most recent time it was seen at this node (ISO 8601).
38
+ */
39
+ lastSeenAt: string;
40
+ /**
41
+ * The run that most recently saw it; `None` = not reported.
42
+ */
43
+ lastSeenRunId?: string | null;
44
+ /**
45
+ * The node the affordance was seen at.
46
+ */
47
+ node: JourneyNode;
48
+ /**
49
+ * `node.key()` — stored so the primary key is a plain text column.
50
+ */
51
+ nodeKey: string;
52
+ /**
53
+ * Why it is on the frontier.
54
+ */
55
+ reason:
56
+ | "not_yet_activated"
57
+ | "effect_undeclared"
58
+ | "effect_write"
59
+ | "effect_destructive"
60
+ | "budget_exhausted"
61
+ | "activation_failed";
62
+ }
@@ -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,91 @@
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 { JourneyNode } from "./JourneyNode";
9
+ import type { JourneyTrigger } from "./JourneyTrigger";
10
+
11
+ /**
12
+ * One observed edge of the journey graph — a row of
13
+ * `project.journey_edge_observations`.
14
+ *
15
+ * Invariants (checked by [`JourneyEdgeObservation::validate`]; the first also
16
+ * by the migration's CHECK): `to_node` is `None` iff `outcome` is
17
+ * [`EdgeOutcome::ToNodeUnobserved`]; `no_change` joins nodes with equal
18
+ * keys (a `changed` edge may also join equal keys).
19
+ *
20
+ * The ledger's `timeline` column is deliberately unrepresented until
21
+ * Phase 4; readers select explicit columns rather than `*`.
22
+ */
23
+ export interface JourneyEdgeObservation {
24
+ /**
25
+ * The registered app id.
26
+ */
27
+ appId: string;
28
+ /**
29
+ * The SDK's self-reported version (`SdkAppInfo.version`, semver or git
30
+ * short-SHA); `None` = not reported, never "no version".
31
+ */
32
+ appVersion?: string | null;
33
+ /**
34
+ * The configuration the action was taken from.
35
+ */
36
+ fromNode: JourneyNode;
37
+ /**
38
+ * Row id (UUID).
39
+ */
40
+ id: string;
41
+ /**
42
+ * When the row was withdrawn (ISO 8601); `None` = live.
43
+ */
44
+ invalidatedAt?: string | null;
45
+ /**
46
+ * Who withdrew the row.
47
+ */
48
+ invalidatedBy?: string | null;
49
+ /**
50
+ * Why the row was withdrawn.
51
+ */
52
+ invalidatedReason?: string | null;
53
+ /**
54
+ * Token grouping one bulk withdrawal, as on `co_occurrence_observations`.
55
+ */
56
+ invalidationToken?: string | null;
57
+ /**
58
+ * When the edge CLOSED (to-snapshot seen, or diff returned), ISO 8601.
59
+ */
60
+ observedAt: string;
61
+ /**
62
+ * How the edge closed.
63
+ */
64
+ outcome:
65
+ "changed" | "no_change" | "error" | "settle_timeout" | "to_node_unobserved";
66
+ /**
67
+ * Agent session / task-run / recording-session id; `None` = not reported.
68
+ */
69
+ runId?: string | null;
70
+ /**
71
+ * Who produced the edge.
72
+ */
73
+ runKind: "agent_action" | "explorer" | "passive_session";
74
+ /**
75
+ * The runner's own `buildId`.
76
+ */
77
+ runnerBuildId: string;
78
+ /**
79
+ * Same meaning as `co_occurrence_observations.runner_instance`.
80
+ */
81
+ runnerInstance: string;
82
+ /**
83
+ * The configuration observed after it; `None` iff
84
+ * `outcome == to_node_unobserved`.
85
+ */
86
+ toNode?: JourneyNode | null;
87
+ /**
88
+ * What caused the edge.
89
+ */
90
+ trigger: JourneyTrigger;
91
+ }
@@ -0,0 +1,21 @@
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
+ * Body of `GET /apps/{app_id}/journey/health`, and the ledger block every
10
+ * journey query response repeats.
11
+ */
12
+ export interface JourneyLedgerHealth {
13
+ /**
14
+ * Human-readable cause, e.g. `"embedded DB predates the journey tables"`.
15
+ */
16
+ detail: string;
17
+ /**
18
+ * The ledger's state.
19
+ */
20
+ state: "writing" | "schema_absent" | "write_failing";
21
+ }