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 CHANGED
@@ -2,7 +2,7 @@
2
2
  * Constants and tool path configurations
3
3
  */
4
4
 
5
- const VERSION = '0.44.37';
5
+ const VERSION = '0.44.39';
6
6
 
7
7
  // Tool-specific path configurations
8
8
  const TOOL_PATHS = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coder-config",
3
- "version": "0.44.37",
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",
@@ -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;
@@ -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 ready indicator in output
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 shows various ready indicators:
100
- // - ">" prompt character
101
- // - "Claude" in output after startup
102
- // - Input area becomes active
103
- // Look for the prompt or "Claude" appearing after some output
104
- if (outputBuffer.length > 100 &&
105
- (outputBuffer.includes('>') ||
106
- outputBuffer.includes('Claude') ||
107
- outputBuffer.includes('?') ||
108
- outputBuffer.includes(''))) {
109
- delayedCmdSent = true;
110
- // Small delay after detecting ready state
111
- setTimeout(() => {
112
- ptyProcess.write(delayedCmd + '\r');
113
- }, 300);
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