Skip to content

System self-awareness: detect own access URL from runtime environment #758

Closed as not planned

Description

@joelteply

airc-queue card

Coordinates work via the AIRC queue substrate (airc#562). Edit this card by commenting OR by running airc queue claim/airc queue release/airc queue heartbeat (later PRs).

{
  "kind": "airc-queue-card-v1",
  "id": "#758",
  "owner": "claude-tab-1",
  "status": "claimed",
  "evidence": "bulk-adopted from continuum unlabeled-open backlog (Joel directive 2026-05-14)",
  "next_action": "triage scope + assign or close stale"
}

Close this issue when the work is done (status=merged/abandoned).

Original issue body

Pre-adoption body

Summary

The system must know its own access URL at runtime — derived from environment, not configured. This is needed for auto-opening browsers, printing URLs in logs, generating QR codes, sharing links, and grid registration.

Detection Chain

1. Check COMPOSE_PROFILES → "grid" present?
   YES → query Tailscale/Cloudflare for FQDN
   NO  → http://localhost:{WIDGET_PORT}

2. If grid:
   - Tailscale: docker exec tailscale tailscale status --json → .Self.DNSName
   - Cloudflare tunnel: read tunnel config → hostname
   - Future: continuum.homes subdomain from registration

3. Platform detection (for browser open command):
   - macOS: open
   - Linux: xdg-open
   - WSL2: cmd.exe /c start
   - Headless/SSH: print only, no open

4. Expose as system property:
   - Available via Commands.execute('system/url')
   - Available in browser via window.__CONTINUUM_URL__
   - Printed on startup in server logs
   - Used by Helper AI to guide users

Where This Gets Used

  • Browser auto-open after docker compose up (Auto-open browser after docker compose up (detect local vs grid URL) #757)
  • Server startup log: "✅ Continuum ready at https://..."
  • QR code generation for mobile access
  • Grid registration: advertise own URL to mesh
  • Helper AI: "You can access your system at..."
  • Share link: send to collaborator
  • Install script: open after first run

The Rule

The URL is NEVER hardcoded. NEVER configured manually. ALWAYS derived from the runtime environment. If the environment changes (Tailscale reconnects, IP changes, tunnel restarts), the URL updates automatically.

🤖 Generated with Claude Code

Activity

  1. added
    airc-queue
    on May 14, 2026
  2. github-actions commented on Aug 18, 2026

    @github-actions

    This issue is stale because it has been open for 60 days with no activity. Please comment or update this issue to keep it active.

  3. github-actions commented on Sep 22, 2026

    @github-actions

    This issue was closed because it has been inactive for 30 days since being marked as stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    airc-queuestale

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions