@ainyc/canonry 3.2.7 → 3.3.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.
package/assets/index.html CHANGED
@@ -12,7 +12,7 @@
12
12
  <link rel="icon" type="image/png" sizes="32x32" href="./favicon-32.png" />
13
13
  <link rel="apple-touch-icon" href="./apple-touch-icon.png" />
14
14
  <title>Canonry</title>
15
- <script type="module" crossorigin src="./assets/index-BJz9S5-O.js"></script>
15
+ <script type="module" crossorigin src="./assets/index-C1kUp1aS.js"></script>
16
16
  <link rel="stylesheet" crossorigin href="./assets/index-JG7aBJrz.css">
17
17
  </head>
18
18
  <body>
@@ -64,7 +64,7 @@ import {
64
64
  visibilityStateFromAnswerMentioned,
65
65
  windowCutoff,
66
66
  wordpressEnvSchema
67
- } from "./chunk-GY4MNUTI.js";
67
+ } from "./chunk-NCGX6UI4.js";
68
68
  import {
69
69
  IntelligenceService,
70
70
  agentMemory,
@@ -1488,7 +1488,9 @@ function extractAnswerMentions(answerText, displayName, domains) {
1488
1488
  const answerBrandKey = brandKeyFromText(answerText);
1489
1489
  const normalizedCandidates = brandNormalizedCandidates(displayName);
1490
1490
  const brandKeyCandidates = brandKeyCandidatesForMatch(displayName);
1491
- const matchesNormalized = normalizedCandidates.some((c) => answerNormalized.includes(c));
1491
+ const matchesNormalized = normalizedCandidates.some(
1492
+ (c) => new RegExp(`\\b${escapeRegExp(c)}\\b`).test(answerNormalized)
1493
+ );
1492
1494
  const matchesBrandKey = brandKeyCandidates.some(
1493
1495
  (c) => c.length >= MIN_BRAND_KEY_LENGTH && answerBrandKey.includes(c)
1494
1496
  );
@@ -1562,7 +1564,6 @@ function brandNormalizedCandidates(displayName) {
1562
1564
  if (!original) return [];
1563
1565
  const stripped = stripBusinessSuffix(original, " ");
1564
1566
  if (!stripped || stripped === original) return [original];
1565
- if (brandKeyFromText(stripped).length < MIN_BRAND_KEY_LENGTH) return [original];
1566
1567
  return [original, stripped];
1567
1568
  }
1568
1569
  function brandKeyCandidatesForMatch(displayName) {
@@ -2067,6 +2068,13 @@ function citationStateToCited(state) {
2067
2068
  return state === "cited";
2068
2069
  }
2069
2070
 
2071
+ // ../contracts/src/skills.ts
2072
+ import { z as z19 } from "zod";
2073
+ var codingAgentSchema = z19.enum(["claude", "codex"]);
2074
+ var CodingAgents = codingAgentSchema.enum;
2075
+ var skillsClientSchema = z19.enum(["claude", "codex", "all"]);
2076
+ var SkillsClients = skillsClientSchema.enum;
2077
+
2070
2078
  // src/client.ts
2071
2079
  function createApiClient() {
2072
2080
  const config = loadConfig();
@@ -2734,21 +2742,21 @@ var ApiClient = class {
2734
2742
  };
2735
2743
 
2736
2744
  // src/mcp/tool-registry.ts
2737
- import { z as z20 } from "zod";
2745
+ import { z as z21 } from "zod";
2738
2746
 
2739
2747
  // src/mcp/schema.ts
2740
- import { z as z19 } from "zod";
2741
- var projectNameSchema = z19.string().min(1).describe("Canonry project name.");
2742
- var runIdSchema = z19.string().min(1).describe("Canonry run ID.");
2743
- var insightIdSchema = z19.string().min(1).describe("Canonry insight ID.");
2744
- var analyticsWindowSchema = z19.enum(["7d", "30d", "90d", "all"]).describe("Analytics time window.");
2745
- var emptyInputSchema = z19.object({});
2746
- var projectInputSchema = z19.object({
2748
+ import { z as z20 } from "zod";
2749
+ var projectNameSchema = z20.string().min(1).describe("Canonry project name.");
2750
+ var runIdSchema = z20.string().min(1).describe("Canonry run ID.");
2751
+ var insightIdSchema = z20.string().min(1).describe("Canonry insight ID.");
2752
+ var analyticsWindowSchema = z20.enum(["7d", "30d", "90d", "all"]).describe("Analytics time window.");
2753
+ var emptyInputSchema = z20.object({});
2754
+ var projectInputSchema = z20.object({
2747
2755
  project: projectNameSchema
2748
2756
  });
2749
2757
  function toJsonSchema(schema, name) {
2750
2758
  return {
2751
- ...z19.toJSONSchema(schema, { target: "draft-7" }),
2759
+ ...z20.toJSONSchema(schema, { target: "draft-7" }),
2752
2760
  title: name
2753
2761
  };
2754
2762
  }
@@ -2790,119 +2798,119 @@ function defineTool(tool) {
2790
2798
  inputJsonSchema: toJsonSchema(tool.inputSchema, tool.name)
2791
2799
  };
2792
2800
  }
2793
- var runTriggerInputSchema = z20.object({
2801
+ var runTriggerInputSchema = z21.object({
2794
2802
  project: projectNameSchema,
2795
2803
  request: runTriggerRequestSchema.optional()
2796
2804
  });
2797
- var runsListInputSchema = z20.object({
2805
+ var runsListInputSchema = z21.object({
2798
2806
  project: projectNameSchema,
2799
- limit: z20.number().int().positive().max(500).optional()
2807
+ limit: z21.number().int().positive().max(500).optional()
2800
2808
  });
2801
- var runGetInputSchema = z20.object({
2809
+ var runGetInputSchema = z21.object({
2802
2810
  runId: runIdSchema
2803
2811
  });
2804
- var timelineInputSchema = z20.object({
2812
+ var timelineInputSchema = z21.object({
2805
2813
  project: projectNameSchema,
2806
- location: z20.string().optional().describe("Location label. Use an empty string for locationless results.")
2814
+ location: z21.string().optional().describe("Location label. Use an empty string for locationless results.")
2807
2815
  });
2808
- var snapshotsListInputSchema = z20.object({
2816
+ var snapshotsListInputSchema = z21.object({
2809
2817
  project: projectNameSchema,
2810
- limit: z20.number().int().positive().max(500).optional(),
2811
- offset: z20.number().int().nonnegative().optional(),
2812
- location: z20.string().optional().describe("Location label. Use an empty string for locationless results.")
2818
+ limit: z21.number().int().positive().max(500).optional(),
2819
+ offset: z21.number().int().nonnegative().optional(),
2820
+ location: z21.string().optional().describe("Location label. Use an empty string for locationless results.")
2813
2821
  });
2814
- var snapshotsDiffInputSchema = z20.object({
2822
+ var snapshotsDiffInputSchema = z21.object({
2815
2823
  project: projectNameSchema,
2816
2824
  run1: runIdSchema,
2817
2825
  run2: runIdSchema
2818
2826
  });
2819
- var insightsListInputSchema = z20.object({
2827
+ var insightsListInputSchema = z21.object({
2820
2828
  project: projectNameSchema,
2821
- dismissed: z20.boolean().optional(),
2829
+ dismissed: z21.boolean().optional(),
2822
2830
  runId: runIdSchema.optional()
2823
2831
  });
2824
- var insightInputSchema = z20.object({
2832
+ var insightInputSchema = z21.object({
2825
2833
  project: projectNameSchema,
2826
2834
  insightId: insightIdSchema
2827
2835
  });
2828
- var healthHistoryInputSchema = z20.object({
2836
+ var healthHistoryInputSchema = z21.object({
2829
2837
  project: projectNameSchema,
2830
- limit: z20.number().int().positive().max(100).optional()
2838
+ limit: z21.number().int().positive().max(100).optional()
2831
2839
  });
2832
- var gscPerformanceInputSchema = z20.object({
2840
+ var gscPerformanceInputSchema = z21.object({
2833
2841
  project: projectNameSchema,
2834
- startDate: z20.string().optional(),
2835
- endDate: z20.string().optional(),
2836
- query: z20.string().optional(),
2837
- page: z20.string().optional(),
2838
- limit: z20.number().int().positive().max(500).optional(),
2842
+ startDate: z21.string().optional(),
2843
+ endDate: z21.string().optional(),
2844
+ query: z21.string().optional(),
2845
+ page: z21.string().optional(),
2846
+ limit: z21.number().int().positive().max(500).optional(),
2839
2847
  window: analyticsWindowSchema.optional()
2840
2848
  });
2841
- var gscInspectionsInputSchema = z20.object({
2849
+ var gscInspectionsInputSchema = z21.object({
2842
2850
  project: projectNameSchema,
2843
- url: z20.string().optional(),
2844
- limit: z20.number().int().positive().max(500).optional()
2851
+ url: z21.string().optional(),
2852
+ limit: z21.number().int().positive().max(500).optional()
2845
2853
  });
2846
- var gscCoverageHistoryInputSchema = z20.object({
2854
+ var gscCoverageHistoryInputSchema = z21.object({
2847
2855
  project: projectNameSchema,
2848
- limit: z20.number().int().positive().max(500).optional()
2856
+ limit: z21.number().int().positive().max(500).optional()
2849
2857
  });
2850
- var gaWindowInputSchema = z20.object({
2858
+ var gaWindowInputSchema = z21.object({
2851
2859
  project: projectNameSchema,
2852
2860
  window: analyticsWindowSchema.optional()
2853
2861
  });
2854
2862
  var gaTrafficInputSchema = gaWindowInputSchema.extend({
2855
- limit: z20.number().int().positive().max(500).optional()
2863
+ limit: z21.number().int().positive().max(500).optional()
2856
2864
  });
2857
- var keywordsInputSchema = z20.object({
2865
+ var keywordsInputSchema = z21.object({
2858
2866
  project: projectNameSchema,
2859
2867
  request: keywordBatchRequestSchema
2860
2868
  });
2861
- var keywordGenerateInputSchema = z20.object({
2869
+ var keywordGenerateInputSchema = z21.object({
2862
2870
  project: projectNameSchema,
2863
2871
  request: keywordGenerateRequestSchema
2864
2872
  });
2865
- var competitorsInputSchema = z20.object({
2873
+ var competitorsInputSchema = z21.object({
2866
2874
  project: projectNameSchema,
2867
2875
  request: competitorBatchRequestSchema
2868
2876
  });
2869
- var projectUpsertInputSchema = z20.object({
2877
+ var projectUpsertInputSchema = z21.object({
2870
2878
  project: projectNameSchema,
2871
2879
  request: projectUpsertRequestSchema
2872
2880
  });
2873
- var applyConfigInputSchema = z20.object({
2881
+ var applyConfigInputSchema = z21.object({
2874
2882
  config: projectConfigSchema
2875
2883
  });
2876
- var scheduleSetInputSchema = z20.object({
2884
+ var scheduleSetInputSchema = z21.object({
2877
2885
  project: projectNameSchema,
2878
2886
  schedule: scheduleUpsertRequestSchema
2879
2887
  });
2880
- var agentWebhookAttachInputSchema = z20.object({
2888
+ var agentWebhookAttachInputSchema = z21.object({
2881
2889
  project: projectNameSchema,
2882
- url: z20.string().url()
2890
+ url: z21.string().url()
2883
2891
  });
2884
- var doctorInputSchema = z20.object({
2892
+ var doctorInputSchema = z21.object({
2885
2893
  project: projectNameSchema.optional().describe("Project name to scope project-level checks. Omit to run global checks (provider keys, config, etc.)."),
2886
- checks: z20.array(z20.string().min(1)).optional().describe('Optional check IDs or wildcard prefixes (e.g. "google.auth.*", "config.providers"). Empty/omitted runs all matching checks for the chosen scope.')
2894
+ checks: z21.array(z21.string().min(1)).optional().describe('Optional check IDs or wildcard prefixes (e.g. "google.auth.*", "config.providers"). Empty/omitted runs all matching checks for the chosen scope.')
2887
2895
  });
2888
- var contentTargetsInputSchema = z20.object({
2896
+ var contentTargetsInputSchema = z21.object({
2889
2897
  project: projectNameSchema,
2890
- limit: z20.number().int().positive().max(500).optional().describe("Max rows. Defaults to all. Use a small number (3-10) when summarizing for the user."),
2891
- includeInProgress: z20.boolean().optional().describe("Include rows that already have an in-flight tracked action. Default false.")
2898
+ limit: z21.number().int().positive().max(500).optional().describe("Max rows. Defaults to all. Use a small number (3-10) when summarizing for the user."),
2899
+ includeInProgress: z21.boolean().optional().describe("Include rows that already have an in-flight tracked action. Default false.")
2892
2900
  });
2893
- var backlinksDomainsInputSchema = z20.object({
2901
+ var backlinksDomainsInputSchema = z21.object({
2894
2902
  project: projectNameSchema,
2895
- limit: z20.number().int().positive().max(200).optional().describe("Max linking-domain rows. Default 50, max 200."),
2896
- release: z20.string().optional().describe("Common Crawl release id (e.g., cc-main-2026-jan-feb-mar). Omit for the most recent release with data.")
2903
+ limit: z21.number().int().positive().max(200).optional().describe("Max linking-domain rows. Default 50, max 200."),
2904
+ release: z21.string().optional().describe("Common Crawl release id (e.g., cc-main-2026-jan-feb-mar). Omit for the most recent release with data.")
2897
2905
  });
2898
- var memoryUpsertInputSchema = z20.object({
2906
+ var memoryUpsertInputSchema = z21.object({
2899
2907
  project: projectNameSchema,
2900
- key: z20.string().min(1).max(AGENT_MEMORY_KEY_MAX_LENGTH).describe(`Stable identifier for the note (max ${AGENT_MEMORY_KEY_MAX_LENGTH} chars). Writing the same key overwrites the prior value.`),
2901
- value: z20.string().min(1).describe(`Plain-text note body (max ${AGENT_MEMORY_VALUE_MAX_BYTES} bytes). Use for durable operator preferences, migration context, or non-obvious reasoning that should survive future sessions.`)
2908
+ key: z21.string().min(1).max(AGENT_MEMORY_KEY_MAX_LENGTH).describe(`Stable identifier for the note (max ${AGENT_MEMORY_KEY_MAX_LENGTH} chars). Writing the same key overwrites the prior value.`),
2909
+ value: z21.string().min(1).describe(`Plain-text note body (max ${AGENT_MEMORY_VALUE_MAX_BYTES} bytes). Use for durable operator preferences, migration context, or non-obvious reasoning that should survive future sessions.`)
2902
2910
  });
2903
- var memoryForgetInputSchema = z20.object({
2911
+ var memoryForgetInputSchema = z21.object({
2904
2912
  project: projectNameSchema,
2905
- key: z20.string().min(1).max(AGENT_MEMORY_KEY_MAX_LENGTH).describe("Exact key of the note to remove. No-op (status=missing) when no note exists for that key.")
2913
+ key: z21.string().min(1).max(AGENT_MEMORY_KEY_MAX_LENGTH).describe("Exact key of the note to remove. No-op (status=missing) when no note exists for that key.")
2906
2914
  });
2907
2915
  var AGENT_WEBHOOK_EVENTS = [
2908
2916
  notificationEventSchema.enum["run.completed"],
@@ -2950,10 +2958,10 @@ var canonryMcpTools = [
2950
2958
  description: "Search query snapshots and intelligence insights for the given text. Looks at snapshot answer text, cited domains, raw provider responses, and insight title/keyword/recommendation/cause. Returns ranked hits with snippets \u2014 use it instead of paginating snapshots when you need to find a competitor mention or term.",
2951
2959
  access: "read",
2952
2960
  tier: "core",
2953
- inputSchema: z20.object({
2961
+ inputSchema: z21.object({
2954
2962
  project: projectNameSchema,
2955
- q: z20.string().min(2).describe("Search term, at least 2 characters."),
2956
- limit: z20.number().int().positive().max(50).optional().describe("Max combined hits (1-50, default 25).")
2963
+ q: z21.string().min(2).describe("Search term, at least 2 characters."),
2964
+ limit: z21.number().int().positive().max(50).optional().describe("Max combined hits (1-50, default 25).")
2957
2965
  }),
2958
2966
  annotations: readAnnotations(),
2959
2967
  openApiOperations: ["GET /api/v1/projects/{name}/search"],
@@ -3717,6 +3725,9 @@ export {
3717
3725
  normalizeUrlPath,
3718
3726
  emptyCitationVisibility,
3719
3727
  citationStateToCited,
3728
+ CodingAgents,
3729
+ skillsClientSchema,
3730
+ SkillsClients,
3720
3731
  createApiClient,
3721
3732
  ApiClient,
3722
3733
  canonryMcpTools