coder-config 0.44.26 → 0.44.28

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/config-loader.js CHANGED
@@ -30,7 +30,7 @@ const { envList, envSet, envUnset } = require('./lib/env');
30
30
  const { getProjectsRegistryPath, loadProjectsRegistry, saveProjectsRegistry, projectList, projectAdd, projectRemove } = require('./lib/projects');
31
31
  const { getWorkstreamsPath, loadWorkstreams, saveWorkstreams, workstreamList, workstreamCreate, workstreamUpdate, workstreamDelete, workstreamUse, workstreamActive, workstreamAddProject, workstreamRemoveProject, workstreamInject, workstreamDetect, workstreamGet, getActiveWorkstream, countWorkstreamsForProject, workstreamInstallHook, workstreamInstallHookGemini, workstreamInstallHookCodex, workstreamDeactivate, workstreamCheckPath, getSettingsPath, loadSettings, saveSettings, workstreamAddTrigger, workstreamRemoveTrigger, workstreamSetAutoActivate, setGlobalAutoActivate, shouldAutoActivate, workstreamCheckFolder, workstreamInstallCdHook, workstreamUninstallCdHook, workstreamCdHookStatus } = require('./lib/workstreams');
32
32
  const { getActivityPath, getDefaultActivity, loadActivity, saveActivity, detectProjectRoot, activityLog, activitySummary, generateWorkstreamName, activitySuggestWorkstreams, activityClear } = require('./lib/activity');
33
- const { getLoopsPath, loadLoops, saveLoops, loadLoopState, saveLoopState, loadHistory, saveHistory, loopList, loopCreate, loopGet, loopUpdate, loopDelete, loopStart, loopPause, loopResume, loopCancel, loopApprove, loopComplete, loopStatus, loopHistory, loopConfig, getActiveLoop, recordIteration, saveClarifications, savePlan, loadClarifications, loadPlan, loopInject, archiveLoop } = require('./lib/loops');
33
+ const { getLoopsPath, loadLoops, saveLoops, loadLoopState, saveLoopState, loadHistory, saveHistory, loopList, loopCreate, loopGet, loopUpdate, loopDelete, loopStart, loopPause, loopResume, loopCancel, loopApprove, loopComplete, loopFail, loopStatus, loopHistory, loopConfig, getActiveLoop, recordIteration, saveClarifications, savePlan, loadClarifications, loadPlan, loopInject, archiveLoop } = require('./lib/loops');
34
34
  const { getSessionStatus, showSessionStatus, flushContext, clearContext, installHooks: sessionInstallHooks, getFlushedContext, installFlushCommand, installAll: sessionInstallAll, SESSION_DIR, FLUSHED_CONTEXT_FILE } = require('./lib/sessions');
35
35
  const { runCli } = require('./lib/cli');
36
36
 
@@ -182,6 +182,7 @@ class ClaudeConfigManager {
182
182
  loopCancel(idOrName) { return loopCancel(this.installDir, idOrName); }
183
183
  loopApprove(idOrName) { return loopApprove(this.installDir, idOrName); }
184
184
  loopComplete(idOrName) { return loopComplete(this.installDir, idOrName); }
185
+ loopFail(idOrName, reason) { return loopFail(this.installDir, idOrName, reason); }
185
186
  loopStatus(idOrName) { return loopStatus(this.installDir, idOrName); }
186
187
  loopHistory() { return loopHistory(this.installDir); }
187
188
  loopConfig(updates) { return loopConfig(this.installDir, updates); }
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.26';
5
+ const VERSION = '0.44.28';
6
6
 
7
7
  // Tool-specific path configurations
8
8
  const TOOL_PATHS = {
package/lib/loops.js CHANGED
@@ -377,6 +377,7 @@ function loopStart(installDir, idOrName) {
377
377
  }
378
378
 
379
379
  state.status = 'running';
380
+ state.startedAt = state.startedAt || new Date().toISOString(); // Set on first start
380
381
  delete state.pauseReason;
381
382
  saveLoopState(installDir, state.id, state);
382
383
 
@@ -391,7 +392,8 @@ function loopStart(installDir, idOrName) {
391
392
 
392
393
  // Output run instructions (using official ralph-loop plugin)
393
394
  const task = state.task.original.replace(/"/g, '\\"');
394
- const completionPromise = state.completionPromise || 'DONE';
395
+ // Escape single quotes in completion promise (replace ' with '\'' for shell)
396
+ const completionPromise = (state.completionPromise || 'DONE').replace(/'/g, "'\\''");
395
397
  console.log('\nTo run this loop with Claude Code (uses official ralph-loop plugin):');
396
398
  console.log(` claude --dangerously-skip-permissions "/ralph-loop ${task} --max-iterations ${state.iterations.max} --completion-promise '${completionPromise}'"`);
397
399
 
@@ -429,6 +431,25 @@ function loopResume(installDir, idOrName) {
429
431
  return loopStart(installDir, idOrName);
430
432
  }
431
433
 
434
+ /**
435
+ * Mark a loop as failed
436
+ */
437
+ function loopFail(installDir, idOrName, reason = 'unknown error') {
438
+ const state = loopGet(installDir, idOrName);
439
+
440
+ if (!state) {
441
+ console.error(`Loop not found: ${idOrName}`);
442
+ return null;
443
+ }
444
+
445
+ state.status = 'failed';
446
+ state.pauseReason = reason;
447
+ saveLoopState(installDir, state.id, state);
448
+
449
+ console.log(`✗ Loop failed: ${state.name} - ${reason}`);
450
+ return state;
451
+ }
452
+
432
453
  /**
433
454
  * Cancel a loop
434
455
  */
@@ -811,6 +832,7 @@ module.exports = {
811
832
  loopCancel,
812
833
  loopApprove,
813
834
  loopComplete,
835
+ loopFail,
814
836
 
815
837
  // Status operations
816
838
  loopStatus,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coder-config",
3
- "version": "0.44.26",
3
+ "version": "0.44.28",
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",