@ainyc/canonry 4.15.2 → 4.17.1

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/dist/cli.js CHANGED
@@ -20,7 +20,7 @@ import {
20
20
  setTelemetrySource,
21
21
  showFirstRunNotice,
22
22
  trackEvent
23
- } from "./chunk-IVNWS2YU.js";
23
+ } from "./chunk-ZGHD3IAV.js";
24
24
  import {
25
25
  CliError,
26
26
  EXIT_SYSTEM_ERROR,
@@ -36,7 +36,7 @@ import {
36
36
  saveConfig,
37
37
  saveConfigPatch,
38
38
  usageError
39
- } from "./chunk-7SRKUAZO.js";
39
+ } from "./chunk-6TWKC3DP.js";
40
40
  import {
41
41
  apiKeys,
42
42
  competitors,
@@ -49,7 +49,7 @@ import {
49
49
  queries,
50
50
  querySnapshots,
51
51
  runs
52
- } from "./chunk-MI33SQL6.js";
52
+ } from "./chunk-PAZCY4FF.js";
53
53
  import {
54
54
  CcReleaseSyncStatuses,
55
55
  CheckScopes,
@@ -69,7 +69,7 @@ import {
69
69
  providerQuotaPolicySchema,
70
70
  resolveProviderInput,
71
71
  skillsClientSchema
72
- } from "./chunk-ONI3TX2A.js";
72
+ } from "./chunk-Q2OED5JQ.js";
73
73
 
74
74
  // src/cli.ts
75
75
  import { pathToFileURL } from "url";
@@ -621,7 +621,7 @@ function readStoredGroundingSources(rawResponse) {
621
621
  return result;
622
622
  }
