@lssm/example.locale-jurisdiction-gate 0.0.0-canary-20251217080011 → 0.0.0-canary-20251219202229

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 (178) hide show
  1. package/.turbo/turbo-build$colon$bundle.log +288 -232
  2. package/.turbo/turbo-build.log +289 -43
  3. package/CHANGELOG.md +3 -3
  4. package/LICENSE +21 -0
  5. package/dist/contracts/assistant.d.ts +62 -61
  6. package/dist/contracts/assistant.d.ts.map +1 -0
  7. package/dist/contracts/assistant.js +7 -8
  8. package/dist/contracts/assistant.js.map +1 -0
  9. package/dist/docs/locale-jurisdiction-gate.docblock.js +2 -1
  10. package/dist/docs/locale-jurisdiction-gate.docblock.js.map +1 -0
  11. package/dist/entities/models.d.ts +50 -49
  12. package/dist/entities/models.d.ts.map +1 -0
  13. package/dist/entities/models.js +33 -35
  14. package/dist/entities/models.js.map +1 -0
  15. package/dist/events.d.ts +21 -20
  16. package/dist/events.d.ts.map +1 -0
  17. package/dist/events.js +21 -21
  18. package/dist/events.js.map +1 -0
  19. package/dist/example.d.ts +2 -1
  20. package/dist/example.d.ts.map +1 -0
  21. package/dist/example.js +2 -1
  22. package/dist/example.js.map +1 -0
  23. package/dist/handlers/demo.handlers.d.ts +2 -1
  24. package/dist/handlers/demo.handlers.d.ts.map +1 -0
  25. package/dist/handlers/demo.handlers.js +2 -1
  26. package/dist/handlers/demo.handlers.js.map +1 -0
  27. package/dist/libs/contracts/dist/capabilities/openbanking.js +2 -1
  28. package/dist/libs/contracts/dist/capabilities/openbanking.js.map +1 -0
  29. package/dist/libs/contracts/dist/contract-registry/schemas.js +2 -1
  30. package/dist/libs/contracts/dist/contract-registry/schemas.js.map +1 -0
  31. package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +2 -1
  32. package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js.map +1 -0
  33. package/dist/libs/contracts/dist/docs/index.js +2 -6
  34. package/dist/libs/contracts/dist/docs/meta.docs.js +30 -0
  35. package/dist/libs/contracts/dist/docs/meta.docs.js.map +1 -0
  36. package/dist/libs/contracts/dist/docs/presentations.js +2 -1
  37. package/dist/libs/contracts/dist/docs/presentations.js.map +1 -0
  38. package/dist/libs/contracts/dist/docs/registry.js +2 -1
  39. package/dist/libs/contracts/dist/docs/registry.js.map +1 -0
  40. package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +2 -1
  41. package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js.map +1 -0
  42. package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +2 -1
  43. package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js.map +1 -0
  44. package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +2 -1
  45. package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js.map +1 -0
  46. package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +2 -1
  47. package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js.map +1 -0
  48. package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +2 -1
  49. package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js.map +1 -0
  50. package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +2 -1
  51. package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js.map +1 -0
  52. package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +2 -1
  53. package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js.map +1 -0
  54. package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +2 -1
  55. package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js.map +1 -0
  56. package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +2 -1
  57. package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js.map +1 -0
  58. package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +2 -1
  59. package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js.map +1 -0
  60. package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +2 -1
  61. package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js.map +1 -0
  62. package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +2 -1
  63. package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js.map +1 -0
  64. package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +2 -1
  65. package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js.map +1 -0
  66. package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +2 -1
  67. package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js.map +1 -0
  68. package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +2 -1
  69. package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js.map +1 -0
  70. package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +2 -1
  71. package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js.map +1 -0
  72. package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +2 -1
  73. package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js.map +1 -0
  74. package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +2 -1
  75. package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js.map +1 -0
  76. package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +2 -1
  77. package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js.map +1 -0
  78. package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +2 -1
  79. package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js.map +1 -0
  80. package/dist/libs/contracts/dist/docs/tech-contracts.docs.js +97 -0
  81. package/dist/libs/contracts/dist/docs/tech-contracts.docs.js.map +1 -0
  82. package/dist/libs/contracts/dist/events.js +2 -1
  83. package/dist/libs/contracts/dist/events.js.map +1 -0
  84. package/dist/libs/contracts/dist/index.js +3 -2
  85. package/dist/libs/contracts/dist/integrations/contracts.js +65 -66
  86. package/dist/libs/contracts/dist/integrations/contracts.js.map +1 -0
  87. package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +31 -32
  88. package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js.map +1 -0
  89. package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +18 -19
  90. package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js.map +1 -0
  91. package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +32 -33
  92. package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js.map +1 -0
  93. package/dist/libs/contracts/dist/integrations/openbanking/models.js +60 -61
  94. package/dist/libs/contracts/dist/integrations/openbanking/models.js.map +1 -0
  95. package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js +2 -1
  96. package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js.map +1 -0
  97. package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js +2 -1
  98. package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js.map +1 -0
  99. package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js +2 -1
  100. package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js.map +1 -0
  101. package/dist/libs/contracts/dist/integrations/providers/gmail.js +2 -1
  102. package/dist/libs/contracts/dist/integrations/providers/gmail.js.map +1 -0
  103. package/dist/libs/contracts/dist/integrations/providers/google-calendar.js +2 -1
  104. package/dist/libs/contracts/dist/integrations/providers/google-calendar.js.map +1 -0
  105. package/dist/libs/contracts/dist/integrations/providers/mistral.js +2 -1
  106. package/dist/libs/contracts/dist/integrations/providers/mistral.js.map +1 -0
  107. package/dist/libs/contracts/dist/integrations/providers/postmark.js +2 -1
  108. package/dist/libs/contracts/dist/integrations/providers/postmark.js.map +1 -0
  109. package/dist/libs/contracts/dist/integrations/providers/powens.js +2 -1
  110. package/dist/libs/contracts/dist/integrations/providers/powens.js.map +1 -0
  111. package/dist/libs/contracts/dist/integrations/providers/qdrant.js +2 -1
  112. package/dist/libs/contracts/dist/integrations/providers/qdrant.js.map +1 -0
  113. package/dist/libs/contracts/dist/integrations/providers/stripe.js +2 -1
  114. package/dist/libs/contracts/dist/integrations/providers/stripe.js.map +1 -0
  115. package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js +2 -1
  116. package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js.map +1 -0
  117. package/dist/libs/contracts/dist/knowledge/contracts.js +44 -45
  118. package/dist/libs/contracts/dist/knowledge/contracts.js.map +1 -0
  119. package/dist/libs/contracts/dist/knowledge/spaces/email-threads.js +2 -1
  120. package/dist/libs/contracts/dist/knowledge/spaces/email-threads.js.map +1 -0
  121. package/dist/libs/contracts/dist/knowledge/spaces/financial-docs.js +2 -1
  122. package/dist/libs/contracts/dist/knowledge/spaces/financial-docs.js.map +1 -0
  123. package/dist/libs/contracts/dist/knowledge/spaces/financial-overview.js +2 -1
  124. package/dist/libs/contracts/dist/knowledge/spaces/financial-overview.js.map +1 -0
  125. package/dist/libs/contracts/dist/knowledge/spaces/product-canon.js +2 -1
  126. package/dist/libs/contracts/dist/knowledge/spaces/product-canon.js.map +1 -0
  127. package/dist/libs/contracts/dist/knowledge/spaces/support-faq.js +2 -1
  128. package/dist/libs/contracts/dist/knowledge/spaces/support-faq.js.map +1 -0
  129. package/dist/libs/contracts/dist/knowledge/spaces/uploaded-docs.js +2 -1
  130. package/dist/libs/contracts/dist/knowledge/spaces/uploaded-docs.js.map +1 -0
  131. package/dist/libs/contracts/dist/llm/exporters.js +2 -1
  132. package/dist/libs/contracts/dist/llm/exporters.js.map +1 -0
  133. package/dist/libs/contracts/dist/onboarding-base.js +22 -23
  134. package/dist/libs/contracts/dist/onboarding-base.js.map +1 -0
  135. package/dist/libs/contracts/dist/ownership.js +4 -2
  136. package/dist/libs/contracts/dist/ownership.js.map +1 -0
  137. package/dist/libs/contracts/dist/presentations.v2.js +2 -1
  138. package/dist/libs/contracts/dist/presentations.v2.js.map +1 -0
  139. package/dist/libs/contracts/dist/regenerator/service.js +2 -1
  140. package/dist/libs/contracts/dist/regenerator/service.js.map +1 -0
  141. package/dist/libs/contracts/dist/schema/dist/index.js +3874 -6
  142. package/dist/libs/contracts/dist/schema/dist/index.js.map +1 -0
  143. package/dist/libs/contracts/dist/spec.js +2 -1
  144. package/dist/libs/contracts/dist/spec.js.map +1 -0
  145. package/dist/libs/schema/dist/index.js +4717 -6
  146. package/dist/libs/schema/dist/index.js.map +1 -0
  147. package/dist/locale-jurisdiction-gate.feature.d.ts +2 -1
  148. package/dist/locale-jurisdiction-gate.feature.d.ts.map +1 -0
  149. package/dist/locale-jurisdiction-gate.feature.js +2 -1
  150. package/dist/locale-jurisdiction-gate.feature.js.map +1 -0
  151. package/dist/policy/guard.d.ts +2 -1
  152. package/dist/policy/guard.d.ts.map +1 -0
  153. package/dist/policy/guard.js +2 -1
  154. package/dist/policy/guard.js.map +1 -0
  155. package/dist/policy/types.d.ts +2 -1
  156. package/dist/policy/types.d.ts.map +1 -0
  157. package/package.json +8 -7
  158. package/tsconfig.tsbuildinfo +1 -1
  159. package/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +0 -16
  160. package/dist/libs/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +0 -16
  161. package/dist/libs/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +0 -16
  162. package/dist/libs/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +0 -16
  163. package/dist/libs/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +0 -16
  164. package/dist/libs/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +0 -16
  165. package/dist/libs/contracts/dist/schema/dist/EnumType.js +0 -2
  166. package/dist/libs/contracts/dist/schema/dist/FieldType.js +0 -49
  167. package/dist/libs/contracts/dist/schema/dist/ScalarTypeEnum.js +0 -236
  168. package/dist/libs/contracts/dist/schema/dist/SchemaModel.js +0 -39
  169. package/dist/libs/contracts/dist/schema/dist/entity/defineEntity.js +0 -1
  170. package/dist/libs/contracts/dist/schema/dist/entity/index.js +0 -2
  171. package/dist/libs/contracts/dist/schema/dist/entity/types.js +0 -1
  172. package/dist/libs/schema/dist/EnumType.js +0 -56
  173. package/dist/libs/schema/dist/FieldType.js +0 -49
  174. package/dist/libs/schema/dist/ScalarTypeEnum.js +0 -236
  175. package/dist/libs/schema/dist/SchemaModel.js +0 -39
  176. package/dist/libs/schema/dist/entity/defineEntity.js +0 -1
  177. package/dist/libs/schema/dist/entity/index.js +0 -2
  178. package/dist/libs/schema/dist/entity/types.js +0 -1
