edsger 0.54.0 → 0.55.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.
Files changed (142) hide show
  1. package/README.md +20 -0
  2. package/dist/api/financing.d.ts +47 -0
  3. package/dist/api/financing.js +37 -0
  4. package/dist/api/issues/approval-checker.d.ts +11 -9
  5. package/dist/api/issues/approval-checker.js +30 -41
  6. package/dist/api/issues/status-updater.d.ts +47 -20
  7. package/dist/api/issues/status-updater.js +114 -46
  8. package/dist/api/issues/update-issue.d.ts +5 -0
  9. package/dist/api/issues/update-issue.js +6 -0
  10. package/dist/commands/agent-workflow/processor.js +5 -1
  11. package/dist/commands/checklists/index.d.ts +5 -2
  12. package/dist/commands/checklists/index.js +73 -12
  13. package/dist/commands/checklists/tools.d.ts +14 -7
  14. package/dist/commands/checklists/tools.js +15 -208
  15. package/dist/commands/financing-deck/index.d.ts +8 -0
  16. package/dist/commands/financing-deck/index.js +66 -0
  17. package/dist/commands/find-architecture/index.d.ts +13 -0
  18. package/dist/commands/find-architecture/index.js +41 -0
  19. package/dist/commands/issue-analysis/index.d.ts +5 -0
  20. package/dist/commands/issue-analysis/index.js +9 -0
  21. package/dist/commands/sync-github-issues/index.d.ts +11 -0
  22. package/dist/commands/sync-github-issues/index.js +42 -0
  23. package/dist/commands/sync-sentry-issues/index.d.ts +14 -0
  24. package/dist/commands/sync-sentry-issues/index.js +73 -0
  25. package/dist/commands/technical-design/index.d.ts +5 -0
  26. package/dist/commands/technical-design/index.js +9 -0
  27. package/dist/commands/test-cases-analysis/index.d.ts +5 -0
  28. package/dist/commands/test-cases-analysis/index.js +9 -0
  29. package/dist/commands/user-stories-analysis/index.d.ts +5 -0
  30. package/dist/commands/user-stories-analysis/index.js +9 -0
  31. package/dist/commands/workflow/executors/phase-executor.js +6 -4
  32. package/dist/commands/workflow/phase-orchestrator.js +0 -1
  33. package/dist/config/issue-status.d.ts +18 -45
  34. package/dist/config/issue-status.js +21 -107
  35. package/dist/index.js +176 -4
  36. package/dist/phases/app-store-generation/agent.js +2 -1
  37. package/dist/phases/app-store-generation/index.js +11 -3
  38. package/dist/phases/branch-planning/index.js +0 -1
  39. package/dist/phases/bug-fixing/analyzer.js +0 -1
  40. package/dist/phases/bug-fixing/mcp-server.d.ts +18 -1
  41. package/dist/phases/bug-fixing/mcp-server.js +19 -76
  42. package/dist/phases/chat-processor/product-tools.d.ts +5 -8
  43. package/dist/phases/chat-processor/product-tools.js +6 -512
  44. package/dist/phases/chat-processor/tools.d.ts +5 -9
  45. package/dist/phases/chat-processor/tools.js +6 -704
  46. package/dist/phases/code-implementation/index.js +0 -1
  47. package/dist/phases/code-implementation-verification/agent.js +6 -1
  48. package/dist/phases/code-refine/index.js +0 -1
  49. package/dist/phases/code-refine/refine-iteration.js +2 -1
  50. package/dist/phases/code-review/index.js +0 -1
  51. package/dist/phases/code-testing/analyzer.js +0 -1
  52. package/dist/phases/financing-deck/agent.d.ts +1 -0
  53. package/dist/phases/financing-deck/agent.js +96 -0
  54. package/dist/phases/financing-deck/context.d.ts +13 -0
  55. package/dist/phases/financing-deck/context.js +69 -0
  56. package/dist/phases/financing-deck/index.d.ts +15 -0
  57. package/dist/phases/financing-deck/index.js +89 -0
  58. package/dist/phases/financing-deck/prompts.d.ts +2 -0
  59. package/dist/phases/financing-deck/prompts.js +94 -0
  60. package/dist/phases/find-architecture/index.d.ts +44 -0
  61. package/dist/phases/find-architecture/index.js +248 -0
  62. package/dist/phases/find-architecture/prompts.d.ts +31 -0
  63. package/dist/phases/find-architecture/prompts.js +128 -0
  64. package/dist/phases/find-architecture/state.d.ts +21 -0
  65. package/dist/phases/find-architecture/state.js +17 -0
  66. package/dist/phases/find-architecture/types.d.ts +55 -0
  67. package/dist/phases/find-architecture/types.js +69 -0
  68. package/dist/phases/find-bugs/index.js +13 -4
  69. package/dist/phases/find-features/index.js +10 -5
  70. package/dist/phases/find-smells/index.js +10 -3
  71. package/dist/phases/functional-testing/analyzer.js +27 -17
  72. package/dist/phases/functional-testing/http-fallback.d.ts +1 -1
  73. package/dist/phases/functional-testing/http-fallback.js +32 -16
  74. package/dist/phases/functional-testing/mcp-server.d.ts +9 -1
  75. package/dist/phases/functional-testing/mcp-server.js +13 -132
  76. package/dist/phases/growth-analysis/agent.js +2 -2
  77. package/dist/phases/growth-analysis/index.js +9 -3
  78. package/dist/phases/intelligence-analysis/agent.js +2 -2
  79. package/dist/phases/intelligence-analysis/index.js +9 -2
  80. package/dist/phases/issue-analysis/agent.d.ts +9 -1
  81. package/dist/phases/issue-analysis/agent.js +68 -27
  82. package/dist/phases/issue-analysis/context.d.ts +5 -9
  83. package/dist/phases/issue-analysis/context.js +31 -76
  84. package/dist/phases/issue-analysis/index.js +32 -84
  85. package/dist/phases/issue-analysis/outcome.d.ts +3 -33
  86. package/dist/phases/issue-analysis/outcome.js +15 -253
  87. package/dist/phases/issue-analysis/prompts.d.ts +3 -5
  88. package/dist/phases/issue-analysis/prompts.js +45 -158
  89. package/dist/phases/issue-analysis-verification/agent.d.ts +4 -4
  90. package/dist/phases/issue-analysis-verification/agent.js +5 -5
  91. package/dist/phases/issue-analysis-verification/index.d.ts +4 -2
  92. package/dist/phases/issue-analysis-verification/index.js +9 -22
  93. package/dist/phases/issue-analysis-verification/prompts.d.ts +1 -2
  94. package/dist/phases/issue-analysis-verification/prompts.js +21 -46
  95. package/dist/phases/output-contracts.js +66 -78
  96. package/dist/phases/pr-execution/index.js +2 -2
  97. package/dist/phases/pr-resolve/index.js +2 -8
  98. package/dist/phases/pr-splitting/index.js +2 -2
  99. package/dist/phases/release-sync/index.js +52 -43
  100. package/dist/phases/run-sheet/index.js +2 -1
  101. package/dist/phases/smoke-test/agent.js +2 -1
  102. package/dist/phases/smoke-test/index.js +4 -1
  103. package/dist/phases/sync-github-issues/index.d.ts +41 -0
  104. package/dist/phases/sync-github-issues/index.js +187 -0
  105. package/dist/phases/sync-github-issues/state.d.ts +26 -0
  106. package/dist/phases/sync-github-issues/state.js +18 -0
  107. package/dist/phases/sync-github-issues/types.d.ts +35 -0
  108. package/dist/phases/sync-github-issues/types.js +6 -0
  109. package/dist/phases/sync-sentry-issues/index.d.ts +29 -0
  110. package/dist/phases/sync-sentry-issues/index.js +153 -0
  111. package/dist/phases/sync-sentry-issues/sentry-client.d.ts +66 -0
  112. package/dist/phases/sync-sentry-issues/sentry-client.js +221 -0
  113. package/dist/phases/sync-sentry-issues/state.d.ts +23 -0
  114. package/dist/phases/sync-sentry-issues/state.js +18 -0
  115. package/dist/phases/sync-sentry-issues/types.d.ts +46 -0
  116. package/dist/phases/sync-sentry-issues/types.js +6 -0
  117. package/dist/phases/sync-shared/mcp.d.ts +81 -0
  118. package/dist/phases/sync-shared/mcp.js +111 -0
  119. package/dist/phases/technical-design/index.js +0 -1
  120. package/dist/phases/test-cases-analysis/agent.js +2 -1
  121. package/dist/phases/test-cases-analysis/index.js +0 -1
  122. package/dist/phases/user-stories-analysis/agent.js +2 -1
  123. package/dist/phases/user-stories-analysis/index.js +0 -1
  124. package/dist/services/coaching/coaching-agent.js +29 -4
  125. package/dist/services/feedbacks.d.ts +1 -1
  126. package/dist/skills/phase/issue-analysis/SKILL.md +48 -92
  127. package/dist/skills/phase/issue-analysis-verification/SKILL.md +46 -31
  128. package/dist/tools/bootstrap.d.ts +45 -0
  129. package/dist/tools/bootstrap.js +50 -0
  130. package/dist/types/external-sources.d.ts +22 -0
  131. package/dist/types/external-sources.js +23 -0
  132. package/dist/types/index.d.ts +5 -10
  133. package/dist/types/issues.d.ts +2 -0
  134. package/dist/types/llm-responses.d.ts +1 -14
  135. package/dist/utils/formatters.js +1 -7
  136. package/dist/utils/issue-phase-cli.d.ts +26 -0
  137. package/dist/utils/issue-phase-cli.js +44 -0
  138. package/dist/workspace/workspace-manager.d.ts +10 -0
  139. package/dist/workspace/workspace-manager.js +22 -1
  140. package/package.json +6 -2
  141. package/vitest.config.ts +4 -0
  142. package/.env.local +0 -12
