@x12i/memorix-metadata 3.0.3 → 3.2.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.
Files changed (56) hide show
  1. package/README.md +4 -0
  2. package/dist/abstracts.d.ts +9 -3
  3. package/dist/abstracts.d.ts.map +1 -1
  4. package/dist/abstracts.js +70 -66
  5. package/dist/abstracts.js.map +1 -1
  6. package/dist/fold-bindings.d.ts +19 -0
  7. package/dist/fold-bindings.d.ts.map +1 -0
  8. package/dist/fold-bindings.js +103 -0
  9. package/dist/fold-bindings.js.map +1 -0
  10. package/dist/index.d.ts +3 -1
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +3 -1
  13. package/dist/index.js.map +1 -1
  14. package/dist/kind-fields.d.ts.map +1 -1
  15. package/dist/kind-fields.js +0 -1
  16. package/dist/kind-fields.js.map +1 -1
  17. package/dist/kinds.d.ts +2 -2
  18. package/dist/kinds.d.ts.map +1 -1
  19. package/dist/kinds.js +9 -11
  20. package/dist/kinds.js.map +1 -1
  21. package/dist/normalize.d.ts +1 -0
  22. package/dist/normalize.d.ts.map +1 -1
  23. package/dist/normalize.js +5 -1
  24. package/dist/normalize.js.map +1 -1
  25. package/dist/resolve.d.ts.map +1 -1
  26. package/dist/resolve.js +14 -3
  27. package/dist/resolve.js.map +1 -1
  28. package/dist/topology.d.ts +52 -0
  29. package/dist/topology.d.ts.map +1 -0
  30. package/dist/topology.js +376 -0
  31. package/dist/topology.js.map +1 -0
  32. package/dist/types.d.ts +146 -16
  33. package/dist/types.d.ts.map +1 -1
  34. package/dist/validate.d.ts.map +1 -1
  35. package/dist/validate.js +179 -64
  36. package/dist/validate.js.map +1 -1
  37. package/examples/invalid/agent-classification.json +31 -31
  38. package/examples/invalid/broken-binding.json +27 -27
  39. package/examples/invalid/completion-mapping-with-exec-policy.json +31 -31
  40. package/examples/invalid/missing-parent.json +31 -31
  41. package/examples/invalid/operational-kind-root.json +31 -31
  42. package/examples/invalid/pipeline-unknown-service.json +31 -31
  43. package/examples/invalid/relationship-missing-rules.json +24 -24
  44. package/examples/invalid/relationship-with-storage.json +24 -24
  45. package/examples/invalid/service-with-secrets.json +27 -27
  46. package/examples/knowx/normalized/pack.json +1133 -173
  47. package/examples/opx/normalized/pack.json +309 -291
  48. package/examples/opx/raw/abstract-types.json +223 -7
  49. package/examples/opx/raw/object-types.json +26 -95
  50. package/examples/opx/raw/pipelines-and-sources.json +66 -18
  51. package/examples/opx/raw/relationship-definitions.json +17 -47
  52. package/examples/opx/raw/view-definitions.json +6 -20
  53. package/examples/opx/raw/write-and-source-mappings.json +135 -20
  54. package/examples/project-opx/normalized/pack.json +355 -263
  55. package/package.json +1 -1
  56. package/examples/opx/raw/abstract-bindings.json +0 -38
@@ -7,31 +7,38 @@
7
7
  "id": "opx",
8
8
  "name": "Operations (generic parent)",
9
9
  "description": "Complete generic parent agent for ordinary operational work. Permanent Memorix acceptance pack.",
10
+ "parentIds": [],
10
11
  "parentId": null
11
12
  },
12
13
  {
13
14
  "id": "project-opx",
14
15
  "name": "Project Operations (child of opx)",
15
16
  "description": "Inheritance smoke agent. Extends opx without replacing core definitions.",
17
+ "parentIds": [
18
+ "opx"
19
+ ],
16
20
  "parentId": "opx"
17
21
  }
18
22
  ],
