@murphai/contracts 0.1.1

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 (89) hide show
  1. package/LICENSE +674 -0
  2. package/README.md +24 -0
  3. package/dist/bank-entities.d.ts +35 -0
  4. package/dist/bank-entities.d.ts.map +1 -0
  5. package/dist/bank-entities.js +164 -0
  6. package/dist/bank-entities.js.map +1 -0
  7. package/dist/command-capabilities.d.ts +50 -0
  8. package/dist/command-capabilities.d.ts.map +1 -0
  9. package/dist/command-capabilities.js +149 -0
  10. package/dist/command-capabilities.js.map +1 -0
  11. package/dist/constants.d.ts +149 -0
  12. package/dist/constants.d.ts.map +1 -0
  13. package/dist/constants.js +232 -0
  14. package/dist/constants.js.map +1 -0
  15. package/dist/examples.d.ts +31 -0
  16. package/dist/examples.d.ts.map +1 -0
  17. package/dist/examples.js +943 -0
  18. package/dist/examples.js.map +1 -0
  19. package/dist/frontmatter.d.ts +28 -0
  20. package/dist/frontmatter.d.ts.map +1 -0
  21. package/dist/frontmatter.js +272 -0
  22. package/dist/frontmatter.js.map +1 -0
  23. package/dist/health-entities.d.ts +87 -0
  24. package/dist/health-entities.d.ts.map +1 -0
  25. package/dist/health-entities.js +349 -0
  26. package/dist/health-entities.js.map +1 -0
  27. package/dist/ids.d.ts +10 -0
  28. package/dist/ids.d.ts.map +1 -0
  29. package/dist/ids.js +27 -0
  30. package/dist/ids.js.map +1 -0
  31. package/dist/index.d.ts +16 -0
  32. package/dist/index.d.ts.map +1 -0
  33. package/dist/index.js +16 -0
  34. package/dist/index.js.map +1 -0
  35. package/dist/registry-helpers.d.ts +31 -0
  36. package/dist/registry-helpers.d.ts.map +1 -0
  37. package/dist/registry-helpers.js +53 -0
  38. package/dist/registry-helpers.js.map +1 -0
  39. package/dist/schemas.d.ts +47 -0
  40. package/dist/schemas.d.ts.map +1 -0
  41. package/dist/schemas.js +50 -0
  42. package/dist/schemas.js.map +1 -0
  43. package/dist/scripts/generate-json-schema.js +13 -0
  44. package/dist/scripts/generate-json-schema.js.map +1 -0
  45. package/dist/scripts/verify.js +230 -0
  46. package/dist/scripts/verify.js.map +1 -0
  47. package/dist/shares.d.ts +715 -0
  48. package/dist/shares.d.ts.map +1 -0
  49. package/dist/shares.js +469 -0
  50. package/dist/shares.js.map +1 -0
  51. package/dist/time.d.ts +25 -0
  52. package/dist/time.d.ts.map +1 -0
  53. package/dist/time.js +241 -0
  54. package/dist/time.js.map +1 -0
  55. package/dist/tsconfig.build.tsbuildinfo +1 -0
  56. package/dist/types.d.ts +34 -0
  57. package/dist/types.d.ts.map +1 -0
  58. package/dist/types.js +2 -0
  59. package/dist/types.js.map +1 -0
  60. package/dist/validate.d.ts +18 -0
  61. package/dist/validate.d.ts.map +1 -0
  62. package/dist/validate.js +129 -0
  63. package/dist/validate.js.map +1 -0
  64. package/dist/zod.d.ts +1626 -0
  65. package/dist/zod.d.ts.map +1 -0
  66. package/dist/zod.js +834 -0
  67. package/dist/zod.js.map +1 -0
  68. package/generated/assessment-response.schema.json +101 -0
  69. package/generated/audit-record.schema.json +141 -0
  70. package/generated/event-record.schema.json +2708 -0
  71. package/generated/frontmatter-allergy.schema.json +82 -0
  72. package/generated/frontmatter-condition.schema.json +101 -0
  73. package/generated/frontmatter-core.schema.json +51 -0
  74. package/generated/frontmatter-experiment.schema.json +70 -0
  75. package/generated/frontmatter-family-member.schema.json +68 -0
  76. package/generated/frontmatter-food.schema.json +128 -0
  77. package/generated/frontmatter-genetic-variant.schema.json +81 -0
  78. package/generated/frontmatter-goal.schema.json +116 -0
  79. package/generated/frontmatter-journal-day.schema.json +52 -0
  80. package/generated/frontmatter-profile-current.schema.json +55 -0
  81. package/generated/frontmatter-protocol.schema.json +153 -0
  82. package/generated/frontmatter-provider.schema.json +81 -0
  83. package/generated/frontmatter-recipe.schema.json +124 -0
  84. package/generated/frontmatter-workout-format.schema.json +163 -0
  85. package/generated/inbox-capture-record.schema.json +332 -0
  86. package/generated/profile-snapshot.schema.json +131 -0
  87. package/generated/sample-record.schema.json +726 -0
  88. package/generated/vault-metadata.schema.json +324 -0
  89. package/package.json +69 -0
