@integrity-labs/agt-cli 0.28.234 → 0.28.235

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
@@ -38,7 +38,7 @@ import {
38
38
  success,
39
39
  table,
40
40
  warn
41
- } from "../chunk-PA2XRXTN.js";
41
+ } from "../chunk-2KTGXFX5.js";
42
42
  import {
43
43
  CHANNEL_REGISTRY,
44
44
  DEFAULT_FRAMEWORK,
@@ -4826,7 +4826,7 @@ import { execFileSync, execSync } from "child_process";
4826
4826
  import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
4827
4827
  import chalk18 from "chalk";
4828
4828
  import ora16 from "ora";
4829
- var cliVersion = true ? "0.28.234" : "dev";
4829
+ var cliVersion = true ? "0.28.235" : "dev";
4830
4830
  async function fetchLatestVersion() {
4831
4831
  const host2 = getHost();
4832
4832
  if (!host2) return null;
@@ -5840,7 +5840,7 @@ function handleError(err) {
5840
5840
  }
5841
5841
 
5842
5842
  // src/bin/agt.ts
5843
- var cliVersion2 = true ? "0.28.234" : "dev";
5843
+ var cliVersion2 = true ? "0.28.235" : "dev";
5844
5844
  var program = new Command();
5845
5845
  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");
5846
5846
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -5720,7 +5720,7 @@ function requireHost() {
5720
5720
  }
5721
5721
 
5722
5722
  // src/lib/api-client.ts
5723
- var agtCliVersion = true ? "0.28.234" : "dev";
5723
+ var agtCliVersion = true ? "0.28.235" : "dev";
5724
5724
  var lastConfigHash = null;
5725
5725
  function setConfigHash(hash) {
5726
5726
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -7813,4 +7813,4 @@ export {
7813
7813
  managerInstallSystemUnitCommand,
7814
7814
  managerUninstallSystemUnitCommand
7815
7815
  };
7816
- //# sourceMappingURL=chunk-PA2XRXTN.js.map
7816
+ //# sourceMappingURL=chunk-2KTGXFX5.js.map
@@ -37,7 +37,7 @@ import {
37
37
  requireHost,
38
38
  safeWriteJsonAtomic,
39
39
  setConfigHash
40
- } from "../chunk-PA2XRXTN.js";
40
+ } from "../chunk-2KTGXFX5.js";
41
41
  import {
42
42
  getProjectDir as getProjectDir2,
43
43
  getReadyTasks,
@@ -6426,7 +6426,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
6426
6426
  var lastVersionCheckAt = 0;
6427
6427
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
6428
6428
  var lastResponsivenessProbeAt = 0;
6429
- var agtCliVersion = true ? "0.28.234" : "dev";
6429
+ var agtCliVersion = true ? "0.28.235" : "dev";
6430
6430
  function resolveBrewPath(execFileSync2) {
6431
6431
  try {
6432
6432
  const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -16640,6 +16640,21 @@ function classifySlackFile(file) {
16640
16640
  function resolveSlackInboundDir(codeName) {
16641
16641
  return resolveChannelInboundDir(codeName, "slack-inbound");
16642
16642
  }
16643
+ function explainSlackFileAccessError(stage, detail) {
16644
+ if (stage === "files.info") {
16645
+ if (detail === "missing_scope") {
16646
+ return "the bot token lacks the files:read OAuth scope; add it to the Slack app (Augmented Team installs include it by default) and reinstall the app";
16647
+ }
16648
+ if (detail === "file_not_found" || detail === "not_visible" || detail === "access_denied") {
16649
+ return "Slack reports this for files the bot token cannot access, not only for deleted files. If the file was uploaded by another (peer) agent, verify this bot has the files:read scope and is a member of the conversation where the file was shared";
16650
+ }
16651
+ return null;
16652
+ }
16653
+ if (detail === 401 || detail === 403) {
16654
+ return "the bot token was rejected for this file. If the file was uploaded by another (peer) agent, this bot needs the files:read scope and membership in the conversation where the file was shared";
16655
+ }
16656
+ return null;
16657
+ }
16643
16658
  function buildSafeInboundPath2(codeName, fileId, mimetype) {
16644
16659
  return buildSafeInboundPath(resolveSlackInboundDir(codeName), fileId, mimetype);
16645
16660
  }
@@ -20950,7 +20965,11 @@ async function downloadSlackFile(fileId, codeName) {
20950
20965
  );
20951
20966
  const infoData = await infoRes.json();
20952
20967
  if (!infoData.ok || !infoData.file) {
20953
- throw new Error(`files.info failed: ${infoData.error ?? "unknown"}`);
20968
+ const rawError = infoData.error ?? "unknown";
20969
+ const accessHint = explainSlackFileAccessError("files.info", rawError);
20970
+ throw new Error(
20971
+ `files.info failed: ${rawError}${accessHint ? ` (${accessHint})` : ""}`
20972
+ );
20954
20973
  }
20955
20974
  const file = infoData.file;
20956
20975
  if (typeof file.size === "number" && file.size > MAX_INBOUND_FILE_BYTES) {
@@ -20965,7 +20984,10 @@ async function downloadSlackFile(fileId, codeName) {
20965
20984
  signal: AbortSignal.timeout(SLACK_DOWNLOAD_TIMEOUT_MS)
20966
20985
  });
20967
20986
  if (!res.ok) {
20968
- throw new Error(`download failed: HTTP ${res.status}`);
20987
+ const accessHint = explainSlackFileAccessError("url_private", res.status);
20988
+ throw new Error(
20989
+ `download failed: HTTP ${res.status}${accessHint ? ` (${accessHint})` : ""}`
20990
+ );
20969
20991
  }
20970
20992
  const contentLengthHeader = res.headers.get("content-length");
20971
20993
  if (contentLengthHeader) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integrity-labs/agt-cli",
3
- "version": "0.28.234",
3
+ "version": "0.28.235",
4
4
  "description": "Augmented Team CLI — agent provisioning and management",
5
5
  "type": "module",
6
6
  "engines": {