@canonry/canonry 4.155.0 → 4.156.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 (35) hide show
  1. package/assets/agent-workspace/skills/aero/references/orchestration.md +1 -1
  2. package/assets/agent-workspace/skills/canonry/SKILL.md +1 -1
  3. package/assets/agent-workspace/skills/canonry/references/canonry-cli.md +14 -2
  4. package/assets/assets/{AuditHistoryPanel-BlbMBxOY.js → AuditHistoryPanel-gmJMVlXX.js} +1 -1
  5. package/assets/assets/{BacklinksPage-DA9EaV9q.js → BacklinksPage-Bv2sTCyN.js} +1 -1
  6. package/assets/assets/{HistoryPage-BTrIHjMQ.js → HistoryPage-13q7GkiI.js} +1 -1
  7. package/assets/assets/{MeasurementPropertyPage-CN6o5xFg.js → MeasurementPropertyPage-BgBqXT1p.js} +1 -1
  8. package/assets/assets/ProjectPage-EsGwKhot.js +15 -0
  9. package/assets/assets/{RunRow-ch_OlCPs.js → RunRow-bPzapIGJ.js} +1 -1
  10. package/assets/assets/{RunsPage-T89Y_yS8.js → RunsPage-Dqfz18lH.js} +1 -1
  11. package/assets/assets/{SettingsPage-DnmEq3F9.js → SettingsPage-_wMecn-V.js} +1 -1
  12. package/assets/assets/{TrafficPage-CW1UhaJt.js → TrafficPage-RYBdsOLB.js} +1 -1
  13. package/assets/assets/{TrafficSourceDetailPage-r4Ji3wJm.js → TrafficSourceDetailPage-DpeMMyKU.js} +1 -1
  14. package/assets/assets/{extract-error-message-a8EErBoZ.js → extract-error-message-DUarAlyD.js} +1 -1
  15. package/assets/assets/index-BxegEwic.css +1 -0
  16. package/assets/assets/{index-BKq6k5Of.js → index-DP-fT2uI.js} +29 -29
  17. package/assets/assets/react-sigma_core.esm.min-DnypJl5w.js +312 -0
  18. package/assets/assets/vendor-lucide-BtYdosYk.js +1 -0
  19. package/assets/assets/{vendor-markdown-CpDJch4G.js → vendor-markdown-D274_wsI.js} +1 -1
  20. package/assets/assets/{vendor-radix-DnzzbllM.js → vendor-radix-BxMXSwbC.js} +1 -1
  21. package/assets/assets/{vendor-recharts-33ACLxsD.js → vendor-recharts-C4ktw_aE.js} +1 -1
  22. package/assets/assets/{vendor-tanstack-BjS7iY3g.js → vendor-tanstack-pFxw0eGP.js} +1 -1
  23. package/assets/index.html +7 -7
  24. package/dist/{chunk-VOL2BSM5.js → chunk-ABNN2ZVR.js} +1332 -29
  25. package/dist/{chunk-VIKPFI6F.js → chunk-AMPT2EP7.js} +328 -1
  26. package/dist/{chunk-OSHRDV36.js → chunk-CPASKGUE.js} +247 -1
  27. package/dist/{chunk-YSESZNVT.js → chunk-ZWESOFA5.js} +711 -235
  28. package/dist/cli.js +427 -5
  29. package/dist/index.js +4 -4
  30. package/dist/{intelligence-service-G4NV3X36.js → intelligence-service-WHC7B32V.js} +2 -2
  31. package/dist/mcp.js +4 -4
  32. package/package.json +11 -9
  33. package/assets/assets/ProjectPage-CsDbgp_0.js +0 -12
  34. package/assets/assets/index-DyL54s8x.css +0 -1
  35. package/assets/assets/vendor-lucide-ByU7vBHt.js +0 -1
