Commit Graph
379 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 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 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
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 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 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
thePR0M3TH3AN 2b8a0c3d0d update 2026-02-20 12:51:17 -05: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 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
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 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 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 9278dadab0 Print final run summary in scheduler cycle and prompts
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-20 04:50:26 +00: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
thePR0M3TH3AN 78a79faf3f update 2026-02-19 23:15:56 -05:00
thePR0M3TH3AN f5d52bd13c Merge pull request #360 from PR0M3TH3AN/add-dashboard-home-button-16801596229675926990
Add Home button to dashboard linking to landing page
2026-02-19 23:11:21 -05:00
thePR0M3TH3AN 2b706f6085 Merge pull request #359 from PR0M3TH3AN/fix/torch-init-gitignore-13639849350884611583
Ensure torch init adds .gitignore with node_modules
2026-02-19 23:10:56 -05:00
google-labs-jules[bot]andPR0M3TH3AN babdd4af5d Add Home button to dashboard linking to landing page
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-20 04:04:28 +00:00
google-labs-jules[bot]andPR0M3TH3AN c36735dbde fix: ensure torch init adds .gitignore with node_modules
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-20 04:01:39 +00:00
thePR0M3TH3AN fdf1cf7084 Merge pull request #352 from PR0M3TH3AN/init-output-summary-11038938146603193612
Enhance torch init output with configuration summary and dashboard link
2026-02-19 22:54:52 -05:00
thePR0M3TH3AN a8c9b1a4d9 Merge pull request #357 from PR0M3TH3AN/docs-alignment-script-updates-3776218186763643644
Update Documentation for Scheduler and Lock Management Commands
2026-02-19 22:54:45 -05:00
google-labs-jules[bot]andPR0M3TH3AN 439e08042c docs: update README.md and TORCH.md with scheduler and lock commands
- Added `scheduler:daily` and `scheduler:weekly` usage examples to README.md and TORCH.md.
- Added `lock:complete` and `lock:check:daily` usage examples to README.md and TORCH.md.
- Updated TODO list to reflect completion of documentation alignment.
- Verified script presence and syntax.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-20 03:52:47 +00:00
thePR0M3TH3AN be849ceae8 Merge pull request #356 from PR0M3TH3AN/perf-lexical-search-index-1433868811411746305
⚡ Performance Optimization: Inverted Index for Lexical Search
2026-02-19 22:52:33 -05:00
google-labs-jules[bot]andPR0M3TH3AN 9e6d99eb1e ⚡ optimize lexical search with inverted index
- Implemented LexicalIndex class in src/services/memory/retriever.js.
- Added WeakMap caching for indices based on memory array references.
- Improved memory array stability in src/services/memory/index.js using a storeVersion counter.
- Achieved ~2x speedup for 10k memories and ~9x speedup for 100k memories in benchmarks.
- Maintains compatibility with existing textMatchSimilarity scoring.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-20 03:51:34 +00:00
thePR0M3TH3AN a35286f17d Merge pull request #355 from PR0M3TH3AN/refactor-governance-target-validation-5425533680072569362
🧹 refactor(governance): extract duplicated target validation logic
2026-02-19 22:51:13 -05:00
google-labs-jules[bot]andPR0M3TH3AN cd744982a1 refactor(governance): extract duplicated target validation logic
Extracted duplicated target path resolution and allowlist validation logic
into a shared `resolveAndValidateTarget` helper function in
`src/services/governance/index.js`.

Updated `createProposal`, `validateProposal`, `applyProposal`, and
`rollbackPrompt` to use the new helper, ensuring consistent validation
and path handling across the service.

Added `test/governance-health.test.mjs` to verify validation logic.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-20 03:50:36 +00:00
thePR0M3TH3AN a4ffa537f6 Merge pull request #354 from PR0M3TH3AN/add-exiterror-tests-11501687712657376665
🧪 [testing improvement] Add tests for ExitError class and improve its implementation
2026-02-19 22:50:17 -05:00
google-labs-jules[bot]andPR0M3TH3AN 8d4ae0d616 feat(testing): add unit tests for ExitError and improve class definition
- Added `test/errors.test.mjs` with comprehensive tests for the `ExitError` class.
- Updated `src/errors.mjs` to set `this.name = 'ExitError'` in the constructor for better error reporting.
- Verified that all new tests pass and no regressions were introduced to the existing test suite.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-20 03:49:34 +00:00
google-labs-jules[bot]andPR0M3TH3AN 1e4d9720e8 fix(security): prevent command injection in governance service
Replaced `execSync` with `execFileSync` in `src/services/governance/index.js` to avoid shell interpretation of variable-derived inputs (such as agent IDs and file targets). This mitigates command injection risks in `createProposal`, `applyProposal`, and `rollbackPrompt`.

- Used `execFileSync` for all git operations.
- Updated logic to correctly handle `git diff` exit code 1.
- Removed unused `execSync` import.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-20 03:46:36 +00:00
google-labs-jules[bot]andPR0M3TH3AN 08d8407a7d feat(cli): enhance init output with config summary and dashboard link
- Updates `cmdInit` to output the Nostr hashtag, namespace, and a direct dashboard URL upon completion.
- Refactors `createDashboardLinkFile` to return the generated URL for console output.
- Ensures the initialization process provides clear next steps for both human users and agents.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-20 03:39:00 +00:00
thePR0M3TH3AN 5783f995d7 update 2026-02-19 22:22:45 -05:00