@ainyc/canonry 4.64.0 → 4.67.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 (24) hide show
  1. package/assets/agent-workspace/skills/aero/references/regression-playbook.md +1 -1
  2. package/assets/agent-workspace/skills/canonry/references/canonry-cli.md +30 -1
  3. package/assets/agent-workspace/skills/canonry/references/google-business-profile.md +13 -1
  4. package/assets/assets/{BacklinksPage-DrTItudz.js → BacklinksPage-B9oyoljV.js} +1 -1
  5. package/assets/assets/{ChartPrimitives-rheCHqdj.js → ChartPrimitives-CvfM24iC.js} +1 -1
  6. package/assets/assets/ProjectPage-DELbOAlm.js +6 -0
  7. package/assets/assets/{RunRow-CTcYvyN_.js → RunRow-vHM36Fdi.js} +1 -1
  8. package/assets/assets/{RunsPage-66YgsvXE.js → RunsPage-Cr58nTet.js} +1 -1
  9. package/assets/assets/{SettingsPage-NDiYN76z.js → SettingsPage-BuiP8ZOv.js} +1 -1
  10. package/assets/assets/{TrafficPage-zbXXoSEG.js → TrafficPage-bwOxChyo.js} +1 -1
  11. package/assets/assets/{TrafficSourceDetailPage-DPmv3p4P.js → TrafficSourceDetailPage-B0uY6VIB.js} +1 -1
  12. package/assets/assets/{extract-error-message-BKGNQ7gk.js → extract-error-message-CWdzuNp4.js} +1 -1
  13. package/assets/assets/{index-DmVFJvub.js → index-DiN_mzYU.js} +2 -2
  14. package/assets/assets/{index-DzN9TKZK.css → index-yMJe1bJR.css} +1 -1
  15. package/assets/assets/{server-traffic-BGAFQ9HX.js → server-traffic-D3aICbxr.js} +1 -1
  16. package/assets/assets/{trash-2-4fuaec0Z.js → trash-2-CVKno2W2.js} +1 -1
  17. package/assets/index.html +2 -2
  18. package/dist/{chunk-MDNDIBUM.js → chunk-4V3V4MFF.js} +13 -12
  19. package/dist/{chunk-64IDABSF.js → chunk-RQCVITY4.js} +7 -30
  20. package/dist/cli.js +410 -211
  21. package/dist/index.js +2 -2
  22. package/dist/mcp.js +1 -1
  23. package/package.json +9 -9
  24. package/assets/assets/ProjectPage-DO6yyu6P.js +0 -6
