oui-spec 0.13.0 → 0.14.1

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 (39) hide show
  1. package/README.md +13 -0
  2. package/dist/attachments-BCmbKN2x.d.cts +62 -0
  3. package/dist/attachments-D7iw6dNY.d.ts +62 -0
  4. package/dist/{chunk-3EMDNYQD.js → chunk-D5V5KJ6H.js} +4 -3
  5. package/dist/chunk-D5V5KJ6H.js.map +1 -0
  6. package/dist/{chunk-YOJABWGB.cjs → chunk-GKLZSM6N.cjs} +4 -2
  7. package/dist/chunk-GKLZSM6N.cjs.map +1 -0
  8. package/dist/{chunk-O3C76FAO.js → chunk-TGYTMFXH.js} +38 -10
  9. package/dist/chunk-TGYTMFXH.js.map +1 -0
  10. package/dist/{chunk-XHJILEMN.cjs → chunk-XWR3IM4C.cjs} +68 -41
  11. package/dist/chunk-XWR3IM4C.cjs.map +1 -0
  12. package/dist/core/index.cjs +11 -11
  13. package/dist/core/index.d.cts +6 -5
  14. package/dist/core/index.d.ts +6 -5
  15. package/dist/core/index.js +2 -2
  16. package/dist/index.cjs +52 -52
  17. package/dist/index.d.cts +5 -4
  18. package/dist/index.d.ts +5 -4
  19. package/dist/index.js +2 -2
  20. package/dist/react/index.d.cts +3 -3
  21. package/dist/react/index.d.ts +3 -3
  22. package/dist/spec/index.cjs +47 -43
  23. package/dist/spec/index.d.cts +4 -60
  24. package/dist/spec/index.d.ts +4 -60
  25. package/dist/spec/index.js +1 -1
  26. package/dist/{surface-runtime-BIekR9rL.d.cts → surface-runtime-DkJp7b3F.d.ts} +20 -5
  27. package/dist/{surface-runtime-DXEFMXK7.d.ts → surface-runtime-l4L1dqK5.d.cts} +20 -5
  28. package/dist/transport/index.d.cts +3 -3
  29. package/dist/transport/index.d.ts +3 -3
  30. package/dist/{types-6doPwE6g.d.cts → types-BNUECkjl.d.cts} +24 -1
  31. package/dist/{types-6doPwE6g.d.ts → types-BNUECkjl.d.ts} +24 -1
  32. package/dist/{websocket-DHbDDwvt.d.ts → websocket-BlQDrFtE.d.ts} +1 -1
  33. package/dist/{websocket-CCpPMZ5a.d.cts → websocket-sj4FmEZD.d.cts} +1 -1
  34. package/package.json +1 -1
  35. package/spec/OUI-SPEC-v0.1.md +1 -0
  36. package/dist/chunk-3EMDNYQD.js.map +0 -1
  37. package/dist/chunk-O3C76FAO.js.map +0 -1
  38. package/dist/chunk-XHJILEMN.cjs.map +0 -1
  39. package/dist/chunk-YOJABWGB.cjs.map +0 -1
@@ -1,176 +1,180 @@
1
1
  'use strict';
2
2
 
3
- var chunkYOJABWGB_cjs = require('../chunk-YOJABWGB.cjs');
3
+ var chunkGKLZSM6N_cjs = require('../chunk-GKLZSM6N.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "ARGS_HASH_PATTERN", {
8
8
  enumerable: true,
9
- get: function () { return chunkYOJABWGB_cjs.ARGS_HASH_PATTERN; }
9
+ get: function () { return chunkGKLZSM6N_cjs.ARGS_HASH_PATTERN; }
10
10
  });
11
11
  Object.defineProperty(exports, "ATTACHMENT_ID_PATTERN", {
12
12
  enumerable: true,
13
- get: function () { return chunkYOJABWGB_cjs.ATTACHMENT_ID_PATTERN; }
13
+ get: function () { return chunkGKLZSM6N_cjs.ATTACHMENT_ID_PATTERN; }
14
+ });
15
+ Object.defineProperty(exports, "ATTACHMENT_LIST_MAX", {
16
+ enumerable: true,
17
+ get: function () { return chunkGKLZSM6N_cjs.ATTACHMENT_LIST_MAX; }
14
18
  });
15
19
  Object.defineProperty(exports, "DEFINITION_HASH_HEX", {
16
20
  enumerable: true,
17
- get: function () { return chunkYOJABWGB_cjs.DEFINITION_HASH_HEX; }
21
+ get: function () { return chunkGKLZSM6N_cjs.DEFINITION_HASH_HEX; }
18
22
  });
19
23
  Object.defineProperty(exports, "FIT_LIST_STEPS", {
20
24
  enumerable: true,
21
- get: function () { return chunkYOJABWGB_cjs.FIT_LIST_STEPS; }
25
+ get: function () { return chunkGKLZSM6N_cjs.FIT_LIST_STEPS; }
22
26
  });
23
27
  Object.defineProperty(exports, "FIT_TEXT_CHARS", {
24
28
  enumerable: true,
25
- get: function () { return chunkYOJABWGB_cjs.FIT_TEXT_CHARS; }
29
+ get: function () { return chunkGKLZSM6N_cjs.FIT_TEXT_CHARS; }
26
30
  });
27
31
  Object.defineProperty(exports, "INDEX_DESCRIPTION_CHARS", {
28
32
  enumerable: true,
29
- get: function () { return chunkYOJABWGB_cjs.INDEX_DESCRIPTION_CHARS; }
33
+ get: function () { return chunkGKLZSM6N_cjs.INDEX_DESCRIPTION_CHARS; }
30
34
  });
31
35
  Object.defineProperty(exports, "INDEX_INPUT_CHARS", {
32
36
  enumerable: true,
33
- get: function () { return chunkYOJABWGB_cjs.INDEX_INPUT_CHARS; }
37
+ get: function () { return chunkGKLZSM6N_cjs.INDEX_INPUT_CHARS; }
34
38
  });
35
39
  Object.defineProperty(exports, "INDEX_INPUT_PROPERTIES", {
36
40
  enumerable: true,
37
- get: function () { return chunkYOJABWGB_cjs.INDEX_INPUT_PROPERTIES; }
41
+ get: function () { return chunkGKLZSM6N_cjs.INDEX_INPUT_PROPERTIES; }
38
42
  });
39
43
  Object.defineProperty(exports, "OUI_ATTACHMENT_FORMAT", {
40
44
  enumerable: true,
41
- get: function () { return chunkYOJABWGB_cjs.OUI_ATTACHMENT_FORMAT; }
45
+ get: function () { return chunkGKLZSM6N_cjs.OUI_ATTACHMENT_FORMAT; }
42
46
  });
