Commit Graph

38578 Commits

Author SHA1 Message Date
Harsh Mehta
d1b1d60fbf fix(github-copilot): support GUI/RPC wizard auth flow
The interactive GitHub Copilot device-code provider auth ("github-copilot".auth.run)
short-circuited with { profiles: [] } whenever process.stdin.isTTY was false and
otherwise delegated to githubCopilotLoginCommand, which drives readline against
stdin/stdout. That made the device flow unusable from the gateway RPC bridge
and any GUI wizard frontend (including the WinUI tray app), where there is no
controlling TTY and no shared stdin with the gateway process.

This change adds a high-level runGitHubCopilotDeviceFlow() helper in
extensions/github-copilot/login.ts that:

  - validates the GitHub verification URL (must be https://github.com/login/device)
    and trims/length-checks user_code before exposing them to the host UI;
  - exposes a small io interface (showCode + openUrl) so callers render the
    code through their own surface (ctx.prompter.note + ctx.openUrl);
  - returns a typed result of { authorized | access_denied | expired }
    instead of throwing for normal terminal states.

runGitHubCopilotAuth() in extensions/github-copilot/index.ts is rewritten to
use that helper: it drops the isTTY gate, emits the URL/code/expiry through
ctx.prompter.note, best-effort calls ctx.openUrl, and returns the credential
inline via the returned profiles. The framework then persists it under the
correct agentDir, identical to the existing non-interactive path that Val
introduced in 461c10bb51.

requestDeviceCode and pollForAccessToken stay private to login.ts (no api.ts
export). The CLI entry githubCopilotLoginCommand is unchanged.

The provider auth contract tests in
src/plugin-sdk/test-helpers/provider-auth-contract.ts are updated to reflect
the new contract: the suite stubs fetch for the github.com device-code and
access-token endpoints and asserts that

  - the credential is sourced from the device flow response (not a post-hoc
    auth-store readback);
  - the provider drives the host UI through ctx.prompter.note + ctx.openUrl
    (no stdin/stdout dependency);
  - auth completes when process.stdin.isTTY is false (GUI/RPC clients).

Validation
- pnpm tsgo:extensions
- pnpm test:extension github-copilot (all github-copilot tests pass; the
  3 failures in models.test.ts are pre-existing on main, unrelated to this
  change: vitest mock for openclaw/plugin-sdk/provider-model-shared is missing
  the resolveProviderEndpoint export)
- End-to-end manual: ran a Windows tray-app onboarding wizard against a local
  gateway, picked GitHub Copilot, browser opened to the verification URL,
  authorization succeeded, token persisted under the correct agentDir as
  github-copilot:github, chat through the new credential worked.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-29 23:35:30 +00:00
Blasius Patrick
d30b8dccfd fix(pi-embedded): strip [tool calls omitted] from user-facing text (#74578)
* fix(pi-embedded): strip [tool calls omitted] from user-facing text

The internal replay placeholder '[tool calls omitted]' was leaking
into channel output (e.g. Telegram) after aborted tool calls.

Fix: strip the placeholder early in sanitizeUserFacingText so all
channels are protected by default. The replay transcript path in
turns.ts is unaffected — it uses the placeholder internally.

Fixes #74573.

Signed-off-by: Blasius Patrick <blasius.patrick@gmail.com>

* fix(pi-embedded): preserve whitespace when stripping placeholder

* test(pi-embedded): document replay placeholder sanitization

* fix(pi-embedded): strip consecutive replay placeholders

---------

Signed-off-by: Blasius Patrick <blasius.patrick@gmail.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-04-29 23:20:19 +00:00
Vincent Koc
845dd2a7d5 chore(ci): add provider runtime CodeQL quality shard
Adds a focused non-security CodeQL quality shard for provider runtime and model catalog contracts.
2026-04-29 16:15:38 -07:00
Shakker
6662dcf209 refactor: reuse provider auth lookup maps 2026-04-30 00:13:13 +01:00
Shakker
e327c96ce6 fix: preserve spawned workspace in models command 2026-04-30 00:13:13 +01:00
Shakker
a887df9cd5 fix: preserve workspace auth in model list alias 2026-04-30 00:13:13 +01:00
Shakker
7d4a0bb621 fix: preserve workspace auth labels in model status 2026-04-30 00:13:13 +01:00
Shakker
0d702f3e28 test: type model auth label env mock 2026-04-30 00:13:13 +01:00
Shakker
3b4d2d8886 fix: pass workspace auth evidence into model auth labels 2026-04-30 00:13:13 +01:00
Shakker
d3c6a8f0fb fix: use agent auth store for model status probes 2026-04-30 00:13:13 +01:00
Shakker
a0cf07ec10 fix: preserve workspace auth in model registry discovery 2026-04-30 00:13:13 +01:00
Shakker
4109446c2f fix: align model status auth evidence paths 2026-04-30 00:13:12 +01:00
Shakker
98e4c18e39 refactor: centralize provider auth evidence lookup 2026-04-30 00:13:12 +01:00
Shakker
b4ecc814c5 fix: align model auth display with workspace evidence 2026-04-30 00:13:12 +01:00
Shakker
2fe3e779ff fix: preserve workspace auth scope in runtime paths 2026-04-30 00:13:12 +01:00
Shakker
c4e249114d fix: thread workspace auth evidence through model auth 2026-04-30 00:13:12 +01:00
Shakker
1db2e63519 fix: align provider auth checker with config evidence 2026-04-30 00:13:12 +01:00
Shakker
9307affe59 fix: align runtime auth evidence with config trust 2026-04-30 00:13:12 +01:00
Shakker
10b9adb010 fix: trust-gate manifest auth evidence 2026-04-30 00:13:12 +01:00
Shakker
b8c77c1bd7 test: type google setup registration coverage 2026-04-30 00:13:12 +01:00
Shakker
68aedf3908 fix: register google vertex setup provider 2026-04-30 00:13:12 +01:00
Shakker
78f3470368 fix: preserve explicit auth evidence path semantics 2026-04-30 00:13:12 +01:00
Shakker
5a606947b5 docs: document manifest auth evidence 2026-04-30 00:13:12 +01:00
Shakker
dec5de8a2c fix: declare google vertex local auth evidence 2026-04-30 00:13:12 +01:00
Shakker
225620a9b3 refactor: resolve env auth evidence generically 2026-04-30 00:13:12 +01:00
Shakker
dd5b96c11d feat: expose provider auth evidence lookup 2026-04-30 00:13:12 +01:00
Shakker
1d1edca92f feat: add setup auth evidence metadata 2026-04-30 00:13:12 +01:00
Marcus Castro
4cba08df01 fix(whatsapp): remove exposeErrorText config (#74642)
* fix(whatsapp): remove exposeErrorText config

* fix(whatsapp): mark internal system events trusted
2026-04-29 20:03:58 -03:00
Peter Steinberger
426107d2f8 fix(telegram): retry invalid native quotes 2026-04-30 00:02:13 +01:00
Vincent Koc
d115faa367 chore: update security codeowners team 2026-04-29 15:57:17 -07:00
Vincent Koc
847d8fa0e1 chore(ci): add Plugin SDK reply CodeQL quality shard
Adds a focused non-security CodeQL quality shard for Plugin SDK reply/session delivery runtime contracts.
2026-04-29 15:56:41 -07:00
Peter Steinberger
6acd588bdd test(ci): update changed gate expectations 2026-04-29 23:49:48 +01:00
Vincent Koc
8f50920c45 chore(ci): add session diagnostics CodeQL quality shard
Adds a focused non-security CodeQL quality shard for session diagnostics, delivery queues, and related diagnostic contracts.
2026-04-29 15:29:03 -07:00
Peter Steinberger
c7e2aceb05 ci(dup): guard duplicate scan coverage 2026-04-29 23:24:57 +01:00
Peter Steinberger
4c712d3372 fix: add bundled plugin deps repair command 2026-04-29 23:23:14 +01:00
Peter Steinberger
9a3a341d93 refactor(channels): route remaining turns through kernel 2026-04-29 23:16:16 +01:00
Peter Steinberger
9a9cd0c0ab refactor(channels): add shared turn kernel 2026-04-29 23:16:16 +01:00
Peter Steinberger
4396361f35 fix(config): regenerate base schema help 2026-04-29 23:09:39 +01:00
Peter Steinberger
fa467c20e3 test: allow browser indirect zod runtime dependency 2026-04-29 23:03:06 +01:00
Vincent Koc
6717f8b334 chore(ci): add plugin trust CodeQL shard
Adds the plugin trust-boundary CodeQL security shard on Blacksmith and documents the rollout scope.
2026-04-29 15:02:06 -07:00
Peter Steinberger
a31b55a8d8 fix(config): document queue help options 2026-04-29 23:01:39 +01:00
Peter Steinberger
18faf22e15 fix(plugins): mirror global-agent runtime dependency (#74593)
* fix(plugins): mirror global-agent runtime dependency

* fix(plugins): update bundled dependency drift guard
2026-04-29 21:55:46 +00:00
Peter Steinberger
36ff8d78e4 fix: explain stuck session diagnostics 2026-04-29 22:55:27 +01:00
Peter Steinberger
4a6e10ece8 feat: default queueing to steer 2026-04-29 22:48:10 +01:00
Peter Steinberger
83267e99b0 chore: update dependencies 2026-04-29 22:42:45 +01:00
Vignesh Natarajan
05627f797e Docs: skip unsupported Mintlify locale nav 2026-04-29 14:38:56 -07:00
Michael Marr
aaf4cc6862 docs(slack): warn that groupPolicy allowlist requires channel IDs not names (#53112) 2026-04-29 14:36:38 -07:00
Gabriel A. Mays
f0f1635f9f Docs: add VPS admin hardening note (#54685) 2026-04-29 14:36:33 -07:00
Vincent Koc
71ab341f46 chore(ci): rename CodeQL auth security shard
Renames the default auth/secrets CodeQL security category from the generic javascript-typescript label to core-auth-secrets.

Proof:
- Branch CodeQL security run https://github.com/openclaw/openclaw/actions/runs/25134871512 passed on 1d9f727bfd.
- Core auth/secrets analysis 1200412263 returned 0 results.
- Branch open CodeQL alerts: none.
- Workflow Sanity, Blacksmith Testbox, Blacksmith Build Artifacts Testbox, and OpenGrep PR Diff passed.

Scope is label/config only: same paths, query pack, filters, timeout, and runner.
2026-04-29 14:32:34 -07:00
Peter Steinberger
b552e31563 test: update install smoke workflow contract 2026-04-29 22:31:17 +01:00