@ainyc/canonry 4.100.0 → 4.101.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 (27) hide show
  1. package/assets/agent-workspace/skills/canonry/references/canonry-cli.md +0 -12
  2. package/assets/assets/{BacklinksPage-DWZdWEm3.js → BacklinksPage-aysk_iGy.js} +1 -1
  3. package/assets/assets/{ChartPrimitives-C-ky5206.js → ChartPrimitives-CmKqxndA.js} +1 -1
  4. package/assets/assets/ProjectPage-dduZrrBr.js +7 -0
  5. package/assets/assets/{RunRow-Bj-D4kZe.js → RunRow-Ba77hJ4d.js} +1 -1
  6. package/assets/assets/{RunsPage-GktitsAV.js → RunsPage-D3IAdQMB.js} +1 -1
  7. package/assets/assets/{SettingsPage-AsFLFDS3.js → SettingsPage-Y54JtLw-.js} +1 -1
  8. package/assets/assets/{TrafficPage-Cf3uCkxs.js → TrafficPage-DawzPWdt.js} +1 -1
  9. package/assets/assets/{TrafficSourceDetailPage-B5t7nf9C.js → TrafficSourceDetailPage-DAhQwFVb.js} +1 -1
  10. package/assets/assets/{arrow-left-CZFQuQO_.js → arrow-left-NsJbgqmV.js} +1 -1
  11. package/assets/assets/{extract-error-message--bieZ2IX.js → extract-error-message-u00ggxeK.js} +1 -1
  12. package/assets/assets/index-4YArcfwj.js +210 -0
  13. package/assets/assets/index-BCuWbxUj.css +1 -0
  14. package/assets/assets/{trash-2-sKO0k75f.js → trash-2-BBdbbe60.js} +1 -1
  15. package/assets/index.html +2 -2
  16. package/dist/{chunk-UVIHWF45.js → chunk-2YPVK75M.js} +6 -28
  17. package/dist/{chunk-SNHYRSUF.js → chunk-AV3DHH6B.js} +153 -369
  18. package/dist/{chunk-ADLS64PG.js → chunk-HUL5FUBD.js} +6 -105
  19. package/dist/{chunk-74SOIAIY.js → chunk-O3SFVGDF.js} +531 -49
  20. package/dist/cli.js +26 -114
  21. package/dist/index.js +4 -4
  22. package/dist/{intelligence-service-3CRNJLUZ.js → intelligence-service-R6QJ3KC2.js} +2 -2
  23. package/dist/mcp.js +2 -2
  24. package/package.json +7 -7
  25. package/assets/assets/ProjectPage-CpbFpi6J.js +0 -6
  26. package/assets/assets/index-9hI0ODQU.css +0 -1
  27. package/assets/assets/index-Cb2h7KkD.js +0 -210
