@shaykec/claude-teach 0.4.0 → 0.5.1
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/package.json +2 -2
- package/src/cli.js +22 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shaykec/claude-teach",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "Socratic AI teaching platform — learn anything through guided dialogue, visual canvas, and gamification",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/cli.js",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"chalk": "^5.3.0",
|
|
18
18
|
"@shaykec/bridge": "0.3.0",
|
|
19
19
|
"@shaykec/shared": "0.1.0",
|
|
20
|
-
"@shaykec/plugin": "0.
|
|
20
|
+
"@shaykec/plugin": "0.2.0",
|
|
21
21
|
"@shaykec/extension": "0.1.0"
|
|
22
22
|
},
|
|
23
23
|
"publishConfig": {
|
package/src/cli.js
CHANGED
|
@@ -323,13 +323,26 @@ program
|
|
|
323
323
|
if (opts.server !== false) {
|
|
324
324
|
try {
|
|
325
325
|
const { startServer } = await import('@shaykec/bridge');
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
326
|
+
const port = parseInt(opts.port, 10);
|
|
327
|
+
server = await new Promise((resolve, reject) => {
|
|
328
|
+
const srv = startServer({
|
|
329
|
+
port,
|
|
330
|
+
progressProvider: { getProgress: () => loadProgress(ROOT) },
|
|
331
|
+
onReady: () => resolve(srv),
|
|
332
|
+
});
|
|
333
|
+
// Handle port-in-use and other startup errors
|
|
334
|
+
srv.server.on('error', (err) => {
|
|
335
|
+
if (err.code === 'EADDRINUSE') {
|
|
336
|
+
reject(new Error(`Port ${port} is already in use. Kill the old process or use --port <other>`));
|
|
337
|
+
} else {
|
|
338
|
+
reject(err);
|
|
339
|
+
}
|
|
340
|
+
});
|
|
329
341
|
});
|
|
330
342
|
console.log(chalk.dim(` Bridge server on port ${opts.port}`));
|
|
331
343
|
} catch (err) {
|
|
332
|
-
console.warn(chalk.yellow(` Bridge server failed
|
|
344
|
+
console.warn(chalk.yellow(` Bridge server failed: ${err.message}`));
|
|
345
|
+
console.warn(chalk.dim(' Continuing without bridge server (visuals unavailable)'));
|
|
333
346
|
}
|
|
334
347
|
}
|
|
335
348
|
|
|
@@ -337,7 +350,11 @@ program
|
|
|
337
350
|
console.log(chalk.green('Launching Claude Code with ClaudeTeach...'));
|
|
338
351
|
console.log(chalk.dim(` Plugin: ${pluginDir}`));
|
|
339
352
|
|
|
340
|
-
const claudeArgs = [
|
|
353
|
+
const claudeArgs = [
|
|
354
|
+
'--plugin-dir', pluginDir,
|
|
355
|
+
'--allowedTools', 'Bash(*),Read,Write,Edit,Glob,Grep',
|
|
356
|
+
...cmd.args,
|
|
357
|
+
];
|
|
341
358
|
const child = spawn('claude', claudeArgs, { stdio: 'inherit' });
|
|
342
359
|
|
|
343
360
|
child.on('error', (err) => {
|