Skip to content

feat(talk): let connected clients speak short results - #184546

Merged
vincentkoc merged 3 commits into
mainfrom
feat/talk-client-say
Oct 26, 2026
Merged

vincentkoc merged 3 commits into
mainfrom
feat/talk-client-say

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

Fixes #184481

What Problem This Solves

A connected Talk device cannot speak a short externally completed result through its active call without starting another agent task.

User Impact

Clients can submit up to 1,024 UTF-8 bytes with talk.client.say using operator.talk. Only the requesting connection’s ready, Gateway-controlled call can receive it. { accepted: true } confirms provider submission, not audible playback; disconnected or replaced calls reject the request.

Why This Change Was Made

The existing call owner now sends exact speech and recognizes complete, retained playback echoes before they enter agent delegation. This preserves an in-flight task’s final response and prevents quoted context from swallowing a new request. The new method appends to the advertised catalog, preserving existing method indices. There is no new task queue, configuration, or persistent state.

The simplification pass reused the existing owner and protocol formatter. Existing authority logic moved unchanged into its authority module to keep the owner within its line limit. Most of the generated diff is validator identifier renumbering from the normal generator. Excluding generated validators, the merge-base delta is +248/−111 production lines, +305/−26 test lines, and 9 documentation lines; the existing authority/type moves account for much of the production churn.

Evidence

Focused Talk ownership, permissions, consultation, exact-speech, and native transport tests passed. The new native-flow tests cover operator.talk without operator.write, byte limits, rejected inputs, and a playback echo while an original task completes. Lifecycle tests cover readiness, disconnect, replacement, failed submission, and bounded echo retention.

Core and Gateway test typechecks, targeted lint and formatting, line/assertion ratchets, and the qaRuntime build passed. CI identified a missing logger argument in the new disconnect test; the corrected test suite and affected test typecheck pass locally. Independent structured review reported no actionable findings.

The existing Gateway’s copied-state upgrade rehearsal passed required migration, configuration, plugin, readiness, and authenticated-health checks, preserving paired device credentials. Optional post-activation inspections remain deferred. Physical watch playback follows deployment; no audible-playback claim is made here.

The 23 method discovery and authority tests pass after preserving the frozen catalog order. The real Gateway node control-plane suite passes all five tests locally under the repository Bun runner. An earlier Linux CI attempt timed out during packaged setup before Gateway startup; the current head is being checked in CI, and the local pass is not treated as a fix for that timeout.

@clawsweeper

clawsweeper Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@vincentkoc vincentkoc self-assigned this Oct 26, 2026
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime size: XL labels Oct 26, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review October 26, 2026 11:04
@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: 1d0069cd451e058e72e5b8b2ebdebf941f3a11a9
  • Maintainer: @vincentkoc
  • Repository role: admin

These security sensitive changes were made:

  • src/gateway/methods/core-descriptors.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.
  • src/gateway/session-method-policy.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.
  • src/gateway/talk/client-tool-authority.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.

Carefully review these changes before merging.

@vincentkoc
vincentkoc enabled auto-merge (squash) October 26, 2026 11:10
@vincentkoc
vincentkoc disabled auto-merge October 26, 2026 11:12
@clawsweeper clawsweeper Bot added the clawsweeper:intake:feature Preliminary submission classification; full source review pending. label Oct 26, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Oct 26, 2026
@clawsweeper

clawsweeper Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge.

What this changes

Adds talk.client.say so an authenticated client can submit bounded speech through its own active Talk call without starting an agent task.

Example: A connected watch submits “The dial is ready.” after a separate device action.

  • Before: Speech synthesis returns audio, while steering requires an active agent run.
  • After: The watch can submit the announcement through its ready Gateway-controlled call and receive accepted: true after submission.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The feature and owner placement are sound, but required authority evidence is absent.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🦐 gold shrimp (3/6) Security review found an item that needs attention.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: A device cannot announce a separately completed action through its existing Talk call without starting agent work.
Reason: The maintainer-authored issue and PR approve this narrow capability, and a merged device consumer needs the endpoint.

Merge readiness

⛔ Blocked before merge - 3 items remain

Keep this PR open: it implements a concrete, maintainer-approved device capability through the existing Talk owner, and source review found no definite introduced bug.

Priority: P2
Reviewed head: 1d0069cd451e058e72e5b8b2ebdebf941f3a11a9

Before merge

  • Add real behavior proof - Authority-chain proof required: the new talk.client.say handler reaches provider control after synchronous session, request, target, and connection checks, but supplied tests mock the WebSocket and lack forbidden-caller and revocation traces at real provider I/O; provide redacted terminal output or logs showing allowed submission and zero sends after rejection, removing IPs, keys, phone numbers, and non-public endpoints. After adding proof, update the PR body, then request a new review with @clawsweeper re-review. The PR author or someone with repository write access can request it.
  • Resolve security review attention item - No concrete authorization bypass was found, but the new speech authority boundary needs final-effect validation.
  • Resolve merge risk - Before merge, the PR owner must establish that a different connection or revoked session grant cannot cause speech at the provider boundary.

