forked from molecule-ai/molecule-core
The previous PR (#2509) flipped canvas outbound file parts to the v1 flat shape `{url, filename, mediaType}` based on a hypothesis that a2a-sdk's JSON-RPC parser silently dropped v0 `{kind:"file", file:{...}}` shapes. Live test shows the opposite: a2a-sdk's JSON-RPC layer validates against the v0 Pydantic discriminated union (TextPart | FilePart | DataPart), so v1 flat shape is rejected with: Invalid Request: params.message.parts.0.TextPart.text — Field required params.message.parts.0.FilePart.file — Field required params.message.parts.0.DataPart.data — Field required The actual root cause of the user-visible "Error: message contained no text content" was the missing `/workspace` chown (CP PR #381 + test pin #382), not a wire-shape mismatch. Verified end-to-end by sending a v0 image-only message after PR #381 + workspace re-provision — agent receives the file, reads its bytes, and replies normally. Reverting only the canvas outbound shape. Defensive v1-tolerance stays in: - workspace/executor_helpers.py — extract_attached_files still accepts v1 protobuf parts in case a future client emits them or a future SDK release flips internal representation. Harmless on the v0 hot path. - canvas/message-parser.ts — extractFilesFromTask still tolerates v1 shape on incoming agent responses. Some agents may emit v1 when their internal serializer round-trips through protobuf. Tests stay green (91 canvas, 86 workspace). |
||
|---|---|---|
| .. | ||
| e2e | ||
| public | ||
| src | ||
| .env.example | ||
| .gitignore | ||
| components.json | ||
| Dockerfile | ||
| next.config.ts | ||
| package-lock.json | ||
| package.json | ||
| playwright.config.ts | ||
| playwright.staging.config.ts | ||
| postcss.config.js | ||
| tailwind.config.ts | ||
| tsconfig.json | ||
| vitest.config.ts | ||