@canonry/canonry 7.45.1 → 7.45.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -60,6 +60,8 @@ Connect the [Agent Plugin](docs/plugins.md) or [MCP adapter](docs/mcp.md) to you
60
60
  npm install -g @canonry/canonry
61
61
  ```
62
62
 
63
+ If you previously installed `@ainyc/canonry`, run `npm uninstall -g @ainyc/canonry` first to release the shared command names. Existing configuration and data in `~/.canonry` stay in place. New releases are published only under `@canonry`.
64
+
63
65
  2. Initialize Canonry.
64
66
 
65
67
  ```bash
@@ -28,7 +28,7 @@ import {
28
28
  persistSiteCrawlGraphLayout,
29
29
  prepareSiteCrawlGraphLayout,
30
30
  recordedSharePct
31
- } from "./chunk-EJTCZGU3.js";
31
+ } from "./chunk-T2MBKWUP.js";
32
32
  import {
33
33
  CanonryMcpToolNames,
34
34
  PACKAGE_VERSION,
@@ -240,7 +240,7 @@ import {
240
240
  webhookResponseReason,
241
241
  webhookTargetRefusalReason,
242
242
  writeAuditLog
243
- } from "./chunk-XFBY4DJV.js";
243
+ } from "./chunk-ZJUP7CHK.js";
244
244
  import {
245
245
  AGENT_MEMORY_VALUE_MAX_BYTES,
246
246
  AGENT_NONE,
@@ -886,10 +886,13 @@ function readEnvAnonymousId() {
886
886
  return raw.toLowerCase();
887
887
  }
888
888
  function getDeterministicAnonymousId() {
889
+ return hostDerivedId("canonry-anon");
890
+ }
891
+ function hostDerivedId(prefix) {
889
892
  try {
890
893
  const hostname = os2.hostname() || "";
891
894
  const mac = firstNonInternalMac();
892
- const seed = `canonry-anon:${hostname}:${mac}`;
895
+ const seed = `${prefix}:${hostname}:${mac}`;
893
896
  const hex = crypto.createHash("sha256").update(seed).digest("hex");
894
897
  const a = hex.slice(0, 8);
895
898
  const b = hex.slice(8, 12);
@@ -902,6 +905,11 @@ function getDeterministicAnonymousId() {
902
905
  return void 0;
903
906
  }
904
907
  }
908
+ var machineId;
909
+ function getMachineId() {
910
+ machineId ??= { value: hostDerivedId("canonry-machine") };
911
+ return machineId.value;
912
+ }
905
913
  function firstNonInternalMac() {
906
914
  try {
907
915
  const interfaces = os2.networkInterfaces();
@@ -982,9 +990,11 @@ function deliverEvent(event, properties, options, delivery = {}) {
982
990
  if (isGhostTelemetryEvent(event, properties)) return Promise.resolve();
983
991
  const anonymousId = getOrCreateAnonymousId();
984
992
  if (!anonymousId) return Promise.resolve();
993
+ const machine = getMachineId();
985
994
  const payload = {
986
995
  eventId: options?.eventId ?? crypto.randomUUID(),
987
996
  anonymousId,
997
+ ...machine ? { machineId: machine } : {},
988
998
  sessionId: SESSION_ID,
989
999
  source: options?.source ?? envSourceOverride() ?? CURRENT_SOURCE,
990
1000
  event,
@@ -8369,7 +8379,7 @@ function nonBlank(value) {
8369
8379
  return trimmed ? trimmed : void 0;
8370
8380
  }
8371
8381
  function resolveBuildCommit(env = process.env) {
8372
- const embedded = true ? "c90d2268388fe6f2d75f741feb52344ee37c1e77" : void 0;
8382
+ const embedded = true ? "c8ecbd8aa51cb4c578a6997eab80c3600073d4e8" : void 0;
8373
8383
  return nonBlank(embedded) ?? nonBlank(env.CANONRY_COMMIT);
8374
8384
  }
8375
8385
  function resolveInstanceIdentity(env = process.env) {
@@ -31,7 +31,7 @@ import {
31
31
  trackFeatureCompleted,
32
32
  trackIntegrationConnection,
33
33
  waitForServerRuntimeStartup
34
- } from "./chunk-GCBMBG2Y.js";
34
+ } from "./chunk-KVUBP25C.js";
35
35
  import {
36
36
  clearDashboardPassword,
37
37
  configExists,
@@ -122,7 +122,7 @@ import {
122
122
  rawEventSamples,
123
123
  readMarketCompetitorNames,
124
124
  runs
125
- } from "./chunk-XFBY4DJV.js";
125
+ } from "./chunk-ZJUP7CHK.js";
126
126
  import {
127
127
  AdsDeliverySnapshotStatuses,
128
128
  AdsHistoricalCampaignRollupStatuses,
@@ -586,7 +586,7 @@ function parseDemoTrustedProxies(values) {
586
586
  async function demoCommand(options) {
587
587
  const { host, port } = parseDemoListenOptions(options);
588
588
  const trustProxy = parseDemoTrustedProxies(options.trustProxy);
589
- const { createDemoServer } = await import("./demo-server-2ZRO7T3Z.js");
589
+ const { createDemoServer } = await import("./demo-server-M45RUD4A.js");
590
590
  const app = await createDemoServer({ trustProxy });
591
591
  let stopping = false;
592
592
  const stop = () => {
@@ -1000,7 +1000,7 @@ No DB writes performed. Re-run without --dry-run to apply.`);
1000
1000
  }
1001
1001
  }
1002
1002
  async function backfillInsightsCommand(project2, opts) {
1003
- const { IntelligenceService } = await import("./intelligence-service-JIFXDUUC.js");
1003
+ const { IntelligenceService } = await import("./intelligence-service-FWOKBYOM.js");
1004
1004
  const config = loadConfig();
1005
1005
  const db = createClient(config.database);
1006
1006
  migrate(db);
@@ -19378,7 +19378,7 @@ var SYSTEM_CLI_COMMANDS = [
19378
19378
  options: { access: stringOption() },
19379
19379
  run: async (input) => {
19380
19380
  if (input.positionals.length > 1) throw usageError("Expected at most one command group");
19381
- const [{ printCliCatalog }, { REGISTERED_CLI_COMMANDS: REGISTERED_CLI_COMMANDS2 }] = await Promise.all([import("./cli-catalog-E45QWSSR.js"), import("./cli-commands-I5YOZVO6.js")]);
19381
+ const [{ printCliCatalog }, { REGISTERED_CLI_COMMANDS: REGISTERED_CLI_COMMANDS2 }] = await Promise.all([import("./cli-catalog-E45QWSSR.js"), import("./cli-commands-E2TXR3OQ.js")]);
19382
19382
  printCliCatalog(REGISTERED_CLI_COMMANDS2, input.format, input.positionals[0], getString(input.values, "access"));
19383
19383
  }
19384
19384
  },
@@ -5,7 +5,7 @@ import {
5
5
  siteCrawlGraphNodes,
6
6
  siteCrawlPages,
7
7
  siteCrawlSnapshots
8
- } from "./chunk-XFBY4DJV.js";
8
+ } from "./chunk-ZJUP7CHK.js";
9
9
  import {
10
10
  SITE_CRAWL_GRAPH_MAX_EDGES,
11
11
  SITE_CRAWL_GRAPH_MAX_NODES,
@@ -2549,7 +2549,7 @@ var gaTrafficSnapshots = sqliteTable("ga_traffic_snapshots", {
2549
2549
  landingPage: text("landing_page").notNull(),
2550
2550
  /**
2551
2551
  * Canonicalized form of `landingPage` produced by `normalizeUrlPath()` in
2552
- * `@ainyc/canonry-contracts`. Nullable so existing rows survive migration;
2552
+ * `@canonry/canonry-contracts`. Nullable so existing rows survive migration;
2553
2553
  * new GA4 sync writes populate it. Per-page aggregations should
2554
2554
  * `GROUP BY COALESCE(landing_page_normalized, landing_page)` so
2555
2555
  * partially-backfilled state still aggregates correctly.
@@ -95335,7 +95335,7 @@ var IntelligenceService = class {
95335
95335
  /**
95336
95336
  * Re-classify each regression insight's severity using GSC traffic +
95337
95337
  * recurrence signals via the pure `classifyRegressionSeverity` primitive
95338
- * in @ainyc/canonry-intelligence. Non-regression insights are returned
95338
+ * in @canonry/canonry-intelligence. Non-regression insights are returned
95339
95339
  * untouched.
95340
95340
  */
95341
95341
  applySeverityTiering(rawInsights, excludeRunId, projectId) {
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  REGISTERED_CLI_COMMANDS
3
- } from "./chunk-PIL3NHER.js";
4
- import "./chunk-GCBMBG2Y.js";
3
+ } from "./chunk-MBOOXUPV.js";
4
+ import "./chunk-KVUBP25C.js";
5
5
  import "./chunk-5A57TIOK.js";
6
6
  import "./chunk-KZS5N3JH.js";
7
7
  import "./chunk-RB2F4D3Z.js";
8
- import "./chunk-EJTCZGU3.js";
8
+ import "./chunk-T2MBKWUP.js";
9
9
  import "./chunk-E7BG7QGP.js";
10
10
  import "./chunk-HGMYEDAQ.js";
11
- import "./chunk-XFBY4DJV.js";
11
+ import "./chunk-ZJUP7CHK.js";
12
12
  import "./chunk-6333IHPS.js";
13
13
  export {
14
14
  REGISTERED_CLI_COMMANDS
package/dist/cli.js CHANGED
@@ -13,7 +13,7 @@ import {
13
13
  buildSetupState,
14
14
  consumePendingServeHandoff,
15
15
  serveCommand
16
- } from "./chunk-PIL3NHER.js";
16
+ } from "./chunk-MBOOXUPV.js";
17
17
  import {
18
18
  checkLatestVersionForCli,
19
19
  cliRuntimeContext,
@@ -27,13 +27,13 @@ import {
27
27
  showFirstRunNotice,
28
28
  trackCliCommandFinished,
29
29
  trackEvent
30
- } from "./chunk-GCBMBG2Y.js";
30
+ } from "./chunk-KVUBP25C.js";
31
31
  import "./chunk-5A57TIOK.js";
32
32
  import {
33
33
  resolveCliAccess
34
34
  } from "./chunk-KZS5N3JH.js";
35
35
  import "./chunk-RB2F4D3Z.js";
36
- import "./chunk-EJTCZGU3.js";
36
+ import "./chunk-T2MBKWUP.js";
37
37
  import "./chunk-E7BG7QGP.js";
38
38
  import {
39
39
  CliError,
@@ -42,7 +42,7 @@ import {
42
42
  printCliError,
43
43
  usageError
44
44
  } from "./chunk-HGMYEDAQ.js";
45
- import "./chunk-XFBY4DJV.js";
45
+ import "./chunk-ZJUP7CHK.js";
46
46
  import {
47
47
  OperationAccesses
48
48
  } from "./chunk-6333IHPS.js";
@@ -5,7 +5,7 @@ import {
5
5
  computeFactorAverages,
6
6
  layoutSiteCrawlGraphInput,
7
7
  persistSiteCrawlGraphLayout
8
- } from "./chunk-EJTCZGU3.js";
8
+ } from "./chunk-T2MBKWUP.js";
9
9
  import {
10
10
  PACKAGE_VERSION,
11
11
  canonryMcpTools
@@ -86,7 +86,7 @@ import {
86
86
  siteCrawlPages,
87
87
  siteCrawlSnapshots,
88
88
  trafficSources
89
- } from "./chunk-XFBY4DJV.js";
89
+ } from "./chunk-ZJUP7CHK.js";
90
90
  import {
91
91
  RunKinds,
92
92
  SiteCrawlFetchStates,