package/dist/cli.js CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node --import tsx
2
2
  import {
3
+ AERO_TOOL_PROFILES,
3
4
  backfillAiReferralPaths,
4
5
  backfillAiReferralPathsCommand,
5
6
  backfillAnswerMentionsCommand,
@@ -18,6 +19,7 @@ import {
18
19
  getMissingUserSkillsNudge,
19
20
  getOrCreateAnonymousId,
20
21
  installSkills,
22
+ isAeroToolProfile,
21
23
  isFirstRun,
22
24
  isTelemetryEnabled,
23
25
  listAgentProviders,
@@ -27,7 +29,7 @@ import {
27
29
  setTelemetrySource,
28
30
  showFirstRunNotice,
29
31
  trackEvent
30
- } from "./chunk-74SOIAIY.js";
32
+ } from "./chunk-O3SFVGDF.js";
31
33
  import {
32
34
  CliError,
33
35
  EXIT_SYSTEM_ERROR,
@@ -44,7 +46,7 @@ import {
44
46
  saveConfig,
45
47
  saveConfigPatch,
46
48
  usageError
47
- } from "./chunk-UVIHWF45.js";
49
+ } from "./chunk-2YPVK75M.js";
48
50
  import {
49
51
  apiKeys,
50
52
  createClient,
@@ -52,7 +54,7 @@ import {
52
54
  projects,
53
55
  queries,
54
56
  renderReportHtml
55
- } from "./chunk-SNHYRSUF.js";
57
+ } from "./chunk-AV3DHH6B.js";
56
58
  import {
57
59
  BacklinkSources,
58
60
  CcReleaseSyncStatuses,
@@ -72,14 +74,13 @@ import {
72
74
  formatIsoDate,
73
75
  formatMicros,
74
76
  formatRatio,
75
- formatRelativeTime,
76
77
  formatRunErrorOneLine,
77
78
  normalizeProjectAliases,
78
79
  notificationEventSchema,
79
80
  providerQuotaPolicySchema,
80
81
  resolveProviderInput,
81
82
  winnabilityClassSchema
82
- } from "./chunk-ADLS64PG.js";
83
+ } from "./chunk-HUL5FUBD.js";
83
84
 
84
85
  // src/cli.ts
85
86
  import { pathToFileURL } from "url";
@@ -9595,103 +9596,6 @@ function pct2(value) {
9595
9596
  return `${(value * 100).toFixed(1)}%`;
9596
9597
  }
9597
9598
 
9598
- // src/commands/portfolio.ts
9599
- async function showPortfolio(opts) {
9600
- const client = createApiClient();
9601
- const portfolio = await client.getPortfolio();
9602
- if (isMachineFormat(opts.format)) {
9603
- if (opts.format === "jsonl") {
9604
- emitJsonl(portfolio.changeFeed);
9605
- return;
9606
- }
9607
- console.log(JSON.stringify(portfolio, null, 2));
9608
- return;
9609
- }
9610
- renderHuman2(portfolio);
9611
- }
9612
- function renderHuman2(p) {
9613
- const now = p.generatedAt;
9614
- const sweep = p.lastSweepAt ? formatRelativeTime(p.lastSweepAt, now) : "never";
9615
- console.log(`
9616
- Portfolio \xB7 ${p.projectCount} project${p.projectCount === 1 ? "" : "s"} \xB7 last sweep ${sweep}
9617
- `);
9618
- const moreLabel = p.changeFeedTotal > p.changeFeed.length ? ` (showing ${p.changeFeed.length} of ${p.changeFeedTotal})` : "";
9619
- console.log(`What changed${moreLabel}:`);
9620
- if (p.changeFeed.length === 0) {
9621
- const empty = p.feedEmptyState;
9622
- console.log(` ${empty ? `${empty.title} \u2014 ${empty.detail}` : "No changes."}`);
9623
- } else {
9624
- for (const c of p.changeFeed) {
9625
- console.log(` ${changeGlyph(c.tone)} ${c.title} (${formatRelativeTime(c.occurredAt, now)})`);
9626
- if (c.detail) console.log(` ${c.detail}`);
9627
- }
9628
- }
9629
- console.log("\nRecent runs (M mentioned in answer \xB7 C cited in sources):");
9630
- if (p.recentRuns.length === 0) {
9631
- console.log(" Run history appears here after the first sweep.");
9632
- } else {
9633
- for (const r of p.recentRuns) {
9634
- console.log(
9635
- ` ${pad(r.projectName, 20)} ${pad(runResult(r), 20)} ${pad(runWhen(r, now), 20)} ${runDuration(r)}`
9636
- );
9637
- }
9638
- }
9639
- console.log("\nProjects:");
9640
- for (const proj of p.projects) {
9641
- const mentioned = `M ${proj.mentionedOfTotal.mentioned}/${proj.mentionedOfTotal.total}`;
9642
- const cited = `C ${proj.citedOfTotal.cited}/${proj.citedOfTotal.total}`;
9643
- console.log(
9644
- ` ${pad(proj.projectSlug, 20)} ${String(proj.mentionScore).padStart(3)} ${pad(mentioned, 10)} ${pad(cited, 10)} ${projectDelta(proj)}`
9645
- );
9646
- }
9647
- console.log();
9648
- }
9649
- function changeGlyph(tone) {
9650
- switch (tone) {
9651
- case "negative":
9652
- return "v";
9653
- case "positive":
9654
- return "^";
9655
- case "caution":
9656
- return "!";
9657
- case "neutral":
9658
- return ".";
9659
- }
9660
- }
9661
- function runResult(r) {
9662
- if (r.status === "failed") return r.errorSummary ?? "failed";
9663
- if (r.mentionedCount == null || r.citedCount == null || r.totalCount == null) return "\u2014";
9664
- return `M ${r.mentionedCount}/${r.totalCount} \xB7 C ${r.citedCount}/${r.totalCount}`;
9665
- }
9666
- function runWhen(r, now) {
9667
- const ts = r.finishedAt ?? r.startedAt ?? r.createdAt;
9668
- const rel = formatRelativeTime(ts, now);
9669
- if (r.status === "running") return `started ${rel}`;
9670
- if (r.status === "queued") return `queued ${rel}`;
9671
- return `finished ${rel}`;
9672
- }
9673
- function runDuration(r) {
9674
- if (r.durationMs == null) {
9675
- return r.status === "running" ? "running" : r.status === "queued" ? "waiting" : "\u2014";
9676
- }
9677
- const seconds = Math.floor(r.durationMs / 1e3);
9678
- if (seconds < 1) return "<1s";
9679
- if (seconds < 60) return `${seconds}s`;
9680
- return `${Math.floor(seconds / 60)}m ${seconds % 60}s`;
9681
- }
9682
- function projectDelta(proj) {
9683
- if (!proj.hasEverRun) return "never run";
9684
- const parts = [];
9685
- if (proj.mentionDelta.gained > 0) parts.push(`+${proj.mentionDelta.gained}`);
9686
- if (proj.mentionDelta.lost > 0) parts.push(`-${proj.mentionDelta.lost}`);
9687
- if (parts.length === 0) return proj.mentionDelta.comparable ? "no change" : "first sweep";
9688
- return `${parts.join(" ")} mentioned${proj.mentionDelta.comparable ? "" : "*"}`;
9689
- }
9690
- function pad(value, width) {
9691
- if (value.length >= width) return `${value.slice(0, width - 1)} `;
9692
- return value.padEnd(width);
9693
- }
9694
-
9695
9599
  // src/commands/search.ts
9696
9600
  async function searchProject(project, opts) {
9697
9601
  const client = createApiClient();
@@ -9891,14 +9795,6 @@ var INTELLIGENCE_CLI_COMMANDS = [
9891
9795
  await showOverview(project, { format: input.format, location, since });
9892
9796
  }
9893
9797
  },
9894
- {
9895
- path: ["portfolio"],
9896
- usage: "canonry portfolio [--format json|jsonl]",
9897
- options: {},
9898
- run: async (input) => {
9899
- await showPortfolio({ format: input.format });
9900
- }
9901
- },
9902
9798
  {
9903
9799
  path: ["search"],
9904
9800
  usage: "canonry search <project> <query> [--limit <n>] [--format json]",
@@ -12768,7 +12664,8 @@ async function agentAsk(opts) {
12768
12664
  prompt: opts.prompt,
12769
12665
  provider: opts.provider,
12770
12666
  modelId: opts.modelId,
12771
- scope: opts.scope ?? "all"
12667
+ scope: opts.scope ?? "all",
12668
+ ...opts.profile ? { profile: opts.profile } : {}
12772
12669
  },
12773
12670
  controller.signal
12774
12671
  );
@@ -13034,14 +12931,15 @@ var AGENT_ASK_SCOPES = ["all", "read-only"];
13034
12931
  var AGENT_CLI_COMMANDS = [
13035
12932
  {
13036
12933
  path: ["agent", "ask"],
13037
- usage: `canonry agent ask <project> "<prompt>" [--provider ${listAgentProviders().join("|")}] [--model <id>] [--scope all|read-only] [--format json]`,
12934
+ usage: `canonry agent ask <project> "<prompt>" [--provider ${listAgentProviders().join("|")}] [--model <id>] [--scope all|read-only] [--profile default|ads-operator] [--format json]`,
13038
12935
  options: {
13039
12936
  provider: stringOption(),
13040
12937
  model: stringOption(),
13041
- scope: stringOption()
12938
+ scope: stringOption(),
12939
+ profile: stringOption()
13042
12940
  },
13043
12941
  run: async (input) => {
13044
- const usage = `canonry agent ask <project> "<prompt>" [--provider ${listAgentProviders().join("|")}] [--model <id>] [--scope all|read-only] [--format json]`;
12942
+ const usage = `canonry agent ask <project> "<prompt>" [--provider ${listAgentProviders().join("|")}] [--model <id>] [--scope all|read-only] [--profile default|ads-operator] [--format json]`;
13045
12943
  const project = requireProject(input, "agent.ask", usage);
13046
12944
  const prompt2 = input.positionals.slice(1).join(" ").trim();
13047
12945
  if (!prompt2) {
@@ -13080,12 +12978,26 @@ Usage: ${usage}`, {
13080
12978
  }
13081
12979
  });
13082
12980
  }
12981
+ const profileInput = getString(input.values, "profile");
12982
+ if (profileInput && !isAeroToolProfile(profileInput)) {
12983
+ throw usageError(`Error: --profile must be one of: ${AERO_TOOL_PROFILES.join(", ")}
12984
+ Usage: ${usage}`, {
12985
+ message: `--profile must be one of: ${AERO_TOOL_PROFILES.join(", ")}`,
12986
+ details: {
12987
+ command: "agent.ask",
12988
+ usage,
12989
+ profile: profileInput,
12990
+ validProfiles: AERO_TOOL_PROFILES
12991
+ }
12992
+ });
12993
+ }
13083
12994
  await agentAsk({
13084
12995
  project,
13085
12996
  prompt: prompt2,
13086
12997
  provider: coerceAgentProvider(providerInput),
13087
12998
  modelId: getString(input.values, "model"),
13088
12999
  scope: scopeInput,
13000
+ profile: profileInput,
13089
13001
  format: input.format
13090
13002
  });
13091
13003
  }
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  createServer
3
- } from "./chunk-74SOIAIY.js";
3
+ } from "./chunk-O3SFVGDF.js";
4
4
  import {
5
5
  loadConfig
6
- } from "./chunk-UVIHWF45.js";
7
- import "./chunk-SNHYRSUF.js";
8
- import "./chunk-ADLS64PG.js";
6
+ } from "./chunk-2YPVK75M.js";
7
+ import "./chunk-AV3DHH6B.js";
8
+ import "./chunk-HUL5FUBD.js";
9
9
  export {
10
10
  createServer,
11
11
  loadConfig
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  IntelligenceService
3
- } from "./chunk-SNHYRSUF.js";
4
- import "./chunk-ADLS64PG.js";
3
+ } from "./chunk-AV3DHH6B.js";
4
+ import "./chunk-HUL5FUBD.js";
5
5
  export {
6
6
  IntelligenceService
7
7
  };
package/dist/mcp.js CHANGED
@@ -3,10 +3,10 @@ import {
3
3
  PACKAGE_VERSION,
4
4
  canonryMcpTools,
5
5
  createApiClient
6
- } from "./chunk-UVIHWF45.js";
6
+ } from "./chunk-2YPVK75M.js";
7
7
  import {
8
8
  isReadOnlyKey
9
- } from "./chunk-ADLS64PG.js";
9
+ } from "./chunk-HUL5FUBD.js";
10
10
 
11
11
  // src/mcp/cli.ts
12
12
  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.100.0",
3
+ "version": "4.101.0",
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",
@@ -64,25 +64,25 @@
64
64
  "tsx": "^4.19.0",
65
65
  "@ainyc/canonry-api-client": "0.0.0",
66
66
  "@ainyc/canonry-api-routes": "0.0.0",
67
+ "@ainyc/canonry-config": "0.0.0",
67
68
  "@ainyc/canonry-contracts": "0.0.0",
68
69
  "@ainyc/canonry-db": "0.0.0",
69
- "@ainyc/canonry-integration-bing": "0.0.0",
70
- "@ainyc/canonry-config": "0.0.0",
71
70
  "@ainyc/canonry-integration-openai-ads": "0.0.0",
71
+ "@ainyc/canonry-integration-bing": "0.0.0",
72
72
  "@ainyc/canonry-integration-commoncrawl": "0.0.0",
73
+ "@ainyc/canonry-integration-cloud-run": "0.0.0",
73
74
  "@ainyc/canonry-integration-google": "0.0.0",
74
75
  "@ainyc/canonry-integration-google-business-profile": "0.0.0",
75
- "@ainyc/canonry-integration-cloud-run": "0.0.0",
76
76
  "@ainyc/canonry-integration-google-places": "0.0.0",
77
77
  "@ainyc/canonry-integration-traffic": "0.0.0",
78
78
  "@ainyc/canonry-integration-wordpress": "0.0.0",
79
- "@ainyc/canonry-provider-cdp": "0.0.0",
80
79
  "@ainyc/canonry-intelligence": "0.0.0",
80
+ "@ainyc/canonry-provider-cdp": "0.0.0",
81
81
  "@ainyc/canonry-provider-claude": "0.0.0",
82
82
  "@ainyc/canonry-provider-local": "0.0.0",
83
83
  "@ainyc/canonry-provider-gemini": "0.0.0",
84
- "@ainyc/canonry-provider-perplexity": "0.0.0",
85
- "@ainyc/canonry-provider-openai": "0.0.0"
84
+ "@ainyc/canonry-provider-openai": "0.0.0",
85
+ "@ainyc/canonry-provider-perplexity": "0.0.0"
86
86
  },
87
87
  "scripts": {
88
88
  "build": "tsx scripts/copy-agent-assets.ts && tsup && tsx build-web.ts",