@x12i/memorix-metadata 3.0.2 → 3.1.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 (72) hide show
  1. package/README.md +10 -6
  2. package/dist/abstracts.d.ts +9 -3
  3. package/dist/abstracts.d.ts.map +1 -1
  4. package/dist/abstracts.js +70 -66
  5. package/dist/abstracts.js.map +1 -1
  6. package/dist/fold-bindings.d.ts +19 -0
  7. package/dist/fold-bindings.d.ts.map +1 -0
  8. package/dist/fold-bindings.js +103 -0
  9. package/dist/fold-bindings.js.map +1 -0
  10. package/dist/index.d.ts +7 -3
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +7 -3
  13. package/dist/index.js.map +1 -1
  14. package/dist/kind-fields.d.ts.map +1 -1
  15. package/dist/kind-fields.js +0 -1
  16. package/dist/kind-fields.js.map +1 -1
  17. package/dist/kinds.d.ts +1 -1
  18. package/dist/kinds.d.ts.map +1 -1
  19. package/dist/kinds.js +6 -11
  20. package/dist/kinds.js.map +1 -1
  21. package/dist/multi-agent-rule.d.ts +3 -3
  22. package/dist/multi-agent-rule.d.ts.map +1 -1
  23. package/dist/multi-agent-rule.js +7 -7
  24. package/dist/multi-agent-rule.js.map +1 -1
  25. package/dist/normalize.d.ts +3 -2
  26. package/dist/normalize.d.ts.map +1 -1
  27. package/dist/normalize.js +18 -5
  28. package/dist/normalize.js.map +1 -1
  29. package/dist/resolve.d.ts +14 -2
  30. package/dist/resolve.d.ts.map +1 -1
  31. package/dist/resolve.js +229 -133
  32. package/dist/resolve.js.map +1 -1
  33. package/dist/streams.d.ts +17 -0
  34. package/dist/streams.d.ts.map +1 -0
  35. package/dist/streams.js +76 -0
  36. package/dist/streams.js.map +1 -0
  37. package/dist/topology.d.ts +52 -0
  38. package/dist/topology.d.ts.map +1 -0
  39. package/dist/topology.js +348 -0
  40. package/dist/topology.js.map +1 -0
  41. package/dist/types.d.ts +133 -17
  42. package/dist/types.d.ts.map +1 -1
  43. package/dist/types.js +22 -2
  44. package/dist/types.js.map +1 -1
  45. package/dist/validate.d.ts.map +1 -1
  46. package/dist/validate.js +188 -64
  47. package/dist/validate.js.map +1 -1
  48. package/examples/custom-kinds/acme-ui-tabs.pack.json +2 -2
  49. package/examples/invalid/agent-classification.json +69 -69
  50. package/examples/invalid/broken-binding.json +69 -69
  51. package/examples/invalid/completion-mapping-with-exec-policy.json +65 -65
  52. package/examples/invalid/missing-parent.json +69 -69
  53. package/examples/invalid/operational-kind-root.json +73 -73
  54. package/examples/invalid/pipeline-unknown-service.json +62 -62
  55. package/examples/invalid/relationship-missing-rules.json +65 -65
  56. package/examples/invalid/relationship-with-storage.json +65 -65
  57. package/examples/invalid/service-with-secrets.json +66 -66
  58. package/examples/knowx/normalized/pack.json +1538 -0
  59. package/examples/{ops → opx}/normalized/pack.json +340 -322
  60. package/examples/opx/raw/abstract-types.json +244 -0
  61. package/examples/{ops → opx}/raw/agents.json +8 -8
  62. package/examples/opx/raw/object-types.json +101 -0
  63. package/examples/{ops → opx}/raw/pipelines-and-sources.json +79 -31
  64. package/examples/{ops → opx}/raw/relationship-definitions.json +17 -47
  65. package/examples/{ops → opx}/raw/view-definitions.json +7 -21
  66. package/examples/opx/raw/write-and-source-mappings.json +223 -0
  67. package/examples/{project-ops → project-opx}/normalized/pack.json +391 -299
  68. package/package.json +1 -1
  69. package/examples/ops/raw/abstract-bindings.json +0 -38
  70. package/examples/ops/raw/abstract-types.json +0 -28
  71. package/examples/ops/raw/object-types.json +0 -170
  72. package/examples/ops/raw/write-and-source-mappings.json +0 -108
