edsger 0.53.0 → 0.54.1
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/README.md +20 -0
- package/dist/api/financing.d.ts +47 -0
- package/dist/api/financing.js +37 -0
- package/dist/api/issues/approval-checker.d.ts +11 -9
- package/dist/api/issues/approval-checker.js +30 -41
- package/dist/api/issues/status-updater.d.ts +47 -20
- package/dist/api/issues/status-updater.js +114 -46
- package/dist/api/issues/update-issue.d.ts +5 -0
- package/dist/api/issues/update-issue.js +6 -0
- package/dist/commands/agent-workflow/processor.js +5 -1
- package/dist/commands/checklists/index.d.ts +5 -2
- package/dist/commands/checklists/index.js +73 -12
- package/dist/commands/checklists/tools.d.ts +14 -7
- package/dist/commands/checklists/tools.js +15 -208
- package/dist/commands/financing-deck/index.d.ts +8 -0
- package/dist/commands/financing-deck/index.js +66 -0
- package/dist/commands/find-architecture/index.d.ts +13 -0
- package/dist/commands/find-architecture/index.js +41 -0
- package/dist/commands/sync-github-issues/index.d.ts +11 -0
- package/dist/commands/sync-github-issues/index.js +42 -0
- package/dist/commands/sync-sentry-issues/index.d.ts +14 -0
- package/dist/commands/sync-sentry-issues/index.js +73 -0
- package/dist/commands/workflow/executors/phase-executor.js +6 -4
- package/dist/commands/workflow/phase-orchestrator.js +0 -1
- package/dist/config/issue-status.d.ts +18 -45
- package/dist/config/issue-status.js +21 -107
- package/dist/index.js +97 -3
- package/dist/phases/app-store-generation/agent.js +2 -1
- package/dist/phases/app-store-generation/index.js +11 -3
- package/dist/phases/autonomous/index.js +9 -6
- package/dist/phases/branch-planning/index.js +1 -2
- package/dist/phases/branch-planning/prompts.d.ts +1 -1
- package/dist/phases/branch-planning/prompts.js +3 -2
- package/dist/phases/bug-fixing/analyzer.js +6 -3
- package/dist/phases/bug-fixing/mcp-server.d.ts +18 -1
- package/dist/phases/bug-fixing/mcp-server.js +19 -76
- package/dist/phases/chat-processor/product-tools.d.ts +5 -8
- package/dist/phases/chat-processor/product-tools.js +6 -512
- package/dist/phases/chat-processor/tools.d.ts +5 -9
- package/dist/phases/chat-processor/tools.js +6 -704
- package/dist/phases/code-implementation/branch-pr-creator.js +7 -5
- package/dist/phases/code-implementation/index.js +6 -3
- package/dist/phases/code-implementation-verification/agent.js +6 -1
- package/dist/phases/code-refine/index.js +8 -6
- package/dist/phases/code-refine/refine-iteration.js +2 -1
- package/dist/phases/code-review/index.js +8 -6
- package/dist/phases/code-testing/analyzer.js +11 -8
- package/dist/phases/financing-deck/agent.d.ts +1 -0
- package/dist/phases/financing-deck/agent.js +96 -0
- package/dist/phases/financing-deck/context.d.ts +13 -0
- package/dist/phases/financing-deck/context.js +69 -0
- package/dist/phases/financing-deck/index.d.ts +15 -0
- package/dist/phases/financing-deck/index.js +89 -0
- package/dist/phases/financing-deck/prompts.d.ts +2 -0
- package/dist/phases/financing-deck/prompts.js +94 -0
- package/dist/phases/find-architecture/index.d.ts +44 -0
- package/dist/phases/find-architecture/index.js +248 -0
- package/dist/phases/find-architecture/prompts.d.ts +31 -0
- package/dist/phases/find-architecture/prompts.js +128 -0
- package/dist/phases/find-architecture/state.d.ts +21 -0
- package/dist/phases/find-architecture/state.js +17 -0
- package/dist/phases/find-architecture/types.d.ts +55 -0
- package/dist/phases/find-architecture/types.js +69 -0
- package/dist/phases/find-bugs/index.js +13 -4
- package/dist/phases/find-features/index.js +10 -5
- package/dist/phases/find-smells/index.js +10 -3
- package/dist/phases/functional-testing/analyzer.js +27 -17
- package/dist/phases/functional-testing/http-fallback.d.ts +1 -1
- package/dist/phases/functional-testing/http-fallback.js +32 -16
- package/dist/phases/functional-testing/mcp-server.d.ts +9 -1
- package/dist/phases/functional-testing/mcp-server.js +13 -132
- package/dist/phases/growth-analysis/agent.js +2 -2
- package/dist/phases/growth-analysis/index.js +9 -3
- package/dist/phases/intelligence-analysis/agent.js +2 -2
- package/dist/phases/intelligence-analysis/index.js +9 -2
- package/dist/phases/issue-analysis/agent.d.ts +9 -1
- package/dist/phases/issue-analysis/agent.js +68 -27
- package/dist/phases/issue-analysis/context.d.ts +5 -9
- package/dist/phases/issue-analysis/context.js +31 -76
- package/dist/phases/issue-analysis/index.js +32 -84
- package/dist/phases/issue-analysis/outcome.d.ts +3 -33
- package/dist/phases/issue-analysis/outcome.js +15 -253
- package/dist/phases/issue-analysis/prompts.d.ts +3 -5
- package/dist/phases/issue-analysis/prompts.js +45 -158
- package/dist/phases/issue-analysis-verification/agent.d.ts +4 -4
- package/dist/phases/issue-analysis-verification/agent.js +5 -5
- package/dist/phases/issue-analysis-verification/index.d.ts +4 -2
- package/dist/phases/issue-analysis-verification/index.js +9 -22
- package/dist/phases/issue-analysis-verification/prompts.d.ts +1 -2
- package/dist/phases/issue-analysis-verification/prompts.js +21 -46
- package/dist/phases/output-contracts.js +66 -78
- package/dist/phases/pr-execution/context.d.ts +2 -0
- package/dist/phases/pr-execution/context.js +1 -0
- package/dist/phases/pr-execution/index.js +28 -19
- package/dist/phases/pr-execution/prompts.d.ts +2 -1
- package/dist/phases/pr-execution/prompts.js +12 -10
- package/dist/phases/pr-resolve/index.js +2 -8
- package/dist/phases/pr-splitting/index.js +3 -3
- package/dist/phases/pr-splitting/prompts.d.ts +1 -1
- package/dist/phases/pr-splitting/prompts.js +3 -2
- package/dist/phases/pull-request/creator.js +10 -7
- package/dist/phases/pull-request/handler.js +3 -1
- package/dist/phases/release-sync/index.js +52 -43
- package/dist/phases/run-sheet/index.js +2 -1
- package/dist/phases/smoke-test/agent.js +2 -1
- package/dist/phases/smoke-test/index.js +4 -1
- package/dist/phases/sync-github-issues/index.d.ts +41 -0
- package/dist/phases/sync-github-issues/index.js +187 -0
- package/dist/phases/sync-github-issues/state.d.ts +26 -0
- package/dist/phases/sync-github-issues/state.js +18 -0
- package/dist/phases/sync-github-issues/types.d.ts +35 -0
- package/dist/phases/sync-github-issues/types.js +6 -0
- package/dist/phases/sync-sentry-issues/index.d.ts +29 -0
- package/dist/phases/sync-sentry-issues/index.js +153 -0
- package/dist/phases/sync-sentry-issues/sentry-client.d.ts +66 -0
- package/dist/phases/sync-sentry-issues/sentry-client.js +221 -0
- package/dist/phases/sync-sentry-issues/state.d.ts +23 -0
- package/dist/phases/sync-sentry-issues/state.js +18 -0
- package/dist/phases/sync-sentry-issues/types.d.ts +46 -0
- package/dist/phases/sync-sentry-issues/types.js +6 -0
- package/dist/phases/sync-shared/mcp.d.ts +81 -0
- package/dist/phases/sync-shared/mcp.js +111 -0
- package/dist/phases/technical-design/index.js +0 -1
- package/dist/phases/test-cases-analysis/agent.js +2 -1
- package/dist/phases/test-cases-analysis/index.js +0 -1
- package/dist/phases/user-stories-analysis/agent.js +2 -1
- package/dist/phases/user-stories-analysis/index.js +0 -1
- package/dist/services/coaching/coaching-agent.js +29 -4
- package/dist/services/feedbacks.d.ts +1 -1
- package/dist/services/repo-config.d.ts +17 -0
- package/dist/services/repo-config.js +50 -0
- package/dist/skills/phase/issue-analysis/SKILL.md +48 -92
- package/dist/skills/phase/issue-analysis-verification/SKILL.md +46 -31
- package/dist/tools/bootstrap.d.ts +45 -0
- package/dist/tools/bootstrap.js +50 -0
- package/dist/types/external-sources.d.ts +22 -0
- package/dist/types/external-sources.js +23 -0
- package/dist/types/index.d.ts +5 -10
- package/dist/types/issues.d.ts +2 -0
- package/dist/types/llm-responses.d.ts +1 -14
- package/dist/utils/formatters.js +1 -7
- package/dist/utils/git-branch-manager-async.js +9 -5
- package/dist/utils/git-branch-manager.js +17 -7
- package/dist/workspace/workspace-manager.d.ts +10 -0
- package/dist/workspace/workspace-manager.js +22 -1
- package/package.json +6 -2
- package/vitest.config.ts +4 -0
- package/.env.local +0 -12
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { getDefaultBranchForIssue } from '../../services/repo-config.js';
|
|
1
2
|
import { resolveSkill, substituteVariables, } from '../../services/skill-resolver.js';
|
|
2
3
|
import { OUTPUT_CONTRACTS } from '../output-contracts.js';
|
|
3
4
|
/**
|
|
4
5
|
* Create the system prompt for branch planning
|
|
5
6
|
*/
|
|
6
|
-
export async function createBranchPlanningSystemPrompt(config, issueId, projectDir) {
|
|
7
|
+
export async function createBranchPlanningSystemPrompt(config, issueId, projectDir, verbose) {
|
|
7
8
|
const skill = await resolveSkill('phase/branch-planning', {
|
|
8
9
|
projectDir,
|
|
9
10
|
});
|
|
@@ -12,7 +13,7 @@ export async function createBranchPlanningSystemPrompt(config, issueId, projectD
|
|
|
12
13
|
}
|
|
13
14
|
let { prompt } = skill;
|
|
14
15
|
prompt = substituteVariables(prompt, {
|
|
15
|
-
BASE_BRANCH:
|
|
16
|
+
BASE_BRANCH: await getDefaultBranchForIssue(issueId, verbose),
|
|
16
17
|
ISSUE_ID: issueId,
|
|
17
18
|
});
|
|
18
19
|
return `${prompt}\n\n${OUTPUT_CONTRACTS['branch-planning']}`;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { query } from '@anthropic-ai/claude-agent-sdk';
|
|
2
2
|
import { DEFAULT_MODEL } from '../../constants.js';
|
|
3
3
|
import { formatFeedbacksForContext, getFeedbacksForPhase, } from '../../services/feedbacks.js';
|
|
4
|
+
import { getDefaultBranchForIssue } from '../../services/repo-config.js';
|
|
4
5
|
import { preparePhaseGitEnvironment } from '../../utils/git-branch-manager.js';
|
|
5
6
|
import { extractJsonFromResponse } from '../../utils/json-extractor.js';
|
|
6
7
|
import { logDebug, logError, logInfo } from '../../utils/logger.js';
|
|
@@ -32,14 +33,16 @@ async function* prompt(bugFixPrompt) {
|
|
|
32
33
|
setTimeout(res, 10000);
|
|
33
34
|
});
|
|
34
35
|
}
|
|
35
|
-
// eslint-disable-next-line complexity
|
|
36
36
|
export const fixTestFailures = async (options, config) => {
|
|
37
37
|
const { issueId, testErrors, attemptNumber = 1, verbose } = options;
|
|
38
38
|
if (verbose) {
|
|
39
39
|
logInfo(`Starting bug fixing for issue ID: ${issueId} (Attempt ${attemptNumber})`);
|
|
40
40
|
}
|
|
41
|
-
// Prepare git environment: switch to issue branch and rebase with
|
|
42
|
-
|
|
41
|
+
// Prepare git environment: switch to issue branch and rebase with the
|
|
42
|
+
// repo's default branch (resolved via GitHub API for consistency with
|
|
43
|
+
// other phases — same source of truth for forks where origin/HEAD may lag).
|
|
44
|
+
const defaultBranch = await getDefaultBranchForIssue(issueId, verbose);
|
|
45
|
+
const cleanupGit = preparePhaseGitEnvironment(issueId, defaultBranch, verbose);
|
|
43
46
|
try {
|
|
44
47
|
// Fetch all required context information via MCP endpoints
|
|
45
48
|
if (verbose) {
|
|
@@ -1 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Bug-fixing MCP server — CLI entry point.
|
|
3
|
+
*
|
|
4
|
+
* The actual tool implementations live in `edsger-tools`. This file only
|
|
5
|
+
* adapts the CLI's `callMcpEndpoint` transport into the `ToolDeps`
|
|
6
|
+
* shape that `createBugFixingMcpServer` expects.
|
|
7
|
+
*/
|
|
8
|
+
import type { McpSdkServerConfigWithInstance } from '@anthropic-ai/claude-agent-sdk';
|
|
9
|
+
/**
|
|
10
|
+
* Build the bug-fixing MCP server bound to the CLI's auth-store-backed
|
|
11
|
+
* MCP transport. Same return shape as the previous in-package
|
|
12
|
+
* implementation; existing callers do not need to change.
|
|
13
|
+
*
|
|
14
|
+
* Explicit return type pins the inferred type to the CLI's own copy of
|
|
15
|
+
* `@anthropic-ai/claude-agent-sdk` rather than the nested copy under
|
|
16
|
+
* `edsger-tools/node_modules`, which TS otherwise warns is non-portable.
|
|
17
|
+
*/
|
|
18
|
+
export declare const createBugFixingMcpServer: () => McpSdkServerConfigWithInstance;
|
|
@@ -1,76 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}));
|
|
21
|
-
if (!issueResult.issues || issueResult.issues.length === 0) {
|
|
22
|
-
throw new Error('Issue not found');
|
|
23
|
-
}
|
|
24
|
-
const issue = issueResult.issues[0];
|
|
25
|
-
// Get user stories to understand requirements
|
|
26
|
-
const userStoriesResult = (await callMcpEndpoint('user_stories/list', { issue_id: args.issue_id }));
|
|
27
|
-
// Get test cases to understand what needs to pass
|
|
28
|
-
const testCasesResult = (await callMcpEndpoint('test_cases/list', {
|
|
29
|
-
issue_id: args.issue_id,
|
|
30
|
-
}));
|
|
31
|
-
// Get latest test report to understand what has been tested
|
|
32
|
-
const testReportResult = (await callMcpEndpoint('test_reports/latest', { issue_id: args.issue_id }));
|
|
33
|
-
const completeInfo = {
|
|
34
|
-
issue,
|
|
35
|
-
user_stories: userStoriesResult.user_stories || [],
|
|
36
|
-
test_cases: testCasesResult.test_cases || [],
|
|
37
|
-
latest_test_report: testReportResult.test_report || null,
|
|
38
|
-
technical_design: issue.technical_design || null,
|
|
39
|
-
};
|
|
40
|
-
return {
|
|
41
|
-
content: [
|
|
42
|
-
{
|
|
43
|
-
type: 'text',
|
|
44
|
-
text: JSON.stringify(completeInfo, null, 2),
|
|
45
|
-
},
|
|
46
|
-
],
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
catch (error) {
|
|
50
|
-
logError(`Error in get_issue_with_test_reports: ${error}`);
|
|
51
|
-
throw error;
|
|
52
|
-
}
|
|
53
|
-
}),
|
|
54
|
-
tool('verify_fix', 'Verify that the bug fix addresses the test failures', {
|
|
55
|
-
issue_id: z.string().describe('Issue ID to verify the fix for'),
|
|
56
|
-
fix_summary: z.string().describe('Summary of the fixes applied'),
|
|
57
|
-
files_modified: z
|
|
58
|
-
.array(z.string())
|
|
59
|
-
.describe('List of files that were modified'),
|
|
60
|
-
}, (args) => Promise.resolve({
|
|
61
|
-
content: [
|
|
62
|
-
{
|
|
63
|
-
type: 'text',
|
|
64
|
-
text: JSON.stringify({
|
|
65
|
-
verified: true,
|
|
66
|
-
issue_id: args.issue_id,
|
|
67
|
-
summary: args.fix_summary,
|
|
68
|
-
files_modified: args.files_modified,
|
|
69
|
-
message: 'Bug fix verification complete',
|
|
70
|
-
}, null, 2),
|
|
71
|
-
},
|
|
72
|
-
],
|
|
73
|
-
})),
|
|
74
|
-
],
|
|
75
|
-
});
|
|
76
|
-
};
|
|
1
|
+
/**
|
|
2
|
+
* Bug-fixing MCP server — CLI entry point.
|
|
3
|
+
*
|
|
4
|
+
* The actual tool implementations live in `edsger-tools`. This file only
|
|
5
|
+
* adapts the CLI's `callMcpEndpoint` transport into the `ToolDeps`
|
|
6
|
+
* shape that `createBugFixingMcpServer` expects.
|
|
7
|
+
*/
|
|
8
|
+
import { createBugFixingMcpServer as createBugFixingMcpServerCore } from 'edsger-tools';
|
|
9
|
+
import { getToolDeps } from '../../tools/bootstrap.js';
|
|
10
|
+
/**
|
|
11
|
+
* Build the bug-fixing MCP server bound to the CLI's auth-store-backed
|
|
12
|
+
* MCP transport. Same return shape as the previous in-package
|
|
13
|
+
* implementation; existing callers do not need to change.
|
|
14
|
+
*
|
|
15
|
+
* Explicit return type pins the inferred type to the CLI's own copy of
|
|
16
|
+
* `@anthropic-ai/claude-agent-sdk` rather than the nested copy under
|
|
17
|
+
* `edsger-tools/node_modules`, which TS otherwise warns is non-portable.
|
|
18
|
+
*/
|
|
19
|
+
export const createBugFixingMcpServer = () => createBugFixingMcpServerCore(getToolDeps());
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Chat (product) MCP server — CLI entry point.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* listing issues, creating issues, managing tasks, and team coordination.
|
|
4
|
+
* Tool implementations live in `edsger-tools`. This shim adapts the
|
|
5
|
+
* CLI's `callMcpEndpoint` transport into `ToolDeps`.
|
|
7
6
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
*/
|
|
11
|
-
export declare function createProductChatMcpServer(): import("@anthropic-ai/claude-agent-sdk").McpSdkServerConfigWithInstance;
|
|
7
|
+
import type { McpSdkServerConfigWithInstance } from '@anthropic-ai/claude-agent-sdk';
|
|
8
|
+
export declare function createProductChatMcpServer(): McpSdkServerConfigWithInstance;
|