Skip to content

feat: processor engines get http-nu's context-free commands (.mj etc.) - #48

Merged
cablehead merged 2 commits into
mainfrom
feat/engine-base
Sep 29, 2026
Merged

cablehead merged 2 commits into
mainfrom
feat/engine-base

Conversation

@cablehead

@cablehead cablehead commented Jun 19, 2026 •

Copy link
Copy Markdown
Owner

What

Hand the xs processors (actor, service, action) a base engine with http-nu's .mj, .md, and highlight commands, so they work in a service or actor, not just an HTTP handler.

  • Engine::add_processor_commands(&store): store-backed .mj/.mj compile, .mj render, .md, .highlight*.
  • Store::init sets this base before the processors spawn; prepared_base clones it per spawn.

Why

.mj was registered only on the HTTP engine, so using it in a service failed. Model: xs ADR 0007.

Notes

  • Uses Store::with_base_engine, released in cross-stream 0.14.0, which main now depends on. Rebased onto main; the temporary xs branch pin and the 0.13.4 repoint are gone, so this PR no longer touches Cargo.toml or Cargo.lock.
  • No Engine::new split: main's is already clean.
  • Test: test_processor_base_command_surface.
  • Verified end to end with http-nu eval --store --services: an actor calling .md emits md.out with the rendered HTML. On main the same actor fails with "Command .md not found".

@cablehead
cablehead merged commit c7383e2 into main Sep 29, 2026
6 of 7 checks passed
@cablehead
cablehead deleted the feat/engine-base branch September 29, 2026 19:07
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