Commit Graph
838 Commits
Author SHA1 Message Date
thePR0M3TH3AN 2d4753a6cb Merge branch 'main' into refactor/lock-ops-reduction-3810095324988153600 2026-02-20 16:40:51 -05:00
thePR0M3TH3AN 2e9f3c9b90 Merge pull request #370 from PR0M3TH3AN/content-audit-todo-update-14936563416122295499
Update content-audit-agent todo list
2026-02-20 16:40:23 -05:00
thePR0M3TH3AN 524da8bce1 Merge pull request #372 from PR0M3TH3AN/audit-agent-lint-validation-15236647932747711276
chore: execute lint validation and update todo
2026-02-20 16:39:32 -05:00
thePR0M3TH3AN f1f530b511 Merge pull request #384 from PR0M3TH3AN/agents/daily/protocol-research-agent-2026-02-20-5682371825284810708
Daily Run: protocol-research-agent
2026-02-20 16:38:20 -05:00
thePR0M3TH3AN 5cbeedff62 Merge pull request #383 from PR0M3TH3AN/agents/daily/perf-agent-9015175649553565373
Daily perf-agent execution: Baseline establishment
2026-02-20 16:37:36 -05:00
thePR0M3TH3AN b1710e7d6c Merge pull request #382 from PR0M3TH3AN/agents/daily/onboarding-audit-agent-2026-02-20-15073734139589950533
run(daily): onboarding-audit-agent execution 2026-02-20
2026-02-20 16:37:11 -05:00
thePR0M3TH3AN 02c40c6deb Merge pull request #378 from PR0M3TH3AN/docs/update-package-scripts-9263284519736398390
Update documentation to reflect available npm scripts
2026-02-20 16:36:58 -05:00
thePR0M3TH3AN 0c28573264 Merge pull request #375 from PR0M3TH3AN/jules-verify-tests-pass-5372241009488585580
Verify tests pass and complete decomposition of lock-ops
2026-02-20 16:36:45 -05:00
thePR0M3TH3AN 278ca815f1 Merge pull request #380 from PR0M3TH3AN/refactor/main-handlers-12560453909019178975
Refactor main switch statement into command handlers
2026-02-20 16:36:19 -05:00
thePR0M3TH3AN 244b118550 Merge pull request #373 from PR0M3TH3AN/refactor/merge-relay-list-7360990203888330524
Refactor: Consolidate mergeRelayList into utils.mjs
2026-02-20 16:36:06 -05:00
thePR0M3TH3AN 756806a99e Merge branch 'main' into refactor/merge-relay-list-7360990203888330524 2026-02-20 16:35:59 -05:00
thePR0M3TH3AN 7e01b951a8 Merge pull request #381 from PR0M3TH3AN/memory-save-perf-6430625137963819127
⚡ Optimize memory store persistence with throttling and atomic writes
2026-02-20 16:35:38 -05:00
thePR0M3TH3AN c6c25e60e2 Merge pull request #374 from PR0M3TH3AN/refactor/consolidate-with-timeout-3248602754567091205
Consolidate `withTimeout` utility to `src/utils.mjs`
2026-02-20 16:35:19 -05:00
thePR0M3TH3AN 9223d55e8c Merge pull request #371 from PR0M3TH3AN/refactor/governance-apply-proposal-17916899384602246938
Refactor applyProposal to avoid redundant proposal fetch
2026-02-20 16:34:54 -05:00
thePR0M3TH3AN 13a789bcf5 Merge pull request #368 from PR0M3TH3AN/jules/docs-alignment-13667682581514782020
Docs Alignment: Script Updates
2026-02-20 16:32:40 -05:00
google-labs-jules[bot]andPR0M3TH3AN 826a18aa48 chore(protocol): update inventory and add report
- Update nostr-tools version in PROTOCOL_INVENTORY.md
- Create protocol report for 2026-02-20
- Create daily run artifacts and memory updates
- Create completion log

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-20 21:24:06 +00:00
google-labs-jules[bot]andPR0M3TH3AN 0927372c82 feat(perf): establish baseline and identify async patterns
- Scanned codebase for `setInterval`, `Promise.all`, and other async patterns.
- Generated `reports/performance/hits-2026-02-20.json`.
- Identified potential unbounded concurrency in `src/services/memory`.
- Created daily performance report.
- Updated run artifacts and memory.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-20 19:36:55 +00:00
google-labs-jules[bot]andPR0M3TH3AN be0fc06af7 run(daily): onboarding-audit-agent execution 2026-02-20
- Executed onboarding-audit-agent prompt.
- Verified onboarding instructions in README.md (clean checkout, build, test, lint).
- Generated run artifacts in src/context/, src/todo/, src/decisions/, src/test_logs/.
- Retrieved and stored agent memory.
- Created final task log.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-20 18:36:03 +00:00
google-labs-jules[bot]andPR0M3TH3AN 98d7bdb3ba perf(memory): optimize save operations with throttling and atomic writes
- Implemented throttling in `performSave` to limit disk writes to max 1 per second.
- Refactored `updateMemoryUsage` to use non-blocking (fire-and-forget) save calls, eliminating latency for memory reads.
- Added atomic write strategy using unique temporary files and `fs.rename` to prevent data corruption.
- Verified with benchmarks: `getRelevantMemories` latency reduced from ~100ms to ~30ms for 10k items.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-20 18:25:45 +00:00
google-labs-jules[bot]andPR0M3TH3AN 5dc16040fb Fix unused 'test' import in main-dispatch.test.mjs
- Removed unused `test` import from `node:test` in `test/main-dispatch.test.mjs` to resolve ESLint error.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-20 18:18:20 +00:00
google-labs-jules[bot]andPR0M3TH3AN b644aa6db8 Fix: Move withTimeout tests to isolated file to avoid MockTimer interference
Moved unit tests for `withTimeout` from `test/utils.test.mjs` to `test/utils-async.test.mjs`.
This prevents potential interference from `MockTimers` enabled in `test/utils.test.mjs` which could affect `setTimeout` behavior in async tests.
Increased timeout margins in `withTimeout` tests for better reliability in CI.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-20 18:15:43 +00:00
google-labs-jules[bot]andPR0M3TH3AN 8c417264e5 Refactor main switch statement into command handlers
- Extracted command logic from `src/lib.mjs` `main` function into `COMMAND_HANDLERS` dispatch map.
- Simplified `main` function to perform argument parsing and dispatching.
- Added `test/main-dispatch.test.mjs` to verify dispatch logic and error handling.
- Ensured no regressions in CLI behavior.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-20 18:15:30 +00:00
google-labs-jules[bot]andPR0M3TH3AN 1253513010 docs: update npm scripts list in README.md and TORCH.md
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-20 18:11:34 +00:00
google-labs-jules[bot]andPR0M3TH3AN 19a73145b6 Refactor: Extract lock utils and error classifier to reduce file size
- Extracted `PUBLISH_ERROR_CODES`, `PUBLISH_FAILURE_CATEGORIES`, and `classifyPublishError` to `src/lock-error-classifier.mjs`.
- Moved `secureRandom` to `src/lock-utils.mjs`.
- Updated `src/lock-publisher.mjs` and `src/lock-ops.mjs` to import shared utilities from `src/lock-utils.mjs`.
- Reduced `src/lock-publisher.mjs` size significantly (approx. 100 lines) and verified `src/lock-ops.mjs` remains small.
- Verified that tests pass and file sizes are reduced.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-20 18:11:08 +00:00
google-labs-jules[bot]andPR0M3TH3AN 2cd2168803 Verify tests pass and complete decomposition of lock-ops
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-20 18:10:24 +00:00
google-labs-jules[bot]andPR0M3TH3AN 04abfa9c24 Refactor: Consolidate withTimeout utility into src/utils.mjs
Moved the duplicate `withTimeout` function from `src/lock-ops.mjs`, `src/lock-publisher.mjs`, `src/lock-utils.mjs`, and `src/relay-health.mjs` to a single definition in `src/utils.mjs`.

