@kubun/protocol 0.17.0 → 0.17.1

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/lib/errors.d.ts CHANGED
@@ -21,6 +21,13 @@ export declare const KubunErrorCodes: {
21
21
  readonly KB13: "Mutation schema validation error";
22
22
  readonly KB14: "Group control denied";
23
23
  readonly KB15: "Model not deployed";
24
+ readonly KB16: "Invalid fetch token";
25
+ readonly KB17: "Fetch token ordering violated";
26
+ readonly KB18: "Incomplete provider group";
27
+ readonly KB19: "Tombstone requires a provider-merge-policy model";
28
+ readonly KB20: "Provider group CHANGE rejected";
29
+ readonly KB21: "Missing fetch token";
30
+ readonly KB22: "Merge-policy remove requires a tombstone";
24
31
  };
25
32
  export type KubunErrorCode = keyof typeof KubunErrorCodes;
26
33
  export declare function isKubunErrorCode(value: unknown): value is KubunErrorCode;
package/lib/errors.js CHANGED
@@ -19,7 +19,14 @@
19
19
  KB12: 'Unsupported mutation type',
20
20
  KB13: 'Mutation schema validation error',
21
21
  KB14: 'Group control denied',
22
- KB15: 'Model not deployed'
22
+ KB15: 'Model not deployed',
23
+ KB16: 'Invalid fetch token',
24
+ KB17: 'Fetch token ordering violated',
25
+ KB18: 'Incomplete provider group',
26
+ KB19: 'Tombstone requires a provider-merge-policy model',
27
+ KB20: 'Provider group CHANGE rejected',
28
+ KB21: 'Missing fetch token',
29
+ KB22: 'Merge-policy remove requires a tombstone'
23
30
  };
24
31
  export function isKubunErrorCode(value) {
25
32
  return typeof value === 'string' && Object.hasOwn(KubunErrorCodes, value);
package/lib/executor.d.ts CHANGED
@@ -8,6 +8,22 @@ import type { DeployGraphParams, DeployGraphResult, ExecuteGraphParams, ExecuteG
8
8
  export type GraphQLOperationParams = {
9
9
  text: string;
10
10
  variables?: Record<string, unknown>;
11
+ /**
12
+ * The caller-minted idempotency key of a connector write-back: required on
13
+ * any connector action mutation (`connectorCreate<Model>` /
14
+ * `connectorUpdate<Model>`), ignored by every other operation. Reuse the
15
+ * same `operationID` and `deterministicEventID` when retrying the same user
16
+ * intent (a retry then returns the stored outcome instead of writing twice);
17
+ * mint a new pair for a new intent. Only mutations carry it.
18
+ */
19
+ operationID?: string;
20
+ /**
21
+ * The deterministic identity of the user intent a connector write-back
22
+ * carries out (for example one per form submission), sent with
23
+ * `operationID`: required on any connector action mutation, stable across
24
+ * retries of that intent, new for a new intent.
25
+ */
26
+ deterministicEventID?: string;
11
27
  };
12
28
  /**
13
29
  * A bound GraphQL execution target for a specific graph (and optionally a viewer).
@@ -371,6 +371,19 @@ export declare const clusterModel: {
371
371
  }];
372
372
  };
373
373
  };
374
+ readonly providerMergePolicy: {
375
+ readonly type: "object";
376
+ readonly properties: {
377
+ readonly group: {
378
+ readonly type: "array";
379
+ readonly items: {
380
+ readonly type: "string";
381
+ };
382
+ };
383
+ };
384
+ readonly required: readonly ["group"];
385
+ readonly additionalProperties: false;
386
+ };
374
387
  };
375
388
  readonly required: readonly ["name", "version", "interfaces", "schema", "fieldsMeta", "behavior"];
376
389
  readonly additionalProperties: false;
@@ -730,6 +743,19 @@ export declare const clusterModel: {
730
743
  }];
731
744
  };
732
745
  };
746
+ readonly providerMergePolicy: {
747
+ readonly type: "object";
748
+ readonly properties: {
749
+ readonly group: {
750
+ readonly type: "array";
751
+ readonly items: {
752
+ readonly type: "string";
753
+ };
754
+ };
755
+ };
756
+ readonly required: readonly ["group"];
757
+ readonly additionalProperties: false;
758
+ };
733
759
  };
734
760
  readonly required: readonly ["name", "version", "interfaces", "schema", "fieldsMeta", "behavior"];
735
761
  readonly additionalProperties: false;
@@ -1095,6 +1121,19 @@ export declare const clusterModel: {
1095
1121
  }];
1096
1122
  };
1097
1123
  };
1124
+ readonly providerMergePolicy: {
1125
+ readonly type: "object";
1126
+ readonly properties: {
1127
+ readonly group: {
1128
+ readonly type: "array";
1129
+ readonly items: {
1130
+ readonly type: "string";
1131
+ };
1132
+ };
1133
+ };
1134
+ readonly required: readonly ["group"];
1135
+ readonly additionalProperties: false;
1136
+ };
1098
1137
  };
1099
1138
  readonly required: readonly ["name", "version", "interfaces", "schema", "fieldsMeta", "behavior", "uniqueFields"];
1100
1139
  readonly additionalProperties: false;
@@ -1121,6 +1160,9 @@ export declare function clusterToRecord(cluster: ClusterModel): ClustersRecord;
1121
1160
  export declare const validateClusterModel: import("@sozai/schema").Validator<{
1122
1161
  digest: string;
1123
1162
  models: ({
1163
+ providerMergePolicy?: {
1164
+ group: string[];
1165
+ } | undefined;
1124
1166
  name: string;
1125
1167
  version: "1.0";
1126
1168
  schema: {
@@ -1212,6 +1254,9 @@ export declare const validateClusterModel: import("@sozai/schema").Validator<{
1212
1254
  interfaces: string[];
1213
1255
  behavior: "default";
1214
1256
  } | {
1257
+ providerMergePolicy?: {
1258
+ group: string[];
1259
+ } | undefined;
1215
1260
  name: string;
1216
1261
  version: "1.0";
1217
1262
  schema: {
@@ -1303,6 +1348,9 @@ export declare const validateClusterModel: import("@sozai/schema").Validator<{
1303
1348
  interfaces: string[];
1304
1349
  behavior: "interface";
1305
1350
  } | {
1351
+ providerMergePolicy?: {
1352
+ group: string[];
1353
+ } | undefined;
1306
1354
  name: string;
1307
1355
  version: "1.0";
1308
1356
  schema: {
@@ -796,6 +796,19 @@ export declare const documentModelBase: {
796
796
  }];
797
797
  };
798
798
  };
799
+ readonly providerMergePolicy: {
800
+ readonly type: "object";
801
+ readonly properties: {
802
+ readonly group: {
803
+ readonly type: "array";
804
+ readonly items: {
805
+ readonly type: "string";
806
+ };
807
+ };
808
+ };
809
+ readonly required: readonly ["group"];
810
+ readonly additionalProperties: false;
811
+ };
799
812
  };
800
813
  readonly required: readonly ["name", "version", "interfaces", "schema", "fieldsMeta"];
801
814
  readonly additionalProperties: false;
@@ -1156,6 +1169,19 @@ export declare const documentModelDefault: {
1156
1169
  }];
1157
1170
  };
1158
1171
  };
1172
+ readonly providerMergePolicy: {
1173
+ readonly type: "object";
1174
+ readonly properties: {
1175
+ readonly group: {
1176
+ readonly type: "array";
1177
+ readonly items: {
1178
+ readonly type: "string";
1179
+ };
1180
+ };
1181
+ };
1182
+ readonly required: readonly ["group"];
1183
+ readonly additionalProperties: false;
1184
+ };
1159
1185
  };
1160
1186
  readonly required: readonly ["name", "version", "interfaces", "schema", "fieldsMeta", "behavior"];
1161
1187
  readonly additionalProperties: false;
@@ -1516,6 +1542,19 @@ export declare const documentModelInterface: {
1516
1542
  }];
1517
1543
  };
1518
1544
  };
1545
+ readonly providerMergePolicy: {
1546
+ readonly type: "object";
1547
+ readonly properties: {
1548
+ readonly group: {
1549
+ readonly type: "array";
1550
+ readonly items: {
1551
+ readonly type: "string";
1552
+ };
1553
+ };
1554
+ };
1555
+ readonly required: readonly ["group"];
1556
+ readonly additionalProperties: false;
1557
+ };
1519
1558
  };
1520
1559
  readonly required: readonly ["name", "version", "interfaces", "schema", "fieldsMeta", "behavior"];
1521
1560
  readonly additionalProperties: false;
@@ -1882,6 +1921,19 @@ export declare const documentModelUnique: {
1882
1921
  }];
1883
1922
  };
1884
1923
  };
1924
+ readonly providerMergePolicy: {
1925
+ readonly type: "object";
1926
+ readonly properties: {
1927
+ readonly group: {
1928
+ readonly type: "array";
1929
+ readonly items: {
1930
+ readonly type: "string";
1931
+ };
1932
+ };
1933
+ };
1934
+ readonly required: readonly ["group"];
1935
+ readonly additionalProperties: false;
1936
+ };
1885
1937
  };
1886
1938
  readonly required: readonly ["name", "version", "interfaces", "schema", "fieldsMeta", "behavior", "uniqueFields"];
1887
1939
  readonly additionalProperties: false;
@@ -2244,6 +2296,19 @@ export declare const documentModel: {
2244
2296
  }];
2245
2297
  };
2246
2298
  };
2299
+ readonly providerMergePolicy: {
2300
+ readonly type: "object";
2301
+ readonly properties: {
2302
+ readonly group: {
2303
+ readonly type: "array";
2304
+ readonly items: {
2305
+ readonly type: "string";
2306
+ };
2307
+ };
2308
+ };
2309
+ readonly required: readonly ["group"];
2310
+ readonly additionalProperties: false;
2311
+ };
2247
2312
  };
2248
2313
  readonly required: readonly ["name", "version", "interfaces", "schema", "fieldsMeta", "behavior"];
2249
2314
  readonly additionalProperties: false;
@@ -2603,6 +2668,19 @@ export declare const documentModel: {
2603
2668
  }];
2604
2669
  };
2605
2670
  };
2671
+ readonly providerMergePolicy: {
2672
+ readonly type: "object";
2673
+ readonly properties: {
2674
+ readonly group: {
2675
+ readonly type: "array";
2676
+ readonly items: {
2677
+ readonly type: "string";
2678
+ };
2679
+ };
2680
+ };
2681
+ readonly required: readonly ["group"];
2682
+ readonly additionalProperties: false;
2683
+ };
2606
2684
  };
2607
2685
  readonly required: readonly ["name", "version", "interfaces", "schema", "fieldsMeta", "behavior"];
2608
2686
  readonly additionalProperties: false;
@@ -2968,6 +3046,19 @@ export declare const documentModel: {
2968
3046
  }];
2969
3047
  };
2970
3048
  };
3049
+ readonly providerMergePolicy: {
3050
+ readonly type: "object";
3051
+ readonly properties: {
3052
+ readonly group: {
3053
+ readonly type: "array";
3054
+ readonly items: {
3055
+ readonly type: "string";
3056
+ };
3057
+ };
3058
+ };
3059
+ readonly required: readonly ["group"];
3060
+ readonly additionalProperties: false;
3061
+ };
2971
3062
  };
2972
3063
  readonly required: readonly ["name", "version", "interfaces", "schema", "fieldsMeta", "behavior", "uniqueFields"];
2973
3064
  readonly additionalProperties: false;
@@ -3334,6 +3425,19 @@ export declare const documentModelsCluster: {
3334
3425
  }];
3335
3426
  };
3336
3427
  };
3428
+ readonly providerMergePolicy: {
3429
+ readonly type: "object";
3430
+ readonly properties: {
3431
+ readonly group: {
3432
+ readonly type: "array";
3433
+ readonly items: {
3434
+ readonly type: "string";
3435
+ };
3436
+ };
3437
+ };
3438
+ readonly required: readonly ["group"];
3439
+ readonly additionalProperties: false;
3440
+ };
3337
3441
  };
3338
3442
  readonly required: readonly ["name", "version", "interfaces", "schema", "fieldsMeta", "behavior"];
3339
3443
  readonly additionalProperties: false;
@@ -3693,6 +3797,19 @@ export declare const documentModelsCluster: {
3693
3797
  }];
3694
3798
  };
3695
3799
  };
3800
+ readonly providerMergePolicy: {
3801
+ readonly type: "object";
3802
+ readonly properties: {
3803
+ readonly group: {
3804
+ readonly type: "array";
3805
+ readonly items: {
3806
+ readonly type: "string";
3807
+ };
3808
+ };
3809
+ };
3810
+ readonly required: readonly ["group"];
3811
+ readonly additionalProperties: false;
3812
+ };
3696
3813
  };
3697
3814
  readonly required: readonly ["name", "version", "interfaces", "schema", "fieldsMeta", "behavior"];
3698
3815
  readonly additionalProperties: false;
@@ -4058,6 +4175,19 @@ export declare const documentModelsCluster: {
4058
4175
  }];
4059
4176
  };
4060
4177
  };
4178
+ readonly providerMergePolicy: {
4179
+ readonly type: "object";
4180
+ readonly properties: {
4181
+ readonly group: {
4182
+ readonly type: "array";
4183
+ readonly items: {
4184
+ readonly type: "string";
4185
+ };
4186
+ };
4187
+ };
4188
+ readonly required: readonly ["group"];
4189
+ readonly additionalProperties: false;
4190
+ };
4061
4191
  };
4062
4192
  readonly required: readonly ["name", "version", "interfaces", "schema", "fieldsMeta", "behavior", "uniqueFields"];
4063
4193
  readonly additionalProperties: false;
@@ -4425,6 +4555,19 @@ export declare const documentModelsRecord: {
4425
4555
  }];
4426
4556
  };
4427
4557
  };
4558
+ readonly providerMergePolicy: {
4559
+ readonly type: "object";
4560
+ readonly properties: {
4561
+ readonly group: {
4562
+ readonly type: "array";
4563
+ readonly items: {
4564
+ readonly type: "string";
4565
+ };
4566
+ };
4567
+ };
4568
+ readonly required: readonly ["group"];
4569
+ readonly additionalProperties: false;
4570
+ };
4428
4571
  };
4429
4572
  readonly required: readonly ["name", "version", "interfaces", "schema", "fieldsMeta", "behavior"];
4430
4573
  readonly additionalProperties: false;
@@ -4784,6 +4927,19 @@ export declare const documentModelsRecord: {
4784
4927
  }];
4785
4928
  };
4786
4929
  };
4930
+ readonly providerMergePolicy: {
4931
+ readonly type: "object";
4932
+ readonly properties: {
4933
+ readonly group: {
4934
+ readonly type: "array";
4935
+ readonly items: {
4936
+ readonly type: "string";
4937
+ };
4938
+ };
4939
+ };
4940
+ readonly required: readonly ["group"];
4941
+ readonly additionalProperties: false;
4942
+ };
4787
4943
  };
4788
4944
  readonly required: readonly ["name", "version", "interfaces", "schema", "fieldsMeta", "behavior"];
4789
4945
  readonly additionalProperties: false;
@@ -5149,6 +5305,19 @@ export declare const documentModelsRecord: {
5149
5305
  }];
5150
5306
  };
5151
5307
  };
5308
+ readonly providerMergePolicy: {
5309
+ readonly type: "object";
5310
+ readonly properties: {
5311
+ readonly group: {
5312
+ readonly type: "array";
5313
+ readonly items: {
5314
+ readonly type: "string";
5315
+ };
5316
+ };
5317
+ };
5318
+ readonly required: readonly ["group"];
5319
+ readonly additionalProperties: false;
5320
+ };
5152
5321
  };
5153
5322
  readonly required: readonly ["name", "version", "interfaces", "schema", "fieldsMeta", "behavior", "uniqueFields"];
5154
5323
  readonly additionalProperties: false;
@@ -5199,6 +5368,9 @@ export declare const setDocumentMutation: {
5199
5368
  };
5200
5369
  }];
5201
5370
  };
5371
+ readonly sourceFetchHLC: {
5372
+ readonly type: "string";
5373
+ };
5202
5374
  };
5203
5375
  readonly required: readonly ["iss", "sub", "typ", "data", "hlc", "unq"];
5204
5376
  readonly additionalProperties: false;
@@ -5221,6 +5393,32 @@ export declare const patchOperationSchema: {
5221
5393
  readonly required: readonly ["op", "path"];
5222
5394
  readonly additionalProperties: false;
5223
5395
  };
5396
+ /** A JSON Patch operation, as a change mutation carries it. */
5397
+ export type PatchAddOperation = {
5398
+ op: 'add';
5399
+ path: string;
5400
+ value: unknown;
5401
+ };
5402
+ export type PatchRemoveOperation = {
5403
+ op: 'remove';
5404
+ path: string;
5405
+ };
5406
+ export type PatchReplaceOperation = {
5407
+ op: 'replace';
5408
+ path: string;
5409
+ value: unknown;
5410
+ };
5411
+ export type PatchMoveOperation = {
5412
+ op: 'move';
5413
+ from: string;
5414
+ path: string;
5415
+ };
5416
+ export type PatchCopyOperation = {
5417
+ op: 'copy';
5418
+ from: string;
5419
+ path: string;
5420
+ };
5421
+ export type PatchOperation = PatchAddOperation | PatchCopyOperation | PatchMoveOperation | PatchRemoveOperation | PatchReplaceOperation;
5224
5422
  export declare const changeDocumentMutation: {
5225
5423
  readonly $id: "urn:kubun:protocol:mutation:change";
5226
5424
  readonly type: "object";
@@ -5275,6 +5473,53 @@ export declare const changeDocumentMutation: {
5275
5473
  readonly additionalProperties: false;
5276
5474
  };
5277
5475
  export type ChangeDocumentMutation = FromSchema<typeof changeDocumentMutation>;
5476
+ export declare const tombstoneDocumentMutation: {
5477
+ readonly $id: "urn:kubun:protocol:mutation:tombstone";
5478
+ readonly type: "object";
5479
+ readonly properties: {
5480
+ readonly typ: {
5481
+ readonly type: "string";
5482
+ readonly const: "tombstone";
5483
+ };
5484
+ readonly iss: {
5485
+ readonly title: "KubunDIDValue";
5486
+ readonly type: "string";
5487
+ readonly pattern: "^did:[a-z0-9]+:";
5488
+ };
5489
+ readonly aud: {
5490
+ readonly title: "KubunDIDValue";
5491
+ readonly type: "string";
5492
+ readonly pattern: "^did:[a-z0-9]+:";
5493
+ };
5494
+ readonly sub: {
5495
+ readonly type: "string";
5496
+ };
5497
+ readonly unq: {
5498
+ readonly title: "KubunBinaryValue";
5499
+ readonly type: "string";
5500
+ readonly pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$";
5501
+ };
5502
+ readonly hlc: {
5503
+ readonly type: "string";
5504
+ };
5505
+ readonly sourceFetchHLC: {
5506
+ readonly type: "string";
5507
+ };
5508
+ readonly cap: {
5509
+ readonly anyOf: readonly [{
5510
+ readonly type: "string";
5511
+ }, {
5512
+ readonly type: "array";
5513
+ readonly items: {
5514
+ readonly type: "string";
5515
+ };
5516
+ }];
5517
+ };
5518
+ };
5519
+ readonly required: readonly ["iss", "aud", "sub", "typ", "unq", "hlc", "sourceFetchHLC"];
5520
+ readonly additionalProperties: false;
5521
+ };
5522
+ export type TombstoneDocumentMutation = FromSchema<typeof tombstoneDocumentMutation>;
5278
5523
  export declare const documentMutation: {
5279
5524
  readonly $id: "urn:kubun:protocol:mutation";
5280
5525
  readonly anyOf: readonly [{
@@ -5320,6 +5565,9 @@ export declare const documentMutation: {
5320
5565
  };
5321
5566
  }];
5322
5567
  };
5568
+ readonly sourceFetchHLC: {
5569
+ readonly type: "string";
5570
+ };
5323
5571
  };
5324
5572
  readonly required: readonly ["iss", "sub", "typ", "data", "hlc", "unq"];
5325
5573
  readonly additionalProperties: false;
@@ -5375,10 +5623,58 @@ export declare const documentMutation: {
5375
5623
  };
5376
5624
  readonly required: readonly ["iss", "sub", "typ", "patch", "hlc"];
5377
5625
  readonly additionalProperties: false;
5626
+ }, {
5627
+ readonly $id: "urn:kubun:protocol:mutation:tombstone";
5628
+ readonly type: "object";
5629
+ readonly properties: {
5630
+ readonly typ: {
5631
+ readonly type: "string";
5632
+ readonly const: "tombstone";
5633
+ };
5634
+ readonly iss: {
5635
+ readonly title: "KubunDIDValue";
5636
+ readonly type: "string";
5637
+ readonly pattern: "^did:[a-z0-9]+:";
5638
+ };
5639
+ readonly aud: {
5640
+ readonly title: "KubunDIDValue";
5641
+ readonly type: "string";
5642
+ readonly pattern: "^did:[a-z0-9]+:";
5643
+ };
5644
+ readonly sub: {
5645
+ readonly type: "string";
5646
+ };
5647
+ readonly unq: {
5648
+ readonly title: "KubunBinaryValue";
5649
+ readonly type: "string";
5650
+ readonly pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$";
5651
+ };
5652
+ readonly hlc: {
5653
+ readonly type: "string";
5654
+ };
5655
+ readonly sourceFetchHLC: {
5656
+ readonly type: "string";
5657
+ };
5658
+ readonly cap: {
5659
+ readonly anyOf: readonly [{
5660
+ readonly type: "string";
5661
+ }, {
5662
+ readonly type: "array";
5663
+ readonly items: {
5664
+ readonly type: "string";
5665
+ };
5666
+ }];
5667
+ };
5668
+ };
5669
+ readonly required: readonly ["iss", "aud", "sub", "typ", "unq", "hlc", "sourceFetchHLC"];
5670
+ readonly additionalProperties: false;
5378
5671
  }];
5379
5672
  };
5380
5673
  export type DocumentMutation = FromSchema<typeof documentMutation>;
5381
5674
  export declare const validateDocumentModel: import("@sozai/schema").Validator<{
5675
+ providerMergePolicy?: {
5676
+ group: string[];
5677
+ } | undefined;
5382
5678
  name: string;
5383
5679
  version: "1.0";
5384
5680
  schema: {
@@ -5470,6 +5766,9 @@ export declare const validateDocumentModel: import("@sozai/schema").Validator<{
5470
5766
  interfaces: string[];
5471
5767
  behavior: "default";
5472
5768
  } | {
5769
+ providerMergePolicy?: {
5770
+ group: string[];
5771
+ } | undefined;
5473
5772
  name: string;
5474
5773
  version: "1.0";
5475
5774
  schema: {
@@ -5561,6 +5860,9 @@ export declare const validateDocumentModel: import("@sozai/schema").Validator<{
5561
5860
  interfaces: string[];
5562
5861
  behavior: "interface";
5563
5862
  } | {
5863
+ providerMergePolicy?: {
5864
+ group: string[];
5865
+ } | undefined;
5564
5866
  name: string;
5565
5867
  version: "1.0";
5566
5868
  schema: {
@@ -101,7 +101,22 @@ export const documentModelBase = {
101
101
  }
102
102
  },
103
103
  schema: documentModelSchema,
104
- fieldsMeta: documentFieldsMeta
104
+ fieldsMeta: documentFieldsMeta,
105
+ providerMergePolicy: {
106
+ type: 'object',
107
+ properties: {
108
+ group: {
109
+ type: 'array',
110
+ items: {
111
+ type: 'string'
112
+ }
113
+ }
114
+ },
115
+ required: [
116
+ 'group'
117
+ ],
118
+ additionalProperties: false
119
+ }
105
120
  },
106
121
  required: [
107
122
  'name',
@@ -213,6 +228,9 @@ export const setDocumentMutation = {
213
228
  }
214
229
  }
215
230
  ]
231
+ },
232
+ sourceFetchHLC: {
233
+ type: 'string'
216
234
  }
217
235
  },
218
236
  required: [
@@ -287,11 +305,57 @@ export const changeDocumentMutation = {
287
305
  ],
288
306
  additionalProperties: false
289
307
  };
308
+ export const tombstoneDocumentMutation = {
309
+ $id: 'urn:kubun:protocol:mutation:tombstone',
310
+ type: 'object',
311
+ properties: {
312
+ typ: {
313
+ type: 'string',
314
+ const: 'tombstone'
315
+ },
316
+ iss: didStringValue,
317
+ aud: didStringValue,
318
+ sub: {
319
+ type: 'string'
320
+ },
321
+ unq: binaryStringValue,
322
+ hlc: {
323
+ type: 'string'
324
+ },
325
+ sourceFetchHLC: {
326
+ type: 'string'
327
+ },
328
+ cap: {
329
+ anyOf: [
330
+ {
331
+ type: 'string'
332
+ },
333
+ {
334
+ type: 'array',
335
+ items: {
336
+ type: 'string'
337
+ }
338
+ }
339
+ ]
340
+ }
341
+ },
342
+ required: [
343
+ 'iss',
344
+ 'aud',
345
+ 'sub',
346
+ 'typ',
347
+ 'unq',
348
+ 'hlc',
349
+ 'sourceFetchHLC'
350
+ ],
351
+ additionalProperties: false
352
+ };
290
353
  export const documentMutation = {
291
354
  $id: 'urn:kubun:protocol:mutation',
292
355
  anyOf: [
293
356
  setDocumentMutation,
294
- changeDocumentMutation
357
+ changeDocumentMutation,
358
+ tombstoneDocumentMutation
295
359
  ]
296
360
  };
297
361
  // Normalization logic
@@ -401,6 +401,19 @@ export declare const deployGraphParams: {
401
401
  }];
