@integrity-labs/agt-cli 0.28.1248 → 0.28.1250

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.
Files changed (30) hide show
  1. package/dist/bin/agt.js +6 -6
  2. package/dist/{chunk-VGL726BP.js → chunk-5ALBA7KT.js} +73 -18
  3. package/dist/chunk-5ALBA7KT.js.map +1 -0
  4. package/dist/{chunk-73NMB6QK.js → chunk-DFJ5E5EW.js} +19 -1
  5. package/dist/{chunk-73NMB6QK.js.map → chunk-DFJ5E5EW.js.map} +1 -1
  6. package/dist/{chunk-RSFDRIIC.js → chunk-IUMFAYZO.js} +26 -3
  7. package/dist/{chunk-RSFDRIIC.js.map → chunk-IUMFAYZO.js.map} +1 -1
  8. package/dist/{chunk-EKFRF2GR.js → chunk-JOBL3ZF4.js} +2 -2
  9. package/dist/{chunk-OYLLSEI5.js → chunk-SMD577FW.js} +2 -2
  10. package/dist/{claude-code-updater-G4Y3CMTI.js → claude-code-updater-5MPOBIWN.js} +3 -3
  11. package/dist/{claude-pair-runtime-ZGYYBH3G.js → claude-pair-runtime-SNU3CU3K.js} +3 -3
  12. package/dist/lib/manager-worker.js +331 -104
  13. package/dist/lib/manager-worker.js.map +1 -1
  14. package/dist/mcp/direct-chat-channel.js +18 -0
  15. package/dist/mcp/index.js +18 -0
  16. package/dist/mcp/origami.js +18 -0
  17. package/dist/mcp/slack-channel.js +18 -0
  18. package/dist/mcp/telegram-channel.js +205 -1
  19. package/dist/{persistent-session-R2RY5NJ3.js → persistent-session-SYCA6MW2.js} +4 -4
  20. package/dist/{responsiveness-probe-MU5WMZSZ.js → responsiveness-probe-BUXWVOSA.js} +4 -4
  21. package/dist/{session-auth-dead-B6JRV3QH.js → session-auth-dead-G5NHWSRP.js} +3 -3
  22. package/package.json +1 -1
  23. package/dist/chunk-VGL726BP.js.map +0 -1
  24. /package/dist/{chunk-EKFRF2GR.js.map → chunk-JOBL3ZF4.js.map} +0 -0
  25. /package/dist/{chunk-OYLLSEI5.js.map → chunk-SMD577FW.js.map} +0 -0
  26. /package/dist/{claude-code-updater-G4Y3CMTI.js.map → claude-code-updater-5MPOBIWN.js.map} +0 -0
  27. /package/dist/{claude-pair-runtime-ZGYYBH3G.js.map → claude-pair-runtime-SNU3CU3K.js.map} +0 -0
  28. /package/dist/{persistent-session-R2RY5NJ3.js.map → persistent-session-SYCA6MW2.js.map} +0 -0
  29. /package/dist/{responsiveness-probe-MU5WMZSZ.js.map → responsiveness-probe-BUXWVOSA.js.map} +0 -0
  30. /package/dist/{session-auth-dead-B6JRV3QH.js.map → session-auth-dead-G5NHWSRP.js.map} +0 -0
package/dist/bin/agt.js CHANGED
@@ -40,17 +40,17 @@ import {
40
40
  success,
41
41
  table,
42
42
  warn
43
- } from "../chunk-VGL726BP.js";
43
+ } from "../chunk-5ALBA7KT.js";
44
44
  import {
45
45
  getProjectDir,
46
46
  isSessionResumeDisabled,
47
47
  readDirectChatSessionState
48
- } from "../chunk-RSFDRIIC.js";
48
+ } from "../chunk-IUMFAYZO.js";
49
49
  import {
50
50
  markDailySessionSpawn,
51
51
  sessionFileExists,
52
52
  sessionTranscriptDir
53
- } from "../chunk-OYLLSEI5.js";
53
+ } from "../chunk-SMD577FW.js";
54
54
  import "../chunk-HYQ7VOC3.js";
55
55
  import "../chunk-6HBXEJHO.js";
56
56
  import "../chunk-XWVM4KPK.js";
