oui-spec 0.5.0 → 0.6.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/README.md +18 -8
- package/dist/{chunk-XUX4XVP3.cjs → chunk-5UUJ3F7C.cjs} +49 -22
- package/dist/chunk-5UUJ3F7C.cjs.map +1 -0
- package/dist/{chunk-27CBVTA4.cjs → chunk-AFNWLRKV.cjs} +82 -18
- package/dist/chunk-AFNWLRKV.cjs.map +1 -0
- package/dist/{chunk-BNGJJM3T.js → chunk-B2EFZMGY.js} +40 -3
- package/dist/chunk-B2EFZMGY.js.map +1 -0
- package/dist/{chunk-2AISUNMW.cjs → chunk-LDECTDPU.cjs} +40 -2
- package/dist/chunk-LDECTDPU.cjs.map +1 -0
- package/dist/{chunk-UKKITNZK.js → chunk-R3SGP2UY.js} +49 -22
- package/dist/chunk-R3SGP2UY.js.map +1 -0
- package/dist/{chunk-6ZIKO7MG.js → chunk-VQETSIY5.js} +77 -13
- package/dist/chunk-VQETSIY5.js.map +1 -0
- package/dist/core/index.cjs +7 -7
- package/dist/core/index.d.cts +5 -5
- package/dist/core/index.d.ts +5 -5
- package/dist/core/index.js +3 -3
- package/dist/index.cjs +19 -15
- package/dist/index.d.cts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +3 -3
- package/dist/react/index.d.cts +3 -3
- package/dist/react/index.d.ts +3 -3
- package/dist/spec/index.cjs +13 -9
- package/dist/spec/index.d.cts +21 -360
- package/dist/spec/index.d.ts +21 -360
- package/dist/spec/index.js +1 -1
- package/dist/{surface-runtime-CS0rByFQ.d.ts → surface-runtime-CSZ9UtBO.d.cts} +10 -2
- package/dist/{surface-runtime-lqXn221P.d.cts → surface-runtime-D5nINY4b.d.ts} +10 -2
- package/dist/transport/index.cjs +2 -2
- package/dist/transport/index.d.cts +3 -3
- package/dist/transport/index.d.ts +3 -3
- package/dist/transport/index.js +1 -1
- package/dist/types-CmJb1BQ8.d.cts +403 -0
- package/dist/types-CmJb1BQ8.d.ts +403 -0
- package/dist/{websocket-YfWILdZ4.d.cts → websocket-Ce3tDSsJ.d.ts} +26 -7
- package/dist/{websocket-c5tIUWY5.d.ts → websocket-Ds2Rh_jL.d.cts} +26 -7
- package/package.json +1 -1
- package/spec/OUI-SPEC-v0.1.md +63 -7
- package/dist/chunk-27CBVTA4.cjs.map +0 -1
- package/dist/chunk-2AISUNMW.cjs.map +0 -1
- package/dist/chunk-6ZIKO7MG.js.map +0 -1
- package/dist/chunk-BNGJJM3T.js.map +0 -1
- package/dist/chunk-UKKITNZK.js.map +0 -1
- package/dist/chunk-XUX4XVP3.cjs.map +0 -1
|
@@ -0,0 +1,403 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Approvals: an irreversible action runs only on an approval the user gave,
|
|
3
|
+
* bound to the exact request.
|
|
4
|
+
*
|
|
5
|
+
* An agent runtime stops at an action that needs approval and shows the user
|
|
6
|
+
* a confirmation. Its approval store issues a single-use grant when the user
|
|
7
|
+
* confirms, and the request that then reaches the tab carries `approval:
|
|
8
|
+
* { approvalId, argsHash }`. The surface runtime runs the action only when
|
|
9
|
+
* that matches a grant this tab received from the user's own confirmation.
|
|
10
|
+
*
|
|
11
|
+
* Everything that checks a request computes the same args hash: SHA-256 over
|
|
12
|
+
* the RFC 8785 (JCS) canonical JSON of its params, lowercase hex. The
|
|
13
|
+
* published vectors (`oui-spec/approval-vectors.json`) hold every
|
|
14
|
+
* implementation, in any language, to it.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* What using an action does. One vocabulary for every kind of action, so an
|
|
18
|
+
* action is told apart by what it changes:
|
|
19
|
+
*
|
|
20
|
+
* | Effect | What it changes | Access |
|
|
21
|
+
* |---|---|---|
|
|
22
|
+
* | `view`, `selection`, `navigate`, `open` | What is shown | read |
|
|
23
|
+
* | `edit` | The document, one undo step | write |
|
|
24
|
+
* | `file` | Imports or exports a file | write |
|
|
25
|
+
* | `mutate` | Backend data, through an API operation | write |
|
|
26
|
+
* | `job` | Starts work that outlives the call | write |
|
|
27
|
+
* | `transaction` | An irreversible external act: an order, a payment, a send, a publish | write, approved |
|
|
28
|
+
*/
|
|
29
|
+
type OUIEffectKind = "view" | "selection" | "navigate" | "open" | "edit" | "file" | "mutate" | "job" | "transaction";
|
|
30
|
+
/** Every effect, in the order of the table above. */
|
|
31
|
+
declare const OUI_EFFECT_KINDS: readonly OUIEffectKind[];
|
|
32
|
+
/** Whether an effect only changes what is shown, or changes something. */
|
|
33
|
+
declare const OUI_EFFECT_ACCESS: Readonly<Record<OUIEffectKind, "read" | "write">>;
|
|
34
|
+
/** `read` or `write`. An action that declares no effect is a `write`: nothing says it only shows. */
|
|
35
|
+
declare function effectAccess(effect: OUIEffectKind | undefined): "read" | "write";
|
|
36
|
+
/**
|
|
37
|
+
* Whether running an action needs the user's approval of the exact request: a
|
|
38
|
+
* `transaction` always, and a `write` declared destructive. An agent
|
|
39
|
+
* runtime's policy may require it of more; nothing waives these.
|
|
40
|
+
*/
|
|
41
|
+
declare function requiresApproval(effect: OUIEffectKind | undefined, destructive?: boolean): boolean;
|
|
42
|
+
/** What a request for an approved action carries. */
|
|
43
|
+
interface OUIActionApproval {
|
|
44
|
+
approvalId: string;
|
|
45
|
+
/** `argsHash(params)` of the request the user approved. */
|
|
46
|
+
argsHash: string;
|
|
47
|
+
}
|
|
48
|
+
/** A grant this tab holds: the user approved this request here. */
|
|
49
|
+
interface OUIApprovalGrant extends OUIActionApproval {
|
|
50
|
+
/** Epoch ms after which the grant no longer admits anything. */
|
|
51
|
+
expiresAt: number;
|
|
52
|
+
}
|
|
53
|
+
/** An args hash: 64 lowercase hex digits. */
|
|
54
|
+
declare const ARGS_HASH_PATTERN: RegExp;
|
|
55
|
+
/**
|
|
56
|
+
* The RFC 8785 canonical form of a JSON value:
|
|
57
|
+
* - object members sorted by their names' UTF-16 code units, with no
|
|
58
|
+
* whitespace;
|
|
59
|
+
* - numbers in ECMAScript's shortest round-trip form (`-0` is `0`);
|
|
60
|
+
* - strings escaped as ECMAScript's `JSON.stringify` escapes them.
|
|
61
|
+
*
|
|
62
|
+
* The value must be I-JSON (RFC 7493): anything JSON cannot carry — `NaN`,
|
|
63
|
+
* infinities, `undefined` outside an object member, a bigint, a function, a
|
|
64
|
+
* symbol, a class instance, or a string with a lone surrogate — is refused
|
|
65
|
+
* rather than hashed as something the other end never receives. An object
|
|
66
|
+
* member whose value is `undefined` is left out, as it is on the wire.
|
|
67
|
+
*/
|
|
68
|
+
declare function canonicalJson(value: unknown): string;
|
|
69
|
+
/** SHA-256 of the canonical JSON of a request's params, lowercase hex. Runs wherever WebCrypto does. */
|
|
70
|
+
declare function argsHash(params: unknown): Promise<string>;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* OUI — Open UI Specification
|
|
74
|
+
*
|
|
75
|
+
* The machine-readable contract for agent-controllable user interfaces.
|
|
76
|
+
* Any UI application that implements this interface can be controlled by
|
|
77
|
+
* any OUI-compatible agent runtime.
|
|
78
|
+
*/
|
|
79
|
+
/** JSON Schema type (subset used by OUI) */
|
|
80
|
+
type JSONSchema = {
|
|
81
|
+
type?: string | string[];
|
|
82
|
+
properties?: Record<string, JSONSchema>;
|
|
83
|
+
items?: JSONSchema;
|
|
84
|
+
required?: string[];
|
|
85
|
+
enum?: (string | number | boolean)[];
|
|
86
|
+
description?: string;
|
|
87
|
+
default?: unknown;
|
|
88
|
+
oneOf?: JSONSchema[];
|
|
89
|
+
anyOf?: JSONSchema[];
|
|
90
|
+
allOf?: JSONSchema[];
|
|
91
|
+
const?: unknown;
|
|
92
|
+
minimum?: number;
|
|
93
|
+
maximum?: number;
|
|
94
|
+
minLength?: number;
|
|
95
|
+
maxLength?: number;
|
|
96
|
+
pattern?: string;
|
|
97
|
+
format?: string;
|
|
98
|
+
additionalProperties?: boolean | JSONSchema;
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* A Surface is a controllable boundary within an application.
|
|
102
|
+
* It declares what an agent can do (actions), what it can observe (state),
|
|
103
|
+
* and when it's available (activation conditions).
|
|
104
|
+
*
|
|
105
|
+
* Think of it as "one page" or "one feature" of an application, described
|
|
106
|
+
* in a way that an agent can understand and operate.
|
|
107
|
+
*/
|
|
108
|
+
interface OUISurface {
|
|
109
|
+
/** Unique identifier for this surface (e.g., 'dataviz-wizard', 'document-editor') */
|
|
110
|
+
id: string;
|
|
111
|
+
/** Human-readable name */
|
|
112
|
+
name: string;
|
|
113
|
+
/** Description of what this surface does — included in agent context */
|
|
114
|
+
description: string;
|
|
115
|
+
/** Version of this surface's contract (semver) */
|
|
116
|
+
version?: string;
|
|
117
|
+
/** Actions the agent can invoke on this surface */
|
|
118
|
+
actions: OUIAction[];
|
|
119
|
+
/** Observable state the agent can read */
|
|
120
|
+
observations?: OUIObservation[];
|
|
121
|
+
/** When this surface is active/available */
|
|
122
|
+
activation?: OUIActivation;
|
|
123
|
+
/** Additional metadata for agent context */
|
|
124
|
+
metadata?: Record<string, unknown>;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Declarative polling configuration for async actions.
|
|
128
|
+
* The OUI runtime in the browser manages the polling lifecycle automatically
|
|
129
|
+
* after the action handler returns its dispatch result.
|
|
130
|
+
*/
|
|
131
|
+
interface OUIActionPolling {
|
|
132
|
+
/** How often to check (milliseconds) */
|
|
133
|
+
intervalMs: number;
|
|
134
|
+
/** Max poll attempts before giving up (optional) */
|
|
135
|
+
maxAttempts?: number;
|
|
136
|
+
/** Max total duration before giving up in ms (alternative to maxAttempts) */
|
|
137
|
+
maxDurationMs?: number;
|
|
138
|
+
/**
|
|
139
|
+
* Subscribe to a realtime event instead of polling.
|
|
140
|
+
* If provided, the runtime listens for this event instead of using setInterval.
|
|
141
|
+
* More efficient when realtime infrastructure exists.
|
|
142
|
+
*/
|
|
143
|
+
subscribe?: {
|
|
144
|
+
/** Event name to listen for */
|
|
145
|
+
event: string;
|
|
146
|
+
/**
|
|
147
|
+
* Filter to match the event. Values prefixed with '$dispatchResult.'
|
|
148
|
+
* are resolved from the handler's return value.
|
|
149
|
+
* Example: { jobId: '$dispatchResult.jobId' }
|
|
150
|
+
*/
|
|
151
|
+
filter?: Record<string, unknown>;
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* An Action is a single operation an agent can perform on a surface.
|
|
156
|
+
* Each action becomes a "tool" that the LLM can call.
|
|
157
|
+
*
|
|
158
|
+
* The action's handler executes in the UI (or API) and returns a result
|
|
159
|
+
* that the agent sees as the tool's output.
|
|
160
|
+
*/
|
|
161
|
+
interface OUIAction {
|
|
162
|
+
/** Unique action identifier (becomes the tool name) */
|
|
163
|
+
id: string;
|
|
164
|
+
/** Human-readable description — this is what the LLM reads to decide when to use it */
|
|
165
|
+
description: string;
|
|
166
|
+
/** The action's name as a person reads it, for a confirmation the user approves. */
|
|
167
|
+
title?: string;
|
|
168
|
+
/**
|
|
169
|
+
* What using the action does. A `transaction` runs only on the user's
|
|
170
|
+
* approval of the exact request (see `requiresApproval`). Undeclared counts
|
|
171
|
+
* as a write.
|
|
172
|
+
*/
|
|
173
|
+
effect?: OUIEffectKind;
|
|
174
|
+
/** JSON Schema for the action's input parameters */
|
|
175
|
+
input: JSONSchema;
|
|
176
|
+
/** JSON Schema for the action's return value (optional — agent still gets the result) */
|
|
177
|
+
output?: JSONSchema;
|
|
178
|
+
/**
|
|
179
|
+
* Destructive: the action removes or replaces something the person made.
|
|
180
|
+
* Unless its effect only reads, it runs only on the user's approval of the
|
|
181
|
+
* exact request, which the surface runtime checks before it runs.
|
|
182
|
+
*/
|
|
183
|
+
confirm?: boolean;
|
|
184
|
+
/** If true, the action is async — returns immediately with a job/tracking ID */
|
|
185
|
+
async?: boolean;
|
|
186
|
+
/** Declarative polling configuration — runtime manages the polling lifecycle after dispatch */
|
|
187
|
+
polling?: OUIActionPolling;
|
|
188
|
+
/** Human-readable hint about when this action is appropriate to use */
|
|
189
|
+
usage?: string;
|
|
190
|
+
/**
|
|
191
|
+
* Preconditions that should be met before this action is called.
|
|
192
|
+
* Expressed as a description (for the LLM) not as executable logic.
|
|
193
|
+
*/
|
|
194
|
+
preconditions?: string;
|
|
195
|
+
/** Estimated duration hint (e.g., "instant", "2-5s", "30-120s") */
|
|
196
|
+
estimatedDuration?: string;
|
|
197
|
+
/** Tags for categorization */
|
|
198
|
+
tags?: string[];
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* An Observation is a piece of application state that the agent can read.
|
|
202
|
+
* Observations are pushed to the agent in real-time as the app state changes,
|
|
203
|
+
* giving it situational awareness without needing screenshots.
|
|
204
|
+
*/
|
|
205
|
+
interface OUIObservation {
|
|
206
|
+
/** Unique identifier for this observation */
|
|
207
|
+
id: string;
|
|
208
|
+
/** Description of what this observation represents */
|
|
209
|
+
description: string;
|
|
210
|
+
/** JSON Schema for the observation's value */
|
|
211
|
+
schema: JSONSchema;
|
|
212
|
+
/** How frequently this observation updates */
|
|
213
|
+
updateFrequency?: "realtime" | "on-change" | "polling";
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Activation conditions — when a surface is available to the agent.
|
|
217
|
+
* A surface might only be active on a specific page, when certain
|
|
218
|
+
* entities are loaded, or under specific application states.
|
|
219
|
+
*/
|
|
220
|
+
interface OUIActivation {
|
|
221
|
+
/** URL path(s) where this surface is active */
|
|
222
|
+
routes?: string | string[];
|
|
223
|
+
/** Entity type/ID that must be present for this surface to activate */
|
|
224
|
+
entity?: {
|
|
225
|
+
type: string;
|
|
226
|
+
id?: string;
|
|
227
|
+
};
|
|
228
|
+
/** Custom predicate description (for documentation, not execution) */
|
|
229
|
+
condition?: string;
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* A request from the agent runtime to execute an action on a surface.
|
|
233
|
+
*/
|
|
234
|
+
interface OUIActionRequest {
|
|
235
|
+
/** Unique request ID for correlation */
|
|
236
|
+
requestId: string;
|
|
237
|
+
/** Which surface this request targets */
|
|
238
|
+
surfaceId: string;
|
|
239
|
+
/** Which action to invoke */
|
|
240
|
+
actionId: string;
|
|
241
|
+
/** The action's input parameters (validated against the action's input schema) */
|
|
242
|
+
params: Record<string, unknown>;
|
|
243
|
+
/** Timestamp of the request */
|
|
244
|
+
timestamp: number;
|
|
245
|
+
/**
|
|
246
|
+
* The user's approval this request runs on, for an action that needs one.
|
|
247
|
+
* The surface runtime runs such an action only when this matches a grant
|
|
248
|
+
* the tab received from the user's own confirmation, for exactly `params`.
|
|
249
|
+
*/
|
|
250
|
+
approval?: OUIActionApproval;
|
|
251
|
+
/**
|
|
252
|
+
* The `surfacesHash` of the surfaces the agent runtime already holds for
|
|
253
|
+
* this client: from its snapshot, or from an earlier result. A client whose
|
|
254
|
+
* surfaces still hash to this answers without `surfaces`, so a result
|
|
255
|
+
* carries the client's surfaces only when they changed (§7.3.4).
|
|
256
|
+
*/
|
|
257
|
+
knownSurfaces?: string;
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Why a client's answer is shorter than the result it produced: the receiving
|
|
261
|
+
* side refused the full answer (too large, or otherwise not accepted), so the
|
|
262
|
+
* client sent it again without the parts named in `omitted`. The action's own
|
|
263
|
+
* outcome — `success`, `error`, and `data` unless omitted — is still the one
|
|
264
|
+
* that happened (§7.3.6).
|
|
265
|
+
*/
|
|
266
|
+
interface OUIResultDelivery {
|
|
267
|
+
trimmed: true;
|
|
268
|
+
/** What the receiving side said when it refused the full answer. */
|
|
269
|
+
reason: string;
|
|
270
|
+
/** The fields left out of this answer. */
|
|
271
|
+
omitted: Array<"surfaces" | "observations" | "data">;
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* The result of an action execution, returned from the surface to the agent.
|
|
275
|
+
*/
|
|
276
|
+
interface OUIActionResult {
|
|
277
|
+
/** Correlates to the request */
|
|
278
|
+
requestId: string;
|
|
279
|
+
/** Whether the action succeeded */
|
|
280
|
+
success: boolean;
|
|
281
|
+
/** The action's return data (if successful) */
|
|
282
|
+
data?: unknown;
|
|
283
|
+
/** Error information (if failed) */
|
|
284
|
+
error?: {
|
|
285
|
+
code: string;
|
|
286
|
+
message: string;
|
|
287
|
+
details?: unknown;
|
|
288
|
+
};
|
|
289
|
+
/** Progress indicator for interim polling results (0-100) */
|
|
290
|
+
progress?: number;
|
|
291
|
+
/** Whether this is an interim update (polling still in progress) or final */
|
|
292
|
+
interim?: boolean;
|
|
293
|
+
/** Duration of execution in milliseconds */
|
|
294
|
+
durationMs?: number;
|
|
295
|
+
/** Timestamp of the result */
|
|
296
|
+
timestamp: number;
|
|
297
|
+
/**
|
|
298
|
+
* The surfaces active on the client once the action's effects settled.
|
|
299
|
+
*
|
|
300
|
+
* An action can change what the agent is able to do next: navigating
|
|
301
|
+
* unmounts one page's surfaces and mounts another's. Without this, the agent
|
|
302
|
+
* would act on the capability set it had before the action, which is the
|
|
303
|
+
* set the action just replaced.
|
|
304
|
+
*/
|
|
305
|
+
surfaces?: OUISurface[];
|
|
306
|
+
/** Latest observation values per surface once the action's effects settled. */
|
|
307
|
+
observations?: OUIObservationSnapshot;
|
|
308
|
+
/**
|
|
309
|
+
* The hash of the client's surfaces once the action's effects settled
|
|
310
|
+
* (`surfacesHash`). Always present from a client that sends it; `surfaces`
|
|
311
|
+
* is then present only when this differs from the request's
|
|
312
|
+
* `knownSurfaces`, and an agent runtime that holds surfaces with this hash
|
|
313
|
+
* keeps using them.
|
|
314
|
+
*/
|
|
315
|
+
surfacesHash?: string;
|
|
316
|
+
/** Present when this answer was trimmed to be delivered (§7.3.6). */
|
|
317
|
+
delivery?: OUIResultDelivery;
|
|
318
|
+
/**
|
|
319
|
+
* False when the client's deadline passed before its UI settled, so
|
|
320
|
+
* `surfaces` and `observations` may still be changing. Absent or true
|
|
321
|
+
* otherwise.
|
|
322
|
+
*/
|
|
323
|
+
settled?: boolean;
|
|
324
|
+
}
|
|
325
|
+
/** Latest observation values, keyed by surface id and then observation id. */
|
|
326
|
+
type OUIObservationSnapshot = Record<string, Record<string, unknown>>;
|
|
327
|
+
/**
|
|
328
|
+
* What a client can do right now: the surfaces it has mounted and their latest
|
|
329
|
+
* observation values. A client sends this to its agent runtime (for example,
|
|
330
|
+
* with each turn), and returns it on every action result.
|
|
331
|
+
*/
|
|
332
|
+
interface OUISurfaceSnapshot {
|
|
333
|
+
surfaces: OUISurface[];
|
|
334
|
+
observations: OUIObservationSnapshot;
|
|
335
|
+
/**
|
|
336
|
+
* `surfacesHash(surfaces)`: what an agent runtime sends back as a request's
|
|
337
|
+
* `knownSurfaces`, so the client's answer need not repeat surfaces the
|
|
338
|
+
* runtime already holds.
|
|
339
|
+
*/
|
|
340
|
+
surfacesHash?: string;
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* An observation update pushed from the surface to the agent.
|
|
344
|
+
*/
|
|
345
|
+
interface OUIObservationUpdate {
|
|
346
|
+
/** Which surface this observation belongs to */
|
|
347
|
+
surfaceId: string;
|
|
348
|
+
/** Which observation updated */
|
|
349
|
+
observationId: string;
|
|
350
|
+
/** The new value */
|
|
351
|
+
value: unknown;
|
|
352
|
+
/** Timestamp of the update */
|
|
353
|
+
timestamp: number;
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* Surface registration event — sent when a surface becomes active.
|
|
357
|
+
*/
|
|
358
|
+
interface OUISurfaceRegistration {
|
|
359
|
+
/** The full surface manifest */
|
|
360
|
+
surface: OUISurface;
|
|
361
|
+
/** Timestamp of registration */
|
|
362
|
+
timestamp: number;
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* Surface deregistration event — sent when a surface becomes inactive.
|
|
366
|
+
*/
|
|
367
|
+
interface OUISurfaceDeregistration {
|
|
368
|
+
/** Which surface is being deregistered */
|
|
369
|
+
surfaceId: string;
|
|
370
|
+
/** Timestamp */
|
|
371
|
+
timestamp: number;
|
|
372
|
+
}
|
|
373
|
+
/**
|
|
374
|
+
* All protocol events exchanged between agent runtime and surfaces.
|
|
375
|
+
*/
|
|
376
|
+
type OUIProtocolEvent = {
|
|
377
|
+
type: "surface:register";
|
|
378
|
+
payload: OUISurfaceRegistration;
|
|
379
|
+
} | {
|
|
380
|
+
type: "surface:deregister";
|
|
381
|
+
payload: OUISurfaceDeregistration;
|
|
382
|
+
} | {
|
|
383
|
+
type: "action:request";
|
|
384
|
+
payload: OUIActionRequest;
|
|
385
|
+
} | {
|
|
386
|
+
type: "action:result";
|
|
387
|
+
payload: OUIActionResult;
|
|
388
|
+
} | {
|
|
389
|
+
type: "observation:update";
|
|
390
|
+
payload: OUIObservationUpdate;
|
|
391
|
+
};
|
|
392
|
+
/**
|
|
393
|
+
* Protocol event type strings (for type guards and routing).
|
|
394
|
+
*/
|
|
395
|
+
declare const OUI_PROTOCOL_EVENTS: {
|
|
396
|
+
readonly SURFACE_REGISTER: "surface:register";
|
|
397
|
+
readonly SURFACE_DEREGISTER: "surface:deregister";
|
|
398
|
+
readonly ACTION_REQUEST: "action:request";
|
|
399
|
+
readonly ACTION_RESULT: "action:result";
|
|
400
|
+
readonly OBSERVATION_UPDATE: "observation:update";
|
|
401
|
+
};
|
|
402
|
+
|
|
403
|
+
export { ARGS_HASH_PATTERN as A, type JSONSchema as J, type OUIAction as O, type OUIActionApproval as a, type OUIActionPolling as b, type OUIActionRequest as c, type OUIActionResult as d, type OUIActivation as e, type OUIApprovalGrant as f, type OUIEffectKind as g, type OUIObservation as h, type OUIObservationSnapshot as i, type OUIObservationUpdate as j, type OUIProtocolEvent as k, type OUIResultDelivery as l, type OUISurface as m, type OUISurfaceDeregistration as n, type OUISurfaceRegistration as o, type OUISurfaceSnapshot as p, OUI_EFFECT_ACCESS as q, OUI_EFFECT_KINDS as r, OUI_PROTOCOL_EVENTS as s, argsHash as t, canonicalJson as u, effectAccess as v, requiresApproval as w };
|