Commit Graph
185 Commits
Author SHA1 Message Date
thePR0M3TH3AN 40edeb6f92 Merge pull request #82 from PR0M3TH3AN/add-mermaid-flow-diagram-15844299102743352673
Add Autonomous Improvement Cycle Mermaid Diagram to Landing Page
2026-02-14 13:38:27 -05:00
google-labs-jules[bot]andPR0M3TH3AN 92fa38c603 feat(landing): add mermaid improvement cycle diagram
- Added Mermaid.js ESM import to `landing/index.html` head.
- Created "Autonomous Improvement Cycle" section with a Mermaid flowchart diagram.
- Diagram illustrates the cycle: Scheduler -> Candidate Loop (Audit) -> Fixer Agents -> Prompt Maintenance -> Scheduler.
- Styled the diagram with existing CSS variables (`--surface-alt`, `--accent`) to match the "vibecoded" dark theme.
- Verified visual rendering via Playwright screenshot.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 18:25:12 +00:00
thePR0M3TH3AN 419189d237 Merge pull request #81 from PR0M3TH3AN/agents/daily/deps-security-agent-13730264550548821810
deps-security-agent: daily audit execution
2026-02-14 13:06:56 -05:00
google-labs-jules[bot]andPR0M3TH3AN 2aa0b80f9d deps-security-agent: daily audit
- Performed daily security and dependency audit.
- Generated artifacts in `artifacts/`:
  - `deps-report.md`: Summary of findings (0 vulnerabilities, 1 outdated).
  - `npm-audit.json`: Raw audit data.
  - `npm-outdated.json`: Raw outdated package data.
- Created logs:
  - `task-logs/daily/2026-02-14T18-03-22Z__deps-security-agent__completed.md`
  - `test_logs/TEST_LOG_2026-02-14T18-03-22Z.md`
  - `context/CONTEXT_2026-02-14T18-03-22Z.md`
