@clowder-ai/plugin-contract 0.1.0-beta.3 → 0.1.0-beta.37
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/codegen/generate-contract.d.ts +10 -0
- package/dist/codegen/generate-contract.d.ts.map +1 -1
- package/dist/codegen/generate-contract.js +362 -21
- package/dist/codegen/generate-contract.js.map +1 -1
- package/dist/conformance/fixtures.d.ts +11 -0
- package/dist/conformance/fixtures.d.ts.map +1 -0
- package/dist/conformance/fixtures.js +9 -0
- package/dist/conformance/fixtures.js.map +1 -0
- package/dist/conformance/index.d.ts +4 -1
- package/dist/conformance/index.d.ts.map +1 -1
- package/dist/conformance/index.js +3 -1
- package/dist/conformance/index.js.map +1 -1
- package/dist/conformance/messaging-behavior-fixture.d.ts +12 -0
- package/dist/conformance/messaging-behavior-fixture.d.ts.map +1 -0
- package/dist/conformance/messaging-behavior-fixture.js +30 -0
- package/dist/conformance/messaging-behavior-fixture.js.map +1 -0
- package/dist/conformance/runner.d.ts.map +1 -1
- package/dist/conformance/runner.js +23 -3
- package/dist/conformance/runner.js.map +1 -1
- package/dist/conformance/stdio-harness/child-process-harness.d.ts +6 -0
- package/dist/conformance/stdio-harness/child-process-harness.d.ts.map +1 -1
- package/dist/conformance/stdio-harness/child-process-harness.js +26 -9
- package/dist/conformance/stdio-harness/child-process-harness.js.map +1 -1
- package/dist/conformance/stdio-harness/index.d.ts +1 -1
- package/dist/conformance/stdio-harness/index.d.ts.map +1 -1
- package/dist/conformance/stdio-harness/index.js +1 -1
- package/dist/conformance/stdio-harness/index.js.map +1 -1
- package/dist/conformance/stdio-harness/ndjson-frame.d.ts +6 -1
- package/dist/conformance/stdio-harness/ndjson-frame.d.ts.map +1 -1
- package/dist/conformance/stdio-harness/ndjson-frame.js +7 -1
- package/dist/conformance/stdio-harness/ndjson-frame.js.map +1 -1
- package/dist/conformance/stdio-harness/wire-shape.d.ts +1 -1
- package/dist/docx-materialization.d.ts +8 -0
- package/dist/docx-materialization.d.ts.map +1 -0
- package/dist/docx-materialization.js +19 -0
- package/dist/docx-materialization.js.map +1 -0
- package/dist/generated/contract.generated.d.ts +1793 -32
- package/dist/generated/contract.generated.d.ts.map +1 -1
- package/dist/generated/contract.generated.js +72 -3
- package/dist/generated/contract.generated.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/validation/catalog.d.ts +21 -0
- package/dist/validation/catalog.d.ts.map +1 -0
- package/dist/validation/catalog.js +140 -0
- package/dist/validation/catalog.js.map +1 -0
- package/dist/validation/cloud-conversation-host.d.ts +18 -0
- package/dist/validation/cloud-conversation-host.d.ts.map +1 -0
- package/dist/validation/cloud-conversation-host.js +83 -0
- package/dist/validation/cloud-conversation-host.js.map +1 -0
- package/dist/validation/companion-bridge.d.ts +6 -0
- package/dist/validation/companion-bridge.d.ts.map +1 -0
- package/dist/validation/companion-bridge.js +198 -0
- package/dist/validation/companion-bridge.js.map +1 -0
- package/dist/validation/docx-materialization.d.ts +6 -0
- package/dist/validation/docx-materialization.d.ts.map +1 -0
- package/dist/validation/docx-materialization.js +36 -0
- package/dist/validation/docx-materialization.js.map +1 -0
- package/dist/validation/index.d.ts +10 -0
- package/dist/validation/index.d.ts.map +1 -1
- package/dist/validation/index.js +10 -0
- package/dist/validation/index.js.map +1 -1
- package/dist/validation/manifest.d.ts +23 -0
- package/dist/validation/manifest.d.ts.map +1 -0
- package/dist/validation/manifest.js +273 -0
- package/dist/validation/manifest.js.map +1 -0
- package/dist/validation/members.d.ts +4 -0
- package/dist/validation/members.d.ts.map +1 -0
- package/dist/validation/members.js +11 -0
- package/dist/validation/members.js.map +1 -0
- package/dist/validation/messaging-semantic.d.ts.map +1 -1
- package/dist/validation/messaging-semantic.js +98 -0
- package/dist/validation/messaging-semantic.js.map +1 -1
- package/dist/validation/messaging-wire.d.ts +42 -0
- package/dist/validation/messaging-wire.d.ts.map +1 -0
- package/dist/validation/messaging-wire.js +184 -0
- package/dist/validation/messaging-wire.js.map +1 -0
- package/dist/validation/operation-rows.d.ts +25 -0
- package/dist/validation/operation-rows.d.ts.map +1 -0
- package/dist/validation/operation-rows.js +135 -0
- package/dist/validation/operation-rows.js.map +1 -0
- package/dist/validation/signals.d.ts +17 -0
- package/dist/validation/signals.d.ts.map +1 -0
- package/dist/validation/signals.js +32 -0
- package/dist/validation/signals.js.map +1 -0
- package/dist/wire/constants.d.ts +2 -1
- package/dist/wire/constants.d.ts.map +1 -1
- package/dist/wire/constants.js +2 -1
- package/dist/wire/constants.js.map +1 -1
- package/dist/wire/dispatch.d.ts +49 -0
- package/dist/wire/dispatch.d.ts.map +1 -0
- package/dist/wire/dispatch.js +880 -0
- package/dist/wire/dispatch.js.map +1 -0
- package/dist/wire/disposition-fixtures.d.ts +19 -2
- package/dist/wire/disposition-fixtures.d.ts.map +1 -1
- package/dist/wire/disposition-fixtures.js +1110 -77
- package/dist/wire/disposition-fixtures.js.map +1 -1
- package/dist/wire/disposition.d.ts +10 -8
- package/dist/wire/disposition.d.ts.map +1 -1
- package/dist/wire/disposition.js +20 -8
- package/dist/wire/disposition.js.map +1 -1
- package/dist/wire/envelope.d.ts +31 -0
- package/dist/wire/envelope.d.ts.map +1 -1
- package/dist/wire/envelope.js +48 -1
- package/dist/wire/envelope.js.map +1 -1
- package/dist/wire/errors.d.ts +31 -1
- package/dist/wire/errors.d.ts.map +1 -1
- package/dist/wire/errors.js +36 -0
- package/dist/wire/errors.js.map +1 -1
- package/dist/wire/grants.d.ts +4 -4
- package/dist/wire/grants.js +3 -3
- package/dist/wire/handshake-byte-bounds.d.ts +69 -0
- package/dist/wire/handshake-byte-bounds.d.ts.map +1 -0
- package/dist/wire/handshake-byte-bounds.js +176 -0
- package/dist/wire/handshake-byte-bounds.js.map +1 -0
- package/dist/wire/handshake.d.ts +59 -7
- package/dist/wire/handshake.d.ts.map +1 -1
- package/dist/wire/handshake.js +132 -10
- package/dist/wire/handshake.js.map +1 -1
- package/dist/wire/index.d.ts +18 -7
- package/dist/wire/index.d.ts.map +1 -1
- package/dist/wire/index.js +35 -6
- package/dist/wire/index.js.map +1 -1
- package/dist/wire/lifecycle-byte-bounds.d.ts +40 -0
- package/dist/wire/lifecycle-byte-bounds.d.ts.map +1 -0
- package/dist/wire/lifecycle-byte-bounds.js +149 -0
- package/dist/wire/lifecycle-byte-bounds.js.map +1 -0
- package/dist/wire/messaging-byte-bounds.d.ts +62 -0
- package/dist/wire/messaging-byte-bounds.d.ts.map +1 -0
- package/dist/wire/messaging-byte-bounds.js +581 -0
- package/dist/wire/messaging-byte-bounds.js.map +1 -0
- package/dist/wire/registry.d.ts +192 -35
- package/dist/wire/registry.d.ts.map +1 -1
- package/dist/wire/registry.js +57 -79
- package/dist/wire/registry.js.map +1 -1
- package/dist/wire/row-shapes.d.ts +98 -81
- package/dist/wire/row-shapes.d.ts.map +1 -1
- package/dist/wire/row-shapes.js +31 -4
- package/dist/wire/row-shapes.js.map +1 -1
- package/fixtures/behavior/messaging/adversarial-invariants.json +92 -2
- package/fixtures/manifest/invalid/duplicate-signal-type.json +35 -0
- package/fixtures/manifest/invalid/icon-package-escape.json +22 -0
- package/fixtures/manifest/valid/localized-product-metadata.json +27 -0
- package/fixtures/messaging/valid/subscription-delivery.json +1 -1
- package/fixtures/signals/invalid/dynamic-schema-url.json +10 -0
- package/fixtures/signals/invalid/forbidden-raw-privacy.json +10 -0
- package/fixtures/signals/valid/remote-service-declaration.json +10 -0
- package/package.json +18 -5
- package/src/schemas/behavior-fixture.schema.json +903 -116
- package/src/schemas/catalog.schema.json +91 -0
- package/src/schemas/companion-bridge.schema.json +2256 -0
- package/src/schemas/docx-materialization.schema.json +302 -0
- package/src/schemas/manifest.schema.json +2223 -89
- package/src/schemas/messaging.schema.json +692 -40
- package/src/schemas/physical-limb.schema.json +319 -0
- package/src/schemas/plugin-metadata.schema.json +62 -0
- package/src/schemas/signal.schema.json +119 -0
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://clowder-ai.dev/schemas/docx-materialization/v1",
|
|
4
|
+
"title": "Independent DOCX materialization protocol",
|
|
5
|
+
"description": "Host-internal, content-editor-provider worker protocol. No capability token, content binding, Host path or owner effect API crosses this boundary. Inspect is read-only; generated bytes remain uncommitted until the Host rechecks authority and owner CAS.",
|
|
6
|
+
"$defs": {
|
|
7
|
+
"DocxMaterializationText": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"pattern": "^[\\u0009\\u000A\\u0020-\\uD7FF\\uE000-\\uFFFD\\u{10000}-\\u{10FFFF}]*(?![\\s\\S])",
|
|
10
|
+
"description": "Lossless XML 1.0 text: valid Unicode scalars only; CR is rejected because the frozen engine emits it literally and XML end-of-line normalization changes it. TAB and LF are supported. No sanitization is permitted."
|
|
11
|
+
},
|
|
12
|
+
"DocxMaterializationAuthor": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"pattern": "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\u{10000}-\\u{10FFFF}]*(?![\\s\\S])",
|
|
15
|
+
"description": "Lossless XML 1.0 attribute text. TAB, LF and CR are excluded because XML attribute normalization would change the author identity."
|
|
16
|
+
},
|
|
17
|
+
"DocxMaterializationBytes": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"minLength": 4,
|
|
20
|
+
"maxLength": 11184812,
|
|
21
|
+
"pattern": "^[A-Za-z0-9+/]*={0,2}$",
|
|
22
|
+
"description": "Canonical base64, at most 8 MiB decoded. Hosts enforce decoded size and canonical encoding before launch and after return."
|
|
23
|
+
},
|
|
24
|
+
"DocxMaterializationAnchor": {
|
|
25
|
+
"type": "object",
|
|
26
|
+
"properties": {
|
|
27
|
+
"paragraphId": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"minLength": 68,
|
|
30
|
+
"maxLength": 88,
|
|
31
|
+
"pattern": "^p:[0-9]{1,10}:[a-f0-9]{64}$"
|
|
32
|
+
},
|
|
33
|
+
"textQuote": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"minLength": 1,
|
|
36
|
+
"maxLength": 8192
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"required": [
|
|
40
|
+
"paragraphId",
|
|
41
|
+
"textQuote"
|
|
42
|
+
],
|
|
43
|
+
"additionalProperties": false
|
|
44
|
+
},
|
|
45
|
+
"DocxMaterializationAttribution": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"properties": {
|
|
48
|
+
"author": {
|
|
49
|
+
"$ref": "#/$defs/DocxMaterializationAuthor",
|
|
50
|
+
"minLength": 1,
|
|
51
|
+
"maxLength": 64
|
|
52
|
+
},
|
|
53
|
+
"operationId": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"minLength": 1,
|
|
56
|
+
"maxLength": 128
|
|
57
|
+
},
|
|
58
|
+
"timestamp": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"minLength": 20,
|
|
61
|
+
"maxLength": 24,
|
|
62
|
+
"format": "date-time"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"required": [
|
|
66
|
+
"author",
|
|
67
|
+
"operationId",
|
|
68
|
+
"timestamp"
|
|
69
|
+
],
|
|
70
|
+
"additionalProperties": false
|
|
71
|
+
},
|
|
72
|
+
"DocxMaterializationOperation": {
|
|
73
|
+
"oneOf": [
|
|
74
|
+
{
|
|
75
|
+
"type": "object",
|
|
76
|
+
"properties": {
|
|
77
|
+
"kind": {
|
|
78
|
+
"const": "inspect"
|
|
79
|
+
},
|
|
80
|
+
"cursor": {
|
|
81
|
+
"type": "integer",
|
|
82
|
+
"minimum": 0,
|
|
83
|
+
"maximum": 65535
|
|
84
|
+
},
|
|
85
|
+
"limit": {
|
|
86
|
+
"type": "integer",
|
|
87
|
+
"minimum": 1,
|
|
88
|
+
"maximum": 32
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"required": [
|
|
92
|
+
"kind",
|
|
93
|
+
"cursor",
|
|
94
|
+
"limit"
|
|
95
|
+
],
|
|
96
|
+
"additionalProperties": false
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"type": "object",
|
|
100
|
+
"properties": {
|
|
101
|
+
"kind": {
|
|
102
|
+
"const": "tracked-change"
|
|
103
|
+
},
|
|
104
|
+
"target": {
|
|
105
|
+
"$ref": "#/$defs/DocxMaterializationAnchor"
|
|
106
|
+
},
|
|
107
|
+
"replacement": {
|
|
108
|
+
"$ref": "#/$defs/DocxMaterializationText",
|
|
109
|
+
"minLength": 0,
|
|
110
|
+
"maxLength": 8192
|
|
111
|
+
},
|
|
112
|
+
"attribution": {
|
|
113
|
+
"$ref": "#/$defs/DocxMaterializationAttribution"
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"required": [
|
|
117
|
+
"kind",
|
|
118
|
+
"target",
|
|
119
|
+
"replacement",
|
|
120
|
+
"attribution"
|
|
121
|
+
],
|
|
122
|
+
"additionalProperties": false
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"type": "object",
|
|
126
|
+
"properties": {
|
|
127
|
+
"kind": {
|
|
128
|
+
"const": "comment"
|
|
129
|
+
},
|
|
130
|
+
"target": {
|
|
131
|
+
"$ref": "#/$defs/DocxMaterializationAnchor"
|
|
132
|
+
},
|
|
133
|
+
"body": {
|
|
134
|
+
"$ref": "#/$defs/DocxMaterializationText",
|
|
135
|
+
"minLength": 1,
|
|
136
|
+
"maxLength": 8192
|
|
137
|
+
},
|
|
138
|
+
"attribution": {
|
|
139
|
+
"$ref": "#/$defs/DocxMaterializationAttribution"
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"required": [
|
|
143
|
+
"kind",
|
|
144
|
+
"target",
|
|
145
|
+
"body",
|
|
146
|
+
"attribution"
|
|
147
|
+
],
|
|
148
|
+
"additionalProperties": false
|
|
149
|
+
}
|
|
150
|
+
]
|
|
151
|
+
},
|
|
152
|
+
"DocxMaterializationRequest": {
|
|
153
|
+
"type": "object",
|
|
154
|
+
"properties": {
|
|
155
|
+
"protocolVersion": {
|
|
156
|
+
"const": "1.0.0"
|
|
157
|
+
},
|
|
158
|
+
"requestId": {
|
|
159
|
+
"type": "string",
|
|
160
|
+
"minLength": 1,
|
|
161
|
+
"maxLength": 128
|
|
162
|
+
},
|
|
163
|
+
"mediaType": {
|
|
164
|
+
"const": "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
|
|
165
|
+
},
|
|
166
|
+
"bytesBase64": {
|
|
167
|
+
"$ref": "#/$defs/DocxMaterializationBytes"
|
|
168
|
+
},
|
|
169
|
+
"operation": {
|
|
170
|
+
"$ref": "#/$defs/DocxMaterializationOperation"
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
"required": [
|
|
174
|
+
"protocolVersion",
|
|
175
|
+
"requestId",
|
|
176
|
+
"mediaType",
|
|
177
|
+
"bytesBase64",
|
|
178
|
+
"operation"
|
|
179
|
+
],
|
|
180
|
+
"additionalProperties": false
|
|
181
|
+
},
|
|
182
|
+
"DocxMaterializationResult": {
|
|
183
|
+
"oneOf": [
|
|
184
|
+
{
|
|
185
|
+
"type": "object",
|
|
186
|
+
"properties": {
|
|
187
|
+
"kind": {
|
|
188
|
+
"const": "inspection"
|
|
189
|
+
},
|
|
190
|
+
"paragraphs": {
|
|
191
|
+
"type": "array",
|
|
192
|
+
"maxItems": 32,
|
|
193
|
+
"items": {
|
|
194
|
+
"type": "object",
|
|
195
|
+
"properties": {
|
|
196
|
+
"target": {
|
|
197
|
+
"$ref": "#/$defs/DocxMaterializationAnchor"
|
|
198
|
+
},
|
|
199
|
+
"editable": {
|
|
200
|
+
"type": "boolean"
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
"required": [
|
|
204
|
+
"target",
|
|
205
|
+
"editable"
|
|
206
|
+
],
|
|
207
|
+
"additionalProperties": false
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"nextCursor": {
|
|
211
|
+
"anyOf": [
|
|
212
|
+
{
|
|
213
|
+
"type": "integer",
|
|
214
|
+
"minimum": 0,
|
|
215
|
+
"maximum": 65535
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"type": "null"
|
|
219
|
+
}
|
|
220
|
+
]
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
"required": [
|
|
224
|
+
"kind",
|
|
225
|
+
"paragraphs",
|
|
226
|
+
"nextCursor"
|
|
227
|
+
],
|
|
228
|
+
"additionalProperties": false
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"type": "object",
|
|
232
|
+
"properties": {
|
|
233
|
+
"kind": {
|
|
234
|
+
"const": "document"
|
|
235
|
+
},
|
|
236
|
+
"bytesBase64": {
|
|
237
|
+
"$ref": "#/$defs/DocxMaterializationBytes"
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
"required": [
|
|
241
|
+
"kind",
|
|
242
|
+
"bytesBase64"
|
|
243
|
+
],
|
|
244
|
+
"additionalProperties": false
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"type": "object",
|
|
248
|
+
"properties": {
|
|
249
|
+
"kind": {
|
|
250
|
+
"const": "rejected"
|
|
251
|
+
},
|
|
252
|
+
"code": {
|
|
253
|
+
"type": "string",
|
|
254
|
+
"enum": [
|
|
255
|
+
"INVALID_DOCX",
|
|
256
|
+
"TARGET_MISMATCH",
|
|
257
|
+
"UNSUPPORTED_TARGET",
|
|
258
|
+
"LIMIT_EXCEEDED",
|
|
259
|
+
"INVALID_REQUEST"
|
|
260
|
+
]
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
"required": [
|
|
264
|
+
"kind",
|
|
265
|
+
"code"
|
|
266
|
+
],
|
|
267
|
+
"additionalProperties": false
|
|
268
|
+
}
|
|
269
|
+
]
|
|
270
|
+
},
|
|
271
|
+
"DocxMaterializationResponse": {
|
|
272
|
+
"type": "object",
|
|
273
|
+
"properties": {
|
|
274
|
+
"protocolVersion": {
|
|
275
|
+
"const": "1.0.0"
|
|
276
|
+
},
|
|
277
|
+
"requestId": {
|
|
278
|
+
"type": "string",
|
|
279
|
+
"minLength": 1,
|
|
280
|
+
"maxLength": 128
|
|
281
|
+
},
|
|
282
|
+
"result": {
|
|
283
|
+
"$ref": "#/$defs/DocxMaterializationResult"
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
"required": [
|
|
287
|
+
"protocolVersion",
|
|
288
|
+
"requestId",
|
|
289
|
+
"result"
|
|
290
|
+
],
|
|
291
|
+
"additionalProperties": false
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
"oneOf": [
|
|
295
|
+
{
|
|
296
|
+
"$ref": "#/$defs/DocxMaterializationRequest"
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
"$ref": "#/$defs/DocxMaterializationResponse"
|
|
300
|
+
}
|
|
301
|
+
]
|
|
302
|
+
}
|