@canonry/canonry 4.159.0 → 4.160.0

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 (30) hide show
  1. package/README.md +1 -1
  2. package/assets/agent-workspace/skills/aero/SKILL.md +16 -1
  3. package/assets/agent-workspace/skills/canonry/SKILL.md +17 -5
  4. package/assets/agent-workspace/skills/canonry/references/canonry-cli.md +66 -0
  5. package/assets/agent-workspace/skills/canonry/references/server-side-traffic.md +231 -62
  6. package/assets/assets/{AuditHistoryPanel-BiloGcQA.js → AuditHistoryPanel-AtgoG2AH.js} +1 -1
  7. package/assets/assets/{BacklinksPage-CPM1O2bC.js → BacklinksPage-DrOSF7Mu.js} +1 -1
  8. package/assets/assets/{HistoryPage-1YOjtdJy.js → HistoryPage-CGQXleJc.js} +1 -1
  9. package/assets/assets/{MeasurementPropertyPage-CVDTY_gC.js → MeasurementPropertyPage-C7D2OgIQ.js} +1 -1
  10. package/assets/assets/{ProjectPage-DnGXMx1n.js → ProjectPage-Lp1VjNvL.js} +1 -1
  11. package/assets/assets/{RunRow-fIaadH4h.js → RunRow-BdzKKODo.js} +1 -1
  12. package/assets/assets/{RunsPage-DfifdM5z.js → RunsPage-BU96L07S.js} +1 -1
  13. package/assets/assets/{SettingsPage-efA2EEmS.js → SettingsPage-LEca0kDH.js} +1 -1
  14. package/assets/assets/{SiteHealthSection-BROtQGfu.js → SiteHealthSection-CKM4DUfE.js} +3 -3
  15. package/assets/assets/{TrafficPage-Wk43Bm_q.js → TrafficPage-tU9wl1F_.js} +1 -1
  16. package/assets/assets/{TrafficSourceDetailPage-BhBvoLWu.js → TrafficSourceDetailPage-DZTpnU9f.js} +1 -1
  17. package/assets/assets/{extract-error-message-YGzZFvWs.js → extract-error-message-BAyN-ftk.js} +1 -1
  18. package/assets/assets/{index-DmsIZQAm.js → index-Wqv7kvs-.js} +22 -22
  19. package/assets/assets/{react-sigma_core.esm.min-DM9XptbM.js → react-sigma_core.esm.min-DlZOAc_w.js} +1 -1
  20. package/assets/index.html +1 -1
  21. package/dist/{chunk-ZL3VY435.js → chunk-7M7T5QXS.js} +77 -8
  22. package/dist/{chunk-ZEG43TY2.js → chunk-HQAVEK42.js} +21 -1
  23. package/dist/{chunk-5AFWHKKI.js → chunk-X7CYY5Q7.js} +1924 -667
  24. package/dist/{chunk-BZPBVOAM.js → chunk-XGESWHFP.js} +39 -16
  25. package/dist/cli.js +295 -117
  26. package/dist/index.d.ts +28 -14
  27. package/dist/index.js +4 -4
  28. package/dist/{intelligence-service-DHY5CYWX.js → intelligence-service-6XQMM466.js} +2 -2
  29. package/dist/mcp.js +2 -2
  30. package/package.json +10 -9
