20376 Commits

Author SHA1 Message Date
zeroaltitude
8eac832ea9
fix(browser): skip CDP URL lookup for existing-session profiles
existing-session profiles set cdpUrl to '' (Chrome MCP auto-connect, no
CDP port). Passing an empty cdpUrl to getPageForTargetId would always fail
silently, leaving postRunUrl undefined and falling back to the stale pre-run
tab.url. Explicitly skip the Playwright lookup when cdpUrl is empty and rely
on tab.url, which the relay keeps updated via tabs.onUpdated.
2026-03-18 20:21:23 -07:00
zeroaltitude
696dcd5ddd
fix(browser): skip Playwright URL lookup for non-success responses
Move CDP getPageForTargetId call inside eligibility check so error/4xx
responses don't incur unnecessary connection latency. Also skip when url
is already set (no enrichment needed).

Note: cross-site navigations that trigger renderer swaps may invalidate
the pre-action targetId; documented as known limitation with tab.url
fallback.
2026-03-18 15:00:19 -07:00
zeroaltitude
a8c59f3c58
refactor(browser): extract enrichTabResponseBody + add 10 unit tests
Extracted the URL enrichment logic from withRouteTabContext into a pure,
testable function. Tests cover: enrichment of ok responses, postRunUrl
preference, tab.url fallback, existing field preservation, non-ok/null/
array/primitive rejection, and missing URL handling.
2026-03-18 15:00:19 -07:00
zeroaltitude
450ed33f94
fix(browser): remove catch-block originalJson reference (block-scoped to try)
originalJson is const inside the try block and not accessible from the
catch block (tsgo correctly flags this, tsc was lenient). The inner
try/catch around params.run() already restores res.json before
re-throwing, so the outer catch doesn't need the restore.

Fixes tsgo TS2304 in CI.
2026-03-18 15:00:18 -07:00
zeroaltitude
c3d3732daa
fix(browser): restore res.json before originalJson flush and in catch block
If originalJson(interceptedBody) throws (e.g. BigInt serialization),
the outer catch would hit the intercepted res.json. Now restores
before both the flush and in the catch block as a safety net.

Addresses codex-connector P1 on PR #30323.
2026-03-18 15:00:18 -07:00
zeroaltitude
9dddc5e517
fix(browser): restore res.json before error handling in withRouteTabContext
The intercepted res.json was not restored on exceptions from run(),
causing handleRouteError -> jsonError to hit the buffer interceptor
instead of actually sending the error response. This could leave
HTTP requests hanging on any Playwright failure in tab-targeting routes.

Addresses codex-connector P1 on PR #30323.
2026-03-18 15:00:17 -07:00
zeroaltitude
52f4f9c6b4
fix(browser): resolve URL post-action to avoid stale values; skip redundant preflight lookup; guard relay send
- Move URL enrichment to after handler run() so navigating actions
  (/act, /navigate) report post-action URL, not pre-run snapshot
- Remove pre-run Playwright page lookup that doubled CDP latency
- Wrap sendToRelay in tabs.onUpdated with try/catch for WebSocket flaps

Addresses review feedback from codex-connector on PR #30323.
2026-03-18 15:00:17 -07:00
zeroaltitude
d1b4b30eb6
refactor(browser): let withRouteTabContext wrapper handle url/targetId injection
Remove redundant url: tab.url and targetId: tab.targetId from
individual action/debug route responses. The withRouteTabContext
wrapper already resolves the live Playwright URL and injects both
fields into any response where they're missing. Hardcoding tab.url
in handlers prevented the wrapper from correcting stale relay
metadata — the exact scenario it was designed to fix.

Addresses Codex review on openclaw/openclaw#30323.
2026-03-18 15:00:09 -07:00
zeroaltitude
43a670f095
fix(browser): preserve handler-supplied URLs and Chrome tab titles
Address two review findings on the browser URL enrichment:

1. withRouteTabContext now only fills in url when the handler didn't
   already set one (record.url === undefined). This prevents clobbering
   post-navigation URLs returned by /navigate and similar handlers.

