@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,52 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "schemaVersion": {
6
+ "type": "string",
7
+ "const": "murph.frontmatter.journal-day.v1"
8
+ },
9
+ "docType": {
10
+ "type": "string",
11
+ "const": "journal_day"
12
+ },
13
+ "dayKey": {
14
+ "type": "string",
15
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
16
+ },
17
+ "eventIds": {
18
+ "type": "array",
19
+ "items": {
20
+ "type": "string",
21
+ "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
22
+ },
23
+ "uniqueItems": true
24
+ },
25
+ "sampleStreams": {
26
+ "type": "array",
27
+ "items": {
28
+ "type": "string",
29
+ "enum": [
30
+ "heart_rate",
31
+ "hrv",
32
+ "steps",
33
+ "sleep_stage",
34
+ "respiratory_rate",
35
+ "temperature",
36
+ "glucose"
37
+ ]
38
+ },
39
+ "uniqueItems": true
40
+ }
41
+ },
42
+ "required": [
43
+ "schemaVersion",
44
+ "docType",
45
+ "dayKey",
46
+ "eventIds",
47
+ "sampleStreams"
48
+ ],
49
+ "additionalProperties": false,
50
+ "$id": "@murphai/contracts/frontmatter-journal-day.schema.json",
51
+ "title": "Murph Journal Day Frontmatter"
52
+ }
@@ -0,0 +1,55 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "schemaVersion": {
6
+ "type": "string",
7
+ "const": "murph.frontmatter.profile-current.v1"
8
+ },
9
+ "docType": {
10
+ "type": "string",
11
+ "const": "profile_current"
12
+ },
13
+ "snapshotId": {
14
+ "type": "string",
15
+ "pattern": "^psnap_[0-9A-HJKMNP-TV-Z]{26}$"
16
+ },
17
+ "updatedAt": {
18
+ "type": "string",
19
+ "format": "date-time"
20
+ },
21
+ "sourceAssessmentIds": {
22
+ "type": "array",
23
+ "items": {
24
+ "type": "string",
25
+ "pattern": "^asmt_[0-9A-HJKMNP-TV-Z]{26}$"
26
+ },
27
+ "uniqueItems": true
28
+ },
29
+ "sourceEventIds": {
30
+ "type": "array",
31
+ "items": {
32
+ "type": "string",
33
+ "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$"
34
+ },
35
+ "uniqueItems": true
36
+ },
37
+ "topGoalIds": {
38
+ "type": "array",
39
+ "items": {
40
+ "type": "string",
41
+ "pattern": "^goal_[0-9A-HJKMNP-TV-Z]{26}$"
42
+ },
43
+ "uniqueItems": true
44
+ }
45
+ },
46
+ "required": [
47
+ "schemaVersion",
48
+ "docType",
49
+ "snapshotId",
50
+ "updatedAt"
51
+ ],
52
+ "additionalProperties": false,
53
+ "$id": "@murphai/contracts/frontmatter-profile-current.schema.json",
54
+ "title": "Murph Profile Current Frontmatter"
55
+ }
@@ -0,0 +1,153 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "schemaVersion": {
6
+ "type": "string",
7
+ "const": "murph.frontmatter.protocol.v1"
8
+ },
9
+ "docType": {
10
+ "type": "string",
11
+ "const": "protocol"
12
+ },
13
+ "protocolId": {
14
+ "type": "string",
15
+ "pattern": "^prot_[0-9A-HJKMNP-TV-Z]{26}$"
16
+ },
17
+ "slug": {
18
+ "type": "string",
19
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
20
+ },
21
+ "title": {
22
+ "type": "string",
23
+ "minLength": 1,
24
+ "maxLength": 160
25
+ },
26
+ "kind": {
27
+ "type": "string",
28
+ "enum": [
29
+ "medication",
30
+ "supplement",
31
+ "therapy",
32
+ "habit"
33
+ ]
34
+ },
35
+ "status": {
36
+ "type": "string",
37
+ "enum": [
38
+ "active",
39
+ "paused",
40
+ "completed",
41
+ "stopped"
42
+ ]
43
+ },
44
+ "startedOn": {
45
+ "type": "string",
46
+ "format": "date"
47
+ },
48
+ "stoppedOn": {
49
+ "type": "string",
50
+ "format": "date"
51
+ },
52
+ "substance": {
53
+ "type": "string",
54
+ "minLength": 1,
55
+ "maxLength": 160
56
+ },
57
+ "dose": {
58
+ "type": "number",
59
+ "minimum": 0
60
+ },
61
+ "unit": {
62
+ "type": "string",
63
+ "pattern": "^[A-Za-z0-9._/%-]+$"
64
+ },
65
+ "schedule": {
66
+ "type": "string",
67
+ "minLength": 1,
68
+ "maxLength": 160
69
+ },
70
+ "brand": {
71
+ "type": "string",
72
+ "minLength": 1,
73
+ "maxLength": 160
74
+ },
75
+ "manufacturer": {
76
+ "type": "string",
77
+ "minLength": 1,
78
+ "maxLength": 160
79
+ },
80
+ "servingSize": {
81
+ "type": "string",
82
+ "minLength": 1,
83
+ "maxLength": 160
84
+ },
85
+ "ingredients": {
86
+ "type": "array",
87
+ "items": {
88
+ "type": "object",
89
+ "properties": {
90
+ "compound": {
91
+ "type": "string",
92
+ "minLength": 1,
93
+ "maxLength": 160
94
+ },
95
+ "label": {
96
+ "type": "string",
97
+ "minLength": 1,
98
+ "maxLength": 160
99
+ },
100
+ "amount": {
101
+ "type": "number",
102
+ "minimum": 0
103
+ },
104
+ "unit": {
105
+ "type": "string",
106
+ "pattern": "^[A-Za-z0-9._/%-]+$"
107
+ },
108
+ "active": {
109
+ "type": "boolean"
110
+ },
111
+ "note": {
112
+ "type": "string",
113
+ "minLength": 1,
114
+ "maxLength": 4000
115
+ }
116
+ },
117
+ "required": [
118
+ "compound"
119
+ ],
120
+ "additionalProperties": false
121
+ }
122
+ },
123
+ "relatedGoalIds": {
124
+ "type": "array",
125
+ "items": {
126
+ "type": "string",
127
+ "pattern": "^goal_[0-9A-HJKMNP-TV-Z]{26}$"
128
+ },
129
+ "uniqueItems": true
130
+ },
131
+ "relatedConditionIds": {
132
+ "type": "array",
133
+ "items": {
134
+ "type": "string",
135
+ "pattern": "^cond_[0-9A-HJKMNP-TV-Z]{26}$"
136
+ },
137
+ "uniqueItems": true
138
+ }
139
+ },
140
+ "required": [
141
+ "schemaVersion",
142
+ "docType",
143
+ "protocolId",
144
+ "slug",
145
+ "title",
146
+ "kind",
147
+ "status",
148
+ "startedOn"
149
+ ],
150
+ "additionalProperties": false,
151
+ "$id": "@murphai/contracts/frontmatter-protocol.schema.json",
152
+ "title": "Murph Protocol Frontmatter"
153
+ }
@@ -0,0 +1,81 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "schemaVersion": {
6
+ "type": "string",
7
+ "const": "murph.frontmatter.provider.v1"
8
+ },
9
+ "docType": {
10
+ "type": "string",
11
+ "const": "provider"
12
+ },
13
+ "providerId": {
14
+ "type": "string",
15
+ "pattern": "^prov_[0-9A-HJKMNP-TV-Z]{26}$"
16
+ },
17
+ "slug": {
18
+ "type": "string",
19
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
20
+ },
21
+ "title": {
22
+ "type": "string",
23
+ "minLength": 1,
24
+ "maxLength": 160
25
+ },
26
+ "status": {
27
+ "type": "string",
28
+ "minLength": 1,
29
+ "maxLength": 64
30
+ },
31
+ "specialty": {
32
+ "type": "string",
33
+ "minLength": 1,
34
+ "maxLength": 160
35
+ },
36
+ "organization": {
37
+ "type": "string",
38
+ "minLength": 1,
39
+ "maxLength": 160
40
+ },
41
+ "location": {
42
+ "type": "string",
43
+ "minLength": 1,
44
+ "maxLength": 160
45
+ },
46
+ "website": {
47
+ "type": "string",
48
+ "minLength": 1,
49
+ "maxLength": 240
50
+ },
51
+ "phone": {
52
+ "type": "string",
53
+ "minLength": 1,
54
+ "maxLength": 64
55
+ },
56
+ "note": {
57
+ "type": "string",
58
+ "minLength": 1,
59
+ "maxLength": 4000
60
+ },
61
+ "aliases": {
62
+ "type": "array",
63
+ "items": {
64
+ "type": "string",
65
+ "minLength": 1,
66
+ "maxLength": 160
67
+ },
68
+ "uniqueItems": true
69
+ }
70
+ },
71
+ "required": [
72
+ "schemaVersion",
73
+ "docType",
74
+ "providerId",
75
+ "slug",
76
+ "title"
77
+ ],
78
+ "additionalProperties": false,
79
+ "$id": "@murphai/contracts/frontmatter-provider.schema.json",
80
+ "title": "Murph Provider Frontmatter"
81
+ }
@@ -0,0 +1,124 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "schemaVersion": {
6
+ "type": "string",
7
+ "const": "murph.frontmatter.recipe.v1"
8
+ },
9
+ "docType": {
10
+ "type": "string",
11
+ "const": "recipe"
12
+ },
13
+ "recipeId": {
14
+ "type": "string",
15
+ "pattern": "^rcp_[0-9A-HJKMNP-TV-Z]{26}$"
16
+ },
17
+ "slug": {
18
+ "type": "string",
19
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
20
+ },
21
+ "title": {
22
+ "type": "string",
23
+ "minLength": 1,
24
+ "maxLength": 160
25
+ },
26
+ "status": {
27
+ "type": "string",
28
+ "enum": [
29
+ "draft",
30
+ "saved",
31
+ "archived"
32
+ ]
33
+ },
34
+ "summary": {
35
+ "type": "string",
36
+ "minLength": 1,
37
+ "maxLength": 4000
38
+ },
39
+ "cuisine": {
40
+ "type": "string",
41
+ "minLength": 1,
42
+ "maxLength": 160
43
+ },
44
+ "dishType": {
45
+ "type": "string",
46
+ "minLength": 1,
47
+ "maxLength": 160
48
+ },
49
+ "source": {
50
+ "type": "string",
51
+ "minLength": 1,
52
+ "maxLength": 240
53
+ },
54
+ "servings": {
55
+ "type": "number",
56
+ "minimum": 0
57
+ },
58
+ "prepTimeMinutes": {
59
+ "type": "integer",
60
+ "minimum": 0
61
+ },
62
+ "cookTimeMinutes": {
63
+ "type": "integer",
64
+ "minimum": 0
65
+ },
66
+ "totalTimeMinutes": {
67
+ "type": "integer",
68
+ "minimum": 0
69
+ },
70
+ "tags": {
71
+ "type": "array",
72
+ "items": {
73
+ "type": "string",
74
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
75
+ },
76
+ "uniqueItems": true
77
+ },
78
+ "ingredients": {
79
+ "maxItems": 100,
80
+ "type": "array",
81
+ "items": {
82
+ "type": "string",
83
+ "minLength": 1,
84
+ "maxLength": 4000
85
+ }
86
+ },
87
+ "steps": {
88
+ "maxItems": 100,
89
+ "type": "array",
90
+ "items": {
91
+ "type": "string",
92
+ "minLength": 1,
93
+ "maxLength": 4000
94
+ }
95
+ },
96
+ "relatedGoalIds": {
97
+ "type": "array",
98
+ "items": {
99
+ "type": "string",
100
+ "pattern": "^goal_[0-9A-HJKMNP-TV-Z]{26}$"
101
+ },
102
+ "uniqueItems": true
103
+ },
104
+ "relatedConditionIds": {
105
+ "type": "array",
106
+ "items": {
107
+ "type": "string",
108
+ "pattern": "^cond_[0-9A-HJKMNP-TV-Z]{26}$"
109
+ },
110
+ "uniqueItems": true
111
+ }
112
+ },
113
+ "required": [
114
+ "schemaVersion",
115
+ "docType",
116
+ "recipeId",
117
+ "slug",
118
+ "title",
119
+ "status"
120
+ ],
121
+ "additionalProperties": false,
122
+ "$id": "@murphai/contracts/frontmatter-recipe.schema.json",
123
+ "title": "Murph Recipe Frontmatter"
124
+ }
@@ -0,0 +1,163 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "schemaVersion": {
6
+ "type": "string",
7
+ "const": "murph.frontmatter.workout-format.v1"
8
+ },
9
+ "docType": {
10
+ "type": "string",
11
+ "const": "workout_format"
12
+ },
13
+ "workoutFormatId": {
14
+ "type": "string",
15
+ "pattern": "^wfmt_[0-9A-HJKMNP-TV-Z]{26}$"
16
+ },
17
+ "slug": {
18
+ "type": "string",
19
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
20
+ },
21
+ "title": {
22
+ "type": "string",
23
+ "minLength": 1,
24
+ "maxLength": 160
25
+ },
26
+ "status": {
27
+ "type": "string",
28
+ "enum": [
29
+ "active",
30
+ "archived"
31
+ ]
32
+ },
33
+ "summary": {
34
+ "type": "string",
35
+ "minLength": 1,
36
+ "maxLength": 4000
37
+ },
38
+ "activityType": {
39
+ "type": "string",
40
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
41
+ },
42
+ "durationMinutes": {
43
+ "type": "integer",
44
+ "minimum": 1,
45
+ "maximum": 1440
46
+ },
47
+ "distanceKm": {
48
+ "type": "number",
49
+ "minimum": 0,
50
+ "maximum": 1000
51
+ },
52
+ "strengthExercises": {
53
+ "minItems": 1,
54
+ "maxItems": 50,
55
+ "type": "array",
56
+ "items": {
57
+ "anyOf": [
58
+ {
59
+ "type": "object",
60
+ "properties": {
61
+ "exercise": {
62
+ "type": "string",
63
+ "minLength": 1,
64
+ "maxLength": 160
65
+ },
66
+ "setCount": {
67
+ "type": "integer",
68
+ "minimum": 1
69
+ },
70
+ "repsPerSet": {
71
+ "type": "integer",
72
+ "minimum": 1
73
+ },
74
+ "loadDescription": {
75
+ "type": "string",
76
+ "minLength": 1,
77
+ "maxLength": 240
78
+ }
79
+ },
80
+ "required": [
81
+ "exercise",
82
+ "setCount",
83
+ "repsPerSet"
84
+ ],
85
+ "additionalProperties": false
86
+ },
87
+ {
88
+ "type": "object",
89
+ "properties": {
90
+ "exercise": {
91
+ "type": "string",
92
+ "minLength": 1,
93
+ "maxLength": 160
94
+ },
95
+ "setCount": {
96
+ "type": "integer",
97
+ "minimum": 1
98
+ },
99
+ "repsPerSet": {
100
+ "type": "integer",
101
+ "minimum": 1
102
+ },
103
+ "loadDescription": {
104
+ "type": "string",
105
+ "minLength": 1,
106
+ "maxLength": 240
107
+ },
108
+ "load": {
109
+ "type": "number",
110
+ "minimum": 0
111
+ },
112
+ "loadUnit": {
113
+ "type": "string",
114
+ "enum": [
115
+ "lb",
116
+ "kg"
117
+ ]
118
+ }
119
+ },
120
+ "required": [
121
+ "exercise",
122
+ "setCount",
123
+ "repsPerSet",
124
+ "load",
125
+ "loadUnit"
126
+ ],
127
+ "additionalProperties": false
128
+ }
129
+ ]
130
+ }
131
+ },
132
+ "tags": {
133
+ "type": "array",
134
+ "items": {
135
+ "type": "string",
136
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
137
+ },
138
+ "uniqueItems": true
139
+ },
140
+ "note": {
141
+ "type": "string",
142
+ "minLength": 1,
143
+ "maxLength": 4000
144
+ },
145
+ "templateText": {
146
+ "type": "string",
147
+ "minLength": 1,
148
+ "maxLength": 4000
149
+ }
150
+ },
151
+ "required": [
152
+ "schemaVersion",
153
+ "docType",
154
+ "workoutFormatId",
155
+ "slug",
156
+ "title",
157
+ "status",
158
+ "activityType"
159
+ ],
160
+ "additionalProperties": false,
161
+ "$id": "@murphai/contracts/frontmatter-workout-format.schema.json",
162
+ "title": "Murph Workout Format Frontmatter"
163
+ }