402
402
  };
403
403
  };
404
+ readonly providerMergePolicy: {
405
+ readonly type: "object";
406
+ readonly properties: {
407
+ readonly group: {
408
+ readonly type: "array";
409
+ readonly items: {
410
+ readonly type: "string";
411
+ };
412
+ };
413
+ };
414
+ readonly required: readonly ["group"];
415
+ readonly additionalProperties: false;
416
+ };
404
417
  };
405
418
  readonly required: readonly ["name", "version", "interfaces", "schema", "fieldsMeta", "behavior"];
406
419
  readonly additionalProperties: false;
@@ -760,6 +773,19 @@ export declare const deployGraphParams: {
760
773
  }];
761
774
  };
762
775
  };
776
+ readonly providerMergePolicy: {
777
+ readonly type: "object";
778
+ readonly properties: {
779
+ readonly group: {
780
+ readonly type: "array";
781
+ readonly items: {
782
+ readonly type: "string";
783
+ };
784
+ };
785
+ };
786
+ readonly required: readonly ["group"];
787
+ readonly additionalProperties: false;
788
+ };
763
789
  };
764
790
  readonly required: readonly ["name", "version", "interfaces", "schema", "fieldsMeta", "behavior"];
765
791
  readonly additionalProperties: false;
@@ -1125,6 +1151,19 @@ export declare const deployGraphParams: {
1125
1151
  }];
