@canonry/canonry 7.110.0 → 7.112.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 (149) hide show
  1. package/README.md +3 -2
  2. package/assets/agent-workspace/skills/aero/SKILL.md +12 -3
  3. package/assets/agent-workspace/skills/aero/references/agent-operations.md +7 -2
  4. package/assets/agent-workspace/skills/aero/references/ai-traffic-tracking.md +5 -3
  5. package/assets/agent-workspace/skills/aero/references/getting-started.md +326 -0
  6. package/assets/agent-workspace/skills/aero/soul.md +1 -1
  7. package/assets/agent-workspace/skills/canonry/SKILL.md +9 -3
  8. package/assets/agent-workspace/skills/canonry/references/aeo-analysis.md +1 -1
  9. package/assets/agent-workspace/skills/canonry/references/ai-traffic-tracking.md +5 -3
  10. package/assets/agent-workspace/skills/canonry/references/canonry-cli.md +5 -2
  11. package/assets/agent-workspace/skills/canonry/references/getting-started.md +328 -0
  12. package/assets/agent-workspace/skills/canonry/references/server-side-traffic.md +4 -0
  13. package/assets/assets/{AccessControls-DmKPF5t5.js → AccessControls-BxtFDXYH.js} +1 -1
  14. package/assets/assets/{AgentSetupPage-BvoJ7cu0.js → AgentSetupPage-q1Ku1PAd.js} +1 -1
  15. package/assets/assets/{AuditHistoryPanel-GHjaPPXk.js → AuditHistoryPanel-6EnlABwM.js} +1 -1
  16. package/assets/assets/{BacklinksPage-Ca3l7bel.js → BacklinksPage-BaHCJEuK.js} +1 -1
  17. package/assets/assets/{ChartPrimitives-CJLgYfSw.js → ChartPrimitives-C3lJj3eO.js} +1 -1
  18. package/assets/assets/{HistoryPage-HqdlYIsd.js → HistoryPage-B_NVeDCn.js} +1 -1
  19. package/assets/assets/{MeasurementPropertyPage-D71Ki-q4.js → MeasurementPropertyPage-DxCRxoIF.js} +1 -1
  20. package/assets/assets/{ProjectPage-wGYGNnLC.js → ProjectPage-BjGsilZJ.js} +3 -3
  21. package/assets/assets/{RunsPage-CeXFTDg4.js → RunsPage-9T1OrQw3.js} +1 -1
  22. package/assets/assets/{ServerTrafficSection-BZVlcCO2.js → ServerTrafficSection-iUdFKWEc.js} +1 -1
  23. package/assets/assets/{SettingsPage-MiW1TGtF.js → SettingsPage-BswQYkkB.js} +1 -1
  24. package/assets/assets/{ToneBadge-BXxSLZUc.js → ToneBadge-CWufDJgM.js} +2 -2
  25. package/assets/assets/{TrafficPage-1ZXZ2BLa.js → TrafficPage-DN9DxoWm.js} +1 -1
  26. package/assets/assets/{TrafficSourceDetailPage-BJPiUWus.js → TrafficSourceDetailPage-D6TdTyP-.js} +1 -1
  27. package/assets/assets/{account-context-DHUo7ntg.js → account-context-CyE8qMvH.js} +1 -1
  28. package/assets/assets/{agent-trust-copy-x8ECjEJu.js → agent-trust-copy-CinW-f_8.js} +1 -1
  29. package/assets/assets/{card-bE38V9NH.js → card-CI9gz2Hb.js} +1 -1
  30. package/assets/assets/{index-Ce3zYiH3.js → index-DshFRkPM.js} +3 -3
  31. package/assets/assets/{query-client-CBtgvGgy.js → query-client-BlAtm9zS.js} +1 -1
  32. package/assets/assets/{react-query-CsgUn_pT.js → react-query-DE_LaZkX.js} +1 -1
  33. package/assets/assets/{react-sigma_core.esm.min-DeLn6mIk.js → react-sigma_core.esm.min-CZkN6sL0.js} +1 -1
  34. package/assets/assets/{server-traffic-Dwwd7cw6.js → server-traffic-Ci9JbS2U.js} +1 -1
  35. package/assets/assets/{service-Bq_5mBI4.js → service-CiYDMju_.js} +1 -1
  36. package/assets/index.html +8 -8
  37. package/dist/{ads-VITOHLIW.js → ads-WRMNYPJ7.js} +3 -3
  38. package/dist/{agent-N57IKFTH.js → agent-V4PAGAPZ.js} +7 -7
  39. package/dist/{agent-ask-VPK4ED7D.js → agent-ask-3LAAT4WN.js} +3 -3
  40. package/dist/{agent-conversations-DPEGQ5NJ.js → agent-conversations-TVNDZY54.js} +3 -3
  41. package/dist/{agent-journeys-7AS543HY.js → agent-journeys-UB7ZGAKP.js} +3 -3
  42. package/dist/{agent-memory-OKKNU2MA.js → agent-memory-RWF2WODB.js} +3 -3
  43. package/dist/{agent-providers-JZGGMH5H.js → agent-providers-77A45KZD.js} +3 -3
  44. package/dist/{agent-transcript-AICHEB4B.js → agent-transcript-K5WZJHJX.js} +3 -3
  45. package/dist/{analytics-FXNYSIAY.js → analytics-RNSYOGUP.js} +3 -3
  46. package/dist/{apply-DYYB2I2S.js → apply-UU6GFYIJ.js} +3 -3
  47. package/dist/{backfill-CXKKDOST.js → backfill-DOYPYZJL.js} +10 -10
  48. package/dist/{backlinks-442C4H4M.js → backlinks-UKRILGDJ.js} +3 -3
  49. package/dist/{bing-HRSXPL7O.js → bing-P6GTLGIP.js} +3 -3
  50. package/dist/{bootstrap-U5UVQDHJ.js → bootstrap-BRXDKCNB.js} +10 -10
  51. package/dist/{cdp-JSOEQZJJ.js → cdp-CPGVPWTU.js} +7 -7
  52. package/dist/{chunk-JXFFKZOI.js → chunk-2LXLJXTG.js} +2 -2
  53. package/dist/{chunk-OJYY6W5S.js → chunk-4ALKLWSQ.js} +631 -391
  54. package/dist/{chunk-ZVKWDSKW.js → chunk-4PMS7CAF.js} +2 -2
  55. package/dist/{chunk-7GU4F2QO.js → chunk-4WXNCSYL.js} +2 -2
  56. package/dist/{chunk-FRKHFU6D.js → chunk-7IF576RC.js} +5 -5
  57. package/dist/{chunk-JJ7RXQ2W.js → chunk-AZPWF42S.js} +7 -3
  58. package/dist/{chunk-EU6JYD3C.js → chunk-B27F7C6S.js} +5 -5
  59. package/dist/{chunk-TV6BFBRI.js → chunk-C44S7EE7.js} +4 -4
  60. package/dist/{chunk-YW6J3STO.js → chunk-CIDXBCEW.js} +1 -1
  61. package/dist/{chunk-YKEXZBB4.js → chunk-DZCJNSBY.js} +1 -1
  62. package/dist/{chunk-5RMDU4MM.js → chunk-F6CYO37C.js} +7 -7
  63. package/dist/{chunk-HX4KJWQO.js → chunk-I4YRKF6G.js} +3 -3
  64. package/dist/{chunk-FEIDW5BU.js → chunk-JCK5TDIU.js} +73 -5
  65. package/dist/{chunk-QXBHZSOW.js → chunk-JHAG6DEG.js} +4 -4
  66. package/dist/{chunk-UC2LPOW4.js → chunk-KYZ5A7AX.js} +1 -1
  67. package/dist/{chunk-Q3IXAH34.js → chunk-LGAQXH3L.js} +1 -1
  68. package/dist/{chunk-A334LHJ7.js → chunk-M2RTTCLC.js} +3 -3
  69. package/dist/{chunk-VYPDVWRG.js → chunk-N5K35MDQ.js} +1 -1
  70. package/dist/{chunk-S2I5FPQC.js → chunk-NICTKJ3O.js} +1 -1
  71. package/dist/{chunk-5SN2O7QH.js → chunk-NLU2MMFA.js} +1 -1
  72. package/dist/{chunk-3AVO5OWE.js → chunk-OBDRDAIK.js} +1 -1
  73. package/dist/{chunk-ZVLZ7YFW.js → chunk-PT3VROG7.js} +378 -370
  74. package/dist/{chunk-ES7XSOBY.js → chunk-Q4XHWZDT.js} +1 -1
  75. package/dist/{chunk-XS3S3UQE.js → chunk-R4PQ7D32.js} +7 -7
  76. package/dist/{chunk-ME74SV2T.js → chunk-S6ULO6H5.js} +1 -1
  77. package/dist/{chunk-RHY7GL5R.js → chunk-SJD3ZAEH.js} +2 -2
  78. package/dist/{chunk-M7R7GSO5.js → chunk-SNL4C4BV.js} +2 -2
  79. package/dist/{chunk-4CTVYOBQ.js → chunk-TDRPVIUB.js} +1 -1
  80. package/dist/{chunk-66OTF2QQ.js → chunk-TDSISMOJ.js} +25 -23
  81. package/dist/{chunk-3WAGCCAO.js → chunk-W3UYVNYQ.js} +1 -1
  82. package/dist/{chunk-HH4XK3FX.js → chunk-WHBLQJGZ.js} +1 -1
  83. package/dist/{chunk-DMCJJ5FT.js → chunk-Y6D7K63F.js} +3 -3
  84. package/dist/{chunk-HGKB6J7I.js → chunk-YN7OV22K.js} +4 -4
  85. package/dist/{chunk-QIGC5JGR.js → chunk-YWKALX6A.js} +4 -4
  86. package/dist/{chunk-VDAC54IW.js → chunk-YXCMVHYJ.js} +38 -7
  87. package/dist/{chunk-35H5E662.js → chunk-ZMCRVQ6Q.js} +1 -1
  88. package/dist/{chunk-ZABO7FFF.js → chunk-ZVDUBOE4.js} +17 -7
  89. package/dist/{citations-A6QP2QOT.js → citations-GW2ELWME.js} +4 -4
  90. package/dist/{cli-catalog-OJT3WVRE.js → cli-catalog-PDU4Z4IO.js} +3 -3
  91. package/dist/{cli-commands-KQQPOXIP.js → cli-commands-XWIWF4VG.js} +7 -7
  92. package/dist/cli.js +13 -13
  93. package/dist/{competitor-AY5SURO6.js → competitor-MS4P6GJ4.js} +3 -3
  94. package/dist/{content-UZJF7XQV.js → content-3QQRT3Q4.js} +3 -3
  95. package/dist/{dashboard-IXNMMT5P.js → dashboard-FDVY7CMI.js} +6 -6
  96. package/dist/{demo-Y7DDERG7.js → demo-WRF3ZSQ5.js} +1 -1
  97. package/dist/{demo-server-PNPTTPGQ.js → demo-server-Q77EUE5A.js} +12 -12
  98. package/dist/{discover-45FOFNGO.js → discover-BAKAHH5X.js} +4 -4
  99. package/dist/{discover-eval-CJ5G32A6.js → discover-eval-KMYMVZVX.js} +3 -3
  100. package/dist/{doctor-2R4J6QC7.js → doctor-OAYNGBBT.js} +3 -3
  101. package/dist/{evidence-HDUJMIIR.js → evidence-FEDSZTLW.js} +3 -3
  102. package/dist/{export-cmd-3AXP4C3S.js → export-cmd-OYQVBE5C.js} +3 -3
  103. package/dist/{ga-RYK2FEEH.js → ga-MWJQ2S4D.js} +3 -3
  104. package/dist/{gbp-TAA3TNDA.js → gbp-K4FXHF6N.js} +3 -3
  105. package/dist/{google-62PQ4SMC.js → google-B6VUPLQN.js} +4 -4
  106. package/dist/{google-marketing-UWGFDUUZ.js → google-marketing-3KKTACAA.js} +1 -1
  107. package/dist/{health-cmd-ZDHMZLYQ.js → health-cmd-YEHYFXEN.js} +4 -4
  108. package/dist/{history-RVBQUMCX.js → history-5EYU4PQT.js} +3 -3
  109. package/dist/index.d.ts +30 -30
  110. package/dist/index.js +26 -26
  111. package/dist/{init-XP3J3HPB.js → init-2HLTEB5Y.js} +12 -12
  112. package/dist/{insights-I2YS7U6L.js → insights-MW5VTF7N.js} +3 -3
  113. package/dist/intelligence-service-PTAA5WJB.js +16 -0
  114. package/dist/{journeys-BELWHYCZ.js → journeys-YW2IWDMN.js} +3 -3
  115. package/dist/{keys-XDILBZFM.js → keys-RRT26LGV.js} +3 -3
  116. package/dist/{keyword-BQ4ECK2Z.js → keyword-KSN3JTCX.js} +3 -3
  117. package/dist/{logs-UAZUYRCJ.js → logs-IPAE4F4W.js} +3 -3
  118. package/dist/{mcp-4262JRAS.js → mcp-WJR6RKYK.js} +4 -4
  119. package/dist/mcp.js +10 -10
  120. package/dist/{measurement-plan-D4DFV7XU.js → measurement-plan-DGLUEK7M.js} +5 -5
  121. package/dist/{notify-TIAGVEYL.js → notify-3QOG6NWS.js} +3 -3
  122. package/dist/{organic-evidence-2TUODD26.js → organic-evidence-M3VSSLQR.js} +3 -3
  123. package/dist/{overview-WP2DO3GW.js → overview-7RRCHUWZ.js} +5 -5
  124. package/dist/{project-OOUUH5QM.js → project-T3JZJPVK.js} +3 -3
  125. package/dist/{project-setup-HBKPIBNL.js → project-setup-Y6DSDF4V.js} +3 -3
  126. package/dist/{query-M7XT5UL3.js → query-24JZPB3M.js} +3 -3
  127. package/dist/{research-O36LMQ6N.js → research-ERVKTKMV.js} +3 -3
  128. package/dist/{results-export-EQWWL2FH.js → results-export-KSGIWPAM.js} +3 -3
  129. package/dist/{run-2I7SGZWI.js → run-XX6YUJRI.js} +5 -5
  130. package/dist/{schedule-UIPFPM64.js → schedule-JBZENJ2V.js} +3 -3
  131. package/dist/{search-L3BSPUWL.js → search-V67KUYIZ.js} +3 -3
  132. package/dist/{serve-CKQIXMZH.js → serve-HTQ76BFW.js} +27 -27
  133. package/dist/{session-JMUEO4JX.js → session-AJ6R6K4B.js} +14 -14
  134. package/dist/{settings-CCYLUD6M.js → settings-KVKWFTJZ.js} +3 -3
  135. package/dist/{sitemaps-QKEA3DLO.js → sitemaps-UDIC4YUU.js} +3 -3
  136. package/dist/{skills-6QCTDYJX.js → skills-35CPSNXM.js} +2 -2
  137. package/dist/{snapshot-SPVUDPYM.js → snapshot-OHGM7JBF.js} +3 -3
  138. package/dist/{src-TV6FYYJC.js → src-GNBUAHT7.js} +2 -2
  139. package/dist/{status-FU5K5ZIP.js → status-GKWSTMUV.js} +5 -5
  140. package/dist/{technical-aeo-A2UNMVHB.js → technical-aeo-IHQYV4TT.js} +3 -3
  141. package/dist/{telemetry-4UAREPKB.js → telemetry-AA2CONG2.js} +4 -4
  142. package/dist/{tools-OLOHKI7B.js → tools-CWNRV7PQ.js} +11 -11
  143. package/dist/{traffic-3TQUDBQB.js → traffic-F7WR32VB.js} +55 -13
  144. package/dist/{trends-IHC2MH5V.js → trends-YB2GNT75.js} +3 -3
  145. package/dist/{users-TYU5PIYM.js → users-PXTIUGXI.js} +3 -3
  146. package/dist/{visibility-stats-BWJF57ON.js → visibility-stats-KSPE4GHQ.js} +4 -4
  147. package/dist/{wordpress-T4CVB32J.js → wordpress-YGSH5MSK.js} +3 -3
  148. package/package.json +2 -2
  149. package/dist/intelligence-service-OHEFN77N.js +0 -16
