@canonry/canonry 4.129.0 → 4.130.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 (32) hide show
  1. package/README.md +1 -60
  2. package/assets/assets/{AuditHistoryPanel-DwJpVWme.js → AuditHistoryPanel-Ydzb2Y_Y.js} +1 -1
  3. package/assets/assets/BacklinksPage-DYodEusK.js +1 -0
  4. package/assets/assets/{ChartPrimitives-6oFKrJFk.js → ChartPrimitives-D67hsnF7.js} +1 -1
  5. package/assets/assets/{HistoryPage-DwOAoN1Z.js → HistoryPage-_h9ITL1w.js} +1 -1
  6. package/assets/assets/ProjectPage-fCJKCcHE.js +8 -0
  7. package/assets/assets/{RunRow-lt9IS99U.js → RunRow-DzUNyTE-.js} +1 -1
  8. package/assets/assets/{RunsPage-DitYcIdx.js → RunsPage-FTvAjptk.js} +1 -1
  9. package/assets/assets/{SettingsPage-CAOrh65Q.js → SettingsPage-CvgpYEAt.js} +1 -1
  10. package/assets/assets/{TrafficPage-BqzNvx75.js → TrafficPage-qaMW9k6o.js} +1 -1
  11. package/assets/assets/TrafficSourceDetailPage-CRCso7_A.js +1 -0
  12. package/assets/assets/{arrow-left-AmG4gtUR.js → arrow-left-C--lHdP2.js} +1 -1
  13. package/assets/assets/extract-error-message-DVqYbKpB.js +1 -0
  14. package/assets/assets/index-CdXn0JEf.js +210 -0
  15. package/assets/assets/{index-jymsMBpZ.css → index-JhX-wfQO.css} +1 -1
  16. package/assets/assets/trash-2-CyKRU3tR.js +1 -0
  17. package/assets/index.html +2 -2
  18. package/dist/{chunk-EF67Y6CI.js → chunk-5XU6WEMK.js} +728 -292
  19. package/dist/{chunk-BLSHHRRU.js → chunk-NVRJZU6V.js} +2758 -2613
  20. package/dist/{chunk-ZHWWSU7H.js → chunk-QR5U2K3O.js} +508 -355
  21. package/dist/{chunk-IHRW6WWV.js → chunk-WIALMCXM.js} +127 -6
  22. package/dist/cli.js +446 -184
  23. package/dist/index.js +4 -4
  24. package/dist/{intelligence-service-NTIKN7YG.js → intelligence-service-53GUE6EI.js} +2 -2
  25. package/dist/mcp.js +5 -5
  26. package/package.json +6 -6
  27. package/assets/assets/BacklinksPage-K8FQUBxI.js +0 -1
  28. package/assets/assets/ProjectPage-CdgFUk7h.js +0 -7
  29. package/assets/assets/TrafficSourceDetailPage-DXbygZUA.js +0 -1
  30. package/assets/assets/extract-error-message-DlVtjoPz.js +0 -1
  31. package/assets/assets/index-BiCDkOH4.js +0 -210
  32. package/assets/assets/trash-2-gFHWd1A1.js +0 -1
@@ -30,14 +30,16 @@ import {
30
30
  queryBatchRequestSchema,
31
31
  queryGenerateRequestSchema,
32
32
  reportPeriodSchema,
33
+ researchRunCreateSchema,
33
34
  runTriggerRequestSchema,
34
35
  schedulableRunKindSchema,
35
36
  scheduleUpsertRequestSchema,
36
37
  trafficConnectCloudRunRequestSchema,
37
38
  trafficConnectVercelRequestSchema,
38
39
  trafficConnectWordpressRequestSchema,
39
- trafficEventKindSchema
40
- } from "./chunk-BLSHHRRU.js";
40
+ trafficEventKindSchema,
41
+ trafficSeriesGranularitySchema
42
+ } from "./chunk-NVRJZU6V.js";
41
43
 
42
44
  // src/config.ts
43
45
  import fs from "fs";
@@ -1146,6 +1148,46 @@ var getApiV1ProjectsByNameDeletePreview = (options) => {
1146
1148
  ...options
1147
1149
  });
1148
1150
  };
