Skip to content

1 MiB decrypt through the JSON form costs 27 ms CPU, over the Free-plan budget #1

Description

@dickhardt

Measured live with wrangler tail on decrypt.agent.coop (secret-agent-coop service/scripts/live-smoke/run.mjs with BIG=1):

Request CPU Wall
small decrypt (48 B), JSON form 2 ms 24 ms
1 MiB, application/octet-stream with ?protected=&iv=&tag= 8 ms 38 ms
1 MiB, JSON form {"protected","iv","tag","ciphertext"} 27 ms 58 ms

The Free plan allows 10 ms CPU per invocation. The raw-bytes path fits; the JSON form, which is the only one the AAuth MCP invoke tool can send (aauth-dev/proxy issue filed), does not at 1 MiB. Costs on the JSON path: base64url decode of 1.4 MB, content-digest verification over the JSON body, and JSON-encoding a 1 MiB plaintext in the response.

Options: (a) once the proxy can send bytes, the skill switches to octet-stream; (b) stream the base64 decode and return text only when small, else a reference; (c) document that self-hosting on Free is fine for messages under about 300 KB. The hosted service is on the paid plan and is unaffected.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions