Repository navigation
feat(agents): store and compile versioned html visuals - #716
Merged
Merged
Conversation
nixuuu
force-pushed
the
feat/agents-html-storage
branch
from
November 14, 2026 12:57
6edb29c to
ced90c8
Compare
nixuuu
force-pushed
the
feat/agents-html-storage
branch
4 times, most recently
from
November 14, 2026 14:53
3144924 to
3193fe4
Compare
nixuuu
marked this pull request as ready for review
November 14, 2026 14:55
nixuuu
force-pushed
the
feat/agents-html-storage
branch
2 times, most recently
from
November 14, 2026 15:15
cb790c7 to
9b6eb9a
Compare
nixuuu
force-pushed
the
feat/agents-html-storage
branch
from
November 14, 2026 15:32
9b6eb9a to
a63f423
Compare
nixuuu
added a commit
that referenced
this pull request
Nov 14, 2026
Offers `render_html` through the shared tool catalog on Claude Agent SDK, Codex app-server and Grok ACP. The worker announces `thread_html_v1`; an older gateway gets an actionable update response instead of an unknown-tool call. Validation: fake adapters for all three harnesses publish HTML through WorkerLink into PostgreSQL. Existing component-tool coverage is retained. The focused compiler/inbox/migration/gateway/harness run passed 58 tests; install, generation, typecheck, lint and formatting passed. Security/gateway/three-harness run passed 38/38, including fake adapters publishing through WorkerLink. Platform probes are recorded on #718. Gateway depth100/script64 errors reach the tool before storage. The independent security re-check recommended merge. Copy audit: model-facing description prefers components for standard charts/cards/tables, requires addEventListener rather than inline handlers/eval, inline libraries/assets, no network or secrets, bounded documents and Canopy theme variables. No UI copy changes in this layer. Previous-head full check:tmp was green in [CI run 43605016001](https://github.com/itsoltech/canopy/actions/runs/43605016001), head `cc18c0b7d86ae78ddd7d1cdff1af221107910367`. Pre-merge update: rebased onto origin/dev including #723, #725 and #730, with render_html migration 0144 after the provider migration 0143. The shared compiler/shell P3 fixes and regression evidence are described in #716 and #718. Final-head schema/compiler tests: 51/51; gateway/three-harness visuals integration: 16/16; both temp checks clean. Generation, typecheck, lint and formatting passed. New-head full CI is pending. All four PRs are ready; no merge performed.
This was referenced Nov 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
render_htmlbesiderender_visual, storing HTML as an immutable, owner-scoped visual version. The existing item, GetVisual, expected_version, citation and export pipeline remains the source of truth. Old clients reject kit version 2; workers and gateways negotiatethread_html_v1additively.The shared compiler rebuilds untrusted HTML, attempts to remove embedded documents, navigation attributes, inline handlers and external/module scripts, and prefixes each classic script with lockdown before hashing it. Removal is best-effort: parser differences and reparsing can restore markup (mXSS); CSP is the execution/resource boundary. Foreign MathML/SVG style elements are additionally discarded. Script CSP is hash-only; there is no unsafe-eval or unsafe-hashes. The trusted shell also restricts child navigation. Web/mobile residual network risk is explicitly accepted: matching-SRI external scripts and DNS hints can still send data. Desktop adds a separate network-denied browser process in #718.
Validation: install, generation, typecheck, lint and formatting passed. The focused compiler/inbox/migration/gateway/harness run passed 58 tests. Tests cover pre-parse/UTF-8 limits, CSP hashes, stripped permissive metas, script-only sandbox, cyclic/invalid/flooded messages, owner scoping, version conflicts and format preservation. Migration is now 0144_thread_html (file, index and schema expectation), following dev's 0143 from #725. The CLIProxyAPI stack moves to 0145; this stack merges first. Protocol remains additive.
Security review fixes: the CSP meta, style and bootstrap scripts are inserted as parse5 tree nodes. Regression tests cover
<html data-x="<head>">, a leading<!-- <head> -->, and</body>text in attributes/comments: exactly one CSP meta is first in the real head and every executable script has an authorized hash. Gateway publishing applies the same depth100/script64 limits as clients; rejected documents leave no stored version. The shell relay forwards onlyJSON.parse(text).message; an 8 MiB ArrayBuffer regression proves the original clone is not forwarded. Shared iframe permissions explicitly deny PiP and clipboard features.The focused security/gateway/three-harness run passed 38/38; channel identity tests passed 3/3. Per-platform probe evidence is recorded on #718, including the DNS positive control and protected result. The independent security re-check recommended merge. Copy audit: no new UI copy in this layer; tool instructions state inline-only code, addEventListener, size/script/depth limits, theme variables and no secrets.
Previous-head full check:tmp was green in CI run 43605016001, head
cc18c0b7d86ae78ddd7d1cdff1af221107910367.Pre-merge update: rebased onto origin/dev including #723, #725 and #730, preserving the new visual kit/gallery compiler and provider migration. The shell's own hash-authorized script now starts with the shared network lockdown, including when copied into a fresh realm. Only the trusted mobile shell retains its own message bridge; opaque agent realms have none and also remove ReactNativeWebView. Regression tests exercise web/native relay, locked RTC/fetch properties, the shell hash prefix and MathML/SVG reparsing with script-src-attr none. Final-head checks: schema/compiler 51/51, visuals/three-harness integration 16/16, both with empty temp directories; gen:check, full typecheck, lint and format:check passed. Immediately before the final push, origin/dev was re-fetched at d2af937 and its highest migration confirmed as 0143. New-head full CI is pending. All four PRs are ready, as requested; no merge performed.