1151
+ var getApiV1ProjectsByNameResearchRuns = (options) => {
1152
+ return (options.client ?? client).get({
1153
+ security: [
1154
+ {
1155
+ scheme: "bearer",
1156
+ type: "http"
1157
+ }
1158
+ ],
1159
+ url: "/api/v1/projects/{name}/research/runs",
1160
+ ...options
1161
+ });
1162
+ };
1163
+ var postApiV1ProjectsByNameResearchRuns = (options) => {
1164
+ return (options.client ?? client).post({
1165
+ security: [
1166
+ {
1167
+ scheme: "bearer",
1168
+ type: "http"
1169
+ }
1170
+ ],
1171
+ url: "/api/v1/projects/{name}/research/runs",
1172
+ ...options,
1173
+ headers: {
1174
+ "Content-Type": "application/json",
1175
+ ...options.headers
1176
+ }
1177
+ });
1178
+ };
1179
+ var getApiV1ProjectsByNameResearchRunsByRunId = (options) => {
1180
+ return (options.client ?? client).get({
1181
+ security: [
1182
+ {
1183
+ scheme: "bearer",
1184
+ type: "http"
1185
+ }
1186
+ ],
1187
+ url: "/api/v1/projects/{name}/research/runs/{runId}",
1188
+ ...options
1189
+ });
1190
+ };
1149
1191
  var getApiV1ProjectsByNameLocations = (options) => {
1150
1192
  return (options.client ?? client).get({
1151
1193
  security: [
@@ -5335,7 +5377,8 @@ var ApiClient = class {
5335
5377
  until: params?.until,
5336
5378
  kind: params?.kind,
5337
5379
  limit: params?.limit !== void 0 ? String(params.limit) : void 0,
5338
- sourceId: params?.sourceId
5380
+ sourceId: params?.sourceId,
5381
+ granularity: params?.granularity
5339
5382
  }
5340
5383
  })
5341
5384
  );
@@ -5367,6 +5410,37 @@ var ApiClient = class {
5367
5410
  })
5368
5411
  );
5369
5412
  }
