teapot-coding-agent 0.37.88 → 0.37.90

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.
@@ -525,6 +525,18 @@ export class Agent {
525
525
  * (declared above), so a panel that reads them before the load shows "nothing yet" rather than
526
526
  * waiting — which is the right trade for a boot that touches only config.json and skills.
527
527
  */
528
+ /**
529
+ * The WORKSPACE existence check belongs here, at boot — it is not a session-directory read.
530
+ *
531
+ * It was swept into the deferred bundle with goal/todo, which silently disabled the ghost marker:
532
+ * `isGhost` only ever CLEARS `workspaceMissing` (see the getter), so if nothing computes it at boot
533
+ * an agent whose workspace is gone never reports as a ghost. Reported as "ghostが効かなくなった".
534
+ *
535
+ * `existsSync` rather than `fs.stat`: MEASURED, 445 async stats cost ~1s of promise overhead for a
536
+ * single syscall each, while this check is a stat of a path FROM config.json — no session directory
537
+ * is opened, so it does not break the boot rule.
538
+ */
539
+ this.workspaceMissing = !existsSync(this.workspace);
528
540
  if (!this.opts.deferSessionReads)
529
541
  await this.loadSessionState();
530
542
  if (this.opts.restoreSession) {
@@ -544,10 +556,6 @@ export class Agent {
544
556
  return;
545
557
  this.sessionStateLoaded = true;
546
558
  await this.migrateMemoryToAgentScope();
547
- this.workspaceMissing = !(await fs
548
- .stat(this.workspace)
549
- .then(() => true)
550
- .catch(() => false));
551
559
  await this.migrateGoalFromWorkspace();
552
560
  this.goal = (await this.readGoalStore()) ?? this.goal;
553
561
  this.todo = await fs.readFile(this.todoFile, "utf8").catch(() => "");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "teapot-coding-agent",
3
- "version": "0.37.88",
3
+ "version": "0.37.90",
4
4
  "description": "A lightweight, always-on multi-agent harness for AI coding agents",
5
5
  "type": "module",
6
6
  "license": "AGPL-3.0-or-later",