@lssm/lib.contracts 0.0.0-canary-20251220041653 → 0.0.0-canary-20251221132705

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 (80) hide show
  1. package/README.md +4 -4
  2. package/dist/_virtual/rolldown_runtime.js +37 -0
  3. package/dist/app-config/contracts.d.ts +60 -60
  4. package/dist/app-config/contracts.js +1 -1
  5. package/dist/app-config/events.d.ts +27 -27
  6. package/dist/app-config/lifecycle-contracts.d.ts +90 -90
  7. package/dist/app-config/lifecycle-contracts.js +1 -1
  8. package/dist/data-views.d.ts +11 -0
  9. package/dist/data-views.js +26 -0
  10. package/dist/docs/tech/contracts/README.docblock.js +2 -2
  11. package/dist/docs/tech/contracts/openapi-export.docblock.js +6 -6
  12. package/dist/docs/tech/contracts/ops-to-presentation-linking.docblock.js +2 -2
  13. package/dist/docs/tech/contracts/tests.docblock.js +2 -2
  14. package/dist/experiments/spec-resolver.d.ts +2 -2
  15. package/dist/features.d.ts +16 -5
  16. package/dist/features.js +26 -0
  17. package/dist/forms.d.ts +11 -0
  18. package/dist/forms.js +26 -0
  19. package/dist/index.d.ts +7 -5
  20. package/dist/index.js +10 -4
  21. package/dist/install.d.ts +16 -16
  22. package/dist/integrations/contracts.d.ts +111 -111
  23. package/dist/integrations/contracts.js +1 -1
  24. package/dist/integrations/openbanking/contracts/accounts.d.ts +73 -73
  25. package/dist/integrations/openbanking/contracts/accounts.js +1 -1
  26. package/dist/integrations/openbanking/contracts/balances.d.ts +40 -40
  27. package/dist/integrations/openbanking/contracts/balances.js +1 -1
  28. package/dist/integrations/openbanking/contracts/index.d.ts +2 -2
  29. package/dist/integrations/openbanking/contracts/transactions.d.ts +54 -54
  30. package/dist/integrations/openbanking/contracts/transactions.js +1 -1
  31. package/dist/integrations/openbanking/models.d.ts +55 -55
  32. package/dist/jsonschema.d.ts +5 -5
  33. package/dist/knowledge/contracts.d.ts +75 -75
  34. package/dist/knowledge/contracts.js +1 -1
  35. package/dist/llm/exporters.d.ts +8 -8
  36. package/dist/llm/exporters.js +1 -1
  37. package/dist/llm/prompts.d.ts +7 -7
  38. package/dist/llm/types.d.ts +3 -3
  39. package/dist/markdown.d.ts +3 -3
  40. package/dist/markdown.js +1 -1
  41. package/dist/onboarding-base.d.ts +32 -32
  42. package/dist/onboarding-base.js +1 -1
  43. package/dist/openapi.d.ts +2 -2
  44. package/dist/{spec.d.ts → operation.d.ts} +12 -12
  45. package/dist/{spec.js → operation.js} +1 -1
  46. package/dist/policy/docs/policy.docblock.js +1 -1
  47. package/dist/presentations.d.ts +14 -3
  48. package/dist/presentations.js +25 -0
  49. package/dist/registry-utils.d.ts +107 -0
  50. package/dist/registry-utils.js +122 -0
  51. package/dist/registry.d.ts +46 -14
  52. package/dist/registry.js +61 -5
  53. package/dist/server/graphql-pothos.d.ts +6 -6
  54. package/dist/server/graphql-pothos.js +4 -4
  55. package/dist/server/mcp/createMcpServer.d.ts +3 -3
  56. package/dist/server/mcp/createMcpServer.js +1 -1
  57. package/dist/server/mcp/registerTools.d.ts +2 -2
  58. package/dist/server/rest-elysia.d.ts +2 -2
  59. package/dist/server/rest-express.d.ts +2 -2
  60. package/dist/server/rest-generic.d.ts +3 -3
  61. package/dist/server/rest-generic.js +1 -1
  62. package/dist/server/rest-next-app.d.ts +4 -4
  63. package/dist/server/rest-next-app.js +2 -2
  64. package/dist/server/rest-next-mcp.d.ts +2 -2
  65. package/dist/server/rest-next-pages.d.ts +2 -2
  66. package/dist/telemetry/docs/telemetry.docblock.js +1 -1
  67. package/dist/tests/runner.d.ts +2 -2
  68. package/dist/tests/spec.d.ts +1 -1
  69. package/dist/workflow/spec.d.ts +11 -1
  70. package/dist/workflow/spec.js +26 -0
  71. package/dist/workflow/validation.d.ts +2 -2
  72. package/dist/workspace-config/contractsrc-schema.d.ts +298 -0
  73. package/dist/workspace-config/contractsrc-schema.js +139 -0
  74. package/dist/workspace-config/index.d.ts +2 -0
  75. package/dist/workspace-config/index.js +3 -0
  76. package/package.json +14 -13
  77. package/dist/presentations.backcompat.d.ts +0 -7
  78. package/dist/presentations.backcompat.js +0 -47
  79. package/dist/types/all.d.ts +0 -60
  80. package/dist/types/all.js +0 -0