Updated all references to import from `src/utils.mjs`. `src/lock-utils.mjs` re-exports `withTimeout` for backward compatibility.

Added unit tests for `withTimeout` in `test/utils.test.mjs`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-20 18:09:26 +00:00
google-labs-jules[bot]andPR0M3TH3AN f54c540070 Refactor: consolidate mergeRelayList into utils.mjs
- Moved `mergeRelayList` from `src/lock-ops.mjs` and `src/lock-publisher.mjs` to `src/utils.mjs`.
- Updated imports in `src/lock-ops.mjs` and `src/lock-publisher.mjs`.
- Added unit tests for `mergeRelayList` in `test/utils.test.mjs`.
- Restored `torch-config-test.json` which was deleted by the test suite.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-20 18:09:01 +00:00
google-labs-jules[bot]andPR0M3TH3AN 1e1b4ecadc chore: execute lint validation and update todo
- Restore dependencies using `npm ci`
- Run `npm run lint` and verify exit code 0
- Update src/todo/TODO_2026-02-19T20-00-00Z.md

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-20 18:08:53 +00:00
google-labs-jules[bot]andPR0M3TH3AN 258da844a6 refactor(governance): optimize applyProposal to reuse proposal object in validation
Updates `validateProposal` to accept either a proposal ID or a proposal object.
Updates `applyProposal` to pass the already-fetched proposal object to `validateProposal`,
eliminating a redundant file system read. This improves efficiency and code health.
Tests were verified to ensure no regression.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-20 18:07:22 +00:00
google-labs-jules[bot]andPR0M3TH3AN 12923f290e Update content-audit-agent todo list
Marks pending items in `src/todo/TODO_2026-02-19T22-29-56Z.md` as completed since they were flagged as N/A by the agent. This ensures the todo list accurately reflects the run status.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-20 18:05:59 +00:00
google-labs-jules[bot]andPR0M3TH3AN 5c78a4dfd3 Update README.md and TORCH.md with script descriptions
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-20 18:05:39 +00:00
thePR0M3TH3AN 2b8a0c3d0d update 2026-02-20 12:51:17 -05:00
thePR0M3TH3AN 03b6725cfc Merge pull request #367 from PR0M3TH3AN/agents/daily/load-test-agent-5461809690050295930
Execute daily load-test-agent run
2026-02-20 12:43:19 -05:00
google-labs-jules[bot]andPR0M3TH3AN a9255718cc feat(agent): execute load-test-agent daily run
- Executed load-test-agent in dry-run mode
- Generated load test reports
- Completed memory retrieval and storage workflow
- Verified artifacts and linting
- Published completion lock and task log

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-20 17:14:41 +00:00
thePR0M3TH3ANandClaude Sonnet 4.6 a8ee3d39ea fix(dashboard): return timingSafeEqual result instead of discarding it
The unequal-length branch of timingSafeCompare called
crypto.timingSafeEqual(paddedA, paddedB) but did not capture the return
value, unconditionally returning false and leaving the timing-safe
comparison as dead code.