1126
1152
  };
1127
1153
  };
1154
+ readonly providerMergePolicy: {
1155
+ readonly type: "object";
1156
+ readonly properties: {
1157
+ readonly group: {
1158
+ readonly type: "array";
1159
+ readonly items: {
1160
+ readonly type: "string";
1161
+ };
1162
+ };
1163
+ };
1164
+ readonly required: readonly ["group"];
1165
+ readonly additionalProperties: false;
1166
+ };
1128
1167
  };
1129
1168
  readonly required: readonly ["name", "version", "interfaces", "schema", "fieldsMeta", "behavior", "uniqueFields"];
1130
1169
  readonly additionalProperties: false;
@@ -1545,6 +1584,19 @@ export declare const deployGraphResult: {
1545
1584
  }];
1546
1585
  };
1547
1586
  };
1587
+ readonly providerMergePolicy: {
1588
+ readonly type: "object";
1589
+ readonly properties: {
1590
+ readonly group: {
1591
+ readonly type: "array";
1592
+ readonly items: {
1593
+ readonly type: "string";
1594
+ };
1595
+ };
1596
+ };
1597
+ readonly required: readonly ["group"];
1598
+ readonly additionalProperties: false;
1599
+ };
1548
1600
  };
1549
1601
  readonly required: readonly ["name", "version", "interfaces", "schema", "fieldsMeta", "behavior"];
