@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.
Files changed (64) hide show
  1. package/README.md +4 -4
  2. package/dist/app-config/contracts.d.ts +60 -60
  3. package/dist/app-config/contracts.js +1 -1
  4. package/dist/app-config/events.d.ts +27 -27
  5. package/dist/app-config/lifecycle-contracts.d.ts +10 -10
  6. package/dist/app-config/lifecycle-contracts.js +1 -1
  7. package/dist/docs/tech/contracts/README.docblock.js +2 -2
  8. package/dist/docs/tech/contracts/openapi-export.docblock.js +6 -6
  9. package/dist/docs/tech/contracts/ops-to-presentation-linking.docblock.js +2 -2
  10. package/dist/docs/tech/contracts/tests.docblock.js +2 -2
  11. package/dist/experiments/spec-resolver.d.ts +2 -2
  12. package/dist/features.d.ts +5 -5
  13. package/dist/index.d.ts +6 -4
  14. package/dist/index.js +5 -3
  15. package/dist/install.d.ts +16 -16
  16. package/dist/integrations/contracts.d.ts +9 -9
  17. package/dist/integrations/contracts.js +1 -1
  18. package/dist/integrations/openbanking/contracts/accounts.d.ts +73 -73
  19. package/dist/integrations/openbanking/contracts/accounts.js +1 -1
  20. package/dist/integrations/openbanking/contracts/balances.d.ts +40 -40
  21. package/dist/integrations/openbanking/contracts/balances.js +1 -1
  22. package/dist/integrations/openbanking/contracts/index.d.ts +2 -2
  23. package/dist/integrations/openbanking/contracts/transactions.d.ts +54 -54
  24. package/dist/integrations/openbanking/contracts/transactions.js +1 -1
  25. package/dist/jsonschema.d.ts +5 -5
  26. package/dist/knowledge/contracts.d.ts +9 -9
  27. package/dist/knowledge/contracts.js +1 -1
  28. package/dist/llm/exporters.d.ts +8 -8
  29. package/dist/llm/exporters.js +1 -1
  30. package/dist/llm/prompts.d.ts +7 -7
  31. package/dist/llm/types.d.ts +3 -3
  32. package/dist/markdown.d.ts +3 -3
  33. package/dist/markdown.js +1 -1
  34. package/dist/onboarding-base.d.ts +32 -32
  35. package/dist/onboarding-base.js +1 -1
  36. package/dist/openapi.d.ts +2 -2
  37. package/dist/{spec.d.ts → operation.d.ts} +12 -12
  38. package/dist/{spec.js → operation.js} +1 -1
  39. package/dist/policy/docs/policy.docblock.js +1 -1
  40. package/dist/presentations.d.ts +3 -3
  41. package/dist/registry.d.ts +13 -14
  42. package/dist/registry.js +5 -5
  43. package/dist/server/graphql-pothos.d.ts +6 -6
  44. package/dist/server/graphql-pothos.js +4 -4
  45. package/dist/server/mcp/createMcpServer.d.ts +3 -3
  46. package/dist/server/mcp/createMcpServer.js +1 -1
  47. package/dist/server/mcp/registerTools.d.ts +2 -2
  48. package/dist/server/rest-elysia.d.ts +2 -2
  49. package/dist/server/rest-express.d.ts +2 -2
  50. package/dist/server/rest-generic.d.ts +3 -3
  51. package/dist/server/rest-generic.js +1 -1
  52. package/dist/server/rest-next-app.d.ts +4 -4
  53. package/dist/server/rest-next-app.js +2 -2
  54. package/dist/server/rest-next-mcp.d.ts +2 -2
  55. package/dist/server/rest-next-pages.d.ts +2 -2
  56. package/dist/telemetry/docs/telemetry.docblock.js +1 -1
  57. package/dist/tests/runner.d.ts +2 -2
  58. package/dist/types/all.d.ts +2 -2
  59. package/dist/workflow/validation.d.ts +2 -2
  60. package/dist/workspace-config/contractsrc-schema.d.ts +188 -0
  61. package/dist/workspace-config/contractsrc-schema.js +114 -0
  62. package/dist/workspace-config/index.d.ts +2 -0
  63. package/dist/workspace-config/index.js +3 -0
  64. package/package.json +13 -11
