rulesync 8.12.0 → 8.14.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 +2 -2
- package/dist/{chunk-643VJ2QM.js → chunk-C7PHKGD2.js} +3183 -2292
- package/dist/cli/index.cjs +3540 -2599
- package/dist/cli/index.js +157 -107
- package/dist/index.cjs +3034 -2144
- package/dist/index.d.cts +27 -11
- package/dist/index.d.ts +27 -11
- package/dist/index.js +4 -5
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -70,7 +70,7 @@ type AiDirFile = {
|
|
|
70
70
|
fileBuffer: Buffer;
|
|
71
71
|
};
|
|
72
72
|
type AiDirParams = {
|
|
73
|
-
|
|
73
|
+
outputRoot?: string;
|
|
74
74
|
relativeDirPath: string;
|
|
75
75
|
dirName: string;
|
|
76
76
|
mainFile?: {
|
|
@@ -81,12 +81,12 @@ type AiDirParams = {
|
|
|
81
81
|
otherFiles?: AiDirFile[];
|
|
82
82
|
global?: boolean;
|
|
83
83
|
};
|
|
84
|
-
type AiDirFromDirParams = Pick<AiDirParams, "
|
|
84
|
+
type AiDirFromDirParams = Pick<AiDirParams, "outputRoot" | "relativeDirPath" | "dirName" | "global">;
|
|
85
85
|
declare abstract class AiDir {
|
|
86
86
|
/**
|
|
87
87
|
* @example "."
|
|
88
88
|
*/
|
|
89
|
-
protected readonly
|
|
89
|
+
protected readonly outputRoot: string;
|
|
90
90
|
/**
|
|
91
91
|
* @example ".rulesync/skills"
|
|
92
92
|
*/
|
|
@@ -111,9 +111,9 @@ declare abstract class AiDir {
|
|
|
111
111
|
* @example false
|
|
112
112
|
*/
|
|
113
113
|
protected readonly global: boolean;
|
|
114
|
-
constructor({
|
|
114
|
+
constructor({ outputRoot, relativeDirPath, dirName, mainFile, otherFiles, global, }: AiDirParams);
|
|
115
115
|
static fromDir(_params: AiDirFromDirParams): Promise<AiDir>;
|
|
116
|
-
|
|
116
|
+
getOutputRoot(): string;
|
|
117
117
|
getRelativeDirPath(): string;
|
|
118
118
|
getDirName(): string;
|
|
119
119
|
getDirPath(): string;
|
|
@@ -133,13 +133,13 @@ declare abstract class AiDir {
|
|
|
133
133
|
* Recursively collects all files from a directory, excluding the specified main file.
|
|
134
134
|
* This is a common utility for loading additional files alongside the main file.
|
|
135
135
|
*
|
|
136
|
-
* @param
|
|
136
|
+
* @param outputRoot - The base directory path
|
|
137
137
|
* @param relativeDirPath - The relative path to the directory containing the skill
|
|
138
138
|
* @param dirName - The name of the directory
|
|
139
139
|
* @param excludeFileName - The name of the file to exclude (typically the main file)
|
|
140
140
|
* @returns Array of files with their relative paths and buffers
|
|
141
141
|
*/
|
|
142
|
-
protected static collectOtherFiles(
|
|
142
|
+
protected static collectOtherFiles(outputRoot: string, relativeDirPath: string, dirName: string, excludeFileName: string): Promise<AiDirFile[]>;
|
|
143
143
|
abstract validate(): ValidationResult;
|
|
144
144
|
}
|
|
145
145
|
|
|
@@ -182,6 +182,7 @@ declare const RulesyncSkillFrontmatterSchemaInternal: z.ZodMiniObject<{
|
|
|
182
182
|
"allowed-tools": z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
183
183
|
model: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
184
184
|
"disable-model-invocation": z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
185
|
+
"scheduled-task": z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
185
186
|
}, z.core.$loose>>;
|
|
186
187
|
codexcli: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
187
188
|
"short-description": z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
@@ -212,6 +213,7 @@ type RulesyncSkillFrontmatterInput = {
|
|
|
212
213
|
"allowed-tools"?: string[];
|
|
213
214
|
model?: string;
|
|
214
215
|
"disable-model-invocation"?: boolean;
|
|
216
|
+
"scheduled-task"?: boolean;
|
|
215
217
|
};
|
|
216
218
|
codexcli?: {
|
|
217
219
|
"short-description"?: string;
|
|
@@ -236,7 +238,7 @@ type RulesyncSkillFrontmatterInput = {
|
|
|
236
238
|
};
|
|
237
239
|
type RulesyncSkillFrontmatter = z.infer<typeof RulesyncSkillFrontmatterSchemaInternal>;
|
|
238
240
|
type RulesyncSkillParams = {
|
|
239
|
-
|
|
241
|
+
outputRoot?: string;
|
|
240
242
|
relativeDirPath?: string;
|
|
241
243
|
dirName: string;
|
|
242
244
|
frontmatter: RulesyncSkillFrontmatterInput;
|
|
@@ -249,7 +251,7 @@ type RulesyncSkillSettablePaths = {
|
|
|
249
251
|
relativeDirPath: string;
|
|
250
252
|
};
|
|
251
253
|
type RulesyncSkillFromDirParams = {
|
|
252
|
-
|
|
254
|
+
outputRoot?: string;
|
|
253
255
|
relativeDirPath?: string;
|
|
254
256
|
dirName: string;
|
|
255
257
|
global?: boolean;
|
|
@@ -259,12 +261,12 @@ type RulesyncSkillFromDirParams = {
|
|
|
259
261
|
* Extends AiDir to inherit directory management and security features.
|
|
260
262
|
*/
|
|
261
263
|
declare class RulesyncSkill extends AiDir {
|
|
262
|
-
constructor({
|
|
264
|
+
constructor({ outputRoot, relativeDirPath, dirName, frontmatter, body, otherFiles, validate, global, }: RulesyncSkillParams);
|
|
263
265
|
static getSettablePaths(): RulesyncSkillSettablePaths;
|
|
264
266
|
getFrontmatter(): RulesyncSkillFrontmatter;
|
|
265
267
|
getBody(): string;
|
|
266
268
|
validate(): ValidationResult;
|
|
267
|
-
static fromDir({
|
|
269
|
+
static fromDir({ outputRoot, relativeDirPath, dirName, global, }: RulesyncSkillFromDirParams): Promise<RulesyncSkill>;
|
|
268
270
|
}
|
|
269
271
|
|
|
270
272
|
type GenerateResult = {
|
|
@@ -308,7 +310,21 @@ type BaseOptions = {
|
|
|
308
310
|
type GenerateOptions = BaseOptions & {
|
|
309
311
|
targets?: ToolTarget[];
|
|
310
312
|
features?: Feature[];
|
|
313
|
+
outputRoots?: string[];
|
|
314
|
+
/**
|
|
315
|
+
* @deprecated Use `outputRoots` instead. Accepted as a backward-compatible
|
|
316
|
+
* alias for the programmatic API; emits a one-shot deprecation warning when
|
|
317
|
+
* provided. When both `outputRoots` and `baseDirs` are supplied,
|
|
318
|
+
* `outputRoots` wins. Will be removed in a future major release.
|
|
319
|
+
*/
|
|
311
320
|
baseDirs?: string[];
|
|
321
|
+
/**
|
|
322
|
+
* Directory containing the `.rulesync/` source files. Defaults to the
|
|
323
|
+
* current working directory at config-construction time. When set, output
|
|
324
|
+
* is still written to each `outputRoots` entry; only the input source root
|
|
325
|
+
* is redirected. Mirrors the CLI's `--input-root` option.
|
|
326
|
+
*/
|
|
327
|
+
inputRoot?: string;
|
|
312
328
|
delete?: boolean;
|
|
313
329
|
simulateCommands?: boolean;
|
|
314
330
|
simulateSubagents?: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -70,7 +70,7 @@ type AiDirFile = {
|
|
|
70
70
|
fileBuffer: Buffer;
|
|
71
71
|
};
|
|
72
72
|
type AiDirParams = {
|
|
73
|
-
|
|
73
|
+
outputRoot?: string;
|
|
74
74
|
relativeDirPath: string;
|
|
75
75
|
dirName: string;
|
|
76
76
|
mainFile?: {
|
|
@@ -81,12 +81,12 @@ type AiDirParams = {
|
|
|
81
81
|
otherFiles?: AiDirFile[];
|
|
82
82
|
global?: boolean;
|
|
83
83
|
};
|
|
84
|
-
type AiDirFromDirParams = Pick<AiDirParams, "
|
|
84
|
+
type AiDirFromDirParams = Pick<AiDirParams, "outputRoot" | "relativeDirPath" | "dirName" | "global">;
|
|
85
85
|
declare abstract class AiDir {
|
|
86
86
|
/**
|
|
87
87
|
* @example "."
|
|
88
88
|
*/
|
|
89
|
-
protected readonly
|
|
89
|
+
protected readonly outputRoot: string;
|
|
90
90
|
/**
|
|
91
91
|
* @example ".rulesync/skills"
|
|
92
92
|
*/
|
|
@@ -111,9 +111,9 @@ declare abstract class AiDir {
|
|
|
111
111
|
* @example false
|
|
112
112
|
*/
|
|
113
113
|
protected readonly global: boolean;
|
|
114
|
-
constructor({
|
|
114
|
+
constructor({ outputRoot, relativeDirPath, dirName, mainFile, otherFiles, global, }: AiDirParams);
|
|
115
115
|
static fromDir(_params: AiDirFromDirParams): Promise<AiDir>;
|
|
116
|
-
|
|
116
|
+
getOutputRoot(): string;
|
|
117
117
|
getRelativeDirPath(): string;
|
|
118
118
|
getDirName(): string;
|
|
119
119
|
getDirPath(): string;
|
|
@@ -133,13 +133,13 @@ declare abstract class AiDir {
|
|
|
133
133
|
* Recursively collects all files from a directory, excluding the specified main file.
|
|
134
134
|
* This is a common utility for loading additional files alongside the main file.
|
|
135
135
|
*
|
|
136
|
-
* @param
|
|
136
|
+
* @param outputRoot - The base directory path
|
|
137
137
|
* @param relativeDirPath - The relative path to the directory containing the skill
|
|
138
138
|
* @param dirName - The name of the directory
|
|
139
139
|
* @param excludeFileName - The name of the file to exclude (typically the main file)
|
|
140
140
|
* @returns Array of files with their relative paths and buffers
|
|
141
141
|
*/
|
|
142
|
-
protected static collectOtherFiles(
|
|
142
|
+
protected static collectOtherFiles(outputRoot: string, relativeDirPath: string, dirName: string, excludeFileName: string): Promise<AiDirFile[]>;
|
|
143
143
|
abstract validate(): ValidationResult;
|
|
144
144
|
}
|
|
145
145
|
|
|
@@ -182,6 +182,7 @@ declare const RulesyncSkillFrontmatterSchemaInternal: z.ZodMiniObject<{
|
|
|
182
182
|
"allowed-tools": z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
183
183
|
model: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
184
184
|
"disable-model-invocation": z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
185
|
+
"scheduled-task": z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
185
186
|
}, z.core.$loose>>;
|
|
186
187
|
codexcli: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
187
188
|
"short-description": z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
@@ -212,6 +213,7 @@ type RulesyncSkillFrontmatterInput = {
|
|
|
212
213
|
"allowed-tools"?: string[];
|
|
213
214
|
model?: string;
|
|
214
215
|
"disable-model-invocation"?: boolean;
|
|
216
|
+
"scheduled-task"?: boolean;
|
|
215
217
|
};
|
|
216
218
|
codexcli?: {
|
|
217
219
|
"short-description"?: string;
|
|
@@ -236,7 +238,7 @@ type RulesyncSkillFrontmatterInput = {
|
|
|
236
238
|
};
|
|
237
239
|
type RulesyncSkillFrontmatter = z.infer<typeof RulesyncSkillFrontmatterSchemaInternal>;
|
|
238
240
|
type RulesyncSkillParams = {
|
|
239
|
-
|
|
241
|
+
outputRoot?: string;
|
|
240
242
|
relativeDirPath?: string;
|
|
241
243
|
dirName: string;
|
|
242
244
|
frontmatter: RulesyncSkillFrontmatterInput;
|
|
@@ -249,7 +251,7 @@ type RulesyncSkillSettablePaths = {
|
|
|
249
251
|
relativeDirPath: string;
|
|
250
252
|
};
|
|
251
253
|
type RulesyncSkillFromDirParams = {
|
|
252
|
-
|
|
254
|
+
outputRoot?: string;
|
|
253
255
|
relativeDirPath?: string;
|
|
254
256
|
dirName: string;
|
|
255
257
|
global?: boolean;
|
|
@@ -259,12 +261,12 @@ type RulesyncSkillFromDirParams = {
|
|
|
259
261
|
* Extends AiDir to inherit directory management and security features.
|
|
260
262
|
*/
|
|
261
263
|
declare class RulesyncSkill extends AiDir {
|
|
262
|
-
constructor({
|
|
264
|
+
constructor({ outputRoot, relativeDirPath, dirName, frontmatter, body, otherFiles, validate, global, }: RulesyncSkillParams);
|
|
263
265
|
static getSettablePaths(): RulesyncSkillSettablePaths;
|
|
264
266
|
getFrontmatter(): RulesyncSkillFrontmatter;
|
|
265
267
|
getBody(): string;
|
|
266
268
|
validate(): ValidationResult;
|
|
267
|
-
static fromDir({
|
|
269
|
+
static fromDir({ outputRoot, relativeDirPath, dirName, global, }: RulesyncSkillFromDirParams): Promise<RulesyncSkill>;
|
|
268
270
|
}
|
|
269
271
|
|
|
270
272
|
type GenerateResult = {
|
|
@@ -308,7 +310,21 @@ type BaseOptions = {
|
|
|
308
310
|
type GenerateOptions = BaseOptions & {
|
|
309
311
|
targets?: ToolTarget[];
|
|
310
312
|
features?: Feature[];
|
|
313
|
+
outputRoots?: string[];
|
|
314
|
+
/**
|
|
315
|
+
* @deprecated Use `outputRoots` instead. Accepted as a backward-compatible
|
|
316
|
+
* alias for the programmatic API; emits a one-shot deprecation warning when
|
|
317
|
+
* provided. When both `outputRoots` and `baseDirs` are supplied,
|
|
318
|
+
* `outputRoots` wins. Will be removed in a future major release.
|
|
319
|
+
*/
|
|
311
320
|
baseDirs?: string[];
|
|
321
|
+
/**
|
|
322
|
+
* Directory containing the `.rulesync/` source files. Defaults to the
|
|
323
|
+
* current working directory at config-construction time. When set, output
|
|
324
|
+
* is still written to each `outputRoots` entry; only the input source root
|
|
325
|
+
* is redirected. Mirrors the CLI's `--input-root` option.
|
|
326
|
+
*/
|
|
327
|
+
inputRoot?: string;
|
|
312
328
|
delete?: boolean;
|
|
313
329
|
simulateCommands?: boolean;
|
|
314
330
|
simulateSubagents?: boolean;
|
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
convertFromTool,
|
|
8
8
|
generate,
|
|
9
9
|
importFromTool
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-C7PHKGD2.js";
|
|
11
11
|
|
|
12
12
|
// src/index.ts
|
|
13
13
|
async function generate2(options = {}) {
|
|
@@ -18,10 +18,9 @@ async function generate2(options = {}) {
|
|
|
18
18
|
verbose,
|
|
19
19
|
silent
|
|
20
20
|
});
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
21
|
+
const inputRoot = config.getInputRoot();
|
|
22
|
+
if (!await checkRulesyncDirExists({ inputRoot })) {
|
|
23
|
+
throw new Error(`.rulesync directory not found in '${inputRoot}'. Run 'rulesync init' first.`);
|
|
25
24
|
}
|
|
26
25
|
return generate({ config, logger });
|
|
27
26
|
}
|