feat(lambdadelta): plugin-system foundation — capability model, package format, provisioner, harness, minter (#33) - #99
Merged
Conversation
…ge format, provisioner, harness, minter (issue #33) Lands the two fundamentals the issue says shape the kernel/host seam, plus the author loop, without touching kernel semantics: * capability.rs — the capability model: catalogue (:notes/read, :notes/write, :agents/run), CapabilitySet grants, :agents/run implies :notes/read. require() is the single choke point. * lambdadelta_host::register_gated — enforcement at the seam: every gated builtin checks its Gate BEFORE touching the notebook; denial is a structured LdError::Capability (new error variant), never a panic and never a partial effect. Ungated registration stays for trusted host contexts (formulas/agents). * package.rs — the homoiconic package format: manifest.ld is a λδ map literal parsed by the ordinary reader (no second parser); fields mirror BoJ cartridge.json + PanLL contracts (name/version/spdx/tier/ description); tiers teranga/shield/ayo; resolve_config() is the configurator's typed-schema enforcement. * provisioner.rs — pure install plans: refuses TOTALLY when requested is not a subset of granted (missing names the delta); grants exactly what was requested (least privilege by data). * harness.rs — the sandboxed author/test environment: closure-registered host surface (kernel never depends on a host), assert-eq/assert record into HarnessReport instead of aborting; eval errors become failed assertions; per-harness Budget override. * scripts/ld-mint.js — the minter: just ld-new <name> scaffolds plugins/<name>/ (manifest.ld, src/main.ld, test/main.test.ld, README.adoc); plain ESM, works on Bun and Node. * plugins/word-count/ — the reference package, minted by the minter. * core/tests/lambdadelta_plugin_system.rs — end-to-end proof: manifest validates, provisions over full grants, runs GREEN in the harness against a fixture notebook; partial grants refused; read-only sandbox denies the plugin's mutation; :agents/run not implied by :notes/read. * docs/design/lambdadelta-plugin-system.adoc — design + status for the four components + wizard, tier/trust model, deferred items (configurator UI, install receipts, registry, signing). Discharges the spec §7 proof obligation for the gated path ('capability non-escalation … until authority is represented and checked at dispatch'). Sequencing per the issue: L0/L1 landed -> capability layer + package format + minter/harness now -> provisioner host-prompt, configurator UI and the wizard are the documented next layer. Local verification: cargo test (118 tests incl. doc-tests) green, clippy --all-targets --features wasm -D warnings clean, wasm32 build clean, fmt clean.
|
Warning Review limit reachedNext included review available in 59 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (17)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



What
Foundation for the λδ plugin system + wizard of #33 — the two fundamentals the issue says must land early ("capability model" + "package format", because they shape the kernel/host seam), plus the author loop, without touching kernel semantics.
Dependency map (upstream/cross-dependency):
self(the fx-field enabler) #48), macros+multimethods (feat(core): LambdaDelta part 2 — hygienic macros + multimethods + prelude #43), and the notebook host seam (feat(core): LambdaDelta notebook host — λδ reads and mutates notes #36) — the issue's "post-L0" precondition.cartridge.json(name/version/spdx/tier/description), tiersteranga/shield/ayocome from PanLLsrc/abi/cartridge-schema.json, and the minter mirrorspanll/contracts/minter.toml's scaffold role.Shipped foundation
core/src/lambdadelta/capability.rs:notes/read:notes/write:agents/run;allows/missing/require; agents-run ⇒ notes-readlambdadelta_host::register_gatedLdError::Capability, never a panic, never a partial effectcore/src/lambdadelta/package.rsmanifest.ld(λδ map via the ordinary reader — no second parser); typed:configschema +resolve_configcore/src/lambdadelta/provisioner.rsmissingnames the delta); grants exactly what was requestedcore/src/lambdadelta/harness.rsassert-eq/assertrecord (never abort); eval errors become failed assertionsscripts/ld-mint.js+just ld-newplugins/<name>/; ESM, runs on Bun + Nodeplugins/word-count/core/tests/lambdadelta_plugin_system.rsdocs/design/lambdadelta-plugin-system.adocThis discharges the spec §7 proof obligation for the gated path — "capability non-escalation … until authority is represented and checked at dispatch": authority is now represented (
CapabilitySet) and checked at every gated dispatch.Deferred (explicit, documented in the design doc)
Configurator UI (schema + validation already done), provisioner host-prompt + install receipts, registry, signing/provenance (estate-level open question), and the wizard itself (presentation glue over the now-existing components).
Verification
cargo test: 118 tests green (incl. new integration suite + doctests);clippy --all-targets --features wasm -D warningsclean; wasm32 build clean;cargo fmt --checkclean.node --check scripts/ld-mint.js; minter exercised end-to-end (minted word-count → integration test runs it).Refs #33