@lssm/app.cli-contractspec 0.0.0-canary-20251221164004 → 0.0.0-canary-20251221165922
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/CHANGELOG.md +9 -9
- package/dist/ai/agents/claude-code-agent.d.ts +21 -0
- package/dist/ai/agents/cursor-agent.d.ts +67 -0
- package/dist/ai/agents/index.d.ts +10 -0
- package/dist/ai/agents/openai-codex-agent.d.ts +21 -0
- package/dist/ai/agents/orchestrator.d.ts +49 -0
- package/dist/ai/agents/simple-agent.d.ts +16 -0
- package/dist/ai/agents/types.d.ts +33 -0
- package/dist/ai/client.d.ts +78 -0
- package/dist/ai/prompts/code-generation.d.ts +21 -0
- package/dist/ai/prompts/spec-creation.d.ts +22 -0
- package/dist/ai/providers.d.ts +18 -0
- package/dist/cli.d.ts +3 -0
- package/dist/commands/build/agent-generation.d.ts +23 -0
- package/dist/commands/build/build-command.d.ts +4 -0
- package/dist/commands/build/build-data-view.d.ts +4 -0
- package/dist/commands/build/build-form.d.ts +5 -0
- package/dist/commands/build/build-operation.d.ts +5 -0
- package/dist/commands/build/build-presentation.d.ts +5 -0
- package/dist/commands/build/build-workflow.d.ts +4 -0
- package/dist/commands/build/data-view-renderer-template.d.ts +7 -0
- package/dist/commands/build/index.d.ts +10 -0
- package/dist/commands/build/index.test.d.ts +2 -0
- package/dist/commands/build/naming.d.ts +3 -0
- package/dist/commands/build/paths.d.ts +19 -0
- package/dist/commands/build/spec-detect.d.ts +9 -0
- package/dist/commands/build/types.d.ts +11 -0
- package/dist/commands/chat/index.d.ts +11 -0
- package/dist/commands/ci/index.d.ts +9 -0
- package/dist/commands/clean/index.d.ts +3 -0
- package/dist/commands/create/ai-assist.d.ts +15 -0
- package/dist/commands/create/create-app-config.d.ts +4 -0
- package/dist/commands/create/create-command.d.ts +4 -0
- package/dist/commands/create/create-data-view.d.ts +4 -0
- package/dist/commands/create/create-event.d.ts +4 -0
- package/dist/commands/create/create-experiment.d.ts +4 -0
- package/dist/commands/create/create-integration.d.ts +4 -0
- package/dist/commands/create/create-knowledge.d.ts +4 -0
- package/dist/commands/create/create-migration.d.ts +4 -0
- package/dist/commands/create/create-operation.d.ts +4 -0
- package/dist/commands/create/create-presentation.d.ts +4 -0
- package/dist/commands/create/create-telemetry.d.ts +4 -0
- package/dist/commands/create/create-workflow.d.ts +4 -0
- package/dist/commands/create/index.d.ts +3 -0
- package/dist/commands/create/types.d.ts +9 -0
- package/dist/commands/create/wizards/app-config.d.ts +3 -0
- package/dist/commands/create/wizards/data-view.d.ts +3 -0
- package/dist/commands/create/wizards/event.d.ts +6 -0
- package/dist/commands/create/wizards/experiment.d.ts +3 -0
- package/dist/commands/create/wizards/integration.d.ts +3 -0
- package/dist/commands/create/wizards/knowledge.d.ts +3 -0
- package/dist/commands/create/wizards/migration.d.ts +3 -0
- package/dist/commands/create/wizards/operation.d.ts +6 -0
- package/dist/commands/create/wizards/presentation.d.ts +6 -0
- package/dist/commands/create/wizards/telemetry.d.ts +3 -0
- package/dist/commands/create/wizards/workflow.d.ts +3 -0
- package/dist/commands/create/write-spec-file.d.ts +13 -0
- package/dist/commands/deps/graph.d.ts +15 -0
- package/dist/commands/deps/graph.test.d.ts +2 -0
- package/dist/commands/deps/index.d.ts +3 -0
- package/dist/commands/deps/parse-imports.d.ts +2 -0
- package/dist/commands/diff/index.d.ts +3 -0
- package/dist/commands/diff/semantic.d.ts +5 -0
- package/dist/commands/diff/semantic.test.d.ts +2 -0
- package/dist/commands/diff/text.d.ts +3 -0
- package/dist/commands/diff/types.d.ts +12 -0
- package/dist/commands/doctor/index.d.ts +9 -0
- package/dist/commands/examples/index.d.ts +3 -0
- package/dist/commands/impl/index.d.ts +16 -0
- package/dist/commands/impl/link.d.ts +11 -0
- package/dist/commands/impl/list.d.ts +11 -0
- package/dist/commands/impl/status.d.ts +11 -0
- package/dist/commands/impl/types.d.ts +42 -0
- package/dist/commands/impl/verify.d.ts +11 -0
- package/dist/commands/init/index.d.ts +11 -0
- package/dist/commands/integrity/index.d.ts +32 -0
- package/dist/commands/list/index.d.ts +3 -0
- package/dist/commands/llm/copy.d.ts +8 -0
- package/dist/commands/llm/export.d.ts +8 -0
- package/dist/commands/llm/guide.d.ts +8 -0
- package/dist/commands/llm/index.d.ts +12 -0
- package/dist/commands/llm/verify.d.ts +8 -0
- package/dist/commands/openapi/export.d.ts +6 -0
- package/dist/commands/openapi/import.d.ts +6 -0
- package/dist/commands/openapi/index.d.ts +6 -0
- package/dist/commands/openapi/sync.d.ts +6 -0
- package/dist/commands/openapi/validate.d.ts +6 -0
- package/dist/commands/quickstart/index.d.ts +9 -0
- package/dist/commands/regenerator/index.d.ts +12 -0
- package/dist/commands/registry/add.d.ts +3 -0
- package/dist/commands/registry/client.d.ts +10 -0
- package/dist/commands/registry/index.d.ts +3 -0
- package/dist/commands/registry/list.d.ts +3 -0
- package/dist/commands/registry/search.d.ts +3 -0
- package/dist/commands/sync/index.d.ts +3 -0
- package/dist/commands/test/generate.d.ts +13 -0
- package/dist/commands/test/index.d.ts +8 -0
- package/dist/commands/validate/index.d.ts +31 -0
- package/dist/commands/validate/spec-checker.d.ts +13 -0
- package/dist/commands/validate/spec-checker.test.d.ts +2 -0
- package/dist/commands/watch/index.d.ts +3 -0
- package/dist/commands/workspace/index.d.ts +12 -0
- package/dist/index.d.ts +2 -0
- package/dist/templates/app-config.template.d.ts +3 -0
- package/dist/templates/data-view.template.d.ts +3 -0
- package/dist/templates/event.template.d.ts +6 -0
- package/dist/templates/experiment.template.d.ts +3 -0
- package/dist/templates/handler.template.d.ts +13 -0
- package/dist/templates/integration.template.d.ts +3 -0
- package/dist/templates/knowledge.template.d.ts +3 -0
- package/dist/templates/migration.template.d.ts +3 -0
- package/dist/templates/operation.template.d.ts +6 -0
- package/dist/templates/operation.template.test.d.ts +2 -0
- package/dist/templates/presentation.template.d.ts +6 -0
- package/dist/templates/telemetry.template.d.ts +3 -0
- package/dist/templates/workflow-runner.template.d.ts +9 -0
- package/dist/templates/workflow.template.d.ts +3 -0
- package/dist/types.d.ts +351 -0
- package/dist/utils/config-writer.d.ts +25 -0
- package/dist/utils/config.d.ts +54 -0
- package/dist/utils/dynamicImport.d.ts +2 -0
- package/dist/utils/errors.d.ts +2 -0
- package/dist/utils/fs.d.ts +18 -0
- package/dist/utils/module-loader.d.ts +2 -0
- package/dist/utils/runtime.d.ts +31 -0
- package/dist/utils/spec-files.d.ts +5 -0
- package/dist/utils/spec-load.d.ts +4 -0
- package/dist/utils/spec-scan.d.ts +23 -0
- package/dist/utils/spec-scan.test.d.ts +2 -0
- package/dist/utils/validation.d.ts +32 -0
- package/dist/utils/validation.test.d.ts +2 -0
- package/package.json +20 -15
- package/dist/cli.js +0 -7521
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generate handler implementation template
|
|
3
|
+
*/
|
|
4
|
+
export declare function generateHandlerTemplate(specName: string, kind: 'command' | 'query'): string;
|
|
5
|
+
/**
|
|
6
|
+
* Generate component template
|
|
7
|
+
*/
|
|
8
|
+
export declare function generateComponentTemplate(componentName: string, description: string): string;
|
|
9
|
+
/**
|
|
10
|
+
* Generate test template
|
|
11
|
+
*/
|
|
12
|
+
export declare function generateTestTemplate(targetName: string, type: 'handler' | 'component'): string;
|
|
13
|
+
//# sourceMappingURL=handler.template.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface RunnerTemplateOptions {
|
|
2
|
+
exportName: string;
|
|
3
|
+
specImportPath: string;
|
|
4
|
+
runnerName: string;
|
|
5
|
+
workflowName: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function generateWorkflowRunnerTemplate({ exportName, specImportPath, runnerName, workflowName, }: RunnerTemplateOptions): string;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=workflow-runner.template.d.ts.map
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
export type SpecType = 'operation' | 'event' | 'presentation' | 'form' | 'feature' | 'workflow' | 'data-view' | 'migration' | 'telemetry' | 'experiment' | 'app-config' | 'integration' | 'knowledge';
|
|
2
|
+
export type OpKind = 'command' | 'query';
|
|
3
|
+
export type PresentationKind = 'web_component' | 'markdown' | 'data';
|
|
4
|
+
export type Stability = 'experimental' | 'beta' | 'stable' | 'deprecated';
|
|
5
|
+
export type StepType = 'human' | 'automation' | 'decision';
|
|
6
|
+
export interface BaseSpecData {
|
|
7
|
+
name: string;
|
|
8
|
+
version: number;
|
|
9
|
+
description: string;
|
|
10
|
+
owners: string[];
|
|
11
|
+
tags: string[];
|
|
12
|
+
stability: Stability;
|
|
13
|
+
}
|
|
14
|
+
export interface OperationSpecData extends BaseSpecData {
|
|
15
|
+
kind: OpKind;
|
|
16
|
+
goal: string;
|
|
17
|
+
context: string;
|
|
18
|
+
hasInput: boolean;
|
|
19
|
+
hasOutput: boolean;
|
|
20
|
+
auth: 'anonymous' | 'user' | 'admin';
|
|
21
|
+
flags: string[];
|
|
22
|
+
emitsEvents: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface EventSpecData extends BaseSpecData {
|
|
25
|
+
piiFields: string[];
|
|
26
|
+
}
|
|
27
|
+
export interface PresentationSpecData extends BaseSpecData {
|
|
28
|
+
presentationKind: PresentationKind;
|
|
29
|
+
}
|
|
30
|
+
export interface FormSpecData extends BaseSpecData {
|
|
31
|
+
}
|
|
32
|
+
export interface FeatureSpecData extends BaseSpecData {
|
|
33
|
+
key: string;
|
|
34
|
+
operations: {
|
|
35
|
+
name: string;
|
|
36
|
+
version: number;
|
|
37
|
+
}[];
|
|
38
|
+
events: {
|
|
39
|
+
name: string;
|
|
40
|
+
version: number;
|
|
41
|
+
}[];
|
|
42
|
+
presentations: {
|
|
43
|
+
name: string;
|
|
44
|
+
version: number;
|
|
45
|
+
}[];
|
|
46
|
+
}
|
|
47
|
+
export interface WorkflowStepData {
|
|
48
|
+
id: string;
|
|
49
|
+
label: string;
|
|
50
|
+
type: StepType;
|
|
51
|
+
description?: string;
|
|
52
|
+
operation?: {
|
|
53
|
+
name: string;
|
|
54
|
+
version: number;
|
|
55
|
+
};
|
|
56
|
+
form?: {
|
|
57
|
+
key: string;
|
|
58
|
+
version: number;
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
export interface WorkflowTransitionData {
|
|
62
|
+
from: string;
|
|
63
|
+
to: string;
|
|
64
|
+
condition?: string;
|
|
65
|
+
}
|
|
66
|
+
export interface WorkflowSpecData extends BaseSpecData {
|
|
67
|
+
title: string;
|
|
68
|
+
domain: string;
|
|
69
|
+
entryStepId?: string;
|
|
70
|
+
steps: WorkflowStepData[];
|
|
71
|
+
transitions: WorkflowTransitionData[];
|
|
72
|
+
policyFlags: string[];
|
|
73
|
+
}
|
|
74
|
+
export type DataViewKind = 'list' | 'detail' | 'table' | 'grid';
|
|
75
|
+
export interface DataViewFieldData {
|
|
76
|
+
key: string;
|
|
77
|
+
label: string;
|
|
78
|
+
dataPath: string;
|
|
79
|
+
format?: string;
|
|
80
|
+
sortable?: boolean;
|
|
81
|
+
filterable?: boolean;
|
|
82
|
+
}
|
|
83
|
+
export interface DataViewSpecData extends BaseSpecData {
|
|
84
|
+
title: string;
|
|
85
|
+
domain: string;
|
|
86
|
+
entity: string;
|
|
87
|
+
kind: DataViewKind;
|
|
88
|
+
primaryOperation: {
|
|
89
|
+
name: string;
|
|
90
|
+
version: number;
|
|
91
|
+
};
|
|
92
|
+
itemOperation?: {
|
|
93
|
+
name: string;
|
|
94
|
+
version: number;
|
|
95
|
+
};
|
|
96
|
+
fields: DataViewFieldData[];
|
|
97
|
+
primaryField?: string;
|
|
98
|
+
secondaryFields?: string[];
|
|
99
|
+
}
|
|
100
|
+
export type TelemetryPrivacy = 'public' | 'internal' | 'pii' | 'sensitive';
|
|
101
|
+
export interface TelemetryPropertyData {
|
|
102
|
+
name: string;
|
|
103
|
+
type: 'string' | 'number' | 'boolean' | 'timestamp' | 'json';
|
|
104
|
+
required?: boolean;
|
|
105
|
+
pii?: boolean;
|
|
106
|
+
redact?: boolean;
|
|
107
|
+
description?: string;
|
|
108
|
+
}
|
|
109
|
+
export interface TelemetryAnomalyRuleData {
|
|
110
|
+
metric: string;
|
|
111
|
+
min?: number;
|
|
112
|
+
max?: number;
|
|
113
|
+
}
|
|
114
|
+
export interface TelemetryEventData {
|
|
115
|
+
name: string;
|
|
116
|
+
version: number;
|
|
117
|
+
what: string;
|
|
118
|
+
who?: string;
|
|
119
|
+
why?: string;
|
|
120
|
+
privacy: TelemetryPrivacy;
|
|
121
|
+
properties: TelemetryPropertyData[];
|
|
122
|
+
retentionDays?: number;
|
|
123
|
+
retentionPolicy?: 'archive' | 'delete';
|
|
124
|
+
samplingRate?: number;
|
|
125
|
+
samplingConditions?: string;
|
|
126
|
+
anomalyEnabled?: boolean;
|
|
127
|
+
anomalyMinimumSample?: number;
|
|
128
|
+
anomalyRules?: TelemetryAnomalyRuleData[];
|
|
129
|
+
anomalyActions?: ('alert' | 'log' | 'trigger_regen')[];
|
|
130
|
+
tags?: string[];
|
|
131
|
+
}
|
|
132
|
+
export interface TelemetryProviderData {
|
|
133
|
+
type: 'posthog' | 'segment' | 'opentelemetry' | 'internal';
|
|
134
|
+
config: string;
|
|
135
|
+
}
|
|
136
|
+
export interface TelemetrySpecData extends BaseSpecData {
|
|
137
|
+
domain: string;
|
|
138
|
+
defaultRetentionDays?: number;
|
|
139
|
+
defaultSamplingRate?: number;
|
|
140
|
+
providers?: TelemetryProviderData[];
|
|
141
|
+
anomalyEnabled?: boolean;
|
|
142
|
+
anomalyCheckIntervalMs?: number;
|
|
143
|
+
events: TelemetryEventData[];
|
|
144
|
+
}
|
|
145
|
+
export interface ExperimentVariantOverrideData {
|
|
146
|
+
type: 'dataView' | 'workflow' | 'theme' | 'policy' | 'presentation';
|
|
147
|
+
target: string;
|
|
148
|
+
version?: number;
|
|
149
|
+
}
|
|
150
|
+
export interface ExperimentVariantData {
|
|
151
|
+
id: string;
|
|
152
|
+
name: string;
|
|
153
|
+
description?: string;
|
|
154
|
+
weight?: number;
|
|
155
|
+
overrides?: ExperimentVariantOverrideData[];
|
|
156
|
+
}
|
|
157
|
+
export interface TargetingRuleData {
|
|
158
|
+
variantId: string;
|
|
159
|
+
percentage?: number;
|
|
160
|
+
policy?: {
|
|
161
|
+
name: string;
|
|
162
|
+
version?: number;
|
|
163
|
+
};
|
|
164
|
+
expression?: string;
|
|
165
|
+
}
|
|
166
|
+
export interface RandomAllocationData {
|
|
167
|
+
type: 'random';
|
|
168
|
+
salt?: string;
|
|
169
|
+
}
|
|
170
|
+
export interface StickyAllocationData {
|
|
171
|
+
type: 'sticky';
|
|
172
|
+
attribute: 'userId' | 'organizationId' | 'sessionId';
|
|
173
|
+
salt?: string;
|
|
174
|
+
}
|
|
175
|
+
export interface TargetedAllocationData {
|
|
176
|
+
type: 'targeted';
|
|
177
|
+
fallback?: 'control' | 'random';
|
|
178
|
+
rules: TargetingRuleData[];
|
|
179
|
+
}
|
|
180
|
+
export type ExperimentAllocationData = RandomAllocationData | StickyAllocationData | TargetedAllocationData;
|
|
181
|
+
export interface ExperimentMetricData {
|
|
182
|
+
name: string;
|
|
183
|
+
eventName: string;
|
|
184
|
+
eventVersion: number;
|
|
185
|
+
aggregation: 'count' | 'avg' | 'p75' | 'p90' | 'p95' | 'p99';
|
|
186
|
+
target?: number;
|
|
187
|
+
}
|
|
188
|
+
export interface ExperimentSpecData extends BaseSpecData {
|
|
189
|
+
domain: string;
|
|
190
|
+
controlVariant: string;
|
|
191
|
+
variants: ExperimentVariantData[];
|
|
192
|
+
allocation: ExperimentAllocationData;
|
|
193
|
+
successMetrics?: ExperimentMetricData[];
|
|
194
|
+
}
|
|
195
|
+
export interface AppConfigMappingData {
|
|
196
|
+
slot: string;
|
|
197
|
+
name: string;
|
|
198
|
+
version?: number;
|
|
199
|
+
}
|
|
200
|
+
export interface AppConfigFeatureFlagData {
|
|
201
|
+
key: string;
|
|
202
|
+
enabled: boolean;
|
|
203
|
+
variant?: string;
|
|
204
|
+
description?: string;
|
|
205
|
+
}
|
|
206
|
+
export interface AppRouteConfigData {
|
|
207
|
+
path: string;
|
|
208
|
+
label?: string;
|
|
209
|
+
dataView?: string;
|
|
210
|
+
workflow?: string;
|
|
211
|
+
guardName?: string;
|
|
212
|
+
guardVersion?: number;
|
|
213
|
+
featureFlag?: string;
|
|
214
|
+
experimentName?: string;
|
|
215
|
+
experimentVersion?: number;
|
|
216
|
+
}
|
|
217
|
+
export interface AppBlueprintSpecData extends BaseSpecData {
|
|
218
|
+
title: string;
|
|
219
|
+
domain: string;
|
|
220
|
+
appId: string;
|
|
221
|
+
capabilitiesEnabled: string[];
|
|
222
|
+
capabilitiesDisabled: string[];
|
|
223
|
+
featureIncludes: string[];
|
|
224
|
+
featureExcludes: string[];
|
|
225
|
+
dataViews: AppConfigMappingData[];
|
|
226
|
+
workflows: AppConfigMappingData[];
|
|
227
|
+
policyRefs: {
|
|
228
|
+
name: string;
|
|
229
|
+
version?: number;
|
|
230
|
+
}[];
|
|
231
|
+
theme?: {
|
|
232
|
+
name: string;
|
|
233
|
+
version: number;
|
|
234
|
+
};
|
|
235
|
+
themeFallbacks: {
|
|
236
|
+
name: string;
|
|
237
|
+
version: number;
|
|
238
|
+
}[];
|
|
239
|
+
telemetry?: {
|
|
240
|
+
name: string;
|
|
241
|
+
version?: number;
|
|
242
|
+
};
|
|
243
|
+
activeExperiments: {
|
|
244
|
+
name: string;
|
|
245
|
+
version?: number;
|
|
246
|
+
}[];
|
|
247
|
+
pausedExperiments: {
|
|
248
|
+
name: string;
|
|
249
|
+
version?: number;
|
|
250
|
+
}[];
|
|
251
|
+
featureFlags: AppConfigFeatureFlagData[];
|
|
252
|
+
routes: AppRouteConfigData[];
|
|
253
|
+
notes?: string;
|
|
254
|
+
}
|
|
255
|
+
export type MigrationStepKind = 'schema' | 'data' | 'validation';
|
|
256
|
+
export interface MigrationStepData {
|
|
257
|
+
kind: MigrationStepKind;
|
|
258
|
+
description?: string;
|
|
259
|
+
sql?: string;
|
|
260
|
+
script?: string;
|
|
261
|
+
assertion?: string;
|
|
262
|
+
timeoutMs?: number;
|
|
263
|
+
retries?: number;
|
|
264
|
+
preChecks?: {
|
|
265
|
+
description: string;
|
|
266
|
+
expression: string;
|
|
267
|
+
}[];
|
|
268
|
+
postChecks?: {
|
|
269
|
+
description: string;
|
|
270
|
+
expression: string;
|
|
271
|
+
}[];
|
|
272
|
+
}
|
|
273
|
+
export interface MigrationSpecData extends BaseSpecData {
|
|
274
|
+
title: string;
|
|
275
|
+
domain: string;
|
|
276
|
+
dependencies: string[];
|
|
277
|
+
up: MigrationStepData[];
|
|
278
|
+
down?: MigrationStepData[];
|
|
279
|
+
}
|
|
280
|
+
export type IntegrationCategoryData = 'payments' | 'email' | 'calendar' | 'sms' | 'ai-llm' | 'ai-voice' | 'speech-to-text' | 'vector-db' | 'storage' | 'accounting' | 'crm' | 'helpdesk' | 'open-banking' | 'custom';
|
|
281
|
+
export type IntegrationConfigFieldType = 'string' | 'number' | 'boolean';
|
|
282
|
+
export type IntegrationOwnershipModeData = 'managed' | 'byok';
|
|
283
|
+
export type IntegrationHealthCheckMethod = 'ping' | 'list' | 'custom';
|
|
284
|
+
export interface IntegrationCapabilityRefData {
|
|
285
|
+
key: string;
|
|
286
|
+
version: number;
|
|
287
|
+
}
|
|
288
|
+
export interface IntegrationCapabilityRequirementData {
|
|
289
|
+
key: string;
|
|
290
|
+
version?: number;
|
|
291
|
+
optional?: boolean;
|
|
292
|
+
reason?: string;
|
|
293
|
+
}
|
|
294
|
+
export interface IntegrationConfigFieldData {
|
|
295
|
+
key: string;
|
|
296
|
+
type: IntegrationConfigFieldType;
|
|
297
|
+
required: boolean;
|
|
298
|
+
description?: string;
|
|
299
|
+
}
|
|
300
|
+
export interface IntegrationSecretFieldData extends IntegrationConfigFieldData {
|
|
301
|
+
}
|
|
302
|
+
export interface IntegrationSpecData extends BaseSpecData {
|
|
303
|
+
title: string;
|
|
304
|
+
domain: string;
|
|
305
|
+
displayName: string;
|
|
306
|
+
category: IntegrationCategoryData;
|
|
307
|
+
supportedModes: IntegrationOwnershipModeData[];
|
|
308
|
+
capabilitiesProvided: IntegrationCapabilityRefData[];
|
|
309
|
+
capabilitiesRequired: IntegrationCapabilityRequirementData[];
|
|
310
|
+
configFields: IntegrationConfigFieldData[];
|
|
311
|
+
secretFields: IntegrationSecretFieldData[];
|
|
312
|
+
docsUrl?: string;
|
|
313
|
+
rateLimitRpm?: number;
|
|
314
|
+
rateLimitRph?: number;
|
|
315
|
+
healthCheckMethod: IntegrationHealthCheckMethod;
|
|
316
|
+
healthCheckTimeoutMs?: number;
|
|
317
|
+
byokSetupInstructions?: string;
|
|
318
|
+
byokRequiredScopes?: string[];
|
|
319
|
+
}
|
|
320
|
+
export type KnowledgeCategoryData = 'canonical' | 'operational' | 'external' | 'ephemeral';
|
|
321
|
+
export type KnowledgeTrustLevel = 'high' | 'medium' | 'low';
|
|
322
|
+
export interface KnowledgeRetentionData {
|
|
323
|
+
ttlDays?: number | null;
|
|
324
|
+
archiveAfterDays?: number;
|
|
325
|
+
}
|
|
326
|
+
export interface KnowledgeSpaceSpecData extends BaseSpecData {
|
|
327
|
+
title: string;
|
|
328
|
+
domain: string;
|
|
329
|
+
displayName: string;
|
|
330
|
+
category: KnowledgeCategoryData;
|
|
331
|
+
retention: KnowledgeRetentionData;
|
|
332
|
+
policyName?: string;
|
|
333
|
+
policyVersion?: number;
|
|
334
|
+
trustLevel: KnowledgeTrustLevel;
|
|
335
|
+
automationWritable: boolean;
|
|
336
|
+
embeddingModel?: string;
|
|
337
|
+
chunkSize?: number;
|
|
338
|
+
vectorDbIntegration?: string;
|
|
339
|
+
}
|
|
340
|
+
export interface AIGenerationOptions {
|
|
341
|
+
provider: 'claude' | 'openai' | 'ollama' | 'custom';
|
|
342
|
+
model?: string;
|
|
343
|
+
endpoint?: string;
|
|
344
|
+
stream?: boolean;
|
|
345
|
+
}
|
|
346
|
+
export interface GenerationResult {
|
|
347
|
+
code: string;
|
|
348
|
+
filePath: string;
|
|
349
|
+
specType: SpecType;
|
|
350
|
+
}
|
|
351
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Config } from './config';
|
|
2
|
+
import type { OpenApiSourceConfig } from '@lssm/lib.contracts';
|
|
3
|
+
/**
|
|
4
|
+
* Read the current config file, or return an empty object if it doesn't exist.
|
|
5
|
+
*/
|
|
6
|
+
export declare function readConfigFile(cwd?: string): Promise<Partial<Config>>;
|
|
7
|
+
/**
|
|
8
|
+
* Write the config file.
|
|
9
|
+
*/
|
|
10
|
+
export declare function writeConfigFile(config: Partial<Config>, cwd?: string): Promise<void>;
|
|
11
|
+
/**
|
|
12
|
+
* Upsert an OpenAPI source in the config.
|
|
13
|
+
* If a source with the same name exists, it is updated.
|
|
14
|
+
* Otherwise, the source is added.
|
|
15
|
+
*/
|
|
16
|
+
export declare function upsertOpenApiSource(source: OpenApiSourceConfig, cwd?: string): Promise<void>;
|
|
17
|
+
/**
|
|
18
|
+
* Get all configured OpenAPI sources.
|
|
19
|
+
*/
|
|
20
|
+
export declare function getOpenApiSources(cwd?: string): Promise<OpenApiSourceConfig[]>;
|
|
21
|
+
/**
|
|
22
|
+
* Get the output directory for a spec type based on conventions.
|
|
23
|
+
*/
|
|
24
|
+
export declare function getOutputDirForSpecType(specType: 'operation' | 'event' | 'presentation' | 'form' | 'model', config: Config): string;
|
|
25
|
+
//# sourceMappingURL=config-writer.d.ts.map
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { type PackageManager } from '@lssm/bundle.contractspec-workspace';
|
|
2
|
+
import { type ContractsrcConfig, type FolderConventions, type OpenApiConfig, type OpenApiSourceConfig } from '@lssm/lib.contracts';
|
|
3
|
+
export type { OpenApiSourceConfig, OpenApiConfig, FolderConventions };
|
|
4
|
+
export type Config = ContractsrcConfig;
|
|
5
|
+
/**
|
|
6
|
+
* Configuration with workspace context.
|
|
7
|
+
*/
|
|
8
|
+
export interface ConfigWithWorkspace extends Config {
|
|
9
|
+
/**
|
|
10
|
+
* Detected package manager.
|
|
11
|
+
*/
|
|
12
|
+
packageManager: PackageManager;
|
|
13
|
+
/**
|
|
14
|
+
* Workspace root (monorepo root or package root).
|
|
15
|
+
*/
|
|
16
|
+
workspaceRoot: string;
|
|
17
|
+
/**
|
|
18
|
+
* Current package root.
|
|
19
|
+
*/
|
|
20
|
+
packageRoot: string;
|
|
21
|
+
/**
|
|
22
|
+
* Whether this is a monorepo.
|
|
23
|
+
*/
|
|
24
|
+
isMonorepo: boolean;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Load configuration from .contractsrc.json with monorepo support.
|
|
28
|
+
*
|
|
29
|
+
* Searches for config in the following order:
|
|
30
|
+
* 1. Package root (.contractsrc.json in the nearest package.json directory)
|
|
31
|
+
* 2. Workspace root (.contractsrc.json in the workspace/monorepo root)
|
|
32
|
+
*
|
|
33
|
+
* Package config is merged on top of workspace config.
|
|
34
|
+
*/
|
|
35
|
+
export declare function loadConfig(cwd?: string): Promise<Config>;
|
|
36
|
+
/**
|
|
37
|
+
* Load configuration with workspace context.
|
|
38
|
+
*/
|
|
39
|
+
export declare function loadConfigWithWorkspace(cwd?: string): Promise<ConfigWithWorkspace>;
|
|
40
|
+
/**
|
|
41
|
+
* Merge config with CLI options and environment variables
|
|
42
|
+
*/
|
|
43
|
+
export declare function mergeConfig(config: Config, options: {
|
|
44
|
+
provider?: string;
|
|
45
|
+
model?: string;
|
|
46
|
+
agentMode?: string;
|
|
47
|
+
endpoint?: string;
|
|
48
|
+
outputDir?: string;
|
|
49
|
+
}): Config;
|
|
50
|
+
/**
|
|
51
|
+
* Get API key for the configured provider
|
|
52
|
+
*/
|
|
53
|
+
export declare function getApiKey(provider: Config['aiProvider']): string | undefined;
|
|
54
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ensure directory exists, creating it if necessary
|
|
3
|
+
*/
|
|
4
|
+
export declare function ensureDir(path: string): Promise<void>;
|
|
5
|
+
/**
|
|
6
|
+
* Write file, creating parent directories if needed
|
|
7
|
+
*/
|
|
8
|
+
export declare function writeFileSafe(filePath: string, content: string): Promise<void>;
|
|
9
|
+
/**
|
|
10
|
+
* Resolve output path based on config and spec type
|
|
11
|
+
*/
|
|
12
|
+
export declare function resolveOutputPath(basePath: string, specType: 'operation' | 'event' | 'presentation' | 'form' | 'feature' | 'workflow' | 'data-view' | 'migration' | 'telemetry' | 'experiment' | 'app-config' | 'integration' | 'knowledge', conventions: Record<string, unknown>, fileName: string): string;
|
|
13
|
+
/**
|
|
14
|
+
* Generate unique filename to avoid conflicts
|
|
15
|
+
*/
|
|
16
|
+
export declare function generateFileName(baseName: string, extension?: string): string;
|
|
17
|
+
export declare function resolvePathFromCwd(targetPath: string): string;
|
|
18
|
+
//# sourceMappingURL=fs.d.ts.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export type RuntimeKind = 'bun' | 'node';
|
|
2
|
+
/**
|
|
3
|
+
* Detect the current JavaScript runtime.
|
|
4
|
+
*/
|
|
5
|
+
export declare function detectRuntime(): RuntimeKind;
|
|
6
|
+
/**
|
|
7
|
+
* Check if running in Bun runtime.
|
|
8
|
+
*/
|
|
9
|
+
export declare function isBunRuntime(): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Check if running in Node.js runtime.
|
|
12
|
+
*/
|
|
13
|
+
export declare function isNodeRuntime(): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Get the runtime version.
|
|
16
|
+
*/
|
|
17
|
+
export declare function getRuntimeVersion(): string;
|
|
18
|
+
/**
|
|
19
|
+
* Get Node.js-compatible APIs that work in both runtimes.
|
|
20
|
+
*/
|
|
21
|
+
export declare function getCompatibleApis(): {
|
|
22
|
+
/**
|
|
23
|
+
* Dynamic import that works in both Bun and Node.js.
|
|
24
|
+
*/
|
|
25
|
+
dynamicImport: <T = unknown>(specifier: string) => Promise<T>;
|
|
26
|
+
/**
|
|
27
|
+
* Resolve module path (uses import.meta.resolve in both runtimes).
|
|
28
|
+
*/
|
|
29
|
+
resolveModule: (specifier: string, parent?: string) => string;
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=runtime.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type SpecType = 'operation' | 'event' | 'presentation' | 'workflow' | 'data-view' | 'migration' | 'telemetry' | 'experiment' | 'app-config' | 'integration' | 'knowledge' | 'unknown';
|
|
2
|
+
export type OperationKind = 'command' | 'query' | 'unknown';
|
|
3
|
+
export type Stability = 'experimental' | 'beta' | 'stable' | 'deprecated';
|
|
4
|
+
export interface SpecScanResult {
|
|
5
|
+
filePath: string;
|
|
6
|
+
specType: SpecType;
|
|
7
|
+
name?: string;
|
|
8
|
+
version?: number;
|
|
9
|
+
kind?: OperationKind;
|
|
10
|
+
stability?: Stability;
|
|
11
|
+
description?: string;
|
|
12
|
+
owners?: string[];
|
|
13
|
+
tags?: string[];
|
|
14
|
+
hasMeta: boolean;
|
|
15
|
+
hasIo: boolean;
|
|
16
|
+
hasPolicy: boolean;
|
|
17
|
+
hasPayload: boolean;
|
|
18
|
+
hasContent: boolean;
|
|
19
|
+
hasDefinition: boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare function inferSpecTypeFromFilePath(filePath: string): SpecType;
|
|
22
|
+
export declare function scanSpecSource(code: string, filePath: string): SpecScanResult;
|
|
23
|
+
//# sourceMappingURL=spec-scan.d.ts.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Validate that a string is a valid TypeScript identifier
|
|
4
|
+
*/
|
|
5
|
+
export declare function isValidIdentifier(str: string): boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Validate that a string is a valid dot-notation name (e.g., "user.signup")
|
|
8
|
+
*/
|
|
9
|
+
export declare function isValidDotName(str: string): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Validate version number
|
|
12
|
+
*/
|
|
13
|
+
export declare function isValidVersion(version: number): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Validate email format
|
|
16
|
+
*/
|
|
17
|
+
export declare const emailSchema: z.ZodString;
|
|
18
|
+
/**
|
|
19
|
+
* Validate URL format
|
|
20
|
+
*/
|
|
21
|
+
export declare const urlSchema: z.ZodString;
|
|
22
|
+
/**
|
|
23
|
+
* Common validation schemas
|
|
24
|
+
*/
|
|
25
|
+
export declare const validators: {
|
|
26
|
+
specName: z.ZodString;
|
|
27
|
+
version: z.ZodNumber;
|
|
28
|
+
identifier: z.ZodString;
|
|
29
|
+
owner: z.ZodString;
|
|
30
|
+
tag: z.ZodString;
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=validation.d.ts.map
|