oui-spec 0.12.0 → 0.14.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.
Files changed (37) hide show
  1. package/README.md +13 -0
  2. package/dist/{chunk-RPHHBP7C.cjs → chunk-4GEL45GH.cjs} +66 -37
  3. package/dist/chunk-4GEL45GH.cjs.map +1 -0
  4. package/dist/{chunk-C2IMSSJK.js → chunk-OSFGTDAM.js} +25 -4
  5. package/dist/chunk-OSFGTDAM.js.map +1 -0
  6. package/dist/{chunk-BLKQNZFC.cjs → chunk-TGMRXTZV.cjs} +25 -3
  7. package/dist/chunk-TGMRXTZV.cjs.map +1 -0
  8. package/dist/{chunk-7KBAHAHV.js → chunk-YWAHY7R3.js} +37 -8
  9. package/dist/chunk-YWAHY7R3.js.map +1 -0
  10. package/dist/core/index.cjs +8 -8
  11. package/dist/core/index.d.cts +5 -5
  12. package/dist/core/index.d.ts +5 -5
  13. package/dist/core/index.js +2 -2
  14. package/dist/index.cjs +52 -48
  15. package/dist/index.d.cts +4 -4
  16. package/dist/index.d.ts +4 -4
  17. package/dist/index.js +2 -2
  18. package/dist/react/index.d.cts +3 -3
  19. package/dist/react/index.d.ts +3 -3
  20. package/dist/spec/index.cjs +46 -42
  21. package/dist/spec/index.d.cts +10 -3
  22. package/dist/spec/index.d.ts +10 -3
  23. package/dist/spec/index.js +1 -1
  24. package/dist/{surface-runtime-Ca0oLhb4.d.cts → surface-runtime-DrHIKVGg.d.cts} +18 -2
  25. package/dist/{surface-runtime-BixhN5CJ.d.ts → surface-runtime-EASHWNtv.d.ts} +18 -2
  26. package/dist/transport/index.d.cts +3 -3
  27. package/dist/transport/index.d.ts +3 -3
  28. package/dist/{types-DLOa7CWj.d.ts → types-BNUECkjl.d.cts} +35 -3
  29. package/dist/{types-DLOa7CWj.d.cts → types-BNUECkjl.d.ts} +35 -3
  30. package/dist/{websocket-Bf7xMzs1.d.ts → websocket-BlQDrFtE.d.ts} +1 -1
  31. package/dist/{websocket-CoSpb5nB.d.cts → websocket-sj4FmEZD.d.cts} +1 -1
  32. package/package.json +1 -1
  33. package/spec/OUI-SPEC-v0.1.md +11 -1
  34. package/dist/chunk-7KBAHAHV.js.map +0 -1
  35. package/dist/chunk-BLKQNZFC.cjs.map +0 -1
  36. package/dist/chunk-C2IMSSJK.js.map +0 -1
  37. package/dist/chunk-RPHHBP7C.cjs.map +0 -1
