Skip to content

feat(native-chat): render Muse transcripts - #31554

Open
SHi-ON wants to merge 15 commits into
stablyai:mainfrom
SHi-ON:feat/native-chat-muse
Open

SHi-ON wants to merge 15 commits into
stablyai:mainfrom
SHi-ON:feat/native-chat-muse

Conversation

@SHi-ON

@SHi-ON SHi-ON commented Oct 21, 2026 •

Copy link
Copy Markdown

ELI5

Muse sessions now open in Orca's chat view (desktop toggle and mobile) instead of staying a raw terminal, like Claude, Codex, Grok and OMP already do. Live Muse tabs also get the model/effort pill with a working effort switcher.

What Changed

  • Added muse to NATIVE_CHAT_SUPPORTED_AGENT_LIST and the transcript-agent resolution. Muse joins grok/omp/opencode in requiring a locally readable transcript: its hook reports transcript_path: null, so under Model-A SSH there is no owning-host file to read.
  • New decodeMuseTranscriptLine over ~/.local/share/muse/sessions/YYYY/MM/DD/<uuid>/session.jsonl:
    • runtime.user_intent.accepted (refill blocks, model_messages fallback) -> user turn
    • assistant_message_committed -> assistant text
    • assistant_tool_calls_committed / tool_result_batch_committed -> tool turns (args JSON parsed, output kept raw)
    • user_input_prompt_requested / settled -> question card / user reply
    • cancelled terminal -> the shared interrupted row
    • Everything else (task lifecycle, reasoning, usage, reminders, retained_frame retention envelopes) skips, never throws.
  • Resolver: id-based search matching the parent-directory session id, reusing resolveMuseSessionsDir (XDG-aware). A subagent log nests one level deeper, so its parent dir is the child id — a parent id can never match a child log. No WSL tier: the XDG-derived root has no fixed per-home segments for the WSL table.
  • Wired through the full reader, the live tailer, and the journal legacy import. Reused museTimestampMs (now exported) for the microsecond-to-millisecond conversion.
  • Live-session options for Muse terminal tabs: model/effort scraped from the TUI status line (<model> \u00b7 <effort> \u00b7 <cwd> \u00b7 <mode>), effort switches mid-session through /effort <level>, and the pill names the running model id. No model picker: ids are account-scoped and muse has no listing command (model-profile show takes an id, it does not list). Unlisted-but-tracked model rows now receive the catalog's unknownModelOptions so their pills keep their options.

Why

#22216 made Muse a first-class agent but left its conversation as a terminal: native chat renders each agent's own JSONL transcript and Muse had no decoder.

#22998 implements this same scope but is conflicting against current main and untouched since Sep 26 (the tiered resolver refactor, opencode dispatch, and settings refactor all landed since). This PR carries that approach forward onto current main with the same decoder contract. If the author of #22998 prefers to rebase instead, happy to close mine in favor of theirs.

Alternatives considered:

  • Stateful multi-line assembly for richer turns — rejected; the decoder contract is stateless (at most one message per line), shared by every agent.
  • run :: started.prompt as a user-turn fallback — rejected; every parent log with assistant turns carries user_intent (verified: 18/18 across 3,602 local sessions), while started fires ~318k times for tasks and runs, so folding it would flood the chat with bogus user turns.

Linked Issue

Fixes #22990. Contributes to the umbrella #29162.

Visual Proof

No new UI components or strings: rendering reuses the existing message/turn UI. Verified end to end in headless Electron with the new tests/e2e/native-chat-muse-transcript.spec.ts, which drives a seeded Muse session.jsonl through the real chat view in one pass and captures four frames (also uploaded by CI as playwright-traces-* artifacts from test-results/):

01 terminal before toggle 02 chat renders every row kind
Muse terminal tab with Working status, before switching to chat view user bubble, expanded turn (assistant text, bash tool call with args JSON, paired output), question card with options, answer bubble, interrupted row
03 scroll round-trip 04 live append lands
rows stay stable scrolled to top (tool output box visible in member detail) appended assistant line appears via the live tailer (toggle-to-chat-visible=78ms live-append-visible=868ms)

Run it locally with ./node_modules/.bin/playwright test --config tests/playwright.config.ts --project=electron-headless --workers=1 tests/e2e/native-chat-muse-transcript.spec.ts (headless Linux needs the usual Electron system libs plus xvfb-run).

Live desktop run (this branch on Xvfb + real muse 1.4.10, real credentials, scratch repo)

Beyond the headless spec, I drove the app visually end to end: enabled Chat UI, ran muse in a workspace terminal, toggled to chat, switched effort from the pill, sent a follow-up from the composer, and toggled back. Everything below is a real frame from that session (full size in the visual-proof assets):

Experimental Chat UI on Muse TUI detected in Orca terminal
experimental chat toggle muse tui in orca terminal
Live prompt with tool calls + answer Continue in Chat UI toggle
live prompt tools answer continue in chat ui
Chat renders the live session Tool members expanded
chat view render tool members
Model/effort pill dropdown Follow-up sent from the composer
effort picker interactive send
Back in the terminal: TUI status line follows the pill
back to terminal medium

Verified visually: user/assistant/tool turns render from the live log, tool outputs pair under their calls (read_file output box), the pill names muse-spark-1.3 + effort, picking an effort runs /effort on the live TUI (status line went max → medium, frame 9), composer sends land in the same session, and toggling back preserves the full TUI history. Note Muse intentionally has no Chat Providers settings row: that list covers structured (ACP) agents plus the Claude/Codex builtins, while Muse renders through the terminal-transcript path like zcode — the toggle appears on the terminal tab instead (frame 4).

Testing

  • I manually tested these changes locally (headless Linux: full reader, live tailer, and resolver exercised against copied real Muse sessions under an isolated XDG_DATA_HOME — parent/child resolution, unknown-id miss, 172-line sweep with zero thrown and zero empty turns)
  • Automated tests added/updated

Decoder (10 tests), resolver (3), shared agent-support, mobile eligibility, status-line reader (7), catalog (3), snapshot/hook options, and one headless Electron spec cases. Also swept 3,602 real local Muse logs (4.8M lines): 308,830 decoded (user 162 / assistant 168,235 / tool 140,339 / system 94), zero thrown, zero empty turns. The e2e run caught one real bug fixed in this PR: Muse tool results initially omitted callId, so the chat hid every tool output as unattributed. A follow-up live run with real credentials (temporary probe spec, deleted afterwards — real spend must never run in CI) drove an actual repo task through the chat in an isolated profile: live hook recognized the session, pills showed muse-spark-1.3 + effort, /effort switches took on the TUI status line (Low -> High -> Minimal; Ultra is gate-closed on this account and the TUI falls back to xhigh), the model read an orca source file and completed the task, tool runs rendered, and chat <time> nodes matched the session log recorded_at exactly. pnpm tc clean, oxlint and oxfmt clean on all touched files, e2e typecheck ratchet clean; neighboring suites pass (transcript reader, tail reader, read cache, turn lifecycle, journal legacy import, muse vault scanner, mobile eligibility). Tested on Linux only; full pnpm test and pnpm build left for CI.

AI Disclosure

Written with AI assistance (Muse Code, Meta Muse Spark); verified with the repo's own test suites plus the real-log decode runs above.

Review