@@ -0,0 +1,328 @@
1
+ <!-- Generated from skills/aero/references/getting-started.md by pnpm guide:sync. Do not edit. -->
2
+
3
+ > This copy ships with the Canonry skill. The playbooks it names by slug, and
4
+ > the Aero skill it refers to, ship with the Aero skill: add them with
5
+ > `cnry skills install aero`, or read one over MCP with
6
+ > `canonry_help({playbook: "<slug>"})`.
7
+
8
+ # Getting started
9
+
10
+ Read this when the user is new to Canonry, the project has no results yet, or
11
+ the user asks what to do or what to ask next. It walks one loop from an empty
12
+ project to monthly results. Other playbooks hold the detail; this one says
13
+ which step comes next and who does it.
14
+
15
+ ## How to use it
16
+
17
+ - Find the stage before advising. Read `canonry_projects_list`, then
18
+ `canonry_project_setup` (CLI: `cnry project setup <project>`). While its
19
+ `complete` is false, `nextAction` names the next first-run step: follow it
20
+ when it disagrees with this playbook. Once `complete` is true, `nextAction`
21
+ describes only the latest scheduled run. Pick the stage from
22
+ `firstResultAt`: within the first month, stages 4 to 6; after that, stage 7,
23
+ and stage 8 once a month has ended.
24
+ - One stage at a time. Name the next step, say who does it, and get approval
25
+ before any scan, check, probe, discovery session, sync, live read, connection
26
+ or write. Approval for one step does not cover the next one or a repeat.
27
+ - The operator enters every credential (engine keys, Google sign-in, Bing,
28
+ traffic and WordPress tokens) in the dashboard or their own terminal. Never
29
+ ask for one in chat or put one in a tool argument. If a tool is missing or
30
+ returns 403, say which step the operator must do and where.
31
+ - MCP hosts and built-in Aero call the `canonry_*` tools named here. CLI hosts
32
+ run the `cnry` command in parentheses, or find it with
33
+ `cnry help --format json`. On `CONNECTION_ERROR` or missing config, run
34
+ `cnry doctor --format json`, then `cnry bootstrap`, and propose
35
+ `cnry start`.
36
+ - Never promise a result or a date for any fix.
37
+
38
+ | `nextAction` | Stage | Next step |
39
+ |---|---|---|
40
+ | no project yet | 1 | Agree the domain, country and language, then create the project |
41
+ | `run_agent_readiness` | 3 | Propose the first site scan |
42
+ | `retry_agent_readiness` | 3 | Explain `tracks.agentReadiness.error`, then propose a retry |
43
+ | `connect_engine` | 2 | Give the scan score; the operator adds an AI engine key, then Search Console |
44
+ | `add_queries` | 1 | Choose the tracked queries |
45
+ | `publish_plan` | 1 | Review and publish the draft with approval (`canonry_measurement_draft_action`) |
46
+ | `run_ai_visibility` | 3 | Preview the first check, then ask |
47
+ | `repair_ai_visibility` | 2 | The operator fixes what `tracks.aiVisibility.failedEngines` names |
48
+ | `wait` | 3 | Report progress and when to check back; never start a second run |
49
+ | `open_project` | 4 | Read the baseline |
50
+
51
+ ## 1. Set up the project
52
+
53
+ The numbers mean something only if the project describes the business
54
+ correctly.
55
+
56
+ - **Domain.** Use the one canonical host, and check that `www` and older
57
+ domains redirect to it. List as owned domains only sites the business
58
+ controls.
59
+ - **Brand identity.** Set the display name and aliases, including former
60
+ names and common misspellings. Canonry splits queries into branded and
61
+ non-brand from these (`canonry_queries_list` shows each `queryClass`). A
62
+ figure labelled `pooled` later means no usable alias. If the name is a
63
+ common phrase or another business shares it, plan to read branded answers
64
+ to confirm each mention is about this business.
65
+ - **Queries.** Write them as a buyer asks an AI assistant, not as SEO
66
+ keywords, and ask for a recommendation ("who should I hire for X in
67
+ <city>"), not a how-to. Cover each thing the business sells; add a city only
68
+ for a local market; use the buyers' language. For a new category, add
69
+ queries that describe the problem without naming it. Keep a small branded
70
+ set (the brand with reviews, prices or location). No count fits every
71
+ business; size the first check with `canonry_run_preview`. Add with
72
+ `canonry_queries_add`, or expand from a customer description with
73
+ `canonry_discover_run_start` and `canonry_discover_promote_preview`, then
74
+ `canonry_discover_promote` with `includeCompetitors: false` (CLI
75
+ `--no-competitors`). Read `aeo-discovery`; a session spends provider calls.
76
+ - **Competitors.** Hand-pick a short list of direct competitors that sell to
77
+ the same buyer. Leave out marketplaces, directories, review sites and sister
78
+ brands. After the first check, `canonry_competitors_suggest` shows who the
79
+ answers name: propose additions one at a time with that evidence and let
80
+ the user choose. Never bulk-add cited domains. Add an alias when answers name
81
+ a competitor differently from its domain. Preview with
82
+ `canonry_competitors_change_preview`.
83
+ - **Markets.** If the business serves several places, add each location and
84
+ check all of them. For a portfolio of Properties or markets, read
85
+ `portfolio-analysis`.
86
+ - Changing domains, aliases or competitors recomputes past checks, so a figure
87
+ already reported can change. Note the date, and say a period was restated
88
+ instead of calling the difference a change.
89
+
90
+ Create the project with `canonry_project_upsert` (display name, domain,
91
+ country, language; CLI: `cnry project create`). Edit it with
92
+ `canonry_project_update` (CLI: `cnry project update`), after showing the exact
93
+ change.
94
+
95
+ ## 2. Connect evidence sources
96
+
97
+ Each source answers a different question. Start with an AI engine key and
98
+ Search Console; the rest can follow.
99
+
100
+ | Source | What it adds | Who connects it |
101
+ |---|---|---|
102
+ | AI engine keys | The AI visibility check itself (`openai` measures ChatGPT) | Operator: dashboard Settings, or `cnry settings provider <name>` in their terminal |
103
+ | Google Search Console | Real searches, clicks and indexing | Operator: Google sign-in in the dashboard, or `cnry google connect <project> --type gsc` |
104
+ | GA4 | Visits from search and AI assistants | Operator: dashboard, or `cnry ga connect` |
105
+ | Bing Webmaster Tools | Bing's index and searches | Operator: dashboard, or `cnry bing connect` |
106
+ | Server-side traffic | AI crawlers and AI referral visits from logs | Operator: dashboard, or `cnry traffic connect <type> <project>` |
107
+ | Google Business Profile | Local profile, reviews, calls | Operator: Google sign-in, then location choice |
108
+ | WordPress | Publishing pages | Operator: `cnry wordpress connect` |
109
+
110
+ - Connect Search Console for every project. Skipping it should be the user's
111
+ stated choice, since the plan then cannot see real searches.
112
+ - A short first Search Console sync can start on an unusual week. Before
113
+ reading any trend, propose a longer backfill, which the operator or a CLI
114
+ host runs: `cnry google sync <project> --days 180 --wait`. No MCP tool does
115
+ this.
116
+ - Check what each source measures. Search Console should list the sitemap
117
+ index, not one sub-sitemap (`canonry_sitemaps`). A GA4 sync can complete
118
+ with zero rows when the tag is missing, so confirm recent days hold visits.
119
+ Consent banners make GA4 undercount.
120
+ - Connecting a traffic source does not sync it. Vercel and Cloudflare Queue
121
+ sources get a `traffic-sync` schedule automatically; for Cloud Run and
122
+ WordPress, set one (`canonry_schedule_set`). Check that `lastSyncedAt` keeps
123
+ moving (`canonry_traffic_status`). Read `ai-traffic-tracking` before quoting
124
+ AI visits.
125
+ - Business Profile: select only this business's own locations.
126
+ `canonry_gbp_locations` flags a location whose website is another domain
127
+ (`websiteMatchesProject: false`). Deselecting a location deletes its stored
128
+ history.
129
+ - A local model does not return sources, so its citations are not measured.
130
+ - Before quoting any source, check its freshness with `canonry_status`.
131
+
132
+ CLI hosts: setup detail is in the co-installed `canonry/references/`.
133
+
134
+ ## 3. First measurement
135
+
136
+ The Agent Readiness scan crawls the site and needs no AI engine. The AI
137
+ visibility check asks each engine every tracked query, on the operator's
138
+ engine accounts.
139
+
140
+ - **Agent Readiness.** Propose a bounded first scan:
141
+ `canonry_agent_readiness_run` with `maxPages: 100` (CLI:
142
+ `cnry agent-readiness run <project> --max-pages 100 --wait`). Never rerun a
143
+ queued or running scan; read its progress from `canonry_project_setup` once
144
+ and tell the user when to check back. Read `site-health`.
145
+ - **AI visibility.** Show `canonry_run_preview` so the user sees the number of
146
+ requests, get approval, then call `canonry_run_trigger` (CLI:
147
+ `cnry run <project> --wait`). The price depends on the operator's engine
148
+ plans. On a Simple project with several locations, pass `allLocations: true`
149
+ (CLI: `--all-locations`); the preview counts only the default location, so
150
+ multiply its requests by the number of locations. An Advanced plan sets each
151
+ location itself: its preview already covers them, and it rejects
152
+ `allLocations`. The first check runs once and creates no schedule.
153
+ - Before reading numbers, confirm the run finished (`canonry_run_get`). A
154
+ partial run is a capture failure, not a low reading. Read a few branded
155
+ answers to confirm each mention is about this business.
156
+
157
+ ## 4. Read the baseline
158
+
159
+ Follow `orchestration` Workflow 1 without its onboarding report unless asked;
160
+ the scan is already done. For a new user, give items 1 and 2 first and offer
161
+ the rest as questions to ask.
162
+
163
+ 1. How often answers name the business when buyers ask about the category
164
+ (non-brand mention rate), and its mention share against the tracked
165
+ competitors. Branded results go on their own line. Citation comes second
166
+ (`canonry_project_overview`, `canonry_visibility_stats`).
167
+ 2. Who is named instead (`canonry_competitor_landscape` with
168
+ `answers: not-mentioned` and `queryClass: non-brand`), and on which queries
169
+ (the non-brand rows of `canonry_visibility_stats` where the business is not
170
+ mentioned).
171
+ 3. Which sites the non-brand answers rely on (`canonry_analytics_sources` with
172
+ `queryClass: non-brand`). If a few domains supply most citations, getting
173
+ listed there matters. If they spread thin, the business's own site matters
174
+ more.
175
+ 4. The Agent Readiness score and top issues (`canonry_agent_readiness_score`,
176
+ `canonry_agent_readiness_issues`), with `complete` and `termination` from
177
+ `canonry_agent_readiness_overview` for the same run. A 100-page scan that
178
+ stopped at its budget covers those pages, not the site.
179
+ 5. Search: totals from `canonry_gsc_performance_daily`, branded and non-brand
180
+ searches from `canonry_organic_evidence`, and pages by index state
181
+ (`canonry_gsc_coverage`).
182
+
183
+ State the baseline as a level: one check shows no trend, and missing data is
184
+ unknown, not zero. No outside benchmark says what is good. Answer "is this
185
+ good?" against the tracked competitors on the same non-brand queries (with
186
+ none tracked, propose some); branded answers should name the business almost
187
+ every time. Asked why AI leaves the business out, give several possible
188
+ factors (page content, links, listings on cited sites, entrenched
189
+ competitors, each engine's habits), never one cause.
190
+
191
+ ## 5. Make the first plan
192
+
193
+ Sort ideas into the same seven groups every time:
194
+
195
+ 1. **Indexing and discovery.** Pages engines cannot see yet
196
+ (`canonry_gsc_coverage`, `canonry_sitemaps`). An unindexed page cannot be
197
+ read or cited, so fix this early.
198
+ 2. **Structured data.** What existing pages should state machine-readably.
199
+ Check the live HTML and the latest scan first. Mark up only facts that are
200
+ visible on the page and the owner confirmed, and leave unknown fields out.
201
+ Never mark up ratings from other sites as the business's own
202
+ `aggregateRating`.
203
+ 3. **Existing pages.** Titles, answer-first intros, headings and internal
204
+ links, each aimed at a measured query.
205
+ 4. **New pages.** One crawlable page per service, location or comparison that
206
+ no page answers yet. Link each from a plain HTML hub page, not only the
207
+ sitemap, and give concrete figures the owner confirmed (price ranges,
208
+ timelines). Use `canonry_content_targets` filtered to ownable targets;
209
+ `canonry_content_brief` drafts a brief for one (one model call, needs
210
+ approval). A ceded target, where directories, marketplaces or editorial
211
+ sites supply most citations, needs a listing or mention on those sites, not
212
+ a new page.
213
+ 5. **Editorial.** Topics that build authority. Do not turn tracked queries
214
+ into post titles one by one; answer them in an FAQ inside related content.
215
+ 6. **Off-site.** The directories, review sites and lists the answers already
216
+ cite for the category (`canonry_analytics_sources`, `canonry_content_map`).
217
+ These need owner accounts and move slowly, so start them early. On review
218
+ sites, the number and recency of real reviews matter most: ask real
219
+ customers to leave one there. Never write, buy or reward reviews. Keep the
220
+ name, address and phone identical everywhere.
221
+ 7. **Prerequisites.** Missing connections, stale data or missing access.
222
+
223
+ Give each item the data behind it, with numbers, and who ships it: the agent
224
+ drafts it, the site editor ships it, or only the owner can do it. Order the
225
+ top three by the Aero skill's priorities: branded queries that do not name the
226
+ business, then queries where a competitor is named and it is not, then queries
227
+ where it is neither named nor cited. Break ties with real Search Console
228
+ demand. For a new or little-known brand, first make its own site the best
229
+ answer about itself. Keep dropped ideas with their reasons so they do not come
230
+ back. For a single gap, use `orchestration` Workflow 4.
231
+
232
+ ## 6. Ship
233
+
234
+ - The agent drafts and the owner approves and publishes. Show the exact change
235
+ before any edit to a live site.
236
+ - Base every fact in new copy or markup on a short fact list the owner
237
+ confirmed. A rewrite must not add claims.
238
+ - Give new pages internal links and links to real third-party pages, and check
239
+ that each link resolves.
240
+ - Space new posts out instead of publishing several on one day.
241
+ - After a change goes live, read the live HTML: the markup parses and the links
242
+ work. Then, with approval, submit the sitemap
243
+ (`canonry_gsc_sitemaps_submit`, `canonry_bing_submit_sitemap`) and rescan.
244
+ - Record what shipped, with its live URL and date. For a content target, use
245
+ `canonry_content_dismiss` (a write; needs approval). Keep other changes, the
246
+ fact list and dropped ideas in agent memory (`canonry_memory_set`, a write)
247
+ or the user's own notes, so later sessions and reports can read them.
248
+ - WordPress sites can publish through the CLI. Other sites ship through
249
+ whoever edits them.
250
+
251
+ ## 7. Watch on a cadence
252
+
253
+ - A check that runs only when someone remembers it is not monitoring. Each
254
+ schedule is standing approval for recurring work, so propose it with its
255
+ size: the requests per check from `canonry_run_preview` times the checks a
256
+ month. `canonry_schedule_preview` shows when it runs; `canonry_schedule_set`
257
+ saves it.
258
+ - **AI visibility checks.** Pick a cadence the operator can afford and keep it
259
+ steady. More checks a month give tighter monthly comparisons; a month with
260
+ fewer than 5 completed runs is too thin to call a move (`lowRunCount`).
261
+ - **No AI engine spend.** A daily `data-refresh` (Search Console, GA4, Bing,
262
+ Business Profile), a `traffic-sync` for each pull source, and a periodic
263
+ `site-audit`. These still use Google and Bing API quota and crawl the site.
264
+ - Between checks the AI numbers stay flat by design. Read daily movement in
265
+ searches, indexing and visits.
266
+ - Alerts for people: the operator subscribes a watched channel to
267
+ `health.urgent` and `health.urgent-resolved` (site down, data stopped
268
+ arriving) and, for a local business, `review.negative`, in the dashboard or
269
+ with `cnry notify add`. `canonry_agent_webhook_attach` feeds an agent instead.
270
+ - Compare like with like: the same queries, engines, models and locations. A
271
+ change is real only when it is bigger than normal check-to-check movement
272
+ and holds. Use `regression-playbook` for drops and `orchestration`
273
+ Workflow 3 for a weekly review.
274
+
275
+ ## 8. Report monthly
276
+
277
+ Read `reporting` and use its monthly template. Build the report after the
278
+ month ends and its data is final: Search Console fills in a month's last days
279
+ late. A person reviews it before it is sent.
280
+
281
+ - Lead with the non-brand mention rate and mention share from
282
+ `canonry_visibility_compare`, which marks moves within noise, then citation.
283
+ Show Google clicks beside visits from AI assistants, because clicks can fall
284
+ as assistants answer more.
285
+ - Start monthly reports after the work has had a full month. Credit a move
286
+ only when it follows a recorded ship date; never credit movement that began
287
+ before the work.
288
+ - Show changes in both directions. Never present AI crawl or page-read volumes
289
+ as results: they move when platforms change how they fetch pages.
290
+ - `canonry_doctor` with `reportMonth` checks readiness. It is a live read, so
291
+ ask first.
292
+
293
+ ## Questions the user can ask
294
+
295
+ | Stage | Ask | The agent reads |
296
+ |---|---|---|
297
+ | Set up | Which queries should we track? | `canonry_queries_list`, `canonry_gsc_query_totals` |
298
+ | Set up | Who should count as my competitors? | `canonry_competitors_list`, `canonry_competitors_suggest` |
299
+ | Connect | Which accounts should I connect, and why? | `canonry_status`, `canonry_project_get` |
300
+ | Connect | Is anything connected but not updating? | `canonry_status` |
301
+ | First check | How big is the first check? | `canonry_run_preview` |
302
+ | Baseline | Where do I stand against my competitors? | `canonry_project_overview` |
303
+ | Baseline | Who does AI name instead of me, and for what? | `canonry_competitor_landscape` |
304
+ | Baseline | Which websites does AI rely on in my market? | `canonry_analytics_sources` |
305
+ | Plan | What are the top three things to fix first? | stages 4 and 5 |
306
+ | Plan | Which queries am I closest to winning? | `canonry_content_targets` |
307
+ | Plan | Which outside sites would help AI recommend me? | `canonry_content_map` |
308
+ | Ship | Is the change live, and can Google see it? | the live page, then `canonry_gsc_inspections` for its URL |
309
+ | Watch | Did anything change since the last check? | `canonry_project_overview` (`whatChanged`) |
310
+ | Watch | Is this drop real, or normal variation? | `regression-playbook` |
311
+ | Report | What has improved since we started? | `canonry_visibility_compare` |
312
+
313
+ ## Talking to someone new
314
+
315
+ - Use plain words and define each term once: a mention is the answer naming
316
+ the business, a citation is the answer linking to its site, a non-brand
317
+ query does not name it, mention share is its part of all names given, and
318
+ Agent Readiness is how well AI tools can read the site.
319
+ - Name engines by the assistant people know: `openai` is ChatGPT, then
320
+ `gemini`, `claude` and `perplexity`. If the user asks about one the project
321
+ does not check, say it is not measured yet.
322
+ - When asked to "just fix it", say no one controls what an assistant
323
+ recommends, then give the next step or the top three from stage 5, each with
324
+ who ships it.
325
+ - Cover one stage per answer: the numbers first, then the recommended next
326
+ step. Then add one line, "You can also ask:", with two or three questions
327
+ from the table that fit the stage. Use the definitions and this line only
328
+ while the user is new; stop once they ask their own questions.
@@ -1122,6 +1122,10 @@ cnry traffic events <project> --kind crawler --limit 200 --format json
1122
1122
  cnry traffic events <project> --kind ai-referral --since 2026-04-01 --until 2026-04-30
1123
1123
  # Several kinds at once (rows, totals and series cover only those kinds):
1124
1124
  cnry traffic events <project> --kind ai-user-fetch,ai-referral --format json
1125
+ # Which bots read one page, totaled over the window (no row cap to page through):
1126
+ cnry traffic events <project> --path /faq --group-by agent --since 2026-10-26 --format json
1127
+ # Every row: follow eventRows.nextCursor until it is null (repeat the same filters):
1128
+ cnry traffic events <project> --kind crawler --since 2026-10-26 --limit 5000 --cursor <next-cursor> --format json
1125
1129
  ```
1126
1130
 
1127
1131
  The `traffic status` composite returns the same per-source detail
@@ -1,2 +1,2 @@
1
- import{r as e}from"./vendor-markdown-BBGbNklj.js";import{Qc as t,r as n,tl as r}from"./ToneBadge-BXxSLZUc.js";import{D as i,E as a,h as o}from"./ChartPrimitives-CJLgYfSw.js";import{n as s,r as c}from"./account-context-DHUo7ntg.js";import{a as l,i as u,n as d,r as f,t as ee}from"./card-bE38V9NH.js";function p(e,t=[]){let n=e.trim().split(`/`),r=n.length>1?n.shift():``,i=n.join(`/`),a=r===`google`&&/^gemini(?:[-_]|$)/i.test(i)?`Google`:r===`anthropic`&&/^claude(?:[-_]|$)/i.test(i)?`Anthropic`:r===`openai`&&/^(?:gpt(?:[-_]|$)|o\d)/i.test(i)?`OpenAI`:``,o=t.find(t=>t.id===e)?.displayName.trim();if(o){let e=`${a}:`;return a&&o.startsWith(e)&&o.slice(e.length).trim()||o}let s=e=>e.replace(/(?<!\d)[-_]|[-_](?!\d)/g,` `).replace(/:\s*/g,`: `).replace(/\b[a-z]+/gi,e=>e.toLowerCase()===`gpt`?`GPT`:e.toLowerCase()===`ai`?`AI`:e===`o`?e:e.charAt(0).toUpperCase()+e.slice(1)).replace(/\bGPT (?=\d)/g,`GPT-`),c=s(i);return r&&!a?`${s(r)}: ${c}`:c}var m=`__cited__`,h=`__mentioned__`,g=`__mentionShare__`;function _(e){let t=e,{dataStartDate:n,dataEndDate:r}=t;return typeof n!=`string`||typeof r!=`string`?null:{start:o(n),end:o(r),sweepCount:t.sweepCount??1}}function v(e,t=new Date){return i(e,t)}function y(e,t=new Date){let n=_(e);if(!n)return null;let r=v(n.start,t),i=v(n.end,t);return r===i?r:`${r} to ${i}`}function b(e,t=new Date){let n=_(e),r=y(e,t);return!n||!r?`Check date unavailable`:`${r} · ${n.sweepCount} ${n.sweepCount===1?`check`:`checks`}`}function x(e){let t=_(e);return t?a(t.start):``}function S(e){return e.trim().toLowerCase()}function C(e,t={}){return e.map(e=>{let n=e.trim().toLowerCase(),r=(t[e]??[]).map(e=>e.trim().toLowerCase()).filter(Boolean).sort();return n&&r.length>0?`${n}=${r.join(`|`)}`:n}).filter(Boolean).sort().join(`
1
+ import{r as e}from"./vendor-markdown-BBGbNklj.js";import{Qc as t,r as n,tl as r}from"./ToneBadge-CWufDJgM.js";import{D as i,E as a,h as o}from"./ChartPrimitives-C3lJj3eO.js";import{n as s,r as c}from"./account-context-CyE8qMvH.js";import{a as l,i as u,n as d,r as f,t as ee}from"./card-CI9gz2Hb.js";function p(e,t=[]){let n=e.trim().split(`/`),r=n.length>1?n.shift():``,i=n.join(`/`),a=r===`google`&&/^gemini(?:[-_]|$)/i.test(i)?`Google`:r===`anthropic`&&/^claude(?:[-_]|$)/i.test(i)?`Anthropic`:r===`openai`&&/^(?:gpt(?:[-_]|$)|o\d)/i.test(i)?`OpenAI`:``,o=t.find(t=>t.id===e)?.displayName.trim();if(o){let e=`${a}:`;return a&&o.startsWith(e)&&o.slice(e.length).trim()||o}let s=e=>e.replace(/(?<!\d)[-_]|[-_](?!\d)/g,` `).replace(/:\s*/g,`: `).replace(/\b[a-z]+/gi,e=>e.toLowerCase()===`gpt`?`GPT`:e.toLowerCase()===`ai`?`AI`:e===`o`?e:e.charAt(0).toUpperCase()+e.slice(1)).replace(/\bGPT (?=\d)/g,`GPT-`),c=s(i);return r&&!a?`${s(r)}: ${c}`:c}var m=`__cited__`,h=`__mentioned__`,g=`__mentionShare__`;function _(e){let t=e,{dataStartDate:n,dataEndDate:r}=t;return typeof n!=`string`||typeof r!=`string`?null:{start:o(n),end:o(r),sweepCount:t.sweepCount??1}}function v(e,t=new Date){return i(e,t)}function y(e,t=new Date){let n=_(e);if(!n)return null;let r=v(n.start,t),i=v(n.end,t);return r===i?r:`${r} to ${i}`}function b(e,t=new Date){let n=_(e),r=y(e,t);return!n||!r?`Check date unavailable`:`${r} · ${n.sweepCount} ${n.sweepCount===1?`check`:`checks`}`}function x(e){let t=_(e);return t?a(t.start):``}function S(e){return e.trim().toLowerCase()}function C(e,t={}){return e.map(e=>{let n=e.trim().toLowerCase(),r=(t[e]??[]).map(e=>e.trim().toLowerCase()).filter(Boolean).sort();return n&&r.length>0?`${n}=${r.join(`|`)}`:n}).filter(Boolean).sort().join(`
2
2
  `)}function te(e,n){let i=r(e);return i?`${p(i,n?.find(e=>e.name===`openrouter`)?.knownModels??n?.find(t=>t.name===e)?.knownModels)} via OpenRouter`:n?.find(t=>t.name===e)?.displayName?.trim()||t(e)}function w(e){return Math.round(e*1e3)/10}function T(e){return e===null?null:w(e)}function E(e){return e.byProvider??{}}function D(e,t,n){let r=e.buckets.length>0,i=e.buckets.length===1;if(n===`overall`){let n=t===`cited`?m:h,a=t===`cited`?`citationRate`:`mentionRate`;return{rows:e.buckets.map(e=>({date:e.startDate,[n]:T(e[a])})),series:[n],hasData:r,singleBucket:i}}let a=t===`mentioned`?`mentionRate`:`citationRate`,o=[...new Set(e.buckets.flatMap(e=>Object.keys(E(e))))].sort();return{rows:e.buckets.map(e=>{let t={date:e.startDate},n=E(e);for(let e of o){let r=n[e];t[e]=r?T(r[a]):null}return t}),series:o,hasData:r,singleBucket:i}}function O(e){let t=e;return Object.hasOwn(t,`modelEvidenceByProvider`)?t.modelEvidenceByProvider??{}:null}function ne(e){let t=e;return Object.hasOwn(t,`modelAttribution`)?t.modelAttribution??{}:null}function re(e){return e.servedModelAttribution??{}}function ie(e){return e.modelServiceMismatch??{}}function ae(e){return e.modelPointerChanges??{}}function k(e){return e.length<=1?e[0]??``:`${e.slice(0,-1).join(`, `)} and ${e[e.length-1]}`}function A(e){switch(e.status){case`known`:return e.model.includes(`/`)?p(e.model):e.model;case`unknown`:return`Unknown model`;case`mixed`:return e.models.length===0?`Unknown model`:`${e.models.map(e=>e.includes(`/`)?p(e):e).join(`, `)}${e.includesUnknown?` and an unknown model`:``}`}}function j(e){return k([...e.models.map(e=>e.includes(`/`)?p(e):e),...e.includesUnknown?[`an unknown model`]:[]])}function M(e){let t=new Map;for(let[n,r]of Object.entries(e))for(let e of r.events){let r=t.get(e.bucketStartDate)??[];r.push({provider:n,event:e}),t.set(e.bucketStartDate,r)}return[...t.entries()].sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>({bucketStartDate:e,events:[...t].sort((e,t)=>e.provider.localeCompare(t.provider)||e.event.observedAt.localeCompare(t.event.observedAt))}))}function N(e){let t={},n=[];for(let[r,i]of Object.entries(e)){let e=i.events.filter(e=>!e.fromPreWindowAnchor);for(let e of i.events)e.fromPreWindowAnchor&&n.push({provider:r,event:e});e.length>0&&(t[r]={...i,events:e})}return{buckets:M(t),beforeWindow:n.sort((e,t)=>e.event.observedAt.localeCompare(t.event.observedAt)||e.provider.localeCompare(t.provider))}}function P(e){let t=[];for(let[n,r]of Object.entries(e)){let e=r.eventTotal??r.events.length;e>r.events.length&&t.push({provider:n,shown:r.events.length,total:e})}return t.sort((e,t)=>e.provider.localeCompare(t.provider))}function F(e){let t=e.buckets.map(e=>{let t=e.mentionShare;return{date:e.startDate,[g]:t?.rate==null?null:w(t.rate)}}),n=t.map(e=>e[g]).filter(e=>typeof e==`number`&&Number.isFinite(e));return{rows:t,series:[g],hasData:n.length>0,singleBucket:n.length===1}}function I(e,t,n){return t===`mentionShare`?F(e):D(e,t,n)}function L(e,t){if(t===`mentionShare`)return e.buckets.flatMap(e=>{let t=e.mentionShare?.rate;return typeof t==`number`&&Number.isFinite(t)?[t]:[]});let n=t===`cited`?`citationRate`:`mentionRate`;return e.buckets.flatMap(e=>{let t=e[n];return t===null?[]:[t]})}function R(e){return e.buckets.some(e=>e.citationRate!==null)}function z(e,t){let n=e.buckets.flatMap(e=>{let n=E(e)[t];return n?[n]:[]});return n.length>0&&n.every(e=>e.citationRate===null)}function B(e,t){let n=e.windowChange;if(!n)return null;switch(t){case`cited`:return n.citationRate;case`mentioned`:return n.mentionRate;case`mentionShare`:return n.mentionShare}}function V(e,t,n){let r=n===`mentioned`?`mentionRate`:`citationRate`;for(let n=e.buckets.length-1;n>=0;n--){let i=E(e.buckets[n])[t]?.[r];if(i!=null)return i}return null}function H(e){return Date.parse(e)}function U(e,t){let n=_(e);if(!n)return!1;let r=H(t);return r>=H(n.start)&&r<=H(n.end)}function W(e){return e.basketChanges??[]}function oe(e,t){return t.filter(t=>U(e,t.at)).sort((e,t)=>H(e.at)-H(t.at))}function G(e,t){return S(e)===`perplexity`&&t.status===`known`&&!t.model.includes(`/`)}function K(e){return Object.entries(e).filter(([e,t])=>!G(e,t.configured)).sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>({provider:e,mismatch:t}))}function q(e){return[...W(e)].sort((e,t)=>H(t.at)-H(e.at)).map(e=>({at:o(e.at),added:e.added,removed:e.removed}))}function se(e,t){let n=[...e.events].sort((e,t)=>H(e.observedAt)-H(t.observedAt)),r=n[0]?.from??e.latestObservation.state;for(let e of n)H(e.observedAt)<=H(t)&&(r=e.to);return r}function J(e,t,n,r){return{provider:e,at:o(t.observedAt),onOrBefore:t.fromPreWindowAnchor===!0,anchorAt:t.anchorObservedAt?o(t.anchorObservedAt):null,from:t.from,to:t.to,served:n,reroute:r}}function ce(e,t){let n=[];for(let[r,i]of Object.entries(e)){let e=t[r]?.events??[],a=new Set(i.events.map(e=>e.observedAt));for(let t of i.events){let i=G(r,t.to)?e.find(e=>e.observedAt===t.observedAt):void 0;n.push(J(r,t,i?{from:i.from,to:i.to}:null,!1))}for(let t of e)a.has(t.observedAt)||G(r,se(i,t.observedAt))&&n.push(J(r,t,null,!0))}return n.sort((e,t)=>H(t.at)-H(e.at)||e.provider.localeCompare(t.provider))}function le({latest:e,queryChanges:t,modelRows:n,now:r=new Date}){let i=[...t.map(e=>e.at),...n.map(e=>e.at)];if(i.length===0)return null;let a=t=>e!==void 0&&U(e,t),o=t.filter(e=>a(e.at)),s=o.reduce((e,t)=>e+t.added.length,0),c=o.reduce((e,t)=>e+t.removed.length,0),l=n.filter(e=>a(e.at)).length,u=e?y(e,r):null;if(u===null||s+c+l===0)return`No changes since ${v(i.reduce((e,t)=>H(t)>H(e)?t:e),r)}`;let d=[u];return s>0&&d.push(`${s} ${s===1?`query`:`queries`} added`),c>0&&d.push(`${c} ${c===1?`query`:`queries`} removed`),l>0&&d.push(`${l} new ${l===1?`model`:`models`}`),d.join(` · `)}function ue(e,t,n,r=null){let i=H(e);if(!Number.isFinite(i))return null;let a=t.filter(e=>H(e)<i);if(a.length>0)return o(a.reduce((e,t)=>H(t)>H(e)?t:e));let s=n.map(e=>_(e)).filter(e=>e!==null).sort((e,t)=>H(e.start)-H(t.start)),c=s.findIndex(e=>H(e.start)<=i&&i<=H(e.end));if(c===-1)return null;let l=s[c];return H(l.start)===i?c>0?s[c-1].end:r&&H(r)<i?o(r):null:l.sweepCount===2&&H(l.end)===i?l.start:null}function de(e){let t=new Map,n=(e,n)=>{let r=t.get(e);r?r.push(n):t.set(e,[n])};for(let t of[...e].sort((e,t)=>e.revision-t.revision)){let e=H(t.at);for(let r of t.removed)n(r,{at:e,member:!1});for(let r of t.added)n(r,{at:e,member:!0})}return new Map([...t].filter(([,e])=>e.at(-1).member))}function Y(e,t){let n=!e[0].member;for(let r of e)r.at<=t&&(n=r.member);return n}function fe(e,t,n){return e.some(e=>e.at>t&&e.at<=n)}function X(e,t){let n=H(t.start),r=H(t.end);return t.sweepCount>2?fe(e,n,r):Y(e,n)!==Y(e,r)}function Z(e,t,n,r){let i=H(t),a=H(n),o={added:[],removed:[],removedAndAddedBack:[],addedAndRemovedAgain:[]},s=new Set;for(let[t,n]of de(e)){if(!r(n))continue;s.add(t);let e=Y(n,i),c=Y(n,a);e===c?(e?o.removedAndAddedBack:o.addedAndRemovedAgain).push(t):(c?o.added:o.removed).push(t)}if(s.size===0)return null;let c=e=>[...e.added,...e.removed].some(e=>s.has(e)),l=e.filter(e=>H(e.at)>i&&H(e.at)<=a&&c(e)).sort((e,t)=>H(e.at)-H(t.at));return{changes:l,keys:[...new Set(l.flatMap(e=>[...e.added,...e.removed]))].filter(e=>s.has(e)),moves:o}}function pe(e,t){if(e.length<2)return null;let n=e[0],r=e.at(-1),i=_(n),a=_(r),o=i?.start??n.startDate,s=a?.end??r.endDate,c=Z(t,o,s,e=>Y(e,H(o))!==Y(e,H(s))||i!==null&&X(e,i)||a!==null&&X(e,a));return!c&&n.queryCount===r.queryCount?null:{...c??{changes:[],keys:[],moves:{added:[],removed:[],removedAndAddedBack:[],addedAndRemovedAgain:[]}},firstCount:n.queryCount,latestCount:r.queryCount}}function me(e,t){let n=_(e);if(!n)return null;let r=Z(t,n.start,n.end,e=>X(e,n));return r?{...r,firstCount:e.queryCount,latestCount:e.queryCount}:null}function Q(e){return`${e} ${e===1?`query`:`queries`}`}function he(e){let t=[],n=e=>t.length===0?Q(e):String(e);return e.added.length>0&&t.push(`${n(e.added.length)} added`),e.removed.length>0&&t.push(`${n(e.removed.length)} removed`),e.removedAndAddedBack.length>0&&t.push(`${Q(e.removedAndAddedBack.length)} removed and added back`),e.addedAndRemovedAgain.length>0&&t.push(`${Q(e.addedAndRemovedAgain.length)} added and removed again`),k(t)}function ge(e,t,n,r){return e?t!==`mentionShare`||n!==`non-brand`||!r?!1:e.keys.length>0&&e.keys.every(e=>r(e)===`branded`):!0}var $=e();function _e({disabled:e,title:t,...r}){let{canWrite:i}=c();return i?(0,$.jsx)(n,{disabled:e,title:t,...r}):(0,$.jsx)(n,{...r,disabled:!0,title:s})}function ve({title:e,children:t}){let{isAdmin:n}=c();return n?(0,$.jsx)($.Fragment,{children:t}):(0,$.jsxs)(ee,{className:`surface-card mx-auto mt-8 max-w-lg`,children:[(0,$.jsxs)(u,{children:[(0,$.jsxs)(l,{children:[e,` is for administrators`]}),(0,$.jsx)(f,{children:`Your account has view-only access. You can read everything this install has measured; changing how it is set up needs an administrator account.`})]}),(0,$.jsx)(d,{children:(0,$.jsx)(`p`,{className:`supporting-copy`,children:`If you need to make a change here, ask an administrator on this install.`})})]})}export{W as A,P as B,L as C,q as D,te as E,ie as F,p as H,re as I,ge as L,_ as M,ne as N,he as O,ae as P,K as R,N as S,z as T,le as V,k as _,g as a,ce as b,R as c,x as d,y as f,G as g,v as h,h as i,O as j,pe as k,C as l,A as m,_e as n,oe as o,j as p,m as r,I as s,ve as t,b as u,V as v,me as w,S as x,B as y,ue as z};
