@buildautomaton/cli 0.1.11 → 0.1.12

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/index.js CHANGED
@@ -31730,13 +31730,6 @@ function attachFirehoseAfterIdentified(ctx, params) {
31730
31730
  if (myGen !== state.firehoseGeneration) return;
31731
31731
  state.firehoseHandle = null;
31732
31732
  if (state.closedByUser) return;
31733
- const main = state.currentWs;
31734
- if (!main || main.readyState !== wrapper_default.OPEN) {
31735
- logFn(
31736
- `${PROXY_AND_LOG_SERVICE_LABEL} Not reconnecting preview and log stream: main bridge connection is not open.`
31737
- );
31738
- return;
31739
- }
31740
31733
  beginFirehoseDeferredDisconnect(firehoseCtx(), code, reason, logFn);
31741
31734
  clearFirehoseReconnectTimer();
31742
31735
  const delay2 = reconnectDelayMs(state.firehoseReconnectAttempt);
@@ -31751,15 +31744,6 @@ function attachFirehoseAfterIdentified(ctx, params) {
31751
31744
  state.firehoseReconnectTimeout = setTimeout(() => {
31752
31745
  state.firehoseReconnectTimeout = null;
31753
31746
  if (state.closedByUser) return;
31754
- const w = state.currentWs;
31755
- if (!w || w.readyState !== wrapper_default.OPEN) {
31756
- if (state.firehoseQuiet.verboseLogs) {
31757
- logFn(
31758
- `${PROXY_AND_LOG_SERVICE_LABEL} Reconnect skipped: main bridge connection closed before preview stream could reconnect.`
31759
- );
31760
- }
31761
- return;
31762
- }
31763
31747
  const p = state.lastFirehoseParams;
31764
31748
  if (!p) {
31765
31749
  if (state.firehoseQuiet.verboseLogs) {
@@ -32161,21 +32145,29 @@ var handlePromptMessage = (msg, deps) => {
32161
32145
  };
32162
32146
 
32163
32147
  // src/agents/acp/from-bridge/handle-bridge-cancel-run.ts
32164
- function handleBridgeCancelRun(msg, { log: log2, acpManager }) {
32148
+ async function handleBridgeCancelRun(msg, { log: log2, acpManager, getWs }) {
32165
32149
  const runId = msg.runId;
32166
32150
  if (!runId) return;
32167
- void acpManager.cancelRun(runId).then((sent) => {
32168
- if (!sent) {
32169
- log2(
32170
- `[Agent] Cancel ignored for run ${runId.slice(0, 8)}\u2026 (no active run or cancel not available).`
32171
- );
32172
- }
32151
+ const sessionId = typeof msg.sessionId === "string" ? msg.sessionId.trim() : "";
32152
+ const sent = await acpManager.cancelRun(runId);
32153
+ if (sent) return;
32154
+ log2(`[Agent] Cancel: no local run for ${runId.slice(0, 8)}\u2026 \u2014 reporting stopped to cloud.`);
32155
+ const ws = getWs();
32156
+ if (!ws || ws.readyState !== 1) return;
32157
+ sendWsMessage(ws, {
32158
+ type: "prompt_result",
32159
+ id: `cancel-nack-${runId}`,
32160
+ runId,
32161
+ ...sessionId ? { sessionId } : {},
32162
+ success: false,
32163
+ error: "Stopped by user",
32164
+ stopReason: "no_local_run"
32173
32165
  });
32174
32166
  }
32175
32167
 
32176
32168
  // src/bridge/routing/handlers/cancel-run.ts
32177
32169
  var handleCancelRunMessage = (msg, deps) => {
32178
- handleBridgeCancelRun(msg, deps);
32170
+ void handleBridgeCancelRun(msg, deps);
32179
32171
  };
32180
32172
 
32181
32173
  // src/agents/acp/from-bridge/handle-bridge-cursor-request-response.ts