linkedin-relay-mcp 1.3.1 → 1.3.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/dist/cli.js +11 -5
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1803,11 +1803,13 @@ function reserve(command, now) {
|
|
|
1803
1803
|
const attempt = spend(ledger(), "write", now);
|
|
1804
1804
|
return "error" in attempt ? err(command, attempt.error.code, attempt.error.message, attempt.error.hint) : null;
|
|
1805
1805
|
}
|
|
1806
|
-
async function gateWrite(command, plan, now, deps) {
|
|
1806
|
+
async function gateWrite(command, plan, now, deps, opts = {}) {
|
|
1807
1807
|
const outcome = await confirmWrite(plan, budgetLine(now), deps);
|
|
1808
1808
|
if (!outcome.ok) return err(command, outcome.code, outcome.message, outcome.hint);
|
|
1809
|
-
|
|
1810
|
-
|
|
1809
|
+
if (opts.commitSpend !== false) {
|
|
1810
|
+
const attempt = spend(ledger(), "write", now);
|
|
1811
|
+
if ("permit" in attempt) saveJson(cachePath("budget.json"), attempt.ledger);
|
|
1812
|
+
}
|
|
1811
1813
|
return { confirmed: outcome.confirmed, payload: plan.payload };
|
|
1812
1814
|
}
|
|
1813
1815
|
|
|
@@ -1886,7 +1888,9 @@ async function runDelete(urn, now = Date.now(), deps, quiet = false) {
|
|
|
1886
1888
|
reversibility: "NONE. A deleted post is gone, with its comments and reactions.",
|
|
1887
1889
|
transport: "voyager"
|
|
1888
1890
|
};
|
|
1889
|
-
const gated = await gateWrite("delete", plan, now, deps ?? terminalDeps()
|
|
1891
|
+
const gated = await gateWrite("delete", plan, now, deps ?? terminalDeps(), {
|
|
1892
|
+
commitSpend: false
|
|
1893
|
+
});
|
|
1890
1894
|
if ("ok" in gated) return gated;
|
|
1891
1895
|
const result = await deletePost(gated.confirmed, createLiveClient(session.session));
|
|
1892
1896
|
return result.ok ? ok("delete", { deleted: urn, verified: post !== void 0 }) : err("delete", result.code, result.message, result.hint);
|
|
@@ -3101,7 +3105,9 @@ function requireOauth(command, ctx) {
|
|
|
3101
3105
|
);
|
|
3102
3106
|
}
|
|
3103
3107
|
async function gate(command, plan, ctx, deps) {
|
|
3104
|
-
const gated = await gateWrite(command, plan, ctx.now, deps
|
|
3108
|
+
const gated = await gateWrite(command, plan, ctx.now, deps, {
|
|
3109
|
+
commitSpend: ctx.transport.kind === "oauth"
|
|
3110
|
+
});
|
|
3105
3111
|
if ("ok" in gated) return gated;
|
|
3106
3112
|
return { confirmed: gated.confirmed };
|
|
3107
3113
|
}
|