1550
1602
  readonly additionalProperties: false;
@@ -1904,6 +1956,19 @@ export declare const deployGraphResult: {
1904
1956
  }];
1905
1957
  };
1906
1958
  };
1959
+ readonly providerMergePolicy: {
1960
+ readonly type: "object";
1961
+ readonly properties: {
1962
+ readonly group: {
1963
+ readonly type: "array";
1964
+ readonly items: {
1965
+ readonly type: "string";
1966
+ };
1967
+ };
1968
+ };
1969
+ readonly required: readonly ["group"];
1970
+ readonly additionalProperties: false;
1971
+ };
1907
1972
  };
1908
1973
  readonly required: readonly ["name", "version", "interfaces", "schema", "fieldsMeta", "behavior"];
1909
1974
  readonly additionalProperties: false;
@@ -2269,6 +2334,19 @@ export declare const deployGraphResult: {
2269
2334
  }];
2270
2335
  };
2271
2336
  };
2337
+ readonly providerMergePolicy: {
2338
+ readonly type: "object";
2339
+ readonly properties: {
2340
+ readonly group: {
2341
+ readonly type: "array";
2342
+ readonly items: {
2343
+ readonly type: "string";
2344
+ };
2345
+ };
2346
+ };
2347
+ readonly required: readonly ["group"];
2348
+ readonly additionalProperties: false;
2349
+ };
2272
2350
  };
2273
2351
  readonly required: readonly ["name", "version", "interfaces", "schema", "fieldsMeta", "behavior", "uniqueFields"];
2274
2352
  readonly additionalProperties: false;
@@ -2699,6 +2777,19 @@ export declare const loadGraphResult: {
2699
2777
  }];
2700
2778
  };
2701
2779
  };
2780
+ readonly providerMergePolicy: {
2781
+ readonly type: "object";
2782
+ readonly properties: {
2783
+ readonly group: {
2784
+ readonly type: "array";
2785
+ readonly items: {
2786
+ readonly type: "string";
2787
+ };
2788
+ };
2789
+ };
2790
+ readonly required: readonly ["group"];
2791
+ readonly additionalProperties: false;
2792
+ };
2702
2793
  };
2703
2794
  readonly required: readonly ["name", "version", "interfaces", "schema", "fieldsMeta", "behavior"];
2704
2795
  readonly additionalProperties: false;
@@ -3058,6 +3149,19 @@ export declare const loadGraphResult: {
3058
3149
  }];
3059
3150
  };
3060
3151
  };
3152
+ readonly providerMergePolicy: {
3153
+ readonly type: "object";
3154
+ readonly properties: {
3155
+ readonly group: {
3156
+ readonly type: "array";
3157
+ readonly items: {
3158
+ readonly type: "string";
3159
+ };
3160
+ };
3161
+ };
3162
+ readonly required: readonly ["group"];
3163
+ readonly additionalProperties: false;
3164
+ };
3061
3165
  };
3062
3166
  readonly required: readonly ["name", "version", "interfaces", "schema", "fieldsMeta", "behavior"];
3063
3167
  readonly additionalProperties: false;
@@ -3423,6 +3527,19 @@ export declare const loadGraphResult: {
3423
3527
  }];
3424
3528
  };
3425
3529
  };
3530
+ readonly providerMergePolicy: {
3531
+ readonly type: "object";
3532
+ readonly properties: {
3533
+ readonly group: {
3534
+ readonly type: "array";
3535
+ readonly items: {
3536
+ readonly type: "string";
3537
+ };
3538
+ };
3539
+ };
3540
+ readonly required: readonly ["group"];
3541
+ readonly additionalProperties: false;
3542
+ };
3426
3543
  };
3427
3544
  readonly required: readonly ["name", "version", "interfaces", "schema", "fieldsMeta", "behavior", "uniqueFields"];
3428
3545
  readonly additionalProperties: false;