@@ -0,0 +1,298 @@
1
+ import * as z$1 from "zod";
2
+
3
+ //#region src/workspace-config/contractsrc-schema.d.ts
4
+
5
+ /**
6
+ * OpenAPI source configuration for import/sync/validate operations.
7
+ */
8
+ declare const OpenApiSourceConfigSchema: z$1.ZodObject<{
9
+ name: z$1.ZodString;
10
+ url: z$1.ZodOptional<z$1.ZodURL>;
11
+ file: z$1.ZodOptional<z$1.ZodString>;
12
+ syncMode: z$1.ZodDefault<z$1.ZodEnum<{
13
+ import: "import";
14
+ sync: "sync";
15
+ validate: "validate";
16
+ }>>;
17
+ tags: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
18
+ exclude: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
19
+ include: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
20
+ prefix: z$1.ZodOptional<z$1.ZodString>;
21
+ defaultStability: z$1.ZodOptional<z$1.ZodEnum<{
22
+ experimental: "experimental";
23
+ beta: "beta";
24
+ stable: "stable";
25
+ deprecated: "deprecated";
26
+ }>>;
27
+ defaultAuth: z$1.ZodOptional<z$1.ZodEnum<{
28
+ user: "user";
29
+ anonymous: "anonymous";
30
+ admin: "admin";
31
+ }>>;
32
+ defaultOwners: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
33
+ }, z$1.core.$strip>;
34
+ declare const OpenApiExportConfigSchema: z$1.ZodObject<{
35
+ outputPath: z$1.ZodDefault<z$1.ZodString>;
36
+ format: z$1.ZodDefault<z$1.ZodEnum<{
37
+ json: "json";
38
+ yaml: "yaml";
39
+ }>>;
40
+ title: z$1.ZodOptional<z$1.ZodString>;
41
+ version: z$1.ZodOptional<z$1.ZodString>;
42
+ description: z$1.ZodOptional<z$1.ZodString>;
43
+ servers: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
44
+ url: z$1.ZodString;
45
+ description: z$1.ZodOptional<z$1.ZodString>;
46
+ }, z$1.core.$strip>>>;
47
+ }, z$1.core.$strip>;
48
+ /**
49
+ * OpenAPI configuration section.
50
+ */
51
+ declare const OpenApiConfigSchema: z$1.ZodObject<{
52
+ sources: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
53
+ name: z$1.ZodString;
54
+ url: z$1.ZodOptional<z$1.ZodURL>;
55
+ file: z$1.ZodOptional<z$1.ZodString>;
56
+ syncMode: z$1.ZodDefault<z$1.ZodEnum<{
57
+ import: "import";
58
+ sync: "sync";
59
+ validate: "validate";
60
+ }>>;
61
+ tags: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
62
+ exclude: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
63
+ include: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
64
+ prefix: z$1.ZodOptional<z$1.ZodString>;
65
+ defaultStability: z$1.ZodOptional<z$1.ZodEnum<{
66
+ experimental: "experimental";
67
+ beta: "beta";
68
+ stable: "stable";
69
+ deprecated: "deprecated";
70
+ }>>;
71
+ defaultAuth: z$1.ZodOptional<z$1.ZodEnum<{
72
+ user: "user";
73
+ anonymous: "anonymous";
74
+ admin: "admin";
75
+ }>>;
76
+ defaultOwners: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
77
+ }, z$1.core.$strip>>>;
78
+ export: z$1.ZodOptional<z$1.ZodObject<{
79
+ outputPath: z$1.ZodDefault<z$1.ZodString>;
80
+ format: z$1.ZodDefault<z$1.ZodEnum<{
81
+ json: "json";
82
+ yaml: "yaml";
83
+ }>>;
84
+ title: z$1.ZodOptional<z$1.ZodString>;
85
+ version: z$1.ZodOptional<z$1.ZodString>;
86
+ description: z$1.ZodOptional<z$1.ZodString>;
87
+ servers: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
88
+ url: z$1.ZodString;
89
+ description: z$1.ZodOptional<z$1.ZodString>;
90
+ }, z$1.core.$strip>>>;
91
+ }, z$1.core.$strip>>;
92
+ }, z$1.core.$strip>;
93
+ /**
94
+ * Grouping strategy for organizing specs.
95
+ */
96
+ declare const GroupingStrategySchema: z$1.ZodEnum<{
97
+ "by-tag": "by-tag";
98
+ "by-owner": "by-owner";
99
+ "by-domain": "by-domain";
100
+ "by-url-path-single": "by-url-path-single";
101
+ "by-url-path-multi": "by-url-path-multi";
102
+ "by-feature": "by-feature";
103
+ none: "none";
104
+ }>;
105
+ /**
106
+ * Grouping rule configuration.
107
+ */
108
+ declare const GroupingRuleSchema: z$1.ZodObject<{
109
+ strategy: z$1.ZodEnum<{
110
+ "by-tag": "by-tag";
111
+ "by-owner": "by-owner";
112
+ "by-domain": "by-domain";
113
+ "by-url-path-single": "by-url-path-single";
114
+ "by-url-path-multi": "by-url-path-multi";
115
+ "by-feature": "by-feature";
116
+ none: "none";
117
+ }>;
118
+ urlPathLevel: z$1.ZodOptional<z$1.ZodNumber>;
119
+ pattern: z$1.ZodOptional<z$1.ZodString>;
120
+ }, z$1.core.$strip>;
121
+ /**
122
+ * Output directory conventions for generated specs.
123
+ */
124
+ declare const FolderConventionsSchema: z$1.ZodObject<{
125
+ models: z$1.ZodDefault<z$1.ZodString>;
126
+ operations: z$1.ZodDefault<z$1.ZodString>;
127
+ events: z$1.ZodDefault<z$1.ZodString>;
128
+ presentations: z$1.ZodDefault<z$1.ZodString>;
129
+ forms: z$1.ZodDefault<z$1.ZodString>;
130
+ groupByFeature: z$1.ZodDefault<z$1.ZodBoolean>;
131
+ operationsGrouping: z$1.ZodOptional<z$1.ZodObject<{
132
+ strategy: z$1.ZodEnum<{
133
+ "by-tag": "by-tag";
134
+ "by-owner": "by-owner";
135
+ "by-domain": "by-domain";
136
+ "by-url-path-single": "by-url-path-single";
137
+ "by-url-path-multi": "by-url-path-multi";
138
+ "by-feature": "by-feature";
139
+ none: "none";
140
+ }>;
141
+ urlPathLevel: z$1.ZodOptional<z$1.ZodNumber>;
142
+ pattern: z$1.ZodOptional<z$1.ZodString>;
143
+ }, z$1.core.$strip>>;
144
+ modelsGrouping: z$1.ZodOptional<z$1.ZodObject<{
145
+ strategy: z$1.ZodEnum<{
146
+ "by-tag": "by-tag";
147
+ "by-owner": "by-owner";
148
+ "by-domain": "by-domain";
149
+ "by-url-path-single": "by-url-path-single";
150
+ "by-url-path-multi": "by-url-path-multi";
151
+ "by-feature": "by-feature";
152
+ none: "none";
153
+ }>;
154
+ urlPathLevel: z$1.ZodOptional<z$1.ZodNumber>;
155
+ pattern: z$1.ZodOptional<z$1.ZodString>;
156
+ }, z$1.core.$strip>>;
157
+ eventsGrouping: z$1.ZodOptional<z$1.ZodObject<{
158
+ strategy: z$1.ZodEnum<{
159
+ "by-tag": "by-tag";
160
+ "by-owner": "by-owner";
161
+ "by-domain": "by-domain";
162
+ "by-url-path-single": "by-url-path-single";
163
+ "by-url-path-multi": "by-url-path-multi";
164
+ "by-feature": "by-feature";
165
+ none: "none";
166
+ }>;
167
+ urlPathLevel: z$1.ZodOptional<z$1.ZodNumber>;
168
+ pattern: z$1.ZodOptional<z$1.ZodString>;
169
+ }, z$1.core.$strip>>;
170
+ }, z$1.core.$strip>;
171
+ /**
172
+ * Full ContractSpec configuration schema (.contractsrc.json).
173
+ */
174
+ declare const ContractsrcSchema: z$1.ZodObject<{
175
+ aiProvider: z$1.ZodDefault<z$1.ZodEnum<{
176
+ custom: "custom";
177
+ claude: "claude";
178
+ openai: "openai";
179
+ ollama: "ollama";
180
+ }>>;
181
+ aiModel: z$1.ZodOptional<z$1.ZodString>;
182
+ agentMode: z$1.ZodDefault<z$1.ZodEnum<{
183
+ cursor: "cursor";
184
+ "claude-code": "claude-code";
185
+ simple: "simple";
186
+ "openai-codex": "openai-codex";
187
+ }>>;
188
+ customEndpoint: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodURL>>;
189
+ customApiKey: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
190
+ outputDir: z$1.ZodDefault<z$1.ZodString>;
191
+ conventions: z$1.ZodObject<{
192
+ models: z$1.ZodDefault<z$1.ZodString>;
193
+ operations: z$1.ZodDefault<z$1.ZodString>;
194
+ events: z$1.ZodDefault<z$1.ZodString>;
195
+ presentations: z$1.ZodDefault<z$1.ZodString>;
196
+ forms: z$1.ZodDefault<z$1.ZodString>;
197
+ groupByFeature: z$1.ZodDefault<z$1.ZodBoolean>;
198
+ operationsGrouping: z$1.ZodOptional<z$1.ZodObject<{
199
+ strategy: z$1.ZodEnum<{
200
+ "by-tag": "by-tag";
201
+ "by-owner": "by-owner";
202
+ "by-domain": "by-domain";
203
+ "by-url-path-single": "by-url-path-single";
204
+ "by-url-path-multi": "by-url-path-multi";
205
+ "by-feature": "by-feature";
206
+ none: "none";
207
+ }>;
208
+ urlPathLevel: z$1.ZodOptional<z$1.ZodNumber>;
209
+ pattern: z$1.ZodOptional<z$1.ZodString>;
210
+ }, z$1.core.$strip>>;
211
+ modelsGrouping: z$1.ZodOptional<z$1.ZodObject<{
212
+ strategy: z$1.ZodEnum<{
213
+ "by-tag": "by-tag";
214
+ "by-owner": "by-owner";
215
+ "by-domain": "by-domain";
216
+ "by-url-path-single": "by-url-path-single";
217
+ "by-url-path-multi": "by-url-path-multi";
218
+ "by-feature": "by-feature";
219
+ none: "none";
220
+ }>;
221
+ urlPathLevel: z$1.ZodOptional<z$1.ZodNumber>;
222
+ pattern: z$1.ZodOptional<z$1.ZodString>;
223
+ }, z$1.core.$strip>>;
224
+ eventsGrouping: z$1.ZodOptional<z$1.ZodObject<{
225
+ strategy: z$1.ZodEnum<{
226
+ "by-tag": "by-tag";
227
+ "by-owner": "by-owner";
228
+ "by-domain": "by-domain";
229
+ "by-url-path-single": "by-url-path-single";
230
+ "by-url-path-multi": "by-url-path-multi";
231
+ "by-feature": "by-feature";
232
+ none: "none";
233
+ }>;
234
+ urlPathLevel: z$1.ZodOptional<z$1.ZodNumber>;
235
+ pattern: z$1.ZodOptional<z$1.ZodString>;
236
+ }, z$1.core.$strip>>;
237
+ }, z$1.core.$strip>;
238
+ defaultOwners: z$1.ZodDefault<z$1.ZodArray<z$1.ZodString>>;
239
+ defaultTags: z$1.ZodDefault<z$1.ZodArray<z$1.ZodString>>;
240
+ packages: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
241
+ excludePackages: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
242
+ recursive: z$1.ZodOptional<z$1.ZodBoolean>;
243
+ openapi: z$1.ZodOptional<z$1.ZodObject<{
244
+ sources: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
245
+ name: z$1.ZodString;
246
+ url: z$1.ZodOptional<z$1.ZodURL>;
247
+ file: z$1.ZodOptional<z$1.ZodString>;
248
+ syncMode: z$1.ZodDefault<z$1.ZodEnum<{
249
+ import: "import";
250
+ sync: "sync";
251
+ validate: "validate";
252
+ }>>;
253
+ tags: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
254
+ exclude: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
255
+ include: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
256
+ prefix: z$1.ZodOptional<z$1.ZodString>;
257
+ defaultStability: z$1.ZodOptional<z$1.ZodEnum<{
258
+ experimental: "experimental";
259
+ beta: "beta";
260
+ stable: "stable";
261
+ deprecated: "deprecated";
262
+ }>>;
263
+ defaultAuth: z$1.ZodOptional<z$1.ZodEnum<{
264
+ user: "user";
265
+ anonymous: "anonymous";
266
+ admin: "admin";
267
+ }>>;
268
+ defaultOwners: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
269
+ }, z$1.core.$strip>>>;
270
+ export: z$1.ZodOptional<z$1.ZodObject<{
271
+ outputPath: z$1.ZodDefault<z$1.ZodString>;
272
+ format: z$1.ZodDefault<z$1.ZodEnum<{
273
+ json: "json";
274
+ yaml: "yaml";
275
+ }>>;
276
+ title: z$1.ZodOptional<z$1.ZodString>;
277
+ version: z$1.ZodOptional<z$1.ZodString>;
278
+ description: z$1.ZodOptional<z$1.ZodString>;
279
+ servers: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
280
+ url: z$1.ZodString;
281
+ description: z$1.ZodOptional<z$1.ZodString>;
282
+ }, z$1.core.$strip>>>;
283
+ }, z$1.core.$strip>>;
284
+ }, z$1.core.$strip>>;
285
+ }, z$1.core.$strip>;
286
+ type OpenApiSourceConfig = z$1.infer<typeof OpenApiSourceConfigSchema>;
287
+ type OpenApiExportConfig = z$1.infer<typeof OpenApiExportConfigSchema>;
288
+ type OpenApiConfig = z$1.infer<typeof OpenApiConfigSchema>;
289
+ type FolderConventions = z$1.infer<typeof FolderConventionsSchema>;
290
+ type ContractsrcConfig = z$1.infer<typeof ContractsrcSchema>;
291
+ type GroupingStrategy = z$1.infer<typeof GroupingStrategySchema>;
292
+ type GroupingRule = z$1.infer<typeof GroupingRuleSchema>;
293
+ /**
294
+ * Default configuration values.
295
+ */
296
+ declare const DEFAULT_CONTRACTSRC: ContractsrcConfig;
297
+ //#endregion
298
+ export { ContractsrcConfig, ContractsrcSchema, DEFAULT_CONTRACTSRC, FolderConventions, FolderConventionsSchema, GroupingRule, GroupingRuleSchema, GroupingStrategy, GroupingStrategySchema, OpenApiConfig, OpenApiConfigSchema, OpenApiExportConfig, OpenApiExportConfigSchema, OpenApiSourceConfig, OpenApiSourceConfigSchema };
@@ -0,0 +1,139 @@
1
+ import * as z$1 from "zod";
2
+
3
+ //#region src/workspace-config/contractsrc-schema.ts
4
+ /**
5
+ * ContractSpec configuration schema definitions.
6
+ *
7
+ * These schemas define the structure of .contractsrc.json files
8
+ * and are shared across CLI tools and libraries.
9
+ */
10
+ /**
11
+ * OpenAPI source configuration for import/sync/validate operations.
12
+ */
13
+ const OpenApiSourceConfigSchema = z$1.object({
14
+ name: z$1.string(),
15
+ url: z$1.url().optional(),
16
+ file: z$1.string().optional(),
17
+ syncMode: z$1.enum([
18
+ "import",
19
+ "sync",
20
+ "validate"
21
+ ]).default("validate"),
22
+ tags: z$1.array(z$1.string()).optional(),
23
+ exclude: z$1.array(z$1.string()).optional(),
24
+ include: z$1.array(z$1.string()).optional(),
25
+ prefix: z$1.string().optional(),
26
+ defaultStability: z$1.enum([
27
+ "experimental",
28
+ "beta",
29
+ "stable",
30
+ "deprecated"
31
+ ]).optional(),
32
+ defaultAuth: z$1.enum([
33
+ "anonymous",
34
+ "user",
35
+ "admin"
36
+ ]).optional(),
37
+ defaultOwners: z$1.array(z$1.string()).optional()
38
+ });
39
+ const OpenApiExportConfigSchema = z$1.object({
40
+ outputPath: z$1.string().default("./openapi.json"),
41
+ format: z$1.enum(["json", "yaml"]).default("json"),
42
+ title: z$1.string().optional(),
43
+ version: z$1.string().optional(),
44
+ description: z$1.string().optional(),
45
+ servers: z$1.array(z$1.object({
46
+ url: z$1.string(),
47
+ description: z$1.string().optional()
48
+ })).optional()
49
+ });
50
+ /**
51
+ * OpenAPI configuration section.
52
+ */
53
+ const OpenApiConfigSchema = z$1.object({
54
+ sources: z$1.array(OpenApiSourceConfigSchema).optional(),
55
+ export: OpenApiExportConfigSchema.optional()
56
+ });
57
+ /**
58
+ * Grouping strategy for organizing specs.
59
+ */
60
+ const GroupingStrategySchema = z$1.enum([
61
+ "by-tag",
62
+ "by-owner",
63
+ "by-domain",
64
+ "by-url-path-single",
65
+ "by-url-path-multi",
66
+ "by-feature",
67
+ "none"
68
+ ]);
69
+ /**
70
+ * Grouping rule configuration.
71
+ */
72
+ const GroupingRuleSchema = z$1.object({
73
+ strategy: GroupingStrategySchema,
74
+ urlPathLevel: z$1.number().optional(),
75
+ pattern: z$1.string().optional()
76
+ });
77
+ /**
78
+ * Output directory conventions for generated specs.
79
+ */
80
+ const FolderConventionsSchema = z$1.object({
81
+ models: z$1.string().default("models"),
82
+ operations: z$1.string().default("operations/commands|queries"),
83
+ events: z$1.string().default("events"),
84
+ presentations: z$1.string().default("presentations"),
85
+ forms: z$1.string().default("forms"),
86
+ groupByFeature: z$1.boolean().default(true),
87
+ operationsGrouping: GroupingRuleSchema.optional(),
88
+ modelsGrouping: GroupingRuleSchema.optional(),
89
+ eventsGrouping: GroupingRuleSchema.optional()
90
+ });
91
+ /**
92
+ * Full ContractSpec configuration schema (.contractsrc.json).
93
+ */
94
+ const ContractsrcSchema = z$1.object({
95
+ aiProvider: z$1.enum([
96
+ "claude",
97
+ "openai",
98
+ "ollama",
99
+ "custom"
100
+ ]).default("claude"),
101
+ aiModel: z$1.string().optional(),
102
+ agentMode: z$1.enum([
103
+ "simple",
104
+ "cursor",
105
+ "claude-code",
106
+ "openai-codex"
107
+ ]).default("simple"),
108
+ customEndpoint: z$1.url().nullable().optional(),
109
+ customApiKey: z$1.string().nullable().optional(),
110
+ outputDir: z$1.string().default("./src"),
111
+ conventions: FolderConventionsSchema,
112
+ defaultOwners: z$1.array(z$1.string()).default([]),
113
+ defaultTags: z$1.array(z$1.string()).default([]),
114
+ packages: z$1.array(z$1.string()).optional(),
115
+ excludePackages: z$1.array(z$1.string()).optional(),
116
+ recursive: z$1.boolean().optional(),
117
+ openapi: OpenApiConfigSchema.optional()
118
+ });
119
+ /**
120
+ * Default configuration values.
121
+ */
122
+ const DEFAULT_CONTRACTSRC = {
123
+ aiProvider: "claude",
124
+ agentMode: "simple",
125
+ outputDir: "./src",
126
+ conventions: {
127
+ models: "models",
128
+ operations: "interactions/commands|queries",
129
+ events: "events",
130
+ presentations: "presentations",
131
+ forms: "forms",
132
+ groupByFeature: true
133
+ },
134
+ defaultOwners: [],
135
+ defaultTags: []
136
+ };
137
+
138
+ //#endregion
139
+ export { ContractsrcSchema, DEFAULT_CONTRACTSRC, FolderConventionsSchema, GroupingRuleSchema, GroupingStrategySchema, OpenApiConfigSchema, OpenApiExportConfigSchema, OpenApiSourceConfigSchema };
@@ -0,0 +1,2 @@
1
+ import { ContractsrcConfig, ContractsrcSchema, DEFAULT_CONTRACTSRC, FolderConventions, FolderConventionsSchema, OpenApiConfig, OpenApiConfigSchema, OpenApiExportConfig, OpenApiExportConfigSchema, OpenApiSourceConfig, OpenApiSourceConfigSchema } from "./contractsrc-schema.js";
2
+ export { type ContractsrcConfig, ContractsrcSchema, DEFAULT_CONTRACTSRC, type FolderConventions, FolderConventionsSchema, type OpenApiConfig, OpenApiConfigSchema, type OpenApiExportConfig, OpenApiExportConfigSchema, type OpenApiSourceConfig, OpenApiSourceConfigSchema };
@@ -0,0 +1,3 @@
1
+ import { ContractsrcSchema, DEFAULT_CONTRACTSRC, FolderConventionsSchema, OpenApiConfigSchema, OpenApiExportConfigSchema, OpenApiSourceConfigSchema } from "./contractsrc-schema.js";
2
+
3
+ export { ContractsrcSchema, DEFAULT_CONTRACTSRC, FolderConventionsSchema, OpenApiConfigSchema, OpenApiExportConfigSchema, OpenApiSourceConfigSchema };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lssm/lib.contracts",
3
- "version": "0.0.0-canary-20251220041653",
3
+ "version": "0.0.0-canary-20251221132705",
4
4
  "scripts": {
5
5
  "publish:pkg": "bun publish --tolerate-republish --ignore-scripts --verbose",
6
6
  "publish:pkg:canary": "bun publish:pkg --tag canary",
@@ -16,8 +16,8 @@
16
16
  "test": "bun run"
17
17
  },
