@integrity-labs/agt-cli 0.28.538 → 0.28.540

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-XREQUTXK.js";
43
+ } from "../chunk-AGAGAM4W.js";
44
44
  import {
45
45
  AnchorSessionClient,
46
46
  CHANNEL_REGISTRY,
@@ -4834,7 +4834,7 @@ import { execFileSync, execSync } from "child_process";
4834
4834
  import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
4835
4835
  import chalk18 from "chalk";
4836
4836
  import ora16 from "ora";
4837
- var cliVersion = true ? "0.28.538" : "dev";
4837
+ var cliVersion = true ? "0.28.540" : "dev";
4838
4838
  async function fetchLatestVersion() {
4839
4839
  const host2 = getHost();
4840
4840
  if (!host2) return null;
@@ -6006,7 +6006,7 @@ function handleError(err) {
6006
6006
  }
6007
6007
 
6008
6008
  // src/bin/agt.ts
6009
- var cliVersion2 = true ? "0.28.538" : "dev";
6009
+ var cliVersion2 = true ? "0.28.540" : "dev";
6010
6010
  var program = new Command();
6011
6011
  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");
6012
6012
  program.hook("preAction", async (thisCommand, actionCommand) => {
@@ -5549,7 +5549,7 @@ function exchangeFailureKind(err) {
5549
5549
  }
5550
5550
 
5551
5551
  // src/lib/api-client.ts
5552
- var agtCliVersion = true ? "0.28.538" : "dev";
5552
+ var agtCliVersion = true ? "0.28.540" : "dev";
5553
5553
  var lastConfigHash = null;
5554
5554
  function setConfigHash(hash) {
5555
5555
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -8861,4 +8861,4 @@ export {
8861
8861
  managerInstallSystemUnitCommand,
8862
8862
  managerUninstallSystemUnitCommand
8863
8863
  };
8864
- //# sourceMappingURL=chunk-XREQUTXK.js.map
8864
+ //# sourceMappingURL=chunk-AGAGAM4W.js.map
@@ -53,7 +53,7 @@ import {
53
53
  safeWriteJsonAtomic,
54
54
  setConfigHash,
55
55
  tripClass
56
- } from "../chunk-XREQUTXK.js";
56
+ } from "../chunk-AGAGAM4W.js";
57
57
  import {
58
58
  getProjectDir as getProjectDir2,
59
59
  getReadyTasks,
@@ -10369,7 +10369,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
10369
10369
  var lastVersionCheckAt = 0;
10370
10370
  var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
10371
10371
  var lastResponsivenessProbeAt = 0;
10372
- var agtCliVersion = true ? "0.28.538" : "dev";
10372
+ var agtCliVersion = true ? "0.28.540" : "dev";
10373
10373
  function resolveBrewPath(execFileSync2) {
10374
10374
  try {
10375
10375
  const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
@@ -21488,6 +21488,25 @@ var package_default = {
21488
21488
  }
21489
21489
  };
21490
21490
 
21491
+ // src/format-error.ts
21492
+ function formatError2(err) {
21493
+ if (err && typeof err === "object" && "status" in err && "message" in err) {
21494
+ const e = err;
21495
+ const serverMessage = typeof e.message === "string" ? e.message : "";
21496
+ const probe = serverMessage.trim();
21497
+ const saidNothing = probe === "" || probe === `admin-debug request failed: ${e.status}`;
21498
+ if (!saidNothing) return `Admin debug error ${e.status}: ${serverMessage}`;
21499
+ if (e.status === 403) {
21500
+ return "Admin debug error 403: forbidden, and the server gave no reason. One of three things, which this client cannot tell apart without a server message: the caller is not an Augmented Team staff agent; the admin-debug token lacks WRITE capability; or the target org is readable but not write-authorized (it needs an active write grant).";
21501
+ }
21502
+ if (e.status === 503) {
21503
+ return "Admin debug error 503: unavailable, and the server gave no reason. Usually one of: admin-debug writes are disabled (ADMIN_DEBUG_WRITE_MODE=off), the signing key is unconfigured, or the org context is unresolvable on this stage.";
21504
+ }
21505
+ return `Admin debug error ${e.status}`;
21506
+ }
21507
+ return err instanceof Error ? err.message : String(err);
21508
+ }
21509
+
21491
21510
  // src/index.ts
21492
21511
  var AGT_HOST = process.env.AGT_HOST;
21493
21512
  var AGT_TOKEN = process.env.AGT_TOKEN ?? "";
@@ -21507,19 +21526,6 @@ var client = new AdminDebugClient({
21507
21526
  agentId: AGT_AGENT_ID || void 0,
21508
21527
  runId: AGT_RUN_ID || void 0
21509
21528
  });
21510
- function formatError2(err) {
21511
- if (err && typeof err === "object" && "status" in err && "message" in err) {
21512
- const e = err;
21513
- if (e.status === 503) {
21514
- return "Admin debug surface is temporarily unavailable (503) \u2014 the signing key may be unconfigured or the org context is unresolvable on this stage.";
21515
- }
21516
- if (e.status === 403) {
21517
- return "Forbidden \u2014 admin debug is restricted to Integrity Labs staff agents.";
21518
- }
21519
- return `Admin debug error ${e.status}: ${e.message}`;
21520
- }
21521
- return err instanceof Error ? err.message : String(err);
21522
- }
21523
21529
  var server = new McpServer({ name: "augmented-admin-mcp", version: package_default.version });
21524
21530
  server.tool(
21525
21531
  "debug_search_agents",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integrity-labs/agt-cli",
3
- "version": "0.28.538",
3
+ "version": "0.28.540",
4
4
  "description": "Augmented Team CLI — agent provisioning and management",
5
5
  "type": "module",
6
6
  "engines": {