rulesync 7.2.0 → 7.4.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.
- package/README.md +34 -938
- package/dist/chunk-UCC3WPDL.js +15200 -0
- package/dist/cli/index.cjs +19041 -0
- package/dist/cli/index.d.cts +1 -0
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.js +3944 -0
- package/dist/index.cjs +2180 -5701
- package/dist/index.d.cts +274 -1
- package/dist/index.d.ts +274 -1
- package/dist/index.js +35 -18690
- package/package.json +21 -6
package/dist/index.d.cts
CHANGED
|
@@ -1 +1,274 @@
|
|
|
1
|
-
|
|
1
|
+
import { z } from 'zod/mini';
|
|
2
|
+
|
|
3
|
+
declare const ALL_TOOL_TARGETS: readonly ["agentsmd", "agentsskills", "antigravity", "augmentcode", "augmentcode-legacy", "claudecode", "claudecode-legacy", "cline", "codexcli", "copilot", "cursor", "factorydroid", "geminicli", "junie", "kilo", "kiro", "opencode", "qwencode", "replit", "roo", "warp", "windsurf", "zed"];
|
|
4
|
+
declare const ToolTargetSchema: z.ZodMiniEnum<{
|
|
5
|
+
agentsmd: "agentsmd";
|
|
6
|
+
agentsskills: "agentsskills";
|
|
7
|
+
antigravity: "antigravity";
|
|
8
|
+
augmentcode: "augmentcode";
|
|
9
|
+
"augmentcode-legacy": "augmentcode-legacy";
|
|
10
|
+
claudecode: "claudecode";
|
|
11
|
+
"claudecode-legacy": "claudecode-legacy";
|
|
12
|
+
cline: "cline";
|
|
13
|
+
codexcli: "codexcli";
|
|
14
|
+
copilot: "copilot";
|
|
15
|
+
cursor: "cursor";
|
|
16
|
+
factorydroid: "factorydroid";
|
|
17
|
+
geminicli: "geminicli";
|
|
18
|
+
junie: "junie";
|
|
19
|
+
kilo: "kilo";
|
|
20
|
+
kiro: "kiro";
|
|
21
|
+
opencode: "opencode";
|
|
22
|
+
qwencode: "qwencode";
|
|
23
|
+
replit: "replit";
|
|
24
|
+
roo: "roo";
|
|
25
|
+
warp: "warp";
|
|
26
|
+
windsurf: "windsurf";
|
|
27
|
+
zed: "zed";
|
|
28
|
+
}>;
|
|
29
|
+
type ToolTarget = z.infer<typeof ToolTargetSchema>;
|
|
30
|
+
|
|
31
|
+
declare const ALL_FEATURES: readonly ["rules", "ignore", "mcp", "subagents", "commands", "skills", "hooks"];
|
|
32
|
+
declare const FeatureSchema: z.ZodMiniEnum<{
|
|
33
|
+
rules: "rules";
|
|
34
|
+
ignore: "ignore";
|
|
35
|
+
mcp: "mcp";
|
|
36
|
+
subagents: "subagents";
|
|
37
|
+
commands: "commands";
|
|
38
|
+
skills: "skills";
|
|
39
|
+
hooks: "hooks";
|
|
40
|
+
}>;
|
|
41
|
+
type Feature = z.infer<typeof FeatureSchema>;
|
|
42
|
+
|
|
43
|
+
type ImportResult = {
|
|
44
|
+
rulesCount: number;
|
|
45
|
+
ignoreCount: number;
|
|
46
|
+
mcpCount: number;
|
|
47
|
+
commandsCount: number;
|
|
48
|
+
subagentsCount: number;
|
|
49
|
+
skillsCount: number;
|
|
50
|
+
hooksCount: number;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
type ValidationResult = {
|
|
54
|
+
success: true;
|
|
55
|
+
error: undefined | null;
|
|
56
|
+
} | {
|
|
57
|
+
success: false;
|
|
58
|
+
error: Error;
|
|
59
|
+
};
|
|
60
|
+
type AiDirFile = {
|
|
61
|
+
relativeFilePathToDirPath: string;
|
|
62
|
+
fileBuffer: Buffer;
|
|
63
|
+
};
|
|
64
|
+
type AiDirParams = {
|
|
65
|
+
baseDir?: string;
|
|
66
|
+
relativeDirPath: string;
|
|
67
|
+
dirName: string;
|
|
68
|
+
mainFile?: {
|
|
69
|
+
name: string;
|
|
70
|
+
body: string;
|
|
71
|
+
frontmatter?: Record<string, unknown>;
|
|
72
|
+
};
|
|
73
|
+
otherFiles?: AiDirFile[];
|
|
74
|
+
global?: boolean;
|
|
75
|
+
};
|
|
76
|
+
type AiDirFromDirParams = Pick<AiDirParams, "baseDir" | "relativeDirPath" | "dirName" | "global">;
|
|
77
|
+
declare abstract class AiDir {
|
|
78
|
+
/**
|
|
79
|
+
* @example "."
|
|
80
|
+
*/
|
|
81
|
+
protected readonly baseDir: string;
|
|
82
|
+
/**
|
|
83
|
+
* @example ".rulesync/skills"
|
|
84
|
+
*/
|
|
85
|
+
protected readonly relativeDirPath: string;
|
|
86
|
+
/**
|
|
87
|
+
* @example "my-skill"
|
|
88
|
+
*/
|
|
89
|
+
protected readonly dirName: string;
|
|
90
|
+
/**
|
|
91
|
+
* Optional main file with frontmatter support
|
|
92
|
+
*/
|
|
93
|
+
protected mainFile?: {
|
|
94
|
+
name: string;
|
|
95
|
+
body: string;
|
|
96
|
+
frontmatter?: Record<string, unknown>;
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* Additional files in the directory
|
|
100
|
+
*/
|
|
101
|
+
protected otherFiles: AiDirFile[];
|
|
102
|
+
/**
|
|
103
|
+
* @example false
|
|
104
|
+
*/
|
|
105
|
+
protected readonly global: boolean;
|
|
106
|
+
constructor({ baseDir, relativeDirPath, dirName, mainFile, otherFiles, global, }: AiDirParams);
|
|
107
|
+
static fromDir(_params: AiDirFromDirParams): Promise<AiDir>;
|
|
108
|
+
getBaseDir(): string;
|
|
109
|
+
getRelativeDirPath(): string;
|
|
110
|
+
getDirName(): string;
|
|
111
|
+
getDirPath(): string;
|
|
112
|
+
getMainFile(): {
|
|
113
|
+
name: string;
|
|
114
|
+
body: string;
|
|
115
|
+
frontmatter?: Record<string, unknown>;
|
|
116
|
+
} | undefined;
|
|
117
|
+
getOtherFiles(): AiDirFile[];
|
|
118
|
+
getRelativePathFromCwd(): string;
|
|
119
|
+
getGlobal(): boolean;
|
|
120
|
+
setMainFile(name: string, body: string, frontmatter?: Record<string, unknown>): void;
|
|
121
|
+
/**
|
|
122
|
+
* Recursively collects all files from a directory, excluding the specified main file.
|
|
123
|
+
* This is a common utility for loading additional files alongside the main file.
|
|
124
|
+
*
|
|
125
|
+
* @param baseDir - The base directory path
|
|
126
|
+
* @param relativeDirPath - The relative path to the directory containing the skill
|
|
127
|
+
* @param dirName - The name of the directory
|
|
128
|
+
* @param excludeFileName - The name of the file to exclude (typically the main file)
|
|
129
|
+
* @returns Array of files with their relative paths and buffers
|
|
130
|
+
*/
|
|
131
|
+
protected static collectOtherFiles(baseDir: string, relativeDirPath: string, dirName: string, excludeFileName: string): Promise<AiDirFile[]>;
|
|
132
|
+
abstract validate(): ValidationResult;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
declare const RulesyncSkillFrontmatterSchemaInternal: z.ZodMiniObject<{
|
|
136
|
+
name: z.ZodMiniString<string>;
|
|
137
|
+
description: z.ZodMiniString<string>;
|
|
138
|
+
targets: z.ZodMiniDefault<z.ZodMiniArray<z.ZodMiniEnum<{
|
|
139
|
+
agentsmd: "agentsmd";
|
|
140
|
+
agentsskills: "agentsskills";
|
|
141
|
+
antigravity: "antigravity";
|
|
142
|
+
augmentcode: "augmentcode";
|
|
143
|
+
"augmentcode-legacy": "augmentcode-legacy";
|
|
144
|
+
claudecode: "claudecode";
|
|
145
|
+
"claudecode-legacy": "claudecode-legacy";
|
|
146
|
+
cline: "cline";
|
|
147
|
+
codexcli: "codexcli";
|
|
148
|
+
copilot: "copilot";
|
|
149
|
+
cursor: "cursor";
|
|
150
|
+
factorydroid: "factorydroid";
|
|
151
|
+
geminicli: "geminicli";
|
|
152
|
+
junie: "junie";
|
|
153
|
+
kilo: "kilo";
|
|
154
|
+
kiro: "kiro";
|
|
155
|
+
opencode: "opencode";
|
|
156
|
+
qwencode: "qwencode";
|
|
157
|
+
replit: "replit";
|
|
158
|
+
roo: "roo";
|
|
159
|
+
warp: "warp";
|
|
160
|
+
windsurf: "windsurf";
|
|
161
|
+
zed: "zed";
|
|
162
|
+
"*": "*";
|
|
163
|
+
}>>>;
|
|
164
|
+
claudecode: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
165
|
+
"allowed-tools": z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
166
|
+
}, z.core.$loose>>;
|
|
167
|
+
codexcli: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
168
|
+
"short-description": z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
169
|
+
}, z.core.$loose>>;
|
|
170
|
+
opencode: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
171
|
+
"allowed-tools": z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
172
|
+
}, z.core.$loose>>;
|
|
173
|
+
copilot: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
174
|
+
license: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
175
|
+
}, z.core.$loose>>;
|
|
176
|
+
roo: z.ZodMiniOptional<z.ZodMiniObject<{}, z.core.$loose>>;
|
|
177
|
+
}, z.core.$loose>;
|
|
178
|
+
type RulesyncSkillFrontmatterInput = {
|
|
179
|
+
name: string;
|
|
180
|
+
description: string;
|
|
181
|
+
targets?: ("*" | string)[];
|
|
182
|
+
claudecode?: {
|
|
183
|
+
"allowed-tools"?: string[];
|
|
184
|
+
};
|
|
185
|
+
codexcli?: {
|
|
186
|
+
"short-description"?: string;
|
|
187
|
+
};
|
|
188
|
+
opencode?: {
|
|
189
|
+
"allowed-tools"?: string[];
|
|
190
|
+
};
|
|
191
|
+
copilot?: {
|
|
192
|
+
license?: string;
|
|
193
|
+
};
|
|
194
|
+
roo?: Record<string, unknown>;
|
|
195
|
+
};
|
|
196
|
+
type RulesyncSkillFrontmatter = z.infer<typeof RulesyncSkillFrontmatterSchemaInternal>;
|
|
197
|
+
type RulesyncSkillParams = {
|
|
198
|
+
baseDir?: string;
|
|
199
|
+
relativeDirPath?: string;
|
|
200
|
+
dirName: string;
|
|
201
|
+
frontmatter: RulesyncSkillFrontmatterInput;
|
|
202
|
+
body: string;
|
|
203
|
+
otherFiles?: AiDirFile[];
|
|
204
|
+
validate?: boolean;
|
|
205
|
+
global?: boolean;
|
|
206
|
+
};
|
|
207
|
+
type RulesyncSkillSettablePaths = {
|
|
208
|
+
relativeDirPath: string;
|
|
209
|
+
};
|
|
210
|
+
type RulesyncSkillFromDirParams = {
|
|
211
|
+
baseDir?: string;
|
|
212
|
+
relativeDirPath?: string;
|
|
213
|
+
dirName: string;
|
|
214
|
+
global?: boolean;
|
|
215
|
+
};
|
|
216
|
+
/**
|
|
217
|
+
* Represents a Rulesync skill directory with SKILL.md and optional additional files.
|
|
218
|
+
* Extends AiDir to inherit directory management and security features.
|
|
219
|
+
*/
|
|
220
|
+
declare class RulesyncSkill extends AiDir {
|
|
221
|
+
constructor({ baseDir, relativeDirPath, dirName, frontmatter, body, otherFiles, validate, global, }: RulesyncSkillParams);
|
|
222
|
+
static getSettablePaths(): RulesyncSkillSettablePaths;
|
|
223
|
+
getFrontmatter(): RulesyncSkillFrontmatter;
|
|
224
|
+
getBody(): string;
|
|
225
|
+
validate(): ValidationResult;
|
|
226
|
+
static fromDir({ baseDir, relativeDirPath, dirName, global, }: RulesyncSkillFromDirParams): Promise<RulesyncSkill>;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
type GenerateResult = {
|
|
230
|
+
rulesCount: number;
|
|
231
|
+
rulesPaths: string[];
|
|
232
|
+
ignoreCount: number;
|
|
233
|
+
ignorePaths: string[];
|
|
234
|
+
mcpCount: number;
|
|
235
|
+
mcpPaths: string[];
|
|
236
|
+
commandsCount: number;
|
|
237
|
+
commandsPaths: string[];
|
|
238
|
+
subagentsCount: number;
|
|
239
|
+
subagentsPaths: string[];
|
|
240
|
+
skillsCount: number;
|
|
241
|
+
skillsPaths: string[];
|
|
242
|
+
hooksCount: number;
|
|
243
|
+
hooksPaths: string[];
|
|
244
|
+
skills: RulesyncSkill[];
|
|
245
|
+
hasDiff: boolean;
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
type GenerateOptions = {
|
|
249
|
+
targets?: ToolTarget[];
|
|
250
|
+
features?: Feature[];
|
|
251
|
+
baseDirs?: string[];
|
|
252
|
+
configPath?: string;
|
|
253
|
+
verbose?: boolean;
|
|
254
|
+
silent?: boolean;
|
|
255
|
+
delete?: boolean;
|
|
256
|
+
global?: boolean;
|
|
257
|
+
simulateCommands?: boolean;
|
|
258
|
+
simulateSubagents?: boolean;
|
|
259
|
+
simulateSkills?: boolean;
|
|
260
|
+
dryRun?: boolean;
|
|
261
|
+
check?: boolean;
|
|
262
|
+
};
|
|
263
|
+
type ImportOptions = {
|
|
264
|
+
target: ToolTarget;
|
|
265
|
+
features?: Feature[];
|
|
266
|
+
configPath?: string;
|
|
267
|
+
verbose?: boolean;
|
|
268
|
+
silent?: boolean;
|
|
269
|
+
global?: boolean;
|
|
270
|
+
};
|
|
271
|
+
declare function generate(options?: GenerateOptions): Promise<GenerateResult>;
|
|
272
|
+
declare function importFromTool(options: ImportOptions): Promise<ImportResult>;
|
|
273
|
+
|
|
274
|
+
export { ALL_FEATURES, ALL_TOOL_TARGETS, type Feature, type GenerateOptions, type GenerateResult, type ImportOptions, type ImportResult, type ToolTarget, generate, importFromTool };
|
package/dist/index.d.ts
CHANGED
|
@@ -1 +1,274 @@
|
|
|
1
|
-
|
|
1
|
+
import { z } from 'zod/mini';
|
|
2
|
+
|
|
3
|
+
declare const ALL_TOOL_TARGETS: readonly ["agentsmd", "agentsskills", "antigravity", "augmentcode", "augmentcode-legacy", "claudecode", "claudecode-legacy", "cline", "codexcli", "copilot", "cursor", "factorydroid", "geminicli", "junie", "kilo", "kiro", "opencode", "qwencode", "replit", "roo", "warp", "windsurf", "zed"];
|
|
4
|
+
declare const ToolTargetSchema: z.ZodMiniEnum<{
|
|
5
|
+
agentsmd: "agentsmd";
|
|
6
|
+
agentsskills: "agentsskills";
|
|
7
|
+
antigravity: "antigravity";
|
|
8
|
+
augmentcode: "augmentcode";
|
|
9
|
+
"augmentcode-legacy": "augmentcode-legacy";
|
|
10
|
+
claudecode: "claudecode";
|
|
11
|
+
"claudecode-legacy": "claudecode-legacy";
|
|
12
|
+
cline: "cline";
|
|
13
|
+
codexcli: "codexcli";
|
|
14
|
+
copilot: "copilot";
|
|
15
|
+
cursor: "cursor";
|
|
16
|
+
factorydroid: "factorydroid";
|
|
17
|
+
geminicli: "geminicli";
|
|
18
|
+
junie: "junie";
|
|
19
|
+
kilo: "kilo";
|
|
20
|
+
kiro: "kiro";
|
|
21
|
+
opencode: "opencode";
|
|
22
|
+
qwencode: "qwencode";
|
|
23
|
+
replit: "replit";
|
|
24
|
+
roo: "roo";
|
|
25
|
+
warp: "warp";
|
|
26
|
+
windsurf: "windsurf";
|
|
27
|
+
zed: "zed";
|
|
28
|
+
}>;
|
|
29
|
+
type ToolTarget = z.infer<typeof ToolTargetSchema>;
|
|
30
|
+
|
|
31
|
+
declare const ALL_FEATURES: readonly ["rules", "ignore", "mcp", "subagents", "commands", "skills", "hooks"];
|
|
32
|
+
declare const FeatureSchema: z.ZodMiniEnum<{
|
|
33
|
+
rules: "rules";
|
|
34
|
+
ignore: "ignore";
|
|
35
|
+
mcp: "mcp";
|
|
36
|
+
subagents: "subagents";
|
|
37
|
+
commands: "commands";
|
|
38
|
+
skills: "skills";
|
|
39
|
+
hooks: "hooks";
|
|
40
|
+
}>;
|
|
41
|
+
type Feature = z.infer<typeof FeatureSchema>;
|
|
42
|
+
|
|
43
|
+
type ImportResult = {
|
|
44
|
+
rulesCount: number;
|
|
45
|
+
ignoreCount: number;
|
|
46
|
+
mcpCount: number;
|
|
47
|
+
commandsCount: number;
|
|
48
|
+
subagentsCount: number;
|
|
49
|
+
skillsCount: number;
|
|
50
|
+
hooksCount: number;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
type ValidationResult = {
|
|
54
|
+
success: true;
|
|
55
|
+
error: undefined | null;
|
|
56
|
+
} | {
|
|
57
|
+
success: false;
|
|
58
|
+
error: Error;
|
|
59
|
+
};
|
|
60
|
+
type AiDirFile = {
|
|
61
|
+
relativeFilePathToDirPath: string;
|
|
62
|
+
fileBuffer: Buffer;
|
|
63
|
+
};
|
|
64
|
+
type AiDirParams = {
|
|
65
|
+
baseDir?: string;
|
|
66
|
+
relativeDirPath: string;
|
|
67
|
+
dirName: string;
|
|
68
|
+
mainFile?: {
|
|
69
|
+
name: string;
|
|
70
|
+
body: string;
|
|
71
|
+
frontmatter?: Record<string, unknown>;
|
|
72
|
+
};
|
|
73
|
+
otherFiles?: AiDirFile[];
|
|
74
|
+
global?: boolean;
|
|
75
|
+
};
|
|
76
|
+
type AiDirFromDirParams = Pick<AiDirParams, "baseDir" | "relativeDirPath" | "dirName" | "global">;
|
|
77
|
+
declare abstract class AiDir {
|
|
78
|
+
/**
|
|
79
|
+
* @example "."
|
|
80
|
+
*/
|
|
81
|
+
protected readonly baseDir: string;
|
|
82
|
+
/**
|
|
83
|
+
* @example ".rulesync/skills"
|
|
84
|
+
*/
|
|
85
|
+
protected readonly relativeDirPath: string;
|
|
86
|
+
/**
|
|
87
|
+
* @example "my-skill"
|
|
88
|
+
*/
|
|
89
|
+
protected readonly dirName: string;
|
|
90
|
+
/**
|
|
91
|
+
* Optional main file with frontmatter support
|
|
92
|
+
*/
|
|
93
|
+
protected mainFile?: {
|
|
94
|
+
name: string;
|
|
95
|
+
body: string;
|
|
96
|
+
frontmatter?: Record<string, unknown>;
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* Additional files in the directory
|
|
100
|
+
*/
|
|
101
|
+
protected otherFiles: AiDirFile[];
|
|
102
|
+
/**
|
|
103
|
+
* @example false
|
|
104
|
+
*/
|
|
105
|
+
protected readonly global: boolean;
|
|
106
|
+
constructor({ baseDir, relativeDirPath, dirName, mainFile, otherFiles, global, }: AiDirParams);
|
|
107
|
+
static fromDir(_params: AiDirFromDirParams): Promise<AiDir>;
|
|
108
|
+
getBaseDir(): string;
|
|
109
|
+
getRelativeDirPath(): string;
|
|
110
|
+
getDirName(): string;
|
|
111
|
+
getDirPath(): string;
|
|
112
|
+
getMainFile(): {
|
|
113
|
+
name: string;
|
|
114
|
+
body: string;
|
|
115
|
+
frontmatter?: Record<string, unknown>;
|
|
116
|
+
} | undefined;
|
|
117
|
+
getOtherFiles(): AiDirFile[];
|
|
118
|
+
getRelativePathFromCwd(): string;
|
|
119
|
+
getGlobal(): boolean;
|
|
120
|
+
setMainFile(name: string, body: string, frontmatter?: Record<string, unknown>): void;
|
|
121
|
+
/**
|
|
122
|
+
* Recursively collects all files from a directory, excluding the specified main file.
|
|
123
|
+
* This is a common utility for loading additional files alongside the main file.
|
|
124
|
+
*
|
|
125
|
+
* @param baseDir - The base directory path
|
|
126
|
+
* @param relativeDirPath - The relative path to the directory containing the skill
|
|
127
|
+
* @param dirName - The name of the directory
|
|
128
|
+
* @param excludeFileName - The name of the file to exclude (typically the main file)
|
|
129
|
+
* @returns Array of files with their relative paths and buffers
|
|
130
|
+
*/
|
|
131
|
+
protected static collectOtherFiles(baseDir: string, relativeDirPath: string, dirName: string, excludeFileName: string): Promise<AiDirFile[]>;
|
|
132
|
+
abstract validate(): ValidationResult;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
declare const RulesyncSkillFrontmatterSchemaInternal: z.ZodMiniObject<{
|
|
136
|
+
name: z.ZodMiniString<string>;
|
|
137
|
+
description: z.ZodMiniString<string>;
|
|
138
|
+
targets: z.ZodMiniDefault<z.ZodMiniArray<z.ZodMiniEnum<{
|
|
139
|
+
agentsmd: "agentsmd";
|
|
140
|
+
agentsskills: "agentsskills";
|
|
141
|
+
antigravity: "antigravity";
|
|
142
|
+
augmentcode: "augmentcode";
|
|
143
|
+
"augmentcode-legacy": "augmentcode-legacy";
|
|
144
|
+
claudecode: "claudecode";
|
|
145
|
+
"claudecode-legacy": "claudecode-legacy";
|
|
146
|
+
cline: "cline";
|
|
147
|
+
codexcli: "codexcli";
|
|
148
|
+
copilot: "copilot";
|
|
149
|
+
cursor: "cursor";
|
|
150
|
+
factorydroid: "factorydroid";
|
|
151
|
+
geminicli: "geminicli";
|
|
152
|
+
junie: "junie";
|
|
153
|
+
kilo: "kilo";
|
|
154
|
+
kiro: "kiro";
|
|
155
|
+
opencode: "opencode";
|
|
156
|
+
qwencode: "qwencode";
|
|
157
|
+
replit: "replit";
|
|
158
|
+
roo: "roo";
|
|
159
|
+
warp: "warp";
|
|
160
|
+
windsurf: "windsurf";
|
|
161
|
+
zed: "zed";
|
|
162
|
+
"*": "*";
|
|
163
|
+
}>>>;
|
|
164
|
+
claudecode: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
165
|
+
"allowed-tools": z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
166
|
+
}, z.core.$loose>>;
|
|
167
|
+
codexcli: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
168
|
+
"short-description": z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
169
|
+
}, z.core.$loose>>;
|
|
170
|
+
opencode: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
171
|
+
"allowed-tools": z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
172
|
+
}, z.core.$loose>>;
|
|
173
|
+
copilot: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
174
|
+
license: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
175
|
+
}, z.core.$loose>>;
|
|
176
|
+
roo: z.ZodMiniOptional<z.ZodMiniObject<{}, z.core.$loose>>;
|
|
177
|
+
}, z.core.$loose>;
|
|
178
|
+
type RulesyncSkillFrontmatterInput = {
|
|
179
|
+
name: string;
|
|
180
|
+
description: string;
|
|
181
|
+
targets?: ("*" | string)[];
|
|
182
|
+
claudecode?: {
|
|
183
|
+
"allowed-tools"?: string[];
|
|
184
|
+
};
|
|
185
|
+
codexcli?: {
|
|
186
|
+
"short-description"?: string;
|
|
187
|
+
};
|
|
188
|
+
opencode?: {
|
|
189
|
+
"allowed-tools"?: string[];
|
|
190
|
+
};
|
|
191
|
+
copilot?: {
|
|
192
|
+
license?: string;
|
|
193
|
+
};
|
|
194
|
+
roo?: Record<string, unknown>;
|
|
195
|
+
};
|
|
196
|
+
type RulesyncSkillFrontmatter = z.infer<typeof RulesyncSkillFrontmatterSchemaInternal>;
|
|
197
|
+
type RulesyncSkillParams = {
|
|
198
|
+
baseDir?: string;
|
|
199
|
+
relativeDirPath?: string;
|
|
200
|
+
dirName: string;
|
|
201
|
+
frontmatter: RulesyncSkillFrontmatterInput;
|
|
202
|
+
body: string;
|
|
203
|
+
otherFiles?: AiDirFile[];
|
|
204
|
+
validate?: boolean;
|
|
205
|
+
global?: boolean;
|
|
206
|
+
};
|
|
207
|
+
type RulesyncSkillSettablePaths = {
|
|
208
|
+
relativeDirPath: string;
|
|
209
|
+
};
|
|
210
|
+
type RulesyncSkillFromDirParams = {
|
|
211
|
+
baseDir?: string;
|
|
212
|
+
relativeDirPath?: string;
|
|
213
|
+
dirName: string;
|
|
214
|
+
global?: boolean;
|
|
215
|
+
};
|
|
216
|
+
/**
|
|
217
|
+
* Represents a Rulesync skill directory with SKILL.md and optional additional files.
|
|
218
|
+
* Extends AiDir to inherit directory management and security features.
|
|
219
|
+
*/
|
|
220
|
+
declare class RulesyncSkill extends AiDir {
|
|
221
|
+
constructor({ baseDir, relativeDirPath, dirName, frontmatter, body, otherFiles, validate, global, }: RulesyncSkillParams);
|
|
222
|
+
static getSettablePaths(): RulesyncSkillSettablePaths;
|
|
223
|
+
getFrontmatter(): RulesyncSkillFrontmatter;
|
|
224
|
+
getBody(): string;
|
|
225
|
+
validate(): ValidationResult;
|
|
226
|
+
static fromDir({ baseDir, relativeDirPath, dirName, global, }: RulesyncSkillFromDirParams): Promise<RulesyncSkill>;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
type GenerateResult = {
|
|
230
|
+
rulesCount: number;
|
|
231
|
+
rulesPaths: string[];
|
|
232
|
+
ignoreCount: number;
|
|
233
|
+
ignorePaths: string[];
|
|
234
|
+
mcpCount: number;
|
|
235
|
+
mcpPaths: string[];
|
|
236
|
+
commandsCount: number;
|
|
237
|
+
commandsPaths: string[];
|
|
238
|
+
subagentsCount: number;
|
|
239
|
+
subagentsPaths: string[];
|
|
240
|
+
skillsCount: number;
|
|
241
|
+
skillsPaths: string[];
|
|
242
|
+
hooksCount: number;
|
|
243
|
+
hooksPaths: string[];
|
|
244
|
+
skills: RulesyncSkill[];
|
|
245
|
+
hasDiff: boolean;
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
type GenerateOptions = {
|
|
249
|
+
targets?: ToolTarget[];
|
|
250
|
+
features?: Feature[];
|
|
251
|
+
baseDirs?: string[];
|
|
252
|
+
configPath?: string;
|
|
253
|
+
verbose?: boolean;
|
|
254
|
+
silent?: boolean;
|
|
255
|
+
delete?: boolean;
|
|
256
|
+
global?: boolean;
|
|
257
|
+
simulateCommands?: boolean;
|
|
258
|
+
simulateSubagents?: boolean;
|
|
259
|
+
simulateSkills?: boolean;
|
|
260
|
+
dryRun?: boolean;
|
|
261
|
+
check?: boolean;
|
|
262
|
+
};
|
|
263
|
+
type ImportOptions = {
|
|
264
|
+
target: ToolTarget;
|
|
265
|
+
features?: Feature[];
|
|
266
|
+
configPath?: string;
|
|
267
|
+
verbose?: boolean;
|
|
268
|
+
silent?: boolean;
|
|
269
|
+
global?: boolean;
|
|
270
|
+
};
|
|
271
|
+
declare function generate(options?: GenerateOptions): Promise<GenerateResult>;
|
|
272
|
+
declare function importFromTool(options: ImportOptions): Promise<ImportResult>;
|
|
273
|
+
|
|
274
|
+
export { ALL_FEATURES, ALL_TOOL_TARGETS, type Feature, type GenerateOptions, type GenerateResult, type ImportOptions, type ImportResult, type ToolTarget, generate, importFromTool };
|