18
18
  "devDependencies": {
19
- "@lssm/tool.tsdown": "0.0.0-canary-20251220041653",
20
- "@lssm/tool.typescript": "0.0.0-canary-20251220041653",
19
+ "@lssm/tool.tsdown": "0.0.0-canary-20251221132705",
20
+ "@lssm/tool.typescript": "0.0.0-canary-20251221132705",
21
21
  "@types/express": "^5.0.3",
22
22
  "@types/turndown": "^5.0.6",
23
23
  "tsdown": "^0.18.1",
@@ -35,8 +35,8 @@
35
35
  "@elevenlabs/elevenlabs-js": "^2.27.0",
36
36
  "@google-cloud/secret-manager": "^6.1.1",
37
37
  "@google-cloud/storage": "^7.18.0",
38
- "@lssm/lib.logger": "0.0.0-canary-20251220041653",
39
- "@lssm/lib.schema": "0.0.0-canary-20251220041653",
38
+ "@lssm/lib.logger": "0.0.0-canary-20251221132705",
39
+ "@lssm/lib.schema": "0.0.0-canary-20251221132705",
40
40
  "@mistralai/mistralai": "^1.11.0",
41
41
  "@modelcontextprotocol/sdk": "^1.24.3",
42
42
  "@qdrant/js-client-rest": "^1.16.2",
@@ -249,13 +249,13 @@
249
249
  "./onboarding-base": "./dist/onboarding-base.js",
250
250
  "./openapi": "./dist/openapi.js",
251
251
  "./openbanking/docs/openbanking.docblock": "./dist/openbanking/docs/openbanking.docblock.js",
252
+ "./operation": "./dist/operation.js",
252
253
  "./ownership": "./dist/ownership.js",
253
254
  "./policy/docs/policy.docblock": "./dist/policy/docs/policy.docblock.js",
254
255
  "./policy/engine": "./dist/policy/engine.js",
255
256
  "./policy/opa-adapter": "./dist/policy/opa-adapter.js",
256
257
  "./policy/spec": "./dist/policy/spec.js",
257
258
  "./presentations": "./dist/presentations.js",
258
- "./presentations.backcompat": "./dist/presentations.backcompat.js",
259
259
  "./presentations.v2": "./dist/presentations.v2.js",
260
260
  "./presentations/docs/presentations-conventions.docblock": "./dist/presentations/docs/presentations-conventions.docblock.js",
261
261
  "./prompt": "./dist/prompt.js",
@@ -269,6 +269,7 @@
269
269
  "./regenerator/types": "./dist/regenerator/types.js",
270
270
  "./regenerator/utils": "./dist/regenerator/utils.js",
271
271
  "./registry": "./dist/registry.js",
272
+ "./registry-utils": "./dist/registry-utils.js",
272
273
  "./resources": "./dist/resources.js",
273
274
  "./schema-to-markdown": "./dist/schema-to-markdown.js",
274
275
  "./server": "./dist/server/index.js",
@@ -286,7 +287,6 @@
286
287
  "./server/rest-next-app": "./dist/server/rest-next-app.js",
287
288
  "./server/rest-next-mcp": "./dist/server/rest-next-mcp.js",
288
289
  "./server/rest-next-pages": "./dist/server/rest-next-pages.js",
289
- "./spec": "./dist/spec.js",
290
290
  "./telemetry": "./dist/telemetry/index.js",
291
291
  "./telemetry/anomaly": "./dist/telemetry/anomaly.js",
292
292
  "./telemetry/docs/telemetry.docblock": "./dist/telemetry/docs/telemetry.docblock.js",
@@ -299,7 +299,6 @@
299
299
  "./translations/catalog": "./dist/translations/catalog.js",
300
300
  "./translations/tenant": "./dist/translations/tenant.js",
301
301
  "./types": "./dist/types.js",
302
- "./types/all": "./dist/types/all.js",
303
302
  "./workflow": "./dist/workflow/index.js",
304
303
  "./workflow/adapters": "./dist/workflow/adapters/index.js",
305
304
  "./workflow/adapters/db-adapter": "./dist/workflow/adapters/db-adapter.js",
@@ -311,6 +310,8 @@
311
310
  "./workflow/spec": "./dist/workflow/spec.js",
312
311
  "./workflow/state": "./dist/workflow/state.js",
313
312
  "./workflow/validation": "./dist/workflow/validation.js",
313
+ "./workspace-config": "./dist/workspace-config/index.js",
314
+ "./workspace-config/contractsrc-schema": "./dist/workspace-config/contractsrc-schema.js",
314
315
  "./*": "./*"
315
316
  },
