@lssm/lib.contracts 0.0.0-canary-20251220030446 → 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 +10 -10
- 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 +9 -9
- 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/jsonschema.d.ts +5 -5
- package/dist/knowledge/contracts.d.ts +9 -9
- 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,140 +1,140 @@
|
|
|
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_schema187 from "@lssm/lib.schema";
|
|
5
5
|
import { SchemaModel } from "@lssm/lib.schema";
|
|
6
6
|
|
|
7
7
|
//#region src/integrations/openbanking/contracts/transactions.d.ts
|
|
8
|
-
declare const OpenBankingListTransactions:
|
|
8
|
+
declare const OpenBankingListTransactions: OperationSpec<SchemaModel<{
|
|
9
9
|
tenantId: {
|
|
10
|
-
type:
|
|
10
|
+
type: _lssm_lib_schema187.FieldType<string, string>;
|
|
11
11
|
isOptional: false;
|
|
12
12
|
};
|
|
13
13
|
accountId: {
|
|
14
|
-
type:
|
|
14
|
+
type: _lssm_lib_schema187.FieldType<string, string>;
|
|
15
15
|
isOptional: false;
|
|
16
16
|
};
|
|
17
17
|
from: {
|
|
18
|
-
type:
|
|
18
|
+
type: _lssm_lib_schema187.FieldType<Date, string>;
|
|
19
19
|
isOptional: true;
|
|
20
20
|
};
|
|
21
21
|
to: {
|
|
22
|
-
type:
|
|
22
|
+
type: _lssm_lib_schema187.FieldType<Date, string>;
|
|
23
23
|
isOptional: true;
|
|
24
24
|
};
|
|
25
25
|
cursor: {
|
|
26
|
-
type:
|
|
26
|
+
type: _lssm_lib_schema187.FieldType<string, string>;
|
|
27
27
|
isOptional: true;
|
|
28
28
|
};
|
|
29
29
|
pageSize: {
|
|
30
|
-
type:
|
|
30
|
+
type: _lssm_lib_schema187.FieldType<number, number>;
|
|
31
31
|
isOptional: true;
|
|
32
32
|
};
|
|
33
33
|
direction: {
|
|
34
|
-
type:
|
|
34
|
+
type: _lssm_lib_schema187.FieldType<string, string>;
|
|
35
35
|
isOptional: true;
|
|
36
36
|
};
|
|
37
37
|
minimumAmount: {
|
|
38
|
-
type:
|
|
38
|
+
type: _lssm_lib_schema187.FieldType<number, number>;
|
|
39
39
|
isOptional: true;
|
|
40
40
|
};
|
|
41
41
|
maximumAmount: {
|
|
42
|
-
type:
|
|
42
|
+
type: _lssm_lib_schema187.FieldType<number, number>;
|
|
43
43
|
isOptional: true;
|
|
44
44
|
};
|
|
45
45
|
category: {
|
|
46
|
-
type:
|
|
46
|
+
type: _lssm_lib_schema187.FieldType<string, string>;
|
|
47
47
|
isOptional: true;
|
|
48
48
|
};
|
|
49
49
|
}>, SchemaModel<{
|
|
50
50
|
transactions: {
|
|
51
51
|
type: SchemaModel<{
|
|
52
52
|
id: {
|
|
53
|
-
type:
|
|
53
|
+
type: _lssm_lib_schema187.FieldType<string, string>;
|
|
54
54
|
isOptional: false;
|
|
55
55
|
};
|
|
56
56
|
accountId: {
|
|
57
|
-
type:
|
|
57
|
+
type: _lssm_lib_schema187.FieldType<string, string>;
|
|
58
58
|
isOptional: false;
|
|
59
59
|
};
|
|
60
60
|
tenantId: {
|
|
61
|
-
type:
|
|
61
|
+
type: _lssm_lib_schema187.FieldType<string, string>;
|
|
62
62
|
isOptional: false;
|
|
63
63
|
};
|
|
64
64
|
connectionId: {
|
|
65
|
-
type:
|
|
65
|
+
type: _lssm_lib_schema187.FieldType<string, string>;
|
|
66
66
|
isOptional: false;
|
|
67
67
|
};
|
|
68
68
|
externalId: {
|
|
69
|
-
type:
|
|
69
|
+
type: _lssm_lib_schema187.FieldType<string, string>;
|
|
70
70
|
isOptional: false;
|
|
71
71
|
};
|
|
72
72
|
amount: {
|
|
73
|
-
type:
|
|
73
|
+
type: _lssm_lib_schema187.FieldType<number, number>;
|
|
74
74
|
isOptional: false;
|
|
75
75
|
};
|
|
76
76
|
currency: {
|
|
77
|
-
type:
|
|
77
|
+
type: _lssm_lib_schema187.FieldType<string, string>;
|
|
78
78
|
isOptional: false;
|
|
79
79
|
};
|
|
80
80
|
date: {
|
|
81
|
-
type:
|
|
81
|
+
type: _lssm_lib_schema187.FieldType<Date, string>;
|
|
82
82
|
isOptional: false;
|
|
83
83
|
};
|
|
84
84
|
bookingDate: {
|
|
85
|
-
type:
|
|
85
|
+
type: _lssm_lib_schema187.FieldType<Date, string>;
|
|
86
86
|
isOptional: true;
|
|
87
87
|
};
|
|
88
88
|
valueDate: {
|
|
89
|
-
type:
|
|
89
|
+
type: _lssm_lib_schema187.FieldType<Date, string>;
|
|
90
90
|
isOptional: true;
|
|
91
91
|
};
|
|
92
92
|
description: {
|
|
93
|
-
type:
|
|
93
|
+
type: _lssm_lib_schema187.FieldType<string, string>;
|
|
94
94
|
isOptional: true;
|
|
95
95
|
};
|
|
96
96
|
counterpartyName: {
|
|
97
|
-
type:
|
|
97
|
+
type: _lssm_lib_schema187.FieldType<string, string>;
|
|
98
98
|
isOptional: true;
|
|
99
99
|
};
|
|
100
100
|
counterpartyAccount: {
|
|
101
|
-
type:
|
|
101
|
+
type: _lssm_lib_schema187.FieldType<string, string>;
|
|
102
102
|
isOptional: true;
|
|
103
103
|
};
|
|
104
104
|
merchantCategoryCode: {
|
|
105
|
-
type:
|
|
105
|
+
type: _lssm_lib_schema187.FieldType<string, string>;
|
|
106
106
|
isOptional: true;
|
|
107
107
|
};
|
|
108
108
|
rawCategory: {
|
|
109
|
-
type:
|
|
109
|
+
type: _lssm_lib_schema187.FieldType<string, string>;
|
|
110
110
|
isOptional: true;
|
|
111
111
|
};
|
|
112
112
|
standardizedCategory: {
|
|
113
|
-
type:
|
|
113
|
+
type: _lssm_lib_schema187.FieldType<string, string>;
|
|
114
114
|
isOptional: true;
|
|
115
115
|
};
|
|
116
116
|
transactionType: {
|
|
117
|
-
type:
|
|
117
|
+
type: _lssm_lib_schema187.FieldType<string, string>;
|
|
118
118
|
isOptional: false;
|
|
119
119
|
};
|
|
120
120
|
status: {
|
|
121
|
-
type:
|
|
121
|
+
type: _lssm_lib_schema187.FieldType<string, string>;
|
|
122
122
|
isOptional: false;
|
|
123
123
|
};
|
|
124
124
|
runningBalance: {
|
|
125
|
-
type:
|
|
125
|
+
type: _lssm_lib_schema187.FieldType<number, number>;
|
|
126
126
|
isOptional: true;
|
|
127
127
|
};
|
|
128
128
|
metadata: {
|
|
129
|
-
type:
|
|
129
|
+
type: _lssm_lib_schema187.FieldType<Record<string, unknown>, Record<string, unknown>>;
|
|
130
130
|
isOptional: true;
|
|
131
131
|
};
|
|
132
132
|
createdAt: {
|
|
133
|
-
type:
|
|
133
|
+
type: _lssm_lib_schema187.FieldType<Date, string>;
|
|
134
134
|
isOptional: false;
|
|
135
135
|
};
|
|
136
136
|
updatedAt: {
|
|
137
|
-
type:
|
|
137
|
+
type: _lssm_lib_schema187.FieldType<Date, string>;
|
|
138
138
|
isOptional: false;
|
|
139
139
|
};
|
|
140
140
|
}>;
|
|
@@ -142,71 +142,71 @@ declare const OpenBankingListTransactions: ContractSpec<SchemaModel<{
|
|
|
142
142
|
isArray: true;
|
|
143
143
|
};
|
|
144
144
|
nextCursor: {
|
|
145
|
-
type:
|
|
145
|
+
type: _lssm_lib_schema187.FieldType<string, string>;
|
|
146
146
|
isOptional: true;
|
|
147
147
|
};
|
|
148
148
|
hasMore: {
|
|
149
|
-
type:
|
|
149
|
+
type: _lssm_lib_schema187.FieldType<boolean, boolean>;
|
|
150
150
|
isOptional: true;
|
|
151
151
|
};
|
|
152
152
|
}>, undefined>;
|
|
153
|
-
declare const OpenBankingSyncTransactions:
|
|
153
|
+
declare const OpenBankingSyncTransactions: OperationSpec<SchemaModel<{
|
|
154
154
|
tenantId: {
|
|
155
|
-
type:
|
|
155
|
+
type: _lssm_lib_schema187.FieldType<string, string>;
|
|
156
156
|
isOptional: false;
|
|
157
157
|
};
|
|
158
158
|
accountId: {
|
|
159
|
-
type:
|
|
159
|
+
type: _lssm_lib_schema187.FieldType<string, string>;
|
|
160
160
|
isOptional: false;
|
|
161
161
|
};
|
|
162
162
|
from: {
|
|
163
|
-
type:
|
|
163
|
+
type: _lssm_lib_schema187.FieldType<Date, string>;
|
|
164
164
|
isOptional: true;
|
|
165
165
|
};
|
|
166
166
|
to: {
|
|
167
|
-
type:
|
|
167
|
+
type: _lssm_lib_schema187.FieldType<Date, string>;
|
|
168
168
|
isOptional: true;
|
|
169
169
|
};
|
|
170
170
|
connectionId: {
|
|
171
|
-
type:
|
|
171
|
+
type: _lssm_lib_schema187.FieldType<string, string>;
|
|
172
172
|
isOptional: true;
|
|
173
173
|
};
|
|
174
174
|
includePending: {
|
|
175
|
-
type:
|
|
175
|
+
type: _lssm_lib_schema187.FieldType<boolean, boolean>;
|
|
176
176
|
isOptional: true;
|
|
177
177
|
};
|
|
178
178
|
backfillDays: {
|
|
179
|
-
type:
|
|
179
|
+
type: _lssm_lib_schema187.FieldType<number, number>;
|
|
180
180
|
isOptional: true;
|
|
181
181
|
};
|
|
182
182
|
}>, SchemaModel<{
|
|
183
183
|
synced: {
|
|
184
|
-
type:
|
|
184
|
+
type: _lssm_lib_schema187.FieldType<number, number>;
|
|
185
185
|
isOptional: false;
|
|
186
186
|
};
|
|
187
187
|
failed: {
|
|
188
|
-
type:
|
|
188
|
+
type: _lssm_lib_schema187.FieldType<number, number>;
|
|
189
189
|
isOptional: false;
|
|
190
190
|
};
|
|
191
191
|
earliestSyncedAt: {
|
|
192
|
-
type:
|
|
192
|
+
type: _lssm_lib_schema187.FieldType<Date, string>;
|
|
193
193
|
isOptional: true;
|
|
194
194
|
};
|
|
195
195
|
latestSyncedAt: {
|
|
196
|
-
type:
|
|
196
|
+
type: _lssm_lib_schema187.FieldType<Date, string>;
|
|
197
197
|
isOptional: true;
|
|
198
198
|
};
|
|
199
199
|
nextSinceToken: {
|
|
200
|
-
type:
|
|
200
|
+
type: _lssm_lib_schema187.FieldType<string, string>;
|
|
201
201
|
isOptional: true;
|
|
202
202
|
};
|
|
203
203
|
errors: {
|
|
204
|
-
type:
|
|
204
|
+
type: _lssm_lib_schema187.FieldType<string, string>;
|
|
205
205
|
isArray: true;
|
|
206
206
|
isOptional: true;
|
|
207
207
|
};
|
|
208
208
|
}>, undefined>;
|
|
209
|
-
declare const openBankingTransactionContracts: Record<string,
|
|
210
|
-
declare function registerOpenBankingTransactionContracts(registry:
|
|
209
|
+
declare const openBankingTransactionContracts: Record<string, AnyOperationSpec>;
|
|
210
|
+
declare function registerOpenBankingTransactionContracts(registry: OperationSpecRegistry): OperationSpecRegistry;
|
|
211
211
|
//#endregion
|
|
212
212
|
export { OpenBankingListTransactions, OpenBankingSyncTransactions, openBankingTransactionContracts, registerOpenBankingTransactionContracts };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { E5, x8 } from "../../../schema/dist/index.js";
|
|
2
|
-
import { defineCommand, defineQuery } from "../../../
|
|
2
|
+
import { defineCommand, defineQuery } from "../../../operation.js";
|
|
3
3
|
import { BankTransactionRecord } from "../models.js";
|
|
4
4
|
import { OPENBANKING_TELEMETRY_EVENTS } from "../telemetry.js";
|
|
5
5
|
|
package/dist/jsonschema.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Stability, Tag } from "./ownership.js";
|
|
2
|
-
import {
|
|
2
|
+
import { OpKind, OperationSpec } from "./operation.js";
|
|
3
3
|
import z from "zod";
|
|
4
|
-
import * as
|
|
4
|
+
import * as _lssm_lib_schema53 from "@lssm/lib.schema";
|
|
5
5
|
import { AnySchemaModel } from "@lssm/lib.schema";
|
|
6
6
|
|
|
7
7
|
//#region src/jsonschema.d.ts
|
|
8
|
-
declare function jsonSchemaForSpec(spec:
|
|
9
|
-
input: z.core.ZodStandardJSONSchemaPayload<
|
|
10
|
-
output: z.core.ZodStandardJSONSchemaPayload<
|
|
8
|
+
declare function jsonSchemaForSpec(spec: OperationSpec<AnySchemaModel, AnySchemaModel>): {
|
|
9
|
+
input: z.core.ZodStandardJSONSchemaPayload<_lssm_lib_schema53.TopLevelZodFromModel<_lssm_lib_schema53.SchemaModelFieldsAnyConfig<AnySchemaModel | _lssm_lib_schema53.AnyFieldType | _lssm_lib_schema53.AnyEnumType>>> | null;
|
|
10
|
+
output: z.core.ZodStandardJSONSchemaPayload<_lssm_lib_schema53.TopLevelZodFromModel<_lssm_lib_schema53.SchemaModelFieldsAnyConfig<AnySchemaModel | _lssm_lib_schema53.AnyFieldType | _lssm_lib_schema53.AnyEnumType>>> | null;
|
|
11
11
|
meta: {
|
|
12
12
|
name: string;
|
|
13
13
|
version: number;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { AnyOperationSpec, OperationSpec } from "../operation.js";
|
|
2
|
+
import { OperationSpecRegistry } from "../registry.js";
|
|
3
3
|
import "../index.js";
|
|
4
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
10
|
type: _lssm_lib_schema497.FieldType<string, string>;
|
|
11
11
|
isOptional: false;
|
|
@@ -110,7 +110,7 @@ declare const CreateKnowledgeSource: ContractSpec<SchemaModel<{
|
|
|
110
110
|
isOptional: true;
|
|
111
111
|
};
|
|
112
112
|
}>, undefined>;
|
|
113
|
-
declare const UpdateKnowledgeSource:
|
|
113
|
+
declare const UpdateKnowledgeSource: OperationSpec<SchemaModel<{
|
|
114
114
|
sourceId: {
|
|
115
115
|
type: _lssm_lib_schema497.FieldType<string, string>;
|
|
116
116
|
isOptional: false;
|
|
@@ -203,7 +203,7 @@ declare const UpdateKnowledgeSource: ContractSpec<SchemaModel<{
|
|
|
203
203
|
isOptional: true;
|
|
204
204
|
};
|
|
205
205
|
}>, undefined>;
|
|
206
|
-
declare const DeleteKnowledgeSource:
|
|
206
|
+
declare const DeleteKnowledgeSource: OperationSpec<SchemaModel<{
|
|
207
207
|
sourceId: {
|
|
208
208
|
type: _lssm_lib_schema497.FieldType<string, string>;
|
|
209
209
|
isOptional: false;
|
|
@@ -214,7 +214,7 @@ declare const DeleteKnowledgeSource: ContractSpec<SchemaModel<{
|
|
|
214
214
|
isOptional: false;
|
|
215
215
|
};
|
|
216
216
|
}>, undefined>;
|
|
217
|
-
declare const ListKnowledgeSources:
|
|
217
|
+
declare const ListKnowledgeSources: OperationSpec<SchemaModel<{
|
|
218
218
|
tenantId: {
|
|
219
219
|
type: _lssm_lib_schema497.FieldType<string, string>;
|
|
220
220
|
isOptional: false;
|
|
@@ -292,7 +292,7 @@ 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
297
|
type: _lssm_lib_schema497.FieldType<string, string>;
|
|
298
298
|
isOptional: false;
|
|
@@ -311,7 +311,7 @@ declare const TriggerKnowledgeSourceSync: ContractSpec<SchemaModel<{
|
|
|
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