@ainyc/canonry 2.6.0 → 2.8.2

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.
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  createServer
3
- } from "./chunk-LF4O276A.js";
3
+ } from "./chunk-MGBXRWLX.js";
4
4
  import {
5
5
  loadConfig
6
- } from "./chunk-3DUTT6H2.js";
6
+ } from "./chunk-FPZUQADO.js";
7
7
  import "./chunk-PYHANJ3B.js";
8
8
  import "./chunk-MLKGABMK.js";
9
9
  export {
package/dist/mcp.js CHANGED
@@ -3,11 +3,14 @@ import {
3
3
  competitorBatchRequestSchema,
4
4
  createApiClient,
5
5
  keywordBatchRequestSchema,
6
+ keywordGenerateRequestSchema,
6
7
  notificationCreateRequestSchema,
7
8
  notificationEventSchema,
9
+ projectConfigSchema,
10
+ projectUpsertRequestSchema,
8
11
  runTriggerRequestSchema,
9
12
  scheduleUpsertRequestSchema
10
- } from "./chunk-3DUTT6H2.js";
13
+ } from "./chunk-FPZUQADO.js";
11
14
  import "./chunk-MLKGABMK.js";
12
15
 
13
16
  // src/mcp/cli.ts
@@ -146,10 +149,21 @@ var keywordsInputSchema = z2.object({
146
149
  project: projectNameSchema,
147
150
  request: keywordBatchRequestSchema
148
151
  });
