Skip to content

FE-867: Agent extension host β€” dual-mode (elicit/execute) pi-harness contract#213

Draft
kostandinang wants to merge 2 commits into
ka/fe-864-orchestrator-enhancementsfrom
ka/fe-867-agent-extension-host
Draft

FE-867: Agent extension host β€” dual-mode (elicit/execute) pi-harness contract#213
kostandinang wants to merge 2 commits into
ka/fe-864-orchestrator-enhancementsfrom
ka/fe-867-agent-extension-host

Conversation

@kostandinang

@kostandinang kostandinang commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

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, and flattenCapabilityIds.

          agent-extension-host (contract)
          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
          β”‚ CORE (mode-agnostic)            β”‚  ← runtime owned by the pi-harness thread
          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
            β–² loads plugins per mode
     β”Œβ”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
     β”‚ elicit       β”‚          β”‚ execute       β”‚
     β”‚ β†’ interview  β”‚          β”‚ β†’ cook        β”‚
     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Dependency-free and names no execute-only concept (slice/epic/plan/worktree/toolchain) β€” neutrality is a checkable invariant. Two-consumer proof, no runtime migration:

  • cook's execute surface matches createPiActions() ids exactly
  • the interview's elicit surface is witnessed against createExplorationTools() + a keyof InterviewerTools coverage check

Why?

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 pi adapter wait until a real driver lands. Contract-first, zero behavior change.

Co-authored-by: Amp amp@ampcode.com

πŸ€– Generated with Claude Code

@kostandinang kostandinang changed the title FE-867: agent-extension-host mode-neutral contract (slice 1) FE-867: Agent extension host β€” dual-mode (elicit/execute) pi-harness contract Jun 15, 2026
kostandinang and others added 2 commits June 15, 2026 16:12
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>
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