FE-867: Agent extension host β dual-mode (elicit/execute) pi-harness contract#213
Draft
kostandinang wants to merge 2 commits into
Draft
FE-867: Agent extension host β dual-mode (elicit/execute) pi-harness contract#213kostandinang wants to merge 2 commits into
kostandinang wants to merge 2 commits into
Conversation
Contributor
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Define the dual-mode (elicit/execute) agent-extension-host contract as transport-safe metadata only β src/agent-extension-host.ts: AgentExtensionMode, capability/plugin/consumer-witness contracts, flattenCapabilityIds. The module is dependency-free and names no execute-only concept, so it stays neutral across both consumers (cook via the pi SDK, interview via the Vercel AI SDK) and any future runtime. Prove the two-consumer bar without migrating any runtime: cook's execute surface matches createPiActions() action ids exactly; the interview's elicit surface is witnessed against the real createExplorationTools() family plus a type-enforced coverage check over keyof InterviewerTools (gated by lint --type-check). Contract-first, zero behavior change. Defers the runtime host/dispatch and a pi adapter until a real driver lands (coordinated with the pi-harness thread that owns the core implementation). Amp-Thread-ID: https://ampcode.com/threads/T-019ecb9a-9a08-733b-833d-76885fc8243a Co-authored-by: Amp <amp@ampcode.com>
Lean on no-imports as the load-bearing neutrality guarantee and drop the redundant forbidden-substring denylist (a dependency-free module cannot reference an execute-only or SDK type, so neutrality is structural, not a name list to maintain). Make the interview exploration plugin proof bidirectional β its capability ids must exactly equal Object.keys(createExplorationTools(...)), catching phantom as well as missing tools. Document that the three native interviewer tools are covered type-level only (superset) because constructing them needs a live DB. Review findings #1 and #2 from ln-review. Zero behavior change. Amp-Thread-ID: https://ampcode.com/threads/T-019ecb9a-9a08-733b-833d-76885fc8243a Co-authored-by: Amp <amp@ampcode.com>
5ea98a6 to
0a176f5
Compare
This was referenced Jun 15, 2026
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.

Stacks on FE-864. First Arc-1 frontier and the base of the cook stack β every Arc-1 frontier lands on this contract.
What?
The dual-mode (
elicit/execute) agent-extension-host contract βsrc/agent-extension-host.ts, transport-safe metadata only:AgentExtensionMode, the capability/plugin/consumer-witness types, andflattenCapabilityIds.Dependency-free and names no
execute-only concept (slice/epic/plan/worktree/toolchain) β neutrality is a checkable invariant. Two-consumer proof, no runtime migration:executesurface matchescreatePiActions()ids exactlyelicitsurface is witnessed againstcreateExplorationTools()+ akeyof InterviewerToolscoverage checkWhy?
The pi harness is reused for spec elicitation and cook execution; one dual-mode host (not two) keeps dispatch, confinement, and tool-scoping shared. This file is the serialization point with the unpublished pi-harness thread that owns the core runtime β targeting the contract, not
pi, keeps the dispatch-seam frontiers decoupled from that rewrite.Deferred
Runtime host/dispatch + a
piadapter wait until a real driver lands. Contract-first, zero behavior change.Co-authored-by: Amp amp@ampcode.com
π€ Generated with Claude Code