AI self-review summary (per CONTRIBUTING):

  • Cross-platform: the decoder is pure string-to-object (no fs, shell, or path ops). Paths flow through the existing museSessionIdFromFilePath (basename/dirname) and resolveMuseSessionsDir (join/homedir/XDG_DATA_HOME), already used cross-platform by the AI Vault scanner and the usage provider. No new platform assumptions. Tested on Linux only; the date-sharded log layout is what Muse writes on all three platforms.
  • SSH/remote/local: Muse joins the local-transcript gate because its hook reports transcript_path: null, so under Model-A SSH the chat view refuses instead of reading a wrong disk — same as grok/omp. Local and runtime-owned SSH paths are unchanged.
  • Agent/integration compatibility: purely additive — one new union member plus one new branch per dispatch site; the satisfies never exhaustiveness gate still holds. Renderer needs no code changes (generic predicates). No changes to hook, usage, or account systems.
  • Performance: decoder is O(line), stateless, no I/O; the resolver walk is extension- plus predicate-pruned over date-sharded dirs, same as its siblings. The tail path reuses the identical decoder (no extra parse pass beyond the existing design).
  • UI quality: no new components or strings (no i18n impact); rendering reuses the existing message/turn UI.
  • Security: reads only the local session logs the Vault scanner and usage provider already read; no credentials touched, no network, no new IPC surface. Tool args go through JSON.parse in try/catch (raw string fallback) — no eval.

Agent skill upstream boundary

  • Not applicable — no skill installer source, tests, fixtures, registry entries, path tables, comments, or documentation touched.

Notes

Ensure no issues in: Security, Cross-platoform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance

Covered in Review above. Mobile needs no code changes beyond this PR: the next companion build picks up the shared gate automatically (covered by the mobile eligibility test).

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (see Review above)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

Live verification (structured-chat MSP host, build 1.4.238-musechat)

  • New-tab menu lists Muse as a chat row, no host warning: muse-chat-row.png
  • Fresh turn round-trips end to end (text in, five-word reply out, per-turn timings, session history with model stamp): muse-live-turn.png
  • Chat providers gate with Muse installed and enabled: muse-provider-toggle.png
  • Fixes the startup registry rejection (declares a capability its adapter has no compact for): compact declared false until MSP session/compact is wired. Fleet payloads 0.1.0+dcd5179287f3 (x64) and 0.1.0+14f16f703db6 (arm64) carry the fix; Mac asar v6 relaunched clean.

Add muse to the native chat transcript agents so Muse sessions open in
the chat view instead of staying a raw terminal, like claude, codex,
grok and omp already do.

- New decodeMuseTranscriptLine over session.jsonl: user turns from
  runtime.user_intent.accepted, assistant text, tool calls/results,
  question cards, and the shared interrupted row for cancelled runs.
- Id-based resolver matching the parent-dir session id, reusing the
  XDG-aware muse sessions dir; subagent logs never cross-match.
- Wire through the full reader, live tailer, and journal legacy import.
- Muse joins the local-transcript gate: its hook reports no path.

Fixes stablyai#22990, contributes to stablyai#29162.
@SHi-ON SHi-ON mentioned this pull request Oct 21, 2026
9 tasks done
@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Muse is added as a supported native chat agent with local transcript resolution, decoding, journal import, mobile eligibility, and end-to-end rendering. Muse session options now include terminal-derived model and effort values, cataloged models, effort levels, permission profiles, and slash commands. Muse account status is read from CLI authentication files and exposed through IPC, preload, web, and settings interfaces. Tests cover these integrations.

Priority: ➖ Normal

Merge Risk: 🔵 Low · up to d20d2