43
47
  Object.defineProperty(exports, "OUI_DESCRIBE_ACTION", {
44
48
  enumerable: true,
45
- get: function () { return chunkYOJABWGB_cjs.OUI_DESCRIBE_ACTION; }
49
+ get: function () { return chunkGKLZSM6N_cjs.OUI_DESCRIBE_ACTION; }
46
50
  });
47
51
  Object.defineProperty(exports, "OUI_EFFECT_ACCESS", {
48
52
  enumerable: true,
49
- get: function () { return chunkYOJABWGB_cjs.OUI_EFFECT_ACCESS; }
53
+ get: function () { return chunkGKLZSM6N_cjs.OUI_EFFECT_ACCESS; }
50
54
  });
51
55
  Object.defineProperty(exports, "OUI_EFFECT_KINDS", {
52
56
  enumerable: true,
53
- get: function () { return chunkYOJABWGB_cjs.OUI_EFFECT_KINDS; }
57
+ get: function () { return chunkGKLZSM6N_cjs.OUI_EFFECT_KINDS; }
54
58
  });
55
59
  Object.defineProperty(exports, "OUI_PROTOCOL_EVENTS", {
56
60
  enumerable: true,
57
- get: function () { return chunkYOJABWGB_cjs.OUI_PROTOCOL_EVENTS; }
61
+ get: function () { return chunkGKLZSM6N_cjs.OUI_PROTOCOL_EVENTS; }
58
62
  });
59
63
  Object.defineProperty(exports, "OUI_READ_ACTION", {
60
64
  enumerable: true,
61
- get: function () { return chunkYOJABWGB_cjs.OUI_READ_ACTION; }
65
+ get: function () { return chunkGKLZSM6N_cjs.OUI_READ_ACTION; }
62
66
  });
63
67
  Object.defineProperty(exports, "OUI_RUNTIME_SURFACE", {
64
68
  enumerable: true,
65
- get: function () { return chunkYOJABWGB_cjs.OUI_RUNTIME_SURFACE; }
69
+ get: function () { return chunkGKLZSM6N_cjs.OUI_RUNTIME_SURFACE; }
66
70
  });
67
71
  Object.defineProperty(exports, "acceptsMediaType", {
68
72
  enumerable: true,
69
- get: function () { return chunkYOJABWGB_cjs.acceptsMediaType; }
73
+ get: function () { return chunkGKLZSM6N_cjs.acceptsMediaType; }
70
74
  });
71
75
  Object.defineProperty(exports, "argsHash", {
72
76
  enumerable: true,
73
- get: function () { return chunkYOJABWGB_cjs.argsHash; }
77
+ get: function () { return chunkGKLZSM6N_cjs.argsHash; }
74
78
  });
75
79
  Object.defineProperty(exports, "atPointer", {
76
80
  enumerable: true,
77
- get: function () { return chunkYOJABWGB_cjs.atPointer; }
81
+ get: function () { return chunkGKLZSM6N_cjs.atPointer; }
78
82
  });
79
83
  Object.defineProperty(exports, "attachmentIdsIn", {
80
84
  enumerable: true,
81
- get: function () { return chunkYOJABWGB_cjs.attachmentIdsIn; }
85
+ get: function () { return chunkGKLZSM6N_cjs.attachmentIdsIn; }
82
86
  });
83
87
  Object.defineProperty(exports, "attachmentInputOf", {
84
88
  enumerable: true,
85
- get: function () { return chunkYOJABWGB_cjs.attachmentInputOf; }
89
+ get: function () { return chunkGKLZSM6N_cjs.attachmentInputOf; }
86
90
  });
87
91
  Object.defineProperty(exports, "attachmentInputs", {
88
92
  enumerable: true,
89
- get: function () { return chunkYOJABWGB_cjs.attachmentInputs; }
93
+ get: function () { return chunkGKLZSM6N_cjs.attachmentInputs; }
90
94
  });
91
95
  Object.defineProperty(exports, "canonicalJson", {
92
96
  enumerable: true,
93
- get: function () { return chunkYOJABWGB_cjs.canonicalJson; }
97
+ get: function () { return chunkGKLZSM6N_cjs.canonicalJson; }
94
98
  });
95
99
  Object.defineProperty(exports, "constantOf", {
96
100
  enumerable: true,
97
- get: function () { return chunkYOJABWGB_cjs.constantOf; }
101
+ get: function () { return chunkGKLZSM6N_cjs.constantOf; }
98
102
  });
99
103
  Object.defineProperty(exports, "definitionHash", {
100
104
  enumerable: true,
101
- get: function () { return chunkYOJABWGB_cjs.definitionHash; }
105
+ get: function () { return chunkGKLZSM6N_cjs.definitionHash; }
102
106
  });
103
107
  Object.defineProperty(exports, "discriminatorOf", {
104
108
  enumerable: true,
105
- get: function () { return chunkYOJABWGB_cjs.discriminatorOf; }
109
+ get: function () { return chunkGKLZSM6N_cjs.discriminatorOf; }
106
110
  });
107
111
  Object.defineProperty(exports, "effectAccess", {
108
112
  enumerable: true,
109
- get: function () { return chunkYOJABWGB_cjs.effectAccess; }
113
+ get: function () { return chunkGKLZSM6N_cjs.effectAccess; }
110
114
  });
111
115
  Object.defineProperty(exports, "firstSentence", {
112
116
  enumerable: true,
113
- get: function () { return chunkYOJABWGB_cjs.firstSentence; }
117
+ get: function () { return chunkGKLZSM6N_cjs.firstSentence; }
114
118
  });
115
119
  Object.defineProperty(exports, "fitObservations", {
116
120
  enumerable: true,
117
- get: function () { return chunkYOJABWGB_cjs.fitObservations; }
121
+ get: function () { return chunkGKLZSM6N_cjs.fitObservations; }
118
122
  });
119
123
  Object.defineProperty(exports, "indexEntry", {
120
124
  enumerable: true,
121
- get: function () { return chunkYOJABWGB_cjs.indexEntry; }
125
+ get: function () { return chunkGKLZSM6N_cjs.indexEntry; }
122
126
  });
123
127
  Object.defineProperty(exports, "isAttachmentId", {
124
128
  enumerable: true,
125
- get: function () { return chunkYOJABWGB_cjs.isAttachmentId; }
129
+ get: function () { return chunkGKLZSM6N_cjs.isAttachmentId; }
126
130
  });
127
131
  Object.defineProperty(exports, "jsonBytes", {
128
132
  enumerable: true,
129
- get: function () { return chunkYOJABWGB_cjs.jsonBytes; }
133
+ get: function () { return chunkGKLZSM6N_cjs.jsonBytes; }
130
134
  });
131
135
  Object.defineProperty(exports, "misplacedAttachmentInputs", {
132
136
  enumerable: true,
133
- get: function () { return chunkYOJABWGB_cjs.misplacedAttachmentInputs; }
137
+ get: function () { return chunkGKLZSM6N_cjs.misplacedAttachmentInputs; }
134
138
  });
