@integrity-labs/agt-cli 0.28.722 → 0.28.723
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-LWDPZWSO.js → chunk-ABM45AFN.js} +4 -4
- 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/{claude-pair-runtime-EKP2KR6N.js → claude-pair-runtime-XWPOUQMP.js} +2 -2
- package/dist/lib/manager-worker.js +13 -13
- 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-LWDPZWSO.js.map → chunk-ABM45AFN.js.map} +0 -0
- /package/dist/{chunk-E3WGN4GX.js.map → chunk-ATJU3SDV.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
|
@@ -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-CEC5KESY.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-XWPOUQMP.js.map
|
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
safeWriteJsonAtomic,
|
|
58
58
|
setConfigHash,
|
|
59
59
|
tripClass
|
|
60
|
-
} from "../chunk-
|
|
60
|
+
} from "../chunk-ABM45AFN.js";
|
|
61
61
|
import {
|
|
62
62
|
getProjectDir as getProjectDir2,
|
|
63
63
|
getReadyTasks,
|
|
@@ -115,7 +115,7 @@ import {
|
|
|
115
115
|
takeZombieDetection,
|
|
116
116
|
toOpencodeModel,
|
|
117
117
|
writeEgressAllowlist
|
|
118
|
-
} from "../chunk-
|
|
118
|
+
} from "../chunk-ATJU3SDV.js";
|
|
119
119
|
import {
|
|
120
120
|
ACCOUNT_ENFORCEMENT_MARKER_FILENAME,
|
|
121
121
|
AnchorSessionClient,
|
|
@@ -200,7 +200,7 @@ import {
|
|
|
200
200
|
subagentActivityAgeSeconds,
|
|
201
201
|
sumTranscriptUsageInWindow,
|
|
202
202
|
transcriptActivityAgeSeconds
|
|
203
|
-
} from "../chunk-
|
|
203
|
+
} from "../chunk-IXGIGDJG.js";
|
|
204
204
|
import {
|
|
205
205
|
reapOrphanChannelMcps
|
|
206
206
|
} from "../chunk-XWVM4KPK.js";
|
|
@@ -12184,7 +12184,7 @@ var pendingDayRolloverReset = /* @__PURE__ */ new Set();
|
|
|
12184
12184
|
var dayRolloverInboundHold = /* @__PURE__ */ new Map();
|
|
12185
12185
|
var INBOUND_HOLD_EPISODE_GAP_MS = 12e4;
|
|
12186
12186
|
async function channelInboundActivityAgeSecondsFor(codeName) {
|
|
12187
|
-
const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-
|
|
12187
|
+
const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-J3VB4U4W.js");
|
|
12188
12188
|
const newest = newestPendingInboundActivityMtimeMs(dirname10(paneLogPath(codeName)));
|
|
12189
12189
|
if (newest === null) return null;
|
|
12190
12190
|
return Math.max(0, Math.floor((Date.now() - newest) / 1e3));
|
|
@@ -12832,7 +12832,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
12832
12832
|
var lastVersionCheckAt = 0;
|
|
12833
12833
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
12834
12834
|
var lastResponsivenessProbeAt = 0;
|
|
12835
|
-
var agtCliVersion = true ? "0.28.
|
|
12835
|
+
var agtCliVersion = true ? "0.28.723" : "dev";
|
|
12836
12836
|
function resolveBrewPath(execFileSync3) {
|
|
12837
12837
|
try {
|
|
12838
12838
|
const out = execFileSync3("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -14359,7 +14359,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
|
|
|
14359
14359
|
if (codeNames.length === 0) return;
|
|
14360
14360
|
void (async () => {
|
|
14361
14361
|
try {
|
|
14362
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
14362
|
+
const { collectDiagnostics } = await import("../persistent-session-CEC5KESY.js");
|
|
14363
14363
|
await api.post("/host/heartbeat", {
|
|
14364
14364
|
host_id: hostId,
|
|
14365
14365
|
agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
|
|
@@ -14477,7 +14477,7 @@ async function pollCycleInner() {
|
|
|
14477
14477
|
}
|
|
14478
14478
|
try {
|
|
14479
14479
|
const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
|
|
14480
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
14480
|
+
const { collectDiagnostics } = await import("../persistent-session-CEC5KESY.js");
|
|
14481
14481
|
const diagCodeNames = [...agentState.persistentSessionAgents];
|
|
14482
14482
|
const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor) : void 0;
|
|
14483
14483
|
let tailscaleHostname;
|
|
@@ -14646,7 +14646,7 @@ async function pollCycleInner() {
|
|
|
14646
14646
|
collectPanelessActivityProbes,
|
|
14647
14647
|
getResponsivenessIntervalMs,
|
|
14648
14648
|
occupancyQualificationClassifications
|
|
14649
|
-
} = await import("../responsiveness-probe-
|
|
14649
|
+
} = await import("../responsiveness-probe-J3VB4U4W.js");
|
|
14650
14650
|
const probeIntervalMs = getResponsivenessIntervalMs();
|
|
14651
14651
|
if (now - lastResponsivenessProbeAt > probeIntervalMs) {
|
|
14652
14652
|
const probeCodeNames = [...agentState.persistentSessionAgents];
|
|
@@ -14756,7 +14756,7 @@ async function pollCycleInner() {
|
|
|
14756
14756
|
collectResponsivenessProbes,
|
|
14757
14757
|
livePendingInboundOldestAgeSeconds,
|
|
14758
14758
|
parkPendingInbound
|
|
14759
|
-
} = await import("../responsiveness-probe-
|
|
14759
|
+
} = await import("../responsiveness-probe-J3VB4U4W.js");
|
|
14760
14760
|
const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-NDP36U7O.js");
|
|
14761
14761
|
const wedgeNow = /* @__PURE__ */ new Date();
|
|
14762
14762
|
const liveAgents = agentState.persistentSessionAgents;
|
|
@@ -14912,7 +14912,7 @@ async function pollCycleInner() {
|
|
|
14912
14912
|
}
|
|
14913
14913
|
try {
|
|
14914
14914
|
const { scrapeMcpFailedBannerCount } = await import("../pane-mcp-banner-scraper-JA437JIB.js");
|
|
14915
|
-
const { probeSessionAuth } = await import("../session-auth-dead-
|
|
14915
|
+
const { probeSessionAuth } = await import("../session-auth-dead-YQHE3WKV.js");
|
|
14916
14916
|
const observations = [];
|
|
14917
14917
|
const pendingCacheCommits = [];
|
|
14918
14918
|
const modelApiErrorReportingOn = hostFlagStore().getBoolean("model-api-error-reporting");
|
|
@@ -18770,7 +18770,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
|
|
|
18770
18770
|
void api.post("/host/restart-ack", { host_id: hostId, agent_id: agentId, restart_requested_at: requestedAt }).catch((err) => log(`[restart-lane] ack failed for '${codeName}': ${err.message}`));
|
|
18771
18771
|
void (async () => {
|
|
18772
18772
|
try {
|
|
18773
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
18773
|
+
const { collectDiagnostics } = await import("../persistent-session-CEC5KESY.js");
|
|
18774
18774
|
await api.post("/host/heartbeat", {
|
|
18775
18775
|
host_id: hostId,
|
|
18776
18776
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
|
|
@@ -18821,7 +18821,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
|
|
|
18821
18821
|
}
|
|
18822
18822
|
try {
|
|
18823
18823
|
const hostId = await getHostId();
|
|
18824
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
18824
|
+
const { collectDiagnostics } = await import("../persistent-session-CEC5KESY.js");
|
|
18825
18825
|
await api.post("/host/heartbeat", {
|
|
18826
18826
|
host_id: hostId,
|
|
18827
18827
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
|
|
@@ -19453,7 +19453,7 @@ async function processClaudePairSessions(agents) {
|
|
|
19453
19453
|
killPairSession,
|
|
19454
19454
|
pairTmuxSession,
|
|
19455
19455
|
finalizeClaudePairOnboarding
|
|
19456
|
-
} = await import("../claude-pair-runtime-
|
|
19456
|
+
} = await import("../claude-pair-runtime-XWPOUQMP.js");
|
|
19457
19457
|
for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
|
|
19458
19458
|
log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
|
|
19459
19459
|
const killed = await killPairSession(pairTmuxSession(pairId));
|
|
@@ -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
|