@canonry/canonry 4.148.0 → 4.148.3

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.
@@ -7893,7 +7893,32 @@ async function withRetry(fn, opts = {}) {
7893
7893
  }
7894
7894
  throw lastErr;
7895
7895
  }
7896
+ var RATE_LIMIT_MARKERS = [
7897
+ "throttle",
7898
+ // Bing Webmaster Tools: ThrottleHost / ThrottleUser
7899
+ "rate limit",
7900
+ "ratelimit",
7901
+ "too many requests",
7902
+ "quota exceeded",
7903
+ "quotaexceeded",
7904
+ "over quota",
7905
+ "slow down"
7906
+ ];
7907
+ function isRateLimitError(err) {
7908
+ if (err != null && typeof err === "object") {
7909
+ const record = err;
7910
+ const retryAfter = record.retryAfter ?? record["retry-after"];
7911
+ if (typeof retryAfter === "number" || typeof retryAfter === "string") return true;
7912
+ if (typeof record.status === "number" && record.status === 429) return true;
7913
+ }
7914
+ if (err instanceof Error) {
7915
+ const msg = err.message.toLowerCase();
7916
+ return RATE_LIMIT_MARKERS.some((marker) => msg.includes(marker));
7917
+ }
7918
+ return false;
7919
+ }
7896
7920
  function isRetryableHttpError(err) {
7921
+ if (isRateLimitError(err)) return true;
7897
7922
  if (err != null && typeof err === "object" && "status" in err) {
7898
7923
  const status = err.status;
7899
7924
  if (typeof status === "number") {
@@ -10,7 +10,7 @@ import {
10
10
  loadConfig,
11
11
  loadConfigRaw,
12
12
  saveConfigPatch
13
- } from "./chunk-3HYF3LUP.js";
13
+ } from "./chunk-NIKDPQOF.js";
14
14
  import {
15
15
  CC_CACHE_DIR,
16
16
  DUCKDB_SPEC,
@@ -126,7 +126,7 @@ import {
126
126
  siteAuditSnapshots,
127
127
  toAlertView,
128
128
  usageCounters
129
- } from "./chunk-VUTKHFTM.js";
129
+ } from "./chunk-ILUVQDXM.js";
130
130
  import {
131
131
  AGENT_MEMORY_VALUE_MAX_BYTES,
132
132
  AGENT_PROVIDER_IDS,
@@ -217,7 +217,7 @@ import {
217
217
  validationError,
218
218
  winnabilityClassLabel,
219
219
  withRetry
220
- } from "./chunk-43XIYBG4.js";
220
+ } from "./chunk-3VMKOSTQ.js";
221
221
 
222
222
  // src/telemetry.ts
223
223
  import crypto from "crypto";
@@ -7420,7 +7420,7 @@ function readStoredGroundingSources(rawResponse) {
7420
7420
  return result;
7421
7421
  }
7422
7422
  async function backfillInsightsCommand(project, opts) {
7423
- const { IntelligenceService: IntelligenceService2 } = await import("./intelligence-service-OGOGIQJD.js");
7423
+ const { IntelligenceService: IntelligenceService2 } = await import("./intelligence-service-CEYWNR6W.js");
7424
7424
  const config = loadConfig();
7425
7425
  const db = createClient(config.database);
7426
7426
  migrate(db);
@@ -517,7 +517,7 @@ import {
517
517
  wordpressSchemaDeployResultDtoSchema,
518
518
  wordpressSchemaStatusResultDtoSchema,
519
519
  wordpressStatusDtoSchema
520
- } from "./chunk-43XIYBG4.js";
520
+ } from "./chunk-3VMKOSTQ.js";
521
521
 
522
522
  // src/intelligence-service.ts
523
523
  import { eq as eq57, desc as desc26, asc as asc11, and as and45, ne as ne7, or as or11, inArray as inArray19, gte as gte13, lte as lte10 } from "drizzle-orm";
@@ -81,7 +81,7 @@ import {
81
81
  trafficConnectWordpressRequestSchema,
82
82
  trafficEventKindSchema,
83
83
  trafficSeriesGranularitySchema
84
- } from "./chunk-43XIYBG4.js";
84
+ } from "./chunk-3VMKOSTQ.js";
85
85
 
86
86
  // src/config.ts
87
87
  import fs from "fs";
package/dist/cli.js CHANGED
@@ -30,7 +30,7 @@ import {
30
30
  showFirstRunNotice,
31
31
  trackCliCommandFinished,
32
32
  trackEvent
33
- } from "./chunk-MHTZ4THA.js";
33
+ } from "./chunk-GUKRQT22.js";
34
34
  import {
35
35
  CliError,
36
36
  EXIT_SYSTEM_ERROR,
@@ -50,7 +50,7 @@ import {
50
50
  saveConfigPatch,
51
51
  systemError,
52
52
  usageError
53
- } from "./chunk-3HYF3LUP.js";
53
+ } from "./chunk-NIKDPQOF.js";
54
54
  import {
55
55
  apiKeys,
56
56
  createClient,
@@ -58,7 +58,7 @@ import {
58
58
  projects,
59
59
  queries,
60
60
  renderReportHtml
61
- } from "./chunk-VUTKHFTM.js";
61
+ } from "./chunk-ILUVQDXM.js";
62
62
  import {
63
63
  AdsDeliverySnapshotStatuses,
64
64
  AdsHistoricalCampaignRollupStatuses,
@@ -122,7 +122,7 @@ import {
122
122
  providerQuotaPolicySchema,
123
123
  resolveProviderInput,
124
124
  winnabilityClassSchema
125
- } from "./chunk-43XIYBG4.js";
125
+ } from "./chunk-3VMKOSTQ.js";
126
126
 
