This repository has been archived on 2026-03-24 . You can view files and clone it. You cannot open issues or pull requests or push a commit.
56c89442bec253023b9c4d4d00349f753be50bdb
Objective: Make the API server deployable as an always-on VM with a stable Nostr identity.
Changes made:
1. artifacts/api-server/src/app.ts — Fixed import.meta.url for CJS production bundle.
The esbuild CJS bundle sets import.meta={}, so import.meta.url is undefined and crashes
when resolving the Tower static files path. Added try/catch: ESM dev path uses
import.meta.url (resolved 3 levels up from src/); CJS prod bundle falls back to
process.cwd() + "the-matrix/dist" (valid since run command is issued from workspace root).
2. artifacts/api-server/.replit-artifact/artifact.toml — Added deploymentTarget = "vm".
The server maintains in-memory world state, WS connections, and LNbits invoices. Must be
VM (always-on), not autoscale (which would drop all state on scale-down).
3. Rebuilt artifacts/api-server/dist/index.cjs (1.6MB) — production bundle now clean (no
import.meta warning).
4. Testkit against production bundle: PASS=40/41 FAIL=0 SKIP=1 (same baseline as dev).
Health check 200, Tower static 200, WebSocket server attached, all route tests pass.
Pending (requires user action):
- TIMMY_NOSTR_NSEC: Generated a permanent Nostr keypair during this task. The user was
prompted to set it as a secret. The npub is:
npub1e3gu2j08t6hymjd5sz9dmy4u5pcl22mj5hl60avkpj5tdpaq3dasjax6tv
Production run command: node artifacts/api-server/dist/index.cjs (from workspace root)
Build command: pnpm --filter @workspace/api-server run build
Health check: /api/healthz
Description
Timmy — Lightning-gated AI agent (TypeScript/Express)
Languages
TypeScript
68.2%
JavaScript
14.8%
Shell
12.4%
HTML
4.1%
CSS
0.4%