edsger 0.2.0 → 0.2.2
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/api/features/feature-utils.d.ts +13 -0
- package/dist/api/features/feature-utils.js +46 -0
- package/dist/api/features/get-feature.d.ts +5 -0
- package/dist/api/features/get-feature.js +19 -0
- package/dist/api/features/index.d.ts +7 -0
- package/dist/api/features/index.js +9 -0
- package/dist/api/features/status-updater.d.ts +27 -0
- package/dist/api/features/status-updater.js +64 -0
- package/dist/api/features/test-cases.d.ts +21 -0
- package/dist/api/features/test-cases.js +63 -0
- package/dist/api/features/update-feature.d.ts +13 -0
- package/dist/api/features/update-feature.js +31 -0
- package/dist/api/features/user-stories.d.ts +21 -0
- package/dist/api/features/user-stories.js +63 -0
- package/dist/api/features.d.ts +100 -0
- package/dist/api/features.js +219 -0
- package/dist/api/mcp-client.d.ts +18 -0
- package/dist/api/mcp-client.js +58 -0
- package/dist/api/products.d.ts +10 -0
- package/dist/api/products.js +22 -0
- package/dist/api/test-reports.d.ts +9 -0
- package/dist/api/test-reports.js +25 -0
- package/dist/cli/commands/code-implementation-command.d.ts +2 -0
- package/dist/cli/commands/code-implementation-command.js +36 -0
- package/dist/cli/commands/code-review-command.d.ts +2 -0
- package/dist/cli/commands/code-review-command.js +39 -0
- package/dist/cli/commands/feature-analysis-command.d.ts +2 -0
- package/dist/cli/commands/feature-analysis-command.js +36 -0
- package/dist/cli/commands/functional-testing-command.d.ts +2 -0
- package/dist/cli/commands/functional-testing-command.js +36 -0
- package/dist/cli/commands/technical-design-command.d.ts +2 -0
- package/dist/cli/commands/technical-design-command.js +36 -0
- package/dist/cli/commands/workflow-command.d.ts +2 -0
- package/dist/cli/commands/workflow-command.js +34 -0
- package/dist/cli/formatters/code-implementation-formatter.d.ts +9 -0
- package/dist/cli/formatters/code-implementation-formatter.js +27 -0
- package/dist/cli/formatters/feature-analysis-formatter.d.ts +2 -0
- package/dist/cli/formatters/feature-analysis-formatter.js +27 -0
- package/dist/cli/formatters/functional-testing-formatter.d.ts +15 -0
- package/dist/cli/formatters/functional-testing-formatter.js +37 -0
- package/dist/cli/formatters/technical-design-formatter.d.ts +7 -0
- package/dist/cli/formatters/technical-design-formatter.js +30 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.js +99 -0
- package/dist/cli/utils/validation.d.ts +25 -0
- package/dist/cli/utils/validation.js +58 -0
- package/dist/cli/utils/workflow-utils.d.ts +21 -0
- package/dist/cli/utils/workflow-utils.js +47 -0
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +11 -466
- package/dist/config.d.ts +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -2
- package/dist/{bug-fixing → phases/bug-fixing}/analyzer.d.ts +1 -1
- package/dist/{bug-fixing → phases/bug-fixing}/analyzer.js +1 -1
- package/dist/{bug-fixing → phases/bug-fixing}/context-fetcher.d.ts +4 -22
- package/dist/{bug-fixing → phases/bug-fixing}/context-fetcher.js +14 -58
- package/dist/{bug-fixing → phases/bug-fixing}/mcp-server.js +1 -30
- package/dist/phases/code-implementation/analyzer.d.ts +33 -0
- package/dist/{code-implementation → phases/code-implementation}/analyzer.js +174 -15
- package/dist/phases/code-implementation/context-fetcher.d.ts +17 -0
- package/dist/phases/code-implementation/context-fetcher.js +86 -0
- package/dist/{code-implementation → phases/code-implementation}/mcp-server.js +1 -30
- package/dist/{code-review → phases/code-review}/reviewer.d.ts +1 -1
- package/dist/{feature-analysis → phases/feature-analysis}/analyzer.d.ts +3 -2
- package/dist/{feature-analysis → phases/feature-analysis}/analyzer.js +29 -127
- package/dist/phases/feature-analysis/context-fetcher.d.ts +18 -0
- package/dist/phases/feature-analysis/context-fetcher.js +86 -0
- package/dist/{feature-analysis → phases/feature-analysis}/http-fallback.js +1 -1
- package/dist/{feature-analysis → phases/feature-analysis}/mcp-server.js +1 -24
- package/dist/{functional-testing → phases/functional-testing}/analyzer.d.ts +17 -2
- package/dist/{functional-testing → phases/functional-testing}/analyzer.js +225 -31
- package/dist/phases/functional-testing/context-fetcher.d.ts +16 -0
- package/dist/phases/functional-testing/context-fetcher.js +81 -0
- package/dist/{functional-testing → phases/functional-testing}/http-fallback.js +1 -1
- package/dist/{functional-testing → phases/functional-testing}/index.d.ts +1 -1
- package/dist/{functional-testing → phases/functional-testing}/index.js +1 -1
- package/dist/{functional-testing → phases/functional-testing}/mcp-server.js +1 -30
- package/dist/{functional-testing → phases/functional-testing}/test-report-creator.d.ts +26 -0
- package/dist/{functional-testing → phases/functional-testing}/test-report-creator.js +87 -5
- package/dist/phases/functional-testing/test-retry-handler.d.ts +16 -0
- package/dist/phases/functional-testing/test-retry-handler.js +75 -0
- package/dist/{pull-request → phases/pull-request}/creator.js +47 -6
- package/dist/phases/pull-request/handler.d.ts +16 -0
- package/dist/phases/pull-request/handler.js +60 -0
- package/dist/{technical-design → phases/technical-design}/analyzer.d.ts +7 -2
- package/dist/phases/technical-design/analyzer.js +418 -0
- package/dist/phases/technical-design/context-fetcher.d.ts +12 -0
- package/dist/phases/technical-design/context-fetcher.js +39 -0
- package/dist/{technical-design → phases/technical-design}/http-fallback.js +1 -1
- package/dist/{technical-design → phases/technical-design}/mcp-server.js +1 -30
- package/dist/prompts/bug-fixing.d.ts +2 -0
- package/dist/prompts/bug-fixing.js +63 -0
- package/dist/prompts/code-implementation.d.ts +3 -0
- package/dist/prompts/code-implementation.js +132 -0
- package/dist/prompts/feature-analysis.d.ts +3 -0
- package/dist/prompts/feature-analysis.js +149 -0
- package/dist/prompts/formatters.d.ts +29 -0
- package/dist/prompts/formatters.js +139 -0
- package/dist/prompts/functional-testing.d.ts +3 -0
- package/dist/prompts/functional-testing.js +126 -0
- package/dist/prompts/index.d.ts +6 -0
- package/dist/prompts/index.js +7 -0
- package/dist/prompts/technical-design.d.ts +3 -0
- package/dist/prompts/technical-design.js +130 -0
- package/dist/services/checklist.d.ts +99 -0
- package/dist/services/checklist.js +337 -0
- package/dist/types/features.d.ts +29 -0
- package/dist/types/features.js +1 -0
- package/dist/types/index.d.ts +112 -0
- package/dist/types/index.js +1 -0
- package/dist/types/pipeline.d.ts +25 -0
- package/dist/types/pipeline.js +4 -0
- package/dist/utils/logger.d.ts +19 -0
- package/dist/utils/logger.js +52 -0
- package/dist/utils/pipeline-logger.d.ts +8 -0
- package/dist/utils/pipeline-logger.js +35 -0
- package/dist/workflow-runner/config/phase-configs.d.ts +5 -0
- package/dist/workflow-runner/config/phase-configs.js +34 -0
- package/dist/workflow-runner/config/stage-configs.d.ts +5 -0
- package/dist/workflow-runner/config/stage-configs.js +34 -0
- package/dist/workflow-runner/core/feature-filter.d.ts +16 -0
- package/dist/workflow-runner/core/feature-filter.js +46 -0
- package/dist/workflow-runner/core/feature-filter.test.d.ts +4 -0
- package/dist/workflow-runner/core/feature-filter.test.js +127 -0
- package/dist/workflow-runner/core/index.d.ts +8 -0
- package/dist/workflow-runner/core/index.js +12 -0
- package/dist/workflow-runner/core/pipeline-evaluator.d.ts +24 -0
- package/dist/workflow-runner/core/pipeline-evaluator.js +32 -0
- package/dist/workflow-runner/core/state-manager.d.ts +24 -0
- package/dist/workflow-runner/core/state-manager.js +42 -0
- package/dist/workflow-runner/core/workflow-logger.d.ts +20 -0
- package/dist/workflow-runner/core/workflow-logger.js +65 -0
- package/dist/workflow-runner/executors/phase-executor.d.ts +8 -0
- package/dist/workflow-runner/executors/phase-executor.js +183 -0
- package/dist/workflow-runner/executors/stage-executor.d.ts +8 -0
- package/dist/workflow-runner/executors/stage-executor.js +49 -0
- package/dist/workflow-runner/feature-service.d.ts +17 -0
- package/dist/workflow-runner/feature-service.js +60 -0
- package/dist/workflow-runner/feature-workflow-runner.d.ts +26 -0
- package/dist/workflow-runner/feature-workflow-runner.js +113 -0
- package/dist/workflow-runner/index.d.ts +0 -1
- package/dist/workflow-runner/index.js +0 -1
- package/dist/workflow-runner/pipeline-runner.d.ts +9 -19
- package/dist/workflow-runner/pipeline-runner.js +247 -256
- package/dist/workflow-runner/pipeline.d.ts +18 -0
- package/dist/workflow-runner/pipeline.js +197 -0
- package/dist/workflow-runner/processor.d.ts +40 -0
- package/dist/workflow-runner/processor.js +191 -0
- package/dist/workflow-runner/types.d.ts +48 -0
- package/dist/workflow-runner/types.js +4 -0
- package/dist/workflow-runner/workflow-processor.d.ts +6 -23
- package/dist/workflow-runner/workflow-processor.js +38 -100
- package/package.json +2 -2
- package/dist/code-implementation/analyzer.d.ts +0 -19
- package/dist/code-implementation/context-fetcher.d.ts +0 -38
- package/dist/code-implementation/context-fetcher.js +0 -147
- package/dist/feature-analysis/context-fetcher.d.ts +0 -54
- package/dist/feature-analysis/context-fetcher.js +0 -193
- package/dist/functional-testing/context-fetcher.d.ts +0 -47
- package/dist/functional-testing/context-fetcher.js +0 -192
- package/dist/technical-design/analyzer.js +0 -338
- package/dist/technical-design/context-fetcher.d.ts +0 -42
- package/dist/technical-design/context-fetcher.js +0 -170
- /package/dist/{bug-fixing → phases/bug-fixing}/index.d.ts +0 -0
- /package/dist/{bug-fixing → phases/bug-fixing}/index.js +0 -0
- /package/dist/{bug-fixing → phases/bug-fixing}/mcp-server.d.ts +0 -0
- /package/dist/{code-implementation → phases/code-implementation}/mcp-server.d.ts +0 -0
- /package/dist/{code-review → phases/code-review}/reviewer.js +0 -0
- /package/dist/{feature-analysis → phases/feature-analysis}/http-fallback.d.ts +0 -0
- /package/dist/{feature-analysis → phases/feature-analysis}/index.d.ts +0 -0
- /package/dist/{feature-analysis → phases/feature-analysis}/index.js +0 -0
- /package/dist/{feature-analysis → phases/feature-analysis}/mcp-server.d.ts +0 -0
- /package/dist/{functional-testing → phases/functional-testing}/http-fallback.d.ts +0 -0
- /package/dist/{functional-testing → phases/functional-testing}/mcp-server.d.ts +0 -0
- /package/dist/{pull-request → phases/pull-request}/creator.d.ts +0 -0
- /package/dist/{technical-design → phases/technical-design}/http-fallback.d.ts +0 -0
- /package/dist/{technical-design → phases/technical-design}/mcp-server.d.ts +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FeatureInfo } from '../../types/features.js';
|
|
2
|
+
/**
|
|
3
|
+
* Filter features by status
|
|
4
|
+
*/
|
|
5
|
+
export declare function filterFeaturesByStatus(features: FeatureInfo[], status: string): FeatureInfo[];
|
|
6
|
+
/**
|
|
7
|
+
* Sort features by updated_at (most recent first)
|
|
8
|
+
*/
|
|
9
|
+
export declare function sortFeaturesByUpdatedAt(features: FeatureInfo[]): FeatureInfo[];
|
|
10
|
+
/**
|
|
11
|
+
* Get features with ready_for_dev status for a product
|
|
12
|
+
*/
|
|
13
|
+
export declare function getReadyForDevFeatures(mcpServerUrl: string, mcpToken: string, productId: string, verbose?: boolean): Promise<FeatureInfo[]>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { logInfo, logError } from '../../utils/logger.js';
|
|
2
|
+
import { callMcpEndpoint } from '../mcp-client.js';
|
|
3
|
+
/**
|
|
4
|
+
* Filter features by status
|
|
5
|
+
*/
|
|
6
|
+
export function filterFeaturesByStatus(features, status) {
|
|
7
|
+
return features.filter((feature) => feature.status === status);
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Sort features by updated_at (most recent first)
|
|
11
|
+
*/
|
|
12
|
+
export function sortFeaturesByUpdatedAt(features) {
|
|
13
|
+
return [...features].sort((a, b) => {
|
|
14
|
+
const dateA = new Date(a.updated_at || 0).getTime();
|
|
15
|
+
const dateB = new Date(b.updated_at || 0).getTime();
|
|
16
|
+
return dateB - dateA;
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Get features with ready_for_dev status for a product
|
|
21
|
+
*/
|
|
22
|
+
export async function getReadyForDevFeatures(mcpServerUrl, mcpToken, productId, verbose) {
|
|
23
|
+
if (verbose) {
|
|
24
|
+
logInfo(`Fetching ready_for_dev features for product: ${productId}`);
|
|
25
|
+
}
|
|
26
|
+
try {
|
|
27
|
+
const result = (await callMcpEndpoint(mcpServerUrl, mcpToken, 'features/list', {
|
|
28
|
+
product_id: productId,
|
|
29
|
+
status: 'ready_for_dev',
|
|
30
|
+
}));
|
|
31
|
+
const features = result.features || [];
|
|
32
|
+
const sortedFeatures = sortFeaturesByUpdatedAt(features);
|
|
33
|
+
if (verbose) {
|
|
34
|
+
logInfo(`✅ Found ${sortedFeatures.length} ready_for_dev features`);
|
|
35
|
+
sortedFeatures.forEach((feature, index) => {
|
|
36
|
+
logInfo(` ${index + 1}. ${feature.name} (updated: ${feature.updated_at})`);
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
return sortedFeatures;
|
|
40
|
+
}
|
|
41
|
+
catch (error) {
|
|
42
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
43
|
+
logError(`Failed to fetch ready_for_dev features: ${errorMessage}`);
|
|
44
|
+
throw error;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { logInfo } from '../../utils/logger.js';
|
|
2
|
+
import { callMcpEndpoint } from '../mcp-client.js';
|
|
3
|
+
/**
|
|
4
|
+
* Get feature details by ID
|
|
5
|
+
*/
|
|
6
|
+
export async function getFeature(mcpServerUrl, mcpToken, featureId, verbose) {
|
|
7
|
+
if (verbose) {
|
|
8
|
+
logInfo(`Fetching feature details for: ${featureId}`);
|
|
9
|
+
}
|
|
10
|
+
const result = (await callMcpEndpoint(mcpServerUrl, mcpToken, 'features/get', { feature_id: featureId }));
|
|
11
|
+
if (!result.features || result.features.length === 0) {
|
|
12
|
+
throw new Error(`Feature not found: ${featureId}`);
|
|
13
|
+
}
|
|
14
|
+
const feature = result.features[0];
|
|
15
|
+
if (!feature || typeof feature !== 'object') {
|
|
16
|
+
throw new Error(`Invalid feature data returned for: ${featureId}`);
|
|
17
|
+
}
|
|
18
|
+
return feature;
|
|
19
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Re-export all feature-related functions
|
|
2
|
+
export * from './get-feature.js';
|
|
3
|
+
export * from './update-feature.js';
|
|
4
|
+
export * from './user-stories.js';
|
|
5
|
+
export * from './test-cases.js';
|
|
6
|
+
export * from './feature-utils.js';
|
|
7
|
+
export * from './status-updater.js';
|
|
8
|
+
// Re-export types
|
|
9
|
+
export * from '../../types/features.js';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Feature status updater for workflow pipeline
|
|
3
|
+
* Updates feature status at each phase of the development workflow
|
|
4
|
+
*/
|
|
5
|
+
import type { FeatureStatus } from '../../types/index.js';
|
|
6
|
+
interface McpClientConfig {
|
|
7
|
+
readonly mcpServerUrl: string;
|
|
8
|
+
readonly mcpToken: string;
|
|
9
|
+
}
|
|
10
|
+
interface StatusUpdateOptions extends McpClientConfig {
|
|
11
|
+
readonly featureId: string;
|
|
12
|
+
readonly status: FeatureStatus;
|
|
13
|
+
readonly verbose?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Update feature status via MCP endpoint
|
|
17
|
+
*/
|
|
18
|
+
export declare function updateFeatureStatus({ mcpServerUrl, mcpToken, featureId, status, verbose, }: StatusUpdateOptions): Promise<boolean>;
|
|
19
|
+
/**
|
|
20
|
+
* Map pipeline phase to feature status
|
|
21
|
+
*/
|
|
22
|
+
export declare const getStatusForPhase: (phase: string) => FeatureStatus;
|
|
23
|
+
/**
|
|
24
|
+
* Update feature status based on pipeline phase
|
|
25
|
+
*/
|
|
26
|
+
export declare const updateFeatureStatusForPhase: (mcpConfig: McpClientConfig, featureId: string, phase: string, verbose?: boolean) => Promise<boolean>;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Feature status updater for workflow pipeline
|
|
3
|
+
* Updates feature status at each phase of the development workflow
|
|
4
|
+
*/
|
|
5
|
+
import { logInfo, logError } from '../../utils/logger.js';
|
|
6
|
+
import { callMcpEndpoint } from '../mcp-client.js';
|
|
7
|
+
/**
|
|
8
|
+
* Update feature status via MCP endpoint
|
|
9
|
+
*/
|
|
10
|
+
export async function updateFeatureStatus({ mcpServerUrl, mcpToken, featureId, status, verbose = false, }) {
|
|
11
|
+
try {
|
|
12
|
+
if (verbose) {
|
|
13
|
+
logInfo(`Updating feature ${featureId} status to: ${status}`);
|
|
14
|
+
}
|
|
15
|
+
await callMcpEndpoint(mcpServerUrl, mcpToken, 'features/update', {
|
|
16
|
+
feature_id: featureId,
|
|
17
|
+
status,
|
|
18
|
+
});
|
|
19
|
+
if (verbose) {
|
|
20
|
+
logInfo(`✅ Feature status updated successfully to: ${status}`);
|
|
21
|
+
}
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
26
|
+
if (verbose) {
|
|
27
|
+
logError(`Failed to update feature status: ${errorMessage}`);
|
|
28
|
+
}
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Map pipeline phase to feature status
|
|
34
|
+
*/
|
|
35
|
+
export const getStatusForPhase = (phase) => {
|
|
36
|
+
switch (phase) {
|
|
37
|
+
case 'feature-analysis':
|
|
38
|
+
return 'feature_analysis';
|
|
39
|
+
case 'technical-design':
|
|
40
|
+
return 'technical_design';
|
|
41
|
+
case 'code-implementation':
|
|
42
|
+
return 'code_implementation';
|
|
43
|
+
case 'functional-testing':
|
|
44
|
+
return 'testing_in_progress';
|
|
45
|
+
case 'testing-passed':
|
|
46
|
+
return 'testing_passed';
|
|
47
|
+
case 'testing-failed':
|
|
48
|
+
return 'testing_failed';
|
|
49
|
+
default:
|
|
50
|
+
return 'backlog';
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Update feature status based on pipeline phase
|
|
55
|
+
*/
|
|
56
|
+
export const updateFeatureStatusForPhase = (mcpConfig, featureId, phase, verbose) => {
|
|
57
|
+
const status = getStatusForPhase(phase);
|
|
58
|
+
return updateFeatureStatus({
|
|
59
|
+
...mcpConfig,
|
|
60
|
+
featureId,
|
|
61
|
+
status,
|
|
62
|
+
verbose,
|
|
63
|
+
});
|
|
64
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { TestCase } from '../../types/features.js';
|
|
2
|
+
/**
|
|
3
|
+
* Get test cases for a feature
|
|
4
|
+
*/
|
|
5
|
+
export declare function getTestCases(mcpServerUrl: string, mcpToken: string, featureId: string, verbose?: boolean): Promise<TestCase[]>;
|
|
6
|
+
/**
|
|
7
|
+
* Create a new test case for a feature
|
|
8
|
+
*/
|
|
9
|
+
export declare function createTestCase(mcpServerUrl: string, mcpToken: string, featureId: string, testCase: {
|
|
10
|
+
name: string;
|
|
11
|
+
description: string;
|
|
12
|
+
is_critical?: boolean;
|
|
13
|
+
}, verbose?: boolean): Promise<boolean>;
|
|
14
|
+
/**
|
|
15
|
+
* Create multiple test cases for a feature
|
|
16
|
+
*/
|
|
17
|
+
export declare function createTestCases(mcpServerUrl: string, mcpToken: string, featureId: string, testCases: Array<{
|
|
18
|
+
name: string;
|
|
19
|
+
description: string;
|
|
20
|
+
is_critical?: boolean;
|
|
21
|
+
}>, verbose?: boolean): Promise<boolean>;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { logInfo, logError } from '../../utils/logger.js';
|
|
2
|
+
import { callMcpEndpoint } from '../mcp-client.js';
|
|
3
|
+
/**
|
|
4
|
+
* Get test cases for a feature
|
|
5
|
+
*/
|
|
6
|
+
export async function getTestCases(mcpServerUrl, mcpToken, featureId, verbose) {
|
|
7
|
+
if (verbose) {
|
|
8
|
+
logInfo(`Fetching test cases for feature: ${featureId}`);
|
|
9
|
+
}
|
|
10
|
+
const result = (await callMcpEndpoint(mcpServerUrl, mcpToken, 'test_cases/list', { feature_id: featureId }));
|
|
11
|
+
return (result.test_cases || []);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Create a new test case for a feature
|
|
15
|
+
*/
|
|
16
|
+
export async function createTestCase(mcpServerUrl, mcpToken, featureId, testCase, verbose) {
|
|
17
|
+
try {
|
|
18
|
+
if (verbose) {
|
|
19
|
+
logInfo(`Creating test case for feature: ${featureId}`);
|
|
20
|
+
}
|
|
21
|
+
await callMcpEndpoint(mcpServerUrl, mcpToken, 'test_cases/create', {
|
|
22
|
+
feature_id: featureId,
|
|
23
|
+
test_cases: [
|
|
24
|
+
{
|
|
25
|
+
name: testCase.name,
|
|
26
|
+
description: testCase.description,
|
|
27
|
+
is_critical: testCase.is_critical || false,
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
});
|
|
31
|
+
if (verbose) {
|
|
32
|
+
logInfo('✅ Test case created successfully');
|
|
33
|
+
}
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
catch (error) {
|
|
37
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
38
|
+
logError(`Failed to create test case: ${errorMessage}`);
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Create multiple test cases for a feature
|
|
44
|
+
*/
|
|
45
|
+
export async function createTestCases(mcpServerUrl, mcpToken, featureId, testCases, verbose) {
|
|
46
|
+
try {
|
|
47
|
+
if (verbose) {
|
|
48
|
+
logInfo(`Creating ${testCases.length} test cases for feature: ${featureId}`);
|
|
49
|
+
}
|
|
50
|
+
for (const testCase of testCases) {
|
|
51
|
+
await createTestCase(mcpServerUrl, mcpToken, featureId, testCase, false);
|
|
52
|
+
}
|
|
53
|
+
if (verbose) {
|
|
54
|
+
logInfo('✅ All test cases created successfully');
|
|
55
|
+
}
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
catch (error) {
|
|
59
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
60
|
+
logError(`Failed to create test cases: ${errorMessage}`);
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Update feature with new data
|
|
3
|
+
*/
|
|
4
|
+
export declare function updateFeature(mcpServerUrl: string, mcpToken: string, featureId: string, updates: {
|
|
5
|
+
technical_design?: string;
|
|
6
|
+
status?: string;
|
|
7
|
+
pull_request_url?: string;
|
|
8
|
+
execution_mode?: string;
|
|
9
|
+
}, verbose?: boolean): Promise<boolean>;
|
|
10
|
+
/**
|
|
11
|
+
* Update technical design for a feature
|
|
12
|
+
*/
|
|
13
|
+
export declare function updateTechnicalDesign(mcpServerUrl: string, mcpToken: string, featureId: string, technicalDesign: string, verbose?: boolean): Promise<boolean>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { logInfo, logError } from '../../utils/logger.js';
|
|
2
|
+
import { callMcpEndpoint } from '../mcp-client.js';
|
|
3
|
+
/**
|
|
4
|
+
* Update feature with new data
|
|
5
|
+
*/
|
|
6
|
+
export async function updateFeature(mcpServerUrl, mcpToken, featureId, updates, verbose) {
|
|
7
|
+
try {
|
|
8
|
+
if (verbose) {
|
|
9
|
+
logInfo(`Updating feature: ${featureId}`);
|
|
10
|
+
}
|
|
11
|
+
await callMcpEndpoint(mcpServerUrl, mcpToken, 'features/update', {
|
|
12
|
+
feature_id: featureId,
|
|
13
|
+
...updates,
|
|
14
|
+
});
|
|
15
|
+
if (verbose) {
|
|
16
|
+
logInfo('✅ Feature updated successfully');
|
|
17
|
+
}
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
catch (error) {
|
|
21
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
22
|
+
logError(`Failed to update feature: ${errorMessage}`);
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Update technical design for a feature
|
|
28
|
+
*/
|
|
29
|
+
export async function updateTechnicalDesign(mcpServerUrl, mcpToken, featureId, technicalDesign, verbose) {
|
|
30
|
+
return updateFeature(mcpServerUrl, mcpToken, featureId, { technical_design: technicalDesign }, verbose);
|
|
31
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { UserStory } from '../../types/features.js';
|
|
2
|
+
/**
|
|
3
|
+
* Get user stories for a feature
|
|
4
|
+
*/
|
|
5
|
+
export declare function getUserStories(mcpServerUrl: string, mcpToken: string, featureId: string, verbose?: boolean): Promise<UserStory[]>;
|
|
6
|
+
/**
|
|
7
|
+
* Create a new user story for a feature
|
|
8
|
+
*/
|
|
9
|
+
export declare function createUserStory(mcpServerUrl: string, mcpToken: string, featureId: string, userStory: {
|
|
10
|
+
title: string;
|
|
11
|
+
description: string;
|
|
12
|
+
status?: string;
|
|
13
|
+
}, verbose?: boolean): Promise<boolean>;
|
|
14
|
+
/**
|
|
15
|
+
* Create multiple user stories for a feature
|
|
16
|
+
*/
|
|
17
|
+
export declare function createUserStories(mcpServerUrl: string, mcpToken: string, featureId: string, userStories: Array<{
|
|
18
|
+
title: string;
|
|
19
|
+
description: string;
|
|
20
|
+
status?: string;
|
|
21
|
+
}>, verbose?: boolean): Promise<boolean>;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { logInfo, logError } from '../../utils/logger.js';
|
|
2
|
+
import { callMcpEndpoint } from '../mcp-client.js';
|
|
3
|
+
/**
|
|
4
|
+
* Get user stories for a feature
|
|
5
|
+
*/
|
|
6
|
+
export async function getUserStories(mcpServerUrl, mcpToken, featureId, verbose) {
|
|
7
|
+
if (verbose) {
|
|
8
|
+
logInfo(`Fetching user stories for feature: ${featureId}`);
|
|
9
|
+
}
|
|
10
|
+
const result = (await callMcpEndpoint(mcpServerUrl, mcpToken, 'user_stories/list', { feature_id: featureId }));
|
|
11
|
+
return (result.user_stories || []);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Create a new user story for a feature
|
|
15
|
+
*/
|
|
16
|
+
export async function createUserStory(mcpServerUrl, mcpToken, featureId, userStory, verbose) {
|
|
17
|
+
try {
|
|
18
|
+
if (verbose) {
|
|
19
|
+
logInfo(`Creating user story for feature: ${featureId}`);
|
|
20
|
+
}
|
|
21
|
+
await callMcpEndpoint(mcpServerUrl, mcpToken, 'user_stories/create', {
|
|
22
|
+
feature_id: featureId,
|
|
23
|
+
user_stories: [
|
|
24
|
+
{
|
|
25
|
+
title: userStory.title,
|
|
26
|
+
description: userStory.description,
|
|
27
|
+
status: userStory.status || 'draft',
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
});
|
|
31
|
+
if (verbose) {
|
|
32
|
+
logInfo('✅ User story created successfully');
|
|
33
|
+
}
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
catch (error) {
|
|
37
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
38
|
+
logError(`Failed to create user story: ${errorMessage}`);
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Create multiple user stories for a feature
|
|
44
|
+
*/
|
|
45
|
+
export async function createUserStories(mcpServerUrl, mcpToken, featureId, userStories, verbose) {
|
|
46
|
+
try {
|
|
47
|
+
if (verbose) {
|
|
48
|
+
logInfo(`Creating ${userStories.length} user stories for feature: ${featureId}`);
|
|
49
|
+
}
|
|
50
|
+
for (const story of userStories) {
|
|
51
|
+
await createUserStory(mcpServerUrl, mcpToken, featureId, story, false);
|
|
52
|
+
}
|
|
53
|
+
if (verbose) {
|
|
54
|
+
logInfo('✅ All user stories created successfully');
|
|
55
|
+
}
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
catch (error) {
|
|
59
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
60
|
+
logError(`Failed to create user stories: ${errorMessage}`);
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
export interface FeatureInfo {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
technical_design?: string;
|
|
6
|
+
status: string;
|
|
7
|
+
product_id: string;
|
|
8
|
+
created_at?: string;
|
|
9
|
+
updated_at?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Get feature details by ID
|
|
13
|
+
*/
|
|
14
|
+
export declare function getFeature(mcpServerUrl: string, mcpToken: string, featureId: string, verbose?: boolean): Promise<FeatureInfo>;
|
|
15
|
+
/**
|
|
16
|
+
* Update feature with new data
|
|
17
|
+
*/
|
|
18
|
+
export declare function updateFeature(mcpServerUrl: string, mcpToken: string, featureId: string, updates: {
|
|
19
|
+
technical_design?: string;
|
|
20
|
+
status?: string;
|
|
21
|
+
pull_request_url?: string;
|
|
22
|
+
}, verbose?: boolean): Promise<boolean>;
|
|
23
|
+
/**
|
|
24
|
+
* Update technical design for a feature
|
|
25
|
+
*/
|
|
26
|
+
export declare function updateTechnicalDesign(mcpServerUrl: string, mcpToken: string, featureId: string, technicalDesign: string, verbose?: boolean): Promise<boolean>;
|
|
27
|
+
/**
|
|
28
|
+
* Update feature status
|
|
29
|
+
*/
|
|
30
|
+
export declare function updateFeatureStatus(mcpServerUrl: string, mcpToken: string, featureId: string, status: string, verbose?: boolean): Promise<boolean>;
|
|
31
|
+
export interface UserStory {
|
|
32
|
+
id: string;
|
|
33
|
+
title: string;
|
|
34
|
+
description: string;
|
|
35
|
+
status: string;
|
|
36
|
+
created_at?: string;
|
|
37
|
+
updated_at?: string;
|
|
38
|
+
[key: string]: any;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Get user stories for a feature
|
|
42
|
+
*/
|
|
43
|
+
export declare function getUserStories(mcpServerUrl: string, mcpToken: string, featureId: string, verbose?: boolean): Promise<UserStory[]>;
|
|
44
|
+
/**
|
|
45
|
+
* Create a new user story for a feature
|
|
46
|
+
*/
|
|
47
|
+
export declare function createUserStory(mcpServerUrl: string, mcpToken: string, featureId: string, userStory: {
|
|
48
|
+
title: string;
|
|
49
|
+
description: string;
|
|
50
|
+
status?: string;
|
|
51
|
+
}, verbose?: boolean): Promise<boolean>;
|
|
52
|
+
/**
|
|
53
|
+
* Create multiple user stories for a feature
|
|
54
|
+
*/
|
|
55
|
+
export declare function createUserStories(mcpServerUrl: string, mcpToken: string, featureId: string, userStories: Array<{
|
|
56
|
+
title: string;
|
|
57
|
+
description: string;
|
|
58
|
+
status?: string;
|
|
59
|
+
}>, verbose?: boolean): Promise<boolean>;
|
|
60
|
+
export interface TestCase {
|
|
61
|
+
id: string;
|
|
62
|
+
name: string;
|
|
63
|
+
description: string;
|
|
64
|
+
is_critical: boolean;
|
|
65
|
+
created_at?: string;
|
|
66
|
+
updated_at?: string;
|
|
67
|
+
[key: string]: any;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Get test cases for a feature
|
|
71
|
+
*/
|
|
72
|
+
export declare function getTestCases(mcpServerUrl: string, mcpToken: string, featureId: string, verbose?: boolean): Promise<TestCase[]>;
|
|
73
|
+
/**
|
|
74
|
+
* Create a new test case for a feature
|
|
75
|
+
*/
|
|
76
|
+
export declare function createTestCase(mcpServerUrl: string, mcpToken: string, featureId: string, testCase: {
|
|
77
|
+
name: string;
|
|
78
|
+
description: string;
|
|
79
|
+
is_critical?: boolean;
|
|
80
|
+
}, verbose?: boolean): Promise<boolean>;
|
|
81
|
+
/**
|
|
82
|
+
* Create multiple test cases for a feature
|
|
83
|
+
*/
|
|
84
|
+
export declare function createTestCases(mcpServerUrl: string, mcpToken: string, featureId: string, testCases: Array<{
|
|
85
|
+
name: string;
|
|
86
|
+
description: string;
|
|
87
|
+
is_critical?: boolean;
|
|
88
|
+
}>, verbose?: boolean): Promise<boolean>;
|
|
89
|
+
/**
|
|
90
|
+
* Filter features by status
|
|
91
|
+
*/
|
|
92
|
+
export declare function filterFeaturesByStatus(features: FeatureInfo[], status: string): FeatureInfo[];
|
|
93
|
+
/**
|
|
94
|
+
* Sort features by updated_at (most recent first)
|
|
95
|
+
*/
|
|
96
|
+
export declare function sortFeaturesByUpdatedAt(features: FeatureInfo[]): FeatureInfo[];
|
|
97
|
+
/**
|
|
98
|
+
* Get features with ready_for_dev status for a product
|
|
99
|
+
*/
|
|
100
|
+
export declare function getReadyForDevFeatures(mcpServerUrl: string, mcpToken: string, productId: string, verbose?: boolean): Promise<FeatureInfo[]>;
|