Muse support is mostly self-contained, with two bounded functional gaps. Displayed Muse model and effort values can go stale after the terminal status line changes. On mobile, opening the Muse permissions picker can clear the tracked model and its option values. Neither blocks the feature, but both should be addressed before or soon after merge.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Out of Scope Changes check Warning The PR includes changes beyond [#22990]. Muse resolution matches a nested log when the requested ID is the child directory ID, although [#22990] excludes subagent logs. The whole-PR changes also add M… Restrict Muse resolution to the top-level parent session file. Remove or separately link the Muse account, account-settings, slash-command, permission-profile, model-catalog, and related mobile changes. Retain only model and effort behavior…
Docstring Coverage Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 39 functions across 45 files. (1 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly and concisely identifies the primary change: rendering Muse transcripts in native chat.
Linked Issues check Passed The PR implements the coding requirements in [#22990]. It adds Muse to native-chat support and local-transcript gating. The decoder handles user, assistant, tool, question, answer, and cancelled-termi…
Description check Passed The pull request description is complete and follows the required template. It explains the user-facing change, implementation, rationale, linked issues, visual proof, testing, AI disclosure, review c…
Full details: Linked Issues check

Explanation

The PR implements the coding requirements in [#22990]. It adds Muse to native-chat support and local-transcript gating. The decoder handles user, assistant, tool, question, answer, and cancelled-terminal records. It skips unrelated records. The full reader, live tailer, and journal import use the decoder. The resolver uses the XDG-aware Muse root and parent-directory ID matching. Tests cover decoding, resolution, eligibility, and end-to-end rendering.

Full details: Description check

Explanation

The pull request description is complete and follows the required template. It explains the user-facing change, implementation, rationale, linked issues, visual proof, testing, AI disclosure, review considerations, scope boundary, and checklist. It clearly states that full pnpm test and pnpm build remain for CI.

Full details: Out of Scope Changes check

Explanation

The PR includes changes beyond [#22990]. Muse resolution matches a nested log when the requested ID is the child directory ID, although [#22990] excludes subagent logs. The whole-PR changes also add Muse account authentication, account settings UI, slash-command catalogs, model and permission catalogs, and mobile option handling. These changes are not required to render Muse transcripts. The model picker also conflicts with the current description, which states that Muse has no model picker.

Resolution

Restrict Muse resolution to the top-level parent session file. Remove or separately link the Muse account, account-settings, slash-command, permission-profile, model-catalog, and related mobile changes. Retain only model and effort behavior that directly supports the declared native-chat session experience.

Full details: Docstring Coverage

Explanation

Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 39 functions across 45 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 537ff6ca-5a71-4825-985e-d6428b7c2d78
📥 Commits

Reviewing files that changed from the base of the PR and between fd8b2dc and 7b0ced6.

📒 Files selected for processing: 12
  • mobile/src/session/mobile-native-chat-eligibility.test.ts
  • src/main/ai-vault/session-scanner-muse-parser.ts
  • src/main/native-chat/agent-session-journal/journal-legacy-import.ts
  • src/main/native-chat/session-file-resolver.test.ts
  • src/main/native-chat/session-file-resolver.ts
  • src/main/native-chat/transcript-line-decoders-muse.ts
  • src/main/native-chat/transcript-line-decoders.muse.test.ts
  • src/main/native-chat/transcript-line-decoders.ts
  • src/main/native-chat/transcript-reader.ts
  • src/main/native-chat/transcript-tail-reader.ts
  • src/shared/native-chat-agent-support.test.ts
  • src/shared/native-chat-agent-support.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Carry tool_call_id onto Muse tool-result blocks. Without the call id the
chat treats the output as unattributed and hides it behind the bare call
row, so tool output never rendered.
Headless Electron spec following the zcode transcript precedent: seed an
isolated Muse session.jsonl covering every row kind, toggle a terminal
tab to chat view, assert each kind plus ordering and bookkeeping
absence, then verify a live append lands. XDG_DATA_HOME is pinned to
the isolated home so the run never reads live Muse logs.
Mirror the claude live-session options for Muse: scrape model/effort
from the TUI status line, switch effort mid-session through /effort,
and render the reported model id on the pill. No model picker: model
ids are account-scoped and Muse has no listing command, so the pill
names the running model without offering choices. Unlisted-but-tracked
model rows now receive the catalog unknown-model options so their
pills keep working.
Strict callers must distinguish an unreadable tree from a missing
session; the Muse branch now threads the flag into the walk like the
tiered agents do.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8a711995-1e8a-4ae7-a3c1-9aecfddf53ac
📥 Commits

Reviewing files that changed from the base of the PR and between be3a4d1 and b520777.

📒 Files selected for processing: 8
  • src/renderer/src/components/native-chat/muse-terminal-session-options.test.ts
  • src/renderer/src/components/native-chat/muse-terminal-session-options.ts
  • src/renderer/src/components/native-chat/use-native-chat-session-options.test.ts
  • src/renderer/src/components/native-chat/use-native-chat-session-options.ts
  • src/shared/agent-session-option-catalog-muse.test.ts
  • src/shared/agent-session-option-catalog-muse.ts
  • src/shared/native-chat-session-option-snapshot.test.ts
  • src/shared/native-chat-session-option-snapshot.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

@SHi-ON

SHi-ON commented Oct 21, 2026

Copy link
Copy Markdown
Author

drove this end to end on a real desktop (xvfb + openbox, this branch, real muse 1.4.10 with real creds, scratch repo) and put 9 frames in the pr body under visual proof.

what i walked through: enabled chat ui in settings, ran muse in a workspace terminal (orca detects it as a muse session), toggled to chat from the terminal context menu, expanded the turn + tool runs + a tool output box, opened the model/effort pill, switched max -> med and watched the live tui status line follow, sent a follow-up from the chat composer, toggled back to the terminal with full history intact.

one thing worth knowing: muse has no chat providers settings row, same as zcode. that list is structured (acp) agents + the claude/codex builtins; muse renders through the terminal-transcript path so the toggle lives on the terminal tab instead. noted that in the body too.

Model/list names four meta-provider models with wonder 1.0 the default;
/model takes the id inline mid-session. Effort gains the documented none
tier. Permissions offers the four permissionProfile/list built-ins through
the TUI's own /permissions picker, with no launch flag so a picked model
never silently changes the session's security posture.
Transcribed from the TUI's own help list; entries without name bytes stay
out. Shared by desktop and mobile, so both menus and send classification
cover /model, /effort, /permissions, and the rest.
The mobile controller only built catalogs for claude, codex, and omp;
Muse renders its snapshot from the same shared catalog now.
Muse has no structured adapter so no host ever registers it; the settings
list now unions the chat-capable transcript agents this computer detected
(or the user already chose) with the host-registered structured agents.
Mirrors the Grok section: the main process reads only the display metadata
from the CLI's auth file and the section guides signed-out users through
muse login, which stays CLI-owned.
@SHi-ON
SHi-ON requested a review from brennanb2025 as a code owner October 21, 2026 22:41

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

🟡 Minor · Keep the tracked model when opening the… · use-mobile-native-chat-session-options.ts:275-290

mobile/src/session/use-mobile-native-chat-session-options.ts:275-290
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Keep the tracked model when opening the permissions picker.

Muse maps permissionProfile to the /permissions agent picker. This branch clears the tracked model and all values scoped to that model for every agent picker. The subsequent snapshot rebuild can therefore lose the selected model and its model-scoped options.

Keep the existing clearing behavior for /model pickers, but do not apply it to /permissions.

Suggested fix
-          clearNativeChatSessionModel(record)
+          if (midSession.command === '/model') {
+            clearNativeChatSessionModel(record)
+          }
🔇 Additional comments: 2
mobile/src/session/use-mobile-native-chat-session-options.ts: 1

283-283: 🎯 Functional Correctness

The exact effect of clearNativeChatSessionModel(record) is not available in the inspected output. The available source shows that the call runs for every agent-picker action, but it does not establish whether the function removes the tracked model or model-scoped option values. The claim cannot be decided from the available evidence.

src/shared/agent-session-option-catalog-muse.ts-69-70: 1

69-70: 🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift

⚠️ Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.

Apply explicitly selected permission profiles at launch.

If a worker selects :read-only, resolveAgentSessionOptionLaunch('muse', { model: 'muse-spark-1.3', permissionProfile: ':read-only' }) drops that selection because this option has no launchArgs. Muse then starts with its configured profile, which can be less restrictive than the selected profile. Preserve the configured default when the user makes no selection, but pass an explicit selection to Muse or remove this option from worker launch preferences. Muse supports a launch-time permission-profile selection. (dev.meta.ai)


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d1bd18b1-e9d7-48d8-9459-91e5da1e50c5
📥 Commits

Reviewing files that changed from the base of the PR and between 93fe596 and d20d248.

📒 Files selected for processing: 30
  • mobile/src/session/use-mobile-native-chat-session-options.test.ts
  • mobile/src/session/use-mobile-native-chat-session-options.ts
  • src/main/ipc/muse-accounts.ts
  • src/main/ipc/register-core-handlers/register-core-handlers.test.ts
  • src/main/ipc/register-core-handlers/register-core-handlers.ts
  • src/main/muse-accounts/auth.ts
  • src/main/muse-accounts/status.test.ts
  • src/main/muse-accounts/status.ts
  • src/preload/api-types.ts
  • src/preload/api/agent-account-api.ts
  • src/preload/api/muse-accounts-bridge.ts
  • src/preload/index.ts
  • src/renderer/src/components/native-chat/muse-terminal-session-options.ts
  • src/renderer/src/components/native-chat/use-native-chat-session-options.test.ts
  • src/renderer/src/components/settings/AccountsPane.tsx
  • src/renderer/src/components/settings/ChatSettingsSection.test.tsx
  • src/renderer/src/components/settings/MuseAccountsSection.test.tsx
  • src/renderer/src/components/settings/MuseAccountsSection.tsx
  • src/renderer/src/components/settings/NativeChatProvidersSetting.tsx
  • src/renderer/src/components/settings/accounts-search.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/web/preload-api/web-agent-accounts-api.ts
  • src/renderer/src/web/web-preload-api-composition.test.ts
  • src/renderer/src/web/web-preload-api.ts
  • src/shared/agent-session-option-catalog-muse.test.ts
  • src/shared/agent-session-option-catalog-muse.ts
  • src/shared/native-chat-session-option-snapshot.test.ts
  • src/shared/native-chat-slash-commands.test.ts
  • src/shared/native-chat-slash-commands.ts
  • src/shared/rate-limit-types.ts
🚧 Files skipped from review as they are similar to previous changes: 1
  • src/renderer/src/components/native-chat/muse-terminal-session-options.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@SHi-ON

SHi-ON commented Oct 21, 2026

Copy link
Copy Markdown
Author

round 2 is up: muse chat now has the full model picker (all four meta models from model/list, wonder 1.0 default), mid-session /model switching, the documented none effort tier, and a permissions row with muse's own four profiles (read only / ask me / auto-review / unrestricted) that opens the tui's /permissions picker. also added: muse row in chat providers (transcript-only agents now list from the install inventory), a provider accounts section reading the cli session (mirrors grok, sign-in stays cli-owned), the 31-command / menu on desktop and mobile, and mobile picker parity. no launch flag for profiles by design, so a picked model never silently changes security posture. all suites green (desktop 205 + mobile 22 + 46 in the touched files), typecheck/lint/localization clean.

The Muse TUI attaches pasted or dropped images as [Image #N] labels and
advertises that file paths work for image paste, so Muse joins the raw
path-paste attachment set instead of falling back to @file text mentions
the model cannot see. Verified end to end that spark and wonder answer
from an attached image.
@SHi-ON

SHi-ON commented Oct 21, 2026

Copy link
Copy Markdown
Author

round 3: dropped/pasted images now attach in muse chats exactly like codex. muse joins the raw path-paste attachment set (the tui turns a pasted image path into an [image #n] label per the musecode docs), instead of falling back to @file text the model can't see. verified live that spark 1.3 and wonder 1.0 both answer from an attached image, and that chat history renders the [image #n] turn. desktop + mobile + web client covered by the same shared table.

A file dropped onto a remote terminal chat was refused with 'Local
attachments are not available for remote sessions', even though the
agent runs on a paired server that could receive the bytes. Route
image drops through the same runtime temp pipeline a remote clipboard
paste uses: the main process reads the authorized client-local file
and saves it into the target runtime's temp dir, and the chips settle
to the server-side paths the agent reads. Non-images and owners
without an upload environment keep the unsupported refusal, and the
local file check still starts in the same tick as the drop.
@SHi-ON

SHi-ON commented Oct 21, 2026

Copy link
Copy Markdown
Author

round 4: dropping an image onto a remote terminal chat (muse or codex on a paired server) no longer says local attachments are unavailable. the bytes now upload into the target runtime's temp dir through the same pipeline a remote clipboard paste uses, and the chips settle to the server-side paths the agent reads. non-images and owners without an upload environment keep the refusal.

also kept the local file check starting in the same tick as the drop, since an awaited helper before it deferred the first stat and broke two existing tests.

…t project files

A photo dropped onto a remote terminal chat was refused with 'Access
denied: path resolves outside allowed directories' whenever it lived
outside the project roots, e.g. a picture from the Photos library.
The drop names its file by an explicit user gesture, like an image
shown in a transcript, so resolve it with the chat-image rule (any
absolute local image) instead of the desktop roots check.
@SHi-ON

SHi-ON commented Oct 21, 2026

Copy link
Copy Markdown
Author

round 5: fixed the photo case — a drop onto a remote terminal chat no longer needs the file to live inside the project roots. dropped images now resolve with the chat-image rule (any absolute local image, same as transcript images), since the drop itself is the user naming the file. this was never agent-specific: a local codex chat never hits that gate, a remote muse chat does.

@SHi-ON

SHi-ON commented Oct 22, 2026

Copy link
Copy Markdown
Author

e2e verified in the real app (chat view, local Muse session): drop onto the Orca composer attaches the image chip with no refusal, send delivers it, and the agent describes the image back. Model picker shows the live Muse catalog (Wonder 1.0, Wonder Full 1.0, Spark 1.3 selected, Spark 1.2) with effort None through Ultra, and turn timing plus session timestamps render. No code change needed: plus button and drop share one intake, and the drop handling is agent-agnostic (local vs remote target only, no per-agent or per-OS branch), so the remote-upload fix covers Muse the same as Codex.

@SHi-ON

SHi-ON commented Oct 22, 2026

Copy link
Copy Markdown
Author

follow-up: exercised the real plus-button path too in the same Muse chat view (Attach file, native picker, picked the same png). chip attached with no refusal, send delivered, agent described the image back. plus and drop share one intake and both are agent-agnostic (local vs remote target only), so parity holds with no divergence and no code change needed.

@SHi-ON

SHi-ON commented Oct 22, 2026

Copy link
Copy Markdown
Author

note on the menu row: Muse chat says 'No chat on this host' on every machine because no host registers a Muse structured adapter (catalog is pi/codex/claude/acp only, built-ins are claude/codex). terminal Muse (CLI) chat is unaffected. verified the fix path though: muse 1.4.10 serve speaks MSP v1 over stdio and a full session plus image turn round-trips. filed as #31997, adapter build is the follow-up.

Register muse as a structured agent so hosts offer chat instead of
'No chat on this host'. A new MSP stdio client spawns 'muse serve',
speaks initialize/session/turn/media/approval over NDJSON JSON-RPC with
UUIDv7 command ids, and journals turns, messages, tool calls, approvals,
and questions through the host sink. Steering injects into the running
turn; Stop ends the child and the next send resumes the MSP session.
Includes the host metadata, launch resolution, model catalog probe,
location support, session history, and journal identity plus key
round-trips.
…ct is wired

The registry demands an adapter compact method for the capability.
MSP compaction stays a follow-up, so declare compact false and keep
the chat row live instead of failing registration.
@SHi-ON

SHi-ON commented Oct 22, 2026

Copy link
Copy Markdown
Author

fix pushed: the structured registry rejected muse at startup because the definition declared compact without an adapter compact method. msp session/compact stays a follow-up, so compact is false for now. verified live: the capability error is gone, the new-tab menu lists muse as a chat row, and a fresh turn round-trips (text in, five-word reply out, timings and history intact).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Render Muse transcripts in native chat

1 participant