rulesync 8.16.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-DOWXY74I.js → chunk-KDGHMXTY.js} +189 -107
- package/dist/cli/index.cjs +394 -312
- package/dist/cli/index.js +2 -2
- package/dist/index.cjs +189 -107
- package/dist/index.js +1 -1
- package/package.json +3 -1
package/dist/cli/index.cjs
CHANGED
|
@@ -7643,6 +7643,16 @@ var McpServerSchema = import_mini24.z.looseObject({
|
|
|
7643
7643
|
tools: import_mini24.z.optional(import_mini24.z.array(import_mini24.z.string())),
|
|
7644
7644
|
kiroAutoApprove: import_mini24.z.optional(import_mini24.z.array(import_mini24.z.string())),
|
|
7645
7645
|
kiroAutoBlock: import_mini24.z.optional(import_mini24.z.array(import_mini24.z.string())),
|
|
7646
|
+
// Codex CLI-specific: list of shell env var names that codex should pass
|
|
7647
|
+
// through from the user's environment to the MCP server process.
|
|
7648
|
+
// Distinct from `env` (a literal name→value map): `envVars` is a list of
|
|
7649
|
+
// variable NAMES whose values come from the user's shell at runtime.
|
|
7650
|
+
// Only honoured by the codex generator (renamed to `env_vars` in codex
|
|
7651
|
+
// TOML output, matching codex's native field name — see the
|
|
7652
|
+
// `enabledTools`→`enabled_tools` precedent in `codexcli-mcp.ts`).
|
|
7653
|
+
// Stripped by `RulesyncMcp.getMcpServers()` so it does not leak into
|
|
7654
|
+
// other tools' configs.
|
|
7655
|
+
envVars: import_mini24.z.optional(import_mini24.z.array(import_mini24.z.string())),
|
|
7646
7656
|
headers: import_mini24.z.optional(import_mini24.z.record(import_mini24.z.string(), import_mini24.z.string())),
|
|
7647
7657
|
enabledTools: import_mini24.z.optional(import_mini24.z.array(import_mini24.z.string())),
|
|
7648
7658
|
disabledTools: import_mini24.z.optional(import_mini24.z.array(import_mini24.z.string()))
|
|
@@ -7745,10 +7755,11 @@ var RulesyncMcp = class _RulesyncMcp extends RulesyncFile {
|
|
|
7745
7755
|
});
|
|
7746
7756
|
}
|
|
7747
7757
|
getMcpServers() {
|
|
7748
|
-
const
|
|
7758
|
+
const mcpServers = this.json.mcpServers ?? {};
|
|
7759
|
+
const entries = Object.entries(mcpServers);
|
|
7749
7760
|
return Object.fromEntries(
|
|
7750
7761
|
entries.map(([serverName, serverConfig]) => {
|
|
7751
|
-
return [serverName, (0, import_object.omit)(serverConfig, ["targets", "description", "exposed"])];
|
|
7762
|
+
return [serverName, (0, import_object.omit)(serverConfig, ["targets", "description", "exposed", "envVars"])];
|
|
7752
7763
|
})
|
|
7753
7764
|
);
|
|
7754
7765
|
}
|
|
@@ -7967,11 +7978,17 @@ var ClineMcp = class _ClineMcp extends ToolMcp {
|
|
|
7967
7978
|
rulesyncMcp,
|
|
7968
7979
|
validate = true
|
|
7969
7980
|
}) {
|
|
7981
|
+
const json = rulesyncMcp.getJson();
|
|
7982
|
+
const fileContent = JSON.stringify(
|
|
7983
|
+
{ ...json, mcpServers: rulesyncMcp.getMcpServers() },
|
|
7984
|
+
null,
|
|
7985
|
+
2
|
|
7986
|
+
);
|
|
7970
7987
|
return new _ClineMcp({
|
|
7971
7988
|
outputRoot,
|
|
7972
7989
|
relativeDirPath: this.getSettablePaths().relativeDirPath,
|
|
7973
7990
|
relativeFilePath: this.getSettablePaths().relativeFilePath,
|
|
7974
|
-
fileContent
|
|
7991
|
+
fileContent,
|
|
7975
7992
|
validate
|
|
7976
7993
|
});
|
|
7977
7994
|
}
|
|
@@ -7999,14 +8016,21 @@ var ClineMcp = class _ClineMcp extends ToolMcp {
|
|
|
7999
8016
|
// src/features/mcp/codexcli-mcp.ts
|
|
8000
8017
|
var import_node_path54 = require("path");
|
|
8001
8018
|
var smolToml3 = __toESM(require("smol-toml"), 1);
|
|
8019
|
+
var MAX_REMOVE_EMPTY_ENTRIES_DEPTH = 32;
|
|
8020
|
+
var PROTOTYPE_POLLUTION_KEYS = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
|
|
8021
|
+
function isPlainObject2(value) {
|
|
8022
|
+
if (!isRecord(value)) return false;
|
|
8023
|
+
const proto = Object.getPrototypeOf(value);
|
|
8024
|
+
return proto === null || proto === Object.prototype;
|
|
8025
|
+
}
|
|
8002
8026
|
function convertFromCodexFormat(codexMcp) {
|
|
8003
8027
|
const result = {};
|
|
8004
8028
|
for (const [name, config] of Object.entries(codexMcp)) {
|
|
8005
|
-
if (
|
|
8006
|
-
|
|
8007
|
-
}
|
|
8029
|
+
if (PROTOTYPE_POLLUTION_KEYS.has(name)) continue;
|
|
8030
|
+
if (!isRecord(config)) continue;
|
|
8008
8031
|
const converted = {};
|
|
8009
8032
|
for (const [key, value] of Object.entries(config)) {
|
|
8033
|
+
if (PROTOTYPE_POLLUTION_KEYS.has(key)) continue;
|
|
8010
8034
|
if (key === "enabled") {
|
|
8011
8035
|
if (value === false) {
|
|
8012
8036
|
converted["disabled"] = true;
|
|
@@ -8015,6 +8039,8 @@ function convertFromCodexFormat(codexMcp) {
|
|
|
8015
8039
|
converted["enabledTools"] = value;
|
|
8016
8040
|
} else if (key === "disabled_tools") {
|
|
8017
8041
|
converted["disabledTools"] = value;
|
|
8042
|
+
} else if (key === "env_vars") {
|
|
8043
|
+
converted["envVars"] = value;
|
|
8018
8044
|
} else {
|
|
8019
8045
|
converted[key] = value;
|
|
8020
8046
|
}
|
|
@@ -8026,8 +8052,11 @@ function convertFromCodexFormat(codexMcp) {
|
|
|
8026
8052
|
function convertToCodexFormat(mcpServers) {
|
|
8027
8053
|
const result = {};
|
|
8028
8054
|
for (const [name, config] of Object.entries(mcpServers)) {
|
|
8055
|
+
if (PROTOTYPE_POLLUTION_KEYS.has(name)) continue;
|
|
8056
|
+
if (!isRecord(config)) continue;
|
|
8029
8057
|
const converted = {};
|
|
8030
8058
|
for (const [key, value] of Object.entries(config)) {
|
|
8059
|
+
if (PROTOTYPE_POLLUTION_KEYS.has(key)) continue;
|
|
8031
8060
|
if (key === "disabled") {
|
|
8032
8061
|
if (value === true) {
|
|
8033
8062
|
converted["enabled"] = false;
|
|
@@ -8036,6 +8065,8 @@ function convertToCodexFormat(mcpServers) {
|
|
|
8036
8065
|
converted["enabled_tools"] = value;
|
|
8037
8066
|
} else if (key === "disabledTools") {
|
|
8038
8067
|
converted["disabled_tools"] = value;
|
|
8068
|
+
} else if (key === "envVars") {
|
|
8069
|
+
converted["env_vars"] = value;
|
|
8039
8070
|
} else {
|
|
8040
8071
|
converted[key] = value;
|
|
8041
8072
|
}
|
|
@@ -8107,6 +8138,14 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
|
|
|
8107
8138
|
const mcpServers = rulesyncMcp.getJson().mcpServers;
|
|
8108
8139
|
const converted = convertToCodexFormat(mcpServers);
|
|
8109
8140
|
const filteredMcpServers = this.removeEmptyEntries(converted);
|
|
8141
|
+
for (const name of Object.keys(converted)) {
|
|
8142
|
+
if (!Object.hasOwn(filteredMcpServers, name)) {
|
|
8143
|
+
warnWithFallback(
|
|
8144
|
+
void 0,
|
|
8145
|
+
`MCP server "${name}" had no non-empty configuration and was dropped from the codex CLI config`
|
|
8146
|
+
);
|
|
8147
|
+
}
|
|
8148
|
+
}
|
|
8110
8149
|
configToml["mcp_servers"] = filteredMcpServers;
|
|
8111
8150
|
return new _CodexcliMcp({
|
|
8112
8151
|
outputRoot,
|
|
@@ -8126,12 +8165,25 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
|
|
|
8126
8165
|
validate() {
|
|
8127
8166
|
return { success: true, error: null };
|
|
8128
8167
|
}
|
|
8129
|
-
static removeEmptyEntries(obj) {
|
|
8168
|
+
static removeEmptyEntries(obj, depth = 0) {
|
|
8130
8169
|
if (!obj) return {};
|
|
8170
|
+
if (depth > MAX_REMOVE_EMPTY_ENTRIES_DEPTH) {
|
|
8171
|
+
warnWithFallback(
|
|
8172
|
+
void 0,
|
|
8173
|
+
`removeEmptyEntries: maximum recursion depth (${MAX_REMOVE_EMPTY_ENTRIES_DEPTH}) exceeded; empty nested objects may remain`
|
|
8174
|
+
);
|
|
8175
|
+
return obj;
|
|
8176
|
+
}
|
|
8131
8177
|
const filtered = {};
|
|
8132
8178
|
for (const [key, value] of Object.entries(obj)) {
|
|
8179
|
+
if (PROTOTYPE_POLLUTION_KEYS.has(key)) continue;
|
|
8133
8180
|
if (value === null) continue;
|
|
8134
|
-
if (
|
|
8181
|
+
if (isPlainObject2(value)) {
|
|
8182
|
+
const cleaned = this.removeEmptyEntries(value, depth + 1);
|
|
8183
|
+
if (Object.keys(cleaned).length === 0) continue;
|
|
8184
|
+
filtered[key] = cleaned;
|
|
8185
|
+
continue;
|
|
8186
|
+
}
|
|
8135
8187
|
filtered[key] = value;
|
|
8136
8188
|
}
|
|
8137
8189
|
return filtered;
|
|
@@ -8508,8 +8560,7 @@ var CursorMcp = class _CursorMcp extends ToolMcp {
|
|
|
8508
8560
|
{ cause: error }
|
|
8509
8561
|
);
|
|
8510
8562
|
}
|
|
8511
|
-
const
|
|
8512
|
-
const mcpServers = isMcpServers(rulesyncJson.mcpServers) ? rulesyncJson.mcpServers : {};
|
|
8563
|
+
const mcpServers = rulesyncMcp.getMcpServers();
|
|
8513
8564
|
const transformedServers = convertEnvToCursorFormat(mcpServers);
|
|
8514
8565
|
const cursorConfig = { ...json, mcpServers: transformedServers };
|
|
8515
8566
|
return new _CursorMcp({
|
|
@@ -8678,9 +8729,9 @@ var FactorydroidMcp = class _FactorydroidMcp extends ToolMcp {
|
|
|
8678
8729
|
rulesyncMcp,
|
|
8679
8730
|
validate = true
|
|
8680
8731
|
}) {
|
|
8681
|
-
const
|
|
8732
|
+
const mcpServers = rulesyncMcp.getMcpServers();
|
|
8682
8733
|
const factorydroidConfig = {
|
|
8683
|
-
mcpServers
|
|
8734
|
+
mcpServers
|
|
8684
8735
|
};
|
|
8685
8736
|
const fileContent = JSON.stringify(factorydroidConfig, null, 2);
|
|
8686
8737
|
return new _FactorydroidMcp({
|
|
@@ -8766,7 +8817,7 @@ var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
|
|
|
8766
8817
|
JSON.stringify({ mcpServers: {} }, null, 2)
|
|
8767
8818
|
);
|
|
8768
8819
|
const json = JSON.parse(fileContent);
|
|
8769
|
-
const newJson = { ...json, mcpServers: rulesyncMcp.
|
|
8820
|
+
const newJson = { ...json, mcpServers: rulesyncMcp.getMcpServers() };
|
|
8770
8821
|
return new _GeminiCliMcp({
|
|
8771
8822
|
outputRoot,
|
|
8772
8823
|
relativeDirPath: paths.relativeDirPath,
|
|
@@ -8847,11 +8898,17 @@ var JunieMcp = class _JunieMcp extends ToolMcp {
|
|
|
8847
8898
|
rulesyncMcp,
|
|
8848
8899
|
validate = true
|
|
8849
8900
|
}) {
|
|
8901
|
+
const json = rulesyncMcp.getJson();
|
|
8902
|
+
const fileContent = JSON.stringify(
|
|
8903
|
+
{ ...json, mcpServers: rulesyncMcp.getMcpServers() },
|
|
8904
|
+
null,
|
|
8905
|
+
2
|
|
8906
|
+
);
|
|
8850
8907
|
return new _JunieMcp({
|
|
8851
8908
|
outputRoot,
|
|
8852
8909
|
relativeDirPath: this.getSettablePaths().relativeDirPath,
|
|
8853
8910
|
relativeFilePath: this.getSettablePaths().relativeFilePath,
|
|
8854
|
-
fileContent
|
|
8911
|
+
fileContent,
|
|
8855
8912
|
validate
|
|
8856
8913
|
});
|
|
8857
8914
|
}
|
|
@@ -9631,8 +9688,7 @@ var RovodevMcp = class _RovodevMcp extends ToolMcp {
|
|
|
9631
9688
|
JSON.stringify({ mcpServers: {} }, null, 2)
|
|
9632
9689
|
);
|
|
9633
9690
|
const json = parseRovodevMcpJson(fileContent, paths.relativeDirPath, paths.relativeFilePath);
|
|
9634
|
-
const
|
|
9635
|
-
const mcpServers = isMcpServers(rulesyncJson.mcpServers) ? rulesyncJson.mcpServers : {};
|
|
9691
|
+
const mcpServers = rulesyncMcp.getMcpServers();
|
|
9636
9692
|
const rovodevConfig = { ...json, mcpServers };
|
|
9637
9693
|
return new _RovodevMcp({
|
|
9638
9694
|
outputRoot,
|
|
@@ -9816,7 +9872,13 @@ var toolMcpFactories = /* @__PURE__ */ new Map([
|
|
|
9816
9872
|
class: KiloMcp,
|
|
9817
9873
|
meta: {
|
|
9818
9874
|
supportsProject: true,
|
|
9819
|
-
|
|
9875
|
+
// Kilo CLI reads global MCP from `~/.config/kilo/kilo.json` (or
|
|
9876
|
+
// `kilo.jsonc`). The path machinery in `KiloMcp.getSettablePaths`
|
|
9877
|
+
// already routes global mode to that location; only this flag
|
|
9878
|
+
// was gating it off. Kilo is an OpenCode fork and uses an
|
|
9879
|
+
// identical native MCP schema, so global parity with opencode
|
|
9880
|
+
// is the natural state.
|
|
9881
|
+
supportsGlobal: true,
|
|
9820
9882
|
supportsEnabledTools: false,
|
|
9821
9883
|
supportsDisabledTools: false
|
|
9822
9884
|
}
|
|
@@ -11057,7 +11119,8 @@ function convertRulesyncToCodexProfile({
|
|
|
11057
11119
|
filesystem,
|
|
11058
11120
|
projectRootFilesystem,
|
|
11059
11121
|
pattern,
|
|
11060
|
-
access: mapReadAction(action)
|
|
11122
|
+
access: mapReadAction(action),
|
|
11123
|
+
logger: logger5
|
|
11061
11124
|
});
|
|
11062
11125
|
}
|
|
11063
11126
|
continue;
|
|
@@ -11068,7 +11131,8 @@ function convertRulesyncToCodexProfile({
|
|
|
11068
11131
|
filesystem,
|
|
11069
11132
|
projectRootFilesystem,
|
|
11070
11133
|
pattern,
|
|
11071
|
-
access: mapWriteAction(action)
|
|
11134
|
+
access: mapWriteAction(action),
|
|
11135
|
+
logger: logger5
|
|
11072
11136
|
});
|
|
11073
11137
|
}
|
|
11074
11138
|
continue;
|
|
@@ -11090,6 +11154,11 @@ function convertRulesyncToCodexProfile({
|
|
|
11090
11154
|
);
|
|
11091
11155
|
}
|
|
11092
11156
|
if (Object.keys(projectRootFilesystem).length > 0) {
|
|
11157
|
+
if (typeof filesystem[CODEX_PROJECT_ROOTS_KEY] === "string") {
|
|
11158
|
+
logger5?.warn(
|
|
11159
|
+
`"${CODEX_PROJECT_ROOTS_KEY}" is set as a direct filesystem access rule in the permissions, but it will be overwritten by project-root rules. Consider removing the direct "${CODEX_PROJECT_ROOTS_KEY}" entry.`
|
|
11160
|
+
);
|
|
11161
|
+
}
|
|
11093
11162
|
if (Object.keys(projectRootFilesystem).some((pattern) => pattern.includes("**"))) {
|
|
11094
11163
|
filesystem.glob_scan_max_depth = CODEX_GLOB_SCAN_MAX_DEPTH;
|
|
11095
11164
|
}
|
|
@@ -11140,8 +11209,13 @@ function addFilesystemRule({
|
|
|
11140
11209
|
filesystem,
|
|
11141
11210
|
projectRootFilesystem,
|
|
11142
11211
|
pattern,
|
|
11143
|
-
access
|
|
11212
|
+
access,
|
|
11213
|
+
logger: logger5
|
|
11144
11214
|
}) {
|
|
11215
|
+
if (pattern.trim() === "") {
|
|
11216
|
+
logger5?.warn("Skipping empty pattern in filesystem permissions.");
|
|
11217
|
+
return;
|
|
11218
|
+
}
|
|
11145
11219
|
if (canBeCodexFilesystemRoot(pattern)) {
|
|
11146
11220
|
filesystem[pattern] = access;
|
|
11147
11221
|
return;
|
|
@@ -12925,7 +12999,7 @@ var PermissionsProcessor = class extends FeatureProcessor {
|
|
|
12925
12999
|
// src/features/rules/rules-processor.ts
|
|
12926
13000
|
var import_node_path154 = require("path");
|
|
12927
13001
|
var import_toon = require("@toon-format/toon");
|
|
12928
|
-
var
|
|
13002
|
+
var import_mini80 = require("zod/mini");
|
|
12929
13003
|
|
|
12930
13004
|
// src/constants/general.ts
|
|
12931
13005
|
var SKILL_FILE_NAME = "SKILL.md";
|
|
@@ -17877,7 +17951,7 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
|
|
|
17877
17951
|
|
|
17878
17952
|
// src/features/subagents/subagents-processor.ts
|
|
17879
17953
|
var import_node_path125 = require("path");
|
|
17880
|
-
var
|
|
17954
|
+
var import_mini73 = require("zod/mini");
|
|
17881
17955
|
|
|
17882
17956
|
// src/features/subagents/claudecode-subagent.ts
|
|
17883
17957
|
var import_node_path113 = require("path");
|
|
@@ -19037,6 +19111,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
|
|
|
19037
19111
|
|
|
19038
19112
|
// src/features/subagents/kilo-subagent.ts
|
|
19039
19113
|
var import_node_path121 = require("path");
|
|
19114
|
+
var import_mini71 = require("zod/mini");
|
|
19040
19115
|
|
|
19041
19116
|
// src/features/subagents/opencode-style-subagent.ts
|
|
19042
19117
|
var import_node_path120 = require("path");
|
|
@@ -19103,7 +19178,13 @@ var OpenCodeStyleSubagent = class extends ToolSubagent {
|
|
|
19103
19178
|
};
|
|
19104
19179
|
|
|
19105
19180
|
// src/features/subagents/kilo-subagent.ts
|
|
19106
|
-
var KiloSubagentFrontmatterSchema =
|
|
19181
|
+
var KiloSubagentFrontmatterSchema = import_mini71.z.looseObject({
|
|
19182
|
+
description: import_mini71.z.optional(import_mini71.z.string()),
|
|
19183
|
+
// Kilo's documented default for user-defined agents is "all":
|
|
19184
|
+
// available both as a top-level pick and as a subagent.
|
|
19185
|
+
mode: import_mini71.z._default(import_mini71.z.string(), "all"),
|
|
19186
|
+
name: import_mini71.z.optional(import_mini71.z.string())
|
|
19187
|
+
});
|
|
19107
19188
|
var KiloSubagent = class _KiloSubagent extends OpenCodeStyleSubagent {
|
|
19108
19189
|
getToolTarget() {
|
|
19109
19190
|
return "kilo";
|
|
@@ -19123,12 +19204,11 @@ var KiloSubagent = class _KiloSubagent extends OpenCodeStyleSubagent {
|
|
|
19123
19204
|
}) {
|
|
19124
19205
|
const rulesyncFrontmatter = rulesyncSubagent.getFrontmatter();
|
|
19125
19206
|
const kiloSection = rulesyncFrontmatter.kilo ?? {};
|
|
19126
|
-
const kiloFrontmatter = {
|
|
19207
|
+
const kiloFrontmatter = KiloSubagentFrontmatterSchema.parse({
|
|
19127
19208
|
...kiloSection,
|
|
19128
19209
|
description: rulesyncFrontmatter.description,
|
|
19129
|
-
mode: typeof kiloSection.mode === "string" ? kiloSection.mode : "subagent",
|
|
19130
19210
|
...rulesyncFrontmatter.name && { name: rulesyncFrontmatter.name }
|
|
19131
|
-
};
|
|
19211
|
+
});
|
|
19132
19212
|
const body = rulesyncSubagent.getBody();
|
|
19133
19213
|
const fileContent = stringifyFrontmatter(body, kiloFrontmatter);
|
|
19134
19214
|
const paths = this.getSettablePaths({ global });
|
|
@@ -19177,38 +19257,40 @@ var KiloSubagent = class _KiloSubagent extends OpenCodeStyleSubagent {
|
|
|
19177
19257
|
static forDeletion({
|
|
19178
19258
|
outputRoot = process.cwd(),
|
|
19179
19259
|
relativeDirPath,
|
|
19180
|
-
relativeFilePath
|
|
19260
|
+
relativeFilePath,
|
|
19261
|
+
global = false
|
|
19181
19262
|
}) {
|
|
19182
19263
|
return new _KiloSubagent({
|
|
19183
19264
|
outputRoot,
|
|
19184
19265
|
relativeDirPath,
|
|
19185
19266
|
relativeFilePath,
|
|
19186
|
-
frontmatter: { description: "", mode: "
|
|
19267
|
+
frontmatter: { description: "", mode: "all" },
|
|
19187
19268
|
body: "",
|
|
19188
19269
|
fileContent: "",
|
|
19189
|
-
validate: false
|
|
19270
|
+
validate: false,
|
|
19271
|
+
global
|
|
19190
19272
|
});
|
|
19191
19273
|
}
|
|
19192
19274
|
};
|
|
19193
19275
|
|
|
19194
19276
|
// src/features/subagents/kiro-subagent.ts
|
|
19195
19277
|
var import_node_path122 = require("path");
|
|
19196
|
-
var
|
|
19197
|
-
var KiroCliSubagentJsonSchema =
|
|
19198
|
-
name:
|
|
19199
|
-
description:
|
|
19200
|
-
prompt:
|
|
19201
|
-
tools:
|
|
19202
|
-
toolAliases:
|
|
19203
|
-
toolSettings:
|
|
19204
|
-
toolSchema:
|
|
19205
|
-
hooks:
|
|
19206
|
-
model:
|
|
19207
|
-
mcpServers:
|
|
19208
|
-
useLegacyMcpJson:
|
|
19209
|
-
resources:
|
|
19210
|
-
allowedTools:
|
|
19211
|
-
includeMcpJson:
|
|
19278
|
+
var import_mini72 = require("zod/mini");
|
|
19279
|
+
var KiroCliSubagentJsonSchema = import_mini72.z.looseObject({
|
|
19280
|
+
name: import_mini72.z.string(),
|
|
19281
|
+
description: import_mini72.z.optional(import_mini72.z.nullable(import_mini72.z.string())),
|
|
19282
|
+
prompt: import_mini72.z.optional(import_mini72.z.nullable(import_mini72.z.string())),
|
|
19283
|
+
tools: import_mini72.z.optional(import_mini72.z.nullable(import_mini72.z.array(import_mini72.z.string()))),
|
|
19284
|
+
toolAliases: import_mini72.z.optional(import_mini72.z.nullable(import_mini72.z.record(import_mini72.z.string(), import_mini72.z.string()))),
|
|
19285
|
+
toolSettings: import_mini72.z.optional(import_mini72.z.nullable(import_mini72.z.unknown())),
|
|
19286
|
+
toolSchema: import_mini72.z.optional(import_mini72.z.nullable(import_mini72.z.unknown())),
|
|
19287
|
+
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())))),
|
|
19288
|
+
model: import_mini72.z.optional(import_mini72.z.nullable(import_mini72.z.string())),
|
|
19289
|
+
mcpServers: import_mini72.z.optional(import_mini72.z.nullable(import_mini72.z.record(import_mini72.z.string(), import_mini72.z.unknown()))),
|
|
19290
|
+
useLegacyMcpJson: import_mini72.z.optional(import_mini72.z.nullable(import_mini72.z.boolean())),
|
|
19291
|
+
resources: import_mini72.z.optional(import_mini72.z.nullable(import_mini72.z.array(import_mini72.z.string()))),
|
|
19292
|
+
allowedTools: import_mini72.z.optional(import_mini72.z.nullable(import_mini72.z.array(import_mini72.z.string()))),
|
|
19293
|
+
includeMcpJson: import_mini72.z.optional(import_mini72.z.nullable(import_mini72.z.boolean()))
|
|
19212
19294
|
});
|
|
19213
19295
|
var KiroSubagent = class _KiroSubagent extends ToolSubagent {
|
|
19214
19296
|
body;
|
|
@@ -19574,7 +19656,7 @@ var subagentsProcessorToolTargetTuple = [
|
|
|
19574
19656
|
"rovodev",
|
|
19575
19657
|
"takt"
|
|
19576
19658
|
];
|
|
19577
|
-
var SubagentsProcessorToolTargetSchema =
|
|
19659
|
+
var SubagentsProcessorToolTargetSchema = import_mini73.z.enum(subagentsProcessorToolTargetTuple);
|
|
19578
19660
|
var toolSubagentFactories = /* @__PURE__ */ new Map([
|
|
19579
19661
|
[
|
|
19580
19662
|
"agentsmd",
|
|
@@ -19903,48 +19985,48 @@ var import_node_path127 = require("path");
|
|
|
19903
19985
|
|
|
19904
19986
|
// src/features/rules/rulesync-rule.ts
|
|
19905
19987
|
var import_node_path126 = require("path");
|
|
19906
|
-
var
|
|
19907
|
-
var RulesyncRuleFrontmatterSchema =
|
|
19908
|
-
root:
|
|
19909
|
-
localRoot:
|
|
19910
|
-
targets:
|
|
19911
|
-
description:
|
|
19912
|
-
globs:
|
|
19913
|
-
agentsmd:
|
|
19914
|
-
|
|
19988
|
+
var import_mini74 = require("zod/mini");
|
|
19989
|
+
var RulesyncRuleFrontmatterSchema = import_mini74.z.object({
|
|
19990
|
+
root: import_mini74.z.optional(import_mini74.z.boolean()),
|
|
19991
|
+
localRoot: import_mini74.z.optional(import_mini74.z.boolean()),
|
|
19992
|
+
targets: import_mini74.z._default(RulesyncTargetsSchema, ["*"]),
|
|
19993
|
+
description: import_mini74.z.optional(import_mini74.z.string()),
|
|
19994
|
+
globs: import_mini74.z.optional(import_mini74.z.array(import_mini74.z.string())),
|
|
19995
|
+
agentsmd: import_mini74.z.optional(
|
|
19996
|
+
import_mini74.z.looseObject({
|
|
19915
19997
|
// @example "path/to/subproject"
|
|
19916
|
-
subprojectPath:
|
|
19998
|
+
subprojectPath: import_mini74.z.optional(import_mini74.z.string())
|
|
19917
19999
|
})
|
|
19918
20000
|
),
|
|
19919
|
-
claudecode:
|
|
19920
|
-
|
|
20001
|
+
claudecode: import_mini74.z.optional(
|
|
20002
|
+
import_mini74.z.looseObject({
|
|
19921
20003
|
// Glob patterns for conditional rules (takes precedence over globs)
|
|
19922
20004
|
// @example ["src/**/*.ts", "tests/**/*.test.ts"]
|
|
19923
|
-
paths:
|
|
20005
|
+
paths: import_mini74.z.optional(import_mini74.z.array(import_mini74.z.string()))
|
|
19924
20006
|
})
|
|
19925
20007
|
),
|
|
19926
|
-
cursor:
|
|
19927
|
-
|
|
19928
|
-
alwaysApply:
|
|
19929
|
-
description:
|
|
19930
|
-
globs:
|
|
20008
|
+
cursor: import_mini74.z.optional(
|
|
20009
|
+
import_mini74.z.looseObject({
|
|
20010
|
+
alwaysApply: import_mini74.z.optional(import_mini74.z.boolean()),
|
|
20011
|
+
description: import_mini74.z.optional(import_mini74.z.string()),
|
|
20012
|
+
globs: import_mini74.z.optional(import_mini74.z.array(import_mini74.z.string()))
|
|
19931
20013
|
})
|
|
19932
20014
|
),
|
|
19933
|
-
copilot:
|
|
19934
|
-
|
|
19935
|
-
excludeAgent:
|
|
20015
|
+
copilot: import_mini74.z.optional(
|
|
20016
|
+
import_mini74.z.looseObject({
|
|
20017
|
+
excludeAgent: import_mini74.z.optional(import_mini74.z.union([import_mini74.z.literal("code-review"), import_mini74.z.literal("coding-agent")]))
|
|
19936
20018
|
})
|
|
19937
20019
|
),
|
|
19938
|
-
antigravity:
|
|
19939
|
-
|
|
19940
|
-
trigger:
|
|
19941
|
-
globs:
|
|
20020
|
+
antigravity: import_mini74.z.optional(
|
|
20021
|
+
import_mini74.z.looseObject({
|
|
20022
|
+
trigger: import_mini74.z.optional(import_mini74.z.string()),
|
|
20023
|
+
globs: import_mini74.z.optional(import_mini74.z.array(import_mini74.z.string()))
|
|
19942
20024
|
})
|
|
19943
20025
|
),
|
|
19944
|
-
takt:
|
|
19945
|
-
|
|
20026
|
+
takt: import_mini74.z.optional(
|
|
20027
|
+
import_mini74.z.looseObject({
|
|
19946
20028
|
// Rename the emitted file stem (e.g. "coder.md" → "{name}.md").
|
|
19947
|
-
name:
|
|
20029
|
+
name: import_mini74.z.optional(import_mini74.z.string())
|
|
19948
20030
|
})
|
|
19949
20031
|
)
|
|
19950
20032
|
});
|
|
@@ -20245,20 +20327,20 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
|
|
|
20245
20327
|
|
|
20246
20328
|
// src/features/rules/antigravity-rule.ts
|
|
20247
20329
|
var import_node_path129 = require("path");
|
|
20248
|
-
var
|
|
20249
|
-
var AntigravityRuleFrontmatterSchema =
|
|
20250
|
-
trigger:
|
|
20251
|
-
|
|
20252
|
-
|
|
20253
|
-
|
|
20254
|
-
|
|
20255
|
-
|
|
20256
|
-
|
|
20330
|
+
var import_mini75 = require("zod/mini");
|
|
20331
|
+
var AntigravityRuleFrontmatterSchema = import_mini75.z.looseObject({
|
|
20332
|
+
trigger: import_mini75.z.optional(
|
|
20333
|
+
import_mini75.z.union([
|
|
20334
|
+
import_mini75.z.literal("always_on"),
|
|
20335
|
+
import_mini75.z.literal("glob"),
|
|
20336
|
+
import_mini75.z.literal("manual"),
|
|
20337
|
+
import_mini75.z.literal("model_decision"),
|
|
20338
|
+
import_mini75.z.string()
|
|
20257
20339
|
// accepts any string for forward compatibility
|
|
20258
20340
|
])
|
|
20259
20341
|
),
|
|
20260
|
-
globs:
|
|
20261
|
-
description:
|
|
20342
|
+
globs: import_mini75.z.optional(import_mini75.z.string()),
|
|
20343
|
+
description: import_mini75.z.optional(import_mini75.z.string())
|
|
20262
20344
|
});
|
|
20263
20345
|
function parseGlobsString(globs) {
|
|
20264
20346
|
if (!globs) {
|
|
@@ -20845,9 +20927,9 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
|
|
|
20845
20927
|
|
|
20846
20928
|
// src/features/rules/claudecode-rule.ts
|
|
20847
20929
|
var import_node_path133 = require("path");
|
|
20848
|
-
var
|
|
20849
|
-
var ClaudecodeRuleFrontmatterSchema =
|
|
20850
|
-
paths:
|
|
20930
|
+
var import_mini76 = require("zod/mini");
|
|
20931
|
+
var ClaudecodeRuleFrontmatterSchema = import_mini76.z.object({
|
|
20932
|
+
paths: import_mini76.z.optional(import_mini76.z.array(import_mini76.z.string()))
|
|
20851
20933
|
});
|
|
20852
20934
|
var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
|
|
20853
20935
|
frontmatter;
|
|
@@ -21063,9 +21145,9 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
|
|
|
21063
21145
|
|
|
21064
21146
|
// src/features/rules/cline-rule.ts
|
|
21065
21147
|
var import_node_path134 = require("path");
|
|
21066
|
-
var
|
|
21067
|
-
var ClineRuleFrontmatterSchema =
|
|
21068
|
-
description:
|
|
21148
|
+
var import_mini77 = require("zod/mini");
|
|
21149
|
+
var ClineRuleFrontmatterSchema = import_mini77.z.object({
|
|
21150
|
+
description: import_mini77.z.string()
|
|
21069
21151
|
});
|
|
21070
21152
|
var ClineRule = class _ClineRule extends ToolRule {
|
|
21071
21153
|
static getSettablePaths(_options = {}) {
|
|
@@ -21244,11 +21326,11 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
|
|
|
21244
21326
|
|
|
21245
21327
|
// src/features/rules/copilot-rule.ts
|
|
21246
21328
|
var import_node_path136 = require("path");
|
|
21247
|
-
var
|
|
21248
|
-
var CopilotRuleFrontmatterSchema =
|
|
21249
|
-
description:
|
|
21250
|
-
applyTo:
|
|
21251
|
-
excludeAgent:
|
|
21329
|
+
var import_mini78 = require("zod/mini");
|
|
21330
|
+
var CopilotRuleFrontmatterSchema = import_mini78.z.object({
|
|
21331
|
+
description: import_mini78.z.optional(import_mini78.z.string()),
|
|
21332
|
+
applyTo: import_mini78.z.optional(import_mini78.z.string()),
|
|
21333
|
+
excludeAgent: import_mini78.z.optional(import_mini78.z.union([import_mini78.z.literal("code-review"), import_mini78.z.literal("coding-agent")]))
|
|
21252
21334
|
});
|
|
21253
21335
|
var normalizeRelativePath = (path5) => path5.replace(/\\/g, "/").replace(/\/+/g, "/");
|
|
21254
21336
|
var sameRelativePath = (leftDir, leftFile, rightDir, rightFile) => normalizeRelativePath((0, import_node_path136.join)(leftDir, leftFile)) === normalizeRelativePath((0, import_node_path136.join)(rightDir, rightFile));
|
|
@@ -21502,11 +21584,11 @@ var CopilotcliRule = class _CopilotcliRule extends CopilotRule {
|
|
|
21502
21584
|
|
|
21503
21585
|
// src/features/rules/cursor-rule.ts
|
|
21504
21586
|
var import_node_path137 = require("path");
|
|
21505
|
-
var
|
|
21506
|
-
var CursorRuleFrontmatterSchema =
|
|
21507
|
-
description:
|
|
21508
|
-
globs:
|
|
21509
|
-
alwaysApply:
|
|
21587
|
+
var import_mini79 = require("zod/mini");
|
|
21588
|
+
var CursorRuleFrontmatterSchema = import_mini79.z.object({
|
|
21589
|
+
description: import_mini79.z.optional(import_mini79.z.string()),
|
|
21590
|
+
globs: import_mini79.z.optional(import_mini79.z.string()),
|
|
21591
|
+
alwaysApply: import_mini79.z.optional(import_mini79.z.boolean())
|
|
21510
21592
|
});
|
|
21511
21593
|
var CursorRule = class _CursorRule extends ToolRule {
|
|
21512
21594
|
frontmatter;
|
|
@@ -23389,11 +23471,11 @@ var rulesProcessorToolTargets = [
|
|
|
23389
23471
|
"warp",
|
|
23390
23472
|
"windsurf"
|
|
23391
23473
|
];
|
|
23392
|
-
var RulesProcessorToolTargetSchema =
|
|
23474
|
+
var RulesProcessorToolTargetSchema = import_mini80.z.enum(rulesProcessorToolTargets);
|
|
23393
23475
|
var formatRulePaths = (rules) => rules.map((r) => (0, import_node_path154.join)(r.getRelativeDirPath(), r.getRelativeFilePath())).join(", ");
|
|
23394
|
-
var RulesFeatureOptionsSchema =
|
|
23395
|
-
ruleDiscoveryMode:
|
|
23396
|
-
includeLocalRoot:
|
|
23476
|
+
var RulesFeatureOptionsSchema = import_mini80.z.looseObject({
|
|
23477
|
+
ruleDiscoveryMode: import_mini80.z.optional(import_mini80.z.enum(["none", "explicit"])),
|
|
23478
|
+
includeLocalRoot: import_mini80.z.optional(import_mini80.z.boolean())
|
|
23397
23479
|
});
|
|
23398
23480
|
var resolveRuleDiscoveryMode = ({
|
|
23399
23481
|
defaultMode,
|
|
@@ -23414,8 +23496,8 @@ var resolveRuleDiscoveryMode = ({
|
|
|
23414
23496
|
}
|
|
23415
23497
|
return parsed.data.ruleDiscoveryMode === "none" ? "auto" : "toon";
|
|
23416
23498
|
};
|
|
23417
|
-
var IncludeLocalRootSchema =
|
|
23418
|
-
includeLocalRoot:
|
|
23499
|
+
var IncludeLocalRootSchema = import_mini80.z.looseObject({
|
|
23500
|
+
includeLocalRoot: import_mini80.z.optional(import_mini80.z.boolean())
|
|
23419
23501
|
});
|
|
23420
23502
|
var resolveIncludeLocalRoot = (options) => {
|
|
23421
23503
|
if (!options) return true;
|
|
@@ -24694,51 +24776,51 @@ var import_request_error = require("@octokit/request-error");
|
|
|
24694
24776
|
var import_rest = require("@octokit/rest");
|
|
24695
24777
|
|
|
24696
24778
|
// src/types/fetch.ts
|
|
24697
|
-
var
|
|
24779
|
+
var import_mini82 = require("zod/mini");
|
|
24698
24780
|
|
|
24699
24781
|
// src/types/fetch-targets.ts
|
|
24700
|
-
var
|
|
24782
|
+
var import_mini81 = require("zod/mini");
|
|
24701
24783
|
var ALL_FETCH_TARGETS = ["rulesync", ...ALL_TOOL_TARGETS];
|
|
24702
|
-
var FetchTargetSchema =
|
|
24784
|
+
var FetchTargetSchema = import_mini81.z.enum(ALL_FETCH_TARGETS);
|
|
24703
24785
|
|
|
24704
24786
|
// src/types/fetch.ts
|
|
24705
|
-
var ConflictStrategySchema =
|
|
24706
|
-
var GitHubFileTypeSchema =
|
|
24707
|
-
var GitHubFileEntrySchema =
|
|
24708
|
-
name:
|
|
24709
|
-
path:
|
|
24710
|
-
sha:
|
|
24711
|
-
size:
|
|
24787
|
+
var ConflictStrategySchema = import_mini82.z.enum(["skip", "overwrite"]);
|
|
24788
|
+
var GitHubFileTypeSchema = import_mini82.z.enum(["file", "dir", "symlink", "submodule"]);
|
|
24789
|
+
var GitHubFileEntrySchema = import_mini82.z.looseObject({
|
|
24790
|
+
name: import_mini82.z.string(),
|
|
24791
|
+
path: import_mini82.z.string(),
|
|
24792
|
+
sha: import_mini82.z.string(),
|
|
24793
|
+
size: import_mini82.z.number(),
|
|
24712
24794
|
type: GitHubFileTypeSchema,
|
|
24713
|
-
download_url:
|
|
24795
|
+
download_url: import_mini82.z.nullable(import_mini82.z.string())
|
|
24714
24796
|
});
|
|
24715
|
-
var FetchOptionsSchema =
|
|
24716
|
-
target:
|
|
24717
|
-
features:
|
|
24718
|
-
ref:
|
|
24719
|
-
path:
|
|
24720
|
-
output:
|
|
24721
|
-
conflict:
|
|
24722
|
-
token:
|
|
24723
|
-
verbose:
|
|
24724
|
-
silent:
|
|
24797
|
+
var FetchOptionsSchema = import_mini82.z.looseObject({
|
|
24798
|
+
target: import_mini82.z.optional(FetchTargetSchema),
|
|
24799
|
+
features: import_mini82.z.optional(import_mini82.z.array(import_mini82.z.enum(ALL_FEATURES_WITH_WILDCARD))),
|
|
24800
|
+
ref: import_mini82.z.optional(import_mini82.z.string()),
|
|
24801
|
+
path: import_mini82.z.optional(import_mini82.z.string()),
|
|
24802
|
+
output: import_mini82.z.optional(import_mini82.z.string()),
|
|
24803
|
+
conflict: import_mini82.z.optional(ConflictStrategySchema),
|
|
24804
|
+
token: import_mini82.z.optional(import_mini82.z.string()),
|
|
24805
|
+
verbose: import_mini82.z.optional(import_mini82.z.boolean()),
|
|
24806
|
+
silent: import_mini82.z.optional(import_mini82.z.boolean())
|
|
24725
24807
|
});
|
|
24726
|
-
var FetchFileStatusSchema =
|
|
24727
|
-
var GitHubRepoInfoSchema =
|
|
24728
|
-
default_branch:
|
|
24729
|
-
private:
|
|
24808
|
+
var FetchFileStatusSchema = import_mini82.z.enum(["created", "overwritten", "skipped"]);
|
|
24809
|
+
var GitHubRepoInfoSchema = import_mini82.z.looseObject({
|
|
24810
|
+
default_branch: import_mini82.z.string(),
|
|
24811
|
+
private: import_mini82.z.boolean()
|
|
24730
24812
|
});
|
|
24731
|
-
var GitHubReleaseAssetSchema =
|
|
24732
|
-
name:
|
|
24733
|
-
browser_download_url:
|
|
24734
|
-
size:
|
|
24813
|
+
var GitHubReleaseAssetSchema = import_mini82.z.looseObject({
|
|
24814
|
+
name: import_mini82.z.string(),
|
|
24815
|
+
browser_download_url: import_mini82.z.string(),
|
|
24816
|
+
size: import_mini82.z.number()
|
|
24735
24817
|
});
|
|
24736
|
-
var GitHubReleaseSchema =
|
|
24737
|
-
tag_name:
|
|
24738
|
-
name:
|
|
24739
|
-
prerelease:
|
|
24740
|
-
draft:
|
|
24741
|
-
assets:
|
|
24818
|
+
var GitHubReleaseSchema = import_mini82.z.looseObject({
|
|
24819
|
+
tag_name: import_mini82.z.string(),
|
|
24820
|
+
name: import_mini82.z.nullable(import_mini82.z.string()),
|
|
24821
|
+
prerelease: import_mini82.z.boolean(),
|
|
24822
|
+
draft: import_mini82.z.boolean(),
|
|
24823
|
+
assets: import_mini82.z.array(GitHubReleaseAssetSchema)
|
|
24742
24824
|
});
|
|
24743
24825
|
|
|
24744
24826
|
// src/lib/github-client.ts
|
|
@@ -25039,9 +25121,9 @@ async function listDirectoryRecursive(params) {
|
|
|
25039
25121
|
}
|
|
25040
25122
|
|
|
25041
25123
|
// src/types/git-provider.ts
|
|
25042
|
-
var
|
|
25124
|
+
var import_mini83 = require("zod/mini");
|
|
25043
25125
|
var ALL_GIT_PROVIDERS = ["github", "gitlab"];
|
|
25044
|
-
var GitProviderSchema =
|
|
25126
|
+
var GitProviderSchema = import_mini83.z.enum(ALL_GIT_PROVIDERS);
|
|
25045
25127
|
|
|
25046
25128
|
// src/lib/source-parser.ts
|
|
25047
25129
|
var GITHUB_HOSTS = /* @__PURE__ */ new Set(["github.com", "www.github.com"]);
|
|
@@ -27324,40 +27406,40 @@ var import_promise2 = require("es-toolkit/promise");
|
|
|
27324
27406
|
// src/lib/apm/apm-lock.ts
|
|
27325
27407
|
var import_node_path159 = require("path");
|
|
27326
27408
|
var import_js_yaml3 = require("js-yaml");
|
|
27327
|
-
var
|
|
27409
|
+
var import_mini84 = require("zod/mini");
|
|
27328
27410
|
var APM_LOCKFILE_FILE_NAME = "rulesync-apm.lock.yaml";
|
|
27329
27411
|
var APM_LOCKFILE_VERSION = "1";
|
|
27330
27412
|
var RULESYNC_CONTENT_HASH_REGEX = /^sha256:[0-9a-f]{64}$/;
|
|
27331
|
-
var ApmLockDependencySchema =
|
|
27332
|
-
repo_url:
|
|
27333
|
-
resolved_commit: (0,
|
|
27334
|
-
|
|
27413
|
+
var ApmLockDependencySchema = import_mini84.z.looseObject({
|
|
27414
|
+
repo_url: import_mini84.z.string(),
|
|
27415
|
+
resolved_commit: (0, import_mini84.optional)(
|
|
27416
|
+
import_mini84.z.string().check((0, import_mini84.refine)((v) => /^[0-9a-f]{40}$/.test(v), "resolved_commit must be a 40-char hex SHA"))
|
|
27335
27417
|
),
|
|
27336
|
-
resolved_ref: (0,
|
|
27337
|
-
version: (0,
|
|
27338
|
-
depth:
|
|
27339
|
-
resolved_by: (0,
|
|
27340
|
-
package_type:
|
|
27418
|
+
resolved_ref: (0, import_mini84.optional)(import_mini84.z.string()),
|
|
27419
|
+
version: (0, import_mini84.optional)(import_mini84.z.string()),
|
|
27420
|
+
depth: import_mini84.z.int().check((0, import_mini84.nonnegative)()),
|
|
27421
|
+
resolved_by: (0, import_mini84.optional)(import_mini84.z.string()),
|
|
27422
|
+
package_type: import_mini84.z.string(),
|
|
27341
27423
|
// Intentionally loose: the upstream `apm` CLI may write content_hash values
|
|
27342
27424
|
// that do not match the strict rulesync format. We accept any string on read
|
|
27343
27425
|
// so that a lockfile produced by `apm` round-trips through rulesync without
|
|
27344
27426
|
// throwing. Rulesync itself always writes values matching
|
|
27345
27427
|
// `RULESYNC_CONTENT_HASH_REGEX`, and `--frozen` integrity checks only
|
|
27346
27428
|
// enforce the comparison when the recorded hash matches that shape.
|
|
27347
|
-
content_hash: (0,
|
|
27348
|
-
is_dev: (0,
|
|
27349
|
-
deployed_files:
|
|
27350
|
-
source: (0,
|
|
27351
|
-
local_path: (0,
|
|
27352
|
-
virtual_path: (0,
|
|
27353
|
-
is_virtual: (0,
|
|
27429
|
+
content_hash: (0, import_mini84.optional)(import_mini84.z.string()),
|
|
27430
|
+
is_dev: (0, import_mini84.optional)(import_mini84.z.boolean()),
|
|
27431
|
+
deployed_files: import_mini84.z.array(import_mini84.z.string()),
|
|
27432
|
+
source: (0, import_mini84.optional)(import_mini84.z.string()),
|
|
27433
|
+
local_path: (0, import_mini84.optional)(import_mini84.z.string()),
|
|
27434
|
+
virtual_path: (0, import_mini84.optional)(import_mini84.z.string()),
|
|
27435
|
+
is_virtual: (0, import_mini84.optional)(import_mini84.z.boolean())
|
|
27354
27436
|
});
|
|
27355
|
-
var ApmLockSchema =
|
|
27356
|
-
lockfile_version:
|
|
27357
|
-
generated_at:
|
|
27358
|
-
apm_version:
|
|
27359
|
-
dependencies:
|
|
27360
|
-
mcp_servers: (0,
|
|
27437
|
+
var ApmLockSchema = import_mini84.z.looseObject({
|
|
27438
|
+
lockfile_version: import_mini84.z.literal("1"),
|
|
27439
|
+
generated_at: import_mini84.z.string(),
|
|
27440
|
+
apm_version: import_mini84.z.string(),
|
|
27441
|
+
dependencies: import_mini84.z.array(ApmLockDependencySchema),
|
|
27442
|
+
mcp_servers: (0, import_mini84.optional)(import_mini84.z.array(import_mini84.z.string()))
|
|
27361
27443
|
});
|
|
27362
27444
|
function getApmLockPath(projectRoot) {
|
|
27363
27445
|
return (0, import_node_path159.join)(projectRoot, APM_LOCKFILE_FILE_NAME);
|
|
@@ -27417,22 +27499,22 @@ function findApmLockDependency(lock, repoUrl) {
|
|
|
27417
27499
|
// src/lib/apm/apm-manifest.ts
|
|
27418
27500
|
var import_node_path160 = require("path");
|
|
27419
27501
|
var import_js_yaml4 = require("js-yaml");
|
|
27420
|
-
var
|
|
27502
|
+
var import_mini85 = require("zod/mini");
|
|
27421
27503
|
var APM_MANIFEST_FILE_NAME = "apm.yml";
|
|
27422
|
-
var ApmObjectDependencySchema =
|
|
27423
|
-
git: (0,
|
|
27424
|
-
source: (0,
|
|
27425
|
-
path: (0,
|
|
27426
|
-
ref: (0,
|
|
27427
|
-
alias: (0,
|
|
27504
|
+
var ApmObjectDependencySchema = import_mini85.z.looseObject({
|
|
27505
|
+
git: (0, import_mini85.optional)(import_mini85.z.string()),
|
|
27506
|
+
source: (0, import_mini85.optional)(import_mini85.z.string()),
|
|
27507
|
+
path: (0, import_mini85.optional)(import_mini85.z.string()),
|
|
27508
|
+
ref: (0, import_mini85.optional)(import_mini85.z.string()),
|
|
27509
|
+
alias: (0, import_mini85.optional)(import_mini85.z.string())
|
|
27428
27510
|
});
|
|
27429
|
-
var ApmDependencyInputSchema =
|
|
27430
|
-
var ApmManifestSchema =
|
|
27431
|
-
name: (0,
|
|
27432
|
-
version: (0,
|
|
27433
|
-
dependencies: (0,
|
|
27434
|
-
|
|
27435
|
-
apm: (0,
|
|
27511
|
+
var ApmDependencyInputSchema = import_mini85.z.union([import_mini85.z.string(), ApmObjectDependencySchema]);
|
|
27512
|
+
var ApmManifestSchema = import_mini85.z.looseObject({
|
|
27513
|
+
name: (0, import_mini85.optional)(import_mini85.z.string()),
|
|
27514
|
+
version: (0, import_mini85.optional)(import_mini85.z.string()),
|
|
27515
|
+
dependencies: (0, import_mini85.optional)(
|
|
27516
|
+
import_mini85.z.looseObject({
|
|
27517
|
+
apm: (0, import_mini85.optional)(import_mini85.z.array(ApmDependencyInputSchema))
|
|
27436
27518
|
})
|
|
27437
27519
|
)
|
|
27438
27520
|
});
|
|
@@ -27954,29 +28036,29 @@ ${rest}`;
|
|
|
27954
28036
|
// src/lib/gh/gh-lock.ts
|
|
27955
28037
|
var import_node_path162 = require("path");
|
|
27956
28038
|
var import_js_yaml6 = require("js-yaml");
|
|
27957
|
-
var
|
|
28039
|
+
var import_mini86 = require("zod/mini");
|
|
27958
28040
|
var GH_LOCKFILE_FILE_NAME = "rulesync-gh.lock.yaml";
|
|
27959
28041
|
var GH_LOCKFILE_VERSION = "1";
|
|
27960
28042
|
var RULESYNC_CONTENT_HASH_REGEX2 = /^sha256:[0-9a-f]{64}$/;
|
|
27961
|
-
var ScopeSchema =
|
|
27962
|
-
var GhLockInstallationSchema =
|
|
27963
|
-
source:
|
|
27964
|
-
owner:
|
|
27965
|
-
repo:
|
|
27966
|
-
agent:
|
|
28043
|
+
var ScopeSchema = import_mini86.z.enum(["project", "user"]);
|
|
28044
|
+
var GhLockInstallationSchema = import_mini86.z.looseObject({
|
|
28045
|
+
source: import_mini86.z.string(),
|
|
28046
|
+
owner: import_mini86.z.string(),
|
|
28047
|
+
repo: import_mini86.z.string(),
|
|
28048
|
+
agent: import_mini86.z.string(),
|
|
27967
28049
|
scope: ScopeSchema,
|
|
27968
|
-
skill:
|
|
27969
|
-
requested_ref: (0,
|
|
27970
|
-
resolved_ref:
|
|
27971
|
-
resolved_commit:
|
|
27972
|
-
install_dir:
|
|
27973
|
-
deployed_files:
|
|
27974
|
-
content_hash: (0,
|
|
28050
|
+
skill: import_mini86.z.string(),
|
|
28051
|
+
requested_ref: (0, import_mini86.optional)(import_mini86.z.string()),
|
|
28052
|
+
resolved_ref: import_mini86.z.string(),
|
|
28053
|
+
resolved_commit: import_mini86.z.string().check((0, import_mini86.refine)((v) => /^[0-9a-f]{40}$/.test(v), "resolved_commit must be a 40-char hex SHA")),
|
|
28054
|
+
install_dir: import_mini86.z.string(),
|
|
28055
|
+
deployed_files: import_mini86.z.array(import_mini86.z.string()),
|
|
28056
|
+
content_hash: (0, import_mini86.optional)(import_mini86.z.string())
|
|
27975
28057
|
});
|
|
27976
|
-
var GhLockSchema =
|
|
27977
|
-
lockfile_version:
|
|
27978
|
-
generated_at:
|
|
27979
|
-
installations:
|
|
28058
|
+
var GhLockSchema = import_mini86.z.looseObject({
|
|
28059
|
+
lockfile_version: import_mini86.z.literal("1"),
|
|
28060
|
+
generated_at: import_mini86.z.string(),
|
|
28061
|
+
installations: import_mini86.z.array(GhLockInstallationSchema)
|
|
27980
28062
|
});
|
|
27981
28063
|
function getGhLockPath(projectRoot) {
|
|
27982
28064
|
return (0, import_node_path162.join)(projectRoot, GH_LOCKFILE_FILE_NAME);
|
|
@@ -28661,27 +28743,27 @@ async function walkDirectory(dir, outputRoot, depth = 0, ctx = { totalFiles: 0,
|
|
|
28661
28743
|
// src/lib/sources-lock.ts
|
|
28662
28744
|
var import_node_crypto3 = require("crypto");
|
|
28663
28745
|
var import_node_path166 = require("path");
|
|
28664
|
-
var
|
|
28746
|
+
var import_mini87 = require("zod/mini");
|
|
28665
28747
|
var LOCKFILE_VERSION = 1;
|
|
28666
|
-
var LockedSkillSchema =
|
|
28667
|
-
integrity:
|
|
28748
|
+
var LockedSkillSchema = import_mini87.z.object({
|
|
28749
|
+
integrity: import_mini87.z.string()
|
|
28668
28750
|
});
|
|
28669
|
-
var LockedSourceSchema =
|
|
28670
|
-
requestedRef: (0,
|
|
28671
|
-
resolvedRef:
|
|
28672
|
-
resolvedAt: (0,
|
|
28673
|
-
skills:
|
|
28751
|
+
var LockedSourceSchema = import_mini87.z.object({
|
|
28752
|
+
requestedRef: (0, import_mini87.optional)(import_mini87.z.string()),
|
|
28753
|
+
resolvedRef: import_mini87.z.string().check((0, import_mini87.refine)((v) => /^[0-9a-f]{40}$/.test(v), "resolvedRef must be a 40-character hex SHA")),
|
|
28754
|
+
resolvedAt: (0, import_mini87.optional)(import_mini87.z.string()),
|
|
28755
|
+
skills: import_mini87.z.record(import_mini87.z.string(), LockedSkillSchema)
|
|
28674
28756
|
});
|
|
28675
|
-
var SourcesLockSchema =
|
|
28676
|
-
lockfileVersion:
|
|
28677
|
-
sources:
|
|
28757
|
+
var SourcesLockSchema = import_mini87.z.object({
|
|
28758
|
+
lockfileVersion: import_mini87.z.number(),
|
|
28759
|
+
sources: import_mini87.z.record(import_mini87.z.string(), LockedSourceSchema)
|
|
28678
28760
|
});
|
|
28679
|
-
var LegacyLockedSourceSchema =
|
|
28680
|
-
resolvedRef:
|
|
28681
|
-
skills:
|
|
28761
|
+
var LegacyLockedSourceSchema = import_mini87.z.object({
|
|
28762
|
+
resolvedRef: import_mini87.z.string(),
|
|
28763
|
+
skills: import_mini87.z.array(import_mini87.z.string())
|
|
28682
28764
|
});
|
|
28683
|
-
var LegacySourcesLockSchema =
|
|
28684
|
-
sources:
|
|
28765
|
+
var LegacySourcesLockSchema = import_mini87.z.object({
|
|
28766
|
+
sources: import_mini87.z.record(import_mini87.z.string(), LegacyLockedSourceSchema)
|
|
28685
28767
|
});
|
|
28686
28768
|
function migrateLegacyLock(params) {
|
|
28687
28769
|
const { legacy, logger: logger5 } = params;
|
|
@@ -29454,11 +29536,11 @@ async function runGhInstall(logger5, options) {
|
|
|
29454
29536
|
var import_fastmcp = require("fastmcp");
|
|
29455
29537
|
|
|
29456
29538
|
// src/mcp/tools.ts
|
|
29457
|
-
var
|
|
29539
|
+
var import_mini99 = require("zod/mini");
|
|
29458
29540
|
|
|
29459
29541
|
// src/mcp/commands.ts
|
|
29460
29542
|
var import_node_path168 = require("path");
|
|
29461
|
-
var
|
|
29543
|
+
var import_mini88 = require("zod/mini");
|
|
29462
29544
|
var logger = new ConsoleLogger({ verbose: false, silent: true });
|
|
29463
29545
|
var maxCommandSizeBytes = 1024 * 1024;
|
|
29464
29546
|
var maxCommandsCount = 1e3;
|
|
@@ -29586,17 +29668,17 @@ async function deleteCommand({ relativePathFromCwd }) {
|
|
|
29586
29668
|
}
|
|
29587
29669
|
}
|
|
29588
29670
|
var commandToolSchemas = {
|
|
29589
|
-
listCommands:
|
|
29590
|
-
getCommand:
|
|
29591
|
-
relativePathFromCwd:
|
|
29671
|
+
listCommands: import_mini88.z.object({}),
|
|
29672
|
+
getCommand: import_mini88.z.object({
|
|
29673
|
+
relativePathFromCwd: import_mini88.z.string()
|
|
29592
29674
|
}),
|
|
29593
|
-
putCommand:
|
|
29594
|
-
relativePathFromCwd:
|
|
29675
|
+
putCommand: import_mini88.z.object({
|
|
29676
|
+
relativePathFromCwd: import_mini88.z.string(),
|
|
29595
29677
|
frontmatter: RulesyncCommandFrontmatterSchema,
|
|
29596
|
-
body:
|
|
29678
|
+
body: import_mini88.z.string()
|
|
29597
29679
|
}),
|
|
29598
|
-
deleteCommand:
|
|
29599
|
-
relativePathFromCwd:
|
|
29680
|
+
deleteCommand: import_mini88.z.object({
|
|
29681
|
+
relativePathFromCwd: import_mini88.z.string()
|
|
29600
29682
|
})
|
|
29601
29683
|
};
|
|
29602
29684
|
var commandTools = {
|
|
@@ -29644,13 +29726,13 @@ var commandTools = {
|
|
|
29644
29726
|
};
|
|
29645
29727
|
|
|
29646
29728
|
// src/mcp/convert.ts
|
|
29647
|
-
var
|
|
29648
|
-
var convertOptionsSchema =
|
|
29649
|
-
from:
|
|
29650
|
-
to:
|
|
29651
|
-
features:
|
|
29652
|
-
global:
|
|
29653
|
-
dryRun:
|
|
29729
|
+
var import_mini89 = require("zod/mini");
|
|
29730
|
+
var convertOptionsSchema = import_mini89.z.object({
|
|
29731
|
+
from: import_mini89.z.string(),
|
|
29732
|
+
to: import_mini89.z.array(import_mini89.z.string()),
|
|
29733
|
+
features: import_mini89.z.optional(import_mini89.z.array(import_mini89.z.string())),
|
|
29734
|
+
global: import_mini89.z.optional(import_mini89.z.boolean()),
|
|
29735
|
+
dryRun: import_mini89.z.optional(import_mini89.z.boolean())
|
|
29654
29736
|
});
|
|
29655
29737
|
function parseToolTarget2(value, label) {
|
|
29656
29738
|
const result = ToolTargetSchema.safeParse(value);
|
|
@@ -29746,15 +29828,15 @@ var convertTools = {
|
|
|
29746
29828
|
};
|
|
29747
29829
|
|
|
29748
29830
|
// src/mcp/generate.ts
|
|
29749
|
-
var
|
|
29750
|
-
var generateOptionsSchema =
|
|
29751
|
-
targets:
|
|
29752
|
-
features:
|
|
29753
|
-
delete:
|
|
29754
|
-
global:
|
|
29755
|
-
simulateCommands:
|
|
29756
|
-
simulateSubagents:
|
|
29757
|
-
simulateSkills:
|
|
29831
|
+
var import_mini90 = require("zod/mini");
|
|
29832
|
+
var generateOptionsSchema = import_mini90.z.object({
|
|
29833
|
+
targets: import_mini90.z.optional(import_mini90.z.array(import_mini90.z.string())),
|
|
29834
|
+
features: import_mini90.z.optional(import_mini90.z.array(import_mini90.z.string())),
|
|
29835
|
+
delete: import_mini90.z.optional(import_mini90.z.boolean()),
|
|
29836
|
+
global: import_mini90.z.optional(import_mini90.z.boolean()),
|
|
29837
|
+
simulateCommands: import_mini90.z.optional(import_mini90.z.boolean()),
|
|
29838
|
+
simulateSubagents: import_mini90.z.optional(import_mini90.z.boolean()),
|
|
29839
|
+
simulateSkills: import_mini90.z.optional(import_mini90.z.boolean())
|
|
29758
29840
|
});
|
|
29759
29841
|
async function executeGenerate(options = {}) {
|
|
29760
29842
|
try {
|
|
@@ -29834,7 +29916,7 @@ var generateTools = {
|
|
|
29834
29916
|
|
|
29835
29917
|
// src/mcp/hooks.ts
|
|
29836
29918
|
var import_node_path169 = require("path");
|
|
29837
|
-
var
|
|
29919
|
+
var import_mini91 = require("zod/mini");
|
|
29838
29920
|
var maxHooksSizeBytes = 1024 * 1024;
|
|
29839
29921
|
async function getHooksFile() {
|
|
29840
29922
|
try {
|
|
@@ -29923,11 +30005,11 @@ async function deleteHooksFile() {
|
|
|
29923
30005
|
}
|
|
29924
30006
|
}
|
|
29925
30007
|
var hooksToolSchemas = {
|
|
29926
|
-
getHooksFile:
|
|
29927
|
-
putHooksFile:
|
|
29928
|
-
content:
|
|
30008
|
+
getHooksFile: import_mini91.z.object({}),
|
|
30009
|
+
putHooksFile: import_mini91.z.object({
|
|
30010
|
+
content: import_mini91.z.string()
|
|
29929
30011
|
}),
|
|
29930
|
-
deleteHooksFile:
|
|
30012
|
+
deleteHooksFile: import_mini91.z.object({})
|
|
29931
30013
|
};
|
|
29932
30014
|
var hooksTools = {
|
|
29933
30015
|
getHooksFile: {
|
|
@@ -29961,7 +30043,7 @@ var hooksTools = {
|
|
|
29961
30043
|
|
|
29962
30044
|
// src/mcp/ignore.ts
|
|
29963
30045
|
var import_node_path170 = require("path");
|
|
29964
|
-
var
|
|
30046
|
+
var import_mini92 = require("zod/mini");
|
|
29965
30047
|
var maxIgnoreFileSizeBytes = 100 * 1024;
|
|
29966
30048
|
async function getIgnoreFile() {
|
|
29967
30049
|
const ignoreFilePath = (0, import_node_path170.join)(process.cwd(), RULESYNC_AIIGNORE_RELATIVE_FILE_PATH);
|
|
@@ -30024,11 +30106,11 @@ async function deleteIgnoreFile() {
|
|
|
30024
30106
|
}
|
|
30025
30107
|
}
|
|
30026
30108
|
var ignoreToolSchemas = {
|
|
30027
|
-
getIgnoreFile:
|
|
30028
|
-
putIgnoreFile:
|
|
30029
|
-
content:
|
|
30109
|
+
getIgnoreFile: import_mini92.z.object({}),
|
|
30110
|
+
putIgnoreFile: import_mini92.z.object({
|
|
30111
|
+
content: import_mini92.z.string()
|
|
30030
30112
|
}),
|
|
30031
|
-
deleteIgnoreFile:
|
|
30113
|
+
deleteIgnoreFile: import_mini92.z.object({})
|
|
30032
30114
|
};
|
|
30033
30115
|
var ignoreTools = {
|
|
30034
30116
|
getIgnoreFile: {
|
|
@@ -30061,11 +30143,11 @@ var ignoreTools = {
|
|
|
30061
30143
|
};
|
|
30062
30144
|
|
|
30063
30145
|
// src/mcp/import.ts
|
|
30064
|
-
var
|
|
30065
|
-
var importOptionsSchema =
|
|
30066
|
-
target:
|
|
30067
|
-
features:
|
|
30068
|
-
global:
|
|
30146
|
+
var import_mini93 = require("zod/mini");
|
|
30147
|
+
var importOptionsSchema = import_mini93.z.object({
|
|
30148
|
+
target: import_mini93.z.string(),
|
|
30149
|
+
features: import_mini93.z.optional(import_mini93.z.array(import_mini93.z.string())),
|
|
30150
|
+
global: import_mini93.z.optional(import_mini93.z.boolean())
|
|
30069
30151
|
});
|
|
30070
30152
|
async function executeImport(options) {
|
|
30071
30153
|
try {
|
|
@@ -30137,7 +30219,7 @@ var importTools = {
|
|
|
30137
30219
|
|
|
30138
30220
|
// src/mcp/mcp.ts
|
|
30139
30221
|
var import_node_path171 = require("path");
|
|
30140
|
-
var
|
|
30222
|
+
var import_mini94 = require("zod/mini");
|
|
30141
30223
|
var maxMcpSizeBytes = 1024 * 1024;
|
|
30142
30224
|
async function getMcpFile() {
|
|
30143
30225
|
try {
|
|
@@ -30239,11 +30321,11 @@ async function deleteMcpFile() {
|
|
|
30239
30321
|
}
|
|
30240
30322
|
}
|
|
30241
30323
|
var mcpToolSchemas = {
|
|
30242
|
-
getMcpFile:
|
|
30243
|
-
putMcpFile:
|
|
30244
|
-
content:
|
|
30324
|
+
getMcpFile: import_mini94.z.object({}),
|
|
30325
|
+
putMcpFile: import_mini94.z.object({
|
|
30326
|
+
content: import_mini94.z.string()
|
|
30245
30327
|
}),
|
|
30246
|
-
deleteMcpFile:
|
|
30328
|
+
deleteMcpFile: import_mini94.z.object({})
|
|
30247
30329
|
};
|
|
30248
30330
|
var mcpTools = {
|
|
30249
30331
|
getMcpFile: {
|
|
@@ -30277,7 +30359,7 @@ var mcpTools = {
|
|
|
30277
30359
|
|
|
30278
30360
|
// src/mcp/permissions.ts
|
|
30279
30361
|
var import_node_path172 = require("path");
|
|
30280
|
-
var
|
|
30362
|
+
var import_mini95 = require("zod/mini");
|
|
30281
30363
|
var maxPermissionsSizeBytes = 1024 * 1024;
|
|
30282
30364
|
async function getPermissionsFile() {
|
|
30283
30365
|
try {
|
|
@@ -30366,11 +30448,11 @@ async function deletePermissionsFile() {
|
|
|
30366
30448
|
}
|
|
30367
30449
|
}
|
|
30368
30450
|
var permissionsToolSchemas = {
|
|
30369
|
-
getPermissionsFile:
|
|
30370
|
-
putPermissionsFile:
|
|
30371
|
-
content:
|
|
30451
|
+
getPermissionsFile: import_mini95.z.object({}),
|
|
30452
|
+
putPermissionsFile: import_mini95.z.object({
|
|
30453
|
+
content: import_mini95.z.string()
|
|
30372
30454
|
}),
|
|
30373
|
-
deletePermissionsFile:
|
|
30455
|
+
deletePermissionsFile: import_mini95.z.object({})
|
|
30374
30456
|
};
|
|
30375
30457
|
var permissionsTools = {
|
|
30376
30458
|
getPermissionsFile: {
|
|
@@ -30404,7 +30486,7 @@ var permissionsTools = {
|
|
|
30404
30486
|
|
|
30405
30487
|
// src/mcp/rules.ts
|
|
30406
30488
|
var import_node_path173 = require("path");
|
|
30407
|
-
var
|
|
30489
|
+
var import_mini96 = require("zod/mini");
|
|
30408
30490
|
var logger2 = new ConsoleLogger({ verbose: false, silent: true });
|
|
30409
30491
|
var maxRuleSizeBytes = 1024 * 1024;
|
|
30410
30492
|
var maxRulesCount = 1e3;
|
|
@@ -30528,17 +30610,17 @@ async function deleteRule({ relativePathFromCwd }) {
|
|
|
30528
30610
|
}
|
|
30529
30611
|
}
|
|
30530
30612
|
var ruleToolSchemas = {
|
|
30531
|
-
listRules:
|
|
30532
|
-
getRule:
|
|
30533
|
-
relativePathFromCwd:
|
|
30613
|
+
listRules: import_mini96.z.object({}),
|
|
30614
|
+
getRule: import_mini96.z.object({
|
|
30615
|
+
relativePathFromCwd: import_mini96.z.string()
|
|
30534
30616
|
}),
|
|
30535
|
-
putRule:
|
|
30536
|
-
relativePathFromCwd:
|
|
30617
|
+
putRule: import_mini96.z.object({
|
|
30618
|
+
relativePathFromCwd: import_mini96.z.string(),
|
|
30537
30619
|
frontmatter: RulesyncRuleFrontmatterSchema,
|
|
30538
|
-
body:
|
|
30620
|
+
body: import_mini96.z.string()
|
|
30539
30621
|
}),
|
|
30540
|
-
deleteRule:
|
|
30541
|
-
relativePathFromCwd:
|
|
30622
|
+
deleteRule: import_mini96.z.object({
|
|
30623
|
+
relativePathFromCwd: import_mini96.z.string()
|
|
30542
30624
|
})
|
|
30543
30625
|
};
|
|
30544
30626
|
var ruleTools = {
|
|
@@ -30587,7 +30669,7 @@ var ruleTools = {
|
|
|
30587
30669
|
|
|
30588
30670
|
// src/mcp/skills.ts
|
|
30589
30671
|
var import_node_path174 = require("path");
|
|
30590
|
-
var
|
|
30672
|
+
var import_mini97 = require("zod/mini");
|
|
30591
30673
|
var logger3 = new ConsoleLogger({ verbose: false, silent: true });
|
|
30592
30674
|
var maxSkillSizeBytes = 1024 * 1024;
|
|
30593
30675
|
var maxSkillsCount = 1e3;
|
|
@@ -30760,23 +30842,23 @@ async function deleteSkill({
|
|
|
30760
30842
|
);
|
|
30761
30843
|
}
|
|
30762
30844
|
}
|
|
30763
|
-
var McpSkillFileSchema =
|
|
30764
|
-
name:
|
|
30765
|
-
body:
|
|
30845
|
+
var McpSkillFileSchema = import_mini97.z.object({
|
|
30846
|
+
name: import_mini97.z.string(),
|
|
30847
|
+
body: import_mini97.z.string()
|
|
30766
30848
|
});
|
|
30767
30849
|
var skillToolSchemas = {
|
|
30768
|
-
listSkills:
|
|
30769
|
-
getSkill:
|
|
30770
|
-
relativeDirPathFromCwd:
|
|
30850
|
+
listSkills: import_mini97.z.object({}),
|
|
30851
|
+
getSkill: import_mini97.z.object({
|
|
30852
|
+
relativeDirPathFromCwd: import_mini97.z.string()
|
|
30771
30853
|
}),
|
|
30772
|
-
putSkill:
|
|
30773
|
-
relativeDirPathFromCwd:
|
|
30854
|
+
putSkill: import_mini97.z.object({
|
|
30855
|
+
relativeDirPathFromCwd: import_mini97.z.string(),
|
|
30774
30856
|
frontmatter: RulesyncSkillFrontmatterSchema,
|
|
30775
|
-
body:
|
|
30776
|
-
otherFiles:
|
|
30857
|
+
body: import_mini97.z.string(),
|
|
30858
|
+
otherFiles: import_mini97.z.optional(import_mini97.z.array(McpSkillFileSchema))
|
|
30777
30859
|
}),
|
|
30778
|
-
deleteSkill:
|
|
30779
|
-
relativeDirPathFromCwd:
|
|
30860
|
+
deleteSkill: import_mini97.z.object({
|
|
30861
|
+
relativeDirPathFromCwd: import_mini97.z.string()
|
|
30780
30862
|
})
|
|
30781
30863
|
};
|
|
30782
30864
|
var skillTools = {
|
|
@@ -30826,7 +30908,7 @@ var skillTools = {
|
|
|
30826
30908
|
|
|
30827
30909
|
// src/mcp/subagents.ts
|
|
30828
30910
|
var import_node_path175 = require("path");
|
|
30829
|
-
var
|
|
30911
|
+
var import_mini98 = require("zod/mini");
|
|
30830
30912
|
var logger4 = new ConsoleLogger({ verbose: false, silent: true });
|
|
30831
30913
|
var maxSubagentSizeBytes = 1024 * 1024;
|
|
30832
30914
|
var maxSubagentsCount = 1e3;
|
|
@@ -30955,17 +31037,17 @@ async function deleteSubagent({ relativePathFromCwd }) {
|
|
|
30955
31037
|
}
|
|
30956
31038
|
}
|
|
30957
31039
|
var subagentToolSchemas = {
|
|
30958
|
-
listSubagents:
|
|
30959
|
-
getSubagent:
|
|
30960
|
-
relativePathFromCwd:
|
|
31040
|
+
listSubagents: import_mini98.z.object({}),
|
|
31041
|
+
getSubagent: import_mini98.z.object({
|
|
31042
|
+
relativePathFromCwd: import_mini98.z.string()
|
|
30961
31043
|
}),
|
|
30962
|
-
putSubagent:
|
|
30963
|
-
relativePathFromCwd:
|
|
31044
|
+
putSubagent: import_mini98.z.object({
|
|
31045
|
+
relativePathFromCwd: import_mini98.z.string(),
|
|
30964
31046
|
frontmatter: RulesyncSubagentFrontmatterSchema,
|
|
30965
|
-
body:
|
|
31047
|
+
body: import_mini98.z.string()
|
|
30966
31048
|
}),
|
|
30967
|
-
deleteSubagent:
|
|
30968
|
-
relativePathFromCwd:
|
|
31049
|
+
deleteSubagent: import_mini98.z.object({
|
|
31050
|
+
relativePathFromCwd: import_mini98.z.string()
|
|
30969
31051
|
})
|
|
30970
31052
|
};
|
|
30971
31053
|
var subagentTools = {
|
|
@@ -31013,7 +31095,7 @@ var subagentTools = {
|
|
|
31013
31095
|
};
|
|
31014
31096
|
|
|
31015
31097
|
// src/mcp/tools.ts
|
|
31016
|
-
var rulesyncFeatureSchema =
|
|
31098
|
+
var rulesyncFeatureSchema = import_mini99.z.enum([
|
|
31017
31099
|
"rule",
|
|
31018
31100
|
"command",
|
|
31019
31101
|
"subagent",
|
|
@@ -31026,22 +31108,22 @@ var rulesyncFeatureSchema = import_mini98.z.enum([
|
|
|
31026
31108
|
"import",
|
|
31027
31109
|
"convert"
|
|
31028
31110
|
]);
|
|
31029
|
-
var rulesyncOperationSchema =
|
|
31030
|
-
var skillFileSchema =
|
|
31031
|
-
name:
|
|
31032
|
-
body:
|
|
31111
|
+
var rulesyncOperationSchema = import_mini99.z.enum(["list", "get", "put", "delete", "run"]);
|
|
31112
|
+
var skillFileSchema = import_mini99.z.object({
|
|
31113
|
+
name: import_mini99.z.string(),
|
|
31114
|
+
body: import_mini99.z.string()
|
|
31033
31115
|
});
|
|
31034
|
-
var rulesyncToolSchema =
|
|
31116
|
+
var rulesyncToolSchema = import_mini99.z.object({
|
|
31035
31117
|
feature: rulesyncFeatureSchema,
|
|
31036
31118
|
operation: rulesyncOperationSchema,
|
|
31037
|
-
targetPathFromCwd:
|
|
31038
|
-
frontmatter:
|
|
31039
|
-
body:
|
|
31040
|
-
otherFiles:
|
|
31041
|
-
content:
|
|
31042
|
-
generateOptions:
|
|
31043
|
-
importOptions:
|
|
31044
|
-
convertOptions:
|
|
31119
|
+
targetPathFromCwd: import_mini99.z.optional(import_mini99.z.string()),
|
|
31120
|
+
frontmatter: import_mini99.z.optional(import_mini99.z.unknown()),
|
|
31121
|
+
body: import_mini99.z.optional(import_mini99.z.string()),
|
|
31122
|
+
otherFiles: import_mini99.z.optional(import_mini99.z.array(skillFileSchema)),
|
|
31123
|
+
content: import_mini99.z.optional(import_mini99.z.string()),
|
|
31124
|
+
generateOptions: import_mini99.z.optional(generateOptionsSchema),
|
|
31125
|
+
importOptions: import_mini99.z.optional(importOptionsSchema),
|
|
31126
|
+
convertOptions: import_mini99.z.optional(convertOptionsSchema)
|
|
31045
31127
|
});
|
|
31046
31128
|
var supportedOperationsByFeature = {
|
|
31047
31129
|
rule: ["list", "get", "put", "delete"],
|
|
@@ -31711,7 +31793,7 @@ function wrapCommand({
|
|
|
31711
31793
|
}
|
|
31712
31794
|
|
|
31713
31795
|
// src/cli/index.ts
|
|
31714
|
-
var getVersion = () => "8.
|
|
31796
|
+
var getVersion = () => "8.18.0";
|
|
31715
31797
|
function wrapCommand2(name, errorCode, handler) {
|
|
31716
31798
|
return wrapCommand({ name, errorCode, handler, getVersion });
|
|
31717
31799
|
}
|