muse-cli 0.3.16__tar.gz → 0.3.17__tar.gz

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.
Files changed (48) hide show
  1. {muse_cli-0.3.16 → muse_cli-0.3.17}/PKG-INFO +9 -7
  2. {muse_cli-0.3.16 → muse_cli-0.3.17}/README.md +6 -4
  3. {muse_cli-0.3.16 → muse_cli-0.3.17}/docs/PROTOCOL.md +4 -2
  4. {muse_cli-0.3.16 → muse_cli-0.3.17}/docs/TUI.md +19 -3
  5. {muse_cli-0.3.16 → muse_cli-0.3.17}/pyproject.toml +3 -3
  6. {muse_cli-0.3.16 → muse_cli-0.3.17}/src/muse_cli/__init__.py +1 -1
  7. {muse_cli-0.3.16 → muse_cli-0.3.17}/src/muse_cli/bridge.py +8 -0
  8. muse_cli-0.3.17/src/muse_cli/tui/bun.lock +126 -0
  9. {muse_cli-0.3.16 → muse_cli-0.3.17}/src/muse_cli/tui/package.json +6 -6
  10. {muse_cli-0.3.16 → muse_cli-0.3.17}/src/muse_cli/tui/src/app.tsx +82 -32
  11. {muse_cli-0.3.16 → muse_cli-0.3.17}/src/muse_cli/tui/src/components/Composer.tsx +52 -44
  12. muse_cli-0.3.17/src/muse_cli/tui/src/components/Header.tsx +56 -0
  13. {muse_cli-0.3.16 → muse_cli-0.3.17}/src/muse_cli/tui/src/components/Overlays.tsx +88 -65
  14. {muse_cli-0.3.16 → muse_cli-0.3.17}/src/muse_cli/tui/src/components/Panels.tsx +222 -70
  15. muse_cli-0.3.17/src/muse_cli/tui/src/components/Sidebar.tsx +153 -0
  16. {muse_cli-0.3.16 → muse_cli-0.3.17}/src/muse_cli/tui/src/components/Transcript.tsx +38 -46
  17. {muse_cli-0.3.16 → muse_cli-0.3.17}/src/muse_cli/tui/src/components/common.tsx +3 -3
  18. {muse_cli-0.3.16 → muse_cli-0.3.17}/src/muse_cli/tui/src/context.tsx +8 -8
  19. {muse_cli-0.3.16 → muse_cli-0.3.17}/src/muse_cli/tui/src/controller.ts +3 -3
  20. {muse_cli-0.3.16 → muse_cli-0.3.17}/src/muse_cli/tui/src/format.ts +14 -0
  21. {muse_cli-0.3.16 → muse_cli-0.3.17}/src/muse_cli/tui/src/store.ts +10 -9
  22. {muse_cli-0.3.16 → muse_cli-0.3.17}/src/muse_cli/tui/src/theme.ts +20 -22
  23. {muse_cli-0.3.16 → muse_cli-0.3.17}/src/muse_cli/tui/test/app.test.tsx +10 -10
  24. {muse_cli-0.3.16 → muse_cli-0.3.17}/src/muse_cli/tui/test/logic.test.ts +14 -7
  25. muse_cli-0.3.16/src/muse_cli/tui/bun.lock +0 -86
  26. muse_cli-0.3.16/src/muse_cli/tui/src/components/Header.tsx +0 -64
  27. muse_cli-0.3.16/src/muse_cli/tui/src/components/Sidebar.tsx +0 -122
  28. {muse_cli-0.3.16 → muse_cli-0.3.17}/.gitignore +0 -0
  29. {muse_cli-0.3.16 → muse_cli-0.3.17}/LICENSE +0 -0
  30. {muse_cli-0.3.16 → muse_cli-0.3.17}/skills/muse-cli/SKILL.md +0 -0
  31. {muse_cli-0.3.16 → muse_cli-0.3.17}/src/muse_cli/__main__.py +0 -0
  32. {muse_cli-0.3.16 → muse_cli-0.3.17}/src/muse_cli/browsers.py +0 -0
  33. {muse_cli-0.3.16 → muse_cli-0.3.17}/src/muse_cli/chat.py +0 -0
  34. {muse_cli-0.3.16 → muse_cli-0.3.17}/src/muse_cli/cli.py +0 -0
  35. {muse_cli-0.3.16 → muse_cli-0.3.17}/src/muse_cli/demo.py +0 -0
  36. {muse_cli-0.3.16 → muse_cli-0.3.17}/src/muse_cli/desc0.bin +0 -0
  37. {muse_cli-0.3.16 → muse_cli-0.3.17}/src/muse_cli/desc1.bin +0 -0
  38. {muse_cli-0.3.16 → muse_cli-0.3.17}/src/muse_cli/gateway.py +0 -0
  39. {muse_cli-0.3.16 → muse_cli-0.3.17}/src/muse_cli/routes.json +0 -0
  40. {muse_cli-0.3.16 → muse_cli-0.3.17}/src/muse_cli/skill.py +0 -0
  41. {muse_cli-0.3.16 → muse_cli-0.3.17}/src/muse_cli/tui/src/bridge.ts +0 -0
  42. {muse_cli-0.3.16 → muse_cli-0.3.17}/src/muse_cli/tui/src/components/Splash.tsx +0 -0
  43. {muse_cli-0.3.16 → muse_cli-0.3.17}/src/muse_cli/tui/src/main.tsx +0 -0
  44. {muse_cli-0.3.16 → muse_cli-0.3.17}/src/muse_cli/tui/src/protocol.ts +0 -0
  45. {muse_cli-0.3.16 → muse_cli-0.3.17}/src/muse_cli/tui/test/fake.ts +0 -0
  46. {muse_cli-0.3.16 → muse_cli-0.3.17}/src/muse_cli/tui/tsconfig.json +0 -0
  47. {muse_cli-0.3.16 → muse_cli-0.3.17}/src/muse_cli/tui.py +0 -0
  48. {muse_cli-0.3.16 → muse_cli-0.3.17}/src/muse_cli/update.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: muse-cli