@@ -1,4 +1,4 @@
1
- import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{H as t,W as n,ft as r,tt as i}from"./vendor-lucide-iE5MEh2-.js";import{r as a}from"./vendor-markdown-BBGbNklj.js";import{At as o,Cs as s,Mt as c,Ss as l,jt as u,mt as d,on as f,r as p,sn as m,t as h,xs as g,zn as _}from"./ToneBadge-BXxSLZUc.js";import{r as v}from"./account-context-DHUo7ntg.js";import{t as y}from"./async-handler-Bj3TnIRw.js";import{at as b,lt as x}from"./index-Ce3zYiH3.js";var S=e(r(),1),C=`Use the official Canonry docs:
1
+ import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{H as t,W as n,ft as r,tt as i}from"./vendor-lucide-iE5MEh2-.js";import{r as a}from"./vendor-markdown-BBGbNklj.js";import{At as o,Cs as s,Mt as c,Ss as l,jt as u,mt as d,on as f,r as p,sn as m,t as h,xs as g,zn as _}from"./ToneBadge-CWufDJgM.js";import{r as v}from"./account-context-CyE8qMvH.js";import{t as y}from"./async-handler-Bj3TnIRw.js";import{at as b,lt as x}from"./index-DshFRkPM.js";var S=e(r(),1),C=`Use the official Canonry docs:
2
2
  - Agent quickstart: https://github.com/Canonry/canonry#or-use-any-shell-capable-coding-agent
