Commit Graph
10 Commits
Author SHA1 Message Date
thePR0M3TH3AN d2db0cf25b Update generated dashboard links to torchagent.ai 2026-02-26 14:23:01 -05:00
thePR0M3TH3AN 32d0f905a6 Fix self-hosted update path collision in cmdUpdate 2026-02-26 08:41:36 -05:00
thePR0M3TH3AN 1fb668064e update 2026-02-25 16:17:25 -05:00
thePR0M3TH3AN 1fa4d4560e Fix host-repo scheduler config resolution and handoff defaults 2026-02-25 14:48:11 -05:00
thePR0M3TH3AN 723d9c8b53 Fix host-repo scheduler flow and init lint compatibility 2026-02-25 14:36:29 -05:00
google-labs-jules[bot]andPR0M3TH3AN 8d38a6fa21 fix(test): mock relay server and use async exec in ops.test.mjs to prevent CI timeouts
Replaced synchronous `execSync` with asynchronous `exec` (promisified) in `test/ops.test.mjs` to allow the parent process's mock WebSocket server to handle connections from the child process.
Added `NOSTR_LOCK_RELAY_FALLBACKS: ''` to the child process environment to prevent `nostr-tools` from attempting to connect to default public relays, which caused hangs in restricted CI environments.
Updated `test/ops.test.mjs` to mock a relay response (EOSE) for robust integration testing without external network dependencies.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-22 01:41:40 +00:00
google-labs-jules[bot]andPR0M3TH3AN 016f3e34e2 feat: generate dashboard file and config hashtag during init
This change updates the `torch init` command to:
1.  Prompt the user for a Nostr hashtag (defaulting to `${namespace}-agent-lock`).
2.  Explicitly save the `hashtag` to `torch-config.json` under `dashboard.hashtag` for easier editing.
3.  Generate a `TORCH_DASHBOARD.md` file in the installation directory containing a link to the TORCH dashboard with the correct `hashtag`, `namespace`, and `relays` pre-filled.

This improves the onboarding experience by making it easier to find and monitor the agent locks immediately after initialization.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-19 21:45:19 +00:00
google-labs-jules[bot]andPR0M3TH3AN a437ddd9f7 chore(ai): refactor duplicated copying logic in src/ops.mjs
- Extracted `syncAppDirectories` and `syncAppFiles` helper functions.
- Updated `cmdInit` and `cmdUpdate` to use the new helpers.
- Improved `cmdInit` to throw an Error instead of warning when the target directory is not empty and not forced.
- Fixed hanging tests in `test/ops.test.mjs` by providing `MOCK_CONFIG`.
- Updated tests to verify strict directory check in `cmdInit`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-17 17:09:39 +00:00
google-labs-jules[bot]andPR0M3TH3AN 0f3fd3209f feat: random namespace generation in init
This commit updates the `npx torch-lock init` command to automatically generate a `torch-config.json` file if it doesn't already exist. The generated configuration includes a randomized `nostrLock.namespace` (e.g., `torch-a1b2c3d4`) to ensure unique discovery topics for each installation, preventing message collisions across different repositories.

- Modified `src/ops.mjs` to import `crypto` and implement the config generation logic in `cmdInit`.
- Added a test case in `test/ops.test.mjs` to verify the random namespace generation.
- Uses `torch-config.example.json` as a template.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 23:19:25 +00:00
google-labs-jules[bot]andPR0M3TH3AN b0381b8c39 feat: add init and update commands for user-space configuration
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 07:21:05 +00:00