@@ -3,43 +3,31 @@
3
3
  {
4
4
  "id": "people-assigned-to-work-items",
5
5
  "name": "People assigned to work items",
6
- "meaning": "A person (employee or contractor) is assigned to perform a work item",
6
+ "meaning": "A person is assigned to perform a work item",
7
7
  "directionality": "directed",
8
- "from": {
9
- "abstractType": "People",
10
- "property": "assignedWorkItems"
11
- },
12
- "to": {
13
- "abstractType": "WorkItems",
14
- "property": "assignedPeople"
15
- },
8
+ "from": { "abstractType": "People", "property": "assignedWorkItems" },
9
+ "to": { "abstractType": "WorkItems", "property": "assignedPeople" },
16
10
  "discoveryRules": [
17
11
  {
18
12
  "id": "from-source-assignee",
19
13
  "kind": "source-field",
20
14
  "sourcePath": "assigneeId",
21
- "notes": "ops-source work-items.assigneeId resolves across employees and contractors"
15
+ "notes": "opx-source work-items.assigneeId resolves to people OT (any identity kind)"
22
16
  }
23
17
  ]
24
18
  },
25
19
  {
26
- "id": "work-items-use-procedures",
27
- "name": "Work items use procedures",
28
- "meaning": "A work item follows one or more reusable procedures",
20
+ "id": "work-items-use-playbooks",
21
+ "name": "Work items use playbooks",
22
+ "meaning": "A work item follows one or more reusable playbooks",
29
23
  "directionality": "directed",
30
- "from": {
31
- "abstractType": "WorkItems",
32
- "property": "usedProcedures"
33
- },
34
- "to": {
35
- "abstractType": "Procedures",
36
- "property": "usedByWorkItems"
37
- },
24
+ "from": { "abstractType": "WorkItems", "property": "usedPlaybooks" },
25
+ "to": { "abstractType": "Playbooks", "property": "usedByWorkItems" },
38
26
  "discoveryRules": [
39
27
  {
40
- "id": "from-source-procedure-ids",
28
+ "id": "from-source-playbook-ids",
41
29
  "kind": "source-field",
42
- "sourcePath": "procedureIds"
30
+ "sourcePath": "playbookIds"
43
31
  }
44
32
  ]
45
33
  },
@@ -48,14 +36,8 @@
48
36
  "name": "Activity events about work items",
49
37
  "meaning": "An activity event reports progress on a work item",
50
38
  "directionality": "directed",