Adds a regression test covering shorter, longer, and exact-match
credential lengths to lock in the correct behaviour.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-02-20 11:53:05 -05:00
thePR0M3TH3ANandClaude Sonnet 4.6 a5f08ff082 feat(scheduler): add local time-window guard to prevent within-window re-runs
Adds a cadence-aware time-window check that runs after the Nostr relay lock
check to exclude agents that already ran within the current window (24h daily,
7d weekly). This closes the cross-midnight edge case where the relay's
date-scoped d-tag rolls over but the agent ran minutes ago.

Changes:
- scheduler-utils.mjs: export log-parsing helpers (parseDateValue,
  parseTimestampFromFilename, parseAgentFromFilename, isStrictSchedulerLogFilename,
  parseFrontmatterCreatedAt, parseFrontmatterAgent, parseFrontmatterValue) plus
  CADENCE_WINDOW_MS constant and buildRecentlyRunExclusionSet(). Helpers are
  exported so they can be unit-tested independently. Adds 'node:path' import.
- run-scheduler-cycle.mjs: import the moved helpers from utils (removes ~45 lines
  of duplicate definitions), call buildRecentlyRunExclusionSet after excludedSet
  is built from relay data, merge results, log newly-excluded agents. Adds cycle
  saturation detection: when all roster agents are covered by the time-window
  guard, exit 0 with a clear "Cycle complete" message instead of a failure.
