@canonry/canonry 7.130.0 → 7.131.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 (109) hide show
  1. package/assets/agent-workspace/skills/canonry/references/canonry-cli.md +5 -3
  2. package/dist/{activity-VIJVNTMK.js → activity-URKAZ4QI.js} +4 -4
  3. package/dist/{ads-PLZRG4BQ.js → ads-OEKDHREI.js} +4 -4
  4. package/dist/{agent-RFRMOTLE.js → agent-TBU46LO6.js} +6 -6
  5. package/dist/{agent-ask-CB756SUB.js → agent-ask-EDJZGROO.js} +25 -21
  6. package/dist/agent-conversations-BQKCD4CA.js +44 -0
  7. package/dist/{agent-journeys-PLYAVLGB.js → agent-journeys-ASY5XCAJ.js} +3 -3
  8. package/dist/agent-memory-HAGNNLCP.js +74 -0
  9. package/dist/agent-providers-WUDOCAHF.js +49 -0
  10. package/dist/agent-transcript-4MAQ7NCM.js +62 -0
  11. package/dist/{analytics-W6B2FQSA.js → analytics-RYRF5TFC.js} +3 -3
  12. package/dist/{answerability-BDOOPOJF.js → answerability-7VPMCZHE.js} +3 -3
  13. package/dist/{apply-LCANKKT5.js → apply-BNTPH5FW.js} +8 -5
  14. package/dist/{backfill-E3EVDP2O.js → backfill-2DYJLCOU.js} +5 -5
  15. package/dist/{backlinks-ZXSN3XNV.js → backlinks-5HZTCZFW.js} +11 -6
  16. package/dist/{bing-FMDKRCXN.js → bing-S6BOIOTS.js} +31 -17
  17. package/dist/{bootstrap-IHKKYDBO.js → bootstrap-EITWL66P.js} +6 -6
  18. package/dist/{cdp-ASPLW35M.js → cdp-TY2TZB7J.js} +13 -7
  19. package/dist/{chunk-MI575M4K.js → chunk-3CDHCDCE.js} +25 -24
  20. package/dist/{chunk-JUZ4ZCOX.js → chunk-3GAJD5NP.js} +3 -3
  21. package/dist/{chunk-MARIMDMX.js → chunk-3LXRY57V.js} +60 -48
  22. package/dist/{chunk-XVEPR3ZC.js → chunk-3STPYNCP.js} +3 -3
  23. package/dist/{chunk-Z77D43M5.js → chunk-623X526L.js} +1 -1
  24. package/dist/{chunk-76N4UIAF.js → chunk-63FHJJUO.js} +435 -444
  25. package/dist/chunk-APKBR2BP.js +40 -0
  26. package/dist/{chunk-VEDGR4LZ.js → chunk-BJWPYUKT.js} +1 -1
  27. package/dist/{chunk-37MF5NMW.js → chunk-CBREBUUV.js} +1 -1
  28. package/dist/{chunk-NUYKLS2R.js → chunk-CUXA47XW.js} +2 -2
  29. package/dist/{chunk-HH6FQW5W.js → chunk-DYDATNE5.js} +6 -3
  30. package/dist/{chunk-NUBJTRIV.js → chunk-HMCDVKHS.js} +4 -4
  31. package/dist/{chunk-S6X3HHSN.js → chunk-IPUZGRSN.js} +2 -2
  32. package/dist/{chunk-WZPKPA6I.js → chunk-KJX5CMPC.js} +1 -1
  33. package/dist/{chunk-4ISL4JNK.js → chunk-LXFLUFQT.js} +2 -2
  34. package/dist/{chunk-5U4HCSI6.js → chunk-NK4G4JPQ.js} +2 -2
  35. package/dist/{chunk-JMJSAK2H.js → chunk-NYZH7SM2.js} +2 -2
  36. package/dist/{chunk-MQFH765X.js → chunk-P4ETUNQR.js} +3 -3
  37. package/dist/{chunk-VON4PHNS.js → chunk-RGT2S3VS.js} +35 -15
  38. package/dist/{chunk-KQQERQJ2.js → chunk-RSB3X7UR.js} +2 -2
  39. package/dist/{chunk-52J7GFCK.js → chunk-T6CABZ3N.js} +1 -1
  40. package/dist/{chunk-GVCL4XBU.js → chunk-UFVVOJU3.js} +2 -2
  41. package/dist/{chunk-BERGWPA7.js → chunk-WEJOT2VP.js} +1 -1
  42. package/dist/{chunk-4KITKJPN.js → chunk-WIQBXZMU.js} +4 -4
  43. package/dist/{chunk-ZHWJJVCT.js → chunk-X3ES2XOJ.js} +1 -1
  44. package/dist/{chunk-QRIKJT6Y.js → chunk-Y7JEJNNS.js} +32 -3
  45. package/dist/{chunk-GXLF45FF.js → chunk-ZSVQTHX3.js} +7 -6
  46. package/dist/{citations-YWXR3WBL.js → citations-ERRYYKNY.js} +7 -5
  47. package/dist/{cli-catalog-RT3QPDLR.js → cli-catalog-ETUQDYOX.js} +3 -3
  48. package/dist/{cli-commands-6J6A5ULK.js → cli-commands-ORLKC2XM.js} +7 -6
  49. package/dist/cli.js +30 -19
  50. package/dist/{competitor-6ZTA2SZH.js → competitor-IC6KRZAD.js} +7 -4
  51. package/dist/{content-DJYGQ5CP.js → content-3Y6ZKQHG.js} +6 -5
  52. package/dist/{dashboard-F7NFKQLL.js → dashboard-XBS4EVSA.js} +4 -4
  53. package/dist/{demo-653PUOIB.js → demo-7D4W32J6.js} +2 -2
  54. package/dist/{demo-server-PVBLYPC5.js → demo-server-CGOD7EPX.js} +5 -5
  55. package/dist/{discover-3E7QM2TL.js → discover-34E5JIM5.js} +3 -3
  56. package/dist/{discover-eval-NAZPA6PV.js → discover-eval-TLH2MMNK.js} +41 -16
  57. package/dist/{doctor-OFFSPNBK.js → doctor-SGJQPWRI.js} +3 -3
  58. package/dist/{evidence-VOSSML2G.js → evidence-TFFVSNEL.js} +6 -5
  59. package/dist/{export-cmd-IVACTDSV.js → export-cmd-YRG7CEVX.js} +3 -3
  60. package/dist/{ga-BX4C7TPI.js → ga-VVJWYWQX.js} +6 -5
  61. package/dist/{gbp-SV3J2VG3.js → gbp-RYA62WDX.js} +23 -10
  62. package/dist/{google-J23OD7TR.js → google-5HRSXPUF.js} +13 -12
  63. package/dist/{google-marketing-TTLXMDMD.js → google-marketing-UGMDLFPE.js} +1 -1
  64. package/dist/{health-cmd-26AHD5XL.js → health-cmd-WUBFEQX6.js} +3 -3
  65. package/dist/{history-QWBRFDQR.js → history-5GFG76UO.js} +5 -3
  66. package/dist/index.d.ts +29 -29
  67. package/dist/index.js +15 -15
  68. package/dist/{init-URQ4E3XR.js → init-CHZSBQOK.js} +10 -9
  69. package/dist/{insights-PMTHHZ2H.js → insights-LWLKXKNO.js} +3 -3
  70. package/dist/{intelligence-service-GPA7IGDX.js → intelligence-service-LMVQQRPN.js} +2 -2
  71. package/dist/{journeys-IA7TF753.js → journeys-IQLWLZBY.js} +3 -3
  72. package/dist/{keys-DOHLZTRI.js → keys-3VVORLK2.js} +3 -3
  73. package/dist/{keyword-3C2ZU6OB.js → keyword-3MWGUBHL.js} +7 -4
  74. package/dist/{logs-P7VRVZ5N.js → logs-PSV4DZ6F.js} +3 -3
  75. package/dist/{mcp-6NA62OAY.js → mcp-NNBM3MLW.js} +5 -4
  76. package/dist/mcp.js +8 -8
  77. package/dist/{measurement-plan-RHKCARVE.js → measurement-plan-M4VLA2ZN.js} +5 -4
  78. package/dist/{notify-ODCY7TD3.js → notify-EDSJINE5.js} +3 -3
  79. package/dist/{organic-evidence-76P5AYB3.js → organic-evidence-VBT6URMQ.js} +3 -3
  80. package/dist/{overview-5T776SEB.js → overview-LRNI342W.js} +6 -6
  81. package/dist/{project-ITMGW45M.js → project-HO4GOEC4.js} +3 -3
  82. package/dist/{project-setup-A3Q6ZX73.js → project-setup-AXVIZND6.js} +4 -4
  83. package/dist/{query-3QAQITK3.js → query-E2D2K6MD.js} +8 -5
  84. package/dist/{research-R74N3VRL.js → research-Z3IZQH2M.js} +3 -3
  85. package/dist/{results-export-23GY45AY.js → results-export-TVWWLJQA.js} +3 -3
  86. package/dist/{run-ID66JYBN.js → run-RJDJPROH.js} +4 -4
  87. package/dist/{schedule-HZ2CRUAL.js → schedule-NVDN72YG.js} +3 -3
  88. package/dist/{search-DM5WWMTE.js → search-A4PBZ53D.js} +3 -3
  89. package/dist/{serve-3QDHKCHE.js → serve-7WPMQUVW.js} +16 -16
  90. package/dist/{session-ZN3YZI2D.js → session-VPJH4TRC.js} +8 -8
  91. package/dist/{settings-SIEKVYD7.js → settings-EYEXRKTM.js} +5 -5
  92. package/dist/{sitemaps-M4IAZLK2.js → sitemaps-4HCWZJOZ.js} +3 -3
  93. package/dist/{skills-J6LWTNU5.js → skills-GPYMDDRH.js} +2 -2
  94. package/dist/{snapshot-SM3BVX5M.js → snapshot-SNR7KBK4.js} +3 -3
  95. package/dist/{status-BHJJOUCK.js → status-VTQJVZFU.js} +12 -6
  96. package/dist/{support-FPXXXJPZ.js → support-H7ANOX67.js} +1 -1
  97. package/dist/{technical-aeo-4DJWWPUN.js → technical-aeo-IDMFUDXP.js} +7 -5
  98. package/dist/{telemetry-LKVQUSO7.js → telemetry-DA43ILAA.js} +4 -4
  99. package/dist/{tools-Y67PVNIJ.js → tools-F3FZEG5K.js} +7 -7
  100. package/dist/{traffic-QSZYZHFW.js → traffic-EPWP3D2K.js} +21 -29
  101. package/dist/{trends-WIHWJVJR.js → trends-IVYSKMND.js} +3 -3
  102. package/dist/{users-HQOPQRTP.js → users-ZJMBGWUF.js} +3 -3
  103. package/dist/{visibility-stats-MCY5CAUC.js → visibility-stats-M2I3SUES.js} +11 -5
  104. package/dist/{wordpress-IB5YOJSM.js → wordpress-BGIOJPIF.js} +3 -3
  105. package/package.json +1 -1
  106. package/dist/agent-conversations-RRI7T74B.js +0 -51
  107. package/dist/agent-memory-R5Q7DLRZ.js +0 -91
  108. package/dist/agent-providers-HNMGZ7GY.js +0 -58
  109. package/dist/agent-transcript-N6ZBTF72.js +0 -76
