tinylink/AGENTS.md
mahdahar 10f8dbbb83 refactor: consolidate core runtime and docs
Move middleware sources into core/, refresh config paths, and update design/user docs to reflect the raw payload pipeline.
2026-04-07 11:30:11 +07:00

1.2 KiB

AGENTS

Build, Run, Test

  • Install dependencies: npm install (uses committed package-lock.json).
  • Start service: npm start (runs node core/index.js).
  • Apply schema: npm run migrate (runs core/maintenance/migrate.js, reads core/maintenance/schema.sql).
  • Maintenance CLI: npm run maintenance -- <backup|vacuum|prune --days=N> (runs core/maintenance/maintenance.js).
  • Parser smoke test: npm test (runs node core/parsers.test.js).
  • Instrument config check: npm run instrument:check (runs core/config/instrumentCheck.js).

Entry Points & Data Flow

  • Main runtime entrypoint is core/index.js (bootstraps app + shutdown hooks).
  • Runtime config is read from config/app.yaml via core/config.js (host + instruments).
  • SQLite schema source of truth is core/maintenance/schema.sql and is applied by core/maintenance/migrate.js.
  • Runtime database file is data/workstation.sqlite (keep it out of git).

Config + Environment

  • CLQMS auth is host.apikey in config/app.yaml; avoid committing real tokens.
  • config/app.yaml contains instrument definitions; onboarding is file-driven.

Docs Worth Reading

  • docs/workstation_plan.md describes the intended architecture, retry policy, and maintenance runbook.