Commit Graph

19156 Commits

Author SHA1 Message Date
Peter Steinberger b080dd1e76 refactor: consolidate coercion contracts (#122458)
* refactor: consolidate coercion contracts

Centralize exact string, record, numeric, date, Boolean, argument, and structured-error coercions while preserving call-site semantics.

Migrate canonical-name collisions and deprecated internal SDK bypasses, deleting 55 net production/tooling lines. Expand declaration ownership enforcement to 101 allowed helpers and add a narrow export-completeness audit.

* fix: preserve standalone script coercions

Keep copied Control UI tooling self-contained and retain the trusted release harness module-relative source seam when the harness runs against an old target cwd.
2026-08-11 23:26:37 -07:00
Peter Steinberger 90beb639e7 refactor(discord): split voice lifecycle ownership (#122479)
* refactor(discord): split voice subsystem by lifecycle owner

* fix(discord): make one generation the voice lifecycle authority

* refactor(discord): delete superseded voice plumbing

* test(discord): split voice coverage by lifecycle owner

* chore(lint): ratchet max-lines baseline after voice split

* fix(discord): re-read voice lifecycle after realtime connect

* test(discord): move wake follow-up coverage to turns owner

* refactor(discord): keep realtime lifecycle state private

* refactor(discord): keep voice test harness type private

* refactor(discord): remove split voice test accessors

* test(discord): type split voice fixtures at owners

* test(discord): trim split voice test imports
2026-08-11 23:23:26 -07:00
Ayaan Zaidi dbb9665e7e fix(discord): let active turns receive steering (#122452)
Remove Discord's duplicate whole-turn session serialization so corrections reach shared reply admission and steer the active run. Preserve shared steer, followup, collect, and interrupt behavior.

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-08-12 06:18:55 +00:00
Peter Steinberger baefefa815 refactor(openai): simplify GPT-5.6 canonicalization (#122467)
Behavior is unchanged. Remove duplicate policy and test scaffolding while preserving canonical Sol identity and direct bare-alias compatibility.
2026-08-11 23:04:01 -07:00
Peter Steinberger 1afb5e64a5 improve: reduce provider auth parity test time (#122445)
* test: trim provider auth parity runtime probes

* test: keep parity shards in tooling owner

---------

Co-authored-by: Amp <amp@ampcode.com>
2026-08-11 22:37:06 -07:00
keshavbotagent 3807eb9c58 fix(codex): preserve allowed tools under channel policy (#122282)
Preserve Codex native tools when conversation policies deny only audited OpenClaw capabilities. Fail closed for computer-control denies and retain structured plan progress.

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
Co-authored-by: Kelaw - Keshav's Agent <keshavbotagent@gmail.com>
2026-08-12 05:27:08 +00:00
Sarah Fortune 00fc1bd123 fix(slack): scope enterprise channel and user policies by workspace (#122346)
* fix(slack): scope channel policies by workspace

* fix(slack): scope user policies by workspace

* fix(slack): preserve workspace policies at ingress

* test(slack): use canonical workspace ids

* chore(slack): remove stale allowlist import

* fix(slack): require workspace-scoped grid policies

* test(slack): scope enterprise policy fixtures

* style(slack): format workspace policy changes

* fix(slack): preserve workspace policy wildcards

* fix(slack): retain workspace system-event policies

* fix(slack): scope bot policy identities

* fix(slack): retain workspace in group policy

* fix(slack): preserve workspace DM allowlists

---------

Co-authored-by: Sarah Fortune <sarah.fortune@gmail.com>
2026-08-11 22:09:46 -07:00
Peter Steinberger dac940bf3a refactor(openai): split realtime voice by layer (#122414)
* refactor(openai): split realtime voice by layer

* refactor(openai): delete dead realtime auth branches

* chore(lint): ratchet max-lines baseline after realtime-voice split

* style(openai): prune split leftovers
2026-08-11 22:06:53 -07:00
Peter Steinberger a3b2700dff fix(deps): bump @openclaw/fs-safe to 0.5.5 for win32 zero-inode identity (#122427) 2026-08-11 21:46:22 -07:00
Peter Steinberger cb52ded58d refactor(telegram): split native commands by executor (#122419)
* refactor(telegram): split native commands by executor

* refactor(telegram): deduplicate DM-thread target session

* chore(lint): ratchet max-lines baseline after telegram commands split

* test(telegram): fix native command split checks
2026-08-11 21:45:17 -07:00
Ayaan Zaidi ec4ae78b75 fix(agents): generate session titles with runtime-owned auth (#122163)
Use the selected harness for isolated title generation, including native Codex auth.
Retry failed dashboard titles from the first user message without overriding manual names.

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-08-12 09:42:16 +05:30
joshavant db28ac2d48 test(signal): cover merged ingress failures 2026-08-11 22:27:11 -05:00
joshavant d4f8553a0c fix: retry debounced ingress failures before adoption 2026-08-11 22:27:11 -05:00
Peter Steinberger a5420dfd91 fix(windows): launch npm-installed native session CLIs (#122334)
* fix(windows): resolve runnable npm launchers

* fix(windows): preserve npm shim argv in terminal sessions
2026-08-11 18:41:35 -07:00
Peter Steinberger 964c8c84c1 refactor: consolidate coercion ownership (#122299)
* refactor: consolidate coercion ownership

Centralize four canonical coercion helpers, migrate exact core and plugin duplicates through narrow Plugin SDK facades, and enforce declaration and plugin-normalization ownership boundaries.

The sweep adds eight focused SDK exports while deleting more production and tooling code than it adds. User-visible behavior is unchanged except for safer equivalent object and UI parsing at existing boundaries.

* fix: guard integer option ownership

Register resolveIntegerOption with the canonical function owner and extend the declaration-guard fixture so future local duplicates fail validation.

* fix: keep integer helpers on numeric facade

Remove the unshipped duplicate string-coerce exports and route every affected plugin consumer through the existing number-runtime contract.

* fix: point numeric coercion to number runtime

Make boundary and declaration diagnostics recommend the canonical numeric facade, with failing-before coverage for both guidance paths.
2026-08-11 17:14:53 -07:00
Stellar鱼 25e48de95b fix(memory-core): preserve strict hybrid result slots (#92524)
Punchcard-Session: cobalt-lantern-summit-fz
2026-08-12 08:10:56 +08:00
Peter Steinberger 723c7f9a7d fix(memory): publish dreaming artifacts atomically (#122343) 2026-08-11 16:53:47 -07:00
Peter Steinberger 087fb56f77 feat(moonshot): add native K3 video input (#122337) 2026-08-11 16:49:42 -07:00
Peter Steinberger d8ae7278b9 fix(browser): publish snapshot output atomically (#122327) 2026-08-11 16:31:17 -07:00
Vincent Koc b3cb8f7ab2 fix(qa): preserve nested tool success evidence (#122189)
Record successful logical target tools at the attempt owner so Code Mode exec receipts retain the nested tool evidence needed by release qualification.

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-12 07:19:56 +08:00
Peter Steinberger c4fd5ad551 fix(google-meet): publish exports atomically (#122306) 2026-08-11 15:29:08 -07:00
Peter Steinberger b350f76484 fix(channels): preserve failed agent run reactions (#122009) 2026-08-11 15:26:44 -07:00
Sliverp 84c7d45f15 refactor(qqbot): install plugin from Tencent package (#107295)
* refactor(qqbot): remove bundled extension source

Mechanical deletion half of the #107295 squashed rebase; the catalog
repoint and host integration land in the follow-up commit.

Co-authored-by: sliverp <870080352@qq.com>

* refactor(qqbot): install plugin from Tencent package

Squashed rebase of #107295 onto current main. Repoints the official
external channel catalog at @tencent-connect/openclaw-qqbot@2.0.1 and
adapts onboarding, doctor migrations, secrets, build guards, and tests.

Documents the known limitation that the external package does not
support structured SecretRef clientSecret values; operators move those
to QQBOT_CLIENT_SECRET or clientSecretFile before upgrading.

Co-authored-by: sliverp <870080352@qq.com>

* fix(doctor): reuse shared hasOwnKey record helper

The rebased QQBot migration carried its own hasOwnKey export, colliding
with the one main now ships in legacy-config-record-shared.ts.

Co-authored-by: sliverp <870080352@qq.com>

* fix(plugins): carry catalog integrity through the update bridge

The externalized-bundled-plugin bridge dropped the official catalog's
expectedIntegrity pin, so bundled-user updates installed the external
npm package without integrity verification. The bridge now carries the
pin for the catalog's exact npm spec and both bridge install calls pass
it through; update-channel spec overrides intentionally skip the pin
since it only covers the pinned version.

Co-authored-by: sliverp <870080352@qq.com>

* chore(plugin-sdk): refresh per-entrypoint API baselines

The QQBot compat export and bundled-type removal shift 26 entrypoint
closure hashes in the new split baseline layout.

Co-authored-by: sliverp <870080352@qq.com>

* refactor(qqbot): drop helper reintroduced during rebase

Main's coercion consolidation added this file after the deletion
commit's base; its only consumers were the removed qqbot sources.

Co-authored-by: sliverp <870080352@qq.com>

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-11 15:10:27 -07:00
Mariano edb7a1692e fix(telegram): expose live location updates to hooks (#122185)
* fix(telegram): expose live location updates to hooks

* test(telegram): keep location coverage focused

* fix(telegram): emit stopped live locations

* test(plugin-sdk): refresh location hook contracts

* docs(changelog): note Telegram live location hooks

* fix(telegram): complete live-location observer path

---------

Co-authored-by: mbelinky <mbelinky@users.noreply.github.com>
2026-08-11 23:26:23 +02:00
Peter Steinberger 42a4d0a9b8 fix(openai): surface failed realtime response outcomes (#121177)
* fix(talk): type realtime response outcomes

* fix(ci): align realtime outcome contracts

* test(ui): identify completed realtime responses

* chore(plugin-sdk): refresh realtime voice baselines
2026-08-11 14:14:22 -07:00
Ayaan Zaidi 6a4a546593 feat(mcp): per-requester OAuth for MCP servers (#122166)
Per-requester OAuth for HTTP MCP servers: in shared channels each trusted sender connects their own account. New config: mcp.servers.<name>.oauth.identity ("shared" default, byte-identical behavior) and gateway.publicOrigin (HTTPS except loopback) for the new GET /oauth/mcp/callback served on the Gateway HTTP server. Requester tokens are isolated per (channel, account, sender) in mcp_oauth_stores rows (no schema bump); callbacks correlate through a durable state-keyed one-time index with a 10-minute TTL; per-requester servers are fail-closed out of static/scheduled runtimes; unauthenticated senders get a sign-in link with a portable URL button; MCP config mutations clear requester credentials at the canonical owner. mcp status --json keeps the legacy authStatus fields additively. Proven by a two-user self-hosted-Executor E2E through the real gateway callback. Part of #122034.

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-08-11 20:58:51 +00:00
Vatsal Garg a432e2a586 fix(browser): let attached workers exit after CDP use (#122103)
* fix(browser): retire attached runtime Playwright CDP adapter on disposal (#122065)

* fix(browser): use optional chaining on refresh in CDP adapter retirement

* refactor(browser): simplify attached adapter disposal

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-11 13:47:58 -07:00
Peter Steinberger 7eed2c3f21 feat(google): add current-turn native video input (#122074)
* feat(agents): add current-turn Gemini video handoff

* test(google): add live native video regression

* build(ai): emit provider types entrypoint

* fix(google): preserve video shedding on retry
2026-08-11 12:58:32 -07:00
Vincent Koc 01cd9cc2a8 test(browser): isolate shared fixture state (#122216)
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-12 03:57:39 +08:00
Peter Steinberger 8c567306ba fix(openai): remove duplicate GPT-5.6 picker entry (#122178)
* fix(openai): remove duplicate GPT-5.6 picker entry

* test(gateway): split OpenAI model picker coverage

* test(openai): align canonical model fixtures

* chore(plugin-sdk): refresh agent harness API baseline
2026-08-11 12:29:36 -07:00
Ayaan Zaidi 746a188c90 refactor(media): collapse attachment byte classification into media-core (#122168)
Attachment MIME gating and extraction dispatch used nine separate byte policies across five files; the allowlist could approve one MIME while dispatch observed another after a second sniff. @openclaw/media-core/attachment-classify now owns byte sniffing, text heuristics, extension mapping, and the seven attachment classes; the cache stores one classification that gates and dispatch share. Channel-declared MIME leads with the transport Content-Type as a byte-arbitrated hint, normalizeMimeType folds YAML/XML synonyms so existing configured allowlists keep matching, and input_file API callers keep declared-MIME precedence over cosmetic filenames. Net -135 production LOC.

Proof: 2,153 focused tests across media-core/media-understanding/media plus boundary-contract and deadcode-mirror suites; ClawSweeper local review clean (round 5, zero findings); live Telegram default-turn probe green.

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-08-11 19:10:49 +00:00
Peter Steinberger 79701dfc84 fix: speed up streamed assistant output (#122206)
* fix: speed up streamed assistant output

* fix: preserve plan stream invalidation
2026-08-11 12:01:14 -07:00
Kevin Lin 2d0c30fd65 fix(slack): keep previously joined threads active beyond 24 hours (#121708)
* fix(slack): keep participated threads active beyond 24 hours

* fix(plugin-state): reject transient TTLs after durable migration

* fix(slack): keep channel entrypoint on narrow plugin API

* chore(sdk): refresh sharded durable-state API baselines

* fix(slack): preserve existing thread expiration without migration

* fix(slack): preserve hydrated legacy thread expiration

---------

Co-authored-by: kevinlin-openai <kevinlin@openai.com>
2026-08-11 11:31:07 -07:00
tharuntejmeta a57e8c70f5 feat(meta): add Muse Spark 1.2 models (#120373)
* feat(meta): add Muse Spark 1.2 models

* fix(meta): verify Muse Spark 1.2 catalog metadata

* fix(meta): verify Muse Spark 1.2 contracts

* docs(meta): quote discounted services terms

* fix(meta): preserve replay fields for simple completions

* test(meta): align stream host adapter types

* fix(meta): apply catalog cap for zero max tokens

* fix(meta): preserve omitted output cap

* fix(meta): scope responses stream wrapper

* fix(ai): preserve source API for stream wrappers

* fix(ai): distinguish hook and dispatch APIs

* test(ai): adapt plugin streams synchronously

* chore(plugin-sdk): refresh API baseline

* chore(plugin-sdk): refresh sharded API baseline

---------

Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
2026-08-11 11:26:58 -07:00
Ayaan Zaidi d2825c70a5 refactor(telegram): consolidate bot handlers into named modules (#122174)
The bot-handlers family was 22 files behind a 22-line fan-out: six files holding one callback switch, four holding one inbound pipeline, every interface a derived ReturnType, processMessage taking 8 positional args, and its params type declared inside bot-native-commands.ts. Three named coordinators (inbound pipeline, callback router, event bindings) now sit behind the same registerTelegramHandlers entry with hand-written leaf contracts; the factory graph, 16 slice/barrel files, and the type shim are deleted. Behavior-neutral: bot.test.ts and the ingress e2e byte-identical to main (SHA-256-pinned) and green; +185 production LOC accepted as the written-contract tradeoff.

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-08-11 18:18:16 +00:00
Peter Steinberger 86bc5aa726 test(plugins): remove stale test plumbing (#122175) 2026-08-11 11:01:05 -07:00
wanyongstar 90dbede056 fix(browser): bound snapshot tree rendering depth (#119217)
Both snapshot renderers walked accessibility trees recursively with no
default depth bound: the chrome-mcp builder only honored maxDepth when
callers passed one, and the CDP renderRoleTree had no limit at all. A
pathologically nested page could overflow the call stack and grow
indent output quadratically before any output truncation ran. Add a
generous hard depth bound (100) to both traversal paths.
2026-08-12 00:38:29 +07:00
Peter Steinberger cad77fb39c refactor: consolidate remaining coercion helpers (#122020) 2026-08-11 10:22:01 -07:00
Ayaan Zaidi 1bfd12674c test(telegram): provision keyed store in ingress coalescing fixture
The command-menu locale ledger reads state.openKeyedStore during
hydration; the fixture's partial runtime stub lacked it, so the
degrade warning broke both claim-watchdog cancellation tests on main.
Provision it like the dispatch harness does. Surfaced by #122091's
follow-up work; suite runs locally only (see #122029 decision).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-11 19:01:16 +02:00
Patrick Erichsen ad704f35c4 fix(control-ui): hide unusable models from picker (#121852)
* fix(ui): hide unusable models from picker

* refactor(ui): remove stale model availability helper

* refactor(ui): simplify catalog state guards

* style: format provider catalog imports

* chore: refresh plugin SDK API baseline

* refactor(core): break provider catalog type cycle

* chore(protocol): refresh models list Swift output

* chore: refresh plugin SDK API baseline after rebase

* fix(gateway): preserve full catalog preload semantics

* fix(ui): keep model status within startup budget

* fix(ui): preserve provider status within startup budget

* fix(models): scope live catalog outcomes

* test(ui): expect agent-scoped model refresh

* test(ui): align model refresh e2e fixtures
2026-08-11 09:13:44 -07:00
Ayaan Zaidi e31a6e29ff refactor(telegram): merge dispatch controllers into one turn module (#122091)
The four Telegram dispatch controllers were partitions of one closure: ~75 factory parameter slots, 7 post-construction back-edge setters, a shared mutable state bag, and load-bearing construction order. One turn record now carries the once-resolved config and all state; the four files remain as implementation with a hand-written leaf type contract (four state-slice types). Rides along: dead generation fence deleted (constant-0 from birth), queuedFinal ||= fix with regression (suppressed exec-approval turns no longer trigger a spurious fallback), collapse resolver/mutator split. Dispatch tests and harness byte-identical to main; live E2E lifecycle proof on the PR.

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-08-11 15:45:42 +00:00
Peter Steinberger 5c52666c34 test(bedrock): remove stream inspection bridge (#122059)
* test(bedrock): remove stream inspection bridge

* test(bedrock): fail when stream command is missing
2026-08-11 07:39:51 -07:00
Peter Steinberger 2cf725191c refactor(telegram): centralize text delivery (#117327)
Centralize Telegram text delivery: page planning and reply-target progression move into telegram-text-delivery.ts, shared by the durable send, edit, and streaming-final paths; bot/reply-threading.ts and per-path split/page logic are deleted. Formatted-to-plain recovery routes through withTelegramPlainFallback everywhere. Restores the projection-cursor invalidation contract on terminal multi-page failures (with regression). Net -321 production LOC. Live E2E on the PR: formatted entity path, plain-fallback recovery, and 2-page chaining.

Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-11 14:37:54 +00:00
Peter Steinberger 97c2eab77c test(bedrock): remove embedding inspection bridge (#122049) 2026-08-11 06:43:55 -07:00
Peter Steinberger 8dace97c2e perf(test): cut workflow guard overhead (#122038)
Co-authored-by: Amp <amp@ampcode.com>
2026-08-11 06:29:08 -07:00
Ayaan Zaidi 2c8ed54ddb feat(heartbeat): default delivery to the configured owner, never groups (#121988)
Unset heartbeat.target now resolves "owner": elected heartbeat notifications deliver to the operator's DM resolved from commands.ownerAllowFrom or the channel allowFrom (first concrete entry; wildcards and channel-scoped wildcards excluded; configured owners exhausted across channels before any channel-local fallback). Delivery requires the channel's own classifier to positively prove a direct destination — every bundled messaging plugin now ships an inferTargetChatType contract — and unproven or group-shaped destinations fail closed to the visible no-route state. The first implicitly-routed delivery carries a one-line self-explanation naming the target: "none" opt-out. Explicit target "last" remains as the follow-the-conversation opt-in. Refines the unreleased #121892 default before it ships; refs #121880.

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-11 13:18:22 +00:00
Ayaan Zaidi 1dde25cb20 test(telegram): expect status-only default command progress preview
#121600 (4c951398ef) made default command progress status-only — raw
command text stays out of chat previews. This assertion still expected
the pre-#121600 preview with the raw command line; bisect-confirmed
first-bad at 4c951398ef. Pre-existing failure surfaced by the
dispatch-suite CI gap (#122029). Dispatch suite now 247/247.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-11 14:40:20 +02:00
Ayaan Zaidi 56d62e6f23 test(telegram): expect canonical channel-prefixed durable delivery target
resolveDeliveryTarget (src/channels/turn/durable-delivery.ts:57) reads
OriginatingTo/To — channel-prefixed refs — as its own fallback chain, so
telegram:-100555 is the contract shape for the durable 'to', not the
bare chat id this assertion expected. Pre-existing failure surfaced by
the dispatch-suite CI gap (#122029).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-11 14:40:20 +02:00
Ayaan Zaidi a6ab4b7d54 test(telegram): align dispatch custody assertions with final-update options
#121908 (210aca6de3) added the onPlatformSendDispatch options bag to
final draft-stream updates and updated draft-failures-progress.test.ts,
but missed 19 sibling assertion sites across 6 dispatch test files.
Those files do not currently execute in any CI lane, so main's local
dispatch suite has been red since. Two remaining failures
(context-recovery session-target prefix, draft-failures-progress
preview shape) predate #121908 and are tracked separately.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-11 14:21:06 +02:00
Peter Steinberger 02e8470bb8 refactor: burn SDK export collision debt (#121888)
* refactor: burn SDK export collision debt

* chore: regenerate collision debt baselines

* fix: update durable delivery core import

* fix: remove stale channel metadata type import

* fix: preserve config write SDK parameter type

* fix: preserve chat metadata SDK return type

* chore: refresh plugin SDK API baseline

* test: update plugin enable mock import

* fix: remove duplicate status helper re-export

* fix: preserve strict QA runtime availability errors
2026-08-11 05:06:11 -07:00