@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.
Files changed (159) hide show
  1. package/dist/codegen/generate-contract.d.ts +10 -0
  2. package/dist/codegen/generate-contract.d.ts.map +1 -1
  3. package/dist/codegen/generate-contract.js +362 -21
  4. package/dist/codegen/generate-contract.js.map +1 -1
  5. package/dist/conformance/fixtures.d.ts +11 -0
  6. package/dist/conformance/fixtures.d.ts.map +1 -0
  7. package/dist/conformance/fixtures.js +9 -0
  8. package/dist/conformance/fixtures.js.map +1 -0
  9. package/dist/conformance/index.d.ts +4 -1
  10. package/dist/conformance/index.d.ts.map +1 -1
  11. package/dist/conformance/index.js +3 -1
  12. package/dist/conformance/index.js.map +1 -1
  13. package/dist/conformance/messaging-behavior-fixture.d.ts +12 -0
  14. package/dist/conformance/messaging-behavior-fixture.d.ts.map +1 -0
  15. package/dist/conformance/messaging-behavior-fixture.js +30 -0
  16. package/dist/conformance/messaging-behavior-fixture.js.map +1 -0
  17. package/dist/conformance/runner.d.ts.map +1 -1
  18. package/dist/conformance/runner.js +23 -3
  19. package/dist/conformance/runner.js.map +1 -1
  20. package/dist/conformance/stdio-harness/child-process-harness.d.ts +6 -0
  21. package/dist/conformance/stdio-harness/child-process-harness.d.ts.map +1 -1
  22. package/dist/conformance/stdio-harness/child-process-harness.js +26 -9
  23. package/dist/conformance/stdio-harness/child-process-harness.js.map +1 -1
  24. package/dist/conformance/stdio-harness/index.d.ts +1 -1
  25. package/dist/conformance/stdio-harness/index.d.ts.map +1 -1
  26. package/dist/conformance/stdio-harness/index.js +1 -1
  27. package/dist/conformance/stdio-harness/index.js.map +1 -1
  28. package/dist/conformance/stdio-harness/ndjson-frame.d.ts +6 -1
  29. package/dist/conformance/stdio-harness/ndjson-frame.d.ts.map +1 -1
  30. package/dist/conformance/stdio-harness/ndjson-frame.js +7 -1
  31. package/dist/conformance/stdio-harness/ndjson-frame.js.map +1 -1
  32. package/dist/conformance/stdio-harness/wire-shape.d.ts +1 -1
  33. package/dist/docx-materialization.d.ts +8 -0
  34. package/dist/docx-materialization.d.ts.map +1 -0
  35. package/dist/docx-materialization.js +19 -0
  36. package/dist/docx-materialization.js.map +1 -0
  37. package/dist/generated/contract.generated.d.ts +1793 -32
  38. package/dist/generated/contract.generated.d.ts.map +1 -1
  39. package/dist/generated/contract.generated.js +72 -3
  40. package/dist/generated/contract.generated.js.map +1 -1
  41. package/dist/index.d.ts +2 -1
  42. package/dist/index.d.ts.map +1 -1
  43. package/dist/index.js +2 -1
  44. package/dist/index.js.map +1 -1
  45. package/dist/validation/catalog.d.ts +21 -0
  46. package/dist/validation/catalog.d.ts.map +1 -0
  47. package/dist/validation/catalog.js +140 -0
  48. package/dist/validation/catalog.js.map +1 -0
  49. package/dist/validation/cloud-conversation-host.d.ts +18 -0
  50. package/dist/validation/cloud-conversation-host.d.ts.map +1 -0
  51. package/dist/validation/cloud-conversation-host.js +83 -0
  52. package/dist/validation/cloud-conversation-host.js.map +1 -0
  53. package/dist/validation/companion-bridge.d.ts +6 -0
  54. package/dist/validation/companion-bridge.d.ts.map +1 -0
  55. package/dist/validation/companion-bridge.js +198 -0
  56. package/dist/validation/companion-bridge.js.map +1 -0
  57. package/dist/validation/docx-materialization.d.ts +6 -0
  58. package/dist/validation/docx-materialization.d.ts.map +1 -0
  59. package/dist/validation/docx-materialization.js +36 -0
  60. package/dist/validation/docx-materialization.js.map +1 -0
  61. package/dist/validation/index.d.ts +10 -0
  62. package/dist/validation/index.d.ts.map +1 -1
  63. package/dist/validation/index.js +10 -0
  64. package/dist/validation/index.js.map +1 -1
  65. package/dist/validation/manifest.d.ts +23 -0
  66. package/dist/validation/manifest.d.ts.map +1 -0
  67. package/dist/validation/manifest.js +273 -0
  68. package/dist/validation/manifest.js.map +1 -0
  69. package/dist/validation/members.d.ts +4 -0
  70. package/dist/validation/members.d.ts.map +1 -0
  71. package/dist/validation/members.js +11 -0
  72. package/dist/validation/members.js.map +1 -0
  73. package/dist/validation/messaging-semantic.d.ts.map +1 -1
  74. package/dist/validation/messaging-semantic.js +98 -0
  75. package/dist/validation/messaging-semantic.js.map +1 -1
  76. package/dist/validation/messaging-wire.d.ts +42 -0
  77. package/dist/validation/messaging-wire.d.ts.map +1 -0
  78. package/dist/validation/messaging-wire.js +184 -0
  79. package/dist/validation/messaging-wire.js.map +1 -0
  80. package/dist/validation/operation-rows.d.ts +25 -0
  81. package/dist/validation/operation-rows.d.ts.map +1 -0
  82. package/dist/validation/operation-rows.js +135 -0
  83. package/dist/validation/operation-rows.js.map +1 -0
  84. package/dist/validation/signals.d.ts +17 -0
  85. package/dist/validation/signals.d.ts.map +1 -0
  86. package/dist/validation/signals.js +32 -0
  87. package/dist/validation/signals.js.map +1 -0
  88. package/dist/wire/constants.d.ts +2 -1
  89. package/dist/wire/constants.d.ts.map +1 -1
  90. package/dist/wire/constants.js +2 -1
  91. package/dist/wire/constants.js.map +1 -1
  92. package/dist/wire/dispatch.d.ts +49 -0
  93. package/dist/wire/dispatch.d.ts.map +1 -0
  94. package/dist/wire/dispatch.js +880 -0
  95. package/dist/wire/dispatch.js.map +1 -0
  96. package/dist/wire/disposition-fixtures.d.ts +19 -2
  97. package/dist/wire/disposition-fixtures.d.ts.map +1 -1
  98. package/dist/wire/disposition-fixtures.js +1110 -77
  99. package/dist/wire/disposition-fixtures.js.map +1 -1
  100. package/dist/wire/disposition.d.ts +10 -8
  101. package/dist/wire/disposition.d.ts.map +1 -1
  102. package/dist/wire/disposition.js +20 -8
  103. package/dist/wire/disposition.js.map +1 -1
  104. package/dist/wire/envelope.d.ts +31 -0
  105. package/dist/wire/envelope.d.ts.map +1 -1
  106. package/dist/wire/envelope.js +48 -1
  107. package/dist/wire/envelope.js.map +1 -1
  108. package/dist/wire/errors.d.ts +31 -1
  109. package/dist/wire/errors.d.ts.map +1 -1
  110. package/dist/wire/errors.js +36 -0
  111. package/dist/wire/errors.js.map +1 -1
  112. package/dist/wire/grants.d.ts +4 -4
  113. package/dist/wire/grants.js +3 -3
  114. package/dist/wire/handshake-byte-bounds.d.ts +69 -0
  115. package/dist/wire/handshake-byte-bounds.d.ts.map +1 -0
  116. package/dist/wire/handshake-byte-bounds.js +176 -0
  117. package/dist/wire/handshake-byte-bounds.js.map +1 -0
  118. package/dist/wire/handshake.d.ts +59 -7
  119. package/dist/wire/handshake.d.ts.map +1 -1
  120. package/dist/wire/handshake.js +132 -10
  121. package/dist/wire/handshake.js.map +1 -1
  122. package/dist/wire/index.d.ts +18 -7
  123. package/dist/wire/index.d.ts.map +1 -1
  124. package/dist/wire/index.js +35 -6
  125. package/dist/wire/index.js.map +1 -1
  126. package/dist/wire/lifecycle-byte-bounds.d.ts +40 -0
  127. package/dist/wire/lifecycle-byte-bounds.d.ts.map +1 -0
  128. package/dist/wire/lifecycle-byte-bounds.js +149 -0
  129. package/dist/wire/lifecycle-byte-bounds.js.map +1 -0
  130. package/dist/wire/messaging-byte-bounds.d.ts +62 -0
  131. package/dist/wire/messaging-byte-bounds.d.ts.map +1 -0
  132. package/dist/wire/messaging-byte-bounds.js +581 -0
  133. package/dist/wire/messaging-byte-bounds.js.map +1 -0
  134. package/dist/wire/registry.d.ts +192 -35
  135. package/dist/wire/registry.d.ts.map +1 -1
  136. package/dist/wire/registry.js +57 -79
  137. package/dist/wire/registry.js.map +1 -1
  138. package/dist/wire/row-shapes.d.ts +98 -81
  139. package/dist/wire/row-shapes.d.ts.map +1 -1
  140. package/dist/wire/row-shapes.js +31 -4
  141. package/dist/wire/row-shapes.js.map +1 -1
  142. package/fixtures/behavior/messaging/adversarial-invariants.json +92 -2
  143. package/fixtures/manifest/invalid/duplicate-signal-type.json +35 -0
  144. package/fixtures/manifest/invalid/icon-package-escape.json +22 -0
  145. package/fixtures/manifest/valid/localized-product-metadata.json +27 -0
  146. package/fixtures/messaging/valid/subscription-delivery.json +1 -1
  147. package/fixtures/signals/invalid/dynamic-schema-url.json +10 -0
  148. package/fixtures/signals/invalid/forbidden-raw-privacy.json +10 -0
  149. package/fixtures/signals/valid/remote-service-declaration.json +10 -0
  150. package/package.json +18 -5
  151. package/src/schemas/behavior-fixture.schema.json +903 -116
  152. package/src/schemas/catalog.schema.json +91 -0
  153. package/src/schemas/companion-bridge.schema.json +2256 -0
  154. package/src/schemas/docx-materialization.schema.json +302 -0
  155. package/src/schemas/manifest.schema.json +2223 -89
  156. package/src/schemas/messaging.schema.json +692 -40
  157. package/src/schemas/physical-limb.schema.json +319 -0
  158. package/src/schemas/plugin-metadata.schema.json +62 -0
  159. 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
+ }