135
139
  Object.defineProperty(exports, "observationIndexEntry", {
136
140
  enumerable: true,
137
- get: function () { return chunkYOJABWGB_cjs.observationIndexEntry; }
141
+ get: function () { return chunkGKLZSM6N_cjs.observationIndexEntry; }
138
142
  });
139
143
  Object.defineProperty(exports, "pointerStep", {
140
144
  enumerable: true,
141
- get: function () { return chunkYOJABWGB_cjs.pointerStep; }
145
+ get: function () { return chunkGKLZSM6N_cjs.pointerStep; }
142
146
  });
143
147
  Object.defineProperty(exports, "pointerSteps", {
144
148
  enumerable: true,
145
- get: function () { return chunkYOJABWGB_cjs.pointerSteps; }
149
+ get: function () { return chunkGKLZSM6N_cjs.pointerSteps; }
146
150
  });
147
151
  Object.defineProperty(exports, "requiresApproval", {
148
152
  enumerable: true,
149
- get: function () { return chunkYOJABWGB_cjs.requiresApproval; }
153
+ get: function () { return chunkGKLZSM6N_cjs.requiresApproval; }
150
154
  });
151
155
  Object.defineProperty(exports, "sortedJson", {
152
156
  enumerable: true,
153
- get: function () { return chunkYOJABWGB_cjs.sortedJson; }
157
+ get: function () { return chunkGKLZSM6N_cjs.sortedJson; }
154
158
  });
155
159
  Object.defineProperty(exports, "summarizeInput", {
156
160
  enumerable: true,
157
- get: function () { return chunkYOJABWGB_cjs.summarizeInput; }
161
+ get: function () { return chunkGKLZSM6N_cjs.summarizeInput; }
158
162
  });
159
163
  Object.defineProperty(exports, "surfaceIndex", {
160
164
  enumerable: true,
161
- get: function () { return chunkYOJABWGB_cjs.surfaceIndex; }
165
+ get: function () { return chunkGKLZSM6N_cjs.surfaceIndex; }
162
166
  });
163
167
  Object.defineProperty(exports, "surfacesHash", {
164
168
  enumerable: true,
165
- get: function () { return chunkYOJABWGB_cjs.surfacesHash; }
169
+ get: function () { return chunkGKLZSM6N_cjs.surfacesHash; }
166
170
  });
167
171
  Object.defineProperty(exports, "utf8Length", {
168
172
  enumerable: true,
169
- get: function () { return chunkYOJABWGB_cjs.utf8Length; }
173
+ get: function () { return chunkGKLZSM6N_cjs.utf8Length; }
170
174
  });
171
175
  Object.defineProperty(exports, "withoutTitleLeadIn", {
172
176
  enumerable: true,
173
- get: function () { return chunkYOJABWGB_cjs.withoutTitleLeadIn; }
177
+ get: function () { return chunkGKLZSM6N_cjs.withoutTitleLeadIn; }
174
178
  });
175
179
  //# sourceMappingURL=index.cjs.map
176
180
  //# sourceMappingURL=index.cjs.map
@@ -1,5 +1,6 @@
1
- import { s as OUISurface, u as OUISurfaceIndex, J as JSONSchema, O as OUIAction, b as OUIActionIndexEntry, m as OUIObservation, n as OUIObservationIndexEntry, o as OUIObservationSnapshot, k as OUIFitCut } from '../types-6doPwE6g.cjs';
2
- export { A as ARGS_HASH_PATTERN, a as OUIActionApproval, c as OUIActionPolling, d as OUIActionRequest, e as OUIActionResult, f as OUIActivation, g as OUIApprovalGrant, h as OUIClientSnapshot, i as OUIEffectKind, j as OUIFit, l as OUIIndexSnapshot, p as OUIObservationUpdate, q as OUIProtocolEvent, r as OUIResultDelivery, t as OUISurfaceDeregistration, v as OUISurfaceRegistration, w as OUISurfaceSnapshot, x as OUI_EFFECT_ACCESS, y as OUI_EFFECT_KINDS, z as OUI_PROTOCOL_EVENTS, B as argsHash, C as canonicalJson, D as effectAccess, E as requiresApproval } from '../types-6doPwE6g.cjs';
1
+ import { t as OUISurface, v as OUISurfaceIndex, J as JSONSchema, O as OUIAction, b as OUIActionIndexEntry, m as OUIObservation, n as OUIObservationIndexEntry, o as OUIObservationSnapshot, k as OUIFitCut } from '../types-BNUECkjl.cjs';
2
+ export { A as ARGS_HASH_PATTERN, a as OUIActionApproval, c as OUIActionPolling, d as OUIActionRequest, e as OUIActionResult, f as OUIActivation, g as OUIApprovalGrant, h as OUIClientSnapshot, i as OUIEffectKind, j as OUIFit, l as OUIIndexSnapshot, p as OUIObservationUpdate, q as OUIProtocolEvent, r as OUIResultDelivery, s as OUISettledWork, u as OUISurfaceDeregistration, w as OUISurfaceRegistration, x as OUISurfaceSnapshot, y as OUI_EFFECT_ACCESS, z as OUI_EFFECT_KINDS, B as OUI_PROTOCOL_EVENTS, C as argsHash, D as canonicalJson, E as effectAccess, F as requiresApproval } from '../types-BNUECkjl.cjs';
3
+ export { A as ATTACHMENT_ID_PATTERN, a as ATTACHMENT_LIST_MAX, O as OUIAttachmentInput, b as OUI_ATTACHMENT_FORMAT, c as acceptsMediaType, d as attachmentIdsIn, e as attachmentInputOf, f as attachmentInputs, i as isAttachmentId, m as misplacedAttachmentInputs } from '../attachments-BCmbKN2x.cjs';
3
4
 