623
623
  async function backfillInsightsCommand(project, opts) {
624
- const { IntelligenceService } = await import("./intelligence-service-JYV3CO4H.js");
624
+ const { IntelligenceService } = await import("./intelligence-service-X3PQLBUV.js");
625
625
  const config = loadConfig();
626
626
  const db = createClient(config.database);
627
627
  migrate(db);
@@ -6260,6 +6260,8 @@ function getClient17() {
6260
6260
  async function setSchedule(project, opts) {
6261
6261
  const client = getClient17();
6262
6262
  const body = {};
6263
+ if (opts.kind) body.kind = opts.kind;
6264
+ if (opts.sourceId) body.sourceId = opts.sourceId;
6263
6265
  if (opts.preset) body.preset = opts.preset;
6264
6266
  if (opts.cron) body.cron = opts.cron;
6265
6267
  if (opts.timezone) body.timezone = opts.timezone;
@@ -6269,61 +6271,68 @@ async function setSchedule(project, opts) {
6269
6271
  console.log(JSON.stringify(result, null, 2));
6270
6272
  return;
6271
6273
  }
6272
- console.log(`Schedule set for "${project}":`);
6274
+ console.log(`Schedule set for "${project}" (kind: ${result.kind}):`);
6273
6275
  printSchedule(result);
6274
6276
  }
6275
- async function showSchedule(project, format) {
6277
+ async function showSchedule(project, format, kind) {
6276
6278
  const client = getClient17();
6277
- const result = await client.getSchedule(project);
6279
+ const result = await client.getSchedule(project, kind);
6278
6280
  if (format === "json") {
6279
6281
  console.log(JSON.stringify(result, null, 2));
6280
6282
  return;
6281
6283
  }
6282
6284
  printSchedule(result);
6283
6285
  }
6284
- async function enableSchedule(project, format) {
6286
+ async function enableSchedule(project, format, kind) {
6285
6287
  const client = getClient17();
6286
- const current = await client.getSchedule(project);
6287
- const body = { timezone: current.timezone, enabled: true };
6288
+ const current = await client.getSchedule(project, kind);
6289
+ const body = { kind: current.kind, timezone: current.timezone, enabled: true };
6288
6290
  if (current.preset) body.preset = current.preset;
6289
6291
  else body.cron = current.cronExpr;
6290
6292
  if (current.providers.length) body.providers = current.providers;
6293
+ if (current.sourceId) body.sourceId = current.sourceId;
6291
6294
  const result = await client.putSchedule(project, body);
6292
6295
  if (format === "json") {
6293
6296
  console.log(JSON.stringify(result, null, 2));
6294
6297
  return;
6295
6298
  }
6296
- console.log(`Schedule enabled for "${project}"`);
6299
+ console.log(`Schedule enabled for "${project}" (kind: ${result.kind})`);
6297
6300
  }
6298
- async function disableSchedule(project, format) {
6301
+ async function disableSchedule(project, format, kind) {
6299
6302
  const client = getClient17();
6300
- const current = await client.getSchedule(project);
6301
- const body = { timezone: current.timezone, enabled: false };
6303
+ const current = await client.getSchedule(project, kind);
6304
+ const body = { kind: current.kind, timezone: current.timezone, enabled: false };
6302
6305
  if (current.preset) body.preset = current.preset;
6303
6306
  else body.cron = current.cronExpr;
6304
6307
  if (current.providers.length) body.providers = current.providers;
6308
+ if (current.sourceId) body.sourceId = current.sourceId;
6305
6309
  const result = await client.putSchedule(project, body);
6306
6310
  if (format === "json") {
6307
6311
  console.log(JSON.stringify(result, null, 2));
6308
6312
  return;
6309
6313
  }
6310
- console.log(`Schedule disabled for "${project}"`);
6314
+ console.log(`Schedule disabled for "${project}" (kind: ${result.kind})`);
6311
6315
  }
6312
- async function removeSchedule(project, format) {
6316
+ async function removeSchedule(project, format, kind) {
6313
6317
  const client = getClient17();
6314
- await client.deleteSchedule(project);
6318
+ await client.deleteSchedule(project, kind);
6319
+ const resolvedKind = kind ?? "answer-visibility";
6315
6320
  if (format === "json") {
6316
- console.log(JSON.stringify({ project, removed: true }, null, 2));
6321
+ console.log(JSON.stringify({ project, kind: resolvedKind, removed: true }, null, 2));
6317
6322
  return;
6318
6323
  }
6319
- console.log(`Schedule removed for "${project}"`);
6324
+ console.log(`Schedule removed for "${project}" (kind: ${resolvedKind})`);
6320
6325
  }
6321
6326
  function printSchedule(s) {
6322
6327
  const label = s.preset ?? s.cronExpr;
6328
+ console.log(` Kind: ${s.kind}`);
6323
6329
  console.log(` Schedule: ${label}`);
6324
6330
  console.log(` Cron: ${s.cronExpr}`);
6325
6331
  console.log(` Timezone: ${s.timezone}`);
6326
6332
  console.log(` Enabled: ${s.enabled ? "yes" : "no"}`);
6333
+ if (s.kind === "traffic-sync" && s.sourceId) {
6334
+ console.log(` Source: ${s.sourceId}`);
6335
+ }
6327
6336
  if (s.providers.length) {
6328
6337
  console.log(` Providers: ${s.providers.join(", ")}`);
6329
6338
  }
@@ -6339,30 +6348,31 @@ function printSchedule(s) {
6339
6348
  var SCHEDULE_CLI_COMMANDS = [
6340
6349
  {
6341
6350
  path: ["schedule", "set"],
6342
- usage: "canonry schedule set <project> (--preset <preset> | --cron <expr>) [--timezone <tz>] [--provider <name>...] [--format json]",
6351
+ usage: "canonry schedule set <project> (--preset <preset> | --cron <expr>) [--kind answer-visibility|traffic-sync] [--source <id>] [--timezone <tz>] [--provider <name>...] [--format json]",
6343
6352
  options: {
6344
6353
  preset: stringOption(),
6345
6354
  cron: stringOption(),
6355
+ kind: stringOption(),
6356
+ source: stringOption(),
6346
6357
  timezone: stringOption(),
6347
6358
  provider: multiStringOption()
6348
6359
  },
6349
6360
  run: async (input) => {
6350
- const project = requireProject(
6351
- input,
6352
- "schedule.set",
6353
- "canonry schedule set <project> (--preset <preset> | --cron <expr>) [--timezone <tz>] [--provider <name>...] [--format json]"
6354
- );
6361
+ const usage = "canonry schedule set <project> (--preset <preset> | --cron <expr>) [--kind answer-visibility|traffic-sync] [--source <id>] [--timezone <tz>] [--provider <name>...] [--format json]";
6362
+ const project = requireProject(input, "schedule.set", usage);
6355
6363
  if (!getString(input.values, "preset") && !getString(input.values, "cron")) {
6356
6364
  throw usageError("Error: --preset or --cron is required", {
6357
6365
  message: "schedule preset or cron is required",
6358
6366
  details: {
6359
6367
  command: "schedule.set",
6360
- usage: "canonry schedule set <project> (--preset <preset> | --cron <expr>) [--timezone <tz>] [--provider <name>...] [--format json]",
6368
+ usage,
6361
6369
  required: ["preset | cron"]
6362
6370
  }
6363
6371
  });
6364
6372
  }
6365
6373
  await setSchedule(project, {
6374
+ kind: getString(input.values, "kind"),
6375
+ sourceId: getString(input.values, "source"),
6366
6376
  preset: getString(input.values, "preset"),
6367
6377
  cron: getString(input.values, "cron"),
6368
6378
  timezone: getString(input.values, "timezone"),
@@ -6373,34 +6383,38 @@ var SCHEDULE_CLI_COMMANDS = [
6373
6383
  },
6374
6384
  {
6375
6385
  path: ["schedule", "show"],
6376
- usage: "canonry schedule show <project> [--format json]",
6386
+ usage: "canonry schedule show <project> [--kind answer-visibility|traffic-sync] [--format json]",
6387
+ options: { kind: stringOption() },
6377
6388
  run: async (input) => {
6378
- const project = requireProject(input, "schedule.show", "canonry schedule show <project> [--format json]");
6379
- await showSchedule(project, input.format);
6389
+ const project = requireProject(input, "schedule.show", "canonry schedule show <project> [--kind ...]");
6390
+ await showSchedule(project, input.format, getString(input.values, "kind"));
6380
6391
  }
6381
6392
  },
6382
6393
  {
6383
6394
  path: ["schedule", "enable"],
6384
- usage: "canonry schedule enable <project> [--format json]",
6395
+ usage: "canonry schedule enable <project> [--kind answer-visibility|traffic-sync] [--format json]",
6396
+ options: { kind: stringOption() },
6385
6397
  run: async (input) => {
6386
- const project = requireProject(input, "schedule.enable", "canonry schedule enable <project> [--format json]");
6387
- await enableSchedule(project, input.format);
6398
+ const project = requireProject(input, "schedule.enable", "canonry schedule enable <project> [--kind ...]");
6399
+ await enableSchedule(project, input.format, getString(input.values, "kind"));
6388
6400
  }
6389
6401
  },
6390
6402
  {
6391
6403
  path: ["schedule", "disable"],
6392
- usage: "canonry schedule disable <project> [--format json]",
6404
+ usage: "canonry schedule disable <project> [--kind answer-visibility|traffic-sync] [--format json]",
6405
+ options: { kind: stringOption() },
6393
6406
  run: async (input) => {
6394
- const project = requireProject(input, "schedule.disable", "canonry schedule disable <project> [--format json]");
6395
- await disableSchedule(project, input.format);
6407
+ const project = requireProject(input, "schedule.disable", "canonry schedule disable <project> [--kind ...]");
6408
+ await disableSchedule(project, input.format, getString(input.values, "kind"));
6396
6409
  }
6397
6410
  },
6398
6411
  {
6399
6412
  path: ["schedule", "remove"],
6400
- usage: "canonry schedule remove <project> [--format json]",
6413
+ usage: "canonry schedule remove <project> [--kind answer-visibility|traffic-sync] [--format json]",
6414
+ options: { kind: stringOption() },
6401
6415
  run: async (input) => {
6402
- const project = requireProject(input, "schedule.remove", "canonry schedule remove <project> [--format json]");
6403
- await removeSchedule(project, input.format);
6416
+ const project = requireProject(input, "schedule.remove", "canonry schedule remove <project> [--kind ...]");
6417
+ await removeSchedule(project, input.format, getString(input.values, "kind"));
6404
6418
  }
6405
6419
  },
6406
6420
  {
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  createServer
3
- } from "./chunk-IVNWS2YU.js";
3
+ } from "./chunk-ZGHD3IAV.js";
4
4
  import {
5
5
  loadConfig
6
- } from "./chunk-7SRKUAZO.js";
7
- import "./chunk-MI33SQL6.js";
8
- import "./chunk-ONI3TX2A.js";
6
+ } from "./chunk-6TWKC3DP.js";
7
+ import "./chunk-PAZCY4FF.js";
8
+ import "./chunk-Q2OED5JQ.js";
9
9
  export {
10
10
  createServer,
11
11
  loadConfig
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  IntelligenceService
3
- } from "./chunk-MI33SQL6.js";
4
- import "./chunk-ONI3TX2A.js";
3
+ } from "./chunk-PAZCY4FF.js";
4
+ import "./chunk-Q2OED5JQ.js";
5
5
  export {
6
6
  IntelligenceService
7
7
  };
package/dist/mcp.js CHANGED
@@ -2,8 +2,8 @@ import {
2
2
  CliError,
3
3
  canonryMcpTools,
4
4
  createApiClient
5
- } from "./chunk-7SRKUAZO.js";
6
- import "./chunk-ONI3TX2A.js";
5
+ } from "./chunk-6TWKC3DP.js";
6
+ import "./chunk-Q2OED5JQ.js";
7
7
 
8
8
  // src/mcp/cli.ts
9
9
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ainyc/canonry",
3
- "version": "4.15.2",
3
+ "version": "4.17.1",
4
4
  "type": "module",
5
5
  "description": "Agent-first open-source AEO operating platform - track how answer engines cite your domain",
6
6
  "license": "FSL-1.1-ALv2",
@@ -60,21 +60,21 @@
60
60
  "tsup": "^8.5.1",
61
61
  "tsx": "^4.19.0",
62
62
  "@ainyc/canonry-api-routes": "0.0.0",
63
+ "@ainyc/canonry-db": "0.0.0",
63
64
  "@ainyc/canonry-config": "0.0.0",
64
65
  "@ainyc/canonry-intelligence": "0.0.0",
65
- "@ainyc/canonry-db": "0.0.0",
66
66
  "@ainyc/canonry-contracts": "0.0.0",
67
+ "@ainyc/canonry-integration-bing": "0.0.0",
67
68
  "@ainyc/canonry-integration-cloud-run": "0.0.0",
68
- "@ainyc/canonry-integration-commoncrawl": "0.0.0",
69
69
  "@ainyc/canonry-integration-google": "0.0.0",
70
70
  "@ainyc/canonry-integration-wordpress": "0.0.0",
71
+ "@ainyc/canonry-integration-commoncrawl": "0.0.0",
71
72
  "@ainyc/canonry-provider-cdp": "0.0.0",
72
73
  "@ainyc/canonry-integration-traffic": "0.0.0",
73
- "@ainyc/canonry-provider-claude": "0.0.0",
74
- "@ainyc/canonry-integration-bing": "0.0.0",
75
- "@ainyc/canonry-provider-openai": "0.0.0",
76
- "@ainyc/canonry-provider-local": "0.0.0",
77
74
  "@ainyc/canonry-provider-gemini": "0.0.0",
75
+ "@ainyc/canonry-provider-local": "0.0.0",
76
+ "@ainyc/canonry-provider-openai": "0.0.0",
77
+ "@ainyc/canonry-provider-claude": "0.0.0",
78
78
  "@ainyc/canonry-provider-perplexity": "0.0.0"
79
79
  },
80
80
  "scripts": {