@lssm/example.locale-jurisdiction-gate 0.0.0-canary-20251220041653 → 0.0.0-canary-20251221114240

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 (42) hide show
  1. package/.turbo/turbo-build$colon$bundle.log +42 -39
  2. package/.turbo/turbo-build.log +46 -43
  3. package/CHANGELOG.md +3 -3
  4. package/dist/entities/models.d.ts +48 -48
  5. package/dist/index.d.ts +1 -1
  6. package/dist/index.js +2 -2
  7. package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +6 -6
  8. package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js.map +1 -1
  9. package/dist/libs/contracts/dist/index.js +3 -1
  10. package/dist/libs/contracts/dist/integrations/contracts.js +1 -1
  11. package/dist/libs/contracts/dist/integrations/contracts.js.map +1 -1
  12. package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +1 -1
  13. package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js.map +1 -1
  14. package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +1 -1
  15. package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js.map +1 -1
  16. package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +1 -1
  17. package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js.map +1 -1
  18. package/dist/libs/contracts/dist/knowledge/contracts.js +1 -1
  19. package/dist/libs/contracts/dist/knowledge/contracts.js.map +1 -1
  20. package/dist/libs/contracts/dist/llm/exporters.js.map +1 -1
  21. package/dist/libs/contracts/dist/onboarding-base.js +1 -1
  22. package/dist/libs/contracts/dist/onboarding-base.js.map +1 -1
  23. package/dist/libs/contracts/dist/{spec.js → operation.js} +2 -2
  24. package/dist/libs/contracts/dist/operation.js.map +1 -0
  25. package/dist/libs/contracts/dist/workspace-config/contractsrc-schema.js +98 -0
  26. package/dist/libs/contracts/dist/workspace-config/contractsrc-schema.js.map +1 -0
  27. package/dist/libs/contracts/dist/workspace-config/index.js +1 -0
  28. package/dist/operations/assistant.d.ts +245 -0
  29. package/dist/operations/assistant.d.ts.map +1 -0
  30. package/dist/{contracts → operations}/assistant.js +2 -2
  31. package/dist/operations/assistant.js.map +1 -0
  32. package/package.json +7 -7
  33. package/src/index.ts +1 -1
  34. package/tsconfig.tsbuildinfo +1 -1
  35. package/dist/contracts/assistant.d.ts +0 -245
  36. package/dist/contracts/assistant.d.ts.map +0 -1
  37. package/dist/contracts/assistant.js.map +0 -1
  38. package/dist/libs/contracts/dist/spec.js.map +0 -1
  39. /package/dist/{contracts → operations}/index.d.ts +0 -0
  40. /package/dist/{contracts → operations}/index.js +0 -0
  41. /package/src/{contracts → operations}/assistant.ts +0 -0
  42. /package/src/{contracts → operations}/index.ts +0 -0
