Skip to content

feat(yoagent-rutis): adapters() and the probe module - #318

Merged
yuanhao merged 3 commits into
mainfrom
feat/rutis-probe
Oct 16, 2026
Merged

yuanhao merged 3 commits into
mainfrom
feat/rutis-probe

Conversation

@yuanhao

@yuanhao yuanhao commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

For yobuild (roadmap M1/M2b, decided 2026-10-15): expose the ecosystem probe as a library, and where the adapter files are.

What

  • yoagent_rutis::adapters::adapters() → Adapters { root, pi, dsh, types }: the crate's own packaged plugins/ files (env!("CARGO_MANIFEST_DIR")). Hosts copy them and npm ci the copy, instead of vendoring a copy and checking it by hand (yobuild's vendor/ + check-vendor.sh go away with this).
  • yoagent_rutis::probe (new feature probe = node + optional rutis-loader, tempfile, tracing-subscriber):
    • probe::pi(cwd, extensions, skills, logs) -> PiReport
    • probe::dsh(base, rows, inject, logs) -> DshReport
    • Typed, #[non_exhaustive], Serialize to the same JSON the compatibility matrix reads. Logs is a tracing layer the host installs globally (the runtime logs from its own threads), passed in to collect each load's lines.
  • examples/ecosystem_probe.rs is now a thin CLI over the module; scripts/ecosystem-matrix.mjs builds it with --features probe.

Behaviour

  • Same output as before on the adapters' fixtures (pi with an extension, pi without, DSH rows): compared old and new binaries field by field. Fields the old code left out now appear empty/null (the matrix reads them the same); error is still omitted when there is none.
  • One deliberate change: a DSH report's rows are now only the plugin's. The old filter (base- prefix) also listed the base's host-service rows from host-services.json.
  • The bridge still loads no plugins itself; only the opt-in probe feature does. The default build and its dependencies are unchanged.

Tests

  • tests/probe_test.rs (feature probe): pi fixture loads and lists its tools; a missing extension says why; DSH fixture rows report their tools, only their own rows, and a missing injected service. Skips without npm ci unless YOAGENT_RUTIS_REQUIRE_RUNTIMES=1.
  • adapters() unit test: the files are there.
  • CI: the languages job clippies, documents and tests with probe; the MSRV job checks it.

Release: an API addition with rutis-loader types reachable through the probe's dependencies → yoagent-rutis 0.4.0 (CHANGELOG under Unreleased); the version bump goes in the release PR.

🤖 Generated with Claude Code

https://claude.ai/code/session_01MyCLKQ1oAruhc2P1Nks3Gt

yuanhao and others added 3 commits October 16, 2026 13:19
- `yoagent_rutis::adapters::adapters()`: where the crate's packaged pi and
  DSH adapters and `yoagent.d.ts` are, so hosts copy them instead of
  keeping a copy in step by hand (yobuild's `vendor/`).
- `yoagent_rutis::probe` (feature `probe`): `pi()` and `dsh()` load a
  package through its adapter and report what an agent gets, as typed
  `#[non_exhaustive]` reports that serialize to the JSON the compatibility
  matrix reads; `Logs` collects what plugins log. The `ecosystem_probe`
  example is now its command-line face (same output; a DSH report's rows
  are now only the plugin's, not the base's host services).
- The feature adds rutis-loader, tempfile and tracing-subscriber as
  optional dependencies; the default build is unchanged.
- tests/probe_test.rs on the adapters' fixtures; CI builds, documents and
  tests the feature.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MyCLKQ1oAruhc2P1Nks3Gt
…ument, refusals after load, one probe at a time, services read from the modules

From the review of this PR:

- pi() and dsh() take `plugins`, a copy of adapters().root with npm ci in
  pi/ and dsh/: from crates.io the registry folder has no node_modules,
  and the docs forbid installing there. host-services.json and the DSH
  files come from that copy (base's copy still preferred).
- A pi extension refused after load (before_model -> Stop/Fail) read as
  loaded with no tools; it is now loaded: false with the refusal, and a
  late same-name refusal is retried with withoutBuiltins. The matrix
  classifies such an error as refused, as it did the warning.
- Probes in one process run one at a time (Logs is one buffer); Logs also
  collects the bridge's failed-hook reports (yoagent_rutis::extension).
- probe-services.ts reads what the rows' modules inject inside the
  runtime (as inspect-package.mjs does), plus the caller's names; rows
  must be an array with string ids.
- problem() on both reports is the verdict; a bare SKILL.md path loads;
  pi's early failures keep their logs.
- Tests: report JSON key sets, shadowed() against the adapter's wording,
  problem(), row_ids, skills; fixtures for a late refusal, a tool named
  read_file (retried without the built-in) and a missing injected service.
  The refusal and service tests fail with their fix reverted.

Most of src/probe.rs and probe-services.ts started from a patch by the
yobuild session.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T7iq5hpndSiHQcnAsywKuG
…ies its DSH files into base

From the review of the fixes:

- Cordis requires every key of a plugin's `inject`, `required: false`
  included; the service check skipped those, so a plugin missing one read
  clean though it never started (also in inspect-package.mjs and the
  matrix, before this PR). All keys are checked now.
- A base following the docs (only dsh-tools-adapter.ts copied) loaded
  probe-services.ts from plugins/dsh, which resolves another Cordis: the
  check never reported and every plugin failed. The probe copies both
  files into base when missing.
- DshReport::problem() counts rows whose inject could not be read, as the
  matrix does.
- Tests: required: false, a late tool named read_file (retried without the
  built-in), a host-like base without the probe's files. The first and
  last fail with their fix reverted.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T7iq5hpndSiHQcnAsywKuG
@yuanhao
yuanhao merged commit 75b27aa into main Oct 16, 2026
16 checks passed
@yuanhao
yuanhao deleted the feat/rutis-probe branch October 16, 2026 12:25
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