Commit Graph

19174 Commits

Author SHA1 Message Date
Ayaan Zaidi 5e477aff2a feat(status): render /status as a native rich card and declutter the plain body (#120167)
* feat(status): render /status as native rich tables on channels that support them
* feat(status): tighten rich /status layout into a titled native table card
* feat(status): trim rich /status tail to one clock-and-uptime context line
* feat(status): context meter, hot-window warning, and default-noise trim in rich card
* test(status): satisfy SessionEntry sessionId in meter fixture
* fix(telegram): gate rich table islands off legacy HTML sends and cover payload sends
* test(telegram): split outbound-adapter presentation tests to satisfy max-lines
* fix(outbound): make presentation capability resolution formatting-aware
* fix(telegram): defer presentation canonicalization on rich accounts until send
* feat(status): one fact per line in the plain status body
* feat(status): group the plain status body into blank-line sections
* feat(status): lead the rich status card with the version title

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-07 20:46:52 +05:30
SunnyShu 3bc188efe5 fix(diagnostics-otel): keep telemetry exporting across in-process restarts (#120131)
* [AI] fix(diagnostics-otel): keep telemetry exporting across in-process restarts

Owned diagnostics-otel generations previously registered their OpenTelemetry
providers globally and only shut the providers down on stop. The pinned
sdk-node registers globals without override and never unregisters them, so a
second in-process generation (config-watcher reload, OPENCLAW_NO_RESPAWN=1,
containers) kept exporting through the first, already-shutdown providers and
telemetry silently stopped.

Switch owned mode to private BasicTracerProvider + MeterProvider instances
whose handles are injected directly into the existing recorder runtime, and
keep the preloaded (OPENCLAW_OTEL_PRELOADED=1) mode on the host's global
providers without ever registering or replacing globals. Resource detection
honors the pinned NodeSDK OTEL_NODE_RESOURCE_DETECTORS contract (unset
defaults to env+process+host; none/subset/all are respected), and the unused
@opentelemetry/sdk-node dependency is removed with a minimal lockfile update.

Adds a real-SDK two-generation restart regression, real-SDK resource-detector
selection coverage, migrates the unit mocks to the provider lifecycle, and
updates the OpenTelemetry docs.

Fixes #119997

Co-Authored-By: glm-5.2 <noreply@anthropic.com>

* [AI] test(diagnostics-otel): restore OpenTelemetry globals after restart test

The restart regression disables global context, metrics, propagation, and
trace APIs and forces OPENCLAW_OTEL_PRELOADED=0, but its cleanup only reset
diagnostic events, so a later test in the same worker could inherit no-op
providers. Snapshot the prior global registrations and preloaded env at
module load, and re-register/restore them in afterEach, matching the
existing exporter-health integration test pattern.

Co-Authored-By: glm-5.2 <noreply@anthropic.com>

* [AI] fix(diagnostics-otel): reconcile private providers with OTEL_SDK_DISABLED

Rebase onto main after #119961 (honor OTEL_SDK_DISABLED) changed the
disabled admission path to return before SDK construction. Restore the
removed getBooleanFromEnv import, drop the stale ownedNodeSdkDisabled
guard, and update disabled-mode tests to the new semantics (all routes
off, disabled runtime registered) plus the private-provider signal
path for the integration suite.

Related to #119997

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(diagnostics-otel): isolate restartable provider generations

* test(diagnostics-otel): prove same-pid generation routing

* test(diagnostics-otel): use supported watcher reload mode

* test(diagnostics-otel): satisfy ownership proof gates

* test(diagnostics-otel): use managed proof cleanup

* test(diagnostics-otel): verify injected trace ancestry

---------

Co-authored-by: glm-5.2 <noreply@anthropic.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-08-07 22:24:18 +08:00
Peter Steinberger 4fb43b59e6 fix(slack): workspace-scoped thread cache and durable channel-id migration (#120022)
* fix(slack): scope thread-starter cache per workspace and persist channel-id migration durably

Thread-starter cache keys now always include accountId+teamId so multi-workspace
installs cannot cross-read cached thread starters. channel_id_changed migration
previews against the persisted config snapshot and only mutates the in-memory
monitor config after the durable write succeeds; new-channel ingress traffic
serializes behind the migration lane via new_channel_id.

* chore: re-fire CI

* chore: re-fire CI against fixed main baseline
2026-08-07 03:55:24 -07:00
Vincent Koc 095227dd21 fix(diagnostics): honor OTEL_SDK_DISABLED (#119961)
* fix(diagnostics): honor OTEL_SDK_DISABLED

* fix(diagnostics): own OpenTelemetry lifecycle

* fix(diagnostics): keep SDK options private

* test(diagnostics): type async resource export

* fix(diagnostics): preserve OpenTelemetry env defaults

* fix(diagnostics): restore narrow OTEL disabled admission

* fix(diagnostics): surface disabled propagator warnings

* fix(diagnostics): preserve preloaded rejection guard

* fix(diagnostics): probe context manager ownership
2026-08-07 17:01:14 +08:00
Vito Cappello 5621979a46 fix(models): preserve session selection across fallback turns (#119325)
* feat(models): add session-only model selection

* fix(models): use trailing session scope option

* test(models): satisfy session scope lint

* fix(models): reject duplicate model options

* fix(models): clarify default and session scope

* fix(models): require complete session option tokens

* fix(models): report configured default dispatch

* fix(models): keep directive handler within lint limit

* fix(models): parse model options in either order

* fix(models): apply session scope to aliases

* fix(models): align alias scope with reply routing

* fix(discord): surface model selection scope in picker

* fix(models): preserve mixed-text model selection

* fix(models): centralize command selection ownership

* fix(models): align session scope lifecycle

* fix(models): preserve command and auth ownership

* fixup! fix(models): preserve command and auth ownership

* fix(auth): preserve scoped CLI provider discovery

* test(models): align result and cron fixtures

* test(models): nest result timing metadata

* fix(discord): narrow silent dispatch results

* fix(transcript): preserve admitted turn identity

* fix(context-engine): fence the admitted transcript turn

* fix(context-engine): stabilize plugin compatibility contract

* chore(plugin-sdk): refresh context engine API baseline

* chore(plugin-sdk): use Linux context engine API baseline

* fix(context-engine): align fallback ownership

* fix(fallback): scope auth skip cache by profile

* fix(context-engine): settle only accepted fallback turns

* refactor(sessions): issue canonical turn admissions

* refactor(context-engine): own logical turn advancement

* fix(context-engine): settle cron fallback winners

* fix(models): align picker and fallback transactions

* fix(delivery): notify block admission after queueing

* fix(sessions): preserve canonical admission receipts

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

* fix(context-engine): commit accepted turns durably

* fix(context-engine): validate durable host transitions

* fix(context-engine): preserve fallback turn ownership

* fix(context-engine): preserve queued turn order

* fix(models): preserve fallback retry ownership

* fix(context-engine): enforce durable transcript anchors

* fix(runtime): close fallback persistence gaps

* fix(context-engine): preflight fallback harnesses

* chore(plugin-sdk): use Linux API baseline

* fix(context-engine): drain durable commits before reads

* fix(models): scope harness auth failures by profile

* fix(codex): fence legacy transcript history

* fix(commands): honor suppressed directive interpretation

* chore(runtime): remove unused branch exports

* test(context-engine): derive private outbox payload type

* fix(context-engine): apply durable drain degradation

* fix(context-engine): recover durable turn intents

* fix(context-engine): settle durable turn intents

* refactor(context-engine): satisfy branch quality gates

* fix(context-engine): close durable recovery gaps

* fix(discord): preserve dropped model command outcome

* test(copilot): keep journal fixture types local

* fix(auto-reply): preserve model alias provenance

* fix: close model scope review gaps

* fix(models): close review-found scope leaks

* fix(review): satisfy branch line budgets

* fix(agents): preserve context engine turn facts

* fix(agents): finalize silent context turns

* fix(context-engine): preserve compatibility window

* test(agents): cover both harness preparations

* fix(context-engine): retain blocked turn advancements

* fix(models): parse compact runtime options

* fix(telegram): report runtime resets accurately

* fix(models): isolate automatic auth failure skips

* fix(context-engine): project commit turn host params

---------

Co-authored-by: VACInc <3279061+VACInc@users.noreply.github.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-08-07 16:19:12 +08:00
Peter Steinberger 5a913fa453 fix(acpx): stop/start races cannot resurrect a stopped embedded runtime (#120029)
* fix(acpx): stop/start races cannot resurrect a stopped runtime backend

The deferred acpx runtime service published its lazily started backend without
lifecycle ownership checks: a stop during in-flight activation let the stale
service become the active runtime, and stop cleared shared state while startup
still used it. Start/stop now use a lifecycle revision; only the current
revision may publish a runtime, stop invalidates every deferred proxy before
awaiting in-flight startup, and restart waits for the previous stop to settle.

* chore: re-fire CI

* fix(acpx): fence deferred runtime ownership

* refactor(acpx): centralize backend lifecycle ownership

* fix(acpx): annotate deferred runtime cycle
2026-08-07 01:09:23 -07:00
Dallin Romney 1574723997 fix(cua-computer): load the ESM driver on node hosts (#120169)
* fix(cua-computer): load ESM driver asynchronously

* fix(cua-computer): register computer invoke policy

* test(gateway): cover CUA command allowlist

---------

Co-authored-by: Francesco Bonacci <f@trycua.com>
2026-08-07 15:15:48 +08:00
Vincent Koc 63c6cd9a02 fix(agents): satisfy tool authority lint 2026-08-07 15:07:12 +08:00
Vincent Koc 228478bffe fix(plugins): inject harness tool authority 2026-08-07 15:07:12 +08:00
Vincent Koc aacbcaacc8 fix(agents): restrict harness tool authority 2026-08-07 15:07:12 +08:00
Vincent Koc d863dd5f5e refactor(agents): bind tool policy to exact execution identity 2026-08-07 15:07:12 +08:00
Peter Steinberger 4a47cd18b7 fix(qqbot): partial config edits no longer resurrect backed-up credentials (#120028)
* fix(qqbot): recover credentials from backup deterministically at startup

Credential recovery previously keyed off a loose truthiness check that
misclassified partially configured accounts; recovery state is now a closed
discriminated union (configured/recoverable/partial/missing) so a live-config
wipe restores from the per-account backup only when the account is actually
recoverable, and partial configs surface a clear diagnostic instead of a
silent skip.

* chore: re-fire CI
2026-08-06 23:48:31 -07:00
Vincent Koc bb612cbe4c fix(qa): bound Matrix scenario preparation separately (#119996)
* fix(qa): bound Matrix scenario preparation separately

Punchcard-Session: cobalt-valley-meadow-mg

* fix(qa): enforce Matrix preparation deadline

Punchcard-Session: cobalt-valley-meadow-mg
2026-08-07 13:52:59 +08:00
Vincent Koc 5f585a57bd test(msteams): cover occupied webhook port (#120158)
Punchcard-Session: silver-willow-harbor-px
2026-08-07 13:46:41 +08:00
Peter Steinberger 9aa24e8f2e refactor(test): replace logic-bearing vi.mock factories with boundary fakes, batch 2 (#120117)
* refactor(test): exercise real Teams monitor lifecycle

* refactor(test): use real gateway lifecycle state

* refactor(test): use real restart delivery queue

* test: type Teams SDK boundary fixture
2026-08-06 22:02:50 -07:00
Peter Steinberger f87d8bb72d refactor(test): compress repetitive fixtures in mega-tests, batch 2 (#120124)
* refactor(test): compress incomplete-turn fixtures

* refactor(test): compress Discord voice fixtures

* refactor(test): compress restart recovery fixtures

* refactor(test): compress CLI attempt fixtures

* refactor(test): compress subagent registry fixtures

* refactor(test): compress workboard fixtures

* refactor(test): compress TUI event fixtures

* refactor(test): compress Codex turn-watch fixtures

* fix(test): tighten CLI attempt fixture types

* fix(test): widen restart transcript fixture content

* fix(test): preserve workboard status fixture type
2026-08-06 20:50:20 -07:00
metaforismo b47fb954fb fix(qqbot): add cause-specific setup guidance (#119780)
* fix(qqbot): add cause-specific setup guidance

* fix(qqbot): recognize expired-token business errors

* fix(qqbot): retry structured token failures

---------

Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
2026-08-06 20:27:26 -07:00
metaforismo 2e0fe80c80 fix(venice): replay Gemini tool signatures by turn occurrence (#119783)
* fix(venice): replay Gemini tool-call signatures

* fix(venice): preserve Gemini signatures in transcripts

* fix(venice): handle mixed Gemini tool history

* fix(venice): downgrade unsigned Gemini tool history

* fix(venice): scope Gemini tool replay by turn

* fix(venice): narrow replay occurrence guards

---------

Co-authored-by: Wen-Yong Lim <cheng@Wen-4-Mac-mini.local>
Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
2026-08-06 20:27:16 -07:00
Jacqueline Henriksen aa21c001f1 fix(clickclack): show native agent progress while replying (#116683)
* fix(clickclack): show native agent progress while replying

* fix(clickclack): address native progress review feedback

* fix(clickclack): address native progress review feedback

* fix(clickclack): address native progress review feedback

* fix(clickclack): address native progress review feedback

* fix(clickclack): address native progress review feedback

* fix(clickclack): clear CI failures

* fix(clickclack): bound stalled progress finalization

* test(clickclack): satisfy strict callback typing

* fix(clickclack): clear progress before activity flush

* fix(clickclack): make native progress explicitly opt-in

* fix(clickclack): make native progress explicitly opt-in

* fix(clickclack): make native progress explicitly opt-in

* fix(clickclack): make native progress explicitly opt-in

* fix(clickclack): make native progress explicitly opt-in

* docs(clickclack): document opt-in native progress

* fix(clickclack): guard disabled native progress

* test(clickclack): cover independent progress opt-ins

* docs(clickclack): show native progress opt-in

* fix(clickclack): keep resolved progress setting compatible

* fix(clickclack): identify agent in native progress

* fix(clickclack): retract native commentary progress

* fix(clickclack): harden native progress compatibility

* fix(clickclack): regenerate current-main channel metadata

---------

Co-authored-by: PollyBot13 <pollybot13@gmail.com>
2026-08-06 20:18:19 -07:00
Peter Steinberger c636060f04 fix(telegram): preserve voice fallback text
Preserve visible text when Telegram rejects a voice note for recipient privacy.

Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-08-07 08:18:31 +05:30
sunlit-deng 83963e5135 fix(google): accept base64url provider media (#116204)
* fix(google): accept base64url in Live audio

* fix(google): normalize base64url in one pass

* fix(google): normalize base64url at every Google media boundary

* fix(google): normalize image media and avoid double music validation

* test(google): exercise URL-safe base64 fixtures

---------

Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
2026-08-06 19:00:25 -07:00
zengLingbiao a466958d33 fix(canvas): serve Content-Length on A2UI HEAD responses (#117961)
Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
2026-08-06 18:58:09 -07:00
tzy-17 e0ec136108 fix(gateway): make doctor dreaming timestamp comparators NaN-safe (#118749)
* fix(gateway): make doctor dreaming timestamp comparators NaN-safe

compareDreamingEntryByRecency and compareDreamingEntryByPromotion used
`Number.isFinite(aMs) || Number.isFinite(bMs)` then `return bMs - aMs`.
When exactly one side parsed to NaN (non-empty malformed timestamp), the
guard still entered the branch and returned NaN - bMs, producing NaN and
leaving Array.sort order undefined for the doctor.memory.status dreaming
entry list. Coerce unparseable timestamps to -Infinity via a shared
parseDreamingTimestampMs helper and return a finite -1/0/1 from the
timestamp branch so the sort stays deterministic.

* fix(memory-core): incorporate producer-side NaN-safe timestamp comparator

ClawSweeper [P1] finding: gateway-only fix is incomplete because Memory Core
has the same mixed-NaN comparator BEFORE the gateway merges lists. A valid
entry discarded upstream cannot be recovered at the gateway boundary.

Incorporate the producer-side fix:
- Export compareStoreTimestampDesc from short-term-promotion-utils.ts
- Replace the buggy raw Date.parse + bMs-aMs pattern in
  short-term-promotion-stats.ts with the NaN-safe compareStoreTimestampDesc

This makes #118749 self-contained: both gateway doctor.ts AND memory-core
stats.ts comparators are NaN-safe. The companion #118750 now only needs to
cover the recency ranking fix (ageDays/recency calculation).

* fix(memory): preserve valid dreaming diagnostics

* style(memory): format dreaming imports

---------

Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
2026-08-06 18:56:50 -07:00
Peter Steinberger 01281ad9f8 refactor(browser): remove model-backed page extraction (#120101)
* refactor(browser): remove model-backed extraction

* docs(browser): remove stale extract reference
2026-08-06 18:32:14 -07:00
Vincent Koc 9094e10c11 test(file-transfer): cover final symlink write policy (#120082) 2026-08-07 09:17:40 +08:00
Vincent Koc 179f5fa8ce test(qa): keep Control UI parity fixture typed (#120090) 2026-08-07 09:08:12 +08:00
Patrick Erichsen c245cfc19c test: fix current main CI baselines (#120080)
* test: fix current main CI baselines

* test(qa-lab): preserve provider mode literals
2026-08-06 17:52:37 -07:00
Dallin Romney b5369f8e5d fix(qa): replace false Codex pin compatibility evidence (#118012)
* test(qa): replace synthetic Codex pin evidence

* test(qa): update core runtime-pair count

* test(qa): cover official Codex plugin drift

* test(qa): preserve frozen candidate scenario ids
2026-08-07 08:45:26 +08:00
Peter Steinberger c663c39763 refactor(test): table-drive exact-duplicate test blocks, batch 2 (#120071)
* refactor(test): table-drive tooling test cases

* refactor(test): table-drive agent test cases

* refactor(test): table-drive core test cases

* refactor(test): table-drive plugin test cases

* refactor(test): table-drive package test cases

* chore(test): prune max-lines baseline

* fix(test): preserve table row literal types
2026-08-06 17:00:28 -07:00
Peter Steinberger 7c9596b007 refactor(test): adopt codex app-server test harness in worst-preamble suites (#120065)
* refactor(test): share codex app-server client fixtures

* refactor(test): share codex turn identifiers
2026-08-06 16:33:42 -07:00
Peter Steinberger bfd47df34d refactor(test): replace logic-bearing vi.mock factories with real modules and boundary fakes (#120063)
* refactor(test): use real Codex search module

* refactor(test): use real Slack slash command runtime

* test: satisfy Slack slash fixture lint
2026-08-06 16:32:33 -07:00
Peter Steinberger 0b849a316d refactor(plugins): single-source interactive dispatch and its auth downgrade via plugin SDK (#120062) 2026-08-06 16:31:04 -07:00
Leon-SK668 d64f5b6a09 fix(googlechat): redact reflected credentials in API errors (#119965)
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
2026-08-06 18:21:13 -05:00
Peter Steinberger d9ffbb3ed6 fix(memory): report persisted vector index state on unprobed status path (#120048) 2026-08-06 15:57:49 -07:00
Peter Steinberger b4a26783f7 refactor(test): consolidate duplicated requireRecord and provider HTTP mock helpers (#119982)
* refactor(test): consolidate duplicated test helpers

* test: remove stale record guard import

* fix(test): remove orphaned record guards

* refactor(test): keep record requirement messages exhaustively typed

* fix(test): keep packages/ai record guard package-local
2026-08-06 14:48:01 -07:00
Peter Steinberger f5e3b5ef54 refactor(plugins): single-source question reactions and preflight audio (#119987) 2026-08-06 14:47:36 -07:00
Peter Steinberger 9fdae501b8 refactor(test): table-drive duplicated test cases (#119973) 2026-08-06 12:37:43 -07:00
Kimi Yu dcf7fadf2c fix(slack): apply channel tool restrictions to normalized session IDs (#119408) 2026-08-06 11:39:22 -07:00
Patrick Erichsen 05e3ce11ac fix(release): restore Fish Audio ClawHub publishing 2026-08-06 11:31:37 -07:00
Peter Steinberger 70f84286c9 fix(telegram): preserve inbound quote attribution
Preserve native Telegram quote attribution in agent-visible input and terminate quotes before following ordinary text.

Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-08-06 21:11:02 +05:30
Peter Steinberger 9213792cdf refactor(qa): derive scenario runtime API from deps (#119974) 2026-08-06 08:40:53 -07:00
Vincent Koc 75e5c2694f fix(qa): enforce scenario provider lane metadata (#119908)
Punchcard-Session: cobalt-valley-meadow-mg
2026-08-06 23:33:17 +08:00
wangmiao0668000666 978f9b15eb fix(test): zalo lifecycle suites fail Windows teardown with EBUSY on agent state DB (#119809)
* fix(test): close zalo agent state databases before lifecycle temp-dir removal (#119796)

* fix(test): close zalouser agent state databases before ingress temp-dir removal (#119796)

* fix(test): close zalouser fixture databases before restoring parent state env (#119796)

ClawSweeper re-review finding: the ingress fixture restored
OPENCLAW_STATE_DIR before closing cached per-agent databases, so lease
release could open a shared-state write against the parent fixture env.
Move both closes ahead of the env restore (canonical fixture order) and
add a nested-environment regression asserting the parent state dir stays
untouched.
2026-08-06 23:26:38 +08:00
Vincent Koc f5add8197f test(qa): provide Matrix module-flow fixture (#119953)
Punchcard-Session: cobalt-valley-meadow-mg
2026-08-06 21:56:41 +08:00
Peter Steinberger 913b53ad80 fix(channels): preserve bundled delivery contracts
Preserves pending Telegram replies, Discord webhook preview policy, forwarded Slack file context, and QQBot target recognition.
2026-08-06 18:44:15 +05:30
Vincent Koc 95fd4d3dc9 fix(device-pair): keep notifier poll off Gateway startup (#119936)
Punchcard-Session: frost-harbor-willow-ev
2026-08-06 20:51:20 +08:00
Vincent Koc 52b8f9be80 fix(plugins): migrate Fish Audio plugin identity (#119900)
* fix(plugins): migrate Fish Audio plugin identity

* fix(plugins): tighten Fish Audio identity migration

* fix(plugins): follow catalog selector for id replacements

* fix(plugins): reject replacement install collisions

* refactor(plugins): reuse skipped update outcomes
2026-08-06 20:50:36 +08:00
Vincent Koc c4292bc8b2 fix(diagnostics): report exporter health in doctor and status (#119816)
* fix(diagnostics): report exporter health transitions

* fix(diagnostics): retire exporter health on shutdown

* test(diagnostics): enforce OTLP protobuf content type

* test(diagnostics): satisfy exporter test type contracts

* fix(diagnostics): redact endpoint-like exporter codes

* fix(diagnostics): coordinate exporter route health

* test(diagnostics): satisfy exporter health static gates

* fix(diagnostics): keep exporter health internal
2026-08-06 20:50:18 +08:00
Peter Steinberger 4d91d44d00 fix(telegram): preserve callback action ownership
Keep Telegram native and typed callback routes under their owning handlers. Expired or malformed typed buttons now clear their controls and return visible unavailable feedback while legacy raw plugin callbacks remain compatible.
2026-08-06 17:23:32 +05:30
Dallin Romney d6fc4a2a95 refactor(qa): make module flows implementation-aware (#118069) 2026-08-06 19:51:28 +08:00