3
3
  - CLI reference: https://github.com/Canonry/canonry/blob/main/skills/canonry/references/canonry-cli.md
4
4
  - Plugin setup: https://github.com/Canonry/canonry/blob/main/docs/plugins.md
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{ft as t}from"./vendor-lucide-iE5MEh2-.js";import{r as n}from"./vendor-markdown-BBGbNklj.js";import{x as r}from"./vendor-tanstack-16u6cATb.js";import{bt as i,r as a,t as o}from"./ToneBadge-BXxSLZUc.js";import{bn as s,bt as c,l}from"./react-query-CsgUn_pT.js";import{t as u}from"./card-bE38V9NH.js";var d=e(t(),1),f=n(),p=100;function m(e){if(e===`all`)return;let t=Number.parseInt(e,10);return new Date(Date.now()-t*24*60*60*1e3).toISOString()}function h(e){let t=e.userAgent?.toLowerCase()??``;return t.includes(`canonry-mcp`)?`MCP`:t.includes(`canonry-cli`)?`CLI`:t.includes(`mozilla/`)?`Dashboard`:e.actor===`scheduler`?`Scheduler`:e.actor===`agent`?`Agent`:e.actor===`mcp`?`MCP`:e.actor===`cli`?`CLI`:e.actor}function g(e){return/delete|remove|revoke|disconnect|failed|refused/.test(e)?`negative`:/create|add|connect|completed/.test(e)?`positive`:/update|replace|sync|apply/.test(e)?`caution`:`neutral`}function _(e){return[e.action,e.actor,e.entityType,e.entityId,e.actorSession,e.userAgent,e.diff==null?``:JSON.stringify(e.diff)].filter(Boolean).join(` `).toLowerCase()}function v({projectName:e}){let[t,n]=(0,d.useState)(0),[v,y]=(0,d.useState)(`90d`),[b,x]=(0,d.useState)(``),[S,C]=(0,d.useState)(``),w=(0,d.useMemo)(()=>m(v),[v]),T={limit:p,offset:t*p,since:w,actor:b||void 0},E=r({...c({client:i,path:{name:e??``},query:T}),enabled:!!e}),D=r({...l({client:i,query:T}),enabled:!e}),O=r({...s({client:i}),enabled:!e}),k=e?E:D,A=k.data??[],j=(0,d.useMemo)(()=>new Map((O.data??[]).map(e=>[e.id,e.displayName||e.name])),[O.data]),M=S.trim().toLowerCase(),N=(0,d.useMemo)(()=>M?A.filter(e=>_(e).includes(M)):A,[A,M]),P=e=>{n(0),e()};return k.isLoading?(0,f.jsx)(`p`,{className:`supporting-copy mt-6`,role:`status`,children:`Loading change history…`}):(0,f.jsxs)(`section`,{className:`mt-6`,"aria-labelledby":`change-history-heading`,children:[(0,f.jsxs)(`div`,{className:`section-head section-head-inline`,children:[(0,f.jsx)(`div`,{children:(0,f.jsx)(`h2`,{id:`change-history-heading`,className:e?void 0:`sr-only`,children:`Change history`})}),(0,f.jsx)(a,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>void k.refetch(),disabled:k.isFetching,children:k.isFetching?`Refreshing…`:`Refresh`})]}),(0,f.jsxs)(`div`,{className:`mt-4 grid gap-2 sm:grid-cols-3`,children:[(0,f.jsx)(`input`,{type:`search`,"aria-label":`Search change history`,value:S,onChange:e=>C(e.target.value),placeholder:`Search actions, entities, or details`,className:`min-h-11 rounded-md border border-base bg-bg px-3 text-label-14 text-strong placeholder-mono-400 focus:outline-none focus-visible:ring-1 focus-visible:ring-mono-600`}),(0,f.jsxs)(`select`,{"aria-label":`Filter change history by actor`,value:b,onChange:e=>P(()=>x(e.target.value)),className:`min-h-11 rounded-md border border-base bg-bg px-3 text-label-14 text-strong focus:outline-none focus-visible:ring-1 focus-visible:ring-mono-600`,children:[(0,f.jsx)(`option`,{value:``,children:`All actors`}),(0,f.jsx)(`option`,{value:`api`,children:`API and dashboard`}),(0,f.jsx)(`option`,{value:`cli`,children:`CLI`}),(0,f.jsx)(`option`,{value:`scheduler`,children:`Scheduler`}),(0,f.jsx)(`option`,{value:`agent`,children:`Agent`}),(0,f.jsx)(`option`,{value:`mcp`,children:`MCP`})]}),(0,f.jsxs)(`select`,{"aria-label":`Filter change history by date range`,value:v,onChange:e=>P(()=>y(e.target.value)),className:`min-h-11 rounded-md border border-base bg-bg px-3 text-label-14 text-strong focus:outline-none focus-visible:ring-1 focus-visible:ring-mono-600`,children:[(0,f.jsx)(`option`,{value:`30d`,children:`Last 30 days`}),(0,f.jsx)(`option`,{value:`90d`,children:`Last 90 days`}),(0,f.jsx)(`option`,{value:`365d`,children:`Last year`}),(0,f.jsx)(`option`,{value:`all`,children:`All retained history`})]})]}),k.isError?(0,f.jsxs)(u,{className:`surface-card empty-card mt-4`,children:[(0,f.jsx)(`h3`,{children:`Change history unavailable`}),(0,f.jsx)(`p`,{children:k.error instanceof Error?k.error.message:`Could not load the audit trail.`})]}):N.length===0?(0,f.jsxs)(u,{className:`surface-card empty-card mt-4`,children:[(0,f.jsx)(`h3`,{children:`No changes match these filters`}),(0,f.jsx)(`p`,{children:`Widen the date range or clear the actor and search filters.`})]}):(0,f.jsx)(`div`,{className:`evidence-table-wrap mt-4`,children:(0,f.jsxs)(`table`,{className:`evidence-table`,children:[(0,f.jsx)(`thead`,{children:(0,f.jsxs)(`tr`,{children:[(0,f.jsx)(`th`,{children:`When`}),e?null:(0,f.jsx)(`th`,{children:`Scope`}),(0,f.jsx)(`th`,{children:`Action`}),(0,f.jsx)(`th`,{children:`Entity`}),(0,f.jsx)(`th`,{children:`Origin`}),(0,f.jsx)(`th`,{children:`Details`})]})}),(0,f.jsx)(`tbody`,{children:N.map(t=>(0,f.jsxs)(`tr`,{children:[(0,f.jsx)(`td`,{className:`whitespace-nowrap tabular-nums text-muted`,children:new Date(t.createdAt).toLocaleString()}),e?null:(0,f.jsx)(`td`,{className:`text-secondary`,children:t.projectId?j.get(t.projectId)??`Deleted project · ${t.projectId}`:`Instance settings`}),(0,f.jsx)(`td`,{children:(0,f.jsx)(o,{tone:g(t.action),children:t.action})}),(0,f.jsxs)(`td`,{children:[(0,f.jsx)(`span`,{className:`text-strong`,children:t.entityType}),t.entityId?(0,f.jsx)(`span`,{className:`mt-0.5 block max-w-48 truncate text-label-12-mono text-faint`,title:t.entityId,children:t.entityId}):null]}),(0,f.jsxs)(`td`,{children:[(0,f.jsx)(`span`,{className:`text-secondary`,children:h(t)}),t.actorSession?(0,f.jsxs)(`span`,{className:`mt-0.5 block max-w-40 truncate text-label-12-mono text-faint`,title:t.actorSession,children:[`Session `,t.actorSession]}):null]}),(0,f.jsx)(`td`,{children:t.diff==null?(0,f.jsx)(`span`,{className:`text-faint`,children:`No field diff`}):(0,f.jsxs)(`details`,{children:[(0,f.jsx)(`summary`,{className:`min-h-11 cursor-pointer py-3 text-label-14 text-secondary hover:text-strong`,children:`View diff`}),(0,f.jsx)(`pre`,{className:`max-h-72 max-w-xl overflow-auto whitespace-pre-wrap break-words rounded-md bg-bg-elevated p-3 text-copy-13 text-secondary`,children:JSON.stringify(t.diff,null,2)})]})})]},t.id))})]})}),!k.isError&&(t>0||A.length===p)?(0,f.jsxs)(`div`,{className:`mt-4 flex items-center justify-between gap-3`,children:[(0,f.jsx)(a,{type:`button`,variant:`outline`,size:`sm`,disabled:t===0,onClick:()=>n(e=>Math.max(0,e-1)),children:`Previous`}),(0,f.jsxs)(`span`,{className:`text-label-12 tabular-nums text-muted`,children:[`Page `,t+1]}),(0,f.jsx)(a,{type:`button`,variant:`outline`,size:`sm`,disabled:A.length<p,onClick:()=>n(e=>e+1),children:`Next`})]}):null]})}export{v as t};
1
+ import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{ft as t}from"./vendor-lucide-iE5MEh2-.js";import{r as n}from"./vendor-markdown-BBGbNklj.js";import{x as r}from"./vendor-tanstack-16u6cATb.js";import{bt as i,r as a,t as o}from"./ToneBadge-CWufDJgM.js";import{bn as s,bt as c,l}from"./react-query-DE_LaZkX.js";import{t as u}from"./card-CI9gz2Hb.js";var d=e(t(),1),f=n(),p=100;function m(e){if(e===`all`)return;let t=Number.parseInt(e,10);return new Date(Date.now()-t*24*60*60*1e3).toISOString()}function h(e){let t=e.userAgent?.toLowerCase()??``;return t.includes(`canonry-mcp`)?`MCP`:t.includes(`canonry-cli`)?`CLI`:t.includes(`mozilla/`)?`Dashboard`:e.actor===`scheduler`?`Scheduler`:e.actor===`agent`?`Agent`:e.actor===`mcp`?`MCP`:e.actor===`cli`?`CLI`:e.actor}function g(e){return/delete|remove|revoke|disconnect|failed|refused/.test(e)?`negative`:/create|add|connect|completed/.test(e)?`positive`:/update|replace|sync|apply/.test(e)?`caution`:`neutral`}function _(e){return[e.action,e.actor,e.entityType,e.entityId,e.actorSession,e.userAgent,e.diff==null?``:JSON.stringify(e.diff)].filter(Boolean).join(` `).toLowerCase()}function v({projectName:e}){let[t,n]=(0,d.useState)(0),[v,y]=(0,d.useState)(`90d`),[b,x]=(0,d.useState)(``),[S,C]=(0,d.useState)(``),w=(0,d.useMemo)(()=>m(v),[v]),T={limit:p,offset:t*p,since:w,actor:b||void 0},E=r({...c({client:i,path:{name:e??``},query:T}),enabled:!!e}),D=r({...l({client:i,query:T}),enabled:!e}),O=r({...s({client:i}),enabled:!e}),k=e?E:D,A=k.data??[],j=(0,d.useMemo)(()=>new Map((O.data??[]).map(e=>[e.id,e.displayName||e.name])),[O.data]),M=S.trim().toLowerCase(),N=(0,d.useMemo)(()=>M?A.filter(e=>_(e).includes(M)):A,[A,M]),P=e=>{n(0),e()};return k.isLoading?(0,f.jsx)(`p`,{className:`supporting-copy mt-6`,role:`status`,children:`Loading change history…`}):(0,f.jsxs)(`section`,{className:`mt-6`,"aria-labelledby":`change-history-heading`,children:[(0,f.jsxs)(`div`,{className:`section-head section-head-inline`,children:[(0,f.jsx)(`div`,{children:(0,f.jsx)(`h2`,{id:`change-history-heading`,className:e?void 0:`sr-only`,children:`Change history`})}),(0,f.jsx)(a,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>void k.refetch(),disabled:k.isFetching,children:k.isFetching?`Refreshing…`:`Refresh`})]}),(0,f.jsxs)(`div`,{className:`mt-4 grid gap-2 sm:grid-cols-3`,children:[(0,f.jsx)(`input`,{type:`search`,"aria-label":`Search change history`,value:S,onChange:e=>C(e.target.value),placeholder:`Search actions, entities, or details`,className:`min-h-11 rounded-md border border-base bg-bg px-3 text-label-14 text-strong placeholder-mono-400 focus:outline-none focus-visible:ring-1 focus-visible:ring-mono-600`}),(0,f.jsxs)(`select`,{"aria-label":`Filter change history by actor`,value:b,onChange:e=>P(()=>x(e.target.value)),className:`min-h-11 rounded-md border border-base bg-bg px-3 text-label-14 text-strong focus:outline-none focus-visible:ring-1 focus-visible:ring-mono-600`,children:[(0,f.jsx)(`option`,{value:``,children:`All actors`}),(0,f.jsx)(`option`,{value:`api`,children:`API and dashboard`}),(0,f.jsx)(`option`,{value:`cli`,children:`CLI`}),(0,f.jsx)(`option`,{value:`scheduler`,children:`Scheduler`}),(0,f.jsx)(`option`,{value:`agent`,children:`Agent`}),(0,f.jsx)(`option`,{value:`mcp`,children:`MCP`})]}),(0,f.jsxs)(`select`,{"aria-label":`Filter change history by date range`,value:v,onChange:e=>P(()=>y(e.target.value)),className:`min-h-11 rounded-md border border-base bg-bg px-3 text-label-14 text-strong focus:outline-none focus-visible:ring-1 focus-visible:ring-mono-600`,children:[(0,f.jsx)(`option`,{value:`30d`,children:`Last 30 days`}),(0,f.jsx)(`option`,{value:`90d`,children:`Last 90 days`}),(0,f.jsx)(`option`,{value:`365d`,children:`Last year`}),(0,f.jsx)(`option`,{value:`all`,children:`All retained history`})]})]}),k.isError?(0,f.jsxs)(u,{className:`surface-card empty-card mt-4`,children:[(0,f.jsx)(`h3`,{children:`Change history unavailable`}),(0,f.jsx)(`p`,{children:k.error instanceof Error?k.error.message:`Could not load the audit trail.`})]}):N.length===0?(0,f.jsxs)(u,{className:`surface-card empty-card mt-4`,children:[(0,f.jsx)(`h3`,{children:`No changes match these filters`}),(0,f.jsx)(`p`,{children:`Widen the date range or clear the actor and search filters.`})]}):(0,f.jsx)(`div`,{className:`evidence-table-wrap mt-4`,children:(0,f.jsxs)(`table`,{className:`evidence-table`,children:[(0,f.jsx)(`thead`,{children:(0,f.jsxs)(`tr`,{children:[(0,f.jsx)(`th`,{children:`When`}),e?null:(0,f.jsx)(`th`,{children:`Scope`}),(0,f.jsx)(`th`,{children:`Action`}),(0,f.jsx)(`th`,{children:`Entity`}),(0,f.jsx)(`th`,{children:`Origin`}),(0,f.jsx)(`th`,{children:`Details`})]})}),(0,f.jsx)(`tbody`,{children:N.map(t=>(0,f.jsxs)(`tr`,{children:[(0,f.jsx)(`td`,{className:`whitespace-nowrap tabular-nums text-muted`,children:new Date(t.createdAt).toLocaleString()}),e?null:(0,f.jsx)(`td`,{className:`text-secondary`,children:t.projectId?j.get(t.projectId)??`Deleted project · ${t.projectId}`:`Instance settings`}),(0,f.jsx)(`td`,{children:(0,f.jsx)(o,{tone:g(t.action),children:t.action})}),(0,f.jsxs)(`td`,{children:[(0,f.jsx)(`span`,{className:`text-strong`,children:t.entityType}),t.entityId?(0,f.jsx)(`span`,{className:`mt-0.5 block max-w-48 truncate text-label-12-mono text-faint`,title:t.entityId,children:t.entityId}):null]}),(0,f.jsxs)(`td`,{children:[(0,f.jsx)(`span`,{className:`text-secondary`,children:h(t)}),t.actorSession?(0,f.jsxs)(`span`,{className:`mt-0.5 block max-w-40 truncate text-label-12-mono text-faint`,title:t.actorSession,children:[`Session `,t.actorSession]}):null]}),(0,f.jsx)(`td`,{children:t.diff==null?(0,f.jsx)(`span`,{className:`text-faint`,children:`No field diff`}):(0,f.jsxs)(`details`,{children:[(0,f.jsx)(`summary`,{className:`min-h-11 cursor-pointer py-3 text-label-14 text-secondary hover:text-strong`,children:`View diff`}),(0,f.jsx)(`pre`,{className:`max-h-72 max-w-xl overflow-auto whitespace-pre-wrap break-words rounded-md bg-bg-elevated p-3 text-copy-13 text-secondary`,children:JSON.stringify(t.diff,null,2)})]})})]},t.id))})]})}),!k.isError&&(t>0||A.length===p)?(0,f.jsxs)(`div`,{className:`mt-4 flex items-center justify-between gap-3`,children:[(0,f.jsx)(a,{type:`button`,variant:`outline`,size:`sm`,disabled:t===0,onClick:()=>n(e=>Math.max(0,e-1)),children:`Previous`}),(0,f.jsxs)(`span`,{className:`text-label-12 tabular-nums text-muted`,children:[`Page `,t+1]}),(0,f.jsx)(a,{type:`button`,variant:`outline`,size:`sm`,disabled:A.length<p,onClick:()=>n(e=>e+1),children:`Next`})]}):null]})}export{v as t};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{H as t,U as n,c as r,ft as i,s as a,w as o}from"./vendor-lucide-iE5MEh2-.js";import{r as s}from"./vendor-markdown-BBGbNklj.js";import{$ as c,At as l,H as u,J as d,U as f,o as p,q as m,r as h,t as g,wt as _,xn as v,zt as y}from"./ToneBadge-BXxSLZUc.js";import{t as b}from"./async-handler-Bj3TnIRw.js";import{t as x}from"./card-bE38V9NH.js";import{t as S}from"./Hint-3TTi0MgX.js";var C=e(i(),1),w=s(),T=`https://commoncrawl.org/web-graphs`;function E(e){return e==null?`—`:e>=0xe8d4a51000?`${(e/0xe8d4a51000).toFixed(1)} TB`:e>=1e9?`${(e/1e9).toFixed(1)} GB`:e>=1e6?`${(e/1e6).toFixed(1)} MB`:e>=1e3?`${(e/1e3).toFixed(1)} KB`:`${e} B`}function D(e){if(!e)return`—`;let t=Date.now()-new Date(e).getTime(),n=Math.floor(t/6e4);if(n<1)return`just now`;if(n<60)return`${n}m ago`;let r=Math.floor(n/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}function O(e){switch(e){case`ready`:return`positive`;case`failed`:return`negative`;case`downloading`:case`querying`:case`queued`:return`caution`}}function k(){let[e,i]=(0,C.useState)(null),[s,k]=(0,C.useState)(null),[A,j]=(0,C.useState)([]),[M,N]=(0,C.useState)([]),[P,F]=(0,C.useState)(null),[I,L]=(0,C.useState)(!0),[R,z]=(0,C.useState)(!1),[B,V]=(0,C.useState)(!1),[H,U]=(0,C.useState)(``),[W,G]=(0,C.useState)(!1),[K,q]=(0,C.useState)(null),[J,Y]=(0,C.useState)(null),X=(0,C.useCallback)(async()=>{L(!0),q(null);try{let[e,t,n,r,a]=await Promise.all([u(),d().catch(()=>null),c().catch(()=>[]),f().catch(()=>[]),m().catch(()=>null)]);i(e),k(t),j(n),N(r),F(a)}catch(e){q(e instanceof Error?e.message:`Failed to load backlinks status`)}finally{L(!1)}},[]);(0,C.useEffect)(()=>{X()},[X]);async function Z(){z(!0),q(null),Y(null);try{let e=await _();Y(e.alreadyPresent?`DuckDB already installed (${e.version}).`:`Installed DuckDB ${e.version}.`),await X()}catch(e){q(e instanceof Error?e.message:`Failed to install DuckDB`)}finally{z(!1)}}async function Q(){let e=H.trim()||void 0;V(!0),q(null),Y(null);try{let t=await v(e);Y(e?`Queued sync for ${t.release}. Download + query runs in the background.`:`Queued sync for auto-discovered release ${t.release}. Download + query runs in the background.`),U(``),G(!1),await X()}catch(e){e instanceof p&&e.code===`MISSING_DEPENDENCY`?q(`DuckDB is not installed. Install it first.`):q(e instanceof Error?e.message:`Failed to trigger sync`)}finally{V(!1)}}async function $(e){q(null),Y(null);try{await y(e),Y(`Pruned cached release ${e}.`),await X()}catch(e){q(e instanceof Error?e.message:`Failed to prune release`)}}let ee=s?.status===`ready`&&M.every(e=>e.release!==s.release);return(0,w.jsxs)(`div`,{className:`page-container`,children:[(0,w.jsx)(`div`,{className:`page-header`,children:(0,w.jsxs)(`div`,{className:`page-header-left`,children:[(0,w.jsx)(`h1`,{className:`page-title`,children:`Backlink data`}),(0,w.jsx)(`p`,{className:`page-subtitle`,children:`Manage the shared backlink source and review its latest data.`})]})}),K&&(0,w.jsx)(x,{className:`surface-card p-4 mb-4 bg-negative-soft`,children:(0,w.jsx)(`p`,{className:`text-copy-14 text-negative`,children:K})}),J&&(0,w.jsx)(x,{className:`surface-card p-4 mb-4 bg-positive-soft`,children:(0,w.jsx)(`p`,{className:`text-copy-14 text-positive`,children:J})}),(0,w.jsxs)(`section`,{className:`page-section`,children:[(0,w.jsxs)(`div`,{className:`section-head section-head-inline`,children:[(0,w.jsx)(`div`,{children:(0,w.jsx)(`h2`,{children:`Backlink source`})}),e?.duckdbInstalled?(0,w.jsx)(g,{tone:`positive`,children:`Installed`}):(0,w.jsx)(g,{tone:`caution`,children:`Not installed`})]}),(0,w.jsx)(x,{className:`surface-card p-4`,children:I?(0,w.jsx)(`p`,{className:`text-copy-14 text-muted`,children:`Checking…`}):e?.duckdbInstalled?(0,w.jsx)(`p`,{className:`text-copy-14 text-secondary`,children:`Ready to sync a Common Crawl release.`}):(0,w.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,w.jsx)(`p`,{className:`text-copy-14 text-secondary`,children:`Install the local query engine to enable release syncs.`}),!l()&&(0,w.jsxs)(h,{type:`button`,size:`sm`,disabled:R,onClick:b(Z),children:[(0,w.jsx)(n,{className:`h-4 w-4 mr-1.5`,"aria-hidden":!0}),R?`Installing…`:`Install DuckDB`]})]})})]}),(0,w.jsxs)(`section`,{className:`page-section`,children:[(0,w.jsxs)(`div`,{className:`section-head section-head-inline`,children:[(0,w.jsx)(`div`,{children:(0,w.jsxs)(`h2`,{className:`flex items-center gap-2`,children:[`Release sync`,(0,w.jsx)(S,{label:`What is a release sync?`,children:`A release sync downloads one Common Crawl dump (~16 GB) and extracts backlinks for every project in this workspace in one pass. This is the heavy job — subsequent per-project re-runs skip the download and just re-query the cached files.`})]})}),s&&(0,w.jsx)(g,{tone:O(s.status),children:s.status})]}),(0,w.jsxs)(`div`,{className:`space-y-4`,children:[s?(0,w.jsxs)(`div`,{className:`space-y-2 text-label-14`,children:[(0,w.jsxs)(`p`,{className:`text-strong`,children:[`Release `,(0,w.jsx)(`code`,{className:`text-neutral`,children:s.release})]}),s.phaseDetail&&(0,w.jsx)(`p`,{className:`text-secondary`,children:s.phaseDetail}),(0,w.jsxs)(`div`,{className:`grid grid-cols-2 md:grid-cols-4 gap-4 text-label-12 text-muted pt-2`,children:[(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`p`,{className:`text-faint normal-case text-label-12`,children:`Projects`}),(0,w.jsx)(`p`,{className:`text-neutral mt-0.5`,children:s.projectsProcessed??`—`})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsxs)(`p`,{className:`text-faint normal-case text-label-12 flex items-center gap-1`,children:[`Rows`,(0,w.jsx)(S,{label:`What are rows?`,children:`Total number of (project, referring domain) pairs persisted in SQLite from this sync, across every project in the workspace.`})]}),(0,w.jsx)(`p`,{className:`text-neutral mt-0.5`,children:s.domainsDiscovered??`—`})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`p`,{className:`text-faint normal-case text-label-12`,children:`Started`}),(0,w.jsx)(`p`,{className:`text-neutral mt-0.5`,children:D(s.downloadStartedAt??s.createdAt)})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`p`,{className:`text-faint normal-case text-label-12`,children:`Finished`}),(0,w.jsx)(`p`,{className:`text-neutral mt-0.5`,children:D(s.queryFinishedAt)})]})]}),s.error&&(0,w.jsx)(`p`,{className:`text-copy-14 text-negative-400 pt-2`,children:s.error})]}):(0,w.jsx)(`p`,{className:`text-copy-14 text-muted`,children:`No release sync has run in this workspace yet.`}),ee&&(0,w.jsx)(`div`,{className:`mt-4 rounded border border-caution-800/60 bg-caution-950/20 p-3`,children:(0,w.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,w.jsx)(a,{className:`h-4 w-4 text-caution-400 shrink-0 mt-0.5`,"aria-hidden":!0}),(0,w.jsxs)(`div`,{className:`text-label-14 text-neutral`,children:[(0,w.jsx)(`p`,{className:`text-copy-14-strong text-caution-200`,children:`Cached files for this release are missing.`}),(0,w.jsx)(`p`,{className:`mt-1 text-secondary`,children:`Sync this release again, or sync the newest release, before refreshing individual projects.`})]})]})}),(0,w.jsxs)(`div`,{className:`space-y-3`,children:[(0,w.jsxs)(`div`,{className:`flex items-start justify-between gap-3 mb-3`,children:[(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`p`,{className:`text-label-12 normal-case text-muted`,children:`Auto-detected release`}),P?(0,w.jsxs)(`p`,{className:`text-copy-14 text-strong mt-0.5`,children:[(0,w.jsx)(`code`,{className:`text-heading`,children:P.release}),(0,w.jsxs)(`span`,{className:`ml-2 text-label-12 text-muted`,children:[`Vertex `,E(P.vertexBytes),`, edges `,E(P.edgesBytes)]})]}):(0,w.jsx)(`p`,{className:`text-copy-14 text-muted mt-0.5`,children:I?`Checking Common Crawl…`:`Could not find a release. Choose one below.`}),(0,w.jsxs)(`a`,{href:T,target:`_blank`,rel:`noopener noreferrer`,className:`mt-1 inline-flex items-center gap-1 text-label-12 text-secondary hover:text-strong focus:text-strong focus:outline-none focus-visible:ring-1 focus-visible:ring-mono-500 rounded`,children:[`Browse all Common Crawl web-graph releases`,(0,w.jsx)(t,{className:`h-3 w-3`,"aria-hidden":!0})]})]}),!l()&&(0,w.jsxs)(`div`,{className:`flex items-center gap-2 shrink-0`,children:[(0,w.jsxs)(h,{type:`button`,size:`sm`,disabled:B||!e?.duckdbInstalled||!P&&!H.trim(),onClick:b(Q),children:[(0,w.jsx)(o,{className:`h-4 w-4 mr-1.5`,"aria-hidden":!0}),B?`Queuing…`:`Run sync`]}),(0,w.jsxs)(S,{label:`What does Run sync do?`,children:[(0,w.jsxs)(`span`,{className:`block`,children:[`Downloads the auto-detected (or chosen) Common Crawl release (~16 GB) to`,` `,(0,w.jsx)(`code`,{className:`text-neutral`,children:`~/.canonry/cache/commoncrawl/`}),`, then runs a single DuckDB query that extracts referring domains for every project in this workspace.`]}),(0,w.jsxs)(`span`,{className:`mt-2 block text-secondary`,children:[`First time for a release: `,(0,w.jsx)(`span`,{className:`text-strong`,children:`~10–20 min download + ~5 min query`}),`. Re-running the same release later: `,(0,w.jsx)(`span`,{className:`text-strong`,children:`skips download, just re-queries`}),` (~5 min).`]})]})]})]}),l()?null:W?(0,w.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,w.jsx)(`input`,{type:`text`,className:`flex-1 min-w-[240px] rounded border border-strong bg-transparent px-2.5 py-1.5 text-label-14 text-strong placeholder-mono-400 focus:border-mono-500 focus:outline-none`,placeholder:`cc-main-2026-jan-feb-mar`,value:H,onChange:e=>U(e.target.value),disabled:B,autoFocus:!0}),(0,w.jsx)(`button`,{type:`button`,className:`text-button-14 text-secondary hover:text-neutral focus:text-neutral focus:outline-none focus-visible:ring-1 focus-visible:ring-mono-500 rounded`,onClick:()=>{U(``),G(!1)},disabled:B,children:`Cancel`})]}):(0,w.jsx)(`button`,{type:`button`,className:`text-button-14 text-secondary hover:text-neutral focus:text-neutral focus:outline-none focus-visible:ring-1 focus-visible:ring-mono-500 rounded`,onClick:()=>G(!0),disabled:B,children:`Use a different release →`})]}),!e?.duckdbInstalled&&(0,w.jsx)(`p`,{className:`text-copy-14 text-secondary mt-2`,children:`Install DuckDB first to enable sync.`})]})]}),(0,w.jsxs)(`details`,{className:`page-section-divider group`,children:[(0,w.jsx)(`summary`,{className:`cursor-pointer text-label-14-strong text-secondary hover:text-strong focus:outline-none focus-visible:ring-1 focus-visible:ring-mono-500 rounded`,children:`Technical details and cache`}),(0,w.jsxs)(`div`,{className:`mt-4`,children:[(0,w.jsx)(`p`,{className:`text-copy-14 text-secondary mb-3`,children:`Cached releases support project re-extracts. Pruning a release does not remove saved backlink results.`}),(0,w.jsx)(`div`,{className:`overflow-x-auto`,children:(0,w.jsxs)(`table`,{className:`w-full text-label-14`,children:[(0,w.jsx)(`thead`,{children:(0,w.jsxs)(`tr`,{className:`border-b border-base text-left text-label-12 normal-case text-faint`,children:[(0,w.jsx)(`th`,{className:`px-4 py-2 text-label-12-strong`,children:`Release`}),(0,w.jsx)(`th`,{className:`px-4 py-2 text-label-12-strong`,children:`Sync status`}),(0,w.jsx)(`th`,{className:`px-4 py-2 text-right text-label-12-strong`,children:`Size`}),(0,w.jsx)(`th`,{className:`px-4 py-2 text-label-12-strong`,children:`Last used`}),!l()&&(0,w.jsx)(`th`,{className:`px-4 py-2 text-label-12-strong sr-only`,children:`Actions`})]})}),(0,w.jsxs)(`tbody`,{children:[M.map(e=>(0,w.jsxs)(`tr`,{className:`border-b border-mono-900 last:border-0`,children:[(0,w.jsx)(`td`,{className:`px-4 py-2 text-strong`,children:(0,w.jsx)(`code`,{children:e.release})}),(0,w.jsx)(`td`,{className:`px-4 py-2`,children:e.syncStatus?(0,w.jsx)(g,{tone:O(e.syncStatus),children:e.syncStatus}):(0,w.jsx)(`span`,{className:`text-faint`,children:`—`})}),(0,w.jsx)(`td`,{className:`px-4 py-2 text-right text-secondary tabular-nums`,children:E(e.bytes)}),(0,w.jsx)(`td`,{className:`px-4 py-2 text-secondary`,children:D(e.lastUsedAt)}),!l()&&(0,w.jsx)(`td`,{className:`px-4 py-2 text-right`,children:(0,w.jsxs)(`div`,{className:`inline-flex items-center gap-1`,children:[(0,w.jsxs)(h,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>{$(e.release)},children:[(0,w.jsx)(r,{className:`h-4 w-4 mr-1.5`,"aria-hidden":!0}),`Prune`]}),(0,w.jsx)(S,{label:`What does Prune do?`,placement:`top`,children:`Deletes the ~16 GB cache for this release from disk. Backlink results already in SQLite remain untouched. To re-run extracts against this release, you’d have to sync it again (another ~16 GB download).`})]})})]},e.release)),M.length===0&&(0,w.jsx)(`tr`,{children:(0,w.jsx)(`td`,{className:`px-4 py-4 text-label-14 text-muted`,colSpan:l()?4:5,children:`No cached releases on this machine. If you ran a sync from a different machine (or deleted the cache), the backlink data is still in the database — but you’ll need to re-sync a release to run new extracts.`})})]})]})}),(0,w.jsx)(`p`,{className:`mt-3 text-copy-13 text-muted`,children:`Common Crawl files are stored locally. DuckDB reads them; Canonry stores results in its normal database.`})]})]}),A.length>1&&(0,w.jsxs)(`section`,{className:`page-section`,children:[(0,w.jsx)(`div`,{className:`section-head section-head-inline`,children:(0,w.jsx)(`div`,{children:(0,w.jsx)(`h2`,{children:`Past release syncs`})})}),(0,w.jsx)(x,{className:`surface-card overflow-hidden`,children:(0,w.jsxs)(`table`,{className:`w-full text-label-14`,children:[(0,w.jsx)(`thead`,{children:(0,w.jsxs)(`tr`,{className:`border-b border-base text-left text-label-12 normal-case text-faint`,children:[(0,w.jsx)(`th`,{className:`px-4 py-2 text-label-12-strong`,children:`Release`}),(0,w.jsx)(`th`,{className:`px-4 py-2 text-label-12-strong`,children:`Status`}),(0,w.jsx)(`th`,{className:`px-4 py-2 text-right text-label-12-strong`,children:`Projects`}),(0,w.jsx)(`th`,{className:`px-4 py-2 text-right text-label-12-strong`,children:`Rows`}),(0,w.jsx)(`th`,{className:`px-4 py-2 text-label-12-strong`,children:`Finished`})]})}),(0,w.jsx)(`tbody`,{children:A.map(e=>(0,w.jsxs)(`tr`,{className:`border-b border-mono-900 last:border-0`,children:[(0,w.jsx)(`td`,{className:`px-4 py-2 text-strong`,children:(0,w.jsx)(`code`,{children:e.release})}),(0,w.jsx)(`td`,{className:`px-4 py-2`,children:(0,w.jsx)(g,{tone:O(e.status),children:e.status})}),(0,w.jsx)(`td`,{className:`px-4 py-2 text-right text-secondary tabular-nums`,children:e.projectsProcessed??`—`}),(0,w.jsx)(`td`,{className:`px-4 py-2 text-right text-secondary tabular-nums`,children:e.domainsDiscovered??`—`}),(0,w.jsx)(`td`,{className:`px-4 py-2 text-secondary`,children:D(e.queryFinishedAt??e.updatedAt)})]},e.id))})]})})]})]})}export{k as BacklinksPage};
1
+ import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{H as t,U as n,c as r,ft as i,s as a,w as o}from"./vendor-lucide-iE5MEh2-.js";import{r as s}from"./vendor-markdown-BBGbNklj.js";import{$ as c,At as l,H as u,J as d,U as f,o as p,q as m,r as h,t as g,wt as _,xn as v,zt as y}from"./ToneBadge-CWufDJgM.js";import{t as b}from"./async-handler-Bj3TnIRw.js";import{t as x}from"./card-CI9gz2Hb.js";import{t as S}from"./Hint-3TTi0MgX.js";var C=e(i(),1),w=s(),T=`https://commoncrawl.org/web-graphs`;function E(e){return e==null?`—`:e>=0xe8d4a51000?`${(e/0xe8d4a51000).toFixed(1)} TB`:e>=1e9?`${(e/1e9).toFixed(1)} GB`:e>=1e6?`${(e/1e6).toFixed(1)} MB`:e>=1e3?`${(e/1e3).toFixed(1)} KB`:`${e} B`}function D(e){if(!e)return`—`;let t=Date.now()-new Date(e).getTime(),n=Math.floor(t/6e4);if(n<1)return`just now`;if(n<60)return`${n}m ago`;let r=Math.floor(n/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}function O(e){switch(e){case`ready`:return`positive`;case`failed`:return`negative`;case`downloading`:case`querying`:case`queued`:return`caution`}}function k(){let[e,i]=(0,C.useState)(null),[s,k]=(0,C.useState)(null),[A,j]=(0,C.useState)([]),[M,N]=(0,C.useState)([]),[P,F]=(0,C.useState)(null),[I,L]=(0,C.useState)(!0),[R,z]=(0,C.useState)(!1),[B,V]=(0,C.useState)(!1),[H,U]=(0,C.useState)(``),[W,G]=(0,C.useState)(!1),[K,q]=(0,C.useState)(null),[J,Y]=(0,C.useState)(null),X=(0,C.useCallback)(async()=>{L(!0),q(null);try{let[e,t,n,r,a]=await Promise.all([u(),d().catch(()=>null),c().catch(()=>[]),f().catch(()=>[]),m().catch(()=>null)]);i(e),k(t),j(n),N(r),F(a)}catch(e){q(e instanceof Error?e.message:`Failed to load backlinks status`)}finally{L(!1)}},[]);(0,C.useEffect)(()=>{X()},[X]);async function Z(){z(!0),q(null),Y(null);try{let e=await _();Y(e.alreadyPresent?`DuckDB already installed (${e.version}).`:`Installed DuckDB ${e.version}.`),await X()}catch(e){q(e instanceof Error?e.message:`Failed to install DuckDB`)}finally{z(!1)}}async function Q(){let e=H.trim()||void 0;V(!0),q(null),Y(null);try{let t=await v(e);Y(e?`Queued sync for ${t.release}. Download + query runs in the background.`:`Queued sync for auto-discovered release ${t.release}. Download + query runs in the background.`),U(``),G(!1),await X()}catch(e){e instanceof p&&e.code===`MISSING_DEPENDENCY`?q(`DuckDB is not installed. Install it first.`):q(e instanceof Error?e.message:`Failed to trigger sync`)}finally{V(!1)}}async function $(e){q(null),Y(null);try{await y(e),Y(`Pruned cached release ${e}.`),await X()}catch(e){q(e instanceof Error?e.message:`Failed to prune release`)}}let ee=s?.status===`ready`&&M.every(e=>e.release!==s.release);return(0,w.jsxs)(`div`,{className:`page-container`,children:[(0,w.jsx)(`div`,{className:`page-header`,children:(0,w.jsxs)(`div`,{className:`page-header-left`,children:[(0,w.jsx)(`h1`,{className:`page-title`,children:`Backlink data`}),(0,w.jsx)(`p`,{className:`page-subtitle`,children:`Manage the shared backlink source and review its latest data.`})]})}),K&&(0,w.jsx)(x,{className:`surface-card p-4 mb-4 bg-negative-soft`,children:(0,w.jsx)(`p`,{className:`text-copy-14 text-negative`,children:K})}),J&&(0,w.jsx)(x,{className:`surface-card p-4 mb-4 bg-positive-soft`,children:(0,w.jsx)(`p`,{className:`text-copy-14 text-positive`,children:J})}),(0,w.jsxs)(`section`,{className:`page-section`,children:[(0,w.jsxs)(`div`,{className:`section-head section-head-inline`,children:[(0,w.jsx)(`div`,{children:(0,w.jsx)(`h2`,{children:`Backlink source`})}),e?.duckdbInstalled?(0,w.jsx)(g,{tone:`positive`,children:`Installed`}):(0,w.jsx)(g,{tone:`caution`,children:`Not installed`})]}),(0,w.jsx)(x,{className:`surface-card p-4`,children:I?(0,w.jsx)(`p`,{className:`text-copy-14 text-muted`,children:`Checking…`}):e?.duckdbInstalled?(0,w.jsx)(`p`,{className:`text-copy-14 text-secondary`,children:`Ready to sync a Common Crawl release.`}):(0,w.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,w.jsx)(`p`,{className:`text-copy-14 text-secondary`,children:`Install the local query engine to enable release syncs.`}),!l()&&(0,w.jsxs)(h,{type:`button`,size:`sm`,disabled:R,onClick:b(Z),children:[(0,w.jsx)(n,{className:`h-4 w-4 mr-1.5`,"aria-hidden":!0}),R?`Installing…`:`Install DuckDB`]})]})})]}),(0,w.jsxs)(`section`,{className:`page-section`,children:[(0,w.jsxs)(`div`,{className:`section-head section-head-inline`,children:[(0,w.jsx)(`div`,{children:(0,w.jsxs)(`h2`,{className:`flex items-center gap-2`,children:[`Release sync`,(0,w.jsx)(S,{label:`What is a release sync?`,children:`A release sync downloads one Common Crawl dump (~16 GB) and extracts backlinks for every project in this workspace in one pass. This is the heavy job — subsequent per-project re-runs skip the download and just re-query the cached files.`})]})}),s&&(0,w.jsx)(g,{tone:O(s.status),children:s.status})]}),(0,w.jsxs)(`div`,{className:`space-y-4`,children:[s?(0,w.jsxs)(`div`,{className:`space-y-2 text-label-14`,children:[(0,w.jsxs)(`p`,{className:`text-strong`,children:[`Release `,(0,w.jsx)(`code`,{className:`text-neutral`,children:s.release})]}),s.phaseDetail&&(0,w.jsx)(`p`,{className:`text-secondary`,children:s.phaseDetail}),(0,w.jsxs)(`div`,{className:`grid grid-cols-2 md:grid-cols-4 gap-4 text-label-12 text-muted pt-2`,children:[(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`p`,{className:`text-faint normal-case text-label-12`,children:`Projects`}),(0,w.jsx)(`p`,{className:`text-neutral mt-0.5`,children:s.projectsProcessed??`—`})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsxs)(`p`,{className:`text-faint normal-case text-label-12 flex items-center gap-1`,children:[`Rows`,(0,w.jsx)(S,{label:`What are rows?`,children:`Total number of (project, referring domain) pairs persisted in SQLite from this sync, across every project in the workspace.`})]}),(0,w.jsx)(`p`,{className:`text-neutral mt-0.5`,children:s.domainsDiscovered??`—`})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`p`,{className:`text-faint normal-case text-label-12`,children:`Started`}),(0,w.jsx)(`p`,{className:`text-neutral mt-0.5`,children:D(s.downloadStartedAt??s.createdAt)})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`p`,{className:`text-faint normal-case text-label-12`,children:`Finished`}),(0,w.jsx)(`p`,{className:`text-neutral mt-0.5`,children:D(s.queryFinishedAt)})]})]}),s.error&&(0,w.jsx)(`p`,{className:`text-copy-14 text-negative-400 pt-2`,children:s.error})]}):(0,w.jsx)(`p`,{className:`text-copy-14 text-muted`,children:`No release sync has run in this workspace yet.`}),ee&&(0,w.jsx)(`div`,{className:`mt-4 rounded border border-caution-800/60 bg-caution-950/20 p-3`,children:(0,w.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,w.jsx)(a,{className:`h-4 w-4 text-caution-400 shrink-0 mt-0.5`,"aria-hidden":!0}),(0,w.jsxs)(`div`,{className:`text-label-14 text-neutral`,children:[(0,w.jsx)(`p`,{className:`text-copy-14-strong text-caution-200`,children:`Cached files for this release are missing.`}),(0,w.jsx)(`p`,{className:`mt-1 text-secondary`,children:`Sync this release again, or sync the newest release, before refreshing individual projects.`})]})]})}),(0,w.jsxs)(`div`,{className:`space-y-3`,children:[(0,w.jsxs)(`div`,{className:`flex items-start justify-between gap-3 mb-3`,children:[(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`p`,{className:`text-label-12 normal-case text-muted`,children:`Auto-detected release`}),P?(0,w.jsxs)(`p`,{className:`text-copy-14 text-strong mt-0.5`,children:[(0,w.jsx)(`code`,{className:`text-heading`,children:P.release}),(0,w.jsxs)(`span`,{className:`ml-2 text-label-12 text-muted`,children:[`Vertex `,E(P.vertexBytes),`, edges `,E(P.edgesBytes)]})]}):(0,w.jsx)(`p`,{className:`text-copy-14 text-muted mt-0.5`,children:I?`Checking Common Crawl…`:`Could not find a release. Choose one below.`}),(0,w.jsxs)(`a`,{href:T,target:`_blank`,rel:`noopener noreferrer`,className:`mt-1 inline-flex items-center gap-1 text-label-12 text-secondary hover:text-strong focus:text-strong focus:outline-none focus-visible:ring-1 focus-visible:ring-mono-500 rounded`,children:[`Browse all Common Crawl web-graph releases`,(0,w.jsx)(t,{className:`h-3 w-3`,"aria-hidden":!0})]})]}),!l()&&(0,w.jsxs)(`div`,{className:`flex items-center gap-2 shrink-0`,children:[(0,w.jsxs)(h,{type:`button`,size:`sm`,disabled:B||!e?.duckdbInstalled||!P&&!H.trim(),onClick:b(Q),children:[(0,w.jsx)(o,{className:`h-4 w-4 mr-1.5`,"aria-hidden":!0}),B?`Queuing…`:`Run sync`]}),(0,w.jsxs)(S,{label:`What does Run sync do?`,children:[(0,w.jsxs)(`span`,{className:`block`,children:[`Downloads the auto-detected (or chosen) Common Crawl release (~16 GB) to`,` `,(0,w.jsx)(`code`,{className:`text-neutral`,children:`~/.canonry/cache/commoncrawl/`}),`, then runs a single DuckDB query that extracts referring domains for every project in this workspace.`]}),(0,w.jsxs)(`span`,{className:`mt-2 block text-secondary`,children:[`First time for a release: `,(0,w.jsx)(`span`,{className:`text-strong`,children:`~10–20 min download + ~5 min query`}),`. Re-running the same release later: `,(0,w.jsx)(`span`,{className:`text-strong`,children:`skips download, just re-queries`}),` (~5 min).`]})]})]})]}),l()?null:W?(0,w.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,w.jsx)(`input`,{type:`text`,className:`flex-1 min-w-[240px] rounded border border-strong bg-transparent px-2.5 py-1.5 text-label-14 text-strong placeholder-mono-400 focus:border-mono-500 focus:outline-none`,placeholder:`cc-main-2026-jan-feb-mar`,value:H,onChange:e=>U(e.target.value),disabled:B,autoFocus:!0}),(0,w.jsx)(`button`,{type:`button`,className:`text-button-14 text-secondary hover:text-neutral focus:text-neutral focus:outline-none focus-visible:ring-1 focus-visible:ring-mono-500 rounded`,onClick:()=>{U(``),G(!1)},disabled:B,children:`Cancel`})]}):(0,w.jsx)(`button`,{type:`button`,className:`text-button-14 text-secondary hover:text-neutral focus:text-neutral focus:outline-none focus-visible:ring-1 focus-visible:ring-mono-500 rounded`,onClick:()=>G(!0),disabled:B,children:`Use a different release →`})]}),!e?.duckdbInstalled&&(0,w.jsx)(`p`,{className:`text-copy-14 text-secondary mt-2`,children:`Install DuckDB first to enable sync.`})]})]}),(0,w.jsxs)(`details`,{className:`page-section-divider group`,children:[(0,w.jsx)(`summary`,{className:`cursor-pointer text-label-14-strong text-secondary hover:text-strong focus:outline-none focus-visible:ring-1 focus-visible:ring-mono-500 rounded`,children:`Technical details and cache`}),(0,w.jsxs)(`div`,{className:`mt-4`,children:[(0,w.jsx)(`p`,{className:`text-copy-14 text-secondary mb-3`,children:`Cached releases support project re-extracts. Pruning a release does not remove saved backlink results.`}),(0,w.jsx)(`div`,{className:`overflow-x-auto`,children:(0,w.jsxs)(`table`,{className:`w-full text-label-14`,children:[(0,w.jsx)(`thead`,{children:(0,w.jsxs)(`tr`,{className:`border-b border-base text-left text-label-12 normal-case text-faint`,children:[(0,w.jsx)(`th`,{className:`px-4 py-2 text-label-12-strong`,children:`Release`}),(0,w.jsx)(`th`,{className:`px-4 py-2 text-label-12-strong`,children:`Sync status`}),(0,w.jsx)(`th`,{className:`px-4 py-2 text-right text-label-12-strong`,children:`Size`}),(0,w.jsx)(`th`,{className:`px-4 py-2 text-label-12-strong`,children:`Last used`}),!l()&&(0,w.jsx)(`th`,{className:`px-4 py-2 text-label-12-strong sr-only`,children:`Actions`})]})}),(0,w.jsxs)(`tbody`,{children:[M.map(e=>(0,w.jsxs)(`tr`,{className:`border-b border-mono-900 last:border-0`,children:[(0,w.jsx)(`td`,{className:`px-4 py-2 text-strong`,children:(0,w.jsx)(`code`,{children:e.release})}),(0,w.jsx)(`td`,{className:`px-4 py-2`,children:e.syncStatus?(0,w.jsx)(g,{tone:O(e.syncStatus),children:e.syncStatus}):(0,w.jsx)(`span`,{className:`text-faint`,children:`—`})}),(0,w.jsx)(`td`,{className:`px-4 py-2 text-right text-secondary tabular-nums`,children:E(e.bytes)}),(0,w.jsx)(`td`,{className:`px-4 py-2 text-secondary`,children:D(e.lastUsedAt)}),!l()&&(0,w.jsx)(`td`,{className:`px-4 py-2 text-right`,children:(0,w.jsxs)(`div`,{className:`inline-flex items-center gap-1`,children:[(0,w.jsxs)(h,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>{$(e.release)},children:[(0,w.jsx)(r,{className:`h-4 w-4 mr-1.5`,"aria-hidden":!0}),`Prune`]}),(0,w.jsx)(S,{label:`What does Prune do?`,placement:`top`,children:`Deletes the ~16 GB cache for this release from disk. Backlink results already in SQLite remain untouched. To re-run extracts against this release, you’d have to sync it again (another ~16 GB download).`})]})})]},e.release)),M.length===0&&(0,w.jsx)(`tr`,{children:(0,w.jsx)(`td`,{className:`px-4 py-4 text-label-14 text-muted`,colSpan:l()?4:5,children:`No cached releases on this machine. If you ran a sync from a different machine (or deleted the cache), the backlink data is still in the database — but you’ll need to re-sync a release to run new extracts.`})})]})]})}),(0,w.jsx)(`p`,{className:`mt-3 text-copy-13 text-muted`,children:`Common Crawl files are stored locally. DuckDB reads them; Canonry stores results in its normal database.`})]})]}),A.length>1&&(0,w.jsxs)(`section`,{className:`page-section`,children:[(0,w.jsx)(`div`,{className:`section-head section-head-inline`,children:(0,w.jsx)(`div`,{children:(0,w.jsx)(`h2`,{children:`Past release syncs`})})}),(0,w.jsx)(x,{className:`surface-card overflow-hidden`,children:(0,w.jsxs)(`table`,{className:`w-full text-label-14`,children:[(0,w.jsx)(`thead`,{children:(0,w.jsxs)(`tr`,{className:`border-b border-base text-left text-label-12 normal-case text-faint`,children:[(0,w.jsx)(`th`,{className:`px-4 py-2 text-label-12-strong`,children:`Release`}),(0,w.jsx)(`th`,{className:`px-4 py-2 text-label-12-strong`,children:`Status`}),(0,w.jsx)(`th`,{className:`px-4 py-2 text-right text-label-12-strong`,children:`Projects`}),(0,w.jsx)(`th`,{className:`px-4 py-2 text-right text-label-12-strong`,children:`Rows`}),(0,w.jsx)(`th`,{className:`px-4 py-2 text-label-12-strong`,children:`Finished`})]})}),(0,w.jsx)(`tbody`,{children:A.map(e=>(0,w.jsxs)(`tr`,{className:`border-b border-mono-900 last:border-0`,children:[(0,w.jsx)(`td`,{className:`px-4 py-2 text-strong`,children:(0,w.jsx)(`code`,{children:e.release})}),(0,w.jsx)(`td`,{className:`px-4 py-2`,children:(0,w.jsx)(g,{tone:O(e.status),children:e.status})}),(0,w.jsx)(`td`,{className:`px-4 py-2 text-right text-secondary tabular-nums`,children:e.projectsProcessed??`—`}),(0,w.jsx)(`td`,{className:`px-4 py-2 text-right text-secondary tabular-nums`,children:e.domainsDiscovered??`—`}),(0,w.jsx)(`td`,{className:`px-4 py-2 text-secondary`,children:D(e.queryFinishedAt??e.updatedAt)})]},e.id))})]})})]})]})}export{k as BacklinksPage};
@@ -1,3 +1,3 @@
1
- import{r as e}from"./vendor-markdown-BBGbNklj.js";import{c as t,h as n,i as r,p as i,r as a,s as o,t as s,u as c}from"./vendor-recharts-ColROAYR.js";import{Wc as l,bc as u}from"./ToneBadge-BXxSLZUc.js";var d={ambiguous:`Property identity unverified`},f=`No answer could be tied to one property`;function p(e){return e.denominator===null||e.denominator===void 0||e.unattributed===void 0||e.unattributed<=0?null:`${e.unattributed} of ${e.denominator+e.unattributed} answers could not be tied to one property`}function m(e){if(e.denominator===null||e.denominator===void 0||e.unchecked===void 0||e.unchecked<=0)return null;let t=e.denominator+e.unchecked+(e.citationNotMeasured??0);return`${e.unchecked} of ${t} ${t===1?`answer`:`answers`} had sources that could not be checked`}var h=`The engine returns no sources, so whether it cites you is not measured.`;function g(e){if(e.denominator===null||e.denominator===void 0||e.citationNotMeasured===void 0||e.citationNotMeasured<=0)return null;let t=e.denominator+(e.unchecked??0)+e.citationNotMeasured;return`${e.citationNotMeasured} of ${t} ${t===1?`answer`:`answers`} came from engines that return no sources`}var _={label:`Not measured`,signal:`Citation not measured`,timeline:`citation not measured`,sources:h},v=function(e){return e.Clicks=`clicks`,e.Impressions=`impressions`,e.CTR=`ctr`,e.Position=`position`,e}({}),y={clicks:`Clicks`,impressions:`Impressions`,ctr:`CTR`,position:`Position`},b=u;function x(e){return e.endsWith(`%`)?{figure:e.slice(0,-1),sign:`%`}:{figure:e,sign:``}}function S(e,t){if(t!==`cited`)return p(e);let n=[m(e),g(e)].filter(e=>e!==null);return n.length===0?null:n.join(`; `)}function C(e,t){let n=S(e,t);if(n===null)return null;let r=t===`cited`?[...e.unchecked?[`${e.unchecked} unchecked`]:[],...e.citationNotMeasured?[`${e.citationNotMeasured} not measured`]:[]]:e.unattributed?[`${e.unattributed} unattributed`]:[],i=t===`cited`?(e.unchecked??0)+(e.citationNotMeasured??0):e.unattributed??0;if(r.length===0)return null;let a=r.join(`, `);return{label:a,text:`${a}. ${n}, so this rate leaves ${i===1?`it`:`them`} out.`}}function w(e,t){let n=l(e);switch(t){case`cited`:return`${n} cited (any page)`;case`emerging`:return`${n} newly cited (any page)`;case`lost`:return`${n} citation lost (any page)`;case`not-cited`:return`${n} not cited (any page)`;case`not-measured`:return`${n} citation not measured`;case`pending`:return`Pending`}}var T={cited:`Cited`,"not-cited":`Not cited`,"not-measured":_.label};function E(e){let t=[];if(e.message&&t.push(e.message),e.providers)for(let[n,r]of Object.entries(e.providers)){let e=`[${n}] ${r.message}`;r.raw===void 0?t.push(e):t.push(`${e}\n\n${JSON.stringify(r.raw,null,2)}`)}return t.length>0?t.join(`
1
+ import{r as e}from"./vendor-markdown-BBGbNklj.js";import{c as t,h as n,i as r,p as i,r as a,s as o,t as s,u as c}from"./vendor-recharts-ColROAYR.js";import{Wc as l,bc as u}from"./ToneBadge-CWufDJgM.js";var d={ambiguous:`Property identity unverified`},f=`No answer could be tied to one property`;function p(e){return e.denominator===null||e.denominator===void 0||e.unattributed===void 0||e.unattributed<=0?null:`${e.unattributed} of ${e.denominator+e.unattributed} answers could not be tied to one property`}function m(e){if(e.denominator===null||e.denominator===void 0||e.unchecked===void 0||e.unchecked<=0)return null;let t=e.denominator+e.unchecked+(e.citationNotMeasured??0);return`${e.unchecked} of ${t} ${t===1?`answer`:`answers`} had sources that could not be checked`}var h=`The engine returns no sources, so whether it cites you is not measured.`;function g(e){if(e.denominator===null||e.denominator===void 0||e.citationNotMeasured===void 0||e.citationNotMeasured<=0)return null;let t=e.denominator+(e.unchecked??0)+e.citationNotMeasured;return`${e.citationNotMeasured} of ${t} ${t===1?`answer`:`answers`} came from engines that return no sources`}var _={label:`Not measured`,signal:`Citation not measured`,timeline:`citation not measured`,sources:h},v=function(e){return e.Clicks=`clicks`,e.Impressions=`impressions`,e.CTR=`ctr`,e.Position=`position`,e}({}),y={clicks:`Clicks`,impressions:`Impressions`,ctr:`CTR`,position:`Position`},b=u;function x(e){return e.endsWith(`%`)?{figure:e.slice(0,-1),sign:`%`}:{figure:e,sign:``}}function S(e,t){if(t!==`cited`)return p(e);let n=[m(e),g(e)].filter(e=>e!==null);return n.length===0?null:n.join(`; `)}function C(e,t){let n=S(e,t);if(n===null)return null;let r=t===`cited`?[...e.unchecked?[`${e.unchecked} unchecked`]:[],...e.citationNotMeasured?[`${e.citationNotMeasured} not measured`]:[]]:e.unattributed?[`${e.unattributed} unattributed`]:[],i=t===`cited`?(e.unchecked??0)+(e.citationNotMeasured??0):e.unattributed??0;if(r.length===0)return null;let a=r.join(`, `);return{label:a,text:`${a}. ${n}, so this rate leaves ${i===1?`it`:`them`} out.`}}function w(e,t){let n=l(e);switch(t){case`cited`:return`${n} cited (any page)`;case`emerging`:return`${n} newly cited (any page)`;case`lost`:return`${n} citation lost (any page)`;case`not-cited`:return`${n} not cited (any page)`;case`not-measured`:return`${n} citation not measured`;case`pending`:return`Pending`}}var T={cited:`Cited`,"not-cited":`Not cited`,"not-measured":_.label};function E(e){let t=[];if(e.message&&t.push(e.message),e.providers)for(let[n,r]of Object.entries(e.providers)){let e=`[${n}] ${r.message}`;r.raw===void 0?t.push(e):t.push(`${e}\n\n${JSON.stringify(r.raw,null,2)}`)}return t.length>0?t.join(`
2
2
 
3
3
  `):`Run failed.`}function D(e){return e.split(`-`).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}function O(e,t,n=new Date){let r=new Date(e);if(Number.isNaN(r.getTime()))return e;let i=r.toLocaleTimeString(`en-US`,{hour:`numeric`,minute:`2-digit`});return t&&new Date(t).toDateString()===r.toDateString()?i:`${k(e,n)}, ${i}`}function k(e,t=new Date){let n=new Date(e);return Number.isNaN(n.getTime())?e:n.getFullYear()===t.getFullYear()?A(e):n.toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`})}function A(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleDateString(`en-US`,{month:`short`,day:`numeric`})}function j(e){if(!e)return`—`;try{return new Date(e).toLocaleString()}catch{return e}}function M(e){return e===null?`Unknown`:e?`Pass`:`Fail`}function N(e){return e===0?`12:00 AM`:e<12?`${e}:00 AM`:e===12?`12:00 PM`:`${e-12}:00 PM`}function P(e,t){return e===`twice-daily`?`twice-daily`:e.startsWith(`weekly@`)?`${e}@${t}`:`daily@${t}`}function F(e,t){if(!e)return{freq:`custom`,hour:6,customCron:t};if(e===`twice-daily`)return{freq:`twice-daily`,hour:6,customCron:``};let n=e.match(/^daily(?:@(\d+))?$/);if(n)return{freq:`daily`,hour:n[1]?parseInt(n[1]):6,customCron:``};let r=e.match(/^(weekly@(?:mon|tue|wed|thu|fri|sat|sun))(?:@(\d+))?$/);return r?{freq:r[1],hour:r[2]?parseInt(r[2]):6,customCron:``}:{freq:`custom`,hour:6,customCron:t}}function I(e,t,n){let r=n===`UTC`?`UTC`:n.split(`/`).pop()?.replace(/_/g,` `)??n;if(!e)return`Custom: ${t} · ${r}`;if(e===`twice-daily`)return`Twice a day (6am & 6pm) · ${r}`;let i=e.match(/^daily(?:@(\d+))?$/);if(i)return`Every day at ${N(i[1]?parseInt(i[1]):6)} · ${r}`;let a=e.match(/^weekly@(mon|tue|wed|thu|fri|sat|sun)(?:@(\d+))?$/);if(a){let e={mon:`Monday`,tue:`Tuesday`,wed:`Wednesday`,thu:`Thursday`,fri:`Friday`,sat:`Saturday`,sun:`Sunday`},t=a[2]?parseInt(a[2]):6;return`Every ${e[a[1]]} at ${N(t)} · ${r}`}return`${e} · ${r}`}function L(e,t){return t&&t!==e?`${e} · ${t}`:e}function R(){let e=Intl.DateTimeFormat().resolvedOptions().timeZone,t=new Intl.DateTimeFormat(`en-US`,{timeZoneName:`short`}).formatToParts().find(e=>e.type===`timeZoneName`)?.value;return L(e,t)}var z=e(),B={contentStyle:{backgroundColor:`var(--chart-tooltip-bg, #0a0a0a)`,border:`none`,borderRadius:`var(--radius-material-tooltip)`,boxShadow:`var(--shadow-material-tooltip)`,fontSize:13,lineHeight:`18px`,fontWeight:400},labelStyle:{color:`var(--chart-tooltip-label, #ededed)`},itemStyle:{color:`var(--chart-tooltip-item, #a1a1a1)`}},V={fill:`var(--chart-neutral-text-dim, #a1a1a1)`,fontSize:12},H=`var(--chart-grid, #2e2e2e)`,U=`var(--chart-axis, #2e2e2e)`,W=[`var(--chart-series-1, #34d399)`,`var(--chart-series-2, #60a5fa)`,`var(--chart-series-3, #f472b6)`,`var(--chart-series-4, #facc15)`,`var(--chart-series-5, #a78bfa)`,`var(--chart-series-6, #fb923c)`,`var(--chart-series-7, #22d3ee)`,`var(--chart-series-8, #f87171)`],G={gemini:`#60a5fa`,openai:`#34d399`,claude:`#fb923c`,perplexity:`#22d3ee`,muse:`#818cf8`,local:`#a78bfa`};function K(e,t=0){return G[e]??W[t%W.length]}var q={text:`var(--chart-neutral-text, #a1a1a1)`,textDim:`var(--chart-neutral-text-dim, #a1a1a1)`,textFaint:`var(--chart-neutral-text-faint, #7d7d7d)`,surface:`var(--chart-neutral-surface, #2e2e2e)`,trackSubtle:`var(--chart-neutral-track-subtle, rgb(255 255 255 / 0.04))`,gridLine:`var(--chart-neutral-grid-line, rgb(255 255 255 / 0.06))`},J={positive:`var(--chart-tone-positive, #34d399)`,positiveDeep:`var(--chart-tone-positive-deep, #10b981)`,caution:`var(--chart-tone-caution, #fbbf24)`,negative:`var(--chart-tone-negative, #fb7185)`,neutral:`var(--chart-tone-neutral, #a1a1a1)`};function Y(e){return e}function X(e){let t=/^(\d{4})-(\d{2})-(\d{2})/.exec(e);return t?{year:Number(t[1]),month:Number(t[2]),day:Number(t[3])}:null}function Z(e){let t=String(e),n=X(t);return n?new Date(Date.UTC(n.year,n.month-1,n.day)).toLocaleDateString(void 0,{timeZone:`UTC`,month:`short`,day:`numeric`,year:`numeric`}):t}function Q(e){let t=X(String(e));return t?`${t.month}/${t.day}`:String(e)}function $(e){let t=X(String(e));return t?new Date(Date.UTC(t.year,t.month-1,t.day)).toLocaleDateString(void 0,{timeZone:`UTC`,month:`short`,day:`numeric`}):String(e)}function ee(e){return new Date(e).toLocaleDateString(void 0,{month:`short`,day:`numeric`,year:`numeric`})}function te(e){return new Date(e).toLocaleDateString(void 0,{month:`short`,day:`numeric`})}function ne(e){return new Date(e).getFullYear()}function re(e){let t=new Date(e);return`${t.getMonth()+1}/${t.getDate()}`}function ie({data:e,xKey:l,series:u,height:d=260,xTickFormatter:f,labelFormatter:p,onSelectX:m,selectedX:h,accessibilityLayer:g=!0,ariaLabel:_}){let v=[...new Set(u.map(e=>e.axisId))],y=new Map(u.map(e=>[e.label,e.formatValue])),b=e.map((t,n)=>{let r={...t};for(let t of u){if(!t.trend)continue;let i=t.trend.startIndex??0,a=t.trend.endIndex??e.length-1;n<i||n>a?r[`${t.dataKey}__trend`]=null:r[`${t.dataKey}__trend`]=a<=i?t.trend.start:t.trend.start+(t.trend.end-t.trend.start)*(n-i)/(a-i)}return r});return(0,z.jsx)(n,{width:`100%`,height:d,children:(0,z.jsxs)(s,{data:b,accessibilityLayer:g,"aria-label":_,margin:{top:8,right:8,bottom:4,left:0},onClick:m?e=>{e?.activeLabel!==void 0&&m(String(e.activeLabel))}:void 0,style:m?{cursor:`pointer`}:void 0,children:[(0,z.jsx)(t,{stroke:H,strokeDasharray:`3 3`,vertical:!1}),h!=null&&(0,z.jsx)(c,{x:h,yAxisId:v[0],stroke:q.text,strokeDasharray:`2 3`,strokeWidth:1}),(0,z.jsx)(r,{dataKey:l,tick:V,stroke:U,tickFormatter:f,minTickGap:24}),v.map((e,t)=>{let n=u.find(t=>t.axisId===e);return(0,z.jsx)(a,{yAxisId:e,orientation:t===1?`right`:`left`,hide:t>1,reversed:n.inverted??!1,domain:n.inverted?[1,`auto`]:[0,`auto`],tick:V,stroke:U,width:48,tickFormatter:n.formatValue},e)}),(0,z.jsx)(i,{...B,labelFormatter:e=>{let t=typeof e==`string`||typeof e==`number`?String(e):``;return p?p(t):t},formatter:(e,t)=>{let n=String(t??``);return typeof e==`number`?[y.get(n)?.(e)??e.toLocaleString(),n]:[String(e??``),n]}}),u.filter(e=>e.trend).map(e=>(0,z.jsx)(o,{yAxisId:e.axisId,dataKey:`${e.dataKey}__trend`,name:`${e.label} trend`,stroke:e.color,strokeWidth:1.5,strokeDasharray:`5 4`,strokeOpacity:.55,dot:!1,activeDot:!1,isAnimationActive:!1,legendType:`none`,tooltipType:`none`},`${e.dataKey}-trend`)),u.map(e=>(0,z.jsx)(o,{yAxisId:e.axisId,dataKey:e.dataKey,name:e.label,stroke:e.color,strokeWidth:2,dot:!1,activeDot:{r:3},connectNulls:e.connectNulls??!1,isAnimationActive:!1},e.dataKey))]})})}export{R as A,d as B,M as C,k as D,A as E,b as F,D as I,_ as L,I as M,w as N,O,x as P,h as R,C as S,N as T,K as _,W as a,v as b,ie as c,Q as d,ee as f,ne as g,Y as h,q as i,F as j,j as k,Z as l,re as m,V as n,J as o,te as p,H as r,B as s,U as t,$ as u,T as v,E as w,P as x,y,f as z};
