@qontinui/shared-types 0.2.3 → 0.2.4
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/tauri-events.d.cts +114 -1
- package/dist/tauri-events.d.ts +114 -1
- package/dist/ui-bridge-ir.cjs +37 -0
- package/dist/ui-bridge-ir.cjs.map +1 -1
- package/dist/ui-bridge-ir.d.cts +90 -1
- package/dist/ui-bridge-ir.d.ts +90 -1
- package/dist/ui-bridge-ir.js +37 -0
- package/dist/ui-bridge-ir.js.map +1 -1
- package/package.json +1 -1
- package/src/generated/UiBridgeRequestEnvelope.d.ts +45 -0
- package/src/generated/UiBridgeResponseEnvelope.d.ts +66 -0
- package/src/generated/index.ts +432 -430
- package/src/tauri-events/_api.ts +14 -0
- package/src/ui-bridge-ir/document.ts +9 -0
- package/src/ui-bridge-ir/group.ts +84 -0
- package/src/ui-bridge-ir/index.ts +1 -0
- package/src/ui-bridge-ir/ir.schema.json +58 -0
- package/src/ui-bridge-ir/projection.ts +58 -0
|
@@ -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
|
+
/**
|
|
9
|
+
* Wire envelope for `ui-bridge-response` events emitted by the React
|
|
10
|
+
* frontend in response to a [`UiBridgeRequestEnvelope`].
|
|
11
|
+
*
|
|
12
|
+
* The runner-side dispatcher in
|
|
13
|
+
* `mcp::ui_bridge::request::handle_ui_bridge_response` matches `request_id`
|
|
14
|
+
* to a pending oneshot sender and forwards the inner `data` to the awaiting
|
|
15
|
+
* caller; `success`, `error`, `hint`, and `timestamp` are surfaced via
|
|
16
|
+
* `wrap_ipc_result`'s F2 two-tier envelope flattening.
|
|
17
|
+
*
|
|
18
|
+
* `data`, `error`, and `hint` are all optional. The hint sibling carries
|
|
19
|
+
* closest-match / recovery hints (set by frontend handlers like
|
|
20
|
+
* `useControlEvents` for typo recovery on element-not-found and
|
|
21
|
+
* action-not-allowed) and stays a sibling of `error` — the success/error
|
|
22
|
+
* envelope shape is unchanged.
|
|
23
|
+
*/
|
|
24
|
+
export interface UiBridgeResponseEnvelope {
|
|
25
|
+
/**
|
|
26
|
+
* Inner data payload on success. Frontend handlers set this to whatever
|
|
27
|
+
* shape the operation returns (e.g. an `elements` array for
|
|
28
|
+
* `get_elements`, a discovery report for `discover`, etc.).
|
|
29
|
+
*/
|
|
30
|
+
data?: {
|
|
31
|
+
[k: string]: unknown;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Error message on failure. Mirrors the inner-failure path of
|
|
35
|
+
* `wrap_ipc_result`'s F2 two-tier envelope flattening.
|
|
36
|
+
*/
|
|
37
|
+
error?: string | null;
|
|
38
|
+
/**
|
|
39
|
+
* Optional closest-match / recovery hint payload. Sibling field to
|
|
40
|
+
* `error` (does NOT replace the success/error envelope shape). Used by
|
|
41
|
+
* `useControlEvents` for element-not-found / action-not-allowed typo
|
|
42
|
+
* recovery and by Rust `page.rs` for eval-rejected workaround guidance.
|
|
43
|
+
*/
|
|
44
|
+
hint?: {
|
|
45
|
+
[k: string]: unknown;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Echoes the request's [`UiBridgeRequestEnvelope::request_id`].
|
|
49
|
+
*/
|
|
50
|
+
requestId: string;
|
|
51
|
+
/**
|
|
52
|
+
* Whether the frontend handler succeeded.
|
|
53
|
+
*/
|
|
54
|
+
success: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Frontend-side timestamp (ms since Unix epoch) of when the response was
|
|
57
|
+
* produced.
|
|
58
|
+
*/
|
|
59
|
+
timestamp: number;
|
|
60
|
+
/**
|
|
61
|
+
* Echoes the request's [`UiBridgeRequestEnvelope::request_type`].
|
|
62
|
+
* Serializes as `type` to match the wire.
|
|
63
|
+
*/
|
|
64
|
+
type: string;
|
|
65
|
+
[k: string]: unknown;
|
|
66
|
+
}
|