@@ -1,140 +1,140 @@
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_schema159 from "@lssm/lib.schema";
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: ContractSpec<SchemaModel<{
8
+ declare const OpenBankingListTransactions: OperationSpec<SchemaModel<{
9
9
  tenantId: {
10
- type: _lssm_lib_schema159.FieldType<string, string>;
10
+ type: _lssm_lib_schema187.FieldType<string, string>;
11
11
  isOptional: false;
12
12
  };
13
13
  accountId: {
14
- type: _lssm_lib_schema159.FieldType<string, string>;
14
+ type: _lssm_lib_schema187.FieldType<string, string>;
15
15
  isOptional: false;
16
16
  };
17
17
  from: {
18
- type: _lssm_lib_schema159.FieldType<Date, string>;
18
+ type: _lssm_lib_schema187.FieldType<Date, string>;
19
19
  isOptional: true;
20
20
  };
21
21
  to: {
22
- type: _lssm_lib_schema159.FieldType<Date, string>;
22
+ type: _lssm_lib_schema187.FieldType<Date, string>;
23
23
  isOptional: true;
24
24
  };
25
25
  cursor: {
26
- type: _lssm_lib_schema159.FieldType<string, string>;
26
+ type: _lssm_lib_schema187.FieldType<string, string>;
27
27
  isOptional: true;
28
28
  };
29
29
  pageSize: {
30
- type: _lssm_lib_schema159.FieldType<number, number>;
30
+ type: _lssm_lib_schema187.FieldType<number, number>;
31
31
  isOptional: true;
32
32
  };
33
33
  direction: {
34
- type: _lssm_lib_schema159.FieldType<string, string>;
34
+ type: _lssm_lib_schema187.FieldType<string, string>;
35
35
  isOptional: true;
36
36
  };
37
37
  minimumAmount: {
38
- type: _lssm_lib_schema159.FieldType<number, number>;
38
+ type: _lssm_lib_schema187.FieldType<number, number>;
39
39
  isOptional: true;
40
40
  };
41
41
  maximumAmount: {
42
- type: _lssm_lib_schema159.FieldType<number, number>;
42
+ type: _lssm_lib_schema187.FieldType<number, number>;
43
43
  isOptional: true;
44
44
  };
45
45
  category: {
46
- type: _lssm_lib_schema159.FieldType<string, string>;
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: _lssm_lib_schema159.FieldType<string, string>;
53
+ type: _lssm_lib_schema187.FieldType<string, string>;
54
54
  isOptional: false;
55
55
  };
56
56
  accountId: {
57
- type: _lssm_lib_schema159.FieldType<string, string>;
57
+ type: _lssm_lib_schema187.FieldType<string, string>;
58
58
  isOptional: false;
59
59
  };
60
60
  tenantId: {
61
- type: _lssm_lib_schema159.FieldType<string, string>;
61
+ type: _lssm_lib_schema187.FieldType<string, string>;
62
62
  isOptional: false;
63
63
  };
64
64
  connectionId: {
65
- type: _lssm_lib_schema159.FieldType<string, string>;
65
+ type: _lssm_lib_schema187.FieldType<string, string>;
66
66
  isOptional: false;
67
67
  };
68
68
  externalId: {
69
- type: _lssm_lib_schema159.FieldType<string, string>;
69
+ type: _lssm_lib_schema187.FieldType<string, string>;
70
70
  isOptional: false;
71
71
  };
72
72
  amount: {
73
- type: _lssm_lib_schema159.FieldType<number, number>;
73
+ type: _lssm_lib_schema187.FieldType<number, number>;
74
74
  isOptional: false;
75
75
  };
76
76
  currency: {
77
- type: _lssm_lib_schema159.FieldType<string, string>;
77
+ type: _lssm_lib_schema187.FieldType<string, string>;
78
78
  isOptional: false;
79
79
  };
80
80
  date: {
81
- type: _lssm_lib_schema159.FieldType<Date, string>;
81
+ type: _lssm_lib_schema187.FieldType<Date, string>;
82
82
  isOptional: false;
83
83
  };
84
84
  bookingDate: {
85
- type: _lssm_lib_schema159.FieldType<Date, string>;
85
+ type: _lssm_lib_schema187.FieldType<Date, string>;
86
86
  isOptional: true;
87
87
  };
88
88
  valueDate: {
89
- type: _lssm_lib_schema159.FieldType<Date, string>;
89
+ type: _lssm_lib_schema187.FieldType<Date, string>;
90
90
  isOptional: true;
91
91
  };
92
92
  description: {
93
- type: _lssm_lib_schema159.FieldType<string, string>;
93
+ type: _lssm_lib_schema187.FieldType<string, string>;
94
94
  isOptional: true;
95
95
  };
96
96
  counterpartyName: {
97
- type: _lssm_lib_schema159.FieldType<string, string>;
97
+ type: _lssm_lib_schema187.FieldType<string, string>;
98
98
  isOptional: true;
99
99
  };
100
100
  counterpartyAccount: {
101
- type: _lssm_lib_schema159.FieldType<string, string>;
101
+ type: _lssm_lib_schema187.FieldType<string, string>;
102
102
  isOptional: true;
103
103
  };
104
104
  merchantCategoryCode: {
105
- type: _lssm_lib_schema159.FieldType<string, string>;
105
+ type: _lssm_lib_schema187.FieldType<string, string>;
106
106
  isOptional: true;
107
107
  };
108
108
  rawCategory: {
109
- type: _lssm_lib_schema159.FieldType<string, string>;
109
+ type: _lssm_lib_schema187.FieldType<string, string>;
110
110
  isOptional: true;
111
111
  };
112
112
  standardizedCategory: {
113
- type: _lssm_lib_schema159.FieldType<string, string>;
113
+ type: _lssm_lib_schema187.FieldType<string, string>;
114
114
  isOptional: true;
115
115
  };
116
116
  transactionType: {
117
- type: _lssm_lib_schema159.FieldType<string, string>;
117
+ type: _lssm_lib_schema187.FieldType<string, string>;
118
118
  isOptional: false;
119
119
  };
120
120
  status: {
121
- type: _lssm_lib_schema159.FieldType<string, string>;
121
+ type: _lssm_lib_schema187.FieldType<string, string>;
122
122
  isOptional: false;
123
123
  };
124
124
  runningBalance: {
125
- type: _lssm_lib_schema159.FieldType<number, number>;
125
+ type: _lssm_lib_schema187.FieldType<number, number>;
126
126
  isOptional: true;
127
127
  };
128
128
  metadata: {
129
- type: _lssm_lib_schema159.FieldType<Record<string, unknown>, Record<string, unknown>>;
129
+ type: _lssm_lib_schema187.FieldType<Record<string, unknown>, Record<string, unknown>>;
130
130
  isOptional: true;
131
131
  };
132
132
  createdAt: {
133
- type: _lssm_lib_schema159.FieldType<Date, string>;
133
+ type: _lssm_lib_schema187.FieldType<Date, string>;
134
134
  isOptional: false;
135
135
  };
136
136
  updatedAt: {
137
- type: _lssm_lib_schema159.FieldType<Date, string>;
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: _lssm_lib_schema159.FieldType<string, string>;
145
+ type: _lssm_lib_schema187.FieldType<string, string>;
146
146
  isOptional: true;
147
147
  };
148
148
  hasMore: {
149
- type: _lssm_lib_schema159.FieldType<boolean, boolean>;
149
+ type: _lssm_lib_schema187.FieldType<boolean, boolean>;
150
150
  isOptional: true;
151
151
  };
152
152
  }>, undefined>;
153
- declare const OpenBankingSyncTransactions: ContractSpec<SchemaModel<{
153
+ declare const OpenBankingSyncTransactions: OperationSpec<SchemaModel<{
154
154
  tenantId: {
155
- type: _lssm_lib_schema159.FieldType<string, string>;
155
+ type: _lssm_lib_schema187.FieldType<string, string>;
156
156
  isOptional: false;
157
157
  };
158
158
  accountId: {
159
- type: _lssm_lib_schema159.FieldType<string, string>;
159
+ type: _lssm_lib_schema187.FieldType<string, string>;
160
160
  isOptional: false;
161
161
  };
162
162
  from: {
163
- type: _lssm_lib_schema159.FieldType<Date, string>;
163
+ type: _lssm_lib_schema187.FieldType<Date, string>;
164
164
  isOptional: true;
165
165
  };
166
166
  to: {
167
- type: _lssm_lib_schema159.FieldType<Date, string>;
167
+ type: _lssm_lib_schema187.FieldType<Date, string>;
168
168
  isOptional: true;
169
169
  };
170
170
  connectionId: {
171
- type: _lssm_lib_schema159.FieldType<string, string>;
171
+ type: _lssm_lib_schema187.FieldType<string, string>;
172
172
  isOptional: true;
173
173
  };
174
174
  includePending: {
175
- type: _lssm_lib_schema159.FieldType<boolean, boolean>;
175
+ type: _lssm_lib_schema187.FieldType<boolean, boolean>;
176
176
  isOptional: true;
177
177
  };
178
178
  backfillDays: {
179
- type: _lssm_lib_schema159.FieldType<number, number>;
179
+ type: _lssm_lib_schema187.FieldType<number, number>;
180
180
  isOptional: true;
181
181
  };
182
182
  }>, SchemaModel<{
183
183
  synced: {
184
- type: _lssm_lib_schema159.FieldType<number, number>;
184
+ type: _lssm_lib_schema187.FieldType<number, number>;
185
185
  isOptional: false;
186
186
  };
187
187
  failed: {
188
- type: _lssm_lib_schema159.FieldType<number, number>;
188
+ type: _lssm_lib_schema187.FieldType<number, number>;
189
189
  isOptional: false;
190
190
  };
191
191
  earliestSyncedAt: {
192
- type: _lssm_lib_schema159.FieldType<Date, string>;
192
+ type: _lssm_lib_schema187.FieldType<Date, string>;
193
193
  isOptional: true;
194
194
  };
195
195
  latestSyncedAt: {
196
- type: _lssm_lib_schema159.FieldType<Date, string>;
196
+ type: _lssm_lib_schema187.FieldType<Date, string>;
197
197
  isOptional: true;
198
198
  };
199
199
  nextSinceToken: {
200
- type: _lssm_lib_schema159.FieldType<string, string>;
200
+ type: _lssm_lib_schema187.FieldType<string, string>;
201
201
  isOptional: true;
202
202
  };
203
203
  errors: {
204
- type: _lssm_lib_schema159.FieldType<string, string>;
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, AnyContractSpec>;
210
- declare function registerOpenBankingTransactionContracts(registry: SpecRegistry): SpecRegistry;
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 "../../../spec.js";
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
 
@@ -1,13 +1,13 @@
1
1
  import { Stability, Tag } from "./ownership.js";
2
- import { ContractSpec, OpKind } from "./spec.js";
2
+ import { OpKind, OperationSpec } from "./operation.js";
3
3
  import z from "zod";
4
- import * as _lssm_lib_schema255 from "@lssm/lib.schema";
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: ContractSpec<AnySchemaModel, AnySchemaModel>): {
9
- input: z.core.ZodStandardJSONSchemaPayload<_lssm_lib_schema255.TopLevelZodFromModel<_lssm_lib_schema255.SchemaModelFieldsAnyConfig<_lssm_lib_schema255.AnyFieldType | _lssm_lib_schema255.AnyEnumType | AnySchemaModel>>> | null;
10
- output: z.core.ZodStandardJSONSchemaPayload<_lssm_lib_schema255.TopLevelZodFromModel<_lssm_lib_schema255.SchemaModelFieldsAnyConfig<_lssm_lib_schema255.AnyFieldType | _lssm_lib_schema255.AnyEnumType | AnySchemaModel>>> | null;
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 { 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
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
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: ContractSpec<SchemaModel<{
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: ContractSpec<SchemaModel<{
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: ContractSpec<SchemaModel<{
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: ContractSpec<SchemaModel<{
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, 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
  /**