@bivy/bivy 0.2.0-staging.29 → 0.2.0-staging.30
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 +8 -0
- package/package.json +1 -1
package/dist/server.js
CHANGED
|
@@ -2589,6 +2589,7 @@ const RELAY_COMMANDS = {
|
|
|
2589
2589
|
agent: meta?.runtimeId ?? s.agent,
|
|
2590
2590
|
agentName: meta?.agentName ?? s.agentName,
|
|
2591
2591
|
source: rec?.source ?? meta?.source,
|
|
2592
|
+
forkedFrom: rec?.forkedFrom ?? meta?.forkedFrom,
|
|
2592
2593
|
branch: rec?.worktree?.branch ?? meta?.branch,
|
|
2593
2594
|
sandbox: rec?.sandbox ?? normalizeSandboxTier(meta?.sandbox),
|
|
2594
2595
|
prUrl: rec?.prUrl ?? meta?.prUrl,
|
|
@@ -5358,6 +5359,11 @@ async function standUpFork(opts) {
|
|
|
5358
5359
|
const record = plan.kind === "resume"
|
|
5359
5360
|
? await createSession(cwd, plan.sessionFile, { runtimeId: targetRuntimeId, source: bundle.record.source, makeActive: false })
|
|
5360
5361
|
: await createSession(cwd, undefined, { runtimeId: targetRuntimeId, source: bundle.record.source, makeActive: false });
|
|
5362
|
+
// Mark the new session as a fork of its source, so the run card can show
|
|
5363
|
+
// "Forked from …" and the lineage survives a reload (persisted below). Just
|
|
5364
|
+
// the parent's session id — an identifier, not content, so it's safe to
|
|
5365
|
+
// carry into metadata the same way branch/prUrl already are.
|
|
5366
|
+
record.forkedFrom = bundle.record.sourceSessionId;
|
|
5361
5367
|
// Attach the reconstructed worktree to the record. createSession only
|
|
5362
5368
|
// populates record.worktree when it provisions one itself (fresh repo session)
|
|
5363
5369
|
// or restores it from stored metadata (resume) — neither happens for a fork,
|
|
@@ -5711,6 +5717,7 @@ function persistSessionMetadata(record, status = sessionStatus(record)) {
|
|
|
5711
5717
|
name: record.session.getName(),
|
|
5712
5718
|
workspace: record.workspace,
|
|
5713
5719
|
source: record.source ?? "manual",
|
|
5720
|
+
forkedFrom: record.forkedFrom,
|
|
5714
5721
|
runtimeId: record.runtimeId,
|
|
5715
5722
|
sandbox: record.sandbox,
|
|
5716
5723
|
agentName: getRuntime(record.runtimeId).displayName,
|
|
@@ -8429,6 +8436,7 @@ app.get("/api/sessions", async (_req, res, next) => {
|
|
|
8429
8436
|
agent: meta?.runtimeId ?? s.agent,
|
|
8430
8437
|
agentName: meta?.agentName ?? s.agentName,
|
|
8431
8438
|
source: rec?.source ?? meta?.source,
|
|
8439
|
+
forkedFrom: rec?.forkedFrom ?? meta?.forkedFrom,
|
|
8432
8440
|
branch: rec?.worktree?.branch ?? meta?.branch,
|
|
8433
8441
|
prUrl: rec?.prUrl ?? meta?.prUrl,
|
|
8434
8442
|
prs: rec?.prs ?? meta?.prs,
|
package/package.json
CHANGED