@integrity-labs/agt-cli 0.28.722 → 0.28.724
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 +5 -5
- package/dist/{chunk-E3WGN4GX.js → chunk-ATJU3SDV.js} +2 -2
- package/dist/{chunk-32WU3HBU.js → chunk-IXGIGDJG.js} +22 -1
- package/dist/chunk-IXGIGDJG.js.map +1 -0
- package/dist/{chunk-LWDPZWSO.js → chunk-KOAHMMPZ.js} +4 -4
- package/dist/{claude-pair-runtime-EKP2KR6N.js → claude-pair-runtime-XWPOUQMP.js} +2 -2
- package/dist/lib/manager-worker.js +13 -13
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/direct-chat-channel.js +21 -0
- package/dist/mcp/index.js +21 -0
- package/dist/mcp/origami.js +21 -0
- package/dist/mcp/slack-channel.js +21 -0
- package/dist/mcp/telegram-channel.js +86 -0
- package/dist/{persistent-session-7NXQBNZB.js → persistent-session-CEC5KESY.js} +3 -3
- package/dist/{responsiveness-probe-UDFTVXOW.js → responsiveness-probe-J3VB4U4W.js} +3 -3
- package/dist/{session-auth-dead-DQW6NXDX.js → session-auth-dead-YQHE3WKV.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-32WU3HBU.js.map +0 -1
- /package/dist/{chunk-E3WGN4GX.js.map → chunk-ATJU3SDV.js.map} +0 -0
- /package/dist/{chunk-LWDPZWSO.js.map → chunk-KOAHMMPZ.js.map} +0 -0
- /package/dist/{claude-pair-runtime-EKP2KR6N.js.map → claude-pair-runtime-XWPOUQMP.js.map} +0 -0
- /package/dist/{persistent-session-7NXQBNZB.js.map → persistent-session-CEC5KESY.js.map} +0 -0
- /package/dist/{responsiveness-probe-UDFTVXOW.js.map → responsiveness-probe-J3VB4U4W.js.map} +0 -0
- /package/dist/{session-auth-dead-DQW6NXDX.js.map → session-auth-dead-YQHE3WKV.js.map} +0 -0
|
@@ -36563,6 +36563,27 @@ var FLAG_REGISTRY = [
|
|
|
36563
36563
|
// carrying an inert enforce-level email.require_approval row are NOT armed on deploy.
|
|
36564
36564
|
newOrgOverride: true
|
|
36565
36565
|
},
|
|
36566
|
+
{
|
|
36567
|
+
key: "mail-rule-control-enforcement",
|
|
36568
|
+
description: "Enforcement gate for the `email.mail_rules` guardrail (ENG-9640). A mail RULE is not a send: the agent installs a standing server-side instruction and the PROVIDER acts on it from then on \u2014 on mail that has not arrived yet, after the session ends, after the agent is paused or revoked, and after the integration is disconnected. So no fix to the send registry can reach it (ENG-9607 / ENG-9633 both closed the send surface), and before this guardrail NOTHING read the five rule-mutation tools at all. When ON for an org, a rule mutation whose classified disposition is held (egress / suppression / opaque) routes to Human Approval; a label-only filter passes untouched, which is what keeps the control from becoming a click-through. Deliberately separate from the guardrail row, for the ENG-9611 reason one step earlier: `email.mail_rules` is `default_for_new_orgs`, and org seeding writes those rows at `enforcement: 'enforce'`, so reading the row alone would arm a brand-new blocking control on deploy for every org created after it lands. Evaluated per-org. Ships dark.",
|
|
36569
|
+
flagType: "boolean",
|
|
36570
|
+
// Declared safe value is `false` (no hold). A flag-DB read error degrades here, matching
|
|
36571
|
+
// `email-require-approval-enforcement`: a control that cannot verify itself must not start
|
|
36572
|
+
// holding real customer traffic. Note this is the opposite of the CLASSIFIER's posture
|
|
36573
|
+
// inside mail-rule-tools.ts, which fails CLOSED on an unreadable rule — the two are
|
|
36574
|
+
// consistent, not contradictory. The classifier answers "is this rule dangerous?" and
|
|
36575
|
+
// resolves doubt towards held; the flag answers "is this org opted in at all?" and an
|
|
36576
|
+
// infrastructure blip is not an opt-in.
|
|
36577
|
+
defaultValue: false,
|
|
36578
|
+
// Turning it on holds real customer mail-rule changes pending a human tap, so it is a
|
|
36579
|
+
// deliberate, audited per-org flip (ADR-0022 §4).
|
|
36580
|
+
sensitive: true
|
|
36581
|
+
// NO newOrgOverride, unlike email-require-approval-enforcement. That flag armed new orgs
|
|
36582
|
+
// because its guardrail row had already sat inert for ~4 months, so the behaviour was
|
|
36583
|
+
// known. This control is net-new with no soak: arming it for every new org on deploy would
|
|
36584
|
+
// put a first-of-its-kind classifier in front of real customer traffic with nothing
|
|
36585
|
+
// observed. Arm per-org, then revisit once there is evidence.
|
|
36586
|
+
},
|
|
36566
36587
|
{
|
|
36567
36588
|
key: "email-guard-require-approval-enabled",
|
|
36568
36589
|
description: "Platform enable-gate for the email-domain guardrail REQUIRE_APPROVAL stage (ENG-7939). When ON for an org, a scope at email_guard_stage=require_approval routes a send to a non-allowed domain into Human Approval (an Approve/Deny card) instead of a hard block: the rollout UI unlocks the option and the write routes accept require_approval. When OFF (default) the write routes reject require_approval and the UI shows it as not yet available, so no scope can select it. Structurally also depends on hitl-approval-routing being on (the approval broker fails closed to a hard block when routing is off). Evaluated per-org. Ships dark.",
|
package/dist/mcp/index.js
CHANGED
|
@@ -43524,6 +43524,27 @@ var FLAG_REGISTRY = [
|
|
|
43524
43524
|
// carrying an inert enforce-level email.require_approval row are NOT armed on deploy.
|
|
43525
43525
|
newOrgOverride: true
|
|
43526
43526
|
},
|
|
43527
|
+
{
|
|
43528
|
+
key: "mail-rule-control-enforcement",
|
|
43529
|
+
description: "Enforcement gate for the `email.mail_rules` guardrail (ENG-9640). A mail RULE is not a send: the agent installs a standing server-side instruction and the PROVIDER acts on it from then on \u2014 on mail that has not arrived yet, after the session ends, after the agent is paused or revoked, and after the integration is disconnected. So no fix to the send registry can reach it (ENG-9607 / ENG-9633 both closed the send surface), and before this guardrail NOTHING read the five rule-mutation tools at all. When ON for an org, a rule mutation whose classified disposition is held (egress / suppression / opaque) routes to Human Approval; a label-only filter passes untouched, which is what keeps the control from becoming a click-through. Deliberately separate from the guardrail row, for the ENG-9611 reason one step earlier: `email.mail_rules` is `default_for_new_orgs`, and org seeding writes those rows at `enforcement: 'enforce'`, so reading the row alone would arm a brand-new blocking control on deploy for every org created after it lands. Evaluated per-org. Ships dark.",
|
|
43530
|
+
flagType: "boolean",
|
|
43531
|
+
// Declared safe value is `false` (no hold). A flag-DB read error degrades here, matching
|
|
43532
|
+
// `email-require-approval-enforcement`: a control that cannot verify itself must not start
|
|
43533
|
+
// holding real customer traffic. Note this is the opposite of the CLASSIFIER's posture
|
|
43534
|
+
// inside mail-rule-tools.ts, which fails CLOSED on an unreadable rule — the two are
|
|
43535
|
+
// consistent, not contradictory. The classifier answers "is this rule dangerous?" and
|
|
43536
|
+
// resolves doubt towards held; the flag answers "is this org opted in at all?" and an
|
|
43537
|
+
// infrastructure blip is not an opt-in.
|
|
43538
|
+
defaultValue: false,
|
|
43539
|
+
// Turning it on holds real customer mail-rule changes pending a human tap, so it is a
|
|
43540
|
+
// deliberate, audited per-org flip (ADR-0022 §4).
|
|
43541
|
+
sensitive: true
|
|
43542
|
+
// NO newOrgOverride, unlike email-require-approval-enforcement. That flag armed new orgs
|
|
43543
|
+
// because its guardrail row had already sat inert for ~4 months, so the behaviour was
|
|
43544
|
+
// known. This control is net-new with no soak: arming it for every new org on deploy would
|
|
43545
|
+
// put a first-of-its-kind classifier in front of real customer traffic with nothing
|
|
43546
|
+
// observed. Arm per-org, then revisit once there is evidence.
|
|
43547
|
+
},
|
|
43527
43548
|
{
|
|
43528
43549
|
key: "email-guard-require-approval-enabled",
|
|
43529
43550
|
description: "Platform enable-gate for the email-domain guardrail REQUIRE_APPROVAL stage (ENG-7939). When ON for an org, a scope at email_guard_stage=require_approval routes a send to a non-allowed domain into Human Approval (an Approve/Deny card) instead of a hard block: the rollout UI unlocks the option and the write routes accept require_approval. When OFF (default) the write routes reject require_approval and the UI shows it as not yet available, so no scope can select it. Structurally also depends on hitl-approval-routing being on (the approval broker fails closed to a hard block when routing is off). Evaluated per-org. Ships dark.",
|
package/dist/mcp/origami.js
CHANGED
|
@@ -42295,6 +42295,27 @@ var FLAG_REGISTRY = [
|
|
|
42295
42295
|
// carrying an inert enforce-level email.require_approval row are NOT armed on deploy.
|
|
42296
42296
|
newOrgOverride: true
|
|
42297
42297
|
},
|
|
42298
|
+
{
|
|
42299
|
+
key: "mail-rule-control-enforcement",
|
|
42300
|
+
description: "Enforcement gate for the `email.mail_rules` guardrail (ENG-9640). A mail RULE is not a send: the agent installs a standing server-side instruction and the PROVIDER acts on it from then on \u2014 on mail that has not arrived yet, after the session ends, after the agent is paused or revoked, and after the integration is disconnected. So no fix to the send registry can reach it (ENG-9607 / ENG-9633 both closed the send surface), and before this guardrail NOTHING read the five rule-mutation tools at all. When ON for an org, a rule mutation whose classified disposition is held (egress / suppression / opaque) routes to Human Approval; a label-only filter passes untouched, which is what keeps the control from becoming a click-through. Deliberately separate from the guardrail row, for the ENG-9611 reason one step earlier: `email.mail_rules` is `default_for_new_orgs`, and org seeding writes those rows at `enforcement: 'enforce'`, so reading the row alone would arm a brand-new blocking control on deploy for every org created after it lands. Evaluated per-org. Ships dark.",
|
|
42301
|
+
flagType: "boolean",
|
|
42302
|
+
// Declared safe value is `false` (no hold). A flag-DB read error degrades here, matching
|
|
42303
|
+
// `email-require-approval-enforcement`: a control that cannot verify itself must not start
|
|
42304
|
+
// holding real customer traffic. Note this is the opposite of the CLASSIFIER's posture
|
|
42305
|
+
// inside mail-rule-tools.ts, which fails CLOSED on an unreadable rule — the two are
|
|
42306
|
+
// consistent, not contradictory. The classifier answers "is this rule dangerous?" and
|
|
42307
|
+
// resolves doubt towards held; the flag answers "is this org opted in at all?" and an
|
|
42308
|
+
// infrastructure blip is not an opt-in.
|
|
42309
|
+
defaultValue: false,
|
|
42310
|
+
// Turning it on holds real customer mail-rule changes pending a human tap, so it is a
|
|
42311
|
+
// deliberate, audited per-org flip (ADR-0022 §4).
|
|
42312
|
+
sensitive: true
|
|
42313
|
+
// NO newOrgOverride, unlike email-require-approval-enforcement. That flag armed new orgs
|
|
42314
|
+
// because its guardrail row had already sat inert for ~4 months, so the behaviour was
|
|
42315
|
+
// known. This control is net-new with no soak: arming it for every new org on deploy would
|
|
42316
|
+
// put a first-of-its-kind classifier in front of real customer traffic with nothing
|
|
42317
|
+
// observed. Arm per-org, then revisit once there is evidence.
|
|
42318
|
+
},
|
|
42298
42319
|
{
|
|
42299
42320
|
key: "email-guard-require-approval-enabled",
|
|
42300
42321
|
description: "Platform enable-gate for the email-domain guardrail REQUIRE_APPROVAL stage (ENG-7939). When ON for an org, a scope at email_guard_stage=require_approval routes a send to a non-allowed domain into Human Approval (an Approve/Deny card) instead of a hard block: the rollout UI unlocks the option and the write routes accept require_approval. When OFF (default) the write routes reject require_approval and the UI shows it as not yet available, so no scope can select it. Structurally also depends on hitl-approval-routing being on (the approval broker fails closed to a hard block when routing is off). Evaluated per-org. Ships dark.",
|
|
@@ -36815,6 +36815,27 @@ var FLAG_REGISTRY = [
|
|
|
36815
36815
|
// carrying an inert enforce-level email.require_approval row are NOT armed on deploy.
|
|
36816
36816
|
newOrgOverride: true
|
|
36817
36817
|
},
|
|
36818
|
+
{
|
|
36819
|
+
key: "mail-rule-control-enforcement",
|
|
36820
|
+
description: "Enforcement gate for the `email.mail_rules` guardrail (ENG-9640). A mail RULE is not a send: the agent installs a standing server-side instruction and the PROVIDER acts on it from then on \u2014 on mail that has not arrived yet, after the session ends, after the agent is paused or revoked, and after the integration is disconnected. So no fix to the send registry can reach it (ENG-9607 / ENG-9633 both closed the send surface), and before this guardrail NOTHING read the five rule-mutation tools at all. When ON for an org, a rule mutation whose classified disposition is held (egress / suppression / opaque) routes to Human Approval; a label-only filter passes untouched, which is what keeps the control from becoming a click-through. Deliberately separate from the guardrail row, for the ENG-9611 reason one step earlier: `email.mail_rules` is `default_for_new_orgs`, and org seeding writes those rows at `enforcement: 'enforce'`, so reading the row alone would arm a brand-new blocking control on deploy for every org created after it lands. Evaluated per-org. Ships dark.",
|
|
36821
|
+
flagType: "boolean",
|
|
36822
|
+
// Declared safe value is `false` (no hold). A flag-DB read error degrades here, matching
|
|
36823
|
+
// `email-require-approval-enforcement`: a control that cannot verify itself must not start
|
|
36824
|
+
// holding real customer traffic. Note this is the opposite of the CLASSIFIER's posture
|
|
36825
|
+
// inside mail-rule-tools.ts, which fails CLOSED on an unreadable rule — the two are
|
|
36826
|
+
// consistent, not contradictory. The classifier answers "is this rule dangerous?" and
|
|
36827
|
+
// resolves doubt towards held; the flag answers "is this org opted in at all?" and an
|
|
36828
|
+
// infrastructure blip is not an opt-in.
|
|
36829
|
+
defaultValue: false,
|
|
36830
|
+
// Turning it on holds real customer mail-rule changes pending a human tap, so it is a
|
|
36831
|
+
// deliberate, audited per-org flip (ADR-0022 §4).
|
|
36832
|
+
sensitive: true
|
|
36833
|
+
// NO newOrgOverride, unlike email-require-approval-enforcement. That flag armed new orgs
|
|
36834
|
+
// because its guardrail row had already sat inert for ~4 months, so the behaviour was
|
|
36835
|
+
// known. This control is net-new with no soak: arming it for every new org on deploy would
|
|
36836
|
+
// put a first-of-its-kind classifier in front of real customer traffic with nothing
|
|
36837
|
+
// observed. Arm per-org, then revisit once there is evidence.
|
|
36838
|
+
},
|
|
36818
36839
|
{
|
|
36819
36840
|
key: "email-guard-require-approval-enabled",
|
|
36820
36841
|
description: "Platform enable-gate for the email-domain guardrail REQUIRE_APPROVAL stage (ENG-7939). When ON for an org, a scope at email_guard_stage=require_approval routes a send to a non-allowed domain into Human Approval (an Approve/Deny card) instead of a hard block: the rollout UI unlocks the option and the write routes accept require_approval. When OFF (default) the write routes reject require_approval and the UI shows it as not yet available, so no scope can select it. Structurally also depends on hitl-approval-routing being on (the approval broker fails closed to a hard block when routing is off). Evaluated per-org. Ships dark.",
|
|
@@ -36971,6 +36971,27 @@ var FLAG_REGISTRY = [
|
|
|
36971
36971
|
// carrying an inert enforce-level email.require_approval row are NOT armed on deploy.
|
|
36972
36972
|
newOrgOverride: true
|
|
36973
36973
|
},
|
|
36974
|
+
{
|
|
36975
|
+
key: "mail-rule-control-enforcement",
|
|
36976
|
+
description: "Enforcement gate for the `email.mail_rules` guardrail (ENG-9640). A mail RULE is not a send: the agent installs a standing server-side instruction and the PROVIDER acts on it from then on \u2014 on mail that has not arrived yet, after the session ends, after the agent is paused or revoked, and after the integration is disconnected. So no fix to the send registry can reach it (ENG-9607 / ENG-9633 both closed the send surface), and before this guardrail NOTHING read the five rule-mutation tools at all. When ON for an org, a rule mutation whose classified disposition is held (egress / suppression / opaque) routes to Human Approval; a label-only filter passes untouched, which is what keeps the control from becoming a click-through. Deliberately separate from the guardrail row, for the ENG-9611 reason one step earlier: `email.mail_rules` is `default_for_new_orgs`, and org seeding writes those rows at `enforcement: 'enforce'`, so reading the row alone would arm a brand-new blocking control on deploy for every org created after it lands. Evaluated per-org. Ships dark.",
|
|
36977
|
+
flagType: "boolean",
|
|
36978
|
+
// Declared safe value is `false` (no hold). A flag-DB read error degrades here, matching
|
|
36979
|
+
// `email-require-approval-enforcement`: a control that cannot verify itself must not start
|
|
36980
|
+
// holding real customer traffic. Note this is the opposite of the CLASSIFIER's posture
|
|
36981
|
+
// inside mail-rule-tools.ts, which fails CLOSED on an unreadable rule — the two are
|
|
36982
|
+
// consistent, not contradictory. The classifier answers "is this rule dangerous?" and
|
|
36983
|
+
// resolves doubt towards held; the flag answers "is this org opted in at all?" and an
|
|
36984
|
+
// infrastructure blip is not an opt-in.
|
|
36985
|
+
defaultValue: false,
|
|
36986
|
+
// Turning it on holds real customer mail-rule changes pending a human tap, so it is a
|
|
36987
|
+
// deliberate, audited per-org flip (ADR-0022 §4).
|
|
36988
|
+
sensitive: true
|
|
36989
|
+
// NO newOrgOverride, unlike email-require-approval-enforcement. That flag armed new orgs
|
|
36990
|
+
// because its guardrail row had already sat inert for ~4 months, so the behaviour was
|
|
36991
|
+
// known. This control is net-new with no soak: arming it for every new org on deploy would
|
|
36992
|
+
// put a first-of-its-kind classifier in front of real customer traffic with nothing
|
|
36993
|
+
// observed. Arm per-org, then revisit once there is evidence.
|
|
36994
|
+
},
|
|
36974
36995
|
{
|
|
36975
36996
|
key: "email-guard-require-approval-enabled",
|
|
36976
36997
|
description: "Platform enable-gate for the email-domain guardrail REQUIRE_APPROVAL stage (ENG-7939). When ON for an org, a scope at email_guard_stage=require_approval routes a send to a non-allowed domain into Human Approval (an Approve/Deny card) instead of a hard block: the rollout UI unlocks the option and the write routes accept require_approval. When OFF (default) the write routes reject require_approval and the UI shows it as not yet available, so no scope can select it. Structurally also depends on hitl-approval-routing being on (the approval broker fails closed to a hard block when routing is off). Evaluated per-org. Ships dark.",
|
|
@@ -38970,6 +38991,7 @@ var TELEGRAM_EGRESS_TOOLS = /* @__PURE__ */ new Set([
|
|
|
38970
38991
|
"telegram.send_message",
|
|
38971
38992
|
"telegram.react",
|
|
38972
38993
|
"telegram.upload_file",
|
|
38994
|
+
"telegram.consume",
|
|
38973
38995
|
"channel_request_input"
|
|
38974
38996
|
]);
|
|
38975
38997
|
|
|
@@ -42037,6 +42059,20 @@ function clearTelegramMarkerFileWithHeal(fullPath) {
|
|
|
42037
42059
|
} catch {
|
|
42038
42060
|
}
|
|
42039
42061
|
}
|
|
42062
|
+
function clearTelegramMarkerFileSilently(fullPath) {
|
|
42063
|
+
let marker = null;
|
|
42064
|
+
try {
|
|
42065
|
+
marker = JSON.parse(readFileSync14(fullPath, "utf-8"));
|
|
42066
|
+
} catch {
|
|
42067
|
+
}
|
|
42068
|
+
if (marker?.chat_id) {
|
|
42069
|
+
cancelScheduledUndeliverableNotice(marker.chat_id);
|
|
42070
|
+
}
|
|
42071
|
+
try {
|
|
42072
|
+
if (existsSync9(fullPath)) unlinkSync8(fullPath);
|
|
42073
|
+
} catch {
|
|
42074
|
+
}
|
|
42075
|
+
}
|
|
42040
42076
|
function markTelegramMarkerSeenInPlace(fullPath) {
|
|
42041
42077
|
markTelegramMarkerEngagedInPlace(fullPath, { promise: false });
|
|
42042
42078
|
}
|
|
@@ -42853,6 +42889,15 @@ function clearPendingMessage(chatId, cutoffMs = Number.POSITIVE_INFINITY) {
|
|
|
42853
42889
|
cutoffMs
|
|
42854
42890
|
);
|
|
42855
42891
|
}
|
|
42892
|
+
function consumePendingMessage(chatId, cutoffMs = Number.POSITIVE_INFINITY) {
|
|
42893
|
+
if (!PENDING_INBOUND_DIR || !existsSync9(PENDING_INBOUND_DIR)) return;
|
|
42894
|
+
clearAllTelegramPendingMarkersForChat(
|
|
42895
|
+
PENDING_INBOUND_DIR,
|
|
42896
|
+
chatId,
|
|
42897
|
+
clearTelegramMarkerFileSilently,
|
|
42898
|
+
cutoffMs
|
|
42899
|
+
);
|
|
42900
|
+
}
|
|
42856
42901
|
function markSeenPendingMessage(chatId, cutoffMs = Number.POSITIVE_INFINITY) {
|
|
42857
42902
|
if (!PENDING_INBOUND_DIR || !existsSync9(PENDING_INBOUND_DIR)) return;
|
|
42858
42903
|
markSeenAllTelegramPendingMarkersForChat(
|
|
@@ -42969,6 +43014,24 @@ mcp.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
|
42969
43014
|
required: ["chat_id", "text"]
|
|
42970
43015
|
}
|
|
42971
43016
|
},
|
|
43017
|
+
{
|
|
43018
|
+
name: "telegram.consume",
|
|
43019
|
+
description: "Acknowledge Telegram message(s) you handled WITHOUT sending a reply \u2014 a message you deliberately did not answer because a standing rule forbids engaging in that chat, or one that only updated state. Pass the chat_id from the <channel> tag. If you send a telegram.reply you do NOT also need to consume: the reply already acknowledges the message. Without one of the two, a silently-handled message is treated as undelivered and is re-delivered to you indefinitely. Clears the chat, not one message \u2014 that is Telegram's conversation grain \u2014 and only messages received up to the one you are answering, so an inbound that arrives while you are deciding is never discarded unseen.",
|
|
43020
|
+
inputSchema: {
|
|
43021
|
+
type: "object",
|
|
43022
|
+
properties: {
|
|
43023
|
+
chat_id: {
|
|
43024
|
+
type: "string",
|
|
43025
|
+
description: "Telegram chat ID (from the chat_id attribute in the <channel> tag)"
|
|
43026
|
+
},
|
|
43027
|
+
reason: {
|
|
43028
|
+
type: "string",
|
|
43029
|
+
description: 'Short note on WHY no reply was sent (e.g. "owner restricts replies to his own chat"). Logged, not sent to the chat. A consume with no reason is indistinguishable from a dropped message when someone reads the log later.'
|
|
43030
|
+
}
|
|
43031
|
+
},
|
|
43032
|
+
required: ["chat_id"]
|
|
43033
|
+
}
|
|
43034
|
+
},
|
|
42972
43035
|
{
|
|
42973
43036
|
name: "telegram.send_message",
|
|
42974
43037
|
description: "Send a new Telegram message to an arbitrary chat (agent-initiated, not a reply)",
|
|
@@ -43181,6 +43244,29 @@ mcp.setRequestHandler(CallToolRequestSchema, async (req) => {
|
|
|
43181
43244
|
return { content: [{ type: "text", text: `Telegram ${method} error: ${err.message}` }], isError: true };
|
|
43182
43245
|
}
|
|
43183
43246
|
}
|
|
43247
|
+
if (name === "telegram.consume") {
|
|
43248
|
+
const { chat_id, reason } = args;
|
|
43249
|
+
if (!chat_id) {
|
|
43250
|
+
return {
|
|
43251
|
+
content: [{ type: "text", text: "telegram.consume requires chat_id (from the <channel> tag)." }],
|
|
43252
|
+
isError: true
|
|
43253
|
+
};
|
|
43254
|
+
}
|
|
43255
|
+
const cutoffMs = Date.now();
|
|
43256
|
+
consumePendingMessage(chat_id, cutoffMs);
|
|
43257
|
+
process.stderr.write(
|
|
43258
|
+
`telegram-channel(${AGENT_CODE_NAME}): consumed chat=${redactId(chat_id)} cutoff=${new Date(cutoffMs).toISOString()} reason=${reason ? JSON.stringify(reason) : "(none given)"}
|
|
43259
|
+
`
|
|
43260
|
+
);
|
|
43261
|
+
return {
|
|
43262
|
+
content: [
|
|
43263
|
+
{
|
|
43264
|
+
type: "text",
|
|
43265
|
+
text: `Acknowledged chat ${chat_id} without replying. Its pending inbounds up to now are settled, so they will not be re-delivered. Anything that arrives from here is still delivered normally.`
|
|
43266
|
+
}
|
|
43267
|
+
]
|
|
43268
|
+
};
|
|
43269
|
+
}
|
|
43184
43270
|
if (name === "telegram.reply" || name === "telegram.send_message") {
|
|
43185
43271
|
const { chat_id, text, reply_to_message_id, interim } = args;
|
|
43186
43272
|
if (ALLOWED_CHATS.size > 0 && !ALLOWED_CHATS.has(chat_id)) {
|
|
@@ -46,8 +46,8 @@ import {
|
|
|
46
46
|
writeDirectChatSessionState,
|
|
47
47
|
writeEgressAllowlist,
|
|
48
48
|
writePersistentClaudeWrapper
|
|
49
|
-
} from "./chunk-
|
|
50
|
-
import "./chunk-
|
|
49
|
+
} from "./chunk-ATJU3SDV.js";
|
|
50
|
+
import "./chunk-IXGIGDJG.js";
|
|
51
51
|
import "./chunk-XWVM4KPK.js";
|
|
52
52
|
export {
|
|
53
53
|
EGRESS_BASELINE_DOMAINS,
|
|
@@ -98,4 +98,4 @@ export {
|
|
|
98
98
|
writeEgressAllowlist,
|
|
99
99
|
writePersistentClaudeWrapper
|
|
100
100
|
};
|
|
101
|
-
//# sourceMappingURL=persistent-session-
|
|
101
|
+
//# sourceMappingURL=persistent-session-CEC5KESY.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
paneLogPath
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-ATJU3SDV.js";
|
|
4
|
+
import "./chunk-IXGIGDJG.js";
|
|
5
5
|
import "./chunk-XWVM4KPK.js";
|
|
6
6
|
|
|
7
7
|
// src/lib/responsiveness-probe.ts
|
|
@@ -745,4 +745,4 @@ export {
|
|
|
745
745
|
readAndResetSlackReplyBindingClassifications,
|
|
746
746
|
readAndResetSlackReplyTargetClassifications
|
|
747
747
|
};
|
|
748
|
-
//# sourceMappingURL=responsiveness-probe-
|
|
748
|
+
//# sourceMappingURL=responsiveness-probe-J3VB4U4W.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
sessionTranscriptDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-IXGIGDJG.js";
|
|
4
4
|
|
|
5
5
|
// src/lib/session-auth-dead.ts
|
|
6
6
|
import { closeSync, openSync, readSync, readdirSync, statSync } from "fs";
|
|
@@ -203,4 +203,4 @@ export {
|
|
|
203
203
|
decideSessionAuthState,
|
|
204
204
|
probeSessionAuth
|
|
205
205
|
};
|
|
206
|
-
//# sourceMappingURL=session-auth-dead-
|
|
206
|
+
//# sourceMappingURL=session-auth-dead-YQHE3WKV.js.map
|