@hayasaka7/haya-pet 0.2.4 → 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 +1 -1
- package/README.md +205 -205
- package/apps/companion/README.md +2 -2
- package/apps/companion/src/main/index.js +2 -2
- package/apps/companion/src/main/tray-menu.js +4 -0
- package/apps/companion/src/renderer/index.html +1 -1
- package/apps/companion/test/tray-menu.test.mjs +5 -1
- package/apps/pet-preview/index.html +2 -2
- package/docs/architecture.md +1 -1
- package/docs/known-issues.md +1 -1
- package/docs/publishing.md +1 -1
- package/native/win-window-helper/Program.cs +1 -1
- package/package.json +1 -1
- package/.github/workflows/ci.yml +0 -75
- package/.github/workflows/release.yml +0 -61
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
All notable changes 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
|
package/README.md
CHANGED
|
@@ -1,294 +1,294 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
|
|
3
|
-
#
|
|
3
|
+
# HAYA Pet
|
|
4
4
|
|
|
5
|
-
###
|
|
5
|
+
### Let your Codex Desktop pets follow you into every AI terminal
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
|
|
12
|
-
|
|
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
|
-

|
|
15
17
|
|
|
16
18
|
</div>
|
|
17
19
|
|
|
18
20
|
---
|
|
19
21
|
|
|
20
|
-
##
|
|
22
|
+
## Why HAYA Pet Exists
|
|
21
23
|
|
|
22
|
-
|
|
23
|
-
|
|
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
|
-
|
|
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
|
|
30
|
-
Claude Code
|
|
31
|
-
Antigravity
|
|
32
|
-
Aider
|
|
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
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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
|
-
##
|
|
42
|
+
## The Candy
|
|
67
43
|
|
|
68
|
-
|
|
69
|
-
|
|
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> | **Session bubbles** — one per active session, with status icons.<br> |
|
|
74
|
-
| **Folder collapsed** — bubbles tucked away beside the pet.<br> | **Tray menu** — show/hide, pets, reset position, Quit.<br> |
|
|
54
|
+
## Quick Start
|
|
75
55
|
|
|
76
|
-
|
|
56
|
+
### 1. Install
|
|
77
57
|
|
|
78
|
-
|
|
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
|
-
|
|
64
|
+
From source:
|
|
92
65
|
|
|
93
|
-
|
|
66
|
+
```bash
|
|
67
|
+
git clone <repo-url> haya-pet
|
|
68
|
+
cd haya-pet
|
|
69
|
+
npm install
|
|
70
|
+
npm link
|
|
71
|
+
```
|
|
94
72
|
|
|
95
|
-
|
|
96
|
-
|---|---|
|
|
97
|
-
| **Node ≥ 18** | Runtime + companion (Electron) |
|
|
98
|
-
| **npm** | Install + scripts |
|
|
73
|
+
Prefer not to link globally? Use the CLI directly:
|
|
99
74
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
> degrades to lifecycle-only tracking).
|
|
75
|
+
```bash
|
|
76
|
+
node <repo>/apps/cli/src/haya-pet.js
|
|
77
|
+
```
|
|
104
78
|
|
|
105
|
-
|
|
79
|
+
### 2. Add A Pet
|
|
106
80
|
|
|
107
|
-
|
|
81
|
+
Put a Codex-compatible pet folder in `~/.codex/pets` or `~/.haya-pet/pets`.
|
|
108
82
|
|
|
109
|
-
|
|
110
|
-
|
|
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
|
-
|
|
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
|
-
|
|
117
|
-
|
|
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
|
-
|
|
123
|
-
`node <repo>/apps/cli/src/haya-pet.js`.
|
|
112
|
+
You can also switch pets from the tray menu.
|
|
124
113
|
|
|
125
|
-
|
|
114
|
+
### 3. Run Your AI Client Through HAYA Pet
|
|
126
115
|
|
|
127
|
-
|
|
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
|
|
132
|
-
haya-pet run --client claude-code
|
|
133
|
-
haya-pet run --client
|
|
134
|
-
|
|
135
|
-
|
|
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
|
|
139
|
-
|
|
140
|
-
|
|
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> | **Session bubbles** - one per active session, with status icons.<br> |
|
|
147
|
+
| **Folder collapsed** - bubbles tucked away beside the pet.<br> | **Tray menu** - show/hide, pets, reset position, quit.<br> |
|
|
141
148
|
|
|
142
|
-
|
|
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
|
-
|
|
151
|
+
HAYA Pet has two ideas of support:
|
|
147
152
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
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
|
-
|
|
155
|
-
|
|
156
|
-
|
|
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
|
-
|
|
160
|
-
|
|
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
|
|
168
|
-
haya-pet run --client
|
|
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
|
-
|
|
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
|
-
```
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
spritesheet.webp
|
|
181
|
+
```bash
|
|
182
|
+
haya-pet hooks status
|
|
183
|
+
haya-pet hooks off
|
|
209
184
|
```
|
|
210
185
|
|
|
211
|
-
|
|
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
|
|
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
|
-
|
|
219
|
-
|
|
220
|
-
|
|
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
|
-
##
|
|
206
|
+
## Pet Controls
|
|
223
207
|
|
|
224
208
|
| Action | Result |
|
|
225
209
|
|---|---|
|
|
226
|
-
| Single click |
|
|
227
|
-
| Double click |
|
|
228
|
-
| Drag |
|
|
229
|
-
| Drag corner grip |
|
|
230
|
-
| Double-click grip |
|
|
231
|
-
| Tray icon
|
|
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
|
-
##
|
|
217
|
+
## Commands
|
|
234
218
|
|
|
235
219
|
```bash
|
|
236
|
-
haya-pet
|
|
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
|
-
|
|
240
|
-
|
|
224
|
+
haya-pet pets # list installed pets
|
|
225
|
+
haya-pet pets use my-pet # select a pet
|
|
241
226
|
|
|
242
|
-
|
|
227
|
+
haya-pet hooks on # enable live-status hooks where supported
|
|
228
|
+
haya-pet hooks status
|
|
229
|
+
haya-pet hooks off
|
|
243
230
|
|
|
244
|
-
|
|
245
|
-
haya-pet
|
|
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
|
-
|
|
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
|
-
|
|
238
|
+
## Requirements
|
|
252
239
|
|
|
253
|
-
|
|
|
240
|
+
| Requirement | Why |
|
|
254
241
|
|---|---|
|
|
255
|
-
|
|
|
256
|
-
|
|
|
257
|
-
|
|
|
258
|
-
|
|
|
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
|
-
|
|
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
|
-
|
|
257
|
+
More fixes are in [docs/troubleshooting.md](docs/troubleshooting.md), including
|
|
258
|
+
repairing a broken Electron install.
|
|
266
259
|
|
|
267
|
-
|
|
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
|
-
|
|
276
|
-
|
|
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
|
-
##
|
|
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
|
-
|
|
281
|
-
screenshots, or session logs; it stores only short derived status summaries.
|
|
282
|
-
Approvals always require explicit user action.
|
|
279
|
+
## Contributing
|
|
283
280
|
|
|
284
|
-
|
|
281
|
+
Run the full test suite:
|
|
285
282
|
|
|
286
283
|
```bash
|
|
287
|
-
npm test
|
|
284
|
+
npm test
|
|
288
285
|
```
|
|
289
286
|
|
|
290
|
-
|
|
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 [
|
|
294
|
+
MIT. See [LICENSE](LICENSE).
|
package/apps/companion/README.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
#
|
|
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
|
|
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(
|
|
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 : [];
|
|
@@ -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>
|
|
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,
|
|
@@ -46,3 +46,7 @@ test("reflects the attach-bubbles checkbox state", () => {
|
|
|
46
46
|
assert.equal(buildTrayMenu(baseState).find((i) => i.id === "attach_bubbles").checked, true);
|
|
47
47
|
assert.equal(buildTrayMenu({ ...baseState, attachBubblesToTerminals: false }).find((i) => i.id === "attach_bubbles").checked, false);
|
|
48
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>
|
|
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">
|
|
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">
|
package/docs/architecture.md
CHANGED
package/docs/known-issues.md
CHANGED
|
@@ -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
|
|
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
|
package/docs/publishing.md
CHANGED
package/package.json
CHANGED
package/.github/workflows/ci.yml
DELETED
|
@@ -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
|