Commit Graph
2236 Commits
Author SHA1 Message Date
Ben DavisandClaude Fable 5 060dce300e style: format hermes-t3-gateway README
Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-28 13:20:23 -07:00
Ben DavisandClaude Fable 5 73ddc93f4d feat(web): lock agent-bound projects to their Hermes agent
Threads in an agent's synthetic project are now bound to that agent
end to end on the client:

- The composer's model chip renders as a static label (the Home-thread
  treatment) for every thread and draft in an agent project, and the
  selection always resolves to the project's agentInstanceId — beating
  draft picks, sticky state, and fallbacks, and holding while the agent
  is offline. Started threads bound to a different instance keep their
  own binding.
- New drafts in an agent project are born pinned to the agent
  (agent projects are created with defaultModelSelection null, so the
  pin lives in buildLocalDraftThread rather than relying on it).
- Picking a Hermes agent from an unstarted draft in an ordinary project
  jumps to the agent's own project (ensureAgentProject + new thread),
  carrying the typed prompt and attachments along without touching
  sticky model state.
- A bound instance missing from the snapshot feeds the existing
  "restore it in Settings" message naming the exact instance id.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-28 13:09:02 -07:00
Ben DavisandClaude Fable 5 31113dfe7f fix(web): a turn's media messages no longer hide behind "Worked for …"
Live repro: Hermes sent two files plus a closing caption in one turn, and
the thread rendered only the caption — the file cards sat inside the
collapsed turn fold until the user expanded "Worked for 32s". Two causes:

- Fold eligibility kept exactly one visible message per turn (the last
  assistant message), built for streamed commentary before media existed.
  A message carrying attachments is a deliverable, not commentary: it is
  now always terminal, and the fold's hiding loop spares every terminal
  message rather than only the group's anchor. Intermediate text still
  folds exactly as before.

- Ordering: the server stamps milliseconds while the plugin stamps
  microseconds, and the raw string sort puts ".546Z" after ".546238Z"
  ("Z" > "2") — so the caption rendered below the files it introduced.
  Timeline sorting now normalizes fractional seconds before comparing;
  still a pure string compare, all inputs are UTC Z-suffixed.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-28 11:05:57 -07:00
Ben DavisandClaude Fable 5 ebe7bc4b13 fix(hermes-plugin): compensate in-process for core's send_message media defects
Two upstream defects (tools/send_message_tool.py @ v0.19.0) made media
sends to t3 either lie or lose data, with no upstream change required to
neutralize them — the plugin runs inside the same process as the buggy
functions in every path that matters (gateway, cron, hermes send CLI):

- Bug A (:1108, :1154): core precomputes "MEDIA attachments were omitted
  for t3..." from a hard-coded platform list and appends it to any
  successful result without consulting it. Our sender delivers and acks
  the media, then the same JSON claims omission — which misled a live
  agent into reporting delivery failure for files T3 had rendered.
- Bug B (:711, worse): with the gateway co-resident, core short-circuits
  to adapter.send() and never passes media_files (already stripped from
  the text by extract_media) — files silently lost. Live testing missed
  it because `hermes send` ran out-of-process onto the standalone path.

coreshim.py wraps both functions at plugin load: t3 media sends route
through our standalone_send (durable queue, per-frame acks) on every
path including co-resident and media-only; the false warning is stripped
by stable prefix ("...for t3;" — the trailing semicolon matters, a
platform named t3-anything must not match). Fail-open throughout: every
patch feature-detects module/attribute/coroutine/signature shape first,
logs one warning and leaves core untouched on any mismatch, applies
idempotently, and patches independently. Verified attached and behaving
against the real Hermes v0.19.0 module under its own venv.

standalone_send results now carry delivery_ids/media_count/acked_count
and an explicit "N media file(s) delivered and acknowledged" note —
counter-evidence beside any residual warning if the shim ever fails
open, so a result-reading agent cannot reasonably conclude omission.

