@prevalentware/opencode-goal-plugin 0.1.22 → 0.1.24

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/dist/server.js +15 -2
  2. package/package.json +3 -3
package/dist/server.js CHANGED
@@ -1144,7 +1144,7 @@ class TaskTracker {
1144
1144
  }
1145
1145
  async refreshLiveChildren(client, parentSessionID) {
1146
1146
  const session = client.session;
1147
- if (!session.children || !session.status)
1147
+ if (!session.children)
1148
1148
  return;
1149
1149
  let childIDs;
1150
1150
  try {
@@ -1154,7 +1154,8 @@ class TaskTracker {
1154
1154
  } catch {
1155
1155
  return;
1156
1156
  }
1157
- if (childIDs.length === 0)
1157
+ this.markAbsentRunningChildren(parentSessionID, new Set(childIDs));
1158
+ if (childIDs.length === 0 || !session.status)
1158
1159
  return;
1159
1160
  let statuses;
1160
1161
  try {
@@ -1240,6 +1241,16 @@ class TaskTracker {
1240
1241
  continue;
1241
1242
  this.snapshotIdleHolds.delete(key);
1242
1243
  this.settledSnapshotIdleTasks.add(key);
1244
+ const task = this.tasks.get(hold.taskID);
1245
+ if (task?.parentSessionID === hold.parentSessionID && task.state === "running")
1246
+ this.tasks.delete(hold.taskID);
1247
+ }
1248
+ }
1249
+ markAbsentRunningChildren(parentSessionID, liveChildIDs) {
1250
+ for (const task of this.tasks.values()) {
1251
+ if (task.parentSessionID !== parentSessionID || task.state !== "running" || liveChildIDs.has(task.taskID))
1252
+ continue;
1253
+ this.markSnapshotIdle(parentSessionID, task.taskID);
1243
1254
  }
1244
1255
  }
1245
1256
  snapshotIdleKey(parentSessionID, taskID) {
@@ -1364,6 +1375,8 @@ var server = async ({ client }, options) => {
1364
1375
  await pauseGoalForPlanMode(sessionID);
1365
1376
  return;
1366
1377
  }
1378
+ if (busySessions.has(sessionID))
1379
+ return;
1367
1380
  if (!fromTaskDeferral && taskDeferredSessions.has(sessionID)) {
1368
1381
  scheduleSettledContinuation(sessionID);
1369
1382
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prevalentware/opencode-goal-plugin",
3
- "version": "0.1.22",
3
+ "version": "0.1.24",
4
4
  "description": "OpenCode goal plugin that adds Codex-style long-running goal mode, /goal commands, persistence, and TUI status for AI coding agents.",
5
5
  "keywords": [
6
6
  "opencode",
@@ -54,16 +54,16 @@
54
54
  },
55
55
  "dependencies": {
56
56
  "@opencode-ai/plugin": "^1.17.1",
57
+ "@opentui/solid": "^0.4.0",
57
58
  "effect": "^3.21.2",
59
+ "solid-js": "1.9.12",
58
60
  "zod": "^4.1.8"
59
61
  },
60
62
  "devDependencies": {
61
63
  "@eslint/js": "^10.0.1",
62
64
  "@opentui/core": "^0.4.0",
63
- "@opentui/solid": "^0.4.0",
64
65
  "@types/bun": "^1.3.13",
65
66
  "eslint": "^10.3.0",
66
- "solid-js": "1.9.12",
67
67
  "typescript": "^6.0.3",
68
68
  "typescript-eslint": "^8.59.2"
69
69
  },