@qontinui/shared-types 0.2.5 → 0.4.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.cjs.map +1 -1
- package/dist/index.d.cts +43 -1
- package/dist/index.d.ts +43 -1
- package/dist/ui-bridge-ir.cjs +30 -33
- package/dist/ui-bridge-ir.cjs.map +1 -1
- package/dist/ui-bridge-ir.d.cts +98 -84
- package/dist/ui-bridge-ir.d.ts +98 -84
- package/dist/ui-bridge-ir.js +30 -33
- package/dist/ui-bridge-ir.js.map +1 -1
- package/package.json +1 -1
- package/src/generated/AssertionMiss.d.ts +22 -0
- package/src/generated/AssertionOutcome.d.ts +30 -0
- package/src/generated/AssertionResult.d.ts +38 -0
- package/src/generated/AssertionScope.d.ts +37 -0
- package/src/generated/AssertionSeverityCounts.d.ts +28 -0
- package/src/generated/BridgeFingerprint.d.ts +40 -0
- package/src/generated/CandidateMiss.d.ts +39 -0
- package/src/generated/ConjunctEvaluation.d.ts +24 -0
- package/src/generated/ConjunctRule.d.ts +55 -0
- package/src/generated/FieldDiff.d.ts +33 -0
- package/src/generated/IrAssertion.d.ts +26 -0
- package/src/generated/IrAssertionTarget.d.ts +28 -0
- package/src/generated/IrCrossRef.d.ts +16 -0
- package/src/generated/IrElementCriteria.d.ts +29 -0
- package/src/generated/IrGroup.d.ts +33 -0
- package/src/generated/IrMetadata.d.ts +15 -0
- package/src/generated/IrPageSpec.d.ts +51 -0
- package/src/generated/IrProvenance.d.ts +28 -0
- package/src/generated/IrState.d.ts +36 -0
- package/src/generated/IrStateCondition.d.ts +19 -0
- package/src/generated/IrTransition.d.ts +34 -0
- package/src/generated/IrTransitionAction.d.ts +17 -0
- package/src/generated/IrWaitSpec.d.ts +22 -0
- package/src/generated/LegacyAssertion.d.ts +22 -0
- package/src/generated/LegacyAssertionTarget.d.ts +23 -0
- package/src/generated/LegacyGroup.d.ts +19 -0
- package/src/generated/LegacyProcessStep.d.ts +16 -0
- package/src/generated/LegacySpec.d.ts +30 -0
- package/src/generated/LegacyStateMachine.d.ts +17 -0
- package/src/generated/LegacyStateMachineState.d.ts +21 -0
- package/src/generated/LegacyTransition.d.ts +20 -0
- package/src/generated/MatchOutcome.d.ts +11 -0
- package/src/generated/MatchedElement.d.ts +28 -0
- package/src/generated/MissReason.d.ts +20 -0
- package/src/generated/PolicyConjunct.d.ts +22 -0
- package/src/generated/PolicyEvaluation.d.ts +22 -0
- package/src/generated/PolicyStatus.d.ts +11 -0
- package/src/generated/ProposalStatus.d.ts +13 -0
- package/src/generated/RecommendedState.d.ts +23 -0
- package/src/generated/SpecApiEvent.d.ts +85 -0
- package/src/generated/SpecCheckConfidence.d.ts +15 -0
- package/src/generated/SpecCheckPolicy.d.ts +23 -0
- package/src/generated/SpecCheckResult.d.ts +66 -0
- package/src/generated/SpecCheckStepConfig.d.ts +38 -0
- package/src/generated/SpecCheckSummary.d.ts +37 -0
- package/src/generated/SpecValidation.d.ts +27 -0
- package/src/generated/StateMatchResult.d.ts +36 -0
- package/src/generated/UIBridgeElement.d.ts +28 -0
- package/src/generated/index.ts +47 -0
- package/src/index.ts +5 -0
- package/src/ui-bridge-ir/__tests__/projection.test.ts +114 -22
- package/src/ui-bridge-ir/adapter.ts +7 -1
- package/src/ui-bridge-ir/ir.schema.json +8 -4
- package/src/ui-bridge-ir/primitives.ts +8 -0
- package/src/ui-bridge-ir/projection.ts +34 -57
- 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 { SpecCheckConfidence } from './SpecCheckConfidence';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The single state the matcher recommends the caller treat as "current".
|
|
12
|
+
*/
|
|
13
|
+
export interface RecommendedState {
|
|
14
|
+
confidence: SpecCheckConfidence;
|
|
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,85 @@
|
|
|
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
|
+
at_ms: number;
|
|
21
|
+
/**
|
|
22
|
+
* "http" | "mcp" | "workflow-step"
|
|
23
|
+
*/
|
|
24
|
+
invoked_via: string;
|
|
25
|
+
page_ids: string[];
|
|
26
|
+
snapshot_id: string;
|
|
27
|
+
type: "spec-check-invoked";
|
|
28
|
+
[k: string]: unknown;
|
|
29
|
+
}
|
|
30
|
+
| {
|
|
31
|
+
at_ms: number;
|
|
32
|
+
eval_error_count: number;
|
|
33
|
+
no_match_count: number;
|
|
34
|
+
overall_match_rate: number;
|
|
35
|
+
page_count: number;
|
|
36
|
+
partial_match_count: number;
|
|
37
|
+
perfect_match_count: number;
|
|
38
|
+
snapshot_id: string;
|
|
39
|
+
total_duration_ms: number;
|
|
40
|
+
type: "spec-check-completed";
|
|
41
|
+
[k: string]: unknown;
|
|
42
|
+
}
|
|
43
|
+
| {
|
|
44
|
+
at_ms: number;
|
|
45
|
+
conjunct_name: string;
|
|
46
|
+
/**
|
|
47
|
+
* Small scalar/struct — NOT the full result.
|
|
48
|
+
*/
|
|
49
|
+
observed: {
|
|
50
|
+
[k: string]: unknown;
|
|
51
|
+
};
|
|
52
|
+
page_id: string;
|
|
53
|
+
/**
|
|
54
|
+
* serde-tagged variant name of `ConjunctRule`
|
|
55
|
+
*/
|
|
56
|
+
rule_kind: string;
|
|
57
|
+
snapshot_id: string;
|
|
58
|
+
type: "spec-check-policy-violation";
|
|
59
|
+
[k: string]: unknown;
|
|
60
|
+
}
|
|
61
|
+
| {
|
|
62
|
+
at_ms: number;
|
|
63
|
+
/**
|
|
64
|
+
* Expected 2 per design §6.4.
|
|
65
|
+
*/
|
|
66
|
+
consecutive_greens: number;
|
|
67
|
+
page_id: string;
|
|
68
|
+
proposal_id: string;
|
|
69
|
+
/**
|
|
70
|
+
* The snapshot that produced the second green.
|
|
71
|
+
*/
|
|
72
|
+
snapshot_id: string;
|
|
73
|
+
type: "flywheel-proposal-promoted";
|
|
74
|
+
[k: string]: unknown;
|
|
75
|
+
}
|
|
76
|
+
| {
|
|
77
|
+
at_ms: number;
|
|
78
|
+
failing_assertion_id: string;
|
|
79
|
+
failing_state_id: string;
|
|
80
|
+
page_id: string;
|
|
81
|
+
proposal_id: string;
|
|
82
|
+
snapshot_id: string;
|
|
83
|
+
type: "flywheel-proposal-demoted";
|
|
84
|
+
[k: string]: unknown;
|
|
85
|
+
};
|
|
@@ -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 SpecCheckConfidence = "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 { FieldDiff } from './FieldDiff';
|
|
15
|
+
import type { MatchOutcome } from './MatchOutcome';
|
|
16
|
+
import type { MatchedElement } from './MatchedElement';
|
|
17
|
+
import type { MissReason } from './MissReason';
|
|
18
|
+
import type { RecommendedState } from './RecommendedState';
|
|
19
|
+
import type { SpecCheckConfidence } from './SpecCheckConfidence';
|
|
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,37 @@
|
|
|
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 { MatchOutcome } from './MatchOutcome';
|
|
10
|
+
import type { RecommendedState } from './RecommendedState';
|
|
11
|
+
import type { SpecCheckConfidence } from './SpecCheckConfidence';
|
|
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
|
+
* 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;
|
|
31
|
+
/**
|
|
32
|
+
* The single state (if any) the matcher recommends the caller treat
|
|
33
|
+
* as "current". `None` when the matcher has no preference.
|
|
34
|
+
*/
|
|
35
|
+
recommendedState?: RecommendedState | null;
|
|
36
|
+
severityCounts: AssertionSeverityCounts;
|
|
37
|
+
}
|
|
@@ -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
|
+
}
|