@integrity-labs/agt-cli 0.28.732 → 0.28.734
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-5CF4DRXA.js} +5 -2
- package/dist/{chunk-QB6TIA3Z.js.map → chunk-5CF4DRXA.js.map} +1 -1
- package/dist/{chunk-BADE2W6M.js → chunk-IBBBIE4K.js} +25 -4
- package/dist/chunk-IBBBIE4K.js.map +1 -0
- package/dist/{chunk-DGIYNBDG.js → chunk-RLOZVCRY.js} +4 -4
- package/dist/{claude-pair-runtime-BZVFVAMR.js → claude-pair-runtime-AWLXOAV6.js} +2 -2
- package/dist/lib/manager-worker.js +25 -13
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/direct-chat-channel.js +43 -4
- package/dist/mcp/index.js +24 -3
- package/dist/mcp/origami.js +24 -3
- package/dist/mcp/slack-channel.js +27 -3
- package/dist/mcp/teams-channel.js +3 -0
- package/dist/mcp/telegram-channel.js +47 -16
- package/dist/{persistent-session-BHJLZTYX.js → persistent-session-4KGDH66U.js} +3 -3
- package/dist/{responsiveness-probe-457EYSWZ.js → responsiveness-probe-HNUYLIFJ.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-DGIYNBDG.js.map → chunk-RLOZVCRY.js.map} +0 -0
- /package/dist/{claude-pair-runtime-BZVFVAMR.js.map → claude-pair-runtime-AWLXOAV6.js.map} +0 -0
- /package/dist/{persistent-session-BHJLZTYX.js.map → persistent-session-4KGDH66U.js.map} +0 -0
- /package/dist/{responsiveness-probe-457EYSWZ.js.map → responsiveness-probe-HNUYLIFJ.js.map} +0 -0
- /package/dist/{session-auth-dead-YUPZGR3F.js.map → session-auth-dead-TK3KNAH4.js.map} +0 -0
|
@@ -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",
|
|
@@ -39199,7 +39228,17 @@ async function pollForMessages(sinceMs) {
|
|
|
39199
39228
|
// ENG-8047: pure passthrough of the server-resolved human identity.
|
|
39200
39229
|
userName: msg.sender_name,
|
|
39201
39230
|
userEmail: msg.sender_email,
|
|
39202
|
-
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
|
|
39203
39242
|
}),
|
|
39204
39243
|
...attachmentMeta
|
|
39205
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",
|
|
@@ -30477,6 +30477,9 @@ function decideInboundAccess(input) {
|
|
|
30477
30477
|
if (input.orgBoundary && !input.orgBoundary.forward) {
|
|
30478
30478
|
return { kind: "drop", reason: "org_boundary" };
|
|
30479
30479
|
}
|
|
30480
|
+
if (input.chatType && !input.chatType.forward) {
|
|
30481
|
+
return { kind: "drop", reason: "chat_type" };
|
|
30482
|
+
}
|
|
30480
30483
|
if (input.senderPolicy && !input.senderPolicy.forward) {
|
|
30481
30484
|
const reason = input.senderPolicy.reason;
|
|
30482
30485
|
const declineWorthy = input.sameOrg && reason !== "internal_only";
|
|
@@ -32175,7 +32178,11 @@ var ORG_ROLE_PERMISSIONS = {
|
|
|
32175
32178
|
"org.manage_teams",
|
|
32176
32179
|
"org.manage_guardrails",
|
|
32177
32180
|
"org.manage_integrations",
|
|
32178
|
-
"org.view_audit_log"
|
|
32181
|
+
"org.view_audit_log",
|
|
32182
|
+
// ENG-9486 (ADR-0074). Authoring is owner+admin, matching every other action
|
|
32183
|
+
// that can write a secret or change what an org is billed for.
|
|
32184
|
+
"org.manage_model_policies",
|
|
32185
|
+
"org.assign_model_policies"
|
|
32179
32186
|
],
|
|
32180
32187
|
admin: [
|
|
32181
32188
|
"org.manage_settings",
|
|
@@ -32183,7 +32190,9 @@ var ORG_ROLE_PERMISSIONS = {
|
|
|
32183
32190
|
"org.manage_teams",
|
|
32184
32191
|
"org.manage_guardrails",
|
|
32185
32192
|
"org.manage_integrations",
|
|
32186
|
-
"org.view_audit_log"
|
|
32193
|
+
"org.view_audit_log",
|
|
32194
|
+
"org.manage_model_policies",
|
|
32195
|
+
"org.assign_model_policies"
|
|
32187
32196
|
],
|
|
32188
32197
|
member: [
|
|
32189
32198
|
"org.manage_teams",
|
|
@@ -36829,7 +36838,22 @@ var FLAG_REGISTRY = [
|
|
|
36829
36838
|
// seeding code, so `listNewOrgFlagOverrides()` is the one answer to "which flags
|
|
36830
36839
|
// does a new org get". `defaultValue` stays false so the ~4 months of orgs already
|
|
36831
36840
|
// carrying an inert enforce-level email.require_approval row are NOT armed on deploy.
|
|
36832
|
-
newOrgOverride: true
|
|
36841
|
+
newOrgOverride: true,
|
|
36842
|
+
// ENG-9630: API-created organizations only, and this is a deliberate,
|
|
36843
|
+
// reviewed asymmetry rather than an oversight.
|
|
36844
|
+
//
|
|
36845
|
+
// Arming this holds EVERY dispatching send for human approval. The hold
|
|
36846
|
+
// itself works fine on a self-serve org — `hitl-approval-routing` has
|
|
36847
|
+
// defaulted to 'on' since ENG-7828, so a real Human Approval card is minted
|
|
36848
|
+
// and it is actionable at /organization/approvals. What a self-serve org
|
|
36849
|
+
// does NOT have is any means of being TOLD: no Slack alert channel is wired
|
|
36850
|
+
// at signup, so the card sits in a console surface nobody has pointed the
|
|
36851
|
+
// user at, and their agent's first email silently waits on it.
|
|
36852
|
+
//
|
|
36853
|
+
// So the blocker is the notification path, not the control. Whoever revisits
|
|
36854
|
+
// this should treat "a self-serve org actually receives the card" as the
|
|
36855
|
+
// prerequisite and then drop this line — do not simply widen it.
|
|
36856
|
+
newOrgOverrideOrigins: ["api"]
|
|
36833
36857
|
},
|
|
36834
36858
|
{
|
|
36835
36859
|
key: "mail-rule-control-enforcement",
|
|
@@ -14930,6 +14930,9 @@ function decideInboundAccess(input) {
|
|
|
14930
14930
|
if (input.orgBoundary && !input.orgBoundary.forward) {
|
|
14931
14931
|
return { kind: "drop", reason: "org_boundary" };
|
|
14932
14932
|
}
|
|
14933
|
+
if (input.chatType && !input.chatType.forward) {
|
|
14934
|
+
return { kind: "drop", reason: "chat_type" };
|
|
14935
|
+
}
|
|
14933
14936
|
if (input.senderPolicy && !input.senderPolicy.forward) {
|
|
14934
14937
|
const reason = input.senderPolicy.reason;
|
|
14935
14938
|
const declineWorthy = input.sameOrg && reason !== "internal_only";
|
|
@@ -30709,6 +30709,9 @@ function decideInboundAccess(input) {
|
|
|
30709
30709
|
if (input.orgBoundary && !input.orgBoundary.forward) {
|
|
30710
30710
|
return { kind: "drop", reason: "org_boundary" };
|
|
30711
30711
|
}
|
|
30712
|
+
if (input.chatType && !input.chatType.forward) {
|
|
30713
|
+
return { kind: "drop", reason: "chat_type" };
|
|
30714
|
+
}
|
|
30712
30715
|
if (input.senderPolicy && !input.senderPolicy.forward) {
|
|
30713
30716
|
const reason = input.senderPolicy.reason;
|
|
30714
30717
|
const declineWorthy = input.sameOrg && reason !== "internal_only";
|
|
@@ -30737,12 +30740,14 @@ function decideInboundAccess(input) {
|
|
|
30737
30740
|
return { kind: "admit" };
|
|
30738
30741
|
}
|
|
30739
30742
|
|
|
30740
|
-
//
|
|
30741
|
-
var ONBOARDING_DM_ONLY_MESSAGE = "Sorry, I can only be onboarded from a Direct Message (DM).";
|
|
30743
|
+
// ../core/dist/channels/governance/telegram-chat-type.js
|
|
30742
30744
|
function isTelegramPrivateChat(chatType) {
|
|
30743
30745
|
return chatType === "private";
|
|
30744
30746
|
}
|
|
30745
30747
|
|
|
30748
|
+
// src/onboarding-dm-gate.ts
|
|
30749
|
+
var ONBOARDING_DM_ONLY_MESSAGE = "Sorry, I can only be onboarded from a Direct Message (DM).";
|
|
30750
|
+
|
|
30746
30751
|
// src/flags-cache-read.ts
|
|
30747
30752
|
import { existsSync as existsSync2, readFileSync as readFileSync3 } from "fs";
|
|
30748
30753
|
import { homedir as homedir2 } from "os";
|
|
@@ -32337,7 +32342,11 @@ var ORG_ROLE_PERMISSIONS = {
|
|
|
32337
32342
|
"org.manage_teams",
|
|
32338
32343
|
"org.manage_guardrails",
|
|
32339
32344
|
"org.manage_integrations",
|
|
32340
|
-
"org.view_audit_log"
|
|
32345
|
+
"org.view_audit_log",
|
|
32346
|
+
// ENG-9486 (ADR-0074). Authoring is owner+admin, matching every other action
|
|
32347
|
+
// that can write a secret or change what an org is billed for.
|
|
32348
|
+
"org.manage_model_policies",
|
|
32349
|
+
"org.assign_model_policies"
|
|
32341
32350
|
],
|
|
32342
32351
|
admin: [
|
|
32343
32352
|
"org.manage_settings",
|
|
@@ -32345,7 +32354,9 @@ var ORG_ROLE_PERMISSIONS = {
|
|
|
32345
32354
|
"org.manage_teams",
|
|
32346
32355
|
"org.manage_guardrails",
|
|
32347
32356
|
"org.manage_integrations",
|
|
32348
|
-
"org.view_audit_log"
|
|
32357
|
+
"org.view_audit_log",
|
|
32358
|
+
"org.manage_model_policies",
|
|
32359
|
+
"org.assign_model_policies"
|
|
32349
32360
|
],
|
|
32350
32361
|
member: [
|
|
32351
32362
|
"org.manage_teams",
|
|
@@ -36985,7 +36996,22 @@ var FLAG_REGISTRY = [
|
|
|
36985
36996
|
// seeding code, so `listNewOrgFlagOverrides()` is the one answer to "which flags
|
|
36986
36997
|
// does a new org get". `defaultValue` stays false so the ~4 months of orgs already
|
|
36987
36998
|
// carrying an inert enforce-level email.require_approval row are NOT armed on deploy.
|
|
36988
|
-
newOrgOverride: true
|
|
36999
|
+
newOrgOverride: true,
|
|
37000
|
+
// ENG-9630: API-created organizations only, and this is a deliberate,
|
|
37001
|
+
// reviewed asymmetry rather than an oversight.
|
|
37002
|
+
//
|
|
37003
|
+
// Arming this holds EVERY dispatching send for human approval. The hold
|
|
37004
|
+
// itself works fine on a self-serve org — `hitl-approval-routing` has
|
|
37005
|
+
// defaulted to 'on' since ENG-7828, so a real Human Approval card is minted
|
|
37006
|
+
// and it is actionable at /organization/approvals. What a self-serve org
|
|
37007
|
+
// does NOT have is any means of being TOLD: no Slack alert channel is wired
|
|
37008
|
+
// at signup, so the card sits in a console surface nobody has pointed the
|
|
37009
|
+
// user at, and their agent's first email silently waits on it.
|
|
37010
|
+
//
|
|
37011
|
+
// So the blocker is the notification path, not the control. Whoever revisits
|
|
37012
|
+
// this should treat "a self-serve org actually receives the card" as the
|
|
37013
|
+
// prerequisite and then drop this line — do not simply widen it.
|
|
37014
|
+
newOrgOverrideOrigins: ["api"]
|
|
36989
37015
|
},
|
|
36990
37016
|
{
|
|
36991
37017
|
key: "mail-rule-control-enforcement",
|
|
@@ -40564,6 +40590,7 @@ var AGT_AGENT_ID = process.env.AGT_AGENT_ID ?? null;
|
|
|
40564
40590
|
var ALLOWED_CHATS = new Set(
|
|
40565
40591
|
(process.env.TELEGRAM_ALLOWED_CHATS ?? "").split(",").map((s) => s.trim()).filter(Boolean)
|
|
40566
40592
|
);
|
|
40593
|
+
var PRIVATE_CHATS_ONLY = process.env.TELEGRAM_PRIVATE_CHATS_ONLY === "1";
|
|
40567
40594
|
var DIAGNOSTIC_CHAT_IDS = new Set(
|
|
40568
40595
|
(process.env.TELEGRAM_DIAGNOSTIC_CHAT_IDS ?? "").split(",").map((s) => s.trim()).filter(Boolean)
|
|
40569
40596
|
);
|
|
@@ -44036,16 +44063,6 @@ async function pollLoop() {
|
|
|
44036
44063
|
}
|
|
44037
44064
|
const msg = update.message;
|
|
44038
44065
|
if (!msg) continue;
|
|
44039
|
-
const perfReplyRef = typeof msg.text === "string" && msg.text.trim().length > 0 && msg.reply_to_message?.from?.is_bot === true && msg.reply_to_message?.text ? PERF_REVIEW_REF_RE.exec(msg.reply_to_message.text) : null;
|
|
44040
|
-
if (perfReplyRef && msg.from?.id != null) {
|
|
44041
|
-
await postPerfReviewResolve(
|
|
44042
|
-
perfReplyRef[1],
|
|
44043
|
-
PERF_REVIEW_COMMENT_TOKEN,
|
|
44044
|
-
String(msg.from.id),
|
|
44045
|
-
msg.text.trim()
|
|
44046
|
-
);
|
|
44047
|
-
continue;
|
|
44048
|
-
}
|
|
44049
44066
|
const classifiedAttachments = classifyTelegramAttachments(msg);
|
|
44050
44067
|
const content = typeof msg.text === "string" && msg.text.length > 0 ? msg.text : typeof msg.caption === "string" && msg.caption.length > 0 ? msg.caption : "";
|
|
44051
44068
|
if (content.length === 0 && classifiedAttachments.length === 0) continue;
|
|
@@ -44107,17 +44124,31 @@ async function pollLoop() {
|
|
|
44107
44124
|
// TELEGRAM_ALLOWED_CHATS is Telegram's org-boundary axis (the drift
|
|
44108
44125
|
// the consolidation names). An unlisted chat is external ⇒ silent.
|
|
44109
44126
|
orgBoundary: ALLOWED_CHATS.size > 0 && !ALLOWED_CHATS.has(chatId) ? { forward: false } : { forward: true },
|
|
44127
|
+
// CS-1628: chat-kind axis. Evaluated before command routing by the
|
|
44128
|
+
// composer, so a `/restart` from a group cannot execute in a chat the
|
|
44129
|
+
// agent is not permitted to be in.
|
|
44130
|
+
chatType: PRIVATE_CHATS_ONLY && !isTelegramPrivateChat(msg.chat?.type) ? { forward: false } : { forward: true },
|
|
44110
44131
|
command: telegramCommand ? { command: telegramCommand, authorized: true } : void 0,
|
|
44111
44132
|
// No sender-policy mode system on Telegram, so no same-org decline.
|
|
44112
44133
|
sameOrg: false
|
|
44113
44134
|
});
|
|
44114
|
-
if (access.kind === "drop" && (access.reason === "org_boundary" || access.reason.startsWith("content:"))) {
|
|
44135
|
+
if (access.kind === "drop" && (access.reason === "org_boundary" || access.reason === "chat_type" || access.reason.startsWith("content:"))) {
|
|
44115
44136
|
process.stderr.write(
|
|
44116
44137
|
`telegram-channel(${AGENT_CODE_NAME}): inbound drop reason=${access.reason} chat=${redactId(chatId)}
|
|
44117
44138
|
`
|
|
44118
44139
|
);
|
|
44119
44140
|
continue;
|
|
44120
44141
|
}
|
|
44142
|
+
const perfReplyRef = typeof msg.text === "string" && msg.text.trim().length > 0 && msg.reply_to_message?.from?.is_bot === true && msg.reply_to_message?.text ? PERF_REVIEW_REF_RE.exec(msg.reply_to_message.text) : null;
|
|
44143
|
+
if (perfReplyRef && msg.from?.id != null) {
|
|
44144
|
+
await postPerfReviewResolve(
|
|
44145
|
+
perfReplyRef[1],
|
|
44146
|
+
PERF_REVIEW_COMMENT_TOKEN,
|
|
44147
|
+
String(msg.from.id),
|
|
44148
|
+
msg.text.trim()
|
|
44149
|
+
);
|
|
44150
|
+
continue;
|
|
44151
|
+
}
|
|
44121
44152
|
if (msg.chat.type === "private" && !isFromBot && chatId) {
|
|
44122
44153
|
recordDmActivity(recentDms, String(chatId));
|
|
44123
44154
|
if (isShuttingDown) recentDmPersister?.flush(recentDms);
|
|
@@ -46,8 +46,8 @@ import {
|
|
|
46
46
|
writeDirectChatSessionState,
|
|
47
47
|
writeEgressAllowlist,
|
|
48
48
|
writePersistentClaudeWrapper
|
|
49
|
-
} from "./chunk-
|
|
50
|
-
import "./chunk-
|
|
49
|
+
} from "./chunk-5CF4DRXA.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-4KGDH66U.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
paneLogPath
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-5CF4DRXA.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-HNUYLIFJ.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
|