@ainyc/canonry 4.69.0 → 4.69.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.
Files changed (24) hide show
  1. package/assets/agent-workspace/skills/canonry/references/canonry-cli.md +20 -1
  2. package/assets/assets/{BacklinksPage-BXVoTc3S.js → BacklinksPage-C4PM9i3H.js} +1 -1
  3. package/assets/assets/{ChartPrimitives-pJRJPd17.js → ChartPrimitives-nxvyoxCn.js} +1 -1
  4. package/assets/assets/ProjectPage-C-Xn3lJ1.js +6 -0
  5. package/assets/assets/{RunRow-DPL4FxPl.js → RunRow-DRncrtMo.js} +1 -1
  6. package/assets/assets/{RunsPage-B4dCG_66.js → RunsPage-cFFewGZB.js} +1 -1
  7. package/assets/assets/{SettingsPage-D8aWhLsU.js → SettingsPage-BxL_din4.js} +1 -1
  8. package/assets/assets/{TrafficPage-COZa5_Q_.js → TrafficPage-CKDv33KP.js} +1 -1
  9. package/assets/assets/{TrafficSourceDetailPage-CN8Cx6YI.js → TrafficSourceDetailPage-yMUcgBbw.js} +1 -1
  10. package/assets/assets/{extract-error-message-D8g8YXDH.js → extract-error-message-D3DfO_Ep.js} +1 -1
  11. package/assets/assets/{index-DPO3uDWZ.js → index-mVWwxF_h.js} +86 -86
  12. package/assets/assets/{server-traffic-0JT1Vbj_.js → server-traffic-D4hR4Sy6.js} +1 -1
  13. package/assets/assets/{trash-2-_1TgguOP.js → trash-2-DmBrLnSR.js} +1 -1
  14. package/assets/index.html +1 -1
  15. package/dist/{chunk-D75O5A27.js → chunk-5FM7QRYD.js} +1558 -1526
  16. package/dist/{chunk-WQ44ZXGQ.js → chunk-SBYA3LEJ.js} +4 -4
  17. package/dist/{chunk-B2CH7GBW.js → chunk-WFM2O72W.js} +465 -307
  18. package/dist/{chunk-YYFBMDLC.js → chunk-ZNWMVYYU.js} +53 -1
  19. package/dist/cli.js +195 -79
  20. package/dist/index.js +4 -4
  21. package/dist/{intelligence-service-IUKD3PMZ.js → intelligence-service-DVVSE3G7.js} +2 -2
  22. package/dist/mcp.js +2 -2
  23. package/package.json +9 -9
  24. package/assets/assets/ProjectPage-CQ1_itHh.js +0 -6
package/dist/cli.js CHANGED
@@ -27,7 +27,7 @@ import {
27
27
  setTelemetrySource,
28
28
  showFirstRunNotice,
29
29
  trackEvent
30
- } from "./chunk-WQ44ZXGQ.js";
30
+ } from "./chunk-SBYA3LEJ.js";
31
31
  import {
32
32
  CliError,
33
33
  EXIT_SYSTEM_ERROR,
@@ -44,7 +44,7 @@ import {
44
44
  saveConfig,
45
45
  saveConfigPatch,
46
46
  usageError
47
- } from "./chunk-YYFBMDLC.js";
47
+ } from "./chunk-ZNWMVYYU.js";
48
48
  import {
49
49
  apiKeys,
50
50
  createClient,
@@ -52,7 +52,7 @@ import {
52
52
  projects,
53
53
  queries,
54
54
  renderReportHtml
55
- } from "./chunk-B2CH7GBW.js";
55
+ } from "./chunk-WFM2O72W.js";
56
56
  import {
57
57
  CcReleaseSyncStatuses,
58
58
  CheckScopes,
@@ -64,12 +64,13 @@ import {
64
64
  discoveryCompetitorTypeSchema,
65
65
  effectiveDomains,
66
66
  formatGbpMetricLabel,
67
+ formatIsoDate,
67
68
  formatRunErrorOneLine,
68
69
  normalizeProjectAliases,
69
70
  notificationEventSchema,
70
71
  providerQuotaPolicySchema,
71
72
  resolveProviderInput
72
- } from "./chunk-D75O5A27.js";
73
+ } from "./chunk-5FM7QRYD.js";
73
74
 
74
75
  // src/cli.ts
75
76
  import { pathToFileURL } from "url";
@@ -5288,13 +5289,127 @@ var GOOGLE_CLI_COMMANDS = [
5288
5289
  }
5289
5290
  ];
5290
5291
 