4
5
  /**
5
6
  * The identity of a set of surfaces, for an answer that need not repeat them
@@ -128,61 +129,4 @@ declare function fitObservations(observations: OUIObservationSnapshot, budget: n
128
129
  cuts: OUIFitCut[];
129
130
  };
130
131
 
131
- /**
132
- * An action input that takes a file the person attached (OUI spec §7.3.11).
133
- *
134
- * The agent passes an attachment's id. The client resolves it, through its
135
- * host's file area, to what the input declares it takes, before the action's
136
- * handler runs:
137
- *
138
- * - `file`: a `File`, exactly what the person's own file choice produces;
139
- * - `text`: the file's text, for an input that takes markup or JSON.
140
- *
141
- * Declared on a string schema:
142
- * `{ type: 'string', format: 'oui-attachment', 'x-oui-attachment': { as: 'file', mediaTypes: ['image/png'] } }`.
143
- * The request stays small: only the id travels.
144
- */
145
-
146
- /** The JSON Schema `format` of an input that takes an attachment's id. */
147
- declare const OUI_ATTACHMENT_FORMAT = "oui-attachment";
148
- /** What an attachment input takes once resolved, and which files it accepts. */
149
- interface OUIAttachmentInput {
150
- as: "file" | "text";
151
- /** The media types it accepts; any when absent. A type ending in `/*` accepts the family. */
152
- mediaTypes?: string[];
153
- }
154
- /** Whether a string is an attachment id: opaque, 8 to 64 of A–Z, a–z, 0–9, `_` and `-`. */
155
- declare function isAttachmentId(value: unknown): value is string;
156
- /** The same rule as a pattern, for a validator's format. */
157
- declare const ATTACHMENT_ID_PATTERN: RegExp;
158
- /** The attachment declaration of a schema, when it is an attachment input. */
159
- declare function attachmentInputOf(schema: JSONSchema | undefined): OUIAttachmentInput | null;
160
- /** Whether a media type is one an attachment input accepts. */
161
- declare function acceptsMediaType(input: OUIAttachmentInput, mediaType: string): boolean;
162
- /**
163
- * Every attachment input of an action's input schema, by where its id sits in
164
- * the params: a property (`["logo"]`), or each item of a list property
165
- * (`["images", "*"]`). Only the input's own properties and their list items
166
- * are looked at: a file is an argument of the action, not buried in its data.
167
- */
168
- declare function attachmentInputs(schema: JSONSchema | undefined): Array<{
169
- path: [string] | [string, "*"];
170
- input: OUIAttachmentInput;
171
- }>;
172
- /**
173
- * Where an action's input schema declares an attachment input anywhere other
174
- * than a property of the input or the items of a list property: inside an
175
- * object property, a list of lists, `anyOf`/`oneOf`/`allOf`, or anything a
176
- * schema nests. Such an input is neither checked nor resolved, so an action
177
- * declaring one is refused (§7.3.11). Each entry is a path in the schema, as
178
- * `property.sub`, `property[]`, `property.anyOf[0]`.
179
- */
180
- declare function misplacedAttachmentInputs(schema: JSONSchema | undefined): string[];
181
- /** Every attachment id an action's params name, with the input that takes it. */
182
- declare function attachmentIdsIn(schema: JSONSchema | undefined, params: Record<string, unknown>): Array<{
183
- id: string;
184
- property: string;
185
- input: OUIAttachmentInput;
186
- }>;
187
-
188
- export { ATTACHMENT_ID_PATTERN, DEFINITION_HASH_HEX, FIT_LIST_STEPS, FIT_TEXT_CHARS, INDEX_DESCRIPTION_CHARS, INDEX_INPUT_CHARS, INDEX_INPUT_PROPERTIES, JSONSchema, OUIAction, OUIActionIndexEntry, type OUIAttachmentInput, OUIFitCut, OUIObservation, OUIObservationIndexEntry, OUIObservationSnapshot, OUISurface, OUISurfaceIndex, OUI_ATTACHMENT_FORMAT, OUI_DESCRIBE_ACTION, OUI_READ_ACTION, OUI_RUNTIME_SURFACE, acceptsMediaType, atPointer, attachmentIdsIn, attachmentInputOf, attachmentInputs, constantOf, definitionHash, discriminatorOf, firstSentence, fitObservations, indexEntry, isAttachmentId, jsonBytes, misplacedAttachmentInputs, observationIndexEntry, pointerStep, pointerSteps, sortedJson, summarizeInput, surfaceIndex, surfacesHash, utf8Length, withoutTitleLeadIn };
132
+ export { DEFINITION_HASH_HEX, FIT_LIST_STEPS, FIT_TEXT_CHARS, INDEX_DESCRIPTION_CHARS, INDEX_INPUT_CHARS, INDEX_INPUT_PROPERTIES, JSONSchema, OUIAction, OUIActionIndexEntry, OUIFitCut, OUIObservation, OUIObservationIndexEntry, OUIObservationSnapshot, OUISurface, OUISurfaceIndex, OUI_DESCRIBE_ACTION, OUI_READ_ACTION, OUI_RUNTIME_SURFACE, atPointer, constantOf, definitionHash, discriminatorOf, firstSentence, fitObservations, indexEntry, jsonBytes, observationIndexEntry, pointerStep, pointerSteps, sortedJson, summarizeInput, surfaceIndex, surfacesHash, utf8Length, withoutTitleLeadIn };
@@ -1,5 +1,6 @@
1
- import { s as OUISurface, u as OUISurfaceIndex, J as JSONSchema, O as OUIAction, b as OUIActionIndexEntry, m as OUIObservation, n as OUIObservationIndexEntry, o as OUIObservationSnapshot, k as OUIFitCut } from '../types-6doPwE6g.js';
2
- export { A as ARGS_HASH_PATTERN, a as OUIActionApproval, c as OUIActionPolling, d as OUIActionRequest, e as OUIActionResult, f as OUIActivation, g as OUIApprovalGrant, h as OUIClientSnapshot, i as OUIEffectKind, j as OUIFit, l as OUIIndexSnapshot, p as OUIObservationUpdate, q as OUIProtocolEvent, r as OUIResultDelivery, t as OUISurfaceDeregistration, v as OUISurfaceRegistration, w as OUISurfaceSnapshot, x as OUI_EFFECT_ACCESS, y as OUI_EFFECT_KINDS, z as OUI_PROTOCOL_EVENTS, B as argsHash, C as canonicalJson, D as effectAccess, E as requiresApproval } from '../types-6doPwE6g.js';
1
+ import { t as OUISurface, v as OUISurfaceIndex, J as JSONSchema, O as OUIAction, b as OUIActionIndexEntry, m as OUIObservation, n as OUIObservationIndexEntry, o as OUIObservationSnapshot, k as OUIFitCut } from '../types-BNUECkjl.js';
2
+ export { A as ARGS_HASH_PATTERN, a as OUIActionApproval, c as OUIActionPolling, d as OUIActionRequest, e as OUIActionResult, f as OUIActivation, g as OUIApprovalGrant, h as OUIClientSnapshot, i as OUIEffectKind, j as OUIFit, l as OUIIndexSnapshot, p as OUIObservationUpdate, q as OUIProtocolEvent, r as OUIResultDelivery, s as OUISettledWork, u as OUISurfaceDeregistration, w as OUISurfaceRegistration, x as OUISurfaceSnapshot, y as OUI_EFFECT_ACCESS, z as OUI_EFFECT_KINDS, B as OUI_PROTOCOL_EVENTS, C as argsHash, D as canonicalJson, E as effectAccess, F as requiresApproval } from '../types-BNUECkjl.js';
3
+ export { A as ATTACHMENT_ID_PATTERN, a as ATTACHMENT_LIST_MAX, O as OUIAttachmentInput, b as OUI_ATTACHMENT_FORMAT, c as acceptsMediaType, d as attachmentIdsIn, e as attachmentInputOf, f as attachmentInputs, i as isAttachmentId, m as misplacedAttachmentInputs } from '../attachments-D7iw6dNY.js';
3
4
 
