@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,709 @@
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": 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": "procedures",
141
+ "name": "Procedures",
142
+ "dataCategory": "knowledge",
143
+ "abstractTypes": [
144
+ "Procedures"
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": "Procedures",
196
+ "name": "Procedures",
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 ∪ 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": "procedures-concrete",
228
+ "abstractType": "Procedures",
229
+ "concreteObjectTypes": [
230
+ "procedures"
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": "ops-source work-items.assigneeId resolves across employees and contractors"
263
+ }
264
+ ]
265
+ },
266
+ {
267
+ "id": "work-items-use-procedures",
268
+ "name": "Work items use procedures",
269
+ "meaning": "A work item follows one or more reusable procedures",
270
+ "directionality": "directed",
271
+ "from": {
272
+ "abstractType": "WorkItems",
273
+ "path": "usedProcedures"
274
+ },
275
+ "to": {
276
+ "abstractType": "Procedures",
277
+ "path": "usedByWorkItems"
278
+ },
279
+ "discoveryRules": [
280
+ {
281
+ "id": "from-source-procedure-ids",
282
+ "kind": "source-field",
283
+ "sourcePath": "procedureIds"
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": "ops-source-employees-to-raw",
354
+ "sourceId": "ops-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": "ops-source-work-items-to-raw",
369
+ "sourceId": "ops-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": "ops-source-work-item-context",
384
+ "sourceId": "ops-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": "ops-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": "ops-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": "ops-work-items-list",
427
+ "kind": "list",
428
+ "objectType": "work-items",
429
+ "title": "Work items",
430
+ "columns": [
431
+ "concept.title",
432
+ "data.status",
433
+ "data.priority"
434
+ ]
435
+ },
436
+ {
437
+ "id": "ops-work-items-item",
438
+ "kind": "item",
439
+ "objectType": "work-items",
440
+ "title": "Work item",
441
+ "sections": [
442
+ "concept",
443
+ "data",
444
+ "workflow",
445
+ "analysis",
446
+ "decisions"
447
+ ]
448
+ },
449
+ {
450
+ "id": "ops-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": "ops-work-item-expand-people",
462
+ "kind": "relationship-expansion",
463
+ "objectType": "work-items",
464
+ "relationshipDefinitionId": "people-assigned-to-work-items",
465
+ "direction": "to-from"
466
+ }
467
+ ],
468
+ "writes": [
469
+ {
470
+ "id": "ops-employees-snapshots",
471
+ "objectType": "employees",
472
+ "contentType": "snapshots",
473
+ "identity": {
474
+ "primaryKind": "employeeId",
475
+ "issuer": "ops-source"
476
+ }
477
+ },
478
+ {
479
+ "id": "ops-contractors-snapshots",
480
+ "objectType": "contractors",
481
+ "contentType": "snapshots",
482
+ "identity": {
483
+ "primaryKind": "contractorId",
484
+ "issuer": "ops-source"
485
+ }
486
+ },
487
+ {
488
+ "id": "ops-work-items-snapshots",
489
+ "objectType": "work-items",
490
+ "contentType": "snapshots",
491
+ "identity": {
492
+ "primaryKind": "workItemId",
493
+ "issuer": "ops-source"
494
+ }
495
+ },
496
+ {
497
+ "id": "ops-procedures-snapshots",
498
+ "objectType": "procedures",
499
+ "contentType": "snapshots",
500
+ "identity": {
501
+ "primaryKind": "procedureId",
502
+ "issuer": "ops-source"
503
+ }
504
+ },
505
+ {
506
+ "id": "ops-activity-events-snapshots",
507
+ "objectType": "activity-events",
508
+ "contentType": "snapshots",
509
+ "identity": {
510
+ "primaryKind": "activityEventId",
511
+ "issuer": "ops-source"
512
+ }
513
+ }
514
+ ],
515
+ "sources": [
516
+ {
517
+ "id": "ops-source",
518
+ "name": "Fieldstone ops fixture source",
519
+ "kind": "rest-fixture",
520
+ "baseUrlEnv": "OPS_SOURCE_URL",
521
+ "defaultBaseUrl": "http://127.0.0.1:7099",
522
+ "credentialRef": "ops-source-local",
523
+ "endpoints": [
524
+ "/employees",
525
+ "/contractors",
526
+ "/work-items",
527
+ "/activity-events",
528
+ "/procedures",
529
+ "/work-items/:id/context"
530
+ ]
531
+ }
532
+ ],
533
+ "pipelines": [
534
+ {
535
+ "id": "ops-knowledge-pull",
536
+ "name": "Scheduled knowledge pull from ops-source",
537
+ "trigger": "scheduled",
538
+ "mode": "knowledge",
539
+ "steps": [
540
+ {
541
+ "id": "pull",
542
+ "kind": "memory-pull",
543
+ "sourceId": "ops-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": "ops-normalize"
561
+ },
562
+ {
563
+ "id": "complete",
564
+ "kind": "completion",
565
+ "serviceId": "ops-completion",
566
+ "mappingId": "ops-work-items-completion-priority",
567
+ "completionPolicy": {
568
+ "mode": "fill-missing",
569
+ "maxFields": 20
570
+ }
571
+ }
572
+ ]
573
+ },
574
+ {
575
+ "id": "ops-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": "ops-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": "ops-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": "ops-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": "ops-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": "ops-knowledge-hourly",
654
+ "pipelineId": "ops-knowledge-pull",
655
+ "cron": "0 * * * *",
656
+ "timezone": "UTC",
657
+ "enabled": true
658
+ }
659
+ ],
660
+ "services": [
661
+ {
662
+ "id": "ops-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
+ "schemaRef": "memorix-record/raw"
672
+ }
673
+ ],
674
+ "outputs": [
675
+ {
676
+ "id": "normalized-records",
677
+ "schemaRef": "memorix-record/snapshots"
678
+ }
679
+ ],
680
+ "invocation": {
681
+ "kind": "worker",
682
+ "operation": "normalize"
683
+ }
684
+ },
685
+ {
686
+ "id": "ops-completion",
687
+ "name": "Field completion",
688
+ "capabilities": [
689
+ "completion"
690
+ ],
691
+ "inputs": [
692
+ {
693
+ "id": "snapshot",
694
+ "schemaRef": "memorix-record/snapshots"
695
+ }
696
+ ],
697
+ "outputs": [
698
+ {
699
+ "id": "completed",
700
+ "schemaRef": "memorix-record/snapshots"
701
+ }
702
+ ],
703
+ "invocation": {
704
+ "kind": "worker",
705
+ "operation": "complete"
706
+ }
707
+ }
708
+ ]
709
+ }