Commit Graph

38186 Commits

Author SHA1 Message Date
Logan Ye
ef7c528c8a fix(agents): recognize flat JSON billing payloads and snake_case error codes (#74188)
* fix(agents): recognize flat JSON billing payloads and snake_case error codes

Two independent fixes for billing error detection:

1. isErrorPayloadObject/parseApiErrorInfo now recognize flat JSON like
   {"error":"string_code","message":"..."} where error is a string code
   at the top level, not just nested {"error":{"type":"...","message":"..."}}
   envelopes.

2. isBillingErrorMessage now matches "insufficient_balance" (underscore)
   and "Insufficient MBT balance" (one word between insufficient/balance)
   via two new patterns in the billing pattern list.

Together these prevent raw JSON from leaking to user-facing chat when
providers return 402-style flat payloads.

Fixes #74079

* fix(agents): remove redundant billing pattern and fix misleading regex comment
2026-04-29 07:15:45 -04:00
Peter Steinberger
1f8ccf2d2a refactor(gateway): reuse chat state registries 2026-04-29 12:14:59 +01:00
Peter Steinberger
34ec184dcb refactor: reuse shared dedupe helpers 2026-04-29 12:14:59 +01:00
Peter Steinberger
81ad827380 refactor(plugin-sdk): extract shared dedupe helpers 2026-04-29 12:14:59 +01:00
bitloi
dce2513db2 fix(agents): preserve CLI wake-up session metadata (#74171)
* Fix CLI wake-up resume metadata

* Rerun CI

* ci: re-trigger parity gate
2026-04-29 07:14:48 -04:00
Peter Steinberger
1d494af03a refactor: simplify gateway and e2e test helpers 2026-04-29 12:14:19 +01:00
Peter Steinberger
9d1c5a77c2 fix: add vercel ai gateway thinking profile
Adds a Vercel AI Gateway provider thinking-profile resolver for trusted OpenAI and Anthropic upstream refs, preserving catalog compat fallback for unsupported/base-only refs.

Includes provider tests, docs, and changelog coverage. Supersedes #41561.

Co-authored-by: Zcg2021 <80769518+Zcg2021@users.noreply.github.com>
2026-04-29 12:13:20 +01:00
Vincent Koc
6d7a77dcf9 fix(tui): recover stale streaming status after unbound final (#73749)
* fix(tui): clear stale streaming after unbound final events

* fix(clownfish): address review for ghcrawl-156749-autonomous-smoke (1)

* fix(tui): address stale streaming review
2026-04-29 04:12:25 -07:00
Peter Steinberger
77a5d82e64 test(ci): align telegram live package assertion 2026-04-29 12:06:57 +01:00
Peter Steinberger
fce62c6129 fix(ci): classify gateway agent helper as test-only 2026-04-29 11:59:44 +01:00
Peter Steinberger
bdcd543ed7 fix(gateway): bypass proxies for localhost control plane 2026-04-29 11:59:33 +01:00
Peter Steinberger
af31fc938a ci: fix ClawHub plugin peer fixture 2026-04-29 11:58:32 +01:00
Peter Steinberger
e6cd90e3fd fix(agents): keep OAuth auth read-through 2026-04-29 11:54:28 +01:00
Vincent Koc
21a92ea0f6 fix(whatsapp): recover group inbound after reconnect churn
Repair WhatsApp group inbound recovery after repeated reconnect churn while keeping the fallback scoped to reconnect metadata.

Canonical issue: #66920. Related evidence: #7433, #63855, #70856.

Thanks to legonhilltech-jpg, octopuslabs-fl, Kanorin-chan, and stuswan for the reports and reproduction details.
2026-04-29 03:54:18 -07:00
Peter Steinberger
4f73baf7d7 refactor(test): split e2e fixture helpers 2026-04-29 11:49:45 +01:00
Deepak Jain
0c9f84451a feat(config): add reasoningDefault to agents.defaults
Add reasoningDefault support under agents.defaults and preserve the existing per-agent/session/inline override order.

Includes authorization gating for configured reasoning state, /status coverage, config schema/docs baseline updates, and regression tests for the reply and status paths. Also carries the related cron startup-run preservation fix and CI test stabilization needed for this PR branch.

Validated locally with pnpm check:changed, the focused Vitest bundle for touched gateway/cron/auto-reply/plugin-sdk/tooling tests, pnpm config:docs:check, and git diff --check. GitHub checks are green on the merged head; Greptile latest visible review is 4/5 with no P0/P1 findings.
2026-04-29 05:47:18 -05:00
Peter Steinberger
7be65cd798 test: cover session-scoped model overrides (#74265) 2026-04-29 11:46:53 +01:00
Val Alexander
e5a5ea1072 fix(ui): make control prompts real modals
Introduce a native dialog-backed Control UI modal primitive and migrate the exec approval, gateway URL confirmation, and dreaming restart confirmation prompts to it.

The modal primitive provides aria-modal semantics, shadow-root-local labels/descriptions, focus trapping, safe initial focus, Escape cancellation, and focus restoration while preserving the existing prompt content and decision semantics.

Validation:
- pnpm lint --threads=8
- pnpm --dir ui test src/ui/components/modal-dialog.test.ts src/ui/views/exec-approval.test.ts src/ui/navigation.browser.test.ts
- pnpm test:ui
- pnpm exec oxfmt --check --threads=1 ui/src/ui/components/modal-dialog.ts ui/src/styles/config-quick.test.ts
- git diff --check

CI note: checks-node-core-support-boundary is failing in test/scripts/docker-build-helper.test.ts on an unrelated package-acceptance assertion; the failing files are identical to origin/main and outside this UI-only PR.
2026-04-29 05:46:50 -05:00
Peter Steinberger
1dac6ac4c6 ci: retry transient live provider flakes 2026-04-29 11:44:42 +01:00
Peter Steinberger
6b4873d0c1 ci: split plugin contract shards 2026-04-29 11:44:32 +01:00
vinoyang
6b44dce0c8 feat(memory-lancedb): support query cmd for llm CLI (#71112)
* feat(memory-lancedb): support query cmd for llm CLI

* address review comments

* address review comments

* trigger ci
2026-04-29 18:42:40 +08:00
Peter Steinberger
4528682487 chore: remove stale Knip voice-call ignore 2026-04-29 11:40:21 +01:00
Peter Steinberger
69e6f65237 test: avoid CI lint false positive in ACP config mock 2026-04-29 11:35:34 +01:00
Peter Steinberger
427d5d4f69 ci: guard unused dead-code files 2026-04-29 11:35:34 +01:00
Peter Steinberger
38fdb42069 chore: remove unused internal entrypoints 2026-04-29 11:35:34 +01:00
Peter Steinberger
93d5cd1015 fix: honor configured xhigh thinking compat (#74273)
* fix: honor configured xhigh thinking compat

* test: update agent command model selection mock
2026-04-29 11:35:03 +01:00
Peter Steinberger
6cea276976 ci: shard release docker plugin validation 2026-04-29 11:33:24 +01:00
Peter Steinberger
99950c7f12 fix(doctor): use lightweight gateway liveness check 2026-04-29 11:32:02 +01:00
Peter Steinberger
a1197b9075 test: remove unused ACP mock parameter 2026-04-29 11:24:47 +01:00
Peter Steinberger
20ed597495 fix: restore verbose command and ACP cleanup controls 2026-04-29 11:20:11 +01:00
Vincent Koc
ae57eb635c fix(gateway): reduce session-store clone memory growth
## Summary
- Addresses the remaining Gateway RSS/session-accumulation path tracked by #54155.
- Narrows the fix to the structuredClone/session-store cache memory growth described in #45438.
- Preserves prior report context from #57699, #62717, #66886, #69977, and #70717 as validation evidence.

## Validation
- pnpm -s vitest run src/config/sessions/store.pruning.test.ts src/config/sessions/store.pruning.integration.test.ts src/gateway/sessions-resolve-store.test.ts
- pnpm check:changed

## Credit
Thanks @the-lobsternaut for #54155 and @markus-lassfolk plus the #45438 commenters for isolating the structuredClone/native-memory behavior.

ProjectClownfish replacement details:
- Cluster: ghcrawl-156648-autonomous-smoke
- Source PRs: none
- Credit: Credit #54155 reporter @the-lobsternaut for the multi-day Gateway RSS/session-accumulation report.; Credit #45438 reporter @markus-lassfolk and commenters for isolating the structuredClone/session-store native-memory path.; Preserve prior closed-report context from #57699, #62717, #66886, #69977, and #70717 in the PR body as reproduction evidence, not as new close targets.
- Validation: pnpm -s vitest run src/config/sessions/store.pruning.test.ts src/config/sessions/store.pruning.integration.test.ts src/gateway/sessions-resolve-store.test.ts; pnpm check:changed
2026-04-29 03:19:13 -07:00
Peter Steinberger
07ca99d2a8 ci: split auto-reply session shard 2026-04-29 11:18:26 +01:00
Vincent Koc
0f6fea813c test(gateway): allow cold plugin route dispatch 2026-04-29 03:17:41 -07:00
Peter Steinberger
923837accd test: wait for deferred gateway agent dispatch 2026-04-29 11:13:30 +01:00
Peter Steinberger
06088c6b05 test: follow update channel assertion extraction 2026-04-29 11:12:13 +01:00
Peter Steinberger
e1fd27fb24 feat(messages): add global visible replies mode 2026-04-29 11:06:39 +01:00
Super Zheng
1c45592e62 perf(plugins): add O(1) fast-path for empty plugin loads 2026-04-29 03:04:21 -07:00
Peter Steinberger
48683a7f71 ci: split auto-reply reply routing shard 2026-04-29 11:03:55 +01:00
Yao
af548bb07d fix(ui): persist default agent via agents list flag
Fix the Control UI Set Default action to persist agents.list[].default instead of the unsupported agents.defaultId config key.\n\nCloses #65565.\n\nThanks @luyao618.
2026-04-29 03:03:12 -07:00
Super Zheng
d33c3f7da6 perf(catalog): cache manifest built-in model suppression resolver (#74236)
* perf(catalog): cache manifest built-in model suppression resolver

* fix(catalog): address PR review comments for manifest suppression resolver

* fix(catalog): preserve cached suppression semantics

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-04-29 02:52:26 -07:00
Peter Steinberger
b52197427c refactor: consolidate e2e fixture helpers 2026-04-29 10:49:37 +01:00
Vincent Koc
412434a450 test(plugins): extend external install contract coverage 2026-04-29 02:48:58 -07:00
Logan Ye
3af661384c fix(hooks): deduplicate boot-md startup tasks by workspaceDir (#74194) 2026-04-29 02:48:31 -07:00
Peter Steinberger
d7cc8d0b03 ci: split agentic gateway test shards 2026-04-29 10:47:35 +01:00
Peter Steinberger
146c0a7e1d test(gateway): wait for deferred agent session event 2026-04-29 10:45:09 +01:00
luzhidong
1c17fd5edf feat(ui): add mobile cron session filter
Add the existing desktop cron-session visibility toggle to the mobile chat settings dropdown, reusing the shared session filtering state and cron filter icon path.

Also add focused browser render coverage for the mobile dropdown so the cron filter button, hidden-count title, active/pressed state, and click behavior are covered.

Validated:
- pnpm exec oxfmt --check --threads=1 ui/src/ui/app-render.helpers.browser.test.ts
- pnpm test ui/src/ui/app-render.helpers.browser.test.ts ui/src/ui/app-render.helpers.node.test.ts
- pnpm lint --threads=8

Thanks @luzhidong.
2026-04-29 04:38:50 -05:00
Peter Steinberger
3c19588fc5 test(ci): align bun install smoke assertion 2026-04-29 10:35:55 +01:00
Vincent Koc
4b99724a9c test(plugins): isolate config alias scan regression 2026-04-29 02:29:03 -07:00
Vincent Koc
a3519e362f fix(plugins): reuse config alias scans 2026-04-29 02:29:02 -07:00
Vincent Koc
985000026e fix(gateway): defer agent dispatch after accept 2026-04-29 02:29:02 -07:00