@lssm/module.notifications 0.0.0-canary-20251217083314 → 0.0.0-canary-20251220002821

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 (160) hide show
  1. package/LICENSE +21 -0
  2. package/dist/channels/index.d.ts +3 -2
  3. package/dist/channels/index.d.ts.map +1 -0
  4. package/dist/channels/index.js +3 -2
  5. package/dist/channels/index.js.map +1 -0
  6. package/dist/contracts/index.d.ts +2 -1
  7. package/dist/contracts/index.d.ts.map +1 -0
  8. package/dist/contracts/index.js +59 -60
  9. package/dist/contracts/index.js.map +1 -0
  10. package/dist/entities/index.d.ts +2 -1
  11. package/dist/entities/index.d.ts.map +1 -0
  12. package/dist/entities/index.js +82 -82
  13. package/dist/entities/index.js.map +1 -0
  14. package/dist/libs/contracts/dist/capabilities/openbanking.js +2 -1
  15. package/dist/libs/contracts/dist/capabilities/openbanking.js.map +1 -0
  16. package/dist/libs/contracts/dist/contract-registry/schemas.js +2 -1
  17. package/dist/libs/contracts/dist/contract-registry/schemas.js.map +1 -0
  18. package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +2 -1
  19. package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js.map +1 -0
  20. package/dist/libs/contracts/dist/docs/index.js +2 -6
  21. package/dist/libs/contracts/dist/docs/meta.docs.js +30 -0
  22. package/dist/libs/contracts/dist/docs/meta.docs.js.map +1 -0
  23. package/dist/libs/contracts/dist/docs/presentations.js +2 -1
  24. package/dist/libs/contracts/dist/docs/presentations.js.map +1 -0
  25. package/dist/libs/contracts/dist/docs/registry.js +2 -1
  26. package/dist/libs/contracts/dist/docs/registry.js.map +1 -0
  27. package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +2 -1
  28. package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js.map +1 -0
  29. package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +2 -1
  30. package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js.map +1 -0
  31. package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +2 -1
  32. package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js.map +1 -0
  33. package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +2 -1
  34. package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js.map +1 -0
  35. package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +2 -1
  36. package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js.map +1 -0
  37. package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +2 -1
  38. package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js.map +1 -0
  39. package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +2 -1
  40. package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js.map +1 -0
  41. package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +2 -1
  42. package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js.map +1 -0
  43. package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +2 -1
  44. package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js.map +1 -0
  45. package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +2 -1
  46. package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js.map +1 -0
  47. package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +2 -1
  48. package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js.map +1 -0
  49. package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +2 -1
  50. package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js.map +1 -0
  51. package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +2 -1
  52. package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js.map +1 -0
  53. package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +2 -1
  54. package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js.map +1 -0
  55. package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +2 -1
  56. package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js.map +1 -0
  57. package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +2 -1
  58. package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js.map +1 -0
  59. package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +2 -1
  60. package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js.map +1 -0
  61. package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +2 -1
  62. package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js.map +1 -0
  63. package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +2 -1
  64. package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js.map +1 -0
  65. package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +2 -1
  66. package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js.map +1 -0
  67. package/dist/libs/contracts/dist/docs/tech-contracts.docs.js +97 -0
  68. package/dist/libs/contracts/dist/docs/tech-contracts.docs.js.map +1 -0
  69. package/dist/libs/contracts/dist/index.js +3 -2
  70. package/dist/libs/contracts/dist/integrations/contracts.js +65 -66
  71. package/dist/libs/contracts/dist/integrations/contracts.js.map +1 -0
  72. package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +31 -32
  73. package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js.map +1 -0
  74. package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +18 -19
  75. package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js.map +1 -0
  76. package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +32 -33
  77. package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js.map +1 -0
  78. package/dist/libs/contracts/dist/integrations/openbanking/models.js +60 -61
  79. package/dist/libs/contracts/dist/integrations/openbanking/models.js.map +1 -0
  80. package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js +2 -1
  81. package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js.map +1 -0
  82. package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js +2 -1
  83. package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js.map +1 -0
  84. package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js +2 -1
  85. package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js.map +1 -0
  86. package/dist/libs/contracts/dist/integrations/providers/gmail.js +2 -1
  87. package/dist/libs/contracts/dist/integrations/providers/gmail.js.map +1 -0
  88. package/dist/libs/contracts/dist/integrations/providers/google-calendar.js +2 -1
  89. package/dist/libs/contracts/dist/integrations/providers/google-calendar.js.map +1 -0
  90. package/dist/libs/contracts/dist/integrations/providers/mistral.js +2 -1
  91. package/dist/libs/contracts/dist/integrations/providers/mistral.js.map +1 -0
  92. package/dist/libs/contracts/dist/integrations/providers/postmark.js +2 -1
  93. package/dist/libs/contracts/dist/integrations/providers/postmark.js.map +1 -0
  94. package/dist/libs/contracts/dist/integrations/providers/powens.js +2 -1
  95. package/dist/libs/contracts/dist/integrations/providers/powens.js.map +1 -0
  96. package/dist/libs/contracts/dist/integrations/providers/qdrant.js +2 -1
  97. package/dist/libs/contracts/dist/integrations/providers/qdrant.js.map +1 -0
  98. package/dist/libs/contracts/dist/integrations/providers/stripe.js +2 -1
  99. package/dist/libs/contracts/dist/integrations/providers/stripe.js.map +1 -0
  100. package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js +2 -1
  101. package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js.map +1 -0
  102. package/dist/libs/contracts/dist/knowledge/contracts.js +44 -45
  103. package/dist/libs/contracts/dist/knowledge/contracts.js.map +1 -0
  104. package/dist/libs/contracts/dist/knowledge/spaces/email-threads.js +2 -1
  105. package/dist/libs/contracts/dist/knowledge/spaces/email-threads.js.map +1 -0
  106. package/dist/libs/contracts/dist/knowledge/spaces/financial-docs.js +2 -1
  107. package/dist/libs/contracts/dist/knowledge/spaces/financial-docs.js.map +1 -0
  108. package/dist/libs/contracts/dist/knowledge/spaces/financial-overview.js +2 -1
  109. package/dist/libs/contracts/dist/knowledge/spaces/financial-overview.js.map +1 -0
  110. package/dist/libs/contracts/dist/knowledge/spaces/product-canon.js +2 -1
  111. package/dist/libs/contracts/dist/knowledge/spaces/product-canon.js.map +1 -0
  112. package/dist/libs/contracts/dist/knowledge/spaces/support-faq.js +2 -1
  113. package/dist/libs/contracts/dist/knowledge/spaces/support-faq.js.map +1 -0
  114. package/dist/libs/contracts/dist/knowledge/spaces/uploaded-docs.js +2 -1
  115. package/dist/libs/contracts/dist/knowledge/spaces/uploaded-docs.js.map +1 -0
  116. package/dist/libs/contracts/dist/llm/exporters.js +2 -1
  117. package/dist/libs/contracts/dist/llm/exporters.js.map +1 -0
  118. package/dist/libs/contracts/dist/onboarding-base.js +22 -23
  119. package/dist/libs/contracts/dist/onboarding-base.js.map +1 -0
  120. package/dist/libs/contracts/dist/ownership.js +4 -2
  121. package/dist/libs/contracts/dist/ownership.js.map +1 -0
  122. package/dist/libs/contracts/dist/presentations.v2.js +2 -1
  123. package/dist/libs/contracts/dist/presentations.v2.js.map +1 -0
  124. package/dist/libs/contracts/dist/regenerator/service.js +2 -1
  125. package/dist/libs/contracts/dist/regenerator/service.js.map +1 -0
  126. package/dist/libs/contracts/dist/schema/dist/index.js +3874 -6
  127. package/dist/libs/contracts/dist/schema/dist/index.js.map +1 -0
  128. package/dist/libs/contracts/dist/spec.js +2 -1
  129. package/dist/libs/contracts/dist/spec.js.map +1 -0
  130. package/dist/libs/schema/dist/index.js +4899 -6
  131. package/dist/libs/schema/dist/index.js.map +1 -0
  132. package/dist/notifications.feature.d.ts +2 -1
  133. package/dist/notifications.feature.d.ts.map +1 -0
  134. package/dist/notifications.feature.js +2 -1
  135. package/dist/notifications.feature.js.map +1 -0
  136. package/dist/templates/index.d.ts +2 -1
  137. package/dist/templates/index.d.ts.map +1 -0
  138. package/dist/templates/index.js +2 -1
  139. package/dist/templates/index.js.map +1 -0
  140. package/package.json +14 -7
  141. package/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +0 -16
  142. package/dist/libs/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +0 -16
  143. package/dist/libs/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +0 -16
  144. package/dist/libs/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +0 -16
  145. package/dist/libs/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +0 -16
  146. package/dist/libs/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +0 -16
  147. package/dist/libs/contracts/dist/schema/dist/EnumType.js +0 -2
  148. package/dist/libs/contracts/dist/schema/dist/FieldType.js +0 -49
  149. package/dist/libs/contracts/dist/schema/dist/ScalarTypeEnum.js +0 -236
  150. package/dist/libs/contracts/dist/schema/dist/SchemaModel.js +0 -39
  151. package/dist/libs/contracts/dist/schema/dist/entity/defineEntity.js +0 -1
  152. package/dist/libs/contracts/dist/schema/dist/entity/index.js +0 -2
  153. package/dist/libs/contracts/dist/schema/dist/entity/types.js +0 -1
  154. package/dist/libs/schema/dist/EnumType.js +0 -56
  155. package/dist/libs/schema/dist/FieldType.js +0 -49
  156. package/dist/libs/schema/dist/ScalarTypeEnum.js +0 -236
  157. package/dist/libs/schema/dist/SchemaModel.js +0 -3
  158. package/dist/libs/schema/dist/entity/defineEntity.js +0 -236
  159. package/dist/libs/schema/dist/entity/index.js +0 -2
  160. package/dist/libs/schema/dist/entity/types.js +0 -1
