Skip to content

revert(site): Remove SITE-001 agent website reverse-proxy (#865) - #867

Merged
vybe merged 1 commit into
devfrom
feature/865-remove-site001-proxy
May 17, 2026
Merged

revert(site): Remove SITE-001 agent website reverse-proxy (#865)#867
vybe merged 1 commit into
devfrom
feature/865-remove-site001-proxy

Conversation

@vybe

@vybe vybe commented May 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Removes routers/site.py (httpx streaming reverse-proxy to agent port 3000), SITE_PORT constant, nginx /site/ proxy block, and "Website" link-type option in PublicLinksPanel.vue
  • Blocks link_type='site' creation at the API layer (returns 400) to prevent dead links until the SITE-002 replacement lands
  • Updates architecture.md, feature-flows.md, and feature-flows/public-agent-links.md to document the revert and point to the companion redesign

Why

Three design flaws identified in design review:

  1. XSS/same-origin risk — arbitrary HTML/JS from agents served on the Trinity origin; Content-Security-Policy was explicitly stripped by the proxy
  2. Process management burden — agents must start and keep alive a port-3000 web server with no framework standardization or crash recovery
  3. Missing permission gatefile_sharing_enabled flag on agent_ownership was not checked; any agent with a site-type link bypassed the opt-in guard

What was kept (for SITE-002 reuse)

  • agent_public_links.type DB column and schema (migration preserved)
  • AuditEventType.SITE_ACCESS in platform_audit_service.py
  • Docker volume infrastructure (agent-{name}-public, /home/developer/public/)
  • file_sharing_enabled flag on agent_ownership
  • Public link token system (FILES-001 uses it independently)

Changes

  • src/backend/routers/site.py — deleted
  • src/backend/config.py — removed SITE_PORT = 3000
  • src/backend/main.py — removed import + app.include_router(site_router)
  • src/frontend/nginx.conf — removed location /site/ block
  • src/backend/routers/public_links.py — removed SITE_PORT import; reject link_type='site' with 400
  • src/frontend/src/components/PublicLinksPanel.vue — removed "Website" link-type selector and badge
  • src/backend/db_models.py — updated comments
  • tests/test_site_proxy.py — deleted (tests for deleted implementation)
  • tests/registry.json — removed entry

Test Plan

  • Existing tests pass: pytest tests/test_public_links.py -v
  • POST /api/agents/{name}/public-links with link_type='site' returns 400
  • POST /api/agents/{name}/public-links with link_type='chat' (default) still works
  • GET /site/{token}/ returns 404 (nginx block removed)
  • PublicLinksPanel create modal no longer shows "Website" option

Fixes #865

🤖 Generated with Claude Code

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>
@vybe
vybe merged commit 09c8bec into dev May 17, 2026
9 checks passed
AndriiPasternak31 added a commit that referenced this pull request May 17, 2026
Brings in 11 commits since the previous rebase (ba4aeae09c8bec),
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant