agent-canvas 0.1.4 → 0.1.5
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/bin/agent-canvas.ts +9 -9
- package/package.json +1 -1
package/bin/agent-canvas.ts
CHANGED
|
@@ -75,10 +75,10 @@ async function handleInstall(args: string[]) {
|
|
|
75
75
|
|
|
76
76
|
if (!mode) {
|
|
77
77
|
// Interactive prompt
|
|
78
|
-
process.
|
|
79
|
-
process.
|
|
80
|
-
process.
|
|
81
|
-
process.
|
|
78
|
+
process.stdout.write("Install canvas skill and hooks for Claude Code.\n\n");
|
|
79
|
+
process.stdout.write(" local — install to .claude/ in current project\n");
|
|
80
|
+
process.stdout.write(" global — install to ~/.claude/ for all projects\n\n");
|
|
81
|
+
process.stdout.write("Choose [local/global]: ");
|
|
82
82
|
|
|
83
83
|
const input = await readLine();
|
|
84
84
|
mode = input.trim().toLowerCase() as "local" | "global";
|
|
@@ -105,7 +105,7 @@ async function handleInstall(args: string[]) {
|
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
console.
|
|
108
|
+
console.log(` Skill installed to ${skillTarget}`);
|
|
109
109
|
|
|
110
110
|
// Install hook script
|
|
111
111
|
const hooksDir = join(targetBase, "agent-canvas");
|
|
@@ -114,7 +114,7 @@ async function handleInstall(args: string[]) {
|
|
|
114
114
|
const hookDest = join(hooksDir, "session-start.sh");
|
|
115
115
|
cpSync(hookSrc, hookDest);
|
|
116
116
|
try { require("fs").chmodSync(hookDest, 0o755); } catch {}
|
|
117
|
-
console.
|
|
117
|
+
console.log(` Hook script installed to ${hookDest}`);
|
|
118
118
|
|
|
119
119
|
// Register hook in settings.json
|
|
120
120
|
const settingsPath = join(targetBase, "settings.json");
|
|
@@ -141,12 +141,12 @@ async function handleInstall(args: string[]) {
|
|
|
141
141
|
|
|
142
142
|
mkdirSync(dirname(settingsPath), { recursive: true });
|
|
143
143
|
writeFileSync(settingsPath, JSON.stringify(settings, null, 2));
|
|
144
|
-
console.
|
|
144
|
+
console.log(` Hook registered in ${settingsPath}`);
|
|
145
145
|
} else {
|
|
146
|
-
console.
|
|
146
|
+
console.log(` Hook already registered in ${settingsPath}`);
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
-
console.
|
|
149
|
+
console.log(`\nInstalled! The /canvas command is now available in Claude Code.`);
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
// ── push ──
|