@r_masseater/watashi 0.1.1 → 0.1.3

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/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@r_masseater/watashi",
3
- "version": "0.1.1",
4
- "description": "CLI for watashi (watashi.masseater.dev). Sends Claude Code transcripts from a Stop hook after masking secrets locally with Betterleaks, and manages login and API tokens.",
3
+ "version": "0.1.3",
4
+ "description": "CLI for watashi (watashi.masseater.dev). Sends Claude Code transcripts from a Stop hook after masking secrets locally with h56m, and manages login and API tokens.",
5
5
  "keywords": [
6
- "betterleaks",
7
6
  "claude-code",
7
+ "h56m",
8
+ "tanstack-intent",
8
9
  "watashi"
9
10
  ],
10
11
  "homepage": "https://github.com/masseater/masseater.dev/tree/main/libs/watashi#readme",
@@ -21,29 +22,36 @@
21
22
  "watashi": "./dist/main.mjs"
22
23
  },
23
24
  "files": [
24
- "dist",
25
25
  ".claude-plugin",
26
- "hooks"
26
+ "dist",
27
+ "hooks",
28
+ "skills/send-conversations"
27
29
  ],
28
30
  "type": "module",
29
31
  "imports": {
30
32
  "#package.json": "./package.json",
31
- "#plugin.json": "./.claude-plugin/plugin.json"
33
+ "#plugin.json": "./.claude-plugin/plugin.json",
34
+ "#/*": "./src/*"
32
35
  },
33
36
  "publishConfig": {
34
37
  "access": "public",
35
38
  "provenance": true
36
39
  },
40
+ "dependencies": {
41
+ "@r_masseater/h56m": "^0.3.4",
42
+ "@r_masseater/node-main": "^0.2.1"
43
+ },
37
44
  "devDependencies": {
38
- "@effect/platform-node": "4.1.2",
39
- "@effect/vitest": "4.1.2",
45
+ "@effect/platform-node": "4.1.7",
46
+ "@effect/vitest": "4.1.7",
47
+ "@masseater.dev/local-server": "0.0.0",
40
48
  "@masseater.dev/watashi-protocol": "0.0.0",
41
- "@types/node": "26.6.6",
42
- "effect": "4.1.2",
43
- "vite-plus": "1.5.1"
49
+ "@types/node": "26.6.10",
50
+ "effect": "4.1.7",
51
+ "lapse": "0.0.0",
52
+ "vite-plus": "1.8.0"
44
53
  },
45
54
  "engines": {
46
- "node": ">=26"
47
- },
48
- "scripts": {}
55
+ "node": "v26.13.1"
56
+ }
49
57
  }
@@ -0,0 +1,65 @@
1
+ ---
2
+ name: send-conversations
3
+ description: >
4
+ Use when sending Claude Code transcripts to watashi (watashi.masseater.dev) with the
5
+ @r_masseater/watashi CLI or its Claude Code plugin: login, API tokens for cloud sessions, the Stop
6
+ hook, conversation push, local secret masking with h56m and the WATASHI_* variables.
7
+ metadata:
8
+ type: core
9
+ library: "@r_masseater/watashi"
10
+ library_version: 0.1.1
11
+ sources:
12
+ - src/app/**
13
+ - hooks/**
14
+ - .claude-plugin/**
15
+ - README.md
16
+ ---
17
+
18
+ # send-conversations
19
+
20
+ The `watashi` CLI masks secrets in a Claude Code transcript with h56m on the local machine.
21
+ It then sends the transcript to watashi.
22
+ The Claude Code plugin `watashi` runs `watashi hook stop` when a session stops.
23
+
24
+ ## Prerequisites
25
+
26
+ The CLI needs Node.js 26 or later.
27
+ When h56m cannot load or a finding survives masking, the CLI refuses to send, so no unmasked text leaves the machine.
28
+
29
+ ## Send every session automatically
30
+
31
+ 1. Install the plugin from the masseater/masseater.dev marketplace.
32
+
33
+ ```sh
34
+ /plugin marketplace add masseater/masseater.dev
35
+ /plugin install watashi@masseater-dev
36
+ ```
37
+
38
+ 2. Set `WATASHI_SEND_CONVERSATIONS=1`. The hook sends nothing without it.
39
+ 3. Sign in once with `npx @r_masseater/watashi login`. A machine with a browser does this.
40
+
41
+ ## Cloud sessions
42
+
43
+ A cloud session has no browser, so it cannot run `login`. On a machine that is signed in, issue a long-lived token and set it as `WATASHI_TOKEN` in the cloud environment.
44
+
45
+ ```sh
46
+ npx @r_masseater/watashi token issue --scope conversation:write --label cloud
47
+ ```
48
+
49
+ `token list` shows the tokens and `token revoke <id>` removes one. The scopes are `conversation:write` and `memory:write`.
50
+
51
+ ## Commands
52
+
53
+ | Command | Does |
54
+ | -------------------------------------------------------------------------------------- | ---------------------------------------------------------- |
55
+ | `login`, `logout` | Signs in to watashi in the browser, or signs out |
56
+ | `conversation push --kind claude-code --session <id> [--cwd <dir>] <transcript.jsonl>` | Masks and sends one transcript |
57
+ | `mask` | Prints stdin with secrets masked, without sending anything |
58
+ | `hook stop` | What the plugin's Stop hook runs |
59
+
60
+ `WATASHI_URL` points the CLI at another watashi, and `WATASHI_HOME` moves its local state.
61
+
62
+ ## Common mistakes
63
+
64
+ Keep the token in the environment's secrets, never in a repository or a transcript.
65
+ The hook sends nothing until `WATASHI_SEND_CONVERSATIONS=1` is set.