@integrity-labs/agt-cli 0.28.515 → 0.28.517

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.
@@ -35665,6 +35665,10 @@ function deriveBindFailureQuarantineThreshold(provisioningMax) {
35665
35665
  }
35666
35666
  var MIN_PROVISIONING_MAX_FOR_QUARANTINE_ORDERING = BIND_FAILURE_QUARANTINE_THRESHOLD + 1;
35667
35667
 
35668
+ // ../core/dist/restart/forced-update-deadline.js
35669
+ var FORCED_UPDATE_RELAX_AFTER_MS = 7 * 6e4;
35670
+ var FORCED_UPDATE_HARD_DEADLINE_MS = 15 * 6e4;
35671
+
35668
35672
  // src/rate-limit-watch.ts
35669
35673
  import { closeSync, fstatSync, openSync, readSync, readdirSync as readdirSync4, statSync } from "fs";
35670
35674
  import { homedir as homedir2 } from "os";
@@ -41567,6 +41567,10 @@ function deriveBindFailureQuarantineThreshold(provisioningMax) {
41567
41567
  }
41568
41568
  var MIN_PROVISIONING_MAX_FOR_QUARANTINE_ORDERING = BIND_FAILURE_QUARANTINE_THRESHOLD + 1;
41569
41569
 
41570
+ // ../core/dist/restart/forced-update-deadline.js
41571
+ var FORCED_UPDATE_RELAX_AFTER_MS = 7 * 6e4;
41572
+ var FORCED_UPDATE_HARD_DEADLINE_MS = 15 * 6e4;
41573
+
41570
41574
  // src/identity.ts