5292
+ // src/commands/keys.ts
5293
+ function getClient10() {
5294
+ return createApiClient();
5295
+ }
5296
+ function keyStatus(key) {
5297
+ return key.revokedAt ? "revoked" : "active";
5298
+ }
5299
+ async function listApiKeys(format) {
5300
+ const client = getClient10();
5301
+ const { keys } = await client.listApiKeys();
5302
+ if (format === "json") {
5303
+ console.log(JSON.stringify({ keys }, null, 2));
5304
+ return;
5305
+ } else if (format === "jsonl") {
5306
+ emitJsonl(keys);
5307
+ return;
5308
+ }
5309
+ if (keys.length === 0) {
5310
+ console.log("No API keys found.");
5311
+ return;
5312
+ }
5313
+ console.log(
5314
+ `${"NAME".padEnd(20)} ${"PREFIX".padEnd(11)} ${"SCOPES".padEnd(20)} ${"CREATED".padEnd(12)} ${"LAST USED".padEnd(12)} STATUS`
5315
+ );
5316
+ for (const key of keys) {
5317
+ const scopes = key.scopes.join(",");
5318
+ const lastUsed = key.lastUsedAt ? formatIsoDate(key.lastUsedAt) : "\u2014";
5319
+ console.log(
5320
+ `${key.name.padEnd(20)} ${key.keyPrefix.padEnd(11)} ${scopes.padEnd(20)} ${formatIsoDate(key.createdAt).padEnd(12)} ${lastUsed.padEnd(12)} ${keyStatus(key)}`
5321
+ );
5322
+ }
5323
+ }
5324
+ async function createApiKey(opts) {
5325
+ const client = getClient10();
5326
+ const body = { name: opts.name };
5327
+ if (opts.scopes && opts.scopes.length > 0) body.scopes = opts.scopes;
5328
+ const created = await client.createApiKey(body);
5329
+ if (isMachineFormat(opts.format)) {
5330
+ console.log(JSON.stringify(created, null, 2));
5331
+ return;
5332
+ }
5333
+ console.log(`API key "${created.name}" created.
5334
+ `);
5335
+ console.log(` Key: ${created.key}`);
5336
+ console.log(` Prefix: ${created.keyPrefix}`);
5337
+ console.log(` Scopes: ${created.scopes.join(", ")}`);
5338
+ console.log("\nSave this now \u2014 it will not be shown again.");
5339
+ }
5340
+ async function revokeApiKey(id, format) {
5341
+ const client = getClient10();
5342
+ const key = await client.revokeApiKey(id);
5343
+ if (isMachineFormat(format)) {
5344
+ console.log(JSON.stringify(key, null, 2));
5345
+ return;
5346
+ }
5347
+ console.log(`API key "${key.name}" (${key.keyPrefix}) revoked.`);
5348
+ }
5349
+
5350
+ // src/cli-commands/keys.ts
5351
+ var KEYS_CLI_COMMANDS = [
5352
+ {
5353
+ path: ["key", "list"],
5354
+ usage: "canonry key list [--format json|jsonl]",
5355
+ run: async (input) => {
5356
+ await listApiKeys(input.format);
5357
+ }
5358
+ },
5359
+ {
5360
+ path: ["key", "create"],
5361
+ usage: "canonry key create --name <name> [--scope <s> ...] [--format json]",
5362
+ options: {
5363
+ name: stringOption(),
5364
+ scope: multiStringOption()
5365
+ },
5366
+ run: async (input) => {
5367
+ const name = requireStringOption(input, "name", {
5368
+ command: "key.create",
5369
+ usage: "canonry key create --name <name> [--scope <s> ...] [--format json]",
5370
+ message: "--name is required"
5371
+ });
5372
+ const raw = getStringArray(input.values, "scope") ?? [];
5373
+ const scopes = raw.flatMap((s) => s.split(",")).map((s) => s.trim()).filter(Boolean);
5374
+ await createApiKey({
5375
+ name,
5376
+ scopes: scopes.length > 0 ? scopes : void 0,
5377
+ format: input.format
5378
+ });
5379
+ }
5380
+ },
5381
+ {
5382
+ path: ["key", "revoke"],
5383
+ usage: "canonry key revoke <id> [--format json]",
5384
+ run: async (input) => {
5385
+ const id = requirePositional(input, 0, {
5386
+ command: "key.revoke",
5387
+ usage: "canonry key revoke <id> [--format json]",
5388
+ message: "API key ID is required"
5389
+ });
5390
+ await revokeApiKey(id, input.format);
5391
+ }
5392
+ },
5393
+ {
5394
+ path: ["key"],
5395
+ usage: "canonry key <list|create|revoke>",
5396
+ run: async (input) => {
5397
+ unknownSubcommand(input.positionals[0], {
5398
+ command: "key",
5399
+ usage: "canonry key <list|create|revoke>",
5400
+ available: ["list", "create", "revoke"]
5401
+ });
5402
+ }
5403
+ }
5404
+ ];
5405
+
5291
5406
  // src/commands/keyword.ts
5292
5407
  import fs2 from "fs";
