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

13 commits

Author SHA1 Message Date
Wing
bb9ba1802e Windows: a headless start clears what an update set aside too
From the Windows proof on WING-PC: `zeron.exe.old` (the image an update
moves aside) went only at a window launch. `engine` and `headless` hand
over to the engine first, and the engine isn't the installed zeron.exe, so
an install only ever run headless kept it for good. Those two now run the
cleanup before handing over (it can't touch anything in use, a trial, or a
folder being completed).

And a completion that can't read its feed says it tried this version's own
manifest before the latest, rather than naming only the last thing tried.

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 13:28:59 -07:00
Wing
51b0e1dc43 Merge zeron/zgx into the Cloud, relay and GitHub work
Conflicts resolved:
- Engine checkpoints: zgx's upload in parts now carries the relay layer's
  atFloor/heal flags and hands the edge's refusal back to the relay state.
  The engine's own size cap follows the room's (256 MB in parts), so a long
  chat's checkpoint isn't held back before it's sent.
- Attachments: zgx's local copies of another device's uploads, rewritten with
  the app-capture attribute escaping.
- zgx app: zgx's composer, mention sections, link chips and remote harness
  retries, with the Cloud machine notices, held messages and turn states on
  top; v2 template base re-recorded.
- Linux packaging: zgx's beta packaging, keeping the fat-LTO engine build.
- apps/zgx Cargo pins: zgx's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 23:21:27 -07:00
Wing
4d1036df07 Merge zeron/plugins-launch-combined into plugins-launch-product
Both sides kept: key rotation and same-account updates carry reason
codes; the git plugin folder check says no_manifest; install params take
reinstall alongside upload/name; the consent host's Allow refuses a
tampered plugin under the new remote-allow check, and another device's
tampered sheet shows no Allow. Reinstall keeps what the plugin stored
(fresh installs still forget it). The SDK comment edit is dropped so the
signed copies match the canonical SDK.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 17:08:21 -07:00
Wing
89a8f081fc Plugins launch: export a package, plain-words install errors, tampered sheet
- export_plugin MCP tool and `zeron plugin export <id> [--to]`: an
  agent's export goes to plugin-exports only (the engine refuses its
  `to`), as templates' do.
- Install/update failures read "<reason>: <words>"; the app says each
  reason in its locale (en, zh-Hans). GitHub 403/429 is rate_limited, not
  "can't be found"; git missing says what to do instead. Release
  lookups ask as you when gh is signed in or GITHUB_TOKEN/GH_TOKEN is
  set, anonymously again on a 401.
- A tampered plugin's sheet offers only Remove and Reinstall (fetched
  again from its source, put in place, asked again); the engine and the
  consent host both refuse an Allow of it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 16:49:50 -07:00
Wing
adcac46346 Plugin launch: safe mode on Linux and Windows, a refused delete says so, a removed plugin forgotten whole
B1. Safe mode was ZERON_SAFE_MODE alone on Linux and Windows: no menu bar
to reach "Use Zeron v3", a template draws the palette, and Alt held at
launch wasn't read. Now:
- Alt held as Zeron opens is read on Windows (GetAsyncKeyState) and on
  Linux under X11 (libX11 opened at runtime, nothing linked). Wayland
  gives no app the keyboard before it has a window: there it's the flag
  or the shortcut.
- `zeron --safe-mode` (and the dev launch word) opens with Zeron's own
  interface, as --zeron-template did.
- Cmd+Alt+Shift+Home (Ctrl+Alt+Shift+Home on Linux and Windows) is the
  host's "Use Zeron v3" key: held before any script's command, so a
  template or plugin declaring it goes without (its row says whose), and
  reserved, so a focused web page or terminal never has it first. The
  palette shows it beside the item.
- The launch toast says Alt, not ⌥, off the Mac.

B7. A sidebar delete the host refuses showed nothing (the window had
already left the session): a warning toast now says
"Couldn’t delete “<title>”" (shell.sidebar.session.couldnt_delete, en
and zh-Hans).

B10 (R26 leftovers).
- A removed plugin's state is forgotten through zgx (ScriptHost::
  forget_state): its in-memory ui.state/ui.persist values and writes
  still queued go too. Deleting the folder alone let a queued write put
  it back and a plugin put back this run start from its old values.
- The sidebar filter's notice names the plugin from the host
  (sidebar.filter_by: the one loaded plugin allowed to set it, by its
  installed name; "A plugin" for none or several), never the `by` the
  plugin writes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 16:22:16 -07:00
Wing
080a3c3971 An update trial stopped from outside says so, and is tried again
"The new version stopped before it was ready" was all a rollback could say
when the trial died without leaving a note, and the trial's own log was rotated
away by the restarts after it. Two ways a trial dies without a note now leave
one:

- SIGTERM (the machine going to sleep, the service restarting, a person): not
  the release's fault. The old version still goes back, since nothing
  committed, but the record says the trial was interrupted, and neither a wake
  nor the background updater treats the release as one it went back from: it's
  tried again.
- A panic: the panic's message is the reason.

A crash the process can't catch (SIGKILL, an abort) still reads as before; the
logs from several launches back now say the rest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 01:14:45 -07:00
Wing
0f9a750056 Keep the engine's logs from several launches back
A Cloud machine starts its engine on every wake, and an update on wake starts it
twice more. Only the last launch's log was kept, so the log that said why an
update trial failed was gone by the time anyone looked. Launches and size
rotations now keep .old, .old.2 … .old.10, with the earlier ones together
within 64 MB (the oldest go first, .old always stays). Renames and removals
only, so a woken machine's lazily restored disk fetches none of it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 00:18:50 -07:00
Wing
029fea3081 Restart the Cloud engine through its own system unit
A Cloud machine runs the system unit zeron-cloud.service, but the updater
only knew `systemctl --user ... zeron.service`. After an auto-update it logged
"service restart failed" and ran the old engine until the machine restarted.

The unit now follows ZERON_DEVICE_PLATFORM=cloud, which the installer already
writes on every machine, so existing machines need no reinstall. The unit's
name picks its manager: `sudo -n systemctl` to act, plain `systemctl` to read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 12:14:50 -07:00
Wing
5bcd21ad35 Merge zeron/zgx into the beta branch
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

# Conflicts:
#	crates/update/src/channel.rs
2026-11-05 19:01:50 -07:00
Wing
a8d1dc6ecd
Updates that can't strand a device, on every platform, from any device (#1241)
* update: say how a device is installed and whether it can update from afar

UpdateStatus now carries `install`, `canApplyRemotely`, `cannotApplyReason`
and `manualCommand`, so a client no longer has to guess by platform. Older
engines omit them; a method this build doesn't know reads as Unknown rather
than losing the report. `update-ability-v1` advertises it.

ApplyUpdate refuses with the same reason the report gives. That includes a
managed install started by hand, which used to swap `current` and then fail
to restart a service it isn't running under.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* providers: decide what to run at the last moment, and only claim what happened

An update judged its plan before the wait for idle and never looked again, so
a CLI reinstalled meanwhile got the old owner's updater. Under the lease and
owner gate it now re-reads the executable and what's installed and rebuilds the
plan, refusing and checking again if that isn't what the check offered.

With no target version (Hermes, Cursor), exit 0 used to report Updated. It now
takes a moved version, a rewritten executable, or Hermes's own check no longer
finding commits. Otherwise the row stays where it was, with the reason.

Homebrew:
- Only Homebrew's published version is offered. A release Homebrew doesn't have
  yet was an Update button that always failed, and would have failed Update all.
- A formula keeping an npm CLI in its keg is Homebrew's, not npm's. `npm install
  --prefix` was changing the keg behind brew's back. A Node keg's globals stay npm's.
- A Cellar or Caskroom path with no brew at that prefix can't apply, and the
  manual step names brew rather than a self-updater that writes a second copy.

Also: a Chocolatey Claude stays manual, and updaters get 30 minutes rather than
15, since stopping a silent download can leave a truncated CLI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* update: Linux updates that can't strand a box

