@hayasaka7/haya-pet 0.2.3 → 0.2.5

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/CHANGELOG.md CHANGED
@@ -1,12 +1,19 @@
1
1
  # Changelog
2
2
 
3
- All notable changes to Haya Pet are documented here. This project adheres to
3
+ All notable changes to HAYA Pet are documented here. This project adheres to
4
4
  [Semantic Versioning](https://semver.org/).
5
5
 
6
6
  > Note: some entries originally drafted under 0.2.0 actually landed *after* the
7
7
  > 0.2.0 npm publish; they are listed under 0.2.1, which is the first version that
8
8
  > ships them.
9
9
 
10
+ ## [0.2.4]
11
+
12
+ ### Fixed
13
+ - Removed the non-functional **"Open Settings"** tray item (it had no handler).
14
+ A settings window is deferred until settings outgrow the tray; every current
15
+ setting already has a tray, CLI, or gesture home.
16
+
10
17
  ## [0.2.3]
11
18
 
12
19
  ### Added
package/README.md CHANGED
@@ -1,294 +1,294 @@
1
1
  <div align="center">
2
2
 
3
- # 🐾 Haya Pet
3
+ # HAYA Pet
4
4
 
5
- ### One desktop companion for all your AI terminal agents
5
+ ### Let your Codex Desktop pets follow you into every AI terminal
6
6
 
7
- A transparent, draggable desktop pet that reflects what your AI CLIs are doing —
8
- Codex, Claude Code, Antigravity, Aider, or any command through one shared
9
- runtime with client adapters.
7
+ HAYA Pet is a local desktop companion for Codex, Claude Code, Antigravity,
8
+ Aider, Gemini CLI, and almost any command-line AI client. It was inspired by
9
+ Codex Desktop pets, but fixes the part that hurts: pets generated for Codex
10
+ Desktop should not be trapped inside Codex Desktop.
10
11
 
11
- <!-- HERO SCREENSHOT: drop a wide shot at docs/screenshots/hero.png
12
- (the pet on the desktop with a couple of session bubbles) -->
12
+ Drop in a Codex-compatible pet, wrap your AI CLI with `haya-pet run`, and the
13
+ same little character can watch all your agent sessions from one always-on-top
14
+ overlay.
13
15
 
14
- ![Haya Pet on the desktop](docs/screenshots/hero.png)
16
+ ![HAYA Pet on the desktop](docs/screenshots/hero.png)
15
17
 
16
18
  </div>
17
19
 
18
20
  ---
19
21
 
20
- ## What is this?
22
+ ## Why HAYA Pet Exists
21
23
 
22
- Most "desktop pet for an AI tool" projects build one pet per tool. Haya Pet does
23
- the opposite: it is **one AI Terminal Pet Runtime** that many AI clients plug
24
- into through adapters.
24
+ Codex Desktop made AI pets feel personal. The problem is portability: once a pet
25
+ is generated there, it is useful only there.
25
26
 
26
- You might be running several agents at once:
27
+ HAYA Pet turns those pet assets into a shared runtime for the AI tools you
28
+ actually use day to day:
27
29
 
28
30
  ```text
29
- Codex CLI backend repo
30
- Claude Code frontend repo
31
- Antigravity CLI → infra repo
32
- Aider docs repo
31
+ Codex CLI -> backend work
32
+ Claude Code -> frontend work
33
+ Antigravity -> infra work
34
+ Aider / Gemini -> docs, scripts, experiments
35
+ Any command -> still gets a session bubble
33
36
  ```
34
37
 
35
- Haya Pet watches all of them and presents one ambient interface:
36
-
37
- - **One global pet** — reflects the selected or most urgent AI session; clickable,
38
- draggable, and position-persistent like a real desktop companion.
39
- - **Session bubbles** — one compact bubble per active session showing client,
40
- project, the latest activity, and a status icon (a spinning *working* circle, a
41
- green *done* check, a yellow *needs you*, or a red *failed* cross). Bubbles stack
42
- by connect time — the newest session on top — so the stack never reshuffles while
43
- work is in progress. A folder button beside the pet folds them away.
44
-
45
- ## Features
46
-
47
- - 🪟 **Transparent, frameless, always-on-top overlay** that doesn't steal focus and
48
- stays click-through outside the pet and bubbles.
49
- - 🖱️ **Click / double-click / drag** — click folds/unfolds the bubbles, double-click
50
- expands them, drag moves the pet (position persists; bubbles stay on-screen).
51
- - 📏 **Resizable pet** — hover the pet and drag the corner grip to scale it
52
- 0.5×–2× for your screen; double-click the grip to reset. The size persists.
53
- - 🟢 **Live session bubbles** with per-session status icons and a folder toggle.
54
- - 🧠 **Normalized state model** — every client maps to a shared state vocabulary
55
- (`thinking`, `running_tool`, `waiting_approval`, `reviewing`, `failed`, …).
56
- - 🧩 **Client adapters** with tiered support (process wrapper → PTY observer →
57
- client hooks) so the daemon never bakes in client-specific logic. Default is
58
- lifecycle status; richer status is opt-in (Claude Code / Codex hooks via
59
- `haya-pet hooks on`, or PTY `--observe` for any client).
60
- - 🚀 **Zero-setup launch** — `haya-pet run …` auto-starts the overlay; no separate
61
- daemon to manage.
62
- - 🖼️ **Codex-compatible pet assets** (1536×1872 sprite atlas, 9 actions).
63
- - 🔒 **Local-only & private** — no prompts, files, or screenshots leave your machine.
64
- - 🪟🍎🐧 **Cross-platform** core with per-OS adapters for IPC and windowing.
38
+ Instead of one pet per app, you get **one pet for your whole AI workspace**. It
39
+ reacts to the selected or most urgent session, while compact bubbles show what
40
+ each running client is doing.
65
41
 
66
- ## Screenshots
42
+ ## The Candy
67
43
 
68
- <!-- Drop each PNG into docs/screenshots/ with the filename shown (~800px wide).
69
- Delete any row you don't have a shot for. -->
44
+ - **Bring your Codex Desktop pets with you.** HAYA Pet scans `~/.codex/pets`, so
45
+ Codex-compatible pet folders can be reused without rebuilding the character.
46
+ - **Use one pet across many AI clients.** Codex and Claude Code get richer
47
+ live-status hooks; everything else can connect through the generic wrapper.
48
+ - **See all active agents at a glance.** Session bubbles show client, project,
49
+ latest activity, and status: working, done, needs attention, or failed.
50
+ - **Keep your terminal native.** The default wrapper preserves normal terminal
51
+ input. No broken Shift+Tab just to make the pet move.
52
+ - **Stay local.** HAYA Pet does not upload prompts, files, screenshots, or logs.
70
53
 
71
- | | |
72
- |---|---|
73
- | **The global pet** — reacting to the highest-priority session.<br>![Pet overlay](docs/screenshots/pet-overlay.png) | **Session bubbles** — one per active session, with status icons.<br>![Session bubbles](docs/screenshots/session-bubbles.png) |
74
- | **Folder collapsed** — bubbles tucked away beside the pet.<br>![Folder collapsed](docs/screenshots/folder-collapsed.png) | **Tray menu** — show/hide, pets, reset position, Quit.<br>![Tray menu](docs/screenshots/tray-menu.png) |
54
+ ## Quick Start
75
55
 
76
- ## Documentation
56
+ ### 1. Install
77
57
 
78
- | Doc | What's in it |
79
- |---|---|
80
- | **This README** | Install + users' guide |
81
- | [docs/architecture.md](docs/architecture.md) | How it works, components, project structure, adapter tiers, platform matrix, native helpers, roadmap |
82
- | [docs/publishing.md](docs/publishing.md) | Releasing to npm (the tag → publish workflow) |
83
- | [docs/troubleshooting.md](docs/troubleshooting.md) | Common fixes, incl. repairing a broken Electron install |
84
- | [docs/known-issues.md](docs/known-issues.md) | Deferred issues with known root causes |
85
- | [docs/cross-os-qa.md](docs/cross-os-qa.md) | Cross-OS test matrix |
86
- | [apps/companion/README.md](apps/companion/README.md) | Companion (Electron) internals |
87
- | [PROGRESS.md](PROGRESS.md) | Detailed development log |
58
+ From npm, when available:
88
59
 
89
- ---
60
+ ```bash
61
+ npm install -g @hayasaka7/haya-pet
62
+ ```
90
63
 
91
- # Users' Guide
64
+ From source:
92
65
 
93
- ## Requirements
66
+ ```bash
67
+ git clone <repo-url> haya-pet
68
+ cd haya-pet
69
+ npm install
70
+ npm link
71
+ ```
94
72
 
95
- | Requirement | Why |
96
- |---|---|
97
- | **Node ≥ 18** | Runtime + companion (Electron) |
98
- | **npm** | Install + scripts |
73
+ Prefer not to link globally? Use the CLI directly:
99
74
 
100
- > Default status is lifecycle-only and needs no extra modules. Opt-in Claude Code /
101
- > Codex hooks (`haya-pet hooks on`) also need none. The opt-in `--observe` PTY mode uses
102
- > `node-pty` (installed automatically when it can build; without it, `--observe`
103
- > degrades to lifecycle-only tracking).
75
+ ```bash
76
+ node <repo>/apps/cli/src/haya-pet.js
77
+ ```
104
78
 
105
- ## Install
79
+ ### 2. Add A Pet
106
80
 
107
- **From npm** *(once published recommended for users):*
81
+ Put a Codex-compatible pet folder in `~/.codex/pets` or `~/.haya-pet/pets`.
108
82
 
109
- ```bash
110
- npm install -g @hayasaka7/haya-pet # exposes the `haya-pet` command globally
83
+ On Windows, HAYA Pet also checks `%USERPROFILE%\.codex\pets` and
84
+ `%LOCALAPPDATA%\haya-pet\pets`.
85
+
86
+ ```text
87
+ ~/.codex/pets/my-pet/
88
+ pet.json
89
+ spritesheet.webp
111
90
  ```
112
91
 
113
- **From source** *(current):*
92
+ Minimal `pet.json`:
93
+
94
+ ```json
95
+ {
96
+ "id": "my-pet",
97
+ "name": "My Pet",
98
+ "spritesheet": "spritesheet.webp"
99
+ }
100
+ ```
101
+
102
+ The spritesheet format is the Codex-compatible atlas used by this project:
103
+ 1536 x 1872 pixels, 8 columns x 9 rows, 192 x 208 per frame.
104
+
105
+ Choose the pet:
114
106
 
115
107
  ```bash
116
- git clone <repo-url> haya-pet
117
- cd haya-pet
118
- npm install
119
- npm link # makes `haya-pet` available everywhere
108
+ haya-pet pets
109
+ haya-pet pets use my-pet
120
110
  ```
121
111
 
122
- Prefer not to link globally? Call it directly anywhere you'd type `haya-pet`:
123
- `node <repo>/apps/cli/src/haya-pet.js`.
112
+ You can also switch pets from the tray menu.
124
113
 
125
- ## Run an AI session
114
+ ### 3. Run Your AI Client Through HAYA Pet
126
115
 
127
- Just wrap any command. **The first `haya-pet run` auto-starts the pet overlay**
128
- there's nothing to launch first:
116
+ The first `haya-pet run` starts the overlay automatically.
129
117
 
130
118
  ```bash
131
- haya-pet run --client codex -- codex
132
- haya-pet run --client claude-code -- claude
133
- haya-pet run --client generic -- aider
134
- # Windows / PowerShell example:
135
- haya-pet run --client generic -- powershell -Command "Start-Sleep 10"
119
+ haya-pet run --client codex
120
+ haya-pet run --client claude-code
121
+ haya-pet run --client antigravity
122
+
123
+ # Any other CLI:
124
+ haya-pet run --client generic -- aider
125
+ haya-pet run --client generic -- gemini
126
+ haya-pet run --client generic -- your-ai-command --with --args
136
127
  ```
137
128
 
138
- A **session bubble** appears while the command runs (client · project · status),
139
- and the pet reflects the highest-priority session. On exit the bubble briefly
140
- shows success (a green check) or failure (a red cross), then fades.
129
+ A bubble appears for the session. When the command exits, the bubble shows
130
+ success or failure briefly, then fades.
131
+
132
+ ## What You Get On Screen
133
+
134
+ | Surface | What it does |
135
+ |---|---|
136
+ | Global pet | Reacts to the highest-priority session and can be dragged anywhere. |
137
+ | Session bubbles | One bubble per running AI session, ordered by connect time. |
138
+ | Folder button | Folds the bubbles away when you want a cleaner desktop. |
139
+ | Tray menu | Show/hide, display mode, installed pets, reset position, and quit. |
140
+ | Resize grip | Hover the pet, drag the corner, and keep the size you like. |
141
+
142
+ ## Screenshots
143
+
144
+ | | |
145
+ |---|---|
146
+ | **The global pet** - reacting to the highest-priority session.<br>![Pet overlay](docs/screenshots/pet-overlay.png) | **Session bubbles** - one per active session, with status icons.<br>![Session bubbles](docs/screenshots/session-bubbles.png) |
147
+ | **Folder collapsed** - bubbles tucked away beside the pet.<br>![Folder collapsed](docs/screenshots/folder-collapsed.png) | **Tray menu** - show/hide, pets, reset position, quit.<br>![Tray menu](docs/screenshots/tray-menu.png) |
141
148
 
142
- > If the overlay can't be started (e.g. Electron is missing), your command still
143
- > runs normally and keeps its exit code — you just won't see the pet. Disable
144
- > auto-start with `HAYA_PET_NO_AUTOSTART=1`, or launch it yourself with `haya-pet start`.
149
+ ## Supported Clients
145
150
 
146
- ### Live activity status
151
+ HAYA Pet has two ideas of support:
147
152
 
148
- `haya-pet run` uses **native passthrough by default** the CLI talks directly to
149
- your terminal, so every input mode (Shift+Tab, mouse wheel, word-edit) works
150
- exactly as it does without the wrapper. Out of the box, every client shows
151
- **lifecycle status** (a session bubble while it runs; success/failure from the
152
- real exit code, never from scraping "error" out of output).
153
+ - **Connection support:** the client can be wrapped and shown as a session.
154
+ - **Live-status support:** the pet can react to in-session states like thinking,
155
+ editing files, running tools, or waiting for approval.
153
156
 
154
- ```bash
155
- haya-pet run --client claude-code -- claude # full fidelity, lifecycle status
156
- haya-pet run --client codex -- codex # full fidelity, lifecycle status
157
- ```
157
+ | Client | Works today | Best mode |
158
+ |---|---:|---|
159
+ | Codex CLI | Yes | Wrapper + opt-in hooks, with transcript-based tool activity |
160
+ | Claude Code | Yes | Wrapper + opt-in hooks |
161
+ | Antigravity | Yes | Wrapper lifecycle |
162
+ | Aider | Yes | Generic wrapper |
163
+ | Gemini CLI | Yes | Generic wrapper |
164
+ | Any other command | Yes | Generic wrapper, optional `--observe` |
158
165
 
159
- Two **opt-in** ways to get richer *in-session* status (thinking / running tools /
160
- editing files / waiting for approval):
166
+ Default behavior is intentionally conservative: HAYA Pet shows lifecycle status
167
+ without changing how the terminal behaves. Richer live status is opt-in.
168
+
169
+ ## Live Status
170
+
171
+ For Codex and Claude Code, enable hooks once:
161
172
 
162
173
  ```bash
163
- # Claude Code AND Codex — live status via per-session hooks, NO terminal-fidelity
164
- # tradeoff. Enable once (persisted, global); the first run for each client shows a
165
- # one-time "review hooks" prompt you approve once.
166
174
  haya-pet hooks on
167
- haya-pet run --client claude-code -- claude
168
- haya-pet run --client codex -- codex
169
- # (per-run override without persisting: HAYA_PET_HOOKS=1 …, or $env:HAYA_PET_HOOKS=1 in PowerShell)
170
- # (turn back off: haya-pet hooks off · check: haya-pet hooks status)
171
-
172
- # Any client — coarse live status by watching output through a PTY.
173
- haya-pet run --observe --client codex -- codex
175
+ haya-pet run --client codex
176
+ haya-pet run --client claude-code
174
177
  ```
175
178
 
176
- > **Codex coverage.** Codex shows `thinking` (working) and `idle` (done) via hooks,
177
- > plus `running_tool` / `editing_files` via a session-transcript watcher.
178
- > *Waiting for approval* doesn't arrive yet because of an upstream gap where
179
- > Codex's `PermissionRequest` hook doesn't fire
180
- > ([openai/codex#16732](https://github.com/openai/codex/issues/16732)); it'll start
181
- > working automatically once Codex fixes it. Also: if you pass your own
182
- > `-p/--profile` to codex, haya-pet skips hook injection (Codex allows one
183
- > profile) and tells you. Claude Code has full coverage.
184
-
185
- > **Approval prompts resolve correctly** (Claude Code): deny → the pet returns to
186
- > idle the moment the denial lands in the session transcript; accept a command →
187
- > the pet flips to *working* a couple of seconds after the approved command
188
- > actually starts running (detected from the client's process tree — a real
189
- > event, never a timeout, so an unanswered prompt keeps warning until you decide).
190
-
191
- > **Why opt-in?**
192
- > - **Hooks (Claude Code / Codex):** injecting hooks makes the client show a
193
- > one-time *review hooks* trust prompt. We don't disrupt your session by default;
194
- > turn it on once with `haya-pet hooks on` when you're happy to approve the hooks.
195
- > - **`--observe` (any client):** PTY observation infers status from output, but on
196
- > Windows it routes input through ConPTY, which can break **Shift+Tab**, mouse
197
- > scroll, and word-edit. Use it only for non-interactive runs. See
198
- > [docs/known-issues.md](docs/known-issues.md).
199
-
200
- ## Add and choose a pet
201
-
202
- A pet is a folder with `pet.json` and a 1536×1872 sprite atlas (8×9 cells of
203
- 192×208). Drop it into a search path:
179
+ Check or disable the setting:
204
180
 
205
- ```text
206
- ~/.codex/pets/my-pet/ (Windows: %USERPROFILE%\.codex\pets\my-pet\)
207
- pet.json { "id": "my-pet", "name": "My Pet", "spritesheet": "spritesheet.webp" }
208
- spritesheet.webp
181
+ ```bash
182
+ haya-pet hooks status
183
+ haya-pet hooks off
209
184
  ```
210
185
 
211
- Pets are discovered from `~/.codex/pets` and `~/.haya-pet/pets`. Then choose one:
186
+ Why opt in? Both clients show a one-time trust prompt when hooks are added. HAYA
187
+ Pet lets you decide when to approve that instead of surprising you in the middle
188
+ of work.
189
+
190
+ Codex support is useful but still partial. Hooks report `thinking` and `idle`,
191
+ while a transcript watcher reports tool/file activity. Waiting-for-approval
192
+ support depends on an upstream Codex hook gap:
193
+ [openai/codex#16732](https://github.com/openai/codex/issues/16732).
194
+
195
+ For any client, you can ask HAYA Pet to infer rough activity from terminal
196
+ output:
212
197
 
213
198
  ```bash
214
- haya-pet pets # list installed pets (* = selected)
215
- haya-pet pets use my-pet # select; remembered on every launch
199
+ haya-pet run --observe --client generic -- aider
216
200
  ```
217
201
 
218
- Your choice is stored and reused every time. You can also pick from the tray menu
219
- **Installed Pets**. Without a spritesheet, the pet renders labelled placeholder
220
- frames so everything still works.
202
+ Use `--observe` only when you accept the PTY tradeoff. On Windows, ConPTY can
203
+ break special input such as Shift+Tab, mouse scroll, and word-edit. The default
204
+ non-observe mode keeps terminal input native.
221
205
 
222
- ## Interact with the pet
206
+ ## Pet Controls
223
207
 
224
208
  | Action | Result |
225
209
  |---|---|
226
- | Single click | waves + folds/unfolds the session bubbles |
227
- | Double click | jumps + expands the bubbles |
228
- | Drag | moves the pet; position is saved (bubbles follow, always on-screen) |
229
- | Drag corner grip | resizes the pet 0.5×–2× (grip appears on hover); size is saved |
230
- | Double-click grip | resets the pet to its normal size |
231
- | Tray icon menu | show/hide, display mode, sessions, pets, **reset position**, **Quit** |
210
+ | Single click | Wave and fold or unfold session bubbles. |
211
+ | Double click | Jump and expand session bubbles. |
212
+ | Drag | Move the pet; position is saved. |
213
+ | Drag corner grip | Resize from 0.5x to 2x; size is saved. |
214
+ | Double-click grip | Reset to normal size. |
215
+ | Tray icon | Open menu for display, sessions, pets, reset, and quit. |
232
216
 
233
- ## Stop / exit the pet
217
+ ## Commands
234
218
 
235
219
  ```bash
236
- haya-pet stop # ask the running overlay to quit
237
- ```
220
+ haya-pet run --client codex # launch Codex with a pet session
221
+ haya-pet run --client claude-code # launch Claude Code with a pet session
222
+ haya-pet run --client generic -- aider # wrap any other command
238
223
 
239
- …or **right-click the tray icon → Quit**. `haya-pet stop` is a no-op if nothing is
240
- running, so it's always safe to call.
224
+ haya-pet pets # list installed pets
225
+ haya-pet pets use my-pet # select a pet
241
226
 
242
- ## Manage the overlay
227
+ haya-pet hooks on # enable live-status hooks where supported
228
+ haya-pet hooks status
229
+ haya-pet hooks off
243
230
 
244
- ```bash
245
- haya-pet start # start the overlay explicitly (usually unnecessary — run auto-starts it)
246
- haya-pet stop # quit it
231
+ haya-pet start # start the overlay explicitly
232
+ haya-pet stop # stop the overlay
247
233
  ```
248
234
 
249
- ## Troubleshooting
235
+ If the overlay cannot start, the wrapped command still runs and keeps its real
236
+ exit code. Disable auto-start with `HAYA_PET_NO_AUTOSTART=1`.
250
237
 
251
- Common fixes:
238
+ ## Requirements
252
239
 
253
- | Symptom | Fix |
240
+ | Requirement | Why |
254
241
  |---|---|
255
- | `haya-pet: command not found` | Install globally, or `npm link` in a source checkout. |
256
- | Pet doesn't react to a session | Launch via `haya-pet run …`; check `HAYA_PET_NO_AUTOSTART` isn't set. |
257
- | Pet shows a blue placeholder box | No spritesheet — add a pet (above). |
258
- | Pet is off-screen | Tray menu **Reset Position**. |
259
- | Can't exit | `haya-pet stop` or tray → **Quit**. |
242
+ | Node 18 or newer | Runtime and Electron companion. |
243
+ | npm | Install, link, and test scripts. |
244
+ | Electron | Installed as a runtime dependency. |
245
+ | node-pty | Optional; used only for `--observe`. |
260
246
 
261
- Full list (incl. repairing a broken Electron install): [docs/troubleshooting.md](docs/troubleshooting.md).
247
+ ## Troubleshooting
262
248
 
263
- ---
249
+ | Symptom | Fix |
250
+ |---|---|
251
+ | `haya-pet: command not found` | Install globally, or run `npm link` from this repo. |
252
+ | No pet appears for a session | Start the AI client through `haya-pet run ...`. |
253
+ | Pet shows a placeholder | Add a pet folder with both `pet.json` and `spritesheet.webp`. |
254
+ | Pet is off-screen | Use tray menu -> **Reset Position**. |
255
+ | Overlay will not exit | Run `haya-pet stop` or tray menu -> **Quit**. |
264
256
 
265
- ## Supported clients
257
+ More fixes are in [docs/troubleshooting.md](docs/troubleshooting.md), including
258
+ repairing a broken Electron install.
266
259
 
267
- | Client | Status | Support level |
268
- |---|---|---|
269
- | Generic CLI | ✅ | L1 process wrapper (+ L2 PTY via `--observe`) |
270
- | Codex | ✅ | L1 wrapper + **L4 live-status hooks** (opt-in `haya-pet hooks on`; partial — see note) |
271
- | Claude Code | ✅ | L1 wrapper + **L4 live-status hooks** (opt-in `haya-pet hooks on`) |
272
- | Antigravity | ✅ | L1 wrapper (+ L2 PTY via `--observe`) |
273
- | Gemini CLI / Aider / others | 🔜 | via the generic adapter |
260
+ ## Privacy
274
261
 
275
- (See [docs/architecture.md](docs/architecture.md) for the support tiers and the
276
- platform matrix, and [CHANGELOG.md](CHANGELOG.md) for release notes.)
262
+ HAYA Pet is local-only by default. It does not upload prompts, files,
263
+ screenshots, or session logs. The overlay stores only local state needed for
264
+ pet selection, position, size, and short derived status summaries.
277
265
 
278
- ## Privacy
266
+ ## Documentation
267
+
268
+ | Doc | What it covers |
269
+ |---|---|
270
+ | [docs/architecture.md](docs/architecture.md) | Runtime design, adapter tiers, platform matrix, roadmap. |
271
+ | [docs/publishing.md](docs/publishing.md) | Release and npm publishing flow. |
272
+ | [docs/troubleshooting.md](docs/troubleshooting.md) | Common failures and repair steps. |
273
+ | [docs/known-issues.md](docs/known-issues.md) | Current limitations and upstream gaps. |
274
+ | [docs/cross-os-qa.md](docs/cross-os-qa.md) | Cross-OS QA checklist. |
275
+ | [apps/companion/README.md](apps/companion/README.md) | Electron companion internals. |
276
+ | [assets/fallback-pet/README.md](assets/fallback-pet/README.md) | Bundled fallback pet details. |
277
+ | [PROGRESS.md](PROGRESS.md) | Development log. |
279
278
 
280
- Haya Pet is local-only by default. It does **not** upload prompts, files,
281
- screenshots, or session logs; it stores only short derived status summaries.
282
- Approvals always require explicit user action.
279
+ ## Contributing
283
280
 
284
- ## Contributing & tests
281
+ Run the full test suite:
285
282
 
286
283
  ```bash
287
- npm test # runs the full suite (TDD; tests live in **/test/*.test.mjs)
284
+ npm test
288
285
  ```
289
286
 
290
- See [docs/architecture.md](docs/architecture.md) to find your way around the code.
287
+ The codebase is organized as one npm package with internal packages under
288
+ `packages/` and apps under `apps/`. Start with
289
+ [docs/architecture.md](docs/architecture.md) if you want to add a client adapter,
290
+ touch the overlay, or work on pet rendering.
291
291
 
292
292
  ## License
293
293
 
294
- See [`LICENSE`](LICENSE).
294
+ MIT. See [LICENSE](LICENSE).
@@ -1,11 +1,11 @@
1
- # Haya Pet Companion (Electron overlay)
1
+ # HAYA Pet Companion (Electron overlay)
2
2
 
3
3
  The desktop overlay app for the AI CLI pet runtime. It hosts the daemon IPC
4
4
  server, renders the global pet, and shows the session bubbles. (A reply/approval
5
5
  "task talk window" is scaffolded but parked — see below.)
6
6
 
7
7
  > Most users never launch this directly: `haya-pet run` auto-starts it. This doc
8
- > covers its internals. For installing/using Haya Pet, see the
8
+ > covers its internals. For installing/using HAYA Pet, see the
9
9
  > [root README](../../README.md) and [docs/architecture.md](../../docs/architecture.md).
10
10
 
11
11
  ## Architecture
@@ -15,7 +15,7 @@ import { clampScale } from "../../../../packages/pet-core/src/pet-scale.js";
15
15
  import { buildPetWindowOptions, PET_SIZE } from "./window-options.js";
16
16
  import { resolveSavedPosition } from "./display-manager.js";
17
17
  import { getPetScale, setPetScale, setSelectedPet, updateGlobalPetPosition } from "./position-store.js";
18
- import { buildTrayMenu } from "./tray-menu.js";
18
+ import { buildTrayMenu, buildTrayTooltip } from "./tray-menu.js";
19
19
  import { createStateFile } from "./state-file.js";
20
20
  import { discoverPets } from "./pet-loader.js";
21
21
 
@@ -188,7 +188,7 @@ function clampPetLocal(local) {
188
188
  function createTray() {
189
189
  try {
190
190
  tray = new Tray(loadTrayIcon());
191
- tray.setToolTip("Haya Pet — right-click to Quit");
191
+ tray.setToolTip(buildTrayTooltip());
192
192
  } catch (error) {
193
193
  // A failed tray must not take the whole app down; log and continue.
194
194
  console.error("tray unavailable:", error.message);
@@ -9,6 +9,10 @@ const DISPLAY_MODES = Object.freeze([
9
9
  { value: "hybrid", label: "Hybrid" }
10
10
  ]);
11
11
 
12
+ export function buildTrayTooltip() {
13
+ return "HAYA Pet";
14
+ }
15
+
12
16
  export function buildTrayMenu(state = {}) {
13
17
  const sessions = Array.isArray(state.sessions) ? state.sessions : [];
14
18
  const pets = Array.isArray(state.pets) ? state.pets : [];
@@ -46,7 +50,11 @@ export function buildTrayMenu(state = {}) {
46
50
  checked: Boolean(state.attachBubblesToTerminals)
47
51
  },
48
52
  { id: "reset_position", label: "Reset Position" },
49
- { id: "settings", label: "Open Settings" },
53
+ // Parked until a real settings window exists: every current setting already
54
+ // has a home (tray toggles, `haya-pet hooks`, drag/grip gestures), so the
55
+ // item would be a dead button. Re-enable once settings outgrow the tray
56
+ // (e.g. bubble text size, linger duration) and a handler is wired up.
57
+ // { id: "settings", label: "Open Settings" },
50
58
  { id: "separator", type: "separator" },
51
59
  { id: "quit", label: "Quit" }
52
60
  ];
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta charset="UTF-8" />
5
5
  <meta http-equiv="Content-Security-Policy" content="default-src 'self' file:; img-src 'self' file: data:; style-src 'self' 'unsafe-inline';" />
6
- <title>Haya Pet</title>
6
+ <title>HAYA Pet</title>
7
7
  <link rel="stylesheet" href="styles.css" />
8
8
  </head>
9
9
  <body>
@@ -1,6 +1,6 @@
1
1
  import assert from "node:assert/strict";
2
2
  import { test } from "../../../test/harness.mjs";
3
- import { buildTrayMenu } from "../src/main/tray-menu.js";
3
+ import { buildTrayMenu, buildTrayTooltip } from "../src/main/tray-menu.js";
4
4
 
5
5
  const baseState = {
6
6
  petVisible: true,
@@ -13,9 +13,12 @@ const baseState = {
13
13
  test("includes the documented recovery controls", () => {
14
14
  const menu = buildTrayMenu(baseState);
15
15
  const ids = menu.map((item) => item.id);
16
- for (const id of ["toggle_pet", "display_mode", "sessions", "pets", "attach_bubbles", "reset_position", "settings", "quit"]) {
16
+ for (const id of ["toggle_pet", "display_mode", "sessions", "pets", "attach_bubbles", "reset_position", "quit"]) {
17
17
  assert.ok(ids.includes(id), `missing ${id}`);
18
18
  }
19
+ // "Open Settings" is parked until a settings window exists (every current
20
+ // setting already has a tray/CLI/gesture home) — it must not be shown dead.
21
+ assert.ok(!ids.includes("settings"), "settings item should stay hidden until implemented");
19
22
  });
20
23
 
21
24
  test("toggles the pet label based on visibility", () => {
@@ -43,3 +46,7 @@ test("reflects the attach-bubbles checkbox state", () => {
43
46
  assert.equal(buildTrayMenu(baseState).find((i) => i.id === "attach_bubbles").checked, true);
44
47
  assert.equal(buildTrayMenu({ ...baseState, attachBubblesToTerminals: false }).find((i) => i.id === "attach_bubbles").checked, false);
45
48
  });
49
+
50
+ test("uses the HAYA Pet brand in the tray hover text", () => {
51
+ assert.equal(buildTrayTooltip(), "HAYA Pet");
52
+ });
@@ -3,13 +3,13 @@
3
3
  <head>
4
4
  <meta charset="utf-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1">
6
- <title>Haya Pet Preview</title>
6
+ <title>HAYA Pet Preview</title>
7
7
  <link rel="stylesheet" href="./src/preview.css">
8
8
  </head>
9
9
  <body>
10
10
  <main class="app-shell">
11
11
  <section class="toolbar" aria-label="Preview controls">
12
- <h1 class="brand">Haya Pet Preview</h1>
12
+ <h1 class="brand">HAYA Pet Preview</h1>
13
13
  <label class="file-input">
14
14
  <span>Spritesheet</span>
15
15
  <input id="spritesheet-file" type="file" accept="image/png,image/webp">
@@ -1,6 +1,6 @@
1
1
  # Architecture
2
2
 
3
- How Haya Pet is put together. For installing and using it, see the
3
+ How HAYA Pet is put together. For installing and using it, see the
4
4
  [README](../README.md); this doc is for contributors and the curious.
5
5
 
6
6
  ## Pipeline
@@ -175,7 +175,7 @@ observation (`--observe`) or L1 lifecycle as the fallback. Current state:
175
175
  [openai/codex#16732](https://github.com/openai/codex/issues/16732)). Tool
176
176
  activity is covered by an L3 Codex transcript watcher that tails
177
177
  `~/.codex/sessions` JSONL: normal tools report `running_tool`, `apply_patch`
178
- reports `editing_files`, and Haya Pet returns to `thinking` after active tool
178
+ reports `editing_files`, and HAYA Pet returns to `thinking` after active tool
179
179
  calls drain. `PermissionRequest` (the *waiting for approval* cue — the
180
180
  highest-value state) is **unconfirmed**; it likely depends on an
181
181
  approval-required flow and needs a dedicated test before the feature is worth
@@ -1,6 +1,6 @@
1
1
  # Publishing
2
2
 
3
- How Haya Pet is released to npm. Most users never need this — see the
3
+ How HAYA Pet is released to npm. Most users never need this — see the
4
4
  [README](../README.md) to install and use it.
5
5
 
6
6
  ## Release flow
@@ -1,4 +1,4 @@
1
- // Haya Pet Windows window helper.
1
+ // HAYA Pet - Windows window helper.
2
2
  //
3
3
  // Implements the line-delimited JSON helper protocol documented in
4
4
  // ../README.md. Reads one JSON request per line on stdin and writes one JSON
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hayasaka7/haya-pet",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "type": "module",
5
5
  "description": "Generic AI CLI pet runtime foundation.",
6
6
  "license": "MIT",
@@ -1,75 +0,0 @@
1
- name: CI
2
-
3
- # Run code quality checks and the test suite on every push that touches code.
4
- on:
5
- push:
6
- paths:
7
- - "**/*.js"
8
- - "**/*.mjs"
9
- - "**/*.cjs"
10
- - "package.json"
11
- - "package-lock.json"
12
- - ".github/workflows/ci.yml"
13
- pull_request:
14
- paths:
15
- - "**/*.js"
16
- - "**/*.mjs"
17
- - "**/*.cjs"
18
- - "package.json"
19
- - "package-lock.json"
20
- - ".github/workflows/ci.yml"
21
-
22
- concurrency:
23
- group: ci-${{ github.workflow }}-${{ github.ref }}
24
- cancel-in-progress: true
25
-
26
- permissions:
27
- contents: read
28
-
29
- jobs:
30
- lint:
31
- name: Code quality (ESLint)
32
- runs-on: ubuntu-latest
33
- steps:
34
- - uses: actions/checkout@v4
35
-
36
- - name: Set up Node.js
37
- uses: actions/setup-node@v4
38
- with:
39
- node-version: 22
40
- cache: npm
41
-
42
- - name: Install dependencies
43
- # Electron's binary isn't needed for linting or tests; skip the ~150 MB
44
- # download so CI is fast and isn't at the mercy of the Electron CDN.
45
- env:
46
- ELECTRON_SKIP_BINARY_DOWNLOAD: "1"
47
- run: npm ci
48
-
49
- - name: Run ESLint
50
- run: npm run lint
51
-
52
- test:
53
- name: Tests (Node ${{ matrix.node }} on ${{ matrix.os }})
54
- runs-on: ${{ matrix.os }}
55
- strategy:
56
- fail-fast: false
57
- matrix:
58
- os: [ubuntu-latest, windows-latest, macos-latest]
59
- node: [20, 22]
60
- steps:
61
- - uses: actions/checkout@v4
62
-
63
- - name: Set up Node.js
64
- uses: actions/setup-node@v4
65
- with:
66
- node-version: ${{ matrix.node }}
67
- cache: npm
68
-
69
- - name: Install dependencies
70
- env:
71
- ELECTRON_SKIP_BINARY_DOWNLOAD: "1"
72
- run: npm ci
73
-
74
- - name: Run the test suite
75
- run: npm test
@@ -1,61 +0,0 @@
1
- name: Release
2
-
3
- # Publish to npm when a version tag is pushed, e.g.:
4
- # npm version patch # bumps package.json + creates a vX.Y.Z tag
5
- # git push --follow-tags
6
- # or manually:
7
- # git tag v0.1.1 && git push origin v0.1.1
8
- on:
9
- push:
10
- tags:
11
- - "v*"
12
-
13
- permissions:
14
- contents: read
15
- id-token: write # required for npm provenance (--provenance)
16
-
17
- concurrency:
18
- group: release-${{ github.ref }}
19
- cancel-in-progress: false
20
-
21
- jobs:
22
- publish:
23
- runs-on: ubuntu-latest
24
- steps:
25
- - name: Check out the tagged commit
26
- uses: actions/checkout@v4
27
-
28
- - name: Set up Node.js
29
- uses: actions/setup-node@v4
30
- with:
31
- node-version: 20
32
- registry-url: "https://registry.npmjs.org"
33
-
34
- - name: Install dependencies
35
- # Electron's binary isn't needed to test or publish; skip the ~150 MB
36
- # download so CI is fast and isn't at the mercy of the Electron CDN.
37
- env:
38
- ELECTRON_SKIP_BINARY_DOWNLOAD: "1"
39
- run: npm ci
40
-
41
- - name: Run the test suite
42
- run: npm test
43
-
44
- - name: Verify the tag matches package.json version
45
- run: |
46
- TAG="${GITHUB_REF_NAME#v}"
47
- PKG="$(node -p "require('./package.json').version")"
48
- echo "tag=$TAG package.json=$PKG"
49
- if [ "$TAG" != "$PKG" ]; then
50
- echo "::error::Tag v$TAG does not match package.json version $PKG"
51
- exit 1
52
- fi
53
-
54
- - name: Publish to npm
55
- env:
56
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
57
- # --access public is needed for the first publish of a scoped package and
58
- # harmless otherwise. --provenance attaches a signed build attestation
59
- # (requires a public repo + the id-token permission above; drop it if the
60
- # repo is private).
61
- run: npm publish --provenance --access public