package/dist/index.d.cts CHANGED
@@ -1,8 +1,8 @@
1
- export { A as ARGS_HASH_PATTERN, J as JSONSchema, O as OUIAction, a as OUIActionApproval, b as OUIActionIndexEntry, c as OUIActionPolling, d as OUIActionRequest, e as OUIActionResult, f as OUIActivation, g as OUIApprovalGrant, h as OUIClientSnapshot, i as OUIEffectKind, j as OUIFit, k as OUIFitCut, l as OUIIndexSnapshot, m as OUIObservation, n as OUIObservationSnapshot, o as OUIObservationUpdate, p as OUIProtocolEvent, q as OUIResultDelivery, r as OUISurface, s as OUISurfaceDeregistration, t as OUISurfaceIndex, u as OUISurfaceRegistration, v as OUISurfaceSnapshot, w as OUI_EFFECT_ACCESS, x as OUI_EFFECT_KINDS, y as OUI_PROTOCOL_EVENTS, z as argsHash, B as canonicalJson, C as effectAccess, D as requiresApproval } from './types-DLOa7CWj.cjs';
2
- export { ATTACHMENT_ID_PATTERN, DEFINITION_HASH_HEX, FIT_LIST_STEPS, FIT_TEXT_CHARS, INDEX_DESCRIPTION_CHARS, INDEX_INPUT_CHARS, INDEX_INPUT_PROPERTIES, OUIAttachmentInput, 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, pointerStep, pointerSteps, sortedJson, summarizeInput, surfaceIndex, surfacesHash, utf8Length, withoutTitleLeadIn } from './spec/index.cjs';
3
- export { A as ATTACHMENT_LIST_MAX, a as ActionDefinition, b as ActionHandlerResult, c as ActionPollingConfig, d as AttachmentResolver, e as AttachmentText, D as DefinedSurface, M as MountedSurface, O as OUIBranded, f as ObservationDefinition, S as SettleOptions, g as SurfaceDefinition, h as SurfaceForm, i as SurfaceRuntime, j as SurfaceRuntimeOptions, k as createSurfaceRuntime, l as defineSurface } from './surface-runtime-Ca0oLhb4.cjs';
1
+ export { A as ARGS_HASH_PATTERN, J as JSONSchema, O as OUIAction, a as OUIActionApproval, b as OUIActionIndexEntry, c as OUIActionPolling, d as OUIActionRequest, e as OUIActionResult, f as OUIActivation, g as OUIApprovalGrant, h as OUIClientSnapshot, i as OUIEffectKind, j as OUIFit, k as OUIFitCut, l as OUIIndexSnapshot, m as OUIObservation, n as OUIObservationIndexEntry, o as OUIObservationSnapshot, p as OUIObservationUpdate, q as OUIProtocolEvent, r as OUIResultDelivery, s as OUISettledWork, t as OUISurface, u as OUISurfaceDeregistration, v as OUISurfaceIndex, 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';
2
+ export { ATTACHMENT_ID_PATTERN, DEFINITION_HASH_HEX, FIT_LIST_STEPS, FIT_TEXT_CHARS, INDEX_DESCRIPTION_CHARS, INDEX_INPUT_CHARS, INDEX_INPUT_PROPERTIES, OUIAttachmentInput, 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 } from './spec/index.cjs';
3
+ export { A as ATTACHMENT_LIST_MAX, a as ActionDefinition, b as ActionHandlerResult, c as ActionPollingConfig, d as AttachmentResolver, e as AttachmentText, D as DefinedSurface, M as MountedSurface, O as OUIBranded, f as ObservationDefinition, S as SettleOptions, g as SurfaceDefinition, h as SurfaceForm, i as SurfaceRuntime, j as SurfaceRuntimeOptions, k as createSurfaceRuntime, l as defineSurface } from './surface-runtime-DrHIKVGg.cjs';
4
4
  export { DuplicateIds, OUIConfig, OUIConfigError, OUIInstance, OwnedTransport, ValidateSurfaceIds, acceptCurrentTurn, createOUI } from './core/index.cjs';
5
5
  export { SurfaceRuntimeProvider, SurfaceRuntimeProviderProps, UseSurfaceOptions, UseSurfaceResult, useObservation, useSurface, useSurfaceHold, useSurfaceRuntime } from './react/index.cjs';
6
- export { O as OUIAcknowledgment, a as OUIActionHandler, b as OUIObservationHandler, c as OUIResultHandler, d as OUITransport, e as OUITransportConfig, S as SocketLike, f as createWebSocketTransport } from './websocket-CoSpb5nB.cjs';
6
+ export { O as OUIAcknowledgment, a as OUIActionHandler, b as OUIObservationHandler, c as OUIResultHandler, d as OUITransport, e as OUITransportConfig, S as SocketLike, f as createWebSocketTransport } from './websocket-sj4FmEZD.cjs';
7
7
  export { createDirectTransportPair } from './transport/index.cjs';
8
8
  import 'react';
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- export { A as ARGS_HASH_PATTERN, J as JSONSchema, O as OUIAction, a as OUIActionApproval, b as OUIActionIndexEntry, c as OUIActionPolling, d as OUIActionRequest, e as OUIActionResult, f as OUIActivation, g as OUIApprovalGrant, h as OUIClientSnapshot, i as OUIEffectKind, j as OUIFit, k as OUIFitCut, l as OUIIndexSnapshot, m as OUIObservation, n as OUIObservationSnapshot, o as OUIObservationUpdate, p as OUIProtocolEvent, q as OUIResultDelivery, r as OUISurface, s as OUISurfaceDeregistration, t as OUISurfaceIndex, u as OUISurfaceRegistration, v as OUISurfaceSnapshot, w as OUI_EFFECT_ACCESS, x as OUI_EFFECT_KINDS, y as OUI_PROTOCOL_EVENTS, z as argsHash, B as canonicalJson, C as effectAccess, D as requiresApproval } from './types-DLOa7CWj.js';
2
- export { ATTACHMENT_ID_PATTERN, DEFINITION_HASH_HEX, FIT_LIST_STEPS, FIT_TEXT_CHARS, INDEX_DESCRIPTION_CHARS, INDEX_INPUT_CHARS, INDEX_INPUT_PROPERTIES, OUIAttachmentInput, 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, pointerStep, pointerSteps, sortedJson, summarizeInput, surfaceIndex, surfacesHash, utf8Length, withoutTitleLeadIn } from './spec/index.js';
3
- export { A as ATTACHMENT_LIST_MAX, a as ActionDefinition, b as ActionHandlerResult, c as ActionPollingConfig, d as AttachmentResolver, e as AttachmentText, D as DefinedSurface, M as MountedSurface, O as OUIBranded, f as ObservationDefinition, S as SettleOptions, g as SurfaceDefinition, h as SurfaceForm, i as SurfaceRuntime, j as SurfaceRuntimeOptions, k as createSurfaceRuntime, l as defineSurface } from './surface-runtime-BixhN5CJ.js';
1
+ export { A as ARGS_HASH_PATTERN, J as JSONSchema, O as OUIAction, a as OUIActionApproval, b as OUIActionIndexEntry, c as OUIActionPolling, d as OUIActionRequest, e as OUIActionResult, f as OUIActivation, g as OUIApprovalGrant, h as OUIClientSnapshot, i as OUIEffectKind, j as OUIFit, k as OUIFitCut, l as OUIIndexSnapshot, m as OUIObservation, n as OUIObservationIndexEntry, o as OUIObservationSnapshot, p as OUIObservationUpdate, q as OUIProtocolEvent, r as OUIResultDelivery, s as OUISettledWork, t as OUISurface, u as OUISurfaceDeregistration, v as OUISurfaceIndex, 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';
2
+ export { ATTACHMENT_ID_PATTERN, DEFINITION_HASH_HEX, FIT_LIST_STEPS, FIT_TEXT_CHARS, INDEX_DESCRIPTION_CHARS, INDEX_INPUT_CHARS, INDEX_INPUT_PROPERTIES, OUIAttachmentInput, 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 } from './spec/index.js';
3
+ export { A as ATTACHMENT_LIST_MAX, a as ActionDefinition, b as ActionHandlerResult, c as ActionPollingConfig, d as AttachmentResolver, e as AttachmentText, D as DefinedSurface, M as MountedSurface, O as OUIBranded, f as ObservationDefinition, S as SettleOptions, g as SurfaceDefinition, h as SurfaceForm, i as SurfaceRuntime, j as SurfaceRuntimeOptions, k as createSurfaceRuntime, l as defineSurface } from './surface-runtime-EASHWNtv.js';
4
4
  export { DuplicateIds, OUIConfig, OUIConfigError, OUIInstance, OwnedTransport, ValidateSurfaceIds, acceptCurrentTurn, createOUI } from './core/index.js';
5
5
  export { SurfaceRuntimeProvider, SurfaceRuntimeProviderProps, UseSurfaceOptions, UseSurfaceResult, useObservation, useSurface, useSurfaceHold, useSurfaceRuntime } from './react/index.js';
6
- export { O as OUIAcknowledgment, a as OUIActionHandler, b as OUIObservationHandler, c as OUIResultHandler, d as OUITransport, e as OUITransportConfig, S as SocketLike, f as createWebSocketTransport } from './websocket-Bf7xMzs1.js';
6
+ export { O as OUIAcknowledgment, a as OUIActionHandler, b as OUIObservationHandler, c as OUIResultHandler, d as OUITransport, e as OUITransportConfig, S as SocketLike, f as createWebSocketTransport } from './websocket-BlQDrFtE.js';
7
7
  export { createDirectTransportPair } from './transport/index.js';
8
8
  import 'react';
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- export { ATTACHMENT_LIST_MAX, acceptCurrentTurn, createOUI, createSurfaceRuntime, defineSurface } from './chunk-7KBAHAHV.js';
2
- 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, pointerStep, pointerSteps, requiresApproval, sortedJson, summarizeInput, surfaceIndex, surfacesHash, utf8Length, withoutTitleLeadIn } from './chunk-C2IMSSJK.js';
1
+ export { ATTACHMENT_LIST_MAX, acceptCurrentTurn, createOUI, createSurfaceRuntime, defineSurface } from './chunk-YWAHY7R3.js';
2
+ 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-OSFGTDAM.js';
3
3
  export { SurfaceRuntimeProvider, useObservation, useSurface, useSurfaceHold, useSurfaceRuntime } from './chunk-UOTAHGIV.js';
4
4
  export { createDirectTransportPair } from './chunk-IIZ6HL2L.js';
5
5
  export { createWebSocketTransport } from './chunk-NXDPC3KW.js';
@@ -1,8 +1,8 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode } from 'react';
3
- import { e as OUIActionResult } from '../types-DLOa7CWj.cjs';
4
- import { i as SurfaceRuntime, h as SurfaceForm, D as DefinedSurface } from '../surface-runtime-Ca0oLhb4.cjs';
5
- import '../websocket-CoSpb5nB.cjs';
3
+ import { e as OUIActionResult } from '../types-BNUECkjl.cjs';
4
+ import { i as SurfaceRuntime, h as SurfaceForm, D as DefinedSurface } from '../surface-runtime-DrHIKVGg.cjs';
5
+ import '../websocket-sj4FmEZD.cjs';
6
6
 
