@fidacy/openclaw-plugin 0.2.2 → 0.2.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/index.js +11 -6
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -4690,7 +4690,7 @@ function resolveMandateRules(cfg) {
|
|
|
4690
4690
|
}
|
|
4691
4691
|
|
|
4692
4692
|
// ../mcp/src/telemetry.ts
|
|
4693
|
-
var CLIENT_VERSION = true ? "0.2.
|
|
4693
|
+
var CLIENT_VERSION = true ? "0.2.3" : "dev";
|
|
4694
4694
|
function bandOf(amount) {
|
|
4695
4695
|
if (typeof amount !== "number" || !Number.isFinite(amount) || amount <= 0) return void 0;
|
|
4696
4696
|
if (amount < 10) return "lt10";
|
|
@@ -4867,7 +4867,7 @@ function requestUpgrade() {
|
|
|
4867
4867
|
}
|
|
4868
4868
|
|
|
4869
4869
|
// ../mcp/src/provision.ts
|
|
4870
|
-
var CLIENT_VERSION2 = true ? "0.2.
|
|
4870
|
+
var CLIENT_VERSION2 = true ? "0.2.3" : "dev";
|
|
4871
4871
|
function provisionEnabled() {
|
|
4872
4872
|
const v = (process.env.FIDACY_DISABLE_PROVISION ?? "").trim().toLowerCase();
|
|
4873
4873
|
return !(v === "1" || v === "true" || v === "yes");
|
|
@@ -4919,16 +4919,21 @@ function nudgeOnce(key) {
|
|
|
4919
4919
|
}
|
|
4920
4920
|
return true;
|
|
4921
4921
|
}
|
|
4922
|
+
var sessionDecisions = 0;
|
|
4923
|
+
function sessionDecisionCount() {
|
|
4924
|
+
return sessionDecisions;
|
|
4925
|
+
}
|
|
4922
4926
|
function bumpDecisionCount() {
|
|
4927
|
+
sessionDecisions += 1;
|
|
4923
4928
|
const cfg = readConfig();
|
|
4924
|
-
if (!cfg) return
|
|
4929
|
+
if (!cfg) return sessionDecisions;
|
|
4925
4930
|
const n = (cfg.decisions_count ?? 0) + 1;
|
|
4926
4931
|
cfg.decisions_count = n;
|
|
4927
4932
|
try {
|
|
4928
4933
|
writeConfig(cfg);
|
|
4929
4934
|
} catch {
|
|
4930
4935
|
}
|
|
4931
|
-
return n;
|
|
4936
|
+
return Math.max(n, sessionDecisions);
|
|
4932
4937
|
}
|
|
4933
4938
|
function decisionNudge(status, violatedRule, upgradeToolName) {
|
|
4934
4939
|
const count = bumpDecisionCount();
|
|
@@ -4962,7 +4967,7 @@ function hasEngineKey(keyOverride) {
|
|
|
4962
4967
|
return Boolean((keyOverride ?? process.env.FIDACY_ENGINE_API_KEY ?? "").trim());
|
|
4963
4968
|
}
|
|
4964
4969
|
function decisionsUsed() {
|
|
4965
|
-
return readConfig()?.decisions_count ?? 0;
|
|
4970
|
+
return Math.max(readConfig()?.decisions_count ?? 0, sessionDecisionCount());
|
|
4966
4971
|
}
|
|
4967
4972
|
function remainingFree() {
|
|
4968
4973
|
return Math.max(0, FREE_DECISIONS - decisionsUsed());
|
|
@@ -4981,7 +4986,7 @@ function activationGate(keyOverride) {
|
|
|
4981
4986
|
}
|
|
4982
4987
|
function trialCountdownLine(keyOverride) {
|
|
4983
4988
|
if (hasEngineKey(keyOverride)) return null;
|
|
4984
|
-
if (!readConfig()) return null;
|
|
4989
|
+
if (!readConfig() && sessionDecisionCount() === 0) return null;
|
|
4985
4990
|
const left = remainingFree();
|
|
4986
4991
|
if (left > 5) return null;
|
|
4987
4992
|
const url = claimDestination();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fidacy/openclaw-plugin",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "Fidacy payment firewall as a native OpenClaw plugin: signed, verifiable verdicts on every money-moving agent action, in-process (no MCP subprocess).",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://fidacy.com",
|
|
@@ -46,20 +46,20 @@
|
|
|
46
46
|
"npmSpec": "@fidacy/openclaw-plugin"
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
|
+
"scripts": {
|
|
50
|
+
"build": "node scripts/bundle.mjs",
|
|
51
|
+
"typecheck": "tsc --noEmit"
|
|
52
|
+
},
|
|
49
53
|
"engines": {
|
|
50
54
|
"node": ">=20"
|
|
51
55
|
},
|
|
52
56
|
"devDependencies": {
|
|
57
|
+
"@fidacy/firewall": "workspace:*",
|
|
58
|
+
"@fidacy/mcp": "workspace:*",
|
|
53
59
|
"@types/node": "^22.10.0",
|
|
54
60
|
"esbuild": "^0.24.0",
|
|
55
61
|
"openclaw": "2026.6.11",
|
|
56
62
|
"typebox": "1.1.39",
|
|
57
|
-
"typescript": "^5.6.3"
|
|
58
|
-
"@fidacy/firewall": "0.1.1",
|
|
59
|
-
"@fidacy/mcp": "0.2.0"
|
|
60
|
-
},
|
|
61
|
-
"scripts": {
|
|
62
|
-
"build": "node scripts/bundle.mjs",
|
|
63
|
-
"typecheck": "tsc --noEmit"
|
|
63
|
+
"typescript": "^5.6.3"
|
|
64
64
|
}
|
|
65
|
-
}
|
|
65
|
+
}
|