@x12i/memorix-metadata 0.0.0-bootstrap.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/README.md +35 -0
  2. package/dist/abstracts.d.ts +98 -0
  3. package/dist/abstracts.d.ts.map +1 -0
  4. package/dist/abstracts.js +419 -0
  5. package/dist/abstracts.js.map +1 -0
  6. package/dist/fingerprint.d.ts +11 -0
  7. package/dist/fingerprint.d.ts.map +1 -0
  8. package/dist/fingerprint.js +66 -0
  9. package/dist/fingerprint.js.map +1 -0
  10. package/dist/index.d.ts +8 -0
  11. package/dist/index.d.ts.map +1 -0
  12. package/dist/index.js +7 -0
  13. package/dist/index.js.map +1 -0
  14. package/dist/kind-fields.d.ts +13 -0
  15. package/dist/kind-fields.d.ts.map +1 -0
  16. package/dist/kind-fields.js +39 -0
  17. package/dist/kind-fields.js.map +1 -0
  18. package/dist/kinds.d.ts +21 -0
  19. package/dist/kinds.d.ts.map +1 -0
  20. package/dist/kinds.js +147 -0
  21. package/dist/kinds.js.map +1 -0
  22. package/dist/multi-agent-rule.d.ts +15 -0
  23. package/dist/multi-agent-rule.d.ts.map +1 -0
  24. package/dist/multi-agent-rule.js +30 -0
  25. package/dist/multi-agent-rule.js.map +1 -0
  26. package/dist/normalize.d.ts +26 -0
  27. package/dist/normalize.d.ts.map +1 -0
  28. package/dist/normalize.js +114 -0
  29. package/dist/normalize.js.map +1 -0
  30. package/dist/resolve.d.ts +85 -0
  31. package/dist/resolve.d.ts.map +1 -0
  32. package/dist/resolve.js +464 -0
  33. package/dist/resolve.js.map +1 -0
  34. package/dist/types.d.ts +277 -0
  35. package/dist/types.d.ts.map +1 -0
  36. package/dist/types.js +6 -0
  37. package/dist/types.js.map +1 -0
  38. package/dist/validate.d.ts +7 -0
  39. package/dist/validate.d.ts.map +1 -0
  40. package/dist/validate.js +563 -0
  41. package/dist/validate.js.map +1 -0
  42. package/examples/invalid/agent-classification.json +709 -0
  43. package/examples/invalid/broken-binding.json +688 -0
  44. package/examples/invalid/completion-mapping-with-exec-policy.json +659 -0
  45. package/examples/invalid/missing-parent.json +708 -0
  46. package/examples/invalid/operational-kind-root.json +720 -0
  47. package/examples/invalid/pipeline-unknown-service.json +611 -0
  48. package/examples/invalid/relationship-missing-rules.json +624 -0
  49. package/examples/invalid/relationship-with-storage.json +631 -0
  50. package/examples/invalid/service-with-secrets.json +679 -0
  51. package/examples/ops/normalized/pack.json +1010 -0
  52. package/examples/ops/raw/abstract-bindings.json +38 -0
  53. package/examples/ops/raw/abstract-types.json +28 -0
  54. package/examples/ops/raw/agents.json +33 -0
  55. package/examples/ops/raw/object-types.json +170 -0
  56. package/examples/ops/raw/pipelines-and-sources.json +185 -0
  57. package/examples/ops/raw/relationship-definitions.json +110 -0
  58. package/examples/ops/raw/view-definitions.json +46 -0
  59. package/examples/ops/raw/write-and-source-mappings.json +108 -0
  60. package/examples/project-ops/normalized/pack.json +944 -0
  61. package/package.json +49 -0
