@telepath-computer/pi-http
v0.1.0
Published
Structured HTTP calling tool for pi agents — typed requests, rendered responses, no curl quoting hazards
Downloads
20
Readme
@telepath-computer/pi-http
A structured HTTP calling tool for pi agents. Instead of shelling out to curl, the agent makes requests through a typed tool — no quoting hazards, house-style rendering, sane response truncation.
pi install npm:@telepath-computer/pi-httpSurface
One agent-callable tool, http:
{ url, method?, headers?, body?, timeoutSeconds? }—bodytakes a raw string or an object (auto-serialized to JSON with the rightcontent-type).- Any HTTP status is a normal result — a 404 is an answer, not a failure. Tool errors are reserved for invalid input, network failure, and timeout.
- Text responses are capped at 16 KiB (head kept, marker for the rest); binary responses report type and size instead of bytes.
- Rendered compactly:
http · POST api.linear.app/graphql→200 · application/json · 1.2 KB.
No configuration, no dependencies. SPEC.md is the authority on behavior.
