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
2 changes: 1 addition & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"name": "pastdotdev",
"source": "./plugins/past",
"description": "Your Claude Code sessions become memory, and every session starts briefed.",
"version": "0.4.0",
"version": "0.4.1",
"author": {
"name": "past.dev",
"url": "https://past.dev"
Expand Down
26 changes: 24 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,20 @@ Use `updateState` for every change. Keep transcript hashes and pending sessions
set by measurement: change them with a measurement. The block before a prompt names the tool in
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 13), so it changes nothing that travels.
16. **A sitting is sent with the connection it was typed under.** `state.json` keeps, per session,
the connections its prompts were typed under (`connections`: 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 All @@ -227,8 +241,8 @@ cannot read the conversation and can only be recalled from.

- `POST /api/v1/ingest/batch` — one item per sitting. `id` gives replacement, `timestamp` dates
every memory drawn from the item, `label` names the session, `metadata` carries
`conversationId`, `sessionId`, `project`, `gitBranch`, `sitting`. A batch takes up to 1,000
items and 16 MB of content.
`conversationId`, `sessionId`, `project`, `gitBranch`, `sitting`, and `model` and `effort` where
the transcript names them. A batch takes up to 1,000 items and 16 MB of content.
- `POST /api/v1/recall` — **`identity` is required**. Recall stays off until `/pastdotdev:connect`
sets one. The response is one result per document in rank order; the hooks read each result's
`content` and `occurredAt`, and the tool also its sources' `excerpts` and `metadata.localTime`
Expand All @@ -238,6 +252,10 @@ cannot read the conversation and can only be recalled from.
with `GET /api/v1/audiences/{slug}` (404 when unknown); a later `audience-unknown` refusal is
kept in `state.lastError` for `/pastdotdev:status`, like every failed send.
- `UserPromptSubmit` gives the prompt as `prompt` on stdin.
- Claude Code writes, on each of the agent's entries in a transcript, the model that wrote it
(`message.model`) and the effort it ran at (`effort`). It documents neither field, so the script
takes a string where it finds one and otherwise sends nothing. A sitting carries what its last
turn ran on; neither is rendered, so neither changes a hash (rule 10).
- Claude Code gives a hook `session_id`, `transcript_path`, `cwd` and `hook_event_name`, and
takes `hookSpecificOutput.additionalContext` at session start and on a prompt.
- A project API key (`past_sk_…`) names its own project. The plugin never sends a project id.
Expand Down Expand Up @@ -277,3 +295,7 @@ throwaway `CLAUDE_CONFIG_DIR` and see `claude mcp list` report `plugin:pastdotde
**A change to the script is checked against what it sent before.** Run the old script and the new
one over the same transcripts, each in a throwaway home with its own stand-in, and compare what each
mode prints, what each request carries and what `state.json` keeps, byte for byte (rule 10).

For rule 16, run the hooks in a throwaway home with no key, then `connect`, then add a prompt to the
transcript and run the prompt hook and `flush`: one sitting goes, the one after connecting. Do the
same with a second key in place of no key, and check the key each request carries.
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ You need Claude Code and Node 16 or later.

4. **Check it.** `/pastdotdev:status` shows the project it talks to and what it has sent.

New sessions are read from then on. `/pastdotdev:backfill` lists the 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.
`/pastdotdev:backfill` lists the 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, use `/plugin configure pastdotdev@pastdotdev` in the terminal CLI
instead of step 3: a form that masks the key and keeps it in your system's credential store.
Expand Down Expand Up @@ -87,7 +88,16 @@ past.dev on demand: ask what was decided about something, or whether it was trie

## What leaves your machine

Your prompts, Claude's replies, and the project and branch names. Nothing else.
Your prompts and Claude's replies, with the names of the project's folder and its branch, the
session's id, the model Claude ran on with its effort level, 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 Claude 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 `/pastdotdev:backfill`.

Never sent: tool calls and their results, file contents, diffs, command output, subagent threads,
and anything injected into the conversation rather than typed by a person. Strings that look like
Expand Down
2 changes: 1 addition & 1 deletion plugins/past/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "pastdotdev",
"displayName": "past.dev",
"version": "0.4.0",
"version": "0.4.1",
"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",
Expand Down
Loading
Loading