@ainyc/canonry 4.97.0 → 4.99.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/canonry/references/canonry-cli.md +7 -3
  2. package/assets/assets/{BacklinksPage-BI9BtHjp.js → BacklinksPage-CuWs7I1D.js} +1 -1
  3. package/assets/assets/{ChartPrimitives-BcjGunGr.js → ChartPrimitives-bm37tprp.js} +1 -1
  4. package/assets/assets/{ProjectPage-BdoberYt.js → ProjectPage-BksYe8FP.js} +1 -1
  5. package/assets/assets/{RunRow-BT2kpdQR.js → RunRow-DzhQl87g.js} +1 -1
  6. package/assets/assets/{RunsPage-BAgZuX7j.js → RunsPage-wOaewhbF.js} +1 -1
  7. package/assets/assets/{SettingsPage-BvKcpivM.js → SettingsPage-CJdhhkkE.js} +1 -1
  8. package/assets/assets/{TrafficPage-BdGOZv1e.js → TrafficPage-BJBeN5Ph.js} +1 -1
  9. package/assets/assets/{TrafficSourceDetailPage-C_N2D9xy.js → TrafficSourceDetailPage-D3PmH0B1.js} +1 -1
  10. package/assets/assets/{arrow-left-C8Fbup8X.js → arrow-left-BmITMI6O.js} +1 -1
  11. package/assets/assets/{extract-error-message-C29K35Gm.js → extract-error-message-BGwnyAfP.js} +1 -1
  12. package/assets/assets/{index-BGfyt3LX.js → index-BSX6r6ju.js} +9 -9
  13. package/assets/assets/{trash-2-DWLIELE_.js → trash-2-Bd2mkP_w.js} +1 -1
  14. package/assets/index.html +1 -1
  15. package/dist/{chunk-NUGGUQH3.js → chunk-CEHD33NQ.js} +326 -29
  16. package/dist/{chunk-E2FDXNMW.js → chunk-CWFTMFEU.js} +5 -3
  17. package/dist/{chunk-TXNKKTFD.js → chunk-DJVUNURL.js} +51 -2
  18. package/dist/{chunk-SRJ5IGNK.js → chunk-VQN74WWA.js} +28 -2
  19. package/dist/cli.js +4 -4
  20. package/dist/index.d.ts +16 -0
  21. package/dist/index.js +4 -4
  22. package/dist/{intelligence-service-DC2TD7RR.js → intelligence-service-QHBXW4KI.js} +2 -2
  23. package/dist/mcp.js +2 -2
  24. package/package.json +7 -7
@@ -263,7 +263,7 @@ import {
263
263
  wordpressSchemaDeployResultDtoSchema,
264
264
  wordpressSchemaStatusResultDtoSchema,
265
265
  wordpressStatusDtoSchema
266
- } from "./chunk-E2FDXNMW.js";
266
+ } from "./chunk-CWFTMFEU.js";
267
267
 
268
268
  // src/intelligence-service.ts
269
269
  import { eq as eq37, desc as desc18, asc as asc5, and as and27, ne as ne5, or as or5, inArray as inArray14, gte as gte7, lte as lte4 } from "drizzle-orm";
@@ -32634,7 +32634,53 @@ var providersConfiguredCheck = {
32634
32634
  };
32635
32635
  }
32636
32636
  };
