0
Fork 0
mirror of https://github.com/zeronsh/comet.git synced 2026-11-16 18:57:19 +00:00
Commit graph

9 commits

Author SHA1 Message Date
Wing
60d85b8502 Model picker: say a model's provider where two share a name
Pi signed in to both Codex and OpenCode lists GPT-5.5 twice, and the
picker gave no way to tell the rows apart.

Engine: Model gains `provider { id, name }` (serde-additive). Pi fills it
from its provider id with a name people say (openai-codex -> Codex,
opencode -> OpenCode, unknown ids in words); OpenCode from its provider
catalog. Single-source harnesses leave it None. zgx's catalog bridge
passes it to the picker.

Picker: a model with a provider carries its name as the row's hint
(Dropdown `hint`): quiet text in the name's size, on its line, the row's
gap after it; the name fades first when the row runs short. It shows
where it disambiguates (the agent lists the same name from another
provider), on every tab including Starred, and on rows a search found by
it ("codex", "gpt-5.5 codex"). Hints follow the catalog in place, and a
hinted row's accessible name reads what is drawn.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-11-11 15:11:53 -07:00
Wing
f545d1d72c Claude models: list best-first and mark the CLI's default
The Claude tab listed Fable 5.1 near the top and Fable 5.2 near the
bottom, and showed a lowercase "sonnet" row.

- Sort Claude rows by family (Fable, Opus, Sonnet, Haiku, then others),
  newest version first. The rule is parsed from the id, so a future
  claude-fable-5-3 sorts first with no code change.
- Mark the CLI's default with a new `Model.default` wire flag instead of
  moving it to the top. crates/ui default_model, the zgx composers and
  the engine's plugin set_model prefer the marked row and fall back to
  the first row. A `[1m]` default marks its listed base, which pickers
  fold it into.
- Drop bare aliases (sonnet, opus, ...) from settings.json, as discovery
  already does.
- Curate Fable 5.2, Sonnet 5.5 and Haiku 5.5 with the CLI's descriptions.
  Fast mode only where initialize reports supportsFastMode (Fable 5.2).
  No context-window select on the new rows: the CLI reports no 1M flag.
  Fable 5.1, Fable 5, Sonnet 5 and Haiku 4.5 read as previous/older
  generation.
- The static fallback now includes Fable 5.2 and marks Opus 5.5 default.

