How toss/apps-in-toss-harness works
This monorepo provides an AI-agent harness for building and operating Apps-in-Toss miniapps, with agent-plugin workflows, browser-side debug attachment, and a debugger MCP server/test runner. The README documents scaffolding, local mock development, device testing, launch review, and console registration; those workflow capabilities are represented even where their skill implementation is not in the supplied tree. Source excerpts support debugger attachment and tool flow, but not detailed plugin skill-to-console calls, so those links are documented or left unverified.
Main entry points: agent-plugin ait orchestrator · attach-orchestrator.ts Attach orchestration · server.ts Debugger MCP server · cli.ts Device test CLI
Components 29
Agent workflow
- ait orchestrator
packages/agent-plugin - Miniapp scaffold
packages/agent-plugin/shared/templates/react-vite/src/App.tsx - Local mock dev
packages/debugger/src/mcp/server.ts - Docs and console MCPs
- Device bundle check
packages/agent-plugin - Launch review
packages/agent-plugin
Device debugging
- Debug setup
packages/agent-plugin - In-app attach gate
packages/debug-console/src/gate.ts - Chii target injection
packages/debug-console/src/attach.ts - Attach handshake
shared/internal-protocol/src/attach-handshake.ts - Bridge observer
shared/internal-protocol/src/bridge-observer-state.ts
Debugger runtime
- Debugger MCP server
packages/debugger/src/mcp/server.ts - Debug tools
packages/debugger/src/mcp/tools.ts - Attach orchestration
packages/debugger/src/mcp/attach-orchestrator.ts - Attach timeline
packages/debugger/src/mcp/attach-timeline.ts - QR dashboard server
packages/debugger/src/mcp/qr-http-server.ts - TOTP auth
packages/debugger/src/mcp/totp.ts - Relay tunnel
packages/debugger/src/mcp/tunnel.ts - CDP connection
packages/debugger/src/mcp/cdp-connection.ts - Chii connection
packages/debugger/src/mcp/chii-connection.ts - AIT data source
packages/debugger/src/mcp/ait-source.ts
Device test runner
- Device test CLI
packages/debugger/src/test-runner/cli.ts - Relay test worker
packages/debugger/src/test-runner/relay-worker.ts - Permission preflight
packages/debugger/src/test-runner/cell.ts - Test reports
packages/debugger/src/test-runner/report.ts
Other components
- AI agent user
- Apps-in-Toss console
- Debugging agent
- Miniapp test files
Connections 27
- AI agent user → ait orchestrator: requests workflow
README.md - ait orchestrator → Miniapp scaffold: creates project
README.md - ait orchestrator → Local mock dev: guides development
README.md - ait orchestrator → Docs and console MCPs: uses MCP services
README.md - ait orchestrator → Device bundle check: guides device test
README.md - Device bundle check → Apps-in-Toss console: uploads bundle
README.md - ait orchestrator → Launch review: guides launch review
README.md - Launch review → Apps-in-Toss console: submits after approval
README.md - AI agent user → Debug setup: requests setup
README.md - Debug setup → Debugger MCP server: wires debugger
README.md - In-app attach gate → Chii target injection: gates attachment
packages/debug-console/src/index.ts - Chii target injection → Attach handshake: reports version
packages/debug-console/src/attach.ts - Chii target injection → Bridge observer: observes bridge
- Debugging agent → Debugger MCP server: requests debug
README.md - Debugger MCP server → Debug tools: dispatches tools
packages/debugger/src/mcp/server.ts - Debugger MCP server → AIT data source: reads mock state
packages/debugger/src/mcp/server.ts - Debug tools → CDP connection: reads CDP data
packages/debugger/src/mcp/tools.ts - Attach orchestration → TOTP auth: generates codes
packages/debugger/src/mcp/attach-orchestrator.ts - Attach orchestration → Relay tunnel: renders attach QR
packages/debugger/src/mcp/attach-orchestrator.ts - Attach orchestration → QR dashboard server: serves dashboard
packages/debugger/src/mcp/attach-orchestrator.ts - Attach orchestration → Attach timeline: records stages
packages/debugger/src/mcp/attach-orchestrator.ts - Chii connection → CDP connection: implements connection
packages/debugger/src/mcp/chii-connection.ts - Device test CLI → Relay test worker: runs files
packages/debugger/src/test-runner/cli.ts - Device test CLI → Miniapp test files: discovers tests
packages/debugger/src/test-runner/cli.ts - Relay test worker → Permission preflight: checks permissions
packages/debugger/src/test-runner/relay-worker.ts - Relay test worker → CDP connection: evaluates over CDP
packages/debugger/src/test-runner/relay-worker.ts - Device test CLI → Test reports: writes reports
packages/debugger/src/test-runner/cli.ts