@integrity-labs/agt-cli 0.28.441 → 0.28.442

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
@@ -40,7 +40,7 @@ import {
40
40
  success,
41
41
  table,
42
42
  warn
43
- } from "../chunk-6KTN6GTT.js";
43
+ } from "../chunk-JIZ6Z6EX.js";
44
44
  import {
45
45
  AnchorSessionClient,
46
46
  CHANNEL_REGISTRY,
@@ -71,7 +71,7 @@ import {
71
71
  requiredMcpWildcard,
72
72
  resolveChannels,
73
73
  serializeManifestForSlackCli
74
- } from "../chunk-NQP2W2RD.js";
74
+ } from "../chunk-XMJ5VMWV.js";
75
75
  import "../chunk-XWVM4KPK.js";
76
76
 
77
77
  // src/bin/agt.ts
@@ -4830,7 +4830,7 @@ import { execFileSync, execSync } from "child_process";
4830
4830
  import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
4831
4831
  import chalk18 from "chalk";
4832
4832
  import ora16 from "ora";
4833
- var cliVersion = true ? "0.28.441" : "dev";
4833
+ var cliVersion = true ? "0.28.442" : "dev";
4834
4834
  async function fetchLatestVersion() {
4835
4835
  const host2 = getHost();
4836
4836
  if (!host2) return null;
@@ -6002,7 +6002,7 @@ function handleError(err) {
6002
6002
  }
6003
6003
 
6004
6004
  // src/bin/agt.ts
6005
- var cliVersion2 = true ? "0.28.441" : "dev";
6005
+ var cliVersion2 = true ? "0.28.442" : "dev";
6006
6006
  var program = new Command();
6007
6007
  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");
6008
6008
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -29,7 +29,7 @@ import {
29
29
  resolveConnectivityProbe,
30
30
  worseConnectivityOutcome,
31
31
  wrapScheduledTaskPrompt
32
- } from "./chunk-NQP2W2RD.js";
32
+ } from "./chunk-XMJ5VMWV.js";
33
33
  import {
34
34
  parsePsRows
35
35
  } from "./chunk-XWVM4KPK.js";
@@ -4901,7 +4901,7 @@ function requireHost() {
4901
4901
  }
4902
4902
 
4903
4903
  // src/lib/api-client.ts
4904
- var agtCliVersion = true ? "0.28.441" : "dev";
4904
+ var agtCliVersion = true ? "0.28.442" : "dev";
4905
4905
  var lastConfigHash = null;
4906
4906
  function setConfigHash(hash) {
4907
4907
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -7402,4 +7402,4 @@ export {
7402
7402
  managerInstallSystemUnitCommand,
7403
7403
  managerUninstallSystemUnitCommand
7404
7404
  };
7405
- //# sourceMappingURL=chunk-6KTN6GTT.js.map
7405
+ //# sourceMappingURL=chunk-JIZ6Z6EX.js.map
@@ -1325,8 +1325,31 @@ var DEFAULT_SCOPES = [
1325
1325
  // links an inbound Slack sender to their organization_people record (inbound
1326
1326
  // identity reconcile). Existing installs without it degrade gracefully - the
1327
1327
  // reconcile no-ops until the bot is re-authorised with the wider scope set.
1328
- "users:read.email",
1329
- "users.profile:write"
1328
+ "users:read.email"
1329
+ // ENG-8203: 'users.profile:write' is deliberately NOT here.
1330
+ //
1331
+ // It is registered with `token_type: 'user'` (ENG-4812 — Slack rejects it
1332
+ // under oauth_config.scopes.bot with `illegal_bot_scopes`). The MANIFEST
1333
+ // generator partitions on that flag; the OAuth install-URL builder does not —
1334
+ // `buildSlackAuthorizeUrl` puts every stored scope into `scope=` — so a
1335
+ // default-scoped OAuth install sent a user-only scope as a bot scope and
1336
+ // Slack rejected the whole authorization with "Invalid permissions
1337
+ // requested". That blocked EVERY new install on the default set.
1338
+ //
1339
+ // Removing it rather than routing it to `user_scope=` is deliberate: the
1340
+ // callback destructures `authed_user?: { id?: string }` and persists only the
1341
+ // BOT token (oauth-callback/route.ts:217,246). `authed_user.access_token` is
1342
+ // never read, so asking for the scope would put an extra consent screen in
1343
+ // front of the installing admin and then discard the token it returned.
1344
+ //
1345
+ // Nothing is lost. `users.profile.set` needs an `xoxp-` user token, which no
1346
+ // OAuth-installed agent has ever had — the bot-status/live-presence indicator
1347
+ // only ever worked where an operator pasted a user token into the wizard by
1348
+ // hand, and that path is untouched. The registry definition stays so existing
1349
+ // configs still render and the `token_type: 'user'` knowledge is preserved.
1350
+ //
1351
+ // Wiring the indicator for OAuth installs means persisting
1352
+ // `authed_user.access_token` first, THEN adding `user_scope=`. Separate work.
1330
1353
  ];
1331
1354
  function getDefaultSlackScopes() {
1332
1355
  return [...DEFAULT_SCOPES];
@@ -14125,4 +14148,4 @@ export {
14125
14148
  stopAllSessionsAndWait,
14126
14149
  getProjectDir
14127
14150
  };
14128
- //# sourceMappingURL=chunk-NQP2W2RD.js.map
14151
+ //# sourceMappingURL=chunk-XMJ5VMWV.js.map