@buildautomaton/cli 0.1.22 → 0.1.23
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/cli.js +19 -2
- package/dist/cli.js.map +2 -2
- package/dist/index.js +19 -2
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -25064,7 +25064,7 @@ var {
|
|
|
25064
25064
|
} = import_index.default;
|
|
25065
25065
|
|
|
25066
25066
|
// src/cli-version.ts
|
|
25067
|
-
var CLI_VERSION = "0.1.
|
|
25067
|
+
var CLI_VERSION = "0.1.23".length > 0 ? "0.1.23" : "0.0.0-dev";
|
|
25068
25068
|
|
|
25069
25069
|
// src/cli/defaults.ts
|
|
25070
25070
|
var DEFAULT_API_URL = process.env.BUILDAUTOMATON_API_URL ?? "https://api.buildautomaton.com";
|
|
@@ -37180,7 +37180,24 @@ async function applyPromptQueueStateFromServer(msg, deps) {
|
|
|
37180
37180
|
if (!file2) continue;
|
|
37181
37181
|
const cancelRow = file2.turns.find((t) => t.serverState === "cancel_requested" && t.lastClientState === "running");
|
|
37182
37182
|
if (cancelRow) {
|
|
37183
|
-
await deps.acpManager.cancelRun(cancelRow.turnId);
|
|
37183
|
+
const localCancelHandled = await deps.acpManager.cancelRun(cancelRow.turnId);
|
|
37184
|
+
if (!localCancelHandled) {
|
|
37185
|
+
deps.log(
|
|
37186
|
+
`[Queue] server cancel_requested for ${cancelRow.turnId.slice(0, 8)}\u2026 but no local agent run is active (e.g. after CLI restart); marking cancelled and notifying bridge.`
|
|
37187
|
+
);
|
|
37188
|
+
finalizePromptTurnOnBridge(deps.getWs, cancelRow.turnId, false, { terminalClientState: "cancelled" });
|
|
37189
|
+
const ws = deps.getWs();
|
|
37190
|
+
if (ws && cancelRow.sessionId) {
|
|
37191
|
+
sendWsMessage(ws, {
|
|
37192
|
+
type: "prompt_result",
|
|
37193
|
+
sessionId: cancelRow.sessionId,
|
|
37194
|
+
runId: cancelRow.turnId,
|
|
37195
|
+
success: false,
|
|
37196
|
+
error: "Stopped by user",
|
|
37197
|
+
stopReason: "cancelled"
|
|
37198
|
+
});
|
|
37199
|
+
}
|
|
37200
|
+
}
|
|
37184
37201
|
}
|
|
37185
37202
|
}
|
|
37186
37203
|
const report = {};
|