@@ -1,11 +1,10 @@
1
- import { defineEntity, defineEntityEnum, field, index } from "../libs/schema/dist/entity/defineEntity.js";
2
- import "../libs/schema/dist/index.js";
1
+ import { L5, Z5, _5, b5 } from "../libs/schema/dist/index.js";
3
2
 
4
3
  //#region src/entities/index.ts
5
4
  /**
6
5
  * Notification status enum.
7
6
  */
8
- const NotificationStatusEnum = defineEntityEnum({
7
+ const NotificationStatusEnum = Z5({
9
8
  name: "NotificationStatus",
10
9
  values: [
11
10
  "PENDING",
@@ -21,7 +20,7 @@ const NotificationStatusEnum = defineEntityEnum({
21
20
  /**
22
21
  * Notification channel enum.
23
22
  */
24
- const NotificationChannelEnum = defineEntityEnum({
23
+ const NotificationChannelEnum = Z5({
25
24
  name: "NotificationChannel",
26
25
  values: [
27
26
  "EMAIL",
@@ -36,90 +35,90 @@ const NotificationChannelEnum = defineEntityEnum({
36
35
  /**
37
36
  * Notification entity - individual notification instance.
38
37
  */
39
- const NotificationEntity = defineEntity({
38
+ const NotificationEntity = L5({
40
39
  name: "Notification",
41
40
  description: "An individual notification to be delivered to a user.",
42
41
  schema: "lssm_notifications",
43
42
  map: "notification",
44
43
  fields: {
45
- id: field.id({ description: "Unique notification ID" }),
46
- userId: field.foreignKey({ description: "Target user ID" }),
47
- orgId: field.string({
44
+ id: _5.id({ description: "Unique notification ID" }),
45
+ userId: _5.foreignKey({ description: "Target user ID" }),
46
+ orgId: _5.string({
48
47
  isOptional: true,
49
48
  description: "Organization context"
50
49
  }),
51
- templateId: field.string({
50
+ templateId: _5.string({
52
51
  isOptional: true,
53
52
  description: "Template used"
54
53
  }),
55
- title: field.string({ description: "Notification title" }),
56
- body: field.string({ description: "Notification body" }),
57
- actionUrl: field.string({
54
+ title: _5.string({ description: "Notification title" }),
55
+ body: _5.string({ description: "Notification body" }),
56
+ actionUrl: _5.string({
58
57
  isOptional: true,
59
58
  description: "Action URL"
60
59
  }),
61
- imageUrl: field.string({
60
+ imageUrl: _5.string({
62
61
  isOptional: true,
63
62
  description: "Image URL"
64
63
  }),
65
- type: field.string({ description: "Notification type (e.g., mention, update)" }),
66
- category: field.string({
64
+ type: _5.string({ description: "Notification type (e.g., mention, update)" }),
65
+ category: _5.string({
67
66
  isOptional: true,
68
67
  description: "Notification category"
69
68
  }),
70
- priority: field.enum("NotificationPriority", { default: "NORMAL" }),
71
- channels: field.string({
69
+ priority: _5.enum("NotificationPriority", { default: "NORMAL" }),
70
+ channels: _5.string({
72
71
  isArray: true,
73
72
  description: "Target delivery channels"
74
73
  }),
75
- status: field.enum("NotificationStatus", { default: "PENDING" }),
76
- sentAt: field.dateTime({ isOptional: true }),
77
- deliveredAt: field.dateTime({ isOptional: true }),
78
- readAt: field.dateTime({ isOptional: true }),
79
- metadata: field.json({
74
+ status: _5.enum("NotificationStatus", { default: "PENDING" }),
75
+ sentAt: _5.dateTime({ isOptional: true }),
76
+ deliveredAt: _5.dateTime({ isOptional: true }),
77
+ readAt: _5.dateTime({ isOptional: true }),
78
+ metadata: _5.json({
80
79
  isOptional: true,
81
80
  description: "Additional metadata"
82
81
  }),
83
- variables: field.json({
82
+ variables: _5.json({
84
83
  isOptional: true,
85
84
  description: "Template variables used"
86
85
  }),
87
- triggeredBy: field.string({
86
+ triggeredBy: _5.string({
88
87
  isOptional: true,
89
88
  description: "Event/action that triggered"
90
89
  }),
91
- sourceId: field.string({
90
+ sourceId: _5.string({
92
91
  isOptional: true,
93
92
  description: "Source entity ID"
94
93
  }),
95
- sourceType: field.string({
94
+ sourceType: _5.string({
96
95
  isOptional: true,
97
96
  description: "Source entity type"
98
97
  }),
99
- createdAt: field.createdAt(),
100
- updatedAt: field.updatedAt(),
101
- expiresAt: field.dateTime({
98
+ createdAt: _5.createdAt(),
99
+ updatedAt: _5.updatedAt(),
100
+ expiresAt: _5.dateTime({
102
101
  isOptional: true,
103
102
  description: "Notification expiry"
104
103
  }),
105
- deliveryLogs: field.hasMany("DeliveryLog")
104
+ deliveryLogs: _5.hasMany("DeliveryLog")
106
105
  },
107
106
  indexes: [
108
- index.on([
107
+ b5.on([
109
108
  "userId",
110
109
  "status",
111
110
  "createdAt"
112
111
  ]),
113
- index.on(["userId", "readAt"]),
114
- index.on(["orgId", "createdAt"]),
115
- index.on(["type", "createdAt"])
112
+ b5.on(["userId", "readAt"]),
113
+ b5.on(["orgId", "createdAt"]),
114
+ b5.on(["type", "createdAt"])
116
115
  ],
117
116
  enums: [NotificationStatusEnum, NotificationChannelEnum]
118
117
  });
119
118
  /**
120
119
  * Notification priority enum.
121
120
  */
122
- const NotificationPriorityEnum = defineEntityEnum({
121
+ const NotificationPriorityEnum = Z5({
123
122
  name: "NotificationPriority",
124
123
  values: [
125
124
  "LOW",
@@ -133,100 +132,100 @@ const NotificationPriorityEnum = defineEntityEnum({
133
132
  /**
134
133
  * NotificationTemplate entity - reusable notification templates.
135
134
  */
136
- const NotificationTemplateEntity = defineEntity({
135
+ const NotificationTemplateEntity = L5({
137
136
  name: "NotificationTemplate",
138
137
  description: "Reusable notification template.",
139
138
  schema: "lssm_notifications",
140
139
  map: "notification_template",
141
140
  fields: {
142
- id: field.id(),
143
- templateId: field.string({
141
+ id: _5.id(),
142
+ templateId: _5.string({
144
143
  isUnique: true,
145
144
  description: "Template identifier"
146
145
  }),
147
- name: field.string({ description: "Template display name" }),
148
- description: field.string({ isOptional: true }),
149
- emailSubject: field.string({ isOptional: true }),
150
- emailBody: field.string({ isOptional: true }),
151
- inAppTitle: field.string({ isOptional: true }),
152
- inAppBody: field.string({ isOptional: true }),
153
- pushTitle: field.string({ isOptional: true }),
154
- pushBody: field.string({ isOptional: true }),
155
- defaultChannels: field.string({ isArray: true }),
156
- category: field.string({ isOptional: true }),
157
- priority: field.enum("NotificationPriority", { default: "NORMAL" }),
158
- variablesSchema: field.json({
146
+ name: _5.string({ description: "Template display name" }),
147
+ description: _5.string({ isOptional: true }),
148
+ emailSubject: _5.string({ isOptional: true }),
149
+ emailBody: _5.string({ isOptional: true }),
150
+ inAppTitle: _5.string({ isOptional: true }),
151
+ inAppBody: _5.string({ isOptional: true }),
152
+ pushTitle: _5.string({ isOptional: true }),
153
+ pushBody: _5.string({ isOptional: true }),
154
+ defaultChannels: _5.string({ isArray: true }),
155
+ category: _5.string({ isOptional: true }),
156
+ priority: _5.enum("NotificationPriority", { default: "NORMAL" }),
157
+ variablesSchema: _5.json({
159
158
  isOptional: true,
160
159
  description: "JSON schema for variables"
161
160
  }),
162
- enabled: field.boolean({ default: true }),
163
- createdAt: field.createdAt(),
164
- updatedAt: field.updatedAt()
161
+ enabled: _5.boolean({ default: true }),
162
+ createdAt: _5.createdAt(),
163
+ updatedAt: _5.updatedAt()
165
164
  },
166
165
  enums: [NotificationPriorityEnum]
167
166
  });
168
167
  /**
169
168
  * NotificationPreference entity - user notification preferences.
170
169
  */
171
- const NotificationPreferenceEntity = defineEntity({
170
+ const NotificationPreferenceEntity = L5({
172
171
  name: "NotificationPreference",
173
172
  description: "User notification preferences by type and channel.",
174
173
  schema: "lssm_notifications",
175
174
  map: "notification_preference",
176
175
  fields: {
177
- id: field.id(),
178
- userId: field.foreignKey(),
179
- globalEnabled: field.boolean({ default: true }),
180
- quietHoursStart: field.string({
176
+ id: _5.id(),
177
+ userId: _5.foreignKey(),
178
+ globalEnabled: _5.boolean({ default: true }),
179
+ quietHoursStart: _5.string({
181
180
  isOptional: true,
182
181
  description: "Quiet hours start (HH:MM)"
183
182
  }),
184
- quietHoursEnd: field.string({
183
+ quietHoursEnd: _5.string({
185
184
  isOptional: true,
186
185
  description: "Quiet hours end (HH:MM)"
187
186
  }),
188
- timezone: field.string({ default: "\"UTC\"" }),
189
- channelPreferences: field.json({ description: "Channel-level preferences" }),
190
- typePreferences: field.json({ description: "Type-level preferences" }),
191
- digestEnabled: field.boolean({ default: false }),
192
- digestFrequency: field.string({
187
+ timezone: _5.string({ default: "\"UTC\"" }),
188
+ channelPreferences: _5.json({ description: "Channel-level preferences" }),
189
+ typePreferences: _5.json({ description: "Type-level preferences" }),
190
+ digestEnabled: _5.boolean({ default: false }),
191
+ digestFrequency: _5.string({
193
192
  isOptional: true,
194
193
  description: "daily, weekly, etc."
195
194
  }),
196
- digestTime: field.string({
195
+ digestTime: _5.string({
197
196
  isOptional: true,
198
197
  description: "Digest send time (HH:MM)"
199
198
  }),
200
- createdAt: field.createdAt(),
201
- updatedAt: field.updatedAt()
199
+ createdAt: _5.createdAt(),
200
+ updatedAt: _5.updatedAt()
202
201
  },
203
- indexes: [index.unique(["userId"])]
202
+ indexes: [b5.unique(["userId"])]
204
203
  });
205
204
  /**
206
205
  * DeliveryLog entity - track delivery attempts per channel.
207
206
  */
208
- const DeliveryLogEntity = defineEntity({
207
+ const DeliveryLogEntity = L5({
209
208
  name: "DeliveryLog",
210
209
  description: "Log of notification delivery attempts.",
211
210
  schema: "lssm_notifications",
212
211
  map: "delivery_log",
213
212
  fields: {
214
- id: field.id(),
215
- notificationId: field.foreignKey(),
216
- channel: field.enum("NotificationChannel"),
217
- status: field.enum("NotificationStatus"),
218
- attemptedAt: field.dateTime(),
219
- deliveredAt: field.dateTime({ isOptional: true }),
220
- responseCode: field.string({ isOptional: true }),
221
- responseMessage: field.string({ isOptional: true }),
222
- externalId: field.string({
213
+ id: _5.id(),
214
+ notificationId: _5.foreignKey(),
215
+ channel: _5.enum("NotificationChannel"),
216
+ status: _5.enum("NotificationStatus"),
217
+ attemptedAt: _5.dateTime(),
218
+ deliveredAt: _5.dateTime({ isOptional: true }),
219
+ responseCode: _5.string({ isOptional: true }),
220
+ responseMessage: _5.string({ isOptional: true }),
221
+ externalId: _5.string({
223
222
  isOptional: true,
224
223
  description: "Provider message ID"
225
224
  }),
226
- metadata: field.json({ isOptional: true }),
227
- notification: field.belongsTo("Notification", ["notificationId"], ["id"], { onDelete: "Cascade" })
225
+ metadata: _5.json({ isOptional: true }),
226
+ notification: _5.belongsTo("Notification", ["notificationId"], ["id"], { onDelete: "Cascade" })
228
227
  },
229
- indexes: [index.on(["notificationId", "channel"])]
228
+ indexes: [b5.on(["notificationId", "channel"])]
230
229
  });
231
230
  /**
232
231
  * All notification entities for schema composition.
@@ -251,4 +250,5 @@ const notificationsSchemaContribution = {
251
250
  };
252
251
 
253
252
  //#endregion
254
- export { DeliveryLogEntity, NotificationChannelEnum, NotificationEntity, NotificationPreferenceEntity, NotificationPriorityEnum, NotificationStatusEnum, NotificationTemplateEntity, notificationEntities, notificationsSchemaContribution };
253
+ export { DeliveryLogEntity, NotificationChannelEnum, NotificationEntity, NotificationPreferenceEntity, NotificationPriorityEnum, NotificationStatusEnum, NotificationTemplateEntity, notificationEntities, notificationsSchemaContribution };
254
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["defineEntityEnum","defineEntity","field","index","notificationsSchemaContribution: ModuleSchemaContribution"],"sources":["../../src/entities/index.ts"],"sourcesContent":["import { defineEntity, defineEntityEnum, field, index } from '@lssm/lib.schema';\nimport type { ModuleSchemaContribution } from '@lssm/lib.schema';\n\n/**\n * Notification status enum.\n */\nexport const NotificationStatusEnum = defineEntityEnum({\n name: 'NotificationStatus',\n values: [\n 'PENDING',\n 'SENT',\n 'DELIVERED',\n 'READ',\n 'FAILED',\n 'CANCELLED',\n ] as const,\n schema: 'lssm_notifications',\n description: 'Status of a notification.',\n});\n\n/**\n * Notification channel enum.\n */\nexport const NotificationChannelEnum = defineEntityEnum({\n name: 'NotificationChannel',\n values: ['EMAIL', 'IN_APP', 'PUSH', 'WEBHOOK', 'SMS'] as const,\n schema: 'lssm_notifications',\n description: 'Delivery channel for notifications.',\n});\n\n/**\n * Notification entity - individual notification instance.\n */\nexport const NotificationEntity = defineEntity({\n name: 'Notification',\n description: 'An individual notification to be delivered to a user.',\n schema: 'lssm_notifications',\n map: 'notification',\n fields: {\n id: field.id({ description: 'Unique notification ID' }),\n\n // Recipient\n userId: field.foreignKey({ description: 'Target user ID' }),\n orgId: field.string({\n isOptional: true,\n description: 'Organization context',\n }),\n\n // Content\n templateId: field.string({\n isOptional: true,\n description: 'Template used',\n }),\n title: field.string({ description: 'Notification title' }),\n body: field.string({ description: 'Notification body' }),\n actionUrl: field.string({ isOptional: true, description: 'Action URL' }),\n imageUrl: field.string({ isOptional: true, description: 'Image URL' }),\n\n // Categorization\n type: field.string({\n description: 'Notification type (e.g., mention, update)',\n }),\n category: field.string({\n isOptional: true,\n description: 'Notification category',\n }),\n priority: field.enum('NotificationPriority', { default: 'NORMAL' }),\n\n // Delivery\n channels: field.string({\n isArray: true,\n description: 'Target delivery channels',\n }),\n status: field.enum('NotificationStatus', { default: 'PENDING' }),\n\n // Tracking\n sentAt: field.dateTime({ isOptional: true }),\n deliveredAt: field.dateTime({ isOptional: true }),\n readAt: field.dateTime({ isOptional: true }),\n\n // Metadata\n metadata: field.json({\n isOptional: true,\n description: 'Additional metadata',\n }),\n variables: field.json({\n isOptional: true,\n description: 'Template variables used',\n }),\n\n // Source\n triggeredBy: field.string({\n isOptional: true,\n description: 'Event/action that triggered',\n }),\n sourceId: field.string({\n isOptional: true,\n description: 'Source entity ID',\n }),\n sourceType: field.string({\n isOptional: true,\n description: 'Source entity type',\n }),\n\n // Timestamps\n createdAt: field.createdAt(),\n updatedAt: field.updatedAt(),\n expiresAt: field.dateTime({\n isOptional: true,\n description: 'Notification expiry',\n }),\n\n // Relations\n deliveryLogs: field.hasMany('DeliveryLog'),\n },\n indexes: [\n index.on(['userId', 'status', 'createdAt']),\n index.on(['userId', 'readAt']),\n index.on(['orgId', 'createdAt']),\n index.on(['type', 'createdAt']),\n ],\n enums: [NotificationStatusEnum, NotificationChannelEnum],\n});\n\n/**\n * Notification priority enum.\n */\nexport const NotificationPriorityEnum = defineEntityEnum({\n name: 'NotificationPriority',\n values: ['LOW', 'NORMAL', 'HIGH', 'URGENT'] as const,\n schema: 'lssm_notifications',\n description: 'Priority level of a notification.',\n});\n\n/**\n * NotificationTemplate entity - reusable notification templates.\n */\nexport const NotificationTemplateEntity = defineEntity({\n name: 'NotificationTemplate',\n description: 'Reusable notification template.',\n schema: 'lssm_notifications',\n map: 'notification_template',\n fields: {\n id: field.id(),\n templateId: field.string({\n isUnique: true,\n description: 'Template identifier',\n }),\n name: field.string({ description: 'Template display name' }),\n description: field.string({ isOptional: true }),\n\n // Content by channel\n emailSubject: field.string({ isOptional: true }),\n emailBody: field.string({ isOptional: true }),\n inAppTitle: field.string({ isOptional: true }),\n inAppBody: field.string({ isOptional: true }),\n pushTitle: field.string({ isOptional: true }),\n pushBody: field.string({ isOptional: true }),\n\n // Settings\n defaultChannels: field.string({ isArray: true }),\n category: field.string({ isOptional: true }),\n priority: field.enum('NotificationPriority', { default: 'NORMAL' }),\n\n // Variables schema\n variablesSchema: field.json({\n isOptional: true,\n description: 'JSON schema for variables',\n }),\n\n // State\n enabled: field.boolean({ default: true }),\n\n // Timestamps\n createdAt: field.createdAt(),\n updatedAt: field.updatedAt(),\n },\n enums: [NotificationPriorityEnum],\n});\n\n/**\n * NotificationPreference entity - user notification preferences.\n */\nexport const NotificationPreferenceEntity = defineEntity({\n name: 'NotificationPreference',\n description: 'User notification preferences by type and channel.',\n schema: 'lssm_notifications',\n map: 'notification_preference',\n fields: {\n id: field.id(),\n userId: field.foreignKey(),\n\n // Global settings\n globalEnabled: field.boolean({ default: true }),\n quietHoursStart: field.string({\n isOptional: true,\n description: 'Quiet hours start (HH:MM)',\n }),\n quietHoursEnd: field.string({\n isOptional: true,\n description: 'Quiet hours end (HH:MM)',\n }),\n timezone: field.string({ default: '\"UTC\"' }),\n\n // Channel preferences (JSON object: { email: true, push: false, ... })\n channelPreferences: field.json({\n description: 'Channel-level preferences',\n }),\n\n // Type preferences (JSON object: { mention: true, update: false, ... })\n typePreferences: field.json({ description: 'Type-level preferences' }),\n\n // Digest settings\n digestEnabled: field.boolean({ default: false }),\n digestFrequency: field.string({\n isOptional: true,\n description: 'daily, weekly, etc.',\n }),\n digestTime: field.string({\n isOptional: true,\n description: 'Digest send time (HH:MM)',\n }),\n\n // Timestamps\n createdAt: field.createdAt(),\n updatedAt: field.updatedAt(),\n },\n indexes: [index.unique(['userId'])],\n});\n\n/**\n * DeliveryLog entity - track delivery attempts per channel.\n */\nexport const DeliveryLogEntity = defineEntity({\n name: 'DeliveryLog',\n description: 'Log of notification delivery attempts.',\n schema: 'lssm_notifications',\n map: 'delivery_log',\n fields: {\n id: field.id(),\n notificationId: field.foreignKey(),\n\n // Delivery info\n channel: field.enum('NotificationChannel'),\n status: field.enum('NotificationStatus'),\n\n // Timing\n attemptedAt: field.dateTime(),\n deliveredAt: field.dateTime({ isOptional: true }),\n\n // Response\n responseCode: field.string({ isOptional: true }),\n responseMessage: field.string({ isOptional: true }),\n\n // External IDs\n externalId: field.string({\n isOptional: true,\n description: 'Provider message ID',\n }),\n\n // Metadata\n metadata: field.json({ isOptional: true }),\n\n // Relations\n notification: field.belongsTo('Notification', ['notificationId'], ['id'], {\n onDelete: 'Cascade',\n }),\n },\n indexes: [index.on(['notificationId', 'channel'])],\n});\n\n/**\n * All notification entities for schema composition.\n */\nexport const notificationEntities = [\n NotificationEntity,\n NotificationTemplateEntity,\n NotificationPreferenceEntity,\n DeliveryLogEntity,\n];\n\n/**\n * Module schema contribution for notifications.\n */\nexport const notificationsSchemaContribution: ModuleSchemaContribution = {\n moduleId: '@lssm/module.notifications',\n entities: notificationEntities,\n enums: [\n NotificationStatusEnum,\n NotificationChannelEnum,\n NotificationPriorityEnum,\n ],\n};\n"],"mappings":"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"}
@@ -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 };"],"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 };"],"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 };"],"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 };"],"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"}
@@ -68,4 +68,5 @@ function docBlocksToPresentationRoutes(blocks, options) {
68
68
  }
69
69
 
70
70
  //#endregion
71
- export { docBlockToPresentationSpec, docBlockToPresentationV2, docBlocksToPresentationRoutes };
71
+ export { docBlockToPresentationSpec, docBlockToPresentationV2, docBlocksToPresentationRoutes };
72
+ //# sourceMappingURL=presentations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"presentations.js","names":[],"sources":["../../../../../../../libs/contracts/dist/docs/presentations.js"],"sourcesContent":["//#region src/docs/presentations.ts\nconst DEFAULT_TARGETS = [\n\t\"markdown\",\n\t\"application/json\",\n\t\"application/xml\",\n\t\"react\"\n];\nfunction normalizeRoute(route) {\n\tif (!route.length) return \"/\";\n\tconst withLeading = route.startsWith(\"/\") ? route : `/${route}`;\n\treturn withLeading === \"/\" ? \"/\" : withLeading.replace(/\\/+$/, \"\");\n}\nfunction deriveRoute(block, routePrefix) {\n\tif (block.route) return normalizeRoute(block.route);\n\tconst prefix = routePrefix ?? \"/docs\";\n\tconst slug = block.id.replace(/^docs\\.?/, \"\").replace(/\\./g, \"/\").replace(/\\/+/g, \"/\");\n\treturn normalizeRoute(slug.startsWith(\"/\") ? slug : `${prefix}/${slug}`);\n}\nfunction buildName(block, namespace) {\n\treturn namespace ? `${namespace}.${block.id}` : block.id;\n}\nfunction docBlockToPresentationV2(block, options) {\n\tconst targets = options?.defaultTargets ?? DEFAULT_TARGETS;\n\tconst version = block.version ?? options?.defaultVersion ?? 1;\n\tconst stability = block.stability ?? options?.defaultStability ?? \"stable\";\n\treturn {\n\t\tmeta: {\n\t\t\tname: buildName(block, options?.namespace),\n\t\t\tversion,\n\t\t\tdescription: block.summary ?? block.title,\n\t\t\ttags: block.tags,\n\t\t\towners: block.owners,\n\t\t\tdomain: block.domain,\n\t\t\tstability\n\t\t},\n\t\tpolicy: block.visibility && block.visibility !== \"public\" ? { flags: [block.visibility] } : void 0,\n\t\tsource: {\n\t\t\ttype: \"blocknotejs\",\n\t\t\tdocJson: block.body\n\t\t},\n\t\ttargets\n\t};\n}\nfunction docBlockToPresentationSpec(block, options) {\n\tconst version = block.version ?? options?.defaultVersion ?? 1;\n\tconst stability = block.stability ?? options?.defaultStability ?? \"stable\";\n\treturn {\n\t\tmeta: {\n\t\t\tname: buildName(block, options?.namespace),\n\t\t\tversion,\n\t\t\tstability,\n\t\t\ttags: block.tags,\n\t\t\towners: block.owners,\n\t\t\tdescription: block.summary ?? block.title\n\t\t},\n\t\tcontent: {\n\t\t\tkind: \"markdown\",\n\t\t\tcontent: block.body\n\t\t}\n\t};\n}\nfunction docBlocksToPresentationRoutes(blocks, options) {\n\treturn blocks.map((block) => ({\n\t\tblock,\n\t\troute: deriveRoute(block, options?.routePrefix),\n\t\tdescriptor: docBlockToPresentationV2(block, options)\n\t}));\n}\nfunction docBlocksToPresentationSpecs(blocks, options) {\n\treturn blocks.map((block) => docBlockToPresentationSpec(block, options));\n}\nfunction mapDocRoutes(routes) {\n\treturn routes.map(({ route, descriptor }) => [route, descriptor]);\n}\n\n//#endregion\nexport { docBlockToPresentationSpec, docBlockToPresentationV2, docBlocksToPresentationRoutes, docBlocksToPresentationSpecs, mapDocRoutes };"],"mappings":";AACA,MAAM,kBAAkB;CACvB;CACA;CACA;CACA;CACA;AACD,SAAS,eAAe,OAAO;AAC9B,KAAI,CAAC,MAAM,OAAQ,QAAO;CAC1B,MAAM,cAAc,MAAM,WAAW,IAAI,GAAG,QAAQ,IAAI;AACxD,QAAO,gBAAgB,MAAM,MAAM,YAAY,QAAQ,QAAQ,GAAG;;AAEnE,SAAS,YAAY,OAAO,aAAa;AACxC,KAAI,MAAM,MAAO,QAAO,eAAe,MAAM,MAAM;CACnD,MAAM,SAAS,eAAe;CAC9B,MAAM,OAAO,MAAM,GAAG,QAAQ,YAAY,GAAG,CAAC,QAAQ,OAAO,IAAI,CAAC,QAAQ,QAAQ,IAAI;AACtF,QAAO,eAAe,KAAK,WAAW,IAAI,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO;;AAEzE,SAAS,UAAU,OAAO,WAAW;AACpC,QAAO,YAAY,GAAG,UAAU,GAAG,MAAM,OAAO,MAAM;;AAEvD,SAAS,yBAAyB,OAAO,SAAS;CACjD,MAAM,UAAU,SAAS,kBAAkB;CAC3C,MAAM,UAAU,MAAM,WAAW,SAAS,kBAAkB;CAC5D,MAAM,YAAY,MAAM,aAAa,SAAS,oBAAoB;AAClE,QAAO;EACN,MAAM;GACL,MAAM,UAAU,OAAO,SAAS,UAAU;GAC1C;GACA,aAAa,MAAM,WAAW,MAAM;GACpC,MAAM,MAAM;GACZ,QAAQ,MAAM;GACd,QAAQ,MAAM;GACd;GACA;EACD,QAAQ,MAAM,cAAc,MAAM,eAAe,WAAW,EAAE,OAAO,CAAC,MAAM,WAAW,EAAE,GAAG,KAAK;EACjG,QAAQ;GACP,MAAM;GACN,SAAS,MAAM;GACf;EACD;EACA;;AAEF,SAAS,2BAA2B,OAAO,SAAS;CACnD,MAAM,UAAU,MAAM,WAAW,SAAS,kBAAkB;CAC5D,MAAM,YAAY,MAAM,aAAa,SAAS,oBAAoB;AAClE,QAAO;EACN,MAAM;GACL,MAAM,UAAU,OAAO,SAAS,UAAU;GAC1C;GACA;GACA,MAAM,MAAM;GACZ,QAAQ,MAAM;GACd,aAAa,MAAM,WAAW,MAAM;GACpC;EACD,SAAS;GACR,MAAM;GACN,SAAS,MAAM;GACf;EACD;;AAEF,SAAS,8BAA8B,QAAQ,SAAS;AACvD,QAAO,OAAO,KAAK,WAAW;EAC7B;EACA,OAAO,YAAY,OAAO,SAAS,YAAY;EAC/C,YAAY,yBAAyB,OAAO,QAAQ;EACpD,EAAE"}
@@ -41,4 +41,5 @@ function registerDocBlocks(blocks) {
41
41
  }
42
42
 
43
43
  //#endregion
44
- export { DocRegistry, defaultDocRegistry, registerDocBlocks };
44
+ export { DocRegistry, defaultDocRegistry, registerDocBlocks };
45
+ //# sourceMappingURL=registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.js","names":[],"sources":["../../../../../../../libs/contracts/dist/docs/registry.js"],"sourcesContent":["import { docBlockToPresentationSpec, docBlocksToPresentationRoutes } from \"./presentations.js\";\n\n//#region src/docs/registry.ts\nvar DocRegistry = class {\n\troutes = /* @__PURE__ */ new Map();\n\tconstructor(blocks = [], options) {\n\t\tblocks.forEach((block) => this.register(block, options));\n\t}\n\tregister(block, options) {\n\t\tconst [route] = docBlocksToPresentationRoutes([block], options);\n\t\tif (route) this.routes.set(block.id, route);\n\t\treturn this;\n\t}\n\tlist() {\n\t\treturn [...this.routes.values()];\n\t}\n\tget(id) {\n\t\treturn this.routes.get(id);\n\t}\n\ttoRouteTuples() {\n\t\treturn this.list().map(({ route, descriptor }) => [route, descriptor]);\n\t}\n\ttoPresentationSpecs(options) {\n\t\treturn this.list().map(({ block }) => docBlockToPresentationSpec(block, options));\n\t}\n};\nconst requiredFields = [\n\t\"id\",\n\t\"title\",\n\t\"body\",\n\t\"kind\",\n\t\"visibility\",\n\t\"route\"\n];\nconst defaultDocRegistry = new DocRegistry();\nfunction registerDocBlocks(blocks) {\n\tfor (const block of blocks) {\n\t\tfor (const field of requiredFields) if (!block[field]) throw new Error(`DocBlock ${block.id ?? \"<missing id>\"} missing field ${String(field)}`);\n\t\tdefaultDocRegistry.register(block);\n\t}\n}\nfunction listRegisteredDocBlocks() {\n\treturn defaultDocRegistry.list().map((r) => r.block);\n}\nfunction docId(id) {\n\tif (!defaultDocRegistry.get(id)) throw new Error(`DocBlock not registered: ${id}`);\n\treturn id;\n}\n\n//#endregion\nexport { DocRegistry, defaultDocRegistry, docId, listRegisteredDocBlocks, registerDocBlocks };"],"mappings":";;;AAGA,IAAI,cAAc,MAAM;CACvB,yBAAyB,IAAI,KAAK;CAClC,YAAY,SAAS,EAAE,EAAE,SAAS;AACjC,SAAO,SAAS,UAAU,KAAK,SAAS,OAAO,QAAQ,CAAC;;CAEzD,SAAS,OAAO,SAAS;EACxB,MAAM,CAAC,SAAS,8BAA8B,CAAC,MAAM,EAAE,QAAQ;AAC/D,MAAI,MAAO,MAAK,OAAO,IAAI,MAAM,IAAI,MAAM;AAC3C,SAAO;;CAER,OAAO;AACN,SAAO,CAAC,GAAG,KAAK,OAAO,QAAQ,CAAC;;CAEjC,IAAI,IAAI;AACP,SAAO,KAAK,OAAO,IAAI,GAAG;;CAE3B,gBAAgB;AACf,SAAO,KAAK,MAAM,CAAC,KAAK,EAAE,OAAO,iBAAiB,CAAC,OAAO,WAAW,CAAC;;CAEvE,oBAAoB,SAAS;AAC5B,SAAO,KAAK,MAAM,CAAC,KAAK,EAAE,YAAY,2BAA2B,OAAO,QAAQ,CAAC;;;AAGnF,MAAM,iBAAiB;CACtB;CACA;CACA;CACA;CACA;CACA;CACA;AACD,MAAM,qBAAqB,IAAI,aAAa;AAC5C,SAAS,kBAAkB,QAAQ;AAClC,MAAK,MAAM,SAAS,QAAQ;AAC3B,OAAK,MAAM,SAAS,eAAgB,KAAI,CAAC,MAAM,OAAQ,OAAM,IAAI,MAAM,YAAY,MAAM,MAAM,eAAe,iBAAiB,OAAO,MAAM,GAAG;AAC/I,qBAAmB,SAAS,MAAM"}
@@ -77,4 +77,5 @@ These checks are intentionally optimistic and should only gate routing. Full aut
77
77
  }];
78
78
  registerDocBlocks(tech_auth_better_auth_nextjs_DocBlocks);
79
79
 
80
- //#endregion
80
+ //#endregion
81
+ //# sourceMappingURL=better-auth-nextjs.docblock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"better-auth-nextjs.docblock.js","names":[],"sources":["../../../../../../../../../libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js"],"sourcesContent":["import { registerDocBlocks } from \"../../registry.js\";\n\n//#region src/docs/tech/auth/better-auth-nextjs.docblock.ts\nconst tech_auth_better_auth_nextjs_DocBlocks = [{\n\tid: \"docs.tech.auth.better-auth-nextjs\",\n\ttitle: \"Better Auth + Next.js integration (ContractSpec)\",\n\tsummary: \"How ContractSpec wires Better Auth into Next.js (server config, client singleton, and proxy cookie-only redirects).\",\n\tkind: \"reference\",\n\tvisibility: \"public\",\n\troute: \"/docs/tech/auth/better-auth-nextjs\",\n\ttags: [\n\t\t\"auth\",\n\t\t\"better-auth\",\n\t\t\"nextjs\",\n\t\t\"cookies\",\n\t\t\"proxy\",\n\t\t\"hmr\"\n\t],\n\tbody: `# Better Auth + Next.js integration (ContractSpec)\n\nThis repo uses Better Auth as the primary auth layer (sessions, organizations, teams, API keys, and OAuth).\n\n## Server config (Better Auth)\n\n- Source: \\`packages/bundles/contractspec-studio/src/application/services/auth.ts\\`\n- Important: \\`nextCookies()\\` must be the **last** plugin in the Better Auth plugin list so \\`Set-Cookie\\` is applied correctly in Next.js environments.\n\n## Better Auth Admin plugin\n\nContractSpec Studio enables the Better Auth **Admin plugin** to support platform-admin user operations (list users, impersonation, etc.).\n\n- Server: \\`admin()\\` plugin in \\`packages/bundles/contractspec-studio/src/application/services/auth.ts\\`\n- Client: \\`adminClient()\\` in \\`packages/bundles/contractspec-studio/src/presentation/providers/auth/client.ts\\`\n\n### PLATFORM_ADMIN ⇒ Better Auth admin role\n\nBetter Auth Admin endpoints authorize via \\`user.role\\`. ContractSpec enforces an org-driven rule:\n\n- If the **active organization** has \\`type = PLATFORM_ADMIN\\`, the signed-in user is ensured to have \\`User.role\\` containing \\`admin\\`.\n- This is applied in the session creation hook and re-checked in \\`assertsPlatformAdmin()\\`.\n\nThis keeps admin enablement deterministic and avoids manual role backfills.\n\n## Client config (React web + Expo)\n\nTo avoid duplicate background refresh/polling loops in dev (Fast Refresh/HMR), the Better Auth client is implemented as a singleton cached on \\`globalThis\\`.\n\n- Web client: \\`packages/bundles/contractspec-studio/src/presentation/providers/auth/client.ts\\`\n- Native client: \\`packages/bundles/contractspec-studio/src/presentation/providers/auth/client.native.ts\\`\n\nImport guidance:\n\n- If you only need the context/hook, prefer importing from \\`@lssm/bundle.contractspec-studio/presentation/providers/auth\\`.\n- If you explicitly need the Better Auth client instance (e.g. admin impersonation, direct API calls), import from \\`@lssm/bundle.contractspec-studio/presentation/providers/auth/client\\`.\n\n## Public routes (login / signup)\n\nPublic auth pages should avoid eager \\`authClient\\` initialization.\n\nPattern used:\n\n- In the submit handler, dynamically import \\`@lssm/bundle.contractspec-studio/presentation/providers/auth/index.web\\` and call \\`authClient.signIn.*\\` / \\`authClient.signUp.*\\`.\n\nThis prevents session refresh behavior from starting just because a public page rendered.\n\n## Next.js proxy auth (web-landing)\n\nThe Next.js proxy/middleware is used for **redirect decisions only**. It must not perform DB-backed session reads on every request.\n\n- Source: \\`packages/apps/web-landing/src/proxy.ts\\`\n- Approach: cookie-only checks via Better Auth cookies helpers:\n - \\`getSessionCookie(request)\\`\n - \\`getCookieCache(request)\\`\n\nThese checks are intentionally optimistic and should only gate routing. Full authorization must still be enforced on server-side actions/routes and GraphQL resolvers.\n`\n}];\nregisterDocBlocks(tech_auth_better_auth_nextjs_DocBlocks);\n\n//#endregion\nexport { tech_auth_better_auth_nextjs_DocBlocks };"],"mappings":";;;AAGA,MAAM,yCAAyC,CAAC;CAC/C,IAAI;CACJ,OAAO;CACP,SAAS;CACT,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM;EACL;EACA;EACA;EACA;EACA;EACA;EACA;CACD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0DN,CAAC;AACF,kBAAkB,uCAAuC"}
@@ -54,4 +54,5 @@ The registry module must export one of:
54
54
  }];
55
55
  registerDocBlocks(tech_contracts_openapi_export_DocBlocks);
56
56
 
57
- //#endregion
57
+ //#endregion
58
+ //# sourceMappingURL=openapi-export.docblock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openapi-export.docblock.js","names":[],"sources":["../../../../../../../../../libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js"],"sourcesContent":["import { registerDocBlocks } from \"../../registry.js\";\n\n//#region src/docs/tech/contracts/openapi-export.docblock.ts\nconst tech_contracts_openapi_export_DocBlocks = [{\n\tid: \"docs.tech.contracts.openapi-export\",\n\ttitle: \"OpenAPI export (OpenAPI 3.1) from SpecRegistry\",\n\tsummary: \"Generate a deterministic OpenAPI document from a SpecRegistry using jsonSchemaForSpec + REST transport metadata.\",\n\tkind: \"reference\",\n\tvisibility: \"public\",\n\troute: \"/docs/tech/contracts/openapi-export\",\n\ttags: [\n\t\t\"contracts\",\n\t\t\"openapi\",\n\t\t\"rest\"\n\t],\n\tbody: `## OpenAPI export (OpenAPI 3.1) from SpecRegistry\n\n### Purpose\n\nContractSpec specs can be exported into an **OpenAPI 3.1** document for tooling (SDK generation, docs, gateways).\n\nThe export is **spec-first**:\n\n- Uses \\`jsonSchemaForSpec(spec)\\` for input/output JSON Schema (from SchemaModel → zod → JSON Schema)\n- Uses \\`spec.transport.rest.method/path\\` when present\n- Falls back to deterministic defaults:\n - Method: \\`POST\\` for commands, \\`GET\\` for queries\n - Path: \\`defaultRestPath(name, version)\\` → \\`/<dot/name>/v<version>\\`\n\n### Library API\n\n- Function: \\`openApiForRegistry(registry, options?)\\`\n- Location: \\`@lssm/lib.contracts/openapi\\`\n\n### CLI\n\nExport OpenAPI from a registry module:\n\n\\`\\`\\`bash\ncontractspec openapi --registry ./src/registry.ts --out ./openapi.json\n\\`\\`\\`\n\nThe registry module must export one of:\n\n- \\`registry: SpecRegistry\\`\n- \\`default(): SpecRegistry | Promise<SpecRegistry>\\`\n- \\`createRegistry(): SpecRegistry | Promise<SpecRegistry>\\`\n\n### Notes / limitations (current)\n\n- Responses are generated as a basic \\`200\\` response (plus schemas when available).\n- Query (GET) inputs are currently represented as a JSON request body when an input schema exists.\n- Errors are not yet expanded into OpenAPI responses; that will be added when we standardize error envelopes.`\n}];\nregisterDocBlocks(tech_contracts_openapi_export_DocBlocks);\n\n//#endregion\nexport { tech_contracts_openapi_export_DocBlocks };"],"mappings":";;;AAGA,MAAM,0CAA0C,CAAC;CAChD,IAAI;CACJ,OAAO;CACP,SAAS;CACT,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM;EACL;EACA;EACA;EACA;CACD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsCN,CAAC;AACF,kBAAkB,wCAAwC"}
@@ -13,4 +13,5 @@ const tech_lifecycle_stage_system_DocBlocks = [{
13
13
  }];
14
14
  registerDocBlocks(tech_lifecycle_stage_system_DocBlocks);
15
15
 
16
- //#endregion
16
+ //#endregion
17
+ //# sourceMappingURL=lifecycle-stage-system.docblock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lifecycle-stage-system.docblock.js","names":[],"sources":["../../../../../../../../libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js"],"sourcesContent":["import { registerDocBlocks } from \"../registry.js\";\n\n//#region src/docs/tech/lifecycle-stage-system.docblock.ts\nconst tech_lifecycle_stage_system_DocBlocks = [{\n\tid: \"docs.tech.lifecycle-stage-system\",\n\ttitle: \"ContractSpec Lifecycle Stage System – Technical Design\",\n\tsummary: \"This document describes how ContractSpec implements lifecycle detection and guidance. It covers architecture, module boundaries, scoring heuristics, and integration points so libraries, modules, bundles, and Studio surfaces stay synchronized.\",\n\tkind: \"reference\",\n\tvisibility: \"public\",\n\troute: \"/docs/tech/lifecycle-stage-system\",\n\ttags: [\"tech\", \"lifecycle-stage-system\"],\n\tbody: \"## ContractSpec Lifecycle Stage System – Technical Design\\n\\nThis document describes how ContractSpec implements lifecycle detection and guidance. It covers architecture, module boundaries, scoring heuristics, and integration points so libraries, modules, bundles, and Studio surfaces stay synchronized.\\n\\n---\\n\\n### 1. Architecture Overview\\n\\n```\\n┌──────────────────────┐\\n│ @lssm/lib.lifecycle │ Types, enums, helpers (pure data)\\n└───────────┬──────────┘\\n │\\n┌───────────▼──────────┐ ┌───────────────────────────┐\\n│ modules/lifecycle- │ │ modules/lifecycle-advisor │\\n│ core (detection) │ │ (guidance & ceremonies) │\\n└───────────┬──────────┘ └───────────┬───────────────┘\\n │ │\\n ├────────────┬──────────────┤\\n ▼ ▼ ▼\\n Adapters: analytics, intent, questionnaires\\n │\\n┌───────────▼──────────┐\\n│ bundles/lifecycle- │ Managed service for Studio\\n│ managed │ (REST handlers, AI agent) │\\n└───────────┬──────────┘\\n │\\n ContractSpec Studio surfaces\\n (web/mobile APIs, CLI, docs)\\n```\\n\\n- **Libraries** provide shared vocabulary.\\n- **Modules** encapsulate logic, accepting adapters to avoid environment-specific code.\\n- **Bundles** compose modules, register agents/events, and expose APIs for Studio.\\n- **Apps** (web-landing, future Studio views) consume bundle APIs; they do not reimplement logic. For web-landing we now resolve `@lssm/bundle.contractspec-studio` and `@lssm/lib.database-contractspec-studio` directly from their `packages/.../src` folders via `tsconfig` path aliases so Prisma stays on the server build and Turbopack no longer pulls the prebundled `dist` artifacts into client chunks.\\n\\n---\\n\\n### 2. Core Library (`@lssm/lib.lifecycle`)\\n\\n- Stage enum (0–6) with metadata (`question`, `signals`, `traps`).\\n- Axes types (`ProductPhase`, `CompanyPhase`, `CapitalPhase`).\\n- `LifecycleSignal` (source, metric, value, timestamp).\\n- `LifecycleMetricSnapshot` (aggregated numbers).\\n- `LifecycleMilestone`, `LifecycleAction`, `LifecycleAssessment` interfaces.\\n- Utility helpers:\\n - `formatStageSummary(stage, assessment)`\\n - `rankStageCandidates(scores)`\\n\\nThe library exports **no runtime dependencies** so it can be imported from apps, modules, and bundles alike.\\n\\n---\\n\\n### 3. Lifecycle Core Module\\n\\n**Location:** `packages/modules/lifecycle-core/`\\n\\n#### Components\\n1. **StageSignalCollector**\\n - Accepts adapter interfaces:\\n - `AnalyticsAdapter` (pulls metrics from `@lssm/lib.analytics` or fixture streams).\\n - `IntentAdapter` (hooks into `@lssm/lib.observability` intent detectors or logs).\\n - `QuestionnaireAdapter` (loads JSON questionnaires and responses).\\n - Produces normalized `LifecycleSignal[]`.\\n\\n2. **StageScorer**\\n - Weighted scoring model:\\n - Base weight per stage (reflecting expected maturity).\\n - Feature weights (retention, revenue, team size, qualitative feedback).\\n - Confidence computed via variance of contributing signals.\\n - Supports pluggable scoring matrices via JSON config.\\n - Accepts sparse metric snapshots; the orchestrator sanitizes metrics to numeric-only records before persisting assessments so downstream analytics stay consistent.\\n\\n3. **LifecycleOrchestrator**\\n - Coordinates collectors + scorer.\\n - Returns `LifecycleAssessment` with:\\n - `stage`, `confidence`, `axisSnapshot`, `signalsUsed`.\\n - Recommended focus areas (high-level categories only).\\n - Emits events (internally) when stage confidence crosses thresholds (consumed later by bundle).\\n\\n4. **LifecycleMilestonePlanner**\\n - Loads `milestones-catalog.json` (no DB).\\n - Filters upcoming milestones per stage + axis.\\n - Tracks completion using provided IDs (caller persists).\\n\\n#### Data Files\\n- `configs/stage-weights.json`\\n- `configs/milestones-catalog.json`\\n- `questionnaires/stage-readiness.json`\\n\\n#### Extension Hooks\\n- All adapters exported as TypeScript interfaces.\\n- Implementations for analytics/intent can live in bundles or apps without modifying module code.\\n\\n---\\n\\n### 4. Lifecycle Advisor Module\\n\\n**Location:** `packages/modules/lifecycle-advisor/`\\n\\n#### Components\\n1. **LifecycleRecommendationEngine**\\n - Consumes `LifecycleAssessment`.\\n - Maps gaps to `LifecycleAction[]` using rule tables (`stage-playbooks.ts`).\\n - Supports override hooks for customer-specific rules.\\n\\n2. **ContractSpecLibraryRecommender**\\n - Maintains mapping from stage → recommended libraries/modules/bundles.\\n - Returns prioritized list with rationale and adoption prerequisites.\\n\\n3. **LifecycleCeremonyDesigner**\\n - Provides textual/structural data for ceremonies (title, copy, animation cues, soundtrack references).\\n - Ensures low-tech friendly instructions (clear copy, undo guidance).\\n\\n4. **AI Hooks**\\n - Defines prompt templates and tool manifests for lifecycle advisor agents (consumed by bundles).\\n - Keeps actual LLM integration outside module.\\n\\n---\\n\\n### 5. Managed Bundle (`lifecycle-managed`)\\n\\n**Responsibilities**\\n- Wire modules together.\\n- Provide HTTP/GraphQL handlers (exact transport optional).\\n- Register LifecycleAdvisorAgent via `@lssm/lib.ai-agent`.\\n- LifecycleAdvisorAgent meta: domain `operations`, owners `team-lifecycle`, stability `experimental`, tags `guide/lifecycle/ops` so ops tooling can route incidents quickly.\\n- Emit lifecycle events through `@lssm/lib.bus` + `@lssm/lib.analytics`.\\n- Integrate with `contractspec-studio` packages:\\n - Use Studio contracts for authentication/tenant context (without accessing tenant DBs).\\n - Store assessments in Studio-managed storage abstractions (in-memory or file-based for now).\\n\\n**APIs**\\n- `POST /lifecycle/assessments`: Accepts metrics + optional questionnaire answers. Returns `LifecycleAssessment`.\\n- `GET /lifecycle/playbooks/:stage`: Returns stage playbook + ceremonies.\\n- `POST /lifecycle/advise`: Invokes LifecycleAdvisorAgent with context.\\n\\n**Events**\\n- `LifecycleAssessmentCreated`\\n- `LifecycleStageChanged`\\n- `LifecycleGuidanceConsumed`\\n\\n---\\n\\n### 6. Library Enhancements\\n\\n| Library | Enhancement |\\n| --- | --- |\\n| `@lssm/lib.analytics` | Lifecycle metric collectors, helper to emit stage events, adapter implementation used by `StageSignalCollector`. |\\n| `@lssm/lib.evolution` | Accepts `LifecycleContext` when ranking spec anomalies/suggestions. |\\n| `@lssm/lib.growth` | Stage-specific experiment templates + guardrails referencing lifecycle enums. |\\n| `@lssm/lib.observability` | Lifecycle KPI pipeline definitions (drift detection, regression alerts). |\\n\\nEach enhancement must import stage types from `@lssm/lib.lifecycle`.\\n\\n---\\n\\n### 7. Feature Flags & Progressive Delivery\\n\\n- Add new flags in progressive-delivery library:\\n - `LIFECYCLE_DETECTION_ALPHA`\\n - `LIFECYCLE_ADVISOR_ALPHA`\\n - `LIFECYCLE_MANAGED_SERVICE`\\n- Bundles/modules should check flags before enabling workflows.\\n- Flags referenced in docs + Studio UI to avoid accidental exposure.\\n\\n---\\n\\n### 8. Analytics & Telemetry\\n\\n- Events defined in analytics library; consumed by bundle/app:\\n - `lifecycle_assessment_run`\\n - `lifecycle_stage_changed`\\n - `lifecycle_guidance_consumed`\\n- Observability pipeline includes:\\n - Composite lifecycle health metric (weighted sum of KPIs).\\n - Drift detection comparing stage predictions over time.\\n - Alert manager recipes for regression (e.g., PMF drop).\\n\\n---\\n\\n### 9. Testing Strategy\\n\\n1. **Unit**\\n - StageScorer weight matrix.\\n - RecommendationEngine mapping.\\n - Library recommender stage coverage.\\n\\n2. **Contract**\\n - Adapters: ensure mock adapters satisfy interfaces.\\n - Bundles: ensure HTTP handlers respect request/response contracts even without persistence.\\n\\n3. **Integration**\\n - CLI example runs detection + guidance end-to-end on fixture data.\\n - Dashboard example renders assessments, verifying JSON structures remain stable.\\n\\n---\\n\\n### 10. Implementation Checklist\\n\\n- [ ] Documentation (product, tech, ops, user).\\n- [ ] Library creation (`@lssm/lib.lifecycle`).\\n- [ ] Modules (`lifecycle-core`, `lifecycle-advisor`).\\n- [ ] Bundle (`lifecycle-managed`) + Studio wiring.\\n- [ ] Library enhancements (analytics/evolution/growth/observability).\\n- [ ] Examples (CLI + dashboard).\\n- [ ] Feature flags + telemetry.\\n- [ ] Automated tests + fixtures.\\n\\nKeep this document in sync as modules evolve. When adding new stages or axes, update `@lssm/lib.lifecycle` first, then cascade to adapters, then refresh docs + Studio copy.*** End Patch*** End Patch\\n\\n\\n\"\n}];\nregisterDocBlocks(tech_lifecycle_stage_system_DocBlocks);\n\n//#endregion\nexport { tech_lifecycle_stage_system_DocBlocks };"],"mappings":";;;AAGA,MAAM,wCAAwC,CAAC;CAC9C,IAAI;CACJ,OAAO;CACP,SAAS;CACT,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM,CAAC,QAAQ,yBAAyB;CACxC,MAAM;CACN,CAAC;AACF,kBAAkB,sCAAsC"}
@@ -354,4 +354,5 @@ Each issue has:
354
354
  ];
355
355
  registerDocBlocks(tech_llm_integration_DocBlocks);
356
356
 
357
- //#endregion
357
+ //#endregion
358
+ //# sourceMappingURL=llm-integration.docblock.js.map