happier-tui 0.1.1 → 0.2.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/README.md +61 -14
- package/dist/app.js +424 -36
- package/dist/app.js.map +1 -1
- package/dist/happier/client.js +201 -14
- package/dist/happier/client.js.map +1 -1
- package/dist/happier/config.js +3 -1
- package/dist/happier/config.js.map +1 -1
- package/dist/happier/controls.js +124 -0
- package/dist/happier/controls.js.map +1 -0
- package/dist/happier/transcript.js +149 -24
- package/dist/happier/transcript.js.map +1 -1
- package/dist/main.js +25 -3
- package/dist/main.js.map +1 -1
- package/dist/new-session.js +45 -29
- package/dist/new-session.js.map +1 -1
- package/dist/ui/autocomplete.js +50 -0
- package/dist/ui/autocomplete.js.map +1 -0
- package/dist/ui/format.js +9 -0
- package/dist/ui/format.js.map +1 -1
- package/dist/ui/picker.js +6 -0
- package/dist/ui/picker.js.map +1 -1
- package/dist/ui/prompt-editor.js +25 -0
- package/dist/ui/prompt-editor.js.map +1 -0
- package/dist/ui/theme.js +6 -7
- package/dist/ui/theme.js.map +1 -1
- package/dist/ui/transcript-view.js +222 -26
- package/dist/ui/transcript-view.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -36,11 +36,12 @@ Run `happier-tui`. To update: run the same command again. To remove it:
|
|
|
36
36
|
```bash
|
|
37
37
|
git clone https://github.com/CyrilPeponnet/happier-tui.git
|
|
38
38
|
cd happier-tui
|
|
39
|
-
npm install # downloads dependencies
|
|
40
|
-
npm
|
|
39
|
+
npm install # downloads dependencies
|
|
40
|
+
npm run build
|
|
41
|
+
npm install -g . # links the `happier-tui` command to this folder
|
|
41
42
|
```
|
|
42
43
|
|
|
43
|
-
To update: `git pull && npm install` in the same folder. Without installing a command, run
|
|
44
|
+
To update: `git pull && npm install && npm run build` in the same folder. Without installing a command, run
|
|
44
45
|
`node dist/main.js` from the folder.
|
|
45
46
|
|
|
46
47
|
## Use
|
|
@@ -48,8 +49,10 @@ To update: `git pull && npm install` in the same folder. Without installing a co
|
|
|
48
49
|
```
|
|
49
50
|
happier-tui start screen: pick or start a session
|
|
50
51
|
happier-tui <session-id-or-prefix> open a session directly
|
|
52
|
+
happier-tui <directory> start a new session on this machine in that directory
|
|
51
53
|
happier-tui --list [--all] print active (or all) sessions and exit
|
|
52
54
|
|
|
55
|
+
--agent <name> agent for the new session (claude, codex, pi, …); asked for otherwise
|
|
53
56
|
--server <id-or-name> server profile from ~/.happier/settings.json
|
|
54
57
|
--server-url <url> override the relay URL
|
|
55
58
|
--home <dir> Happier home (default ~/.happier, or $HAPPIER_HOME_DIR)
|
|
@@ -76,15 +79,38 @@ Active sessions grouped by machine. Type to search by title, host, agent or path
|
|
|
76
79
|
| `esc` | interrupt the agent's current turn |
|
|
77
80
|
| `ctrl+s` | back to the start screen |
|
|
78
81
|
| `alt+↑` / `alt+↓` | previous / next active session |
|
|
79
|
-
| `ctrl+r` | answer a pending permission request
|
|
80
|
-
| `ctrl+o` / `ctrl+t` | expand tool output / show or hide thinking |
|
|
82
|
+
| `ctrl+r` | answer a pending permission request, agent question or offered choices |
|
|
83
|
+
| `ctrl+o` / `ctrl+t` | expand tool calls and their output / show or hide thinking |
|
|
81
84
|
| `pgup` / `pgdn`, mouse wheel | scroll; reaching the top loads earlier history |
|
|
82
85
|
| `ctrl+shift+f` | search the transcript |
|
|
83
86
|
| `ctrl+c` twice, `ctrl+d` | quit |
|
|
84
87
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
+
Type `@` to mention a file: completion lists the files of the session's folder on its machine
|
|
89
|
+
(through the daemon's ripgrep, so `.gitignore` applies).
|
|
90
|
+
|
|
91
|
+
| Command | |
|
|
92
|
+
| --- | --- |
|
|
93
|
+
| `/model`, `/effort` | change the model, and its thinking level when it has one |
|
|
94
|
+
| `/mode` | the agent's own modes (when it reports any) and the permission mode |
|
|
95
|
+
| `/queue` | edit or cancel messages still waiting to be sent |
|
|
96
|
+
| `/tree` | branch into a new session from an earlier message, which is put back in the editor to rewrite (Codex sessions can also roll back in place) |
|
|
97
|
+
| `/goal [text\|clear]` | show, set or clear the session's goal (Claude, Codex) |
|
|
98
|
+
| `/limit` | after a usage limit: resume automatically when it resets, or check now |
|
|
99
|
+
| `/rename` | rename the session |
|
|
100
|
+
| `/sessions`, `/new-session`, `/abort`, `/stop-session`, `/archive`, `/reload`, `/keys`, `/quit` | |
|
|
101
|
+
|
|
102
|
+
When the agent ends its turn offering choices, a picker opens: press the number or use the
|
|
103
|
+
arrows to send one as your reply, or `esc` to write your own (`ctrl+r` brings it back). You can
|
|
104
|
+
also click a choice in the transcript. Permission requests open the same way.
|
|
105
|
+
|
|
106
|
+
Anything else starting with `/` goes to the agent, whose own commands are offered in
|
|
107
|
+
autocomplete. Model, mode and thinking-level changes apply from your next message.
|
|
108
|
+
|
|
109
|
+
Above the editor, the TUI shows what needs you or is pending: permission requests and questions,
|
|
110
|
+
messages waiting in the queue, the session's goal and a usage-limit wait. Once a turn is over, its tool calls
|
|
111
|
+
fold into one line and the turn ends with how long it took; a subagent's work shows as one line
|
|
112
|
+
under the tool call that started it. Click a folded line to unfold it, or a tool to see all its
|
|
113
|
+
output; `ctrl+o` unfolds everything.
|
|
88
114
|
|
|
89
115
|
## Knowing when an agent needs you
|
|
90
116
|
|
|
@@ -118,16 +144,20 @@ src/new-session.ts the new-session wizard
|
|
|
118
144
|
src/happier/config.ts server profile and credentials written by the Happier CLI
|
|
119
145
|
src/happier/crypto.ts content encryption (AES-256-GCM data keys, legacy secretbox)
|
|
120
146
|
src/happier/client.ts relay client: sessions, transcripts, prompts, RPC, realtime
|
|
147
|
+
src/happier/controls.ts modes, thinking level, goal and usage limit, as kept in session metadata
|
|
121
148
|
src/happier/transcript.ts decrypted records → display items (Claude, ACP, Codex formats)
|
|
122
|
-
src/ui/ start screen, transcript view, picker, logo, notifications, theme
|
|
149
|
+
src/ui/ start screen, transcript view, picker, @ completion, logo, notifications, theme
|
|
123
150
|
```
|
|
124
151
|
|
|
125
152
|
- **Reading.** Sessions, transcripts and machines come over HTTP and are decrypted locally with
|
|
126
153
|
per-session keys, unwrapped with the account key from the CLI's credentials.
|
|
127
154
|
- **Live updates.** One Socket.IO connection carries new messages, session state and streamed text.
|
|
128
|
-
- **Prompts** go to the relay's pending queue
|
|
129
|
-
|
|
130
|
-
|
|
155
|
+
- **Prompts** go to the relay's pending queue, where they can still be edited or cancelled until
|
|
156
|
+
the agent takes them; an inactive session is resumed by its machine.
|
|
157
|
+
- **Model, mode, thinking level and title** are written to the session's encrypted metadata, which
|
|
158
|
+
the agent reads, as the Happier app does.
|
|
159
|
+
- **Interrupting, answering permissions, listing files, branching, goals, usage limits and starting
|
|
160
|
+
sessions** are encrypted calls relayed to the agent or to the machine's daemon.
|
|
131
161
|
|
|
132
162
|
The Happier protocol is not a published, versioned API. This client follows the Happier sources as
|
|
133
163
|
of CLI 0.2.20, so a relay or CLI upgrade may require changes here.
|
|
@@ -135,8 +165,10 @@ of CLI 0.2.20, so a relay or CLI upgrade may require changes here.
|
|
|
135
165
|
## Limits
|
|
136
166
|
|
|
137
167
|
- Direct sessions (transcript kept on the machine, not the relay) are listed but show no transcript.
|
|
138
|
-
-
|
|
139
|
-
-
|
|
168
|
+
- Images and attachments are neither shown nor sent.
|
|
169
|
+
- Of the per-model options, only the thinking level is offered.
|
|
170
|
+
- Out of scope, as the Happier app covers them: git, terminals, file browsing, moving sessions
|
|
171
|
+
between machines.
|
|
140
172
|
|
|
141
173
|
## Development
|
|
142
174
|
|
|
@@ -146,6 +178,21 @@ npm test # unit tests
|
|
|
146
178
|
npm run typecheck
|
|
147
179
|
```
|
|
148
180
|
|
|
181
|
+
### Releasing
|
|
182
|
+
|
|
183
|
+
Pushing a version tag publishes the package to npm and creates the GitHub release
|
|
184
|
+
(`.github/workflows/release.yml`):
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
npm version patch # or minor / major: bumps package.json, commits, tags vX.Y.Z
|
|
188
|
+
git push --follow-tags
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
The workflow logs in to npm through
|
|
192
|
+
[trusted publishing](https://docs.npmjs.com/trusted-publishers), so there is no npm token to
|
|
193
|
+
store: the package's settings on npmjs.com name this repository and `release.yml` as its
|
|
194
|
+
trusted publisher.
|
|
195
|
+
|
|
149
196
|
## License
|
|
150
197
|
|
|
151
198
|
[MIT](LICENSE)
|