@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
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WireUInt53 — the single contract-owned numeric profile.
|
|
3
|
+
* Mechanized from the #1165 frozen shape.
|
|
4
|
+
*
|
|
5
|
+
* Raw JSON lexeme: canonical decimal digits 0|[1-9][0-9]*
|
|
6
|
+
* No sign, no decimal point, no exponent, no leading zeros.
|
|
7
|
+
* Raw token length ≤ 16 characters.
|
|
8
|
+
* Parsed value: non-negative safe integer.
|
|
9
|
+
*/
|
|
10
|
+
/** Maximum safe integer (2^53 - 1). */
|
|
11
|
+
export declare const WIRE_UINT53_MAX: 9007199254740991;
|
|
12
|
+
/** Pattern for canonical decimal integer raw tokens. */
|
|
13
|
+
export declare const WIRE_UINT53_RAW_PATTERN: RegExp;
|
|
14
|
+
/** Maximum raw token length (digit count of 2^53-1). */
|
|
15
|
+
export declare const WIRE_UINT53_MAX_RAW_LENGTH: 16;
|
|
16
|
+
/**
|
|
17
|
+
* Validate a parsed number as a WireUInt53.
|
|
18
|
+
* Checks Number.isSafeInteger and non-negative.
|
|
19
|
+
*/
|
|
20
|
+
export declare function isWireUInt53(value: number, min?: number, max?: number): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Validate a raw JSON token as a canonical WireUInt53 lexeme.
|
|
23
|
+
* Must be checked BEFORE JSON.parse (pre-dispatch).
|
|
24
|
+
*/
|
|
25
|
+
export declare function isCanonicalUInt53Token(rawToken: string): boolean;
|
|
26
|
+
//# sourceMappingURL=wire-uint53.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wire-uint53.d.ts","sourceRoot":"","sources":["../../src/wire/wire-uint53.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,uCAAuC;AACvC,eAAO,MAAM,eAAe,EAAG,gBAA8B,CAAC;AAE9D,wDAAwD;AACxD,eAAO,MAAM,uBAAuB,QAAwB,CAAC;AAE7D,wDAAwD;AACxD,eAAO,MAAM,0BAA0B,EAAG,EAAW,CAAC;AAEtD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,GAAE,MAAU,EAAE,GAAG,GAAE,MAAwB,GAAG,OAAO,CAEnG;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAGhE"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WireUInt53 — the single contract-owned numeric profile.
|
|
3
|
+
* Mechanized from the #1165 frozen shape.
|
|
4
|
+
*
|
|
5
|
+
* Raw JSON lexeme: canonical decimal digits 0|[1-9][0-9]*
|
|
6
|
+
* No sign, no decimal point, no exponent, no leading zeros.
|
|
7
|
+
* Raw token length ≤ 16 characters.
|
|
8
|
+
* Parsed value: non-negative safe integer.
|
|
9
|
+
*/
|
|
10
|
+
/** Maximum safe integer (2^53 - 1). */
|
|
11
|
+
export const WIRE_UINT53_MAX = 9_007_199_254_740_991;
|
|
12
|
+
/** Pattern for canonical decimal integer raw tokens. */
|
|
13
|
+
export const WIRE_UINT53_RAW_PATTERN = /^(?:0|[1-9][0-9]*)$/;
|
|
14
|
+
/** Maximum raw token length (digit count of 2^53-1). */
|
|
15
|
+
export const WIRE_UINT53_MAX_RAW_LENGTH = 16;
|
|
16
|
+
/**
|
|
17
|
+
* Validate a parsed number as a WireUInt53.
|
|
18
|
+
* Checks Number.isSafeInteger and non-negative.
|
|
19
|
+
*/
|
|
20
|
+
export function isWireUInt53(value, min = 0, max = WIRE_UINT53_MAX) {
|
|
21
|
+
return Number.isSafeInteger(value) && value >= min && value <= max;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Validate a raw JSON token as a canonical WireUInt53 lexeme.
|
|
25
|
+
* Must be checked BEFORE JSON.parse (pre-dispatch).
|
|
26
|
+
*/
|
|
27
|
+
export function isCanonicalUInt53Token(rawToken) {
|
|
28
|
+
if (rawToken.length === 0 || rawToken.length > WIRE_UINT53_MAX_RAW_LENGTH)
|
|
29
|
+
return false;
|
|
30
|
+
return WIRE_UINT53_RAW_PATTERN.test(rawToken);
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=wire-uint53.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wire-uint53.js","sourceRoot":"","sources":["../../src/wire/wire-uint53.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,uCAAuC;AACvC,MAAM,CAAC,MAAM,eAAe,GAAG,qBAA8B,CAAC;AAE9D,wDAAwD;AACxD,MAAM,CAAC,MAAM,uBAAuB,GAAG,qBAAqB,CAAC;AAE7D,wDAAwD;AACxD,MAAM,CAAC,MAAM,0BAA0B,GAAG,EAAW,CAAC;AAEtD;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,KAAa,EAAE,MAAc,CAAC,EAAE,MAAc,eAAe;IACxF,OAAO,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,GAAG,IAAI,KAAK,IAAI,GAAG,CAAC;AACrE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,sBAAsB,CAAC,QAAgB;IACrD,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,IAAI,QAAQ,CAAC,MAAM,GAAG,0BAA0B;QAAE,OAAO,KAAK,CAAC;IACxF,OAAO,uBAAuB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AAChD,CAAC"}
|
|
@@ -10,6 +10,11 @@
|
|
|
10
10
|
{
|
|
11
11
|
"id": "raw-thread-id-rejection",
|
|
12
12
|
"invariant": "Plugins cannot address threads by raw threadId.",
|
|
13
|
+
"execution": {
|
|
14
|
+
"plane": "wire-admission",
|
|
15
|
+
"method": "messaging.send",
|
|
16
|
+
"verdictOracle": { "kind": "json-rpc-error", "code": -32602, "sideEffects": "behavior-expectation" }
|
|
17
|
+
},
|
|
13
18
|
"given": {
|
|
14
19
|
"caller": { "pluginInstanceId": "plugin-a" },
|
|
15
20
|
"grants": ["messaging.send"],
|
|
@@ -40,6 +45,11 @@
|
|
|
40
45
|
{
|
|
41
46
|
"id": "system-audience-dual-rejection",
|
|
42
47
|
"invariant": "Drafts cannot express the host-only system audience.",
|
|
48
|
+
"execution": {
|
|
49
|
+
"plane": "wire-admission",
|
|
50
|
+
"method": "messaging.send",
|
|
51
|
+
"verdictOracle": { "kind": "json-rpc-error", "code": -32602, "sideEffects": "behavior-expectation" }
|
|
52
|
+
},
|
|
43
53
|
"given": {
|
|
44
54
|
"caller": { "pluginInstanceId": "plugin-a" },
|
|
45
55
|
"grants": ["messaging.send"],
|
|
@@ -73,6 +83,11 @@
|
|
|
73
83
|
{
|
|
74
84
|
"id": "cross-instance-handle-rejection",
|
|
75
85
|
"invariant": "A message handle issued to one plugin instance cannot authorize another.",
|
|
86
|
+
"execution": {
|
|
87
|
+
"plane": "plugin-to-host-wire",
|
|
88
|
+
"method": "messaging.appendElements",
|
|
89
|
+
"verdictOracle": { "kind": "behavior-expectation" }
|
|
90
|
+
},
|
|
76
91
|
"given": {
|
|
77
92
|
"caller": { "pluginInstanceId": "plugin-a" },
|
|
78
93
|
"grants": ["messaging.appendElements"],
|
|
@@ -103,6 +118,11 @@
|
|
|
103
118
|
{
|
|
104
119
|
"id": "origin-forgery-rejection",
|
|
105
120
|
"invariant": "A thread-handle send may only declare the caller's own plugin origin.",
|
|
121
|
+
"execution": {
|
|
122
|
+
"plane": "plugin-to-host-wire",
|
|
123
|
+
"method": "messaging.send",
|
|
124
|
+
"verdictOracle": { "kind": "behavior-expectation" }
|
|
125
|
+
},
|
|
106
126
|
"given": {
|
|
107
127
|
"caller": { "pluginInstanceId": "plugin-a" },
|
|
108
128
|
"grants": ["messaging.send"],
|
|
@@ -135,6 +155,11 @@
|
|
|
135
155
|
{
|
|
136
156
|
"id": "base-revision-conflict-zero-change",
|
|
137
157
|
"invariant": "A stale baseRevision produces CONFLICT and no mutation.",
|
|
158
|
+
"execution": {
|
|
159
|
+
"plane": "plugin-to-host-wire",
|
|
160
|
+
"method": "messaging.appendElements",
|
|
161
|
+
"verdictOracle": { "kind": "behavior-expectation" }
|
|
162
|
+
},
|
|
138
163
|
"given": {
|
|
139
164
|
"caller": { "pluginInstanceId": "plugin-a" },
|
|
140
165
|
"grants": ["messaging.appendElements"],
|
|
@@ -165,6 +190,11 @@
|
|
|
165
190
|
{
|
|
166
191
|
"id": "stale-cursor-snapshot-roundtrip",
|
|
167
192
|
"invariant": "A stale cursor reports stale and snapshot catch-up supplies an exact resume point.",
|
|
193
|
+
"execution": {
|
|
194
|
+
"plane": "plugin-to-host-wire",
|
|
195
|
+
"method": "messaging.read",
|
|
196
|
+
"verdictOracle": { "kind": "behavior-expectation" }
|
|
197
|
+
},
|
|
168
198
|
"given": {
|
|
169
199
|
"caller": { "pluginInstanceId": "plugin-a" },
|
|
170
200
|
"grants": ["message.event.subscribe"],
|
|
@@ -189,6 +219,11 @@
|
|
|
189
219
|
{
|
|
190
220
|
"id": "cross-subscription-ack-rejection",
|
|
191
221
|
"invariant": "Ack tokens are subscription-local and cannot cross subscriptions.",
|
|
222
|
+
"execution": {
|
|
223
|
+
"plane": "plugin-to-host-wire",
|
|
224
|
+
"method": "messaging.ack",
|
|
225
|
+
"verdictOracle": { "kind": "behavior-expectation" }
|
|
226
|
+
},
|
|
192
227
|
"given": {
|
|
193
228
|
"caller": { "pluginInstanceId": "plugin-a" },
|
|
194
229
|
"grants": ["message.event.subscribe"],
|
|
@@ -214,6 +249,11 @@
|
|
|
214
249
|
{
|
|
215
250
|
"id": "reply-to-cross-thread-leakage",
|
|
216
251
|
"invariant": "replyTo cannot reference a message from another thread.",
|
|
252
|
+
"execution": {
|
|
253
|
+
"plane": "plugin-to-host-wire",
|
|
254
|
+
"method": "messaging.send",
|
|
255
|
+
"verdictOracle": { "kind": "behavior-expectation" }
|
|
256
|
+
},
|
|
217
257
|
"given": {
|
|
218
258
|
"caller": { "pluginInstanceId": "plugin-a" },
|
|
219
259
|
"grants": ["messaging.send"],
|
|
@@ -247,6 +287,11 @@
|
|
|
247
287
|
{
|
|
248
288
|
"id": "epistemic-status-upgrade-rejection",
|
|
249
289
|
"invariant": "Derived content cannot claim a stronger epistemic status than its source.",
|
|
290
|
+
"execution": {
|
|
291
|
+
"plane": "plugin-to-host-wire",
|
|
292
|
+
"method": "messaging.appendElements",
|
|
293
|
+
"verdictOracle": { "kind": "behavior-expectation" }
|
|
294
|
+
},
|
|
250
295
|
"given": {
|
|
251
296
|
"caller": { "pluginInstanceId": "plugin-a" },
|
|
252
297
|
"grants": ["messaging.appendElements"],
|
|
@@ -277,6 +322,10 @@
|
|
|
277
322
|
{
|
|
278
323
|
"id": "preset-l2-rejected",
|
|
279
324
|
"invariant": "First-party presets are derived from L1 and cannot silently grant L2 capabilities.",
|
|
325
|
+
"execution": {
|
|
326
|
+
"plane": "host-control",
|
|
327
|
+
"verdictOracle": { "kind": "behavior-expectation" }
|
|
328
|
+
},
|
|
280
329
|
"given": {
|
|
281
330
|
"caller": { "pluginInstanceId": "first-party-plugin" },
|
|
282
331
|
"grants": ["messaging.send"],
|
|
@@ -298,6 +347,10 @@
|
|
|
298
347
|
{
|
|
299
348
|
"id": "preset-visible-revocable",
|
|
300
349
|
"invariant": "A first-party L1 preset remains visible and independently revocable.",
|
|
350
|
+
"execution": {
|
|
351
|
+
"plane": "host-control",
|
|
352
|
+
"verdictOracle": { "kind": "behavior-expectation" }
|
|
353
|
+
},
|
|
301
354
|
"given": {
|
|
302
355
|
"caller": { "pluginInstanceId": "first-party-plugin" },
|
|
303
356
|
"grants": ["messaging.send"],
|
|
@@ -318,6 +371,11 @@
|
|
|
318
371
|
{
|
|
319
372
|
"id": "whisper-target-beyond-default-empty-grant-rejected",
|
|
320
373
|
"invariant": "The default whisper target grant is empty; messaging.send alone cannot add a target.",
|
|
374
|
+
"execution": {
|
|
375
|
+
"plane": "plugin-to-host-wire",
|
|
376
|
+
"method": "messaging.send",
|
|
377
|
+
"verdictOracle": { "kind": "behavior-expectation" }
|
|
378
|
+
},
|
|
321
379
|
"given": {
|
|
322
380
|
"caller": { "pluginInstanceId": "plugin-a" },
|
|
323
381
|
"grants": ["messaging.send"],
|
|
@@ -351,6 +409,11 @@
|
|
|
351
409
|
{
|
|
352
410
|
"id": "append-without-grant-rejected",
|
|
353
411
|
"invariant": "A valid message handle does not bypass the messaging.appendElements grant.",
|
|
412
|
+
"execution": {
|
|
413
|
+
"plane": "plugin-to-host-wire",
|
|
414
|
+
"method": "messaging.appendElements",
|
|
415
|
+
"verdictOracle": { "kind": "behavior-expectation" }
|
|
416
|
+
},
|
|
354
417
|
"given": {
|
|
355
418
|
"caller": { "pluginInstanceId": "plugin-a" },
|
|
356
419
|
"grants": [],
|
|
@@ -381,6 +444,11 @@
|
|
|
381
444
|
{
|
|
382
445
|
"id": "denied-on-message-rejected",
|
|
383
446
|
"invariant": "The Host cannot deliver an onMessage envelope without an explicit scoped L2 grant.",
|
|
447
|
+
"execution": {
|
|
448
|
+
"plane": "host-to-plugin-delivery",
|
|
449
|
+
"method": "host.messaging.deliver",
|
|
450
|
+
"verdictOracle": { "kind": "behavior-expectation" }
|
|
451
|
+
},
|
|
384
452
|
"given": {
|
|
385
453
|
"caller": { "pluginInstanceId": "plugin-a" },
|
|
386
454
|
"grants": [],
|
|
@@ -408,6 +476,10 @@
|
|
|
408
476
|
{
|
|
409
477
|
"id": "permission-matrix-complete",
|
|
410
478
|
"invariant": "The loopback policy matrix covers every signed capability and presets only L1 for first-party plugins.",
|
|
479
|
+
"execution": {
|
|
480
|
+
"plane": "host-control",
|
|
481
|
+
"verdictOracle": { "kind": "behavior-expectation" }
|
|
482
|
+
},
|
|
411
483
|
"given": {
|
|
412
484
|
"caller": { "pluginInstanceId": "policy-auditor" },
|
|
413
485
|
"grants": [],
|
|
@@ -448,6 +520,10 @@
|
|
|
448
520
|
{
|
|
449
521
|
"id": "delete-replay-events-preserves-canonical-messages",
|
|
450
522
|
"invariant": "Deleting the replay transport buffer cannot delete canonical messages or threads.",
|
|
523
|
+
"execution": {
|
|
524
|
+
"plane": "host-control",
|
|
525
|
+
"verdictOracle": { "kind": "behavior-expectation" }
|
|
526
|
+
},
|
|
451
527
|
"given": {
|
|
452
528
|
"caller": { "pluginInstanceId": "host-retention" },
|
|
453
529
|
"grants": ["message.event.subscribe"],
|
|
@@ -474,6 +550,11 @@
|
|
|
474
550
|
{
|
|
475
551
|
"id": "snapshot-without-grant-rejected",
|
|
476
552
|
"invariant": "A subscription identifier cannot bypass the message.event.subscribe grant for snapshots.",
|
|
553
|
+
"execution": {
|
|
554
|
+
"plane": "wire-admission",
|
|
555
|
+
"method": "messaging.snapshot",
|
|
556
|
+
"verdictOracle": { "kind": "json-rpc-error", "code": -32602, "sideEffects": "behavior-expectation" }
|
|
557
|
+
},
|
|
477
558
|
"given": {
|
|
478
559
|
"caller": { "pluginInstanceId": "plugin-a" },
|
|
479
560
|
"grants": [],
|
|
@@ -498,6 +579,10 @@
|
|
|
498
579
|
{
|
|
499
580
|
"id": "foreign-replay-delete-rejected",
|
|
500
581
|
"invariant": "A caller cannot delete another plugin instance's subscription replay buffer.",
|
|
582
|
+
"execution": {
|
|
583
|
+
"plane": "host-control",
|
|
584
|
+
"verdictOracle": { "kind": "behavior-expectation" }
|
|
585
|
+
},
|
|
501
586
|
"given": {
|
|
502
587
|
"caller": { "pluginInstanceId": "plugin-b" },
|
|
503
588
|
"grants": ["message.event.subscribe"],
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"pluginId": "example.duplicate-signal",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"contractVersion": "0.1.0",
|
|
5
|
+
"name": "Duplicate Signal Type",
|
|
6
|
+
"features": [
|
|
7
|
+
{
|
|
8
|
+
"id": "meeting-intake",
|
|
9
|
+
"name": "Meeting intake",
|
|
10
|
+
"resources": [],
|
|
11
|
+
"capabilities": ["events.publish"]
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"signals": {
|
|
15
|
+
"provides": [
|
|
16
|
+
{
|
|
17
|
+
"type": "feishu.meeting_artifact.generated.v1",
|
|
18
|
+
"schemaRef": "schemas/meeting-a.schema.json",
|
|
19
|
+
"epistemicStatus": "observation",
|
|
20
|
+
"privacyClass": "content-adjacent",
|
|
21
|
+
"sourceClass": "remote-service"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"type": "feishu.meeting_artifact.generated.v1",
|
|
25
|
+
"schemaRef": "schemas/meeting-b.schema.json",
|
|
26
|
+
"epistemicStatus": "inference",
|
|
27
|
+
"privacyClass": "content",
|
|
28
|
+
"sourceClass": "remote-service"
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
"runtime": { "transport": "builtin" }
|
|
33
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"pluginId": "com.example.icon-escape",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"contractVersion": "0.1.0-beta.13",
|
|
5
|
+
"name": "Icon escape fixture",
|
|
6
|
+
"description": "Legacy description remains accepted.",
|
|
7
|
+
"icon": {
|
|
8
|
+
"type": "svg",
|
|
9
|
+
"src": "../outside.svg"
|
|
10
|
+
},
|
|
11
|
+
"features": [
|
|
12
|
+
{
|
|
13
|
+
"id": "main",
|
|
14
|
+
"name": "Main",
|
|
15
|
+
"resources": [],
|
|
16
|
+
"capabilities": []
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"runtime": {
|
|
20
|
+
"transport": "builtin"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"pluginId": "com.example.localized-metadata",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"contractVersion": "0.1.0-beta.13",
|
|
5
|
+
"name": "Localized metadata fixture",
|
|
6
|
+
"description": {
|
|
7
|
+
"default": "Describe this plugin for agents and people.",
|
|
8
|
+
"translations": {
|
|
9
|
+
"zh-CN": "向 Agent 和用户介绍这个插件。"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"icon": {
|
|
13
|
+
"type": "svg",
|
|
14
|
+
"src": "assets/icon.svg"
|
|
15
|
+
},
|
|
16
|
+
"features": [
|
|
17
|
+
{
|
|
18
|
+
"id": "main",
|
|
19
|
+
"name": "Main",
|
|
20
|
+
"resources": [],
|
|
21
|
+
"capabilities": []
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"runtime": {
|
|
25
|
+
"transport": "builtin"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
},
|
|
12
|
+
"destination": {
|
|
13
|
+
"threadId": "thread_user_selected"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_meta": {
|
|
3
|
+
"schemaRef": "SignalDeclaration"
|
|
4
|
+
},
|
|
5
|
+
"type": "feishu.meeting_artifact.generated.v1",
|
|
6
|
+
"schemaRef": "https://attacker.example/schemas/meeting.json",
|
|
7
|
+
"epistemicStatus": "observation",
|
|
8
|
+
"privacyClass": "content-adjacent",
|
|
9
|
+
"sourceClass": "remote-service"
|
|
10
|
+
}
|
|
@@ -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.
|
|
3
|
+
"version": "0.1.0-beta.20",
|
|
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",
|
|
@@ -14,9 +14,20 @@
|
|
|
14
14
|
"types": "./dist/conformance/index.d.ts",
|
|
15
15
|
"import": "./dist/conformance/index.js"
|
|
16
16
|
},
|
|
17
|
+
"./docx-materialization": {
|
|
18
|
+
"types": "./dist/docx-materialization.d.ts",
|
|
19
|
+
"import": "./dist/docx-materialization.js"
|
|
20
|
+
},
|
|
17
21
|
"./schemas/messaging": "./src/schemas/messaging.schema.json",
|
|
18
22
|
"./schemas/manifest": "./src/schemas/manifest.schema.json",
|
|
19
|
-
"./schemas/
|
|
23
|
+
"./schemas/catalog": "./src/schemas/catalog.schema.json",
|
|
24
|
+
"./schemas/plugin-metadata": "./src/schemas/plugin-metadata.schema.json",
|
|
25
|
+
"./schemas/signals": "./src/schemas/signal.schema.json",
|
|
26
|
+
"./schemas/physical-limb": "./src/schemas/physical-limb.schema.json",
|
|
27
|
+
"./schemas/docx-materialization": "./src/schemas/docx-materialization.schema.json",
|
|
28
|
+
"./schemas/companion-bridge": "./src/schemas/companion-bridge.schema.json",
|
|
29
|
+
"./schemas/behavior-fixture": "./src/schemas/behavior-fixture.schema.json",
|
|
30
|
+
"./fixtures/behavior/messaging/adversarial-invariants": "./fixtures/behavior/messaging/adversarial-invariants.json"
|
|
20
31
|
},
|
|
21
32
|
"main": "./dist/index.js",
|
|
22
33
|
"types": "./dist/index.d.ts",
|
|
@@ -31,9 +42,9 @@
|
|
|
31
42
|
"scripts": {
|
|
32
43
|
"generate": "node --import tsx src/codegen/generate-contract.ts",
|
|
33
44
|
"generate:check": "node --import tsx src/codegen/generate-contract.ts --check",
|
|
34
|
-
"build": "pnpm clean && tsc -p tsconfig.build.json",
|
|
45
|
+
"build": "pnpm clean && tsc -p tsconfig.build.json && node --test scripts/conformance-public-boundary.test.mjs",
|
|
35
46
|
"typecheck": "tsc --noEmit",
|
|
36
|
-
"test": "node --import tsx --test src/**/*.test.ts",
|
|
47
|
+
"test": "node --import tsx --test src/**/*.test.ts src/**/**/*.test.ts",
|
|
37
48
|
"conformance": "node --import tsx src/conformance/runner.ts",
|
|
38
49
|
"lint": "tsc --noEmit",
|
|
39
50
|
"clean": "rm -rf dist",
|
|
@@ -41,11 +52,13 @@
|
|
|
41
52
|
},
|
|
42
53
|
"devDependencies": {
|
|
43
54
|
"@types/node": "^20.17.0",
|
|
44
|
-
"ajv": "^8.17.0",
|
|
45
|
-
"ajv-formats": "^3.0.0",
|
|
46
55
|
"tsx": "^4.19.0",
|
|
47
56
|
"typescript": "^5.7.0"
|
|
48
57
|
},
|
|
58
|
+
"dependencies": {
|
|
59
|
+
"ajv": "^8.17.0",
|
|
60
|
+
"ajv-formats": "^3.0.0"
|
|
61
|
+
},
|
|
49
62
|
"publishConfig": {
|
|
50
63
|
"access": "public"
|
|
51
64
|
},
|