@canonry/canonry 5.20.1 → 5.20.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.
@@ -792,7 +792,7 @@ import {
792
792
  wordpressSchemaDeployResultDtoSchema,
793
793
  wordpressSchemaStatusResultDtoSchema,
794
794
  wordpressStatusDtoSchema
795
- } from "./chunk-QF7SY7AF.js";
795
+ } from "./chunk-TOSPZ7I5.js";
796
796
 
797
797
  // src/intelligence-service.ts
798
798
  import { eq as eq71, desc as desc32, asc as asc12, and as and60, ne as ne11, or as or18, inArray as inArray27, gte as gte18, lte as lte15, isNull as isNull13, sql as sql28, exists } from "drizzle-orm";
@@ -4,14 +4,14 @@ import {
4
4
  installSkills,
5
5
  loadConfigRaw,
6
6
  saveConfigPatch
7
- } from "./chunk-5FKR2K76.js";
7
+ } from "./chunk-PXVJ3P5G.js";
8
8
  import {
9
9
  PACKAGE_VERSION
10
- } from "./chunk-XBGPHZKA.js";
10
+ } from "./chunk-JJPZ4OQ2.js";
11
11
  import {
12
12
  SKILL_MANIFEST_FILENAME,
13
13
  SkillsClients
14
- } from "./chunk-QF7SY7AF.js";
14
+ } from "./chunk-TOSPZ7I5.js";
15
15
 
16
16
  // src/skills-autosync.ts
17
17
  import fs from "fs";
