Skip to content

Docker-first architecture: full E2E stack, grid access, continuum CLI - #740

Merged
joelteply merged 111 commits into
mainfrom
feature/docker-tls-infrastructure
Apr 5, 2026
Merged

joelteply merged 111 commits into
mainfrom
feature/docker-tls-infrastructure

Conversation

@joelteply

@joelteply joelteply commented Apr 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Complete Docker infrastructure for Continuum — git clone && ./setup.sh → browser opens, personas chat. Mac and Windows verified.

What's Working (Verified E2E)

Platform Chat Personas WS Proxy Images
Mac (ARM) ✅ 12 (10 API keys) ✅ 9003→node-server:9001 GHCR arm64
Windows (BigMama x86) ✅ 2 (1 API key) ✅ 9003→node-server:9001 Built locally

Docker Stack (6 containers)

  • continuum-core: Rust runtime, ONNX Runtime, TTS/STT, 26 modules
  • node-server: TypeScript, 344 commands, 17 daemons, 13 persona lifecycle
  • widget-server: Vite UI + WebSocket proxy (browser connects to same port as page)
  • postgres: 17-alpine, auto-seeded on first run
  • livekit + livekit-bridge: WebRTC transport (separate process, no protobuf deadlock)
  • model-init: Downloads whisper, piper, kokoro, VAD models

