@integrity-labs/agt-cli 0.28.772 → 0.28.773

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 CHANGED
@@ -2,7 +2,6 @@
2
2
  import {
3
3
  ApiError,
4
4
  DRAIN_MANIFEST_FILENAME,
5
- LITERAL_SECRET_PATTERNS,
6
5
  PROD_AGT_HOST,
7
6
  api,
8
7
  buildConnectivityProbeDeps,
@@ -41,17 +40,18 @@ import {
41
40
  success,
42
41
  table,
43
42
  warn
44
- } from "../chunk-SBAX57SN.js";
43
+ } from "../chunk-UVA7VXG4.js";
45
44
  import {
46
45
  getProjectDir,
47
46
  isSessionResumeDisabled,
48
47
  readDirectChatSessionState
49
- } from "../chunk-R6XGVTQS.js";
48
+ } from "../chunk-UL2W5NY6.js";
50
49
  import {
51
50
  AnchorSessionClient,
52
51
  CHANNEL_REGISTRY,
53
52
  DEFAULT_FRAMEWORK,
54
53
  DEPLOYMENT_TEMPLATES,
54
+ LITERAL_SECRET_PATTERNS,
55
55
  SLACK_SCOPE_CATEGORY_LABELS,
56
56
  SLACK_SCOPE_PRESETS,
57
57
  SlackApiError,
@@ -79,7 +79,7 @@ import {
79
79
  serializeManifestForSlackCli,
80
80
  sessionFileExists,
81
81
  sessionTranscriptDir
82
- } from "../chunk-UPSDSMNC.js";
82
+ } from "../chunk-75UAJFJJ.js";
83
83
  import "../chunk-XWVM4KPK.js";
84
84
 
85
85
  // src/bin/agt.ts
@@ -5467,7 +5467,7 @@ import { execFileSync, execSync } from "child_process";
5467
5467
  import { existsSync as existsSync11, realpathSync as realpathSync2 } from "fs";
5468
5468
  import chalk18 from "chalk";
5469
5469
  import ora16 from "ora";
