@integrity-labs/agt-cli 0.28.546 → 0.28.547

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
@@ -40,7 +40,7 @@ import {
40
40
  success,
41
41
  table,
42
42
  warn
43
- } from "../chunk-7WHF3QRW.js";
43
+ } from "../chunk-SYHPBJK7.js";
44
44
  import {
45
45
  AnchorSessionClient,
46
46
  CHANNEL_REGISTRY,
@@ -71,7 +71,7 @@ import {
71
71
  requiredMcpWildcard,
72
72
  resolveChannels,
73
73
  serializeManifestForSlackCli
74
- } from "../chunk-QPSEQLSI.js";
74
+ } from "../chunk-ST4PZ6RF.js";
75
75
  import "../chunk-XWVM4KPK.js";
76
76
 
77
77
  // src/bin/agt.ts
@@ -4834,7 +4834,7 @@ import { execFileSync, execSync } from "child_process";
4834
4834
  import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
4835
4835
  import chalk18 from "chalk";
4836
4836
  import ora16 from "ora";
4837
- var cliVersion = true ? "0.28.546" : "dev";
4837
+ var cliVersion = true ? "0.28.547" : "dev";
4838
4838
  async function fetchLatestVersion() {
4839
4839
  const host2 = getHost();
4840
4840
  if (!host2) return null;
@@ -6006,7 +6006,7 @@ function handleError(err) {
6006
6006
  }
6007
6007
 
6008
6008
  // src/bin/agt.ts
6009
- var cliVersion2 = true ? "0.28.546" : "dev";
6009
+ var cliVersion2 = true ? "0.28.547" : "dev";
6010
6010
  var program = new Command();
6011
6011
  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");
6012
6012
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -15694,4 +15694,4 @@ export {
15694
15694
  stopAllSessionsAndWait,
15695
15695
  getProjectDir
15696
15696
  };
15697
- //# sourceMappingURL=chunk-QPSEQLSI.js.map
15697
+ //# sourceMappingURL=chunk-ST4PZ6RF.js.map
@@ -42,7 +42,7 @@ import {
42
42
  resolveConnectivityProbe,
43
43
  worseConnectivityOutcome,
44
44
  wrapScheduledTaskPrompt
45
- } from "./chunk-QPSEQLSI.js";
45
+ } from "./chunk-ST4PZ6RF.js";
46
46
  import {
47
47
  parsePsRows
48
48
  } from "./chunk-XWVM4KPK.js";
@@ -5549,7 +5549,7 @@ function exchangeFailureKind(err) {
5549
5549
  }
5550
5550
 
5551
5551
  // src/lib/api-client.ts
5552
- var agtCliVersion = true ? "0.28.546" : "dev";
5552
+ var agtCliVersion = true ? "0.28.547" : "dev";
5553
5553
  var lastConfigHash = null;
