coder-config 0.44.37 → 0.44.39
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/lib/constants.js +1 -1
- package/package.json +1 -1
- package/ui/routes/loops.js +16 -0
- package/ui/terminal-server.cjs +25 -16
package/lib/constants.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "coder-config",
|
|
3
|
-
"version": "0.44.
|
|
3
|
+
"version": "0.44.39",
|
|
4
4
|
"description": "Configuration manager for AI coding tools - Claude Code, Gemini CLI, Codex CLI, Antigravity. Manage MCPs, rules, permissions, memory, and workstreams.",
|
|
5
5
|
"author": "regression.io",
|
|
6
6
|
"main": "config-loader.js",
|
package/ui/routes/loops.js
CHANGED
|
@@ -559,6 +559,7 @@ ${task}
|
|
|
559
559
|
* Fix the ralph-loop plugin structure by converting commands to skills format
|
|
560
560
|
* Claude Code expects skills/<name>/SKILL.md, but the plugin has commands/<name>.md
|
|
561
561
|
* Also fixes frontmatter issues (hide-from-slash-command-tool -> name)
|
|
562
|
+
* Also fixes hooks.json to use absolute paths instead of ${CLAUDE_PLUGIN_ROOT}
|
|
562
563
|
*/
|
|
563
564
|
function fixRalphLoopPluginStructure() {
|
|
564
565
|
const pluginCacheDir = path.join(os.homedir(), '.claude', 'plugins', 'cache', 'claude-plugins-official', 'ralph-loop');
|
|
@@ -577,6 +578,21 @@ function fixRalphLoopPluginStructure() {
|
|
|
577
578
|
const versionDir = path.join(pluginCacheDir, version);
|
|
578
579
|
const commandsDir = path.join(versionDir, 'commands');
|
|
579
580
|
const skillsDir = path.join(versionDir, 'skills');
|
|
581
|
+
const hooksDir = path.join(versionDir, 'hooks');
|
|
582
|
+
|
|
583
|
+
// Fix hooks.json - replace ${CLAUDE_PLUGIN_ROOT} with actual path
|
|
584
|
+
const hooksJsonPath = path.join(hooksDir, 'hooks.json');
|
|
585
|
+
if (fs.existsSync(hooksJsonPath)) {
|
|
586
|
+
try {
|
|
587
|
+
let hooksContent = fs.readFileSync(hooksJsonPath, 'utf8');
|
|
588
|
+
if (hooksContent.includes('${CLAUDE_PLUGIN_ROOT}')) {
|
|
589
|
+
hooksContent = hooksContent.replace(/\$\{CLAUDE_PLUGIN_ROOT\}/g, versionDir);
|
|
590
|
+
fs.writeFileSync(hooksJsonPath, hooksContent, 'utf8');
|
|
591
|
+
}
|
|
592
|
+
} catch (e) {
|
|
593
|
+
// Ignore errors fixing hooks
|
|
594
|
+
}
|
|
595
|
+
}
|
|
580
596
|
|
|
581
597
|
if (!fs.existsSync(commandsDir)) {
|
|
582
598
|
continue;
|
package/ui/terminal-server.cjs
CHANGED
|
@@ -87,30 +87,39 @@ class TerminalServer {
|
|
|
87
87
|
ptyProcess.write(cmd + '\r');
|
|
88
88
|
|
|
89
89
|
// If delayed command provided, send it when claude is ready
|
|
90
|
-
// Watch for claude's
|
|
90
|
+
// Watch for claude's input prompt in output
|
|
91
91
|
if (delayedCmd) {
|
|
92
92
|
let delayedCmdSent = false;
|
|
93
93
|
let outputBuffer = '';
|
|
94
|
+
let bannerSeen = false;
|
|
94
95
|
|
|
95
96
|
const checkReady = (data) => {
|
|
96
97
|
if (delayedCmdSent) return;
|
|
97
98
|
outputBuffer += data;
|
|
98
99
|
|
|
99
|
-
// Claude
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
100
|
+
// First wait for the Claude Code banner to appear
|
|
101
|
+
if (!bannerSeen && outputBuffer.includes('Claude Code')) {
|
|
102
|
+
bannerSeen = true;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// After banner, look for the actual input prompt
|
|
106
|
+
// Claude shows "> " or "❯ " when ready for input
|
|
107
|
+
// The prompt appears on its own line after the banner
|
|
108
|
+
if (bannerSeen) {
|
|
109
|
+
const lines = outputBuffer.split('\n');
|
|
110
|
+
const lastFewLines = lines.slice(-5).join('\n');
|
|
111
|
+
|
|
112
|
+
// Look for prompt indicators at start of line
|
|
113
|
+
// > Try "..." or just > waiting for input
|
|
114
|
+
if (lastFewLines.match(/^[>\❯]\s/m) ||
|
|
115
|
+
lastFewLines.includes('> Try') ||
|
|
116
|
+
lastFewLines.includes('❯ ')) {
|
|
117
|
+
delayedCmdSent = true;
|
|
118
|
+
// Small delay after detecting ready state
|
|
119
|
+
setTimeout(() => {
|
|
120
|
+
ptyProcess.write(delayedCmd + '\r');
|
|
121
|
+
}, 200);
|
|
122
|
+
}
|
|
114
123
|
}
|
|
115
124
|
};
|
|
116
125
|
|