Skip to content

feat(yoagent-rutis): adapters::files() — the adapter files built in (feature embedded-adapters) - #372

Merged
yuanhao merged 5 commits into
mainfrom
feat/embedded-adapters
Oct 23, 2026
Merged

yuanhao merged 5 commits into
mainfrom
feat/embedded-adapters

Conversation

@yuanhao

@yuanhao yuanhao commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator

Asked for by yobuild (M4, design §13 in yologdev/yobuild: install yobuild with cargo install or a release binary, no repository). adapters::adapters() names the crate's plugins/ folder by CARGO_MANIFEST_DIR, which only exists where the source does.

Add (feature embedded-adapters, opt-in, ~380 KB — mostly the two npm lock files):

pub fn files() -> &'static [(&'static str, &'static [u8])]  // (path relative to plugins/, contents)

include_bytes! of yoagent.d.ts and every non-fixture file of plugins/pi and plugins/dsh: the adapters, host-ui.ts / host-approval.ts / host-session.ts, dsh-host.ts / .json, host-dialogs.ts, host-services.json, probe-services.ts, resolve-package.mjs, inspect-package.mjs, and each folder's package.json + package-lock.json. Written under one folder (keeping the paths) and npm ci'd in pi/ and dsh/, the folder is laid out like adapters().root — what the probe takes. Fixtures and the other languages' folders are left out.

Kept in step: unit test files_are_every_shipped_adapter_file compares the list with the non-fixture files of pi/ and dsh/ (plus yoagent.d.ts) and each embedded file's bytes with the file on disk — a new adapter file must be added to FILES.

CI: the yoagent-rutis check / clippy / doc / test rows that list every feature now include embedded-adapters; docs.rs builds it too. cargo publish --dry-run --features embedded-adapters compiles from the packaged crate (the paths resolve in the published package).

Docs: README (adapters paragraph), CHANGELOG ## yoagent-rutis Unreleased, the integration's CLAUDE.md.

🤖 Generated with Claude Code

https://claude.ai/code/session_01T7iq5hpndSiHQcnAsywKuG

yuanhao and others added 2 commits October 23, 2026 22:25
…feature embedded-adapters)

For hosts installed without this crate's source (cargo install, a release
binary): the pi and DSH adapter files, their package.json / lock files and
yoagent.d.ts as (path relative to plugins/, bytes), to write under one
folder and npm ci. Opt-in (~380 KB). A test keeps the list equal to the
non-fixture files of pi/ and dsh/, byte for byte. CI and docs.rs build it.

Asked for by yobuild (M4).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T7iq5hpndSiHQcnAsywKuG
- The list test walks pi/ and dsh/ recursively (a file in a new subfolder
  was not checked) and skips dotfiles and editor backups.
- New probe_test: write files() to a temp dir, link node_modules, and
  probe the pi fixture through the copy.
- Docs: about 370 KB (the pi adapter and the two locks are most of it);
  files() is the adapters and yoagent.d.ts, not all of root; npm ci in
  pi/ and dsh/; key a kept folder by version; `/` paths.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T7iq5hpndSiHQcnAsywKuG
@yuanhao

yuanhao commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator Author

Reviews (code-reviewer: set complete for the adapters, probe and matrix scripts; every file packaged. pr-test-analyzer + docs): fixed in fb657bf — the list test now walks subfolders (a new subfolder's file went unchecked) and ignores dotfiles/backups; new end-to-end test writes files() out and probes the pi fixture through the copy; docs corrected (≈370 KB, a subset of root, npm ci in pi/ and dsh/, key a kept folder by version, '/' paths).

yuanhao and others added 2 commits October 23, 2026 22:32
…apters

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T7iq5hpndSiHQcnAsywKuG
yoke 0.8.4 (2026-10-22) requires yoke-derive ^0.8.4, so `cargo update
-p yoke-derive --precise 0.8.2` no longer resolves and both MSRV jobs
fail (main too, from its next run). The pin was for yoke-derive 0.8.3,
which declared no rust-version and needed a newer std; it is yanked, and
0.8.4 declares 1.82, so resolver 3 picks it on 1.86 / 1.88. Checked
locally: `cargo check --all-features` on 1.86 with a fresh lockfile.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T7iq5hpndSiHQcnAsywKuG
@yuanhao

yuanhao commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator Author

Both MSRV jobs failed on resolution, not on this change: yoke 0.8.4 (2026-10-22) requires yoke-derive ^0.8.4, and our workflow pinned yoke-derive to 0.8.2. Main would fail the same way on its next run. The pin's reason (0.8.3, no rust-version) is gone — 0.8.3 is yanked and 0.8.4 declares 1.82 — so 534211f drops the pin from both MSRV jobs (checked locally: cargo check --all-features on 1.86 with a fresh lockfile).

It exists only with embedded-adapters, and the bridge job documents the
crate without it (unresolved link, -Dwarnings).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T7iq5hpndSiHQcnAsywKuG
@yuanhao
yuanhao merged commit 4115902 into main Oct 23, 2026
16 checks passed
@yuanhao
yuanhao deleted the feat/embedded-adapters branch October 23, 2026 20:52
yuanhao added a commit to Oscar-Williams/yoagent that referenced this pull request Oct 23, 2026
… tests

main (yologdev#372) already dropped the yoke-derive pins, so ci.yml takes main's
side and the CI CHANGELOG bullet goes. Doc comments on the five tests,
their names in the integration's CLAUDE.md, and the CHANGELOG entry moved
under yoagent-rutis Unreleased.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T7iq5hpndSiHQcnAsywKuG
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