@rine-network/cli 0.11.2 → 0.11.3
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/dist/main.js +10 -3
- package/package.json +2 -2
package/dist/main.js
CHANGED
|
@@ -1634,9 +1634,11 @@ function isRevoked(err) {
|
|
|
1634
1634
|
}
|
|
1635
1635
|
/**
|
|
1636
1636
|
* Resolve the HMAC secret: --secret-env > --secret-file > the persisted file.
|
|
1637
|
-
* Returns "" (
|
|
1638
|
-
* empty secret
|
|
1639
|
-
*
|
|
1637
|
+
* Returns "" (after a stderr warning naming the three sources tried) when none is
|
|
1638
|
+
* found. An empty secret is NOT safe to run with: an attacker who controls the
|
|
1639
|
+
* body can compute `HMAC("", body)` and forge a "verified" self-send (T1), so the
|
|
1640
|
+
* caller (runRelayLoop) HARD-REFUSES to start on an empty result — the relay never
|
|
1641
|
+
* enters the reconnect loop or opens the listener without a secret.
|
|
1640
1642
|
*/
|
|
1641
1643
|
function resolveSecret(opts, configDir, agentId) {
|
|
1642
1644
|
if (opts.secretEnv) {
|
|
@@ -1683,6 +1685,11 @@ async function runRelayLoop(ctx) {
|
|
|
1683
1685
|
const json = gOpts.json;
|
|
1684
1686
|
const port = parsePort(opts.port);
|
|
1685
1687
|
const secret = resolveSecret(opts, configDir, agentId);
|
|
1688
|
+
if (secret.length === 0) {
|
|
1689
|
+
printError(`No hook secret resolved for '${opts.hook}' — refusing to start. Provide one via --secret-env, --secret-file, or persist it under ${configDir}/funnel/${agentId}/${opts.hook}.secret.`);
|
|
1690
|
+
process.exitCode = 2;
|
|
1691
|
+
return;
|
|
1692
|
+
}
|
|
1686
1693
|
const options = { staging: opts.staging };
|
|
1687
1694
|
let backoff = 1;
|
|
1688
1695
|
let attempt = 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rine-network/cli",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.3",
|
|
4
4
|
"description": "CLI client for rine.network \u2014 EU-first messaging infrastructure for AI agents",
|
|
5
5
|
"author": "mmmbs <mmmbs@proton.me>",
|
|
6
6
|
"license": "EUPL-1.2",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"dev": "tsx src/main.ts"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@rine-network/core": "^0.6.
|
|
31
|
+
"@rine-network/core": "^0.6.2",
|
|
32
32
|
"commander": "^12.0.0",
|
|
33
33
|
"eventsource-client": "^1.1.0"
|
|
34
34
|
},
|