rulesync 8.17.0 → 8.19.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-66SPWRYP.js} +248 -127
- package/dist/cli/index.cjs +453 -332
- package/dist/cli/index.js +2 -2
- package/dist/index.cjs +248 -127
- package/dist/index.js +1 -1
- package/package.json +3 -1
package/dist/cli/index.cjs
CHANGED
|
@@ -1191,11 +1191,18 @@ var smolToml = __toESM(require("smol-toml"), 1);
|
|
|
1191
1191
|
// src/utils/frontmatter.ts
|
|
1192
1192
|
var import_gray_matter = __toESM(require("gray-matter"), 1);
|
|
1193
1193
|
var import_js_yaml = require("js-yaml");
|
|
1194
|
+
|
|
1195
|
+
// src/utils/type-guards.ts
|
|
1196
|
+
function isRecord(value) {
|
|
1197
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1198
|
+
}
|
|
1194
1199
|
function isPlainObject(value) {
|
|
1195
|
-
if (value
|
|
1196
|
-
const
|
|
1197
|
-
return
|
|
1200
|
+
if (!isRecord(value)) return false;
|
|
1201
|
+
const proto = Object.getPrototypeOf(value);
|
|
1202
|
+
return proto === null || proto === Object.prototype;
|
|
1198
1203
|
}
|
|
1204
|
+
|
|
1205
|
+
// src/utils/frontmatter.ts
|
|
1199
1206
|
function deepRemoveNullishValue(value) {
|
|
1200
1207
|
if (value === null || value === void 0) {
|
|
1201
1208
|
return void 0;
|
|
@@ -1786,11 +1793,6 @@ var AgentsmdCommand = class _AgentsmdCommand extends SimulatedCommand {
|
|
|
1786
1793
|
var import_node_path10 = require("path");
|
|
1787
1794
|
var import_mini6 = require("zod/mini");
|
|
1788
1795
|
|
|
1789
|
-
// src/utils/type-guards.ts
|
|
1790
|
-
function isRecord(value) {
|
|
1791
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1792
|
-
}
|
|
1793
|
-
|
|
1794
1796
|
// src/features/commands/rulesync-command.ts
|
|
1795
1797
|
var import_node_path9 = require("path");
|
|
1796
1798
|
var import_mini5 = require("zod/mini");
|
|
@@ -7793,7 +7795,7 @@ var ToolMcp = class extends ToolFile {
|
|
|
7793
7795
|
super({
|
|
7794
7796
|
...rest,
|
|
7795
7797
|
validate: true
|
|
7796
|
-
//
|
|
7798
|
+
// ToolMcp runs subclass validation below when requested
|
|
7797
7799
|
});
|
|
7798
7800
|
if (rest.validate) {
|
|
7799
7801
|
const result = this.validate();
|
|
@@ -7851,17 +7853,26 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
|
|
|
7851
7853
|
return this.json;
|
|
7852
7854
|
}
|
|
7853
7855
|
/**
|
|
7854
|
-
* In global mode, ~/.claude
|
|
7855
|
-
*
|
|
7856
|
+
* In global mode, ~/.claude.json should not be deleted as it is the
|
|
7857
|
+
* user's primary Claude Code config and contains many other settings
|
|
7858
|
+
* managed by Claude Code itself (feature flags, project trust list,
|
|
7859
|
+
* hooks, user settings, model selection, etc.).
|
|
7856
7860
|
* In local mode, .mcp.json can be safely deleted.
|
|
7857
7861
|
*/
|
|
7858
7862
|
isDeletable() {
|
|
7859
7863
|
return !this.global;
|
|
7860
7864
|
}
|
|
7865
|
+
/**
|
|
7866
|
+
* Legacy global path used by rulesync ≤ v8.17.0. The documented store
|
|
7867
|
+
* is `~/.claude.json`; `fromFile` falls back here with a deprecation
|
|
7868
|
+
* warning (mirrors PR #333). Never modified or removed by rulesync.
|
|
7869
|
+
*/
|
|
7870
|
+
static LEGACY_GLOBAL_DIR = ".claude";
|
|
7871
|
+
static LEGACY_GLOBAL_FILE = ".claude.json";
|
|
7861
7872
|
static getSettablePaths({ global } = {}) {
|
|
7862
7873
|
if (global) {
|
|
7863
7874
|
return {
|
|
7864
|
-
relativeDirPath: ".
|
|
7875
|
+
relativeDirPath: ".",
|
|
7865
7876
|
relativeFilePath: ".claude.json"
|
|
7866
7877
|
};
|
|
7867
7878
|
}
|
|
@@ -7873,19 +7884,52 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
|
|
|
7873
7884
|
static async fromFile({
|
|
7874
7885
|
outputRoot = process.cwd(),
|
|
7875
7886
|
validate = true,
|
|
7876
|
-
global = false
|
|
7887
|
+
global = false,
|
|
7888
|
+
logger: logger5
|
|
7877
7889
|
}) {
|
|
7878
7890
|
const paths = this.getSettablePaths({ global });
|
|
7879
|
-
const
|
|
7880
|
-
|
|
7881
|
-
|
|
7882
|
-
|
|
7883
|
-
|
|
7891
|
+
const recommendedPath = (0, import_node_path52.join)(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
|
|
7892
|
+
if (await fileExists(recommendedPath)) {
|
|
7893
|
+
const fileContent = await readFileContent(recommendedPath);
|
|
7894
|
+
const json = JSON.parse(fileContent);
|
|
7895
|
+
const newJson = { ...json, mcpServers: json.mcpServers ?? {} };
|
|
7896
|
+
return new _ClaudecodeMcp({
|
|
7897
|
+
outputRoot,
|
|
7898
|
+
relativeDirPath: paths.relativeDirPath,
|
|
7899
|
+
relativeFilePath: paths.relativeFilePath,
|
|
7900
|
+
fileContent: JSON.stringify(newJson, null, 2),
|
|
7901
|
+
validate,
|
|
7902
|
+
global
|
|
7903
|
+
});
|
|
7904
|
+
}
|
|
7905
|
+
if (global) {
|
|
7906
|
+
const legacyPath = (0, import_node_path52.join)(
|
|
7907
|
+
outputRoot,
|
|
7908
|
+
_ClaudecodeMcp.LEGACY_GLOBAL_DIR,
|
|
7909
|
+
_ClaudecodeMcp.LEGACY_GLOBAL_FILE
|
|
7910
|
+
);
|
|
7911
|
+
if (await fileExists(legacyPath)) {
|
|
7912
|
+
logger5?.warn(
|
|
7913
|
+
`Warning: using deprecated path "${legacyPath}". Please migrate to "${recommendedPath}"`
|
|
7914
|
+
);
|
|
7915
|
+
const fileContent = await readFileContent(legacyPath);
|
|
7916
|
+
const json = JSON.parse(fileContent);
|
|
7917
|
+
const newJson = { ...json, mcpServers: json.mcpServers ?? {} };
|
|
7918
|
+
return new _ClaudecodeMcp({
|
|
7919
|
+
outputRoot,
|
|
7920
|
+
relativeDirPath: _ClaudecodeMcp.LEGACY_GLOBAL_DIR,
|
|
7921
|
+
relativeFilePath: _ClaudecodeMcp.LEGACY_GLOBAL_FILE,
|
|
7922
|
+
fileContent: JSON.stringify(newJson, null, 2),
|
|
7923
|
+
validate,
|
|
7924
|
+
global
|
|
7925
|
+
});
|
|
7926
|
+
}
|
|
7927
|
+
}
|
|
7884
7928
|
return new _ClaudecodeMcp({
|
|
7885
7929
|
outputRoot,
|
|
7886
7930
|
relativeDirPath: paths.relativeDirPath,
|
|
7887
7931
|
relativeFilePath: paths.relativeFilePath,
|
|
7888
|
-
fileContent: JSON.stringify(
|
|
7932
|
+
fileContent: JSON.stringify({ mcpServers: {} }, null, 2),
|
|
7889
7933
|
validate,
|
|
7890
7934
|
global
|
|
7891
7935
|
});
|
|
@@ -7914,7 +7958,7 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
|
|
|
7914
7958
|
}
|
|
7915
7959
|
toRulesyncMcp() {
|
|
7916
7960
|
return this.toRulesyncMcpDefault({
|
|
7917
|
-
fileContent: JSON.stringify({ mcpServers: this.json.mcpServers }, null, 2)
|
|
7961
|
+
fileContent: JSON.stringify({ mcpServers: this.json.mcpServers ?? {} }, null, 2)
|
|
7918
7962
|
});
|
|
7919
7963
|
}
|
|
7920
7964
|
validate() {
|
|
@@ -8016,14 +8060,16 @@ var ClineMcp = class _ClineMcp extends ToolMcp {
|
|
|
8016
8060
|
// src/features/mcp/codexcli-mcp.ts
|
|
8017
8061
|
var import_node_path54 = require("path");
|
|
8018
8062
|
var smolToml3 = __toESM(require("smol-toml"), 1);
|
|
8063
|
+
var MAX_REMOVE_EMPTY_ENTRIES_DEPTH = 32;
|
|
8064
|
+
var PROTOTYPE_POLLUTION_KEYS = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
|
|
8019
8065
|
function convertFromCodexFormat(codexMcp) {
|
|
8020
8066
|
const result = {};
|
|
8021
8067
|
for (const [name, config] of Object.entries(codexMcp)) {
|
|
8022
|
-
if (
|
|
8023
|
-
|
|
8024
|
-
}
|
|
8068
|
+
if (PROTOTYPE_POLLUTION_KEYS.has(name)) continue;
|
|
8069
|
+
if (!isRecord(config)) continue;
|
|
8025
8070
|
const converted = {};
|
|
8026
8071
|
for (const [key, value] of Object.entries(config)) {
|
|
8072
|
+
if (PROTOTYPE_POLLUTION_KEYS.has(key)) continue;
|
|
8027
8073
|
if (key === "enabled") {
|
|
8028
8074
|
if (value === false) {
|
|
8029
8075
|
converted["disabled"] = true;
|
|
@@ -8045,8 +8091,11 @@ function convertFromCodexFormat(codexMcp) {
|
|
|
8045
8091
|
function convertToCodexFormat(mcpServers) {
|
|
8046
8092
|
const result = {};
|
|
8047
8093
|
for (const [name, config] of Object.entries(mcpServers)) {
|
|
8094
|
+
if (PROTOTYPE_POLLUTION_KEYS.has(name)) continue;
|
|
8095
|
+
if (!isRecord(config)) continue;
|
|
8048
8096
|
const converted = {};
|
|
8049
8097
|
for (const [key, value] of Object.entries(config)) {
|
|
8098
|
+
if (PROTOTYPE_POLLUTION_KEYS.has(key)) continue;
|
|
8050
8099
|
if (key === "disabled") {
|
|
8051
8100
|
if (value === true) {
|
|
8052
8101
|
converted["enabled"] = false;
|
|
@@ -8128,6 +8177,14 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
|
|
|
8128
8177
|
const mcpServers = rulesyncMcp.getJson().mcpServers;
|
|
8129
8178
|
const converted = convertToCodexFormat(mcpServers);
|
|
8130
8179
|
const filteredMcpServers = this.removeEmptyEntries(converted);
|
|
8180
|
+
for (const name of Object.keys(converted)) {
|
|
8181
|
+
if (!Object.hasOwn(filteredMcpServers, name)) {
|
|
8182
|
+
warnWithFallback(
|
|
8183
|
+
void 0,
|
|
8184
|
+
`MCP server "${name}" had no non-empty configuration and was dropped from the codex CLI config`
|
|
8185
|
+
);
|
|
8186
|
+
}
|
|
8187
|
+
}
|
|
8131
8188
|
configToml["mcp_servers"] = filteredMcpServers;
|
|
8132
8189
|
return new _CodexcliMcp({
|
|
8133
8190
|
outputRoot,
|
|
@@ -8147,13 +8204,21 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
|
|
|
8147
8204
|
validate() {
|
|
8148
8205
|
return { success: true, error: null };
|
|
8149
8206
|
}
|
|
8150
|
-
static removeEmptyEntries(obj) {
|
|
8207
|
+
static removeEmptyEntries(obj, depth = 0) {
|
|
8151
8208
|
if (!obj) return {};
|
|
8209
|
+
if (depth > MAX_REMOVE_EMPTY_ENTRIES_DEPTH) {
|
|
8210
|
+
warnWithFallback(
|
|
8211
|
+
void 0,
|
|
8212
|
+
`removeEmptyEntries: maximum recursion depth (${MAX_REMOVE_EMPTY_ENTRIES_DEPTH}) exceeded; empty nested objects may remain`
|
|
8213
|
+
);
|
|
8214
|
+
return obj;
|
|
8215
|
+
}
|
|
8152
8216
|
const filtered = {};
|
|
8153
8217
|
for (const [key, value] of Object.entries(obj)) {
|
|
8218
|
+
if (PROTOTYPE_POLLUTION_KEYS.has(key)) continue;
|
|
8154
8219
|
if (value === null) continue;
|
|
8155
|
-
if (
|
|
8156
|
-
const cleaned = this.removeEmptyEntries(value);
|
|
8220
|
+
if (isPlainObject(value)) {
|
|
8221
|
+
const cleaned = this.removeEmptyEntries(value, depth + 1);
|
|
8157
8222
|
if (Object.keys(cleaned).length === 0) continue;
|
|
8158
8223
|
filtered[key] = cleaned;
|
|
8159
8224
|
continue;
|
|
@@ -9846,7 +9911,13 @@ var toolMcpFactories = /* @__PURE__ */ new Map([
|
|
|
9846
9911
|
class: KiloMcp,
|
|
9847
9912
|
meta: {
|
|
9848
9913
|
supportsProject: true,
|
|
9849
|
-
|
|
9914
|
+
// Kilo CLI reads global MCP from `~/.config/kilo/kilo.json` (or
|
|
9915
|
+
// `kilo.jsonc`). The path machinery in `KiloMcp.getSettablePaths`
|
|
9916
|
+
// already routes global mode to that location; only this flag
|
|
9917
|
+
// was gating it off. Kilo is an OpenCode fork and uses an
|
|
9918
|
+
// identical native MCP schema, so global parity with opencode
|
|
9919
|
+
// is the natural state.
|
|
9920
|
+
supportsGlobal: true,
|
|
9850
9921
|
supportsEnabledTools: false,
|
|
9851
9922
|
supportsDisabledTools: false
|
|
9852
9923
|
}
|
|
@@ -9992,7 +10063,8 @@ var McpProcessor = class extends FeatureProcessor {
|
|
|
9992
10063
|
await factory.class.fromFile({
|
|
9993
10064
|
outputRoot: this.outputRoot,
|
|
9994
10065
|
validate: true,
|
|
9995
|
-
global: this.global
|
|
10066
|
+
global: this.global,
|
|
10067
|
+
logger: this.logger
|
|
9996
10068
|
})
|
|
9997
10069
|
];
|
|
9998
10070
|
this.logger.debug(`Successfully loaded ${toolMcps.length} ${this.toolTarget} MCP files`);
|
|
@@ -12967,7 +13039,7 @@ var PermissionsProcessor = class extends FeatureProcessor {
|
|
|
12967
13039
|
// src/features/rules/rules-processor.ts
|
|
12968
13040
|
var import_node_path154 = require("path");
|
|
12969
13041
|
var import_toon = require("@toon-format/toon");
|
|
12970
|
-
var
|
|
13042
|
+
var import_mini80 = require("zod/mini");
|
|
12971
13043
|
|
|
12972
13044
|
// src/constants/general.ts
|
|
12973
13045
|
var SKILL_FILE_NAME = "SKILL.md";
|
|
@@ -17919,7 +17991,7 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
|
|
|
17919
17991
|
|
|
17920
17992
|
// src/features/subagents/subagents-processor.ts
|
|
17921
17993
|
var import_node_path125 = require("path");
|
|
17922
|
-
var
|
|
17994
|
+
var import_mini73 = require("zod/mini");
|
|
17923
17995
|
|
|
17924
17996
|
// src/features/subagents/claudecode-subagent.ts
|
|
17925
17997
|
var import_node_path113 = require("path");
|
|
@@ -19079,6 +19151,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
|
|
|
19079
19151
|
|
|
19080
19152
|
// src/features/subagents/kilo-subagent.ts
|
|
19081
19153
|
var import_node_path121 = require("path");
|
|
19154
|
+
var import_mini71 = require("zod/mini");
|
|
19082
19155
|
|
|
19083
19156
|
// src/features/subagents/opencode-style-subagent.ts
|
|
19084
19157
|
var import_node_path120 = require("path");
|
|
@@ -19145,11 +19218,54 @@ var OpenCodeStyleSubagent = class extends ToolSubagent {
|
|
|
19145
19218
|
};
|
|
19146
19219
|
|
|
19147
19220
|
// src/features/subagents/kilo-subagent.ts
|
|
19148
|
-
var KiloSubagentFrontmatterSchema =
|
|
19221
|
+
var KiloSubagentFrontmatterSchema = import_mini71.z.looseObject({
|
|
19222
|
+
description: import_mini71.z.optional(import_mini71.z.string()),
|
|
19223
|
+
mode: import_mini71.z._default(import_mini71.z.string(), "all"),
|
|
19224
|
+
name: import_mini71.z.optional(import_mini71.z.string()),
|
|
19225
|
+
displayName: import_mini71.z.optional(import_mini71.z.string()),
|
|
19226
|
+
deprecated: import_mini71.z.optional(import_mini71.z.boolean()),
|
|
19227
|
+
native: import_mini71.z.optional(import_mini71.z.boolean()),
|
|
19228
|
+
hidden: import_mini71.z.optional(import_mini71.z.boolean()),
|
|
19229
|
+
top_p: import_mini71.z.optional(import_mini71.z.number()),
|
|
19230
|
+
temperature: import_mini71.z.optional(import_mini71.z.number()),
|
|
19231
|
+
color: import_mini71.z.optional(import_mini71.z.string()),
|
|
19232
|
+
permission: import_mini71.z.optional(import_mini71.z.string()),
|
|
19233
|
+
model: import_mini71.z.optional(import_mini71.z.string()),
|
|
19234
|
+
variant: import_mini71.z.optional(import_mini71.z.string()),
|
|
19235
|
+
prompt: import_mini71.z.optional(import_mini71.z.string()),
|
|
19236
|
+
options: import_mini71.z.optional(import_mini71.z.looseObject({})),
|
|
19237
|
+
steps: import_mini71.z.optional(import_mini71.z.array(import_mini71.z.looseObject({}))),
|
|
19238
|
+
disable: import_mini71.z.optional(import_mini71.z.boolean())
|
|
19239
|
+
});
|
|
19149
19240
|
var KiloSubagent = class _KiloSubagent extends OpenCodeStyleSubagent {
|
|
19241
|
+
constructor(params) {
|
|
19242
|
+
super(params);
|
|
19243
|
+
if (params.validate !== false) {
|
|
19244
|
+
const result = this.validate();
|
|
19245
|
+
if (!result.success) {
|
|
19246
|
+
throw result.error;
|
|
19247
|
+
}
|
|
19248
|
+
}
|
|
19249
|
+
}
|
|
19150
19250
|
getToolTarget() {
|
|
19151
19251
|
return "kilo";
|
|
19152
19252
|
}
|
|
19253
|
+
getFrontmatter() {
|
|
19254
|
+
return this.frontmatter;
|
|
19255
|
+
}
|
|
19256
|
+
validate() {
|
|
19257
|
+
const result = KiloSubagentFrontmatterSchema.safeParse(this.frontmatter);
|
|
19258
|
+
if (result.success) {
|
|
19259
|
+
this.frontmatter = result.data;
|
|
19260
|
+
return { success: true, error: null };
|
|
19261
|
+
}
|
|
19262
|
+
return {
|
|
19263
|
+
success: false,
|
|
19264
|
+
error: new Error(
|
|
19265
|
+
`Invalid frontmatter in ${(0, import_node_path121.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
|
|
19266
|
+
)
|
|
19267
|
+
};
|
|
19268
|
+
}
|
|
19153
19269
|
static getSettablePaths({
|
|
19154
19270
|
global = false
|
|
19155
19271
|
} = {}) {
|
|
@@ -19165,12 +19281,17 @@ var KiloSubagent = class _KiloSubagent extends OpenCodeStyleSubagent {
|
|
|
19165
19281
|
}) {
|
|
19166
19282
|
const rulesyncFrontmatter = rulesyncSubagent.getFrontmatter();
|
|
19167
19283
|
const kiloSection = rulesyncFrontmatter.kilo ?? {};
|
|
19168
|
-
const
|
|
19284
|
+
const parseResult = KiloSubagentFrontmatterSchema.safeParse({
|
|
19169
19285
|
...kiloSection,
|
|
19170
19286
|
description: rulesyncFrontmatter.description,
|
|
19171
|
-
mode: typeof kiloSection.mode === "string" ? kiloSection.mode : "subagent",
|
|
19172
19287
|
...rulesyncFrontmatter.name && { name: rulesyncFrontmatter.name }
|
|
19173
|
-
};
|
|
19288
|
+
});
|
|
19289
|
+
if (!parseResult.success) {
|
|
19290
|
+
throw new Error(
|
|
19291
|
+
`Invalid frontmatter in ${rulesyncSubagent.getRelativeFilePath()}: ${formatError(parseResult.error)}`
|
|
19292
|
+
);
|
|
19293
|
+
}
|
|
19294
|
+
const kiloFrontmatter = parseResult.data;
|
|
19174
19295
|
const body = rulesyncSubagent.getBody();
|
|
19175
19296
|
const fileContent = stringifyFrontmatter(body, kiloFrontmatter);
|
|
19176
19297
|
const paths = this.getSettablePaths({ global });
|
|
@@ -19219,38 +19340,40 @@ var KiloSubagent = class _KiloSubagent extends OpenCodeStyleSubagent {
|
|
|
19219
19340
|
static forDeletion({
|
|
19220
19341
|
outputRoot = process.cwd(),
|
|
19221
19342
|
relativeDirPath,
|
|
19222
|
-
relativeFilePath
|
|
19343
|
+
relativeFilePath,
|
|
19344
|
+
global = false
|
|
19223
19345
|
}) {
|
|
19224
19346
|
return new _KiloSubagent({
|
|
19225
19347
|
outputRoot,
|
|
19226
19348
|
relativeDirPath,
|
|
19227
19349
|
relativeFilePath,
|
|
19228
|
-
frontmatter: { description: "", mode: "
|
|
19350
|
+
frontmatter: { description: "", mode: "all" },
|
|
19229
19351
|
body: "",
|
|
19230
19352
|
fileContent: "",
|
|
19231
|
-
validate: false
|
|
19353
|
+
validate: false,
|
|
19354
|
+
global
|
|
19232
19355
|
});
|
|
19233
19356
|
}
|
|
19234
19357
|
};
|
|
19235
19358
|
|
|
19236
19359
|
// src/features/subagents/kiro-subagent.ts
|
|
19237
19360
|
var import_node_path122 = require("path");
|
|
19238
|
-
var
|
|
19239
|
-
var KiroCliSubagentJsonSchema =
|
|
19240
|
-
name:
|
|
19241
|
-
description:
|
|
19242
|
-
prompt:
|
|
19243
|
-
tools:
|
|
19244
|
-
toolAliases:
|
|
19245
|
-
toolSettings:
|
|
19246
|
-
toolSchema:
|
|
19247
|
-
hooks:
|
|
19248
|
-
model:
|
|
19249
|
-
mcpServers:
|
|
19250
|
-
useLegacyMcpJson:
|
|
19251
|
-
resources:
|
|
19252
|
-
allowedTools:
|
|
19253
|
-
includeMcpJson:
|
|
19361
|
+
var import_mini72 = require("zod/mini");
|
|
19362
|
+
var KiroCliSubagentJsonSchema = import_mini72.z.looseObject({
|
|
19363
|
+
name: import_mini72.z.string(),
|
|
19364
|
+
description: import_mini72.z.optional(import_mini72.z.nullable(import_mini72.z.string())),
|
|
19365
|
+
prompt: import_mini72.z.optional(import_mini72.z.nullable(import_mini72.z.string())),
|
|
19366
|
+
tools: import_mini72.z.optional(import_mini72.z.nullable(import_mini72.z.array(import_mini72.z.string()))),
|
|
19367
|
+
toolAliases: import_mini72.z.optional(import_mini72.z.nullable(import_mini72.z.record(import_mini72.z.string(), import_mini72.z.string()))),
|
|
19368
|
+
toolSettings: import_mini72.z.optional(import_mini72.z.nullable(import_mini72.z.unknown())),
|
|
19369
|
+
toolSchema: import_mini72.z.optional(import_mini72.z.nullable(import_mini72.z.unknown())),
|
|
19370
|
+
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())))),
|
|
19371
|
+
model: import_mini72.z.optional(import_mini72.z.nullable(import_mini72.z.string())),
|
|
19372
|
+
mcpServers: import_mini72.z.optional(import_mini72.z.nullable(import_mini72.z.record(import_mini72.z.string(), import_mini72.z.unknown()))),
|
|
19373
|
+
useLegacyMcpJson: import_mini72.z.optional(import_mini72.z.nullable(import_mini72.z.boolean())),
|
|
19374
|
+
resources: import_mini72.z.optional(import_mini72.z.nullable(import_mini72.z.array(import_mini72.z.string()))),
|
|
19375
|
+
allowedTools: import_mini72.z.optional(import_mini72.z.nullable(import_mini72.z.array(import_mini72.z.string()))),
|
|
19376
|
+
includeMcpJson: import_mini72.z.optional(import_mini72.z.nullable(import_mini72.z.boolean()))
|
|
19254
19377
|
});
|
|
19255
19378
|
var KiroSubagent = class _KiroSubagent extends ToolSubagent {
|
|
19256
19379
|
body;
|
|
@@ -19479,7 +19602,8 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends OpenCodeStyleSubagent {
|
|
|
19479
19602
|
static forDeletion({
|
|
19480
19603
|
outputRoot = process.cwd(),
|
|
19481
19604
|
relativeDirPath,
|
|
19482
|
-
relativeFilePath
|
|
19605
|
+
relativeFilePath,
|
|
19606
|
+
global = false
|
|
19483
19607
|
}) {
|
|
19484
19608
|
return new _OpenCodeSubagent({
|
|
19485
19609
|
outputRoot,
|
|
@@ -19488,7 +19612,8 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends OpenCodeStyleSubagent {
|
|
|
19488
19612
|
frontmatter: { description: "", mode: "subagent" },
|
|
19489
19613
|
body: "",
|
|
19490
19614
|
fileContent: "",
|
|
19491
|
-
validate: false
|
|
19615
|
+
validate: false,
|
|
19616
|
+
global
|
|
19492
19617
|
});
|
|
19493
19618
|
}
|
|
19494
19619
|
};
|
|
@@ -19616,7 +19741,7 @@ var subagentsProcessorToolTargetTuple = [
|
|
|
19616
19741
|
"rovodev",
|
|
19617
19742
|
"takt"
|
|
19618
19743
|
];
|
|
19619
|
-
var SubagentsProcessorToolTargetSchema =
|
|
19744
|
+
var SubagentsProcessorToolTargetSchema = import_mini73.z.enum(subagentsProcessorToolTargetTuple);
|
|
19620
19745
|
var toolSubagentFactories = /* @__PURE__ */ new Map([
|
|
19621
19746
|
[
|
|
19622
19747
|
"agentsmd",
|
|
@@ -19945,48 +20070,48 @@ var import_node_path127 = require("path");
|
|
|
19945
20070
|
|
|
19946
20071
|
// src/features/rules/rulesync-rule.ts
|
|
19947
20072
|
var import_node_path126 = require("path");
|
|
19948
|
-
var
|
|
19949
|
-
var RulesyncRuleFrontmatterSchema =
|
|
19950
|
-
root:
|
|
19951
|
-
localRoot:
|
|
19952
|
-
targets:
|
|
19953
|
-
description:
|
|
19954
|
-
globs:
|
|
19955
|
-
agentsmd:
|
|
19956
|
-
|
|
20073
|
+
var import_mini74 = require("zod/mini");
|
|
20074
|
+
var RulesyncRuleFrontmatterSchema = import_mini74.z.object({
|
|
20075
|
+
root: import_mini74.z.optional(import_mini74.z.boolean()),
|
|
20076
|
+
localRoot: import_mini74.z.optional(import_mini74.z.boolean()),
|
|
20077
|
+
targets: import_mini74.z._default(RulesyncTargetsSchema, ["*"]),
|
|
20078
|
+
description: import_mini74.z.optional(import_mini74.z.string()),
|
|
20079
|
+
globs: import_mini74.z.optional(import_mini74.z.array(import_mini74.z.string())),
|
|
20080
|
+
agentsmd: import_mini74.z.optional(
|
|
20081
|
+
import_mini74.z.looseObject({
|
|
19957
20082
|
// @example "path/to/subproject"
|
|
19958
|
-
subprojectPath:
|
|
20083
|
+
subprojectPath: import_mini74.z.optional(import_mini74.z.string())
|
|
19959
20084
|
})
|
|
19960
20085
|
),
|
|
19961
|
-
claudecode:
|
|
19962
|
-
|
|
20086
|
+
claudecode: import_mini74.z.optional(
|
|
20087
|
+
import_mini74.z.looseObject({
|
|
19963
20088
|
// Glob patterns for conditional rules (takes precedence over globs)
|
|
19964
20089
|
// @example ["src/**/*.ts", "tests/**/*.test.ts"]
|
|
19965
|
-
paths:
|
|
20090
|
+
paths: import_mini74.z.optional(import_mini74.z.array(import_mini74.z.string()))
|
|
19966
20091
|
})
|
|
19967
20092
|
),
|
|
19968
|
-
cursor:
|
|
19969
|
-
|
|
19970
|
-
alwaysApply:
|
|
19971
|
-
description:
|
|
19972
|
-
globs:
|
|
20093
|
+
cursor: import_mini74.z.optional(
|
|
20094
|
+
import_mini74.z.looseObject({
|
|
20095
|
+
alwaysApply: import_mini74.z.optional(import_mini74.z.boolean()),
|
|
20096
|
+
description: import_mini74.z.optional(import_mini74.z.string()),
|
|
20097
|
+
globs: import_mini74.z.optional(import_mini74.z.array(import_mini74.z.string()))
|
|
19973
20098
|
})
|
|
19974
20099
|
),
|
|
19975
|
-
copilot:
|
|
19976
|
-
|
|
19977
|
-
excludeAgent:
|
|
20100
|
+
copilot: import_mini74.z.optional(
|
|
20101
|
+
import_mini74.z.looseObject({
|
|
20102
|
+
excludeAgent: import_mini74.z.optional(import_mini74.z.union([import_mini74.z.literal("code-review"), import_mini74.z.literal("coding-agent")]))
|
|
19978
20103
|
})
|
|
19979
20104
|
),
|
|
19980
|
-
antigravity:
|
|
19981
|
-
|
|
19982
|
-
trigger:
|
|
19983
|
-
globs:
|
|
20105
|
+
antigravity: import_mini74.z.optional(
|
|
20106
|
+
import_mini74.z.looseObject({
|
|
20107
|
+
trigger: import_mini74.z.optional(import_mini74.z.string()),
|
|
20108
|
+
globs: import_mini74.z.optional(import_mini74.z.array(import_mini74.z.string()))
|
|
19984
20109
|
})
|
|
19985
20110
|
),
|
|
19986
|
-
takt:
|
|
19987
|
-
|
|
20111
|
+
takt: import_mini74.z.optional(
|
|
20112
|
+
import_mini74.z.looseObject({
|
|
19988
20113
|
// Rename the emitted file stem (e.g. "coder.md" → "{name}.md").
|
|
19989
|
-
name:
|
|
20114
|
+
name: import_mini74.z.optional(import_mini74.z.string())
|
|
19990
20115
|
})
|
|
19991
20116
|
)
|
|
19992
20117
|
});
|
|
@@ -20287,20 +20412,20 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
|
|
|
20287
20412
|
|
|
20288
20413
|
// src/features/rules/antigravity-rule.ts
|
|
20289
20414
|
var import_node_path129 = require("path");
|
|
20290
|
-
var
|
|
20291
|
-
var AntigravityRuleFrontmatterSchema =
|
|
20292
|
-
trigger:
|
|
20293
|
-
|
|
20294
|
-
|
|
20295
|
-
|
|
20296
|
-
|
|
20297
|
-
|
|
20298
|
-
|
|
20415
|
+
var import_mini75 = require("zod/mini");
|
|
20416
|
+
var AntigravityRuleFrontmatterSchema = import_mini75.z.looseObject({
|
|
20417
|
+
trigger: import_mini75.z.optional(
|
|
20418
|
+
import_mini75.z.union([
|
|
20419
|
+
import_mini75.z.literal("always_on"),
|
|
20420
|
+
import_mini75.z.literal("glob"),
|
|
20421
|
+
import_mini75.z.literal("manual"),
|
|
20422
|
+
import_mini75.z.literal("model_decision"),
|
|
20423
|
+
import_mini75.z.string()
|
|
20299
20424
|
// accepts any string for forward compatibility
|
|
20300
20425
|
])
|
|
20301
20426
|
),
|
|
20302
|
-
globs:
|
|
20303
|
-
description:
|
|
20427
|
+
globs: import_mini75.z.optional(import_mini75.z.string()),
|
|
20428
|
+
description: import_mini75.z.optional(import_mini75.z.string())
|
|
20304
20429
|
});
|
|
20305
20430
|
function parseGlobsString(globs) {
|
|
20306
20431
|
if (!globs) {
|
|
@@ -20887,9 +21012,9 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
|
|
|
20887
21012
|
|
|
20888
21013
|
// src/features/rules/claudecode-rule.ts
|
|
20889
21014
|
var import_node_path133 = require("path");
|
|
20890
|
-
var
|
|
20891
|
-
var ClaudecodeRuleFrontmatterSchema =
|
|
20892
|
-
paths:
|
|
21015
|
+
var import_mini76 = require("zod/mini");
|
|
21016
|
+
var ClaudecodeRuleFrontmatterSchema = import_mini76.z.object({
|
|
21017
|
+
paths: import_mini76.z.optional(import_mini76.z.array(import_mini76.z.string()))
|
|
20893
21018
|
});
|
|
20894
21019
|
var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
|
|
20895
21020
|
frontmatter;
|
|
@@ -21105,9 +21230,9 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
|
|
|
21105
21230
|
|
|
21106
21231
|
// src/features/rules/cline-rule.ts
|
|
21107
21232
|
var import_node_path134 = require("path");
|
|
21108
|
-
var
|
|
21109
|
-
var ClineRuleFrontmatterSchema =
|
|
21110
|
-
description:
|
|
21233
|
+
var import_mini77 = require("zod/mini");
|
|
21234
|
+
var ClineRuleFrontmatterSchema = import_mini77.z.object({
|
|
21235
|
+
description: import_mini77.z.string()
|
|
21111
21236
|
});
|
|
21112
21237
|
var ClineRule = class _ClineRule extends ToolRule {
|
|
21113
21238
|
static getSettablePaths(_options = {}) {
|
|
@@ -21286,14 +21411,14 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
|
|
|
21286
21411
|
|
|
21287
21412
|
// src/features/rules/copilot-rule.ts
|
|
21288
21413
|
var import_node_path136 = require("path");
|
|
21289
|
-
var
|
|
21290
|
-
var CopilotRuleFrontmatterSchema =
|
|
21291
|
-
description:
|
|
21292
|
-
applyTo:
|
|
21293
|
-
excludeAgent:
|
|
21414
|
+
var import_mini78 = require("zod/mini");
|
|
21415
|
+
var CopilotRuleFrontmatterSchema = import_mini78.z.object({
|
|
21416
|
+
description: import_mini78.z.optional(import_mini78.z.string()),
|
|
21417
|
+
applyTo: import_mini78.z.optional(import_mini78.z.string()),
|
|
21418
|
+
excludeAgent: import_mini78.z.optional(import_mini78.z.union([import_mini78.z.literal("code-review"), import_mini78.z.literal("coding-agent")]))
|
|
21294
21419
|
});
|
|
21295
|
-
var normalizeRelativePath = (
|
|
21296
|
-
var sameRelativePath = (
|
|
21420
|
+
var normalizeRelativePath = (p) => toPosixPath(p).replace(/\/+/g, "/");
|
|
21421
|
+
var sameRelativePath = (left, right) => normalizeRelativePath((0, import_node_path136.join)(left.dir, left.file)) === normalizeRelativePath((0, import_node_path136.join)(right.dir, right.file));
|
|
21297
21422
|
var CopilotRule = class _CopilotRule extends ToolRule {
|
|
21298
21423
|
frontmatter;
|
|
21299
21424
|
body;
|
|
@@ -21412,10 +21537,8 @@ var CopilotRule = class _CopilotRule extends ToolRule {
|
|
|
21412
21537
|
}) {
|
|
21413
21538
|
const paths = this.getSettablePaths({ global });
|
|
21414
21539
|
const isRoot = relativeDirPath ? sameRelativePath(
|
|
21415
|
-
relativeDirPath,
|
|
21416
|
-
relativeFilePath
|
|
21417
|
-
paths.root.relativeDirPath,
|
|
21418
|
-
paths.root.relativeFilePath
|
|
21540
|
+
{ dir: relativeDirPath, file: relativeFilePath },
|
|
21541
|
+
{ dir: paths.root.relativeDirPath, file: paths.root.relativeFilePath }
|
|
21419
21542
|
) : relativeFilePath === paths.root.relativeFilePath;
|
|
21420
21543
|
const resolvedRelativeDirPath = relativeDirPath ?? (isRoot ? paths.root.relativeDirPath : paths.nonRoot?.relativeDirPath ?? paths.root.relativeDirPath);
|
|
21421
21544
|
if (isRoot) {
|
|
@@ -21461,10 +21584,8 @@ var CopilotRule = class _CopilotRule extends ToolRule {
|
|
|
21461
21584
|
}) {
|
|
21462
21585
|
const paths = this.getSettablePaths({ global });
|
|
21463
21586
|
const isRoot = sameRelativePath(
|
|
21464
|
-
relativeDirPath,
|
|
21465
|
-
relativeFilePath
|
|
21466
|
-
paths.root.relativeDirPath,
|
|
21467
|
-
paths.root.relativeFilePath
|
|
21587
|
+
{ dir: relativeDirPath, file: relativeFilePath },
|
|
21588
|
+
{ dir: paths.root.relativeDirPath, file: paths.root.relativeFilePath }
|
|
21468
21589
|
);
|
|
21469
21590
|
return new _CopilotRule({
|
|
21470
21591
|
outputRoot,
|
|
@@ -21544,11 +21665,11 @@ var CopilotcliRule = class _CopilotcliRule extends CopilotRule {
|
|
|
21544
21665
|
|
|
21545
21666
|
// src/features/rules/cursor-rule.ts
|
|
21546
21667
|
var import_node_path137 = require("path");
|
|
21547
|
-
var
|
|
21548
|
-
var CursorRuleFrontmatterSchema =
|
|
21549
|
-
description:
|
|
21550
|
-
globs:
|
|
21551
|
-
alwaysApply:
|
|
21668
|
+
var import_mini79 = require("zod/mini");
|
|
21669
|
+
var CursorRuleFrontmatterSchema = import_mini79.z.object({
|
|
21670
|
+
description: import_mini79.z.optional(import_mini79.z.string()),
|
|
21671
|
+
globs: import_mini79.z.optional(import_mini79.z.string()),
|
|
21672
|
+
alwaysApply: import_mini79.z.optional(import_mini79.z.boolean())
|
|
21552
21673
|
});
|
|
21553
21674
|
var CursorRule = class _CursorRule extends ToolRule {
|
|
21554
21675
|
frontmatter;
|
|
@@ -23431,11 +23552,11 @@ var rulesProcessorToolTargets = [
|
|
|
23431
23552
|
"warp",
|
|
23432
23553
|
"windsurf"
|
|
23433
23554
|
];
|
|
23434
|
-
var RulesProcessorToolTargetSchema =
|
|
23555
|
+
var RulesProcessorToolTargetSchema = import_mini80.z.enum(rulesProcessorToolTargets);
|
|
23435
23556
|
var formatRulePaths = (rules) => rules.map((r) => (0, import_node_path154.join)(r.getRelativeDirPath(), r.getRelativeFilePath())).join(", ");
|
|
23436
|
-
var RulesFeatureOptionsSchema =
|
|
23437
|
-
ruleDiscoveryMode:
|
|
23438
|
-
includeLocalRoot:
|
|
23557
|
+
var RulesFeatureOptionsSchema = import_mini80.z.looseObject({
|
|
23558
|
+
ruleDiscoveryMode: import_mini80.z.optional(import_mini80.z.enum(["none", "explicit"])),
|
|
23559
|
+
includeLocalRoot: import_mini80.z.optional(import_mini80.z.boolean())
|
|
23439
23560
|
});
|
|
23440
23561
|
var resolveRuleDiscoveryMode = ({
|
|
23441
23562
|
defaultMode,
|
|
@@ -23456,8 +23577,8 @@ var resolveRuleDiscoveryMode = ({
|
|
|
23456
23577
|
}
|
|
23457
23578
|
return parsed.data.ruleDiscoveryMode === "none" ? "auto" : "toon";
|
|
23458
23579
|
};
|
|
23459
|
-
var IncludeLocalRootSchema =
|
|
23460
|
-
includeLocalRoot:
|
|
23580
|
+
var IncludeLocalRootSchema = import_mini80.z.looseObject({
|
|
23581
|
+
includeLocalRoot: import_mini80.z.optional(import_mini80.z.boolean())
|
|
23461
23582
|
});
|
|
23462
23583
|
var resolveIncludeLocalRoot = (options) => {
|
|
23463
23584
|
if (!options) return true;
|
|
@@ -24736,51 +24857,51 @@ var import_request_error = require("@octokit/request-error");
|
|
|
24736
24857
|
var import_rest = require("@octokit/rest");
|
|
24737
24858
|
|
|
24738
24859
|
// src/types/fetch.ts
|
|
24739
|
-
var
|
|
24860
|
+
var import_mini82 = require("zod/mini");
|
|
24740
24861
|
|
|
24741
24862
|
// src/types/fetch-targets.ts
|
|
24742
|
-
var
|
|
24863
|
+
var import_mini81 = require("zod/mini");
|
|
24743
24864
|
var ALL_FETCH_TARGETS = ["rulesync", ...ALL_TOOL_TARGETS];
|
|
24744
|
-
var FetchTargetSchema =
|
|
24865
|
+
var FetchTargetSchema = import_mini81.z.enum(ALL_FETCH_TARGETS);
|
|
24745
24866
|
|
|
24746
24867
|
// src/types/fetch.ts
|
|
24747
|
-
var ConflictStrategySchema =
|
|
24748
|
-
var GitHubFileTypeSchema =
|
|
24749
|
-
var GitHubFileEntrySchema =
|
|
24750
|
-
name:
|
|
24751
|
-
path:
|
|
24752
|
-
sha:
|
|
24753
|
-
size:
|
|
24868
|
+
var ConflictStrategySchema = import_mini82.z.enum(["skip", "overwrite"]);
|
|
24869
|
+
var GitHubFileTypeSchema = import_mini82.z.enum(["file", "dir", "symlink", "submodule"]);
|
|
24870
|
+
var GitHubFileEntrySchema = import_mini82.z.looseObject({
|
|
24871
|
+
name: import_mini82.z.string(),
|
|
24872
|
+
path: import_mini82.z.string(),
|
|
24873
|
+
sha: import_mini82.z.string(),
|
|
24874
|
+
size: import_mini82.z.number(),
|
|
24754
24875
|
type: GitHubFileTypeSchema,
|
|
24755
|
-
download_url:
|
|
24876
|
+
download_url: import_mini82.z.nullable(import_mini82.z.string())
|
|
24756
24877
|
});
|
|
24757
|
-
var FetchOptionsSchema =
|
|
24758
|
-
target:
|
|
24759
|
-
features:
|
|
24760
|
-
ref:
|
|
24761
|
-
path:
|
|
24762
|
-
output:
|
|
24763
|
-
conflict:
|
|
24764
|
-
token:
|
|
24765
|
-
verbose:
|
|
24766
|
-
silent:
|
|
24878
|
+
var FetchOptionsSchema = import_mini82.z.looseObject({
|
|
24879
|
+
target: import_mini82.z.optional(FetchTargetSchema),
|
|
24880
|
+
features: import_mini82.z.optional(import_mini82.z.array(import_mini82.z.enum(ALL_FEATURES_WITH_WILDCARD))),
|
|
24881
|
+
ref: import_mini82.z.optional(import_mini82.z.string()),
|
|
24882
|
+
path: import_mini82.z.optional(import_mini82.z.string()),
|
|
24883
|
+
output: import_mini82.z.optional(import_mini82.z.string()),
|
|
24884
|
+
conflict: import_mini82.z.optional(ConflictStrategySchema),
|
|
24885
|
+
token: import_mini82.z.optional(import_mini82.z.string()),
|
|
24886
|
+
verbose: import_mini82.z.optional(import_mini82.z.boolean()),
|
|
24887
|
+
silent: import_mini82.z.optional(import_mini82.z.boolean())
|
|
24767
24888
|
});
|
|
24768
|
-
var FetchFileStatusSchema =
|
|
24769
|
-
var GitHubRepoInfoSchema =
|
|
24770
|
-
default_branch:
|
|
24771
|
-
private:
|
|
24889
|
+
var FetchFileStatusSchema = import_mini82.z.enum(["created", "overwritten", "skipped"]);
|
|
24890
|
+
var GitHubRepoInfoSchema = import_mini82.z.looseObject({
|
|
24891
|
+
default_branch: import_mini82.z.string(),
|
|
24892
|
+
private: import_mini82.z.boolean()
|
|
24772
24893
|
});
|
|
24773
|
-
var GitHubReleaseAssetSchema =
|
|
24774
|
-
name:
|
|
24775
|
-
browser_download_url:
|
|
24776
|
-
size:
|
|
24894
|
+
var GitHubReleaseAssetSchema = import_mini82.z.looseObject({
|
|
24895
|
+
name: import_mini82.z.string(),
|
|
24896
|
+
browser_download_url: import_mini82.z.string(),
|
|
24897
|
+
size: import_mini82.z.number()
|
|
24777
24898
|
});
|
|
24778
|
-
var GitHubReleaseSchema =
|
|
24779
|
-
tag_name:
|
|
24780
|
-
name:
|
|
24781
|
-
prerelease:
|
|
24782
|
-
draft:
|
|
24783
|
-
assets:
|
|
24899
|
+
var GitHubReleaseSchema = import_mini82.z.looseObject({
|
|
24900
|
+
tag_name: import_mini82.z.string(),
|
|
24901
|
+
name: import_mini82.z.nullable(import_mini82.z.string()),
|
|
24902
|
+
prerelease: import_mini82.z.boolean(),
|
|
24903
|
+
draft: import_mini82.z.boolean(),
|
|
24904
|
+
assets: import_mini82.z.array(GitHubReleaseAssetSchema)
|
|
24784
24905
|
});
|
|
24785
24906
|
|
|
24786
24907
|
// src/lib/github-client.ts
|
|
@@ -25081,9 +25202,9 @@ async function listDirectoryRecursive(params) {
|
|
|
25081
25202
|
}
|
|
25082
25203
|
|
|
25083
25204
|
// src/types/git-provider.ts
|
|
25084
|
-
var
|
|
25205
|
+
var import_mini83 = require("zod/mini");
|
|
25085
25206
|
var ALL_GIT_PROVIDERS = ["github", "gitlab"];
|
|
25086
|
-
var GitProviderSchema =
|
|
25207
|
+
var GitProviderSchema = import_mini83.z.enum(ALL_GIT_PROVIDERS);
|
|
25087
25208
|
|
|
25088
25209
|
// src/lib/source-parser.ts
|
|
25089
25210
|
var GITHUB_HOSTS = /* @__PURE__ */ new Set(["github.com", "www.github.com"]);
|
|
@@ -27366,40 +27487,40 @@ var import_promise2 = require("es-toolkit/promise");
|
|
|
27366
27487
|
// src/lib/apm/apm-lock.ts
|
|
27367
27488
|
var import_node_path159 = require("path");
|
|
27368
27489
|
var import_js_yaml3 = require("js-yaml");
|
|
27369
|
-
var
|
|
27490
|
+
var import_mini84 = require("zod/mini");
|
|
27370
27491
|
var APM_LOCKFILE_FILE_NAME = "rulesync-apm.lock.yaml";
|
|
27371
27492
|
var APM_LOCKFILE_VERSION = "1";
|
|
27372
27493
|
var RULESYNC_CONTENT_HASH_REGEX = /^sha256:[0-9a-f]{64}$/;
|
|
27373
|
-
var ApmLockDependencySchema =
|
|
27374
|
-
repo_url:
|
|
27375
|
-
resolved_commit: (0,
|
|
27376
|
-
|
|
27494
|
+
var ApmLockDependencySchema = import_mini84.z.looseObject({
|
|
27495
|
+
repo_url: import_mini84.z.string(),
|
|
27496
|
+
resolved_commit: (0, import_mini84.optional)(
|
|
27497
|
+
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"))
|
|
27377
27498
|
),
|
|
27378
|
-
resolved_ref: (0,
|
|
27379
|
-
version: (0,
|
|
27380
|
-
depth:
|
|
27381
|
-
resolved_by: (0,
|
|
27382
|
-
package_type:
|
|
27499
|
+
resolved_ref: (0, import_mini84.optional)(import_mini84.z.string()),
|
|
27500
|
+
version: (0, import_mini84.optional)(import_mini84.z.string()),
|
|
27501
|
+
depth: import_mini84.z.int().check((0, import_mini84.nonnegative)()),
|
|
27502
|
+
resolved_by: (0, import_mini84.optional)(import_mini84.z.string()),
|
|
27503
|
+
package_type: import_mini84.z.string(),
|
|
27383
27504
|
// Intentionally loose: the upstream `apm` CLI may write content_hash values
|
|
27384
27505
|
// that do not match the strict rulesync format. We accept any string on read
|
|
27385
27506
|
// so that a lockfile produced by `apm` round-trips through rulesync without
|
|
27386
27507
|
// throwing. Rulesync itself always writes values matching
|
|
27387
27508
|
// `RULESYNC_CONTENT_HASH_REGEX`, and `--frozen` integrity checks only
|
|
27388
27509
|
// enforce the comparison when the recorded hash matches that shape.
|
|
27389
|
-
content_hash: (0,
|
|
27390
|
-
is_dev: (0,
|
|
27391
|
-
deployed_files:
|
|
27392
|
-
source: (0,
|
|
27393
|
-
local_path: (0,
|
|
27394
|
-
virtual_path: (0,
|
|
27395
|
-
is_virtual: (0,
|
|
27510
|
+
content_hash: (0, import_mini84.optional)(import_mini84.z.string()),
|
|
27511
|
+
is_dev: (0, import_mini84.optional)(import_mini84.z.boolean()),
|
|
27512
|
+
deployed_files: import_mini84.z.array(import_mini84.z.string()),
|
|
27513
|
+
source: (0, import_mini84.optional)(import_mini84.z.string()),
|
|
27514
|
+
local_path: (0, import_mini84.optional)(import_mini84.z.string()),
|
|
27515
|
+
virtual_path: (0, import_mini84.optional)(import_mini84.z.string()),
|
|
27516
|
+
is_virtual: (0, import_mini84.optional)(import_mini84.z.boolean())
|
|
27396
27517
|
});
|
|
27397
|
-
var ApmLockSchema =
|
|
27398
|
-
lockfile_version:
|
|
27399
|
-
generated_at:
|
|
27400
|
-
apm_version:
|
|
27401
|
-
dependencies:
|
|
27402
|
-
mcp_servers: (0,
|
|
27518
|
+
var ApmLockSchema = import_mini84.z.looseObject({
|
|
27519
|
+
lockfile_version: import_mini84.z.literal("1"),
|
|
27520
|
+
generated_at: import_mini84.z.string(),
|
|
27521
|
+
apm_version: import_mini84.z.string(),
|
|
27522
|
+
dependencies: import_mini84.z.array(ApmLockDependencySchema),
|
|
27523
|
+
mcp_servers: (0, import_mini84.optional)(import_mini84.z.array(import_mini84.z.string()))
|
|
27403
27524
|
});
|
|
27404
27525
|
function getApmLockPath(projectRoot) {
|
|
27405
27526
|
return (0, import_node_path159.join)(projectRoot, APM_LOCKFILE_FILE_NAME);
|
|
@@ -27459,22 +27580,22 @@ function findApmLockDependency(lock, repoUrl) {
|
|
|
27459
27580
|
// src/lib/apm/apm-manifest.ts
|
|
27460
27581
|
var import_node_path160 = require("path");
|
|
27461
27582
|
var import_js_yaml4 = require("js-yaml");
|
|
27462
|
-
var
|
|
27583
|
+
var import_mini85 = require("zod/mini");
|
|
27463
27584
|
var APM_MANIFEST_FILE_NAME = "apm.yml";
|
|
27464
|
-
var ApmObjectDependencySchema =
|
|
27465
|
-
git: (0,
|
|
27466
|
-
source: (0,
|
|
27467
|
-
path: (0,
|
|
27468
|
-
ref: (0,
|
|
27469
|
-
alias: (0,
|
|
27585
|
+
var ApmObjectDependencySchema = import_mini85.z.looseObject({
|
|
27586
|
+
git: (0, import_mini85.optional)(import_mini85.z.string()),
|
|
27587
|
+
source: (0, import_mini85.optional)(import_mini85.z.string()),
|
|
27588
|
+
path: (0, import_mini85.optional)(import_mini85.z.string()),
|
|
27589
|
+
ref: (0, import_mini85.optional)(import_mini85.z.string()),
|
|
27590
|
+
alias: (0, import_mini85.optional)(import_mini85.z.string())
|
|
27470
27591
|
});
|
|
27471
|
-
var ApmDependencyInputSchema =
|
|
27472
|
-
var ApmManifestSchema =
|
|
27473
|
-
name: (0,
|
|
27474
|
-
version: (0,
|
|
27475
|
-
dependencies: (0,
|
|
27476
|
-
|
|
27477
|
-
apm: (0,
|
|
27592
|
+
var ApmDependencyInputSchema = import_mini85.z.union([import_mini85.z.string(), ApmObjectDependencySchema]);
|
|
27593
|
+
var ApmManifestSchema = import_mini85.z.looseObject({
|
|
27594
|
+
name: (0, import_mini85.optional)(import_mini85.z.string()),
|
|
27595
|
+
version: (0, import_mini85.optional)(import_mini85.z.string()),
|
|
27596
|
+
dependencies: (0, import_mini85.optional)(
|
|
27597
|
+
import_mini85.z.looseObject({
|
|
27598
|
+
apm: (0, import_mini85.optional)(import_mini85.z.array(ApmDependencyInputSchema))
|
|
27478
27599
|
})
|
|
27479
27600
|
)
|
|
27480
27601
|
});
|
|
@@ -27996,29 +28117,29 @@ ${rest}`;
|
|
|
27996
28117
|
// src/lib/gh/gh-lock.ts
|
|
27997
28118
|
var import_node_path162 = require("path");
|
|
27998
28119
|
var import_js_yaml6 = require("js-yaml");
|
|
27999
|
-
var
|
|
28120
|
+
var import_mini86 = require("zod/mini");
|
|
28000
28121
|
var GH_LOCKFILE_FILE_NAME = "rulesync-gh.lock.yaml";
|
|
28001
28122
|
var GH_LOCKFILE_VERSION = "1";
|
|
28002
28123
|
var RULESYNC_CONTENT_HASH_REGEX2 = /^sha256:[0-9a-f]{64}$/;
|
|
28003
|
-
var ScopeSchema =
|
|
28004
|
-
var GhLockInstallationSchema =
|
|
28005
|
-
source:
|
|
28006
|
-
owner:
|
|
28007
|
-
repo:
|
|
28008
|
-
agent:
|
|
28124
|
+
var ScopeSchema = import_mini86.z.enum(["project", "user"]);
|
|
28125
|
+
var GhLockInstallationSchema = import_mini86.z.looseObject({
|
|
28126
|
+
source: import_mini86.z.string(),
|
|
28127
|
+
owner: import_mini86.z.string(),
|
|
28128
|
+
repo: import_mini86.z.string(),
|
|
28129
|
+
agent: import_mini86.z.string(),
|
|
28009
28130
|
scope: ScopeSchema,
|
|
28010
|
-
skill:
|
|
28011
|
-
requested_ref: (0,
|
|
28012
|
-
resolved_ref:
|
|
28013
|
-
resolved_commit:
|
|
28014
|
-
install_dir:
|
|
28015
|
-
deployed_files:
|
|
28016
|
-
content_hash: (0,
|
|
28131
|
+
skill: import_mini86.z.string(),
|
|
28132
|
+
requested_ref: (0, import_mini86.optional)(import_mini86.z.string()),
|
|
28133
|
+
resolved_ref: import_mini86.z.string(),
|
|
28134
|
+
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")),
|
|
28135
|
+
install_dir: import_mini86.z.string(),
|
|
28136
|
+
deployed_files: import_mini86.z.array(import_mini86.z.string()),
|
|
28137
|
+
content_hash: (0, import_mini86.optional)(import_mini86.z.string())
|
|
28017
28138
|
});
|
|
28018
|
-
var GhLockSchema =
|
|
28019
|
-
lockfile_version:
|
|
28020
|
-
generated_at:
|
|
28021
|
-
installations:
|
|
28139
|
+
var GhLockSchema = import_mini86.z.looseObject({
|
|
28140
|
+
lockfile_version: import_mini86.z.literal("1"),
|
|
28141
|
+
generated_at: import_mini86.z.string(),
|
|
28142
|
+
installations: import_mini86.z.array(GhLockInstallationSchema)
|
|
28022
28143
|
});
|
|
28023
28144
|
function getGhLockPath(projectRoot) {
|
|
28024
28145
|
return (0, import_node_path162.join)(projectRoot, GH_LOCKFILE_FILE_NAME);
|
|
@@ -28703,27 +28824,27 @@ async function walkDirectory(dir, outputRoot, depth = 0, ctx = { totalFiles: 0,
|
|
|
28703
28824
|
// src/lib/sources-lock.ts
|
|
28704
28825
|
var import_node_crypto3 = require("crypto");
|
|
28705
28826
|
var import_node_path166 = require("path");
|
|
28706
|
-
var
|
|
28827
|
+
var import_mini87 = require("zod/mini");
|
|
28707
28828
|
var LOCKFILE_VERSION = 1;
|
|
28708
|
-
var LockedSkillSchema =
|
|
28709
|
-
integrity:
|
|
28829
|
+
var LockedSkillSchema = import_mini87.z.object({
|
|
28830
|
+
integrity: import_mini87.z.string()
|
|
28710
28831
|
});
|
|
28711
|
-
var LockedSourceSchema =
|
|
28712
|
-
requestedRef: (0,
|
|
28713
|
-
resolvedRef:
|
|
28714
|
-
resolvedAt: (0,
|
|
28715
|
-
skills:
|
|
28832
|
+
var LockedSourceSchema = import_mini87.z.object({
|
|
28833
|
+
requestedRef: (0, import_mini87.optional)(import_mini87.z.string()),
|
|
28834
|
+
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")),
|
|
28835
|
+
resolvedAt: (0, import_mini87.optional)(import_mini87.z.string()),
|
|
28836
|
+
skills: import_mini87.z.record(import_mini87.z.string(), LockedSkillSchema)
|
|
28716
28837
|
});
|
|
28717
|
-
var SourcesLockSchema =
|
|
28718
|
-
lockfileVersion:
|
|
28719
|
-
sources:
|
|
28838
|
+
var SourcesLockSchema = import_mini87.z.object({
|
|
28839
|
+
lockfileVersion: import_mini87.z.number(),
|
|
28840
|
+
sources: import_mini87.z.record(import_mini87.z.string(), LockedSourceSchema)
|
|
28720
28841
|
});
|
|
28721
|
-
var LegacyLockedSourceSchema =
|
|
28722
|
-
resolvedRef:
|
|
28723
|
-
skills:
|
|
28842
|
+
var LegacyLockedSourceSchema = import_mini87.z.object({
|
|
28843
|
+
resolvedRef: import_mini87.z.string(),
|
|
28844
|
+
skills: import_mini87.z.array(import_mini87.z.string())
|
|
28724
28845
|
});
|
|
28725
|
-
var LegacySourcesLockSchema =
|
|
28726
|
-
sources:
|
|
28846
|
+
var LegacySourcesLockSchema = import_mini87.z.object({
|
|
28847
|
+
sources: import_mini87.z.record(import_mini87.z.string(), LegacyLockedSourceSchema)
|
|
28727
28848
|
});
|
|
28728
28849
|
function migrateLegacyLock(params) {
|
|
28729
28850
|
const { legacy, logger: logger5 } = params;
|
|
@@ -29496,11 +29617,11 @@ async function runGhInstall(logger5, options) {
|
|
|
29496
29617
|
var import_fastmcp = require("fastmcp");
|
|
29497
29618
|
|
|
29498
29619
|
// src/mcp/tools.ts
|
|
29499
|
-
var
|
|
29620
|
+
var import_mini99 = require("zod/mini");
|
|
29500
29621
|
|
|
29501
29622
|
// src/mcp/commands.ts
|
|
29502
29623
|
var import_node_path168 = require("path");
|
|
29503
|
-
var
|
|
29624
|
+
var import_mini88 = require("zod/mini");
|
|
29504
29625
|
var logger = new ConsoleLogger({ verbose: false, silent: true });
|
|
29505
29626
|
var maxCommandSizeBytes = 1024 * 1024;
|
|
29506
29627
|
var maxCommandsCount = 1e3;
|
|
@@ -29628,17 +29749,17 @@ async function deleteCommand({ relativePathFromCwd }) {
|
|
|
29628
29749
|
}
|
|
29629
29750
|
}
|
|
29630
29751
|
var commandToolSchemas = {
|
|
29631
|
-
listCommands:
|
|
29632
|
-
getCommand:
|
|
29633
|
-
relativePathFromCwd:
|
|
29752
|
+
listCommands: import_mini88.z.object({}),
|
|
29753
|
+
getCommand: import_mini88.z.object({
|
|
29754
|
+
relativePathFromCwd: import_mini88.z.string()
|
|
29634
29755
|
}),
|
|
29635
|
-
putCommand:
|
|
29636
|
-
relativePathFromCwd:
|
|
29756
|
+
putCommand: import_mini88.z.object({
|
|
29757
|
+
relativePathFromCwd: import_mini88.z.string(),
|
|
29637
29758
|
frontmatter: RulesyncCommandFrontmatterSchema,
|
|
29638
|
-
body:
|
|
29759
|
+
body: import_mini88.z.string()
|
|
29639
29760
|
}),
|
|
29640
|
-
deleteCommand:
|
|
29641
|
-
relativePathFromCwd:
|
|
29761
|
+
deleteCommand: import_mini88.z.object({
|
|
29762
|
+
relativePathFromCwd: import_mini88.z.string()
|
|
29642
29763
|
})
|
|
29643
29764
|
};
|
|
29644
29765
|
var commandTools = {
|
|
@@ -29686,13 +29807,13 @@ var commandTools = {
|
|
|
29686
29807
|
};
|
|
29687
29808
|
|
|
29688
29809
|
// src/mcp/convert.ts
|
|
29689
|
-
var
|
|
29690
|
-
var convertOptionsSchema =
|
|
29691
|
-
from:
|
|
29692
|
-
to:
|
|
29693
|
-
features:
|
|
29694
|
-
global:
|
|
29695
|
-
dryRun:
|
|
29810
|
+
var import_mini89 = require("zod/mini");
|
|
29811
|
+
var convertOptionsSchema = import_mini89.z.object({
|
|
29812
|
+
from: import_mini89.z.string(),
|
|
29813
|
+
to: import_mini89.z.array(import_mini89.z.string()),
|
|
29814
|
+
features: import_mini89.z.optional(import_mini89.z.array(import_mini89.z.string())),
|
|
29815
|
+
global: import_mini89.z.optional(import_mini89.z.boolean()),
|
|
29816
|
+
dryRun: import_mini89.z.optional(import_mini89.z.boolean())
|
|
29696
29817
|
});
|
|
29697
29818
|
function parseToolTarget2(value, label) {
|
|
29698
29819
|
const result = ToolTargetSchema.safeParse(value);
|
|
@@ -29788,15 +29909,15 @@ var convertTools = {
|
|
|
29788
29909
|
};
|
|
29789
29910
|
|
|
29790
29911
|
// src/mcp/generate.ts
|
|
29791
|
-
var
|
|
29792
|
-
var generateOptionsSchema =
|
|
29793
|
-
targets:
|
|
29794
|
-
features:
|
|
29795
|
-
delete:
|
|
29796
|
-
global:
|
|
29797
|
-
simulateCommands:
|
|
29798
|
-
simulateSubagents:
|
|
29799
|
-
simulateSkills:
|
|
29912
|
+
var import_mini90 = require("zod/mini");
|
|
29913
|
+
var generateOptionsSchema = import_mini90.z.object({
|
|
29914
|
+
targets: import_mini90.z.optional(import_mini90.z.array(import_mini90.z.string())),
|
|
29915
|
+
features: import_mini90.z.optional(import_mini90.z.array(import_mini90.z.string())),
|
|
29916
|
+
delete: import_mini90.z.optional(import_mini90.z.boolean()),
|
|
29917
|
+
global: import_mini90.z.optional(import_mini90.z.boolean()),
|
|
29918
|
+
simulateCommands: import_mini90.z.optional(import_mini90.z.boolean()),
|
|
29919
|
+
simulateSubagents: import_mini90.z.optional(import_mini90.z.boolean()),
|
|
29920
|
+
simulateSkills: import_mini90.z.optional(import_mini90.z.boolean())
|
|
29800
29921
|
});
|
|
29801
29922
|
async function executeGenerate(options = {}) {
|
|
29802
29923
|
try {
|
|
@@ -29876,7 +29997,7 @@ var generateTools = {
|
|
|
29876
29997
|
|
|
29877
29998
|
// src/mcp/hooks.ts
|
|
29878
29999
|
var import_node_path169 = require("path");
|
|
29879
|
-
var
|
|
30000
|
+
var import_mini91 = require("zod/mini");
|
|
29880
30001
|
var maxHooksSizeBytes = 1024 * 1024;
|
|
29881
30002
|
async function getHooksFile() {
|
|
29882
30003
|
try {
|
|
@@ -29965,11 +30086,11 @@ async function deleteHooksFile() {
|
|
|
29965
30086
|
}
|
|
29966
30087
|
}
|
|
29967
30088
|
var hooksToolSchemas = {
|
|
29968
|
-
getHooksFile:
|
|
29969
|
-
putHooksFile:
|
|
29970
|
-
content:
|
|
30089
|
+
getHooksFile: import_mini91.z.object({}),
|
|
30090
|
+
putHooksFile: import_mini91.z.object({
|
|
30091
|
+
content: import_mini91.z.string()
|
|
29971
30092
|
}),
|
|
29972
|
-
deleteHooksFile:
|
|
30093
|
+
deleteHooksFile: import_mini91.z.object({})
|
|
29973
30094
|
};
|
|
29974
30095
|
var hooksTools = {
|
|
29975
30096
|
getHooksFile: {
|
|
@@ -30003,7 +30124,7 @@ var hooksTools = {
|
|
|
30003
30124
|
|
|
30004
30125
|
// src/mcp/ignore.ts
|
|
30005
30126
|
var import_node_path170 = require("path");
|
|
30006
|
-
var
|
|
30127
|
+
var import_mini92 = require("zod/mini");
|
|
30007
30128
|
var maxIgnoreFileSizeBytes = 100 * 1024;
|
|
30008
30129
|
async function getIgnoreFile() {
|
|
30009
30130
|
const ignoreFilePath = (0, import_node_path170.join)(process.cwd(), RULESYNC_AIIGNORE_RELATIVE_FILE_PATH);
|
|
@@ -30066,11 +30187,11 @@ async function deleteIgnoreFile() {
|
|
|
30066
30187
|
}
|
|
30067
30188
|
}
|
|
30068
30189
|
var ignoreToolSchemas = {
|
|
30069
|
-
getIgnoreFile:
|
|
30070
|
-
putIgnoreFile:
|
|
30071
|
-
content:
|
|
30190
|
+
getIgnoreFile: import_mini92.z.object({}),
|
|
30191
|
+
putIgnoreFile: import_mini92.z.object({
|
|
30192
|
+
content: import_mini92.z.string()
|
|
30072
30193
|
}),
|
|
30073
|
-
deleteIgnoreFile:
|
|
30194
|
+
deleteIgnoreFile: import_mini92.z.object({})
|
|
30074
30195
|
};
|
|
30075
30196
|
var ignoreTools = {
|
|
30076
30197
|
getIgnoreFile: {
|
|
@@ -30103,11 +30224,11 @@ var ignoreTools = {
|
|
|
30103
30224
|
};
|
|
30104
30225
|
|
|
30105
30226
|
// src/mcp/import.ts
|
|
30106
|
-
var
|
|
30107
|
-
var importOptionsSchema =
|
|
30108
|
-
target:
|
|
30109
|
-
features:
|
|
30110
|
-
global:
|
|
30227
|
+
var import_mini93 = require("zod/mini");
|
|
30228
|
+
var importOptionsSchema = import_mini93.z.object({
|
|
30229
|
+
target: import_mini93.z.string(),
|
|
30230
|
+
features: import_mini93.z.optional(import_mini93.z.array(import_mini93.z.string())),
|
|
30231
|
+
global: import_mini93.z.optional(import_mini93.z.boolean())
|
|
30111
30232
|
});
|
|
30112
30233
|
async function executeImport(options) {
|
|
30113
30234
|
try {
|
|
@@ -30179,7 +30300,7 @@ var importTools = {
|
|
|
30179
30300
|
|
|
30180
30301
|
// src/mcp/mcp.ts
|
|
30181
30302
|
var import_node_path171 = require("path");
|
|
30182
|
-
var
|
|
30303
|
+
var import_mini94 = require("zod/mini");
|
|
30183
30304
|
var maxMcpSizeBytes = 1024 * 1024;
|
|
30184
30305
|
async function getMcpFile() {
|
|
30185
30306
|
try {
|
|
@@ -30281,11 +30402,11 @@ async function deleteMcpFile() {
|
|
|
30281
30402
|
}
|
|
30282
30403
|
}
|
|
30283
30404
|
var mcpToolSchemas = {
|
|
30284
|
-
getMcpFile:
|
|
30285
|
-
putMcpFile:
|
|
30286
|
-
content:
|
|
30405
|
+
getMcpFile: import_mini94.z.object({}),
|
|
30406
|
+
putMcpFile: import_mini94.z.object({
|
|
30407
|
+
content: import_mini94.z.string()
|
|
30287
30408
|
}),
|
|
30288
|
-
deleteMcpFile:
|
|
30409
|
+
deleteMcpFile: import_mini94.z.object({})
|
|
30289
30410
|
};
|
|
30290
30411
|
var mcpTools = {
|
|
30291
30412
|
getMcpFile: {
|
|
@@ -30319,7 +30440,7 @@ var mcpTools = {
|
|
|
30319
30440
|
|
|
30320
30441
|
// src/mcp/permissions.ts
|
|
30321
30442
|
var import_node_path172 = require("path");
|
|
30322
|
-
var
|
|
30443
|
+
var import_mini95 = require("zod/mini");
|
|
30323
30444
|
var maxPermissionsSizeBytes = 1024 * 1024;
|
|
30324
30445
|
async function getPermissionsFile() {
|
|
30325
30446
|
try {
|
|
@@ -30408,11 +30529,11 @@ async function deletePermissionsFile() {
|
|
|
30408
30529
|
}
|
|
30409
30530
|
}
|
|
30410
30531
|
var permissionsToolSchemas = {
|
|
30411
|
-
getPermissionsFile:
|
|
30412
|
-
putPermissionsFile:
|
|
30413
|
-
content:
|
|
30532
|
+
getPermissionsFile: import_mini95.z.object({}),
|
|
30533
|
+
putPermissionsFile: import_mini95.z.object({
|
|
30534
|
+
content: import_mini95.z.string()
|
|
30414
30535
|
}),
|
|
30415
|
-
deletePermissionsFile:
|
|
30536
|
+
deletePermissionsFile: import_mini95.z.object({})
|
|
30416
30537
|
};
|
|
30417
30538
|
var permissionsTools = {
|
|
30418
30539
|
getPermissionsFile: {
|
|
@@ -30446,7 +30567,7 @@ var permissionsTools = {
|
|
|
30446
30567
|
|
|
30447
30568
|
// src/mcp/rules.ts
|
|
30448
30569
|
var import_node_path173 = require("path");
|
|
30449
|
-
var
|
|
30570
|
+
var import_mini96 = require("zod/mini");
|
|
30450
30571
|
var logger2 = new ConsoleLogger({ verbose: false, silent: true });
|
|
30451
30572
|
var maxRuleSizeBytes = 1024 * 1024;
|
|
30452
30573
|
var maxRulesCount = 1e3;
|
|
@@ -30570,17 +30691,17 @@ async function deleteRule({ relativePathFromCwd }) {
|
|
|
30570
30691
|
}
|
|
30571
30692
|
}
|
|
30572
30693
|
var ruleToolSchemas = {
|
|
30573
|
-
listRules:
|
|
30574
|
-
getRule:
|
|
30575
|
-
relativePathFromCwd:
|
|
30694
|
+
listRules: import_mini96.z.object({}),
|
|
30695
|
+
getRule: import_mini96.z.object({
|
|
30696
|
+
relativePathFromCwd: import_mini96.z.string()
|
|
30576
30697
|
}),
|
|
30577
|
-
putRule:
|
|
30578
|
-
relativePathFromCwd:
|
|
30698
|
+
putRule: import_mini96.z.object({
|
|
30699
|
+
relativePathFromCwd: import_mini96.z.string(),
|
|
30579
30700
|
frontmatter: RulesyncRuleFrontmatterSchema,
|
|
30580
|
-
body:
|
|
30701
|
+
body: import_mini96.z.string()
|
|
30581
30702
|
}),
|
|
30582
|
-
deleteRule:
|
|
30583
|
-
relativePathFromCwd:
|
|
30703
|
+
deleteRule: import_mini96.z.object({
|
|
30704
|
+
relativePathFromCwd: import_mini96.z.string()
|
|
30584
30705
|
})
|
|
30585
30706
|
};
|
|
30586
30707
|
var ruleTools = {
|
|
@@ -30629,7 +30750,7 @@ var ruleTools = {
|
|
|
30629
30750
|
|
|
30630
30751
|
// src/mcp/skills.ts
|
|
30631
30752
|
var import_node_path174 = require("path");
|
|
30632
|
-
var
|
|
30753
|
+
var import_mini97 = require("zod/mini");
|
|
30633
30754
|
var logger3 = new ConsoleLogger({ verbose: false, silent: true });
|
|
30634
30755
|
var maxSkillSizeBytes = 1024 * 1024;
|
|
30635
30756
|
var maxSkillsCount = 1e3;
|
|
@@ -30802,23 +30923,23 @@ async function deleteSkill({
|
|
|
30802
30923
|
);
|
|
30803
30924
|
}
|
|
30804
30925
|
}
|
|
30805
|
-
var McpSkillFileSchema =
|
|
30806
|
-
name:
|
|
30807
|
-
body:
|
|
30926
|
+
var McpSkillFileSchema = import_mini97.z.object({
|
|
30927
|
+
name: import_mini97.z.string(),
|
|
30928
|
+
body: import_mini97.z.string()
|
|
30808
30929
|
});
|
|
30809
30930
|
var skillToolSchemas = {
|
|
30810
|
-
listSkills:
|
|
30811
|
-
getSkill:
|
|
30812
|
-
relativeDirPathFromCwd:
|
|
30931
|
+
listSkills: import_mini97.z.object({}),
|
|
30932
|
+
getSkill: import_mini97.z.object({
|
|
30933
|
+
relativeDirPathFromCwd: import_mini97.z.string()
|
|
30813
30934
|
}),
|
|
30814
|
-
putSkill:
|
|
30815
|
-
relativeDirPathFromCwd:
|
|
30935
|
+
putSkill: import_mini97.z.object({
|
|
30936
|
+
relativeDirPathFromCwd: import_mini97.z.string(),
|
|
30816
30937
|
frontmatter: RulesyncSkillFrontmatterSchema,
|
|
30817
|
-
body:
|
|
30818
|
-
otherFiles:
|
|
30938
|
+
body: import_mini97.z.string(),
|
|
30939
|
+
otherFiles: import_mini97.z.optional(import_mini97.z.array(McpSkillFileSchema))
|
|
30819
30940
|
}),
|
|
30820
|
-
deleteSkill:
|
|
30821
|
-
relativeDirPathFromCwd:
|
|
30941
|
+
deleteSkill: import_mini97.z.object({
|
|
30942
|
+
relativeDirPathFromCwd: import_mini97.z.string()
|
|
30822
30943
|
})
|
|
30823
30944
|
};
|
|
30824
30945
|
var skillTools = {
|
|
@@ -30868,7 +30989,7 @@ var skillTools = {
|
|
|
30868
30989
|
|
|
30869
30990
|
// src/mcp/subagents.ts
|
|
30870
30991
|
var import_node_path175 = require("path");
|
|
30871
|
-
var
|
|
30992
|
+
var import_mini98 = require("zod/mini");
|
|
30872
30993
|
var logger4 = new ConsoleLogger({ verbose: false, silent: true });
|
|
30873
30994
|
var maxSubagentSizeBytes = 1024 * 1024;
|
|
30874
30995
|
var maxSubagentsCount = 1e3;
|
|
@@ -30997,17 +31118,17 @@ async function deleteSubagent({ relativePathFromCwd }) {
|
|
|
30997
31118
|
}
|
|
30998
31119
|
}
|
|
30999
31120
|
var subagentToolSchemas = {
|
|
31000
|
-
listSubagents:
|
|
31001
|
-
getSubagent:
|
|
31002
|
-
relativePathFromCwd:
|
|
31121
|
+
listSubagents: import_mini98.z.object({}),
|
|
31122
|
+
getSubagent: import_mini98.z.object({
|
|
31123
|
+
relativePathFromCwd: import_mini98.z.string()
|
|
31003
31124
|
}),
|
|
31004
|
-
putSubagent:
|
|
31005
|
-
relativePathFromCwd:
|
|
31125
|
+
putSubagent: import_mini98.z.object({
|
|
31126
|
+
relativePathFromCwd: import_mini98.z.string(),
|
|
31006
31127
|
frontmatter: RulesyncSubagentFrontmatterSchema,
|
|
31007
|
-
body:
|
|
31128
|
+
body: import_mini98.z.string()
|
|
31008
31129
|
}),
|
|
31009
|
-
deleteSubagent:
|
|
31010
|
-
relativePathFromCwd:
|
|
31130
|
+
deleteSubagent: import_mini98.z.object({
|
|
31131
|
+
relativePathFromCwd: import_mini98.z.string()
|
|
31011
31132
|
})
|
|
31012
31133
|
};
|
|
31013
31134
|
var subagentTools = {
|
|
@@ -31055,7 +31176,7 @@ var subagentTools = {
|
|
|
31055
31176
|
};
|
|
31056
31177
|
|
|
31057
31178
|
// src/mcp/tools.ts
|
|
31058
|
-
var rulesyncFeatureSchema =
|
|
31179
|
+
var rulesyncFeatureSchema = import_mini99.z.enum([
|
|
31059
31180
|
"rule",
|
|
31060
31181
|
"command",
|
|
31061
31182
|
"subagent",
|
|
@@ -31068,22 +31189,22 @@ var rulesyncFeatureSchema = import_mini98.z.enum([
|
|
|
31068
31189
|
"import",
|
|
31069
31190
|
"convert"
|
|
31070
31191
|
]);
|
|
31071
|
-
var rulesyncOperationSchema =
|
|
31072
|
-
var skillFileSchema =
|
|
31073
|
-
name:
|
|
31074
|
-
body:
|
|
31192
|
+
var rulesyncOperationSchema = import_mini99.z.enum(["list", "get", "put", "delete", "run"]);
|
|
31193
|
+
var skillFileSchema = import_mini99.z.object({
|
|
31194
|
+
name: import_mini99.z.string(),
|
|
31195
|
+
body: import_mini99.z.string()
|
|
31075
31196
|
});
|
|
31076
|
-
var rulesyncToolSchema =
|
|
31197
|
+
var rulesyncToolSchema = import_mini99.z.object({
|
|
31077
31198
|
feature: rulesyncFeatureSchema,
|
|
31078
31199
|
operation: rulesyncOperationSchema,
|
|
31079
|
-
targetPathFromCwd:
|
|
31080
|
-
frontmatter:
|
|
31081
|
-
body:
|
|
31082
|
-
otherFiles:
|
|
31083
|
-
content:
|
|
31084
|
-
generateOptions:
|
|
31085
|
-
importOptions:
|
|
31086
|
-
convertOptions:
|
|
31200
|
+
targetPathFromCwd: import_mini99.z.optional(import_mini99.z.string()),
|
|
31201
|
+
frontmatter: import_mini99.z.optional(import_mini99.z.unknown()),
|
|
31202
|
+
body: import_mini99.z.optional(import_mini99.z.string()),
|
|
31203
|
+
otherFiles: import_mini99.z.optional(import_mini99.z.array(skillFileSchema)),
|
|
31204
|
+
content: import_mini99.z.optional(import_mini99.z.string()),
|
|
31205
|
+
generateOptions: import_mini99.z.optional(generateOptionsSchema),
|
|
31206
|
+
importOptions: import_mini99.z.optional(importOptionsSchema),
|
|
31207
|
+
convertOptions: import_mini99.z.optional(convertOptionsSchema)
|
|
31087
31208
|
});
|
|
31088
31209
|
var supportedOperationsByFeature = {
|
|
31089
31210
|
rule: ["list", "get", "put", "delete"],
|
|
@@ -31753,7 +31874,7 @@ function wrapCommand({
|
|
|
31753
31874
|
}
|
|
31754
31875
|
|
|
31755
31876
|
// src/cli/index.ts
|
|
31756
|
-
var getVersion = () => "8.
|
|
31877
|
+
var getVersion = () => "8.19.0";
|
|
31757
31878
|
function wrapCommand2(name, errorCode, handler) {
|
|
31758
31879
|
return wrapCommand({ name, errorCode, handler, getVersion });
|
|
31759
31880
|
}
|