@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
@@ -1,47 +1,47 @@
1
- import { AnyContractSpec, ContractSpec } from "../spec.js";
2
- import { SpecRegistry } from "../registry.js";
1
+ import { AnyOperationSpec, OperationSpec } from "../operation.js";
2
+ import { OperationSpecRegistry } from "../registry.js";
3
3
  import "../index.js";
4
- import * as _lssm_lib_schema352 from "@lssm/lib.schema";
4
+ import * as _lssm_lib_schema497 from "@lssm/lib.schema";
5
5
  import { SchemaModel } from "@lssm/lib.schema";
6
6
 
7
7
  //#region src/knowledge/contracts.d.ts
8
- declare const CreateKnowledgeSource: ContractSpec<SchemaModel<{
8
+ declare const CreateKnowledgeSource: OperationSpec<SchemaModel<{
9
9
  tenantId: {
10
- type: _lssm_lib_schema352.FieldType<string, string>;
10
+ type: _lssm_lib_schema497.FieldType<string, string>;
11
11
  isOptional: false;
12
12
  };
13
13
  spaceKey: {
14
- type: _lssm_lib_schema352.FieldType<string, string>;
14
+ type: _lssm_lib_schema497.FieldType<string, string>;
15
15
  isOptional: false;
16
16
  };
17
17
  spaceVersion: {
18
- type: _lssm_lib_schema352.FieldType<number, number>;
18
+ type: _lssm_lib_schema497.FieldType<number, number>;
19
19
  isOptional: false;
20
20
  };
21
21
  label: {
22
- type: _lssm_lib_schema352.FieldType<string, string>;
22
+ type: _lssm_lib_schema497.FieldType<string, string>;
23
23
  isOptional: false;
24
24
  };
25
25
  sourceType: {
26
- type: _lssm_lib_schema352.FieldType<string, string>;
26
+ type: _lssm_lib_schema497.FieldType<string, string>;
27
27
  isOptional: false;
28
28
  };
29
29
  config: {
30
- type: _lssm_lib_schema352.FieldType<Record<string, unknown>, Record<string, unknown>>;
30
+ type: _lssm_lib_schema497.FieldType<Record<string, unknown>, Record<string, unknown>>;
31
31
  isOptional: false;
32
32
  };
33
33
  syncSchedule: {
34
34
  type: SchemaModel<{
35
35
  enabled: {
36
- type: _lssm_lib_schema352.FieldType<boolean, boolean>;
36
+ type: _lssm_lib_schema497.FieldType<boolean, boolean>;
37
37
  isOptional: false;
38
38
  };
39
39
  cron: {
40
- type: _lssm_lib_schema352.FieldType<string, string>;
40
+ type: _lssm_lib_schema497.FieldType<string, string>;
41
41
  isOptional: true;
42
42
  };
43
43
  intervalMs: {
44
- type: _lssm_lib_schema352.FieldType<number, number>;
44
+ type: _lssm_lib_schema497.FieldType<number, number>;
45
45
  isOptional: true;
46
46
  };
47
47
  }>;
@@ -49,92 +49,92 @@ declare const CreateKnowledgeSource: ContractSpec<SchemaModel<{
49
49
  };
50
50
  }>, SchemaModel<{
51
51
  id: {
52
- type: _lssm_lib_schema352.FieldType<string, string>;
52
+ type: _lssm_lib_schema497.FieldType<string, string>;
53
53
  isOptional: false;
54
54
  };
55
55
  tenantId: {
56
- type: _lssm_lib_schema352.FieldType<string, string>;
56
+ type: _lssm_lib_schema497.FieldType<string, string>;
57
57
  isOptional: false;
58
58
  };
59
59
  spaceKey: {
60
- type: _lssm_lib_schema352.FieldType<string, string>;
60
+ type: _lssm_lib_schema497.FieldType<string, string>;
61
61
  isOptional: false;
62
62
  };
63
63
  spaceVersion: {
64
- type: _lssm_lib_schema352.FieldType<number, number>;
64
+ type: _lssm_lib_schema497.FieldType<number, number>;
65
65
  isOptional: false;
66
66
  };
67
67
  label: {
68
- type: _lssm_lib_schema352.FieldType<string, string>;
68
+ type: _lssm_lib_schema497.FieldType<string, string>;
69
69
  isOptional: false;
70
70
  };
71
71
  sourceType: {
72
- type: _lssm_lib_schema352.FieldType<string, string>;
72
+ type: _lssm_lib_schema497.FieldType<string, string>;
73
73
  isOptional: false;
74
74
  };
75
75
  syncSchedule: {
76
76
  type: SchemaModel<{
77
77
  enabled: {
78
- type: _lssm_lib_schema352.FieldType<boolean, boolean>;
78
+ type: _lssm_lib_schema497.FieldType<boolean, boolean>;
79
79
  isOptional: false;
80
80
  };
81
81
  cron: {
82
- type: _lssm_lib_schema352.FieldType<string, string>;
82
+ type: _lssm_lib_schema497.FieldType<string, string>;
83
83
  isOptional: true;
84
84
  };
85
85
  intervalMs: {
86
- type: _lssm_lib_schema352.FieldType<number, number>;
86
+ type: _lssm_lib_schema497.FieldType<number, number>;
87
87
  isOptional: true;
88
88
  };
89
89
  }>;
90
90
  isOptional: true;
91
91
  };
92
92
  lastSyncStatus: {
93
- type: _lssm_lib_schema352.FieldType<string, string>;
93
+ type: _lssm_lib_schema497.FieldType<string, string>;
94
94
  isOptional: true;
95
95
  };
96
96
  lastSyncAt: {
97
- type: _lssm_lib_schema352.FieldType<Date, string>;
97
+ type: _lssm_lib_schema497.FieldType<Date, string>;
98
98
  isOptional: true;
99
99
  };
100
100
  itemsProcessed: {
101
- type: _lssm_lib_schema352.FieldType<number, number>;
101
+ type: _lssm_lib_schema497.FieldType<number, number>;
102
102
  isOptional: true;
103
103
  };
104
104
  createdAt: {
105
- type: _lssm_lib_schema352.FieldType<Date, string>;
105
+ type: _lssm_lib_schema497.FieldType<Date, string>;
106
106
  isOptional: true;
107
107
  };
108
108
  updatedAt: {
109
- type: _lssm_lib_schema352.FieldType<Date, string>;
109
+ type: _lssm_lib_schema497.FieldType<Date, string>;
110
110
  isOptional: true;
111
111
  };
112
112
  }>, undefined>;
113
- declare const UpdateKnowledgeSource: ContractSpec<SchemaModel<{
113
+ declare const UpdateKnowledgeSource: OperationSpec<SchemaModel<{
114
114
  sourceId: {
115
- type: _lssm_lib_schema352.FieldType<string, string>;
115
+ type: _lssm_lib_schema497.FieldType<string, string>;
116
116
  isOptional: false;
117
117
  };
118
118
  label: {
119
- type: _lssm_lib_schema352.FieldType<string, string>;
119
+ type: _lssm_lib_schema497.FieldType<string, string>;
120
120
  isOptional: true;
121
121
  };
122
122
  config: {
123
- type: _lssm_lib_schema352.FieldType<Record<string, unknown>, Record<string, unknown>>;
123
+ type: _lssm_lib_schema497.FieldType<Record<string, unknown>, Record<string, unknown>>;
124
124
  isOptional: true;
125
125
  };
126
126
  syncSchedule: {
127
127
  type: SchemaModel<{
128
128
  enabled: {
129
- type: _lssm_lib_schema352.FieldType<boolean, boolean>;
129
+ type: _lssm_lib_schema497.FieldType<boolean, boolean>;
130
130
  isOptional: false;
131
131
  };
132
132
  cron: {
133
- type: _lssm_lib_schema352.FieldType<string, string>;
133
+ type: _lssm_lib_schema497.FieldType<string, string>;
134
134
  isOptional: true;
135
135
  };
136
136
  intervalMs: {
137
- type: _lssm_lib_schema352.FieldType<number, number>;
137
+ type: _lssm_lib_schema497.FieldType<number, number>;
138
138
  isOptional: true;
139
139
  };
140
140
  }>;
@@ -142,149 +142,149 @@ declare const UpdateKnowledgeSource: ContractSpec<SchemaModel<{
142
142
  };
143
143
  }>, SchemaModel<{
144
144
  id: {
145
- type: _lssm_lib_schema352.FieldType<string, string>;
145
+ type: _lssm_lib_schema497.FieldType<string, string>;
146
146
  isOptional: false;
147
147
  };
148
148
  tenantId: {
149
- type: _lssm_lib_schema352.FieldType<string, string>;
149
+ type: _lssm_lib_schema497.FieldType<string, string>;
150
150
  isOptional: false;
151
151
  };
152
152
  spaceKey: {
153
- type: _lssm_lib_schema352.FieldType<string, string>;
153
+ type: _lssm_lib_schema497.FieldType<string, string>;
154
154
  isOptional: false;
155
155
  };
156
156
  spaceVersion: {
157
- type: _lssm_lib_schema352.FieldType<number, number>;
157
+ type: _lssm_lib_schema497.FieldType<number, number>;
158
158
  isOptional: false;
159
159
  };
160
160
  label: {
161
- type: _lssm_lib_schema352.FieldType<string, string>;
161
+ type: _lssm_lib_schema497.FieldType<string, string>;
162
162
  isOptional: false;
163
163
  };
164
164
  sourceType: {
165
- type: _lssm_lib_schema352.FieldType<string, string>;
165
+ type: _lssm_lib_schema497.FieldType<string, string>;
166
166
  isOptional: false;
167
167
  };
168
168
  syncSchedule: {
169
169
  type: SchemaModel<{
170
170
  enabled: {
171
- type: _lssm_lib_schema352.FieldType<boolean, boolean>;
171
+ type: _lssm_lib_schema497.FieldType<boolean, boolean>;
172
172
  isOptional: false;
173
173
  };
174
174
  cron: {
175
- type: _lssm_lib_schema352.FieldType<string, string>;
175
+ type: _lssm_lib_schema497.FieldType<string, string>;
176
176
  isOptional: true;
177
177
  };
178
178
  intervalMs: {
179
- type: _lssm_lib_schema352.FieldType<number, number>;
179
+ type: _lssm_lib_schema497.FieldType<number, number>;
180
180
  isOptional: true;
181
181
  };
182
182
  }>;
183
183
  isOptional: true;
184
184
  };
185
185
  lastSyncStatus: {
186
- type: _lssm_lib_schema352.FieldType<string, string>;
186
+ type: _lssm_lib_schema497.FieldType<string, string>;
187
187
  isOptional: true;
188
188
  };
189
189
  lastSyncAt: {
190
- type: _lssm_lib_schema352.FieldType<Date, string>;
190
+ type: _lssm_lib_schema497.FieldType<Date, string>;
191
191
  isOptional: true;
192
192
  };
193
193
  itemsProcessed: {
194
- type: _lssm_lib_schema352.FieldType<number, number>;
194
+ type: _lssm_lib_schema497.FieldType<number, number>;
195
195
  isOptional: true;
196
196
  };
197
197
  createdAt: {
198
- type: _lssm_lib_schema352.FieldType<Date, string>;
198
+ type: _lssm_lib_schema497.FieldType<Date, string>;
199
199
  isOptional: true;
200
200
  };
201
201
  updatedAt: {
202
- type: _lssm_lib_schema352.FieldType<Date, string>;
202
+ type: _lssm_lib_schema497.FieldType<Date, string>;
203
203
  isOptional: true;
204
204
  };
205
205
  }>, undefined>;
206
- declare const DeleteKnowledgeSource: ContractSpec<SchemaModel<{
206
+ declare const DeleteKnowledgeSource: OperationSpec<SchemaModel<{
207
207
  sourceId: {
208
- type: _lssm_lib_schema352.FieldType<string, string>;
208
+ type: _lssm_lib_schema497.FieldType<string, string>;
209
209
  isOptional: false;
210
210
  };
211
211
  }>, SchemaModel<{
212
212
  success: {
213
- type: _lssm_lib_schema352.FieldType<boolean, boolean>;
213
+ type: _lssm_lib_schema497.FieldType<boolean, boolean>;
214
214
  isOptional: false;
215
215
  };
216
216
  }>, undefined>;
217
- declare const ListKnowledgeSources: ContractSpec<SchemaModel<{
217
+ declare const ListKnowledgeSources: OperationSpec<SchemaModel<{
218
218
  tenantId: {
219
- type: _lssm_lib_schema352.FieldType<string, string>;
219
+ type: _lssm_lib_schema497.FieldType<string, string>;
220
220
  isOptional: false;
221
221
  };
222
222
  spaceKey: {
223
- type: _lssm_lib_schema352.FieldType<string, string>;
223
+ type: _lssm_lib_schema497.FieldType<string, string>;
224
224
  isOptional: true;
225
225
  };
226
226
  }>, SchemaModel<{
227
227
  sources: {
228
228
  type: SchemaModel<{
229
229
  id: {
230
- type: _lssm_lib_schema352.FieldType<string, string>;
230
+ type: _lssm_lib_schema497.FieldType<string, string>;
231
231
  isOptional: false;
232
232
  };
233
233
  tenantId: {
234
- type: _lssm_lib_schema352.FieldType<string, string>;
234
+ type: _lssm_lib_schema497.FieldType<string, string>;
235
235
  isOptional: false;
236
236
  };
237
237
  spaceKey: {
238
- type: _lssm_lib_schema352.FieldType<string, string>;
238
+ type: _lssm_lib_schema497.FieldType<string, string>;
239
239
  isOptional: false;
240
240
  };
241
241
  spaceVersion: {
242
- type: _lssm_lib_schema352.FieldType<number, number>;
242
+ type: _lssm_lib_schema497.FieldType<number, number>;
243
243
  isOptional: false;
244
244
  };
245
245
  label: {
246
- type: _lssm_lib_schema352.FieldType<string, string>;
246
+ type: _lssm_lib_schema497.FieldType<string, string>;
247
247
  isOptional: false;
248
248
  };
249
249
  sourceType: {
250
- type: _lssm_lib_schema352.FieldType<string, string>;
250
+ type: _lssm_lib_schema497.FieldType<string, string>;
251
251
  isOptional: false;
252
252
  };
253
253
  syncSchedule: {
254
254
  type: SchemaModel<{
255
255
  enabled: {
256
- type: _lssm_lib_schema352.FieldType<boolean, boolean>;
256
+ type: _lssm_lib_schema497.FieldType<boolean, boolean>;
257
257
  isOptional: false;
258
258
  };
259
259
  cron: {
260
- type: _lssm_lib_schema352.FieldType<string, string>;
260
+ type: _lssm_lib_schema497.FieldType<string, string>;
261
261
  isOptional: true;
262
262
  };
263
263
  intervalMs: {
264
- type: _lssm_lib_schema352.FieldType<number, number>;
264
+ type: _lssm_lib_schema497.FieldType<number, number>;
265
265
  isOptional: true;
266
266
  };
267
267
  }>;
268
268
  isOptional: true;
269
269
  };
270
270
  lastSyncStatus: {
271
- type: _lssm_lib_schema352.FieldType<string, string>;
271
+ type: _lssm_lib_schema497.FieldType<string, string>;
272
272
  isOptional: true;
273
273
  };
274
274
  lastSyncAt: {
275
- type: _lssm_lib_schema352.FieldType<Date, string>;
275
+ type: _lssm_lib_schema497.FieldType<Date, string>;
276
276
  isOptional: true;
277
277
  };
278
278
  itemsProcessed: {
279
- type: _lssm_lib_schema352.FieldType<number, number>;
279
+ type: _lssm_lib_schema497.FieldType<number, number>;
280
280
  isOptional: true;
281
281
  };
282
282
  createdAt: {
283
- type: _lssm_lib_schema352.FieldType<Date, string>;
283
+ type: _lssm_lib_schema497.FieldType<Date, string>;
284
284
  isOptional: true;
285
285
  };
286
286
  updatedAt: {
287
- type: _lssm_lib_schema352.FieldType<Date, string>;
287
+ type: _lssm_lib_schema497.FieldType<Date, string>;
288
288
  isOptional: true;
289
289
  };
290
290
  }>;
@@ -292,26 +292,26 @@ declare const ListKnowledgeSources: ContractSpec<SchemaModel<{
292
292
  isArray: true;
293
293
  };
294
294
  }>, undefined>;
295
- declare const TriggerKnowledgeSourceSync: ContractSpec<SchemaModel<{
295
+ declare const TriggerKnowledgeSourceSync: OperationSpec<SchemaModel<{
296
296
  sourceId: {
297
- type: _lssm_lib_schema352.FieldType<string, string>;
297
+ type: _lssm_lib_schema497.FieldType<string, string>;
298
298
  isOptional: false;
299
299
  };
300
300
  }>, SchemaModel<{
301
301
  success: {
302
- type: _lssm_lib_schema352.FieldType<boolean, boolean>;
302
+ type: _lssm_lib_schema497.FieldType<boolean, boolean>;
303
303
  isOptional: false;
304
304
  };
305
305
  itemsProcessed: {
306
- type: _lssm_lib_schema352.FieldType<number, number>;
306
+ type: _lssm_lib_schema497.FieldType<number, number>;
307
307
  isOptional: true;
308
308
  };
309
309
  error: {
310
- type: _lssm_lib_schema352.FieldType<string, string>;
310
+ type: _lssm_lib_schema497.FieldType<string, string>;
311
311
  isOptional: true;
312
312
  };
313
313
  }>, undefined>;
314
- declare const knowledgeContracts: Record<string, AnyContractSpec>;
315
- declare function registerKnowledgeContracts(registry: SpecRegistry): SpecRegistry;
314
+ declare const knowledgeContracts: Record<string, AnyOperationSpec>;
315
+ declare function registerKnowledgeContracts(registry: OperationSpecRegistry): OperationSpecRegistry;
316
316
  //#endregion
317
317
  export { CreateKnowledgeSource, DeleteKnowledgeSource, ListKnowledgeSources, TriggerKnowledgeSourceSync, UpdateKnowledgeSource, knowledgeContracts, registerKnowledgeContracts };
@@ -1,5 +1,5 @@
1
1
  import { E5, x8 } from "../schema/dist/index.js";
2
- import { defineCommand, defineQuery } from "../spec.js";
2
+ import { defineCommand, defineQuery } from "../operation.js";
3
3
 
4
4
  //#region src/knowledge/contracts.ts
5
5
  const KnowledgeSyncSchedule = new x8({
@@ -2,8 +2,8 @@ import { PresentationDescriptorV2 } from "../presentations.v2.js";
2
2
  import { PresentationRegistry } from "../presentations.js";
3
3
  import { DocBlock } from "../docs/types.js";
4
4
  import { EventSpec } from "../events.js";
5
- import { AnyContractSpec } from "../spec.js";
6
- import { SpecRegistry } from "../registry.js";
5
+ import { AnyOperationSpec } from "../operation.js";
6
+ import { OperationSpecRegistry } from "../registry.js";
7
7
  import { FeatureModuleSpec } from "../features.js";
8
8
  import { FeatureExportOptions, FeatureExportResult, SpecExportOptions, SpecExportResult } from "./types.js";
9
9
  import { AnySchemaModel } from "@lssm/lib.schema";
@@ -15,19 +15,19 @@ import { AnySchemaModel } from "@lssm/lib.schema";
15
15
  * Includes: goal, context, description, acceptance scenarios.
16
16
  * Best for: Understanding what the spec does, providing context to LLMs.
17
17
  */
18
- declare function specToContextMarkdown(spec: AnyContractSpec): string;
18
+ declare function specToContextMarkdown(spec: AnyOperationSpec): string;
19
19
  /**
20
20
  * Export a single spec to full markdown with all details.
21
21
  * Includes: all fields, I/O schemas, policy, events, examples.
22
22
  * Best for: Complete documentation, implementation reference.
23
23
  */
24
- declare function specToFullMarkdown(spec: AnyContractSpec, options?: Partial<SpecExportOptions>): string;
24
+ declare function specToFullMarkdown(spec: AnyOperationSpec, options?: Partial<SpecExportOptions>): string;
25
25
  /**
26
26
  * Export a single spec as an actionable agent prompt.
27
27
  * Includes: instructions, full spec, expected output format.
28
28
  * Best for: Directly feeding to coding agents for implementation.
29
29
  */
30
- declare function specToAgentPrompt(spec: AnyContractSpec, options?: {
30
+ declare function specToAgentPrompt(spec: AnyOperationSpec, options?: {
31
31
  taskType?: 'implement' | 'test' | 'refactor' | 'review';
32
32
  existingCode?: string;
33
33
  }): string;
@@ -36,7 +36,7 @@ declare function specToAgentPrompt(spec: AnyContractSpec, options?: {
36
36
  * Includes all related specs, events, and presentations.
37
37
  */
38
38
  declare function featureToMarkdown(feature: FeatureModuleSpec, deps?: {
39
- specs?: SpecRegistry;
39
+ specs?: OperationSpecRegistry;
40
40
  presentations?: PresentationRegistry;
41
41
  }, options?: Partial<FeatureExportOptions>): string;
42
42
  /**
@@ -55,12 +55,12 @@ declare function docBlockToMarkdown(doc: DocBlock): string;
55
55
  * Export a spec with a specific format.
56
56
  * Convenience function that wraps the format-specific functions.
57
57
  */
58
- declare function exportSpec(spec: AnyContractSpec, options?: Partial<SpecExportOptions>): SpecExportResult;
58
+ declare function exportSpec(spec: AnyOperationSpec, options?: Partial<SpecExportOptions>): SpecExportResult;
59
59
  /**
60
60
  * Export a feature with a specific format.
61
61
  */
62
62
  declare function exportFeature(feature: FeatureModuleSpec, deps?: {
63
- specs?: SpecRegistry;
63
+ specs?: OperationSpecRegistry;
64
64
  presentations?: PresentationRegistry;
65
65
  }, options?: Partial<FeatureExportOptions>): FeatureExportResult;
66
66
  //#endregion
@@ -1,5 +1,5 @@
1
1
  import { jsonSchemaForSpec } from "../jsonschema.js";
2
- import { isEmitDeclRef } from "../spec.js";
2
+ import { isEmitDeclRef } from "../operation.js";
3
3
 
4
4
  //#region src/llm/exporters.ts
5
5
  const DEFAULT_SPEC_OPTIONS = {
@@ -1,4 +1,4 @@
1
- import { AnyContractSpec } from "../spec.js";
1
+ import { AnyOperationSpec } from "../operation.js";
2
2
  import { AgentPrompt, AgentType, ImplementationPlan } from "./types.js";
3
3
 
4
4
  //#region src/llm/prompts.d.ts
@@ -10,29 +10,29 @@ declare const AGENT_SYSTEM_PROMPTS: Record<AgentType, string>;
10
10
  /**
11
11
  * Generate an implementation prompt for a specific agent type.
12
12
  */
13
- declare function generateImplementationPrompt(spec: AnyContractSpec, agent: AgentType, options?: {
13
+ declare function generateImplementationPrompt(spec: AnyOperationSpec, agent: AgentType, options?: {
14
14
  existingCode?: string;
15
15
  targetPath?: string;
16
16
  }): AgentPrompt;
17
17
  /**
18
18
  * Generate a test generation prompt.
19
19
  */
20
- declare function generateTestPrompt(spec: AnyContractSpec, agent: AgentType, options?: {
20
+ declare function generateTestPrompt(spec: AnyOperationSpec, agent: AgentType, options?: {
21
21
  implementationCode?: string;
22
22
  testFramework?: 'vitest' | 'jest' | 'bun';
23
23
  }): AgentPrompt;
24
24
  /**
25
25
  * Generate a code review prompt.
26
26
  */
27
- declare function generateReviewPrompt(spec: AnyContractSpec, agent: AgentType, implementationCode: string): AgentPrompt;
27
+ declare function generateReviewPrompt(spec: AnyOperationSpec, agent: AgentType, implementationCode: string): AgentPrompt;
28
28
  /**
29
29
  * Generate a verification prompt for AI-powered semantic review.
30
30
  */
31
- declare function generateVerificationPrompt(spec: AnyContractSpec, implementationCode: string): AgentPrompt;
31
+ declare function generateVerificationPrompt(spec: AnyOperationSpec, implementationCode: string): AgentPrompt;
32
32
  /**
33
33
  * Generate a feature implementation plan.
34
34
  */
35
- declare function generateImplementationPlan(spec: AnyContractSpec, options?: {
35
+ declare function generateImplementationPlan(spec: AnyOperationSpec, options?: {
36
36
  projectRoot?: string;
37
37
  existingFiles?: string[];
38
38
  }): ImplementationPlan;
@@ -43,7 +43,7 @@ declare function formatPlanForAgent(plan: ImplementationPlan, agent: AgentType):
43
43
  /**
44
44
  * Generate a fix violations prompt after verification.
45
45
  */
46
- declare function generateFixViolationsPrompt(spec: AnyContractSpec, implementationCode: string, violations: {
46
+ declare function generateFixViolationsPrompt(spec: AnyOperationSpec, implementationCode: string, violations: {
47
47
  message: string;
48
48
  suggestion?: string;
49
49
  }[]): AgentPrompt;
@@ -1,7 +1,7 @@
1
1
  import { PresentationDescriptorV2 } from "../presentations.v2.js";
2
2
  import { DocBlock } from "../docs/types.js";
3
3
  import { EventSpec } from "../events.js";
4
- import { AnyContractSpec } from "../spec.js";
4
+ import { AnyOperationSpec } from "../operation.js";
5
5
  import { FeatureModuleSpec } from "../features.js";
6
6
  import { AnySchemaModel } from "@lssm/lib.schema";
7
7
 
@@ -40,7 +40,7 @@ interface FeatureExportOptions extends SpecExportOptions {
40
40
  /** Result of spec export */
41
41
  interface SpecExportResult {
42
42
  /** The spec that was exported */
43
- spec: AnyContractSpec;
43
+ spec: AnyOperationSpec;
44
44
  /** Generated markdown content */
45
45
  markdown: string;
46
46
  /** Export format used */
@@ -195,7 +195,7 @@ interface BatchExportOptions extends SpecExportOptions {
195
195
  /** Exportable item types */
196
196
  type ExportableItem = {
197
197
  type: 'spec';
198
- item: AnyContractSpec;
198
+ item: AnyOperationSpec;
199
199
  } | {
200
200
  type: 'feature';
201
201
  item: FeatureModuleSpec;
@@ -1,5 +1,5 @@
1
1
  import { PresentationRegistry } from "./presentations.js";
2
- import { SpecRegistry } from "./registry.js";
2
+ import { OperationSpecRegistry } from "./registry.js";
3
3
  import { FeatureRegistry } from "./features.js";
4
4
 
5
5
  //#region src/markdown.d.ts
@@ -8,12 +8,12 @@ import { FeatureRegistry } from "./features.js";
8
8
  * Render simple Markdown docs for each spec.
9
9
  * Useful for dev portals and repo docs generation.
10
10
  */
11
- declare function specsToMarkdown(reg: SpecRegistry, _extras?: {
11
+ declare function specsToMarkdown(reg: OperationSpecRegistry, _extras?: {
12
12
  presentations?: PresentationRegistry;
13
13
  features?: FeatureRegistry;
14
14
  }): string;
15
15
  /** Render presentations and features as additional sections. */
16
- declare function docsToMarkdown(reg: SpecRegistry, extras: {
16
+ declare function docsToMarkdown(reg: OperationSpecRegistry, extras: {
17
17
  presentations?: PresentationRegistry;
18
18
  features?: FeatureRegistry;
19
19
  }): string;
package/dist/markdown.js CHANGED
@@ -1,4 +1,4 @@
1
- import { isEmitDeclRef } from "./spec.js";
1
+ import { isEmitDeclRef } from "./operation.js";
2
2
 
3
3
  //#region src/markdown.ts
4
4
  /**