SDK v2 reference agents: bundle the SDK
Finish (Task 7282) of epic 7188. The epic's reference agents must run. Supersedes draft 7460.
## Reproduction (Task 7281 on dev)
- Registered "Echo (Python)" and "Echo (TypeScript)" from jaah-ai/agent-sdk develop @ fe6889ae5e (subpaths examples/python and examples/typescript). The snapshot bundles are 670 and 981 bytes.
- Dev tasks 5092 and 5093 ended "broken session: unknown — connection closed" with 0 ACP events.
## Cause (read-only recon)
The v2 contract says the bundle carries the SDK, because the node installs nothing (tools/manifest_check.py:14-16; ADR-0159). The examples do not carry it:
- packages/agent-sdk/examples/python holds only agent.py and jaah-agent.toml. Line 2 of that toml says `jaah_agent` must be vendored.
- examples/typescript/package.json:9 depends on `file:../../typescript`, a symlink outside the agent root. apps/api/app/agent_bundles.py:183-220 (`_cut_root`) drops symlinks.
- Nothing adds the SDK to the engine path: apps/jaahd/agent_process.py:455-476 and apps/jaahd/acp/host.py:385-393.
- tools/manifest_check.py:407-408 skips the SDK check for v2, so registration accepted these broken bundles.
## Fix
- Make each reference agent self-contained inside its own folder: a vendored `jaah_agent` package, plus any non-stdlib dependency, beside agent.py, and a TS build with no symlinked dependency.
- Keep the vendored copy single-homed. Generate it from packages/agent-sdk with a check that fails on drift; never hand-copy it.
- Make tools/manifest_check.py fail a v2 bundle whose `command` imports an SDK the bundle does not carry, so registration refuses the bundle instead of the launch failing.
Out of scope: v1 connectors and the v1 supervisor; injecting the SDK from the node (that contradicts the v2 contract); registry agents (Task 7429); publishing the packages.
Done means:
- On dev, a task bound to "Echo (Python)" and one bound to "Echo (TypeScript)" each reach `done`, with ACP events in Agent activity.
- packages/agent-sdk conformance and the manifest_check tests cover the bundle carrying its SDK and the refusal of a bundle that lacks it.
Required checks: ./dc check full
Outcome
Reference agents now carry their SDK (vendored Python, bundled TS, drift-checked); registration refuses v2 bundles lacking it. PR #6030 merged, quick+changed-area tests green. Dev oracle blocked by 7467 (session vanished) and new draft 7506 (MicroVM VM not registered).
Artifacts
Activity
- Ready
- Runner started
- Runner ended (done)