node-autotask 0.68.1 → 0.69.1

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.
Files changed (38) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/MCP_TOOL_CATALOG.json +2 -2
  3. package/README.md +51 -10
  4. package/capabilities.json +7 -7
  5. package/dist/capabilities-data.js +6 -6
  6. package/dist/capabilities.cjs +4 -4
  7. package/dist/capabilities.js +1 -1
  8. package/dist/{chunk-LOLWHPTJ.js → chunk-64BMSXWT.js} +3 -30
  9. package/dist/{chunk-XKIRTR37.cjs → chunk-CLHDTYWO.cjs} +1405 -488
  10. package/dist/{chunk-2D2KJOX2.cjs → chunk-EWXRFHPP.cjs} +236 -222
  11. package/dist/{chunk-YYHCZRUH.js → chunk-FK37JXSJ.js} +1398 -483
  12. package/dist/{chunk-SGH7F2CH.cjs → chunk-KAZE4WC7.cjs} +3 -3
  13. package/dist/{chunk-S6HEIGGM.js → chunk-MMGO3SFL.js} +80 -66
  14. package/dist/{chunk-JCMXQUIC.js → chunk-SCFB5MF3.js} +3 -3
  15. package/dist/{chunk-KRQONGLD.cjs → chunk-WFVLF7EW.cjs} +30 -57
  16. package/dist/{index-mIsdpO5d.d.cts → index-BT_0tTPS.d.cts} +19 -12
  17. package/dist/{index-DQ08uOH0.d.ts → index-Coe7LFLY.d.ts} +19 -12
  18. package/dist/index.cjs +92 -85
  19. package/dist/index.d.cts +3 -3
  20. package/dist/index.d.ts +3 -3
  21. package/dist/index.js +14 -7
  22. package/dist/operations/index.cjs +50 -50
  23. package/dist/operations/index.d.cts +2 -2
  24. package/dist/operations/index.d.ts +2 -2
  25. package/dist/operations/index.js +2 -2
  26. package/dist/pool.cjs +12 -12
  27. package/dist/pool.js +4 -4
  28. package/dist/resources/index.cjs +27 -27
  29. package/dist/resources/index.d.cts +1 -1
  30. package/dist/resources/index.d.ts +1 -1
  31. package/dist/resources/index.js +3 -3
  32. package/docs/API.md +85 -16
  33. package/docs/LIVE-TESTING.md +16 -2
  34. package/docs/VENDOR-QUIRKS.md +39 -0
  35. package/docs/performance-finance.md +35 -0
  36. package/docs/performance-reads.md +63 -0
  37. package/examples/mcp-env-config.ts +3 -4
  38. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var chunkKRQONGLD_cjs = require('./chunk-KRQONGLD.cjs');
3
+ var chunkWFVLF7EW_cjs = require('./chunk-WFVLF7EW.cjs');
4
4
  require('./chunk-S5CH4H6H.cjs');
5
- var chunk2D2KJOX2_cjs = require('./chunk-2D2KJOX2.cjs');
6
- var chunkXKIRTR37_cjs = require('./chunk-XKIRTR37.cjs');
7
- require('./chunk-SGH7F2CH.cjs');
5
+ var chunkEWXRFHPP_cjs = require('./chunk-EWXRFHPP.cjs');
6
+ var chunkCLHDTYWO_cjs = require('./chunk-CLHDTYWO.cjs');
7
+ require('./chunk-KAZE4WC7.cjs');
8
8
  var chunkBD4AUGCJ_cjs = require('./chunk-BD4AUGCJ.cjs');
9
9
  var fs = require('fs');
10
10
 
@@ -19,7 +19,7 @@ var ALIASES = {
19
19
  AUTOTASK_USERNAME: ["AUTOTASK_USER"]
20
20
  };
