@lssm/example.locale-jurisdiction-gate 0.0.0-canary-20251217062943 → 0.0.0-canary-20251217072406

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 (143) hide show
  1. package/.turbo/turbo-build$colon$bundle.log +231 -197
  2. package/.turbo/turbo-build.log +232 -43
  3. package/CHANGELOG.md +3 -3
  4. package/dist/contracts/assistant.d.ts +59 -59
  5. package/dist/contracts/assistant.js +117 -1
  6. package/dist/contracts/index.js +3 -1
  7. package/dist/docs/index.js +1 -1
  8. package/dist/docs/locale-jurisdiction-gate.docblock.js +37 -3
  9. package/dist/entities/index.js +3 -1
  10. package/dist/entities/models.d.ts +48 -48
  11. package/dist/entities/models.js +170 -1
  12. package/dist/events.d.ts +18 -18
  13. package/dist/events.js +102 -1
  14. package/dist/example.js +39 -1
  15. package/dist/handlers/demo.handlers.js +85 -1
  16. package/dist/handlers/index.js +3 -1
  17. package/dist/index.js +12 -1
  18. package/dist/libs/contracts/dist/capabilities/openbanking.js +88 -1
  19. package/dist/libs/contracts/dist/client/index.js +5 -1
  20. package/dist/libs/contracts/dist/client/react/feature-render.js +2 -1
  21. package/dist/libs/contracts/dist/client/react/form-render.js +4 -1
  22. package/dist/libs/contracts/dist/client/react/index.js +4 -1
  23. package/dist/libs/contracts/dist/contract-registry/index.js +1 -1
  24. package/dist/libs/contracts/dist/contract-registry/schemas.js +60 -1
  25. package/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +16 -76
  26. package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +16 -350
  27. package/dist/libs/contracts/dist/docs/index.js +29 -1
  28. package/dist/libs/contracts/dist/docs/presentations.js +71 -1
  29. package/dist/libs/contracts/dist/docs/registry.js +44 -1
  30. package/dist/libs/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +16 -383
  31. package/dist/libs/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +16 -68
  32. package/dist/libs/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +16 -140
  33. package/dist/libs/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +16 -86
  34. package/dist/libs/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +16 -1
  35. package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +24 -2
  36. package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +21 -2
  37. package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +16 -213
  38. package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +73 -5
  39. package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +37 -1
  40. package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +16 -1
  41. package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +20 -262
  42. package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +48 -1
  43. package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +24 -2
  44. package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +23 -2
  45. package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +25 -16
  46. package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +67 -1
  47. package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +22 -2
  48. package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +40 -36
  49. package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +47 -1
  50. package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +23 -2
  51. package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +36 -3
  52. package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +20 -1
  53. package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +36 -3
  54. package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +20 -1
  55. package/dist/libs/contracts/dist/events.js +10 -1
  56. package/dist/libs/contracts/dist/experiments/evaluator.js +1 -1
  57. package/dist/libs/contracts/dist/index.js +71 -1
  58. package/dist/libs/contracts/dist/install.js +2 -1
  59. package/dist/libs/contracts/dist/integrations/contracts.js +377 -1
  60. package/dist/libs/contracts/dist/integrations/index.js +18 -1
  61. package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +228 -1
  62. package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +159 -1
  63. package/dist/libs/contracts/dist/integrations/openbanking/contracts/index.js +3 -1
  64. package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +210 -1
  65. package/dist/libs/contracts/dist/integrations/openbanking/models.js +242 -1
  66. package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js +13 -1
  67. package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js +52 -1
  68. package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js +75 -1
  69. package/dist/libs/contracts/dist/integrations/providers/gmail.js +87 -1
  70. package/dist/libs/contracts/dist/integrations/providers/google-calendar.js +66 -1
  71. package/dist/libs/contracts/dist/integrations/providers/index.js +11 -1
  72. package/dist/libs/contracts/dist/integrations/providers/mistral.js +68 -1
  73. package/dist/libs/contracts/dist/integrations/providers/postmark.js +68 -1
  74. package/dist/libs/contracts/dist/integrations/providers/powens.js +116 -1
  75. package/dist/libs/contracts/dist/integrations/providers/qdrant.js +73 -1
  76. package/dist/libs/contracts/dist/integrations/providers/registry.js +10 -1
  77. package/dist/libs/contracts/dist/integrations/providers/stripe.js +83 -1
  78. package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js +61 -1
  79. package/dist/libs/contracts/dist/jsonschema.js +1 -1
  80. package/dist/libs/contracts/dist/knowledge/contracts.js +306 -1
  81. package/dist/libs/contracts/dist/knowledge/index.js +7 -1
  82. package/dist/libs/contracts/dist/knowledge/spaces/email-threads.js +34 -1
  83. package/dist/libs/contracts/dist/knowledge/spaces/financial-docs.js +34 -1
  84. package/dist/libs/contracts/dist/knowledge/spaces/financial-overview.js +38 -1
  85. package/dist/libs/contracts/dist/knowledge/spaces/index.js +6 -1
  86. package/dist/libs/contracts/dist/knowledge/spaces/product-canon.js +34 -1
  87. package/dist/libs/contracts/dist/knowledge/spaces/support-faq.js +37 -1
  88. package/dist/libs/contracts/dist/knowledge/spaces/uploaded-docs.js +34 -1
  89. package/dist/libs/contracts/dist/llm/exporters.js +19 -1
  90. package/dist/libs/contracts/dist/llm/index.js +2 -1
  91. package/dist/libs/contracts/dist/llm/prompts.js +1 -1
  92. package/dist/libs/contracts/dist/onboarding-base.js +196 -1
  93. package/dist/libs/contracts/dist/openapi.js +1 -1
  94. package/dist/libs/contracts/dist/ownership.js +21 -1
  95. package/dist/libs/contracts/dist/presentations.js +1 -1
  96. package/dist/libs/contracts/dist/presentations.v2.js +11 -1
  97. package/dist/libs/contracts/dist/prompt.js +1 -1
  98. package/dist/libs/contracts/dist/promptRegistry.js +1 -1
  99. package/dist/libs/contracts/dist/regenerator/index.js +1 -1
  100. package/dist/libs/contracts/dist/regenerator/service.js +6 -1
  101. package/dist/libs/contracts/dist/registry.js +2 -1
  102. package/dist/libs/contracts/dist/resources.js +1 -1
  103. package/dist/libs/contracts/dist/schema/dist/EnumType.js +2 -1
  104. package/dist/libs/contracts/dist/schema/dist/FieldType.js +49 -1
  105. package/dist/libs/contracts/dist/schema/dist/ScalarTypeEnum.js +236 -1
  106. package/dist/libs/contracts/dist/schema/dist/SchemaModel.js +39 -1
  107. package/dist/libs/contracts/dist/schema/dist/entity/defineEntity.js +1 -1
  108. package/dist/libs/contracts/dist/schema/dist/entity/index.js +2 -1
  109. package/dist/libs/contracts/dist/schema/dist/entity/types.js +1 -1
  110. package/dist/libs/contracts/dist/schema/dist/index.js +6 -1
  111. package/dist/libs/contracts/dist/server/graphql-pothos.js +6 -1
  112. package/dist/libs/contracts/dist/server/index.js +8 -1
  113. package/dist/libs/contracts/dist/server/mcp/createMcpServer.js +4 -1
  114. package/dist/libs/contracts/dist/server/mcp/registerPresentations.js +2 -1
  115. package/dist/libs/contracts/dist/server/mcp/registerPrompts.js +1 -1
  116. package/dist/libs/contracts/dist/server/mcp/registerResources.js +2 -1
  117. package/dist/libs/contracts/dist/server/mcp/registerTools.js +1 -1
  118. package/dist/libs/contracts/dist/server/provider-mcp.js +1 -1
  119. package/dist/libs/contracts/dist/server/rest-elysia.js +1 -1
  120. package/dist/libs/contracts/dist/server/rest-express.js +1 -1
  121. package/dist/libs/contracts/dist/server/rest-generic.js +1 -1
  122. package/dist/libs/contracts/dist/server/rest-next-app.js +1 -1
  123. package/dist/libs/contracts/dist/server/rest-next-pages.js +1 -1
  124. package/dist/libs/contracts/dist/spec.js +34 -1
  125. package/dist/libs/contracts/dist/telemetry/index.js +1 -1
  126. package/dist/libs/contracts/dist/telemetry/tracker.js +1 -1
  127. package/dist/libs/contracts/dist/tests/index.js +1 -1
  128. package/dist/libs/contracts/dist/tests/runner.js +2 -1
  129. package/dist/libs/contracts/dist/workflow/index.js +1 -1
  130. package/dist/libs/contracts/dist/workflow/runner.js +1 -1
  131. package/dist/libs/schema/dist/EnumType.js +56 -1
  132. package/dist/libs/schema/dist/FieldType.js +49 -1
  133. package/dist/libs/schema/dist/ScalarTypeEnum.js +236 -1
  134. package/dist/libs/schema/dist/SchemaModel.js +39 -1
  135. package/dist/libs/schema/dist/entity/defineEntity.js +1 -1
  136. package/dist/libs/schema/dist/entity/index.js +2 -1
  137. package/dist/libs/schema/dist/entity/types.js +1 -1
  138. package/dist/libs/schema/dist/index.js +6 -1
  139. package/dist/locale-jurisdiction-gate.feature.js +49 -1
  140. package/dist/policy/guard.js +72 -2
  141. package/dist/policy/index.js +3 -1
  142. package/package.json +5 -5
  143. package/tsconfig.tsbuildinfo +1 -1
@@ -1,135 +1,135 @@
1
- import * as _lssm_lib_schema0 from "@lssm/lib.schema";
1
+ import * as _lssm_lib_schema74 from "@lssm/lib.schema";
2
2
 
3
3
  //#region src/entities/models.d.ts
4
- declare const AllowedScopeEnum: _lssm_lib_schema0.EnumType<[string, string, string]>;
5
- declare const UserProfileModel: _lssm_lib_schema0.SchemaModel<{
4
+ declare const AllowedScopeEnum: _lssm_lib_schema74.EnumType<[string, string, string]>;
5
+ declare const UserProfileModel: _lssm_lib_schema74.SchemaModel<{
6
6
  preferredLocale: {
7
- type: _lssm_lib_schema0.FieldType<string, string>;
7
+ type: _lssm_lib_schema74.FieldType<string, string>;
8
8
  isOptional: true;
9
9
  };
10
10
  residencyCountry: {
11
- type: _lssm_lib_schema0.FieldType<string, string>;
11
+ type: _lssm_lib_schema74.FieldType<string, string>;
12
12
  isOptional: true;
13
13
  };
14
14
  taxResidenceCountry: {
15
- type: _lssm_lib_schema0.FieldType<string, string>;
15
+ type: _lssm_lib_schema74.FieldType<string, string>;
16
16
  isOptional: true;
17
17
  };
18
18
  clientType: {
19
- type: _lssm_lib_schema0.FieldType<string, string>;
19
+ type: _lssm_lib_schema74.FieldType<string, string>;
20
20
  isOptional: true;
21
21
  };
22
22
  }>;
23
- declare const RegulatoryContextModel: _lssm_lib_schema0.SchemaModel<{
23
+ declare const RegulatoryContextModel: _lssm_lib_schema74.SchemaModel<{
24
24
  jurisdiction: {
25
- type: _lssm_lib_schema0.FieldType<string, string>;
25
+ type: _lssm_lib_schema74.FieldType<string, string>;
26
26
  isOptional: false;
27
27
  };
28
28
  region: {
29
- type: _lssm_lib_schema0.FieldType<string, string>;
29
+ type: _lssm_lib_schema74.FieldType<string, string>;
30
30
  isOptional: true;
31
31
  };
32
32
  clientType: {
33
- type: _lssm_lib_schema0.FieldType<string, string>;
33
+ type: _lssm_lib_schema74.FieldType<string, string>;
34
34
  isOptional: true;
35
35
  };
36
36
  allowedScope: {
37
- type: _lssm_lib_schema0.EnumType<[string, string, string]>;
37
+ type: _lssm_lib_schema74.EnumType<[string, string, string]>;
38
38
  isOptional: false;
39
39
  };
40
40
  }>;
41
- declare const LLMCallEnvelopeModel: _lssm_lib_schema0.SchemaModel<{
41
+ declare const LLMCallEnvelopeModel: _lssm_lib_schema74.SchemaModel<{
42
42
  traceId: {
43
- type: _lssm_lib_schema0.FieldType<string, string>;
43
+ type: _lssm_lib_schema74.FieldType<string, string>;
44
44
  isOptional: false;
45
45
  };
46
46
  locale: {
47
- type: _lssm_lib_schema0.FieldType<string, string>;
47
+ type: _lssm_lib_schema74.FieldType<string, string>;
48
48
  isOptional: false;
49
49
  };
50
50
  regulatoryContext: {
51
- type: _lssm_lib_schema0.SchemaModel<{
51
+ type: _lssm_lib_schema74.SchemaModel<{
52
52
  jurisdiction: {
53
- type: _lssm_lib_schema0.FieldType<string, string>;
53
+ type: _lssm_lib_schema74.FieldType<string, string>;
54
54
  isOptional: false;
55
55
  };
56
56
  region: {
57
- type: _lssm_lib_schema0.FieldType<string, string>;
57
+ type: _lssm_lib_schema74.FieldType<string, string>;
58
58
  isOptional: true;
59
59
  };
60
60
  clientType: {
61
- type: _lssm_lib_schema0.FieldType<string, string>;
61
+ type: _lssm_lib_schema74.FieldType<string, string>;
62
62
  isOptional: true;
63
63
  };
64
64
  allowedScope: {
65
- type: _lssm_lib_schema0.EnumType<[string, string, string]>;
65
+ type: _lssm_lib_schema74.EnumType<[string, string, string]>;
66
66
  isOptional: false;
67
67
  };
68
68
  }>;
69
69
  isOptional: false;
70
70
  };
71
71
  kbSnapshotId: {
72
- type: _lssm_lib_schema0.FieldType<string, string>;
72
+ type: _lssm_lib_schema74.FieldType<string, string>;
73
73
  isOptional: false;
74
74
  };
75
75
  allowedScope: {
76
- type: _lssm_lib_schema0.EnumType<[string, string, string]>;
76
+ type: _lssm_lib_schema74.EnumType<[string, string, string]>;
77
77
  isOptional: false;
78
78
  };
79
79
  }>;
80
- declare const AssistantCitationModel: _lssm_lib_schema0.SchemaModel<{
80
+ declare const AssistantCitationModel: _lssm_lib_schema74.SchemaModel<{
81
81
  kbSnapshotId: {
82
- type: _lssm_lib_schema0.FieldType<string, string>;
82
+ type: _lssm_lib_schema74.FieldType<string, string>;
83
83
  isOptional: false;
84
84
  };
85
85
  sourceType: {
86
- type: _lssm_lib_schema0.FieldType<string, string>;
86
+ type: _lssm_lib_schema74.FieldType<string, string>;
87
87
  isOptional: false;
88
88
  };
89
89
  sourceId: {
90
- type: _lssm_lib_schema0.FieldType<string, string>;
90
+ type: _lssm_lib_schema74.FieldType<string, string>;
91
91
  isOptional: false;
92
92
  };
93
93
  title: {
94
- type: _lssm_lib_schema0.FieldType<string, string>;
94
+ type: _lssm_lib_schema74.FieldType<string, string>;
95
95
  isOptional: true;
96
96
  };
97
97
  excerpt: {
98
- type: _lssm_lib_schema0.FieldType<string, string>;
98
+ type: _lssm_lib_schema74.FieldType<string, string>;
99
99
  isOptional: true;
100
100
  };
101
101
  }>;
102
- declare const AssistantAnswerSectionModel: _lssm_lib_schema0.SchemaModel<{
102
+ declare const AssistantAnswerSectionModel: _lssm_lib_schema74.SchemaModel<{
103
103
  heading: {
104
- type: _lssm_lib_schema0.FieldType<string, string>;
104
+ type: _lssm_lib_schema74.FieldType<string, string>;
105
105
  isOptional: false;
106
106
  };
107
107
  body: {
108
- type: _lssm_lib_schema0.FieldType<string, string>;
108
+ type: _lssm_lib_schema74.FieldType<string, string>;
109
109
  isOptional: false;
110
110
  };
111
111
  }>;
112
- declare const AssistantAnswerIRModel: _lssm_lib_schema0.SchemaModel<{
112
+ declare const AssistantAnswerIRModel: _lssm_lib_schema74.SchemaModel<{
113
113
  locale: {
114
- type: _lssm_lib_schema0.FieldType<string, string>;
114
+ type: _lssm_lib_schema74.FieldType<string, string>;
115
115
  isOptional: false;
116
116
  };
117
117
  jurisdiction: {
118
- type: _lssm_lib_schema0.FieldType<string, string>;
118
+ type: _lssm_lib_schema74.FieldType<string, string>;
119
119
  isOptional: false;
120
120
  };
121
121
  allowedScope: {
122
- type: _lssm_lib_schema0.EnumType<[string, string, string]>;
122
+ type: _lssm_lib_schema74.EnumType<[string, string, string]>;
123
123
  isOptional: false;
124
124
  };
125
125
  sections: {
126
- type: _lssm_lib_schema0.SchemaModel<{
126
+ type: _lssm_lib_schema74.SchemaModel<{
127
127
  heading: {
128
- type: _lssm_lib_schema0.FieldType<string, string>;
128
+ type: _lssm_lib_schema74.FieldType<string, string>;
129
129
  isOptional: false;
130
130
  };
131
131
  body: {
132
- type: _lssm_lib_schema0.FieldType<string, string>;
132
+ type: _lssm_lib_schema74.FieldType<string, string>;
133
133
  isOptional: false;
134
134
  };
135
135
  }>;
@@ -137,25 +137,25 @@ declare const AssistantAnswerIRModel: _lssm_lib_schema0.SchemaModel<{
137
137
  isOptional: false;
138
138
  };
139
139
  citations: {
140
- type: _lssm_lib_schema0.SchemaModel<{
140
+ type: _lssm_lib_schema74.SchemaModel<{
141
141
  kbSnapshotId: {
142
- type: _lssm_lib_schema0.FieldType<string, string>;
142
+ type: _lssm_lib_schema74.FieldType<string, string>;
143
143
  isOptional: false;
144
144
  };
145
145
  sourceType: {
146
- type: _lssm_lib_schema0.FieldType<string, string>;
146
+ type: _lssm_lib_schema74.FieldType<string, string>;
147
147
  isOptional: false;
148
148
  };
149
149
  sourceId: {
150
- type: _lssm_lib_schema0.FieldType<string, string>;
150
+ type: _lssm_lib_schema74.FieldType<string, string>;
151
151
  isOptional: false;
152
152
  };
153
153
  title: {
154
- type: _lssm_lib_schema0.FieldType<string, string>;
154
+ type: _lssm_lib_schema74.FieldType<string, string>;
155
155
  isOptional: true;
156
156
  };
157
157
  excerpt: {
158
- type: _lssm_lib_schema0.FieldType<string, string>;
158
+ type: _lssm_lib_schema74.FieldType<string, string>;
159
159
  isOptional: true;
160
160
  };
161
161
  }>;
@@ -163,21 +163,21 @@ declare const AssistantAnswerIRModel: _lssm_lib_schema0.SchemaModel<{
163
163
  isOptional: false;
164
164
  };
165
165
  disclaimers: {
166
- type: _lssm_lib_schema0.FieldType<string, string>;
166
+ type: _lssm_lib_schema74.FieldType<string, string>;
167
167
  isArray: true;
168
168
  isOptional: true;
169
169
  };
170
170
  riskFlags: {
171
- type: _lssm_lib_schema0.FieldType<string, string>;
171
+ type: _lssm_lib_schema74.FieldType<string, string>;
172
172
  isArray: true;
173
173
  isOptional: true;
174
174
  };
175
175
  refused: {
176
- type: _lssm_lib_schema0.FieldType<boolean, boolean>;
176
+ type: _lssm_lib_schema74.FieldType<boolean, boolean>;
177
177
  isOptional: true;
178
178
  };
179
179
  refusalReason: {
180
- type: _lssm_lib_schema0.FieldType<string, string>;
180
+ type: _lssm_lib_schema74.FieldType<string, string>;
181
181
  isOptional: true;
182
182
  };
183
183
  }>;
@@ -1 +1,170 @@
1
- import{r as e}from"../libs/schema/dist/EnumType.js";import{l as t}from"../libs/schema/dist/ScalarTypeEnum.js";import{n}from"../libs/schema/dist/SchemaModel.js";import"../libs/schema/dist/index.js";const r=e(`AllowedScope`,[`education_only`,`generic_info`,`escalation_required`]),i=n({name:`UserProfile`,description:`User profile inputs used to derive regulatory context.`,fields:{preferredLocale:{type:t.String_unsecure(),isOptional:!0},residencyCountry:{type:t.String_unsecure(),isOptional:!0},taxResidenceCountry:{type:t.String_unsecure(),isOptional:!0},clientType:{type:t.String_unsecure(),isOptional:!0}}}),a=n({name:`RegulatoryContext`,description:`Explicit regulatory context (no guessing).`,fields:{jurisdiction:{type:t.String_unsecure(),isOptional:!1},region:{type:t.String_unsecure(),isOptional:!0},clientType:{type:t.String_unsecure(),isOptional:!0},allowedScope:{type:r,isOptional:!1}}}),o=n({name:`LLMCallEnvelope`,description:`Mandatory envelope for assistant calls. All fields are explicit and required for policy gating.`,fields:{traceId:{type:t.String_unsecure(),isOptional:!1},locale:{type:t.String_unsecure(),isOptional:!1},regulatoryContext:{type:a,isOptional:!1},kbSnapshotId:{type:t.String_unsecure(),isOptional:!1},allowedScope:{type:r,isOptional:!1}}}),s=n({name:`AssistantCitation`,description:`Citation referencing a KB snapshot + a specific item within it.`,fields:{kbSnapshotId:{type:t.String_unsecure(),isOptional:!1},sourceType:{type:t.String_unsecure(),isOptional:!1},sourceId:{type:t.String_unsecure(),isOptional:!1},title:{type:t.String_unsecure(),isOptional:!0},excerpt:{type:t.String_unsecure(),isOptional:!0}}}),c=n({name:`AssistantAnswerSection`,description:`Structured answer section.`,fields:{heading:{type:t.String_unsecure(),isOptional:!1},body:{type:t.String_unsecure(),isOptional:!1}}}),l=n({name:`AssistantAnswerIR`,description:`Structured assistant answer with mandatory citations and explicit locale/jurisdiction.`,fields:{locale:{type:t.String_unsecure(),isOptional:!1},jurisdiction:{type:t.String_unsecure(),isOptional:!1},allowedScope:{type:r,isOptional:!1},sections:{type:c,isArray:!0,isOptional:!1},citations:{type:s,isArray:!0,isOptional:!1},disclaimers:{type:t.String_unsecure(),isArray:!0,isOptional:!0},riskFlags:{type:t.String_unsecure(),isArray:!0,isOptional:!0},refused:{type:t.Boolean(),isOptional:!0},refusalReason:{type:t.String_unsecure(),isOptional:!0}}});export{r as AllowedScopeEnum,l as AssistantAnswerIRModel,c as AssistantAnswerSectionModel,s as AssistantCitationModel,o as LLMCallEnvelopeModel,a as RegulatoryContextModel,i as UserProfileModel};
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";
5
+
6
+ //#region src/entities/models.ts
7
+ const AllowedScopeEnum = defineEnum("AllowedScope", [
8
+ "education_only",
9
+ "generic_info",
10
+ "escalation_required"
11
+ ]);
12
+ const UserProfileModel = defineSchemaModel({
13
+ name: "UserProfile",
14
+ description: "User profile inputs used to derive regulatory context.",
15
+ fields: {
16
+ preferredLocale: {
17
+ type: ScalarTypeEnum.String_unsecure(),
18
+ isOptional: true
19
+ },
20
+ residencyCountry: {
21
+ type: ScalarTypeEnum.String_unsecure(),
22
+ isOptional: true
23
+ },
24
+ taxResidenceCountry: {
25
+ type: ScalarTypeEnum.String_unsecure(),
26
+ isOptional: true
27
+ },
28
+ clientType: {
29
+ type: ScalarTypeEnum.String_unsecure(),
30
+ isOptional: true
31
+ }
32
+ }
33
+ });
34
+ const RegulatoryContextModel = defineSchemaModel({
35
+ name: "RegulatoryContext",
36
+ description: "Explicit regulatory context (no guessing).",
37
+ fields: {
38
+ jurisdiction: {
39
+ type: ScalarTypeEnum.String_unsecure(),
40
+ isOptional: false
41
+ },
42
+ region: {
43
+ type: ScalarTypeEnum.String_unsecure(),
44
+ isOptional: true
45
+ },
46
+ clientType: {
47
+ type: ScalarTypeEnum.String_unsecure(),
48
+ isOptional: true
49
+ },
50
+ allowedScope: {
51
+ type: AllowedScopeEnum,
52
+ isOptional: false
53
+ }
54
+ }
55
+ });
56
+ const LLMCallEnvelopeModel = defineSchemaModel({
57
+ name: "LLMCallEnvelope",
58
+ description: "Mandatory envelope for assistant calls. All fields are explicit and required for policy gating.",
59
+ fields: {
60
+ traceId: {
61
+ type: ScalarTypeEnum.String_unsecure(),
62
+ isOptional: false
63
+ },
64
+ locale: {
65
+ type: ScalarTypeEnum.String_unsecure(),
66
+ isOptional: false
67
+ },
68
+ regulatoryContext: {
69
+ type: RegulatoryContextModel,
70
+ isOptional: false
71
+ },
72
+ kbSnapshotId: {
73
+ type: ScalarTypeEnum.String_unsecure(),
74
+ isOptional: false
75
+ },
76
+ allowedScope: {
77
+ type: AllowedScopeEnum,
78
+ isOptional: false
79
+ }
80
+ }
81
+ });
82
+ const AssistantCitationModel = defineSchemaModel({
83
+ name: "AssistantCitation",
84
+ description: "Citation referencing a KB snapshot + a specific item within it.",
85
+ fields: {
86
+ kbSnapshotId: {
87
+ type: ScalarTypeEnum.String_unsecure(),
88
+ isOptional: false
89
+ },
90
+ sourceType: {
91
+ type: ScalarTypeEnum.String_unsecure(),
92
+ isOptional: false
93
+ },
94
+ sourceId: {
95
+ type: ScalarTypeEnum.String_unsecure(),
96
+ isOptional: false
97
+ },
98
+ title: {
99
+ type: ScalarTypeEnum.String_unsecure(),
100
+ isOptional: true
101
+ },
102
+ excerpt: {
103
+ type: ScalarTypeEnum.String_unsecure(),
104
+ isOptional: true
105
+ }
106
+ }
107
+ });
108
+ const AssistantAnswerSectionModel = defineSchemaModel({
109
+ name: "AssistantAnswerSection",
110
+ description: "Structured answer section.",
111
+ fields: {
112
+ heading: {
113
+ type: ScalarTypeEnum.String_unsecure(),
114
+ isOptional: false
115
+ },
116
+ body: {
117
+ type: ScalarTypeEnum.String_unsecure(),
118
+ isOptional: false
119
+ }
120
+ }
121
+ });
122
+ const AssistantAnswerIRModel = defineSchemaModel({
123
+ name: "AssistantAnswerIR",
124
+ description: "Structured assistant answer with mandatory citations and explicit locale/jurisdiction.",
125
+ fields: {
126
+ locale: {
127
+ type: ScalarTypeEnum.String_unsecure(),
128
+ isOptional: false
129
+ },
130
+ jurisdiction: {
131
+ type: ScalarTypeEnum.String_unsecure(),
132
+ isOptional: false
133
+ },
134
+ allowedScope: {
135
+ type: AllowedScopeEnum,
136
+ isOptional: false
137
+ },
138
+ sections: {
139
+ type: AssistantAnswerSectionModel,
140
+ isArray: true,
141
+ isOptional: false
142
+ },
143
+ citations: {
144
+ type: AssistantCitationModel,
145
+ isArray: true,
146
+ isOptional: false
147
+ },
148
+ disclaimers: {
149
+ type: ScalarTypeEnum.String_unsecure(),
150
+ isArray: true,
151
+ isOptional: true
152
+ },
153
+ riskFlags: {
154
+ type: ScalarTypeEnum.String_unsecure(),
155
+ isArray: true,
156
+ isOptional: true
157
+ },
158
+ refused: {
159
+ type: ScalarTypeEnum.Boolean(),
160
+ isOptional: true
161
+ },
162
+ refusalReason: {
163
+ type: ScalarTypeEnum.String_unsecure(),
164
+ isOptional: true
165
+ }
166
+ }
167
+ });
168
+
169
+ //#endregion
170
+ export { AllowedScopeEnum, AssistantAnswerIRModel, AssistantAnswerSectionModel, AssistantCitationModel, LLMCallEnvelopeModel, RegulatoryContextModel, UserProfileModel };
package/dist/events.d.ts CHANGED
@@ -1,66 +1,66 @@
1
- import * as _lssm_lib_schema46 from "@lssm/lib.schema";
1
+ import * as _lssm_lib_schema0 from "@lssm/lib.schema";
2
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_contracts0.EventSpec<_lssm_lib_schema46.SchemaModel<{
5
+ declare const AssistantAnswerRequestedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
6
6
  traceId: {
7
- type: _lssm_lib_schema46.FieldType<string, string>;
7
+ type: _lssm_lib_schema0.FieldType<string, string>;
8
8
  isOptional: false;
9
9
  };
10
10
  locale: {
11
- type: _lssm_lib_schema46.FieldType<string, string>;
11
+ type: _lssm_lib_schema0.FieldType<string, string>;
12
12
  isOptional: false;
13
13
  };
14
14
  jurisdiction: {
15
- type: _lssm_lib_schema46.FieldType<string, string>;
15
+ type: _lssm_lib_schema0.FieldType<string, string>;
16
16
  isOptional: false;
17
17
  };
18
18
  kbSnapshotId: {
19
- type: _lssm_lib_schema46.FieldType<string, string>;
19
+ type: _lssm_lib_schema0.FieldType<string, string>;
20
20
  isOptional: false;
21
21
  };
22
22
  allowedScope: {
23
- type: _lssm_lib_schema46.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_contracts0.EventSpec<_lssm_lib_schema46.SchemaModel<{
27
+ declare const AssistantAnswerBlockedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
28
28
  traceId: {
29
- type: _lssm_lib_schema46.FieldType<string, string>;
29
+ type: _lssm_lib_schema0.FieldType<string, string>;
30
30
  isOptional: false;
31
31
  };
32
32
  reasonCode: {
33
- type: _lssm_lib_schema46.FieldType<string, string>;
33
+ type: _lssm_lib_schema0.FieldType<string, string>;
34
34
  isOptional: false;
35
35
  };
36
36
  reason: {
37
- type: _lssm_lib_schema46.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_contracts0.EventSpec<_lssm_lib_schema46.SchemaModel<{
41
+ declare const AssistantAnswerDeliveredEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
42
42
  traceId: {
43
- type: _lssm_lib_schema46.FieldType<string, string>;
43
+ type: _lssm_lib_schema0.FieldType<string, string>;
44
44
  isOptional: false;
45
45
  };
46
46
  locale: {
47
- type: _lssm_lib_schema46.FieldType<string, string>;
47
+ type: _lssm_lib_schema0.FieldType<string, string>;
48
48
  isOptional: false;
49
49
  };
50
50
  jurisdiction: {
51
- type: _lssm_lib_schema46.FieldType<string, string>;
51
+ type: _lssm_lib_schema0.FieldType<string, string>;
52
52
  isOptional: false;
53
53
  };
54
54
  kbSnapshotId: {
55
- type: _lssm_lib_schema46.FieldType<string, string>;
55
+ type: _lssm_lib_schema0.FieldType<string, string>;
56
56
  isOptional: false;
57
57
  };
58
58
  allowedScope: {
59
- type: _lssm_lib_schema46.FieldType<string, string>;
59
+ type: _lssm_lib_schema0.FieldType<string, string>;
60
60
  isOptional: false;
61
61
  };
62
62
  citationsCount: {
63
- type: _lssm_lib_schema46.FieldType<number, number>;
63
+ type: _lssm_lib_schema0.FieldType<number, number>;
64
64
  isOptional: false;
65
65
  };
66
66
  }>>;
package/dist/events.js CHANGED
@@ -1 +1,102 @@
1
- import{n as e}from"./libs/contracts/dist/schema/dist/SchemaModel.js";import{e as t}from"./libs/contracts/dist/events.js";import"./libs/contracts/dist/index.js";import{l as n}from"./libs/schema/dist/ScalarTypeEnum.js";import"./libs/schema/dist/index.js";const r=t({name:`assistant.answer.requested`,version:1,description:`Assistant answer requested (policy gate will run).`,payload:e({name:`AssistantAnswerRequestedPayload`,description:`Emitted when an assistant answer is requested (pre-gate).`,fields:{traceId:{type:n.String_unsecure(),isOptional:!1},locale:{type:n.String_unsecure(),isOptional:!1},jurisdiction:{type:n.String_unsecure(),isOptional:!1},kbSnapshotId:{type:n.String_unsecure(),isOptional:!1},allowedScope:{type:n.String_unsecure(),isOptional:!1}}})}),i=t({name:`assistant.answer.blocked`,version:1,description:`Assistant answer blocked (fail-closed).`,payload:e({name:`AssistantAnswerBlockedPayload`,description:`Emitted when a request is blocked by the gate.`,fields:{traceId:{type:n.String_unsecure(),isOptional:!1},reasonCode:{type:n.String_unsecure(),isOptional:!1},reason:{type:n.String_unsecure(),isOptional:!1}}})}),a=t({name:`assistant.answer.delivered`,version:1,description:`Assistant answer delivered (must include KB snapshot citations).`,payload:e({name:`AssistantAnswerDeliveredPayload`,description:`Emitted when a structured, cited answer is delivered.`,fields:{traceId:{type:n.String_unsecure(),isOptional:!1},locale:{type:n.String_unsecure(),isOptional:!1},jurisdiction:{type:n.String_unsecure(),isOptional:!1},kbSnapshotId:{type:n.String_unsecure(),isOptional:!1},allowedScope:{type:n.String_unsecure(),isOptional:!1},citationsCount:{type:n.Int_unsecure(),isOptional:!1}}})});export{i as AssistantAnswerBlockedEvent,a as AssistantAnswerDeliveredEvent,r as AssistantAnswerRequestedEvent};
1
+ import { defineSchemaModel } from "./libs/contracts/dist/schema/dist/SchemaModel.js";
2
+ import { defineEvent } from "./libs/contracts/dist/events.js";
3
+ import "./libs/contracts/dist/index.js";
4
+ import { ScalarTypeEnum } from "./libs/schema/dist/ScalarTypeEnum.js";
5
+ import "./libs/schema/dist/index.js";
6
+
7
+ //#region src/events.ts
8
+ const AssistantAnswerRequestedPayload = defineSchemaModel({
9
+ name: "AssistantAnswerRequestedPayload",
10
+ description: "Emitted when an assistant answer is requested (pre-gate).",
11
+ fields: {
12
+ traceId: {
13
+ type: ScalarTypeEnum.String_unsecure(),
14
+ isOptional: false
15
+ },
16
+ locale: {
17
+ type: ScalarTypeEnum.String_unsecure(),
18
+ isOptional: false
19
+ },
20
+ jurisdiction: {
21
+ type: ScalarTypeEnum.String_unsecure(),
22
+ isOptional: false
23
+ },
24
+ kbSnapshotId: {
25
+ type: ScalarTypeEnum.String_unsecure(),
26
+ isOptional: false
27
+ },
28
+ allowedScope: {
29
+ type: ScalarTypeEnum.String_unsecure(),
30
+ isOptional: false
31
+ }
32
+ }
33
+ });
34
+ const AssistantAnswerRequestedEvent = defineEvent({
35
+ name: "assistant.answer.requested",
36
+ version: 1,
37
+ description: "Assistant answer requested (policy gate will run).",
38
+ payload: AssistantAnswerRequestedPayload
39
+ });
40
+ const AssistantAnswerBlockedPayload = defineSchemaModel({
41
+ name: "AssistantAnswerBlockedPayload",
42
+ description: "Emitted when a request is blocked by the gate.",
43
+ fields: {
44
+ traceId: {
45
+ type: ScalarTypeEnum.String_unsecure(),
46
+ isOptional: false
47
+ },
48
+ reasonCode: {
49
+ type: ScalarTypeEnum.String_unsecure(),
50
+ isOptional: false
51
+ },
52
+ reason: {
53
+ type: ScalarTypeEnum.String_unsecure(),
54
+ isOptional: false
55
+ }
56
+ }
57
+ });
58
+ const AssistantAnswerBlockedEvent = defineEvent({
59
+ name: "assistant.answer.blocked",
60
+ version: 1,
61
+ description: "Assistant answer blocked (fail-closed).",
62
+ payload: AssistantAnswerBlockedPayload
63
+ });
64
+ const AssistantAnswerDeliveredPayload = defineSchemaModel({
65
+ name: "AssistantAnswerDeliveredPayload",
66
+ description: "Emitted when a structured, cited answer is delivered.",
67
+ fields: {
68
+ traceId: {
69
+ type: ScalarTypeEnum.String_unsecure(),
70
+ isOptional: false
71
+ },
72
+ locale: {
73
+ type: ScalarTypeEnum.String_unsecure(),
74
+ isOptional: false
75
+ },
76
+ jurisdiction: {
77
+ type: ScalarTypeEnum.String_unsecure(),
78
+ isOptional: false
79
+ },
80
+ kbSnapshotId: {
81
+ type: ScalarTypeEnum.String_unsecure(),
82
+ isOptional: false
83
+ },
84
+ allowedScope: {
85
+ type: ScalarTypeEnum.String_unsecure(),
86
+ isOptional: false
87
+ },
88
+ citationsCount: {
89
+ type: ScalarTypeEnum.Int_unsecure(),
90
+ isOptional: false
91
+ }
92
+ }
93
+ });
94
+ const AssistantAnswerDeliveredEvent = defineEvent({
95
+ name: "assistant.answer.delivered",
96
+ version: 1,
97
+ description: "Assistant answer delivered (must include KB snapshot citations).",
98
+ payload: AssistantAnswerDeliveredPayload
99
+ });
100
+
101
+ //#endregion
102
+ export { AssistantAnswerBlockedEvent, AssistantAnswerDeliveredEvent, AssistantAnswerRequestedEvent };
package/dist/example.js CHANGED
@@ -1 +1,39 @@
1
- var e={id:`locale-jurisdiction-gate`,title:`Locale / Jurisdiction Gate`,summary:`Fail-closed gating for assistant calls: locale + jurisdiction + kbSnapshotId + allowedScope must be explicit, answers must cite a snapshot.`,tags:[`policy`,`locale`,`jurisdiction`,`assistant`,`gating`],kind:`knowledge`,visibility:`public`,docs:{rootDocId:`docs.examples.locale-jurisdiction-gate`},entrypoints:{packageName:`@lssm/example.locale-jurisdiction-gate`,feature:`./feature`,contracts:`./contracts`,handlers:`./handlers`,docs:`./docs`},surfaces:{templates:!0,sandbox:{enabled:!0,modes:[`markdown`,`specs`]},studio:{enabled:!0,installable:!0},mcp:{enabled:!0}}};export{e as default};
1
+ //#region src/example.ts
2
+ const example = {
3
+ id: "locale-jurisdiction-gate",
4
+ title: "Locale / Jurisdiction Gate",
5
+ summary: "Fail-closed gating for assistant calls: locale + jurisdiction + kbSnapshotId + allowedScope must be explicit, answers must cite a snapshot.",
6
+ tags: [
7
+ "policy",
8
+ "locale",
9
+ "jurisdiction",
10
+ "assistant",
11
+ "gating"
12
+ ],
13
+ kind: "knowledge",
14
+ visibility: "public",
15
+ docs: { rootDocId: "docs.examples.locale-jurisdiction-gate" },
16
+ entrypoints: {
17
+ packageName: "@lssm/example.locale-jurisdiction-gate",
18
+ feature: "./feature",
19
+ contracts: "./contracts",
20
+ handlers: "./handlers",
21
+ docs: "./docs"
22
+ },
23
+ surfaces: {
24
+ templates: true,
25
+ sandbox: {
26
+ enabled: true,
27
+ modes: ["markdown", "specs"]
28
+ },
29
+ studio: {
30
+ enabled: true,
31
+ installable: true
32
+ },
33
+ mcp: { enabled: true }
34
+ }
35
+ };
36
+ var example_default = example;
37
+
38
+ //#endregion
39
+ export { example_default as default };