2. Chrome extension tabs.onUpdated listener now falls back to
   chrome.tabs.get() for the current title when changeInfo.title is
   undefined (URL-only changes), preventing relay cache title wipes.
2026-03-18 15:00:08 -07:00
zeroaltitude
a66693b025
feat(browser): include current page URL in all tab-targeting responses
Enrich every browser action response with the resolved page URL so
downstream consumers (security plugins, audit loggers) know which page
was targeted without a separate tabs query.

- Add shared withRouteTabContext URL enrichment wrapper (agent.shared.ts)
- Resolve live URL via Playwright, fall back to tab list URL
- Include url field in browser-tool console message results
- Push URL changes from Chrome extension background script

Co-authored-by: Eddie Abrams <eddie@bighatbio.com>
2026-03-18 15:00:01 -07:00
Vincent Koc
91d37ccfc3 fix(auth): lazy-load provider oauth helpers 2026-03-18 13:40:28 -07:00
Vincent Koc
6ebcd853be fix(plugin-sdk): isolate provider entry surfaces 2026-03-18 13:20:46 -07:00
Vincent Koc
b526098eb2 docs: restore original Credits heading, disambiguate H1 2026-03-18 12:38:46 -07:00
Vincent Koc
c749957c93 docs: fix duplicate Credits heading in credits.md 2026-03-18 12:34:37 -07:00
Vincent Koc
e5a1185796 docs: add extensions section to docs hubs 2026-03-18 12:29:02 -07:00
Vincent Koc
be3f4a7966 docs: add Building Extensions guide and nav entry 2026-03-18 12:28:19 -07:00
Vincent Koc
198de10523 docs: add missing H1 headings and fix HEARTBEAT template 2026-03-18 12:27:07 -07:00
Vincent Koc
63e09f8267 chore(changelog): remove fragment workflow drift 2026-03-18 12:26:56 -07:00
Vincent Koc
2797ae1583 docs: add missing voice-call CLI commands and contract test section to testing 2026-03-18 12:26:18 -07:00
Vincent Koc
cc5bd57bd7 docs: add missing provider pages (google, modelstudio, perplexity, volcengine) and nav entries 2026-03-18 12:26:01 -07:00
Vincent Koc
e9903c9133 Tests: align unit sharding with unit config 2026-03-18 12:16:07 -07:00
Josh Avant
e6911f0448
Tests: restore deterministic plugins CLI coverage (#49955)
* Tests: restore deterministic plugins CLI coverage

* CLI: preserve plugins exit control-flow narrowing

* Tests: fix plugins CLI mock typing for tsgo

* Tests: fix provider usage mock typing in key normalization
2026-03-18 14:05:04 -05:00
Vincent Koc
ef1346e503 Plugin SDK: route reply payload through public subpath 2026-03-18 12:01:15 -07:00
Vincent Koc
ecfa79ee4c Tests: fix provider auth plugin mock spread 2026-03-18 12:01:05 -07:00
Tak Hoffman
600f57c979
test: add architecture smell detector 2026-03-18 13:28:13 -05:00
darkamenosa
4b5487ee85
LINE: avoid runtime lookup during onboarding (#49960) 2026-03-19 01:27:21 +07:00
Onur
8f0727d75c
Delete CNAME 2026-03-18 19:22:17 +01:00
Peter Steinberger
1746e130f9 test: fix imessage extension CI mocks 2026-03-18 18:20:04 +00:00
Peter Steinberger
a0d3dc94d0 perf: reduce unit test hot path overhead 2026-03-18 18:19:40 +00:00
Vincent Koc
fa52d122c4 Plugin SDK: route provider metadata through public models subpath 2026-03-18 11:18:04 -07:00
Peter Steinberger
62edfdffbd refactor: deduplicate reply payload handling 2026-03-18 18:14:57 +00:00
Vincent Koc
152d179302 Plugin SDK: add public WhatsApp runtime subpaths 2026-03-18 11:13:19 -07:00
Vincent Koc
8240fd900a Plugin SDK: route core channel runtimes through public subpaths 2026-03-18 11:00:58 -07:00
Josh Lehman
505d140aeb
fix: stabilize build dependency resolution (#49928)
* build: mirror uuid for msteams

Add uuid to both the msteams bundled extension and the root package so the workspace build can resolve @microsoft/agents-hosting during tsdown while standalone extension installs also have the runtime dependency available.

Regeneration-Prompt: |
  pnpm build failed because @microsoft/agents-hosting 1.3.1 requires uuid in its published JS but does not declare it in its package manifest. The msteams extension dynamically imports that package, and the workspace build resolves it from the root dependency graph. Mirror uuid into the root package for workspace builds and keep it in extensions/msteams/package.json so standalone plugin installs also resolve it. Update the lockfile to match the manifest changes.

* build: prune stale plugin dist symlinks

Remove stale dist and dist-runtime plugin node_modules symlinks before tsdown runs. These links point back into extension installs, and tsdown's clean step can traverse them on rebuilds and hollow out the active pnpm dependency tree before plugin-sdk declaration generation runs.

Regeneration-Prompt: |
  pnpm build was intermittently failing in the plugin-sdk:dts phase after earlier build steps had already run. The symptom looked like missing root packages such as zod, ajv, commander, and undici even though a fresh install briefly fixed the problem. Investigate the build pipeline step by step rather than patching TypeScript errors. Confirm whether rebuilds mutate node_modules, identify the first step that does it, and preserve existing runtime-postbuild behavior.
  The key constraint is that dist and dist-runtime plugin node_modules links are intentional for runtime packaging, so do not remove that feature globally. Instead, make rebuilds safe by deleting only stale symlinks left in generated output before invoking tsdown, so tsdown cleanup cannot recurse back into the live pnpm install tree. Verify with repeated pnpm build runs.
2026-03-18 10:55:25 -07:00
Vincent Koc
ea74123ab2 Slack: fix directory test runtime stub 2026-03-18 10:54:00 -07:00
Vincent Koc
7d08070dd7 Plugins: generate bundled auth env metadata 2026-03-18 10:53:48 -07:00
Peter Steinberger
8d73bc77fa refactor: deduplicate reply payload helpers 2026-03-18 17:30:25 +00:00
scoootscooob
656679e6e0
Slack: remove duplicate directory imports (#49935) 2026-03-18 10:28:59 -07:00
scoootscooob
b49946a67e
Slack: import directory helpers (#49930)
import the config-backed Slack directory helpers into the Slack channel plugin so directory.listPeers and directory.listGroups no longer throw at runtime, and add a regression test covering configured DM peer listing
2026-03-18 10:24:17 -07:00
Vincent Koc
ff326e90c3 Build: use hoisted pnpm linker 2026-03-18 10:14:53 -07:00
Vincent Koc
467ec4d5f3 Types: fix optional cluster check follow-ups 2026-03-18 10:02:40 -07:00
Peter Steinberger
05b1cdec3c test: make runner scheduling timing-driven 2026-03-18 16:57:38 +00:00
Vincent Koc
891e2a3da8 Build: isolate optional bundled plugin-sdk clusters 2026-03-18 09:54:22 -07:00
Vincent Koc
b4f16bad32 Plugin SDK: export windows spawn and temp path 2026-03-18 09:46:24 -07:00
Vincent Koc
a02bfd30c5 Plugin SDK: use public utility subpaths 2026-03-18 09:43:46 -07:00
Vincent Koc
f187e8bac4 Plugin SDK: use public slack subpath 2026-03-18 09:40:57 -07:00
Vincent Koc
e64cc1983f Plugin SDK: use public discord subpath 2026-03-18 09:39:12 -07:00
Vincent Koc
b3ca855283 Plugin SDK: use public whatsapp subpath 2026-03-18 09:37:54 -07:00
Peter Steinberger
27f655ed11 refactor: deduplicate channel runtime helpers 2026-03-18 16:37:27 +00:00
Vincent Koc
3e02635df3 Plugin SDK: use public telegram subpath 2026-03-18 09:33:21 -07:00