Files
WeKnora/cmd/desktop
e2433b1293 feat(lite): install and run skills on the host (#3661)
* fix(desktop): keep Lite signed in with a stable JWT secret

Auto-setup fell through to the login form, and a newly generated signing key replaced the HMAC already used for presigned links. Reuse an existing HMAC, fill only a placeholder JWT secret, and clear a sticky auto-setup failure so the desktop window can enter the local account.

* fix(desktop): make wails dev start locally and store uploads at home

The dev app has no copied config, and the repo env asks for Redis and the Docker path /data/files. Stay on the repo config, use the in-memory stream manager when Redis is unset, write uploads to ~/.weknora/data/files, and allow dragging the top of the window.

* feat(lite): install and run skills on the host instead of a remote sandbox

Lite has no sandbox image, so skills are stored under ~/.weknora/skills as version directories with a live symlink, and chats execute them in the host Seatbelt. The settings UI no longer asks which sandbox to install into. The base profile opens /tmp, chat commands may use the network, and a failed ready-write rolls the symlink back to the previous version.

* fix(ci): align Lite skill checks with the JWT split and lint limits

The desktop signing test still expected the session secret to equal the AES key, and the skill settings source test still looked for the old i18n keys. Wrap the lines golangci-lint rejects so the PR checks can pass.

* fix(ci): separate multi-line test helpers for gofumpt

gofumpt requires a blank line after a multi-line function. The host skill fakes were still packed together, so lint failed on the first one.

* fix(lite): address review findings on host skill install

- Ask mode denies network again, and /tmp writes open only with a
  writable root, so nothing runs unapproved.
- Lite still reports and accepts the workspace script switch; the
  Skills page offers to re-enable it when it is off.
- The host process refuses symlinks the installer planted before it
  clears the install cache or reads the env declaration.
- An existing signing or AES key stays the signer and is never copied
  into signing.key; sessions then get their own jwt.key.
- Skill env capture writes under the host target on Lite.
- Sweep keeps the previous version and skips skills another process
  holds the lock for.
- Terminal and desktop panels never resolve remote sandboxes on Lite.
- A detached install stream resubscribes instead of freezing.
- Upload migration follows the bundle name and the old relative path.

---------

Co-authored-by: hailongzhao <hailongzhao@tencent.com>
Co-authored-by: wizardchen <wizardchen@tencent.com>
2026-09-24 21:30:34 +08:00
..