rulesync 8.17.0 → 8.18.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/dist/{chunk-RXCRO26Z.js → chunk-KDGHMXTY.js} +134 -94
- package/dist/cli/index.cjs +339 -299
- package/dist/cli/index.js +2 -2
- package/dist/index.cjs +134 -94
- package/dist/index.js +1 -1
- package/package.json +3 -1
package/dist/cli/index.js
CHANGED
|
@@ -79,7 +79,7 @@ import {
|
|
|
79
79
|
stringifyFrontmatter,
|
|
80
80
|
toPosixPath,
|
|
81
81
|
writeFileContent
|
|
82
|
-
} from "../chunk-
|
|
82
|
+
} from "../chunk-KDGHMXTY.js";
|
|
83
83
|
|
|
84
84
|
// src/cli/index.ts
|
|
85
85
|
import { Command } from "commander";
|
|
@@ -6485,7 +6485,7 @@ function wrapCommand({
|
|
|
6485
6485
|
}
|
|
6486
6486
|
|
|
6487
6487
|
// src/cli/index.ts
|
|
6488
|
-
var getVersion = () => "8.
|
|
6488
|
+
var getVersion = () => "8.18.0";
|
|
6489
6489
|
function wrapCommand2(name, errorCode, handler) {
|
|
6490
6490
|
return wrapCommand({ name, errorCode, handler, getVersion });
|
|
6491
6491
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -7889,14 +7889,21 @@ var ClineMcp = class _ClineMcp extends ToolMcp {
|
|
|
7889
7889
|
// src/features/mcp/codexcli-mcp.ts
|
|
7890
7890
|
var import_node_path54 = require("path");
|
|
7891
7891
|
var smolToml3 = __toESM(require("smol-toml"), 1);
|
|
7892
|
+
var MAX_REMOVE_EMPTY_ENTRIES_DEPTH = 32;
|
|
7893
|
+
var PROTOTYPE_POLLUTION_KEYS = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
|
|
7894
|
+
function isPlainObject2(value) {
|
|
7895
|
+
if (!isRecord(value)) return false;
|
|
7896
|
+
const proto = Object.getPrototypeOf(value);
|
|
7897
|
+
return proto === null || proto === Object.prototype;
|
|
7898
|
+
}
|
|
7892
7899
|
function convertFromCodexFormat(codexMcp) {
|
|
7893
7900
|
const result = {};
|
|
7894
7901
|
for (const [name, config] of Object.entries(codexMcp)) {
|
|
7895
|
-
if (
|
|
7896
|
-
|
|
7897
|
-
}
|
|
7902
|
+
if (PROTOTYPE_POLLUTION_KEYS.has(name)) continue;
|
|
7903
|
+
if (!isRecord(config)) continue;
|
|
7898
7904
|
const converted = {};
|
|
7899
7905
|
for (const [key, value] of Object.entries(config)) {
|
|
7906
|
+
if (PROTOTYPE_POLLUTION_KEYS.has(key)) continue;
|
|
7900
7907
|
if (key === "enabled") {
|
|
7901
7908
|
if (value === false) {
|
|
7902
7909
|
converted["disabled"] = true;
|
|
@@ -7918,8 +7925,11 @@ function convertFromCodexFormat(codexMcp) {
|
|
|
7918
7925
|
function convertToCodexFormat(mcpServers) {
|
|
7919
7926
|
const result = {};
|
|
7920
7927
|
for (const [name, config] of Object.entries(mcpServers)) {
|
|
7928
|
+
if (PROTOTYPE_POLLUTION_KEYS.has(name)) continue;
|
|
7929
|
+
if (!isRecord(config)) continue;
|
|
7921
7930
|
const converted = {};
|
|
7922
7931
|
for (const [key, value] of Object.entries(config)) {
|
|
7932
|
+
if (PROTOTYPE_POLLUTION_KEYS.has(key)) continue;
|
|
7923
7933
|
if (key === "disabled") {
|
|
7924
7934
|
if (value === true) {
|
|
7925
7935
|
converted["enabled"] = false;
|
|
@@ -8001,6 +8011,14 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
|
|
|
8001
8011
|
const mcpServers = rulesyncMcp.getJson().mcpServers;
|
|
8002
8012
|
const converted = convertToCodexFormat(mcpServers);
|
|
8003
8013
|
const filteredMcpServers = this.removeEmptyEntries(converted);
|
|
8014
|
+
for (const name of Object.keys(converted)) {
|
|
8015
|
+
if (!Object.hasOwn(filteredMcpServers, name)) {
|
|
8016
|
+
warnWithFallback(
|
|
8017
|
+
void 0,
|
|
8018
|
+
`MCP server "${name}" had no non-empty configuration and was dropped from the codex CLI config`
|
|
8019
|
+
);
|
|
8020
|
+
}
|
|
8021
|
+
}
|
|
8004
8022
|
configToml["mcp_servers"] = filteredMcpServers;
|
|
8005
8023
|
return new _CodexcliMcp({
|
|
8006
8024
|
outputRoot,
|
|
@@ -8020,13 +8038,21 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
|
|
|
8020
8038
|
validate() {
|
|
8021
8039
|
return { success: true, error: null };
|
|
8022
8040
|
}
|
|
8023
|
-
static removeEmptyEntries(obj) {
|
|
8041
|
+
static removeEmptyEntries(obj, depth = 0) {
|
|
8024
8042
|
if (!obj) return {};
|
|
8043
|
+
if (depth > MAX_REMOVE_EMPTY_ENTRIES_DEPTH) {
|
|
8044
|
+
warnWithFallback(
|
|
8045
|
+
void 0,
|
|
8046
|
+
`removeEmptyEntries: maximum recursion depth (${MAX_REMOVE_EMPTY_ENTRIES_DEPTH}) exceeded; empty nested objects may remain`
|
|
8047
|
+
);
|
|
8048
|
+
return obj;
|
|
8049
|
+
}
|
|
8025
8050
|
const filtered = {};
|
|
8026
8051
|
for (const [key, value] of Object.entries(obj)) {
|
|
8052
|
+
if (PROTOTYPE_POLLUTION_KEYS.has(key)) continue;
|
|
8027
8053
|
if (value === null) continue;
|
|
8028
|
-
if (
|
|
8029
|
-
const cleaned = this.removeEmptyEntries(value);
|
|
8054
|
+
if (isPlainObject2(value)) {
|
|
8055
|
+
const cleaned = this.removeEmptyEntries(value, depth + 1);
|
|
8030
8056
|
if (Object.keys(cleaned).length === 0) continue;
|
|
8031
8057
|
filtered[key] = cleaned;
|
|
8032
8058
|
continue;
|
|
@@ -9719,7 +9745,13 @@ var toolMcpFactories = /* @__PURE__ */ new Map([
|
|
|
9719
9745
|
class: KiloMcp,
|
|
9720
9746
|
meta: {
|
|
9721
9747
|
supportsProject: true,
|
|
9722
|
-
|
|
9748
|
+
// Kilo CLI reads global MCP from `~/.config/kilo/kilo.json` (or
|
|
9749
|
+
// `kilo.jsonc`). The path machinery in `KiloMcp.getSettablePaths`
|
|
9750
|
+
// already routes global mode to that location; only this flag
|
|
9751
|
+
// was gating it off. Kilo is an OpenCode fork and uses an
|
|
9752
|
+
// identical native MCP schema, so global parity with opencode
|
|
9753
|
+
// is the natural state.
|
|
9754
|
+
supportsGlobal: true,
|
|
9723
9755
|
supportsEnabledTools: false,
|
|
9724
9756
|
supportsDisabledTools: false
|
|
9725
9757
|
}
|
|
@@ -12840,7 +12872,7 @@ var PermissionsProcessor = class extends FeatureProcessor {
|
|
|
12840
12872
|
// src/features/rules/rules-processor.ts
|
|
12841
12873
|
var import_node_path154 = require("path");
|
|
12842
12874
|
var import_toon = require("@toon-format/toon");
|
|
12843
|
-
var
|
|
12875
|
+
var import_mini80 = require("zod/mini");
|
|
12844
12876
|
|
|
12845
12877
|
// src/constants/general.ts
|
|
12846
12878
|
var SKILL_FILE_NAME = "SKILL.md";
|
|
@@ -17792,7 +17824,7 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
|
|
|
17792
17824
|
|
|
17793
17825
|
// src/features/subagents/subagents-processor.ts
|
|
17794
17826
|
var import_node_path125 = require("path");
|
|
17795
|
-
var
|
|
17827
|
+
var import_mini73 = require("zod/mini");
|
|
17796
17828
|
|
|
17797
17829
|
// src/features/subagents/claudecode-subagent.ts
|
|
17798
17830
|
var import_node_path113 = require("path");
|
|
@@ -18952,6 +18984,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
|
|
|
18952
18984
|
|
|
18953
18985
|
// src/features/subagents/kilo-subagent.ts
|
|
18954
18986
|
var import_node_path121 = require("path");
|
|
18987
|
+
var import_mini71 = require("zod/mini");
|
|
18955
18988
|
|
|
18956
18989
|
// src/features/subagents/opencode-style-subagent.ts
|
|
18957
18990
|
var import_node_path120 = require("path");
|
|
@@ -19018,7 +19051,13 @@ var OpenCodeStyleSubagent = class extends ToolSubagent {
|
|
|
19018
19051
|
};
|
|
19019
19052
|
|
|
19020
19053
|
// src/features/subagents/kilo-subagent.ts
|
|
19021
|
-
var KiloSubagentFrontmatterSchema =
|
|
19054
|
+
var KiloSubagentFrontmatterSchema = import_mini71.z.looseObject({
|
|
19055
|
+
description: import_mini71.z.optional(import_mini71.z.string()),
|
|
19056
|
+
// Kilo's documented default for user-defined agents is "all":
|
|
19057
|
+
// available both as a top-level pick and as a subagent.
|
|
19058
|
+
mode: import_mini71.z._default(import_mini71.z.string(), "all"),
|
|
19059
|
+
name: import_mini71.z.optional(import_mini71.z.string())
|
|
19060
|
+
});
|
|
19022
19061
|
var KiloSubagent = class _KiloSubagent extends OpenCodeStyleSubagent {
|
|
19023
19062
|
getToolTarget() {
|
|
19024
19063
|
return "kilo";
|
|
@@ -19038,12 +19077,11 @@ var KiloSubagent = class _KiloSubagent extends OpenCodeStyleSubagent {
|
|
|
19038
19077
|
}) {
|
|
19039
19078
|
const rulesyncFrontmatter = rulesyncSubagent.getFrontmatter();
|
|
19040
19079
|
const kiloSection = rulesyncFrontmatter.kilo ?? {};
|
|
19041
|
-
const kiloFrontmatter = {
|
|
19080
|
+
const kiloFrontmatter = KiloSubagentFrontmatterSchema.parse({
|
|
19042
19081
|
...kiloSection,
|
|
19043
19082
|
description: rulesyncFrontmatter.description,
|
|
19044
|
-
mode: typeof kiloSection.mode === "string" ? kiloSection.mode : "subagent",
|
|
19045
19083
|
...rulesyncFrontmatter.name && { name: rulesyncFrontmatter.name }
|
|
19046
|
-
};
|
|
19084
|
+
});
|
|
19047
19085
|
const body = rulesyncSubagent.getBody();
|
|
19048
19086
|
const fileContent = stringifyFrontmatter(body, kiloFrontmatter);
|
|
19049
19087
|
const paths = this.getSettablePaths({ global });
|
|
@@ -19092,38 +19130,40 @@ var KiloSubagent = class _KiloSubagent extends OpenCodeStyleSubagent {
|
|
|
19092
19130
|
static forDeletion({
|
|
19093
19131
|
outputRoot = process.cwd(),
|
|
19094
19132
|
relativeDirPath,
|
|
19095
|
-
relativeFilePath
|
|
19133
|
+
relativeFilePath,
|
|
19134
|
+
global = false
|
|
19096
19135
|
}) {
|
|
19097
19136
|
return new _KiloSubagent({
|
|
19098
19137
|
outputRoot,
|
|
19099
19138
|
relativeDirPath,
|
|
19100
19139
|
relativeFilePath,
|
|
19101
|
-
frontmatter: { description: "", mode: "
|
|
19140
|
+
frontmatter: { description: "", mode: "all" },
|
|
19102
19141
|
body: "",
|
|
19103
19142
|
fileContent: "",
|
|
19104
|
-
validate: false
|
|
19143
|
+
validate: false,
|
|
19144
|
+
global
|
|
19105
19145
|
});
|
|
19106
19146
|
}
|
|
19107
19147
|
};
|
|
19108
19148
|
|
|
19109
19149
|
// src/features/subagents/kiro-subagent.ts
|
|
19110
19150
|
var import_node_path122 = require("path");
|
|
19111
|
-
var
|
|
19112
|
-
var KiroCliSubagentJsonSchema =
|
|
19113
|
-
name:
|
|
19114
|
-
description:
|
|
19115
|
-
prompt:
|
|
19116
|
-
tools:
|
|
19117
|
-
toolAliases:
|
|
19118
|
-
toolSettings:
|
|
19119
|
-
toolSchema:
|
|
19120
|
-
hooks:
|
|
19121
|
-
model:
|
|
19122
|
-
mcpServers:
|
|
19123
|
-
useLegacyMcpJson:
|
|
19124
|
-
resources:
|
|
19125
|
-
allowedTools:
|
|
19126
|
-
includeMcpJson:
|
|
19151
|
+
var import_mini72 = require("zod/mini");
|
|
19152
|
+
var KiroCliSubagentJsonSchema = import_mini72.z.looseObject({
|
|
19153
|
+
name: import_mini72.z.string(),
|
|
19154
|
+
description: import_mini72.z.optional(import_mini72.z.nullable(import_mini72.z.string())),
|
|
19155
|
+
prompt: import_mini72.z.optional(import_mini72.z.nullable(import_mini72.z.string())),
|
|
19156
|
+
tools: import_mini72.z.optional(import_mini72.z.nullable(import_mini72.z.array(import_mini72.z.string()))),
|
|
19157
|
+
toolAliases: import_mini72.z.optional(import_mini72.z.nullable(import_mini72.z.record(import_mini72.z.string(), import_mini72.z.string()))),
|
|
19158
|
+
toolSettings: import_mini72.z.optional(import_mini72.z.nullable(import_mini72.z.unknown())),
|
|
19159
|
+
toolSchema: import_mini72.z.optional(import_mini72.z.nullable(import_mini72.z.unknown())),
|
|
19160
|
+
hooks: import_mini72.z.optional(import_mini72.z.nullable(import_mini72.z.record(import_mini72.z.string(), import_mini72.z.array(import_mini72.z.unknown())))),
|
|
19161
|
+
model: import_mini72.z.optional(import_mini72.z.nullable(import_mini72.z.string())),
|
|
19162
|
+
mcpServers: import_mini72.z.optional(import_mini72.z.nullable(import_mini72.z.record(import_mini72.z.string(), import_mini72.z.unknown()))),
|
|
19163
|
+
useLegacyMcpJson: import_mini72.z.optional(import_mini72.z.nullable(import_mini72.z.boolean())),
|
|
19164
|
+
resources: import_mini72.z.optional(import_mini72.z.nullable(import_mini72.z.array(import_mini72.z.string()))),
|
|
19165
|
+
allowedTools: import_mini72.z.optional(import_mini72.z.nullable(import_mini72.z.array(import_mini72.z.string()))),
|
|
19166
|
+
includeMcpJson: import_mini72.z.optional(import_mini72.z.nullable(import_mini72.z.boolean()))
|
|
19127
19167
|
});
|
|
19128
19168
|
var KiroSubagent = class _KiroSubagent extends ToolSubagent {
|
|
19129
19169
|
body;
|
|
@@ -19489,7 +19529,7 @@ var subagentsProcessorToolTargetTuple = [
|
|
|
19489
19529
|
"rovodev",
|
|
19490
19530
|
"takt"
|
|
19491
19531
|
];
|
|
19492
|
-
var SubagentsProcessorToolTargetSchema =
|
|
19532
|
+
var SubagentsProcessorToolTargetSchema = import_mini73.z.enum(subagentsProcessorToolTargetTuple);
|
|
19493
19533
|
var toolSubagentFactories = /* @__PURE__ */ new Map([
|
|
19494
19534
|
[
|
|
19495
19535
|
"agentsmd",
|
|
@@ -19818,48 +19858,48 @@ var import_node_path127 = require("path");
|
|
|
19818
19858
|
|
|
19819
19859
|
// src/features/rules/rulesync-rule.ts
|
|
19820
19860
|
var import_node_path126 = require("path");
|
|
19821
|
-
var
|
|
19822
|
-
var RulesyncRuleFrontmatterSchema =
|
|
19823
|
-
root:
|
|
19824
|
-
localRoot:
|
|
19825
|
-
targets:
|
|
19826
|
-
description:
|
|
19827
|
-
globs:
|
|
19828
|
-
agentsmd:
|
|
19829
|
-
|
|
19861
|
+
var import_mini74 = require("zod/mini");
|
|
19862
|
+
var RulesyncRuleFrontmatterSchema = import_mini74.z.object({
|
|
19863
|
+
root: import_mini74.z.optional(import_mini74.z.boolean()),
|
|
19864
|
+
localRoot: import_mini74.z.optional(import_mini74.z.boolean()),
|
|
19865
|
+
targets: import_mini74.z._default(RulesyncTargetsSchema, ["*"]),
|
|
19866
|
+
description: import_mini74.z.optional(import_mini74.z.string()),
|
|
19867
|
+
globs: import_mini74.z.optional(import_mini74.z.array(import_mini74.z.string())),
|
|
19868
|
+
agentsmd: import_mini74.z.optional(
|
|
19869
|
+
import_mini74.z.looseObject({
|
|
19830
19870
|
// @example "path/to/subproject"
|
|
19831
|
-
subprojectPath:
|
|
19871
|
+
subprojectPath: import_mini74.z.optional(import_mini74.z.string())
|
|
19832
19872
|
})
|
|
19833
19873
|
),
|
|
19834
|
-
claudecode:
|
|
19835
|
-
|
|
19874
|
+
claudecode: import_mini74.z.optional(
|
|
19875
|
+
import_mini74.z.looseObject({
|
|
19836
19876
|
// Glob patterns for conditional rules (takes precedence over globs)
|
|
19837
19877
|
// @example ["src/**/*.ts", "tests/**/*.test.ts"]
|
|
19838
|
-
paths:
|
|
19878
|
+
paths: import_mini74.z.optional(import_mini74.z.array(import_mini74.z.string()))
|
|
19839
19879
|
})
|
|
19840
19880
|
),
|
|
19841
|
-
cursor:
|
|
19842
|
-
|
|
19843
|
-
alwaysApply:
|
|
19844
|
-
description:
|
|
19845
|
-
globs:
|
|
19881
|
+
cursor: import_mini74.z.optional(
|
|
19882
|
+
import_mini74.z.looseObject({
|
|
19883
|
+
alwaysApply: import_mini74.z.optional(import_mini74.z.boolean()),
|
|
19884
|
+
description: import_mini74.z.optional(import_mini74.z.string()),
|
|
19885
|
+
globs: import_mini74.z.optional(import_mini74.z.array(import_mini74.z.string()))
|
|
19846
19886
|
})
|
|
19847
19887
|
),
|
|
19848
|
-
copilot:
|
|
19849
|
-
|
|
19850
|
-
excludeAgent:
|
|
19888
|
+
copilot: import_mini74.z.optional(
|
|
19889
|
+
import_mini74.z.looseObject({
|
|
19890
|
+
excludeAgent: import_mini74.z.optional(import_mini74.z.union([import_mini74.z.literal("code-review"), import_mini74.z.literal("coding-agent")]))
|
|
19851
19891
|
})
|
|
19852
19892
|
),
|
|
19853
|
-
antigravity:
|
|
19854
|
-
|
|
19855
|
-
trigger:
|
|
19856
|
-
globs:
|
|
19893
|
+
antigravity: import_mini74.z.optional(
|
|
19894
|
+
import_mini74.z.looseObject({
|
|
19895
|
+
trigger: import_mini74.z.optional(import_mini74.z.string()),
|
|
19896
|
+
globs: import_mini74.z.optional(import_mini74.z.array(import_mini74.z.string()))
|
|
19857
19897
|
})
|
|
19858
19898
|
),
|
|
19859
|
-
takt:
|
|
19860
|
-
|
|
19899
|
+
takt: import_mini74.z.optional(
|
|
19900
|
+
import_mini74.z.looseObject({
|
|
19861
19901
|
// Rename the emitted file stem (e.g. "coder.md" → "{name}.md").
|
|
19862
|
-
name:
|
|
19902
|
+
name: import_mini74.z.optional(import_mini74.z.string())
|
|
19863
19903
|
})
|
|
19864
19904
|
)
|
|
19865
19905
|
});
|
|
@@ -20160,20 +20200,20 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
|
|
|
20160
20200
|
|
|
20161
20201
|
// src/features/rules/antigravity-rule.ts
|
|
20162
20202
|
var import_node_path129 = require("path");
|
|
20163
|
-
var
|
|
20164
|
-
var AntigravityRuleFrontmatterSchema =
|
|
20165
|
-
trigger:
|
|
20166
|
-
|
|
20167
|
-
|
|
20168
|
-
|
|
20169
|
-
|
|
20170
|
-
|
|
20171
|
-
|
|
20203
|
+
var import_mini75 = require("zod/mini");
|
|
20204
|
+
var AntigravityRuleFrontmatterSchema = import_mini75.z.looseObject({
|
|
20205
|
+
trigger: import_mini75.z.optional(
|
|
20206
|
+
import_mini75.z.union([
|
|
20207
|
+
import_mini75.z.literal("always_on"),
|
|
20208
|
+
import_mini75.z.literal("glob"),
|
|
20209
|
+
import_mini75.z.literal("manual"),
|
|
20210
|
+
import_mini75.z.literal("model_decision"),
|
|
20211
|
+
import_mini75.z.string()
|
|
20172
20212
|
// accepts any string for forward compatibility
|
|
20173
20213
|
])
|
|
20174
20214
|
),
|
|
20175
|
-
globs:
|
|
20176
|
-
description:
|
|
20215
|
+
globs: import_mini75.z.optional(import_mini75.z.string()),
|
|
20216
|
+
description: import_mini75.z.optional(import_mini75.z.string())
|
|
20177
20217
|
});
|
|
20178
20218
|
function parseGlobsString(globs) {
|
|
20179
20219
|
if (!globs) {
|
|
@@ -20760,9 +20800,9 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
|
|
|
20760
20800
|
|
|
20761
20801
|
// src/features/rules/claudecode-rule.ts
|
|
20762
20802
|
var import_node_path133 = require("path");
|
|
20763
|
-
var
|
|
20764
|
-
var ClaudecodeRuleFrontmatterSchema =
|
|
20765
|
-
paths:
|
|
20803
|
+
var import_mini76 = require("zod/mini");
|
|
20804
|
+
var ClaudecodeRuleFrontmatterSchema = import_mini76.z.object({
|
|
20805
|
+
paths: import_mini76.z.optional(import_mini76.z.array(import_mini76.z.string()))
|
|
20766
20806
|
});
|
|
20767
20807
|
var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
|
|
20768
20808
|
frontmatter;
|
|
@@ -20978,9 +21018,9 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
|
|
|
20978
21018
|
|
|
20979
21019
|
// src/features/rules/cline-rule.ts
|
|
20980
21020
|
var import_node_path134 = require("path");
|
|
20981
|
-
var
|
|
20982
|
-
var ClineRuleFrontmatterSchema =
|
|
20983
|
-
description:
|
|
21021
|
+
var import_mini77 = require("zod/mini");
|
|
21022
|
+
var ClineRuleFrontmatterSchema = import_mini77.z.object({
|
|
21023
|
+
description: import_mini77.z.string()
|
|
20984
21024
|
});
|
|
20985
21025
|
var ClineRule = class _ClineRule extends ToolRule {
|
|
20986
21026
|
static getSettablePaths(_options = {}) {
|
|
@@ -21159,11 +21199,11 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
|
|
|
21159
21199
|
|
|
21160
21200
|
// src/features/rules/copilot-rule.ts
|
|
21161
21201
|
var import_node_path136 = require("path");
|
|
21162
|
-
var
|
|
21163
|
-
var CopilotRuleFrontmatterSchema =
|
|
21164
|
-
description:
|
|
21165
|
-
applyTo:
|
|
21166
|
-
excludeAgent:
|
|
21202
|
+
var import_mini78 = require("zod/mini");
|
|
21203
|
+
var CopilotRuleFrontmatterSchema = import_mini78.z.object({
|
|
21204
|
+
description: import_mini78.z.optional(import_mini78.z.string()),
|
|
21205
|
+
applyTo: import_mini78.z.optional(import_mini78.z.string()),
|
|
21206
|
+
excludeAgent: import_mini78.z.optional(import_mini78.z.union([import_mini78.z.literal("code-review"), import_mini78.z.literal("coding-agent")]))
|
|
21167
21207
|
});
|
|
21168
21208
|
var normalizeRelativePath = (path4) => path4.replace(/\\/g, "/").replace(/\/+/g, "/");
|
|
21169
21209
|
var sameRelativePath = (leftDir, leftFile, rightDir, rightFile) => normalizeRelativePath((0, import_node_path136.join)(leftDir, leftFile)) === normalizeRelativePath((0, import_node_path136.join)(rightDir, rightFile));
|
|
@@ -21417,11 +21457,11 @@ var CopilotcliRule = class _CopilotcliRule extends CopilotRule {
|
|
|
21417
21457
|
|
|
21418
21458
|
// src/features/rules/cursor-rule.ts
|
|
21419
21459
|
var import_node_path137 = require("path");
|
|
21420
|
-
var
|
|
21421
|
-
var CursorRuleFrontmatterSchema =
|
|
21422
|
-
description:
|
|
21423
|
-
globs:
|
|
21424
|
-
alwaysApply:
|
|
21460
|
+
var import_mini79 = require("zod/mini");
|
|
21461
|
+
var CursorRuleFrontmatterSchema = import_mini79.z.object({
|
|
21462
|
+
description: import_mini79.z.optional(import_mini79.z.string()),
|
|
21463
|
+
globs: import_mini79.z.optional(import_mini79.z.string()),
|
|
21464
|
+
alwaysApply: import_mini79.z.optional(import_mini79.z.boolean())
|
|
21425
21465
|
});
|
|
21426
21466
|
var CursorRule = class _CursorRule extends ToolRule {
|
|
21427
21467
|
frontmatter;
|
|
@@ -23304,11 +23344,11 @@ var rulesProcessorToolTargets = [
|
|
|
23304
23344
|
"warp",
|
|
23305
23345
|
"windsurf"
|
|
23306
23346
|
];
|
|
23307
|
-
var RulesProcessorToolTargetSchema =
|
|
23347
|
+
var RulesProcessorToolTargetSchema = import_mini80.z.enum(rulesProcessorToolTargets);
|
|
23308
23348
|
var formatRulePaths = (rules) => rules.map((r) => (0, import_node_path154.join)(r.getRelativeDirPath(), r.getRelativeFilePath())).join(", ");
|
|
23309
|
-
var RulesFeatureOptionsSchema =
|
|
23310
|
-
ruleDiscoveryMode:
|
|
23311
|
-
includeLocalRoot:
|
|
23349
|
+
var RulesFeatureOptionsSchema = import_mini80.z.looseObject({
|
|
23350
|
+
ruleDiscoveryMode: import_mini80.z.optional(import_mini80.z.enum(["none", "explicit"])),
|
|
23351
|
+
includeLocalRoot: import_mini80.z.optional(import_mini80.z.boolean())
|
|
23312
23352
|
});
|
|
23313
23353
|
var resolveRuleDiscoveryMode = ({
|
|
23314
23354
|
defaultMode,
|
|
@@ -23329,8 +23369,8 @@ var resolveRuleDiscoveryMode = ({
|
|
|
23329
23369
|
}
|
|
23330
23370
|
return parsed.data.ruleDiscoveryMode === "none" ? "auto" : "toon";
|
|
23331
23371
|
};
|
|
23332
|
-
var IncludeLocalRootSchema =
|
|
23333
|
-
includeLocalRoot:
|
|
23372
|
+
var IncludeLocalRootSchema = import_mini80.z.looseObject({
|
|
23373
|
+
includeLocalRoot: import_mini80.z.optional(import_mini80.z.boolean())
|
|
23334
23374
|
});
|
|
23335
23375
|
var resolveIncludeLocalRoot = (options) => {
|
|
23336
23376
|
if (!options) return true;
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rulesync",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.18.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",
|
|
@@ -90,6 +90,7 @@
|
|
|
90
90
|
"repomix": "1.12.0",
|
|
91
91
|
"resend": "6.9.4",
|
|
92
92
|
"secretlint": "11.3.1",
|
|
93
|
+
"simple-git": "3.36.0",
|
|
93
94
|
"simple-git-hooks": "2.13.1",
|
|
94
95
|
"sort-package-json": "3.6.1",
|
|
95
96
|
"tsup": "8.5.1",
|
|
@@ -129,6 +130,7 @@
|
|
|
129
130
|
"knip": "knip",
|
|
130
131
|
"oxlint": "oxlint . --max-warnings 0",
|
|
131
132
|
"oxlint:fix": "oxlint . --fix --max-warnings 0",
|
|
133
|
+
"pr-continuation": "tsx scripts/pr-continuation.ts",
|
|
132
134
|
"secretlint": "secretlint --secretlintignore .gitignore \"**/*\"",
|
|
133
135
|
"sort": "sort-package-json",
|
|
134
136
|
"task": "tsx scripts/run-tasks.ts",
|