runa-agent-wrapped 0.0.0-stage → 0.2.0

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/README.md CHANGED
@@ -1,3 +1,73 @@
1
- # Temporary Holding Version
1
+ # Agent Wrapped
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Your AI agents' year, Wrapped. See what Claude Code, Codex and Cursor really got up to.
4
+
5
+ ```bash
6
+ npx runa-agent-wrapped
7
+ ```
8
+
9
+ Or inside Claude Code:
10
+
11
+ ```
12
+ /plugin install agent-wrapped --marketplace Trappetarn/agent-wrapped
13
+ /wrapped
14
+ ```
15
+
16
+ The one-step install needs Claude Code 2.1.275 or newer. On older versions:
17
+
18
+ ```
19
+ /plugin marketplace add Trappetarn/agent-wrapped
20
+ /plugin install agent-wrapped
21
+ /wrapped
22
+ ```
23
+
24
+ Runs on your laptop. It reads your local agent history, works out your year so far (Jan 1 to today, local time) and opens a one-screen report on `http://localhost:4747` (the next free port if that one is taken). Nothing is uploaded unless you click one of three buttons, and the page shows exactly what would be sent first.
25
+
26
+ ## What it reads
27
+
28
+ - Claude Code: `~/.claude/projects/**/*.jsonl`, plus `permissions.allow` rules in `~/.claude/settings.json` and each project's `.claude/settings.local.json`, and the `firstStartTime` date in `~/.claude.json` for agent age.
29
+ - Claude Code's `~/.claude/stats-cache.json` (written by `/stats`): `dailyActivity` day counts and `firstSessionDate`. Claude Code deletes transcripts after `cleanupPeriodDays` (30 by default) but keeps this file, so it can fill in days before the cutoff. For each day the report uses the larger of the transcript count and the cache count, so a day is never counted twice. A missing or malformed file is ignored.
30
+ - `~/.agent-wrapped/daily.json`, the day totals this tool saved on earlier runs (see below).
31
+ - Codex CLI: `$CODEX_HOME` or `~/.codex`, `sessions/YYYY/MM/DD/rollout-*.jsonl`. `.jsonl.zst` rollouts are read on Node 22.15+ and skipped on older Node.
32
+ - Cursor: `~/.cursor/projects/*/agent-transcripts/` with times from `~/.cursor/chats/*/*/meta.json`. Cursor records no approvals, so its sessions count as ask-mode.
33
+
34
+ Prompts and replies are read in memory to count things (for example prompts that are just "fix it"). The report holds only counts, program names such as `git` and `bun`, and the base name of your most-read file.
35
+
36
+ ## Options
37
+
38
+ ```
39
+ --no-open print the URL, do not open a browser
40
+ --json print the computed report as JSON and exit
41
+ --no-save do not write ~/.agent-wrapped/daily.json
42
+ ```
43
+
44
+ ## What it writes
45
+
46
+ After each run (not with `--no-save` or `--json`) it merges the day totals into `~/.agent-wrapped/daily.json`:
47
+
48
+ ```json
49
+ { "version": 1, "days": { "2026-03-10": { "toolCalls": 412, "sessions": 6 } } }
50
+ ```
51
+
52
+ The file holds only dates and counts: no prompts, paths, project names or commands. The merge keeps the larger value for each date and every other date, so running twice gives the same file and days stay after Claude Code deletes the transcripts. Next year's report reads the file back. If the file cannot be written, the run prints one line and carries on. Delete the file to forget the history.
53
+
54
+ The one other file it can write is `~/.claude/settings.json`, and only when you click "Keep a year of history" on the page: it sets `cleanupPeriodDays` to 400 (a larger value is kept), leaves every other key as it was, and does nothing if the file is not valid JSON. The local server accepts that request only from its own page.
55
+
56
+ ## What can leave your laptop
57
+
58
+ 1. "Talk agent safety with us" asks what your company cares about. "Pick a time" then loads Cal.com's embed script and scheduler inside the page, which receives only the topics you ticked, as a note on the booking. "Leave your email instead" sends the work email and team size you type, to the waitlist.
59
+ 2. Share posts only what you post yourself: the image you pick and a short line of text.
60
+
61
+ The waitlist posts to the address in `src/config.ts` (a placeholder until [Trappetarn/agent-wrapped#1](https://github.com/Trappetarn/agent-wrapped/issues/1) decides hosting). The waitlist Worker accepts at most 5 posts per minute from one IP address and stores each email once. The server for the report binds to `127.0.0.1` only.
62
+
63
+ ## Development
64
+
65
+ ```bash
66
+ bun install
67
+ bun run typecheck && bun test && bun run build
68
+ node dist/cli.js --no-open
69
+ ```
70
+
71
+ `site/` holds the landing page. `worker/wrangler.toml` deploys it to Cloudflare as the `agent-wrapped` Worker with `bun run deploy` (needs `CLOUDFLARE_API_TOKEN`). `site/_headers` keeps search engines out until launch. `worker/src/` holds the waitlist API (D1), which is not deployed yet.
72
+
73
+ Made by [Runa](https://runa-website.trappetarn.workers.dev). Not affiliated with Anthropic, OpenAI or Cursor.