4
5
  /**
5
6
  * The identity of a set of surfaces, for an answer that need not repeat them
@@ -128,61 +129,4 @@ declare function fitObservations(observations: OUIObservationSnapshot, budget: n
128
129
  cuts: OUIFitCut[];
129
130
  };
130
131
 
131
- /**
132
- * An action input that takes a file the person attached (OUI spec §7.3.11).
133
- *
134
- * The agent passes an attachment's id. The client resolves it, through its
135
- * host's file area, to what the input declares it takes, before the action's
136
- * handler runs:
137
- *
138
- * - `file`: a `File`, exactly what the person's own file choice produces;
139
- * - `text`: the file's text, for an input that takes markup or JSON.
140
- *
141
- * Declared on a string schema:
142
- * `{ type: 'string', format: 'oui-attachment', 'x-oui-attachment': { as: 'file', mediaTypes: ['image/png'] } }`.
143
- * The request stays small: only the id travels.
144
- */
145
-
146
- /** The JSON Schema `format` of an input that takes an attachment's id. */
147
- declare const OUI_ATTACHMENT_FORMAT = "oui-attachment";
148
- /** What an attachment input takes once resolved, and which files it accepts. */
149
- interface OUIAttachmentInput {
150
- as: "file" | "text";
151
- /** The media types it accepts; any when absent. A type ending in `/*` accepts the family. */
152
- mediaTypes?: string[];
153
- }
154
- /** Whether a string is an attachment id: opaque, 8 to 64 of A–Z, a–z, 0–9, `_` and `-`. */
155
- declare function isAttachmentId(value: unknown): value is string;
156
- /** The same rule as a pattern, for a validator's format. */
157
- declare const ATTACHMENT_ID_PATTERN: RegExp;
158
- /** The attachment declaration of a schema, when it is an attachment input. */
159
- declare function attachmentInputOf(schema: JSONSchema | undefined): OUIAttachmentInput | null;
160
- /** Whether a media type is one an attachment input accepts. */
161
- declare function acceptsMediaType(input: OUIAttachmentInput, mediaType: string): boolean;
162
- /**
163
- * Every attachment input of an action's input schema, by where its id sits in
164
- * the params: a property (`["logo"]`), or each item of a list property
165
- * (`["images", "*"]`). Only the input's own properties and their list items
166
- * are looked at: a file is an argument of the action, not buried in its data.
167
- */
168
- declare function attachmentInputs(schema: JSONSchema | undefined): Array<{
169
- path: [string] | [string, "*"];
170
- input: OUIAttachmentInput;
171
- }>;
172
- /**
173
- * Where an action's input schema declares an attachment input anywhere other
174
- * than a property of the input or the items of a list property: inside an
175
- * object property, a list of lists, `anyOf`/`oneOf`/`allOf`, or anything a
176
- * schema nests. Such an input is neither checked nor resolved, so an action
177
- * declaring one is refused (§7.3.11). Each entry is a path in the schema, as
178
- * `property.sub`, `property[]`, `property.anyOf[0]`.
179
- */
180
- declare function misplacedAttachmentInputs(schema: JSONSchema | undefined): string[];
181
- /** Every attachment id an action's params name, with the input that takes it. */
182
- declare function attachmentIdsIn(schema: JSONSchema | undefined, params: Record<string, unknown>): Array<{
183
- id: string;
184
- property: string;
185
- input: OUIAttachmentInput;
186
- }>;
187
-
188
- export { ATTACHMENT_ID_PATTERN, DEFINITION_HASH_HEX, FIT_LIST_STEPS, FIT_TEXT_CHARS, INDEX_DESCRIPTION_CHARS, INDEX_INPUT_CHARS, INDEX_INPUT_PROPERTIES, JSONSchema, OUIAction, OUIActionIndexEntry, type OUIAttachmentInput, OUIFitCut, OUIObservation, OUIObservationIndexEntry, OUIObservationSnapshot, OUISurface, OUISurfaceIndex, OUI_ATTACHMENT_FORMAT, OUI_DESCRIBE_ACTION, OUI_READ_ACTION, OUI_RUNTIME_SURFACE, acceptsMediaType, atPointer, attachmentIdsIn, attachmentInputOf, attachmentInputs, constantOf, definitionHash, discriminatorOf, firstSentence, fitObservations, indexEntry, isAttachmentId, jsonBytes, misplacedAttachmentInputs, observationIndexEntry, pointerStep, pointerSteps, sortedJson, summarizeInput, surfaceIndex, surfacesHash, utf8Length, withoutTitleLeadIn };
132
+ export { DEFINITION_HASH_HEX, FIT_LIST_STEPS, FIT_TEXT_CHARS, INDEX_DESCRIPTION_CHARS, INDEX_INPUT_CHARS, INDEX_INPUT_PROPERTIES, JSONSchema, OUIAction, OUIActionIndexEntry, OUIFitCut, OUIObservation, OUIObservationIndexEntry, OUIObservationSnapshot, OUISurface, OUISurfaceIndex, OUI_DESCRIBE_ACTION, OUI_READ_ACTION, OUI_RUNTIME_SURFACE, atPointer, constantOf, definitionHash, discriminatorOf, firstSentence, fitObservations, indexEntry, jsonBytes, observationIndexEntry, pointerStep, pointerSteps, sortedJson, summarizeInput, surfaceIndex, surfacesHash, utf8Length, withoutTitleLeadIn };
@@ -1,3 +1,3 @@
1
- export { ARGS_HASH_PATTERN, ATTACHMENT_ID_PATTERN, DEFINITION_HASH_HEX, FIT_LIST_STEPS, FIT_TEXT_CHARS, INDEX_DESCRIPTION_CHARS, INDEX_INPUT_CHARS, INDEX_INPUT_PROPERTIES, OUI_ATTACHMENT_FORMAT, OUI_DESCRIBE_ACTION, OUI_EFFECT_ACCESS, OUI_EFFECT_KINDS, OUI_PROTOCOL_EVENTS, OUI_READ_ACTION, OUI_RUNTIME_SURFACE, acceptsMediaType, argsHash, atPointer, attachmentIdsIn, attachmentInputOf, attachmentInputs, canonicalJson, constantOf, definitionHash, discriminatorOf, effectAccess, firstSentence, fitObservations, indexEntry, isAttachmentId, jsonBytes, misplacedAttachmentInputs, observationIndexEntry, pointerStep, pointerSteps, requiresApproval, sortedJson, summarizeInput, surfaceIndex, surfacesHash, utf8Length, withoutTitleLeadIn } from '../chunk-3EMDNYQD.js';
1
+ export { ARGS_HASH_PATTERN, ATTACHMENT_ID_PATTERN, ATTACHMENT_LIST_MAX, DEFINITION_HASH_HEX, FIT_LIST_STEPS, FIT_TEXT_CHARS, INDEX_DESCRIPTION_CHARS, INDEX_INPUT_CHARS, INDEX_INPUT_PROPERTIES, OUI_ATTACHMENT_FORMAT, OUI_DESCRIBE_ACTION, OUI_EFFECT_ACCESS, OUI_EFFECT_KINDS, OUI_PROTOCOL_EVENTS, OUI_READ_ACTION, OUI_RUNTIME_SURFACE, acceptsMediaType, argsHash, atPointer, attachmentIdsIn, attachmentInputOf, attachmentInputs, canonicalJson, constantOf, definitionHash, discriminatorOf, effectAccess, firstSentence, fitObservations, indexEntry, isAttachmentId, jsonBytes, misplacedAttachmentInputs, observationIndexEntry, pointerStep, pointerSteps, requiresApproval, sortedJson, summarizeInput, surfaceIndex, surfacesHash, utf8Length, withoutTitleLeadIn } from '../chunk-D5V5KJ6H.js';
2
2
  //# sourceMappingURL=index.js.map
