@integrity-labs/agt-cli 0.28.1014 → 0.28.1016
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-MLCGPEN6.js → chunk-B7XGAC54.js} +74 -38
- package/dist/chunk-B7XGAC54.js.map +1 -0
- package/dist/{chunk-7QXIJNLA.js → chunk-DFKQZGM7.js} +48 -48
- package/dist/chunk-DFKQZGM7.js.map +1 -0
- package/dist/{chunk-QBQLG2PY.js → chunk-YPS4AUHN.js} +10 -2
- package/dist/{chunk-QBQLG2PY.js.map → chunk-YPS4AUHN.js.map} +1 -1
- package/dist/{claude-pair-runtime-4F73QFXF.js → claude-pair-runtime-VE6KUMQY.js} +2 -2
- package/dist/lib/manager-worker.js +178 -25
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/telegram-channel.js +194 -3
- package/dist/{persistent-session-IEGA6OSO.js → persistent-session-AQGEDGJR.js} +3 -3
- package/dist/{responsiveness-probe-KWFVG5EI.js → responsiveness-probe-BDARO76E.js} +3 -3
- package/dist/{session-auth-dead-P6KOHDYJ.js → session-auth-dead-2CCORXIW.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-7QXIJNLA.js.map +0 -1
- package/dist/chunk-MLCGPEN6.js.map +0 -1
- /package/dist/{claude-pair-runtime-4F73QFXF.js.map → claude-pair-runtime-VE6KUMQY.js.map} +0 -0
- /package/dist/{persistent-session-IEGA6OSO.js.map → persistent-session-AQGEDGJR.js.map} +0 -0
- /package/dist/{responsiveness-probe-KWFVG5EI.js.map → responsiveness-probe-BDARO76E.js.map} +0 -0
- /package/dist/{session-auth-dead-P6KOHDYJ.js.map → session-auth-dead-2CCORXIW.js.map} +0 -0
package/dist/bin/agt.js
CHANGED
|
@@ -40,12 +40,12 @@ import {
|
|
|
40
40
|
success,
|
|
41
41
|
table,
|
|
42
42
|
warn
|
|
43
|
-
} from "../chunk-
|
|
43
|
+
} from "../chunk-DFKQZGM7.js";
|
|
44
44
|
import {
|
|
45
45
|
getProjectDir,
|
|
46
46
|
isSessionResumeDisabled,
|
|
47
47
|
readDirectChatSessionState
|
|
48
|
-
} from "../chunk-
|
|
48
|
+
} from "../chunk-YPS4AUHN.js";
|
|
49
49
|
import {
|
|
50
50
|
AnchorSessionClient,
|
|
51
51
|
CHANNEL_REGISTRY,
|
|
@@ -79,7 +79,7 @@ import {
|
|
|
79
79
|
serializeManifestForSlackCli,
|
|
80
80
|
sessionFileExists,
|
|
81
81
|
sessionTranscriptDir
|
|
82
|
-
} from "../chunk-
|
|
82
|
+
} from "../chunk-B7XGAC54.js";
|
|
83
83
|
import "../chunk-DHWNVVX4.js";
|
|
84
84
|
import "../chunk-XWVM4KPK.js";
|
|
85
85
|
import "../chunk-EL5MWGGH.js";
|
|
@@ -5474,7 +5474,7 @@ import { execFileSync, execSync } from "child_process";
|
|
|
5474
5474
|
import { existsSync as existsSync11, realpathSync as realpathSync2 } from "fs";
|
|
5475
5475
|
import chalk18 from "chalk";
|
|
5476
5476
|
import ora16 from "ora";
|
|
5477
|
-
var cliVersion = true ? "0.28.
|
|
5477
|
+
var cliVersion = true ? "0.28.1016" : "dev";
|
|
5478
5478
|
async function fetchLatestVersion() {
|
|
5479
5479
|
const host2 = getHost();
|
|
5480
5480
|
if (!host2) return null;
|
|
@@ -6734,7 +6734,7 @@ function handleError(err) {
|
|
|
6734
6734
|
}
|
|
6735
6735
|
|
|
6736
6736
|
// src/bin/agt.ts
|
|
6737
|
-
var cliVersion2 = true ? "0.28.
|
|
6737
|
+
var cliVersion2 = true ? "0.28.1016" : "dev";
|
|
6738
6738
|
var program = new Command();
|
|
6739
6739
|
program.name("agt").description("Augmented CLI \u2014 agent provisioning and management").version(cliVersion2).option("--json", "Emit machine-readable JSON output (suppress spinners and colors)").option("--skip-update-check", "Skip the automatic update check on startup");
|
|
6740
6740
|
program.hook("preAction", async (thisCommand, actionCommand) => {
|
|
@@ -3395,6 +3395,42 @@ var INSTALLABLE_NATIVE_INTEGRATIONS = INTEGRATION_REGISTRY.filter((d) => d.insta
|
|
|
3395
3395
|
}));
|
|
3396
3396
|
var INSTALLABLE_NATIVE_INTEGRATION_IDS = INSTALLABLE_NATIVE_INTEGRATIONS.map((i) => i.id);
|
|
3397
3397
|
|
|
3398
|
+
// ../../packages/core/dist/integrations/remote-mcp-connection.js
|
|
3399
|
+
var DEFAULT_REMOTE_MCP_CONNECTION_KEY = "default";
|
|
3400
|
+
function isDefaultRemoteMcpConnection(connectionKey) {
|
|
3401
|
+
return !connectionKey || connectionKey === DEFAULT_REMOTE_MCP_CONNECTION_KEY;
|
|
3402
|
+
}
|
|
3403
|
+
function sanitizeBase(definitionId) {
|
|
3404
|
+
return definitionId.replace(/[^a-z0-9]/gi, "_").toLowerCase();
|
|
3405
|
+
}
|
|
3406
|
+
function remoteMcpServerKey(definitionId, connectionKey) {
|
|
3407
|
+
if (isDefaultRemoteMcpConnection(connectionKey))
|
|
3408
|
+
return definitionId;
|
|
3409
|
+
return `${sanitizeBase(definitionId)}-${connectionKey}`;
|
|
3410
|
+
}
|
|
3411
|
+
function remoteMcpConnectionEnvInfix(connectionKey) {
|
|
3412
|
+
if (isDefaultRemoteMcpConnection(connectionKey))
|
|
3413
|
+
return "";
|
|
3414
|
+
return `__${connectionKey.replace(/-/g, "_").toUpperCase()}`;
|
|
3415
|
+
}
|
|
3416
|
+
function remoteMcpEnvPrefix(definitionId, connectionKey) {
|
|
3417
|
+
const idPart = definitionId.toUpperCase().replace(/[^A-Z0-9]/g, "_");
|
|
3418
|
+
return `${idPart}${remoteMcpConnectionEnvInfix(connectionKey)}`;
|
|
3419
|
+
}
|
|
3420
|
+
function remoteMcpConnectionScopedEnvVar(definitionId, varName, connectionKey) {
|
|
3421
|
+
if (isDefaultRemoteMcpConnection(connectionKey))
|
|
3422
|
+
return varName;
|
|
3423
|
+
const idPart = definitionId.toUpperCase().replace(/[^A-Z0-9]/g, "_");
|
|
3424
|
+
if (!varName.startsWith(`${idPart}_`))
|
|
3425
|
+
return varName;
|
|
3426
|
+
return `${idPart}${remoteMcpConnectionEnvInfix(connectionKey)}_${varName.slice(idPart.length + 1)}`;
|
|
3427
|
+
}
|
|
3428
|
+
function remoteMcpConnectionLabel(definitionId, connectionKey) {
|
|
3429
|
+
if (isDefaultRemoteMcpConnection(connectionKey))
|
|
3430
|
+
return definitionId;
|
|
3431
|
+
return `${definitionId} (${connectionKey})`;
|
|
3432
|
+
}
|
|
3433
|
+
|
|
3398
3434
|
// ../../packages/core/dist/provisioning/control-plane-config-keys.js
|
|
3399
3435
|
var CONTROL_PLANE_ONLY_CONFIG_KEYS = /* @__PURE__ */ new Set([
|
|
3400
3436
|
"managed_state_token",
|
|
@@ -3417,9 +3453,26 @@ function isControlPlaneOnlyEnvVar(name) {
|
|
|
3417
3453
|
}
|
|
3418
3454
|
return CONTROL_PLANE_CONFIG_KEY_SUFFIXES.some((suffix) => normalized.endsWith(suffix));
|
|
3419
3455
|
}
|
|
3456
|
+
var RESPAWN_EXEMPT_CONFIG_TAILS = [{ definitionId: "github", tails: ["APP_ID", "INSTALLATION_ID", "APP_SLUG"] }];
|
|
3457
|
+
function matchesDefinitionScopedTail(upper, prefix, tail) {
|
|
3458
|
+
const suffix = `_${tail}`;
|
|
3459
|
+
if (!upper.endsWith(suffix))
|
|
3460
|
+
return false;
|
|
3461
|
+
const head = upper.slice(0, upper.length - suffix.length);
|
|
3462
|
+
if (head === prefix)
|
|
3463
|
+
return true;
|
|
3464
|
+
return head.startsWith(`${prefix}__`) && head.length > prefix.length + 2;
|
|
3465
|
+
}
|
|
3466
|
+
function isRespawnExemptEnvVar(name) {
|
|
3467
|
+
const upper = name.toUpperCase();
|
|
3468
|
+
return RESPAWN_EXEMPT_CONFIG_TAILS.some(({ definitionId, tails }) => {
|
|
3469
|
+
const prefix = remoteMcpEnvPrefix(definitionId, null);
|
|
3470
|
+
return tails.some((tail) => matchesDefinitionScopedTail(upper, prefix, tail));
|
|
3471
|
+
});
|
|
3472
|
+
}
|
|
3420
3473
|
|
|
3421
3474
|
// ../../packages/core/dist/types/channel.js
|
|
3422
|
-
var SENDER_POLICY_ENFORCED_CHANNELS = ["slack", "msteams"];
|
|
3475
|
+
var SENDER_POLICY_ENFORCED_CHANNELS = ["slack", "msteams", "telegram"];
|
|
3423
3476
|
function senderPolicyIsEnforcedOn(channelId) {
|
|
3424
3477
|
return SENDER_POLICY_ENFORCED_CHANNELS.includes(channelId);
|
|
3425
3478
|
}
|
|
@@ -4332,6 +4385,9 @@ var AZURE_PROVISIONING_SCOPES = [
|
|
|
4332
4385
|
function teamOnlyReason(allowlist) {
|
|
4333
4386
|
return allowlist && allowlist.length > 0 ? "mode_team_only" : "mode_team_only_no_principals";
|
|
4334
4387
|
}
|
|
4388
|
+
function managerOnlyReason(principalId) {
|
|
4389
|
+
return principalId ? "mode_manager_only" : "mode_manager_only_no_principals";
|
|
4390
|
+
}
|
|
4335
4391
|
function classifySlackPolicyBlock(evt, policy) {
|
|
4336
4392
|
if (policy.internalOnly && (!policy.homeTeamId || evt.team !== policy.homeTeamId)) {
|
|
4337
4393
|
return "internal_only";
|
|
@@ -4349,6 +4405,20 @@ function classifySlackPolicyBlock(evt, policy) {
|
|
|
4349
4405
|
return "internal_only";
|
|
4350
4406
|
}
|
|
4351
4407
|
}
|
|
4408
|
+
function classifyTelegramPolicyBlock(policy) {
|
|
4409
|
+
switch (policy.mode) {
|
|
4410
|
+
case "manager_only":
|
|
4411
|
+
return managerOnlyReason(policy.principalTelegramUserId);
|
|
4412
|
+
case "team_only":
|
|
4413
|
+
return teamOnlyReason(policy.teamPrincipalTelegramUserIds);
|
|
4414
|
+
case "team_agents_only":
|
|
4415
|
+
return "mode_team_agents_only";
|
|
4416
|
+
case "agents_only":
|
|
4417
|
+
return "mode_agents_only";
|
|
4418
|
+
case "all":
|
|
4419
|
+
throw new Error("classifyTelegramPolicyBlock called with mode 'all', which never blocks. The caller must have a forward:false verdict from decideSenderPolicyForwardTelegram before classifying.");
|
|
4420
|
+
}
|
|
4421
|
+
}
|
|
4352
4422
|
function politeDeclineCopy(reason) {
|
|
4353
4423
|
switch (reason) {
|
|
4354
4424
|
case "internal_only":
|
|
@@ -12833,42 +12903,6 @@ function buildForwardHeaders(token, authHeader, extras, readVar) {
|
|
|
12833
12903
|
return headers;
|
|
12834
12904
|
}
|
|
12835
12905
|
|
|
12836
|
-
// ../../packages/core/dist/integrations/remote-mcp-connection.js
|
|
12837
|
-
var DEFAULT_REMOTE_MCP_CONNECTION_KEY = "default";
|
|
12838
|
-
function isDefaultRemoteMcpConnection(connectionKey) {
|
|
12839
|
-
return !connectionKey || connectionKey === DEFAULT_REMOTE_MCP_CONNECTION_KEY;
|
|
12840
|
-
}
|
|
12841
|
-
function sanitizeBase(definitionId) {
|
|
12842
|
-
return definitionId.replace(/[^a-z0-9]/gi, "_").toLowerCase();
|
|
12843
|
-
}
|
|
12844
|
-
function remoteMcpServerKey(definitionId, connectionKey) {
|
|
12845
|
-
if (isDefaultRemoteMcpConnection(connectionKey))
|
|
12846
|
-
return definitionId;
|
|
12847
|
-
return `${sanitizeBase(definitionId)}-${connectionKey}`;
|
|
12848
|
-
}
|
|
12849
|
-
function remoteMcpConnectionEnvInfix(connectionKey) {
|
|
12850
|
-
if (isDefaultRemoteMcpConnection(connectionKey))
|
|
12851
|
-
return "";
|
|
12852
|
-
return `__${connectionKey.replace(/-/g, "_").toUpperCase()}`;
|
|
12853
|
-
}
|
|
12854
|
-
function remoteMcpEnvPrefix(definitionId, connectionKey) {
|
|
12855
|
-
const idPart = definitionId.toUpperCase().replace(/[^A-Z0-9]/g, "_");
|
|
12856
|
-
return `${idPart}${remoteMcpConnectionEnvInfix(connectionKey)}`;
|
|
12857
|
-
}
|
|
12858
|
-
function remoteMcpConnectionScopedEnvVar(definitionId, varName, connectionKey) {
|
|
12859
|
-
if (isDefaultRemoteMcpConnection(connectionKey))
|
|
12860
|
-
return varName;
|
|
12861
|
-
const idPart = definitionId.toUpperCase().replace(/[^A-Z0-9]/g, "_");
|
|
12862
|
-
if (!varName.startsWith(`${idPart}_`))
|
|
12863
|
-
return varName;
|
|
12864
|
-
return `${idPart}${remoteMcpConnectionEnvInfix(connectionKey)}_${varName.slice(idPart.length + 1)}`;
|
|
12865
|
-
}
|
|
12866
|
-
function remoteMcpConnectionLabel(definitionId, connectionKey) {
|
|
12867
|
-
if (isDefaultRemoteMcpConnection(connectionKey))
|
|
12868
|
-
return definitionId;
|
|
12869
|
-
return `${definitionId} (${connectionKey})`;
|
|
12870
|
-
}
|
|
12871
|
-
|
|
12872
12906
|
// ../../packages/core/dist/integrations/slack-socket-state.js
|
|
12873
12907
|
var SLACK_SOCKET_STATE_FILENAME = "slack-socket-state.json";
|
|
12874
12908
|
var SLACK_SOCKET_STATE_MAX_AGE_MS = 18e4;
|
|
@@ -15310,6 +15344,7 @@ export {
|
|
|
15310
15344
|
buildForwardHeaders,
|
|
15311
15345
|
isControlPlaneOnlyConfigKey,
|
|
15312
15346
|
isControlPlaneOnlyEnvVar,
|
|
15347
|
+
isRespawnExemptEnvVar,
|
|
15313
15348
|
senderPolicyIsEnforcedOn,
|
|
15314
15349
|
claudeModelAlias,
|
|
15315
15350
|
isClaudeFastMode,
|
|
@@ -15329,6 +15364,7 @@ export {
|
|
|
15329
15364
|
SlackApiError,
|
|
15330
15365
|
createSlackApp,
|
|
15331
15366
|
classifySlackPolicyBlock,
|
|
15367
|
+
classifyTelegramPolicyBlock,
|
|
15332
15368
|
decideInboundAccess,
|
|
15333
15369
|
extractFrontmatter,
|
|
15334
15370
|
generateCharterMd,
|
|
@@ -15443,4 +15479,4 @@ export {
|
|
|
15443
15479
|
peekCurrentSession,
|
|
15444
15480
|
readDailySessionPin
|
|
15445
15481
|
};
|
|
15446
|
-
//# sourceMappingURL=chunk-
|
|
15482
|
+
//# sourceMappingURL=chunk-B7XGAC54.js.map
|