mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
feat(slack): live session cards as the default progress mode (#122552)
* feat(slack): render live session cards as the default Slack progress mode Slack streaming.mode default flips partial->progress. Progress mode renders one live Block Kit session card with a status header, narration, plan, activity, diff stat, and elapsed time; it is edited in place and finalized to success or error with an Open in OpenClaw button when gateway.publicOrigin is set. Final assistant text always delivers separately. The shared progress compositor gains a success-only additive per-turn diffStat mirroring the task ledger fold. resolveGatewayPublicOrigin is exported through the plugin SDK. The diffs viewer URL falls back to publicOrigin. The old rich/text progress render fork is deleted. Native task cards remain unchanged and opt-in. * chore(config): regenerate bundled channel config metadata * refactor(slack): keep session card state type internal * refactor(slack): split session-card and diff-stat owners under lint ceilings * refactor(channels): reuse diff-stat type from its owner module Import ChannelProgressDraftDiffStat from progress-draft-diffstat instead of redeclaring it in the compositor, resolving the all-exports deadcode scan. * chore(plugin-sdk): regenerate api baselines for channel barrels Baselines drifted after the rebase reconciled them against main; regenerate to match the branch's actual channel-message/channel-outbound surface. * fix(slack): drop a session card that cannot terminalize after final delivery If the final reply is delivered but the terminal card edit fails, the caller now clears the stale card instead of leaving it stuck in its Working state (mirrors the pre-card preview cleanup). Adds a transport-failure regression and corrects three tests that asserted the prior ignore-the-result behavior. Documents resolveGatewayPublicOrigin as a dependency-light runtime helper on the config-contracts SDK subpath, which previously described a type-only surface. Addresses ClawSweeper P2 (unfinalized card) and P1 (runtime SDK contract). * fix(slack): suppress default tool messages under the default progress card resolveChannelStreamingSuppressDefaultToolProgressMessages re-derived the stream mode from config with an "off" default, unlike its sibling resolvers which take a caller-resolved mode override. After this branch made progress the Slack default, a default-config channel turn saw mode "off" and left a stray "Using tool: X" plain message posting alongside the session card. Thread the caller-resolved mode through (compositor passes params.mode; Slack dispatch passes slackStreaming.mode), matching resolveChannelStreamingPreviewToolProgress. Retarget the progress-session-card delivery-trace golden at an EMPTY Slack config so it proves the real default path; the regenerated golden is byte-identical, confirming defaults now yield the clean card sequence (one card post, separate final text, one terminal update with the Open in OpenClaw button, no stray tool message). Switch the dispatch delivery-mode mock to the real resolver so the card tests exercise the true channel default (automatic), not a hand-rolled one. * chore(plugin-sdk): regenerate api baselines for the streaming mode param resolveChannelStreamingSuppressDefaultToolProgressMessages gained an optional mode override; the changed signature reflows the surface hash of every barrel that re-exports it, so regenerate the affected baselines. * chore(config): regenerate config baselines
This commit is contained in:
committed by
GitHub
parent
901dd11a13
commit
508dd471b0
+2
-2
@@ -307,7 +307,7 @@ Viewer assets:
|
||||
|
||||
The viewer document resolves these assets relative to the viewer URL, so an optional `baseUrl` path prefix carries through to asset requests too.
|
||||
|
||||
URL resolution order: tool-call `baseUrl` (after strict validation) -> plugin `viewerBaseUrl` -> loopback `127.0.0.1` default. If gateway bind mode is `custom` and `gateway.customBindHost` is set, that host is used instead of loopback.
|
||||
URL resolution order: tool-call `baseUrl` (after strict validation) -> plugin `viewerBaseUrl` -> `gateway.publicOrigin` -> the existing bind-aware Gateway fallback.
|
||||
|
||||
`baseUrl` rules: must be `http://` or `https://`; query and hash are rejected; origin plus optional base path is allowed.
|
||||
|
||||
@@ -365,7 +365,7 @@ Common failure text: `Diff PNG/PDF rendering requires a Chromium-compatible brow
|
||||
</Accordion>
|
||||
<Accordion title="Viewer accessibility">
|
||||
- Viewer URL resolves to `127.0.0.1` by default.
|
||||
- For remote access, either set plugin `viewerBaseUrl`, pass `baseUrl` per call, or use `gateway.bind=custom` with `gateway.customBindHost`.
|
||||
- For remote access, set `gateway.publicOrigin`, set plugin `viewerBaseUrl`, or pass `baseUrl` per call.
|
||||
- If `gateway.trustedProxies` includes loopback for a same-host proxy (for example Tailscale Serve), raw loopback viewer requests without forwarded client-IP headers fail closed by design.
|
||||
- For that proxy topology, prefer `mode: "file"`/`"both"` for an attachment, or intentionally enable `security.allowRemoteViewer` plus plugin `viewerBaseUrl`/a proxy `baseUrl` for a shareable viewer link.
|
||||
- Enable `security.allowRemoteViewer` only when external viewer access is intended.
|
||||
|
||||
Reference in New Issue
Block a user