@integrity-labs/agt-cli 0.15.10 → 0.15.11

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
@@ -46,7 +46,7 @@ import {
46
46
  success,
47
47
  table,
48
48
  warn
49
- } from "../chunk-EC6FSHOW.js";
49
+ } from "../chunk-LYWDRDJZ.js";
50
50
 
51
51
  // src/bin/agt.ts
52
52
  import { join as join10 } from "path";
@@ -3730,7 +3730,7 @@ import { execFileSync, execSync } from "child_process";
3730
3730
  import { existsSync as existsSync5, realpathSync } from "fs";
3731
3731
  import chalk17 from "chalk";
3732
3732
  import ora15 from "ora";
3733
- var cliVersion = true ? "0.15.10" : "dev";
3733
+ var cliVersion = true ? "0.15.11" : "dev";
3734
3734
  async function fetchLatestVersion() {
3735
3735
  const host2 = getHost();
3736
3736
  if (!host2) return null;
@@ -4179,7 +4179,7 @@ function handleError(err) {
4179
4179
  }
4180
4180
 
4181
4181
  // src/bin/agt.ts
4182
- var cliVersion2 = true ? "0.15.10" : "dev";
4182
+ var cliVersion2 = true ? "0.15.11" : "dev";
4183
4183
  var program = new Command();
4184
4184
  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");
4185
4185
  program.hook("preAction", (thisCommand) => {
@@ -3678,6 +3678,18 @@ ${sections}`
3678
3678
  const appToken = config["app_token"];
3679
3679
  const threadAutoFollow = config["thread_auto_follow"];
3680
3680
  const channelResponseMode = config["channel_response_mode"];
3681
+ const blockKitEnabled = config["block_kit_enabled"] === true;
3682
+ const blockKitAskUserEnabled = config["block_kit_ask_user_enabled"] === true;
3683
+ const blockKitDisabled = process.env["SLACK_BLOCK_KIT_DISABLED"] === "true";
3684
+ const resolvedAgtHost = process.env["AGT_HOST"]?.trim() || "https://api.augmented.team";
3685
+ const blockKitEnv = blockKitEnabled ? {
3686
+ SLACK_BLOCK_KIT_ENABLED: "true",
3687
+ ...blockKitAskUserEnabled ? { SLACK_BLOCK_KIT_ASK_USER_ENABLED: "true" } : {},
3688
+ ...blockKitDisabled ? { SLACK_BLOCK_KIT_DISABLED: "true" } : {},
3689
+ ...blockKitAskUserEnabled ? { AGT_HOST: resolvedAgtHost } : {},
3690
+ ...blockKitAskUserEnabled && process.env["AGT_API_KEY"] ? { AGT_API_KEY: process.env["AGT_API_KEY"] } : {},
3691
+ ...blockKitAskUserEnabled && options?.agentId ? { AGT_AGENT_ID: options.agentId } : {}
3692
+ } : {};
3681
3693
  if (botToken) {
3682
3694
  const localSlackChannel = join4(getHomeDir3(), ".augmented", "_mcp", "slack-channel.js");
3683
3695
  const slackEntry = {
@@ -3692,7 +3704,8 @@ ${sections}`
3692
3704
  // block tidy for the common case.
3693
3705
  ...channelResponseMode && channelResponseMode !== "mention_only" ? { SLACK_CHANNEL_RESPONSE_MODE: channelResponseMode } : {},
3694
3706
  // Scopes slack.upload_file uploads to the agent's project dir.
3695
- AGT_AGENT_CODE_NAME: codeName
3707
+ AGT_AGENT_CODE_NAME: codeName,
3708
+ ...blockKitEnv
3696
3709
  }
3697
3710
  };
3698
3711
  const provisionMcpPath = join4(agentDir, "provision", ".mcp.json");
@@ -3745,6 +3758,18 @@ ${sections}`
3745
3758
  const slackAutoFollowEnv = slackThreadAutoFollow && slackThreadAutoFollow !== "off" ? { SLACK_THREAD_AUTO_FOLLOW: slackThreadAutoFollow } : {};
3746
3759
  const slackChannelResponseMode = config["channel_response_mode"];
3747
3760
  const slackResponseModeEnv = slackChannelResponseMode && slackChannelResponseMode !== "mention_only" ? { SLACK_CHANNEL_RESPONSE_MODE: slackChannelResponseMode } : {};
3761
+ const oneshotBlockKitEnabled = config["block_kit_enabled"] === true;
3762
+ const oneshotBlockKitAskUserEnabled = config["block_kit_ask_user_enabled"] === true;
3763
+ const oneshotBlockKitDisabled = process.env["SLACK_BLOCK_KIT_DISABLED"] === "true";
3764
+ const oneshotResolvedAgtHost = process.env["AGT_HOST"]?.trim() || "https://api.augmented.team";
3765
+ const oneshotBlockKitEnv = oneshotBlockKitEnabled ? {
3766
+ SLACK_BLOCK_KIT_ENABLED: "true",
3767
+ ...oneshotBlockKitAskUserEnabled ? { SLACK_BLOCK_KIT_ASK_USER_ENABLED: "true" } : {},
3768
+ ...oneshotBlockKitDisabled ? { SLACK_BLOCK_KIT_DISABLED: "true" } : {},
3769
+ ...oneshotBlockKitAskUserEnabled ? { AGT_HOST: oneshotResolvedAgtHost } : {},
3770
+ ...oneshotBlockKitAskUserEnabled && process.env["AGT_API_KEY"] ? { AGT_API_KEY: process.env["AGT_API_KEY"] } : {},
3771
+ ...oneshotBlockKitAskUserEnabled && options?.agentId ? { AGT_AGENT_ID: options.agentId } : {}
3772
+ } : {};
3748
3773
  if (isPersistent && existsSync4(localSlackChannel)) {
3749
3774
  mcpServers["slack"] = {
3750
3775
  command: "node",
@@ -3753,7 +3778,8 @@ ${sections}`
3753
3778
  SLACK_BOT_TOKEN: botToken,
3754
3779
  ...appToken ? { SLACK_APP_TOKEN: appToken } : {},
3755
3780
  ...slackAutoFollowEnv,
3756
- ...slackResponseModeEnv
3781
+ ...slackResponseModeEnv,
3782
+ ...oneshotBlockKitEnv
3757
3783
  }