41571
41575
  var IdentityError = class extends Error {
41572
41576
  status;
@@ -35834,6 +35834,10 @@ function deriveBindFailureQuarantineThreshold(provisioningMax) {
35834
35834
  }
35835
35835
  var MIN_PROVISIONING_MAX_FOR_QUARANTINE_ORDERING = BIND_FAILURE_QUARANTINE_THRESHOLD + 1;
35836
35836
 
35837
+ // ../core/dist/restart/forced-update-deadline.js
35838
+ var FORCED_UPDATE_RELAX_AFTER_MS = 7 * 6e4;
35839
+ var FORCED_UPDATE_HARD_DEADLINE_MS = 15 * 6e4;
35840
+
35837
35841
  // src/account-enforcement-notice.ts
35838
35842
  import { readFileSync as readFileSync2 } from "fs";
35839
35843
  import { homedir as homedir2 } from "os";
@@ -36160,6 +36160,10 @@ function deriveBindFailureQuarantineThreshold(provisioningMax) {
36160
36160
  }
36161
36161
  var MIN_PROVISIONING_MAX_FOR_QUARANTINE_ORDERING = BIND_FAILURE_QUARANTINE_THRESHOLD + 1;
36162
36162
 
36163
+ // ../core/dist/restart/forced-update-deadline.js
36164
+ var FORCED_UPDATE_RELAX_AFTER_MS = 7 * 6e4;
36165
+ var FORCED_UPDATE_HARD_DEADLINE_MS = 15 * 6e4;
36166
+
36163
36167
  // src/account-enforcement-notice.ts
36164
36168
  import { readFileSync as readFileSync4 } from "fs";
36165
36169
  import { homedir as homedir3 } from "os";
package/dist/mcp/xero.js CHANGED
@@ -114299,12 +114299,39 @@ var {
114299
114299
  var import_dotenv = __toESM(require_main(), 1);
114300
114300
  var import_xero_node = __toESM(require_dist2(), 1);
114301
114301
 
114302
+ // src/helpers/redact-sensitive.ts
114303
+ var SENSITIVE_HEADER_NAMES = [
114304
+ "authorization",
114305
+ "proxy-authorization",
114306
+ "www-authenticate",
114307
+ "cookie",
114308
+ "set-cookie",
114309
+ "x-api-key",
114310
+ "api-key",
114311
+ "x-auth-token",
114312
+ "x-access-token",
114313
+ "refresh_token",
114314
+ "access_token",
114315
+ "client_secret"
114316
+ ];
114317
+ var REDACTED = "<redacted>";
114318
+ var NAME_ALTERNATION = SENSITIVE_HEADER_NAMES.join("|");
114319
+ var JSON_PAIR_RE = new RegExp(
114320
+ `("(?:${NAME_ALTERNATION})"\\s*:\\s*)("(?:[^"\\\\]|\\\\.)*"|\\[[^\\]]*\\])`,
114321
+ "gi"
114322
+ );
114323
+ var HEADER_LINE_RE = new RegExp(`\\b(${NAME_ALTERNATION})\\s*:\\s*([^\\r\\n,}"]+)`, "gi");
114324
+ var BEARER_VALUE_RE = /\b(Bearer|Basic)\s+[A-Za-z0-9._~+/=-]{8,}/gi;
114325
+ function redactSensitiveText(input) {
114326
+ return input.replace(JSON_PAIR_RE, (_m, key) => `${key}"${REDACTED}"`).replace(HEADER_LINE_RE, (_m, name) => `${name}: ${REDACTED}`).replace(BEARER_VALUE_RE, (_m, scheme) => `${scheme} ${REDACTED}`);
114327
+ }
114328
+
114302
114329
  // src/helpers/ensure-error.ts
114303
114330
  function ensureError(value) {
114304
114331
  if (value instanceof Error) return value;
114305
114332
  let stringified = "[Unable to stringify the thrown value]";
114306
114333
  try {
114307
- stringified = JSON.stringify(value);
114334
+ stringified = redactSensitiveText(JSON.stringify(value) ?? String(value));
114308
114335
  } catch {
114309
114336
  }
114310
114337
  const error2 = new Error(`Error thrown: ${stringified}`);
@@ -114692,9 +114719,12 @@ var XeroScopeMissingError = class extends Error {
114692
114719
  }
114693
114720
  };
114694
114721
  function classifyXeroError(error2) {
114695
- if (!(error2 instanceof AxiosError2)) return null;
114696
- if (error2.response?.status !== 401) return null;
114697
- const detail = readXeroDetail(error2.response.data);
114722
+ const rejection = parseXeroApiRejection(error2);
114723
+ const status = rejection ? rejection.statusCode : axiosStatus(error2);
114724
+ if (status !== 401) return null;
114725
+ const detail = readXeroDetail(
114726
+ rejection ? rejection.body : error2.response?.data
114727
+ );
114698
114728
  if (detail !== "AuthorizationUnsuccessful") return null;
114699
114729
  return new XeroScopeMissingError(
114700
114730
  `Xero rejected this call as scope-missing \u2014 the OAuth consent did not grant the scope this endpoint requires. Token refresh will not help: refresh tokens cannot widen scope. Ask the user to click "Reconnect" on the Xero card in the Augmented console so the consent screen requests the scopes the agent's installed skills need.`,
@@ -114702,6 +114732,25 @@ function classifyXeroError(error2) {
114702
114732
  detail
114703
114733
  );
114704
114734
  }
114735
+ function axiosStatus(error2) {
114736
+ return error2 instanceof AxiosError2 ? error2.response?.status : void 0;
114737
+ }
114738
+ function parseXeroApiRejection(error2) {
114739
+ if (typeof error2 !== "string") return null;
114740
+ if (!error2.startsWith("{")) return null;
114741
+ let parsed;
114742
+ try {
114743
+ parsed = JSON.parse(error2);
114744
+ } catch {
114745
+ return null;
114746
+ }
114747
+ if (!parsed || typeof parsed !== "object") return null;
114748
+ const response = parsed.response;
114749
+ if (!response || typeof response !== "object") return null;
114750
+ const statusCode = response.statusCode;
114751
+ if (typeof statusCode !== "number") return null;
114752
+ return { statusCode, body: response.body };
114753
+ }
114705
114754
  function readXeroDetail(data) {
114706
114755
  if (data && typeof data === "object" && "Detail" in data) {
114707
114756
  const d = data.Detail;
@@ -114717,23 +114766,36 @@ function readXeroDetail(data) {
114717
114766
  function formatError2(error2) {
114718
114767
  const scopeMissing = classifyXeroError(error2);
114719
114768
  if (scopeMissing) return scopeMissing.message;
114769
+ const rejection = parseXeroApiRejection(error2);
114770
+ if (rejection) {
114771
+ return messageForStatus(rejection.statusCode, readDetail(rejection.body));
114772
+ }
114720
114773
  if (error2 instanceof AxiosError2) {
114721
- const status = error2.response?.status;
114722
- const detail = error2.response?.data?.Detail;
114723
- switch (status) {
114724
- case 401:
114725
- return "Authentication failed. Please check your Xero credentials.";
114726
- case 403:
114727
- return "You don't have permission to access this resource in Xero.";
114728
- case 404:
114729
- return "The requested resource was not found in Xero.";
114730
- case 429:
114731
- return "Too many requests to Xero. Please try again in a moment.";
114732
- default:
114733
- return detail || "An error occurred while communicating with Xero.";
114734
- }
114774
+ return messageForStatus(error2.response?.status, readDetail(error2.response?.data));
114735
114775
  }
114736
- return error2 instanceof Error ? error2.message : `An unexpected error occurred: ${error2}`;
114776
+ if (error2 instanceof Error) return redactSensitiveText(error2.message);
114777
+ return "An unexpected error occurred while communicating with Xero.";
114778
+ }
114779
+ function messageForStatus(status, detail) {
114780
+ switch (status) {
114781
+ case 401:
114782
+ return "Authentication failed. Please check your Xero credentials.";
114783
+ case 403:
114784
+ return "You don't have permission to access this resource in Xero.";
114785
+ case 404:
114786
+ return "The requested resource was not found in Xero.";
114787
+ case 429:
114788
+ return "Too many requests to Xero. Please try again in a moment.";
114789
+ default:
114790
+ return detail ? redactSensitiveText(detail) : "An error occurred while communicating with Xero.";
114791
+ }
114792
+ }
114793
+ function readDetail(body) {
114794
+ if (body && typeof body === "object" && "Detail" in body) {
114795
+ const d = body.Detail;
114796
+ return typeof d === "string" ? d : null;
114797
+ }
114798
+ return null;
114737
114799
  }
114738
114800
 
114739
114801
  // src/helpers/get-package-version.ts
@@ -37,7 +37,7 @@ import {
37
37
  writeDirectChatSessionState,
38
38
  writeEgressAllowlist,
39
39
  writePersistentClaudeWrapper
40
- } from "./chunk-S5RR4UHQ.js";
40
+ } from "./chunk-UQ3TQ7M4.js";
41
41
  import "./chunk-XWVM4KPK.js";
42
42
  export {
43
43
  EGRESS_BASELINE_DOMAINS,
@@ -79,4 +79,4 @@ export {
79
79
  writeEgressAllowlist,
80
80
  writePersistentClaudeWrapper
81
81
  };
82
- //# sourceMappingURL=persistent-session-RM5ZY2SB.js.map
82
+ //# sourceMappingURL=persistent-session-3SY36KIU.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  paneLogPath
3
- } from "./chunk-S5RR4UHQ.js";
3
+ } from "./chunk-UQ3TQ7M4.js";
4
4
  import "./chunk-XWVM4KPK.js";
5
5
 
6
6
  // src/lib/responsiveness-probe.ts
@@ -662,4 +662,4 @@ export {
662
662
  readAndResetSlackReplyBindingClassifications,
663
663
  readAndResetSlackReplyTargetClassifications
664
664
  };
665
- //# sourceMappingURL=responsiveness-probe-C4KMTKWR.js.map
665
+ //# sourceMappingURL=responsiveness-probe-DSWGHXGG.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integrity-labs/agt-cli",
3
- "version": "0.28.515",
3
+ "version": "0.28.517",
4
4
  "description": "Augmented Team CLI — agent provisioning and management",
5
5
  "type": "module",
6
6
  "engines": {