Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,20 @@ Use `updateState` for every change. Keep transcript hashes and pending sessions
one line, which is how the model learns to call it; the line rides inside a block the script
already drops from what it sends (rule 12), so it changes nothing that travels. Adding the server
touched neither `hooks/hooks.json` nor any hook's definition, so no person's trust is reset.
14. **A sitting is sent with the connection it was typed under.** `state.json` keeps, per session,
the connections its prompts were typed under (`connections`, under `hosts.codex`: a fingerprint of the key and the
address, empty while the machine has no key, each with the time it began; the first covers the
session from its start). Every hook of a session records a change (`noteConnection`), and
`connect` does for the sessions still open. A prompt typed under another connection than its
sitting's starts a new sitting, and a sitting is sent only while its connection is the one in
force, whichever way the send starts (a hook, the waiter, `ingest`, `backfill`); `cut` does not
print the others. So what a person typed before connecting, or under another project's key,
stays on the machine. A session the hooks kept no record of, one from before the plugin was
installed or before 0.4.1, names no connection: it is cut and sent as it was, so nothing
already in past.dev moves, and `backfill` still sends the history. A sitting kept back holds its
last hash in `sittings`, or `null`, and the session's whole hash is written only once every
sitting is in past.dev. The folder's path is never sent: `metadata.project` is the folder's
name. `WAITER_VERSION` went to 7 with it.

## Beside other past.dev plugins

Expand Down Expand Up @@ -207,7 +221,11 @@ activity files in `activity/codex/` and its hook stamp in `hosts/codex.json`. Th
- `POST /api/v1/ingest/batch` — one item per sitting. `id` gives replacement (`codex:<thread id>`
for the first sitting, `codex:<thread id>:<n>` for the others), `timestamp` dates every memory
drawn from the item, `label` names the session, `metadata` carries `conversationId`,
`sessionId`, `project`, `gitBranch`, `sitting`.
`sessionId`, `project`, `gitBranch`, `sitting`, and `model` and `effort` where the transcript
names them.
- Codex writes a `turn_context` line before each turn, with the `model` it runs on and, where one is
set, the reasoning `effort`. A sitting carries what its last turn ran on; neither is rendered, so
neither changes a hash (rule 9).
- `POST /api/v1/recall` — **`identity` is required**. Recall stays off until `$past:connect` sets
one. The prompt hook sends `limit` 10; the tool sends `limit` 100 and `maxTokens` 2,000, and reads
its sources' `excerpts` and `metadata.localTime` and its artifact's `supersededAt` besides each
Expand Down
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,9 @@ You need Codex and Node 16 or later.
5. **Check it.** `$past:status` shows the project it talks to, when its hooks last ran and what it
has sent.

New sessions are read from then on. `$past:backfill` lists the Codex sessions already on this
machine, estimates what sending them costs, and sends them when you confirm.
Sessions are read from your next prompt on: what you typed before connecting stays on your machine.
`$past:backfill` lists the Codex sessions from before the plugin was installed, estimates what
sending them costs, and sends them when you confirm.

To keep the key out of the conversation, set `PAST_API_KEY` and `PAST_IDENTITY` in your
environment instead of step 4. The desktop app reads them from a login shell, so put them in
Expand Down Expand Up @@ -99,7 +100,16 @@ tried before.

## What leaves your machine

Your prompts, Codex's replies, and the project and branch names. Nothing else.
Your prompts and Codex's replies, with the names of the project's folder and its branch, the
session's id, the model Codex ran on with its reasoning effort, and the identity you connected
with. The folder's path stays on your machine. Recall
sends queries: one when a session starts, the first 1,000 characters of each prompt, and the
questions Codex asks `past_recall`. Nothing else.

What you type is sent with the key it was typed under, and with no other. Nothing typed before you
connect is sent, and what was typed under one project's key never goes to another project: a
session goes on, in a new sitting, from the prompt after you connect or change keys. Sessions from
before the plugin was installed are your history, sent only when you run `$past:backfill`.

Never sent: tool calls and their output, file contents, diffs, command output, subagent threads,
and anything Codex or a hook injected rather than a person typing it. Strings that look like keys,
Expand Down
2 changes: 1 addition & 1 deletion plugins/past/.codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "past",
"version": "0.4.0",
"version": "0.4.1",
"description": "Your Codex sessions become memory, and every session starts briefed.",
"author": { "name": "past.dev", "url": "https://past.dev" },
"homepage": "https://github.com/pastdotdev/codex-plugin",
Expand Down
Loading
Loading