149
- var competitorsAddInputSchema = z2.object({
152
+ var keywordGenerateInputSchema = z2.object({
153
+ project: projectNameSchema,
154
+ request: keywordGenerateRequestSchema
155
+ });
156
+ var competitorsInputSchema = z2.object({
150
157
  project: projectNameSchema,
151
158
  request: competitorBatchRequestSchema
152
159
  });
160
+ var projectUpsertInputSchema = z2.object({
161
+ project: projectNameSchema,
162
+ request: projectUpsertRequestSchema
163
+ });
164
+ var applyConfigInputSchema = z2.object({
165
+ config: projectConfigSchema
166
+ });
153
167
  var scheduleSetInputSchema = z2.object({
154
168
  project: projectNameSchema,
155
169
  schedule: scheduleUpsertRequestSchema
@@ -499,6 +513,49 @@ var canonryMcpTools = [
499
513
  openApiOperations: ["GET /api/v1/projects/{name}/ga/session-history"],
500
514
  handler: (client, input) => client.gaSessionHistory(input.project, compactStringParams(input, ["window"]))
501
515
  }),
516
+ defineTool({
517
+ name: "canonry_project_upsert",
518
+ title: "Create or replace project",
519
+ description: "Create or replace a Canonry project. PUT semantics \u2014 fields not in the request are reset to their defaults. Provide the full intended project shape.",
520
+ access: "write",
521
+ inputSchema: projectUpsertInputSchema,
522
+ annotations: writeAnnotations({ idempotentHint: true, destructiveHint: true }),
523
+ openApiOperations: ["PUT /api/v1/projects/{name}"],
524
+ handler: (client, input) => client.putProject(input.project, input.request)
525
+ }),
526
+ defineTool({
527
+ name: "canonry_apply_config",
528
+ title: "Apply project config",
529
+ description: "Apply one Canonry config-as-code project document. Replaces the project to match the config \u2014 fields omitted from the spec are reset to defaults. For multi-document YAML, call this tool once per project document.",
530
+ access: "write",
531
+ inputSchema: applyConfigInputSchema,
532
+ // Declarative apply is safe to repeat, but it replaces configured child state.
533
+ annotations: writeAnnotations({ idempotentHint: true, destructiveHint: true }),
534
+ openApiOperations: ["POST /api/v1/apply"],
535
+ handler: (client, input) => client.apply(input.config)
536
+ }),
537
+ defineTool({
538
+ name: "canonry_keywords_generate",
539
+ title: "Generate keyword suggestions",
540
+ description: "Generate candidate key phrases using a configured provider. Returns suggestions only; use canonry_keywords_add to persist them.",
541
+ access: "write",
542
+ inputSchema: keywordGenerateInputSchema,
543
+ annotations: writeAnnotations({ idempotentHint: false, openWorldHint: true }),
544
+ openApiOperations: ["POST /api/v1/projects/{name}/keywords/generate"],
545
+ handler: (client, input) => client.generateKeywords(input.project, input.request.provider, input.request.count)
546
+ }),
547
+ defineTool({
548
+ name: "canonry_keywords_replace",
549
+ title: "Replace keywords",
550
+ description: "Replace the tracked keyword set for a Canonry project.",
551
+ access: "write",
552
+ inputSchema: keywordsInputSchema,
553
+ annotations: writeAnnotations({ idempotentHint: true, destructiveHint: true }),
554
+ openApiOperations: ["PUT /api/v1/projects/{name}/keywords"],
555
+ handler: async (client, input) => {
556
+ await client.putKeywords(input.project, uniqueStrings(input.request.keywords));
557
+ }
558
+ }),
502
559
  defineTool({
503
560
  name: "canonry_run_trigger",
504
561
  title: "Trigger run",
@@ -548,13 +605,23 @@ var canonryMcpTools = [
548
605
  title: "Add competitors",
549
606
  description: "Add tracked competitor domains to a Canonry project.",
550
607
  access: "write",
551
- inputSchema: competitorsAddInputSchema,
608
+ inputSchema: competitorsInputSchema,
552
609
  annotations: writeAnnotations({ idempotentHint: true }),
553
- openApiOperations: ["GET /api/v1/projects/{name}/competitors", "PUT /api/v1/projects/{name}/competitors"],
610
+ openApiOperations: ["POST /api/v1/projects/{name}/competitors"],
611
+ handler: async (client, input) => {
612
+ await client.appendCompetitors(input.project, uniqueStrings(input.request.competitors));
613
+ }
614
+ }),
615
+ defineTool({
616
+ name: "canonry_competitors_remove",
617
+ title: "Remove competitors",
618
+ description: "Remove tracked competitor domains from a Canonry project.",
619
+ access: "write",
620
+ inputSchema: competitorsInputSchema,
621
+ annotations: writeAnnotations({ idempotentHint: true, destructiveHint: true }),
622
+ openApiOperations: ["DELETE /api/v1/projects/{name}/competitors"],
554
623
  handler: async (client, input) => {
555
- const existing = await client.listCompetitors(input.project);
556
- const merged = uniqueStrings([...existing.map((c) => c.domain), ...input.request.competitors]);
557
- await client.putCompetitors(input.project, merged);
624
+ await client.deleteCompetitors(input.project, uniqueStrings(input.request.competitors));
558
625
  }
559
626
  }),
560
627
  defineTool({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ainyc/canonry",
3
- "version": "2.6.0",
3
+ "version": "2.8.2",
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",
@@ -65,15 +65,15 @@
65
65
  "@ainyc/canonry-db": "0.0.0",
66
66
  "@ainyc/canonry-intelligence": "0.0.0",
67
67
  "@ainyc/canonry-integration-bing": "0.0.0",
68
- "@ainyc/canonry-integration-google": "0.0.0",
69
- "@ainyc/canonry-integration-wordpress": "0.0.0",
70
68
  "@ainyc/canonry-integration-commoncrawl": "0.0.0",
69
+ "@ainyc/canonry-integration-wordpress": "0.0.0",
71
70
  "@ainyc/canonry-provider-cdp": "0.0.0",
71
+ "@ainyc/canonry-integration-google": "0.0.0",
72
72
  "@ainyc/canonry-provider-claude": "0.0.0",
73
73
  "@ainyc/canonry-provider-local": "0.0.0",
74
+ "@ainyc/canonry-provider-perplexity": "0.0.0",
74
75
  "@ainyc/canonry-provider-gemini": "0.0.0",
75
- "@ainyc/canonry-provider-openai": "0.0.0",
76
- "@ainyc/canonry-provider-perplexity": "0.0.0"
76
+ "@ainyc/canonry-provider-openai": "0.0.0"
77
77
  },
78
78
  "scripts": {
79
79
  "build": "tsx scripts/copy-agent-assets.ts && tsup && tsx build-web.ts",