Commit Graph
35 Commits
Author SHA1 Message Date
google-labs-jules[bot]andPR0M3TH3AN 21990f5fef I executed the daily log-fixer workflow. I analyzed the failed style-agent log and identified that the format and lint:inline-styles scripts were missing from package.json. I added the necessary commands to the file, verified their execution, and generated a completion record.
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-23 02:11:08 +00:00
google-labs-jules[bot]andPR0M3TH3AN e8eec45ff7 feat: add Playwright integration tests with coverage and log capture
- Added `@playwright/test` and `c8` dependencies.
- Configured Playwright in `playwright.config.js` to run the dashboard server.
- Added `test/playwright/dashboard.spec.js` to verify dashboard functionality (loading, auth, config) and capture console logs.
- Modified `src/dashboard.mjs` to support graceful shutdown via `/shutdown` endpoint (guarded by `NODE_V8_COVERAGE`) for coverage collection.
- Updated `package.json` with `test:playwright` and `test:playwright:coverage` scripts.
- Updated `.gitignore` to exclude coverage and test artifacts.
- Fixed `host` default value in `src/cli-parser.mjs`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-22 03:22:12 +00:00
google-labs-jules[bot]andPR0M3TH3AN 03df42dadd chore(deps): Daily security audit and updates [2026-02-21]
- Upgraded `eslint` to `10.0.1` (Safe dev-dependency patch).
- Resolved high-severity `minimatch` vulnerability transitively via `eslint` upgrade.
- Generated daily security reports in `reports/security/`.
- Created run artifacts in `src/context`, `src/decisions`, `src/todo`, `src/test_logs`.
- Updated agent memory.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-21 23:30:34 +00:00
google-labs-jules[bot]andPR0M3TH3AN c0c5ac5473 fix(torch-lock): re-apply fixes for circular deps and syntax errors
- Moved `withTimeout` implementation to `src/lock-utils.mjs` and exported it correctly.
- Removed duplicate local definitions of `withTimeout`, `mergeRelayList`, and `secureRandom` in `src/lock-ops.mjs` and `src/lock-publisher.mjs`.
- Fixed imports in `src/lock-ops.mjs`, `src/lock-publisher.mjs`, and `src/relay-health.mjs` to use `src/lock-utils.mjs` consistently.
- Updated `test/utils.test.mjs` and `test/utils-async.test.mjs` to fix broken imports and test definitions.
- Verified `npm run lock:complete` and `npm run scheduler:daily` execute correctly.
- Updated `src/todo/TODO_2026-02-20T03-00-00Z.md` to mark verification task as completed.
- Verified `src/relay-health.mjs` does not use `MINUTE_MS` locally, despite mysterious CI error. Confirmed imports are correct.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-21 19:23:48 +00:00
google-labs-jules[bot]andPR0M3TH3AN 0edebc9c6c chore: upgrade eslint to resolve minimatch and ajv vulnerabilities
Upgraded `eslint` to `^10.0.1` which updated `minimatch` to `10.2.2` (resolving ReDoS vulnerability).
Ran `npm audit fix` which updated `ajv` to `6.14.0` (resolving ReDoS vulnerability).
Verified with `npm test` and `npm run lint`.
Marked tasks as completed in `src/todo/TODO_2026-02-20T01-13-24Z.md`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-21 18:30:40 +00:00
google-labs-jules[bot]andPR0M3TH3AN 1a46fd0484 feat(docs): add broken link validation script
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-20 21:53:25 +00:00
thePR0M3TH3AN 158026bdb4 Merge pull request #346 from PR0M3TH3AN/claude/add-torch-removal-command-keFx5
Add cmdRemove command to completely uninstall TORCH from projects
2026-02-19 21:09:54 -05:00
Claude 7984c7de66 feat: add torch-lock remove command for complete TORCH uninstallation
Users who installed TORCH via `npm install <tarball> && npx torch-lock init`
had no built-in way to cleanly remove it. This adds a `remove` command that
detects and removes all TORCH artifacts: the torch/ directory, config files,
runtime directories (.torch/, .scheduler-memory/, task-logs/), governance
proposals, host package.json scripts, and the npm package itself.

- Add cmdRemove() in src/ops.mjs with detection, preview, confirmation, and cleanup
- Wire up `remove` command in CLI dispatcher (src/lib.mjs)
- Add TORCH_HOST_SCRIPTS constant in constants.mjs for shared script key list
- Add docs/removal.md with full manual removal instructions
- Add removal section to README.md
- Add 7 scenario tests in test/ops-remove.test.mjs

