## Summary
Ships Host-owned Computer Use and Terminal for Stage Tamagotchi, plus
conversation Compact and a Context Inspector for send projections.
- Bundled MCP runs under Main approval and Turbo.
- Compact schedules when the soft budget is crossed.
- Context Inspector shows the last projected send by section.
This PR also carries related analytics and dependency sync from earlier
rebase work. Those are not the review focus.
## Context
- Request: Land Computer Use MCP, Terminal approval, Compact, and
Context Inspector on current `main`, clear review findings that block
honest execution state, and keep the PR reviewable.
- Scenario: Tamagotchi chat can observe and change the desktop or run
Terminal commands through the Host, with approval or Turbo.
- Scope: Do not treat this as ready for merge yet. Known product limits
stay documented below. Follow-up can harden budgets and Linux executors.
- Source: https://github.com/moeru-ai/airi/pull/3496
## Known limits
These are current product limits on this branch. They are recorded for
review clarity. They are not a demand that maintainers accept them as
final product policy.
| Limit | Behavior now |
| --- | --- |
| Conversation Compact | Soft limit only. Crossing it schedules Compact.
Sends are not hard-rejected. |
| MCP session budget | Default `maxOperations` is 80. The session
counter does not renew. |
| Turbo | No TTL. It stays on for that chat window and session until the
user turns it off. |
| Linux bundled executor | Non-Windows, non-macOS hosts use `dry-run`.
Actions report `performed: false` and do not touch the desktop. |
## Change map
| Module | Before | After | Description |
| --- | --- | --- | --- |
| `services/computer-use-mcp` | Separate service surface | Bundled Host
tools with policy and Terminal lanes | Owns prepare, approve, execute,
and session budget |
| `apps/stage-tamagotchi` Main MCP host | External Terminal assumptions
| Bundled Terminal plus Computer Use approval | Picks platform executor,
binds approvals, returns `doNotReplay` after dispatch failures |
| `packages/stage-ui` chat / tools | Send-only Host admission | Rerun
hooks and MCP exposure defaults | Host can admit a rerun under a fresh
turn id |
| `packages/core-agent` Compact | Soft budget helpers | Soft Compact
scheduling kept | Hard reject is out of scope for this PR |
| Context Inspector | None | Last-send projection breakdown | Tamagotchi
chat can inspect projected sections |
## Verification
- Head `06da0320c` CI run
https://github.com/moeru-ai/airi/actions/runs/44509127823: Lint, Type
Check, Unit Test, Build, and Human Attestation passed.
- Local: `pnpm -F @proj-airi/stage-tamagotchi exec vitest run
src/main/services/airi/mcp-servers/index.test.ts` → 36 passed.
- Local: `pnpm -F @proj-airi/stage-ui exec vitest run
src/tools/mcp.test.ts` → 19 passed.
- Host post-dispatch failures return `status: unknown` with
`doNotReplay: true`. Pre-dispatch cancel returns `cancelled` without
`doNotReplay`. `createMcpTools` preserves that structured content.
`MCP_AGENT_EXECUTION_PROMPT` tells the model not to repeat a lost or
unclear result.
## UI evidence
<img width="951" height="1225" alt="image"
src="https://github.com/user-attachments/assets/0c9092ad-1969-4dbf-bcf6-392205c6e661"
/>
<img width="951" height="1225" alt="image"
src="https://github.com/user-attachments/assets/2dda6f95-6bfc-4eab-9fa5-f080dfa73016"
/>
<img width="576" height="508" alt="image"
src="https://github.com/user-attachments/assets/0d3a061e-6f07-49b2-85e0-fe8c48d2f624"
/>
## Agent
- Harness: Cursor
- Model: Composer
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>