@integrity-labs/agt-cli 0.28.98 → 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.
- package/dist/bin/agt.js +4 -4
- package/dist/bin/agt.js.map +1 -1
- package/dist/{chunk-TRKWWYRN.js → chunk-5DYG42FL.js} +45 -2
- package/dist/chunk-5DYG42FL.js.map +1 -0
- package/dist/{chunk-5NQ652SP.js → chunk-WNN5WT42.js} +2 -2
- package/dist/{chunk-5ZYUJDOX.js → chunk-ZDBCKRVT.js} +3 -3
- package/dist/{chunk-5ZYUJDOX.js.map → chunk-ZDBCKRVT.js.map} +1 -1
- package/dist/{claude-pair-runtime-2ISKH4M2.js → claude-pair-runtime-JP3TEGDV.js} +2 -2
- package/dist/lib/manager-worker.js +8 -8
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/slack-channel.js +14 -0
- package/dist/mcp/telegram-channel.js +23 -3
- package/dist/{persistent-session-KAOPVQPC.js → persistent-session-6CU3BIHP.js} +3 -3
- package/dist/{responsiveness-probe-OJPF6XDF.js → responsiveness-probe-GLZZZ2OK.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-TRKWWYRN.js.map +0 -1
- /package/dist/{chunk-5NQ652SP.js.map → chunk-WNN5WT42.js.map} +0 -0
- /package/dist/{claude-pair-runtime-2ISKH4M2.js.map → claude-pair-runtime-JP3TEGDV.js.map} +0 -0
- /package/dist/{persistent-session-KAOPVQPC.js.map → persistent-session-6CU3BIHP.js.map} +0 -0
- /package/dist/{responsiveness-probe-OJPF6XDF.js.map → responsiveness-probe-GLZZZ2OK.js.map} +0 -0
|
@@ -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";
|
|
@@ -15698,14 +15704,18 @@ var RESTART = {
|
|
|
15698
15704
|
command: "restart",
|
|
15699
15705
|
description: "Restart this agent"
|
|
15700
15706
|
};
|
|
15707
|
+
var ONBOARD = {
|
|
15708
|
+
command: "onboard",
|
|
15709
|
+
description: "Re-run this agent's onboarding (re-interview; config kept)"
|
|
15710
|
+
};
|
|
15701
15711
|
var INVESTIGATE = {
|
|
15702
15712
|
command: "investigate",
|
|
15703
15713
|
description: "Live tail of this agent's terminal pane (operators only)"
|
|
15704
15714
|
};
|
|
15705
15715
|
function buildCommandRegistrations() {
|
|
15706
15716
|
return [
|
|
15707
|
-
{ scope: { type: "default" }, commands: [HELP, STATUS, RESTART] },
|
|
15708
|
-
{ scope: { type: "all_private_chats" }, commands: [HELP, STATUS, RESTART, INVESTIGATE] }
|
|
15717
|
+
{ scope: { type: "default" }, commands: [HELP, STATUS, RESTART, ONBOARD] },
|
|
15718
|
+
{ scope: { type: "all_private_chats" }, commands: [HELP, STATUS, RESTART, ONBOARD, INVESTIGATE] }
|
|
15709
15719
|
];
|
|
15710
15720
|
}
|
|
15711
15721
|
|
|
@@ -17334,6 +17344,14 @@ async function handleOnboardingCommand(opts) {
|
|
|
17334
17344
|
);
|
|
17335
17345
|
}
|
|
17336
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
|
+
}
|
|
17337
17355
|
if (!AGT_HOST || !AGT_API_KEY || !AGT_AGENT_ID) {
|
|
17338
17356
|
process.stderr.write(
|
|
17339
17357
|
`telegram-channel(${AGENT_CODE_NAME}): ${verb} missing AGT_* env \u2014 cannot reach host runtime
|
|
@@ -19383,7 +19401,9 @@ async function pollLoop() {
|
|
|
19383
19401
|
mode: access.command === "onboard" ? "reset" : "resume",
|
|
19384
19402
|
// ENG-6578: the manager gate compares the SENDER's user-id (not the
|
|
19385
19403
|
// chat id — they differ in groups) to the resolved manager principal.
|
|
19386
|
-
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
|
|
19387
19407
|
});
|
|
19388
19408
|
}
|
|
19389
19409
|
continue;
|
|
@@ -34,8 +34,8 @@ import {
|
|
|
34
34
|
writeDirectChatSessionState,
|
|
35
35
|
writeEgressAllowlist,
|
|
36
36
|
writePersistentClaudeWrapper
|
|
37
|
-
} from "./chunk-
|
|
38
|
-
import "./chunk-
|
|
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-
|
|
77
|
+
//# sourceMappingURL=persistent-session-6CU3BIHP.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
paneLogPath
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
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-
|
|
253
|
+
//# sourceMappingURL=responsiveness-probe-GLZZZ2OK.js.map
|