127
127
  // src/cli.ts
128
128
  import { pathToFileURL } from "url";
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  createServer
3
- } from "./chunk-MHTZ4THA.js";
3
+ } from "./chunk-GUKRQT22.js";
4
4
  import {
5
5
  loadConfig
6
- } from "./chunk-3HYF3LUP.js";
7
- import "./chunk-VUTKHFTM.js";
8
- import "./chunk-43XIYBG4.js";
6
+ } from "./chunk-NIKDPQOF.js";
7
+ import "./chunk-ILUVQDXM.js";
8
+ import "./chunk-3VMKOSTQ.js";
9
9
  export {
10
10
  createServer,
11
11
  loadConfig
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  IntelligenceService
3
- } from "./chunk-VUTKHFTM.js";
4
- import "./chunk-43XIYBG4.js";
3
+ } from "./chunk-ILUVQDXM.js";
4
+ import "./chunk-3VMKOSTQ.js";
5
5
  export {
6
6
  IntelligenceService
7
7
  };
package/dist/mcp.js CHANGED
@@ -3,10 +3,10 @@ import {
3
3
  PACKAGE_VERSION,
4
4
  canonryMcpTools,
5
5
  createApiClient
6
- } from "./chunk-3HYF3LUP.js";
6
+ } from "./chunk-NIKDPQOF.js";
7
7
  import {
8
8
  isReadOnlyKey
9
- } from "./chunk-43XIYBG4.js";
9
+ } from "./chunk-3VMKOSTQ.js";
10
10
 
11
11
  // src/mcp/cli.ts
12
12
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canonry/canonry",
3
- "version": "4.148.0",
3
+ "version": "4.148.3",
4
4
  "type": "module",
5
5
  "description": "Agent-first open-source AEO operating platform - track how answer engines cite your domain",
6
6
  "license": "FSL-1.1-ALv2",
@@ -68,25 +68,25 @@
68
68
  "tsx": "^4.19.0",
69
69
  "@ainyc/canonry-api-client": "0.0.0",
70
70
  "@ainyc/canonry-api-routes": "0.0.0",
71
- "@ainyc/canonry-contracts": "0.0.0",
72
- "@ainyc/canonry-db": "0.0.0",
73
71
  "@ainyc/canonry-config": "0.0.0",
74
- "@ainyc/canonry-integration-bing": "0.0.0",
72
+ "@ainyc/canonry-db": "0.0.0",
73
+ "@ainyc/canonry-contracts": "0.0.0",
75
74
  "@ainyc/canonry-integration-openai-ads": "0.0.0",
75
+ "@ainyc/canonry-integration-bing": "0.0.0",
76
+ "@ainyc/canonry-integration-cloud-run": "0.0.0",
76
77
  "@ainyc/canonry-integration-commoncrawl": "0.0.0",
77
78
  "@ainyc/canonry-integration-google": "0.0.0",
78
- "@ainyc/canonry-integration-cloud-run": "0.0.0",
79
79
  "@ainyc/canonry-integration-google-business-profile": "0.0.0",
80
80
  "@ainyc/canonry-integration-google-places": "0.0.0",
81
+ "@ainyc/canonry-integration-wordpress": "0.0.0",
81
82
  "@ainyc/canonry-integration-traffic": "0.0.0",
82
83
  "@ainyc/canonry-intelligence": "0.0.0",
83
- "@ainyc/canonry-integration-wordpress": "0.0.0",
84
84
  "@ainyc/canonry-provider-cdp": "0.0.0",
85
85
  "@ainyc/canonry-provider-claude": "0.0.0",
86
- "@ainyc/canonry-provider-local": "0.0.0",
86
+ "@ainyc/canonry-provider-gemini": "0.0.0",
87
87
  "@ainyc/canonry-provider-openai": "0.0.0",
88
- "@ainyc/canonry-provider-perplexity": "0.0.0",
89
- "@ainyc/canonry-provider-gemini": "0.0.0"
88
+ "@ainyc/canonry-provider-local": "0.0.0",
89
+ "@ainyc/canonry-provider-perplexity": "0.0.0"
90
90
  },
91
91
  "scripts": {
92
92
  "build": "tsx scripts/copy-agent-assets.ts && tsup && tsx build-web.ts",