serve: the file an agent sends goes to its room, bounded by [chat] max_file #86

Merged
mikluko merged 1 commit from serve-files into main 2026-11-16 10:26:48 +00:00
Owner

The serve adapter for HostService.Send, which #80 and #81 left open.

  • roomFiles fills server.Files with chat.Service.Attach. The two packages' four errors are different values, so each chat refusal is returned as the server's with the chat's text (errors.Is holds for both); anything else passes as it is.
  • [chat] max_file goes to Host.MaxFile and to LimitSend, which stopped at DefaultMaxFile before the chat side was asked.
  • Unit tests of the mapping. The send through a real homeserver is the run's to show; no Tuwunel test is added.
The serve adapter for `HostService.Send`, which #80 and #81 left open. - `roomFiles` fills `server.Files` with `chat.Service.Attach`. The two packages' four errors are different values, so each chat refusal is returned as the server's with the chat's text (`errors.Is` holds for both); anything else passes as it is. - `[chat] max_file` goes to `Host.MaxFile` and to `LimitSend`, which stopped at `DefaultMaxFile` before the chat side was asked. - Unit tests of the mapping. The send through a real homeserver is the run's to show; no Tuwunel test is added.
serve: the file an agent sends goes to its room, bounded by [chat] max_file
All checks were successful
test / changelog (pull_request) Successful in 5s
image / image (pull_request) Successful in 20s
test / go (pull_request) Successful in 1m9s
60dc63e9a1
The chat side's four refusals are different values from the server's, so
the adapter returns each as the server's, keeping the chat's text, which
names the bound; otherwise every refusal reaches the agent as Internal.
[chat] max_file is the one number for Host.MaxFile and LimitSend, which
stopped at the constant 10 MiB before the chat side was asked.

Assisted-By: Claude <noreply@anthropic.com>
Commenting is not possible because the repository is archived.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
mikluko/roomcity!86
No description provided.