@@ -1 +1 @@
1
- import{c as d,j as a,bT as S,bN as l,bU as v,au as m,l as t,bV as y,bO as i,bW as T,bX as h,bY as p,bZ as b}from"./index-DmVFJvub.js";import{u as s,r as C,n as c,o as u}from"./vendor-tanstack-Dq7p98wZ.js";const g=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],M=d("refresh-cw",g);function P(e){switch(e){case i.connected:return"positive";case i.paused:return"caution";case i.error:return"negative";case i.archived:return"neutral"}}function w(e){const r={};return e.kind&&e.kind!=="all"&&(r.kind=e.kind),e.sourceId&&(r.sourceId=e.sourceId),e.sinceMinutes!==void 0&&(r.since=new Date(Date.now()-e.sinceMinutes*6e4).toISOString()),e.limit!==void 0&&(r.limit=String(e.limit)),r}function o(e){e.invalidateQueries({predicate:r=>{const n=r.queryKey[0];return typeof n?._id=="string"&&n._id.startsWith("getApiV1ProjectsByNameTraffic")}})}function V(e){return s({...S({client:t,path:{name:e??""}}),enabled:!!e,staleTime:a})}function k(e){return s({...b({client:t,path:{name:e??""}}),enabled:!!e,staleTime:a})}function F(e,r){return s({...l({client:t,path:{name:e??"",id:r??""}}),enabled:!!(e&&r),staleTime:a})}function A(e,r){const n=C.useMemo(()=>w(r),[r.kind,r.sourceId,r.sinceMinutes,r.limit]);return s({...v({client:t,path:{name:e??""},query:n}),enabled:!!e,staleTime:a})}function E(e){const r=c();return u({mutationFn:n=>{if(!e)throw new Error("Project is required to connect a Cloud Run source");return p(e,n)},onSuccess:()=>{e&&o(r)}})}function I(e){const r=c();return u({mutationFn:n=>{if(!e)throw new Error("Project is required to connect a WordPress source");return T(e,n)},onSuccess:()=>{e&&o(r)}})}function N(e){const r=c();return u({mutationFn:n=>{if(!e)throw new Error("Project is required to connect a Vercel source");return h(e,n)},onSuccess:()=>{e&&o(r)}})}function Q(e,r){const n=c();return u({mutationFn:f=>{if(!e||!r)throw new Error("Project and sourceId are required to sync");return y(e,r,f??void 0)},onSuccess:()=>{e&&(o(n),n.invalidateQueries({queryKey:m({client:t})}))}})}export{M as R,I as a,N as b,E as c,V as d,F as e,A as f,Q as g,P as t,k as u};
1
+ import{c as d,j as a,bT as S,bN as l,bU as v,au as m,l as t,bV as y,bO as i,bW as T,bX as h,bY as p,bZ as b}from"./index-DiN_mzYU.js";import{u as s,r as C,n as c,o as u}from"./vendor-tanstack-Dq7p98wZ.js";const g=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],M=d("refresh-cw",g);function P(e){switch(e){case i.connected:return"positive";case i.paused:return"caution";case i.error:return"negative";case i.archived:return"neutral"}}function w(e){const r={};return e.kind&&e.kind!=="all"&&(r.kind=e.kind),e.sourceId&&(r.sourceId=e.sourceId),e.sinceMinutes!==void 0&&(r.since=new Date(Date.now()-e.sinceMinutes*6e4).toISOString()),e.limit!==void 0&&(r.limit=String(e.limit)),r}function o(e){e.invalidateQueries({predicate:r=>{const n=r.queryKey[0];return typeof n?._id=="string"&&n._id.startsWith("getApiV1ProjectsByNameTraffic")}})}function V(e){return s({...S({client:t,path:{name:e??""}}),enabled:!!e,staleTime:a})}function k(e){return s({...b({client:t,path:{name:e??""}}),enabled:!!e,staleTime:a})}function F(e,r){return s({...l({client:t,path:{name:e??"",id:r??""}}),enabled:!!(e&&r),staleTime:a})}function A(e,r){const n=C.useMemo(()=>w(r),[r.kind,r.sourceId,r.sinceMinutes,r.limit]);return s({...v({client:t,path:{name:e??""},query:n}),enabled:!!e,staleTime:a})}function E(e){const r=c();return u({mutationFn:n=>{if(!e)throw new Error("Project is required to connect a Cloud Run source");return p(e,n)},onSuccess:()=>{e&&o(r)}})}function I(e){const r=c();return u({mutationFn:n=>{if(!e)throw new Error("Project is required to connect a WordPress source");return T(e,n)},onSuccess:()=>{e&&o(r)}})}function N(e){const r=c();return u({mutationFn:n=>{if(!e)throw new Error("Project is required to connect a Vercel source");return h(e,n)},onSuccess:()=>{e&&o(r)}})}function Q(e,r){const n=c();return u({mutationFn:f=>{if(!e||!r)throw new Error("Project and sourceId are required to sync");return y(e,r,f??void 0)},onSuccess:()=>{e&&(o(n),n.invalidateQueries({queryKey:m({client:t})}))}})}export{M as R,I as a,N as b,E as c,V as d,F as e,A as f,Q as g,P as t,k as u};
@@ -1 +1 @@
1
- import{c}from"./index-DmVFJvub.js";const a=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],h=c("circle-check",a);const e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],n=c("circle-question-mark",e);const o=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],s=c("download",o);const t=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],r=c("trash-2",t);export{h as C,s as D,r as T,n as a};
1
+ import{c}from"./index-DiN_mzYU.js";const a=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],h=c("circle-check",a);const e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],n=c("circle-question-mark",e);const o=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],s=c("download",o);const t=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],r=c("trash-2",t);export{h as C,s as D,r as T,n as a};
package/assets/index.html CHANGED
@@ -12,12 +12,12 @@
12
12
  <link rel="icon" type="image/png" sizes="32x32" href="./favicon-32.png" />
13
13
  <link rel="apple-touch-icon" href="./apple-touch-icon.png" />
14
14
  <title>Canonry</title>