3
3
  //# sourceMappingURL=index.js.map
@@ -1,5 +1,5 @@
1
- import { i as OUIEffectKind, J as JSONSchema, c as OUIActionPolling, f as OUIActivation, s as OUISurface, l as OUIIndexSnapshot, w as OUISurfaceSnapshot, d as OUIActionRequest, e as OUIActionResult, g as OUIApprovalGrant } from './types-6doPwE6g.cjs';
2
- import { S as SocketLike, e as OUITransportConfig } from './websocket-CCpPMZ5a.cjs';
1
+ import { i as OUIEffectKind, J as JSONSchema, c as OUIActionPolling, f as OUIActivation, t as OUISurface, l as OUIIndexSnapshot, x as OUISurfaceSnapshot, d as OUIActionRequest, e as OUIActionResult, g as OUIApprovalGrant, s as OUISettledWork } from './types-BNUECkjl.js';
2
+ import { S as SocketLike, e as OUITransportConfig } from './websocket-BlQDrFtE.js';
3
3
 
4
4
  /**
5
5
  * Nominal branding for values OUI must construct itself.
@@ -276,8 +276,7 @@ interface AttachmentResolver {
276
276
  */
277
277
  resolve(id: string, as: "file" | "text"): Promise<File | AttachmentText | string>;
278
278
  }
279
- /** The most files one list input takes (§7.3.11). */
280
- declare const ATTACHMENT_LIST_MAX = 20;
279
+
281
280
  interface MountedSurface {
282
281
  readonly surfaceId: string;
283
282
  /** Record an observation value. A no-op once unmounted. */
@@ -331,6 +330,22 @@ interface SurfaceRuntime<F extends SurfaceForm = "full"> {
331
330
  grantApproval(grant: OUIApprovalGrant): boolean;
332
331
  /** Called whenever the snapshot changes. */
333
332
  subscribe(listener: () => void): () => void;
333
+ /**
334
+ * Called once for each request this runtime first answered `interim: true`
335
+ * (its action started work and was not done), when the request's final
336
+ * answer, a success or a failure, has been sent and the receiving side has
337
+ * acknowledged it, so a reader of the agent runtime's results finds it
338
+ * (§7.3.3). That includes the failures the runtime sends itself: work that
339
+ * passed its polling limits (`TIMEOUT`), was started again (`SUPERSEDED`),
340
+ * or whose surface left the page (`SURFACE_NOT_MOUNTED`). A request that was
341
+ * never interim is not told, and neither is a final answer that was refused
342
+ * even trimmed, or sent with no transport attached.
343
+ *
344
+ * An agent client uses it to have the agent report work that outlived the
345
+ * turn that started it. A listener that throws is logged and does not stop
346
+ * the others. Returns the function that removes the listener.
347
+ */
348
+ onSettled(listener: (work: OUISettledWork) => void): () => void;
334
349
  /** Stop polling, detach from the socket and forget every mount. */
335
350
  dispose(): void;
336
351
  }
@@ -341,4 +356,4 @@ declare function createSurfaceRuntime(options?: SurfaceRuntimeOptions & {
341
356
  form?: "full";
342
357
  }): SurfaceRuntime<"full">;
343
358
 
344
- export { ATTACHMENT_LIST_MAX as A, type DefinedSurface as D, type MountedSurface as M, type OUIBranded as O, type SettleOptions as S, type ActionDefinition as a, type ActionHandlerResult as b, type ActionPollingConfig as c, type AttachmentResolver as d, type AttachmentText as e, type ObservationDefinition as f, type SurfaceDefinition as g, type SurfaceForm as h, type SurfaceRuntime as i, type SurfaceRuntimeOptions as j, createSurfaceRuntime as k, defineSurface as l };
359
+ export { type ActionDefinition as A, type DefinedSurface as D, type MountedSurface as M, type OUIBranded as O, type SettleOptions as S, type ActionHandlerResult as a, type ActionPollingConfig as b, type AttachmentResolver as c, type AttachmentText as d, type ObservationDefinition as e, type SurfaceDefinition as f, type SurfaceForm as g, type SurfaceRuntime as h, type SurfaceRuntimeOptions as i, createSurfaceRuntime as j, defineSurface as k };
@@ -1,5 +1,5 @@
1
- import { i as OUIEffectKind, J as JSONSchema, c as OUIActionPolling, f as OUIActivation, s as OUISurface, l as OUIIndexSnapshot, w as OUISurfaceSnapshot, d as OUIActionRequest, e as OUIActionResult, g as OUIApprovalGrant } from './types-6doPwE6g.js';
2
- import { S as SocketLike, e as OUITransportConfig } from './websocket-DHbDDwvt.js';
1
+ import { i as OUIEffectKind, J as JSONSchema, c as OUIActionPolling, f as OUIActivation, t as OUISurface, l as OUIIndexSnapshot, x as OUISurfaceSnapshot, d as OUIActionRequest, e as OUIActionResult, g as OUIApprovalGrant, s as OUISettledWork } from './types-BNUECkjl.cjs';
2
+ import { S as SocketLike, e as OUITransportConfig } from './websocket-sj4FmEZD.cjs';
3
3
 
4
4
  /**
5
5
  * Nominal branding for values OUI must construct itself.
@@ -276,8 +276,7 @@ interface AttachmentResolver {
276
276
  */
277
277
  resolve(id: string, as: "file" | "text"): Promise<File | AttachmentText | string>;
278
278
  }