`app/current` now moves exactly once, when a new version has proved it's ready.
Until then every start of the service runs the old version, so if the new binary
exits, hangs, or the power goes, the next start lands on a binary that works and
knows how to put things back.

- Refuses before stopping anything if the release and a copy of the databases
  won't fit.
- Records the update durably before answering, with an id; `UpdateStatus.update`
  says how it went (inProgress, updated, rolledBack, failed), since reconnecting
  can't tell an update from a rollback.
- The old version copies the SQLite stores once nothing has them open, leaves a
  watchdog behind, and replaces itself with the new binary. It's the same process,
  so the service manager sees nothing change.
- The new version holds back work it can't take back (resuming chats, queued
  messages), proves it reads its data, serves its port and, when signed in, reaches
  Zeron's servers, then commits and only then resumes chats.
- A failed or timed-out trial goes back: the old version restores the databases
  before anything opens them. An interrupted restore finishes first.

`zeron update` on a box with a running service takes the same path and reports the
outcome. Automatic updates don't retry a release that went back; a person can.
ZERON_SERVICE_UNIT names another unit, so a test install can never restart a real
one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* providers: an update someone asks for doesn't wait for running chats

It used to wait behind an exclusive lease with no bound, which with agents always
running can look stuck for ever. Where the installer keeps the old version's files,
it now goes ahead: running chats keep the version they started on, new ones get
the new one, and nothing is drained or held up. That's Claude's native install,
Codex standalone, Grok standalone, Cursor (chats use its SDK, not this CLI),
Antigravity and agents from the ACP registry.

Installers that replace or delete files keep waiting, because a chat's process
lives for its whole session and goes on loading files from where it started: npm
and the other package managers, Homebrew, Muse, OpenCode, Pi and Hermes. Their row
says why, in the new `waitReason`. Automatic updates still wait for a quiet moment.

The registry's cleanup used to delete any version older than the last, now that
updates don't wait for chats it keeps a version something is running from.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* update: Mac and Windows devices can update from afar

The same rule as Linux, with the engine doing all of it, so the app doesn't have
to be open: the installed app changes only at the commit, and anything before that
lands back on the old version.

macOS: the new bundle is copied beside the installed one before anything stops, so
what can fail, fails with Zeron still running. The engine drains, backs up and
replaces itself in place, the same process, so it never starts a successor. Once
proved, one atomic swap makes the new bundle the app. An app still open carries on
from the retired bundle until it restarts.

Windows: the old process can't be replaced, so it starts the new exe from a folder
inside the installation and stays on as the watchdog. A running exe can be renamed,
so moving it into place is the commit.

A bundle something runs from is no longer deleted, for updates from the app too:
that's #1037. Retired bundles and old stages go once a process scan finds nothing
running from them.

