@integrity-labs/agt-cli 0.10.24 → 0.10.28

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
@@ -32,7 +32,7 @@ import {
32
32
  resolveChannels,
33
33
  serializeManifestForSlackCli,
34
34
  setActiveTeam
35
- } from "../chunk-VWYAPGHB.js";
35
+ } from "../chunk-G44TMA6G.js";
36
36
 
37
37
  // src/bin/agt.ts
38
38
  import { join as join11 } from "path";
@@ -3715,7 +3715,7 @@ import { execFileSync, execSync } from "child_process";
3715
3715
  import { existsSync as existsSync5, realpathSync } from "fs";
3716
3716
  import chalk20 from "chalk";
3717
3717
  import ora15 from "ora";
3718
- var cliVersion = true ? "0.10.24" : "dev";
3718
+ var cliVersion = true ? "0.10.28" : "dev";
3719
3719
  async function fetchLatestVersion() {
3720
3720
  const host2 = getHost();
3721
3721
  if (!host2) return null;
@@ -4164,7 +4164,7 @@ function handleError(err) {
4164
4164
  }
4165
4165
 
4166
4166
  // src/bin/agt.ts
4167
- var cliVersion2 = true ? "0.10.24" : "dev";
4167
+ var cliVersion2 = true ? "0.10.28" : "dev";
4168
4168
  var program = new Command();
4169
4169
  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");
4170
4170
  program.hook("preAction", (thisCommand) => {
@@ -1909,7 +1909,7 @@ registerFramework(nemoClawAdapter);
1909
1909
 
1910
1910
  // ../../packages/core/dist/provisioning/frameworks/claudecode/index.js
1911
1911
  import { readFileSync as readFileSync3, writeFileSync as writeFileSync3, mkdirSync as mkdirSync3, existsSync as existsSync3, chmodSync as chmodSync3, readdirSync, rmSync } from "fs";
1912
- import { join as join3, relative } from "path";
1912
+ import { join as join3, relative, dirname as dirname3 } from "path";
1913
1913
  import { homedir as homedir2 } from "os";
1914
1914
  import { execFile as execFile3 } from "child_process";
1915
1915
 
@@ -2778,34 +2778,36 @@ ${sections}`
2778
2778
  const appToken = config["app_token"];
2779
2779
  const threadAutoFollow = config["thread_auto_follow"];
2780
2780
  if (botToken) {
2781
- const projectDir = getProjectDir(codeName);
2782
- mkdirSync3(projectDir, { recursive: true });
2783
2781
  const localSlackChannel = join3(getHomeDir3(), ".augmented", "_mcp", "slack-channel.js");
2784
- const channelConfig = {
2785
- mcpServers: {
2786
- slack: {
2787
- command: existsSync3(localSlackChannel) ? "node" : "npx",
2788
- args: existsSync3(localSlackChannel) ? [localSlackChannel] : ["-y", "@augmented/claude-code-channel-slack"],
2789
- env: {
2790
- SLACK_BOT_TOKEN: botToken,
2791
- ...appToken ? { SLACK_APP_TOKEN: appToken } : {},
2792
- ...threadAutoFollow && threadAutoFollow !== "off" ? { SLACK_THREAD_AUTO_FOLLOW: threadAutoFollow } : {}
2793
- }
2794
- }
2782
+ const slackEntry = {
2783
+ command: existsSync3(localSlackChannel) ? "node" : "npx",
2784
+ args: existsSync3(localSlackChannel) ? [localSlackChannel] : ["-y", "@augmented/claude-code-channel-slack"],
2785
+ env: {
2786
+ SLACK_BOT_TOKEN: botToken,
2787
+ ...appToken ? { SLACK_APP_TOKEN: appToken } : {},
2788
+ ...threadAutoFollow && threadAutoFollow !== "off" ? { SLACK_THREAD_AUTO_FOLLOW: threadAutoFollow } : {}
2795
2789
  }
2796
2790
  };
2797
- writeFileSync3(join3(projectDir, ".mcp-channels.json"), JSON.stringify(channelConfig, null, 2));
2798
- }
2799
- }
2800
- const mcpJsonPath2 = join3(agentDir, "provision", ".mcp.json");
2801
- try {
2802
- const mcpConfig2 = JSON.parse(readFileSync3(mcpJsonPath2, "utf-8"));
2803
- if (mcpConfig2.mcpServers?.[channelId]) {
2804
- delete mcpConfig2.mcpServers[channelId];
2805
- writeFileSync3(mcpJsonPath2, JSON.stringify(mcpConfig2, null, 2));
2791
+ const provisionMcpPath = join3(agentDir, "provision", ".mcp.json");
2792
+ mkdirSync3(dirname3(provisionMcpPath), { recursive: true });
2793
+ let mcpConfig2 = { mcpServers: {} };
2794
+ try {
2795
+ mcpConfig2 = JSON.parse(readFileSync3(provisionMcpPath, "utf-8"));
2796
+ if (!mcpConfig2.mcpServers)
2797
+ mcpConfig2.mcpServers = {};
2798
+ } catch {
2799
+ }
2800
+ mcpConfig2.mcpServers["slack"] = slackEntry;
2801
+ writeFileSync3(provisionMcpPath, JSON.stringify(mcpConfig2, null, 2));
2806
2802
  syncMcpToProject(codeName);
2803
+ const staleChannelsPath = join3(getProjectDir(codeName), ".mcp-channels.json");
2804
+ if (existsSync3(staleChannelsPath)) {
2805
+ try {
2806
+ rmSync(staleChannelsPath, { force: true });
2807
+ } catch {
2808
+ }
2809
+ }
2807
2810
  }
2808
- } catch {
2809
2811
  }
2810
2812
  return;
2811
2813
  }
@@ -5789,4 +5791,4 @@ export {
5789
5791
  detectDrift,
5790
5792
  provision
5791
5793
  };
5792
- //# sourceMappingURL=chunk-VWYAPGHB.js.map
5794
+ //# sourceMappingURL=chunk-G44TMA6G.js.map