@clowder-ai/plugin-contract 0.2.0 → 0.3.0
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.map +1 -1
- package/dist/codegen/generate-contract.js +0 -30
- package/dist/codegen/generate-contract.js.map +1 -1
- package/dist/conformance/index.d.ts +1 -2
- package/dist/conformance/index.d.ts.map +1 -1
- package/dist/conformance/index.js +1 -2
- package/dist/conformance/index.js.map +1 -1
- package/dist/conformance/messaging-behavior-fixture.d.ts +1 -1
- package/dist/conformance/messaging-behavior-fixture.d.ts.map +1 -1
- package/dist/conformance/messaging-behavior-fixture.js +1 -7
- package/dist/conformance/messaging-behavior-fixture.js.map +1 -1
- package/dist/conformance/messaging-loopback-adapter.d.ts +0 -3
- package/dist/conformance/messaging-loopback-adapter.d.ts.map +1 -1
- package/dist/conformance/messaging-loopback-adapter.js +1 -77
- package/dist/conformance/messaging-loopback-adapter.js.map +1 -1
- package/dist/conformance/messaging-loopback-state.d.ts +0 -6
- package/dist/conformance/messaging-loopback-state.d.ts.map +1 -1
- package/dist/conformance/messaging-loopback-state.js +0 -20
- package/dist/conformance/messaging-loopback-state.js.map +1 -1
- package/dist/generated/contract.generated.d.ts +6 -51
- package/dist/generated/contract.generated.d.ts.map +1 -1
- package/dist/generated/contract.generated.js +0 -8
- package/dist/generated/contract.generated.js.map +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +0 -1
- package/dist/types/index.js.map +1 -1
- package/dist/validation/manifest.d.ts.map +1 -1
- package/dist/validation/manifest.js +29 -15
- package/dist/validation/manifest.js.map +1 -1
- package/dist/wire/dispatch.d.ts.map +1 -1
- package/dist/wire/dispatch.js +0 -10
- package/dist/wire/dispatch.js.map +1 -1
- package/dist/wire/disposition-fixtures.d.ts +1 -1
- package/dist/wire/disposition-fixtures.d.ts.map +1 -1
- package/dist/wire/disposition-fixtures.js +0 -96
- package/dist/wire/disposition-fixtures.js.map +1 -1
- package/dist/wire/disposition.d.ts +3 -4
- package/dist/wire/disposition.d.ts.map +1 -1
- package/dist/wire/disposition.js +5 -16
- package/dist/wire/disposition.js.map +1 -1
- package/dist/wire/envelope.d.ts +0 -1
- package/dist/wire/envelope.d.ts.map +1 -1
- package/dist/wire/envelope.js.map +1 -1
- package/dist/wire/handshake-byte-bounds.d.ts.map +1 -1
- package/dist/wire/handshake-byte-bounds.js +0 -6
- package/dist/wire/handshake-byte-bounds.js.map +1 -1
- package/dist/wire/handshake.d.ts +6 -11
- package/dist/wire/handshake.d.ts.map +1 -1
- package/dist/wire/handshake.js +5 -12
- package/dist/wire/handshake.js.map +1 -1
- package/dist/wire/index.d.ts +2 -4
- package/dist/wire/index.d.ts.map +1 -1
- package/dist/wire/index.js +1 -3
- package/dist/wire/index.js.map +1 -1
- package/dist/wire/lifecycle-byte-bounds.d.ts.map +1 -1
- package/dist/wire/lifecycle-byte-bounds.js +0 -1
- package/dist/wire/lifecycle-byte-bounds.js.map +1 -1
- package/dist/wire/registry.d.ts +2 -23
- package/dist/wire/registry.d.ts.map +1 -1
- package/dist/wire/registry.js +2 -21
- package/dist/wire/registry.js.map +1 -1
- package/dist/wire/row-shapes.d.ts +0 -16
- package/dist/wire/row-shapes.d.ts.map +1 -1
- package/dist/wire/row-shapes.js.map +1 -1
- package/fixtures/behavior/messaging/adversarial-invariants.json +5 -216
- package/fixtures/manifest/invalid/contract-version-leading-zero-prerelease.json +1 -3
- package/fixtures/manifest/invalid/contract-version-range.json +1 -3
- package/fixtures/manifest/invalid/duplicate-signal-type.json +1 -3
- package/fixtures/manifest/invalid/icon-package-escape.json +1 -3
- package/fixtures/manifest/invalid/ipc-empty-entrypoint.json +1 -3
- package/fixtures/manifest/invalid/plugin-version-leading-zero-prerelease.json +1 -3
- package/fixtures/manifest/invalid/plugin-version-not-semver.json +1 -3
- package/fixtures/manifest/invalid/semver-empty-build-metadata.json +1 -3
- package/fixtures/manifest/invalid/stdio-missing-entrypoint.json +1 -3
- package/fixtures/manifest/invalid/user-authored-lifecycle.json +1 -3
- package/fixtures/manifest/valid/localized-product-metadata.json +1 -3
- package/fixtures/manifest/valid/minimal-builtin.json +1 -3
- package/fixtures/manifest/valid/protocol-intrinsic-lifecycle.json +1 -3
- package/fixtures/manifest/valid/semver-build-metadata.json +1 -3
- package/fixtures/manifest/valid/stdio-entrypoint.json +1 -3
- package/package.json +2 -2
- package/src/schemas/behavior-fixture.schema.json +0 -139
- package/src/schemas/manifest.schema.json +7 -103
- package/dist/types/capability.d.ts +0 -4
- package/dist/types/capability.d.ts.map +0 -1
- package/dist/types/capability.js +0 -11
- package/dist/types/capability.js.map +0 -1
- package/dist/wire/grants.d.ts +0 -57
- package/dist/wire/grants.d.ts.map +0 -1
- package/dist/wire/grants.js +0 -59
- package/dist/wire/grants.js.map +0 -1
- package/fixtures/manifest/invalid/unknown-capability.json +0 -19
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
},
|
|
18
18
|
"given": {
|
|
19
19
|
"caller": { "pluginInstanceId": "plugin-a" },
|
|
20
|
-
"grants": ["messaging.send"],
|
|
21
20
|
"handles": {},
|
|
22
21
|
"state": { "threads": [{ "threadId": "thread-1" }] }
|
|
23
22
|
},
|
|
@@ -52,7 +51,6 @@
|
|
|
52
51
|
},
|
|
53
52
|
"given": {
|
|
54
53
|
"caller": { "pluginInstanceId": "plugin-a" },
|
|
55
|
-
"grants": ["messaging.send"],
|
|
56
54
|
"handles": {
|
|
57
55
|
"target": { "kind": "thread_handle", "token": "thread-handle-a", "ownerPluginInstanceId": "plugin-a", "threadId": "thread-1" }
|
|
58
56
|
},
|
|
@@ -90,7 +88,6 @@
|
|
|
90
88
|
},
|
|
91
89
|
"given": {
|
|
92
90
|
"caller": { "pluginInstanceId": "plugin-a" },
|
|
93
|
-
"grants": ["messaging.appendElements"],
|
|
94
91
|
"handles": {
|
|
95
92
|
"foreignMessage": { "kind": "message_handle", "token": "message-handle-b", "ownerPluginInstanceId": "plugin-b", "threadId": "thread-1", "messageId": "message-1" }
|
|
96
93
|
},
|
|
@@ -125,7 +122,6 @@
|
|
|
125
122
|
},
|
|
126
123
|
"given": {
|
|
127
124
|
"caller": { "pluginInstanceId": "plugin-a" },
|
|
128
|
-
"grants": ["messaging.send"],
|
|
129
125
|
"handles": {
|
|
130
126
|
"target": { "kind": "thread_handle", "token": "thread-handle-a", "ownerPluginInstanceId": "plugin-a", "threadId": "thread-1" }
|
|
131
127
|
},
|
|
@@ -162,7 +158,6 @@
|
|
|
162
158
|
},
|
|
163
159
|
"given": {
|
|
164
160
|
"caller": { "pluginInstanceId": "plugin-a" },
|
|
165
|
-
"grants": ["messaging.appendElements"],
|
|
166
161
|
"handles": {
|
|
167
162
|
"message": { "kind": "message_handle", "token": "message-handle-a", "ownerPluginInstanceId": "plugin-a", "threadId": "thread-1", "messageId": "message-1" }
|
|
168
163
|
},
|
|
@@ -197,7 +192,6 @@
|
|
|
197
192
|
},
|
|
198
193
|
"given": {
|
|
199
194
|
"caller": { "pluginInstanceId": "plugin-a" },
|
|
200
|
-
"grants": ["message.event.subscribe"],
|
|
201
195
|
"handles": {
|
|
202
196
|
"subscription": { "kind": "subscription", "token": "subscription-token-a", "ownerPluginInstanceId": "plugin-a", "threadId": "thread-1", "subscriptionId": "subscription-a" }
|
|
203
197
|
},
|
|
@@ -226,7 +220,6 @@
|
|
|
226
220
|
},
|
|
227
221
|
"given": {
|
|
228
222
|
"caller": { "pluginInstanceId": "plugin-a" },
|
|
229
|
-
"grants": ["message.event.subscribe"],
|
|
230
223
|
"handles": {
|
|
231
224
|
"subscriptionA": { "kind": "subscription", "token": "ack-from-a", "ownerPluginInstanceId": "plugin-a", "threadId": "thread-1", "subscriptionId": "subscription-a" },
|
|
232
225
|
"subscriptionB": { "kind": "subscription", "token": "subscription-token-b", "ownerPluginInstanceId": "plugin-a", "threadId": "thread-2", "subscriptionId": "subscription-b" }
|
|
@@ -256,7 +249,6 @@
|
|
|
256
249
|
},
|
|
257
250
|
"given": {
|
|
258
251
|
"caller": { "pluginInstanceId": "plugin-a" },
|
|
259
|
-
"grants": ["messaging.send"],
|
|
260
252
|
"handles": {
|
|
261
253
|
"target": { "kind": "thread_handle", "token": "thread-handle-a", "ownerPluginInstanceId": "plugin-a", "threadId": "thread-1" }
|
|
262
254
|
},
|
|
@@ -294,7 +286,6 @@
|
|
|
294
286
|
},
|
|
295
287
|
"given": {
|
|
296
288
|
"caller": { "pluginInstanceId": "plugin-a" },
|
|
297
|
-
"grants": ["messaging.appendElements"],
|
|
298
289
|
"handles": {
|
|
299
290
|
"message": { "kind": "message_handle", "token": "message-handle-a", "ownerPluginInstanceId": "plugin-a", "threadId": "thread-1", "messageId": "message-1" }
|
|
300
291
|
},
|
|
@@ -319,131 +310,11 @@
|
|
|
319
310
|
]
|
|
320
311
|
}
|
|
321
312
|
},
|
|
313
|
+
|
|
314
|
+
|
|
322
315
|
{
|
|
323
|
-
"id": "
|
|
324
|
-
"invariant": "
|
|
325
|
-
"execution": {
|
|
326
|
-
"plane": "host-control",
|
|
327
|
-
"verdictOracle": { "kind": "behavior-expectation" }
|
|
328
|
-
},
|
|
329
|
-
"given": {
|
|
330
|
-
"caller": { "pluginInstanceId": "first-party-plugin" },
|
|
331
|
-
"grants": ["messaging.send"],
|
|
332
|
-
"handles": {},
|
|
333
|
-
"state": { "grantState": { "presetCapabilities": ["messaging.send"] } }
|
|
334
|
-
},
|
|
335
|
-
"when": {
|
|
336
|
-
"operation": "applyGrantPreset",
|
|
337
|
-
"input": { "presetKind": "first_party", "capabilities": ["onMessage"] }
|
|
338
|
-
},
|
|
339
|
-
"expect": {
|
|
340
|
-
"status": "error",
|
|
341
|
-
"errorCode": "PERMISSION",
|
|
342
|
-
"sideEffects": [
|
|
343
|
-
{ "target": "grant_state", "assertion": "unchanged" }
|
|
344
|
-
]
|
|
345
|
-
}
|
|
346
|
-
},
|
|
347
|
-
{
|
|
348
|
-
"id": "preset-visible-revocable",
|
|
349
|
-
"invariant": "A first-party L1 preset remains visible and independently revocable.",
|
|
350
|
-
"execution": {
|
|
351
|
-
"plane": "host-control",
|
|
352
|
-
"verdictOracle": { "kind": "behavior-expectation" }
|
|
353
|
-
},
|
|
354
|
-
"given": {
|
|
355
|
-
"caller": { "pluginInstanceId": "first-party-plugin" },
|
|
356
|
-
"grants": ["messaging.send"],
|
|
357
|
-
"handles": {},
|
|
358
|
-
"state": { "grantState": { "messaging.send": { "visible": true, "granted": true } } }
|
|
359
|
-
},
|
|
360
|
-
"when": {
|
|
361
|
-
"operation": "revokeGrant",
|
|
362
|
-
"input": { "capability": "messaging.send" }
|
|
363
|
-
},
|
|
364
|
-
"expect": {
|
|
365
|
-
"status": "success",
|
|
366
|
-
"sideEffects": [
|
|
367
|
-
{ "target": "grant_state", "assertion": "state_equals", "value": { "capability": "messaging.send", "visible": true, "granted": false } }
|
|
368
|
-
]
|
|
369
|
-
}
|
|
370
|
-
},
|
|
371
|
-
{
|
|
372
|
-
"id": "whisper-target-beyond-default-empty-grant-rejected",
|
|
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
|
-
},
|
|
379
|
-
"given": {
|
|
380
|
-
"caller": { "pluginInstanceId": "plugin-a" },
|
|
381
|
-
"grants": ["messaging.send"],
|
|
382
|
-
"handles": {
|
|
383
|
-
"target": { "kind": "thread_handle", "token": "thread-handle-a", "ownerPluginInstanceId": "plugin-a", "threadId": "thread-1" }
|
|
384
|
-
},
|
|
385
|
-
"state": { "whisperGrantTargets": [] }
|
|
386
|
-
},
|
|
387
|
-
"when": {
|
|
388
|
-
"operation": "send",
|
|
389
|
-
"input": {
|
|
390
|
-
"address": { "kind": "thread_handle", "handle": "thread-handle-a" },
|
|
391
|
-
"draftAudience": { "kind": "whisper", "targets": ["cat-b"] },
|
|
392
|
-
"idempotencyKey": "whisper-without-target-grant-1",
|
|
393
|
-
"payload": {
|
|
394
|
-
"provenance": { "epistemicStatus": "inference" },
|
|
395
|
-
"elements": [{ "elementId": "text-1", "kind": "text", "payload": { "text": "blocked" } }]
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
},
|
|
399
|
-
"expect": {
|
|
400
|
-
"status": "error",
|
|
401
|
-
"errorCode": "PERMISSION",
|
|
402
|
-
"sideEffects": [
|
|
403
|
-
{ "target": "messages", "assertion": "unchanged" },
|
|
404
|
-
{ "target": "output_events", "assertion": "none" },
|
|
405
|
-
{ "target": "idempotency_ledger", "assertion": "unchanged" }
|
|
406
|
-
]
|
|
407
|
-
}
|
|
408
|
-
},
|
|
409
|
-
{
|
|
410
|
-
"id": "append-without-grant-rejected",
|
|
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
|
-
},
|
|
417
|
-
"given": {
|
|
418
|
-
"caller": { "pluginInstanceId": "plugin-a" },
|
|
419
|
-
"grants": [],
|
|
420
|
-
"handles": {
|
|
421
|
-
"message": { "kind": "message_handle", "token": "message-handle-a", "ownerPluginInstanceId": "plugin-a", "threadId": "thread-1", "messageId": "message-1" }
|
|
422
|
-
},
|
|
423
|
-
"state": { "messages": [{ "messageId": "message-1", "threadId": "thread-1", "revision": 1 }] }
|
|
424
|
-
},
|
|
425
|
-
"when": {
|
|
426
|
-
"operation": "appendElements",
|
|
427
|
-
"input": {
|
|
428
|
-
"handle": { "kind": "message", "token": "message-handle-a" },
|
|
429
|
-
"operationId": "append-without-grant-1",
|
|
430
|
-
"baseRevision": 1,
|
|
431
|
-
"elements": [{ "elementId": "text-2", "kind": "text", "payload": { "text": "blocked" } }]
|
|
432
|
-
}
|
|
433
|
-
},
|
|
434
|
-
"expect": {
|
|
435
|
-
"status": "error",
|
|
436
|
-
"errorCode": "PERMISSION",
|
|
437
|
-
"sideEffects": [
|
|
438
|
-
{ "target": "messages", "assertion": "unchanged" },
|
|
439
|
-
{ "target": "output_events", "assertion": "none" },
|
|
440
|
-
{ "target": "idempotency_ledger", "assertion": "unchanged" }
|
|
441
|
-
]
|
|
442
|
-
}
|
|
443
|
-
},
|
|
444
|
-
{
|
|
445
|
-
"id": "denied-on-message-rejected",
|
|
446
|
-
"invariant": "The Host cannot deliver an onMessage envelope without an explicit scoped L2 grant.",
|
|
316
|
+
"id": "on-message-delivery",
|
|
317
|
+
"invariant": "A live instance receives its scoped message through the declared handler",
|
|
447
318
|
"execution": {
|
|
448
319
|
"plane": "host-to-plugin-delivery",
|
|
449
320
|
"method": "host.messaging.deliver",
|
|
@@ -451,7 +322,6 @@
|
|
|
451
322
|
},
|
|
452
323
|
"given": {
|
|
453
324
|
"caller": { "pluginInstanceId": "plugin-a" },
|
|
454
|
-
"grants": [],
|
|
455
325
|
"handles": {
|
|
456
326
|
"target": { "kind": "thread_handle", "token": "thread-handle-a", "ownerPluginInstanceId": "plugin-a", "threadId": "thread-1" }
|
|
457
327
|
},
|
|
@@ -465,63 +335,13 @@
|
|
|
465
335
|
}
|
|
466
336
|
},
|
|
467
337
|
"expect": {
|
|
468
|
-
"status": "
|
|
469
|
-
"errorCode": "PERMISSION",
|
|
338
|
+
"status": "success",
|
|
470
339
|
"sideEffects": [
|
|
471
340
|
{ "target": "messages", "assertion": "unchanged" },
|
|
472
341
|
{ "target": "output_events", "assertion": "none" }
|
|
473
342
|
]
|
|
474
343
|
}
|
|
475
344
|
},
|
|
476
|
-
{
|
|
477
|
-
"id": "permission-matrix-complete",
|
|
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
|
-
},
|
|
483
|
-
"given": {
|
|
484
|
-
"caller": { "pluginInstanceId": "policy-auditor" },
|
|
485
|
-
"grants": [],
|
|
486
|
-
"handles": {},
|
|
487
|
-
"state": {}
|
|
488
|
-
},
|
|
489
|
-
"when": {
|
|
490
|
-
"operation": "checkPermissionMatrix",
|
|
491
|
-
"input": {
|
|
492
|
-
"entries": [
|
|
493
|
-
{ "capability": "plugin.config.read", "layer": "L0", "firstPartyPreset": false },
|
|
494
|
-
{ "capability": "plugin.state.get", "layer": "L0", "firstPartyPreset": false },
|
|
495
|
-
{ "capability": "plugin.state.set", "layer": "L0", "firstPartyPreset": false },
|
|
496
|
-
{ "capability": "messaging.send", "layer": "L1", "firstPartyPreset": true },
|
|
497
|
-
{ "capability": "schedule.register", "layer": "L1", "firstPartyPreset": true },
|
|
498
|
-
{ "capability": "messaging.appendElements", "layer": "L1", "firstPartyPreset": true },
|
|
499
|
-
{ "capability": "streams.read", "layer": "L1", "firstPartyPreset": true },
|
|
500
|
-
{ "capability": "onMessage", "layer": "L2", "firstPartyPreset": false },
|
|
501
|
-
{ "capability": "message.event.subscribe", "layer": "L2", "firstPartyPreset": false },
|
|
502
|
-
{ "capability": "secret.read", "layer": "L2", "firstPartyPreset": false },
|
|
503
|
-
{ "capability": "thread.listMetadata", "layer": "L2", "firstPartyPreset": false },
|
|
504
|
-
{ "capability": "thread.readContent", "layer": "L2", "firstPartyPreset": false },
|
|
505
|
-
{ "capability": "thread.write", "layer": "L2", "firstPartyPreset": false },
|
|
506
|
-
{ "capability": "task.read", "layer": "L2", "firstPartyPreset": false },
|
|
507
|
-
{ "capability": "task.write", "layer": "L2", "firstPartyPreset": false },
|
|
508
|
-
{ "capability": "task.admitEntrusted", "layer": "L2", "firstPartyPreset": false },
|
|
509
|
-
{ "capability": "memory.query", "layer": "L2", "firstPartyPreset": false },
|
|
510
|
-
{ "capability": "memory.append", "layer": "L2", "firstPartyPreset": false },
|
|
511
|
-
{ "capability": "memory.retrieve", "layer": "L2", "firstPartyPreset": false },
|
|
512
|
-
{ "capability": "windows.create", "layer": "L2", "firstPartyPreset": false },
|
|
513
|
-
{ "capability": "whisper.extend", "layer": "L2", "firstPartyPreset": false },
|
|
514
|
-
{ "capability": "cloud.conversation.host", "layer": "L2", "firstPartyPreset": false }
|
|
515
|
-
]
|
|
516
|
-
}
|
|
517
|
-
},
|
|
518
|
-
"expect": {
|
|
519
|
-
"status": "success",
|
|
520
|
-
"sideEffects": [
|
|
521
|
-
{ "target": "permission_matrix", "assertion": "matches", "value": { "complete": true, "firstPartyPresetLayers": ["L1"], "defaultWhisperTargets": [] } }
|
|
522
|
-
]
|
|
523
|
-
}
|
|
524
|
-
},
|
|
525
345
|
{
|
|
526
346
|
"id": "delete-replay-events-preserves-canonical-messages",
|
|
527
347
|
"invariant": "Deleting the replay transport buffer cannot delete canonical messages or threads.",
|
|
@@ -531,7 +351,6 @@
|
|
|
531
351
|
},
|
|
532
352
|
"given": {
|
|
533
353
|
"caller": { "pluginInstanceId": "host-retention" },
|
|
534
|
-
"grants": ["message.event.subscribe"],
|
|
535
354
|
"handles": {
|
|
536
355
|
"subscription": { "kind": "subscription", "token": "subscription-token-a", "ownerPluginInstanceId": "host-retention", "threadId": "thread-1", "subscriptionId": "subscription-a" }
|
|
537
356
|
},
|
|
@@ -552,35 +371,6 @@
|
|
|
552
371
|
]
|
|
553
372
|
}
|
|
554
373
|
},
|
|
555
|
-
{
|
|
556
|
-
"id": "snapshot-without-grant-rejected",
|
|
557
|
-
"invariant": "A subscription identifier cannot bypass the message.event.subscribe grant for snapshots.",
|
|
558
|
-
"execution": {
|
|
559
|
-
"plane": "wire-admission",
|
|
560
|
-
"method": "messaging.snapshot",
|
|
561
|
-
"verdictOracle": { "kind": "json-rpc-error", "code": -32602, "sideEffects": "behavior-expectation" }
|
|
562
|
-
},
|
|
563
|
-
"given": {
|
|
564
|
-
"caller": { "pluginInstanceId": "plugin-a" },
|
|
565
|
-
"grants": [],
|
|
566
|
-
"handles": {
|
|
567
|
-
"subscription": { "kind": "subscription", "token": "subscription-token-a", "ownerPluginInstanceId": "plugin-a", "threadId": "thread-1", "subscriptionId": "subscription-a" }
|
|
568
|
-
},
|
|
569
|
-
"state": { "subscription": { "cursorSequence": 4 } }
|
|
570
|
-
},
|
|
571
|
-
"when": {
|
|
572
|
-
"operation": "snapshot",
|
|
573
|
-
"input": { "subscriptionId": "subscription-a" }
|
|
574
|
-
},
|
|
575
|
-
"expect": {
|
|
576
|
-
"status": "error",
|
|
577
|
-
"errorCode": "PERMISSION",
|
|
578
|
-
"sideEffects": [
|
|
579
|
-
{ "target": "snapshot", "assertion": "none" },
|
|
580
|
-
{ "target": "subscription", "assertion": "unchanged" }
|
|
581
|
-
]
|
|
582
|
-
}
|
|
583
|
-
},
|
|
584
374
|
{
|
|
585
375
|
"id": "foreign-replay-delete-rejected",
|
|
586
376
|
"invariant": "A caller cannot delete another plugin instance's subscription replay buffer.",
|
|
@@ -590,7 +380,6 @@
|
|
|
590
380
|
},
|
|
591
381
|
"given": {
|
|
592
382
|
"caller": { "pluginInstanceId": "plugin-b" },
|
|
593
|
-
"grants": ["message.event.subscribe"],
|
|
594
383
|
"handles": {
|
|
595
384
|
"subscription": { "kind": "subscription", "token": "subscription-token-a", "ownerPluginInstanceId": "plugin-a", "threadId": "thread-1", "subscriptionId": "subscription-a" }
|
|
596
385
|
},
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clowder-ai/plugin-contract",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"private": false,
|
|
5
|
-
"description": "Clowder AI plugin
|
|
5
|
+
"description": "Clowder AI plugin schemas, bidirectional protocol and conformance fixtures",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"exports": {
|