Repository navigation
Conversation
btcson66-rgb
left a comment
There was a problem hiding this comment.
Requesting changes. Rejecting a missing reply is right, but the new check also turns the platform's deliberate "no reply" turn into an error.
Problem. sendMessage (bridge-client.ts:281) now throws CloudBridgeError("Bridge response did not include reply text") for any blank result.text. The shared runtime has a defined result for a turn where the agent chose not to reply: message.send returns { text: "", responded: false, ... }. See packages/cloud/shared/src/lib/services/shared-runtime/shared-runtime-chat.ts, where the terminal result is built with ...(turn.responded === false ? { responded: false } : {}), and shared-rest-adapter.ts, which maps it to responseReason: "no_response". With this PR, that silent turn is reported to the caller as a bridge failure.
Reproduction. I used a real loopback HTTP server and the real ElizaCloudClient. The bridge answers with the result that shared-runtime returns for a no-reply turn: {"jsonrpc":"2.0","id":"1","result":{"text":"","responded":false,"messageId":"m1","userMessageId":"u1"}}. bun test --conditions eliza-source in plugins/plugin-elizacloud, Bun 1.4.2:
plugins/plugin-elizacloud/src |
sendMessage |
|---|---|
develop 38b2dec8e5 |
resolved "" |
this PR 3789b20460 |
threw CloudBridgeError: Bridge response did not include reply text |
Suggested fix. Treat result.responded === false as a valid empty reply. Return "", or return the flag so that callers can tell silence apart. Throw only when text is missing or not a string, or when it is blank without responded: false. Please add the responded: false result to your test.
#36704 has the same problem on the streaming path (its done frame carries responded: false). The two fixes should agree on how silence is reported.
Made via @SlopDotCash
AI provider/model: anthropic / claude-opus-5-5
Client / agent tooling: claude-code-desktop
Contribution skill revision: N/A - ordinary GitHub contribution without optional run evidence
Attribution status: self-reported
— [contributor]
Relates to
This fixes the existing Eliza Cloud agent bridge capability that is documented in the
plugin-elizacloudREADME. It does not add a feature or change the approved product scope.There is no linked issue. The contribution rules require a human to write and submit issues. This defect was reproduced during the contributor audit.
Change
The Cloud bridge client returned the text
(no response)when a successful JSON-RPC response omitted its reply text. The Cloud runtime then sent that text to the user as if the agent created it.The client now rejects a missing, non-string, or blank reply with
CloudBridgeError. It still returns valid reply text without a change.Before:
After:
Why this implementation
The client already uses
CloudBridgeErrorfor bridge protocol failures. This change reuses that type at the response boundary. It does not add a second error model or change the runtime proxy.I considered keeping a fallback string and changing the caller. That would leave other client callers unable to distinguish a real agent reply from fabricated text. Rejecting the invalid response in the client keeps one protocol contract for all callers.
Testing
The new integration test starts a real Node HTTP server on a loopback TCP port. The production
ElizaCloudClientuses nativefetchagainst that server. The server first returns a result with no text and then returns a valid reply. No fetch mock is used.bun run --cwd plugins/plugin-elizacloud test: pass. 29 files passed, 1 skipped. 275 tests passed, 1 skipped. All 7 package checks passed.bun run --cwd plugins/plugin-elizacloud typecheck: pass.bun run --cwd plugins/plugin-elizacloud build: pass.bun run --cwd plugins/plugin-elizacloud lint:check: pass with only existing warnings incloud-google-delegation.http.test.ts.bun run verify: pass. 309 of 309 tasks passed. Repository audits and anti-LARP checks passed.How to test
bun run --cwd plugins/plugin-elizacloud test -- bridge-client.http.test.ts.CloudBridgeError.working reply.bun run verify.developand has no conflicts with the latestorigin/develop.bun installandbun run verifyafter syncing;bun run verifypassed with the existing dependency tree. I did not runbun installbecause the pinned dependencies were already installed.Evidence Gate
Real HTTP bridge transcript at commit 3789b20
Evidence Details
The transcript above comes from the test that used the production bridge client, a real TCP listener, and native
fetch. It proves the failure path and the unchanged valid path at the reviewed commit.Known gaps / failures
No hosted Cloud service was forced to return a malformed bridge result. The controlled loopback server supplied that protocol response to the production client so the failure was repeatable and did not affect users.
Deployment
No migration or rollout step is required.
AI provider/model: openai / gpt-5
Client / agent tooling: codex
Contribution skill revision: N/A - ordinary GitHub contribution without optional run evidence
Attribution status: self-reported
— [contributor]