@qontinui/shared-types 0.2.5 → 0.3.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 (65) hide show
  1. package/dist/index.cjs.map +1 -1
  2. package/dist/index.d.cts +43 -1
  3. package/dist/index.d.ts +43 -1
  4. package/dist/ui-bridge-ir.cjs +30 -33
  5. package/dist/ui-bridge-ir.cjs.map +1 -1
  6. package/dist/ui-bridge-ir.d.cts +98 -84
  7. package/dist/ui-bridge-ir.d.ts +98 -84
  8. package/dist/ui-bridge-ir.js +30 -33
  9. package/dist/ui-bridge-ir.js.map +1 -1
  10. package/package.json +1 -1
  11. package/src/generated/AssertionMiss.d.ts +22 -0
  12. package/src/generated/AssertionOutcome.d.ts +30 -0
  13. package/src/generated/AssertionResult.d.ts +38 -0
  14. package/src/generated/AssertionScope.d.ts +37 -0
  15. package/src/generated/AssertionSeverityCounts.d.ts +28 -0
  16. package/src/generated/BridgeFingerprint.d.ts +40 -0
  17. package/src/generated/CandidateMiss.d.ts +39 -0
  18. package/src/generated/ConjunctEvaluation.d.ts +24 -0
  19. package/src/generated/ConjunctRule.d.ts +55 -0
  20. package/src/generated/FieldDiff.d.ts +33 -0
  21. package/src/generated/IrAssertion.d.ts +26 -0
  22. package/src/generated/IrAssertionTarget.d.ts +28 -0
  23. package/src/generated/IrCrossRef.d.ts +16 -0
  24. package/src/generated/IrElementCriteria.d.ts +29 -0
  25. package/src/generated/IrGroup.d.ts +33 -0
  26. package/src/generated/IrMetadata.d.ts +15 -0
  27. package/src/generated/IrPageSpec.d.ts +51 -0
  28. package/src/generated/IrProvenance.d.ts +28 -0
  29. package/src/generated/IrState.d.ts +36 -0
  30. package/src/generated/IrStateCondition.d.ts +19 -0
  31. package/src/generated/IrTransition.d.ts +34 -0
  32. package/src/generated/IrTransitionAction.d.ts +17 -0
  33. package/src/generated/IrWaitSpec.d.ts +22 -0
  34. package/src/generated/LegacyAssertion.d.ts +22 -0
  35. package/src/generated/LegacyAssertionTarget.d.ts +23 -0
  36. package/src/generated/LegacyGroup.d.ts +19 -0
  37. package/src/generated/LegacyProcessStep.d.ts +16 -0
  38. package/src/generated/LegacySpec.d.ts +30 -0
  39. package/src/generated/LegacyStateMachine.d.ts +17 -0
  40. package/src/generated/LegacyStateMachineState.d.ts +21 -0
  41. package/src/generated/LegacyTransition.d.ts +20 -0
  42. package/src/generated/MatchOutcome.d.ts +11 -0
  43. package/src/generated/MatchedElement.d.ts +28 -0
  44. package/src/generated/MissReason.d.ts +20 -0
  45. package/src/generated/PolicyConjunct.d.ts +22 -0
  46. package/src/generated/PolicyEvaluation.d.ts +22 -0
  47. package/src/generated/PolicyStatus.d.ts +11 -0
  48. package/src/generated/ProposalStatus.d.ts +13 -0
  49. package/src/generated/RecommendedState.d.ts +23 -0
  50. package/src/generated/SpecCheckConfidence.d.ts +15 -0
  51. package/src/generated/SpecCheckPolicy.d.ts +23 -0
  52. package/src/generated/SpecCheckResult.d.ts +66 -0
  53. package/src/generated/SpecCheckStepConfig.d.ts +38 -0
  54. package/src/generated/SpecCheckSummary.d.ts +28 -0
  55. package/src/generated/SpecValidation.d.ts +27 -0
  56. package/src/generated/StateMatchResult.d.ts +36 -0
  57. package/src/generated/UIBridgeElement.d.ts +28 -0
  58. package/src/generated/index.ts +46 -0
  59. package/src/index.ts +5 -0
  60. package/src/ui-bridge-ir/__tests__/projection.test.ts +114 -22
  61. package/src/ui-bridge-ir/adapter.ts +7 -1
  62. package/src/ui-bridge-ir/ir.schema.json +8 -4
  63. package/src/ui-bridge-ir/primitives.ts +8 -0
  64. package/src/ui-bridge-ir/projection.ts +34 -57
  65. package/src/ui-bridge-ir/state.ts +9 -2
