Skip to content

feat(environment): import detected local skills - #1303

Merged
nixuuu merged 1 commit into
devfrom
feat/import-installed-skills
Nov 26, 2026
Merged

nixuuu merged 1 commit into
devfrom
feat/import-installed-skills

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 26, 2026

Copy link
Copy Markdown
Member

Change

  • Add to library opens a review of the files from the selected CLI copy. If several locations contain a skill with the same name, each location has its own action.
  • A preview reads from the worker that reported the copy, including on a linked computer with configuration sharing enabled. The save uses the reviewed files and defaults to Canopy agent sessions on the source computer.
  • Update the agent environment, linked computers, and protocol docs. Related to feat(environment): manage local skill copies by computer #1234.

Verification

  • 31 Linux integration tests passed across skill management, linked environment sync, and device skill inventory. They cover selecting the right copy, rejecting a changed copy, saving the reviewed bytes, and reading a CLI symlink through a linked computer.
  • Tested in Chromium with the gateway and worker. Reviewed and saved the Codex copy at 1222 px. At 390 px, retried a failed preview of the Claude copy and returned to the computer view.
  • Generated protobuf contracts. Gateway, worker, and web typechecks passed. Edited source files passed lint and formatting checks.
  • Full verification is left to GitHub CI. Native filesystem reads on macOS and Windows remain unverified.

Copy audit

  • Upload skill with Choose folder or Choose ZIP → Add skill to library starts at Review files for the selected copy. The source computer and path identify which files will be reviewed.
  • The entry action names the source for screen readers. Reading skill files… reports progress and Retry preview remains available after a read error, with technical details behind Show details. Long paths wrap at 390 px.

@nixuuu
nixuuu enabled auto-merge (squash) November 26, 2026 10:52
@nixuuu
nixuuu merged commit 02a7a24 into dev Nov 26, 2026
24 checks passed
@nixuuu
nixuuu deleted the feat/import-installed-skills branch November 26, 2026 10:57
nixuuu added a commit that referenced this pull request Nov 26, 2026
## Change

- Run a publisher’s installer command on a selected online Linux or
macOS computer from Skills. Web and desktop use xterm.js. iOS and
Android provide a native console with a text field and terminal keys.
- After a successful exit, find valid skill folders in the terminal
output and the session directory. A skill installed directly into a
supported CLI directory can be collected from that computer. Preview the
files and assignments before saving to the library.
- Send terminal commands, input and output only over the live
connection. The gateway checks worker ownership and capability. The
worker closes installer sessions on disconnect or timeout.

## Verification

- Regenerated protobuf bindings. Formatting, lint on edited files and
whitespace checks passed.
- All 22 tests passed in `agent-environment.test.ts` and
`mobile-devices.test.ts` via `bun run check:tmp`. They cover a real PTY
exchange, discovery from an ANSI installer message, and worker ownership
checks.
- Exercised the shared web renderer in Chromium at 1280 px and 390 px
with a fixture API, including terminal input, sign-in links,
cancellation and review.
- Ran a demo installer from the native Android emulator against a real
test gateway and worker. Sent an answer, detected the folder under
`.claude/skills`, and opened the review for `SKILL.md` and its companion
file. The device smoke test ended at review.
- iOS, the macOS PTY runtime, and the Electron installer flow still need
runtime verification.

## Copy audit

- The custom command flow has explicit **Run installer**, **Stop
installer**, and review actions. The input explains where the command
runs and whose access it uses.
- The computer picker identifies unavailable computers. The no-result
and error states give a recovery action, and the manual import stays
available. Statuses use text and terminal keys have accessible names.
- Checked narrow Chromium and native Android layouts. The discovered
path wraps and remains readable in the Android result.

Related: #1303
nixuuu added a commit that referenced this pull request Nov 27, 2026
## Summary

- Read the worker snapshot once more when the accepted report changes
during local skill preview on the same connection. Validate the original
revision and copy token against the new snapshot before contacting the
worker.
- Add an integration test that accepts an identical report during the
read and checks the previewed bytes. Update the agent environment
documentation.

Push CI
[#146](https://github.com/itsoltech/canopy/actions/runs/45864889405/job/140065136848)
and
[#147](https://github.com/itsoltech/canopy/actions/runs/45870599390/job/140084790023)
reported the same `FAILED_PRECONDITION`. The controlled regression
reproduces that error. The original CI logs do not identify which
validation condition rejected those requests.

## Verification

- The new integration test failed with `FAILED_PRECONDITION` before the
fix and passed afterwards.
- Four focused integration cases passed via `check:tmp`, including
rejection of an on-disk change and preview through a linked computer.
- Lint and formatting passed for the two edited TypeScript files. `git
diff --check` passed.
- The remaining repository checks run in GitHub CI.

Fixes: #1303
nixuuu added a commit that referenced this pull request Nov 27, 2026
…1341)

## Changes

The gateway dropped a connection's accepted skill report as soon as a
new report arrived and restored it only after the database write. A
preview that read during that window saw no accepted report and blanked
copy tokens, so it failed with "This skill copy changed" even though the
worker re-sent an identical inventory. Workers repeat their report on
every environment sync (connect, CLI tool reports, config changes), so
this hit the linked-computer preview test in Push CI and real users.

Keep the previous acceptance until the new report is stored or
rejected, and store its revision and copy tokens. The preview checks
that report after reading the snapshot, so an identical repeat passes
and a report with a changed copy stored during the read still rejects.
This replaces the single re-read added in #1330, which covered only a
report that finished during the first read.

Fixes: #1303
Related: #1330

## Verification

- Reproduced on current `dev` (with #1330) by firing extra environment
refreshes before the preview: 1 failure in 4 runs. After the fix: 12/12.
- `agent-skills` and `config-sync-environment` passed 6 times through
`check:tmp` (26/26 each).
- Gateway and integration typecheck, oxlint and oxfmt on edited files.
Copy audit: no UI text changed.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant