@clowder-ai/plugin-contract 0.1.0-beta.7 → 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.
Files changed (77) hide show
  1. package/dist/codegen/generate-contract.d.ts +1 -0
  2. package/dist/codegen/generate-contract.d.ts.map +1 -1
  3. package/dist/codegen/generate-contract.js +8 -1
  4. package/dist/codegen/generate-contract.js.map +1 -1
  5. package/dist/conformance/fixtures.d.ts +9 -0
  6. package/dist/conformance/fixtures.d.ts.map +1 -0
  7. package/dist/conformance/fixtures.js +8 -0
  8. package/dist/conformance/fixtures.js.map +1 -0
  9. package/dist/conformance/index.d.ts +2 -0
  10. package/dist/conformance/index.d.ts.map +1 -1
  11. package/dist/conformance/index.js +1 -0
  12. package/dist/conformance/index.js.map +1 -1
  13. package/dist/conformance/runner.d.ts.map +1 -1
  14. package/dist/conformance/runner.js +20 -2
  15. package/dist/conformance/runner.js.map +1 -1
  16. package/dist/conformance/stdio-harness/wire-shape.d.ts +1 -1
  17. package/dist/generated/contract.generated.d.ts +38 -1
  18. package/dist/generated/contract.generated.d.ts.map +1 -1
  19. package/dist/generated/contract.generated.js +1 -1
  20. package/dist/generated/contract.generated.js.map +1 -1
  21. package/dist/index.d.ts +2 -1
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +2 -1
  24. package/dist/index.js.map +1 -1
  25. package/dist/validation/index.d.ts +1 -0
  26. package/dist/validation/index.d.ts.map +1 -1
  27. package/dist/validation/index.js +1 -0
  28. package/dist/validation/index.js.map +1 -1
  29. package/dist/validation/manifest.d.ts.map +1 -1
  30. package/dist/validation/manifest.js +21 -1
  31. package/dist/validation/manifest.js.map +1 -1
  32. package/dist/validation/signals.d.ts +26 -0
  33. package/dist/validation/signals.d.ts.map +1 -0
  34. package/dist/validation/signals.js +206 -0
  35. package/dist/validation/signals.js.map +1 -0
  36. package/dist/wire/disposition-fixtures.d.ts +11 -2
  37. package/dist/wire/disposition-fixtures.d.ts.map +1 -1
  38. package/dist/wire/disposition-fixtures.js +510 -4
  39. package/dist/wire/disposition-fixtures.js.map +1 -1
  40. package/dist/wire/disposition.d.ts +10 -8
  41. package/dist/wire/disposition.d.ts.map +1 -1
  42. package/dist/wire/disposition.js +20 -8
  43. package/dist/wire/disposition.js.map +1 -1
  44. package/dist/wire/handshake-byte-bounds.d.ts +69 -0
  45. package/dist/wire/handshake-byte-bounds.d.ts.map +1 -0
  46. package/dist/wire/handshake-byte-bounds.js +173 -0
  47. package/dist/wire/handshake-byte-bounds.js.map +1 -0
  48. package/dist/wire/handshake.d.ts +53 -7
  49. package/dist/wire/handshake.d.ts.map +1 -1
  50. package/dist/wire/handshake.js +129 -10
  51. package/dist/wire/handshake.js.map +1 -1
  52. package/dist/wire/index.d.ts +11 -4
  53. package/dist/wire/index.d.ts.map +1 -1
  54. package/dist/wire/index.js +9 -3
  55. package/dist/wire/index.js.map +1 -1
  56. package/dist/wire/registry.d.ts +190 -12
  57. package/dist/wire/registry.d.ts.map +1 -1
  58. package/dist/wire/registry.js +31 -15
  59. package/dist/wire/registry.js.map +1 -1
  60. package/dist/wire/row-shapes.d.ts +12 -12
  61. package/dist/wire/row-shapes.d.ts.map +1 -1
  62. package/dist/wire/row-shapes.js +3 -3
  63. package/dist/wire/row-shapes.js.map +1 -1
  64. package/dist/wire/signal-byte-bounds.d.ts +97 -0
  65. package/dist/wire/signal-byte-bounds.d.ts.map +1 -0
  66. package/dist/wire/signal-byte-bounds.js +229 -0
  67. package/dist/wire/signal-byte-bounds.js.map +1 -0
  68. package/fixtures/manifest/invalid/duplicate-signal-type.json +33 -0
  69. package/fixtures/signals/invalid/destination-injection.json +15 -0
  70. package/fixtures/signals/invalid/dynamic-schema-url.json +10 -0
  71. package/fixtures/signals/invalid/forbidden-raw-privacy.json +10 -0
  72. package/fixtures/signals/invalid/non-utc-occurred-at.json +12 -0
  73. package/fixtures/signals/valid/feishu-meeting-artifact.json +18 -0
  74. package/fixtures/signals/valid/remote-service-declaration.json +10 -0
  75. package/package.json +2 -1
  76. package/src/schemas/manifest.schema.json +5 -2
  77. package/src/schemas/signal.schema.json +129 -0
