@lssm/example.versioned-knowledge-base 0.0.0-canary-20251217063201 → 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 (141) hide show
  1. package/.turbo/turbo-build$colon$bundle.log +225 -191
  2. package/.turbo/turbo-build.log +226 -37
  3. package/CHANGELOG.md +3 -3
  4. package/dist/contracts/index.js +3 -1
  5. package/dist/contracts/kb.d.ts +70 -70
  6. package/dist/contracts/kb.js +253 -1
  7. package/dist/docs/index.js +1 -1
  8. package/dist/docs/versioned-knowledge-base.docblock.js +29 -18
  9. package/dist/entities/index.js +3 -1
  10. package/dist/entities/models.d.ts +36 -36
  11. package/dist/entities/models.js +152 -1
  12. package/dist/events.d.ts +17 -17
  13. package/dist/events.js +106 -1
  14. package/dist/example.js +41 -1
  15. package/dist/handlers/index.js +3 -1
  16. package/dist/handlers/memory.handlers.js +103 -1
  17. package/dist/index.js +11 -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 +2 -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/versioned-knowledge-base.feature.js +66 -1
  140. package/package.json +5 -5
  141. package/tsconfig.tsbuildinfo +1 -1
@@ -1,118 +1,118 @@
1
- import * as _lssm_lib_schema50 from "@lssm/lib.schema";
1
+ import * as _lssm_lib_schema15 from "@lssm/lib.schema";
2
2
  import * as _lssm_lib_contracts3 from "@lssm/lib.contracts";
3
3
 
4
4
  //#region src/contracts/kb.d.ts
5
- declare const KbIngestSourceContract: _lssm_lib_contracts3.ContractSpec<_lssm_lib_schema50.SchemaModel<{
5
+ declare const KbIngestSourceContract: _lssm_lib_contracts3.ContractSpec<_lssm_lib_schema15.SchemaModel<{
6
6
  jurisdiction: {
7
- type: _lssm_lib_schema50.FieldType<string, string>;
7
+ type: _lssm_lib_schema15.FieldType<string, string>;
8
8
  isOptional: false;
9
9
  };
10
10
  authority: {
11
- type: _lssm_lib_schema50.FieldType<string, string>;
11
+ type: _lssm_lib_schema15.FieldType<string, string>;
12
12
  isOptional: false;
13
13
  };
14
14
  title: {
15
- type: _lssm_lib_schema50.FieldType<string, string>;
15
+ type: _lssm_lib_schema15.FieldType<string, string>;
16
16
  isOptional: false;
17
17
  };
18
18
  fetchedAt: {
19
- type: _lssm_lib_schema50.FieldType<Date, string>;
19
+ type: _lssm_lib_schema15.FieldType<Date, string>;
20
20
  isOptional: false;
21
21
  };
22
22
  hash: {
23
- type: _lssm_lib_schema50.FieldType<string, string>;
23
+ type: _lssm_lib_schema15.FieldType<string, string>;
24
24
  isOptional: false;
25
25
  };
26
26
  fileId: {
27
- type: _lssm_lib_schema50.FieldType<string, string>;
27
+ type: _lssm_lib_schema15.FieldType<string, string>;
28
28
  isOptional: false;
29
29
  };
30
- }>, _lssm_lib_schema50.SchemaModel<{
30
+ }>, _lssm_lib_schema15.SchemaModel<{
31
31
  id: {
32
- type: _lssm_lib_schema50.FieldType<string, string>;
32
+ type: _lssm_lib_schema15.FieldType<string, string>;
33
33
  isOptional: false;
34
34
  };
35
35
  jurisdiction: {
36
- type: _lssm_lib_schema50.FieldType<string, string>;
36
+ type: _lssm_lib_schema15.FieldType<string, string>;
37
37
  isOptional: false;
38
38
  };
39
39
  authority: {
40
- type: _lssm_lib_schema50.FieldType<string, string>;
40
+ type: _lssm_lib_schema15.FieldType<string, string>;
41
41
  isOptional: false;
42
42
  };
43
43
  title: {
44
- type: _lssm_lib_schema50.FieldType<string, string>;
44
+ type: _lssm_lib_schema15.FieldType<string, string>;
45
45
  isOptional: false;
46
46
  };
47
47
  fetchedAt: {
48
- type: _lssm_lib_schema50.FieldType<Date, string>;
48
+ type: _lssm_lib_schema15.FieldType<Date, string>;
49
49
  isOptional: false;
50
50
  };
51
51
  hash: {
52
- type: _lssm_lib_schema50.FieldType<string, string>;
52
+ type: _lssm_lib_schema15.FieldType<string, string>;
53
53
  isOptional: false;
54
54
  };
55
55
  fileId: {
56
- type: _lssm_lib_schema50.FieldType<string, string>;
56
+ type: _lssm_lib_schema15.FieldType<string, string>;
57
57
  isOptional: false;
58
58
  };
59
59
  }>, undefined>;
60
- declare const KbUpsertRuleVersionContract: _lssm_lib_contracts3.ContractSpec<_lssm_lib_schema50.SchemaModel<{
60
+ declare const KbUpsertRuleVersionContract: _lssm_lib_contracts3.ContractSpec<_lssm_lib_schema15.SchemaModel<{
61
61
  ruleId: {
62
- type: _lssm_lib_schema50.FieldType<string, string>;
62
+ type: _lssm_lib_schema15.FieldType<string, string>;
63
63
  isOptional: false;
64
64
  };
65
65
  content: {
66
- type: _lssm_lib_schema50.FieldType<string, string>;
66
+ type: _lssm_lib_schema15.FieldType<string, string>;
67
67
  isOptional: false;
68
68
  };
69
69
  sourceRefs: {
70
- type: _lssm_lib_schema50.SchemaModel<{
70
+ type: _lssm_lib_schema15.SchemaModel<{
71
71
  sourceDocumentId: {
72
- type: _lssm_lib_schema50.FieldType<string, string>;
72
+ type: _lssm_lib_schema15.FieldType<string, string>;
73
73
  isOptional: false;
74
74
  };
75
75
  excerpt: {
76
- type: _lssm_lib_schema50.FieldType<string, string>;
76
+ type: _lssm_lib_schema15.FieldType<string, string>;
77
77
  isOptional: true;
78
78
  };
79
79
  }>;
80
80
  isArray: true;
81
81
  isOptional: false;
82
82
  };
83
- }>, _lssm_lib_schema50.SchemaModel<{
83
+ }>, _lssm_lib_schema15.SchemaModel<{
84
84
  id: {
85
- type: _lssm_lib_schema50.FieldType<string, string>;
85
+ type: _lssm_lib_schema15.FieldType<string, string>;
86
86
  isOptional: false;
87
87
  };
88
88
  ruleId: {
89
- type: _lssm_lib_schema50.FieldType<string, string>;
89
+ type: _lssm_lib_schema15.FieldType<string, string>;
90
90
  isOptional: false;
91
91
  };
92
92
  jurisdiction: {
93
- type: _lssm_lib_schema50.FieldType<string, string>;
93
+ type: _lssm_lib_schema15.FieldType<string, string>;
94
94
  isOptional: false;
95
95
  };
96
96
  topicKey: {
97
- type: _lssm_lib_schema50.FieldType<string, string>;
97
+ type: _lssm_lib_schema15.FieldType<string, string>;
98
98
  isOptional: false;
99
99
  };
100
100
  version: {
101
- type: _lssm_lib_schema50.FieldType<number, number>;
101
+ type: _lssm_lib_schema15.FieldType<number, number>;
102
102
  isOptional: false;
103
103
  };
104
104
  content: {
105
- type: _lssm_lib_schema50.FieldType<string, string>;
105
+ type: _lssm_lib_schema15.FieldType<string, string>;
106
106
  isOptional: false;
107
107
  };
108
108
  sourceRefs: {
109
- type: _lssm_lib_schema50.SchemaModel<{
109
+ type: _lssm_lib_schema15.SchemaModel<{
110
110
  sourceDocumentId: {
111
- type: _lssm_lib_schema50.FieldType<string, string>;
111
+ type: _lssm_lib_schema15.FieldType<string, string>;
112
112
  isOptional: false;
113
113
  };
114
114
  excerpt: {
115
- type: _lssm_lib_schema50.FieldType<string, string>;
115
+ type: _lssm_lib_schema15.FieldType<string, string>;
116
116
  isOptional: true;
117
117
  };
118
118
  }>;
@@ -120,64 +120,64 @@ declare const KbUpsertRuleVersionContract: _lssm_lib_contracts3.ContractSpec<_ls
120
120
  isOptional: false;
121
121
  };
122
122
  status: {
123
- type: _lssm_lib_schema50.FieldType<string, string>;
123
+ type: _lssm_lib_schema15.FieldType<string, string>;
124
124
  isOptional: false;
125
125
  };
126
126
  approvedBy: {
127
- type: _lssm_lib_schema50.FieldType<string, string>;
127
+ type: _lssm_lib_schema15.FieldType<string, string>;
128
128
  isOptional: true;
129
129
  };
130
130
  approvedAt: {
131
- type: _lssm_lib_schema50.FieldType<Date, string>;
131
+ type: _lssm_lib_schema15.FieldType<Date, string>;
132
132
  isOptional: true;
133
133
  };
134
134
  createdAt: {
135
- type: _lssm_lib_schema50.FieldType<Date, string>;
135
+ type: _lssm_lib_schema15.FieldType<Date, string>;
136
136
  isOptional: false;
137
137
  };
138
138
  }>, undefined>;
139
- declare const KbApproveRuleVersionContract: _lssm_lib_contracts3.ContractSpec<_lssm_lib_schema50.SchemaModel<{
139
+ declare const KbApproveRuleVersionContract: _lssm_lib_contracts3.ContractSpec<_lssm_lib_schema15.SchemaModel<{
140
140
  ruleVersionId: {
141
- type: _lssm_lib_schema50.FieldType<string, string>;
141
+ type: _lssm_lib_schema15.FieldType<string, string>;
142
142
  isOptional: false;
143
143
  };
144
144
  approver: {
145
- type: _lssm_lib_schema50.FieldType<string, string>;
145
+ type: _lssm_lib_schema15.FieldType<string, string>;
146
146
  isOptional: false;
147
147
  };
148
- }>, _lssm_lib_schema50.SchemaModel<{
148
+ }>, _lssm_lib_schema15.SchemaModel<{
149
149
  id: {
150
- type: _lssm_lib_schema50.FieldType<string, string>;
150
+ type: _lssm_lib_schema15.FieldType<string, string>;
151
151
  isOptional: false;
152
152
  };
153
153
  ruleId: {
154
- type: _lssm_lib_schema50.FieldType<string, string>;
154
+ type: _lssm_lib_schema15.FieldType<string, string>;
155
155
  isOptional: false;
156
156
  };
157
157
  jurisdiction: {
158
- type: _lssm_lib_schema50.FieldType<string, string>;
158
+ type: _lssm_lib_schema15.FieldType<string, string>;
159
159
  isOptional: false;
160
160
  };
161
161
  topicKey: {
162
- type: _lssm_lib_schema50.FieldType<string, string>;
162
+ type: _lssm_lib_schema15.FieldType<string, string>;
163
163
  isOptional: false;
164
164
  };
165
165
  version: {
166
- type: _lssm_lib_schema50.FieldType<number, number>;
166
+ type: _lssm_lib_schema15.FieldType<number, number>;
167
167
  isOptional: false;
168
168
  };
169
169
  content: {
170
- type: _lssm_lib_schema50.FieldType<string, string>;
170
+ type: _lssm_lib_schema15.FieldType<string, string>;
171
171
  isOptional: false;
172
172
  };
173
173
  sourceRefs: {
174
- type: _lssm_lib_schema50.SchemaModel<{
174
+ type: _lssm_lib_schema15.SchemaModel<{
175
175
  sourceDocumentId: {
176
- type: _lssm_lib_schema50.FieldType<string, string>;
176
+ type: _lssm_lib_schema15.FieldType<string, string>;
177
177
  isOptional: false;
178
178
  };
179
179
  excerpt: {
180
- type: _lssm_lib_schema50.FieldType<string, string>;
180
+ type: _lssm_lib_schema15.FieldType<string, string>;
181
181
  isOptional: true;
182
182
  };
183
183
  }>;
@@ -185,76 +185,76 @@ declare const KbApproveRuleVersionContract: _lssm_lib_contracts3.ContractSpec<_l
185
185
  isOptional: false;
186
186
  };
187
187
  status: {
188
- type: _lssm_lib_schema50.FieldType<string, string>;
188
+ type: _lssm_lib_schema15.FieldType<string, string>;
189
189
  isOptional: false;
190
190
  };
191
191
  approvedBy: {
192
- type: _lssm_lib_schema50.FieldType<string, string>;
192
+ type: _lssm_lib_schema15.FieldType<string, string>;
193
193
  isOptional: true;
194
194
  };
195
195
  approvedAt: {
196
- type: _lssm_lib_schema50.FieldType<Date, string>;
196
+ type: _lssm_lib_schema15.FieldType<Date, string>;
197
197
  isOptional: true;
198
198
  };
199
199
  createdAt: {
200
- type: _lssm_lib_schema50.FieldType<Date, string>;
200
+ type: _lssm_lib_schema15.FieldType<Date, string>;
201
201
  isOptional: false;
202
202
  };
203
203
  }>, undefined>;
204
- declare const KbPublishSnapshotContract: _lssm_lib_contracts3.ContractSpec<_lssm_lib_schema50.SchemaModel<{
204
+ declare const KbPublishSnapshotContract: _lssm_lib_contracts3.ContractSpec<_lssm_lib_schema15.SchemaModel<{
205
205
  jurisdiction: {
206
- type: _lssm_lib_schema50.FieldType<string, string>;
206
+ type: _lssm_lib_schema15.FieldType<string, string>;
207
207
  isOptional: false;
208
208
  };
209
209
  asOfDate: {
210
- type: _lssm_lib_schema50.FieldType<Date, string>;
210
+ type: _lssm_lib_schema15.FieldType<Date, string>;
211
211
  isOptional: false;
212
212
  };
213
- }>, _lssm_lib_schema50.SchemaModel<{
213
+ }>, _lssm_lib_schema15.SchemaModel<{
214
214
  id: {
215
- type: _lssm_lib_schema50.FieldType<string, string>;
215
+ type: _lssm_lib_schema15.FieldType<string, string>;
216
216
  isOptional: false;
217
217
  };
218
218
  jurisdiction: {
219
- type: _lssm_lib_schema50.FieldType<string, string>;
219
+ type: _lssm_lib_schema15.FieldType<string, string>;
220
220
  isOptional: false;
221
221
  };
222
222
  asOfDate: {
223
- type: _lssm_lib_schema50.FieldType<Date, string>;
223
+ type: _lssm_lib_schema15.FieldType<Date, string>;
224
224
  isOptional: false;
225
225
  };
226
226
  includedRuleVersionIds: {
227
- type: _lssm_lib_schema50.FieldType<string, string>;
227
+ type: _lssm_lib_schema15.FieldType<string, string>;
228
228
  isArray: true;
229
229
  isOptional: false;
230
230
  };
231
231
  publishedAt: {
232
- type: _lssm_lib_schema50.FieldType<Date, string>;
232
+ type: _lssm_lib_schema15.FieldType<Date, string>;
233
233
  isOptional: false;
234
234
  };
235
235
  }>, undefined>;
236
- declare const KbSearchContract: _lssm_lib_contracts3.ContractSpec<_lssm_lib_schema50.SchemaModel<{
236
+ declare const KbSearchContract: _lssm_lib_contracts3.ContractSpec<_lssm_lib_schema15.SchemaModel<{
237
237
  snapshotId: {
238
- type: _lssm_lib_schema50.FieldType<string, string>;
238
+ type: _lssm_lib_schema15.FieldType<string, string>;
239
239
  isOptional: false;
240
240
  };
241
241
  jurisdiction: {
242
- type: _lssm_lib_schema50.FieldType<string, string>;
242
+ type: _lssm_lib_schema15.FieldType<string, string>;
243
243
  isOptional: false;
244
244
  };
245
245
  query: {
246
- type: _lssm_lib_schema50.FieldType<string, string>;
246
+ type: _lssm_lib_schema15.FieldType<string, string>;
247
247
  isOptional: false;
248
248
  };
249
- }>, _lssm_lib_schema50.SchemaModel<{
249
+ }>, _lssm_lib_schema15.SchemaModel<{
250
250
  items: {
251
- type: _lssm_lib_schema50.SchemaModel<{
251
+ type: _lssm_lib_schema15.SchemaModel<{
252
252
  ruleVersionId: {
253
- type: _lssm_lib_schema50.FieldType<string, string>;
253
+ type: _lssm_lib_schema15.FieldType<string, string>;
254
254
  isOptional: false;
255
255
  };
256
256
  excerpt: {
257
- type: _lssm_lib_schema50.FieldType<string, string>;
257
+ type: _lssm_lib_schema15.FieldType<string, string>;
258
258
  isOptional: true;
259
259
  };
260
260
  }>;
@@ -1 +1,253 @@
1
- import{n as e,t}from"../libs/contracts/dist/spec.js";import"../libs/contracts/dist/index.js";import{l as n}from"../libs/schema/dist/ScalarTypeEnum.js";import{n as r}from"../libs/schema/dist/SchemaModel.js";import"../libs/schema/dist/index.js";import{KBSnapshotModel as i,RuleVersionModel as a,SourceDocumentModel as o,SourceRefModel as s}from"../entities/models.js";const c=r({name:`KbIngestSourceInput`,description:`Ingest immutable source metadata referencing a stored file.`,fields:{jurisdiction:{type:n.String_unsecure(),isOptional:!1},authority:{type:n.String_unsecure(),isOptional:!1},title:{type:n.String_unsecure(),isOptional:!1},fetchedAt:{type:n.DateTime(),isOptional:!1},hash:{type:n.String_unsecure(),isOptional:!1},fileId:{type:n.String_unsecure(),isOptional:!1}}}),l=r({name:`KbUpsertRuleVersionInput`,description:`Create a new draft rule version (immutable history).`,fields:{ruleId:{type:n.String_unsecure(),isOptional:!1},content:{type:n.String_unsecure(),isOptional:!1},sourceRefs:{type:s,isArray:!0,isOptional:!1}}}),u=r({name:`KbApproveRuleVersionInput`,description:`Approve a rule version (human verification).`,fields:{ruleVersionId:{type:n.String_unsecure(),isOptional:!1},approver:{type:n.String_unsecure(),isOptional:!1}}}),d=r({name:`KbPublishSnapshotInput`,description:`Publish a snapshot for a jurisdiction as-of a date.`,fields:{jurisdiction:{type:n.String_unsecure(),isOptional:!1},asOfDate:{type:n.DateTime(),isOptional:!1}}}),f=r({name:`KbSearchInput`,description:`Search within a published snapshot.`,fields:{snapshotId:{type:n.String_unsecure(),isOptional:!1},jurisdiction:{type:n.String_unsecure(),isOptional:!1},query:{type:n.String_unsecure(),isOptional:!1}}}),p=r({name:`KbSearchOutput`,description:`Search results constrained to snapshot + jurisdiction.`,fields:{items:{type:r({name:`KbSearchResultItem`,description:`Search result referencing a specific rule version.`,fields:{ruleVersionId:{type:n.String_unsecure(),isOptional:!1},excerpt:{type:n.String_unsecure(),isOptional:!0}}}),isArray:!0,isOptional:!1}}}),m=t({meta:{name:`kb.ingestSource`,version:1,stability:`experimental`,owners:[`@examples`],tags:[`knowledge`,`sources`,`ingestion`],description:`Ingest immutable source document metadata.`,goal:`Store traceable source documents for curated KB.`,context:`Called when an admin uploads/records authoritative sources.`},io:{input:c,output:o},policy:{auth:`user`}}),h=t({meta:{name:`kb.upsertRuleVersion`,version:1,stability:`experimental`,owners:[`@examples`],tags:[`knowledge`,`rules`,`versioning`],description:`Create a new draft rule version with source references.`,goal:`Propose curated knowledge updates with traceability.`,context:`Automation or curators propose draft rule versions.`},io:{input:l,output:a,errors:{SOURCE_REFS_REQUIRED:{description:`Rule version must cite at least one sourceRef`,http:400,gqlCode:`SOURCE_REFS_REQUIRED`,when:`sourceRefs is empty`},RULE_NOT_FOUND:{description:`Rule does not exist`,http:404,gqlCode:`RULE_NOT_FOUND`,when:`ruleId is unknown`}}},policy:{auth:`user`}}),g=t({meta:{name:`kb.approveRuleVersion`,version:1,stability:`experimental`,owners:[`@examples`],tags:[`knowledge`,`rules`,`approval`],description:`Approve a draft rule version.`,goal:`Human verification step before publishing snapshots.`,context:`Curators/experts approve proposed KB changes.`},io:{input:u,output:a},policy:{auth:`user`}}),_=t({meta:{name:`kb.publishSnapshot`,version:1,stability:`experimental`,owners:[`@examples`],tags:[`knowledge`,`snapshots`,`publishing`],description:`Publish a KB snapshot for a jurisdiction.`,goal:`Create a stable snapshot that assistant answers can cite.`,context:`Publishing happens after approvals; snapshot is referenced by answers.`},io:{input:d,output:i,errors:{NO_APPROVED_RULES:{description:`No approved rule versions available to publish`,http:409,gqlCode:`NO_APPROVED_RULES`,when:`jurisdiction has zero approved rule versions`}}},policy:{auth:`user`}}),v=e({meta:{name:`kb.search`,version:1,stability:`experimental`,owners:[`@examples`],tags:[`knowledge`,`search`,`snapshots`],description:`Search within a published KB snapshot.`,goal:`Provide scoped retrieval for assistant answers.`,context:`Assistant queries curated rules from a specific snapshot.`},io:{input:f,output:p},policy:{auth:`user`}});export{g as KbApproveRuleVersionContract,m as KbIngestSourceContract,_ as KbPublishSnapshotContract,v as KbSearchContract,h as KbUpsertRuleVersionContract};
1
+ import { defineCommand, defineQuery } from "../libs/contracts/dist/spec.js";
2
+ import "../libs/contracts/dist/index.js";
3
+ import { ScalarTypeEnum } from "../libs/schema/dist/ScalarTypeEnum.js";
4
+ import { defineSchemaModel } from "../libs/schema/dist/SchemaModel.js";
5
+ import "../libs/schema/dist/index.js";
6
+ import { KBSnapshotModel, RuleVersionModel, SourceDocumentModel, SourceRefModel } from "../entities/models.js";
7
+
8
+ //#region src/contracts/kb.ts
9
+ const IngestSourceInput = defineSchemaModel({
10
+ name: "KbIngestSourceInput",
11
+ description: "Ingest immutable source metadata referencing a stored file.",
12
+ fields: {
13
+ jurisdiction: {
14
+ type: ScalarTypeEnum.String_unsecure(),
15
+ isOptional: false
16
+ },
17
+ authority: {
18
+ type: ScalarTypeEnum.String_unsecure(),
19
+ isOptional: false
20
+ },
21
+ title: {
22
+ type: ScalarTypeEnum.String_unsecure(),
23
+ isOptional: false
24
+ },
25
+ fetchedAt: {
26
+ type: ScalarTypeEnum.DateTime(),
27
+ isOptional: false
28
+ },
29
+ hash: {
30
+ type: ScalarTypeEnum.String_unsecure(),
31
+ isOptional: false
32
+ },
33
+ fileId: {
34
+ type: ScalarTypeEnum.String_unsecure(),
35
+ isOptional: false
36
+ }
37
+ }
38
+ });
39
+ const UpsertRuleVersionInput = defineSchemaModel({
40
+ name: "KbUpsertRuleVersionInput",
41
+ description: "Create a new draft rule version (immutable history).",
42
+ fields: {
43
+ ruleId: {
44
+ type: ScalarTypeEnum.String_unsecure(),
45
+ isOptional: false
46
+ },
47
+ content: {
48
+ type: ScalarTypeEnum.String_unsecure(),
49
+ isOptional: false
50
+ },
51
+ sourceRefs: {
52
+ type: SourceRefModel,
53
+ isArray: true,
54
+ isOptional: false
55
+ }
56
+ }
57
+ });
58
+ const ApproveRuleVersionInput = defineSchemaModel({
59
+ name: "KbApproveRuleVersionInput",
60
+ description: "Approve a rule version (human verification).",
61
+ fields: {
62
+ ruleVersionId: {
63
+ type: ScalarTypeEnum.String_unsecure(),
64
+ isOptional: false
65
+ },
66
+ approver: {
67
+ type: ScalarTypeEnum.String_unsecure(),
68
+ isOptional: false
69
+ }
70
+ }
71
+ });
72
+ const PublishSnapshotInput = defineSchemaModel({
73
+ name: "KbPublishSnapshotInput",
74
+ description: "Publish a snapshot for a jurisdiction as-of a date.",
75
+ fields: {
76
+ jurisdiction: {
77
+ type: ScalarTypeEnum.String_unsecure(),
78
+ isOptional: false
79
+ },
80
+ asOfDate: {
81
+ type: ScalarTypeEnum.DateTime(),
82
+ isOptional: false
83
+ }
84
+ }
85
+ });
86
+ const SearchKbInput = defineSchemaModel({
87
+ name: "KbSearchInput",
88
+ description: "Search within a published snapshot.",
89
+ fields: {
90
+ snapshotId: {
91
+ type: ScalarTypeEnum.String_unsecure(),
92
+ isOptional: false
93
+ },
94
+ jurisdiction: {
95
+ type: ScalarTypeEnum.String_unsecure(),
96
+ isOptional: false
97
+ },
98
+ query: {
99
+ type: ScalarTypeEnum.String_unsecure(),
100
+ isOptional: false
101
+ }
102
+ }
103
+ });
104
+ const SearchKbOutput = defineSchemaModel({
105
+ name: "KbSearchOutput",
106
+ description: "Search results constrained to snapshot + jurisdiction.",
107
+ fields: { items: {
108
+ type: defineSchemaModel({
109
+ name: "KbSearchResultItem",
110
+ description: "Search result referencing a specific rule version.",
111
+ fields: {
112
+ ruleVersionId: {
113
+ type: ScalarTypeEnum.String_unsecure(),
114
+ isOptional: false
115
+ },
116
+ excerpt: {
117
+ type: ScalarTypeEnum.String_unsecure(),
118
+ isOptional: true
119
+ }
120
+ }
121
+ }),
122
+ isArray: true,
123
+ isOptional: false
124
+ } }
125
+ });
126
+ const KbIngestSourceContract = defineCommand({
127
+ meta: {
128
+ name: "kb.ingestSource",
129
+ version: 1,
130
+ stability: "experimental",
131
+ owners: ["@examples"],
132
+ tags: [
133
+ "knowledge",
134
+ "sources",
135
+ "ingestion"
136
+ ],
137
+ description: "Ingest immutable source document metadata.",
138
+ goal: "Store traceable source documents for curated KB.",
139
+ context: "Called when an admin uploads/records authoritative sources."
140
+ },
141
+ io: {
142
+ input: IngestSourceInput,
143
+ output: SourceDocumentModel
144
+ },
145
+ policy: { auth: "user" }
146
+ });
147
+ const KbUpsertRuleVersionContract = defineCommand({
148
+ meta: {
149
+ name: "kb.upsertRuleVersion",
150
+ version: 1,
151
+ stability: "experimental",
152
+ owners: ["@examples"],
153
+ tags: [
154
+ "knowledge",
155
+ "rules",
156
+ "versioning"
157
+ ],
158
+ description: "Create a new draft rule version with source references.",
159
+ goal: "Propose curated knowledge updates with traceability.",
160
+ context: "Automation or curators propose draft rule versions."
161
+ },
162
+ io: {
163
+ input: UpsertRuleVersionInput,
164
+ output: RuleVersionModel,
165
+ errors: {
166
+ SOURCE_REFS_REQUIRED: {
167
+ description: "Rule version must cite at least one sourceRef",
168
+ http: 400,
169
+ gqlCode: "SOURCE_REFS_REQUIRED",
170
+ when: "sourceRefs is empty"
171
+ },
172
+ RULE_NOT_FOUND: {
173
+ description: "Rule does not exist",
174
+ http: 404,
175
+ gqlCode: "RULE_NOT_FOUND",
176
+ when: "ruleId is unknown"
177
+ }
178
+ }
179
+ },
180
+ policy: { auth: "user" }
181
+ });
182
+ const KbApproveRuleVersionContract = defineCommand({
183
+ meta: {
184
+ name: "kb.approveRuleVersion",
185
+ version: 1,
186
+ stability: "experimental",
187
+ owners: ["@examples"],
188
+ tags: [
189
+ "knowledge",
190
+ "rules",
191
+ "approval"
192
+ ],
193
+ description: "Approve a draft rule version.",
194
+ goal: "Human verification step before publishing snapshots.",
195
+ context: "Curators/experts approve proposed KB changes."
196
+ },
197
+ io: {
198
+ input: ApproveRuleVersionInput,
199
+ output: RuleVersionModel
200
+ },
201
+ policy: { auth: "user" }
202
+ });
203
+ const KbPublishSnapshotContract = defineCommand({
204
+ meta: {
205
+ name: "kb.publishSnapshot",
206
+ version: 1,
207
+ stability: "experimental",
208
+ owners: ["@examples"],
209
+ tags: [
210
+ "knowledge",
211
+ "snapshots",
212
+ "publishing"
213
+ ],
214
+ description: "Publish a KB snapshot for a jurisdiction.",
215
+ goal: "Create a stable snapshot that assistant answers can cite.",
216
+ context: "Publishing happens after approvals; snapshot is referenced by answers."
217
+ },
218
+ io: {
219
+ input: PublishSnapshotInput,
220
+ output: KBSnapshotModel,
221
+ errors: { NO_APPROVED_RULES: {
222
+ description: "No approved rule versions available to publish",
223
+ http: 409,
224
+ gqlCode: "NO_APPROVED_RULES",
225
+ when: "jurisdiction has zero approved rule versions"
226
+ } }
227
+ },
228
+ policy: { auth: "user" }
229
+ });
230
+ const KbSearchContract = defineQuery({
231
+ meta: {
232
+ name: "kb.search",
233
+ version: 1,
234
+ stability: "experimental",
235
+ owners: ["@examples"],
236
+ tags: [
237
+ "knowledge",
238
+ "search",
239
+ "snapshots"
240
+ ],
241
+ description: "Search within a published KB snapshot.",
242
+ goal: "Provide scoped retrieval for assistant answers.",
243
+ context: "Assistant queries curated rules from a specific snapshot."
244
+ },
245
+ io: {
246
+ input: SearchKbInput,
247
+ output: SearchKbOutput
248
+ },
249
+ policy: { auth: "user" }
250
+ });
251
+
252
+ //#endregion
253
+ export { KbApproveRuleVersionContract, KbIngestSourceContract, KbPublishSnapshotContract, KbSearchContract, KbUpsertRuleVersionContract };
@@ -1 +1 @@
1
- import"./versioned-knowledge-base.docblock.js";
1
+ import "./versioned-knowledge-base.docblock.js";
@@ -1,20 +1,31 @@
1
- import{a as e}from"../libs/contracts/dist/docs/registry.js";import"../libs/contracts/dist/docs/index.js";e([{id:`docs.examples.versioned-knowledge-base.goal`,title:`Versioned Knowledge Base — Goal`,summary:`Curated KB with immutable sources, versioned rules, and published snapshots referenced by answers.`,kind:`goal`,visibility:`public`,route:`/docs/examples/versioned-knowledge-base/goal`,tags:[`knowledge`,`versioning`,`snapshots`,`traceability`],body:`## Why it matters
2
- - Separates raw sources from curated knowledge.
3
- - Ensures assistant answers cite a published snapshot.
4
- - Makes change review and safe regeneration possible.
1
+ import { registerDocBlocks } from "../libs/contracts/dist/docs/registry.js";
2
+ import "../libs/contracts/dist/docs/index.js";
5
3
 
6
- ## Core invariants
7
- - Sources are immutable and content-addressed (hash).
8
- - Rule versions must cite at least one source.
9
- - Snapshots include only approved rule versions.`},{id:`docs.examples.versioned-knowledge-base.reference`,title:`Versioned Knowledge Base — Reference`,summary:`Entities, contracts, and events for the versioned KB example.`,kind:`reference`,visibility:`public`,route:`/docs/examples/versioned-knowledge-base`,tags:[`knowledge`,`reference`],body:`## Contracts
10
- - kb.ingestSource
11
- - kb.upsertRuleVersion
12
- - kb.approveRuleVersion
13
- - kb.publishSnapshot
14
- - kb.search
4
+ //#region src/docs/versioned-knowledge-base.docblock.ts
5
+ registerDocBlocks([{
6
+ id: "docs.examples.versioned-knowledge-base.goal",
7
+ title: "Versioned Knowledge Base — Goal",
8
+ summary: "Curated KB with immutable sources, versioned rules, and published snapshots referenced by answers.",
9
+ kind: "goal",
10
+ visibility: "public",
11
+ route: "/docs/examples/versioned-knowledge-base/goal",
12
+ tags: [
13
+ "knowledge",
14
+ "versioning",
15
+ "snapshots",
16
+ "traceability"
17
+ ],
18
+ body: `## Why it matters
19
+ - Separates raw sources from curated knowledge.\n- Ensures assistant answers cite a published snapshot.\n- Makes change review and safe regeneration possible.\n\n## Core invariants\n- Sources are immutable and content-addressed (hash).\n- Rule versions must cite at least one source.\n- Snapshots include only approved rule versions.`
20
+ }, {
21
+ id: "docs.examples.versioned-knowledge-base.reference",
22
+ title: "Versioned Knowledge Base — Reference",
23
+ summary: "Entities, contracts, and events for the versioned KB example.",
24
+ kind: "reference",
25
+ visibility: "public",
26
+ route: "/docs/examples/versioned-knowledge-base",
27
+ tags: ["knowledge", "reference"],
28
+ body: `## Contracts\n- kb.ingestSource\n- kb.upsertRuleVersion\n- kb.approveRuleVersion\n- kb.publishSnapshot\n- kb.search\n\n## Events\n- kb.source.ingested\n- kb.ruleVersion.created\n- kb.ruleVersion.approved\n- kb.snapshot.published`
29
+ }]);
15
30
 
16
- ## Events
17
- - kb.source.ingested
18
- - kb.ruleVersion.created
19
- - kb.ruleVersion.approved
20
- - kb.snapshot.published`}]);
31
+ //#endregion
@@ -1 +1,3 @@
1
- import{KBSnapshotModel as e,RuleModel as t,RuleVersionModel as n,SourceDocumentModel as r,SourceRefModel as i}from"./models.js";export{e as KBSnapshotModel,t as RuleModel,n as RuleVersionModel,r as SourceDocumentModel,i as SourceRefModel};
1
+ import { KBSnapshotModel, RuleModel, RuleVersionModel, SourceDocumentModel, SourceRefModel } from "./models.js";
2
+
3
+ export { KBSnapshotModel, RuleModel, RuleVersionModel, SourceDocumentModel, SourceRefModel };