@@ -3,10 +3,10 @@ import {
3
3
  } from "./chunk-WP76HORO.js";
4
4
  import {
5
5
  createApiClient
6
- } from "./chunk-KQQERQJ2.js";
6
+ } from "./chunk-RSB3X7UR.js";
7
7
  import {
8
8
  loadConfigRaw
9
- } from "./chunk-52J7GFCK.js";
9
+ } from "./chunk-T6CABZ3N.js";
10
10
  import {
11
11
  emitJsonl
12
12
  } from "./chunk-Z7IUAJOF.js";
@@ -15,7 +15,7 @@ import {
15
15
  CliError,
16
16
  isMachineFormat,
17
17
  usageError
18
- } from "./chunk-QRIKJT6Y.js";
18
+ } from "./chunk-Y7JEJNNS.js";
19
19
  import {
20
20
  CLOUDFLARE_WORKER_BINDINGS,
21
21
  CLOUDFLARE_WORKER_GENERATED_MARKER,
@@ -40,6 +40,7 @@ import {
40
40
  parseTrafficEventKindFilter,
41
41
  redactKnownSecrets,
42
42
  referralAssessmentQuerySchema,
43
+ shellQuote,
43
44
  trafficSamplesQuerySchema,
44
45
  trafficSeriesGranularitySchema,
45
46
  trafficUnrecognizedAgentsQuerySchema
@@ -407,6 +408,16 @@ function configString(value, fallback = "(unset)") {
407
408
  function errorMessage(error) {
408
409
  return describeError(error);
409
410
  }
411
+ function requireTrafficSource(project, source) {
412
+ if (!source) {
413
+ throw new CliError({
414
+ code: "TRAFFIC_SOURCE_REQUIRED",
415
+ message: "--source <id> is required",
416
+ displayMessage: `Error: --source <id> is required. List this project's sources with \`canonry traffic sources ${shellQuote(project)}\`.`,
417
+ details: { project }
418
+ });
419
+ }
420
+ }
410
421
  function requireCloudflareQueueOption(project, value, option) {
411
422
  if (value?.trim()) return value.trim();
412
423
  const code = option === "--account-id" ? "TRAFFIC_CLOUDFLARE_QUEUE_ACCOUNT_REQUIRED" : option === "--queue-id" ? "TRAFFIC_CLOUDFLARE_QUEUE_ID_REQUIRED" : option === "--queue-name" ? "TRAFFIC_CLOUDFLARE_QUEUE_NAME_REQUIRED" : "TRAFFIC_CLOUDFLARE_QUEUE_TOKEN_FILE_REQUIRED";
@@ -674,6 +685,7 @@ ${message}`,
674
685
  }
675
686
  }
676
687
  async function trafficActivate(project, opts, deps = {}) {
688
+ requireTrafficSource(project, opts.sourceId);
677
689
  const client = deps.client ?? getClient();
678
690
  const source = await client.trafficActivate(project, opts.sourceId);
679
691
  if (isMachineFormat(opts.format)) {
@@ -892,14 +904,7 @@ async function trafficConnectVercel(project, opts) {
892
904
  console.log(`Next: canonry traffic sync ${project} --source ${result.id}`);
893
905
  }
894
906
  async function trafficBackfill(project, opts) {
895
- if (!opts.source) {
896
- throw new CliError({
897
- code: "TRAFFIC_SOURCE_REQUIRED",
898
- message: "--source <id> is required",
899
- displayMessage: "Error: --source <id> is required (run `canonry traffic sources` to list connected sources)",
900
- details: { project }
901
- });
902
- }
907
+ requireTrafficSource(project, opts.source);
903
908
  const client = getClient();
904
909
  const submitted = await client.trafficBackfill(project, opts.source, {
905
910
  days: opts.days
@@ -915,7 +920,7 @@ async function trafficBackfill(project, opts) {
915
920
  console.log(` Days applied: ${submitted.daysApplied} (requested ${submitted.daysRequested})`);
916
921
  console.log(` Status: ${submitted.status}`);
917
922
  console.log("");
918
- console.log(`Poll: canonry runs get ${submitted.runId}`);
923
+ console.log(`Poll: canonry run show ${submitted.runId}`);
919
924
  return;
920
925
  }
921
926
  const intervalMs = opts.pollIntervalMs ?? 1500;
@@ -933,7 +938,7 @@ async function trafficBackfill(project, opts) {
933
938
  throw new CliError({
934
939
  code: "TRAFFIC_BACKFILL_TIMEOUT",
935
940
  message: `Backfill did not complete within 5 minutes (run ${submitted.runId} still running)`,
936
- displayMessage: `Error: backfill run ${submitted.runId} did not finish within 5 minutes \u2014 check status with "canonry runs get ${submitted.runId}"`,
941
+ displayMessage: `Error: backfill run ${submitted.runId} did not finish within 5 minutes \u2014 check status with "canonry run show ${submitted.runId}"`,
937
942
  details: { project, runId: submitted.runId }
938
943
  });
939
944
  }
@@ -961,14 +966,7 @@ async function trafficBackfill(project, opts) {
961
966
  });
962
967
  }
963
968
  async function trafficSync(project, opts) {
964
- if (!opts.source) {
965
- throw new CliError({
966
- code: "TRAFFIC_SOURCE_REQUIRED",
967
- message: "--source <id> is required",
968
- displayMessage: "Error: --source <id> is required (run `canonry traffic connect cloud-run` first if you have not connected a source)",
969
- details: { project }
970
- });
971
- }
969
+ requireTrafficSource(project, opts.source);
972
970
  const client = getClient();
973
971
  const result = await client.trafficSync(project, opts.source, {
974
972
  sinceMinutes: opts.sinceMinutes
@@ -1014,6 +1012,7 @@ function describeQueueDrain(drain) {
1014
1012
  return `${QUEUE_STOP_LABELS[drain.stopReason]}; ${drain.pulls} pull(s), ${drain.messagesPulled} message(s)${redelivered}, ${Math.round(drain.elapsedMs / 1e3)}s`;
1015
1013
  }
1016
1014
  async function trafficDeclareGap(project, opts) {
1015
+ requireTrafficSource(project, opts.source);
1017
1016
  const client = getClient();
1018
1017
  const { sources } = await client.trafficListSources(project);
1019
1018
  const source = sources.find((entry) => entry.id === opts.source);
@@ -1042,14 +1041,7 @@ async function trafficDeclareGap(project, opts) {
1042
1041
  console.log("The traffic gap warning clears at the next health check. Existing traffic data is unchanged.");
1043
1042
  }
1044
1043
  async function trafficReset(project, opts) {
1045
- if (!opts.source) {
1046
- throw new CliError({
1047
- code: "TRAFFIC_SOURCE_REQUIRED",
1048
- message: "--source <id> is required",
1049
- displayMessage: "Error: --source <id> is required (run `canonry traffic sources` to list connected sources)",
1050
- details: { project }
1051
- });
1052
- }
1044
+ requireTrafficSource(project, opts.source);
1053
1045
  if (!opts.advanceToNow) {
1054
1046
  throw new CliError({
1055
1047
  code: "TRAFFIC_RESET_REQUIRES_FLAG",
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  createApiClient
3
- } from "./chunk-KQQERQJ2.js";
4
- import "./chunk-52J7GFCK.js";
3
+ } from "./chunk-RSB3X7UR.js";
4
+ import "./chunk-T6CABZ3N.js";
5
5
  import "./chunk-AOJU5LKX.js";
6
6
  import {
7
7
  isMachineFormat
8
- } from "./chunk-QRIKJT6Y.js";
8
+ } from "./chunk-Y7JEJNNS.js";
9
9
  import {
10
10
  RatioUnits,
11
11
  TrendUnits,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createApiClient
3
- } from "./chunk-KQQERQJ2.js";
4
- import "./chunk-52J7GFCK.js";
3
+ } from "./chunk-RSB3X7UR.js";
4
+ import "./chunk-T6CABZ3N.js";
5
5
  import {
6
6
  emitJsonl
7
7
  } from "./chunk-Z7IUAJOF.js";
@@ -9,7 +9,7 @@ import "./chunk-AOJU5LKX.js";
9
9
  import {
10
10
  CliError,
11
11
  isMachineFormat
12
- } from "./chunk-QRIKJT6Y.js";
12
+ } from "./chunk-Y7JEJNNS.js";
13
13
  import {
14
14
  USER_PASSWORD_MIN_LENGTH,
15
15
  UserRoles,
@@ -3,15 +3,16 @@ import {
3
3
  } from "./chunk-QHQZ2226.js";
4
4
  import {
5
5
  createApiClient
6
- } from "./chunk-KQQERQJ2.js";
7
- import "./chunk-52J7GFCK.js";
6
+ } from "./chunk-RSB3X7UR.js";
7
+ import "./chunk-T6CABZ3N.js";
8
8
  import {
9
9
  emitJsonl
10
10
  } from "./chunk-Z7IUAJOF.js";
11
11
  import "./chunk-AOJU5LKX.js";
12
12
  import {
13
- isMachineFormat
14
- } from "./chunk-QRIKJT6Y.js";
13
+ isMachineFormat,
14
+ usageError
15
+ } from "./chunk-Y7JEJNNS.js";
15
16
  import {
16
17
  formatPercent,
17
18
  isVisibilityCompareClassMetric,
@@ -42,7 +43,12 @@ async function showVisibilityStats(project, opts) {
42
43
  printVisibilityStats(data);
43
44
  }
44
45
  async function showVisibilityCompare(project, opts) {
45
- if (!opts.from || !opts.to) throw new Error("visibility-compare requires --from <YYYY-MM> and --to <YYYY-MM>");
46
+ if (!opts.from || !opts.to) {
47
+ throw usageError("Error: visibility-compare requires --from <YYYY-MM> and --to <YYYY-MM>", {
48
+ message: "visibility-compare requires --from <YYYY-MM> and --to <YYYY-MM>",
49
+ details: { command: "visibility-compare" }
50
+ });
51
+ }
46
52
  const client = createApiClient();
47
53
  const data = await client.getVisibilityCompare(project, opts.from, opts.to, { scope: opts.scope, scopeKey: opts.scopeKey, marketKey: opts.marketKey, provider: opts.provider, location: opts.location });
48
54
  if (isMachineFormat(opts.format)) {
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  createApiClient
3
- } from "./chunk-KQQERQJ2.js";
4
- import "./chunk-52J7GFCK.js";
3
+ } from "./chunk-RSB3X7UR.js";
4
+ import "./chunk-T6CABZ3N.js";
5
5
  import "./chunk-AOJU5LKX.js";
6
6
  import {
7
7
  CliError,
8
8
  isMachineFormat
9
- } from "./chunk-QRIKJT6Y.js";
9
+ } from "./chunk-Y7JEJNNS.js";
10
10
  import "./chunk-FGEBFVHB.js";
11
11
 
12
12
  // src/commands/wordpress.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canonry/canonry",
3
- "version": "7.130.0",
3
+ "version": "7.131.0",
4
4
  "type": "module",
5
5
  "description": "Self-hosted AI visibility (AEO) platform: track how ChatGPT, Claude, Gemini, and Perplexity cite your domain, join it with Search Console, GA4, server-side traffic, and paid media, and fix what you find through agent tools (CLI, REST, MCP). Local SQLite.",
6
6
  "keywords": [
@@ -1,51 +0,0 @@
1
- import {
2
- createApiClient
3
- } from "./chunk-KQQERQJ2.js";
4
- import "./chunk-52J7GFCK.js";
5
- import "./chunk-AOJU5LKX.js";
6
- import {
7
- CliError,
8
- isMachineFormat,
9
- printCliError
10
- } from "./chunk-QRIKJT6Y.js";
11
- import "./chunk-FGEBFVHB.js";
12
-
13
- // src/commands/agent-conversations.ts
14
- import { randomUUID } from "crypto";
15
- async function agentConversations(opts) {
16
- try {
17
- const client = createApiClient();
18
- const result = await (() => {
19
- switch (opts.action) {
20
- case "list":
21
- return client.listAgentConversations(opts.project, { offset: opts.offset, limit: opts.limit });
22
- case "new":
23
- return client.createAgentConversation(opts.project, opts.id ?? randomUUID());
24
- case "show":
25
- return client.getAgentConversation(opts.project, opts.id);
26
- case "resume":
27
- return client.resumeAgentConversation(opts.project, opts.id);
28
- case "delete":
29
- return client.deleteAgentConversation(opts.project, opts.id);
30
- }
31
- })();
32
- if (isMachineFormat(opts.format)) {
33
- console.log(JSON.stringify(result, null, 2));
34
- return;
35
- }
36
- if ("conversations" in result) {
37
- if (!result.conversations.length) console.log("No Aero conversations yet.");
38
- for (const conversation of result.conversations) console.log(`${conversation.active ? "* " : " "}${conversation.id} ${conversation.title} ${conversation.updatedAt}`);
39
- if (result.nextOffset !== null) console.log(`More conversations: --offset ${result.nextOffset}`);
40
- } else if ("messages" in result) {
41
- console.log(`${result.title} \u2014 ${result.id}${result.active ? " (current)" : ""}`);
42
- for (const message of result.messages) console.log(`[${message.role}] ${typeof message.content === "string" ? message.content : JSON.stringify(message.content)}`);
43
- } else console.log(`Conversation deleted: ${result.id}. Shared project notes kept.`);
44
- } catch (error) {
45
- printCliError(error, opts.format);
46
- process.exitCode = error instanceof CliError ? error.exitCode : 2;
47
- }
48
- }
49
- export {
50
- agentConversations
51
- };
@@ -1,91 +0,0 @@
1
- import {
2
- createApiClient
3
- } from "./chunk-KQQERQJ2.js";
4
- import "./chunk-52J7GFCK.js";
5
- import {
6
- emitJsonl
7
- } from "./chunk-Z7IUAJOF.js";
8
- import "./chunk-AOJU5LKX.js";
9
- import {
10
- CliError,
11
- isMachineFormat,
12
- printCliError
13
- } from "./chunk-QRIKJT6Y.js";
14
- import "./chunk-FGEBFVHB.js";
15
-
16
- // src/commands/agent-memory.ts
17
- function toFormat(raw) {
18
- if (raw === "json") return "json";
19
- if (raw === "jsonl") return "jsonl";
20
- return "text";
21
- }
22
- async function agentMemoryList(opts) {
23
- const format = toFormat(opts.format);
24
- try {
25
- const client = createApiClient();
26
- const result = await client.listAgentMemory(opts.project);
27
- if (format === "json") {
28
- console.log(JSON.stringify(result, null, 2));
29
- return;
30
- } else if (format === "jsonl") {
31
- emitJsonl(result.entries.map((entry) => ({ project: opts.project, ...entry })));
32
- return;
33
- }
34
- if (result.entries.length === 0) {
35
- console.log(`No Aero memory notes for "${opts.project}".`);
36
- return;
37
- }
38
- console.log(`Aero memory for ${opts.project} \u2014 ${result.entries.length} note(s)
39
- `);
40
- for (const entry of result.entries) {
41
- console.log(`[${entry.source}] ${entry.key} (updated ${entry.updatedAt})`);
42
- console.log(` ${entry.value.replace(/\n/g, "\n ")}`);
43
- console.log();
44
- }
45
- } catch (err) {
46
- printCliError(err, format);
47
- process.exitCode = err instanceof CliError ? err.exitCode : 2;
48
- }
49
- }
50
- async function agentMemorySet(opts) {
51
- const format = toFormat(opts.format);
52
- try {
53
- const client = createApiClient();
54
- const result = await client.setAgentMemory(opts.project, {
55
- key: opts.key,
56
- value: opts.value
57
- });
58
- if (isMachineFormat(format)) {
59
- console.log(JSON.stringify(result, null, 2));
60
- return;
61
- }
62
- console.log(`Stored note "${result.entry.key}" for "${opts.project}" (source=${result.entry.source}).`);
63
- } catch (err) {
64
- printCliError(err, format);
65
- process.exitCode = err instanceof CliError ? err.exitCode : 2;
66
- }
67
- }
68
- async function agentMemoryForget(opts) {
69
- const format = toFormat(opts.format);
70
- try {
71
- const client = createApiClient();
72
- const result = await client.forgetAgentMemory(opts.project, opts.key);
73
- if (isMachineFormat(format)) {
74
- console.log(JSON.stringify(result, null, 2));
75
- return;
76
- }
77
- if (result.status === "forgotten") {
78
- console.log(`Forgot note "${opts.key}" for "${opts.project}".`);
79
- } else {
80
- console.log(`No note with key "${opts.key}" for "${opts.project}".`);
81
- }
82
- } catch (err) {
83
- printCliError(err, format);
84
- process.exitCode = err instanceof CliError ? err.exitCode : 2;
85
- }
86
- }
87
- export {
88
- agentMemoryForget,
89
- agentMemoryList,
90
- agentMemorySet
91
- };
@@ -1,58 +0,0 @@
1
- import {
2
- createApiClient
3
- } from "./chunk-KQQERQJ2.js";
4
- import "./chunk-52J7GFCK.js";
5
- import {
6
- emitJsonl
7
- } from "./chunk-Z7IUAJOF.js";
8
- import "./chunk-AOJU5LKX.js";
9
- import {
10
- CliError,
11
- printCliError
12
- } from "./chunk-QRIKJT6Y.js";
13
- import "./chunk-FGEBFVHB.js";
14
-
15
- // src/commands/agent-providers.ts
16
- async function agentProviders(opts) {
17
- const format = opts.format === "json" ? "json" : opts.format === "jsonl" ? "jsonl" : "text";
18
- try {
19
- const client = createApiClient();
20
- const res = await client.listAgentProviders(opts.project);
21
- if (format === "json") {
22
- console.log(JSON.stringify(res, null, 2));
23
- return;
24
- } else if (format === "jsonl") {
25
- emitJsonl(
26
- res.providers.map((provider) => ({
27
- project: opts.project,
28
- defaultProvider: res.defaultProvider,
29
- ...provider
30
- }))
31
- );
32
- return;
33
- }
34
- console.log(
35
- `Aero providers for ${opts.project} (default: ${res.defaultProvider ?? "none configured"})
36
- `
37
- );
38
- const idWidth = Math.max(...res.providers.map((p) => p.id.length), 8);
39
- for (const p of res.providers) {
40
- const status = p.configured ? "\u2713" : "\u2717";
41
- const source = p.keySource ? `(${p.keySource})` : "";
42
- console.log(
43
- ` ${status} ${p.id.padEnd(idWidth)} ${p.label} \u2014 model ${p.defaultModel} ${source}`.trimEnd()
44
- );
45
- if (p.backgroundPause) {
46
- console.log(` Automatic work paused: ${p.backgroundPause.reason}; retry after ${p.backgroundPause.retryAt}`);
47
- console.log(` ${p.backgroundPause.recovery}`);
48
- }
49
- }
50
- } catch (err) {
51
- printCliError(err, format);
52
- if (err instanceof CliError) process.exitCode = err.exitCode;
53
- else process.exitCode = 2;
54
- }
55
- }
56
- export {
57
- agentProviders
58
- };
@@ -1,76 +0,0 @@
1
- import {
2
- createApiClient
3
- } from "./chunk-KQQERQJ2.js";
4
- import "./chunk-52J7GFCK.js";
5
- import "./chunk-AOJU5LKX.js";
6
- import {
7
- CliError,
8
- isMachineFormat,
9
- printCliError
10
- } from "./chunk-QRIKJT6Y.js";
11
- import "./chunk-FGEBFVHB.js";
12
-
13
- // src/commands/agent-transcript.ts
14
- function toFormat(raw) {
15
- if (raw === "json") return "json";
16
- if (raw === "jsonl") return "jsonl";
17
- return "text";
18
- }
19
- async function agentTranscript(opts) {
20
- const format = toFormat(opts.format);
21
- try {
22
- const client = createApiClient();
23
- const transcript = await client.getAgentTranscript(opts.project);
24
- if (isMachineFormat(format)) {
25
- console.log(JSON.stringify(transcript, null, 2));
26
- return;
27
- }
28
- if (transcript.messages.length === 0) {
29
- console.log(`No Aero conversation yet for "${opts.project}".`);
30
- return;
31
- }
32
- console.log(
33
- `Aero session for ${opts.project} \u2014 ${transcript.modelProvider ?? "unknown"}/${transcript.modelId ?? "unknown"} \u2014 updated ${transcript.updatedAt ?? "never"}`
34
- );
35
- console.log(`${transcript.messages.length} message${transcript.messages.length === 1 ? "" : "s"}
36
- `);
37
- for (const msg of transcript.messages) {
38
- console.log(`[${msg.role}]`);
39
- if (typeof msg.content === "string") {
40
- console.log(msg.content);
41
- } else if (Array.isArray(msg.content)) {
42
- for (const block of msg.content) {
43
- const t = block.type;
44
- if (t === "text") console.log(block.text);
45
- else if (t === "toolCall") console.log(`\u27D0 ${block.name} ${JSON.stringify(block.arguments)}`);
46
- else if (t === "toolResult") console.log(` ${block.isError ? "\u2717" : "\u2713"} tool-result`);
47
- }
48
- }
49
- console.log();
50
- }
51
- } catch (err) {
52
- printCliError(err, format);
53
- if (err instanceof CliError) process.exitCode = err.exitCode;
54
- else process.exitCode = 2;
55
- }
56
- }
57
- async function agentTranscriptReset(opts) {
58
- const format = toFormat(opts.format);
59
- try {
60
- const client = createApiClient();
61
- await client.resetAgentTranscript(opts.project);
62
- if (isMachineFormat(format)) {
63
- console.log(JSON.stringify({ status: "reset", project: opts.project }));
64
- } else {
65
- console.log(`Aero conversation reset for "${opts.project}".`);
66
- }
67
- } catch (err) {
68
- printCliError(err, format);
69
- if (err instanceof CliError) process.exitCode = err.exitCode;
70
- else process.exitCode = 2;
71
- }
72
- }
73
- export {
74
- agentTranscript,
75
- agentTranscriptReset
76
- };