@specforge/mcp 2.6.0 → 3.0.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/README.md +73 -0
- package/bin/{specforge-mcp → specforge} +0 -5
- package/dist/ai-provider/circuit-breaker.d.ts +63 -0
- package/dist/ai-provider/circuit-breaker.d.ts.map +1 -0
- package/dist/ai-provider/circuit-breaker.js +160 -0
- package/dist/ai-provider/circuit-breaker.js.map +1 -0
- package/dist/ai-provider/cli-version.d.ts +50 -0
- package/dist/ai-provider/cli-version.d.ts.map +1 -0
- package/dist/ai-provider/cli-version.js +141 -0
- package/dist/ai-provider/cli-version.js.map +1 -0
- package/dist/ai-provider/config-loader.d.ts +45 -0
- package/dist/ai-provider/config-loader.d.ts.map +1 -0
- package/dist/ai-provider/config-loader.js +106 -0
- package/dist/ai-provider/config-loader.js.map +1 -0
- package/dist/ai-provider/errors.d.ts +48 -0
- package/dist/ai-provider/errors.d.ts.map +1 -0
- package/dist/ai-provider/errors.js +102 -0
- package/dist/ai-provider/errors.js.map +1 -0
- package/dist/ai-provider/events.d.ts +73 -0
- package/dist/ai-provider/events.d.ts.map +1 -0
- package/dist/ai-provider/events.js +75 -0
- package/dist/ai-provider/events.js.map +1 -0
- package/dist/ai-provider/factory.d.ts +31 -0
- package/dist/ai-provider/factory.d.ts.map +1 -0
- package/dist/ai-provider/factory.js +100 -0
- package/dist/ai-provider/factory.js.map +1 -0
- package/dist/ai-provider/index.d.ts +24 -0
- package/dist/ai-provider/index.d.ts.map +1 -0
- package/dist/ai-provider/index.js +46 -0
- package/dist/ai-provider/index.js.map +1 -0
- package/dist/ai-provider/instance-coordinator.d.ts +54 -0
- package/dist/ai-provider/instance-coordinator.d.ts.map +1 -0
- package/dist/ai-provider/instance-coordinator.js +199 -0
- package/dist/ai-provider/instance-coordinator.js.map +1 -0
- package/dist/ai-provider/jsonl-parser.d.ts +43 -0
- package/dist/ai-provider/jsonl-parser.d.ts.map +1 -0
- package/dist/ai-provider/jsonl-parser.js +107 -0
- package/dist/ai-provider/jsonl-parser.js.map +1 -0
- package/dist/ai-provider/lifecycle.d.ts +50 -0
- package/dist/ai-provider/lifecycle.d.ts.map +1 -0
- package/dist/ai-provider/lifecycle.js +145 -0
- package/dist/ai-provider/lifecycle.js.map +1 -0
- package/dist/ai-provider/logger.d.ts +69 -0
- package/dist/ai-provider/logger.d.ts.map +1 -0
- package/dist/ai-provider/logger.js +161 -0
- package/dist/ai-provider/logger.js.map +1 -0
- package/dist/ai-provider/metrics.d.ts +91 -0
- package/dist/ai-provider/metrics.d.ts.map +1 -0
- package/dist/ai-provider/metrics.js +187 -0
- package/dist/ai-provider/metrics.js.map +1 -0
- package/dist/ai-provider/process-manager.d.ts +97 -0
- package/dist/ai-provider/process-manager.d.ts.map +1 -0
- package/dist/ai-provider/process-manager.js +477 -0
- package/dist/ai-provider/process-manager.js.map +1 -0
- package/dist/ai-provider/providers/claude-code.d.ts +64 -0
- package/dist/ai-provider/providers/claude-code.d.ts.map +1 -0
- package/dist/ai-provider/providers/claude-code.js +205 -0
- package/dist/ai-provider/providers/claude-code.js.map +1 -0
- package/dist/ai-provider/retry-executor.d.ts +52 -0
- package/dist/ai-provider/retry-executor.d.ts.map +1 -0
- package/dist/ai-provider/retry-executor.js +138 -0
- package/dist/ai-provider/retry-executor.js.map +1 -0
- package/dist/ai-provider/safe-args.d.ts +58 -0
- package/dist/ai-provider/safe-args.d.ts.map +1 -0
- package/dist/ai-provider/safe-args.js +176 -0
- package/dist/ai-provider/safe-args.js.map +1 -0
- package/dist/ai-provider/semaphore.d.ts +50 -0
- package/dist/ai-provider/semaphore.d.ts.map +1 -0
- package/dist/ai-provider/semaphore.js +97 -0
- package/dist/ai-provider/semaphore.js.map +1 -0
- package/dist/ai-provider/tracer.d.ts +67 -0
- package/dist/ai-provider/tracer.d.ts.map +1 -0
- package/dist/ai-provider/tracer.js +209 -0
- package/dist/ai-provider/tracer.js.map +1 -0
- package/dist/ai-provider/types.d.ts +181 -0
- package/dist/ai-provider/types.d.ts.map +1 -0
- package/dist/ai-provider/types.js +8 -0
- package/dist/ai-provider/types.js.map +1 -0
- package/dist/autopilot/agents/agent-runner.d.ts +109 -0
- package/dist/autopilot/agents/agent-runner.d.ts.map +1 -0
- package/dist/autopilot/agents/agent-runner.js +731 -0
- package/dist/autopilot/agents/agent-runner.js.map +1 -0
- package/dist/autopilot/agents/agent-selector.d.ts +59 -0
- package/dist/autopilot/agents/agent-selector.d.ts.map +1 -0
- package/dist/autopilot/agents/agent-selector.js +234 -0
- package/dist/autopilot/agents/agent-selector.js.map +1 -0
- package/dist/autopilot/agents/model-selector.d.ts +49 -0
- package/dist/autopilot/agents/model-selector.d.ts.map +1 -0
- package/dist/autopilot/agents/model-selector.js +62 -0
- package/dist/autopilot/agents/model-selector.js.map +1 -0
- package/dist/autopilot/agents/profiles/builtin.d.ts +55 -0
- package/dist/autopilot/agents/profiles/builtin.d.ts.map +1 -0
- package/dist/autopilot/agents/profiles/builtin.js +323 -0
- package/dist/autopilot/agents/profiles/builtin.js.map +1 -0
- package/dist/autopilot/agents/profiles/types.d.ts +98 -0
- package/dist/autopilot/agents/profiles/types.d.ts.map +1 -0
- package/dist/autopilot/agents/profiles/types.js +17 -0
- package/dist/autopilot/agents/profiles/types.js.map +1 -0
- package/dist/autopilot/api/autopilot-api-client.d.ts +217 -0
- package/dist/autopilot/api/autopilot-api-client.d.ts.map +1 -0
- package/dist/autopilot/api/autopilot-api-client.js +402 -0
- package/dist/autopilot/api/autopilot-api-client.js.map +1 -0
- package/dist/autopilot/cli/abort.d.ts +20 -0
- package/dist/autopilot/cli/abort.d.ts.map +1 -0
- package/dist/autopilot/cli/abort.js +201 -0
- package/dist/autopilot/cli/abort.js.map +1 -0
- package/dist/autopilot/cli/display.d.ts +63 -0
- package/dist/autopilot/cli/display.d.ts.map +1 -0
- package/dist/autopilot/cli/display.js +260 -0
- package/dist/autopilot/cli/display.js.map +1 -0
- package/dist/autopilot/cli/index.d.ts +24 -0
- package/dist/autopilot/cli/index.d.ts.map +1 -0
- package/dist/autopilot/cli/index.js +79 -0
- package/dist/autopilot/cli/index.js.map +1 -0
- package/dist/autopilot/cli/pause.d.ts +18 -0
- package/dist/autopilot/cli/pause.d.ts.map +1 -0
- package/dist/autopilot/cli/pause.js +110 -0
- package/dist/autopilot/cli/pause.js.map +1 -0
- package/dist/autopilot/cli/resume.d.ts +22 -0
- package/dist/autopilot/cli/resume.d.ts.map +1 -0
- package/dist/autopilot/cli/resume.js +172 -0
- package/dist/autopilot/cli/resume.js.map +1 -0
- package/dist/autopilot/cli/run.d.ts +25 -0
- package/dist/autopilot/cli/run.d.ts.map +1 -0
- package/dist/autopilot/cli/run.js +220 -0
- package/dist/autopilot/cli/run.js.map +1 -0
- package/dist/autopilot/cli/status.d.ts +20 -0
- package/dist/autopilot/cli/status.d.ts.map +1 -0
- package/dist/autopilot/cli/status.js +217 -0
- package/dist/autopilot/cli/status.js.map +1 -0
- package/dist/autopilot/config.d.ts +45 -0
- package/dist/autopilot/config.d.ts.map +1 -0
- package/dist/autopilot/config.js +269 -0
- package/dist/autopilot/config.js.map +1 -0
- package/dist/autopilot/core/dependency-resolver.d.ts +108 -0
- package/dist/autopilot/core/dependency-resolver.d.ts.map +1 -0
- package/dist/autopilot/core/dependency-resolver.js +394 -0
- package/dist/autopilot/core/dependency-resolver.js.map +1 -0
- package/dist/autopilot/core/dispatcher.d.ts +215 -0
- package/dist/autopilot/core/dispatcher.d.ts.map +1 -0
- package/dist/autopilot/core/dispatcher.js +594 -0
- package/dist/autopilot/core/dispatcher.js.map +1 -0
- package/dist/autopilot/core/failure-handler.d.ts +145 -0
- package/dist/autopilot/core/failure-handler.d.ts.map +1 -0
- package/dist/autopilot/core/failure-handler.js +308 -0
- package/dist/autopilot/core/failure-handler.js.map +1 -0
- package/dist/autopilot/core/rate-limit-handler.d.ts +108 -0
- package/dist/autopilot/core/rate-limit-handler.d.ts.map +1 -0
- package/dist/autopilot/core/rate-limit-handler.js +195 -0
- package/dist/autopilot/core/rate-limit-handler.js.map +1 -0
- package/dist/autopilot/core/state-manager.d.ts +160 -0
- package/dist/autopilot/core/state-manager.d.ts.map +1 -0
- package/dist/autopilot/core/state-manager.js +393 -0
- package/dist/autopilot/core/state-manager.js.map +1 -0
- package/dist/autopilot/core/timeout-manager.d.ts +95 -0
- package/dist/autopilot/core/timeout-manager.d.ts.map +1 -0
- package/dist/autopilot/core/timeout-manager.js +188 -0
- package/dist/autopilot/core/timeout-manager.js.map +1 -0
- package/dist/autopilot/git/branch-manager.d.ts +117 -0
- package/dist/autopilot/git/branch-manager.d.ts.map +1 -0
- package/dist/autopilot/git/branch-manager.js +238 -0
- package/dist/autopilot/git/branch-manager.js.map +1 -0
- package/dist/autopilot/git/index.d.ts +9 -0
- package/dist/autopilot/git/index.d.ts.map +1 -0
- package/dist/autopilot/git/index.js +9 -0
- package/dist/autopilot/git/index.js.map +1 -0
- package/dist/autopilot/git/merge-manager.d.ts +118 -0
- package/dist/autopilot/git/merge-manager.d.ts.map +1 -0
- package/dist/autopilot/git/merge-manager.js +304 -0
- package/dist/autopilot/git/merge-manager.js.map +1 -0
- package/dist/autopilot/git/worktree-manager.d.ts +128 -0
- package/dist/autopilot/git/worktree-manager.d.ts.map +1 -0
- package/dist/autopilot/git/worktree-manager.js +298 -0
- package/dist/autopilot/git/worktree-manager.js.map +1 -0
- package/dist/autopilot/index.d.ts +30 -0
- package/dist/autopilot/index.d.ts.map +1 -0
- package/dist/autopilot/index.js +55 -0
- package/dist/autopilot/index.js.map +1 -0
- package/dist/autopilot/sync/index.d.ts +7 -0
- package/dist/autopilot/sync/index.d.ts.map +1 -0
- package/dist/autopilot/sync/index.js +7 -0
- package/dist/autopilot/sync/index.js.map +1 -0
- package/dist/autopilot/sync/sync-manager.d.ts +168 -0
- package/dist/autopilot/sync/sync-manager.d.ts.map +1 -0
- package/dist/autopilot/sync/sync-manager.js +303 -0
- package/dist/autopilot/sync/sync-manager.js.map +1 -0
- package/dist/autopilot/types.d.ts +454 -0
- package/dist/autopilot/types.d.ts.map +1 -0
- package/dist/autopilot/types.js +26 -0
- package/dist/autopilot/types.js.map +1 -0
- package/dist/autopilot/utils/audit-logger.d.ts +176 -0
- package/dist/autopilot/utils/audit-logger.d.ts.map +1 -0
- package/dist/autopilot/utils/audit-logger.js +308 -0
- package/dist/autopilot/utils/audit-logger.js.map +1 -0
- package/dist/autopilot/utils/cost-tracker.d.ts +162 -0
- package/dist/autopilot/utils/cost-tracker.d.ts.map +1 -0
- package/dist/autopilot/utils/cost-tracker.js +269 -0
- package/dist/autopilot/utils/cost-tracker.js.map +1 -0
- package/dist/autopilot/utils/index.d.ts +9 -0
- package/dist/autopilot/utils/index.d.ts.map +1 -0
- package/dist/autopilot/utils/index.js +9 -0
- package/dist/autopilot/utils/index.js.map +1 -0
- package/dist/autopilot/utils/progress-reporter.d.ts +132 -0
- package/dist/autopilot/utils/progress-reporter.d.ts.map +1 -0
- package/dist/autopilot/utils/progress-reporter.js +290 -0
- package/dist/autopilot/utils/progress-reporter.js.map +1 -0
- package/dist/autopilot/worker/worker-pool.d.ts +179 -0
- package/dist/autopilot/worker/worker-pool.d.ts.map +1 -0
- package/dist/autopilot/worker/worker-pool.js +331 -0
- package/dist/autopilot/worker/worker-pool.js.map +1 -0
- package/dist/autopilot/worker/worker-session.d.ts +171 -0
- package/dist/autopilot/worker/worker-session.d.ts.map +1 -0
- package/dist/autopilot/worker/worker-session.js +295 -0
- package/dist/autopilot/worker/worker-session.js.map +1 -0
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +4 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/tools/core/epic.js +1 -1
- package/dist/tools/core/epic.js.map +1 -1
- package/dist/tools/core/lookup.d.ts.map +1 -1
- package/dist/tools/core/lookup.js +3 -2
- package/dist/tools/core/lookup.js.map +1 -1
- package/dist/tools/core/specification.js +1 -1
- package/dist/tools/core/specification.js.map +1 -1
- package/dist/tools/core/ticket.d.ts.map +1 -1
- package/dist/tools/core/ticket.js +4 -6
- package/dist/tools/core/ticket.js.map +1 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +60 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/validation/index.d.ts.map +1 -1
- package/dist/validation/index.js +4 -1
- package/dist/validation/index.js.map +1 -1
- package/package.json +8 -4
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Built-in Agent Profiles
|
|
3
|
+
*
|
|
4
|
+
* Default profiles for common development scenarios.
|
|
5
|
+
*/
|
|
6
|
+
import { BUILTIN_PROFILE_IDS } from './types.js';
|
|
7
|
+
/**
|
|
8
|
+
* Frontend React Profile
|
|
9
|
+
*
|
|
10
|
+
* Specialized for React/Next.js component development.
|
|
11
|
+
*/
|
|
12
|
+
export const frontendReactProfile = {
|
|
13
|
+
id: BUILTIN_PROFILE_IDS.FRONTEND_REACT,
|
|
14
|
+
name: 'Frontend React',
|
|
15
|
+
description: 'React/Next.js component and page development',
|
|
16
|
+
priority: 10,
|
|
17
|
+
fileMatchers: [
|
|
18
|
+
{
|
|
19
|
+
patterns: [
|
|
20
|
+
'**/*.tsx',
|
|
21
|
+
'**/*.jsx',
|
|
22
|
+
'**/components/**',
|
|
23
|
+
'**/pages/**',
|
|
24
|
+
'**/app/**/*.tsx',
|
|
25
|
+
'**/hooks/**',
|
|
26
|
+
'**/*.module.css',
|
|
27
|
+
'**/*.module.scss',
|
|
28
|
+
],
|
|
29
|
+
exclude: ['**/*.test.tsx', '**/*.spec.tsx', '**/__tests__/**'],
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
tagMatchers: {
|
|
33
|
+
anyOf: ['frontend', 'react', 'nextjs', 'component', 'ui', 'page'],
|
|
34
|
+
exclude: ['backend', 'api-only'],
|
|
35
|
+
},
|
|
36
|
+
systemPromptAdditions: `
|
|
37
|
+
You are implementing a React/Next.js frontend component or page.
|
|
38
|
+
|
|
39
|
+
Follow these React best practices:
|
|
40
|
+
- Use functional components with hooks
|
|
41
|
+
- Implement proper TypeScript types for props and state
|
|
42
|
+
- Use Material UI (MUI) components where appropriate
|
|
43
|
+
- Follow the existing component patterns in the codebase
|
|
44
|
+
- Ensure accessibility (ARIA attributes, keyboard navigation)
|
|
45
|
+
- Use React.memo() for performance-critical components
|
|
46
|
+
- Handle loading and error states appropriately
|
|
47
|
+
|
|
48
|
+
For styling:
|
|
49
|
+
- Use Tailwind CSS utility classes
|
|
50
|
+
- Follow the project's design system
|
|
51
|
+
- Ensure responsive design (mobile-first approach)
|
|
52
|
+
`,
|
|
53
|
+
validationCommands: [
|
|
54
|
+
{
|
|
55
|
+
name: 'Type Check',
|
|
56
|
+
command: 'npm run typecheck',
|
|
57
|
+
required: true,
|
|
58
|
+
timeoutMs: 60000,
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: 'Lint',
|
|
62
|
+
command: 'npm run lint',
|
|
63
|
+
required: true,
|
|
64
|
+
timeoutMs: 30000,
|
|
65
|
+
},
|
|
66
|
+
],
|
|
67
|
+
timeoutMs: 10 * 60 * 1000, // 10 minutes
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Backend Lambda Profile
|
|
71
|
+
*
|
|
72
|
+
* Specialized for AWS Lambda function development.
|
|
73
|
+
*/
|
|
74
|
+
export const backendLambdaProfile = {
|
|
75
|
+
id: BUILTIN_PROFILE_IDS.BACKEND_LAMBDA,
|
|
76
|
+
name: 'Backend Lambda',
|
|
77
|
+
description: 'AWS Lambda and Amplify backend functions',
|
|
78
|
+
priority: 10,
|
|
79
|
+
fileMatchers: [
|
|
80
|
+
{
|
|
81
|
+
patterns: [
|
|
82
|
+
'**/amplify/functions/**/*.ts',
|
|
83
|
+
'**/amplify/functions/**/*.js',
|
|
84
|
+
'**/lambda/**/*.ts',
|
|
85
|
+
'**/handlers/**/*.ts',
|
|
86
|
+
],
|
|
87
|
+
exclude: ['**/*.test.ts', '**/*.spec.ts'],
|
|
88
|
+
},
|
|
89
|
+
],
|
|
90
|
+
tagMatchers: {
|
|
91
|
+
anyOf: ['lambda', 'serverless', 'amplify-function', 'backend-function'],
|
|
92
|
+
},
|
|
93
|
+
systemPromptAdditions: `
|
|
94
|
+
You are implementing an AWS Lambda function for Amplify.
|
|
95
|
+
|
|
96
|
+
Follow these Lambda best practices:
|
|
97
|
+
- Keep handlers thin - business logic in separate modules
|
|
98
|
+
- Properly handle errors and return appropriate status codes
|
|
99
|
+
- Use structured logging (JSON format)
|
|
100
|
+
- Validate input early
|
|
101
|
+
- Be mindful of cold start optimization
|
|
102
|
+
- Use environment variables for configuration
|
|
103
|
+
- Follow the project's error handling patterns
|
|
104
|
+
|
|
105
|
+
For Amplify integration:
|
|
106
|
+
- Use the Amplify Data client for DynamoDB operations
|
|
107
|
+
- Follow the existing resolver patterns
|
|
108
|
+
- Handle authorization properly
|
|
109
|
+
`,
|
|
110
|
+
validationCommands: [
|
|
111
|
+
{
|
|
112
|
+
name: 'Type Check',
|
|
113
|
+
command: 'npm run typecheck',
|
|
114
|
+
required: true,
|
|
115
|
+
timeoutMs: 60000,
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
name: 'Test',
|
|
119
|
+
command: 'npm test',
|
|
120
|
+
required: false,
|
|
121
|
+
timeoutMs: 120000,
|
|
122
|
+
},
|
|
123
|
+
],
|
|
124
|
+
timeoutMs: 12 * 60 * 1000, // 12 minutes
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* Backend API Profile
|
|
128
|
+
*
|
|
129
|
+
* Specialized for API endpoint development.
|
|
130
|
+
*/
|
|
131
|
+
export const backendApiProfile = {
|
|
132
|
+
id: BUILTIN_PROFILE_IDS.BACKEND_API,
|
|
133
|
+
name: 'Backend API',
|
|
134
|
+
description: 'API routes and resolvers',
|
|
135
|
+
priority: 8,
|
|
136
|
+
fileMatchers: [
|
|
137
|
+
{
|
|
138
|
+
patterns: [
|
|
139
|
+
'**/api/**/*.ts',
|
|
140
|
+
'**/routes/**/*.ts',
|
|
141
|
+
'**/resolvers/**/*.ts',
|
|
142
|
+
'**/amplify/data/**/*.ts',
|
|
143
|
+
],
|
|
144
|
+
exclude: ['**/*.test.ts', '**/*.spec.ts'],
|
|
145
|
+
},
|
|
146
|
+
],
|
|
147
|
+
tagMatchers: {
|
|
148
|
+
anyOf: ['api', 'graphql', 'rest', 'resolver', 'endpoint'],
|
|
149
|
+
},
|
|
150
|
+
systemPromptAdditions: `
|
|
151
|
+
You are implementing an API endpoint or resolver.
|
|
152
|
+
|
|
153
|
+
Follow these API development best practices:
|
|
154
|
+
- Validate all inputs using proper schemas
|
|
155
|
+
- Return consistent response structures
|
|
156
|
+
- Handle errors gracefully with appropriate HTTP status codes
|
|
157
|
+
- Implement proper authorization checks
|
|
158
|
+
- Use TypeScript for type safety
|
|
159
|
+
- Document the API with JSDoc comments
|
|
160
|
+
- Follow RESTful conventions or GraphQL best practices
|
|
161
|
+
`,
|
|
162
|
+
validationCommands: [
|
|
163
|
+
{
|
|
164
|
+
name: 'Type Check',
|
|
165
|
+
command: 'npm run typecheck',
|
|
166
|
+
required: true,
|
|
167
|
+
timeoutMs: 60000,
|
|
168
|
+
},
|
|
169
|
+
],
|
|
170
|
+
timeoutMs: 10 * 60 * 1000, // 10 minutes
|
|
171
|
+
};
|
|
172
|
+
/**
|
|
173
|
+
* Database Profile
|
|
174
|
+
*
|
|
175
|
+
* Specialized for database schema and migration work.
|
|
176
|
+
*/
|
|
177
|
+
export const databaseProfile = {
|
|
178
|
+
id: BUILTIN_PROFILE_IDS.DATABASE,
|
|
179
|
+
name: 'Database',
|
|
180
|
+
description: 'Database schema, migrations, and data access',
|
|
181
|
+
priority: 8,
|
|
182
|
+
fileMatchers: [
|
|
183
|
+
{
|
|
184
|
+
patterns: [
|
|
185
|
+
'**/amplify/data/resource.ts',
|
|
186
|
+
'**/schema/**/*.ts',
|
|
187
|
+
'**/models/**/*.ts',
|
|
188
|
+
'**/migrations/**/*.ts',
|
|
189
|
+
'**/prisma/**',
|
|
190
|
+
],
|
|
191
|
+
},
|
|
192
|
+
],
|
|
193
|
+
tagMatchers: {
|
|
194
|
+
anyOf: ['database', 'schema', 'migration', 'data-model', 'dynamodb'],
|
|
195
|
+
},
|
|
196
|
+
systemPromptAdditions: `
|
|
197
|
+
You are implementing database schema or data access code.
|
|
198
|
+
|
|
199
|
+
Follow these database best practices:
|
|
200
|
+
- Design efficient schemas with proper indexing
|
|
201
|
+
- Consider query patterns when designing data models
|
|
202
|
+
- Use transactions where appropriate
|
|
203
|
+
- Handle data validation at the model level
|
|
204
|
+
- Follow the project's data access patterns
|
|
205
|
+
- Be mindful of DynamoDB single-table design if applicable
|
|
206
|
+
`,
|
|
207
|
+
validationCommands: [
|
|
208
|
+
{
|
|
209
|
+
name: 'Type Check',
|
|
210
|
+
command: 'npm run typecheck',
|
|
211
|
+
required: true,
|
|
212
|
+
timeoutMs: 60000,
|
|
213
|
+
},
|
|
214
|
+
],
|
|
215
|
+
timeoutMs: 8 * 60 * 1000, // 8 minutes
|
|
216
|
+
};
|
|
217
|
+
/**
|
|
218
|
+
* Testing Profile
|
|
219
|
+
*
|
|
220
|
+
* Specialized for writing tests.
|
|
221
|
+
*/
|
|
222
|
+
export const testingProfile = {
|
|
223
|
+
id: BUILTIN_PROFILE_IDS.TESTING,
|
|
224
|
+
name: 'Testing',
|
|
225
|
+
description: 'Unit tests, integration tests, and E2E tests',
|
|
226
|
+
priority: 10,
|
|
227
|
+
fileMatchers: [
|
|
228
|
+
{
|
|
229
|
+
patterns: [
|
|
230
|
+
'**/*.test.ts',
|
|
231
|
+
'**/*.test.tsx',
|
|
232
|
+
'**/*.spec.ts',
|
|
233
|
+
'**/*.spec.tsx',
|
|
234
|
+
'**/__tests__/**',
|
|
235
|
+
'**/test/**/*.ts',
|
|
236
|
+
'**/tests/**/*.ts',
|
|
237
|
+
],
|
|
238
|
+
},
|
|
239
|
+
],
|
|
240
|
+
tagMatchers: {
|
|
241
|
+
anyOf: ['test', 'testing', 'unit-test', 'integration-test', 'e2e'],
|
|
242
|
+
},
|
|
243
|
+
systemPromptAdditions: `
|
|
244
|
+
You are writing tests for the codebase.
|
|
245
|
+
|
|
246
|
+
Follow these testing best practices:
|
|
247
|
+
- Use the AAA pattern (Arrange, Act, Assert)
|
|
248
|
+
- Write descriptive test names that explain the behavior
|
|
249
|
+
- Test edge cases and error conditions
|
|
250
|
+
- Mock external dependencies appropriately
|
|
251
|
+
- Keep tests focused and independent
|
|
252
|
+
- Use proper TypeScript types for test data
|
|
253
|
+
- Follow the project's testing patterns and utilities
|
|
254
|
+
`,
|
|
255
|
+
validationCommands: [
|
|
256
|
+
{
|
|
257
|
+
name: 'Run Tests',
|
|
258
|
+
command: 'npm test',
|
|
259
|
+
required: true,
|
|
260
|
+
timeoutMs: 120000,
|
|
261
|
+
},
|
|
262
|
+
],
|
|
263
|
+
timeoutMs: 10 * 60 * 1000, // 10 minutes
|
|
264
|
+
};
|
|
265
|
+
/**
|
|
266
|
+
* General Profile
|
|
267
|
+
*
|
|
268
|
+
* Fallback profile for tickets that don't match specific profiles.
|
|
269
|
+
*/
|
|
270
|
+
export const generalProfile = {
|
|
271
|
+
id: BUILTIN_PROFILE_IDS.GENERAL,
|
|
272
|
+
name: 'General',
|
|
273
|
+
description: 'General purpose development',
|
|
274
|
+
priority: 0, // Lowest priority - fallback
|
|
275
|
+
fileMatchers: [
|
|
276
|
+
{
|
|
277
|
+
patterns: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
|
|
278
|
+
},
|
|
279
|
+
],
|
|
280
|
+
systemPromptAdditions: `
|
|
281
|
+
You are implementing a general development task.
|
|
282
|
+
|
|
283
|
+
Follow these best practices:
|
|
284
|
+
- Follow the existing code patterns in the codebase
|
|
285
|
+
- Use proper TypeScript types
|
|
286
|
+
- Write clean, readable code
|
|
287
|
+
- Add appropriate error handling
|
|
288
|
+
- Document complex logic with comments
|
|
289
|
+
`,
|
|
290
|
+
validationCommands: [
|
|
291
|
+
{
|
|
292
|
+
name: 'Type Check',
|
|
293
|
+
command: 'npm run typecheck',
|
|
294
|
+
required: true,
|
|
295
|
+
timeoutMs: 60000,
|
|
296
|
+
},
|
|
297
|
+
],
|
|
298
|
+
timeoutMs: 15 * 60 * 1000, // 15 minutes
|
|
299
|
+
};
|
|
300
|
+
/**
|
|
301
|
+
* All built-in profiles
|
|
302
|
+
*/
|
|
303
|
+
export const builtinProfiles = [
|
|
304
|
+
frontendReactProfile,
|
|
305
|
+
backendLambdaProfile,
|
|
306
|
+
backendApiProfile,
|
|
307
|
+
databaseProfile,
|
|
308
|
+
testingProfile,
|
|
309
|
+
generalProfile,
|
|
310
|
+
];
|
|
311
|
+
/**
|
|
312
|
+
* Get a built-in profile by ID
|
|
313
|
+
*/
|
|
314
|
+
export function getBuiltinProfile(id) {
|
|
315
|
+
return builtinProfiles.find(p => p.id === id);
|
|
316
|
+
}
|
|
317
|
+
/**
|
|
318
|
+
* Get all built-in profiles sorted by priority (highest first)
|
|
319
|
+
*/
|
|
320
|
+
export function getBuiltinProfilesByPriority() {
|
|
321
|
+
return [...builtinProfiles].sort((a, b) => (b.priority || 0) - (a.priority || 0));
|
|
322
|
+
}
|
|
323
|
+
//# sourceMappingURL=builtin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builtin.js","sourceRoot":"","sources":["../../../../src/autopilot/agents/profiles/builtin.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEjD;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAiB;IAChD,EAAE,EAAE,mBAAmB,CAAC,cAAc;IACtC,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,8CAA8C;IAC3D,QAAQ,EAAE,EAAE;IACZ,YAAY,EAAE;QACZ;YACE,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,CAAC,EAAE,6BAA6B;IAC1C,YAAY,EAAE;QACZ;YACE,QAAQ,EAAE,CAAC,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,CAAC;SACzD;KACF;IACD,qBAAqB,EAAE;;;;;;;;;CASxB;IACC,kBAAkB,EAAE;QAClB;YACE,IAAI,EAAE,YAAY;YAClB,OAAO,EAAE,mBAAmB;YAC5B,QAAQ,EAAE,IAAI;YACd,SAAS,EAAE,KAAK;SACjB;KACF;IACD,SAAS,EAAE,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,aAAa;CACzC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAmB;IAC7C,oBAAoB;IACpB,oBAAoB;IACpB,iBAAiB;IACjB,eAAe;IACf,cAAc;IACd,cAAc;CACf,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAAC,EAAU;IAC1C,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;AAChD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,4BAA4B;IAC1C,OAAO,CAAC,GAAG,eAAe,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,CAAC,CAAC;AACpF,CAAC"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent Profile Types
|
|
3
|
+
*
|
|
4
|
+
* Type definitions for agent profiles.
|
|
5
|
+
*/
|
|
6
|
+
import type { Ticket, Epic, Specification } from '../../../types/index.js';
|
|
7
|
+
/**
|
|
8
|
+
* File pattern matcher for profile selection
|
|
9
|
+
*/
|
|
10
|
+
export interface ProfileFileMatcher {
|
|
11
|
+
/** Glob patterns to match against technical details files */
|
|
12
|
+
patterns: string[];
|
|
13
|
+
/** Patterns to exclude */
|
|
14
|
+
exclude?: string[];
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Tag matcher for profile selection
|
|
18
|
+
*/
|
|
19
|
+
export interface ProfileTagMatcher {
|
|
20
|
+
/** Tags that must be present (AND) */
|
|
21
|
+
required?: string[];
|
|
22
|
+
/** Tags where any match triggers selection (OR) */
|
|
23
|
+
anyOf?: string[];
|
|
24
|
+
/** Tags that exclude this profile */
|
|
25
|
+
exclude?: string[];
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Validation command configuration
|
|
29
|
+
*/
|
|
30
|
+
export interface ValidationCommand {
|
|
31
|
+
/** Command name for display */
|
|
32
|
+
name: string;
|
|
33
|
+
/** The command to run */
|
|
34
|
+
command: string;
|
|
35
|
+
/** Whether the command must pass for success */
|
|
36
|
+
required: boolean;
|
|
37
|
+
/** Timeout in ms */
|
|
38
|
+
timeoutMs?: number;
|
|
39
|
+
/** Working directory (relative to worktree) */
|
|
40
|
+
cwd?: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Agent profile for specialized implementations
|
|
44
|
+
*/
|
|
45
|
+
export interface AgentProfile {
|
|
46
|
+
/** Unique profile ID */
|
|
47
|
+
id: string;
|
|
48
|
+
/** Display name */
|
|
49
|
+
name: string;
|
|
50
|
+
/** Description */
|
|
51
|
+
description: string;
|
|
52
|
+
/** File patterns this profile handles */
|
|
53
|
+
fileMatchers: ProfileFileMatcher[];
|
|
54
|
+
/** Tag matchers for selection */
|
|
55
|
+
tagMatchers?: ProfileTagMatcher;
|
|
56
|
+
/** Model to use (if different from default) */
|
|
57
|
+
model?: string;
|
|
58
|
+
/** Additional system prompt content */
|
|
59
|
+
systemPromptAdditions?: string;
|
|
60
|
+
/** Validation commands to run after implementation */
|
|
61
|
+
validationCommands?: ValidationCommand[];
|
|
62
|
+
/** Maximum timeout for this profile (ms) */
|
|
63
|
+
timeoutMs?: number;
|
|
64
|
+
/** Profile priority (higher = more specific) */
|
|
65
|
+
priority?: number;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Profile match result
|
|
69
|
+
*/
|
|
70
|
+
export interface ProfileMatch {
|
|
71
|
+
profile: AgentProfile;
|
|
72
|
+
score: number;
|
|
73
|
+
matchedPatterns: string[];
|
|
74
|
+
matchedTags: string[];
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Context for profile matching
|
|
78
|
+
*/
|
|
79
|
+
export interface ProfileMatchContext {
|
|
80
|
+
ticket: Ticket;
|
|
81
|
+
epic: Epic;
|
|
82
|
+
specification: Specification;
|
|
83
|
+
/** Files that will be affected (from technical details) */
|
|
84
|
+
affectedFiles: string[];
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Built-in profile IDs
|
|
88
|
+
*/
|
|
89
|
+
export declare const BUILTIN_PROFILE_IDS: {
|
|
90
|
+
readonly FRONTEND_REACT: "frontend-react";
|
|
91
|
+
readonly BACKEND_LAMBDA: "backend-lambda";
|
|
92
|
+
readonly BACKEND_API: "backend-api";
|
|
93
|
+
readonly DATABASE: "database";
|
|
94
|
+
readonly TESTING: "testing";
|
|
95
|
+
readonly GENERAL: "general";
|
|
96
|
+
};
|
|
97
|
+
export type BuiltinProfileId = typeof BUILTIN_PROFILE_IDS[keyof typeof BUILTIN_PROFILE_IDS];
|
|
98
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/autopilot/agents/profiles/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE3E;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,6DAA6D;IAC7D,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,0BAA0B;IAC1B,OAAO,CAAC,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E,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,IAAI,CAAC;IACX,aAAa,EAAE,aAAa,CAAC;IAC7B,2DAA2D;IAC3D,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB;AAED;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;CAOtB,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,OAAO,mBAAmB,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent Profile Types
|
|
3
|
+
*
|
|
4
|
+
* Type definitions for agent profiles.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Built-in profile IDs
|
|
8
|
+
*/
|
|
9
|
+
export const BUILTIN_PROFILE_IDS = {
|
|
10
|
+
FRONTEND_REACT: 'frontend-react',
|
|
11
|
+
BACKEND_LAMBDA: 'backend-lambda',
|
|
12
|
+
BACKEND_API: 'backend-api',
|
|
13
|
+
DATABASE: 'database',
|
|
14
|
+
TESTING: 'testing',
|
|
15
|
+
GENERAL: 'general',
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/autopilot/agents/profiles/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAyFH;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,cAAc,EAAE,gBAAgB;IAChC,cAAc,EAAE,gBAAgB;IAChC,WAAW,EAAE,aAAa;IAC1B,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;CACV,CAAC"}
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Autopilot API Client
|
|
3
|
+
*
|
|
4
|
+
* Extended API client for autopilot-specific operations.
|
|
5
|
+
*/
|
|
6
|
+
import type { McpConfig } from '../../config/index.js';
|
|
7
|
+
import type { Ticket, Epic, Specification, TicketStatus, ImplementationContext } from '../../types/index.js';
|
|
8
|
+
import type { TicketContext, ParsedDiscovery, DiscoveryType, DiscoverySeverity } from '../types.js';
|
|
9
|
+
/**
|
|
10
|
+
* Extended ticket completion options for autopilot
|
|
11
|
+
*/
|
|
12
|
+
export interface ExtendedCompletionOptions {
|
|
13
|
+
actualHours?: number;
|
|
14
|
+
testsPassed?: boolean;
|
|
15
|
+
filesCreated?: string[];
|
|
16
|
+
filesModified?: string[];
|
|
17
|
+
filesDeleted?: string[];
|
|
18
|
+
tokensUsed?: {
|
|
19
|
+
inputTokens: number;
|
|
20
|
+
outputTokens: number;
|
|
21
|
+
};
|
|
22
|
+
costUsd?: number;
|
|
23
|
+
durationMs?: number;
|
|
24
|
+
commitSha?: string;
|
|
25
|
+
modelUsed?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Autopilot run state for sync
|
|
29
|
+
*/
|
|
30
|
+
export interface AutopilotRunState {
|
|
31
|
+
runId: string;
|
|
32
|
+
specificationId: string;
|
|
33
|
+
projectId: string;
|
|
34
|
+
status: string;
|
|
35
|
+
totalTickets?: number;
|
|
36
|
+
completedTickets: Array<{
|
|
37
|
+
ticketId: string;
|
|
38
|
+
title?: string;
|
|
39
|
+
}>;
|
|
40
|
+
failedTickets: Array<{
|
|
41
|
+
ticketId: string;
|
|
42
|
+
reason?: string;
|
|
43
|
+
}>;
|
|
44
|
+
skippedTickets: Array<{
|
|
45
|
+
ticketId: string;
|
|
46
|
+
reason?: string;
|
|
47
|
+
}>;
|
|
48
|
+
currentEpicId?: string;
|
|
49
|
+
currentTicketId?: string;
|
|
50
|
+
workerCount?: number;
|
|
51
|
+
activeWorkers?: number;
|
|
52
|
+
totalCostUsd: number;
|
|
53
|
+
totalInputTokens?: number;
|
|
54
|
+
totalOutputTokens?: number;
|
|
55
|
+
pausedAt?: string;
|
|
56
|
+
pauseReason?: string;
|
|
57
|
+
lastError?: string;
|
|
58
|
+
errorCount?: number;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Extended API client for autopilot operations
|
|
62
|
+
*/
|
|
63
|
+
export declare class AutopilotApiClient {
|
|
64
|
+
private client;
|
|
65
|
+
constructor(config: McpConfig);
|
|
66
|
+
/**
|
|
67
|
+
* Get specification by ID
|
|
68
|
+
*/
|
|
69
|
+
getSpecification(specificationId: string): Promise<Specification | null>;
|
|
70
|
+
/**
|
|
71
|
+
* Get all epics for a specification
|
|
72
|
+
*/
|
|
73
|
+
getEpics(specificationId: string): Promise<Epic[]>;
|
|
74
|
+
/**
|
|
75
|
+
* Get all tickets for an epic
|
|
76
|
+
*/
|
|
77
|
+
getTickets(epicId: string): Promise<Ticket[]>;
|
|
78
|
+
/**
|
|
79
|
+
* Get ticket by ID
|
|
80
|
+
*/
|
|
81
|
+
getTicket(ticketId: string): Promise<Ticket | null>;
|
|
82
|
+
/**
|
|
83
|
+
* Get ticket dependencies
|
|
84
|
+
*/
|
|
85
|
+
getTicketDependencies(ticketId: string): Promise<{
|
|
86
|
+
blockedBy: Array<{
|
|
87
|
+
id: string;
|
|
88
|
+
title: string;
|
|
89
|
+
status: TicketStatus;
|
|
90
|
+
}>;
|
|
91
|
+
blocks: Array<{
|
|
92
|
+
id: string;
|
|
93
|
+
title: string;
|
|
94
|
+
status: TicketStatus;
|
|
95
|
+
}>;
|
|
96
|
+
}>;
|
|
97
|
+
/**
|
|
98
|
+
* Get full implementation context for a ticket
|
|
99
|
+
*/
|
|
100
|
+
getImplementationContext(ticketId: string): Promise<ImplementationContext | null>;
|
|
101
|
+
/**
|
|
102
|
+
* Get ticket context for implementation
|
|
103
|
+
*/
|
|
104
|
+
getTicketContext(ticketId: string): Promise<TicketContext | null>;
|
|
105
|
+
/**
|
|
106
|
+
* Update ticket status
|
|
107
|
+
*/
|
|
108
|
+
updateTicketStatus(ticketId: string, status: TicketStatus, options?: {
|
|
109
|
+
progress?: number;
|
|
110
|
+
blockReason?: string;
|
|
111
|
+
}): Promise<Ticket | null>;
|
|
112
|
+
/**
|
|
113
|
+
* Mark ticket as completed with extended autopilot data
|
|
114
|
+
*/
|
|
115
|
+
completeTicket(ticketId: string, options?: ExtendedCompletionOptions): Promise<Ticket | null>;
|
|
116
|
+
/**
|
|
117
|
+
* Mark ticket as failed/blocked
|
|
118
|
+
*/
|
|
119
|
+
failTicket(ticketId: string, reason: string): Promise<Ticket | null>;
|
|
120
|
+
/**
|
|
121
|
+
* Start working on a ticket (set to in_progress)
|
|
122
|
+
*/
|
|
123
|
+
startTicket(ticketId: string): Promise<Ticket | null>;
|
|
124
|
+
/**
|
|
125
|
+
* Record test results for a ticket
|
|
126
|
+
*/
|
|
127
|
+
recordTestResults(ticketId: string, results: {
|
|
128
|
+
testType: string;
|
|
129
|
+
passed: boolean;
|
|
130
|
+
totalTests: number;
|
|
131
|
+
passedTests: number;
|
|
132
|
+
failedTests: number;
|
|
133
|
+
errorDetails?: string;
|
|
134
|
+
durationMs?: number;
|
|
135
|
+
}): Promise<void>;
|
|
136
|
+
/**
|
|
137
|
+
* Link a commit to a ticket
|
|
138
|
+
*/
|
|
139
|
+
linkCommit(ticketId: string, commit: {
|
|
140
|
+
sha: string;
|
|
141
|
+
url: string;
|
|
142
|
+
title: string;
|
|
143
|
+
}): Promise<void>;
|
|
144
|
+
/**
|
|
145
|
+
* Get all tickets for a specification (across all epics)
|
|
146
|
+
*/
|
|
147
|
+
getAllTicketsForSpec(specificationId: string): Promise<Ticket[]>;
|
|
148
|
+
/**
|
|
149
|
+
* Get ready tickets (dependencies satisfied)
|
|
150
|
+
*/
|
|
151
|
+
getReadyTickets(specificationId: string): Promise<Ticket[]>;
|
|
152
|
+
/**
|
|
153
|
+
* Sync autopilot state to API (for tracking and webapp monitoring)
|
|
154
|
+
*/
|
|
155
|
+
syncAutopilotState(state: AutopilotRunState): Promise<void>;
|
|
156
|
+
/**
|
|
157
|
+
* Create a new autopilot run
|
|
158
|
+
*/
|
|
159
|
+
createAutopilotRun(options: {
|
|
160
|
+
runId: string;
|
|
161
|
+
specificationId: string;
|
|
162
|
+
projectId: string;
|
|
163
|
+
config?: Record<string, unknown>;
|
|
164
|
+
workerCount?: number;
|
|
165
|
+
totalTickets?: number;
|
|
166
|
+
}): Promise<{
|
|
167
|
+
runId: string;
|
|
168
|
+
} | null>;
|
|
169
|
+
/**
|
|
170
|
+
* Complete an autopilot run
|
|
171
|
+
*/
|
|
172
|
+
completeAutopilotRun(options: {
|
|
173
|
+
runId: string;
|
|
174
|
+
status: 'completed' | 'failed' | 'aborted';
|
|
175
|
+
durationMs: number;
|
|
176
|
+
lastError?: string;
|
|
177
|
+
}): Promise<void>;
|
|
178
|
+
/**
|
|
179
|
+
* Create a discovery from parsed AI output
|
|
180
|
+
*/
|
|
181
|
+
createDiscovery(discovery: {
|
|
182
|
+
ticketId: string;
|
|
183
|
+
specificationId: string;
|
|
184
|
+
type: DiscoveryType;
|
|
185
|
+
severity: DiscoverySeverity;
|
|
186
|
+
title: string;
|
|
187
|
+
description: string;
|
|
188
|
+
}): Promise<{
|
|
189
|
+
id: string;
|
|
190
|
+
} | null>;
|
|
191
|
+
/**
|
|
192
|
+
* Create multiple discoveries from parsed AI output
|
|
193
|
+
*/
|
|
194
|
+
createDiscoveries(ticketId: string, specificationId: string, discoveries: ParsedDiscovery[]): Promise<{
|
|
195
|
+
created: number;
|
|
196
|
+
failed: number;
|
|
197
|
+
}>;
|
|
198
|
+
/**
|
|
199
|
+
* Validate API key
|
|
200
|
+
*/
|
|
201
|
+
validateApiKey(): Promise<boolean>;
|
|
202
|
+
/**
|
|
203
|
+
* Create client from McpConfig
|
|
204
|
+
*/
|
|
205
|
+
static create(config: McpConfig): AutopilotApiClient;
|
|
206
|
+
/**
|
|
207
|
+
* Create from API key
|
|
208
|
+
*/
|
|
209
|
+
static fromApiKey(apiKey: string, options?: {
|
|
210
|
+
apiUrl?: string;
|
|
211
|
+
}): AutopilotApiClient;
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Create an autopilot API client from config
|
|
215
|
+
*/
|
|
216
|
+
export declare function createAutopilotApiClient(config: McpConfig): AutopilotApiClient;
|
|
217
|
+
//# sourceMappingURL=autopilot-api-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autopilot-api-client.d.ts","sourceRoot":"","sources":["../../../src/autopilot/api/autopilot-api-client.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,EACV,MAAM,EACN,IAAI,EACJ,aAAa,EACb,YAAY,EACZ,qBAAqB,EAEtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACV,aAAa,EACb,eAAe,EACf,aAAa,EACb,iBAAiB,EAClB,MAAM,aAAa,CAAC;AAErB;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,UAAU,CAAC,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE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