5413
+ // ── Research query runs ────────────────────────────────────────────────
5414
+ /**
5415
+ * Start one saved research batch. Research results are deliberately kept
5416
+ * outside the tracked-query basket and visibility-run history.
5417
+ */
5418
+ async startResearchRun(project, request) {
5419
+ return this.invoke(
5420
+ () => postApiV1ProjectsByNameResearchRuns({
5421
+ client: this.heyClient,
5422
+ path: { name: project },
5423
+ body: request
5424
+ })
5425
+ );
5426
+ }
5427
+ async listResearchRuns(project, opts) {
5428
+ return this.invoke(
5429
+ () => getApiV1ProjectsByNameResearchRuns({
5430
+ client: this.heyClient,
5431
+ path: { name: project },
5432
+ query: { limit: opts?.limit !== void 0 ? String(opts.limit) : void 0 }
5433
+ })
5434
+ );
5435
+ }
5436
+ async getResearchRun(project, runId) {
5437
+ return this.invoke(
5438
+ () => getApiV1ProjectsByNameResearchRunsByRunId({
5439
+ client: this.heyClient,
5440
+ path: { name: project, runId }
5441
+ })
5442
+ );
5443
+ }
5370
5444
  async getDiscoveryHarvest(project, sessionId, opts) {
5371
5445
  return this.invoke(
5372
5446
  () => getApiV1ProjectsByNameDiscoverSessionsByIdHarvest({
@@ -6190,9 +6264,10 @@ var trafficEventsInputSchema = z2.object({
6190
6264
  project: projectNameSchema,
6191
6265
  since: z2.string().optional().describe("ISO 8601 lower bound. Defaults to 24h ago when omitted."),
6192
6266
  until: z2.string().optional().describe("ISO 8601 upper bound. Defaults to now when omitted."),
6193
- kind: z2.union([trafficEventKindSchema, z2.literal("all")]).optional().describe('Filter to "crawler" or "ai-referral"; "all" (default) returns both.'),
6267
+ kind: z2.union([trafficEventKindSchema, z2.literal("all")]).optional().describe('Filter to one traffic kind; "all" (default) returns every kind.'),
6194
6268
  sourceId: z2.string().min(1).optional().describe("Restrict to a single traffic source ID."),
6195
- limit: z2.number().int().positive().max(5e3).optional().describe("Max combined rows. Defaults to 500, max 5000. Totals always reflect the full window.")
6269
+ limit: z2.number().int().positive().max(5e3).optional().describe("Max combined rows. Defaults to 500, max 5000. Totals always reflect the full window."),
6270
+ granularity: trafficSeriesGranularitySchema.optional().describe("Full-window chart series bucket size: hour (default) or day.")
6196
6271
  });
6197
6272
  var trafficSourceIdInputSchema = z2.object({
6198
6273
  project: projectNameSchema,
@@ -6219,6 +6294,18 @@ var discoverySessionIdInputSchema = z2.object({
6219
6294
  project: projectNameSchema,
6220
6295
  sessionId: z2.string().min(1).describe("Discovery session ID returned by canonry_discover_run_start.")
6221
6296
  });
6297
+ var researchRunStartInputSchema = z2.object({
6298
+ project: projectNameSchema,
6299
+ request: researchRunCreateSchema.describe("One shared provider/model/location context for every free-form query in this saved research batch.")
6300
+ });
6301
+ var researchRunsListInputSchema = z2.object({
6302
+ project: projectNameSchema,
6303
+ limit: z2.number().int().positive().max(100).optional().describe("Max saved research runs returned. Default 20.")
6304
+ });
6305
+ var researchRunIdInputSchema = z2.object({
6306
+ project: projectNameSchema,
6307
+ runId: z2.string().min(1).describe("Research run ID returned by canonry_research_run_start.")
6308
+ });
6222
6309
  var discoveryHarvestInputSchema = z2.object({
6223
6310
  project: projectNameSchema,
6224
6311
  sessionId: z2.string().min(1).describe("Discovery session ID returned by canonry_discover_run_start."),
@@ -7110,7 +7197,7 @@ var canonryMcpTools = [
7110
7197
  defineTool({
7111
7198
  name: "canonry_traffic_events",
7112
7199
  title: "List traffic events",
7113
- description: 'Read crawler and AI-referral hourly rollups from server-side traffic sources. Returns a discriminated list (kind="crawler" rows carry botId/operator/verificationStatus; kind="ai-referral" rows carry product/sourceDomain/evidenceType) plus totals over the full window even when limit truncates rows. Window defaults to last 24h.',
7200
+ description: "Read crawler, AI user-fetch, and AI-referral rollups from server-side traffic sources. Returns complete full-window chart series and totals plus a capped discriminated detail list with explicit truncation metadata. Window defaults to last 24h.",
7114
7201
  access: "read",
7115
7202
  tier: "traffic",
7116
7203
  inputSchema: trafficEventsInputSchema,
@@ -7123,6 +7210,7 @@ var canonryMcpTools = [
7123
7210
  if (input.kind) params.kind = input.kind;
7124
7211
  if (input.sourceId) params.sourceId = input.sourceId;
7125
7212
  if (input.limit !== void 0) params.limit = input.limit;
7213
+ if (input.granularity) params.granularity = input.granularity;
7126
7214
  return client2.trafficListEvents(input.project, params);
7127
7215
  }
7128
7216
  }),
@@ -7500,6 +7588,39 @@ var canonryMcpTools = [
7500
7588
  return { status: "detached", project: input.project };
7501
7589
  }
7502
7590
  }),
7591
+ defineTool({
7592
+ name: "canonry_research_run_start",
7593
+ title: "Start research query run",
7594
+ description: "Run a batch of free-form queries once each against one API provider, with an optional exact model and location. Results are saved as a research run for later inspection. This does not add any query to the tracked basket or affect overview tracking.",
7595
+ access: "write",
7596
+ tier: "discovery",
7597
+ inputSchema: researchRunStartInputSchema,
7598
+ annotations: writeAnnotations({ idempotentHint: false, openWorldHint: true }),
7599
+ openApiOperations: ["POST /api/v1/projects/{name}/research/runs"],
7600
+ handler: (client2, input) => client2.startResearchRun(input.project, input.request)
7601
+ }),
7602
+ defineTool({
7603
+ name: "canonry_research_runs_list",
7604
+ title: "List research query runs",
7605
+ description: "List saved research query runs for a project, newest first. Research and ICP discovery are distinct workflows: these are direct free-form query experiments and never modify the tracked basket.",
7606
+ access: "read",
7607
+ tier: "discovery",
7608
+ inputSchema: researchRunsListInputSchema,
7609
+ annotations: readAnnotations(),
7610
+ openApiOperations: ["GET /api/v1/projects/{name}/research/runs"],
7611
+ handler: (client2, input) => client2.listResearchRuns(input.project, input.limit === void 0 ? void 0 : { limit: input.limit })
7612
+ }),
7613
+ defineTool({
7614
+ name: "canonry_research_run_get",
7615
+ title: "Get research query run",
7616
+ description: "Get the saved per-query answers, sources, cited domains, and independent mention/citation results for one research run. It is read-only and does not promote or track any query.",
7617
+ access: "read",
7618
+ tier: "discovery",
7619
+ inputSchema: researchRunIdInputSchema,
7620
+ annotations: readAnnotations(),
7621
+ openApiOperations: ["GET /api/v1/projects/{name}/research/runs/{runId}"],
7622
+ handler: (client2, input) => client2.getResearchRun(input.project, input.runId)
7623
+ }),
7503
7624
  defineTool({
7504
7625
  name: "canonry_discover_run_start",
7505
7626
  title: "Start discovery run",