- test/scheduler-time-window.test.mjs: 30 new scenario-first unit tests covering
  SCN-TWG-01..11 (in-window exclusion, out-of-window pass-through, cross-midnight,
  frontmatter precedence, weekly threshold, empty dir, missing dir, deferred
  log passthrough, mixed rosters, anti-cheat for non-log files).

All 30 new tests pass. Existing scheduler-ratchet tests (7) still pass.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-02-20 11:05:52 -05:00
thePR0M3TH3ANandClaude Sonnet 4.6 8a9080e7c3 fix(memory): close the content gap so agents can actually write and retrieve learnings
- run-selected-prompt.mjs: set SCHEDULER_MEMORY_FILE env var before spawning each agent so
  store.mjs has a well-known path to read from (memory-updates/<ts>__<agent>.md)
- retrieve.mjs: format memories.md using m.summary + date/tags in readable markdown sections
  instead of raw m.content blobs; agents can now scan injected context at a glance
- store.mjs: remove semantically-empty fallback placeholder events that polluted the store
  and degraded retrieval quality; also fix default cadence 'weekly' -> 'daily' to match retrieve
- scheduler-flow.md: replace vague "write insights" instruction with a concrete three-section
  template (Key findings / Patterns / Warnings) and clarify that $SCHEDULER_MEMORY_FILE is
  set by the scheduler automatically

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-02-20 10:51:03 -05:00
thePR0M3TH3AN 87d6b3ef0c Merge pull request #366 from PR0M3TH3AN/fix-agent-landing-rendering-6487772667608425328
Fix agent description rendering on landing page
2026-02-20 08:58:33 -05:00
google-labs-jules[bot]andPR0M3TH3AN 566b1af383 fix(landing): verify and ensure agent prompts and modals render correctly
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-20 13:33:52 +00:00
google-labs-jules[bot]andPR0M3TH3AN 82e29f3f89 fix(landing): improve agent metadata extraction regex and standardize test-audit-agent header
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-20 13:07:23 +00:00
thePR0M3TH3AN 13e8089ab0 Update README.md 2026-02-20 07:53:04 -05:00
thePR0M3TH3AN 206146b78e Merge pull request #365 from PR0M3TH3AN/agents/weekly/prompt-safety-agent-1954565905191419761
feat: Weekly Prompt Safety Audit
2026-02-20 07:48:05 -05:00
thePR0M3TH3AN 9614358017 Merge pull request #364 from PR0M3TH3AN/landing-meta-prompts-fix-5183825928176553704
Fix Scheduler Meta Prompts rendering on landing page
2026-02-20 07:47:42 -05:00
thePR0M3TH3AN 45c0e5bbd7 Merge pull request #363 from PR0M3TH3AN/print-scheduler-summary-6512839814829601974
Print Final Run Summary in Scheduler Cycle
2026-02-20 07:47:07 -05:00
google-labs-jules[bot]andPR0M3TH3AN b23b9e4982 feat: Weekly Prompt Safety Audit
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-20 05:10:15 +00:00
google-labs-jules[bot]andPR0M3TH3AN 3d66cd885f Fix meta prompts rendering on landing page
Updated the regex used to parse `META_PROMPTS.md` in `landing/index.html` to be more robust against variations in newline and language identifier formatting. Added error handling to display "Prompt format mismatch" instead of leaving the element in a "Loading..." state if parsing fails. This ensures users can access the scheduler prompts even if minor formatting differences occur.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-20 04:56:22 +00:00
google-labs-jules[bot]andPR0M3TH3AN 9278dadab0 Print final run summary in scheduler cycle and prompts
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-20 04:50:26 +00:00
thePR0M3TH3AN f9dd9ea361 Merge pull request #362 from PR0M3TH3AN/feat/diagnostic-utility-12390884464961920296
feat: add diagnostic utility script
2026-02-19 23:50:03 -05:00
google-labs-jules[bot]andPR0M3TH3AN d479519067 feat: add diagnostic utility script
Added features/diagnostic.mjs to help users verify their local TORCH environment.
Includes checks for Node.js version, dependencies, configuration, and connectivity.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-20 04:48:29 +00:00
thePR0M3TH3AN a7a7679223 update 2026-02-19 23:36:01 -05:00