## Summary
The product tree still described research delivery, a merged handoff,
and a private model schedule as current work. This PR removes those
assets and leaves the current execution contracts in the module READMEs.
A new packaged desktop profile no longer turns Terminal on. The user
still starts the bundled Terminal by setting `terminalEnabled` to true.
The packaged Electron executable still launches `terminal.mjs`.
This PR is independent. Its base is `main` at `1892e9e070`.
## Request
The user asked to remove retired agent research so a maintainer who did
not join that work can understand the current system from the module
READMEs, the ADRs, and the code.
Scenario: AIRI desktop agent execution and the Terminal Beta
distribution on `main`.
Harness and model: Cursor, Grok 4.7.
## Change map
| Module | Before | After | Description |
| --- | --- | --- | --- |
| Desktop distribution | A Terminal Beta build used its own name,
profile, port, and update exemption, and turned Terminal on | The normal
AIRI package remains. A new profile leaves Terminal off | The Beta
release path is gone. `APP_USER_DATA_PATH` still selects a profile |
| Desktop Host approval | Ask, Auto, and Full lived beside research
notes | The desktop README states Ask, Auto, and Full | These modes do
not replace the service modes |
| Computer Use service | README mixed a demo script with service policy
| The service README states `actions`, `all`, and `never`, plus the
execution records and lifecycle limits | Public self-approval, workflow
approval, and CDP limits stay |
| Agent instructions | Root instructions pointed at a merged handoff and
a project memory file | Root instructions point at the four module
READMEs and `docs/ai/adr/` | The private model schedule is gone |
| Research notes | Convergence audits, proposals, and status diaries sat
in the product tree | Those files are deleted | Git history at
`1892e9e070` keeps them. `planning-orchestration/contract.ts` and its
test stay |
## Architecture and behavior
A new packaged profile creates `{ mcpServers: {} }` and does not start
Terminal. An existing or new config with `terminalEnabled: true` starts
`airi-terminal` through `process.execPath` and `terminal.mjs`.
The Desktop Host uses `ask`, `auto`, and `full`. The Computer Use
service uses `actions`, `all`, and `never`. One list does not replace
the other.
`modelDecision`, `authorization`, `execution`, and
`businessVerification` stay separate in the service README.
`contextCompaction` stays in the Core Agent README. A delivered input or
a zero exit code is not business completion. A lost response after
dispatch is `unknown` and sets `doNotReplay`.
## Boundaries and risks
| Invariant or boundary | Failure mode | Protection | Evidence or gap |
| --- | --- | --- | --- |
| New packaged profile leaves Terminal off | A Beta flag turns Terminal
on again | The default config no longer reads `AIRI_DISTRIBUTION` |
`keeps the bundled Terminal off in a new packaged profile` |
| Explicit Terminal enable still uses the packaged executable | The
start path switches to an external Node binary or stores an install path
| `applyAndRestart` still builds the bundled server from `execPath` and
the app path | `starts the bundled Terminal in a packaged app when
Terminal is enabled` |
| An existing `terminalEnabled: true` config still starts Terminal | A
config migration drops the flag | The manager still reads the saved flag
| Existing `writeConfigText` cases in `index.test.ts` |
| Steam, Flatpak, and Nix stay externally updated | The updater runs
inside a store install | `isExternallyUpdatedInstall` still matches
those three installs | `auto-updater.test.ts` |
| `APP_USER_DATA_PATH` still selects the profile | The launcher drops
the environment branch | The launcher still applies a non-empty
`APP_USER_DATA_PATH` before the instance lock | Source check only. No
unit test covers the launcher entry |
| Service approval stays `actions`, `all`, and `never` | Docs teach
maintainers to use only Ask, Auto, and Full | The two lists are in
different READMEs | Documentation review. No new service test |
## Verification
`pnpm -F @proj-airi/stage-tamagotchi exec vitest run --project node
src/main/services/airi/mcp-servers/index.test.ts
src/main/services/electron/auto-updater.test.ts`
Result: 2 files passed, 91 tests passed.
`pnpm -F @proj-airi/stage-tamagotchi typecheck`
Result: passed.
ESLint on the changed TypeScript files passed with 0 errors.
`electron-builder.config.ts` still has 2 existing comment-length
warnings.
`git grep` of the deleted paths in the branch found no remaining
references.
Not verified: a packaged Windows launch, a real-model Agent task, and
Compact continuity on a real model run. The full repository lint and the
full AIRI build did not run.
## Visual changes
Not applicable: this change does not alter a page, window, or layout.
Made with [Cursor](https://cursor.com)
---------
Co-authored-by: Cursor <cursoragent@cursor.com>
## 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>
* tmp commit
* now it works
* fix: various of type and import issues
* refactor: move test
* refactor: rename with stage- prefix
* refactor: all monorepo packages
* refactor: fix all build
* refactor: fix missing dep
* fix: remove unnecessary deps
* fix: netlify publish
* fix: hf space deploy
---------
Co-authored-by: LemonNeko <chheese048@gmail.com>