@lssm/module.contractspec-workspace 0.0.0-canary-20251217052941 → 0.0.0-canary-20251217060433
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/dist/ai/code-generation.d.ts +27 -0
- package/dist/ai/spec-creation.d.ts +26 -0
- package/dist/analysis/deps/graph.d.ts +33 -0
- package/dist/analysis/deps/parse-imports.d.ts +16 -0
- package/dist/analysis/diff/semantic.d.ts +10 -0
- package/dist/analysis/feature-scan.d.ts +14 -0
- package/dist/analysis/spec-scan.d.ts +33 -0
- package/dist/analysis/validate/spec-structure.d.ts +10 -0
- package/dist/index.d.ts +26 -0
- package/dist/templates/app-config.d.ts +6 -0
- package/dist/templates/data-view.d.ts +6 -0
- package/dist/templates/event.d.ts +10 -0
- package/dist/templates/experiment.d.ts +6 -0
- package/dist/templates/handler.d.ts +19 -0
- package/dist/templates/integration.d.ts +6 -0
- package/dist/templates/knowledge.d.ts +6 -0
- package/dist/templates/migration.d.ts +6 -0
- package/dist/templates/operation.d.ts +10 -0
- package/dist/templates/presentation.d.ts +10 -0
- package/dist/templates/telemetry.d.ts +6 -0
- package/dist/templates/utils.d.ts +26 -0
- package/dist/templates/workflow-runner.d.ts +15 -0
- package/dist/templates/workflow.d.ts +10 -0
- package/dist/types/analysis-types.d.ts +125 -0
- package/dist/types/generation-types.d.ts +83 -0
- package/dist/types/spec-types.d.ts +344 -0
- package/package.json +6 -6
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//#region src/ai/code-generation.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* AI prompts for code generation.
|
|
4
|
+
* Extracted from cli-contracts/src/ai/prompts/code-generation.ts
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Build prompt for generating handler implementation.
|
|
8
|
+
*/
|
|
9
|
+
declare function buildHandlerPrompt(specCode: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* Build prompt for generating React component from presentation spec.
|
|
12
|
+
*/
|
|
13
|
+
declare function buildComponentPrompt(specCode: string): string;
|
|
14
|
+
/**
|
|
15
|
+
* Build prompt for generating form component.
|
|
16
|
+
*/
|
|
17
|
+
declare function buildFormPrompt(specCode: string): string;
|
|
18
|
+
/**
|
|
19
|
+
* Build prompt for generating tests.
|
|
20
|
+
*/
|
|
21
|
+
declare function buildTestPrompt(specCode: string, implementationCode: string, testType: 'handler' | 'component'): string;
|
|
22
|
+
/**
|
|
23
|
+
* System prompt for code generation.
|
|
24
|
+
*/
|
|
25
|
+
declare function getCodeGenSystemPrompt(): string;
|
|
26
|
+
//#endregion
|
|
27
|
+
export { buildComponentPrompt, buildFormPrompt, buildHandlerPrompt, buildTestPrompt, getCodeGenSystemPrompt };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { OpKind, PresentationKind } from "../types/spec-types.js";
|
|
2
|
+
|
|
3
|
+
//#region src/ai/spec-creation.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Build prompt for creating operation spec from description.
|
|
7
|
+
*/
|
|
8
|
+
declare function buildOperationSpecPrompt(description: string, kind: OpKind): string;
|
|
9
|
+
/**
|
|
10
|
+
* Build prompt for creating event spec from description.
|
|
11
|
+
*/
|
|
12
|
+
declare function buildEventSpecPrompt(description: string): string;
|
|
13
|
+
/**
|
|
14
|
+
* Build prompt for creating presentation spec from description.
|
|
15
|
+
*/
|
|
16
|
+
declare function buildPresentationSpecPrompt(description: string, kind: PresentationKind): string;
|
|
17
|
+
/**
|
|
18
|
+
* Build system prompt for all spec generation.
|
|
19
|
+
*/
|
|
20
|
+
declare function getSystemPrompt(): string;
|
|
21
|
+
/**
|
|
22
|
+
* Create example-based prompt for better results.
|
|
23
|
+
*/
|
|
24
|
+
declare function addExampleContext(basePrompt: string, examples: string[]): string;
|
|
25
|
+
//#endregion
|
|
26
|
+
export { addExampleContext, buildEventSpecPrompt, buildOperationSpecPrompt, buildPresentationSpecPrompt, getSystemPrompt };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ContractGraph, ContractNode } from "../../types/analysis-types.js";
|
|
2
|
+
|
|
3
|
+
//#region src/analysis/deps/graph.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Build reverse edges (dependents) for all nodes in the graph.
|
|
7
|
+
*/
|
|
8
|
+
declare function buildReverseEdges(graph: ContractGraph): void;
|
|
9
|
+
/**
|
|
10
|
+
* Detect circular dependencies in the graph.
|
|
11
|
+
*/
|
|
12
|
+
declare function detectCycles(graph: ContractGraph): string[][];
|
|
13
|
+
/**
|
|
14
|
+
* Find missing dependencies (referenced but not defined).
|
|
15
|
+
*/
|
|
16
|
+
declare function findMissingDependencies(graph: ContractGraph): {
|
|
17
|
+
contract: string;
|
|
18
|
+
missing: string[];
|
|
19
|
+
}[];
|
|
20
|
+
/**
|
|
21
|
+
* Generate DOT format output for visualization.
|
|
22
|
+
*/
|
|
23
|
+
declare function toDot(graph: ContractGraph): string;
|
|
24
|
+
/**
|
|
25
|
+
* Create an empty contract graph.
|
|
26
|
+
*/
|
|
27
|
+
declare function createContractGraph(): ContractGraph;
|
|
28
|
+
/**
|
|
29
|
+
* Add a node to the contract graph.
|
|
30
|
+
*/
|
|
31
|
+
declare function addContractNode(graph: ContractGraph, name: string, file: string, dependencies: string[]): void;
|
|
32
|
+
//#endregion
|
|
33
|
+
export { addContractNode, buildReverseEdges, createContractGraph, detectCycles, findMissingDependencies, toDot };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//#region src/analysis/deps/parse-imports.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Import parsing utilities for dependency analysis.
|
|
4
|
+
* Extracted from cli-contracts/src/commands/deps/parse-imports.ts
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Parse spec imports from source code.
|
|
8
|
+
* Returns the names of imported specs based on file naming conventions.
|
|
9
|
+
*
|
|
10
|
+
* @param sourceCode - The source code to parse
|
|
11
|
+
* @param fromFilePath - The path of the file being parsed (for relative resolution)
|
|
12
|
+
* @returns Array of imported spec names
|
|
13
|
+
*/
|
|
14
|
+
declare function parseImportedSpecNames(sourceCode: string, _fromFilePath: string): string[];
|
|
15
|
+
//#endregion
|
|
16
|
+
export { parseImportedSpecNames };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SemanticDiffItem, SemanticDiffOptions } from "../../types/analysis-types.js";
|
|
2
|
+
|
|
3
|
+
//#region src/analysis/diff/semantic.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Compute semantic differences between two spec sources.
|
|
7
|
+
*/
|
|
8
|
+
declare function computeSemanticDiff(aCode: string, aPath: string, bCode: string, bPath: string, options?: SemanticDiffOptions): SemanticDiffItem[];
|
|
9
|
+
//#endregion
|
|
10
|
+
export { computeSemanticDiff };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FeatureScanResult } from "../types/analysis-types.js";
|
|
2
|
+
|
|
3
|
+
//#region src/analysis/feature-scan.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Check if a file is a feature file based on naming conventions.
|
|
7
|
+
*/
|
|
8
|
+
declare function isFeatureFile(filePath: string): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Scan a feature source file to extract metadata.
|
|
11
|
+
*/
|
|
12
|
+
declare function scanFeatureSource(code: string, filePath: string): FeatureScanResult;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { isFeatureFile, scanFeatureSource };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { AnalyzedSpecType, RefInfo, SpecScanResult } from "../types/analysis-types.js";
|
|
2
|
+
|
|
3
|
+
//#region src/analysis/spec-scan.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Infer spec type from file path based on naming conventions.
|
|
7
|
+
* Supports all contract types from @lssm/lib.contracts.
|
|
8
|
+
*/
|
|
9
|
+
declare function inferSpecTypeFromFilePath(filePath: string): AnalyzedSpecType;
|
|
10
|
+
/**
|
|
11
|
+
* Scan spec source code to extract metadata without executing it.
|
|
12
|
+
*/
|
|
13
|
+
declare function scanSpecSource(code: string, filePath: string): SpecScanResult;
|
|
14
|
+
/**
|
|
15
|
+
* Extract emitted event refs from operation spec source.
|
|
16
|
+
* Looks for sideEffects.emits array entries.
|
|
17
|
+
*/
|
|
18
|
+
declare function extractEmittedEvents(code: string): RefInfo[] | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Extract policy refs from operation spec source.
|
|
21
|
+
*/
|
|
22
|
+
declare function extractPolicyRefs(code: string): RefInfo[] | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Extract test spec refs.
|
|
25
|
+
*/
|
|
26
|
+
declare function extractTestRefs(code: string): RefInfo[] | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Scan spec source code to extract ALL specs from a file.
|
|
29
|
+
* This function finds multiple spec definitions in a single file.
|
|
30
|
+
*/
|
|
31
|
+
declare function scanAllSpecsFromSource(code: string, filePath: string): SpecScanResult[];
|
|
32
|
+
//#endregion
|
|
33
|
+
export { extractEmittedEvents, extractPolicyRefs, extractTestRefs, inferSpecTypeFromFilePath, scanAllSpecsFromSource, scanSpecSource };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ValidationResult } from "../../types/analysis-types.js";
|
|
2
|
+
|
|
3
|
+
//#region src/analysis/validate/spec-structure.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Validate spec structure based on source code and filename.
|
|
7
|
+
*/
|
|
8
|
+
declare function validateSpecStructure(code: string, fileName: string): ValidationResult;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { validateSpecStructure };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { AppBlueprintSpecData, AppConfigFeatureFlagData, AppConfigMappingData, AppRouteConfigData, BaseSpecData, DataViewFieldData, DataViewKind, DataViewSpecData, EventSpecData, ExperimentAllocationData, ExperimentMetricData, ExperimentSpecData, ExperimentVariantData, ExperimentVariantOverrideData, FeatureSpecData, FormSpecData, IntegrationCapabilityRefData, IntegrationCapabilityRequirementData, IntegrationCategoryData, IntegrationConfigFieldData, IntegrationConfigFieldType, IntegrationHealthCheckMethod, IntegrationOwnershipModeData, IntegrationSecretFieldData, IntegrationSpecData, KnowledgeCategoryData, KnowledgeRetentionData, KnowledgeSpaceSpecData, KnowledgeTrustLevel, MigrationSpecData, MigrationStepData, MigrationStepKind, OpKind, OperationSpecData, PresentationKind, PresentationSpecData, RandomAllocationData, SpecType, Stability, StepType, StickyAllocationData, TargetedAllocationData, TargetingRuleData, TelemetryAnomalyRuleData, TelemetryEventData, TelemetryPrivacy, TelemetryPropertyData, TelemetryProviderData, TelemetrySpecData, WorkflowSpecData, WorkflowStepData, WorkflowTransitionData } from "./types/spec-types.js";
|
|
2
|
+
import { AnalyzedOperationKind, AnalyzedSpecType, ContractGraph, ContractNode, ExtractedRef, FeatureScanResult, RefInfo, RefType, SemanticDiffItem, SemanticDiffOptions, SemanticDiffType, SpecScanResult, ValidationResult } from "./types/analysis-types.js";
|
|
3
|
+
import { AIGenerationOptions, CodeGenerationContext, DEFAULT_WORKSPACE_CONFIG, GenerationResult, GenerationTarget, SpecBuildType, SpecGenerationContext, TestTarget, WorkspaceConfig } from "./types/generation-types.js";
|
|
4
|
+
import { extractEmittedEvents, extractPolicyRefs, extractTestRefs, inferSpecTypeFromFilePath, scanAllSpecsFromSource, scanSpecSource } from "./analysis/spec-scan.js";
|
|
5
|
+
import { isFeatureFile, scanFeatureSource } from "./analysis/feature-scan.js";
|
|
6
|
+
import { computeSemanticDiff } from "./analysis/diff/semantic.js";
|
|
7
|
+
import { addContractNode, buildReverseEdges, createContractGraph, detectCycles, findMissingDependencies, toDot } from "./analysis/deps/graph.js";
|
|
8
|
+
import { parseImportedSpecNames } from "./analysis/deps/parse-imports.js";
|
|
9
|
+
import { validateSpecStructure } from "./analysis/validate/spec-structure.js";
|
|
10
|
+
import { generateOperationSpec } from "./templates/operation.js";
|
|
11
|
+
import { generateEventSpec } from "./templates/event.js";
|
|
12
|
+
import { generatePresentationSpec } from "./templates/presentation.js";
|
|
13
|
+
import { generateWorkflowSpec } from "./templates/workflow.js";
|
|
14
|
+
import { generateWorkflowRunnerTemplate } from "./templates/workflow-runner.js";
|
|
15
|
+
import { generateDataViewSpec } from "./templates/data-view.js";
|
|
16
|
+
import { generateTelemetrySpec } from "./templates/telemetry.js";
|
|
17
|
+
import { generateExperimentSpec } from "./templates/experiment.js";
|
|
18
|
+
import { generateAppBlueprintSpec } from "./templates/app-config.js";
|
|
19
|
+
import { generateMigrationSpec } from "./templates/migration.js";
|
|
20
|
+
import { generateIntegrationSpec } from "./templates/integration.js";
|
|
21
|
+
import { generateKnowledgeSpaceSpec } from "./templates/knowledge.js";
|
|
22
|
+
import { generateComponentTemplate, generateHandlerTemplate, generateTestTemplate } from "./templates/handler.js";
|
|
23
|
+
import { capitalize, escapeString, toCamelCase, toKebabCase, toPascalCase } from "./templates/utils.js";
|
|
24
|
+
import { addExampleContext, buildEventSpecPrompt, buildOperationSpecPrompt, buildPresentationSpecPrompt, getSystemPrompt } from "./ai/spec-creation.js";
|
|
25
|
+
import { buildComponentPrompt, buildFormPrompt, buildHandlerPrompt, buildTestPrompt, getCodeGenSystemPrompt } from "./ai/code-generation.js";
|
|
26
|
+
export { AIGenerationOptions, AnalyzedOperationKind, AnalyzedSpecType, AppBlueprintSpecData, AppConfigFeatureFlagData, AppConfigMappingData, AppRouteConfigData, BaseSpecData, CodeGenerationContext, ContractGraph, ContractNode, DEFAULT_WORKSPACE_CONFIG, DataViewFieldData, DataViewKind, DataViewSpecData, EventSpecData, ExperimentAllocationData, ExperimentMetricData, ExperimentSpecData, ExperimentVariantData, ExperimentVariantOverrideData, ExtractedRef, FeatureScanResult, FeatureSpecData, FormSpecData, GenerationResult, GenerationTarget, IntegrationCapabilityRefData, IntegrationCapabilityRequirementData, IntegrationCategoryData, IntegrationConfigFieldData, IntegrationConfigFieldType, IntegrationHealthCheckMethod, IntegrationOwnershipModeData, IntegrationSecretFieldData, IntegrationSpecData, KnowledgeCategoryData, KnowledgeRetentionData, KnowledgeSpaceSpecData, KnowledgeTrustLevel, MigrationSpecData, MigrationStepData, MigrationStepKind, OpKind, OperationSpecData, PresentationKind, PresentationSpecData, RandomAllocationData, RefInfo, RefType, SemanticDiffItem, SemanticDiffOptions, SemanticDiffType, SpecBuildType, SpecGenerationContext, SpecScanResult, SpecType, Stability, StepType, StickyAllocationData, TargetedAllocationData, TargetingRuleData, TelemetryAnomalyRuleData, TelemetryEventData, TelemetryPrivacy, TelemetryPropertyData, TelemetryProviderData, TelemetrySpecData, TestTarget, ValidationResult, WorkflowSpecData, WorkflowStepData, WorkflowTransitionData, WorkspaceConfig, addContractNode, addExampleContext, buildComponentPrompt, buildEventSpecPrompt, buildFormPrompt, buildHandlerPrompt, buildOperationSpecPrompt, buildPresentationSpecPrompt, buildReverseEdges, buildTestPrompt, capitalize, computeSemanticDiff, createContractGraph, detectCycles, escapeString, extractEmittedEvents, extractPolicyRefs, extractTestRefs, findMissingDependencies, generateAppBlueprintSpec, generateComponentTemplate, generateDataViewSpec, generateEventSpec, generateExperimentSpec, generateHandlerTemplate, generateIntegrationSpec, generateKnowledgeSpaceSpec, generateMigrationSpec, generateOperationSpec, generatePresentationSpec, generateTelemetrySpec, generateTestTemplate, generateWorkflowRunnerTemplate, generateWorkflowSpec, getCodeGenSystemPrompt, getSystemPrompt, inferSpecTypeFromFilePath, isFeatureFile, parseImportedSpecNames, scanAllSpecsFromSource, scanFeatureSource, scanSpecSource, toCamelCase, toDot, toKebabCase, toPascalCase, validateSpecStructure };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { EventSpecData } from "../types/spec-types.js";
|
|
2
|
+
|
|
3
|
+
//#region src/templates/event.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Generate event spec TypeScript code.
|
|
7
|
+
*/
|
|
8
|
+
declare function generateEventSpec(data: EventSpecData): string;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { generateEventSpec };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//#region src/templates/handler.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Handler and component template generation.
|
|
4
|
+
* Extracted from cli-contracts/src/templates/handler.template.ts
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Generate handler implementation template.
|
|
8
|
+
*/
|
|
9
|
+
declare function generateHandlerTemplate(specName: string, kind: 'command' | 'query'): string;
|
|
10
|
+
/**
|
|
11
|
+
* Generate React component template.
|
|
12
|
+
*/
|
|
13
|
+
declare function generateComponentTemplate(componentName: string, description: string): string;
|
|
14
|
+
/**
|
|
15
|
+
* Generate test template.
|
|
16
|
+
*/
|
|
17
|
+
declare function generateTestTemplate(targetName: string, type: 'handler' | 'component'): string;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { generateComponentTemplate, generateHandlerTemplate, generateTestTemplate };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { OperationSpecData } from "../types/spec-types.js";
|
|
2
|
+
|
|
3
|
+
//#region src/templates/operation.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Generate operation spec TypeScript code.
|
|
7
|
+
*/
|
|
8
|
+
declare function generateOperationSpec(data: OperationSpecData): string;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { generateOperationSpec };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PresentationSpecData } from "../types/spec-types.js";
|
|
2
|
+
|
|
3
|
+
//#region src/templates/presentation.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Generate presentation spec TypeScript code.
|
|
7
|
+
*/
|
|
8
|
+
declare function generatePresentationSpec(data: PresentationSpecData): string;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { generatePresentationSpec };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
//#region src/templates/utils.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Utility functions for template generation.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Convert string to camelCase.
|
|
7
|
+
*/
|
|
8
|
+
declare function toCamelCase(str: string): string;
|
|
9
|
+
/**
|
|
10
|
+
* Convert string to PascalCase.
|
|
11
|
+
*/
|
|
12
|
+
declare function toPascalCase(str: string): string;
|
|
13
|
+
/**
|
|
14
|
+
* Convert string to kebab-case.
|
|
15
|
+
*/
|
|
16
|
+
declare function toKebabCase(str: string): string;
|
|
17
|
+
/**
|
|
18
|
+
* Capitalize first letter.
|
|
19
|
+
*/
|
|
20
|
+
declare function capitalize(str: string): string;
|
|
21
|
+
/**
|
|
22
|
+
* Escape single quotes in string.
|
|
23
|
+
*/
|
|
24
|
+
declare function escapeString(value: string): string;
|
|
25
|
+
//#endregion
|
|
26
|
+
export { capitalize, escapeString, toCamelCase, toKebabCase, toPascalCase };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//#region src/templates/workflow-runner.d.ts
|
|
2
|
+
interface RunnerTemplateOptions {
|
|
3
|
+
exportName: string;
|
|
4
|
+
specImportPath: string;
|
|
5
|
+
runnerName: string;
|
|
6
|
+
workflowName: string;
|
|
7
|
+
}
|
|
8
|
+
declare function generateWorkflowRunnerTemplate({
|
|
9
|
+
exportName,
|
|
10
|
+
specImportPath,
|
|
11
|
+
runnerName,
|
|
12
|
+
workflowName
|
|
13
|
+
}: RunnerTemplateOptions): string;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { generateWorkflowRunnerTemplate };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { WorkflowSpecData } from "../types/spec-types.js";
|
|
2
|
+
|
|
3
|
+
//#region src/templates/workflow.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Generate workflow spec TypeScript code.
|
|
7
|
+
*/
|
|
8
|
+
declare function generateWorkflowSpec(data: WorkflowSpecData): string;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { generateWorkflowSpec };
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { Stability } from "./spec-types.js";
|
|
2
|
+
|
|
3
|
+
//#region src/types/analysis-types.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Spec type detected from file analysis.
|
|
7
|
+
* Covers all contract types from @lssm/lib.contracts.
|
|
8
|
+
*/
|
|
9
|
+
type AnalyzedSpecType = 'operation' | 'event' | 'presentation' | 'feature' | 'capability' | 'data-view' | 'form' | 'migration' | 'workflow' | 'experiment' | 'integration' | 'knowledge' | 'telemetry' | 'app-config' | 'policy' | 'test-spec' | 'unknown';
|
|
10
|
+
/**
|
|
11
|
+
* Types that can be referenced by features.
|
|
12
|
+
*/
|
|
13
|
+
type RefType = 'operation' | 'event' | 'presentation' | 'capability' | 'experiment' | 'policy' | 'test';
|
|
14
|
+
/**
|
|
15
|
+
* Operation kind detected from file analysis.
|
|
16
|
+
*/
|
|
17
|
+
type AnalyzedOperationKind = 'command' | 'query' | 'unknown';
|
|
18
|
+
/**
|
|
19
|
+
* Reference information (name + version).
|
|
20
|
+
*/
|
|
21
|
+
interface RefInfo {
|
|
22
|
+
name: string;
|
|
23
|
+
version: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* A reference extracted from source code with location context.
|
|
27
|
+
*/
|
|
28
|
+
interface ExtractedRef {
|
|
29
|
+
type: RefType;
|
|
30
|
+
name: string;
|
|
31
|
+
version: number;
|
|
32
|
+
sourceFile: string;
|
|
33
|
+
sourceLine?: number;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Result of scanning a spec source file.
|
|
37
|
+
*/
|
|
38
|
+
interface SpecScanResult {
|
|
39
|
+
filePath: string;
|
|
40
|
+
specType: AnalyzedSpecType;
|
|
41
|
+
name?: string;
|
|
42
|
+
version?: number;
|
|
43
|
+
kind?: AnalyzedOperationKind;
|
|
44
|
+
stability?: Stability;
|
|
45
|
+
description?: string;
|
|
46
|
+
owners?: string[];
|
|
47
|
+
tags?: string[];
|
|
48
|
+
hasMeta: boolean;
|
|
49
|
+
hasIo: boolean;
|
|
50
|
+
hasPolicy: boolean;
|
|
51
|
+
hasPayload: boolean;
|
|
52
|
+
hasContent: boolean;
|
|
53
|
+
hasDefinition: boolean;
|
|
54
|
+
emittedEvents?: RefInfo[];
|
|
55
|
+
policyRefs?: RefInfo[];
|
|
56
|
+
testRefs?: RefInfo[];
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Result of scanning a feature file.
|
|
60
|
+
*/
|
|
61
|
+
interface FeatureScanResult {
|
|
62
|
+
filePath: string;
|
|
63
|
+
key: string;
|
|
64
|
+
title?: string;
|
|
65
|
+
description?: string;
|
|
66
|
+
domain?: string;
|
|
67
|
+
stability?: Stability;
|
|
68
|
+
owners?: string[];
|
|
69
|
+
tags?: string[];
|
|
70
|
+
operations: RefInfo[];
|
|
71
|
+
events: RefInfo[];
|
|
72
|
+
presentations: RefInfo[];
|
|
73
|
+
experiments: RefInfo[];
|
|
74
|
+
capabilities: {
|
|
75
|
+
provides: RefInfo[];
|
|
76
|
+
requires: RefInfo[];
|
|
77
|
+
};
|
|
78
|
+
opToPresentationLinks: {
|
|
79
|
+
op: RefInfo;
|
|
80
|
+
pres: RefInfo;
|
|
81
|
+
}[];
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Semantic diff item types.
|
|
85
|
+
*/
|
|
86
|
+
type SemanticDiffType = 'breaking' | 'changed' | 'added' | 'removed';
|
|
87
|
+
/**
|
|
88
|
+
* A single semantic difference between two specs.
|
|
89
|
+
*/
|
|
90
|
+
interface SemanticDiffItem {
|
|
91
|
+
type: SemanticDiffType;
|
|
92
|
+
path: string;
|
|
93
|
+
oldValue?: unknown;
|
|
94
|
+
newValue?: unknown;
|
|
95
|
+
description: string;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Options for semantic diff computation.
|
|
99
|
+
*/
|
|
100
|
+
interface SemanticDiffOptions {
|
|
101
|
+
breakingOnly?: boolean;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* A node in the contract dependency graph.
|
|
105
|
+
*/
|
|
106
|
+
interface ContractNode {
|
|
107
|
+
name: string;
|
|
108
|
+
file: string;
|
|
109
|
+
dependencies: string[];
|
|
110
|
+
dependents: string[];
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* The contract dependency graph.
|
|
114
|
+
*/
|
|
115
|
+
type ContractGraph = Map<string, ContractNode>;
|
|
116
|
+
/**
|
|
117
|
+
* Result of spec structure validation.
|
|
118
|
+
*/
|
|
119
|
+
interface ValidationResult {
|
|
120
|
+
valid: boolean;
|
|
121
|
+
errors: string[];
|
|
122
|
+
warnings: string[];
|
|
123
|
+
}
|
|
124
|
+
//#endregion
|
|
125
|
+
export { AnalyzedOperationKind, AnalyzedSpecType, ContractGraph, ContractNode, ExtractedRef, FeatureScanResult, RefInfo, RefType, SemanticDiffItem, SemanticDiffOptions, SemanticDiffType, SpecScanResult, ValidationResult };
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { OpKind, PresentationKind, SpecType } from "./spec-types.js";
|
|
2
|
+
|
|
3
|
+
//#region src/types/generation-types.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* AI provider options for generation.
|
|
7
|
+
*/
|
|
8
|
+
interface AIGenerationOptions {
|
|
9
|
+
provider: 'claude' | 'openai' | 'ollama' | 'custom';
|
|
10
|
+
model?: string;
|
|
11
|
+
endpoint?: string;
|
|
12
|
+
stream?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Result of code generation.
|
|
16
|
+
*/
|
|
17
|
+
interface GenerationResult {
|
|
18
|
+
code: string;
|
|
19
|
+
filePath: string;
|
|
20
|
+
specType: SpecType;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Build target types.
|
|
24
|
+
*/
|
|
25
|
+
type GenerationTarget = 'handler' | 'component' | 'form';
|
|
26
|
+
/**
|
|
27
|
+
* Test target types.
|
|
28
|
+
*/
|
|
29
|
+
type TestTarget = 'handler' | 'component';
|
|
30
|
+
/**
|
|
31
|
+
* Spec build type detected during build.
|
|
32
|
+
*/
|
|
33
|
+
type SpecBuildType = 'operation' | 'presentation' | 'form' | 'event' | 'workflow' | 'data-view' | 'telemetry' | 'migration' | 'experiment' | 'app-config' | 'integration' | 'knowledge' | 'unknown';
|
|
34
|
+
/**
|
|
35
|
+
* Configuration for workspace operations.
|
|
36
|
+
*/
|
|
37
|
+
interface WorkspaceConfig {
|
|
38
|
+
aiProvider: 'claude' | 'openai' | 'ollama' | 'custom';
|
|
39
|
+
aiModel?: string;
|
|
40
|
+
agentMode: 'simple' | 'cursor' | 'claude-code' | 'openai-codex';
|
|
41
|
+
customEndpoint?: string | null;
|
|
42
|
+
customApiKey?: string | null;
|
|
43
|
+
outputDir: string;
|
|
44
|
+
conventions: {
|
|
45
|
+
operations: string;
|
|
46
|
+
events: string;
|
|
47
|
+
presentations: string;
|
|
48
|
+
forms: string;
|
|
49
|
+
workflows?: string;
|
|
50
|
+
'data-views'?: string;
|
|
51
|
+
dataViews?: string;
|
|
52
|
+
migrations?: string;
|
|
53
|
+
telemetry?: string;
|
|
54
|
+
experiments?: string;
|
|
55
|
+
appConfig?: string;
|
|
56
|
+
integrations?: string;
|
|
57
|
+
knowledge?: string;
|
|
58
|
+
};
|
|
59
|
+
defaultOwners: string[];
|
|
60
|
+
defaultTags: string[];
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Default workspace configuration.
|
|
64
|
+
*/
|
|
65
|
+
declare const DEFAULT_WORKSPACE_CONFIG: WorkspaceConfig;
|
|
66
|
+
/**
|
|
67
|
+
* AI prompt context for spec generation.
|
|
68
|
+
*/
|
|
69
|
+
interface SpecGenerationContext {
|
|
70
|
+
description: string;
|
|
71
|
+
kind?: OpKind;
|
|
72
|
+
presentationKind?: PresentationKind;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* AI prompt context for code generation.
|
|
76
|
+
*/
|
|
77
|
+
interface CodeGenerationContext {
|
|
78
|
+
specCode: string;
|
|
79
|
+
targetPath?: string;
|
|
80
|
+
existingCode?: string;
|
|
81
|
+
}
|
|
82
|
+
//#endregion
|
|
83
|
+
export { AIGenerationOptions, CodeGenerationContext, DEFAULT_WORKSPACE_CONFIG, GenerationResult, GenerationTarget, SpecBuildType, SpecGenerationContext, TestTarget, WorkspaceConfig };
|
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
//#region src/types/spec-types.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Core spec type definitions.
|
|
4
|
+
* Extracted from cli-contracts/src/types.ts
|
|
5
|
+
*/
|
|
6
|
+
type SpecType = 'operation' | 'event' | 'presentation' | 'form' | 'feature' | 'workflow' | 'data-view' | 'migration' | 'telemetry' | 'experiment' | 'app-config' | 'integration' | 'knowledge';
|
|
7
|
+
type OpKind = 'command' | 'query';
|
|
8
|
+
type PresentationKind = 'web_component' | 'markdown' | 'data';
|
|
9
|
+
type Stability = 'experimental' | 'beta' | 'stable' | 'deprecated';
|
|
10
|
+
type StepType = 'human' | 'automation' | 'decision';
|
|
11
|
+
interface BaseSpecData {
|
|
12
|
+
name: string;
|
|
13
|
+
version: number;
|
|
14
|
+
description: string;
|
|
15
|
+
owners: string[];
|
|
16
|
+
tags: string[];
|
|
17
|
+
stability: Stability;
|
|
18
|
+
}
|
|
19
|
+
interface OperationSpecData extends BaseSpecData {
|
|
20
|
+
kind: OpKind;
|
|
21
|
+
goal: string;
|
|
22
|
+
context: string;
|
|
23
|
+
hasInput: boolean;
|
|
24
|
+
hasOutput: boolean;
|
|
25
|
+
auth: 'anonymous' | 'user' | 'admin';
|
|
26
|
+
flags: string[];
|
|
27
|
+
emitsEvents: boolean;
|
|
28
|
+
}
|
|
29
|
+
interface EventSpecData extends BaseSpecData {
|
|
30
|
+
piiFields: string[];
|
|
31
|
+
}
|
|
32
|
+
interface PresentationSpecData extends BaseSpecData {
|
|
33
|
+
presentationKind: PresentationKind;
|
|
34
|
+
}
|
|
35
|
+
type FormSpecData = BaseSpecData;
|
|
36
|
+
interface FeatureSpecData extends BaseSpecData {
|
|
37
|
+
key: string;
|
|
38
|
+
operations: {
|
|
39
|
+
name: string;
|
|
40
|
+
version: number;
|
|
41
|
+
}[];
|
|
42
|
+
events: {
|
|
43
|
+
name: string;
|
|
44
|
+
version: number;
|
|
45
|
+
}[];
|
|
46
|
+
presentations: {
|
|
47
|
+
name: string;
|
|
48
|
+
version: number;
|
|
49
|
+
}[];
|
|
50
|
+
}
|
|
51
|
+
interface WorkflowStepData {
|
|
52
|
+
id: string;
|
|
53
|
+
label: string;
|
|
54
|
+
type: StepType;
|
|
55
|
+
description?: string;
|
|
56
|
+
operation?: {
|
|
57
|
+
name: string;
|
|
58
|
+
version: number;
|
|
59
|
+
};
|
|
60
|
+
form?: {
|
|
61
|
+
key: string;
|
|
62
|
+
version: number;
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
interface WorkflowTransitionData {
|
|
66
|
+
from: string;
|
|
67
|
+
to: string;
|
|
68
|
+
condition?: string;
|
|
69
|
+
}
|
|
70
|
+
interface WorkflowSpecData extends BaseSpecData {
|
|
71
|
+
title: string;
|
|
72
|
+
domain: string;
|
|
73
|
+
entryStepId?: string;
|
|
74
|
+
steps: WorkflowStepData[];
|
|
75
|
+
transitions: WorkflowTransitionData[];
|
|
76
|
+
policyFlags: string[];
|
|
77
|
+
}
|
|
78
|
+
type DataViewKind = 'list' | 'detail' | 'table' | 'grid';
|
|
79
|
+
interface DataViewFieldData {
|
|
80
|
+
key: string;
|
|
81
|
+
label: string;
|
|
82
|
+
dataPath: string;
|
|
83
|
+
format?: string;
|
|
84
|
+
sortable?: boolean;
|
|
85
|
+
filterable?: boolean;
|
|
86
|
+
}
|
|
87
|
+
interface DataViewSpecData extends BaseSpecData {
|
|
88
|
+
title: string;
|
|
89
|
+
domain: string;
|
|
90
|
+
entity: string;
|
|
91
|
+
kind: DataViewKind;
|
|
92
|
+
primaryOperation: {
|
|
93
|
+
name: string;
|
|
94
|
+
version: number;
|
|
95
|
+
};
|
|
96
|
+
itemOperation?: {
|
|
97
|
+
name: string;
|
|
98
|
+
version: number;
|
|
99
|
+
};
|
|
100
|
+
fields: DataViewFieldData[];
|
|
101
|
+
primaryField?: string;
|
|
102
|
+
secondaryFields?: string[];
|
|
103
|
+
}
|
|
104
|
+
type TelemetryPrivacy = 'public' | 'internal' | 'pii' | 'sensitive';
|
|
105
|
+
interface TelemetryPropertyData {
|
|
106
|
+
name: string;
|
|
107
|
+
type: 'string' | 'number' | 'boolean' | 'timestamp' | 'json';
|
|
108
|
+
required?: boolean;
|
|
109
|
+
pii?: boolean;
|
|
110
|
+
redact?: boolean;
|
|
111
|
+
description?: string;
|
|
112
|
+
}
|
|
113
|
+
interface TelemetryAnomalyRuleData {
|
|
114
|
+
metric: string;
|
|
115
|
+
min?: number;
|
|
116
|
+
max?: number;
|
|
117
|
+
}
|
|
118
|
+
interface TelemetryEventData {
|
|
119
|
+
name: string;
|
|
120
|
+
version: number;
|
|
121
|
+
what: string;
|
|
122
|
+
who?: string;
|
|
123
|
+
why?: string;
|
|
124
|
+
privacy: TelemetryPrivacy;
|
|
125
|
+
properties: TelemetryPropertyData[];
|
|
126
|
+
retentionDays?: number;
|
|
127
|
+
retentionPolicy?: 'archive' | 'delete';
|
|
128
|
+
samplingRate?: number;
|
|
129
|
+
samplingConditions?: string;
|
|
130
|
+
anomalyEnabled?: boolean;
|
|
131
|
+
anomalyMinimumSample?: number;
|
|
132
|
+
anomalyRules?: TelemetryAnomalyRuleData[];
|
|
133
|
+
anomalyActions?: ('alert' | 'log' | 'trigger_regen')[];
|
|
134
|
+
tags?: string[];
|
|
135
|
+
}
|
|
136
|
+
interface TelemetryProviderData {
|
|
137
|
+
type: 'posthog' | 'segment' | 'opentelemetry' | 'internal';
|
|
138
|
+
config: string;
|
|
139
|
+
}
|
|
140
|
+
interface TelemetrySpecData extends BaseSpecData {
|
|
141
|
+
domain: string;
|
|
142
|
+
defaultRetentionDays?: number;
|
|
143
|
+
defaultSamplingRate?: number;
|
|
144
|
+
providers?: TelemetryProviderData[];
|
|
145
|
+
anomalyEnabled?: boolean;
|
|
146
|
+
anomalyCheckIntervalMs?: number;
|
|
147
|
+
events: TelemetryEventData[];
|
|
148
|
+
}
|
|
149
|
+
interface ExperimentVariantOverrideData {
|
|
150
|
+
type: 'dataView' | 'workflow' | 'theme' | 'policy' | 'presentation';
|
|
151
|
+
target: string;
|
|
152
|
+
version?: number;
|
|
153
|
+
}
|
|
154
|
+
interface ExperimentVariantData {
|
|
155
|
+
id: string;
|
|
156
|
+
name: string;
|
|
157
|
+
description?: string;
|
|
158
|
+
weight?: number;
|
|
159
|
+
overrides?: ExperimentVariantOverrideData[];
|
|
160
|
+
}
|
|
161
|
+
interface TargetingRuleData {
|
|
162
|
+
variantId: string;
|
|
163
|
+
percentage?: number;
|
|
164
|
+
policy?: {
|
|
165
|
+
name: string;
|
|
166
|
+
version?: number;
|
|
167
|
+
};
|
|
168
|
+
expression?: string;
|
|
169
|
+
}
|
|
170
|
+
interface RandomAllocationData {
|
|
171
|
+
type: 'random';
|
|
172
|
+
salt?: string;
|
|
173
|
+
}
|
|
174
|
+
interface StickyAllocationData {
|
|
175
|
+
type: 'sticky';
|
|
176
|
+
attribute: 'userId' | 'organizationId' | 'sessionId';
|
|
177
|
+
salt?: string;
|
|
178
|
+
}
|
|
179
|
+
interface TargetedAllocationData {
|
|
180
|
+
type: 'targeted';
|
|
181
|
+
fallback?: 'control' | 'random';
|
|
182
|
+
rules: TargetingRuleData[];
|
|
183
|
+
}
|
|
184
|
+
type ExperimentAllocationData = RandomAllocationData | StickyAllocationData | TargetedAllocationData;
|
|
185
|
+
interface ExperimentMetricData {
|
|
186
|
+
name: string;
|
|
187
|
+
eventName: string;
|
|
188
|
+
eventVersion: number;
|
|
189
|
+
aggregation: 'count' | 'avg' | 'p75' | 'p90' | 'p95' | 'p99';
|
|
190
|
+
target?: number;
|
|
191
|
+
}
|
|
192
|
+
interface ExperimentSpecData extends BaseSpecData {
|
|
193
|
+
domain: string;
|
|
194
|
+
controlVariant: string;
|
|
195
|
+
variants: ExperimentVariantData[];
|
|
196
|
+
allocation: ExperimentAllocationData;
|
|
197
|
+
successMetrics?: ExperimentMetricData[];
|
|
198
|
+
}
|
|
199
|
+
interface AppConfigMappingData {
|
|
200
|
+
slot: string;
|
|
201
|
+
name: string;
|
|
202
|
+
version?: number;
|
|
203
|
+
}
|
|
204
|
+
interface AppConfigFeatureFlagData {
|
|
205
|
+
key: string;
|
|
206
|
+
enabled: boolean;
|
|
207
|
+
variant?: string;
|
|
208
|
+
description?: string;
|
|
209
|
+
}
|
|
210
|
+
interface AppRouteConfigData {
|
|
211
|
+
path: string;
|
|
212
|
+
label?: string;
|
|
213
|
+
dataView?: string;
|
|
214
|
+
workflow?: string;
|
|
215
|
+
guardName?: string;
|
|
216
|
+
guardVersion?: number;
|
|
217
|
+
featureFlag?: string;
|
|
218
|
+
experimentName?: string;
|
|
219
|
+
experimentVersion?: number;
|
|
220
|
+
}
|
|
221
|
+
interface AppBlueprintSpecData extends BaseSpecData {
|
|
222
|
+
title: string;
|
|
223
|
+
domain: string;
|
|
224
|
+
appId: string;
|
|
225
|
+
capabilitiesEnabled: string[];
|
|
226
|
+
capabilitiesDisabled: string[];
|
|
227
|
+
featureIncludes: string[];
|
|
228
|
+
featureExcludes: string[];
|
|
229
|
+
dataViews: AppConfigMappingData[];
|
|
230
|
+
workflows: AppConfigMappingData[];
|
|
231
|
+
policyRefs: {
|
|
232
|
+
name: string;
|
|
233
|
+
version?: number;
|
|
234
|
+
}[];
|
|
235
|
+
theme?: {
|
|
236
|
+
name: string;
|
|
237
|
+
version: number;
|
|
238
|
+
};
|
|
239
|
+
themeFallbacks: {
|
|
240
|
+
name: string;
|
|
241
|
+
version: number;
|
|
242
|
+
}[];
|
|
243
|
+
telemetry?: {
|
|
244
|
+
name: string;
|
|
245
|
+
version?: number;
|
|
246
|
+
};
|
|
247
|
+
activeExperiments: {
|
|
248
|
+
name: string;
|
|
249
|
+
version?: number;
|
|
250
|
+
}[];
|
|
251
|
+
pausedExperiments: {
|
|
252
|
+
name: string;
|
|
253
|
+
version?: number;
|
|
254
|
+
}[];
|
|
255
|
+
featureFlags: AppConfigFeatureFlagData[];
|
|
256
|
+
routes: AppRouteConfigData[];
|
|
257
|
+
notes?: string;
|
|
258
|
+
}
|
|
259
|
+
type MigrationStepKind = 'schema' | 'data' | 'validation';
|
|
260
|
+
interface MigrationStepData {
|
|
261
|
+
kind: MigrationStepKind;
|
|
262
|
+
description?: string;
|
|
263
|
+
sql?: string;
|
|
264
|
+
script?: string;
|
|
265
|
+
assertion?: string;
|
|
266
|
+
timeoutMs?: number;
|
|
267
|
+
retries?: number;
|
|
268
|
+
preChecks?: {
|
|
269
|
+
description: string;
|
|
270
|
+
expression: string;
|
|
271
|
+
}[];
|
|
272
|
+
postChecks?: {
|
|
273
|
+
description: string;
|
|
274
|
+
expression: string;
|
|
275
|
+
}[];
|
|
276
|
+
}
|
|
277
|
+
interface MigrationSpecData extends BaseSpecData {
|
|
278
|
+
title: string;
|
|
279
|
+
domain: string;
|
|
280
|
+
dependencies: string[];
|
|
281
|
+
up: MigrationStepData[];
|
|
282
|
+
down?: MigrationStepData[];
|
|
283
|
+
}
|
|
284
|
+
type IntegrationCategoryData = 'payments' | 'email' | 'calendar' | 'sms' | 'ai-llm' | 'ai-voice' | 'speech-to-text' | 'vector-db' | 'storage' | 'accounting' | 'crm' | 'helpdesk' | 'open-banking' | 'custom';
|
|
285
|
+
type IntegrationConfigFieldType = 'string' | 'number' | 'boolean';
|
|
286
|
+
type IntegrationOwnershipModeData = 'managed' | 'byok';
|
|
287
|
+
type IntegrationHealthCheckMethod = 'ping' | 'list' | 'custom';
|
|
288
|
+
interface IntegrationCapabilityRefData {
|
|
289
|
+
key: string;
|
|
290
|
+
version: number;
|
|
291
|
+
}
|
|
292
|
+
interface IntegrationCapabilityRequirementData {
|
|
293
|
+
key: string;
|
|
294
|
+
version?: number;
|
|
295
|
+
optional?: boolean;
|
|
296
|
+
reason?: string;
|
|
297
|
+
}
|
|
298
|
+
interface IntegrationConfigFieldData {
|
|
299
|
+
key: string;
|
|
300
|
+
type: IntegrationConfigFieldType;
|
|
301
|
+
required: boolean;
|
|
302
|
+
description?: string;
|
|
303
|
+
}
|
|
304
|
+
type IntegrationSecretFieldData = IntegrationConfigFieldData;
|
|
305
|
+
interface IntegrationSpecData extends BaseSpecData {
|
|
306
|
+
title: string;
|
|
307
|
+
domain: string;
|
|
308
|
+
displayName: string;
|
|
309
|
+
category: IntegrationCategoryData;
|
|
310
|
+
supportedModes: IntegrationOwnershipModeData[];
|
|
311
|
+
capabilitiesProvided: IntegrationCapabilityRefData[];
|
|
312
|
+
capabilitiesRequired: IntegrationCapabilityRequirementData[];
|
|
313
|
+
configFields: IntegrationConfigFieldData[];
|
|
314
|
+
secretFields: IntegrationSecretFieldData[];
|
|
315
|
+
docsUrl?: string;
|
|
316
|
+
rateLimitRpm?: number;
|
|
317
|
+
rateLimitRph?: number;
|
|
318
|
+
healthCheckMethod: IntegrationHealthCheckMethod;
|
|
319
|
+
healthCheckTimeoutMs?: number;
|
|
320
|
+
byokSetupInstructions?: string;
|
|
321
|
+
byokRequiredScopes?: string[];
|
|
322
|
+
}
|
|
323
|
+
type KnowledgeCategoryData = 'canonical' | 'operational' | 'external' | 'ephemeral';
|
|
324
|
+
type KnowledgeTrustLevel = 'high' | 'medium' | 'low';
|
|
325
|
+
interface KnowledgeRetentionData {
|
|
326
|
+
ttlDays?: number | null;
|
|
327
|
+
archiveAfterDays?: number;
|
|
328
|
+
}
|
|
329
|
+
interface KnowledgeSpaceSpecData extends BaseSpecData {
|
|
330
|
+
title: string;
|
|
331
|
+
domain: string;
|
|
332
|
+
displayName: string;
|
|
333
|
+
category: KnowledgeCategoryData;
|
|
334
|
+
retention: KnowledgeRetentionData;
|
|
335
|
+
policyName?: string;
|
|
336
|
+
policyVersion?: number;
|
|
337
|
+
trustLevel: KnowledgeTrustLevel;
|
|
338
|
+
automationWritable: boolean;
|
|
339
|
+
embeddingModel?: string;
|
|
340
|
+
chunkSize?: number;
|
|
341
|
+
vectorDbIntegration?: string;
|
|
342
|
+
}
|
|
343
|
+
//#endregion
|
|
344
|
+
export { AppBlueprintSpecData, AppConfigFeatureFlagData, AppConfigMappingData, AppRouteConfigData, BaseSpecData, DataViewFieldData, DataViewKind, DataViewSpecData, EventSpecData, ExperimentAllocationData, ExperimentMetricData, ExperimentSpecData, ExperimentVariantData, ExperimentVariantOverrideData, FeatureSpecData, FormSpecData, IntegrationCapabilityRefData, IntegrationCapabilityRequirementData, IntegrationCategoryData, IntegrationConfigFieldData, IntegrationConfigFieldType, IntegrationHealthCheckMethod, IntegrationOwnershipModeData, IntegrationSecretFieldData, IntegrationSpecData, KnowledgeCategoryData, KnowledgeRetentionData, KnowledgeSpaceSpecData, KnowledgeTrustLevel, MigrationSpecData, MigrationStepData, MigrationStepKind, OpKind, OperationSpecData, PresentationKind, PresentationSpecData, RandomAllocationData, SpecType, Stability, StepType, StickyAllocationData, TargetedAllocationData, TargetingRuleData, TelemetryAnomalyRuleData, TelemetryEventData, TelemetryPrivacy, TelemetryPropertyData, TelemetryProviderData, TelemetrySpecData, WorkflowSpecData, WorkflowStepData, WorkflowTransitionData };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lssm/module.contractspec-workspace",
|
|
3
|
-
"version": "0.0.0-canary-
|
|
3
|
+
"version": "0.0.0-canary-20251217060433",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -23,18 +23,18 @@
|
|
|
23
23
|
"test": "bun run"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@lssm/lib.contracts": "0.0.0-canary-
|
|
27
|
-
"@lssm/lib.schema": "0.0.0-canary-
|
|
26
|
+
"@lssm/lib.contracts": "0.0.0-canary-20251217060433",
|
|
27
|
+
"@lssm/lib.schema": "0.0.0-canary-20251217060433",
|
|
28
28
|
"zod": "^4.1.13"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@lssm/tool.tsdown": "0.0.0-canary-
|
|
32
|
-
"@lssm/tool.typescript": "0.0.0-canary-
|
|
31
|
+
"@lssm/tool.tsdown": "0.0.0-canary-20251217060433",
|
|
32
|
+
"@lssm/tool.typescript": "0.0.0-canary-20251217060433",
|
|
33
33
|
"tsdown": "^0.17.4",
|
|
34
34
|
"typescript": "^5.9.3"
|
|
35
35
|
},
|
|
36
36
|
"exports": {
|
|
37
|
-
".": "./
|
|
37
|
+
".": "./dist/index.js",
|
|
38
38
|
"./*": "./*"
|
|
39
39
|
},
|
|
40
40
|
"publishConfig": {
|