Skip to content

A desktop coding agent with free access to frontier models.

TypeScript

chore: this release is v1.1.0, not v1.0.11

ogsamrat8f714b4f7f5f
diff --git a/apps/server/src/session-archive/README.md b/apps/server/src/session-archive/README.md
index fbbfe74b..b4ceadc0 100644
--- a/apps/server/src/session-archive/README.md
+++ b/apps/server/src/session-archive/README.md
@@ -164,10 +164,10 @@ reach the archive with the next turn, or never. A final archive captures it:
- `turn_incomplete`: the observer stopped following a turn (`turnIncomplete`: past its 24-hour safety bound, or on an unexpected error; never at a server stop, whose final archives are `app_quit`). The lifecycle reads the engine's messages again: a completed-turn count that moved gets the turn's delta, as if `turnCompleted` had fired; a count that did not, or messages that cannot be read, get a final archive. A `turnCompleted` whose count did not move (a prompt aborted before any answer, a reverted history: `stale_turn`) gets one too.
- `session_deleted`: `sessionEnded` queues one before the session is forgotten, also for a session this app run has not seen (the archiver answers `no_base` when it never had a base). The session's record is marked `ended`.
- `app_quit`: `stop()` passes the sessions of this app run (resolved, or unresolved but maybe with a base from an earlier run), the most recent first, to `SessionArchiver.stop({finals, budgetMs})`. The drain and its retry timer stop first; the final archives are captured one after the other (a session whose capture is still running goes last), each with an abort signal that the scan and the tar writer check between entries and blocks. When the budget (5 s) runs out, the signal aborts, and the generation is bumped: nothing commits after that. They are uploaded at the next start.
- - `app_start`: `start()` asks `startFinalCandidates()` for the sessions active within the last 7 days, not stopped and not ended: every one with a turn captured since its last final archive (`final_due` in its record: the last shutdown did not get to it, or the app was killed), the most recently active one on each other folder (edits while the app was closed), and every touched-files session (its files are its own), also one without a base yet that has touched paths. At most 10, the most recently active first. Active means the session's base, a prompt (`captureBase` on a session with a base, or on a touched-files session registered in an earlier run, once per app run) or a turn end (`captureDelta`, also when nothing changed): `last_activity_at` in its record. A final archive, a rewind and other record updates move `updated_at` but never this, so a chat left alone gets no final archive a week after its last turn, however often the app starts and the folder changes. A record from before 1.0.11 counts from its `updated_at` (its last archive), and keeps that time from then on.
+ - `app_start`: `start()` asks `startFinalCandidates()` for the sessions active within the last 7 days, not stopped and not ended: every one with a turn captured since its last final archive (`final_due` in its record: the last shutdown did not get to it, or the app was killed), the most recently active one on each other folder (edits while the app was closed), and every touched-files session (its files are its own), also one without a base yet that has touched paths. At most 10, the most recently active first. Active means the session's base, a prompt (`captureBase` on a session with a base, or on a touched-files session registered in an earlier run, once per app run) or a turn end (`captureDelta`, also when nothing changed): `last_activity_at` in its record. A final archive, a rewind and other record updates move `updated_at` but never this, so a chat left alone gets no final archive a week after its last turn, however often the app starts and the folder changes. A record from before 1.1.0 counts from its `updated_at` (its last archive), and keeps that time from then on.
- **Guards.** `captureFinal` needs a base (`no_base` otherwise, also while the base is pending; a touched-files session without one gets its base instead, when it has a touched file), a session that is not stopped and archiving on (`disabled`). It runs the gate of section 4 again on the session root recorded at the base (a plain folder or touched files: the root checks and the folder refusals, and their policy must be on): a folder that is gone, or that the gate refuses now, gets nothing (`not_archivable`). A folder that did not change uploads nothing (`unchanged`: a stat-only scan with the root's hash cache). Only the session root is scanned, with the same exclusions, credential filter and pass 2 checks as every other archive. The lifecycle's rules hold as for any capture: consent off, signed out, `OMNIRUSH_ARCHIVE_ENABLED`, child sessions, the bounded queue. The server's per-upload and per-chat limits count final archives like any other (a 413 stops the session).
- **Several chats on one folder.** Each session archives the folder in its own chain, so its final archive, like its turn deltas, carries whatever changed in the folder since its own previous archive, including another chat's edits, and each session's quiet window is its own (one timer per session, re-armed by each turn end, never doubled). The collector's rule for a shared root (a chat without a turn in progress leaves the filesystem changes made during another chat's turn to that turn's snapshots, `workspace-collector.ts`) concerns its scrubbed snapshots only: the archive neither waits for it nor schedules anything from it.
-- **A server without final archives.** A backend from before 1.0.11 answers `409 archive_parent_mismatch` to a delta whose turn equals its parent's. Until the server has accepted a final archive in this app run, the first final archive in a chain keeps the chain point before it (`rewind` in the session record, with that archive's baseline, which `start()` keeps too). On that 409 for a final archive, the drain holds the session and, under its lock, puts the chain back there, drops the final archive and every job chained on it, and captures one turn delta again on top (with the highest turn among the dropped turn deltas), so later turns keep uploading. It logs once, and no final archive is captured again until the app restarts (`unsupported`). Once a final archive is uploaded, the rewind point goes (its baseline is deleted) and a later `archive_parent_mismatch` ends the chain as before.
+- **A server without final archives.** A backend from before 1.1.0 answers `409 archive_parent_mismatch` to a delta whose turn equals its parent's. Until the server has accepted a final archive in this app run, the first final archive in a chain keeps the chain point before it (`rewind` in the session record, with that archive's baseline, which `start()` keeps too). On that 409 for a final archive, the drain holds the session and, under its lock, puts the chain back there, drops the final archive and every job chained on it, and captures one turn delta again on top (with the highest turn among the dropped turn deltas), so later turns keep uploading. It logs once, and no final archive is captured again until the app restarts (`unsupported`). Once a final archive is uploaded, the rewind point goes (its baseline is deleted) and a later `archive_parent_mismatch` ends the chain as before.
The contract the lifecycle follows is the original wiring note below.
@@ -394,4 +394,4 @@ cd apps/server && bun --conditions=development test src/session-archive
- sign-out, and a slow part PUT aborted within a second of `signOut()` (the upload aborted with the credentials still held, nothing completed or sent afterwards) and of `stop()` (the job kept, resumed by the next start);
- the app's state dir under the root pruned;
- touched files (`touched_files` on): only the touched files, byte for byte (a PDF read, a binary written), untouched files, credentials and a link out of the folder never, the base at the first capture with a touched file, a delta with the changed files and the deleted one, nothing when only an untouched file changed; a git folder archived as today with no touched paths kept; `all_folders` winning over `touched_files`; the policy off, absent or not a boolean: nothing uploaded or kept; the refused folders never archived; finals (the base from an idle final, `app_quit`, `app_start`) and a restart keeping the chain and its touched paths, a session without a base getting it at app start, a deleted session's paths gone; a restart whose key probe fails keeping a chain without a base and its paths, its base catching up with every path once the policy answers; the chain pausing while the policy is off; `422 archive_marker_not_allowed` dropping the chain once, with no retry, and no other touched chain starting until the policy is asked again;
- - final archives: none without a base or when unchanged; the equal-turn wire values (sequence, parent, turn), chained finals, `trigger` and `reason` in the manifest; a server without final archives (`strictTurns`): one refused create, the chain put back, the turn delta queued behind the final captured again, later turns uploaded, one log line; shutdown finals within the budget, a hanging one cut at it and captured at the next start; the app-start candidates (a final due, the most recently active session per folder; not deleted or older than 7 days); the 7-day window counted from the last base, prompt or turn (an unchanged one too), never extended by a final archive (app starts every 6 days with the folder edited: finals stop a week after the last turn), by a refused final's rewind, or in a record from before 1.0.11; a deleted session whose folder is gone.
+ - final archives: none without a base or when unchanged; the equal-turn wire values (sequence, parent, turn), chained finals, `trigger` and `reason` in the manifest; a server without final archives (`strictTurns`): one refused create, the chain put back, the turn delta queued behind the final captured again, later turns uploaded, one log line; shutdown finals within the budget, a hanging one cut at it and captured at the next start; the app-start candidates (a final due, the most recently active session per folder; not deleted or older than 7 days); the 7-day window counted from the last base, prompt or turn (an unchanged one too), never extended by a final archive (app starts every 6 days with the folder edited: finals stop a week after the last turn), by a refused final's rewind, or in a record from before 1.1.0; a deleted session whose folder is gone.
diff --git a/apps/server/src/session-archive/fake-archive-server.ts b/apps/server/src/session-archive/fake-archive-server.ts
index 6a4ec86a..729732e5 100644
--- a/apps/server/src/session-archive/fake-archive-server.ts
+++ b/apps/server/src/session-archive/fake-archive-server.ts
@@ -4,7 +4,7 @@
* to 7.7 closely enough for the client's behaviour to be checked: auth,
* consent, replay and restart semantics, presigned URL expiry, NoSuchUpload,
* part listing and completion checks. A delta's turn may repeat its parent's
- * (a final archive), as the backend accepts from 1.0.11 on; `strictTurns`
+ * (a final archive), as the backend accepts from 1.1.0 on; `strictTurns`
* emulates the backend before that. A `folder` or `touched` archive is
* refused (422 archive_marker_not_allowed) unless `policy` has its flag on.
*/
diff --git a/apps/server/src/session-archive/index.test.ts b/apps/server/src/session-archive/index.test.ts
index 2ac50fbc..757244a0 100644
--- a/apps/server/src/session-archive/index.test.ts
+++ b/apps/server/src/session-archive/index.test.ts
@@ -919,7 +919,7 @@ describe("SessionArchiver final archives", () => {
expect(finals).toEqual([undefined, undefined, "app_start", undefined, "idle", "app_start"]);
});
- test("app start window: a record from before 1.0.11 counts from its last archive, and a final refused by a server without them does not extend it", async () => {
+ test("app start window: a record from before 1.1.0 counts from its last archive, and a final refused by a server without them does not extend it", async () => {
const server = new FakeArchiveServer();
server.strictTurns = true;
const { root } = await project();
diff --git a/apps/server/src/session-archive/index.ts b/apps/server/src/session-archive/index.ts
index 9ef6b17e..3264e191 100644
--- a/apps/server/src/session-archive/index.ts
+++ b/apps/server/src/session-archive/index.ts
@@ -172,7 +172,7 @@ const sessionStateSchema = z.object({
baseline: z.string().nullable(),
stopped: z.string().nullable(),
updated_at: z.string(),
- // Added in 1.0.11; optional so that earlier records still load.
+ // Added in 1.1.0; optional so that earlier records still load.
/**
* Set while final archives the server has not accepted yet are in the
* chain: the chain as it was before the first of them, whose baseline is
@@ -217,7 +217,7 @@ const queueRecordSchema = z.object({
session_key: z.string(),
request: createRequestSchema,
sealed_file: z.string(),
- /** A delta's trigger (1.0.11 on): how a refused final is told from a broken chain. */
+ /** A delta's trigger (1.1.0 on): how a refused final is told from a broken chain. */
trigger: z.enum(["turn", "final"]).optional(),
created_at: z.string(),
attempts: z.number().int().nonnegative(),