swellai 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/cli/install.d.ts.map +1 -1
- package/dist/src/cli/install.js +7 -3
- package/dist/src/cli/install.js.map +1 -1
- package/package.json +2 -2
- package/templates/actions/detect-runtime/action.yml +113 -0
- package/templates/actions/fetch-agents/action.yml +34 -0
- package/templates/actions/get-issue-details/action.yml +60 -0
- package/templates/actions/setup-claude/action.yml +45 -0
- package/templates/actions/setup-opencode/action.yml +128 -0
- package/templates/scripts/claude-agent-runner.js +9039 -64
- package/templates/scripts/linear-agent.js +9103 -68
- package/templates/scripts/planning-agent.js +9080 -66
- package/templates/workflows/claude-plan.yml +48 -36
- package/dist/agents/linear-agent.d.ts +0 -32
- package/dist/agents/linear-agent.d.ts.map +0 -1
- package/dist/agents/linear-agent.js +0 -263
- package/dist/agents/linear-agent.js.map +0 -1
- package/dist/agents/planning-agent.d.ts +0 -36
- package/dist/agents/planning-agent.d.ts.map +0 -1
- package/dist/agents/planning-agent.js +0 -248
- package/dist/agents/planning-agent.js.map +0 -1
- package/dist/cli/index.d.ts +0 -3
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/cli/index.js +0 -102
- package/dist/cli/index.js.map +0 -1
- package/dist/cli/install.d.ts +0 -11
- package/dist/cli/install.d.ts.map +0 -1
- package/dist/cli/install.js +0 -257
- package/dist/cli/install.js.map +0 -1
- package/dist/cli/manifest.d.ts +0 -27
- package/dist/cli/manifest.d.ts.map +0 -1
- package/dist/cli/manifest.js +0 -65
- package/dist/cli/manifest.js.map +0 -1
- package/dist/index.d.ts +0 -17
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -17
- package/dist/index.js.map +0 -1
- package/dist/lib/claude-agent-sdk.d.ts +0 -73
- package/dist/lib/claude-agent-sdk.d.ts.map +0 -1
- package/dist/lib/claude-agent-sdk.js +0 -114
- package/dist/lib/claude-agent-sdk.js.map +0 -1
- package/dist/lib/conversation-logger.d.ts +0 -66
- package/dist/lib/conversation-logger.d.ts.map +0 -1
- package/dist/lib/conversation-logger.js +0 -159
- package/dist/lib/conversation-logger.js.map +0 -1
- package/dist/lib/opencode.d.ts +0 -68
- package/dist/lib/opencode.d.ts.map +0 -1
- package/dist/lib/opencode.js +0 -151
- package/dist/lib/opencode.js.map +0 -1
- package/dist/lib/turso-schema.d.ts +0 -13
- package/dist/lib/turso-schema.d.ts.map +0 -1
- package/dist/lib/turso-schema.js +0 -69
- package/dist/lib/turso-schema.js.map +0 -1
- package/dist/lib/turso.d.ts +0 -56
- package/dist/lib/turso.d.ts.map +0 -1
- package/dist/lib/turso.js +0 -144
- package/dist/lib/turso.js.map +0 -1
- package/dist/lib/types.d.ts +0 -31
- package/dist/lib/types.d.ts.map +0 -1
- package/dist/lib/types.js +0 -20
- package/dist/lib/types.js.map +0 -1
- package/dist/lib/utils.d.ts +0 -34
- package/dist/lib/utils.d.ts.map +0 -1
- package/dist/lib/utils.js +0 -72
- package/dist/lib/utils.js.map +0 -1
|
@@ -1,248 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* planning-agent.ts
|
|
4
|
-
*
|
|
5
|
-
* Generates an implementation plan using a custom planning agent.
|
|
6
|
-
* The planning agent is configured for read-only operations with web research capabilities.
|
|
7
|
-
*
|
|
8
|
-
* Usage:
|
|
9
|
-
* planning-agent.ts <feature-description>
|
|
10
|
-
*
|
|
11
|
-
* Environment variables:
|
|
12
|
-
* - PROVIDER (optional, defaults to 'anthropic')
|
|
13
|
-
* Supported values: anthropic, openai, google
|
|
14
|
-
*
|
|
15
|
-
* API Keys (required based on provider):
|
|
16
|
-
* - ANTHROPIC_API_KEY or CLAUDE_CODE_OAUTH_TOKEN (for provider=anthropic)
|
|
17
|
-
* - OPENAI_API_KEY (for provider=openai)
|
|
18
|
-
* - GOOGLE_GENERATIVE_AI_API_KEY (for provider=google)
|
|
19
|
-
*
|
|
20
|
-
* - MODEL (optional, defaults to provider-specific model)
|
|
21
|
-
* anthropic: claude-haiku-4-5-20251001
|
|
22
|
-
* openai: gpt-4o
|
|
23
|
-
* google: gemini-2.0-flash-exp
|
|
24
|
-
*
|
|
25
|
-
* Examples:
|
|
26
|
-
* # Use default (Anthropic Claude)
|
|
27
|
-
* ANTHROPIC_API_KEY=xxx planning-agent.ts "Add user authentication"
|
|
28
|
-
*
|
|
29
|
-
* # Use OpenAI GPT-4
|
|
30
|
-
* PROVIDER=openai OPENAI_API_KEY=xxx planning-agent.ts "Add user authentication"
|
|
31
|
-
*
|
|
32
|
-
* # Use Google Gemini with custom model
|
|
33
|
-
* PROVIDER=google GOOGLE_GENERATIVE_AI_API_KEY=xxx MODEL=gemini-1.5-pro planning-agent.ts "Add user authentication"
|
|
34
|
-
*/
|
|
35
|
-
import { access, readFile } from "node:fs/promises";
|
|
36
|
-
import { join } from "node:path";
|
|
37
|
-
import { createConversationLogger } from "../lib/conversation-logger.js";
|
|
38
|
-
import { createOpencodeServer, setupEventMonitoring } from "../lib/opencode.js";
|
|
39
|
-
import { DEFAULT_MODELS } from "../lib/types.js";
|
|
40
|
-
import { extractTextFromParts, getApiKey, validateProvider } from "../lib/utils.js";
|
|
41
|
-
// Note: __filename and __dirname are not needed here anymore
|
|
42
|
-
// Prompts are resolved from process.cwd() in installed locations
|
|
43
|
-
// ============================================================================
|
|
44
|
-
// Configuration
|
|
45
|
-
// ============================================================================
|
|
46
|
-
const AGENT_NAME = "planning-agent";
|
|
47
|
-
// Helper to find prompt file in multiple possible locations
|
|
48
|
-
async function findPromptFile() {
|
|
49
|
-
const possiblePaths = [
|
|
50
|
-
// Installed location (via installer)
|
|
51
|
-
join(process.cwd(), ".github", "claude-parallel", "prompts", "plan-generation.md"),
|
|
52
|
-
// Source repository location
|
|
53
|
-
join(process.cwd(), "prompts", "plan-generation.md"),
|
|
54
|
-
];
|
|
55
|
-
for (const path of possiblePaths) {
|
|
56
|
-
try {
|
|
57
|
-
await access(path);
|
|
58
|
-
return path;
|
|
59
|
-
}
|
|
60
|
-
catch {
|
|
61
|
-
// File doesn't exist at this path, try next
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
throw new Error(`Could not find plan-generation.md in any of these locations:\n${possiblePaths.map((p) => ` - ${p}`).join("\n")}`);
|
|
65
|
-
}
|
|
66
|
-
// ============================================================================
|
|
67
|
-
// Main Execution
|
|
68
|
-
// ============================================================================
|
|
69
|
-
async function main() {
|
|
70
|
-
// Parse command line arguments
|
|
71
|
-
const args = process.argv.slice(2);
|
|
72
|
-
if (args.length < 1) {
|
|
73
|
-
console.error("Usage: planning-agent.ts <feature-description>");
|
|
74
|
-
console.error("");
|
|
75
|
-
console.error("Examples:");
|
|
76
|
-
console.error(" # Use default (Anthropic Claude)");
|
|
77
|
-
console.error(' ANTHROPIC_API_KEY=xxx planning-agent.ts "Add user authentication"');
|
|
78
|
-
console.error("");
|
|
79
|
-
console.error(" # Use OpenAI GPT-4");
|
|
80
|
-
console.error(' PROVIDER=openai OPENAI_API_KEY=xxx planning-agent.ts "Add user authentication"');
|
|
81
|
-
console.error("");
|
|
82
|
-
console.error(" # Use Google Gemini");
|
|
83
|
-
console.error(' PROVIDER=google GOOGLE_GENERATIVE_AI_API_KEY=xxx planning-agent.ts "Add user authentication"');
|
|
84
|
-
console.error("");
|
|
85
|
-
console.error("Environment variables:");
|
|
86
|
-
console.error(" PROVIDER - anthropic (default), openai, or google");
|
|
87
|
-
console.error(" MODEL - Override default model for the provider");
|
|
88
|
-
process.exit(1);
|
|
89
|
-
}
|
|
90
|
-
const featureDescription = args.join(" ");
|
|
91
|
-
// Get provider from environment or use default
|
|
92
|
-
const providerEnv = (process.env.PROVIDER || "anthropic").toLowerCase();
|
|
93
|
-
// Validate provider
|
|
94
|
-
validateProvider(providerEnv);
|
|
95
|
-
const provider = providerEnv;
|
|
96
|
-
// Get API key from environment based on provider
|
|
97
|
-
const apiKey = getApiKey(provider);
|
|
98
|
-
// Get model from environment or use provider-specific default
|
|
99
|
-
const model = process.env.MODEL || DEFAULT_MODELS[provider];
|
|
100
|
-
console.error(`\n${"=".repeat(60)}`);
|
|
101
|
-
console.error(`Planning Agent`);
|
|
102
|
-
console.error(`${"=".repeat(60)}`);
|
|
103
|
-
console.error(`Provider: ${provider}`);
|
|
104
|
-
console.error(`Model: ${model}`);
|
|
105
|
-
console.error(`Feature: ${featureDescription}`);
|
|
106
|
-
console.error("");
|
|
107
|
-
// Initialize conversation logger (optional)
|
|
108
|
-
const logger = await createConversationLogger();
|
|
109
|
-
if (logger) {
|
|
110
|
-
console.error(`✓ Conversation logging enabled`);
|
|
111
|
-
}
|
|
112
|
-
// Read external prompt file
|
|
113
|
-
let prompt;
|
|
114
|
-
let promptFile;
|
|
115
|
-
try {
|
|
116
|
-
promptFile = await findPromptFile();
|
|
117
|
-
prompt = await readFile(promptFile, "utf-8");
|
|
118
|
-
console.error(`✓ Loaded prompt from ${promptFile}`);
|
|
119
|
-
}
|
|
120
|
-
catch (error) {
|
|
121
|
-
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
122
|
-
console.error(`✗ Failed to read prompt file: ${errorMessage}`);
|
|
123
|
-
console.error("Please create a plan-generation.md file in the prompts directory");
|
|
124
|
-
process.exit(1);
|
|
125
|
-
}
|
|
126
|
-
// Create OpenCode server with planning agent configuration
|
|
127
|
-
const { client, server } = await createOpencodeServer({
|
|
128
|
-
provider,
|
|
129
|
-
apiKey,
|
|
130
|
-
model,
|
|
131
|
-
agentName: AGENT_NAME,
|
|
132
|
-
agentDescription: "Generate a comprehensive implementation plan for a given feature",
|
|
133
|
-
agentPrompt: prompt,
|
|
134
|
-
agentTools: {
|
|
135
|
-
write: false, // No file creation
|
|
136
|
-
edit: false, // No file modification
|
|
137
|
-
bash: false, // No shell commands
|
|
138
|
-
read: true, // Allow reading files
|
|
139
|
-
list: true, // Allow listing directories
|
|
140
|
-
glob: true, // Allow file pattern matching
|
|
141
|
-
grep: true, // Allow searching content
|
|
142
|
-
webfetch: true, // Allow web research
|
|
143
|
-
},
|
|
144
|
-
agentPermissions: {
|
|
145
|
-
edit: "deny",
|
|
146
|
-
bash: "deny",
|
|
147
|
-
webfetch: "allow",
|
|
148
|
-
},
|
|
149
|
-
maxSteps: 30,
|
|
150
|
-
});
|
|
151
|
-
// Setup event monitoring
|
|
152
|
-
setupEventMonitoring(client, logger);
|
|
153
|
-
try {
|
|
154
|
-
// Start logging session if logger is available
|
|
155
|
-
if (logger) {
|
|
156
|
-
await logger.startSession({
|
|
157
|
-
id: crypto.randomUUID(),
|
|
158
|
-
agentType: "planning",
|
|
159
|
-
model,
|
|
160
|
-
provider,
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
// Create session
|
|
164
|
-
console.error(`Creating session...`);
|
|
165
|
-
const sessionResponse = await client.session.create({
|
|
166
|
-
body: { title: `Plan generation: ${featureDescription}` },
|
|
167
|
-
});
|
|
168
|
-
if (!sessionResponse.data) {
|
|
169
|
-
throw new Error("Failed to create session: no data in response");
|
|
170
|
-
}
|
|
171
|
-
const session = sessionResponse.data;
|
|
172
|
-
console.error(`✓ Session created: ${session.id}`);
|
|
173
|
-
// Send prompt to planning agent
|
|
174
|
-
console.error(`Generating plan with ${AGENT_NAME}...`);
|
|
175
|
-
console.error(`This may take a few moments while the AI generates the plan...`);
|
|
176
|
-
const promptResponse = await client.session.prompt({
|
|
177
|
-
path: { id: session.id },
|
|
178
|
-
body: {
|
|
179
|
-
model: {
|
|
180
|
-
providerID: provider,
|
|
181
|
-
modelID: model,
|
|
182
|
-
},
|
|
183
|
-
agent: AGENT_NAME, // Use the planning agent
|
|
184
|
-
parts: [{ type: "text", text: featureDescription }],
|
|
185
|
-
},
|
|
186
|
-
});
|
|
187
|
-
if (!promptResponse.data) {
|
|
188
|
-
throw new Error("Failed to get response: no data in response");
|
|
189
|
-
}
|
|
190
|
-
// Check for errors
|
|
191
|
-
const responseInfo = promptResponse.data.info;
|
|
192
|
-
if (responseInfo?.error) {
|
|
193
|
-
const err = responseInfo.error;
|
|
194
|
-
const errorName = err.name;
|
|
195
|
-
const errorData = "data" in err ? err.data : {};
|
|
196
|
-
const errorMessage = "message" in errorData ? errorData.message : JSON.stringify(errorData);
|
|
197
|
-
throw new Error(`Provider error: ${errorName}: ${errorMessage}`);
|
|
198
|
-
}
|
|
199
|
-
// Extract plan text
|
|
200
|
-
const planText = extractTextFromParts(promptResponse.data.parts);
|
|
201
|
-
if (planText.length === 0) {
|
|
202
|
-
throw new Error("Empty response from planning agent");
|
|
203
|
-
}
|
|
204
|
-
console.error("");
|
|
205
|
-
console.error(`${"=".repeat(60)}`);
|
|
206
|
-
console.error(`SUCCESS!`);
|
|
207
|
-
console.error(`${"=".repeat(60)}`);
|
|
208
|
-
console.error(`Generated plan: ${planText.length} characters`);
|
|
209
|
-
console.error(`Session ID: ${session.id}`);
|
|
210
|
-
console.error("");
|
|
211
|
-
// Output plan to stdout (this will be captured by scripts)
|
|
212
|
-
console.log(planText);
|
|
213
|
-
// End logging session successfully and sync to cloud
|
|
214
|
-
if (logger) {
|
|
215
|
-
await logger.endSession("completed");
|
|
216
|
-
await logger.syncToCloud();
|
|
217
|
-
}
|
|
218
|
-
process.exit(0);
|
|
219
|
-
}
|
|
220
|
-
catch (error) {
|
|
221
|
-
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
222
|
-
console.error("");
|
|
223
|
-
console.error(`${"=".repeat(60)}`);
|
|
224
|
-
console.error("ERROR!");
|
|
225
|
-
console.error(`${"=".repeat(60)}`);
|
|
226
|
-
console.error(`Error: ${errorMessage}`);
|
|
227
|
-
if (error instanceof Error && error.stack) {
|
|
228
|
-
console.error("Stack trace:", error.stack);
|
|
229
|
-
}
|
|
230
|
-
console.error("");
|
|
231
|
-
// End logging session with error and sync to cloud
|
|
232
|
-
if (logger) {
|
|
233
|
-
await logger.endSession("error", errorMessage);
|
|
234
|
-
await logger.syncToCloud();
|
|
235
|
-
}
|
|
236
|
-
process.exit(1);
|
|
237
|
-
}
|
|
238
|
-
finally {
|
|
239
|
-
console.error("Shutting down OpenCode server...");
|
|
240
|
-
server.close();
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
// Run the main function
|
|
244
|
-
main().catch((error) => {
|
|
245
|
-
console.error("FATAL ERROR:", error);
|
|
246
|
-
process.exit(1);
|
|
247
|
-
});
|
|
248
|
-
//# sourceMappingURL=planning-agent.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"planning-agent.js","sourceRoot":"","sources":["../../src/agents/planning-agent.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAChF,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEpF,6DAA6D;AAC7D,iEAAiE;AAEjE,+EAA+E;AAC/E,gBAAgB;AAChB,+EAA+E;AAE/E,MAAM,UAAU,GAAG,gBAAgB,CAAC;AAEpC,4DAA4D;AAC5D,KAAK,UAAU,cAAc;IAC3B,MAAM,aAAa,GAAG;QACpB,qCAAqC;QACrC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,iBAAiB,EAAE,SAAS,EAAE,oBAAoB,CAAC;QAClF,6BAA6B;QAC7B,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,oBAAoB,CAAC;KACrD,CAAC;IAEF,KAAK,MAAM,IAAI,IAAI,aAAa,EAAE,CAAC;QACjC,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7B,CAAC;QAED,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;YAAS,CAAC;QACT,OAAO,CAAC,KAAK,CAAC,kCAAkC,CAAC,CAAC;QAClD,MAAM,CAAC,KAAK,EAAE,CAAC;IACjB,CAAC;AACH,CAAC;AAED,wBAAwB;AACxB,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IACrC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/dist/cli/index.d.ts
DELETED
package/dist/cli/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":""}
|
package/dist/cli/index.js
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { install } from "./install.js";
|
|
3
|
-
const HELP_TEXT = `
|
|
4
|
-
install-claude-parallel - Install Claude Parallel workflows into your repository
|
|
5
|
-
|
|
6
|
-
USAGE:
|
|
7
|
-
npx install-claude-parallel [OPTIONS]
|
|
8
|
-
|
|
9
|
-
OPTIONS:
|
|
10
|
-
--help Show this help message
|
|
11
|
-
--yes Skip confirmation prompts
|
|
12
|
-
--force Overwrite all files, including user-modified ones
|
|
13
|
-
--dry-run Show what would be changed without making any changes
|
|
14
|
-
|
|
15
|
-
DESCRIPTION:
|
|
16
|
-
Installs Claude Parallel workflows, scripts, prompts, and agents into your
|
|
17
|
-
repository. The installer copies files from templates and tracks them with
|
|
18
|
-
a manifest to detect user modifications on subsequent runs.
|
|
19
|
-
|
|
20
|
-
INSTALLED FILES:
|
|
21
|
-
.github/workflows/
|
|
22
|
-
- claude-plan.yml # Multi-provider plan generation workflow
|
|
23
|
-
- claude-implement.yml # Parallel implementation workflow
|
|
24
|
-
|
|
25
|
-
.github/claude-parallel/scripts/
|
|
26
|
-
- planning-agent.js # Plan generation agent
|
|
27
|
-
- linear-agent.js # Linear integration agent
|
|
28
|
-
- claude-agent-runner.js # Implementation agent runner
|
|
29
|
-
- detect-runtime.sh # Runtime detection script
|
|
30
|
-
|
|
31
|
-
.github/claude-parallel/prompts/
|
|
32
|
-
- plan-generation.md
|
|
33
|
-
- consolidate-and-create-linear.md
|
|
34
|
-
- implementation.md
|
|
35
|
-
- review.md
|
|
36
|
-
- verify.md
|
|
37
|
-
|
|
38
|
-
.claude/agents/
|
|
39
|
-
- coding-agent.md # Feature implementation agent
|
|
40
|
-
- codebase-locator.md # Code discovery agent
|
|
41
|
-
- codebase-analyzer.md # Code analysis agent
|
|
42
|
-
- debug-agent.md # Debugging agent
|
|
43
|
-
|
|
44
|
-
.env.example # Example environment variables
|
|
45
|
-
|
|
46
|
-
EXAMPLES:
|
|
47
|
-
# Install with confirmation prompts
|
|
48
|
-
npx install-claude-parallel
|
|
49
|
-
|
|
50
|
-
# Install without prompts
|
|
51
|
-
npx install-claude-parallel --yes
|
|
52
|
-
|
|
53
|
-
# Preview what would be installed
|
|
54
|
-
npx install-claude-parallel --dry-run
|
|
55
|
-
|
|
56
|
-
# Force overwrite all files
|
|
57
|
-
npx install-claude-parallel --force
|
|
58
|
-
|
|
59
|
-
ENVIRONMENT VARIABLES:
|
|
60
|
-
See .env.example after installation for required GitHub Actions secrets.
|
|
61
|
-
|
|
62
|
-
UPDATES:
|
|
63
|
-
Re-running the installer will update files to the latest version while
|
|
64
|
-
preserving your modifications. Use --force to overwrite everything.
|
|
65
|
-
|
|
66
|
-
DOCUMENTATION:
|
|
67
|
-
https://github.com/mkrueger12/claude-parallel
|
|
68
|
-
`;
|
|
69
|
-
function parseArgs(args) {
|
|
70
|
-
return {
|
|
71
|
-
help: args.includes("--help") || args.includes("-h"),
|
|
72
|
-
yes: args.includes("--yes") || args.includes("-y"),
|
|
73
|
-
force: args.includes("--force") || args.includes("-f"),
|
|
74
|
-
dryRun: args.includes("--dry-run"),
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
async function main() {
|
|
78
|
-
const args = parseArgs(process.argv.slice(2));
|
|
79
|
-
if (args.help) {
|
|
80
|
-
console.log(HELP_TEXT);
|
|
81
|
-
process.exit(0);
|
|
82
|
-
}
|
|
83
|
-
try {
|
|
84
|
-
await install({
|
|
85
|
-
force: args.force,
|
|
86
|
-
dryRun: args.dryRun,
|
|
87
|
-
yes: args.yes,
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
catch (error) {
|
|
91
|
-
console.error("\n❌ Installation failed:");
|
|
92
|
-
if (error instanceof Error) {
|
|
93
|
-
console.error(` ${error.message}`);
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
console.error(` ${String(error)}`);
|
|
97
|
-
}
|
|
98
|
-
process.exit(1);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
main();
|
|
102
|
-
//# sourceMappingURL=index.js.map
|
package/dist/cli/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,MAAM,SAAS,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiEjB,CAAC;AASF,SAAS,SAAS,CAAC,IAAc;IAC/B,OAAO;QACL,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;QACpD,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;QAClD,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;QACtD,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC;KACnC,CAAC;AACJ,CAAC;AAED,KAAK,UAAU,IAAI;IACjB,MAAM,IAAI,GAAG,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAE9C,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;QACd,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACvB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,IAAI,CAAC;QACH,MAAM,OAAO,CAAC;YACZ,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,GAAG,EAAE,IAAI,CAAC,GAAG;SACd,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC;QAC1C,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;YAC3B,OAAO,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QACvC,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,KAAK,CAAC,MAAM,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACvC,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED,IAAI,EAAE,CAAC"}
|
package/dist/cli/install.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export interface InstallOptions {
|
|
2
|
-
force?: boolean;
|
|
3
|
-
dryRun?: boolean;
|
|
4
|
-
yes?: boolean;
|
|
5
|
-
targetDir?: string;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Main install function
|
|
9
|
-
*/
|
|
10
|
-
export declare function install(options?: InstallOptions): Promise<void>;
|
|
11
|
-
//# sourceMappingURL=install.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../src/cli/install.ts"],"names":[],"mappings":"AAoBA,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAyMD;;GAEG;AACH,wBAAsB,OAAO,CAAC,OAAO,GAAE,cAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CA6GzE"}
|
package/dist/cli/install.js
DELETED
|
@@ -1,257 +0,0 @@
|
|
|
1
|
-
import { chmodSync, existsSync, mkdirSync, readdirSync, readFileSync, statSync, writeFileSync, } from "node:fs";
|
|
2
|
-
import { dirname, join, relative } from "node:path";
|
|
3
|
-
import { fileURLToPath } from "node:url";
|
|
4
|
-
import { calculateFileHash, createManifest, isFileModified, readManifest, writeManifest, } from "./manifest.js";
|
|
5
|
-
// Get the directory where the installed package is located
|
|
6
|
-
function getPackageDir() {
|
|
7
|
-
// When running from dist/cli/install.js, we need to go up to the package root
|
|
8
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
9
|
-
const __dirname = dirname(__filename);
|
|
10
|
-
// dist/cli/install.js -> go up two levels to package root
|
|
11
|
-
return join(__dirname, "..", "..");
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Find all template files recursively
|
|
15
|
-
*/
|
|
16
|
-
function findTemplateFiles(templatesDir, baseDir = templatesDir) {
|
|
17
|
-
const files = [];
|
|
18
|
-
const entries = readdirSync(templatesDir);
|
|
19
|
-
for (const entry of entries) {
|
|
20
|
-
const fullPath = join(templatesDir, entry);
|
|
21
|
-
const stat = statSync(fullPath);
|
|
22
|
-
if (stat.isDirectory()) {
|
|
23
|
-
files.push(...findTemplateFiles(fullPath, baseDir));
|
|
24
|
-
}
|
|
25
|
-
else if (stat.isFile()) {
|
|
26
|
-
// Get relative path from templates directory
|
|
27
|
-
files.push(relative(baseDir, fullPath));
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
return files;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Map template file paths to destination paths in target repository
|
|
34
|
-
*/
|
|
35
|
-
function getDestinationPath(templateRelativePath) {
|
|
36
|
-
// workflows/* -> .github/workflows/*
|
|
37
|
-
if (templateRelativePath.startsWith("workflows/")) {
|
|
38
|
-
return templateRelativePath.replace("workflows/", ".github/workflows/");
|
|
39
|
-
}
|
|
40
|
-
// scripts/* -> .github/claude-parallel/scripts/*
|
|
41
|
-
if (templateRelativePath.startsWith("scripts/")) {
|
|
42
|
-
return templateRelativePath.replace("scripts/", ".github/claude-parallel/scripts/");
|
|
43
|
-
}
|
|
44
|
-
// prompts/* -> .github/claude-parallel/prompts/*
|
|
45
|
-
if (templateRelativePath.startsWith("prompts/")) {
|
|
46
|
-
return templateRelativePath.replace("prompts/", ".github/claude-parallel/prompts/");
|
|
47
|
-
}
|
|
48
|
-
// agents/* -> .claude/agents/*
|
|
49
|
-
if (templateRelativePath.startsWith("agents/")) {
|
|
50
|
-
return templateRelativePath.replace("agents/", ".claude/agents/");
|
|
51
|
-
}
|
|
52
|
-
// .env.example -> .env.example (root)
|
|
53
|
-
if (templateRelativePath === ".env.example") {
|
|
54
|
-
return ".env.example";
|
|
55
|
-
}
|
|
56
|
-
// Default: keep the same path
|
|
57
|
-
return templateRelativePath;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Determine what action to take for each file
|
|
61
|
-
*/
|
|
62
|
-
function planFileActions(templateFiles, templatesDir, targetDir, manifest, options) {
|
|
63
|
-
const actions = [];
|
|
64
|
-
for (const templateFile of templateFiles) {
|
|
65
|
-
const sourcePath = join(templatesDir, templateFile);
|
|
66
|
-
const destRelativePath = getDestinationPath(templateFile);
|
|
67
|
-
const destPath = join(targetDir, destRelativePath);
|
|
68
|
-
// If destination doesn't exist, install it
|
|
69
|
-
if (!existsSync(destPath)) {
|
|
70
|
-
actions.push({
|
|
71
|
-
sourcePath,
|
|
72
|
-
destPath,
|
|
73
|
-
action: "install",
|
|
74
|
-
});
|
|
75
|
-
continue;
|
|
76
|
-
}
|
|
77
|
-
// Destination exists - check if it was modified
|
|
78
|
-
const destContent = readFileSync(destPath, "utf-8");
|
|
79
|
-
const wasModified = isFileModified(destRelativePath, destContent, manifest);
|
|
80
|
-
if (options.force) {
|
|
81
|
-
actions.push({
|
|
82
|
-
sourcePath,
|
|
83
|
-
destPath,
|
|
84
|
-
action: "overwrite",
|
|
85
|
-
reason: wasModified ? "user modified, forcing overwrite" : "forcing overwrite",
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
else if (wasModified) {
|
|
89
|
-
actions.push({
|
|
90
|
-
sourcePath,
|
|
91
|
-
destPath,
|
|
92
|
-
action: "skip-modified",
|
|
93
|
-
reason: "file was modified by user",
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
else {
|
|
97
|
-
// File exists but wasn't modified (same hash as manifest) - update it
|
|
98
|
-
actions.push({
|
|
99
|
-
sourcePath,
|
|
100
|
-
destPath,
|
|
101
|
-
action: "install",
|
|
102
|
-
reason: "updating to new version",
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
return actions;
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Execute the planned file actions
|
|
110
|
-
*/
|
|
111
|
-
function executeFileActions(actions, dryRun) {
|
|
112
|
-
const installed = [];
|
|
113
|
-
const skipped = [];
|
|
114
|
-
const overwritten = [];
|
|
115
|
-
for (const action of actions) {
|
|
116
|
-
const destRelative = action.destPath.split("/").slice(-5).join("/"); // Show last 5 path segments
|
|
117
|
-
if (action.action === "skip-modified" || action.action === "skip-exists") {
|
|
118
|
-
skipped.push(` ⚠ ${destRelative} (${action.reason || "user modified"})`);
|
|
119
|
-
continue;
|
|
120
|
-
}
|
|
121
|
-
if (dryRun) {
|
|
122
|
-
if (action.action === "overwrite") {
|
|
123
|
-
overwritten.push(` ↻ ${destRelative} (would overwrite)`);
|
|
124
|
-
}
|
|
125
|
-
else {
|
|
126
|
-
installed.push(` ✓ ${destRelative} (would install)`);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
else {
|
|
130
|
-
// Create directory if needed
|
|
131
|
-
const destDir = dirname(action.destPath);
|
|
132
|
-
if (!existsSync(destDir)) {
|
|
133
|
-
mkdirSync(destDir, { recursive: true });
|
|
134
|
-
}
|
|
135
|
-
// Copy the file
|
|
136
|
-
const content = readFileSync(action.sourcePath, "utf-8");
|
|
137
|
-
writeFileSync(action.destPath, content, "utf-8");
|
|
138
|
-
// Copy executable permissions if source is executable
|
|
139
|
-
const sourceStat = statSync(action.sourcePath);
|
|
140
|
-
if (sourceStat.mode & 0o111) {
|
|
141
|
-
// Make the destination executable
|
|
142
|
-
chmodSync(action.destPath, 0o755);
|
|
143
|
-
}
|
|
144
|
-
if (action.action === "overwrite") {
|
|
145
|
-
overwritten.push(` ↻ ${destRelative}`);
|
|
146
|
-
}
|
|
147
|
-
else {
|
|
148
|
-
installed.push(` ✓ ${destRelative}`);
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
// Print summary
|
|
153
|
-
if (installed.length > 0) {
|
|
154
|
-
console.log(dryRun ? "\nWould install:" : "\nInstalled:");
|
|
155
|
-
installed.forEach((msg) => console.log(msg));
|
|
156
|
-
}
|
|
157
|
-
if (overwritten.length > 0) {
|
|
158
|
-
console.log(dryRun ? "\nWould overwrite:" : "\nOverwritten:");
|
|
159
|
-
overwritten.forEach((msg) => console.log(msg));
|
|
160
|
-
}
|
|
161
|
-
if (skipped.length > 0) {
|
|
162
|
-
console.log("\nSkipped (user modified):");
|
|
163
|
-
skipped.forEach((msg) => console.log(msg));
|
|
164
|
-
if (!dryRun) {
|
|
165
|
-
console.log("\nUse --force to overwrite user-modified files.");
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
/**
|
|
170
|
-
* Main install function
|
|
171
|
-
*/
|
|
172
|
-
export async function install(options = {}) {
|
|
173
|
-
const targetDir = options.targetDir || process.cwd();
|
|
174
|
-
const packageDir = getPackageDir();
|
|
175
|
-
const templatesDir = join(packageDir, "templates");
|
|
176
|
-
console.log(`Installing claude-parallel to ${targetDir}...\n`);
|
|
177
|
-
// Check if running in a git repository
|
|
178
|
-
if (!existsSync(join(targetDir, ".git"))) {
|
|
179
|
-
console.warn("⚠ Warning: Target directory is not a git repository.");
|
|
180
|
-
console.warn(" claude-parallel works best in git repositories.\n");
|
|
181
|
-
}
|
|
182
|
-
// Check if templates directory exists
|
|
183
|
-
if (!existsSync(templatesDir)) {
|
|
184
|
-
throw new Error(`Templates directory not found at ${templatesDir}`);
|
|
185
|
-
}
|
|
186
|
-
// Read existing manifest
|
|
187
|
-
const manifest = readManifest(targetDir);
|
|
188
|
-
// Find all template files
|
|
189
|
-
const templateFiles = findTemplateFiles(templatesDir);
|
|
190
|
-
if (templateFiles.length === 0) {
|
|
191
|
-
throw new Error("No template files found");
|
|
192
|
-
}
|
|
193
|
-
// Plan what to do with each file
|
|
194
|
-
const actions = planFileActions(templateFiles, templatesDir, targetDir, manifest, options);
|
|
195
|
-
// Show what directories will be created
|
|
196
|
-
const dirsToCreate = new Set();
|
|
197
|
-
for (const action of actions) {
|
|
198
|
-
if (action.action === "install" || action.action === "overwrite") {
|
|
199
|
-
let dir = dirname(action.destPath);
|
|
200
|
-
while (dir !== targetDir && dir !== ".") {
|
|
201
|
-
dirsToCreate.add(dir);
|
|
202
|
-
dir = dirname(dir);
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
if (dirsToCreate.size > 0) {
|
|
207
|
-
console.log("Creating directories:");
|
|
208
|
-
Array.from(dirsToCreate)
|
|
209
|
-
.sort()
|
|
210
|
-
.forEach((dir) => {
|
|
211
|
-
const relDir = relative(targetDir, dir);
|
|
212
|
-
console.log(` - ${relDir}/`);
|
|
213
|
-
if (!options.dryRun && !existsSync(dir)) {
|
|
214
|
-
mkdirSync(dir, { recursive: true });
|
|
215
|
-
}
|
|
216
|
-
});
|
|
217
|
-
console.log("");
|
|
218
|
-
}
|
|
219
|
-
// Execute the actions
|
|
220
|
-
executeFileActions(actions, !!options.dryRun);
|
|
221
|
-
// Write manifest (unless dry-run)
|
|
222
|
-
if (!options.dryRun) {
|
|
223
|
-
const newManifest = createManifest("1.0.0", Object.fromEntries(actions
|
|
224
|
-
.filter((a) => a.action === "install" || a.action === "overwrite")
|
|
225
|
-
.map((a) => {
|
|
226
|
-
const destRelative = relative(targetDir, a.destPath);
|
|
227
|
-
const content = readFileSync(a.sourcePath, "utf-8");
|
|
228
|
-
return [destRelative, calculateFileHash(content)];
|
|
229
|
-
})));
|
|
230
|
-
// Merge with skipped files from old manifest
|
|
231
|
-
if (manifest) {
|
|
232
|
-
for (const action of actions) {
|
|
233
|
-
if (action.action === "skip-modified") {
|
|
234
|
-
const destRelative = relative(targetDir, action.destPath);
|
|
235
|
-
if (manifest.files[destRelative]) {
|
|
236
|
-
// Keep the old hash for skipped files
|
|
237
|
-
newManifest.files[destRelative] = manifest.files[destRelative];
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
writeManifest(targetDir, newManifest);
|
|
243
|
-
console.log("\n✓ Manifest saved to .github/claude-parallel/.install-manifest.json");
|
|
244
|
-
}
|
|
245
|
-
// Print summary
|
|
246
|
-
const installedCount = actions.filter((a) => a.action === "install" || a.action === "overwrite").length;
|
|
247
|
-
const skippedCount = actions.filter((a) => a.action === "skip-modified").length;
|
|
248
|
-
console.log("\nSummary:");
|
|
249
|
-
console.log(` - ${installedCount} file${installedCount !== 1 ? "s" : ""} ${options.dryRun ? "would be installed" : "installed"}`);
|
|
250
|
-
if (skippedCount > 0) {
|
|
251
|
-
console.log(` - ${skippedCount} file${skippedCount !== 1 ? "s" : ""} skipped (user modified)`);
|
|
252
|
-
}
|
|
253
|
-
if (!options.dryRun) {
|
|
254
|
-
console.log("\nDone! Run 'cat .env.example' to see required environment variables.");
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
//# sourceMappingURL=install.js.map
|
package/dist/cli/install.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"install.js","sourceRoot":"","sources":["../../src/cli/install.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,UAAU,EACV,SAAS,EACT,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,aAAa,GACd,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,cAAc,EAEd,YAAY,EACZ,aAAa,GACd,MAAM,eAAe,CAAC;AAgBvB,2DAA2D;AAC3D,SAAS,aAAa;IACpB,8EAA8E;IAC9E,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IACtC,0DAA0D;IAC1D,OAAO,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AACrC,CAAC;AAED;;GAEG;AACH,SAAS,iBAAiB,CAAC,YAAoB,EAAE,UAAkB,YAAY;IAC7E,MAAM,KAAK,GAAa,EAAE,CAAC;IAE3B,MAAM,OAAO,GAAG,WAAW,CAAC,YAAY,CAAC,CAAC;IAE1C,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;QAC5B,MAAM,QAAQ,GAAG,IAAI,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;QAC3C,MAAM,IAAI,GAAG,QAAQ,C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