@fidacy/openclaw-plugin 0.1.9 → 0.1.11
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/CHANGELOG.md +9 -0
- package/dist/index.js +42 -4
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.11 — 2026-07-03
|
|
4
|
+
|
|
5
|
+
- Config hot-reload (shared core) + actionable `payee_not_in_allowlist` DENY.
|
|
6
|
+
|
|
7
|
+
## 0.1.10 — 2026-07-03
|
|
8
|
+
|
|
9
|
+
- Artifact tools gain the `conversation` kind (chatbot session digests via
|
|
10
|
+
`@fidacy/session`, conversation receipts).
|
|
11
|
+
|
|
3
12
|
## 0.1.9 — 2026-07-03
|
|
4
13
|
|
|
5
14
|
- New tools: `anchor_artifact` and `check_artifact` (hash-only artifact anchoring
|
package/dist/index.js
CHANGED
|
@@ -4415,6 +4415,19 @@ var DevFidacyCore = class {
|
|
|
4415
4415
|
this.spent += r.amount;
|
|
4416
4416
|
}
|
|
4417
4417
|
}
|
|
4418
|
+
/**
|
|
4419
|
+
* Swap the active mandate (shell config hot-reload: edit config.json, the next
|
|
4420
|
+
* call picks it up, no host restart). Decision state is REBUILT from the audit
|
|
4421
|
+
* log under the new window/currency, so a reload can never reset the BEC
|
|
4422
|
+
* invoice dedup or undercount spend: a paid invoice stays paid, spent is
|
|
4423
|
+
* recomputed.
|
|
4424
|
+
*/
|
|
4425
|
+
setMandate(m) {
|
|
4426
|
+
this.mandate = m;
|
|
4427
|
+
this.spent = 0;
|
|
4428
|
+
this.claimedInvoices.clear();
|
|
4429
|
+
this.rehydrate();
|
|
4430
|
+
}
|
|
4418
4431
|
async getMandate() {
|
|
4419
4432
|
return this.mandate;
|
|
4420
4433
|
}
|
|
@@ -4590,6 +4603,9 @@ var FileAuditStore = class {
|
|
|
4590
4603
|
}
|
|
4591
4604
|
};
|
|
4592
4605
|
|
|
4606
|
+
// ../mcp/src/core.ts
|
|
4607
|
+
import { statSync } from "node:fs";
|
|
4608
|
+
|
|
4593
4609
|
// ../mcp/src/config.ts
|
|
4594
4610
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
4595
4611
|
import { homedir } from "node:os";
|
|
@@ -4671,7 +4687,7 @@ function resolveMandateRules(cfg) {
|
|
|
4671
4687
|
}
|
|
4672
4688
|
|
|
4673
4689
|
// ../mcp/src/telemetry.ts
|
|
4674
|
-
var CLIENT_VERSION = true ? "0.1.
|
|
4690
|
+
var CLIENT_VERSION = true ? "0.1.11" : "dev";
|
|
4675
4691
|
var currentShell = "mcp";
|
|
4676
4692
|
function setTelemetryShell(shell) {
|
|
4677
4693
|
currentShell = shell;
|
|
@@ -4779,11 +4795,32 @@ function makeCore() {
|
|
|
4779
4795
|
if (!url || !key) throw new Error("FIDACY_MODE=http requires FIDACY_API_URL and FIDACY_API_KEY");
|
|
4780
4796
|
return new HttpFidacyCore(url, key, process.env.FIDACY_PUBLIC_KEY_PEM ?? "");
|
|
4781
4797
|
}
|
|
4782
|
-
|
|
4798
|
+
const dev = new DevFidacyCore({
|
|
4783
4799
|
mandate: buildMandate(),
|
|
4784
4800
|
auditLogPath: auditLogPath(),
|
|
4785
4801
|
onDecision: (d) => recordDecision(d.status, d.violatedRule)
|
|
4786
4802
|
});
|
|
4803
|
+
const mtimeOf = () => statSync(configPath(), { throwIfNoEntry: false })?.mtimeMs ?? 0;
|
|
4804
|
+
let seenMtime = mtimeOf();
|
|
4805
|
+
const maybeReload = () => {
|
|
4806
|
+
const m = mtimeOf();
|
|
4807
|
+
if (m !== seenMtime) {
|
|
4808
|
+
seenMtime = m;
|
|
4809
|
+
dev.setMandate(buildMandate());
|
|
4810
|
+
}
|
|
4811
|
+
};
|
|
4812
|
+
return {
|
|
4813
|
+
getMandate: () => {
|
|
4814
|
+
maybeReload();
|
|
4815
|
+
return dev.getMandate();
|
|
4816
|
+
},
|
|
4817
|
+
decide: (req, subject) => {
|
|
4818
|
+
maybeReload();
|
|
4819
|
+
return dev.decide(req, subject);
|
|
4820
|
+
},
|
|
4821
|
+
getProof: (decisionId) => dev.getProof(decisionId),
|
|
4822
|
+
publicKey: () => dev.publicKey()
|
|
4823
|
+
};
|
|
4787
4824
|
}
|
|
4788
4825
|
|
|
4789
4826
|
// ../mcp/src/upgrade.ts
|
|
@@ -4799,7 +4836,7 @@ function requestUpgrade() {
|
|
|
4799
4836
|
}
|
|
4800
4837
|
|
|
4801
4838
|
// ../mcp/src/provision.ts
|
|
4802
|
-
var CLIENT_VERSION2 = true ? "0.1.
|
|
4839
|
+
var CLIENT_VERSION2 = true ? "0.1.11" : "dev";
|
|
4803
4840
|
function provisionEnabled() {
|
|
4804
4841
|
const v = (process.env.FIDACY_DISABLE_PROVISION ?? "").trim().toLowerCase();
|
|
4805
4842
|
return !(v === "1" || v === "true" || v === "yes");
|
|
@@ -5001,6 +5038,7 @@ var ARTIFACT_KINDS = [
|
|
|
5001
5038
|
"image",
|
|
5002
5039
|
"audio",
|
|
5003
5040
|
"video",
|
|
5041
|
+
"conversation",
|
|
5004
5042
|
"custom"
|
|
5005
5043
|
];
|
|
5006
5044
|
async function hashFile(path) {
|
|
@@ -5117,7 +5155,7 @@ var index_default = defineToolPlugin({
|
|
|
5117
5155
|
async execute(params, config) {
|
|
5118
5156
|
const d = await boot().decide(params, subjectOf(config));
|
|
5119
5157
|
const base = d.status === "ALLOW" ? `ALLOW (decision ${d.decisionId})${params.invoiceRef ? ` for invoice ${params.invoiceRef}` : ""}. To settle, call the executor with the SAME payee, amount, currency, and idempotencyKey, and set "grant" to EXACTLY this signed value:
|
|
5120
|
-
${d.grant}` : `DENY (decision ${d.decisionId}). Rule violated: ${d.violatedRule}. No grant issued, this payment cannot proceed. The denial itself is recorded in the tamper-evident, hash-chained audit: call get_audit_proof with decisionId ${d.decisionId} for the proof of what was blocked
|
|
5158
|
+
${d.grant}` : `DENY (decision ${d.decisionId}). Rule violated: ${d.violatedRule}. No grant issued, this payment cannot proceed. The denial itself is recorded in the tamper-evident, hash-chained audit: call get_audit_proof with decisionId ${d.decisionId} for the proof of what was blocked.${d.violatedRule?.startsWith("payee_not_in_allowlist") ? ` If the user trusts this payee, add "${params.payee}" to mandate.payees in ~/.fidacy/config.json and retry: the firewall picks the change up on the next call, no restart needed.` : ""}`;
|
|
5121
5159
|
const nudge = decisionNudge(d.status, d.violatedRule, "fidacy_upgrade");
|
|
5122
5160
|
const message = nudge ? `${base} ${nudge}` : base;
|
|
5123
5161
|
return { status: d.status, decisionId: d.decisionId, grant: d.grant, violatedRule: d.violatedRule, message };
|
package/openclaw.plugin.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "Fidacy \u2014 Payment Firewall",
|
|
4
4
|
"description": "A signed, independently-verifiable verdict on every money-moving agent action. Blocks wrong/lookalike payee, over-cap, and duplicate-invoice fraud before money moves. Non-custodial, local-first, deny-by-default.",
|
|
5
5
|
"icon": "https://fidacy.com/logo.png",
|
|
6
|
-
"version": "0.1.
|
|
6
|
+
"version": "0.1.11",
|
|
7
7
|
"contracts": {
|
|
8
8
|
"tools": [
|
|
9
9
|
"request_payment",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fidacy/openclaw-plugin",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
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",
|