- Verified no vulnerabilities.
- Noted `nostr-tools` update available but skipped due to protocol/crypto safety policy.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 18:06:40 +00:00
thePR0M3TH3AN 63998fa8a7 Merge pull request #80 from PR0M3TH3AN/package-scripts-dist-8788414804861574640
Package scripts and update prompts for consumer compatibility
2026-02-14 13:05:32 -05:00
google-labs-jules[bot]andPR0M3TH3AN eb7ce149c7 Package audit scripts and update prompts for consumer repos
- Add `scripts/check-file-size.mjs` and `scripts/check-innerhtml.mjs` to `package.json` files list.
- Update `src/ops.mjs` to copy these scripts to `torch/scripts/` during `init` and `update` commands.
- Update all agent prompts in `src/prompts/` to reference `torch/scripts/` instead of `scripts/`.
- Ensure `torch/scripts/agent/` directory is created.
- Scripts are treated as "evolving" files (preserved on update unless forced).

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 18:04:15 +00:00
thePR0M3TH3AN f10a3f9f9d Merge pull request #79 from PR0M3TH3AN/fix-init-and-landing-instructions-17554665442968256203
Fix init command and update installation instructions
2026-02-14 12:51:18 -05:00
google-labs-jules[bot]andPR0M3TH3AN 6d072448e3 Fix torch-lock init command and update landing page instructions
- Fix multiple syntax errors in `src/lib.mjs` (redundant declarations, broken loops, missing imports).
- Fix syntax error in `src/dashboard.mjs` (invalid catch block).
- Remove redundant local function definitions in `src/lib.mjs` in favor of imports from `src/torch-config.mjs` and `src/utils.mjs`.
- Update `landing/index.html` installation command to include `npx torch-lock init` step.
- Verify `torch-lock init` works correctly.
- Ensure all tests pass and linting is clean for `src/lib.mjs`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 17:45:21 +00:00
thePR0M3TH3AN 6410008b6b Merge branch 'main' of https://github.com/PR0M3TH3AN/TORCH 2026-02-14 12:31:29 -05:00
thePR0M3TH3AN c48d538e56 update 2026-02-14 12:31:23 -05:00
thePR0M3TH3AN 807c9e397c Merge pull request #78 from PR0M3TH3AN/codex/remove-npm-registry-references
Standardize install guidance on GitHub tarball distribution
2026-02-14 12:29:59 -05:00
thePR0M3TH3AN 9bf04a3a5b Standardize install docs on GitHub tarball distribution 2026-02-14 12:29:41 -05:00
thePR0M3TH3AN 8ba1966e37 Merge pull request #77 from PR0M3TH3AN/codex/update-installation-snippets-in-readme-and-html
Update install snippets to use current GitHub npm install command
2026-02-14 12:22:50 -05:00
thePR0M3TH3AN 6dd66ab814 Update install snippets to GitHub npm source 2026-02-14 12:22:22 -05:00
thePR0M3TH3AN 9c4dd659f0 Update README.md 2026-02-14 12:14:58 -05:00
thePR0M3TH3AN feb7c37b1f Merge pull request #73 from PR0M3TH3AN/perf/dashboard-async-io-13493420652733485580
⚡ Optimize dashboard static file serving
2026-02-14 12:12:33 -05:00
thePR0M3TH3AN ec31a64736 Merge pull request #62 from PR0M3TH3AN/perf-async-dashboard-io-5891481615082085195
⚡ Replace Blocking Sync I/O in HTTP Request Handler
2026-02-14 12:12:16 -05:00
thePR0M3TH3AN 0088946376 Merge pull request #67 from PR0M3TH3AN/refactor/valid-cadences-7741695179358615025
Refactor src/lib.mjs to use VALID_CADENCES constant
2026-02-14 12:12:09 -05:00
thePR0M3TH3AN d46aa0b449 Merge branch 'main' into refactor/valid-cadences-7741695179358615025 2026-02-14 12:12:02 -05:00
thePR0M3TH3AN e15ba3fe42 Merge pull request #71 from PR0M3TH3AN/refactor/constants-kind-app-data-17267465416565685977
Refactor magic number 30078 to KIND_APP_DATA constant
2026-02-14 12:11:50 -05:00
thePR0M3TH3AN 30d758ae21 Merge branch 'main' into perf/dashboard-async-io-13493420652733485580 2026-02-14 12:11:33 -05:00
thePR0M3TH3AN 35c14eca71 Merge pull request #74 from PR0M3TH3AN/unit-tests-lib-mjs-1840636568505209047
🧪 Add unit tests for src/lib.mjs
2026-02-14 12:11:07 -05:00
thePR0M3TH3AN 716b28fddc Merge branch 'main' into unit-tests-lib-mjs-1840636568505209047 2026-02-14 12:10:58 -05:00
thePR0M3TH3AN bcea60fbee Merge pull request #76 from PR0M3TH3AN/perf-optimize-lock-filtering-15960706450530800656
⚡ Optimize lock filtering with Set lookups
2026-02-14 12:10:36 -05:00
thePR0M3TH3AN cc1df8d304 Merge pull request #61 from PR0M3TH3AN/fix-empty-catch-blocks-17156965692183891029
🧹 improve observability by adding console.debug to empty catch blocks
2026-02-14 12:07:34 -05:00
thePR0M3TH3AN 6e2d15941f Merge pull request #60 from PR0M3TH3AN/fix-dashboard-binding-9664858879592007216
🔒 security: bind dashboard server to 127.0.0.1
2026-02-14 12:06:48 -05:00
thePR0M3TH3AN 279e39273b Merge branch 'main' into fix-dashboard-binding-9664858879592007216 2026-02-14 12:06:13 -05:00
thePR0M3TH3AN ef2af6f28e Merge pull request #70 from PR0M3TH3AN/testing/parse-lock-event-6215348514963372273
🧪 Add unit tests for parseLockEvent
2026-02-14 09:32:35 -05:00
thePR0M3TH3AN 6f7098fcbb Merge pull request #65 from PR0M3TH3AN/refactor/redundant-check-ops-8051921680686035210
Refactor ensureDir to remove redundant existence check
2026-02-14 09:32:03 -05:00
thePR0M3TH3AN 8cecca45c1 Merge pull request #66 from PR0M3TH3AN/jules/test-loadTorchConfig-1622753030930324974
🧪 Add unit tests for loadTorchConfig with dependency injection
2026-02-14 09:31:29 -05:00
thePR0M3TH3AN 47763bd123 Merge pull request #69 from PR0M3TH3AN/refactor/configurable-exclusions-982175267044475659
Refactor check scripts to support configurable exclusions
2026-02-14 09:30:56 -05:00
thePR0M3TH3AN 3ba727ec37 Merge pull request #64 from PR0M3TH3AN/refactor/verify-hardcoded-relays-6138275059730299152
🧹 Verify and test relay configuration logic
2026-02-14 09:30:31 -05:00
thePR0M3TH3AN 2b3ab0b25b Merge pull request #72 from PR0M3TH3AN/perf-dashboard-async-io-14696213848673958258
⚡ Optimize dashboard static file serving with async I/O
2026-02-14 09:29:41 -05:00
thePR0M3TH3AN a8f5560f66 Merge pull request #63 from PR0M3TH3AN/refactor/remove-async-ops-8265010904332540873
🧹 Refactor cmdInit and cmdUpdate to be synchronous
2026-02-14 09:29:17 -05:00
thePR0M3TH3AN 4c15736b99 Merge pull request #75 from PR0M3TH3AN/perf/torch-timeout-fix-10089523949735471707
perf(torch): fix 15s delay in lock queries by clearing timeout
2026-02-14 09:28:57 -05:00
thePR0M3TH3AN 832c0c5273 Merge pull request #68 from PR0M3TH3AN/agents/daily/decompose-lib-16890511323530322542
Decompose src/lib.mjs
2026-02-14 09:28:30 -05:00
google-labs-jules[bot]andPR0M3TH3AN 0a7f64d1dc Refactor lock filtering to use Set lookups instead of linear scans
Optimized `cmdCheck` and `cmdList` in `src/lib.mjs` by replacing O(N*M) linear scans with O(N) Set lookups.
- Introduced `rosterSet` and `excludedAgentsSet` to replace `Array.includes()` calls with `Set.has()`.
- Benchmark showed ~99% performance improvement (from ~280ms to ~2ms for 10k agents and 2k locks).
- Verified with existing tests and custom benchmark.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 14:26:25 +00:00
google-labs-jules[bot]andPR0M3TH3AN af9b7e8f42 perf(torch): fix 15s delay in lock queries by clearing timeout
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 14:25:09 +00:00
google-labs-jules[bot]andPR0M3TH3AN 9eda853e7e feat: add unit tests for src/lib.mjs via dependency injection
Refactor src/lib.mjs to support dependency injection for cmdCheck, cmdLock, and cmdList.
This allows unit testing without heavy mocking frameworks or side effects.
Add test/lib.test.mjs covering:
- cmdCheck: happy path, paused/excluded agents, unknown agents.
- cmdLock: success, roster check, existing lock check, race check (lost), dry run.
- cmdList: listing locks, empty state.