@@ -0,0 +1,12 @@
1
+ {
2
+ "_meta": {
3
+ "schemaRef": "EventsPublishInput"
4
+ },
5
+ "signalType": "feishu.meeting_artifact.generated.v1",
6
+ "eventId": "feishu-minute-om_abc123-v7",
7
+ "idempotencyKey": "feishu:minute:om_abc123:7",
8
+ "occurredAt": "2026-08-09T12:12:31+08:00",
9
+ "payload": {
10
+ "artifactId": "om_abc123"
11
+ }
12
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "_meta": {
3
+ "schemaRef": "EventsPublishInput"
4
+ },
5
+ "signalType": "feishu.meeting_artifact.generated.v1",
6
+ "eventId": "feishu-minute-om_abc123-v7",
7
+ "idempotencyKey": "feishu:minute:om_abc123:7",
8
+ "occurredAt": "2026-08-09T04:12:31Z",
9
+ "payload": {
10
+ "artifactId": "om_abc123",
11
+ "artifactKind": "minute",
12
+ "revision": "7",
13
+ "title": "F292 design review"
14
+ },
15
+ "source": {
16
+ "handle": "feishu://meeting-artifacts/minute/om_abc123?revision=7"
17
+ }
18
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "_meta": {
3
+ "schemaRef": "SignalDeclaration"
4
+ },
5
+ "type": "feishu.meeting_artifact.generated.v1",
6
+ "schemaRef": "schemas/feishu-meeting-artifact.schema.json",
7
+ "epistemicStatus": "observation",
8
+ "privacyClass": "content-adjacent",
9
+ "sourceClass": "remote-service"
10
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clowder-ai/plugin-contract",
3
- "version": "0.1.0-beta.7",
3
+ "version": "0.1.0-beta.9",
4
4
  "private": false,
5
5
  "description": "Clowder AI plugin contract — the single machine-readable truth source for plugin schema, types, capability table, and conformance fixtures (P15)",
6
6
  "license": "MIT",
@@ -16,6 +16,7 @@
16
16
  },
17
17
  "./schemas/messaging": "./src/schemas/messaging.schema.json",
18
18
  "./schemas/manifest": "./src/schemas/manifest.schema.json",
19
+ "./schemas/signals": "./src/schemas/signal.schema.json",
19
20
  "./schemas/physical-limb": "./src/schemas/physical-limb.schema.json",
20
21
  "./schemas/behavior-fixture": "./src/schemas/behavior-fixture.schema.json"
21
22
  },
@@ -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). v0.1 covers core manifest + features + data classification. Signals/events (C-2) and schedule/state (C-3) are schema deltas in future contract versions.",
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
+ }