Commit Graph
1418 Commits
Author SHA1 Message Date
Neko Ayaka 0f0d88a8aa chore(stage-ui,stage-tamagotchi): removed useless 2026-04-25 06:34:55 +08:00
刘梓恒 d7402ade9f feat(stage-tamagotchi,stage-ui,computer-use-mcp): intro agent-owned session and ghost pointer phases (#1649) 2026-04-25 04:14:33 +08:00
Asish Kumar 4b133b169f fix(stage-tamagotchi): render server-channel QR always as dark-on-light (#1725) 2026-04-25 04:05:29 +08:00
Asish Kumar fe568e8e99 fix(stage-tamagotchi): show friendly empty state when widgets window has no id (#1726) 2026-04-25 04:04:17 +08:00
Lilia_Chenandautofix-ci[bot] c6c0494998 feat(stage-tamagotchi-godot): add Godot stage G0 sidecar preview (#1724)
## Summary

Add the G0 Godot Stage sidecar preview for `stage-tamagotchi`.

## Design

- Keep Electron as the desktop host and run Godot as a separate sidecar
window by design.
- Use the settings window as the entry point for starting/stopping the
experimental Godot Stage.
- Require explicit `GODOT4` in development mode instead of
auto-discovering local Godot installs.
- Use the packaged sidecar under `process.resourcesPath/godot-stage` in
the packaged runtime.
- Close the Godot WebSocket lifecycle channel on startup failure and
stage shutdown.

## Changes

- Add the Electron main-side Godot Stage lifecycle service.
- Add renderer/settings wiring for switching to the experimental Godot
Stage.
- Add the minimal Godot stage runtime skeleton and WebSocket handshake
path.
- Add Godot export presets for sidecar builds.
- Add sidecar path verification for the Godot export preset and
`electron-builder` resource contract.
- Document the development runtime setup and packaging expectations.

## CI/CD

- Align Godot CI to `4.6.2`.
- Add Linux Godot export smoke coverage as the fastest CI export path.
- Add sidecar contract verification to CI.
- Run packaged sidecar verification after `electron-builder --dir`.

CD is intentionally deferred in this PR. The release workflow still
needs a later step to export the Godot sidecar before packaging release
artefacts.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-25 00:56:03 +08:00
刘梓恒 255ce71cba feat(stage-tamagotchi,computer-use-mcp): implement browser-native DOM action routing (#1648)
---------

Co-authored-by-agent: Antigravity <antigravity@gemini.com>
Co-authored-by-agent: Codex <267193182+codex@users.noreply.github.com>
2026-04-25 00:08:22 +08:00
刘梓恒 632aa1ad99 [1/3] feat(desktop): add desktop observation and overlay baseline (#1647)
---------

Co-authored-by-agent: Antigravity <antigravity@gemini.com>
Co-authored-by-agent: Codex <267193182+codex@users.noreply.github.com>
2026-04-24 23:43:40 +08:00
Richard Pinedo 4e6da5ef04 feat(stage-*): port artistry & chatbox enhancements (#1636)
Co-authored-by-agent: Unknown <unknown@example.com>
2026-04-24 23:25:04 +08:00
Neko Ayaka 3cc9c87b0f fix(stage-tamagotchi): stage widget tool was broken 2026-04-24 04:12:26 +08:00
Neko Ayaka 47074021c0 chore(deps): updated eventa 2026-04-24 04:12:25 +08:00
fbd779563d fix(stage-web): remove duplicate page for route /devtools (#1677)
## Description

<!-- Please insert your description here and especially provide info
about the "what" this PR is solving -->

`vue-router` is producing a warning about duplicate route `/devtools` on
`stage-web`. Removing `stage-web/src/pages/devtools/index.vue` resolves
the warning.
There is a duplicate route introduced in
`stage-pages/src/pages/devtools/index.vue`. The file in `stage-web` is
removed in favor of the one in `stage-pages`.
related commit
[`44ec5e4`](https://github.com/moeru-ai/airi/commit/44ec5e416c04ab6fe1d39f01f67330703078439d)

## Linked Issues

<!-- Optional, if you have any -->

## Additional Context

<!-- e.g. is there anything you'd like reviewers to focus on? -->

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Neko <neko@ayaka.moe>
2026-04-23 22:22:31 +08:00
Neko Ayaka a3249ccd68 feat(stage-tamagotchi,stage-ui,ui): input should not flink, added retry for errored item, adjusted button 2026-04-23 01:09:46 +08:00
Neko Ayaka ca4c99f074 fix(stage-pages,stage-ui): plugin host update 2026-04-22 14:23:45 +08:00
Lulu e165829b19 fix(server): trust https localhost and loopback for mkcert Vite dev (#1691) 2026-04-22 14:02:20 +08:00
22b0d27001 fix(stage-tamagotchi): hide chat input scrollbar when content fits (#1687)
---------

Co-authored-by: octo-patch <octo-patch@github.com>
Co-authored-by: ximi-helper <ximi-helper@octo-patch.com>
2026-04-22 14:00:12 +08:00
Neko Ayaka 8603d8cd7a fix(stage-tamagotchi): fix test 2026-04-22 13:52:40 +08:00
Neko Ayaka 509c00d9a5 feat(plugin-sdk,stage-tamagotchi): rework of plugin structure, integrated kits api, now plugin manifest is plugin.airi.json 2026-04-22 13:52:11 +08:00
Neko Ayaka 5bbf9559a4 refactor(stage-ui,stage-tamagotchi): have plugin-tools, mcp-tools to register directly to llm.ts 2026-04-22 03:34:40 +08:00
DrHuangMHT 7e4486c068 chore(ci): fix typecheck on navigator.gpu (#1700) 2026-04-21 20:27:17 +08:00
Neko Ayaka a406ffb67c feat(stage-tamagotchi): widget now supports customizable ui from plugin/extension 2026-04-21 02:23:34 +08:00
Neko Ayaka 033e76c2f1 feat(stage-tamagotchi): built-in local loopback http server 2026-04-20 20:39:12 +08:00
Neko Ayaka d2d5493136 fix(stage-tamagotchi): concurrent apply and auto-heal will have conflicts 2026-04-18 19:26:22 +08:00
Neko Ayaka 2ab21879dd chore(deps): bump dependencies 2026-04-18 19:18:17 +08:00
RainbowBird 8967bbe211 feat(server): add TTS support with per-character billing 2026-04-17 02:59:14 +08:00
RainbowBird 57533044f7 feat(server): add gateway and model configuration to environment variables 2026-04-17 02:59:14 +08:00
RainbowBird a11727020a feat(server/billing): implement debt ledger for TTS service using FluxMeter 2026-04-17 02:59:14 +08:00
Neko Ayaka 1258c246d5 chore: updated 2026-04-16 23:21:45 +08:00
autofix-ci[bot] 25aec906dc [autofix.ci] apply automated fixes 2026-04-16 22:58:10 +08:00
Nekoandgemini-code-assist[bot] 9b4ef8862b Apply suggestion from @gemini-code-assist[bot]
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-04-16 22:58:10 +08:00
Jensen Huang c14e9547d9 feat(stage-tamagotchi): improve updater cleanup lane and admin diagnostics 2026-04-16 22:58:10 +08:00
Jensen Huang 1a11409b1e fix(stage-tamagotchi): use electron cache path for updater cleanup 2026-04-16 22:58:09 +08:00
Jensen Huang 026168044e fix(stage-tamagotchi): updater regressions, downgrade warnings, and cross-platform cache cleanup
- Fixed architecture-sensitive updater tests (26/26 passing)
- Added downgrade-warning UI via semver comparison
- Restored Windows custom log path and implemented cross-platform cache cleanup
- Made updater diagnostics always-on (no gating)
2026-04-16 22:55:54 +08:00
Neko Ayaka 499617e436 fix(stage-tamagotchi): chat sync broken for cross window 2026-04-16 16:58:31 +08:00
Makito 25f5684feb fix(stage-tamagotchi): suppress "conflicting files found for route" warnings 2026-04-16 01:35:15 +09:00
DrHuangMHT 9d5c9e9332 chore(deps): remove deprecated unplugin-vue-router (#1664) 2026-04-15 15:02:10 +08:00
akrlin e75b6618b3 fix(stage-ui,i18n) fix a bug when change language (#1666) 2026-04-15 14:47:26 +08:00
Neko Ayaka f286464e03 chore(deps): bump dependencies 2026-04-15 14:44:59 +08:00
Neko Ayaka 6d68cfbd92 refactor(stage-web,ui-server-auth): better ui of auth 2026-04-15 04:32:19 +08:00
Makito 4f28b40b9f fix(stage-tamagotchi): correctly use devtools window params 2026-04-15 02:17:10 +09:00
Makito a620c2395b feat(stage-tamagotchi,i18n,stage-pages): localize IO Tracer title and update route metadata 2026-04-15 02:17:10 +09:00
Makito b0b48840ec feat(stage-tamagotchi,stage-pages): initialize IO trace viewer 2026-04-15 02:17:10 +09:00
Makito 3d35d492ba feat(stage-tamagotchi): support detached devtools window with params 2026-04-14 02:21:10 +09:00
Makito 1744ceaa06 fix(stage-tamagotchi): open devtools for beat sync in detach mode 2026-04-14 00:57:38 +09:00
147d077aa7 feat(inference): unify and optimize WebGPU inference pipeline (#1622)
## Problem

The WebGPU inference pipeline had several structural issues:

1. **No unified protocol** — Kokoro TTS, Whisper ASR, and Background
Removal workers each used their own ad-hoc message formats. Adding a new
model meant reinventing worker communication from scratch.
2. **Infrastructure existed but was disconnected** —
`GPUResourceCoordinator`, `LoadQueue`, `InferenceWorkerManager`, and
`protocol.ts` were all implemented but had zero consumers. The adapters
duplicated the same lifecycle/timeout/mutex patterns independently.
3. **Performance gaps** — Kokoro only offered fp32 on WebGPU (no fp16),
Whisper warm-up compiled shaders for 187.5s of dummy audio, audio
transfer went through unnecessary WAV blob encode/decode, and
`listVoices` reloaded the model every time.
4. **Silent failures** — Whisper worker's `generate()` had no try-catch;
errors were swallowed and the main thread waited until timeout.
5. **No graceful degradation** — Whisper and Background Removal workers
hardcoded `device: 'webgpu'` with no WASM fallback.
6. **No observability** — Only Kokoro had performance tracing. No
adapter reported status to `useInferenceStatus`. No cache management UI
existed.
7. **Dead code accumulation** — Old `KokoroWorkerManager` (232 lines),
legacy Whisper message types, and scattered duplicate constants.

## Changes

### Phase 0 — Critical Performance & Bugs
- Add `fp16-webgpu` dtype for Kokoro TTS (~2x inference speed on
supported GPUs)
- Fix Whisper warm-up tensor from `[1, 128, 3000]` → `[1, 128, 1]`
(minimal shader compilation)
- Fix Whisper worker silent error bug (add try-catch to `generate()` and
`load()`)

### Phase 1 — Data Transfer & Caching
- Switch Kokoro audio to Float32Array transferable (skip WAV blob encode
in worker, lightweight WAV encode on main thread)
- Cache `listVoices` results (skip redundant model reload when adapter
state is `ready`)
- Normalize progress reporting to 0-100 across all adapters,
differentiate `warmup` phase

### Phase 2 — Protocol Unification & Infrastructure
- Migrate all 3 workers + 3 adapters to unified `protocol.ts` message
types (`load-model`, `run-inference`, `model-ready`, `inference-result`,
`progress`, `error`)
- Wire `GPUResourceCoordinator` into all adapters (VRAM allocation
tracking, LRU ordering, memory pressure events)
- Wire `LoadQueue` into all adapters (priority-based sequential model
loading: TTS=10 > ASR=5 > BG_REMOVAL=1)
- Add `coordinator.ts` global singleton for GPU coordinator + load queue
- Add WebGPU detection + WASM fallback in Whisper and Background Removal
workers

### Phase 3 — Error Recovery & Observability
- Add restart logic with exponential backoff to Whisper adapter
(matching Kokoro's existing pattern)
- Integrate `classifyError()` (OOM / DEVICE_LOST / TIMEOUT
classification) in Whisper adapter
- Extend `defaultPerfTracer` to Whisper `transcribe()` and Background
Removal `processImage()`
- Wire `useInferenceStatus` into all 3 adapters (downloading → ready →
terminated lifecycle)

### Phase 4 — Tests
- Add unit tests for `AsyncMutex` (4 tests), `LoadQueue` (4 tests),
`GPUResourceCoordinator` (7 tests) — all 15 passing

### Phase 5 — Cleanup & Features
- Delete old `KokoroWorkerManager` (232 lines, zero consumers)
- Delete orphaned `libs/workers/types.ts` (old Whisper message types)
- Clean up `workers/kokoro/types.ts` (remove legacy message types, keep
domain types)
- Create centralized `constants.ts` (MODEL_IDS, MODEL_NAMES, TIMEOUTS,
MAX_RESTARTS)
- Remove hardcoded WebGPU check from background-removal devtools pages
(worker auto-detects)
- Add `useModelPreload` composable for generic idle-time preloading
- Add `useInferencePreload` composable that reads provider config and
preloads configured local models
- Wire preloading into both `stage-web` and `stage-tamagotchi` App.vue
(Kokoro TTS preloads 3s after init)
- Add `ModelCacheManager.vue` settings component (cache size display,
per-model status, clear cache)
- Document GPU Device isolation architecture in protocol.ts

## After This PR

- All inference workers speak the same protocol → adding a new model
adapter is straightforward
- GPU memory is tracked across all models with automatic pressure
warnings at 80%/95% of VRAM budget
- Models load sequentially via priority queue → no bandwidth/VRAM
contention
- Workers auto-detect WebGPU and fall back to WASM → works on browsers
without WebGPU
- Kokoro TTS preloads during idle time → "instant" first use for
configured users
- All adapters auto-restart on worker crashes (max 3 attempts,
exponential backoff)
- 15 unit tests cover core infrastructure (mutex, queue, coordinator)
- Zero dead code remains in the inference pipeline

## Test Plan

- [x] `pnpm exec vitest run packages/stage-ui/src/libs/inference/` — 15
tests pass
- [x] `pnpm -F @proj-airi/stage-ui exec tsc --noEmit` — no TypeScript
errors
- [x] `pnpm lint:fix` — no lint errors in changed files
- [ ] Manual: verify Kokoro TTS works with fp16-webgpu on a supported
browser
- [ ] Manual: verify Whisper ASR loads and transcribes correctly
- [ ] Manual: verify Background Removal works in devtools page
- [ ] Manual: verify preloading triggers in console (`[Preload] Loading
kokoro-...`)

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-13 23:19:27 +08:00
RainbowBird fc0ad03411 feat(server): require BETTER_AUTH_SECRET and pass it explicitly to betterAuth
Without a stable secret, better-auth generates a random one per process,
which invalidates every session cookie and JWKS private key on redeploy
and across multi-instance deployments. Make it a required env var and
wire it into betterAuth({ secret }) explicitly so missing config fails
fast at boot instead of silently rotating keys.
2026-04-13 18:13:19 +08:00
yiduoyide 7309fcd358 fix(stage-tamagotchi): fix window title (#1639) 2026-04-13 14:31:30 +08:00
RainbowBird 671517864a feat(flux): update transaction stats to use capacity from latest credit/initial transaction 2026-04-12 04:52:42 +08:00
RainbowBird 93888e6935 feat(server): use stripe product as flux pricing (#1640) 2026-04-12 04:32:42 +08:00
Neko Ayaka b77a1af2c8 chore(stage-tamagotchi): improve widget calling devtools 2026-04-11 05:21:46 +08:00
Neko Ayaka b18158bce2 chore(computer-use-mcp): remove all hardcoded file path 2026-04-11 05:13:55 +08:00