32637
- var PROVIDERS_CHECKS = [providersConfiguredCheck];
32637
+ var agentProvidersConfiguredCheck = {
32638
+ id: "config.agent-providers",
32639
+ category: CheckCategories.providers,
32640
+ scope: CheckScopes.global,
32641
+ title: "Agent provider keys",
32642
+ run: (ctx) => {
32643
+ const summary = ctx.getAgentProviderSummary?.();
32644
+ if (!summary) {
32645
+ return {
32646
+ status: CheckStatuses.skipped,
32647
+ code: "agent-providers.summary-unavailable",
32648
+ summary: "Agent provider summary is not available in this deployment.",
32649
+ remediation: null
32650
+ };
32651
+ }
32652
+ const configured = summary.filter((entry) => entry.configured);
32653
+ const total = summary.length;
32654
+ const details = {
32655
+ configured: configured.map((entry) => entry.id),
32656
+ providers: summary.map((entry) => ({
32657
+ id: entry.id,
32658
+ configured: entry.configured,
32659
+ keySource: entry.keySource
32660
+ }))
32661
+ };
32662
+ if (configured.length === 0) {
32663
+ return {
32664
+ status: CheckStatuses.warn,
32665
+ code: "agent-providers.none-configured",
32666
+ summary: "No agent LLM provider has credentials configured \u2014 the built-in Aero agent cannot run.",
32667
+ remediation: "Add a key for one of the agent providers (claude, openai, gemini, zai, deepinfra) under `providers.<name>.apiKey` in ~/.canonry/config.yaml, or export its env var (e.g. ANTHROPIC_API_KEY, OPENAI_API_KEY, DEEPINFRA_TOKEN).",
32668
+ details
32669
+ };
32670
+ }
32671
+ return {
32672
+ status: CheckStatuses.ok,
32673
+ code: "agent-providers.configured",
32674
+ summary: `${configured.length} of ${total} agent providers configured: ${configured.map((e) => e.id).join(", ")}.`,
32675
+ remediation: null,
32676
+ details
32677
+ };
32678
+ }
32679
+ };
32680
+ var PROVIDERS_CHECKS = [
32681
+ providersConfiguredCheck,
32682
+ agentProvidersConfiguredCheck
32683
+ ];
32638
32684
 
32639
32685
  // ../api-routes/src/doctor/checks/runtime-state.ts
32640
32686
  import fs7 from "fs";
@@ -33216,6 +33262,7 @@ async function doctorRoutes(app, opts) {
33216
33262
  getPlacesConfig: opts.getPlacesConfig,
33217
33263
  redirectUri,
33218
33264
  providerSummary: opts.providerSummary,
33265
+ getAgentProviderSummary: opts.getAgentProviderSummary,
33219
33266
  trafficSourceValidators: opts.trafficSourceValidators,
33220
33267
  runtimeStatePaths: opts.runtimeStatePaths,
33221
33268
  bundledSkills: opts.bundledSkills
@@ -33242,6 +33289,7 @@ async function doctorRoutes(app, opts) {
33242
33289
  getPlacesConfig: opts.getPlacesConfig,
33243
33290
  redirectUri,
33244
33291
  providerSummary: opts.providerSummary,
33292
+ getAgentProviderSummary: opts.getAgentProviderSummary,
33245
33293
  trafficSourceValidators: opts.trafficSourceValidators,
33246
33294
  runtimeStatePaths: opts.runtimeStatePaths,
33247
33295
  bundledSkills: opts.bundledSkills
@@ -34144,6 +34192,7 @@ async function apiRoutes(app, opts) {
34144
34192
  getPlacesConfig: opts.getPlacesConfig,
34145
34193
  publicUrl: opts.publicUrl,
34146
34194
  providerSummary: opts.providerSummary,
34195
+ getAgentProviderSummary: opts.getAgentProviderSummary,
34147
34196
  trafficSourceValidators: buildTrafficSourceValidators(opts),
34148
34197
  runtimeStatePaths: opts.runtimeStatePaths,
34149
34198
  bundledSkills: opts.bundledSkills
@@ -24,7 +24,7 @@ import {
24
24
  trafficConnectVercelRequestSchema,
25
25
  trafficConnectWordpressRequestSchema,
26
26
  trafficEventKindSchema
27
- } from "./chunk-E2FDXNMW.js";
27
+ } from "./chunk-CWFTMFEU.js";
28
28
 
29
29
  // src/config.ts
30
30
  import fs from "fs";
@@ -118,8 +118,34 @@ Do not write config.yaml by hand; use "canonry init", "canonry settings", or "ca
118
118
  } catch {
119
119
  }
120
120
  }
