Commit Graph
1853 Commits
Author SHA1 Message Date
AkiiiaandGitHub 72b341fde1 perf(cli): load command modules on demand (#2404) 2026-11-13 08:38:41 +08:00
Junmo KimandGitHub e24ccf5e50 feat(agy): show the round turn count and running background commands (#2405) 2026-11-13 08:38:25 +08:00
SSU-WEI HUANGandGitHub f1339d3ee5 docs(cli): note that worktree spawn-peer needs a git repository (#2410) 2026-11-13 08:38:08 +08:00
HeavyGeeandGitHub cca38a4acc fix(cli,hub): clear stale permission required when request is inactive (#2415) 2026-11-13 08:37:27 +08:00
JeeandGitHub b3219357eb fix(pi): register peer tools directly when registerMcpServer is absent (#2418) 2026-11-13 08:37:02 +08:00
peter-yyandGitHub 8e077991c1 fix(web): keep running sessions from looking finished when output is unread (#2420) 2026-11-13 08:36:35 +08:00
SSU-WEI HUANGandGitHub 020b313aff fix(hub): avoid 502/504 so Cloudflare Tunnel keeps JSON error bodies (#2423) 2026-11-13 08:36:02 +08:00
Junmo KimandGitHub cad21ec6d0 feat(opencode): fork and rewind OpenCode v2 conversations (#2424) 2026-11-13 08:35:45 +08:00
weishu 06d9e51f5c Release version 0.35.0 2026-11-12 10:16:52 +08:00
KiyoshiandGitHub 31cb262ee0 feat(usage): display CLI account quotas and rate limits in Settings -> Usage (#2389)
* feat(usage): display CLI account quotas and rate limits across Codex, Antigravity, and Claude

* fix(usage): persist live quota state across processes and normalize agy usage

* fix(cli): isolate Claude quota observations by account and bound probe deadlines

* fix(usage): bind Claude quota events to producing session account and surface quota fetch errors

* fix(usage): preserve OAuth token isolation without email and surface Codex read failures

* fix(usage): skip host claude path lookup when test probe override is active
2026-11-12 10:16:07 +08:00
KiyoshiandGitHub 0bea8967b4 fix(agy): wake session and stream reactive background turns over agy acp (#2387) 2026-11-12 08:47:36 +08:00
adminandGitHub 446cf2351c feat(cli): diagnose Bun pre-init fatal crashes in webhook failure messages (#2365) 2026-11-12 08:46:26 +08:00
AnanovoandGitHub 2e8b2a108b fix(codex): preserve completed-fork availability across stale refreshes (#2370) 2026-11-12 08:45:54 +08:00
Junmo KimandGitHub 20878e317a fix(claude): mark only the compaction turn result, not pending-compaction rounds (#2374) 2026-11-12 08:45:40 +08:00
HeavyGeeandGitHub 3a3e83b4b0 fix(voice): keep runtime backend/voice aligned with Settings preview (#2378) 2026-11-12 08:45:05 +08:00
AnanovoandGitHub 44fde2072b feat(web): combine session activity and unread indicators (#2380) 2026-11-12 08:44:38 +08:00
Junmo KimandGitHub 9a651dbd81 fix(web): give every tool card header the same shape (#2394) 2026-11-12 08:43:18 +08:00
Junmo KimandGitHub 4f2054b31f fix(web): make pending question cards read as waiting for a reply (#2390)
* refactor(web): share the AskUserQuestion option row and pill button styles

Move the interactive option row and the footer pill button class into
askUserQuestionOptionCard so another footer can reuse the exact presentation.
Pure move, no behavior change.

* fix(web): show Waiting for your reply on pending question cards

A pending question keeps the 'running' tool state until its reply lands in
the transcript, so the card header counted an ever-growing Duration and the
detail dialog showed a 'Running…' result pill. Neither is true: the agent is
not working on the question, it is waiting for an answer.

For question tools with a pending permission (AskUserQuestion and
request_user_input, covering Claude, OpenCode, agy, Cursor and Codex), the
card header now reads 'Waiting for your reply' instead of the timing rows,
and the result pill follows suit. The tool state and fixtures are unchanged.

* fix(web): title Codex question cards with the question text

request_user_input questions carry no header field, so the card title was
always the generic 'Question' while the actual question hid in the subtitle.
When no header is present, use the question text as the title and drop the
now-redundant subtitle; a header (Claude-style payloads) keeps the previous
title/subtitle split, and multi-question batches keep the counted title.

* fix(web): drop the redundant header chip on single-question cards

The card title already shows the question header for a single-question
AskUserQuestion, and the footer repeated it as a badge ('Database' twice).
Render the header chip only for multi-question steps, where it labels the
current step and adds information.

* fix(web): request_user_input footer adopts the shared question option rows

Codex question footers rendered their own flat option rows (dot glyphs,
aria-pressed buttons) and default-variant nav buttons, visually diverging
from the AskUserQuestion card. Reuse the shared option row and pill button
styles so both question surfaces present identically; rows now expose the
same radio/checkbox roles and aria-checked state. Behavior (selection
rules, notes, dismissal) is unchanged.

* fix(web): render request_user_input option labels as Markdown

The shared option row renders titles and descriptions as plain text, but
request_user_input option labels and descriptions are authored as Markdown
(bold targets, code commands) and the footer's own rows used to render them
through MarkdownRenderer. Give the shared row an opt-in markdown mode that
keeps the compact spacing, and enable it for the request_user_input footer.

* fix(web): title CursorAskQuestion cards from the parsed question header

CursorAskQuestion renders through the AskUserQuestion footer but had no
knownTools entry, so its card title stayed the raw tool name. Now that the
single-question header chip is deduped against the title, a Cursor question
lost its header entirely. Share the question-tool presentation (header as
title, question as subtitle, minimal pending header) with Cursor payloads,
reading their title/prompt field names the same way the parser does.

* fix(web): translate tool.waitingForReply for zh-CN and ru

Both locales shipped the English copy. Use the same register as the
neighbouring strings: zh-CN '等待你的回复' (matches the 等待+object pattern of
the ready toast and the approval key) and ru 'Ожидание вашего ответа'
(noun form of 'Ожидание одобрения').

* fix(web): fall back to the Cursor request title for question card headers

A Cursor question whose descriptive title lives only on the request
(input.title) produced an empty header in the card presentation, so the
single-question card fell back to the generic 'Question' title while the
footer's header chip is deduped away — the request lost its descriptive
title everywhere. Route the CursorAskQuestion presentation through
parseCursorAskQuestionInput, which already applies the request-level title
fallback, keeping that fallback the single source of truth.
2026-11-12 07:06:43 +08:00
1dd71e2f30 fix(web): keep attached-job progress visible when the label is long (#2392)
The job label, stale marker and progress/elapsed text shared one truncating
span, so a long label hid the parts that change. The label now grows only
into the space the status leaves, down to a small minimum, and the status
truncates only after that.

Closes #2391

via [HAPI](https://hapi.run)

Co-authored-by: HAPI <noreply@hapi.run>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 07:05:54 +08:00
weishuandGitHub 926eac7023 fix: keep one stable HAPI session id per Claude conversation (#2388)
* fix: keep one stable HAPI session id per Claude conversation

Every terminal `hapi claude -r` minted a new HAPI session id for the same
Claude conversation; the hub then merged the duplicates after the fact and
deleted the older row, so links and peer references to it broke, and two
live duplicates hid one row in the web sidebar.

CLI: resolve identity before Claude starts (HAPI_SESSION_ID is fixed at
bootstrap). `--resume <id>` / `--continue` look up the owning HAPI session
and reopen it with the same id, handing an active remote session over and
refusing one controlled by another terminal; bare `--resume` uses the
`hapi resume` picker filtered to Claude. Rotated Claude ids are kept in
`claudeSessionIdHistory` so older ids still match.

Hub: schema v35 adds `session_redirects`; every merge that deletes a row
records old -> survivor, and client-facing lookups follow it (sockets and
job ownership stay strict). New `GET /cli/sessions/resume-target-by-agent`.

Web: a merged-away URL moves to the survivor instead of bouncing home, and
live Claude duplicates stay visible in the sidebar.

* fix: keep job-key remaps and hub-archived resumes working after redirects

Review follow-up for the stable session identity change.

- Job routes: the session lookup now follows a merged-away id to the
  survivor, so `requestedSessionId` must stay the raw URL id. Otherwise a
  colliding `<old id>/<key>` remap was bypassed and PATCH/DELETE/late PUT
  through the old id hit the survivor's own job.
- Terminal resume of an inactive session now asks the hub to clear a
  hub-authored archive first (`POST /cli/sessions/:id/prepare-local-resume`,
  same clear as hub reopen), so `hapi claude --resume/--continue` (and
  `hapi resume`) no longer exit on the #1911 existing-session guard.

* fix(cli): refuse an explicit Claude resume whose transcript is gone

Reopening the owning HAPI session drops --resume and hands the id to the
local launcher, which silently starts a fresh conversation when the
transcript is missing — under the existing HAPI id, title and history.
Check the transcript before any handoff or archive change and fail
explicitly instead.

* fix: follow merged-session redirects on /api only for clients that rebind

Native clients store a session detail under the requested id and drop SSE
events for any other id, so a merged-away id that resolved to the survivor
loaded history but never showed live messages.

`SyncEngine.resolveSessionAccess` is strict again by default; `/api` routes
follow redirects only with `x-hapi-follow-session-redirects: 1`, which the
web client (that rebinds to the returned id) sends. Native clients keep the
previous 404. CLI REST always follows. Job routes still keep the raw URL id
for key remaps under both modes.
2026-11-12 07:05:37 +08:00
Junmo KimandGitHub 7ac33a70c3 feat: show generation rate (tok/s) for Codex rounds (#2379)
* feat(codex): fill the round footer tok/s from app-server timing

Measure each Codex round's generation window the way agy rounds do: the
live turn span minus tool-execution and wait-for-the-user windows, over
the thread-cumulative output-token delta, emitted on the turn's
turn_duration so the round footer shows tok/s. Tool windows prefer the
app-server's own item timing (startedAtMs/completedAtMs/durationMs).
The token baseline is the last reported cumulative total: the CLI seeds
a thread it created in this process (thread/start) to zero, while
resumed and forked threads receive the app-server's attach-time usage
replay and stay unseeded, so inherited history is never counted as a
turn's output. Only the live root-turn feed reaches the ledger: history
replays re-project old items and must not settle a round. Permission
hooks keep timing waits for the user.

* fix(codex): seed gateway-created threads for the first-turn tok/s baseline

Native /new and /clear create threads through the gateway before/after
hooks, whose after() binds the fresh root without the zero usage seed
the runtime create path applies - so the new thread's first turn
captured a null baseline and never showed tok/s. Seed it there too,
same as create(): thread/start only, since forked threads receive the
app-server's attach-time usage replay instead (tiann/hapi#2379).

* fix(codex): keep the active generation ledger across a hub-only reconnect

SharedCodexRoot's session.onReconnect reset the whole projection, but a
hub reconnect only replays final history: the native turn keeps running
without a new turn/started, so dropping the ledger identity, baseline
and windows made generation.settle() return null at completion and the
round permanently lost its tok/s. Add projection.resetAfterHubReconnect
which replays without touching the ledger; the app-server reconnect
path keeps the full reset, because the resumed turn re-announces itself
and must re-measure from its own start (tiann/hapi#2379).

* fix(codex): seed fresh usage before session-ready releases queued input

The gateway thread/start seed ran in the after() hook, after the bind
wrapper had already activated the root: registerControls and
emitSessionReady open the input gates, so a queued Web prompt (or one
submitted on session-ready while the runner notification is delayed)
could start the thread's first turn before the zero baseline existed,
and seeding afterward could not repair that captured-null turn. Move
the seed into the bind wrapper right after root.bind, guarded by a
freshThread flag the create and gateway paths set for thread/start
only - forks keep their app-server attach-time replay baseline
(tiann/hapi#2379).
2026-11-11 20:32:54 +08:00
adminandGitHub eff515e2e0 feat(cli): rotate hub entries after repeated connect failures (#2383)
Self-hosted hubs are commonly reachable through several origins (an
edge-proxied domain and a direct one); cross-border interference can
randomly break TLS on either for hours. A runner pinned to a single
HAPI_API_URL sat dead through those windows.

When HAPI_API_FALLBACK_URLS is set, the machine client keeps a rotation
ring (primary + fallbacks) and, after HAPI_API_FAILOVER_AFTER (default 5)
consecutive connect failures, tears the socket down and reconnects
through the next entry. A successful connection on a fallback schedules
a return-to-primary attempt after 30 minutes. Without the env, behavior
is byte-for-byte unchanged.
2026-11-11 20:30:23 +08:00
weishu 9fe29431a0 fix(ios): tidy the session sort & filter menu
The menu mixed three selection markers (hand-drawn checkmark images,
Toggle checkmarks plus icons, and a radio-like filled circle), so row
text started at different offsets, and the machine roster made the menu
scroll.

- Sort By and Show use inline Pickers; Active First and Unread Only are
  plain Toggles. Selection now always uses the system checkmark column
  and every row's text lines up.
- Machines move into a "Machine" submenu whose subtitle names the
  current choice; each machine keeps its session count as a subtitle.
2026-11-11 17:09:56 +08:00
weishu 92da78469a Release version 0.34.6 2026-11-11 13:10:41 +08:00
Junmo KimandGitHub 523decdf86 fix(hub): fold repeated ACP tool-call updates into one row per callId (#2350)
* feat(shared): read the callId of a supersedable tool-call row

ACP agents re-emit the same tool call under a stable callId on every
state tick, and the timeline folds all of those rows into one card. The
hub and the web both need to recognise the rows that may be superseded,
so add `getToolCallId`, mirroring `getReasoningStreamId`/`getLiveReasoningStreamId`.

Only `codex`/`tool-call` payloads match. The `tool-call-result` that
shares the callId is a different row type that carries completion, so it
never matches and is never dropped. Anything unrecognised reads as null
("keep it").

* fix(hub): fold ACP tool-call updates into one row per callId

ACP agents re-emit a tool_call agent message for the first tool_call and
again for every tool_call_update, all under one callId, and the hub stored
each as its own row. History pages therefore filled with 2-4 duplicate
tool-call rows per call that the web then folded back into a single card
by callId.

Route agent tool-call messages (getToolCallId != null) through an upsert:
scan the session tail for a live tool-call row with the same callId,
stopping at a tool-call-result with that callId or at a user message row
(both mean the incoming message is a new call). On a match, merge the new
payload into the stored row in place — non-null new values win for
name/input/nativeTitle/nativeKind/nativeName/nativeArgs/status so a
status-only tick cannot erase an earlier tick's input — and keep the
row's id, seq, createdAt and localId. The content swap follows the
queued-message edit pattern (no new seq, no content_revision bump).

The post-store broadcast is unchanged (session-room update + web
message-received) and now carries the existing row's id/seq with the
merged content, which the web window store already upserts by id.
Nothing is deleted: result rows, permissions, localId resend handling
and non-tool messages behave exactly as before.

* fix(hub): never regress a merged tool-call row's status

A later tool-call tick that re-emits status pending (agents normalize a
missing/unknown status to pending, so OpenCode permission rounds resend
it after the call already ran) overwrote an earlier in_progress or
terminal status under the plain newest-non-null-wins merge.

Merge status by progression rank instead: pending < in_progress <
completed/failed. The merged row keeps the higher rank, so a running or
finished call never falls back to pending, and a terminal status always
wins over a non-terminal one in either direction. completed/failed share
the terminal tier and ties keep the newer value; unrecognized status
strings rank below every known state so they cannot regress one either.

Also pin the behaviors the upsert relies on with tests: the 200-row
lookback boundary on both sides, a tool-call-result for a different
callId not stopping the scan, nativeName/nativeArgs/progress merging,
and the handler re-broadcasting the existing row id/seq through both the
session-room update and web message-received without storing an extra
row.

* fix(hub): stamp derived tool state at merge time and skip no-op tool-call writes

A merged tool-call row keeps its first snapshot's createdAt for stable
ordering, but the session's derived TodoWrite/team versions gate on
strictly advancing timestamps (todos_updated_at and team_state_updated_at
only accept candidates greater than the stored watermark), so a refined
snapshot arriving on a later tick of the same callId was rejected and the
session's todo list stayed at its first snapshot. Stamp those versions at
merge time instead.

A re-emitted tick whose payload changes nothing now skips the row write
entirely: only observable content changes touch the database.

* fix(web): recover merged tool-call rows after an SSE replay gap

A gap resume (resume: 'gap') cannot prove continuity, and in-place
tool-call merges keep the row's original cursor position, so the
cursor-based tail sync after a gap re-delivered new rows but never the
merged content of rows the window already held. Tool cards could stay
stuck on their first snapshot until a reload.

On the gap path of both connect handlers, reconcile the window from an
authoritative latest page applied as an upsert: rows in the response
replace the held rows by id, while already-loaded rows older than the
latest page and the hasMore/oldest cursor and context survive; an older
load caught in flight is invalidated like on every tail sync and is
re-requested by the user's scroll. Replacing the whole window is not an
option here: a fresh session subscription is always a gap verdict, so
every session switch-back would throw away the user's scrolled-up
history. Rows older than the latest page are not re-fetched; a live
tool-call tick always updates a row inside the newest page, and a
failed recovery fetch leaves the flag set so the next sync retries the
latest page. Cold and structurally invalidated windows keep the plain
reset choreography.

* fix(web): catch up the disconnected interval before the gap-recovery upsert

Gap recovery fetched only the newest page and applied it as an upsert,
so a warm window whose cached tail sat below the page's oldest row kept
a permanent hole: rows that arrived while disconnected between the
cached tail and the page vanished, and the advanced newest cursor never
filled them (cursor syncs only return rows after their cursor).

Run a plain cursor sync first so the window catches up every row it
missed, then apply the authoritative latest page as an upsert to
refresh in-place merged rows. One extra round trip on reconnect; the
upsert alone stays correct for windows that are already contiguous.

* fix(web): replace retained rows when gap recovery observes a different epoch

The recovery upsert requested the latest page without an epoch and the
hub always answers reset:false for latest requests, so rows deleted
while disconnected survived: another client's rewind deletes rows and
bumps the epoch, but the missed messages-invalidated event left the
window's requiresLatestReset false and nothing detected the change.

Compare the response's epoch with the window's epoch in the latest-page
branch and fall back to a full replacement on mismatch. The cursor
catch-up that now precedes the upsert already carries the window epoch
and gets the hub's reset verdict, so this closes the remaining window
where the upsert runs without a preceding successful epoch-carrying
sync.

* fix(web): require a successful catch-up before the gap-recovery upsert

runTailSync resolves normally after catching a request error, so the
recovery continued to the latest-page reconciliation even when the
catch-up failed. With a cached tail at row 10 and the server head at
310, a failed after request followed by a successful latest request
retained row 10 alongside rows 111-310 and advanced the newest cursor
to 310: rows 11-110 became unreachable through ordinary tail or older
paging, and the successful latest response cleared the failure warning.

Fold the recovery into the tail sync itself: the pendingGapRecovery run
catches the window up through the ordinary cursor phase and only
reconciles the latest page once that phase completed without error. A
reset verdict inside the catch-up already replaced the window
authoritatively, so the recovery flag is simply consumed there. On a
catch-up failure the catch skips the reconciliation, keeping the
original cursor, the flag for the next sync's retry, and the visible
warning.

* fix(web): keep the loaded history budget across the gap-recovery upsert

applyLatestResponse always trimmed the merged window to the 400-row
tail budget, even when only refreshing it in place. A reader with 600
loaded history rows therefore lost the oldest rows on a same-epoch
reconnect with no new messages, shifting their reading anchor even
though nothing on the server changed.

Size the recovery upsert's trim to the window's own history budget,
capped at the 800-row older-load ceiling: rows the reader already
loaded are preserved on a no-news recovery instead of being re-evicted.
Full replacements keep the tail budget, since a replaced window holds
only the response rows anyway.

* fix(web): run the catch-up when gap recovery overlaps a cached activation

A cached session's activation asks for a direct latest page
(preferLatestOnActivation), and runTailSync's canIncrement excluded that
flag unconditionally. When gap recovery was requested on top of such an
activation, the recovery therefore took the activation shortcut: a
direct latest-page fetch with no cursor catch-up. With cached rows 1-10
and the server head at 310, the window retained rows 1-10 plus the
latest page 111-310 and advanced its newest cursor to 310, leaving rows
11-110 unreachable through ordinary tail or older paging; the recovery
flag was consumed without ever catching the window up.

Let a pending recovery claim the cursor path even when an activation
shortcut is pending, and defer the activation flag for that run: the
recovery's catch-up + latest-page reconciliation subsumes the
activation's refresh-from-latest, so consuming it there is equivalent.
The flag is also cleared when the recovery finishes through a reset
verdict or its latest-page reconciliation, so a mid-run activation
cannot linger into a later full replacement.

* fix(web): refresh out-of-page tool-call rows during gap recovery

A tool-call row cached before a disconnect can be enriched in place
afterwards; when more than a latest page of newer rows follows before
reconnect, neither the catch-up (newer rows only) nor the latest page
reaches it, and the cached card keeps its stale input/status until the
session is reopened (review finding on hub messages.ts:378, the web
half of the documented jkRY limit).

After the recovery's latest-page reconciliation, sweep the window for
retained non-terminal tool-call rows older than the page bound and
older than the recovery cursor, and refresh each by id through the
existing message-context endpoint. Bounded at 20 (newest first),
best-effort (a failed or epoch-mismatched refresh leaves the row to the
next recovery), and generation-guarded like the rest of the run.

* fix(web): surface gap-recovery refresh failures as the usual sync warning

The out-of-page tool-call refresh sweep swallowed per-row context-fetch
errors, leaving a stale row silently. Let a rejected refresh propagate
to runTailSync's catch so the run's usual warning surfaces; the row
stays as is and the next sync retries the sweep. A refresh answered
under a different epoch, or one that no longer contains the row, stops
the sweep without touching the window. Terminal rows are never swept
(merge status only advances); tests pin the zero-request skip and the
warning on failure.

* fix(android): recover merged tool-call rows through the gap-recovery upsert

The Android window store's gap path recovered through a cursor sync
only: merged tool-call rows keep their original cursor position, so a
row enriched while disconnected kept its stale input/status until a
fresh page happened to include it (the same hole the web recovery
closed).

Port the web choreography: the gap entry point (resume: 'gap' on the
session pipe) flags the window (pendingGapRecovery) and runs
recoverAfterGapResume; the next tail sync catches up the missed
interval with the cursor sync, then fetches an authoritative latest
page and applies it as an upsert — rows present in the page are
replaced by id while rows older than the page, the hasMore/oldest
cursor and the loaded history budget (up to the 800-row older-load
ceiling, mirroring the web trim) survive. An epoch mismatch under the
page falls back to full replacement, a reset verdict during the
catch-up consumes the recovery, and a failed catch-up keeps the flag
and the original cursor so the next sync retries the whole recovery. A
recovery requested while a cached activation's preferLatestOnActivation
is set claims the cursor path and defers the activation shortcut, and
the tail-sync coalescing joins or replaces in-flight runs by their
snapshotted recovery/activation mode like the web does. The queued
-state reconciliation keeps its own ensureAfterCurrent drain and runs
concurrently with the recovery, mirroring the web's two post-gap calls.

The bounded by-id refresh of out-of-page non-terminal rows stays
web-only (Limits follow-up; it needs the message-context endpoint in
the native API seam).

* fix(ios): recover merged tool-call rows through the gap-recovery upsert

Mirror of the Android recovery port for the HapiKit window controller:
the session layer's resume: 'gap' handling now flags the window
(pendingGapRecovery) and runs recoverAfterGapResume alongside the
queued-state reconciliation, and the tail sync catches up the missed
interval with the cursor sync, then fetches an authoritative latest
page and applies it as an upsert — rows present in the page are
replaced by id while rows older than the page, the hasMore/oldest
cursor and the loaded history budget (up to the 800-row older-load
ceiling, mirroring the web trim) survive. An epoch mismatch under the
page falls back to full replacement, a reset verdict during the
catch-up consumes the recovery, and a failed catch-up keeps the flag
and the original cursor so the next sync retries the whole recovery. A
recovery requested while a cached activation's preferLatestOnActivation
is set claims the cursor path and defers the activation shortcut, and
syncTail coalescing joins or replaces in-flight runs by their
snapshotted recovery/activation mode like the web does.

Tests run in CI (Swift toolchain is not available on this machine):
recovery converges the merged row through catch-up + latest page, and a
failed catch-up stops before the latest page and retries on the next
recovery. The bounded by-id refresh of out-of-page non-terminal rows
stays web-only (Limits follow-up).

* test(ios): read the window-message envelope from content, not wire

The new gap-recovery tests compared the merged tool-call row through a
`.wire` accessor that does not exist on WindowMessage (the
role-wrapped envelope lives on the public `content` field; `wire` is
only the convenience initializer's parameter name), which failed to
compile the whole HapiKit test target in CI. Compare the envelope
content values directly — still by value, not by WindowMessage
identity.

* test(ios): read the retry requests off the cumulative request list

provider.requests accumulates across the whole test: the failed first
catch-up stays at index 0, so the retry's catch-up and latest page sit
at indices 1 and 2 — the assertion counted from the retry point and
failed in CI even though the retry behaved exactly as pinned
([after, after, latest]).

* fix(web): keep the reset requirement when the recovery catch-up overflows

A recovery catch-up page can overflow the window's history budget:
history-mode trimming keeps the reading anchor, drops the newer
caught-up rows, and marks the window for a reset
(mergeIntoWindow's prepend trim). The loop breaks on
requiresLatestReset without distinguishing that overflow from a
completed catch-up, and the recovery then reconciled the latest page
on top anyway and consumed the recovery flags — stranding the rows
between the reset-marked window and the page, unreachable from either
cursor (older paging descends from the window edge, the newest cursor
has already passed them).

When the catch-up ends with the window reset-marked, leave the reset
requirement and the recovery flags intact: the next sync's
authoritative replacement closes the hole and consumes the flags, the
same choreography as every other reset-marked window.

* fix(web): finish the sync when the gap-recovery refresh sweep stops early

The out-of-page tool-call refresh sweep early-returned when a context
response no longer contained the row or answered under a different
epoch, bypassing finishTailSync and leaving the window marked syncing
after the controller promise resolved — suppressing tool-history
hydration and read receipts until another sync ran.

Complete the run's bookkeeping on both exits: a missing row finishes
with the usual warning and the row as is; an epoch mismatch marks the
window for the authoritative replacement (server rows may have been
deleted since the page was fetched) and finishes with the warning
instead of reconciling against a stale snapshot.

* fix(android): keep the reset requirement when the recovery catch-up overflows

A recovery catch-up page can overflow the window's history budget: the
history-mode prepend trim keeps the reading anchor, drops the newer
caught-up rows, and marks the window for a reset. The catch-up loop
breaks on requiresLatestReset without distinguishing that overflow from
a completed catch-up, and the recovery then reconciled the latest page
on top anyway and consumed the recovery flags — stranding the rows
between the reset-marked window and the page, unreachable from either
cursor.

When the catch-up ends with the window reset-marked, leave the reset
requirement and the recovery flags intact: the next authoritative
replacement (on returning to the tail view, or on a sync that may reset
history) closes the hole and consumes the flags, the same choreography
as every other reset-marked window. Mirrors the web fix.

* fix(android): keep the earlier older cursor when the recovery upsert retains rows

When the recovery's latest-page upsert retains rows older than the
page (no trim), applyLatestResponse still preferred the response page's
own bound as the older-paging cursor, so an 800-row no-news recovery
re-pointed older loads at the page's oldest row and left the held rows
1-600 unpaged. Keep whichever side is older, like the web has since the
loaded-history-budget fix.

* fix(android): refresh out-of-page tool-call rows during gap recovery

Port the web sweep: after the recovery's latest-page reconciliation, the
window re-reads its retained non-terminal tool-call rows that sit older
than the page bound and were not delivered fresh by the catch-up through
the existing message-context endpoint — bounded at 20 newest-first, with
the same exit semantics the web sweep carries (a missing row finishes
the run with the usual warning and the row as is; a refresh answered
under a different epoch marks the window for the authoritative
replacement and finishes with the warning).

The seam gains getMessageContext (wire types MessageContextPage/
MessageContextResponse; the hub answers a bare null when the message
does not resolve), implemented by HapiApi and scripted null in the
fakes.

* fix(ios): keep the reset requirement when the recovery catch-up overflows

Mirror of the Android/web recovery overflow fix: a recovery catch-up
page can overflow the window's history budget — the history-mode
prepend trim keeps the reading anchor, drops the newer caught-up rows,
and marks the window for a reset — and the recovery then reconciled the
latest page on top anyway and consumed the recovery flags, stranding
the rows between the reset-marked window and the page, unreachable from
either cursor.

When the catch-up ends with the window reset-marked, leave the reset
requirement and the recovery flags intact: the next authoritative
replacement (on returning to the tail view, or on a sync that may reset
history) closes the hole and consumes the flags. Test rides CI — no
Swift toolchain on this machine.

* fix(ios): keep the earlier older cursor when the recovery upsert retains rows

Mirror of the Android/web cursor fix: when the recovery's latest-page
upsert retains rows older than the page (no trim), applyLatestResponse
still preferred the response page's own bound as the older-paging
cursor, so an 800-row no-news recovery re-pointed older loads at the
page's oldest row and left the held rows 1-600 unpaged. Keep whichever
side is older, like the web has since the loaded-history-budget fix.
Test rides CI.

* fix(ios): refresh out-of-page tool-call rows during gap recovery

Port the web sweep: after the recovery's latest-page reconciliation, the
window re-reads its retained non-terminal tool-call rows that sit older
than the page bound and were not delivered fresh by the catch-up through
the message-context endpoint — bounded at 20 newest-first, with the same
exit semantics the web sweep carries (a missing row finishes the run
with the usual warning and the row as is; a refresh answered under a
different epoch marks the window for the authoritative replacement and
finishes with the warning).

The transport gains the endpoint end to end: MessageContextPage/
MessageContextResponse wire types (the hub answers a bare null when the
message does not resolve), APIClient.messageContext, the MessagesProviding
requirement, and the row-swap helper on the window logic. agentMessage-
PayloadType becomes public so the controller can classify rows like the
web does. Tests ride CI — no Swift toolchain on this machine.
2026-11-11 13:05:04 +08:00
AnanovoandGitHub 5e76af5615 feat(codex): fork running sessions through the last completed turn (#2369) 2026-11-11 13:04:43 +08:00
AnanovoandGitHub f11f7097ef fix(cli): respect workspace image delivery preferences (#2368) 2026-11-11 10:03:57 +08:00
weishu 35898c09cd feat(android): web-parity presence badges, sort/filter and attached jobs
The home list showed presence only for connected sessions, offered no
sort or status choices, and ignored session-attached jobs. Its strict
SessionPatch parser also rejected every `attachedJob` SSE patch, so each
job heartbeat fell back to a REST list refetch.

- Presence badge follows web #2296: solid green pulsing while working,
  solid blue pulsing for background tasks only, a green ring when
  connected and waiting, and a power mark when stopped or archived.
- The Sort & filter sheet adds Show (all / active only / archived only)
  and Unread only next to machines and dates, then Sort by (last message
  or date created) and Active first (on by default; manual pins still
  lead). Sort and Active first persist app-wide in hapi_prefs; filters
  stay transient, keep the open session listed, and Reset leaves the
  order alone. Search keeps relevance with the base tie-break. The share
  picker keeps the base order.
- Decode AttachedJob on summaries and the versioned `attachedJob` patch,
  applied only when strictly newer, as on web. Full-session events keep
  the row's job. A running job counts as working on the badge and as
  active for the Show filter (web #1404), and adds a row line with
  label, remaining or percent, elapsed time and a thin bar, amber with
  "no heartbeat" after 15 minutes.
- HomeFilterWindowTest's click helper now scrolls back once it reaches
  the end; the taller sheet otherwise stranded targets above the
  viewport.
- Docs describe the Android sheet, row and job display.
2026-11-11 09:40:45 +08:00
a29fe7b32f feat(web): fade non-resident session rows alongside the presence badge (#2362)
832c5922f moved liveness onto the agent icon and dropped the row fade; #2296
then gave every state its own mark, so stopped is no longer shown by an absence.
That fixes identity. It doesn't fix scale.

The badge answers "what state is this row in?" once you look at it. It can't
answer "which of these sessions is still held in memory?" across a long list,
because that's a whole-list scan and a 10px mark doesn't survive one. At a
handful of sessions the badge covers both jobs. At ~30 active, a stopped row and
a resident idle row are the same shape of row until you inspect each badge.

So restore the fade on `!active` — the same predicate the stopped badge uses,
rendered at the other scale. Shape carries which state; dimming carries which
rows.

The fade covers the title line only. The presence badge and the attached-job
meter sit outside it deliberately: a job outliving its agent is exactly the case
where the row is non-resident but the work is live, and both facts have to stay
readable at once. #2296 already marks that session's badge as working; this
keeps the row dim underneath it.

via [HAPI](https://hapi.run)

Co-authored-by: HAPI <noreply@hapi.run>
2026-11-11 08:58:25 +08:00
Junmo KimandGitHub ac82d2d8d6 feat: show generation rate (tok/s) for Claude rounds (#2367)
* refactor(agent): extract agy's generation-time clock into a shared helper

agy computes generation time as the round minus tool-run and user-wait
windows. Move the window math and the event-fed bookkeeping into
cli/src/agent/generationClock.ts (GenerationClock + generationTimeMs) so
other ACP launchers can time their rounds the same way, and feed agy's
clock the same session updates and permission waits it always did.
Numbers are identical: the moved pure function is agyGenerationMs
verbatim and the agy tok/s integration tests pass unchanged.

* feat(claude): fill the round footer tok/s from the SDK result

Claude Code reports duration_api_ms on every result: the API-active time
of the round, with tool execution and permission waits already outside
it. Pair it with the round's usage.output_tokens and send both in the
existing turn_duration resultSummary, so the web's generic round-summary
normalizer picks them up and the footer renders tok/s — no new wire
types, and the renderer already knew how to format the pair.

Errored rounds and the manual /compact turn carry no meaningful
generation rate, so they emit nothing: claudeRemote marks the compact
turn result in-process (hapi_compact_turn) before it reaches the log
converter. Values that cannot produce a rate (zero, negative, fractional,
missing) are omitted rather than guessed.
2026-11-11 08:57:45 +08:00
weishu 7022eb0045 feat(ios): show session-attached jobs on the home list
iOS ignored SessionSummary.attachedJob, and its strict SessionPatch
decoder rejected every `attachedJob` SSE patch, so each job heartbeat
fell back to a REST list refetch while the row never showed the job.

- Decode AttachedJob on summaries (open-ended status, older rows without
  a watermark gate as 0) and the versioned `attachedJob` patch, applied
  only when strictly newer, as on web, so a lagged heartbeat cannot
  resurrect a cleared job. Full-session events keep the row's job.
- A running job counts as working on the presence badge even when the
  agent is idle or disconnected, keeps the session under Active only and
  out of Archived only (web #1404).
- The row's second line shows the job instead of the project:
  label · remaining or percent · elapsed, amber with "no heartbeat" after
  15 minutes. No progress bar, so row height is unchanged.
- Document the patch in the SSE client contract and the iOS display in
  the session jobs guide.
2026-11-10 17:38:30 +08:00
weishu 628cb84bf5 feat(ios): web-parity session presence badges and list sort/filter
The home list showed presence only for connected sessions (a green dot,
pulsing while thinking) and left stopped sessions unmarked. Rows were
ordered by pins and the last message only, with no sort or status
choices.

- Presence badge follows web #2296: solid green pulsing while working,
  solid blue pulsing for background tasks only, a green ring when
  connected and waiting, and a power mark when stopped or archived.
  Activity moves off SessionRowStatus, which keeps only pending requests.
- Sort & Filter menu mirrors the web view menu: sort by last message or
  date created, Active first (on by default; manual pins still lead),
  show all / active only / archived only, plus the existing unread lens.
  Sort and Active first persist app-wide (SessionListOrderPrefs); the
  status filter stays per home like the other iOS filters and keeps the
  open session listed. Search keeps relevance with the base tie-break.
- Native parity docs now describe the actual base order.
2026-11-10 17:27:25 +08:00
weishu 1432a71bd1 refactor(native): drop task-notification push handling
The hub no longer sends `task-notification` pushes (961f2fd0), so remove
the client handling on both platforms:

- iOS: drop PushType.taskNotification, its Reply notification category,
  and the NSE category stamping; Reply now applies to `ready` only.
- Android: drop PushType.TASK_NOTIFICATION; Reply attaches to `ready`
  only. The `task_notifications` channel stays as the bucket for unknown
  types / contract versions, renamed to "Other notifications"
  (CHANNEL_OTHER). Its system channel ID is unchanged so operators'
  per-channel settings survive.
- Drop the task-only `success` / `error` severities from both clients and
  the hub's FCM/APNs payload types.

Chat timeline parsing of `<task-notification>` is unchanged.
2026-11-10 17:26:49 +08:00
weishu 961f2fd0b2 fix(hub): stop pushing notifications for agent-internal task completions
Claude Code emits `system/task_notification` and injects
`<task-notification>` user messages when a background task finishes.
These are fed back to the model so it can continue; they are not
user-facing turn boundaries. The hub treated them as events and sent an
extra "Task completed / Task failed" notification on every channel
(Web Push/toast, FCM, APNs, Telegram, ServerChan) on top of the Ready
notification that follows once the agent finishes reacting.

Remove the task notification pipeline from the hub: parsing, dispatch,
the TaskNotification type, each channel's sendTaskNotification, and the
native composer's composeTask. Narrow the composed native type/severity
to what the hub emits. Chat timeline display of task summaries and the
background task count are unchanged.

Update the native contract, PWA, and ServerChan docs to match.
2026-11-10 17:11:28 +08:00
KiyoshiandGitHub a9024c0eb8 fix(deps): patch WebSocket and math rendering dependencies (#2361)
* fix(deps): patch WebSocket and math rendering dependencies

* fix: retain the release version after integration validation
2026-11-10 16:33:33 +08:00
weishu b312641b30 Release version 0.34.5 2026-11-10 16:26:31 +08:00
SSU-WEI HUANGandGitHub 7ac95e0e2e fix(cursor): fresh-spawn resume when ACP thread never persisted a store (#2184) (#2343) 2026-11-10 15:32:27 +08:00
KiyoshiandGitHub 84b759cc1f perf(web): load syntax grammars on demand and cache after use (#2359) 2026-11-10 15:31:59 +08:00
weishuandGitHub 1bcebb7664 feat(ci): label PRs with the Codex review verdict (#2360)
The review outcome was only visible by opening the PR and reading the body.
Each published review now sets exactly one verdict label:
codex-review:pass (all stages pass, no Blocker/Major findings; Minor/Nit
are advisory), codex-review:changes, or codex-review:clarify. A review of
new inputs clears the previous verdict first, so a stale pass never
outlives the commit it described, and a failed run on current inputs is
marked codex-review:error. Other labels are left alone.

The review body now opens with the verdict and finding counts. Label API
failures only warn; they never fail or block the published review.
2026-11-10 15:31:35 +08:00
AkiiiaandGitHub bfec91b5e1 fix(codex): start a new goal after the previous one completes (#2338) 2026-11-10 15:20:33 +08:00
SSU-WEI HUANGandGitHub 2b1c05b699 fix(web): keyboard access to the project-group menu (#2357)
Project headers are now role=button tab stops: Enter/Space toggles the
group, ContextMenu or Shift+F10 opens the project menu anchored under
the header (Enter opens it on non-collapsible headers). Menu items keep
the shared anchored-menu behaviour (first item focused, Escape closes).
2026-11-10 15:12:59 +08:00
7498d8c8f2 feat(fue): just-in-time callouts for three unlabelled icon-only controls (#2339)
* feat(fue): just-in-time callouts for three unlabelled icon-only controls

The message-content search scope toggle, the session list sort/filter menu,
and the per-session title lock are shipped, icon-only controls with no text
label and no existing discovery path. Wire each into the existing hapi.fue.v1
primitive (useFue + FueDot + FueCallout) so first click explains the control,
following the pattern already used for scratchlist, terminal-to-agent, and
rich composer mentions.

via HAPI (https://hapi.run)

Co-Authored-By: HAPI <noreply@hapi.run>

* fix(fue): don't collapse search on blur into the portaled FUE callout

The scope FueCallout (like the other two) portals to document.body, so it
is never a DOM descendant of the search container. The container's
existing onBlur handler used a raw DOM .contains() check to decide whether
to collapse the search bar, which doesn't account for that — clicking
"Got it" in the callout read as focus leaving the search bar entirely and
collapsed it out from under the dismiss action.

Also marks FueCallout's portal root with a stable data-fue-callout
attribute so any caller (not just this one) can make the same
"is this interaction actually inside my UI" check despite the portal.

Investigated the review bot's related "modal interaction scope" concern on
RenameSessionDialog.tsx against a differential control (confirmed a truly
detached element at the same point in the interaction sequence does close
the dialog, so the harness/timing is valid): clicking the title-lock
callout does NOT close the dialog, because Radix's outside-pointerdown
check is itself a React onPointerDownCapture handler, and React's synthetic
events bubble along the logical JSX tree regardless of portal placement.
No fix needed there.

That investigation surfaced a narrower, real limitation instead: Radix's
FocusScope traps focus via a raw DOM containment check (unlike the
pointerdown case, there's no portal transparency here), so Tab/programmatic
focus into the portaled callout gets pulled back to the dialog's input.
Mouse-click dismiss and Escape-to-dismiss both still work. Tracked with an
it.fails() regression marker rather than left invisible; not fixed in this
PR (would mean restructuring FueCallout's portal/positioning, which is
riskier than this diff's scope).

via HAPI (https://hapi.run)

Co-Authored-By: HAPI <noreply@hapi.run>

* fix(fue): keep the callout clickable when hosted inside a modal dialog

The automated review's follow-up pass caught something my first response
missed: Radix's modal Dialog sets document.body's pointer-events to none
and re-enables it only on its own content node. FueCallout's portal is a
separate sibling of that node — document.body, not a descendant of
DialogContent — so without an explicit override its buttons inherited
pointer-events: none and were unclickable by a real pointer while the
rename dialog was open.

This is distinct from (and more severe than) the modal-interaction-scope
question already answered: that was about whether Radix's own
outside-click *detection* misfires on the callout (it doesn't, verified
earlier), not about whether a real click can land on it at all. A plain
fireEvent.click in jsdom bypasses CSS hit-testing entirely, which is
exactly why the existing "dismisses and persists acknowledgement on Got it"
test kept passing throughout — it was never exercising this path.

Fixed by setting pointer-events: auto on the callout panel unconditionally.
Harmless outside a modal context (no other FUE caller sets body's
pointer-events to none). Red/green verified.

via HAPI (https://hapi.run)

Co-Authored-By: HAPI <noreply@hapi.run>

---------

Co-authored-by: HAPI <noreply@hapi.run>
2026-11-10 15:12:47 +08:00
39da0be557 feat(cli): Cursor emits AGENT_NOTIFY_SUMMARY when status-summary toggle is on (#2354)
* feat(cli): Cursor emits AGENT_NOTIFY_SUMMARY via rules overlay

When Emit status summaries is on, install a transient workspace
.cursor/rules overlay for Cursor ACP sessions and clean it up on
teardown, closing the flavor hole left after #1376.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(cli): harden Cursor notify-rule overlay ownership and exclude

Address review on the emit overlay: clear ownership state under lock,
refresh crash-recovery snapshots after user replacement, fall back to
an alternate rule filename when the primary path is tracked, and lease
.git/info/exclude so git add -A cannot stage the transient rule.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(cli): path-scope notify overlay ownership and reap excludes

Refresh restore snapshots on live user replacements, key ownership by
selected rule path, and prune dead PID-stamped .git/info/exclude leases
left by crashed Cursor sessions.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(cli): harden Cursor notify overlay against symlink and path traps

Refuse rule writes through symlinks, canonicalize workspace paths for
ownership, escape literal Git exclude patterns, and qualify settings
copy as Cursor ACP.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(cli): preserve unreadable rules and file modes in notify overlay

Skip install when an existing rule cannot be backed up, restore original
permission bits on cleanup, and stop retrying ownership-lock callback
failures as lock contention.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(cli): keep notify overlay restore snapshot on unreadable cleanup

When teardown cannot read the generated rule, leave the file alone but
retain the private ownership snapshot so a later session can restore the
user's original content; write state.json as 0600.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(cli): restore notify overlay snapshot even if install never wrote

Last-owner cleanup now restores from the shared snapshot whenever the
on-disk rule is still HAPI-owned, including handles that registered then
failed before writing the generated rule.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(cli): write notify overlay ownership state atomically

Replace in-place state.json writes with temp+rename so a partial failure
cannot destroy the only backup of a user rule, and harden the failed-
install recovery test to actually chmod the exclude file.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(cli): fail closed on abandoned notify overlay locks

Publish pid+token via link(2) like the MCP overlay so a crashed holder
leaves an identifiable lock, and surface an actionable rm path instead of
silently spinning for five seconds.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(cli): retry notify overlay lock when holder already released

After link EEXIST, a missing lock means the contender freed it before our
owner read - retry acquire instead of misreporting the path as abandoned.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(cli): treat notify lock ENOENT during owner read as retry

Distinguish missing vs invalid lock contents so a holder that releases
between existsSync and readFile is not misclassified as abandoned.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(cli): recreate notify overlay stateDir under the ownership lock

Last-owner cleanup no longer rmdirs stateDir, and install mkdir+write runs
inside the lock so a waiting installer cannot hit ENOENT on state.json.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-10 15:12:06 +08:00
Junmo KimandGitHub ce6d074a54 fix(session): deactivate a session as soon as its runner child dies (#2351)
* feat(shared): add session-child-exited CLI socket event

* feat(cli): report unexpected runner child exits to the hub

* feat(hub): mark a session inactive when its owning runner child exits

* fix(hub): respawn resume when the active session has no live CLI socket

* fix(hub): fail safe owner guard when the session row has no start marker

A session row can carry no hostStartMarker (the CLI's start-marker probe
fails at spawn). The child-exit owner guard then matched on pid alone, so
a late notice from an old process whose pid the OS reused deactivated the
current owner instead of being ignored.

Require an exact marker match whenever either side carries a marker, and
when both sides lack one, accept only a notice that is not older than the
current owner's registration (metadata.lifecycleStateSince, written by the
CLI together with hostPid on every spawn). Anything else falls back to the
keep-alive grace.

* fix(cli): release intentional-stop pid markers that no exit event will consume

intentionallyStoppedPids entries were only consumed by onChildExited. A
stop that ended already_gone, still_alive or unknown never produced that
exit event for pids without a runner-spawned child handle, so the entry
stayed forever and suppressed the real unexpected exit of a later child
that reused the pid.

markIntentionalStop now returns the pids it marked plus the subset with a
child 'exit' listener; the stop wrapper releases the rest once the stop
attempt settles, so only exits that a spawned child will still report
through onChildExited keep their suppression.

* fix(hub): only respawn an active row without a live socket when it is runner-spawned

An empty session socket room also happens during a transport reconnect
while the CLI process still runs. Resuming a terminal-started session in
that window fell through to spawning a second CLI: the runner's spawn
dedupe only covers sessions it spawned itself, so the replacement could
overwrite ownership metadata and compete with the original process when
its socket returns.

Keep the legacy no-op success for active rows the hub cannot prove are
runner-spawned; runner-spawned rows keep the respawn shortcut, where the
runner deduplicates spawns per existing session while its child lives.

* fix(cli): keep intentional-stop suppression only for the pids a stop terminated

A stop that preserved a shared Codex wrapper for sibling roots returned
stopped while its PID stayed marked intentional; because the wrapper has
an exit listener, the marker survived until the wrapper's own exit. A
wrapper that later crashed on its own consumed that stale marker and
suppressed the death notifications for every sibling root, leaving them
active until the keep-alive grace. Failed stops that leave a tracked
child alive leaked the same way.

Record the PIDs each stop attempt actually terminated and retain their
suppression only while the child's own exit event is still pending;
release the rest (preserved wrappers, children left alive, already-gone
outcomes) so a later real death is reported.

* revert(hub): keep the active-session resume shortcut

Revert the ghost-active respawn from resume: an empty socket room also
happens during a transport reconnect, runner dedupe can return the live
child while the resume path waits for a fresh ready the session never
re-emits (Pi readiness emits once), and a ghost-active Codex row refuses
cold resume while the row is still active. Upstream's original behavior
returns success for any active row; dead owners there are recovered by
the child-exit notice, the owner guard, and the keep-alive grace.
2026-11-10 15:11:29 +08:00
SSU-WEI HUANGandGitHub b7b1da40eb feat(copilot): reasoning effort selection for remote sessions (#2348)
* feat(copilot): reasoning effort selection for remote sessions

Copilot's ACP session advertises the active model's reasoning levels as a
thought_level config option. Expose it like Grok's: a session RPC + hub
route for the options, the composer effort picker, and per-turn
session/set_config_option in the remote launcher. The runner forwards
--effort so resumed sessions keep the selection.

* fix(copilot): keep effort options in step with model switches

Copilot answers session/set_model with no config options and pushes the
new model's thought_level via config_option_update; capture it (opt-in in
the ACP backend), re-baseline the launcher's effort after a switch, report
'switch pending' until the next turn applies it, and have the web poll
until discovery succeeds instead of giving up on the first failure.

* test(acp): flavor-neutral config_option_update test

* fix(copilot): gate effort discovery on the model the backend applied

Compare the model the next queued turn carries with the backend's model
instead of session state, so an older queued batch or a failed switch
keeps discovery pending; forward the saved effort on terminal resume.
2026-11-10 15:11:16 +08:00
7680abb094 feat(web): give every session state its own presence badge (#2296)
The presence badge showed a stopped or archived session as no badge at all,
and told connected-and-waiting from working only by a pulse. Every state now
has its own mark: solid green (pulsing) working, solid blue (pulsing)
background work only, green ring connected and waiting, and a power/standby
mark for stopped or archived. Colours, pulse, layout and settings are
unchanged; shape now carries working vs waiting, and the stopped state is a
mark rather than an absence.

Co-authored-by: Ian Stevenson <is@lockhouse.systems>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-authored-by: weishu <twsxtd@gmail.com>
2026-11-10 15:11:01 +08:00
e262694b01 fix(web): show cancellation status for dismissed async questions (#2341)
* fix(web): show cancellation status for dismissed async questions

* refactor(web): share permission footer visibility; focus async cancel tests

ToolCard and PermissionFooter each had their own rule for when the footer
renders, which is how the missing Canceled status needed two matching fixes.
Both now use permissionFooterContent(). Tests now cover only this regression
and stop asserting that blocking questions show no cancellation status.
Drop the README note.

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <noreply@hapi.run>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: HAPI <noreply@hapi.run>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 14:56:12 +08:00
SSU-WEI HUANGandGitHub 42a00d5dcf fix(cli): name the failed phase and delivery state in ping_peer errors (#2345) 2026-11-10 14:55:51 +08:00
SSU-WEI HUANGandGitHub 72ecf885d6 fix(codex): resolve developer instructions after session bootstrap (#2344)
Fixes #2305
2026-11-10 14:55:34 +08:00
Junmo KimandGitHub d667c00a59 fix(web): close CJK emphasis runs that end in punctuation (#2358)
CommonMark leaves a closing ** unpaired when the delimiter run's inner
neighbor is punctuation and its outer neighbor is a CJK letter, so text
like '**속도 제한(시속 30km)**은' renders the markers literally
(commonmark/commonmark-spec#650, open since 2020). The web renders
AI-generated CJK content as-is, so it cannot rephrase around the rule.

Add remark-cjk-friendly 2.x (parseOnly entry) to every shared web
markdown plugin array. It is a parse-time micromark extension: emphasis
resolution changes only for runs adjacent to CJK text, and non-CJK
output is unchanged (regression tests pin Latin and intraword cases).
CJK handling for GFM ~~strikethrough~~ needs the separate
remark-cjk-friendly-gfm-strikethrough package and is out of scope.
2026-11-10 14:55:13 +08:00