diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 4a8430d..7028a9c 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -10,7 +10,7 @@ "name": "pastdotdev", "source": "./plugins/past", "description": "Your Claude Code sessions become memory, and every session starts briefed.", - "version": "0.3.1", + "version": "0.4.0", "author": { "name": "past.dev", "url": "https://past.dev" diff --git a/CLAUDE.md b/CLAUDE.md index 496f93b..616ad0f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -19,7 +19,7 @@ Claude Code every prompt prompt recall into context: ten memories, the block naming the tool on demand mcp past_recall, the model's own recall, on a local MCP server every turn stop stamps the activity file, keeps one waiter on the session - compaction precompact sends the session so far + compaction precompact sends the sittings that closed; the one still open at most once an hour session end end hands the send to a detached process (flush) detached idle the waiter: sends once Claude Code's process is gone, or after idleMinutes | @@ -64,6 +64,12 @@ Use `updateState` for every change. Keep transcript hashes and pending sessions the key's per-minute budget. Do not remove it. 4. **Send when a session ends, goes idle, closes or compacts; never from `Stop` itself.** `Stop` fires every turn, and a session that grew sends its last sitting again as a new revision. + - `PreCompact` sends the sittings that closed since the last send, once each, and the one still + open only when the session's last send is an hour old (`COMPACTION_RESEND_MS`). A session that + never goes quiet compacts every few minutes, and sent whole at each one it was a new paid + revision every time; the transcript on disk loses nothing at a compaction. The held sitting + keeps its old hash in `state.json` and the whole hash stays as it was, so it goes with the + session's end or idle send. - `Stop` only stamps `~/.past/activity/.json` and keeps one detached waiter (`idle` mode) per session. The waiter sends once the last turn is `idleMinutes` old (720 by default), measured on the wall clock: it sleeps in one-minute slices, because a timer does @@ -125,9 +131,11 @@ Use `updateState` for every change. Keep transcript hashes and pending sessions `renderTranscript` prints are part of the content hash. A changed byte makes `backfill` send every session already in past.dev again, as a paid revision. The same holds for `SOURCE`, `AGENT` and `SPEAKER` at the top of the script. `sittingId` and the cut (`sittingsOf`, - `silenceMeter`) are fixed for a related reason: changed, they move the boundaries of every + `silenceMeter`, the size measured on the turns' own text) are fixed for a related reason: changed, they move the boundaries of every session that grows afterwards, its sittings are sent again under their new ids, and the old ones - stay in past.dev beside them. A person's `sittingMinutes` cannot do that (rule 12). + stay in past.dev beside them. A person's `sittingMinutes` and `sittingKilobytes` cannot do that (rule 12). The one exception + made so far is the branch a sitting is rendered with (rule 12, 5 November 2026), bounded to + sessions that switched branches and still grow. 11. **`~/.past` is the person's alone, and the key never travels in the clear unnoticed.** The folder is made `700` and every file in it is created `600` (`privateDir`, `writePrivate`): never written open and narrowed afterwards, since a file that holds the key would be readable @@ -143,11 +151,24 @@ Use `updateState` for every change. Keep transcript hashes and pending sessions their results included (`silenceMeter`), and over nothing else: other lines, such as a pull request's status, are written while nobody is there. So a prompt stays with its reply while the agent works; one tool call that writes nothing for longer than a sitting is the case that parts - them. Each sitting is one data point timed at its first turn. A session only grows at its end, - so a sitting never changes once the next has begun. - - `state.json` pins `sittingMinutes` per session at its first send. A changed value applies to - the sessions sent after it: moving the boundaries of one already in past.dev would send its - sittings again under shifted ids and leave the old ones beside them. + them. A new sitting also starts once the one so far holds `sittingKilobytes` of prose (50 by + default, 10 at least), measured on the turns' own text, and only once the agent has answered: + between two of its turns, or before the person's next prompt, never between a prompt and its + first answer. So a session that never goes quiet, an agent in a loop for hours, is cut all the + same, and what a send of it carries again is one sitting rather than the whole. Each sitting is + one data point timed at its first turn. A session only grows at its end, so a sitting never + changes once the next has begun. + - `state.json` pins `sittingMinutes` and `sittingKilobytes` per session at its first send. A + changed value applies to the sessions sent after it: moving the boundaries of one already in + past.dev would send its sittings again under shifted ids and leave the old ones beside them. + A session sent in sittings before the size existed is pinned to no size (`0`), for the same + reason. + - A sitting is rendered and labelled with the branch current at its first turn (`turn.branch`, + the transcript's `gitBranch` at that entry); the whole session, whose hash is what recognises + one sent whole, keeps the last. Until 5 November 2026 every sitting carried the session's + last branch, so a switch mid-session changed every sitting's head line and sent every closed + sitting again as a paid revision. A session that never switched renders as it did; one that + switched and still grows sends its closed sittings once more, under their own branch. - The first sitting keeps the id a whole session had (`claude-code:`); the others are `claude-code::`. A session sent whole before sittings existed is left alone while it is unchanged (its whole hash still matches), and when it grows its first diff --git a/README.md b/README.md index bd78abc..a1b0bed 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ session opens recall what past.dev knows about this project ──► in every prompt recall what past.dev knows about this prompt ──► into context any time Claude asks past.dev itself, with past_recall ──► into context every reply nothing is sent; the session is marked active -compaction the session so far is sent, before its detail is summarised away +compaction the sittings that closed are sent; the one still open at most once an hour session over the session is sent: closed, its window quit, or quiet for 12 hours ``` @@ -76,7 +76,7 @@ up to ten memories; the tool returns up to a hundred, within 2,000 tokens. A rec characters ("yes", "go on") recalls nothing. **A session is sent in sittings.** Where a conversation went quiet for 30 minutes, the next turn -starts a new sitting. Each sitting is dated at its own first turn, so a decision made on the third +starts a new sitting; so does the next one after 50 KB of prose, once Claude has answered. Each sitting is dated at its own first turn, so a decision made on the third day of a long conversation is remembered on that day, and past.dev can tell which of two statements came later. A session that continues sends its last sitting and the new ones again, nothing earlier. @@ -120,8 +120,9 @@ slug from the console's **Audiences** page. `/pastdotdev:connect --audience proj `~/.past/config.json` holds the connection and a few switches: `recall` and `ingest` turn either half off, `idleMinutes` (720) is how long a session stays quiet before it is sent, -`sittingMinutes` (30) is how long a pause starts a new sitting, and `deny` lists paths whose -sessions are never read. `PAST_API_KEY`, `PAST_IDENTITY` and `PAST_API_URL` override the file. +`sittingMinutes` (30) is how long a pause starts a new sitting, `sittingKilobytes` (50) how much +prose does, and `deny` lists paths whose sessions are never read. `PAST_API_KEY`, `PAST_IDENTITY` +and `PAST_API_URL` override the file. Each setting is described in the [plugin's README](plugins/past/README.md#configuration). For a self-hosted past.dev, pass your deployment's URL as the third argument of `/pastdotdev:connect`. Use diff --git a/plugins/past/.claude-plugin/plugin.json b/plugins/past/.claude-plugin/plugin.json index 9d922d7..85665a7 100644 --- a/plugins/past/.claude-plugin/plugin.json +++ b/plugins/past/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "pastdotdev", "displayName": "past.dev", - "version": "0.3.1", + "version": "0.4.0", "description": "Your Claude Code sessions become memory, and every session starts briefed.", "author": { "name": "past.dev", "url": "https://past.dev" }, "homepage": "https://github.com/pastdotdev/claude-code-plugin", diff --git a/plugins/past/README.md b/plugins/past/README.md index fe3f619..09e4b6e 100644 --- a/plugins/past/README.md +++ b/plugins/past/README.md @@ -36,7 +36,7 @@ prompt or session. | `SessionStart` | a session opens | recalls this project's history and puts it in context | | `UserPromptSubmit` | every prompt | recalls the ten memories closest to the prompt and puts them in context | | `Stop` | after each reply | starts or resets the idle timer; sends nothing itself | -| `PreCompact` | the context is about to be compacted | sends the session so far, before the detail is summarised away | +| `PreCompact` | the context is about to be compacted | sends the sittings that closed since the last send; the one still open at most once an hour | | `SessionEnd` | a session closes | sends the session's prose to past.dev | A session also counts as over after 12 hours without a new turn (`idleMinutes` in @@ -46,7 +46,9 @@ window instead of the conversation (quitting VS Code or the app) skips `SessionE notices the conversation's process is gone and sends it within a minute. **A session is sent in sittings.** A new sitting starts where the session went quiet for 30 -minutes (`sittingMinutes`): nobody wrote and the agent ran nothing. Each sitting is dated at its own +minutes (`sittingMinutes`): nobody wrote and the agent ran nothing. One also starts once the +sitting so far holds 50 KB of prose (`sittingKilobytes`), after the agent's reply, so a session that +never pauses is cut all the same. Each sitting is dated at its own first turn, and what past.dev remembers takes the date of the sitting it came from, so something said on the third day of a conversation that ran for three days is dated that day. A prompt and its reply stay together while the agent works on it, however long. When a session continues, only its last sitting @@ -58,8 +60,9 @@ an open session leaves the list by itself once it is in past.dev unchanged and i to send. **Compaction is the moment this matters most.** When the window fills, Claude Code summarises -everything before the boundary and drops the detail. `PreCompact` sends the session first, so the -prose is durable; `SessionStart` then fires again with source `compact`, and its recall is aimed at +everything before the boundary and drops the detail. `PreCompact` sends the sittings that closed since +the last send, and the one still open at most once an hour, since the transcript on disk keeps every +turn; `SessionStart` then fires again with source `compact`, and its recall is aimed at what this session was doing rather than at the project at large — which is exactly what the model has just lost. @@ -113,6 +116,7 @@ something was tried before, and it looks. "ingest": true, "idleMinutes": 720, "sittingMinutes": 30, + "sittingKilobytes": 50, "deny": ["/Users/you/clients/acme"] } ``` @@ -124,6 +128,9 @@ something was tried before, and it looks. - `sittingMinutes` is how long a session stays quiet before what follows starts a new sitting (30 by default, 5 at least). Shorter dates what past.dev remembers more closely, in more and smaller data points. A session keeps the length it was first sent with. +- `sittingKilobytes` is how much prose a sitting holds before the next turn starts a new one (50 + by default, 10 at least), the cut waiting for the agent's reply. A session keeps the size it was + first sent with. - `deny` holds path fragments. A session whose working directory matches one is ignored completely — nothing is read and nothing is sent. - `PAST_API_KEY`, `PAST_IDENTITY` and `PAST_API_URL` override the file. diff --git a/plugins/past/bin/past-hook.mjs b/plugins/past/bin/past-hook.mjs index fa24a12..3cf341f 100755 --- a/plugins/past/bin/past-hook.mjs +++ b/plugins/past/bin/past-hook.mjs @@ -26,9 +26,19 @@ const DEFAULT_IDLE_MINUTES = 720; // 12 hours // minutes nearly every sitting would be one exchange, so a smaller value is read as five. const DEFAULT_SITTING_MINUTES = 30; const MIN_SITTING_MINUTES = 5; +// A sitting is also closed where it holds this much prose. An agent that runs for hours without a +// pause never goes quiet, so its session was one sitting, and sent again at every compaction as it +// grew it was a new paid revision of the whole every few minutes. The cut falls between two of the +// agent's turns or before the developer's next prompt, never between a prompt and its first answer. +const DEFAULT_SITTING_KILOBYTES = 50; +const MIN_SITTING_KILOBYTES = 10; +// At a compaction the sitting still open is sent again only when the session's last send is older +// than this. The transcript on disk loses nothing at a compaction, so the open sitting can wait for +// the session to end or go idle; the hour bounds what a crash in between could lose. +const COMPACTION_RESEND_MS = 60 * 60000; const DEFAULT_API_URL = 'https://api.past.dev'; const MARKER = '=== past · recalled from memory ==='; -const VERSION = '0.2.0'; +const VERSION = '0.4.0'; // ---------------------------------------------------------------------------------- Claude Code @@ -104,6 +114,8 @@ function loadConfig() { idleMinutes: Number(file.idleMinutes) > 0 ? Number(file.idleMinutes) : DEFAULT_IDLE_MINUTES, sittingMinutes: Number(file.sittingMinutes) > 0 ? Math.max(MIN_SITTING_MINUTES, Number(file.sittingMinutes)) : DEFAULT_SITTING_MINUTES, + sittingKilobytes: Number(file.sittingKilobytes) > 0 + ? Math.max(MIN_SITTING_KILOBYTES, Number(file.sittingKilobytes)) : DEFAULT_SITTING_KILOBYTES, // An audience slug from the console; empty means the whole project sees what is sent. audience: typeof file.audience === 'string' ? file.audience.trim() : '', }; @@ -324,7 +336,9 @@ function readTranscript(path) { if (!firstAt && entry.timestamp) firstAt = entry.timestamp; if (entry.gitBranch) branch = entry.gitBranch; if (entry.cwd) project = basename(entry.cwd); - turns.push({ role: entry.type, at: entry.timestamp || '', text: text.trim(), quiet: silence.take() }); + // Each turn keeps the branch current at it: a sitting is rendered with its first turn's, while + // the session as a whole keeps the last, so a session that never switched renders as it did. + turns.push({ role: entry.type, at: entry.timestamp || '', text: text.trim(), quiet: silence.take(), branch }); } if (!turns.length) return null; @@ -371,17 +385,35 @@ function silenceMeter() { // for `sittingMinutes`, whoever speaks: a resumed session, or a permission granted the next // morning, can start with the agent rather than the person. Each sitting is a data point timed at // its own first turn. A memory takes the time of the data point it was drawn from, so one said on -// the third day of a session that ran for three days is dated that day, not the first. A prompt is -// never parted from its answer while the agent works on it. A session only grows at its end, so a +// the third day of a session that ran for three days is dated that day, not the first. A new +// sitting also starts once the one so far holds `sittingKilobytes` of prose, so a session that +// never goes quiet is cut all the same; that cut waits for the agent to have answered, so a prompt +// is never parted from its first answer, and falls between two of the agent's turns where it +// works on without the person. Each sitting is placed on the branch current at its first turn, +// where the transcript records one per turn, and the whole session keeps its last: a switch later +// in the session then changes no sitting already closed. A session only grows at its end, so a // sitting never changes once the next one has begun, and a session that resumes sends its last // sitting again, not the whole. -function sittingsOf(parsed, minutes) { +function sittingsOf(parsed, minutes, kilobytes) { const sittings = []; + let held = 0; + let previous = null; for (const turn of parsed.turns) { - if (!sittings.length || (turn.at && turn.quiet >= minutes * 60000)) { - sittings.push({ ...parsed, turns: [], firstAt: sittings.length ? turn.at : parsed.firstAt }); + const quiet = turn.quiet >= minutes * 60000; + // Measured on the turns' own text, so the cut moves with neither the heading nor the redaction. + const full = kilobytes > 0 && held >= kilobytes * 1024 && previous !== null && previous.role !== 'user'; + if (!sittings.length || (turn.at && (quiet || full))) { + sittings.push({ + ...parsed, + turns: [], + firstAt: sittings.length ? turn.at : parsed.firstAt, + branch: turn.branch || parsed.branch, + }); + held = 0; } sittings[sittings.length - 1].turns.push(turn); + held += Buffer.byteLength(turn.text); + previous = turn; } return sittings; } @@ -398,19 +430,22 @@ const hashOf = (text) => createHash('sha256').update(text).digest('hex'); * state.json knows a sent session by the hash of its whole rendering (`hash`), which is what still * recognises one sent whole before sittings existed, and by one hash per sitting (`sittings`). A * session sent whole that grew since has no sitting hashes, so all of its sittings go. A session - * keeps the sitting length it was first sent with (`sittingMinutes`): a new value in the config - * applies to the sessions sent after it, and the boundaries of one already in past.dev never move. + * keeps the sitting length and size it was first sent with (`sittingMinutes`, `sittingKilobytes`): + * a new value in the config applies to the sessions sent after it, and the boundaries of one + * already in past.dev never move. One sent in sittings before the size existed keeps no size at all. */ function planSend(parsed, context, sent, config) { - const minutes = (sent && sent.sittingMinutes) || config.sittingMinutes; - const sittings = sittingsOf(parsed, minutes).map((sitting, index) => { + const pinned = Boolean(sent && sent.sittingMinutes); + const minutes = pinned ? sent.sittingMinutes : config.sittingMinutes; + const kilobytes = pinned ? (Number(sent.sittingKilobytes) || 0) : config.sittingKilobytes; + const sittings = sittingsOf(parsed, minutes, kilobytes).map((sitting, index) => { const content = renderTranscript(sitting, context); return { index, sitting, content, hash: hashOf(content), bytes: Buffer.byteLength(content) }; }); const whole = hashOf(renderTranscript(parsed, context)); - if (sent && sent.hash === whole) return { whole, minutes, sittings, changed: [] }; const known = sent && Array.isArray(sent.sittings) ? sent.sittings : []; - return { whole, minutes, sittings, changed: sittings.filter((part) => known[part.index] !== part.hash) }; + if (sent && sent.hash === whole) return { whole, minutes, kilobytes, sittings, known, changed: [] }; + return { whole, minutes, kilobytes, sittings, known, changed: sittings.filter((part) => known[part.index] !== part.hash) }; } // Which project, branch and directory a session belongs to: where the hook or the command ran, @@ -711,7 +746,7 @@ function modeMcp() { return new Promise((done) => lines.on('close', () => Promise.all([...inflight]).then(done))); } -async function ingestSession(config, state, sessionId, transcriptPath, context, {stillRunning = false} = {}) { +async function ingestSession(config, state, sessionId, transcriptPath, context, {stillRunning = false, compacting = false} = {}) { if (!config.ingest || !config.apiKey) return { skipped: 'not configured' }; const parsed = readTranscript(transcriptPath); const { sessions, pending } = book(state); @@ -722,39 +757,51 @@ async function ingestSession(config, state, sessionId, transcriptPath, context, return { skipped: 'nothing to send' }; } - const plan = planSend(parsed, context, sessions[sessionId], config); + const before = sessions[sessionId]; + const plan = planSend(parsed, context, before, config); + // A compaction sends the sittings that closed since the last send, once each, and holds the one + // still open unless the session's last send is an hour old: that sitting grows at every turn, + // and sent at every compaction it was a new paid revision of itself every few minutes. Its turns + // are in the file whatever the context loses, and go when the session ends or goes idle. + const last = plan.sittings[plan.sittings.length - 1]; + const held = compacting && plan.changed.includes(last) && before && before.sentAt + && Date.now() - Date.parse(before.sentAt) < COMPACTION_RESEND_MS ? last : null; + const parts = held ? plan.changed.filter((part) => part !== held) : plan.changed; // The server charges nothing for an unchanged re-send, but the call still spends a request // from the key's per-minute budget. The hashes skip it, and they live here on purpose. - if (!plan.changed.length) { + if (!parts.length) { // Unchanged still closes the session out. Without this it stays pending, and every later // SessionStart re-reads and re-hashes a transcript that is already in past.dev. if (!stillRunning && pending[sessionId]) updateState((fresh) => { delete book(fresh).pending[sessionId]; }, state); - return { skipped: 'unchanged' }; + return { skipped: held ? 'held' : 'unchanged' }; } const place = placeOf(parsed, context); - const label = `${AGENT} · ${place.project}${place.branch ? ` · ${place.branch}` : ''}`; // One call for every sitting that changed, so a session spends one request however long it ran. + // Each sitting is labelled with its own branch, the one its content is rendered with. const result = await api(config, '/api/v1/ingest/batch', { - items: plan.changed.map((part) => ({ - id: sittingId(sessionId, part.index), - content: part.content, - label, - timestamp: part.sitting.firstAt, - identity: config.identity || undefined, - audience: config.audience && config.audience !== 'project' ? config.audience : undefined, - metadata: { - source: SOURCE, - client: SOURCE, - conversationId: sessionId, - sessionId, - project: place.project, - cwd: place.cwd, - gitBranch: place.branch || '', - sitting: part.index + 1, - turns: part.sitting.turns.length, - }, - })), + items: parts.map((part) => { + const branch = placeOf(part.sitting, context).branch; + return { + id: sittingId(sessionId, part.index), + content: part.content, + label: `${AGENT} · ${place.project}${branch ? ` · ${branch}` : ''}`, + timestamp: part.sitting.firstAt, + identity: config.identity || undefined, + audience: config.audience && config.audience !== 'project' ? config.audience : undefined, + metadata: { + source: SOURCE, + client: SOURCE, + conversationId: sessionId, + sessionId, + project: place.project, + cwd: place.cwd, + gitBranch: branch || '', + sitting: part.index + 1, + turns: part.sitting.turns.length, + }, + }; + }), }, 30000); if (!result || result.error) { @@ -765,10 +812,15 @@ async function ingestSession(config, state, sessionId, transcriptPath, context, updateState((fresh) => { book(fresh).lastError = lastError; }, state); return { error: result ? result.error : 'unreachable', code }; } + // A held sitting keeps the hash it was last sent with, or none, so it goes at the next send, and + // the whole hash is written only once the whole session is in past.dev. + const hashes = plan.sittings.map((part) => part.hash); + if (held) { if (plan.known[held.index]) hashes[held.index] = plan.known[held.index]; else hashes.pop(); } const sent = { - hash: plan.whole, - sittings: plan.sittings.map((part) => part.hash), + hash: held ? before.hash : plan.whole, + sittings: hashes, sittingMinutes: plan.minutes, + sittingKilobytes: plan.kilobytes, sentAt: new Date().toISOString(), turns: parsed.turns.length, }; @@ -783,9 +835,10 @@ async function ingestSession(config, state, sessionId, transcriptPath, context, ok: true, turns: parsed.turns.length, sittings: plan.sittings.length, - sent: plan.changed.length, - bytes: plan.changed.reduce((sum, part) => sum + part.bytes, 0), - credits: creditsOf(plan.changed), + sent: parts.length, + held: held ? 1 : 0, + bytes: parts.reduce((sum, part) => sum + part.bytes, 0), + credits: creditsOf(parts), }; } @@ -902,9 +955,12 @@ function recentPrompts(transcriptPath) { /** * Compaction is the one moment the context really does reset: everything before the boundary - * becomes a lossy summary. past.dev holds the prose, so the session is flushed here — durable before - * the detail goes, and recallable by the SessionStart that fires straight after with source - * `compact`. Claude Code ignores this hook's output, so it writes and says nothing. + * becomes a lossy summary, while the transcript on disk keeps every turn. So the send here serves + * the SessionStart that fires straight after with source `compact`, and a crash before the + * session's own send, at a bounded price: the sittings that closed since the last send go, once + * each, and the one still open goes at most once an hour (`COMPACTION_RESEND_MS`); it stays in the + * file, and goes when the session ends or goes idle. Claude Code ignores this hook's output, so it + * writes and says nothing. */ async function modePreCompact(config) { const input = await readStdin(); @@ -920,7 +976,7 @@ async function modePreCompact(config) { input.session_id, transcript, {project: basename(cwd), cwd, branch: ''}, - {stillRunning: true}, + {stillRunning: true, compacting: true}, ); } @@ -959,8 +1015,10 @@ function clearActivity(sessionId) { try { unlinkSync(activityPath(sessionId)); } // Bumped whenever the waiter's logic changes: a waiter started by an older version is replaced, // because it is a long-lived process still running the code it was started with. 4: sessions are // sent in sittings, and a waiter of 3 would send an open session whole. 5: sittings are cut where -// the transcript went quiet, for as long as the config says. -const WAITER_VERSION = 5; +// the transcript went quiet, for as long as the config says. 6: sittings are also cut by size, and +// a waiter of 5 would cut a session the hooks already sent by size along other lines, and send its +// sittings again under shifted ids. +const WAITER_VERSION = 6; // The waiter never sleeps longer than this in one go. A timer does not count the time the machine // is asleep, so one long timer set for "in twelve hours" fires hours late after a night with the // lid closed. Short slices checked against the wall clock send within a minute of waking instead. @@ -1340,7 +1398,8 @@ async function modeStatus(config, argv) { `Recall ${config.recall && config.identity ? 'on' : 'off'}`, `Ingest ${config.ingest && config.apiKey ? 'on' : 'off'}`, `Audience ${config.audience && config.audience !== 'project' ? config.audience : 'whole project'}`, - `Sittings a new one after ${config.sittingMinutes} min of quiet (sittingMinutes; a session keeps the length it was first sent with)`, + `Sittings a new one after ${config.sittingMinutes} min of quiet or ${config.sittingKilobytes} KB of prose ` + + '(sittingMinutes, sittingKilobytes; a session keeps the values it was first sent with)', `Sessions ${sent} sent · ${open.length} open` + (unsent ? ` (${unsent} not sent yet)` : ''), ]; diff --git a/plugins/past/commands/cut.md b/plugins/past/commands/cut.md index 4a587cd..98e80c2 100644 --- a/plugins/past/commands/cut.md +++ b/plugins/past/commands/cut.md @@ -22,7 +22,7 @@ The arguments given, if any: `$ARGUMENTS` Show the user the result. This is what leaves the machine: the prompts and the replies, with secrets redacted. Tool results, file contents and diffs are not in it. A session is sent in sittings, one data point each: a new one starts where the session went quiet for `sittingMinutes` -(30 by default), and each begins with its own heading. The first line names the session and its sittings, +(30 by default) or past `sittingKilobytes` of prose (50 by default), and each begins with its own heading. The first line names the session and its sittings, and reports the size on disk, the size sent, and what sending it now costs. The last line says what happens next and, unless it is already in past.dev, the command that sends this session now (`/pastdotdev:ingest`). Relay that line as it is.