@x12i/memorix-metadata 3.2.0 → 3.2.3

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 (38) hide show
  1. package/README.md +86 -86
  2. package/dist/index.d.ts +1 -0
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +1 -0
  5. package/dist/index.js.map +1 -1
  6. package/dist/platform-interfaces.d.ts +29 -0
  7. package/dist/platform-interfaces.d.ts.map +1 -0
  8. package/dist/platform-interfaces.js +53 -0
  9. package/dist/platform-interfaces.js.map +1 -0
  10. package/dist/resolve.d.ts.map +1 -1
  11. package/dist/resolve.js +111 -0
  12. package/dist/resolve.js.map +1 -1
  13. package/dist/types.d.ts +47 -0
  14. package/dist/types.d.ts.map +1 -1
  15. package/dist/validate.d.ts.map +1 -1
  16. package/dist/validate.js +19 -0
  17. package/dist/validate.js.map +1 -1
  18. package/examples/custom-kinds/acme-ui-tabs.pack.json +62 -62
  19. package/examples/invalid/agent-classification.json +709 -709
  20. package/examples/invalid/broken-binding.json +688 -688
  21. package/examples/invalid/completion-mapping-with-exec-policy.json +659 -659
  22. package/examples/invalid/missing-parent.json +708 -708
  23. package/examples/invalid/operational-kind-root.json +720 -720
  24. package/examples/invalid/pipeline-unknown-service.json +611 -611
  25. package/examples/invalid/relationship-missing-rules.json +624 -624
  26. package/examples/invalid/relationship-with-storage.json +631 -631
  27. package/examples/invalid/service-with-secrets.json +679 -679
  28. package/examples/knowx/normalized/pack.json +338 -11
  29. package/examples/opx/normalized/pack.json +265 -7
  30. package/examples/opx/raw/abstract-types.json +244 -244
  31. package/examples/opx/raw/agents.json +33 -33
  32. package/examples/opx/raw/object-types.json +101 -101
  33. package/examples/opx/raw/pipelines-and-sources.json +264 -233
  34. package/examples/opx/raw/relationship-definitions.json +80 -80
  35. package/examples/opx/raw/view-definitions.json +32 -32
  36. package/examples/opx/raw/write-and-source-mappings.json +223 -223
  37. package/examples/project-opx/normalized/pack.json +1036 -1036
  38. package/package.json +48 -48