@@ -1,50 +1,47 @@
1
- import { defineEnum } from "../libs/schema/dist/EnumType.js";
2
- import { ScalarTypeEnum } from "../libs/schema/dist/ScalarTypeEnum.js";
3
- import { defineSchemaModel } from "../libs/schema/dist/SchemaModel.js";
4
- import "../libs/schema/dist/index.js";
1
+ import { E5, K5, N5 } from "../libs/schema/dist/index.js";
5
2
 
6
3
  //#region src/entities/models.ts
7
- const AllowedScopeEnum = defineEnum("AllowedScope", [
4
+ const AllowedScopeEnum = N5("AllowedScope", [
8
5
  "education_only",
9
6
  "generic_info",
10
7
  "escalation_required"
11
8
  ]);
12
- const UserProfileModel = defineSchemaModel({
9
+ const UserProfileModel = K5({
13
10
  name: "UserProfile",
14
11
  description: "User profile inputs used to derive regulatory context.",
15
12
  fields: {
16
13
  preferredLocale: {
17
- type: ScalarTypeEnum.String_unsecure(),
14
+ type: E5.String_unsecure(),
18
15
  isOptional: true
19
16
  },
20
17
  residencyCountry: {
21
- type: ScalarTypeEnum.String_unsecure(),
18
+ type: E5.String_unsecure(),
22
19
  isOptional: true
23
20
  },
24
21
  taxResidenceCountry: {
25
- type: ScalarTypeEnum.String_unsecure(),
22
+ type: E5.String_unsecure(),
26
23
  isOptional: true
27
24
  },
28
25
  clientType: {
29
- type: ScalarTypeEnum.String_unsecure(),
26
+ type: E5.String_unsecure(),
30
27
  isOptional: true
31
28
  }
32
29
  }
33
30
  });
34
- const RegulatoryContextModel = defineSchemaModel({
31
+ const RegulatoryContextModel = K5({
35
32
  name: "RegulatoryContext",
36
33
  description: "Explicit regulatory context (no guessing).",
37
34
  fields: {
38
35
  jurisdiction: {
39
- type: ScalarTypeEnum.String_unsecure(),
36
+ type: E5.String_unsecure(),
40
37
  isOptional: false
41
38
  },
42
39
  region: {
43
- type: ScalarTypeEnum.String_unsecure(),
40
+ type: E5.String_unsecure(),
44
41
  isOptional: true
45
42
  },
46
43
  clientType: {
47
- type: ScalarTypeEnum.String_unsecure(),
44
+ type: E5.String_unsecure(),
48
45
  isOptional: true
49
46
  },
50
47
  allowedScope: {
@@ -53,16 +50,16 @@ const RegulatoryContextModel = defineSchemaModel({
53
50
  }
54
51
  }
55
52
  });
56
- const LLMCallEnvelopeModel = defineSchemaModel({
53
+ const LLMCallEnvelopeModel = K5({
57
54
  name: "LLMCallEnvelope",
58
55
  description: "Mandatory envelope for assistant calls. All fields are explicit and required for policy gating.",
59
56
  fields: {
60
57
  traceId: {
61
- type: ScalarTypeEnum.String_unsecure(),
58
+ type: E5.String_unsecure(),
62
59
  isOptional: false
63
60
  },
64
61
  locale: {
65
- type: ScalarTypeEnum.String_unsecure(),
62
+ type: E5.String_unsecure(),
66
63
  isOptional: false
67
64
  },
68
65
  regulatoryContext: {
@@ -70,7 +67,7 @@ const LLMCallEnvelopeModel = defineSchemaModel({
70
67
  isOptional: false
71
68
  },
72
69
  kbSnapshotId: {
73
- type: ScalarTypeEnum.String_unsecure(),
70
+ type: E5.String_unsecure(),
74
71
  isOptional: false
75
72
  },
76
73
  allowedScope: {
@@ -79,56 +76,56 @@ const LLMCallEnvelopeModel = defineSchemaModel({
79
76
  }
80
77
  }
81
78
  });
82
- const AssistantCitationModel = defineSchemaModel({
79
+ const AssistantCitationModel = K5({
83
80
  name: "AssistantCitation",
84
81
  description: "Citation referencing a KB snapshot + a specific item within it.",
85
82
  fields: {
86
83
  kbSnapshotId: {
87
- type: ScalarTypeEnum.String_unsecure(),
84
+ type: E5.String_unsecure(),
88
85
  isOptional: false
89
86
  },
90
87
  sourceType: {
91
- type: ScalarTypeEnum.String_unsecure(),
88
+ type: E5.String_unsecure(),
92
89
  isOptional: false
93
90
  },
94
91
  sourceId: {
95
- type: ScalarTypeEnum.String_unsecure(),
92
+ type: E5.String_unsecure(),
96
93
  isOptional: false
97
94
  },
98
95
  title: {
99
- type: ScalarTypeEnum.String_unsecure(),
96
+ type: E5.String_unsecure(),
100
97
  isOptional: true
101
98
  },
102
99
  excerpt: {
103
- type: ScalarTypeEnum.String_unsecure(),
100
+ type: E5.String_unsecure(),
104
101
  isOptional: true
105
102
  }
106
103
  }
107
104
  });
108
- const AssistantAnswerSectionModel = defineSchemaModel({
105
+ const AssistantAnswerSectionModel = K5({
109
106
  name: "AssistantAnswerSection",
110
107
  description: "Structured answer section.",
111
108
  fields: {
112
109
  heading: {
113
- type: ScalarTypeEnum.String_unsecure(),
110
+ type: E5.String_unsecure(),
114
111
  isOptional: false
115
112
  },
116
113
  body: {
117
- type: ScalarTypeEnum.String_unsecure(),
114
+ type: E5.String_unsecure(),
118
115
  isOptional: false
119
116
  }
120
117
  }
121
118
  });
122
- const AssistantAnswerIRModel = defineSchemaModel({
119
+ const AssistantAnswerIRModel = K5({
123
120
  name: "AssistantAnswerIR",
124
121
  description: "Structured assistant answer with mandatory citations and explicit locale/jurisdiction.",
125
122
  fields: {
126
123
  locale: {
127
- type: ScalarTypeEnum.String_unsecure(),
124
+ type: E5.String_unsecure(),
128
125
  isOptional: false
129
126
  },
130
127
  jurisdiction: {
131
- type: ScalarTypeEnum.String_unsecure(),
128
+ type: E5.String_unsecure(),
132
129
  isOptional: false
133
130
  },
134
131
  allowedScope: {
@@ -146,25 +143,26 @@ const AssistantAnswerIRModel = defineSchemaModel({
146
143
  isOptional: false
147
144
  },
148
145
  disclaimers: {
149
- type: ScalarTypeEnum.String_unsecure(),
146
+ type: E5.String_unsecure(),
150
147
  isArray: true,
151
148
  isOptional: true
152
149
  },
153
150
  riskFlags: {
154
- type: ScalarTypeEnum.String_unsecure(),
151
+ type: E5.String_unsecure(),
155
152
  isArray: true,
156
153
  isOptional: true
157
154
  },
158
155
  refused: {
159
- type: ScalarTypeEnum.Boolean(),
156
+ type: E5.Boolean(),
160
157
  isOptional: true
161
158
  },
162
159
  refusalReason: {
163
- type: ScalarTypeEnum.String_unsecure(),
160
+ type: E5.String_unsecure(),
164
161
  isOptional: true
165
162
  }
166
163
  }
167
164
  });
168
165
 
169
166
  //#endregion
170
- export { AllowedScopeEnum, AssistantAnswerIRModel, AssistantAnswerSectionModel, AssistantCitationModel, LLMCallEnvelopeModel, RegulatoryContextModel, UserProfileModel };
167
+ export { AllowedScopeEnum, AssistantAnswerIRModel, AssistantAnswerSectionModel, AssistantCitationModel, LLMCallEnvelopeModel, RegulatoryContextModel, UserProfileModel };
168
+ //# sourceMappingURL=models.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.js","names":["defineEnum","defineSchemaModel","ScalarTypeEnum"],"sources":["../../src/entities/models.ts"],"sourcesContent":["import {\n ScalarTypeEnum,\n defineEnum,\n defineSchemaModel,\n} from '@lssm/lib.schema';\n\nexport const AllowedScopeEnum = defineEnum('AllowedScope', [\n 'education_only',\n 'generic_info',\n 'escalation_required',\n]);\n\nexport const UserProfileModel = defineSchemaModel({\n name: 'UserProfile',\n description: 'User profile inputs used to derive regulatory context.',\n fields: {\n preferredLocale: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: true,\n },\n residencyCountry: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: true,\n },\n taxResidenceCountry: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: true,\n },\n clientType: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n});\n\nexport const RegulatoryContextModel = defineSchemaModel({\n name: 'RegulatoryContext',\n description: 'Explicit regulatory context (no guessing).',\n fields: {\n jurisdiction: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n region: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n clientType: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n allowedScope: { type: AllowedScopeEnum, isOptional: false },\n },\n});\n\nexport const LLMCallEnvelopeModel = defineSchemaModel({\n name: 'LLMCallEnvelope',\n description:\n 'Mandatory envelope for assistant calls. All fields are explicit and required for policy gating.',\n fields: {\n traceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n locale: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n regulatoryContext: { type: RegulatoryContextModel, isOptional: false },\n kbSnapshotId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n allowedScope: { type: AllowedScopeEnum, isOptional: false },\n },\n});\n\nexport const AssistantCitationModel = defineSchemaModel({\n name: 'AssistantCitation',\n description:\n 'Citation referencing a KB snapshot + a specific item within it.',\n fields: {\n kbSnapshotId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n sourceType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n sourceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n title: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n excerpt: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n});\n\nexport const AssistantAnswerSectionModel = defineSchemaModel({\n name: 'AssistantAnswerSection',\n description: 'Structured answer section.',\n fields: {\n heading: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n body: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n});\n\nexport const AssistantAnswerIRModel = defineSchemaModel({\n name: 'AssistantAnswerIR',\n description:\n 'Structured assistant answer with mandatory citations and explicit locale/jurisdiction.',\n fields: {\n locale: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n jurisdiction: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n allowedScope: { type: AllowedScopeEnum, isOptional: false },\n sections: {\n type: AssistantAnswerSectionModel,\n isArray: true,\n isOptional: false,\n },\n citations: {\n type: AssistantCitationModel,\n isArray: true,\n isOptional: false,\n },\n disclaimers: {\n type: ScalarTypeEnum.String_unsecure(),\n isArray: true,\n isOptional: true,\n },\n riskFlags: {\n type: ScalarTypeEnum.String_unsecure(),\n isArray: true,\n isOptional: true,\n },\n refused: { type: ScalarTypeEnum.Boolean(), isOptional: true },\n refusalReason: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n});\n"],"mappings":";;;AAMA,MAAa,mBAAmBA,GAAW,gBAAgB;CACzD;CACA;CACA;CACD,CAAC;AAEF,MAAa,mBAAmBC,GAAkB;CAChD,MAAM;CACN,aAAa;CACb,QAAQ;EACN,iBAAiB;GACf,MAAMC,GAAe,iBAAiB;GACtC,YAAY;GACb;EACD,kBAAkB;GAChB,MAAMA,GAAe,iBAAiB;GACtC,YAAY;GACb;EACD,qBAAqB;GACnB,MAAMA,GAAe,iBAAiB;GACtC,YAAY;GACb;EACD,YAAY;GAAE,MAAMA,GAAe,iBAAiB;GAAE,YAAY;GAAM;EACzE;CACF,CAAC;AAEF,MAAa,yBAAyBD,GAAkB;CACtD,MAAM;CACN,aAAa;CACb,QAAQ;EACN,cAAc;GAAE,MAAMC,GAAe,iBAAiB;GAAE,YAAY;GAAO;EAC3E,QAAQ;GAAE,MAAMA,GAAe,iBAAiB;GAAE,YAAY;GAAM;EACpE,YAAY;GAAE,MAAMA,GAAe,iBAAiB;GAAE,YAAY;GAAM;EACxE,cAAc;GAAE,MAAM;GAAkB,YAAY;GAAO;EAC5D;CACF,CAAC;AAEF,MAAa,uBAAuBD,GAAkB;CACpD,MAAM;CACN,aACE;CACF,QAAQ;EACN,SAAS;GAAE,MAAMC,GAAe,iBAAiB;GAAE,YAAY;GAAO;EACtE,QAAQ;GAAE,MAAMA,GAAe,iBAAiB;GAAE,YAAY;GAAO;EACrE,mBAAmB;GAAE,MAAM;GAAwB,YAAY;GAAO;EACtE,cAAc;GAAE,MAAMA,GAAe,iBAAiB;GAAE,YAAY;GAAO;EAC3E,cAAc;GAAE,MAAM;GAAkB,YAAY;GAAO;EAC5D;CACF,CAAC;AAEF,MAAa,yBAAyBD,GAAkB;CACtD,MAAM;CACN,aACE;CACF,QAAQ;EACN,cAAc;GAAE,MAAMC,GAAe,iBAAiB;GAAE,YAAY;GAAO;EAC3E,YAAY;GAAE,MAAMA,GAAe,iBAAiB;GAAE,YAAY;GAAO;EACzE,UAAU;GAAE,MAAMA,GAAe,iBAAiB;GAAE,YAAY;GAAO;EACvE,OAAO;GAAE,MAAMA,GAAe,iBAAiB;GAAE,YAAY;GAAM;EACnE,SAAS;GAAE,MAAMA,GAAe,iBAAiB;GAAE,YAAY;GAAM;EACtE;CACF,CAAC;AAEF,MAAa,8BAA8BD,GAAkB;CAC3D,MAAM;CACN,aAAa;CACb,QAAQ;EACN,SAAS;GAAE,MAAMC,GAAe,iBAAiB;GAAE,YAAY;GAAO;EACtE,MAAM;GAAE,MAAMA,GAAe,iBAAiB;GAAE,YAAY;GAAO;EACpE;CACF,CAAC;AAEF,MAAa,yBAAyBD,GAAkB;CACtD,MAAM;CACN,aACE;CACF,QAAQ;EACN,QAAQ;GAAE,MAAMC,GAAe,iBAAiB;GAAE,YAAY;GAAO;EACrE,cAAc;GAAE,MAAMA,GAAe,iBAAiB;GAAE,YAAY;GAAO;EAC3E,cAAc;GAAE,MAAM;GAAkB,YAAY;GAAO;EAC3D,UAAU;GACR,MAAM;GACN,SAAS;GACT,YAAY;GACb;EACD,WAAW;GACT,MAAM;GACN,SAAS;GACT,YAAY;GACb;EACD,aAAa;GACX,MAAMA,GAAe,iBAAiB;GACtC,SAAS;GACT,YAAY;GACb;EACD,WAAW;GACT,MAAMA,GAAe,iBAAiB;GACtC,SAAS;GACT,YAAY;GACb;EACD,SAAS;GAAE,MAAMA,GAAe,SAAS;GAAE,YAAY;GAAM;EAC7D,eAAe;GAAE,MAAMA,GAAe,iBAAiB;GAAE,YAAY;GAAM;EAC5E;CACF,CAAC"}
package/dist/events.d.ts CHANGED
@@ -1,68 +1,69 @@
1
- import * as _lssm_lib_schema104 from "@lssm/lib.schema";
2
- import * as _lssm_lib_contracts1 from "@lssm/lib.contracts";
1
+ import * as _lssm_lib_schema0 from "@lssm/lib.schema";
2
+ import * as _lssm_lib_contracts0 from "@lssm/lib.contracts";
3
3
 
4
4
  //#region src/events.d.ts
5
- declare const AssistantAnswerRequestedEvent: _lssm_lib_contracts1.EventSpec<_lssm_lib_schema104.SchemaModel<{
5
+ declare const AssistantAnswerRequestedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
6
6
  traceId: {
7
- type: _lssm_lib_schema104.FieldType<string, string>;
7
+ type: _lssm_lib_schema0.FieldType<string, string>;
8
8
  isOptional: false;
9
9
  };
10
10
  locale: {
11
- type: _lssm_lib_schema104.FieldType<string, string>;
11
+ type: _lssm_lib_schema0.FieldType<string, string>;
12
12
  isOptional: false;
13
13
  };
14
14
  jurisdiction: {
15
- type: _lssm_lib_schema104.FieldType<string, string>;
15
+ type: _lssm_lib_schema0.FieldType<string, string>;
16
16
  isOptional: false;
17
17
  };
18
18
  kbSnapshotId: {
19
- type: _lssm_lib_schema104.FieldType<string, string>;
19
+ type: _lssm_lib_schema0.FieldType<string, string>;
20
20
  isOptional: false;
21
21
  };
22
22
  allowedScope: {
23
- type: _lssm_lib_schema104.FieldType<string, string>;
23
+ type: _lssm_lib_schema0.FieldType<string, string>;
24
24
  isOptional: false;
25
25
  };
26
26
  }>>;
27
- declare const AssistantAnswerBlockedEvent: _lssm_lib_contracts1.EventSpec<_lssm_lib_schema104.SchemaModel<{
27
+ declare const AssistantAnswerBlockedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
28
28
  traceId: {
29
- type: _lssm_lib_schema104.FieldType<string, string>;
29
+ type: _lssm_lib_schema0.FieldType<string, string>;
30
30
  isOptional: false;
31
31
  };
32
32
  reasonCode: {
33
- type: _lssm_lib_schema104.FieldType<string, string>;
33
+ type: _lssm_lib_schema0.FieldType<string, string>;
34
34
  isOptional: false;
35
35
  };
36
36
  reason: {
37
- type: _lssm_lib_schema104.FieldType<string, string>;
37
+ type: _lssm_lib_schema0.FieldType<string, string>;
38
38
  isOptional: false;
39
39
  };
40
40
  }>>;
41
- declare const AssistantAnswerDeliveredEvent: _lssm_lib_contracts1.EventSpec<_lssm_lib_schema104.SchemaModel<{
41
+ declare const AssistantAnswerDeliveredEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
42
42
  traceId: {
43
- type: _lssm_lib_schema104.FieldType<string, string>;
43
+ type: _lssm_lib_schema0.FieldType<string, string>;
44
44
  isOptional: false;
45
45
  };
46
46
  locale: {
47
- type: _lssm_lib_schema104.FieldType<string, string>;
47
+ type: _lssm_lib_schema0.FieldType<string, string>;
48
48
  isOptional: false;
49
49
  };
50
50
  jurisdiction: {
51
- type: _lssm_lib_schema104.FieldType<string, string>;
51
+ type: _lssm_lib_schema0.FieldType<string, string>;
52
52
  isOptional: false;
53
53
  };
54
54
  kbSnapshotId: {
55
- type: _lssm_lib_schema104.FieldType<string, string>;
55
+ type: _lssm_lib_schema0.FieldType<string, string>;
56
56
  isOptional: false;
57
57
  };
58
58
  allowedScope: {
59
- type: _lssm_lib_schema104.FieldType<string, string>;
59
+ type: _lssm_lib_schema0.FieldType<string, string>;
60
60
  isOptional: false;
61
61
  };
62
62
  citationsCount: {
63
- type: _lssm_lib_schema104.FieldType<number, number>;
63
+ type: _lssm_lib_schema0.FieldType<number, number>;
64
64
  isOptional: false;
65
65
  };
66
66
  }>>;
67
67
  //#endregion
68
- export { AssistantAnswerBlockedEvent, AssistantAnswerDeliveredEvent, AssistantAnswerRequestedEvent };
68
+ export { AssistantAnswerBlockedEvent, AssistantAnswerDeliveredEvent, AssistantAnswerRequestedEvent };
69
+ //# sourceMappingURL=events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.d.ts","names":[],"sources":["../src/events.ts"],"sourcesContent":[],"mappings":";;;;cAea,+BAA6B,oBAAA,CAAA,4BAAA;;UAKxC,iBAAA,CAAA;;EALW,CAAA;EAKX,MAAA,EAAA;;;;;qCALwC,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;EAAA,CAAA;EAiB7B,YAAA,EAAA;IAKX,IAAA,6BAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;IALsC,IAAA,6BAAA,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;EAoB3B,CAAA;CAMX,CAAA,CAAA;cA1BW,6BAA2B,oBAAA,CAAA,4BAAA;;UAKtC,iBAAA,CAAA;;;;IAewC,IAAA,6BAAA,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;;;;;;;cAA7B,+BAA6B,oBAAA,CAAA,4BAAA;;UAMxC,iBAAA,CAAA"}
package/dist/events.js CHANGED
@@ -1,32 +1,31 @@
1
- import { defineSchemaModel } from "./libs/contracts/dist/schema/dist/SchemaModel.js";
1
+ import { K5 } from "./libs/contracts/dist/schema/dist/index.js";
2
2
  import { defineEvent } from "./libs/contracts/dist/events.js";
3
3
  import "./libs/contracts/dist/index.js";
4
- import { ScalarTypeEnum } from "./libs/schema/dist/ScalarTypeEnum.js";
5
- import "./libs/schema/dist/index.js";
4
+ import { E5 } from "./libs/schema/dist/index.js";
6
5
 
7
6
  //#region src/events.ts
8
- const AssistantAnswerRequestedPayload = defineSchemaModel({
7
+ const AssistantAnswerRequestedPayload = K5({
9
8
  name: "AssistantAnswerRequestedPayload",
10
9
  description: "Emitted when an assistant answer is requested (pre-gate).",
11
10
  fields: {
12
11
  traceId: {
13
- type: ScalarTypeEnum.String_unsecure(),
12
+ type: E5.String_unsecure(),
14
13
  isOptional: false
15
14
  },
16
15
  locale: {
17
- type: ScalarTypeEnum.String_unsecure(),
16
+ type: E5.String_unsecure(),
18
17
  isOptional: false
19
18
  },
20
19
  jurisdiction: {
21
- type: ScalarTypeEnum.String_unsecure(),
20
+ type: E5.String_unsecure(),
22
21
  isOptional: false
23
22
  },
24
23
  kbSnapshotId: {
25
- type: ScalarTypeEnum.String_unsecure(),
24
+ type: E5.String_unsecure(),
26
25
  isOptional: false
27
26
  },
28
27
  allowedScope: {
29
- type: ScalarTypeEnum.String_unsecure(),
28
+ type: E5.String_unsecure(),
30
29
  isOptional: false
31
30
  }
32
31
  }
@@ -37,20 +36,20 @@ const AssistantAnswerRequestedEvent = defineEvent({
37
36
  description: "Assistant answer requested (policy gate will run).",
38
37
  payload: AssistantAnswerRequestedPayload
39
38
  });
40
- const AssistantAnswerBlockedPayload = defineSchemaModel({
39
+ const AssistantAnswerBlockedPayload = K5({
41
40
  name: "AssistantAnswerBlockedPayload",
42
41
  description: "Emitted when a request is blocked by the gate.",
43
42
  fields: {
44
43
  traceId: {
45
- type: ScalarTypeEnum.String_unsecure(),
44
+ type: E5.String_unsecure(),
46
45
  isOptional: false
47
46
  },
48
47
  reasonCode: {
49
- type: ScalarTypeEnum.String_unsecure(),
48
+ type: E5.String_unsecure(),
50
49
  isOptional: false
51
50
  },
52
51
  reason: {
53
- type: ScalarTypeEnum.String_unsecure(),
52
+ type: E5.String_unsecure(),
54
53
  isOptional: false
55
54
  }
56
55
  }
@@ -61,32 +60,32 @@ const AssistantAnswerBlockedEvent = defineEvent({
61
60
  description: "Assistant answer blocked (fail-closed).",
62
61
  payload: AssistantAnswerBlockedPayload
63
62
  });
64
- const AssistantAnswerDeliveredPayload = defineSchemaModel({
63
+ const AssistantAnswerDeliveredPayload = K5({
65
64
  name: "AssistantAnswerDeliveredPayload",
66
65
  description: "Emitted when a structured, cited answer is delivered.",
67
66
  fields: {
68
67
  traceId: {
69
- type: ScalarTypeEnum.String_unsecure(),
68
+ type: E5.String_unsecure(),
70
69
  isOptional: false
71
70
  },
72
71
  locale: {
73
- type: ScalarTypeEnum.String_unsecure(),
72
+ type: E5.String_unsecure(),
74
73
  isOptional: false
75
74
  },
76
75
  jurisdiction: {
77
- type: ScalarTypeEnum.String_unsecure(),
76
+ type: E5.String_unsecure(),
78
77
  isOptional: false
79
78
  },
80
79
  kbSnapshotId: {
81
- type: ScalarTypeEnum.String_unsecure(),
80
+ type: E5.String_unsecure(),
82
81
  isOptional: false
83
82
  },
84
83
  allowedScope: {
85
- type: ScalarTypeEnum.String_unsecure(),
84
+ type: E5.String_unsecure(),
86
85
  isOptional: false
87
86
  },
88
87
  citationsCount: {
89
- type: ScalarTypeEnum.Int_unsecure(),
88
+ type: E5.Int_unsecure(),
90
89
  isOptional: false
91
90
  }
92
91
  }
@@ -99,4 +98,5 @@ const AssistantAnswerDeliveredEvent = defineEvent({
99
98
  });
100
99
 
101
100
  //#endregion
102
- export { AssistantAnswerBlockedEvent, AssistantAnswerDeliveredEvent, AssistantAnswerRequestedEvent };
101
+ export { AssistantAnswerBlockedEvent, AssistantAnswerDeliveredEvent, AssistantAnswerRequestedEvent };
102
+ //# sourceMappingURL=events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.js","names":["defineSchemaModel","ScalarTypeEnum"],"sources":["../src/events.ts"],"sourcesContent":["import { defineEvent, defineSchemaModel } from '@lssm/lib.contracts';\nimport { ScalarTypeEnum } from '@lssm/lib.schema';\n\nconst AssistantAnswerRequestedPayload = defineSchemaModel({\n name: 'AssistantAnswerRequestedPayload',\n description: 'Emitted when an assistant answer is requested (pre-gate).',\n fields: {\n traceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n locale: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n jurisdiction: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n kbSnapshotId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n allowedScope: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n});\n\nexport const AssistantAnswerRequestedEvent = defineEvent({\n name: 'assistant.answer.requested',\n version: 1,\n description: 'Assistant answer requested (policy gate will run).',\n payload: AssistantAnswerRequestedPayload,\n});\n\nconst AssistantAnswerBlockedPayload = defineSchemaModel({\n name: 'AssistantAnswerBlockedPayload',\n description: 'Emitted when a request is blocked by the gate.',\n fields: {\n traceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n reasonCode: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n reason: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n});\n\nexport const AssistantAnswerBlockedEvent = defineEvent({\n name: 'assistant.answer.blocked',\n version: 1,\n description: 'Assistant answer blocked (fail-closed).',\n payload: AssistantAnswerBlockedPayload,\n});\n\nconst AssistantAnswerDeliveredPayload = defineSchemaModel({\n name: 'AssistantAnswerDeliveredPayload',\n description: 'Emitted when a structured, cited answer is delivered.',\n fields: {\n traceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n locale: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n jurisdiction: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n kbSnapshotId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n allowedScope: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n citationsCount: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n },\n});\n\nexport const AssistantAnswerDeliveredEvent = defineEvent({\n name: 'assistant.answer.delivered',\n version: 1,\n description:\n 'Assistant answer delivered (must include KB snapshot citations).',\n payload: AssistantAnswerDeliveredPayload,\n});\n"],"mappings":";;;;;;AAGA,MAAM,kCAAkCA,GAAkB;CACxD,MAAM;CACN,aAAa;CACb,QAAQ;EACN,SAAS;GAAE,MAAMC,GAAe,iBAAiB;GAAE,YAAY;GAAO;EACtE,QAAQ;GAAE,MAAMA,GAAe,iBAAiB;GAAE,YAAY;GAAO;EACrE,cAAc;GAAE,MAAMA,GAAe,iBAAiB;GAAE,YAAY;GAAO;EAC3E,cAAc;GAAE,MAAMA,GAAe,iBAAiB;GAAE,YAAY;GAAO;EAC3E,cAAc;GAAE,MAAMA,GAAe,iBAAiB;GAAE,YAAY;GAAO;EAC5E;CACF,CAAC;AAEF,MAAa,gCAAgC,YAAY;CACvD,MAAM;CACN,SAAS;CACT,aAAa;CACb,SAAS;CACV,CAAC;AAEF,MAAM,gCAAgCD,GAAkB;CACtD,MAAM;CACN,aAAa;CACb,QAAQ;EACN,SAAS;GAAE,MAAMC,GAAe,iBAAiB;GAAE,YAAY;GAAO;EACtE,YAAY;GAAE,MAAMA,GAAe,iBAAiB;GAAE,YAAY;GAAO;EACzE,QAAQ;GAAE,MAAMA,GAAe,iBAAiB;GAAE,YAAY;GAAO;EACtE;CACF,CAAC;AAEF,MAAa,8BAA8B,YAAY;CACrD,MAAM;CACN,SAAS;CACT,aAAa;CACb,SAAS;CACV,CAAC;AAEF,MAAM,kCAAkCD,GAAkB;CACxD,MAAM;CACN,aAAa;CACb,QAAQ;EACN,SAAS;GAAE,MAAMC,GAAe,iBAAiB;GAAE,YAAY;GAAO;EACtE,QAAQ;GAAE,MAAMA,GAAe,iBAAiB;GAAE,YAAY;GAAO;EACrE,cAAc;GAAE,MAAMA,GAAe,iBAAiB;GAAE,YAAY;GAAO;EAC3E,cAAc;GAAE,MAAMA,GAAe,iBAAiB;GAAE,YAAY;GAAO;EAC3E,cAAc;GAAE,MAAMA,GAAe,iBAAiB;GAAE,YAAY;GAAO;EAC3E,gBAAgB;GAAE,MAAMA,GAAe,cAAc;GAAE,YAAY;GAAO;EAC3E;CACF,CAAC;AAEF,MAAa,gCAAgC,YAAY;CACvD,MAAM;CACN,SAAS;CACT,aACE;CACF,SAAS;CACV,CAAC"}
package/dist/example.d.ts CHANGED
@@ -32,4 +32,5 @@ declare const example: {
32
32
  };
33
33
  };
34
34
  //#endregion
35
- export { example as default };
35
+ export { example as default };
36
+ //# sourceMappingURL=example.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"example.d.ts","names":[],"sources":["../src/example.ts"],"sourcesContent":[],"mappings":";cAAM;EAAA,SAAA,EAwBI,EAAA,0BAAA"}
package/dist/example.js CHANGED
@@ -36,4 +36,5 @@ const example = {
36
36
  var example_default = example;
37
37
 
38
38
  //#endregion
39
- export { example_default as default };
39
+ export { example_default as default };
40
+ //# sourceMappingURL=example.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"example.js","names":[],"sources":["../src/example.ts"],"sourcesContent":["const example = {\n id: 'locale-jurisdiction-gate',\n title: 'Locale / Jurisdiction Gate',\n summary:\n 'Fail-closed gating for assistant calls: locale + jurisdiction + kbSnapshotId + allowedScope must be explicit, answers must cite a snapshot.',\n tags: ['policy', 'locale', 'jurisdiction', 'assistant', 'gating'],\n kind: 'knowledge',\n visibility: 'public',\n docs: {\n rootDocId: 'docs.examples.locale-jurisdiction-gate',\n },\n entrypoints: {\n packageName: '@lssm/example.locale-jurisdiction-gate',\n feature: './feature',\n contracts: './contracts',\n handlers: './handlers',\n docs: './docs',\n },\n surfaces: {\n templates: true,\n sandbox: { enabled: true, modes: ['markdown', 'specs'] },\n studio: { enabled: true, installable: true },\n mcp: { enabled: true },\n },\n} as const;\n\nexport default example;\n"],"mappings":";AAAA,MAAM,UAAU;CACd,IAAI;CACJ,OAAO;CACP,SACE;CACF,MAAM;EAAC;EAAU;EAAU;EAAgB;EAAa;EAAS;CACjE,MAAM;CACN,YAAY;CACZ,MAAM,EACJ,WAAW,0CACZ;CACD,aAAa;EACX,aAAa;EACb,SAAS;EACT,WAAW;EACX,UAAU;EACV,MAAM;EACP;CACD,UAAU;EACR,WAAW;EACX,SAAS;GAAE,SAAS;GAAM,OAAO,CAAC,YAAY,QAAQ;GAAE;EACxD,QAAQ;GAAE,SAAS;GAAM,aAAa;GAAM;EAC5C,KAAK,EAAE,SAAS,MAAM;EACvB;CACF;AAED,sBAAe"}
@@ -55,4 +55,5 @@ interface DemoAssistantHandlers {
55
55
  */
56
56
  declare function createDemoAssistantHandlers(): DemoAssistantHandlers;
57
57
  //#endregion
58
- export { DemoAssistantHandlers, createDemoAssistantHandlers };
58
+ export { DemoAssistantHandlers, createDemoAssistantHandlers };
59
+ //# sourceMappingURL=demo.handlers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"demo.handlers.d.ts","names":[],"sources":["../../src/handlers/demo.handlers.ts"],"sourcesContent":[],"mappings":";KAMK,YAAA;UAEK,iBAAA,CAFO;EAEP,MAAA,EAAA,MAAA;EAkBO,YAAA,EAAA,MAAA;EAMG,YAAA,EArBJ,YAqBI;EAIN,QAAA,EAAA;IAAR,OAAA,EAAA,MAAA;IAOc,IAAA,EAAA,MAAA;EAIN,CAAA,EAAA;EAAR,SAAA,EAAA;IAAO,YAAA,EAAA,MAAA;IAUG,UAAA,EAAA,MAAA;;;;;;;;;;UA/BC,qBAAA;;;;;;oBAMG;;;;;;MAId,QAAQ;;;;;;oBAOM;;;;;;MAId,QAAQ;;;;;;;;;iBAUE,2BAAA,CAAA,GAA+B"}
@@ -82,4 +82,5 @@ function createDemoAssistantHandlers() {
82
82
  }
83
83
 
84
84
  //#endregion
85
- export { createDemoAssistantHandlers };
85
+ export { createDemoAssistantHandlers };
86
+ //# sourceMappingURL=demo.handlers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"demo.handlers.js","names":["draft: AssistantAnswerIR"],"sources":["../../src/handlers/demo.handlers.ts"],"sourcesContent":["import {\n enforceAllowedScope,\n enforceCitations,\n validateEnvelope,\n} from '../policy/guard';\n\ntype AllowedScope = 'education_only' | 'generic_info' | 'escalation_required';\n\ninterface AssistantAnswerIR {\n locale: string;\n jurisdiction: string;\n allowedScope: AllowedScope;\n sections: { heading: string; body: string }[];\n citations: {\n kbSnapshotId: string;\n sourceType: string;\n sourceId: string;\n title?: string;\n excerpt?: string;\n }[];\n disclaimers?: string[];\n riskFlags?: string[];\n refused?: boolean;\n refusalReason?: string;\n}\n\nexport interface DemoAssistantHandlers {\n answer(input: {\n envelope: {\n traceId: string;\n locale: string;\n kbSnapshotId: string;\n allowedScope: AllowedScope;\n regulatoryContext: { jurisdiction: string };\n };\n question: string;\n }): Promise<AssistantAnswerIR>;\n\n explainConcept(input: {\n envelope: {\n traceId: string;\n locale: string;\n kbSnapshotId: string;\n allowedScope: AllowedScope;\n regulatoryContext: { jurisdiction: string };\n };\n conceptKey: string;\n }): Promise<AssistantAnswerIR>;\n}\n\n/**\n * Deterministic demo assistant handlers (no LLM).\n *\n * - Validates envelope\n * - Requires citations\n * - Enforces allowedScope (education_only blocks actionable language)\n */\nexport function createDemoAssistantHandlers(): DemoAssistantHandlers {\n async function answer(input: {\n envelope: DemoAssistantHandlers['answer'] extends (a: infer A) => any\n ? A extends { envelope: infer E }\n ? E\n : never\n : never;\n question: string;\n }): Promise<AssistantAnswerIR> {\n const env = validateEnvelope(input.envelope);\n if (!env.ok) {\n return {\n locale: input.envelope.locale ?? 'en-US',\n jurisdiction:\n input.envelope.regulatoryContext?.jurisdiction ?? 'UNKNOWN',\n allowedScope: input.envelope.allowedScope ?? 'education_only',\n sections: [\n {\n heading: 'Request blocked',\n body: env.error.message,\n },\n ],\n citations: [],\n disclaimers: [\n 'This system refuses to answer without a valid envelope.',\n ],\n riskFlags: [env.error.code],\n refused: true,\n refusalReason: env.error.code,\n };\n }\n\n const draft: AssistantAnswerIR = {\n locale: env.value.locale,\n jurisdiction: env.value.regulatoryContext!.jurisdiction!,\n allowedScope: env.value.allowedScope!,\n sections: [\n {\n heading: 'Answer (demo)',\n body: `You asked: \"${input.question}\". This demo answer is derived from the KB snapshot only.`,\n },\n ],\n citations: [\n {\n kbSnapshotId: env.value.kbSnapshotId!,\n sourceType: 'ruleVersion',\n sourceId: 'rv_demo',\n title: 'Demo rule version',\n excerpt: 'Demo excerpt',\n },\n ],\n disclaimers: ['Educational demo only.'],\n riskFlags: [],\n };\n\n const scope = enforceAllowedScope(env.value.allowedScope, draft);\n if (!scope.ok) {\n return {\n ...draft,\n sections: [\n { heading: 'Escalation required', body: scope.error.message },\n ],\n citations: draft.citations,\n refused: true,\n refusalReason: scope.error.code,\n riskFlags: [...(draft.riskFlags ?? []), scope.error.code],\n };\n }\n\n const cited = enforceCitations(draft);\n if (!cited.ok) {\n return {\n ...draft,\n sections: [{ heading: 'Request blocked', body: cited.error.message }],\n citations: [],\n refused: true,\n refusalReason: cited.error.code,\n riskFlags: [...(draft.riskFlags ?? []), cited.error.code],\n };\n }\n\n return draft;\n }\n\n async function explainConcept(input: {\n envelope: DemoAssistantHandlers['explainConcept'] extends (\n a: infer A\n ) => any\n ? A extends { envelope: infer E }\n ? E\n : never\n : never;\n conceptKey: string;\n }): Promise<AssistantAnswerIR> {\n return await answer({\n envelope: input.envelope,\n question: `Explain concept: ${input.conceptKey}`,\n });\n }\n\n return { answer, explainConcept };\n}\n"],"mappings":";;;;;;;;;;AAyDA,SAAgB,8BAAqD;CACnE,eAAe,OAAO,OAOS;EAC7B,MAAM,MAAM,iBAAiB,MAAM,SAAS;AAC5C,MAAI,CAAC,IAAI,GACP,QAAO;GACL,QAAQ,MAAM,SAAS,UAAU;GACjC,cACE,MAAM,SAAS,mBAAmB,gBAAgB;GACpD,cAAc,MAAM,SAAS,gBAAgB;GAC7C,UAAU,CACR;IACE,SAAS;IACT,MAAM,IAAI,MAAM;IACjB,CACF;GACD,WAAW,EAAE;GACb,aAAa,CACX,0DACD;GACD,WAAW,CAAC,IAAI,MAAM,KAAK;GAC3B,SAAS;GACT,eAAe,IAAI,MAAM;GAC1B;EAGH,MAAMA,QAA2B;GAC/B,QAAQ,IAAI,MAAM;GAClB,cAAc,IAAI,MAAM,kBAAmB;GAC3C,cAAc,IAAI,MAAM;GACxB,UAAU,CACR;IACE,SAAS;IACT,MAAM,eAAe,MAAM,SAAS;IACrC,CACF;GACD,WAAW,CACT;IACE,cAAc,IAAI,MAAM;IACxB,YAAY;IACZ,UAAU;IACV,OAAO;IACP,SAAS;IACV,CACF;GACD,aAAa,CAAC,yBAAyB;GACvC,WAAW,EAAE;GACd;EAED,MAAM,QAAQ,oBAAoB,IAAI,MAAM,cAAc,MAAM;AAChE,MAAI,CAAC,MAAM,GACT,QAAO;GACL,GAAG;GACH,UAAU,CACR;IAAE,SAAS;IAAuB,MAAM,MAAM,MAAM;IAAS,CAC9D;GACD,WAAW,MAAM;GACjB,SAAS;GACT,eAAe,MAAM,MAAM;GAC3B,WAAW,CAAC,GAAI,MAAM,aAAa,EAAE,EAAG,MAAM,MAAM,KAAK;GAC1D;EAGH,MAAM,QAAQ,iBAAiB,MAAM;AACrC,MAAI,CAAC,MAAM,GACT,QAAO;GACL,GAAG;GACH,UAAU,CAAC;IAAE,SAAS;IAAmB,MAAM,MAAM,MAAM;IAAS,CAAC;GACrE,WAAW,EAAE;GACb,SAAS;GACT,eAAe,MAAM,MAAM;GAC3B,WAAW,CAAC,GAAI,MAAM,aAAa,EAAE,EAAG,MAAM,MAAM,KAAK;GAC1D;AAGH,SAAO;;CAGT,eAAe,eAAe,OASC;AAC7B,SAAO,MAAM,OAAO;GAClB,UAAU,MAAM;GAChB,UAAU,oBAAoB,MAAM;GACrC,CAAC;;AAGJ,QAAO;EAAE;EAAQ;EAAgB"}
@@ -85,4 +85,5 @@ const openBankingBalancesReadCapability = {
85
85
  }]
86
86
  };
87
87
 
88
- //#endregion
88
+ //#endregion
89
+ //# sourceMappingURL=openbanking.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openbanking.js","names":[],"sources":["../../../../../../../libs/contracts/dist/capabilities/openbanking.js"],"sourcesContent":["import { StabilityEnum } from \"../ownership.js\";\n\n//#region src/capabilities/openbanking.ts\nconst OWNERS = [\"platform.finance\"];\nconst TAGS = [\"open-banking\", \"finance\"];\nconst openBankingAccountsReadCapability = {\n\tmeta: {\n\t\tkey: \"openbanking.accounts.read\",\n\t\tversion: 1,\n\t\tkind: \"integration\",\n\t\ttitle: \"Open Banking Accounts (Read)\",\n\t\tdescription: \"Provides read-only access to linked bank accounts, including account summaries and metadata.\",\n\t\tdomain: \"finance\",\n\t\towners: [...OWNERS],\n\t\ttags: [...TAGS],\n\t\tstability: StabilityEnum.Experimental\n\t},\n\tprovides: [\n\t\t{\n\t\t\tsurface: \"operation\",\n\t\t\tname: \"openbanking.accounts.list\",\n\t\t\tversion: 1,\n\t\t\tdescription: \"List bank accounts linked to a Powens open banking connection.\"\n\t\t},\n\t\t{\n\t\t\tsurface: \"operation\",\n\t\t\tname: \"openbanking.accounts.get\",\n\t\t\tversion: 1,\n\t\t\tdescription: \"Retrieve the canonical bank account record for a specific account.\"\n\t\t},\n\t\t{\n\t\t\tsurface: \"operation\",\n\t\t\tname: \"openbanking.accounts.sync\",\n\t\t\tversion: 1,\n\t\t\tdescription: \"Trigger a refresh of bank account metadata from the open banking provider.\"\n\t\t}\n\t]\n};\nconst openBankingTransactionsReadCapability = {\n\tmeta: {\n\t\tkey: \"openbanking.transactions.read\",\n\t\tversion: 1,\n\t\tkind: \"integration\",\n\t\ttitle: \"Open Banking Transactions (Read)\",\n\t\tdescription: \"Enables retrieval of transaction history for linked bank accounts via open banking providers.\",\n\t\tdomain: \"finance\",\n\t\towners: [...OWNERS],\n\t\ttags: [...TAGS, \"transactions\"],\n\t\tstability: StabilityEnum.Experimental\n\t},\n\tprovides: [{\n\t\tsurface: \"operation\",\n\t\tname: \"openbanking.transactions.list\",\n\t\tversion: 1,\n\t\tdescription: \"List transactions for a given bank account with optional date filtering.\"\n\t}, {\n\t\tsurface: \"operation\",\n\t\tname: \"openbanking.transactions.sync\",\n\t\tversion: 1,\n\t\tdescription: \"Synchronise transactions from the open banking provider into the canonical ledger.\"\n\t}]\n};\nconst openBankingBalancesReadCapability = {\n\tmeta: {\n\t\tkey: \"openbanking.balances.read\",\n\t\tversion: 1,\n\t\tkind: \"integration\",\n\t\ttitle: \"Open Banking Balances (Read)\",\n\t\tdescription: \"Allows querying of current and available balances for linked bank accounts via open banking providers.\",\n\t\tdomain: \"finance\",\n\t\towners: [...OWNERS],\n\t\ttags: [...TAGS, \"balances\"],\n\t\tstability: StabilityEnum.Experimental\n\t},\n\tprovides: [{\n\t\tsurface: \"operation\",\n\t\tname: \"openbanking.balances.get\",\n\t\tversion: 1,\n\t\tdescription: \"Retrieve the latest known balances for a specified bank account.\"\n\t}, {\n\t\tsurface: \"operation\",\n\t\tname: \"openbanking.balances.refresh\",\n\t\tversion: 1,\n\t\tdescription: \"Force a balance refresh from the open banking provider.\"\n\t}]\n};\nfunction registerOpenBankingCapabilities(registry) {\n\treturn registry.register(openBankingAccountsReadCapability).register(openBankingTransactionsReadCapability).register(openBankingBalancesReadCapability);\n}\n\n//#endregion\nexport { openBankingAccountsReadCapability, openBankingBalancesReadCapability, openBankingTransactionsReadCapability, registerOpenBankingCapabilities };\n//# sourceMappingURL=openbanking.js.map"],"mappings":";;;AAGA,MAAM,SAAS,CAAC,mBAAmB;AACnC,MAAM,OAAO,CAAC,gBAAgB,UAAU;AACxC,MAAM,oCAAoC;CACzC,MAAM;EACL,KAAK;EACL,SAAS;EACT,MAAM;EACN,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM,CAAC,GAAG,KAAK;EACf,WAAW,cAAc;EACzB;CACD,UAAU;EACT;GACC,SAAS;GACT,MAAM;GACN,SAAS;GACT,aAAa;GACb;EACD;GACC,SAAS;GACT,MAAM;GACN,SAAS;GACT,aAAa;GACb;EACD;GACC,SAAS;GACT,MAAM;GACN,SAAS;GACT,aAAa;GACb;EACD;CACD;AACD,MAAM,wCAAwC;CAC7C,MAAM;EACL,KAAK;EACL,SAAS;EACT,MAAM;EACN,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM,CAAC,GAAG,MAAM,eAAe;EAC/B,WAAW,cAAc;EACzB;CACD,UAAU,CAAC;EACV,SAAS;EACT,MAAM;EACN,SAAS;EACT,aAAa;EACb,EAAE;EACF,SAAS;EACT,MAAM;EACN,SAAS;EACT,aAAa;EACb,CAAC;CACF;AACD,MAAM,oCAAoC;CACzC,MAAM;EACL,KAAK;EACL,SAAS;EACT,MAAM;EACN,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM,CAAC,GAAG,MAAM,WAAW;EAC3B,WAAW,cAAc;EACzB;CACD,UAAU,CAAC;EACV,SAAS;EACT,MAAM;EACN,SAAS;EACT,aAAa;EACb,EAAE;EACF,SAAS;EACT,MAAM;EACN,SAAS;EACT,aAAa;EACb,CAAC;CACF"}
@@ -57,4 +57,5 @@ const ContractRegistryManifestSchema = z.object({
57
57
  });
58
58
 
59
59
  //#endregion
60
- export { ContractRegistryFileSchema, ContractRegistryItemSchema, ContractRegistryItemTypeSchema };
60
+ export { ContractRegistryFileSchema, ContractRegistryItemSchema, ContractRegistryItemTypeSchema };
61
+ //# sourceMappingURL=schemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.js","names":[],"sources":["../../../../../../../libs/contracts/dist/contract-registry/schemas.js"],"sourcesContent":["import { StabilityEnum } from \"../ownership.js\";\nimport z from \"zod\";\n\n//#region src/contract-registry/schemas.ts\nconst ContractRegistryItemTypeValues = [\n\t\"contractspec:operation\",\n\t\"contractspec:event\",\n\t\"contractspec:presentation\",\n\t\"contractspec:form\",\n\t\"contractspec:feature\",\n\t\"contractspec:workflow\",\n\t\"contractspec:template\",\n\t\"contractspec:integration\",\n\t\"contractspec:data-view\",\n\t\"contractspec:migration\",\n\t\"contractspec:telemetry\",\n\t\"contractspec:experiment\",\n\t\"contractspec:app-config\",\n\t\"contractspec:knowledge\"\n];\nconst ContractRegistryItemTypeSchema = z.enum(ContractRegistryItemTypeValues);\nconst ContractRegistryFileSchema = z.object({\n\tpath: z.string().min(1),\n\ttype: z.string().min(1),\n\tcontent: z.string().optional()\n});\nconst ContractRegistryItemSchema = z.object({\n\tname: z.string().min(1),\n\ttype: ContractRegistryItemTypeSchema,\n\tversion: z.number().int().nonnegative(),\n\ttitle: z.string().min(1),\n\tdescription: z.string().min(1),\n\tmeta: z.object({\n\t\tstability: z.enum([\n\t\t\tStabilityEnum.Idea,\n\t\t\tStabilityEnum.InCreation,\n\t\t\tStabilityEnum.Experimental,\n\t\t\tStabilityEnum.Beta,\n\t\t\tStabilityEnum.Stable,\n\t\t\tStabilityEnum.Deprecated\n\t\t]),\n\t\towners: z.array(z.string().min(1)).default([]),\n\t\ttags: z.array(z.string().min(1)).default([])\n\t}),\n\tdependencies: z.array(z.string().min(1)).optional(),\n\tregistryDependencies: z.array(z.string().min(1)).optional(),\n\tfiles: z.array(ContractRegistryFileSchema).min(1),\n\tschema: z.object({\n\t\tinput: z.unknown().optional(),\n\t\toutput: z.unknown().optional()\n\t}).optional()\n});\nconst ContractRegistryManifestSchema = z.object({\n\t$schema: z.string().min(1).optional(),\n\tname: z.string().min(1),\n\thomepage: z.string().min(1).optional(),\n\titems: z.array(ContractRegistryItemSchema)\n});\n\n//#endregion\nexport { ContractRegistryFileSchema, ContractRegistryItemSchema, ContractRegistryItemTypeSchema, ContractRegistryManifestSchema };\n//# sourceMappingURL=schemas.js.map"],"mappings":";;;;AAoBA,MAAM,iCAAiC,EAAE,KAhBF;CACtC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,CAC4E;AAC7E,MAAM,6BAA6B,EAAE,OAAO;CAC3C,MAAM,EAAE,QAAQ,CAAC,IAAI,EAAE;CACvB,MAAM,EAAE,QAAQ,CAAC,IAAI,EAAE;CACvB,SAAS,EAAE,QAAQ,CAAC,UAAU;CAC9B,CAAC;AACF,MAAM,6BAA6B,EAAE,OAAO;CAC3C,MAAM,EAAE,QAAQ,CAAC,IAAI,EAAE;CACvB,MAAM;CACN,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC,aAAa;CACvC,OAAO,EAAE,QAAQ,CAAC,IAAI,EAAE;CACxB,aAAa,EAAE,QAAQ,CAAC,IAAI,EAAE;CAC9B,MAAM,EAAE,OAAO;EACd,WAAW,EAAE,KAAK;GACjB,cAAc;GACd,cAAc;GACd,cAAc;GACd,cAAc;GACd,cAAc;GACd,cAAc;GACd,CAAC;EACF,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC;EAC9C,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC;EAC5C,CAAC;CACF,cAAc,EAAE,MAAM,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,UAAU;CACnD,sBAAsB,EAAE,MAAM,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,UAAU;CAC3D,OAAO,EAAE,MAAM,2BAA2B,CAAC,IAAI,EAAE;CACjD,QAAQ,EAAE,OAAO;EAChB,OAAO,EAAE,SAAS,CAAC,UAAU;EAC7B,QAAQ,EAAE,SAAS,CAAC,UAAU;EAC9B,CAAC,CAAC,UAAU;CACb,CAAC;AACF,MAAM,iCAAiC,EAAE,OAAO;CAC/C,SAAS,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,UAAU;CACrC,MAAM,EAAE,QAAQ,CAAC,IAAI,EAAE;CACvB,UAAU,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,UAAU;CACtC,OAAO,EAAE,MAAM,2BAA2B;CAC1C,CAAC"}
@@ -13,4 +13,5 @@ const accessibility_wcag_compliance_specs_DocBlocks = [{
13
13
  }];
14
14
  registerDocBlocks(accessibility_wcag_compliance_specs_DocBlocks);
15
15
 
16
- //#endregion
16
+ //#endregion
17
+ //# sourceMappingURL=accessibility_wcag_compliance_specs.docblock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accessibility_wcag_compliance_specs.docblock.js","names":[],"sources":["../../../../../../../libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js"],"sourcesContent":["import { registerDocBlocks } from \"./registry.js\";\n\n//#region src/docs/accessibility_wcag_compliance_specs.docblock.ts\nconst accessibility_wcag_compliance_specs_DocBlocks = [{\n\tid: \"docs.accessibility_wcag_compliance_specs\",\n\ttitle: \"Accessibility & WCAG Compliance — **specs.md**\",\n\tsummary: \"> **Goal:** Ship interfaces that are usable by everyone, by default. This spec sets non‑negotiable rules, checklists, and CI gates to meet **WCAG\\xA02.2 AA** (aim for AAA where low‑cost), align with **EN\\xA0301\\xA0549** (EU), and keep parity on **web (Next.js)** and **mobile (Expo/React\\xA0Native)**.\",\n\tkind: \"reference\",\n\tvisibility: \"public\",\n\troute: \"/docs/accessibility_wcag_compliance_specs\",\n\ttags: [\"accessibility_wcag_compliance_specs\"],\n\tbody: \"# Accessibility & WCAG Compliance — **specs.md**\\n\\n> **Goal:** Ship interfaces that are usable by everyone, by default. This spec sets non‑negotiable rules, checklists, and CI gates to meet **WCAG\\xA02.2 AA** (aim for AAA where low‑cost), align with **EN\\xA0301\\xA0549** (EU), and keep parity on **web (Next.js)** and **mobile (Expo/React\\xA0Native)**.\\n\\n---\\n\\n## 0) Scope & Principles\\n\\n- **Standards:** WCAG\\xA02.2\\xA0AA (incl. new 2.2 SCs: Focus Not Obscured, Focus Appearance, Target Size, Dragging Movements, Accessible Authentication, Redundant Entry). EN\\xA0301\\xA0549 compliance by conformance to WCAG.\\n- **Principles:** Perceivable, Operable, Understandable, Robust (POUR).\\n- **Rule of ARIA:** “No ARIA is better than bad ARIA.” Prefer native elements.\\n- **Definition of Done (DoD):** No Critical/Major a11y issues in CI; keyboard complete; SR (screen reader) smoke test passed; contrasts pass; acceptance criteria below satisfied.\\n- **Repo Alignment:** Web apps use **Radix Primitives + shadcn** wrappers centralized in `packages/lssm/libs/ui-kit-web`. Prefer those components over per‑app duplicates (`packages/*/apps/*/src/components/ui`). When missing, add to `ui-kit-web` first, then adopt app‑side.\\n\\n---\\n\\n## 1) Design Requirements (Design System & Tokens)\\n\\n**1.1 Color & Contrast**\\n\\n- Body text, icons essential to meaning: **≥\\xA04.5:1**; large text (≥\\xA018.66px regular / 14px bold): **≥\\xA03:1**.\\n- Interactive states (default/hover/active/disabled/focus) must maintain contrast **≥\\xA03:1** against adjacent colors; text within components follows text ratios.\\n- Provide light & dark themes with tokens that guarantee minimums. **Never rely solely on color** to convey meaning; pair with text, shape, or icon.\\n\\n**1.2 Focus Indicators (WCAG\\xA02.4.11/12)**\\n\\n- Every interactive element has a **visible focus** with clear offset; indicator contrast **≥\\xA03:1** vs adjacent colors and indicator **area ≥\\xA02\\xA0CSS\\xA0px** thick.\\n- Focus **must not be obscured** by sticky headers/footers or scroll containers.\\n\\n**1.3 Motion & Preferences**\\n\\n- Respect `prefers-reduced-motion`: suppress large parallax, auto‑animations; provide instant alternatives.\\n- Avoid motion that could trigger vestibular issues; under PRM, use fade/scale under **150ms**.\\n\\n**1.4 Target Size (2.5.8)**\\n\\n- Hit areas **≥\\xA024×24\\xA0CSS\\xA0px** (web) and **≥\\xA044×44\\xA0dp** (mobile) unless exempt.\\n\\n**1.5 Typography & Layout**\\n\\n- Support zoom to **400%** without loss of content/functionality; responsive reflow at **320\\xA0CSS\\xA0px** width.\\n- Maintain clear heading hierarchy (h1…h6), one **h1** per view.\\n\\n- Repository baseline (Web): default body text uses Tailwind `text-lg` (≈18px). As of 2025‑09‑20, the repository bumped all Tailwind typography scale usages by +1 step (e.g., `text-sm`→`text-base`, `text-base`→`text-lg`, …, `text-8xl`→`text-9xl`). For long‑form content, default to `prose-lg`.\\n- Do not use `text-xs` for body copy. Reserve `text-sm` only for non‑essential meta (timestamps, fine print) while ensuring contrast and touch targets remain compliant.\\n- When increasing font size, ensure line height supports readability. Prefer Tailwind defaults or `leading-relaxed`/`leading-7` for body text where dense blocks appear.\\n\\n**1.6 Iconography & Imagery**\\n\\n- Decorative images: `alt=\\\"\\\"` or `aria-hidden=\\\"true\\\"`.\\n- Informative images: concise, specific **alt**; complex charts require a **data table or long description**.\\n\\n---\\n\\n## 2) Content Requirements (UX Writing)\\n\\n- Links say **what happens** (avoid “click here”).\\n- Buttons start with verbs; avoid ambiguous labels.\\n- Form labels are **visible**; placeholders are **not labels**.\\n- Error messages: human + programmatic association; avoid color‑only.\\n- Authentication: allow **copy/paste**, password managers, and avoid cognitive tests alone (**3.3.7/3.3.8/3.3.9**).\\n- Avoid CAPTCHAs that block users; if unavoidable, provide **multiple alternatives** (logic-free).\\n\\n---\\n\\n## 3) Engineering Requirements (Web — Next.js/React)\\n\\n> Use and extend `packages/lssm/libs/ui-kit-web` as the default UI surface. It wraps **Radix** primitives with sensible a11y defaults (focus rings, roles, keyboard, ARIA binding). When a gap exists, add it to `ui-kit-web` first.\\n\\n**3.1 Semantics & Landmarks**\\n\\n- Use native elements: `<button>`, `<a href>`, `<label for>`, `<fieldset>`, `<legend>`, `<table>`, etc.\\n- Landmarks per page: `header`, `nav`, `main`, `aside`, `footer`. Provide a **Skip to main content** link.\\n- Provide a **Route Announcer** (`aria-live=\\\"polite\\\"`) and move focus to page **h1** after navigation.\\n\\n**3.2 Keyboard**\\n\\n- All functionality available with keyboard alone. Tab order follows DOM/visual order; **no keyboard traps**.\\n- Common bindings:\\n - Space/Enter → activate button; Enter on link;\\n - Esc closes dialogs/menus;\\n - Arrow keys for lists/menus/tablists with **roving tabindex**.\\n\\n**3.3 Focus Management**\\n\\n- On route change (Next.js), move focus to the page `<h1>` or container and announce via a live region.\\n- Dialogs/menus: **trap focus** inside; return focus to invoking control on close.\\n- Don’t steal focus except after explicit user action.\\n\\n**3.4 Forms**\\n\\n- Each input has a `<label>` or `aria-label`. Group related inputs with `<fieldset><legend>`.\\n- Associate errors via `aria-describedby` or inline IDs; announce with `role=\\\"alert\\\"` (assertive only for critical).\\n- Provide **autocomplete** tokens for known fields; show **inline validation** and do not block on **onBlur** alone.\\n\\n**3.5 ARIA Usage**\\n\\n- Only when needed; match patterns (dialog, menu, combobox, tablist, listbox) per ARIA Authoring Practices.\\n- Ensure **name/role/value** are programmatically determinable.\\n\\n**3.6 Media**\\n\\n- Videos: **captions**; provide **transcripts** for audio; audio descriptions for essential visual info.\\n- No auto‑playing audio. Auto‑playing video must be muted and pausable; provide controls.\\n\\n**3.7 Tables & Data**\\n\\n- Use `<th scope>` for headers; captions via `<caption>`; announce sorting via `aria-sort`.\\n- Provide CSV/JSON export where charts are primary.\\n\\n**3.8 Performance & Robustness**\\n\\n- Avoid content shifts that move focus; reserve space or use skeletons.\\n- Maintain accessible names through hydration/SSR; avoid `dangerouslySetInnerHTML` where possible.\\n\\n**3.9 Next.js specifics**\\n\\n- Use `next/link` for navigation; ensure links are **links**, not buttons.\\n- `next/image` must include **alt** (empty if decorative).\\n- Announce route changes with a **global live region** and shift focus to the new view.\\n\\n**3.10 Accessibility library integration**\\n\\n- Import `@lssm/lib.accessibility` at app root. It auto-imports its `styles.css` via the package entry; ensure bundlers keep CSS side effects. If your app tree-shakes CSS, explicitly import the stylesheet once in your root layout:\\n\\n```tsx\\n// app/layout.tsx\\nimport '@lssm/lib.accessibility'; // includes tokens and provider exports\\n// or if needed: import '@lssm/lib.accessibility/src/styles.css';\\n```\\n\\n- Wrap the app with `AccessibilityProvider` and include an element with `id=\\\"main\\\"` for the skip link target.\\n\\n---\\n\\n## 3b) lssm/ui-kit-web — Component Patterns & Defaults\\n\\n> Source: `packages/lssm/libs/ui-kit-web/ui/*`\\n\\n- **Button/Input/Textarea**: Built‑in `focus-visible` rings; ensure visible labels via `FormLabel` or `aria-label`.\\n- **Form** (`form.tsx`): `FormControl` wires `aria-invalid` and `aria-describedby` to `FormMessage` and `FormDescription`. Prefer `FormMessage` for inline errors. Add `role=\\\"alert\\\"` only for critical.\\n- **Dialog/Sheet/Dropdown**: Use Radix wrappers for focus‑trap and return‑focus. Provide `DialogTitle` + `DialogDescription` for name/description.\\n- **Select/Combobox**: Prefer `SelectTrigger` with visible label; for icon‑only triggers, supply `aria-label`. Document examples in each app.\\n- **Tabs**: Use `TabsList`, `TabsTrigger`, `TabsContent`; names are programmatically determinable.\\n- **Toast/Toaster**: Prefer non‑blocking announcements; map critical to assertive region; include action buttons with clear labels.\\n- **Table**: Use `TableCaption`; ensure `TableHead` cells use proper `scope`. Provide `aria-sort` on sortable headers.\\n- **Utilities to add (repo action)**:\\n - `SkipLink` component and pattern in layouts.\\n - `RouteAnnouncer` (`aria-live=\\\"polite\\\"`) and **FocusOnRouteChange** helper.\\n - `VisuallyHidden` wrapper (Radix visually-hidden or minimal utility).\\n - `useReducedMotion` helper; honor in animated components.\\n - Touch‑size variants (≥44×44) for interactive atoms.\\n\\n---\\n\\n## 4) Engineering Requirements (Mobile — Expo/React\\xA0Native)\\n\\n- Set `accessibilityLabel`, `accessibilityHint`, and `accessibilityRole` on touchables.\\n- Ensure **hit slop** / min size **≥\\xA044×44\\xA0dp**.\\n- Support Dynamic Type / font scaling; no clipped text at **200%**.\\n- Respect **Invert Colors** and **Reduce Motion**; avoid flashing.\\n- Group related items with `accessibilityElements` ordering; hide decoration with `accessible={false}` or `importantForAccessibility=\\\"no-hide-descendants\\\"` when appropriate.\\n- Test with **VoiceOver (iOS)** and **TalkBack (Android)**.\\n\\n---\\n\\n## 5) Component Patterns (Acceptance Rules)\\n\\n**Buttons & Links**\\n\\n- Use `<button>` for actions, `<a href>` for navigation. Provide disabled states that are perceivable beyond color.\\n\\n**Navigation**\\n\\n- Provide **Skip link**. One primary nav landmark. Indicate current page (`aria-current=\\\"page\\\"`).\\n\\n**Menus/Combobox/Autocomplete**\\n\\n- Follow ARIA patterns: focus moves into list; `aria-expanded`, `aria-controls`, `aria-activedescendant` when applicable; Esc closes; typing filters.\\n\\n**Modals/Dialogs**\\n\\n- `role=\\\"dialog\\\"` or `alertdialog` with **label**; focus trapped; background inert; Esc closes; return focus to trigger.\\n\\n**Tabs**\\n\\n- `role=\\\"tablist\\\"`; tabs are in the tab order; arrow keys switch focus; content is `role=\\\"tabpanel\\\"` with `aria-labelledby`.\\n\\n**Toasts/Notifications**\\n\\n- Non-critical: `aria-live=\\\"polite\\\"`; critical: `role=\\\"alert\\\"` sparingly.\\n\\n**Infinite Scroll / “Load More”**\\n\\n- Provide **Load more** control; announce new content to SR; preserve keyboard position.\\n\\n**Drag & Drop (2.5.7)**\\n\\n- Provide **non‑drag** alternative (e.g., move up/down buttons).\\n\\n**Charts & Maps**\\n\\n- Provide **table alternative** or textual summary; keyboard access to datapoints where interactive.\\n\\n---\\n\\n## 6) Testing & CI (Blocking Gates)\\n\\n**Static & Unit**\\n\\n- `eslint-plugin-jsx-a11y` — error on violations.\\n- `jest-axe` — unit tests for components.\\n\\n**Automated Integration**\\n\\n- `axe-core` via Playwright or Cypress on critical flows.\\n- `pa11y-ci` on key routes; threshold: **0 Critical / 0 Serious** to merge.\\n- Lighthouse CI a11y score **≥\\xA095** on target pages.\\n\\n**Manual QA (per release)**\\n\\n- **Keyboard patrol:** navigate primary flows without mouse.\\n- **Screen reader smoke:** NVDA (Windows) or VoiceOver (macOS/iOS) across login, navigation, forms, dialogs.\\n- **Zoom & Reflow:** 200–400% & 320\\xA0px width.\\n- **Color/Contrast check:** tokens in both themes.\\n\\n**Reporting**\\n\\n- A11y issues labeled: `a11y-blocker`, `a11y-bug`, `a11y-enhancement` with WCAG ref.\\n\\n---\\n\\n## 7) Repository‑Specific Adoption Plan\\n\\n- Centralize UI usage on `packages/lssm/libs/ui-kit-web` and de‑duplicate per‑app `components/ui` where feasible.\\n- Introduce `SkipLink`, `RouteAnnouncer`, `FocusOnRouteChange`, and `VisuallyHidden` in `ui-kit-web`. Adopt in app layouts (`app/layout.tsx`) first.\\n- Add `useReducedMotion` and wire into animated components (e.g., `drawer`, `tooltip`, `carousel`).\\n- Add touch‑size variants to `Button`, `IconButton`, `TabsTrigger`, toggles.\\n- Document Select label patterns and error association in Forms.\\n\\n---\\n\\n## 8) Code Snippets\\n\\n**Skip Link**\\n\\n```html\\n<a\\n class=\\\"sr-only focus:not-sr-only focus-visible:outline focus-visible:ring-4 focus-visible:ring-offset-2\\\"\\n href=\\\"#main\\\"\\n >Skip to main content</a\\n>\\n<main id=\\\"main\\\">…</main>\\n```\\n\\n**Dialog (Radix + shadcn/ui) — essentials**\\n\\n```tsx\\n// Ensure label, description, focus trap, and return focus on close remain intact\\n<Dialog>\\n <DialogTrigger asChild>\\n <button aria-haspopup=\\\"dialog\\\">Open settings</button>\\n </DialogTrigger>\\n <DialogContent aria-describedby=\\\"settings-desc\\\">\\n <DialogTitle>Settings</DialogTitle>\\n <p id=\\\"settings-desc\\\">Update your preferences.</p>\\n <DialogClose asChild>\\n <button>Close</button>\\n </DialogClose>\\n </DialogContent>\\n</Dialog>\\n```\\n\\n**Form error association**\\n\\n```tsx\\n<label htmlFor=\\\"email\\\">Email</label>\\n<input id=\\\"email\\\" name=\\\"email\\\" type=\\\"email\\\" aria-describedby=\\\"email-err\\\" />\\n<p id=\\\"email-err\\\" role=\\\"alert\\\">Enter a valid email.</p>\\n```\\n\\n**Route change announcement (Next.js)**\\n\\n```tsx\\n// Add once at app root\\n<div\\n aria-live=\\\"polite\\\"\\n aria-atomic=\\\"true\\\"\\n id=\\\"route-announcer\\\"\\n className=\\\"sr-only\\\"\\n/>\\n```\\n\\n---\\n\\n## 9) Exceptions & Waivers\\n\\n- If a criterion cannot be met, file an issue with: context, attempted alternatives, WCAG reference, impact assessment, and a remediation date. **Temporary waivers only.**\\n\\n---\\n\\n## 10) Ownership\\n\\n- **Design:** maintains token contrast, component specs.\\n- **Engineering:** enforces CI gates, implements patterns.\\n- **QA:** runs manual checks per release.\\n- **PM:** blocks release if AA not met on user‑visible flows.\\n\\n---\\n\\n## 11) References (internalize; no external dependency at runtime)\\n\\n- WCAG\\xA02.2 (AA), EN\\xA0301\\xA0549. ARIA Authoring Practices. Platform HIG (Apple, Material).\\n- `packages/lssm/libs/ui-kit-web` as the canonical UI source for web.\\n\\n> **Bottom line:** Shipping means **accessible by default**. We don’t trade a11y for speed; we bake it into speed.\\n\\n---\\n\\n## 12) Adoption Status (2025-09-23)\\n\\n- web-artisan: AccessibilityProvider integrated; sr-only/forced-colors applied; 44x44 targets; forms announce errors; jest-axe and cypress-axe in place.\\n- web-strit: AccessibilityProvider integrated; forced-colors, sr-only; forms announce errors; 44x44 targets; contrast tokens and text-scale wired; jest-axe and cypress-axe in place.\\n- web-coliving: AccessibilityProvider integrated; forced-colors and focus visibility added; text-scale wired; landing pages converted to `Section`/stacks with text-lg defaults; CTA capture standardized; ESLint guard for text-xs in main content; jest-axe and cypress-axe in place. Next: audit icon-only controls and ensure 44x44 targets; add role=\\\"alert\\\" where critical.\\n\\n> CI gates: run eslint a11y, jest-axe on components, and cypress-axe on critical flows per app.\\n\\n---\\n\\n## 13) CI Hardening & Visual QA\\n\\n- Linting: Run eslint with jsx-a11y rules across all web apps; block on violations.\\n- Unit: Run jest-axe for ui-kit-web and app-level components.\\n- Integration: cypress-axe on key flows (auth, forms, dialogs, tables).\\n- Synthetic scans: pa11y-ci on critical pages (0 Critical/Serious policy).\\n- Performance/A11y audit: Lighthouse CI with a11y score >= 95 on target routes.\\n- Artifacts: Upload pa11y and Lighthouse reports per PR; annotate failures.\\n\\n### Recent additions (2025-09-26)\\n\\n- AutocompleteInput (groceries): Upgraded to ARIA combobox pattern with `aria-controls`, `aria-activedescendant`, `Escape`/`Tab` handling, and labelled listbox.\\n- Cypress a11y tests added for furniture and incidents modules on `/modules` and operators flows; checks run axe with critical/serious impacts.\\n\\n## 14) Accessibility Telemetry (PostHog)\\n\\n- Events (anonymized): a11y_pref_changed (text_scale, contrast_mode, reduce_motion), a11y_panel_opened.\\n- Properties: app, route, previous_value, new_value, timestamp.\\n- Dashboards: Adoption over time, per app/route; correlation with reduced bounce on forms.\\n- Privacy: No PII; aggregate only.\\n\"\n}];\nregisterDocBlocks(accessibility_wcag_compliance_specs_DocBlocks);\n\n//#endregion\nexport { accessibility_wcag_compliance_specs_DocBlocks };\n//# sourceMappingURL=accessibility_wcag_compliance_specs.docblock.js.map"],"mappings":";;;AAGA,MAAM,gDAAgD,CAAC;CACtD,IAAI;CACJ,OAAO;CACP,SAAS;CACT,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM,CAAC,sCAAsC;CAC7C,MAAM;CACN,CAAC;AACF,kBAAkB,8CAA8C"}
@@ -1,12 +1,8 @@
1
1
  import { docBlockToPresentationSpec, docBlockToPresentationV2, docBlocksToPresentationRoutes } from "./presentations.js";
2
2
  import { DocRegistry, defaultDocRegistry, registerDocBlocks } from "./registry.js";
3
- import "./PUBLISHING.docblock.js";
3
+ import { techContractsDocs } from "./tech-contracts.docs.js";
4
+ import { metaDocs } from "./meta.docs.js";
4
5
  import "./accessibility_wcag_compliance_specs.docblock.js";
5
- import "./tech/PHASE_1_QUICKSTART.docblock.js";
6
- import "./tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js";
7
- import "./tech/PHASE_3_AUTO_EVOLUTION.docblock.js";
8
- import "./tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js";
9
- import "./tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js";
10
6
  import "./tech/lifecycle-stage-system.docblock.js";
11
7
  import "./tech/presentation-runtime.docblock.js";
12
8
  import "./tech/auth/better-auth-nextjs.docblock.js";
@@ -0,0 +1,30 @@
1
+ import { registerDocBlocks } from "./registry.js";
2
+
3
+ //#region ../../libs/contracts/dist/docs/meta.docs.js
4
+ const metaDocs = [{
5
+ id: "docs.meta.docblocks-process",
6
+ title: "DocBlocks process",
7
+ summary: "How to author goal/how/usage DocBlocks close to code.",
8
+ kind: "reference",
9
+ visibility: "mixed",
10
+ route: "/docs/meta/docblocks-process",
11
+ tags: ["docs", "process"],
12
+ body: `## DocBlocks authoring rules
13
+
14
+ - Colocate docs beside implementation; avoid barrel /docs folders.
15
+ - Split intent:
16
+ - **goal**: why this exists (before implementation).
17
+ - **how**: operational/runbook steps.
18
+ - **usage**: quick checklist for consumers.
19
+ - Use \`visibility\`: public | internal | mixed.
20
+ - Prefer routes like \`/docs/<domain>/<topic>/<kind>\`; ids mirror that.
21
+ - Keep body Markdown LLM-friendly; avoid HTML.
22
+ - Add owners/tags/domain/stability when known.
23
+ - For presentations/markdown outputs, rely on TransformEngine via DocRegistry.
24
+ - No sourcePath; DocBlocks are canonical.`
25
+ }];
26
+ registerDocBlocks(metaDocs);
27
+
28
+ //#endregion
29
+ export { metaDocs };
30
+ //# sourceMappingURL=meta.docs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"meta.docs.js","names":[],"sources":["../../../../../../../libs/contracts/dist/docs/meta.docs.js"],"sourcesContent":["import { registerDocBlocks } from \"./registry.js\";\n\n//#region src/docs/meta.docs.ts\nconst metaDocs = [{\n\tid: \"docs.meta.docblocks-process\",\n\ttitle: \"DocBlocks process\",\n\tsummary: \"How to author goal/how/usage DocBlocks close to code.\",\n\tkind: \"reference\",\n\tvisibility: \"mixed\",\n\troute: \"/docs/meta/docblocks-process\",\n\ttags: [\"docs\", \"process\"],\n\tbody: `## DocBlocks authoring rules\n\n- Colocate docs beside implementation; avoid barrel /docs folders.\n- Split intent:\n - **goal**: why this exists (before implementation).\n - **how**: operational/runbook steps.\n - **usage**: quick checklist for consumers.\n- Use \\`visibility\\`: public | internal | mixed.\n- Prefer routes like \\`/docs/<domain>/<topic>/<kind>\\`; ids mirror that.\n- Keep body Markdown LLM-friendly; avoid HTML.\n- Add owners/tags/domain/stability when known.\n- For presentations/markdown outputs, rely on TransformEngine via DocRegistry.\n- No sourcePath; DocBlocks are canonical.`\n}];\nregisterDocBlocks(metaDocs);\n\n//#endregion\nexport { metaDocs };\n//# sourceMappingURL=meta.docs.js.map"],"mappings":";;;AAGA,MAAM,WAAW,CAAC;CACjB,IAAI;CACJ,OAAO;CACP,SAAS;CACT,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM,CAAC,QAAQ,UAAU;CACzB,MAAM;;;;;;;;;;;;;CAaN,CAAC;AACF,kBAAkB,SAAS"}