279
- /** The most files one list input takes (§7.3.11). */
280
- declare const ATTACHMENT_LIST_MAX = 20;
279
+
281
280
  interface MountedSurface {
282
281
  readonly surfaceId: string;
283
282
  /** Record an observation value. A no-op once unmounted. */
@@ -331,6 +330,22 @@ interface SurfaceRuntime<F extends SurfaceForm = "full"> {
331
330
  grantApproval(grant: OUIApprovalGrant): boolean;
332
331
  /** Called whenever the snapshot changes. */
333
332
  subscribe(listener: () => void): () => void;
333
+ /**
334
+ * Called once for each request this runtime first answered `interim: true`
335
+ * (its action started work and was not done), when the request's final
336
+ * answer, a success or a failure, has been sent and the receiving side has
337
+ * acknowledged it, so a reader of the agent runtime's results finds it
338
+ * (§7.3.3). That includes the failures the runtime sends itself: work that
339
+ * passed its polling limits (`TIMEOUT`), was started again (`SUPERSEDED`),
340
+ * or whose surface left the page (`SURFACE_NOT_MOUNTED`). A request that was
341
+ * never interim is not told, and neither is a final answer that was refused
342
+ * even trimmed, or sent with no transport attached.
343
+ *
344
+ * An agent client uses it to have the agent report work that outlived the
345
+ * turn that started it. A listener that throws is logged and does not stop
346
+ * the others. Returns the function that removes the listener.
347
+ */
348
+ onSettled(listener: (work: OUISettledWork) => void): () => void;
334
349
  /** Stop polling, detach from the socket and forget every mount. */
335
350
  dispose(): void;
336
351
  }
@@ -341,4 +356,4 @@ declare function createSurfaceRuntime(options?: SurfaceRuntimeOptions & {
341
356
  form?: "full";
342
357
  }): SurfaceRuntime<"full">;
343
358
 
344
- export { ATTACHMENT_LIST_MAX as A, type DefinedSurface as D, type MountedSurface as M, type OUIBranded as O, type SettleOptions as S, type ActionDefinition as a, type ActionHandlerResult as b, type ActionPollingConfig as c, type AttachmentResolver as d, type AttachmentText as e, type ObservationDefinition as f, type SurfaceDefinition as g, type SurfaceForm as h, type SurfaceRuntime as i, type SurfaceRuntimeOptions as j, createSurfaceRuntime as k, defineSurface as l };
359
+ export { type ActionDefinition as A, type DefinedSurface as D, type MountedSurface as M, type OUIBranded as O, type SettleOptions as S, type ActionHandlerResult as a, type ActionPollingConfig as b, type AttachmentResolver as c, type AttachmentText as d, type ObservationDefinition as e, type SurfaceDefinition as f, type SurfaceForm as g, type SurfaceRuntime as h, type SurfaceRuntimeOptions as i, createSurfaceRuntime as j, defineSurface as k };
@@ -1,6 +1,6 @@
1
- import { d as OUITransport } from '../websocket-CCpPMZ5a.cjs';
2
- export { O as OUIAcknowledgment, a as OUIActionHandler, b as OUIObservationHandler, c as OUIResultHandler, e as OUITransportConfig, S as SocketLike, f as createWebSocketTransport } from '../websocket-CCpPMZ5a.cjs';
3
- import '../types-6doPwE6g.cjs';
1
+ import { d as OUITransport } from '../websocket-sj4FmEZD.cjs';
2
+ export { O as OUIAcknowledgment, a as OUIActionHandler, b as OUIObservationHandler, c as OUIResultHandler, e as OUITransportConfig, S as SocketLike, f as createWebSocketTransport } from '../websocket-sj4FmEZD.cjs';
3
+ import '../types-BNUECkjl.cjs';
4
4
 
5
5
  /**
6
6
  * Direct transport — for same-process communication.
@@ -1,6 +1,6 @@
1
- import { d as OUITransport } from '../websocket-DHbDDwvt.js';
2
- export { O as OUIAcknowledgment, a as OUIActionHandler, b as OUIObservationHandler, c as OUIResultHandler, e as OUITransportConfig, S as SocketLike, f as createWebSocketTransport } from '../websocket-DHbDDwvt.js';
3
- import '../types-6doPwE6g.js';
1
+ import { d as OUITransport } from '../websocket-BlQDrFtE.js';
2
+ export { O as OUIAcknowledgment, a as OUIActionHandler, b as OUIObservationHandler, c as OUIResultHandler, e as OUITransportConfig, S as SocketLike, f as createWebSocketTransport } from '../websocket-BlQDrFtE.js';
3
+ import '../types-BNUECkjl.js';
4
4
 
5
5
  /**
6
6
  * Direct transport — for same-process communication.
@@ -416,6 +416,29 @@ interface OUIActionResult {
416
416
  */
417
417
  settled?: boolean;
418
418
  }
419
+ /**
420
+ * Work an action started has ended, and the agent runtime holds its outcome
421
+ * (§7.3.3). Told by a surface runtime (`onSettled`) once for each request it
422
+ * first answered `interim: true` (started, not done), when the request's final
423
+ * answer, a success or a failure, has been sent and the receiving side has
424
+ * acknowledged it: a reader of the agent runtime's results then finds it.
425
+ *
426
+ * What a client does with it is its own: an agent client can start a turn so
427
+ * the agent reports the outcome when the turn that started the work has
428
+ * already ended.
429
+ */
430
+ interface OUISettledWork {
431
+ /** The request whose work ended: the id its final answer carries. */
432
+ requestId: string;
433
+ /** The turn that sent the request, when the request named one (`OUIActionRequest.turnId`). */
434
+ turnId?: string;
435
+ surfaceId: string;
436
+ actionId: string;
437
+ /** Whether the work succeeded: the final answer's `success`. */
438
+ success: boolean;
439
+ /** When the final answer was acknowledged, epoch ms. */
440
+ at: number;
441
+ }
419
442
  /** Latest observation values, keyed by surface id and then observation id. */
420
443
  type OUIObservationSnapshot = Record<string, Record<string, unknown>>;
