@ainyc/canonry 4.55.3 → 4.56.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/assets/agent-workspace/skills/aero/SKILL.md +2 -0
  2. package/assets/agent-workspace/skills/canonry/SKILL.md +2 -0
  3. package/assets/agent-workspace/skills/canonry/references/server-side-traffic.md +46 -3
  4. package/assets/assets/{BacklinksPage-buvZ4ZOd.js → BacklinksPage-CmeFZ8UJ.js} +1 -1
  5. package/assets/assets/ChartPrimitives-D7C1Cp8w.js +1 -0
  6. package/assets/assets/ProjectPage-Y6uCyjGb.js +6 -0
  7. package/assets/assets/{RunRow-D-DTu1PA.js → RunRow-BntNdrgM.js} +1 -1
  8. package/assets/assets/{RunsPage-CrBpgwkO.js → RunsPage-Btp6qn10.js} +1 -1
  9. package/assets/assets/{SettingsPage-Bgsi9tZ2.js → SettingsPage-DkyNiU2i.js} +1 -1
  10. package/assets/assets/{TrafficPage-DAHXrzqz.js → TrafficPage-CBl4Mwdc.js} +1 -1
  11. package/assets/assets/TrafficSourceDetailPage-BZzuWCn-.js +1 -0
  12. package/assets/assets/{extract-error-message-BGhWiJPr.js → extract-error-message-De8_qAzs.js} +1 -1
  13. package/assets/assets/index-9NRlymgj.css +1 -0
  14. package/assets/assets/{index-CbDkoDBH.js → index-XUKhruAg.js} +79 -79
  15. package/assets/assets/{server-traffic-3xxyOEIX.js → server-traffic-bn9LSZN9.js} +1 -1
  16. package/assets/assets/{trash-2-dppRdHYI.js → trash-2-B5clF2rU.js} +1 -1
  17. package/assets/index.html +2 -2
  18. package/dist/{chunk-XB6Y63NI.js → chunk-4KWPOVIT.js} +1 -1
  19. package/dist/{chunk-UOQ62KDD.js → chunk-6X5TF73A.js} +42 -1
  20. package/dist/{chunk-5EAGNVCJ.js → chunk-I2LAM5IM.js} +207 -63
  21. package/dist/{chunk-XHU35P3S.js → chunk-WFVUZVJD.js} +9 -0
  22. package/dist/cli.js +58 -5
  23. package/dist/index.js +4 -4
  24. package/dist/{intelligence-service-4PT22FED.js → intelligence-service-NY3MAVPB.js} +2 -2
  25. package/dist/mcp.js +2 -2
  26. package/package.json +8 -8
  27. package/assets/assets/ChartPrimitives-9Kx3gzQL.js +0 -1
  28. package/assets/assets/ProjectPage-D0UqSqe7.js +0 -6
  29. package/assets/assets/TrafficSourceDetailPage-DCcDN3VD.js +0 -1
  30. package/assets/assets/index-dxdJhCQO.css +0 -1
package/dist/cli.js CHANGED
@@ -23,7 +23,7 @@ import {
23
23
  setTelemetrySource,
24
24
  showFirstRunNotice,
25
25
  trackEvent
26
- } from "./chunk-5EAGNVCJ.js";
26
+ } from "./chunk-I2LAM5IM.js";
27
27
  import {
28
28
  CliError,
29
29
  EXIT_SYSTEM_ERROR,
@@ -39,14 +39,14 @@ import {
39
39
  saveConfig,
40
40
  saveConfigPatch,
41
41
  usageError
42
- } from "./chunk-UOQ62KDD.js";
42
+ } from "./chunk-6X5TF73A.js";
43
43
  import {
44
44
  apiKeys,
45
45
  createClient,
46
46
  migrate,
47
47
  projects,
48
48
  queries
49
- } from "./chunk-XB6Y63NI.js";
49
+ } from "./chunk-4KWPOVIT.js";
50
50
  import {
51
51
  CcReleaseSyncStatuses,
52
52
  CheckScopes,
@@ -65,7 +65,7 @@ import {
65
65
  providerQuotaPolicySchema,
66
66
  resolveProviderInput,
67
67
  skillsClientSchema
68
- } from "./chunk-XHU35P3S.js";
68
+ } from "./chunk-WFVUZVJD.js";
69
69
 
