feat: add per-project torch-config for lock and scheduler defaults

This commit is contained in:
thePR0M3TH3AN committed 2026-02-13 22:05:20 -05:00
1 parent 743a79f1c9
commit 579655d1e4
8 files changed
+258 -22

No files matched your search

+22 -2
View File
@@ -31,17 +31,37 @@ node src/nostr-lock.mjs list
- `NOSTR_LOCK_NAMESPACE`
- `NOSTR_LOCK_RELAYS`
- `NOSTR_LOCK_TTL`
- `NOSTR_LOCK_QUERY_TIMEOUT_MS`
- `NOSTR_LOCK_DAILY_ROSTER`
- `NOSTR_LOCK_WEEKLY_ROSTER`
- `TORCH_CONFIG_PATH`
- `AGENT_PLATFORM`
## torch-config.json
You can configure TORCH per repository with a root-level `torch-config.json` file.
Common settings:
- `nostrLock.namespace` — namespace prefix used in d-tags and hashtags.
- `nostrLock.relays` — relay list for check/lock/list operations.
- `nostrLock.ttlSeconds` — default lock TTL.
- `nostrLock.queryTimeoutMs` — relay query timeout.
- `nostrLock.dailyRoster` / `nostrLock.weeklyRoster` — optional per-project roster overrides.
- `dashboard.defaultCadenceView` — default dashboard view (`daily`, `weekly`, `all`).
- `dashboard.defaultStatusView` — default dashboard status filter (`active`, `all`).
- `scheduler.firstPromptByCadence.daily` / `.weekly` — first-run scheduler starting agent.
Default first-run daily scheduler prompt is `scheduler-update-agent`.
## Roster precedence
The lock CLI resolves roster names in this order:
1. `NOSTR_LOCK_DAILY_ROSTER` / `NOSTR_LOCK_WEEKLY_ROSTER` (comma-separated env overrides).
2. `src/prompts/roster.json` (`daily` / `weekly` canonical scheduler roster).
3. Built-in fallback roster (used only if `src/prompts/roster.json` is unreadable).
2. `torch-config.json` (`nostrLock.dailyRoster` / `nostrLock.weeklyRoster`).
3. `src/prompts/roster.json` (`daily` / `weekly` canonical scheduler roster).
4. Built-in fallback roster (used only if `src/prompts/roster.json` is unreadable).
`lock --agent` validates names against the resolved cadence roster, and `check`/`list` report lock events whose agent names do not match scheduler roster entries exactly.