squadrant 0.11.0 → 0.11.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/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/squadrantd.js +23 -14
- package/dist/squadrantd.js.map +1 -1
- package/package.json +1 -1
package/dist/squadrantd.js
CHANGED
|
@@ -403,7 +403,7 @@ async function ensureCmuxAutoConfig(opts = {}) {
|
|
|
403
403
|
// packages/shared/dist/lib/compat-manifest.js
|
|
404
404
|
var compatManifest = {
|
|
405
405
|
tools: {
|
|
406
|
-
cmux: { min: "0.64.0", lastVerified: "0.64.
|
|
406
|
+
cmux: { min: "0.64.0", lastVerified: "0.64.17" },
|
|
407
407
|
claude: { min: "2.1.32" },
|
|
408
408
|
node: { min: "18.0.0", lastVerified: "24.6.0" },
|
|
409
409
|
// presence-checked; no floor enforced yet
|
|
@@ -2830,6 +2830,7 @@ function tierIncludes(tier, eventType) {
|
|
|
2830
2830
|
var LONG_POLL_SEC = 50;
|
|
2831
2831
|
var sleep2 = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
2832
2832
|
var CREW_TIERS = ["all", "alert_only", "done_only", "none"];
|
|
2833
|
+
var RECOGNIZED_CHANNEL_COMMANDS = /* @__PURE__ */ new Set(["status", "projects", "crews", "launch", "effort", "spawn"]);
|
|
2833
2834
|
function parseNotifyPref(text) {
|
|
2834
2835
|
const parts = text.trim().split(/\s+/);
|
|
2835
2836
|
if (stripBotMention(parts[0] ?? "").toLowerCase() !== "/notify")
|
|
@@ -2998,49 +2999,52 @@ function createTelegramBridge(opts) {
|
|
|
2998
2999
|
}
|
|
2999
3000
|
await reply(threadId, "Pick a project to spawn a crew on:", spawnPicker(projects));
|
|
3000
3001
|
}
|
|
3001
|
-
async function
|
|
3002
|
-
if (!text.startsWith("/")) {
|
|
3003
|
-
await reply(void 0, "Send /help for commands.");
|
|
3004
|
-
return;
|
|
3005
|
-
}
|
|
3002
|
+
async function runChannelCommand(text, fromId, threadId) {
|
|
3006
3003
|
if (!isControlEnabled(cfg) || !isAuthorized(fromId, cfg)) {
|
|
3007
|
-
await reply(
|
|
3004
|
+
await reply(threadId, "\u26D4 not authorized");
|
|
3008
3005
|
return;
|
|
3009
3006
|
}
|
|
3010
3007
|
const tokens = text.trim().slice(1).split(/\s+/).filter((t) => t.length > 0);
|
|
3011
3008
|
const name = stripBotMention(tokens[0] ?? "").toLowerCase();
|
|
3012
3009
|
const noArg = tokens.length === 1;
|
|
3013
3010
|
if (noArg && name === "effort") {
|
|
3014
|
-
await reply(
|
|
3011
|
+
await reply(threadId, "Effort mode:", effortPanel(currentEffort()));
|
|
3015
3012
|
return;
|
|
3016
3013
|
}
|
|
3017
3014
|
if (noArg && name === "spawn") {
|
|
3018
|
-
await replySpawnPicker(
|
|
3015
|
+
await replySpawnPicker(threadId);
|
|
3019
3016
|
return;
|
|
3020
3017
|
}
|
|
3021
3018
|
const PICKERS = { crews: "cr", launch: "lc", mute: "mu", unmute: "um" };
|
|
3022
3019
|
if (noArg && name in PICKERS) {
|
|
3023
3020
|
const projects = projectNames();
|
|
3024
3021
|
if (projects.length === 0) {
|
|
3025
|
-
await reply(
|
|
3022
|
+
await reply(threadId, "no projects registered");
|
|
3026
3023
|
return;
|
|
3027
3024
|
}
|
|
3028
|
-
await reply(
|
|
3025
|
+
await reply(threadId, `Pick a project:`, projectPicker(PICKERS[name], projects));
|
|
3029
3026
|
return;
|
|
3030
3027
|
}
|
|
3031
3028
|
const parsed = parseCommand(text);
|
|
3032
3029
|
if (parsed.kind !== "ok") {
|
|
3033
|
-
await reply(
|
|
3030
|
+
await reply(threadId, parsed.message);
|
|
3034
3031
|
return;
|
|
3035
3032
|
}
|
|
3036
3033
|
try {
|
|
3037
3034
|
const out = runCommand ? await runCommand(parsed.argv) : "(command runner unavailable)";
|
|
3038
|
-
await reply(
|
|
3035
|
+
await reply(threadId, out);
|
|
3039
3036
|
} catch (e) {
|
|
3040
|
-
await reply(
|
|
3037
|
+
await reply(threadId, `\u26A0\uFE0F command failed: ${e.message}`);
|
|
3041
3038
|
log(`telegram command failed argv=${JSON.stringify(parsed.argv)}: ${e.message}`);
|
|
3042
3039
|
}
|
|
3043
3040
|
}
|
|
3041
|
+
async function handleGeneral(text, fromId) {
|
|
3042
|
+
if (!text.startsWith("/")) {
|
|
3043
|
+
await reply(void 0, "Send /help for commands.");
|
|
3044
|
+
return;
|
|
3045
|
+
}
|
|
3046
|
+
await runChannelCommand(text, fromId, void 0);
|
|
3047
|
+
}
|
|
3044
3048
|
async function handleProjectTopic(text, threadId, fromId) {
|
|
3045
3049
|
const resolved = findProjectByThread(stateRoot, threadId);
|
|
3046
3050
|
if (!resolved)
|
|
@@ -3089,6 +3093,11 @@ function createTelegramBridge(opts) {
|
|
|
3089
3093
|
await reply(threadId, `\u2705 ${pref.dimension} = ${pref.value}`);
|
|
3090
3094
|
return;
|
|
3091
3095
|
}
|
|
3096
|
+
const firstTok = stripBotMention(text.trim().split(/\s+/)[0] ?? "").toLowerCase();
|
|
3097
|
+
if (firstTok.startsWith("/") && RECOGNIZED_CHANNEL_COMMANDS.has(firstTok.slice(1))) {
|
|
3098
|
+
await runChannelCommand(text, fromId, threadId);
|
|
3099
|
+
return;
|
|
3100
|
+
}
|
|
3092
3101
|
setNotify(stateRoot, resolved.project, true);
|
|
3093
3102
|
if (ensureCaptainAlive && isControlEnabled(cfg) && isAuthorized(fromId, cfg)) {
|
|
3094
3103
|
try {
|