@clowder-ai/plugin-contract 0.1.0-beta.8 → 0.1.0-beta.9
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 +1 -0
- package/dist/codegen/generate-contract.d.ts.map +1 -1
- package/dist/codegen/generate-contract.js +8 -1
- package/dist/codegen/generate-contract.js.map +1 -1
- package/dist/conformance/fixtures.d.ts +1 -1
- package/dist/conformance/fixtures.d.ts.map +1 -1
- package/dist/conformance/fixtures.js +1 -1
- package/dist/conformance/fixtures.js.map +1 -1
- package/dist/conformance/runner.d.ts.map +1 -1
- package/dist/conformance/runner.js +20 -2
- package/dist/conformance/runner.js.map +1 -1
- package/dist/conformance/stdio-harness/wire-shape.d.ts +1 -1
- package/dist/generated/contract.generated.d.ts +38 -1
- package/dist/generated/contract.generated.d.ts.map +1 -1
- package/dist/generated/contract.generated.js +1 -1
- 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/index.d.ts +1 -0
- package/dist/validation/index.d.ts.map +1 -1
- package/dist/validation/index.js +1 -0
- package/dist/validation/index.js.map +1 -1
- package/dist/validation/manifest.d.ts.map +1 -1
- package/dist/validation/manifest.js +21 -1
- package/dist/validation/manifest.js.map +1 -1
- 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/disposition-fixtures.d.ts +2 -0
- package/dist/wire/disposition-fixtures.d.ts.map +1 -1
- package/dist/wire/disposition-fixtures.js +60 -1
- package/dist/wire/disposition-fixtures.js.map +1 -1
- package/dist/wire/index.d.ts +4 -1
- package/dist/wire/index.d.ts.map +1 -1
- package/dist/wire/index.js +4 -2
- package/dist/wire/index.js.map +1 -1
- package/dist/wire/registry.d.ts +26 -12
- package/dist/wire/registry.d.ts.map +1 -1
- package/dist/wire/registry.js +21 -7
- package/dist/wire/registry.js.map +1 -1
- package/dist/wire/row-shapes.d.ts +1 -1
- package/dist/wire/row-shapes.d.ts.map +1 -1
- package/dist/wire/row-shapes.js +1 -1
- 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/fixtures/manifest/invalid/duplicate-signal-type.json +33 -0
- 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 +2 -1
- package/src/schemas/manifest.schema.json +5 -2
- package/src/schemas/signal.schema.json +129 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://clowder-ai.dev/schemas/manifest/v0.1",
|
|
4
4
|
"title": "Clowder AI Plugin Manifest (v0.1)",
|
|
5
|
-
"description": "Machine-readable truth source for plugin manifest (§3.4/§3.5).
|
|
5
|
+
"description": "Machine-readable truth source for plugin manifest (§3.4/§3.5). beta.9 adds the C-2 declared-signal contribution while schedule/state (C-3) remain future contract deltas.",
|
|
6
6
|
"x-clowder-capability-layers": {
|
|
7
7
|
"L0": ["plugin.config.read", "plugin.state.get", "plugin.state.set"],
|
|
8
8
|
"L1": ["messaging.send", "schedule.register", "events.publish", "messaging.appendElements"],
|
|
@@ -179,7 +179,10 @@
|
|
|
179
179
|
"type": "array",
|
|
180
180
|
"items": { "$ref": "#/$defs/DataDeclaration" }
|
|
181
181
|
},
|
|
182
|
-
"runtime": { "$ref": "#/$defs/RuntimeDeclaration" }
|
|
182
|
+
"runtime": { "$ref": "#/$defs/RuntimeDeclaration" },
|
|
183
|
+
"signals": {
|
|
184
|
+
"$ref": "https://clowder-ai.dev/schemas/signals/v0.2#/$defs/SignalContribution"
|
|
185
|
+
}
|
|
183
186
|
},
|
|
184
187
|
"required": ["pluginId", "version", "contractVersion", "name", "features", "runtime"],
|
|
185
188
|
"additionalProperties": false
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://clowder-ai.dev/schemas/signals/v0.2",
|
|
4
|
+
"title": "Clowder AI Signal Ingress Contract (C-2)",
|
|
5
|
+
"description": "Declared external signals and the closed events.publish wire payload. Producer identity, provenance, grants, routing, and liveness are Host-bound and intentionally absent from plugin input.",
|
|
6
|
+
"x-clowder-payload-max-encoded-bytes": 65536,
|
|
7
|
+
"x-clowder-forbidden-privacy-classes": ["av-raw", "input-raw"],
|
|
8
|
+
"x-clowder-forbidden-source-classes": ["av-capture", "input-hardware"],
|
|
9
|
+
"$defs": {
|
|
10
|
+
"SignalType": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"minLength": 3,
|
|
13
|
+
"maxLength": 128,
|
|
14
|
+
"pattern": "^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_-]*)+$"
|
|
15
|
+
},
|
|
16
|
+
"SignalSchemaRef": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "Package-local schema applied to the {payload, source} signal content at publish admission.",
|
|
19
|
+
"minLength": 21,
|
|
20
|
+
"maxLength": 256,
|
|
21
|
+
"pattern": "^schemas/([A-Za-z0-9][A-Za-z0-9._-]*/)*[A-Za-z0-9][A-Za-z0-9._-]*\\.schema\\.json$"
|
|
22
|
+
},
|
|
23
|
+
"SignalEpistemicStatus": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"enum": ["observation", "inference"]
|
|
26
|
+
},
|
|
27
|
+
"SignalPrivacyClass": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"enum": ["behavioral", "content-adjacent", "content", "av-raw", "input-raw"]
|
|
30
|
+
},
|
|
31
|
+
"AdmissibleSignalPrivacyClass": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"enum": ["behavioral", "content-adjacent", "content"]
|
|
34
|
+
},
|
|
35
|
+
"SignalSourceClass": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"enum": ["os-metadata", "accessibility-api", "remote-service", "av-capture", "input-hardware"]
|
|
38
|
+
},
|
|
39
|
+
"AdmissibleSignalSourceClass": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"enum": ["os-metadata", "accessibility-api", "remote-service"]
|
|
42
|
+
},
|
|
43
|
+
"SignalDeclaration": {
|
|
44
|
+
"type": "object",
|
|
45
|
+
"properties": {
|
|
46
|
+
"type": { "$ref": "#/$defs/SignalType" },
|
|
47
|
+
"schemaRef": { "$ref": "#/$defs/SignalSchemaRef" },
|
|
48
|
+
"epistemicStatus": { "$ref": "#/$defs/SignalEpistemicStatus" },
|
|
49
|
+
"privacyClass": { "$ref": "#/$defs/AdmissibleSignalPrivacyClass" },
|
|
50
|
+
"sourceClass": { "$ref": "#/$defs/AdmissibleSignalSourceClass" }
|
|
51
|
+
},
|
|
52
|
+
"required": ["type", "schemaRef", "epistemicStatus", "privacyClass", "sourceClass"],
|
|
53
|
+
"additionalProperties": false
|
|
54
|
+
},
|
|
55
|
+
"SignalContribution": {
|
|
56
|
+
"type": "object",
|
|
57
|
+
"properties": {
|
|
58
|
+
"provides": {
|
|
59
|
+
"type": "array",
|
|
60
|
+
"items": { "$ref": "#/$defs/SignalDeclaration" },
|
|
61
|
+
"minItems": 1,
|
|
62
|
+
"maxItems": 64,
|
|
63
|
+
"uniqueItems": true
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"required": ["provides"],
|
|
67
|
+
"additionalProperties": false
|
|
68
|
+
},
|
|
69
|
+
"SignalEventId": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"minLength": 1,
|
|
72
|
+
"maxLength": 128,
|
|
73
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
|
|
74
|
+
},
|
|
75
|
+
"SignalIdempotencyKey": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"minLength": 1,
|
|
78
|
+
"maxLength": 256,
|
|
79
|
+
"pattern": "^[^\\u0000-\\u001F\\u007F\\uD800-\\uDFFF]+$"
|
|
80
|
+
},
|
|
81
|
+
"OpaqueSourceHandle": {
|
|
82
|
+
"type": "string",
|
|
83
|
+
"minLength": 1,
|
|
84
|
+
"maxLength": 512,
|
|
85
|
+
"pattern": "^[^\\u0000-\\u001F\\u007F\\uD800-\\uDFFF]+$"
|
|
86
|
+
},
|
|
87
|
+
"SignalSourceRef": {
|
|
88
|
+
"type": "object",
|
|
89
|
+
"properties": {
|
|
90
|
+
"handle": { "$ref": "#/$defs/OpaqueSourceHandle" }
|
|
91
|
+
},
|
|
92
|
+
"required": ["handle"],
|
|
93
|
+
"additionalProperties": false
|
|
94
|
+
},
|
|
95
|
+
"EventsPublishInput": {
|
|
96
|
+
"type": "object",
|
|
97
|
+
"properties": {
|
|
98
|
+
"signalType": { "$ref": "#/$defs/SignalType" },
|
|
99
|
+
"eventId": { "$ref": "#/$defs/SignalEventId" },
|
|
100
|
+
"idempotencyKey": { "$ref": "#/$defs/SignalIdempotencyKey" },
|
|
101
|
+
"occurredAt": {
|
|
102
|
+
"type": "string",
|
|
103
|
+
"format": "date-time",
|
|
104
|
+
"minLength": 20,
|
|
105
|
+
"maxLength": 30,
|
|
106
|
+
"pattern": "Z$"
|
|
107
|
+
},
|
|
108
|
+
"payload": { "type": "object", "additionalProperties": true },
|
|
109
|
+
"source": { "$ref": "#/$defs/SignalSourceRef" }
|
|
110
|
+
},
|
|
111
|
+
"required": ["signalType", "eventId", "idempotencyKey", "occurredAt", "payload", "source"],
|
|
112
|
+
"additionalProperties": false
|
|
113
|
+
},
|
|
114
|
+
"EventsPublishDisposition": {
|
|
115
|
+
"type": "string",
|
|
116
|
+
"enum": ["accepted", "duplicate"]
|
|
117
|
+
},
|
|
118
|
+
"EventsPublishResult": {
|
|
119
|
+
"type": "object",
|
|
120
|
+
"properties": {
|
|
121
|
+
"publicationId": { "$ref": "#/$defs/SignalEventId" },
|
|
122
|
+
"disposition": { "$ref": "#/$defs/EventsPublishDisposition" }
|
|
123
|
+
},
|
|
124
|
+
"required": ["publicationId", "disposition"],
|
|
125
|
+
"additionalProperties": false
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"$ref": "#/$defs/EventsPublishInput"
|
|
129
|
+
}
|