@@ -10,7 +10,7 @@ import {
10
10
  loadConfig,
11
11
  loadConfigRaw,
12
12
  saveConfigPatch
13
- } from "./chunk-ZEG43TY2.js";
13
+ } from "./chunk-HQAVEK42.js";
14
14
  import {
15
15
  CC_CACHE_DIR,
16
16
  DUCKDB_SPEC,
@@ -137,7 +137,7 @@ import {
137
137
  siteCrawlSnapshots,
138
138
  toAlertView,
139
139
  usageCounters
140
- } from "./chunk-5AFWHKKI.js";
140
+ } from "./chunk-X7CYY5Q7.js";
141
141
  import {
142
142
  AGENT_MEMORY_VALUE_MAX_BYTES,
143
143
  AGENT_PROVIDER_IDS,
@@ -191,6 +191,7 @@ import {
191
191
  bucketOnboardingCount,
192
192
  buildRunErrorFromMessages,
193
193
  classifySkillFile,
194
+ cloudflareQueueNameSchema,
194
195
  coerceSkillManifest,
195
196
  computeBacklinkSummaryMetrics,
196
197
  contentActionLabel,
@@ -246,7 +247,7 @@ import {
246
247
  validationError,
247
248
  winnabilityClassLabel,
248
249
  withRetry
249
- } from "./chunk-ZL3VY435.js";
250
+ } from "./chunk-7M7T5QXS.js";
250
251
 
251
252
  // src/telemetry.ts
252
253
  import crypto from "crypto";
@@ -3187,29 +3188,33 @@ function ensureConnections6(config) {
3187
3188
  if (!config.cloudflareTraffic.connections) config.cloudflareTraffic.connections = [];
3188
3189
  return config.cloudflareTraffic.connections;
3189
3190
  }
3190
- function normalizeDirectPushConnection(connection) {
3191
+ function normalizeCloudflareTrafficConnection(connection) {
3191
3192
  const deliveryMode = connection.deliveryMode;
3192
- if (deliveryMode !== void 0 && deliveryMode !== "direct-push") {
3193
- throw unsupportedDeliveryMode(deliveryMode);
3193
+ if (deliveryMode === "queue-pull") {
3194
+ const queue = connection;
3195
+ if (typeof queue.apiToken !== "string" || queue.apiToken.length === 0 || typeof queue.accountId !== "string" || queue.accountId.length === 0 || typeof queue.queueId !== "string" || queue.queueId.length === 0 || typeof queue.queueName !== "string" || !cloudflareQueueNameSchema.safeParse(queue.queueName).success || typeof queue.retentionSeconds !== "number" || !Number.isInteger(queue.retentionSeconds) || queue.retentionSeconds < 60 || queue.retentionSeconds > 1209600) {
3196
+ throw new Error("Invalid Cloudflare queue-pull credential configuration");
3197
+ }
3198
+ return connection;
3194
3199
  }
3195
3200
  if (deliveryMode === "direct-push") return connection;
3196
- return { ...connection, deliveryMode: "direct-push" };
3201
+ if (deliveryMode === void 0) {
3202
+ return { ...connection, deliveryMode: "direct-push" };
3203
+ }
3204
+ throw unsupportedDeliveryMode(deliveryMode);
3197
3205
  }
3198
3206
  function getCloudflareTrafficConnection(config, projectName) {
3199
3207
  const connection = (config.cloudflareTraffic?.connections ?? []).find((c) => c.projectName === projectName);
3200
- return connection ? normalizeDirectPushConnection(connection) : void 0;
3208
+ return connection ? normalizeCloudflareTrafficConnection(connection) : void 0;
3201
3209
  }
3202
3210
  function getCloudflareTrafficConnectionBySourceId(config, sourceId) {
3203
3211
  const connection = (config.cloudflareTraffic?.connections ?? []).find((c) => c.sourceId === sourceId);
3204
- return connection ? normalizeDirectPushConnection(connection) : void 0;
3212
+ return connection ? normalizeCloudflareTrafficConnection(connection) : void 0;
3205
3213
  }
3206
3214
  function upsertCloudflareTrafficConnection(config, connection) {
3207
- const deliveryMode = connection.deliveryMode;
3208
- if (deliveryMode !== "direct-push") {
3209
- throw unsupportedDeliveryMode(deliveryMode);
3210
- }
3215
+ normalizeCloudflareTrafficConnection(connection);
3211
3216
  const connections = ensureConnections6(config);
3212
- const index = connections.findIndex((c) => c.projectName === connection.projectName);
3217
+ const index = connections.findIndex((c) => c.sourceId === connection.sourceId);
3213
3218
  if (index === -1) {
3214
3219
  connections.push(connection);
3215
3220
  return connection;
@@ -3217,6 +3222,16 @@ function upsertCloudflareTrafficConnection(config, connection) {
3217
3222
  connections[index] = connection;
3218
3223
  return connection;
3219
3224
  }
3225
+ function removeCloudflareTrafficConnectionBySourceId(config, sourceId) {
3226
+ const connections = config.cloudflareTraffic?.connections;
3227
+ if (!connections?.length) return false;
3228
+ const next = connections.filter((c) => c.sourceId !== sourceId);
3229
+ if (next.length === connections.length) return false;
3230
+ if (!config.cloudflareTraffic) return false;
3231
+ config.cloudflareTraffic.connections = next;
3232
+ if (next.length === 0) delete config.cloudflareTraffic;
3233
+ return true;
3234
+ }
3220
3235
  function removeCloudflareTrafficConnection(config, projectName) {
3221
3236
  const connections = config.cloudflareTraffic?.connections;
3222
3237
  if (!connections?.length) return false;
@@ -9002,7 +9017,7 @@ function readStoredGroundingSources(rawResponse) {
9002
9017
  return result;
9003
9018
  }
9004
9019
  async function backfillInsightsCommand(project, opts) {
9005
- const { IntelligenceService: IntelligenceService2 } = await import("./intelligence-service-DHY5CYWX.js");
9020
+ const { IntelligenceService: IntelligenceService2 } = await import("./intelligence-service-6XQMM466.js");
9006
9021
  const config = loadConfig();
9007
9022
  const db = createClient(config.database);
9008
9023
  migrate(db);
@@ -14655,6 +14670,14 @@ async function createServer(opts) {
14655
14670
  const removed = removeCloudflareTrafficConnection(opts.config, projectName);
14656
14671
  if (removed) saveConfigPatch(opts.config);
14657
14672
  return removed;
14673
+ },
14674
+ deleteConnectionBySourceId: (sourceId) => {
14675
+ const removed = removeCloudflareTrafficConnectionBySourceId(
14676
+ opts.config,
14677
+ sourceId
14678
+ );
14679
+ if (removed) saveConfigPatch(opts.config);
14680
+ return removed;
14658
14681
  }
14659
14682
  };
14660
14683
  const googleStateSecret = process.env.GOOGLE_STATE_SECRET ?? crypto25.randomBytes(32).toString("hex");
@@ -15710,7 +15733,7 @@ export {
15710
15733
  backfillInsightsCommand,
15711
15734
  backfillSnapshotAttributionCommand,
15712
15735
  backfillTrafficClassificationCommand,
15713
- getCloudflareTrafficConnection,
15736
+ getCloudflareTrafficConnectionBySourceId,
15714
15737
  setGoogleAuthConfig,
15715
15738
  installSkills,
15716
15739
  listSkills,