5470
- var cliVersion = true ? "0.28.772" : "dev";
5470
+ var cliVersion = true ? "0.28.773" : "dev";
5471
5471
  async function fetchLatestVersion() {
5472
5472
  const host2 = getHost();
5473
5473
  if (!host2) return null;
@@ -6658,7 +6658,7 @@ function handleError(err) {
6658
6658
  }
6659
6659
 
6660
6660
  // src/bin/agt.ts
6661
- var cliVersion2 = true ? "0.28.772" : "dev";
6661
+ var cliVersion2 = true ? "0.28.773" : "dev";
6662
6662
  var program = new Command();
6663
6663
  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");
6664
6664
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -240,6 +240,70 @@ function identifierMemoryName(url) {
240
240
  var AGENT_IDENTIFIER_RULE = "An identifier the work depends on is never an ephemeral detail: when a message gives you a URL, file, folder, document or ticket id, save the identifier itself, verbatim, before you reply \u2014 as its own short entry, not folded into prose. A note that a link is coming is not a substitute for the link. You can always re-derive a summary; you can never re-derive an identifier without asking the person for it again.";
241
241
  var EXTRACTOR_IDENTIFIER_RULE = 'An identifier is ALWAYS durable, and is the one exception to "no one-off task details": if the conversation contains a URL, file, folder, document or ticket id that the work depends on, emit it as a "reference" memory with the identifier copied EXACTLY as it appeared \u2014 never paraphrased, never shortened, never described. Conversation history does not survive a restart, so an identifier that is only described is lost.';
242
242
 
243
+ // ../../packages/core/dist/provisioning/mcp-secret-lint.js
244
+ var LITERAL_SECRET_PATTERNS = [
245
+ // Slack bot token — `xoxb-<workspace>-<...>`
246
+ { name: "slack_bot_token", re: /^xoxb-/ },
247
+ // Slack app-level token (Socket Mode) — `xapp-<...>`
248
+ { name: "slack_app_token", re: /^xapp-/ },
249
+ // AGT host API key — `tlk_<...>` (see claudecode-plugin-augmented README).
250
+ { name: "agt_host_api_key", re: /^tlk_/ },
251
+ // Composio / generic api-key prefix — `ak_<...>`
252
+ { name: "composio_api_key", re: /^ak_/ },
253
+ // Telegram bot token — `<bot id>:AA<...>` (BotFather format). ENG-5901
254
+ // PR 4: the original `\d{10}:AAE` (from the issue AC) was too narrow —
255
+ // live tokens on agt-aws-1 carry `AA` + a varying third character
256
+ // (don/scout/stirling all had AA-not-E tokens the lint and migration
257
+ // missed). Bot ids are 8–12 digits; the token part always starts `AA`.
258
+ { name: "telegram_bot_token", re: /^\d{8,12}:AA[A-Za-z0-9_-]/ },
259
+ // ENG-5901 extension beyond the original AC's five patterns: a literal
260
+ // JWT (`eyJ...`) is the shape of a leaked AGT_API_KEY, which the
261
+ // value-prefix patterns above would otherwise miss. Header values often
262
+ // carry it behind `Bearer ` (or a copy-pasted `Authorization: Bearer `),
263
+ // so those prefixes are optionally consumed (CodeRabbit #1731).
264
+ // Templates (`Bearer ${AGT_API_KEY}`) and concrete non-secret values
265
+ // (UUIDs, hosts) never put `eyJ` after the prefix, so this stays
266
+ // false-positive-safe inside .mcp.json.
267
+ { name: "jwt_agt_api_key", re: /^(?:authorization:\s*)?(?:bearer\s+)?eyJ[A-Za-z0-9_-]+\./i }
268
+ ];
269
+ function matchLiteralSecret(value) {
270
+ for (const { name, re } of LITERAL_SECRET_PATTERNS) {
271
+ if (re.test(value))
272
+ return name;
273
+ }
274
+ return null;
275
+ }
276
+ function scanRecord(server, record, location, findings) {
277
+ if (!record)
278
+ return;
279
+ for (const [field, value] of Object.entries(record)) {
280
+ if (typeof value !== "string")
281
+ continue;
282
+ const pattern = matchLiteralSecret(value);
283
+ if (pattern)
284
+ findings.push({ server, field, location, pattern });
285
+ }
286
+ }
287
+ function scanConfigForLiteralSecrets(config) {
288
+ const findings = [];
289
+ if (typeof config !== "object" || config === null)
290
+ return findings;
291
+ const servers = config.mcpServers;
292
+ if (typeof servers !== "object" || servers === null)
293
+ return findings;
294
+ for (const [server, raw] of Object.entries(servers)) {
295
+ if (typeof raw !== "object" || raw === null)
296
+ continue;
297
+ const entry = raw;
298
+ scanRecord(server, entry.env, "env", findings);
299
+ scanRecord(server, entry.headers, "header", findings);
300
+ }
301
+ return findings;
302
+ }
303
+ function formatLiteralSecretRejection(f) {
304
+ return `[mcp-write] [literal-secret-rejected] field=${f.field} server=${f.server} location=${f.location} pattern=${f.pattern}`;
305
+ }
306
+
243
307
  // ../../packages/core/dist/provisioning/frameworks/claudecode/agent-rules.js
244
308
  var AGENT_RULES_SECTION_START = "<!-- AGT:RULES_START -->";
245
309
  var AGENT_RULES_SECTION_END = "<!-- AGT:RULES_END -->";
@@ -13184,6 +13248,9 @@ function readDailySessionPin(codeName) {
13184
13248
  }
13185
13249
 
13186
13250
  export {
13251
+ LITERAL_SECRET_PATTERNS,
13252
+ scanConfigForLiteralSecrets,
13253
+ formatLiteralSecretRejection,
13187
13254
  DEFAULT_FRAMEWORK,
13188
13255
  isDeprecatedFramework,
13189
13256
  modelSlotsForFramework,
@@ -13347,4 +13414,4 @@ export {
13347
13414
  peekCurrentSession,
13348
13415
  readDailySessionPin
13349
13416
  };
13350
- //# sourceMappingURL=chunk-UPSDSMNC.js.map
13417
+ //# sourceMappingURL=chunk-75UAJFJJ.js.map