rulesync 8.6.0 → 8.7.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-ILMHM7BF.js → chunk-QGQQJNZD.js} +460 -464
- package/dist/cli/index.cjs +2474 -864
- package/dist/cli/index.js +1831 -211
- package/dist/index.cjs +457 -464
- package/dist/index.js +1 -1
- package/package.json +3 -2
|
@@ -349,7 +349,13 @@ var SourceEntrySchema = z3.object({
|
|
|
349
349
|
refine((v) => !isAbsolute(v), "path must not be absolute"),
|
|
350
350
|
refine((v) => !hasControlCharacters(v), "path must not contain control characters")
|
|
351
351
|
)
|
|
352
|
-
)
|
|
352
|
+
),
|
|
353
|
+
// gh-mode-only fields. Ignored by --mode rulesync. Defaults applied at the
|
|
354
|
+
// gh install site (`agent` defaults to "github-copilot", `scope` to "project").
|
|
355
|
+
agent: optional(
|
|
356
|
+
z3.enum(["github-copilot", "claude-code", "cursor", "codex", "gemini", "antigravity"])
|
|
357
|
+
),
|
|
358
|
+
scope: optional(z3.enum(["project", "user"]))
|
|
353
359
|
});
|
|
354
360
|
var ConfigParamsSchema = z3.object({
|
|
355
361
|
baseDirs: z3.array(z3.string()),
|
|
@@ -3769,7 +3775,7 @@ var CommandsProcessor = class extends FeatureProcessor {
|
|
|
3769
3775
|
};
|
|
3770
3776
|
|
|
3771
3777
|
// src/features/hooks/hooks-processor.ts
|
|
3772
|
-
import { z as
|
|
3778
|
+
import { z as z19 } from "zod/mini";
|
|
3773
3779
|
|
|
3774
3780
|
// src/types/hooks.ts
|
|
3775
3781
|
import { z as z16 } from "zod/mini";
|
|
@@ -4073,22 +4079,34 @@ function canonicalToToolHooks({
|
|
|
4073
4079
|
`matcher "${matcherKey}" on "${eventName}" hook will be ignored \u2014 this event does not support matchers`
|
|
4074
4080
|
);
|
|
4075
4081
|
}
|
|
4076
|
-
const hooks =
|
|
4082
|
+
const hooks = [];
|
|
4083
|
+
for (const def of defs) {
|
|
4084
|
+
const hookType = def.type ?? "command";
|
|
4085
|
+
if (converterConfig.supportedHookTypes && !converterConfig.supportedHookTypes.has(hookType)) {
|
|
4086
|
+
continue;
|
|
4087
|
+
}
|
|
4077
4088
|
const commandText = def.command;
|
|
4078
4089
|
const trimmedCommand = typeof commandText === "string" ? commandText.trimStart() : void 0;
|
|
4079
|
-
const shouldPrefix = typeof trimmedCommand === "string" && !trimmedCommand.startsWith("$") && (!converterConfig.prefixDotRelativeCommandsOnly || trimmedCommand.startsWith("."));
|
|
4090
|
+
const shouldPrefix = converterConfig.projectDirVar !== "" && typeof trimmedCommand === "string" && !trimmedCommand.startsWith("$") && (!converterConfig.prefixDotRelativeCommandsOnly || trimmedCommand.startsWith("."));
|
|
4080
4091
|
const command = shouldPrefix && typeof trimmedCommand === "string" ? `${converterConfig.projectDirVar}/${trimmedCommand.replace(/^\.\//, "")}` : def.command;
|
|
4081
|
-
|
|
4082
|
-
type:
|
|
4092
|
+
hooks.push({
|
|
4093
|
+
type: hookType,
|
|
4083
4094
|
...command !== void 0 && command !== null && { command },
|
|
4084
4095
|
...def.timeout !== void 0 && def.timeout !== null && { timeout: def.timeout },
|
|
4085
|
-
...def.prompt !== void 0 && def.prompt !== null && { prompt: def.prompt }
|
|
4086
|
-
|
|
4087
|
-
|
|
4096
|
+
...def.prompt !== void 0 && def.prompt !== null && { prompt: def.prompt },
|
|
4097
|
+
...converterConfig.passthroughFields?.includes("name") && def.name !== void 0 && def.name !== null && { name: def.name },
|
|
4098
|
+
...converterConfig.passthroughFields?.includes("description") && def.description !== void 0 && def.description !== null && { description: def.description }
|
|
4099
|
+
});
|
|
4100
|
+
}
|
|
4101
|
+
if (hooks.length === 0) {
|
|
4102
|
+
continue;
|
|
4103
|
+
}
|
|
4088
4104
|
const includeMatcher = matcherKey && !isNoMatcherEvent;
|
|
4089
4105
|
entries.push(includeMatcher ? { matcher: matcherKey, hooks } : { hooks });
|
|
4090
4106
|
}
|
|
4091
|
-
|
|
4107
|
+
if (entries.length > 0) {
|
|
4108
|
+
result[toolEventName] = entries;
|
|
4109
|
+
}
|
|
4092
4110
|
}
|
|
4093
4111
|
return result;
|
|
4094
4112
|
}
|
|
@@ -4109,7 +4127,7 @@ function toolHooksToCanonical({
|
|
|
4109
4127
|
const hookDefs = rawEntry.hooks ?? [];
|
|
4110
4128
|
for (const h of hookDefs) {
|
|
4111
4129
|
const cmd = typeof h.command === "string" ? h.command : void 0;
|
|
4112
|
-
const command = typeof cmd === "string" && cmd.includes(`${converterConfig.projectDirVar}/`) ? cmd.replace(
|
|
4130
|
+
const command = converterConfig.projectDirVar !== "" && typeof cmd === "string" && cmd.includes(`${converterConfig.projectDirVar}/`) ? cmd.replace(
|
|
4113
4131
|
new RegExp(
|
|
4114
4132
|
`^${converterConfig.projectDirVar.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}\\/?`
|
|
4115
4133
|
),
|
|
@@ -4123,6 +4141,8 @@ function toolHooksToCanonical({
|
|
|
4123
4141
|
...command !== void 0 && command !== null && { command },
|
|
4124
4142
|
...timeout !== void 0 && timeout !== null && { timeout },
|
|
4125
4143
|
...prompt !== void 0 && prompt !== null && { prompt },
|
|
4144
|
+
...converterConfig.passthroughFields?.includes("name") && typeof h.name === "string" && { name: h.name },
|
|
4145
|
+
...converterConfig.passthroughFields?.includes("description") && typeof h.description === "string" && { description: h.description },
|
|
4126
4146
|
...rawEntry.matcher !== void 0 && rawEntry.matcher !== null && rawEntry.matcher !== "" && { matcher: rawEntry.matcher }
|
|
4127
4147
|
});
|
|
4128
4148
|
}
|
|
@@ -4221,6 +4241,9 @@ var ToolHooks = class extends ToolFile {
|
|
|
4221
4241
|
static forDeletion(_params) {
|
|
4222
4242
|
throw new Error("Please implement this method in the subclass.");
|
|
4223
4243
|
}
|
|
4244
|
+
static async getAuxiliaryFiles(_params) {
|
|
4245
|
+
return [];
|
|
4246
|
+
}
|
|
4224
4247
|
};
|
|
4225
4248
|
|
|
4226
4249
|
// src/features/hooks/claudecode-hooks.ts
|
|
@@ -4342,89 +4365,28 @@ var ClaudecodeHooks = class _ClaudecodeHooks extends ToolHooks {
|
|
|
4342
4365
|
// src/features/hooks/codexcli-hooks.ts
|
|
4343
4366
|
import { join as join23 } from "path";
|
|
4344
4367
|
import * as smolToml2 from "smol-toml";
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
}
|
|
4354
|
-
const effectiveHooks = {
|
|
4355
|
-
...sharedHooks,
|
|
4356
|
-
...config.codexcli?.hooks
|
|
4357
|
-
};
|
|
4358
|
-
const codex = {};
|
|
4359
|
-
for (const [eventName, definitions] of Object.entries(effectiveHooks)) {
|
|
4360
|
-
const codexEventName = CANONICAL_TO_CODEXCLI_EVENT_NAMES[eventName] ?? eventName;
|
|
4361
|
-
const byMatcher = /* @__PURE__ */ new Map();
|
|
4362
|
-
for (const def of definitions) {
|
|
4363
|
-
const key = def.matcher ?? "";
|
|
4364
|
-
const list = byMatcher.get(key);
|
|
4365
|
-
if (list) list.push(def);
|
|
4366
|
-
else byMatcher.set(key, [def]);
|
|
4367
|
-
}
|
|
4368
|
-
const entries = [];
|
|
4369
|
-
for (const [matcherKey, defs] of byMatcher) {
|
|
4370
|
-
const commandDefs = defs.filter((def) => !def.type || def.type === "command");
|
|
4371
|
-
if (commandDefs.length === 0) continue;
|
|
4372
|
-
const hooks = commandDefs.map((def) => ({
|
|
4373
|
-
type: "command",
|
|
4374
|
-
...def.command !== void 0 && def.command !== null && { command: def.command },
|
|
4375
|
-
...def.timeout !== void 0 && def.timeout !== null && { timeout: def.timeout }
|
|
4376
|
-
}));
|
|
4377
|
-
entries.push(matcherKey ? { matcher: matcherKey, hooks } : { hooks });
|
|
4378
|
-
}
|
|
4379
|
-
if (entries.length > 0) {
|
|
4380
|
-
codex[codexEventName] = entries;
|
|
4381
|
-
}
|
|
4382
|
-
}
|
|
4383
|
-
return codex;
|
|
4384
|
-
}
|
|
4385
|
-
var CodexHookEntrySchema = z17.looseObject({
|
|
4386
|
-
type: z17.optional(z17.string()),
|
|
4387
|
-
command: z17.optional(z17.string()),
|
|
4388
|
-
timeout: z17.optional(z17.number())
|
|
4389
|
-
});
|
|
4390
|
-
var CodexMatcherEntrySchema = z17.looseObject({
|
|
4391
|
-
matcher: z17.optional(z17.string()),
|
|
4392
|
-
hooks: z17.optional(z17.array(CodexHookEntrySchema))
|
|
4393
|
-
});
|
|
4394
|
-
function codexcliHooksToCanonical(codexHooks) {
|
|
4395
|
-
if (codexHooks === null || codexHooks === void 0 || typeof codexHooks !== "object") {
|
|
4396
|
-
return {};
|
|
4397
|
-
}
|
|
4398
|
-
const canonical = {};
|
|
4399
|
-
for (const [codexEventName, matcherEntries] of Object.entries(codexHooks)) {
|
|
4400
|
-
const eventName = CODEXCLI_TO_CANONICAL_EVENT_NAMES[codexEventName] ?? codexEventName;
|
|
4401
|
-
if (!Array.isArray(matcherEntries)) continue;
|
|
4402
|
-
const defs = [];
|
|
4403
|
-
for (const rawEntry of matcherEntries) {
|
|
4404
|
-
const parseResult = CodexMatcherEntrySchema.safeParse(rawEntry);
|
|
4405
|
-
if (!parseResult.success) continue;
|
|
4406
|
-
const entry = parseResult.data;
|
|
4407
|
-
const hooks = entry.hooks ?? [];
|
|
4408
|
-
for (const h of hooks) {
|
|
4409
|
-
const hookType = h.type === "command" || h.type === "prompt" ? h.type : "command";
|
|
4410
|
-
defs.push({
|
|
4411
|
-
type: hookType,
|
|
4412
|
-
...h.command !== void 0 && h.command !== null && { command: h.command },
|
|
4413
|
-
...h.timeout !== void 0 && h.timeout !== null && { timeout: h.timeout },
|
|
4414
|
-
...entry.matcher !== void 0 && entry.matcher !== null && entry.matcher !== "" && { matcher: entry.matcher }
|
|
4415
|
-
});
|
|
4416
|
-
}
|
|
4417
|
-
}
|
|
4418
|
-
if (defs.length > 0) {
|
|
4419
|
-
canonical[eventName] = defs;
|
|
4420
|
-
}
|
|
4421
|
-
}
|
|
4422
|
-
return canonical;
|
|
4423
|
-
}
|
|
4368
|
+
var CODEXCLI_CONVERTER_CONFIG = {
|
|
4369
|
+
supportedEvents: CODEXCLI_HOOK_EVENTS,
|
|
4370
|
+
canonicalToToolEventNames: CANONICAL_TO_CODEXCLI_EVENT_NAMES,
|
|
4371
|
+
toolToCanonicalEventNames: CODEXCLI_TO_CANONICAL_EVENT_NAMES,
|
|
4372
|
+
projectDirVar: "",
|
|
4373
|
+
supportedHookTypes: /* @__PURE__ */ new Set(["command"]),
|
|
4374
|
+
passthroughFields: ["name", "description"]
|
|
4375
|
+
};
|
|
4424
4376
|
async function buildCodexConfigTomlContent({ baseDir }) {
|
|
4425
4377
|
const configPath = join23(baseDir, ".codex", "config.toml");
|
|
4426
4378
|
const existingContent = await readFileContentOrNull(configPath) ?? smolToml2.stringify({});
|
|
4427
|
-
|
|
4379
|
+
let configToml;
|
|
4380
|
+
try {
|
|
4381
|
+
configToml = smolToml2.parse(existingContent);
|
|
4382
|
+
} catch (error) {
|
|
4383
|
+
throw new Error(
|
|
4384
|
+
`Failed to parse existing Codex CLI config at ${configPath}: ${formatError(error)}`,
|
|
4385
|
+
{
|
|
4386
|
+
cause: error
|
|
4387
|
+
}
|
|
4388
|
+
);
|
|
4389
|
+
}
|
|
4428
4390
|
if (typeof configToml.features !== "object" || configToml.features === null) {
|
|
4429
4391
|
configToml.features = {};
|
|
4430
4392
|
}
|
|
@@ -4479,7 +4441,11 @@ var CodexcliHooks = class _CodexcliHooks extends ToolHooks {
|
|
|
4479
4441
|
}) {
|
|
4480
4442
|
const paths = _CodexcliHooks.getSettablePaths({ global });
|
|
4481
4443
|
const config = rulesyncHooks.getJson();
|
|
4482
|
-
const codexHooks =
|
|
4444
|
+
const codexHooks = canonicalToToolHooks({
|
|
4445
|
+
config,
|
|
4446
|
+
toolOverrideHooks: config.codexcli?.hooks,
|
|
4447
|
+
converterConfig: CODEXCLI_CONVERTER_CONFIG
|
|
4448
|
+
});
|
|
4483
4449
|
const fileContent = JSON.stringify({ hooks: codexHooks }, null, 2);
|
|
4484
4450
|
return new _CodexcliHooks({
|
|
4485
4451
|
baseDir,
|
|
@@ -4501,7 +4467,10 @@ var CodexcliHooks = class _CodexcliHooks extends ToolHooks {
|
|
|
4501
4467
|
}
|
|
4502
4468
|
);
|
|
4503
4469
|
}
|
|
4504
|
-
const hooks =
|
|
4470
|
+
const hooks = toolHooksToCanonical({
|
|
4471
|
+
hooks: parsed.hooks,
|
|
4472
|
+
converterConfig: CODEXCLI_CONVERTER_CONFIG
|
|
4473
|
+
});
|
|
4505
4474
|
return this.toRulesyncHooksDefault({
|
|
4506
4475
|
fileContent: JSON.stringify({ version: 1, hooks }, null, 2)
|
|
4507
4476
|
});
|
|
@@ -4522,16 +4491,21 @@ var CodexcliHooks = class _CodexcliHooks extends ToolHooks {
|
|
|
4522
4491
|
validate: false
|
|
4523
4492
|
});
|
|
4524
4493
|
}
|
|
4494
|
+
static async getAuxiliaryFiles({
|
|
4495
|
+
baseDir = process.cwd()
|
|
4496
|
+
} = {}) {
|
|
4497
|
+
return [await CodexcliConfigToml.fromBaseDir({ baseDir })];
|
|
4498
|
+
}
|
|
4525
4499
|
};
|
|
4526
4500
|
|
|
4527
4501
|
// src/features/hooks/copilot-hooks.ts
|
|
4528
4502
|
import { join as join24 } from "path";
|
|
4529
|
-
import { z as
|
|
4530
|
-
var CopilotHookEntrySchema =
|
|
4531
|
-
type:
|
|
4532
|
-
bash:
|
|
4533
|
-
powershell:
|
|
4534
|
-
timeoutSec:
|
|
4503
|
+
import { z as z17 } from "zod/mini";
|
|
4504
|
+
var CopilotHookEntrySchema = z17.looseObject({
|
|
4505
|
+
type: z17.string(),
|
|
4506
|
+
bash: z17.optional(z17.string()),
|
|
4507
|
+
powershell: z17.optional(z17.string()),
|
|
4508
|
+
timeoutSec: z17.optional(z17.number())
|
|
4535
4509
|
});
|
|
4536
4510
|
function canonicalToCopilotHooks(config) {
|
|
4537
4511
|
const canonicalSchemaKeys = Object.keys(HookDefinitionSchema.shape);
|
|
@@ -5062,7 +5036,7 @@ var FactorydroidHooks = class _FactorydroidHooks extends ToolHooks {
|
|
|
5062
5036
|
|
|
5063
5037
|
// src/features/hooks/geminicli-hooks.ts
|
|
5064
5038
|
import { join as join28 } from "path";
|
|
5065
|
-
import { z as
|
|
5039
|
+
import { z as z18 } from "zod/mini";
|
|
5066
5040
|
function canonicalToGeminicliHooks(config) {
|
|
5067
5041
|
const geminiSupported = new Set(GEMINICLI_HOOK_EVENTS);
|
|
5068
5042
|
const sharedHooks = {};
|
|
@@ -5106,16 +5080,16 @@ function canonicalToGeminicliHooks(config) {
|
|
|
5106
5080
|
}
|
|
5107
5081
|
return gemini;
|
|
5108
5082
|
}
|
|
5109
|
-
var GeminiHookEntrySchema =
|
|
5110
|
-
type:
|
|
5111
|
-
command:
|
|
5112
|
-
timeout:
|
|
5113
|
-
name:
|
|
5114
|
-
description:
|
|
5083
|
+
var GeminiHookEntrySchema = z18.looseObject({
|
|
5084
|
+
type: z18.optional(z18.string()),
|
|
5085
|
+
command: z18.optional(z18.string()),
|
|
5086
|
+
timeout: z18.optional(z18.number()),
|
|
5087
|
+
name: z18.optional(z18.string()),
|
|
5088
|
+
description: z18.optional(z18.string())
|
|
5115
5089
|
});
|
|
5116
|
-
var GeminiMatcherEntrySchema =
|
|
5117
|
-
matcher:
|
|
5118
|
-
hooks:
|
|
5090
|
+
var GeminiMatcherEntrySchema = z18.looseObject({
|
|
5091
|
+
matcher: z18.optional(z18.string()),
|
|
5092
|
+
hooks: z18.optional(z18.array(GeminiHookEntrySchema))
|
|
5119
5093
|
});
|
|
5120
5094
|
function geminiHooksToCanonical(geminiHooks) {
|
|
5121
5095
|
if (geminiHooks === null || geminiHooks === void 0 || typeof geminiHooks !== "object") {
|
|
@@ -5499,7 +5473,7 @@ var hooksProcessorToolTargetTuple = [
|
|
|
5499
5473
|
"geminicli",
|
|
5500
5474
|
"deepagents"
|
|
5501
5475
|
];
|
|
5502
|
-
var HooksProcessorToolTargetSchema =
|
|
5476
|
+
var HooksProcessorToolTargetSchema = z19.enum(hooksProcessorToolTargetTuple);
|
|
5503
5477
|
var toolHooksFactories = /* @__PURE__ */ new Map([
|
|
5504
5478
|
[
|
|
5505
5479
|
"cursor",
|
|
@@ -5758,8 +5732,12 @@ var HooksProcessor = class extends FeatureProcessor {
|
|
|
5758
5732
|
global: this.global
|
|
5759
5733
|
});
|
|
5760
5734
|
const result = [toolHooks];
|
|
5761
|
-
|
|
5762
|
-
|
|
5735
|
+
const auxiliaryFiles = await factory.class.getAuxiliaryFiles?.({
|
|
5736
|
+
baseDir: this.baseDir,
|
|
5737
|
+
global: this.global
|
|
5738
|
+
});
|
|
5739
|
+
if (auxiliaryFiles && auxiliaryFiles.length > 0) {
|
|
5740
|
+
result.push(...auxiliaryFiles);
|
|
5763
5741
|
}
|
|
5764
5742
|
return result;
|
|
5765
5743
|
}
|
|
@@ -5779,7 +5757,7 @@ var HooksProcessor = class extends FeatureProcessor {
|
|
|
5779
5757
|
};
|
|
5780
5758
|
|
|
5781
5759
|
// src/features/ignore/ignore-processor.ts
|
|
5782
|
-
import { z as
|
|
5760
|
+
import { z as z21 } from "zod/mini";
|
|
5783
5761
|
|
|
5784
5762
|
// src/features/ignore/augmentcode-ignore.ts
|
|
5785
5763
|
import { join as join32 } from "path";
|
|
@@ -5958,12 +5936,12 @@ var AugmentcodeIgnore = class _AugmentcodeIgnore extends ToolIgnore {
|
|
|
5958
5936
|
// src/features/ignore/claudecode-ignore.ts
|
|
5959
5937
|
import { join as join33 } from "path";
|
|
5960
5938
|
import { uniq } from "es-toolkit";
|
|
5961
|
-
import { z as
|
|
5939
|
+
import { z as z20 } from "zod/mini";
|
|
5962
5940
|
var SHARED_SETTINGS_FILE = "settings.json";
|
|
5963
5941
|
var LOCAL_SETTINGS_FILE = "settings.local.json";
|
|
5964
5942
|
var DEFAULT_FILE_MODE = "shared";
|
|
5965
|
-
var ClaudecodeIgnoreOptionsSchema =
|
|
5966
|
-
fileMode:
|
|
5943
|
+
var ClaudecodeIgnoreOptionsSchema = z20.looseObject({
|
|
5944
|
+
fileMode: z20.optional(z20.enum(["shared", "local"]))
|
|
5967
5945
|
});
|
|
5968
5946
|
var resolveFileMode = (options) => {
|
|
5969
5947
|
if (!options) return DEFAULT_FILE_MODE;
|
|
@@ -6807,7 +6785,7 @@ var ignoreProcessorToolTargets = [
|
|
|
6807
6785
|
"windsurf",
|
|
6808
6786
|
"zed"
|
|
6809
6787
|
];
|
|
6810
|
-
var IgnoreProcessorToolTargetSchema =
|
|
6788
|
+
var IgnoreProcessorToolTargetSchema = z21.enum(ignoreProcessorToolTargets);
|
|
6811
6789
|
var toolIgnoreFactories = /* @__PURE__ */ new Map([
|
|
6812
6790
|
["augmentcode", { class: AugmentcodeIgnore }],
|
|
6813
6791
|
["claudecode", { class: ClaudecodeIgnore }],
|
|
@@ -6950,7 +6928,7 @@ var IgnoreProcessor = class extends FeatureProcessor {
|
|
|
6950
6928
|
};
|
|
6951
6929
|
|
|
6952
6930
|
// src/features/mcp/mcp-processor.ts
|
|
6953
|
-
import { z as
|
|
6931
|
+
import { z as z26 } from "zod/mini";
|
|
6954
6932
|
|
|
6955
6933
|
// src/features/mcp/claudecode-mcp.ts
|
|
6956
6934
|
import { join as join46 } from "path";
|
|
@@ -6958,47 +6936,47 @@ import { join as join46 } from "path";
|
|
|
6958
6936
|
// src/features/mcp/rulesync-mcp.ts
|
|
6959
6937
|
import { join as join45 } from "path";
|
|
6960
6938
|
import { omit } from "es-toolkit/object";
|
|
6961
|
-
import { z as
|
|
6939
|
+
import { z as z23 } from "zod/mini";
|
|
6962
6940
|
|
|
6963
6941
|
// src/types/mcp.ts
|
|
6964
|
-
import { z as
|
|
6965
|
-
var McpServerSchema =
|
|
6966
|
-
type:
|
|
6967
|
-
command:
|
|
6968
|
-
args:
|
|
6969
|
-
url:
|
|
6970
|
-
httpUrl:
|
|
6971
|
-
env:
|
|
6972
|
-
disabled:
|
|
6973
|
-
networkTimeout:
|
|
6974
|
-
timeout:
|
|
6975
|
-
trust:
|
|
6976
|
-
cwd:
|
|
6977
|
-
transport:
|
|
6978
|
-
alwaysAllow:
|
|
6979
|
-
tools:
|
|
6980
|
-
kiroAutoApprove:
|
|
6981
|
-
kiroAutoBlock:
|
|
6982
|
-
headers:
|
|
6983
|
-
enabledTools:
|
|
6984
|
-
disabledTools:
|
|
6942
|
+
import { z as z22 } from "zod/mini";
|
|
6943
|
+
var McpServerSchema = z22.looseObject({
|
|
6944
|
+
type: z22.optional(z22.enum(["local", "stdio", "sse", "http"])),
|
|
6945
|
+
command: z22.optional(z22.union([z22.string(), z22.array(z22.string())])),
|
|
6946
|
+
args: z22.optional(z22.array(z22.string())),
|
|
6947
|
+
url: z22.optional(z22.string()),
|
|
6948
|
+
httpUrl: z22.optional(z22.string()),
|
|
6949
|
+
env: z22.optional(z22.record(z22.string(), z22.string())),
|
|
6950
|
+
disabled: z22.optional(z22.boolean()),
|
|
6951
|
+
networkTimeout: z22.optional(z22.number()),
|
|
6952
|
+
timeout: z22.optional(z22.number()),
|
|
6953
|
+
trust: z22.optional(z22.boolean()),
|
|
6954
|
+
cwd: z22.optional(z22.string()),
|
|
6955
|
+
transport: z22.optional(z22.enum(["local", "stdio", "sse", "http"])),
|
|
6956
|
+
alwaysAllow: z22.optional(z22.array(z22.string())),
|
|
6957
|
+
tools: z22.optional(z22.array(z22.string())),
|
|
6958
|
+
kiroAutoApprove: z22.optional(z22.array(z22.string())),
|
|
6959
|
+
kiroAutoBlock: z22.optional(z22.array(z22.string())),
|
|
6960
|
+
headers: z22.optional(z22.record(z22.string(), z22.string())),
|
|
6961
|
+
enabledTools: z22.optional(z22.array(z22.string())),
|
|
6962
|
+
disabledTools: z22.optional(z22.array(z22.string()))
|
|
6985
6963
|
});
|
|
6986
|
-
var McpServersSchema =
|
|
6964
|
+
var McpServersSchema = z22.record(z22.string(), McpServerSchema);
|
|
6987
6965
|
function isMcpServers(value) {
|
|
6988
6966
|
return value !== void 0 && value !== null && typeof value === "object" && !Array.isArray(value);
|
|
6989
6967
|
}
|
|
6990
6968
|
|
|
6991
6969
|
// src/features/mcp/rulesync-mcp.ts
|
|
6992
|
-
var RulesyncMcpServerSchema =
|
|
6993
|
-
targets:
|
|
6994
|
-
description:
|
|
6995
|
-
exposed:
|
|
6970
|
+
var RulesyncMcpServerSchema = z23.extend(McpServerSchema, {
|
|
6971
|
+
targets: z23.optional(RulesyncTargetsSchema),
|
|
6972
|
+
description: z23.optional(z23.string()),
|
|
6973
|
+
exposed: z23.optional(z23.boolean())
|
|
6996
6974
|
});
|
|
6997
|
-
var RulesyncMcpConfigSchema =
|
|
6998
|
-
mcpServers:
|
|
6975
|
+
var RulesyncMcpConfigSchema = z23.object({
|
|
6976
|
+
mcpServers: z23.record(z23.string(), RulesyncMcpServerSchema)
|
|
6999
6977
|
});
|
|
7000
|
-
var RulesyncMcpFileSchema =
|
|
7001
|
-
$schema:
|
|
6978
|
+
var RulesyncMcpFileSchema = z23.looseObject({
|
|
6979
|
+
$schema: z23.optional(z23.string()),
|
|
7002
6980
|
...RulesyncMcpConfigSchema.shape
|
|
7003
6981
|
});
|
|
7004
6982
|
var RulesyncMcp = class _RulesyncMcp extends RulesyncFile {
|
|
@@ -8201,25 +8179,25 @@ var JunieMcp = class _JunieMcp extends ToolMcp {
|
|
|
8201
8179
|
// src/features/mcp/kilo-mcp.ts
|
|
8202
8180
|
import { join as join56 } from "path";
|
|
8203
8181
|
import { parse as parseJsonc3 } from "jsonc-parser";
|
|
8204
|
-
import { z as
|
|
8205
|
-
var KiloMcpLocalServerSchema =
|
|
8206
|
-
type:
|
|
8207
|
-
command:
|
|
8208
|
-
environment:
|
|
8209
|
-
enabled:
|
|
8210
|
-
cwd:
|
|
8182
|
+
import { z as z24 } from "zod/mini";
|
|
8183
|
+
var KiloMcpLocalServerSchema = z24.object({
|
|
8184
|
+
type: z24.literal("local"),
|
|
8185
|
+
command: z24.array(z24.string()),
|
|
8186
|
+
environment: z24.optional(z24.record(z24.string(), z24.string())),
|
|
8187
|
+
enabled: z24._default(z24.boolean(), true),
|
|
8188
|
+
cwd: z24.optional(z24.string())
|
|
8211
8189
|
});
|
|
8212
|
-
var KiloMcpRemoteServerSchema =
|
|
8213
|
-
type:
|
|
8214
|
-
url:
|
|
8215
|
-
headers:
|
|
8216
|
-
enabled:
|
|
8190
|
+
var KiloMcpRemoteServerSchema = z24.object({
|
|
8191
|
+
type: z24.literal("remote"),
|
|
8192
|
+
url: z24.string(),
|
|
8193
|
+
headers: z24.optional(z24.record(z24.string(), z24.string())),
|
|
8194
|
+
enabled: z24._default(z24.boolean(), true)
|
|
8217
8195
|
});
|
|
8218
|
-
var KiloMcpServerSchema =
|
|
8219
|
-
var KiloConfigSchema =
|
|
8220
|
-
$schema:
|
|
8221
|
-
mcp:
|
|
8222
|
-
tools:
|
|
8196
|
+
var KiloMcpServerSchema = z24.union([KiloMcpLocalServerSchema, KiloMcpRemoteServerSchema]);
|
|
8197
|
+
var KiloConfigSchema = z24.looseObject({
|
|
8198
|
+
$schema: z24.optional(z24.string()),
|
|
8199
|
+
mcp: z24.optional(z24.record(z24.string(), KiloMcpServerSchema)),
|
|
8200
|
+
tools: z24.optional(z24.record(z24.string(), z24.boolean()))
|
|
8223
8201
|
});
|
|
8224
8202
|
function convertFromKiloFormat(kiloMcp, tools) {
|
|
8225
8203
|
return Object.fromEntries(
|
|
@@ -8516,28 +8494,28 @@ var KiroMcp = class _KiroMcp extends ToolMcp {
|
|
|
8516
8494
|
// src/features/mcp/opencode-mcp.ts
|
|
8517
8495
|
import { join as join58 } from "path";
|
|
8518
8496
|
import { parse as parseJsonc4 } from "jsonc-parser";
|
|
8519
|
-
import { z as
|
|
8520
|
-
var OpencodeMcpLocalServerSchema =
|
|
8521
|
-
type:
|
|
8522
|
-
command:
|
|
8523
|
-
environment:
|
|
8524
|
-
enabled:
|
|
8525
|
-
cwd:
|
|
8497
|
+
import { z as z25 } from "zod/mini";
|
|
8498
|
+
var OpencodeMcpLocalServerSchema = z25.object({
|
|
8499
|
+
type: z25.literal("local"),
|
|
8500
|
+
command: z25.array(z25.string()),
|
|
8501
|
+
environment: z25.optional(z25.record(z25.string(), z25.string())),
|
|
8502
|
+
enabled: z25._default(z25.boolean(), true),
|
|
8503
|
+
cwd: z25.optional(z25.string())
|
|
8526
8504
|
});
|
|
8527
|
-
var OpencodeMcpRemoteServerSchema =
|
|
8528
|
-
type:
|
|
8529
|
-
url:
|
|
8530
|
-
headers:
|
|
8531
|
-
enabled:
|
|
8505
|
+
var OpencodeMcpRemoteServerSchema = z25.object({
|
|
8506
|
+
type: z25.literal("remote"),
|
|
8507
|
+
url: z25.string(),
|
|
8508
|
+
headers: z25.optional(z25.record(z25.string(), z25.string())),
|
|
8509
|
+
enabled: z25._default(z25.boolean(), true)
|
|
8532
8510
|
});
|
|
8533
|
-
var OpencodeMcpServerSchema =
|
|
8511
|
+
var OpencodeMcpServerSchema = z25.union([
|
|
8534
8512
|
OpencodeMcpLocalServerSchema,
|
|
8535
8513
|
OpencodeMcpRemoteServerSchema
|
|
8536
8514
|
]);
|
|
8537
|
-
var OpencodeConfigSchema =
|
|
8538
|
-
$schema:
|
|
8539
|
-
mcp:
|
|
8540
|
-
tools:
|
|
8515
|
+
var OpencodeConfigSchema = z25.looseObject({
|
|
8516
|
+
$schema: z25.optional(z25.string()),
|
|
8517
|
+
mcp: z25.optional(z25.record(z25.string(), OpencodeMcpServerSchema)),
|
|
8518
|
+
tools: z25.optional(z25.record(z25.string(), z25.boolean()))
|
|
8541
8519
|
});
|
|
8542
8520
|
function convertFromOpencodeFormat(opencodeMcp, tools) {
|
|
8543
8521
|
return Object.fromEntries(
|
|
@@ -9008,7 +8986,7 @@ var mcpProcessorToolTargetTuple = [
|
|
|
9008
8986
|
"roo",
|
|
9009
8987
|
"rovodev"
|
|
9010
8988
|
];
|
|
9011
|
-
var McpProcessorToolTargetSchema =
|
|
8989
|
+
var McpProcessorToolTargetSchema = z26.enum(mcpProcessorToolTargetTuple);
|
|
9012
8990
|
var toolMcpFactories = /* @__PURE__ */ new Map([
|
|
9013
8991
|
[
|
|
9014
8992
|
"claudecode",
|
|
@@ -9347,7 +9325,7 @@ var McpProcessor = class extends FeatureProcessor {
|
|
|
9347
9325
|
};
|
|
9348
9326
|
|
|
9349
9327
|
// src/features/permissions/permissions-processor.ts
|
|
9350
|
-
import { z as
|
|
9328
|
+
import { z as z31 } from "zod/mini";
|
|
9351
9329
|
|
|
9352
9330
|
// src/features/permissions/claudecode-permissions.ts
|
|
9353
9331
|
import { join as join62 } from "path";
|
|
@@ -9357,14 +9335,14 @@ import { uniq as uniq3 } from "es-toolkit";
|
|
|
9357
9335
|
import { join as join61 } from "path";
|
|
9358
9336
|
|
|
9359
9337
|
// src/types/permissions.ts
|
|
9360
|
-
import { z as
|
|
9361
|
-
var PermissionActionSchema =
|
|
9362
|
-
var PermissionRulesSchema =
|
|
9363
|
-
var PermissionsConfigSchema =
|
|
9364
|
-
permission:
|
|
9338
|
+
import { z as z27 } from "zod/mini";
|
|
9339
|
+
var PermissionActionSchema = z27.enum(["allow", "ask", "deny"]);
|
|
9340
|
+
var PermissionRulesSchema = z27.record(z27.string(), PermissionActionSchema);
|
|
9341
|
+
var PermissionsConfigSchema = z27.looseObject({
|
|
9342
|
+
permission: z27.record(z27.string(), PermissionRulesSchema)
|
|
9365
9343
|
});
|
|
9366
|
-
var RulesyncPermissionsFileSchema =
|
|
9367
|
-
$schema:
|
|
9344
|
+
var RulesyncPermissionsFileSchema = z27.looseObject({
|
|
9345
|
+
$schema: z27.optional(z27.string()),
|
|
9368
9346
|
...PermissionsConfigSchema.shape
|
|
9369
9347
|
});
|
|
9370
9348
|
|
|
@@ -9934,7 +9912,7 @@ function mapBashActionToDecision(action) {
|
|
|
9934
9912
|
// src/features/permissions/geminicli-permissions.ts
|
|
9935
9913
|
import { join as join64 } from "path";
|
|
9936
9914
|
import * as smolToml5 from "smol-toml";
|
|
9937
|
-
import { z as
|
|
9915
|
+
import { z as z28 } from "zod/mini";
|
|
9938
9916
|
var GEMINICLI_POLICY_RELATIVE_DIR_PATH = join64(".gemini", "policies");
|
|
9939
9917
|
var GEMINICLI_POLICY_FILE_NAME = "rulesync.toml";
|
|
9940
9918
|
var RULESYNC_TO_GEMINICLI_TOOL_NAME = {
|
|
@@ -10262,14 +10240,14 @@ function regexToGlobPattern(regex) {
|
|
|
10262
10240
|
}
|
|
10263
10241
|
return glob;
|
|
10264
10242
|
}
|
|
10265
|
-
var GeminicliPolicyRuleSchema =
|
|
10266
|
-
toolName:
|
|
10267
|
-
decision:
|
|
10268
|
-
commandPrefix:
|
|
10269
|
-
argsPattern:
|
|
10243
|
+
var GeminicliPolicyRuleSchema = z28.looseObject({
|
|
10244
|
+
toolName: z28.string(),
|
|
10245
|
+
decision: z28.optional(z28.unknown()),
|
|
10246
|
+
commandPrefix: z28.optional(z28.string()),
|
|
10247
|
+
argsPattern: z28.optional(z28.string())
|
|
10270
10248
|
});
|
|
10271
|
-
var GeminicliPolicyFileSchema =
|
|
10272
|
-
rule:
|
|
10249
|
+
var GeminicliPolicyFileSchema = z28.looseObject({
|
|
10250
|
+
rule: z28.optional(z28.array(z28.looseObject({})))
|
|
10273
10251
|
});
|
|
10274
10252
|
function extractRules(parsed, logger) {
|
|
10275
10253
|
const parsedFile = GeminicliPolicyFileSchema.safeParse(parsed);
|
|
@@ -10305,12 +10283,12 @@ function extractPattern(rule) {
|
|
|
10305
10283
|
|
|
10306
10284
|
// src/features/permissions/kiro-permissions.ts
|
|
10307
10285
|
import { join as join65 } from "path";
|
|
10308
|
-
import { z as
|
|
10309
|
-
var KiroAgentSchema =
|
|
10310
|
-
allowedTools:
|
|
10311
|
-
toolsSettings:
|
|
10286
|
+
import { z as z29 } from "zod/mini";
|
|
10287
|
+
var KiroAgentSchema = z29.looseObject({
|
|
10288
|
+
allowedTools: z29.optional(z29.array(z29.string())),
|
|
10289
|
+
toolsSettings: z29.optional(z29.record(z29.string(), z29.unknown()))
|
|
10312
10290
|
});
|
|
10313
|
-
var UnknownRecordSchema =
|
|
10291
|
+
var UnknownRecordSchema = z29.record(z29.string(), z29.unknown());
|
|
10314
10292
|
var KiroPermissions = class _KiroPermissions extends ToolPermissions {
|
|
10315
10293
|
static getSettablePaths(_options = {}) {
|
|
10316
10294
|
return {
|
|
@@ -10463,8 +10441,12 @@ function buildKiroPermissionsFromRulesync({
|
|
|
10463
10441
|
);
|
|
10464
10442
|
continue;
|
|
10465
10443
|
}
|
|
10466
|
-
|
|
10467
|
-
|
|
10444
|
+
const toolName = category === "webfetch" ? "web_fetch" : "web_search";
|
|
10445
|
+
if (action === "allow") {
|
|
10446
|
+
nextAllowedTools.add(toolName);
|
|
10447
|
+
} else {
|
|
10448
|
+
nextAllowedTools.delete(toolName);
|
|
10449
|
+
}
|
|
10468
10450
|
} else {
|
|
10469
10451
|
logger?.warn(`Kiro permissions do not support category: ${category}. Skipping.`);
|
|
10470
10452
|
}
|
|
@@ -10490,13 +10472,13 @@ function asStringArray(value) {
|
|
|
10490
10472
|
// src/features/permissions/opencode-permissions.ts
|
|
10491
10473
|
import { join as join66 } from "path";
|
|
10492
10474
|
import { parse as parseJsonc5 } from "jsonc-parser";
|
|
10493
|
-
import { z as
|
|
10494
|
-
var OpencodePermissionSchema =
|
|
10495
|
-
|
|
10496
|
-
|
|
10475
|
+
import { z as z30 } from "zod/mini";
|
|
10476
|
+
var OpencodePermissionSchema = z30.union([
|
|
10477
|
+
z30.enum(["allow", "ask", "deny"]),
|
|
10478
|
+
z30.record(z30.string(), z30.enum(["allow", "ask", "deny"]))
|
|
10497
10479
|
]);
|
|
10498
|
-
var OpencodePermissionsConfigSchema =
|
|
10499
|
-
permission:
|
|
10480
|
+
var OpencodePermissionsConfigSchema = z30.looseObject({
|
|
10481
|
+
permission: z30.optional(z30.record(z30.string(), OpencodePermissionSchema))
|
|
10500
10482
|
});
|
|
10501
10483
|
var OpencodePermissions = class _OpencodePermissions extends ToolPermissions {
|
|
10502
10484
|
json;
|
|
@@ -10627,7 +10609,7 @@ var permissionsProcessorToolTargetTuple = [
|
|
|
10627
10609
|
"kiro",
|
|
10628
10610
|
"opencode"
|
|
10629
10611
|
];
|
|
10630
|
-
var PermissionsProcessorToolTargetSchema =
|
|
10612
|
+
var PermissionsProcessorToolTargetSchema = z31.enum(permissionsProcessorToolTargetTuple);
|
|
10631
10613
|
var toolPermissionsFactories = /* @__PURE__ */ new Map([
|
|
10632
10614
|
[
|
|
10633
10615
|
"claudecode",
|
|
@@ -10792,7 +10774,7 @@ var PermissionsProcessor = class extends FeatureProcessor {
|
|
|
10792
10774
|
// src/features/rules/rules-processor.ts
|
|
10793
10775
|
import { basename as basename10, dirname as dirname3, join as join137, relative as relative5 } from "path";
|
|
10794
10776
|
import { encode } from "@toon-format/toon";
|
|
10795
|
-
import { z as
|
|
10777
|
+
import { z as z71 } from "zod/mini";
|
|
10796
10778
|
|
|
10797
10779
|
// src/constants/general.ts
|
|
10798
10780
|
var SKILL_FILE_NAME = "SKILL.md";
|
|
@@ -10802,7 +10784,7 @@ import { join as join70 } from "path";
|
|
|
10802
10784
|
|
|
10803
10785
|
// src/features/skills/simulated-skill.ts
|
|
10804
10786
|
import { join as join69 } from "path";
|
|
10805
|
-
import { z as
|
|
10787
|
+
import { z as z32 } from "zod/mini";
|
|
10806
10788
|
|
|
10807
10789
|
// src/features/skills/tool-skill.ts
|
|
10808
10790
|
import { join as join68 } from "path";
|
|
@@ -11039,9 +11021,9 @@ var ToolSkill = class extends AiDir {
|
|
|
11039
11021
|
};
|
|
11040
11022
|
|
|
11041
11023
|
// src/features/skills/simulated-skill.ts
|
|
11042
|
-
var SimulatedSkillFrontmatterSchema =
|
|
11043
|
-
name:
|
|
11044
|
-
description:
|
|
11024
|
+
var SimulatedSkillFrontmatterSchema = z32.looseObject({
|
|
11025
|
+
name: z32.string(),
|
|
11026
|
+
description: z32.string()
|
|
11045
11027
|
});
|
|
11046
11028
|
var SimulatedSkill = class extends ToolSkill {
|
|
11047
11029
|
frontmatter;
|
|
@@ -11268,49 +11250,49 @@ var FactorydroidSkill = class _FactorydroidSkill extends SimulatedSkill {
|
|
|
11268
11250
|
|
|
11269
11251
|
// src/features/skills/rovodev-skill.ts
|
|
11270
11252
|
import { join as join73 } from "path";
|
|
11271
|
-
import { z as
|
|
11253
|
+
import { z as z34 } from "zod/mini";
|
|
11272
11254
|
|
|
11273
11255
|
// src/features/skills/rulesync-skill.ts
|
|
11274
11256
|
import { join as join72 } from "path";
|
|
11275
|
-
import { z as
|
|
11276
|
-
var RulesyncSkillFrontmatterSchemaInternal =
|
|
11277
|
-
name:
|
|
11278
|
-
description:
|
|
11279
|
-
targets:
|
|
11280
|
-
claudecode:
|
|
11281
|
-
|
|
11282
|
-
"allowed-tools":
|
|
11283
|
-
model:
|
|
11284
|
-
"disable-model-invocation":
|
|
11257
|
+
import { z as z33 } from "zod/mini";
|
|
11258
|
+
var RulesyncSkillFrontmatterSchemaInternal = z33.looseObject({
|
|
11259
|
+
name: z33.string(),
|
|
11260
|
+
description: z33.string(),
|
|
11261
|
+
targets: z33._default(RulesyncTargetsSchema, ["*"]),
|
|
11262
|
+
claudecode: z33.optional(
|
|
11263
|
+
z33.looseObject({
|
|
11264
|
+
"allowed-tools": z33.optional(z33.array(z33.string())),
|
|
11265
|
+
model: z33.optional(z33.string()),
|
|
11266
|
+
"disable-model-invocation": z33.optional(z33.boolean())
|
|
11285
11267
|
})
|
|
11286
11268
|
),
|
|
11287
|
-
codexcli:
|
|
11288
|
-
|
|
11289
|
-
"short-description":
|
|
11269
|
+
codexcli: z33.optional(
|
|
11270
|
+
z33.looseObject({
|
|
11271
|
+
"short-description": z33.optional(z33.string())
|
|
11290
11272
|
})
|
|
11291
11273
|
),
|
|
11292
|
-
opencode:
|
|
11293
|
-
|
|
11294
|
-
"allowed-tools":
|
|
11274
|
+
opencode: z33.optional(
|
|
11275
|
+
z33.looseObject({
|
|
11276
|
+
"allowed-tools": z33.optional(z33.array(z33.string()))
|
|
11295
11277
|
})
|
|
11296
11278
|
),
|
|
11297
|
-
kilo:
|
|
11298
|
-
|
|
11299
|
-
"allowed-tools":
|
|
11279
|
+
kilo: z33.optional(
|
|
11280
|
+
z33.looseObject({
|
|
11281
|
+
"allowed-tools": z33.optional(z33.array(z33.string()))
|
|
11300
11282
|
})
|
|
11301
11283
|
),
|
|
11302
|
-
deepagents:
|
|
11303
|
-
|
|
11304
|
-
"allowed-tools":
|
|
11284
|
+
deepagents: z33.optional(
|
|
11285
|
+
z33.looseObject({
|
|
11286
|
+
"allowed-tools": z33.optional(z33.array(z33.string()))
|
|
11305
11287
|
})
|
|
11306
11288
|
),
|
|
11307
|
-
copilot:
|
|
11308
|
-
|
|
11309
|
-
license:
|
|
11289
|
+
copilot: z33.optional(
|
|
11290
|
+
z33.looseObject({
|
|
11291
|
+
license: z33.optional(z33.string())
|
|
11310
11292
|
})
|
|
11311
11293
|
),
|
|
11312
|
-
cline:
|
|
11313
|
-
roo:
|
|
11294
|
+
cline: z33.optional(z33.looseObject({})),
|
|
11295
|
+
roo: z33.optional(z33.looseObject({}))
|
|
11314
11296
|
});
|
|
11315
11297
|
var RulesyncSkillFrontmatterSchema = RulesyncSkillFrontmatterSchemaInternal;
|
|
11316
11298
|
var RulesyncSkill = class _RulesyncSkill extends AiDir {
|
|
@@ -11407,9 +11389,9 @@ var RulesyncSkill = class _RulesyncSkill extends AiDir {
|
|
|
11407
11389
|
};
|
|
11408
11390
|
|
|
11409
11391
|
// src/features/skills/rovodev-skill.ts
|
|
11410
|
-
var RovodevSkillFrontmatterSchema =
|
|
11411
|
-
name:
|
|
11412
|
-
description:
|
|
11392
|
+
var RovodevSkillFrontmatterSchema = z34.looseObject({
|
|
11393
|
+
name: z34.string(),
|
|
11394
|
+
description: z34.string()
|
|
11413
11395
|
});
|
|
11414
11396
|
var RovodevSkill = class _RovodevSkill extends ToolSkill {
|
|
11415
11397
|
constructor({
|
|
@@ -11581,7 +11563,7 @@ var RovodevSkill = class _RovodevSkill extends ToolSkill {
|
|
|
11581
11563
|
|
|
11582
11564
|
// src/features/skills/skills-processor.ts
|
|
11583
11565
|
import { basename as basename5, join as join92 } from "path";
|
|
11584
|
-
import { z as
|
|
11566
|
+
import { z as z51 } from "zod/mini";
|
|
11585
11567
|
|
|
11586
11568
|
// src/types/dir-feature-processor.ts
|
|
11587
11569
|
import { join as join74 } from "path";
|
|
@@ -11720,10 +11702,10 @@ var DirFeatureProcessor = class {
|
|
|
11720
11702
|
|
|
11721
11703
|
// src/features/skills/agentsskills-skill.ts
|
|
11722
11704
|
import { join as join75 } from "path";
|
|
11723
|
-
import { z as
|
|
11724
|
-
var AgentsSkillsSkillFrontmatterSchema =
|
|
11725
|
-
name:
|
|
11726
|
-
description:
|
|
11705
|
+
import { z as z35 } from "zod/mini";
|
|
11706
|
+
var AgentsSkillsSkillFrontmatterSchema = z35.looseObject({
|
|
11707
|
+
name: z35.string(),
|
|
11708
|
+
description: z35.string()
|
|
11727
11709
|
});
|
|
11728
11710
|
var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
|
|
11729
11711
|
constructor({
|
|
@@ -11878,10 +11860,10 @@ var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
|
|
|
11878
11860
|
|
|
11879
11861
|
// src/features/skills/antigravity-skill.ts
|
|
11880
11862
|
import { join as join76 } from "path";
|
|
11881
|
-
import { z as
|
|
11882
|
-
var AntigravitySkillFrontmatterSchema =
|
|
11883
|
-
name:
|
|
11884
|
-
description:
|
|
11863
|
+
import { z as z36 } from "zod/mini";
|
|
11864
|
+
var AntigravitySkillFrontmatterSchema = z36.looseObject({
|
|
11865
|
+
name: z36.string(),
|
|
11866
|
+
description: z36.string()
|
|
11885
11867
|
});
|
|
11886
11868
|
var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
|
|
11887
11869
|
constructor({
|
|
@@ -12039,13 +12021,13 @@ var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
|
|
|
12039
12021
|
|
|
12040
12022
|
// src/features/skills/claudecode-skill.ts
|
|
12041
12023
|
import { join as join77 } from "path";
|
|
12042
|
-
import { z as
|
|
12043
|
-
var ClaudecodeSkillFrontmatterSchema =
|
|
12044
|
-
name:
|
|
12045
|
-
description:
|
|
12046
|
-
"allowed-tools":
|
|
12047
|
-
model:
|
|
12048
|
-
"disable-model-invocation":
|
|
12024
|
+
import { z as z37 } from "zod/mini";
|
|
12025
|
+
var ClaudecodeSkillFrontmatterSchema = z37.looseObject({
|
|
12026
|
+
name: z37.string(),
|
|
12027
|
+
description: z37.string(),
|
|
12028
|
+
"allowed-tools": z37.optional(z37.array(z37.string())),
|
|
12029
|
+
model: z37.optional(z37.string()),
|
|
12030
|
+
"disable-model-invocation": z37.optional(z37.boolean())
|
|
12049
12031
|
});
|
|
12050
12032
|
var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
|
|
12051
12033
|
constructor({
|
|
@@ -12215,10 +12197,10 @@ var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
|
|
|
12215
12197
|
|
|
12216
12198
|
// src/features/skills/cline-skill.ts
|
|
12217
12199
|
import { join as join78 } from "path";
|
|
12218
|
-
import { z as
|
|
12219
|
-
var ClineSkillFrontmatterSchema =
|
|
12220
|
-
name:
|
|
12221
|
-
description:
|
|
12200
|
+
import { z as z38 } from "zod/mini";
|
|
12201
|
+
var ClineSkillFrontmatterSchema = z38.looseObject({
|
|
12202
|
+
name: z38.string(),
|
|
12203
|
+
description: z38.string()
|
|
12222
12204
|
});
|
|
12223
12205
|
var ClineSkill = class _ClineSkill extends ToolSkill {
|
|
12224
12206
|
constructor({
|
|
@@ -12388,13 +12370,13 @@ var ClineSkill = class _ClineSkill extends ToolSkill {
|
|
|
12388
12370
|
|
|
12389
12371
|
// src/features/skills/codexcli-skill.ts
|
|
12390
12372
|
import { join as join79 } from "path";
|
|
12391
|
-
import { z as
|
|
12392
|
-
var CodexCliSkillFrontmatterSchema =
|
|
12393
|
-
name:
|
|
12394
|
-
description:
|
|
12395
|
-
metadata:
|
|
12396
|
-
|
|
12397
|
-
"short-description":
|
|
12373
|
+
import { z as z39 } from "zod/mini";
|
|
12374
|
+
var CodexCliSkillFrontmatterSchema = z39.looseObject({
|
|
12375
|
+
name: z39.string(),
|
|
12376
|
+
description: z39.string(),
|
|
12377
|
+
metadata: z39.optional(
|
|
12378
|
+
z39.looseObject({
|
|
12379
|
+
"short-description": z39.optional(z39.string())
|
|
12398
12380
|
})
|
|
12399
12381
|
)
|
|
12400
12382
|
});
|
|
@@ -12559,11 +12541,11 @@ var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
|
|
|
12559
12541
|
|
|
12560
12542
|
// src/features/skills/copilot-skill.ts
|
|
12561
12543
|
import { join as join80 } from "path";
|
|
12562
|
-
import { z as
|
|
12563
|
-
var CopilotSkillFrontmatterSchema =
|
|
12564
|
-
name:
|
|
12565
|
-
description:
|
|
12566
|
-
license:
|
|
12544
|
+
import { z as z40 } from "zod/mini";
|
|
12545
|
+
var CopilotSkillFrontmatterSchema = z40.looseObject({
|
|
12546
|
+
name: z40.string(),
|
|
12547
|
+
description: z40.string(),
|
|
12548
|
+
license: z40.optional(z40.string())
|
|
12567
12549
|
});
|
|
12568
12550
|
var CopilotSkill = class _CopilotSkill extends ToolSkill {
|
|
12569
12551
|
constructor({
|
|
@@ -12724,10 +12706,10 @@ var CopilotSkill = class _CopilotSkill extends ToolSkill {
|
|
|
12724
12706
|
|
|
12725
12707
|
// src/features/skills/cursor-skill.ts
|
|
12726
12708
|
import { join as join81 } from "path";
|
|
12727
|
-
import { z as
|
|
12728
|
-
var CursorSkillFrontmatterSchema =
|
|
12729
|
-
name:
|
|
12730
|
-
description:
|
|
12709
|
+
import { z as z41 } from "zod/mini";
|
|
12710
|
+
var CursorSkillFrontmatterSchema = z41.looseObject({
|
|
12711
|
+
name: z41.string(),
|
|
12712
|
+
description: z41.string()
|
|
12731
12713
|
});
|
|
12732
12714
|
var CursorSkill = class _CursorSkill extends ToolSkill {
|
|
12733
12715
|
constructor({
|
|
@@ -12879,11 +12861,11 @@ var CursorSkill = class _CursorSkill extends ToolSkill {
|
|
|
12879
12861
|
|
|
12880
12862
|
// src/features/skills/deepagents-skill.ts
|
|
12881
12863
|
import { join as join82 } from "path";
|
|
12882
|
-
import { z as
|
|
12883
|
-
var DeepagentsSkillFrontmatterSchema =
|
|
12884
|
-
name:
|
|
12885
|
-
description:
|
|
12886
|
-
"allowed-tools":
|
|
12864
|
+
import { z as z42 } from "zod/mini";
|
|
12865
|
+
var DeepagentsSkillFrontmatterSchema = z42.looseObject({
|
|
12866
|
+
name: z42.string(),
|
|
12867
|
+
description: z42.string(),
|
|
12868
|
+
"allowed-tools": z42.optional(z42.array(z42.string()))
|
|
12887
12869
|
});
|
|
12888
12870
|
var DeepagentsSkill = class _DeepagentsSkill extends ToolSkill {
|
|
12889
12871
|
constructor({
|
|
@@ -13041,10 +13023,10 @@ var DeepagentsSkill = class _DeepagentsSkill extends ToolSkill {
|
|
|
13041
13023
|
|
|
13042
13024
|
// src/features/skills/geminicli-skill.ts
|
|
13043
13025
|
import { join as join83 } from "path";
|
|
13044
|
-
import { z as
|
|
13045
|
-
var GeminiCliSkillFrontmatterSchema =
|
|
13046
|
-
name:
|
|
13047
|
-
description:
|
|
13026
|
+
import { z as z43 } from "zod/mini";
|
|
13027
|
+
var GeminiCliSkillFrontmatterSchema = z43.looseObject({
|
|
13028
|
+
name: z43.string(),
|
|
13029
|
+
description: z43.string()
|
|
13048
13030
|
});
|
|
13049
13031
|
var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
|
|
13050
13032
|
constructor({
|
|
@@ -13198,10 +13180,10 @@ var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
|
|
|
13198
13180
|
|
|
13199
13181
|
// src/features/skills/junie-skill.ts
|
|
13200
13182
|
import { join as join84 } from "path";
|
|
13201
|
-
import { z as
|
|
13202
|
-
var JunieSkillFrontmatterSchema =
|
|
13203
|
-
name:
|
|
13204
|
-
description:
|
|
13183
|
+
import { z as z44 } from "zod/mini";
|
|
13184
|
+
var JunieSkillFrontmatterSchema = z44.looseObject({
|
|
13185
|
+
name: z44.string(),
|
|
13186
|
+
description: z44.string()
|
|
13205
13187
|
});
|
|
13206
13188
|
var JunieSkill = class _JunieSkill extends ToolSkill {
|
|
13207
13189
|
constructor({
|
|
@@ -13374,11 +13356,11 @@ var JunieSkill = class _JunieSkill extends ToolSkill {
|
|
|
13374
13356
|
|
|
13375
13357
|
// src/features/skills/kilo-skill.ts
|
|
13376
13358
|
import { join as join85 } from "path";
|
|
13377
|
-
import { z as
|
|
13378
|
-
var KiloSkillFrontmatterSchema =
|
|
13379
|
-
name:
|
|
13380
|
-
description:
|
|
13381
|
-
"allowed-tools":
|
|
13359
|
+
import { z as z45 } from "zod/mini";
|
|
13360
|
+
var KiloSkillFrontmatterSchema = z45.looseObject({
|
|
13361
|
+
name: z45.string(),
|
|
13362
|
+
description: z45.string(),
|
|
13363
|
+
"allowed-tools": z45.optional(z45.array(z45.string()))
|
|
13382
13364
|
});
|
|
13383
13365
|
var KiloSkill = class _KiloSkill extends ToolSkill {
|
|
13384
13366
|
constructor({
|
|
@@ -13535,10 +13517,10 @@ var KiloSkill = class _KiloSkill extends ToolSkill {
|
|
|
13535
13517
|
|
|
13536
13518
|
// src/features/skills/kiro-skill.ts
|
|
13537
13519
|
import { join as join86 } from "path";
|
|
13538
|
-
import { z as
|
|
13539
|
-
var KiroSkillFrontmatterSchema =
|
|
13540
|
-
name:
|
|
13541
|
-
description:
|
|
13520
|
+
import { z as z46 } from "zod/mini";
|
|
13521
|
+
var KiroSkillFrontmatterSchema = z46.looseObject({
|
|
13522
|
+
name: z46.string(),
|
|
13523
|
+
description: z46.string()
|
|
13542
13524
|
});
|
|
13543
13525
|
var KiroSkill = class _KiroSkill extends ToolSkill {
|
|
13544
13526
|
constructor({
|
|
@@ -13712,11 +13694,11 @@ var KiroSkill = class _KiroSkill extends ToolSkill {
|
|
|
13712
13694
|
|
|
13713
13695
|
// src/features/skills/opencode-skill.ts
|
|
13714
13696
|
import { join as join87 } from "path";
|
|
13715
|
-
import { z as
|
|
13716
|
-
var OpenCodeSkillFrontmatterSchema =
|
|
13717
|
-
name:
|
|
13718
|
-
description:
|
|
13719
|
-
"allowed-tools":
|
|
13697
|
+
import { z as z47 } from "zod/mini";
|
|
13698
|
+
var OpenCodeSkillFrontmatterSchema = z47.looseObject({
|
|
13699
|
+
name: z47.string(),
|
|
13700
|
+
description: z47.string(),
|
|
13701
|
+
"allowed-tools": z47.optional(z47.array(z47.string()))
|
|
13720
13702
|
});
|
|
13721
13703
|
var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
|
|
13722
13704
|
constructor({
|
|
@@ -13873,10 +13855,10 @@ var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
|
|
|
13873
13855
|
|
|
13874
13856
|
// src/features/skills/replit-skill.ts
|
|
13875
13857
|
import { join as join88 } from "path";
|
|
13876
|
-
import { z as
|
|
13877
|
-
var ReplitSkillFrontmatterSchema =
|
|
13878
|
-
name:
|
|
13879
|
-
description:
|
|
13858
|
+
import { z as z48 } from "zod/mini";
|
|
13859
|
+
var ReplitSkillFrontmatterSchema = z48.looseObject({
|
|
13860
|
+
name: z48.string(),
|
|
13861
|
+
description: z48.string()
|
|
13880
13862
|
});
|
|
13881
13863
|
var ReplitSkill = class _ReplitSkill extends ToolSkill {
|
|
13882
13864
|
constructor({
|
|
@@ -14031,10 +14013,10 @@ var ReplitSkill = class _ReplitSkill extends ToolSkill {
|
|
|
14031
14013
|
|
|
14032
14014
|
// src/features/skills/roo-skill.ts
|
|
14033
14015
|
import { join as join89 } from "path";
|
|
14034
|
-
import { z as
|
|
14035
|
-
var RooSkillFrontmatterSchema =
|
|
14036
|
-
name:
|
|
14037
|
-
description:
|
|
14016
|
+
import { z as z49 } from "zod/mini";
|
|
14017
|
+
var RooSkillFrontmatterSchema = z49.looseObject({
|
|
14018
|
+
name: z49.string(),
|
|
14019
|
+
description: z49.string()
|
|
14038
14020
|
});
|
|
14039
14021
|
var RooSkill = class _RooSkill extends ToolSkill {
|
|
14040
14022
|
constructor({
|
|
@@ -14223,10 +14205,10 @@ async function getLocalSkillDirNames(baseDir) {
|
|
|
14223
14205
|
|
|
14224
14206
|
// src/features/skills/windsurf-skill.ts
|
|
14225
14207
|
import { join as join91 } from "path";
|
|
14226
|
-
import { z as
|
|
14227
|
-
var WindsurfSkillFrontmatterSchema =
|
|
14228
|
-
name:
|
|
14229
|
-
description:
|
|
14208
|
+
import { z as z50 } from "zod/mini";
|
|
14209
|
+
var WindsurfSkillFrontmatterSchema = z50.looseObject({
|
|
14210
|
+
name: z50.string(),
|
|
14211
|
+
description: z50.string()
|
|
14230
14212
|
});
|
|
14231
14213
|
var WindsurfSkill = class _WindsurfSkill extends ToolSkill {
|
|
14232
14214
|
constructor({
|
|
@@ -14404,7 +14386,7 @@ var skillsProcessorToolTargetTuple = [
|
|
|
14404
14386
|
"rovodev",
|
|
14405
14387
|
"windsurf"
|
|
14406
14388
|
];
|
|
14407
|
-
var SkillsProcessorToolTargetSchema =
|
|
14389
|
+
var SkillsProcessorToolTargetSchema = z51.enum(skillsProcessorToolTargetTuple);
|
|
14408
14390
|
var toolSkillFactories = /* @__PURE__ */ new Map([
|
|
14409
14391
|
[
|
|
14410
14392
|
"agentsmd",
|
|
@@ -14783,7 +14765,7 @@ import { join as join94 } from "path";
|
|
|
14783
14765
|
|
|
14784
14766
|
// src/features/subagents/simulated-subagent.ts
|
|
14785
14767
|
import { basename as basename6, join as join93 } from "path";
|
|
14786
|
-
import { z as
|
|
14768
|
+
import { z as z52 } from "zod/mini";
|
|
14787
14769
|
|
|
14788
14770
|
// src/features/subagents/tool-subagent.ts
|
|
14789
14771
|
var ToolSubagent = class extends ToolFile {
|
|
@@ -14835,9 +14817,9 @@ var ToolSubagent = class extends ToolFile {
|
|
|
14835
14817
|
};
|
|
14836
14818
|
|
|
14837
14819
|
// src/features/subagents/simulated-subagent.ts
|
|
14838
|
-
var SimulatedSubagentFrontmatterSchema =
|
|
14839
|
-
name:
|
|
14840
|
-
description:
|
|
14820
|
+
var SimulatedSubagentFrontmatterSchema = z52.object({
|
|
14821
|
+
name: z52.string(),
|
|
14822
|
+
description: z52.optional(z52.string())
|
|
14841
14823
|
});
|
|
14842
14824
|
var SimulatedSubagent = class extends ToolSubagent {
|
|
14843
14825
|
frontmatter;
|
|
@@ -14995,15 +14977,15 @@ var FactorydroidSubagent = class _FactorydroidSubagent extends SimulatedSubagent
|
|
|
14995
14977
|
|
|
14996
14978
|
// src/features/subagents/geminicli-subagent.ts
|
|
14997
14979
|
import { join as join97 } from "path";
|
|
14998
|
-
import { z as
|
|
14980
|
+
import { z as z54 } from "zod/mini";
|
|
14999
14981
|
|
|
15000
14982
|
// src/features/subagents/rulesync-subagent.ts
|
|
15001
14983
|
import { basename as basename7, join as join96 } from "path";
|
|
15002
|
-
import { z as
|
|
15003
|
-
var RulesyncSubagentFrontmatterSchema =
|
|
15004
|
-
targets:
|
|
15005
|
-
name:
|
|
15006
|
-
description:
|
|
14984
|
+
import { z as z53 } from "zod/mini";
|
|
14985
|
+
var RulesyncSubagentFrontmatterSchema = z53.looseObject({
|
|
14986
|
+
targets: z53._default(RulesyncTargetsSchema, ["*"]),
|
|
14987
|
+
name: z53.string(),
|
|
14988
|
+
description: z53.optional(z53.string())
|
|
15007
14989
|
});
|
|
15008
14990
|
var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
|
|
15009
14991
|
frontmatter;
|
|
@@ -15072,9 +15054,9 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
|
|
|
15072
15054
|
};
|
|
15073
15055
|
|
|
15074
15056
|
// src/features/subagents/geminicli-subagent.ts
|
|
15075
|
-
var GeminiCliSubagentFrontmatterSchema =
|
|
15076
|
-
name:
|
|
15077
|
-
description:
|
|
15057
|
+
var GeminiCliSubagentFrontmatterSchema = z54.looseObject({
|
|
15058
|
+
name: z54.string(),
|
|
15059
|
+
description: z54.optional(z54.string())
|
|
15078
15060
|
});
|
|
15079
15061
|
var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
|
|
15080
15062
|
frontmatter;
|
|
@@ -15247,10 +15229,10 @@ var RooSubagent = class _RooSubagent extends SimulatedSubagent {
|
|
|
15247
15229
|
|
|
15248
15230
|
// src/features/subagents/rovodev-subagent.ts
|
|
15249
15231
|
import { join as join99 } from "path";
|
|
15250
|
-
import { z as
|
|
15251
|
-
var RovodevSubagentFrontmatterSchema =
|
|
15252
|
-
name:
|
|
15253
|
-
description:
|
|
15232
|
+
import { z as z55 } from "zod/mini";
|
|
15233
|
+
var RovodevSubagentFrontmatterSchema = z55.looseObject({
|
|
15234
|
+
name: z55.string(),
|
|
15235
|
+
description: z55.optional(z55.string())
|
|
15254
15236
|
});
|
|
15255
15237
|
var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
|
|
15256
15238
|
frontmatter;
|
|
@@ -15392,18 +15374,18 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
|
|
|
15392
15374
|
|
|
15393
15375
|
// src/features/subagents/subagents-processor.ts
|
|
15394
15376
|
import { basename as basename9, join as join110 } from "path";
|
|
15395
|
-
import { z as
|
|
15377
|
+
import { z as z64 } from "zod/mini";
|
|
15396
15378
|
|
|
15397
15379
|
// src/features/subagents/claudecode-subagent.ts
|
|
15398
15380
|
import { join as join100 } from "path";
|
|
15399
|
-
import { z as
|
|
15400
|
-
var ClaudecodeSubagentFrontmatterSchema =
|
|
15401
|
-
name:
|
|
15402
|
-
description:
|
|
15403
|
-
model:
|
|
15404
|
-
tools:
|
|
15405
|
-
permissionMode:
|
|
15406
|
-
skills:
|
|
15381
|
+
import { z as z56 } from "zod/mini";
|
|
15382
|
+
var ClaudecodeSubagentFrontmatterSchema = z56.looseObject({
|
|
15383
|
+
name: z56.string(),
|
|
15384
|
+
description: z56.optional(z56.string()),
|
|
15385
|
+
model: z56.optional(z56.string()),
|
|
15386
|
+
tools: z56.optional(z56.union([z56.string(), z56.array(z56.string())])),
|
|
15387
|
+
permissionMode: z56.optional(z56.string()),
|
|
15388
|
+
skills: z56.optional(z56.union([z56.string(), z56.array(z56.string())]))
|
|
15407
15389
|
});
|
|
15408
15390
|
var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
|
|
15409
15391
|
frontmatter;
|
|
@@ -15559,14 +15541,14 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
|
|
|
15559
15541
|
// src/features/subagents/codexcli-subagent.ts
|
|
15560
15542
|
import { join as join101 } from "path";
|
|
15561
15543
|
import * as smolToml6 from "smol-toml";
|
|
15562
|
-
import { z as
|
|
15563
|
-
var CodexCliSubagentTomlSchema =
|
|
15564
|
-
name:
|
|
15565
|
-
description:
|
|
15566
|
-
developer_instructions:
|
|
15567
|
-
model:
|
|
15568
|
-
model_reasoning_effort:
|
|
15569
|
-
sandbox_mode:
|
|
15544
|
+
import { z as z57 } from "zod/mini";
|
|
15545
|
+
var CodexCliSubagentTomlSchema = z57.looseObject({
|
|
15546
|
+
name: z57.string(),
|
|
15547
|
+
description: z57.optional(z57.string()),
|
|
15548
|
+
developer_instructions: z57.optional(z57.string()),
|
|
15549
|
+
model: z57.optional(z57.string()),
|
|
15550
|
+
model_reasoning_effort: z57.optional(z57.string()),
|
|
15551
|
+
sandbox_mode: z57.optional(z57.string())
|
|
15570
15552
|
});
|
|
15571
15553
|
function stringifyCodexCliSubagentToml(tomlObj) {
|
|
15572
15554
|
const { developer_instructions, ...restFields } = tomlObj;
|
|
@@ -15732,12 +15714,12 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
|
|
|
15732
15714
|
|
|
15733
15715
|
// src/features/subagents/copilot-subagent.ts
|
|
15734
15716
|
import { join as join102 } from "path";
|
|
15735
|
-
import { z as
|
|
15717
|
+
import { z as z58 } from "zod/mini";
|
|
15736
15718
|
var REQUIRED_TOOL = "agent/runSubagent";
|
|
15737
|
-
var CopilotSubagentFrontmatterSchema =
|
|
15738
|
-
name:
|
|
15739
|
-
description:
|
|
15740
|
-
tools:
|
|
15719
|
+
var CopilotSubagentFrontmatterSchema = z58.looseObject({
|
|
15720
|
+
name: z58.string(),
|
|
15721
|
+
description: z58.optional(z58.string()),
|
|
15722
|
+
tools: z58.optional(z58.union([z58.string(), z58.array(z58.string())]))
|
|
15741
15723
|
});
|
|
15742
15724
|
var normalizeTools = (tools) => {
|
|
15743
15725
|
if (!tools) {
|
|
@@ -15749,6 +15731,21 @@ var ensureRequiredTool = (tools) => {
|
|
|
15749
15731
|
const mergedTools = /* @__PURE__ */ new Set([REQUIRED_TOOL, ...tools]);
|
|
15750
15732
|
return Array.from(mergedTools);
|
|
15751
15733
|
};
|
|
15734
|
+
var toCopilotAgentFilePath = (relativeFilePath) => {
|
|
15735
|
+
if (relativeFilePath.endsWith(".agent.md")) {
|
|
15736
|
+
return relativeFilePath;
|
|
15737
|
+
}
|
|
15738
|
+
if (relativeFilePath.endsWith(".md")) {
|
|
15739
|
+
return relativeFilePath.replace(/\.md$/, ".agent.md");
|
|
15740
|
+
}
|
|
15741
|
+
return relativeFilePath;
|
|
15742
|
+
};
|
|
15743
|
+
var toRulesyncFilePath = (relativeFilePath) => {
|
|
15744
|
+
if (relativeFilePath.endsWith(".agent.md")) {
|
|
15745
|
+
return relativeFilePath.replace(/\.agent\.md$/, ".md");
|
|
15746
|
+
}
|
|
15747
|
+
return relativeFilePath;
|
|
15748
|
+
};
|
|
15752
15749
|
var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
|
|
15753
15750
|
frontmatter;
|
|
15754
15751
|
body;
|
|
@@ -15795,7 +15792,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
|
|
|
15795
15792
|
frontmatter: rulesyncFrontmatter,
|
|
15796
15793
|
body: this.body,
|
|
15797
15794
|
relativeDirPath: RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH,
|
|
15798
|
-
relativeFilePath: this.getRelativeFilePath(),
|
|
15795
|
+
relativeFilePath: toRulesyncFilePath(this.getRelativeFilePath()),
|
|
15799
15796
|
validate: true
|
|
15800
15797
|
});
|
|
15801
15798
|
}
|
|
@@ -15821,16 +15818,12 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
|
|
|
15821
15818
|
const body = rulesyncSubagent.getBody();
|
|
15822
15819
|
const fileContent = stringifyFrontmatter(body, copilotFrontmatter);
|
|
15823
15820
|
const paths = this.getSettablePaths({ global });
|
|
15824
|
-
let relativeFilePath = rulesyncSubagent.getRelativeFilePath();
|
|
15825
|
-
if (!relativeFilePath.endsWith(".agent.md")) {
|
|
15826
|
-
relativeFilePath = relativeFilePath.replace(/\.md$/, ".agent.md");
|
|
15827
|
-
}
|
|
15828
15821
|
return new _CopilotSubagent({
|
|
15829
15822
|
baseDir,
|
|
15830
15823
|
frontmatter: copilotFrontmatter,
|
|
15831
15824
|
body,
|
|
15832
15825
|
relativeDirPath: paths.relativeDirPath,
|
|
15833
|
-
relativeFilePath,
|
|
15826
|
+
relativeFilePath: toCopilotAgentFilePath(rulesyncSubagent.getRelativeFilePath()),
|
|
15834
15827
|
fileContent,
|
|
15835
15828
|
validate,
|
|
15836
15829
|
global
|
|
@@ -15902,10 +15895,10 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
|
|
|
15902
15895
|
|
|
15903
15896
|
// src/features/subagents/cursor-subagent.ts
|
|
15904
15897
|
import { join as join103 } from "path";
|
|
15905
|
-
import { z as
|
|
15906
|
-
var CursorSubagentFrontmatterSchema =
|
|
15907
|
-
name:
|
|
15908
|
-
description:
|
|
15898
|
+
import { z as z59 } from "zod/mini";
|
|
15899
|
+
var CursorSubagentFrontmatterSchema = z59.looseObject({
|
|
15900
|
+
name: z59.string(),
|
|
15901
|
+
description: z59.optional(z59.string())
|
|
15909
15902
|
});
|
|
15910
15903
|
var CursorSubagent = class _CursorSubagent extends ToolSubagent {
|
|
15911
15904
|
frontmatter;
|
|
@@ -16049,11 +16042,11 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
|
|
|
16049
16042
|
|
|
16050
16043
|
// src/features/subagents/deepagents-subagent.ts
|
|
16051
16044
|
import { join as join104 } from "path";
|
|
16052
|
-
import { z as
|
|
16053
|
-
var DeepagentsSubagentFrontmatterSchema =
|
|
16054
|
-
name:
|
|
16055
|
-
description:
|
|
16056
|
-
model:
|
|
16045
|
+
import { z as z60 } from "zod/mini";
|
|
16046
|
+
var DeepagentsSubagentFrontmatterSchema = z60.looseObject({
|
|
16047
|
+
name: z60.string(),
|
|
16048
|
+
description: z60.optional(z60.string()),
|
|
16049
|
+
model: z60.optional(z60.string())
|
|
16057
16050
|
});
|
|
16058
16051
|
var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
|
|
16059
16052
|
frontmatter;
|
|
@@ -16202,10 +16195,10 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
|
|
|
16202
16195
|
|
|
16203
16196
|
// src/features/subagents/junie-subagent.ts
|
|
16204
16197
|
import { join as join105 } from "path";
|
|
16205
|
-
import { z as
|
|
16206
|
-
var JunieSubagentFrontmatterSchema =
|
|
16207
|
-
name:
|
|
16208
|
-
description:
|
|
16198
|
+
import { z as z61 } from "zod/mini";
|
|
16199
|
+
var JunieSubagentFrontmatterSchema = z61.looseObject({
|
|
16200
|
+
name: z61.optional(z61.string()),
|
|
16201
|
+
description: z61.string()
|
|
16209
16202
|
});
|
|
16210
16203
|
var JunieSubagent = class _JunieSubagent extends ToolSubagent {
|
|
16211
16204
|
frontmatter;
|
|
@@ -16363,11 +16356,11 @@ import { join as join107 } from "path";
|
|
|
16363
16356
|
|
|
16364
16357
|
// src/features/subagents/opencode-style-subagent.ts
|
|
16365
16358
|
import { basename as basename8, join as join106 } from "path";
|
|
16366
|
-
import { z as
|
|
16367
|
-
var OpenCodeStyleSubagentFrontmatterSchema =
|
|
16368
|
-
description:
|
|
16369
|
-
mode:
|
|
16370
|
-
name:
|
|
16359
|
+
import { z as z62 } from "zod/mini";
|
|
16360
|
+
var OpenCodeStyleSubagentFrontmatterSchema = z62.looseObject({
|
|
16361
|
+
description: z62.optional(z62.string()),
|
|
16362
|
+
mode: z62._default(z62.string(), "subagent"),
|
|
16363
|
+
name: z62.optional(z62.string())
|
|
16371
16364
|
});
|
|
16372
16365
|
var OpenCodeStyleSubagent = class extends ToolSubagent {
|
|
16373
16366
|
frontmatter;
|
|
@@ -16516,22 +16509,22 @@ var KiloSubagent = class _KiloSubagent extends OpenCodeStyleSubagent {
|
|
|
16516
16509
|
|
|
16517
16510
|
// src/features/subagents/kiro-subagent.ts
|
|
16518
16511
|
import { join as join108 } from "path";
|
|
16519
|
-
import { z as
|
|
16520
|
-
var KiroCliSubagentJsonSchema =
|
|
16521
|
-
name:
|
|
16522
|
-
description:
|
|
16523
|
-
prompt:
|
|
16524
|
-
tools:
|
|
16525
|
-
toolAliases:
|
|
16526
|
-
toolSettings:
|
|
16527
|
-
toolSchema:
|
|
16528
|
-
hooks:
|
|
16529
|
-
model:
|
|
16530
|
-
mcpServers:
|
|
16531
|
-
useLegacyMcpJson:
|
|
16532
|
-
resources:
|
|
16533
|
-
allowedTools:
|
|
16534
|
-
includeMcpJson:
|
|
16512
|
+
import { z as z63 } from "zod/mini";
|
|
16513
|
+
var KiroCliSubagentJsonSchema = z63.looseObject({
|
|
16514
|
+
name: z63.string(),
|
|
16515
|
+
description: z63.optional(z63.nullable(z63.string())),
|
|
16516
|
+
prompt: z63.optional(z63.nullable(z63.string())),
|
|
16517
|
+
tools: z63.optional(z63.nullable(z63.array(z63.string()))),
|
|
16518
|
+
toolAliases: z63.optional(z63.nullable(z63.record(z63.string(), z63.string()))),
|
|
16519
|
+
toolSettings: z63.optional(z63.nullable(z63.unknown())),
|
|
16520
|
+
toolSchema: z63.optional(z63.nullable(z63.unknown())),
|
|
16521
|
+
hooks: z63.optional(z63.nullable(z63.record(z63.string(), z63.array(z63.unknown())))),
|
|
16522
|
+
model: z63.optional(z63.nullable(z63.string())),
|
|
16523
|
+
mcpServers: z63.optional(z63.nullable(z63.record(z63.string(), z63.unknown()))),
|
|
16524
|
+
useLegacyMcpJson: z63.optional(z63.nullable(z63.boolean())),
|
|
16525
|
+
resources: z63.optional(z63.nullable(z63.array(z63.string()))),
|
|
16526
|
+
allowedTools: z63.optional(z63.nullable(z63.array(z63.string()))),
|
|
16527
|
+
includeMcpJson: z63.optional(z63.nullable(z63.boolean()))
|
|
16535
16528
|
});
|
|
16536
16529
|
var KiroSubagent = class _KiroSubagent extends ToolSubagent {
|
|
16537
16530
|
body;
|
|
@@ -16792,7 +16785,7 @@ var subagentsProcessorToolTargetTuple = [
|
|
|
16792
16785
|
"roo",
|
|
16793
16786
|
"rovodev"
|
|
16794
16787
|
];
|
|
16795
|
-
var SubagentsProcessorToolTargetSchema =
|
|
16788
|
+
var SubagentsProcessorToolTargetSchema = z64.enum(subagentsProcessorToolTargetTuple);
|
|
16796
16789
|
var toolSubagentFactories = /* @__PURE__ */ new Map([
|
|
16797
16790
|
[
|
|
16798
16791
|
"agentsmd",
|
|
@@ -17102,42 +17095,42 @@ import { join as join112 } from "path";
|
|
|
17102
17095
|
|
|
17103
17096
|
// src/features/rules/rulesync-rule.ts
|
|
17104
17097
|
import { join as join111 } from "path";
|
|
17105
|
-
import { z as
|
|
17106
|
-
var RulesyncRuleFrontmatterSchema =
|
|
17107
|
-
root:
|
|
17108
|
-
localRoot:
|
|
17109
|
-
targets:
|
|
17110
|
-
description:
|
|
17111
|
-
globs:
|
|
17112
|
-
agentsmd:
|
|
17113
|
-
|
|
17098
|
+
import { z as z65 } from "zod/mini";
|
|
17099
|
+
var RulesyncRuleFrontmatterSchema = z65.object({
|
|
17100
|
+
root: z65.optional(z65.boolean()),
|
|
17101
|
+
localRoot: z65.optional(z65.boolean()),
|
|
17102
|
+
targets: z65._default(RulesyncTargetsSchema, ["*"]),
|
|
17103
|
+
description: z65.optional(z65.string()),
|
|
17104
|
+
globs: z65.optional(z65.array(z65.string())),
|
|
17105
|
+
agentsmd: z65.optional(
|
|
17106
|
+
z65.looseObject({
|
|
17114
17107
|
// @example "path/to/subproject"
|
|
17115
|
-
subprojectPath:
|
|
17108
|
+
subprojectPath: z65.optional(z65.string())
|
|
17116
17109
|
})
|
|
17117
17110
|
),
|
|
17118
|
-
claudecode:
|
|
17119
|
-
|
|
17111
|
+
claudecode: z65.optional(
|
|
17112
|
+
z65.looseObject({
|
|
17120
17113
|
// Glob patterns for conditional rules (takes precedence over globs)
|
|
17121
17114
|
// @example ["src/**/*.ts", "tests/**/*.test.ts"]
|
|
17122
|
-
paths:
|
|
17115
|
+
paths: z65.optional(z65.array(z65.string()))
|
|
17123
17116
|
})
|
|
17124
17117
|
),
|
|
17125
|
-
cursor:
|
|
17126
|
-
|
|
17127
|
-
alwaysApply:
|
|
17128
|
-
description:
|
|
17129
|
-
globs:
|
|
17118
|
+
cursor: z65.optional(
|
|
17119
|
+
z65.looseObject({
|
|
17120
|
+
alwaysApply: z65.optional(z65.boolean()),
|
|
17121
|
+
description: z65.optional(z65.string()),
|
|
17122
|
+
globs: z65.optional(z65.array(z65.string()))
|
|
17130
17123
|
})
|
|
17131
17124
|
),
|
|
17132
|
-
copilot:
|
|
17133
|
-
|
|
17134
|
-
excludeAgent:
|
|
17125
|
+
copilot: z65.optional(
|
|
17126
|
+
z65.looseObject({
|
|
17127
|
+
excludeAgent: z65.optional(z65.union([z65.literal("code-review"), z65.literal("coding-agent")]))
|
|
17135
17128
|
})
|
|
17136
17129
|
),
|
|
17137
|
-
antigravity:
|
|
17138
|
-
|
|
17139
|
-
trigger:
|
|
17140
|
-
globs:
|
|
17130
|
+
antigravity: z65.optional(
|
|
17131
|
+
z65.looseObject({
|
|
17132
|
+
trigger: z65.optional(z65.string()),
|
|
17133
|
+
globs: z65.optional(z65.array(z65.string()))
|
|
17141
17134
|
})
|
|
17142
17135
|
)
|
|
17143
17136
|
});
|
|
@@ -17437,20 +17430,20 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
|
|
|
17437
17430
|
|
|
17438
17431
|
// src/features/rules/antigravity-rule.ts
|
|
17439
17432
|
import { join as join114 } from "path";
|
|
17440
|
-
import { z as
|
|
17441
|
-
var AntigravityRuleFrontmatterSchema =
|
|
17442
|
-
trigger:
|
|
17443
|
-
|
|
17444
|
-
|
|
17445
|
-
|
|
17446
|
-
|
|
17447
|
-
|
|
17448
|
-
|
|
17433
|
+
import { z as z66 } from "zod/mini";
|
|
17434
|
+
var AntigravityRuleFrontmatterSchema = z66.looseObject({
|
|
17435
|
+
trigger: z66.optional(
|
|
17436
|
+
z66.union([
|
|
17437
|
+
z66.literal("always_on"),
|
|
17438
|
+
z66.literal("glob"),
|
|
17439
|
+
z66.literal("manual"),
|
|
17440
|
+
z66.literal("model_decision"),
|
|
17441
|
+
z66.string()
|
|
17449
17442
|
// accepts any string for forward compatibility
|
|
17450
17443
|
])
|
|
17451
17444
|
),
|
|
17452
|
-
globs:
|
|
17453
|
-
description:
|
|
17445
|
+
globs: z66.optional(z66.string()),
|
|
17446
|
+
description: z66.optional(z66.string())
|
|
17454
17447
|
});
|
|
17455
17448
|
function parseGlobsString(globs) {
|
|
17456
17449
|
if (!globs) {
|
|
@@ -18037,9 +18030,9 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
|
|
|
18037
18030
|
|
|
18038
18031
|
// src/features/rules/claudecode-rule.ts
|
|
18039
18032
|
import { join as join118 } from "path";
|
|
18040
|
-
import { z as
|
|
18041
|
-
var ClaudecodeRuleFrontmatterSchema =
|
|
18042
|
-
paths:
|
|
18033
|
+
import { z as z67 } from "zod/mini";
|
|
18034
|
+
var ClaudecodeRuleFrontmatterSchema = z67.object({
|
|
18035
|
+
paths: z67.optional(z67.array(z67.string()))
|
|
18043
18036
|
});
|
|
18044
18037
|
var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
|
|
18045
18038
|
frontmatter;
|
|
@@ -18255,9 +18248,9 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
|
|
|
18255
18248
|
|
|
18256
18249
|
// src/features/rules/cline-rule.ts
|
|
18257
18250
|
import { join as join119 } from "path";
|
|
18258
|
-
import { z as
|
|
18259
|
-
var ClineRuleFrontmatterSchema =
|
|
18260
|
-
description:
|
|
18251
|
+
import { z as z68 } from "zod/mini";
|
|
18252
|
+
var ClineRuleFrontmatterSchema = z68.object({
|
|
18253
|
+
description: z68.string()
|
|
18261
18254
|
});
|
|
18262
18255
|
var ClineRule = class _ClineRule extends ToolRule {
|
|
18263
18256
|
static getSettablePaths(_options = {}) {
|
|
@@ -18436,11 +18429,11 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
|
|
|
18436
18429
|
|
|
18437
18430
|
// src/features/rules/copilot-rule.ts
|
|
18438
18431
|
import { join as join121 } from "path";
|
|
18439
|
-
import { z as
|
|
18440
|
-
var CopilotRuleFrontmatterSchema =
|
|
18441
|
-
description:
|
|
18442
|
-
applyTo:
|
|
18443
|
-
excludeAgent:
|
|
18432
|
+
import { z as z69 } from "zod/mini";
|
|
18433
|
+
var CopilotRuleFrontmatterSchema = z69.object({
|
|
18434
|
+
description: z69.optional(z69.string()),
|
|
18435
|
+
applyTo: z69.optional(z69.string()),
|
|
18436
|
+
excludeAgent: z69.optional(z69.union([z69.literal("code-review"), z69.literal("coding-agent")]))
|
|
18444
18437
|
});
|
|
18445
18438
|
var CopilotRule = class _CopilotRule extends ToolRule {
|
|
18446
18439
|
frontmatter;
|
|
@@ -18682,11 +18675,11 @@ var CopilotcliRule = class _CopilotcliRule extends CopilotRule {
|
|
|
18682
18675
|
|
|
18683
18676
|
// src/features/rules/cursor-rule.ts
|
|
18684
18677
|
import { join as join122 } from "path";
|
|
18685
|
-
import { z as
|
|
18686
|
-
var CursorRuleFrontmatterSchema =
|
|
18687
|
-
description:
|
|
18688
|
-
globs:
|
|
18689
|
-
alwaysApply:
|
|
18678
|
+
import { z as z70 } from "zod/mini";
|
|
18679
|
+
var CursorRuleFrontmatterSchema = z70.object({
|
|
18680
|
+
description: z70.optional(z70.string()),
|
|
18681
|
+
globs: z70.optional(z70.string()),
|
|
18682
|
+
alwaysApply: z70.optional(z70.boolean())
|
|
18690
18683
|
});
|
|
18691
18684
|
var CursorRule = class _CursorRule extends ToolRule {
|
|
18692
18685
|
frontmatter;
|
|
@@ -20346,11 +20339,11 @@ var rulesProcessorToolTargets = [
|
|
|
20346
20339
|
"warp",
|
|
20347
20340
|
"windsurf"
|
|
20348
20341
|
];
|
|
20349
|
-
var RulesProcessorToolTargetSchema =
|
|
20342
|
+
var RulesProcessorToolTargetSchema = z71.enum(rulesProcessorToolTargets);
|
|
20350
20343
|
var formatRulePaths = (rules) => rules.map((r) => join137(r.getRelativeDirPath(), r.getRelativeFilePath())).join(", ");
|
|
20351
|
-
var RulesFeatureOptionsSchema =
|
|
20352
|
-
ruleDiscoveryMode:
|
|
20353
|
-
includeLocalRoot:
|
|
20344
|
+
var RulesFeatureOptionsSchema = z71.looseObject({
|
|
20345
|
+
ruleDiscoveryMode: z71.optional(z71.enum(["none", "explicit"])),
|
|
20346
|
+
includeLocalRoot: z71.optional(z71.boolean())
|
|
20354
20347
|
});
|
|
20355
20348
|
var resolveRuleDiscoveryMode = ({
|
|
20356
20349
|
defaultMode,
|
|
@@ -20371,8 +20364,8 @@ var resolveRuleDiscoveryMode = ({
|
|
|
20371
20364
|
}
|
|
20372
20365
|
return parsed.data.ruleDiscoveryMode === "none" ? "auto" : "toon";
|
|
20373
20366
|
};
|
|
20374
|
-
var IncludeLocalRootSchema =
|
|
20375
|
-
includeLocalRoot:
|
|
20367
|
+
var IncludeLocalRootSchema = z71.looseObject({
|
|
20368
|
+
includeLocalRoot: z71.optional(z71.boolean())
|
|
20376
20369
|
});
|
|
20377
20370
|
var resolveIncludeLocalRoot = (options) => {
|
|
20378
20371
|
if (!options) return true;
|
|
@@ -22003,6 +21996,7 @@ export {
|
|
|
22003
21996
|
RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH,
|
|
22004
21997
|
RULESYNC_MCP_RELATIVE_FILE_PATH,
|
|
22005
21998
|
RULESYNC_HOOKS_RELATIVE_FILE_PATH,
|
|
21999
|
+
RULESYNC_PERMISSIONS_RELATIVE_FILE_PATH,
|
|
22006
22000
|
RULESYNC_AIIGNORE_FILE_NAME,
|
|
22007
22001
|
RULESYNC_AIIGNORE_RELATIVE_FILE_PATH,
|
|
22008
22002
|
RULESYNC_IGNORE_RELATIVE_FILE_PATH,
|
|
@@ -22031,6 +22025,7 @@ export {
|
|
|
22031
22025
|
findFilesByGlobs,
|
|
22032
22026
|
removeDirectory,
|
|
22033
22027
|
removeFile,
|
|
22028
|
+
getHomeDirectory,
|
|
22034
22029
|
createTempDirectory,
|
|
22035
22030
|
removeTempDirectory,
|
|
22036
22031
|
ALL_FEATURES,
|
|
@@ -22051,6 +22046,7 @@ export {
|
|
|
22051
22046
|
IgnoreProcessor,
|
|
22052
22047
|
RulesyncMcp,
|
|
22053
22048
|
McpProcessor,
|
|
22049
|
+
RulesyncPermissions,
|
|
22054
22050
|
ErrorCodes,
|
|
22055
22051
|
CLIError,
|
|
22056
22052
|
ConsoleLogger,
|