3
- Version: 0.3.16
3
+ Version: 0.3.17
4
4
  Summary: Command-line client for your personal muse.ai AI agent: chat, automate, and manage side chats, feed, goals, ideas, and sessions from the terminal. No browser needed.
5
5
  Project-URL: Homepage, https://github.com/nikships/muse-cli
6
6
  Project-URL: Documentation, https://github.com/nikships/muse-cli#readme
@@ -31,8 +31,8 @@ Classifier: Topic :: Terminals
31
31
  Classifier: Topic :: Utilities
32
32
  Requires-Python: >=3.10
33
33
  Requires-Dist: curl-cffi>=0.17
34
- Requires-Dist: noiseprotocol>=0.3
35
- Requires-Dist: protobuf>=5.0
34
+ Requires-Dist: noiseprotocol>=0.3.1
35
+ Requires-Dist: protobuf>=7.36.2
36
36
  Description-Content-Type: text/markdown
37
37
 
38
38
  <div align="center">
@@ -290,10 +290,12 @@ On a terminal, `muse-cli` opens a full-screen app built on
290
290
  The first run copies the app to `~/.cache/muse-cli/tui` and installs its
291
291
  dependencies, which takes a few seconds once per release.
292
292
 
293
- - Replies stream in as they arrive, with Markdown, code blocks and file chips.
294
- Press Enter on a file to save it to `~/Downloads/muse`.
295
- - Your chats sit on the left. `Tab` moves between them and the message box,
296
- `Ctrl+N` starts a side chat.
293
+ - Replies stream in as they arrive, with Markdown, code blocks and attachments.
294
+ Click Download in a reply, or press Enter on a file in the Files tab, to
295
+ save it to `~/Downloads/muse`.
296
+ - `Tab` focuses the chat list. When it isn't docked, it opens over the current
297
+ view without rewrapping it. `Ctrl+B` pins or hides the list; `Ctrl+N` starts
298
+ a side chat.
297
299
  - `Ctrl+K` jumps to any chat, space or action. `Alt+1` to `Alt+7` open Chat,
298
300
  Feed, Goals, Ideas, Tasks, Mail and Files. Type `/` for commands, `F1` for
299
301
  every shortcut.
@@ -253,10 +253,12 @@ On a terminal, `muse-cli` opens a full-screen app built on
253
253
  The first run copies the app to `~/.cache/muse-cli/tui` and installs its
254
254
  dependencies, which takes a few seconds once per release.
255
255
 
256
- - Replies stream in as they arrive, with Markdown, code blocks and file chips.
257
- Press Enter on a file to save it to `~/Downloads/muse`.
258
- - Your chats sit on the left. `Tab` moves between them and the message box,
259
- `Ctrl+N` starts a side chat.
256
+ - Replies stream in as they arrive, with Markdown, code blocks and attachments.
257
+ Click Download in a reply, or press Enter on a file in the Files tab, to
258
+ save it to `~/Downloads/muse`.
259
+ - `Tab` focuses the chat list. When it isn't docked, it opens over the current
260
+ view without rewrapping it. `Ctrl+B` pins or hides the list; `Ctrl+N` starts
261
+ a side chat.
260
262
  - `Ctrl+K` jumps to any chat, space or action. `Alt+1` to `Alt+7` open Chat,
261
263
  Feed, Goals, Ideas, Tasks, Mail and Files. Type `/` for commands, `F1` for
262
264
  every shortcut.
@@ -152,8 +152,10 @@ chat / feed / goals / ideas / sessions / ...
152
152
  values with counts. `voice.speak` (`{voice_id, text, format: "mp3",
153
153
  stream: true}`, binary `audio/mpeg`) returned 404 `preview_audio_disabled`
154
154
  on the test account.