README: the pre-v4 "attachments intentionally advertise false" claim is
gone (it reinforced the agent's wrong diagnosis), media is documented in
scope/Home sections, and both core bugs are recorded with citations.

171 plugin tests (was 150), ruff clean.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-28 10:50:27 -07:00
Ben DavisandClaude Fable 5 7afd833485 fix(web): hide the enrollment command's horizontal scrollbar
A full-height native scrollbar under a one-line command read as clutter.
The command still scrolls (wheel/trackpad/drag) and the copy button is
the intended affordance; the track is hidden with the same pattern the
composer strip and model sidebar already use.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-28 09:53:57 -07:00
Ben DavisandClaude Fable 5 a5400f8b39 style: format HermesAdapter.test.ts
The last triage batch was committed with --no-verify (the hook errors on
all-Python staged sets), which let one unformatted TypeScript line slip
past on an earlier mixed commit. vp fmt output, no behavior change.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-28 09:36:22 -07:00
Ben DavisandClaude Fable 5 5a76272e4a Merge origin/main into experiment/hermes-provider-ui
Twenty commits of main, three conflicted files, all in the sidebar/composer
chrome that main restyled (SidebarMenuButton sizing pass, ComposerControl
extraction):

- SidebarV2: main's restyled header (Search trigger + icon-size buttons)
  and scope menu win; the branch's agent-project behavior is re-applied on
  top — new-thread gate on projectGroups (agent-only users), agent marks
  on the scope trigger and menu rows, and the actions button hidden for an
  agent's synthetic project.
- ProviderModelPicker: main's ComposerControl trigger and gap-1.5/size-4
  trigger contents win; the branch's extracted triggerContents and the
  Home-thread static-label branch are kept, with the static chip's metrics
  updated to mirror ComposerControl (h-7, px-2.5) instead of the old
  Button size="sm" so Home stays pixel-identical to normal threads.
- ProjectFavicon: both sides' imports (agent mark + cn) union cleanly.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-28 09:28:14 -07:00
Theo BrowneandClaude Fable 5 887dd6e455 perf(server): negotiate permessage-deflate on the websocket (#4705)
Co-authored-by: Claude Fable 5 <[email protected]>
2026-07-28 06:03:03 -07:00
Julius MarmingeandClaude f1a68ac9b0 Fix Android showcase capture and rebuild v2 queued rows (#4730)
Co-authored-by: Claude <[email protected]>
2026-07-28 14:09:34 +02:00
Julius MarmingeandClaude Fable 5 55dd01612e Link inline code file paths in chat markdown (#4726)
Co-authored-by: Claude Fable 5 <[email protected]>
2026-07-28 13:37:36 +02:00
jan 3c50a64885 fix(web): prevent diff panel scroll jumping (#4724) 2026-07-28 12:29:18 +02:00
jan 9ccfd9dfef fix(desktop): allow updater-controlled relaunch (#4721) 2026-07-28 11:45:02 +02:00
Max Katz 4f584da0f8 feat(web): add appearance settings category (#4715) 2026-07-28 11:28:29 +02:00
Max Katz 362f127922 feat(web): add maria's sidebar header artwork toggle (#4652) 2026-07-28 11:17:45 +02:00
Theo Browne 9cf9fc9c5c Settle merged PR threads immediately (#4704) 2026-07-28 11:15:14 +02:00
Julius Marmingeandcodex e00781a661 Fix relay credential lookup for unlinked environments (#4692)
Co-authored-by: codex <[email protected]>
2026-07-28 11:12:07 +02:00
Julius Marminge d25b15737a Fix mobile showcase workflow without Clerk (#4718) 2026-07-28 11:08:43 +02:00
Julius Marminge b0c4992c79 Make mobile Thread List v2 the default (#4717) 2026-07-28 10:48:31 +02:00
Ben DavisandClaude Fable 5 affd4bff0a fix: final review-triage batch — five real findings, eight dispositioned
Fixed (all verified against current code, tests falsified where testable):

- homeThreads.persistHomeThreadId: two racing creators each persisted
  their own id and returned different Home threads. Now a compare-and-set
  against the designation the caller read — not never-overwrite, because
  the self-healing path legitimately replaces a stale designation.
- HermesGatewayBroker.createEnrollment: when the instance vanished
  mid-enrollment the skipped settings write still minted and returned a
  token whose `hermes t3 connect` could never authenticate. Committed
  settings are now inspected after the write (the renameInstance /
  removeInstance pattern) and enrollment fails instance-not-found.
- HermesAdapter.stopAll: only ProviderAdapterRequestError was caught, so
  a session exiting mid-sweep aborted every remaining session's stop.
  SessionNotFound is now a no-op — an exited session needs no stop.
- ProviderModelPicker: `modelPicker.toggle` on a Home thread armed the
  scroll-lock effect with no popover rendered, locking page scroll with
  nothing to dismiss. The static branch forces the menu closed.
- mobile NewTaskDraftScreen: the picker-fallback guard read the filtered
  workspace list, so an agent-only environment sat on "Loading task"
  forever. It now reads the pre-filter list.

Skipped with evidence (NOT-REAL unless noted): homeThreads empty-patch
(caller re-reads; failing is worse), correlator sweep-vs-timeout (only
per-request timeout is 6s ping vs 90s maxAge), duplicate requestId
(UUIDv4/monotonic — no reachable collision), both ProviderService
lifecycle overwrites (reconcile closes the old scope before building the
replacement; adapter context guard drops stale frames), revokeInstance
ordering (mooted by 3bc3f45bf per Macroscope itself), pendingApprovals
optimistic delete and ingestion fallback attribution (documented
deliberate designs; NOT-WORTH-IT).

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-28 00:11:12 -07:00
Ben DavisandClaude Fable 5 c9a118c6f0 fix: close enrollment/revocation races and an unkillable correlator send
Three review findings on the original broker code, all confirmed real:

- registerConnection ran entirely outside withInstanceLock while
  createEnrollment and revokeInstance hold it, and every step between
  authentication and the credential write is a suspension point. A
  handshake parked at the write could re-create a credential that
  createEnrollment had just superseded, or connections.accept could
  install a live socket for an instance revokeInstance had just torn
  down (generation fencing does not help — accept installs at a higher
  generation). Authentication now runs unlocked (a junk credential never
  queues on the lock), then the whole mutation section — token consume,
  credential persist, accept, ping fork, status publish — runs under
  the instance lock with a fresh re-read, so a competing enrollment or
  revocation that won the lock is fully visible and the handshake
  rejects. teardownConnection takes no lock and only ever targets the
  displaced socket, so the locked region cannot deadlock with it.

- RequestCorrelator ran input.send outside restore and outside the
  timeout: a wedged transport write was unkillable and the response
  timeout did not start until the write returned. Worse than reported:
  in effect 4.0.0-beta.102, Effect.timeout applied OUTSIDE restore
  inherits the surrounding uninterruptible region, so even the bare
  await was un-interruptible. Send and await now both live inside
  restore with the timeout inside it too; registration stays
  uninterruptible so a response racing the write always finds its entry,
  and ensuring releases on every exit.

Race tests park the handshake at a gated secret-store write and drive
the competing operation to completion; falsification runs confirm each
test fails against the unfixed code.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-27 23:22:22 -07:00
Ben DavisandClaude Fable 5 3bc3f45bff fix: harden media delivery durability per review findings
Five Macroscope findings on the media push, all confirmed against the
code:

- adapter.py _start_turn: a failure in the awaits after registering the
  turn left a phantom entry that rejected every later turn.start on the
  thread and advertised a stale activeTurnId on reconnect. The entry is
  now removed on any exception, guarded on identity so a replacement
  installed by an error path keeps ownership.
- home.py queue: a transient read error made append() see an empty queue
  and rewrite the file, destroying every unacknowledged delivery. Read
  errors now propagate; append falls back to a single O_APPEND write (cap
  briefly unenforced — recoverable; a destroyed outbox is not), purge
  declines to rewrite (the entry replays once and dedupes server-side).
- adapter.py deliveries (text and media): the queue append's return was
  discarded, so an unpersisted delivery reported success — and media
  could complete its turn — even when the live send also failed. Success
  now requires either leg: queued-and-unsent rides the next connect,
  sent-but-unqueued is already at T3.
- home.py permissions: the outbox (which now carries base64 media
  payloads, not just text) was 0644 in 0755 under a default umask. Queue
  file, temp file, append path, and lock sidecar are 0600 in 0700.
- hermesGatewayHttp dedupe: alreadyDelivered read through
  getThreadDetailById, which filters archived threads — an archived Home
  with a failed best-effort unarchive made every retry of a deliveryId
  append a fresh duplicate. Dedupe now uses a purpose-built
  hasThreadNotificationDelivery on projection_thread_messages with no
  archive filter and json_extract on the deliveryId, so a match in a
  message body cannot false-positive.

Skipped (documented on the PR): Windows lock no-op (unsupported host,
pre-existing), whole-file read in build_media_delivery (the read is the
25MB check), MAX_FLUSH_PER_CONNECT bound (deliberate), bytes-based queue
cap (design change nothing warrants yet).

Plugin tests 150 across four files; server suites green.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-27 22:39:39 -07:00
Max Katz dd5ea32488 fix(web): 33 web UI fixes (#4700) 2026-07-27 21:43:49 -07:00
Theo BrowneandClaude Opus 5 c13a021e43 feat: default sidebar v2 on for nightly and dev builds (#4491)
Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
2026-07-27 21:41:08 -07:00
Ben DavisandClaude Fable 5 3d0459539d fix(hermes-plugin): an image-only reply left its turn running forever
Live repro (2026-07-27 21:26): "send it one more time" produced a reply
that was just the image — no text. Upstream notify-marks every send of a
reply's final delivery batch, text and media alike, but only the text
path honored the mark; with no text send there was nothing to complete
the turn, and the thread sat "Working" until the liveness timeout.

The media path now honors the same notify-completion contract, guarded
to the still-live turn: in the common text-then-media ordering the text
completes the turn first, and re-completing the recent-turn entry the
media scopes to would emit a second terminal frame for a turn T3 already
folded (its conflict gate rejects those). Two regression tests pin the
pair: image-only completes exactly once, text-then-media still emits a
single turn.completed.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-27 21:34:54 -07:00
Ben DavisandClaude Fable 5 77ff1ee304 fix(client-runtime): live media deliveries kept their file only after reload
The thread reducer's notification-delivered case predates media and built
the message with turnId hard-coded null and no attachments — so a
turn-scoped media delivery streamed into an open thread as "(empty
response)" while a reload, which reads the projection row, showed the
file. The reducer now mirrors the projector: attachments ride along and
turnId comes from the payload (null for proactive deliveries, unchanged).
latestTurn and checkpoint rebinding stay untouched either way.

Live repro: second image-send attempt in a Hermes thread after the plugin
scope fix — the frame arrived, persisted correctly with its attachment,
and rendered empty until refresh.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-27 21:06:36 -07:00
Ben DavisandClaude Fable 5 ae8c0ca7fd fix(hermes-plugin): reply media reached T3 only while its turn was live
Live repro (2026-07-27 18:47): "generate an image and send it" produced the
image and then dropped it with "no active T3 turn". Upstream delivers a
reply's final TEXT first — notify-marked, which completes the T3 turn —
and dispatches the reply's media 36ms later, so turn media always chases a
just-completed turn.

The reach-back existed but was keyed on HERMES_SESSION_KEY matching the
completed turn, and that key is structurally unavailable on the media
path: the gateway binds it inside _handle_message_with_agent and clears it
in that method's finally, while the delivery pipeline runs one frame
further out, after the handler returned — every send it makes reads "".
(The text path never noticed: with a live turn it doesn't consult the key.)

The reach-back is now keyed on the two signals that are trustworthy there:
recency (30s monotonic window from turn completion, sized against the
measured 36ms gap and upstream's 2.5s max human-pacing delay) and
provenance (classify_delivery must not positively mark the send
proactive). The one collision this could open — send_message targeting a
non-home thread — is contained by an asymmetry written at the decision
site: media touches no turn machinery (turnId is a sequencing hint; it
cannot complete or interrupt a turn), so the worst case is a file
sequenced next to the wrong neighbour, never the stolen-answer defect the
text gate exists to prevent.

An unscopeable file now falls back to a turnless Home delivery with
provenance instead of being dropped — T3 re-resolves the home thread
server-side, so this path cannot address arbitrary threads — and the
original error stands only when no home is designated.

Also: queue flushes restamp frames to the current protocol version, so a
delivery queued under v3 cannot wedge the post-upgrade reconnect against
the strict-lockstep decoder (this bit the first live reconnect).

Verified against the real gateway package (no session-context stubs) and
over the live wire: media.deliver sent, acked, bytes on disk. 140 tests.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-27 19:40:43 -07:00
Theo BrowneandClaude Fable 5 476d69cd1d fix(mobile): threads load snapped to bottom on iOS (#4689)
Co-authored-by: Claude Fable 5 <[email protected]>
2026-07-27 19:24:44 -07:00
Ben DavisandClaude Fable 5 2e080655fe fix(web): expired-asset media degrades to a download card, not a dead frame
Signed asset URLs live one hour; a thread left open past that renders
broken <img>/<video> elements. onError now reclassifies the attachment to
the download card — still labelled, still clickable, and the click issues
a fresh request. Deliberately no automatic URL refresh loop: a remount
re-mints tokens, and that is the common recovery path.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-27 18:20:50 -07:00
Ben DavisandClaude Fable 5 6998f16f7c feat(web): send any file to Hermes — drag, paste, and a paperclip picker
Intake decisions live in one pure function (planComposerAttachmentIntake)
shared by all three entry points, gated on the provider that will actually
run the turn: on Hermes threads any file type is accepted (images 10MB,
files 10MB, 8 total), everywhere else the image-only behavior — including
its exact error strings — is unchanged. The paperclip button and its
hidden input only mount on Hermes threads, with a mirrored "Attach files"
entry in the compact footer menu since mobile has neither drag nor paste.

Non-image files stage as name+size chips in the pending strip and ride the
draft store's existing attachment lifecycle (dedupe, persist, hydrate,
stash, clear) — the persisted shape carries no variant tag, so the type is
re-derived from the mime on hydrate rather than migrating storage. The
send path builds type:"file" uploads with the browser mime (empty ->
application/octet-stream), and optimistic-message blob previews are now
released for every variant, closing a leak where only image blobs were
revoked.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-27 18:18:19 -07:00
Ben DavisandClaude Fable 5 a398258ce6 feat(web): render Hermes media natively in the timeline
New MessageAttachments component, shared by user and assistant rows so the
two sides cannot drift: images render inline with the existing zoom dialog
(UserTimelineRow's hand-rolled grid replaced by the same component),
video/* gets the browser's native player, application/pdf gets a card that
opens the signed asset URL in a new tab, and everything else — SVG
included — gets a download card with name and size. SVG is deliberately
never inline: the asset route serves same-origin, and "my agent got
confused" is exactly the failure mode a download card contains.

Assistant rows place media above the markdown caption; a captionless media
message suppresses the "(empty response)" fallback — that text is for a
turn that produced nothing, not one that produced a file. Turn-scoped
media skips the delivery header: provenance headers are for things that
land while you're away, and media inside a live turn reads as part of the
reply.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-27 17:47:44 -07:00
Ben DavisandClaude Fable 5 6cb4f53b0d feat(hermes-plugin): protocol v4 — send and receive media
Outbound: the adapter overrides Hermes' native send_image_file/send_video/
send_voice/send_document to emit `media.deliver` with the identical
queue-before-send, purge-only-on-ack lifecycle home deliveries use — the
JSONL outbox stores raw frames keyed on deliveryId, so both frame types
ride one queue. A _recent_turns record keeps a reply's media turn-scoped
even when it lands just after its notify-completed turn (upstream sends
text before media). Files are read eagerly so queued copies are
self-contained; unreadable or >25MB files are skipped, never queued.

Inbound: turn.start attachments are decoded to 0600 temp files in a 0700
per-turn dir (client-supplied names sanitized, extension preserved) and
ride the MessageEvent's structured media_urls/media_types fields — Hermes'
own platform-attachment channel, which feeds vision routing, STT, and
document context notes. turn.steer is the exception: its handler injects
only text, so steer attachments append as bracketed path notes.

media_deliver() raises on empty/oversized payloads or a missing deliveryId
rather than clamping — truncated bytes are a corrupt file, and a
wire-invalid frame must never enter the durable queue. WebSocket max_size
rises 2MB -> 64MB for v4 frames. 134 tests (was 106); ruff clean.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-27 17:47:31 -07:00
Ben DavisandClaude Fable 5 568ed47541 feat(server): store and deliver Hermes media end to end
Outbound (plugin -> user): `media.deliver` handling mirrors `home.deliver`'s
durable-write-then-ack contract, extracted into makeHermesDeliveryHandlers
so the delivery rules — projection-backed deliveryId dedupe (the decider's
in-memory scan cannot survive a restart), pessimistic ack, racing-socket
re-read — are testable without a WebSocket. Decoded bytes are re-checked
against the 25MB ceiling and the declared size (±2 bytes of base64 padding
ambiguity); bytes land in the attachment store before the message row, so a
failed dispatch leaks a file rather than rendering a broken row. Turnless
media re-resolves the instance's Home thread and ignores the frame's
threadId; turn-scoped media must name a thread the instance's adapter holds
a live session for. Oversized images (>10MB) degrade to the file variant
rather than failing the delivery.

Inbound (user -> plugin): HermesAdapter.sendTurn/steer replaces the
attachments-not-supported rejection — bytes are read from attachmentsDir
and inlined as base64 on the frame (no side-channel URL: the plugin may
have no authenticated route back), with the 25MB per-turn total enforced
where the whole turn is visible. Normalizer accepts `file` uploads at 10MB
and picks the persisted variant from the payload's real mime, so an image
uploaded as "file" still renders inline.

The projection persists attachments/turnId off the notification event into
the existing attachments_json column, and the revert-time prune no longer
skips file-variant attachments. The broker's version-incompatible rejection
now names the fix (upgrade the plugin) and distinguishes wrong-version from
capabilities that don't satisfy the v4 contract.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-27 17:47:14 -07:00
Ben DavisandClaude Fable 5 b4beb1aed9 feat(contracts): Hermes gateway protocol v4 — media frames and file attachments
v4 is a lockstep bump (the v2->v3 precedent): media is part of the contract,
not a negotiated option, so capabilities require `attachments: true` and a
v3 plugin is rejected at the version gate with upgrade instructions.

New surface:
- `media.deliver` / `media.deliver.ack` — plugin-initiated media shaped like
  `home.deliver`: idempotent on deliveryId, kind/label provenance, optional
  turnId (absent = proactive, lands in Home) and caption, base64 payload
  bounded at 25MB (HERMES_MEDIA_MAX_BYTES) at the schema so an oversized
  frame fails at decode. Ack only after durable write.
- `turn.start`/`turn.steer` gain optional inline-base64 `attachments`.
- `ChatFileAttachment` joins the ChatAttachment union: one generic variant,
  rendering kind derived from mimeType client-side so new renderable types
  never need a schema change. Persisted rows admit 25MB (what the wire can
  deliver); the Upload variant keeps the tighter 10MB send bound.
- `thread.notification.deliver` (+ its event payload) carries optional
  attachments/turnId — media deliveries reuse the notification machinery
  for dedupe, provenance, and lifecycle reset.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-27 17:46:58 -07:00
Julius Marminge a148e08197 Add OTA update checks to mobile settings (#4686) 2026-07-28 00:55:00 +02:00
Ben DavisandClaude Fable 5 a2f6f78c6a fix: make migrations 036/037 idempotent like 035
036 and 037 issued bare ALTER TABLE ... ADD COLUMN statements, which
SQLite rejects with "duplicate column name" when the column already
exists (e.g. a database touched by a divergent branch or a restored
backup whose tracking table lags the schema). Mirror 035's PRAGMA
table_info guard so re-running either migration is a no-op.

Each test file gains an idempotence case that re-applies the
migration effect directly against the already-migrated shared
in-memory database — going through runMigrations twice would be
short-circuited by the migrator's tracking table and prove nothing.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-27 15:54:01 -07:00
Ben DavisandClaude Fable 5 4659e0d9e7 ci: run hermes plugin lint + tests
New hermes_plugin job runs ruff (per the plugin's pyproject.toml,
including F811 which guards against re-duplicated definitions) and
the plugin's stdlib-only unittest suite via discovery. The tests
self-bootstrap their imports and pass without websockets installed
(connection.py guards the import), so no pip install step is needed.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-27 15:51:05 -07:00
Ben DavisandClaude Fable 5 b76f8c8bc8 chore(hermes-plugin): drop duplicated definitions and add ruff config
The plugin carried five verbatim second copies of definitions —
protocol.py's delivery_id() and home_deliver(), connection.py's
AcceptedHandler alias and _notify_accepted(), and __init__.py's
.home import. All were merge artifacts: Python's last-one-wins
semantics made them behavior-neutral, so this deletes the second
copy of each (for home_deliver the kept first copy differs only by
a literal "≤" vs "<=" in the docstring).

Adds a minimal pyproject.toml (tool config only, no packaging) so
ruff runs with E/W/F — F811 redefinition is exactly the rule that
would have caught these — with E501 off in favor of the plugin's
long explanatory prose. Drops test_connection.py's unused
contextlib import (F401) so the check passes clean.

Also quiets home.py's save_home_thread_id() failure log: outside a
Hermes install the failure is just ModuleNotFoundError for
hermes_cli, so log a one-line warning with the exception summary
instead of a full stack trace on every test run.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-27 15:50:44 -07:00
Ben DavisandClaude Fable 5 a9b34ea820 fix: Home model chip matches the Button trigger's weight and border inset
Two residual diffs vs the interactive picker's size="sm" Button surfaced
by comparing rendered markup: the label weight (Button renders
font-medium) and the 1px transparent border that insets the Button's
content. The static chip now carries both; the only remaining difference
is the chevron Home deliberately drops.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-27 15:38:28 -07:00
t3-code[bot] 831eb66fee chore(release): prepare v0.0.29 2026-07-27 22:37:18 +00:00
Ben DavisandClaude Fable 5 6e29fe607f docs: plan Hermes media support — send and render files both directions
Finalized after a product interview: outbound-first, inline base64 on a
protocol v4 lockstep bump (matching the v2->v3 precedent), media as
standalone assistant messages with optional captions, no mime allowlist
with an SVG inline-render guard, proactive turnless delivery into Home
with full NotificationHeader provenance, and native rendering for
images/video/PDF with download cards for the rest. Reuses the existing
attachment store, asset-token serving, and message-attachment plumbing
end to end; chunking, transcoding, thumbnails, and CDN are explicitly
out of scope.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-27 15:34:56 -07:00
Ben DavisandClaude Fable 5 285b05eeba fix: Home composer chip sits at the normal thread's footer height
The static model label hard-coded h-8/text-sm while the interactive picker
it replaces is a size="sm" Button (h-8 sm:h-7, text-base sm:text-sm), so a
Home thread's composer footer ran one notch taller than every other
thread's at desktop widths. The static chip now mirrors the Button metrics
exactly — normal-thread styles are the reference, Home conforms to them.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-27 15:02:54 -07:00
Ben DavisandClaude Fable 5 8915a449ec feat: use the real Hermes Agent mark instead of the local caduceus
HermesIcon now renders the Nous mascot from the hermes-agent repo,
downscaled to a 256px PNG served from our own public dir rather than
hotlinked. The component keeps the Icon signature so every registry and
call site is unchanged; the composer's bare <HermesIcon /> gains an
explicit size-4 since the button's automatic svg sizing does not reach
an <img>.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-27 14:43:41 -07:00
Krzysztof Moch 1153afb4fb fix(mobile): match react version to react-native 0.85.3 vendored renderer (19.2.3) (#4675) 2026-07-27 23:25:07 +02:00
Ben DavisandClaude Fable 5 d22d5ac00f fix: reconnect no longer cancels interactions a live plugin still holds
`resumeSessionAfterReconnect` cancelled pending approvals/user-input before
asking whether the plugin survived. A bare socket drop leaves the plugin
process alive with its request dicts intact and the turn genuinely blocked
on an answer — cancelling wiped the request from the UI while Hermes kept
waiting for a response that could no longer be given, hanging the thread.

Cancellation now keys off the resume outcome: a session.ready carrying an
activeTurnId means the process (and its dicts) survived, so the requests
stay on screen and remain answerable over the replacement socket; no
activeTurnId or a failed resume means they died with the process, and they
are cancelled exactly as before. The stopped-mid-flight early return also
no longer cancels on a context that stopped routing events.

The existing cancellation test modelled a restart but reported the turn as
surviving — the exact combination that cannot occur (dicts are per-process)
and the one the old code got wrong. It now reports no active turn, and a
sibling test pins the surviving-turn case to zero resolved/warning events.

Flagged by Macroscope on #4678 (discussion_r3660942051).

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-27 14:24:06 -07:00
Ben DavisandClaude Fable 5 98317245ea fix: delivery spacing never applied — :first-child matches every virtual row
The timeline is virtualized: each row renders as the sole child of its own
absolutely-positioned wrapper, so Tailwind's `first:` variant matched every
delivery and its mt-1 override beat the section margin on all of them — the
gap between Home deliveries silently never existed, at any of the values
tried. "First in the timeline" is list state, not DOM structure; LegendList's
renderItem already receives the index, so it now flows down as an `isFirst`
prop and the margin is chosen in code.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-27 14:18:42 -07:00
Julius Marmingeandcodex a2ffb122e2 Show origin ref in branch trigger label (#4680)
Co-authored-by: codex <[email protected]>
2026-07-27 23:13:11 +02:00
Ben DavisandClaude Fable 5 e3dc202005 style: catchTags over catchTag in the two Hermes handlers
Macroscope's Effect Service Conventions check requires statically known
tagged failures to route through Effect.catchTags({ ... }) even for a
single tag; these were the only two catchTag occurrences this branch added.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-27 14:11:15 -07:00
Julius Marminge 3957a95818 Use glass surfaces for web toasts (#4681) 2026-07-27 23:06:39 +02:00
Ben DavisandClaude Fable 5 5b82054127 feat: separate Home deliveries like distinct exchanges, not paragraphs
mt-9 still read as spacing inside one document. Each delivery is its own
arrival — the gap between two of them should read like the gap between a
reply and the next user bubble, so the header rule starts a section rather
than underlining a paragraph.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-27 14:05:24 -07:00
Ben DavisandClaude Fable 5 2e14225752 fix: mobile stand-in projects missing the required agentInstanceId field
OrchestrationProjectShell gained agentInstanceId on this branch, and the
type requires the property to be present (the decoding default only covers
wire snapshots, not literals). Mobile builds project stand-ins by hand in
two places — the offline pending-task group and the pending-task editor —
and five test fixtures do the same. All now carry agentInstanceId: null,
which is correct by construction: a queued task always targets a real
workspace, so an agent project can never reach these code paths.

Only surfaced in CI: local verification typechecked server and web but not
the whole monorepo. `vp run typecheck` (what CI runs) is now clean.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-27 14:00:51 -07:00