51
- "from": {
52
- "abstractType": "ActivityEvents",
53
- "property": "aboutWorkItems"
54
- },
55
- "to": {
56
- "abstractType": "WorkItems",
57
- "property": "activityEvents"
58
- },
39
+ "from": { "abstractType": "ActivityEvents", "property": "aboutWorkItems" },
40
+ "to": { "abstractType": "WorkItems", "property": "activityEvents" },
59
41
  "discoveryRules": [
60
42
  {
61
43
  "id": "from-source-work-item-id",
@@ -69,14 +51,8 @@
69
51
  "name": "Work items depend on work items",
70
52
  "meaning": "A work item cannot complete until another work item completes",
71
53
  "directionality": "directed",
72
- "from": {
73
- "abstractType": "WorkItems",
74
- "property": "dependsOn"
75
- },
76
- "to": {
77
- "abstractType": "WorkItems",
78
- "property": "dependedOnBy"
79
- },
54
+ "from": { "abstractType": "WorkItems", "property": "dependsOn" },
55
+ "to": { "abstractType": "WorkItems", "property": "dependedOnBy" },
80
56
  "discoveryRules": [
81
57
  {
82
58
  "id": "from-source-depends-on",
@@ -90,14 +66,8 @@
90
66
  "name": "People collaborate with people",
91
67
  "meaning": "Two people collaborate on operational work",
92
68
  "directionality": "undirected",
93
- "from": {
94
- "abstractType": "People",
95
- "property": "collaborators"
96
- },
97
- "to": {
98
- "abstractType": "People",
99
- "property": "collaborators"
100
- },
69
+ "from": { "abstractType": "People", "property": "collaborators" },
70
+ "to": { "abstractType": "People", "property": "collaborators" },
101
71
  "discoveryRules": [
102
72
  {
103
73
  "id": "from-source-collaborator-ids",
@@ -1,42 +1,28 @@
1
1
  {
2
2
  "viewDefinitions": [
3
3
  {
4
- "id": "ops-work-items-list",
4
+ "id": "opx-work-items-list",
5
5
  "kind": "list",
6
6
  "objectType": "work-items",
7
7
  "title": "Work items",
8
- "columns": [
9
- "concept.title",
10
- "data.status",
11
- "data.priority"
12
- ]
8
+ "columns": ["concept.title", "data.status", "data.priority"]
13
9
  },
14
10
  {
15
- "id": "ops-work-items-item",
11
+ "id": "opx-work-items-item",
16
12
  "kind": "item",
17
13
  "objectType": "work-items",
18
14
  "title": "Work item",
19
- "sections": [
20
- "concept",
21
- "data",
22
- "workflow",
23
- "analysis",
24
- "decisions"
25
- ]
15
+ "sections": ["concept", "data", "workflow", "analysis", "decisions"]
26
16
  },
27
17
  {
28
- "id": "ops-people-list",
18
+ "id": "opx-people-list",
29
19
  "kind": "list",
30
20
  "abstractType": "People",
31
21
  "title": "People",
32
- "columns": [
33
- "concept.title",
34
- "objectType",
35
- "data.role"
36
- ]
22
+ "columns": ["concept.title", "objectType", "data.role"]
37
23
  },
38
24
  {
39
- "id": "ops-work-item-expand-people",
25
+ "id": "opx-work-item-expand-people",
40
26
  "kind": "relationship-expansion",
41
27
  "objectType": "work-items",
42
28
  "relationshipDefinitionId": "people-assigned-to-work-items",
@@ -0,0 +1,223 @@
1
+ {
2
+ "writeDefinitions": [
3
+ {
4
+ "id": "opx-people-employee-snapshots",
5
+ "objectType": "people",
6
+ "contentType": "snapshots",
7
+ "identity": {
8
+ "primaryKind": "employeeId",
9
+ "issuer": "opx-source"
10
+ }
11
+ },
12
+ {
13
+ "id": "opx-people-external-snapshots",
14
+ "objectType": "people",
15
+ "contentType": "snapshots",
16
+ "identity": {
17
+ "primaryKind": "externalPersonId",
18
+ "issuer": "opx-source"
19
+ }
20
+ },
21
+ {
22
+ "id": "opx-work-items-snapshots",
23
+ "objectType": "work-items",
24
+ "contentType": "snapshots",
25
+ "identity": {
26
+ "primaryKind": "workItemId",
27
+ "issuer": "opx-source"
28
+ }
29
+ },
30
+ {
31
+ "id": "opx-playbooks-snapshots",
32
+ "objectType": "playbooks",
33
+ "contentType": "snapshots",
34
+ "identity": {
35
+ "primaryKind": "playbookId",
36
+ "issuer": "opx-source"
37
+ }
38
+ },
39
+ {
40
+ "id": "opx-activity-events-snapshots",
41
+ "objectType": "activity-events",
42
+ "contentType": "snapshots",
43
+ "identity": {
44
+ "primaryKind": "activityEventId",
45
+ "issuer": "opx-source"
46
+ }
47
+ }
48
+ ],
49
+ "sourceMappings": [
50
+ {
51
+ "id": "opx-source-employees-to-raw",
52
+ "sourceId": "opx-source",
53
+ "endpoint": "/employees",
54
+ "objectType": "people",
55
+ "contentType": "raw",
56
+ "mode": "knowledge",
57
+ "purpose": "source",
58
+ "map": {
59
+ "recordId": {
60
+ "op": "path",
61
+ "path": "id",
62
+ "required": true
63
+ },
64
+ "objectType": {
65
+ "op": "constant",
66
+ "value": "people"
67
+ },
68
+ "data.displayName": {
69
+ "op": "path",
70
+ "path": "name",
71
+ "required": true
72
+ },
73
+ "data.role": {
74
+ "op": "path",
75
+ "path": "role",
76
+ "required": true
77
+ },
78
+ "data.email": {
79
+ "op": "path",
80
+ "path": "email"
81
+ },
82
+ "data.sourceId": {
83
+ "op": "path",
84
+ "path": "id"
85
+ }
86
+ }
87
+ },
88
+ {
89
+ "id": "opx-source-external-people-to-raw",
90
+ "sourceId": "opx-source",
91
+ "endpoint": "/external-people",
92
+ "objectType": "people",
93
+ "contentType": "raw",
94
+ "mode": "knowledge",
95
+ "purpose": "source",
96
+ "map": {
97
+ "recordId": {
98
+ "op": "path",
99
+ "path": "id",
100
+ "required": true
101
+ },
102
+ "objectType": {
103
+ "op": "constant",
104
+ "value": "people"
105
+ },
106
+ "data.displayName": {
107
+ "op": "path",
108
+ "path": "name",
109
+ "required": true
110
+ },
111
+ "data.role": {
112
+ "op": "path",
113
+ "path": "role",
114
+ "required": true
115
+ },
116
+ "data.organization": {
117
+ "op": "path",
118
+ "path": "organization"
119
+ },
120
+ "data.sourceId": {
121
+ "op": "path",
122
+ "path": "id"
123
+ }
124
+ }
125
+ },
126
+ {
127
+ "id": "opx-source-work-items-to-raw",
128
+ "sourceId": "opx-source",
129
+ "endpoint": "/work-items",
130
+ "objectType": "work-items",
131
+ "contentType": "raw",
132
+ "mode": "knowledge",
133
+ "purpose": "source",
134
+ "map": {
135
+ "data": {
136
+ "op": "path",
137
+ "path": "$"
138
+ }
139
+ }
140
+ },
141
+ {
142
+ "id": "opx-source-work-item-context",
143
+ "sourceId": "opx-source",
144
+ "endpoint": "/work-items/:id/context",
145
+ "objectType": "work-items",
146
+ "contentType": "context",
147
+ "mode": "context",
148
+ "trigger": "on-demand",
149
+ "purpose": "source",
150
+ "map": {
151
+ "data": {
152
+ "op": "path",
153
+ "path": "$"
154
+ }
155
+ }
156
+ }
157
+ ],
158
+ "abstractMappings": [
159
+ {
160
+ "id": "opx-people-abstract",
161
+ "purpose": "abstract",
162
+ "abstractType": "People",
163
+ "objectType": "people",
164
+ "contentType": "snapshots",
165
+ "map": {
166
+ "title": {
167
+ "expr": {
168
+ "op": "path",
169
+ "path": "data.displayName"
170
+ },
171
+ "required": true
172
+ },
173
+ "role": {
174
+ "expr": {
175
+ "op": "path",
176
+ "path": "data.role"
177
+ },
178
+ "required": true
179
+ },
180
+ "lens": {
181
+ "op": "constant",
182
+ "value": "people"
183
+ }
184
+ },
185
+ "reverse": {
186
+ "title": {
187
+ "expr": {
188
+ "op": "path",
189
+ "path": "title"
190
+ },
191
+ "targetPath": "data.displayName"
192
+ }
193
+ }
194
+ }
195
+ ],
196
+ "completionMappings": [
197
+ {
198
+ "id": "opx-work-items-completion-priority",
199
+ "purpose": "completion",
200
+ "objectType": "work-items",
201
+ "contentType": "snapshots",
202
+ "map": {
203
+ "data.priority": {
204
+ "op": "coalesce",
205
+ "exprs": [
206
+ {
207
+ "op": "path",
208
+ "path": "priority"
209
+ },
210
+ {
211
+ "op": "constant",
212
+ "value": "normal"
213
+ }
214
+ ]
215
+ },
216
+ "data.title": {
217
+ "op": "path",
218
+ "path": "title"
219
+ }
220
+ }
221
+ }
222
+ ]
223
+ }