7
7
  interface SurfaceRuntimeProviderProps {
8
8
  /** A runtime in either form (§7.3.8). */
@@ -1,8 +1,8 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode } from 'react';
3
- import { e as OUIActionResult } from '../types-DLOa7CWj.js';
4
- import { i as SurfaceRuntime, h as SurfaceForm, D as DefinedSurface } from '../surface-runtime-BixhN5CJ.js';
5
- import '../websocket-Bf7xMzs1.js';
3
+ import { e as OUIActionResult } from '../types-BNUECkjl.js';
4
+ import { i as SurfaceRuntime, h as SurfaceForm, D as DefinedSurface } from '../surface-runtime-EASHWNtv.js';
5
+ import '../websocket-BlQDrFtE.js';
6
6
 
7
7
  interface SurfaceRuntimeProviderProps {
8
8
  /** A runtime in either form (§7.3.8). */
@@ -1,172 +1,176 @@
1
1
  'use strict';
2
2
 
3
- var chunkBLKQNZFC_cjs = require('../chunk-BLKQNZFC.cjs');
3
+ var chunkTGMRXTZV_cjs = require('../chunk-TGMRXTZV.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "ARGS_HASH_PATTERN", {
8
8
  enumerable: true,
9
- get: function () { return chunkBLKQNZFC_cjs.ARGS_HASH_PATTERN; }
9
+ get: function () { return chunkTGMRXTZV_cjs.ARGS_HASH_PATTERN; }
10
10
  });
