@gracefultools/astrid-sdk 0.7.16 → 0.8.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 +127 -341
- package/dist/channel/channel.d.ts +33 -0
- package/dist/channel/channel.d.ts.map +1 -0
- package/dist/channel/channel.js +90 -0
- package/dist/channel/channel.js.map +1 -0
- package/dist/channel/index.d.ts +13 -0
- package/dist/channel/index.d.ts.map +1 -0
- package/dist/channel/index.js +23 -0
- package/dist/channel/index.js.map +1 -0
- package/dist/channel/message-formatter.d.ts +14 -0
- package/dist/channel/message-formatter.d.ts.map +1 -0
- package/dist/channel/message-formatter.js +71 -0
- package/dist/channel/message-formatter.js.map +1 -0
- package/dist/channel/oauth-client.d.ts +15 -0
- package/dist/channel/oauth-client.d.ts.map +1 -0
- package/dist/channel/oauth-client.js +45 -0
- package/dist/channel/oauth-client.js.map +1 -0
- package/dist/channel/rest-client.d.ts +16 -0
- package/dist/channel/rest-client.d.ts.map +1 -0
- package/dist/channel/rest-client.js +66 -0
- package/dist/channel/rest-client.js.map +1 -0
- package/dist/channel/session-mapper.d.ts +14 -0
- package/dist/channel/session-mapper.d.ts.map +1 -0
- package/dist/channel/session-mapper.js +37 -0
- package/dist/channel/session-mapper.js.map +1 -0
- package/dist/channel/sse-client.d.ts +31 -0
- package/dist/channel/sse-client.d.ts.map +1 -0
- package/dist/channel/sse-client.js +171 -0
- package/dist/channel/sse-client.js.map +1 -0
- package/dist/channel/types.d.ts +65 -0
- package/dist/channel/types.d.ts.map +1 -0
- package/dist/channel/types.js +3 -0
- package/dist/channel/types.js.map +1 -0
- package/dist/config/agent-workflow.js +7 -7
- package/dist/index.d.ts +1 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16 -30
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/agent-config.d.ts.map +1 -1
- package/dist/utils/agent-config.js +14 -0
- package/dist/utils/agent-config.js.map +1 -1
- package/openclaw.plugin.json +25 -0
- package/package.json +66 -77
- package/templates/.astrid.config.json +60 -60
- package/templates/ASTRID.template.md +74 -74
- package/dist/bin/cli.d.ts +0 -14
- package/dist/bin/cli.d.ts.map +0 -1
- package/dist/bin/cli.js +0 -1610
- package/dist/bin/cli.js.map +0 -1
- package/dist/executors/claude.d.ts +0 -65
- package/dist/executors/claude.d.ts.map +0 -1
- package/dist/executors/claude.js +0 -838
- package/dist/executors/claude.js.map +0 -1
- package/dist/executors/gemini.d.ts +0 -23
- package/dist/executors/gemini.d.ts.map +0 -1
- package/dist/executors/gemini.js +0 -558
- package/dist/executors/gemini.js.map +0 -1
- package/dist/executors/openai.d.ts +0 -17
- package/dist/executors/openai.d.ts.map +0 -1
- package/dist/executors/openai.js +0 -614
- package/dist/executors/openai.js.map +0 -1
- package/dist/executors/shared/index.d.ts +0 -9
- package/dist/executors/shared/index.d.ts.map +0 -1
- package/dist/executors/shared/index.js +0 -21
- package/dist/executors/shared/index.js.map +0 -1
- package/dist/executors/shared/tool-executor.d.ts +0 -52
- package/dist/executors/shared/tool-executor.d.ts.map +0 -1
- package/dist/executors/shared/tool-executor.js +0 -262
- package/dist/executors/shared/tool-executor.js.map +0 -1
- package/dist/executors/shared/tool-schemas.d.ts +0 -61
- package/dist/executors/shared/tool-schemas.d.ts.map +0 -1
- package/dist/executors/shared/tool-schemas.js +0 -135
- package/dist/executors/shared/tool-schemas.js.map +0 -1
- package/dist/executors/terminal-base.d.ts +0 -207
- package/dist/executors/terminal-base.d.ts.map +0 -1
- package/dist/executors/terminal-base.js +0 -552
- package/dist/executors/terminal-base.js.map +0 -1
- package/dist/executors/terminal-claude.d.ts +0 -116
- package/dist/executors/terminal-claude.d.ts.map +0 -1
- package/dist/executors/terminal-claude.js +0 -700
- package/dist/executors/terminal-claude.js.map +0 -1
- package/dist/executors/terminal-executors.test.d.ts +0 -8
- package/dist/executors/terminal-executors.test.d.ts.map +0 -1
- package/dist/executors/terminal-executors.test.js +0 -469
- package/dist/executors/terminal-executors.test.js.map +0 -1
- package/dist/executors/terminal-gemini.d.ts +0 -50
- package/dist/executors/terminal-gemini.d.ts.map +0 -1
- package/dist/executors/terminal-gemini.js +0 -401
- package/dist/executors/terminal-gemini.js.map +0 -1
- package/dist/executors/terminal-openai.d.ts +0 -50
- package/dist/executors/terminal-openai.d.ts.map +0 -1
- package/dist/executors/terminal-openai.js +0 -405
- package/dist/executors/terminal-openai.js.map +0 -1
- package/dist/server/astrid-client.d.ts +0 -77
- package/dist/server/astrid-client.d.ts.map +0 -1
- package/dist/server/astrid-client.js +0 -125
- package/dist/server/astrid-client.js.map +0 -1
- package/dist/server/index.d.ts +0 -38
- package/dist/server/index.d.ts.map +0 -1
- package/dist/server/index.js +0 -408
- package/dist/server/index.js.map +0 -1
- package/dist/server/repo-manager.d.ts +0 -41
- package/dist/server/repo-manager.d.ts.map +0 -1
- package/dist/server/repo-manager.js +0 -177
- package/dist/server/repo-manager.js.map +0 -1
- package/dist/server/session-manager.d.ts +0 -93
- package/dist/server/session-manager.d.ts.map +0 -1
- package/dist/server/session-manager.js +0 -217
- package/dist/server/session-manager.js.map +0 -1
- package/dist/server/webhook-signature.d.ts +0 -23
- package/dist/server/webhook-signature.d.ts.map +0 -1
- package/dist/server/webhook-signature.js +0 -74
- package/dist/server/webhook-signature.js.map +0 -1
|
@@ -1,552 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Terminal Executor Base Interface
|
|
4
|
-
*
|
|
5
|
-
* Common interface for all terminal executors (Claude, OpenAI, Gemini).
|
|
6
|
-
* Terminal mode executes tasks using local tools instead of remote APIs.
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.extractPrUrl = extractPrUrl;
|
|
10
|
-
exports.formatCommentHistory = formatCommentHistory;
|
|
11
|
-
exports.captureGitBaseline = captureGitBaseline;
|
|
12
|
-
exports.captureGitChanges = captureGitChanges;
|
|
13
|
-
exports.buildDefaultPrompt = buildDefaultPrompt;
|
|
14
|
-
exports.createParserState = createParserState;
|
|
15
|
-
exports.parseOutputChunk = parseOutputChunk;
|
|
16
|
-
exports.formatContentAsComment = formatContentAsComment;
|
|
17
|
-
exports.getWorktreeConfig = getWorktreeConfig;
|
|
18
|
-
exports.createWorktree = createWorktree;
|
|
19
|
-
exports.shouldUseWorktree = shouldUseWorktree;
|
|
20
|
-
exports.pushWorktreeChanges = pushWorktreeChanges;
|
|
21
|
-
// ============================================================================
|
|
22
|
-
// HELPER FUNCTIONS
|
|
23
|
-
// ============================================================================
|
|
24
|
-
/**
|
|
25
|
-
* Extract PR URL from output text
|
|
26
|
-
*/
|
|
27
|
-
function extractPrUrl(output) {
|
|
28
|
-
const prUrlPatterns = [
|
|
29
|
-
/https:\/\/github\.com\/[^\/]+\/[^\/]+\/pull\/\d+/g,
|
|
30
|
-
/PR URL:\s*(https:\/\/[^\s]+)/i,
|
|
31
|
-
/Pull Request:\s*(https:\/\/[^\s]+)/i
|
|
32
|
-
];
|
|
33
|
-
for (const pattern of prUrlPatterns) {
|
|
34
|
-
const match = output.match(pattern);
|
|
35
|
-
if (match) {
|
|
36
|
-
return match[0].replace(/PR URL:\s*/i, '').replace(/Pull Request:\s*/i, '');
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
return undefined;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Format comment history for context
|
|
43
|
-
*/
|
|
44
|
-
function formatCommentHistory(comments) {
|
|
45
|
-
if (!comments || comments.length === 0)
|
|
46
|
-
return '';
|
|
47
|
-
const formatted = comments
|
|
48
|
-
.slice(-10)
|
|
49
|
-
.map(c => `**${c.authorName}** (${new Date(c.createdAt).toLocaleString()}):\n${c.content}`)
|
|
50
|
-
.join('\n\n---\n\n');
|
|
51
|
-
return `\n\n## Previous Discussion\n\n${formatted}`;
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Capture current git status (untracked and modified files)
|
|
55
|
-
* Call this BEFORE task execution to get baseline
|
|
56
|
-
*/
|
|
57
|
-
async function captureGitBaseline(projectPath) {
|
|
58
|
-
const { execSync } = await import('child_process');
|
|
59
|
-
try {
|
|
60
|
-
const statusOutput = execSync('git status --porcelain', {
|
|
61
|
-
cwd: projectPath,
|
|
62
|
-
encoding: 'utf-8',
|
|
63
|
-
timeout: 10000
|
|
64
|
-
});
|
|
65
|
-
const files = new Set(statusOutput
|
|
66
|
-
.split('\n')
|
|
67
|
-
.filter(line => line.trim())
|
|
68
|
-
.map(line => line.slice(3).trim()));
|
|
69
|
-
console.log(`📊 Git baseline: ${files.size} pre-existing uncommitted files`);
|
|
70
|
-
return files;
|
|
71
|
-
}
|
|
72
|
-
catch {
|
|
73
|
-
return new Set();
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Capture git changes in a repository
|
|
78
|
-
* If baseline is provided, only returns NEW changes (not pre-existing)
|
|
79
|
-
*/
|
|
80
|
-
async function captureGitChanges(projectPath, baseline) {
|
|
81
|
-
const { execSync } = await import('child_process');
|
|
82
|
-
try {
|
|
83
|
-
// Get modified files (staged and unstaged)
|
|
84
|
-
const statusOutput = execSync('git status --porcelain', {
|
|
85
|
-
cwd: projectPath,
|
|
86
|
-
encoding: 'utf-8',
|
|
87
|
-
timeout: 10000
|
|
88
|
-
});
|
|
89
|
-
let files = statusOutput
|
|
90
|
-
.split('\n')
|
|
91
|
-
.filter(line => line.trim())
|
|
92
|
-
.map(line => line.slice(3).trim()); // Remove status prefix
|
|
93
|
-
// If baseline provided, filter out pre-existing files
|
|
94
|
-
if (baseline && baseline.size > 0) {
|
|
95
|
-
const originalCount = files.length;
|
|
96
|
-
files = files.filter(f => !baseline.has(f));
|
|
97
|
-
if (originalCount !== files.length) {
|
|
98
|
-
console.log(`📊 Filtered out ${originalCount - files.length} pre-existing files`);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
// Get diff (staged and unstaged, limited to 5000 chars)
|
|
102
|
-
let diff = '';
|
|
103
|
-
try {
|
|
104
|
-
diff = execSync('git diff HEAD --no-color', {
|
|
105
|
-
cwd: projectPath,
|
|
106
|
-
encoding: 'utf-8',
|
|
107
|
-
timeout: 10000,
|
|
108
|
-
maxBuffer: 1024 * 1024 // 1MB max
|
|
109
|
-
});
|
|
110
|
-
// Truncate if too long
|
|
111
|
-
if (diff.length > 5000) {
|
|
112
|
-
diff = diff.slice(0, 5000) + '\n\n[... diff truncated ...]';
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
catch {
|
|
116
|
-
// No diff or not a git repo
|
|
117
|
-
}
|
|
118
|
-
console.log(`📊 Git changes: ${files.length} files modified by task`);
|
|
119
|
-
return { diff, files };
|
|
120
|
-
}
|
|
121
|
-
catch {
|
|
122
|
-
return { diff: '', files: [] };
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
/**
|
|
126
|
-
* Build default prompt for a task
|
|
127
|
-
*/
|
|
128
|
-
function buildDefaultPrompt(session, context) {
|
|
129
|
-
const commentHistory = formatCommentHistory(context?.comments);
|
|
130
|
-
return `# Task: ${session.title}
|
|
131
|
-
|
|
132
|
-
${session.description || ''}
|
|
133
|
-
${commentHistory}
|
|
134
|
-
|
|
135
|
-
## Workflow Requirements
|
|
136
|
-
|
|
137
|
-
1. Understand the task and verify the platform (iOS = ios-app/, Web = components/, app/)
|
|
138
|
-
2. Locate relevant code and make ONLY the requested changes
|
|
139
|
-
3. Run predeploy tests: \`npm run predeploy\`
|
|
140
|
-
4. Create PR: \`gh pr create\` with a clear title
|
|
141
|
-
|
|
142
|
-
## Output Requirements
|
|
143
|
-
|
|
144
|
-
Your response MUST include:
|
|
145
|
-
1. Task understanding: What was requested
|
|
146
|
-
2. Actual changes made: What you changed and WHY
|
|
147
|
-
3. Files modified: List each file path
|
|
148
|
-
4. Test results: Output from \`npm run predeploy\`
|
|
149
|
-
5. PR URL: The pull request URL (REQUIRED)
|
|
150
|
-
|
|
151
|
-
Begin by analyzing the task.`;
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* Create a new parser state
|
|
155
|
-
*/
|
|
156
|
-
function createParserState() {
|
|
157
|
-
return {
|
|
158
|
-
buffer: '',
|
|
159
|
-
lastPlanPosted: 0,
|
|
160
|
-
lastProgressPosted: 0,
|
|
161
|
-
lastQuestionPosted: 0,
|
|
162
|
-
postedPlans: new Set(),
|
|
163
|
-
postedQuestions: new Set(),
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
/**
|
|
167
|
-
* Patterns for detecting different types of content
|
|
168
|
-
*/
|
|
169
|
-
const PLAN_PATTERNS = [
|
|
170
|
-
// Plan mode headers
|
|
171
|
-
/^#+\s*(?:Implementation\s+)?Plan\b/mi,
|
|
172
|
-
/^#+\s*Approach\b/mi,
|
|
173
|
-
/^\*\*(?:Implementation\s+)?Plan\*\*/mi,
|
|
174
|
-
// Numbered plan steps
|
|
175
|
-
/^(?:##\s+)?(?:Step\s+)?\d+\.\s+(?:First|Create|Modify|Update|Add|Remove|Fix|Implement)/mi,
|
|
176
|
-
// Plan summary patterns
|
|
177
|
-
/(?:Here(?:'s| is) (?:my|the) (?:implementation )?plan|I(?:'ll| will) (?:start|begin) by|Let me (?:outline|plan|describe) (?:my|the) approach)/i,
|
|
178
|
-
];
|
|
179
|
-
const QUESTION_PATTERNS = [
|
|
180
|
-
// Direct questions to user
|
|
181
|
-
/(?:Do you want|Would you like|Should I|Can I|May I)\s+.+\?/i,
|
|
182
|
-
/(?:Please (?:confirm|clarify|specify|let me know))/i,
|
|
183
|
-
/(?:Before I (?:proceed|continue|start)|I need (?:to know|clarification|more information))/i,
|
|
184
|
-
// Options presented
|
|
185
|
-
/(?:Option\s+[1-3A-C]:|Which (?:approach|option|method) (?:do you prefer|should I use)\?)/i,
|
|
186
|
-
];
|
|
187
|
-
const PROGRESS_PATTERNS = [
|
|
188
|
-
// File operations
|
|
189
|
-
/(?:Creating|Modifying|Updating|Deleting|Reading|Writing)\s+(?:file\s+)?[`']?[\w\/.]+[`']?/i,
|
|
190
|
-
// Git operations
|
|
191
|
-
/(?:Committing|Pushing|Creating branch|Creating PR|Merging)/i,
|
|
192
|
-
// Test/build operations
|
|
193
|
-
/(?:Running|Executing)\s+(?:tests|build|lint|predeploy)/i,
|
|
194
|
-
];
|
|
195
|
-
const PR_CREATED_PATTERN = /(?:PR|Pull Request)\s+(?:created|opened).*?(https:\/\/github\.com\/[^\s]+\/pull\/\d+)/i;
|
|
196
|
-
/**
|
|
197
|
-
* Parse a chunk of output and detect any plans, questions, or progress updates.
|
|
198
|
-
* Uses the state to track what's been posted to avoid duplicates.
|
|
199
|
-
*
|
|
200
|
-
* @param chunk - New output chunk to parse
|
|
201
|
-
* @param state - Parser state for tracking
|
|
202
|
-
* @returns Array of detected content items
|
|
203
|
-
*/
|
|
204
|
-
function parseOutputChunk(chunk, state) {
|
|
205
|
-
const results = [];
|
|
206
|
-
// Add chunk to buffer
|
|
207
|
-
state.buffer += chunk;
|
|
208
|
-
// Process complete paragraphs/sections (split by double newline)
|
|
209
|
-
const sections = state.buffer.split(/\n\n+/);
|
|
210
|
-
// Keep the last incomplete section in buffer
|
|
211
|
-
if (!state.buffer.endsWith('\n\n')) {
|
|
212
|
-
state.buffer = sections.pop() || '';
|
|
213
|
-
}
|
|
214
|
-
else {
|
|
215
|
-
state.buffer = '';
|
|
216
|
-
}
|
|
217
|
-
const now = Date.now();
|
|
218
|
-
for (const section of sections) {
|
|
219
|
-
const trimmed = section.trim();
|
|
220
|
-
if (!trimmed || trimmed.length < 20)
|
|
221
|
-
continue;
|
|
222
|
-
// Create a hash for deduplication
|
|
223
|
-
const hash = trimmed.slice(0, 100);
|
|
224
|
-
// Check for PR created
|
|
225
|
-
const prMatch = trimmed.match(PR_CREATED_PATTERN);
|
|
226
|
-
if (prMatch) {
|
|
227
|
-
results.push({
|
|
228
|
-
type: 'pr_created',
|
|
229
|
-
content: prMatch[1],
|
|
230
|
-
raw: trimmed,
|
|
231
|
-
});
|
|
232
|
-
continue;
|
|
233
|
-
}
|
|
234
|
-
// Check for plans (rate limit: once per 30s)
|
|
235
|
-
if (now - state.lastPlanPosted > 30000) {
|
|
236
|
-
for (const pattern of PLAN_PATTERNS) {
|
|
237
|
-
if (pattern.test(trimmed) && !state.postedPlans.has(hash)) {
|
|
238
|
-
state.postedPlans.add(hash);
|
|
239
|
-
state.lastPlanPosted = now;
|
|
240
|
-
results.push({
|
|
241
|
-
type: 'plan',
|
|
242
|
-
content: extractPlanContent(trimmed),
|
|
243
|
-
raw: trimmed,
|
|
244
|
-
});
|
|
245
|
-
break;
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
// Check for questions (rate limit: once per 60s)
|
|
250
|
-
if (now - state.lastQuestionPosted > 60000) {
|
|
251
|
-
for (const pattern of QUESTION_PATTERNS) {
|
|
252
|
-
if (pattern.test(trimmed) && !state.postedQuestions.has(hash)) {
|
|
253
|
-
state.postedQuestions.add(hash);
|
|
254
|
-
state.lastQuestionPosted = now;
|
|
255
|
-
results.push({
|
|
256
|
-
type: 'question',
|
|
257
|
-
content: trimmed,
|
|
258
|
-
raw: trimmed,
|
|
259
|
-
});
|
|
260
|
-
break;
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
// Check for progress (rate limit: once per 15s)
|
|
265
|
-
if (now - state.lastProgressPosted > 15000) {
|
|
266
|
-
for (const pattern of PROGRESS_PATTERNS) {
|
|
267
|
-
if (pattern.test(trimmed)) {
|
|
268
|
-
state.lastProgressPosted = now;
|
|
269
|
-
results.push({
|
|
270
|
-
type: 'progress',
|
|
271
|
-
content: extractProgressSummary(trimmed),
|
|
272
|
-
raw: trimmed,
|
|
273
|
-
});
|
|
274
|
-
break;
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
return results;
|
|
280
|
-
}
|
|
281
|
-
/**
|
|
282
|
-
* Extract the key content from a plan section
|
|
283
|
-
*/
|
|
284
|
-
function extractPlanContent(text) {
|
|
285
|
-
// Limit to first 1000 chars and clean up
|
|
286
|
-
const limited = text.slice(0, 1000);
|
|
287
|
-
// If it's very long, add truncation indicator
|
|
288
|
-
if (text.length > 1000) {
|
|
289
|
-
return limited + '\n\n*[Plan truncated...]*';
|
|
290
|
-
}
|
|
291
|
-
return limited;
|
|
292
|
-
}
|
|
293
|
-
/**
|
|
294
|
-
* Extract a short progress summary
|
|
295
|
-
*/
|
|
296
|
-
function extractProgressSummary(text) {
|
|
297
|
-
// Get first line or first 200 chars
|
|
298
|
-
const firstLine = text.split('\n')[0];
|
|
299
|
-
if (firstLine.length <= 200) {
|
|
300
|
-
return firstLine;
|
|
301
|
-
}
|
|
302
|
-
return firstLine.slice(0, 200) + '...';
|
|
303
|
-
}
|
|
304
|
-
/**
|
|
305
|
-
* Format detected content as a comment for posting
|
|
306
|
-
*/
|
|
307
|
-
function formatContentAsComment(content, agentName = 'Claude') {
|
|
308
|
-
switch (content.type) {
|
|
309
|
-
case 'plan':
|
|
310
|
-
return `📋 **${agentName}'s Plan**\n\n${content.content}\n\n---\n*Planning in progress...*`;
|
|
311
|
-
case 'question':
|
|
312
|
-
return `❓ **${agentName} has a question**\n\n${content.content}\n\n---\n*Please reply to this comment to provide clarification.*`;
|
|
313
|
-
case 'progress':
|
|
314
|
-
return `⏳ **Progress Update**\n\n${content.content}`;
|
|
315
|
-
case 'pr_created':
|
|
316
|
-
return `🔗 **Pull Request Created**\n\n[${content.content}](${content.content})`;
|
|
317
|
-
case 'error':
|
|
318
|
-
return `⚠️ **Issue Detected**\n\n${content.content}`;
|
|
319
|
-
default:
|
|
320
|
-
return content.content;
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
/**
|
|
324
|
-
* Get worktree configuration from environment variables
|
|
325
|
-
*/
|
|
326
|
-
function getWorktreeConfig() {
|
|
327
|
-
return {
|
|
328
|
-
enabled: process.env.ASTRID_AGENT_WORKTREE !== 'false',
|
|
329
|
-
baseDir: process.env.ASTRID_AGENT_WORKTREE_DIR || '/tmp/astrid-worktrees',
|
|
330
|
-
autoCleanup: process.env.ASTRID_AGENT_WORKTREE_CLEANUP !== 'false',
|
|
331
|
-
};
|
|
332
|
-
}
|
|
333
|
-
/**
|
|
334
|
-
* Create an isolated git worktree for a task.
|
|
335
|
-
* This allows the agent to work on changes without affecting the main working directory.
|
|
336
|
-
*
|
|
337
|
-
* @param projectPath - Path to the main git repository
|
|
338
|
-
* @param taskId - Task ID for naming the worktree and branch
|
|
339
|
-
* @param branchPrefix - Prefix for the branch name (default: 'task/')
|
|
340
|
-
* @returns WorktreeResult with path and cleanup function
|
|
341
|
-
*/
|
|
342
|
-
async function createWorktree(projectPath, taskId, branchPrefix = 'task/') {
|
|
343
|
-
const { execSync } = await import('child_process');
|
|
344
|
-
const fs = await import('fs/promises');
|
|
345
|
-
const path = await import('path');
|
|
346
|
-
const config = getWorktreeConfig();
|
|
347
|
-
const shortId = taskId.slice(0, 8);
|
|
348
|
-
const branchName = `${branchPrefix}${shortId}`;
|
|
349
|
-
const worktreePath = path.join(config.baseDir, `task-${shortId}-${Date.now()}`);
|
|
350
|
-
console.log(`🌳 Creating git worktree for task ${shortId}...`);
|
|
351
|
-
console.log(` Branch: ${branchName}`);
|
|
352
|
-
console.log(` Path: ${worktreePath}`);
|
|
353
|
-
try {
|
|
354
|
-
// Ensure base directory exists
|
|
355
|
-
await fs.mkdir(config.baseDir, { recursive: true });
|
|
356
|
-
// Fetch latest from origin to ensure we have up-to-date refs
|
|
357
|
-
try {
|
|
358
|
-
execSync('git fetch origin', {
|
|
359
|
-
cwd: projectPath,
|
|
360
|
-
stdio: 'pipe',
|
|
361
|
-
timeout: 30000,
|
|
362
|
-
});
|
|
363
|
-
}
|
|
364
|
-
catch {
|
|
365
|
-
console.log(' ⚠️ Could not fetch from origin (continuing anyway)');
|
|
366
|
-
}
|
|
367
|
-
// Check if branch already exists (local or remote)
|
|
368
|
-
let branchExists = false;
|
|
369
|
-
try {
|
|
370
|
-
execSync(`git rev-parse --verify ${branchName}`, {
|
|
371
|
-
cwd: projectPath,
|
|
372
|
-
stdio: 'pipe',
|
|
373
|
-
});
|
|
374
|
-
branchExists = true;
|
|
375
|
-
}
|
|
376
|
-
catch {
|
|
377
|
-
// Branch doesn't exist locally, check remote
|
|
378
|
-
try {
|
|
379
|
-
execSync(`git rev-parse --verify origin/${branchName}`, {
|
|
380
|
-
cwd: projectPath,
|
|
381
|
-
stdio: 'pipe',
|
|
382
|
-
});
|
|
383
|
-
branchExists = true;
|
|
384
|
-
}
|
|
385
|
-
catch {
|
|
386
|
-
// Branch doesn't exist at all
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
if (branchExists) {
|
|
390
|
-
// Use existing branch
|
|
391
|
-
console.log(` 📌 Using existing branch: ${branchName}`);
|
|
392
|
-
execSync(`git worktree add "${worktreePath}" ${branchName}`, {
|
|
393
|
-
cwd: projectPath,
|
|
394
|
-
stdio: 'pipe',
|
|
395
|
-
timeout: 60000,
|
|
396
|
-
});
|
|
397
|
-
}
|
|
398
|
-
else {
|
|
399
|
-
// Create new branch from main/master
|
|
400
|
-
const defaultBranch = getDefaultBranch(projectPath);
|
|
401
|
-
console.log(` 🌱 Creating new branch from ${defaultBranch}`);
|
|
402
|
-
execSync(`git worktree add -b ${branchName} "${worktreePath}" ${defaultBranch}`, {
|
|
403
|
-
cwd: projectPath,
|
|
404
|
-
stdio: 'pipe',
|
|
405
|
-
timeout: 60000,
|
|
406
|
-
});
|
|
407
|
-
}
|
|
408
|
-
console.log(` ✅ Worktree created successfully`);
|
|
409
|
-
// Create cleanup function
|
|
410
|
-
const cleanup = async () => {
|
|
411
|
-
if (!config.autoCleanup) {
|
|
412
|
-
console.log(` ⏭️ Skipping worktree cleanup (auto-cleanup disabled)`);
|
|
413
|
-
return;
|
|
414
|
-
}
|
|
415
|
-
console.log(` 🧹 Cleaning up worktree: ${worktreePath}`);
|
|
416
|
-
try {
|
|
417
|
-
// Remove the worktree
|
|
418
|
-
execSync(`git worktree remove "${worktreePath}" --force`, {
|
|
419
|
-
cwd: projectPath,
|
|
420
|
-
stdio: 'pipe',
|
|
421
|
-
timeout: 30000,
|
|
422
|
-
});
|
|
423
|
-
console.log(` ✅ Worktree removed`);
|
|
424
|
-
}
|
|
425
|
-
catch (error) {
|
|
426
|
-
console.error(` ⚠️ Failed to remove worktree:`, error);
|
|
427
|
-
// Try to force remove the directory
|
|
428
|
-
try {
|
|
429
|
-
await fs.rm(worktreePath, { recursive: true, force: true });
|
|
430
|
-
// Prune the worktree reference
|
|
431
|
-
execSync('git worktree prune', {
|
|
432
|
-
cwd: projectPath,
|
|
433
|
-
stdio: 'pipe',
|
|
434
|
-
});
|
|
435
|
-
}
|
|
436
|
-
catch {
|
|
437
|
-
console.error(` ⚠️ Could not clean up worktree directory`);
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
};
|
|
441
|
-
return {
|
|
442
|
-
worktreePath,
|
|
443
|
-
branchName,
|
|
444
|
-
cleanup,
|
|
445
|
-
};
|
|
446
|
-
}
|
|
447
|
-
catch (error) {
|
|
448
|
-
console.error(`❌ Failed to create worktree:`, error);
|
|
449
|
-
throw new Error(`Failed to create worktree: ${error instanceof Error ? error.message : String(error)}`);
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
/**
|
|
453
|
-
* Get the default branch name (main or master)
|
|
454
|
-
*/
|
|
455
|
-
function getDefaultBranch(projectPath) {
|
|
456
|
-
const { execSync } = require('child_process');
|
|
457
|
-
try {
|
|
458
|
-
// Try to get the default branch from remote
|
|
459
|
-
const result = execSync('git symbolic-ref refs/remotes/origin/HEAD', {
|
|
460
|
-
cwd: projectPath,
|
|
461
|
-
encoding: 'utf-8',
|
|
462
|
-
stdio: ['pipe', 'pipe', 'pipe'],
|
|
463
|
-
});
|
|
464
|
-
return result.trim().replace('refs/remotes/origin/', '');
|
|
465
|
-
}
|
|
466
|
-
catch {
|
|
467
|
-
// Fall back to checking if main or master exists
|
|
468
|
-
try {
|
|
469
|
-
execSync('git rev-parse --verify main', {
|
|
470
|
-
cwd: projectPath,
|
|
471
|
-
stdio: 'pipe',
|
|
472
|
-
});
|
|
473
|
-
return 'main';
|
|
474
|
-
}
|
|
475
|
-
catch {
|
|
476
|
-
return 'master';
|
|
477
|
-
}
|
|
478
|
-
}
|
|
479
|
-
}
|
|
480
|
-
/**
|
|
481
|
-
* Check if worktree isolation should be used
|
|
482
|
-
*/
|
|
483
|
-
function shouldUseWorktree() {
|
|
484
|
-
return getWorktreeConfig().enabled;
|
|
485
|
-
}
|
|
486
|
-
/**
|
|
487
|
-
* Push changes from worktree and create PR
|
|
488
|
-
* Returns the PR URL if successful
|
|
489
|
-
*/
|
|
490
|
-
async function pushWorktreeChanges(worktreePath, branchName, taskTitle) {
|
|
491
|
-
const { execSync } = await import('child_process');
|
|
492
|
-
try {
|
|
493
|
-
// Check if there are any commits to push
|
|
494
|
-
const status = execSync('git status --porcelain', {
|
|
495
|
-
cwd: worktreePath,
|
|
496
|
-
encoding: 'utf-8',
|
|
497
|
-
});
|
|
498
|
-
if (status.trim()) {
|
|
499
|
-
console.log(` 📝 Uncommitted changes detected, committing...`);
|
|
500
|
-
// Stage and commit any remaining changes
|
|
501
|
-
execSync('git add -A', { cwd: worktreePath, stdio: 'pipe' });
|
|
502
|
-
const commitPrefix = taskTitle.toLowerCase().includes('fix') ? 'fix' : 'feat';
|
|
503
|
-
const shortTitle = taskTitle.slice(0, 50).replace(/"/g, "'");
|
|
504
|
-
try {
|
|
505
|
-
execSync(`git commit -m "${commitPrefix}: ${shortTitle}"`, {
|
|
506
|
-
cwd: worktreePath,
|
|
507
|
-
stdio: 'pipe',
|
|
508
|
-
});
|
|
509
|
-
}
|
|
510
|
-
catch {
|
|
511
|
-
// No changes to commit
|
|
512
|
-
}
|
|
513
|
-
}
|
|
514
|
-
// Push the branch
|
|
515
|
-
console.log(` 🚀 Pushing branch: ${branchName}`);
|
|
516
|
-
execSync(`git push -u origin ${branchName}`, {
|
|
517
|
-
cwd: worktreePath,
|
|
518
|
-
stdio: 'pipe',
|
|
519
|
-
timeout: 60000,
|
|
520
|
-
});
|
|
521
|
-
// Check if PR already exists
|
|
522
|
-
try {
|
|
523
|
-
const existingPr = execSync(`gh pr view ${branchName} --json url -q .url`, {
|
|
524
|
-
cwd: worktreePath,
|
|
525
|
-
encoding: 'utf-8',
|
|
526
|
-
stdio: ['pipe', 'pipe', 'pipe'],
|
|
527
|
-
});
|
|
528
|
-
if (existingPr.trim()) {
|
|
529
|
-
console.log(` 📋 PR already exists: ${existingPr.trim()}`);
|
|
530
|
-
return existingPr.trim();
|
|
531
|
-
}
|
|
532
|
-
}
|
|
533
|
-
catch {
|
|
534
|
-
// No existing PR
|
|
535
|
-
}
|
|
536
|
-
// Create PR
|
|
537
|
-
console.log(` 📋 Creating pull request...`);
|
|
538
|
-
const prUrl = execSync(`gh pr create --title "${taskTitle.slice(0, 100)}" --body "Task implementation\n\nCreated by Astrid AI Agent" --head ${branchName}`, {
|
|
539
|
-
cwd: worktreePath,
|
|
540
|
-
encoding: 'utf-8',
|
|
541
|
-
timeout: 30000,
|
|
542
|
-
});
|
|
543
|
-
const url = prUrl.trim();
|
|
544
|
-
console.log(` ✅ PR created: ${url}`);
|
|
545
|
-
return url;
|
|
546
|
-
}
|
|
547
|
-
catch (error) {
|
|
548
|
-
console.error(` ⚠️ Failed to push/create PR:`, error);
|
|
549
|
-
return undefined;
|
|
550
|
-
}
|
|
551
|
-
}
|
|
552
|
-
//# sourceMappingURL=terminal-base.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"terminal-base.js","sourceRoot":"","sources":["../../src/executors/terminal-base.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAgIH,oCAeC;AAKD,oDASC;AAMD,gDAsBC;AAMD,8CAmDC;AAKD,gDA4BC;AAmCD,8CASC;AA4CD,4CAwFC;AA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nI;YACE,GAAG,EAAE,YAAY;YACjB,QAAQ,EAAE,OAAO;YACjB,OAAO,EAAE,KAAK;SACf,CACF,CAAA;QAED,MAAM,GAAG,GAAG,KAAK,CAAC,IAAI,EAAE,CAAA;QACxB,OAAO,CAAC,GAAG,CAAC,oBAAoB,GAAG,EAAE,CAAC,CAAA;QACtC,OAAO,GAAG,CAAA;IACZ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,iCAAiC,EAAE,KAAK,CAAC,CAAA;QACvD,OAAO,SAAS,CAAA;IAClB,CAAC;AACH,CAAC"}
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Terminal Claude Executor
|
|
3
|
-
*
|
|
4
|
-
* Executes tasks using the local Claude Code CLI via spawn.
|
|
5
|
-
* This enables running the astrid-agent in "terminal mode" where tasks
|
|
6
|
-
* are processed by the local Claude Code installation instead of the API.
|
|
7
|
-
*
|
|
8
|
-
* Key features:
|
|
9
|
-
* - Uses `claude --print` for non-interactive execution
|
|
10
|
-
* - Supports session resumption via `--resume` flag
|
|
11
|
-
* - Extracts PR URLs and git changes from output
|
|
12
|
-
*/
|
|
13
|
-
import type { Session } from '../server/session-manager.js';
|
|
14
|
-
import type { TerminalExecutor, TerminalTaskContext, TerminalExecutorCallbacks, ParsedOutput, TerminalExecutionResult } from './terminal-base.js';
|
|
15
|
-
export type { TerminalExecutionResult, TerminalTaskContext } from './terminal-base.js';
|
|
16
|
-
export interface TerminalClaudeOptions {
|
|
17
|
-
model?: string;
|
|
18
|
-
maxTurns?: number;
|
|
19
|
-
timeout?: number;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Session data stored for each task
|
|
23
|
-
*/
|
|
24
|
-
interface StoredSession {
|
|
25
|
-
claudeSessionId?: string;
|
|
26
|
-
worktreePath?: string;
|
|
27
|
-
branchName?: string;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Simple file-based session store for terminal mode.
|
|
31
|
-
* Stores Claude session IDs and worktree paths for resumption support.
|
|
32
|
-
*/
|
|
33
|
-
declare class TerminalSessionStore {
|
|
34
|
-
private storagePath;
|
|
35
|
-
private sessions;
|
|
36
|
-
private loaded;
|
|
37
|
-
constructor();
|
|
38
|
-
load(): Promise<void>;
|
|
39
|
-
save(): Promise<void>;
|
|
40
|
-
getSession(taskId: string): Promise<StoredSession | undefined>;
|
|
41
|
-
getClaudeSessionId(taskId: string): Promise<string | undefined>;
|
|
42
|
-
setClaudeSessionId(taskId: string, claudeSessionId: string): Promise<void>;
|
|
43
|
-
setWorktree(taskId: string, worktreePath: string, branchName: string): Promise<void>;
|
|
44
|
-
getWorktree(taskId: string): Promise<{
|
|
45
|
-
path: string;
|
|
46
|
-
branch: string;
|
|
47
|
-
} | undefined>;
|
|
48
|
-
deleteSession(taskId: string): Promise<void>;
|
|
49
|
-
}
|
|
50
|
-
export declare const terminalSessionStore: TerminalSessionStore;
|
|
51
|
-
export declare class TerminalClaudeExecutor implements TerminalExecutor {
|
|
52
|
-
private model;
|
|
53
|
-
private maxTurns;
|
|
54
|
-
private timeout;
|
|
55
|
-
constructor(options?: TerminalClaudeOptions);
|
|
56
|
-
/**
|
|
57
|
-
* Capture git diff and modified files after execution
|
|
58
|
-
* If baseline is provided, filters out pre-existing uncommitted files
|
|
59
|
-
*/
|
|
60
|
-
captureGitChanges(projectPath: string, baseline?: Set<string>): Promise<{
|
|
61
|
-
diff: string;
|
|
62
|
-
files: string[];
|
|
63
|
-
}>;
|
|
64
|
-
/**
|
|
65
|
-
* Extract PR URL from Claude output
|
|
66
|
-
*/
|
|
67
|
-
extractPrUrl(output: string): string | undefined;
|
|
68
|
-
/**
|
|
69
|
-
* Read project context files (CLAUDE.md, ASTRID.md)
|
|
70
|
-
*/
|
|
71
|
-
readProjectContext(projectPath: string): Promise<string>;
|
|
72
|
-
/**
|
|
73
|
-
* Format comment history for context
|
|
74
|
-
*/
|
|
75
|
-
formatCommentHistory(comments?: TerminalTaskContext['comments']): string;
|
|
76
|
-
/**
|
|
77
|
-
* Build prompt from task details
|
|
78
|
-
*
|
|
79
|
-
* IMPORTANT: Keep prompts relatively concise. Very long prompts with complex
|
|
80
|
-
* markdown can cause issues. Focus on essential instructions.
|
|
81
|
-
*
|
|
82
|
-
* NOTE: Workflow instructions are built from environment-based configuration.
|
|
83
|
-
* See config/agent-workflow.ts for available environment variables.
|
|
84
|
-
*/
|
|
85
|
-
buildPrompt(session: Session, userMessage?: string, context?: TerminalTaskContext): Promise<string>;
|
|
86
|
-
/**
|
|
87
|
-
* Start a new Claude Code session with retry logic
|
|
88
|
-
* Uses git worktree isolation when enabled (default) to protect the main working directory
|
|
89
|
-
*/
|
|
90
|
-
startSession(session: Session, prompt?: string, context?: TerminalTaskContext, callbacks?: TerminalExecutorCallbacks): Promise<TerminalExecutionResult>;
|
|
91
|
-
/**
|
|
92
|
-
* Resume an existing Claude Code session with retry logic
|
|
93
|
-
* Uses stored worktree path if available
|
|
94
|
-
*/
|
|
95
|
-
resumeSession(session: Session, input: string, context?: TerminalTaskContext, callbacks?: TerminalExecutorCallbacks): Promise<TerminalExecutionResult>;
|
|
96
|
-
/**
|
|
97
|
-
* Execute Claude Code CLI
|
|
98
|
-
*
|
|
99
|
-
* Uses stdin for prompt input instead of command-line args to avoid
|
|
100
|
-
* issues with long prompts, special characters, and newlines.
|
|
101
|
-
*
|
|
102
|
-
* Parses output in real-time to detect plans, questions, and progress,
|
|
103
|
-
* posting them as comments to the task via the onComment callback.
|
|
104
|
-
*/
|
|
105
|
-
private runClaude;
|
|
106
|
-
/**
|
|
107
|
-
* Parse Claude Code output to extract key information
|
|
108
|
-
*/
|
|
109
|
-
parseOutput(output: string): ParsedOutput;
|
|
110
|
-
/**
|
|
111
|
-
* Check if Claude Code CLI is available
|
|
112
|
-
*/
|
|
113
|
-
checkAvailable(): Promise<boolean>;
|
|
114
|
-
}
|
|
115
|
-
export declare const terminalClaudeExecutor: TerminalClaudeExecutor;
|
|
116
|
-
//# sourceMappingURL=terminal-claude.d.ts.map
|