@@ -1,7 +1,7 @@
1
1
  import { getAppStorePrimaryLocale, saveAppStoreListings, upsertAppStoreConfig, } from '../../api/app-store.js';
2
2
  import { getGitHubConfigByProduct } from '../../api/github.js';
3
3
  import { logError, logInfo, logSuccess } from '../../utils/logger.js';
4
- import { cloneIssueRepo, ensureWorkspaceDir, } from '../../workspace/workspace-manager.js';
4
+ import { cleanupIssueRepo, cloneIssueRepo, ensureWorkspaceDir, } from '../../workspace/workspace-manager.js';
5
5
  import { executeAppStoreQuery } from './agent.js';
6
6
  import { prepareAppStoreContext } from './context.js';
7
7
  import { createAppStoreSystemPrompt } from './prompts.js';
@@ -13,13 +13,14 @@ function truncateKeywords(keywords) {
13
13
  }
14
14
  return keywords.slice(0, 100).replace(/,[^,]*$/, '');
15
15
  }
16
- // eslint-disable-next-line complexity
17
16
  export const generateAppStoreAssets = async (options, config) => {
18
17
  const { productId, targetStore, screenshotsOnly, listingsOnly, verbose } = options;
19
18
  if (verbose) {
20
19
  logInfo(`Starting app store generation for product: ${productId}`);
21
20
  logInfo(` Target store: ${targetStore}`);
22
21
  }
22
+ let repoCwd;
23
+ let generationSucceeded = false;
23
24
  try {
24
25
  // Resolve locale: use explicit param, or fetch from Apple App Store Connect
25
26
  let { locale } = options;
@@ -48,7 +49,8 @@ export const generateAppStoreAssets = async (options, config) => {
48
49
  'Please configure a GitHub repo in the product settings before generating assets.');
49
50
  }
50
51
  const workspaceRoot = ensureWorkspaceDir();
51
- const { repoPath: repoCwd } = cloneIssueRepo(workspaceRoot, `app-store-${productId}`, githubConfig.owner, githubConfig.repo, githubConfig.token);
52
+ const cloned = cloneIssueRepo(workspaceRoot, `app-store-${productId}`, githubConfig.owner, githubConfig.repo, githubConfig.token);
53
+ repoCwd = cloned.repoPath;
52
54
  logInfo(`Repository cloned to: ${repoCwd}`);
53
55
  // Prepare context and prompt
54
56
  const { context, prompt: analysisPrompt } = await prepareAppStoreContext(productId, targetStore, locale, verbose, true);
@@ -126,6 +128,7 @@ export const generateAppStoreAssets = async (options, config) => {
126
128
  }
127
129
  }
