@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,708 +1,708 @@
1
- {
2
- "format": "memorix-metadata/1",
3
- "agentId": "opx",
4
- "version": "0.1.0",
5
- "agents": [
6
- {
7
- "id": "opx",
8
- "name": "Ops",
9
- "parentId": "missing-parent"
10
- }
11
- ],
12
- "objectTypes": [
13
- {
14
- "id": "employees",
15
- "name": "Employees",
16
- "dataCategory": "entity",
17
- "abstractTypes": [
18
- "People"
19
- ],
20
- "contentTypes": [
21
- {
22
- "id": "raw",
23
- "required": true
24
- },
25
- {
26
- "id": "snapshots",
27
- "required": true
28
- },
29
- {
30
- "id": "discovery",
31
- "discriminator": {
32
- "path": "data.discoveryType",
33
- "required": false,
34
- "defaultValue": "default"
35
- }
36
- },
37
- {
38
- "id": "analysis",
39
- "discriminator": {
40
- "path": "data.analysisType",
41
- "required": false,
42
- "defaultValue": "default"
43
- }
44
- },
45
- {
46
- "id": "relationships",
47
- "notes": "Candidate store shape until Gate G4"
48
- }
49
- ]
50
- },
51
- {
52
- "id": "contractors",
53
- "name": "Contractors",
54
- "dataCategory": "entity",
55
- "abstractTypes": [
56
- "People"
57
- ],
58
- "contentTypes": [
59
- {
60
- "id": "raw"
61
- },
62
- {
63
- "id": "snapshots"
64
- },
65
- {
66
- "id": "discovery",
67
- "discriminator": {
68
- "path": "data.discoveryType",
69
- "required": false
70
- }
71
- },
72
- {
73
- "id": "analysis",
74
- "discriminator": {
75
- "path": "data.analysisType",
76
- "required": false
77
- }
78
- },
79
- {
80
- "id": "relationships"
81
- }
82
- ]
83
- },
84
- {
85
- "id": "work-items",
86
- "name": "Work Items",
87
- "dataCategory": "entity",
88
- "abstractTypes": [
89
- "WorkItems"
90
- ],
91
- "contentTypes": [
92
- {
93
- "id": "raw"
94
- },
95
- {
96
- "id": "snapshots"
97
- },
98
- {
99
- "id": "discovery",
100
- "discriminator": {
101
- "path": "data.discoveryType",
102
- "required": false
103
- }
104
- },
105
- {
106
- "id": "analysis",
107
- "discriminator": {
108
- "path": "data.analysisType",
109
- "required": false,
110
- "defaultValue": "delivery-risk"
111
- }
112
- },
113
- {
114
- "id": "decisions",
115
- "discriminator": {
116
- "path": "data.decisionType",
117
- "required": false,
118
- "defaultValue": "priority"
119
- }
120
- },
121
- {
122
- "id": "workflow"
123
- },
124
- {
125
- "id": "context",
126
- "retention": "work-scoped-ttl"
127
- },
128
- {
129
- "id": "relationships"
130
- }
131
- ],
132
- "snapshotBuckets": {
133
- "analytics": "optional",
134
- "enrichment": "optional",
135
- "insights": "optional"
136
- }
137
- },
138
- {
139
- "id": "playbooks",
140
- "name": "Playbooks",
141
- "dataCategory": "knowledge",
142
- "abstractTypes": [
143
- "Playbooks"
144
- ],
145
- "contentTypes": [
146
- {
147
- "id": "raw"
148
- },
149
- {
150
- "id": "snapshots",
151
- "notes": "Persistent knowledge content"
152
- },
153
- {
154
- "id": "relationships"
155
- }
156
- ],
157
- "retention": "persistent-knowledge"
158
- },
159
- {
160
- "id": "activity-events",
161
- "name": "Activity Events",
162
- "dataCategory": "event",
163
- "abstractTypes": [
164
- "ActivityEvents"
165
- ],
166
- "contentTypes": [
167
- {
168
- "id": "raw"
169
- },
170
- {
171
- "id": "snapshots",
172
- "notes": "Normalized event content"
173
- },
174
- {
175
- "id": "relationships"
176
- }
177
- ]
178
- }
179
- ],
180
- "abstractTypes": [
181
- {
182
- "id": "People",
183
- "name": "People",
184
- "meaning": "Employees and contractors who perform operational work",
185
- "category": "entity"
186
- },
187
- {
188
- "id": "WorkItems",
189
- "name": "Work Items",
190
- "meaning": "Units of operational work",
191
- "category": "entity"
192
- },
193
- {
194
- "id": "Playbooks",
195
- "name": "Playbooks",
196
- "meaning": "Reusable operational knowledge / playbooks",
197
- "category": "knowledge"
198
- },
199
- {
200
- "id": "ActivityEvents",
201
- "name": "Activity Events",
202
- "meaning": "Progress and activity reports about work items",
203
- "category": "event"
204
- }
205
- ],
206
- "abstractBindings": [
207
- {
208
- "id": "people-employees-contractors",
209
- "abstractType": "People",
210
- "concreteObjectTypes": [
211
- "employees",
212
- "contractors"
213
- ],
214
- "union": true,
215
- "notes": "People = Employees \u222a Contractors. No abstract records exist."
216
- },
217
- {
218
- "id": "work-items-concrete",
219
- "abstractType": "WorkItems",
220
- "concreteObjectTypes": [
221
- "work-items"
222
- ],
223
- "union": false
224
- },
225
- {
226
- "id": "playbooks-concrete",
227
- "abstractType": "Playbooks",
228
- "concreteObjectTypes": [
229
- "playbooks"
230
- ],
231
- "union": false
232
- },
233
- {
234
- "id": "activity-events-concrete",
235
- "abstractType": "ActivityEvents",
236
- "concreteObjectTypes": [
237
- "activity-events"
238
- ],
239
- "union": false
240
- }
241
- ],
242
- "relationshipDefinitions": [
243
- {
244
- "id": "people-assigned-to-work-items",
245
- "name": "People assigned to work items",
246
- "meaning": "A person (employee or contractor) is assigned to perform a work item",
247
- "directionality": "directed",
248
- "from": {
249
- "abstractType": "People",
250
- "path": "assignedWorkItems"
251
- },
252
- "to": {
253
- "abstractType": "WorkItems",
254
- "path": "assignedPeople"
255
- },
256
- "discoveryRules": [
257
- {
258
- "id": "from-source-assignee",
259
- "kind": "source-field",
260
- "sourcePath": "assigneeId",
261
- "notes": "opx-source work-items.assigneeId resolves across employees and contractors"
262
- }
263
- ]
264
- },
265
- {
266
- "id": "work-items-use-playbooks",
267
- "name": "Work items use playbooks",
268
- "meaning": "A work item follows one or more reusable playbooks",
269
- "directionality": "directed",
270
- "from": {
271
- "abstractType": "WorkItems",
272
- "path": "usedPlaybooks"
273
- },
274
- "to": {
275
- "abstractType": "Playbooks",
276
- "path": "usedByWorkItems"
277
- },
278
- "discoveryRules": [
279
- {
280
- "id": "from-source-playbook-ids",
281
- "kind": "source-field",
282
- "sourcePath": "playbookIds"
283
- }
284
- ]
285
- },
286
- {
287
- "id": "activity-events-about-work-items",
288
- "name": "Activity events about work items",
289
- "meaning": "An activity event reports progress on a work item",
290
- "directionality": "directed",
291
- "from": {
292
- "abstractType": "ActivityEvents",
293
- "path": "aboutWorkItems"
294
- },
295
- "to": {
296
- "abstractType": "WorkItems",
297
- "path": "activityEvents"
298
- },
299
- "discoveryRules": [
300
- {
301
- "id": "from-source-work-item-id",
302
- "kind": "source-field",
303
- "sourcePath": "workItemId"
304
- }
305
- ]
306
- },
307
- {
308
- "id": "work-items-depend-on-work-items",
309
- "name": "Work items depend on work items",
310
- "meaning": "A work item cannot complete until another work item completes",
311
- "directionality": "directed",
312
- "from": {
313
- "abstractType": "WorkItems",
314
- "path": "dependsOn"
315
- },
316
- "to": {
317
- "abstractType": "WorkItems",
318
- "path": "dependedOnBy"
319
- },
320
- "discoveryRules": [
321
- {
322
- "id": "from-source-depends-on",
323
- "kind": "source-field",
324
- "sourcePath": "dependsOnIds"
325
- }
326
- ]
327
- },
328
- {
329
- "id": "people-collaborate-with-people",
330
- "name": "People collaborate with people",
331
- "meaning": "Two people collaborate on operational work",
332
- "directionality": "undirected",
333
- "from": {
334
- "abstractType": "People",
335
- "path": "collaborators"
336
- },
337
- "to": {
338
- "abstractType": "People",
339
- "path": "collaborators"
340
- },
341
- "discoveryRules": [
342
- {
343
- "id": "from-source-collaborator-ids",
344
- "kind": "source-field",
345
- "sourcePath": "collaboratorIds"
346
- }
347
- ]
348
- }
349
- ],
350
- "mappings": [
351
- {
352
- "id": "opx-source-employees-to-raw",
353
- "sourceId": "opx-source",
354
- "endpoint": "/employees",
355
- "objectType": "employees",
356
- "contentType": "raw",
357
- "mode": "knowledge",
358
- "map": {
359
- "data": {
360
- "op": "path",
361
- "path": "$"
362
- }
363
- },
364
- "purpose": "source"
365
- },
366
- {
367
- "id": "opx-source-work-items-to-raw",
368
- "sourceId": "opx-source",
369
- "endpoint": "/work-items",
370
- "objectType": "work-items",
371
- "contentType": "raw",
372
- "mode": "knowledge",
373
- "map": {
374
- "data": {
375
- "op": "path",
376
- "path": "$"
377
- }
378
- },
379
- "purpose": "source"
380
- },
381
- {
382
- "id": "opx-source-work-item-context",
383
- "sourceId": "opx-source",
384
- "endpoint": "/work-items/:id/context",
385
- "objectType": "work-items",
386
- "contentType": "context",
387
- "mode": "context",
388
- "trigger": "on-demand",
389
- "map": {
390
- "data": {
391
- "op": "path",
392
- "path": "$"
393
- }
394
- },
395
- "purpose": "source"
396
- },
397
- {
398
- "id": "opx-people-abstract-title",
399
- "purpose": "abstract",
400
- "abstractType": "People",
401
- "objectType": "employees",
402
- "contentType": "snapshots",
403
- "map": {
404
- "concept.title": {
405
- "op": "path",
406
- "path": "data.displayName"
407
- }
408
- }
409
- },
410
- {
411
- "id": "opx-work-items-completion-priority",
412
- "purpose": "completion",
413
- "objectType": "work-items",
414
- "contentType": "snapshots",
415
- "map": {
416
- "data.priority": {
417
- "op": "default",
418
- "value": "normal"
419
- }
420
- }
421
- }
422
- ],
423
- "views": [
424
- {
425
- "id": "opx-work-items-list",
426
- "kind": "list",
427
- "title": "Work items",
428
- "columns": [
429
- "concept.title",
430
- "data.status",
431
- "data.priority"
432
- ],
433
- "abstractType": "WorkItems"
434
- },
435
- {
436
- "id": "opx-work-items-item",
437
- "kind": "item",
438
- "title": "Work item",
439
- "sections": [
440
- "concept",
441
- "data",
442
- "workflow",
443
- "analysis",
444
- "decisions"
445
- ],
446
- "abstractType": "WorkItems"
447
- },
448
- {
449
- "id": "opx-people-list",
450
- "kind": "list",
451
- "abstractType": "People",
452
- "title": "People",
453
- "columns": [
454
- "concept.title",
455
- "objectType",
456
- "data.role"
457
- ]
458
- },
459
- {
460
- "id": "opx-work-item-expand-people",
461
- "kind": "relationship-expansion",
462
- "relationshipDefinitionId": "people-assigned-to-work-items",
463
- "direction": "to-from",
464
- "abstractType": "WorkItems"
465
- }
466
- ],
467
- "writes": [
468
- {
469
- "id": "opx-employees-snapshots",
470
- "objectType": "employees",
471
- "contentType": "snapshots",
472
- "identity": {
473
- "primaryKind": "employeeId",
474
- "issuer": "opx-source"
475
- }
476
- },
477
- {
478
- "id": "opx-contractors-snapshots",
479
- "objectType": "contractors",
480
- "contentType": "snapshots",
481
- "identity": {
482
- "primaryKind": "contractorId",
483
- "issuer": "opx-source"
484
- }
485
- },
486
- {
487
- "id": "opx-work-items-snapshots",
488
- "objectType": "work-items",
489
- "contentType": "snapshots",
490
- "identity": {
491
- "primaryKind": "workItemId",
492
- "issuer": "opx-source"
493
- }
494
- },
495
- {
496
- "id": "opx-playbooks-snapshots",
497
- "objectType": "playbooks",
498
- "contentType": "snapshots",
499
- "identity": {
500
- "primaryKind": "playbookId",
501
- "issuer": "opx-source"
502
- }
503
- },
504
- {
505
- "id": "opx-activity-events-snapshots",
506
- "objectType": "activity-events",
507
- "contentType": "snapshots",
508
- "identity": {
509
- "primaryKind": "activityEventId",
510
- "issuer": "opx-source"
511
- }
512
- }
513
- ],
514
- "sources": [
515
- {
516
- "id": "opx-source",
517
- "name": "Opx-service",
518
- "kind": "rest",
519
- "baseUrlEnv": "OPX_SOURCE_URL",
520
- "defaultBaseUrl": "http://127.0.0.1:5102",
521
- "credentialRef": "opx-source-local",
522
- "endpoints": [
523
- "/employees",
524
- "/contractors",
525
- "/work-items",
526
- "/activity-events",
527
- "/playbooks",
528
- "/work-items/:id/context"
529
- ]
530
- }
531
- ],
532
- "pipelines": [
533
- {
534
- "id": "opx-knowledge-pull",
535
- "name": "Scheduled knowledge pull from opx-source",
536
- "trigger": "scheduled",
537
- "mode": "knowledge",
538
- "steps": [
539
- {
540
- "id": "pull",
541
- "kind": "memory-pull",
542
- "sourceId": "opx-source"
543
- },
544
- {
545
- "id": "land-raw",
546
- "kind": "write-raw"
547
- },
548
- {
549
- "id": "normalize",
550
- "kind": "normalize"
551
- },
552
- {
553
- "id": "promote",
554
- "kind": "promote-snapshots"
555
- },
556
- {
557
- "id": "normalize-svc",
558
- "kind": "invoke-service",
559
- "serviceId": "opx-normalize"
560
- },
561
- {
562
- "id": "complete",
563
- "kind": "completion",
564
- "serviceId": "opx-completion",
565
- "mappingId": "opx-work-items-completion-priority",
566
- "completionPolicy": {
567
- "mode": "fill-missing",
568
- "maxFields": 20
569
- }
570
- }
571
- ]
572
- },
573
- {
574
- "id": "opx-context-pull",
575
- "name": "On-demand work-item context pull",
576
- "trigger": "on-demand",
577
- "mode": "context",
578
- "steps": [
579
- {
580
- "id": "pull",
581
- "kind": "memory-pull",
582
- "sourceId": "opx-source"
583
- },
584
- {
585
- "id": "land-raw",
586
- "kind": "write-raw"
587
- },
588
- {
589
- "id": "normalize-context",
590
- "kind": "normalize-context"
591
- },
592
- {
593
- "id": "ttl",
594
- "kind": "apply-ttl"
595
- }
596
- ]
597
- },
598
- {
599
- "id": "opx-relationship-build",
600
- "name": "Discover and write lightweight relationships",
601
- "trigger": "explicit",
602
- "steps": [
603
- {
604
- "id": "discover",
605
- "kind": "relationship-discover"
606
- },
607
- {
608
- "id": "write",
609
- "kind": "relationship-write"
610
- },
611
- {
612
- "id": "verify",
613
- "kind": "relationship-verify"
614
- }
615
- ]
616
- },
617
- {
618
- "id": "opx-analysis",
619
- "name": "Work-item analysis sibling",
620
- "trigger": "explicit",
621
- "steps": [
622
- {
623
- "id": "analyze",
624
- "kind": "analysis"
625
- },
626
- {
627
- "id": "write-sibling",
628
- "kind": "write-content",
629
- "contentType": "analysis"
630
- }
631
- ]
632
- },
633
- {
634
- "id": "opx-workflow",
635
- "name": "Work-item workflow sibling",
636
- "trigger": "explicit",
637
- "steps": [
638
- {
639
- "id": "sync-workflow",
640
- "kind": "workflow-sync"
641
- },
642
- {
643
- "id": "write-sibling",
644
- "kind": "write-content",
645
- "contentType": "workflow"
646
- }
647
- ]
648
- }
649
- ],
650
- "schedules": [
651
- {
652
- "id": "opx-knowledge-hourly",
653
- "pipelineId": "opx-knowledge-pull",
654
- "cron": "0 * * * *",
655
- "timezone": "UTC",
656
- "enabled": true
657
- }
658
- ],
659
- "services": [
660
- {
661
- "id": "opx-normalize",
662
- "name": "Normalize records",
663
- "description": "Logical normalize capability for ops knowledge pull",
664
- "capabilities": [
665
- "normalize"
666
- ],
667
- "inputs": [
668
- {
669
- "id": "raw-records",
670
- "abstractType": "People"
671
- }
672
- ],
673
- "outputs": [
674
- {
675
- "id": "normalized-records",
676
- "abstractType": "People"
677
- }
678
- ],
679
- "invocation": {
680
- "kind": "worker",
681
- "operation": "normalize"
682
- }
683
- },
684
- {
685
- "id": "opx-completion",
686
- "name": "Field completion",
687
- "capabilities": [
688
- "completion"
689
- ],
690
- "inputs": [
691
- {
692
- "id": "snapshot",
693
- "abstractType": "People"
694
- }
695
- ],
696
- "outputs": [
697
- {
698
- "id": "completed",
699
- "abstractType": "People"
700
- }
701
- ],
702
- "invocation": {
703
- "kind": "worker",
704
- "operation": "complete"
705
- }
706
- }
707
- ]
708
- }
1
+ {
2
+ "format": "memorix-metadata/1",
3
+ "agentId": "opx",
4
+ "version": "0.1.0",
5
+ "agents": [
6
+ {
7
+ "id": "opx",
8
+ "name": "Ops",
9
+ "parentId": "missing-parent"
10
+ }
11
+ ],
12
+ "objectTypes": [
13
+ {
14
+ "id": "employees",
15
+ "name": "Employees",
16
+ "dataCategory": "entity",
17
+ "abstractTypes": [
18
+ "People"
19
+ ],
20
+ "contentTypes": [
21
+ {
22
+ "id": "raw",
23
+ "required": true
24
+ },
25
+ {
26
+ "id": "snapshots",
27
+ "required": true
28
+ },
29
+ {
30
+ "id": "discovery",
31
+ "discriminator": {
32
+ "path": "data.discoveryType",
33
+ "required": false,
34
+ "defaultValue": "default"
35
+ }
36
+ },
37
+ {
38
+ "id": "analysis",
39
+ "discriminator": {
40
+ "path": "data.analysisType",
41
+ "required": false,
42
+ "defaultValue": "default"
43
+ }
44
+ },
45
+ {
46
+ "id": "relationships",
47
+ "notes": "Candidate store shape until Gate G4"
48
+ }
49
+ ]
50
+ },
51
+ {
52
+ "id": "contractors",
53
+ "name": "Contractors",
54
+ "dataCategory": "entity",
55
+ "abstractTypes": [
56
+ "People"
57
+ ],
58
+ "contentTypes": [
59
+ {
60
+ "id": "raw"
61
+ },
62
+ {
63
+ "id": "snapshots"
64
+ },
65
+ {
66
+ "id": "discovery",
67
+ "discriminator": {
68
+ "path": "data.discoveryType",
69
+ "required": false
70
+ }
71
+ },
72
+ {
73
+ "id": "analysis",
74
+ "discriminator": {
75
+ "path": "data.analysisType",
76
+ "required": false
77
+ }
78
+ },
79
+ {
80
+ "id": "relationships"
81
+ }
82
+ ]
83
+ },
84
+ {
85
+ "id": "work-items",
86
+ "name": "Work Items",
87
+ "dataCategory": "entity",
88
+ "abstractTypes": [
89
+ "WorkItems"
90
+ ],
91
+ "contentTypes": [
92
+ {
93
+ "id": "raw"
94
+ },
95
+ {
96
+ "id": "snapshots"
97
+ },
98
+ {
99
+ "id": "discovery",
100
+ "discriminator": {
101
+ "path": "data.discoveryType",
102
+ "required": false
103
+ }
104
+ },
105
+ {
106
+ "id": "analysis",
107
+ "discriminator": {
108
+ "path": "data.analysisType",
109
+ "required": false,
110
+ "defaultValue": "delivery-risk"
111
+ }
112
+ },
113
+ {
114
+ "id": "decisions",
115
+ "discriminator": {
116
+ "path": "data.decisionType",
117
+ "required": false,
118
+ "defaultValue": "priority"
119
+ }
120
+ },
121
+ {
122
+ "id": "workflow"
123
+ },
124
+ {
125
+ "id": "context",
126
+ "retention": "work-scoped-ttl"
127
+ },
128
+ {
129
+ "id": "relationships"
130
+ }
131
+ ],
132
+ "snapshotBuckets": {
133
+ "analytics": "optional",
134
+ "enrichment": "optional",
135
+ "insights": "optional"
136
+ }
137
+ },
138
+ {
139
+ "id": "playbooks",
140
+ "name": "Playbooks",
141
+ "dataCategory": "knowledge",
142
+ "abstractTypes": [
143
+ "Playbooks"
144
+ ],
145
+ "contentTypes": [
146
+ {
147
+ "id": "raw"
148
+ },
149
+ {
150
+ "id": "snapshots",
151
+ "notes": "Persistent knowledge content"
152
+ },
153
+ {
154
+ "id": "relationships"
155
+ }
156
+ ],
157
+ "retention": "persistent-knowledge"
158
+ },
159
+ {
160
+ "id": "activity-events",
161
+ "name": "Activity Events",
162
+ "dataCategory": "event",
163
+ "abstractTypes": [
164
+ "ActivityEvents"
165
+ ],
166
+ "contentTypes": [
167
+ {
168
+ "id": "raw"
169
+ },
170
+ {
171
+ "id": "snapshots",
172
+ "notes": "Normalized event content"
173
+ },
174
+ {
175
+ "id": "relationships"
176
+ }
177
+ ]
178
+ }
179
+ ],
180
+ "abstractTypes": [
181
+ {
182
+ "id": "People",
183
+ "name": "People",
184
+ "meaning": "Employees and contractors who perform operational work",
185
+ "category": "entity"
186
+ },
187
+ {
188
+ "id": "WorkItems",
189
+ "name": "Work Items",
190
+ "meaning": "Units of operational work",
191
+ "category": "entity"
192
+ },
193
+ {
194
+ "id": "Playbooks",
195
+ "name": "Playbooks",
196
+ "meaning": "Reusable operational knowledge / playbooks",
197
+ "category": "knowledge"
198
+ },
199
+ {
200
+ "id": "ActivityEvents",
201
+ "name": "Activity Events",
202
+ "meaning": "Progress and activity reports about work items",
203
+ "category": "event"
204
+ }
205
+ ],
206
+ "abstractBindings": [
207
+ {
208
+ "id": "people-employees-contractors",
209
+ "abstractType": "People",
210
+ "concreteObjectTypes": [
211
+ "employees",
212
+ "contractors"
213
+ ],
214
+ "union": true,
215
+ "notes": "People = Employees \u222a Contractors. No abstract records exist."
216
+ },
217
+ {
218
+ "id": "work-items-concrete",
219
+ "abstractType": "WorkItems",
220
+ "concreteObjectTypes": [
221
+ "work-items"
222
+ ],
223
+ "union": false
224
+ },
225
+ {
226
+ "id": "playbooks-concrete",
227
+ "abstractType": "Playbooks",
228
+ "concreteObjectTypes": [
229
+ "playbooks"
230
+ ],
231
+ "union": false
232
+ },
233
+ {
234
+ "id": "activity-events-concrete",
235
+ "abstractType": "ActivityEvents",
236
+ "concreteObjectTypes": [
237
+ "activity-events"
238
+ ],
239
+ "union": false
240
+ }
241
+ ],
242
+ "relationshipDefinitions": [
243
+ {
244
+ "id": "people-assigned-to-work-items",
245
+ "name": "People assigned to work items",
246
+ "meaning": "A person (employee or contractor) is assigned to perform a work item",
247
+ "directionality": "directed",
248
+ "from": {
249
+ "abstractType": "People",
250
+ "path": "assignedWorkItems"
251
+ },
252
+ "to": {
253
+ "abstractType": "WorkItems",
254
+ "path": "assignedPeople"
255
+ },
256
+ "discoveryRules": [
257
+ {
258
+ "id": "from-source-assignee",
259
+ "kind": "source-field",
260
+ "sourcePath": "assigneeId",
261
+ "notes": "opx-source work-items.assigneeId resolves across employees and contractors"
262
+ }
263
+ ]
264
+ },
265
+ {
266
+ "id": "work-items-use-playbooks",
267
+ "name": "Work items use playbooks",
268
+ "meaning": "A work item follows one or more reusable playbooks",
269
+ "directionality": "directed",
270
+ "from": {
271
+ "abstractType": "WorkItems",
272
+ "path": "usedPlaybooks"
273
+ },
274
+ "to": {
275
+ "abstractType": "Playbooks",
276
+ "path": "usedByWorkItems"
277
+ },
278
+ "discoveryRules": [
279
+ {
280
+ "id": "from-source-playbook-ids",
281
+ "kind": "source-field",
282
+ "sourcePath": "playbookIds"
283
+ }
284
+ ]
285
+ },
286
+ {
287
+ "id": "activity-events-about-work-items",
288
+ "name": "Activity events about work items",
289
+ "meaning": "An activity event reports progress on a work item",
290
+ "directionality": "directed",
291
+ "from": {
292
+ "abstractType": "ActivityEvents",
293
+ "path": "aboutWorkItems"
294
+ },
295
+ "to": {
296
+ "abstractType": "WorkItems",
297
+ "path": "activityEvents"
298
+ },
299
+ "discoveryRules": [
300
+ {
301
+ "id": "from-source-work-item-id",
302
+ "kind": "source-field",
303
+ "sourcePath": "workItemId"
304
+ }
305
+ ]
306
+ },
307
+ {
308
+ "id": "work-items-depend-on-work-items",
309
+ "name": "Work items depend on work items",
310
+ "meaning": "A work item cannot complete until another work item completes",
311
+ "directionality": "directed",
312
+ "from": {
313
+ "abstractType": "WorkItems",
314
+ "path": "dependsOn"
315
+ },
316
+ "to": {
317
+ "abstractType": "WorkItems",
318
+ "path": "dependedOnBy"
319
+ },
320
+ "discoveryRules": [
321
+ {
322
+ "id": "from-source-depends-on",
323
+ "kind": "source-field",
324
+ "sourcePath": "dependsOnIds"
325
+ }
326
+ ]
327
+ },
328
+ {
329
+ "id": "people-collaborate-with-people",
330
+ "name": "People collaborate with people",
331
+ "meaning": "Two people collaborate on operational work",
332
+ "directionality": "undirected",
333
+ "from": {
334
+ "abstractType": "People",
335
+ "path": "collaborators"
336
+ },
337
+ "to": {
338
+ "abstractType": "People",
339
+ "path": "collaborators"
340
+ },
341
+ "discoveryRules": [
342
+ {
343
+ "id": "from-source-collaborator-ids",
344
+ "kind": "source-field",
345
+ "sourcePath": "collaboratorIds"
346
+ }
347
+ ]
348
+ }
349
+ ],
350
+ "mappings": [
351
+ {
352
+ "id": "opx-source-employees-to-raw",
353
+ "sourceId": "opx-source",
354
+ "endpoint": "/employees",
355
+ "objectType": "employees",
356
+ "contentType": "raw",
357
+ "mode": "knowledge",
358
+ "map": {
359
+ "data": {
360
+ "op": "path",
361
+ "path": "$"
362
+ }
363
+ },
364
+ "purpose": "source"
365
+ },
366
+ {
367
+ "id": "opx-source-work-items-to-raw",
368
+ "sourceId": "opx-source",
369
+ "endpoint": "/work-items",
370
+ "objectType": "work-items",
371
+ "contentType": "raw",
372
+ "mode": "knowledge",
373
+ "map": {
374
+ "data": {
375
+ "op": "path",
376
+ "path": "$"
377
+ }
378
+ },
379
+ "purpose": "source"
380
+ },
381
+ {
382
+ "id": "opx-source-work-item-context",
383
+ "sourceId": "opx-source",
384
+ "endpoint": "/work-items/:id/context",
385
+ "objectType": "work-items",
386
+ "contentType": "context",
387
+ "mode": "context",
388
+ "trigger": "on-demand",
389
+ "map": {
390
+ "data": {
391
+ "op": "path",
392
+ "path": "$"
393
+ }
394
+ },
395
+ "purpose": "source"
396
+ },
397
+ {
398
+ "id": "opx-people-abstract-title",
399
+ "purpose": "abstract",
400
+ "abstractType": "People",
401
+ "objectType": "employees",
402
+ "contentType": "snapshots",
403
+ "map": {
404
+ "concept.title": {
405
+ "op": "path",
406
+ "path": "data.displayName"
407
+ }
408
+ }
409
+ },
410
+ {
411
+ "id": "opx-work-items-completion-priority",
412
+ "purpose": "completion",
413
+ "objectType": "work-items",
414
+ "contentType": "snapshots",
415
+ "map": {
416
+ "data.priority": {
417
+ "op": "default",
418
+ "value": "normal"
419
+ }
420
+ }
421
+ }
422
+ ],
423
+ "views": [
424
+ {
425
+ "id": "opx-work-items-list",
426
+ "kind": "list",
427
+ "title": "Work items",
428
+ "columns": [
429
+ "concept.title",
430
+ "data.status",
431
+ "data.priority"
432
+ ],
433
+ "abstractType": "WorkItems"
434
+ },
435
+ {
436
+ "id": "opx-work-items-item",
437
+ "kind": "item",
438
+ "title": "Work item",
439
+ "sections": [
440
+ "concept",
441
+ "data",
442
+ "workflow",
443
+ "analysis",
444
+ "decisions"
445
+ ],
446
+ "abstractType": "WorkItems"
447
+ },
448
+ {
449
+ "id": "opx-people-list",
450
+ "kind": "list",
451
+ "abstractType": "People",
452
+ "title": "People",
453
+ "columns": [
454
+ "concept.title",
455
+ "objectType",
456
+ "data.role"
457
+ ]
458
+ },
459
+ {
460
+ "id": "opx-work-item-expand-people",
461
+ "kind": "relationship-expansion",
462
+ "relationshipDefinitionId": "people-assigned-to-work-items",
463
+ "direction": "to-from",
464
+ "abstractType": "WorkItems"
465
+ }
466
+ ],
467
+ "writes": [
468
+ {
469
+ "id": "opx-employees-snapshots",
470
+ "objectType": "employees",
471
+ "contentType": "snapshots",
472
+ "identity": {
473
+ "primaryKind": "employeeId",
474
+ "issuer": "opx-source"
475
+ }
476
+ },
477
+ {
478
+ "id": "opx-contractors-snapshots",
479
+ "objectType": "contractors",
480
+ "contentType": "snapshots",
481
+ "identity": {
482
+ "primaryKind": "contractorId",
483
+ "issuer": "opx-source"
484
+ }
485
+ },
486
+ {
487
+ "id": "opx-work-items-snapshots",
488
+ "objectType": "work-items",
489
+ "contentType": "snapshots",
490
+ "identity": {
491
+ "primaryKind": "workItemId",
492
+ "issuer": "opx-source"
493
+ }
494
+ },
495
+ {
496
+ "id": "opx-playbooks-snapshots",
497
+ "objectType": "playbooks",
498
+ "contentType": "snapshots",
499
+ "identity": {
500
+ "primaryKind": "playbookId",
501
+ "issuer": "opx-source"
502
+ }
503
+ },
504
+ {
505
+ "id": "opx-activity-events-snapshots",
506
+ "objectType": "activity-events",
507
+ "contentType": "snapshots",
508
+ "identity": {
509
+ "primaryKind": "activityEventId",
510
+ "issuer": "opx-source"
511
+ }
512
+ }
513
+ ],
514
+ "sources": [
515
+ {
516
+ "id": "opx-source",
517
+ "name": "Opx-service",
518
+ "kind": "rest",
519
+ "baseUrlEnv": "OPX_SOURCE_URL",
520
+ "defaultBaseUrl": "http://127.0.0.1:5102",
521
+ "credentialRef": "opx-source-local",
522
+ "endpoints": [
523
+ "/employees",
524
+ "/contractors",
525
+ "/work-items",
526
+ "/activity-events",
527
+ "/playbooks",
528
+ "/work-items/:id/context"
529
+ ]
530
+ }
531
+ ],
532
+ "pipelines": [
533
+ {
534
+ "id": "opx-knowledge-pull",
535
+ "name": "Scheduled knowledge pull from opx-source",
536
+ "trigger": "scheduled",
537
+ "mode": "knowledge",
538
+ "steps": [
539
+ {
540
+ "id": "pull",
541
+ "kind": "memory-pull",
542
+ "sourceId": "opx-source"
543
+ },
544
+ {
545
+ "id": "land-raw",
546
+ "kind": "write-raw"
547
+ },
548
+ {
549
+ "id": "normalize",
550
+ "kind": "normalize"
551
+ },
552
+ {
553
+ "id": "promote",
554
+ "kind": "promote-snapshots"
555
+ },
556
+ {
557
+ "id": "normalize-svc",
558
+ "kind": "invoke-service",
559
+ "serviceId": "opx-normalize"
560
+ },
561
+ {
562
+ "id": "complete",
563
+ "kind": "completion",
564
+ "serviceId": "opx-completion",
565
+ "mappingId": "opx-work-items-completion-priority",
566
+ "completionPolicy": {
567
+ "mode": "fill-missing",
568
+ "maxFields": 20
569
+ }
570
+ }
571
+ ]
572
+ },
573
+ {
574
+ "id": "opx-context-pull",
575
+ "name": "On-demand work-item context pull",
576
+ "trigger": "on-demand",
577
+ "mode": "context",
578
+ "steps": [
579
+ {
580
+ "id": "pull",
581
+ "kind": "memory-pull",
582
+ "sourceId": "opx-source"
583
+ },
584
+ {
585
+ "id": "land-raw",
586
+ "kind": "write-raw"
587
+ },
588
+ {
589
+ "id": "normalize-context",
590
+ "kind": "normalize-context"
591
+ },
592
+ {
593
+ "id": "ttl",
594
+ "kind": "apply-ttl"
595
+ }
596
+ ]
597
+ },
598
+ {
599
+ "id": "opx-relationship-build",
600
+ "name": "Discover and write lightweight relationships",
601
+ "trigger": "explicit",
602
+ "steps": [
603
+ {
604
+ "id": "discover",
605
+ "kind": "relationship-discover"
606
+ },
607
+ {
608
+ "id": "write",
609
+ "kind": "relationship-write"
610
+ },
611
+ {
612
+ "id": "verify",
613
+ "kind": "relationship-verify"
614
+ }
615
+ ]
616
+ },
617
+ {
618
+ "id": "opx-analysis",
619
+ "name": "Work-item analysis sibling",
620
+ "trigger": "explicit",
621
+ "steps": [
622
+ {
623
+ "id": "analyze",
624
+ "kind": "analysis"
625
+ },
626
+ {
627
+ "id": "write-sibling",
628
+ "kind": "write-content",
629
+ "contentType": "analysis"
630
+ }
631
+ ]
632
+ },
633
+ {
634
+ "id": "opx-workflow",
635
+ "name": "Work-item workflow sibling",
636
+ "trigger": "explicit",
637
+ "steps": [
638
+ {
639
+ "id": "sync-workflow",
640
+ "kind": "workflow-sync"
641
+ },
642
+ {
643
+ "id": "write-sibling",
644
+ "kind": "write-content",
645
+ "contentType": "workflow"
646
+ }
647
+ ]
648
+ }
649
+ ],
650
+ "schedules": [
651
+ {
652
+ "id": "opx-knowledge-hourly",
653
+ "pipelineId": "opx-knowledge-pull",
654
+ "cron": "0 * * * *",
655
+ "timezone": "UTC",
656
+ "enabled": true
657
+ }
658
+ ],
659
+ "services": [
660
+ {
661
+ "id": "opx-normalize",
662
+ "name": "Normalize records",
663
+ "description": "Logical normalize capability for ops knowledge pull",
664
+ "capabilities": [
665
+ "normalize"
666
+ ],
667
+ "inputs": [
668
+ {
669
+ "id": "raw-records",
670
+ "abstractType": "People"
671
+ }
672
+ ],
673
+ "outputs": [
674
+ {
675
+ "id": "normalized-records",
676
+ "abstractType": "People"
677
+ }
678
+ ],
679
+ "invocation": {
680
+ "kind": "worker",
681
+ "operation": "normalize"
682
+ }
683
+ },
684
+ {
685
+ "id": "opx-completion",
686
+ "name": "Field completion",
687
+ "capabilities": [
688
+ "completion"
689
+ ],
690
+ "inputs": [
691
+ {
692
+ "id": "snapshot",
693
+ "abstractType": "People"
694
+ }
695
+ ],
696
+ "outputs": [
697
+ {
698
+ "id": "completed",
699
+ "abstractType": "People"
700
+ }
701
+ ],
702
+ "invocation": {
703
+ "kind": "worker",
704
+ "operation": "complete"
705
+ }
706
+ }
707
+ ]
708
+ }