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

10 commits

Author SHA1 Message Date
Wing
e1894e5522 Plugins: compose can replace a draft's words or write another chat's; draft_of reads any chat's
What #1446 asked for that #1445's draft API didn't cover:
- `zeron.compose(text, { replace = true, session? })` ("compose"): the
  words put in place of the draft's (its chips stay, so a rewrite keeps
  what it carries), and in another chat's draft (`session`). Words alone
  are added after what's there, as ever. Nothing is sent.
- `zeron.draft_of(session)` ("draft"): a promise of any chat's draft as it
  is, as `zeron.draft()` says it (text, chat, chips by kind and name,
  never a path), read once in the host where the app keeps it.

The composer's handling of a plugin's words is one path now (words alone
come as a string). Consent: "compose" says it may replace what you wrote;
"draft" says it sees your words in any chat. Docs, SDK (and its copies).

Tests: src/plugins `compose_takes_words_alone_or_with_replace_and_a_chat`,
`a_chats_draft_is_read_where_it_is_kept_without_paths`;
ui/tests/plugin_compose_replace.test.luau. Full UI suite (1422) and
plugins:: (248) pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 19:58:13 -07:00
hoangvu12
8a91a02dd2 Plugins: a plugin can read the composer's draft and set it aside
A new "draft" permission lets a plugin read what's being typed in the message box (zeron.draft) and take the whole draft out and put it back later (take_draft, put_draft, swap_draft, drop_draft). Zeron keeps a taken draft itself, so a plugin never sees file paths. This is what a prompt stash needs: write in the wrong chat, set it aside, restore it in the right one.
2026-11-15 04:59:16 +07:00
Wing
da1b544dc0 zgx: the Linux unit tests pass (stale copies, platform keys, recorder's cmd)
- plugins-builtin/*, plugins-dev/*: the SDK re-copied from plugins-sdk
  (#1290 added accounts.pin to the canonical copy only).
- Zeron v2's record re-blessed: its composer and lane tab already carry
  the default's model-default and remote-files fixes; tokens.luau's change
  was a comment.
- ds/shortcut_recorder: the platform's command key is written `cmd`, as
  commands spell it. Off a Mac, Ctrl+B was recorded `ctrl+b`, so Settings
  → Shortcuts let another command take Toggle sidebar's key. On a Mac
  the combinations are written as before.
- Tests that took a Mac's keys for every platform's: the rival plugins'
  key (meta is Super off a Mac), the rebinding (Control+Option+T is Super
  there), the editor's line-edge keys (End/Home, not Ctrl+arrow), and the
  editor's secondary click (the word selected on a Mac only, as zgx has it).

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 01:18:25 -07:00
Wing
e0365a26ea Plugins launch: one SDK everywhere, zgx tests in CI, install.sh guards ~/.zeron
- A4: re-copy apps/zgx/plugins-sdk/zeron.luau into all 14 copies (git,
  github, parallax-scenes, 11 plugins-dev examples); 12 lacked the agents
  block, all lacked the "project" context fix. examples_tests
  `sdk_copies_match_canonical` checks them byte for byte. The beta packaging
  (macOS, Linux, Windows) stamps the canonical SDK into each shipped builtin,
  so builtins can't ship a stale one. Builtins aren't signed (the engine scans
  them as Zeron's own), so nothing to re-sign.
- A6: a `zgx` CI suite (zgx-tests.yml, planned by scripts/ci/plan.py): apps/zgx
  unit tests and the Luau UI tests (`zgx test ui`, CLI at the pinned rev) on
  macOS and Linux, plus the engine's plugin tests on macOS. Known failures
  (10 Rust, 2 Luau About tests) live in scripts/ci/zgx-known-failures.txt;
  anything else fails. core-tests also runs engine tests/plugin_services.rs.
  No Windows job yet.
- B13: plugins-dev/install.sh refuses ~/.zeron as well as ~/.comet-native
  (and anything under them, symlinks resolved); its default is every example.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 16:26:20 -07:00
Wing
fee95b935b zgx GitHub: the viewer's and the board's words can be selected
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-11-04 15:37:47 -07:00
Wing
5b6521350b zgx: a pull request link in a chat opens in the GitHub plugin's tab
A setting of the plugin's, on by default: "Open pull request links in Zeron". Off,
or with the plugin off, the link goes where other links do; so do issues and other
GitHub pages, which the plugin can't show. A link to a pull request already open
goes to its tab.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-11-04 15:37:47 -07:00
Wing
4988086a87 zgx Pull requests: one row in the project selector for each repository
A project's clones and worktrees, on any device, share a row: named by the
oldest, opened from the one on this device if there is one, else the oldest.
Which repository a project is reaches a plugin with its folder ("files.read").

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-11-04 14:39:03 -07:00
Daniel Katulevskiy
7a2a3f5f3b
zgx GitHub plugin: a session's PR badge only from its own repository (#1166)
Every chat showed the same open PR badge (ucsd-cse-x24-sp25/lab-3-katulevskiy#1,
a GitHub Classroom "Feedback" PR: head main, base feedback).

Cause: watch.luau resolved a session's repository with `gh repo view`, which
fails for remotes on a host gh doesn't know (here every remote goes through a
local proxy, http://127.0.0.1:7457/github.com/owner/name.git) and for folders
on other devices. Such a session fell back to a GitHub search,
`is:pr head:<branch> involves:@me`, across all repositories, and took the
first non-fork hit. For a chat on `main` that is any PR of yours from any
repository's `main`. The guess was also kept in the plugin's cache.

- Remove the branch-name search: a session's PR is only its own
  repository's, from its own branch (head repo and branch must match). A
  session whose repository can't be told shows none from gh; the engine's
  watch on the session's device can still report one.
- Resolve a folder's repository from its remotes when gh can't (proxy
  URLs that keep GitHub's path, ssh and https forms), picking the remote as
  gh does (upstream, github, origin, else the only GitHub one). The plugin
  may now run `git`.
- Check headRefName against the session's branch in the batch answer.
- Keep heard PRs under a new cache key, so the poisoned `watch` entries
  aren't shown at launch; and publish a session's first answer even when
  it is "none", so a hot reload clears a badge its state still held.

Test: two chats on `main` in different repositories, one in a folder that
isn't here, an unrelated repository's open PR from `main` -> no badges; a
chat whose repository and branch have a PR -> its badge. Fails on the old
code with the unrelated PR shown.
2026-11-03 13:54:58 -07:00
Wing
8c8535b7c1
Plugins and templates: consent bound to capabilities, engine-held decisions, hardened runtime (#1139)
* Plugins and templates: consent bound to capabilities, engine-held decisions, hardened runtime

- Consent binds a capability digest (programs, MCP servers, tools, network hosts, services, module replacement); it re-asks only when that grows. UI targets never ask.
- "You" is this device's key; code-running powers are never auto-granted; keys are revoked on sign-out and rotation, listed and revocable in Settings, and new keys are announced.
- Decisions and signing need a one-time review the consent window holds; agents get a scoped IPC token; agent-created chats can't exceed their creator's access; peers can't allow; relayed calls carry the edge-verified device.
- Runtime: text-only Luau, one command policy (env allow-list, hardened git/gh), plugin network blocks private ranges unless declared, safe path joins, verified snapshots, hardened built-in Git service.
- App: ui.change can't override modules, Settings sealed, decision controls protected, plugins get ids and resolve data through grants, consent sheet hardened, dev switches debug-only.
- Templates: unapproved templates run as previews with Keep/Revert, a host-owned way back on every platform, safe mode, no builtin-theme spoofing, increasing versions.
- Edge: step-up for key registration and account deletion, key list/revoke, reserved names, invitation/image/admin limits, relay device stamp.

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

* Signing keys register on the first sign-in, revocations act at once, setup and layout fixes

- A sign-in registers this device's key with its fresh ticket, also on a local-mode engine; new keys are noticed at start; a revoked own key rotates at once (peers are told), drops code-running grants and shows a notice.
- Calls during unfinished account setup answer setup_incomplete; plugins and templates load once an organization is chosen.
- The host strip's wrapper fills the window.

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

* Engine: only plugin and template calls answer setup_incomplete during onboarding; everything else waits as before

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-03 11:33:36 -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