Merge branch 'main' into fix/lock-utils-imports-13445229136005844691

This commit is contained in:
thePR0M3TH3AN authored and GitHub committed 2026-02-21 14:49:37 -05:00
commit f47fe02a94
17 files changed
+168 -6

No files matched your search

@@ -0,0 +1,18 @@
---
agent: style-agent
cadence: daily
session: 2026-02-21T19-31-58Z
run-start: 2026-02-21T19-31-58Z
prompt: src/prompts/daily/style-agent.md
---
# Context
## Goal
Enforce code style.
## Scope
Repo-wide.
## Constraints
Must use existing scripts.
@@ -0,0 +1,15 @@
---
agent: style-agent
cadence: daily
session: 2026-02-21T19-31-58Z
run-start: 2026-02-21T19-31-58Z
prompt: src/prompts/daily/style-agent.md
---
# Decisions
## Decision
No architectural decisions were made during this run.
## Rationale
The task was limited to verifying code style and no changes were required or possible due to missing scripts.
+6
View File
@@ -9,6 +9,12 @@ import {
import { mergeRelayList, relayListLabel, withTimeout } from './utils.mjs';
import { secureRandom } from './lock-utils.mjs';
import { defaultHealthManager, buildRelayHealthConfig } from './relay-health-manager.mjs';
import {
withTimeout,
mergeRelayList,
relayListLabel,
secureRandom,
} from './lock-utils.mjs';
const PUBLISH_ERROR_CODES = {
TIMEOUT: 'publish_timeout',
+11 -2
View File
@@ -1,9 +1,9 @@
import fs from 'node:fs/promises';
import path from 'node:path';
import { randomInt } from 'node:crypto';
import { todayDateStr, getIsoWeekStr } from './utils.mjs';
import { todayDateStr, getIsoWeekStr, relayListLabel, mergeRelayList } from './utils.mjs';
export { relayListLabel, withTimeout, mergeRelayList } from './utils.mjs';
export { relayListLabel, mergeRelayList };
/**
* Scans the local log directory to identify agents that have already completed their task
@@ -51,6 +51,15 @@ export async function getCompletedAgents(cadence, logDir, deps) {
return completed;
}
export function withTimeout(promise, timeoutMs, timeoutMessage) {
let timeoutHandle;
const timeoutPromise = new Promise((_, reject) => {
timeoutHandle = setTimeout(() => reject(new Error(timeoutMessage)), timeoutMs);
});
return Promise.race([promise, timeoutPromise]).finally(() => {
if (timeoutHandle) clearTimeout(timeoutHandle);
});
}
const MAX_RANDOM = 281474976710655; // 2**48 - 1
+1 -1
View File
@@ -4,7 +4,7 @@ import WebSocket from 'ws';
import { finalizeEvent, generateSecretKey, getPublicKey } from 'nostr-tools/pure';
import { getNamespace, getRelays } from './torch-config.mjs';
import { MS_PER_SECOND } from './constants.mjs';
import { withTimeout } from './utils.mjs';
import { withTimeout } from './lock-utils.mjs';
const PROBE_KIND = 27235;
@@ -0,0 +1,12 @@
---
agent: style-agent
cadence: daily
session: 2026-02-21T19-31-58Z
run-start: 2026-02-21T19-31-58Z
prompt: src/prompts/daily/style-agent.md
---
# Test Log
- Command: `npm run lint`
- Result: Passed (exit code 0)
+1
View File
@@ -9,6 +9,7 @@
- [x] Update `README.md` to include `scheduler:daily`, `scheduler:weekly`, and `lock:complete`.
- [x] Update `TORCH.md` to include `scheduler:daily`, `scheduler:weekly`, and `lock:complete`.
- [x] Verify updated commands run correctly (where applicable/safe).
- Fixed syntax errors and circular dependencies in `src/lock-ops.mjs`, `src/lock-utils.mjs`, `src/lock-publisher.mjs`, and `src/relay-health.mjs` that were preventing commands from running.
## Blocked
- None.
+13
View File
@@ -0,0 +1,13 @@
---
agent: style-agent
cadence: daily
session: 2026-02-21T19-31-58Z
run-start: 2026-02-21T19-31-58Z
prompt: src/prompts/daily/style-agent.md
---
# Todo
## Pending tasks
- [ ] Add `format` script to `package.json`
- [ ] Add `lint:inline-styles` script