oui-spec 0.14.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.
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
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';
2
+ export { DEFINITION_HASH_HEX, FIT_LIST_STEPS, FIT_TEXT_CHARS, INDEX_DESCRIPTION_CHARS, INDEX_INPUT_CHARS, INDEX_INPUT_PROPERTIES, 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 } from './spec/index.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';
4
+ export { A as ActionDefinition, a as ActionHandlerResult, b as ActionPollingConfig, c as AttachmentResolver, d as AttachmentText, D as DefinedSurface, M as MountedSurface, O as OUIBranded, e as ObservationDefinition, S as SettleOptions, f as SurfaceDefinition, g as SurfaceForm, h as SurfaceRuntime, i as SurfaceRuntimeOptions, j as createSurfaceRuntime, k as defineSurface } from './surface-runtime-DkJp7b3F.js';
4
5
  export { DuplicateIds, OUIConfig, OUIConfigError, OUIInstance, OwnedTransport, ValidateSurfaceIds, acceptCurrentTurn, createOUI } from './core/index.js';
5
6
  export { SurfaceRuntimeProvider, SurfaceRuntimeProviderProps, UseSurfaceOptions, UseSurfaceResult, useObservation, useSurface, useSurfaceHold, useSurfaceRuntime } from './react/index.js';
6
7
  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';
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
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';
1
+ export { acceptCurrentTurn, createOUI, createSurfaceRuntime, defineSurface } from './chunk-TGYTMFXH.js';
2
+ 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';
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,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode } from 'react';
3
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';
4
+ import { h as SurfaceRuntime, g as SurfaceForm, D as DefinedSurface } from '../surface-runtime-l4L1dqK5.cjs';
5
5
  import '../websocket-sj4FmEZD.cjs';
6
6
 
7
7
  interface SurfaceRuntimeProviderProps {
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode } from 'react';
3
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';
4
+ import { h as SurfaceRuntime, g as SurfaceForm, D as DefinedSurface } from '../surface-runtime-DkJp7b3F.js';
5
5
  import '../websocket-BlQDrFtE.js';
6
6
 
7
7
  interface SurfaceRuntimeProviderProps {
@@ -1,176 +1,180 @@
1
1
  'use strict';
2
2
 
3
- var chunkTGMRXTZV_cjs = require('../chunk-TGMRXTZV.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 chunkTGMRXTZV_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 chunkTGMRXTZV_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 chunkTGMRXTZV_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 chunkTGMRXTZV_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 chunkTGMRXTZV_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 chunkTGMRXTZV_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 chunkTGMRXTZV_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 chunkTGMRXTZV_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 chunkTGMRXTZV_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 chunkTGMRXTZV_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 chunkTGMRXTZV_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 chunkTGMRXTZV_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 chunkTGMRXTZV_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 chunkTGMRXTZV_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 chunkTGMRXTZV_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 chunkTGMRXTZV_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 chunkTGMRXTZV_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 chunkTGMRXTZV_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 chunkTGMRXTZV_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 chunkTGMRXTZV_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 chunkTGMRXTZV_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 chunkTGMRXTZV_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 chunkTGMRXTZV_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 chunkTGMRXTZV_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 chunkTGMRXTZV_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 chunkTGMRXTZV_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 chunkTGMRXTZV_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 chunkTGMRXTZV_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 chunkTGMRXTZV_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 chunkTGMRXTZV_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 chunkTGMRXTZV_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 chunkTGMRXTZV_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 chunkTGMRXTZV_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 chunkTGMRXTZV_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 chunkTGMRXTZV_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 chunkTGMRXTZV_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 chunkTGMRXTZV_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 chunkTGMRXTZV_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 chunkTGMRXTZV_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 chunkTGMRXTZV_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 chunkTGMRXTZV_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 chunkTGMRXTZV_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
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
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
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
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-OSFGTDAM.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
@@ -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. */
@@ -357,4 +356,4 @@ declare function createSurfaceRuntime(options?: SurfaceRuntimeOptions & {
357
356
  form?: "full";
358
357
  }): SurfaceRuntime<"full">;
359
358
 
360
- 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 };
@@ -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. */
@@ -357,4 +356,4 @@ declare function createSurfaceRuntime(options?: SurfaceRuntimeOptions & {
357
356
  form?: "full";
358
357
  }): SurfaceRuntime<"full">;
359
358
 
360
- 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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oui-spec",
3
- "version": "0.14.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",