421
444
  /**
@@ -510,4 +533,4 @@ declare const OUI_PROTOCOL_EVENTS: {
510
533
  readonly OBSERVATION_UPDATE: "observation:update";
511
534
  };
512
535
 
513
- export { ARGS_HASH_PATTERN as A, argsHash as B, canonicalJson as C, effectAccess as D, requiresApproval as E, type JSONSchema as J, type OUIAction as O, type OUIActionApproval as a, type OUIActionIndexEntry as b, type OUIActionPolling as c, type OUIActionRequest as d, type OUIActionResult as e, type OUIActivation as f, type OUIApprovalGrant as g, type OUIClientSnapshot as h, type OUIEffectKind as i, type OUIFit as j, type OUIFitCut as k, type OUIIndexSnapshot as l, type OUIObservation as m, type OUIObservationIndexEntry as n, type OUIObservationSnapshot as o, type OUIObservationUpdate as p, type OUIProtocolEvent as q, type OUIResultDelivery as r, type OUISurface as s, type OUISurfaceDeregistration as t, type OUISurfaceIndex as u, type OUISurfaceRegistration as v, type OUISurfaceSnapshot as w, OUI_EFFECT_ACCESS as x, OUI_EFFECT_KINDS as y, OUI_PROTOCOL_EVENTS as z };
536
+ export { ARGS_HASH_PATTERN as A, OUI_PROTOCOL_EVENTS as B, argsHash as C, canonicalJson as D, effectAccess as E, requiresApproval as F, type JSONSchema as J, type OUIAction as O, type OUIActionApproval as a, type OUIActionIndexEntry as b, type OUIActionPolling as c, type OUIActionRequest as d, type OUIActionResult as e, type OUIActivation as f, type OUIApprovalGrant as g, type OUIClientSnapshot as h, type OUIEffectKind as i, type OUIFit as j, type OUIFitCut as k, type OUIIndexSnapshot as l, type OUIObservation as m, type OUIObservationIndexEntry as n, type OUIObservationSnapshot as o, type OUIObservationUpdate as p, type OUIProtocolEvent as q, type OUIResultDelivery as r, type OUISettledWork as s, type OUISurface as t, type OUISurfaceDeregistration as u, type OUISurfaceIndex as v, type OUISurfaceRegistration as w, type OUISurfaceSnapshot as x, OUI_EFFECT_ACCESS as y, OUI_EFFECT_KINDS as z };
@@ -416,6 +416,29 @@ interface OUIActionResult {
416
416
  */
417
417
  settled?: boolean;
418
418
  }
419
+ /**
420
+ * Work an action started has ended, and the agent runtime holds its outcome
421
+ * (§7.3.3). Told by a surface runtime (`onSettled`) once for each request it
422
+ * first answered `interim: true` (started, not done), when the request's final
423
+ * answer, a success or a failure, has been sent and the receiving side has
424
+ * acknowledged it: a reader of the agent runtime's results then finds it.
425
+ *
426
+ * What a client does with it is its own: an agent client can start a turn so
427
+ * the agent reports the outcome when the turn that started the work has
428
+ * already ended.
429
+ */
430
+ interface OUISettledWork {
431
+ /** The request whose work ended: the id its final answer carries. */
432
+ requestId: string;
433
+ /** The turn that sent the request, when the request named one (`OUIActionRequest.turnId`). */
434
+ turnId?: string;
435
+ surfaceId: string;
436
+ actionId: string;
437
+ /** Whether the work succeeded: the final answer's `success`. */
438
+ success: boolean;
439
+ /** When the final answer was acknowledged, epoch ms. */
440
+ at: number;
441
+ }
419
442
  /** Latest observation values, keyed by surface id and then observation id. */
420
443
  type OUIObservationSnapshot = Record<string, Record<string, unknown>>;
421
444
  /**
@@ -510,4 +533,4 @@ declare const OUI_PROTOCOL_EVENTS: {
510
533
  readonly OBSERVATION_UPDATE: "observation:update";
511
534
  };
512
535
 
513
- export { ARGS_HASH_PATTERN as A, argsHash as B, canonicalJson as C, effectAccess as D, requiresApproval as E, type JSONSchema as J, type OUIAction as O, type OUIActionApproval as a, type OUIActionIndexEntry as b, type OUIActionPolling as c, type OUIActionRequest as d, type OUIActionResult as e, type OUIActivation as f, type OUIApprovalGrant as g, type OUIClientSnapshot as h, type OUIEffectKind as i, type OUIFit as j, type OUIFitCut as k, type OUIIndexSnapshot as l, type OUIObservation as m, type OUIObservationIndexEntry as n, type OUIObservationSnapshot as o, type OUIObservationUpdate as p, type OUIProtocolEvent as q, type OUIResultDelivery as r, type OUISurface as s, type OUISurfaceDeregistration as t, type OUISurfaceIndex as u, type OUISurfaceRegistration as v, type OUISurfaceSnapshot as w, OUI_EFFECT_ACCESS as x, OUI_EFFECT_KINDS as y, OUI_PROTOCOL_EVENTS as z };
536
+ export { ARGS_HASH_PATTERN as A, OUI_PROTOCOL_EVENTS as B, argsHash as C, canonicalJson as D, effectAccess as E, requiresApproval as F, type JSONSchema as J, type OUIAction as O, type OUIActionApproval as a, type OUIActionIndexEntry as b, type OUIActionPolling as c, type OUIActionRequest as d, type OUIActionResult as e, type OUIActivation as f, type OUIApprovalGrant as g, type OUIClientSnapshot as h, type OUIEffectKind as i, type OUIFit as j, type OUIFitCut as k, type OUIIndexSnapshot as l, type OUIObservation as m, type OUIObservationIndexEntry as n, type OUIObservationSnapshot as o, type OUIObservationUpdate as p, type OUIProtocolEvent as q, type OUIResultDelivery as r, type OUISettledWork as s, type OUISurface as t, type OUISurfaceDeregistration as u, type OUISurfaceIndex as v, type OUISurfaceRegistration as w, type OUISurfaceSnapshot as x, OUI_EFFECT_ACCESS as y, OUI_EFFECT_KINDS as z };
@@ -1,4 +1,4 @@
1
- import { d as OUIActionRequest, e as OUIActionResult, p as OUIObservationUpdate, s as OUISurface } from './types-6doPwE6g.js';
1
+ import { d as OUIActionRequest, e as OUIActionResult, p as OUIObservationUpdate, t as OUISurface } from './types-BNUECkjl.js';
2
2
 
3
3
  /**
4
4
  * OUI Transport — the wire protocol between agent runtime and surfaces.
@@ -1,4 +1,4 @@
1
- import { d as OUIActionRequest, e as OUIActionResult, p as OUIObservationUpdate, s as OUISurface } from './types-6doPwE6g.cjs';
1
+ import { d as OUIActionRequest, e as OUIActionResult, p as OUIObservationUpdate, t as OUISurface } from './types-BNUECkjl.cjs';
2
2
 
3
3
  /**
4
4
  * OUI Transport — the wire protocol between agent runtime and surfaces.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oui-spec",
3
- "version": "0.13.0",
3
+ "version": "0.14.1",
4
4
  "description": "OUI — The OpenUI Specification. A machine-readable contract for agent-controllable user interfaces.",
5
5
  "keywords": [
6
6
  "oui",
@@ -658,6 +658,7 @@ When the agent invokes an action, the runtime sends an `action:request`:
658
658
  - If `success` is `true`, the `error` field MUST NOT be present
659
659
  - An async action's acknowledgment result MUST set `interim: true`; its final result MUST set `interim: false`
660
660
  - An async action whose work failed MUST send its final result as a failure (`success: false`, with `error`); it MAY keep the work's own report in `data`
661
+ - A client runtime MAY tell the application when an async action's final result has been delivered and acknowledged (`OUISettledWork`; the reference runtime's `onSettled`), so the application can act on work that outlived the agent's turn: an agent client can start a turn in which the agent reports the outcome
661
662
 
662
663
  #### 7.3.4 The Client's State After an Action
663
664