@m13v/s4l 1.7.4 → 1.7.5-rc.1
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/mcp/dist/index.js +47 -0
- package/mcp/dist/panel.html +31 -16
- package/mcp/dist/product-link.html +1 -1
- package/mcp/dist/version.json +2 -2
- package/mcp/manifest.json +5 -1
- package/mcp/menubar/s4l_menubar.py +58 -0
- package/mcp/menubar/s4l_state.py +72 -0
- package/mcp/package.json +1 -1
- package/package.json +1 -1
- package/scripts/s4l_posting_mode.py +59 -0
package/mcp/dist/index.js
CHANGED
|
@@ -2676,6 +2676,53 @@ tool("restart_menubar", {
|
|
|
2676
2676
|
menubar_running: running,
|
|
2677
2677
|
});
|
|
2678
2678
|
});
|
|
2679
|
+
// ---- posting_volume: per-install posting-volume mode (virality bar) --------
|
|
2680
|
+
// Server-side throttle (2026-07-13): installations.posting_mode maps to a
|
|
2681
|
+
// virality-bar percentile on the API (high~0.90, medium~0.97, low~0.995) and
|
|
2682
|
+
// OVERRIDES the cycle driver's hardcoded percentile, so a change applies on
|
|
2683
|
+
// the next cycle with no client update. 'get' also returns per-mode estimated
|
|
2684
|
+
// posts/day replayed from THIS install's trailing-7d candidate pool.
|
|
2685
|
+
tool("posting_volume", {
|
|
2686
|
+
title: "Read or set posting volume (high / medium / low)",
|
|
2687
|
+
description: "Read or set this install's posting-volume mode, the quality bar that decides how many drafts " +
|
|
2688
|
+
"per day the twitter cycle produces. Three modes: high (~100+ posts/day), medium (~30/day), " +
|
|
2689
|
+
"low (~5/day, only the very best candidates); 'default' clears the override so the cycle's " +
|
|
2690
|
+
"built-in setting applies. action:'get' returns the current mode plus per-mode estimated " +
|
|
2691
|
+
"posts/day computed from this install's own recent candidate pool (show those numbers when " +
|
|
2692
|
+
"the user is choosing). Use when the user asks to post more, post less, slow down, raise the " +
|
|
2693
|
+
"quality bar, or change posting volume. Takes effect on the next cycle; in draft-review mode " +
|
|
2694
|
+
"it equally paces how many review cards appear.",
|
|
2695
|
+
inputSchema: {
|
|
2696
|
+
action: z.enum(["get", "set"]).default("get").describe("get = read mode + rates; set = change it"),
|
|
2697
|
+
mode: z
|
|
2698
|
+
.enum(["high", "medium", "low", "default"])
|
|
2699
|
+
.optional()
|
|
2700
|
+
.describe("Required for action:'set'. 'default' clears the override."),
|
|
2701
|
+
},
|
|
2702
|
+
}, async (args) => {
|
|
2703
|
+
const action = args.action || "get";
|
|
2704
|
+
if (action === "set") {
|
|
2705
|
+
if (!args.mode) {
|
|
2706
|
+
return jsonContent({ error: "mode is required for action:'set' (high|medium|low|default)" });
|
|
2707
|
+
}
|
|
2708
|
+
const r = await runPython("scripts/s4l_posting_mode.py", ["set", String(args.mode)], {
|
|
2709
|
+
timeoutMs: 30_000,
|
|
2710
|
+
});
|
|
2711
|
+
try {
|
|
2712
|
+
return jsonContent(JSON.parse((r.stdout || "").trim()));
|
|
2713
|
+
}
|
|
2714
|
+
catch {
|
|
2715
|
+
return jsonContent({ error: `posting-mode set failed: ${(r.stderr || r.stdout || "").slice(0, 300)}` });
|
|
2716
|
+
}
|
|
2717
|
+
}
|
|
2718
|
+
const r = await runPython("scripts/s4l_posting_mode.py", ["get"], { timeoutMs: 30_000 });
|
|
2719
|
+
try {
|
|
2720
|
+
return jsonContent(JSON.parse((r.stdout || "").trim()));
|
|
2721
|
+
}
|
|
2722
|
+
catch {
|
|
2723
|
+
return jsonContent({ error: `posting-mode get failed: ${(r.stderr || r.stdout || "").slice(0, 300)}` });
|
|
2724
|
+
}
|
|
2725
|
+
});
|
|
2679
2726
|
// ---- pause_s4l: temporarily stop drafting/posting, reversibly --------------
|
|
2680
2727
|
// The lighter alternative to Quit: unloads only the launchd jobs that scan,
|
|
2681
2728
|
// draft, and post (plus their support daemons), leaving Claude Desktop, the
|