molt-cli 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -5
- package/cli.js +10 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -91,8 +91,6 @@ MolTunes uses **Ed25519 cryptographic signatures** for authentication — no API
|
|
|
91
91
|
- Private key stays local in `~/.moltrc`
|
|
92
92
|
- Timestamps prevent replay attacks
|
|
93
93
|
|
|
94
|
-
See [SECURITY.md](https://github.com/moltunes/moltunes/blob/main/SECURITY.md) for the full security model.
|
|
95
|
-
|
|
96
94
|
## Clawdbot Integration
|
|
97
95
|
|
|
98
96
|
When used with [Clawdbot](https://github.com/clawdbot/clawdbot), `molt install` places skills in `./skills/` by default — Clawdbot's skill directory. Each installed skill includes a `SKILL.md` for compatibility.
|
|
@@ -102,9 +100,6 @@ Override with `--dir <path>` or `MOLT_INSTALL_DIR` env var.
|
|
|
102
100
|
## Links
|
|
103
101
|
|
|
104
102
|
- **Marketplace:** [moltunes.com](https://moltunes.com)
|
|
105
|
-
- **GitHub:** [github.com/moltunes/moltunes](https://github.com/moltunes/moltunes)
|
|
106
|
-
- **Security:** [SECURITY.md](https://github.com/moltunes/moltunes/blob/main/SECURITY.md)
|
|
107
|
-
- **Skill Spec:** [SKILL-SPEC.md](https://github.com/moltunes/moltunes/blob/main/SKILL-SPEC.md)
|
|
108
103
|
|
|
109
104
|
## License
|
|
110
105
|
|
package/cli.js
CHANGED
|
@@ -120,10 +120,16 @@ function signMessage(message, privateKeyBase64) {
|
|
|
120
120
|
|
|
121
121
|
function computeProofOfWork(publicKey) {
|
|
122
122
|
let nonce = 0;
|
|
123
|
+
const startTime = Date.now();
|
|
123
124
|
while (true) {
|
|
124
125
|
const hash = crypto.createHash('sha256').update(publicKey + nonce).digest('hex');
|
|
125
|
-
if (hash.startsWith('
|
|
126
|
+
if (hash.startsWith('000000')) return nonce; // 6 zeros ≈ 5-15 seconds
|
|
126
127
|
nonce++;
|
|
128
|
+
// Safety: log progress every 5M hashes
|
|
129
|
+
if (nonce % 5000000 === 0) {
|
|
130
|
+
const elapsed = ((Date.now() - startTime) / 1000).toFixed(1);
|
|
131
|
+
process.stdout.write(`\r Mining proof-of-work... ${(nonce / 1000000).toFixed(0)}M hashes (${elapsed}s)`);
|
|
132
|
+
}
|
|
127
133
|
}
|
|
128
134
|
}
|
|
129
135
|
|
|
@@ -858,7 +864,9 @@ async function cmdInstall(skillName) {
|
|
|
858
864
|
console.log(` ${C.dim}Installed to: ${C.cyan}${path.relative(process.cwd(), destDir) || destDir}${C.reset}`);
|
|
859
865
|
console.log();
|
|
860
866
|
} catch (err) {
|
|
861
|
-
|
|
867
|
+
// Clear any active spinners before showing error
|
|
868
|
+
process.stdout.write('\r\x1b[K');
|
|
869
|
+
errorMsg(err.error || err.message || 'Install failed', err.hint);
|
|
862
870
|
}
|
|
863
871
|
}
|
|
864
872
|
|