@qontinui/shared-types 0.2.2 → 0.2.3
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/dist/TaskRunFindingActionType.d-B4VmmbB6.d.cts +62 -0
- package/dist/TaskRunFindingActionType.d-B4VmmbB6.d.ts +62 -0
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/task-run.d.cts +3 -62
- package/dist/task-run.d.ts +3 -62
- package/dist/tauri-events.cjs +19 -0
- package/dist/tauri-events.cjs.map +1 -0
- package/dist/tauri-events.d.cts +1160 -0
- package/dist/tauri-events.d.ts +1160 -0
- package/dist/tauri-events.js +1 -0
- package/dist/tauri-events.js.map +1 -0
- package/package.json +7 -2
- package/src/generated/AppEvent.d.ts +587 -586
- package/src/generated/CanvasPanel.d.ts +35 -0
- package/src/generated/DevSeedFindingPayload.d.ts +30 -0
- package/src/generated/FlowEvent.d.ts +86 -66
- package/src/generated/RecommendationReviewDecisionPayload.d.ts +24 -0
- package/src/generated/RunnerConnectedConnection.d.ts +34 -0
- package/src/generated/RunnerFinding.d.ts +48 -0
- package/src/generated/RunnerFindingCodeContext.d.ts +20 -0
- package/src/generated/RunnerFindingUserInput.d.ts +19 -0
- package/src/generated/RunnerRelayMessage.d.ts +75 -0
- package/src/generated/RunnerStatusEvent.d.ts +67 -0
- package/src/generated/index.ts +430 -421
- package/src/tauri-events/_api.ts +76 -0
- package/src/tauri-events/index.ts +1 -0
- package/src/ui-bridge-ir/__tests__/legacy-roster.test.ts +0 -182
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/**
|
|
3
|
+
* This file was automatically generated.
|
|
4
|
+
* DO NOT MODIFY IT BY HAND. Regenerate with `just generate-types` or
|
|
5
|
+
* `qontinui-runner/src-tauri/scripts/generate_types.sh`.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* A canvas panel rendered in the dashboard widget.
|
|
10
|
+
*
|
|
11
|
+
* Wire-format mirror of the runner's `StoredPanel` struct
|
|
12
|
+
* (`qontinui-runner/src-tauri/src/mcp/canvas.rs`). The runner emits this
|
|
13
|
+
* inside [`AppEvent::CanvasUpdate`] via the `canvas-update` Tauri channel.
|
|
14
|
+
* Field names are snake_case to match the existing TS interface in
|
|
15
|
+
* `qontinui-schemas/ts/src/canvas/index.ts`.
|
|
16
|
+
*
|
|
17
|
+
* `data` stays `serde_json::Value` because each `component` type has a
|
|
18
|
+
* different inner shape (Markdown, CodeDiff, Table, …); the per-component
|
|
19
|
+
* data schemas live in the TS module above and are intentionally not
|
|
20
|
+
* modeled as a Rust discriminated union (would balloon the schema for
|
|
21
|
+
* little gain on the Rust side).
|
|
22
|
+
*/
|
|
23
|
+
export interface CanvasPanel {
|
|
24
|
+
component: string;
|
|
25
|
+
created_at: string;
|
|
26
|
+
data: unknown;
|
|
27
|
+
group?: string | null;
|
|
28
|
+
panel_id: string;
|
|
29
|
+
priority: number;
|
|
30
|
+
size: string;
|
|
31
|
+
task_run_id: string;
|
|
32
|
+
title: string;
|
|
33
|
+
updated_at: string;
|
|
34
|
+
[k: string]: unknown;
|
|
35
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/**
|
|
3
|
+
* This file was automatically generated.
|
|
4
|
+
* DO NOT MODIFY IT BY HAND. Regenerate with `just generate-types` or
|
|
5
|
+
* `qontinui-runner/src-tauri/scripts/generate_types.sh`.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Payload shape emitted on the `dev:seed-finding` Tauri event.
|
|
10
|
+
*
|
|
11
|
+
* Field names use camelCase so the TS listener (`TauriFindingsListener.ts`)
|
|
12
|
+
* can spread them directly into a `Finding` object without translation.
|
|
13
|
+
* The actual emit site is in `commands::dev_findings::dev_seed_finding`.
|
|
14
|
+
*
|
|
15
|
+
* Renamed in the schema registry to `DevSeedFindingPayload` to disambiguate
|
|
16
|
+
* from the various `Finding*` types in `qontinui_types::findings`.
|
|
17
|
+
*/
|
|
18
|
+
export interface DevSeedFindingPayload {
|
|
19
|
+
actionType: string;
|
|
20
|
+
actionable: boolean;
|
|
21
|
+
categoryId: string;
|
|
22
|
+
description: string;
|
|
23
|
+
detectedAt: number;
|
|
24
|
+
id: string;
|
|
25
|
+
severity: string;
|
|
26
|
+
sourceSessionId?: string | null;
|
|
27
|
+
status: string;
|
|
28
|
+
title: string;
|
|
29
|
+
[k: string]: unknown;
|
|
30
|
+
}
|
|
@@ -1,66 +1,86 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
/**
|
|
3
|
-
* This file was automatically generated.
|
|
4
|
-
* DO NOT MODIFY IT BY HAND. Regenerate with `just generate-types` or
|
|
5
|
-
* `qontinui-runner/src-tauri/scripts/generate_types.sh`.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Events emitted during flow execution for UI updates.
|
|
10
|
-
*
|
|
11
|
-
* Internally tagged with `"type"` and snake_case variant names.
|
|
12
|
-
*/
|
|
13
|
-
export type FlowEvent =
|
|
14
|
-
| {
|
|
15
|
-
flow_id: string;
|
|
16
|
-
flow_name: string;
|
|
17
|
-
instance_id: string;
|
|
18
|
-
type: "flow_started";
|
|
19
|
-
[k: string]: unknown;
|
|
20
|
-
}
|
|
21
|
-
| {
|
|
22
|
-
instance_id: string;
|
|
23
|
-
step_id: string;
|
|
24
|
-
step_name: string;
|
|
25
|
-
step_type: string;
|
|
26
|
-
type: "step_started";
|
|
27
|
-
[k: string]: unknown;
|
|
28
|
-
}
|
|
29
|
-
| {
|
|
30
|
-
duration_ms: number;
|
|
31
|
-
error?: string | null;
|
|
32
|
-
instance_id: string;
|
|
33
|
-
outputs: {
|
|
34
|
-
[k: string]: unknown;
|
|
35
|
-
};
|
|
36
|
-
step_id: string;
|
|
37
|
-
success: boolean;
|
|
38
|
-
type: "step_completed";
|
|
39
|
-
[k: string]: unknown;
|
|
40
|
-
}
|
|
41
|
-
| {
|
|
42
|
-
duration_ms: number;
|
|
43
|
-
error?: string | null;
|
|
44
|
-
flow_id: string;
|
|
45
|
-
instance_id: string;
|
|
46
|
-
success: boolean;
|
|
47
|
-
total_steps: number;
|
|
48
|
-
type: "flow_completed";
|
|
49
|
-
[k: string]: unknown;
|
|
50
|
-
}
|
|
51
|
-
| {
|
|
52
|
-
instance_id: string;
|
|
53
|
-
options: string[];
|
|
54
|
-
prompt: string;
|
|
55
|
-
step_id: string;
|
|
56
|
-
type: "waiting_for_input";
|
|
57
|
-
[k: string]: unknown;
|
|
58
|
-
}
|
|
59
|
-
| {
|
|
60
|
-
completed: number;
|
|
61
|
-
instance_id: string;
|
|
62
|
-
step_id: string;
|
|
63
|
-
total: number;
|
|
64
|
-
type: "parallel_progress";
|
|
65
|
-
[k: string]: unknown;
|
|
66
|
-
}
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/**
|
|
3
|
+
* This file was automatically generated.
|
|
4
|
+
* DO NOT MODIFY IT BY HAND. Regenerate with `just generate-types` or
|
|
5
|
+
* `qontinui-runner/src-tauri/scripts/generate_types.sh`.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Events emitted during flow execution for UI updates.
|
|
10
|
+
*
|
|
11
|
+
* Internally tagged with `"type"` and snake_case variant names.
|
|
12
|
+
*/
|
|
13
|
+
export type FlowEvent =
|
|
14
|
+
| {
|
|
15
|
+
flow_id: string;
|
|
16
|
+
flow_name: string;
|
|
17
|
+
instance_id: string;
|
|
18
|
+
type: "flow_started";
|
|
19
|
+
[k: string]: unknown;
|
|
20
|
+
}
|
|
21
|
+
| {
|
|
22
|
+
instance_id: string;
|
|
23
|
+
step_id: string;
|
|
24
|
+
step_name: string;
|
|
25
|
+
step_type: string;
|
|
26
|
+
type: "step_started";
|
|
27
|
+
[k: string]: unknown;
|
|
28
|
+
}
|
|
29
|
+
| {
|
|
30
|
+
duration_ms: number;
|
|
31
|
+
error?: string | null;
|
|
32
|
+
instance_id: string;
|
|
33
|
+
outputs: {
|
|
34
|
+
[k: string]: unknown;
|
|
35
|
+
};
|
|
36
|
+
step_id: string;
|
|
37
|
+
success: boolean;
|
|
38
|
+
type: "step_completed";
|
|
39
|
+
[k: string]: unknown;
|
|
40
|
+
}
|
|
41
|
+
| {
|
|
42
|
+
duration_ms: number;
|
|
43
|
+
error?: string | null;
|
|
44
|
+
flow_id: string;
|
|
45
|
+
instance_id: string;
|
|
46
|
+
success: boolean;
|
|
47
|
+
total_steps: number;
|
|
48
|
+
type: "flow_completed";
|
|
49
|
+
[k: string]: unknown;
|
|
50
|
+
}
|
|
51
|
+
| {
|
|
52
|
+
instance_id: string;
|
|
53
|
+
options: string[];
|
|
54
|
+
prompt: string;
|
|
55
|
+
step_id: string;
|
|
56
|
+
type: "waiting_for_input";
|
|
57
|
+
[k: string]: unknown;
|
|
58
|
+
}
|
|
59
|
+
| {
|
|
60
|
+
completed: number;
|
|
61
|
+
instance_id: string;
|
|
62
|
+
step_id: string;
|
|
63
|
+
total: number;
|
|
64
|
+
type: "parallel_progress";
|
|
65
|
+
[k: string]: unknown;
|
|
66
|
+
}
|
|
67
|
+
| {
|
|
68
|
+
flow_id: string;
|
|
69
|
+
instance_id: string;
|
|
70
|
+
/**
|
|
71
|
+
* Step the flow was paused at (`null` if no current step).
|
|
72
|
+
*/
|
|
73
|
+
step_id?: string | null;
|
|
74
|
+
type: "flow_paused";
|
|
75
|
+
[k: string]: unknown;
|
|
76
|
+
}
|
|
77
|
+
| {
|
|
78
|
+
flow_id: string;
|
|
79
|
+
instance_id: string;
|
|
80
|
+
/**
|
|
81
|
+
* Step execution will resume from (`null` if no current step).
|
|
82
|
+
*/
|
|
83
|
+
step_id?: string | null;
|
|
84
|
+
type: "flow_resumed";
|
|
85
|
+
[k: string]: unknown;
|
|
86
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/**
|
|
3
|
+
* This file was automatically generated.
|
|
4
|
+
* DO NOT MODIFY IT BY HAND. Regenerate with `just generate-types` or
|
|
5
|
+
* `qontinui-runner/src-tauri/scripts/generate_types.sh`.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Payload shape for the `review-approved` and `review-rejected` Tauri events
|
|
10
|
+
* emitted by `commands::productivity::approve_recommendation` /
|
|
11
|
+
* `reject_recommendation` after a user resolves a medium-confidence
|
|
12
|
+
* recommendation card. Field names are explicit camelCase to match the
|
|
13
|
+
* `serde_json::json!()` literal previously used at the emit site.
|
|
14
|
+
*
|
|
15
|
+
* Single struct shared by both channels: only `user_decision` differs
|
|
16
|
+
* (`"approved"` vs `"rejected"`), so a tagged enum would inflate the wire
|
|
17
|
+
* format without payoff.
|
|
18
|
+
*/
|
|
19
|
+
export interface RecommendationReviewDecisionPayload {
|
|
20
|
+
reviewId: string;
|
|
21
|
+
taskId: string;
|
|
22
|
+
userDecision: string;
|
|
23
|
+
[k: string]: unknown;
|
|
24
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/**
|
|
3
|
+
* This file was automatically generated.
|
|
4
|
+
* DO NOT MODIFY IT BY HAND. Regenerate with `just generate-types` or
|
|
5
|
+
* `qontinui-runner/src-tauri/scripts/generate_types.sh`.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Wire-format runner shape carried inside `runner_connected.connection`.
|
|
10
|
+
*
|
|
11
|
+
* This is intentionally a partial Runner payload (snake_case, only the
|
|
12
|
+
* fields the Python emitter actually populates in
|
|
13
|
+
* `RunnerEventPublisher.publish_runner_connected`). It is NOT
|
|
14
|
+
* `qontinui_types::runner::Runner` — that shape requires `derived_status`,
|
|
15
|
+
* `capabilities`, `created_at` etc., which the connection payload doesn't
|
|
16
|
+
* include. Consumers reading this should refetch the canonical Runner row
|
|
17
|
+
* via REST after seeing `runner_connected`.
|
|
18
|
+
*/
|
|
19
|
+
export interface RunnerConnectedConnection {
|
|
20
|
+
connected_at?: string | null;
|
|
21
|
+
/**
|
|
22
|
+
* Always present as `null` on the wire when the runner is still
|
|
23
|
+
* connected. Python ships this field unconditionally.
|
|
24
|
+
*/
|
|
25
|
+
disconnected_at?: string | null;
|
|
26
|
+
duration_seconds?: number | null;
|
|
27
|
+
id: string;
|
|
28
|
+
ip_address?: string | null;
|
|
29
|
+
project_id?: string | null;
|
|
30
|
+
runner_name?: string | null;
|
|
31
|
+
runner_port?: number | null;
|
|
32
|
+
ws_connected: boolean;
|
|
33
|
+
[k: string]: unknown;
|
|
34
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/**
|
|
3
|
+
* This file was automatically generated.
|
|
4
|
+
* DO NOT MODIFY IT BY HAND. Regenerate with `just generate-types` or
|
|
5
|
+
* `qontinui-runner/src-tauri/scripts/generate_types.sh`.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import type { RunnerFindingCodeContext } from './RunnerFindingCodeContext';
|
|
9
|
+
import type { RunnerFindingUserInput } from './RunnerFindingUserInput';
|
|
10
|
+
import type { TaskRunFindingActionType } from './TaskRunFindingActionType';
|
|
11
|
+
import type { TaskRunFindingCategory } from './TaskRunFindingCategory';
|
|
12
|
+
import type { TaskRunFindingSeverity } from './TaskRunFindingSeverity';
|
|
13
|
+
import type { TaskRunFindingStatus } from './TaskRunFindingStatus';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* A finding detected by AI analysis (runner-local wire shape).
|
|
17
|
+
*
|
|
18
|
+
* Wire format: serialized via `#[serde(rename_all = "camelCase")]` so all
|
|
19
|
+
* snake_case Rust field names ship as camelCase on the Tauri event channels
|
|
20
|
+
* `finding_detected` and `finding_resolved`. The frontend listener in
|
|
21
|
+
* `services/TauriFindingsListener.ts` MUST read these fields by their
|
|
22
|
+
* camelCase names — reading snake_case silently evaluates to `undefined`.
|
|
23
|
+
*
|
|
24
|
+
* Renamed in the schema registry to `RunnerFinding` to disambiguate from
|
|
25
|
+
* `qontinui_types::verification::Finding`, which has a different shape
|
|
26
|
+
* (`confidence`, `findingType`, `evidence` vs this struct's flat fields).
|
|
27
|
+
*/
|
|
28
|
+
export interface RunnerFinding {
|
|
29
|
+
actionType: TaskRunFindingActionType;
|
|
30
|
+
categoryId: TaskRunFindingCategory;
|
|
31
|
+
codeContext?: RunnerFindingCodeContext | null;
|
|
32
|
+
description: string;
|
|
33
|
+
detectedAt: string;
|
|
34
|
+
id: string;
|
|
35
|
+
resolution?: string | null;
|
|
36
|
+
resolvedAt?: string | null;
|
|
37
|
+
resolvedInSession?: number | null;
|
|
38
|
+
sessionNum: number;
|
|
39
|
+
severity: TaskRunFindingSeverity;
|
|
40
|
+
signatureHash: string;
|
|
41
|
+
status: TaskRunFindingStatus;
|
|
42
|
+
taskRunId: string;
|
|
43
|
+
title: string;
|
|
44
|
+
updatedAt: string;
|
|
45
|
+
userInput?: RunnerFindingUserInput | null;
|
|
46
|
+
userResponse?: string | null;
|
|
47
|
+
[k: string]: unknown;
|
|
48
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/**
|
|
3
|
+
* This file was automatically generated.
|
|
4
|
+
* DO NOT MODIFY IT BY HAND. Regenerate with `just generate-types` or
|
|
5
|
+
* `qontinui-runner/src-tauri/scripts/generate_types.sh`.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Code context for a finding (runner-local wire shape).
|
|
10
|
+
*
|
|
11
|
+
* Renamed in the schema registry to `RunnerFindingCodeContext` to
|
|
12
|
+
* disambiguate from `qontinui_types::findings::FindingCodeContext`.
|
|
13
|
+
*/
|
|
14
|
+
export interface RunnerFindingCodeContext {
|
|
15
|
+
column?: number | null;
|
|
16
|
+
file?: string | null;
|
|
17
|
+
line?: number | null;
|
|
18
|
+
snippet?: string | null;
|
|
19
|
+
[k: string]: unknown;
|
|
20
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/**
|
|
3
|
+
* This file was automatically generated.
|
|
4
|
+
* DO NOT MODIFY IT BY HAND. Regenerate with `just generate-types` or
|
|
5
|
+
* `qontinui-runner/src-tauri/scripts/generate_types.sh`.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* User input request for a finding (runner-local wire shape).
|
|
10
|
+
*
|
|
11
|
+
* Renamed in the schema registry to `RunnerFindingUserInput` to
|
|
12
|
+
* disambiguate from `qontinui_types::findings::FindingUserInput`.
|
|
13
|
+
*/
|
|
14
|
+
export interface RunnerFindingUserInput {
|
|
15
|
+
input_type: string;
|
|
16
|
+
options?: string[] | null;
|
|
17
|
+
question: string;
|
|
18
|
+
[k: string]: unknown;
|
|
19
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/**
|
|
3
|
+
* This file was automatically generated.
|
|
4
|
+
* DO NOT MODIFY IT BY HAND. Regenerate with `just generate-types` or
|
|
5
|
+
* `qontinui-runner/src-tauri/scripts/generate_types.sh`.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Discriminated union of every WS envelope `mcp/backend_relay.rs::handle_outbound`
|
|
10
|
+
* ships to the backend after rewrapping a Tauri-side `AppEvent`.
|
|
11
|
+
*
|
|
12
|
+
* Internally tagged on `"type"` with snake_case variant names because that's
|
|
13
|
+
* what the prior `serde_json::json!` literals emitted on the wire.
|
|
14
|
+
*
|
|
15
|
+
* Wire keys are snake_case (NOT camelCase) — verified against the literal
|
|
16
|
+
* strings in `handle_outbound` lines ~605-638. Consumers that expect
|
|
17
|
+
* camelCase (e.g. some web hooks) are wrong; the relay never emitted
|
|
18
|
+
* camelCase here.
|
|
19
|
+
*/
|
|
20
|
+
export type RunnerRelayMessage =
|
|
21
|
+
| {
|
|
22
|
+
data: {
|
|
23
|
+
[k: string]: unknown;
|
|
24
|
+
};
|
|
25
|
+
type: "phase_completed";
|
|
26
|
+
[k: string]: unknown;
|
|
27
|
+
}
|
|
28
|
+
| {
|
|
29
|
+
data: {
|
|
30
|
+
[k: string]: unknown;
|
|
31
|
+
};
|
|
32
|
+
type: "ui_error";
|
|
33
|
+
[k: string]: unknown;
|
|
34
|
+
}
|
|
35
|
+
| {
|
|
36
|
+
data: {
|
|
37
|
+
[k: string]: unknown;
|
|
38
|
+
};
|
|
39
|
+
type: "recent_crash";
|
|
40
|
+
[k: string]: unknown;
|
|
41
|
+
}
|
|
42
|
+
| {
|
|
43
|
+
data: {
|
|
44
|
+
[k: string]: unknown;
|
|
45
|
+
};
|
|
46
|
+
type: "chat_response";
|
|
47
|
+
[k: string]: unknown;
|
|
48
|
+
}
|
|
49
|
+
| {
|
|
50
|
+
data: {
|
|
51
|
+
[k: string]: unknown;
|
|
52
|
+
};
|
|
53
|
+
type: "chat_session_state";
|
|
54
|
+
[k: string]: unknown;
|
|
55
|
+
}
|
|
56
|
+
| {
|
|
57
|
+
data: {
|
|
58
|
+
[k: string]: unknown;
|
|
59
|
+
};
|
|
60
|
+
terminal_id: {
|
|
61
|
+
[k: string]: unknown;
|
|
62
|
+
};
|
|
63
|
+
type: "terminal_output";
|
|
64
|
+
[k: string]: unknown;
|
|
65
|
+
}
|
|
66
|
+
| {
|
|
67
|
+
exit_code: {
|
|
68
|
+
[k: string]: unknown;
|
|
69
|
+
};
|
|
70
|
+
terminal_id: {
|
|
71
|
+
[k: string]: unknown;
|
|
72
|
+
};
|
|
73
|
+
type: "terminal_exit";
|
|
74
|
+
[k: string]: unknown;
|
|
75
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/**
|
|
3
|
+
* This file was automatically generated.
|
|
4
|
+
* DO NOT MODIFY IT BY HAND. Regenerate with `just generate-types` or
|
|
5
|
+
* `qontinui-runner/src-tauri/scripts/generate_types.sh`.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import type { RunnerConnectedConnection } from './RunnerConnectedConnection';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Discriminated union of every event the Python backend pushes to the web
|
|
12
|
+
* client over the `/api/v1/runners/status` WebSocket.
|
|
13
|
+
*
|
|
14
|
+
* Internally tagged on `"type"` matching the Python wire format. Variant
|
|
15
|
+
* renames (`runner.woke` keeps the dot rather than going to snake_case)
|
|
16
|
+
* preserve the literal strings the emitter sends.
|
|
17
|
+
*
|
|
18
|
+
* Source of truth: the `publish_*` methods in
|
|
19
|
+
* `qontinui-web/backend/app/services/runner/event_publisher.py` and the
|
|
20
|
+
* `initial_state` send in `runner_status_ws.py`.
|
|
21
|
+
*/
|
|
22
|
+
export type RunnerStatusEvent =
|
|
23
|
+
| {
|
|
24
|
+
runners: unknown[];
|
|
25
|
+
type: "initial_state";
|
|
26
|
+
[k: string]: unknown;
|
|
27
|
+
}
|
|
28
|
+
| {
|
|
29
|
+
connection: RunnerConnectedConnection;
|
|
30
|
+
timestamp: string;
|
|
31
|
+
type: "runner_connected";
|
|
32
|
+
[k: string]: unknown;
|
|
33
|
+
}
|
|
34
|
+
| {
|
|
35
|
+
runner_id: string;
|
|
36
|
+
timestamp: string;
|
|
37
|
+
type: "runner_disconnected";
|
|
38
|
+
[k: string]: unknown;
|
|
39
|
+
}
|
|
40
|
+
| {
|
|
41
|
+
runner_id: string;
|
|
42
|
+
runner_name: string;
|
|
43
|
+
timestamp: string;
|
|
44
|
+
type: "runner_name_updated";
|
|
45
|
+
[k: string]: unknown;
|
|
46
|
+
}
|
|
47
|
+
| {
|
|
48
|
+
runner_id: string;
|
|
49
|
+
runner_port: number;
|
|
50
|
+
timestamp: string;
|
|
51
|
+
type: "runner_port_updated";
|
|
52
|
+
[k: string]: unknown;
|
|
53
|
+
}
|
|
54
|
+
| {
|
|
55
|
+
intent_id?: string | null;
|
|
56
|
+
reason?: string | null;
|
|
57
|
+
runner_id: string;
|
|
58
|
+
task_id?: string | null;
|
|
59
|
+
timestamp: string;
|
|
60
|
+
type: "runner.woke";
|
|
61
|
+
[k: string]: unknown;
|
|
62
|
+
}
|
|
63
|
+
| {
|
|
64
|
+
error: string;
|
|
65
|
+
type: "error";
|
|
66
|
+
[k: string]: unknown;
|
|
67
|
+
};
|