@integrity-labs/agt-cli 0.28.731 → 0.28.733
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-QB6TIA3Z.js → chunk-7KT2QNXF.js} +2 -2
- package/dist/{chunk-BADE2W6M.js → chunk-IBBBIE4K.js} +25 -4
- package/dist/chunk-IBBBIE4K.js.map +1 -0
- package/dist/{chunk-YNIRFRQE.js → chunk-LT7UGH4O.js} +4 -4
- package/dist/{claude-pair-runtime-BZVFVAMR.js → claude-pair-runtime-K5OUT4QN.js} +2 -2
- package/dist/lib/manager-worker.js +13 -13
- package/dist/mcp/direct-chat-channel.js +63 -21
- package/dist/mcp/index.js +24 -3
- package/dist/mcp/origami.js +24 -3
- package/dist/mcp/slack-channel.js +24 -3
- package/dist/mcp/telegram-channel.js +50 -16
- package/dist/{persistent-session-BHJLZTYX.js → persistent-session-H7CP2TUX.js} +3 -3
- package/dist/{responsiveness-probe-457EYSWZ.js → responsiveness-probe-MPPDJSOL.js} +3 -3
- package/dist/{session-auth-dead-YUPZGR3F.js → session-auth-dead-TK3KNAH4.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-BADE2W6M.js.map +0 -1
- /package/dist/{chunk-QB6TIA3Z.js.map → chunk-7KT2QNXF.js.map} +0 -0
- /package/dist/{chunk-YNIRFRQE.js.map → chunk-LT7UGH4O.js.map} +0 -0
- /package/dist/{claude-pair-runtime-BZVFVAMR.js.map → claude-pair-runtime-K5OUT4QN.js.map} +0 -0
- /package/dist/{persistent-session-BHJLZTYX.js.map → persistent-session-H7CP2TUX.js.map} +0 -0
- /package/dist/{responsiveness-probe-457EYSWZ.js.map → responsiveness-probe-MPPDJSOL.js.map} +0 -0
- /package/dist/{session-auth-dead-YUPZGR3F.js.map → session-auth-dead-TK3KNAH4.js.map} +0 -0
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
parseEnvFileEntries,
|
|
14
14
|
parseEnvIntegrations,
|
|
15
15
|
shellQuote
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-7KT2QNXF.js";
|
|
17
17
|
import {
|
|
18
18
|
BIND_FAILURE_QUARANTINE_THRESHOLD,
|
|
19
19
|
INTEGRATIONS_SECTION_END,
|
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
sessionTranscriptDir,
|
|
63
63
|
worseConnectivityOutcome,
|
|
64
64
|
wrapScheduledTaskPrompt
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-IBBBIE4K.js";
|
|
66
66
|
import {
|
|
67
67
|
parsePsRows
|
|
68
68
|
} from "./chunk-XWVM4KPK.js";
|
|
@@ -6427,7 +6427,7 @@ function exchangeFailureKind(err) {
|
|
|
6427
6427
|
}
|
|
6428
6428
|
|
|
6429
6429
|
// src/lib/api-client.ts
|
|
6430
|
-
var agtCliVersion = true ? "0.28.
|
|
6430
|
+
var agtCliVersion = true ? "0.28.733" : "dev";
|
|
6431
6431
|
var lastConfigHash = null;
|
|
6432
6432
|
function setConfigHash(hash) {
|
|
6433
6433
|
lastConfigHash = hash && hash.length > 0 ? hash : null;
|
|
@@ -10473,4 +10473,4 @@ export {
|
|
|
10473
10473
|
managerInstallSystemUnitCommand,
|
|
10474
10474
|
managerUninstallSystemUnitCommand
|
|
10475
10475
|
};
|
|
10476
|
-
//# sourceMappingURL=chunk-
|
|
10476
|
+
//# sourceMappingURL=chunk-LT7UGH4O.js.map
|
|
@@ -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-H7CP2TUX.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-K5OUT4QN.js.map
|
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
safeWriteJsonAtomic,
|
|
58
58
|
setConfigHash,
|
|
59
59
|
tripClass
|
|
60
|
-
} from "../chunk-
|
|
60
|
+
} from "../chunk-LT7UGH4O.js";
|
|
61
61
|
import {
|
|
62
62
|
getProjectDir as getProjectDir2,
|
|
63
63
|
getReadyTasks,
|
|
@@ -118,7 +118,7 @@ import {
|
|
|
118
118
|
takeZombieDetection,
|
|
119
119
|
toOpencodeModel,
|
|
120
120
|
writeEgressAllowlist
|
|
121
|
-
} from "../chunk-
|
|
121
|
+
} from "../chunk-7KT2QNXF.js";
|
|
122
122
|
import {
|
|
123
123
|
ACCOUNT_ENFORCEMENT_MARKER_FILENAME,
|
|
124
124
|
AnchorSessionClient,
|
|
@@ -203,7 +203,7 @@ import {
|
|
|
203
203
|
subagentActivityAgeSeconds,
|
|
204
204
|
sumTranscriptUsageInWindow,
|
|
205
205
|
transcriptActivityAgeSeconds
|
|
206
|
-
} from "../chunk-
|
|
206
|
+
} from "../chunk-IBBBIE4K.js";
|
|
207
207
|
import {
|
|
208
208
|
reapOrphanChannelMcps
|
|
209
209
|
} from "../chunk-XWVM4KPK.js";
|
|
@@ -12347,7 +12347,7 @@ var pendingDayRolloverReset = /* @__PURE__ */ new Set();
|
|
|
12347
12347
|
var dayRolloverInboundHold = /* @__PURE__ */ new Map();
|
|
12348
12348
|
var INBOUND_HOLD_EPISODE_GAP_MS = 12e4;
|
|
12349
12349
|
async function channelInboundActivityAgeSecondsFor(codeName) {
|
|
12350
|
-
const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-
|
|
12350
|
+
const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-MPPDJSOL.js");
|
|
12351
12351
|
const newest = newestPendingInboundActivityMtimeMs(dirname10(paneLogPath(codeName)));
|
|
12352
12352
|
if (newest === null) return null;
|
|
12353
12353
|
return Math.max(0, Math.floor((Date.now() - newest) / 1e3));
|
|
@@ -12995,7 +12995,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
12995
12995
|
var lastVersionCheckAt = 0;
|
|
12996
12996
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
12997
12997
|
var lastResponsivenessProbeAt = 0;
|
|
12998
|
-
var agtCliVersion = true ? "0.28.
|
|
12998
|
+
var agtCliVersion = true ? "0.28.733" : "dev";
|
|
12999
12999
|
function resolveBrewPath(execFileSync3) {
|
|
13000
13000
|
try {
|
|
13001
13001
|
const out = execFileSync3("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -14522,7 +14522,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
|
|
|
14522
14522
|
if (codeNames.length === 0) return;
|
|
14523
14523
|
void (async () => {
|
|
14524
14524
|
try {
|
|
14525
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
14525
|
+
const { collectDiagnostics } = await import("../persistent-session-H7CP2TUX.js");
|
|
14526
14526
|
await api.post("/host/heartbeat", {
|
|
14527
14527
|
host_id: hostId,
|
|
14528
14528
|
agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
|
|
@@ -14663,7 +14663,7 @@ async function pollCycleInner() {
|
|
|
14663
14663
|
}
|
|
14664
14664
|
try {
|
|
14665
14665
|
const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
|
|
14666
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
14666
|
+
const { collectDiagnostics } = await import("../persistent-session-H7CP2TUX.js");
|
|
14667
14667
|
const diagCodeNames = [...agentState.persistentSessionAgents];
|
|
14668
14668
|
const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor) : void 0;
|
|
14669
14669
|
let tailscaleHostname;
|
|
@@ -14832,7 +14832,7 @@ async function pollCycleInner() {
|
|
|
14832
14832
|
collectPanelessActivityProbes,
|
|
14833
14833
|
getResponsivenessIntervalMs,
|
|
14834
14834
|
occupancyQualificationClassifications
|
|
14835
|
-
} = await import("../responsiveness-probe-
|
|
14835
|
+
} = await import("../responsiveness-probe-MPPDJSOL.js");
|
|
14836
14836
|
const probeIntervalMs = getResponsivenessIntervalMs();
|
|
14837
14837
|
if (now - lastResponsivenessProbeAt > probeIntervalMs) {
|
|
14838
14838
|
const probeCodeNames = [...agentState.persistentSessionAgents];
|
|
@@ -14942,7 +14942,7 @@ async function pollCycleInner() {
|
|
|
14942
14942
|
collectResponsivenessProbes,
|
|
14943
14943
|
livePendingInboundOldestAgeSeconds,
|
|
14944
14944
|
parkPendingInbound
|
|
14945
|
-
} = await import("../responsiveness-probe-
|
|
14945
|
+
} = await import("../responsiveness-probe-MPPDJSOL.js");
|
|
14946
14946
|
const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-NDP36U7O.js");
|
|
14947
14947
|
const wedgeNow = /* @__PURE__ */ new Date();
|
|
14948
14948
|
const liveAgents = agentState.persistentSessionAgents;
|
|
@@ -15098,7 +15098,7 @@ async function pollCycleInner() {
|
|
|
15098
15098
|
}
|
|
15099
15099
|
try {
|
|
15100
15100
|
const { scrapeMcpFailedBannerCount } = await import("../pane-mcp-banner-scraper-JA437JIB.js");
|
|
15101
|
-
const { probeSessionAuth } = await import("../session-auth-dead-
|
|
15101
|
+
const { probeSessionAuth } = await import("../session-auth-dead-TK3KNAH4.js");
|
|
15102
15102
|
const observations = [];
|
|
15103
15103
|
const pendingCacheCommits = [];
|
|
15104
15104
|
const modelApiErrorReportingOn = hostFlagStore().getBoolean("model-api-error-reporting");
|
|
@@ -19009,7 +19009,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
|
|
|
19009
19009
|
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}`));
|
|
19010
19010
|
void (async () => {
|
|
19011
19011
|
try {
|
|
19012
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
19012
|
+
const { collectDiagnostics } = await import("../persistent-session-H7CP2TUX.js");
|
|
19013
19013
|
await api.post("/host/heartbeat", {
|
|
19014
19014
|
host_id: hostId,
|
|
19015
19015
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
|
|
@@ -19055,7 +19055,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
|
|
|
19055
19055
|
}
|
|
19056
19056
|
try {
|
|
19057
19057
|
const hostId = await getHostId();
|
|
19058
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
19058
|
+
const { collectDiagnostics } = await import("../persistent-session-H7CP2TUX.js");
|
|
19059
19059
|
await api.post("/host/heartbeat", {
|
|
19060
19060
|
host_id: hostId,
|
|
19061
19061
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
|
|
@@ -19687,7 +19687,7 @@ async function processClaudePairSessions(agents) {
|
|
|
19687
19687
|
killPairSession,
|
|
19688
19688
|
pairTmuxSession,
|
|
19689
19689
|
finalizeClaudePairOnboarding
|
|
19690
|
-
} = await import("../claude-pair-runtime-
|
|
19690
|
+
} = await import("../claude-pair-runtime-K5OUT4QN.js");
|
|
19691
19691
|
for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
|
|
19692
19692
|
log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
|
|
19693
19693
|
const killed = await killPairSession(pairTmuxSession(pairId));
|
|
@@ -29878,11 +29878,19 @@ function buildDirectChatChannelMeta(input) {
|
|
|
29878
29878
|
if (input.userName) identity.user_name = input.userName;
|
|
29879
29879
|
if (input.userEmail) identity.user_email = input.userEmail;
|
|
29880
29880
|
if (input.userRole) identity.user_role = input.userRole;
|
|
29881
|
+
const page = {};
|
|
29882
|
+
if (input.pageSlug) page.page_slug = input.pageSlug;
|
|
29883
|
+
if (input.pageTitle) page.page_title = input.pageTitle;
|
|
29884
|
+
if (input.pageUrl) page.page_url = input.pageUrl;
|
|
29885
|
+
if (input.pageContentUrl) page.page_content_url = input.pageContentUrl;
|
|
29886
|
+
if (input.pageArtefactId) page.page_artefact_id = input.pageArtefactId;
|
|
29887
|
+
if (input.pageGated != null) page.page_gated = input.pageGated ? "true" : "false";
|
|
29881
29888
|
return {
|
|
29882
29889
|
session_id: input.sessionId,
|
|
29883
29890
|
user: "webapp",
|
|
29884
29891
|
source: "direct-chat",
|
|
29885
29892
|
...identity,
|
|
29893
|
+
...page,
|
|
29886
29894
|
// String flag the agent's channel instructions (and the renderer) read:
|
|
29887
29895
|
// 'false' = notice (do not reply), 'true' = normal message (reply expected).
|
|
29888
29896
|
requires_reply: input.isNotice ? "false" : "true",
|
|
@@ -31876,7 +31884,11 @@ var ORG_ROLE_PERMISSIONS = {
|
|
|
31876
31884
|
"org.manage_teams",
|
|
31877
31885
|
"org.manage_guardrails",
|
|
31878
31886
|
"org.manage_integrations",
|
|
31879
|
-
"org.view_audit_log"
|
|
31887
|
+
"org.view_audit_log",
|
|
31888
|
+
// ENG-9486 (ADR-0074). Authoring is owner+admin, matching every other action
|
|
31889
|
+
// that can write a secret or change what an org is billed for.
|
|
31890
|
+
"org.manage_model_policies",
|
|
31891
|
+
"org.assign_model_policies"
|
|
31880
31892
|
],
|
|
31881
31893
|
admin: [
|
|
31882
31894
|
"org.manage_settings",
|
|
@@ -31884,7 +31896,9 @@ var ORG_ROLE_PERMISSIONS = {
|
|
|
31884
31896
|
"org.manage_teams",
|
|
31885
31897
|
"org.manage_guardrails",
|
|
31886
31898
|
"org.manage_integrations",
|
|
31887
|
-
"org.view_audit_log"
|
|
31899
|
+
"org.view_audit_log",
|
|
31900
|
+
"org.manage_model_policies",
|
|
31901
|
+
"org.assign_model_policies"
|
|
31888
31902
|
],
|
|
31889
31903
|
member: [
|
|
31890
31904
|
"org.manage_teams",
|
|
@@ -36577,7 +36591,22 @@ var FLAG_REGISTRY = [
|
|
|
36577
36591
|
// seeding code, so `listNewOrgFlagOverrides()` is the one answer to "which flags
|
|
36578
36592
|
// does a new org get". `defaultValue` stays false so the ~4 months of orgs already
|
|
36579
36593
|
// carrying an inert enforce-level email.require_approval row are NOT armed on deploy.
|
|
36580
|
-
newOrgOverride: true
|
|
36594
|
+
newOrgOverride: true,
|
|
36595
|
+
// ENG-9630: API-created organizations only, and this is a deliberate,
|
|
36596
|
+
// reviewed asymmetry rather than an oversight.
|
|
36597
|
+
//
|
|
36598
|
+
// Arming this holds EVERY dispatching send for human approval. The hold
|
|
36599
|
+
// itself works fine on a self-serve org — `hitl-approval-routing` has
|
|
36600
|
+
// defaulted to 'on' since ENG-7828, so a real Human Approval card is minted
|
|
36601
|
+
// and it is actionable at /organization/approvals. What a self-serve org
|
|
36602
|
+
// does NOT have is any means of being TOLD: no Slack alert channel is wired
|
|
36603
|
+
// at signup, so the card sits in a console surface nobody has pointed the
|
|
36604
|
+
// user at, and their agent's first email silently waits on it.
|
|
36605
|
+
//
|
|
36606
|
+
// So the blocker is the notification path, not the control. Whoever revisits
|
|
36607
|
+
// this should treat "a self-serve org actually receives the card" as the
|
|
36608
|
+
// prerequisite and then drop this line — do not simply widen it.
|
|
36609
|
+
newOrgOverrideOrigins: ["api"]
|
|
36581
36610
|
},
|
|
36582
36611
|
{
|
|
36583
36612
|
key: "mail-rule-control-enforcement",
|
|
@@ -38165,6 +38194,20 @@ async function readCursorAdvanceBody(res) {
|
|
|
38165
38194
|
};
|
|
38166
38195
|
}
|
|
38167
38196
|
|
|
38197
|
+
// src/direct-chat-mcp-instructions.ts
|
|
38198
|
+
function buildDirectChatMcpInstructions() {
|
|
38199
|
+
return [
|
|
38200
|
+
"CRITICAL: every response to a direct-chat <channel> tag MUST go through direct_chat.reply (passing the session_id verbatim). Text in your session WITHOUT a direct_chat.reply call never reaches the operator \u2014 the reply dies inside the agent process.",
|
|
38201
|
+
'Messages from the webapp Direct Chat arrive as <channel source="direct-chat" session_id="..." user="...">.',
|
|
38202
|
+
"When the tag carries user_name (and sometimes user_email / user_role), that is the verified human you are talking with; address them by name and tailor your reply to who they are. If those attributes are absent, the sender is unknown, so just reply helpfully without personalization.",
|
|
38203
|
+
"Reply using the direct_chat.reply tool, passing the session_id from the tag.",
|
|
38204
|
+
"Always reply to every direct chat message that expects a reply (its meta has requires_reply=true, or no requires_reply field) \u2014 the user is waiting in the webapp.",
|
|
38205
|
+
"NEVER call direct_chat.reply for a NOTICE \u2014 a notification whose meta has requires_reply=false (ENG-6381). It is an informational FYI (e.g. an integration-status update), not a question, and it has ALREADY been acknowledged for you. Replying would wrongly post into the operator\u2019s chat history and burn a turn. Just take it into account and carry on.",
|
|
38206
|
+
"In the rare case you deliberately handle a reply-expecting message without replying (e.g. an internal command), call direct_chat.consume with the session_id so it is not treated as undelivered and redelivered.",
|
|
38207
|
+
"Keep replies concise and helpful. You have full access to all your MCP tools."
|
|
38208
|
+
].join(" ");
|
|
38209
|
+
}
|
|
38210
|
+
|
|
38168
38211
|
// src/usage-limit-reactive-decision.ts
|
|
38169
38212
|
import { createHash } from "crypto";
|
|
38170
38213
|
function shouldArmWatch(opts) {
|
|
@@ -38531,23 +38574,12 @@ var mcp = new Server(
|
|
|
38531
38574
|
experimental: { "claude/channel": {} },
|
|
38532
38575
|
tools: {}
|
|
38533
38576
|
},
|
|
38534
|
-
|
|
38535
|
-
|
|
38536
|
-
|
|
38537
|
-
|
|
38538
|
-
|
|
38539
|
-
|
|
38540
|
-
// ENG-5830. Total instructions string is ~850 / 2048 chars so we
|
|
38541
|
-
// have room to be explicit.
|
|
38542
|
-
"CRITICAL: every response to a direct-chat <channel> tag MUST go through direct_chat.reply (passing the session_id verbatim). Text in your session WITHOUT a direct_chat.reply call never reaches the operator \u2014 the reply dies inside the agent process.",
|
|
38543
|
-
'Messages from the webapp Direct Chat arrive as <channel source="direct-chat" session_id="..." user="...">.',
|
|
38544
|
-
"When the tag carries user_name (and sometimes user_email / user_role), that is the verified human you are talking with; address them by name and tailor your reply to who they are. If those attributes are absent, the sender is unknown, so just reply helpfully without personalization.",
|
|
38545
|
-
"Reply using the direct_chat.reply tool, passing the session_id from the tag.",
|
|
38546
|
-
"Always reply to every direct chat message that expects a reply (its meta has requires_reply=true, or no requires_reply field) \u2014 the user is waiting in the webapp.",
|
|
38547
|
-
"NEVER call direct_chat.reply for a NOTICE \u2014 a notification whose meta has requires_reply=false (ENG-6381). It is an informational FYI (e.g. an integration-status update), not a question, and it has ALREADY been acknowledged for you. Replying would wrongly post into the operator\u2019s chat history and burn a turn. Just take it into account and carry on.",
|
|
38548
|
-
"In the rare case you deliberately handle a reply-expecting message without replying (e.g. an internal command), call direct_chat.consume with the session_id so it is not treated as undelivered and redelivered.",
|
|
38549
|
-
"Keep replies concise and helpful. You have full access to all your MCP tools."
|
|
38550
|
-
].join(" ")
|
|
38577
|
+
// NOTE: Claude Code truncates MCP server instructions at 2048 chars.
|
|
38578
|
+
// ENG-9649: built by a pure, length-tested builder
|
|
38579
|
+
// (direct-chat-mcp-instructions.ts). The budget used to be tracked in a
|
|
38580
|
+
// comment here, which had drifted 668 chars out of date without anything
|
|
38581
|
+
// noticing.
|
|
38582
|
+
instructions: buildDirectChatMcpInstructions()
|
|
38551
38583
|
}
|
|
38552
38584
|
);
|
|
38553
38585
|
var claimTracker = new DirectChatClaimTracker();
|
|
@@ -39196,7 +39228,17 @@ async function pollForMessages(sinceMs) {
|
|
|
39196
39228
|
// ENG-8047: pure passthrough of the server-resolved human identity.
|
|
39197
39229
|
userName: msg.sender_name,
|
|
39198
39230
|
userEmail: msg.sender_email,
|
|
39199
|
-
userRole: msg.sender_role
|
|
39231
|
+
userRole: msg.sender_role,
|
|
39232
|
+
// ENG-9518: pure passthrough, same as the identity block. The
|
|
39233
|
+
// server already decided what this agent may know about the page,
|
|
39234
|
+
// including withholding the content URL on a gated page it does
|
|
39235
|
+
// not own, so there is nothing left to judge here.
|
|
39236
|
+
pageArtefactId: msg.page_context?.artefact_id ?? null,
|
|
39237
|
+
pageSlug: msg.page_context?.slug ?? null,
|
|
39238
|
+
pageTitle: msg.page_context?.title ?? null,
|
|
39239
|
+
pageUrl: msg.page_context?.live_url ?? null,
|
|
39240
|
+
pageContentUrl: msg.page_context?.content_url ?? null,
|
|
39241
|
+
pageGated: msg.page_context?.gated ?? null
|
|
39200
39242
|
}),
|
|
39201
39243
|
...attachmentMeta
|
|
39202
39244
|
}
|
package/dist/mcp/index.js
CHANGED
|
@@ -39276,7 +39276,11 @@ var ORG_ROLE_PERMISSIONS = {
|
|
|
39276
39276
|
"org.manage_teams",
|
|
39277
39277
|
"org.manage_guardrails",
|
|
39278
39278
|
"org.manage_integrations",
|
|
39279
|
-
"org.view_audit_log"
|
|
39279
|
+
"org.view_audit_log",
|
|
39280
|
+
// ENG-9486 (ADR-0074). Authoring is owner+admin, matching every other action
|
|
39281
|
+
// that can write a secret or change what an org is billed for.
|
|
39282
|
+
"org.manage_model_policies",
|
|
39283
|
+
"org.assign_model_policies"
|
|
39280
39284
|
],
|
|
39281
39285
|
admin: [
|
|
39282
39286
|
"org.manage_settings",
|
|
@@ -39284,7 +39288,9 @@ var ORG_ROLE_PERMISSIONS = {
|
|
|
39284
39288
|
"org.manage_teams",
|
|
39285
39289
|
"org.manage_guardrails",
|
|
39286
39290
|
"org.manage_integrations",
|
|
39287
|
-
"org.view_audit_log"
|
|
39291
|
+
"org.view_audit_log",
|
|
39292
|
+
"org.manage_model_policies",
|
|
39293
|
+
"org.assign_model_policies"
|
|
39288
39294
|
],
|
|
39289
39295
|
member: [
|
|
39290
39296
|
"org.manage_teams",
|
|
@@ -43538,7 +43544,22 @@ var FLAG_REGISTRY = [
|
|
|
43538
43544
|
// seeding code, so `listNewOrgFlagOverrides()` is the one answer to "which flags
|
|
43539
43545
|
// does a new org get". `defaultValue` stays false so the ~4 months of orgs already
|
|
43540
43546
|
// carrying an inert enforce-level email.require_approval row are NOT armed on deploy.
|
|
43541
|
-
newOrgOverride: true
|
|
43547
|
+
newOrgOverride: true,
|
|
43548
|
+
// ENG-9630: API-created organizations only, and this is a deliberate,
|
|
43549
|
+
// reviewed asymmetry rather than an oversight.
|
|
43550
|
+
//
|
|
43551
|
+
// Arming this holds EVERY dispatching send for human approval. The hold
|
|
43552
|
+
// itself works fine on a self-serve org — `hitl-approval-routing` has
|
|
43553
|
+
// defaulted to 'on' since ENG-7828, so a real Human Approval card is minted
|
|
43554
|
+
// and it is actionable at /organization/approvals. What a self-serve org
|
|
43555
|
+
// does NOT have is any means of being TOLD: no Slack alert channel is wired
|
|
43556
|
+
// at signup, so the card sits in a console surface nobody has pointed the
|
|
43557
|
+
// user at, and their agent's first email silently waits on it.
|
|
43558
|
+
//
|
|
43559
|
+
// So the blocker is the notification path, not the control. Whoever revisits
|
|
43560
|
+
// this should treat "a self-serve org actually receives the card" as the
|
|
43561
|
+
// prerequisite and then drop this line — do not simply widen it.
|
|
43562
|
+
newOrgOverrideOrigins: ["api"]
|
|
43542
43563
|
},
|
|
43543
43564
|
{
|
|
43544
43565
|
key: "mail-rule-control-enforcement",
|
package/dist/mcp/origami.js
CHANGED
|
@@ -38068,7 +38068,11 @@ var ORG_ROLE_PERMISSIONS = {
|
|
|
38068
38068
|
"org.manage_teams",
|
|
38069
38069
|
"org.manage_guardrails",
|
|
38070
38070
|
"org.manage_integrations",
|
|
38071
|
-
"org.view_audit_log"
|
|
38071
|
+
"org.view_audit_log",
|
|
38072
|
+
// ENG-9486 (ADR-0074). Authoring is owner+admin, matching every other action
|
|
38073
|
+
// that can write a secret or change what an org is billed for.
|
|
38074
|
+
"org.manage_model_policies",
|
|
38075
|
+
"org.assign_model_policies"
|
|
38072
38076
|
],
|
|
38073
38077
|
admin: [
|
|
38074
38078
|
"org.manage_settings",
|
|
@@ -38076,7 +38080,9 @@ var ORG_ROLE_PERMISSIONS = {
|
|
|
38076
38080
|
"org.manage_teams",
|
|
38077
38081
|
"org.manage_guardrails",
|
|
38078
38082
|
"org.manage_integrations",
|
|
38079
|
-
"org.view_audit_log"
|
|
38083
|
+
"org.view_audit_log",
|
|
38084
|
+
"org.manage_model_policies",
|
|
38085
|
+
"org.assign_model_policies"
|
|
38080
38086
|
],
|
|
38081
38087
|
member: [
|
|
38082
38088
|
"org.manage_teams",
|
|
@@ -42309,7 +42315,22 @@ var FLAG_REGISTRY = [
|
|
|
42309
42315
|
// seeding code, so `listNewOrgFlagOverrides()` is the one answer to "which flags
|
|
42310
42316
|
// does a new org get". `defaultValue` stays false so the ~4 months of orgs already
|
|
42311
42317
|
// carrying an inert enforce-level email.require_approval row are NOT armed on deploy.
|
|
42312
|
-
newOrgOverride: true
|
|
42318
|
+
newOrgOverride: true,
|
|
42319
|
+
// ENG-9630: API-created organizations only, and this is a deliberate,
|
|
42320
|
+
// reviewed asymmetry rather than an oversight.
|
|
42321
|
+
//
|
|
42322
|
+
// Arming this holds EVERY dispatching send for human approval. The hold
|
|
42323
|
+
// itself works fine on a self-serve org — `hitl-approval-routing` has
|
|
42324
|
+
// defaulted to 'on' since ENG-7828, so a real Human Approval card is minted
|
|
42325
|
+
// and it is actionable at /organization/approvals. What a self-serve org
|
|
42326
|
+
// does NOT have is any means of being TOLD: no Slack alert channel is wired
|
|
42327
|
+
// at signup, so the card sits in a console surface nobody has pointed the
|
|
42328
|
+
// user at, and their agent's first email silently waits on it.
|
|
42329
|
+
//
|
|
42330
|
+
// So the blocker is the notification path, not the control. Whoever revisits
|
|
42331
|
+
// this should treat "a self-serve org actually receives the card" as the
|
|
42332
|
+
// prerequisite and then drop this line — do not simply widen it.
|
|
42333
|
+
newOrgOverrideOrigins: ["api"]
|
|
42313
42334
|
},
|
|
42314
42335
|
{
|
|
42315
42336
|
key: "mail-rule-control-enforcement",
|
|
@@ -32175,7 +32175,11 @@ var ORG_ROLE_PERMISSIONS = {
|
|
|
32175
32175
|
"org.manage_teams",
|
|
32176
32176
|
"org.manage_guardrails",
|
|
32177
32177
|
"org.manage_integrations",
|
|
32178
|
-
"org.view_audit_log"
|
|
32178
|
+
"org.view_audit_log",
|
|
32179
|
+
// ENG-9486 (ADR-0074). Authoring is owner+admin, matching every other action
|
|
32180
|
+
// that can write a secret or change what an org is billed for.
|
|
32181
|
+
"org.manage_model_policies",
|
|
32182
|
+
"org.assign_model_policies"
|
|
32179
32183
|
],
|
|
32180
32184
|
admin: [
|
|
32181
32185
|
"org.manage_settings",
|
|
@@ -32183,7 +32187,9 @@ var ORG_ROLE_PERMISSIONS = {
|
|
|
32183
32187
|
"org.manage_teams",
|
|
32184
32188
|
"org.manage_guardrails",
|
|
32185
32189
|
"org.manage_integrations",
|
|
32186
|
-
"org.view_audit_log"
|
|
32190
|
+
"org.view_audit_log",
|
|
32191
|
+
"org.manage_model_policies",
|
|
32192
|
+
"org.assign_model_policies"
|
|
32187
32193
|
],
|
|
32188
32194
|
member: [
|
|
32189
32195
|
"org.manage_teams",
|
|
@@ -36829,7 +36835,22 @@ var FLAG_REGISTRY = [
|
|
|
36829
36835
|
// seeding code, so `listNewOrgFlagOverrides()` is the one answer to "which flags
|
|
36830
36836
|
// does a new org get". `defaultValue` stays false so the ~4 months of orgs already
|
|
36831
36837
|
// carrying an inert enforce-level email.require_approval row are NOT armed on deploy.
|
|
36832
|
-
newOrgOverride: true
|
|
36838
|
+
newOrgOverride: true,
|
|
36839
|
+
// ENG-9630: API-created organizations only, and this is a deliberate,
|
|
36840
|
+
// reviewed asymmetry rather than an oversight.
|
|
36841
|
+
//
|
|
36842
|
+
// Arming this holds EVERY dispatching send for human approval. The hold
|
|
36843
|
+
// itself works fine on a self-serve org — `hitl-approval-routing` has
|
|
36844
|
+
// defaulted to 'on' since ENG-7828, so a real Human Approval card is minted
|
|
36845
|
+
// and it is actionable at /organization/approvals. What a self-serve org
|
|
36846
|
+
// does NOT have is any means of being TOLD: no Slack alert channel is wired
|
|
36847
|
+
// at signup, so the card sits in a console surface nobody has pointed the
|
|
36848
|
+
// user at, and their agent's first email silently waits on it.
|
|
36849
|
+
//
|
|
36850
|
+
// So the blocker is the notification path, not the control. Whoever revisits
|
|
36851
|
+
// this should treat "a self-serve org actually receives the card" as the
|
|
36852
|
+
// prerequisite and then drop this line — do not simply widen it.
|
|
36853
|
+
newOrgOverrideOrigins: ["api"]
|
|
36833
36854
|
},
|
|
36834
36855
|
{
|
|
36835
36856
|
key: "mail-rule-control-enforcement",
|
|
@@ -32337,7 +32337,11 @@ var ORG_ROLE_PERMISSIONS = {
|
|
|
32337
32337
|
"org.manage_teams",
|
|
32338
32338
|
"org.manage_guardrails",
|
|
32339
32339
|
"org.manage_integrations",
|
|
32340
|
-
"org.view_audit_log"
|
|
32340
|
+
"org.view_audit_log",
|
|
32341
|
+
// ENG-9486 (ADR-0074). Authoring is owner+admin, matching every other action
|
|
32342
|
+
// that can write a secret or change what an org is billed for.
|
|
32343
|
+
"org.manage_model_policies",
|
|
32344
|
+
"org.assign_model_policies"
|
|
32341
32345
|
],
|
|
32342
32346
|
admin: [
|
|
32343
32347
|
"org.manage_settings",
|
|
@@ -32345,7 +32349,9 @@ var ORG_ROLE_PERMISSIONS = {
|
|
|
32345
32349
|
"org.manage_teams",
|
|
32346
32350
|
"org.manage_guardrails",
|
|
32347
32351
|
"org.manage_integrations",
|
|
32348
|
-
"org.view_audit_log"
|
|
32352
|
+
"org.view_audit_log",
|
|
32353
|
+
"org.manage_model_policies",
|
|
32354
|
+
"org.assign_model_policies"
|
|
32349
32355
|
],
|
|
32350
32356
|
member: [
|
|
32351
32357
|
"org.manage_teams",
|
|
@@ -36985,7 +36991,22 @@ var FLAG_REGISTRY = [
|
|
|
36985
36991
|
// seeding code, so `listNewOrgFlagOverrides()` is the one answer to "which flags
|
|
36986
36992
|
// does a new org get". `defaultValue` stays false so the ~4 months of orgs already
|
|
36987
36993
|
// carrying an inert enforce-level email.require_approval row are NOT armed on deploy.
|
|
36988
|
-
newOrgOverride: true
|
|
36994
|
+
newOrgOverride: true,
|
|
36995
|
+
// ENG-9630: API-created organizations only, and this is a deliberate,
|
|
36996
|
+
// reviewed asymmetry rather than an oversight.
|
|
36997
|
+
//
|
|
36998
|
+
// Arming this holds EVERY dispatching send for human approval. The hold
|
|
36999
|
+
// itself works fine on a self-serve org — `hitl-approval-routing` has
|
|
37000
|
+
// defaulted to 'on' since ENG-7828, so a real Human Approval card is minted
|
|
37001
|
+
// and it is actionable at /organization/approvals. What a self-serve org
|
|
37002
|
+
// does NOT have is any means of being TOLD: no Slack alert channel is wired
|
|
37003
|
+
// at signup, so the card sits in a console surface nobody has pointed the
|
|
37004
|
+
// user at, and their agent's first email silently waits on it.
|
|
37005
|
+
//
|
|
37006
|
+
// So the blocker is the notification path, not the control. Whoever revisits
|
|
37007
|
+
// this should treat "a self-serve org actually receives the card" as the
|
|
37008
|
+
// prerequisite and then drop this line — do not simply widen it.
|
|
37009
|
+
newOrgOverrideOrigins: ["api"]
|
|
36989
37010
|
},
|
|
36990
37011
|
{
|
|
36991
37012
|
key: "mail-rule-control-enforcement",
|
|
@@ -40533,6 +40554,24 @@ async function actuateHostRestart(opts) {
|
|
|
40533
40554
|
}
|
|
40534
40555
|
}
|
|
40535
40556
|
|
|
40557
|
+
// src/telegram-mcp-instructions.ts
|
|
40558
|
+
var MAX_SKIP_REACTION_UNITS = 8;
|
|
40559
|
+
var REACT_POLICY = `Reacting is egress and does NOT settle anything \u2014 telegram.consume is what settles. Never react in a chat you are barred from, and never post a "this wasn't for me" message.`;
|
|
40560
|
+
function buildTelegramMcpInstructions(opts) {
|
|
40561
|
+
const emoji2 = opts.skipReaction ?? "";
|
|
40562
|
+
const skipReactionOn = opts.skipReactionOn && emoji2.length > 0 && emoji2.length <= MAX_SKIP_REACTION_UNITS;
|
|
40563
|
+
return [
|
|
40564
|
+
"CRITICAL: every response to a Telegram <channel> tag MUST go through telegram.reply with the chat_id from the tag \u2014 typed text never reaches the user. Slow work: interim ack (telegram.reply interim:true), then your FINAL answer as a separate telegram.reply (interim omitted). An ack is not the answer.",
|
|
40565
|
+
'Messages from Telegram arrive as <channel source="telegram" chat_id="..." user="..." user_name="..." message_id="...">. Pass reply_to_message_id from the tag so the response lands as a quote-reply in busy chats.',
|
|
40566
|
+
"Deliberately NOT replying (a standing rule bars you from that chat, or the message only changed state)? Call telegram.consume with the chat_id and a short reason: it settles the message without posting anything. Without a reply or a consume it counts as undelivered and re-delivers to you forever.",
|
|
40567
|
+
"Inbound attachments: `files` on the tag is a JSON string \u2014 JSON.parse it. An entry with `path` (or top-level `image_path`) is already downloaded \u2014 Read it. Entries with `file_id` and no `path` need telegram.download_attachment (file_id + chat_id), then Read the returned path.",
|
|
40568
|
+
'For work >30s follow the CLAUDE.md kanban flow: kanban_add \u2192 reply "On it \u2014 tracking here: <kanban URL>" \u2192 in_progress \u2192 reply the result. Simple lookups skip kanban but still reply.',
|
|
40569
|
+
"Address users by user_name; user is the numeric Telegram ID. Resolve ambiguous times against your own Timezone from CLAUDE.md \u2014 do not ask.",
|
|
40570
|
+
"Reactions (telegram.react sparingly \u2014 prefer a reply): \u{1F440} = ack (auto-added, do not duplicate); \u{1F44D} or \u{1F389} = success." + (skipReactionOn ? ` ${emoji2} = seen, not replying.` : "") + " NEVER react to signal failure of YOUR work \u2014 telegram.reply one sentence explaining it. Free-tier emoji only: \u{1F44D} \u{1F44E} \u2764 \u{1F525} \u{1F389} \u{1F64F} \u{1F44C} \u{1F440} \u{1F4AF} \u{1FAE1}.",
|
|
40571
|
+
skipReactionOn ? `${REACT_POLICY} Where engaging IS permitted you may also telegram.react "${emoji2}" after consuming.` : REACT_POLICY
|
|
40572
|
+
].filter(Boolean).join(" ");
|
|
40573
|
+
}
|
|
40574
|
+
|
|
40536
40575
|
// src/telegram-channel.ts
|
|
40537
40576
|
function redactId(id) {
|
|
40538
40577
|
return createHash3("sha256").update(String(id)).digest("hex").slice(0, 8);
|
|
@@ -42953,19 +42992,14 @@ var mcp = new Server(
|
|
|
42953
42992
|
tools: {}
|
|
42954
42993
|
},
|
|
42955
42994
|
// NOTE: Claude Code truncates MCP server instructions at 2048 chars.
|
|
42956
|
-
//
|
|
42957
|
-
//
|
|
42958
|
-
|
|
42959
|
-
|
|
42960
|
-
|
|
42961
|
-
|
|
42962
|
-
|
|
42963
|
-
|
|
42964
|
-
'For work >30s follow CLAUDE.md kanban flow: kanban_add \u2192 reply "On it \u2014 tracking here: <kanban URL>" \u2192 move to in_progress \u2192 do the work \u2192 reply with the result. Simple lookups skip kanban but still reply.',
|
|
42965
|
-
"Address users by user_name; user is the numeric Telegram ID. Resolve ambiguous times against your own Timezone from CLAUDE.md \u2014 do not ask.",
|
|
42966
|
-
"Reaction taxonomy (use telegram.react sparingly \u2014 prefer telegram.reply): \u{1F440} = ack (already auto-added on inbound, do not duplicate); \u{1F44D} or \u{1F389} = success." + (SKIP_REACTION_ON ? ` ${TELEGRAM_SKIP_REACTION} = seen but not replying (see below).` : "") + ` NEVER react to signal failure of YOUR work. On failure, telegram.reply with one sentence explaining what went wrong. Free-tier emoji: \u{1F44D} \u{1F44E} \u2764 \u{1F525} \u{1F389} \u{1F914} \u{1F92F} \u{1F64F} \u{1F44C} \u{1F440} \u{1F4AF} \u270D \u{1FAE1} \u{1F192} \u{1F973} \u{1F494}. (If a message arrived while you were offline you may see a system-posted "can't respond right now" notice \u2014 that's the runtime, not you; don't repeat or apologise for it.)`,
|
|
42967
|
-
SKIP_REACTION_ON ? `When you read a message you decide NOT to reply to (nothing useful to add): call telegram.react with emoji "${TELEGRAM_SKIP_REACTION}" so the sender knows you saw it \u2014 never post a "this wasn't for me" message.` : ""
|
|
42968
|
-
].filter(Boolean).join(" ")
|
|
42995
|
+
// ENG-9649: built by a pure, length-tested builder
|
|
42996
|
+
// (telegram-mcp-instructions.ts) so a line can no longer fall off the end
|
|
42997
|
+
// unnoticed — which is exactly what happened to the do-not-reply guidance
|
|
42998
|
+
// while the reaction taxonomy went on pointing at it.
|
|
42999
|
+
instructions: buildTelegramMcpInstructions({
|
|
43000
|
+
skipReactionOn: SKIP_REACTION_ON,
|
|
43001
|
+
skipReaction: TELEGRAM_SKIP_REACTION
|
|
43002
|
+
})
|
|
42969
43003
|
}
|
|
42970
43004
|
);
|
|
42971
43005
|
mcp.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
@@ -46,8 +46,8 @@ import {
|
|
|
46
46
|
writeDirectChatSessionState,
|
|
47
47
|
writeEgressAllowlist,
|
|
48
48
|
writePersistentClaudeWrapper
|
|
49
|
-
} from "./chunk-
|
|
50
|
-
import "./chunk-
|
|
49
|
+
} from "./chunk-7KT2QNXF.js";
|
|
50
|
+
import "./chunk-IBBBIE4K.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-H7CP2TUX.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
paneLogPath
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-7KT2QNXF.js";
|
|
4
|
+
import "./chunk-IBBBIE4K.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-MPPDJSOL.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
sessionTranscriptDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-IBBBIE4K.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-TK3KNAH4.js.map
|