5293
- function getClient10() {
5408
+ function getClient11() {
5294
5409
  return createApiClient();
5295
5410
  }
5296
5411
  async function addKeywords(project, keywords, format) {
5297
- const client = getClient10();
5412
+ const client = getClient11();
5298
5413
  await client.appendKeywords(project, keywords);
5299
5414
  if (isMachineFormat(format)) {
5300
5415
  console.log(JSON.stringify({
@@ -5307,7 +5422,7 @@ async function addKeywords(project, keywords, format) {
5307
5422
  console.log(`Added ${keywords.length} key phrase(s) to "${project}".`);
5308
5423
  }
5309
5424
  async function replaceKeywords(project, keywords, format) {
5310
- const client = getClient10();
5425
+ const client = getClient11();
5311
5426
  await client.putKeywords(project, keywords);
5312
5427
  if (isMachineFormat(format)) {
5313
5428
  console.log(JSON.stringify({
@@ -5320,7 +5435,7 @@ async function replaceKeywords(project, keywords, format) {
5320
5435
  console.log(`Set ${keywords.length} key phrase(s) for "${project}".`);
5321
5436
  }
5322
5437
  async function removeKeywords(project, keywords, format) {
5323
- const client = getClient10();
5438
+ const client = getClient11();
5324
5439
  const existing = await client.listKeywords(project);
5325
5440
  const existingSet = new Set(existing.map((k) => k.keyword));
5326
5441
  const removedKeywords = keywords.filter((k) => existingSet.has(k));
@@ -5337,7 +5452,7 @@ async function removeKeywords(project, keywords, format) {
5337
5452
  console.log(`Removed ${removedKeywords.length} key phrase(s) from "${project}".`);
5338
5453
  }
5339
5454
  async function listKeywords(project, format) {
5340
- const client = getClient10();
5455
+ const client = getClient11();
5341
5456
  const kws = await client.listKeywords(project);
5342
5457
  if (format === "json") {
5343
5458
  console.log(JSON.stringify(kws, null, 2));
@@ -5383,7 +5498,7 @@ async function importKeywords(project, filePath, format) {
5383
5498
  console.log("No key phrases found in file.");
5384
5499
  return;
5385
5500
  }
5386
- const client = getClient10();
5501
+ const client = getClient11();
5387
5502
  await client.appendKeywords(project, keywords);
5388
5503
  if (isMachineFormat(format)) {
5389
5504
  console.log(JSON.stringify({
@@ -5397,7 +5512,7 @@ async function importKeywords(project, filePath, format) {
5397
5512
  console.log(`Imported ${keywords.length} key phrase(s) to "${project}".`);
5398
5513
  }
5399
5514
  async function generateKeywords(project, provider, opts) {
5400
- const client = getClient10();
5515
+ const client = getClient11();
5401
5516
  const result = await client.generateKeywords(project, provider, opts.count);
5402
5517
  const saved = Boolean(opts.save && result.keywords.length > 0);
5403
5518
  if (!isMachineFormat(opts.format)) {
@@ -5570,11 +5685,11 @@ var KEYWORD_CLI_COMMANDS = [
5570
5685
 
5571
5686
  // src/commands/query.ts
5572
5687
  import fs3 from "fs";
5573
- function getClient11() {
5688
+ function getClient12() {
5574
5689
  return createApiClient();
5575
5690
  }
5576
5691
  async function addQueries(project, queries2, format) {
5577
- const client = getClient11();
5692
+ const client = getClient12();
5578
5693
  await client.appendQueries(project, queries2);
5579
5694
  if (isMachineFormat(format)) {
5580
5695
  console.log(JSON.stringify({
@@ -5587,7 +5702,7 @@ async function addQueries(project, queries2, format) {
5587
5702
  console.log(`Added ${queries2.length} ${queries2.length === 1 ? "query" : "queries"} to "${project}".`);
5588
5703
  }
5589
5704
  async function replaceQueries(project, queries2, opts) {
5590
- const client = getClient11();
5705
+ const client = getClient12();
5591
5706
  const isJson = isMachineFormat(opts?.format);
5592
5707
  if (opts?.dryRun) {
5593
5708
  const preview = await client.previewReplaceQueries(project, queries2);
@@ -5623,7 +5738,7 @@ async function replaceQueries(project, queries2, opts) {
5623
5738
  console.log(`Set ${queries2.length} ${queries2.length === 1 ? "query" : "queries"} for "${project}".`);
5624
5739
  }
5625
5740
  async function removeQueries(project, queries2, format) {
5626
- const client = getClient11();
5741
+ const client = getClient12();
5627
5742
  const existing = await client.listQueries(project);
5628
5743
  const existingSet = new Set(existing.map((q) => q.query));
5629
5744
  const removedQueries = queries2.filter((q) => existingSet.has(q));
@@ -5640,7 +5755,7 @@ async function removeQueries(project, queries2, format) {
5640
5755
  console.log(`Removed ${removedQueries.length} ${removedQueries.length === 1 ? "query" : "queries"} from "${project}".`);
5641
5756
  }
5642
5757
  async function listQueries(project, format) {
5643
- const client = getClient11();
5758
+ const client = getClient12();
5644
5759
  const qs = await client.listQueries(project);
5645
5760
  if (format === "json") {
5646
5761
  console.log(JSON.stringify(qs, null, 2));
@@ -5686,7 +5801,7 @@ async function importQueries(project, filePath, format) {
5686
5801
  console.log("No queries found in file.");
5687
5802
  return;
5688
5803
  }
5689
- const client = getClient11();
5804
+ const client = getClient12();
5690
5805
  await client.appendQueries(project, queries2);
5691
5806
  if (isMachineFormat(format)) {
5692
5807
  console.log(JSON.stringify({
@@ -5700,7 +5815,7 @@ async function importQueries(project, filePath, format) {
5700
5815
  console.log(`Imported ${queries2.length} ${queries2.length === 1 ? "query" : "queries"} to "${project}".`);
5701
5816
  }
5702
5817
  async function generateQueries(project, provider, opts) {
5703
- const client = getClient11();
5818
+ const client = getClient12();
5704
5819
  const result = await client.generateQueries(project, provider, opts.count);
5705
5820
  const saved = Boolean(opts.save && result.queries.length > 0);
5706
5821
  if (!isMachineFormat(opts.format)) {
@@ -6195,11 +6310,11 @@ var MCP_CLI_COMMANDS = [
6195
6310
  ];
6196
6311
 
6197
6312
  // src/commands/notify.ts
6198
- function getClient12() {
6313
+ function getClient13() {
6199
6314
  return createApiClient();
6200
6315
  }
6201
6316
  async function addNotification(project, opts) {
6202
- const client = getClient12();
6317
+ const client = getClient13();
6203
6318
  const result = await client.createNotification(project, {
6204
6319
  channel: "webhook",
6205
6320
  url: opts.webhook,
@@ -6213,7 +6328,7 @@ async function addNotification(project, opts) {
6213
6328
  printNotification(result);
6214
6329
  }
6215
6330
  async function listNotifications(project, format) {
6216
- const client = getClient12();
6331
+ const client = getClient13();
6217
6332
  const results = await client.listNotifications(project);
6218
6333
  if (format === "json") {
6219
6334
  console.log(JSON.stringify(results, null, 2));
@@ -6234,7 +6349,7 @@ async function listNotifications(project, format) {
6234
6349
  }
6235
6350
  }
6236
6351
  async function removeNotification(project, id, format) {
6237
- const client = getClient12();
6352
+ const client = getClient13();
6238
6353
  await client.deleteNotification(project, id);
6239
6354
  if (isMachineFormat(format)) {
6240
6355
  console.log(JSON.stringify({ project, id, removed: true }, null, 2));
@@ -6243,7 +6358,7 @@ async function removeNotification(project, id, format) {
6243
6358
  console.log(`Notification ${id} removed from "${project}"`);
6244
6359
  }
6245
6360
  async function testNotification(project, id, format) {
6246
- const client = getClient12();
6361
+ const client = getClient13();
6247
6362
  const result = await client.testNotification(project, id);
6248
6363
  if (isMachineFormat(format)) {
6249
6364
  console.log(JSON.stringify({ project, id, ...result }, null, 2));
@@ -6438,11 +6553,11 @@ async function applyConfigs(filePaths, format) {
6438
6553
  }
6439
6554
 
6440
6555
  // src/commands/analytics.ts
6441
- function getClient13() {
6556
+ function getClient14() {
6442
6557
  return createApiClient();
6443
6558
  }
6444
6559
  async function showAnalytics(project, options) {
6445
- const client = getClient13();
6560
+ const client = getClient14();
6446
6561
  const features = options.feature ? [options.feature] : ["metrics", "gaps", "sources"];
6447
6562
  const results = {};
6448
6563
  for (const feature of features) {
@@ -6560,11 +6675,11 @@ Source Origin Breakdown`);
6560
6675
  }
6561
6676
 
6562
6677
  // src/commands/evidence.ts
6563
- function getClient14() {
6678
+ function getClient15() {
6564
6679
  return createApiClient();
6565
6680
  }
6566
6681
  async function showEvidence(project, format) {
6567
- const client = getClient14();
6682
+ const client = getClient15();
6568
6683
  const timeline = await client.getTimeline(project);
6569
6684
  if (format === "json") {
6570
6685
  const enriched = timeline.map((entry) => ({
@@ -6631,11 +6746,11 @@ async function loadLatestRunForExport(client, project) {
6631
6746
  }
6632
6747
 
6633
6748
  // src/commands/history.ts
6634
- function getClient15() {
6749
+ function getClient16() {
6635
6750
  return createApiClient();
6636
6751
  }
6637
6752
  async function showHistory(project, format) {
6638
- const client = getClient15();
6753
+ const client = getClient16();
6639
6754
  try {
6640
6755
  const entries = await client.getHistory(project);
6641
6756
  if (format === "json") {
@@ -6674,11 +6789,11 @@ async function showHistory(project, format) {
6674
6789
  }
6675
6790
 
6676
6791
  // src/commands/status.ts
6677
- function getClient16() {
6792
+ function getClient17() {
6678
6793
  return createApiClient();
6679
6794
  }
6680
6795
  async function showStatus(project, format) {
6681
- const client = getClient16();
6796
+ const client = getClient17();
6682
6797
  const projectData = await client.getProject(project);
6683
6798
  const latest = await getLatestRunSummary(client, project);
6684
6799
  if (isMachineFormat(format)) {
@@ -6809,11 +6924,11 @@ var OPERATOR_CLI_COMMANDS = [
6809
6924
  ];
6810
6925
 
6811
6926
  // src/commands/project.ts
6812
- function getClient17() {
6927
+ function getClient18() {
6813
6928
  return createApiClient();
6814
6929
  }
6815
6930
  async function createProject(name, opts) {
6816
- const client = getClient17();
6931
+ const client = getClient18();
6817
6932
  const result = await client.putProject(name, {
6818
6933
  displayName: opts.displayName,
6819
6934
  canonicalDomain: opts.domain,
@@ -6829,7 +6944,7 @@ async function createProject(name, opts) {
6829
6944
  console.log(`Project created: ${result.name} (${result.id})`);
6830
6945
  }
6831
6946
  async function listProjects(format) {
6832
- const client = getClient17();
6947
+ const client = getClient18();
6833
6948
  const projects2 = await client.listProjects();
6834
6949
  if (format === "json") {
6835
6950
  console.log(JSON.stringify(projects2, null, 2));
@@ -6861,7 +6976,7 @@ async function listProjects(format) {
6861
6976
  }
6862
6977
  }
6863
6978
  async function showProject(name, format) {
6864
- const client = getClient17();
6979
+ const client = getClient18();
6865
6980
  const project = await client.getProject(name);
6866
6981
  if (isMachineFormat(format)) {
6867
6982
  console.log(JSON.stringify(project, null, 2));
@@ -6890,7 +7005,7 @@ async function showProject(name, format) {
6890
7005
  if (project.updatedAt) console.log(` Updated: ${project.updatedAt}`);
6891
7006
  }
6892
7007
  async function updateProjectSettings(name, opts) {
6893
- const client = getClient17();
7008
+ const client = getClient18();
6894
7009
  const project = await client.getProject(name);
6895
7010
  let ownedDomains = opts.ownedDomains ?? project.ownedDomains ?? [];
6896
7011
  if (opts.addOwnedDomain) {
@@ -6927,7 +7042,7 @@ async function updateProjectSettings(name, opts) {
6927
7042
  console.log(`Project updated: ${result.name}`);
6928
7043
  }
6929
7044
  async function deleteProject(name, opts) {
6930
- const client = getClient17();
7045
+ const client = getClient18();
6931
7046
  const isJson = isMachineFormat(opts?.format);
6932
7047
  if (opts?.dryRun) {
6933
7048
  const preview = await client.previewProjectDelete(name);
@@ -6957,7 +7072,7 @@ async function deleteProject(name, opts) {
6957
7072
  console.log(`Project deleted: ${name}`);
6958
7073
  }
6959
7074
  async function addLocation(project, opts) {
6960
- const client = getClient17();
7075
+ const client = getClient18();
6961
7076
  const location = await client.addLocation(project, {
6962
7077
  label: opts.label,
6963
7078
  city: opts.city,
@@ -6972,7 +7087,7 @@ async function addLocation(project, opts) {
6972
7087
  console.log(`Location added: ${opts.label} (${opts.city}, ${opts.region}, ${opts.country})`);
6973
7088
  }
6974
7089
  async function listLocations(project, format) {
6975
- const client = getClient17();
7090
+ const client = getClient18();
6976
7091
  const result = await client.listLocations(project);
6977
7092
  if (format === "json") {
6978
7093
  console.log(JSON.stringify(result, null, 2));
@@ -7006,7 +7121,7 @@ async function listLocations(project, format) {
7006
7121
  }
7007
7122
  }
7008
7123
  async function removeLocation(project, label, format) {
7009
- const client = getClient17();
7124
+ const client = getClient18();
7010
7125
  await client.removeLocation(project, label);
7011
7126
  if (isMachineFormat(format)) {
7012
7127
  console.log(JSON.stringify({ project, label, removed: true }, null, 2));
@@ -7015,7 +7130,7 @@ async function removeLocation(project, label, format) {
7015
7130
  console.log(`Location removed: ${label}`);
7016
7131
  }
7017
7132
  async function setDefaultLocation(project, label, format) {
7018
- const client = getClient17();
7133
+ const client = getClient18();
7019
7134
  const result = await client.setDefaultLocation(project, label);
7020
7135
  if (isMachineFormat(format)) {
7021
7136
  console.log(JSON.stringify({ project, ...result }, null, 2));
@@ -7256,12 +7371,12 @@ var REPORT_CLI_COMMANDS = [
7256
7371
  ];
7257
7372
 
7258
7373
  // src/commands/run.ts
7259
- function getClient18() {
7374
+ function getClient19() {
7260
7375
  return createApiClient();
7261
7376
  }
7262
7377
  var TERMINAL_STATUSES = /* @__PURE__ */ new Set(["completed", "partial", "failed", "cancelled"]);
7263
7378
  async function triggerRun(project, opts) {
7264
- const client = getClient18();
7379
+ const client = getClient19();
7265
7380
  const body = {};
7266
7381
  if (opts?.provider) {
7267
7382
  const providerInputs = opts.provider.split(",").map((s) => s.trim()).filter(Boolean);
@@ -7363,7 +7478,7 @@ async function triggerRun(project, opts) {
7363
7478
  }
7364
7479
  }
7365
7480
  async function triggerRunAll(opts) {
7366
- const client = getClient18();
7481
+ const client = getClient19();
7367
7482
  const projects2 = await client.listProjects();
7368
7483
  if (projects2.length === 0) {
7369
7484
  if (isMachineFormat(opts?.format)) {
@@ -7446,7 +7561,7 @@ async function triggerRunAll(opts) {
7446
7561
  }
7447
7562
  }
7448
7563
  async function cancelRun(project, runId, format) {
7449
- const client = getClient18();
7564
+ const client = getClient19();
7450
7565
  let targetId = runId;
7451
7566
  if (!targetId) {
7452
7567
  const runs = await client.listRuns(project);
@@ -7478,7 +7593,7 @@ To cancel by ID : canonry run cancel ${project} <run-id>`,
7478
7593
  console.log(`Run ${result.id} cancelled.`);
7479
7594
  }
7480
7595
  async function showRun(id, format) {
7481
- const client = getClient18();
7596
+ const client = getClient19();
7482
7597
  const run = await client.getRun(id);
7483
7598
  if (isMachineFormat(format)) {
7484
7599
  console.log(JSON.stringify(run, null, 2));
@@ -7487,7 +7602,7 @@ async function showRun(id, format) {
7487
7602
  printRunDetail(run);
7488
7603
  }
7489
7604
  async function listRuns(project, opts) {
7490
- const client = getClient18();
7605
+ const client = getClient19();
7491
7606
  const runs = await client.listRuns(project, opts?.limit, opts?.kind);
7492
7607
  if (opts?.format === "json") {
7493
7608
  console.log(JSON.stringify(runs, null, 2));
@@ -7662,11 +7777,11 @@ var RUN_CLI_COMMANDS = [
7662
7777
  ];
7663
7778
 
7664
7779
  // src/commands/schedule.ts
7665
- function getClient19() {
7780
+ function getClient20() {
7666
7781
  return createApiClient();
7667
7782
  }
7668
7783
  async function setSchedule(project, opts) {
7669
- const client = getClient19();
7784
+ const client = getClient20();
7670
7785
  const body = {};
7671
7786
  if (opts.kind) body.kind = opts.kind;
7672
7787
  if (opts.sourceId) body.sourceId = opts.sourceId;
@@ -7683,7 +7798,7 @@ async function setSchedule(project, opts) {
7683
7798
  printSchedule(result);
7684
7799
  }
7685
7800
  async function showSchedule(project, format, kind) {
7686
- const client = getClient19();
7801
+ const client = getClient20();
7687
7802
  const result = await client.getSchedule(project, kind);
7688
7803
  if (isMachineFormat(format)) {
7689
7804
  console.log(JSON.stringify(result, null, 2));
@@ -7692,7 +7807,7 @@ async function showSchedule(project, format, kind) {
7692
7807
  printSchedule(result);
7693
7808
  }
7694
7809
  async function enableSchedule(project, format, kind) {
7695
- const client = getClient19();
7810
+ const client = getClient20();
7696
7811
  const current = await client.getSchedule(project, kind);
7697
7812
  const body = { kind: current.kind, timezone: current.timezone, enabled: true };
7698
7813
  if (current.preset) body.preset = current.preset;
@@ -7707,7 +7822,7 @@ async function enableSchedule(project, format, kind) {
7707
7822
  console.log(`Schedule enabled for "${project}" (kind: ${result.kind})`);
7708
7823
  }
7709
7824
  async function disableSchedule(project, format, kind) {
7710
- const client = getClient19();
7825
+ const client = getClient20();
7711
7826
  const current = await client.getSchedule(project, kind);
7712
7827
  const body = { kind: current.kind, timezone: current.timezone, enabled: false };
7713
7828
  if (current.preset) body.preset = current.preset;
@@ -7722,7 +7837,7 @@ async function disableSchedule(project, format, kind) {
7722
7837
  console.log(`Schedule disabled for "${project}" (kind: ${result.kind})`);
7723
7838
  }
7724
7839
  async function removeSchedule(project, format, kind) {
7725
- const client = getClient19();
7840
+ const client = getClient20();
7726
7841
  await client.deleteSchedule(project, kind);
7727
7842
  const resolvedKind = kind ?? "answer-visibility";
7728
7843
  if (isMachineFormat(format)) {
@@ -7840,11 +7955,11 @@ var SCHEDULE_CLI_COMMANDS = [
7840
7955
  ];
7841
7956
 
7842
7957
  // src/commands/settings.ts
7843
- function getClient20() {
7958
+ function getClient21() {
7844
7959
  return createApiClient();
7845
7960
  }
7846
7961
  async function setProvider(name, opts) {
7847
- const client = getClient20();
7962
+ const client = getClient21();
7848
7963
  const { format, ...payload } = opts;
7849
7964
  const result = await client.updateProvider(name, payload);
7850
7965
  if (isMachineFormat(format)) {
@@ -7860,7 +7975,7 @@ async function setProvider(name, opts) {
7860
7975
  }
7861
7976
  }
7862
7977
  async function showSettings(format) {
7863
- const client = getClient20();
7978
+ const client = getClient21();
7864
7979
  const config = loadConfig();
7865
7980
  const settings = await client.getSettings();
7866
7981
  if (isMachineFormat(format)) {
@@ -8407,7 +8522,7 @@ function wrapText(font, text, size, maxWidth) {
8407
8522
  }
8408
8523
 
8409
8524
  // src/commands/snapshot.ts
8410
- function getClient21() {
8525
+ function getClient22() {
8411
8526
  return createApiClient();
8412
8527
  }
8413
8528
  function slugify(value) {
@@ -8418,7 +8533,7 @@ function autoOutputPath(companyName, ext) {
8418
8533
  return `${slugify(companyName)}-snapshot-${date}.${ext}`;
8419
8534
  }
8420
8535
  async function createSnapshotReport(companyName, opts) {
8421
- const client = getClient21();
8536
+ const client = getClient22();
8422
8537
  const report = await client.createSnapshot({
8423
8538
  companyName,
8424
8539
  domain: opts.domain,
@@ -10365,7 +10480,7 @@ var SYSTEM_CLI_COMMANDS = [
10365
10480
  import fs11 from "fs";
10366
10481
 
10367
10482
  // src/commands/wordpress.ts
10368
- function getClient22() {
10483
+ function getClient23() {
10369
10484
  return createApiClient();
10370
10485
  }
10371
10486
  async function loadYamlModule() {
@@ -10515,7 +10630,7 @@ async function wordpressConnect(project, opts) {
10515
10630
  details: { project }
10516
10631
  });
10517
10632
  }
10518
- const client = getClient22();
10633
+ const client = getClient23();
10519
10634
  const result = await client.wordpressConnect(project, {
10520
10635
  url: opts.url,
10521
10636
  stagingUrl: opts.stagingUrl,
@@ -10532,7 +10647,7 @@ async function wordpressConnect(project, opts) {
10532
10647
  printWordpressStatus(project, result);
10533
10648
  }
10534
10649
  async function wordpressDisconnect(project, format) {
10535
- const client = getClient22();
10650
+ const client = getClient23();
10536
10651
  await client.wordpressDisconnect(project);
10537
10652
  if (isMachineFormat(format)) {
10538
10653
  printJson2({ project, disconnected: true });
@@ -10541,7 +10656,7 @@ async function wordpressDisconnect(project, format) {
10541
10656
  console.log(`WordPress disconnected from project "${project}".`);
10542
10657
  }
10543
10658
  async function wordpressStatus(project, format) {
10544
- const client = getClient22();
10659
+ const client = getClient23();
10545
10660
  const result = await client.wordpressStatus(project);
10546
10661
  if (isMachineFormat(format)) {
10547
10662
  printJson2(result);
@@ -10550,7 +10665,7 @@ async function wordpressStatus(project, format) {
10550
10665
  printWordpressStatus(project, result);
10551
10666
  }
10552
10667
  async function wordpressPages(project, opts) {
10553
- const client = getClient22();
10668
+ const client = getClient23();
10554
10669
  const result = await client.wordpressPages(project, opts.env);
10555
10670
  if (isMachineFormat(opts.format)) {
10556
10671
  printJson2(result);
@@ -10559,7 +10674,7 @@ async function wordpressPages(project, opts) {
10559
10674
  printPages(project, result.env, result.pages);
10560
10675
  }
10561
10676
  async function wordpressPage(project, slug, opts) {
10562
- const client = getClient22();
10677
+ const client = getClient23();
10563
10678
  const result = await client.wordpressPage(project, slug, opts.env);
10564
10679
  if (isMachineFormat(opts.format)) {
10565
10680
  printJson2(result);
@@ -10568,7 +10683,7 @@ async function wordpressPage(project, slug, opts) {
10568
10683
  printPageDetail(result);
10569
10684
  }
10570
10685
  async function wordpressCreatePage(project, body) {
10571
- const client = getClient22();
10686
+ const client = getClient23();
10572
10687
  const result = await client.wordpressCreatePage(project, body);
10573
10688
  if (isMachineFormat(body.format)) {
10574
10689
  printJson2(result);
@@ -10579,7 +10694,7 @@ async function wordpressCreatePage(project, body) {
10579
10694
  printPageDetail(result);
10580
10695
  }
10581
10696
  async function wordpressUpdatePage(project, body) {
10582
- const client = getClient22();
10697
+ const client = getClient23();
10583
10698
  const result = await client.wordpressUpdatePage(project, body);
10584
10699
  if (isMachineFormat(body.format)) {
10585
10700
  printJson2(result);
@@ -10590,7 +10705,7 @@ async function wordpressUpdatePage(project, body) {
10590
10705
  printPageDetail(result);
10591
10706
  }
10592
10707
  async function wordpressSetMeta(project, body) {
10593
- const client = getClient22();
10708
+ const client = getClient23();
10594
10709
  const result = await client.wordpressSetMeta(project, body);
10595
10710
  if (isMachineFormat(body.format)) {
10596
10711
  printJson2(result);
@@ -10640,7 +10755,7 @@ async function wordpressBulkSetMeta(project, opts) {
10640
10755
  details: { path: filePath }
10641
10756
  });
10642
10757
  }
10643
- const client = getClient22();
10758
+ const client = getClient23();
10644
10759
  const result = await client.wordpressBulkSetMeta(project, { entries, env: opts.env });
10645
10760
  if (isMachineFormat(opts.format)) {
10646
10761
  printJson2(result);
@@ -10683,7 +10798,7 @@ async function wordpressBulkSetMeta(project, opts) {
10683
10798
  Total: ${applied.length} applied, ${skipped.length} skipped, ${manual.length} manual`);
10684
10799
  }
10685
10800
  async function wordpressSchema(project, slug, opts) {
10686
- const client = getClient22();
10801
+ const client = getClient23();
10687
10802
  const result = await client.wordpressSchema(project, slug, opts.env);
10688
10803
  if (isMachineFormat(opts.format)) {
10689
10804
  printJson2(result);
@@ -10694,7 +10809,7 @@ async function wordpressSchema(project, slug, opts) {
10694
10809
  printSchemaBlocks(result.blocks);
10695
10810
  }
10696
10811
  async function wordpressSetSchema(project, body) {
10697
- const client = getClient22();
10812
+ const client = getClient23();
10698
10813
  const result = await client.wordpressSetSchema(project, body);
10699
10814
  if (isMachineFormat(body.format)) {
10700
10815
  printJson2(result);
@@ -10742,7 +10857,7 @@ async function wordpressSchemaDeploy(project, opts) {
10742
10857
  details: { path: filePath }
10743
10858
  });
10744
10859
  }
10745
- const client = getClient22();
10860
+ const client = getClient23();
10746
10861
  const result = await client.wordpressSchemaDeploy(project, { profile: parsed, env: opts.env });
10747
10862
  if (isMachineFormat(opts.format)) {
10748
10863
  printJson2(result);
@@ -10781,7 +10896,7 @@ async function wordpressSchemaDeploy(project, opts) {
10781
10896
  Total: ${deployed} deployed, ${stripped} stripped, ${skipped} skipped, ${failed} failed`);
10782
10897
  }
10783
10898
  async function wordpressSchemaStatus(project, opts) {
10784
- const client = getClient22();
10899
+ const client = getClient23();
10785
10900
  const result = await client.wordpressSchemaStatus(project, opts.env);
10786
10901
  if (isMachineFormat(opts.format)) {
10787
10902
  printJson2(result);
@@ -10840,7 +10955,7 @@ async function wordpressOnboard(project, opts) {
10840
10955
  });
10841
10956
  }
10842
10957
  }
10843
- const client = getClient22();
10958
+ const client = getClient23();
10844
10959
  const result = await client.wordpressOnboard(project, {
10845
10960
  url: opts.url,
10846
10961
  username: opts.user,
@@ -10865,7 +10980,7 @@ async function wordpressOnboard(project, opts) {
10865
10980
  }
10866
10981
  }
10867
10982
  async function wordpressLlmsTxt(project, opts) {
10868
- const client = getClient22();
10983
+ const client = getClient23();
10869
10984
  const result = await client.wordpressLlmsTxt(project, opts.env);
10870
10985
  if (isMachineFormat(opts.format)) {
10871
10986
  printJson2(result);
@@ -10876,7 +10991,7 @@ async function wordpressLlmsTxt(project, opts) {
10876
10991
  console.log(result.content ?? "(not found)");
10877
10992
  }
10878
10993
  async function wordpressSetLlmsTxt(project, body) {
10879
- const client = getClient22();
10994
+ const client = getClient23();
10880
10995
  const result = await client.wordpressSetLlmsTxt(project, body);
10881
10996
  if (isMachineFormat(body.format)) {
10882
10997
  printJson2(result);
@@ -10885,7 +11000,7 @@ async function wordpressSetLlmsTxt(project, body) {
10885
11000
  printManualAssist(`llms.txt update for "${project}"`, result);
10886
11001
  }
10887
11002
  async function wordpressAudit(project, opts) {
10888
- const client = getClient22();
11003
+ const client = getClient23();
10889
11004
  const result = await client.wordpressAudit(project, opts.env);
10890
11005
  if (isMachineFormat(opts.format)) {
10891
11006
  printJson2(result);
@@ -10899,7 +11014,7 @@ async function wordpressAudit(project, opts) {
10899
11014
  printAuditIssues(result.issues);
10900
11015
  }
10901
11016
  async function wordpressDiff(project, slug, format) {
10902
- const client = getClient22();
11017
+ const client = getClient23();
10903
11018
  const result = await client.wordpressDiff(project, slug);
10904
11019
  if (isMachineFormat(format)) {
10905
11020
  printJson2(result);
@@ -10908,7 +11023,7 @@ async function wordpressDiff(project, slug, format) {
10908
11023
  printDiff(result);
10909
11024
  }
10910
11025
  async function wordpressStagingStatus(project, format) {
10911
- const client = getClient22();
11026
+ const client = getClient23();
10912
11027
  const result = await client.wordpressStagingStatus(project);
10913
11028
  if (isMachineFormat(format)) {
10914
11029
  printJson2(result);
@@ -10922,7 +11037,7 @@ async function wordpressStagingStatus(project, format) {
10922
11037
  console.log(` Admin URL: ${result.adminUrl}`);
10923
11038
  }
10924
11039
  async function wordpressStagingPush(project, format) {
10925
- const client = getClient22();
11040
+ const client = getClient23();
10926
11041
  const result = await client.wordpressStagingPush(project);
10927
11042
  if (isMachineFormat(format)) {
10928
11043
  printJson2(result);
@@ -11927,6 +12042,7 @@ var REGISTERED_CLI_COMMANDS = [
11927
12042
  ...REPORT_CLI_COMMANDS,
11928
12043
  ...QUERY_CLI_COMMANDS,
11929
12044
  ...KEYWORD_CLI_COMMANDS,
12045
+ ...KEYS_CLI_COMMANDS,
11930
12046
  ...COMPETITOR_CLI_COMMANDS,
11931
12047
  ...SETTINGS_CLI_COMMANDS,
11932
12048
  ...SKILLS_CLI_COMMANDS,