Coverage for src/lib.mjs is now significantly improved.
Verification: Ran `npm test` and verified all tests pass.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 14:23:03 +00:00
google-labs-jules[bot]andPR0M3TH3AN 0448ed2932 Optimize dashboard static file serving with async I/O
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 14:18:59 +00:00
google-labs-jules[bot]andPR0M3TH3AN cd7b19ead7 Optimize dashboard static file serving with async I/O
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 14:16:52 +00:00
google-labs-jules[bot]andPR0M3TH3AN 02e96d49be Refactor magic number 30078 to KIND_APP_DATA constant
- Added KIND_APP_DATA to src/constants.mjs
- Updated src/lib.mjs, src/lock-ops.mjs, and dashboard/index.html to use the constant
- Added missing src files to package.json files list
- Updated build.mjs to copy src/constants.mjs to dist/src/

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 14:16:44 +00:00
google-labs-jules[bot]andPR0M3TH3AN f931b44732 test: add unit tests for parseLockEvent
Adds comprehensive unit tests for `parseLockEvent` in `src/lock-ops.mjs` (exported via `src/lib.mjs`).
Tests cover:
- Valid event parsing
- Missing d-tag
- Missing expiration tag
- Malformed JSON content
- Non-object JSON content
- Partial JSON content

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 14:16:27 +00:00
google-labs-jules[bot]andPR0M3TH3AN 6fdc092441 refactor: make exclusions in check scripts configurable
Refactor `scripts/check-file-size.mjs` and `scripts/check-innerhtml.mjs` to use `node:util.parseArgs` for parsing command-line arguments. This allows users to configure directory and file exclusions via `--exclude-dir`, `--exclude-file`, and `--no-defaults`, instead of relying on hardcoded lists.

This change improves versatility while maintaining backward compatibility by keeping the original hardcoded lists as defaults. It also adds support for `--max-lines` in `check-file-size.mjs` and `--help` in both scripts.

Verification:
- Manually verified that both scripts respect the new flags and defaults.
- Confirmed that `--report` mode still works as expected.
- Confirmed that unknown flags (like `--update`) are safely ignored (due to `strict: false`).

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 14:16:23 +00:00
google-labs-jules[bot]andPR0M3TH3AN fdfbb39da6 Decompose src/lib.mjs
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 14:16:01 +00:00
google-labs-jules[bot]andPR0M3TH3AN c94ff84da8 Refactor src/lib.mjs to use VALID_CADENCES constant
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 14:15:55 +00:00
google-labs-jules[bot]andPR0M3TH3AN 3a48c76a6c Add unit tests for loadTorchConfig with dependency injection
Refactored `loadTorchConfig` to support dependency injection for `fs`, enabling true unit tests without disk I/O. Added comprehensive unit tests in `test/torch-config-unit.test.mjs`.

- Refactored `loadTorchConfig` to accept optional `fileSystem` argument.
- Created `test/torch-config-unit.test.mjs` with mocked fs tests.
- Verified existing tests pass.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 14:15:08 +00:00
google-labs-jules[bot]andPR0M3TH3AN 758d3c3c56 Refactor ensureDir to remove redundant existence check
- Remove explicit `fs.existsSync` check in `ensureDir`.
- Rely on `fs.mkdirSync(dir, { recursive: true })` idempotency.
- Verified with existing tests in `test/ops.test.mjs`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 14:13:58 +00:00
google-labs-jules[bot]andPR0M3TH3AN 56694d14d2 Verify hardcoded relays are moved and add regression tests
- Verified that `src/lib.mjs` no longer contains hardcoded relay URLs.
- Confirmed `DEFAULT_RELAYS` are defined in `src/constants.mjs` and used in `src/torch-config.mjs`.
- Added regression tests in `test/torch-config.test.mjs` to ensure `getRelays()` correctly falls back to `DEFAULT_RELAYS` and prioritizes environment variables.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 14:13:43 +00:00
google-labs-jules[bot]andPR0M3TH3AN eee6dfa09f Refactor cmdInit and cmdUpdate to be synchronous
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 14:12:20 +00:00