3758
3784
  };
3759
3785
  } else {
@@ -3764,7 +3790,8 @@ ${sections}`
3764
3790
  SLACK_BOT_TOKEN: botToken,
3765
3791
  ...appToken ? { SLACK_APP_TOKEN: appToken } : {},
3766
3792
  ...slackAutoFollowEnv,
3767
- ...slackResponseModeEnv
3793
+ ...slackResponseModeEnv,
3794
+ ...oneshotBlockKitEnv
3768
3795
  }
3769
3796
  };
3770
3797
  }
@@ -5027,7 +5054,7 @@ var SCOPE_TO_EVENTS = {
5027
5054
  "metadata.message:read": ["message_metadata_posted"]
5028
5055
  };
5029
5056
  function generateSlackAppManifest(input) {
5030
- const { agent_name, description, long_description, scopes, socket_mode = true, redirect_urls } = input;
5057
+ const { agent_name, description, long_description, scopes, socket_mode = true, redirect_urls, interactivity_request_url } = input;
5031
5058
  const botDisplayName = agent_name.length > 35 ? agent_name.slice(0, 35) : agent_name;
5032
5059
  const botEvents = /* @__PURE__ */ new Set();
5033
5060
  for (const scope of scopes) {
@@ -5063,6 +5090,15 @@ function generateSlackAppManifest(input) {
5063
5090
  },
5064
5091
  settings: {
5065
5092
  ...botEvents.size > 0 ? { event_subscriptions: { bot_events: [...botEvents].sort() } } : {},
5093
+ // ENG-4573: opt-in interactivity. Only emit the block when the
5094
+ // caller passed a request_url so existing apps that don't use
5095
+ // Block Kit re-provision unchanged.
5096
+ ...interactivity_request_url ? {
5097
+ interactivity: {
5098
+ is_enabled: true,
5099
+ request_url: interactivity_request_url
5100
+ }
5101
+ } : {},
5066
5102
  socket_mode_enabled: socket_mode,
5067
5103
  org_deploy_enabled: false,
5068
5104
  token_rotation_enabled: false
@@ -7234,4 +7270,4 @@ export {
7234
7270
  managerStopCommand,
7235
7271
  managerStatusCommand
7236
7272
  };
7237
- //# sourceMappingURL=chunk-EC6FSHOW.js.map
7273
+ //# sourceMappingURL=chunk-LYWDRDJZ.js.map