@r_masseater/watashi 0.0.0-stage → 0.1.1
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/.claude-plugin/plugin.json +12 -0
- package/LICENSE +661 -0
- package/README.md +52 -2
- package/dist/main.mjs +51327 -0
- package/hooks/hooks.json +17 -0
- package/package.json +46 -3
package/README.md
CHANGED
|
@@ -1,3 +1,53 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @r_masseater/watashi
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The command-line client of [watashi](https://watashi.masseater.dev). watashi is
|
|
4
|
+
the owner's personal data service. A Stop hook sends Claude Code transcripts to
|
|
5
|
+
it. Secrets are masked on the local machine first, with
|
|
6
|
+
[Betterleaks](https://github.com/betterleaks/betterleaks). The client also signs
|
|
7
|
+
in and manages API tokens.
|
|
8
|
+
|
|
9
|
+
It needs Node.js 26 or later. It also needs Betterleaks 2.0.0-rc.7, found
|
|
10
|
+
through `mise`, on `PATH`, or at the path in `WATASHI_BETTERLEAKS`. The package
|
|
11
|
+
is one bundled file with no runtime dependencies.
|
|
12
|
+
|
|
13
|
+
## As a Claude Code plugin
|
|
14
|
+
|
|
15
|
+
The package is also the Claude Code plugin `watashi` in the
|
|
16
|
+
[masseater/skills](https://github.com/masseater/skills) marketplace. The plugin
|
|
17
|
+
runs `watashi hook stop` when a session stops.
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
/plugin marketplace add masseater/skills
|
|
21
|
+
/plugin install watashi@masseater
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
The hook sends nothing unless `WATASHI_SEND_CONVERSATIONS=1` is set. It sends
|
|
25
|
+
only the lines that grew since the last stop. It fails closed. When Betterleaks
|
|
26
|
+
is missing or a finding cannot be masked, it sends nothing. The reason goes to
|
|
27
|
+
`hook.log` in the config directory.
|
|
28
|
+
|
|
29
|
+
## As a command
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
npx @r_masseater/watashi login
|
|
33
|
+
npx @r_masseater/watashi token issue --scope conversation:write --label cloud
|
|
34
|
+
npx @r_masseater/watashi conversation push --kind claude-code --session <id> <transcript.jsonl>
|
|
35
|
+
npx @r_masseater/watashi mask < transcript.jsonl
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
`login` signs in through the browser with OAuth. It uses dynamic client
|
|
39
|
+
registration and PKCE. The tokens go to `oauth.json`, readable only by the
|
|
40
|
+
owner. A cloud session has no browser. There, issue a long-lived token on a
|
|
41
|
+
machine that is signed in, and set it as `WATASHI_TOKEN`.
|
|
42
|
+
|
|
43
|
+
| Variable | Meaning |
|
|
44
|
+
| ---------------------------- | ----------------------------------------------------------------------- |
|
|
45
|
+
| `WATASHI_SEND_CONVERSATIONS` | `1` lets the Stop hook send transcripts |
|
|
46
|
+
| `WATASHI_TOKEN` | A token from `token issue`, used instead of the saved login |
|
|
47
|
+
| `WATASHI_URL` | The watashi origin, `https://watashi.masseater.dev` by default |
|
|
48
|
+
| `WATASHI_HOME` | The config directory, `$XDG_CONFIG_HOME/watashi` or `~/.config/watashi` |
|
|
49
|
+
| `WATASHI_BETTERLEAKS` | The Betterleaks binary to use; no other one is tried when it is set |
|
|
50
|
+
|
|
51
|
+
## License
|
|
52
|
+
|
|
53
|
+
AGPL-3.0-only
|