@bivy/bivy 0.2.0-staging.27 → 0.2.0-staging.29

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 +10 -2
  2. package/package.json +1 -1
package/dist/server.js CHANGED
@@ -1344,7 +1344,11 @@ async function runTerminalList() {
1344
1344
  const out = [];
1345
1345
  for (const t of runs) {
1346
1346
  let sessionRef = t.meta.sessionId;
1347
- if (!sessionRef && t.meta.autoName) {
1347
+ // Discover the on-disk session for agents that assign their id lazily (Pi,
1348
+ // Codex). Runs whenever there's no pinned id — not just for auto-named
1349
+ // terminals — so the takeover-readiness flag below is accurate even for a
1350
+ // run launched with an explicit --name.
1351
+ if (!sessionRef) {
1348
1352
  try {
1349
1353
  sessionRef = await SESSION_DISCOVERY_BY_AGENT[t.meta.agent ?? ""]?.(t.workspace, t.createdAt);
1350
1354
  }
@@ -1355,7 +1359,11 @@ async function runTerminalList() {
1355
1359
  if (t.meta.autoName && nativeName && !isEmptyUntitledTitle(nativeName))
1356
1360
  t.meta.name = nativeName;
1357
1361
  const { autoName: _autoName, ...publicMeta } = t.meta;
1358
- out.push({ termId: t.id, workspace: t.workspace, createdAt: t.createdAt, lastActivityAt: t.lastActivityAt, pid: terminals.pid(t.id), ...publicMeta });
1362
+ // "Continue as chat" can only adopt a session that exists: a pinned id, or a
1363
+ // session discovered on disk. Surface that so the client can disable the
1364
+ // affordance (with guidance) until the agent has actually started its
1365
+ // session, instead of letting the user tap it and hit a 409.
1366
+ out.push({ termId: t.id, workspace: t.workspace, createdAt: t.createdAt, lastActivityAt: t.lastActivityAt, pid: terminals.pid(t.id), ...publicMeta, takeoverReady: Boolean(sessionRef) });
1359
1367
  }
1360
1368
  return out;
1361
1369
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bivy/bivy",
3
- "version": "0.2.0-staging.27",
3
+ "version": "0.2.0-staging.29",
4
4
  "type": "module",
5
5
  "license": "FSL-1.1-ALv2",
6
6
  "description": "Run coding agents on machines you own. Source-available, self-hostable agent workspace.",