MAX_ATTACHMENT_BYTES (src/attachments.ts)

onecli · packages/agent-protocol/src/attachments.ts · typescript · Apache-2.0
ai

Shared constants for attachment limits and naming conventions across control plane, runner, and supervisor.

// Source: https://github.com/onecli/onecli | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
/**
 * Conversation attachments (images/files a user sends to a hosted agent):
 * the caps and the shared name/path vocabulary, in ONE leaf module — the
 * control plane (store + dispatch), the runner (pull + chunk) and the
 * supervisor (reassemble + write) must all agree on these, and two
 * definitions would eventually disagree (the sync-budget precedent).
 */

/**
 * Hard per-file byte cap, enforced at every door (web upload, Slack fetch,
 * runner pull, supervisor reassembly). 10MB matches the gateway's own proxied
 * body cap; a larger Slack file is refused with a visible `failed` chi

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key