Key Fixes This Session

  • IPC auto-reconnect: Both RustCoreIPCClientBase and ORMRustClient survive core restarts with exponential backoff
  • ORT architecture: TARGETARCH (BuildKit) instead of uname -m — eliminates cached wrong-arch layers
  • WebSocket proxy: Widget-server proxies WS on same port as page. Browser uses location.host. Zero port configuration.
  • Vite build in Docker: Dockerfile runs npx vite build so bundle always matches source
  • Avatar tick disabled: Software Vulkan crashed ORT via mutex poisoning (Avatar auto-refresh: low-priority RTOS-style background task, not disabled #771 for RTOS-style fix)
  • Whisper model: base.en default (74MB, works with all whisper.cpp versions)
  • Node-server healthcheck: --start-period=30s for slow bootstrap

Fresh Install Experience

git clone https://github.com/CambrianTech/continuum.git
cd continuum
./setup.sh    # Mac/Linux/WSL2
setup.bat     # Windows PowerShell

Pre-built images pull in ~2 minutes. No compilation, no npm, no cargo.

Follow-Up Issues

Test Plan

- Expert Prune only shows for MoE models (sourceModel.isMoE)
- Modality only shows for text-only models (!hasVision)
- Publish stage renamed to Deliver (publish is now a manual command)
- Default pipeline includes context-extend and deliver
- Stage colors added for deliver type
- PipelineComposer.sourceModel property controls stage visibility
- Dockerfiles for continuum-core (Rust, cargo-chef cached), node-server,
  widget-server, and forge-worker (sentinel-ai)
- docker-compose.yml with health checks, restart policies, dependency ordering
- CI workflow to build+push images to ghcr.io on merge to main
- Windows GPU install guide (Docker Desktop + WSL2, no CUDA setup needed)
- .dockerignore files to keep build context small
- README updated with one-command Docker install
- Grid architecture doc updated with Docker node architecture
…ocalhost

- NetworkIdentity.ts: single source of truth for mesh hostname and TLS certs
  Discovers from Tailscale (tailscale status --json), falls back to cert scan
- HTTP server serves HTTPS when certs found in ~/.continuum/
- WebSocket server serves WSS when certs found
- Browser derives ws/wss protocol from window.location (not hardcoded)
- ConnectionBroker, JTAGRouterDynamic, TransportFactoryBrowser all use
  NetworkIdentity instead of hardcoded ws://localhost
- SystemOrchestrator opens browser with correct https:// URL
- LiveWidget rewrites LiveKit URL to match page protocol
- start-workers.sh passes TLS certs to LiveKit when available
- Fixed wrong relative paths in ConnectionBroker, JTAGRouterDynamic,
  ServerLifecycleManager (../../config → ../../../config)
- TransportFactoryServer uses NetworkIdentity for WSS URLs
- TransportConfig browser default derives protocol from window.location
- MCP server uses NetworkIdentity for WebSocket URL
- ServerLifecycleManager readiness check uses wss:// with rejectUnauthorized:false
NetworkIdentity uses child_process/fs/os (Node-only). Moving to
system/config/server/ keeps it out of esbuild's browser bundle.
Shared files use eval("require") to prevent static analysis tracing.
Copilot AI review requested due to automatic review settings April 2, 2026 19:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR moves Continuum toward a Docker-first deployment model and adds automatic TLS/mesh hostname discovery (via Tailscale certs in ~/.continuum) so browser/server WebSocket + HTTP URLs work correctly in Docker/remote contexts.

Changes:

  • Add Dockerfiles + CI workflow to build/push images, plus .dockerignore updates.
  • Introduce NetworkIdentity as a single source of truth for TLS material + service URLs, and thread it through WebSocket/HTTP URL construction.
  • Update widget/server connection logic to derive ws/wss from runtime context and add UI stage changes (“deliver” stage gating, colors).

Reviewed changes

Copilot reviewed 27 out of 27 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
src/workers/start-workers.sh Adds LiveKit TLS auto-config when certs exist in ~/.continuum.
src/workers/.dockerignore Ignores build artifacts/logs for worker image contexts.
src/widgets/live/LiveWidget.ts Rewrites LiveKit ws URL to match browser hostname + ws/wss based on page protocol.
src/widgets/factory/stages/StageElement.ts Adds colors for new deliver stage.
src/widgets/factory/stages/PublishStageElement.ts Repurposes publish UI element to emit deliver stage config.
src/widgets/factory/stages/PipelineComposer.ts Adds source-model gating for stage menu + updates default stages and stage registry.
src/widgets/factory/ForgeDeltaElement.ts Updates delta summary to show deliver and adds stage color mapping.
src/system/transports/websocket-transport/server/WebSocketTransportServer.ts Adds TLS WebSocket server creation when certs are present.
src/system/transports/shared/TransportConfig.ts Updates browser default ws URL to use wss on HTTPS pages.
src/system/transports/server/TransportFactoryServer.ts Uses NetworkIdentity to build server-side ws URLs when available.
src/system/transports/browser/TransportFactoryBrowser.ts Derives ws URL from window.location (no hardcoded localhost).
src/system/orchestration/SystemOrchestrator.ts Uses NetworkIdentity.getServiceUrl() instead of http://localhost.
src/system/core/router/shared/JTAGRouterDynamic.ts Derives ws URL from browser context or NetworkIdentity on server.
src/system/core/lifecycle/ServerLifecycleManager.ts Switches readiness WebSocket to ws/wss based on TLS detection.
src/system/core/connection-broker/shared/ConnectionBroker.ts Uses browser/server context to compute ws URLs (incl. TLS).
src/system/config/server/NetworkIdentity.ts New module to discover mesh hostname + TLS cert/key and build service URLs.
src/scripts/seed-continuum.ts Makes recipe seeding more “idempotent” by suppressing create errors.
src/scripts/minimal-server-template.ts Adds HTTPS support when TLS certs exist via NetworkIdentity.
src/mcp-server.ts Uses NetworkIdentity for ws URL when present.
src/.dockerignore Adds root dockerignore patterns for src builds.
README.md Updates install flow to “one command” + Docker usage.
docs/INSTALL-WINDOWS.md Adds Windows GPU + Tailscale TLS setup guide.
docs/grid/GRID-ARCHITECTURE.md Documents Docker-first node architecture.
docker/widget-server.Dockerfile Adds widget-server image definition.
docker/node-server.Dockerfile Adds node-server image definition.
docker/continuum-core.Dockerfile Adds Rust continuum-core multi-stage build (cargo-chef).
.github/workflows/docker-images.yml Adds CI workflow to build/push Docker images to GHCR.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +22 to +27
# ── Rust Core ─────────────────────────────────────────────
continuum-core:
runs-on: ubuntu-latest
if: |
github.event_name == 'push' ||
contains(github.event.pull_request.changed_files, 'src/workers/')

Copilot AI Apr 2, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

github.event.pull_request.changed_files is a number, not a list of paths, so contains(github.event.pull_request.changed_files, 'src/workers/') will never work (and may error during expression evaluation). If you want per-path gating, use a paths-filter step to set an output (or rely on the workflow-level on.pull_request.paths and drop this if).

Suggested change
# ── Rust Core ─────────────────────────────────────────────
continuum-core:
runs-on: ubuntu-latest
if: |
github.event_name == 'push' ||
contains(github.event.pull_request.changed_files, 'src/workers/')
changes:
runs-on: ubuntu-latest
outputs:
workers: ${{ steps.filter.outputs.workers }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
workers:
- 'src/workers/**'
# ── Rust Core ─────────────────────────────────────────────
continuum-core:
runs-on: ubuntu-latest
needs: changes
if: |
github.event_name == 'push' ||
needs.changes.outputs.workers == 'true'

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/docker-images.yml Outdated

- uses: docker/build-push-action@v6
with:
context: ./src/examples/widget-ui

Copilot AI Apr 2, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The widget-server image build context doesn’t match the Dockerfile’s expectations. docker/widget-server.Dockerfile assumes the build context is src/ (it COPYs root package.json and later cd examples/widget-ui), but this workflow uses context: ./src/examples/widget-ui, which will make the COPY/WORKDIR paths fail. Align the build context (likely ./src) or adjust the Dockerfile to work from the widget-ui directory.

Suggested change
context: ./src/examples/widget-ui
context: ./src

Copilot uses AI. Check for mistakes.
Comment on lines +22 to +23
# Full source (widgets reach into shared/, daemons/, commands/, scripts/)
COPY . .

Copilot AI Apr 2, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This Dockerfile assumes the build context is the src/ root (it copies root package.json and later cd /app/examples/widget-ui). If this image is built with a narrower context (e.g. src/examples/widget-ui as in the workflow), the COPY package.json ... tsconfig*.json and WORKDIR /app/examples/widget-ui steps will fail. Either enforce src/ as the build context, or rewrite the Dockerfile to build from the widget-ui subdirectory.

Suggested change
# Full source (widgets reach into shared/, daemons/, commands/, scripts/)
COPY . .
# Full source required from the src/ root build context
# Copy explicitly so this Dockerfile clearly enforces the expected layout.
COPY examples ./examples
COPY shared ./shared
COPY daemons ./daemons
COPY commands ./commands
COPY scripts ./scripts

Copilot uses AI. Check for mistakes.
Comment thread docker/node-server.Dockerfile Outdated
Comment on lines +39 to +42
EXPOSE 9000 9001

HEALTHCHECK --interval=5s --timeout=3s --retries=3 \
CMD curl -f http://localhost:9000/health || exit 1

Copilot AI Apr 2, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The runtime image defines a curl-based HEALTHCHECK, but node:20-slim doesn’t include curl by default. Without installing curl in the runtime stage, the container will be marked unhealthy even if the server is fine. Install curl (or implement the healthcheck using Node/wget/nc).

Copilot uses AI. Check for mistakes.
Comment thread docker/node-server.Dockerfile Outdated
COPY --from=builder /app/package.json /app/package-lock.json ./
RUN npm ci --omit=dev --ignore-scripts

COPY --from=builder /app/dist/ ./dist/

Copilot AI Apr 2, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Runtime image only copies dist/ and shared/, but several server-side features load JSON recipes from system/recipes/*.json via filesystem at runtime (e.g. RecipeLoader reads path.join(__dirname, '..', '<id>.json')). With the current COPY set, those JSON files won’t exist in the container, so recipe loading will fail. Copy system/recipes/*.json into the runtime image (in the location the built code expects) or adjust the loader to read from a bundled/generated source.

Suggested change
COPY --from=builder /app/dist/ ./dist/
COPY --from=builder /app/dist/ ./dist/
COPY --from=builder /app/system/recipes/ ./dist/system/recipes/

Copilot uses AI. Check for mistakes.
Comment on lines +25 to +26
serverUrl: (typeof window !== 'undefined' && window.location?.protocol === 'https:')
? `wss://${window.location.hostname}:${wsPort}`

Copilot AI Apr 2, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In browser mode, the default WebSocket URL still hardcodes localhost for non-HTTPS pages. This breaks remote access over plain HTTP (e.g. http://<mesh-host>:9000 should connect to ws://<mesh-host>:<wsPort>, not ws://localhost:<wsPort>). Consider deriving host from window.location.hostname for both http+https and only toggling ws: vs wss: based on window.location.protocol.

Suggested change
serverUrl: (typeof window !== 'undefined' && window.location?.protocol === 'https:')
? `wss://${window.location.hostname}:${wsPort}`
serverUrl: (typeof window !== 'undefined' && window.location?.hostname)
? `${window.location.protocol === 'https:' ? 'wss' : 'ws'}://${window.location.hostname}:${wsPort}`

Copilot uses AI. Check for mistakes.
Comment on lines +66 to +74
const certFile = files.find(f => f.endsWith('.crt') && !f.startsWith('.'));
const keyFile = files.find(f => f.endsWith('.key') && !f.startsWith('.'));
if (!certFile || !keyFile) return null;

const hostname = certFile.replace('.crt', '');
return {
hostname,
certPath: path.join(CONTINUUM_DIR, certFile),
keyPath: path.join(CONTINUUM_DIR, keyFile),

Copilot AI Apr 2, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

discoverFromCerts() picks the first .crt and the first .key independently, which can easily mismatch if multiple certs are present (leading to TLS startup failures that are hard to diagnose). Prefer pairing cert+key by basename (e.g. for each *.crt, check for a sibling *.key with the same prefix) and pick deterministically (newest mtime, or the one matching a configured hostname).

Suggested change
const certFile = files.find(f => f.endsWith('.crt') && !f.startsWith('.'));
const keyFile = files.find(f => f.endsWith('.key') && !f.startsWith('.'));
if (!certFile || !keyFile) return null;
const hostname = certFile.replace('.crt', '');
return {
hostname,
certPath: path.join(CONTINUUM_DIR, certFile),
keyPath: path.join(CONTINUUM_DIR, keyFile),
const certFiles = files.filter(f => f.endsWith('.crt') && !f.startsWith('.'));
const pairs = certFiles
.map(certFile => {
const hostname = certFile.slice(0, -'.crt'.length);
const keyFile = `${hostname}.key`;
if (!files.includes(keyFile)) return null;
const certPath = path.join(CONTINUUM_DIR, certFile);
const keyPath = path.join(CONTINUUM_DIR, keyFile);
const certMtimeMs = fs.statSync(certPath).mtimeMs;
const keyMtimeMs = fs.statSync(keyPath).mtimeMs;
return {
hostname,
certPath,
keyPath,
sortMtimeMs: Math.max(certMtimeMs, keyMtimeMs),
};
})
.filter((pair): pair is {
hostname: string;
certPath: string;
keyPath: string;
sortMtimeMs: number;
} => pair !== null)
.sort((a, b) => {
if (b.sortMtimeMs !== a.sortMtimeMs) return b.sortMtimeMs - a.sortMtimeMs;
return a.hostname.localeCompare(b.hostname);
});
const selectedPair = pairs[0];
if (!selectedPair) return null;
return {
hostname: selectedPair.hostname,
certPath: selectedPair.certPath,
keyPath: selectedPair.keyPath,

Copilot uses AI. Check for mistakes.
Comment on lines +115 to +116
LIVEKIT_CERT=$(ls "$CONTINUUM_ROOT"/*.crt 2>/dev/null | head -1)
LIVEKIT_KEY=$(ls "$CONTINUUM_ROOT"/*.key 2>/dev/null | head -1)

Copilot AI Apr 2, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The TLS cert/key discovery uses separate ls ... | head -1 calls for .crt and .key, so it can select a cert from one hostname and a key from another if multiple exist in ~/.continuum. Pair the cert+key by basename (same prefix) to avoid generating an invalid LiveKit TLS config.

Suggested change
LIVEKIT_CERT=$(ls "$CONTINUUM_ROOT"/*.crt 2>/dev/null | head -1)
LIVEKIT_KEY=$(ls "$CONTINUUM_ROOT"/*.key 2>/dev/null | head -1)
# Pair cert and key by basename so we don't mix files from different hostnames.
LIVEKIT_CERT=""
LIVEKIT_KEY=""
for cert_path in "$CONTINUUM_ROOT"/*.crt; do
[ -e "$cert_path" ] || continue
cert_base="${cert_path%.crt}"
key_path="${cert_base}.key"
if [ -f "$key_path" ]; then
LIVEKIT_CERT="$cert_path"
LIVEKIT_KEY="$key_path"
break
fi
done

Copilot uses AI. Check for mistakes.
Comment on lines +53 to +60
try {
const wasCreated = await createRecord('recipes', { ...data, id }, id, data.displayName || id);
if (wasCreated) created++;
else existing++;
} catch {
// "Record already exists" or other non-fatal error — skip silently
existing++;
}

Copilot AI Apr 2, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Catching all errors and treating them as “existing” can hide real failures (invalid JSON, DB connectivity issues, schema validation errors) and make seeding appear successful when it isn’t. Consider only suppressing the specific “already exists” error (by checking error type/message) and logging unexpected errors at least once (or counting them separately and failing at the end).

Copilot uses AI. Check for mistakes.
echo "TS build skipped — tsx will handle at runtime"

# Widget-ui deps
RUN cd examples/widget-ui && npm install 2>/dev/null || true

Copilot AI Apr 2, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

npm install in examples/widget-ui is allowed to fail silently (|| true). If this install fails (e.g., due to registry/network issues), the image will still build but the runtime tsx server is likely to crash due to missing deps. Consider failing the build on install errors (or at least logging and exiting non-zero) so CI catches it.

Suggested change
RUN cd examples/widget-ui && npm install 2>/dev/null || true
RUN cd examples/widget-ui && npm ci --ignore-scripts || npm install --ignore-scripts

Copilot uses AI. Check for mistakes.
joelteply added 19 commits April 2, 2026 14:52
…s stack

Replaces old source-build installer with Docker-first approach:
- Detects OS, GPU, Docker availability
- Auto-provisions Tailscale TLS certs to ~/.continuum/
- docker compose pull + up (no compilation needed)
- Opens browser at correct URL (https if TLS, http otherwise)
- Zero manual steps after Docker is installed
…t pool (#722)

Root cause of #722: when Rust core IPC dies, all 40 connections go dead
with no reconnect. Every widget fails with "All IPC connections failed."

Fixes:
- IPCConnection: auto-reconnect on close with exponential backoff (1s→30s)
- IPCConnection: reset reconnect counter on successful connection
- ORMRustClient: pool creation uses Promise.allSettled (partial success OK)
- ORMRustClient: health check loop every 10s logs connection status
- Dead connections reconnect automatically instead of staying dead forever
- Move docker-compose.yml into repo root (was untracked at parent level)
- Add Caddy reverse proxy (livekit-tls) to terminate TLS on port 7443,
  proxy WebSocket to LiveKit's plain ws://livekit:7880
- Add model-init container that downloads voice/avatar/scene models into
  a named Docker volume (voice-models), avoiding 4.1GB baked into images
- Add LIVEKIT_TLS_PORT=7443 to audio constants (TS + Rust generated)
- LiveJoinServerCommand returns wss:// URL via NetworkIdentity when TLS
  certs are available, falls back to ws://localhost for local dev
- New docker-entrypoint.ts for node-server: uses SystemOrchestrator
  cli-command mode (server-only, no browser)
- Rebuild node-server.Dockerfile: proper entry point, examples + templates
- Fix .dockerignore: exclude Rust target/ but keep TS bindings for compile
- continuum-core.Dockerfile: WORKDIR /app so models/ relative path works
- download-voice-models.sh + download-avatar-models.sh: respect MODELS_DIR
  env var for Docker volume mount override
tsc emits ES2020 imports without .js extensions which Node 20 can't
resolve natively. Switch to single-stage image with tsx at runtime.
Tested: container starts, loads 355 commands, initializes all daemons.
RustCoreIPCClientBase.connect() emitted EventEmitter 'error' on socket
failure, which crashes Node if no listener is attached. Changed to
'connection-error' event. Also catch connect rejection in getInstance()
so it logs and resets the singleton instead of causing unhandled rejection.

Tested: node-server container stays alive without continuum-core running.
Bevy 0.18.1 requires rustc 1.89+. Also add --locked to cargo-chef
install to prevent transitive dep version conflicts.
CI builds and pushes model-init image to GHCR alongside core/node/widgets.
Mac users pull pre-built images (docker compose pull) — local Rust builds
fail on ARM64 Docker due to LiveKit WebRTC native SDK.
Logs: ARM64 WebRTC build, persona seeding, multi-arch CI, TLS proxy
(done), IPC crash fix (done), model volumes (done), ESM resolution (done).
WebRTC native C++ fails on ARM64 Docker (Apple Silicon) and WSL2.
LiveKit runs as its own container — the Rust crate is only for AI agents
joining rooms. Making it a cargo feature flag lets Docker build without it.

- New `livekit-webrtc` feature (default=on for bare metal, off in Docker)
- Stub LiveKitAgentManager returns errors when feature disabled
- Gate: transport/livekit_agent, avatar/frame_publisher, avatar/publishers,
  video/capture, video/metal_gpu_convert behind feature flag
- Snapshot commands return graceful error when WebRTC unavailable
- Docker: --no-default-features skips WebRTC, builds on ARM64
- IPC sockets via named Docker volume (macOS/WSL2 can't do Unix sockets
  through host-mounted volumes)
- continuum-core CMD defaults to standard socket path

Tested: full stack (6 services) running on Mac via docker compose up.
ConnectionConfigFactory.createConnectionConfig() now checks JTAG_HTTP_PORT
and JTAG_WEBSOCKET_PORT env vars first, falls back to shared/config.ts.
Widget-server container uses JTAG_HTTP_PORT=9003 to serve on correct port.

Also: IPC sockets use named Docker volume (Unix sockets don't work
through host-mounted volumes on macOS/WSL2), continuum-core CMD
defaults to standard socket path.

Tested: full stack (7 services) running on Mac, browser loads on :9003.
Three issues preventing node-server from reaching server_ready:
1. Port checker used lsof/netstat (not in slim containers). Added
   TcpConnectPortChecker as primary strategy — pure Node, no external cmds.
2. Orchestrator checked HTTP port even when JTAG_SKIP_HTTP set. Now skips.
3. WebSocket server picked up Tailscale certs from mounted volume, served
   WSS while browser expected WS. JTAG_NO_TLS env var disables TLS in Docker.
4. ConnectionConfigFactory now checks JTAG_HTTP_PORT/JTAG_WEBSOCKET_PORT
   env vars first, falls back to shared/config.ts. One code path, not two.

Status: widget-server serves HTML on :9003 (healthy), node-server has
WSS on :9001 with 355 commands + 17 daemons. Browser loads.
Remaining: jtag ping bootstrap check times out in Docker (needs fix).
The orchestrator's bootstrap check spawned ./jtag ping (a CLI that
connects via WebSocket back to itself) — circular in Docker, fragile
everywhere. Now checks JTAGSystemServer.instance directly for
commandDaemon.commands.size > 0. No subprocess, no WebSocket roundtrip.
…chitecture docs

- Fix node-server health check: use TCP connect on WS port 9001 (HTTP is skipped in Docker)
- Fix CI widget-server build context: use ./src (widgets import from full source tree)
- Forge-worker: 28GB memory cap, shared models volume, PYTHONUNBUFFERED
- Inference: GPU profile only, CUDA image, 8GB cap, GPU reservation
- Remove dead HTTP port 9000 from node-server (JTAG_SKIP_HTTP makes it unused)
- Add DOCKER-NODE-ARCHITECTURE.md: profiles, resource budgets, volumes, 5-phase roadmap
- Add ARES-KERNEL.md: heartbeat, watchdog, log scanner, self-healing, remote shell
- Update GRID-ARCHITECTURE.md: add Ares/Foreman/Plant Manager management hierarchy
…time

Docker:
- Tailscale sidecar container joins tailnet, provisions real Let's Encrypt
  certs, reverse-proxies HTTPS/WSS to plain HTTP containers
- TS_SERVE_CONFIG maps :443→widget-server, :9001→node-server, :7880→livekit
- ONNX Runtime 1.24.4 in continuum-core image (Silero VAD + Piper TTS)
- ORT_DYLIB_PATH env var for ort crate load-dynamic feature
- Caddy files retained as fallback reference

Fixes:
- TransportConfig.ts: browser WS URL used localhost fallback even on remote
  pages served over HTTP. Now always uses window.location.hostname in browser.
- SecretManager.ts: config.env no longer overwrites Docker compose env vars
  (DATABASE_URL was clobbered by host config mounted via volume)
- ConnectionBroker: added WS URL debug log for diagnosing connection issues
- TransportFactoryBrowser: added connect URL debug log

Tested: https://bigmama-1.taila5cb68.ts.net loads UI, WSS connects,
widget state flows. Postgres connected via Docker DNS.
After server reaches server_ready milestone, checks if rooms exist.
If empty (first run), spawns seed-continuum.ts which creates rooms,
users, and personas via jtag CLI commands back through the running server.
Runs async after 3s delay to ensure WS server is fully accepting connections.
- helpers.ts: execWithRetry() with configurable delay (200ms) and retries (3)
  replaces all raw execAsync calls — single point of control for IPC pacing
- seed-continuum.ts: SKIP_READINESS_CHECK env var bypasses 180s wait
  (Docker entrypoint already confirms server ready before spawning seed)
- docker-entrypoint.ts: passes SKIP_READINESS_CHECK=1, 5s startup delay,
  300s timeout for full seed, checks rooms via jtag data/list

Result: 12/12 rooms, 20 recipes, content types all seed successfully.
Persona count limited by Rust PersonaAllocator (hardware-aware, 2GB Docker
container gets 1 persona). Increase continuum-core mem_limit for more.
joelteply added 27 commits April 4, 2026 11:26
IPC auto-reconnect (RustCoreIPCClientBase): singleton IPC client had zero
reconnect logic — core restart meant permanent "Not connected" for all
personas. Now auto-reconnects with exponential backoff (1s→15s cap).
_ensureConnected() waits for reconnection instead of throwing immediately.

IPC reconnect wait (ORMRustClient): getConnection() now waits up to 15s
for any pool connection to recover instead of instantly failing. Prevents
message loss during the core restart reconnection window.

ORT architecture: Dockerfile uses TARGETARCH (BuildKit) instead of uname -m
for ONNX Runtime download. Eliminates cached wrong-arch layers that caused
dlopen failures on ARM Macs.

Whisper model: default changed from large-v3-turbo (incompatible tensor
count with compiled whisper.cpp) to base (74MB, works everywhere).
Download script preserves Docker env override over config.env sourcing.

Node-server healthcheck: added --start-period=30s so Docker doesn't
declare unhealthy during the 30s+ bootstrap (344 commands, 17 daemons).
…er injection, no hardcoded ports in browser bundle
@joelteply
joelteply merged commit ac07b3b into main Apr 5, 2026
8 checks passed
@joelteply
joelteply deleted the feature/docker-tls-infrastructure branch April 5, 2026 02:02
@joelteply joelteply mentioned this pull request Apr 5, 2026
5 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants