@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,720 @@
1
+ {
2
+ "format": "memorix-metadata/1",
3
+ "agentId": "ops",
4
+ "version": "0.1.0",
5
+ "agents": [
6
+ {
7
+ "id": "ops",
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-ops",
14
+ "name": "Project Operations (child of ops)",
15
+ "description": "Inheritance smoke agent. Extends ops without replacing core definitions.",
16
+ "parentId": "ops"
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": "procedures",
147
+ "name": "Procedures",
148
+ "dataCategory": "knowledge",
149
+ "abstractTypes": [
150
+ "Procedures"
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": "Procedures",
202
+ "name": "Procedures",
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": "people-employees-contractors",
216
+ "abstractType": "People",
217
+ "concreteObjectTypes": [
218
+ "employees",
219
+ "contractors"
220
+ ],
221
+ "union": true,
222
+ "notes": "People = Employees ∪ Contractors. No abstract records exist."
223
+ },
224
+ {
225
+ "id": "work-items-concrete",
226
+ "abstractType": "WorkItems",
227
+ "concreteObjectTypes": [
228
+ "work-items"
229
+ ],
230
+ "union": false
231
+ },
232
+ {
233
+ "id": "procedures-concrete",
234
+ "abstractType": "Procedures",
235
+ "concreteObjectTypes": [
236
+ "procedures"
237
+ ],
238
+ "union": false
239
+ },
240
+ {
241
+ "id": "activity-events-concrete",
242
+ "abstractType": "ActivityEvents",
243
+ "concreteObjectTypes": [
244
+ "activity-events"
245
+ ],
246
+ "union": false
247
+ }
248
+ ],
249
+ "relationshipDefinitions": [
250
+ {
251
+ "id": "people-assigned-to-work-items",
252
+ "name": "People assigned to work items",
253
+ "meaning": "A person (employee or contractor) is assigned to perform a work item",
254
+ "directionality": "directed",
255
+ "from": {
256
+ "abstractType": "People",
257
+ "path": "assignedWorkItems"
258
+ },
259
+ "to": {
260
+ "abstractType": "WorkItems",
261
+ "path": "assignedPeople"
262
+ },
263
+ "discoveryRules": [
264
+ {
265
+ "id": "from-source-assignee",
266
+ "kind": "source-field",
267
+ "sourcePath": "assigneeId",
268
+ "notes": "ops-source work-items.assigneeId resolves across employees and contractors"
269
+ }
270
+ ]
271
+ },
272
+ {
273
+ "id": "work-items-use-procedures",
274
+ "name": "Work items use procedures",
275
+ "meaning": "A work item follows one or more reusable procedures",
276
+ "directionality": "directed",
277
+ "from": {
278
+ "abstractType": "WorkItems",
279
+ "path": "usedProcedures"
280
+ },
281
+ "to": {
282
+ "abstractType": "Procedures",
283
+ "path": "usedByWorkItems"
284
+ },
285
+ "discoveryRules": [
286
+ {
287
+ "id": "from-source-procedure-ids",
288
+ "kind": "source-field",
289
+ "sourcePath": "procedureIds"
290
+ }
291
+ ]
292
+ },
293
+ {
294
+ "id": "activity-events-about-work-items",
295
+ "name": "Activity events about work items",
296
+ "meaning": "An activity event reports progress on a work item",
297
+ "directionality": "directed",
298
+ "from": {
299
+ "abstractType": "ActivityEvents",
300
+ "path": "aboutWorkItems"
301
+ },
302
+ "to": {
303
+ "abstractType": "WorkItems",
304
+ "path": "activityEvents"
305
+ },
306
+ "discoveryRules": [
307
+ {
308
+ "id": "from-source-work-item-id",
309
+ "kind": "source-field",
310
+ "sourcePath": "workItemId"
311
+ }
312
+ ]
313
+ },
314
+ {
315
+ "id": "work-items-depend-on-work-items",
316
+ "name": "Work items depend on work items",
317
+ "meaning": "A work item cannot complete until another work item completes",
318
+ "directionality": "directed",
319
+ "from": {
320
+ "abstractType": "WorkItems",
321
+ "path": "dependsOn"
322
+ },
323
+ "to": {
324
+ "abstractType": "WorkItems",
325
+ "path": "dependedOnBy"
326
+ },
327
+ "discoveryRules": [
328
+ {
329
+ "id": "from-source-depends-on",
330
+ "kind": "source-field",
331
+ "sourcePath": "dependsOnIds"
332
+ }
333
+ ]
334
+ },
335
+ {
336
+ "id": "people-collaborate-with-people",
337
+ "name": "People collaborate with people",
338
+ "meaning": "Two people collaborate on operational work",
339
+ "directionality": "undirected",
340
+ "from": {
341
+ "abstractType": "People",
342
+ "path": "collaborators"
343
+ },
344
+ "to": {
345
+ "abstractType": "People",
346
+ "path": "collaborators"
347
+ },
348
+ "discoveryRules": [
349
+ {
350
+ "id": "from-source-collaborator-ids",
351
+ "kind": "source-field",
352
+ "sourcePath": "collaboratorIds"
353
+ }
354
+ ]
355
+ }
356
+ ],
357
+ "mappings": [
358
+ {
359
+ "id": "ops-source-employees-to-raw",
360
+ "sourceId": "ops-source",
361
+ "endpoint": "/employees",
362
+ "objectType": "employees",
363
+ "contentType": "raw",
364
+ "mode": "knowledge",
365
+ "map": {
366
+ "data": {
367
+ "op": "path",
368
+ "path": "$"
369
+ }
370
+ },
371
+ "purpose": "source"
372
+ },
373
+ {
374
+ "id": "ops-source-work-items-to-raw",
375
+ "sourceId": "ops-source",
376
+ "endpoint": "/work-items",
377
+ "objectType": "work-items",
378
+ "contentType": "raw",
379
+ "mode": "knowledge",
380
+ "map": {
381
+ "data": {
382
+ "op": "path",
383
+ "path": "$"
384
+ }
385
+ },
386
+ "purpose": "source"
387
+ },
388
+ {
389
+ "id": "ops-source-work-item-context",
390
+ "sourceId": "ops-source",
391
+ "endpoint": "/work-items/:id/context",
392
+ "objectType": "work-items",
393
+ "contentType": "context",
394
+ "mode": "context",
395
+ "trigger": "on-demand",
396
+ "map": {
397
+ "data": {
398
+ "op": "path",
399
+ "path": "$"
400
+ }
401
+ },
402
+ "purpose": "source"
403
+ },
404
+ {
405
+ "id": "ops-people-abstract-title",
406
+ "purpose": "abstract",
407
+ "abstractType": "People",
408
+ "objectType": "employees",
409
+ "contentType": "snapshots",
410
+ "map": {
411
+ "concept.title": {
412
+ "op": "path",
413
+ "path": "data.displayName"
414
+ }
415
+ }
416
+ },
417
+ {
418
+ "id": "ops-work-items-completion-priority",
419
+ "purpose": "completion",
420
+ "objectType": "work-items",
421
+ "contentType": "snapshots",
422
+ "map": {
423
+ "data.priority": {
424
+ "op": "default",
425
+ "value": "normal"
426
+ }
427
+ }
428
+ }
429
+ ],
430
+ "views": [
431
+ {
432
+ "id": "ops-work-items-list",
433
+ "kind": "list",
434
+ "objectType": "work-items",
435
+ "title": "Work items",
436
+ "columns": [
437
+ "concept.title",
438
+ "data.status",
439
+ "data.priority"
440
+ ]
441
+ },
442
+ {
443
+ "id": "ops-work-items-item",
444
+ "kind": "item",
445
+ "objectType": "work-items",
446
+ "title": "Work item",
447
+ "sections": [
448
+ "concept",
449
+ "data",
450
+ "workflow",
451
+ "analysis",
452
+ "decisions"
453
+ ]
454
+ },
455
+ {
456
+ "id": "ops-people-list",
457
+ "kind": "list",
458
+ "abstractType": "People",
459
+ "title": "People",
460
+ "columns": [
461
+ "concept.title",
462
+ "objectType",
463
+ "data.role"
464
+ ]
465
+ },
466
+ {
467
+ "id": "ops-work-item-expand-people",
468
+ "kind": "relationship-expansion",
469
+ "objectType": "work-items",
470
+ "relationshipDefinitionId": "people-assigned-to-work-items",
471
+ "direction": "to-from"
472
+ }
473
+ ],
474
+ "writes": [
475
+ {
476
+ "id": "ops-employees-snapshots",
477
+ "objectType": "employees",
478
+ "contentType": "snapshots",
479
+ "identity": {
480
+ "primaryKind": "employeeId",
481
+ "issuer": "ops-source"
482
+ }
483
+ },
484
+ {
485
+ "id": "ops-contractors-snapshots",
486
+ "objectType": "contractors",
487
+ "contentType": "snapshots",
488
+ "identity": {
489
+ "primaryKind": "contractorId",
490
+ "issuer": "ops-source"
491
+ }
492
+ },
493
+ {
494
+ "id": "ops-work-items-snapshots",
495
+ "objectType": "work-items",
496
+ "contentType": "snapshots",
497
+ "identity": {
498
+ "primaryKind": "workItemId",
499
+ "issuer": "ops-source"
500
+ }
501
+ },
502
+ {
503
+ "id": "ops-procedures-snapshots",
504
+ "objectType": "procedures",
505
+ "contentType": "snapshots",
506
+ "identity": {
507
+ "primaryKind": "procedureId",
508
+ "issuer": "ops-source"
509
+ }
510
+ },
511
+ {
512
+ "id": "ops-activity-events-snapshots",
513
+ "objectType": "activity-events",
514
+ "contentType": "snapshots",
515
+ "identity": {
516
+ "primaryKind": "activityEventId",
517
+ "issuer": "ops-source"
518
+ }
519
+ }
520
+ ],
521
+ "sources": [
522
+ {
523
+ "id": "ops-source",
524
+ "name": "Fieldstone ops fixture source",
525
+ "kind": "rest-fixture",
526
+ "baseUrlEnv": "OPS_SOURCE_URL",
527
+ "defaultBaseUrl": "http://127.0.0.1:7099",
528
+ "credentialRef": "ops-source-local",
529
+ "endpoints": [
530
+ "/employees",
531
+ "/contractors",
532
+ "/work-items",
533
+ "/activity-events",
534
+ "/procedures",
535
+ "/work-items/:id/context"
536
+ ]
537
+ }
538
+ ],
539
+ "pipelines": [
540
+ {
541
+ "id": "ops-knowledge-pull",
542
+ "name": "Scheduled knowledge pull from ops-source",
543
+ "trigger": "scheduled",
544
+ "mode": "knowledge",
545
+ "steps": [
546
+ {
547
+ "id": "pull",
548
+ "kind": "memory-pull",
549
+ "sourceId": "ops-source"
550
+ },
551
+ {
552
+ "id": "land-raw",
553
+ "kind": "write-raw"
554
+ },
555
+ {
556
+ "id": "normalize",
557
+ "kind": "normalize"
558
+ },
559
+ {
560
+ "id": "promote",
561
+ "kind": "promote-snapshots"
562
+ },
563
+ {
564
+ "id": "normalize-svc",
565
+ "kind": "invoke-service",
566
+ "serviceId": "ops-normalize"
567
+ },
568
+ {
569
+ "id": "complete",
570
+ "kind": "completion",
571
+ "serviceId": "ops-completion",
572
+ "mappingId": "ops-work-items-completion-priority",
573
+ "completionPolicy": {
574
+ "mode": "fill-missing",
575
+ "maxFields": 20
576
+ }
577
+ }
578
+ ]
579
+ },
580
+ {
581
+ "id": "ops-context-pull",
582
+ "name": "On-demand work-item context pull",
583
+ "trigger": "on-demand",
584
+ "mode": "context",
585
+ "steps": [
586
+ {
587
+ "id": "pull",
588
+ "kind": "memory-pull",
589
+ "sourceId": "ops-source"
590
+ },
591
+ {
592
+ "id": "land-raw",
593
+ "kind": "write-raw"
594
+ },
595
+ {
596
+ "id": "normalize-context",
597
+ "kind": "normalize-context"
598
+ },
599
+ {
600
+ "id": "ttl",
601
+ "kind": "apply-ttl"
602
+ }
603
+ ]
604
+ },
605
+ {
606
+ "id": "ops-relationship-build",
607
+ "name": "Discover and write lightweight relationships",
608
+ "trigger": "explicit",
609
+ "steps": [
610
+ {
611
+ "id": "discover",
612
+ "kind": "relationship-discover"
613
+ },
614
+ {
615
+ "id": "write",
616
+ "kind": "relationship-write"
617
+ },
618
+ {
619
+ "id": "verify",
620
+ "kind": "relationship-verify"
621
+ }
622
+ ]
623
+ },
624
+ {
625
+ "id": "ops-analysis",
626
+ "name": "Work-item analysis sibling",
627
+ "trigger": "explicit",
628
+ "steps": [
629
+ {
630
+ "id": "analyze",
631
+ "kind": "analysis"
632
+ },
633
+ {
634
+ "id": "write-sibling",
635
+ "kind": "write-content",
636
+ "contentType": "analysis"
637
+ }
638
+ ]
639
+ },
640
+ {
641
+ "id": "ops-workflow",
642
+ "name": "Work-item workflow sibling",
643
+ "trigger": "explicit",
644
+ "steps": [
645
+ {
646
+ "id": "sync-workflow",
647
+ "kind": "workflow-sync"
648
+ },
649
+ {
650
+ "id": "write-sibling",
651
+ "kind": "write-content",
652
+ "contentType": "workflow"
653
+ }
654
+ ]
655
+ }
656
+ ],
657
+ "schedules": [
658
+ {
659
+ "id": "ops-knowledge-hourly",
660
+ "pipelineId": "ops-knowledge-pull",
661
+ "cron": "0 * * * *",
662
+ "timezone": "UTC",
663
+ "enabled": true
664
+ }
665
+ ],
666
+ "pipeline-runs": [
667
+ {
668
+ "id": "run-1"
669
+ }
670
+ ],
671
+ "services": [
672
+ {
673
+ "id": "ops-normalize",
674
+ "name": "Normalize records",
675
+ "description": "Logical normalize capability for ops knowledge pull",
676
+ "capabilities": [
677
+ "normalize"
678
+ ],
679
+ "inputs": [
680
+ {
681
+ "id": "raw-records",
682
+ "schemaRef": "memorix-record/raw"
683
+ }
684
+ ],
685
+ "outputs": [
686
+ {
687
+ "id": "normalized-records",
688
+ "schemaRef": "memorix-record/snapshots"
689
+ }
690
+ ],
691
+ "invocation": {
692
+ "kind": "worker",
693
+ "operation": "normalize"
694
+ }
695
+ },
696
+ {
697
+ "id": "ops-completion",
698
+ "name": "Field completion",
699
+ "capabilities": [
700
+ "completion"
701
+ ],
702
+ "inputs": [
703
+ {
704
+ "id": "snapshot",
705
+ "schemaRef": "memorix-record/snapshots"
706
+ }
707
+ ],
708
+ "outputs": [
709
+ {
710
+ "id": "completed",
711
+ "schemaRef": "memorix-record/snapshots"
712
+ }
713
+ ],
714
+ "invocation": {
715
+ "kind": "worker",
716
+ "operation": "complete"
717
+ }
718
+ }
719
+ ]
720
+ }