Skip to content

Commit f8cfa06

Browse files
authored
Merge branch 'main' into fix/chat-bubble-copy-padding
2 parents 93055f4 + abf940d commit f8cfa06

190 files changed

Lines changed: 7466 additions & 593 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.agents/skills/tag-duplicate-prs-issues/SKILL.md‎

Lines changed: 53 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,49 @@ prtags auth status
6161

6262
The expected outcome is that `prtags` stores the logged-in maintainer identity locally and uses that account for authenticated writes.
6363

64-
### Verify the tools before triage
64+
## Missing-Setup Rule
6565

66-
Before using this skill, make sure all three tools are available:
66+
Do not require an up-front preflight before starting the workflow.
67+
Proceed with the normal steps until you actually need a tool or account state.
68+
69+
As soon as you discover that a required CLI is missing or `prtags` is not logged in, stop immediately.
70+
Do not continue in a partial mode after that point.
71+
72+
If `ghr` is missing, ask the user to run the `ghreplica` install command.
73+
74+
If `prtags` is missing, ask the user to run both CLI install commands:
6775

6876
```bash
69-
ghr repo view openclaw/openclaw
70-
prtags auth status
71-
uvx --from pr-search-cli pr-search status
77+
curl -fsSL https://raw.githubusercontent.com/dutifuldev/ghreplica/main/scripts/install-ghr.sh | bash -s -- --bin-dir "$HOME/.local/bin"
78+
curl -fsSL https://raw.githubusercontent.com/dutifuldev/prtags/main/scripts/install-prtags.sh | bash -s -- --bin-dir "$HOME/.local/bin"
7279
```
7380

81+
If `uvx --from pr-search-cli pr-search ...` fails because `uvx` or the `pr-search` launcher is not available, ask the user to make that command work before continuing.
82+
83+
If `prtags auth status` shows that the user is not logged in, ask the user to run:
84+
85+
```bash
86+
prtags auth login
87+
```
88+
89+
Resume only after the missing tool or login state has been fixed.
90+
91+
## Read-Path Default
92+
93+
For read-only GitHub operations in this workflow, use `ghr` as the default CLI.
94+
Treat it as a drop-in replacement for the `gh` read operations you would normally use for PRs, issues, comments, reviews, and duplicate-search evidence.
95+
96+
Only fall back to `gh` when `ghr` is failing for a concrete reason, such as:
97+
98+
- the mirrored object is not present yet
99+
- the mirror data is clearly stale or incomplete for the decision you need to make
100+
- the `ghr` command errors, times out, or does not expose the specific read you need
101+
102+
When you fall back to `gh`, note that you did so and why.
103+
104+
If `ghr` is missing a fresh PR or issue but `gh` can read it, you may use `gh` for the read-side judgment.
105+
If a later `prtags` target-level write fails because the same object is still missing from `ghreplica`, stop and report that the mirror has not caught up yet instead of forcing the write.
106+
74107
## Goal
75108

76109
For each target PR or issue:
@@ -86,10 +119,13 @@ For each target PR or issue:
86119
Use the tools with these boundaries:
87120

88121
- `ghreplica` is the raw evidence source
122+
- use `ghr` first for normal GitHub read operations in this workflow
89123
- use it for title/body/comment search, related PRs, overlapping files, overlapping ranges, and current PR or issue status
124+
- resort to `gh` only when `ghr` cannot provide the needed read cleanly
90125
- `pr-search-cli` is candidate generation and ranking
91126
- use it to suggest likely duplicate PRs or issue-cluster context
92127
- do not treat it as final truth
128+
- do not create or expand a duplicate group only because `pr-search-cli` put multiple PRs in the same issue or duplicate cluster
93129
- `prtags` is the maintainer curation layer
94130
- use it to create or reuse one duplicate group
95131
- use it to save the duplicate status, confidence, rationale, and group summary
@@ -146,6 +182,7 @@ Examples:
146182
## Evidence Checklist
147183

148184
Before declaring a duplicate, gather evidence from at least two categories.
185+
Same-issue or same-cluster output from `pr-search-cli` counts only as candidate generation, not as one of the required proof categories by itself.
149186

150187
For PRs:
151188

@@ -168,6 +205,7 @@ If you only have wording similarity, that is not enough.
168205
## Step 1: Read The Target
169206

170207
Start by reading the target itself.
208+
Use `ghr` first for this step even if you would normally reach for `gh`.
171209

172210
For a PR:
173211

@@ -197,6 +235,7 @@ Record:
197235
## Step 2: Search Broadly With ghreplica
198236

199237
Use `ghreplica` first because it is the most direct evidence source.
238+
Do not switch to `gh` for ordinary reads unless `ghr` is missing data or failing.
200239

201240
### PR duplicate search
202241

@@ -253,6 +292,9 @@ Interpretation:
253292
- `issues for-pr` shows which issue clusters the PR appears to belong to
254293
- `issues duplicate-prs` is useful for spotting already-known duplicate PR patterns
255294

295+
Treat every `pr-search-cli` result as a hint to investigate, not as enough evidence to create or widen a duplicate group.
296+
Multiple PRs can share the same issue or issue cluster while still taking meaningfully different fix paths.
297+
256298
For an issue:
257299

258300
- use `ghreplica` first to find candidate PRs or issue wording
@@ -302,6 +344,9 @@ Reuse an existing group when:
302344
- it already contains clearly related members
303345
- adding the target would keep the group coherent
304346

347+
Do not widen an existing group just because `pr-search-cli` placed several PRs under the same issue or duplicate cluster.
348+
Confirm that the actual implementation path and maintainer intent still match before adding the new member.
349+
305350
Create a new group only when no existing group clearly fits.
306351

307352
Create the group with a problem-based title and an intent-based description:
@@ -378,6 +423,9 @@ prtags annotation group set <group-id> \
378423

379424
When the evidence is incomplete, set `duplicate_status=candidate` and lower the confidence.
380425

426+
If a per-PR or per-issue annotation write fails because `prtags` cannot resolve the target through `ghreplica`, do not force a fallback write path.
427+
Keep the group state you were able to write, report that the mirror is still missing the target object, and defer the target-level annotation until `ghreplica` catches up.
428+
381429
## Step 8: Let prtags Sync The Group Comment
382430

383431
Do not tell the agent to create a GitHub comment directly.

‎.github/labeler.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,10 @@
241241
- changed-files:
242242
- any-glob-to-any-file:
243243
- "extensions/open-prose/**"
244+
"extensions: tokenjuice":
245+
- changed-files:
246+
- any-glob-to-any-file:
247+
- "extensions/tokenjuice/**"
244248
"extensions: webhooks":
245249
- changed-files:
246250
- any-glob-to-any-file:

‎.github/workflows/parity-gate.yml‎

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,27 +25,33 @@ jobs:
2525
parity-gate:
2626
name: Run the GPT-5.4 / Opus 4.6 parity gate against the qa-lab mock
2727
if: ${{ github.event.pull_request.draft != true }}
28-
runs-on: blacksmith-8vcpu-ubuntu-2404
29-
timeout-minutes: 20
28+
runs-on: blacksmith-32vcpu-ubuntu-2404
29+
timeout-minutes: 30
3030
env:
3131
# Fence the gate off from any real provider credentials. The qa-lab
3232
# mock server + auth staging (PR N) should be enough to produce a
3333
# meaningful verdict without touching a real API. If any of these
3434
# leak into the job env, fail hard instead of silently running
3535
# against a live provider and burning real budget.
3636
#
37-
# The parity pack has 11 isolated scenario workers. Letting qa suite
38-
# fan out to its default "all scenarios at once" mode on smaller CI
39-
# VMs makes the short strict-agentic scenarios flaky, especially the
40-
# approval-turn followthrough gate that expects a fast post-approval
41-
# read within a 30s agent.wait timeout.
42-
QA_PARITY_CONCURRENCY: "2"
37+
# The parity pack has 11 isolated scenario workers. It exercises a real
38+
# gateway child plus mock model turns and subagents, so keep it serial in
39+
# CI even on the larger runner. Concurrent isolated gateway workers make
40+
# the short strict-agentic scenarios flaky, especially the approval-turn
41+
# followthrough gate that expects a fast post-approval read within a 30s
42+
# agent.wait timeout.
43+
QA_PARITY_CONCURRENCY: "1"
44+
OPENCLAW_QA_TRANSPORT_READY_TIMEOUT_MS: "180000"
4345
OPENAI_API_KEY: ""
4446
ANTHROPIC_API_KEY: ""
4547
OPENCLAW_LIVE_OPENAI_KEY: ""
4648
OPENCLAW_LIVE_ANTHROPIC_KEY: ""
4749
OPENCLAW_LIVE_GEMINI_KEY: ""
4850
OPENCLAW_LIVE_SETUP_TOKEN_VALUE: ""
51+
# The parity suite is a private QA command. Build that exact runtime up
52+
# front so CI never tests a public dist plus a later no-clean QA overlay.
53+
OPENCLAW_BUILD_PRIVATE_QA: "1"
54+
OPENCLAW_ENABLE_PRIVATE_QA_CLI: "1"
4955
steps:
5056
- name: Checkout PR
5157
uses: actions/checkout@v6
@@ -62,6 +68,16 @@ jobs:
6268
- name: Install dependencies
6369
run: pnpm install --frozen-lockfile
6470