11
11
  Object.defineProperty(exports, "ATTACHMENT_ID_PATTERN", {
12
12
  enumerable: true,
13
- get: function () { return chunkBLKQNZFC_cjs.ATTACHMENT_ID_PATTERN; }
13
+ get: function () { return chunkTGMRXTZV_cjs.ATTACHMENT_ID_PATTERN; }
14
14
  });
15
15
  Object.defineProperty(exports, "DEFINITION_HASH_HEX", {
16
16
  enumerable: true,
17
- get: function () { return chunkBLKQNZFC_cjs.DEFINITION_HASH_HEX; }
17
+ get: function () { return chunkTGMRXTZV_cjs.DEFINITION_HASH_HEX; }
18
18
  });
19
19
  Object.defineProperty(exports, "FIT_LIST_STEPS", {
20
20
  enumerable: true,
21
- get: function () { return chunkBLKQNZFC_cjs.FIT_LIST_STEPS; }
21
+ get: function () { return chunkTGMRXTZV_cjs.FIT_LIST_STEPS; }
22
22
  });
23
23
  Object.defineProperty(exports, "FIT_TEXT_CHARS", {
24
24
  enumerable: true,
25
- get: function () { return chunkBLKQNZFC_cjs.FIT_TEXT_CHARS; }
25
+ get: function () { return chunkTGMRXTZV_cjs.FIT_TEXT_CHARS; }
26
26
  });
27
27
  Object.defineProperty(exports, "INDEX_DESCRIPTION_CHARS", {
28
28
  enumerable: true,
29
- get: function () { return chunkBLKQNZFC_cjs.INDEX_DESCRIPTION_CHARS; }
29
+ get: function () { return chunkTGMRXTZV_cjs.INDEX_DESCRIPTION_CHARS; }
30
30
  });
31
31
  Object.defineProperty(exports, "INDEX_INPUT_CHARS", {
32
32
  enumerable: true,
33
- get: function () { return chunkBLKQNZFC_cjs.INDEX_INPUT_CHARS; }
33
+ get: function () { return chunkTGMRXTZV_cjs.INDEX_INPUT_CHARS; }
34
34
  });
35
35
  Object.defineProperty(exports, "INDEX_INPUT_PROPERTIES", {
36
36
  enumerable: true,
37
- get: function () { return chunkBLKQNZFC_cjs.INDEX_INPUT_PROPERTIES; }
37
+ get: function () { return chunkTGMRXTZV_cjs.INDEX_INPUT_PROPERTIES; }
38
38
  });
39
39
  Object.defineProperty(exports, "OUI_ATTACHMENT_FORMAT", {
40
40
  enumerable: true,
41
- get: function () { return chunkBLKQNZFC_cjs.OUI_ATTACHMENT_FORMAT; }
41
+ get: function () { return chunkTGMRXTZV_cjs.OUI_ATTACHMENT_FORMAT; }
42
42
  });
43
43
  Object.defineProperty(exports, "OUI_DESCRIBE_ACTION", {
44
44
  enumerable: true,
45
- get: function () { return chunkBLKQNZFC_cjs.OUI_DESCRIBE_ACTION; }
45
+ get: function () { return chunkTGMRXTZV_cjs.OUI_DESCRIBE_ACTION; }
46
46
  });
47
47
  Object.defineProperty(exports, "OUI_EFFECT_ACCESS", {
48
48
  enumerable: true,
49
- get: function () { return chunkBLKQNZFC_cjs.OUI_EFFECT_ACCESS; }
49
+ get: function () { return chunkTGMRXTZV_cjs.OUI_EFFECT_ACCESS; }
50
50
  });
51
51
  Object.defineProperty(exports, "OUI_EFFECT_KINDS", {
52
52
  enumerable: true,
53
- get: function () { return chunkBLKQNZFC_cjs.OUI_EFFECT_KINDS; }
53
+ get: function () { return chunkTGMRXTZV_cjs.OUI_EFFECT_KINDS; }
54
54
  });
55
55
  Object.defineProperty(exports, "OUI_PROTOCOL_EVENTS", {
56
56
  enumerable: true,
57
- get: function () { return chunkBLKQNZFC_cjs.OUI_PROTOCOL_EVENTS; }
57
+ get: function () { return chunkTGMRXTZV_cjs.OUI_PROTOCOL_EVENTS; }
58
58
  });
59
59
  Object.defineProperty(exports, "OUI_READ_ACTION", {
60
60
  enumerable: true,
61
- get: function () { return chunkBLKQNZFC_cjs.OUI_READ_ACTION; }
61
+ get: function () { return chunkTGMRXTZV_cjs.OUI_READ_ACTION; }
62
62
  });
63
63
  Object.defineProperty(exports, "OUI_RUNTIME_SURFACE", {
64
64
  enumerable: true,
65
- get: function () { return chunkBLKQNZFC_cjs.OUI_RUNTIME_SURFACE; }
65
+ get: function () { return chunkTGMRXTZV_cjs.OUI_RUNTIME_SURFACE; }
66
66
  });
67
67
  Object.defineProperty(exports, "acceptsMediaType", {
68
68
  enumerable: true,
69
- get: function () { return chunkBLKQNZFC_cjs.acceptsMediaType; }
69
+ get: function () { return chunkTGMRXTZV_cjs.acceptsMediaType; }
70
70
  });
71
71
  Object.defineProperty(exports, "argsHash", {
72
72
  enumerable: true,
73
- get: function () { return chunkBLKQNZFC_cjs.argsHash; }
73
+ get: function () { return chunkTGMRXTZV_cjs.argsHash; }
74
74
  });
75
75
  Object.defineProperty(exports, "atPointer", {
76
76
  enumerable: true,
77
- get: function () { return chunkBLKQNZFC_cjs.atPointer; }
77
+ get: function () { return chunkTGMRXTZV_cjs.atPointer; }
78
78
  });
79
79
  Object.defineProperty(exports, "attachmentIdsIn", {
80
80
  enumerable: true,
81
- get: function () { return chunkBLKQNZFC_cjs.attachmentIdsIn; }
81
+ get: function () { return chunkTGMRXTZV_cjs.attachmentIdsIn; }
82
82
  });
83
83
  Object.defineProperty(exports, "attachmentInputOf", {
84
84
  enumerable: true,
85
- get: function () { return chunkBLKQNZFC_cjs.attachmentInputOf; }
85
+ get: function () { return chunkTGMRXTZV_cjs.attachmentInputOf; }
86
86
  });
87
87
  Object.defineProperty(exports, "attachmentInputs", {
88
88
  enumerable: true,
89
- get: function () { return chunkBLKQNZFC_cjs.attachmentInputs; }
89
+ get: function () { return chunkTGMRXTZV_cjs.attachmentInputs; }
90
90
  });
91
91
  Object.defineProperty(exports, "canonicalJson", {
92
92
  enumerable: true,
93
- get: function () { return chunkBLKQNZFC_cjs.canonicalJson; }
93
+ get: function () { return chunkTGMRXTZV_cjs.canonicalJson; }
94
94
  });
95
95
  Object.defineProperty(exports, "constantOf", {
96
96
  enumerable: true,
97
- get: function () { return chunkBLKQNZFC_cjs.constantOf; }
97
+ get: function () { return chunkTGMRXTZV_cjs.constantOf; }
98
98
  });
99
99
  Object.defineProperty(exports, "definitionHash", {
100
100
  enumerable: true,
101
- get: function () { return chunkBLKQNZFC_cjs.definitionHash; }
101
+ get: function () { return chunkTGMRXTZV_cjs.definitionHash; }
102
102
  });
103
103
  Object.defineProperty(exports, "discriminatorOf", {
104
104
  enumerable: true,
105
- get: function () { return chunkBLKQNZFC_cjs.discriminatorOf; }
105
+ get: function () { return chunkTGMRXTZV_cjs.discriminatorOf; }
106
106
  });
107
107
  Object.defineProperty(exports, "effectAccess", {
108
108
  enumerable: true,
109
- get: function () { return chunkBLKQNZFC_cjs.effectAccess; }
109
+ get: function () { return chunkTGMRXTZV_cjs.effectAccess; }
110
110
  });
111
111
  Object.defineProperty(exports, "firstSentence", {
112
112
  enumerable: true,
113
- get: function () { return chunkBLKQNZFC_cjs.firstSentence; }
113
+ get: function () { return chunkTGMRXTZV_cjs.firstSentence; }
114
114
  });
115
115
  Object.defineProperty(exports, "fitObservations", {
116
116
  enumerable: true,
117
- get: function () { return chunkBLKQNZFC_cjs.fitObservations; }
117
+ get: function () { return chunkTGMRXTZV_cjs.fitObservations; }
118
118
  });
119
119
  Object.defineProperty(exports, "indexEntry", {
120
120
  enumerable: true,
121
- get: function () { return chunkBLKQNZFC_cjs.indexEntry; }
121
+ get: function () { return chunkTGMRXTZV_cjs.indexEntry; }
122
122
  });
123
123
  Object.defineProperty(exports, "isAttachmentId", {
124
124
  enumerable: true,
125
- get: function () { return chunkBLKQNZFC_cjs.isAttachmentId; }
125
+ get: function () { return chunkTGMRXTZV_cjs.isAttachmentId; }
126
126
  });
127
127
  Object.defineProperty(exports, "jsonBytes", {
128
128
  enumerable: true,
129
- get: function () { return chunkBLKQNZFC_cjs.jsonBytes; }
129
+ get: function () { return chunkTGMRXTZV_cjs.jsonBytes; }
130
130
  });
131
131
  Object.defineProperty(exports, "misplacedAttachmentInputs", {
132
132
  enumerable: true,
133
- get: function () { return chunkBLKQNZFC_cjs.misplacedAttachmentInputs; }
133
+ get: function () { return chunkTGMRXTZV_cjs.misplacedAttachmentInputs; }
134
+ });
135
+ Object.defineProperty(exports, "observationIndexEntry", {
136
+ enumerable: true,
137
+ get: function () { return chunkTGMRXTZV_cjs.observationIndexEntry; }
134
138
  });
135
139
  Object.defineProperty(exports, "pointerStep", {
136
140
  enumerable: true,
137
- get: function () { return chunkBLKQNZFC_cjs.pointerStep; }
141
+ get: function () { return chunkTGMRXTZV_cjs.pointerStep; }
138
142
  });
139
143
  Object.defineProperty(exports, "pointerSteps", {
140
144
  enumerable: true,
141
- get: function () { return chunkBLKQNZFC_cjs.pointerSteps; }
145
+ get: function () { return chunkTGMRXTZV_cjs.pointerSteps; }
142
146
  });
143
147
  Object.defineProperty(exports, "requiresApproval", {
144
148
  enumerable: true,
145
- get: function () { return chunkBLKQNZFC_cjs.requiresApproval; }
149
+ get: function () { return chunkTGMRXTZV_cjs.requiresApproval; }
146
150
  });
147
151
  Object.defineProperty(exports, "sortedJson", {
148
152
  enumerable: true,
149
- get: function () { return chunkBLKQNZFC_cjs.sortedJson; }
153
+ get: function () { return chunkTGMRXTZV_cjs.sortedJson; }
150
154
  });
151
155
  Object.defineProperty(exports, "summarizeInput", {
152
156
  enumerable: true,
153
- get: function () { return chunkBLKQNZFC_cjs.summarizeInput; }
157
+ get: function () { return chunkTGMRXTZV_cjs.summarizeInput; }
154
158
  });
155
159
  Object.defineProperty(exports, "surfaceIndex", {
156
160
  enumerable: true,
157
- get: function () { return chunkBLKQNZFC_cjs.surfaceIndex; }
161
+ get: function () { return chunkTGMRXTZV_cjs.surfaceIndex; }
158
162
  });
159
163
  Object.defineProperty(exports, "surfacesHash", {
160
164
  enumerable: true,
161
- get: function () { return chunkBLKQNZFC_cjs.surfacesHash; }
165
+ get: function () { return chunkTGMRXTZV_cjs.surfacesHash; }
162
166
  });
163
167
  Object.defineProperty(exports, "utf8Length", {
164
168
  enumerable: true,
165
- get: function () { return chunkBLKQNZFC_cjs.utf8Length; }
169
+ get: function () { return chunkTGMRXTZV_cjs.utf8Length; }
166
170
  });
167
171
  Object.defineProperty(exports, "withoutTitleLeadIn", {
168
172
  enumerable: true,
169
- get: function () { return chunkBLKQNZFC_cjs.withoutTitleLeadIn; }
173
+ get: function () { return chunkTGMRXTZV_cjs.withoutTitleLeadIn; }
170
174
  });
171
175
  //# sourceMappingURL=index.cjs.map
172
176
  //# sourceMappingURL=index.cjs.map
@@ -1,5 +1,5 @@
1
- import { r as OUISurface, t as OUISurfaceIndex, J as JSONSchema, O as OUIAction, b as OUIActionIndexEntry, n as OUIObservationSnapshot, k as OUIFitCut } from '../types-DLOa7CWj.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, m as OUIObservation, o as OUIObservationUpdate, p as OUIProtocolEvent, q as OUIResultDelivery, s as OUISurfaceDeregistration, u as OUISurfaceRegistration, v as OUISurfaceSnapshot, w as OUI_EFFECT_ACCESS, x as OUI_EFFECT_KINDS, y as OUI_PROTOCOL_EVENTS, z as argsHash, B as canonicalJson, C as effectAccess, D as requiresApproval } from '../types-DLOa7CWj.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
3
 
4
4
  /**
5
5
  * The identity of a set of surfaces, for an answer that need not repeat them
@@ -95,6 +95,13 @@ declare const DEFINITION_HASH_HEX = 8;
95
95
  declare function definitionHash(action: OUIAction): string;
96
96
  /** An action's index entry (§7.3.8). */
97
97
  declare function indexEntry(action: OUIAction): OUIActionIndexEntry;
98
+ /**
99
+ * An observation as an index carries it (§7.3.8): its id, and where its schema
100
+ * declares a list of rows, which is what an agent runtime reads to shorten that
101
+ * list by rule. The rest of the declaration travelled with every snapshot and
102
+ * nothing read it: a quarter of the index on a studio page.
103
+ */
104
+ declare function observationIndexEntry(observation: OUIObservation): OUIObservationIndexEntry;
98
105
  /** A surface in index form (§7.3.8). */
99
106
  declare function surfaceIndex(surface: OUISurface): OUISurfaceIndex;
100
107
 
@@ -178,4 +185,4 @@ declare function attachmentIdsIn(schema: JSONSchema | undefined, params: Record<
178
185
  input: OUIAttachmentInput;
179
186
  }>;
180
187
 
181
- 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, 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, pointerStep, pointerSteps, sortedJson, summarizeInput, surfaceIndex, surfacesHash, utf8Length, withoutTitleLeadIn };
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 };
@@ -1,5 +1,5 @@
1
- import { r as OUISurface, t as OUISurfaceIndex, J as JSONSchema, O as OUIAction, b as OUIActionIndexEntry, n as OUIObservationSnapshot, k as OUIFitCut } from '../types-DLOa7CWj.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, m as OUIObservation, o as OUIObservationUpdate, p as OUIProtocolEvent, q as OUIResultDelivery, s as OUISurfaceDeregistration, u as OUISurfaceRegistration, v as OUISurfaceSnapshot, w as OUI_EFFECT_ACCESS, x as OUI_EFFECT_KINDS, y as OUI_PROTOCOL_EVENTS, z as argsHash, B as canonicalJson, C as effectAccess, D as requiresApproval } from '../types-DLOa7CWj.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
3
 
