@clowder-ai/plugin-contract 0.1.0-beta.2 → 0.1.0-beta.20
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 +201 -19
- 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 -0
- package/dist/conformance/index.d.ts.map +1 -1
- package/dist/conformance/index.js +3 -0
- 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 +22 -2
- package/dist/conformance/runner.js.map +1 -1
- package/dist/conformance/stdio-harness/child-process-harness.d.ts +65 -0
- package/dist/conformance/stdio-harness/child-process-harness.d.ts.map +1 -0
- package/dist/conformance/stdio-harness/child-process-harness.js +296 -0
- package/dist/conformance/stdio-harness/child-process-harness.js.map +1 -0
- package/dist/conformance/stdio-harness/dual-transport-oracle.d.ts +26 -0
- package/dist/conformance/stdio-harness/dual-transport-oracle.d.ts.map +1 -0
- package/dist/conformance/stdio-harness/dual-transport-oracle.js +32 -0
- package/dist/conformance/stdio-harness/dual-transport-oracle.js.map +1 -0
- package/dist/conformance/stdio-harness/harness-process-spawn.d.ts +27 -0
- package/dist/conformance/stdio-harness/harness-process-spawn.d.ts.map +1 -0
- package/dist/conformance/stdio-harness/harness-process-spawn.js +43 -0
- package/dist/conformance/stdio-harness/harness-process-spawn.js.map +1 -0
- package/dist/conformance/stdio-harness/index.d.ts +5 -0
- package/dist/conformance/stdio-harness/index.d.ts.map +1 -0
- package/dist/conformance/stdio-harness/index.js +4 -0
- package/dist/conformance/stdio-harness/index.js.map +1 -0
- package/dist/conformance/stdio-harness/ndjson-frame.d.ts +31 -0
- package/dist/conformance/stdio-harness/ndjson-frame.d.ts.map +1 -0
- package/dist/conformance/stdio-harness/ndjson-frame.js +125 -0
- package/dist/conformance/stdio-harness/ndjson-frame.js.map +1 -0
- package/dist/conformance/stdio-harness/node-process-tree-runtime.d.ts +15 -0
- package/dist/conformance/stdio-harness/node-process-tree-runtime.d.ts.map +1 -0
- package/dist/conformance/stdio-harness/node-process-tree-runtime.js +78 -0
- package/dist/conformance/stdio-harness/node-process-tree-runtime.js.map +1 -0
- package/dist/conformance/stdio-harness/process-tree-controller.d.ts +51 -0
- package/dist/conformance/stdio-harness/process-tree-controller.d.ts.map +1 -0
- package/dist/conformance/stdio-harness/process-tree-controller.js +162 -0
- package/dist/conformance/stdio-harness/process-tree-controller.js.map +1 -0
- package/dist/conformance/stdio-harness/windows-sentinel.d.ts +15 -0
- package/dist/conformance/stdio-harness/windows-sentinel.d.ts.map +1 -0
- package/dist/conformance/stdio-harness/windows-sentinel.js +160 -0
- package/dist/conformance/stdio-harness/windows-sentinel.js.map +1 -0
- package/dist/conformance/stdio-harness/wire-shape.d.ts +18 -0
- package/dist/conformance/stdio-harness/wire-shape.d.ts.map +1 -0
- package/dist/conformance/stdio-harness/wire-shape.js +2 -0
- package/dist/conformance/stdio-harness/wire-shape.js.map +1 -0
- 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 +957 -12
- package/dist/generated/contract.generated.d.ts.map +1 -1
- package/dist/generated/contract.generated.js +9 -1
- package/dist/generated/contract.generated.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -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/companion-bridge.d.ts +6 -0
- package/dist/validation/companion-bridge.d.ts.map +1 -0
- package/dist/validation/companion-bridge.js +57 -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 +6 -0
- package/dist/validation/index.d.ts.map +1 -1
- package/dist/validation/index.js +6 -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 +160 -0
- package/dist/validation/manifest.js.map +1 -0
- package/dist/validation/messaging-semantic.d.ts.map +1 -1
- package/dist/validation/messaging-semantic.js +49 -0
- package/dist/validation/messaging-semantic.js.map +1 -1
- package/dist/validation/messaging-wire.d.ts +38 -0
- package/dist/validation/messaging-wire.d.ts.map +1 -0
- package/dist/validation/messaging-wire.js +164 -0
- package/dist/validation/messaging-wire.js.map +1 -0
- package/dist/validation/signals.d.ts +26 -0
- package/dist/validation/signals.d.ts.map +1 -0
- package/dist/validation/signals.js +206 -0
- package/dist/validation/signals.js.map +1 -0
- package/dist/wire/constants.d.ts +36 -0
- package/dist/wire/constants.d.ts.map +1 -0
- package/dist/wire/constants.js +36 -0
- package/dist/wire/constants.js.map +1 -0
- package/dist/wire/disposition-fixtures.d.ts +118 -0
- package/dist/wire/disposition-fixtures.d.ts.map +1 -0
- package/dist/wire/disposition-fixtures.js +1881 -0
- package/dist/wire/disposition-fixtures.js.map +1 -0
- package/dist/wire/disposition.d.ts +102 -0
- package/dist/wire/disposition.d.ts.map +1 -0
- package/dist/wire/disposition.js +217 -0
- package/dist/wire/disposition.js.map +1 -0
- package/dist/wire/envelope.d.ts +253 -0
- package/dist/wire/envelope.d.ts.map +1 -0
- package/dist/wire/envelope.js +19 -0
- package/dist/wire/envelope.js.map +1 -0
- package/dist/wire/errors.d.ts +222 -0
- package/dist/wire/errors.d.ts.map +1 -0
- package/dist/wire/errors.js +153 -0
- package/dist/wire/errors.js.map +1 -0
- package/dist/wire/grants.d.ts +57 -0
- package/dist/wire/grants.d.ts.map +1 -0
- package/dist/wire/grants.js +59 -0
- package/dist/wire/grants.js.map +1 -0
- 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 +173 -0
- package/dist/wire/handshake-byte-bounds.js.map +1 -0
- package/dist/wire/handshake.d.ts +146 -0
- package/dist/wire/handshake.d.ts.map +1 -0
- package/dist/wire/handshake.js +189 -0
- package/dist/wire/handshake.js.map +1 -0
- package/dist/wire/index.d.ts +37 -0
- package/dist/wire/index.d.ts.map +1 -0
- package/dist/wire/index.js +61 -0
- package/dist/wire/index.js.map +1 -0
- package/dist/wire/lifecycle-byte-bounds.d.ts +55 -0
- package/dist/wire/lifecycle-byte-bounds.d.ts.map +1 -0
- package/dist/wire/lifecycle-byte-bounds.js +209 -0
- package/dist/wire/lifecycle-byte-bounds.js.map +1 -0
- package/dist/wire/messaging-byte-bounds.d.ts +61 -0
- package/dist/wire/messaging-byte-bounds.d.ts.map +1 -0
- package/dist/wire/messaging-byte-bounds.js +459 -0
- package/dist/wire/messaging-byte-bounds.js.map +1 -0
- package/dist/wire/registry.d.ts +294 -0
- package/dist/wire/registry.d.ts.map +1 -0
- package/dist/wire/registry.js +256 -0
- package/dist/wire/registry.js.map +1 -0
- package/dist/wire/request-id.d.ts +34 -0
- package/dist/wire/request-id.d.ts.map +1 -0
- package/dist/wire/request-id.js +40 -0
- package/dist/wire/request-id.js.map +1 -0
- package/dist/wire/row-shapes.d.ts +217 -0
- package/dist/wire/row-shapes.d.ts.map +1 -0
- package/dist/wire/row-shapes.js +75 -0
- package/dist/wire/row-shapes.js.map +1 -0
- package/dist/wire/signal-byte-bounds.d.ts +97 -0
- package/dist/wire/signal-byte-bounds.d.ts.map +1 -0
- package/dist/wire/signal-byte-bounds.js +229 -0
- package/dist/wire/signal-byte-bounds.js.map +1 -0
- package/dist/wire/wire-uint53.d.ts +26 -0
- package/dist/wire/wire-uint53.d.ts.map +1 -0
- package/dist/wire/wire-uint53.js +32 -0
- package/dist/wire/wire-uint53.js.map +1 -0
- package/fixtures/behavior/messaging/adversarial-invariants.json +85 -0
- package/fixtures/manifest/invalid/duplicate-signal-type.json +33 -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/destination-injection.json +15 -0
- package/fixtures/signals/invalid/dynamic-schema-url.json +10 -0
- package/fixtures/signals/invalid/forbidden-raw-privacy.json +10 -0
- package/fixtures/signals/invalid/non-utc-occurred-at.json +12 -0
- package/fixtures/signals/valid/feishu-meeting-artifact.json +18 -0
- package/fixtures/signals/valid/remote-service-declaration.json +10 -0
- package/package.json +19 -6
- package/src/schemas/behavior-fixture.schema.json +262 -2
- package/src/schemas/catalog.schema.json +91 -0
- package/src/schemas/companion-bridge.schema.json +937 -0
- package/src/schemas/docx-materialization.schema.json +302 -0
- package/src/schemas/manifest.schema.json +490 -4
- package/src/schemas/messaging.schema.json +209 -32
- package/src/schemas/physical-limb.schema.json +319 -0
- package/src/schemas/plugin-metadata.schema.json +62 -0
- package/src/schemas/signal.schema.json +129 -0
|
@@ -178,6 +178,78 @@
|
|
|
178
178
|
}
|
|
179
179
|
]
|
|
180
180
|
},
|
|
181
|
+
"PluginToHostMethod": {
|
|
182
|
+
"type": "string",
|
|
183
|
+
"enum": [
|
|
184
|
+
"messaging.send",
|
|
185
|
+
"messaging.appendElements",
|
|
186
|
+
"messaging.subscribe",
|
|
187
|
+
"messaging.read",
|
|
188
|
+
"messaging.ack",
|
|
189
|
+
"messaging.snapshot"
|
|
190
|
+
]
|
|
191
|
+
},
|
|
192
|
+
"BehaviorExpectationOracle": {
|
|
193
|
+
"type": "object",
|
|
194
|
+
"properties": {
|
|
195
|
+
"kind": { "const": "behavior-expectation" }
|
|
196
|
+
},
|
|
197
|
+
"required": ["kind"],
|
|
198
|
+
"additionalProperties": false
|
|
199
|
+
},
|
|
200
|
+
"JsonRpcAdmissionOracle": {
|
|
201
|
+
"type": "object",
|
|
202
|
+
"properties": {
|
|
203
|
+
"kind": { "const": "json-rpc-error" },
|
|
204
|
+
"code": { "const": -32602 },
|
|
205
|
+
"sideEffects": { "const": "behavior-expectation" }
|
|
206
|
+
},
|
|
207
|
+
"required": ["kind", "code", "sideEffects"],
|
|
208
|
+
"additionalProperties": false
|
|
209
|
+
},
|
|
210
|
+
"BehaviorExecution": {
|
|
211
|
+
"oneOf": [
|
|
212
|
+
{
|
|
213
|
+
"type": "object",
|
|
214
|
+
"properties": {
|
|
215
|
+
"plane": { "const": "plugin-to-host-wire" },
|
|
216
|
+
"method": { "$ref": "#/$defs/PluginToHostMethod" },
|
|
217
|
+
"verdictOracle": { "$ref": "#/$defs/BehaviorExpectationOracle" }
|
|
218
|
+
},
|
|
219
|
+
"required": ["plane", "method", "verdictOracle"],
|
|
220
|
+
"additionalProperties": false
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"type": "object",
|
|
224
|
+
"properties": {
|
|
225
|
+
"plane": { "const": "wire-admission" },
|
|
226
|
+
"method": { "$ref": "#/$defs/PluginToHostMethod" },
|
|
227
|
+
"verdictOracle": { "$ref": "#/$defs/JsonRpcAdmissionOracle" }
|
|
228
|
+
},
|
|
229
|
+
"required": ["plane", "method", "verdictOracle"],
|
|
230
|
+
"additionalProperties": false
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"type": "object",
|
|
234
|
+
"properties": {
|
|
235
|
+
"plane": { "const": "host-to-plugin-delivery" },
|
|
236
|
+
"method": { "const": "host.messaging.deliver" },
|
|
237
|
+
"verdictOracle": { "$ref": "#/$defs/BehaviorExpectationOracle" }
|
|
238
|
+
},
|
|
239
|
+
"required": ["plane", "method", "verdictOracle"],
|
|
240
|
+
"additionalProperties": false
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"type": "object",
|
|
244
|
+
"properties": {
|
|
245
|
+
"plane": { "const": "host-control" },
|
|
246
|
+
"verdictOracle": { "$ref": "#/$defs/BehaviorExpectationOracle" }
|
|
247
|
+
},
|
|
248
|
+
"required": ["plane", "verdictOracle"],
|
|
249
|
+
"additionalProperties": false
|
|
250
|
+
}
|
|
251
|
+
]
|
|
252
|
+
},
|
|
181
253
|
"SendOperationInput": {
|
|
182
254
|
"type": "object",
|
|
183
255
|
"properties": {
|
|
@@ -359,12 +431,200 @@
|
|
|
359
431
|
"properties": {
|
|
360
432
|
"id": { "type": "string", "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" },
|
|
361
433
|
"invariant": { "type": "string", "minLength": 1 },
|
|
434
|
+
"execution": { "$ref": "#/$defs/BehaviorExecution" },
|
|
362
435
|
"given": { "$ref": "#/$defs/FixtureSetup" },
|
|
363
436
|
"when": { "$ref": "#/$defs/FixtureOperation" },
|
|
364
437
|
"expect": { "$ref": "#/$defs/ExpectedVerdict" }
|
|
365
438
|
},
|
|
366
|
-
"required": ["id", "invariant", "given", "when", "expect"],
|
|
367
|
-
"additionalProperties": false
|
|
439
|
+
"required": ["id", "invariant", "execution", "given", "when", "expect"],
|
|
440
|
+
"additionalProperties": false,
|
|
441
|
+
"allOf": [
|
|
442
|
+
{
|
|
443
|
+
"if": {
|
|
444
|
+
"properties": {
|
|
445
|
+
"when": {
|
|
446
|
+
"properties": { "operation": { "const": "send" } },
|
|
447
|
+
"required": ["operation"]
|
|
448
|
+
}
|
|
449
|
+
},
|
|
450
|
+
"required": ["when"]
|
|
451
|
+
},
|
|
452
|
+
"then": {
|
|
453
|
+
"properties": {
|
|
454
|
+
"execution": {
|
|
455
|
+
"type": "object",
|
|
456
|
+
"properties": {
|
|
457
|
+
"plane": { "enum": ["plugin-to-host-wire", "wire-admission"] },
|
|
458
|
+
"method": { "const": "messaging.send" }
|
|
459
|
+
},
|
|
460
|
+
"required": ["plane", "method"]
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
"if": {
|
|
467
|
+
"properties": {
|
|
468
|
+
"when": {
|
|
469
|
+
"properties": { "operation": { "const": "appendElements" } },
|
|
470
|
+
"required": ["operation"]
|
|
471
|
+
}
|
|
472
|
+
},
|
|
473
|
+
"required": ["when"]
|
|
474
|
+
},
|
|
475
|
+
"then": {
|
|
476
|
+
"properties": {
|
|
477
|
+
"execution": {
|
|
478
|
+
"type": "object",
|
|
479
|
+
"properties": {
|
|
480
|
+
"plane": { "enum": ["plugin-to-host-wire", "wire-admission"] },
|
|
481
|
+
"method": { "const": "messaging.appendElements" }
|
|
482
|
+
},
|
|
483
|
+
"required": ["plane", "method"]
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
"if": {
|
|
490
|
+
"properties": {
|
|
491
|
+
"when": {
|
|
492
|
+
"properties": { "operation": { "const": "subscribe" } },
|
|
493
|
+
"required": ["operation"]
|
|
494
|
+
}
|
|
495
|
+
},
|
|
496
|
+
"required": ["when"]
|
|
497
|
+
},
|
|
498
|
+
"then": {
|
|
499
|
+
"properties": {
|
|
500
|
+
"execution": {
|
|
501
|
+
"type": "object",
|
|
502
|
+
"properties": {
|
|
503
|
+
"plane": { "enum": ["plugin-to-host-wire", "wire-admission"] },
|
|
504
|
+
"method": { "const": "messaging.subscribe" }
|
|
505
|
+
},
|
|
506
|
+
"required": ["plane", "method"]
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
"if": {
|
|
513
|
+
"properties": {
|
|
514
|
+
"when": {
|
|
515
|
+
"properties": { "operation": { "const": "read" } },
|
|
516
|
+
"required": ["operation"]
|
|
517
|
+
}
|
|
518
|
+
},
|
|
519
|
+
"required": ["when"]
|
|
520
|
+
},
|
|
521
|
+
"then": {
|
|
522
|
+
"properties": {
|
|
523
|
+
"execution": {
|
|
524
|
+
"type": "object",
|
|
525
|
+
"properties": {
|
|
526
|
+
"plane": { "enum": ["plugin-to-host-wire", "wire-admission"] },
|
|
527
|
+
"method": { "const": "messaging.read" }
|
|
528
|
+
},
|
|
529
|
+
"required": ["plane", "method"]
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
"if": {
|
|
536
|
+
"properties": {
|
|
537
|
+
"when": {
|
|
538
|
+
"properties": { "operation": { "const": "ack" } },
|
|
539
|
+
"required": ["operation"]
|
|
540
|
+
}
|
|
541
|
+
},
|
|
542
|
+
"required": ["when"]
|
|
543
|
+
},
|
|
544
|
+
"then": {
|
|
545
|
+
"properties": {
|
|
546
|
+
"execution": {
|
|
547
|
+
"type": "object",
|
|
548
|
+
"properties": {
|
|
549
|
+
"plane": { "enum": ["plugin-to-host-wire", "wire-admission"] },
|
|
550
|
+
"method": { "const": "messaging.ack" }
|
|
551
|
+
},
|
|
552
|
+
"required": ["plane", "method"]
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
},
|
|
557
|
+
{
|
|
558
|
+
"if": {
|
|
559
|
+
"properties": {
|
|
560
|
+
"when": {
|
|
561
|
+
"properties": { "operation": { "const": "snapshot" } },
|
|
562
|
+
"required": ["operation"]
|
|
563
|
+
}
|
|
564
|
+
},
|
|
565
|
+
"required": ["when"]
|
|
566
|
+
},
|
|
567
|
+
"then": {
|
|
568
|
+
"properties": {
|
|
569
|
+
"execution": {
|
|
570
|
+
"type": "object",
|
|
571
|
+
"properties": {
|
|
572
|
+
"plane": { "enum": ["plugin-to-host-wire", "wire-admission"] },
|
|
573
|
+
"method": { "const": "messaging.snapshot" }
|
|
574
|
+
},
|
|
575
|
+
"required": ["plane", "method"]
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
"if": {
|
|
582
|
+
"properties": {
|
|
583
|
+
"when": {
|
|
584
|
+
"properties": { "operation": { "const": "deliverOnMessage" } },
|
|
585
|
+
"required": ["operation"]
|
|
586
|
+
}
|
|
587
|
+
},
|
|
588
|
+
"required": ["when"]
|
|
589
|
+
},
|
|
590
|
+
"then": {
|
|
591
|
+
"properties": {
|
|
592
|
+
"execution": {
|
|
593
|
+
"type": "object",
|
|
594
|
+
"properties": {
|
|
595
|
+
"plane": { "const": "host-to-plugin-delivery" },
|
|
596
|
+
"method": { "const": "host.messaging.deliver" }
|
|
597
|
+
},
|
|
598
|
+
"required": ["plane", "method"]
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
},
|
|
603
|
+
{
|
|
604
|
+
"if": {
|
|
605
|
+
"properties": {
|
|
606
|
+
"when": {
|
|
607
|
+
"properties": {
|
|
608
|
+
"operation": {
|
|
609
|
+
"enum": ["applyGrantPreset", "revokeGrant", "checkPermissionMatrix", "deleteReplayEvents"]
|
|
610
|
+
}
|
|
611
|
+
},
|
|
612
|
+
"required": ["operation"]
|
|
613
|
+
}
|
|
614
|
+
},
|
|
615
|
+
"required": ["when"]
|
|
616
|
+
},
|
|
617
|
+
"then": {
|
|
618
|
+
"properties": {
|
|
619
|
+
"execution": {
|
|
620
|
+
"type": "object",
|
|
621
|
+
"properties": { "plane": { "const": "host-control" } },
|
|
622
|
+
"required": ["plane"]
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
]
|
|
368
628
|
}
|
|
369
629
|
}
|
|
370
630
|
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://clowder-ai.dev/schemas/catalog/v1",
|
|
4
|
+
"title": "Clowder AI Plugin Catalog (v1)",
|
|
5
|
+
"description": "Repository-owned immutable discovery coordinates. Installed/configured/enabled/live state is deliberately absent because it belongs to the local Host inventory.",
|
|
6
|
+
"$defs": {
|
|
7
|
+
"CatalogSemVer": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"minLength": 1,
|
|
10
|
+
"pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(-(0|[1-9][0-9]*|[0-9]*[A-Za-z-][0-9A-Za-z-]*)(\\.(0|[1-9][0-9]*|[0-9]*[A-Za-z-][0-9A-Za-z-]*))*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?$"
|
|
11
|
+
},
|
|
12
|
+
"CatalogPublisher": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"properties": {
|
|
15
|
+
"id": { "type": "string", "minLength": 1 },
|
|
16
|
+
"name": { "type": "string", "minLength": 1 }
|
|
17
|
+
},
|
|
18
|
+
"required": ["id", "name"],
|
|
19
|
+
"additionalProperties": false
|
|
20
|
+
},
|
|
21
|
+
"ArtifactProvenance": {
|
|
22
|
+
"type": "object",
|
|
23
|
+
"properties": {
|
|
24
|
+
"repository": { "type": "string", "format": "uri", "pattern": "^https://" },
|
|
25
|
+
"sourceDirectory": { "type": "string", "pattern": "^packages/[a-z0-9-]+$" }
|
|
26
|
+
},
|
|
27
|
+
"required": ["repository", "sourceDirectory"],
|
|
28
|
+
"additionalProperties": false
|
|
29
|
+
},
|
|
30
|
+
"NpmArtifact": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"properties": {
|
|
33
|
+
"kind": { "const": "npm" },
|
|
34
|
+
"packageName": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"pattern": "^@[a-z0-9][a-z0-9._-]*/[a-z0-9][a-z0-9._-]*$"
|
|
37
|
+
},
|
|
38
|
+
"version": { "$ref": "#/$defs/CatalogSemVer" },
|
|
39
|
+
"tarballUrl": { "type": "string", "format": "uri", "pattern": "^https://registry\\.npmjs\\.org/" },
|
|
40
|
+
"integrity": { "type": "string", "pattern": "^sha512-[A-Za-z0-9+/]{86}==$" },
|
|
41
|
+
"shasum": { "type": "string", "pattern": "^[0-9a-f]{40}$" },
|
|
42
|
+
"provenance": { "$ref": "#/$defs/ArtifactProvenance" }
|
|
43
|
+
},
|
|
44
|
+
"required": ["kind", "packageName", "version", "tarballUrl", "integrity", "shasum", "provenance"],
|
|
45
|
+
"additionalProperties": false
|
|
46
|
+
},
|
|
47
|
+
"CatalogPluginVersion": {
|
|
48
|
+
"type": "object",
|
|
49
|
+
"properties": {
|
|
50
|
+
"version": { "$ref": "#/$defs/CatalogSemVer" },
|
|
51
|
+
"contractVersion": { "$ref": "#/$defs/CatalogSemVer" },
|
|
52
|
+
"manifestPath": { "const": "plugin.yaml" },
|
|
53
|
+
"artifact": { "$ref": "#/$defs/NpmArtifact" }
|
|
54
|
+
},
|
|
55
|
+
"required": ["version", "contractVersion", "manifestPath", "artifact"],
|
|
56
|
+
"additionalProperties": false
|
|
57
|
+
},
|
|
58
|
+
"CatalogPluginEntry": {
|
|
59
|
+
"type": "object",
|
|
60
|
+
"properties": {
|
|
61
|
+
"pluginId": { "type": "string", "minLength": 1 },
|
|
62
|
+
"name": { "type": "string", "minLength": 1 },
|
|
63
|
+
"description": { "$ref": "https://clowder-ai.dev/schemas/plugin-metadata/v1#/$defs/LocalizedDescription" },
|
|
64
|
+
"icon": { "$ref": "https://clowder-ai.dev/schemas/plugin-metadata/v1#/$defs/PluginIcon" },
|
|
65
|
+
"publisher": { "$ref": "#/$defs/CatalogPublisher" },
|
|
66
|
+
"keywords": {
|
|
67
|
+
"type": "array",
|
|
68
|
+
"items": { "type": "string", "minLength": 1 },
|
|
69
|
+
"uniqueItems": true
|
|
70
|
+
},
|
|
71
|
+
"versions": {
|
|
72
|
+
"type": "array",
|
|
73
|
+
"items": { "$ref": "#/$defs/CatalogPluginVersion" },
|
|
74
|
+
"minItems": 1
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"required": ["pluginId", "name", "description", "icon", "publisher", "versions"],
|
|
78
|
+
"additionalProperties": false
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"type": "object",
|
|
82
|
+
"properties": {
|
|
83
|
+
"schemaVersion": { "const": "1" },
|
|
84
|
+
"plugins": {
|
|
85
|
+
"type": "array",
|
|
86
|
+
"items": { "$ref": "#/$defs/CatalogPluginEntry" }
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"required": ["schemaVersion", "plugins"],
|
|
90
|
+
"additionalProperties": false
|
|
91
|
+
}
|