@prevalentware/opencode-goal-plugin 0.1.57 → 0.1.58
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/dist/server.js +12 -3
- package/package.json +1 -1
package/dist/server.js
CHANGED
|
@@ -4420,12 +4420,10 @@ async function setupV2(context) {
|
|
|
4420
4420
|
const pursue = command.action === "resume" || command.action === "goal" && args !== "" && !controlOnly;
|
|
4421
4421
|
const signal = execution?.signal ? AbortSignal.any([abortController.signal, execution.signal]) : abortController.signal;
|
|
4422
4422
|
let admitted = false;
|
|
4423
|
-
let cancellation;
|
|
4424
4423
|
const cancel = () => {
|
|
4425
4424
|
if (!pursue || disposed)
|
|
4426
4425
|
return;
|
|
4427
4426
|
goalServices.stopAutonomy?.(input.sessionID);
|
|
4428
|
-
cancellation = cancelActiveGoal(input.sessionID).catch((error) => v2ErrorLog("Failed to persist command cancellation", error));
|
|
4429
4427
|
};
|
|
4430
4428
|
execution?.signal?.addEventListener("abort", cancel, { once: true });
|
|
4431
4429
|
try {
|
|
@@ -4470,7 +4468,6 @@ async function setupV2(context) {
|
|
|
4470
4468
|
}
|
|
4471
4469
|
} finally {
|
|
4472
4470
|
execution?.signal?.removeEventListener("abort", cancel);
|
|
4473
|
-
await cancellation;
|
|
4474
4471
|
}
|
|
4475
4472
|
}
|
|
4476
4473
|
});
|
|
@@ -4503,6 +4500,18 @@ async function setupV2(context) {
|
|
|
4503
4500
|
}
|
|
4504
4501
|
}));
|
|
4505
4502
|
}
|
|
4503
|
+
try {
|
|
4504
|
+
const hookInterrupt = context.session.hook;
|
|
4505
|
+
registrations.push(await hookInterrupt("interrupt", async ({ sessionID }) => {
|
|
4506
|
+
markSessionOwnership(sessionID, true);
|
|
4507
|
+
goalServices.stopAutonomy?.(sessionID);
|
|
4508
|
+
try {
|
|
4509
|
+
await cancelActiveGoal(sessionID);
|
|
4510
|
+
} catch (error) {
|
|
4511
|
+
v2ErrorLog("Failed to persist explicit session cancellation", error);
|
|
4512
|
+
}
|
|
4513
|
+
}));
|
|
4514
|
+
} catch {}
|
|
4506
4515
|
registrations.push(await context.tool.transform((draft) => {
|
|
4507
4516
|
for (const tool of goalToolsV2(goalServices))
|
|
4508
4517
|
draft.add(tool);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prevalentware/opencode-goal-plugin",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.58",
|
|
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",
|