21
21
  function presenceError(name, source) {
22
- return new chunkXKIRTR37_cjs.AutotaskConfigError(
22
+ return new chunkCLHDTYWO_cjs.AutotaskConfigError(
23
23
  `${source}: ${name} is not set (or is empty after shell-equivalent loading)`,
24
24
  {
25
25
  suggestedAction: `Set ${name} before running (see the "Credentials & env files" section of the README).`
@@ -27,8 +27,8 @@ function presenceError(name, source) {
27
27
  );
28
28
  }
29
29
  function shapeError(name, value, source) {
30
- return new chunkXKIRTR37_cjs.AutotaskConfigError(
31
- `${source}: ${name} ${chunkXKIRTR37_cjs.CREDENTIAL_ENV_LOAD_ACTION} [${chunkXKIRTR37_cjs.credentialValueSummary(value)}]`,
30
+ return new chunkCLHDTYWO_cjs.AutotaskConfigError(
31
+ `${source}: ${name} ${chunkCLHDTYWO_cjs.CREDENTIAL_ENV_LOAD_ACTION} [${chunkCLHDTYWO_cjs.credentialValueSummary(value)}]`,
32
32
  {
33
33
  code: "INVALID_CREDENTIAL_SHAPE",
34
34
  suggestedAction: "Load the credential file with the shell (`set -a; . ./.env; set +a`), use loadAutotaskCredentialEnvFile(path), or fix the quoted/contaminated value; no request was sent."
@@ -52,7 +52,7 @@ function parseCredentialEnvText(text) {
52
52
  }
53
53
  function readCredentialEnvFile(path) {
54
54
  if (!fs.existsSync(path)) {
55
- throw new chunkXKIRTR37_cjs.AutotaskConfigError(`credential env file not found: ${path}`, {
55
+ throw new chunkCLHDTYWO_cjs.AutotaskConfigError(`credential env file not found: ${path}`, {
56
56
  suggestedAction: "Check the path, or create the file with the credentials your host needs."
57
57
  });
58
58
  }
@@ -98,7 +98,7 @@ function pickCredentials(values, names, source, canonical) {
98
98
  if (entry === void 0) continue;
99
99
  const value = normalizeCredentialValue(entry.raw);
100
100
  if (value.length === 0) throw presenceError(name, source);
101
- if (chunkXKIRTR37_cjs.credentialShapeProblem(value, { skipEdgeWhitespace: true }) !== void 0) {
101
+ if (chunkCLHDTYWO_cjs.credentialShapeProblem(value, { skipEdgeWhitespace: true }) !== void 0) {
102
102
  throw shapeError(name, value, source);
103
103
  }
104
104
  out[name] = value;
@@ -122,7 +122,7 @@ var DOCTOR_ENTITIES = [
122
122
  { key: "resources", label: "Resources", path: "/V1.0/Resources" }
123
123
  ];
124
124
  var present = (v) => typeof v === "string" && v.trim().length > 0;
125
- var knownZone = (z) => typeof z === "string" && chunkXKIRTR37_cjs.ZONES.includes(z);
125
+ var knownZone = (z) => typeof z === "string" && chunkCLHDTYWO_cjs.ZONES.includes(z);
126
126
  function doctorConfigStep(source, origin = "config") {
127
127
  const fields = ["apiIntegrationCode", "userName", "secret", "zone", "baseUrl", "impersonationResourceId"];
128
128
  const sources = {};
@@ -150,7 +150,7 @@ function doctorConfigStep(source, origin = "config") {
150
150
  } else if (knownZone(zone)) {
151
151
  let url;
152
152
  try {
153
- url = chunkXKIRTR37_cjs.zoneUrl(zone);
153
+ url = chunkCLHDTYWO_cjs.zoneUrl(zone);
154
154
  zoneInfo = { provided: true, resolvable: true, zone, baseUrlHost: new URL(url).host };
155
155
  } catch {
156
156
  zoneInfo = { provided: true, resolvable: false, zone };
@@ -159,13 +159,13 @@ function doctorConfigStep(source, origin = "config") {
159
159
  zoneInfo = { provided: true, resolvable: false, zone };
160
160
  }
161
161
  } else {
162
- zoneInfo = { provided: false, resolvable: true, zone: chunkXKIRTR37_cjs.DEFAULT_ZONE, baseUrlHost: new URL(chunkXKIRTR37_cjs.zoneUrl(chunkXKIRTR37_cjs.DEFAULT_ZONE)).host };
162
+ zoneInfo = { provided: false, resolvable: true, zone: chunkCLHDTYWO_cjs.DEFAULT_ZONE, baseUrlHost: new URL(chunkCLHDTYWO_cjs.zoneUrl(chunkCLHDTYWO_cjs.DEFAULT_ZONE)).host };
163
163
  }
164
164
  const problems = [];
165
165
  if (missing.length > 0) problems.push(`missing credential(s): ${missing.join(", ")}`);
166
166
  if (zoneInfo.provided && !zoneInfo.resolvable) {
167
167
  problems.push(
168
- source.baseUrl !== void 0 && present(source.baseUrl) ? "baseUrl is not a valid http(s) URL" : source.zone === "other" ? 'zone "other" requires a baseUrl' : `zone "${zone}" is not a known zone (the catalog has ${chunkXKIRTR37_cjs.ZONES.length} zones)`
168
+ source.baseUrl !== void 0 && present(source.baseUrl) ? "baseUrl is not a valid http(s) URL" : source.zone === "other" ? 'zone "other" requires a baseUrl' : `zone "${zone}" is not a known zone (the catalog has ${chunkCLHDTYWO_cjs.ZONES.length} zones)`
169
169
  );
170
170
  }
171
171
  if (problems.length > 0) {
@@ -193,33 +193,40 @@ async function timeCheck(id, fn) {
193
193
  const out = await fn();
194
194
  return { check: { id, status: out.status, message: out.message, ...out.hint !== void 0 ? { hint: out.hint } : {}, durationMs: Date.now() - started }, value: out.value };
195
195
  } catch (err) {
196
- const code = chunkXKIRTR37_cjs.isAutotaskError(err) ? err.code : "UNEXPECTED";
196
+ const code = chunkCLHDTYWO_cjs.isAutotaskError(err) ? err.code : "UNEXPECTED";
197
197
  return {
198
198
  check: {
199
199
  id,
200
200
  status: "fail",
201
201
  message: `check failed unexpectedly (machine code ${code})`,
202
- hint: chunkXKIRTR37_cjs.isAutotaskError(err) ? err.suggestedAction : void 0,
202
+ hint: chunkCLHDTYWO_cjs.isAutotaskError(err) ? err.suggestedAction : void 0,
203
203
  durationMs: Date.now() - started
204
204
  }
205
205
  };
206
206
  }
207
207
  }
208
208
  function failFrom(err, what) {
209
- if (err instanceof chunkXKIRTR37_cjs.RateLimitError && (err.code === "RATE_LIMITED_COOLDOWN" || err.notSent === true)) {
209
+ if (err instanceof chunkCLHDTYWO_cjs.RateLimitError && err.code === "RATE_LIMITED_COOLDOWN") {
210
210
  return {
211
211
  status: "fail",
212
212
  message: `${what} \u2014 refused LOCALLY by the tenant 429 cooldown gate (the call was NOT sent)`,
213
213
  hint: err.suggestedAction
214
214
  };
215
215
  }
216
- if (err.code === "RATE_LIMITED") {
216
+ if (err.code === "RATE_LIMITED" && err.details?.budgetScope === "client") {
217
217
  return {
218
218
  status: "fail",
219
219
  message: `${what} \u2014 refused by the LOCAL client-side rate limiter (per-process budget; not a vendor 429)`,
220
220
  hint: err.suggestedAction
221
221
  };
222
222
  }
223
+ if (err.code === "RATE_LIMITED" && err.details?.budgetScope === "process_origin") {
224
+ return {
225
+ status: "fail",
226
+ message: `${what} \u2014 refused by the SHARED SDK origin hourly ceiling (not a vendor 429)`,
227
+ hint: err.suggestedAction
228
+ };
229
+ }
223
230
  const statusLabel = err.httpStatus !== void 0 ? ` (HTTP ${err.httpStatus})` : "";
224
231
  return { status: "fail", message: `${what} failed${statusLabel} \u2014 machine code ${err.code}`, hint: err.suggestedAction };
225
232
  }
@@ -245,7 +252,7 @@ function makeWire(run, timeoutMs) {
245
252
  });
246
253
  return { body };
247
254
  } catch (err) {
248
- if (chunkXKIRTR37_cjs.isAutotaskError(err)) return { error: err };
255
+ if (chunkCLHDTYWO_cjs.isAutotaskError(err)) return { error: err };
249
256
  throw err;
250
257
  }
251
258
  };
@@ -304,7 +311,7 @@ async function checkReads(run, zoneUnavailable) {
304
311
  const id = `read.${entity.key}`;
305
312
  const result = await timeCheck(id, async () => {
306
313
  if (zoneUnavailable) return skip(ZONE_UNAVAILABLE_SKIP);
307
- const req = chunkXKIRTR37_cjs.buildQueryRequest(cfg.baseUrl, entity.path, { maxRecords: 1 });
314
+ const req = chunkCLHDTYWO_cjs.buildQueryRequest(cfg.baseUrl, entity.path, { maxRecords: 1 });
308
315
  const out = await run.wire(req.method, req.path, `doctor.${id}`, { body: req.body, idempotent: req.idempotent });
309
316
  if (out.error) {
310
317
  const f = failFrom(out.error, `read access to ${entity.label}`);
@@ -388,11 +395,11 @@ function outcome(state, retryable, code, httpStatus) {
388
395
  return httpStatus === void 0 ? { state, retryable, code } : { state, retryable, code, httpStatus };
389
396
  }
390
397
  function vendorErrorsNonEmpty(vendorError) {
391
- const entries = chunkXKIRTR37_cjs.parseVendorErrors(vendorError);
398
+ const entries = chunkCLHDTYWO_cjs.parseVendorErrors(vendorError);
392
399
  return entries !== void 0 && entries.length > 0;
393
400
  }
394
401
  function classifyWriteOutcome(error) {
395
- if (chunkXKIRTR37_cjs.isAutotaskError(error)) {
402
+ if (chunkCLHDTYWO_cjs.isAutotaskError(error)) {
396
403
  const rawStatus = error.httpStatus;
397
404
  const httpStatus = typeof rawStatus === "number" ? rawStatus : void 0;
398
405
  const statusMalformed = rawStatus !== void 0 && httpStatus === void 0;
@@ -418,7 +425,7 @@ function classifyWriteOutcome(error) {
418
425
  return outcome("failed", error.retryable, error.code);
419
426
  }
420
427
  }
421
- const typed = chunkXKIRTR37_cjs.isAutotaskError(error);
428
+ const typed = chunkCLHDTYWO_cjs.isAutotaskError(error);
422
429
  const status = typed && typeof error.httpStatus === "number" ? error.httpStatus : void 0;
423
430
  const code = typed ? error.code : error instanceof Error ? error.name : "UNKNOWN";
424
431
  return outcome("unknown", false, code, status);
@@ -426,255 +433,255 @@ function classifyWriteOutcome(error) {
426
433
 
427
434
  Object.defineProperty(exports, "AutotaskClient", {
428
435
  enumerable: true,
429
- get: function () { return chunkKRQONGLD_cjs.AutotaskClient; }
436
+ get: function () { return chunkWFVLF7EW_cjs.AutotaskClient; }
430
437
  });
431
438
  Object.defineProperty(exports, "AuthenticateResource", {
432
439
  enumerable: true,
433
- get: function () { return chunk2D2KJOX2_cjs.AuthenticateResource; }
440
+ get: function () { return chunkEWXRFHPP_cjs.AuthenticateResource; }
434
441
  });
435
442
  Object.defineProperty(exports, "ConfigurationItemsResource", {
436
443
  enumerable: true,
437
- get: function () { return chunk2D2KJOX2_cjs.ConfigurationItemsResource; }
444
+ get: function () { return chunkEWXRFHPP_cjs.ConfigurationItemsResource; }
438
445
  });
439
446
  Object.defineProperty(exports, "ContactsResource", {
440
447
  enumerable: true,
441
- get: function () { return chunk2D2KJOX2_cjs.ContactsResource; }
448
+ get: function () { return chunkEWXRFHPP_cjs.ContactsResource; }
442
449
  });
443
450
  Object.defineProperty(exports, "EntityInformationResource", {
444
451
  enumerable: true,
445
- get: function () { return chunk2D2KJOX2_cjs.EntityInformationResource; }
452
+ get: function () { return chunkEWXRFHPP_cjs.EntityInformationResource; }
446
453
  });
447
454
  Object.defineProperty(exports, "InventoryProductsResource", {
448
455
  enumerable: true,
449
- get: function () { return chunk2D2KJOX2_cjs.InventoryProductsResource; }
456
+ get: function () { return chunkEWXRFHPP_cjs.InventoryProductsResource; }
450
457
  });
451
458
  Object.defineProperty(exports, "ModulesResource", {
452
459
  enumerable: true,
453
- get: function () { return chunk2D2KJOX2_cjs.ModulesResource; }
460
+ get: function () { return chunkEWXRFHPP_cjs.ModulesResource; }
454
461
  });
455
462
  Object.defineProperty(exports, "QuotesResource", {
456
463
  enumerable: true,
457
- get: function () { return chunk2D2KJOX2_cjs.QuotesResource; }
464
+ get: function () { return chunkEWXRFHPP_cjs.QuotesResource; }
458
465
  });
459
466
  Object.defineProperty(exports, "ResourceTimeOffAdditionalResource", {
460
467
  enumerable: true,
461
- get: function () { return chunk2D2KJOX2_cjs.ResourceTimeOffAdditionalResource; }
468
+ get: function () { return chunkEWXRFHPP_cjs.ResourceTimeOffAdditionalResource; }
462
469
  });
463
470
  Object.defineProperty(exports, "ResourceTimeOffBalancesResource", {
464
471
  enumerable: true,
465
- get: function () { return chunk2D2KJOX2_cjs.ResourceTimeOffBalancesResource; }
472
+ get: function () { return chunkEWXRFHPP_cjs.ResourceTimeOffBalancesResource; }
466
473
  });
467
474
  Object.defineProperty(exports, "ResourcesResource", {
468
475
  enumerable: true,
469
- get: function () { return chunk2D2KJOX2_cjs.ResourcesResource; }
476
+ get: function () { return chunkEWXRFHPP_cjs.ResourcesResource; }
470
477
  });
471
478
  Object.defineProperty(exports, "ServiceCallsResource", {
472
479
  enumerable: true,
473
- get: function () { return chunk2D2KJOX2_cjs.ServiceCallsResource; }
480
+ get: function () { return chunkEWXRFHPP_cjs.ServiceCallsResource; }
474
481
  });
475
482
  Object.defineProperty(exports, "ThresholdInformationResource", {
476
483
  enumerable: true,
477
- get: function () { return chunk2D2KJOX2_cjs.ThresholdInformationResource; }
484
+ get: function () { return chunkEWXRFHPP_cjs.ThresholdInformationResource; }
478
485
  });
479
486
  Object.defineProperty(exports, "TicketChargesResource", {
480
487
  enumerable: true,
481
- get: function () { return chunk2D2KJOX2_cjs.TicketChargesResource; }
488
+ get: function () { return chunkEWXRFHPP_cjs.TicketChargesResource; }
482
489
  });
483
490
  Object.defineProperty(exports, "TicketsResource", {
484
491
  enumerable: true,
485
- get: function () { return chunk2D2KJOX2_cjs.TicketsResource; }
492
+ get: function () { return chunkEWXRFHPP_cjs.TicketsResource; }
486
493
  });
487
494
  Object.defineProperty(exports, "TimeOffRequestsResource", {
488
495
  enumerable: true,
489
- get: function () { return chunk2D2KJOX2_cjs.TimeOffRequestsResource; }
496
+ get: function () { return chunkEWXRFHPP_cjs.TimeOffRequestsResource; }
490
497
  });
491
498
  Object.defineProperty(exports, "VersionInformationResource", {
492
499
  enumerable: true,
493
- get: function () { return chunk2D2KJOX2_cjs.VersionInformationResource; }
500
+ get: function () { return chunkEWXRFHPP_cjs.VersionInformationResource; }
494
501
  });
495
502
  Object.defineProperty(exports, "VersionResource", {
496
503
  enumerable: true,
497
- get: function () { return chunk2D2KJOX2_cjs.VersionResource; }
504
+ get: function () { return chunkEWXRFHPP_cjs.VersionResource; }
498
505
  });
499
506
  Object.defineProperty(exports, "ZoneInformationResource", {
500
507
  enumerable: true,
501
- get: function () { return chunk2D2KJOX2_cjs.ZoneInformationResource; }
508
+ get: function () { return chunkEWXRFHPP_cjs.ZoneInformationResource; }
502
509
  });
503
510
  Object.defineProperty(exports, "AutotaskAbortError", {
504
511
  enumerable: true,
505
- get: function () { return chunkXKIRTR37_cjs.AutotaskAbortError; }
512
+ get: function () { return chunkCLHDTYWO_cjs.AutotaskAbortError; }
506
513
  });
507
514
  Object.defineProperty(exports, "AutotaskConfigError", {
508
515
  enumerable: true,
509
- get: function () { return chunkXKIRTR37_cjs.AutotaskConfigError; }
516
+ get: function () { return chunkCLHDTYWO_cjs.AutotaskConfigError; }
510
517
  });
511
518
  Object.defineProperty(exports, "AutotaskError", {
512
519
  enumerable: true,
513
- get: function () { return chunkXKIRTR37_cjs.AutotaskError; }
520
+ get: function () { return chunkCLHDTYWO_cjs.AutotaskError; }
514
521
  });
515
522
  Object.defineProperty(exports, "AutotaskNetworkError", {
516
523
  enumerable: true,
517
- get: function () { return chunkXKIRTR37_cjs.AutotaskNetworkError; }
524
+ get: function () { return chunkCLHDTYWO_cjs.AutotaskNetworkError; }
518
525
  });
519
526
  Object.defineProperty(exports, "AutotaskTimeoutError", {
520
527
  enumerable: true,
521
- get: function () { return chunkXKIRTR37_cjs.AutotaskTimeoutError; }
528
+ get: function () { return chunkCLHDTYWO_cjs.AutotaskTimeoutError; }
522
529
  });
523
530
  Object.defineProperty(exports, "CREDENTIAL_SHAPE_POINTER", {
524
531
  enumerable: true,
525
- get: function () { return chunkXKIRTR37_cjs.CREDENTIAL_SHAPE_POINTER; }
532
+ get: function () { return chunkCLHDTYWO_cjs.CREDENTIAL_SHAPE_POINTER; }
526
533
  });
527
534
  Object.defineProperty(exports, "CompaniesResource", {
528
535
  enumerable: true,
529
- get: function () { return chunkXKIRTR37_cjs.CompaniesResource; }
536
+ get: function () { return chunkCLHDTYWO_cjs.CompaniesResource; }
530
537
  });
531
538
  Object.defineProperty(exports, "ConfirmationRequiredError", {
532
539
  enumerable: true,
533
- get: function () { return chunkXKIRTR37_cjs.ConfirmationRequiredError; }
540
+ get: function () { return chunkCLHDTYWO_cjs.ConfirmationRequiredError; }
534
541
  });
535
542
  Object.defineProperty(exports, "ConflictError", {
536
543
  enumerable: true,
537
- get: function () { return chunkXKIRTR37_cjs.ConflictError; }
544
+ get: function () { return chunkCLHDTYWO_cjs.ConflictError; }
538
545
  });
539
546
  Object.defineProperty(exports, "ContractsResource", {
540
547
  enumerable: true,
541
- get: function () { return chunkXKIRTR37_cjs.ContractsResource; }
548
+ get: function () { return chunkCLHDTYWO_cjs.ContractsResource; }
542
549
  });
543
550
  Object.defineProperty(exports, "DeleteBoundaryError", {
544
551
  enumerable: true,
545
- get: function () { return chunkXKIRTR37_cjs.DeleteBoundaryError; }
552
+ get: function () { return chunkCLHDTYWO_cjs.DeleteBoundaryError; }
546
553
  });
547
554
  Object.defineProperty(exports, "EmptyResponseError", {
548
555
  enumerable: true,
549
- get: function () { return chunkXKIRTR37_cjs.EmptyResponseError; }
556
+ get: function () { return chunkCLHDTYWO_cjs.EmptyResponseError; }
550
557
  });
551
558
  Object.defineProperty(exports, "GenericResource", {
552
559
  enumerable: true,
553
- get: function () { return chunkXKIRTR37_cjs.GenericResource; }
560
+ get: function () { return chunkCLHDTYWO_cjs.GenericResource; }
554
561
  });
555
562
  Object.defineProperty(exports, "HostPolicyDeniedError", {
556
563
  enumerable: true,
557
- get: function () { return chunkXKIRTR37_cjs.HostPolicyDeniedError; }
564
+ get: function () { return chunkCLHDTYWO_cjs.HostPolicyDeniedError; }
558
565
  });
559
566
  Object.defineProperty(exports, "InvoicesResource", {
560
567
  enumerable: true,
561
- get: function () { return chunkXKIRTR37_cjs.InvoicesResource; }
568
+ get: function () { return chunkCLHDTYWO_cjs.InvoicesResource; }
562
569
  });
563
570
  Object.defineProperty(exports, "MIN_PREFIX_SUMMARY_LENGTH", {
564
571
  enumerable: true,
565
- get: function () { return chunkXKIRTR37_cjs.MIN_PREFIX_SUMMARY_LENGTH; }
572
+ get: function () { return chunkCLHDTYWO_cjs.MIN_PREFIX_SUMMARY_LENGTH; }
566
573
  });
567
574
  Object.defineProperty(exports, "MaintenanceError", {
568
575
  enumerable: true,
569
- get: function () { return chunkXKIRTR37_cjs.MaintenanceError; }
576
+ get: function () { return chunkCLHDTYWO_cjs.MaintenanceError; }
570
577
  });
571
578
  Object.defineProperty(exports, "MarkerUnsafeIdError", {
572
579
  enumerable: true,
573
- get: function () { return chunkXKIRTR37_cjs.MarkerUnsafeIdError; }
580
+ get: function () { return chunkCLHDTYWO_cjs.MarkerUnsafeIdError; }
574
581
  });
575
582
  Object.defineProperty(exports, "MoveRefusedError", {
576
583
  enumerable: true,
577
- get: function () { return chunkXKIRTR37_cjs.MoveRefusedError; }
584
+ get: function () { return chunkCLHDTYWO_cjs.MoveRefusedError; }
578
585
  });
579
586
  Object.defineProperty(exports, "NotFoundError", {
580
587
  enumerable: true,
581
- get: function () { return chunkXKIRTR37_cjs.NotFoundError; }
588
+ get: function () { return chunkCLHDTYWO_cjs.NotFoundError; }
582
589
  });
583
590
  Object.defineProperty(exports, "OperationNotSupportedError", {
584
591
  enumerable: true,
585
- get: function () { return chunkXKIRTR37_cjs.OperationNotSupportedError; }
592
+ get: function () { return chunkCLHDTYWO_cjs.OperationNotSupportedError; }
586
593
  });
587
594
  Object.defineProperty(exports, "PaginationLimitError", {
588
595
  enumerable: true,
589
- get: function () { return chunkXKIRTR37_cjs.PaginationLimitError; }
596
+ get: function () { return chunkCLHDTYWO_cjs.PaginationLimitError; }
590
597
  });
591
598
  Object.defineProperty(exports, "QueryTooLongError", {
592
599
  enumerable: true,
593
- get: function () { return chunkXKIRTR37_cjs.QueryTooLongError; }
600
+ get: function () { return chunkCLHDTYWO_cjs.QueryTooLongError; }
594
601
  });
595
602
  Object.defineProperty(exports, "RateLimitError", {
596
603
  enumerable: true,
597
- get: function () { return chunkXKIRTR37_cjs.RateLimitError; }
604
+ get: function () { return chunkCLHDTYWO_cjs.RateLimitError; }
598
605
  });
599
606
  Object.defineProperty(exports, "RecoveryTruncatedError", {
600
607
  enumerable: true,
601
- get: function () { return chunkXKIRTR37_cjs.RecoveryTruncatedError; }
608
+ get: function () { return chunkCLHDTYWO_cjs.RecoveryTruncatedError; }
602
609
  });
603
610
  Object.defineProperty(exports, "ResolutionError", {
604
611
  enumerable: true,
605
- get: function () { return chunkXKIRTR37_cjs.ResolutionError; }
612
+ get: function () { return chunkCLHDTYWO_cjs.ResolutionError; }
606
613
  });
607
614
  Object.defineProperty(exports, "ResponseRejectedError", {
608
615
  enumerable: true,
609
- get: function () { return chunkXKIRTR37_cjs.ResponseRejectedError; }
616
+ get: function () { return chunkCLHDTYWO_cjs.ResponseRejectedError; }
610
617
  });
611
618
  Object.defineProperty(exports, "SIMPLE_RESOURCES", {
612
619
  enumerable: true,
613
- get: function () { return chunkXKIRTR37_cjs.SIMPLE_RESOURCES; }
620
+ get: function () { return chunkCLHDTYWO_cjs.SIMPLE_RESOURCES; }
614
621
  });
615
622
  Object.defineProperty(exports, "ScopeRequiredError", {
616
623
  enumerable: true,
617
- get: function () { return chunkXKIRTR37_cjs.ScopeRequiredError; }
624
+ get: function () { return chunkCLHDTYWO_cjs.ScopeRequiredError; }
618
625
  });
619
626
  Object.defineProperty(exports, "StaleObjectError", {
620
627
  enumerable: true,
621
- get: function () { return chunkXKIRTR37_cjs.StaleObjectError; }
628
+ get: function () { return chunkCLHDTYWO_cjs.StaleObjectError; }
622
629
  });
623
630
  Object.defineProperty(exports, "TimeEntriesResource", {
624
631
  enumerable: true,
625
- get: function () { return chunkXKIRTR37_cjs.TimeEntriesResource; }
632
+ get: function () { return chunkCLHDTYWO_cjs.TimeEntriesResource; }
626
633
  });
627
634
  Object.defineProperty(exports, "TtlCache", {
628
635
  enumerable: true,
629
- get: function () { return chunkXKIRTR37_cjs.TtlCache; }
636
+ get: function () { return chunkCLHDTYWO_cjs.TtlCache; }
630
637
  });
631
638
  Object.defineProperty(exports, "UNSCOPED_WALK_THRESHOLD", {
632
639
  enumerable: true,
633
- get: function () { return chunkXKIRTR37_cjs.UNSCOPED_WALK_THRESHOLD; }
640
+ get: function () { return chunkCLHDTYWO_cjs.UNSCOPED_WALK_THRESHOLD; }
634
641
  });
635
642
  Object.defineProperty(exports, "UnexpectedContentTypeError", {
636
643
  enumerable: true,
637
- get: function () { return chunkXKIRTR37_cjs.UnexpectedContentTypeError; }
644
+ get: function () { return chunkCLHDTYWO_cjs.UnexpectedContentTypeError; }
638
645
  });
639
646
  Object.defineProperty(exports, "ZONES", {
640
647
  enumerable: true,
641
- get: function () { return chunkXKIRTR37_cjs.ZONES; }
648
+ get: function () { return chunkCLHDTYWO_cjs.ZONES; }
642
649
  });
643
650
  Object.defineProperty(exports, "credentialShapeProblem", {
644
651
  enumerable: true,
645
- get: function () { return chunkXKIRTR37_cjs.credentialShapeProblem; }
652
+ get: function () { return chunkCLHDTYWO_cjs.credentialShapeProblem; }
646
653
  });
647
654
  Object.defineProperty(exports, "credentialValueSummary", {
648
655
  enumerable: true,
649
- get: function () { return chunkXKIRTR37_cjs.credentialValueSummary; }
656
+ get: function () { return chunkCLHDTYWO_cjs.credentialValueSummary; }
650
657
  });
651
658
  Object.defineProperty(exports, "errorFromStatus", {
652
659
  enumerable: true,
653
- get: function () { return chunkXKIRTR37_cjs.errorFromStatus; }
660
+ get: function () { return chunkCLHDTYWO_cjs.errorFromStatus; }
654
661
  });
655
662
  Object.defineProperty(exports, "formatVendorDetail", {
656
663
  enumerable: true,
657
- get: function () { return chunkXKIRTR37_cjs.formatVendorDetail; }
664
+ get: function () { return chunkCLHDTYWO_cjs.formatVendorDetail; }
658
665
  });
659
666
  Object.defineProperty(exports, "isAutotaskError", {
660
667
  enumerable: true,
661
- get: function () { return chunkXKIRTR37_cjs.isAutotaskError; }
668
+ get: function () { return chunkCLHDTYWO_cjs.isAutotaskError; }
662
669
  });
663
670
  Object.defineProperty(exports, "isDeterministicVendor500", {
664
671
  enumerable: true,
665
- get: function () { return chunkXKIRTR37_cjs.isDeterministicVendor500; }
672
+ get: function () { return chunkCLHDTYWO_cjs.isDeterministicVendor500; }
666
673
  });
667
674
  Object.defineProperty(exports, "mergeDetails", {
668
675
  enumerable: true,
669
- get: function () { return chunkXKIRTR37_cjs.mergeDetails; }
676
+ get: function () { return chunkCLHDTYWO_cjs.mergeDetails; }
670
677
  });
671
678
  Object.defineProperty(exports, "nextActionFor", {
672
679
  enumerable: true,
673
- get: function () { return chunkXKIRTR37_cjs.nextActionFor; }
680
+ get: function () { return chunkCLHDTYWO_cjs.nextActionFor; }
674
681
  });
675
682
  Object.defineProperty(exports, "parseVendorErrors", {
676
683
  enumerable: true,
677
- get: function () { return chunkXKIRTR37_cjs.parseVendorErrors; }
684
+ get: function () { return chunkCLHDTYWO_cjs.parseVendorErrors; }
678
685
  });
679
686
  Object.defineProperty(exports, "NoopLogger", {
680
687
  enumerable: true,
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { a as AutotaskClient, T as TicketChangeStatusResult, b as TicketChangeStatusNoChange } from './index-mIsdpO5d.cjs';
2
- export { c as AuthenticateResource, A as AutotaskConfig, C as CompaniesResource, d as CompanyFuzzySearchOptions, e as CompanyFuzzySearchResult, f as ConfigurationItemsResource, g as ContactsResource, h as ContractsProfitabilityResult, i as ContractsResource, j as CostRateResolution, E as EntityInformationResource, F as FuzzyCompanyRow, G as GenericResource, k as GenericResourceConfig, H as HelperFlags, I as InventoryProductsResource, l as InvoicesResource, M as ModulesResource, O as OpsFlags, P as ProfitRateSource, m as ProfitabilityActivityCategory, n as ProfitabilityDataQualityWarning, o as ProfitabilityHighestCostTicket, p as ProfitabilityLabourCostMethod, q as ProfitabilityMiscoding, r as ProfitabilityMonthlyRow, s as ProfitabilityOpenRenewalItem, t as ProfitabilityOptions, u as ProfitabilityPart, v as ProfitabilityPartDigest, w as ProfitabilityRevenueByType, Q as QuotesResource, R as ResourceTimeOffAdditionalResource, x as ResourceTimeOffBalancesResource, y as ResourcesResource, S as SIMPLE_RESOURCES, z as ServiceCallsResource, B as SimpleResourceEntry, D as ThresholdInformationResource, J as TicketChargesResource, K as TicketsResource, L as TimeEntriesPostedCountResult, N as TimeEntriesPostedPagingOptions, U as TimeEntriesPostedWindowCountOptions, V as TimeEntriesPostedWindowListOptions, W as TimeEntriesPostedWindowOptions, X as TimeEntriesPostedWindowResult, Y as TimeEntriesResource, Z as TimeEntryReviewFields, _ as TimeEntryReviewResult, $ as TimeOffRequestsResource, a0 as TtlCache, a1 as VersionInformationResource, a2 as VersionResource, a3 as ZONES, a4 as ZoneInformationResource, a5 as ZoneName } from './index-mIsdpO5d.cjs';
1
+ import { a as AutotaskClient, T as TicketChangeStatusResult, b as TicketChangeStatusNoChange } from './index-BT_0tTPS.cjs';
2
+ export { c as AuthenticateResource, A as AutotaskConfig, C as CompaniesResource, d as CompanyFuzzySearchOptions, e as CompanyFuzzySearchResult, f as ConfigurationItemsResource, g as ContactsResource, h as ContractsProfitabilityResult, i as ContractsResource, j as CostRateResolution, E as EntityInformationResource, F as FuzzyCompanyRow, G as GenericResource, k as GenericResourceConfig, H as HelperFlags, I as InventoryProductsResource, l as InvoicesResource, M as ModulesResource, O as OpsFlags, P as ProfitRateSource, m as ProfitabilityActivityCategory, n as ProfitabilityDataQualityWarning, o as ProfitabilityHighestCostTicket, p as ProfitabilityLabourCostMethod, q as ProfitabilityMiscoding, r as ProfitabilityMonthlyRow, s as ProfitabilityOpenRenewalItem, t as ProfitabilityOptions, u as ProfitabilityPart, v as ProfitabilityPartDigest, w as ProfitabilityRevenueByType, Q as QuotesResource, R as ResourceTimeOffAdditionalResource, x as ResourceTimeOffBalancesResource, y as ResourcesResource, S as SIMPLE_RESOURCES, z as ServiceCallsResource, B as SimpleResourceEntry, D as ThresholdInformationResource, J as TicketChargesResource, K as TicketsResource, L as TimeEntriesPostedCountResult, N as TimeEntriesPostedPagingOptions, U as TimeEntriesPostedWindowCountOptions, V as TimeEntriesPostedWindowListOptions, W as TimeEntriesPostedWindowOptions, X as TimeEntriesPostedWindowResult, Y as TimeEntriesResource, Z as TimeEntryReviewFields, _ as TimeEntryReviewResult, $ as TimeOffRequestsResource, a0 as TtlCache, a1 as VersionInformationResource, a2 as VersionResource, a3 as ZONES, a4 as ZoneInformationResource, a5 as ZoneName } from './index-BT_0tTPS.cjs';
3
3
  import { A as AutotaskError, a as AutotaskErrorOptions, b as AutotaskConfigError } from './base-CHMATPq0.cjs';
4
4
  export { E as ErrorCategory, c as ErrorIdRef, N as NextAction, i as isAutotaskError, n as nextActionFor } from './base-CHMATPq0.cjs';
5
5
  export { N as NoopLogger, R as REDACTED } from './logger-B1gYmFre.cjs';
@@ -28,7 +28,7 @@ declare class ConflictError extends AutotaskError {
28
28
  declare class RateLimitError extends AutotaskError {
29
29
  /** Seconds the server asked the client to wait (`Retry-After`), when present. */
30
30
  retryAfter?: number;
31
- /** True when the call was refused locally (the tenant cooldown gate) and never sent. */
31
+ /** True when the call was refused locally (cooldown or hourly admission) and never sent. */
32
32
  notSent?: boolean;
33
33
  constructor(message: string, options?: AutotaskErrorOptions);
34
34
  }
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { a as AutotaskClient, T as TicketChangeStatusResult, b as TicketChangeStatusNoChange } from './index-DQ08uOH0.js';
2
- export { c as AuthenticateResource, A as AutotaskConfig, C as CompaniesResource, d as CompanyFuzzySearchOptions, e as CompanyFuzzySearchResult, f as ConfigurationItemsResource, g as ContactsResource, h as ContractsProfitabilityResult, i as ContractsResource, j as CostRateResolution, E as EntityInformationResource, F as FuzzyCompanyRow, G as GenericResource, k as GenericResourceConfig, H as HelperFlags, I as InventoryProductsResource, l as InvoicesResource, M as ModulesResource, O as OpsFlags, P as ProfitRateSource, m as ProfitabilityActivityCategory, n as ProfitabilityDataQualityWarning, o as ProfitabilityHighestCostTicket, p as ProfitabilityLabourCostMethod, q as ProfitabilityMiscoding, r as ProfitabilityMonthlyRow, s as ProfitabilityOpenRenewalItem, t as ProfitabilityOptions, u as ProfitabilityPart, v as ProfitabilityPartDigest, w as ProfitabilityRevenueByType, Q as QuotesResource, R as ResourceTimeOffAdditionalResource, x as ResourceTimeOffBalancesResource, y as ResourcesResource, S as SIMPLE_RESOURCES, z as ServiceCallsResource, B as SimpleResourceEntry, D as ThresholdInformationResource, J as TicketChargesResource, K as TicketsResource, L as TimeEntriesPostedCountResult, N as TimeEntriesPostedPagingOptions, U as TimeEntriesPostedWindowCountOptions, V as TimeEntriesPostedWindowListOptions, W as TimeEntriesPostedWindowOptions, X as TimeEntriesPostedWindowResult, Y as TimeEntriesResource, Z as TimeEntryReviewFields, _ as TimeEntryReviewResult, $ as TimeOffRequestsResource, a0 as TtlCache, a1 as VersionInformationResource, a2 as VersionResource, a3 as ZONES, a4 as ZoneInformationResource, a5 as ZoneName } from './index-DQ08uOH0.js';
1
+ import { a as AutotaskClient, T as TicketChangeStatusResult, b as TicketChangeStatusNoChange } from './index-Coe7LFLY.js';
2
+ export { c as AuthenticateResource, A as AutotaskConfig, C as CompaniesResource, d as CompanyFuzzySearchOptions, e as CompanyFuzzySearchResult, f as ConfigurationItemsResource, g as ContactsResource, h as ContractsProfitabilityResult, i as ContractsResource, j as CostRateResolution, E as EntityInformationResource, F as FuzzyCompanyRow, G as GenericResource, k as GenericResourceConfig, H as HelperFlags, I as InventoryProductsResource, l as InvoicesResource, M as ModulesResource, O as OpsFlags, P as ProfitRateSource, m as ProfitabilityActivityCategory, n as ProfitabilityDataQualityWarning, o as ProfitabilityHighestCostTicket, p as ProfitabilityLabourCostMethod, q as ProfitabilityMiscoding, r as ProfitabilityMonthlyRow, s as ProfitabilityOpenRenewalItem, t as ProfitabilityOptions, u as ProfitabilityPart, v as ProfitabilityPartDigest, w as ProfitabilityRevenueByType, Q as QuotesResource, R as ResourceTimeOffAdditionalResource, x as ResourceTimeOffBalancesResource, y as ResourcesResource, S as SIMPLE_RESOURCES, z as ServiceCallsResource, B as SimpleResourceEntry, D as ThresholdInformationResource, J as TicketChargesResource, K as TicketsResource, L as TimeEntriesPostedCountResult, N as TimeEntriesPostedPagingOptions, U as TimeEntriesPostedWindowCountOptions, V as TimeEntriesPostedWindowListOptions, W as TimeEntriesPostedWindowOptions, X as TimeEntriesPostedWindowResult, Y as TimeEntriesResource, Z as TimeEntryReviewFields, _ as TimeEntryReviewResult, $ as TimeOffRequestsResource, a0 as TtlCache, a1 as VersionInformationResource, a2 as VersionResource, a3 as ZONES, a4 as ZoneInformationResource, a5 as ZoneName } from './index-Coe7LFLY.js';
3
3
  import { A as AutotaskError, a as AutotaskErrorOptions, b as AutotaskConfigError } from './base-CHMATPq0.js';
4
4
  export { E as ErrorCategory, c as ErrorIdRef, N as NextAction, i as isAutotaskError, n as nextActionFor } from './base-CHMATPq0.js';
5
5
  export { N as NoopLogger, R as REDACTED } from './logger-B1gYmFre.js';
@@ -28,7 +28,7 @@ declare class ConflictError extends AutotaskError {
28
28
  declare class RateLimitError extends AutotaskError {
29
29
  /** Seconds the server asked the client to wait (`Retry-After`), when present. */
30
30
  retryAfter?: number;
31
- /** True when the call was refused locally (the tenant cooldown gate) and never sent. */
31
+ /** True when the call was refused locally (cooldown or hourly admission) and never sent. */
32
32
  notSent?: boolean;
33
33
  constructor(message: string, options?: AutotaskErrorOptions);
34
34
  }
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
- export { AutotaskClient } from './chunk-LOLWHPTJ.js';
1
+ export { AutotaskClient } from './chunk-64BMSXWT.js';
2
2
  import './chunk-YL6HXU33.js';
3
- export { AuthenticateResource, ConfigurationItemsResource, ContactsResource, EntityInformationResource, InventoryProductsResource, ModulesResource, QuotesResource, ResourceTimeOffAdditionalResource, ResourceTimeOffBalancesResource, ResourcesResource, ServiceCallsResource, ThresholdInformationResource, TicketChargesResource, TicketsResource, TimeOffRequestsResource, VersionInformationResource, VersionResource, ZoneInformationResource } from './chunk-S6HEIGGM.js';
4
- import { credentialShapeProblem, zoneUrl, DEFAULT_ZONE, ZONES, isAutotaskError, AutotaskConfigError, CREDENTIAL_ENV_LOAD_ACTION, credentialValueSummary, parseVendorErrors, buildQueryRequest, RateLimitError } from './chunk-YYHCZRUH.js';
5
- export { AutotaskAbortError, AutotaskConfigError, AutotaskError, AutotaskNetworkError, AutotaskTimeoutError, CREDENTIAL_SHAPE_POINTER, CompaniesResource, ConfirmationRequiredError, ConflictError, ContractsResource, DeleteBoundaryError, EmptyResponseError, GenericResource, HostPolicyDeniedError, InvoicesResource, MIN_PREFIX_SUMMARY_LENGTH, MaintenanceError, MarkerUnsafeIdError, MoveRefusedError, NotFoundError, OperationNotSupportedError, PaginationLimitError, QueryTooLongError, RateLimitError, RecoveryTruncatedError, ResolutionError, ResponseRejectedError, SIMPLE_RESOURCES, ScopeRequiredError, StaleObjectError, TimeEntriesResource, TtlCache, UNSCOPED_WALK_THRESHOLD, UnexpectedContentTypeError, ZONES, credentialShapeProblem, credentialValueSummary, errorFromStatus, formatVendorDetail, isAutotaskError, isDeterministicVendor500, mergeDetails, nextActionFor, parseVendorErrors } from './chunk-YYHCZRUH.js';
6
- import './chunk-JCMXQUIC.js';
3
+ export { AuthenticateResource, ConfigurationItemsResource, ContactsResource, EntityInformationResource, InventoryProductsResource, ModulesResource, QuotesResource, ResourceTimeOffAdditionalResource, ResourceTimeOffBalancesResource, ResourcesResource, ServiceCallsResource, ThresholdInformationResource, TicketChargesResource, TicketsResource, TimeOffRequestsResource, VersionInformationResource, VersionResource, ZoneInformationResource } from './chunk-MMGO3SFL.js';
4
+ import { credentialShapeProblem, zoneUrl, DEFAULT_ZONE, ZONES, isAutotaskError, AutotaskConfigError, CREDENTIAL_ENV_LOAD_ACTION, credentialValueSummary, parseVendorErrors, buildQueryRequest, RateLimitError } from './chunk-FK37JXSJ.js';
5
+ export { AutotaskAbortError, AutotaskConfigError, AutotaskError, AutotaskNetworkError, AutotaskTimeoutError, CREDENTIAL_SHAPE_POINTER, CompaniesResource, ConfirmationRequiredError, ConflictError, ContractsResource, DeleteBoundaryError, EmptyResponseError, GenericResource, HostPolicyDeniedError, InvoicesResource, MIN_PREFIX_SUMMARY_LENGTH, MaintenanceError, MarkerUnsafeIdError, MoveRefusedError, NotFoundError, OperationNotSupportedError, PaginationLimitError, QueryTooLongError, RateLimitError, RecoveryTruncatedError, ResolutionError, ResponseRejectedError, SIMPLE_RESOURCES, ScopeRequiredError, StaleObjectError, TimeEntriesResource, TtlCache, UNSCOPED_WALK_THRESHOLD, UnexpectedContentTypeError, ZONES, credentialShapeProblem, credentialValueSummary, errorFromStatus, formatVendorDetail, isAutotaskError, isDeterministicVendor500, mergeDetails, nextActionFor, parseVendorErrors } from './chunk-FK37JXSJ.js';
6
+ import './chunk-SCFB5MF3.js';
7
7
  export { NoopLogger, REDACTED } from './chunk-7NKB4UXV.js';
8
8
  import { existsSync, readFileSync } from 'fs';
9
9
 
@@ -205,20 +205,27 @@ async function timeCheck(id, fn) {
205
205
  }
206
206
  }
207
207
  function failFrom(err, what) {
208
- if (err instanceof RateLimitError && (err.code === "RATE_LIMITED_COOLDOWN" || err.notSent === true)) {
208
+ if (err instanceof RateLimitError && err.code === "RATE_LIMITED_COOLDOWN") {
209
209
  return {
210
210
  status: "fail",
211
211
  message: `${what} \u2014 refused LOCALLY by the tenant 429 cooldown gate (the call was NOT sent)`,
212
212
  hint: err.suggestedAction
213
213
  };
214
214
  }
215
- if (err.code === "RATE_LIMITED") {
215
+ if (err.code === "RATE_LIMITED" && err.details?.budgetScope === "client") {
216
216
  return {
217
217
  status: "fail",
218
218
  message: `${what} \u2014 refused by the LOCAL client-side rate limiter (per-process budget; not a vendor 429)`,
219
219
  hint: err.suggestedAction
220
220
  };
221
221
  }
222
+ if (err.code === "RATE_LIMITED" && err.details?.budgetScope === "process_origin") {
223
+ return {
224
+ status: "fail",
225
+ message: `${what} \u2014 refused by the SHARED SDK origin hourly ceiling (not a vendor 429)`,
226
+ hint: err.suggestedAction
227
+ };
228
+ }
222
229
  const statusLabel = err.httpStatus !== void 0 ? ` (HTTP ${err.httpStatus})` : "";
223
230
  return { status: "fail", message: `${what} failed${statusLabel} \u2014 machine code ${err.code}`, hint: err.suggestedAction };
224
231
  }