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