Commit graph

18 commits

Author SHA1 Message Date
刘梓恒
88d526daed
chore: remove retired agent research from the product tree (#3612)
## 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>
2026-11-24 17:33:29 +00:00
刘梓恒
3aa466f98c
feat: integrate computer-use MCP, terminal approval, and conversation compact (#3496)
## 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>
2026-11-20 03:08:09 +08:00
Neko
e9251fc356
chore(docs): move the documentation site to moeru-ai/airi-docs (#2924) 2026-10-12 14:30:33 +08:00
RainbowBird
45b8670e63
test(stage-ui): add shared component stories and adoption audit (#2854)
Some checks are pending
CI / Lint (push) Waiting to run
CI / Build Test (stage-tamagotchi) (push) Waiting to run
CI / Build Test (stage-tamagotchi-godot) (push) Waiting to run
CI / Build Test (stage-web) (push) Waiting to run
CI / Build Test (ui-loading-screens) (push) Waiting to run
CI / Build Test (ui-transitions) (push) Waiting to run
CI / Unit Test (push) Waiting to run
CI / Type Check (push) Waiting to run
CI / Check Provenance (push) Waiting to run
Crowdin upload changed translations / upload-translations-to-crowdin (push) Waiting to run
Cloudflare Pages (Auth UI) / Deploy - ui-server-auth (push) Waiting to run
Cloudflare Workers / Deploy - stage-web (push) Waiting to run
E2E Test - Tamagotchi (Linux) / X11 window render (Xvfb) (push) Waiting to run
E2E Test - Tamagotchi (Linux) / Wayland window render (weston headless) (push) Waiting to run
2026-10-08 03:25:22 +08:00
Neko Ayaka
146b3da65a Revert "style: lint"
This reverts commit 98f40d7d0b.
2026-08-26 20:13:10 +08:00
Neko Ayaka
98f40d7d0b
style: lint 2026-08-26 19:49:58 +08:00
Lovehsigure_520
4549be1601
chore(ci): resolve OpenCollective 401 in sponsors workflow (#1843) 2026-05-19 19:11:03 +08:00
Neko Ayaka
9bd0744290
chore(workspace): thanks to Discord user saltstar, here is some util script for loc on package level 2026-03-09 22:23:59 +08:00
Neko Ayaka
50e05b114b
chore(*): use @moeru/std & cleanup code, rename 2025-06-23 15:34:07 +08:00
Neko
acf0d63ae0
refactor: have stage-ui dedicated (#11)
* 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>
2025-01-09 20:41:53 +08:00
Neko Ayaka
ee4878710e
chore: to monorepo 2024-12-03 16:07:57 +08:00
Neko Ayaka
6a4b27409b
chore: build
Signed-off-by: Neko Ayaka <neko@ayaka.moe>
2024-12-03 13:50:18 +08:00
Neko Ayaka
cd0f371595
chore: migrate to spa 2024-12-03 13:11:43 +08:00
Neko Ayaka
cf1f1fe038
chore: cleanup
Signed-off-by: Neko Ayaka <neko@ayaka.moe>
2024-12-03 13:06:39 +08:00
Neko Ayaka
be4cbce93e
chore: migrate with new structure 2024-12-02 20:49:31 +08:00
Neko Ayaka
a282115d78
chore: configure rules for static assets 2024-12-02 20:49:24 +08:00
Neko Ayaka
43623a6d3f
feat: automation for models downloading 2024-12-02 14:59:13 +08:00
Neko Ayaka
330c6c0008
chore: bump dependencies, added script to download live2d sdk 2024-12-02 13:55:49 +08:00