Commit Graph

10796 Commits

Author SHA1 Message Date
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
Peter Steinberger 59dc87290f test(plugins): remove cache resize test knob (#121904)
* test(plugins): remove cache resize test knob

* chore(plugin-sdk): refresh cache closure hashes
2026-08-11 06:05:32 -07:00
Vyctor H. Brzezowski 16d0132c1b feat(ui): lead the chat header with the project and its own icon (#121734)
* feat(ui): show a workspace's own project icon in the chat workspace chip

Resolve the conventional project icon inside a session's workspace root once
per Gateway process and serve it over a strictly scoped authenticated route so
the Control UI can render real project identity instead of a folder glyph.

Refs #121723

* test(gateway): keep the workspace icon server teardown out of a promise executor return

* fix(ui): keep flat project icons legible on the workspace chip in every theme

* feat(ui): lead the chat header with the project, then the session title

Reorder the header into an identity trail — project chip, muted slash, session
title — rendered from one segment list so a later parent-session segment
extends it. Drop the project icon halo and record the flat-dark-icon contrast
tradeoff at the style site.

Refs #121723

* fix(ui): type the header identity trail segments without a lit result predicate

* fix(gateway): scope the workspace icon route to visible local sessions

Owner-gate the route so it cannot answer for sessions the caller's own
sessions.list would hide, withhold the workspace root of exec-node sessions so
a remote project never resolves to this host's icon, bound SVG icons before
they reach a renderer, and retry ordered Control UI credentials so a stale
saved token no longer silently drops the icon.

Refs #121723

* fix(ui): render the header project as a flat breadcrumb segment, not a badge

Drop the pill border, fill, and radius from the project name so it reads as a
quiet trail segment inline with the session title: one type size across the
trail, hierarchy carried by colour, hover and focus reusing the sibling title
button's tint so removing the border keeps a visible focus indicator.

Refs #121723

* fix(ui): balance the header trail separator spacing after the title pull-back

* test(ui): migrate the shared avatar loader tests to ordered credential arrays

* fix(ui): center the chat header identity trail

* refactor(ui): reuse workspace icon credentials

* test(ui): scope deleted-session recovery to the visible pane

* fix(ui): cache missing workspace icons across renders

* chore: refresh plugin SDK API baseline
2026-08-11 09:33:57 -03: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
Peter Steinberger 3cfb344f9f refactor(plugin-sdk): make API baseline module-mergeable (#121842) 2026-08-11 04:45:44 -07:00
Peter Steinberger 12165769c7 refactor(agents): move OpenRouter failover ownership to its plugin and derive reason schemas from one tuple (#121898)
* refactor(agents): centralize failover ownership and reasons

* test(agents): move OpenRouter failover cases to plugin owner

* fix(agents): preserve prepared provider failover ownership

* test(agents): avoid failover mock shadowing

* fix(agents): preserve provider owner in error copy

* fix(agents): complete provider owner propagation

* chore(plugins): refresh failover type closure hashes
2026-08-11 04:30:18 -07:00
Peter Steinberger 992126e382 refactor(sessions): drop the Sqlite infix from session-accessor exports (#121536)
* refactor(sessions): drop the Sqlite infix from session-accessor exports

The storage-neutral seam completed its file->SQLite swap on 2026-07-27;
the Sqlite-infixed export names and their X-as-Y rename blocks were the
fossil of that migration, giving every accessor operation two greppable
names. Rename ~148 exports to their canonical names at the definition
sites, delete the message-cut facade (its conflict->failed mask had one
consumer, which already handles conflict), collapse the remaining pure
delegates, and keep honest SQLite-mechanics names (scope resolution,
canonical repair, in-transaction primitives, storage-row types). The main
barrel's exported surface is byte-identical. Net -203 production LOC.
Part 2 of the session-accessor dual-layer collapse (part 1: #121316).

* fix: repair main-breaking lint/type/test failures blocking PR CI

Three breakages landed on main that push CI's changed-scope never runs:
a caught-error cause missing in the release-validation script and two
type errors in the package-acceptance test (direct commit 1f591bba56),
and a memory-host regression where fs-safe 0.5.4 (#121508) started
throwing FsSafeError("not-file") for extra-path reads whose parent chain
hits a regular file, breaking the missing-file empty-text contract that
rejection unchanged.

Item 4 repairs managed-image action E2E narrowing from bad30d5a74 (#77017).
Item 5's chat-message mock repair was superseded upstream by 750d0dcd9e, whose broader fetch typing and explicit download capture preserve the same contract.
Item 6 restores #121258's cursor token contract after #77017 hard-coded pointer.
Item 7's managed-image thumbnail-path repair was superseded upstream by 750d0dcd9e, which preserves the same contract in main's reorganized URL structure.
Item 8 records #121600's explicit command-bearing lifecycle classification.
Item 9's cron assertion repair was superseded upstream by 3cd034f7a8, whose exact diagnostic rewrite includes the same redacted alert contract.
Item 10 forwards fs-safe 0.5.4 bigint lstat options through the snapshot mock.
Item 11 refreshes release-matrix test ownership after 1f591bba56.
Item 12 awaits f3e1efead48's setup-admission settlement in direct session tests.
Item 13's media FileStore-key repair was superseded upstream by cf432ec871, which fixes the same Windows root cause at the owner boundary.
Item 14 regenerates Swift approval reviewer fields added by 9935ca3b30.
2026-08-11 11:13:29 +00:00
Peter Steinberger bcaec0cf14 fix: resume main sessions after gateway restarts (#121969)
* fix(agents): always resume main sessions after restart

* fix(ui): render internal messages as system rows

* docs: update gateway restart recovery semantics

* refactor(sessions): simplify restart hook checkpoints

* refactor(agents): consolidate restart recovery claims

* test(agents): update delivery recovery revision guard

* fix(plugin-sdk): preserve restart hook state contract

* fix(ui): localize system row label

* test(agents): remove obsolete recovery import

* test(agents): align abort-code propagation with always-resume recovery

* fix(ui): share notice-aware turn boundaries

* test(agents): reconcile restart recovery ownership

* fix(ci): reconcile rebased recovery and UI checks
2026-08-11 04:01:34 -07:00
Peter Steinberger ffc665bbb3 fix(discord): keep durable forum batches in one thread (#121165) 2026-08-11 03:54:26 -07:00
Peter Steinberger bef753b278 refactor(agents): split reply-run registry into concept modules (#121995) 2026-08-11 03:38:54 -07:00
Peter Steinberger 771bece21b docs(config): refresh generated baseline hash (#121992)
The drift starts with bdf202ccc8 (#121653), which changed the skills.workshop.autonomous.mode help text without regenerating the config docs baseline.
2026-08-11 03:23:54 -07:00
Peter Steinberger 2731dc24e5 fix(plugin-sdk): keep inbound reply shim through next SDK major (#121922)
* fix(plugin-sdk): honor major-gated reply shim retirement

* fix(plugin-sdk): preserve compat code literals

* chore(plugin-sdk): refresh compatibility API baseline
2026-08-11 03:18:07 -07:00
SunnyShu d758ec48d4 fix(context-engine): durable state stalls in long sessions (#121647)
* [AI] fix(context-engine): bound accepted-turn cap to the current turn range

The accepted-turn transcript read applied the 8 MiB / 20k-event cap to
the entire active prefix instead of the admitted turn range, so durable
context engines permanently blocked every later small turn once session
history exceeded the cap. Restrict the cap check to rows at or after the
admission message position while preserving the full messages +
prePromptMessageCount payload contract.

Fixes #121623

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

* [AI] test(context-engine): clean up large-prefix regression temp dirs

ClawSweeper P3: the two new accepted-turn regression cases created
multi-megabyte SQLite fixture directories that were never removed.
Track them and delete them in afterEach.

Related to #121623

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

* oc-136: make durable turn commits turn-local

* oc-514: use canonical temp-dir cleanup helper

* oc-514.7: version turn-local durable commits

* oc-514.9: preserve legacy durable rows

* oc-514.8: refresh plugin SDK API baseline

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Josh Lehman <550978+jalehman@users.noreply.github.com>
2026-08-11 02:52:49 -07:00
joshavant acb61d365e fix(cron): preserve authority during validated updates 2026-08-11 04:47:10 -05:00
joshavant bb873c8806 fix(cron): preserve Codex app authority 2026-08-11 04:47:10 -05:00
Peter Steinberger 38fabc4e03 refactor(state): retire tenant-free agent lease schema (#121943)
* refactor(state): retire agent lease schema

* chore(plugin-sdk): refresh schema version closure

* test(state): preserve v17 migration fixtures

* docs(state): align lease schema inventory
2026-08-11 02:42:56 -07:00
Peter Steinberger b067a4dce3 fix(secrets): reject empty secret values and classify oversized input as validation (#121947) 2026-08-11 02:30:04 -07:00
Peter Steinberger 53407b154d fix(agents): remove stale media completion reply mechanics (#121937)
* fix(agents): remove stale media completion reply mechanics

Make generated image, music, and video completion wakes follow the current tool-agnostic visible-reply contract, preserving every structured attachment without NO_REPLY or transport-specific instructions.

Refs #121933.

* test(agents): remove stale media helper

Delete the unused assertion helper left behind by the table-driven generated-media completion coverage.\n\nRefs #121933.

* test(tooling): wait for profiler descendant pid

Require the PID file to contain a valid positive process ID before asserting profiler descendant cleanup, closing the create-before-write CI race.\n\nRefs #121971.
2026-08-11 02:29:05 -07:00
Ayaan Zaidi 73d4c07bd5 fix(delivery): record ambiguous final loss as durable notice debt (#121833)
A final reply whose platform send was accepted but whose response was lost
previously ended in silence. Custody that stays unknown after a claimed send
now records durable pendingDeliveryNotice debt; the next same-route turn
delivers one "could not confirm delivery" notice and acknowledges it into the
transcript. Restart recovery completes ambiguous sessions with the same debt
instead of a fire-and-forget notice; the debt survives reset and rollover, and
suppressed notice sends retain it instead of faking delivery. Permanent typed
no-send rejections settle as terminal suppression (no replay, no false
notice); retryable ones restore prepared custody for safe replay. Google Chat
media-only rejections use the typed no-send contract; Telegram native-command
replies join pending-final custody.

Fixes #80362

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-08-11 09:25:04 +00:00
Peter Steinberger e71d56d557 feat(cloud): let cloud sessions spawn and message cloud children (#121846)
* feat(cloud): add nested worker session capabilities

Amp-Thread-ID: https://ampcode.com/threads/T-019feaaa-c7ed-769e-9f29-a3612bec72e7

* fix(cloud): harden nested worker sessions

Amp-Thread-ID: https://ampcode.com/threads/T-019feaaa-c7ed-769e-9f29-a3612bec72e7

* fix(cloud): repair exact-head integration

Amp-Thread-ID: https://ampcode.com/threads/T-019feaaa-c7ed-769e-9f29-a3612bec72e7

---------

Co-authored-by: Amp <amp@ampcode.com>
2026-08-11 02:07:49 -07:00
Ayaan Zaidi ba9e72c17f fix(heartbeat): deliver to the last conversation by default (#121892)
Unset heartbeat.target silently collapsed into the explicit "none" opt-out: heartbeats ran every 30m by default, elected notifications were dropped with only an in-memory event, and health read fine. Unset now resolves to "last" (the most recent conversation); explicit target: "none" keeps its internal-only contract. Polls skip pre-model with reason no-route while no route exists yet, and status/doctor surface the waiting-for-route state. Deliberate maintainer-owned default cutover: existing installs without a configured target start receiving heartbeat alerts in their last conversation after upgrade.

Fixes #121880

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-11 08:45:30 +00:00
Peter Steinberger d7df852bb4 docs(onboard): fix non-interactive command examples (#121954)
Align copyable onboarding commands with the mandatory risk acknowledgement and an explicit health disposition for config-only automation.\n\nRefs #121951.
2026-08-11 01:35:00 -07:00
Peter Steinberger 64e3712e82 refactor(skills): split workspace loading into concept modules (#121916)
* refactor(skills): split workspace loading into concept modules

* refactor(skills): delete dead seams and duplicate helpers

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

* chore(plugin-sdk): refresh API baseline

* refactor(skills): internalize discovery result type

* test(tooling): drop stale unit-fast fixtures
2026-08-11 01:28:20 -07:00
Ayaan Zaidi 210aca6de3 fix(gateway): prevent restart replay after final delivery (#121908)
Re-lands the reverted #121507 on the current custody contracts. The reply dispatcher now owns direct-send pending-final custody: claim before provider I/O, terminal settlement for delivered/suppressed/failed outcomes, proven no-send stays replayable, ambiguous evidence fails closed — so Gateway restarts can no longer duplicate an already-accepted final reply.

Proof: ClawSweeper local review clean, exact-head ci-gate green, live Telegram E2E (one turn, one final, no duplicates).

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-08-11 13:09:59 +05:30
Peter Steinberger ea06d72e85 feat(secrets): manage team secrets in Control UI (#121724)
* feat(secrets): add gateway store settings

* perf(control-ui): trim secrets startup copy

* perf(control-ui): reduce secrets startup payload

* fix(secrets): harden store mutation refresh

* perf(control-ui): meet secrets startup budget

* test(control-ui): update secrets navigation copy

* fix(ui): pluralize secret-detection count and drop duplicated dialog hint

* chore(protocol): regenerate gateway clients and SDK baseline after rebase

* fix(gateway): merge secrets store methods after project RPCs in advertised order

* chore: leave changelog to release generation

* test(gateway): retain desktop launch train coverage
2026-08-11 07:20:38 +00:00
Peter Steinberger fa03d9b913 refactor: consolidate coercion helpers (#121366)
* refactor: consolidate coercion helpers

* fix: remove duplicate coercion imports

* fix: preserve serialized coercion guard

* chore: ratchet coercion helper carve-outs

* fix(test): keep gauntlet subprocess startup lean

* fix: preserve imported session timestamp semantics

* fix: preserve catalog timestamp string semantics

* chore: align plugin SDK surface ratchet

* fix: preserve trajectory and SDK string contracts

* fix(test): preserve QA record assertion semantics

* fix: complete standalone record guard rename

* refactor(cron): use canonical string coercion

* fix(acpx): preserve Pi timestamp parsing

* test(channels): adapt custody test harnesses

* test(telegram): classify media harness as test support

* test(acpx): split timestamp contract coverage

* test(channels): support generated custody contracts

* chore: ban the full coercion helper name set

Extends the declaration guard to all eleven consolidated helper names and
renames the cron schedule-identity readNumber wrapper to readScheduleInteger
so the banned generic name cannot regrow.

* fix(scripts): repair release-validation guard drift and lint cause

Restores the renamed isJsonRecord guard in assertTrustedWorkflowHarness after
main added isRecord call sites in parallel, and attaches the caught YAML error
as the thrown error cause (preserve-caught-error was red on main).

* fix: preserve Claude timestamp string semantics

* fix: preserve persisted timestamp string semantics

* fix: preserve date-first timestamp contracts

* fix(openai): harden delegation failure formatting

* chore: close coercion helper guard gaps

* test(openai): model non-error delegation rejection

* chore: refresh plugin SDK API contract

* fix(tasks): use canonical string field reader

* fix(ai): use canonical provider error field coercion

* fix(browser): migrate native bootstrap coercion

* docs(plugin-sdk): clarify text record export compatibility

* fix(gateway): normalize approval execution identity

* test(outbound): isolate message action poll harness
2026-08-11 00:02:18 -07:00
Peter Steinberger f788af0238 docs(memory): explain automatic QMD migration (#121911) 2026-08-10 23:57:34 -07:00
Peter Steinberger 432356a684 refactor(gateway): migrate internal agent turn callers to the typed facade (#121715)
* refactor(gateway): migrate internal agent turn callers

* test(gateway): mock typed subagent turn facade

* fix(gateway): preserve typed turn authorization

* chore(plugin-sdk): refresh typed facade closure hashes

* fix(gateway): validate typed agent turn requests

* fix(gateway): preserve typed turn lifecycle parity
2026-08-10 22:59:28 -07:00
Peter Steinberger 36fbd869ed refactor(agents): eliminate export name collisions (#121768)
* refactor(auth): consolidate profile helper owners

* refactor(agents): consolidate subagent registry reads

* refactor(agents): disambiguate runtime placement helpers

* refactor(agents): disambiguate helper exports

* chore(scripts): burn export collision debt

* test(agents): follow moved subagent read owner
2026-08-10 22:24:33 -07:00
Peter Steinberger 90ddeb4b40 refactor(agents): absorb overflow, retry, and matcher duplicates into the failover substrate (#121817)
* refactor(ai): centralize context overflow matching

* refactor(agents): add retry evidence and guarded status facets

* refactor(agents): absorb assistant retry and key matchers

* chore(plugin-sdk): refresh failover closure hashes

* fix(agents): consume retry evidence at altitude zero

* test(agents): narrow retry corpus provider fixtures

* test(agents): keep retry corpus sorting immutable
2026-08-10 22:07:21 -07:00
Vyctor H. Brzezowski 9327c10d2b feat(ui): edit a queued chat message in place (#121692)
* feat(ui): edit a queued chat message in place

The pencil on a queued row, or a double-click, lifts the message and its
attachments into the composer. The row stays where it is, marked Editing,
so the position the corrected message will take is visible rather than
promised. The composer shows an edit banner with an X to cancel.

Cancelling touches storage not at all, because the row never left the
queue. Sending retires the original and hands its position to the
replacement, which lands in the same slot. While an edit is open the
drain refuses that row, so a reconnect cannot deliver the text the
operator is visibly rewriting; the queue behind it waits, which is the
same contract the held position promises.

* fix(ui): retire an edited queued row only with its replacement

The send retired the source row first and admitted the replacement second,
so a rejected store write left the operator with neither: the original gone,
the replacement never persisted, and the attachments it dropped already
released. Admission now carries the source id and swaps both rows in one
store write, so a rejected write changes nothing and the edit stays open on
the row that is still there, which is what cancelling already promises.
Filtering the source before the cap check also keeps a replacement
admissible on a full queue.

The edit token recorded only the session key, but an outbox is scoped by
session and agent, and a raw global session keeps its key while the selected
agent changes underneath it. The token now carries the agent that owned the
row and every reader validates the whole scope, so a send after a switch
cannot retire a row in the outbox it left behind.

* fix(ui): hold an edited queued row across every pane

Panes share one outbox and one drain lane while composer state stays per
pane, so the hold that keeps a row from being delivered while it is rewritten
was invisible to the pane that drained it: a session event in a second split
pane resumed every stored outbox, saw no edit, and sent the original text.
The hold is now read across every pane subscribed to the outbox, which keeps
one source of truth — each pane's own scope-validated edit — and needs no
lifecycle of its own, so closing a pane or switching agent releases it by
simply no longer being an active edit.

The payloads an edit owns now travel with its token. The write that admits
the replacement retires the source row and tells every pane synchronously, so
by the time the send released the images the replacement had dropped, the row
holding them was already gone and nothing was released. That leaked the
payload and its object URL for the rest of the browser session.

* fix(ui): release attachments from cancelled queue edits
2026-08-11 01:59:56 -03:00
Peter Steinberger c5b7b8e33c fix(system-agent): setup chat fails silently on dev-roster gateways (#121784)
* fix(system-agent): repair setup-chat execution identity, harness fallback, and error surfacing

Always inject the reserved "openclaw" execution entry for off-roster system-agent runs.
Keep implicit harness runtime selection implicit so Codex refusal falls back to the OpenClaw harness, while explicit policy remains fail-closed.
Log openclaw.chat turn failures and surface their underlying causes in the UNAVAILABLE response.

* chore(plugin-sdk): refresh agent harness API baseline

* test(system-agent): align fixtures with optional harness routes

* fix(system-agent): keep execution roster out of TUI catalog lookup

* refactor(system-agent): keep verified state types internal

* fix(system-agent): separate setup policy and execution config
2026-08-10 21:44:00 -07:00
Josh Avant 73a9eed95b refactor(audit): add canonical admitted-run context (#120534)
* feat(audit): carry canonical admitted execution context

* fix(agents): preserve admitted context across retries

* fix(worker): fence legacy launch dialect

* test(gateway): track approval temp dirs

* fix(plugin-sdk): preserve harness attempt compatibility

* fix: close delegated run authority at owner boundaries

* fix: internalize delegated authority validators

* refactor: split delegated authority proof surfaces

* refactor: centralize command admission identity

* test: claim runtime tool authority

* fix(gateway): keep lifecycle cleanup within static budgets

* fix(agents): revalidate harness policy authority

* fix(agents): fence awaited approval capability results

* test(copilot): supply required harness capability fixtures

* fix(agent): preserve scoped embedded run admission

* fix(agent): preserve keyless and worker authority

* test(agent): bind incomplete-turn authority

* docs: preserve execution authority invariants

* chore(plugin-sdk): regenerate API baseline

* fix(gateway): notify pending claim closure

* fix(gateway): revalidate delegated tool authority

* fix(plugin-sdk): keep source guard internal

* fix: close delegated authority races

* fix: revalidate delegated side effects

* fix: close harness authority projection gaps

* fix: align authority integration types

* fix: isolate settled harness finalization

* fix: fence recovery identity finalization

* fix: preserve committed session worktrees

* fix: preserve worker placement agent identity

* fix: fence active harness tool work

* fix(plugins): restore embedded run admission owner

* chore(plugin-sdk): compose integrated surface budgets

* fix(copilot): keep finalization attempt type internal

* fix(plugins): complete admission owner type imports

* test(harness): use settled finalization attempt shape

* fix(security): retain exact side-run and approval authority

* fix(security): preserve protected authority through terminal sweep

* fix(agents): follow moved recovery store owner

* fix(ci): align integrated authority owners with gates

* fix(plugins): distinguish embedded agent adapter export

* chore(plugin-sdk): regenerate API baseline after rolling integration

* refactor(gateway): keep session authority within owner budgets

* fix(gateway): keep session helpers private

* docs(plugin-sdk): name the V2 parameter subpath

* chore(integration): reconcile worker and SDK surfaces

* docs(plugin-sdk): require the V2 host API floor

* chore(plugin-sdk): regenerate after proxy-auth integration
2026-08-10 23:15:20 -05:00
Peter Steinberger 768f53d345 fix(secrets): resolve default aliases by source (#121630) 2026-08-10 21:05:26 -07:00
Peter Steinberger 7dbc2916a3 fix: cloud workers work with trusted-proxy browser auth (#121671)
* fix(ui): make cloud recovery scope gateway-owned

Allow trusted-proxy and other authorized browser sessions to use cloud workers without deriving recovery ownership from client-visible credentials or Web Crypto. The Gateway now emits an opaque principal-bound recovery scope.

* test(gateway): type recovery scope fixture

* fix(ui): preserve cloud recovery across upgrades

Keep the shipped credential-derived scope for older v4 Gateways and migrate credential-proven pending recovery rows to the Gateway-owned namespace before publishing readiness.

* perf(ui): lazy-load recovery migration

* fix(ui): preserve canonical recovery promotion

* test(ui): use deterministic provider navigation

* fix(ui): authorize recovery scope migration

* build(plugin-sdk): refresh recovery compatibility baseline

* test(gateway): expect recovery migration authorization
2026-08-10 20:52:55 -07:00
Vyctor H. Brzezowski 619f3c9ab1 feat(ui): identify project files in Control UI chat (#121775)
Recognized workspace paths in chat now read as their basename behind a
file-type glyph, so a file reference is identifiable before it is read.
Markdown, package manifests, TypeScript and other code, TSX/JSX components,
config/data, shell scripts, and images each get their own mark; anything else
falls back to a plain document. Paths sharing a basename keep the smallest
trailing suffix that tells them apart, and Windows paths keep their own
separator.

Classification wins over authoring syntax: a path written in backticks is a
file link first, so it drops the inline-code chip and renders exactly like a
bare path beside it. Code spans that are not file links keep the chip.

The full path stays addressable: it drives the file panel, the new tooltip,
and the message Copy action (which returns the original Markdown).
Author-written labels in [label](path) links are never rewritten, and text
that is not a recognizable path stays plain prose.

The glyph is painted as a masked ::before like the sibling GitHub mark, so it
stays out of the accessibility tree and out of copied text and follows the
link color in every theme. Extension classification moves to one shared
resolver that the file preview modal now uses too, replacing its own
code/text extension set.
2026-08-11 00:48:43 -03:00
Peter Steinberger b5d5ec340f feat(cloud-workers): add desktop apps and browser autonomy (#121475)
* feat(cloud-workers): add desktop apps and browser autonomy

provider-attested Browser/Terminal launchers, shared visible loopback CDP Browser tool, no MCP/cookies/generic command.

* feat(ui): add cloud desktop app launcher

* docs(gateway): document cloud desktop apps and browser autonomy

* perf(ui): trim desktop launcher startup copy

* refactor(ui): simplify desktop launch feedback

* perf(ui): reuse desktop app labels

* fix(ui): keep desktop launch failures actionable

* fix(crabbox): allow browser bootstrap to finish

* fix(cloud-workers): honor provider provision budgets

* fix(cloud-workers): persist browser screenshot receipts

* fix(cloud-workers): bound browser screenshot lifecycle

* fix(cloud-workers): avoid replaying desktop launches

* test(cloud-workers): isolate browser runtime integration

* refactor(cloud-workers): tighten desktop runtime boundaries

* test(cloud-workers): keep browser runtime mock synchronous

* fix(cloud-workers): break gateway type import cycle

* fix(ci): settle admitted setup sessions in tests

* build(plugin-sdk): refresh desktop app contract

* ci: refresh merge-tree validation

* build(plugin-sdk): regenerate desktop app baseline

* style(gateway): format merged method order test
2026-08-10 20:31:07 -07:00
Peter Steinberger ebfd3ba154 improve: cut CI critical path without more workers (#121807)
* test(ci): remove redundant builds from critical path

Amp-Thread-ID: https://ampcode.com/threads/T-019fee8d-665d-707b-a380-23f2a6a1ce03
Co-authored-by: Peter Steinberger <steipete@gmail.com>

* docs(ci): format runner table

Amp-Thread-ID: https://ampcode.com/threads/T-019fee8d-665d-707b-a380-23f2a6a1ce03
Co-authored-by: Peter Steinberger <steipete@gmail.com>

---------

Co-authored-by: Amp <amp@ampcode.com>
2026-08-10 20:21:20 -07:00
ffyuuu efe5d8d76e fix(longcat): correct cache pricing and add provider icon (#121369)
* longcat: align baseUrl with docs, fix cacheWrite pricing, add brand icon

- Point baseUrl at the documented https://api.longcat.chat/openai/v1 path
  instead of the undocumented unversioned alias route.
- Fix cacheWrite pricing to 0: the LongCat pricing page has no separate
  cache-write charge (matches deepseek/moonshot/zai catalog conventions).
- Update the pricing page link to the current docs path.
- Add the official LongCat brand icon (provenance recorded in
  ATTRIBUTION.md) and display-name mapping so the Control UI shows proper
  branding instead of the letter-badge fallback.
- Migrate the persisted legacy default baseUrl via a plugin-owned doctor
  configRepair contract: onboarding persists
  models.providers.longcat.baseUrl and the runtime reads the stored value,
  so the contract rewrites exactly the former default to /openai/v1,
  preserves custom endpoints, and warns via a legacy-config rule.

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

* fix(longcat): correct provider metadata

* fix(longcat): migrate persisted stock pricing

* style(longcat): format doctor repair

* fix(longcat): preserve doctor migration after compat cleanup

* fix(longcat): avoid map spread in doctor repair

---------

Co-authored-by: yuzehui02 <yuzehui02@meituan.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
2026-08-10 20:15:18 -07:00
Marvinthebored bd897a6143 fix(exec): make timeout unit explicit (#119874)
* fix: exec timeout field does not state its unit, so callers pass milliseconds

`exec.timeout` is in seconds, but its sibling `yieldMs` is in milliseconds and
the `process` tool's identically named `timeout` is also in milliseconds. Those
two tools are used together in one workflow: exec backgrounds a long command,
then process polls it.

The unit exists only in the field description, and code mode deliberately defers
descriptions - the model sees `timeout?: number` and nothing else. A caller that
guesses milliseconds passes 900000 intending 15 minutes and gets ~10 days, so
the command never times out.

Add `timeoutSeconds` as the canonical field, matching the convention already
used by the config default (`tools.exec.timeoutSeconds`) and the sibling
(`yieldMs`). Keep `timeout` as a deprecated alias; `timeoutSeconds` wins when
both are supplied. Project the new field onto `nodeExecSchema`, which
hand-picks its properties.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XQojYRCUdXhcKFeu4QW5Gh

* fix(ci): satisfy test-type and dependency checks

Two CI failures from the test approach, not the change itself.

- check-test-types: TypeBox's TOptional does not surface `description` on its
  static type, so the schema assertions failed under tsgo. Read it through a
  narrow accessor instead.
- check-dependencies: knip flagged resolveExecTimeoutSeconds as an unused
  export because only the test imported it. Move it beside the schema it
  resolves, where the exec runtime imports it, so it is production-reachable.

Verified with the same commands CI runs: `run-tsgo.mjs -p
test/tsconfig/tsconfig.core.test.json` reports no errors in these files, and
knip --production reports no unused exports.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XQojYRCUdXhcKFeu4QW5Gh

* fix(ci): fit the exec description budget and satisfy oxlint

- `agent-tools.schema.test.ts` enforces a 550-char budget on the exec tool's
  model-facing descriptions; the two new ones pushed it to 640. Shortened both.
  The rename is what makes this possible: the unit now lives in the field name,
  so the description no longer has to carry it. Extended that budget test to
  pin `timeoutSeconds` alongside `timeout`.
- oxlint `no-base-to-string`: the test's description accessor typed the field as
  `unknown` and stringified it. Typed as `string | undefined` instead.

Verified: budget test passes (137 tests green across both suites), and all six
behavior tests still fail against origin/main.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XQojYRCUdXhcKFeu4QW5Gh

* fix: remove the unit-ambiguous exec timeout field instead of deprecating it

Owner decision on the review's "ambiguous model-visible alias" finding: drop
`timeout` entirely rather than keep it as a deprecated alias.

Keeping it visible defeated the purpose. Code mode renders property names and
types and defers descriptions, so a model would still be offered a bare
`timeout` sitting next to a millisecond-based `yieldMs` and could still pick it.
A deprecation marker in a description the model never sees changes nothing.

Backward compatibility is not required here: every tool call is constructed
fresh by the model from the current schema, and a repository search found no
internal caller passing `timeout` to the exec tool. `timeoutSeconds` is now the
only exec timeout field, on both the main and node-only surfaces.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XQojYRCUdXhcKFeu4QW5Gh

* fix: migrate the internal exec callers to timeoutSeconds

Removing `timeout` from the exec schema broke three real internal callers that
the earlier survey missed, plus two test files and the runtime's own reads.
`check-test-types` caught it; my local search had filtered `timeout:` matches to
lines mentioning "exec" and discarded these.

- src/auto-reply/reply/bash-command.ts
- src/auto-reply/reply/commands-diagnostics.ts
- src/auto-reply/reply/commands-export-trajectory.ts
  all passed `timeout: timeoutSec` and now pass `timeoutSeconds: timeoutSec`.
- bash-tools.exec-run.ts reads the field through the same typeof narrowing the
  third call site already used; `params` is loosely typed, so a raw read is
  `unknown`.
- Test fixtures updated. A vitest `waitFor({ timeout })` option in
  background-abort.test.ts is NOT an exec param and was left alone.

`run-tsgo.mjs -p test/tsconfig/tsconfig.core.test.json` now reports zero errors
in changed files; the 5 remaining `rejectSymlinks` errors are pre-existing on
main. 148 tests pass across the affected suites.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XQojYRCUdXhcKFeu4QW5Gh

* docs: synchronize the exec config table with timeoutSeconds

Addresses the P2 finding. The tools.exec.timeoutSeconds row still described the
per-call override as `timeout` and `timeout: 0`, which no longer exist. The
only remaining bare `timeout` reference in this page is the deliberate
contrast with the process tool's millisecond field.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XQojYRCUdXhcKFeu4QW5Gh

* fix: migrate the QA lifecycle caller and the shared ExecToolArgs contract

Two findings from the re-review of 6e8c3560e7, both real.

[P1] test/e2e/qa-lab/runtime/openclaw-exec-process-lifecycle.e2e.test.ts:174
still passed `timeout: 0.05`. After the removal that field is accepted and
ignored, so the call silently used the default timeout and could not produce
the asserted 50 ms `overall-timeout` result. Migrated.

[P2] ExecToolArgs in bash-tools.exec-request-preparation.ts:33 still declared
`timeout?: number` while the runtime reads only `timeoutSeconds`, offering
request-preparation users an accepted-but-inert argument. Renamed.

Why the typecheck missed both: ExecToolArgs is
`Record<string, unknown> & {...}`, and that index signature defeats excess
property checking, so a stale member produces no error at any call site. The
e2e file also sits outside the core test tsconfig I had been running locally.

Left alone deliberately: `processTool.execute({ action: "poll", timeout })` is
milliseconds and correct, and `createBashTool` in sessions/tools/bash.ts is a
separate tool surface with its own timeout.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XQojYRCUdXhcKFeu4QW5Gh

* fix(test): update the node exec tool property assertion to timeoutSeconds

src/gateway/tool-resolution.exclude.test.ts:413 asserts the exact property list
of the node-forced exec tool and still expected "timeout". Renamed to match
nodeExecSchema.

Found by checks-node-compact-large-5; my local core-test tsconfig does not cover
src/gateway, so it did not surface there.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XQojYRCUdXhcKFeu4QW5Gh

* fix: accept the legacy exec timeout as an undocumented alias

Removing the field from the schema does not reject it at runtime: the exec
schema accepts unknown properties, so a call built against an older schema was
accepted and then silently ignored, taking the default deadline instead of the
one it asked for.

Route every read through resolveExecTimeoutSeconds, which prefers the canonical
timeoutSeconds and falls back to a numeric timeout. The alias stays out of
execSchema, nodeExecSchema and ExecToolArgs, so no new caller can adopt it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XQojYRCUdXhcKFeu4QW5Gh

* docs: update the background-process guide to timeoutSeconds

The exec parameter table and the inheritance note still taught `timeout` and
`timeout: 0`, which kept the retired spelling publicly discoverable and
contradicted the exec guide.

`poll`'s own millisecond `timeout` is left alone; it is a different tool and a
different unit, which is the collision this rename removes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XQojYRCUdXhcKFeu4QW5Gh

* fix(exec): reject removed timeout field

* chore: regenerate plugin SDK API baseline

---------

Co-authored-by: Marvinthebored <262704729+Marvinthebored@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
2026-08-10 20:02:53 -07:00
Peter Steinberger fada067277 feat(browser): add zero-click Chrome extension bootstrap (#121586)
* feat(browser): add zero-click extension bootstrap

Pre-register deterministic path-derived extension IDs and install a strict native messaging host.

Keep the popup and options UI minimal while removing the obsolete copilot and page-share flows.

* fix(browser): satisfy native bootstrap CI guards

* test(browser): isolate native bootstrap Chrome roots

* test(browser): flush native bootstrap profile before status

* test(browser): seed Linux native bootstrap identity

* fix(browser): preserve native bootstrap upgrade safety

Allow immutable root-owned package inputs while keeping mutable state, manifests, and launchers user-owned. Preserve all retired copilot keys whenever active or unrecognized recovery custody remains.

* fix(browser): preserve pending copilot custody

Retired cleanup now removes copilot state only when the durable registry is exactly empty. Any session, archive, malformed value, future shape, or read failure preserves every retired key.

* fix(browser): guard native bootstrap upgrades

Fail closed while retired copilot custody remains and make discard durable across partial failures.

Require exact launcher-embedded origins and repair full launcher drift without accepting mismatched registrations.

* fix(browser): remove stale layout export

* chore(release): leave changelog to release flow
2026-08-10 19:31:13 -07:00
Peter Steinberger d6f70a96cb fix(plugins): native commands execute the selected plugin (#121544)
* fix(plugins): preserve selected command identity

* test(telegram): use scoped command registries

* test(telegram): isolate command runtime fixtures

* test(telegram): warm native command runtime

* refactor(plugins): keep command metadata private

* fix(plugins): accept synchronous command handlers

* fix(plugins): scope command drain bypass to live execution

* test(telegram): use scoped command registry fixtures

* test(telegram): isolate native menu runtime fixtures

* test(telegram): isolate login session store

* test(telegram): surface login flow failures

* test(telegram): preload native login module

* test(telegram): scope native command registries

* fix(plugins): complete command dispatch contracts

* fix(plugins): break command dispatch import cycles

* fix(plugins): stabilize command dispatch contracts

* fix(channels): keep plugin dispatch options internal

* fix(plugins): keep command dispatch carrier opaque

* test(channels): align delivery adapter fixtures

* test(delivery): align custody ownership coverage

* test(delivery): align latest queue reconciliation

* test(channels): drop obsolete delivery wrappers

* fix(plugins): rebind channel reload starts

* fix(plugins): scope command catalog reloads

* fix(ci): align current runtime contracts

* chore(plugin-sdk): refresh API baseline
2026-08-10 19:30:47 -07:00
Josh Avant bdd35432dd perf(checks): accelerate fresh changed gates (#121805) 2026-08-10 21:30:24 -05:00
Jesse Merhi d90e47783d fix(plugins): remove local dependency denylist (#101813) 2026-08-11 12:21:29 +10:00
Peter Steinberger 76b6496f34 perf(gateway): defer non-startup runtime imports (#121780)
Amp-Thread-ID: https://ampcode.com/threads/T-019fec00-3abd-710b-b9de-8925c23ad779

Co-authored-by: Amp <amp@ampcode.com>
2026-08-10 19:17:40 -07:00
Vito Cappello 9320bd379e fix(ollama): enable cloud max thinking (#121074)
Co-authored-by: VACInc <3279061+VACInc@users.noreply.github.com>
2026-08-10 19:06:54 -07:00
Peter Steinberger a381aa3e8b fix(memory): restrict multimodal indexing to extra paths (#121627)
* fix(memory): restrict multimodal indexing to extra paths

* fix(state): add lazy secret store schema ensure

* fix(state): bound lazy secret store schema

* chore(plugin-sdk): refresh API baseline
2026-08-10 19:00:45 -07:00
Peter Steinberger 52e3149ed7 feat(secrets): inject store env into agent exec (#121773) 2026-08-10 18:59:32 -07:00
Peter Steinberger b985d5a1ed feat: stream live subagent progress in task events (#121549)
* feat(tasks): stream live subagent activity

* fix(tasks): correlate edit activity from start events

* fix(gateway): sanitize live task activity

* test(reply): align custody harnesses with lifecycle

* fix(outbound): preserve post-send recovery evidence

* fix(types): align reply harnesses with current contracts

* fix(tasks): preserve activity liveness and SDK parity

* test(sdk): avoid unsafe task summary assertion

* chore(contracts): refresh Plugin SDK API baseline
2026-08-10 18:37:58 -07:00
Peter Steinberger dd2aedf08f refactor: burn export name collision debt (#121767)
* refactor(tasks): disambiguate lifecycle helpers

* refactor(channels): clarify account and id helpers

* refactor(media): separate SDK facades from cores

* refactor(auto-reply): consolidate command helpers

* refactor(cli): disambiguate registration helpers

* refactor(gateway): clarify runtime and test helpers

* chore(scripts): burn resolved collision debt

* fix(refactor): update remaining core callers

* fix(refactor): update remaining UI callers

* chore(plugin-sdk): refresh API baseline
2026-08-10 18:17:13 -07:00