@bivy/bivy 0.16.9-staging.19 → 0.16.9-staging.20

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 +14 -2
  2. package/package.json +1 -1
package/dist/server.js CHANGED
@@ -2144,9 +2144,21 @@ const RELAY_COMMANDS = {
2144
2144
  scheduleAdvertise();
2145
2145
  },
2146
2146
  abort(msg, ctx) {
2147
- const record = resolveSession(msg.sessionId);
2148
- if (!record || !sessionBusy(record))
2147
+ const sessionId = String(msg.sessionId ?? "");
2148
+ const record = resolveSession(sessionId);
2149
+ // A Stop can race the turn settling (or arrive after another client already
2150
+ // stopped it). Always answer that race with authoritative state so a client
2151
+ // that still has a stale working dot does not leave the stopped session
2152
+ // looking active until the next minute-long list refresh.
2153
+ if (!record) {
2154
+ if (sessionId)
2155
+ ctx.broadcast({ type: "session.closed", sessionId });
2149
2156
  return;
2157
+ }
2158
+ if (!sessionBusy(record)) {
2159
+ ctx.broadcast({ type: "session.state", sessionId: record.id, state: sessionState(record) });
2160
+ return;
2161
+ }
2150
2162
  if (record.turnAttention)
2151
2163
  turnWatchdog.resolveTurnAttention(record, "stop");
2152
2164
  else
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bivy/bivy",
3
- "version": "0.16.9-staging.19",
3
+ "version": "0.16.9-staging.20",
4
4
  "type": "module",
5
5
  "license": "AGPL-3.0-only",
6
6
  "description": "Run coding agents on machines you own. Open-source, self-hostable agent workspace.",