@integrity-labs/agt-cli 0.10.3 → 0.10.5

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-6YGOQRAR.js";
35
+ } from "../chunk-R2DDHROT.js";
36
36
 
37
37
  // src/bin/agt.ts
38
38
  import { join as join11 } from "path";
@@ -3411,7 +3411,7 @@ async function acpxCloseCommand(agent2, _opts, cmd) {
3411
3411
  import { execSync } from "child_process";
3412
3412
  import chalk19 from "chalk";
3413
3413
  import ora15 from "ora";
3414
- var cliVersion = true ? "0.10.3" : "dev";
3414
+ var cliVersion = true ? "0.10.5" : "dev";
3415
3415
  async function fetchLatestVersion() {
3416
3416
  const host2 = getHost();
3417
3417
  if (!host2) return null;
@@ -3810,7 +3810,7 @@ function handleError(err) {
3810
3810
  }
3811
3811
 
3812
3812
  // src/bin/agt.ts
3813
- var cliVersion2 = true ? "0.10.3" : "dev";
3813
+ var cliVersion2 = true ? "0.10.5" : "dev";
3814
3814
  var program = new Command();
3815
3815
  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");
3816
3816
  program.hook("preAction", (thisCommand) => {
@@ -2149,12 +2149,25 @@ function deployArtifactsToProject(codeName, provisionDir) {
2149
2149
  const projectDir = getProjectDir(codeName);
2150
2150
  mkdirSync3(projectDir, { recursive: true });
2151
2151
  const artifactFiles = ["CLAUDE.md", "settings.json", ".mcp.json", "CHARTER.md", "TOOLS.md"];
2152
+ const SKILLS_START = "<!-- AGT:SKILLS_INDEX_START -->";
2153
+ const SKILLS_END = "<!-- AGT:SKILLS_INDEX_END -->";
2152
2154
  for (const file of artifactFiles) {
2153
2155
  const src = join3(provisionDir, file);
2154
2156
  const dest = join3(projectDir, file);
2155
2157
  try {
2156
- const content = readFileSync3(src, "utf-8");
2157
- writeFileSync3(dest, content);
2158
+ const srcContent = readFileSync3(src, "utf-8");
2159
+ if (file === "CLAUDE.md" && existsSync3(dest)) {
2160
+ const destContent = readFileSync3(dest, "utf-8");
2161
+ const stripIndex = (s) => s.replace(new RegExp(`${SKILLS_START}[\\s\\S]*?${SKILLS_END}`), "").trimEnd();
2162
+ if (stripIndex(srcContent) === stripIndex(destContent))
2163
+ continue;
2164
+ const indexMatch = destContent.match(new RegExp(`${SKILLS_START}[\\s\\S]*?${SKILLS_END}`));
2165
+ if (indexMatch) {
2166
+ writeFileSync3(dest, srcContent.trimEnd() + "\n\n" + indexMatch[0] + "\n");
2167
+ continue;
2168
+ }
2169
+ }
2170
+ writeFileSync3(dest, srcContent);
2158
2171
  } catch {
2159
2172
  }
2160
2173
  }
@@ -2178,8 +2191,15 @@ function deployArtifactsToProject(codeName, provisionDir) {
2178
2191
  if (!existsSync3(srcSkillFile))
2179
2192
  continue;
2180
2193
  const destFolder = join3(destSkillsDir, skillFolder);
2194
+ const destFile = join3(destFolder, "SKILL.md");
2195
+ const srcContent = readFileSync3(srcSkillFile, "utf-8");
2196
+ try {
2197
+ if (existsSync3(destFile) && readFileSync3(destFile, "utf-8") === srcContent)
2198
+ continue;
2199
+ } catch {
2200
+ }
2181
2201
  mkdirSync3(destFolder, { recursive: true });
2182
- writeFileSync3(join3(destFolder, "SKILL.md"), readFileSync3(srcSkillFile, "utf-8"));
2202
+ writeFileSync3(destFile, srcContent);
2183
2203
  }
2184
2204
  }
2185
2205
  } catch {
@@ -2643,6 +2663,7 @@ ${sections}`
2643
2663
  } else if (channelId === "slack") {
2644
2664
  const botToken = config["bot_token"];
2645
2665
  const appToken = config["app_token"];
2666
+ const threadAutoFollow = config["thread_auto_follow"];
2646
2667
  if (botToken) {
2647
2668
  const projectDir = getProjectDir(codeName);
2648
2669
  mkdirSync3(projectDir, { recursive: true });
@@ -2654,7 +2675,8 @@ ${sections}`
2654
2675
  args: existsSync3(localSlackChannel) ? [localSlackChannel] : ["-y", "@augmented/claude-code-channel-slack"],
2655
2676
  env: {
2656
2677
  SLACK_BOT_TOKEN: botToken,
2657
- ...appToken ? { SLACK_APP_TOKEN: appToken } : {}
2678
+ ...appToken ? { SLACK_APP_TOKEN: appToken } : {},
2679
+ ...threadAutoFollow && threadAutoFollow !== "off" ? { SLACK_THREAD_AUTO_FOLLOW: threadAutoFollow } : {}
2658
2680
  }
2659
2681
  }
2660
2682
  }
@@ -2706,13 +2728,16 @@ ${sections}`
2706
2728
  if (!botToken)
2707
2729
  return;
2708
2730
  const localSlackChannel = join3(getHomeDir3(), ".augmented", "_mcp", "slack-channel.js");
2731
+ const slackThreadAutoFollow = config["thread_auto_follow"];
2732
+ const slackAutoFollowEnv = slackThreadAutoFollow && slackThreadAutoFollow !== "off" ? { SLACK_THREAD_AUTO_FOLLOW: slackThreadAutoFollow } : {};
2709
2733
  if (isPersistent && existsSync3(localSlackChannel)) {
2710
2734
  mcpServers["slack"] = {
2711
2735
  command: "node",
2712
2736
  args: [localSlackChannel],
2713
2737
  env: {
2714
2738
  SLACK_BOT_TOKEN: botToken,
2715
- ...appToken ? { SLACK_APP_TOKEN: appToken } : {}
2739
+ ...appToken ? { SLACK_APP_TOKEN: appToken } : {},
2740
+ ...slackAutoFollowEnv
2716
2741
  }
2717
2742
  };
2718
2743
  } else {
@@ -2721,7 +2746,8 @@ ${sections}`
2721
2746
  args: ["-y", "@augmented/claude-code-channel-slack"],
2722
2747
  env: {
2723
2748
  SLACK_BOT_TOKEN: botToken,
2724
- ...appToken ? { SLACK_APP_TOKEN: appToken } : {}
2749
+ ...appToken ? { SLACK_APP_TOKEN: appToken } : {},
2750
+ ...slackAutoFollowEnv
2725
2751
  }
2726
2752
  };
2727
2753
  }
@@ -5539,4 +5565,4 @@ export {
5539
5565
  detectDrift,
5540
5566
  provision
5541
5567
  };
5542
- //# sourceMappingURL=chunk-6YGOQRAR.js.map
5568
+ //# sourceMappingURL=chunk-R2DDHROT.js.map