You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Request]: Decide whether respond should support inline HTML #278
Tried: answer / with a tiny HTML page. Expected:respond can return HTML directly. Got:respond accepts only status, text and json (schema), so even a one-line page needs a separate file plus a page handler. That is 2 files where a plain server needs 0 extra. Suggestion: a product decision: add respond.html (with contentType text/html; charset=utf-8), or document that page is the intended path and close this. Low priority and separable from the discoverability gaps above. Evidence: Hello World A/B benchmark, 2026-09-20, URLCode 0.4.2, Sonnet 5 agents (n=1). Agent B (URLCode) succeeded with 0 failed commands but used 8 tool calls / 450k cumulative tokens (mostly cache reads) vs 1 call / 88k for a plain-Node control; 6 of its 8 calls were discovery. Raw transcripts and report: benchmarks/ab-hello-world/2026-09-20-urlcode-0.4.2/ (not yet committed). Not verified: security implications of inline HTML in YAML (escaping, CSP interaction).
urlcode validate passes and the route serves content-type: text/html; charset=utf-8 with the default nosniff and no-store. docs/HTTP.md says Content-Type may be configured on declared responses, so the gap is discoverability, not capability. The benchmark agent did not find the recipe.
Decision: do not add respond.html; document the existing recipe instead.
It duplicates a working declarative path and adds vocabulary (fails the feature test in docs/PROJECT-DIRECTION.md).
Evidence is n=1 and the agent missed an existing option (evidence test).
It leans toward inline templating, which docs/ASSETS.md rules out.
Keep page for anything larger than a snippet.
Follow-up (docs only): document the text + Content-Type recipe in docs/HTTP.md and the docs/AI-AUTHORING.md task table. Revisit only if later benchmark runs show authors still need html after that.
Not verified: CSP/escaping interaction. text is served verbatim and policies.security applies as it does today; I did not test them together.
Decision: no respond.html. The existing respond.text plus a Content-Type: text/html header already does it; documented in #286 (docs/HTTP.md, llms.txt, docs/AI-AUTHORING.md). Revisit only if later benchmark runs show authors still need an html field.
Activity
jimhoyd commentedon Sep 20, 2026
Finding: the request is already expressible without a new field. On this checkout (URLCode 0.4.2):
urlcode validatepasses and the route servescontent-type: text/html; charset=utf-8with the defaultnosniffandno-store.docs/HTTP.mdsays Content-Type may be configured on declared responses, so the gap is discoverability, not capability. The benchmark agent did not find the recipe.Decision: do not add
respond.html; document the existing recipe instead.docs/PROJECT-DIRECTION.md).docs/ASSETS.mdrules out.pagefor anything larger than a snippet.Follow-up (docs only): document the
text+Content-Typerecipe indocs/HTTP.mdand thedocs/AI-AUTHORING.mdtask table. Revisit only if later benchmark runs show authors still needhtmlafter that.Not verified: CSP/escaping interaction.
textis served verbatim andpolicies.securityapplies as it does today; I did not test them together.Record respond.html vs page recommendation (refs #278) (#281)
Document the respond text plus Content-Type recipe for short HTML (#278)
Document the respond text plus Content-Type recipe for short HTML (#278…
jimhoyd commentedon Sep 20, 2026
Decision: no respond.html. The existing respond.text plus a Content-Type: text/html header already does it; documented in #286 (docs/HTTP.md, llms.txt, docs/AI-AUTHORING.md). Revisit only if later benchmark runs show authors still need an html field.