@@ -1 +1 @@
1
- import{r as e}from"./vendor-markdown-BBGbNklj.js";import{t}from"./AuditHistoryPanel-GHjaPPXk.js";var n=e();function r(){return(0,n.jsxs)(`div`,{className:`page-container`,children:[(0,n.jsx)(`div`,{className:`page-header`,children:(0,n.jsxs)(`div`,{className:`page-header-left`,children:[(0,n.jsx)(`h1`,{className:`page-title`,children:`History`}),(0,n.jsx)(`p`,{className:`page-subtitle`,children:`Changes to projects and settings.`})]})}),(0,n.jsx)(t,{})]})}export{r as HistoryPage};
1
+ import{r as e}from"./vendor-markdown-BBGbNklj.js";import{t}from"./AuditHistoryPanel-6EnlABwM.js";var n=e();function r(){return(0,n.jsxs)(`div`,{className:`page-container`,children:[(0,n.jsx)(`div`,{className:`page-header`,children:(0,n.jsxs)(`div`,{className:`page-header-left`,children:[(0,n.jsx)(`h1`,{className:`page-title`,children:`History`}),(0,n.jsx)(`p`,{className:`page-subtitle`,children:`Changes to projects and settings.`})]})}),(0,n.jsx)(t,{})]})}export{r as HistoryPage};