316
317
  "publishConfig": {
@@ -320,11 +321,11 @@
320
321
  "./app-config": "./dist/app-config/index.js",
321
322
  "./app-config/app-config.feature": "./dist/app-config/app-config.feature.js",
322
323
  "./app-config/branding": "./dist/app-config/branding.js",
323
- "./app-config/contracts": "./dist/app-config/contracts.js",
324
+ "./app-config/contracts": "./dist/app-config/operations.js",
324
325
  "./app-config/docs/app-config.docblock": "./dist/app-config/docs/app-config.docblock.js",
325
326
  "./app-config/events": "./dist/app-config/events.js",
326
327
  "./app-config/lifecycle": "./dist/app-config/lifecycle.js",
327
- "./app-config/lifecycle-contracts": "./dist/app-config/lifecycle-contracts.js",
328
+ "./app-config/lifecycle-contracts": "./dist/app-config/lifecycle-operations.js",
328
329
  "./app-config/runtime": "./dist/app-config/runtime.js",
329
330
  "./app-config/spec": "./dist/app-config/spec.js",
330
331
  "./app-config/validation": "./dist/app-config/validation.js",
@@ -400,7 +401,7 @@
400
401
  "./integrations": "./dist/integrations/index.js",
401
402
  "./integrations/binding": "./dist/integrations/binding.js",
402
403
  "./integrations/connection": "./dist/integrations/connection.js",
403
- "./integrations/contracts": "./dist/integrations/contracts.js",
404
+ "./integrations/contracts": "./dist/integrations/operations.js",
404
405
  "./integrations/docs/integrations.docblock": "./dist/integrations/docs/integrations.docblock.js",
405
406
  "./integrations/health": "./dist/integrations/health.js",
406
407
  "./integrations/openbanking/contracts": "./dist/integrations/openbanking/contracts/index.js",
@@ -471,7 +472,7 @@
471
472
  "./jsonschema": "./dist/jsonschema.js",
472
473
  "./knowledge": "./dist/knowledge/index.js",
473
474
  "./knowledge/binding": "./dist/knowledge/binding.js",
474
- "./knowledge/contracts": "./dist/knowledge/contracts.js",
475
+ "./knowledge/contracts": "./dist/knowledge/operations.js",
475
476
  "./knowledge/docs/knowledge.docblock": "./dist/knowledge/docs/knowledge.docblock.js",
476
477
  "./knowledge/ingestion": "./dist/knowledge/ingestion/index.js",
477
478
  "./knowledge/ingestion/document-processor": "./dist/knowledge/ingestion/document-processor.js",
@@ -537,7 +538,7 @@
537
538
  "./server/rest-next-app": "./dist/server/rest-next-app.js",
538
539
  "./server/rest-next-mcp": "./dist/server/rest-next-mcp.js",
539
540
  "./server/rest-next-pages": "./dist/server/rest-next-pages.js",
540
- "./spec": "./dist/spec.js",
541
+ "./operation": "./dist/operation.js",
541
542
  "./telemetry": "./dist/telemetry/index.js",
542
543
  "./telemetry/anomaly": "./dist/telemetry/anomaly.js",
543
544
  "./telemetry/docs/telemetry.docblock": "./dist/telemetry/docs/telemetry.docblock.js",
@@ -1,7 +0,0 @@
1
- import { PresentationDescriptorV2 } from "./presentations.v2.js";
2
- import { PresentationSpec } from "./presentations.js";
3
-
4
- //#region src/presentations.backcompat.d.ts
5
- declare function toV2FromV1(v1: PresentationSpec): PresentationDescriptorV2;
6
- //#endregion
7
- export { toV2FromV1 };
@@ -1,47 +0,0 @@
1
- //#region src/presentations.backcompat.ts
2
- function toV2FromV1(v1) {
3
- if (v1.content.kind === "web_component") return {
4
- meta: { ...v1.meta },
5
- policy: v1.policy,
6
- source: {
7
- type: "component",
8
- framework: v1.content.framework,
9
- componentKey: v1.content.componentKey,
10
- props: v1.content.props
11
- },
12
- targets: [
13
- "react",
14
- "application/json",
15
- "application/xml"
16
- ]
17
- };
18
- if (v1.content.kind === "markdown") return {
19
- meta: { ...v1.meta },
20
- policy: v1.policy,
21
- source: {
22
- type: "blocknotejs",
23
- docJson: v1.content.content ?? v1.content.resourceUri ?? ""
24
- },
25
- targets: [
26
- "markdown",
27
- "application/json",
28
- "application/xml"
29
- ]
30
- };
31
- return {
32
- meta: { ...v1.meta },
33
- policy: v1.policy,
34
- source: {
35
- type: "blocknotejs",
36
- docJson: {
37
- kind: "data",
38
- mimeType: v1.content.mimeType,
39
- model: "schema"
40
- }
41
- },
42
- targets: ["application/json", "application/xml"]
43
- };
44
- }
45
-
46
- //#endregion
47
- export { toV2FromV1 };