Findings

None.

Tests

  • Missing end-to-end proof: Provide final-effect evidence through production RPC and provider transport for an allowed caller, a different connection, and revoked session authority.
Agent review details

How this fits together

The Gateway authenticates the speech RPC, authorizes its session target, and passes text to the connection-bound Talk owner, which sends an exact-speech message through the existing provider control.

flowchart LR
  A[Connected Talk client] --> B[RPC scope and session authorization]
  B --> C[Exact call ownership check]
  C --> D[Existing Talk control owner]
  D --> E[Provider speech control]
  E --> F[Active call]
  E --> G[Retained echo recognition]
Loading

Technical review

Best possible solution:

Retain the bounded RPC on the existing Talk owner and establish allowed and forbidden caller behavior at final provider submission.

Do we have a high-confidence way to reproduce the issue?

Source inspection confirms the capability is absent from fetched main and cannot be supplied by synthesis or idle-run steering; no target code was executed.

Is this the best way to solve the issue?

The implementation uses the appropriate existing owner, preserves ordinary caller authority, and adds bounded echo handling without a competing speech manager.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 8c4437c4281b.

Merge-risk options

Maintainer options:

  1. Establish the final-effect authority boundary (recommended)
    The PR owner should provide a production-path trace showing authorized submission and zero provider sends for another connection and a revoked session grant.

Provenance checked

Testing

Proof path: in-process harness.

Security

Needs attention: No concrete authorization bypass was found, but the new speech authority boundary needs final-effect validation.

Evidence

What I checked:

  • Approved product direction: The maintainer-authored linked issue specifies bounded announcements through an exact active call and explains why talk.speak and talk.client.steer are insufficient.
  • Synchronous authorization before submission: The handler validates UTF-8 size, rechecks session mutation and request authority, validates the prepared target, and synchronously invokes the existing call owner. (src/gateway/talk/handlers/client.ts:118, 1d0069cd451e)
  • Existing lifecycle owner reused: Speech requires readiness, the current owner, matching connection and complete session identity; retained echoes are bounded and cleared at close, without another task queue or persistent model. (src/gateway/talk/client-gateway-control.ts:467, 1d0069cd451e)
  • Authority proof boundary: The added native tests exercise production dispatch and provider integration with a mocked WebSocket; the owner tests reject different connections and replaced calls, but supplied evidence does not demonstrate revoked session authority being rejected before real provider I/O. (src/gateway/talk/handlers/client-native-control.test-support.ts:86, 1d0069cd451e)
  • Current main lacks this operation: Fetched main registers client creation, transcript, close, toolCall and steer, but no client.say; its steering handler explicitly requires active owned work. (src/gateway/methods/core-descriptors.ts:99, 8c4437c4281b)
  • Concrete downstream consumer: feat(talk): send speech through the active watch call esp-openclaw-node#97 is merged and explicitly depends on this Gateway capability; its body defers hardware speech verification until the endpoint exists.

PR surface

Source +161, Tests +279, Docs +9. Total +449 across 32 files. Added test files: 2.

View PR surface stats
Area Files Added Removed Net
Source 20 5534 5373 +161
Tests 10 305 26 +279
Docs 2 9 0 +9
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 32 5848 5399 +449

Review metrics

Metric Value Why it matters
New public RPC 1 method; 1,024 UTF-8 bytes maximum The additive operator.talk operation preserves existing method indices and introduces no configuration or persistent state.

Root-cause cluster

Relationship: same_root_cause
Canonical: #184481
Summary: This PR implements the exact-call announcement capability requested by the linked feature issue.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

  • add P2: A bounded feature enables a concrete device workflow without evidence of an urgent existing-user regression.
  • add merge-risk: 🚨 security-boundary: The endpoint adds authenticated caller-to-provider speech authority whose forbidden-caller and revocation behavior lacks final-effect proof.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Label justifications:

  • P2: A bounded feature enables a concrete device workflow without evidence of an urgent existing-user regression.
  • merge-risk: 🚨 security-boundary: The endpoint adds authenticated caller-to-provider speech authority whose forbidden-caller and revocation behavior lacks final-effect proof.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Add final-effect proof for another connection and prove revoked session authority is rejected before provider I/O.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 26, 2026, 7:55 AM ET / 11:55 UTC.

@vincentkoc
vincentkoc merged commit 99caa18 into main Oct 26, 2026
165 checks passed
@vincentkoc
vincentkoc deleted the feat/talk-client-say branch October 26, 2026 11:59
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 27, 2026
* feat(talk): let connected clients speak short results

* test(talk): pass logger when closing speech connection

* fix(talk): preserve advertised gateway method order
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui docs Improvements or additions to documentation gateway Gateway runtime merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. security-sensitive-changed size: XL status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow Talk clients to speak a short result through their active call

1 participant