@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
package/README.md ADDED
@@ -0,0 +1,24 @@
1
+ # `@murphai/contracts`
2
+
3
+ Owns the frozen vault contracts for the Murph baseline:
4
+
5
+ - canonical Zod schemas and parse helpers
6
+ - TypeScript declarations
7
+ - example records and frontmatter documents
8
+ - derived JSON Schema artifacts under `generated/`
9
+
10
+ Surface split:
11
+
12
+ - `@murphai/contracts` exports the canonical Zod-first runtime surface.
13
+ - `@murphai/contracts/schemas` exports the derived JSON Schema objects for artifact consumers.
14
+
15
+ Package-local commands:
16
+
17
+ - `pnpm --dir packages/contracts build`
18
+ - `pnpm --dir packages/contracts generate`
19
+ - `pnpm --dir packages/contracts verify`
20
+
21
+ Build layout:
22
+
23
+ - library entrypoints emit to `dist/*.js` and `dist/*.d.ts`
24
+ - package-local scripts emit to `dist/scripts/*.js`
@@ -0,0 +1,35 @@
1
+ import type { JsonObject } from "./zod.ts";
2
+ import { type HealthEntityRegistryLink, type HealthEntityRegistryLinkCardinality, type HealthEntityRegistryLinkMetadata, type HealthEntityRegistryMetadata } from "./health-entities.ts";
3
+ export type BankEntityKind = "allergy" | "condition" | "family" | "food" | "genetics" | "goal" | "protocol" | "provider" | "recipe" | "workout_format";
4
+ export type BankEntityRegistryLink = HealthEntityRegistryLink;
5
+ export type BankEntityRegistryLinkCardinality = HealthEntityRegistryLinkCardinality;
6
+ export type BankEntityRegistryLinkMetadata = HealthEntityRegistryLinkMetadata;
7
+ export interface BankEntityRegistryMetadata extends HealthEntityRegistryMetadata {
8
+ }
9
+ export type BankEntityDefinitionWithRegistry = BankEntityDefinition;
10
+ export interface BankEntityDefinition {
11
+ kind: BankEntityKind;
12
+ noun: string;
13
+ plural: string;
14
+ prefixes?: readonly string[];
15
+ lookupAliases?: readonly string[];
16
+ listKinds?: readonly string[];
17
+ scaffoldTemplate?: JsonObject;
18
+ registry: BankEntityRegistryMetadata;
19
+ }
20
+ export declare const bankEntityDefinitions: readonly BankEntityDefinition[];
21
+ export declare const bankEntityDefinitionByKind: Map<BankEntityKind, BankEntityDefinition>;
22
+ export declare function requireBankEntityRegistryDefinition(kind: BankEntityKind): BankEntityDefinitionWithRegistry;
23
+ export declare function extractBankEntityRegistryLinks(kind: BankEntityKind, attributes: Record<string, unknown>): BankEntityRegistryLink[];
24
+ export declare function extractBankEntityRegistryRelatedIds(kind: BankEntityKind, attributes: Record<string, unknown>): string[];
25
+ export declare const goalBankEntityDefinition: BankEntityDefinition;
26
+ export declare const conditionBankEntityDefinition: BankEntityDefinition;
27
+ export declare const allergyBankEntityDefinition: BankEntityDefinition;
28
+ export declare const protocolBankEntityDefinition: BankEntityDefinition;
29
+ export declare const familyBankEntityDefinition: BankEntityDefinition;
30
+ export declare const geneticsBankEntityDefinition: BankEntityDefinition;
31
+ export declare const foodBankEntityDefinition: BankEntityDefinition;
32
+ export declare const recipeBankEntityDefinition: BankEntityDefinition;
33
+ export declare const providerBankEntityDefinition: BankEntityDefinition;
34
+ export declare const workoutFormatBankEntityDefinition: BankEntityDefinition;
35
+ //# sourceMappingURL=bank-entities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bank-entities.d.ts","sourceRoot":"","sources":["../src/bank-entities.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAG3C,OAAO,EAIL,KAAK,wBAAwB,EAC7B,KAAK,mCAAmC,EACxC,KAAK,gCAAgC,EACrC,KAAK,4BAA4B,EAClC,MAAM,sBAAsB,CAAC;AAkB9B,MAAM,MAAM,cAAc,GACtB,SAAS,GACT,WAAW,GACX,QAAQ,GACR,MAAM,GACN,UAAU,GACV,MAAM,GACN,UAAU,GACV,UAAU,GACV,QAAQ,GACR,gBAAgB,CAAC;AAErB,MAAM,MAAM,sBAAsB,GAAG,wBAAwB,CAAC;AAC9D,MAAM,MAAM,iCAAiC,GAAG,mCAAmC,CAAC;A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gD,CAAC;AACxF,eAAO,MAAM,4BAA4B,sBAAkD,CAAC;AAC5F,eAAO,MAAM,iCAAiC,sBAAwD,CAAC"}
@@ -0,0 +1,164 @@
1
+ import { ID_PREFIXES } from "./constants.js";
2
+ import { extractHealthEntityRegistryLinks, requireHealthEntityRegistryDefinition, } from "./health-entities.js";
3
+ import { foodUpsertPayloadSchema, recipeUpsertPayloadSchema, workoutFormatUpsertPayloadSchema, } from "./shares.js";
4
+ import { applyRegistryMetadataDefaults, extractRegistryLinks, extractRegistryRelatedIds, } from "./registry-helpers.js";
5
+ import { foodFrontmatterSchema, providerFrontmatterSchema, recipeFrontmatterSchema, workoutFormatFrontmatterSchema, } from "./zod.js";
6
+ const RELATED_IDS_COMPATIBILITY_RELATION = {
7
+ type: "related_to",
8
+ keys: ["relatedIds"],
9
+ cardinality: "many",
10
+ };
11
+ const HEALTH_BANK_ENTITY_KINDS = [
12
+ "goal",
13
+ "condition",
14
+ "allergy",
15
+ "protocol",
16
+ "family",
17
+ "genetics",
18
+ ];
19
+ function defineBankRegistryEntity(input) {
20
+ return {
21
+ ...input,
22
+ registry: applyRegistryMetadataDefaults(input.registry),
23
+ };
24
+ }
25
+ const checkedBankEntityDefinitions = [
26
+ ...HEALTH_BANK_ENTITY_KINDS.map((kind) => requireHealthEntityRegistryDefinition(kind)),
27
+ defineBankRegistryEntity({
28
+ kind: "food",
29
+ listKinds: ["food"],
30
+ noun: "food",
31
+ plural: "foods",
32
+ prefixes: [`${ID_PREFIXES.food}_`],
33
+ scaffoldTemplate: {
34
+ title: "Acai bowl",
35
+ status: "active",
36
+ kind: "meal",
37
+ serving: "1 bowl",
38
+ tags: ["breakfast"],
39
+ },
40
+ registry: {
41
+ frontmatterSchema: foodFrontmatterSchema,
42
+ directory: "bank/foods",
43
+ idField: "foodId",
44
+ upsertPayloadSchema: foodUpsertPayloadSchema,
45
+ relationKeys: [
46
+ RELATED_IDS_COMPATIBILITY_RELATION,
47
+ {
48
+ type: "related_protocol",
49
+ keys: ["attachedProtocolIds"],
50
+ cardinality: "many",
51
+ },
52
+ ],
53
+ titleKeys: ["title"],
54
+ statusKeys: ["status"],
55
+ },
56
+ }),
57
+ defineBankRegistryEntity({
58
+ kind: "recipe",
59
+ listKinds: ["recipe"],
60
+ noun: "recipe",
61
+ plural: "recipes",
62
+ prefixes: [`${ID_PREFIXES.recipe}_`],
63
+ scaffoldTemplate: {
64
+ title: "Salmon rice bowl",
65
+ status: "saved",
66
+ servings: 2,
67
+ tags: ["weeknight"],
68
+ },
69
+ registry: {
70
+ frontmatterSchema: recipeFrontmatterSchema,
71
+ directory: "bank/recipes",
72
+ idField: "recipeId",
73
+ upsertPayloadSchema: recipeUpsertPayloadSchema,
74
+ relationKeys: [
75
+ RELATED_IDS_COMPATIBILITY_RELATION,
76
+ {
77
+ type: "related_goal",
78
+ keys: ["relatedGoalIds"],
79
+ cardinality: "many",
80
+ },
81
+ {
82
+ type: "related_condition",
83
+ keys: ["relatedConditionIds"],
84
+ cardinality: "many",
85
+ },
86
+ ],
87
+ titleKeys: ["title"],
88
+ statusKeys: ["status"],
89
+ },
90
+ }),
91
+ defineBankRegistryEntity({
92
+ kind: "provider",
93
+ listKinds: ["provider"],
94
+ noun: "provider",
95
+ plural: "providers",
96
+ prefixes: [`${ID_PREFIXES.provider}_`],
97
+ scaffoldTemplate: {
98
+ title: "Primary care physician",
99
+ specialty: "primary-care",
100
+ organization: "Neighborhood Clinic",
101
+ },
102
+ registry: {
103
+ frontmatterSchema: providerFrontmatterSchema,
104
+ directory: "bank/providers",
105
+ idField: "providerId",
106
+ relationKeys: [RELATED_IDS_COMPATIBILITY_RELATION],
107
+ titleKeys: ["title"],
108
+ statusKeys: ["status"],
109
+ },
110
+ }),
111
+ defineBankRegistryEntity({
112
+ kind: "workout_format",
113
+ listKinds: ["workout_format"],
114
+ noun: "workout format",
115
+ plural: "workout formats",
116
+ prefixes: [`${ID_PREFIXES.workoutFormat}_`],
117
+ scaffoldTemplate: {
118
+ title: "Push Day A",
119
+ status: "active",
120
+ activityType: "strength-training",
121
+ durationMinutes: 20,
122
+ },
123
+ registry: {
124
+ frontmatterSchema: workoutFormatFrontmatterSchema,
125
+ directory: "bank/workout-formats",
126
+ idField: "workoutFormatId",
127
+ upsertPayloadSchema: workoutFormatUpsertPayloadSchema,
128
+ titleKeys: ["title"],
129
+ statusKeys: ["status"],
130
+ },
131
+ }),
132
+ ];
133
+ export const bankEntityDefinitions = checkedBankEntityDefinitions;
134
+ export const bankEntityDefinitionByKind = new Map(bankEntityDefinitions.map((definition) => [definition.kind, definition]));
135
+ export function requireBankEntityRegistryDefinition(kind) {
136
+ const definition = bankEntityDefinitionByKind.get(kind);
137
+ if (!definition) {
138
+ throw new Error(`Bank entity "${kind}" does not define a registry projection.`);
139
+ }
140
+ return definition;
141
+ }
142
+ function isHealthBackedBankEntityKind(kind) {
143
+ return HEALTH_BANK_ENTITY_KINDS.includes(kind);
144
+ }
145
+ export function extractBankEntityRegistryLinks(kind, attributes) {
146
+ if (isHealthBackedBankEntityKind(kind)) {
147
+ return extractHealthEntityRegistryLinks(kind, attributes);
148
+ }
149
+ return extractRegistryLinks(attributes, requireBankEntityRegistryDefinition(kind).registry.relationKeys ?? []);
150
+ }
151
+ export function extractBankEntityRegistryRelatedIds(kind, attributes) {
152
+ return extractRegistryRelatedIds(extractBankEntityRegistryLinks(kind, attributes));
153
+ }
154
+ export const goalBankEntityDefinition = requireBankEntityRegistryDefinition("goal");
155
+ export const conditionBankEntityDefinition = requireBankEntityRegistryDefinition("condition");
156
+ export const allergyBankEntityDefinition = requireBankEntityRegistryDefinition("allergy");
157
+ export const protocolBankEntityDefinition = requireBankEntityRegistryDefinition("protocol");
158
+ export const familyBankEntityDefinition = requireBankEntityRegistryDefinition("family");
159
+ export const geneticsBankEntityDefinition = requireBankEntityRegistryDefinition("genetics");
160
+ export const foodBankEntityDefinition = requireBankEntityRegistryDefinition("food");
161
+ export const recipeBankEntityDefinition = requireBankEntityRegistryDefinition("recipe");
162
+ export const providerBankEntityDefinition = requireBankEntityRegistryDefinition("provider");
163
+ export const workoutFormatBankEntityDefinition = requireBankEntityRegistryDefinition("workout_format");
164
+ //# sourceMappingURL=bank-entities.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bank-entities.js","sourceRoot":"","sources":["../src/bank-entities.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EACL,gCAAgC,EAChC,qCAAqC,GAMtC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,uBAAuB,EACvB,yBAAyB,EACzB,gCAAgC,GACjC,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,6BAA6B,EAC7B,oBAAoB,EACpB,yBAAyB,GAC1B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,qBAAqB,EACrB,yBAAyB,EACzB,uBAAuB,EACvB,8BAA8B,GAC/B,MAAM,UAAU,CAAC;AA0ClB,MAAM,kCAAkC,GAAmC;IACzE,IAAI,EAAE,YAAY;IAClB,IAAI,EAAE,CAAC,YAAY,CAAC;IACpB,WAAW,EAAE,MAAM;CACpB,CAAC;AAIF,MAAM,wBAAwB,GAAG;IAC/B,MAAM;IACN,WAAW;IACX,SAAS;IACT,UAAU;IACV,QAAQ;IACR,UAAU;CAC8C,CAAC;AAE3D,SAAS,wBAAwB,CAC/B,KAAoC;IAEpC,OAAO;QACL,GAAG,KAAK;QACR,QAAQ,EAAE,6BAA6B,CAAC,KAAK,CAAC,QAAQ,CAAC;KACxD,CAAC;AACJ,CAAC;AAED,MAAM,4BAA4B,GAAG;IACnC,GAAG,wBAAwB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,qCAAqC,CAAC,IAAI,CAAC,CAAC;IACtF,wBAAwB,CAAC;QACvB,IAAI,EAAE,MAAM;QACZ,SAAS,EAAE,CAAC,MAAM,CAAC;QACnB,IAAI,EAAE,MAAM;QACZ,MAAM,EAAE,OAAO;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1F,MAAM,CAAC,MAAM,4BAA4B,GAAG,mCAAmC,CAAC,UAAU,CAAC,CAAC;AAC5F,MAAM,CAAC,MAAM,0BAA0B,GAAG,mCAAmC,CAAC,QAAQ,CAAC,CAAC;AACxF,MAAM,CAAC,MAAM,4BAA4B,GAAG,mCAAmC,CAAC,UAAU,CAAC,CAAC;AAC5F,MAAM,CAAC,MAAM,wBAAwB,GAAG,mCAAmC,CAAC,MAAM,CAAC,CAAC;AACpF,MAAM,CAAC,MAAM,0BAA0B,GAAG,mCAAmC,CAAC,QAAQ,CAAC,CAAC;AACxF,MAAM,CAAC,MAAM,4BAA4B,GAAG,mCAAmC,CAAC,UAAU,CAAC,CAAC;AAC5F,MAAM,CAAC,MAAM,iCAAiC,GAAG,mCAAmC,CAAC,gBAAgB,CAAC,CAAC"}
@@ -0,0 +1,50 @@
1
+ import type { HealthEntityKind } from "./health-entities.ts";
2
+ export type CommandCapability = "show" | "list" | "scaffold" | "upsert" | "import" | "manifest" | "raw" | "batch-show" | "batch-list" | "create" | "update" | "checkpoint" | "stop" | "ensure" | "append" | "link" | "unlink" | "stats" | "paths" | "rebuild" | "materialize" | "prune" | "validate" | "repair" | "tail" | "project" | "bootstrap" | "setup" | "doctor" | "parse" | "requeue" | "attachment-list" | "attachment-show" | "attachment-show-status" | "attachment-parse" | "attachment-reparse" | "promote";
3
+ export interface CommandCapabilityBundleDefinition {
4
+ capabilities: readonly CommandCapability[];
5
+ summary: string;
6
+ }
7
+ export declare const commandCapabilityBundles: Readonly<{
8
+ readonly readable: {
9
+ readonly capabilities: readonly ["show", "list"];
10
+ readonly summary: "Readable follow-up surface for direct noun lookups and filtered listing.";
11
+ };
12
+ readonly payloadCrud: {
13
+ readonly capabilities: readonly ["scaffold", "upsert", "show", "list"];
14
+ readonly summary: "Payload-driven CRUD surface for canonical noun records.";
15
+ };
16
+ readonly artifactImport: {
17
+ readonly capabilities: readonly ["import", "show", "list", "manifest"];
18
+ readonly summary: "Artifact-ingest surface for immutable raw evidence plus readable follow-up commands.";
19
+ };
20
+ readonly batchInspection: {
21
+ readonly capabilities: readonly ["batch-show", "batch-list"];
22
+ readonly summary: "Import-batch inspection surface for transform or ingest runs.";
23
+ };
24
+ readonly lifecycle: {
25
+ readonly capabilities: readonly ["create", "show", "list", "update", "checkpoint", "stop"];
26
+ readonly summary: "Lifecycle-oriented noun flow with explicit phase mutations and follow-up reads.";
27
+ };
28
+ readonly dateAddressedDoc: {
29
+ readonly capabilities: readonly ["ensure", "show", "list", "append", "link", "unlink"];
30
+ readonly summary: "Date-addressed document flow for day pages with append and link maintenance.";
31
+ };
32
+ readonly derivedAdmin: {
33
+ readonly capabilities: readonly ["stats", "paths", "rebuild", "materialize", "prune", "validate"];
34
+ readonly summary: "Derived-output and admin-maintenance surface for rebuildable or operator-facing commands.";
35
+ };
36
+ readonly runtimeControl: {
37
+ readonly capabilities: readonly ["bootstrap", "setup", "doctor", "parse", "requeue", "attachment-list", "attachment-show", "attachment-show-status", "attachment-parse", "attachment-reparse", "promote"];
38
+ readonly summary: "Runtime-oriented operator controls for local services, queues, and attachment workflows.";
39
+ };
40
+ }>;
41
+ export type CommandCapabilityBundleId = keyof typeof commandCapabilityBundles;
42
+ export type CommandSurfaceNoun = HealthEntityKind | "food" | "provider" | "recipe" | "event" | "document" | "meal" | "samples" | "experiment" | "journal" | "vault" | "export" | "audit" | "inbox" | "intake";
43
+ export interface CommandNounCapabilityDefinition {
44
+ additionalCapabilities?: readonly CommandCapability[];
45
+ bundles: readonly CommandCapabilityBundleId[];
46
+ noun: CommandSurfaceNoun;
47
+ }
48
+ export declare const commandNounCapabilities: readonly CommandNounCapabilityDefinition[];
49
+ export declare const commandNounCapabilityByNoun: Map<CommandSurfaceNoun, CommandNounCapabilityDefinition>;
50
+ //# sourceMappingURL=command-capabilities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command-capabilities.d.ts","sourceRoot":"","sources":["../src/command-capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,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,CAAC"}
@@ -0,0 +1,149 @@
1
+ const checkedCommandCapabilityBundles = {
2
+ readable: {
3
+ capabilities: ["show", "list"],
4
+ summary: "Readable follow-up surface for direct noun lookups and filtered listing.",
5
+ },
6
+ payloadCrud: {
7
+ capabilities: ["scaffold", "upsert", "show", "list"],
8
+ summary: "Payload-driven CRUD surface for canonical noun records.",
9
+ },
10
+ artifactImport: {
11
+ capabilities: ["import", "show", "list", "manifest"],
12
+ summary: "Artifact-ingest surface for immutable raw evidence plus readable follow-up commands.",
13
+ },
14
+ batchInspection: {
15
+ capabilities: ["batch-show", "batch-list"],
16
+ summary: "Import-batch inspection surface for transform or ingest runs.",
17
+ },
18
+ lifecycle: {
19
+ capabilities: ["create", "show", "list", "update", "checkpoint", "stop"],
20
+ summary: "Lifecycle-oriented noun flow with explicit phase mutations and follow-up reads.",
21
+ },
22
+ dateAddressedDoc: {
23
+ capabilities: ["ensure", "show", "list", "append", "link", "unlink"],
24
+ summary: "Date-addressed document flow for day pages with append and link maintenance.",
25
+ },
26
+ derivedAdmin: {
27
+ capabilities: ["stats", "paths", "rebuild", "materialize", "prune", "validate"],
28
+ summary: "Derived-output and admin-maintenance surface for rebuildable or operator-facing commands.",
29
+ },
30
+ runtimeControl: {
31
+ capabilities: [
32
+ "bootstrap",
33
+ "setup",
34
+ "doctor",
35
+ "parse",
36
+ "requeue",
37
+ "attachment-list",
38
+ "attachment-show",
39
+ "attachment-show-status",
40
+ "attachment-parse",
41
+ "attachment-reparse",
42
+ "promote",
43
+ ],
44
+ summary: "Runtime-oriented operator controls for local services, queues, and attachment workflows.",
45
+ },
46
+ };
47
+ export const commandCapabilityBundles = Object.freeze(checkedCommandCapabilityBundles);
48
+ const checkedCommandNounCapabilities = [
49
+ {
50
+ bundles: ["payloadCrud"],
51
+ noun: "profile",
52
+ additionalCapabilities: ["rebuild"],
53
+ },
54
+ {
55
+ bundles: ["payloadCrud"],
56
+ noun: "goal",
57
+ },
58
+ {
59
+ bundles: ["payloadCrud"],
60
+ noun: "condition",
61
+ },
62
+ {
63
+ bundles: ["payloadCrud"],
64
+ noun: "allergy",
65
+ },
66
+ {
67
+ bundles: ["payloadCrud"],
68
+ noun: "protocol",
69
+ additionalCapabilities: ["stop"],
70
+ },
71
+ {
72
+ bundles: ["payloadCrud"],
73
+ noun: "history",
74
+ },
75
+ {
76
+ bundles: ["payloadCrud"],
77
+ noun: "blood_test",
78
+ },
79
+ {
80
+ bundles: ["payloadCrud"],
81
+ noun: "family",
82
+ },
83
+ {
84
+ bundles: ["payloadCrud"],
85
+ noun: "genetics",
86
+ },
87
+ {
88
+ bundles: ["payloadCrud"],
89
+ noun: "food",
90
+ },
91
+ {
92
+ bundles: ["payloadCrud"],
93
+ noun: "provider",
94
+ },
95
+ {
96
+ bundles: ["payloadCrud"],
97
+ noun: "recipe",
98
+ },
99
+ {
100
+ bundles: ["payloadCrud"],
101
+ noun: "event",
102
+ },
103
+ {
104
+ bundles: ["artifactImport"],
105
+ noun: "document",
106
+ },
107
+ {
108
+ bundles: ["artifactImport"],
109
+ noun: "meal",
110
+ },
111
+ {
112
+ bundles: ["artifactImport"],
113
+ noun: "intake",
114
+ additionalCapabilities: ["raw", "project"],
115
+ },
116
+ {
117
+ bundles: ["artifactImport", "batchInspection"],
118
+ noun: "samples",
119
+ },
120
+ {
121
+ bundles: ["lifecycle"],
122
+ noun: "experiment",
123
+ },
124
+ {
125
+ bundles: ["dateAddressedDoc"],
126
+ noun: "journal",
127
+ },
128
+ {
129
+ bundles: ["readable", "derivedAdmin"],
130
+ noun: "vault",
131
+ additionalCapabilities: ["update", "repair"],
132
+ },
133
+ {
134
+ bundles: ["readable", "derivedAdmin"],
135
+ noun: "export",
136
+ },
137
+ {
138
+ bundles: ["readable"],
139
+ noun: "audit",
140
+ additionalCapabilities: ["tail"],
141
+ },
142
+ {
143
+ bundles: ["runtimeControl"],
144
+ noun: "inbox",
145
+ },
146
+ ];
147
+ export const commandNounCapabilities = checkedCommandNounCapabilities;
148
+ export const commandNounCapabilityByNoun = new Map(commandNounCapabilities.map((definition) => [definition.noun, definition]));
149
+ //# sourceMappingURL=command-capabilities.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command-capabilities.js","sourceRoot":"","sources":["../src/command-capabilities.ts"],"names":[],"mappings":"AA8CA,MAAM,+BAA+B,GAAG;IACtC,QAAQ,EAAE;QACR,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;QAC9B,OAAO,EAAE,0EAA0E;KACpF;IACD,WAAW,EAAE;QACX,YAAY,EAAE,CAAC,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC;QACpD,OAAO,EAAE,yDAAyD;KACnE;IACD,cAAc,EAAE;QACd,YAAY,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC;QACpD,OAAO,EAAE,sFAAsF;KAChG;IACD,eAAe,EAAE;QACf,YAAY,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC;QAC1C,OAAO,EAAE,+DAA+D;KACzE;IACD,SAAS,EAAE;QACT,YAAY,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,CAAC;QACxE,OAAO,EAAE,iFAAiF;KAC3F;IACD,gBAAgB,EAAE;QAChB,YAAY,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC;QACpE,OAAO,EAAE,8EAA8E;KACxF;IACD,YAAY,EAAE;QACZ,YAAY,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,OAAO,EAAE,UAAU,CAAC;QAC/E,OAAO,EAAE,2FAA2F;KACrG;IACD,cAAc,EAAE;QACd,YAAY,EAAE;YACZ,WAAW;YACX,OAAO;YACP,QAAQ;YACR,OAAO;YACP,SAAS;YACT,iBAAiB;YACjB,iBAAiB;YACjB,wBAAwB;YACxB,kBA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E,UAAU;KACjB;IACD;QACE,OAAO,EAAE,CAAC,gBAAgB,CAAC;QAC3B,IAAI,EAAE,MAAM;KACb;IACD;QACE,OAAO,EAAE,CAAC,gBAAgB,CAAC;QAC3B,IAAI,EAAE,QAAQ;QACd,sBAAsB,EAAE,CAAC,KAAK,EAAE,SAAS,CAAC;KAC3C;IACD;QACE,OAAO,EAAE,CAAC,gBAAgB,EAAE,iBAAiB,CAAC;QAC9C,IAAI,EAAE,SAAS;KAChB;IACD;QACE,OAAO,EAAE,CAAC,WAAW,CAAC;QACtB,IAAI,EAAE,YAAY;KACnB;IACD;QACE,OAAO,EAAE,CAAC,kBAAkB,CAAC;QAC7B,IAAI,EAAE,SAAS;KAChB;IACD;QACE,OAAO,EAAE,CAAC,UAAU,EAAE,cAAc,CAAC;QACrC,IAAI,EAAE,OAAO;QACb,sBAAsB,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;KAC7C;IACD;QACE,OAAO,EAAE,CAAC,UAAU,EAAE,cAAc,CAAC;QACrC,IAAI,EAAE,QAAQ;KACf;IACD;QACE,OAAO,EAAE,CAAC,UAAU,CAAC;QACrB,IAAI,EAAE,OAAO;QACb,sBAAsB,EAAE,CAAC,MAAM,CAAC;KACjC;IACD;QACE,OAAO,EAAE,CAAC,gBAAgB,CAAC;QAC3B,IAAI,EAAE,OAAO;KACd;CAC4D,CAAC;AAEhE,MAAM,CAAC,MAAM,uBAAuB,GAClC,8BAA8B,CAAC;AAEjC,MAAM,CAAC,MAAM,2BAA2B,GAAG,IAAI,GAAG,CAIhD,uBAAuB,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,CAC3E,CAAC"}
@@ -0,0 +1,149 @@
1
+ export declare const CONTRACT_SCHEMA_VERSION: Readonly<{
2
+ readonly assessmentResponse: "murph.assessment-response.v1";
3
+ readonly audit: "murph.audit.v1";
4
+ readonly event: "murph.event.v1";
5
+ readonly inboxCapture: "murph.inbox-capture.v1";
6
+ readonly allergyFrontmatter: "murph.frontmatter.allergy.v1";
7
+ readonly conditionFrontmatter: "murph.frontmatter.condition.v1";
8
+ readonly experimentFrontmatter: "murph.frontmatter.experiment.v1";
9
+ readonly foodFrontmatter: "murph.frontmatter.food.v1";
10
+ readonly familyMemberFrontmatter: "murph.frontmatter.family-member.v1";
11
+ readonly geneticVariantFrontmatter: "murph.frontmatter.genetic-variant.v1";
12
+ readonly goalFrontmatter: "murph.frontmatter.goal.v1";
13
+ readonly journalDayFrontmatter: "murph.frontmatter.journal-day.v1";
14
+ readonly coreFrontmatter: "murph.frontmatter.core.v1";
15
+ readonly profileCurrentFrontmatter: "murph.frontmatter.profile-current.v1";
16
+ readonly profileSnapshot: "murph.profile-snapshot.v1";
17
+ readonly providerFrontmatter: "murph.frontmatter.provider.v1";
18
+ readonly recipeFrontmatter: "murph.frontmatter.recipe.v1";
19
+ readonly workoutFormatFrontmatter: "murph.frontmatter.workout-format.v1";
20
+ readonly rawImportManifest: "murph.raw-import-manifest.v1";
21
+ readonly protocolFrontmatter: "murph.frontmatter.protocol.v1";
22
+ readonly sample: "murph.sample.v1";
23
+ readonly sharePack: "murph.share-pack.v1";
24
+ readonly vault: "murph.vault.v1";
25
+ }>;
26
+ export declare const CONTRACT_ID_FORMAT: "prefix_ulid";
27
+ export declare const ID_PREFIXES: Readonly<{
28
+ readonly allergy: "alg";
29
+ readonly assessment: "asmt";
30
+ readonly audit: "aud";
31
+ readonly condition: "cond";
32
+ readonly document: "doc";
33
+ readonly event: "evt";
34
+ readonly experiment: "exp";
35
+ readonly family: "fam";
36
+ readonly food: "food";
37
+ readonly goal: "goal";
38
+ readonly meal: "meal";
39
+ readonly pack: "pack";
40
+ readonly profileSnapshot: "psnap";
41
+ readonly provider: "prov";
42
+ readonly recipe: "rcp";
43
+ readonly protocol: "prot";
44
+ readonly sample: "smp";
45
+ readonly transform: "xfm";
46
+ readonly variant: "var";
47
+ readonly vault: "vault";
48
+ readonly workoutFormat: "wfmt";
49
+ }>;
50
+ export declare const EVENT_KINDS: readonly ["adverse_effect", "document", "encounter", "exposure", "meal", "symptom", "note", "observation", "experiment_event", "medication_intake", "procedure", "supplement_intake", "test", "activity_session", "sleep_session", "intervention_session"];
51
+ export declare const HEALTH_HISTORY_EVENT_KINDS: readonly ["encounter", "procedure", "test", "adverse_effect", "exposure"];
52
+ export type HealthHistoryEventKind = (typeof HEALTH_HISTORY_EVENT_KINDS)[number];
53
+ export declare const EVENT_SOURCES: readonly ["manual", "import", "device", "derived"];
54
+ export declare const EXPERIMENT_PHASES: readonly ["start", "checkpoint", "stop"];
55
+ export declare const SAMPLE_STREAMS: readonly ["heart_rate", "hrv", "steps", "sleep_stage", "respiratory_rate", "temperature", "glucose"];
56
+ export declare const SAMPLE_SOURCES: readonly ["device", "import", "manual", "derived"];
57
+ export declare const SAMPLE_QUALITIES: readonly ["raw", "normalized", "derived"];
58
+ export declare const SLEEP_STAGES: readonly ["awake", "light", "deep", "rem"];
59
+ export declare const ASSESSMENT_SOURCES: readonly ["import", "manual", "derived"];
60
+ export declare const RAW_IMPORT_KINDS: readonly ["assessment", "device_batch", "document", "meal", "sample_batch"];
61
+ export declare const PROFILE_SNAPSHOT_SOURCES: readonly ["assessment_projection", "manual", "derived"];
62
+ export declare const GOAL_STATUSES: readonly ["active", "paused", "completed", "abandoned"];
63
+ export declare const GOAL_HORIZONS: readonly ["short_term", "medium_term", "long_term", "ongoing"];
64
+ export declare const CONDITION_CLINICAL_STATUSES: readonly ["active", "inactive", "resolved"];
65
+ export declare const CONDITION_VERIFICATION_STATUSES: readonly ["unconfirmed", "provisional", "confirmed", "refuted"];
66
+ export declare const CONDITION_SEVERITIES: readonly ["mild", "moderate", "severe"];
67
+ export declare const ALLERGY_STATUSES: readonly ["active", "inactive", "resolved"];
68
+ export declare const ALLERGY_CRITICALITIES: readonly ["low", "high", "unable_to_assess"];
69
+ export declare const PROTOCOL_KINDS: readonly ["medication", "supplement", "therapy", "habit"];
70
+ export declare const PROTOCOL_STATUSES: readonly ["active", "paused", "completed", "stopped"];
71
+ export declare const FOOD_STATUSES: readonly ["active", "archived"];
72
+ export declare const WORKOUT_FORMAT_STATUSES: readonly ["active", "archived"];
73
+ export declare const RECIPE_STATUSES: readonly ["draft", "saved", "archived"];
74
+ export declare const TEST_RESULT_STATUSES: readonly ["pending", "normal", "abnormal", "mixed", "unknown"];
75
+ export declare const BLOOD_TEST_CATEGORY: "blood";
76
+ export declare const BLOOD_TEST_FASTING_STATUSES: readonly ["fasting", "non_fasting", "unknown"];
77
+ export declare const BLOOD_TEST_RESULT_FLAGS: readonly ["low", "normal", "high", "abnormal", "critical", "unknown"];
78
+ export declare const BLOOD_TEST_SPECIMEN_TYPES: readonly ["blood", "whole_blood", "serum", "plasma", "dried_blood_spot"];
79
+ export declare const ADVERSE_EFFECT_SEVERITIES: readonly ["mild", "moderate", "severe"];
80
+ export declare const VARIANT_ZYGOSITIES: readonly ["heterozygous", "homozygous", "compound_heterozygous", "unknown"];
81
+ export declare const VARIANT_SIGNIFICANCES: readonly ["pathogenic", "likely_pathogenic", "risk_factor", "vus", "benign", "unknown"];
82
+ export declare const AUDIT_ACTIONS: readonly ["allergy_upsert", "condition_upsert", "family_upsert", "genetics_upsert", "goal_upsert", "history_add", "intake_import", "intake_project", "vault_init", "vault_repair", "document_import", "device_import", "experiment_create", "journal_ensure", "list", "meal_add", "export_pack", "food_upsert", "provider_upsert", "profile_current_rebuild", "profile_snapshot_add", "recipe_upsert", "protocol_stop", "protocol_upsert", "samples_import_csv", "show", "validate", "workout_format_upsert"];
83
+ export declare const AUDIT_ACTORS: readonly ["cli", "core", "importer", "query"];
84
+ export declare const AUDIT_STATUSES: readonly ["success", "failure"];
85
+ export declare const FILE_CHANGE_OPERATIONS: readonly ["create", "append", "update", "copy"];
86
+ export declare const FRONTMATTER_DOC_TYPES: Readonly<{
87
+ readonly allergy: "allergy";
88
+ readonly core: "core";
89
+ readonly condition: "condition";
90
+ readonly experiment: "experiment";
91
+ readonly food: "food";
92
+ readonly familyMember: "family_member";
93
+ readonly geneticVariant: "genetic_variant";
94
+ readonly goal: "goal";
95
+ readonly journalDay: "journal_day";
96
+ readonly profileCurrent: "profile_current";
97
+ readonly provider: "provider";
98
+ readonly recipe: "recipe";
99
+ readonly protocol: "protocol";
100
+ readonly workoutFormat: "workout_format";
101
+ }>;
102
+ export declare const EXPERIMENT_STATUSES: readonly ["planned", "active", "paused", "completed", "abandoned"];
103
+ export declare const ERROR_CODES: readonly [{
104
+ readonly code: "CONTRACT_INVALID";
105
+ readonly retryable: false;
106
+ readonly summary: "A payload failed the frozen contract shape.";
107
+ }, {
108
+ readonly code: "ID_INVALID";
109
+ readonly retryable: false;
110
+ readonly summary: "An identifier did not match the frozen prefix plus ULID policy.";
111
+ }, {
112
+ readonly code: "PATH_INVALID";
113
+ readonly retryable: false;
114
+ readonly summary: "A stored path was absolute, escaped the vault root, or missed its path family.";
115
+ }, {
116
+ readonly code: "VAULT_INVALID";
117
+ readonly retryable: false;
118
+ readonly summary: "The vault metadata contract failed validation.";
119
+ }, {
120
+ readonly code: "EVENT_INVALID";
121
+ readonly retryable: false;
122
+ readonly summary: "An event record failed validation.";
123
+ }, {
124
+ readonly code: "SAMPLE_INVALID";
125
+ readonly retryable: false;
126
+ readonly summary: "A sample record failed validation.";
127
+ }, {
128
+ readonly code: "AUDIT_INVALID";
129
+ readonly retryable: false;
130
+ readonly summary: "An audit record failed validation.";
131
+ }, {
132
+ readonly code: "FRONTMATTER_INVALID";
133
+ readonly retryable: false;
134
+ readonly summary: "A Markdown frontmatter block failed validation.";
135
+ }, {
136
+ readonly code: "ENUM_UNSUPPORTED";
137
+ readonly retryable: false;
138
+ readonly summary: "A value was outside the frozen baseline enums.";
139
+ }, {
140
+ readonly code: "SHARD_KEY_INVALID";
141
+ readonly retryable: false;
142
+ readonly summary: "A monthly shard key or day key failed the required format.";
143
+ }, {
144
+ readonly code: "SCHEMA_ARTIFACT_STALE";
145
+ readonly retryable: false;
146
+ readonly summary: "Generated JSON Schema artifacts are missing or do not match source contracts.";
147
+ }];
148
+ export declare const ERROR_CODE_VALUES: readonly (typeof ERROR_CODES)[number]["code"][];
149
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;EAwBzB,CAAC;AAEZ,eAAO,MAAM,kBAAkB,EAAG,aAAsB,CAAC;AAEzD,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;EAsBb,CAAC;AAEZ,eAAO,MAAM,WAAW,4PAiBb,CAAC;AAEZ,eAAO,MAAM,0BAA0B,2EAM5B,CAAC;AAEZ,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,0BAA0B,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjF,eAAO,MAAM,aAAa,oDAAoE,CAAC;AAE/F,eAAO,MAAM,iBAAiB,0CAA0D,CAAC;AAEzF,eAAO,MAAM,cAAc,sGAQhB,CAAC;AAEZ,eAAO,MAAM,cAAc,oDAAoE,CAAC;AAEhG,eAAO,MAAM,gBAAgB,2CAA2D,CAAC;AAEzF,eAAO,MAAM,YAAY,4CAA4D,CAAC;AAEtF,eAAO,MAAM,kBAAkB,0CAA0D,CAAC;AAE1F,eAAO,MAAM,gBAAgB,6EAMlB,CAAC;AAEZ,eAAO,MAAM,wBAAwB,yDAAyE,CAAC;AAE/G,eAAO,MAAM,aAAa,yDAAyE,CAAC;AAEpG,eAAO,MAAM,aAAa,gEAAgF,CAAC;AAE3G,eAAO,MAAM,2BAA2B,6CAA6D,CAAC;AAEtG,eAAO,MAAM,+BAA+B,iEAE3C,CAAC;AAEF,eAAO,MAAM,oBAAoB,yCAAyD,CAAC;AAE3F,eAAO,MAAM,gBAAgB,6CAA6D,CAAC;AAE3F,eAAO,MAAM,qB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