121
+ const parsedExternalMcp = parseExternalMcpEnv(process.env.CANONRY_EXTERNAL_MCP);
122
+ if (parsedExternalMcp) {
123
+ parsed.externalMcpServers = parsedExternalMcp;
124
+ }
121
125
  return parsed;
122
126
  }
127
+ function parseExternalMcpEnv(raw) {
128
+ const trimmed = raw?.trim();
129
+ if (!trimmed) return void 0;
130
+ let value;
131
+ try {
132
+ value = JSON.parse(trimmed);
133
+ } catch {
134
+ return void 0;
135
+ }
136
+ if (!Array.isArray(value)) return void 0;
137
+ const servers = [];
138
+ for (const entry of value) {
139
+ if (!entry || typeof entry !== "object") continue;
140
+ const candidate = entry;
141
+ const url = typeof candidate.url === "string" ? candidate.url.trim() : "";
142
+ const token = typeof candidate.token === "string" ? candidate.token : "";
143
+ if (!url || !token) continue;
144
+ const label = typeof candidate.label === "string" ? candidate.label : void 0;
145
+ servers.push({ url, token, ...label ? { label } : {} });
146
+ }
147
+ return servers.length > 0 ? servers : void 0;
148
+ }
123
149
  function loadConfigRaw() {
124
150
  const configPath = getConfigPath();
125
151
  if (!fs.existsSync(configPath)) return null;
@@ -5466,7 +5492,7 @@ var contentTargetsInputSchema = z2.object({
5466
5492
  var contentBriefInputSchema = z2.object({
5467
5493
  project: projectNameSchema,
5468
5494
  targetRef: z2.string().min(1).describe("Stable target ref from canonry_content_targets. The target must be ownable; ceded targets are rejected."),
5469
- provider: z2.string().optional().describe("Optional provider override (claude|openai|gemini|zai)."),
5495
+ provider: z2.string().optional().describe("Optional provider override (claude|openai|gemini|zai|deepinfra)."),
5470
5496
  model: z2.string().optional().describe("Optional model override within the chosen provider."),
5471
5497
  forceRefresh: z2.boolean().optional().describe("Force a fresh synthesis even if a cached brief exists.")
5472
5498
  });
package/dist/cli.js CHANGED
@@ -27,7 +27,7 @@ import {
27
27
  setTelemetrySource,
28
28
  showFirstRunNotice,
29
29
  trackEvent
30
- } from "./chunk-NUGGUQH3.js";
30
+ } from "./chunk-CEHD33NQ.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-SRJ5IGNK.js";
47
+ } from "./chunk-VQN74WWA.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-TXNKKTFD.js";
55
+ } from "./chunk-DJVUNURL.js";
56
56
  import {
57
57
  BacklinkSources,
58
58
  CcReleaseSyncStatuses,
@@ -78,7 +78,7 @@ import {
78
78
  providerQuotaPolicySchema,
79
79
  resolveProviderInput,
80
80
  winnabilityClassSchema
81
- } from "./chunk-E2FDXNMW.js";
81
+ } from "./chunk-CWFTMFEU.js";
82
82
 
83
83
  // src/cli.ts
84
84
  import { pathToFileURL } from "url";
