revert(site): Remove SITE-001 agent website reverse-proxy (#865) - #867
Merged
Conversation
Three design flaws warranted full revert: XSS/same-origin risk from arbitrary agent HTML served on the Trinity origin, process management burden (agents must run and keep alive a port-3000 web server), and missing file_sharing_enabled permission gate on site-type links. Removes routers/site.py, SITE_PORT constant, nginx /site/ block, and the "Website" link-type option in PublicLinksPanel.vue. Also blocks link_type='site' creation at the API layer (returns 400) to prevent dead links until the dashboard.yaml-based SITE-002 replacement lands. Keeps: agent_public_links.type DB column, AuditEventType.SITE_ACCESS, Docker volume infrastructure, file_sharing_enabled flag — all reused by the companion SITE-002 redesign issue. Fixes #865 Co-Authored-By: Claude <noreply@anthropic.com>
AndriiPasternak31
added a commit
that referenced
this pull request
May 17, 2026
Brings in 11 commits since the previous rebase (ba4aeae → 09c8bec), including the SITE-001 revert (#867), the cleanup retention status-value fix (#864), and the 60-min default execution timeout (#841). Conflict resolved: src/backend/db/migrations.py — kept dev's two new migration entries (default_execution_timeout_to_3600, fix_retention_index_status_values) first, then our execution_retry_count appended. All three migration functions defined; order matches each side's landing chronology. Phase A (test_cleanup_unreachable_orphan.py helper-pair) and Phase B (tests/unit/conftest.py baseline-restore) for #797 verified intact after auto-merge. Lint clean, voice_auth + cleanup tests pass under seed 12345. Refs #678
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.
Summary
routers/site.py(httpx streaming reverse-proxy to agent port 3000),SITE_PORTconstant, nginx/site/proxy block, and "Website" link-type option inPublicLinksPanel.vuelink_type='site'creation at the API layer (returns 400) to prevent dead links until the SITE-002 replacement landsarchitecture.md,feature-flows.md, andfeature-flows/public-agent-links.mdto document the revert and point to the companion redesignWhy
Three design flaws identified in design review:
Content-Security-Policywas explicitly stripped by the proxyfile_sharing_enabledflag onagent_ownershipwas not checked; any agent with a site-type link bypassed the opt-in guardWhat was kept (for SITE-002 reuse)
agent_public_links.typeDB column and schema (migration preserved)AuditEventType.SITE_ACCESSinplatform_audit_service.pyagent-{name}-public,/home/developer/public/)file_sharing_enabledflag onagent_ownershipChanges
src/backend/routers/site.py— deletedsrc/backend/config.py— removedSITE_PORT = 3000src/backend/main.py— removed import +app.include_router(site_router)src/frontend/nginx.conf— removedlocation /site/blocksrc/backend/routers/public_links.py— removedSITE_PORTimport; rejectlink_type='site'with 400src/frontend/src/components/PublicLinksPanel.vue— removed "Website" link-type selector and badgesrc/backend/db_models.py— updated commentstests/test_site_proxy.py— deleted (tests for deleted implementation)tests/registry.json— removed entryTest Plan
pytest tests/test_public_links.py -vPOST /api/agents/{name}/public-linkswithlink_type='site'returns 400POST /api/agents/{name}/public-linkswithlink_type='chat'(default) still worksGET /site/{token}/returns 404 (nginx block removed)Fixes #865
🤖 Generated with Claude Code