@@ -1,1036 +1,1036 @@
1
- {
2
- "format": "memorix-metadata/1",
3
- "agentId": "project-opx",
4
- "version": "0.1.0",
5
- "agents": [
6
- {
7
- "id": "opx",
8
- "name": "Operations (generic parent)",
9
- "description": "Complete generic parent agent for ordinary operational work. Permanent Memorix acceptance pack.",
10
- "parentIds": [],
11
- "parentId": null
12
- },
13
- {
14
- "id": "project-opx",
15
- "name": "Project Operations (child of opx)",
16
- "description": "Inheritance smoke agent. Extends opx without replacing core definitions.",
17
- "parentIds": [
18
- "opx"
19
- ],
20
- "parentId": "opx"
21
- }
22
- ],
23
- "objectTypes": [
24
- {
25
- "id": "people",
26
- "name": "People",
27
- "dataCategory": "entity",
28
- "abstractTypes": [
29
- "People"
30
- ],
31
- "notes": "Single people OT. Inside vs outside org is identity kind (concept.identifiers.primary.kind): employeeId | externalPersonId \u2014 not separate object types.",
32
- "contentTypes": [
33
- {
34
- "id": "raw",
35
- "required": true,
36
- "requiredReason": "Landed provider-native payload; identity and lineage depend on it."
37
- },
38
- {
39
- "id": "snapshots",
40
- "required": true,
41
- "requiredReason": "Canonical composed person view used by queries and abstracts."
42
- },
43
- {
44
- "id": "discovery",
45
- "discriminator": {
46
- "path": "data.discoveryType",
47
- "required": false,
48
- "defaultValue": "default"
49
- }
50
- },
51
- {
52
- "id": "analysis",
53
- "discriminator": {
54
- "path": "data.analysisType",
55
- "required": false,
56
- "defaultValue": "default"
57
- }
58
- },
59
- {
60
- "id": "relationships",
61
- "notes": "Candidate store shape until Gate G4"
62
- }
63
- ]
64
- },
65
- {
66
- "id": "work-items",
67
- "name": "Work Items",
68
- "dataCategory": "entity",
69
- "abstractTypes": [
70
- "WorkItems"
71
- ],
72
- "contentTypes": [
73
- {
74
- "id": "raw"
75
- },
76
- {
77
- "id": "snapshots"
78
- },
79
- {
80
- "id": "discovery",
81
- "discriminator": {
82
- "path": "data.discoveryType",
83
- "required": false
84
- }
85
- },
86
- {
87
- "id": "analysis",
88
- "discriminator": {
89
- "path": "data.analysisType",
90
- "required": false,
91
- "defaultValue": "delivery-risk"
92
- }
93
- },
94
- {
95
- "id": "decisions",
96
- "discriminator": {
97
- "path": "data.decisionType",
98
- "required": false,
99
- "defaultValue": "priority"
100
- }
101
- },
102
- {
103
- "id": "workflow"
104
- },
105
- {
106
- "id": "context",
107
- "retention": "work-scoped-ttl"
108
- },
109
- {
110
- "id": "relationships"
111
- }
112
- ],
113
- "snapshotBuckets": {
114
- "analytics": "optional",
115
- "enrichment": "optional",
116
- "insights": "optional"
117
- }
118
- },
119
- {
120
- "id": "playbooks",
121
- "name": "Playbooks",
122
- "dataCategory": "knowledge",
123
- "abstractTypes": [
124
- "Playbooks"
125
- ],
126
- "contentTypes": [
127
- {
128
- "id": "raw"
129
- },
130
- {
131
- "id": "snapshots",
132
- "notes": "Persistent knowledge content"
133
- },
134
- {
135
- "id": "relationships"
136
- }
137
- ],
138
- "retention": "persistent-knowledge"
139
- },
140
- {
141
- "id": "activity-events",
142
- "name": "Activity Events",
143
- "dataCategory": "event",
144
- "abstractTypes": [
145
- "ActivityEvents"
146
- ],
147
- "contentTypes": [
148
- {
149
- "id": "raw"
150
- },
151
- {
152
- "id": "snapshots",
153
- "notes": "Normalized event content"
154
- },
155
- {
156
- "id": "relationships"
157
- }
158
- ]
159
- }
160
- ],
161
- "abstractTypes": [
162
- {
163
- "id": "People",
164
- "name": "People",
165
- "meaning": "People who perform operational work \u2014 inside the org (employeeId) or outside (externalPersonId), distinguished by identity kind",
166
- "category": "entity",
167
- "properties": [
168
- {
169
- "id": "title",
170
- "valueType": "string",
171
- "required": true
172
- },
173
- {
174
- "id": "role",
175
- "valueType": "string",
176
- "required": true
177
- },
178
- {
179
- "id": "lens",
180
- "valueType": "string",
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
192
- }
193
- ],
194
- "members": [
195
- {
196
- "objectType": "people",
197
- "contentType": "snapshots",
198
- "properties": [
199
- {
200
- "abstractProperty": "title",
201
- "contentType": "snapshots",
202
- "mappingId": "opx-people-abstract"
203
- },
204
- {
205
- "abstractProperty": "role",
206
- "contentType": "snapshots",
207
- "mappingId": "opx-people-abstract"
208
- },
209
- {
210
- "abstractProperty": "lens",
211
- "contentType": "snapshots",
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"
223
- }
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
245
- },
246
- {
247
- "id": "priority",
248
- "valueType": "string",
249
- "required": false
250
- }
251
- ],
252
- "members": [
253
- {
254
- "objectType": "work-items",
255
- "contentType": "snapshots",
256
- "properties": [
257
- {
258
- "abstractProperty": "title",
259
- "contentType": "snapshots",
260
- "propertyPath": "data.title",
261
- "concreteValueType": "string"
262
- },
263
- {
264
- "abstractProperty": "status",
265
- "contentType": "snapshots",
266
- "propertyPath": "data.status",
267
- "concreteValueType": "string"
268
- },
269
- {
270
- "abstractProperty": "priority",
271
- "contentType": "snapshots",
272
- "propertyPath": "data.priority",
273
- "concreteValueType": "string"
274
- }
275
- ]
276
- }
277
- ],
278
- "union": false
279
- },
280
- {
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
- }
327
- ],
328
- "union": false
329
- },
330
- {
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
- }
399
- ],
400
- "union": false
401
- }
402
- ],
403
- "abstractBindings": [],
404
- "relationshipDefinitions": [
405
- {
406
- "id": "people-assigned-to-work-items",
407
- "name": "People assigned to work items",
408
- "meaning": "A person is assigned to perform a work item",
409
- "directionality": "directed",
410
- "from": {
411
- "abstractType": "People",
412
- "path": "assignedWorkItems"
413
- },
414
- "to": {
415
- "abstractType": "WorkItems",
416
- "path": "assignedPeople"
417
- },
418
- "discoveryRules": [
419
- {
420
- "id": "from-source-assignee",
421
- "kind": "source-field",
422
- "sourcePath": "assigneeId",
423
- "notes": "opx-source work-items.assigneeId resolves to people OT (any identity kind)"
424
- }
425
- ]
426
- },
427
- {
428
- "id": "work-items-use-playbooks",
429
- "name": "Work items use playbooks",
430
- "meaning": "A work item follows one or more reusable playbooks",
431
- "directionality": "directed",
432
- "from": {
433
- "abstractType": "WorkItems",
434
- "path": "usedPlaybooks"
435
- },
436
- "to": {
437
- "abstractType": "Playbooks",
438
- "path": "usedByWorkItems"
439
- },
440
- "discoveryRules": [
441
- {
442
- "id": "from-source-playbook-ids",
443
- "kind": "source-field",
444
- "sourcePath": "playbookIds"
445
- }
446
- ]
447
- },
448
- {
449
- "id": "activity-events-about-work-items",
450
- "name": "Activity events about work items",
451
- "meaning": "An activity event reports progress on a work item",
452
- "directionality": "directed",
453
- "from": {
454
- "abstractType": "ActivityEvents",
455
- "path": "aboutWorkItems"
456
- },
457
- "to": {
458
- "abstractType": "WorkItems",
459
- "path": "activityEvents"
460
- },
461
- "discoveryRules": [
462
- {
463
- "id": "from-source-work-item-id",
464
- "kind": "source-field",
465
- "sourcePath": "workItemId"
466
- }
467
- ]
468
- },
469
- {
470
- "id": "work-items-depend-on-work-items",
471
- "name": "Work items depend on work items",
472
- "meaning": "A work item cannot complete until another work item completes",
473
- "directionality": "directed",
474
- "from": {
475
- "abstractType": "WorkItems",
476
- "path": "dependsOn"
477
- },
478
- "to": {
479
- "abstractType": "WorkItems",
480
- "path": "dependedOnBy"
481
- },
482
- "discoveryRules": [
483
- {
484
- "id": "from-source-depends-on",
485
- "kind": "source-field",
486
- "sourcePath": "dependsOnIds"
487
- }
488
- ]
489
- },
490
- {
491
- "id": "people-collaborate-with-people",
492
- "name": "People collaborate with people",
493
- "meaning": "Two people collaborate on operational work",
494
- "directionality": "undirected",
495
- "from": {
496
- "abstractType": "People",
497
- "path": "collaborators"
498
- },
499
- "to": {
500
- "abstractType": "People",
501
- "path": "collaborators"
502
- },
503
- "discoveryRules": [
504
- {
505
- "id": "from-source-collaborator-ids",
506
- "kind": "source-field",
507
- "sourcePath": "collaboratorIds"
508
- }
509
- ]
510
- }
511
- ],
512
- "mappings": [
513
- {
514
- "id": "opx-source-employees-to-raw",
515
- "purpose": "source",
516
- "sourceId": "opx-source",
517
- "endpoint": "/employees",
518
- "objectType": "people",
519
- "contentType": "raw",
520
- "mode": "knowledge",
521
- "map": {
522
- "recordId": {
523
- "op": "path",
524
- "path": "id",
525
- "required": true
526
- },
527
- "objectType": {
528
- "op": "constant",
529
- "value": "people"
530
- },
531
- "data.displayName": {
532
- "op": "path",
533
- "path": "name",
534
- "required": true
535
- },
536
- "data.role": {
537
- "op": "path",
538
- "path": "role",
539
- "required": true
540
- },
541
- "data.email": {
542
- "op": "path",
543
- "path": "email"
544
- },
545
- "data.sourceId": {
546
- "op": "path",
547
- "path": "id"
548
- }
549
- }
550
- },
551
- {
552
- "id": "opx-source-external-people-to-raw",
553
- "purpose": "source",
554
- "sourceId": "opx-source",
555
- "endpoint": "/external-people",
556
- "objectType": "people",
557
- "contentType": "raw",
558
- "mode": "knowledge",
559
- "map": {
560
- "recordId": {
561
- "op": "path",
562
- "path": "id",
563
- "required": true
564
- },
565
- "objectType": {
566
- "op": "constant",
567
- "value": "people"
568
- },
569
- "data.displayName": {
570
- "op": "path",
571
- "path": "name",
572
- "required": true
573
- },
574
- "data.role": {
575
- "op": "path",
576
- "path": "role",
577
- "required": true
578
- },
579
- "data.organization": {
580
- "op": "path",
581
- "path": "organization"
582
- },
583
- "data.sourceId": {
584
- "op": "path",
585
- "path": "id"
586
- }
587
- }
588
- },
589
- {
590
- "id": "opx-source-work-items-to-raw",
591
- "purpose": "source",
592
- "sourceId": "opx-source",
593
- "endpoint": "/work-items",
594
- "objectType": "work-items",
595
- "contentType": "raw",
596
- "mode": "knowledge",
597
- "map": {
598
- "data": {
599
- "op": "path",
600
- "path": "$"
601
- }
602
- }
603
- },
604
- {
605
- "id": "opx-source-work-item-context",
606
- "purpose": "source",
607
- "sourceId": "opx-source",
608
- "endpoint": "/work-items/:id/context",
609
- "objectType": "work-items",
610
- "contentType": "context",
611
- "mode": "context",
612
- "trigger": "on-demand",
613
- "map": {
614
- "data": {
615
- "op": "path",
616
- "path": "$"
617
- }
618
- }
619
- },
620
- {
621
- "id": "opx-people-abstract",
622
- "purpose": "abstract",
623
- "abstractType": "People",
624
- "objectType": "people",
625
- "contentType": "snapshots",
626
- "map": {
627
- "title": {
628
- "expr": {
629
- "op": "path",
630
- "path": "data.displayName"
631
- },
632
- "required": true
633
- },
634
- "role": {
635
- "expr": {
636
- "op": "path",
637
- "path": "data.role"
638
- },
639
- "required": true
640
- },
641
- "lens": {
642
- "op": "constant",
643
- "value": "people"
644
- }
645
- }
646
- },
647
- {
648
- "id": "opx-work-items-completion-priority",
649
- "purpose": "completion",
650
- "objectType": "work-items",
651
- "contentType": "snapshots",
652
- "map": {
653
- "data.priority": {
654
- "op": "coalesce",
655
- "exprs": [
656
- {
657
- "op": "path",
658
- "path": "priority"
659
- },
660
- {
661
- "op": "constant",
662
- "value": "normal"
663
- }
664
- ]
665
- },
666
- "data.title": {
667
- "op": "path",
668
- "path": "title"
669
- }
670
- }
671
- }
672
- ],
673
- "views": [
674
- {
675
- "id": "opx-work-items-list",
676
- "kind": "list",
677
- "abstractType": "WorkItems",
678
- "title": "Work items",
679
- "columns": [
680
- "concept.title",
681
- "data.status",
682
- "data.priority"
683
- ]
684
- },
685
- {
686
- "id": "opx-work-items-item",
687
- "kind": "item",
688
- "abstractType": "WorkItems",
689
- "title": "Work item",
690
- "sections": [
691
- "concept",
692
- "data",
693
- "workflow",
694
- "analysis",
695
- "decisions"
696
- ]
697
- },
698
- {
699
- "id": "opx-people-list",
700
- "kind": "list",
701
- "abstractType": "People",
702
- "title": "People",
703
- "columns": [
704
- "concept.title",
705
- "objectType",
706
- "data.role"
707
- ]
708
- },
709
- {
710
- "id": "opx-work-item-expand-people",
711
- "kind": "relationship-expansion",
712
- "abstractType": "WorkItems",
713
- "relationshipDefinitionId": "people-assigned-to-work-items",
714
- "direction": "to-from"
715
- },
716
- {
717
- "id": "project-opx-work-items-list",
718
- "kind": "list",
719
- "title": "Project work items",
720
- "abstractType": "WorkItems",
721
- "extends": "opx-work-items-list"
722
- }
723
- ],
724
- "writes": [
725
- {
726
- "id": "opx-people-employee-snapshots",
727
- "objectType": "people",
728
- "contentType": "snapshots",
729
- "identity": {
730
- "primaryKind": "employeeId",
731
- "issuer": "opx-source"
732
- }
733
- },
734
- {
735
- "id": "opx-people-external-snapshots",
736
- "objectType": "people",
737
- "contentType": "snapshots",
738
- "identity": {
739
- "primaryKind": "externalPersonId",
740
- "issuer": "opx-source"
741
- }
742
- },
743
- {
744
- "id": "opx-work-items-snapshots",
745
- "objectType": "work-items",
746
- "contentType": "snapshots",
747
- "identity": {
748
- "primaryKind": "workItemId",
749
- "issuer": "opx-source"
750
- }
751
- },
752
- {
753
- "id": "opx-playbooks-snapshots",
754
- "objectType": "playbooks",
755
- "contentType": "snapshots",
756
- "identity": {
757
- "primaryKind": "playbookId",
758
- "issuer": "opx-source"
759
- }
760
- },
761
- {
762
- "id": "opx-activity-events-snapshots",
763
- "objectType": "activity-events",
764
- "contentType": "snapshots",
765
- "identity": {
766
- "primaryKind": "activityEventId",
767
- "issuer": "opx-source"
768
- }
769
- }
770
- ],
771
- "sources": [
772
- {
773
- "id": "opx-source",
774
- "name": "Opx-service",
775
- "kind": "rest",
776
- "baseUrlEnv": "OPX_SOURCE_URL",
777
- "defaultBaseUrl": "http://127.0.0.1:5102",
778
- "credentialRef": "opx-source-local",
779
- "connectorRef": "opx-rest",
780
- "endpoints": [
781
- "/employees",
782
- "/external-people",
783
- "/work-items",
784
- "/activity-events",
785
- "/playbooks",
786
- "/work-items/:id/context"
787
- ],
788
- "pagination": {
789
- "style": "cursor",
790
- "defaultPageSize": 50
791
- },
792
- "retention": {
793
- "context": {
794
- "ttlSeconds": 3600,
795
- "discardOnWorkCompletion": true
796
- }
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
- },
826
- {
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
- }
877
- }
878
- ]
879
- }
880
- ],
881
- "services": [
882
- {
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",
887
- "capabilities": [
888
- "enrich"
889
- ],
890
- "inputs": [
891
- {
892
- "id": "snapshot",
893
- "abstractType": "WorkItems",
894
- "path": "snapshots",
895
- "description": "Current WorkItems projection at a captured revision"
896
- }
897
- ],
898
- "outputs": [
899
- {
900
- "id": "patch-plan",
901
- "abstractType": "WorkItems",
902
- "path": "snapshots",
903
- "description": "Draft patch / scored fields for the writer step"
904
- }
905
- ],
906
- "invocation": {
907
- "kind": "worker",
908
- "operation": "enrich-priority"
909
- }
910
- }
911
- ],
912
- "pipelines": [
913
- {
914
- "id": "opx-knowledge-pull",
915
- "name": "Scheduled knowledge pull from opx-source",
916
- "trigger": "scheduled",
917
- "mode": "knowledge",
918
- "steps": [
919
- {
920
- "id": "pull",
921
- "kind": "memory-pull",
922
- "sourceId": "opx-source"
923
- },
924
- {
925
- "id": "land-raw",
926
- "kind": "write-raw"
927
- },
928
- {
929
- "id": "normalize",
930
- "kind": "normalize"
931
- },
932
- {
933
- "id": "promote",
934
- "kind": "promote-snapshots"
935
- }
936
- ]
937
- },
938
- {
939
- "id": "opx-context-pull",
940
- "name": "On-demand work-item context pull",
941
- "trigger": "on-demand",
942
- "mode": "context",
943
- "steps": [
944
- {
945
- "id": "pull",
946
- "kind": "memory-pull",
947
- "sourceId": "opx-source"
948
- },
949
- {
950
- "id": "land-raw",
951
- "kind": "write-raw"
952
- },
953
- {
954
- "id": "normalize-context",
955
- "kind": "normalize-context"
956
- },
957
- {
958
- "id": "ttl",
959
- "kind": "apply-ttl"
960
- }
961
- ]
962
- },
963
- {
964
- "id": "opx-relationship-build",
965
- "name": "Discover and write lightweight relationships",
966
- "trigger": "explicit",
967
- "steps": [
968
- {
969
- "id": "discover",
970
- "kind": "relationship-discover"
971
- },
972
- {
973
- "id": "write",
974
- "kind": "relationship-write"
975
- },
976
- {
977
- "id": "verify",
978
- "kind": "relationship-verify"
979
- }
980
- ]
981
- },
982
- {
983
- "id": "opx-analysis",
984
- "name": "Work-item analysis sibling",
985
- "trigger": "explicit",
986
- "steps": [
987
- {
988
- "id": "analyze",
989
- "kind": "analysis"
990
- },
991
- {
992
- "id": "write-sibling",
993
- "kind": "write-content",
994
- "contentType": "analysis"
995
- }
996
- ]
997
- },
998
- {
999
- "id": "opx-workflow",
1000
- "name": "Work-item workflow sibling",
1001
- "trigger": "explicit",
1002
- "steps": [
1003
- {
1004
- "id": "sync-workflow",
1005
- "kind": "workflow-sync"
1006
- },
1007
- {
1008
- "id": "write-sibling",
1009
- "kind": "write-content",
1010
- "contentType": "workflow"
1011
- }
1012
- ]
1013
- },
1014
- {
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
- ]
1031
- }
1032
- ],
1033
- "schedules": [],
1034
- "kindDeclarations": [],
1035
- "extensions": {}
1036
- }
1
+ {
2
+ "format": "memorix-metadata/1",
3
+ "agentId": "project-opx",
4
+ "version": "0.1.0",
5
+ "agents": [
6
+ {
7
+ "id": "opx",
8
+ "name": "Operations (generic parent)",
9
+ "description": "Complete generic parent agent for ordinary operational work. Permanent Memorix acceptance pack.",
10
+ "parentIds": [],
11
+ "parentId": null
12
+ },
13
+ {
14
+ "id": "project-opx",
15
+ "name": "Project Operations (child of opx)",
16
+ "description": "Inheritance smoke agent. Extends opx without replacing core definitions.",
17
+ "parentIds": [
18
+ "opx"
19
+ ],
20
+ "parentId": "opx"
21
+ }
22
+ ],
23
+ "objectTypes": [
24
+ {
25
+ "id": "people",
26
+ "name": "People",
27
+ "dataCategory": "entity",
28
+ "abstractTypes": [
29
+ "People"
30
+ ],
31
+ "notes": "Single people OT. Inside vs outside org is identity kind (concept.identifiers.primary.kind): employeeId | externalPersonId \u2014 not separate object types.",
32
+ "contentTypes": [
33
+ {
34
+ "id": "raw",
35
+ "required": true,
36
+ "requiredReason": "Landed provider-native payload; identity and lineage depend on it."
37
+ },
38
+ {
39
+ "id": "snapshots",
40
+ "required": true,
41
+ "requiredReason": "Canonical composed person view used by queries and abstracts."
42
+ },
43
+ {
44
+ "id": "discovery",
45
+ "discriminator": {
46
+ "path": "data.discoveryType",
47
+ "required": false,
48
+ "defaultValue": "default"
49
+ }
50
+ },
51
+ {
52
+ "id": "analysis",
53
+ "discriminator": {
54
+ "path": "data.analysisType",
55
+ "required": false,
56
+ "defaultValue": "default"
57
+ }
58
+ },
59
+ {
60
+ "id": "relationships",
61
+ "notes": "Candidate store shape until Gate G4"
62
+ }
63
+ ]
64
+ },
65
+ {
66
+ "id": "work-items",
67
+ "name": "Work Items",
68
+ "dataCategory": "entity",
69
+ "abstractTypes": [
70
+ "WorkItems"
71
+ ],
72
+ "contentTypes": [
73
+ {
74
+ "id": "raw"
75
+ },
76
+ {
77
+ "id": "snapshots"
78
+ },
79
+ {
80
+ "id": "discovery",
81
+ "discriminator": {
82
+ "path": "data.discoveryType",
83
+ "required": false
84
+ }
85
+ },
86
+ {
87
+ "id": "analysis",
88
+ "discriminator": {
89
+ "path": "data.analysisType",
90
+ "required": false,
91
+ "defaultValue": "delivery-risk"
92
+ }
93
+ },
94
+ {
95
+ "id": "decisions",
96
+ "discriminator": {
97
+ "path": "data.decisionType",
98
+ "required": false,
99
+ "defaultValue": "priority"
100
+ }
101
+ },
102
+ {
103
+ "id": "workflow"
104
+ },
105
+ {
106
+ "id": "context",
107
+ "retention": "work-scoped-ttl"
108
+ },
109
+ {
110
+ "id": "relationships"
111
+ }
112
+ ],
113
+ "snapshotBuckets": {
114
+ "analytics": "optional",
115
+ "enrichment": "optional",
116
+ "insights": "optional"
117
+ }
118
+ },
119
+ {
120
+ "id": "playbooks",
121
+ "name": "Playbooks",
122
+ "dataCategory": "knowledge",
123
+ "abstractTypes": [
124
+ "Playbooks"
125
+ ],
126
+ "contentTypes": [
127
+ {
128
+ "id": "raw"
129
+ },
130
+ {
131
+ "id": "snapshots",
132
+ "notes": "Persistent knowledge content"
133
+ },
134
+ {
135
+ "id": "relationships"
136
+ }
137
+ ],
138
+ "retention": "persistent-knowledge"
139
+ },
140
+ {
141
+ "id": "activity-events",
142
+ "name": "Activity Events",
143
+ "dataCategory": "event",
144
+ "abstractTypes": [
145
+ "ActivityEvents"
146
+ ],
147
+ "contentTypes": [
148
+ {
149
+ "id": "raw"
150
+ },
151
+ {
152
+ "id": "snapshots",
153
+ "notes": "Normalized event content"
154
+ },
155
+ {
156
+ "id": "relationships"
157
+ }
158
+ ]
159
+ }
160
+ ],
161
+ "abstractTypes": [
162
+ {
163
+ "id": "People",
164
+ "name": "People",
165
+ "meaning": "People who perform operational work \u2014 inside the org (employeeId) or outside (externalPersonId), distinguished by identity kind",
166
+ "category": "entity",
167
+ "properties": [
168
+ {
169
+ "id": "title",
170
+ "valueType": "string",
171
+ "required": true
172
+ },
173
+ {
174
+ "id": "role",
175
+ "valueType": "string",
176
+ "required": true
177
+ },
178
+ {
179
+ "id": "lens",
180
+ "valueType": "string",
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
192
+ }
193
+ ],
194
+ "members": [
195
+ {
196
+ "objectType": "people",
197
+ "contentType": "snapshots",
198
+ "properties": [
199
+ {
200
+ "abstractProperty": "title",
201
+ "contentType": "snapshots",
202
+ "mappingId": "opx-people-abstract"
203
+ },
204
+ {
205
+ "abstractProperty": "role",
206
+ "contentType": "snapshots",
207
+ "mappingId": "opx-people-abstract"
208
+ },
209
+ {
210
+ "abstractProperty": "lens",
211
+ "contentType": "snapshots",
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"
223
+ }
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
245
+ },
246
+ {
247
+ "id": "priority",
248
+ "valueType": "string",
249
+ "required": false
250
+ }
251
+ ],
252
+ "members": [
253
+ {
254
+ "objectType": "work-items",
255
+ "contentType": "snapshots",
256
+ "properties": [
257
+ {
258
+ "abstractProperty": "title",
259
+ "contentType": "snapshots",
260
+ "propertyPath": "data.title",
261
+ "concreteValueType": "string"
262
+ },
263
+ {
264
+ "abstractProperty": "status",
265
+ "contentType": "snapshots",
266
+ "propertyPath": "data.status",
267
+ "concreteValueType": "string"
268
+ },
269
+ {
270
+ "abstractProperty": "priority",
271
+ "contentType": "snapshots",
272
+ "propertyPath": "data.priority",
273
+ "concreteValueType": "string"
274
+ }
275
+ ]
276
+ }
277
+ ],
278
+ "union": false
279
+ },
280
+ {
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
+ }
327
+ ],
328
+ "union": false
329
+ },
330
+ {
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
+ }
399
+ ],
400
+ "union": false
401
+ }
402
+ ],
403
+ "abstractBindings": [],
404
+ "relationshipDefinitions": [
405
+ {
406
+ "id": "people-assigned-to-work-items",
407
+ "name": "People assigned to work items",
408
+ "meaning": "A person is assigned to perform a work item",
409
+ "directionality": "directed",
410
+ "from": {
411
+ "abstractType": "People",
412
+ "path": "assignedWorkItems"
413
+ },
414
+ "to": {
415
+ "abstractType": "WorkItems",
416
+ "path": "assignedPeople"
417
+ },
418
+ "discoveryRules": [
419
+ {
420
+ "id": "from-source-assignee",
421
+ "kind": "source-field",
422
+ "sourcePath": "assigneeId",
423
+ "notes": "opx-source work-items.assigneeId resolves to people OT (any identity kind)"
424
+ }
425
+ ]
426
+ },
427
+ {
428
+ "id": "work-items-use-playbooks",
429
+ "name": "Work items use playbooks",
430
+ "meaning": "A work item follows one or more reusable playbooks",
431
+ "directionality": "directed",
432
+ "from": {
433
+ "abstractType": "WorkItems",
434
+ "path": "usedPlaybooks"
435
+ },
436
+ "to": {
437
+ "abstractType": "Playbooks",
438
+ "path": "usedByWorkItems"
439
+ },
440
+ "discoveryRules": [
441
+ {
442
+ "id": "from-source-playbook-ids",
443
+ "kind": "source-field",
444
+ "sourcePath": "playbookIds"
445
+ }
446
+ ]
447
+ },
448
+ {
449
+ "id": "activity-events-about-work-items",
450
+ "name": "Activity events about work items",
451
+ "meaning": "An activity event reports progress on a work item",
452
+ "directionality": "directed",
453
+ "from": {
454
+ "abstractType": "ActivityEvents",
455
+ "path": "aboutWorkItems"
456
+ },
457
+ "to": {
458
+ "abstractType": "WorkItems",
459
+ "path": "activityEvents"
460
+ },
461
+ "discoveryRules": [
462
+ {
463
+ "id": "from-source-work-item-id",
464
+ "kind": "source-field",
465
+ "sourcePath": "workItemId"
466
+ }
467
+ ]
468
+ },
469
+ {
470
+ "id": "work-items-depend-on-work-items",
471
+ "name": "Work items depend on work items",
472
+ "meaning": "A work item cannot complete until another work item completes",
473
+ "directionality": "directed",
474
+ "from": {
475
+ "abstractType": "WorkItems",
476
+ "path": "dependsOn"
477
+ },
478
+ "to": {
479
+ "abstractType": "WorkItems",
480
+ "path": "dependedOnBy"
481
+ },
482
+ "discoveryRules": [
483
+ {
484
+ "id": "from-source-depends-on",
485
+ "kind": "source-field",
486
+ "sourcePath": "dependsOnIds"
487
+ }
488
+ ]
489
+ },
490
+ {
491
+ "id": "people-collaborate-with-people",
492
+ "name": "People collaborate with people",
493
+ "meaning": "Two people collaborate on operational work",
494
+ "directionality": "undirected",
495
+ "from": {
496
+ "abstractType": "People",
497
+ "path": "collaborators"
498
+ },
499
+ "to": {
500
+ "abstractType": "People",
501
+ "path": "collaborators"
502
+ },
503
+ "discoveryRules": [
504
+ {
505
+ "id": "from-source-collaborator-ids",
506
+ "kind": "source-field",
507
+ "sourcePath": "collaboratorIds"
508
+ }
509
+ ]
510
+ }
511
+ ],
512
+ "mappings": [
513
+ {
514
+ "id": "opx-source-employees-to-raw",
515
+ "purpose": "source",
516
+ "sourceId": "opx-source",
517
+ "endpoint": "/employees",
518
+ "objectType": "people",
519
+ "contentType": "raw",
520
+ "mode": "knowledge",
521
+ "map": {
522
+ "recordId": {
523
+ "op": "path",
524
+ "path": "id",
525
+ "required": true
526
+ },
527
+ "objectType": {
528
+ "op": "constant",
529
+ "value": "people"
530
+ },
531
+ "data.displayName": {
532
+ "op": "path",
533
+ "path": "name",
534
+ "required": true
535
+ },
536
+ "data.role": {
537
+ "op": "path",
538
+ "path": "role",
539
+ "required": true
540
+ },
541
+ "data.email": {
542
+ "op": "path",
543
+ "path": "email"
544
+ },
545
+ "data.sourceId": {
546
+ "op": "path",
547
+ "path": "id"
548
+ }
549
+ }
550
+ },
551
+ {
552
+ "id": "opx-source-external-people-to-raw",
553
+ "purpose": "source",
554
+ "sourceId": "opx-source",
555
+ "endpoint": "/external-people",
556
+ "objectType": "people",
557
+ "contentType": "raw",
558
+ "mode": "knowledge",
559
+ "map": {
560
+ "recordId": {
561
+ "op": "path",
562
+ "path": "id",
563
+ "required": true
564
+ },
565
+ "objectType": {
566
+ "op": "constant",
567
+ "value": "people"
568
+ },
569
+ "data.displayName": {
570
+ "op": "path",
571
+ "path": "name",
572
+ "required": true
573
+ },
574
+ "data.role": {
575
+ "op": "path",
576
+ "path": "role",
577
+ "required": true
578
+ },
579
+ "data.organization": {
580
+ "op": "path",
581
+ "path": "organization"
582
+ },
583
+ "data.sourceId": {
584
+ "op": "path",
585
+ "path": "id"
586
+ }
587
+ }
588
+ },
589
+ {
590
+ "id": "opx-source-work-items-to-raw",
591
+ "purpose": "source",
592
+ "sourceId": "opx-source",
593
+ "endpoint": "/work-items",
594
+ "objectType": "work-items",
595
+ "contentType": "raw",
596
+ "mode": "knowledge",
597
+ "map": {
598
+ "data": {
599
+ "op": "path",
600
+ "path": "$"
601
+ }
602
+ }
603
+ },
604
+ {
605
+ "id": "opx-source-work-item-context",
606
+ "purpose": "source",
607
+ "sourceId": "opx-source",
608
+ "endpoint": "/work-items/:id/context",
609
+ "objectType": "work-items",
610
+ "contentType": "context",
611
+ "mode": "context",
612
+ "trigger": "on-demand",
613
+ "map": {
614
+ "data": {
615
+ "op": "path",
616
+ "path": "$"
617
+ }
618
+ }
619
+ },
620
+ {
621
+ "id": "opx-people-abstract",
622
+ "purpose": "abstract",
623
+ "abstractType": "People",
624
+ "objectType": "people",
625
+ "contentType": "snapshots",
626
+ "map": {
627
+ "title": {
628
+ "expr": {
629
+ "op": "path",
630
+ "path": "data.displayName"
631
+ },
632
+ "required": true
633
+ },
634
+ "role": {
635
+ "expr": {
636
+ "op": "path",
637
+ "path": "data.role"
638
+ },
639
+ "required": true
640
+ },
641
+ "lens": {
642
+ "op": "constant",
643
+ "value": "people"
644
+ }
645
+ }
646
+ },
647
+ {
648
+ "id": "opx-work-items-completion-priority",
649
+ "purpose": "completion",
650
+ "objectType": "work-items",
651
+ "contentType": "snapshots",
652
+ "map": {
653
+ "data.priority": {
654
+ "op": "coalesce",
655
+ "exprs": [
656
+ {
657
+ "op": "path",
658
+ "path": "priority"
659
+ },
660
+ {
661
+ "op": "constant",
662
+ "value": "normal"
663
+ }
664
+ ]
665
+ },
666
+ "data.title": {
667
+ "op": "path",
668
+ "path": "title"
669
+ }
670
+ }
671
+ }
672
+ ],
673
+ "views": [
674
+ {
675
+ "id": "opx-work-items-list",
676
+ "kind": "list",
677
+ "abstractType": "WorkItems",
678
+ "title": "Work items",
679
+ "columns": [
680
+ "concept.title",
681
+ "data.status",
682
+ "data.priority"
683
+ ]
684
+ },
685
+ {
686
+ "id": "opx-work-items-item",
687
+ "kind": "item",
688
+ "abstractType": "WorkItems",
689
+ "title": "Work item",
690
+ "sections": [
691
+ "concept",
692
+ "data",
693
+ "workflow",
694
+ "analysis",
695
+ "decisions"
696
+ ]
697
+ },
698
+ {
699
+ "id": "opx-people-list",
700
+ "kind": "list",
701
+ "abstractType": "People",
702
+ "title": "People",
703
+ "columns": [
704
+ "concept.title",
705
+ "objectType",
706
+ "data.role"
707
+ ]
708
+ },
709
+ {
710
+ "id": "opx-work-item-expand-people",
711
+ "kind": "relationship-expansion",
712
+ "abstractType": "WorkItems",
713
+ "relationshipDefinitionId": "people-assigned-to-work-items",
714
+ "direction": "to-from"
715
+ },
716
+ {
717
+ "id": "project-opx-work-items-list",
718
+ "kind": "list",
719
+ "title": "Project work items",
720
+ "abstractType": "WorkItems",
721
+ "extends": "opx-work-items-list"
722
+ }
723
+ ],
724
+ "writes": [
725
+ {
726
+ "id": "opx-people-employee-snapshots",
727
+ "objectType": "people",
728
+ "contentType": "snapshots",
729
+ "identity": {
730
+ "primaryKind": "employeeId",
731
+ "issuer": "opx-source"
732
+ }
733
+ },
734
+ {
735
+ "id": "opx-people-external-snapshots",
736
+ "objectType": "people",
737
+ "contentType": "snapshots",
738
+ "identity": {
739
+ "primaryKind": "externalPersonId",
740
+ "issuer": "opx-source"
741
+ }
742
+ },
743
+ {
744
+ "id": "opx-work-items-snapshots",
745
+ "objectType": "work-items",
746
+ "contentType": "snapshots",
747
+ "identity": {
748
+ "primaryKind": "workItemId",
749
+ "issuer": "opx-source"
750
+ }
751
+ },
752
+ {
753
+ "id": "opx-playbooks-snapshots",
754
+ "objectType": "playbooks",
755
+ "contentType": "snapshots",
756
+ "identity": {
757
+ "primaryKind": "playbookId",
758
+ "issuer": "opx-source"
759
+ }
760
+ },
761
+ {
762
+ "id": "opx-activity-events-snapshots",
763
+ "objectType": "activity-events",
764
+ "contentType": "snapshots",
765
+ "identity": {
766
+ "primaryKind": "activityEventId",
767
+ "issuer": "opx-source"
768
+ }
769
+ }
770
+ ],
771
+ "sources": [
772
+ {
773
+ "id": "opx-source",
774
+ "name": "Opx-service",
775
+ "kind": "rest",
776
+ "baseUrlEnv": "OPX_SOURCE_URL",
777
+ "defaultBaseUrl": "http://127.0.0.1:5102",
778
+ "credentialRef": "opx-source-local",
779
+ "connectorRef": "opx-rest",
780
+ "endpoints": [
781
+ "/employees",
782
+ "/external-people",
783
+ "/work-items",
784
+ "/activity-events",
785
+ "/playbooks",
786
+ "/work-items/:id/context"
787
+ ],
788
+ "pagination": {
789
+ "style": "cursor",
790
+ "defaultPageSize": 50
791
+ },
792
+ "retention": {
793
+ "context": {
794
+ "ttlSeconds": 3600,
795
+ "discardOnWorkCompletion": true
796
+ }
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
+ },
826
+ {
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
+ }
877
+ }
878
+ ]
879
+ }
880
+ ],
881
+ "services": [
882
+ {
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",
887
+ "capabilities": [
888
+ "enrich"
889
+ ],
890
+ "inputs": [
891
+ {
892
+ "id": "snapshot",
893
+ "abstractType": "WorkItems",
894
+ "path": "snapshots",
895
+ "description": "Current WorkItems projection at a captured revision"
896
+ }
897
+ ],
898
+ "outputs": [
899
+ {
900
+ "id": "patch-plan",
901
+ "abstractType": "WorkItems",
902
+ "path": "snapshots",
903
+ "description": "Draft patch / scored fields for the writer step"
904
+ }
905
+ ],
906
+ "invocation": {
907
+ "kind": "worker",
908
+ "operation": "enrich-priority"
909
+ }
910
+ }
911
+ ],
912
+ "pipelines": [
913
+ {
914
+ "id": "opx-knowledge-pull",
915
+ "name": "Scheduled knowledge pull from opx-source",
916
+ "trigger": "scheduled",
917
+ "mode": "knowledge",
918
+ "steps": [
919
+ {
920
+ "id": "pull",
921
+ "kind": "memory-pull",
922
+ "sourceId": "opx-source"
923
+ },
924
+ {
925
+ "id": "land-raw",
926
+ "kind": "write-raw"
927
+ },
928
+ {
929
+ "id": "normalize",
930
+ "kind": "normalize"
931
+ },
932
+ {
933
+ "id": "promote",
934
+ "kind": "promote-snapshots"
935
+ }
936
+ ]
937
+ },
938
+ {
939
+ "id": "opx-context-pull",
940
+ "name": "On-demand work-item context pull",
941
+ "trigger": "on-demand",
942
+ "mode": "context",
943
+ "steps": [
944
+ {
945
+ "id": "pull",
946
+ "kind": "memory-pull",
947
+ "sourceId": "opx-source"
948
+ },
949
+ {
950
+ "id": "land-raw",
951
+ "kind": "write-raw"
952
+ },
953
+ {
954
+ "id": "normalize-context",
955
+ "kind": "normalize-context"
956
+ },
957
+ {
958
+ "id": "ttl",
959
+ "kind": "apply-ttl"
960
+ }
961
+ ]
962
+ },
963
+ {
964
+ "id": "opx-relationship-build",
965
+ "name": "Discover and write lightweight relationships",
966
+ "trigger": "explicit",
967
+ "steps": [
968
+ {
969
+ "id": "discover",
970
+ "kind": "relationship-discover"
971
+ },
972
+ {
973
+ "id": "write",
974
+ "kind": "relationship-write"
975
+ },
976
+ {
977
+ "id": "verify",
978
+ "kind": "relationship-verify"
979
+ }
980
+ ]
981
+ },
982
+ {
983
+ "id": "opx-analysis",
984
+ "name": "Work-item analysis sibling",
985
+ "trigger": "explicit",
986
+ "steps": [
987
+ {
988
+ "id": "analyze",
989
+ "kind": "analysis"
990
+ },
991
+ {
992
+ "id": "write-sibling",
993
+ "kind": "write-content",
994
+ "contentType": "analysis"
995
+ }
996
+ ]
997
+ },
998
+ {
999
+ "id": "opx-workflow",
1000
+ "name": "Work-item workflow sibling",
1001
+ "trigger": "explicit",
1002
+ "steps": [
1003
+ {
1004
+ "id": "sync-workflow",
1005
+ "kind": "workflow-sync"
1006
+ },
1007
+ {
1008
+ "id": "write-sibling",
1009
+ "kind": "write-content",
1010
+ "contentType": "workflow"
1011
+ }
1012
+ ]
1013
+ },
1014
+ {
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
+ ]
1031
+ }
1032
+ ],
1033
+ "schedules": [],
1034
+ "kindDeclarations": [],
1035
+ "extensions": {}
1036
+ }