@integrity-labs/agt-cli 0.27.23 → 0.27.25

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
@@ -27,7 +27,7 @@ import {
27
27
  success,
28
28
  table,
29
29
  warn
30
- } from "../chunk-RM4XYPLD.js";
30
+ } from "../chunk-GI73VOGA.js";
31
31
  import {
32
32
  CHANNEL_REGISTRY,
33
33
  DEPLOYMENT_TEMPLATES,
@@ -4643,7 +4643,7 @@ import { execFileSync, execSync } from "child_process";
4643
4643
  import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
4644
4644
  import chalk18 from "chalk";
4645
4645
  import ora16 from "ora";
4646
- var cliVersion = true ? "0.27.23" : "dev";
4646
+ var cliVersion = true ? "0.27.25" : "dev";
4647
4647
  async function fetchLatestVersion() {
4648
4648
  const host2 = getHost();
4649
4649
  if (!host2) return null;
@@ -5175,7 +5175,7 @@ function handleError(err) {
5175
5175
  }
5176
5176
 
5177
5177
  // src/bin/agt.ts
5178
- var cliVersion2 = true ? "0.27.23" : "dev";
5178
+ var cliVersion2 = true ? "0.27.25" : "dev";
5179
5179
  var program = new Command();
5180
5180
  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");
5181
5181
  program.hook("preAction", (thisCommand) => {
@@ -4855,6 +4855,7 @@ ${sections}`
4855
4855
  const senderPolicyTeamId = options?.senderPolicy?.mode === "team_agents_only" || options?.senderPolicy?.mode === "manager_only" ? options.senderPolicy.team_id : void 0;
4856
4856
  const slackPrincipalId = options?.senderPolicy?.mode === "manager_only" ? options.senderPolicy.principal?.slack_user_id : void 0;
4857
4857
  const teamsPrincipalId = options?.senderPolicy?.mode === "manager_only" ? options.senderPolicy.principal?.teams_aad_object_id : void 0;
4858
+ const senderPolicyInternalOnly = options?.senderPolicy?.internal_only === true;
4858
4859
  const senderPolicyEnv = senderPolicyTeamId ? { AGT_TEAM_ID: senderPolicyTeamId } : {};
4859
4860
  const agentDir = getAgentDir(codeName);
4860
4861
  mkdirSync4(agentDir, { recursive: true });
@@ -5019,7 +5020,18 @@ ${sections}`
5019
5020
  // people.contact_preferences.slack_user_id. Omitted when the
5020
5021
  // principal has no Slack ID; MCP filter fails closed on the
5021
5022
  // missing env var by dropping all human inbound.
5022
- ...slackPrincipalId ? { SLACK_SENDER_POLICY_PRINCIPAL_ID: slackPrincipalId } : {}
5023
+ ...slackPrincipalId ? { SLACK_SENDER_POLICY_PRINCIPAL_ID: slackPrincipalId } : {},
5024
+ // ENG-5843: org-boundary gate. SLACK_INTERNAL_ONLY signals the
5025
+ // filter to check sender's workspace against SLACK_HOME_TEAM_ID
5026
+ // (sourced from the bot install's team_id, populated by
5027
+ // auth.test at install / first-run). Omitted unless explicitly
5028
+ // enabled — the consumer's env-absent default is "no gate".
5029
+ // When INTERNAL_ONLY is true but home team_id can't be
5030
+ // resolved (config['team_id'] not set on the install), the
5031
+ // MCP boot guard fails closed at startup rather than admitting
5032
+ // every sender as "internal".
5033
+ ...senderPolicyInternalOnly ? { SLACK_INTERNAL_ONLY: "true" } : {},
5034
+ ...senderPolicyInternalOnly && typeof config["team_id"] === "string" && config["team_id"].length > 0 ? { SLACK_HOME_TEAM_ID: config["team_id"] } : {}
5023
5035
  }
5024
5036
  };
5025
5037
  const provisionMcpPath = join4(agentDir, "provision", ".mcp.json");
@@ -5204,7 +5216,15 @@ ${sections}`
5204
5216
  // ENG-5842: principal ID for manager_only — Teams AAD object id from
5205
5217
  // people.contact_preferences.teams_aad_object_id. Same fail-closed
5206
5218
  // contract as the Slack branch above.
5207
- ...teamsPrincipalId ? { MSTEAMS_SENDER_POLICY_PRINCIPAL_ID: teamsPrincipalId } : {}
5219
+ ...teamsPrincipalId ? { MSTEAMS_SENDER_POLICY_PRINCIPAL_ID: teamsPrincipalId } : {},
5220
+ // ENG-5843: org-boundary gate. MSTEAMS_INTERNAL_ONLY + MSTEAMS_HOME_TENANT_ID
5221
+ // mirror the Slack pair. Source is the same tenantId the existing
5222
+ // MSTEAMS_TENANT_ID env var already carries — defaulting to "common"
5223
+ // would be wrong here (it'd admit any tenant), so we skip the
5224
+ // SLACK_HOME_TEAM_ID-equivalent emission when the install hasn't
5225
+ // pinned a real tenant. MCP boot guard fails closed.
5226
+ ...senderPolicyInternalOnly ? { MSTEAMS_INTERNAL_ONLY: "true" } : {},
5227
+ ...senderPolicyInternalOnly && tenantId !== "common" ? { MSTEAMS_HOME_TENANT_ID: tenantId } : {}
5208
5228
  };
5209
5229
  if (isPersistent && existsSync5(localTeamsChannel)) {
5210
5230
  mcpServers["msteams"] = {
@@ -6925,4 +6945,4 @@ export {
6925
6945
  managerInstallSystemUnitCommand,
6926
6946
  managerUninstallSystemUnitCommand
6927
6947
  };
6928
- //# sourceMappingURL=chunk-RM4XYPLD.js.map
6948
+ //# sourceMappingURL=chunk-GI73VOGA.js.map