@@ -0,0 +1,22 @@
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 { LegacyAssertionTarget } from './LegacyAssertionTarget';
9
+
10
+ export interface LegacyAssertion {
11
+ assertionType: string;
12
+ category: string;
13
+ description: string;
14
+ enabled: boolean;
15
+ id: string;
16
+ precondition?: string | null;
17
+ reviewed: boolean;
18
+ severity: string;
19
+ source: string;
20
+ target: LegacyAssertionTarget;
21
+ [k: string]: unknown;
22
+ }
@@ -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
+ export interface LegacyAssertionTarget {
9
+ /**
10
+ * Free-form criteria object — kept as `Value` so we don't lose any
11
+ * inverse-projection round-trip information.
12
+ */
13
+ criteria: {
14
+ [k: string]: unknown;
15
+ };
16
+ label: string;
17
+ /**
18
+ * Always `"search"` for the projection — point/region targets aren't
19
+ * expressible in the IR.
20
+ */
21
+ type: string;
22
+ [k: string]: unknown;
23
+ }
@@ -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 { LegacyAssertion } from './LegacyAssertion';
9
+ import type { LegacyAssertionTarget } from './LegacyAssertionTarget';
10
+
11
+ export interface LegacyGroup {
12
+ assertions: LegacyAssertion[];
13
+ category: string;
14
+ description: string;
15
+ id: string;
16
+ name: string;
17
+ source: string;
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
+ import type { IrElementCriteria } from './IrElementCriteria';
9
+ import type { IrWaitSpec } from './IrWaitSpec';
10
+
11
+ export interface LegacyProcessStep {
12
+ action: string;
13
+ target: unknown;
14
+ waitAfter?: IrWaitSpec | null;
15
+ [k: string]: unknown;
16
+ }
@@ -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
+ import type { IrElementCriteria } from './IrElementCriteria';
9
+ import type { IrWaitSpec } from './IrWaitSpec';
10
+ import type { LegacyAssertion } from './LegacyAssertion';
11
+ import type { LegacyAssertionTarget } from './LegacyAssertionTarget';
12
+ import type { LegacyGroup } from './LegacyGroup';
13
+ import type { LegacyProcessStep } from './LegacyProcessStep';
14
+ import type { LegacyStateMachine } from './LegacyStateMachine';
15
+ import type { LegacyStateMachineState } from './LegacyStateMachineState';
16
+ import type { LegacyTransition } from './LegacyTransition';
17
+
18
+ /**
19
+ * Top-level legacy spec output. Serialized via a `serde_json::Value` step
20
+ * so the projection can apply lexicographic key sorting at the end (matches
21
+ * the TS projection's `sortKeys` pass).
22
+ */
23
+ export interface LegacySpec {
24
+ description: string;
25
+ groups: LegacyGroup[];
26
+ metadata: unknown;
27
+ stateMachine: LegacyStateMachine;
28
+ version: string;
29
+ [k: string]: unknown;
30
+ }
@@ -0,0 +1,17 @@
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 { IrElementCriteria } from './IrElementCriteria';
9
+ import type { IrWaitSpec } from './IrWaitSpec';
10
+ import type { LegacyProcessStep } from './LegacyProcessStep';
11
+ import type { LegacyStateMachineState } from './LegacyStateMachineState';
12
+ import type { LegacyTransition } from './LegacyTransition';
13
+
14
+ export interface LegacyStateMachine {
15
+ states: LegacyStateMachineState[];
16
+ [k: string]: unknown;
17
+ }
@@ -0,0 +1,21 @@
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 { IrElementCriteria } from './IrElementCriteria';
9
+ import type { IrWaitSpec } from './IrWaitSpec';
10
+ import type { LegacyProcessStep } from './LegacyProcessStep';
11
+ import type { LegacyTransition } from './LegacyTransition';
12
+
13
+ export interface LegacyStateMachineState {
14
+ description: string;
15
+ elements: unknown[];
16
+ id: string;
17
+ isInitial: boolean;
18
+ name: string;
19
+ transitions: LegacyTransition[];
20
+ [k: string]: unknown;
21
+ }
@@ -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
+ import type { IrElementCriteria } from './IrElementCriteria';
9
+ import type { IrWaitSpec } from './IrWaitSpec';
10
+ import type { LegacyProcessStep } from './LegacyProcessStep';
11
+
12
+ export interface LegacyTransition {
13
+ activateStates: string[];
14
+ deactivateStates: string[];
15
+ id: string;
16
+ name: string;
17
+ process: LegacyProcessStep[];
18
+ staysVisible: boolean;
19
+ [k: string]: unknown;
20
+ }
@@ -0,0 +1,11 @@
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
+ * Top-level pass / partial / no-match verdict.
10
+ */
11
+ export type MatchOutcome = "full_match" | "partial_match" | "no_match";
@@ -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
+ * Identity of the bridge element that satisfied an assertion.
10
+ */
11
+ export interface MatchedElement {
12
+ /**
13
+ * UI Bridge element identifier (if exposed).
14
+ */
15
+ elementId?: string | null;
16
+ /**
17
+ * CSS selector or DOM path identifying the element.
18
+ */
19
+ path: string;
20
+ /**
21
+ * ARIA role of the matched element.
22
+ */
23
+ role?: string | null;
24
+ /**
25
+ * Visible text of the matched element.
26
+ */
27
+ text?: string | null;
28
+ }
@@ -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
+ * Coarse-grained classification of an assertion miss.
10
+ *
11
+ * Per §5.3 — locked as a unit enum. Structured detail (per-field diffs,
12
+ * near-match candidates) lives on `AssertionMiss` / `CandidateMiss`.
13
+ */
14
+ export type MissReason =
15
+ | "no_candidates"
16
+ | "role_mismatch"
17
+ | "text_mismatch"
18
+ | "visibility_mismatch"
19
+ | "attribute_mismatch"
20
+ | "multiple_matches";
@@ -0,0 +1,22 @@
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 { AssertionScope } from './AssertionScope';
9
+ import type { ConjunctRule } from './ConjunctRule';
10
+ import type { MatchOutcome } from './MatchOutcome';
11
+
12
+ /**
13
+ * One AND-conjunct: a named rule applied within a scope.
14
+ */
15
+ export interface PolicyConjunct {
16
+ /**
17
+ * Human-readable name used in `ConjunctEvaluation.name`.
18
+ */
19
+ name: string;
20
+ rule: ConjunctRule;
21
+ scope: AssertionScope;
22
+ }
@@ -0,0 +1,22 @@
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 { ConjunctEvaluation } from './ConjunctEvaluation';
9
+ import type { PolicyStatus } from './PolicyStatus';
10
+
11
+ /**
12
+ * Top-level wrapper for evaluating a `SpecCheckPolicy` against a
13
+ * `SpecCheckResult`.
14
+ */
15
+ export interface PolicyEvaluation {
16
+ /**
17
+ * One result per conjunct in the policy, in policy declaration
18
+ * order.
19
+ */
20
+ conjunctResults: ConjunctEvaluation[];
21
+ overallStatus: PolicyStatus1;
22
+ }
@@ -0,0 +1,11 @@
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
+ * Pass / fail / indeterminate verdict for a policy or conjunct.
10
+ */
11
+ export type PolicyStatus = "pass" | "fail" | "indeterminate";
@@ -0,0 +1,13 @@
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
+ * Lifecycle status for spec proposals produced by the Stream E coverage-growth
10
+ * flywheel. `None` on an existing `IrProvenance` means the spec predates the
11
+ * flywheel and is implicitly `Promoted`.
12
+ */
13
+ export type ProposalStatus = "proposed" | "pending" | "promoted";
@@ -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
+ import type { Confidence } from './Confidence';
9
+
10
+ /**
11
+ * The single state the matcher recommends the caller treat as "current".
12
+ */
13
+ export interface RecommendedState {
14
+ confidence: Confidence;
15
+ /**
16
+ * Free-form explanation (e.g. "highest match rate among all states").
17
+ */
18
+ reason: string;
19
+ /**
20
+ * The recommended state's identifier.
21
+ */
22
+ stateId: string;
23
+ }
@@ -0,0 +1,15 @@
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
+ * Confidence level — high / medium / low.
10
+ *
11
+ * Collides with `qontinui_types::verification::Confidence` in the
12
+ * cross-repo schema registry; registered as `SpecCheckConfidence` in
13
+ * `schema_export.rs`. See module docs.
14
+ */
15
+ export type Confidence = "high" | "medium" | "low";
@@ -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
+ import type { AssertionScope } from './AssertionScope';
9
+ import type { ConjunctRule } from './ConjunctRule';
10
+ import type { MatchOutcome } from './MatchOutcome';
11
+ import type { PolicyConjunct } from './PolicyConjunct';
12
+
13
+ /**
14
+ * AND-only policy — all conjuncts must hold for the policy to pass.
15
+ * Per §5.7 there is no OR; compose multiple steps if you need
16
+ * disjunction.
17
+ */
18
+ export interface SpecCheckPolicy {
19
+ /**
20
+ * Conjuncts ANDed together.
21
+ */
22
+ conjuncts?: PolicyConjunct[];
23
+ }
@@ -0,0 +1,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
+ import type { AssertionMiss } from './AssertionMiss';
9
+ import type { AssertionOutcome } from './AssertionOutcome';
10
+ import type { AssertionResult } from './AssertionResult';
11
+ import type { AssertionSeverityCounts } from './AssertionSeverityCounts';
12
+ import type { BridgeFingerprint } from './BridgeFingerprint';
13
+ import type { CandidateMiss } from './CandidateMiss';
14
+ import type { Confidence } from './Confidence';
15
+ import type { FieldDiff } from './FieldDiff';
16
+ import type { MatchOutcome } from './MatchOutcome';
17
+ import type { MatchedElement } from './MatchedElement';
18
+ import type { MissReason } from './MissReason';
19
+ import type { RecommendedState } from './RecommendedState';
20
+ import type { SpecCheckSummary } from './SpecCheckSummary';
21
+ import type { StateMatchResult } from './StateMatchResult';
22
+
23
+ /**
24
+ * Result of evaluating one or more page specs against a bridge snapshot.
25
+ *
26
+ * `result_schema_version` is the FIRST field per §5.15 — read-time
27
+ * forward migration uses it to route legacy JSONB through
28
+ * `result_migration`. Pre-versioned rows (written before v1 shipped)
29
+ * deserialize as `0`.
30
+ */
31
+ export interface SpecCheckResult {
32
+ bridgeFingerprint: BridgeFingerprint;
33
+ /**
34
+ * ISO-8601 UTC. When the spec was hashed and the snapshot indexed.
35
+ */
36
+ evaluatedAt: string;
37
+ /**
38
+ * Page being evaluated.
39
+ */
40
+ pageId: string;
41
+ /**
42
+ * v1 = 1. Missing on the wire (pre-versioned persisted rows) → 0.
43
+ */
44
+ resultSchemaVersion: number;
45
+ /**
46
+ * Caller-minted snapshot ID. Format: `"scs_" + ULID()`. See §5.8.
47
+ */
48
+ snapshotId: string;
49
+ /**
50
+ * Hash of the spec IR document at evaluation time. `"sha256-<hex>"`.
51
+ */
52
+ specContentHash: string;
53
+ /**
54
+ * IR document `version` field (currently `"1.0"`).
55
+ */
56
+ specVersion: string;
57
+ /**
58
+ * One result per `IrState` in the spec.
59
+ */
60
+ stateResults: StateMatchResult[];
61
+ summary: SpecCheckSummary;
62
+ /**
63
+ * Soft signals — currently used for `Stale` from `SnapshotFetchError`.
64
+ */
65
+ warnings?: string[];
66
+ }
@@ -0,0 +1,38 @@
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 { AssertionScope } from './AssertionScope';
9
+ import type { ConjunctRule } from './ConjunctRule';
10
+ import type { MatchOutcome } from './MatchOutcome';
11
+ import type { PolicyConjunct } from './PolicyConjunct';
12
+ import type { SpecCheckPolicy } from './SpecCheckPolicy';
13
+
14
+ /**
15
+ * Workflow-step variant payload — the persisted shape of a
16
+ * `spec_check` step in a unified workflow.
17
+ */
18
+ export interface SpecCheckStepConfig {
19
+ /**
20
+ * Severities that should cause the step to fail when present in
21
+ * `severity_counts`. Empty means "all severities count as failure".
22
+ */
23
+ failOn?: string[];
24
+ /**
25
+ * If `true`, the step fails when the target app isn't connected to
26
+ * the bridge.
27
+ */
28
+ failWhenNoApp: boolean;
29
+ /**
30
+ * If `true`, the step fails when no spec exists for `page_id`.
31
+ */
32
+ failWhenNoSpec: boolean;
33
+ /**
34
+ * Page to evaluate.
35
+ */
36
+ pageId: string;
37
+ policy: SpecCheckPolicy;
38
+ }
@@ -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
+ import type { AssertionSeverityCounts } from './AssertionSeverityCounts';
9
+ import type { Confidence } from './Confidence';
10
+ import type { MatchOutcome } from './MatchOutcome';
11
+ import type { RecommendedState } from './RecommendedState';
12
+
13
+ /**
14
+ * Aggregate summary across all evaluated states.
15
+ */
16
+ export interface SpecCheckSummary {
17
+ matchOutcome: MatchOutcome;
18
+ /**
19
+ * Mean of per-state match rates, weighted equally.
20
+ */
21
+ overallMatchRate: number;
22
+ /**
23
+ * The single state (if any) the matcher recommends the caller treat
24
+ * as "current". `None` when the matcher has no preference.
25
+ */
26
+ recommendedState?: RecommendedState | null;
27
+ severityCounts: AssertionSeverityCounts;
28
+ }
@@ -0,0 +1,27 @@
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
+ * Per-page validation summary surfaced on `GET /spec/list`. §5.12 G2.
10
+ */
11
+ export interface SpecValidation {
12
+ /**
13
+ * State IDs whose distinctness signal is empty (a state with no
14
+ * assertions that distinguish it from any other state).
15
+ */
16
+ degenerateStateIds?: string[];
17
+ /**
18
+ * Pairs of state IDs that share an identical normalized distinctness
19
+ * signal. Each inner array is sorted lexicographically so the same
20
+ * pair always serializes the same way regardless of detection order.
21
+ */
22
+ indistinguishableStatePairs?: [string, string][];
23
+ /**
24
+ * Page identifier.
25
+ */
26
+ pageId: string;
27
+ }
@@ -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 { AssertionMiss } from './AssertionMiss';
9
+ import type { AssertionOutcome } from './AssertionOutcome';
10
+ import type { AssertionResult } from './AssertionResult';
11
+ import type { CandidateMiss } from './CandidateMiss';
12
+ import type { FieldDiff } from './FieldDiff';
13
+ import type { MatchedElement } from './MatchedElement';
14
+ import type { MissReason } from './MissReason';
15
+
16
+ /**
17
+ * Per-state evaluation result.
18
+ */
19
+ export interface StateMatchResult {
20
+ /**
21
+ * One entry per IR assertion in the state.
22
+ */
23
+ assertions: AssertionResult[];
24
+ /**
25
+ * Fraction of assertions that passed (0.0..=1.0).
26
+ */
27
+ matchRate: number;
28
+ /**
29
+ * Identifier of the IR state.
30
+ */
31
+ stateId: string;
32
+ /**
33
+ * Human-readable state name (snapshot of `IrState.name`).
34
+ */
35
+ stateName: string;
36
+ }
@@ -17,10 +17,22 @@ import type { ElementState } from './ElementState';
17
17
  * includes identity, available actions, current state, and lifecycle info.
18
18
  */
19
19
  export interface UIBridgeElement {
20
+ /**
21
+ * W3C "accessible name" per the accessible-name algorithm. Distinct from
22
+ * aria_label because the algorithm may consult aria-labelledby, associated
23
+ * label elements, title, or visible content. Source of truth for
24
+ * IrElementCriteria.accessible_name.
25
+ */
26
+ accessibleName?: string | null;
20
27
  /**
21
28
  * Standard actions available on this element.
22
29
  */
23
30
  actions?: string[];
31
+ /**
32
+ * Computed aria-label (explicit attribute, falling back to aria-labelledby
33
+ * reference resolution). Source of truth for IrElementCriteria.aria_label.
34
+ */
35
+ ariaLabel?: string | null;
24
36
  /**
25
37
  * Viewport-relative bounding box in CSS pixels, when the SDK has a
26
38
  * live DOM ref. Absent for elements registered without a ref or when
@@ -48,7 +60,23 @@ export interface UIBridgeElement {
48
60
  * Unix-epoch millisecond timestamp when the element was registered.
49
61
  */
50
62
  registeredAt: number;
63
+ /**
64
+ * ARIA role of the element (explicit `role=` or implicit per W3C ARIA-in-HTML).
65
+ * Populated by the SDK's element walker. Source of truth for IrElementCriteria.role.
66
+ */
67
+ role?: string | null;
51
68
  state: ElementState;
69
+ /**
70
+ * HTML tag name in lowercase. Source of truth for IrElementCriteria.tag_name.
71
+ */
72
+ tagName?: string | null;
73
+ /**
74
+ * Visible text content with whitespace collapsed (DOM innerText-equivalent
75
+ * on web; accessibilityLabel/text equivalent on native). Source of truth for
76
+ * IrElementCriteria.text and text_contains. Distinct from state.text_content
77
+ * which is a snapshot of the form-control value.
78
+ */
79
+ text?: string | null;
52
80
  /**
53
81
  * Element type (e.g. `"button"`, `"input"`, `"select"`).
54
82
  */