Repository navigation
feat(metaharness): AnyHarness metaharness skeleton + playground demo (W4) - #69
Merged
Merged
Conversation
…idge client AgentHarness/AgentSpec/Capabilities/HarnessRunInput contract (calca agent-core precedent), aiSdkHarness default impl over AI SDK ToolLoopAgent, typed BridgeOps table with inProcessBridge binding, and extensionTools() wiring bridge surfaces + the computer-only exec slot into the model via injected capabilities. Zero node:* imports.
Runs agent turns through aiSdkHarness with capability injection: unstorage fs storage, BYOK SecretPort over injected env, in-process demo bridge host with canned extensions, and a stubbed computer-only exec slot. node:* imports confined to src/cli.ts (argv/readline/stdout); @ai-sdk/openai-compatible is the one extra dep (BYOK provider adapter — ai ships none).
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
There was a problem hiding this comment.
Approved. Cursor Bugbot was not present on this PR after the first check poll, so that signal was skipped; no applicable approval policy requires human review, and there are no unresolved automated findings. Human review is not required for merge gating from this automation.
Sent by Cursor Approval Agent: Pull Request Router and Approver
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.


Summary
Workstream W4 from
.agents/plans/2026-10-07-v2-foundation.md: the AnyHarness metaharness skeleton — the minimal reference harness consumed entirely through our own extension model, doubling as e2e playground + SDK-outreach demo.Follows the calca
@calca/agent-corecontract-seam precedent (harness.ts~59 LOC):AgentHarness/AgentSpec/Capabilities/HarnessRunInput, AI SDKToolLoopAgentas the loop, capability injection where exec/fs/mcp slots are computer-only.Changes
packages/metaharness/(@any-harness/metaharness)src/harness.ts— contract seam:AgentHarness,AgentSpec,Capabilities,HarnessRunInput,StoragePort,SecretPort(BYOK),ExecPort(computer-only slot)src/bridge.ts— bridge protocol v0.1 client surface:BridgeOpstable typing all 8 pinned ops (capabilities.negotiate,extensions.list,extensions.get,hooks.invoke,commands.resolve,skills.materialize,tools.call,events.notify),BridgeClient,inProcessBridge()in-process binding,Extension/ExtensionKind/ManifestRefinterface pinssrc/ai-sdk.ts—aiSdkHarness(),ToolLoopAgentadapter forwarding per-runCapabilitiesinto each tool'soptions.contextsrc/tools.ts—extensionTools(): bridge surfaces (list_extensions,get_extension,call_extension_tool,resolve_command,materialize_skill) +computer_exec; everyexecutereads capabilities fromoptions.context— absent slots degrade instead of#ifdefingsrc/harness.test.ts— 4 vitest cases onMockLanguageModelV4: text streaming, capability injection via tool context, bridge tool wiring, computer-only degradationAGENTS.md— seam rules (isomorphic, interface-first, no harness logic, capabilities not globals)apps/playground/(@any-harness/playground)src/cli.ts— one-shot (--prompt) + REPL entry; the only file withnode:*imports (argv/readline/stdout)src/capabilities.ts— unstorage fs storage, BYOKSecretPortover injected env, stubbed computer-only execsrc/host.ts— in-process demo bridge host with canned extensions (commit-smithskill,echo-mcpMCP,reviewcommand)src/model.ts—createOpenAICompatibleoverAI_BASE_URL/AI_API_KEY/AI_MODEL_IDsrc/run.ts—streamTurn()normalizing stream parts for displayTest plan
pnpm --filter @any-harness/metaharness test— 4/4 passtsc --noEmitclean in metaharness + playground (stub packages have no tsconfig — pre-existing)list_extensions/call_extension_toolthrough the in-process bridge and renders resultsNotes
demoBridge()is canned data, not a store.ai(catalog) in metaharness; playground addsunstorage(catalog) +@ai-sdk/openai-compatible@^3— the one non-catalog dep, justified:aiships no provider adapter and BYOK demo needs one.@ai-sdk/provideris devDep-only (test types for the mock model).pnpm testat root still fails on the cli/sdk/spec stubs ("no test files") — pre-existing scaffold state, CI marks testcontinue-on-error.pnpm-lock.yamlcommitted (repo had none; CI installs--frozen-lockfile).Link to Devin session: https://app.devin.ai/sessions/fd3e78041312436aa9f8d235e293d94a
Open in Devin Desktop: https://app.devin.ai/desktop/session/fd3e78041312436aa9f8d235e293d94a?variant=devin
Requested by: @espetro