70
70
  // src/cli.ts
71
71
  import { pathToFileURL } from "url";
@@ -3248,6 +3248,36 @@ async function trafficSync(project, opts) {
3248
3248
  console.log(` Sample rows: ${result.sampleRows}`);
3249
3249
  console.log(` Synced at: ${result.syncedAt}`);
3250
3250
  }
3251
+ async function trafficReset(project, opts) {
3252
+ if (!opts.source) {
3253
+ throw new CliError({
3254
+ code: "TRAFFIC_SOURCE_REQUIRED",
3255
+ message: "--source <id> is required",
3256
+ displayMessage: "Error: --source <id> is required (run `canonry traffic sources` to list connected sources)",
3257
+ details: { project }
3258
+ });
3259
+ }
3260
+ if (!opts.advanceToNow) {
3261
+ throw new CliError({
3262
+ code: "TRAFFIC_RESET_REQUIRES_FLAG",
3263
+ message: "--advance-to-now is required",
3264
+ displayMessage: "Error: --advance-to-now is required. This skips any history between the source's current lastSyncedAt and now; run `canonry traffic backfill` separately if you need to recover it.",
3265
+ details: { project, source: opts.source }
3266
+ });
3267
+ }
3268
+ const client = getClient6();
3269
+ const updated = await client.trafficReset(project, opts.source);
3270
+ if (opts.format === "json") {
3271
+ console.log(JSON.stringify(updated, null, 2));
3272
+ return;
3273
+ }
3274
+ console.log(`Traffic source reset for "${project}" (source ${opts.source}).`);
3275
+ console.log(` Status: ${updated.status}`);
3276
+ console.log(` Last synced: ${updated.lastSyncedAt ?? "never"} (advanced to NOW)`);
3277
+ console.log(` Last error: ${updated.lastError ?? "none"}`);
3278
+ console.log("");
3279
+ console.log("Next scheduled sync will resume from this timestamp.");
3280
+ }
3251
3281
  function formatSourceLine(source) {
3252
3282
  const parts = [
3253
3283
  source.id,
@@ -3545,6 +3575,28 @@ var TRAFFIC_CLI_COMMANDS = [
3545
3575
  });
3546
3576
  }
3547
3577
  },
3578
+ {
3579
+ path: ["traffic", "reset"],
3580
+ usage: "canonry traffic reset <project> --source <id> --advance-to-now [--format json]",
3581
+ options: {
3582
+ source: stringOption(),
3583
+ "advance-to-now": { type: "boolean" }
3584
+ },
3585
+ run: async (input) => {
3586
+ const project = requireProject(
3587
+ input,
3588
+ "traffic.reset",
3589
+ "canonry traffic reset <project> --source <id> --advance-to-now"
3590
+ );
3591
+ const source = getString(input.values, "source");
3592
+ if (!source) throw new Error("--source <id> is required");
3593
+ await trafficReset(project, {
3594
+ source,
3595
+ advanceToNow: getBoolean(input.values, "advance-to-now"),
3596
+ format: input.format
3597
+ });
3598
+ }
3599
+ },
3548
3600
  {
3549
3601
  path: ["traffic", "sources"],
3550
3602
  usage: "canonry traffic sources <project> [--format json]",
@@ -7197,7 +7249,8 @@ async function showSettings(format) {
7197
7249
  const status = provider.configured ? "configured" : "not configured";
7198
7250
  console.log(` ${provider.name.padEnd(10)} ${status}`);
7199
7251
  if (provider.configured) {
7200
- console.log(` Model: ${provider.model ?? "(default)"}`);
7252
+ const modelLabel = provider.model ? provider.model : provider.defaultModel ? `${provider.defaultModel} (default)` : "(default)";
7253
+ console.log(` Model: ${modelLabel}`);
7201
7254
  if (provider.quota) {
7202
7255
  console.log(` Quota: ${provider.quota.maxConcurrency} concurrent \xB7 ${provider.quota.maxRequestsPerMinute}/min \xB7 ${provider.quota.maxRequestsPerDay}/day`);
7203
7256
  }
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  createServer
3
- } from "./chunk-5EAGNVCJ.js";
3
+ } from "./chunk-I2LAM5IM.js";
4
4
  import {
5
5
  loadConfig
6
- } from "./chunk-UOQ62KDD.js";
7
- import "./chunk-XB6Y63NI.js";
8
- import "./chunk-XHU35P3S.js";
6
+ } from "./chunk-6X5TF73A.js";
7
+ import "./chunk-4KWPOVIT.js";
8
+ import "./chunk-WFVUZVJD.js";
9
9
  export {
10
10
  createServer,
11
11
  loadConfig
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  IntelligenceService
3
- } from "./chunk-XB6Y63NI.js";
4
- import "./chunk-XHU35P3S.js";
3
+ } from "./chunk-4KWPOVIT.js";
4
+ import "./chunk-WFVUZVJD.js";
5
5
  export {
6
6
  IntelligenceService
7
7
  };
package/dist/mcp.js CHANGED
@@ -2,8 +2,8 @@ import {
2
2
  CliError,
3
3
  canonryMcpTools,
4
4
  createApiClient
5
- } from "./chunk-UOQ62KDD.js";
6
- import "./chunk-XHU35P3S.js";
5
+ } from "./chunk-6X5TF73A.js";
6
+ import "./chunk-WFVUZVJD.js";
7
7
 
8
8
  // src/mcp/cli.ts
9
9
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ainyc/canonry",
3
- "version": "4.55.3",
3
+ "version": "4.56.1",
4
4
  "type": "module",
5
5
  "description": "Agent-first open-source AEO operating platform - track how answer engines cite your domain",
6
6
  "license": "FSL-1.1-ALv2",
@@ -62,23 +62,23 @@
62
62
  "tsup": "^8.5.1",
63
63
  "tsx": "^4.19.0",
64
64
  "@ainyc/canonry-api-client": "0.0.0",
65
+ "@ainyc/canonry-api-routes": "0.0.0",
65
66
  "@ainyc/canonry-config": "0.0.0",
66
67
  "@ainyc/canonry-contracts": "0.0.0",
67
68
  "@ainyc/canonry-db": "0.0.0",
68
69
  "@ainyc/canonry-integration-bing": "0.0.0",
69
- "@ainyc/canonry-api-routes": "0.0.0",
70
70
  "@ainyc/canonry-integration-cloud-run": "0.0.0",
71
- "@ainyc/canonry-integration-traffic": "0.0.0",
72
71
  "@ainyc/canonry-integration-commoncrawl": "0.0.0",
73
- "@ainyc/canonry-intelligence": "0.0.0",
74
72
  "@ainyc/canonry-integration-google": "0.0.0",
73
+ "@ainyc/canonry-integration-traffic": "0.0.0",
74
+ "@ainyc/canonry-intelligence": "0.0.0",
75
75
  "@ainyc/canonry-provider-cdp": "0.0.0",
76
76
  "@ainyc/canonry-provider-claude": "0.0.0",
77
- "@ainyc/canonry-integration-wordpress": "0.0.0",
78
- "@ainyc/canonry-provider-gemini": "0.0.0",
79
- "@ainyc/canonry-provider-local": "0.0.0",
80
77
  "@ainyc/canonry-provider-openai": "0.0.0",
81
- "@ainyc/canonry-provider-perplexity": "0.0.0"
78
+ "@ainyc/canonry-provider-perplexity": "0.0.0",
79
+ "@ainyc/canonry-provider-gemini": "0.0.0",
80
+ "@ainyc/canonry-integration-wordpress": "0.0.0",
81
+ "@ainyc/canonry-provider-local": "0.0.0"
82
82
  },
83
83
  "scripts": {
84
84
  "build": "tsx scripts/copy-agent-assets.ts && tsup && tsx build-web.ts",
@@ -1 +0,0 @@
1
- const n={contentStyle:{backgroundColor:"#18181b",border:"1px solid #3f3f46",borderRadius:8,fontSize:12},labelStyle:{color:"#e4e4e7"},itemStyle:{color:"#a1a1aa"}},o={fill:"#71717a",fontSize:11},r="#27272a",c="#27272a",s=["#34d399","#60a5fa","#f472b6","#facc15","#a78bfa","#fb923c","#22d3ee","#f87171"];function e(a){const t=String(a);return t.includes("T")?new Date(t):new Date(t+"T00:00:00")}function f(a){return e(String(a)).toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}function i(a){const t=e(a);return`${t.getMonth()+1}/${t.getDate()}`}export{c as C,o as a,f as b,n as c,s as d,r as e,i as f};