@contractspec/module.workspace 1.57.0 → 1.59.0
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 +25 -0
- package/dist/ai/code-generation.d.ts.map +1 -0
- package/dist/ai/index.d.ts +5 -0
- package/dist/ai/index.d.ts.map +1 -0
- package/dist/ai/prompts/code-generation.d.ts +5 -8
- package/dist/ai/prompts/code-generation.d.ts.map +1 -1
- package/dist/ai/prompts/index.d.ts +3 -0
- package/dist/ai/prompts/index.d.ts.map +1 -0
- package/dist/ai/prompts/spec-creation.d.ts +7 -11
- package/dist/ai/prompts/spec-creation.d.ts.map +1 -1
- package/dist/ai/spec-creation.d.ts +27 -0
- package/dist/ai/spec-creation.d.ts.map +1 -0
- package/dist/analysis/deps/graph.d.ts +14 -13
- package/dist/analysis/deps/graph.d.ts.map +1 -1
- package/dist/analysis/deps/index.d.ts +6 -0
- package/dist/analysis/deps/index.d.ts.map +1 -0
- package/dist/analysis/deps/parse-imports.d.ts +1 -4
- package/dist/analysis/deps/parse-imports.d.ts.map +1 -1
- package/dist/analysis/diff/deep-diff.d.ts +17 -15
- package/dist/analysis/diff/deep-diff.d.ts.map +1 -1
- package/dist/analysis/diff/deep-diff.test.d.ts +5 -0
- package/dist/analysis/diff/deep-diff.test.d.ts.map +1 -0
- package/dist/analysis/diff/index.d.ts +6 -0
- package/dist/analysis/diff/index.d.ts.map +1 -0
- package/dist/analysis/diff/semantic.d.ts +6 -6
- package/dist/analysis/diff/semantic.d.ts.map +1 -1
- package/dist/analysis/example-scan.d.ts +3 -7
- package/dist/analysis/example-scan.d.ts.map +1 -1
- package/dist/analysis/example-scan.test.d.ts +7 -0
- package/dist/analysis/example-scan.test.d.ts.map +1 -0
- package/dist/analysis/feature-extractor.d.ts +25 -0
- package/dist/analysis/feature-extractor.d.ts.map +1 -0
- package/dist/analysis/feature-scan.d.ts +3 -7
- package/dist/analysis/feature-scan.d.ts.map +1 -1
- package/dist/analysis/feature-scan.test.d.ts +2 -0
- package/dist/analysis/feature-scan.test.d.ts.map +1 -0
- package/dist/analysis/grouping.d.ts +41 -35
- package/dist/analysis/grouping.d.ts.map +1 -1
- package/dist/analysis/impact/classifier.d.ts +9 -8
- package/dist/analysis/impact/classifier.d.ts.map +1 -1
- package/dist/analysis/impact/classifier.test.d.ts +5 -0
- package/dist/analysis/impact/classifier.test.d.ts.map +1 -0
- package/dist/analysis/impact/index.d.ts +9 -0
- package/dist/analysis/impact/index.d.ts.map +1 -0
- package/dist/analysis/impact/rules.d.ts +15 -14
- package/dist/analysis/impact/rules.d.ts.map +1 -1
- package/dist/analysis/impact/types.d.ts +73 -76
- package/dist/analysis/impact/types.d.ts.map +1 -1
- package/dist/analysis/index.d.ts +14 -0
- package/dist/analysis/index.d.ts.map +1 -0
- package/dist/analysis/snapshot/index.d.ts +9 -0
- package/dist/analysis/snapshot/index.d.ts.map +1 -0
- package/dist/analysis/snapshot/normalizer.d.ts +7 -10
- package/dist/analysis/snapshot/normalizer.d.ts.map +1 -1
- package/dist/analysis/snapshot/snapshot.d.ts +10 -8
- package/dist/analysis/snapshot/snapshot.d.ts.map +1 -1
- package/dist/analysis/snapshot/snapshot.test.d.ts +5 -0
- package/dist/analysis/snapshot/snapshot.test.d.ts.map +1 -0
- package/dist/analysis/snapshot/types.d.ts +58 -56
- package/dist/analysis/snapshot/types.d.ts.map +1 -1
- package/dist/analysis/spec-parser.d.ts +8 -6
- package/dist/analysis/spec-parser.d.ts.map +1 -1
- package/dist/analysis/spec-parsing-utils.d.ts +20 -10
- package/dist/analysis/spec-parsing-utils.d.ts.map +1 -1
- package/dist/analysis/spec-scan.d.ts +13 -12
- package/dist/analysis/spec-scan.d.ts.map +1 -1
- package/dist/analysis/spec-scan.test.d.ts +2 -0
- package/dist/analysis/spec-scan.test.d.ts.map +1 -0
- package/dist/analysis/utils/matchers.d.ts +39 -0
- package/dist/analysis/utils/matchers.d.ts.map +1 -0
- package/dist/analysis/utils/variables.d.ts +15 -0
- package/dist/analysis/utils/variables.d.ts.map +1 -0
- package/dist/analysis/validate/index.d.ts +5 -0
- package/dist/analysis/validate/index.d.ts.map +1 -0
- package/dist/analysis/validate/spec-structure.d.ts +15 -14
- package/dist/analysis/validate/spec-structure.d.ts.map +1 -1
- package/dist/analysis/validate/spec-structure.test.d.ts +2 -0
- package/dist/analysis/validate/spec-structure.test.d.ts.map +1 -0
- package/dist/formatter.d.ts +28 -27
- package/dist/formatter.d.ts.map +1 -1
- package/dist/formatters/index.d.ts +8 -0
- package/dist/formatters/index.d.ts.map +1 -0
- package/dist/formatters/spec-markdown.d.ts +13 -11
- package/dist/formatters/spec-markdown.d.ts.map +1 -1
- package/dist/formatters/spec-markdown.test.d.ts +5 -0
- package/dist/formatters/spec-markdown.test.d.ts.map +1 -0
- package/dist/formatters/spec-to-docblock.d.ts +4 -8
- package/dist/formatters/spec-to-docblock.d.ts.map +1 -1
- package/dist/index.d.ts +13 -42
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4302 -38
- package/dist/node/index.js +4301 -0
- package/dist/templates/app-config.d.ts +2 -6
- package/dist/templates/app-config.d.ts.map +1 -1
- package/dist/templates/app-config.test.d.ts +2 -0
- package/dist/templates/app-config.test.d.ts.map +1 -0
- package/dist/templates/data-view.d.ts +2 -6
- package/dist/templates/data-view.d.ts.map +1 -1
- package/dist/templates/data-view.test.d.ts +2 -0
- package/dist/templates/data-view.test.d.ts.map +1 -0
- package/dist/templates/event.d.ts +6 -6
- package/dist/templates/event.d.ts.map +1 -1
- package/dist/templates/event.test.d.ts +2 -0
- package/dist/templates/event.test.d.ts.map +1 -0
- package/dist/templates/experiment.d.ts +2 -6
- package/dist/templates/experiment.d.ts.map +1 -1
- package/dist/templates/experiment.test.d.ts +2 -0
- package/dist/templates/experiment.test.d.ts.map +1 -0
- package/dist/templates/handler.d.ts +3 -6
- package/dist/templates/handler.d.ts.map +1 -1
- package/dist/templates/handler.test.d.ts +2 -0
- package/dist/templates/handler.test.d.ts.map +1 -0
- package/dist/templates/index.d.ts +18 -0
- package/dist/templates/index.d.ts.map +1 -0
- package/dist/templates/integration-utils.d.ts +13 -0
- package/dist/templates/integration-utils.d.ts.map +1 -0
- package/dist/templates/integration-utils.test.d.ts +2 -0
- package/dist/templates/integration-utils.test.d.ts.map +1 -0
- package/dist/templates/integration.d.ts +2 -6
- package/dist/templates/integration.d.ts.map +1 -1
- package/dist/templates/integration.test.d.ts +2 -0
- package/dist/templates/integration.test.d.ts.map +1 -0
- package/dist/templates/knowledge.d.ts +2 -6
- package/dist/templates/knowledge.d.ts.map +1 -1
- package/dist/templates/knowledge.test.d.ts +2 -0
- package/dist/templates/knowledge.test.d.ts.map +1 -0
- package/dist/templates/migration.d.ts +2 -6
- package/dist/templates/migration.d.ts.map +1 -1
- package/dist/templates/migration.test.d.ts +2 -0
- package/dist/templates/migration.test.d.ts.map +1 -0
- package/dist/templates/operation.d.ts +6 -6
- package/dist/templates/operation.d.ts.map +1 -1
- package/dist/templates/operation.test.d.ts +2 -0
- package/dist/templates/operation.test.d.ts.map +1 -0
- package/dist/templates/presentation.d.ts +6 -6
- package/dist/templates/presentation.d.ts.map +1 -1
- package/dist/templates/presentation.test.d.ts +2 -0
- package/dist/templates/presentation.test.d.ts.map +1 -0
- package/dist/templates/telemetry.d.ts +2 -6
- package/dist/templates/telemetry.d.ts.map +1 -1
- package/dist/templates/telemetry.test.d.ts +2 -0
- package/dist/templates/telemetry.test.d.ts.map +1 -0
- package/dist/templates/utils.d.ts +5 -8
- package/dist/templates/utils.d.ts.map +1 -1
- package/dist/templates/utils.test.d.ts +2 -0
- package/dist/templates/utils.test.d.ts.map +1 -0
- package/dist/templates/workflow-runner.d.ts +6 -13
- package/dist/templates/workflow-runner.d.ts.map +1 -1
- package/dist/templates/workflow-runner.test.d.ts +2 -0
- package/dist/templates/workflow-runner.test.d.ts.map +1 -0
- package/dist/templates/workflow.d.ts +6 -6
- package/dist/templates/workflow.d.ts.map +1 -1
- package/dist/templates/workflow.test.d.ts +2 -0
- package/dist/templates/workflow.test.d.ts.map +1 -0
- package/dist/types/analysis-types.d.ts +135 -136
- package/dist/types/analysis-types.d.ts.map +1 -1
- package/dist/types/generation-types.d.ts +36 -37
- package/dist/types/generation-types.d.ts.map +1 -1
- package/dist/types/index.d.ts +9 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/llm-types.d.ts +97 -96
- package/dist/types/llm-types.d.ts.map +1 -1
- package/dist/types/rulesync-types.d.ts +17 -18
- package/dist/types/rulesync-types.d.ts.map +1 -1
- package/dist/types/spec-types.d.ts +329 -329
- package/dist/types/spec-types.d.ts.map +1 -1
- package/package.json +20 -16
- package/dist/ai/prompts/code-generation.js +0 -134
- package/dist/ai/prompts/code-generation.js.map +0 -1
- package/dist/ai/prompts/spec-creation.js +0 -102
- package/dist/ai/prompts/spec-creation.js.map +0 -1
- package/dist/analysis/deps/graph.js +0 -85
- package/dist/analysis/deps/graph.js.map +0 -1
- package/dist/analysis/deps/parse-imports.js +0 -31
- package/dist/analysis/deps/parse-imports.js.map +0 -1
- package/dist/analysis/diff/deep-diff.js +0 -114
- package/dist/analysis/diff/deep-diff.js.map +0 -1
- package/dist/analysis/diff/semantic.js +0 -97
- package/dist/analysis/diff/semantic.js.map +0 -1
- package/dist/analysis/example-scan.js +0 -116
- package/dist/analysis/example-scan.js.map +0 -1
- package/dist/analysis/feature-extractor.js +0 -203
- package/dist/analysis/feature-extractor.js.map +0 -1
- package/dist/analysis/feature-scan.js +0 -56
- package/dist/analysis/feature-scan.js.map +0 -1
- package/dist/analysis/grouping.js +0 -115
- package/dist/analysis/grouping.js.map +0 -1
- package/dist/analysis/impact/classifier.js +0 -135
- package/dist/analysis/impact/classifier.js.map +0 -1
- package/dist/analysis/impact/index.js +0 -2
- package/dist/analysis/impact/rules.js +0 -154
- package/dist/analysis/impact/rules.js.map +0 -1
- package/dist/analysis/index.js +0 -18
- package/dist/analysis/snapshot/index.js +0 -2
- package/dist/analysis/snapshot/normalizer.js +0 -67
- package/dist/analysis/snapshot/normalizer.js.map +0 -1
- package/dist/analysis/snapshot/snapshot.js +0 -163
- package/dist/analysis/snapshot/snapshot.js.map +0 -1
- package/dist/analysis/spec-parser.js +0 -89
- package/dist/analysis/spec-parser.js.map +0 -1
- package/dist/analysis/spec-parsing-utils.js +0 -98
- package/dist/analysis/spec-parsing-utils.js.map +0 -1
- package/dist/analysis/spec-scan.js +0 -157
- package/dist/analysis/spec-scan.js.map +0 -1
- package/dist/analysis/utils/matchers.js +0 -77
- package/dist/analysis/utils/matchers.js.map +0 -1
- package/dist/analysis/utils/variables.js +0 -45
- package/dist/analysis/utils/variables.js.map +0 -1
- package/dist/analysis/validate/index.js +0 -1
- package/dist/analysis/validate/spec-structure.js +0 -475
- package/dist/analysis/validate/spec-structure.js.map +0 -1
- package/dist/formatter.js +0 -163
- package/dist/formatter.js.map +0 -1
- package/dist/formatters/index.js +0 -2
- package/dist/formatters/spec-markdown.js +0 -263
- package/dist/formatters/spec-markdown.js.map +0 -1
- package/dist/formatters/spec-to-docblock.js +0 -48
- package/dist/formatters/spec-to-docblock.js.map +0 -1
- package/dist/templates/app-config.js +0 -107
- package/dist/templates/app-config.js.map +0 -1
- package/dist/templates/data-view.js +0 -69
- package/dist/templates/data-view.js.map +0 -1
- package/dist/templates/event.js +0 -41
- package/dist/templates/event.js.map +0 -1
- package/dist/templates/experiment.js +0 -88
- package/dist/templates/experiment.js.map +0 -1
- package/dist/templates/handler.js +0 -96
- package/dist/templates/handler.js.map +0 -1
- package/dist/templates/integration-utils.js +0 -102
- package/dist/templates/integration-utils.js.map +0 -1
- package/dist/templates/integration.js +0 -62
- package/dist/templates/integration.js.map +0 -1
- package/dist/templates/knowledge.js +0 -68
- package/dist/templates/knowledge.js.map +0 -1
- package/dist/templates/migration.js +0 -60
- package/dist/templates/migration.js.map +0 -1
- package/dist/templates/operation.js +0 -101
- package/dist/templates/operation.js.map +0 -1
- package/dist/templates/presentation.js +0 -79
- package/dist/templates/presentation.js.map +0 -1
- package/dist/templates/telemetry.js +0 -90
- package/dist/templates/telemetry.js.map +0 -1
- package/dist/templates/utils.js +0 -39
- package/dist/templates/utils.js.map +0 -1
- package/dist/templates/workflow-runner.js +0 -49
- package/dist/templates/workflow-runner.js.map +0 -1
- package/dist/templates/workflow.js +0 -68
- package/dist/templates/workflow.js.map +0 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI prompts for code generation.
|
|
3
|
+
* Extracted from cli-contractspec/src/ai/prompts/code-generation.ts
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Build prompt for generating handler implementation.
|
|
7
|
+
*/
|
|
8
|
+
export declare function buildHandlerPrompt(specCode: string): string;
|
|
9
|
+
/**
|
|
10
|
+
* Build prompt for generating React component from presentation spec.
|
|
11
|
+
*/
|
|
12
|
+
export declare function buildComponentPrompt(specCode: string): string;
|
|
13
|
+
/**
|
|
14
|
+
* Build prompt for generating form component.
|
|
15
|
+
*/
|
|
16
|
+
export declare function buildFormPrompt(specCode: string): string;
|
|
17
|
+
/**
|
|
18
|
+
* Build prompt for generating tests.
|
|
19
|
+
*/
|
|
20
|
+
export declare function buildTestPrompt(specCode: string, implementationCode: string, testType: 'handler' | 'component'): string;
|
|
21
|
+
/**
|
|
22
|
+
* System prompt for code generation.
|
|
23
|
+
*/
|
|
24
|
+
export declare function getCodeGenSystemPrompt(): string;
|
|
25
|
+
//# sourceMappingURL=code-generation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-generation.d.ts","sourceRoot":"","sources":["../../src/ai/code-generation.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAqB3D;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAqB7D;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAsBxD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,EAChB,kBAAkB,EAAE,MAAM,EAC1B,QAAQ,EAAE,SAAS,GAAG,WAAW,GAChC,MAAM,CAkCR;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CAgB/C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ai/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,WAAW,CAAC"}
|
|
@@ -1,24 +1,21 @@
|
|
|
1
|
-
//#region src/ai/prompts/code-generation.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* Build prompt for generating handler implementation
|
|
4
3
|
*/
|
|
5
|
-
declare function buildHandlerPrompt(specCode: string): string;
|
|
4
|
+
export declare function buildHandlerPrompt(specCode: string): string;
|
|
6
5
|
/**
|
|
7
6
|
* Build prompt for generating React component from presentation spec
|
|
8
7
|
*/
|
|
9
|
-
declare function buildComponentPrompt(specCode: string): string;
|
|
8
|
+
export declare function buildComponentPrompt(specCode: string): string;
|
|
10
9
|
/**
|
|
11
10
|
* Build prompt for generating form component
|
|
12
11
|
*/
|
|
13
|
-
declare function buildFormPrompt(specCode: string): string;
|
|
12
|
+
export declare function buildFormPrompt(specCode: string): string;
|
|
14
13
|
/**
|
|
15
14
|
* Build prompt for generating tests
|
|
16
15
|
*/
|
|
17
|
-
declare function buildTestPrompt(specCode: string, implementationCode: string, testType: 'handler' | 'component'): string;
|
|
16
|
+
export declare function buildTestPrompt(specCode: string, implementationCode: string, testType: 'handler' | 'component'): string;
|
|
18
17
|
/**
|
|
19
18
|
* System prompt for code generation
|
|
20
19
|
*/
|
|
21
|
-
declare function getCodeGenSystemPrompt(): string;
|
|
22
|
-
//#endregion
|
|
23
|
-
export { buildComponentPrompt, buildFormPrompt, buildHandlerPrompt, buildTestPrompt, getCodeGenSystemPrompt };
|
|
20
|
+
export declare function getCodeGenSystemPrompt(): string;
|
|
24
21
|
//# sourceMappingURL=code-generation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-generation.d.ts","
|
|
1
|
+
{"version":3,"file":"code-generation.d.ts","sourceRoot":"","sources":["../../../src/ai/prompts/code-generation.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAqB3D;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAqB7D;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAsBxD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,EAChB,kBAAkB,EAAE,MAAM,EAC1B,QAAQ,EAAE,SAAS,GAAG,WAAW,GAChC,MAAM,CAkCR;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CAgB/C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ai/prompts/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC"}
|
|
@@ -1,27 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
//#region src/ai/prompts/spec-creation.d.ts
|
|
1
|
+
import type { OpKind } from '@contractspec/lib.contracts';
|
|
2
|
+
import type { PresentationKind } from '../../types/spec-types';
|
|
5
3
|
/**
|
|
6
4
|
* Build prompt for creating operation spec from description
|
|
7
5
|
*/
|
|
8
|
-
declare function buildOperationSpecPrompt(description: string, kind: OpKind): string;
|
|
6
|
+
export declare function buildOperationSpecPrompt(description: string, kind: OpKind): string;
|
|
9
7
|
/**
|
|
10
8
|
* Build prompt for creating event spec from description
|
|
11
9
|
*/
|
|
12
|
-
declare function buildEventSpecPrompt(description: string): string;
|
|
10
|
+
export declare function buildEventSpecPrompt(description: string): string;
|
|
13
11
|
/**
|
|
14
12
|
* Build prompt for creating presentation spec from description
|
|
15
13
|
*/
|
|
16
|
-
declare function buildPresentationSpecPrompt(description: string, kind: PresentationKind): string;
|
|
14
|
+
export declare function buildPresentationSpecPrompt(description: string, kind: PresentationKind): string;
|
|
17
15
|
/**
|
|
18
16
|
* Build system prompt for all spec generation
|
|
19
17
|
*/
|
|
20
|
-
declare function getSystemPrompt(): string;
|
|
18
|
+
export declare function getSystemPrompt(): string;
|
|
21
19
|
/**
|
|
22
20
|
* Create example-based prompt for better results
|
|
23
21
|
*/
|
|
24
|
-
declare function addExampleContext(basePrompt: string, examples: string[]): string;
|
|
25
|
-
//#endregion
|
|
26
|
-
export { addExampleContext, buildEventSpecPrompt, buildOperationSpecPrompt, buildPresentationSpecPrompt, getSystemPrompt };
|
|
22
|
+
export declare function addExampleContext(basePrompt: string, examples: string[]): string;
|
|
27
23
|
//# sourceMappingURL=spec-creation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spec-creation.d.ts","
|
|
1
|
+
{"version":3,"file":"spec-creation.d.ts","sourceRoot":"","sources":["../../../src/ai/prompts/spec-creation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D;;GAEG;AACH,wBAAgB,wBAAwB,CACtC,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,MAAM,GACX,MAAM,CAoBR;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAgBhE;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CACzC,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,gBAAgB,GACrB,MAAM,CA4BR;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,MAAM,CAYxC;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAAE,GACjB,MAAM,CAUR"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI prompts for spec creation.
|
|
3
|
+
* Extracted from cli-contractspec/src/ai/prompts/spec-creation.ts
|
|
4
|
+
*/
|
|
5
|
+
import type { OpKind } from '@contractspec/lib.contracts';
|
|
6
|
+
import type { PresentationKind } from '../types/spec-types';
|
|
7
|
+
/**
|
|
8
|
+
* Build prompt for creating operation spec from description.
|
|
9
|
+
*/
|
|
10
|
+
export declare function buildOperationSpecPrompt(description: string, kind: OpKind): string;
|
|
11
|
+
/**
|
|
12
|
+
* Build prompt for creating event spec from description.
|
|
13
|
+
*/
|
|
14
|
+
export declare function buildEventSpecPrompt(description: string): string;
|
|
15
|
+
/**
|
|
16
|
+
* Build prompt for creating presentation spec from description.
|
|
17
|
+
*/
|
|
18
|
+
export declare function buildPresentationSpecPrompt(description: string, kind: PresentationKind): string;
|
|
19
|
+
/**
|
|
20
|
+
* Build system prompt for all spec generation.
|
|
21
|
+
*/
|
|
22
|
+
export declare function getSystemPrompt(): string;
|
|
23
|
+
/**
|
|
24
|
+
* Create example-based prompt for better results.
|
|
25
|
+
*/
|
|
26
|
+
export declare function addExampleContext(basePrompt: string, examples: string[]): string;
|
|
27
|
+
//# sourceMappingURL=spec-creation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spec-creation.d.ts","sourceRoot":"","sources":["../../src/ai/spec-creation.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D;;GAEG;AACH,wBAAgB,wBAAwB,CACtC,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,MAAM,GACX,MAAM,CAoBR;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAgBhE;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CACzC,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,gBAAgB,GACrB,MAAM,CA4BR;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,MAAM,CAYxC;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAAE,GACjB,MAAM,CAUR"}
|
|
@@ -1,33 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Contract dependency graph utilities.
|
|
3
|
+
* Extracted from cli-contractspec/src/commands/deps/graph.ts
|
|
4
|
+
*/
|
|
5
|
+
import type { ContractNode, ContractGraph } from '../../types/analysis-types';
|
|
6
|
+
export type { ContractNode, ContractGraph };
|
|
4
7
|
/**
|
|
5
8
|
* Build reverse edges (dependents) for all nodes in the graph.
|
|
6
9
|
*/
|
|
7
|
-
declare function buildReverseEdges(graph: ContractGraph): void;
|
|
10
|
+
export declare function buildReverseEdges(graph: ContractGraph): void;
|
|
8
11
|
/**
|
|
9
12
|
* Detect circular dependencies in the graph.
|
|
10
13
|
*/
|
|
11
|
-
declare function detectCycles(graph: ContractGraph): string[][];
|
|
14
|
+
export declare function detectCycles(graph: ContractGraph): string[][];
|
|
12
15
|
/**
|
|
13
16
|
* Find missing dependencies (referenced but not defined).
|
|
14
17
|
*/
|
|
15
|
-
declare function findMissingDependencies(graph: ContractGraph): {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
export declare function findMissingDependencies(graph: ContractGraph): {
|
|
19
|
+
contract: string;
|
|
20
|
+
missing: string[];
|
|
18
21
|
}[];
|
|
19
22
|
/**
|
|
20
23
|
* Generate DOT format output for visualization.
|
|
21
24
|
*/
|
|
22
|
-
declare function toDot(graph: ContractGraph): string;
|
|
25
|
+
export declare function toDot(graph: ContractGraph): string;
|
|
23
26
|
/**
|
|
24
27
|
* Create an empty contract graph.
|
|
25
28
|
*/
|
|
26
|
-
declare function createContractGraph(): ContractGraph;
|
|
29
|
+
export declare function createContractGraph(): ContractGraph;
|
|
27
30
|
/**
|
|
28
31
|
* Add a node to the contract graph.
|
|
29
32
|
*/
|
|
30
|
-
declare function addContractNode(graph: ContractGraph, key: string, file: string, dependencies: string[]): void;
|
|
31
|
-
//#endregion
|
|
32
|
-
export { addContractNode, buildReverseEdges, createContractGraph, detectCycles, findMissingDependencies, toDot };
|
|
33
|
+
export declare function addContractNode(graph: ContractGraph, key: string, file: string, dependencies: string[]): void;
|
|
33
34
|
//# sourceMappingURL=graph.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph.d.ts","
|
|
1
|
+
{"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../../src/analysis/deps/graph.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE9E,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,CAAC;AAE5C;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI,CAiB5D;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,EAAE,EAAE,CA+B7D;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,aAAa,GACnB;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,EAAE,CAW3C;AAED;;GAEG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,CAiBlD;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,aAAa,CAEnD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,aAAa,EACpB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,MAAM,EAAE,GACrB,IAAI,CAON"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/analysis/deps/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/analysis/deps/parse-imports.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* Import parsing utilities for dependency analysis.
|
|
4
3
|
* Extracted from cli-contractspec/src/commands/deps/parse-imports.ts
|
|
@@ -11,7 +10,5 @@
|
|
|
11
10
|
* @param fromFilePath - The path of the file being parsed (for relative resolution)
|
|
12
11
|
* @returns Array of imported spec names
|
|
13
12
|
*/
|
|
14
|
-
declare function parseImportedSpecNames(sourceCode: string, _fromFilePath: string): string[];
|
|
15
|
-
//#endregion
|
|
16
|
-
export { parseImportedSpecNames };
|
|
13
|
+
export declare function parseImportedSpecNames(sourceCode: string, _fromFilePath: string): string[];
|
|
17
14
|
//# sourceMappingURL=parse-imports.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-imports.d.ts","
|
|
1
|
+
{"version":3,"file":"parse-imports.d.ts","sourceRoot":"","sources":["../../../src/analysis/deps/parse-imports.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,GACpB,MAAM,EAAE,CAiCV"}
|
|
@@ -1,32 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Deep diff engine for IO schema comparison.
|
|
3
|
+
*
|
|
4
|
+
* Compares input/output schemas field-by-field to detect
|
|
5
|
+
* breaking and non-breaking changes.
|
|
6
|
+
*/
|
|
7
|
+
import type { FieldSnapshot, IoSnapshot } from '../snapshot/types';
|
|
8
|
+
import type { SemanticDiffItem } from '../../types/analysis-types';
|
|
5
9
|
/**
|
|
6
10
|
* Deep diff options.
|
|
7
11
|
*/
|
|
8
|
-
interface DeepDiffOptions {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
export interface DeepDiffOptions {
|
|
13
|
+
/** Only report breaking changes */
|
|
14
|
+
breakingOnly?: boolean;
|
|
15
|
+
/** Path prefix for nested diffs */
|
|
16
|
+
pathPrefix?: string;
|
|
13
17
|
}
|
|
14
18
|
/**
|
|
15
19
|
* Compute deep differences between two IO schemas.
|
|
16
20
|
*/
|
|
17
|
-
declare function computeIoDiff(base: IoSnapshot, head: IoSnapshot, options?: DeepDiffOptions): SemanticDiffItem[];
|
|
21
|
+
export declare function computeIoDiff(base: IoSnapshot, head: IoSnapshot, options?: DeepDiffOptions): SemanticDiffItem[];
|
|
18
22
|
/**
|
|
19
23
|
* Compute differences between two field maps.
|
|
20
24
|
*/
|
|
21
|
-
declare function computeFieldsDiff(baseFields: Record<string, FieldSnapshot>, headFields: Record<string, FieldSnapshot>, pathPrefix: string, options?: DeepDiffOptions): SemanticDiffItem[];
|
|
25
|
+
export declare function computeFieldsDiff(baseFields: Record<string, FieldSnapshot>, headFields: Record<string, FieldSnapshot>, pathPrefix: string, options?: DeepDiffOptions): SemanticDiffItem[];
|
|
22
26
|
/**
|
|
23
27
|
* Compute differences between two field definitions.
|
|
24
28
|
*/
|
|
25
|
-
declare function computeFieldDiff(base: FieldSnapshot, head: FieldSnapshot, path: string, _options?: DeepDiffOptions): SemanticDiffItem[];
|
|
29
|
+
export declare function computeFieldDiff(base: FieldSnapshot, head: FieldSnapshot, path: string, _options?: DeepDiffOptions): SemanticDiffItem[];
|
|
26
30
|
/**
|
|
27
31
|
* Classify a diff as breaking based on context.
|
|
28
32
|
*/
|
|
29
|
-
declare function isBreakingChange(diff: SemanticDiffItem, context: 'input' | 'output'): boolean;
|
|
30
|
-
//#endregion
|
|
31
|
-
export { DeepDiffOptions, computeFieldDiff, computeFieldsDiff, computeIoDiff, isBreakingChange };
|
|
33
|
+
export declare function isBreakingChange(diff: SemanticDiffItem, context: 'input' | 'output'): boolean;
|
|
32
34
|
//# sourceMappingURL=deep-diff.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deep-diff.d.ts","
|
|
1
|
+
{"version":3,"file":"deep-diff.d.ts","sourceRoot":"","sources":["../../../src/analysis/diff/deep-diff.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAEnE;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,mCAAmC;IACnC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,mCAAmC;IACnC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE,UAAU,EAChB,OAAO,GAAE,eAAoB,GAC5B,gBAAgB,EAAE,CAcpB;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,EACzC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,EACzC,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE,eAAoB,GAC5B,gBAAgB,EAAE,CAuDpB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,aAAa,EACnB,IAAI,EAAE,aAAa,EACnB,IAAI,EAAE,MAAM,EACZ,QAAQ,GAAE,eAAoB,GAC7B,gBAAgB,EAAE,CAmGpB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,gBAAgB,EACtB,OAAO,EAAE,OAAO,GAAG,QAAQ,GAC1B,OAAO,CAeT"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deep-diff.test.d.ts","sourceRoot":"","sources":["../../../src/analysis/diff/deep-diff.test.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/analysis/diff/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Semantic diff computation for contract specs.
|
|
3
|
+
* Extracted from cli-contractspec/src/commands/diff/semantic.ts
|
|
4
|
+
*/
|
|
5
|
+
import type { SemanticDiffItem, SemanticDiffOptions } from '../../types/analysis-types';
|
|
4
6
|
/**
|
|
5
7
|
* Compute semantic differences between two spec sources.
|
|
6
8
|
*/
|
|
7
|
-
declare function computeSemanticDiff(aCode: string, aPath: string, bCode: string, bPath: string, options?: SemanticDiffOptions): SemanticDiffItem[];
|
|
8
|
-
//#endregion
|
|
9
|
-
export { computeSemanticDiff };
|
|
9
|
+
export declare function computeSemanticDiff(aCode: string, aPath: string, bCode: string, bPath: string, options?: SemanticDiffOptions): SemanticDiffItem[];
|
|
10
10
|
//# sourceMappingURL=semantic.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"semantic.d.ts","
|
|
1
|
+
{"version":3,"file":"semantic.d.ts","sourceRoot":"","sources":["../../../src/analysis/diff/semantic.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACV,gBAAgB,EAChB,mBAAmB,EAEpB,MAAM,4BAA4B,CAAC;AAGpC;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,OAAO,GAAE,mBAAwB,GAChC,gBAAgB,EAAE,CAyCpB"}
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
import { ExampleScanResult } from
|
|
2
|
-
|
|
3
|
-
//#region src/analysis/example-scan.d.ts
|
|
1
|
+
import type { ExampleScanResult } from '../types/analysis-types';
|
|
4
2
|
/**
|
|
5
3
|
* Check if a file is an example file based on naming conventions.
|
|
6
4
|
*/
|
|
7
|
-
declare function isExampleFile(filePath: string): boolean;
|
|
5
|
+
export declare function isExampleFile(filePath: string): boolean;
|
|
8
6
|
/**
|
|
9
7
|
* Scan an example source file to extract metadata.
|
|
10
8
|
*/
|
|
11
|
-
declare function scanExampleSource(code: string, filePath: string): ExampleScanResult;
|
|
12
|
-
//#endregion
|
|
13
|
-
export { isExampleFile, scanExampleSource };
|
|
9
|
+
export declare function scanExampleSource(code: string, filePath: string): ExampleScanResult;
|
|
14
10
|
//# sourceMappingURL=example-scan.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"example-scan.d.ts","
|
|
1
|
+
{"version":3,"file":"example-scan.d.ts","sourceRoot":"","sources":["../../src/analysis/example-scan.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEjE;;GAEG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,GACf,iBAAiB,CAyCnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"example-scan.test.d.ts","sourceRoot":"","sources":["../../src/analysis/example-scan.test.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { RefInfo } from '../types/analysis-types';
|
|
2
|
+
/**
|
|
3
|
+
* Extract specs referenced in a feature.
|
|
4
|
+
* Uses ts-morph for robust parsing of object structures.
|
|
5
|
+
*/
|
|
6
|
+
export declare function extractFeatureRefs(code: string): {
|
|
7
|
+
operations: RefInfo[];
|
|
8
|
+
events: RefInfo[];
|
|
9
|
+
presentations: RefInfo[];
|
|
10
|
+
experiments: RefInfo[];
|
|
11
|
+
capabilities: {
|
|
12
|
+
provides: RefInfo[];
|
|
13
|
+
requires: RefInfo[];
|
|
14
|
+
};
|
|
15
|
+
opToPresentationLinks: {
|
|
16
|
+
op: RefInfo;
|
|
17
|
+
pres: RefInfo;
|
|
18
|
+
}[];
|
|
19
|
+
presentationsTargets: {
|
|
20
|
+
key: string;
|
|
21
|
+
version: string;
|
|
22
|
+
targets: Record<string, unknown>[];
|
|
23
|
+
}[];
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=feature-extractor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature-extractor.d.ts","sourceRoot":"","sources":["../../src/analysis/feature-extractor.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAEvD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG;IAChD,UAAU,EAAE,OAAO,EAAE,CAAC;IACtB,MAAM,EAAE,OAAO,EAAE,CAAC;IAClB,aAAa,EAAE,OAAO,EAAE,CAAC;IACzB,WAAW,EAAE,OAAO,EAAE,CAAC;IACvB,YAAY,EAAE;QAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;QAAC,QAAQ,EAAE,OAAO,EAAE,CAAA;KAAE,CAAC;IAC3D,qBAAqB,EAAE;QAAE,EAAE,EAAE,OAAO,CAAC;QAAC,IAAI,EAAE,OAAO,CAAA;KAAE,EAAE,CAAC;IACxD,oBAAoB,EAAE;QACpB,GAAG,EAAE,MAAM,CAAC;QACZ,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;KACpC,EAAE,CAAC;CACL,CAiKA"}
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
import { FeatureScanResult } from
|
|
2
|
-
|
|
3
|
-
//#region src/analysis/feature-scan.d.ts
|
|
1
|
+
import type { FeatureScanResult } from '../types/analysis-types';
|
|
4
2
|
/**
|
|
5
3
|
* Check if a file is a feature file based on naming conventions.
|
|
6
4
|
*/
|
|
7
|
-
declare function isFeatureFile(filePath: string): boolean;
|
|
5
|
+
export declare function isFeatureFile(filePath: string): boolean;
|
|
8
6
|
/**
|
|
9
7
|
* Scan a feature source file to extract metadata.
|
|
10
8
|
*/
|
|
11
|
-
declare function scanFeatureSource(code: string, filePath: string): FeatureScanResult;
|
|
12
|
-
//#endregion
|
|
13
|
-
export { isFeatureFile, scanFeatureSource };
|
|
9
|
+
export declare function scanFeatureSource(code: string, filePath: string): FeatureScanResult;
|
|
14
10
|
//# sourceMappingURL=feature-scan.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature-scan.d.ts","
|
|
1
|
+
{"version":3,"file":"feature-scan.d.ts","sourceRoot":"","sources":["../../src/analysis/feature-scan.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAGjE;;GAEG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,GACf,iBAAiB,CAoCnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature-scan.test.d.ts","sourceRoot":"","sources":["../../src/analysis/feature-scan.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,72 +1,78 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Grouping and filtering utilities for ContractSpec workspace analysis.
|
|
3
|
+
* Provides services to filter and group scan results.
|
|
4
|
+
*/
|
|
5
|
+
import type { FeatureScanResult, SpecScanResult } from '../types/analysis-types';
|
|
6
|
+
import type { Stability } from '../types/spec-types';
|
|
5
7
|
/**
|
|
6
8
|
* Filter criteria for spec scan results.
|
|
7
9
|
*/
|
|
8
|
-
interface SpecFilter {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
export interface SpecFilter {
|
|
11
|
+
/** Filter by tags (item must have at least one matching tag) */
|
|
12
|
+
tags?: string[];
|
|
13
|
+
/** Filter by owners (item must have at least one matching owner) */
|
|
14
|
+
owners?: string[];
|
|
15
|
+
/** Filter by stability levels */
|
|
16
|
+
stability?: Stability[];
|
|
17
|
+
/** Filter by spec type */
|
|
18
|
+
specType?: SpecScanResult['specType'][];
|
|
19
|
+
/** Filter by name pattern (glob) */
|
|
20
|
+
namePattern?: string;
|
|
19
21
|
}
|
|
20
22
|
/**
|
|
21
23
|
* Grouping key function type.
|
|
22
24
|
*/
|
|
23
|
-
type GroupKeyFn<T> = (item: T) => string;
|
|
25
|
+
export type GroupKeyFn<T> = (item: T) => string;
|
|
24
26
|
/**
|
|
25
27
|
* Grouped items result.
|
|
26
28
|
*/
|
|
27
|
-
interface GroupedItems<T> {
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
export interface GroupedItems<T> {
|
|
30
|
+
key: string;
|
|
31
|
+
items: T[];
|
|
30
32
|
}
|
|
31
33
|
/**
|
|
32
34
|
* Pre-built grouping strategies for spec scan results.
|
|
33
35
|
*/
|
|
34
|
-
declare const SpecGroupingStrategies: {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
export declare const SpecGroupingStrategies: {
|
|
37
|
+
/** Group by first tag. */
|
|
38
|
+
byTag: (item: SpecScanResult) => string;
|
|
39
|
+
/** Group by first owner. */
|
|
40
|
+
byOwner: (item: SpecScanResult) => string;
|
|
41
|
+
/** Group by domain (first segment of name). */
|
|
42
|
+
byDomain: (item: SpecScanResult) => string;
|
|
43
|
+
/** Group by stability. */
|
|
44
|
+
byStability: (item: SpecScanResult) => string;
|
|
45
|
+
/** Group by spec type. */
|
|
46
|
+
bySpecType: (item: SpecScanResult) => string;
|
|
47
|
+
/** Group by file directory. */
|
|
48
|
+
byDirectory: (item: SpecScanResult) => string;
|
|
41
49
|
};
|
|
42
50
|
/**
|
|
43
51
|
* Filter specs by criteria.
|
|
44
52
|
*/
|
|
45
|
-
declare function filterSpecs(specs: SpecScanResult[], filter: SpecFilter): SpecScanResult[];
|
|
53
|
+
export declare function filterSpecs(specs: SpecScanResult[], filter: SpecFilter): SpecScanResult[];
|
|
46
54
|
/**
|
|
47
55
|
* Group specs by key function.
|
|
48
56
|
*/
|
|
49
|
-
declare function groupSpecs<T>(items: T[], keyFn: GroupKeyFn<T>): Map<string, T[]>;
|
|
57
|
+
export declare function groupSpecs<T>(items: T[], keyFn: GroupKeyFn<T>): Map<string, T[]>;
|
|
50
58
|
/**
|
|
51
59
|
* Group specs and return as array.
|
|
52
60
|
*/
|
|
53
|
-
declare function groupSpecsToArray<T>(items: T[], keyFn: GroupKeyFn<T>): GroupedItems<T>[];
|
|
61
|
+
export declare function groupSpecsToArray<T>(items: T[], keyFn: GroupKeyFn<T>): GroupedItems<T>[];
|
|
54
62
|
/**
|
|
55
63
|
* Get unique tags from spec results.
|
|
56
64
|
*/
|
|
57
|
-
declare function getUniqueSpecTags(specs: SpecScanResult[]): string[];
|
|
65
|
+
export declare function getUniqueSpecTags(specs: SpecScanResult[]): string[];
|
|
58
66
|
/**
|
|
59
67
|
* Get unique owners from spec results.
|
|
60
68
|
*/
|
|
61
|
-
declare function getUniqueSpecOwners(specs: SpecScanResult[]): string[];
|
|
69
|
+
export declare function getUniqueSpecOwners(specs: SpecScanResult[]): string[];
|
|
62
70
|
/**
|
|
63
71
|
* Get unique domains from spec results.
|
|
64
72
|
*/
|
|
65
|
-
declare function getUniqueSpecDomains(specs: SpecScanResult[]): string[];
|
|
73
|
+
export declare function getUniqueSpecDomains(specs: SpecScanResult[]): string[];
|
|
66
74
|
/**
|
|
67
75
|
* Filter features by criteria.
|
|
68
76
|
*/
|
|
69
|
-
declare function filterFeatures(features: FeatureScanResult[], filter: SpecFilter): FeatureScanResult[];
|
|
70
|
-
//#endregion
|
|
71
|
-
export { GroupKeyFn, GroupedItems, SpecFilter, SpecGroupingStrategies, filterFeatures, filterSpecs, getUniqueSpecDomains, getUniqueSpecOwners, getUniqueSpecTags, groupSpecs, groupSpecsToArray };
|
|
77
|
+
export declare function filterFeatures(features: FeatureScanResult[], filter: SpecFilter): FeatureScanResult[];
|
|
72
78
|
//# sourceMappingURL=grouping.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grouping.d.ts","
|
|
1
|
+
{"version":3,"file":"grouping.d.ts","sourceRoot":"","sources":["../../src/analysis/grouping.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,EACf,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,gEAAgE;IAChE,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,oEAAoE;IACpE,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,iCAAiC;IACjC,SAAS,CAAC,EAAE,SAAS,EAAE,CAAC;IACxB,0BAA0B;IAC1B,QAAQ,CAAC,EAAE,cAAc,CAAC,UAAU,CAAC,EAAE,CAAC;IACxC,oCAAoC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,MAAM,UAAU,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,YAAY,CAAC,CAAC;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,CAAC,EAAE,CAAC;CACZ;AAED;;GAEG;AACH,eAAO,MAAM,sBAAsB;IACjC,0BAA0B;kBACZ,cAAc,KAAG,MAAM;IAErC,4BAA4B;oBACZ,cAAc,KAAG,MAAM;IAEvC,+CAA+C;qBAC9B,cAAc,KAAG,MAAM;IAQxC,0BAA0B;wBACN,cAAc,KAAG,MAAM;IAE3C,0BAA0B;uBACP,cAAc,KAAG,MAAM;IAE1C,+BAA+B;wBACX,cAAc,KAAG,MAAM;CAK5C,CAAC;AAEF;;GAEG;AACH,wBAAgB,WAAW,CACzB,KAAK,EAAE,cAAc,EAAE,EACvB,MAAM,EAAE,UAAU,GACjB,cAAc,EAAE,CA4ClB;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAC1B,KAAK,EAAE,CAAC,EAAE,EACV,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,GACnB,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,CAclB;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EACjC,KAAK,EAAE,CAAC,EAAE,EACV,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,GACnB,YAAY,CAAC,CAAC,CAAC,EAAE,CAKnB;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,cAAc,EAAE,GAAG,MAAM,EAAE,CAQnE;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,cAAc,EAAE,GAAG,MAAM,EAAE,CAQrE;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,cAAc,EAAE,GAAG,MAAM,EAAE,CAMtE;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,iBAAiB,EAAE,EAC7B,MAAM,EAAE,UAAU,GACjB,iBAAiB,EAAE,CAoCrB"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Impact classifier.
|
|
3
|
+
*
|
|
4
|
+
* Classifies contract changes as breaking, non-breaking, or info.
|
|
5
|
+
*/
|
|
6
|
+
import type { SemanticDiffItem } from '../../types/analysis-types';
|
|
7
|
+
import type { SpecSnapshot } from '../snapshot/types';
|
|
8
|
+
import type { ClassifyOptions, ImpactResult } from './types';
|
|
6
9
|
/**
|
|
7
10
|
* Classify the impact of changes between base and head snapshots.
|
|
8
11
|
*
|
|
@@ -12,7 +15,5 @@ import { ClassifyOptions, ImpactResult } from "./types.js";
|
|
|
12
15
|
* @param options - Classification options
|
|
13
16
|
* @returns Classified impact result
|
|
14
17
|
*/
|
|
15
|
-
declare function classifyImpact(baseSpecs: SpecSnapshot[], headSpecs: SpecSnapshot[], diffs: SemanticDiffItem[], options?: ClassifyOptions): ImpactResult;
|
|
16
|
-
//#endregion
|
|
17
|
-
export { classifyImpact };
|
|
18
|
+
export declare function classifyImpact(baseSpecs: SpecSnapshot[], headSpecs: SpecSnapshot[], diffs: SemanticDiffItem[], options?: ClassifyOptions): ImpactResult;
|
|
18
19
|
//# sourceMappingURL=classifier.d.ts.map
|