@qontinui/shared-types 2.1.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/refusal.d.cts +17 -0
- package/dist/refusal.d.ts +17 -0
- package/package.json +1 -1
- package/src/generated/FrontierEntry.d.ts +62 -0
- package/src/generated/JourneyEdgeObservation.d.ts +91 -0
- package/src/generated/JourneyLedgerHealth.d.ts +21 -0
- package/src/generated/JourneyNode.d.ts +72 -0
- package/src/generated/JourneyTrigger.d.ts +47 -0
- package/src/generated/NextAction.d.ts +4 -0
- package/src/generated/RefusalCode.d.ts +13 -0
- package/src/generated/index.ts +5 -0
package/dist/refusal.d.cts
CHANGED
|
@@ -50,6 +50,10 @@ interface NextAction {
|
|
|
50
50
|
/**
|
|
51
51
|
* What the action applies to: the command to run, the page to open, the
|
|
52
52
|
* setting to set, the gate to wait for. Its meaning is fixed by `kind`.
|
|
53
|
+
* On [`NextActionKind::RetryLater`] it is what to re-check BEFORE
|
|
54
|
+
* retrying, because the earlier attempt may already have taken effect (a
|
|
55
|
+
* [`RefusalCode::UpstreamTimeout`] write); [`NextAction::render`] then
|
|
56
|
+
* says so. Omit it on a retry that is safe to repeat blindly.
|
|
53
57
|
*/
|
|
54
58
|
target?: string | null;
|
|
55
59
|
/**
|
|
@@ -80,6 +84,19 @@ type RefusalCode =
|
|
|
80
84
|
| "sibling_checkout_absent"
|
|
81
85
|
| "endpoint_unresolved"
|
|
82
86
|
| "glossary_term_unknown"
|
|
87
|
+
| "authentication_required"
|
|
88
|
+
| "credential_rejected"
|
|
89
|
+
| "permission_denied"
|
|
90
|
+
| "not_found"
|
|
91
|
+
| "conflict"
|
|
92
|
+
| "invalid_request"
|
|
93
|
+
| "rate_limited"
|
|
94
|
+
| "quota_exceeded"
|
|
95
|
+
| "upstream_unavailable"
|
|
96
|
+
| "upstream_timeout"
|
|
97
|
+
| "device_not_connected"
|
|
98
|
+
| "service_unavailable"
|
|
99
|
+
| "internal_error"
|
|
83
100
|
| "unknown";
|
|
84
101
|
|
|
85
102
|
/* eslint-disable */
|
package/dist/refusal.d.ts
CHANGED
|
@@ -50,6 +50,10 @@ interface NextAction {
|
|
|
50
50
|
/**
|
|
51
51
|
* What the action applies to: the command to run, the page to open, the
|
|
52
52
|
* setting to set, the gate to wait for. Its meaning is fixed by `kind`.
|
|
53
|
+
* On [`NextActionKind::RetryLater`] it is what to re-check BEFORE
|
|
54
|
+
* retrying, because the earlier attempt may already have taken effect (a
|
|
55
|
+
* [`RefusalCode::UpstreamTimeout`] write); [`NextAction::render`] then
|
|
56
|
+
* says so. Omit it on a retry that is safe to repeat blindly.
|
|
53
57
|
*/
|
|
54
58
|
target?: string | null;
|
|
55
59
|
/**
|
|
@@ -80,6 +84,19 @@ type RefusalCode =
|
|
|
80
84
|
| "sibling_checkout_absent"
|
|
81
85
|
| "endpoint_unresolved"
|
|
82
86
|
| "glossary_term_unknown"
|
|
87
|
+
| "authentication_required"
|
|
88
|
+
| "credential_rejected"
|
|
89
|
+
| "permission_denied"
|
|
90
|
+
| "not_found"
|
|
91
|
+
| "conflict"
|
|
92
|
+
| "invalid_request"
|
|
93
|
+
| "rate_limited"
|
|
94
|
+
| "quota_exceeded"
|
|
95
|
+
| "upstream_unavailable"
|
|
96
|
+
| "upstream_timeout"
|
|
97
|
+
| "device_not_connected"
|
|
98
|
+
| "service_unavailable"
|
|
99
|
+
| "internal_error"
|
|
83
100
|
| "unknown";
|
|
84
101
|
|
|
85
102
|
/* eslint-disable */
|
package/package.json
CHANGED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/**
|
|
3
|
+
* This file was automatically generated.
|
|
4
|
+
* DO NOT MODIFY IT BY HAND. Regenerate with
|
|
5
|
+
* `qontinui-runner/src-tauri/scripts/generate_types.sh`.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import type { JourneyNode } from "./JourneyNode";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* An interactive affordance seen at a node and not yet the trigger of an
|
|
12
|
+
* edge from it — a row of `project.journey_frontier`, keyed
|
|
13
|
+
* `(app_id, node_key, affordance_fingerprint)`.
|
|
14
|
+
*/
|
|
15
|
+
export interface FrontierEntry {
|
|
16
|
+
/**
|
|
17
|
+
* Structural fingerprint of the affordance.
|
|
18
|
+
*/
|
|
19
|
+
affordanceFingerprint: string;
|
|
20
|
+
/**
|
|
21
|
+
* ARIA role of the affordance; `None` = not reported.
|
|
22
|
+
*/
|
|
23
|
+
affordanceRole?: string | null;
|
|
24
|
+
/**
|
|
25
|
+
* The registered app id.
|
|
26
|
+
*/
|
|
27
|
+
appId: string;
|
|
28
|
+
/**
|
|
29
|
+
* The affordance's declared effect; `None` = undeclared.
|
|
30
|
+
*/
|
|
31
|
+
declaredEffect?: ("read" | "write" | "destructive") | null;
|
|
32
|
+
/**
|
|
33
|
+
* First time it was seen at this node (ISO 8601).
|
|
34
|
+
*/
|
|
35
|
+
firstSeenAt: string;
|
|
36
|
+
/**
|
|
37
|
+
* Most recent time it was seen at this node (ISO 8601).
|
|
38
|
+
*/
|
|
39
|
+
lastSeenAt: string;
|
|
40
|
+
/**
|
|
41
|
+
* The run that most recently saw it; `None` = not reported.
|
|
42
|
+
*/
|
|
43
|
+
lastSeenRunId?: string | null;
|
|
44
|
+
/**
|
|
45
|
+
* The node the affordance was seen at.
|
|
46
|
+
*/
|
|
47
|
+
node: JourneyNode;
|
|
48
|
+
/**
|
|
49
|
+
* `node.key()` — stored so the primary key is a plain text column.
|
|
50
|
+
*/
|
|
51
|
+
nodeKey: string;
|
|
52
|
+
/**
|
|
53
|
+
* Why it is on the frontier.
|
|
54
|
+
*/
|
|
55
|
+
reason:
|
|
56
|
+
| "not_yet_activated"
|
|
57
|
+
| "effect_undeclared"
|
|
58
|
+
| "effect_write"
|
|
59
|
+
| "effect_destructive"
|
|
60
|
+
| "budget_exhausted"
|
|
61
|
+
| "activation_failed";
|
|
62
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/**
|
|
3
|
+
* This file was automatically generated.
|
|
4
|
+
* DO NOT MODIFY IT BY HAND. Regenerate with
|
|
5
|
+
* `qontinui-runner/src-tauri/scripts/generate_types.sh`.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import type { JourneyNode } from "./JourneyNode";
|
|
9
|
+
import type { JourneyTrigger } from "./JourneyTrigger";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* One observed edge of the journey graph — a row of
|
|
13
|
+
* `project.journey_edge_observations`.
|
|
14
|
+
*
|
|
15
|
+
* Invariants (checked by [`JourneyEdgeObservation::validate`]; the first also
|
|
16
|
+
* by the migration's CHECK): `to_node` is `None` iff `outcome` is
|
|
17
|
+
* [`EdgeOutcome::ToNodeUnobserved`]; `no_change` joins nodes with equal
|
|
18
|
+
* keys (a `changed` edge may also join equal keys).
|
|
19
|
+
*
|
|
20
|
+
* The ledger's `timeline` column is deliberately unrepresented until
|
|
21
|
+
* Phase 4; readers select explicit columns rather than `*`.
|
|
22
|
+
*/
|
|
23
|
+
export interface JourneyEdgeObservation {
|
|
24
|
+
/**
|
|
25
|
+
* The registered app id.
|
|
26
|
+
*/
|
|
27
|
+
appId: string;
|
|
28
|
+
/**
|
|
29
|
+
* The SDK's self-reported version (`SdkAppInfo.version`, semver or git
|
|
30
|
+
* short-SHA); `None` = not reported, never "no version".
|
|
31
|
+
*/
|
|
32
|
+
appVersion?: string | null;
|
|
33
|
+
/**
|
|
34
|
+
* The configuration the action was taken from.
|
|
35
|
+
*/
|
|
36
|
+
fromNode: JourneyNode;
|
|
37
|
+
/**
|
|
38
|
+
* Row id (UUID).
|
|
39
|
+
*/
|
|
40
|
+
id: string;
|
|
41
|
+
/**
|
|
42
|
+
* When the row was withdrawn (ISO 8601); `None` = live.
|
|
43
|
+
*/
|
|
44
|
+
invalidatedAt?: string | null;
|
|
45
|
+
/**
|
|
46
|
+
* Who withdrew the row.
|
|
47
|
+
*/
|
|
48
|
+
invalidatedBy?: string | null;
|
|
49
|
+
/**
|
|
50
|
+
* Why the row was withdrawn.
|
|
51
|
+
*/
|
|
52
|
+
invalidatedReason?: string | null;
|
|
53
|
+
/**
|
|
54
|
+
* Token grouping one bulk withdrawal, as on `co_occurrence_observations`.
|
|
55
|
+
*/
|
|
56
|
+
invalidationToken?: string | null;
|
|
57
|
+
/**
|
|
58
|
+
* When the edge CLOSED (to-snapshot seen, or diff returned), ISO 8601.
|
|
59
|
+
*/
|
|
60
|
+
observedAt: string;
|
|
61
|
+
/**
|
|
62
|
+
* How the edge closed.
|
|
63
|
+
*/
|
|
64
|
+
outcome:
|
|
65
|
+
"changed" | "no_change" | "error" | "settle_timeout" | "to_node_unobserved";
|
|
66
|
+
/**
|
|
67
|
+
* Agent session / task-run / recording-session id; `None` = not reported.
|
|
68
|
+
*/
|
|
69
|
+
runId?: string | null;
|
|
70
|
+
/**
|
|
71
|
+
* Who produced the edge.
|
|
72
|
+
*/
|
|
73
|
+
runKind: "agent_action" | "explorer" | "passive_session";
|
|
74
|
+
/**
|
|
75
|
+
* The runner's own `buildId`.
|
|
76
|
+
*/
|
|
77
|
+
runnerBuildId: string;
|
|
78
|
+
/**
|
|
79
|
+
* Same meaning as `co_occurrence_observations.runner_instance`.
|
|
80
|
+
*/
|
|
81
|
+
runnerInstance: string;
|
|
82
|
+
/**
|
|
83
|
+
* The configuration observed after it; `None` iff
|
|
84
|
+
* `outcome == to_node_unobserved`.
|
|
85
|
+
*/
|
|
86
|
+
toNode?: JourneyNode | null;
|
|
87
|
+
/**
|
|
88
|
+
* What caused the edge.
|
|
89
|
+
*/
|
|
90
|
+
trigger: JourneyTrigger;
|
|
91
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/**
|
|
3
|
+
* This file was automatically generated.
|
|
4
|
+
* DO NOT MODIFY IT BY HAND. Regenerate with
|
|
5
|
+
* `qontinui-runner/src-tauri/scripts/generate_types.sh`.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Body of `GET /apps/{app_id}/journey/health`, and the ledger block every
|
|
10
|
+
* journey query response repeats.
|
|
11
|
+
*/
|
|
12
|
+
export interface JourneyLedgerHealth {
|
|
13
|
+
/**
|
|
14
|
+
* Human-readable cause, e.g. `"embedded DB predates the journey tables"`.
|
|
15
|
+
*/
|
|
16
|
+
detail: string;
|
|
17
|
+
/**
|
|
18
|
+
* The ledger's state.
|
|
19
|
+
*/
|
|
20
|
+
state: "writing" | "schema_absent" | "write_failing";
|
|
21
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/**
|
|
3
|
+
* This file was automatically generated.
|
|
4
|
+
* DO NOT MODIFY IT BY HAND. Regenerate with
|
|
5
|
+
* `qontinui-runner/src-tauri/scripts/generate_types.sh`.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* A vertex of the journey graph: one observed configuration of one page.
|
|
10
|
+
*
|
|
11
|
+
* Identity is a deterministic predicate, not a judgment: a node is
|
|
12
|
+
* `(spec_id, sorted active IR state ids)` within an app. When the page has
|
|
13
|
+
* no spec, or no state was classified present, the node is UNMODELLED and is
|
|
14
|
+
* identified by its route template (else its page label) — it still takes
|
|
15
|
+
* part in reachability and is counted as unmodelled in coverage.
|
|
16
|
+
*
|
|
17
|
+
* Build one with [`JourneyNode::new`], which sorts and dedups `state_ids`
|
|
18
|
+
* and derives `modelled`; [`JourneyNode::key`] is the canonical string form
|
|
19
|
+
* stored in `journey_frontier.node_key`.
|
|
20
|
+
*
|
|
21
|
+
* Node identity is `key()` / `node_key` — NEVER jsonb equality of the
|
|
22
|
+
* serialized node (which also carries non-identity detail such as
|
|
23
|
+
* `pageLabel` on a modelled node).
|
|
24
|
+
* Unlike the crate's other optional fields, this struct's optional fields
|
|
25
|
+
* always serialize, as `null` when absent, so every stored node has the same
|
|
26
|
+
* key set.
|
|
27
|
+
*/
|
|
28
|
+
export interface JourneyNode {
|
|
29
|
+
/**
|
|
30
|
+
* True iff `spec_id` is present AND `state_ids` is non-empty.
|
|
31
|
+
*/
|
|
32
|
+
modelled: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* An APP-DECLARED page identifier — never a URL path, never user input.
|
|
35
|
+
*
|
|
36
|
+
* PRODUCER OBLIGATION (this is the privacy guarantee): fill it only from
|
|
37
|
+
* the snapshot's `page.pageContext.meta.tabId`, then `activeTab`, then
|
|
38
|
+
* `page.pageContext.name`, and NEVER from `page.pathname` in any form,
|
|
39
|
+
* raw or slugged. (The runner's existing `resolve_page_label` in
|
|
40
|
+
* `state_discovery/capture.rs` has a fourth fallback that slugs
|
|
41
|
+
* `page.pathname`; the journey producer must not use that fallback.)
|
|
42
|
+
* `pageContext.name` is a free-form display name (e.g. `"Import /
|
|
43
|
+
* Export"`), so the producer SLUGS it before storing — which leaves a
|
|
44
|
+
* `/` meaning only one thing: a leaked, unslugged path.
|
|
45
|
+
*
|
|
46
|
+
* [`JourneyNode::validate`] rejects a `/` as a TRIPWIRE for that leak.
|
|
47
|
+
* It is not the guarantee: a slugged path contains no `/` and passes.
|
|
48
|
+
*/
|
|
49
|
+
pageLabel: string | null;
|
|
50
|
+
/**
|
|
51
|
+
* The framework route PATTERN the snapshot's page was served under
|
|
52
|
+
* (e.g. `/admin/coord/runs/[id]`), when known. Never a concrete URL path:
|
|
53
|
+
* a concrete path can embed user input (`/search/<term>`,
|
|
54
|
+
* `/users/<email>`). Not heuristically validated — the producer must
|
|
55
|
+
* fill it from the router's pattern, not from `location.pathname`.
|
|
56
|
+
*/
|
|
57
|
+
pathnameTemplate: string | null;
|
|
58
|
+
/**
|
|
59
|
+
* The page spec the snapshot matched; `None` = no spec for this page.
|
|
60
|
+
* Load-bearing: some state ids are declared on more than one page.
|
|
61
|
+
* Must not contain `#` or start with `unmodelled:` (see [`JourneyNode::key`]).
|
|
62
|
+
*/
|
|
63
|
+
specId: string | null;
|
|
64
|
+
/**
|
|
65
|
+
* Ids of the IR states classified present — deduped, in BYTE-WISE
|
|
66
|
+
* (UTF-8) ascending order, i.e. Rust's `str` ordering. Producers in
|
|
67
|
+
* other languages must sort by UTF-8 bytes (not UTF-16 code units, not
|
|
68
|
+
* a locale collation) or their keys will not match. No id may contain
|
|
69
|
+
* `,` (see [`JourneyNode::key`]).
|
|
70
|
+
*/
|
|
71
|
+
stateIds: string[];
|
|
72
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/**
|
|
3
|
+
* This file was automatically generated.
|
|
4
|
+
* DO NOT MODIFY IT BY HAND. Regenerate with
|
|
5
|
+
* `qontinui-runner/src-tauri/scripts/generate_types.sh`.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* What caused an edge — structurally only.
|
|
10
|
+
*
|
|
11
|
+
* `deny_unknown_fields` and the deliberate absence of any text/value field
|
|
12
|
+
* are the privacy control: a caller cannot smuggle a typed value into the
|
|
13
|
+
* ledger, because no such key deserializes and no such field exists to set.
|
|
14
|
+
*/
|
|
15
|
+
export interface JourneyTrigger {
|
|
16
|
+
/**
|
|
17
|
+
* The action verb (`click`, `type`, `select`, a component action id, …).
|
|
18
|
+
*/
|
|
19
|
+
actionType: string;
|
|
20
|
+
/**
|
|
21
|
+
* Which runner choke point captured it.
|
|
22
|
+
*/
|
|
23
|
+
chokePoint:
|
|
24
|
+
| "element_action"
|
|
25
|
+
| "batch_action"
|
|
26
|
+
| "component_action"
|
|
27
|
+
| "sdk_element_action"
|
|
28
|
+
| "execute_with_diff"
|
|
29
|
+
| "navigation";
|
|
30
|
+
/**
|
|
31
|
+
* The affordance's declared effect; `None` = undeclared (NOT "safe").
|
|
32
|
+
*/
|
|
33
|
+
declaredEffect?: ("read" | "write" | "destructive") | null;
|
|
34
|
+
/**
|
|
35
|
+
* How the transition was initiated.
|
|
36
|
+
*/
|
|
37
|
+
navigationTrigger:
|
|
38
|
+
"affordance" | "push" | "replace" | "pop" | "initial" | "hash";
|
|
39
|
+
/**
|
|
40
|
+
* Structural fingerprint of the target element; `None` = not resolved.
|
|
41
|
+
*/
|
|
42
|
+
targetFingerprint?: string | null;
|
|
43
|
+
/**
|
|
44
|
+
* ARIA role of the target; `None` = not reported.
|
|
45
|
+
*/
|
|
46
|
+
targetRole?: string | null;
|
|
47
|
+
}
|
|
@@ -21,6 +21,10 @@ export interface NextAction {
|
|
|
21
21
|
/**
|
|
22
22
|
* What the action applies to: the command to run, the page to open, the
|
|
23
23
|
* setting to set, the gate to wait for. Its meaning is fixed by `kind`.
|
|
24
|
+
* On [`NextActionKind::RetryLater`] it is what to re-check BEFORE
|
|
25
|
+
* retrying, because the earlier attempt may already have taken effect (a
|
|
26
|
+
* [`RefusalCode::UpstreamTimeout`] write); [`NextAction::render`] then
|
|
27
|
+
* says so. Omit it on a retry that is safe to repeat blindly.
|
|
24
28
|
*/
|
|
25
29
|
target?: string | null;
|
|
26
30
|
/**
|
|
@@ -17,4 +17,17 @@ export type RefusalCode =
|
|
|
17
17
|
| "sibling_checkout_absent"
|
|
18
18
|
| "endpoint_unresolved"
|
|
19
19
|
| "glossary_term_unknown"
|
|
20
|
+
| "authentication_required"
|
|
21
|
+
| "credential_rejected"
|
|
22
|
+
| "permission_denied"
|
|
23
|
+
| "not_found"
|
|
24
|
+
| "conflict"
|
|
25
|
+
| "invalid_request"
|
|
26
|
+
| "rate_limited"
|
|
27
|
+
| "quota_exceeded"
|
|
28
|
+
| "upstream_unavailable"
|
|
29
|
+
| "upstream_timeout"
|
|
30
|
+
| "device_not_connected"
|
|
31
|
+
| "service_unavailable"
|
|
32
|
+
| "internal_error"
|
|
20
33
|
| "unknown";
|
package/src/generated/index.ts
CHANGED
|
@@ -188,6 +188,7 @@ export type { FindingUpdate } from './FindingUpdate';
|
|
|
188
188
|
export type { FindingUserInput } from './FindingUserInput';
|
|
189
189
|
export type { FindingsSummary } from './FindingsSummary';
|
|
190
190
|
export type { FlowEvent } from './FlowEvent';
|
|
191
|
+
export type { FrontierEntry } from './FrontierEntry';
|
|
191
192
|
export type { FullRunnerStep } from './FullRunnerStep';
|
|
192
193
|
export type { FunctionalSpec } from './FunctionalSpec';
|
|
193
194
|
export type { GUIElementChunk } from './GUIElementChunk';
|
|
@@ -241,6 +242,10 @@ export type { JobItem } from './JobItem';
|
|
|
241
242
|
export type { JobListResponse } from './JobListResponse';
|
|
242
243
|
export type { JobStatus } from './JobStatus';
|
|
243
244
|
export type { JobSummary } from './JobSummary';
|
|
245
|
+
export type { JourneyEdgeObservation } from './JourneyEdgeObservation';
|
|
246
|
+
export type { JourneyLedgerHealth } from './JourneyLedgerHealth';
|
|
247
|
+
export type { JourneyNode } from './JourneyNode';
|
|
248
|
+
export type { JourneyTrigger } from './JourneyTrigger';
|
|
244
249
|
export type { LLMCostSummary } from './LLMCostSummary';
|
|
245
250
|
export type { LLMMetrics } from './LLMMetrics';
|
|
246
251
|
export type { LegacyAssertion } from './LegacyAssertion';
|