@@ -0,0 +1,708 @@
1
+ {
2
+ "format": "memorix-metadata/1",
3
+ "agentId": "ops",
4
+ "version": "0.1.0",
5
+ "agents": [
6
+ {
7
+ "id": "ops",
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": "procedures",
140
+ "name": "Procedures",
141
+ "dataCategory": "knowledge",
142
+ "abstractTypes": [
143
+ "Procedures"
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": "Procedures",
195
+ "name": "Procedures",
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 ∪ 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": "procedures-concrete",
227
+ "abstractType": "Procedures",
228
+ "concreteObjectTypes": [
229
+ "procedures"
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": "ops-source work-items.assigneeId resolves across employees and contractors"
262
+ }
263
+ ]
264
+ },
265
+ {
266
+ "id": "work-items-use-procedures",
267
+ "name": "Work items use procedures",
268
+ "meaning": "A work item follows one or more reusable procedures",
269
+ "directionality": "directed",
270
+ "from": {
271
+ "abstractType": "WorkItems",
272
+ "path": "usedProcedures"
273
+ },
274
+ "to": {
275
+ "abstractType": "Procedures",
276
+ "path": "usedByWorkItems"
277
+ },
278
+ "discoveryRules": [
279
+ {
280
+ "id": "from-source-procedure-ids",
281
+ "kind": "source-field",
282
+ "sourcePath": "procedureIds"
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": "ops-source-employees-to-raw",
353
+ "sourceId": "ops-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": "ops-source-work-items-to-raw",
368
+ "sourceId": "ops-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": "ops-source-work-item-context",
383
+ "sourceId": "ops-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": "ops-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": "ops-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": "ops-work-items-list",
426
+ "kind": "list",
427
+ "objectType": "work-items",
428
+ "title": "Work items",
429
+ "columns": [
430
+ "concept.title",
431
+ "data.status",
432
+ "data.priority"
433
+ ]
434
+ },
435
+ {
436
+ "id": "ops-work-items-item",
437
+ "kind": "item",
438
+ "objectType": "work-items",
439
+ "title": "Work item",
440
+ "sections": [
441
+ "concept",
442
+ "data",
443
+ "workflow",
444
+ "analysis",
445
+ "decisions"
446
+ ]
447
+ },
448
+ {
449
+ "id": "ops-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": "ops-work-item-expand-people",
461
+ "kind": "relationship-expansion",
462
+ "objectType": "work-items",
463
+ "relationshipDefinitionId": "people-assigned-to-work-items",
464
+ "direction": "to-from"
465
+ }
466
+ ],
467
+ "writes": [
468
+ {
469
+ "id": "ops-employees-snapshots",
470
+ "objectType": "employees",
471
+ "contentType": "snapshots",
472
+ "identity": {
473
+ "primaryKind": "employeeId",
474
+ "issuer": "ops-source"
475
+ }
476
+ },
477
+ {
478
+ "id": "ops-contractors-snapshots",
479
+ "objectType": "contractors",
480
+ "contentType": "snapshots",
481
+ "identity": {
482
+ "primaryKind": "contractorId",
483
+ "issuer": "ops-source"
484
+ }
485
+ },
486
+ {
487
+ "id": "ops-work-items-snapshots",
488
+ "objectType": "work-items",
489
+ "contentType": "snapshots",
490
+ "identity": {
491
+ "primaryKind": "workItemId",
492
+ "issuer": "ops-source"
493
+ }
494
+ },
495
+ {
496
+ "id": "ops-procedures-snapshots",
497
+ "objectType": "procedures",
498
+ "contentType": "snapshots",
499
+ "identity": {
500
+ "primaryKind": "procedureId",
501
+ "issuer": "ops-source"
502
+ }
503
+ },
504
+ {
505
+ "id": "ops-activity-events-snapshots",
506
+ "objectType": "activity-events",
507
+ "contentType": "snapshots",
508
+ "identity": {
509
+ "primaryKind": "activityEventId",
510
+ "issuer": "ops-source"
511
+ }
512
+ }
513
+ ],
514
+ "sources": [
515
+ {
516
+ "id": "ops-source",
517
+ "name": "Fieldstone ops fixture source",
518
+ "kind": "rest-fixture",
519
+ "baseUrlEnv": "OPS_SOURCE_URL",
520
+ "defaultBaseUrl": "http://127.0.0.1:7099",
521
+ "credentialRef": "ops-source-local",
522
+ "endpoints": [
523
+ "/employees",
524
+ "/contractors",
525
+ "/work-items",
526
+ "/activity-events",
527
+ "/procedures",
528
+ "/work-items/:id/context"
529
+ ]
530
+ }
531
+ ],
532
+ "pipelines": [
533
+ {
534
+ "id": "ops-knowledge-pull",
535
+ "name": "Scheduled knowledge pull from ops-source",
536
+ "trigger": "scheduled",
537
+ "mode": "knowledge",
538
+ "steps": [
539
+ {
540
+ "id": "pull",
541
+ "kind": "memory-pull",
542
+ "sourceId": "ops-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": "ops-normalize"
560
+ },
561
+ {
562
+ "id": "complete",
563
+ "kind": "completion",
564
+ "serviceId": "ops-completion",
565
+ "mappingId": "ops-work-items-completion-priority",
566
+ "completionPolicy": {
567
+ "mode": "fill-missing",
568
+ "maxFields": 20
569
+ }
570
+ }
571
+ ]
572
+ },
573
+ {
574
+ "id": "ops-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": "ops-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": "ops-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": "ops-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": "ops-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": "ops-knowledge-hourly",
653
+ "pipelineId": "ops-knowledge-pull",
654
+ "cron": "0 * * * *",
655
+ "timezone": "UTC",
656
+ "enabled": true
657
+ }
658
+ ],
659
+ "services": [
660
+ {
661
+ "id": "ops-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
+ "schemaRef": "memorix-record/raw"
671
+ }
672
+ ],
673
+ "outputs": [
674
+ {
675
+ "id": "normalized-records",
676
+ "schemaRef": "memorix-record/snapshots"
677
+ }
678
+ ],
679
+ "invocation": {
680
+ "kind": "worker",
681
+ "operation": "normalize"
682
+ }
683
+ },
684
+ {
685
+ "id": "ops-completion",
686
+ "name": "Field completion",
687
+ "capabilities": [
688
+ "completion"
689
+ ],
690
+ "inputs": [
691
+ {
692
+ "id": "snapshot",
693
+ "schemaRef": "memorix-record/snapshots"
694
+ }
695
+ ],
696
+ "outputs": [
697
+ {
698
+ "id": "completed",
699
+ "schemaRef": "memorix-record/snapshots"
700
+ }
701
+ ],
702
+ "invocation": {
703
+ "kind": "worker",
704
+ "operation": "complete"
705
+ }
706
+ }
707
+ ]
708
+ }