@@ -1,245 +0,0 @@
1
- import * as _lssm_lib_schema16 from "@lssm/lib.schema";
2
- import * as _lssm_lib_contracts2 from "@lssm/lib.contracts";
3
-
4
- //#region src/contracts/assistant.d.ts
5
- declare const AssistantAnswerContract: _lssm_lib_contracts2.ContractSpec<_lssm_lib_schema16.SchemaModel<{
6
- envelope: {
7
- type: _lssm_lib_schema16.SchemaModel<{
8
- traceId: {
9
- type: _lssm_lib_schema16.FieldType<string, string>;
10
- isOptional: false;
11
- };
12
- locale: {
13
- type: _lssm_lib_schema16.FieldType<string, string>;
14
- isOptional: false;
15
- };
16
- regulatoryContext: {
17
- type: _lssm_lib_schema16.SchemaModel<{
18
- jurisdiction: {
19
- type: _lssm_lib_schema16.FieldType<string, string>;
20
- isOptional: false;
21
- };
22
- region: {
23
- type: _lssm_lib_schema16.FieldType<string, string>;
24
- isOptional: true;
25
- };
26
- clientType: {
27
- type: _lssm_lib_schema16.FieldType<string, string>;
28
- isOptional: true;
29
- };
30
- allowedScope: {
31
- type: _lssm_lib_schema16.EnumType<[string, string, string]>;
32
- isOptional: false;
33
- };
34
- }>;
35
- isOptional: false;
36
- };
37
- kbSnapshotId: {
38
- type: _lssm_lib_schema16.FieldType<string, string>;
39
- isOptional: false;
40
- };
41
- allowedScope: {
42
- type: _lssm_lib_schema16.EnumType<[string, string, string]>;
43
- isOptional: false;
44
- };
45
- }>;
46
- isOptional: false;
47
- };
48
- question: {
49
- type: _lssm_lib_schema16.FieldType<string, string>;
50
- isOptional: false;
51
- };
52
- }>, _lssm_lib_schema16.SchemaModel<{
53
- locale: {
54
- type: _lssm_lib_schema16.FieldType<string, string>;
55
- isOptional: false;
56
- };
57
- jurisdiction: {
58
- type: _lssm_lib_schema16.FieldType<string, string>;
59
- isOptional: false;
60
- };
61
- allowedScope: {
62
- type: _lssm_lib_schema16.EnumType<[string, string, string]>;
63
- isOptional: false;
64
- };
65
- sections: {
66
- type: _lssm_lib_schema16.SchemaModel<{
67
- heading: {
68
- type: _lssm_lib_schema16.FieldType<string, string>;
69
- isOptional: false;
70
- };
71
- body: {
72
- type: _lssm_lib_schema16.FieldType<string, string>;
73
- isOptional: false;
74
- };
75
- }>;
76
- isArray: true;
77
- isOptional: false;
78
- };
79
- citations: {
80
- type: _lssm_lib_schema16.SchemaModel<{
81
- kbSnapshotId: {
82
- type: _lssm_lib_schema16.FieldType<string, string>;
83
- isOptional: false;
84
- };
85
- sourceType: {
86
- type: _lssm_lib_schema16.FieldType<string, string>;
87
- isOptional: false;
88
- };
89
- sourceId: {
90
- type: _lssm_lib_schema16.FieldType<string, string>;
91
- isOptional: false;
92
- };
93
- title: {
94
- type: _lssm_lib_schema16.FieldType<string, string>;
95
- isOptional: true;
96
- };
97
- excerpt: {
98
- type: _lssm_lib_schema16.FieldType<string, string>;
99
- isOptional: true;
100
- };
101
- }>;
102
- isArray: true;
103
- isOptional: false;
104
- };
105
- disclaimers: {
106
- type: _lssm_lib_schema16.FieldType<string, string>;
107
- isArray: true;
108
- isOptional: true;
109
- };
110
- riskFlags: {
111
- type: _lssm_lib_schema16.FieldType<string, string>;
112
- isArray: true;
113
- isOptional: true;
114
- };
115
- refused: {
116
- type: _lssm_lib_schema16.FieldType<boolean, boolean>;
117
- isOptional: true;
118
- };
119
- refusalReason: {
120
- type: _lssm_lib_schema16.FieldType<string, string>;
121
- isOptional: true;
122
- };
123
- }>, undefined>;
124
- declare const AssistantExplainConceptContract: _lssm_lib_contracts2.ContractSpec<_lssm_lib_schema16.SchemaModel<{
125
- envelope: {
126
- type: _lssm_lib_schema16.SchemaModel<{
127
- traceId: {
128
- type: _lssm_lib_schema16.FieldType<string, string>;
129
- isOptional: false;
130
- };
131
- locale: {
132
- type: _lssm_lib_schema16.FieldType<string, string>;
133
- isOptional: false;
134
- };
135
- regulatoryContext: {
136
- type: _lssm_lib_schema16.SchemaModel<{
137
- jurisdiction: {
138
- type: _lssm_lib_schema16.FieldType<string, string>;
139
- isOptional: false;
140
- };
141
- region: {
142
- type: _lssm_lib_schema16.FieldType<string, string>;
143
- isOptional: true;
144
- };
145
- clientType: {
146
- type: _lssm_lib_schema16.FieldType<string, string>;
147
- isOptional: true;
148
- };
149
- allowedScope: {
150
- type: _lssm_lib_schema16.EnumType<[string, string, string]>;
151
- isOptional: false;
152
- };
153
- }>;
154
- isOptional: false;
155
- };
156
- kbSnapshotId: {
157
- type: _lssm_lib_schema16.FieldType<string, string>;
158
- isOptional: false;
159
- };
160
- allowedScope: {
161
- type: _lssm_lib_schema16.EnumType<[string, string, string]>;
162
- isOptional: false;
163
- };
164
- }>;
165
- isOptional: false;
166
- };
167
- conceptKey: {
168
- type: _lssm_lib_schema16.FieldType<string, string>;
169
- isOptional: false;
170
- };
171
- }>, _lssm_lib_schema16.SchemaModel<{
172
- locale: {
173
- type: _lssm_lib_schema16.FieldType<string, string>;
174
- isOptional: false;
175
- };
176
- jurisdiction: {
177
- type: _lssm_lib_schema16.FieldType<string, string>;
178
- isOptional: false;
179
- };
180
- allowedScope: {
181
- type: _lssm_lib_schema16.EnumType<[string, string, string]>;
182
- isOptional: false;
183
- };
184
- sections: {
185
- type: _lssm_lib_schema16.SchemaModel<{
186
- heading: {
187
- type: _lssm_lib_schema16.FieldType<string, string>;
188
- isOptional: false;
189
- };
190
- body: {
191
- type: _lssm_lib_schema16.FieldType<string, string>;
192
- isOptional: false;
193
- };
194
- }>;
195
- isArray: true;
196
- isOptional: false;
197
- };
198
- citations: {
199
- type: _lssm_lib_schema16.SchemaModel<{
200
- kbSnapshotId: {
201
- type: _lssm_lib_schema16.FieldType<string, string>;
202
- isOptional: false;
203
- };
204
- sourceType: {
205
- type: _lssm_lib_schema16.FieldType<string, string>;
206
- isOptional: false;
207
- };
208
- sourceId: {
209
- type: _lssm_lib_schema16.FieldType<string, string>;
210
- isOptional: false;
211
- };
212
- title: {
213
- type: _lssm_lib_schema16.FieldType<string, string>;
214
- isOptional: true;
215
- };
216
- excerpt: {
217
- type: _lssm_lib_schema16.FieldType<string, string>;
218
- isOptional: true;
219
- };
220
- }>;
221
- isArray: true;
222
- isOptional: false;
223
- };
224
- disclaimers: {
225
- type: _lssm_lib_schema16.FieldType<string, string>;
226
- isArray: true;
227
- isOptional: true;
228
- };
229
- riskFlags: {
230
- type: _lssm_lib_schema16.FieldType<string, string>;
231
- isArray: true;
232
- isOptional: true;
233
- };
234
- refused: {
235
- type: _lssm_lib_schema16.FieldType<boolean, boolean>;
236
- isOptional: true;
237
- };
238
- refusalReason: {
239
- type: _lssm_lib_schema16.FieldType<string, string>;
240
- isOptional: true;
241
- };
242
- }>, undefined>;
243
- //#endregion
244
- export { AssistantAnswerContract, AssistantExplainConceptContract };
245
- //# sourceMappingURL=assistant.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"assistant.d.ts","names":[],"sources":["../../src/contracts/assistant.ts"],"sourcesContent":[],"mappings":";;;;cA0Ba,8CAAuB,gCAAA;;;;QAAvB,IAAA,EAmDX,kBAAA,CAAA,SAAA,CAAA,MAAA,EAAA,MAAA,CAAA;QAAA,UAAA,EAAA,KAAA;;;;;;;;;;;UAnDkC,CAAA;UAAA,MAAA,EAAA;;;;;;;;;;;;;;;;;kBAAA,EAAA,KAAA;MAAA,CAAA;MAqDvB,YAAA,EAAA;QAkBX,IAAA,6BAAA,CAAA,CAAA,MAAA,EAAA,MAAA,EAAA,MAAA,CAAA,CAAA;;;;;;;;;;;;IAlB0C,IAAA,EArDR,kBAAA,CAAA,SAqDQ,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;;;;;;;;;;;;;QAAA,IAAA,8BAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAA/B,sDAA+B,gCAAA;;;;cAkB1C,kBAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAlB0C,kBAAA,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"assistant.js","names":["defineSchemaModel","ScalarTypeEnum"],"sources":["../../src/contracts/assistant.ts"],"sourcesContent":["import { defineCommand } from '@lssm/lib.contracts';\nimport { ScalarTypeEnum, defineSchemaModel } from '@lssm/lib.schema';\n\nimport {\n AssistantAnswerIRModel,\n LLMCallEnvelopeModel,\n} from '../entities/models';\n\nconst AssistantQuestionInput = defineSchemaModel({\n name: 'AssistantQuestionInput',\n description: 'Input for assistant calls with mandatory envelope.',\n fields: {\n envelope: { type: LLMCallEnvelopeModel, isOptional: false },\n question: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n});\n\nconst AssistantConceptInput = defineSchemaModel({\n name: 'AssistantConceptInput',\n description: 'Input for explaining a concept with mandatory envelope.',\n fields: {\n envelope: { type: LLMCallEnvelopeModel, isOptional: false },\n conceptKey: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n});\n\nexport const AssistantAnswerContract = defineCommand({\n meta: {\n name: 'assistant.answer',\n version: 1,\n stability: 'experimental',\n owners: ['examples'],\n tags: ['assistant', 'policy', 'locale', 'jurisdiction', 'knowledge'],\n description:\n 'Answer a user question using a KB snapshot with strict locale/jurisdiction gating.',\n goal: 'Provide policy-safe answers that cite a KB snapshot or refuse.',\n context:\n 'Called by UI or workflows; must fail-closed if envelope is invalid or citations are missing.',\n },\n io: {\n input: AssistantQuestionInput,\n output: AssistantAnswerIRModel,\n errors: {\n LOCALE_REQUIRED: {\n description: 'Locale is required and must be supported',\n http: 400,\n gqlCode: 'LOCALE_REQUIRED',\n when: 'locale is missing or unsupported',\n },\n JURISDICTION_REQUIRED: {\n description: 'Jurisdiction is required',\n http: 400,\n gqlCode: 'JURISDICTION_REQUIRED',\n when: 'jurisdiction is missing',\n },\n KB_SNAPSHOT_REQUIRED: {\n description: 'KB snapshot id is required',\n http: 400,\n gqlCode: 'KB_SNAPSHOT_REQUIRED',\n when: 'kbSnapshotId is missing',\n },\n CITATIONS_REQUIRED: {\n description: 'Answers must include citations to a KB snapshot',\n http: 422,\n gqlCode: 'CITATIONS_REQUIRED',\n when: 'answer has no citations',\n },\n SCOPE_VIOLATION: {\n description:\n 'Answer violates allowed scope and must be refused/escalated',\n http: 403,\n gqlCode: 'SCOPE_VIOLATION',\n when: 'output includes forbidden content under the given allowedScope',\n },\n },\n },\n policy: { auth: 'user' },\n});\n\nexport const AssistantExplainConceptContract = defineCommand({\n meta: {\n name: 'assistant.explainConcept',\n version: 1,\n stability: 'experimental',\n owners: ['examples'],\n tags: ['assistant', 'policy', 'knowledge', 'concepts'],\n description:\n 'Explain a concept using a KB snapshot with strict locale/jurisdiction gating.',\n goal: 'Explain concepts with citations or refuse.',\n context: 'Same constraints as assistant.answer.',\n },\n io: {\n input: AssistantConceptInput,\n output: AssistantAnswerIRModel,\n errors: AssistantAnswerContract.io.errors,\n },\n policy: { auth: 'user' },\n});\n"],"mappings":";;;;;;AAQA,MAAM,yBAAyBA,GAAkB;CAC/C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,UAAU;GAAE,MAAM;GAAsB,YAAY;GAAO;EAC3D,UAAU;GAAE,MAAMC,GAAe,iBAAiB;GAAE,YAAY;GAAO;EACxE;CACF,CAAC;AAEF,MAAM,wBAAwBD,GAAkB;CAC9C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,UAAU;GAAE,MAAM;GAAsB,YAAY;GAAO;EAC3D,YAAY;GAAE,MAAMC,GAAe,iBAAiB;GAAE,YAAY;GAAO;EAC1E;CACF,CAAC;AAEF,MAAa,0BAA0B,cAAc;CACnD,MAAM;EACJ,MAAM;EACN,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,WAAW;EACpB,MAAM;GAAC;GAAa;GAAU;GAAU;GAAgB;GAAY;EACpE,aACE;EACF,MAAM;EACN,SACE;EACH;CACD,IAAI;EACF,OAAO;EACP,QAAQ;EACR,QAAQ;GACN,iBAAiB;IACf,aAAa;IACb,MAAM;IACN,SAAS;IACT,MAAM;IACP;GACD,uBAAuB;IACrB,aAAa;IACb,MAAM;IACN,SAAS;IACT,MAAM;IACP;GACD,sBAAsB;IACpB,aAAa;IACb,MAAM;IACN,SAAS;IACT,MAAM;IACP;GACD,oBAAoB;IAClB,aAAa;IACb,MAAM;IACN,SAAS;IACT,MAAM;IACP;GACD,iBAAiB;IACf,aACE;IACF,MAAM;IACN,SAAS;IACT,MAAM;IACP;GACF;EACF;CACD,QAAQ,EAAE,MAAM,QAAQ;CACzB,CAAC;AAEF,MAAa,kCAAkC,cAAc;CAC3D,MAAM;EACJ,MAAM;EACN,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,WAAW;EACpB,MAAM;GAAC;GAAa;GAAU;GAAa;GAAW;EACtD,aACE;EACF,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO;EACP,QAAQ;EACR,QAAQ,wBAAwB,GAAG;EACpC;CACD,QAAQ,EAAE,MAAM,QAAQ;CACzB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"spec.js","names":[],"sources":["../../../../../../libs/contracts/dist/spec.js"],"sourcesContent":["//#region src/spec.ts\nconst isEmitDeclRef = (e) => \"ref\" in e;\n/**\n* Helper to define a Command (write operation).\n* Sets `kind: 'command'` and defaults `idempotent: false`.\n*/\nconst defineCommand = (spec) => ({\n\t...spec,\n\tmeta: {\n\t\t...spec.meta,\n\t\tkind: \"command\"\n\t},\n\tpolicy: {\n\t\t...spec.policy,\n\t\tidempotent: spec.policy?.[\"policy\"]?.idempotent ?? false\n\t}\n});\n/**\n* Helper to define a Query (read-only operation).\n* Sets `kind: 'query'` and forces `idempotent: true`.\n*/\nconst defineQuery = (spec) => ({\n\t...spec,\n\tmeta: {\n\t\t...spec.meta,\n\t\tkind: \"query\"\n\t},\n\tpolicy: {\n\t\t...spec.policy,\n\t\tidempotent: true\n\t}\n});\n\n//#endregion\nexport { defineCommand, defineQuery, isEmitDeclRef };"],"mappings":";;;;;AAMA,MAAM,iBAAiB,UAAU;CAChC,GAAG;CACH,MAAM;EACL,GAAG,KAAK;EACR,MAAM;EACN;CACD,QAAQ;EACP,GAAG,KAAK;EACR,YAAY,KAAK,SAAS,WAAW,cAAc;EACnD;CACD;;;;;AAKD,MAAM,eAAe,UAAU;CAC9B,GAAG;CACH,MAAM;EACL,GAAG,KAAK;EACR,MAAM;EACN;CACD,QAAQ;EACP,GAAG,KAAK;EACR,YAAY;EACZ;CACD"}
File without changes
File without changes
File without changes
File without changes