@@ -3592,6 +3709,32 @@ export declare const mutateGraphParams: {
3592
3709
  readonly transactionID: {
3593
3710
  readonly type: "string";
3594
3711
  };
3712
+ readonly invocationCaps: {
3713
+ readonly type: "array";
3714
+ readonly items: {
3715
+ readonly type: "array";
3716
+ readonly items: {
3717
+ readonly type: "string";
3718
+ };
3719
+ };
3720
+ };
3721
+ /**
3722
+ * The connector operation-envelope ids for a credential-spend connector
3723
+ * action (`connectorCreate<Model>`/`connectorUpdate<Model>`). Optional:
3724
+ * never in `required`, so a request from an older client that omits them
3725
+ * still validates. Not accepted by an older server, though: the params
3726
+ * are `additionalProperties: false`, so a server that predates these
3727
+ * fields rejects a request carrying them — the server must be upgraded
3728
+ * before a client sends them. Forwarded onto
3729
+ * `ExecutionContext.operationID`/`ExecutionContext.deterministicEventID`
3730
+ * by the engine; verified downstream in `@kubun/plugin-connector`.
3731
+ */
3732
+ readonly operationID: {
3733
+ readonly type: "string";
3734
+ };
3735
+ readonly deterministicEventID: {
3736
+ readonly type: "string";
3737
+ };
3595
3738
  readonly id: {
3596
3739
  readonly type: "string";
3597
3740
  };
@@ -4046,6 +4189,19 @@ export declare const graphProtocol: {
4046
4189
  }];
4047
4190
  };
4048
4191
  };
4192
+ readonly providerMergePolicy: {
4193
+ readonly type: "object";
4194
+ readonly properties: {
4195
+ readonly group: {
4196
+ readonly type: "array";
4197
+ readonly items: {
4198
+ readonly type: "string";
4199
+ };
4200
+ };
4201
+ };
4202
+ readonly required: readonly ["group"];
4203
+ readonly additionalProperties: false;
4204
+ };
4049
4205
  };
4050
4206
  readonly required: readonly ["name", "version", "interfaces", "schema", "fieldsMeta", "behavior"];
4051
4207
  readonly additionalProperties: false;
@@ -4405,6 +4561,19 @@ export declare const graphProtocol: {
4405
4561
  }];
4406
4562
  };
4407
4563
  };
4564
+ readonly providerMergePolicy: {
4565
+ readonly type: "object";
4566
+ readonly properties: {
4567
+ readonly group: {
4568
+ readonly type: "array";
4569
+ readonly items: {
4570
+ readonly type: "string";
4571
+ };
4572
+ };
4573
+ };
4574
+ readonly required: readonly ["group"];
4575
+ readonly additionalProperties: false;
4576
+ };
4408
4577
  };
4409
4578
  readonly required: readonly ["name", "version", "interfaces", "schema", "fieldsMeta", "behavior"];
4410
4579
  readonly additionalProperties: false;
@@ -4770,6 +4939,19 @@ export declare const graphProtocol: {
4770
4939
  }];
4771
4940
  };
4772
4941
  };
4942
+ readonly providerMergePolicy: {
4943
+ readonly type: "object";
4944
+ readonly properties: {
4945
+ readonly group: {
4946
+ readonly type: "array";
4947
+ readonly items: {
4948
+ readonly type: "string";
4949
+ };
4950
+ };
4951
+ };
4952
+ readonly required: readonly ["group"];
4953
+ readonly additionalProperties: false;
4954
+ };
4773
4955
  };
4774
4956
  readonly required: readonly ["name", "version", "interfaces", "schema", "fieldsMeta", "behavior", "uniqueFields"];
4775
4957
  readonly additionalProperties: false;
@@ -5189,6 +5371,19 @@ export declare const graphProtocol: {
5189
5371
  }];
5190
5372
  };
5191
5373
  };
5374
+ readonly providerMergePolicy: {
5375
+ readonly type: "object";
5376
+ readonly properties: {
5377
+ readonly group: {
5378
+ readonly type: "array";
5379
+ readonly items: {
5380
+ readonly type: "string";
5381
+ };
5382
+ };
5383
+ };
5384
+ readonly required: readonly ["group"];
5385
+ readonly additionalProperties: false;
5386
+ };
5192
5387
  };
5193
5388
  readonly required: readonly ["name", "version", "interfaces", "schema", "fieldsMeta", "behavior"];
5194
5389
  readonly additionalProperties: false;
@@ -5548,6 +5743,19 @@ export declare const graphProtocol: {
5548
5743
  }];
5549
5744
  };
5550
5745
  };
5746
+ readonly providerMergePolicy: {
5747
+ readonly type: "object";
5748
+ readonly properties: {
5749
+ readonly group: {
5750
+ readonly type: "array";
5751
+ readonly items: {
5752
+ readonly type: "string";
5753
+ };
5754
+ };
5755
+ };
5756
+ readonly required: readonly ["group"];
5757
+ readonly additionalProperties: false;
5758
+ };
5551
5759
  };
5552
5760
  readonly required: readonly ["name", "version", "interfaces", "schema", "fieldsMeta", "behavior"];
5553
5761
  readonly additionalProperties: false;
@@ -5913,6 +6121,19 @@ export declare const graphProtocol: {
5913
6121
  }];
5914
6122
  };
5915
6123
  };
6124
+ readonly providerMergePolicy: {
6125
+ readonly type: "object";
6126
+ readonly properties: {
6127
+ readonly group: {
6128
+ readonly type: "array";
6129
+ readonly items: {
6130
+ readonly type: "string";
6131
+ };
6132
+ };
6133
+ };
6134
+ readonly required: readonly ["group"];
6135
+ readonly additionalProperties: false;
6136
+ };
5916
6137
  };