155
- - Muse Mail (`email.*`) answers 403 `{"code": "email_not_enabled"}` when the
156
- account has no mailbox. Thread list: `{data: [{id, subject,
155
+ - Muse Mail (`email.*`) can answer 403 `email_not_enabled` or 404
156
+ `email_upstream_rejected` when the account has no mailbox. For the latter,
157
+ the error's message contains JSON with `type: "emailMailboxNotFound"` and
158
+ a human-readable `detail`. Thread list: `{data: [{id, subject,
157
159
  message_count, participants, last_message}], paging: {cursors: {after}}}`,
158
160
  next page with `{cursor}`. Messages carry `header_from`,
159
161
  `header_from_name`, `header_to`, `text_body`/`html_body`/`extracted_text`,
@@ -24,6 +24,22 @@ python -m muse_cli.bridge (muse_cli/bridge.py) ── owns the Gateway
24
24
  points `sys.stdout` and fd 1 at stderr, so a stray `print()` from a CLI
25
25
  helper can never corrupt the protocol. The app writes the bridge's stderr
26
26
  to `~/.config/muse-cli/tui.log`.
27
+ - OpenTUI parses the transcript's Markdown natively. The app adds a language
28
+ label and frame to fenced blocks through `renderBlock`; it leaves the
29
+ Markdown source unchanged while a reply streams.
30
+
31
+ From 60 columns, `Tab` opens a full-width chat picker when the list isn't
32
+ docked. Only Chat docks the list automatically, at 144 columns or wider. Use
33
+ `Esc` or `Tab` to return to the view, or `Ctrl+B` to pin the list.
34
+ The dock groups chat names and unread counts by pin and recency. Click
35
+ **Switch chat** above the transcript, **Browse all** in the dock, or run
36
+ **Browse all chats** from the command palette for exact recency and longer
37
+ names without resizing the transcript.
38
+
39
+ In Tasks, select a schedule to see its latest runs or a single run to see its
40
+ full explanation. The list uses short summaries for common diagnostics.
41
+ Consecutive runs with the same outcome and explanation share one note while
42
+ keeping each timestamp, grouped by day when all outcomes match.
27
43
 
28
44
  ### Launcher
29
45
 
@@ -66,9 +82,9 @@ Bridge to app (response, exactly one per request id):
66
82
  Error `kind`: `auth` (no or expired login), `not_found` (deleted chat),
67
83
  `gateway`, `timeout`, `bad_request` (unknown method or bad params),
68
84
  `internal`. A gateway error whose body carries the server's reason uses its
69
- `message`, and adds its `code` (for example `email_not_enabled`). The app
70
- shows a code ending in `_not_enabled` as a feature the account lacks rather
71
- than a failure to retry.
85
+ message and code (for example `email_not_enabled` or `emailMailboxNotFound`).
86
+ The app treats those Mail codes as an unavailable inbox rather than a failure
87
+ to retry.
72
88
 
73
89
  Bridge to app (event, no id):
74
90
 
@@ -1,5 +1,5 @@
1
1
  [build-system]
2
- requires = ["hatchling>=1.27"]
2
+ requires = ["hatchling>=1.33"]
3
3
  build-backend = "hatchling.build"
4
4
 
5
5
  [project]
@@ -54,8 +54,8 @@ classifiers = [
54
54
  ]
55
55
  dependencies = [
56
56
  "curl_cffi>=0.17",
57
- "noiseprotocol>=0.3",
58
- "protobuf>=5.0",
57
+ "noiseprotocol>=0.3.1",
58
+ "protobuf>=7.36.2",
59
59
  ]
60
60
 
61
61
  [project.urls]
@@ -1,3 +1,3 @@
1
1
  """muse-cli: talk to your personal muse.ai AI agent from the terminal."""
2
2
 
3
- __version__ = "0.3.16"
3
+ __version__ = "0.3.17"
@@ -186,6 +186,14 @@ def server_reason(e):
186
186
  return None, None
187
187
  code = err.get("code") if isinstance(err.get("code"), str) else None
188
188
  message = err.get("message") if isinstance(err.get("message"), str) else None
189
+ if e.status == 404 and code == "email_upstream_rejected" and message:
190
+ try:
191
+ problem = json.loads(message)
192
+ except ValueError:
193
+ return code, message
194
+ if isinstance(problem, dict) and problem.get("type") == "emailMailboxNotFound":
195
+ detail = problem.get("detail")
196
+ return "emailMailboxNotFound", detail if isinstance(detail, str) else None
189
197
  return code, message
190
198
 
191
199
 
@@ -0,0 +1,126 @@
1
+ {
2
+ "lockfileVersion": 1,
3
+ "configVersion": 1,
4
+ "workspaces": {
5
+ "": {
6
+ "name": "muse-cli-tui",
7
+ "dependencies": {
8
+ "@opentui/core": "0.9.12",
9
+ "@opentui/react": "0.9.12",
10
+ "react": "19.3.1",
11
+ },
12
+ "devDependencies": {
13
+ "@types/bun": "1.4.5",
14
+ "@types/react": "19.3.3",
15
+ "typescript": "7.0.2",
16
+ },
17
+ },
18
+ },
19
+ "packages": {
20
+ "@opentui/core": ["@opentui/core@0.9.12", "", { "dependencies": { "bun-ffi-structs": "0.3.1", "diff": "9.0.0", "string-width": "7.2.0" }, "optionalDependencies": { "@opentui/core-darwin-arm64": "0.9.12", "@opentui/core-darwin-x64": "0.9.12", "@opentui/core-linux-arm64": "0.9.12", "@opentui/core-linux-arm64-musl": "0.9.12", "@opentui/core-linux-x64": "0.9.12", "@opentui/core-linux-x64-musl": "0.9.12", "@opentui/core-win32-arm64": "0.9.12", "@opentui/core-win32-x64": "0.9.12" }, "peerDependencies": { "web-tree-sitter": "0.25.10" } }, "sha512-2nmFVIQEjqaAmAHCCnU22R6rB521++Kh9bxlwXoqPX4Cx5gvtSS0enHEgt7kz32M9gSrpciD/KIWzJSOyvDpAg=="],
21
+
22
+ "@opentui/core-darwin-arm64": ["@opentui/core-darwin-arm64@0.9.12", "", { "os": "darwin", "cpu": "arm64" }, "sha512-xDBNOdZsqGxlNUzJ6bc2uQ8UfLJz5epuU4h/mn6c9yQA5WL8QWfzzezB9fHSo3cx3Tr/NOkHqGPFHJwVBcDXAw=="],
23
+
24
+ "@opentui/core-darwin-x64": ["@opentui/core-darwin-x64@0.9.12", "", { "os": "darwin", "cpu": "x64" }, "sha512-vYX014WClF/CQVgf0syVyQs9k2XkZUg0chLSlfEdwRdhaSQ48lAb0SNixA3MaQY55zPxsh+8lOUj9xeGQ8+60A=="],
25
+
26
+ "@opentui/core-linux-arm64": ["@opentui/core-linux-arm64@0.9.12", "", { "os": "linux", "cpu": "arm64" }, "sha512-TPDRJGII7LdXKPsnyYmyAiMM37zLMsRIBdxDr2sK968rW6Hp1bmg0PffziEIrhk71W9VLW11GpYHOnVJ4ytVEA=="],
27
+
28
+ "@opentui/core-linux-arm64-musl": ["@opentui/core-linux-arm64-musl@0.9.12", "", { "os": "linux", "cpu": "arm64" }, "sha512-bOtr2OT8XVicv29zTVRUkacSwNb6AUKPmiCXbEwCzIlguNDnIScefaPQQZ6b7y13X3VXqm+1cPSYcaPLl4PeMA=="],
29
+
30
+ "@opentui/core-linux-x64": ["@opentui/core-linux-x64@0.9.12", "", { "os": "linux", "cpu": "x64" }, "sha512-uNUQVbv+myH58NT93PTurZvrarjl+2nIM6Gy3ES9PzA5BxzoAju5X38zVfDEfl+uH/Sbs6MOrKOf+Y01dYXGpQ=="],
31
+
32
+ "@opentui/core-linux-x64-musl": ["@opentui/core-linux-x64-musl@0.9.12", "", { "os": "linux", "cpu": "x64" }, "sha512-EEjxwdbgqjv9nv5Y7joayiYOiyfWk8YwVFXIxfQk+DJrcejT92AY+iiniOeJ/jvNMF6A4OdWt2r5c6eJFo53Ww=="],
33
+
34
+ "@opentui/core-win32-arm64": ["@opentui/core-win32-arm64@0.9.12", "", { "os": "win32", "cpu": "arm64" }, "sha512-wz0PZsZu7POpk4cwLayONhP/ewkTxbHVaoSW/ek5IOJJPysxBlSkd6Tn956VQBvL8wOUHx/BaRbJmXYpaqSQDg=="],
35
+
36
+ "@opentui/core-win32-x64": ["@opentui/core-win32-x64@0.9.12", "", { "os": "win32", "cpu": "x64" }, "sha512-LHdYeh4hVJ/YUhpsZWNQ8P910UgQi7FvZxgS5gTzmMYei7pa1pBDcb608PM+iium/IKHOsFhxUB3SGQ5vumcTQ=="],
37
+
38
+ "@opentui/react": ["@opentui/react@0.9.12", "", { "dependencies": { "@opentui/core": "0.9.12", "react-reconciler": "^0.33.0" }, "peerDependencies": { "react": ">=19.2.0", "react-devtools-core": "^7.0.1", "ws": "^8.18.0" } }, "sha512-pO8IsdL4b5Hn/HZBoMKG73UnRPRk1s5TLbvVpmwDhOUuSb4ptn/hivkb2OIxr29S5EyI/r0aFrarPgUJr7WoCA=="],
39
+
40
+ "@types/bun": ["@types/bun@1.4.5", "", { "dependencies": { "bun-types": "1.4.5" } }, "sha512-DpgwNI9z0L1S0gtb45QLCWgwCUcMLnsHYMJHQvpNj7erGiCGBvpggltAIeARrtobNMKMuy0UP7i56tKKgwFs/Q=="],
41
+
42
+ "@types/node": ["@types/node@26.6.11", "", { "dependencies": { "undici-types": "~8.9.0" } }, "sha512-uUyQ2XLEz+EXh34lmS3GhKrkqn/8FU7KUiKRpk347At2bmnMVWss45yz8b4FG/tUtmV1tV/+TVkITItPROyeeQ=="],
43
+
44
+ "@types/react": ["@types/react@19.3.3", "", { "dependencies": { "csstype": "^3.2.2" } }, "sha512-K8uWpJc4teiuOPdiP1umjeA9rGMgVPiXuoL66fcS1QlwBT1WMqY8PORmub9FadopIs+RCW6siYEs7Lpq+vDlog=="],
45
+
46
+ "@typescript/typescript-aix-ppc64": ["@typescript/typescript-aix-ppc64@7.0.2", "", { "os": "aix", "cpu": "ppc64" }, "sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ=="],
47
+
48
+ "@typescript/typescript-darwin-arm64": ["@typescript/typescript-darwin-arm64@7.0.2", "", { "os": "darwin", "cpu": "arm64" }, "sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA=="],
49
+
50
+ "@typescript/typescript-darwin-x64": ["@typescript/typescript-darwin-x64@7.0.2", "", { "os": "darwin", "cpu": "x64" }, "sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA=="],
51
+
52
+ "@typescript/typescript-freebsd-arm64": ["@typescript/typescript-freebsd-arm64@7.0.2", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ=="],
53
+
54
+ "@typescript/typescript-freebsd-x64": ["@typescript/typescript-freebsd-x64@7.0.2", "", { "os": "freebsd", "cpu": "x64" }, "sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw=="],
55
+
56
+ "@typescript/typescript-linux-arm": ["@typescript/typescript-linux-arm@7.0.2", "", { "os": "linux", "cpu": "arm" }, "sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ=="],
57
+
58
+ "@typescript/typescript-linux-arm64": ["@typescript/typescript-linux-arm64@7.0.2", "", { "os": "linux", "cpu": "arm64" }, "sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ=="],
59
+
60
+ "@typescript/typescript-linux-loong64": ["@typescript/typescript-linux-loong64@7.0.2", "", { "os": "linux", "cpu": "none" }, "sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ=="],
61
+
62
+ "@typescript/typescript-linux-mips64el": ["@typescript/typescript-linux-mips64el@7.0.2", "", { "os": "linux", "cpu": "none" }, "sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA=="],
63
+
64
+ "@typescript/typescript-linux-ppc64": ["@typescript/typescript-linux-ppc64@7.0.2", "", { "os": "linux", "cpu": "ppc64" }, "sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA=="],
65
+
66
+ "@typescript/typescript-linux-riscv64": ["@typescript/typescript-linux-riscv64@7.0.2", "", { "os": "linux", "cpu": "none" }, "sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ=="],
67
+
68
+ "@typescript/typescript-linux-s390x": ["@typescript/typescript-linux-s390x@7.0.2", "", { "os": "linux", "cpu": "s390x" }, "sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw=="],
69
+
70
+ "@typescript/typescript-linux-x64": ["@typescript/typescript-linux-x64@7.0.2", "", { "os": "linux", "cpu": "x64" }, "sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A=="],
71
+
72
+ "@typescript/typescript-netbsd-arm64": ["@typescript/typescript-netbsd-arm64@7.0.2", "", { "os": "none", "cpu": "arm64" }, "sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA=="],
73
+
74
+ "@typescript/typescript-netbsd-x64": ["@typescript/typescript-netbsd-x64@7.0.2", "", { "os": "none", "cpu": "x64" }, "sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA=="],
75
+
76
+ "@typescript/typescript-openbsd-arm64": ["@typescript/typescript-openbsd-arm64@7.0.2", "", { "os": "openbsd", "cpu": "arm64" }, "sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ=="],
77
+
78
+ "@typescript/typescript-openbsd-x64": ["@typescript/typescript-openbsd-x64@7.0.2", "", { "os": "openbsd", "cpu": "x64" }, "sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg=="],
79
+
80
+ "@typescript/typescript-sunos-x64": ["@typescript/typescript-sunos-x64@7.0.2", "", { "os": "sunos", "cpu": "x64" }, "sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g=="],
81
+
82
+ "@typescript/typescript-win32-arm64": ["@typescript/typescript-win32-arm64@7.0.2", "", { "os": "win32", "cpu": "arm64" }, "sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ=="],
83
+
84
+ "@typescript/typescript-win32-x64": ["@typescript/typescript-win32-x64@7.0.2", "", { "os": "win32", "cpu": "x64" }, "sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g=="],
85
+
86
+ "ansi-regex": ["ansi-regex@6.6.0", "", {}, "sha512-XZ5apbzreCbXSKwPjJstu8R0zOi247w3XYwWxtwBXgpZrCyc1Ka7p9/xY0A9/diMewmHbEKz+FIraWaEWjlN5g=="],
87
+
88
+ "bun-ffi-structs": ["bun-ffi-structs@0.3.1", "", { "peerDependencies": { "typescript": "^5" } }, "sha512-3gM7PpVWLyrwxWjcilSiGuhWanhZivvo6l0u573NziPH6f/gwk6McbaYgn7oJWov6pKGRTDbrg94W5DcJsKTtQ=="],
89
+
90
+ "bun-types": ["bun-types@1.4.5", "", { "dependencies": { "@types/node": "*", "undici-types": "*" } }, "sha512-ECHn+9dhL3wv0G6u0+7dQvrnaimXiRDxxerYBmhTaLyJEEuvTPWk2Fye3XIf5Y++JIIiHKfQw4Z7V5D8KuiXbg=="],
91
+
92
+ "csstype": ["csstype@3.2.4", "", {}, "sha512-PoKaoPzQapnEoqUSnHx1u6W6ku8CVEgKsnpmmzU3m1nwkidpPBQ8V/Zq2+bWNrsOKoKLwTGdbx6xF7BXP1zLVQ=="],
93
+
94
+ "diff": ["diff@9.0.0", "", {}, "sha512-svtcdpS8CgJyqAjEQIXdb3OjhFVVYjzGAPO8WGCmRbrml64SPw/jJD4GoE98aR7r25A0XcgrK3F02yw9R/vhQw=="],
95
+
96
+ "emoji-regex": ["emoji-regex@10.6.0", "", {}, "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A=="],
97
+
98
+ "get-east-asian-width": ["get-east-asian-width@1.7.0", "", {}, "sha512-XjH1AECxf0giL2V1aU8vKyRR2ppRUb5c0EvT7zuJTokQ74bNo52zOtghqdWIqrhUD79fo3x0WfKZdOqxF6LG1Q=="],
99
+
100
+ "react": ["react@19.3.1", "", {}, "sha512-QNhWdt7nrgVWWQG58QuGsAR3jv3Hbe4mb4vz7w2csnHavciZJgda1CPNaldF6eVxv90ud3jUXpKlHL69gO38yw=="],
101
+
102
+ "react-devtools-core": ["react-devtools-core@7.0.1", "", { "dependencies": { "shell-quote": "^1.6.1", "ws": "^7" } }, "sha512-C3yNvRHaizlpiASzy7b9vbnBGLrhvdhl1CbdU6EnZgxPNbai60szdLtl+VL76UNOt5bOoVTOz5rNWZxgGt+Gsw=="],
103
+
104
+ "react-reconciler": ["react-reconciler@0.33.0", "", { "dependencies": { "scheduler": "^0.27.0" }, "peerDependencies": { "react": "^19.2.0" } }, "sha512-KetWRytFv1epdpJc3J4G75I4WrplZE5jOL7Yq0p34+OVOKF4Se7WrdIdVC45XsSSmUTlht2FM/fM1FZb1mfQeA=="],
105
+
106
+ "scheduler": ["scheduler@0.27.0", "", {}, "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q=="],
107
+
108
+ "shell-quote": ["shell-quote@1.12.0", "", {}, "sha512-PcByqNyT/38F2kDNi006HAMRJaULuBzq/FOsw3qdZvX/GA9W/jamDaRskgHjubHiftXK5sIFxLNkvrXUwcof6Q=="],
109
+
110
+ "string-width": ["string-width@7.2.0", "", { "dependencies": { "emoji-regex": "^10.3.0", "get-east-asian-width": "^1.0.0", "strip-ansi": "^7.1.0" } }, "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ=="],
111
+
112
+ "strip-ansi": ["strip-ansi@7.2.0", "", { "dependencies": { "ansi-regex": "^6.2.2" } }, "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w=="],
113
+
114
+ "typescript": ["typescript@7.0.2", "", { "optionalDependencies": { "@typescript/typescript-aix-ppc64": "7.0.2", "@typescript/typescript-darwin-arm64": "7.0.2", "@typescript/typescript-darwin-x64": "7.0.2", "@typescript/typescript-freebsd-arm64": "7.0.2", "@typescript/typescript-freebsd-x64": "7.0.2", "@typescript/typescript-linux-arm": "7.0.2", "@typescript/typescript-linux-arm64": "7.0.2", "@typescript/typescript-linux-loong64": "7.0.2", "@typescript/typescript-linux-mips64el": "7.0.2", "@typescript/typescript-linux-ppc64": "7.0.2", "@typescript/typescript-linux-riscv64": "7.0.2", "@typescript/typescript-linux-s390x": "7.0.2", "@typescript/typescript-linux-x64": "7.0.2", "@typescript/typescript-netbsd-arm64": "7.0.2", "@typescript/typescript-netbsd-x64": "7.0.2", "@typescript/typescript-openbsd-arm64": "7.0.2", "@typescript/typescript-openbsd-x64": "7.0.2", "@typescript/typescript-sunos-x64": "7.0.2", "@typescript/typescript-win32-arm64": "7.0.2", "@typescript/typescript-win32-x64": "7.0.2" }, "bin": { "tsc": "bin/tsc" } }, "sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA=="],
115
+
116
+ "undici-types": ["undici-types@8.14.0", "", {}, "sha512-adaTpowOLjSeKhwA1+gEN/F8Bw/wmKH7Csw+01zmDB1TAYJ+COEn/Cfb9RXSUdssbZOdPBRvI6wOubXyzbiotQ=="],
117
+
118
+ "web-tree-sitter": ["web-tree-sitter@0.25.10", "", { "peerDependencies": { "@types/emscripten": "^1.40.0" }, "optionalPeers": ["@types/emscripten"] }, "sha512-Y09sF44/13XvgVKgO2cNDw5rGk6s26MgoZPXLESvMXeefBf7i6/73eFurre0IsTW6E14Y0ArIzhUMmjoc7xyzA=="],
119
+
120
+ "ws": ["ws@8.23.1", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-1rzWDSN0NOi3tpwgHsQExjWRoKUGtjCkJ2gZRaaRtzhYLboMytOI9pj9PU7yCgY37auqdd4OyLofZDbkeuZmPA=="],
121
+
122
+ "@types/node/undici-types": ["undici-types@8.9.0", "", {}, "sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg=="],
123
+
124
+ "react-devtools-core/ws": ["ws@7.5.14", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": "^5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-u9Oi2nQ8SZnTUAf6spLLKF5TyqoG3Nbbrd4ai6Sjo4P24bycDewhQqtNMIg4bFpnpH/TD4qk4IuAVhT0HIIqug=="],
125
+ }
126
+ }
@@ -9,13 +9,13 @@
9
9
  "typecheck": "tsc --noEmit"
10
10
  },
11
11
  "dependencies": {
12
- "@opentui/core": "0.8.3",
13
- "@opentui/react": "0.8.3",
14
- "react": "19.2.0"
12
+ "@opentui/core": "0.9.12",
13
+ "@opentui/react": "0.9.12",
14
+ "react": "19.3.1"
15
15
  },
16
16
  "devDependencies": {
17
- "@types/bun": "1.4.1",
18
- "@types/react": "19.2.0",
19
- "typescript": "^5"
17
+ "@types/bun": "1.4.5",
18
+ "@types/react": "19.3.3",
19
+ "typescript": "7.0.2"
20
20
  }
21
21
  }
@@ -1,33 +1,64 @@
1
- import type { ScrollBoxRenderable } from "@opentui/core"
1
+ import { TextAttributes, type ScrollBoxRenderable } from "@opentui/core"
2
2
  import { useKeyboard, useTerminalDimensions } from "@opentui/react"
3
3
  import { useEffect, useRef } from "react"
4
4
  import { useApp, useS } from "./context"
5
+ import { truncate } from "./format"
5
6
  import { SIDEBAR_MIN, VIEWS, sidebarVisible, type View } from "./store"
6
7
  import { theme } from "./theme"
7
8
  import { Kbd } from "./components/common"
8
9
  import { Composer, type ComposerHandle } from "./components/Composer"
9
10
  import { Header } from "./components/Header"
10
11
  import { Confirm, Detail, Help, Palette, Prompt, Toasts } from "./components/Overlays"
11
- import { MAIL_SPLIT, Panel, feedDetail, feedMeta, goalDetail, ideaDetail, panelItems, runDetail, scheduleLine, taskDetail, taskName } from "./components/Panels"
12
+ import { MAIL_SPLIT, PANEL_HINTS, Panel, feedDetail, feedMeta, goalDetail, ideaDetail, panelItems, runDetail, taskName } from "./components/Panels"
12
13
  import { SIDEBAR_WIDTH, Sidebar } from "./components/Sidebar"
13
14
  import { Splash } from "./components/Splash"
14
15
  import { Transcript } from "./components/Transcript"
15
16
 
16
- function StatusBar(props: { width: number }) {
17
+ function StatusBar(props: { width: number; inlineSend: boolean; aligned: boolean }) {
17
18
  const focus = useS((s) => s.focus)
18
19
  const view = useS((s) => s.view)
19
20
  const awaiting = useS((s) => s.awaiting)
20
- const narrow = props.width < 90
21
- const tiny = props.width < 60
21
+ const off = useS((s) => s.view !== "chat" && s[s.view].off === true)
22
+ const composing = view === "chat" && focus === "composer"
23
+ const showSend = composing && !props.inlineSend
24
+ const panel = view !== "chat" && focus === "list" && !off ? PANEL_HINTS[view] : null
25
+ const tiny = props.width < (showSend ? 72 : 54)
26
+ const compactBar = props.width < 80 || props.aligned
22
27
  return (
23
- <box height={1} flexDirection="row" backgroundColor={theme.surface} paddingX={1} flexShrink={0} gap={2}>
24
- <Kbd k="^K" label={tiny ? "" : narrow ? "go" : "go anywhere"} dim />
25
- <Kbd k="Tab" label={tiny ? "" : focus === "sidebar" ? "back" : "chats"} dim />
26
- {view === "chat" && !narrow ? <Kbd k="/" label="commands" dim /> : null}
27
- {!narrow ? <Kbd k="^N" label="new chat" dim /> : null}
28
+ <box height={compactBar ? 1 : 2} flexDirection="row" alignItems="center" backgroundColor={theme.bg} paddingX={2} border={compactBar ? [] : ["top"]} borderColor={compactBar ? undefined : theme.divider} flexShrink={0} gap={tiny ? 1 : 2}>
29
+ {showSend ? awaiting ? <text fg={theme.link}>Replying…</text> : <Kbd k="↵" label="Send" dim /> : null}
30
+ {composing && props.width >= 60 ? <Kbd k="/" label="Commands" dim /> : null}
31
+ {composing && props.width >= (props.aligned ? 85 : 96) ? <Kbd k="Shift+↵" label="New line" dim /> : null}
32
+ {panel && props.width >= 80 ? <Kbd k="↑↓" label="Move" dim /> : null}
33
+ {panel && props.width >= (view === "files" ? 38 : 56) ? (props.width >= 128 ? panel : panel.slice(0, 1)).map(([key, label]) => <Kbd key={key} k={key} label={label} dim />) : null}
34
+ {panel && props.width >= 70 ? <Kbd k="r" label="Refresh" dim /> : null}
28
35
  <box flexGrow={1} />
29
- {awaiting ? <text fg={theme.textMuted}>{narrow ? "replying…" : "your Muse is replying…"}</text> : null}
30
- <Kbd k="F1" label={tiny ? "" : "help"} dim />
36
+ <Kbd k="Ctrl+K" label={tiny || (panel && props.width < 70) ? "Palette" : "Command palette"} dim />
37
+ {props.width >= SIDEBAR_MIN ? <Kbd k="Tab" label={focus === "sidebar" ? "Back" : "Chats"} dim /> : null}
38
+ <Kbd k="F1" label={tiny ? "" : "Help"} dim />
39
+ </box>
40
+ )
41
+ }
42
+
43
+ function ChatHeading(props: { width: number; inset: number; top: number; docked: boolean }) {
44
+ const { store } = useApp()
45
+ const chat = useS((s) => s.chat)
46
+ const showPicker = !props.docked && props.width - props.inset * 2 >= 83
47
+ return (
48
+ <box flexDirection="column" flexShrink={0} paddingX={props.inset} paddingTop={props.top}>
49
+ <box flexDirection="row" flexShrink={0} height={2} border={["bottom"]} borderColor={theme.divider}>
50
+ <text paddingLeft={2} fg={theme.text} attributes={TextAttributes.BOLD} wrapMode="none" selectable={false}>
51
+ {truncate(chat.session_id ? chat.title : "Main chat", props.width - props.inset * 2 - (showPicker ? 16 : 2))}
52
+ </text>
53
+ {showPicker ? (
54
+ <>
55
+ <box flexGrow={1} />
56
+ <box paddingRight={2} onMouseDown={() => store.set({ sidebarPeek: true, focus: "sidebar" })}>
57
+ <text fg={theme.link} selectable={false}>Switch chat</text>
58
+ </box>
59
+ </>
60
+ ) : null}
61
+ </box>
31
62
  </box>
32
63
  )
33
64
  }
@@ -60,8 +91,16 @@ export function App() {
60
91
  const dims = useTerminalDimensions()
61
92
  const transcript = useRef<ScrollBoxRenderable>(null)
62
93
  const composer = useRef<ComposerHandle>(null)
63
- const showSidebar = sidebarVisible({ sidebarOpen, sidebarPeek }, dims.width)
64
- const mainWidth = dims.width - (showSidebar ? SIDEBAR_WIDTH : 0)
94
+ const docked = sidebarVisible({ sidebarOpen, sidebarPeek: false, view }, dims.width)
95
+ const peek = sidebarPeek && dims.width >= SIDEBAR_MIN
96
+ const showSidebar = docked || peek
97
+ const sidebarWidth = dims.width >= 124 ? 39 : SIDEBAR_WIDTH
98
+ const mainWidth = dims.width - (docked ? sidebarWidth : 0)
99
+ const chatInset = Math.max(2, Math.ceil((mainWidth - 88) / 2))
100
+ const chatWidth = mainWidth - chatInset * 2
101
+ const compact = dims.height <= 30
102
+ const inlineSend = chatWidth >= 46
103
+ const alignedFooter = view === "chat" && !peek && chatWidth >= 85
65
104
 
66
105
  useEffect(() => {
67
106
  if (!showSidebar && focus === "sidebar") store.set({ focus: view === "chat" ? "composer" : "list" })
@@ -104,13 +143,13 @@ export function App() {
104
143
  ctl.showDetail(it.v.title, `${it.section} · press x in the list to have your Muse do it`, async () => ideaDetail(await ctl.bridge.request("idea", { id: it.v.id })) || it.v.summary || "")
105
144
  return true
106
145
  case "task":
107
- ctl.showDetail(taskName(it.v), scheduleLine(it.v), async () => {
146
+ ctl.showDetail(taskName(it.v), undefined, async () => {
108
147
  const res = await ctl.bridge.request("task_runs", { job: it.v.id, limit: 10 })
109
- return taskDetail(it.v, res.runs ?? [])
148
+ return { task: it.v, runs: res.runs ?? [] }
110
149
  })
111
150
  return true
112
151
  case "run":
113
- ctl.showDetail(it.task || "Task run", it.v.status ?? "", async () => runDetail(it.v))
152
+ ctl.showDetail(it.task || "Task run", undefined, async () => runDetail(it.v))
114
153
  return true
115
154
  case "thread":
116
155
  if (mainWidth - 4 >= MAIL_SPLIT) ctl.openMailThread(it.v.id)
@@ -226,7 +265,7 @@ export function App() {
226
265
  }
227
266
  if (key.ctrl && (name === "k" || name === "p")) return done(), ctl.setOverlay({ kind: "palette", query: "" })
228
267
  if (key.ctrl && name === "n") return done(), ctl.setOverlay({ kind: "prompt", title: "New chat", placeholder: "What's it about?", initial: "", action: "new_chat" })
229
- if (key.ctrl && name === "b") return done(), store.set({ sidebarOpen: !showSidebar, sidebarPeek: false })
268
+ if (key.ctrl && name === "b") return done(), store.set({ sidebarOpen: !docked, sidebarPeek: false })
230
269
  if (key.ctrl && name === "z" && ctl.canUndo()) return done(), void ctl.undoArchive()
231
270
  if (name === "f1") return done(), ctl.setOverlay({ kind: "help" })
232
271
  const digit = /^[1-7]$/.test(name) ? Number(name) : 0
@@ -271,22 +310,33 @@ export function App() {
271
310
 
272
311
  return (
273
312
  <box width="100%" height="100%" flexDirection="column" backgroundColor={theme.bg}>
274
- <Header width={dims.width} />
275
- <box flexDirection="row" flexGrow={1} minHeight={0}>
276
- {showSidebar ? <Sidebar /> : null}
277
- <box flexDirection="column" flexGrow={1} minWidth={0}>
278
- {view === "chat" ? (
279
- <>
280
- <Transcript ref={transcript} />
281
- <Composer ref={composer} focused={focus === "composer" && !overlay} />
282
- <box height={1} flexShrink={0} />
283
- </>
284
- ) : (
285
- <Panel view={view} width={mainWidth - 4} />
286
- )}
313
+ <box flexDirection="column" flexGrow={1} minHeight={0}>
314
+ <box opacity={overlay ? 0.44 : 1} flexShrink={0}><Header width={dims.width} divider={!compact || view !== "chat"} /></box>
315
+ <box flexDirection="row" flexGrow={1} minHeight={0} opacity={overlay ? 0.14 : 1}>
316
+ {docked ? (peek ? <box width={sidebarWidth} flexShrink={0} /> : <Sidebar width={sidebarWidth} />) : null}
317
+ <box flexDirection="column" flexGrow={1} minWidth={0}>
318
+ {view === "chat" ? (
319
+ <>
320
+ <ChatHeading width={mainWidth} inset={chatInset} top={docked ? 2 : dims.height >= 24 ? 1 : 0} docked={docked} />
321
+ <Transcript ref={transcript} inset={chatInset} compact={compact} />
322
+ <Composer ref={composer} width={mainWidth} inset={chatInset} compact={compact} inlineSend={inlineSend} focused={focus === "composer" && !overlay} />
323
+ </>
324
+ ) : (
325
+ <Panel view={view} width={mainWidth - 4} />
326
+ )}
327
+ </box>
328
+ {peek ? (
329
+ <box position="absolute" left={0} top={0} width="100%" height="100%" flexDirection="row" justifyContent="center" backgroundColor={theme.bg} zIndex={10}>
330
+ <Sidebar width={Math.min(dims.width, 92)} picker />
331
+ </box>
332
+ ) : null}
287
333
  </box>
334
+ {!peek ? (
335
+ <box opacity={overlay ? 0 : 1} flexShrink={0} marginLeft={alignedFooter ? dims.width - mainWidth + chatInset : 0} marginRight={alignedFooter ? chatInset : 0}>
336
+ <StatusBar width={alignedFooter ? chatWidth : dims.width} inlineSend={inlineSend} aligned={alignedFooter} />
337
+ </box>
338
+ ) : null}
288
339
  </box>
289
- <StatusBar width={dims.width} />
290
340
  <Toasts />
291
341
  <Overlay />
292
342
  </box>