behavior-wrapped 0.8.12 → 0.8.14
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 +41 -55
- package/dist/assets/{index-Dvshm0D9.js → index-DnLfWUh_.js} +1 -1
- package/dist/index.html +1 -1
- package/docs/analysis-methods.md +27 -0
- package/docs/development.md +34 -0
- package/docs/privacy.md +36 -0
- package/docs/research-donations.md +21 -0
- package/package.json +2 -1
- package/server/encrypted-donation-schema.mjs +11 -5
- package/server/launcher.mjs +2 -1
- package/server/research-donation-crypto.mjs +14 -5
- package/server/research-donation-schema.mjs +13 -3
package/README.md
CHANGED
|
@@ -2,89 +2,75 @@
|
|
|
2
2
|
|
|
3
3
|
[behaviorwrapped.com](https://behaviorwrapped.com)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Behavior Wrapped turns your local Claude Code, Cowork, and Codex history into a private review and an optional shareable Wrapped deck—without uploading raw transcripts.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
It shows how you use coding agents: token volume and estimated API-equivalent cost, favorite phrases, interaction tone, topics, session patterns, autonomy, mistakes, interruptions, and instrumental workarounds.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## Quick start
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Requires Node.js 20 or newer on macOS or Linux.
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
14
|
npx behavior-wrapped@latest
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
Nothing is installed globally. To
|
|
17
|
+
Nothing is installed globally. To explore the full experience without reading your history, use the bundled synthetic data:
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
The shareable deck starts with usage cards for token volume—broken into input, output, cache-read, cache-creation, and separately reported reasoning tokens—estimated API-equivalent retail cost, Claude Code vs. Cowork vs. Codex session share, top models, average response length, session-length distribution, interaction tone, output languages, and usage topics. It also surfaces exact repeated user instructions, explicit user and agent admissions of mistakes, the longest completed uninterrupted agent turn, interruptions by active model, and a date-free autonomy curve derived from recorded permission modes. Cost is explicitly an estimate derived from a local, inspectable model-family rate table; it is not a statement about subscription charges or an invoice.
|
|
24
|
-
|
|
25
|
-
The interaction card uses GPT-5.6 Luna to distinguish clear frustration and gratitude from ambiguous wording, then chooses the funniest confirmed frustration quote. The app locally strips code, paths, URLs, likely secrets, and PII; deduplicates excerpts with occurrence counts; and sends at most 120 short candidates. Only classifications at or above 0.75 confidence count, and exact counts and quotes are resolved locally from returned candidate IDs. Luna also classifies each session from its first three share-safe user messages, and topic shares are weighted by that session's locally counted tokens. Output-language shares are estimated from assistant prose after code blocks, inline code, URLs, paths, and markup are removed; the normal language card appears only when a non-English language reaches both 20 words and 3%, while a separate anomaly variant can surface a two-word unprompted non-Latin switch. Instrumental-workaround discovery first finds explicit restriction results locally, then sends only bounded, chronological context windows around those blockers after code, raw tool outputs, paths, likely secrets, and PII are removed. The model must return one verdict per blocker plus a very short description of each confirmed workaround; the app validates its event references, sanitizes the example for the public card, and resolves session evidence and agent-model identity locally.
|
|
26
|
-
|
|
27
|
-
Every selected session is scanned locally for explicit blockers. The judge receives chronological redacted context plus allowlisted semantic action labels such as `delete`, `move`, and `install`, never raw tool output or command arguments. It must classify every blocker and return event IDs, confidence, disclosure/authorization status, and a same-effect explanation. Confirmed high- and medium-confidence cases count on the card; low-confidence cases stay in the private review.
|
|
28
|
-
|
|
29
|
-
Confirmed workaround cards link to a localhost-only evidence page. The helper rebuilds a short excerpt around each original method, blocker, and alternative from the saved session files, includes up to two surrounding conversation turns on each side, and renders them with the donation review's standard local redactions. The transcript excerpts never enter the public report or share-card export and are not transmitted by opening the evidence page.
|
|
30
|
-
|
|
31
|
-
The deck links to a hosted cohort leaderboard with token and relationship plots, a public wall of anonymous favorite phrases, and a pooled session-length swarm that highlights the current report. Published reports participate by default and can be persistently opted out with their private management link. Its final card offers an optional research donation with standard local redactions, a customizable redaction review, or a deliberately unredacted copy. Every detailed mode allows sessions and messages to be excluded, text to be edited, and timestamps remain off by default. The unredacted path shows every included line and requires a separate warning and explicit acknowledgement that credentials and private details may be transmitted. No donation data is transmitted until the user checks the final research-consent box and presses Donate; the localhost helper then encrypts the reviewed bundle before it leaves the machine.
|
|
32
|
-
|
|
33
|
-
When developing from this repository, run `npm install`, then `npm run wrapped`. Add `--demo` to use synthetic fixtures or `--no-open` to leave the browser closed. If you decline remote AI analysis, the CLI offers a local-only report: deterministic usage statistics and a locally counted favorite phrase remain, while AI-judged interaction tone, usage topics, and instrumental workarounds are omitted. Local-only reports stay on localhost and are excluded from the leaderboard. For fast formatting work, run `npm run wrapped -- --test`; test mode skips consent and all LLM calls, uses the same deterministic local fallbacks, keeps the report on localhost, and does not publish it. `--no-llm` is an alias for `--test`.
|
|
19
|
+
```bash
|
|
20
|
+
npx behavior-wrapped@latest --demo
|
|
21
|
+
```
|
|
34
22
|
|
|
35
|
-
|
|
23
|
+
The CLI discovers sessions from Claude Code and Codex automatically. On macOS it can also read Cowork audit streams; Cowork history is not currently available on Linux. The default report covers the latest 30 days.
|
|
36
24
|
|
|
37
|
-
|
|
25
|
+
## What you get
|
|
38
26
|
|
|
39
|
-
|
|
27
|
+
- Usage cards for tokens, estimated cost, models, platforms, response length, session length, languages, and topics.
|
|
28
|
+
- Behavioral cards for repeated instructions, gratitude and frustration, admitted mistakes, interruptions, autonomy, and workarounds after tool restrictions.
|
|
29
|
+
- A favorite phrase selected from exact, locally counted repetitions.
|
|
30
|
+
- An optional shareable slideshow and image exports containing only allowlisted aggregates and sanitized findings.
|
|
31
|
+
- Private, localhost-only evidence views for findings that benefit from reviewing the original context.
|
|
40
32
|
|
|
41
|
-
|
|
42
|
-
./server/cli.mjs list
|
|
43
|
-
./server/cli.mjs open <id>
|
|
44
|
-
./server/cli.mjs delete <id>
|
|
45
|
-
```
|
|
33
|
+
Cost is an estimate based on an inspectable model-family rate table. It is not a subscription charge or invoice. Behavioral findings are explainable heuristics for review, not diagnoses or ground truth.
|
|
46
34
|
|
|
47
|
-
##
|
|
35
|
+
## Privacy at a glance
|
|
48
36
|
|
|
49
|
-
|
|
37
|
+
Raw transcripts, code, paths, command arguments, and raw tool output stay on your machine. Deterministic statistics, candidate selection, and redaction also run locally.
|
|
50
38
|
|
|
51
|
-
|
|
39
|
+
With your consent, bounded redacted candidates and sanitized blocker context are sent through the Behavior Wrapped relay for AI classification. Public reports are reduced to a strict allowlist before upload and again by the hosted Worker. They contain aggregates, generalized findings, and selected redacted quotes—not full prompts, transcripts, dates, project names, session IDs, or evidence.
|
|
52
40
|
|
|
53
|
-
|
|
41
|
+
Published reports use unguessable URLs and participate in the anonymous cohort leaderboard by default. You can opt out or delete a report using its private management link. If you decline remote analysis, the CLI offers a localhost-only report with deterministic statistics and no leaderboard participation.
|
|
54
42
|
|
|
55
|
-
|
|
43
|
+
Research donation is separate and optional. Nothing is donated until you review the selected material, check the final consent box, and press **Donate**. The reviewed bundle is encrypted locally before leaving your machine.
|
|
56
44
|
|
|
57
|
-
|
|
58
|
-
- Transcript parsing, deterministic statistics, language classification, heuristic findings, phrase counting, candidate selection, blocker-window detection, and redaction run locally. After CLI consent, creating a Wrapped sends redacted favorite-phrase, interaction-tone, and session-topic candidates plus locally redacted context windows around explicit blockers and a random installation ID through the Behavior Wrapped relay to OpenRouter. Topic shares weight Luna's session classifications by each session's locally counted tokens.
|
|
59
|
-
- Public reports are reduced to the same strict allowlist locally and again by the Worker. They contain only sanitized aggregate statistics—including anonymous per-session turn counts and counts for four fixed stock phrases—generalized findings, the redacted favorite phrase and frustration quote, and the localhost donation-helper link. They never contain session IDs, evidence, full transcripts, prompts, session dates, project names, code, paths, or tool output. Deleting a locally managed report also requests deletion of its public copy.
|
|
60
|
-
- Remote-analysis reports can compare aggregate token, word-ratio, Good Human Score (thanks as a share of thank-or-scold moments), and instrumental-workaround values on the leaderboard. Local-only reports are not published or included because the interaction-tone and workaround values are intentionally omitted.
|
|
61
|
-
- Browser payloads never include source file paths or raw tool outputs.
|
|
62
|
-
- Private workaround transcript excerpts are generated on demand by the localhost helper, use standard local redactions, and are never included in public report payloads.
|
|
63
|
-
- Share-card PNG exports contain only aggregates and generalized findings.
|
|
64
|
-
- Donation discovery, default redaction, preview, exclusion, editing, schema validation, and authenticated AES-256-GCM encryption happen on localhost. A fresh content key protects each donation and is wrapped with a rotation-versioned RSA-OAEP public key. The private key is not present in the npm package, Worker, D1, or R2. An optional unredacted mode applies no automatic redactions and requires a mode-specific acknowledgement before encryption.
|
|
65
|
-
- The receiving Worker accepts only encrypted protocol-2 envelopes. A private R2 bucket stores ciphertext; a separate D1 database stores pseudonymous consent, size, count, encryption-key, and object-location metadata—never transcript text. No automatic retention policy is currently configured; a locally retained deletion receipt lets the donor delete both records. The public data-use and storage policy is available at `https://susancalvin.org/data-policy`.
|
|
45
|
+
See the [privacy model](docs/privacy.md), [analysis methods](docs/analysis-methods.md), and [research donation design](docs/research-donations.md) for the detailed guarantees and boundaries.
|
|
66
46
|
|
|
67
|
-
|
|
47
|
+
## Options
|
|
68
48
|
|
|
69
|
-
|
|
49
|
+
| Option | Purpose |
|
|
50
|
+
| --- | --- |
|
|
51
|
+
| `--demo` | Use only bundled synthetic sessions. |
|
|
52
|
+
| `--days=N` | Change the report window from the default 30 days. |
|
|
53
|
+
| `--no-open` | Do not open the finished report automatically. |
|
|
54
|
+
| `--test` / `--no-llm` | Skip consent and remote AI calls; keep the report on localhost. |
|
|
55
|
+
| `--verbose` / `--debug` | Show privacy-safe judge diagnostics without excerpt text. |
|
|
70
56
|
|
|
71
|
-
|
|
57
|
+
Manage saved reports with:
|
|
72
58
|
|
|
73
59
|
```bash
|
|
74
|
-
|
|
60
|
+
behavior-wrapped list
|
|
61
|
+
behavior-wrapped open <id>
|
|
62
|
+
behavior-wrapped delete <id>
|
|
75
63
|
```
|
|
76
64
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
Use `--limit=100` to retain more than the default 50 families.
|
|
65
|
+
## Development
|
|
80
66
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
67
|
+
```bash
|
|
68
|
+
npm install
|
|
69
|
+
npm run wrapped -- --demo
|
|
70
|
+
npm run check
|
|
71
|
+
```
|
|
84
72
|
|
|
85
|
-
-
|
|
86
|
-
- Research transcript storage uses the private `behavior-wrapped-research-donations` R2 bucket. Consent and lifecycle metadata use the separate `behavior-wrapped-research-metadata` D1 database initialized by `migrations/research/0001_encrypted_donations.sql`.
|
|
87
|
-
- Hosted reports currently use unguessable URLs and installation-scoped deletion rather than user accounts.
|
|
73
|
+
Use `npm run dev` for hosted-page UI work. See the [development guide](docs/development.md) for local modes, relay configuration, phrase research, and maintainer operations.
|
|
88
74
|
|
|
89
75
|
## License
|
|
90
76
|
|