package/dist/index.d.ts CHANGED
@@ -156,6 +156,21 @@ interface VercelTrafficConnectionConfigEntry {
156
156
  interface VercelTrafficConfigEntry {
157
157
  connections?: VercelTrafficConnectionConfigEntry[];
158
158
  }
159
+ /**
160
+ * One injected remote MCP server Aero loads read-only tools from (OSS-A).
161
+ * Generic shape: `{ url, token, label? }`. The transport is bearer-gated MCP
162
+ * Streamable HTTP (the contract is frozen in `agent/remote-mcp.ts`). The
163
+ * server is remote, never co-located in the OSS container; per-tenant
164
+ * isolation is the token's responsibility, not the container boundary.
165
+ */
166
+ interface ExternalMcpServerConfig {
167
+ /** Streamable HTTP endpoint of the remote MCP server. */
168
+ url: string;
169
+ /** Bearer token sent as `Authorization: Bearer <token>`. */
170
+ token: string;
171
+ /** Optional human label used in logs. Defaults to `url`. */
172
+ label?: string;
173
+ }
159
174
  interface AgentConfigEntry {
160
175
  /**
161
176
  * Agent mode. `'disabled'` turns the built-in Aero agent OFF entirely — the
@@ -212,6 +227,7 @@ interface CanonryConfig {
212
227
  lastUpdateCheckAt?: string;
213
228
  lastKnownLatestVersion?: string;
214
229
  agent?: AgentConfigEntry;
230
+ externalMcpServers?: ExternalMcpServerConfig[];
215
231
  places?: PlacesConfigEntry;
216
232
  embed?: EmbedConfigEntry;
217
233
  }
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  createServer
3
- } from "./chunk-NUGGUQH3.js";
3
+ } from "./chunk-CEHD33NQ.js";
4
4
  import {
5
5
  loadConfig
6
- } from "./chunk-SRJ5IGNK.js";
7
- import "./chunk-TXNKKTFD.js";
8
- import "./chunk-E2FDXNMW.js";
6
+ } from "./chunk-VQN74WWA.js";
7
+ import "./chunk-DJVUNURL.js";
8
+ import "./chunk-CWFTMFEU.js";
9
9
  export {
10
10
  createServer,
11
11
  loadConfig
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  IntelligenceService
3
- } from "./chunk-TXNKKTFD.js";
4
- import "./chunk-E2FDXNMW.js";
3
+ } from "./chunk-DJVUNURL.js";
4
+ import "./chunk-CWFTMFEU.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-SRJ5IGNK.js";
6
+ } from "./chunk-VQN74WWA.js";
7
7
  import {
8
8
  isReadOnlyKey
9
- } from "./chunk-E2FDXNMW.js";
9
+ } from "./chunk-CWFTMFEU.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.97.0",
3
+ "version": "4.99.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",
@@ -66,23 +66,23 @@
66
66
  "@ainyc/canonry-api-routes": "0.0.0",
67
67
  "@ainyc/canonry-contracts": "0.0.0",
68
68
  "@ainyc/canonry-config": "0.0.0",
69
- "@ainyc/canonry-integration-bing": "0.0.0",
70
- "@ainyc/canonry-integration-openai-ads": "0.0.0",
71
69
  "@ainyc/canonry-db": "0.0.0",
70
+ "@ainyc/canonry-integration-openai-ads": "0.0.0",
71
+ "@ainyc/canonry-integration-bing": "0.0.0",
72
72
  "@ainyc/canonry-integration-cloud-run": "0.0.0",
73
73
  "@ainyc/canonry-integration-commoncrawl": "0.0.0",
74
74
  "@ainyc/canonry-integration-google": "0.0.0",
75
+ "@ainyc/canonry-integration-google-business-profile": "0.0.0",
75
76
  "@ainyc/canonry-integration-traffic": "0.0.0",
76
77
  "@ainyc/canonry-intelligence": "0.0.0",
77
- "@ainyc/canonry-integration-google-business-profile": "0.0.0",
78
78
  "@ainyc/canonry-integration-google-places": "0.0.0",
79
79
  "@ainyc/canonry-provider-cdp": "0.0.0",
80
- "@ainyc/canonry-integration-wordpress": "0.0.0",
81
80
  "@ainyc/canonry-provider-claude": "0.0.0",
82
81
  "@ainyc/canonry-provider-gemini": "0.0.0",
82
+ "@ainyc/canonry-integration-wordpress": "0.0.0",
83
83
  "@ainyc/canonry-provider-local": "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",