rulesync 0.41.0 → 0.43.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.
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  generateRooMcp,
3
3
  generateRooMcpConfiguration
4
- } from "./chunk-PPX47BRK.js";
5
- import "./chunk-6YNGMPAL.js";
4
+ } from "./chunk-RL3TE3EZ.js";
5
+ import "./chunk-THWXK5Z2.js";
6
6
  export {
7
7
  generateRooMcp,
8
8
  generateRooMcpConfiguration
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rulesync",
3
- "version": "0.41.0",
3
+ "version": "0.43.0",
4
4
  "description": "Unified AI rules management CLI tool that generates configuration files for various AI development tools",
5
5
  "keywords": [
6
6
  "ai",
@@ -1,56 +0,0 @@
1
- // src/schemas/mcp.ts
2
- import { z } from "zod";
3
- var ToolTargetSchema = z.enum([
4
- "copilot",
5
- "cursor",
6
- "cline",
7
- "claudecode",
8
- "claude",
9
- "roo",
10
- "geminicli"
11
- ]);
12
- var WildcardTargetSchema = z.tuple([z.literal("*")]);
13
- var SpecificTargetsSchema = z.array(ToolTargetSchema);
14
- var RulesyncTargetsSchema = z.union([SpecificTargetsSchema, WildcardTargetSchema]);
15
- var McpTransportTypeSchema = z.enum(["stdio", "sse", "http"]);
16
- var McpServerBaseSchema = z.object({
17
- command: z.string().optional(),
18
- args: z.array(z.string()).optional(),
19
- url: z.string().optional(),
20
- httpUrl: z.string().optional(),
21
- env: z.record(z.string()).optional(),
22
- disabled: z.boolean().optional(),
23
- networkTimeout: z.number().optional(),
24
- timeout: z.number().optional(),
25
- trust: z.boolean().optional(),
26
- cwd: z.string().optional(),
27
- transport: McpTransportTypeSchema.optional(),
28
- type: z.enum(["sse", "streamable-http"]).optional(),
29
- alwaysAllow: z.array(z.string()).optional(),
30
- tools: z.array(z.string()).optional()
31
- });
32
- var RulesyncMcpServerSchema = McpServerBaseSchema.extend({
33
- targets: RulesyncTargetsSchema.optional()
34
- });
35
-
36
- // src/utils/mcp-helpers.ts
37
- function shouldIncludeServer(server, targetTool) {
38
- if (!server.targets || server.targets.length === 0) {
39
- return true;
40
- }
41
- const parsedTargets = RulesyncTargetsSchema.parse(server.targets);
42
- if (parsedTargets.length === 1 && parsedTargets[0] === "*") {
43
- return true;
44
- }
45
- const validatedTool = ToolTargetSchema.parse(targetTool);
46
- for (const target of parsedTargets) {
47
- if (target === validatedTool) {
48
- return true;
49
- }
50
- }
51
- return false;
52
- }
53
-
54
- export {
55
- shouldIncludeServer
56
- };