128
130
  const totalScreenshots = Object.values(savedScreenshots).flat().length;
131
+ generationSucceeded = true;
129
132
  return {
130
133
  productId,
131
134
  status: 'success',
@@ -146,4 +149,9 @@ export const generateAppStoreAssets = async (options, config) => {
146
149
  configIds: [],
147
150
  };
148
151
  }
152
+ finally {
153
+ if (generationSucceeded) {
154
+ cleanupIssueRepo(repoCwd);
155
+ }
156
+ }
149
157
  };
@@ -116,7 +116,6 @@ async function persistBranches(sortedBranches, issueId, verbose) {
116
116
  }
117
117
  }
118
118
  }
119
- // eslint-disable-next-line complexity
120
119
  export const planIssueBranches = async (options, config) => {
121
120
  const { issueId, verbose, replaceExisting } = options;
122
121
  if (verbose) {
@@ -33,7 +33,6 @@ async function* prompt(bugFixPrompt) {
33
33
  setTimeout(res, 10000);
34
34
  });
35
35
  }
36
- // eslint-disable-next-line complexity
37
36
  export const fixTestFailures = async (options, config) => {
38
37
  const { issueId, testErrors, attemptNumber = 1, verbose } = options;
39
38
  if (verbose) {
@@ -1 +1,18 @@
1
- export declare const createBugFixingMcpServer: () => import("@anthropic-ai/claude-agent-sdk").McpSdkServerConfigWithInstance;
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
- import { createSdkMcpServer, tool } from '@anthropic-ai/claude-agent-sdk';
2
- import { z } from 'zod';
3
- import { callMcpEndpoint } from '../../api/mcp-client.js';
4
- import { logError } from '../../utils/logger.js';
5
- // Create an SDK MCP server with custom tools for bug fixing
6
- export const createBugFixingMcpServer = () => {
7
- return createSdkMcpServer({
8
- name: 'edsger-bug-fixing-mcp',
9
- version: '1.0.0',
10
- tools: [
11
- tool('get_issue_with_test_reports', 'Get issue information including technical design, implementation details, and test reports', {
12
- issue_id: z
13
- .string()
14
- .describe('Issue ID to get information and test results for'),
15
- }, async (args) => {
16
- try {
17
- // Get issue details
18
- const issueResult = (await callMcpEndpoint('issues/get', {
19
- issue_id: args.issue_id,
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
- * Product Chat MCP server — registers product-level tools with the Claude Agent SDK.
2
+ * Chat (product) MCP server — CLI entry point.
3
3
  *
4
- * Unlike the issue chat tools which operate on a single issue's lifecycle
5
- * (stories, tests, workflow), these tools operate at the product level:
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
- * Create an in-process MCP server with product-level chat tools.
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;