@ainyc/canonry 4.142.0 → 4.144.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 (30) hide show
  1. package/assets/agent-workspace/skills/canonry/references/canonry-cli.md +33 -0
  2. package/assets/assets/{AuditHistoryPanel-CfaF5B_e.js → AuditHistoryPanel-DxRP9WsD.js} +1 -1
  3. package/assets/assets/{BacklinksPage-BIytWBpL.js → BacklinksPage-yiEbyV67.js} +1 -1
  4. package/assets/assets/{ChartPrimitives-0tQT6GE7.js → ChartPrimitives-D2hRlMHn.js} +1 -1
  5. package/assets/assets/{HistoryPage-Bn6IH8WV.js → HistoryPage-CW6MJ-dR.js} +1 -1
  6. package/assets/assets/ProjectPage-Bnr7I5qu.js +9 -0
  7. package/assets/assets/{RunRow-RHd8Bd52.js → RunRow-Dr607W0P.js} +1 -1
  8. package/assets/assets/{RunsPage-BsDqqQFX.js → RunsPage-CtF3P7CA.js} +1 -1
  9. package/assets/assets/SettingsPage-3-uzs2lp.js +1 -0
  10. package/assets/assets/{TrafficPage-I19b7i9m.js → TrafficPage-Bww4KUn8.js} +1 -1
  11. package/assets/assets/{TrafficSourceDetailPage-DOLEAPsc.js → TrafficSourceDetailPage-DiHxUH2H.js} +1 -1
  12. package/assets/assets/{arrow-left-BG9o86__.js → arrow-left-D-PcVbQ4.js} +1 -1
  13. package/assets/assets/{extract-error-message-D0cgM2XG.js → extract-error-message-BRq0yLWg.js} +1 -1
  14. package/assets/assets/index-ANFzZ3nU.css +1 -0
  15. package/assets/assets/index-b5M4QpB0.js +213 -0
  16. package/assets/assets/{trash-2-C_THWxO_.js → trash-2-B6aJTnJl.js} +1 -1
  17. package/assets/index.html +2 -2
  18. package/dist/{chunk-UFPP5CSN.js → chunk-3NYTF3YC.js} +346 -97
  19. package/dist/{chunk-NR6OGEV3.js → chunk-7D2GZU6O.js} +8174 -1431
  20. package/dist/{chunk-LS6SEZVF.js → chunk-WADGZMWT.js} +5457 -3192
  21. package/dist/{chunk-D7NJUGNQ.js → chunk-Z672VQ7G.js} +363 -2
  22. package/dist/cli.js +534 -164
  23. package/dist/index.js +4 -4
  24. package/dist/{intelligence-service-EOUP37XN.js → intelligence-service-OLIGR6HE.js} +2 -2
  25. package/dist/mcp.js +2 -2
  26. package/package.json +7 -7
  27. package/assets/assets/ProjectPage-DsQic9wX.js +0 -8
  28. package/assets/assets/SettingsPage-CX2LkFDB.js +0 -1
  29. package/assets/assets/index-BDo9nl4O.css +0 -1
  30. package/assets/assets/index-CYGBt2f0.js +0 -213
@@ -26,6 +26,9 @@ import {
26
26
  gscPerformanceOrderBySchema,
27
27
  keywordBatchRequestSchema,
28
28
  keywordGenerateRequestSchema,
29
+ measurementDiscoveryRequestSchema,
30
+ measurementPlanAuthoringSchema,
31
+ measurementPlanPublishRequestSchema,
29
32
  notificationCreateRequestSchema,
30
33
  notificationEventSchema,
31
34
  organicEvidencePeriodSchema,
@@ -43,7 +46,7 @@ import {
43
46
  trafficConnectWordpressRequestSchema,
44
47
  trafficEventKindSchema,
45
48
  trafficSeriesGranularitySchema
46
- } from "./chunk-LS6SEZVF.js";
49
+ } from "./chunk-WADGZMWT.js";
47
50
 