@@ -13,19 +13,19 @@ import {
13
13
  resolveOperatorApiKeyIds,
14
14
  runWithUsageTags,
15
15
  saveConfigPatch
16
- } from "./chunk-5FKR2K76.js";
16
+ } from "./chunk-PXVJ3P5G.js";
17
17
  import {
18
18
  deleteSiteCrawlGraphLayout,
19
19
  persistSiteCrawlGraphLayout,
20
20
  prepareSiteCrawlGraphLayout
21
- } from "./chunk-EM7ZNUVO.js";
21
+ } from "./chunk-KHNPBUUN.js";
22
22
  import {
23
23
  CanonryMcpToolNames,
24
24
  CliError,
25
25
  PACKAGE_VERSION,
26
26
  canonryMcpTools,
27
27
  isMachineFormat
28
- } from "./chunk-XBGPHZKA.js";
28
+ } from "./chunk-JJPZ4OQ2.js";
29
29
  import {
30
30
  CC_CACHE_DIR,
31
31
  DUCKDB_SPEC,
@@ -186,7 +186,7 @@ import {
186
186
  siteLivenessState,
187
187
  toAlertView,
188
188
  usageCounters
189
- } from "./chunk-PAZVNFQ3.js";
189
+ } from "./chunk-7YGOE4R2.js";
190
190
  import {
191
191
  AGENT_MEMORY_VALUE_MAX_BYTES,
192
192
  AGENT_NONE,
@@ -223,6 +223,8 @@ import {
223
223
  RUN_FILL_PROVIDER_BREAKER,
224
224
  ResearchQueryStatuses,
225
225
  ResearchRunStatuses,
226
+ RetrievalContracts,
227
+ RetrievalStatuses,
226
228
  RunKinds,
227
229
  RunStatuses,
228
230
  RunTriggers,
@@ -351,7 +353,7 @@ import {
351
353
  visibilityReportRequestSchema,
352
354
  winnabilityClassLabel,
353
355
  withRetry
354
- } from "./chunk-QF7SY7AF.js";
356
+ } from "./chunk-TOSPZ7I5.js";
355
357
 
356
358
  // src/runtime-context.ts
357
359
  function cliRuntimeContext(env = process.env, stdio = process) {
@@ -4076,6 +4078,7 @@ async function withRetry3(fn, options = {}) {
4076
4078
 
4077
4079
  // ../provider-openai/src/normalize.ts
4078
4080
  var DEFAULT_MODEL2 = "gpt-5.4";
4081
+ var OPENAI_RETRIEVAL_CONTRACT = RetrievalContracts["search-required-v1"];
4079
4082
  function createClient3(config) {
4080
4083
  return new OpenAI({
4081
4084
  apiKey: config.apiKey,
@@ -4138,6 +4141,8 @@ async function executeTrackedQuery2(input) {
4138
4141
  () => client.responses.create({
4139
4142
  model,
4140
4143
  tools: [webSearchTool],
4144
+ // search-required-v1: web_search is the only tool, so requiring a tool
4145
+ // call requires a search. See OPENAI_RETRIEVAL_CONTRACT.
4141
4146
  tool_choice: "required",
4142
4147
  input: buildPrompt2(input.query)
4143
4148
  })
@@ -4150,7 +4155,9 @@ async function executeTrackedQuery2(input) {
4150
4155
  model,
4151
4156
  servedModel: extractServedModel2(rawResponse),
4152
4157
  groundingSources: parsed.groundingSources,
4153
- searchQueries: parsed.searchQueries
4158
+ searchQueries: parsed.searchQueries,
4159
+ retrievalStatus: parsed.retrievalStatus,
4160
+ retrievalContract: OPENAI_RETRIEVAL_CONTRACT
4154
4161
  };
4155
4162
  } catch (err) {
4156
4163
  const msg = describeError(err);
@@ -4168,7 +4175,8 @@ function normalizeResult2(raw) {
4168
4175
  answerText: parsed.answerText,
4169
4176
  citedDomains,
4170
4177
  groundingSources,
4171
- searchQueries
4178
+ searchQueries,
4179
+ retrievalStatus: useParsed ? parsed.retrievalStatus : raw.retrievalStatus
4172
4180
  };
4173
4181
  }
4174
4182
  function hasParsedResponseContent2(rawResponse) {
@@ -4185,9 +4193,22 @@ function reparseStoredResult2(rawResponse) {
4185
4193
  answerText: extractAnswerTextFromRaw(rawResponse),
4186
4194
  citedDomains: extractCitedDomainsFromSources2(groundingSources),
4187
4195
  groundingSources,
4188
- searchQueries
4196
+ searchQueries,
4197
+ retrievalStatus: extractRetrievalStatusFromRaw(rawResponse)
4189
4198
  };
4190
4199
  }
4200
+ function extractRetrievalStatusFromRaw(rawResponse) {
4201
+ const output = rawResponse.output;
4202
+ if (!Array.isArray(output) || output.length === 0) return RetrievalStatuses.unknown;
4203
+ const searched = output.some(
4204
+ (item) => item !== null && typeof item === "object" && item.type === "web_search_call"
4205
+ );
4206
+ if (searched) return RetrievalStatuses.used;
4207
+ if (typeof rawResponse.status === "string" && rawResponse.status !== "completed") {
4208
+ return RetrievalStatuses.unknown;
4209
+ }
4210
+ return RetrievalStatuses["not-used"];
4211
+ }
4191
4212
  function buildPrompt2(query) {
4192
4213
  return query;
4193
4214
  }
@@ -4402,13 +4423,12 @@ var openaiAdapter = {
4402
4423
  servedModel: raw.servedModel,
4403
4424
  groundingSources: raw.groundingSources,
4404
4425
  searchQueries: raw.searchQueries,
4405
- // Retrieval detection is not implemented for this provider. Its candidate
4406
- // marker is present on 100% of stored rows, so it has never been shown to
4407
- // discriminate a non-retrieving answer and wiring it up would hardcode
4408
- // `used`. `unknown` states what we actually know. The contract is a
4409
- // declaration about how we build the request, so it is always knowable.
4410
- retrievalStatus: "unknown",
4411
- retrievalContract: "native-auto-v1"
4426
+ // Read from the response's `web_search_call` items. Under forced search
4427
+ // nearly every row reads `used`; that is the contract holding, and a
4428
+ // `not-used` row is the visible breach, so the observation still
4429
+ // discriminates. The contract declares how the request was built.
4430
+ retrievalStatus: raw.retrievalStatus,
4431
+ retrievalContract: raw.retrievalContract
4412
4432
  };
4413
4433
  },
4414
4434
  normalizeResult(raw) {
@@ -4417,7 +4437,11 @@ var openaiAdapter = {
4417
4437
  rawResponse: raw.rawResponse,
4418
4438
  model: raw.model,
4419
4439
  groundingSources: raw.groundingSources,
4420
- searchQueries: raw.searchQueries
4440
+ searchQueries: raw.searchQueries,
4441
+ // A reconstruction that predates the field falls back to `unknown`
4442
+ // rather than asserting an absence.
4443
+ retrievalStatus: raw.retrievalStatus ?? RetrievalStatuses.unknown,
4444
+ retrievalContract: raw.retrievalContract ?? OPENAI_RETRIEVAL_CONTRACT
4421
4445
  };
4422
4446
  const normalized = normalizeResult2(openaiRaw);
4423
4447
  return {
@@ -4426,7 +4450,7 @@ var openaiAdapter = {
4426
4450
  citedDomains: normalized.citedDomains,
4427
4451
  groundingSources: normalized.groundingSources,
4428
4452
  searchQueries: normalized.searchQueries,
4429
- retrievalStatus: "unknown"
4453
+ retrievalStatus: normalized.retrievalStatus
4430
4454
  };
4431
4455
  },
4432
4456
  async generateText(prompt, config) {
@@ -4459,7 +4483,23 @@ async function withRetry4(fn, options = {}) {
4459
4483
  // ../provider-claude/src/normalize.ts
4460
4484
  var DEFAULT_MODEL3 = "claude-sonnet-4-6";
4461
4485
  var VALIDATION_PATTERN = /^claude-/;
4462
- var CLAUDE_RETRIEVAL_CONTRACT = "search-required-v1";
4486
+ var CLAUDE_RETRIEVAL_CONTRACT = RetrievalContracts["search-required-v1"];
4487
+ var CLAUDE_MODELS_REJECTING_FORCED_TOOL_CHOICE = /* @__PURE__ */ new Set(["claude-opus-5-5", "claude-fable-5-1", "claude-mythos-5-1"]);
4488
+ function claudeModelRejectsForcedToolChoice(model) {
4489
+ return CLAUDE_MODELS_REJECTING_FORCED_TOOL_CHOICE.has(
4490
+ model.trim().toLowerCase()
4491
+ );
4492
+ }
4493
+ function claudeRetrievalContractForModel(model) {
4494
+ return claudeModelRejectsForcedToolChoice(model) ? RetrievalContracts["native-auto-v1"] : CLAUDE_RETRIEVAL_CONTRACT;
4495
+ }
4496
+ var CLAUDE_TOOL_CHOICE_BY_CONTRACT = {
4497
+ [RetrievalContracts["search-required-v1"]]: {
4498
+ type: "tool",
4499
+ name: "web_search"
4500
+ },
4501
+ [RetrievalContracts["native-auto-v1"]]: { type: "auto" }
4502
+ };
4463
4503
  function resolveModel2(config) {
4464
4504
  const m = config.model;
4465
4505
  if (!m) return DEFAULT_MODEL3;
@@ -4474,7 +4514,7 @@ function validateConfig3(config) {
4474
4514
  return { ok: false, provider: "claude", message: "missing api key" };
4475
4515
  }
4476
4516
  const model = resolveModel2(config);
4477
- const warning = config.model && !VALIDATION_PATTERN.test(config.model) ? ` (invalid model "${config.model}" replaced with default)` : "";
4517
+ const warning = config.model && !VALIDATION_PATTERN.test(config.model) ? ` (invalid model "${config.model}" replaced with default)` : claudeModelRejectsForcedToolChoice(model) ? ` (${model} rejects forced tool_choice, so tracked queries run under ${claudeRetrievalContractForModel(model)}: web_search is offered but retrieval is not guaranteed)` : "";
4478
4518
  return {
4479
4519
  ok: true,
4480
4520
  provider: "claude",
@@ -4513,6 +4553,7 @@ async function healthcheck3(config) {
4513
4553
  }
4514
4554
  async function executeTrackedQuery3(input) {
4515
4555
  const model = resolveModel2(input.config);
4556
+ const retrievalContract = claudeRetrievalContractForModel(model);
4516
4557
  const client = new Anthropic({ apiKey: input.config.apiKey });
4517
4558
  const webSearchTool = {
4518
4559
  type: "web_search_20250305",
@@ -4534,9 +4575,11 @@ async function executeTrackedQuery3(input) {
4534
4575
  model,
4535
4576
  max_tokens: 4096,
4536
4577
  tools: [webSearchTool],
4537
- // search-required-v1: retrieval is guaranteed by the API control, so the
4538
- // query text and answer substance stay untouched. See the contract note.
4539
- tool_choice: { type: "tool", name: "web_search" },
4578
+ // search-required-v1 forces web_search, so retrieval is guaranteed by the
4579
+ // API control and the query text and answer substance stay untouched.
4580
+ // native-auto-v1 (models that reject forcing) leaves the search to
4581
+ // Claude. See claudeRetrievalContractForModel.
4582
+ tool_choice: CLAUDE_TOOL_CHOICE_BY_CONTRACT[retrievalContract],
4540
4583
  messages: [{ role: "user", content: input.query }]
4541
4584
  })
4542
4585
  );
@@ -4553,7 +4596,7 @@ async function executeTrackedQuery3(input) {
4553
4596
  groundingSources: parsed.groundingSources,
4554
4597
  searchQueries: parsed.searchQueries,
4555
4598
  retrievalStatus: parsed.retrievalStatus,
4556
- retrievalContract: CLAUDE_RETRIEVAL_CONTRACT
4599
+ retrievalContract
4557
4600
  };
4558
4601
  } catch (err) {
4559
4602
  const msg = describeError(err);
@@ -4591,7 +4634,7 @@ function reparseStoredResult3(rawResponse) {
4591
4634
  citedDomains: extractCitedDomainsFromSources3(groundingSources),
4592
4635
  groundingSources,
4593
4636
  searchQueries,
4594
- retrievalStatus: extractRetrievalStatusFromRaw(rawResponse),
4637
+ retrievalStatus: extractRetrievalStatusFromRaw2(rawResponse),
4595
4638
  ...providerErrors.length > 0 ? { providerError: `web_search tool error: ${providerErrors.join(", ")}` } : {}
4596
4639
  };
4597
4640
  }
@@ -4631,7 +4674,7 @@ function extractGroundingSourcesFromRaw2(rawResponse) {
4631
4674
  }
4632
4675
  return sources;
4633
4676
  }
4634
- function extractRetrievalStatusFromRaw(rawResponse) {
4677
+ function extractRetrievalStatusFromRaw2(rawResponse) {
4635
4678
  try {
4636
4679
  const content = rawResponse.content;
4637
4680
  if (!Array.isArray(content) || content.length === 0) return "unknown";
@@ -4835,7 +4878,8 @@ var claudeAdapter = {
4835
4878
  // across this boundary. A reconstruction that predates the field falls
4836
4879
  // back to `unknown` rather than asserting an absence.
4837
4880
  retrievalStatus: raw.retrievalStatus ?? "unknown",
4838
- retrievalContract: raw.retrievalContract ?? CLAUDE_RETRIEVAL_CONTRACT
4881
+ // The contract is decided by the model the request was built for.
4882
+ retrievalContract: raw.retrievalContract ?? claudeRetrievalContractForModel(raw.model)
4839
4883
  };
4840
4884
  const normalized = normalizeResult3(claudeRaw);
4841
4885
  return {
@@ -6604,7 +6648,7 @@ function nonBlank(value) {
6604
6648
  return trimmed ? trimmed : void 0;
6605
6649
  }
6606
6650
  function resolveBuildCommit(env = process.env) {
6607
- const embedded = true ? "ce28687c960cb27f6e173cc56510b33b44a0f0b3" : void 0;
6651
+ const embedded = true ? "391e3197a54a3b85226958ac923a021d124eaf60" : void 0;
6608
6652
  return nonBlank(embedded) ?? nonBlank(env.CANONRY_COMMIT);
6609
6653
  }
6610
6654
  function resolveInstanceIdentity(env = process.env) {
@@ -11720,6 +11764,7 @@ async function backfillAnswerVisibilityCommand(opts) {
11720
11764
  let mentioned = 0;
11721
11765
  let reparsed = 0;
11722
11766
  let providerErrors = 0;
11767
+ let retrievalRelabeled = 0;
11723
11768
  if (scopedProjects.length > 0) {
11724
11769
  const runRows = projectFilter ? db.select({ id: runs.id, projectId: runs.projectId, planVersionId: runs.measurementPlanVersionId }).from(runs).where(and13(
11725
11770
  eq15(runs.kind, RunKinds["answer-visibility"]),
@@ -11758,7 +11803,9 @@ async function backfillAnswerVisibilityCommand(opts) {
11758
11803
  citedDomains: querySnapshots.citedDomains,
11759
11804
  competitorOverlap: querySnapshots.competitorOverlap,
11760
11805
  recommendedCompetitors: querySnapshots.recommendedCompetitors,
11761
- rawResponse: querySnapshots.rawResponse
11806
+ rawResponse: querySnapshots.rawResponse,
11807
+ retrievalStatus: querySnapshots.retrievalStatus,
11808
+ retrievalContract: querySnapshots.retrievalContract
11762
11809
  }).from(querySnapshots).where(inArray6(querySnapshots.runId, batchRunIds)).all();
11763
11810
  const pendingUpdates = [];
11764
11811
  for (const snapshot of snapshotRows) {
@@ -11783,10 +11830,9 @@ async function backfillAnswerVisibilityCommand(opts) {
11783
11830
  citedDomains: reparsedResult.citedDomains,
11784
11831
  groundingSources: reparsedResult.groundingSources,
11785
11832
  searchQueries: reparsedResult.searchQueries,
11786
- // Backfill recomputes mention and citation state from stored
11787
- // rows; it never observes retrieval and never writes it back
11788
- // (nextPatch carries no retrieval field). `unknown` keeps this
11789
- // reconstruction from asserting anything about a search.
11833
+ // Only feeds the citation/mention helpers below, which ignore
11834
+ // it. Retrieval is written back solely by the narrow OpenAI
11835
+ // contract correction after this block.
11790
11836
  retrievalStatus: "unknown"
11791
11837
  };
11792
11838
  const nextCitationState = determineCitationState(normalized, projectDomains);
@@ -11821,6 +11867,11 @@ async function backfillAnswerVisibilityCommand(opts) {
11821
11867
  nextPatch.rawResponse = nextRawResponse;
11822
11868
  }
11823
11869
  }
11870
+ const retrievalCorrection = correctStoredOpenAIRetrieval(snapshot, reparsedResult);
11871
+ if (retrievalCorrection) {
11872
+ retrievalRelabeled++;
11873
+ Object.assign(nextPatch, retrievalCorrection);
11874
+ }
11824
11875
  if (Object.keys(nextPatch).length > 0) {
11825
11876
  pendingUpdates.push({ id: snapshot.id, patch: nextPatch });
11826
11877
  }
@@ -11847,7 +11898,8 @@ async function backfillAnswerVisibilityCommand(opts) {
11847
11898
  updated,
11848
11899
  mentioned,
11849
11900
  reparsed,
11850
- providerErrors
11901
+ providerErrors,
11902
+ retrievalRelabeled
11851
11903
  };
11852
11904
  if (isDryRun) {
11853
11905
  result2.dryRun = true;
@@ -11872,6 +11924,7 @@ async function backfillAnswerVisibilityCommand(opts) {
11872
11924
  console.log(` Mentioned: ${mentioned}`);
11873
11925
  console.log(` Reparsed: ${reparsed}`);
11874
11926
  console.log(` Errors: ${providerErrors}`);
11927
+ console.log(` Relabeled: ${retrievalRelabeled} (OpenAI retrieval contract)`);
11875
11928
  if (isDryRun) {
11876
11929
  console.log(`
11877
11930
  No DB writes performed. Re-run without --dry-run to apply.`);
@@ -12072,7 +12125,8 @@ function backfillProjectAnswerMentions(db, projectId, opts) {
12072
12125
  answerText,
12073
12126
  citedDomains,
12074
12127
  groundingSources,
12075
- // See the note above: retrieval is not observed or written here.
12128
+ // Only feeds the competitor helpers, which ignore it. This pass never
12129
+ // observes or writes retrieval.
12076
12130
  retrievalStatus: "unknown",
12077
12131
  searchQueries: []
12078
12132
  };
@@ -12181,7 +12235,7 @@ function readStoredGroundingSources(rawResponse) {
12181
12235
  return result2;
12182
12236
  }
12183
12237
  async function backfillInsightsCommand(project, opts) {
12184
- const { IntelligenceService: IntelligenceService2 } = await import("./intelligence-service-73OEZNLJ.js");
12238
+ const { IntelligenceService: IntelligenceService2 } = await import("./intelligence-service-H4LGPJLZ.js");
12185
12239
  const config = loadConfig();
12186
12240
  const db = createClient(config.database);
12187
12241
  migrate(db);
@@ -12470,6 +12524,14 @@ Snapshot attribution ${isDryRun ? "preview" : "recovery"} complete.`);
12470
12524
  No DB writes performed. Re-run without --dry-run to apply.`);
12471
12525
  }
12472
12526
  }
12527
+ function correctStoredOpenAIRetrieval(snapshot, reparsed) {
12528
+ if (snapshot.provider !== ProviderNames.openai) return null;
12529
+ if (snapshot.retrievalContract !== RetrievalContracts["native-auto-v1"]) return null;
12530
+ return {
12531
+ retrievalContract: OPENAI_RETRIEVAL_CONTRACT,
12532
+ ...reparsed?.retrievalStatus === void 0 ? {} : { retrievalStatus: reparsed.retrievalStatus }
12533
+ };
12534
+ }
12473
12535
  function reparseProviderSnapshot(provider, rawResponse) {
12474
12536
  const envelope = parseJsonColumn(rawResponse, {});
12475
12537
  const apiResponse = resolveStoredApiResponse(envelope);
@@ -105,7 +105,7 @@ import {
105
105
  trafficEventKindSchema,
106
106
  trafficSeriesGranularitySchema,
107
107
  visibilityReportRequestSchema
108
- } from "./chunk-QF7SY7AF.js";
108
+ } from "./chunk-TOSPZ7I5.js";
109
109
 
110
110
  // src/cli-error.ts
111
111
  function isMachineFormat(format) {
@@ -5,12 +5,12 @@ import {
5
5
  siteCrawlGraphNodes,
6
6
  siteCrawlPages,
7
7
  siteCrawlSnapshots
8
- } from "./chunk-PAZVNFQ3.js";
8
+ } from "./chunk-7YGOE4R2.js";
9
9
  import {
10
10
  SITE_CRAWL_GRAPH_MAX_EDGES,
11
11
  SITE_CRAWL_GRAPH_MAX_NODES,
12
12
  TEMPLATE_LINK_RATIO_THRESHOLD
13
- } from "./chunk-QF7SY7AF.js";
13
+ } from "./chunk-TOSPZ7I5.js";
14
14
 
15
15
  // src/site-crawl-graph-layout.ts
16
16
  import crypto from "crypto";
@@ -5,7 +5,7 @@ import {
5
5
  PACKAGE_VERSION,
6
6
  canonryMcpTools,
7
7
  isMachineFormat
8
- } from "./chunk-XBGPHZKA.js";
8
+ } from "./chunk-JJPZ4OQ2.js";
9
9
  import {
10
10
  AGENT_PROVIDER_IDS,
11
11
  CANONRY_NPM_PACKAGE_URL,
@@ -37,7 +37,7 @@ import {
37
37
  skillsClientSchema,
38
38
  upgradeCaveatFor,
39
39
  upgradeCommandFor
40
- } from "./chunk-QF7SY7AF.js";
40
+ } from "./chunk-TOSPZ7I5.js";
41
41
 
42
42
  // src/config.ts
43
43
  import fs from "fs";
@@ -19737,6 +19737,8 @@ export {
19737
19737
  buildMeasurementRunManifestV1,
19738
19738
  measurementReportResponseSchema,
19739
19739
  measurementPropertyEvidenceResponseSchema,
19740
+ RetrievalStatuses,
19741
+ RetrievalContracts,
19740
19742
  MEASUREMENT_PORTFOLIO_DEFAULT_LIMIT,
19741
19743
  MEASUREMENT_PORTFOLIO_ROW_EVIDENCE_LIMIT,
19742
19744
  MEASUREMENT_PORTFOLIO_ANSWER_SOURCES_LIMIT,
package/dist/cli.js CHANGED
@@ -35,11 +35,11 @@ import {
35
35
  trackCliCommandFinished,
36
36
  trackEvent,
37
37
  waitForServerRuntimeStartup
38
- } from "./chunk-S2RDUO6K.js";
38
+ } from "./chunk-H6XSHOS5.js";
39
39
  import {
40
40
  autoSyncSkills,
41
41
  formatAutoSyncNotice
42
- } from "./chunk-TSFKNQ5X.js";
42
+ } from "./chunk-CVUR3O5G.js";
43
43
  import {
44
44
  configExists,
45
45
  createApiClient,
@@ -56,13 +56,13 @@ import {
56
56
  saveConfig,
57
57
  saveConfigPatch,
58
58
  shouldPrintServeSkillsNudge
59
- } from "./chunk-5FKR2K76.js";
59
+ } from "./chunk-PXVJ3P5G.js";
60
60
  import {
61
61
  DEFAULT_DEMO_TRUSTED_PROXIES,
62
62
  trustedProxiesProblem,
63
63
  trustedProxyProblem
64
64
  } from "./chunk-RB2F4D3Z.js";
65
- import "./chunk-EM7ZNUVO.js";
65
+ import "./chunk-KHNPBUUN.js";
66
66
  import {
67
67
  CliError,
68
68
  EXIT_SYSTEM_ERROR,
@@ -74,7 +74,7 @@ import {
74
74
  runMeasurementDraftAction,
75
75
  systemError,
76
76
  usageError
77
- } from "./chunk-XBGPHZKA.js";
77
+ } from "./chunk-JJPZ4OQ2.js";
78
78
  import {
79
79
  CLOUDFLARE_WORKER_BINDINGS,
80
80
  CLOUDFLARE_WORKER_GENERATED_MARKER,
@@ -89,7 +89,7 @@ import {
89
89
  queries,
90
90
  renderReportHtml,
91
91
  runs
92
- } from "./chunk-PAZVNFQ3.js";
92
+ } from "./chunk-7YGOE4R2.js";
93
93
  import {
94
94
  AdsDeliverySnapshotStatuses,
95
95
  AdsHistoricalCampaignRollupStatuses,
@@ -177,7 +177,7 @@ import {
177
177
  snapshotProviderModeSchema,
178
178
  visibilityReportRequestSchema,
179
179
  winnabilityClassSchema
180
- } from "./chunk-QF7SY7AF.js";
180
+ } from "./chunk-TOSPZ7I5.js";
181
181
 
182
182
  // src/cli.ts
183
183
  import { pathToFileURL } from "url";
@@ -442,7 +442,7 @@ function parseDemoTrustedProxies(values) {
442
442
  async function demoCommand(options) {
443
443
  const { host, port } = parseDemoListenOptions(options);
444
444
  const trustProxy = parseDemoTrustedProxies(options.trustProxy);
445
- const { createDemoServer } = await import("./demo-server-UOIOPFAV.js");
445
+ const { createDemoServer } = await import("./demo-server-JYDAUEP2.js");
446
446
  const app = await createDemoServer({ trustProxy });
447
447
  let stopping = false;
448
448
  const stop = () => {
@@ -4,11 +4,11 @@ import {
4
4
  import {
5
5
  layoutSiteCrawlGraphInput,
6
6
  persistSiteCrawlGraphLayout
7
- } from "./chunk-EM7ZNUVO.js";
7
+ } from "./chunk-KHNPBUUN.js";
8
8
  import {
9
9
  PACKAGE_VERSION,
10
10
  canonryMcpTools
11
- } from "./chunk-XBGPHZKA.js";
11
+ } from "./chunk-JJPZ4OQ2.js";
12
12
  import {
13
13
  HISTORY_WINDOW_RUNS,
14
14
  IntelligenceService,
@@ -84,7 +84,7 @@ import {
84
84
  siteCrawlPages,
85
85
  siteCrawlSnapshots,
86
86
  trafficSources
87
- } from "./chunk-PAZVNFQ3.js";
87
+ } from "./chunk-7YGOE4R2.js";
88
88
  import {
89
89
  RunKinds,
90
90
  SiteCrawlFetchStates,
@@ -108,7 +108,7 @@ import {
108
108
  placementLinkDecision,
109
109
  siteAuditPageFactorSchema,
110
110
  wilsonInterval
111
- } from "./chunk-QF7SY7AF.js";
111
+ } from "./chunk-TOSPZ7I5.js";
112
112
 
113
113
  // src/demo-server.ts
114
114
  import { dirname, join as join2 } from "path";
package/dist/index.js CHANGED
@@ -3,14 +3,14 @@ import {
3
3
  createGoogleMarketingCredentialStore,
4
4
  createGoogleMarketingRuntime,
5
5
  createServer
6
- } from "./chunk-S2RDUO6K.js";
6
+ } from "./chunk-H6XSHOS5.js";
7
7
  import {
8
8
  loadConfig
9
- } from "./chunk-5FKR2K76.js";
10
- import "./chunk-EM7ZNUVO.js";
11
- import "./chunk-XBGPHZKA.js";
12
- import "./chunk-PAZVNFQ3.js";
13
- import "./chunk-QF7SY7AF.js";
9
+ } from "./chunk-PXVJ3P5G.js";
10
+ import "./chunk-KHNPBUUN.js";
11
+ import "./chunk-JJPZ4OQ2.js";
12
+ import "./chunk-7YGOE4R2.js";
13
+ import "./chunk-TOSPZ7I5.js";
14
14
  export {
15
15
  GoogleMarketingRuntimeError,
16
16
  createGoogleMarketingCredentialStore,
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  HISTORY_WINDOW_RUNS,
3
3
  IntelligenceService
4
- } from "./chunk-PAZVNFQ3.js";
5
- import "./chunk-QF7SY7AF.js";
4
+ } from "./chunk-7YGOE4R2.js";
5
+ import "./chunk-TOSPZ7I5.js";
6
6
  export {
7
7
  HISTORY_WINDOW_RUNS,
8
8
  IntelligenceService
package/dist/mcp.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  autoSyncSkills
3
- } from "./chunk-TSFKNQ5X.js";
3
+ } from "./chunk-CVUR3O5G.js";
4
4
  import {
5
5
  createApiClient,
6
6
  createCanonryMcpServer
7
- } from "./chunk-5FKR2K76.js";
8
- import "./chunk-XBGPHZKA.js";
7
+ } from "./chunk-PXVJ3P5G.js";
8
+ import "./chunk-JJPZ4OQ2.js";
9
9
  import {
10
10
  isReadOnlyKey,
11
11
  updateCheckEnvOptOut
12
- } from "./chunk-QF7SY7AF.js";
12
+ } from "./chunk-TOSPZ7I5.js";
13
13
 
14
14
  // src/mcp/cli.ts
15
15
  import { randomUUID } from "crypto";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canonry/canonry",
3
- "version": "5.20.1",
3
+ "version": "5.20.3",
4
4
  "type": "module",
5
5
  "description": "Self-hosted AI visibility (AEO) platform: track how ChatGPT, Claude, Gemini, and Perplexity cite your domain, join it with Search Console, GA4, server-side traffic, and paid media, and fix what you find through agent tools (CLI, REST, MCP). Local SQLite.",
6
6
  "keywords": [
@@ -86,30 +86,30 @@
86
86
  "@types/node-cron": "^3.0.11",
87
87
  "tsup": "^8.5.1",
88
88
  "tsx": "^4.19.0",
89
- "@ainyc/canonry-web": "0.0.0",
90
89
  "@ainyc/canonry-api-client": "0.0.0",
91
- "@ainyc/canonry-api-routes": "0.0.0",
92
- "@ainyc/canonry-db": "0.0.0",
93
90
  "@ainyc/canonry-config": "0.0.0",
91
+ "@ainyc/canonry-web": "0.0.0",
92
+ "@ainyc/canonry-api-routes": "0.0.0",
94
93
  "@ainyc/canonry-contracts": "0.0.0",
94
+ "@ainyc/canonry-db": "0.0.0",
95
95
  "@ainyc/canonry-integration-cloud-run": "0.0.0",
96
- "@ainyc/canonry-integration-cloudflare-queue": "0.0.0",
97
- "@ainyc/canonry-integration-bing": "0.0.0",
98
96
  "@ainyc/canonry-integration-cloudflare-worker": "0.0.0",
97
+ "@ainyc/canonry-integration-bing": "0.0.0",
99
98
  "@ainyc/canonry-integration-google": "0.0.0",
100
- "@ainyc/canonry-integration-google-business-profile": "0.0.0",
99
+ "@ainyc/canonry-integration-cloudflare-queue": "0.0.0",
100
+ "@ainyc/canonry-integration-commoncrawl": "0.0.0",
101
101
  "@ainyc/canonry-integration-google-ads": "0.0.0",
102
102
  "@ainyc/canonry-integration-google-places": "0.0.0",
103
+ "@ainyc/canonry-integration-google-business-profile": "0.0.0",
103
104
  "@ainyc/canonry-integration-google-tag-manager": "0.0.0",
104
105
  "@ainyc/canonry-integration-openai-ads": "0.0.0",
105
- "@ainyc/canonry-integration-commoncrawl": "0.0.0",
106
106
  "@ainyc/canonry-integration-traffic": "0.0.0",
107
107
  "@ainyc/canonry-integration-wordpress": "0.0.0",
108
108
  "@ainyc/canonry-intelligence": "0.0.0",
109
- "@ainyc/canonry-provider-claude": "0.0.0",
110
109
  "@ainyc/canonry-provider-cdp": "0.0.0",
111
- "@ainyc/canonry-provider-gemini": "0.0.0",
110
+ "@ainyc/canonry-provider-claude": "0.0.0",
112
111
  "@ainyc/canonry-provider-local": "0.0.0",
112
+ "@ainyc/canonry-provider-gemini": "0.0.0",
113
113
  "@ainyc/canonry-provider-openai": "0.0.0",
114
114
  "@ainyc/canonry-provider-perplexity": "0.0.0"
115
115
  },