19
23
  "objectTypes": [
20
24
  {
21
- "id": "employees",
22
- "name": "Employees",
25
+ "id": "people",
26
+ "name": "People",
23
27
  "dataCategory": "entity",
24
28
  "abstractTypes": [
25
29
  "People"
26
30
  ],
31
+ "notes": "Single people OT. Inside vs outside org is identity kind (concept.identifiers.primary.kind): employeeId | externalPersonId \u2014 not separate object types.",
27
32
  "contentTypes": [
28
33
  {
29
34
  "id": "raw",
30
- "required": true
35
+ "required": true,
36
+ "requiredReason": "Landed provider-native payload; identity and lineage depend on it."
31
37
  },
32
38
  {
33
39
  "id": "snapshots",
34
- "required": true
40
+ "required": true,
41
+ "requiredReason": "Canonical composed person view used by queries and abstracts."
35
42
  },
36
43
  {
37
44
  "id": "discovery",
@@ -53,63 +60,6 @@
53
60
  "id": "relationships",
54
61
  "notes": "Candidate store shape until Gate G4"
55
62
  }
56
- ],
57
- "fields": [
58
- {
59
- "path": "data.displayName",
60
- "valueType": "string",
61
- "contentType": "snapshots"
62
- },
63
- {
64
- "path": "data.role",
65
- "valueType": "string",
66
- "contentType": "snapshots"
67
- }
68
- ]
69
- },
70
- {
71
- "id": "contractors",
72
- "name": "Contractors",
73
- "dataCategory": "entity",
74
- "abstractTypes": [
75
- "People"
76
- ],
77
- "contentTypes": [
78
- {
79
- "id": "raw"
80
- },
81
- {
82
- "id": "snapshots"
83
- },
84
- {
85
- "id": "discovery",
86
- "discriminator": {
87
- "path": "data.discoveryType",
88
- "required": false
89
- }
90
- },
91
- {
92
- "id": "analysis",
93
- "discriminator": {
94
- "path": "data.analysisType",
95
- "required": false
96
- }
97
- },
98
- {
99
- "id": "relationships"
100
- }
101
- ],
102
- "fields": [
103
- {
104
- "path": "data.displayName",
105
- "valueType": "string",
106
- "contentType": "snapshots"
107
- },
108
- {
109
- "path": "data.role",
110
- "valueType": "string",
111
- "contentType": "snapshots"
112
- }
113
63
  ]
114
64
  },
115
65
  {
@@ -167,11 +117,11 @@
167
117
  }
168
118
  },
169
119
  {
170
- "id": "procedures",
171
- "name": "Procedures",
120
+ "id": "playbooks",
121
+ "name": "Playbooks",
172
122
  "dataCategory": "knowledge",
173
123
  "abstractTypes": [
174
- "Procedures"
124
+ "Playbooks"
175
125
  ],
176
126
  "contentTypes": [
177
127
  {
@@ -212,7 +162,7 @@
212
162
  {
213
163
  "id": "People",
214
164
  "name": "People",
215
- "meaning": "Employees and contractors who perform operational work",
165
+ "meaning": "People who perform operational work \u2014 inside the org (employeeId) or outside (externalPersonId), distinguished by identity kind",
216
166
  "category": "entity",
217
167
  "properties": [
218
168
  {
@@ -229,113 +179,233 @@
229
179
  "id": "lens",
230
180
  "valueType": "string",
231
181
  "required": false
182
+ },
183
+ {
184
+ "id": "email",
185
+ "valueType": "string",
186
+ "required": false
187
+ },
188
+ {
189
+ "id": "organization",
190
+ "valueType": "string",
191
+ "required": false
232
192
  }
233
- ]
234
- },
235
- {
236
- "id": "WorkItems",
237
- "name": "Work Items",
238
- "meaning": "Units of operational work",
239
- "category": "entity"
240
- },
241
- {
242
- "id": "Procedures",
243
- "name": "Procedures",
244
- "meaning": "Reusable operational knowledge / playbooks",
245
- "category": "knowledge"
246
- },
247
- {
248
- "id": "ActivityEvents",
249
- "name": "Activity Events",
250
- "meaning": "Progress and activity reports about work items",
251
- "category": "event"
252
- }
253
- ],
254
- "abstractBindings": [
255
- {
256
- "id": "people-employees-contractors",
257
- "abstractType": "People",
258
- "concreteObjectTypes": [
259
- "employees",
260
- "contractors"
261
193
  ],
262
- "union": true,
263
- "notes": "People = Employees ∪ Contractors. No abstract records exist.",
264
194
  "members": [
265
195
  {
266
- "objectType": "employees",
196
+ "objectType": "people",
267
197
  "contentType": "snapshots",
268
198
  "properties": [
269
199
  {
270
200
  "abstractProperty": "title",
271
201
  "contentType": "snapshots",
272
- "mappingId": "opx-people-abstract-employees"
202
+ "mappingId": "opx-people-abstract"
273
203
  },
274
204
  {
275
205
  "abstractProperty": "role",
276
206
  "contentType": "snapshots",
277
- "mappingId": "opx-people-abstract-employees"
207
+ "mappingId": "opx-people-abstract"
278
208
  },
279
209
  {
280
210
  "abstractProperty": "lens",
281
211
  "contentType": "snapshots",
282
- "mappingId": "opx-people-abstract-employees"
212
+ "mappingId": "opx-people-abstract"
213
+ },
214
+ {
215
+ "abstractProperty": "email",
216
+ "contentType": "snapshots",
217
+ "mappingId": "opx-people-abstract"
218
+ },
219
+ {
220
+ "abstractProperty": "organization",
221
+ "contentType": "snapshots",
222
+ "mappingId": "opx-people-abstract"
283
223
  }
284
224
  ]
225
+ }
226
+ ],
227
+ "union": false,
228
+ "notes": "People abstract \u2194 people OT 1:1. Inside/outside org is concept.identifiers.primary.kind (employeeId | externalPersonId), not a second OT."
229
+ },
230
+ {
231
+ "id": "WorkItems",
232
+ "name": "Work Items",
233
+ "meaning": "Units of operational work",
234
+ "category": "entity",
235
+ "properties": [
236
+ {
237
+ "id": "title",
238
+ "valueType": "string",
239
+ "required": true
240
+ },
241
+ {
242
+ "id": "status",
243
+ "valueType": "string",
244
+ "required": true
285
245
  },
286
246
  {
287
- "objectType": "contractors",
247
+ "id": "priority",
248
+ "valueType": "string",
249
+ "required": false
250
+ }
251
+ ],
252
+ "members": [
253
+ {
254
+ "objectType": "work-items",
288
255
  "contentType": "snapshots",
289
256
  "properties": [
290
257
  {
291
258
  "abstractProperty": "title",
292
259
  "contentType": "snapshots",
293
- "mappingId": "opx-people-abstract-contractors"
260
+ "propertyPath": "data.title",
261
+ "concreteValueType": "string"
294
262
  },
295
263
  {
296
- "abstractProperty": "role",
264
+ "abstractProperty": "status",
297
265
  "contentType": "snapshots",
298
- "mappingId": "opx-people-abstract-contractors"
266
+ "propertyPath": "data.status",
267
+ "concreteValueType": "string"
299
268
  },
300
269
  {
301
- "abstractProperty": "lens",
270
+ "abstractProperty": "priority",
302
271
  "contentType": "snapshots",
303
- "mappingId": "opx-people-abstract-contractors"
272
+ "propertyPath": "data.priority",
273
+ "concreteValueType": "string"
304
274
  }
305
275
  ]
306
276
  }
307
- ]
308
- },
309
- {
310
- "id": "work-items-concrete",
311
- "abstractType": "WorkItems",
312
- "concreteObjectTypes": [
313
- "work-items"
314
277
  ],
315
278
  "union": false
316
279
  },
317
280
  {
318
- "id": "procedures-concrete",
319
- "abstractType": "Procedures",
320
- "concreteObjectTypes": [
321
- "procedures"
281
+ "id": "Playbooks",
282
+ "name": "Playbooks",
283
+ "meaning": "Reusable operational knowledge / playbooks",
284
+ "category": "knowledge",
285
+ "properties": [
286
+ {
287
+ "id": "title",
288
+ "valueType": "string",
289
+ "required": true
290
+ },
291
+ {
292
+ "id": "body",
293
+ "valueType": "string",
294
+ "required": true
295
+ },
296
+ {
297
+ "id": "contentHash",
298
+ "valueType": "string",
299
+ "required": false
300
+ }
301
+ ],
302
+ "members": [
303
+ {
304
+ "objectType": "playbooks",
305
+ "contentType": "snapshots",
306
+ "properties": [
307
+ {
308
+ "abstractProperty": "title",
309
+ "contentType": "snapshots",
310
+ "propertyPath": "data.name",
311
+ "concreteValueType": "string"
312
+ },
313
+ {
314
+ "abstractProperty": "body",
315
+ "contentType": "snapshots",
316
+ "propertyPath": "data.body",
317
+ "concreteValueType": "string"
318
+ },
319
+ {
320
+ "abstractProperty": "contentHash",
321
+ "contentType": "snapshots",
322
+ "propertyPath": "data.contentHash",
323
+ "concreteValueType": "string"
324
+ }
325
+ ]
326
+ }
322
327
  ],
323
328
  "union": false
324
329
  },
325
330
  {
326
- "id": "activity-events-concrete",
327
- "abstractType": "ActivityEvents",
328
- "concreteObjectTypes": [
329
- "activity-events"
331
+ "id": "ActivityEvents",
332
+ "name": "Activity Events",
333
+ "meaning": "Progress and activity reports about work items",
334
+ "category": "event",
335
+ "properties": [
336
+ {
337
+ "id": "type",
338
+ "valueType": "string",
339
+ "required": true
340
+ },
341
+ {
342
+ "id": "message",
343
+ "valueType": "string",
344
+ "required": true
345
+ },
346
+ {
347
+ "id": "workItemId",
348
+ "valueType": "recordId",
349
+ "required": true
350
+ },
351
+ {
352
+ "id": "actorId",
353
+ "valueType": "recordId",
354
+ "required": false
355
+ },
356
+ {
357
+ "id": "occurredAt",
358
+ "valueType": "datetime",
359
+ "required": false
360
+ }
361
+ ],
362
+ "members": [
363
+ {
364
+ "objectType": "activity-events",
365
+ "contentType": "snapshots",
366
+ "properties": [
367
+ {
368
+ "abstractProperty": "type",
369
+ "contentType": "snapshots",
370
+ "propertyPath": "data.type",
371
+ "concreteValueType": "string"
372
+ },
373
+ {
374
+ "abstractProperty": "message",
375
+ "contentType": "snapshots",
376
+ "propertyPath": "data.message",
377
+ "concreteValueType": "string"
378
+ },
379
+ {
380
+ "abstractProperty": "workItemId",
381
+ "contentType": "snapshots",
382
+ "propertyPath": "data.workItemId",
383
+ "concreteValueType": "recordId"
384
+ },
385
+ {
386
+ "abstractProperty": "actorId",
387
+ "contentType": "snapshots",
388
+ "propertyPath": "data.actorId",
389
+ "concreteValueType": "recordId"
390
+ },
391
+ {
392
+ "abstractProperty": "occurredAt",
393
+ "contentType": "snapshots",
394
+ "propertyPath": "data.occurredAt",
395
+ "concreteValueType": "datetime"
396
+ }
397
+ ]
398
+ }
330
399
  ],
331
400
  "union": false
332
401
  }
333
402
  ],
403
+ "abstractBindings": [],
334
404
  "relationshipDefinitions": [
335
405
  {
336
406
  "id": "people-assigned-to-work-items",
337
407
  "name": "People assigned to work items",
338
- "meaning": "A person (employee or contractor) is assigned to perform a work item",
408
+ "meaning": "A person is assigned to perform a work item",
339
409
  "directionality": "directed",
340
410
  "from": {
341
411
  "abstractType": "People",
@@ -350,28 +420,28 @@
350
420
  "id": "from-source-assignee",
351
421
  "kind": "source-field",
352
422
  "sourcePath": "assigneeId",
353
- "notes": "opx-source work-items.assigneeId resolves across employees and contractors"
423
+ "notes": "opx-source work-items.assigneeId resolves to people OT (any identity kind)"
354
424
  }
355
425
  ]
356
426
  },
357
427
  {
358
- "id": "work-items-use-procedures",
359
- "name": "Work items use procedures",
360
- "meaning": "A work item follows one or more reusable procedures",
428
+ "id": "work-items-use-playbooks",
429
+ "name": "Work items use playbooks",
430
+ "meaning": "A work item follows one or more reusable playbooks",
361
431
  "directionality": "directed",
362
432
  "from": {
363
433
  "abstractType": "WorkItems",
364
- "path": "usedProcedures"
434
+ "path": "usedPlaybooks"
365
435
  },
366
436
  "to": {
367
- "abstractType": "Procedures",
437
+ "abstractType": "Playbooks",
368
438
  "path": "usedByWorkItems"
369
439
  },
370
440
  "discoveryRules": [
371
441
  {
372
- "id": "from-source-procedure-ids",
442
+ "id": "from-source-playbook-ids",
373
443
  "kind": "source-field",
374
- "sourcePath": "procedureIds"
444
+ "sourcePath": "playbookIds"
375
445
  }
376
446
  ]
377
447
  },
@@ -442,12 +512,12 @@
442
512
  "mappings": [
443
513
  {
444
514
  "id": "opx-source-employees-to-raw",
515
+ "purpose": "source",
445
516
  "sourceId": "opx-source",
446
517
  "endpoint": "/employees",
447
- "objectType": "employees",
518
+ "objectType": "people",
448
519
  "contentType": "raw",
449
520
  "mode": "knowledge",
450
- "purpose": "source",
451
521
  "map": {
452
522
  "recordId": {
453
523
  "op": "path",
@@ -456,7 +526,7 @@
456
526
  },
457
527
  "objectType": {
458
528
  "op": "constant",
459
- "value": "employees"
529
+ "value": "people"
460
530
  },
461
531
  "data.displayName": {
462
532
  "op": "path",
@@ -479,13 +549,13 @@
479
549
  }
480
550
  },
481
551
  {
482
- "id": "opx-source-contractors-to-raw",
552
+ "id": "opx-source-external-people-to-raw",
553
+ "purpose": "source",
483
554
  "sourceId": "opx-source",
484
- "endpoint": "/contractors",
485
- "objectType": "contractors",
555
+ "endpoint": "/external-people",
556
+ "objectType": "people",
486
557
  "contentType": "raw",
487
558
  "mode": "knowledge",
488
- "purpose": "source",
489
559
  "map": {
490
560
  "recordId": {
491
561
  "op": "path",
@@ -494,7 +564,7 @@
494
564
  },
495
565
  "objectType": {
496
566
  "op": "constant",
497
- "value": "contractors"
567
+ "value": "people"
498
568
  },
499
569
  "data.displayName": {
500
570
  "op": "path",
@@ -506,9 +576,9 @@
506
576
  "path": "role",
507
577
  "required": true
508
578
  },
509
- "data.vendor": {
579
+ "data.organization": {
510
580
  "op": "path",
511
- "path": "vendor"
581
+ "path": "organization"
512
582
  },
513
583
  "data.sourceId": {
514
584
  "op": "path",
@@ -518,12 +588,12 @@
518
588
  },
519
589
  {
520
590
  "id": "opx-source-work-items-to-raw",
591
+ "purpose": "source",
521
592
  "sourceId": "opx-source",
522
593
  "endpoint": "/work-items",
523
594
  "objectType": "work-items",
524
595
  "contentType": "raw",
525
596
  "mode": "knowledge",
526
- "purpose": "source",
527
597
  "map": {
528
598
  "data": {
529
599
  "op": "path",
@@ -533,13 +603,13 @@
533
603
  },
534
604
  {
535
605
  "id": "opx-source-work-item-context",
606
+ "purpose": "source",
536
607
  "sourceId": "opx-source",
537
608
  "endpoint": "/work-items/:id/context",
538
609
  "objectType": "work-items",
539
610
  "contentType": "context",
540
611
  "mode": "context",
541
612
  "trigger": "on-demand",
542
- "purpose": "source",
543
613
  "map": {
544
614
  "data": {
545
615
  "op": "path",
@@ -548,10 +618,10 @@
548
618
  }
549
619
  },
550
620
  {
551
- "id": "opx-people-abstract-employees",
621
+ "id": "opx-people-abstract",
552
622
  "purpose": "abstract",
553
623
  "abstractType": "People",
554
- "objectType": "employees",
624
+ "objectType": "people",
555
625
  "contentType": "snapshots",
556
626
  "map": {
557
627
  "title": {
@@ -572,51 +642,6 @@
572
642
  "op": "constant",
573
643
  "value": "people"
574
644
  }
575
- },
576
- "reverse": {
577
- "title": {
578
- "expr": {
579
- "op": "path",
580
- "path": "title"
581
- },
582
- "targetPath": "data.displayName"
583
- }
584
- }
585
- },
586
- {
587
- "id": "opx-people-abstract-contractors",
588
- "purpose": "abstract",
589
- "abstractType": "People",
590
- "objectType": "contractors",
591
- "contentType": "snapshots",
592
- "map": {
593
- "title": {
594
- "expr": {
595
- "op": "path",
596
- "path": "data.displayName"
597
- },
598
- "required": true
599
- },
600
- "role": {
601
- "expr": {
602
- "op": "path",
603
- "path": "data.role"
604
- },
605
- "required": true
606
- },
607
- "lens": {
608
- "op": "constant",
609
- "value": "people"
610
- }
611
- },
612
- "reverse": {
613
- "title": {
614
- "expr": {
615
- "op": "path",
616
- "path": "title"
617
- },
618
- "targetPath": "data.displayName"
619
- }
620
645
  }
621
646
  },
622
647
  {
@@ -649,7 +674,7 @@
649
674
  {
650
675
  "id": "opx-work-items-list",
651
676
  "kind": "list",
652
- "objectType": "work-items",
677
+ "abstractType": "WorkItems",
653
678
  "title": "Work items",
654
679
  "columns": [
655
680
  "concept.title",
@@ -660,7 +685,7 @@
660
685
  {
661
686
  "id": "opx-work-items-item",
662
687
  "kind": "item",
663
- "objectType": "work-items",
688
+ "abstractType": "WorkItems",
664
689
  "title": "Work item",
665
690
  "sections": [
666
691
  "concept",
@@ -684,26 +709,22 @@
684
709
  {
685
710
  "id": "opx-work-item-expand-people",
686
711
  "kind": "relationship-expansion",
687
- "objectType": "work-items",
712
+ "abstractType": "WorkItems",
688
713
  "relationshipDefinitionId": "people-assigned-to-work-items",
689
714
  "direction": "to-from"
690
715
  },
691
716
  {
692
717
  "id": "project-opx-work-items-list",
693
718
  "kind": "list",
694
- "objectType": "work-items",
695
719
  "title": "Project work items",
696
- "extends": "opx-work-items-list",
697
- "columns": [
698
- "concept.title",
699
- "data.status"
700
- ]
720
+ "abstractType": "WorkItems",
721
+ "extends": "opx-work-items-list"
701
722
  }
702
723
  ],
703
724
  "writes": [
704
725
  {
705
- "id": "opx-employees-snapshots",
706
- "objectType": "employees",
726
+ "id": "opx-people-employee-snapshots",
727
+ "objectType": "people",
707
728
  "contentType": "snapshots",
708
729
  "identity": {
709
730
  "primaryKind": "employeeId",
@@ -711,11 +732,11 @@
711
732
  }
712
733
  },
713
734
  {
714
- "id": "opx-contractors-snapshots",
715
- "objectType": "contractors",
735
+ "id": "opx-people-external-snapshots",
736
+ "objectType": "people",
716
737
  "contentType": "snapshots",
717
738
  "identity": {
718
- "primaryKind": "contractorId",
739
+ "primaryKind": "externalPersonId",
719
740
  "issuer": "opx-source"
720
741
  }
721
742
  },
@@ -729,11 +750,11 @@
729
750
  }
730
751
  },
731
752
  {
732
- "id": "opx-procedures-snapshots",
733
- "objectType": "procedures",
753
+ "id": "opx-playbooks-snapshots",
754
+ "objectType": "playbooks",
734
755
  "contentType": "snapshots",
735
756
  "identity": {
736
- "primaryKind": "procedureId",
757
+ "primaryKind": "playbookId",
737
758
  "issuer": "opx-source"
738
759
  }
739
760
  },
@@ -751,66 +772,140 @@
751
772
  {
752
773
  "id": "opx-source",
753
774
  "name": "Opx-service",
754
- "kind": "rest-fixture",
775
+ "kind": "rest",
755
776
  "baseUrlEnv": "OPX_SOURCE_URL",
756
777
  "defaultBaseUrl": "http://127.0.0.1:5102",
757
778
  "credentialRef": "opx-source-local",
779
+ "connectorRef": "opx-rest",
758
780
  "endpoints": [
759
781
  "/employees",
760
- "/contractors",
782
+ "/external-people",
761
783
  "/work-items",
762
784
  "/activity-events",
763
- "/procedures",
785
+ "/playbooks",
764
786
  "/work-items/:id/context"
765
- ]
766
- }
767
- ],
768
- "services": [
769
- {
770
- "id": "opx-normalize",
771
- "name": "Normalize records",
772
- "description": "Logical normalize capability for ops knowledge pull",
773
- "capabilities": [
774
- "normalize"
775
787
  ],
776
- "inputs": [
777
- {
778
- "id": "raw-records",
779
- "schemaRef": "memorix-record/raw"
788
+ "pagination": {
789
+ "style": "cursor",
790
+ "defaultPageSize": 50
791
+ },
792
+ "retention": {
793
+ "context": {
794
+ "ttlSeconds": 3600,
795
+ "discardOnWorkCompletion": true
780
796
  }
781
- ],
782
- "outputs": [
797
+ },
798
+ "routes": [
799
+ {
800
+ "endpoint": "/playbooks",
801
+ "objectType": "playbooks",
802
+ "dataCategory": "knowledge",
803
+ "identityPath": "id",
804
+ "primaryKind": "playbookId",
805
+ "modes": [
806
+ "knowledge"
807
+ ],
808
+ "pageSize": 2,
809
+ "checkpoint": {
810
+ "method": "cursor"
811
+ }
812
+ },
813
+ {
814
+ "endpoint": "/work-items/:id/context",
815
+ "objectType": "work-items",
816
+ "dataCategory": "entity",
817
+ "identityPath": "workItemId",
818
+ "primaryKind": "workItemId",
819
+ "modes": [
820
+ "context"
821
+ ],
822
+ "checkpoint": {
823
+ "method": "cursor"
824
+ }
825
+ },
783
826
  {
784
- "id": "normalized-records",
785
- "schemaRef": "memorix-record/snapshots"
827
+ "endpoint": "/work-items",
828
+ "objectType": "work-items",
829
+ "dataCategory": "entity",
830
+ "identityPath": "id",
831
+ "primaryKind": "workItemId",
832
+ "modes": [
833
+ "knowledge"
834
+ ],
835
+ "checkpoint": {
836
+ "method": "cursor"
837
+ }
838
+ },
839
+ {
840
+ "endpoint": "/employees",
841
+ "objectType": "people",
842
+ "dataCategory": "entity",
843
+ "identityPath": "id",
844
+ "primaryKind": "employeeId",
845
+ "modes": [
846
+ "knowledge"
847
+ ],
848
+ "checkpoint": {
849
+ "method": "cursor"
850
+ }
851
+ },
852
+ {
853
+ "endpoint": "/external-people",
854
+ "objectType": "people",
855
+ "dataCategory": "entity",
856
+ "identityPath": "id",
857
+ "primaryKind": "externalPersonId",
858
+ "modes": [
859
+ "knowledge"
860
+ ],
861
+ "checkpoint": {
862
+ "method": "cursor"
863
+ }
864
+ },
865
+ {
866
+ "endpoint": "/activity-events",
867
+ "objectType": "activity-events",
868
+ "dataCategory": "event",
869
+ "identityPath": "id",
870
+ "primaryKind": "activityEventId",
871
+ "modes": [
872
+ "knowledge"
873
+ ],
874
+ "checkpoint": {
875
+ "method": "cursor"
876
+ }
786
877
  }
787
- ],
788
- "invocation": {
789
- "kind": "worker",
790
- "operation": "normalize"
791
- }
792
- },
878
+ ]
879
+ }
880
+ ],
881
+ "services": [
793
882
  {
794
- "id": "opx-completion",
795
- "name": "Field completion",
883
+ "id": "opx-enrich-priority",
884
+ "name": "Enrich work-item priority",
885
+ "description": "Deterministic priority score draft for WorkItems. Returns a patch plan \u2014 does not persist. Pipeline write-record applies the revision-safe mutation on the concrete member.",
886
+ "role": "agent",
796
887
  "capabilities": [
797
- "completion"
888
+ "enrich"
798
889
  ],
799
890
  "inputs": [
800
891
  {
801
892
  "id": "snapshot",
802
- "schemaRef": "memorix-record/snapshots"
893
+ "abstractType": "WorkItems",
894
+ "path": "snapshots",
895
+ "description": "Current WorkItems projection at a captured revision"
803
896
  }
804
897
  ],
805
898
  "outputs": [
806
899
  {
807
- "id": "completed",
808
- "schemaRef": "memorix-record/snapshots"
900
+ "id": "patch-plan",
901
+ "abstractType": "WorkItems",
902
+ "path": "snapshots",
903
+ "description": "Draft patch / scored fields for the writer step"
809
904
  }
810
905
  ],
811
906
  "invocation": {
812
907
  "kind": "worker",
813
- "operation": "complete"
908
+ "operation": "enrich-priority"
814
909
  }
815
910
  }
816
911
  ],
@@ -837,21 +932,6 @@
837
932
  {
838
933
  "id": "promote",
839
934
  "kind": "promote-snapshots"
840
- },
841
- {
842
- "id": "normalize-svc",
843
- "kind": "invoke-service",
844
- "serviceId": "opx-normalize"
845
- },
846
- {
847
- "id": "complete",
848
- "kind": "completion",
849
- "serviceId": "opx-completion",
850
- "mappingId": "opx-work-items-completion-priority",
851
- "completionPolicy": {
852
- "mode": "fill-missing",
853
- "maxFields": 20
854
- }
855
935
  }
856
936
  ]
857
937
  },
@@ -930,15 +1010,27 @@
930
1010
  "contentType": "workflow"
931
1011
  }
932
1012
  ]
933
- }
934
- ],
935
- "schedules": [
1013
+ },
936
1014
  {
937
- "id": "opx-knowledge-hourly",
938
- "pipelineId": "opx-knowledge-pull",
939
- "cron": "0 * * * *",
940
- "timezone": "UTC",
941
- "enabled": true
1015
+ "id": "opx-enrich-priority",
1016
+ "name": "Enrich WI priority (draft then write)",
1017
+ "trigger": "explicit",
1018
+ "description": "Capture snapshot \u2192 enrich service (opx-enrich-priority) \u2192 write-record. Runtime v2 uses stepKind enrich + serviceId.",
1019
+ "steps": [
1020
+ {
1021
+ "id": "enrich",
1022
+ "kind": "enrich",
1023
+ "serviceId": "opx-enrich-priority"
1024
+ },
1025
+ {
1026
+ "id": "write",
1027
+ "kind": "write-record",
1028
+ "contentType": "snapshots"
1029
+ }
1030
+ ]
942
1031
  }
943
- ]
1032
+ ],
1033
+ "schedules": [],
1034
+ "kindDeclarations": [],
1035
+ "extensions": {}
944
1036
  }