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