4
4
  /**
5
5
  * The identity of a set of surfaces, for an answer that need not repeat them
@@ -95,6 +95,13 @@ declare const DEFINITION_HASH_HEX = 8;
95
95
  declare function definitionHash(action: OUIAction): string;
96
96
  /** An action's index entry (§7.3.8). */
97
97
  declare function indexEntry(action: OUIAction): OUIActionIndexEntry;
98
+ /**
99
+ * An observation as an index carries it (§7.3.8): its id, and where its schema
100
+ * declares a list of rows, which is what an agent runtime reads to shorten that
101
+ * list by rule. The rest of the declaration travelled with every snapshot and
102
+ * nothing read it: a quarter of the index on a studio page.
103
+ */
104
+ declare function observationIndexEntry(observation: OUIObservation): OUIObservationIndexEntry;
98
105
  /** A surface in index form (§7.3.8). */
99
106
  declare function surfaceIndex(surface: OUISurface): OUISurfaceIndex;
100
107
 
@@ -178,4 +185,4 @@ declare function attachmentIdsIn(schema: JSONSchema | undefined, params: Record<
178
185
  input: OUIAttachmentInput;
179
186
  }>;
180
187
 
181
- 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, 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, pointerStep, pointerSteps, sortedJson, summarizeInput, surfaceIndex, surfacesHash, utf8Length, withoutTitleLeadIn };
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 };
@@ -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, pointerStep, pointerSteps, requiresApproval, sortedJson, summarizeInput, surfaceIndex, surfacesHash, utf8Length, withoutTitleLeadIn } from '../chunk-C2IMSSJK.js';
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-OSFGTDAM.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, r as OUISurface, l as OUIIndexSnapshot, v as OUISurfaceSnapshot, d as OUIActionRequest, e as OUIActionResult, g as OUIApprovalGrant } from './types-DLOa7CWj.cjs';
2
- import { S as SocketLike, e as OUITransportConfig } from './websocket-CoSpb5nB.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.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.
@@ -331,6 +331,22 @@ interface SurfaceRuntime<F extends SurfaceForm = "full"> {
331
331
  grantApproval(grant: OUIApprovalGrant): boolean;
332
332
  /** Called whenever the snapshot changes. */
333
333
  subscribe(listener: () => void): () => void;
334
+ /**
335
+ * Called once for each request this runtime first answered `interim: true`
336
+ * (its action started work and was not done), when the request's final
337
+ * answer, a success or a failure, has been sent and the receiving side has
338
+ * acknowledged it, so a reader of the agent runtime's results finds it
339
+ * (§7.3.3). That includes the failures the runtime sends itself: work that
340
+ * passed its polling limits (`TIMEOUT`), was started again (`SUPERSEDED`),
341
+ * or whose surface left the page (`SURFACE_NOT_MOUNTED`). A request that was
342
+ * never interim is not told, and neither is a final answer that was refused
343
+ * even trimmed, or sent with no transport attached.
344
+ *
345
+ * An agent client uses it to have the agent report work that outlived the
346
+ * turn that started it. A listener that throws is logged and does not stop
347
+ * the others. Returns the function that removes the listener.
348
+ */
349
+ onSettled(listener: (work: OUISettledWork) => void): () => void;
334
350
  /** Stop polling, detach from the socket and forget every mount. */
335
351
  dispose(): void;
336
352
  }
@@ -1,5 +1,5 @@
1
- import { i as OUIEffectKind, J as JSONSchema, c as OUIActionPolling, f as OUIActivation, r as OUISurface, l as OUIIndexSnapshot, v as OUISurfaceSnapshot, d as OUIActionRequest, e as OUIActionResult, g as OUIApprovalGrant } from './types-DLOa7CWj.js';
2
- import { S as SocketLike, e as OUITransportConfig } from './websocket-Bf7xMzs1.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.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.
@@ -331,6 +331,22 @@ interface SurfaceRuntime<F extends SurfaceForm = "full"> {
331
331
  grantApproval(grant: OUIApprovalGrant): boolean;
332
332
  /** Called whenever the snapshot changes. */
333
333
  subscribe(listener: () => void): () => void;
334
+ /**
335
+ * Called once for each request this runtime first answered `interim: true`
336
+ * (its action started work and was not done), when the request's final
337
+ * answer, a success or a failure, has been sent and the receiving side has
338
+ * acknowledged it, so a reader of the agent runtime's results finds it
339
+ * (§7.3.3). That includes the failures the runtime sends itself: work that
340
+ * passed its polling limits (`TIMEOUT`), was started again (`SUPERSEDED`),
341
+ * or whose surface left the page (`SURFACE_NOT_MOUNTED`). A request that was
342
+ * never interim is not told, and neither is a final answer that was refused
343
+ * even trimmed, or sent with no transport attached.
344
+ *
345
+ * An agent client uses it to have the agent report work that outlived the
346
+ * turn that started it. A listener that throws is logged and does not stop
347
+ * the others. Returns the function that removes the listener.
348
+ */
349
+ onSettled(listener: (work: OUISettledWork) => void): () => void;
334
350
  /** Stop polling, detach from the socket and forget every mount. */
335
351
  dispose(): void;
336
352
  }
