clay-server 2.18.0 → 2.18.1-beta.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.
Files changed (2) hide show
  1. package/lib/project.js +10 -3
  2. package/package.json +1 -1
package/lib/project.js CHANGED
@@ -438,11 +438,13 @@ function createProjectContext(opts) {
438
438
  craftingSessionId: null,
439
439
  startedAt: null,
440
440
  loopId: null,
441
+ loopFilesId: null,
441
442
  };
442
443
 
443
444
  function loopDir() {
444
- if (!loopState.loopId) return null;
445
- return path.join(cwd, ".claude", "loops", loopState.loopId);
445
+ var id = loopState.loopFilesId || loopState.loopId;
446
+ if (!id) return null;
447
+ return path.join(cwd, ".claude", "loops", id);
446
448
  }
447
449
 
448
450
  function generateLoopId() {
@@ -469,6 +471,7 @@ function createProjectContext(opts) {
469
471
  wizardData: loopState.wizardData,
470
472
  startedAt: loopState.startedAt,
471
473
  loopId: loopState.loopId,
474
+ loopFilesId: loopState.loopFilesId || null,
472
475
  };
473
476
  var tmpPath = _loopStatePath + ".tmp";
474
477
  fs.writeFileSync(tmpPath, JSON.stringify(data, null, 2));
@@ -491,6 +494,7 @@ function createProjectContext(opts) {
491
494
  loopState.wizardData = data.wizardData || null;
492
495
  loopState.startedAt = data.startedAt || null;
493
496
  loopState.loopId = data.loopId || null;
497
+ loopState.loopFilesId = data.loopFilesId || null;
494
498
  // SDK sessions cannot survive daemon restart
495
499
  loopState.currentSessionId = null;
496
500
  loopState.judgeSessionId = null;
@@ -557,6 +561,7 @@ function createProjectContext(opts) {
557
561
  loopState.craftingSessionId = null;
558
562
  loopState.startedAt = null;
559
563
  loopState.loopId = null;
564
+ loopState.loopFilesId = null;
560
565
  saveLoopState();
561
566
  }
562
567
 
@@ -691,9 +696,10 @@ function createProjectContext(opts) {
691
696
  }
692
697
  // Set the loopId to the schedule's own id (not the linked task) so sidebar groups correctly
693
698
  loopState.loopId = record.id;
699
+ loopState.loopFilesId = loopFilesId;
694
700
  loopState.wizardData = null;
695
701
  activeRegistryId = record.id;
696
- console.log("[loop-registry] Auto-starting loop: " + record.name + " (" + loopId + ")");
702
+ console.log("[loop-registry] Auto-starting loop: " + record.name + " (" + loopState.loopId + ")");
697
703
  send({ type: "schedule_run_started", recordId: record.id });
698
704
  startLoop({ maxIterations: record.maxIterations, name: record.name });
699
705
  },
@@ -3473,6 +3479,7 @@ function createProjectContext(opts) {
3473
3479
  return;
3474
3480
  }
3475
3481
  loopState.loopId = rerunRec.id;
3482
+ loopState.loopFilesId = null;
3476
3483
  activeRegistryId = null; // not a scheduled trigger
3477
3484
  send({ type: "loop_rerun_started", recordId: rerunRec.id });
3478
3485
  startLoop();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clay-server",
3
- "version": "2.18.0",
3
+ "version": "2.18.1-beta.1",
4
4
  "description": "Web UI for Claude Code. Any device. Push notifications.",
5
5
  "bin": {
6
6
  "clay-server": "./bin/cli.js",