5917
6138
  readonly required: readonly ["name", "version", "interfaces", "schema", "fieldsMeta", "behavior", "uniqueFields"];
5918
6139
  readonly additionalProperties: false;
@@ -6346,6 +6567,19 @@ export declare const graphProtocol: {
6346
6567
  }];
6347
6568
  };
6348
6569
  };
6570
+ readonly providerMergePolicy: {
6571
+ readonly type: "object";
6572
+ readonly properties: {
6573
+ readonly group: {
6574
+ readonly type: "array";
6575
+ readonly items: {
6576
+ readonly type: "string";
6577
+ };
6578
+ };
6579
+ };
6580
+ readonly required: readonly ["group"];
6581
+ readonly additionalProperties: false;
6582
+ };
6349
6583
  };
6350
6584
  readonly required: readonly ["name", "version", "interfaces", "schema", "fieldsMeta", "behavior"];
6351
6585
  readonly additionalProperties: false;
@@ -6705,6 +6939,19 @@ export declare const graphProtocol: {
6705
6939
  }];
6706
6940
  };
6707
6941
  };
6942
+ readonly providerMergePolicy: {
6943
+ readonly type: "object";
6944
+ readonly properties: {
6945
+ readonly group: {
6946
+ readonly type: "array";
6947
+ readonly items: {
6948
+ readonly type: "string";
6949
+ };
6950
+ };
6951
+ };
6952
+ readonly required: readonly ["group"];
6953
+ readonly additionalProperties: false;
6954
+ };
6708
6955
  };
6709
6956
  readonly required: readonly ["name", "version", "interfaces", "schema", "fieldsMeta", "behavior"];
6710
6957
  readonly additionalProperties: false;
@@ -7070,6 +7317,19 @@ export declare const graphProtocol: {
7070
7317
  }];
7071
7318
  };
7072
7319
  };
7320
+ readonly providerMergePolicy: {
7321
+ readonly type: "object";
7322
+ readonly properties: {
7323
+ readonly group: {
7324
+ readonly type: "array";
7325
+ readonly items: {
7326
+ readonly type: "string";
7327
+ };
7328
+ };
7329
+ };
7330
+ readonly required: readonly ["group"];
7331
+ readonly additionalProperties: false;
7332
+ };
7073
7333
  };
7074
7334
  readonly required: readonly ["name", "version", "interfaces", "schema", "fieldsMeta", "behavior", "uniqueFields"];
7075
7335
  readonly additionalProperties: false;
@@ -7128,6 +7388,32 @@ export declare const graphProtocol: {
7128
7388
  readonly transactionID: {
7129
7389
  readonly type: "string";
7130
7390
  };
7391
+ readonly invocationCaps: {
7392
+ readonly type: "array";
7393
+ readonly items: {
7394
+ readonly type: "array";
7395
+ readonly items: {
7396
+ readonly type: "string";
7397
+ };
7398
+ };
7399
+ };
7400
+ /**
7401
+ * The connector operation-envelope ids for a credential-spend connector
7402
+ * action (`connectorCreate<Model>`/`connectorUpdate<Model>`). Optional:
7403
+ * never in `required`, so a request from an older client that omits them
7404
+ * still validates. Not accepted by an older server, though: the params
7405
+ * are `additionalProperties: false`, so a server that predates these
7406
+ * fields rejects a request carrying them — the server must be upgraded
7407
+ * before a client sends them. Forwarded onto
7408
+ * `ExecutionContext.operationID`/`ExecutionContext.deterministicEventID`
7409
+ * by the engine; verified downstream in `@kubun/plugin-connector`.
7410
+ */
7411
+ readonly operationID: {
7412
+ readonly type: "string";
7413
+ };
7414
+ readonly deterministicEventID: {
7415
+ readonly type: "string";
7416
+ };
7131
7417
  readonly id: {
7132
7418
  readonly type: "string";
7133
7419
  };
@@ -232,6 +232,31 @@ export const mutateGraphParams = {
232
232
  },
233
233
  transactionID: {
234
234
  type: 'string'
235
+ },
236
+ invocationCaps: {
237
+ type: 'array',
238
+ items: {
239
+ type: 'array',
240
+ items: {
241
+ type: 'string'
242
+ }
243
+ }
244
+ },
245
+ /**
246
+ * The connector operation-envelope ids for a credential-spend connector
247
+ * action (`connectorCreate<Model>`/`connectorUpdate<Model>`). Optional:
248
+ * never in `required`, so a request from an older client that omits them
249
+ * still validates. Not accepted by an older server, though: the params
250
+ * are `additionalProperties: false`, so a server that predates these
251
+ * fields rejects a request carrying them — the server must be upgraded
252
+ * before a client sends them. Forwarded onto
253
+ * `ExecutionContext.operationID`/`ExecutionContext.deterministicEventID`
254
+ * by the engine; verified downstream in `@kubun/plugin-connector`.
255
+ */ operationID: {
256
+ type: 'string'
257
+ },
258
+ deterministicEventID: {
259
+ type: 'string'
235
260
  }
236
261
  },
237
262
  required: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubun/protocol",
3
- "version": "0.17.0",
3
+ "version": "0.17.1",
4
4
  "keywords": [],
5
5
  "license": "see LICENSE.md",
6
6
  "sideEffects": false,
@@ -24,7 +24,7 @@
24
24
  "change-case": "^5.4.4"
25
25
  },
26
26
  "devDependencies": {
27
- "graphql": "^16.14.2",
27
+ "graphql": "^17.0.2",
28
28
  "json-schema-typed": "^8.0.2"
29
29
  },
30
30
  "publishConfig": {