@integrity-labs/agt-cli 0.28.160 → 0.28.162
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/bin/agt.js +4 -4
- package/dist/{chunk-23U3HSVH.js → chunk-G6NDQYBC.js} +19 -3
- package/dist/{chunk-23U3HSVH.js.map → chunk-G6NDQYBC.js.map} +1 -1
- package/dist/{chunk-GZG5JRRX.js → chunk-MNW2HVGO.js} +2 -2
- package/dist/{chunk-65FVM2UA.js → chunk-U6HS4U7L.js} +23 -1
- package/dist/chunk-U6HS4U7L.js.map +1 -0
- package/dist/{claude-pair-runtime-HN3PEIZ2.js → claude-pair-runtime-PJ4OZ3DE.js} +2 -2
- package/dist/lib/manager-worker.js +8 -8
- package/dist/mcp/index.js +14 -4
- package/dist/mcp/slack-channel.js +70 -1
- package/dist/mcp/telegram-channel.js +63 -1
- package/dist/{persistent-session-TSVRKR7F.js → persistent-session-T7Q53HW5.js} +3 -3
- package/dist/{responsiveness-probe-DXPMUSVR.js → responsiveness-probe-K4Y7BXRH.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-65FVM2UA.js.map +0 -1
- /package/dist/{chunk-GZG5JRRX.js.map → chunk-MNW2HVGO.js.map} +0 -0
- /package/dist/{claude-pair-runtime-HN3PEIZ2.js.map → claude-pair-runtime-PJ4OZ3DE.js.map} +0 -0
- /package/dist/{persistent-session-TSVRKR7F.js.map → persistent-session-T7Q53HW5.js.map} +0 -0
- /package/dist/{responsiveness-probe-DXPMUSVR.js.map → responsiveness-probe-K4Y7BXRH.js.map} +0 -0
|
@@ -100,7 +100,7 @@ async function spawnPairSession(session) {
|
|
|
100
100
|
return { ok: true };
|
|
101
101
|
} catch {
|
|
102
102
|
}
|
|
103
|
-
const { resolveClaudeBinary } = await import("./persistent-session-
|
|
103
|
+
const { resolveClaudeBinary } = await import("./persistent-session-T7Q53HW5.js");
|
|
104
104
|
const claudeBin = resolveClaudeBinary();
|
|
105
105
|
const pairEnv = {
|
|
106
106
|
...process.env,
|
|
@@ -373,4 +373,4 @@ export {
|
|
|
373
373
|
startClaudePair,
|
|
374
374
|
submitClaudePairCode
|
|
375
375
|
};
|
|
376
|
-
//# sourceMappingURL=claude-pair-runtime-
|
|
376
|
+
//# sourceMappingURL=claude-pair-runtime-PJ4OZ3DE.js.map
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
requireHost,
|
|
29
29
|
safeWriteJsonAtomic,
|
|
30
30
|
setConfigHash
|
|
31
|
-
} from "../chunk-
|
|
31
|
+
} from "../chunk-G6NDQYBC.js";
|
|
32
32
|
import {
|
|
33
33
|
getProjectDir as getProjectDir2,
|
|
34
34
|
getReadyTasks,
|
|
@@ -70,7 +70,7 @@ import {
|
|
|
70
70
|
takeZombieDetection,
|
|
71
71
|
transcriptActivityAgeSeconds,
|
|
72
72
|
writeEgressAllowlist
|
|
73
|
-
} from "../chunk-
|
|
73
|
+
} from "../chunk-MNW2HVGO.js";
|
|
74
74
|
import {
|
|
75
75
|
CONVERSATION_FAILURE_CATEGORIES,
|
|
76
76
|
DEFAULT_FRAMEWORK,
|
|
@@ -111,7 +111,7 @@ import {
|
|
|
111
111
|
resolveChannels,
|
|
112
112
|
resolveDmTarget,
|
|
113
113
|
sumTranscriptUsageInWindow
|
|
114
|
-
} from "../chunk-
|
|
114
|
+
} from "../chunk-U6HS4U7L.js";
|
|
115
115
|
import {
|
|
116
116
|
parsePsRows,
|
|
117
117
|
reapOrphanChannelMcps
|
|
@@ -6878,7 +6878,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
6878
6878
|
var lastVersionCheckAt = 0;
|
|
6879
6879
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
6880
6880
|
var lastResponsivenessProbeAt = 0;
|
|
6881
|
-
var agtCliVersion = true ? "0.28.
|
|
6881
|
+
var agtCliVersion = true ? "0.28.162" : "dev";
|
|
6882
6882
|
function resolveBrewPath(execFileSync4) {
|
|
6883
6883
|
try {
|
|
6884
6884
|
const out = execFileSync4("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -8011,7 +8011,7 @@ async function pollCycle() {
|
|
|
8011
8011
|
}
|
|
8012
8012
|
try {
|
|
8013
8013
|
const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
|
|
8014
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
8014
|
+
const { collectDiagnostics } = await import("../persistent-session-T7Q53HW5.js");
|
|
8015
8015
|
const diagCodeNames = [...agentState.persistentSessionAgents];
|
|
8016
8016
|
const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames) : void 0;
|
|
8017
8017
|
let tailscaleHostname;
|
|
@@ -8159,7 +8159,7 @@ async function pollCycle() {
|
|
|
8159
8159
|
const {
|
|
8160
8160
|
collectResponsivenessProbes,
|
|
8161
8161
|
getResponsivenessIntervalMs
|
|
8162
|
-
} = await import("../responsiveness-probe-
|
|
8162
|
+
} = await import("../responsiveness-probe-K4Y7BXRH.js");
|
|
8163
8163
|
const probeIntervalMs = getResponsivenessIntervalMs();
|
|
8164
8164
|
if (now - lastResponsivenessProbeAt > probeIntervalMs) {
|
|
8165
8165
|
const probeCodeNames = [...agentState.persistentSessionAgents];
|
|
@@ -8191,7 +8191,7 @@ async function pollCycle() {
|
|
|
8191
8191
|
collectResponsivenessProbes,
|
|
8192
8192
|
livePendingInboundOldestAgeSeconds,
|
|
8193
8193
|
parkPendingInbound
|
|
8194
|
-
} = await import("../responsiveness-probe-
|
|
8194
|
+
} = await import("../responsiveness-probe-K4Y7BXRH.js");
|
|
8195
8195
|
const { getProjectDir: wedgeProjectDir } = await import("../claude-scheduler-FATCLHDM.js");
|
|
8196
8196
|
const wedgeNow = /* @__PURE__ */ new Date();
|
|
8197
8197
|
const liveAgents = agentState.persistentSessionAgents;
|
|
@@ -11692,7 +11692,7 @@ async function processClaudePairSessions(agents) {
|
|
|
11692
11692
|
killPairSession,
|
|
11693
11693
|
pairTmuxSession,
|
|
11694
11694
|
finalizeClaudePairOnboarding
|
|
11695
|
-
} = await import("../claude-pair-runtime-
|
|
11695
|
+
} = await import("../claude-pair-runtime-PJ4OZ3DE.js");
|
|
11696
11696
|
for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
|
|
11697
11697
|
log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
|
|
11698
11698
|
const killed = await killPairSession(pairTmuxSession(pairId));
|
package/dist/mcp/index.js
CHANGED
|
@@ -21858,10 +21858,13 @@ server.tool(
|
|
|
21858
21858
|
);
|
|
21859
21859
|
server.tool(
|
|
21860
21860
|
"kanban_assign",
|
|
21861
|
-
"Delegate a task to ANOTHER agent
|
|
21861
|
+
"Delegate a task to ANOTHER agent by placing a new card on THEIR board. Use this to hand off or route work to a teammate agent (e.g. you triage a request and route the fix to a specialist agent). This is different from kanban_add, which adds a card to YOUR OWN board. By default the target must be an agent on your OWN team. To assign across teams within your organization, also pass `target_team` (the other team's slug) \u2014 this only works if your org has enabled cross-team assignment and a peer grant links the two teams; otherwise it reads as not-found. When the target finishes, you get a completion notice back on your board.",
|
|
21862
21862
|
{
|
|
21863
21863
|
target_agent: external_exports.string().describe(
|
|
21864
|
-
"The teammate to assign to: their agent code_name (kebab-case) or agent UUID.
|
|
21864
|
+
"The teammate to assign to: their agent code_name (kebab-case) or agent UUID. On your own team unless target_team is also set."
|
|
21865
|
+
),
|
|
21866
|
+
target_team: external_exports.string().trim().min(1).optional().describe(
|
|
21867
|
+
"Optional: the slug (or UUID) of ANOTHER team in your organization to assign across teams. Omit for a same-team handoff. Requires the org to have cross-team assignment enabled and a peer grant; otherwise the target reads as not-found."
|
|
21865
21868
|
),
|
|
21866
21869
|
title: external_exports.string().describe("Task title (max 200 chars)"),
|
|
21867
21870
|
description: external_exports.string().optional().describe("Detailed description of what needs doing"),
|
|
@@ -21873,27 +21876,34 @@ server.tool(
|
|
|
21873
21876
|
const data = await apiPost("/host/kanban/assign", {
|
|
21874
21877
|
agent_id: AGT_AGENT_ID,
|
|
21875
21878
|
target_agent: params.target_agent,
|
|
21879
|
+
// Only sent when assigning across teams — the route branches on its
|
|
21880
|
+
// presence, so omit it for the same-team path. The schema rejects empty
|
|
21881
|
+
// strings (.trim().min(1)), so a present value is always meaningful;
|
|
21882
|
+
// check presence (!== undefined), not truthiness.
|
|
21883
|
+
...params.target_team !== void 0 ? { target_team: params.target_team } : {},
|
|
21876
21884
|
title: params.title,
|
|
21877
21885
|
description: params.description,
|
|
21878
21886
|
priority: params.priority ?? 2,
|
|
21879
21887
|
deliverable: params.deliverable
|
|
21880
21888
|
});
|
|
21889
|
+
const where = data.cross_team ? ` on team ${data.target_team ?? params.target_team}` : "";
|
|
21881
21890
|
return {
|
|
21882
21891
|
content: [
|
|
21883
21892
|
{
|
|
21884
21893
|
type: "text",
|
|
21885
|
-
text: data.ok ? `Assigned "${data.title}" to ${data.target_agent} (id: ${data.id}). It will appear on their board on their next refresh.` : `Failed to assign task to ${params.target_agent}.`
|
|
21894
|
+
text: data.ok ? `Assigned "${data.title}" to ${data.target_agent}${where} (id: ${data.id}). It will appear on their board on their next refresh.` : `Failed to assign task to ${params.target_agent}.`
|
|
21886
21895
|
}
|
|
21887
21896
|
]
|
|
21888
21897
|
};
|
|
21889
21898
|
} catch (err) {
|
|
21890
21899
|
const msg = err instanceof Error ? err.message : String(err);
|
|
21891
21900
|
const notFound = /returned 404/.test(msg);
|
|
21901
|
+
const notFoundText = params.target_team ? `Could not assign: no agent "${params.target_agent}" reachable on team "${params.target_team}". Check the team slug and agent code_name, and note cross-team assignment only works when your org has enabled it and a peer grant links the teams.` : `Could not assign: no agent "${params.target_agent}" found on your team. Check the code_name and make sure they're a teammate on the same team.`;
|
|
21892
21902
|
return {
|
|
21893
21903
|
content: [
|
|
21894
21904
|
{
|
|
21895
21905
|
type: "text",
|
|
21896
|
-
text: notFound ?
|
|
21906
|
+
text: notFound ? notFoundText : `Could not assign task to ${params.target_agent}: ${msg}`
|
|
21897
21907
|
}
|
|
21898
21908
|
],
|
|
21899
21909
|
isError: true
|
|
@@ -16359,10 +16359,16 @@ function parseAllowedUsersCsv(raw) {
|
|
|
16359
16359
|
);
|
|
16360
16360
|
}
|
|
16361
16361
|
function extractAllowedUsersFromMcpJson(jsonText) {
|
|
16362
|
+
return extractSlackEnvAllowlistFromMcpJson(jsonText, "SLACK_ALLOWED_USERS");
|
|
16363
|
+
}
|
|
16364
|
+
function extractPingAllowedUsersFromMcpJson(jsonText) {
|
|
16365
|
+
return extractSlackEnvAllowlistFromMcpJson(jsonText, "SLACK_PING_ALLOWED_USERS");
|
|
16366
|
+
}
|
|
16367
|
+
function extractSlackEnvAllowlistFromMcpJson(jsonText, envKey) {
|
|
16362
16368
|
const parsed = JSON.parse(jsonText);
|
|
16363
16369
|
const slackServer = parsed.mcpServers?.["slack"];
|
|
16364
16370
|
if (!slackServer) return null;
|
|
16365
|
-
return parseAllowedUsersCsv(slackServer.env?.[
|
|
16371
|
+
return parseAllowedUsersCsv(slackServer.env?.[envKey]);
|
|
16366
16372
|
}
|
|
16367
16373
|
|
|
16368
16374
|
// src/slack-response-mode.ts
|
|
@@ -17178,6 +17184,7 @@ async function maybeSendMaintenanceNotice(args) {
|
|
|
17178
17184
|
}
|
|
17179
17185
|
var BLOCK_KIT_DISABLED = process.env.SLACK_BLOCK_KIT_DISABLED === "true";
|
|
17180
17186
|
var ALLOWED_USERS = parseAllowedUsersCsv(process.env.SLACK_ALLOWED_USERS);
|
|
17187
|
+
var PING_ALLOWED_USERS = parseAllowedUsersCsv(process.env.SLACK_PING_ALLOWED_USERS);
|
|
17181
17188
|
var THREAD_AUTO_FOLLOW = process.env.SLACK_THREAD_AUTO_FOLLOW ?? "off";
|
|
17182
17189
|
var SLACK_SKIP_REACTION = (process.env.SLACK_SKIP_REACTION ?? "").trim();
|
|
17183
17190
|
var SLACK_ACK_REACTION = (process.env.SLACK_ACK_REACTION ?? "").trim() || "eyes";
|
|
@@ -17255,6 +17262,27 @@ function readLiveAllowedUsers() {
|
|
|
17255
17262
|
function getEffectiveAllowedUsers() {
|
|
17256
17263
|
return readLiveAllowedUsers() ?? ALLOWED_USERS;
|
|
17257
17264
|
}
|
|
17265
|
+
var livePingAllowedUsersCache = null;
|
|
17266
|
+
function readLivePingAllowedUsers() {
|
|
17267
|
+
if (!SLACK_MCP_CONFIG_PATH) return null;
|
|
17268
|
+
try {
|
|
17269
|
+
const mtimeMs = statSync2(SLACK_MCP_CONFIG_PATH).mtimeMs;
|
|
17270
|
+
if (livePingAllowedUsersCache && livePingAllowedUsersCache.mtimeMs === mtimeMs) {
|
|
17271
|
+
return livePingAllowedUsersCache.value;
|
|
17272
|
+
}
|
|
17273
|
+
const value = extractPingAllowedUsersFromMcpJson(
|
|
17274
|
+
readFileSync10(SLACK_MCP_CONFIG_PATH, "utf-8")
|
|
17275
|
+
);
|
|
17276
|
+
if (value === null) return null;
|
|
17277
|
+
livePingAllowedUsersCache = { mtimeMs, value };
|
|
17278
|
+
return value;
|
|
17279
|
+
} catch {
|
|
17280
|
+
return null;
|
|
17281
|
+
}
|
|
17282
|
+
}
|
|
17283
|
+
function getEffectivePingAllowedUsers() {
|
|
17284
|
+
return readLivePingAllowedUsers() ?? PING_ALLOWED_USERS;
|
|
17285
|
+
}
|
|
17258
17286
|
var SLACK_PENDING_INBOUND_DIR = SLACK_AGENT_DIR ? join8(SLACK_AGENT_DIR, "slack-pending-inbound") : null;
|
|
17259
17287
|
var SLACK_RECOVERY_OUTBOX_DIR = SLACK_AGENT_DIR ? join8(SLACK_AGENT_DIR, "slack-recovery-outbox") : null;
|
|
17260
17288
|
var SLACK_RESTART_CONFIRM_FILE = SLACK_AGENT_DIR ? join8(SLACK_AGENT_DIR, "slack-restart-confirm.json") : null;
|
|
@@ -18282,6 +18310,7 @@ function buildSlackHelpMessage(codeName) {
|
|
|
18282
18310
|
`\u2022 \`${agentSlashCommand("/onboard")}\` \u2014 re-run this agent's onboarding: re-interview, existing config kept (allowlisted users)`,
|
|
18283
18311
|
`\u2022 \`${agentSlashCommand("/resume-onboarding")}\` \u2014 resume this agent's onboarding where it left off (allowlisted users)`,
|
|
18284
18312
|
`\u2022 \`${agentSlashCommand("/status")}\` \u2014 this agent's model, session origin, uptime + connectivity`,
|
|
18313
|
+
`\u2022 \`${agentSlashCommand("/ping")}\` - confirm this agent's channel is connected: posts a visible pong (team + manager only)`,
|
|
18285
18314
|
"\u2022 `/watch <google-doc-url> [duration]` (type it in chat) \u2014 watch a Google Doc for comments that mention me (default 2h, max 7d; auto-pauses when the window ends). In a shared channel, address me as `/watch-<my-name>`.",
|
|
18286
18315
|
"\u2022 `/kill` \u2014 silence all agents in this thread for 6h (use as a thread reply)",
|
|
18287
18316
|
"\u2022 `/unkill` \u2014 clear a kill (use as a thread reply)",
|
|
@@ -18780,6 +18809,46 @@ async function handleSlashCommandEnvelope(payload) {
|
|
|
18780
18809
|
}
|
|
18781
18810
|
return;
|
|
18782
18811
|
}
|
|
18812
|
+
if (matchesAgentCommand(command, "/ping")) {
|
|
18813
|
+
if (!payload.channel_id) {
|
|
18814
|
+
await postEphemeralViaResponseUrl(
|
|
18815
|
+
responseUrl,
|
|
18816
|
+
`:warning: \`/ping\` needs a channel context - invoke it in a channel or DM where \`${codeName}\` is present.`,
|
|
18817
|
+
codeName
|
|
18818
|
+
);
|
|
18819
|
+
return;
|
|
18820
|
+
}
|
|
18821
|
+
const pingAllowed = getEffectivePingAllowedUsers();
|
|
18822
|
+
if (pingAllowed.size === 0 || !payload.user_id || !pingAllowed.has(payload.user_id)) {
|
|
18823
|
+
process.stderr.write(
|
|
18824
|
+
`slack-channel(${codeName}): /ping denied - user not in SLACK_PING_ALLOWED_USERS
|
|
18825
|
+
`
|
|
18826
|
+
);
|
|
18827
|
+
await postEphemeralViaResponseUrl(
|
|
18828
|
+
responseUrl,
|
|
18829
|
+
`\u{1F6AB} \`/ping\` is limited to \`${codeName}\`'s team and the person it reports to. If that's you, link your Slack in your Augmented Team contact preferences and wait for the next refresh.`,
|
|
18830
|
+
codeName
|
|
18831
|
+
);
|
|
18832
|
+
return;
|
|
18833
|
+
}
|
|
18834
|
+
const connected = currentWs != null && !isShuttingDown;
|
|
18835
|
+
const dot = connected ? "\u{1F7E2}" : "\u{1F534}";
|
|
18836
|
+
const state = connected ? "online" : "offline";
|
|
18837
|
+
const pong = `${dot} pong - \`${codeName}\` is ${state} (manager \u2022 ${(/* @__PURE__ */ new Date()).toISOString()}). Last activity: ${formatLastActivity()}.`;
|
|
18838
|
+
const sent = await postSlackMessage({
|
|
18839
|
+
channel: payload.channel_id,
|
|
18840
|
+
text: pong,
|
|
18841
|
+
...payload.thread_ts ? { thread_ts: payload.thread_ts } : {}
|
|
18842
|
+
});
|
|
18843
|
+
if (!sent.ok) {
|
|
18844
|
+
await postEphemeralViaResponseUrl(
|
|
18845
|
+
responseUrl,
|
|
18846
|
+
`\u274C \`/ping\` could not post to this channel: ${sent.error ?? "unknown error"}. The channel may not be connected.`,
|
|
18847
|
+
codeName
|
|
18848
|
+
);
|
|
18849
|
+
}
|
|
18850
|
+
return;
|
|
18851
|
+
}
|
|
18783
18852
|
}
|
|
18784
18853
|
async function handleHelpCommand(opts) {
|
|
18785
18854
|
const codeName = AGENT_CODE_NAME ?? "unknown";
|
|
@@ -16924,6 +16924,9 @@ var ALLOWED_CHATS = new Set(
|
|
|
16924
16924
|
var DIAGNOSTIC_CHAT_IDS = new Set(
|
|
16925
16925
|
(process.env.TELEGRAM_DIAGNOSTIC_CHAT_IDS ?? "").split(",").map((s) => s.trim()).filter(Boolean)
|
|
16926
16926
|
);
|
|
16927
|
+
var PING_ALLOWED_CHAT_IDS = new Set(
|
|
16928
|
+
(process.env.TELEGRAM_PING_ALLOWED_CHAT_IDS ?? "").split(",").map((s) => s.trim()).filter(Boolean)
|
|
16929
|
+
);
|
|
16927
16930
|
var PEER_CLASSIFIER_CONFIG = {
|
|
16928
16931
|
peer_agent_mode: parsePeerAgentModeEnv(process.env.TELEGRAM_PEER_AGENT_MODE),
|
|
16929
16932
|
peer_group_ids: parsePeerGroupIdsEnv(process.env.TELEGRAM_PEER_GROUP_IDS),
|
|
@@ -17354,6 +17357,7 @@ function buildTelegramHelpMessage(codeName) {
|
|
|
17354
17357
|
`_Type these in any chat where the bot is present (intercepted by the agent):_`,
|
|
17355
17358
|
`\u2022 /help \u2014 show this help`,
|
|
17356
17359
|
`\u2022 /status \u2014 this agent's model, session origin, uptime + connectivity`,
|
|
17360
|
+
`\u2022 /ping-${codeName} - confirm this agent's channel is connected: posts a visible pong (team members and the agent's reports-to person)`,
|
|
17357
17361
|
`\u2022 /watch <google-doc-url> [duration] \u2014 watch a Google Doc for comments that mention me (default 2h, max 7d; auto-pauses when the window ends)`,
|
|
17358
17362
|
`\u2022 /restart \u2014 restart this agent`,
|
|
17359
17363
|
`\u2022 /onboard \u2014 re-run this agent's onboarding: re-interview, existing config kept`,
|
|
@@ -17915,6 +17919,24 @@ var STATUS_SYNTAX_RE = /^\/status(?:@([A-Za-z0-9_]{1,64}))?(?:\s|$)/;
|
|
|
17915
17919
|
function isStatusSyntax(text) {
|
|
17916
17920
|
return STATUS_SYNTAX_RE.test(text);
|
|
17917
17921
|
}
|
|
17922
|
+
var PING_SYNTAX_RE = /^\/ping(?:-([a-z0-9-]+))?(?:@([A-Za-z0-9_]{1,64}))?(?:\s|$)/i;
|
|
17923
|
+
function isPingSyntax(text) {
|
|
17924
|
+
return PING_SYNTAX_RE.test(text);
|
|
17925
|
+
}
|
|
17926
|
+
async function classifyPingCommand(text) {
|
|
17927
|
+
const m = PING_SYNTAX_RE.exec(text);
|
|
17928
|
+
if (!m) return "ignore";
|
|
17929
|
+
const codeSuffix = m[1];
|
|
17930
|
+
const botSuffix = m[2];
|
|
17931
|
+
if (codeSuffix && codeSuffix.toLowerCase() !== AGENT_CODE_NAME.toLowerCase()) {
|
|
17932
|
+
return "ignore";
|
|
17933
|
+
}
|
|
17934
|
+
if (botSuffix) {
|
|
17935
|
+
const ours = (await resolveBotIdentity()).bot_username;
|
|
17936
|
+
if (ours && botSuffix.toLowerCase() !== ours.toLowerCase()) return "ignore";
|
|
17937
|
+
}
|
|
17938
|
+
return "act";
|
|
17939
|
+
}
|
|
17918
17940
|
var WATCH_SYNTAX_RE = /^\/watch(?:@([A-Za-z0-9_]{1,64}))?(?:\s|$)/;
|
|
17919
17941
|
function isWatchSyntax(text) {
|
|
17920
17942
|
return WATCH_SYNTAX_RE.test(text);
|
|
@@ -19447,7 +19469,7 @@ async function pollLoop() {
|
|
|
19447
19469
|
const trimmedContent = content.trim();
|
|
19448
19470
|
const isFromBot = !!msg.from?.is_bot;
|
|
19449
19471
|
const nowMs = Date.now();
|
|
19450
|
-
const telegramCommand = isHelpSyntax(trimmedContent) ? "help" : isStatusSyntax(trimmedContent) ? "status" : isWatchSyntax(trimmedContent) ? "watch" : (
|
|
19472
|
+
const telegramCommand = isHelpSyntax(trimmedContent) ? "help" : isStatusSyntax(trimmedContent) ? "status" : isPingSyntax(trimmedContent) ? "ping" : isWatchSyntax(trimmedContent) ? "watch" : (
|
|
19451
19473
|
// ENG-6511: check /resume-onboarding before /onboard for clarity
|
|
19452
19474
|
// (the prefixes are disjoint, so order is not load-bearing).
|
|
19453
19475
|
isResumeOnboardingSyntax(trimmedContent) ? "resume-onboarding" : isOnboardSyntax(trimmedContent) ? "onboard" : isRestartSyntax(trimmedContent) ? "restart" : isInvestigateSyntax(trimmedContent) ? "investigate" : void 0
|
|
@@ -19623,6 +19645,46 @@ async function pollLoop() {
|
|
|
19623
19645
|
} catch (err) {
|
|
19624
19646
|
process.stderr.write(
|
|
19625
19647
|
`telegram-channel(${AGENT_CODE_NAME}): /investigate verification-failed ack send failed: ${redactAugmentedPaths(err.message)}
|
|
19648
|
+
`
|
|
19649
|
+
);
|
|
19650
|
+
}
|
|
19651
|
+
}
|
|
19652
|
+
continue;
|
|
19653
|
+
}
|
|
19654
|
+
if (access.kind === "command" && access.command === "ping") {
|
|
19655
|
+
const disposition = await classifyPingCommand(trimmedContent);
|
|
19656
|
+
if (disposition === "act") {
|
|
19657
|
+
const senderId = msg.from?.id != null ? String(msg.from.id) : null;
|
|
19658
|
+
const authorized = PING_ALLOWED_CHAT_IDS.size > 0 && senderId != null && PING_ALLOWED_CHAT_IDS.has(senderId);
|
|
19659
|
+
try {
|
|
19660
|
+
if (!authorized) {
|
|
19661
|
+
process.stderr.write(
|
|
19662
|
+
`telegram-channel(${AGENT_CODE_NAME}): /ping denied - sender not in TELEGRAM_PING_ALLOWED_CHAT_IDS
|
|
19663
|
+
`
|
|
19664
|
+
);
|
|
19665
|
+
await telegramApiCall(
|
|
19666
|
+
"sendMessage",
|
|
19667
|
+
{
|
|
19668
|
+
chat_id: chatId,
|
|
19669
|
+
text: `\u{1F6AB} /ping is limited to ${AGENT_CODE_NAME}'s team and the person it reports to. If that's you, link your Telegram in your Augmented Team contact preferences and wait for the next refresh.`,
|
|
19670
|
+
reply_to_message_id: Number(msg.message_id)
|
|
19671
|
+
},
|
|
19672
|
+
1e4
|
|
19673
|
+
);
|
|
19674
|
+
} else {
|
|
19675
|
+
await telegramApiCall(
|
|
19676
|
+
"sendMessage",
|
|
19677
|
+
{
|
|
19678
|
+
chat_id: chatId,
|
|
19679
|
+
text: `\u{1F7E2} pong - ${AGENT_CODE_NAME} is online (manager \u2022 ${(/* @__PURE__ */ new Date()).toISOString()}).`,
|
|
19680
|
+
reply_to_message_id: Number(msg.message_id)
|
|
19681
|
+
},
|
|
19682
|
+
1e4
|
|
19683
|
+
);
|
|
19684
|
+
}
|
|
19685
|
+
} catch (err) {
|
|
19686
|
+
process.stderr.write(
|
|
19687
|
+
`telegram-channel(${AGENT_CODE_NAME}): /ping reply send failed: ${redactAugmentedPaths(err.message)}
|
|
19626
19688
|
`
|
|
19627
19689
|
);
|
|
19628
19690
|
}
|
|
@@ -34,8 +34,8 @@ import {
|
|
|
34
34
|
writeDirectChatSessionState,
|
|
35
35
|
writeEgressAllowlist,
|
|
36
36
|
writePersistentClaudeWrapper
|
|
37
|
-
} from "./chunk-
|
|
38
|
-
import "./chunk-
|
|
37
|
+
} from "./chunk-MNW2HVGO.js";
|
|
38
|
+
import "./chunk-U6HS4U7L.js";
|
|
39
39
|
import "./chunk-XWVM4KPK.js";
|
|
40
40
|
export {
|
|
41
41
|
EGRESS_BASELINE_DOMAINS,
|
|
@@ -74,4 +74,4 @@ export {
|
|
|
74
74
|
writeEgressAllowlist,
|
|
75
75
|
writePersistentClaudeWrapper
|
|
76
76
|
};
|
|
77
|
-
//# sourceMappingURL=persistent-session-
|
|
77
|
+
//# sourceMappingURL=persistent-session-T7Q53HW5.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
paneLogPath
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-MNW2HVGO.js";
|
|
4
|
+
import "./chunk-U6HS4U7L.js";
|
|
5
5
|
import "./chunk-XWVM4KPK.js";
|
|
6
6
|
|
|
7
7
|
// src/lib/responsiveness-probe.ts
|
|
@@ -304,4 +304,4 @@ export {
|
|
|
304
304
|
readAndResetChannelDeflections,
|
|
305
305
|
readAndResetChannelLaneClassifications
|
|
306
306
|
};
|
|
307
|
-
//# sourceMappingURL=responsiveness-probe-
|
|
307
|
+
//# sourceMappingURL=responsiveness-probe-K4Y7BXRH.js.map
|