conductor-4-all 0.0.1 → 0.0.3
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/index.cjs +11 -8
- package/dist/index.js +11 -8
- package/package.json +3 -2
package/dist/index.cjs
CHANGED
|
@@ -96,13 +96,16 @@ async function loadTemplate(templatePath) {
|
|
|
96
96
|
|
|
97
97
|
// src/utils/install.ts
|
|
98
98
|
var { existsSync, ensureDir, writeFile, copy } = import_fs_extra.default;
|
|
99
|
-
async function validateProjectDirectory(targetDir) {
|
|
99
|
+
async function validateProjectDirectory(targetDir, agentType) {
|
|
100
100
|
if (!existsSync(targetDir)) {
|
|
101
101
|
throw new Error(`Target directory does not exist: ${targetDir}`);
|
|
102
102
|
}
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
const agentDir = agentType === "claude-code" ? ".claude" : ".opencode";
|
|
104
|
+
const agentPath = (0, import_path2.join)(targetDir, agentDir);
|
|
105
|
+
const conductorPath = (0, import_path2.join)(agentPath, "conductor");
|
|
106
|
+
const setupFile = (0, import_path2.join)(agentPath, "commands", "conductor:setup.md");
|
|
107
|
+
if (existsSync(conductorPath) && existsSync(setupFile)) {
|
|
108
|
+
throw new Error(`Conductor (${agentType}) is already installed in: ${targetDir}`);
|
|
106
109
|
}
|
|
107
110
|
return targetDir;
|
|
108
111
|
}
|
|
@@ -150,12 +153,12 @@ async function installHandler(argv) {
|
|
|
150
153
|
const targetDir = (0, import_path3.resolve)(process.cwd(), argv.path);
|
|
151
154
|
try {
|
|
152
155
|
console.log(`Initializing Conductor in: ${targetDir}`);
|
|
153
|
-
console.log("Step 1:
|
|
154
|
-
const validatedPath = await validateProjectDirectory(targetDir);
|
|
155
|
-
console.log(`\u2714 Validation complete: ${validatedPath}`);
|
|
156
|
-
console.log("\nStep 2: Prompting for agent selection...");
|
|
156
|
+
console.log("Step 1: Prompting for agent selection...");
|
|
157
157
|
const agent = await promptForAgent();
|
|
158
158
|
console.log(`\u2714 Selected agent: ${agent}`);
|
|
159
|
+
console.log("\nStep 2: Validating project directory...");
|
|
160
|
+
const validatedPath = await validateProjectDirectory(targetDir, agent);
|
|
161
|
+
console.log(`\u2714 Validation complete: ${validatedPath}`);
|
|
159
162
|
console.log("\nStep 3: Creating Conductor directories...");
|
|
160
163
|
await createConductorDirectories(validatedPath, agent);
|
|
161
164
|
console.log("\u2714 Directories created");
|
package/dist/index.js
CHANGED
|
@@ -69,13 +69,16 @@ async function loadTemplate(templatePath) {
|
|
|
69
69
|
|
|
70
70
|
// src/utils/install.ts
|
|
71
71
|
var { existsSync, ensureDir, writeFile, copy } = fs;
|
|
72
|
-
async function validateProjectDirectory(targetDir) {
|
|
72
|
+
async function validateProjectDirectory(targetDir, agentType) {
|
|
73
73
|
if (!existsSync(targetDir)) {
|
|
74
74
|
throw new Error(`Target directory does not exist: ${targetDir}`);
|
|
75
75
|
}
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
|
|
76
|
+
const agentDir = agentType === "claude-code" ? ".claude" : ".opencode";
|
|
77
|
+
const agentPath = join2(targetDir, agentDir);
|
|
78
|
+
const conductorPath = join2(agentPath, "conductor");
|
|
79
|
+
const setupFile = join2(agentPath, "commands", "conductor:setup.md");
|
|
80
|
+
if (existsSync(conductorPath) && existsSync(setupFile)) {
|
|
81
|
+
throw new Error(`Conductor (${agentType}) is already installed in: ${targetDir}`);
|
|
79
82
|
}
|
|
80
83
|
return targetDir;
|
|
81
84
|
}
|
|
@@ -123,12 +126,12 @@ async function installHandler(argv) {
|
|
|
123
126
|
const targetDir = resolve2(process.cwd(), argv.path);
|
|
124
127
|
try {
|
|
125
128
|
console.log(`Initializing Conductor in: ${targetDir}`);
|
|
126
|
-
console.log("Step 1:
|
|
127
|
-
const validatedPath = await validateProjectDirectory(targetDir);
|
|
128
|
-
console.log(`\u2714 Validation complete: ${validatedPath}`);
|
|
129
|
-
console.log("\nStep 2: Prompting for agent selection...");
|
|
129
|
+
console.log("Step 1: Prompting for agent selection...");
|
|
130
130
|
const agent = await promptForAgent();
|
|
131
131
|
console.log(`\u2714 Selected agent: ${agent}`);
|
|
132
|
+
console.log("\nStep 2: Validating project directory...");
|
|
133
|
+
const validatedPath = await validateProjectDirectory(targetDir, agent);
|
|
134
|
+
console.log(`\u2714 Validation complete: ${validatedPath}`);
|
|
132
135
|
console.log("\nStep 3: Creating Conductor directories...");
|
|
133
136
|
await createConductorDirectories(validatedPath, agent);
|
|
134
137
|
console.log("\u2714 Directories created");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "conductor-4-all",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "Conductor spec-driven development CLI - TypeScript/Node.js version",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
"homepage": "https://github.com/hlhr202/Conductor-for-all",
|
|
10
10
|
"type": "module",
|
|
11
11
|
"bin": {
|
|
12
|
-
"conductor": "./dist/index.js"
|
|
12
|
+
"conductor": "./dist/index.js",
|
|
13
|
+
"conductor-4-all": "./dist/index.js"
|
|
13
14
|
},
|
|
14
15
|
"files": [
|
|
15
16
|
"dist",
|