Tests: real CLI 2.1.322 initialize fixture order, generic ordering,
settings aliases, long-context default, zgx model_value and composer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-11-09 23:13:04 -07:00
Alexandre V.L
b8ed9d9c27
Providers: a switch to turn native subagents off (#1046)
Settings → Providers → Claude Code gets a Native subagents switch (per device, on by default). With it off, a top-level chat launches Claude Code with --disallowedTools=Agent,Task,Workflow, and Zeron's MCP server (ZERON_SIDE_CHATS_ONLY=1) tells the agent to delegate through side chats. Side chats, and chats whose parent is not known yet, keep their subagents. A parked session is replaced before its next idle turn.

Co-authored-by: Alexandre VARGAS <alexandre.vargas.lopez@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 23:14:48 +00:00
José Gurruchaga
3487b507fa
Unified workspace search on fff, content search, and a tabbed cmd+K palette (#856)
* build: add fff-search

* test(engine): add a workspace search benchmark

* feat(engine): add WorkspaceSearch on top of fff

* feat(engine): serve SearchFiles (@) from fff

* feat(engine): serve SearchWorkspaceFiles (file tree) from fff

* chore: drop nucleo-matcher

* feat(rpc): add WarmWorkspaceSearch

* test(ui): add the missing images field to a ToolItem fixture

* feat(ui): warm workspace search on chat focus

* feat(rpc): add SearchWorkspaceContent

* feat(ui): scored thread search for the command palette

* refactor(ui): split the command palette into sections and tabs

* feat(ui): command palette tabs with mod-1…4

* feat(ui): empty-state sections in the command palette

* feat(ui): ranked thread search in the command palette

* feat(ui): search file names from the command palette

* feat(ui): search file contents from the command palette

* perf(engine): return an evicted index's memory to the allocator

* perf(engine): cap each search index's content cache at 16 MB

* docs: workspace search on fff

* feat(rpc): add SearchHomeFolders

* feat(ui): search folders under home when adding a project

* perf(engine): index workspace paths only, grep contents without a bigram index

* perf(engine): keep idle search indexes 15 min, up to 7, warmed once on focus

* fix(ui): refresh palette content search while indexing

* fix(engine): preserve literal workspace content queries

* fix(ui): refresh palette file search while indexing

* fix(ui): refresh home folder search while indexing

* fix: handle extended Windows and UNC paths in home folder picker

* fix(ui): convert content search byte columns for editor navigation

* fix(engine): normalize Windows separators in name searches

* fix(ui): back off palette content refreshes while indexing

* perf(ui): skip the palette's index probe once the workspace is ready

* fix(ui): match Windows folder paths regardless of drive letter case

* docs(ui): describe the home index release without pins

* Workspace search: review fixes and palette polish

Engine
- Drop content matches reached through a symlink, and name results
  through a symlinked folder (ReadWorkspaceFile's rule); fff's watcher
  follows links created after the first scan.
- @ and file-tree name searches wait up to 2 s for a fresh index, since
  their answers can't report that it is still building.
- Evict the LRU index only after its replacement is created, and report
  "indexing" (not a final empty answer) when an index is released mid-search.
- File-name search accepts an empty query (not with "show ignored"),
  listing the workspace's files by the index's recency.
- Home folder results are spelled from the session's home, not its
  canonical path, so a symlinked home doesn't duplicate projects.

Palette
- The Files tab and All's Recent Files list opened files, then the
  workspace's recency list, when there is no query.
- Arrowing onto a section's first row scrolls its header into view.
- Tabs use the shared tab chip; shortcut legends are plain sidebar-style
  text set in the system font (the UI font lacks ⇧ ↵); footer keys keep
  their caps, with icon glyphs for arrows and return.
- Leaving for the PR board releases the new-project home index.

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

---------

Co-authored-by: Wing <44917547+wingleeio@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 15:11:35 -07:00
José Gurruchaga
01832f2cac
MCP: create standalone sessions on a selected device and project (#706)
* feat(mcp): create standalone sessions on selected hosts

Add chat/side kinds with compatible defaults, resolve projects within the selected device, and validate that host's harness and model catalogs before writing. Route transcript reads to the chat host and preserve send baselines across waits so missing session rows and delayed replies cannot return an old response.

Cover invalid requests, remote catalogs, mixed batches, wait races, two-engine execution and interrupt delivery. Add an isolated MCP stdio smoke fixture.

* docs(mcp): document standalone and remote session workflows

* fix(mcp): match turn replies by message id, not host timestamps

Replies were filtered by createdAt >= the caller's send time, but
createdAt is stamped on the chat host's clock. A remote host running
behind the caller hid the reply to the send, and the wait spun until
timeout with no replies. send_message already snapshots the transcript's
message ids before sending, and a new chat has none, so the id baseline
alone identifies new replies.

The test transcript no longer gives a brand-new chat an earlier reply;
the existing chat's earlier reply shares the send's timestamp, so only
its id can exclude it.

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

---------

Co-authored-by: Wing <contact@winglee.io>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 13:02:48 -07:00
wing-anara
776adb6fee Show a bounded local transcript tail before rebuilding whale history 2026-09-18 06:00:28 +00:00
wing-anara
7754391672 chat2: cursor contiguity + gap repair — the new-session random-hang root cause
Live-reproduced with two engines against a local edge: 10/20 new-session
sends hung FOREVER (host doc empty, cursor converged, retry useless);
after this fix 20/20 complete in 0.7s, and a 40-minute-wedged chat
healed on its next join.

Mechanism: a live broadcast row can outrun the join backfill, arriving
with seq N while N-1 was never received. The client advanced its cursor
with max(seq) — stamping it over the hole. The skipped row's dependents
park invisibly in loro's pending buffer (import succeeds, export
omits), so the host's doc reads EMPTY while its cursor claims
convergence: every pull asks after=cursor, gets nothing, and the
command never executes. Retry re-pushes rows the cursor already skips.
Alternating/random by timing; more likely on slow first-contact (cold
DO, plane wifi, busy edge).

The fix, client-side (no wire change):
- CONTIGUITY RULE everywhere the cursor advances (live ROW, ACK, HTTP
  pull, HTTP push-ack): the cursor may walk (seq <= cursor+1), never
  jump. A gap applies the bytes (loro parks harmlessly), HOLDS the
  honest cursor, and flags a repair.
- GAP REPAIR: the session loop answers the flag with a rowsReq from the
  held cursor (bounded, 3/session, then redial for a full catch-up).
- CURSOR AMNESTY extended to checkpoint-less rooms: first join of a
  client clamps a suspicious cursor to 0 (was: only down to
  checkpoint_seq) — bounded by the checkpoint threshold policy
  (a room past ~200 rows/512KB has a checkpoint). This is what HEALS
  every already-wedged chat on disk, no migration needed.
- Server-reset detection reordered BEFORE the amnesty (it reads the raw
  persisted cursor); the catch-up plan's 'after' now assigns the shared
  cursor in both directions (a contained checkpoint legitimately skips
  forward).
- EngineChatSink warns when an import parks on missing deps — the
  tripwire that this wedge shape was seen live.

Tests: live_row_gap_holds_cursor_and_repairs (gap held at 1, repair
from 1, walk to 3), checkpointless_amnesty_refetches_from_zero, plus
the full suite (740 green). doc_inspect example added (prints a chat
doc's commands + ledger state from a store — the postmortem tool that
found this).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 14:44:37 +00:00
wing-anara
b0be3dea2f rename: comet -> zeron everywhere (binary, crates, env, data dir, iOS)
- binary/CLI `comet` -> `zeron`; crates comet-* -> zeron-*; COMET_* -> ZERON_*
- data dir ~/.comet-native -> ~/.zeron, with a one-shot rename migration
- services: comet-native.service -> zeron.service; launchd sh.zeron.comet ->
  sh.zeron.app; macOS bundle id dev.comet.native -> sh.zeron.app
- release artifacts comet-<ver>-* -> zeron-<ver>-*; drop the Comet.app
  tarball-path compat hack in package-macos.sh
- iOS: Comet -> Zeron targets/dirs, bundle id sh.zeron.Zeron, zeron:// scheme
- clients default to https://edge.zeron.sh; installer + landing on zeron.sh
- kept on purpose: repo name, worker names (comet-native-edge/comet-landing;
  DO storage is bound to the script name), R2 bucket names, and legacy
  comet.zeron.sh routes so 0.1.x clients keep working

zeron-<ver>-* artifacts don't exist until the next release, so curl-install
and landing downloads 404 between this deploy and the 0.2.0 tag.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-14 10:49:19 +00:00
wing-anara
d28cf9c22f chat2 C3/M2/M3: host wiring, roomGen cutover, reader discard-and-adopt
The self-repair cutover (docs/chat2-sync.md), motivated by tonight's
incident: a cold reader no client release could heal, because s2's
full-history WS backfill burst dies on some network paths. chat2 readers
fetch one compact checkpoint over Range-resumable HTTP instead.

- doc_host open() branches on the registry's roomGen: 2 → chat2 join
  (supervised dial, 60s deadline, backoff, wake redial; ChatClient resolves
  only after full catch-up) with local commits fed to the relay via
  subscribe_local_update; else → the extracted s2 join, unchanged.
- Host-side lazy migration (M1/M2): on opening an s2 chat it hosts, the
  host spawns a seed — rebuild_thin_doc → POST seed checkpoint
  (seqCovered=0) → rollback copy of the fat lineage → persist thin
  (epoch 2, cursor 0) → flip registry roomGen=2 LAST (crash before the
  flip = chat stays on s2, retried next open). Live handle is retired
  (never persists the fat doc again) and dropped when unpinned.
- Reader discard-and-adopt (M3): opening a roomGen-2 chat with a local
  epoch<2 doc keeps a rollback snapshot ({chat}.pre-chat2), re-queues own
  pending commands, starts fresh, and lets the chat2 catch-up repopulate.
  No user action — the self-repair path.
- chat2 host duties on the quiesce tick: threshold checkpoints
  (rowBytes>512KB || rows>200, seqCovered=cursor) and the last-64 tail
  sidecar publish (the iOS/thin-reader fallback).
- plan_catch_up + run_session: checkpoint PRESENCE keys on checkpointSize,
  not checkpointSeq — a seeded room's checkpoint covers seq 0, and the
  seq==0 shortcut (present in BOTH sites) made adopted readers skip the
  seed and render empty transcripts. Caught by the live gauntlet: the real
  ChatClient now cold-reads a scratch room seeded with this session's real
  573KB doc → 276KB thin checkpoint over HTTP → all 36 messages converge.

Suites: full workspace green (31 result sets). Gauntlet: rebuild → seed
POST → real-ChatClient cold read on a deployed scratch worker, plus the
seeded-at-zero regression test.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-10 09:26:58 +00:00