@@ -1,6 +1,6 @@
1
- import { d as OUITransport } from '../websocket-CoSpb5nB.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-CoSpb5nB.cjs';
3
- import '../types-DLOa7CWj.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-Bf7xMzs1.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-Bf7xMzs1.js';
3
- import '../types-DLOa7CWj.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.
@@ -267,10 +267,19 @@ interface OUISurfaceIndex {
267
267
  name: string;
268
268
  description: string;
269
269
  version?: string;
270
- /** Observation definitions travel whole: they are small, and say how to read the values that follow. */
271
- observations?: OUIObservation[];
270
+ /** What the surface reports, by id, with where its schema declares a list of rows (§7.3.8). */
271
+ observations?: OUIObservationIndexEntry[];
272
272
  index: OUIActionIndexEntry[];
273
273
  }
274
+ /**
275
+ * An observation as an index carries it: its id, and its schema reduced to what
276
+ * leads to an `x-rows` declaration, which is what an agent runtime shortens a
277
+ * list of rows by.
278
+ */
279
+ interface OUIObservationIndexEntry {
280
+ id: string;
281
+ schema?: JSONSchema;
282
+ }
274
283
  /**
275
284
  * One place where a snapshot's or an answer's observations were shortened to
276
285
  * fit its byte budget (§7.3.9): a list cut to its first rows, a long text cut,
@@ -407,6 +416,29 @@ interface OUIActionResult {
407
416
  */
408
417
  settled?: boolean;
409
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
+ }
410
442
  /** Latest observation values, keyed by surface id and then observation id. */
411
443
  type OUIObservationSnapshot = Record<string, Record<string, unknown>>;
412
444
  /**
@@ -501,4 +533,4 @@ declare const OUI_PROTOCOL_EVENTS: {
501
533
  readonly OBSERVATION_UPDATE: "observation:update";
502
534
  };
503
535
 
504
- export { ARGS_HASH_PATTERN as A, canonicalJson as B, effectAccess as C, requiresApproval as D, 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 OUIObservationSnapshot as n, type OUIObservationUpdate as o, type OUIProtocolEvent as p, type OUIResultDelivery as q, type OUISurface as r, type OUISurfaceDeregistration as s, type OUISurfaceIndex as t, type OUISurfaceRegistration as u, type OUISurfaceSnapshot as v, OUI_EFFECT_ACCESS as w, OUI_EFFECT_KINDS as x, OUI_PROTOCOL_EVENTS as y, argsHash 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 };
@@ -267,10 +267,19 @@ interface OUISurfaceIndex {
267
267
  name: string;
268
268
  description: string;
269
269
  version?: string;
270
- /** Observation definitions travel whole: they are small, and say how to read the values that follow. */
271
- observations?: OUIObservation[];
270
+ /** What the surface reports, by id, with where its schema declares a list of rows (§7.3.8). */
271
+ observations?: OUIObservationIndexEntry[];
272
272
  index: OUIActionIndexEntry[];
273
273
  }
274
+ /**
275
+ * An observation as an index carries it: its id, and its schema reduced to what
276
+ * leads to an `x-rows` declaration, which is what an agent runtime shortens a
277
+ * list of rows by.
278
+ */
279
+ interface OUIObservationIndexEntry {
280
+ id: string;
281
+ schema?: JSONSchema;
282
+ }
274
283
  /**
275
284
  * One place where a snapshot's or an answer's observations were shortened to
276
285
  * fit its byte budget (§7.3.9): a list cut to its first rows, a long text cut,
@@ -407,6 +416,29 @@ interface OUIActionResult {
407
416
  */
408
417
  settled?: boolean;
409
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
+ }
410
442
  /** Latest observation values, keyed by surface id and then observation id. */
411
443
  type OUIObservationSnapshot = Record<string, Record<string, unknown>>;
412
444
  /**
@@ -501,4 +533,4 @@ declare const OUI_PROTOCOL_EVENTS: {
501
533
  readonly OBSERVATION_UPDATE: "observation:update";
502
534
  };
503
535
 
504
- export { ARGS_HASH_PATTERN as A, canonicalJson as B, effectAccess as C, requiresApproval as D, 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 OUIObservationSnapshot as n, type OUIObservationUpdate as o, type OUIProtocolEvent as p, type OUIResultDelivery as q, type OUISurface as r, type OUISurfaceDeregistration as s, type OUISurfaceIndex as t, type OUISurfaceRegistration as u, type OUISurfaceSnapshot as v, OUI_EFFECT_ACCESS as w, OUI_EFFECT_KINDS as x, OUI_PROTOCOL_EVENTS as y, argsHash 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, o as OUIObservationUpdate, r as OUISurface } from './types-DLOa7CWj.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, o as OUIObservationUpdate, r as OUISurface } from './types-DLOa7CWj.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.12.0",
3
+ "version": "0.14.0",
4
4
  "description": "OUI — The OpenUI Specification. A machine-readable contract for agent-controllable user interfaces.",
5
5
  "keywords": [
6
6
  "oui",