Commit Graph
3773 Commits
Author SHA1 Message Date
RainbowBird a860583c1d fix(server): build 2026-05-14 16:23:40 +08:00
Lulu 98b1b9c34f feat(server): env-based trusted origins for Capacitor dev (#1763)
## Description

Adds optional env **`ADDITIONAL_TRUSTED_ORIGINS`**: comma-separated
browser origins that are trusted for **CORS (`/api/*`)**, **Stripe
return URLs**, **Better Auth `trustedOrigins`**, and **dynamic web OIDC
redirect URIs**.

LAN / non-localhost Capacitor dev (e.g. Pocket + Vite on
`https://10.x:5273`) no longer relies on broad private-IP regex;
operators list exact origins in `.env.local` and restart the API server
after changes.

## Linked Issues

<!-- N/A -->

## Additional Context

Pocket iOS dev workflow: `cap`/`capacitor.config` often points at a LAN
HTTPS origin; without this allowlist the API rejects those
`Origin`/`Referer`/`redirect_uri` bases. Review can stay focused on
**`apps/server/src/libs/env.ts`**,
**`apps/server/src/utils/origin.ts`**, and wiring in **`app.ts`**,
**Stripe**, **auth routes**.
2026-05-14 16:17:13 +08:00
hahaqwq ab7ca0ef58 feat(auth): add new redirect URI for deep linking in trusted client (#1796) 2026-05-14 16:12:30 +08:00
Neko 541b9fa53c fix(server-runtime): ignore duplicate websocket listener (#1829) 2026-05-14 01:53:41 +08:00
duyua9and刘梓恒 5ab8b0e33e fix(computer-use-mcp): bound terminal output capture (#1802)
## Summary
- cap local `terminal_exec` stdout/stderr capture at a fixed per-stream
limit
- report whether each stream was truncated, along with the original
captured length
- add runner coverage for commands that emit large stdout and stderr
payloads

## Why
The local shell runner currently appends stdout/stderr without a
boundary before returning `TerminalCommandResult`. Large command output
can grow the MCP response and stored terminal state far beyond what is
useful for the agent.

This keeps command execution semantics the same while bounding the
returned text and making truncation explicit to callers.

## Tests
- `pnpm -F @proj-airi/computer-use-mcp test --
src/terminal/runner.test.ts`
- `pnpm -F @proj-airi/computer-use-mcp typecheck`
- `git diff --check origin/main...HEAD`

Co-authored-by: 刘梓恒 <160735726+3361559784@users.noreply.github.com>
2026-05-13 12:47:57 +08:00
ArkandNeko a161badad8 feat(stage-ui): add copy feedback to chat action menu (#1689)
---------

Co-authored-by: Neko <neko@ayaka.moe>
Co-authored-by-agent: Unknown <unknown@example.com>
2026-05-13 12:39:44 +08:00
刘梓恒 746e486628 feat(computer-use-mcp): add background desktop scheduler (#1805) 2026-05-13 12:16:39 +08:00
Asish Kumar cb30e41dc6 fix(stage-tamagotchi): shorten websocket status tooltip (#1822) 2026-05-13 12:11:13 +08:00
felix tremblayandautofix-ci[bot] 7b7fb0f238 fix(stage-ui-live2d): prevent motions from overriding lip sync mouth values (#1783)
---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by-agent: Unknown <unknown@example.com>
2026-05-13 12:10:03 +08:00
刘梓恒 aec5486c51 test(computer-use-mcp): add desktop v3 smoke coverage (#1780) 2026-05-13 12:08:38 +08:00
LiaoZiqi-GZFLS 0086eee9d6 fix(stage-tamagotchi): language persistence electron fix for #1658 (#1812) 2026-05-13 12:07:25 +08:00
Doji 2c432fc1c8 refactor(stage-web,stage-ui): replace warpdrive plugin with unplugin-basemove (#1818) 2026-05-13 12:03:30 +08:00
Nashchennc e882ba7dd6 feat(core-agent): harden registry buckets and bridge ingest isolation (#1819) 2026-05-13 12:02:35 +08:00
刘梓恒 fdb8309559 chore(computer-use-mcp): added docs defining plast-mem plugin (#1779) 2026-05-13 11:59:06 +08:00
刘梓恒 5182a4a492 test(computer-use-mcp): define planning orchestration contract (#1778) 2026-05-13 11:58:35 +08:00
刘梓恒 4fcf494822 chore(computer-use-mcp): added docs defining mimic baseline training boundary (#1777) 2026-05-13 11:57:18 +08:00
刘梓恒 f81e116022 feat(computer-use-mcp): add terminal screen heuristics (#1738) 2026-05-13 11:56:09 +08:00
刘梓恒 cad10ca090 chore(computer-use-mcp): added architecture docs outlining airi cli chafa (#1735) 2026-05-13 11:55:33 +08:00
github-actions[bot]andCrowdin Bot 3b3c5f6aaf chore(i18n): update translations (#1813)
This PR contains updated translations from Crowdin. Created from [GitHub
Actions](https://github.com/moeru-ai/airi/blob/main/.github/workflows/crowdin-cron-sync.yml).

You can review the source of translations
[here](https://crowdin.com/project/proj-airi)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2026-05-12 23:13:33 +08:00
RainbowBird 272cdae03b feat(server/otel): restructure observability metrics and add active sessions gauge
- Moved RateLimitMetrics import path to a more centralized location.
- Introduced a new file for active sessions gauge to track user sessions in the database.
- Updated index.ts to include new metrics and ensure proper initialization of observability metrics.
- Modified various routes and services to utilize the new observability structure.
- Added smoke tests for HTTP and WebSocket metrics to ensure proper metric registration and functionality.
- Enhanced error handling for metrics reading failures to improve observability.
2026-05-12 23:10:13 +08:00
Lovehsigure_520 84bff1f757 chore(docs): keep AtomGit acknowledgement in Chinese README (#1825)
## Summary
- keep the AtomGit/GitCode acknowledgement only in the Simplified
Chinese README
- remove the same acknowledgement from other translated README files

## Checks
- `git diff --check upstream/main...HEAD`
2026-05-12 18:09:30 +08:00
Lovehsigure_520andautofix-ci[bot] 02f07e0f70 chore(docs): acknowledge AtomGit hosting (#1817)
## Summary
- add AtomGit to the README acknowledgements across all translated
README files
- keep the mention in acknowledgements instead of the top project
intro/download area

## Checks
- `git diff --check -- README.md docs/README.zh-CN.md
docs/README.ja-JP.md docs/README.ru-RU.md docs/README.vi.md
docs/README.fr.md docs/README.ko-KR.md`

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-05-12 16:25:45 +08:00
icefair c641f86002 chore(docs): introduced new 0.10.2 features (#1816) 2026-05-11 17:31:28 +08:00
RainbowBird d24b22a561 refactor(server/otel): hono otel integrate 2026-05-11 12:01:57 +08:00
RainbowBird 21b180ced7 refactor(server/otel): enhance otel setup with improved SDK lifecycle management 2026-05-10 23:43:18 +08:00
Makitoandautofix-ci[bot] d02a76f944 feat(stage-tamagotchi,stage-shared): wire up global shortcut service and devtools (#1811)
1. Introduce the global shortcut service
1. Add more concrete failure reasons for shortcut registration attempts
1. Add a devtool page to test (un) registering and triggering shortcuts

--- 

<img width="1174" height="921" alt="Screenshot 2026-05-10 at 19 33 45"
src="https://github.com/user-attachments/assets/10712013-fd49-4285-bdc9-4e6955d9c3a7"
/>

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-05-10 20:38:47 +09:00
Ryan Leiandleiyutian 37807b84d6 fix(ui): add openOnClick prop to Combobox for reliable dropdown opening (#1795)
---------

Co-authored-by: leiyutian <leiyutian@echo.tech>
Co-authored-by-agent: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 22:44:27 +08:00
github-actions[bot]andCrowdin Bot 24cc7a3e12 chore(i18n): update translations (#1799)
This PR contains updated translations from Crowdin. Created from [GitHub
Actions](https://github.com/moeru-ai/airi/blob/main/.github/workflows/crowdin-cron-sync.yml).

You can review the source of translations
[here](https://crowdin.com/project/proj-airi)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2026-05-09 20:08:32 +08:00
DrHuangMHT 24da875aa6 refactor(stage-*): improve transcription UX and DX (#1685) 2026-05-09 19:09:39 +08:00
Neko Ayaka 06ab58408b chore(cspell): updated 2026-05-09 03:42:46 +08:00
Neko Ayaka 7bc3781ee2 fix(stage-tamagotchi): missing bridge for spark:notify 2026-05-09 03:42:45 +08:00
RainbowBird 9d2d43855c refactor(chat): update datetime prefixing logic for user messages and improve formatting 2026-05-09 00:38:50 +08:00
RainbowBird fdaf98b076 fix(server/otel): move HttpInstrumentation registration to NodeSDK config for proper metrics handling 2026-05-09 00:35:53 +08:00
RainbowBird fe59f91c84 refactor(server/flux): replace UpDownCounter with ObservableGauge for WebSocket connections
- Updated the EngagementMetrics interface to use ObservableGauge for tracking active WebSocket connections.
- Added detailed comments explaining the rationale for this change, highlighting the benefits of using a pull-based gauge over a delta-based counter.
- Implemented the ObservableGauge in the createChatWsHandlers function, ensuring it accurately reflects the live count of active connections.
- Removed the previous UpDownCounter logic to prevent issues with connection drift during process crashes or network interruptions.
2026-05-09 00:23:02 +08:00
RainbowBird 917450fdfb feat(server/otel): enhance observability with new metrics for email, rate limiting, and billing
- Added new metrics for email service including send, failures, and duration tracking.
- Introduced rate limit metrics to monitor blocked requests and improve abuse detection.
- Enhanced billing metrics to track credited and unbilled flux, as well as TTS character processing.
- Updated OpenAI and Stripe routes to utilize new metrics for better revenue tracking and rate limiting.
- Implemented a smoke test for OpenTelemetry metrics registration to ensure visibility at startup.
2026-05-08 23:35:38 +08:00
RainbowBird f2cf395fd2 docs(server): update ai-context 2026-05-08 22:21:31 +08:00
RainbowBird abd37dd96e fix(docker): enhance server-schema build process with error handling 2026-05-08 21:59:36 +08:00
RainbowBird 54b0af0a08 chore(stage-pages): resolve type 2026-05-08 21:34:11 +08:00
RainbowBird f8d1fa7a64 refactor(server): drop redis stream + worker role (#1792)
The Redis Stream `billing-events` + `worker` Railway role +
advisory-lock poller layered together didn't actually buy us reliability
— `debitFlux` swallowed XADD failures, leaving the door open to "balance
updated, ledger row never written". Collapse the whole thing back to:
`creditFlux` and `debitFlux` write `flux_transaction` ledger rows inline
within the same DB transaction that mutates `user_flux`, and `(user_id,
request_id)` remains the partial unique index that keeps retries safe.

Concrete changes:
- Inline ledger inserts in `BillingService.{debitFlux, creditFlux,
creditFluxFromStripeCheckout, creditFluxFromInvoice}`; drop `billingMq`
and `publishEvent` plumbing entirely.
- `routes/openai/v1` writes `llm_request_log` synchronously via the
existing `requestLogService`; the duplicate `llm-request-log.ts` service
module is removed.
- `bin/run-worker.ts`, `libs/mq/*`,
`services/billing/billing-events.ts`,
`services/billing/billing-consumer-handler.ts`, and matching tests are
deleted. CLI now exposes only `api`.
- `BILLING_EVENTS_*` env vars and the `DEFAULT_BILLING_EVENTS_STREAM`
helper are dropped; `docker-compose.yml` no longer ships a worker
service.
- `docs/ai-context/{workers-and-runtime, billing-architecture,
redis-boundaries-and-pubsub, data-model-and-state,
architecture-overview, README}.md`, `CLAUDE.md`, and the existing
verification docs are updated to describe the single-process synchronous
pipeline.

Tests: 29 files / 247 cases pass. Production deployments need to drop
the worker Railway service after this lands.
2026-05-08 21:14:01 +08:00
hahaqwq eba047328a revert(server): remove .well-known/assetlinks.json (revert #1772) (#1789) 2026-05-08 21:14:01 +08:00
RainbowBird 99956014fa feat(server): admin api (#1788) 2026-05-08 21:14:00 +08:00
RainbowBird d0e2b450cd feat(stage-ui): chat sync (#1775) 2026-05-08 21:14:00 +08:00
hahaqwqandRainbowBird ae8552695b feat(server): add .well-known/assetlinks.json for Android deeplinks (#1772)
Co-authored-by: RainbowBird <rbxin2003@outlook.com>
2026-05-08 21:14:00 +08:00
RainbowBird 9d6d99192c feat(auth): enhance token refresh handling and clear auth state on errors 2026-05-08 21:14:00 +08:00
Neko Ayaka 13566667e1 fix(stage-ui): error item should fit content width, reasoing should not have pt 2026-05-08 21:10:32 +08:00
hahaqwq 4ecd51076d fix(stage-pocket,stage-server): correct Android deep link scheme (#1794) 2026-05-08 20:48:55 +08:00
github-actions[bot]andCrowdin Bot bbaf0c99f6 chore(i18n): update translations (#1790)
This PR contains updated translations from Crowdin. Created from [GitHub
Actions](https://github.com/moeru-ai/airi/blob/main/.github/workflows/crowdin-cron-sync.yml).

You can review the source of translations
[here](https://crowdin.com/project/proj-airi)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2026-05-08 20:26:49 +08:00
hahaqwq ef54ce0c7c feat(stage-pocket,stage-server): support Android deep link for official server login (#1786) 2026-05-08 18:38:03 +08:00
Neko Ayaka 37433b98a2 refactor(stage-ui): new structure for models, services, stores 2026-05-08 17:03:46 +08:00
Neko Ayaka 34e34728c9 chore(.agent/skills): updated release-note-writer 2026-05-08 03:10:49 +08:00