feat(examples): end-to-end proof of third-party framework-* discovery (#190)#206
Merged
Merged
Conversation
…#190) The extension SPI shipped with discovery tested only against a fake loader. Add a real proof: `examples/framework-hello`, a plain third-party capability package (no build, default-exports a FrameworkExtension), and `examples/framework-discovery-demo`, a project that depends on it. The demo runs both halves of the seam for real - resolve+import the installed framework-* package from disk, then compose it into the agent frame - offline via the fake driver, and asserts the discovered persona and skill reach the agent. Building it surfaced a gap: an active extension's own `skills` were collected but never framed (run.ts only used the built-in SkillRegistry). Add `composeSkills` (symmetric with composePersonas): union the registry-matched skills with every active extension's skills, deduped by name. run.ts now threads both an extension's personas and its doc pointers into the frame.
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.
Follow-up to #205 (the extension SPI). Discovery was only proven against a fake loader; this adds a real end-to-end proof and closes a gap it surfaced.
What's here
examples/framework-hello- a plain third-party capability package (no build, default-exports aFrameworkExtensionwith a persona + a skill). The framework core never mentions it.examples/framework-discovery-demo- a project that depends onframework-hello. ItsrunDemoruns both halves of the seam for real: resolve + import the installedframework-*package from disk, then compose it into the agent frame, offline via the fake driver.pnpm startnarrates it;pnpm testasserts it end-to-end.Demo output:
Gap this surfaced (fixed here)
An active extension's own
skillswere collected but never framed -run.tsonly used the built-inSkillRegistry. AddedcomposeSkills(symmetric withcomposePersonas): unions the registry-matched skills with every active extension's skills, deduped by name.run.tsnow threads both an extension's personas and its doc pointers into the frame. Also exporteddiscoverExtensions/readProjectSignalsfrom@gemstack/frameworkfor programmatic embedders.Tests: new E2E test in the demo (real import + compose), plus unit tests for
composeSkillsand extension-skill framing. Repo typecheck (21) + build (9) green; framework 65/65, ai-autopilot 277/277 (one pre-existing flaky timing test, green on rerun). Changeset added (minor, both packages).