@@ -83,7 +83,7 @@ import {
83
83
  requiredMcpWildcard,
84
84
  resolveChannels,
85
85
  serializeManifestForSlackCli
86
- } from "../chunk-73NMB6QK.js";
86
+ } from "../chunk-DFJ5E5EW.js";
87
87
  import "../chunk-AIUIMEUS.js";
88
88
  import "../chunk-DGUM43GV.js";
89
89
 
@@ -5205,7 +5205,7 @@ import { execFileSync, execSync } from "child_process";
5205
5205
  import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
5206
5206
  import chalk17 from "chalk";
5207
5207
  import ora15 from "ora";
5208
- var cliVersion = true ? "0.28.1248" : "dev";
5208
+ var cliVersion = true ? "0.28.1250" : "dev";
5209
5209
  async function fetchLatestVersion() {
5210
5210
  const host2 = getHost();
5211
5211
  if (!host2) return null;
@@ -6465,7 +6465,7 @@ function handleError(err) {
6465
6465
  }
6466
6466
 
6467
6467
  // src/bin/agt.ts
6468
- var cliVersion2 = true ? "0.28.1248" : "dev";
6468
+ var cliVersion2 = true ? "0.28.1250" : "dev";
6469
6469
  var program = new Command();
6470
6470
  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");
6471
6471
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -18,11 +18,11 @@ import {
18
18
  requiresRemoteMcpToolGate,
19
19
  shellQuote,
20
20
  withheldRemoteMcpMessage
21
- } from "./chunk-RSFDRIIC.js";
21
+ } from "./chunk-IUMFAYZO.js";
22
22
  import {
23
23
  readDailySessionPin,
24
24
  sessionTranscriptDir
25
- } from "./chunk-OYLLSEI5.js";
25
+ } from "./chunk-SMD577FW.js";
26
26
  import {
27
27
  classifyUnanswerablePane,
28
28
  isConsumerTermsDialogVisible,
@@ -95,7 +95,7 @@ import {
95
95
  scanConfigForLiteralSecrets,
96
96
  worseConnectivityOutcome,
97
97
  wrapScheduledTaskPrompt
98
- } from "./chunk-73NMB6QK.js";
98
+ } from "./chunk-DFJ5E5EW.js";
99
99
  import {
100
100
  claudeJsonPathFor,
101
101
  effectiveClaudeJsonPath,
@@ -2745,24 +2745,32 @@ function syncMcpToProject(codeName) {
2745
2745
  const projectDir = getProjectDir2(codeName);
2746
2746
  const provisionMcpPath = join5(agentDir, "provision", ".mcp.json");
2747
2747
  const projectMcpPath = join5(projectDir, ".mcp.json");
2748
+ let content = null;
2748
2749
  try {
2749
- const content = readFileSync5(provisionMcpPath, "utf-8");
2750
- mkdirSync4(projectDir, { recursive: true });
2751
- writeFileSync5(projectMcpPath, content, { mode: MCP_FILE_MODE });
2752
- try {
2753
- chmodSync4(projectMcpPath, MCP_FILE_MODE);
2754
- } catch {
2755
- }
2750
+ content = readFileSync5(provisionMcpPath, "utf-8");
2751
+ } catch {
2752
+ }
2753
+ if (content !== null)
2756
2754
  try {
2757
- const mismatches = mcpMirrorParityErrors(JSON.parse(content), JSON.parse(readFileSync5(projectMcpPath, "utf-8")));
2758
- for (const m of mismatches) {
2759
- process.stderr.write(`${formatMirrorMismatch(m)} agent=${codeName}
2755
+ mkdirSync4(projectDir, { recursive: true });
2756
+ writeFileSync5(projectMcpPath, content, { mode: MCP_FILE_MODE });
2757
+ try {
2758
+ chmodSync4(projectMcpPath, MCP_FILE_MODE);
2759
+ } catch {
2760
+ }
2761
+ try {
2762
+ const mismatches = mcpMirrorParityErrors(JSON.parse(content), JSON.parse(readFileSync5(projectMcpPath, "utf-8")));
2763
+ for (const m of mismatches) {
2764
+ process.stderr.write(`${formatMirrorMismatch(m)} agent=${codeName}
2760
2765
  `);
2766
+ }
2767
+ } catch {
2761
2768
  }
2762
- } catch {
2769
+ } catch (err) {
2770
+ noteMcpWriteFailure(codeName);
2771
+ process.stderr.write(`[claudecode] project .mcp.json mirror write failed for '${codeName}': ${err.message}
2772
+ `);
2763
2773
  }
2764
- } catch {
2765
- }
2766
2774
  renderChannelMessageHandlerForAgent(codeName);
2767
2775
  renderAugmentedWorkerForAgent(codeName);
2768
2776
  }
@@ -2809,9 +2817,14 @@ function renderChannelMessageHandlerForAgent(codeName) {
2809
2817
  }
2810
2818
  }
2811
2819
  }
2820
+ var mcpWriteFailures = /* @__PURE__ */ new Map();
2821
+ function noteMcpWriteFailure(codeName) {
2822
+ mcpWriteFailures.set(codeName, (mcpWriteFailures.get(codeName) ?? 0) + 1);
2823
+ }
2812
2824
  function writeMcpJsonGuarded(codeName, path, config) {
2813
2825
  const result = safeWriteMcpJson(path, config);
2814
2826
  if (!result.written) {
2827
+ noteMcpWriteFailure(codeName);
2815
2828
  process.stderr.write(`[manager-worker] [mcp-validate] skipping write for '${codeName}': ${formatValidationErrors(result.errors)}
2816
2829
  `);
2817
2830
  return false;
@@ -7771,6 +7784,48 @@ ${sections}`
7771
7784
  return {};
7772
7785
  return mcpServers;
7773
7786
  },
7787
+ syncMcpMirror(codeName) {
7788
+ const provisionMcpPath = join5(getAgentDir(codeName), "provision", ".mcp.json");
7789
+ try {
7790
+ readFileSync5(provisionMcpPath, "utf-8");
7791
+ } catch (err) {
7792
+ const missing = err.code === "ENOENT";
7793
+ if (!missing || existsSync4(join5(getProjectDir2(codeName), ".mcp.json"))) {
7794
+ noteMcpWriteFailure(codeName);
7795
+ process.stderr.write(`[claudecode] MCP mirror repair for '${codeName}': provision/.mcp.json ${missing ? "is missing" : "is unreadable"} while a project mirror exists; the mirror cannot be repaired from it
7796
+ `);
7797
+ }
7798
+ return;
7799
+ }
7800
+ syncMcpToProject(codeName);
7801
+ },
7802
+ consumeMcpWriteFailures(codeName) {
7803
+ const n = mcpWriteFailures.get(codeName) ?? 0;
7804
+ mcpWriteFailures.delete(codeName);
7805
+ return n;
7806
+ },
7807
+ readMcpServersOrNull(codeName) {
7808
+ let raw;
7809
+ try {
7810
+ raw = readFileSync5(join5(getAgentDir(codeName), "provision", ".mcp.json"), "utf-8");
7811
+ } catch (err) {
7812
+ return err.code === "ENOENT" ? {} : null;
7813
+ }
7814
+ let parsed;
7815
+ try {
7816
+ parsed = JSON.parse(raw);
7817
+ } catch {
7818
+ return null;
7819
+ }
7820
+ if (!parsed || typeof parsed !== "object" || Array.isArray(parsed))
7821
+ return null;
7822
+ const mcpServers = parsed["mcpServers"];
7823
+ if (mcpServers === void 0)
7824
+ return {};
7825
+ if (!mcpServers || typeof mcpServers !== "object" || Array.isArray(mcpServers))
7826
+ return null;
7827
+ return mcpServers;
7828
+ },
7774
7829
  removeMcpServer(codeName, serverId) {
7775
7830
  const agentDir = getAgentDir(codeName);
7776
7831
  const mcpJsonPath = join5(agentDir, "provision", ".mcp.json");
@@ -8095,7 +8150,7 @@ function exchangeFailureKind(err) {
8095
8150
  }
8096
8151
 
8097
8152
  // src/lib/api-client.ts
8098
- var agtCliVersion = true ? "0.28.1248" : "dev";
8153
+ var agtCliVersion = true ? "0.28.1250" : "dev";
8099
8154
  var lastConfigHash = null;
8100
8155
  function setConfigHash(hash) {
8101
8156
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -13750,4 +13805,4 @@ export {
13750
13805
  managerInstallSystemUnitCommand,
13751
13806
  managerUninstallSystemUnitCommand
13752
13807
  };
13753
- //# sourceMappingURL=chunk-VGL726BP.js.map
13808
+ //# sourceMappingURL=chunk-5ALBA7KT.js.map