A second start during a trial (the app's reconnect seeing the port go quiet) now
bows out rather than rolling back a trial that's still running, and zombies no
longer count as running on macOS. The failure tests give each fake install its own
copy of the binary: hard links made the process checks see through to other
installs, which was the cause of their intermittent failures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* update: nothing but the trial opens the databases mid-update

An app that can't start its helper embeds the engine, which skips the update's
start-up step, and could have opened databases a trial had changed or a restore
was part way through. It now refuses until the update has settled. The app's own
install on quit also refuses during an update: going back from a trial needs the
installed app to stay as it was.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* update: compile on Windows

The watchdog's environment variables are only read on Unix, the test's
version lookup no longer ends in a Unix-only expression, and the Grok CLI
fixture and the test that uses it are Unix-only like their callers.

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

* update: check free disk space on Windows

Without it every Windows update refused with "couldn't check the free disk
space". The store-list test compares paths with forward slashes.

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

* update: a brief reader can't fail the update record on Windows

Replacing a file fails with "Access is denied" while anything has it open
without delete sharing (antivirus, an indexer, a script). Seen once on a real
trial: the watchdog couldn't record the trial's pid. Retry the rename for up
to a second.

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

* update: give the second-start test a deadline a slow machine can't miss

It failed once in 80 runs on a loaded box, when the second start landed after a
3-second trial deadline.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* update: another device's status follows it through its restart

One device asking another's `UpdateStatus` got a subscription that ended the moment
the update restarted the engine, so whoever asked had to know to ask again. It now
carries on until the subscriber goes, asking again if nothing has come for a while,
which also covers a device that died without a word.

Asking a device that can't be reached now says that plainly, and that the update
didn't start, rather than `transport: peer …: readiness check failed`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* update: a beta Mac stays on beta, and says what's on offer

Tested with a bundle shaped like a beta: a beta interface carrying stable's engine.

An update asked from another device already followed the app's recorded channel,
but with no record, as when the app hasn't run since it was installed, the default
was stable: it installed the stable app and left beta. An app with no recorded
choice now stays on the channel it was built for. A choice someone made at that Mac
still stands.

The engine's report compared releases with its own version, which on a beta is
stable's, so a newer beta read as nothing new and no update was offered. On a macOS
app install it now compares with the app's version, and says what that is in
`appVersion`. It looks again once a commit has changed the answer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-11-05 16:59:05 -07:00
Wing
645290f750 zeron update names a beta's real directory
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-11-03 22:59:24 -07:00
Wing
d898f936ed
zgx: Zeron's interface on zgx (app, design system, plugins, beta channel) (#1137)
* zgx: Zeron's interface on zgx (app, design system, plugins, onboarding, Zeron Preview)

A new desktop app in apps/zgx: Zeron's interface written in Luau on zgx,
its design system, built-in plugins (Git, GitHub, Parallax scenes) and
theme templates, plus the engine and edge work it needs (plugin services
and agent tools, the agent registry, project icons, profile, organisation
admin, onboarding, plugin signing keys) and a separate Zeron Preview
package and workflow (preview-v* tags, off until enabled).

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

* Fix Linux and Windows builds: Listener's signing_in, Command::as_std on Windows

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

* Engine: plugin watchers ignore reads (inotify loop), per-component snapshot paths, Windows create-over-folder is DestinationExists

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

* zgx as a beta channel of Zeron.app; shared CLI, launch and notify crates; update channels

- Update channels (stable/beta) with semver prereleases, cross-channel installs, ZeronEngineVersion and a macOS 13 floor for beta; "Get beta updates" in the current app's Check for Updates.
- The command line moves into crates/cli and engine start-up into crates/launch, shared by the current app, zeron-engine and zgx; zgx hands engine commands to the bundle's Zeron Engine helper.
- zgx beta packaging and .github/workflows/zgx-beta.yml (beta-v* tags, gated by ZGX_BETA_ENABLED); the separate Preview packaging is removed.
- Templates install from links with updates, an Unverified badge for unknown authors, the Archived settings page, the Cloud repository picker, palette sub-steps without scope tabs.
- Git plugin refreshes on file changes; GitHub plugin batches, tiers and throttles its polling; failed PR watches retry with backoff.
- zgx f81d5e99.

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

* zgx: registry agents' sign-in state, methods and icons; PR badges isolated per session

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

* Harness: registry sign-in uses the crate's Child (Windows build)

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 03:21:42 -07:00
Wing
40183b9337 zgx as a beta channel of Zeron.app; shared CLI, launch and notify crates; update channels
- Update channels (stable/beta) with semver prereleases, cross-channel installs, ZeronEngineVersion and a macOS 13 floor for beta; "Get beta updates" in the current app's Check for Updates.
- The command line moves into crates/cli and engine start-up into crates/launch, shared by the current app, zeron-engine and zgx; zgx hands engine commands to the bundle's Zeron Engine helper.
- zgx beta packaging and .github/workflows/zgx-beta.yml (beta-v* tags, gated by ZGX_BETA_ENABLED); the separate Preview packaging is removed.
- Templates install from links with updates, an Unverified badge for unknown authors, the Archived settings page, the Cloud repository picker, palette sub-steps without scope tabs.
- Git plugin refreshes on file changes; GitHub plugin batches, tiers and throttles its polling; failed PR watches retry with backoff.
- zgx f81d5e99.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 00:57:33 -07:00