imhcode 3.0.3 → 3.0.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.
Files changed (2) hide show
  1. package/bin/imhcode.js +11 -3
  2. package/package.json +1 -1
package/bin/imhcode.js CHANGED
@@ -2214,9 +2214,9 @@ if [ -f "$PROGRESS_FILE" ]; then
2214
2214
  fi
2215
2215
  fi
2216
2216
 
2217
- TASK="${taskDesc.replace(/"/g, '\\"')}"
2217
+ TASK="${escapeForShell(taskDesc)}"
2218
2218
 
2219
- echo "šŸ“‹ Running Task ${taskNum}: ${t.task}"
2219
+ echo "šŸ“‹ Running Task ${taskNum}: ${escapeForShell(t.task)}"
2220
2220
  echo " Agent: ${t.agent}"
2221
2221
  echo " Model: ${routedModel || 'default'} via ${routedEngine || 'default'}"
2222
2222
  echo " Tier: ${t.tier}"
@@ -2248,7 +2248,7 @@ ${tasks.map((t, i) => {
2248
2248
  const category = getAgentCategory(t.agent);
2249
2249
  const model = config?.model_routing?.[category]?.model || 'default';
2250
2250
  return `echo "\\n─────────────────────────────────────────────────────────────"
2251
- echo "šŸ“‹ Task ${taskNum}/${tasks.length}: ${t.task}"
2251
+ echo "šŸ“‹ Task ${taskNum}/${tasks.length}: ${escapeForShell(t.task)}"
2252
2252
  echo " Agent: ${t.agent} → ${model}"
2253
2253
  echo "─────────────────────────────────────────────────────────────"
2254
2254
  bash "$TASKS_DIR/task_${taskNum}.sh"`;
@@ -2722,6 +2722,14 @@ async function updateContextSprintStatus(cwd, sprintNum, status) {
2722
2722
 
2723
2723
  // ─── Utilities ────────────────────────────────────────────────────────────────
2724
2724
 
2725
+ function escapeForShell(str) {
2726
+ return (str || '')
2727
+ .replace(/\\/g, '\\\\')
2728
+ .replace(/"/g, '\\"')
2729
+ .replace(/\`/g, '\\`')
2730
+ .replace(/\$/g, '\\$');
2731
+ }
2732
+
2725
2733
  function askQuestion(query) {
2726
2734
  const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
2727
2735
  return new Promise(resolve => rl.question(query, ans => { rl.close(); resolve(ans.trim()); }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "imhcode",
3
- "version": "3.0.3",
3
+ "version": "3.0.5",
4
4
  "description": "IMH-Code — Imam Hussain Coding Harness Platform. A fast-first multi-agent AI coding framework with intelligent model routing. 19 generic role-based agents (planner, nextjs-executor, laravel-executor, etc.), configurable testing strategy, and 7 token-saving optimizations for rapid MVP development.",
5
5
  "main": "index.js",
6
6
  "bin": {