@qontinui/shared-types 0.3.0 → 0.5.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.
package/dist/index.d.ts CHANGED
@@ -966,6 +966,192 @@ declare function toDiscoveredState(data: unknown): DiscoveredState;
966
966
  declare function toDiscoveredTransition(data: unknown): DiscoveredTransition;
967
967
  declare function toStateDiscoveryResultSummary(data: Record<string, unknown>): StateDiscoveryResultSummary;
968
968
 
969
+ /* eslint-disable */
970
+ /**
971
+ * This file was automatically generated.
972
+ * DO NOT MODIFY IT BY HAND. Regenerate with `just generate-types` or
973
+ * `qontinui-runner/src-tauri/scripts/generate_types.sh`.
974
+ */
975
+
976
+ /**
977
+ * `POST /coord/memory/upsert` body. `name` + `content` are the only
978
+ * required fields; the rest is optional metadata.
979
+ *
980
+ * UUID fields (`written_by_agent`, `written_by_device`) are `String` on
981
+ * the wire; coord parses them with `Uuid::parse_str` and returns 400
982
+ * on parse failure.
983
+ */
984
+ interface MemoryUpsertRequest {
985
+ content: string;
986
+ description?: string | null;
987
+ name: string;
988
+ type?: string | null;
989
+ written_by_agent?: string | null;
990
+ written_by_device?: string | null;
991
+ [k: string]: unknown;
992
+ }
993
+
994
+ /* eslint-disable */
995
+ /**
996
+ * This file was automatically generated.
997
+ * DO NOT MODIFY IT BY HAND. Regenerate with `just generate-types` or
998
+ * `qontinui-runner/src-tauri/scripts/generate_types.sh`.
999
+ */
1000
+
1001
+ /**
1002
+ * `POST /coord/memory/upsert` response.
1003
+ */
1004
+ interface MemoryUpsertResponse {
1005
+ memory_id: string;
1006
+ name: string;
1007
+ version: number;
1008
+ [k: string]: unknown;
1009
+ }
1010
+
1011
+ /* eslint-disable */
1012
+ /**
1013
+ * This file was automatically generated.
1014
+ * DO NOT MODIFY IT BY HAND. Regenerate with `just generate-types` or
1015
+ * `qontinui-runner/src-tauri/scripts/generate_types.sh`.
1016
+ */
1017
+
1018
+ /**
1019
+ * `POST /coord/memory/:name/restore` body.
1020
+ */
1021
+ interface MemoryRestoreRequest {
1022
+ version: number;
1023
+ written_by_agent?: string | null;
1024
+ written_by_device?: string | null;
1025
+ [k: string]: unknown;
1026
+ }
1027
+
1028
+ /* eslint-disable */
1029
+ /**
1030
+ * This file was automatically generated.
1031
+ * DO NOT MODIFY IT BY HAND. Regenerate with `just generate-types` or
1032
+ * `qontinui-runner/src-tauri/scripts/generate_types.sh`.
1033
+ */
1034
+
1035
+ /**
1036
+ * `GET /coord/memory/list` query string.
1037
+ */
1038
+ interface MemoryListQuery {
1039
+ limit?: number | null;
1040
+ name_prefix?: string | null;
1041
+ type?: string | null;
1042
+ [k: string]: unknown;
1043
+ }
1044
+
1045
+ /* eslint-disable */
1046
+ /**
1047
+ * This file was automatically generated.
1048
+ * DO NOT MODIFY IT BY HAND. Regenerate with `just generate-types` or
1049
+ * `qontinui-runner/src-tauri/scripts/generate_types.sh`.
1050
+ */
1051
+
1052
+ /**
1053
+ * One row in `coord.memories`. Returned by `GET /coord/memory/:name`
1054
+ * (as the `latest` field of `MemoryWithHistory` + each `history` entry)
1055
+ * and by `GET /coord/memory/:name/version/:version`.
1056
+ */
1057
+ interface MemoryRow {
1058
+ content: string;
1059
+ description?: string | null;
1060
+ is_tombstone: boolean;
1061
+ memory_id: string;
1062
+ name: string;
1063
+ type?: string | null;
1064
+ version: number;
1065
+ /**
1066
+ * ISO 8601 timestamp (RFC 3339).
1067
+ */
1068
+ written_at: string;
1069
+ written_by_agent?: string | null;
1070
+ written_by_device?: string | null;
1071
+ [k: string]: unknown;
1072
+ }
1073
+
1074
+ /* eslint-disable */
1075
+ /**
1076
+ * This file was automatically generated.
1077
+ * DO NOT MODIFY IT BY HAND. Regenerate with `just generate-types` or
1078
+ * `qontinui-runner/src-tauri/scripts/generate_types.sh`.
1079
+ */
1080
+
1081
+ /**
1082
+ * Lighter-weight projection for `/coord/memory/list` — strips the
1083
+ * (potentially-large) `content` blob so a list-all-memories scan stays
1084
+ * cheap. Fetch full payload via `GET /coord/memory/:name`.
1085
+ */
1086
+ interface MemorySummary {
1087
+ description?: string | null;
1088
+ name: string;
1089
+ type?: string | null;
1090
+ version: number;
1091
+ /**
1092
+ * ISO 8601 timestamp (RFC 3339).
1093
+ */
1094
+ written_at: string;
1095
+ [k: string]: unknown;
1096
+ }
1097
+
1098
+ /* eslint-disable */
1099
+ /**
1100
+ * This file was automatically generated.
1101
+ * DO NOT MODIFY IT BY HAND. Regenerate with `just generate-types` or
1102
+ * `qontinui-runner/src-tauri/scripts/generate_types.sh`.
1103
+ */
1104
+
1105
+
1106
+
1107
+ /**
1108
+ * `GET /coord/memory/:name` response — latest row + the 10
1109
+ * most-recent versions (DESC). The first entry of `history` is the
1110
+ * same row as `latest`; subsequent entries are prior versions
1111
+ * (including tombstones, so the dashboard can render "deleted at v3
1112
+ * then restored at v4").
1113
+ *
1114
+ * `latest` is flattened on the wire — the response object's top-level
1115
+ * fields are the `MemoryRow` columns plus a `history` array.
1116
+ */
1117
+ interface MemoryWithHistory {
1118
+ content: string;
1119
+ description?: string | null;
1120
+ history: MemoryRow[];
1121
+ is_tombstone: boolean;
1122
+ memory_id: string;
1123
+ name: string;
1124
+ type?: string | null;
1125
+ version: number;
1126
+ /**
1127
+ * ISO 8601 timestamp (RFC 3339).
1128
+ */
1129
+ written_at: string;
1130
+ written_by_agent?: string | null;
1131
+ written_by_device?: string | null;
1132
+ [k: string]: unknown;
1133
+ }
1134
+
1135
+ /* eslint-disable */
1136
+ /**
1137
+ * This file was automatically generated.
1138
+ * DO NOT MODIFY IT BY HAND. Regenerate with `just generate-types` or
1139
+ * `qontinui-runner/src-tauri/scripts/generate_types.sh`.
1140
+ */
1141
+
1142
+
1143
+
1144
+ /**
1145
+ * `GET /coord/memory/list` response envelope. Wrapped in a struct
1146
+ * (rather than a bare `Vec<MemorySummary>`) so the generated TS / Python
1147
+ * schemas get a named exported interface rather than an anonymous array
1148
+ * alias.
1149
+ */
1150
+ interface MemoryListResponse {
1151
+ items: MemorySummary[];
1152
+ [k: string]: unknown;
1153
+ }
1154
+
969
1155
  /**
970
1156
  * Canvas Types
971
1157
  *
@@ -1365,4 +1551,4 @@ declare const DETECTION_METHODS: {
1365
1551
  label: string;
1366
1552
  }[];
1367
1553
 
1368
- export { type AcceptanceCriteriaData, type AlertData, type CanvasComponentType, type CanvasPanel, type CanvasUpdateEvent, type ChecklistData, type CodeDiffData, type ComponentRenderLogEntry, type CostBreakdownData, type CreateKnownIssueRequest, type CreatePatternTemplateRequest, type CreateRenderLogRequest, DETECTION_METHODS, type DependencyGraphData, type DetectionMethod, type DiscoveredState, type DiscoveredStateImage, type DiscoveredTransition, type DiscoveryBoundingBox, type DiscoverySourceType, type DiscoveryTransitionTrigger, type DomElementSnapshot, type DomMutationType, type DomSnapshot, type DomSnapshotRenderLogEntry, type ElementRect, type FileTreeData, type FindingListData, type FormSnapshot, ISSUE_CATEGORIES, ISSUE_SEVERITIES, type ImageSnapshot, type IssueCategory, type IssuePatternTemplate, type IssueProvenance, type IssueStatus, type IterationComparisonData, type KeyValueData, type KnownIssue, type KnownIssueSeverity, type LinkSnapshot, type ListKnownIssuesQuery, type MarkdownData, type MissionBriefData, type PhaseDistributionData, type PhaseTimelineData, type ProgressChartData, type ProposalStatus, type RenderLogEntry, type RenderLogEntryBase, type RenderLogList, type RenderLogResponse, type RenderLogStats, type RenderLogSummary, type RenderLogTrigger, SOURCE_TYPE_COLORS, SOURCE_TYPE_LABELS, type ScopeType, type SparklineData, type SpecValidation, type StateDiscoveryResult, type StateDiscoveryResultCreate, type StateDiscoveryResultListResponse, type StateDiscoveryResultSummary, type StateDiscoveryResultUpdate, type StateMachineExport, type StateMachineImport, type StateTimelineData, type StepDurationChartData, type SummaryStatsData, type TableData, type TemplateParameter, type TerminalData, type TimelineData, type TransitionTriggerType, type UpdateKnownIssueRequest, type WaffleChartData, type WaterfallData, isComponentRenderLog, isDomSnapshotRenderLog, toDiscoveredState, toDiscoveredStateImage, toDiscoveredTransition, toStateDiscoveryResult, toStateDiscoveryResultSummary };
1554
+ export { type AcceptanceCriteriaData, type AlertData, type CanvasComponentType, type CanvasPanel, type CanvasUpdateEvent, type ChecklistData, type CodeDiffData, type ComponentRenderLogEntry, type CostBreakdownData, type CreateKnownIssueRequest, type CreatePatternTemplateRequest, type CreateRenderLogRequest, DETECTION_METHODS, type DependencyGraphData, type DetectionMethod, type DiscoveredState, type DiscoveredStateImage, type DiscoveredTransition, type DiscoveryBoundingBox, type DiscoverySourceType, type DiscoveryTransitionTrigger, type DomElementSnapshot, type DomMutationType, type DomSnapshot, type DomSnapshotRenderLogEntry, type ElementRect, type FileTreeData, type FindingListData, type FormSnapshot, ISSUE_CATEGORIES, ISSUE_SEVERITIES, type ImageSnapshot, type IssueCategory, type IssuePatternTemplate, type IssueProvenance, type IssueStatus, type IterationComparisonData, type KeyValueData, type KnownIssue, type KnownIssueSeverity, type LinkSnapshot, type ListKnownIssuesQuery, type MarkdownData, type MemoryListQuery, type MemoryListResponse, type MemoryRestoreRequest, type MemoryRow, type MemorySummary, type MemoryUpsertRequest, type MemoryUpsertResponse, type MemoryWithHistory, type MissionBriefData, type PhaseDistributionData, type PhaseTimelineData, type ProgressChartData, type ProposalStatus, type RenderLogEntry, type RenderLogEntryBase, type RenderLogList, type RenderLogResponse, type RenderLogStats, type RenderLogSummary, type RenderLogTrigger, SOURCE_TYPE_COLORS, SOURCE_TYPE_LABELS, type ScopeType, type SparklineData, type SpecValidation, type StateDiscoveryResult, type StateDiscoveryResultCreate, type StateDiscoveryResultListResponse, type StateDiscoveryResultSummary, type StateDiscoveryResultUpdate, type StateMachineExport, type StateMachineImport, type StateTimelineData, type StepDurationChartData, type SummaryStatsData, type TableData, type TemplateParameter, type TerminalData, type TimelineData, type TransitionTriggerType, type UpdateKnownIssueRequest, type WaffleChartData, type WaterfallData, isComponentRenderLog, isDomSnapshotRenderLog, toDiscoveredState, toDiscoveredStateImage, toDiscoveredTransition, toStateDiscoveryResult, toStateDiscoveryResultSummary };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qontinui/shared-types",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "description": "Shared TypeScript types for the Qontinui ecosystem",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -0,0 +1,16 @@
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
+ export interface App {
9
+ appId: string;
10
+ createdAtMs: number;
11
+ displayName: string;
12
+ lastSeenAtMs: number;
13
+ repoRoot: string;
14
+ uiBridgeUrl: string;
15
+ [k: string]: unknown;
16
+ }
@@ -0,0 +1,33 @@
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
+ * Failure modes for app-registry operations. Mirrors the
10
+ * `responses::SpecError` tagged-enum pattern in
11
+ * `qontinui-runner/src-tauri/src/spec_api/responses.rs`.
12
+ */
13
+ export type AppError =
14
+ | {
15
+ app_id: string;
16
+ reason: "not-registered";
17
+ [k: string]: unknown;
18
+ }
19
+ | {
20
+ app_id: string;
21
+ reason: "invalid-app-id";
22
+ [k: string]: unknown;
23
+ }
24
+ | {
25
+ reason: "invalid-repo-root";
26
+ repo_root: string;
27
+ [k: string]: unknown;
28
+ }
29
+ | {
30
+ app_id: string;
31
+ reason: "already-registered";
32
+ [k: string]: unknown;
33
+ };
@@ -0,0 +1,14 @@
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 { App } from './App';
9
+
10
+ export interface AppListResponse {
11
+ apps: App[];
12
+ ok: boolean;
13
+ [k: string]: unknown;
14
+ }
@@ -8,6 +8,23 @@
8
8
  import type { ProposalStatus } from './ProposalStatus';
9
9
 
10
10
  export interface IrProvenance {
11
+ /**
12
+ * Owning app id (slug). Multi-tenant Spec API contract: every IR
13
+ * document is self-describing about which registered app it belongs
14
+ * to. `#[serde(default)]` allows pre-multi-app on-disk IRs (no
15
+ * `app_id` field) to deserialize as empty string; handlers and the
16
+ * `POST /apps/<id>/spec/author` adapter validate non-empty and fill
17
+ * from the URL path on read (Stream C safety-net). Stream F's bulk
18
+ * backfill rewrites every on-disk IR so empty values don't persist.
19
+ * TS / Python codegen promote serde defaults to required per the
20
+ * `qontinui-schemas` project convention.
21
+ *
22
+ * `skip_serializing_if = "String::is_empty"` preserves byte-identical
23
+ * round-trip for pre-multi-app on-disk IRs that lack the field.
24
+ * Post-Stream-F backfill, every IR has a non-empty `app_id` so the
25
+ * skip never fires.
26
+ */
27
+ appId?: string;
11
28
  column?: number | null;
12
29
  file?: string | null;
13
30
  line?: number | null;
@@ -0,0 +1,16 @@
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
+ * `GET /coord/memory/list` query string.
10
+ */
11
+ export interface MemoryListQuery {
12
+ limit?: number | null;
13
+ name_prefix?: string | null;
14
+ type?: string | null;
15
+ [k: string]: unknown;
16
+ }
@@ -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
+ import type { MemorySummary } from './MemorySummary';
9
+
10
+ /**
11
+ * `GET /coord/memory/list` response envelope. Wrapped in a struct
12
+ * (rather than a bare `Vec<MemorySummary>`) so the generated TS / Python
13
+ * schemas get a named exported interface rather than an anonymous array
14
+ * alias.
15
+ */
16
+ export interface MemoryListResponse {
17
+ items: MemorySummary[];
18
+ [k: string]: unknown;
19
+ }
@@ -0,0 +1,16 @@
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
+ * `POST /coord/memory/:name/restore` body.
10
+ */
11
+ export interface MemoryRestoreRequest {
12
+ version: number;
13
+ written_by_agent?: string | null;
14
+ written_by_device?: string | null;
15
+ [k: string]: unknown;
16
+ }
@@ -0,0 +1,28 @@
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
+ * One row in `coord.memories`. Returned by `GET /coord/memory/:name`
10
+ * (as the `latest` field of `MemoryWithHistory` + each `history` entry)
11
+ * and by `GET /coord/memory/:name/version/:version`.
12
+ */
13
+ export interface MemoryRow {
14
+ content: string;
15
+ description?: string | null;
16
+ is_tombstone: boolean;
17
+ memory_id: string;
18
+ name: string;
19
+ type?: string | null;
20
+ version: number;
21
+ /**
22
+ * ISO 8601 timestamp (RFC 3339).
23
+ */
24
+ written_at: string;
25
+ written_by_agent?: string | null;
26
+ written_by_device?: string | null;
27
+ [k: string]: unknown;
28
+ }
@@ -0,0 +1,23 @@
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
+ * Lighter-weight projection for `/coord/memory/list` — strips the
10
+ * (potentially-large) `content` blob so a list-all-memories scan stays
11
+ * cheap. Fetch full payload via `GET /coord/memory/:name`.
12
+ */
13
+ export interface MemorySummary {
14
+ description?: string | null;
15
+ name: string;
16
+ type?: string | null;
17
+ version: number;
18
+ /**
19
+ * ISO 8601 timestamp (RFC 3339).
20
+ */
21
+ written_at: string;
22
+ [k: string]: unknown;
23
+ }
@@ -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
+ * `POST /coord/memory/upsert` body. `name` + `content` are the only
10
+ * required fields; the rest is optional metadata.
11
+ *
12
+ * UUID fields (`written_by_agent`, `written_by_device`) are `String` on
13
+ * the wire; coord parses them with `Uuid::parse_str` and returns 400
14
+ * on parse failure.
15
+ */
16
+ export interface MemoryUpsertRequest {
17
+ content: string;
18
+ description?: string | null;
19
+ name: string;
20
+ type?: string | null;
21
+ written_by_agent?: string | null;
22
+ written_by_device?: string | null;
23
+ [k: string]: unknown;
24
+ }
@@ -0,0 +1,16 @@
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
+ * `POST /coord/memory/upsert` response.
10
+ */
11
+ export interface MemoryUpsertResponse {
12
+ memory_id: string;
13
+ name: string;
14
+ version: number;
15
+ [k: string]: unknown;
16
+ }
@@ -0,0 +1,36 @@
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 { MemoryRow } from './MemoryRow';
9
+
10
+ /**
11
+ * `GET /coord/memory/:name` response — latest row + the 10
12
+ * most-recent versions (DESC). The first entry of `history` is the
13
+ * same row as `latest`; subsequent entries are prior versions
14
+ * (including tombstones, so the dashboard can render "deleted at v3
15
+ * then restored at v4").
16
+ *
17
+ * `latest` is flattened on the wire — the response object's top-level
18
+ * fields are the `MemoryRow` columns plus a `history` array.
19
+ */
20
+ export interface MemoryWithHistory {
21
+ content: string;
22
+ description?: string | null;
23
+ history: MemoryRow[];
24
+ is_tombstone: boolean;
25
+ memory_id: string;
26
+ name: string;
27
+ type?: string | null;
28
+ version: number;
29
+ /**
30
+ * ISO 8601 timestamp (RFC 3339).
31
+ */
32
+ written_at: string;
33
+ written_by_agent?: string | null;
34
+ written_by_device?: string | null;
35
+ [k: string]: unknown;
36
+ }
@@ -5,13 +5,13 @@
5
5
  * `qontinui-runner/src-tauri/scripts/generate_types.sh`.
6
6
  */
7
7
 
8
- import type { Confidence } from './Confidence';
8
+ import type { SpecCheckConfidence } from './SpecCheckConfidence';
9
9
 
10
10
  /**
11
11
  * The single state the matcher recommends the caller treat as "current".
12
12
  */
13
13
  export interface RecommendedState {
14
- confidence: Confidence;
14
+ confidence: SpecCheckConfidence;
15
15
  /**
16
16
  * Free-form explanation (e.g. "highest match rate among all states").
17
17
  */
@@ -0,0 +1,14 @@
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
+ export interface RegisterAppRequest {
9
+ appId: string;
10
+ displayName: string;
11
+ repoRoot: string;
12
+ uiBridgeUrl: string;
13
+ [k: string]: unknown;
14
+ }
@@ -0,0 +1,90 @@
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
+ * Tagged sum-type for every event broadcast on the Spec API channel.
10
+ *
11
+ * Serialization uses `serde(tag = "type", rename_all = "kebab-case")` so
12
+ * the wire discriminator is exactly the SSE event name (e.g.
13
+ * `"spec-changed"`, `"spec-check-invoked"`).
14
+ */
15
+ export type SpecApiEvent =
16
+ | (SpecChanged & {
17
+ type: "spec-changed";
18
+ })
19
+ | {
20
+ app_id: string;
21
+ at_ms: number;
22
+ /**
23
+ * "http" | "mcp" | "workflow-step"
24
+ */
25
+ invoked_via: string;
26
+ page_ids: string[];
27
+ snapshot_id: string;
28
+ type: "spec-check-invoked";
29
+ [k: string]: unknown;
30
+ }
31
+ | {
32
+ app_id: string;
33
+ at_ms: number;
34
+ eval_error_count: number;
35
+ no_match_count: number;
36
+ overall_match_rate: number;
37
+ page_count: number;
38
+ partial_match_count: number;
39
+ perfect_match_count: number;
40
+ snapshot_id: string;
41
+ total_duration_ms: number;
42
+ type: "spec-check-completed";
43
+ [k: string]: unknown;
44
+ }
45
+ | {
46
+ app_id: string;
47
+ at_ms: number;
48
+ conjunct_name: string;
49
+ /**
50
+ * Small scalar/struct — NOT the full result.
51
+ */
52
+ observed: {
53
+ [k: string]: unknown;
54
+ };
55
+ page_id: string;
56
+ /**
57
+ * serde-tagged variant name of `ConjunctRule`
58
+ */
59
+ rule_kind: string;
60
+ snapshot_id: string;
61
+ type: "spec-check-policy-violation";
62
+ [k: string]: unknown;
63
+ }
64
+ | {
65
+ app_id: string;
66
+ at_ms: number;
67
+ /**
68
+ * Expected 2 per design §6.4.
69
+ */
70
+ consecutive_greens: number;
71
+ page_id: string;
72
+ proposal_id: string;
73
+ /**
74
+ * The snapshot that produced the second green.
75
+ */
76
+ snapshot_id: string;
77
+ type: "flywheel-proposal-promoted";
78
+ [k: string]: unknown;
79
+ }
80
+ | {
81
+ app_id: string;
82
+ at_ms: number;
83
+ failing_assertion_id: string;
84
+ failing_state_id: string;
85
+ page_id: string;
86
+ proposal_id: string;
87
+ snapshot_id: string;
88
+ type: "flywheel-proposal-demoted";
89
+ [k: string]: unknown;
90
+ };
@@ -12,4 +12,4 @@
12
12
  * cross-repo schema registry; registered as `SpecCheckConfidence` in
13
13
  * `schema_export.rs`. See module docs.
14
14
  */
15
- export type Confidence = "high" | "medium" | "low";
15
+ export type SpecCheckConfidence = "high" | "medium" | "low";
@@ -11,12 +11,12 @@ import type { AssertionResult } from './AssertionResult';
11
11
  import type { AssertionSeverityCounts } from './AssertionSeverityCounts';
12
12
  import type { BridgeFingerprint } from './BridgeFingerprint';
13
13
  import type { CandidateMiss } from './CandidateMiss';
14
- import type { Confidence } from './Confidence';
15
14
  import type { FieldDiff } from './FieldDiff';
16
15
  import type { MatchOutcome } from './MatchOutcome';
17
16
  import type { MatchedElement } from './MatchedElement';
18
17
  import type { MissReason } from './MissReason';
19
18
  import type { RecommendedState } from './RecommendedState';
19
+ import type { SpecCheckConfidence } from './SpecCheckConfidence';
20
20
  import type { SpecCheckSummary } from './SpecCheckSummary';
21
21
  import type { StateMatchResult } from './StateMatchResult';
22
22
 
@@ -6,9 +6,9 @@
6
6
  */
7
7
 
8
8
  import type { AssertionSeverityCounts } from './AssertionSeverityCounts';
9
- import type { Confidence } from './Confidence';
10
9
  import type { MatchOutcome } from './MatchOutcome';
11
10
  import type { RecommendedState } from './RecommendedState';
11
+ import type { SpecCheckConfidence } from './SpecCheckConfidence';
12
12
 
13
13
  /**
14
14
  * Aggregate summary across all evaluated states.
@@ -19,6 +19,15 @@ export interface SpecCheckSummary {
19
19
  * Mean of per-state match rates, weighted equally.
20
20
  */
21
21
  overallMatchRate: number;
22
+ /**
23
+ * Diagnostic explaining why `recommended_state` is `None`. Set when
24
+ * the matcher *deliberately* withholds a recommendation (e.g. the
25
+ * spec failed distinctness validation per §5.12); absent otherwise
26
+ * (e.g. when every state simply scored below the confidence floor).
27
+ * Free-form for forward-compat; current values:
28
+ * `"spec_validation_failed"`.
29
+ */
30
+ recommendationReason?: string | null;
22
31
  /**
23
32
  * The single state (if any) the matcher recommends the caller treat
24
33
  * as "current". `None` when the matcher has no preference.
@@ -0,0 +1,12 @@
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
+ export interface UpdateAppRequest {
9
+ displayName?: string | null;
10
+ uiBridgeUrl?: string | null;
11
+ [k: string]: unknown;
12
+ }