rulesync 16.13.0 → 16.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 +1 -1
- package/dist/cli/index.cjs +4 -4
- package/dist/cli/index.js +4 -4
- package/dist/cli/index.js.map +1 -1
- package/dist/{import-Dswkc7Ub.js → import-Ds0QeVp6.js} +300 -18
- package/dist/import-Ds0QeVp6.js.map +1 -0
- package/dist/{import-ChnrtxiJ.cjs → import-DsiSzsJH.cjs} +314 -32
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/import-Dswkc7Ub.js.map +0 -1
|
@@ -134,27 +134,27 @@ const isFeatureValueEnabled = (value) => {
|
|
|
134
134
|
};
|
|
135
135
|
//#endregion
|
|
136
136
|
//#region src/constants/rulesync-paths.ts
|
|
137
|
-
const { join: join$
|
|
137
|
+
const { join: join$290 } = node_path.posix;
|
|
138
138
|
const RULESYNC_CONFIG_RELATIVE_FILE_PATH = "rulesync.jsonc";
|
|
139
139
|
const RULESYNC_LOCAL_CONFIG_RELATIVE_FILE_PATH = "rulesync.local.jsonc";
|
|
140
140
|
const RULESYNC_RELATIVE_DIR_PATH = ".rulesync";
|
|
141
|
-
const RULESYNC_RULES_RELATIVE_DIR_PATH = join$
|
|
142
|
-
const RULESYNC_CURATED_RULES_RELATIVE_DIR_PATH = join$
|
|
143
|
-
const RULESYNC_COMMANDS_RELATIVE_DIR_PATH = join$
|
|
144
|
-
const RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH = join$
|
|
145
|
-
const RULESYNC_CHECKS_RELATIVE_DIR_PATH = join$
|
|
146
|
-
const RULESYNC_MCP_RELATIVE_FILE_PATH = join$
|
|
147
|
-
const RULESYNC_HOOKS_RELATIVE_FILE_PATH = join$
|
|
148
|
-
const RULESYNC_PERMISSIONS_RELATIVE_FILE_PATH = join$
|
|
149
|
-
join$
|
|
150
|
-
const RULESYNC_HOOKS_LEGACY_RELATIVE_FILE_PATH = join$
|
|
151
|
-
const RULESYNC_PERMISSIONS_LEGACY_RELATIVE_FILE_PATH = join$
|
|
141
|
+
const RULESYNC_RULES_RELATIVE_DIR_PATH = join$290(RULESYNC_RELATIVE_DIR_PATH, "rules");
|
|
142
|
+
const RULESYNC_CURATED_RULES_RELATIVE_DIR_PATH = join$290(RULESYNC_RULES_RELATIVE_DIR_PATH, ".curated");
|
|
143
|
+
const RULESYNC_COMMANDS_RELATIVE_DIR_PATH = join$290(RULESYNC_RELATIVE_DIR_PATH, "commands");
|
|
144
|
+
const RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH = join$290(RULESYNC_RELATIVE_DIR_PATH, "subagents");
|
|
145
|
+
const RULESYNC_CHECKS_RELATIVE_DIR_PATH = join$290(RULESYNC_RELATIVE_DIR_PATH, "checks");
|
|
146
|
+
const RULESYNC_MCP_RELATIVE_FILE_PATH = join$290(RULESYNC_RELATIVE_DIR_PATH, "mcp.jsonc");
|
|
147
|
+
const RULESYNC_HOOKS_RELATIVE_FILE_PATH = join$290(RULESYNC_RELATIVE_DIR_PATH, "hooks.jsonc");
|
|
148
|
+
const RULESYNC_PERMISSIONS_RELATIVE_FILE_PATH = join$290(RULESYNC_RELATIVE_DIR_PATH, "permissions.jsonc");
|
|
149
|
+
join$290(RULESYNC_RELATIVE_DIR_PATH, "mcp.json");
|
|
150
|
+
const RULESYNC_HOOKS_LEGACY_RELATIVE_FILE_PATH = join$290(RULESYNC_RELATIVE_DIR_PATH, "hooks.json");
|
|
151
|
+
const RULESYNC_PERMISSIONS_LEGACY_RELATIVE_FILE_PATH = join$290(RULESYNC_RELATIVE_DIR_PATH, "permissions.json");
|
|
152
152
|
const RULESYNC_AIIGNORE_FILE_NAME = ".aiignore";
|
|
153
|
-
const RULESYNC_AIIGNORE_RELATIVE_FILE_PATH = join$
|
|
153
|
+
const RULESYNC_AIIGNORE_RELATIVE_FILE_PATH = join$290(RULESYNC_RELATIVE_DIR_PATH, ".aiignore");
|
|
154
154
|
const RULESYNC_IGNORE_RELATIVE_FILE_PATH = ".rulesyncignore";
|
|
155
155
|
const RULESYNC_OVERVIEW_FILE_NAME = "overview.md";
|
|
156
|
-
const RULESYNC_SKILLS_RELATIVE_DIR_PATH = join$
|
|
157
|
-
const RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH = join$
|
|
156
|
+
const RULESYNC_SKILLS_RELATIVE_DIR_PATH = join$290(RULESYNC_RELATIVE_DIR_PATH, "skills");
|
|
157
|
+
const RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH = join$290(RULESYNC_SKILLS_RELATIVE_DIR_PATH, ".curated");
|
|
158
158
|
const RULESYNC_SOURCES_LOCK_RELATIVE_FILE_PATH = "rulesync.lock";
|
|
159
159
|
const RULESYNC_NPM_SOURCES_LOCK_RELATIVE_FILE_PATH = "rulesync-npm.lock.json";
|
|
160
160
|
const RULESYNC_MCP_FILE_NAME = "mcp.jsonc";
|
|
@@ -444,7 +444,8 @@ const permissionsProcessorToolTargetTuple = [
|
|
|
444
444
|
"takt",
|
|
445
445
|
"vibe",
|
|
446
446
|
"warp",
|
|
447
|
-
"zed"
|
|
447
|
+
"zed",
|
|
448
|
+
"zoocode"
|
|
448
449
|
];
|
|
449
450
|
const checksProcessorToolTargetTuple = [
|
|
450
451
|
"amp",
|
|
@@ -5370,6 +5371,7 @@ const RulesyncRuleFrontmatterSchema = zod_mini.z.object({
|
|
|
5370
5371
|
systemPrompt: zod_mini.z.optional(zod_mini.z.enum(["append"])),
|
|
5371
5372
|
contextFile: zod_mini.z.optional(zod_mini.z.enum(["override"]))
|
|
5372
5373
|
})),
|
|
5374
|
+
roo: zod_mini.z.optional(zod_mini.z.looseObject({ mode: zod_mini.z.optional(zod_mini.z.string()) })),
|
|
5373
5375
|
takt: zod_mini.z.optional(zod_mini.z.looseObject({
|
|
5374
5376
|
name: zod_mini.z.optional(zod_mini.z.string()),
|
|
5375
5377
|
extends: zod_mini.z.optional(zod_mini.z.string()),
|
|
@@ -7811,7 +7813,9 @@ const SHARED_CONFIG_OWNERSHIP = {
|
|
|
7811
7813
|
ownedKeys: [
|
|
7812
7814
|
"chat.tools.terminal.autoApprove",
|
|
7813
7815
|
"chat.tools.edits.autoApprove",
|
|
7814
|
-
"chat.tools.urls.autoApprove"
|
|
7816
|
+
"chat.tools.urls.autoApprove",
|
|
7817
|
+
"zoo-code.allowedCommands",
|
|
7818
|
+
"zoo-code.deniedCommands"
|
|
7815
7819
|
]
|
|
7816
7820
|
} }
|
|
7817
7821
|
},
|
|
@@ -12775,6 +12779,21 @@ const ROO_DIR = ".roo";
|
|
|
12775
12779
|
const ROO_COMMANDS_DIR_PATH = (0, node_path.join)(ROO_DIR, "commands");
|
|
12776
12780
|
const ROO_SKILLS_DIR_PATH = (0, node_path.join)(ROO_DIR, "skills");
|
|
12777
12781
|
const ROO_MCP_FILE_NAME = "mcp.json";
|
|
12782
|
+
/**
|
|
12783
|
+
* Mode slugs Roo/Zoo Code themselves accept for a `rules-{mode}` directory:
|
|
12784
|
+
* the loader builds the directory name by interpolating the active mode slug,
|
|
12785
|
+
* and custom-mode slugs are restricted to this alphabet. Validating against it
|
|
12786
|
+
* also keeps an authored value from escaping `.roo/` through path separators or
|
|
12787
|
+
* `..` segments.
|
|
12788
|
+
*/
|
|
12789
|
+
const ROO_MODE_SLUG_PATTERN = /^[a-zA-Z0-9-]+$/;
|
|
12790
|
+
/**
|
|
12791
|
+
* `.roo/rules-{mode}/` — the mode-specific rule directory Roo/Zoo Code load
|
|
12792
|
+
* INSTEAD of `.roo/rules/` while that mode is active. The relative path is the
|
|
12793
|
+
* same in global scope, where it resolves under `~/.roo/`.
|
|
12794
|
+
* @see https://github.com/Zoo-Code-Org/Zoo-Code/blob/main/src/core/prompts/sections/custom-instructions.ts
|
|
12795
|
+
*/
|
|
12796
|
+
const rooModeRulesDirName = (mode) => `rules-${mode}`;
|
|
12778
12797
|
const ROO_IGNORE_FILE_NAME = ".rooignore";
|
|
12779
12798
|
/**
|
|
12780
12799
|
* Roo Code reads project-level custom modes from a single aggregated
|
|
@@ -27800,6 +27819,27 @@ const defaultGetFactory$3 = (target) => {
|
|
|
27800
27819
|
if (!factory) throw new Error(`Unsupported tool target: ${target}`);
|
|
27801
27820
|
return factory;
|
|
27802
27821
|
};
|
|
27822
|
+
/**
|
|
27823
|
+
* Warn about per-server tool filters the target tool cannot express.
|
|
27824
|
+
*
|
|
27825
|
+
* `enabledTools`/`disabledTools` are canonical fields, so a single
|
|
27826
|
+
* `.rulesync/.mcp.json` can carry a filter that only some targets read. The
|
|
27827
|
+
* unsupported ones are stripped before generation (writing them would produce a
|
|
27828
|
+
* key the tool discards on load), which used to happen silently — the filter
|
|
27829
|
+
* simply did not apply and nothing said so. Warning names the servers whose
|
|
27830
|
+
* filter is being dropped for this target so the gap is visible at generate
|
|
27831
|
+
* time rather than in the tool's behavior.
|
|
27832
|
+
*
|
|
27833
|
+
* Only fields actually present are reported, so a config that never authored
|
|
27834
|
+
* the filter stays quiet.
|
|
27835
|
+
*/
|
|
27836
|
+
function warnStrippedMcpServerFields({ mcpServers, fields, toolTarget, logger }) {
|
|
27837
|
+
for (const field of fields) {
|
|
27838
|
+
const serverNames = Object.entries(mcpServers ?? {}).filter(([, serverConfig]) => serverConfig[field] !== void 0).map(([serverName]) => serverName);
|
|
27839
|
+
if (serverNames.length === 0) continue;
|
|
27840
|
+
logger.warn(`${toolTarget} does not read the per-server \`${field}\` MCP tool filter; dropping it from ${serverNames.join(", ")}.`);
|
|
27841
|
+
}
|
|
27842
|
+
}
|
|
27803
27843
|
var McpProcessor = class extends FeatureProcessor {
|
|
27804
27844
|
toolTarget;
|
|
27805
27845
|
global;
|
|
@@ -27879,6 +27919,12 @@ var McpProcessor = class extends FeatureProcessor {
|
|
|
27879
27919
|
const fieldsToStrip = [];
|
|
27880
27920
|
if (!factory.meta.supportsEnabledTools) fieldsToStrip.push("enabledTools");
|
|
27881
27921
|
if (!factory.meta.supportsDisabledTools) fieldsToStrip.push("disabledTools");
|
|
27922
|
+
warnStrippedMcpServerFields({
|
|
27923
|
+
mcpServers: targetedRulesyncMcp.getJson().mcpServers,
|
|
27924
|
+
fields: fieldsToStrip,
|
|
27925
|
+
toolTarget: this.toolTarget,
|
|
27926
|
+
logger: this.logger
|
|
27927
|
+
});
|
|
27882
27928
|
const filteredRulesyncMcp = targetedRulesyncMcp.stripMcpServerFields(fieldsToStrip);
|
|
27883
27929
|
return await factory.class.fromRulesyncMcp({
|
|
27884
27930
|
outputRoot: this.outputRoot,
|
|
@@ -33532,7 +33578,7 @@ function extractKiroOverride(toolsSettings) {
|
|
|
33532
33578
|
if (Object.keys(overrideToolsSettings).length === 0) return void 0;
|
|
33533
33579
|
return { toolsSettings: overrideToolsSettings };
|
|
33534
33580
|
}
|
|
33535
|
-
function asStringArray(value) {
|
|
33581
|
+
function asStringArray$1(value) {
|
|
33536
33582
|
return Array.isArray(value) ? value.filter((item) => typeof item === "string") : [];
|
|
33537
33583
|
}
|
|
33538
33584
|
/**
|
|
@@ -33542,8 +33588,8 @@ function asStringArray(value) {
|
|
|
33542
33588
|
*/
|
|
33543
33589
|
function rulesFromArrays(settings, allowKey, denyKey) {
|
|
33544
33590
|
const rules = {};
|
|
33545
|
-
for (const pattern of asStringArray(settings[allowKey])) rules[pattern] = "allow";
|
|
33546
|
-
for (const pattern of asStringArray(settings[denyKey])) rules[pattern] = "deny";
|
|
33591
|
+
for (const pattern of asStringArray$1(settings[allowKey])) rules[pattern] = "allow";
|
|
33592
|
+
for (const pattern of asStringArray$1(settings[denyKey])) rules[pattern] = "deny";
|
|
33547
33593
|
return rules;
|
|
33548
33594
|
}
|
|
33549
33595
|
//#endregion
|
|
@@ -36455,6 +36501,181 @@ var ZedPermissions = class ZedPermissions extends ToolPermissions {
|
|
|
36455
36501
|
}
|
|
36456
36502
|
};
|
|
36457
36503
|
//#endregion
|
|
36504
|
+
//#region src/constants/zoocode-paths.ts
|
|
36505
|
+
/**
|
|
36506
|
+
* Zoo Code is a VS Code extension, so its committable command allow/deny lists
|
|
36507
|
+
* are workspace settings rather than files in the `.roo/` agent-asset tree that
|
|
36508
|
+
* the other Zoo Code features write.
|
|
36509
|
+
*
|
|
36510
|
+
* `zoo-code.allowedCommands` / `zoo-code.deniedCommands` are contributed with no
|
|
36511
|
+
* `scope`, which in VS Code means `window` scope — settable in a workspace's
|
|
36512
|
+
* `.vscode/settings.json` — and `ClineProvider.mergeCommandLists()` unions the
|
|
36513
|
+
* workspace values into the effective auto-approval lists.
|
|
36514
|
+
*
|
|
36515
|
+
* The `zoo-code.*` namespace is Zoo-era (the v3.74.0 rebrand); the archived Roo
|
|
36516
|
+
* Code lineage spelled the same settings `roo-cline.*`, so this surface is
|
|
36517
|
+
* deliberately not shared with the `roo` target.
|
|
36518
|
+
*
|
|
36519
|
+
* @see https://github.com/Zoo-Code-Org/Zoo-Code/blob/main/src/package.json
|
|
36520
|
+
* @see https://github.com/Zoo-Code-Org/Zoo-Code/blob/main/src/core/webview/ClineProvider.ts
|
|
36521
|
+
*/
|
|
36522
|
+
const ZOOCODE_VSCODE_SETTINGS_DIR = ".vscode";
|
|
36523
|
+
const ZOOCODE_VSCODE_SETTINGS_FILE_NAME = "settings.json";
|
|
36524
|
+
const ZOOCODE_ALLOWED_COMMANDS_KEY = "zoo-code.allowedCommands";
|
|
36525
|
+
const ZOOCODE_DENIED_COMMANDS_KEY = "zoo-code.deniedCommands";
|
|
36526
|
+
//#endregion
|
|
36527
|
+
//#region src/features/permissions/zoocode-permissions.ts
|
|
36528
|
+
/**
|
|
36529
|
+
* The canonical category Zoo Code's command lists correspond to. Zoo Code gates
|
|
36530
|
+
* terminal command execution and nothing else through these settings, so only
|
|
36531
|
+
* `bash` maps; `read`/`write`/`edit`/`webfetch` have no workspace-settable
|
|
36532
|
+
* counterpart in the extension's contributions.
|
|
36533
|
+
*/
|
|
36534
|
+
const COMMAND_CATEGORY = "bash";
|
|
36535
|
+
function asStringArray(value) {
|
|
36536
|
+
if (!Array.isArray(value)) return [];
|
|
36537
|
+
return value.filter((entry) => typeof entry === "string");
|
|
36538
|
+
}
|
|
36539
|
+
/**
|
|
36540
|
+
* Split one canonical category's rules into Zoo Code's two command lists.
|
|
36541
|
+
*
|
|
36542
|
+
* Zoo Code matches these entries as command **prefixes**: a command runs
|
|
36543
|
+
* without a confirmation prompt when it starts with an `allowedCommands` entry,
|
|
36544
|
+
* and is refused outright when it starts with a `deniedCommands` entry (deny
|
|
36545
|
+
* wins). `ask` is represented by listing the pattern in neither list, which
|
|
36546
|
+
* leaves Zoo Code's default approval prompt in charge.
|
|
36547
|
+
*
|
|
36548
|
+
* Each list is `undefined` when it would be empty, so the key is retracted from
|
|
36549
|
+
* the settings file rather than written as an empty array — an empty
|
|
36550
|
+
* `allowedCommands` and an absent one mean the same thing to Zoo Code, and the
|
|
36551
|
+
* absent form leaves no rulesync residue behind.
|
|
36552
|
+
*/
|
|
36553
|
+
function buildCommandLists(rules) {
|
|
36554
|
+
const allowed = [];
|
|
36555
|
+
const denied = [];
|
|
36556
|
+
for (const [pattern, action] of Object.entries(rules)) if (action === "allow") allowed.push(pattern);
|
|
36557
|
+
else if (action === "deny") denied.push(pattern);
|
|
36558
|
+
return {
|
|
36559
|
+
allowed: allowed.length > 0 ? allowed : void 0,
|
|
36560
|
+
denied: denied.length > 0 ? denied : void 0
|
|
36561
|
+
};
|
|
36562
|
+
}
|
|
36563
|
+
/**
|
|
36564
|
+
* Permissions generator for Zoo Code.
|
|
36565
|
+
*
|
|
36566
|
+
* Zoo Code has no policy file in its `.roo/` tree: the committable command
|
|
36567
|
+
* allow/deny lists are VS Code workspace settings
|
|
36568
|
+
* (`zoo-code.allowedCommands` / `zoo-code.deniedCommands` in
|
|
36569
|
+
* `.vscode/settings.json`), which `ClineProvider.mergeCommandLists()` unions
|
|
36570
|
+
* into the lists the auto-approval decision reads. That file is a
|
|
36571
|
+
* general-purpose workspace settings file with many unrelated keys, so reads
|
|
36572
|
+
* and writes merge into the existing JSONC (touching only the two managed keys)
|
|
36573
|
+
* and the file is never deleted.
|
|
36574
|
+
*
|
|
36575
|
+
* Only project scope is modeled: VS Code's user-scope `settings.json` lives at
|
|
36576
|
+
* a platform-dependent path outside rulesync's home-relative global model.
|
|
36577
|
+
*
|
|
36578
|
+
* The `roo` target deliberately does not get this adapter. The settings
|
|
36579
|
+
* namespace is Zoo-era (`roo-cline.*` before the v3.74.0 rebrand), and Roo Code
|
|
36580
|
+
* is EOL with its repository archived, so emitting `zoo-code.*` keys for a
|
|
36581
|
+
* `--targets roo` generate would write settings that Roo itself never reads.
|
|
36582
|
+
*
|
|
36583
|
+
* @see https://github.com/Zoo-Code-Org/Zoo-Code/blob/main/src/package.json
|
|
36584
|
+
* @see https://github.com/Zoo-Code-Org/Zoo-Code/blob/main/src/core/auto-approval/commands.ts
|
|
36585
|
+
*/
|
|
36586
|
+
var ZoocodePermissions = class ZoocodePermissions extends ToolPermissions {
|
|
36587
|
+
constructor(params) {
|
|
36588
|
+
super({
|
|
36589
|
+
...params,
|
|
36590
|
+
fileContent: params.fileContent ?? "{}"
|
|
36591
|
+
});
|
|
36592
|
+
}
|
|
36593
|
+
/**
|
|
36594
|
+
* `.vscode/settings.json` is a user-managed workspace file with unrelated
|
|
36595
|
+
* settings, so it must not be deleted.
|
|
36596
|
+
*/
|
|
36597
|
+
isDeletable() {
|
|
36598
|
+
return false;
|
|
36599
|
+
}
|
|
36600
|
+
static getSettablePaths(_options = {}) {
|
|
36601
|
+
return {
|
|
36602
|
+
relativeDirPath: ZOOCODE_VSCODE_SETTINGS_DIR,
|
|
36603
|
+
relativeFilePath: ZOOCODE_VSCODE_SETTINGS_FILE_NAME
|
|
36604
|
+
};
|
|
36605
|
+
}
|
|
36606
|
+
static async fromFile({ outputRoot = process.cwd(), validate = true }) {
|
|
36607
|
+
const paths = ZoocodePermissions.getSettablePaths();
|
|
36608
|
+
const fileContent = await readFileContentOrNull((0, node_path.join)(outputRoot, paths.relativeDirPath, paths.relativeFilePath)) ?? "{}";
|
|
36609
|
+
return new ZoocodePermissions({
|
|
36610
|
+
outputRoot,
|
|
36611
|
+
relativeDirPath: paths.relativeDirPath,
|
|
36612
|
+
relativeFilePath: paths.relativeFilePath,
|
|
36613
|
+
fileContent,
|
|
36614
|
+
validate
|
|
36615
|
+
});
|
|
36616
|
+
}
|
|
36617
|
+
static async fromRulesyncPermissions({ outputRoot = process.cwd(), rulesyncPermissions }) {
|
|
36618
|
+
const paths = ZoocodePermissions.getSettablePaths();
|
|
36619
|
+
const filePath = (0, node_path.join)(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
|
|
36620
|
+
const existingContent = await readFileContentOrNull(filePath) ?? "{}";
|
|
36621
|
+
const rules = rulesyncPermissions.getJson().permission[COMMAND_CATEGORY];
|
|
36622
|
+
const patch = {};
|
|
36623
|
+
if (rules !== void 0) {
|
|
36624
|
+
const { allowed, denied } = buildCommandLists(rules);
|
|
36625
|
+
patch[ZOOCODE_ALLOWED_COMMANDS_KEY] = allowed;
|
|
36626
|
+
patch[ZOOCODE_DENIED_COMMANDS_KEY] = denied;
|
|
36627
|
+
}
|
|
36628
|
+
return new ZoocodePermissions({
|
|
36629
|
+
outputRoot,
|
|
36630
|
+
relativeDirPath: paths.relativeDirPath,
|
|
36631
|
+
relativeFilePath: paths.relativeFilePath,
|
|
36632
|
+
fileContent: applySharedConfigPatch({
|
|
36633
|
+
fileKey: sharedConfigFileKey(paths),
|
|
36634
|
+
feature: "permissions",
|
|
36635
|
+
existingContent,
|
|
36636
|
+
patch,
|
|
36637
|
+
filePath
|
|
36638
|
+
}),
|
|
36639
|
+
validate: true
|
|
36640
|
+
});
|
|
36641
|
+
}
|
|
36642
|
+
toRulesyncPermissions() {
|
|
36643
|
+
let settings;
|
|
36644
|
+
try {
|
|
36645
|
+
settings = parseSharedConfig({
|
|
36646
|
+
format: "jsonc",
|
|
36647
|
+
fileContent: this.getFileContent() || "{}",
|
|
36648
|
+
filePath: (0, node_path.join)(this.getRelativeDirPath(), this.getRelativeFilePath()),
|
|
36649
|
+
invalidRootPolicy: "error",
|
|
36650
|
+
jsoncParseErrors: "error"
|
|
36651
|
+
});
|
|
36652
|
+
} catch (error) {
|
|
36653
|
+
throw new Error(`Failed to parse Zoo Code VS Code settings in ${(0, node_path.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`, { cause: error });
|
|
36654
|
+
}
|
|
36655
|
+
const rules = {};
|
|
36656
|
+
for (const pattern of asStringArray(settings[ZOOCODE_ALLOWED_COMMANDS_KEY])) rules[pattern] = "allow";
|
|
36657
|
+
for (const pattern of asStringArray(settings[ZOOCODE_DENIED_COMMANDS_KEY])) rules[pattern] = "deny";
|
|
36658
|
+
const permission = {};
|
|
36659
|
+
if (Object.keys(rules).length > 0) permission[COMMAND_CATEGORY] = rules;
|
|
36660
|
+
return this.toRulesyncPermissionsDefault({ fileContent: JSON.stringify({ permission }, null, 2) });
|
|
36661
|
+
}
|
|
36662
|
+
validate() {
|
|
36663
|
+
return {
|
|
36664
|
+
success: true,
|
|
36665
|
+
error: null
|
|
36666
|
+
};
|
|
36667
|
+
}
|
|
36668
|
+
static forDeletion({ outputRoot = process.cwd(), relativeDirPath, relativeFilePath }) {
|
|
36669
|
+
return new ZoocodePermissions({
|
|
36670
|
+
outputRoot,
|
|
36671
|
+
relativeDirPath,
|
|
36672
|
+
relativeFilePath,
|
|
36673
|
+
fileContent: "{}",
|
|
36674
|
+
validate: false
|
|
36675
|
+
});
|
|
36676
|
+
}
|
|
36677
|
+
};
|
|
36678
|
+
//#endregion
|
|
36458
36679
|
//#region src/features/permissions/permissions-processor.ts
|
|
36459
36680
|
const PermissionsProcessorToolTargetSchema = zod_mini.z.enum(permissionsProcessorToolTargetTuple);
|
|
36460
36681
|
const toolPermissionsFactories = /* @__PURE__ */ new Map([
|
|
@@ -36697,6 +36918,14 @@ const toolPermissionsFactories = /* @__PURE__ */ new Map([
|
|
|
36697
36918
|
supportsGlobal: true,
|
|
36698
36919
|
supportsImport: true
|
|
36699
36920
|
}
|
|
36921
|
+
}],
|
|
36922
|
+
["zoocode", {
|
|
36923
|
+
class: ZoocodePermissions,
|
|
36924
|
+
meta: {
|
|
36925
|
+
supportsProject: true,
|
|
36926
|
+
supportsGlobal: false,
|
|
36927
|
+
supportsImport: true
|
|
36928
|
+
}
|
|
36700
36929
|
}]
|
|
36701
36930
|
]);
|
|
36702
36931
|
var PermissionsProcessor = class extends FeatureProcessor {
|
|
@@ -52076,11 +52305,12 @@ var RooRule = class RooRule extends ToolRule {
|
|
|
52076
52305
|
static getSettablePaths(_options = {}) {
|
|
52077
52306
|
return { nonRoot: { relativeDirPath: buildToolPath(ROO_DIR, "rules", _options.excludeToolDir) } };
|
|
52078
52307
|
}
|
|
52079
|
-
static async fromFile({ outputRoot = process.cwd(), relativeFilePath, validate = true }) {
|
|
52080
|
-
const
|
|
52308
|
+
static async fromFile({ outputRoot = process.cwd(), relativeFilePath, relativeDirPath: overrideDirPath, validate = true }) {
|
|
52309
|
+
const relativeDirPath = overrideDirPath !== void 0 && RooRule.extractModeFromDirPath(overrideDirPath) !== void 0 ? overrideDirPath : this.getSettablePaths().nonRoot.relativeDirPath;
|
|
52310
|
+
const fileContent = await readFileContent((0, node_path.join)(outputRoot, relativeDirPath, relativeFilePath));
|
|
52081
52311
|
return new RooRule({
|
|
52082
52312
|
outputRoot,
|
|
52083
|
-
relativeDirPath
|
|
52313
|
+
relativeDirPath,
|
|
52084
52314
|
relativeFilePath,
|
|
52085
52315
|
fileContent,
|
|
52086
52316
|
validate,
|
|
@@ -52088,12 +52318,16 @@ var RooRule = class RooRule extends ToolRule {
|
|
|
52088
52318
|
});
|
|
52089
52319
|
}
|
|
52090
52320
|
static fromRulesyncRule({ outputRoot = process.cwd(), rulesyncRule, validate = true }) {
|
|
52091
|
-
|
|
52321
|
+
const params = this.buildToolRuleParamsDefault({
|
|
52092
52322
|
outputRoot,
|
|
52093
52323
|
rulesyncRule,
|
|
52094
52324
|
validate,
|
|
52095
52325
|
nonRootPath: this.getSettablePaths().nonRoot
|
|
52096
|
-
})
|
|
52326
|
+
});
|
|
52327
|
+
const mode = rulesyncRule.getFrontmatter().roo?.mode;
|
|
52328
|
+
if (!params.root && mode !== void 0 && mode !== "") if (!ROO_MODE_SLUG_PATTERN.test(mode)) warnWithFallback(void 0, `Ignoring roo.mode "${mode}" on ${rulesyncRule.getRelativeFilePath()}: a mode slug may contain only letters, digits and hyphens. Writing the rule to ${params.relativeDirPath} instead.`);
|
|
52329
|
+
else params.relativeDirPath = (0, node_path.join)((0, node_path.dirname)(params.relativeDirPath), rooModeRulesDirName(mode));
|
|
52330
|
+
return new RooRule(params);
|
|
52097
52331
|
}
|
|
52098
52332
|
/**
|
|
52099
52333
|
* Extract mode slug from file path for mode-specific rules
|
|
@@ -52105,8 +52339,51 @@ var RooRule = class RooRule extends ToolRule {
|
|
|
52105
52339
|
const singleFileMatch = filePath.match(/\.(roo|cline)rules-([a-zA-Z0-9-]+)$/);
|
|
52106
52340
|
if (singleFileMatch) return singleFileMatch[2];
|
|
52107
52341
|
}
|
|
52342
|
+
/**
|
|
52343
|
+
* The mode slug of a `.roo/rules-{mode}/` directory, or `undefined` for the
|
|
52344
|
+
* generic `.roo/rules/` directory and anything else. Path-shaped input is
|
|
52345
|
+
* rejected by the slug pattern, so a crafted directory name cannot be lifted
|
|
52346
|
+
* back into frontmatter.
|
|
52347
|
+
*/
|
|
52348
|
+
static extractModeFromDirPath(relativeDirPath) {
|
|
52349
|
+
for (const segment of toPosixPath(relativeDirPath).split("/")) {
|
|
52350
|
+
if (!segment.startsWith("rules-")) continue;
|
|
52351
|
+
const mode = segment.slice(6);
|
|
52352
|
+
if (ROO_MODE_SLUG_PATTERN.test(mode)) return mode;
|
|
52353
|
+
}
|
|
52354
|
+
}
|
|
52108
52355
|
toRulesyncRule() {
|
|
52109
|
-
|
|
52356
|
+
const mode = RooRule.extractModeFromDirPath(this.getRelativeDirPath());
|
|
52357
|
+
if (mode === void 0) return this.toRulesyncRuleDefault();
|
|
52358
|
+
const baseName = this.getRelativeFilePath().replace(/\.md$/, "");
|
|
52359
|
+
const suffix = `-${mode}`;
|
|
52360
|
+
const importedName = baseName.endsWith(suffix) ? baseName : `${baseName}${suffix}`;
|
|
52361
|
+
return new RulesyncRule({
|
|
52362
|
+
outputRoot: this.getOutputRoot(),
|
|
52363
|
+
relativeDirPath: RulesyncRule.getSettablePaths().recommended.relativeDirPath,
|
|
52364
|
+
relativeFilePath: `${importedName}.md`,
|
|
52365
|
+
frontmatter: {
|
|
52366
|
+
root: false,
|
|
52367
|
+
targets: [this.constructor.getToolTargetName()],
|
|
52368
|
+
description: this.description,
|
|
52369
|
+
globs: this.globs ?? [],
|
|
52370
|
+
roo: { mode }
|
|
52371
|
+
},
|
|
52372
|
+
body: this.getFileContent(),
|
|
52373
|
+
validate: true
|
|
52374
|
+
});
|
|
52375
|
+
}
|
|
52376
|
+
/**
|
|
52377
|
+
* Mode-specific rule directories (`.roo/rules-{mode}/`), which Roo/Zoo Code
|
|
52378
|
+
* load instead of `.roo/rules/` while that mode is active. Import-only: the
|
|
52379
|
+
* generic directory is the only one the deletion sweep enumerates, because a
|
|
52380
|
+
* `rules-*` glob would also match mode rules a user wrote by hand.
|
|
52381
|
+
*/
|
|
52382
|
+
static getNestedFilePatterns({ outputRoot }) {
|
|
52383
|
+
return {
|
|
52384
|
+
include: [`${toPosixPath(outputRoot)}/${toPosixPath(ROO_DIR)}/rules-*/**/*.md`],
|
|
52385
|
+
ignore: []
|
|
52386
|
+
};
|
|
52110
52387
|
}
|
|
52111
52388
|
validate() {
|
|
52112
52389
|
return {
|
|
@@ -52127,10 +52404,18 @@ var RooRule = class RooRule extends ToolRule {
|
|
|
52127
52404
|
static isTargetedByRulesyncRule(rulesyncRule) {
|
|
52128
52405
|
return this.isTargetedByRulesyncRuleDefault({
|
|
52129
52406
|
rulesyncRule,
|
|
52130
|
-
toolTarget:
|
|
52407
|
+
toolTarget: this.getToolTargetName()
|
|
52131
52408
|
});
|
|
52132
52409
|
}
|
|
52133
52410
|
/**
|
|
52411
|
+
* The tool target this class imports as. `ZoocodeRule` narrows the same
|
|
52412
|
+
* `.roo/` adapters to the `zoocode` target, so the name has to come from the
|
|
52413
|
+
* class rather than a literal.
|
|
52414
|
+
*/
|
|
52415
|
+
static getToolTargetName() {
|
|
52416
|
+
return "roo";
|
|
52417
|
+
}
|
|
52418
|
+
/**
|
|
52134
52419
|
* Glob for the `separate-local-file` deletion; Roo reads `AGENTS.local.md`
|
|
52135
52420
|
* at the project root, not under `.roo/` (mirrors rovodev).
|
|
52136
52421
|
*/
|
|
@@ -52663,11 +52948,8 @@ var ZedRule = class ZedRule extends ToolRule {
|
|
|
52663
52948
|
* @see https://docs.zoocode.dev
|
|
52664
52949
|
*/
|
|
52665
52950
|
var ZoocodeRule = class extends RooRule {
|
|
52666
|
-
static
|
|
52667
|
-
return
|
|
52668
|
-
rulesyncRule,
|
|
52669
|
-
toolTarget: "zoocode"
|
|
52670
|
-
});
|
|
52951
|
+
static getToolTargetName() {
|
|
52952
|
+
return "zoocode";
|
|
52671
52953
|
}
|
|
52672
52954
|
};
|
|
52673
52955
|
//#endregion
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_import = require("./import-
|
|
2
|
+
const require_import = require("./import-DsiSzsJH.cjs");
|
|
3
3
|
//#region src/index.ts
|
|
4
4
|
async function generate(options = {}) {
|
|
5
5
|
const { silent = true, verbose = false, ...rest } = options;
|
package/dist/index.d.cts
CHANGED
|
@@ -14,7 +14,7 @@ declare const FeatureSchema: z.ZodMiniUnion<readonly [z.ZodMiniEnum<{
|
|
|
14
14
|
type Feature = z.infer<typeof FeatureSchema>;
|
|
15
15
|
//#endregion
|
|
16
16
|
//#region src/types/tool-target-tuples.d.ts
|
|
17
|
-
declare const ALL_TOOL_TARGET_TUPLES: readonly [readonly ["agentsmd", "aiassistant", "amp", "antigravity-cli", "antigravity-ide", "antigravity-plugin", "augmentcode", "augmentcode-legacy", "claudecode", "claudecode-legacy", "cline", "codexcli", "copilot", "copilotcli", "cursor", "deepagents", "factorydroid", "goose", "grokcli", "hermesagent", "junie", "kilo", "kimi-code", "kiro", "kiro-cli", "kiro-ide", "musecode", "opencode", "pi", "qwencode", "reasonix", "replit", "roo", "rovodev", "takt", "vibe", "warp", "devin", "zed", "zoocode"], readonly ["aiassistant", "antigravity-cli", "augmentcode", "claudecode", "claudecode-legacy", "cline", "cursor", "hermesagent", "junie", "kilo", "kiro", "kiro-cli", "kiro-ide", "qwencode", "reasonix", "roo", "devin", "vibe", "warp", "zed", "zoocode"], readonly ["aiassistant", "amp", "antigravity-cli", "antigravity-ide", "antigravity-plugin", "augmentcode", "claudecode", "claudecode-plugin", "claudecode-legacy", "cline", "codexcli", "copilot", "copilotcli", "cursor", "deepagents", "factorydroid", "goose", "grokcli", "hermesagent", "kimi-code", "kilo", "kiro", "kiro-cli", "kiro-ide", "junie", "musecode", "opencode", "qwencode", "reasonix", "roo", "rovodev", "takt", "vibe", "warp", "devin", "zed", "zoocode"], readonly ["agentsmd", "antigravity-cli", "antigravity-ide", "augmentcode", "claudecode", "claudecode-plugin", "claudecode-legacy", "cline", "codexcli", "copilot", "cursor", "factorydroid", "goose", "grokcli", "hermesagent", "junie", "kilo", "kiro", "kiro-cli", "kiro-ide", "opencode", "pi", "qwencode", "reasonix", "roo", "zoocode", "rovodev", "takt", "devin", "warp"], readonly ["kilo", "agentsmd", "antigravity-cli", "antigravity-ide", "antigravity-plugin", "augmentcode", "claudecode", "claudecode-plugin", "claudecode-legacy", "cline", "codexcli", "copilot", "copilotcli", "cursor", "deepagents", "devin", "factorydroid", "goose", "grokcli", "hermesagent", "kimi-code", "junie", "kiro", "kiro-cli", "kiro-ide", "opencode", "qwencode", "reasonix", "roo", "zoocode", "rovodev", "takt", "vibe"], readonly ["agentsmd", "agentsskills", "aiassistant", "amp", "antigravity-cli", "antigravity-ide", "antigravity-plugin", "augmentcode", "claudecode", "claudecode-plugin", "claudecode-legacy", "cline", "codexcli", "copilot", "copilotcli", "cursor", "deepagents", "factorydroid", "goose", "grokcli", "hermesagent", "kimi-code", "junie", "kilo", "kiro", "kiro-cli", "kiro-ide", "musecode", "opencode", "pi", "qwencode", "reasonix", "replit", "roo", "rovodev", "takt", "vibe", "warp", "devin", "zed", "zoocode"], readonly ["amp", "cline", "antigravity-cli", "antigravity-ide", "antigravity-plugin", "kilo", "cursor", "claudecode", "claudecode-plugin", "codexcli", "copilot", "copilotcli", "opencode", "pi", "factorydroid", "goose", "hermesagent", "kimi-code", "deepagents", "kiro", "kiro-cli", "kiro-ide", "devin", "augmentcode", "junie", "vibe", "qwencode", "reasonix", "grokcli"], readonly ["amp", "antigravity-cli", "antigravity-ide", "augmentcode", "claudecode", "cline", "codexcli", "copilot", "copilotcli", "cursor", "devin", "factorydroid", "goose", "grokcli", "hermesagent", "kimi-code", "junie", "kilo", "kiro", "kiro-cli", "kiro-ide", "opencode", "pi", "qwencode", "reasonix", "rovodev", "takt", "vibe", "warp", "zed"], readonly ["amp", "augmentcode", "cursor", "hermesagent", "rovodev", "takt"]];
|
|
17
|
+
declare const ALL_TOOL_TARGET_TUPLES: readonly [readonly ["agentsmd", "aiassistant", "amp", "antigravity-cli", "antigravity-ide", "antigravity-plugin", "augmentcode", "augmentcode-legacy", "claudecode", "claudecode-legacy", "cline", "codexcli", "copilot", "copilotcli", "cursor", "deepagents", "factorydroid", "goose", "grokcli", "hermesagent", "junie", "kilo", "kimi-code", "kiro", "kiro-cli", "kiro-ide", "musecode", "opencode", "pi", "qwencode", "reasonix", "replit", "roo", "rovodev", "takt", "vibe", "warp", "devin", "zed", "zoocode"], readonly ["aiassistant", "antigravity-cli", "augmentcode", "claudecode", "claudecode-legacy", "cline", "cursor", "hermesagent", "junie", "kilo", "kiro", "kiro-cli", "kiro-ide", "qwencode", "reasonix", "roo", "devin", "vibe", "warp", "zed", "zoocode"], readonly ["aiassistant", "amp", "antigravity-cli", "antigravity-ide", "antigravity-plugin", "augmentcode", "claudecode", "claudecode-plugin", "claudecode-legacy", "cline", "codexcli", "copilot", "copilotcli", "cursor", "deepagents", "factorydroid", "goose", "grokcli", "hermesagent", "kimi-code", "kilo", "kiro", "kiro-cli", "kiro-ide", "junie", "musecode", "opencode", "qwencode", "reasonix", "roo", "rovodev", "takt", "vibe", "warp", "devin", "zed", "zoocode"], readonly ["agentsmd", "antigravity-cli", "antigravity-ide", "augmentcode", "claudecode", "claudecode-plugin", "claudecode-legacy", "cline", "codexcli", "copilot", "cursor", "factorydroid", "goose", "grokcli", "hermesagent", "junie", "kilo", "kiro", "kiro-cli", "kiro-ide", "opencode", "pi", "qwencode", "reasonix", "roo", "zoocode", "rovodev", "takt", "devin", "warp"], readonly ["kilo", "agentsmd", "antigravity-cli", "antigravity-ide", "antigravity-plugin", "augmentcode", "claudecode", "claudecode-plugin", "claudecode-legacy", "cline", "codexcli", "copilot", "copilotcli", "cursor", "deepagents", "devin", "factorydroid", "goose", "grokcli", "hermesagent", "kimi-code", "junie", "kiro", "kiro-cli", "kiro-ide", "opencode", "qwencode", "reasonix", "roo", "zoocode", "rovodev", "takt", "vibe"], readonly ["agentsmd", "agentsskills", "aiassistant", "amp", "antigravity-cli", "antigravity-ide", "antigravity-plugin", "augmentcode", "claudecode", "claudecode-plugin", "claudecode-legacy", "cline", "codexcli", "copilot", "copilotcli", "cursor", "deepagents", "factorydroid", "goose", "grokcli", "hermesagent", "kimi-code", "junie", "kilo", "kiro", "kiro-cli", "kiro-ide", "musecode", "opencode", "pi", "qwencode", "reasonix", "replit", "roo", "rovodev", "takt", "vibe", "warp", "devin", "zed", "zoocode"], readonly ["amp", "cline", "antigravity-cli", "antigravity-ide", "antigravity-plugin", "kilo", "cursor", "claudecode", "claudecode-plugin", "codexcli", "copilot", "copilotcli", "opencode", "pi", "factorydroid", "goose", "hermesagent", "kimi-code", "deepagents", "kiro", "kiro-cli", "kiro-ide", "devin", "augmentcode", "junie", "vibe", "qwencode", "reasonix", "grokcli"], readonly ["amp", "antigravity-cli", "antigravity-ide", "augmentcode", "claudecode", "cline", "codexcli", "copilot", "copilotcli", "cursor", "devin", "factorydroid", "goose", "grokcli", "hermesagent", "kimi-code", "junie", "kilo", "kiro", "kiro-cli", "kiro-ide", "opencode", "pi", "qwencode", "reasonix", "rovodev", "takt", "vibe", "warp", "zed", "zoocode"], readonly ["amp", "augmentcode", "cursor", "hermesagent", "rovodev", "takt"]];
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region src/types/tool-targets.d.ts
|
|
20
20
|
type AllToolTarget = (typeof ALL_TOOL_TARGET_TUPLES)[number][number];
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/types/features.ts","../src/types/tool-target-tuples.ts","../src/types/tool-targets.ts","../src/lib/convert.ts","../src/types/ai-dir.ts","../src/features/skills/rulesync-skill.ts","../src/lib/generate.ts","../src/lib/import.ts","../src/index.ts"],"mappings":";;cAaa;cA+BP,eAAa,EAAA,uBAAA,EAAA;;;;;;;;;IAAoE,EAAA;KAE3E,UAAU,EAAE,aAAa;;;
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/types/features.ts","../src/types/tool-target-tuples.ts","../src/types/tool-targets.ts","../src/lib/convert.ts","../src/types/ai-dir.ts","../src/features/skills/rulesync-skill.ts","../src/lib/generate.ts","../src/lib/import.ts","../src/index.ts"],"mappings":";;cAaa;cA+BP,eAAa,EAAA,uBAAA,EAAA;;;;;;;;;IAAoE,EAAA;KAE3E,UAAU,EAAE,aAAa;;;cCiQxB;;;KCrSR,wBAAwB;cAEhB,4BAA4B,kBAAkB;cAM9C,kBAAgB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAEjB,aAAa,EAAE,aAAa;;;KCJ5B;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;;KCrBU;EAEN;EACA;;EAGA;EACA,OAAO;;KAGD;EACV;EACA,YAAY;;;;;;;;EAQZ;;KAGU;EACV;EACA;EACA;EACA;IACE;IACA;IACA,cAAc;;EAEhB,aAAa;EACb;;KAGU,qBAAqB,KAC/B;uBAIoB;;;;qBAID;;;;qBAKA;;;;qBAKA;;;;YAKT;IACR;IACA;IACA,cAAc;;;;;YAMN,YAAY;;;;qBAKH;EAEnB,cACE,YACA,iBACA,SACA,UACA,YACA,UACC;SAcU,QAAQ,SAAS,qBAAqB,QAAQ;EAI3D;EAIA;EAIA;EAIA;EAqBA;IAEM;IACA;IACA,cAAc;;EAMpB,iBAAiB;;;;EAOjB;EAIA;EAIA,YAAY,cAAc,cAAc,cAAc;;;;;;;;;;;mBAc/B,kBACrB,oBACA,yBACA,iBACA,0BACC,QAAQ;WAmBF,YAAY;;;;cC7LjB,wCAAsC,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsR1C,EAAA,KAAA;KAMU;EACV;EACA;EACA;EACA;EACA;EACA;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,QAAQ;IACR;IACA;IACA;IACA;IACA;IACA;IACA,yBAAyB;IACzB,WAAW;;EAEb;IACE;IACA;;EAEF;IACE;IACA;MACE;MACA;MACA;MACA;MACA;MACA;;IAEF;MACE;;IAEF;MACE,QAAQ;QACN;QACA;QACA;QACA;QACA;;;;EAIN;IACE;IACA;IACA,yBAAyB;IACzB,WAAW;;EAEb;IACE;;EAEF;IACE;IACA,yBAAyB;IACzB,WAAW;;EAEb;IACE;IACA;IACA,yBAAyB;IACzB,WAAW;;EAEb;IACE;IACA;IACA;IACA;IACA;IACA;;EAEF;IACE;IACA;IACA;IACA;IACA;;EAEF;IACE;IACA;IACA;IACA,yBAAyB;IACzB,WAAW;;EAEb;IACE;;EAEF;IACE;IACA;IACA,yBAAyB;IACzB,WAAW;;EAEb,MAAM;EACN,QAAQ;EACR,MAAM;EACN;IACE;IACA;IACA;IACA;IACA;IACA,cAAc;IACd;;EAEF;IACE;IACA;IACA;IACA;IACA;IACA;IACA,QAAQ;IACR;IACA;;EAEF;IACE;IACA;IACA,yBAAyB;IACzB,WAAW;;EAEb;IACE;IACA;IACA;IACA,WAAW;;EAEb;IACE;IACA;IACA;IACA;;EAEF;IACE;IACA;IACA;IACA;;EAEF;IACE;IACA,yBAAyB;IACzB,WAAW;IACX;;EAEF,cAAc;EACd;IACE;IACA,yBAAyB;IACzB,WAAW;IACX;IACA;;EAEF;IACE;IACA;;;KAKQ,2BAA2B,EAAE,aAAa;KAO1C;EACV;EACA;EACA;EACA,aAAa;EACb;EACA,aAAa;EACb;EACA;;KAGU;EACV;;KAGU;EACV;EACA;EACA;EACA;;;;;;cAOW,sBAAsB;EACjC,cACE,YACA,iBACA,SACA,aACA,MACA,YACA,UACA,UACC;SAsBI,oBAAoB;EAU3B,kBAAkB;EAQlB;EAIA,YAAY;SAcC,UACX,YACA,iBACA,SACA,UACC,6BAA6B,QAAQ;;;;KCphB9B;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,QAAQ;EACR;;;;KCRU;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;;KC9CG;EACH;EACA;EACA;EACA;;KAGU,kBAAkB;EAC5B,UAAU;EACV,WAAW;EACX;;;;;;;EAOA;EACA;EACA;EACA;EACA;EACA;EACA;;KAGU,gBAAgB;EAC1B,QAAQ;EACR,WAAW;;KAGD,iBAAiB;EAC3B,MAAM;EACN,IAAI;EACJ,WAAW;EACX;;iBAGoB,SAAS,UAAS,kBAAuB,QAAQ;iBAqBjD,eAAe,SAAS,gBAAgB,QAAQ;iBAehD,gBAAgB,SAAS,iBAAiB,QAAQ"}
|
package/dist/index.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ declare const FeatureSchema: z.ZodMiniUnion<readonly [z.ZodMiniEnum<{
|
|
|
14
14
|
type Feature = z.infer<typeof FeatureSchema>;
|
|
15
15
|
//#endregion
|
|
16
16
|
//#region src/types/tool-target-tuples.d.ts
|
|
17
|
-
declare const ALL_TOOL_TARGET_TUPLES: readonly [readonly ["agentsmd", "aiassistant", "amp", "antigravity-cli", "antigravity-ide", "antigravity-plugin", "augmentcode", "augmentcode-legacy", "claudecode", "claudecode-legacy", "cline", "codexcli", "copilot", "copilotcli", "cursor", "deepagents", "factorydroid", "goose", "grokcli", "hermesagent", "junie", "kilo", "kimi-code", "kiro", "kiro-cli", "kiro-ide", "musecode", "opencode", "pi", "qwencode", "reasonix", "replit", "roo", "rovodev", "takt", "vibe", "warp", "devin", "zed", "zoocode"], readonly ["aiassistant", "antigravity-cli", "augmentcode", "claudecode", "claudecode-legacy", "cline", "cursor", "hermesagent", "junie", "kilo", "kiro", "kiro-cli", "kiro-ide", "qwencode", "reasonix", "roo", "devin", "vibe", "warp", "zed", "zoocode"], readonly ["aiassistant", "amp", "antigravity-cli", "antigravity-ide", "antigravity-plugin", "augmentcode", "claudecode", "claudecode-plugin", "claudecode-legacy", "cline", "codexcli", "copilot", "copilotcli", "cursor", "deepagents", "factorydroid", "goose", "grokcli", "hermesagent", "kimi-code", "kilo", "kiro", "kiro-cli", "kiro-ide", "junie", "musecode", "opencode", "qwencode", "reasonix", "roo", "rovodev", "takt", "vibe", "warp", "devin", "zed", "zoocode"], readonly ["agentsmd", "antigravity-cli", "antigravity-ide", "augmentcode", "claudecode", "claudecode-plugin", "claudecode-legacy", "cline", "codexcli", "copilot", "cursor", "factorydroid", "goose", "grokcli", "hermesagent", "junie", "kilo", "kiro", "kiro-cli", "kiro-ide", "opencode", "pi", "qwencode", "reasonix", "roo", "zoocode", "rovodev", "takt", "devin", "warp"], readonly ["kilo", "agentsmd", "antigravity-cli", "antigravity-ide", "antigravity-plugin", "augmentcode", "claudecode", "claudecode-plugin", "claudecode-legacy", "cline", "codexcli", "copilot", "copilotcli", "cursor", "deepagents", "devin", "factorydroid", "goose", "grokcli", "hermesagent", "kimi-code", "junie", "kiro", "kiro-cli", "kiro-ide", "opencode", "qwencode", "reasonix", "roo", "zoocode", "rovodev", "takt", "vibe"], readonly ["agentsmd", "agentsskills", "aiassistant", "amp", "antigravity-cli", "antigravity-ide", "antigravity-plugin", "augmentcode", "claudecode", "claudecode-plugin", "claudecode-legacy", "cline", "codexcli", "copilot", "copilotcli", "cursor", "deepagents", "factorydroid", "goose", "grokcli", "hermesagent", "kimi-code", "junie", "kilo", "kiro", "kiro-cli", "kiro-ide", "musecode", "opencode", "pi", "qwencode", "reasonix", "replit", "roo", "rovodev", "takt", "vibe", "warp", "devin", "zed", "zoocode"], readonly ["amp", "cline", "antigravity-cli", "antigravity-ide", "antigravity-plugin", "kilo", "cursor", "claudecode", "claudecode-plugin", "codexcli", "copilot", "copilotcli", "opencode", "pi", "factorydroid", "goose", "hermesagent", "kimi-code", "deepagents", "kiro", "kiro-cli", "kiro-ide", "devin", "augmentcode", "junie", "vibe", "qwencode", "reasonix", "grokcli"], readonly ["amp", "antigravity-cli", "antigravity-ide", "augmentcode", "claudecode", "cline", "codexcli", "copilot", "copilotcli", "cursor", "devin", "factorydroid", "goose", "grokcli", "hermesagent", "kimi-code", "junie", "kilo", "kiro", "kiro-cli", "kiro-ide", "opencode", "pi", "qwencode", "reasonix", "rovodev", "takt", "vibe", "warp", "zed"], readonly ["amp", "augmentcode", "cursor", "hermesagent", "rovodev", "takt"]];
|
|
17
|
+
declare const ALL_TOOL_TARGET_TUPLES: readonly [readonly ["agentsmd", "aiassistant", "amp", "antigravity-cli", "antigravity-ide", "antigravity-plugin", "augmentcode", "augmentcode-legacy", "claudecode", "claudecode-legacy", "cline", "codexcli", "copilot", "copilotcli", "cursor", "deepagents", "factorydroid", "goose", "grokcli", "hermesagent", "junie", "kilo", "kimi-code", "kiro", "kiro-cli", "kiro-ide", "musecode", "opencode", "pi", "qwencode", "reasonix", "replit", "roo", "rovodev", "takt", "vibe", "warp", "devin", "zed", "zoocode"], readonly ["aiassistant", "antigravity-cli", "augmentcode", "claudecode", "claudecode-legacy", "cline", "cursor", "hermesagent", "junie", "kilo", "kiro", "kiro-cli", "kiro-ide", "qwencode", "reasonix", "roo", "devin", "vibe", "warp", "zed", "zoocode"], readonly ["aiassistant", "amp", "antigravity-cli", "antigravity-ide", "antigravity-plugin", "augmentcode", "claudecode", "claudecode-plugin", "claudecode-legacy", "cline", "codexcli", "copilot", "copilotcli", "cursor", "deepagents", "factorydroid", "goose", "grokcli", "hermesagent", "kimi-code", "kilo", "kiro", "kiro-cli", "kiro-ide", "junie", "musecode", "opencode", "qwencode", "reasonix", "roo", "rovodev", "takt", "vibe", "warp", "devin", "zed", "zoocode"], readonly ["agentsmd", "antigravity-cli", "antigravity-ide", "augmentcode", "claudecode", "claudecode-plugin", "claudecode-legacy", "cline", "codexcli", "copilot", "cursor", "factorydroid", "goose", "grokcli", "hermesagent", "junie", "kilo", "kiro", "kiro-cli", "kiro-ide", "opencode", "pi", "qwencode", "reasonix", "roo", "zoocode", "rovodev", "takt", "devin", "warp"], readonly ["kilo", "agentsmd", "antigravity-cli", "antigravity-ide", "antigravity-plugin", "augmentcode", "claudecode", "claudecode-plugin", "claudecode-legacy", "cline", "codexcli", "copilot", "copilotcli", "cursor", "deepagents", "devin", "factorydroid", "goose", "grokcli", "hermesagent", "kimi-code", "junie", "kiro", "kiro-cli", "kiro-ide", "opencode", "qwencode", "reasonix", "roo", "zoocode", "rovodev", "takt", "vibe"], readonly ["agentsmd", "agentsskills", "aiassistant", "amp", "antigravity-cli", "antigravity-ide", "antigravity-plugin", "augmentcode", "claudecode", "claudecode-plugin", "claudecode-legacy", "cline", "codexcli", "copilot", "copilotcli", "cursor", "deepagents", "factorydroid", "goose", "grokcli", "hermesagent", "kimi-code", "junie", "kilo", "kiro", "kiro-cli", "kiro-ide", "musecode", "opencode", "pi", "qwencode", "reasonix", "replit", "roo", "rovodev", "takt", "vibe", "warp", "devin", "zed", "zoocode"], readonly ["amp", "cline", "antigravity-cli", "antigravity-ide", "antigravity-plugin", "kilo", "cursor", "claudecode", "claudecode-plugin", "codexcli", "copilot", "copilotcli", "opencode", "pi", "factorydroid", "goose", "hermesagent", "kimi-code", "deepagents", "kiro", "kiro-cli", "kiro-ide", "devin", "augmentcode", "junie", "vibe", "qwencode", "reasonix", "grokcli"], readonly ["amp", "antigravity-cli", "antigravity-ide", "augmentcode", "claudecode", "cline", "codexcli", "copilot", "copilotcli", "cursor", "devin", "factorydroid", "goose", "grokcli", "hermesagent", "kimi-code", "junie", "kilo", "kiro", "kiro-cli", "kiro-ide", "opencode", "pi", "qwencode", "reasonix", "rovodev", "takt", "vibe", "warp", "zed", "zoocode"], readonly ["amp", "augmentcode", "cursor", "hermesagent", "rovodev", "takt"]];
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region src/types/tool-targets.d.ts
|
|
20
20
|
type AllToolTarget = (typeof ALL_TOOL_TARGET_TUPLES)[number][number];
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/types/features.ts","../src/types/tool-target-tuples.ts","../src/types/tool-targets.ts","../src/lib/convert.ts","../src/types/ai-dir.ts","../src/features/skills/rulesync-skill.ts","../src/lib/generate.ts","../src/lib/import.ts","../src/index.ts"],"mappings":";;cAaa;cA+BP,eAAa,EAAA,uBAAA,EAAA;;;;;;;;;IAAoE,EAAA;KAE3E,UAAU,EAAE,aAAa;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/types/features.ts","../src/types/tool-target-tuples.ts","../src/types/tool-targets.ts","../src/lib/convert.ts","../src/types/ai-dir.ts","../src/features/skills/rulesync-skill.ts","../src/lib/generate.ts","../src/lib/import.ts","../src/index.ts"],"mappings":";;cAaa;cA+BP,eAAa,EAAA,uBAAA,EAAA;;;;;;;;;IAAoE,EAAA;KAE3E,UAAU,EAAE,aAAa;;;cCiQxB;;;KCrSR,wBAAwB;cAEhB,4BAA4B,kBAAkB;cAM9C,kBAAgB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAEjB,aAAa,EAAE,aAAa;;;KCJ5B;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;;KCrBU;EAEN;EACA;;EAGA;EACA,OAAO;;KAGD;EACV;EACA,YAAY;;;;;;;;EAQZ;;KAGU;EACV;EACA;EACA;EACA;IACE;IACA;IACA,cAAc;;EAEhB,aAAa;EACb;;KAGU,qBAAqB,KAC/B;uBAIoB;;;;qBAID;;;;qBAKA;;;;qBAKA;;;;YAKT;IACR;IACA;IACA,cAAc;;;;;YAMN,YAAY;;;;qBAKH;EAEnB,cACE,YACA,iBACA,SACA,UACA,YACA,UACC;SAcU,QAAQ,SAAS,qBAAqB,QAAQ;EAI3D;EAIA;EAIA;EAIA;EAqBA;IAEM;IACA;IACA,cAAc;;EAMpB,iBAAiB;;;;EAOjB;EAIA;EAIA,YAAY,cAAc,cAAc,cAAc;;;;;;;;;;;mBAc/B,kBACrB,oBACA,yBACA,iBACA,0BACC,QAAQ;WAmBF,YAAY;;;;cC7LjB,wCAAsC,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsR1C,EAAA,KAAA;KAMU;EACV;EACA;EACA;EACA;EACA;EACA;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,QAAQ;IACR;IACA;IACA;IACA;IACA;IACA;IACA,yBAAyB;IACzB,WAAW;;EAEb;IACE;IACA;;EAEF;IACE;IACA;MACE;MACA;MACA;MACA;MACA;MACA;;IAEF;MACE;;IAEF;MACE,QAAQ;QACN;QACA;QACA;QACA;QACA;;;;EAIN;IACE;IACA;IACA,yBAAyB;IACzB,WAAW;;EAEb;IACE;;EAEF;IACE;IACA,yBAAyB;IACzB,WAAW;;EAEb;IACE;IACA;IACA,yBAAyB;IACzB,WAAW;;EAEb;IACE;IACA;IACA;IACA;IACA;IACA;;EAEF;IACE;IACA;IACA;IACA;IACA;;EAEF;IACE;IACA;IACA;IACA,yBAAyB;IACzB,WAAW;;EAEb;IACE;;EAEF;IACE;IACA;IACA,yBAAyB;IACzB,WAAW;;EAEb,MAAM;EACN,QAAQ;EACR,MAAM;EACN;IACE;IACA;IACA;IACA;IACA;IACA,cAAc;IACd;;EAEF;IACE;IACA;IACA;IACA;IACA;IACA;IACA,QAAQ;IACR;IACA;;EAEF;IACE;IACA;IACA,yBAAyB;IACzB,WAAW;;EAEb;IACE;IACA;IACA;IACA,WAAW;;EAEb;IACE;IACA;IACA;IACA;;EAEF;IACE;IACA;IACA;IACA;;EAEF;IACE;IACA,yBAAyB;IACzB,WAAW;IACX;;EAEF,cAAc;EACd;IACE;IACA,yBAAyB;IACzB,WAAW;IACX;IACA;;EAEF;IACE;IACA;;;KAKQ,2BAA2B,EAAE,aAAa;KAO1C;EACV;EACA;EACA;EACA,aAAa;EACb;EACA,aAAa;EACb;EACA;;KAGU;EACV;;KAGU;EACV;EACA;EACA;EACA;;;;;;cAOW,sBAAsB;EACjC,cACE,YACA,iBACA,SACA,aACA,MACA,YACA,UACA,UACC;SAsBI,oBAAoB;EAU3B,kBAAkB;EAQlB;EAIA,YAAY;SAcC,UACX,YACA,iBACA,SACA,UACC,6BAA6B,QAAQ;;;;KCphB9B;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,QAAQ;EACR;;;;KCRU;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;;KC9CG;EACH;EACA;EACA;EACA;;KAGU,kBAAkB;EAC5B,UAAU;EACV,WAAW;EACX;;;;;;;EAOA;EACA;EACA;EACA;EACA;EACA;EACA;;KAGU,gBAAgB;EAC1B,QAAQ;EACR,WAAW;;KAGD,iBAAiB;EAC3B,MAAM;EACN,IAAI;EACJ,WAAW;EACX;;iBAGoB,SAAS,UAAS,kBAAuB,QAAQ;iBAqBjD,eAAe,SAAS,gBAAgB,QAAQ;iBAehD,gBAAgB,SAAS,iBAAiB,QAAQ"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { K as ConfigResolver, Q as ConsoleLogger, a as convertFromTool$1, kt as ALL_TOOL_TARGETS, n as checkRulesyncDirExists, r as generate$1, sn as ALL_FEATURES, t as importFromTool$1 } from "./import-
|
|
1
|
+
import { K as ConfigResolver, Q as ConsoleLogger, a as convertFromTool$1, kt as ALL_TOOL_TARGETS, n as checkRulesyncDirExists, r as generate$1, sn as ALL_FEATURES, t as importFromTool$1 } from "./import-Ds0QeVp6.js";
|
|
2
2
|
//#region src/index.ts
|
|
3
3
|
async function generate(options = {}) {
|
|
4
4
|
const { silent = true, verbose = false, ...rest } = options;
|