@integrity-labs/agt-cli 0.28.99 → 0.28.100

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.
@@ -14353,6 +14353,12 @@ function decideInboundAccess(input) {
14353
14353
  return { kind: "admit" };
14354
14354
  }
14355
14355
 
14356
+ // src/onboarding-dm-gate.ts
14357
+ var ONBOARDING_DM_ONLY_MESSAGE = "Sorry, I can only be onboarded from a Direct Message (DM).";
14358
+ function isSlackDirectMessage(channelId) {
14359
+ return typeof channelId === "string" && channelId.startsWith("D");
14360
+ }
14361
+
14356
14362
  // src/flags-cache-read.ts
14357
14363
  import { existsSync, readFileSync } from "fs";
14358
14364
  import { homedir } from "os";
@@ -18193,6 +18199,14 @@ async function postEphemeralViaResponseUrl(responseUrl, text, logTag) {
18193
18199
  }
18194
18200
  async function forwardOnboardingSlashCommand(opts) {
18195
18201
  const { verb, path, userId, channelId, responseUrl, codeName } = opts;
18202
+ if (!isSlackDirectMessage(channelId)) {
18203
+ await postEphemeralViaResponseUrl(
18204
+ responseUrl,
18205
+ `:warning: ${ONBOARDING_DM_ONLY_MESSAGE}`,
18206
+ codeName
18207
+ );
18208
+ return;
18209
+ }
18196
18210
  if (!AGT_HOST || !AGT_API_KEY || !AGT_AGENT_ID) {
18197
18211
  await postEphemeralViaResponseUrl(
18198
18212
  responseUrl,
@@ -15033,6 +15033,12 @@ function decideInboundAccess(input) {
15033
15033
  return { kind: "admit" };
15034
15034
  }
15035
15035
 
15036
+ // src/onboarding-dm-gate.ts
15037
+ var ONBOARDING_DM_ONLY_MESSAGE = "Sorry, I can only be onboarded from a Direct Message (DM).";
15038
+ function isTelegramPrivateChat(chatType) {
15039
+ return chatType === "private";
15040
+ }
15041
+
15036
15042
  // src/flags-cache-read.ts
15037
15043
  import { existsSync as existsSync2, readFileSync as readFileSync3 } from "fs";
15038
15044
  import { homedir as homedir2 } from "os";
@@ -17338,6 +17344,14 @@ async function handleOnboardingCommand(opts) {
17338
17344
  );
17339
17345
  }
17340
17346
  };
17347
+ if (!isTelegramPrivateChat(opts.chatType)) {
17348
+ process.stderr.write(
17349
+ `telegram-channel(${AGENT_CODE_NAME}): ${verb} rejected \u2014 not a DM (chat ${redactId(opts.chatId)}, type=${opts.chatType ?? "unknown"})
17350
+ `
17351
+ );
17352
+ await reply(`\u26A0\uFE0F ${ONBOARDING_DM_ONLY_MESSAGE}`);
17353
+ return;
17354
+ }
17341
17355
  if (!AGT_HOST || !AGT_API_KEY || !AGT_AGENT_ID) {
17342
17356
  process.stderr.write(
17343
17357
  `telegram-channel(${AGENT_CODE_NAME}): ${verb} missing AGT_* env \u2014 cannot reach host runtime
@@ -19387,7 +19401,9 @@ async function pollLoop() {
19387
19401
  mode: access.command === "onboard" ? "reset" : "resume",
19388
19402
  // ENG-6578: the manager gate compares the SENDER's user-id (not the
19389
19403
  // chat id — they differ in groups) to the resolved manager principal.
19390
- senderId: msg.from?.id != null ? String(msg.from.id) : void 0
19404
+ senderId: msg.from?.id != null ? String(msg.from.id) : void 0,
19405
+ // ENG-6646: DM-only — reject group/supergroup/channel before forwarding.
19406
+ chatType: msg.chat.type ?? null
19391
19407
  });
19392
19408
  }
19393
19409
  continue;
@@ -34,8 +34,8 @@ import {
34
34
  writeDirectChatSessionState,
35
35
  writeEgressAllowlist,
36
36
  writePersistentClaudeWrapper
37
- } from "./chunk-TGGRM5NJ.js";
38
- import "./chunk-IPSZZQ3D.js";
37
+ } from "./chunk-WNN5WT42.js";
38
+ import "./chunk-5DYG42FL.js";
39
39
  import "./chunk-XWVM4KPK.js";
40
40
  export {
41
41
  EGRESS_BASELINE_DOMAINS,
@@ -74,4 +74,4 @@ export {
74
74
  writeEgressAllowlist,
75
75
  writePersistentClaudeWrapper
76
76
  };
77
- //# sourceMappingURL=persistent-session-3OABTEPN.js.map
77
+ //# sourceMappingURL=persistent-session-6CU3BIHP.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  paneLogPath
3
- } from "./chunk-TGGRM5NJ.js";
4
- import "./chunk-IPSZZQ3D.js";
3
+ } from "./chunk-WNN5WT42.js";
4
+ import "./chunk-5DYG42FL.js";
5
5
  import "./chunk-XWVM4KPK.js";
6
6
 
7
7
  // src/lib/responsiveness-probe.ts
@@ -250,4 +250,4 @@ export {
250
250
  parkPendingInbound,
251
251
  readAndResetChannelDeflections
252
252
  };
253
- //# sourceMappingURL=responsiveness-probe-IES7QHV5.js.map
253
+ //# sourceMappingURL=responsiveness-probe-GLZZZ2OK.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integrity-labs/agt-cli",
3
- "version": "0.28.99",
3
+ "version": "0.28.100",
4
4
  "description": "Augmented Team CLI — agent provisioning and management",
5
5
  "type": "module",
6
6
  "engines": {