https://claude.ai/code/session_011Snrxu3iZGLtJ9pnFSajpM
2026-02-20 01:59:30 +00:00
dependabot[bot] 9911f92797 build(deps): bump nostr-tools from 2.19.4 to 2.23.1
Bumps [nostr-tools](https://github.com/nbd-wtf/nostr-tools) from 2.19.4 to 2.23.1.
- [Release notes](https://github.com/nbd-wtf/nostr-tools/releases)
- [Commits](https://github.com/nbd-wtf/nostr-tools/commits)

---
updated-dependencies:
- dependency-name: nostr-tools
  dependency-version: 2.23.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-02-19 21:06:49 +00:00
Claude c9b23874f2 fix(tests): improve test reliability and remove unused deps
- Add --test-timeout=30000 to prevent test suite hanging
- Skip build_verification.test.mjs when dist/ is absent
- Replace setTimeout with mocked Date.now in memory-cache expiry test
- Replace wait(30) with setImmediate flush in scheduler smoke test
- Remove unused @playwright/test devDependency

https://claude.ai/code/session_01GfwUNbgeMgXreFDbsNQMsS
2026-02-19 20:55:17 +00:00
Claude 9f12370169 fix: include all runtime source files in npm package and add missing metadata
The `files` array in package.json was missing 7 source modules and the
entire `src/services/` directory tree that `src/lib.mjs` imports at
runtime. Installing TORCH via `npm install` would crash immediately with
ERR_MODULE_NOT_FOUND on any CLI command.

Missing files added: cli-parser.mjs, errors.mjs, utils.mjs, lock-utils.mjs,
cmd-proposal.mjs, cmd-rollback.mjs, src/services/ (memory + governance),
and migrations/ for DB schema setup.

Also adds: engines (node >=22), license (MIT), repository, keywords,
exports map, LICENSE file — so the landing page install flow
(`npm install ... && npx torch-lock init`) works out of the box.

https://claude.ai/code/session_01CJFvLoy2BA8n9qk3z5BQQA
2026-02-18 21:46:08 +00:00
google-labs-jules[bot]andPR0M3TH3AN 12625bc41b Cleanup repo structure and consolidate tests
- Consolidated `tests/` into `test/`
- Moved `test-audit/` scripts to `scripts/test-audit/`
- Updated audit scripts to support configurable output directory
- Removed root clutter (`test_output.txt`)
- Updated documentation and agent prompts

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-18 20:49:19 +00:00
google-labs-jules[bot]andPR0M3TH3AN 7c41e040bd docs: align package config and documentation paths
- Update `package.json` to include `TORCH.md` and `scripts/memory/` in distribution.
- Update `README.md` to reference `TORCH.md` correctly.
- Update `src/ops.mjs` to robustly handle memory policy paths in `torch-config.json` generation.
- Update `.gitignore` to exclude `.scheduler-memory/`.
- Update `torch-config.example.json` to include memory policy with standard defaults.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-18 16:51:35 +00:00
google-labs-jules[bot]andPR0M3TH3AN 2466c80af9 fix(dashboard): Allow access to src/constants.mjs and fix lock-ops
`frontend-console-debug-agent` run:
- Fixed a 403 Forbidden error in `src/dashboard.mjs` preventing `src/constants.mjs` from loading by adding it to the `allowedPaths` whitelist.
- Refactored `src/lock-ops.mjs` to fix a critical syntax error in `LockPublisher` class.
- Fixed a typo in `src/cmd-check.mjs` (`queryLocksFn` -> `queryLocks`).
- Added `@playwright/test` for frontend debugging.
- Added `scripts/agent/debug_frontend.mjs` for reproduction.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-17 19:52:10 +00:00
google-labs-jules[bot]andPR0M3TH3AN d23e6ff0b3 Refactor memory scripts and fix configuration for new installs
- Replaced fragile inline Node.js scripts in `torch-config.json` with dedicated modules: `scripts/memory/retrieve.mjs` and `scripts/memory/store.mjs`.
- Updated `src/ops.mjs` initialization logic to dynamically configure `scheduler.memoryPolicyByCadence` with correct paths based on the installation directory.
- Added default memory policy configuration to `torch-config.example.json` to guide users.
- Injected `torch:memory:list` and `torch:memory:inspect` convenience scripts into the host `package.json` during `init`.
- Removed legacy shell scripts (`run-memory-retrieval.sh`, `run-memory-store.sh`).
- Verified memory scripts function correctly and pass linting.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-16 17:19:55 +00:00
thePR0M3TH3AN 6259f7f2f5 Add ci-resilience lock acquisition test suite 2026-02-14 20:06:30 -05:00
thePR0M3TH3AN c1d0de071c test: add scheduler lock failure frontmatter contract coverage 2026-02-14 20:01:32 -05:00
thePR0M3TH3AN ccc76d8b51 Add scheduler lock preflight e2e coverage 2026-02-14 19:56:25 -05:00
thePR0M3TH3AN aad60b795a test: add publish retry matrix coverage for lock backend 2026-02-14 19:47:32 -05:00
thePR0M3TH3AN 1e97118e8b Add relay health preflight job and scheduler deferral handling 2026-02-14 19:35:56 -05:00
thePR0M3TH3AN ecb26dfa99 Improve scheduler lock observability and reliability reporting 2026-02-14 18:42:52 -05:00
thePR0M3TH3AN e4f700bdab Add scheduler flow parity validation script 2026-02-14 17:49:48 -05:00
thePR0M3TH3AN 0076f3eb1d Normalize daily/weekly prompt contract and add validator 2026-02-14 17:24:49 -05:00
thePR0M3TH3AN fce1256200 feat(scheduler): add single-command scheduler cycle runner 2026-02-14 16:51:55 -05:00
thePR0M3TH3AN 5b0cf980e9 Align scheduler tables with roster and add drift check 2026-02-14 16:09:00 -05:00
thePR0M3TH3AN 136493b721 Clarify scheduler completion publish flow 2026-02-14 15:46:38 -05:00
thePR0M3TH3AN 420df2df0e test(memory): add deterministic end-to-end memory test suite 2026-02-14 15:18:31 -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
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 126ca22dfc fix(package): include assets/ directory in npm package
The dashboard requires `assets/` (favicon.svg, logo.svg) to be present.
Previously, `package.json`'s `files` array excluded `assets/`, causing missing images in the installed package.
This commit adds `assets/` to the whitelist.

Tested by packing and installing in a clean environment.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 06:53:50 +00:00
google-labs-jules[bot]andPR0M3TH3AN 35092b3d5a Refactor torch-lock into an installable NPM library and CLI
- Rename `src/nostr-lock.mjs` to `src/lib.mjs` and export core functions.
- Create `bin/torch-lock.mjs` as the CLI entry point.
- Implement `dashboard` command in `src/lib.mjs` to serve the dashboard using Node.js.
- Update `package.json` to configure `bin`, `main`, and `files` for NPM packaging.
- Create `torch-config.example.json` as a template for consumers.
- Update tests and README.md to reflect the new structure.
- Exclude task-specific artifacts (logs, context) from the package while retaining prompts and docs.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 06:41:49 +00:00
google-labs-jules[bot]andPR0M3TH3AN 6e1bb58f4f feat: add missing audit scripts and lint configuration
Implemented the missing scripts required by the audit-agent:
- `scripts/check-file-size.mjs`: Checks for files exceeding 300 lines.
- `scripts/check-innerhtml.mjs`: Checks for `innerHTML` usage.
- Added `npm run lint` script using ESLint with a basic configuration.
- Added `eslint` and related dependencies.

This unblocks the audit-agent daily schedule.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 06:21:09 +00:00
google-labs-jules[bot]andPR0M3TH3AN 44919f2ca3 chore(scheduler): run daily test-audit-agent
- Added test script and initial smoke tests
- Generated daily audit report
- Updated scheduler log

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 04:59:15 +00:00
google-labs-jules[bot]andPR0M3TH3AN 2b0118d518 Fix 4everland deployment by adding build script
- Added `build.mjs` to bundle `landing`, `dashboard`, and `docs` into a `dist/` directory.
- Updated `package.json` with a `build` script (`node build.mjs`).
- Updated `.gitignore` to ignore the `dist/` directory.
- Patched `landing/index.html` paths in the build output to correctly reference resources when deployed from `dist/` root.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 04:19:58 +00:00
thePR0M3TH3AN 67c8a17a03 updated with files 2026-02-13 20:35:03 -05:00