- 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]>
- Update `scripts/agent/run-scheduler-cycle.mjs` to allow prompt files to start with a blockquote (`>`) in addition to a markdown header (`#`), unblocking agents with shared contract headers.
- Fix default validation command from `['npm', 'run', 'lint']` to `['npm run lint']` to prevent `npm` usage errors.
- Include daily task logs demonstrating successful scheduler cycle execution (skipping failed locks and completing `load-test-agent`).
Co-authored-by: PR0M3TH3AN <[email protected]>
- Modified `init` to be interactive, asking for install directory, namespace, and relays.
- Added automatic injection of convenience scripts (`torch:check`, `torch:lock`, etc.) into the host `package.json`.
- Increased default network timeouts (30s query, 15s publish) to reduce failure rate.
- Added visual feedback (logs) during relay connection and querying.
- Refactored `src/ops.mjs` to support flexible installation paths.
- Updated `src/torch-config.mjs` to support config resolution from parent directories (e.g., when running via `npm run --prefix`).
Co-authored-by: PR0M3TH3AN <[email protected]>
- Modified `src/ops.mjs` to create `torch-config.json` in `paths.root` instead of `paths.torchDir` during `cmdInit`.
- This aligns the initialization behavior with the documentation (`README.md`) and resolves a discrepancy found by `test/ops.test.mjs`.
- Verified with `npm test`.
- Included `docs-agent` run artifact `src/context/CONTEXT_2026-02-16T00-33-39Z.md`.
- Included `task-logs/daily/2026-02-16T00-35-14Z__docs-agent__completed.md`.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Introduces a "Why Run Torch? (The Cool Stuff)" section to the README.
- Highlights decentralized coordination, platform agnosticism, memory, verifiable handoffs, self-healing, and drop-in simplicity.
- Adopts a fun, "agentic" tone as requested.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Modify `src/ops.mjs` to copy all critical application directories (`src`, `bin`, `dashboard`, `scripts`, etc.) and files (`package.json`, `build.mjs`) to the `torch/` directory during `init` and `update`.
- Update `src/ops.mjs` to generate `torch-config.json` inside the `torch/` directory (if missing) instead of only in the project root, supporting self-contained execution.
- Update `src/roster.mjs` to fallback to checking for `roster.json` in the current working directory, enabling `npm run` commands to work correctly when executed from within the `torch/` directory.
- This allows `torch/` to function as a standalone sub-package within a project, where users can `cd torch`, `npm install`, and `npm run build` as expected.
Co-authored-by: PR0M3TH3AN <[email protected]>
This change enables agents to report their execution platform (e.g., Jules, Codex, Goose) and model (e.g., DeepSeek 3.2) in the Nostr lock events.
Key changes:
- Updated `torch-lock` CLI to accept `--platform` and `--model` arguments.
- Implemented `detectPlatform` utility to infer platform from environment variables if not provided.
- Updated `src/lib.mjs` to include these fields in the event content.
- Updated `scripts/agent/run-scheduler-cycle.mjs` to propagate `--model` and `AGENT_MODEL`.
- Updated `dashboard/index.html` to display the model information on the lock card.
- Fixed a regression in `scripts/validate-scheduler-flow-parity.mjs` and `test/scheduler-ratchet.test.mjs` caused by argument string matching.
- Deleted `repro_test.mjs` temporary file.
Co-authored-by: PR0M3TH3AN <[email protected]>
This change implements several optimizations to reduce token consumption and improve agent context:
1. **Log Truncation**: `scripts/agent/run-scheduler-cycle.mjs` now truncates the echoed output of spawned processes to 20KB per stream (stdout/stderr). This prevents the scheduler agent's context from being flooded with excessive logs from sub-agents.
2. **Memory Injection**: `torch-config.json`'s `retrieveCommand` has been updated to write retrieved memories to `.scheduler-memory/latest/<cadence>/memories.md`. `scripts/agent/run-selected-prompt.mjs` now checks for this file and injects its content into the agent's prompt, providing immediate context from the memory system.
3. **CLI Optimization**: The `torch-lock list-memories` command now truncates the `content` field of memories to 200 characters by default. A new `--full` flag has been added to `src/cli-parser.mjs` and `src/lib.mjs` to view the full content when needed.
These changes aim to make the agent process more efficient ("error on the side of caution") and leverage the memory system more effectively.
Co-authored-by: PR0M3TH3AN <[email protected]>