71+
- name: Build private QA runtime
72+
run: pnpm build
73+
74+
- name: Run parity preflight
75+
run: |
76+
pnpm openclaw qa suite \
77+
--provider-mode mock-openai \
78+
--model openai/gpt-5.4 \
79+
--alt-model anthropic/claude-opus-4-6 \
80+
--preflight
6581
- name: Run GPT-5.4 lane
6682
run: |
6783
pnpm openclaw qa suite \

‎CHANGELOG.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,17 @@ Docs: https://docs.openclaw.ai
1010
- CLI/doctor plugins: lazy-load doctor plugin paths and prefer installed plugin `dist/*` runtime entries over source-adjacent JavaScript fallbacks, reducing the measured `doctor --non-interactive` runtime by about 74% while keeping cold doctor startup on built plugin artifacts. (#69840) Thanks @gumadeiras.
1111
- WhatsApp/groups+direct: forward per-group and per-direct `systemPrompt` config into inbound context `GroupSystemPrompt` so configured per-chat behavioral instructions are injected on every turn. Supports `"*"` wildcard fallback and account-scoped overrides under `channels.whatsapp.accounts.<id>.{groups,direct}`; account maps fully replace root maps (no deep merge), matching the existing `requireMention` pattern. Closes #7011. (#59553) Thanks @Bluetegu.
1212
- Plugins/startup: prefer native Jiti loading for built bundled plugin dist modules on supported runtimes, cutting measured bundled plugin load time by 82-90% while keeping source TypeScript on the transform path. (#69925) Thanks @aauren.
13+
- Plugin SDK/Pi embedded runs: add a bundled-plugin embedded extension factory seam so native plugins can extend Pi embedded runs with async runtime hooks such as `tool_result` handling instead of falling back to the older synchronous persistence path. (#69946) Thanks @vincentkoc.
14+
- Tokenjuice: add bundled native OpenClaw support for tokenjuice as an opt-in plugin that compacts noisy `exec` and `bash` tool results in Pi embedded runs. (#69946) Thanks @vincentkoc.
1315
- Providers/Tencent: add the bundled Tencent Cloud provider plugin with TokenHub and Token Plan onboarding, docs, `hy3-preview` model catalog entries, and tiered Hy3 pricing metadata. (#68460) Thanks @JuniperSling.
1416
- TUI: add local embedded mode for running terminal chats without a Gateway while keeping plugin approval gates enforced. (#66767) Thanks @fuller-stack-dev.
17+
- CLI/Claude: keep compatible `claude-cli` runs on a warm stdio session and resume from the stored Claude session after Gateway restarts or idle exits. (#69679) Thanks @obviyus.
1518

1619
### Fixes
1720

21+
- Gateway/pairing webchat: render `/pair qr` replies as structured media instead of raw markdown text, preserve inline reply threading and silent-control handling on media replies, avoid persisting sensitive QR images into transcript history, and keep local webchat media embedding behind internal-only trust markers. (#70047) Thanks @BunsDev.
22+
- Codex harness: default app-server runs to unchained local execution, so OpenAI heartbeats can use network and shell tools without stalling behind native Codex approvals or the workspace-write sandbox.
23+
- OpenAI/Responses: keep embedded OpenAI Responses runs on HTTP when `models.providers.openai.baseUrl` points at a local mock or other non-public endpoint, so mocked/custom endpoints no longer drift onto the hardcoded public websocket transport. (#69815) Thanks @vincentkoc.
1824
- Channels/config: require resolved runtime config on channel send/action/client helpers and block runtime helper `loadConfig()` calls, so SecretRefs are resolved at startup/boundaries instead of being re-read during sends.
1925
- CLI/channels: preserve bundled setup promotion metadata when a loaded partial channel plugin omits it, so adding a non-default account still moves legacy single-account fields such as Telegram `streaming` into `accounts.default`.
2026
- Telegram: keep the sent-message ownership cache isolated per configured session store, so own-message reaction filtering remains correct with custom `session.store` paths.
@@ -24,6 +30,7 @@ Docs: https://docs.openclaw.ai
2430
- Discord: read `channel.parentId` through a safe accessor in the slash-command, reaction, and model-picker paths so partial `GuildThreadChannel` prototype getters no longer throw `Cannot access rawData on partial Channel` when commands like `/new` run from inside a thread. Fixes #69861. (#69908) Thanks @neeravmakwana.
2531
- Browser/Chrome MCP: reset cached existing-session control sessions when a `navigate_page` call times out, so one stuck navigation no longer poisons the browser profile until a gateway restart. (#69733) Thanks @ayeshakhalid192007-dev.
2632
- Browser/Chrome MCP: propagate click timeouts and abort signals to existing-session actions so a stuck click fails fast and reconnects instead of poisoning the browser tool until gateway restart. (#63524) Thanks @dongseok0.
33+
- Gateway/channel health: base stale-socket recovery on provider-proven transport activity instead of inbound app-event freshness, preventing quiet Slack, Discord, Telegram, Matrix, and local-style channels from being restarted solely because no user traffic arrived. (#69833) Thanks @bek91.
2734
- OpenCode Go: canonicalize stale bundled `opencode-go` base URLs from `/go` or `/go/v1` to `/zen/go` or `/zen/go/v1`, so older generated model metadata stops hitting the 404 HTML endpoint. (#69898)
2835
- CLI/channels: honor `channels.<id>.enabled=false` as a hard read-only presence opt-out, so env vars, manifest env vars, or stale persisted auth state no longer make disabled channel plugins appear in status, doctor, or setup-only discovery.
2936
- Channels/preview streaming: centralize draft-preview finalization so Slack, Discord, Mattermost, and Matrix no longer flush temporary preview messages for media/error finals, and preserve first-reply threading for normal fallback delivery.
@@ -37,6 +44,7 @@ Docs: https://docs.openclaw.ai
3744
- Models/CLI: show bundled provider-owned static catalog rows in `models list --all` before auth is configured, including Kimi K2.6 rows for Moonshot, OpenRouter, and Vercel AI Gateway, while keeping local-only and workspace plugin catalog paths isolated. (#69909) Thanks @shakkernerd.
3845
- Configure: skip generic CLI startup bootstrap for `openclaw configure` and bound hint-only gateway probes so the onboarding TUI reaches its first prompt faster when the Gateway is unavailable. (#69984) Thanks @obviyus.
3946
- Agents/harness: surface selected plugin harness failures directly instead of replaying the same turn through embedded PI, preventing misleading secondary PI auth errors and avoiding duplicate side effects.
47+
- OpenAI Codex: add a ChatGPT device-code auth option beside browser OAuth, so headless or callback-hostile setups can sign in without relying on the localhost browser callback. (#69557) Thanks @vincentkoc.
4048

4149
## 2026.4.21
4250

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
7c1b8b34618f44d56817ff54b930701710087dc7e76beaf4a554b6a5a25ba87c config-baseline.json
2-
ed0c093e8acab2364608be3e65b98836600aea07df73ebb51d11919969c6c8fe config-baseline.core.json
1+
3f08544c1a8143755a848aeb731f2eddf4f84cf70950c7d165f8889e01e4985d config-baseline.json
2+
2190e81fcd754b96b48a1e012600f3b74fdb9b91eac280d8e3e038fcb73d6546 config-baseline.core.json
33
6c0069b971ae298ae68516ebcd3eae0e8c82820d2e8f42ecbd2f53a2f9077371 config-baseline.channel.json
4-
e5b7756b5f45ba227aa1bfab990dcf8a2a8b409b9ca01ea8bb1d5cd7adc06c90 config-baseline.plugin.json
4+
9096ec947597b03f97eef44186a3102fd80ffb7f3e791fb64544464d4571448f config-baseline.plugin.json
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
bd14f9118c8359c8ab0a7da984be28a319e82fadb004f55dc5888c0a07d411d3 plugin-sdk-api-baseline.json
2-
ef09464bba3712998c0accf9a4e551ba31af4d7a2f77ce01120a1f4b48ca4ac5 plugin-sdk-api-baseline.jsonl
1+
ba9b9d9b321b405fef89d4e95c1a3d629d1b956398a5b2a7f25b2a7654879783 plugin-sdk-api-baseline.json
2+
8bbbee0ea2326148d4fd49f61fe74f83c5bb24c0742cfbf3609f43939fcd4c34 plugin-sdk-api-baseline.jsonl

‎docs/docs.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1226,6 +1226,7 @@
12261226
"tools/pdf",
12271227
"tools/reactions",
12281228
"tools/thinking",
1229+
"tools/tokenjuice",
12291230
"tools/video-generation"
12301231
]
12311232
},

‎docs/gateway/cli-backends.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ The provider id becomes the left side of your model ref:
143143
1. **Selects a backend** based on the provider prefix (`codex-cli/...`).
144144
2. **Builds a system prompt** using the same OpenClaw prompt + workspace context.
145145
3. **Executes the CLI** with a session id (if supported) so history stays consistent.
146+
The bundled `claude-cli` backend keeps a Claude stdio process alive per
147+
OpenClaw session and sends follow-up turns over stream-json stdin.
146148
4. **Parses output** (JSON or plain text) and returns the final text.
147149
5. **Persists session ids** per backend, so follow-ups reuse the same CLI session.
148150

@@ -179,6 +181,10 @@ child process environment for the run.
179181
- `always`: always send a session id (new UUID if none stored).
180182
- `existing`: only send a session id if one was stored before.
181183
- `none`: never send a session id.
184+
- The bundled `claude-cli` backend uses `liveSession: "claude-stdio"` so
185+
follow-up turns reuse the live Claude process while it is active. If the
186+
Gateway restarts or the idle process exits, OpenClaw resumes from the stored
187+
Claude session id.
182188

183189
Serialization notes:
184190

‎docs/plugins/building-plugins.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ A single plugin can register any number of capabilities via the `api` object:
162162
| Video generation | `api.registerVideoGenerationProvider(...)` | [Provider Plugins](/plugins/sdk-provider-plugins#step-5-add-extra-capabilities) |
163163
| Web fetch | `api.registerWebFetchProvider(...)` | [Provider Plugins](/plugins/sdk-provider-plugins#step-5-add-extra-capabilities) |
164164
| Web search | `api.registerWebSearchProvider(...)` | [Provider Plugins](/plugins/sdk-provider-plugins#step-5-add-extra-capabilities) |
165+
| Embedded Pi extension | `api.registerEmbeddedExtensionFactory(...)` | [SDK Overview](/plugins/sdk-overview#registration-api) |
165166
| Agent tools | `api.registerTool(...)` | Below |
166167
| Custom commands | `api.registerCommand(...)` | [Entry Points](/plugins/sdk-entrypoints) |
167168
| Event hooks | `api.registerHook(...)` | [Entry Points](/plugins/sdk-entrypoints) |
@@ -170,6 +171,11 @@ A single plugin can register any number of capabilities via the `api` object:
170171

171172
For the full registration API, see [SDK Overview](/plugins/sdk-overview#registration-api).
172173

174+
Use `api.registerEmbeddedExtensionFactory(...)` when a plugin needs Pi-native
175+
embedded-runner hooks such as async `tool_result` rewriting before the final
176+
tool result message is emitted. Prefer regular OpenClaw plugin hooks when the
177+
work does not need Pi extension timing.
178+
173179
If your plugin registers custom gateway RPC methods, keep them on a
174180
plugin-specific prefix. Core admin namespaces (`config.*`,
175181
`exec.approvals.*`, `wizard.*`, `update.*`) stay reserved and always resolve to

0 commit comments

Comments
 (0)