15
- <script type="module" crossorigin src="./assets/index-DmVFJvub.js"></script>
15
+ <script type="module" crossorigin src="./assets/index-DiN_mzYU.js"></script>
16
16
  <link rel="modulepreload" crossorigin href="./assets/vendor-tanstack-Dq7p98wZ.js">
17
17
  <link rel="modulepreload" crossorigin href="./assets/vendor-radix-B57xfQbP.js">
18
18
  <link rel="modulepreload" crossorigin href="./assets/vendor-recharts-ClRVR6aX.js">
19
19
  <link rel="modulepreload" crossorigin href="./assets/vendor-markdown-DK7fbRNb.js">
20
- <link rel="stylesheet" crossorigin href="./assets/index-DzN9TKZK.css">
20
+ <link rel="stylesheet" crossorigin href="./assets/index-yMJe1bJR.css">
21
21
  </head>
22
22
  <body>
23
23
  <div id="root"></div>
@@ -5,10 +5,11 @@ import {
5
5
  canonryMcpTools,
6
6
  configExists,
7
7
  getConfigPath,
8
+ isMachineFormat,
8
9
  loadConfig,
9
10
  loadConfigRaw,
10
11
  saveConfigPatch
11
- } from "./chunk-64IDABSF.js";
12
+ } from "./chunk-RQCVITY4.js";
12
13
  import {
13
14
  CC_CACHE_DIR,
14
15
  DUCKDB_SPEC,
@@ -5296,7 +5297,7 @@ async function backfillAnswerVisibilityCommand(opts) {
5296
5297
  result.dryRun = true;
5297
5298
  result.wouldUpdate = wouldUpdate;
5298
5299
  }
5299
- if (opts?.format === "json") {
5300
+ if (isMachineFormat(opts?.format)) {
5300
5301
  console.log(JSON.stringify(result, null, 2));
5301
5302
  return;
5302
5303
  }
@@ -5366,7 +5367,7 @@ async function backfillNormalizedPathsCommand(opts) {
5366
5367
  updated: 0,
5367
5368
  unchanged: 0
5368
5369
  };
5369
- if (opts?.format === "json") {
5370
+ if (isMachineFormat(opts?.format)) {
5370
5371
  console.log(JSON.stringify(result2, null, 2));
5371
5372
  return;
5372
5373
  }
@@ -5382,7 +5383,7 @@ async function backfillNormalizedPathsCommand(opts) {
5382
5383
  updated,
5383
5384
  unchanged
5384
5385
  };
5385
- if (opts?.format === "json") {
5386
+ if (isMachineFormat(opts?.format)) {
5386
5387
  console.log(JSON.stringify(result, null, 2));
5387
5388
  return;
5388
5389
  }
@@ -5438,7 +5439,7 @@ async function backfillAiReferralPathsCommand(opts) {
5438
5439
  updated: 0,
5439
5440
  unchanged: 0
5440
5441
  };
5441
- if (opts?.format === "json") {
5442
+ if (isMachineFormat(opts?.format)) {
5442
5443
  console.log(JSON.stringify(result2, null, 2));
5443
5444
  return;
5444
5445
  }
@@ -5454,7 +5455,7 @@ async function backfillAiReferralPathsCommand(opts) {
5454
5455
  updated,
5455
5456
  unchanged
5456
5457
  };
5457
- if (opts?.format === "json") {
5458
+ if (isMachineFormat(opts?.format)) {
5458
5459
  console.log(JSON.stringify(result, null, 2));
5459
5460
  return;
5460
5461
  }
@@ -5579,7 +5580,7 @@ async function backfillAnswerMentionsCommand(opts) {
5579
5580
  result.dryRun = true;
5580
5581
  result.wouldUpdate = wouldUpdate;
5581
5582
  }
5582
- if (opts?.format === "json") {
5583
+ if (isMachineFormat(opts?.format)) {
5583
5584
  console.log(JSON.stringify(result, null, 2));
5584
5585
  return;
5585
5586
  }
@@ -5621,7 +5622,7 @@ async function backfillInsightsCommand(project, opts) {
5621
5622
  const db = createClient(config.database);
5622
5623
  migrate(db);
5623
5624
  const service = new IntelligenceService2(db);
5624
- const isJson = opts?.format === "json";
5625
+ const isJson = isMachineFormat(opts?.format);
5625
5626
  const isDryRun = opts?.dryRun === true;
5626
5627
  if (!isJson) {
5627
5628
  const scope = opts?.since ? ` (since ${opts.since})` : "";
@@ -5779,7 +5780,7 @@ async function backfillSnapshotAttributionCommand(opts) {
5779
5780
  if (!project) {
5780
5781
  throw new Error(`Project "${opts.project}" not found`);
5781
5782
  }
5782
- const isJson = opts.format === "json";
5783
+ const isJson = isMachineFormat(opts.format);
5783
5784
  const isDryRun = opts.dryRun === true;
5784
5785
  if (!isJson) {
5785
5786
  const mode = isDryRun ? " [DRY RUN \u2014 no writes]" : "";
@@ -5958,7 +5959,7 @@ async function backfillTrafficClassificationCommand(opts) {
5958
5959
  migrate(db);
5959
5960
  const projectFilter = opts?.project?.trim();
5960
5961
  const isDryRun = opts?.dryRun === true;
5961
- const isJson = opts?.format === "json";
5962
+ const isJson = isMachineFormat(opts?.format);
5962
5963
  const scopedProjects = projectFilter ? db.select().from(projects).where(eq10(projects.name, projectFilter)).all() : db.select().from(projects).all();
5963
5964
  if (scopedProjects.length === 0) {
5964
5965
  if (projectFilter && !isJson) {
@@ -6395,7 +6396,7 @@ async function installSkills(opts = {}) {
6395
6396
  }
6396
6397
  async function listSkills(opts = {}) {
6397
6398
  const skills = getBundledSkills();
6398
- if (opts.format === "json") {
6399
+ if (isMachineFormat(opts.format)) {
6399
6400
  console.log(JSON.stringify({
6400
6401
  skills: skills.map((s) => ({
6401
6402
  name: s.name,
@@ -6416,7 +6417,7 @@ async function listSkills(opts = {}) {
6416
6417
  }
6417
6418
  }
6418
6419
  function emitInstallSummary(summary, format) {
6419
- if (format === "json") {
6420
+ if (isMachineFormat(format)) {
6420
6421
  console.log(JSON.stringify(summary, null, 2));
6421
6422
  return;
6422
6423
  }
@@ -190,6 +190,9 @@ function configExists() {
190
190
  }
191
191
 
192
192
  // src/cli-error.ts
193
+ function isMachineFormat(format) {
194
+ return format === "json" || format === "jsonl";
195
+ }
193
196
  var EXIT_USER_ERROR = 1;
194
197
  var EXIT_SYSTEM_ERROR = 2;
195
198
  var CliError = class extends Error {
@@ -221,36 +224,9 @@ function isEndpointMissing(err) {
221
224
  return status === 404 || status === 405;
222
225
  }
223
226
  function printCliError(err, format) {
224
- if (format === "json") {
225
- if (err instanceof CliError) {
226
- console.error(
227
- JSON.stringify(
228
- {
229
- error: {
230
- code: err.code,
231
- message: err.message,
232
- ...err.details ? { details: err.details } : {}
233
- }
234
- },
235
- null,
236
- 2
237
- )
238
- );
239
- return;
240
- }
241
- const message = err instanceof Error ? err.message : "An unexpected error occurred";
242
- console.error(
243
- JSON.stringify(
244
- {
245
- error: {
246
- code: "CLI_ERROR",
247
- message
248
- }
249
- },
250
- null,
251
- 2
252
- )
253
- );
227
+ if (isMachineFormat(format)) {
228
+ const envelope = err instanceof CliError ? { error: { code: err.code, message: err.message, ...err.details ? { details: err.details } : {} } } : { error: { code: "CLI_ERROR", message: err instanceof Error ? err.message : "An unexpected error occurred" } };
229
+ console.error(JSON.stringify(envelope, null, format === "jsonl" ? 0 : 2));
254
230
  return;
255
231
  }
256
232
  if (err instanceof CliError && err.displayMessage) {
@@ -6256,6 +6232,7 @@ export {
6256
6232
  saveConfig,
6257
6233
  saveConfigPatch,
6258
6234
  configExists,
6235
+ isMachineFormat,
6259
6236
  EXIT_USER_ERROR,
6260
6237
  EXIT_SYSTEM_ERROR,
6261
6238
  CliError,