oui-spec 0.11.1 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -2
- package/dist/{chunk-C2IMSSJK.js → chunk-3EMDNYQD.js} +25 -4
- package/dist/chunk-3EMDNYQD.js.map +1 -0
- package/dist/{chunk-VIXTV5GD.js → chunk-O3C76FAO.js} +24 -3
- package/dist/chunk-O3C76FAO.js.map +1 -0
- package/dist/{chunk-5CAR3CRY.cjs → chunk-XHJILEMN.cjs} +53 -32
- package/dist/chunk-XHJILEMN.cjs.map +1 -0
- package/dist/{chunk-BLKQNZFC.cjs → chunk-YOJABWGB.cjs} +25 -3
- package/dist/chunk-YOJABWGB.cjs.map +1 -0
- package/dist/core/index.cjs +8 -8
- package/dist/core/index.d.cts +5 -5
- package/dist/core/index.d.ts +5 -5
- package/dist/core/index.js +2 -2
- package/dist/index.cjs +52 -48
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +2 -2
- package/dist/react/index.d.cts +3 -3
- package/dist/react/index.d.ts +3 -3
- package/dist/spec/index.cjs +46 -42
- package/dist/spec/index.d.cts +10 -3
- package/dist/spec/index.d.ts +10 -3
- package/dist/spec/index.js +1 -1
- package/dist/{surface-runtime-Da1FSjNF.d.ts → surface-runtime-BIekR9rL.d.cts} +18 -8
- package/dist/{surface-runtime-C3883XHJ.d.cts → surface-runtime-DXEFMXK7.d.ts} +18 -8
- package/dist/transport/index.d.cts +3 -3
- package/dist/transport/index.d.ts +3 -3
- package/dist/{types-DLOa7CWj.d.cts → types-6doPwE6g.d.cts} +12 -3
- package/dist/{types-DLOa7CWj.d.ts → types-6doPwE6g.d.ts} +12 -3
- package/dist/{websocket-CoSpb5nB.d.cts → websocket-CCpPMZ5a.d.cts} +1 -1
- package/dist/{websocket-Bf7xMzs1.d.ts → websocket-DHbDDwvt.d.ts} +1 -1
- package/package.json +1 -1
- package/spec/OUI-SPEC-v0.1.md +11 -1
- package/dist/chunk-5CAR3CRY.cjs.map +0 -1
- package/dist/chunk-BLKQNZFC.cjs.map +0 -1
- package/dist/chunk-C2IMSSJK.js.map +0 -1
- package/dist/chunk-VIXTV5GD.js.map +0 -1
package/dist/spec/index.cjs
CHANGED
|
@@ -1,172 +1,176 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkYOJABWGB_cjs = require('../chunk-YOJABWGB.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "ARGS_HASH_PATTERN", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkYOJABWGB_cjs.ARGS_HASH_PATTERN; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "ATTACHMENT_ID_PATTERN", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkYOJABWGB_cjs.ATTACHMENT_ID_PATTERN; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "DEFINITION_HASH_HEX", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkYOJABWGB_cjs.DEFINITION_HASH_HEX; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "FIT_LIST_STEPS", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkYOJABWGB_cjs.FIT_LIST_STEPS; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "FIT_TEXT_CHARS", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkYOJABWGB_cjs.FIT_TEXT_CHARS; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "INDEX_DESCRIPTION_CHARS", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkYOJABWGB_cjs.INDEX_DESCRIPTION_CHARS; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "INDEX_INPUT_CHARS", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkYOJABWGB_cjs.INDEX_INPUT_CHARS; }
|
|
34
34
|
});
|
|
35
35
|
Object.defineProperty(exports, "INDEX_INPUT_PROPERTIES", {
|
|
36
36
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunkYOJABWGB_cjs.INDEX_INPUT_PROPERTIES; }
|
|
38
38
|
});
|
|
39
39
|
Object.defineProperty(exports, "OUI_ATTACHMENT_FORMAT", {
|
|
40
40
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunkYOJABWGB_cjs.OUI_ATTACHMENT_FORMAT; }
|
|
42
42
|
});
|
|
43
43
|
Object.defineProperty(exports, "OUI_DESCRIBE_ACTION", {
|
|
44
44
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
45
|
+
get: function () { return chunkYOJABWGB_cjs.OUI_DESCRIBE_ACTION; }
|
|
46
46
|
});
|
|
47
47
|
Object.defineProperty(exports, "OUI_EFFECT_ACCESS", {
|
|
48
48
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
49
|
+
get: function () { return chunkYOJABWGB_cjs.OUI_EFFECT_ACCESS; }
|
|
50
50
|
});
|
|
51
51
|
Object.defineProperty(exports, "OUI_EFFECT_KINDS", {
|
|
52
52
|
enumerable: true,
|
|
53
|
-
get: function () { return
|
|
53
|
+
get: function () { return chunkYOJABWGB_cjs.OUI_EFFECT_KINDS; }
|
|
54
54
|
});
|
|
55
55
|
Object.defineProperty(exports, "OUI_PROTOCOL_EVENTS", {
|
|
56
56
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
57
|
+
get: function () { return chunkYOJABWGB_cjs.OUI_PROTOCOL_EVENTS; }
|
|
58
58
|
});
|
|
59
59
|
Object.defineProperty(exports, "OUI_READ_ACTION", {
|
|
60
60
|
enumerable: true,
|
|
61
|
-
get: function () { return
|
|
61
|
+
get: function () { return chunkYOJABWGB_cjs.OUI_READ_ACTION; }
|
|
62
62
|
});
|
|
63
63
|
Object.defineProperty(exports, "OUI_RUNTIME_SURFACE", {
|
|
64
64
|
enumerable: true,
|
|
65
|
-
get: function () { return
|
|
65
|
+
get: function () { return chunkYOJABWGB_cjs.OUI_RUNTIME_SURFACE; }
|
|
66
66
|
});
|
|
67
67
|
Object.defineProperty(exports, "acceptsMediaType", {
|
|
68
68
|
enumerable: true,
|
|
69
|
-
get: function () { return
|
|
69
|
+
get: function () { return chunkYOJABWGB_cjs.acceptsMediaType; }
|
|
70
70
|
});
|
|
71
71
|
Object.defineProperty(exports, "argsHash", {
|
|
72
72
|
enumerable: true,
|
|
73
|
-
get: function () { return
|
|
73
|
+
get: function () { return chunkYOJABWGB_cjs.argsHash; }
|
|
74
74
|
});
|
|
75
75
|
Object.defineProperty(exports, "atPointer", {
|
|
76
76
|
enumerable: true,
|
|
77
|
-
get: function () { return
|
|
77
|
+
get: function () { return chunkYOJABWGB_cjs.atPointer; }
|
|
78
78
|
});
|
|
79
79
|
Object.defineProperty(exports, "attachmentIdsIn", {
|
|
80
80
|
enumerable: true,
|
|
81
|
-
get: function () { return
|
|
81
|
+
get: function () { return chunkYOJABWGB_cjs.attachmentIdsIn; }
|
|
82
82
|
});
|
|
83
83
|
Object.defineProperty(exports, "attachmentInputOf", {
|
|
84
84
|
enumerable: true,
|
|
85
|
-
get: function () { return
|
|
85
|
+
get: function () { return chunkYOJABWGB_cjs.attachmentInputOf; }
|
|
86
86
|
});
|
|
87
87
|
Object.defineProperty(exports, "attachmentInputs", {
|
|
88
88
|
enumerable: true,
|
|
89
|
-
get: function () { return
|
|
89
|
+
get: function () { return chunkYOJABWGB_cjs.attachmentInputs; }
|
|
90
90
|
});
|
|
91
91
|
Object.defineProperty(exports, "canonicalJson", {
|
|
92
92
|
enumerable: true,
|
|
93
|
-
get: function () { return
|
|
93
|
+
get: function () { return chunkYOJABWGB_cjs.canonicalJson; }
|
|
94
94
|
});
|
|
95
95
|
Object.defineProperty(exports, "constantOf", {
|
|
96
96
|
enumerable: true,
|
|
97
|
-
get: function () { return
|
|
97
|
+
get: function () { return chunkYOJABWGB_cjs.constantOf; }
|
|
98
98
|
});
|
|
99
99
|
Object.defineProperty(exports, "definitionHash", {
|
|
100
100
|
enumerable: true,
|
|
101
|
-
get: function () { return
|
|
101
|
+
get: function () { return chunkYOJABWGB_cjs.definitionHash; }
|
|
102
102
|
});
|
|
103
103
|
Object.defineProperty(exports, "discriminatorOf", {
|
|
104
104
|
enumerable: true,
|
|
105
|
-
get: function () { return
|
|
105
|
+
get: function () { return chunkYOJABWGB_cjs.discriminatorOf; }
|
|
106
106
|
});
|
|
107
107
|
Object.defineProperty(exports, "effectAccess", {
|
|
108
108
|
enumerable: true,
|
|
109
|
-
get: function () { return
|
|
109
|
+
get: function () { return chunkYOJABWGB_cjs.effectAccess; }
|
|
110
110
|
});
|
|
111
111
|
Object.defineProperty(exports, "firstSentence", {
|
|
112
112
|
enumerable: true,
|
|
113
|
-
get: function () { return
|
|
113
|
+
get: function () { return chunkYOJABWGB_cjs.firstSentence; }
|
|
114
114
|
});
|
|
115
115
|
Object.defineProperty(exports, "fitObservations", {
|
|
116
116
|
enumerable: true,
|
|
117
|
-
get: function () { return
|
|
117
|
+
get: function () { return chunkYOJABWGB_cjs.fitObservations; }
|
|
118
118
|
});
|
|
119
119
|
Object.defineProperty(exports, "indexEntry", {
|
|
120
120
|
enumerable: true,
|
|
121
|
-
get: function () { return
|
|
121
|
+
get: function () { return chunkYOJABWGB_cjs.indexEntry; }
|
|
122
122
|
});
|
|
123
123
|
Object.defineProperty(exports, "isAttachmentId", {
|
|
124
124
|
enumerable: true,
|
|
125
|
-
get: function () { return
|
|
125
|
+
get: function () { return chunkYOJABWGB_cjs.isAttachmentId; }
|
|
126
126
|
});
|
|
127
127
|
Object.defineProperty(exports, "jsonBytes", {
|
|
128
128
|
enumerable: true,
|
|
129
|
-
get: function () { return
|
|
129
|
+
get: function () { return chunkYOJABWGB_cjs.jsonBytes; }
|
|
130
130
|
});
|
|
131
131
|
Object.defineProperty(exports, "misplacedAttachmentInputs", {
|
|
132
132
|
enumerable: true,
|
|
133
|
-
get: function () { return
|
|
133
|
+
get: function () { return chunkYOJABWGB_cjs.misplacedAttachmentInputs; }
|
|
134
|
+
});
|
|
135
|
+
Object.defineProperty(exports, "observationIndexEntry", {
|
|
136
|
+
enumerable: true,
|
|
137
|
+
get: function () { return chunkYOJABWGB_cjs.observationIndexEntry; }
|
|
134
138
|
});
|
|
135
139
|
Object.defineProperty(exports, "pointerStep", {
|
|
136
140
|
enumerable: true,
|
|
137
|
-
get: function () { return
|
|
141
|
+
get: function () { return chunkYOJABWGB_cjs.pointerStep; }
|
|
138
142
|
});
|
|
139
143
|
Object.defineProperty(exports, "pointerSteps", {
|
|
140
144
|
enumerable: true,
|
|
141
|
-
get: function () { return
|
|
145
|
+
get: function () { return chunkYOJABWGB_cjs.pointerSteps; }
|
|
142
146
|
});
|
|
143
147
|
Object.defineProperty(exports, "requiresApproval", {
|
|
144
148
|
enumerable: true,
|
|
145
|
-
get: function () { return
|
|
149
|
+
get: function () { return chunkYOJABWGB_cjs.requiresApproval; }
|
|
146
150
|
});
|
|
147
151
|
Object.defineProperty(exports, "sortedJson", {
|
|
148
152
|
enumerable: true,
|
|
149
|
-
get: function () { return
|
|
153
|
+
get: function () { return chunkYOJABWGB_cjs.sortedJson; }
|
|
150
154
|
});
|
|
151
155
|
Object.defineProperty(exports, "summarizeInput", {
|
|
152
156
|
enumerable: true,
|
|
153
|
-
get: function () { return
|
|
157
|
+
get: function () { return chunkYOJABWGB_cjs.summarizeInput; }
|
|
154
158
|
});
|
|
155
159
|
Object.defineProperty(exports, "surfaceIndex", {
|
|
156
160
|
enumerable: true,
|
|
157
|
-
get: function () { return
|
|
161
|
+
get: function () { return chunkYOJABWGB_cjs.surfaceIndex; }
|
|
158
162
|
});
|
|
159
163
|
Object.defineProperty(exports, "surfacesHash", {
|
|
160
164
|
enumerable: true,
|
|
161
|
-
get: function () { return
|
|
165
|
+
get: function () { return chunkYOJABWGB_cjs.surfacesHash; }
|
|
162
166
|
});
|
|
163
167
|
Object.defineProperty(exports, "utf8Length", {
|
|
164
168
|
enumerable: true,
|
|
165
|
-
get: function () { return
|
|
169
|
+
get: function () { return chunkYOJABWGB_cjs.utf8Length; }
|
|
166
170
|
});
|
|
167
171
|
Object.defineProperty(exports, "withoutTitleLeadIn", {
|
|
168
172
|
enumerable: true,
|
|
169
|
-
get: function () { return
|
|
173
|
+
get: function () { return chunkYOJABWGB_cjs.withoutTitleLeadIn; }
|
|
170
174
|
});
|
|
171
175
|
//# sourceMappingURL=index.cjs.map
|
|
172
176
|
//# sourceMappingURL=index.cjs.map
|
package/dist/spec/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
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,
|
|
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';
|
|
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 };
|
package/dist/spec/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
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,
|
|
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';
|
|
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 };
|
package/dist/spec/index.js
CHANGED
|
@@ -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-
|
|
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';
|
|
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,
|
|
2
|
-
import { S as SocketLike, e as OUITransportConfig } from './websocket-
|
|
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';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Nominal branding for values OUI must construct itself.
|
|
@@ -312,13 +312,23 @@ interface SurfaceRuntime<F extends SurfaceForm = "full"> {
|
|
|
312
312
|
*/
|
|
313
313
|
hold(): () => void;
|
|
314
314
|
/**
|
|
315
|
-
* Record that the user approved one request,
|
|
316
|
-
*
|
|
317
|
-
*
|
|
318
|
-
*
|
|
319
|
-
*
|
|
315
|
+
* Record that the user approved one request, for this tab (the agent
|
|
316
|
+
* runtime's approval store answered it to this tab: from the person's
|
|
317
|
+
* click on its confirmation, or from the grant this tab claimed when they
|
|
318
|
+
* approved by voice). An action that needs approval — a `transaction`, or a
|
|
319
|
+
* destructive write — runs only on a request whose `approval` matches an
|
|
320
|
+
* unused, unexpired grant for exactly its params. Each grant admits one
|
|
321
|
+
* request.
|
|
322
|
+
*
|
|
323
|
+
* Returns whether the grant was taken. A grant this tab already holds or
|
|
324
|
+
* has used, or one already expired, is refused: a replayed grant never
|
|
325
|
+
* admits a second request.
|
|
326
|
+
*
|
|
327
|
+
* A request carrying an `approval` this tab was never given is another
|
|
328
|
+
* tab's: it is refused on its receipt (§7.3.7), and neither run nor
|
|
329
|
+
* answered, so the tab that holds the grant gives the only answer.
|
|
320
330
|
*/
|
|
321
|
-
grantApproval(grant: OUIApprovalGrant):
|
|
331
|
+
grantApproval(grant: OUIApprovalGrant): boolean;
|
|
322
332
|
/** Called whenever the snapshot changes. */
|
|
323
333
|
subscribe(listener: () => void): () => void;
|
|
324
334
|
/** Stop polling, detach from the socket and forget every mount. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as OUIEffectKind, J as JSONSchema, c as OUIActionPolling, f as OUIActivation,
|
|
2
|
-
import { S as SocketLike, e as OUITransportConfig } from './websocket-
|
|
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';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Nominal branding for values OUI must construct itself.
|
|
@@ -312,13 +312,23 @@ interface SurfaceRuntime<F extends SurfaceForm = "full"> {
|
|
|
312
312
|
*/
|
|
313
313
|
hold(): () => void;
|
|
314
314
|
/**
|
|
315
|
-
* Record that the user approved one request,
|
|
316
|
-
*
|
|
317
|
-
*
|
|
318
|
-
*
|
|
319
|
-
*
|
|
315
|
+
* Record that the user approved one request, for this tab (the agent
|
|
316
|
+
* runtime's approval store answered it to this tab: from the person's
|
|
317
|
+
* click on its confirmation, or from the grant this tab claimed when they
|
|
318
|
+
* approved by voice). An action that needs approval — a `transaction`, or a
|
|
319
|
+
* destructive write — runs only on a request whose `approval` matches an
|
|
320
|
+
* unused, unexpired grant for exactly its params. Each grant admits one
|
|
321
|
+
* request.
|
|
322
|
+
*
|
|
323
|
+
* Returns whether the grant was taken. A grant this tab already holds or
|
|
324
|
+
* has used, or one already expired, is refused: a replayed grant never
|
|
325
|
+
* admits a second request.
|
|
326
|
+
*
|
|
327
|
+
* A request carrying an `approval` this tab was never given is another
|
|
328
|
+
* tab's: it is refused on its receipt (§7.3.7), and neither run nor
|
|
329
|
+
* answered, so the tab that holds the grant gives the only answer.
|
|
320
330
|
*/
|
|
321
|
-
grantApproval(grant: OUIApprovalGrant):
|
|
331
|
+
grantApproval(grant: OUIApprovalGrant): boolean;
|
|
322
332
|
/** Called whenever the snapshot changes. */
|
|
323
333
|
subscribe(listener: () => void): () => void;
|
|
324
334
|
/** Stop polling, detach from the socket and forget every mount. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { d as OUITransport } from '../websocket-
|
|
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-
|
|
3
|
-
import '../types-
|
|
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';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Direct transport — for same-process communication.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { d as OUITransport } from '../websocket-
|
|
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-
|
|
3
|
-
import '../types-
|
|
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';
|
|
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
|
-
/**
|
|
271
|
-
observations?:
|
|
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,
|
|
@@ -501,4 +510,4 @@ declare const OUI_PROTOCOL_EVENTS: {
|
|
|
501
510
|
readonly OBSERVATION_UPDATE: "observation:update";
|
|
502
511
|
};
|
|
503
512
|
|
|
504
|
-
export { ARGS_HASH_PATTERN as A,
|
|
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 };
|
|
@@ -267,10 +267,19 @@ interface OUISurfaceIndex {
|
|
|
267
267
|
name: string;
|
|
268
268
|
description: string;
|
|
269
269
|
version?: string;
|
|
270
|
-
/**
|
|
271
|
-
observations?:
|
|
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,
|
|
@@ -501,4 +510,4 @@ declare const OUI_PROTOCOL_EVENTS: {
|
|
|
501
510
|
readonly OBSERVATION_UPDATE: "observation:update";
|
|
502
511
|
};
|
|
503
512
|
|
|
504
|
-
export { ARGS_HASH_PATTERN as A,
|
|
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 };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as OUIActionRequest, e as OUIActionResult,
|
|
1
|
+
import { d as OUIActionRequest, e as OUIActionResult, p as OUIObservationUpdate, s as OUISurface } from './types-6doPwE6g.cjs';
|
|
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,
|
|
1
|
+
import { d as OUIActionRequest, e as OUIActionResult, p as OUIObservationUpdate, s as OUISurface } from './types-6doPwE6g.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* OUI Transport — the wire protocol between agent runtime and surfaces.
|
package/package.json
CHANGED
package/spec/OUI-SPEC-v0.1.md
CHANGED
|
@@ -608,6 +608,7 @@ When the agent invokes an action, the runtime sends an `action:request`:
|
|
|
608
608
|
- `params` MUST conform to the action's declared `input` schema
|
|
609
609
|
- The agent runtime SHOULD validate `params` before sending; the surface MUST validate upon receipt
|
|
610
610
|
- `knownSurfaces` (OPTIONAL) is the `surfacesHash` of the client's surfaces that the agent runtime already holds, from the client's snapshot (§7.3.5) or an earlier result. A runtime that holds the client's surfaces SHOULD send it (§7.3.4).
|
|
611
|
+
- `approval` (OPTIONAL) is the person's approval the request runs on: `{ approvalId, argsHash }`. A client runs an action that needs approval only when it matches an unused, unexpired grant this client holds for exactly these params, and answers anything else `APPROVAL_REQUIRED`. A client that was never given that approval MUST refuse the request on its receipt (§7.3.7), and MUST NOT run or answer it: another client holds the grant, and its answer is the one that counts. A client MUST refuse a grant it already holds or has used.
|
|
611
612
|
- `turnId` (OPTIONAL) names the turn of the agent's work the request belongs to. An agent runtime whose work is divided into turns that a person can stop SHOULD send it. A client MAY refuse a request whose `turnId` is not its current turn; a refused request is not run, and its receipt (§7.3.7) says it was received and not accepted. A client MUST NOT refuse a request only because it carries no `turnId`.
|
|
612
613
|
|
|
613
614
|
#### 7.3.2 Action Result (Success)
|
|
@@ -765,10 +766,15 @@ interface OUISurfaceIndex {
|
|
|
765
766
|
id: string;
|
|
766
767
|
name: string;
|
|
767
768
|
description: string;
|
|
768
|
-
observations?:
|
|
769
|
+
observations?: OUIObservationIndexEntry[];
|
|
769
770
|
index: OUIActionIndexEntry[];
|
|
770
771
|
}
|
|
771
772
|
|
|
773
|
+
interface OUIObservationIndexEntry {
|
|
774
|
+
id: string;
|
|
775
|
+
schema?: JSONSchema; // only what leads to an `x-rows` declaration, when there is one
|
|
776
|
+
}
|
|
777
|
+
|
|
772
778
|
interface OUIActionIndexEntry {
|
|
773
779
|
id: string;
|
|
774
780
|
title?: string;
|
|
@@ -785,6 +791,10 @@ interface OUIActionIndexEntry {
|
|
|
785
791
|
|
|
786
792
|
- An entry is derived from the action's definition by rule, so the same
|
|
787
793
|
definition gives the same entry everywhere.
|
|
794
|
+
- An observation is carried by its id, with `schema` reduced to `x-rows`, `items`
|
|
795
|
+
and `properties` where they lead to an `x-rows` declaration. An agent runtime
|
|
796
|
+
needs those to shorten a list of rows by rule (§7.3.9). A definition in full
|
|
797
|
+
form (`surfaces`) keeps the whole declaration.
|
|
788
798
|
- `input` names the input's properties with their types, required ones first,
|
|
789
799
|
optional ones marked `?`, the first six, then `+N more`. An action that takes
|
|
790
800
|
nothing has `none`. A union has `one of N shapes`, and `by <property>` when
|