@@ -0,0 +1,332 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "schemaVersion": {
6
+ "type": "string",
7
+ "const": "murph.inbox-capture.v1"
8
+ },
9
+ "captureId": {
10
+ "type": "string",
11
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]*$"
12
+ },
13
+ "identityKey": {
14
+ "type": "string",
15
+ "minLength": 1,
16
+ "maxLength": 1024
17
+ },
18
+ "eventId": {
19
+ "type": "string",
20
+ "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
21
+ },
22
+ "auditId": {
23
+ "type": "string",
24
+ "pattern": "^aud_[0-9A-HJKMNP-TV-Z]{26}$"
25
+ },
26
+ "source": {
27
+ "type": "string",
28
+ "minLength": 1,
29
+ "maxLength": 160
30
+ },
31
+ "accountId": {
32
+ "anyOf": [
33
+ {
34
+ "type": "string",
35
+ "minLength": 1,
36
+ "maxLength": 255
37
+ },
38
+ {
39
+ "type": "null"
40
+ }
41
+ ]
42
+ },
43
+ "externalId": {
44
+ "type": "string",
45
+ "minLength": 1,
46
+ "maxLength": 255
47
+ },
48
+ "thread": {
49
+ "type": "object",
50
+ "properties": {
51
+ "id": {
52
+ "type": "string",
53
+ "minLength": 1,
54
+ "maxLength": 4000
55
+ },
56
+ "title": {
57
+ "anyOf": [
58
+ {
59
+ "type": "string",
60
+ "minLength": 1,
61
+ "maxLength": 4000
62
+ },
63
+ {
64
+ "type": "null"
65
+ }
66
+ ]
67
+ },
68
+ "isDirect": {
69
+ "anyOf": [
70
+ {
71
+ "type": "boolean"
72
+ },
73
+ {
74
+ "type": "null"
75
+ }
76
+ ]
77
+ }
78
+ },
79
+ "required": [
80
+ "id",
81
+ "isDirect"
82
+ ],
83
+ "additionalProperties": false
84
+ },
85
+ "actor": {
86
+ "type": "object",
87
+ "properties": {
88
+ "id": {
89
+ "anyOf": [
90
+ {
91
+ "type": "string",
92
+ "minLength": 1,
93
+ "maxLength": 255
94
+ },
95
+ {
96
+ "type": "null"
97
+ }
98
+ ]
99
+ },
100
+ "displayName": {
101
+ "anyOf": [
102
+ {
103
+ "type": "string",
104
+ "minLength": 1,
105
+ "maxLength": 255
106
+ },
107
+ {
108
+ "type": "null"
109
+ }
110
+ ]
111
+ },
112
+ "isSelf": {
113
+ "type": "boolean"
114
+ }
115
+ },
116
+ "required": [
117
+ "isSelf"
118
+ ],
119
+ "additionalProperties": false
120
+ },
121
+ "occurredAt": {
122
+ "type": "string",
123
+ "format": "date-time"
124
+ },
125
+ "recordedAt": {
126
+ "type": "string",
127
+ "format": "date-time"
128
+ },
129
+ "receivedAt": {
130
+ "anyOf": [
131
+ {
132
+ "type": "string",
133
+ "format": "date-time"
134
+ },
135
+ {
136
+ "type": "null"
137
+ }
138
+ ]
139
+ },
140
+ "text": {
141
+ "anyOf": [
142
+ {
143
+ "type": "string",
144
+ "minLength": 1,
145
+ "maxLength": 4000
146
+ },
147
+ {
148
+ "type": "null"
149
+ }
150
+ ]
151
+ },
152
+ "raw": {
153
+ "type": "object",
154
+ "properties": {},
155
+ "additionalProperties": {
156
+ "$ref": "#/$defs/__schema0"
157
+ }
158
+ },
159
+ "sourceDirectory": {
160
+ "type": "string",
161
+ "pattern": "^(?!\\/)(?!.*(?:^|\\/)\\.\\.(?:\\/|$))[A-Za-z0-9._/-]+$"
162
+ },
163
+ "envelopePath": {
164
+ "type": "string",
165
+ "pattern": "^(?!\\/)(?!.*(?:^|\\/)\\.\\.(?:\\/|$))[A-Za-z0-9._/-]+$"
166
+ },
167
+ "rawRefs": {
168
+ "type": "array",
169
+ "items": {
170
+ "type": "string",
171
+ "pattern": "^(?!\\/)(?!.*(?:^|\\/)\\.\\.(?:\\/|$))[A-Za-z0-9._/-]+$"
172
+ },
173
+ "uniqueItems": true
174
+ },
175
+ "attachments": {
176
+ "type": "array",
177
+ "items": {
178
+ "type": "object",
179
+ "properties": {
180
+ "attachmentId": {
181
+ "type": "string",
182
+ "pattern": "^att_[A-Za-z0-9][A-Za-z0-9_-]*_[0-9]{2}$"
183
+ },
184
+ "ordinal": {
185
+ "type": "integer",
186
+ "minimum": 1
187
+ },
188
+ "externalId": {
189
+ "anyOf": [
190
+ {
191
+ "type": "string",
192
+ "minLength": 1,
193
+ "maxLength": 255
194
+ },
195
+ {
196
+ "type": "null"
197
+ }
198
+ ]
199
+ },
200
+ "kind": {
201
+ "type": "string",
202
+ "enum": [
203
+ "image",
204
+ "audio",
205
+ "video",
206
+ "document",
207
+ "other"
208
+ ]
209
+ },
210
+ "mime": {
211
+ "anyOf": [
212
+ {
213
+ "type": "string",
214
+ "minLength": 1,
215
+ "maxLength": 255
216
+ },
217
+ {
218
+ "type": "null"
219
+ }
220
+ ]
221
+ },
222
+ "originalPath": {
223
+ "type": "null"
224
+ },
225
+ "fileName": {
226
+ "anyOf": [
227
+ {
228
+ "type": "string",
229
+ "minLength": 1,
230
+ "maxLength": 255
231
+ },
232
+ {
233
+ "type": "null"
234
+ }
235
+ ]
236
+ },
237
+ "byteSize": {
238
+ "anyOf": [
239
+ {
240
+ "type": "integer",
241
+ "minimum": 0
242
+ },
243
+ {
244
+ "type": "null"
245
+ }
246
+ ]
247
+ },
248
+ "storedPath": {
249
+ "anyOf": [
250
+ {
251
+ "type": "string",
252
+ "pattern": "^(?!\\/)(?!.*(?:^|\\/)\\.\\.(?:\\/|$))[A-Za-z0-9._/-]+$"
253
+ },
254
+ {
255
+ "type": "null"
256
+ }
257
+ ]
258
+ },
259
+ "sha256": {
260
+ "anyOf": [
261
+ {
262
+ "type": "string",
263
+ "pattern": "^[a-f0-9]{64}$"
264
+ },
265
+ {
266
+ "type": "null"
267
+ }
268
+ ]
269
+ }
270
+ },
271
+ "required": [
272
+ "attachmentId",
273
+ "ordinal",
274
+ "kind"
275
+ ],
276
+ "additionalProperties": false
277
+ }
278
+ }
279
+ },
280
+ "required": [
281
+ "schemaVersion",
282
+ "captureId",
283
+ "identityKey",
284
+ "eventId",
285
+ "auditId",
286
+ "source",
287
+ "externalId",
288
+ "thread",
289
+ "actor",
290
+ "occurredAt",
291
+ "recordedAt",
292
+ "raw",
293
+ "sourceDirectory",
294
+ "envelopePath",
295
+ "rawRefs",
296
+ "attachments"
297
+ ],
298
+ "additionalProperties": false,
299
+ "$id": "@murphai/contracts/inbox-capture-record.schema.json",
300
+ "title": "Murph Inbox Capture Record",
301
+ "$defs": {
302
+ "__schema0": {
303
+ "anyOf": [
304
+ {
305
+ "type": "string"
306
+ },
307
+ {
308
+ "type": "number"
309
+ },
310
+ {
311
+ "type": "boolean"
312
+ },
313
+ {
314
+ "type": "null"
315
+ },
316
+ {
317
+ "type": "array",
318
+ "items": {
319
+ "$ref": "#/$defs/__schema0"
320
+ }
321
+ },
322
+ {
323
+ "type": "object",
324
+ "properties": {},
325
+ "additionalProperties": {
326
+ "$ref": "#/$defs/__schema0"
327
+ }
328
+ }
329
+ ]
330
+ }
331
+ }
332
+ }
@@ -0,0 +1,131 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "schemaVersion": {
6
+ "type": "string",
7
+ "const": "murph.profile-snapshot.v1"
8
+ },
9
+ "id": {
10
+ "type": "string",
11
+ "pattern": "^psnap_[0-9A-HJKMNP-TV-Z]{26}$"
12
+ },
13
+ "recordedAt": {
14
+ "type": "string",
15
+ "format": "date-time"
16
+ },
17
+ "source": {
18
+ "type": "string",
19
+ "enum": [
20
+ "assessment_projection",
21
+ "manual",
22
+ "derived"
23
+ ]
24
+ },
25
+ "sourceAssessmentIds": {
26
+ "type": "array",
27
+ "items": {
28
+ "type": "string",
29
+ "pattern": "^asmt_[0-9A-HJKMNP-TV-Z]{26}$"
30
+ },
31
+ "uniqueItems": true
32
+ },
33
+ "sourceEventIds": {
34
+ "type": "array",
35
+ "items": {
36
+ "type": "string",
37
+ "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
38
+ },
39
+ "uniqueItems": true
40
+ },
41
+ "profile": {
42
+ "type": "object",
43
+ "properties": {
44
+ "narrative": {
45
+ "type": "object",
46
+ "properties": {
47
+ "summary": {
48
+ "type": "string",
49
+ "minLength": 1,
50
+ "maxLength": 4000
51
+ },
52
+ "highlights": {
53
+ "maxItems": 25,
54
+ "type": "array",
55
+ "items": {
56
+ "type": "string",
57
+ "minLength": 1,
58
+ "maxLength": 240
59
+ },
60
+ "uniqueItems": true
61
+ }
62
+ },
63
+ "additionalProperties": false
64
+ },
65
+ "goals": {
66
+ "type": "object",
67
+ "properties": {
68
+ "topGoalIds": {
69
+ "type": "array",
70
+ "items": {
71
+ "type": "string",
72
+ "pattern": "^goal_[0-9A-HJKMNP-TV-Z]{26}$"
73
+ },
74
+ "uniqueItems": true
75
+ }
76
+ },
77
+ "additionalProperties": false
78
+ },
79
+ "custom": {
80
+ "type": "object",
81
+ "properties": {},
82
+ "additionalProperties": {
83
+ "$ref": "#/$defs/__schema0"
84
+ }
85
+ }
86
+ },
87
+ "additionalProperties": false
88
+ }
89
+ },
90
+ "required": [
91
+ "schemaVersion",
92
+ "id",
93
+ "recordedAt",
94
+ "source",
95
+ "profile"
96
+ ],
97
+ "additionalProperties": false,
98
+ "$id": "@murphai/contracts/profile-snapshot.schema.json",
99
+ "title": "Murph Profile Snapshot",
100
+ "$defs": {
101
+ "__schema0": {
102
+ "anyOf": [
103
+ {
104
+ "type": "string"
105
+ },
106
+ {
107
+ "type": "number"
108
+ },
109
+ {
110
+ "type": "boolean"
111
+ },
112
+ {
113
+ "type": "null"
114
+ },
115
+ {
116
+ "type": "array",
117
+ "items": {
118
+ "$ref": "#/$defs/__schema0"
119
+ }
120
+ },
121
+ {
122
+ "type": "object",
123
+ "properties": {},
124
+ "additionalProperties": {
125
+ "$ref": "#/$defs/__schema0"
126
+ }
127
+ }
128
+ ]
129
+ }
130
+ }
131
+ }