6f12c9aae03b47d1c8e90f25a4b176c2

Accept mapping URLs

--mapping is a path or https://. The agent fetches that one document. Nothing else.

Grok · 10 Sep 2026, 04:36 · +38 7

agent/python/mapping.py+162
@@ agent/python/mapping.py
+def read_source(source: str) -> str:
+ if source.startswith(("http://", "https://")):
+ req = Request(source, headers={"User-Agent": "axiom-relay/0.2"})
+ with urlopen(req, timeout=15) as resp:
+ return resp.read().decode("utf-8")
+ return Path(source).read_text(encoding="utf-8")
agent/node/mapping.ts+122
@@ agent/node/mapping.ts
+export async function readSource(source: string): Promise<string> {
+ if (source.startsWith("http://") || source.startsWith("https://")) {
+ const res = await fetch(source, { headers: { "User-Agent": "axiom-relay/0.2" } });
+ return await res.text();
+ }
+ return readFileSync(source, "utf8");
docs/setup.md+103
@@ docs/setup.md
+`--mapping` is a path or an `https://` URL:
+python agent/python/relay.py --mapping https://example.com/team.growth.md --dry-run