48
51
  // src/config.ts
49
52
  import fs from "fs";
@@ -1144,6 +1147,130 @@ var putApiV1ProjectsByName = (options) => {
1144
1147
  }
1145
1148
  });
1146
1149
  };
1150
+ var postApiV1ProjectsByNameMeasurementDiscovery = (options) => {
1151
+ return (options.client ?? client).post({
1152
+ security: [
1153
+ {
1154
+ scheme: "bearer",
1155
+ type: "http"
1156
+ }
1157
+ ],
1158
+ url: "/api/v1/projects/{name}/measurement-discovery",
1159
+ ...options,
1160
+ headers: {
1161
+ "Content-Type": "application/json",
1162
+ ...options.headers
1163
+ }
1164
+ });
1165
+ };
1166
+ var getApiV1ProjectsByNameMeasurementPlan = (options) => {
1167
+ return (options.client ?? client).get({
1168
+ security: [
1169
+ {
1170
+ scheme: "bearer",
1171
+ type: "http"
1172
+ }
1173
+ ],
1174
+ url: "/api/v1/projects/{name}/measurement-plan",
1175
+ ...options
1176
+ });
1177
+ };
1178
+ var putApiV1ProjectsByNameMeasurementPlan = (options) => {
1179
+ return (options.client ?? client).put({
1180
+ security: [
1181
+ {
1182
+ scheme: "bearer",
1183
+ type: "http"
1184
+ }
1185
+ ],
1186
+ url: "/api/v1/projects/{name}/measurement-plan",
1187
+ ...options,
1188
+ headers: {
1189
+ "Content-Type": "application/json",
1190
+ ...options.headers
1191
+ }
1192
+ });
1193
+ };
1194
+ var postApiV1ProjectsByNameMeasurementPlanCompilePreview = (options) => {
1195
+ return (options.client ?? client).post({
1196
+ security: [
1197
+ {
1198
+ scheme: "bearer",
1199
+ type: "http"
1200
+ }
1201
+ ],
1202
+ url: "/api/v1/projects/{name}/measurement-plan/compile-preview",
1203
+ ...options,
1204
+ headers: {
1205
+ "Content-Type": "application/json",
1206
+ ...options.headers
1207
+ }
1208
+ });
1209
+ };
1210
+ var postApiV1ProjectsByNameMeasurementPlanDiffPreview = (options) => {
1211
+ return (options.client ?? client).post({
1212
+ security: [
1213
+ {
1214
+ scheme: "bearer",
1215
+ type: "http"
1216
+ }
1217
+ ],
1218
+ url: "/api/v1/projects/{name}/measurement-plan/diff-preview",
1219
+ ...options,
1220
+ headers: {
1221
+ "Content-Type": "application/json",
1222
+ ...options.headers
1223
+ }
1224
+ });
1225
+ };
1226
+ var getApiV1ProjectsByNameMeasurementPlanVersions = (options) => {
1227
+ return (options.client ?? client).get({
1228
+ security: [
1229
+ {
1230
+ scheme: "bearer",
1231
+ type: "http"
1232
+ }
1233
+ ],
1234
+ url: "/api/v1/projects/{name}/measurement-plan/versions",
1235
+ ...options
1236
+ });
1237
+ };
1238
+ var postApiV1ProjectsByNameMeasurementPlanSegmentsByStableKeyRetire = (options) => {
1239
+ return (options.client ?? client).post({
1240
+ security: [
1241
+ {
1242
+ scheme: "bearer",
1243
+ type: "http"
1244
+ }
1245
+ ],
1246
+ url: "/api/v1/projects/{name}/measurement-plan/segments/{stableKey}/retire",
1247
+ ...options
1248
+ });
1249
+ };
1250
+ var getApiV1ProjectsByNameMeasurementPlanVersionsByRevision = (options) => {
1251
+ return (options.client ?? client).get({
1252
+ security: [
1253
+ {
1254
+ scheme: "bearer",
1255
+ type: "http"
1256
+ }
1257
+ ],
1258
+ url: "/api/v1/projects/{name}/measurement-plan/versions/{revision}",
1259
+ ...options
1260
+ });
1261
+ };
1262
+ var getApiV1ProjectsByNameMeasurementReport = (options) => {
1263
+ return (options.client ?? client).get({
1264
+ security: [
1265
+ {
1266
+ scheme: "bearer",
1267
+ type: "http"
1268
+ }
1269
+ ],
1270
+ url: "/api/v1/projects/{name}/measurement-report",
1271
+ ...options
1272
+ });
1273
+ };
1147
1274
  var getApiV1Projects = (options) => {
1148
1275
  return (options?.client ?? client).get({
1149
1276
  security: [
@@ -1768,6 +1895,46 @@ var postApiV1KeysByIdRevoke = (options) => {
1768
1895
  ...options
1769
1896
  });
1770
1897
  };
1898
+ var getApiV1Users = (options) => {
1899
+ return (options?.client ?? client).get({
1900
+ security: [
1901
+ {
1902
+ scheme: "bearer",
1903
+ type: "http"
1904
+ }
1905
+ ],
1906
+ url: "/api/v1/users",
1907
+ ...options
1908
+ });
1909
+ };
1910
+ var postApiV1Users = (options) => {
1911
+ return (options.client ?? client).post({
1912
+ security: [
1913
+ {
1914
+ scheme: "bearer",
1915
+ type: "http"
1916
+ }
1917
+ ],
1918
+ url: "/api/v1/users",
1919
+ ...options,
1920
+ headers: {
1921
+ "Content-Type": "application/json",
1922
+ ...options.headers
1923
+ }
1924
+ });
1925
+ };
1926
+ var deleteApiV1UsersByName = (options) => {
1927
+ return (options.client ?? client).delete({
1928
+ security: [
1929
+ {
1930
+ scheme: "bearer",
1931
+ type: "http"
1932
+ }
1933
+ ],
1934
+ url: "/api/v1/users/{name}",
1935
+ ...options
1936
+ });
1937
+ };
1771
1938
  var postApiV1Snapshot = (options) => {
1772
1939
  return (options.client ?? client).post({
1773
1940
  security: [
@@ -4558,6 +4725,77 @@ var ApiClient = class {
4558
4725
  })
4559
4726
  );
4560
4727
  }
4728
+ async getMeasurementPlan(project) {
4729
+ return this.invoke(
4730
+ () => getApiV1ProjectsByNameMeasurementPlan({ client: this.heyClient, path: { name: project } })
4731
+ );
4732
+ }
4733
+ async listMeasurementPlanVersions(project) {
4734
+ return this.invoke(
4735
+ () => getApiV1ProjectsByNameMeasurementPlanVersions({ client: this.heyClient, path: { name: project } })
4736
+ );
4737
+ }
4738
+ async getMeasurementPlanVersion(project, revision) {
4739
+ return this.invoke(
4740
+ () => getApiV1ProjectsByNameMeasurementPlanVersionsByRevision({
4741
+ client: this.heyClient,
4742
+ path: { name: project, revision }
4743
+ })
4744
+ );
4745
+ }
4746
+ async compileMeasurementPlanPreview(project, plan) {
4747
+ return this.invoke(
4748
+ () => postApiV1ProjectsByNameMeasurementPlanCompilePreview({
4749
+ client: this.heyClient,
4750
+ path: { name: project },
4751
+ body: plan
4752
+ })
4753
+ );
4754
+ }
4755
+ async diffMeasurementPlanPreview(project, plan) {
4756
+ return this.invoke(
4757
+ () => postApiV1ProjectsByNameMeasurementPlanDiffPreview({
4758
+ client: this.heyClient,
4759
+ path: { name: project },
4760
+ body: plan
4761
+ })
4762
+ );
4763
+ }
4764
+ async publishMeasurementPlan(project, request) {
4765
+ return this.invoke(
4766
+ () => putApiV1ProjectsByNameMeasurementPlan({
4767
+ client: this.heyClient,
4768
+ path: { name: project },
4769
+ body: request
4770
+ })
4771
+ );
4772
+ }
4773
+ async retireMeasurementPlanSegment(project, stableKey) {
4774
+ return this.invoke(
4775
+ () => postApiV1ProjectsByNameMeasurementPlanSegmentsByStableKeyRetire({
4776
+ client: this.heyClient,
4777
+ path: { name: project, stableKey }
4778
+ })
4779
+ );
4780
+ }
4781
+ async discoverMeasurementTargets(project, request) {
4782
+ return this.invoke(
4783
+ () => postApiV1ProjectsByNameMeasurementDiscovery({
4784
+ client: this.heyClient,
4785
+ path: { name: project },
4786
+ body: request
4787
+ })
4788
+ );
4789
+ }
4790
+ async getMeasurementReport(project, revision) {
4791
+ return this.invoke(
4792
+ () => getApiV1ProjectsByNameMeasurementReport({
4793
+ client: this.heyClient,
4794
+ path: { name: project },
4795
+ query: { revision }
4796
+ })
4797
+ );
4798
+ }
4561
4799
  async listRuns(project, limit, kind) {
4562
4800
  return this.invoke(
4563
4801
  () => getApiV1ProjectsByNameRuns({
@@ -4660,6 +4898,18 @@ var ApiClient = class {
4660
4898
  () => postApiV1KeysByIdRevoke({ client: this.heyClient, path: { id } })
4661
4899
  );
4662
4900
  }
4901
+ // ── Account management ──────────────────────────────────────────────────
4902
+ async listUsers() {
4903
+ return this.invoke(() => getApiV1Users({ client: this.heyClient }));
4904
+ }
4905
+ async createUser(body) {
4906
+ return this.invoke(() => postApiV1Users({ client: this.heyClient, body }));
4907
+ }
4908
+ async deleteUser(name) {
4909
+ return this.invoke(
4910
+ () => deleteApiV1UsersByName({ client: this.heyClient, path: { name } })
4911
+ );
4912
+ }
4663
4913
  async updateProvider(name, body) {
4664
4914
  return this.invoke(
4665
4915
  () => putApiV1SettingsProvidersByName({ client: this.heyClient, path: { name }, body })
@@ -6110,6 +6360,11 @@ var runTriggerInputSchema = z2.object({
6110
6360
  project: projectNameSchema,
6111
6361
  request: runTriggerRequestSchema.optional()
6112
6362
  });
6363
+ var measurementPlanVersionInputSchema = z2.object({ project: projectNameSchema, revision: z2.number().int().positive() });
6364
+ var measurementPlanPreviewInputSchema = z2.object({ project: projectNameSchema, plan: measurementPlanAuthoringSchema });
6365
+ var measurementPlanPublishInputSchema = measurementPlanPublishRequestSchema.extend({ project: projectNameSchema });
6366
+ var measurementPlanRetireInputSchema = z2.object({ project: projectNameSchema, stableKey: z2.string().min(1) });
6367
+ var measurementDiscoveryInputSchema = measurementDiscoveryRequestSchema.extend({ project: projectNameSchema });
6113
6368
  var runsListInputSchema = z2.object({
6114
6369
  project: projectNameSchema,
6115
6370
  limit: z2.number().int().positive().max(500).optional()
@@ -7671,10 +7926,116 @@ var canonryMcpTools = [
7671
7926
  await client2.putKeywords(input.project, uniqueStrings(input.request.keywords));
7672
7927
  }
7673
7928
  }),
7929
+ defineTool({
7930
+ name: "canonry_measurement_discovery",
7931
+ title: "Discover measurement Targets",
7932
+ description: "Fetch a public sitemap under bounded network policy and deterministically classify project-owned URLs into Target proposals, aliases, shared paths, unmatched paths, and exclusions. Does not publish a plan.",
7933
+ access: "write",
7934
+ tier: "setup",
7935
+ inputSchema: measurementDiscoveryInputSchema,
7936
+ annotations: writeAnnotations({ idempotentHint: false, openWorldHint: true }),
7937
+ openApiOperations: ["POST /api/v1/projects/{name}/measurement-discovery"],
7938
+ handler: (client2, input) => client2.discoverMeasurementTargets(input.project, {
7939
+ sitemapUrl: input.sitemapUrl,
7940
+ rule: input.rule,
7941
+ ...input.maxUrls === void 0 ? {} : { maxUrls: input.maxUrls }
7942
+ })
7943
+ }),
7944
+ defineTool({
7945
+ name: "canonry_measurement_plan_get",
7946
+ title: "Get measurement plan",
7947
+ description: "Get the active measurement plan for a project.",
7948
+ access: "read",
7949
+ tier: "setup",
7950
+ inputSchema: projectInputSchema,
7951
+ annotations: readAnnotations(),
7952
+ openApiOperations: ["GET /api/v1/projects/{name}/measurement-plan"],
7953
+ handler: (client2, input) => client2.getMeasurementPlan(input.project)
7954
+ }),
7955
+ defineTool({
7956
+ name: "canonry_measurement_plan_versions",
7957
+ title: "List measurement plan versions",
7958
+ description: "List immutable measurement-plan revisions.",
7959
+ access: "read",
7960
+ tier: "setup",
7961
+ inputSchema: projectInputSchema,
7962
+ annotations: readAnnotations(),
7963
+ openApiOperations: ["GET /api/v1/projects/{name}/measurement-plan/versions"],
7964
+ handler: (client2, input) => client2.listMeasurementPlanVersions(input.project)
7965
+ }),
7966
+ defineTool({
7967
+ name: "canonry_measurement_plan_version_get",
7968
+ title: "Get measurement plan revision",
7969
+ description: "Get one immutable measurement-plan revision.",
7970
+ access: "read",
7971
+ tier: "setup",
7972
+ inputSchema: measurementPlanVersionInputSchema,
7973
+ annotations: readAnnotations(),
7974
+ openApiOperations: ["GET /api/v1/projects/{name}/measurement-plan/versions/{revision}"],
7975
+ handler: (client2, input) => client2.getMeasurementPlanVersion(input.project, input.revision)
7976
+ }),
7977
+ defineTool({
7978
+ name: "canonry_measurement_plan_compile_preview",
7979
+ title: "Compile measurement plan",
7980
+ description: "Validate and compile a Target/group plan without publishing it.",
7981
+ access: "write",
7982
+ tier: "setup",
7983
+ inputSchema: measurementPlanPreviewInputSchema,
7984
+ annotations: writeAnnotations({ idempotentHint: true }),
7985
+ openApiOperations: ["POST /api/v1/projects/{name}/measurement-plan/compile-preview"],
7986
+ handler: (client2, input) => client2.compileMeasurementPlanPreview(input.project, input.plan)
7987
+ }),
7988
+ defineTool({
7989
+ name: "canonry_measurement_plan_diff_preview",
7990
+ title: "Preview measurement plan changes",
7991
+ description: "Compare a compiled Target/group plan with the active immutable revision without publishing it.",
7992
+ access: "write",
7993
+ tier: "setup",
7994
+ inputSchema: measurementPlanPreviewInputSchema,
7995
+ annotations: writeAnnotations({ idempotentHint: true }),
7996
+ openApiOperations: ["POST /api/v1/projects/{name}/measurement-plan/diff-preview"],
7997
+ handler: (client2, input) => client2.diffMeasurementPlanPreview(input.project, input.plan)
7998
+ }),
7999
+ defineTool({
8000
+ name: "canonry_measurement_plan_publish",
8001
+ title: "Publish measurement plan",
8002
+ description: "Publish only when the active revision still matches the revision you reviewed. Use null only when you reviewed a planless project.",
8003
+ access: "write",
8004
+ tier: "setup",
8005
+ inputSchema: measurementPlanPublishInputSchema,
8006
+ annotations: writeAnnotations({ idempotentHint: true }),
8007
+ openApiOperations: ["PUT /api/v1/projects/{name}/measurement-plan"],
8008
+ handler: (client2, input) => client2.publishMeasurementPlan(input.project, {
8009
+ expectedActiveRevision: input.expectedActiveRevision,
8010
+ plan: input.plan
8011
+ })
8012
+ }),
8013
+ defineTool({
8014
+ name: "canonry_measurement_plan_segment_retire",
8015
+ title: "Retire measurement segment",
8016
+ description: "Permanently retire an inactive Target or group stable key. Publish a revision without it first; there is no unretire.",
8017
+ access: "write",
8018
+ tier: "setup",
8019
+ inputSchema: measurementPlanRetireInputSchema,
8020
+ annotations: writeAnnotations({ idempotentHint: true, destructiveHint: true }),
8021
+ openApiOperations: ["POST /api/v1/projects/{name}/measurement-plan/segments/{stableKey}/retire"],
8022
+ handler: (client2, input) => client2.retireMeasurementPlanSegment(input.project, input.stableKey)
8023
+ }),
8024
+ defineTool({
8025
+ name: "canonry_measurement_report",
8026
+ title: "Get measurement report",
8027
+ description: "Get a revision-pinned Target and group measurement report from stored runs. Never starts live provider work.",
8028
+ access: "read",
8029
+ tier: "setup",
8030
+ inputSchema: measurementPlanVersionInputSchema,
8031
+ annotations: readAnnotations(),
8032
+ openApiOperations: ["GET /api/v1/projects/{name}/measurement-report"],
8033
+ handler: (client2, input) => client2.getMeasurementReport(input.project, input.revision)
8034
+ }),
7674
8035
  defineTool({
7675
8036
  name: "canonry_run_trigger",
7676
8037
  title: "Trigger run",
7677
- description: "Trigger an answer-visibility run for a Canonry project. Pass request.queries[] to scope the sweep to a subset of the project's tracked queries; omit for a full sweep. For verification scenarios (testing whether a provider migration worked, reproducing a regression, sanity-checking after a code change), set request.trigger='probe' \u2014 probe runs write a snapshot you can inspect via canonry_runs_get but are EXCLUDED from dashboard, analytics, intelligence, report, and notifications. Use 'probe' whenever you are testing on your own initiative rather than producing data the user/dashboard will consume.",
8038
+ description: "Trigger an answer-visibility run for a Canonry project. Omit both scoping fields for a full sweep. Pass request.queries[] to measure only some of the project's tracked questions. On a project with a published measurement plan, pass request.measurementScope with at least one group or target to measure one slice of that plan \u2014 a group stands for its member Targets, and only the questions those Targets selected are measured. A scope naming nothing is rejected rather than treated as a full sweep, so omit the field entirely when you want everything. Either kind of slice is recorded as a spot check: it never replaces a full sweep in the dashboard, analytics or report. For verification scenarios (testing whether a provider migration worked, reproducing a regression, sanity-checking after a code change), set request.trigger='probe' \u2014 probe runs write a snapshot you can inspect via canonry_runs_get but are EXCLUDED from dashboard, analytics, intelligence, report, and notifications. Use 'probe' whenever you are testing on your own initiative rather than producing data the user/dashboard will consume.",
7678
8039
  access: "write",
7679
8040
  tier: "core",
7680
8041
  inputSchema: runTriggerInputSchema,