5554
5554
  function setConfigHash(hash) {
5555
5555
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -8861,4 +8861,4 @@ export {
8861
8861
  managerInstallSystemUnitCommand,
8862
8862
  managerUninstallSystemUnitCommand
8863
8863
  };
8864
- //# sourceMappingURL=chunk-7WHF3QRW.js.map
8864
+ //# sourceMappingURL=chunk-SYHPBJK7.js.map
@@ -100,7 +100,7 @@ async function spawnPairSession(session) {
100
100
  return { ok: true };
101
101
  } catch {
102
102
  }
103
- const { resolveClaudeBinary } = await import("./persistent-session-FM5746XM.js");
103
+ const { resolveClaudeBinary } = await import("./persistent-session-KVONGDAL.js");
104
104
  const claudeBin = resolveClaudeBinary();
105
105
  const pairEnv = {
106
106
  ...process.env,
@@ -373,4 +373,4 @@ export {
373
373
  startClaudePair,
374
374
  submitClaudePairCode
375
375
  };
376
- //# sourceMappingURL=claude-pair-runtime-R3R5OWDM.js.map
376
+ //# sourceMappingURL=claude-pair-runtime-TZKJGXZU.js.map
@@ -53,7 +53,7 @@ import {
53
53
  safeWriteJsonAtomic,
54
54
  setConfigHash,
55
55
  tripClass
56
- } from "../chunk-7WHF3QRW.js";
56
+ } from "../chunk-SYHPBJK7.js";
57
57
  import {
58
58
  getProjectDir as getProjectDir2,
59
59
  getReadyTasks,
@@ -181,7 +181,7 @@ import {
181
181
  toOpencodeModel,
182
182
  transcriptActivityAgeSeconds,
183
183
  writeEgressAllowlist
184
- } from "../chunk-QPSEQLSI.js";
184
+ } from "../chunk-ST4PZ6RF.js";
185
185
  import {
186
186
  reapOrphanChannelMcps
187
187
  } from "../chunk-XWVM4KPK.js";
@@ -10455,7 +10455,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
10455
10455
  var lastVersionCheckAt = 0;
10456
10456
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
10457
10457
  var lastResponsivenessProbeAt = 0;
10458
- var agtCliVersion = true ? "0.28.546" : "dev";
10458
+ var agtCliVersion = true ? "0.28.547" : "dev";
10459
10459
  function resolveBrewPath(execFileSync2) {
10460
10460
  try {
10461
10461
  const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -11759,7 +11759,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
11759
11759
  if (codeNames.length === 0) return;
11760
11760
  void (async () => {
11761
11761
  try {
11762
- const { collectDiagnostics } = await import("../persistent-session-FM5746XM.js");
11762
+ const { collectDiagnostics } = await import("../persistent-session-KVONGDAL.js");
11763
11763
  await api.post("/host/heartbeat", {
11764
11764
  host_id: hostId,
11765
11765
  agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor)
@@ -11867,7 +11867,7 @@ async function pollCycle() {
11867
11867
  }
11868
11868
  try {
11869
11869
  const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
11870
- const { collectDiagnostics } = await import("../persistent-session-FM5746XM.js");
11870
+ const { collectDiagnostics } = await import("../persistent-session-KVONGDAL.js");
11871
11871
  const diagCodeNames = [...agentState.persistentSessionAgents];
11872
11872
  const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor) : void 0;
11873
11873
  let tailscaleHostname;
@@ -11990,7 +11990,7 @@ async function pollCycle() {
11990
11990
  collectPanelessActivityProbes,
11991
11991
  getResponsivenessIntervalMs,
11992
11992
  occupancyQualificationClassifications
11993
- } = await import("../responsiveness-probe-WZMDBY3T.js");
11993
+ } = await import("../responsiveness-probe-OUHRYJYH.js");
11994
11994
  const probeIntervalMs = getResponsivenessIntervalMs();
11995
11995
  if (now - lastResponsivenessProbeAt > probeIntervalMs) {
11996
11996
  const probeCodeNames = [...agentState.persistentSessionAgents];
@@ -12081,7 +12081,7 @@ async function pollCycle() {
12081
12081
  collectResponsivenessProbes,
12082
12082
  livePendingInboundOldestAgeSeconds,
12083
12083
  parkPendingInbound
12084
- } = await import("../responsiveness-probe-WZMDBY3T.js");
12084
+ } = await import("../responsiveness-probe-OUHRYJYH.js");
12085
12085
  const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-NDP36U7O.js");
12086
12086
  const wedgeNow = /* @__PURE__ */ new Date();
12087
12087
  const liveAgents = agentState.persistentSessionAgents;
@@ -15611,7 +15611,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
15611
15611
  void api.post("/host/restart-ack", { host_id: hostId, agent_id: agentId, restart_requested_at: requestedAt }).catch((err) => log(`[restart-lane] ack failed for '${codeName}': ${err.message}`));
15612
15612
  void (async () => {
15613
15613
  try {
15614
- const { collectDiagnostics } = await import("../persistent-session-FM5746XM.js");
15614
+ const { collectDiagnostics } = await import("../persistent-session-KVONGDAL.js");
15615
15615
  await api.post("/host/heartbeat", {
15616
15616
  host_id: hostId,
15617
15617
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor)
@@ -15661,7 +15661,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
15661
15661
  }
15662
15662
  try {
15663
15663
  const hostId = await getHostId();
15664
- const { collectDiagnostics } = await import("../persistent-session-FM5746XM.js");
15664
+ const { collectDiagnostics } = await import("../persistent-session-KVONGDAL.js");
15665
15665
  await api.post("/host/heartbeat", {
15666
15666
  host_id: hostId,
15667
15667
  agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor)
@@ -16185,7 +16185,7 @@ async function processClaudePairSessions(agents) {
16185
16185
  killPairSession,
16186
16186
  pairTmuxSession,
16187
16187
  finalizeClaudePairOnboarding
16188
- } = await import("../claude-pair-runtime-R3R5OWDM.js");
16188
+ } = await import("../claude-pair-runtime-TZKJGXZU.js");
16189
16189
  for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
16190
16190
  log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
16191
16191
  const killed = await killPairSession(pairTmuxSession(pairId));
@@ -1094,11 +1094,11 @@ var require_util = __commonJS({
1094
1094
  return false;
1095
1095
  }
1096
1096
  exports.schemaHasRules = schemaHasRules;
1097
- function schemaHasRulesButRef(schema, RULES) {
1097
+ function schemaHasRulesButRef(schema, RULES2) {
1098
1098
  if (typeof schema == "boolean")
1099
1099
  return !schema;
1100
1100
  for (const key in schema)
1101
- if (key !== "$ref" && RULES.all[key])
1101
+ if (key !== "$ref" && RULES2.all[key])
1102
1102
  return true;
1103
1103
  return false;
1104
1104
  }
@@ -2492,17 +2492,17 @@ var require_validate = __commonJS({
2492
2492
  }
2493
2493
  function schemaKeywords(it, types, typeErrors, errsCount) {
2494
2494
  const { gen, schema, data, allErrors, opts, self } = it;
2495
- const { RULES } = self;
2496
- if (schema.$ref && (opts.ignoreKeywordsWithRef || !(0, util_1.schemaHasRulesButRef)(schema, RULES))) {
2497
- gen.block(() => keywordCode(it, "$ref", RULES.all.$ref.definition));
2495
+ const { RULES: RULES2 } = self;
2496
+ if (schema.$ref && (opts.ignoreKeywordsWithRef || !(0, util_1.schemaHasRulesButRef)(schema, RULES2))) {
2497
+ gen.block(() => keywordCode(it, "$ref", RULES2.all.$ref.definition));
2498
2498
  return;
2499
2499
  }
2500
2500
  if (!opts.jtd)
2501
2501
  checkStrictTypes(it, types);
2502
2502
  gen.block(() => {
2503
- for (const group of RULES.rules)
2503
+ for (const group of RULES2.rules)
2504
2504
  groupKeywords(group);
2505
- groupKeywords(RULES.post);
2505
+ groupKeywords(RULES2.post);
2506
2506
  });
2507
2507
  function groupKeywords(group) {
2508
2508
  if (!(0, applicability_1.shouldUseGroup)(schema, group))
@@ -4204,10 +4204,10 @@ var require_core = __commonJS({
4204
4204
  }
4205
4205
  // Remove keyword
4206
4206
  removeKeyword(keyword) {
4207
- const { RULES } = this;
4208
- delete RULES.keywords[keyword];
4209
- delete RULES.all[keyword];
4210
- for (const group of RULES.rules) {
4207
+ const { RULES: RULES2 } = this;
4208
+ delete RULES2.keywords[keyword];
4209
+ delete RULES2.all[keyword];
4210
+ for (const group of RULES2.rules) {
4211
4211
  const i = group.rules.findIndex((rule) => rule.keyword === keyword);
4212
4212
  if (i >= 0)
4213
4213
  group.rules.splice(i, 1);
@@ -4375,9 +4375,9 @@ var require_core = __commonJS({
4375
4375
  }
4376
4376
  var KEYWORD_NAME = /^[a-z_$][a-z0-9_$:-]*$/i;
4377
4377
  function checkKeyword(keyword, def) {
4378
- const { RULES } = this;
4378
+ const { RULES: RULES2 } = this;
4379
4379
  (0, util_1.eachItem)(keyword, (kwd) => {
4380
- if (RULES.keywords[kwd])
4380
+ if (RULES2.keywords[kwd])
4381
4381
  throw new Error(`Keyword ${kwd} is already defined`);
4382
4382
  if (!KEYWORD_NAME.test(kwd))
4383
4383
  throw new Error(`Keyword ${kwd} has invalid name`);
@@ -4393,13 +4393,13 @@ var require_core = __commonJS({
4393
4393
  const post = definition === null || definition === void 0 ? void 0 : definition.post;
4394
4394
  if (dataType && post)
4395
4395
  throw new Error('keyword with "post" flag cannot have "type"');
4396
- const { RULES } = this;
4397
- let ruleGroup = post ? RULES.post : RULES.rules.find(({ type: t }) => t === dataType);
4396
+ const { RULES: RULES2 } = this;
4397
+ let ruleGroup = post ? RULES2.post : RULES2.rules.find(({ type: t }) => t === dataType);
4398
4398
  if (!ruleGroup) {
4399
4399
  ruleGroup = { type: dataType, rules: [] };
4400
- RULES.rules.push(ruleGroup);
4400
+ RULES2.rules.push(ruleGroup);
4401
4401
  }
4402
- RULES.keywords[keyword] = true;
4402
+ RULES2.keywords[keyword] = true;
4403
4403
  if (!definition)
4404
4404
  return;
4405
4405
  const rule = {
@@ -4414,7 +4414,7 @@ var require_core = __commonJS({
4414
4414
  addBeforeRule.call(this, ruleGroup, rule, definition.before);
4415
4415
  else
4416
4416
  ruleGroup.rules.push(rule);
4417
- RULES.all[keyword] = rule;
4417
+ RULES2.all[keyword] = rule;
4418
4418
  (_a = definition.implements) === null || _a === void 0 ? void 0 : _a.forEach((kwd) => this.addKeyword(kwd));
4419
4419
  }
4420
4420
  function addBeforeRule(ruleGroup, rule, before) {
@@ -20985,7 +20985,63 @@ var StdioServerTransport = class {
20985
20985
  }
20986
20986
  };
20987
20987
 
20988
+ // src/redact.ts
20989
+ var REDACTED = "[redacted]";
20990
+ var MAX_RELAYED_MESSAGE_CHARS = 600;
20991
+ function truncationMarker(dropped) {
20992
+ return `\u2026 [truncated, ${dropped} chars]`;
20993
+ }
20994
+ function truncateWithMarker(text, max) {
20995
+ if (text.length <= max) return text;
20996
+ let keep = max;
20997
+ for (let i = 0; i < 8; i++) {
20998
+ const candidate = Math.max(0, max - truncationMarker(text.length - keep).length);
20999
+ if (candidate === keep) break;
21000
+ keep = candidate;
21001
+ }
21002
+ return text.slice(0, keep) + truncationMarker(text.length - keep);
21003
+ }
21004
+ var RULES = [
21005
+ // Authorization headers, with or without a scheme.
21006
+ { name: "authorization-header", pattern: /\b(authorization\s*[:=]\s*)(?:bearer\s+|basic\s+)?\S+/gi, replace: `$1${REDACTED}` },
21007
+ { name: "bearer", pattern: /\bbearer\s+[A-Za-z0-9._~+/-]{8,}=*/gi, replace: `Bearer ${REDACTED}` },
21008
+ // Cookies.
21009
+ { name: "cookie-header", pattern: /\b(set-cookie|cookie)\s*[:=]\s*\S+/gi, replace: `$1: ${REDACTED}` },
21010
+ // JWTs — three base64url segments. Caught before generic blobs.
21011
+ { name: "jwt", pattern: /\beyJ[A-Za-z0-9_-]{5,}\.[A-Za-z0-9_-]{5,}\.[A-Za-z0-9_-]{5,}/g, replace: REDACTED },
21012
+ // Platform + vendor key prefixes. `tlk_` is ours (host API keys).
21013
+ { name: "prefixed-key", pattern: /\b(?:tlk|sk|pk|rk|gho|ghp|ghu|ghs|ghr|github_pat|xoxb|xoxp|xoxa|xapp|lin_api|shpat|shpss)[_-][A-Za-z0-9_-]{8,}/gi, replace: REDACTED },
21014
+ // AWS access key ids.
21015
+ { name: "aws-access-key-id", pattern: /\b(?:AKIA|ASIA|ABIA|ACCA)[0-9A-Z]{12,}\b/g, replace: REDACTED },
21016
+ // Presigned-URL signature params and their friends.
21017
+ { name: "signature-param", pattern: /\b(X-Amz-Signature|X-Amz-Security-Token|X-Amz-Credential|Signature|sig)=[^&\s"']+/gi, replace: `$1=${REDACTED}` },
21018
+ // Generic secret-bearing key=value / key: value pairs.
21019
+ { name: "secret-kv", pattern: /\b(password|passwd|pwd|secret|token|api[-_]?key|access[-_]?key|private[-_]?key|client[-_]?secret|refresh[-_]?token|session[-_]?token|credential)s?\s*[:=]\s*(?:"[^"]*"|'[^']*'|\S+)/gi, replace: `$1=${REDACTED}` },
21020
+ // PEM blocks.
21021
+ { name: "pem", pattern: /-----BEGIN[^-]{0,64}-----[\s\S]*?-----END[^-]{0,64}-----/g, replace: REDACTED }
21022
+ ];
21023
+ function redactSensitive(message) {
21024
+ let out = message;
21025
+ for (const rule of RULES) {
21026
+ out = out.replace(rule.pattern, rule.replace);
21027
+ }
21028
+ out = out.replace(/\s+/g, " ").trim();
21029
+ return truncateWithMarker(out, MAX_RELAYED_MESSAGE_CHARS);
21030
+ }
21031
+
20988
21032
  // src/broker-client.ts
21033
+ var REDACTED_ONLY = REDACTED;
21034
+ function serverMessageFrom(payload) {
21035
+ if (!payload || typeof payload !== "object") return null;
21036
+ for (const key of ["error", "reason"]) {
21037
+ const v = payload[key];
21038
+ if (typeof v === "string" && v.trim() !== "") {
21039
+ const safe = redactSensitive(v);
21040
+ return safe.trim() === "" || safe.trim() === REDACTED_ONLY ? null : safe;
21041
+ }
21042
+ }
21043
+ return null;
21044
+ }
20989
21045
  function makeError(status, message, detail) {
20990
21046
  const err = new Error(message);
20991
21047
  err.status = status;
@@ -21070,7 +21126,7 @@ var AdminDebugClient = class _AdminDebugClient {
21070
21126
  parseFailed = true;
21071
21127
  }
21072
21128
  if (!res.ok) {
21073
- const message = payload && typeof payload === "object" && "error" in payload && typeof payload.error === "string" ? payload.error : `admin-debug request failed: ${res.status}`;
21129
+ const message = serverMessageFrom(payload) ?? `admin-debug request failed: ${res.status}`;
21074
21130
  throw makeError(res.status, message, payload);
21075
21131
  }
21076
21132
  if (parseFailed) {
@@ -21195,7 +21251,7 @@ var AdminDebugClient = class _AdminDebugClient {
21195
21251
  parseFailed = true;
21196
21252
  }
21197
21253
  if (!res.ok) {
21198
- const message = payload && typeof payload === "object" && "error" in payload && typeof payload.error === "string" ? payload.error : `admin-debug request failed: ${res.status}`;
21254
+ const message = serverMessageFrom(payload) ?? `admin-debug request failed: ${res.status}`;
21199
21255
  throw makeError(res.status, message, payload);
21200
21256
  }
21201
21257
  if (parseFailed) {
@@ -41,7 +41,7 @@ import {
41
41
  writeDirectChatSessionState,
42
42
  writeEgressAllowlist,
43
43
  writePersistentClaudeWrapper
44
- } from "./chunk-QPSEQLSI.js";
44
+ } from "./chunk-ST4PZ6RF.js";
45
45
  import "./chunk-XWVM4KPK.js";
46
46
  export {
47
47
  EGRESS_BASELINE_DOMAINS,
@@ -87,4 +87,4 @@ export {
87
87
  writeEgressAllowlist,
88
88
  writePersistentClaudeWrapper
89
89
  };
90
- //# sourceMappingURL=persistent-session-FM5746XM.js.map
90
+ //# sourceMappingURL=persistent-session-KVONGDAL.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  paneLogPath
3
- } from "./chunk-QPSEQLSI.js";
3
+ } from "./chunk-ST4PZ6RF.js";
4
4
  import "./chunk-XWVM4KPK.js";
5
5
 
6
6
  // src/lib/responsiveness-probe.ts
@@ -689,4 +689,4 @@ export {
689
689
  readAndResetSlackReplyBindingClassifications,
690
690
  readAndResetSlackReplyTargetClassifications
691
691
  };
692
- //# sourceMappingURL=responsiveness-probe-WZMDBY3T.js.map
692
+ //# sourceMappingURL=responsiveness-probe-OUHRYJYH.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integrity-labs/agt-cli",
3
- "version": "0.28.546",
3
+ "version": "0.28.547",
4
4
  "description": "Augmented Team CLI — agent provisioning and management",
5
5
  "type": "module",
6
6
  "engines": {