Commit Graph
2 Commits
Author SHA1 Message Date
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