@@ -8545,6 +8545,9 @@ var siteCrawlSummarySchema = z24.object({
8545
8545
  legacyAuditAvailable: z24.boolean(),
8546
8546
  runId: z24.string().nullable(),
8547
8547
  runStatus: nullableRunStatusSchema,
8548
+ /** Root URL originally requested by the operator; null for legacy snapshots. */
8549
+ requestedRootUrl: z24.string().nullable(),
8550
+ /** Effective root followed by the crawl after any supported host redirect. */
8548
8551
  rootUrl: z24.string().nullable(),
8549
8552
  crawlSchemaVersion: z24.string().nullable().optional(),
8550
8553
  engineVersion: z24.string().nullable().optional(),
@@ -8558,6 +8561,65 @@ var siteCrawlSummarySchema = z24.object({
8558
8561
  counts: siteCrawlCountsSchema,
8559
8562
  deadLinks: siteCrawlDeadLinksSummarySchema
8560
8563
  });
8564
+ var siteHealthStateSchema = z24.enum(["eligible", "hidden", "failed", "unchecked"]);
8565
+ var SiteCrawlFetchStates = {
8566
+ discovered: "discovered",
8567
+ robotsBlocked: "robots-blocked",
8568
+ html: "html",
8569
+ redirect: "redirect",
8570
+ nonHtml: "non-html",
8571
+ fetchError: "fetch-error"
8572
+ };
8573
+ var SiteCrawlFetchedStates = [
8574
+ SiteCrawlFetchStates.html,
8575
+ SiteCrawlFetchStates.redirect,
8576
+ SiteCrawlFetchStates.nonHtml,
8577
+ SiteCrawlFetchStates.fetchError
8578
+ ];
8579
+ var SiteCrawlIndexabilityStates = {
8580
+ indexable: "indexable",
8581
+ noindex: "noindex",
8582
+ blocked: "blocked",
8583
+ unknown: "unknown"
8584
+ };
8585
+ var SiteCrawlIndexabilityReasons = {
8586
+ robotsDisallow: "robots-disallow",
8587
+ redirectTerminal: "redirect-terminal",
8588
+ metaRobotsNoindex: "meta-robots-noindex",
8589
+ xRobotsNoindex: "x-robots-noindex",
8590
+ canonicalToOther: "canonical-to-other",
8591
+ notHtmlOrUnavailable: "not-html-or-unavailable"
8592
+ };
8593
+ function pointsToOtherCanonical(input) {
8594
+ return input.indexabilityReasons?.some((reason) => reason === SiteCrawlIndexabilityReasons.canonicalToOther) === true || input.nodeKey !== void 0 && input.canonicalNodeKey !== null && input.canonicalNodeKey !== void 0 && input.canonicalNodeKey !== input.nodeKey;
8595
+ }
8596
+ function deriveSiteHealthState(input) {
8597
+ switch (input.fetchState) {
8598
+ case SiteCrawlFetchStates.fetchError:
8599
+ return "failed";
8600
+ case SiteCrawlFetchStates.discovered:
8601
+ return "unchecked";
8602
+ case SiteCrawlFetchStates.redirect:
8603
+ case SiteCrawlFetchStates.robotsBlocked:
8604
+ case SiteCrawlFetchStates.nonHtml:
8605
+ return "hidden";
8606
+ case SiteCrawlFetchStates.html:
8607
+ break;
8608
+ default:
8609
+ return "unchecked";
8610
+ }
8611
+ if (pointsToOtherCanonical(input)) return "hidden";
8612
+ switch (input.indexabilityState) {
8613
+ case SiteCrawlIndexabilityStates.indexable:
8614
+ return "eligible";
8615
+ case SiteCrawlIndexabilityStates.noindex:
8616
+ case SiteCrawlIndexabilityStates.blocked:
8617
+ return "hidden";
8618
+ case SiteCrawlIndexabilityStates.unknown:
8619
+ default:
8620
+ return "unchecked";
8621
+ }
8622
+ }
8561
8623
  var siteCrawlPageSchema = z24.object({
8562
8624
  nodeKey: z24.string(),
8563
8625
  url: z24.string(),
@@ -8579,8 +8641,62 @@ var siteCrawlPageSchema = z24.object({
8579
8641
  inboundOccurrences: z24.number().int().nonnegative(),
8580
8642
  outboundOccurrences: z24.number().int().nonnegative(),
8581
8643
  linkScoreRaw: z24.number().nullable(),
8582
- linkScoreNormalized: z24.number().nullable()
8644
+ linkScoreNormalized: z24.number().nullable(),
8645
+ healthState: siteHealthStateSchema
8646
+ });
8647
+ var siteCrawlAuditFindingSchema = z24.object({
8648
+ type: z24.enum(["found", "missing", "info", "timeout", "unreachable"]),
8649
+ /** Stable machine code; UI and agents must not key behavior off `message`. */
8650
+ code: z24.string().min(1),
8651
+ message: z24.string().min(1)
8583
8652
  });
8653
+ var siteCrawlAuditFactorSchema = siteAuditPageFactorSchema.extend({
8654
+ status: siteAuditFactorStatusSchema,
8655
+ /** `null` means the engine did not explicitly classify applicability. */
8656
+ applicable: z24.boolean().nullable(),
8657
+ findings: z24.array(siteCrawlAuditFindingSchema).default([]),
8658
+ recommendations: z24.array(z24.string()).default([])
8659
+ });
8660
+ var siteCrawlCriticalDefectSchema = z24.object({
8661
+ id: z24.string().min(1),
8662
+ severity: z24.enum(["critical", "warning"]),
8663
+ detail: z24.string().min(1),
8664
+ recommendation: z24.string().min(1)
8665
+ });
8666
+ var siteCrawlPageAuditProvenanceSchema = z24.object({
8667
+ project: z24.string(),
8668
+ runId: z24.string(),
8669
+ complete: z24.boolean(),
8670
+ termination: z24.string().nullable()
8671
+ });
8672
+ var siteCrawlPageAuditIdentitySchema = z24.object({
8673
+ nodeKey: z24.string(),
8674
+ url: z24.string(),
8675
+ auditState: z24.string()
8676
+ });
8677
+ var siteCrawlPageAuditSchema = z24.discriminatedUnion("state", [
8678
+ z24.object({
8679
+ state: z24.literal("no-crawl"),
8680
+ project: z24.string(),
8681
+ runId: z24.null()
8682
+ }),
8683
+ siteCrawlPageAuditProvenanceSchema.extend({ state: z24.literal("details-unavailable") }),
8684
+ siteCrawlPageAuditProvenanceSchema.extend({ state: z24.literal("not-found") }),
8685
+ siteCrawlPageAuditProvenanceSchema.merge(siteCrawlPageAuditIdentitySchema).extend({
8686
+ state: z24.literal("not-audited"),
8687
+ auditScore: z24.null(),
8688
+ factors: z24.array(siteCrawlAuditFactorSchema).length(0).default([]),
8689
+ criticalDefects: z24.array(siteCrawlCriticalDefectSchema).length(0).default([])
8690
+ }),
8691
+ siteCrawlPageAuditProvenanceSchema.merge(siteCrawlPageAuditIdentitySchema).extend({
8692
+ state: z24.literal("ready"),
8693
+ auditScore: z24.number(),
8694
+ /** Old crawl rows retain factor scores but did not persist evidence prose. */
8695
+ evidenceState: z24.enum(["complete", "scores-only"]),
8696
+ factors: z24.array(siteCrawlAuditFactorSchema).default([]),
8697
+ criticalDefects: z24.array(siteCrawlCriticalDefectSchema).default([])
8698
+ })
8699
+ ]);
8584
8700
  var siteCrawlPagesResponseSchema = z24.object({
8585
8701
  project: z24.string(),
8586
8702
  hasCrawlData: z24.boolean(),
@@ -8620,6 +8736,194 @@ var siteCrawlEdgeSchema = z24.object({
8620
8736
  nofollowOccurrences: z24.number().int().nonnegative(),
8621
8737
  anchors: z24.array(z24.string()).default([])
8622
8738
  });
8739
+ var siteCrawlGraphNodeSchema = z24.object({
8740
+ nodeKey: z24.string(),
8741
+ url: z24.string(),
8742
+ path: z24.string(),
8743
+ depth: z24.number().int().nonnegative().nullable(),
8744
+ indexabilityState: z24.string(),
8745
+ fetchState: z24.string(),
8746
+ auditState: z24.string(),
8747
+ auditScore: z24.number().nullable(),
8748
+ inventoryEligible: z24.boolean(),
8749
+ inboundUniqueEdges: z24.number().int().nonnegative(),
8750
+ outboundUniqueEdges: z24.number().int().nonnegative(),
8751
+ linkScoreNormalized: z24.number().nullable(),
8752
+ healthState: siteHealthStateSchema,
8753
+ /** Publish-time ForceAtlas2 coordinate. Reads never run layout physics. */
8754
+ x: z24.number(),
8755
+ /** Publish-time ForceAtlas2 coordinate. Reads never run layout physics. */
8756
+ y: z24.number()
8757
+ });
8758
+ var siteCrawlGraphEdgeSchema = z24.object({
8759
+ edgeKey: z24.string(),
8760
+ sourceNodeKey: z24.string(),
8761
+ targetNodeKey: z24.string(),
8762
+ followable: z24.boolean(),
8763
+ occurrences: z24.number().int().positive()
8764
+ });
8765
+ var siteCrawlGraphLayoutSchema = z24.discriminatedUnion("state", [
8766
+ z24.object({
8767
+ state: z24.literal("ready"),
8768
+ version: z24.string().min(1),
8769
+ computedAt: z24.string().min(1)
8770
+ }),
8771
+ z24.object({
8772
+ state: z24.literal("unavailable"),
8773
+ version: z24.null(),
8774
+ reason: z24.enum(["no-crawl", "legacy-snapshot", "details-unavailable", "layout-failed", "empty-crawl"])
8775
+ })
8776
+ ]);
8777
+ var siteCrawlGraphResponseSchema = z24.object({
8778
+ project: z24.string(),
8779
+ hasCrawlData: z24.boolean(),
8780
+ runId: z24.string().nullable(),
8781
+ layout: siteCrawlGraphLayoutSchema,
8782
+ /** Total canonical pages in the persisted crawl before graph sampling. */
8783
+ totalNodes: z24.number().int().nonnegative(),
8784
+ /** Total graph-compatible internal anchor edges before graph sampling. */
8785
+ totalEdges: z24.number().int().nonnegative(),
8786
+ nodes: z24.array(siteCrawlGraphNodeSchema).default([]),
8787
+ edges: z24.array(siteCrawlGraphEdgeSchema).default([]),
8788
+ omittedNodes: z24.number().int().nonnegative(),
8789
+ omittedEdges: z24.number().int().nonnegative(),
8790
+ /** True when publish/read caps or a layout failure omit graph rows. */
8791
+ sampled: z24.boolean()
8792
+ });
8793
+ var SITE_CRAWL_GRAPH_DEFAULT_MAX_NODES = 2e4;
8794
+ var SITE_CRAWL_GRAPH_MAX_NODES = 2e4;
8795
+ var SITE_CRAWL_GRAPH_DEFAULT_MAX_EDGES = 5e4;
8796
+ var SITE_CRAWL_GRAPH_MAX_EDGES = 5e4;
8797
+ var siteHealthSubgraphRelationSchema = z24.enum([
8798
+ "focus",
8799
+ "inbound",
8800
+ "outbound",
8801
+ "both",
8802
+ "transitive"
8803
+ ]);
8804
+ var siteHealthSubgraphNodeSchema = siteCrawlPageSchema.extend({
8805
+ distance: z24.number().int().nonnegative(),
8806
+ relationToFocus: siteHealthSubgraphRelationSchema
8807
+ });
8808
+ var siteHealthSubgraphResponseSchema = z24.object({
8809
+ project: z24.string(),
8810
+ hasCrawlData: z24.boolean(),
8811
+ runId: z24.string().nullable(),
8812
+ /** Selected snapshot provenance. Historical partial crawls stay explicit. */
8813
+ complete: z24.boolean(),
8814
+ termination: z24.string().nullable(),
8815
+ state: z24.enum(["no-crawl", "details-unavailable", "ready"]),
8816
+ focusNodeKey: z24.string().nullable(),
8817
+ focusUrl: z24.string().nullable(),
8818
+ hops: z24.number().int().min(0).max(3),
8819
+ totalNodes: z24.number().int().nonnegative(),
8820
+ totalEdges: z24.number().int().nonnegative(),
8821
+ nodes: z24.array(siteHealthSubgraphNodeSchema).default([]),
8822
+ edges: z24.array(siteCrawlEdgeSchema).default([]),
8823
+ omittedNodes: z24.number().int().nonnegative(),
8824
+ omittedEdges: z24.number().int().nonnegative(),
8825
+ /** `lower-bound` means totals and omissions are minimums because traversal hit a cap. */
8826
+ countAccuracy: z24.enum(["exact", "lower-bound"]),
8827
+ truncated: z24.boolean()
8828
+ });
8829
+ var SITE_HEALTH_SUBGRAPH_DEFAULT_MAX_NODES = 25;
8830
+ var SITE_HEALTH_SUBGRAPH_MAX_NODES = 200;
8831
+ var SITE_HEALTH_SUBGRAPH_DEFAULT_MAX_EDGES = 50;
8832
+ var SITE_HEALTH_SUBGRAPH_MAX_EDGES = 500;
8833
+ var siteHealthNodeReferenceSchema = z24.object({
8834
+ nodeKey: z24.string(),
8835
+ url: z24.string(),
8836
+ path: z24.string()
8837
+ });
8838
+ var siteHealthPathResponseSchema = z24.object({
8839
+ project: z24.string(),
8840
+ runId: z24.string().nullable(),
8841
+ /** Selected snapshot provenance. `unreachable` on a partial crawl is not a site-wide claim. */
8842
+ complete: z24.boolean(),
8843
+ termination: z24.string().nullable(),
8844
+ state: z24.enum(["no-crawl", "details-unavailable", "found", "unreachable", "truncated"]),
8845
+ from: siteHealthNodeReferenceSchema.nullable(),
8846
+ to: siteHealthNodeReferenceSchema.nullable(),
8847
+ maxDepth: z24.number().int().positive(),
8848
+ visitedNodes: z24.number().int().nonnegative(),
8849
+ nodes: z24.array(siteCrawlPageSchema).default([]),
8850
+ edges: z24.array(siteCrawlEdgeSchema).default([])
8851
+ });
8852
+ var SITE_HEALTH_PATH_DEFAULT_MAX_DEPTH = 12;
8853
+ var SITE_HEALTH_PATH_MAX_DEPTH = 24;
8854
+ var SITE_HEALTH_PATH_MAX_VISITED_NODES = 5e3;
8855
+ var siteHealthChangeKindSchema = z24.enum(["added", "removed", "changed"]);
8856
+ var siteHealthPageChangeSchema = z24.object({
8857
+ entity: z24.literal("page"),
8858
+ change: siteHealthChangeKindSchema,
8859
+ key: z24.string(),
8860
+ changedFields: z24.array(z24.string()).default([]),
8861
+ before: siteCrawlPageSchema.nullable(),
8862
+ after: siteCrawlPageSchema.nullable()
8863
+ });
8864
+ var siteHealthLinkChangeSchema = z24.object({
8865
+ entity: z24.literal("link"),
8866
+ change: siteHealthChangeKindSchema,
8867
+ key: z24.string(),
8868
+ changedFields: z24.array(z24.string()).default([]),
8869
+ before: siteCrawlEdgeSchema.nullable(),
8870
+ after: siteCrawlEdgeSchema.nullable()
8871
+ });
8872
+ var siteHealthChangeRecordSchema = z24.discriminatedUnion("entity", [
8873
+ siteHealthPageChangeSchema,
8874
+ siteHealthLinkChangeSchema
8875
+ ]);
8876
+ var siteHealthChangeCountsSchema = z24.object({
8877
+ added: z24.number().int().nonnegative(),
8878
+ removed: z24.number().int().nonnegative(),
8879
+ changed: z24.number().int().nonnegative()
8880
+ });
8881
+ var siteHealthChangesFiltersSchema = z24.object({
8882
+ scope: z24.enum(["all", "pages", "links"]),
8883
+ change: z24.enum(["all", "added", "removed", "changed"])
8884
+ });
8885
+ var siteHealthChangesResponseSchema = z24.discriminatedUnion("state", [
8886
+ z24.object({
8887
+ project: z24.string(),
8888
+ state: z24.literal("unavailable"),
8889
+ reason: z24.enum(["no-crawl", "insufficient-history", "details-unavailable", "partial-not-comparable"]),
8890
+ fromRunId: z24.string().nullable(),
8891
+ toRunId: z24.string().nullable()
8892
+ }),
8893
+ z24.object({
8894
+ project: z24.string(),
8895
+ state: z24.literal("incompatible"),
8896
+ reason: z24.literal("incompatible-versions"),
8897
+ fromRunId: z24.string(),
8898
+ toRunId: z24.string(),
8899
+ mismatchedVersions: z24.array(z24.string()).min(1)
8900
+ }),
8901
+ z24.object({
8902
+ project: z24.string(),
8903
+ state: z24.literal("ready"),
8904
+ fromRunId: z24.string(),
8905
+ toRunId: z24.string(),
8906
+ versions: z24.object({
8907
+ crawlSchema: z24.string(),
8908
+ normalization: z24.string(),
8909
+ indexability: z24.string(),
8910
+ linkScore: z24.string()
8911
+ }),
8912
+ /** The filters whose post-filter counts and records this page represents. */
8913
+ filters: siteHealthChangesFiltersSchema,
8914
+ /** Continuations omit summary work; reuse the exact summary from the first page. */
8915
+ summaryState: z24.enum(["exact", "omitted-on-continuation"]),
8916
+ summary: z24.object({
8917
+ pages: siteHealthChangeCountsSchema,
8918
+ links: siteHealthChangeCountsSchema
8919
+ }).nullable(),
8920
+ total: z24.number().int().nonnegative().nullable(),
8921
+ nextCursor: z24.string().nullable(),
8922
+ changes: z24.array(siteHealthChangeRecordSchema).default([])
8923
+ })
8924
+ ]);
8925
+ var SITE_HEALTH_CHANGES_DEFAULT_LIMIT = 25;
8926
+ var SITE_HEALTH_CHANGES_MAX_LIMIT = 100;
8623
8927
  var siteCrawlInternalLinksResponseSchema = z24.object({
8624
8928
  project: z24.string(),
8625
8929
  hasCrawlData: z24.boolean(),
@@ -14326,11 +14630,34 @@ export {
14326
14630
  factorStatusFromScore,
14327
14631
  SiteAuditTrendDirections,
14328
14632
  siteAuditScoreSchema,
14633
+ siteAuditPageFactorSchema,
14329
14634
  siteAuditPagesResponseSchema,
14330
14635
  siteAuditTrendResponseSchema,
14331
14636
  siteCrawlSummarySchema,
14637
+ SiteCrawlFetchedStates,
14638
+ deriveSiteHealthState,
14639
+ siteCrawlAuditFactorSchema,
14640
+ siteCrawlCriticalDefectSchema,
14641
+ siteCrawlPageAuditSchema,
14332
14642
  siteCrawlPagesResponseSchema,
14333
14643
  siteCrawlStructureResponseSchema,
14644
+ siteCrawlGraphResponseSchema,
14645
+ SITE_CRAWL_GRAPH_DEFAULT_MAX_NODES,
14646
+ SITE_CRAWL_GRAPH_MAX_NODES,
14647
+ SITE_CRAWL_GRAPH_DEFAULT_MAX_EDGES,
14648
+ SITE_CRAWL_GRAPH_MAX_EDGES,
14649
+ siteHealthSubgraphResponseSchema,
14650
+ SITE_HEALTH_SUBGRAPH_DEFAULT_MAX_NODES,
14651
+ SITE_HEALTH_SUBGRAPH_MAX_NODES,
14652
+ SITE_HEALTH_SUBGRAPH_DEFAULT_MAX_EDGES,
14653
+ SITE_HEALTH_SUBGRAPH_MAX_EDGES,
14654
+ siteHealthPathResponseSchema,
14655
+ SITE_HEALTH_PATH_DEFAULT_MAX_DEPTH,
14656
+ SITE_HEALTH_PATH_MAX_DEPTH,
14657
+ SITE_HEALTH_PATH_MAX_VISITED_NODES,
14658
+ siteHealthChangesResponseSchema,
14659
+ SITE_HEALTH_CHANGES_DEFAULT_LIMIT,
14660
+ SITE_HEALTH_CHANGES_MAX_LIMIT,
14334
14661
  siteCrawlInternalLinksResponseSchema,
14335
14662
  siteCrawlNeighborsResponseSchema,
14336
14663
  siteCrawlDeadLinksResponseSchema,
@@ -81,7 +81,7 @@ import {
81
81
  trafficConnectWordpressRequestSchema,
82
82
  trafficEventKindSchema,
83
83
  trafficSeriesGranularitySchema
84
- } from "./chunk-VIKPFI6F.js";
84
+ } from "./chunk-AMPT2EP7.js";
85
85
 
86
86
  // src/config.ts
87
87
  import fs from "fs";
@@ -4919,6 +4919,54 @@ var getApiV1ProjectsByNameTechnicalAeoCrawl = (options) => {
4919
4919
  ...options
4920
4920
  });
4921
4921
  };
4922
+ var getApiV1ProjectsByNameTechnicalAeoSubgraph = (options) => {
4923
+ return (options.client ?? client).get({
4924
+ security: [
4925
+ {
4926
+ scheme: "bearer",
4927
+ type: "http"
4928
+ }
4929
+ ],
4930
+ url: "/api/v1/projects/{name}/technical-aeo/subgraph",
4931
+ ...options
4932
+ });
4933
+ };
4934
+ var getApiV1ProjectsByNameTechnicalAeoPath = (options) => {
4935
+ return (options.client ?? client).get({
4936
+ security: [
4937
+ {
4938
+ scheme: "bearer",
4939
+ type: "http"
4940
+ }
4941
+ ],
4942
+ url: "/api/v1/projects/{name}/technical-aeo/path",
4943
+ ...options
4944
+ });
4945
+ };
4946
+ var getApiV1ProjectsByNameTechnicalAeoChanges = (options) => {
4947
+ return (options.client ?? client).get({
4948
+ security: [
4949
+ {
4950
+ scheme: "bearer",
4951
+ type: "http"
4952
+ }
4953
+ ],
4954
+ url: "/api/v1/projects/{name}/technical-aeo/changes",
4955
+ ...options
4956
+ });
4957
+ };
4958
+ var getApiV1ProjectsByNameTechnicalAeoCrawlPagesAudit = (options) => {
4959
+ return (options.client ?? client).get({
4960
+ security: [
4961
+ {
4962
+ scheme: "bearer",
4963
+ type: "http"
4964
+ }
4965
+ ],
4966
+ url: "/api/v1/projects/{name}/technical-aeo/crawl/pages/audit",
4967
+ ...options
4968
+ });
4969
+ };
4922
4970
  var getApiV1ProjectsByNameTechnicalAeoCrawlPages = (options) => {
4923
4971
  return (options.client ?? client).get({
4924
4972
  security: [
@@ -7123,6 +7171,57 @@ var ApiClient = class {
7123
7171
  })
7124
7172
  );
7125
7173
  }
7174
+ /** Bounded semantic Site Health neighborhood; this never returns visualization layout. */
7175
+ async getSiteHealthSubgraph(project, opts) {
7176
+ return this.invoke(
7177
+ () => getApiV1ProjectsByNameTechnicalAeoSubgraph({
7178
+ client: this.heyClient,
7179
+ path: { name: project },
7180
+ query: {
7181
+ runId: opts?.runId,
7182
+ nodeKey: opts?.nodeKey,
7183
+ url: opts?.url,
7184
+ hops: opts?.hops,
7185
+ maxNodes: opts?.maxNodes,
7186
+ maxEdges: opts?.maxEdges
7187
+ }
7188
+ })
7189
+ );
7190
+ }
7191
+ /** Directed shortest path over persisted, followable internal links. */
7192
+ async getSiteHealthPath(project, opts) {
7193
+ return this.invoke(
7194
+ () => getApiV1ProjectsByNameTechnicalAeoPath({
7195
+ client: this.heyClient,
7196
+ path: { name: project },
7197
+ query: {
7198
+ runId: opts.runId,
7199
+ fromNodeKey: opts.fromNodeKey,
7200
+ fromUrl: opts.fromUrl,
7201
+ toNodeKey: opts.toNodeKey,
7202
+ toUrl: opts.toUrl,
7203
+ maxDepth: opts.maxDepth
7204
+ }
7205
+ })
7206
+ );
7207
+ }
7208
+ /** Cursor-paged canonical page/link changes between immutable complete crawls. */
7209
+ async getSiteHealthChanges(project, opts) {
7210
+ return this.invoke(
7211
+ () => getApiV1ProjectsByNameTechnicalAeoChanges({
7212
+ client: this.heyClient,
7213
+ path: { name: project },
7214
+ query: {
7215
+ fromRunId: opts?.fromRunId,
7216
+ toRunId: opts?.toRunId,
7217
+ scope: opts?.scope,
7218
+ change: opts?.change,
7219
+ cursor: opts?.cursor,
7220
+ limit: opts?.limit
7221
+ }
7222
+ })
7223
+ );
7224
+ }
7126
7225
  /** Bounded, cursor-paged crawl nodes. */
7127
7226
  async getTechnicalAeoCrawlPages(project, opts) {
7128
7227
  return this.invoke(
@@ -7142,6 +7241,20 @@ var ApiClient = class {
7142
7241
  })
7143
7242
  );
7144
7243
  }
7244
+ /** Exact page-scoped audit evidence tied to a persisted crawl node. */
7245
+ async getTechnicalAeoPageAudit(project, opts) {
7246
+ return this.invoke(
7247
+ () => getApiV1ProjectsByNameTechnicalAeoCrawlPagesAudit({
7248
+ client: this.heyClient,
7249
+ path: { name: project },
7250
+ query: {
7251
+ runId: opts.runId,
7252
+ nodeKey: opts.nodeKey,
7253
+ url: opts.url
7254
+ }
7255
+ })
7256
+ );
7257
+ }
7145
7258
  /** One bounded path level from a persisted crawl. */
7146
7259
  async getTechnicalAeoStructure(project, opts) {
7147
7260
  return this.invoke(
@@ -8375,6 +8488,59 @@ var technicalAeoCrawlInputSchema = z3.object({
8375
8488
  project: projectNameSchema,
8376
8489
  runId: runIdSchema.optional().describe("Historical crawl-bearing site-audit run ID. Omit for the latest persisted crawl.")
8377
8490
  });
8491
+ var siteHealthPageAuditInputSchema = z3.object({
8492
+ project: projectNameSchema,
8493
+ runId: runIdSchema.optional().describe("Historical crawl-bearing site-audit run ID. Omit for the latest persisted crawl."),
8494
+ nodeKey: z3.string().min(1).optional().describe("Exact crawl node key, as returned by Site Health page or subgraph reads."),
8495
+ url: z3.string().url().optional().describe("Exact page URL. Use this only when a crawl node key is unavailable.")
8496
+ }).refine((value) => Boolean(value.nodeKey || value.url), {
8497
+ message: "Provide nodeKey or url.",
8498
+ path: ["nodeKey"]
8499
+ }).refine((value) => !(value.nodeKey && value.url), {
8500
+ message: "Provide nodeKey or url, not both.",
8501
+ path: ["nodeKey"]
8502
+ });
8503
+ var SITE_HEALTH_MCP_MAX_NODES = 25;
8504
+ var SITE_HEALTH_MCP_MAX_EDGES = 50;
8505
+ var siteHealthSubgraphInputSchema = z3.object({
8506
+ project: projectNameSchema,
8507
+ runId: runIdSchema.optional().describe("Historical crawl-bearing site-audit run ID. Omit for the latest complete crawl."),
8508
+ nodeKey: z3.string().min(1).optional().describe("Focus crawl node key. Omit with url to focus the crawl root."),
8509
+ url: z3.string().url().optional().describe("Focus canonical URL. Omit with nodeKey to focus the crawl root."),
8510
+ hops: z3.number().int().min(0).max(3).optional().describe("Neighborhood depth from the focus node. Keep this small."),
8511
+ maxNodes: z3.number().int().positive().max(SITE_HEALTH_MCP_MAX_NODES).default(SITE_HEALTH_MCP_MAX_NODES).describe("Hard MCP cap: at most 25 nodes. Narrow or refocus instead of loading the site."),
8512
+ maxEdges: z3.number().int().positive().max(SITE_HEALTH_MCP_MAX_EDGES).default(SITE_HEALTH_MCP_MAX_EDGES).describe("Hard MCP cap: at most 50 edges. Narrow or refocus instead of loading the site.")
8513
+ }).refine((value) => !(value.nodeKey && value.url), {
8514
+ message: "Provide nodeKey or url, not both.",
8515
+ path: ["nodeKey"]
8516
+ });
8517
+ var siteHealthPathInputSchema = z3.object({
8518
+ project: projectNameSchema,
8519
+ runId: runIdSchema.optional().describe("Historical crawl-bearing site-audit run ID. Omit for the latest complete crawl."),
8520
+ fromNodeKey: z3.string().min(1).optional().describe("Origin node key. Omit with fromUrl to start at the crawl root."),
8521
+ fromUrl: z3.string().url().optional().describe("Origin URL. Omit with fromNodeKey to start at the crawl root."),
8522
+ toNodeKey: z3.string().min(1).optional().describe("Required destination node key."),
8523
+ toUrl: z3.string().url().optional().describe("Required destination URL."),
8524
+ maxDepth: z3.number().int().positive().max(24).optional().describe("Maximum directed-link depth to search.")
8525
+ }).refine((value) => !(value.fromNodeKey && value.fromUrl), {
8526
+ message: "Provide fromNodeKey or fromUrl, not both.",
8527
+ path: ["fromNodeKey"]
8528
+ }).refine((value) => Boolean(value.toNodeKey || value.toUrl), {
8529
+ message: "Provide toNodeKey or toUrl.",
8530
+ path: ["toNodeKey"]
8531
+ }).refine((value) => !(value.toNodeKey && value.toUrl), {
8532
+ message: "Provide toNodeKey or toUrl, not both.",
8533
+ path: ["toNodeKey"]
8534
+ });
8535
+ var siteHealthChangesInputSchema = z3.object({
8536
+ project: projectNameSchema,
8537
+ fromRunId: runIdSchema.optional().describe("Earlier complete crawl run ID. Omit to compare the previous complete crawl."),
8538
+ toRunId: runIdSchema.optional().describe("Later complete crawl run ID. Omit to compare the latest complete crawl."),
8539
+ scope: z3.enum(["all", "pages", "links"]).optional().describe("Limit the diff to page or link changes. Omit or use all for both."),
8540
+ change: z3.enum(["all", "added", "removed", "changed"]).optional().describe("Limit the diff to one change kind. Omit or use all for every kind."),
8541
+ cursor: z3.string().min(1).optional().describe("Opaque cursor from the previous Site Health changes result."),
8542
+ limit: z3.number().int().positive().max(25).default(25).describe("Hard MCP cap: 25 records, because each change carries before and after DTOs.")
8543
+ });
8378
8544
  var technicalAeoCrawlPagesInputSchema = z3.object({
8379
8545
  project: projectNameSchema,
8380
8546
  runId: runIdSchema.optional(),
@@ -10234,6 +10400,86 @@ var canonryMcpTools = [
10234
10400
  openApiOperations: ["POST /api/v1/projects/{name}/discover/sessions/{id}/promote"],
10235
10401
  handler: (client2, input) => client2.promoteDiscovery(input.project, input.sessionId, input.request)
10236
10402
  }),
10403
+ defineTool({
10404
+ name: "canonry_site_health_overview",
10405
+ title: "Get Site Health overview",
10406
+ description: "Start a Site Health investigation with the latest or selected scan summary: root URL, completeness, crawl and link counts, budgets, versions, termination, and dead-link check state. Follow with a focused Site Health subgraph, shortest path, or scan changes; never request the interactive graph projection through MCP.",
10407
+ access: "read",
10408
+ tier: "monitoring",
10409
+ inputSchema: technicalAeoCrawlInputSchema,
10410
+ annotations: readAnnotations(),
10411
+ openApiOperations: ["GET /api/v1/projects/{name}/technical-aeo/crawl"],
10412
+ handler: (client2, input) => client2.getTechnicalAeoCrawl(input.project, { runId: input.runId })
10413
+ }),
10414
+ defineTool({
10415
+ name: "canonry_site_health_page_audit",
10416
+ title: "Get Site Health page audit",
10417
+ description: "Connect one graph page's audit score to its exact persisted evidence: factor scores, stable finding codes and messages, recommendations, and critical defects. The response includes crawl provenance and explicit no-crawl, details-unavailable, not-found, not-audited, ready/scores-only states. Use nodeKey from a Site Health page or subgraph read when possible. Link score remains an importance signal, not an audit finding.",
10418
+ access: "read",
10419
+ tier: "monitoring",
10420
+ inputSchema: siteHealthPageAuditInputSchema,
10421
+ annotations: readAnnotations(),
10422
+ openApiOperations: ["GET /api/v1/projects/{name}/technical-aeo/crawl/pages/audit"],
10423
+ handler: (client2, input) => client2.getTechnicalAeoPageAudit(input.project, {
10424
+ runId: input.runId,
10425
+ nodeKey: input.nodeKey,
10426
+ url: input.url
10427
+ })
10428
+ }),
10429
+ defineTool({
10430
+ name: "canonry_site_health_subgraph",
10431
+ title: "Inspect focused Site Health subgraph",
10432
+ description: "Read a compact canonical neighborhood around one page or the crawl root. Defaults to 25 nodes and 50 edges; expand hops or refocus only when needed. `countAccuracy=lower-bound` means traversal reached a cap, and `complete`/`termination` qualify partial-crawl results. This intentionally omits visualization coordinates and never materializes the full site graph.",
10433
+ access: "read",
10434
+ tier: "monitoring",
10435
+ inputSchema: siteHealthSubgraphInputSchema,
10436
+ annotations: readAnnotations(),
10437
+ openApiOperations: ["GET /api/v1/projects/{name}/technical-aeo/subgraph"],
10438
+ handler: (client2, input) => client2.getSiteHealthSubgraph(input.project, {
10439
+ runId: input.runId,
10440
+ nodeKey: input.nodeKey,
10441
+ url: input.url,
10442
+ hops: input.hops,
10443
+ maxNodes: input.maxNodes,
10444
+ maxEdges: input.maxEdges
10445
+ })
10446
+ }),
10447
+ defineTool({
10448
+ name: "canonry_site_health_path",
10449
+ title: "Find shortest Site Health path",
10450
+ description: "Find the shortest directed path of followable internal links from the crawl root or a selected page to one required destination. Use `complete` and `termination` to qualify unreachable or truncated outcomes from a partial crawl; it returns one path, not a graph traversal.",
10451
+ access: "read",
10452
+ tier: "monitoring",
10453
+ inputSchema: siteHealthPathInputSchema,
10454
+ annotations: readAnnotations(),
10455
+ openApiOperations: ["GET /api/v1/projects/{name}/technical-aeo/path"],
10456
+ handler: (client2, input) => client2.getSiteHealthPath(input.project, {
10457
+ runId: input.runId,
10458
+ fromNodeKey: input.fromNodeKey,
10459
+ fromUrl: input.fromUrl,
10460
+ toNodeKey: input.toNodeKey,
10461
+ toUrl: input.toUrl,
10462
+ maxDepth: input.maxDepth
10463
+ })
10464
+ }),
10465
+ defineTool({
10466
+ name: "canonry_site_health_changes",
10467
+ title: "Compare Site Health scans",
10468
+ description: "Compare two immutable complete scans (or the latest pair) for added, removed, and changed canonical pages or links. Results echo resolved filters and scan IDs; the first page has an exact summary, while continuations omit summary/total. MCP pages cap at 25 because every change carries before/after DTOs; filter before paging.",
10469
+ access: "read",
10470
+ tier: "monitoring",
10471
+ inputSchema: siteHealthChangesInputSchema,
10472
+ annotations: readAnnotations(),
10473
+ openApiOperations: ["GET /api/v1/projects/{name}/technical-aeo/changes"],
10474
+ handler: (client2, input) => client2.getSiteHealthChanges(input.project, {
10475
+ fromRunId: input.fromRunId,
10476
+ toRunId: input.toRunId,
10477
+ scope: input.scope,
10478
+ change: input.change,
10479
+ cursor: input.cursor,
10480
+ limit: input.limit
10481
+ })
10482
+ }),
10237
10483
  defineTool({
10238
10484
  name: "canonry_technical_aeo_score",
10239
10485
  title: "Get Technical AEO score",