@lssm/lib.contracts 0.0.0-canary-20251220041653 → 0.0.0-canary-20251221114240
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/app-config/contracts.d.ts +60 -60
- package/dist/app-config/contracts.js +1 -1
- package/dist/app-config/events.d.ts +27 -27
- package/dist/app-config/lifecycle-contracts.d.ts +90 -90
- package/dist/app-config/lifecycle-contracts.js +1 -1
- package/dist/docs/tech/contracts/README.docblock.js +2 -2
- package/dist/docs/tech/contracts/openapi-export.docblock.js +6 -6
- package/dist/docs/tech/contracts/ops-to-presentation-linking.docblock.js +2 -2
- package/dist/docs/tech/contracts/tests.docblock.js +2 -2
- package/dist/experiments/spec-resolver.d.ts +2 -2
- package/dist/features.d.ts +5 -5
- package/dist/index.d.ts +6 -4
- package/dist/index.js +5 -3
- package/dist/install.d.ts +16 -16
- package/dist/integrations/contracts.d.ts +111 -111
- package/dist/integrations/contracts.js +1 -1
- package/dist/integrations/openbanking/contracts/accounts.d.ts +73 -73
- package/dist/integrations/openbanking/contracts/accounts.js +1 -1
- package/dist/integrations/openbanking/contracts/balances.d.ts +40 -40
- package/dist/integrations/openbanking/contracts/balances.js +1 -1
- package/dist/integrations/openbanking/contracts/index.d.ts +2 -2
- package/dist/integrations/openbanking/contracts/transactions.d.ts +54 -54
- package/dist/integrations/openbanking/contracts/transactions.js +1 -1
- package/dist/integrations/openbanking/models.d.ts +55 -55
- package/dist/jsonschema.d.ts +5 -5
- package/dist/knowledge/contracts.d.ts +75 -75
- package/dist/knowledge/contracts.js +1 -1
- package/dist/llm/exporters.d.ts +8 -8
- package/dist/llm/exporters.js +1 -1
- package/dist/llm/prompts.d.ts +7 -7
- package/dist/llm/types.d.ts +3 -3
- package/dist/markdown.d.ts +3 -3
- package/dist/markdown.js +1 -1
- package/dist/onboarding-base.d.ts +32 -32
- package/dist/onboarding-base.js +1 -1
- package/dist/openapi.d.ts +2 -2
- package/dist/{spec.d.ts → operation.d.ts} +12 -12
- package/dist/{spec.js → operation.js} +1 -1
- package/dist/policy/docs/policy.docblock.js +1 -1
- package/dist/presentations.d.ts +3 -3
- package/dist/registry.d.ts +13 -14
- package/dist/registry.js +5 -5
- package/dist/server/graphql-pothos.d.ts +6 -6
- package/dist/server/graphql-pothos.js +4 -4
- package/dist/server/mcp/createMcpServer.d.ts +3 -3
- package/dist/server/mcp/createMcpServer.js +1 -1
- package/dist/server/mcp/registerTools.d.ts +2 -2
- package/dist/server/rest-elysia.d.ts +2 -2
- package/dist/server/rest-express.d.ts +2 -2
- package/dist/server/rest-generic.d.ts +3 -3
- package/dist/server/rest-generic.js +1 -1
- package/dist/server/rest-next-app.d.ts +4 -4
- package/dist/server/rest-next-app.js +2 -2
- package/dist/server/rest-next-mcp.d.ts +2 -2
- package/dist/server/rest-next-pages.d.ts +2 -2
- package/dist/telemetry/docs/telemetry.docblock.js +1 -1
- package/dist/tests/runner.d.ts +2 -2
- package/dist/types/all.d.ts +2 -2
- package/dist/workflow/validation.d.ts +2 -2
- package/dist/workspace-config/contractsrc-schema.d.ts +188 -0
- package/dist/workspace-config/contractsrc-schema.js +114 -0
- package/dist/workspace-config/index.d.ts +2 -0
- package/dist/workspace-config/index.js +3 -0
- package/package.json +13 -11
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { AnyOperationSpec, OperationSpec } from "../operation.js";
|
|
2
|
+
import { OperationSpecRegistry } from "../registry.js";
|
|
3
3
|
import "../index.js";
|
|
4
|
-
import * as
|
|
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:
|
|
8
|
+
declare const CreateKnowledgeSource: OperationSpec<SchemaModel<{
|
|
9
9
|
tenantId: {
|
|
10
|
-
type:
|
|
10
|
+
type: _lssm_lib_schema497.FieldType<string, string>;
|
|
11
11
|
isOptional: false;
|
|
12
12
|
};
|
|
13
13
|
spaceKey: {
|
|
14
|
-
type:
|
|
14
|
+
type: _lssm_lib_schema497.FieldType<string, string>;
|
|
15
15
|
isOptional: false;
|
|
16
16
|
};
|
|
17
17
|
spaceVersion: {
|
|
18
|
-
type:
|
|
18
|
+
type: _lssm_lib_schema497.FieldType<number, number>;
|
|
19
19
|
isOptional: false;
|
|
20
20
|
};
|
|
21
21
|
label: {
|
|
22
|
-
type:
|
|
22
|
+
type: _lssm_lib_schema497.FieldType<string, string>;
|
|
23
23
|
isOptional: false;
|
|
24
24
|
};
|
|
25
25
|
sourceType: {
|
|
26
|
-
type:
|
|
26
|
+
type: _lssm_lib_schema497.FieldType<string, string>;
|
|
27
27
|
isOptional: false;
|
|
28
28
|
};
|
|
29
29
|
config: {
|
|
30
|
-
type:
|
|
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:
|
|
36
|
+
type: _lssm_lib_schema497.FieldType<boolean, boolean>;
|
|
37
37
|
isOptional: false;
|
|
38
38
|
};
|
|
39
39
|
cron: {
|
|
40
|
-
type:
|
|
40
|
+
type: _lssm_lib_schema497.FieldType<string, string>;
|
|
41
41
|
isOptional: true;
|
|
42
42
|
};
|
|
43
43
|
intervalMs: {
|
|
44
|
-
type:
|
|
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:
|
|
52
|
+
type: _lssm_lib_schema497.FieldType<string, string>;
|
|
53
53
|
isOptional: false;
|
|
54
54
|
};
|
|
55
55
|
tenantId: {
|
|
56
|
-
type:
|
|
56
|
+
type: _lssm_lib_schema497.FieldType<string, string>;
|
|
57
57
|
isOptional: false;
|
|
58
58
|
};
|
|
59
59
|
spaceKey: {
|
|
60
|
-
type:
|
|
60
|
+
type: _lssm_lib_schema497.FieldType<string, string>;
|
|
61
61
|
isOptional: false;
|
|
62
62
|
};
|
|
63
63
|
spaceVersion: {
|
|
64
|
-
type:
|
|
64
|
+
type: _lssm_lib_schema497.FieldType<number, number>;
|
|
65
65
|
isOptional: false;
|
|
66
66
|
};
|
|
67
67
|
label: {
|
|
68
|
-
type:
|
|
68
|
+
type: _lssm_lib_schema497.FieldType<string, string>;
|
|
69
69
|
isOptional: false;
|
|
70
70
|
};
|
|
71
71
|
sourceType: {
|
|
72
|
-
type:
|
|
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:
|
|
78
|
+
type: _lssm_lib_schema497.FieldType<boolean, boolean>;
|
|
79
79
|
isOptional: false;
|
|
80
80
|
};
|
|
81
81
|
cron: {
|
|
82
|
-
type:
|
|
82
|
+
type: _lssm_lib_schema497.FieldType<string, string>;
|
|
83
83
|
isOptional: true;
|
|
84
84
|
};
|
|
85
85
|
intervalMs: {
|
|
86
|
-
type:
|
|
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:
|
|
93
|
+
type: _lssm_lib_schema497.FieldType<string, string>;
|
|
94
94
|
isOptional: true;
|
|
95
95
|
};
|
|
96
96
|
lastSyncAt: {
|
|
97
|
-
type:
|
|
97
|
+
type: _lssm_lib_schema497.FieldType<Date, string>;
|
|
98
98
|
isOptional: true;
|
|
99
99
|
};
|
|
100
100
|
itemsProcessed: {
|
|
101
|
-
type:
|
|
101
|
+
type: _lssm_lib_schema497.FieldType<number, number>;
|
|
102
102
|
isOptional: true;
|
|
103
103
|
};
|
|
104
104
|
createdAt: {
|
|
105
|
-
type:
|
|
105
|
+
type: _lssm_lib_schema497.FieldType<Date, string>;
|
|
106
106
|
isOptional: true;
|
|
107
107
|
};
|
|
108
108
|
updatedAt: {
|
|
109
|
-
type:
|
|
109
|
+
type: _lssm_lib_schema497.FieldType<Date, string>;
|
|
110
110
|
isOptional: true;
|
|
111
111
|
};
|
|
112
112
|
}>, undefined>;
|
|
113
|
-
declare const UpdateKnowledgeSource:
|
|
113
|
+
declare const UpdateKnowledgeSource: OperationSpec<SchemaModel<{
|
|
114
114
|
sourceId: {
|
|
115
|
-
type:
|
|
115
|
+
type: _lssm_lib_schema497.FieldType<string, string>;
|
|
116
116
|
isOptional: false;
|
|
117
117
|
};
|
|
118
118
|
label: {
|
|
119
|
-
type:
|
|
119
|
+
type: _lssm_lib_schema497.FieldType<string, string>;
|
|
120
120
|
isOptional: true;
|
|
121
121
|
};
|
|
122
122
|
config: {
|
|
123
|
-
type:
|
|
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:
|
|
129
|
+
type: _lssm_lib_schema497.FieldType<boolean, boolean>;
|
|
130
130
|
isOptional: false;
|
|
131
131
|
};
|
|
132
132
|
cron: {
|
|
133
|
-
type:
|
|
133
|
+
type: _lssm_lib_schema497.FieldType<string, string>;
|
|
134
134
|
isOptional: true;
|
|
135
135
|
};
|
|
136
136
|
intervalMs: {
|
|
137
|
-
type:
|
|
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:
|
|
145
|
+
type: _lssm_lib_schema497.FieldType<string, string>;
|
|
146
146
|
isOptional: false;
|
|
147
147
|
};
|
|
148
148
|
tenantId: {
|
|
149
|
-
type:
|
|
149
|
+
type: _lssm_lib_schema497.FieldType<string, string>;
|
|
150
150
|
isOptional: false;
|
|
151
151
|
};
|
|
152
152
|
spaceKey: {
|
|
153
|
-
type:
|
|
153
|
+
type: _lssm_lib_schema497.FieldType<string, string>;
|
|
154
154
|
isOptional: false;
|
|
155
155
|
};
|
|
156
156
|
spaceVersion: {
|
|
157
|
-
type:
|
|
157
|
+
type: _lssm_lib_schema497.FieldType<number, number>;
|
|
158
158
|
isOptional: false;
|
|
159
159
|
};
|
|
160
160
|
label: {
|
|
161
|
-
type:
|
|
161
|
+
type: _lssm_lib_schema497.FieldType<string, string>;
|
|
162
162
|
isOptional: false;
|
|
163
163
|
};
|
|
164
164
|
sourceType: {
|
|
165
|
-
type:
|
|
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:
|
|
171
|
+
type: _lssm_lib_schema497.FieldType<boolean, boolean>;
|
|
172
172
|
isOptional: false;
|
|
173
173
|
};
|
|
174
174
|
cron: {
|
|
175
|
-
type:
|
|
175
|
+
type: _lssm_lib_schema497.FieldType<string, string>;
|
|
176
176
|
isOptional: true;
|
|
177
177
|
};
|
|
178
178
|
intervalMs: {
|
|
179
|
-
type:
|
|
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:
|
|
186
|
+
type: _lssm_lib_schema497.FieldType<string, string>;
|
|
187
187
|
isOptional: true;
|
|
188
188
|
};
|
|
189
189
|
lastSyncAt: {
|
|
190
|
-
type:
|
|
190
|
+
type: _lssm_lib_schema497.FieldType<Date, string>;
|
|
191
191
|
isOptional: true;
|
|
192
192
|
};
|
|
193
193
|
itemsProcessed: {
|
|
194
|
-
type:
|
|
194
|
+
type: _lssm_lib_schema497.FieldType<number, number>;
|
|
195
195
|
isOptional: true;
|
|
196
196
|
};
|
|
197
197
|
createdAt: {
|
|
198
|
-
type:
|
|
198
|
+
type: _lssm_lib_schema497.FieldType<Date, string>;
|
|
199
199
|
isOptional: true;
|
|
200
200
|
};
|
|
201
201
|
updatedAt: {
|
|
202
|
-
type:
|
|
202
|
+
type: _lssm_lib_schema497.FieldType<Date, string>;
|
|
203
203
|
isOptional: true;
|
|
204
204
|
};
|
|
205
205
|
}>, undefined>;
|
|
206
|
-
declare const DeleteKnowledgeSource:
|
|
206
|
+
declare const DeleteKnowledgeSource: OperationSpec<SchemaModel<{
|
|
207
207
|
sourceId: {
|
|
208
|
-
type:
|
|
208
|
+
type: _lssm_lib_schema497.FieldType<string, string>;
|
|
209
209
|
isOptional: false;
|
|
210
210
|
};
|
|
211
211
|
}>, SchemaModel<{
|
|
212
212
|
success: {
|
|
213
|
-
type:
|
|
213
|
+
type: _lssm_lib_schema497.FieldType<boolean, boolean>;
|
|
214
214
|
isOptional: false;
|
|
215
215
|
};
|
|
216
216
|
}>, undefined>;
|
|
217
|
-
declare const ListKnowledgeSources:
|
|
217
|
+
declare const ListKnowledgeSources: OperationSpec<SchemaModel<{
|
|
218
218
|
tenantId: {
|
|
219
|
-
type:
|
|
219
|
+
type: _lssm_lib_schema497.FieldType<string, string>;
|
|
220
220
|
isOptional: false;
|
|
221
221
|
};
|
|
222
222
|
spaceKey: {
|
|
223
|
-
type:
|
|
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:
|
|
230
|
+
type: _lssm_lib_schema497.FieldType<string, string>;
|
|
231
231
|
isOptional: false;
|
|
232
232
|
};
|
|
233
233
|
tenantId: {
|
|
234
|
-
type:
|
|
234
|
+
type: _lssm_lib_schema497.FieldType<string, string>;
|
|
235
235
|
isOptional: false;
|
|
236
236
|
};
|
|
237
237
|
spaceKey: {
|
|
238
|
-
type:
|
|
238
|
+
type: _lssm_lib_schema497.FieldType<string, string>;
|
|
239
239
|
isOptional: false;
|
|
240
240
|
};
|
|
241
241
|
spaceVersion: {
|
|
242
|
-
type:
|
|
242
|
+
type: _lssm_lib_schema497.FieldType<number, number>;
|
|
243
243
|
isOptional: false;
|
|
244
244
|
};
|
|
245
245
|
label: {
|
|
246
|
-
type:
|
|
246
|
+
type: _lssm_lib_schema497.FieldType<string, string>;
|
|
247
247
|
isOptional: false;
|
|
248
248
|
};
|
|
249
249
|
sourceType: {
|
|
250
|
-
type:
|
|
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:
|
|
256
|
+
type: _lssm_lib_schema497.FieldType<boolean, boolean>;
|
|
257
257
|
isOptional: false;
|
|
258
258
|
};
|
|
259
259
|
cron: {
|
|
260
|
-
type:
|
|
260
|
+
type: _lssm_lib_schema497.FieldType<string, string>;
|
|
261
261
|
isOptional: true;
|
|
262
262
|
};
|
|
263
263
|
intervalMs: {
|
|
264
|
-
type:
|
|
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:
|
|
271
|
+
type: _lssm_lib_schema497.FieldType<string, string>;
|
|
272
272
|
isOptional: true;
|
|
273
273
|
};
|
|
274
274
|
lastSyncAt: {
|
|
275
|
-
type:
|
|
275
|
+
type: _lssm_lib_schema497.FieldType<Date, string>;
|
|
276
276
|
isOptional: true;
|
|
277
277
|
};
|
|
278
278
|
itemsProcessed: {
|
|
279
|
-
type:
|
|
279
|
+
type: _lssm_lib_schema497.FieldType<number, number>;
|
|
280
280
|
isOptional: true;
|
|
281
281
|
};
|
|
282
282
|
createdAt: {
|
|
283
|
-
type:
|
|
283
|
+
type: _lssm_lib_schema497.FieldType<Date, string>;
|
|
284
284
|
isOptional: true;
|
|
285
285
|
};
|
|
286
286
|
updatedAt: {
|
|
287
|
-
type:
|
|
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:
|
|
295
|
+
declare const TriggerKnowledgeSourceSync: OperationSpec<SchemaModel<{
|
|
296
296
|
sourceId: {
|
|
297
|
-
type:
|
|
297
|
+
type: _lssm_lib_schema497.FieldType<string, string>;
|
|
298
298
|
isOptional: false;
|
|
299
299
|
};
|
|
300
300
|
}>, SchemaModel<{
|
|
301
301
|
success: {
|
|
302
|
-
type:
|
|
302
|
+
type: _lssm_lib_schema497.FieldType<boolean, boolean>;
|
|
303
303
|
isOptional: false;
|
|
304
304
|
};
|
|
305
305
|
itemsProcessed: {
|
|
306
|
-
type:
|
|
306
|
+
type: _lssm_lib_schema497.FieldType<number, number>;
|
|
307
307
|
isOptional: true;
|
|
308
308
|
};
|
|
309
309
|
error: {
|
|
310
|
-
type:
|
|
310
|
+
type: _lssm_lib_schema497.FieldType<string, string>;
|
|
311
311
|
isOptional: true;
|
|
312
312
|
};
|
|
313
313
|
}>, undefined>;
|
|
314
|
-
declare const knowledgeContracts: Record<string,
|
|
315
|
-
declare function registerKnowledgeContracts(registry:
|
|
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 };
|
package/dist/llm/exporters.d.ts
CHANGED
|
@@ -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 {
|
|
6
|
-
import {
|
|
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:
|
|
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:
|
|
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:
|
|
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?:
|
|
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:
|
|
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?:
|
|
63
|
+
specs?: OperationSpecRegistry;
|
|
64
64
|
presentations?: PresentationRegistry;
|
|
65
65
|
}, options?: Partial<FeatureExportOptions>): FeatureExportResult;
|
|
66
66
|
//#endregion
|
package/dist/llm/exporters.js
CHANGED
package/dist/llm/prompts.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
46
|
+
declare function generateFixViolationsPrompt(spec: AnyOperationSpec, implementationCode: string, violations: {
|
|
47
47
|
message: string;
|
|
48
48
|
suggestion?: string;
|
|
49
49
|
}[]): AgentPrompt;
|
package/dist/llm/types.d.ts
CHANGED
|
@@ -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 {
|
|
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:
|
|
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:
|
|
198
|
+
item: AnyOperationSpec;
|
|
199
199
|
} | {
|
|
200
200
|
type: 'feature';
|
|
201
201
|
item: FeatureModuleSpec;
|
package/dist/markdown.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PresentationRegistry } from "./presentations.js";
|
|
2
|
-
import {
|
|
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:
|
|
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:
|
|
16
|
+
declare function docsToMarkdown(reg: OperationSpecRegistry, extras: {
|
|
17
17
|
presentations?: PresentationRegistry;
|
|
18
18
|
features?: FeatureRegistry;
|
|
19
19
|
}): string;
|
package/dist/markdown.js
CHANGED