rulesync 8.22.0 → 8.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/{chunk-5UYENRC6.js → chunk-G2YWSXTU.js} +995 -608
- package/dist/cli/index.cjs +1409 -1006
- package/dist/cli/index.js +24 -8
- package/dist/index.cjs +1023 -636
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -10439,6 +10439,101 @@ var RovodevMcp = class _RovodevMcp extends ToolMcp {
|
|
|
10439
10439
|
}
|
|
10440
10440
|
};
|
|
10441
10441
|
|
|
10442
|
+
// src/features/mcp/zed-mcp.ts
|
|
10443
|
+
var import_node_path72 = require("path");
|
|
10444
|
+
var ZedMcp = class _ZedMcp extends ToolMcp {
|
|
10445
|
+
json;
|
|
10446
|
+
constructor(params) {
|
|
10447
|
+
super(params);
|
|
10448
|
+
this.json = JSON.parse(this.fileContent || "{}");
|
|
10449
|
+
}
|
|
10450
|
+
getJson() {
|
|
10451
|
+
return this.json;
|
|
10452
|
+
}
|
|
10453
|
+
static getSettablePaths({ global } = {}) {
|
|
10454
|
+
if (global) {
|
|
10455
|
+
return {
|
|
10456
|
+
relativeDirPath: (0, import_node_path72.join)(".config", "zed"),
|
|
10457
|
+
relativeFilePath: "settings.json"
|
|
10458
|
+
};
|
|
10459
|
+
}
|
|
10460
|
+
return {
|
|
10461
|
+
relativeDirPath: ".zed",
|
|
10462
|
+
relativeFilePath: "settings.json"
|
|
10463
|
+
};
|
|
10464
|
+
}
|
|
10465
|
+
static async fromFile({
|
|
10466
|
+
outputRoot = process.cwd(),
|
|
10467
|
+
validate = true,
|
|
10468
|
+
global = false
|
|
10469
|
+
}) {
|
|
10470
|
+
const paths = this.getSettablePaths({ global });
|
|
10471
|
+
const fileContent = await readFileContentOrNull(
|
|
10472
|
+
(0, import_node_path72.join)(outputRoot, paths.relativeDirPath, paths.relativeFilePath)
|
|
10473
|
+
) ?? "{}";
|
|
10474
|
+
const json = JSON.parse(fileContent);
|
|
10475
|
+
const newJson = { ...json, context_servers: json.context_servers ?? {} };
|
|
10476
|
+
return new _ZedMcp({
|
|
10477
|
+
outputRoot,
|
|
10478
|
+
relativeDirPath: paths.relativeDirPath,
|
|
10479
|
+
relativeFilePath: paths.relativeFilePath,
|
|
10480
|
+
fileContent: JSON.stringify(newJson, null, 2),
|
|
10481
|
+
validate
|
|
10482
|
+
});
|
|
10483
|
+
}
|
|
10484
|
+
static async fromRulesyncMcp({
|
|
10485
|
+
outputRoot = process.cwd(),
|
|
10486
|
+
rulesyncMcp,
|
|
10487
|
+
validate = true,
|
|
10488
|
+
global = false
|
|
10489
|
+
}) {
|
|
10490
|
+
const paths = this.getSettablePaths({ global });
|
|
10491
|
+
const fileContent = await readOrInitializeFileContent(
|
|
10492
|
+
(0, import_node_path72.join)(outputRoot, paths.relativeDirPath, paths.relativeFilePath),
|
|
10493
|
+
"{}"
|
|
10494
|
+
);
|
|
10495
|
+
const json = JSON.parse(fileContent);
|
|
10496
|
+
const newJson = { ...json, context_servers: rulesyncMcp.getMcpServers() };
|
|
10497
|
+
return new _ZedMcp({
|
|
10498
|
+
outputRoot,
|
|
10499
|
+
relativeDirPath: paths.relativeDirPath,
|
|
10500
|
+
relativeFilePath: paths.relativeFilePath,
|
|
10501
|
+
fileContent: JSON.stringify(newJson, null, 2),
|
|
10502
|
+
validate
|
|
10503
|
+
});
|
|
10504
|
+
}
|
|
10505
|
+
toRulesyncMcp() {
|
|
10506
|
+
return this.toRulesyncMcpDefault({
|
|
10507
|
+
fileContent: JSON.stringify({ mcpServers: this.json.context_servers ?? {} }, null, 2)
|
|
10508
|
+
});
|
|
10509
|
+
}
|
|
10510
|
+
validate() {
|
|
10511
|
+
return { success: true, error: null };
|
|
10512
|
+
}
|
|
10513
|
+
/**
|
|
10514
|
+
* settings.json is a user-managed file shared with other features
|
|
10515
|
+
* (e.g. ignore's `private_files`), so it must not be deleted.
|
|
10516
|
+
*/
|
|
10517
|
+
isDeletable() {
|
|
10518
|
+
return false;
|
|
10519
|
+
}
|
|
10520
|
+
static forDeletion({
|
|
10521
|
+
outputRoot = process.cwd(),
|
|
10522
|
+
relativeDirPath,
|
|
10523
|
+
relativeFilePath,
|
|
10524
|
+
global = false
|
|
10525
|
+
}) {
|
|
10526
|
+
return new _ZedMcp({
|
|
10527
|
+
outputRoot,
|
|
10528
|
+
relativeDirPath,
|
|
10529
|
+
relativeFilePath,
|
|
10530
|
+
fileContent: "{}",
|
|
10531
|
+
validate: false,
|
|
10532
|
+
global
|
|
10533
|
+
});
|
|
10534
|
+
}
|
|
10535
|
+
};
|
|
10536
|
+
|
|
10442
10537
|
// src/features/mcp/mcp-processor.ts
|
|
10443
10538
|
var mcpProcessorToolTargetTuple = [
|
|
10444
10539
|
"antigravity-cli",
|
|
@@ -10458,7 +10553,8 @@ var mcpProcessorToolTargetTuple = [
|
|
|
10458
10553
|
"junie",
|
|
10459
10554
|
"opencode",
|
|
10460
10555
|
"roo",
|
|
10461
|
-
"rovodev"
|
|
10556
|
+
"rovodev",
|
|
10557
|
+
"zed"
|
|
10462
10558
|
];
|
|
10463
10559
|
var McpProcessorToolTargetSchema = import_mini29.z.enum(mcpProcessorToolTargetTuple);
|
|
10464
10560
|
var toolMcpFactories = /* @__PURE__ */ new Map([
|
|
@@ -10683,6 +10779,18 @@ var toolMcpFactories = /* @__PURE__ */ new Map([
|
|
|
10683
10779
|
supportsDisabledTools: false
|
|
10684
10780
|
}
|
|
10685
10781
|
}
|
|
10782
|
+
],
|
|
10783
|
+
[
|
|
10784
|
+
"zed",
|
|
10785
|
+
{
|
|
10786
|
+
class: ZedMcp,
|
|
10787
|
+
meta: {
|
|
10788
|
+
supportsProject: true,
|
|
10789
|
+
supportsGlobal: true,
|
|
10790
|
+
supportsEnabledTools: false,
|
|
10791
|
+
supportsDisabledTools: false
|
|
10792
|
+
}
|
|
10793
|
+
}
|
|
10686
10794
|
]
|
|
10687
10795
|
]);
|
|
10688
10796
|
var allToolTargetKeys2 = [...toolMcpFactories.keys()];
|
|
@@ -10834,11 +10942,11 @@ var McpProcessor = class extends FeatureProcessor {
|
|
|
10834
10942
|
var import_mini38 = require("zod/mini");
|
|
10835
10943
|
|
|
10836
10944
|
// src/features/permissions/antigravity-cli-permissions.ts
|
|
10837
|
-
var
|
|
10945
|
+
var import_node_path74 = require("path");
|
|
10838
10946
|
var import_es_toolkit4 = require("es-toolkit");
|
|
10839
10947
|
|
|
10840
10948
|
// src/features/permissions/rulesync-permissions.ts
|
|
10841
|
-
var
|
|
10949
|
+
var import_node_path73 = require("path");
|
|
10842
10950
|
|
|
10843
10951
|
// src/types/permissions.ts
|
|
10844
10952
|
var import_mini30 = require("zod/mini");
|
|
@@ -10883,7 +10991,7 @@ var RulesyncPermissions = class _RulesyncPermissions extends RulesyncFile {
|
|
|
10883
10991
|
validate = true
|
|
10884
10992
|
}) {
|
|
10885
10993
|
const paths = _RulesyncPermissions.getSettablePaths();
|
|
10886
|
-
const filePath = (0,
|
|
10994
|
+
const filePath = (0, import_node_path73.join)(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
|
|
10887
10995
|
if (!await fileExists(filePath)) {
|
|
10888
10996
|
throw new Error(`No ${RULESYNC_PERMISSIONS_RELATIVE_FILE_PATH} found.`);
|
|
10889
10997
|
}
|
|
@@ -10973,7 +11081,7 @@ var AntigravityCliPermissions = class _AntigravityCliPermissions extends ToolPer
|
|
|
10973
11081
|
}
|
|
10974
11082
|
static getSettablePaths() {
|
|
10975
11083
|
return {
|
|
10976
|
-
relativeDirPath: (0,
|
|
11084
|
+
relativeDirPath: (0, import_node_path74.join)(".gemini", "antigravity-cli"),
|
|
10977
11085
|
relativeFilePath: "settings.json"
|
|
10978
11086
|
};
|
|
10979
11087
|
}
|
|
@@ -10982,7 +11090,7 @@ var AntigravityCliPermissions = class _AntigravityCliPermissions extends ToolPer
|
|
|
10982
11090
|
validate = true
|
|
10983
11091
|
}) {
|
|
10984
11092
|
const paths = _AntigravityCliPermissions.getSettablePaths();
|
|
10985
|
-
const filePath = (0,
|
|
11093
|
+
const filePath = (0, import_node_path74.join)(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
|
|
10986
11094
|
const fileContent = await readFileContentOrNull(filePath) ?? '{"permissions":{}}';
|
|
10987
11095
|
return new _AntigravityCliPermissions({
|
|
10988
11096
|
outputRoot,
|
|
@@ -10998,7 +11106,7 @@ var AntigravityCliPermissions = class _AntigravityCliPermissions extends ToolPer
|
|
|
10998
11106
|
rulesyncPermissions
|
|
10999
11107
|
}) {
|
|
11000
11108
|
const paths = _AntigravityCliPermissions.getSettablePaths();
|
|
11001
|
-
const filePath = (0,
|
|
11109
|
+
const filePath = (0, import_node_path74.join)(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
|
|
11002
11110
|
const existingContent = await readOrInitializeFileContent(
|
|
11003
11111
|
filePath,
|
|
11004
11112
|
JSON.stringify({}, null, 2)
|
|
@@ -11065,7 +11173,7 @@ var AntigravityCliPermissions = class _AntigravityCliPermissions extends ToolPer
|
|
|
11065
11173
|
settings = JSON.parse(this.getFileContent());
|
|
11066
11174
|
} catch (error) {
|
|
11067
11175
|
throw new Error(
|
|
11068
|
-
`Failed to parse Antigravity CLI permissions content in ${(0,
|
|
11176
|
+
`Failed to parse Antigravity CLI permissions content in ${(0, import_node_path74.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
|
|
11069
11177
|
{ cause: error }
|
|
11070
11178
|
);
|
|
11071
11179
|
}
|
|
@@ -11139,7 +11247,7 @@ function convertAntigravityCliToRulesyncPermissions(params) {
|
|
|
11139
11247
|
}
|
|
11140
11248
|
|
|
11141
11249
|
// src/features/permissions/augmentcode-permissions.ts
|
|
11142
|
-
var
|
|
11250
|
+
var import_node_path75 = require("path");
|
|
11143
11251
|
var import_mini31 = require("zod/mini");
|
|
11144
11252
|
var moduleLogger = new ConsoleLogger();
|
|
11145
11253
|
var AugmentPermissionTypeSchema = import_mini31.z.enum(["allow", "deny", "ask-user"]);
|
|
@@ -11289,7 +11397,7 @@ var AugmentcodePermissions = class _AugmentcodePermissions extends ToolPermissio
|
|
|
11289
11397
|
global = false
|
|
11290
11398
|
}) {
|
|
11291
11399
|
const paths = _AugmentcodePermissions.getSettablePaths({ global });
|
|
11292
|
-
const filePath = (0,
|
|
11400
|
+
const filePath = (0, import_node_path75.join)(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
|
|
11293
11401
|
const fileContent = await readFileContentOrNull(filePath) ?? '{"toolPermissions":[]}';
|
|
11294
11402
|
return new _AugmentcodePermissions({
|
|
11295
11403
|
outputRoot,
|
|
@@ -11306,7 +11414,7 @@ var AugmentcodePermissions = class _AugmentcodePermissions extends ToolPermissio
|
|
|
11306
11414
|
logger
|
|
11307
11415
|
}) {
|
|
11308
11416
|
const paths = _AugmentcodePermissions.getSettablePaths({ global });
|
|
11309
|
-
const filePath = (0,
|
|
11417
|
+
const filePath = (0, import_node_path75.join)(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
|
|
11310
11418
|
const existingContent = await readFileContentOrNull(filePath) ?? "{}";
|
|
11311
11419
|
let settings;
|
|
11312
11420
|
try {
|
|
@@ -11361,7 +11469,7 @@ var AugmentcodePermissions = class _AugmentcodePermissions extends ToolPermissio
|
|
|
11361
11469
|
settings = result.data;
|
|
11362
11470
|
} catch (error) {
|
|
11363
11471
|
throw new Error(
|
|
11364
|
-
`Failed to parse AugmentCode permissions content in ${(0,
|
|
11472
|
+
`Failed to parse AugmentCode permissions content in ${(0, import_node_path75.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
|
|
11365
11473
|
{ cause: error }
|
|
11366
11474
|
);
|
|
11367
11475
|
}
|
|
@@ -11529,7 +11637,7 @@ function convertAugmentToRulesyncPermissions({
|
|
|
11529
11637
|
}
|
|
11530
11638
|
|
|
11531
11639
|
// src/features/permissions/claudecode-permissions.ts
|
|
11532
|
-
var
|
|
11640
|
+
var import_node_path76 = require("path");
|
|
11533
11641
|
var import_es_toolkit5 = require("es-toolkit");
|
|
11534
11642
|
var CANONICAL_TO_CLAUDE_TOOL_NAMES = {
|
|
11535
11643
|
bash: "Bash",
|
|
@@ -11591,7 +11699,7 @@ var ClaudecodePermissions = class _ClaudecodePermissions extends ToolPermissions
|
|
|
11591
11699
|
validate = true
|
|
11592
11700
|
}) {
|
|
11593
11701
|
const paths = _ClaudecodePermissions.getSettablePaths();
|
|
11594
|
-
const filePath = (0,
|
|
11702
|
+
const filePath = (0, import_node_path76.join)(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
|
|
11595
11703
|
const fileContent = await readFileContentOrNull(filePath) ?? '{"permissions":{}}';
|
|
11596
11704
|
return new _ClaudecodePermissions({
|
|
11597
11705
|
outputRoot,
|
|
@@ -11607,7 +11715,7 @@ var ClaudecodePermissions = class _ClaudecodePermissions extends ToolPermissions
|
|
|
11607
11715
|
logger
|
|
11608
11716
|
}) {
|
|
11609
11717
|
const paths = _ClaudecodePermissions.getSettablePaths();
|
|
11610
|
-
const filePath = (0,
|
|
11718
|
+
const filePath = (0, import_node_path76.join)(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
|
|
11611
11719
|
const existingContent = await readOrInitializeFileContent(
|
|
11612
11720
|
filePath,
|
|
11613
11721
|
JSON.stringify({}, null, 2)
|
|
@@ -11684,7 +11792,7 @@ var ClaudecodePermissions = class _ClaudecodePermissions extends ToolPermissions
|
|
|
11684
11792
|
settings = JSON.parse(this.getFileContent());
|
|
11685
11793
|
} catch (error) {
|
|
11686
11794
|
throw new Error(
|
|
11687
|
-
`Failed to parse Claude permissions content in ${(0,
|
|
11795
|
+
`Failed to parse Claude permissions content in ${(0, import_node_path76.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
|
|
11688
11796
|
{ cause: error }
|
|
11689
11797
|
);
|
|
11690
11798
|
}
|
|
@@ -11757,7 +11865,7 @@ function convertClaudeToRulesyncPermissions(params) {
|
|
|
11757
11865
|
}
|
|
11758
11866
|
|
|
11759
11867
|
// src/features/permissions/cline-permissions.ts
|
|
11760
|
-
var
|
|
11868
|
+
var import_node_path77 = require("path");
|
|
11761
11869
|
var import_es_toolkit6 = require("es-toolkit");
|
|
11762
11870
|
var import_mini32 = require("zod/mini");
|
|
11763
11871
|
var ClineCommandPermissionsSchema = import_mini32.z.looseObject({
|
|
@@ -11793,7 +11901,7 @@ var ClinePermissions = class _ClinePermissions extends ToolPermissions {
|
|
|
11793
11901
|
global = false
|
|
11794
11902
|
}) {
|
|
11795
11903
|
const paths = _ClinePermissions.getSettablePaths({ global });
|
|
11796
|
-
const filePath = (0,
|
|
11904
|
+
const filePath = (0, import_node_path77.join)(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
|
|
11797
11905
|
const fileContent = await readFileContentOrNull(filePath) ?? "{}";
|
|
11798
11906
|
return new _ClinePermissions({
|
|
11799
11907
|
outputRoot,
|
|
@@ -11810,7 +11918,7 @@ var ClinePermissions = class _ClinePermissions extends ToolPermissions {
|
|
|
11810
11918
|
logger
|
|
11811
11919
|
}) {
|
|
11812
11920
|
const paths = _ClinePermissions.getSettablePaths({ global });
|
|
11813
|
-
const filePath = (0,
|
|
11921
|
+
const filePath = (0, import_node_path77.join)(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
|
|
11814
11922
|
const existingContent = await readFileContentOrNull(filePath) ?? "{}";
|
|
11815
11923
|
let existing;
|
|
11816
11924
|
try {
|
|
@@ -11898,7 +12006,7 @@ var ClinePermissions = class _ClinePermissions extends ToolPermissions {
|
|
|
11898
12006
|
parsed = result.data;
|
|
11899
12007
|
} catch (error) {
|
|
11900
12008
|
throw new Error(
|
|
11901
|
-
`Failed to parse Cline permissions content in ${(0,
|
|
12009
|
+
`Failed to parse Cline permissions content in ${(0, import_node_path77.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
|
|
11902
12010
|
{ cause: error }
|
|
11903
12011
|
);
|
|
11904
12012
|
}
|
|
@@ -11945,11 +12053,11 @@ var ClinePermissions = class _ClinePermissions extends ToolPermissions {
|
|
|
11945
12053
|
};
|
|
11946
12054
|
|
|
11947
12055
|
// src/features/permissions/codexcli-permissions.ts
|
|
11948
|
-
var
|
|
12056
|
+
var import_node_path78 = require("path");
|
|
11949
12057
|
var smolToml4 = __toESM(require("smol-toml"), 1);
|
|
11950
12058
|
var RULESYNC_PROFILE_NAME = "rulesync";
|
|
11951
12059
|
var RULESYNC_BASH_RULES_FILE_NAME = "rulesync.rules";
|
|
11952
|
-
var
|
|
12060
|
+
var CODEX_WORKSPACE_ROOTS_KEY = ":workspace_roots";
|
|
11953
12061
|
var CODEX_GLOB_SCAN_MAX_DEPTH = 8;
|
|
11954
12062
|
var CodexcliPermissions = class _CodexcliPermissions extends ToolPermissions {
|
|
11955
12063
|
static getSettablePaths(_options = {}) {
|
|
@@ -11967,7 +12075,7 @@ var CodexcliPermissions = class _CodexcliPermissions extends ToolPermissions {
|
|
|
11967
12075
|
global = false
|
|
11968
12076
|
}) {
|
|
11969
12077
|
const paths = this.getSettablePaths({ global });
|
|
11970
|
-
const filePath = (0,
|
|
12078
|
+
const filePath = (0, import_node_path78.join)(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
|
|
11971
12079
|
const fileContent = await readFileContentOrNull(filePath) ?? smolToml4.stringify({});
|
|
11972
12080
|
return new _CodexcliPermissions({
|
|
11973
12081
|
outputRoot,
|
|
@@ -11985,7 +12093,7 @@ var CodexcliPermissions = class _CodexcliPermissions extends ToolPermissions {
|
|
|
11985
12093
|
global = false
|
|
11986
12094
|
}) {
|
|
11987
12095
|
const paths = this.getSettablePaths({ global });
|
|
11988
|
-
const filePath = (0,
|
|
12096
|
+
const filePath = (0, import_node_path78.join)(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
|
|
11989
12097
|
const existingContent = await readFileContentOrNull(filePath) ?? smolToml4.stringify({});
|
|
11990
12098
|
const parsed = toMutableTable(smolToml4.parse(existingContent));
|
|
11991
12099
|
const profile = convertRulesyncToCodexProfile({
|
|
@@ -12010,7 +12118,7 @@ var CodexcliPermissions = class _CodexcliPermissions extends ToolPermissions {
|
|
|
12010
12118
|
parsed = smolToml4.parse(this.getFileContent());
|
|
12011
12119
|
} catch (error) {
|
|
12012
12120
|
throw new Error(
|
|
12013
|
-
`Failed to parse Codex CLI permissions content in ${(0,
|
|
12121
|
+
`Failed to parse Codex CLI permissions content in ${(0, import_node_path78.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
|
|
12014
12122
|
{ cause: error }
|
|
12015
12123
|
);
|
|
12016
12124
|
}
|
|
@@ -12051,7 +12159,7 @@ function createCodexcliBashRulesFile({
|
|
|
12051
12159
|
}) {
|
|
12052
12160
|
return new CodexcliRulesFile({
|
|
12053
12161
|
outputRoot,
|
|
12054
|
-
relativeDirPath: (0,
|
|
12162
|
+
relativeDirPath: (0, import_node_path78.join)(".codex", "rules"),
|
|
12055
12163
|
relativeFilePath: RULESYNC_BASH_RULES_FILE_NAME,
|
|
12056
12164
|
fileContent: buildCodexBashRulesContent(config)
|
|
12057
12165
|
});
|
|
@@ -12061,14 +12169,14 @@ function convertRulesyncToCodexProfile({
|
|
|
12061
12169
|
logger
|
|
12062
12170
|
}) {
|
|
12063
12171
|
const filesystem = {};
|
|
12064
|
-
const
|
|
12172
|
+
const workspaceRootFilesystem = {};
|
|
12065
12173
|
const domains = {};
|
|
12066
12174
|
for (const [toolName, rules] of Object.entries(config.permission)) {
|
|
12067
12175
|
if (toolName === "read") {
|
|
12068
12176
|
for (const [pattern, action] of Object.entries(rules)) {
|
|
12069
12177
|
addFilesystemRule({
|
|
12070
12178
|
filesystem,
|
|
12071
|
-
|
|
12179
|
+
workspaceRootFilesystem,
|
|
12072
12180
|
pattern,
|
|
12073
12181
|
access: mapReadAction(action),
|
|
12074
12182
|
logger
|
|
@@ -12080,7 +12188,7 @@ function convertRulesyncToCodexProfile({
|
|
|
12080
12188
|
for (const [pattern, action] of Object.entries(rules)) {
|
|
12081
12189
|
addFilesystemRule({
|
|
12082
12190
|
filesystem,
|
|
12083
|
-
|
|
12191
|
+
workspaceRootFilesystem,
|
|
12084
12192
|
pattern,
|
|
12085
12193
|
access: mapWriteAction(action),
|
|
12086
12194
|
logger
|
|
@@ -12104,16 +12212,16 @@ function convertRulesyncToCodexProfile({
|
|
|
12104
12212
|
`Codex CLI permissions support only read/edit/write/webfetch categories. Skipping: ${toolName}`
|
|
12105
12213
|
);
|
|
12106
12214
|
}
|
|
12107
|
-
if (Object.keys(
|
|
12108
|
-
if (typeof filesystem[
|
|
12215
|
+
if (Object.keys(workspaceRootFilesystem).length > 0) {
|
|
12216
|
+
if (typeof filesystem[CODEX_WORKSPACE_ROOTS_KEY] === "string") {
|
|
12109
12217
|
logger?.warn(
|
|
12110
|
-
`"${
|
|
12218
|
+
`"${CODEX_WORKSPACE_ROOTS_KEY}" is set as a direct filesystem access rule in the permissions, but it will be overwritten by workspace-root rules. Consider removing the direct "${CODEX_WORKSPACE_ROOTS_KEY}" entry.`
|
|
12111
12219
|
);
|
|
12112
12220
|
}
|
|
12113
|
-
if (Object.keys(
|
|
12221
|
+
if (Object.keys(workspaceRootFilesystem).some((pattern) => pattern.includes("**"))) {
|
|
12114
12222
|
filesystem.glob_scan_max_depth = CODEX_GLOB_SCAN_MAX_DEPTH;
|
|
12115
12223
|
}
|
|
12116
|
-
filesystem[
|
|
12224
|
+
filesystem[CODEX_WORKSPACE_ROOTS_KEY] = workspaceRootFilesystem;
|
|
12117
12225
|
}
|
|
12118
12226
|
return {
|
|
12119
12227
|
...Object.keys(filesystem).length > 0 ? { filesystem } : {},
|
|
@@ -12158,7 +12266,7 @@ function toCodexProfile(value) {
|
|
|
12158
12266
|
}
|
|
12159
12267
|
function addFilesystemRule({
|
|
12160
12268
|
filesystem,
|
|
12161
|
-
|
|
12269
|
+
workspaceRootFilesystem,
|
|
12162
12270
|
pattern,
|
|
12163
12271
|
access,
|
|
12164
12272
|
logger
|
|
@@ -12171,13 +12279,13 @@ function addFilesystemRule({
|
|
|
12171
12279
|
filesystem[pattern] = access;
|
|
12172
12280
|
return;
|
|
12173
12281
|
}
|
|
12174
|
-
|
|
12282
|
+
workspaceRootFilesystem[pattern] = access;
|
|
12175
12283
|
}
|
|
12176
12284
|
function canBeCodexFilesystemRoot(pattern) {
|
|
12177
|
-
return (0,
|
|
12285
|
+
return (0, import_node_path78.isAbsolute)(pattern) || /^[A-Za-z]:[\\/]/.test(pattern) || pattern.startsWith("~/") || pattern === "~" || pattern.startsWith(":");
|
|
12178
12286
|
}
|
|
12179
12287
|
function addRulesyncFilesystemRule(permission, pattern, access) {
|
|
12180
|
-
if (access === "none") {
|
|
12288
|
+
if (access === "deny" || access === "none") {
|
|
12181
12289
|
permission.read ??= {};
|
|
12182
12290
|
permission.edit ??= {};
|
|
12183
12291
|
permission.read[pattern] = "deny";
|
|
@@ -12216,7 +12324,7 @@ function toFilesystemRecord(value) {
|
|
|
12216
12324
|
return Object.keys(result).length > 0 ? result : void 0;
|
|
12217
12325
|
}
|
|
12218
12326
|
function isCodexFilesystemAccess(value) {
|
|
12219
|
-
return value === "read" || value === "write" || value === "none";
|
|
12327
|
+
return value === "read" || value === "write" || value === "deny" || value === "none";
|
|
12220
12328
|
}
|
|
12221
12329
|
function isCodexFilesystemRuleTable(value) {
|
|
12222
12330
|
if (!value || typeof value !== "object" || Array.isArray(value)) return false;
|
|
@@ -12243,10 +12351,10 @@ function toDomainRecord(value) {
|
|
|
12243
12351
|
return Object.keys(result).length > 0 ? result : void 0;
|
|
12244
12352
|
}
|
|
12245
12353
|
function mapReadAction(action) {
|
|
12246
|
-
return action === "allow" ? "read" : "
|
|
12354
|
+
return action === "allow" ? "read" : "deny";
|
|
12247
12355
|
}
|
|
12248
12356
|
function mapWriteAction(action) {
|
|
12249
|
-
return action === "allow" ? "write" : "
|
|
12357
|
+
return action === "allow" ? "write" : "deny";
|
|
12250
12358
|
}
|
|
12251
12359
|
function buildCodexBashRulesContent(config) {
|
|
12252
12360
|
const bashRules = config.permission.bash ?? {};
|
|
@@ -12290,7 +12398,7 @@ function mapBashActionToDecision(action) {
|
|
|
12290
12398
|
}
|
|
12291
12399
|
|
|
12292
12400
|
// src/features/permissions/cursor-permissions.ts
|
|
12293
|
-
var
|
|
12401
|
+
var import_node_path79 = require("path");
|
|
12294
12402
|
var import_es_toolkit7 = require("es-toolkit");
|
|
12295
12403
|
var CANONICAL_TO_CURSOR_TYPE = {
|
|
12296
12404
|
bash: "Shell",
|
|
@@ -12408,7 +12516,7 @@ var CursorPermissions = class _CursorPermissions extends ToolPermissions {
|
|
|
12408
12516
|
global = false
|
|
12409
12517
|
}) {
|
|
12410
12518
|
const paths = _CursorPermissions.getSettablePaths({ global });
|
|
12411
|
-
const filePath = (0,
|
|
12519
|
+
const filePath = (0, import_node_path79.join)(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
|
|
12412
12520
|
const fileContent = await readFileContentOrNull(filePath) ?? '{"permissions":{}}';
|
|
12413
12521
|
return new _CursorPermissions({
|
|
12414
12522
|
outputRoot,
|
|
@@ -12425,7 +12533,7 @@ var CursorPermissions = class _CursorPermissions extends ToolPermissions {
|
|
|
12425
12533
|
global = false
|
|
12426
12534
|
}) {
|
|
12427
12535
|
const paths = _CursorPermissions.getSettablePaths({ global });
|
|
12428
|
-
const filePath = (0,
|
|
12536
|
+
const filePath = (0, import_node_path79.join)(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
|
|
12429
12537
|
const existingContent = await readOrInitializeFileContent(
|
|
12430
12538
|
filePath,
|
|
12431
12539
|
JSON.stringify({}, null, 2)
|
|
@@ -12501,7 +12609,7 @@ var CursorPermissions = class _CursorPermissions extends ToolPermissions {
|
|
|
12501
12609
|
settings = asCursorCliConfig(JSON.parse(this.getFileContent()));
|
|
12502
12610
|
} catch (error) {
|
|
12503
12611
|
throw new Error(
|
|
12504
|
-
`Failed to parse Cursor CLI permissions content in ${(0,
|
|
12612
|
+
`Failed to parse Cursor CLI permissions content in ${(0, import_node_path79.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
|
|
12505
12613
|
{ cause: error }
|
|
12506
12614
|
);
|
|
12507
12615
|
}
|
|
@@ -12576,10 +12684,10 @@ function convertCursorToRulesyncPermissions(params) {
|
|
|
12576
12684
|
}
|
|
12577
12685
|
|
|
12578
12686
|
// src/features/permissions/geminicli-permissions.ts
|
|
12579
|
-
var
|
|
12687
|
+
var import_node_path80 = require("path");
|
|
12580
12688
|
var smolToml5 = __toESM(require("smol-toml"), 1);
|
|
12581
12689
|
var import_mini33 = require("zod/mini");
|
|
12582
|
-
var GEMINICLI_POLICY_RELATIVE_DIR_PATH = (0,
|
|
12690
|
+
var GEMINICLI_POLICY_RELATIVE_DIR_PATH = (0, import_node_path80.join)(".gemini", "policies");
|
|
12583
12691
|
var GEMINICLI_POLICY_FILE_NAME = "rulesync.toml";
|
|
12584
12692
|
var RULESYNC_TO_GEMINICLI_TOOL_NAME = {
|
|
12585
12693
|
bash: "run_shell_command",
|
|
@@ -12620,7 +12728,7 @@ var GeminicliPermissions = class _GeminicliPermissions extends ToolPermissions {
|
|
|
12620
12728
|
global = false
|
|
12621
12729
|
}) {
|
|
12622
12730
|
const paths = this.getSettablePaths({ global });
|
|
12623
|
-
const filePath = (0,
|
|
12731
|
+
const filePath = (0, import_node_path80.join)(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
|
|
12624
12732
|
const fileContent = await readFileContentOrNull(filePath) ?? "";
|
|
12625
12733
|
return new _GeminicliPermissions({
|
|
12626
12734
|
outputRoot,
|
|
@@ -12656,7 +12764,7 @@ var GeminicliPermissions = class _GeminicliPermissions extends ToolPermissions {
|
|
|
12656
12764
|
parsed = smolToml5.parse(fileContent);
|
|
12657
12765
|
} catch (error) {
|
|
12658
12766
|
throw new Error(
|
|
12659
|
-
`Failed to parse Gemini CLI policy TOML in ${(0,
|
|
12767
|
+
`Failed to parse Gemini CLI policy TOML in ${(0, import_node_path80.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
|
|
12660
12768
|
{ cause: error }
|
|
12661
12769
|
);
|
|
12662
12770
|
}
|
|
@@ -12948,7 +13056,7 @@ function extractPattern(rule) {
|
|
|
12948
13056
|
}
|
|
12949
13057
|
|
|
12950
13058
|
// src/features/permissions/kilo-permissions.ts
|
|
12951
|
-
var
|
|
13059
|
+
var import_node_path81 = require("path");
|
|
12952
13060
|
var import_jsonc_parser5 = require("jsonc-parser");
|
|
12953
13061
|
var import_mini34 = require("zod/mini");
|
|
12954
13062
|
var KiloPermissionSchema = import_mini34.z.union([
|
|
@@ -13009,7 +13117,7 @@ var KiloPermissions = class _KiloPermissions extends ToolPermissions {
|
|
|
13009
13117
|
static getSettablePaths({
|
|
13010
13118
|
global = false
|
|
13011
13119
|
} = {}) {
|
|
13012
|
-
return global ? { relativeDirPath: (0,
|
|
13120
|
+
return global ? { relativeDirPath: (0, import_node_path81.join)(".config", "kilo"), relativeFilePath: KILO_FILE_NAME } : { relativeDirPath: ".", relativeFilePath: KILO_FILE_NAME };
|
|
13013
13121
|
}
|
|
13014
13122
|
static async fromFile({
|
|
13015
13123
|
outputRoot = process.cwd(),
|
|
@@ -13017,7 +13125,7 @@ var KiloPermissions = class _KiloPermissions extends ToolPermissions {
|
|
|
13017
13125
|
global = false
|
|
13018
13126
|
}) {
|
|
13019
13127
|
const basePaths = _KiloPermissions.getSettablePaths({ global });
|
|
13020
|
-
const filePath = (0,
|
|
13128
|
+
const filePath = (0, import_node_path81.join)(outputRoot, basePaths.relativeDirPath, basePaths.relativeFilePath);
|
|
13021
13129
|
const fileContent = await readFileContentOrNull(filePath);
|
|
13022
13130
|
const parsed = parseKiloJsoncStrict(fileContent ?? "{}", filePath);
|
|
13023
13131
|
const nextJson = { ...parsed, permission: parsed.permission ?? {} };
|
|
@@ -13036,7 +13144,7 @@ var KiloPermissions = class _KiloPermissions extends ToolPermissions {
|
|
|
13036
13144
|
logger
|
|
13037
13145
|
}) {
|
|
13038
13146
|
const basePaths = _KiloPermissions.getSettablePaths({ global });
|
|
13039
|
-
const filePath = (0,
|
|
13147
|
+
const filePath = (0, import_node_path81.join)(outputRoot, basePaths.relativeDirPath, basePaths.relativeFilePath);
|
|
13040
13148
|
const fileContent = await readFileContentOrNull(filePath);
|
|
13041
13149
|
const parsed = parseKiloJsoncStrict(fileContent ?? "{}", filePath);
|
|
13042
13150
|
const parsedPermission = parsed.permission;
|
|
@@ -13122,7 +13230,7 @@ var KiloPermissions = class _KiloPermissions extends ToolPermissions {
|
|
|
13122
13230
|
};
|
|
13123
13231
|
|
|
13124
13232
|
// src/features/permissions/kiro-permissions.ts
|
|
13125
|
-
var
|
|
13233
|
+
var import_node_path82 = require("path");
|
|
13126
13234
|
var import_mini35 = require("zod/mini");
|
|
13127
13235
|
var KiroAgentSchema = import_mini35.z.looseObject({
|
|
13128
13236
|
allowedTools: import_mini35.z.optional(import_mini35.z.array(import_mini35.z.string())),
|
|
@@ -13132,7 +13240,7 @@ var UnknownRecordSchema = import_mini35.z.record(import_mini35.z.string(), impor
|
|
|
13132
13240
|
var KiroPermissions = class _KiroPermissions extends ToolPermissions {
|
|
13133
13241
|
static getSettablePaths(_options = {}) {
|
|
13134
13242
|
return {
|
|
13135
|
-
relativeDirPath: (0,
|
|
13243
|
+
relativeDirPath: (0, import_node_path82.join)(".kiro", "agents"),
|
|
13136
13244
|
relativeFilePath: "default.json"
|
|
13137
13245
|
};
|
|
13138
13246
|
}
|
|
@@ -13144,7 +13252,7 @@ var KiroPermissions = class _KiroPermissions extends ToolPermissions {
|
|
|
13144
13252
|
validate = true
|
|
13145
13253
|
}) {
|
|
13146
13254
|
const paths = this.getSettablePaths();
|
|
13147
|
-
const filePath = (0,
|
|
13255
|
+
const filePath = (0, import_node_path82.join)(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
|
|
13148
13256
|
const fileContent = await readFileContentOrNull(filePath) ?? JSON.stringify({}, null, 2);
|
|
13149
13257
|
return new _KiroPermissions({
|
|
13150
13258
|
outputRoot,
|
|
@@ -13161,7 +13269,7 @@ var KiroPermissions = class _KiroPermissions extends ToolPermissions {
|
|
|
13161
13269
|
logger
|
|
13162
13270
|
}) {
|
|
13163
13271
|
const paths = this.getSettablePaths();
|
|
13164
|
-
const filePath = (0,
|
|
13272
|
+
const filePath = (0, import_node_path82.join)(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
|
|
13165
13273
|
const existingContent = await readFileContentOrNull(filePath) ?? JSON.stringify({}, null, 2);
|
|
13166
13274
|
const parsedResult = KiroAgentSchema.safeParse(JSON.parse(existingContent));
|
|
13167
13275
|
if (!parsedResult.success) {
|
|
@@ -13185,7 +13293,7 @@ var KiroPermissions = class _KiroPermissions extends ToolPermissions {
|
|
|
13185
13293
|
parsed = KiroAgentSchema.parse(JSON.parse(this.getFileContent()));
|
|
13186
13294
|
} catch (error) {
|
|
13187
13295
|
throw new Error(
|
|
13188
|
-
`Failed to parse Kiro permissions content in ${(0,
|
|
13296
|
+
`Failed to parse Kiro permissions content in ${(0, import_node_path82.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
|
|
13189
13297
|
{ cause: error }
|
|
13190
13298
|
);
|
|
13191
13299
|
}
|
|
@@ -13310,7 +13418,7 @@ function asStringArray(value) {
|
|
|
13310
13418
|
}
|
|
13311
13419
|
|
|
13312
13420
|
// src/features/permissions/opencode-permissions.ts
|
|
13313
|
-
var
|
|
13421
|
+
var import_node_path83 = require("path");
|
|
13314
13422
|
var import_jsonc_parser6 = require("jsonc-parser");
|
|
13315
13423
|
var import_mini36 = require("zod/mini");
|
|
13316
13424
|
var OpencodePermissionSchema = import_mini36.z.union([
|
|
@@ -13335,7 +13443,7 @@ var OpencodePermissions = class _OpencodePermissions extends ToolPermissions {
|
|
|
13335
13443
|
static getSettablePaths({
|
|
13336
13444
|
global = false
|
|
13337
13445
|
} = {}) {
|
|
13338
|
-
return global ? { relativeDirPath: (0,
|
|
13446
|
+
return global ? { relativeDirPath: (0, import_node_path83.join)(".config", "opencode"), relativeFilePath: "opencode.json" } : { relativeDirPath: ".", relativeFilePath: "opencode.json" };
|
|
13339
13447
|
}
|
|
13340
13448
|
static async fromFile({
|
|
13341
13449
|
outputRoot = process.cwd(),
|
|
@@ -13343,9 +13451,9 @@ var OpencodePermissions = class _OpencodePermissions extends ToolPermissions {
|
|
|
13343
13451
|
global = false
|
|
13344
13452
|
}) {
|
|
13345
13453
|
const basePaths = _OpencodePermissions.getSettablePaths({ global });
|
|
13346
|
-
const jsonDir = (0,
|
|
13347
|
-
const jsoncPath = (0,
|
|
13348
|
-
const jsonPath = (0,
|
|
13454
|
+
const jsonDir = (0, import_node_path83.join)(outputRoot, basePaths.relativeDirPath);
|
|
13455
|
+
const jsoncPath = (0, import_node_path83.join)(jsonDir, "opencode.jsonc");
|
|
13456
|
+
const jsonPath = (0, import_node_path83.join)(jsonDir, "opencode.json");
|
|
13349
13457
|
let fileContent = await readFileContentOrNull(jsoncPath);
|
|
13350
13458
|
let relativeFilePath = "opencode.jsonc";
|
|
13351
13459
|
if (!fileContent) {
|
|
@@ -13370,9 +13478,9 @@ var OpencodePermissions = class _OpencodePermissions extends ToolPermissions {
|
|
|
13370
13478
|
global = false
|
|
13371
13479
|
}) {
|
|
13372
13480
|
const basePaths = _OpencodePermissions.getSettablePaths({ global });
|
|
13373
|
-
const jsonDir = (0,
|
|
13374
|
-
const jsoncPath = (0,
|
|
13375
|
-
const jsonPath = (0,
|
|
13481
|
+
const jsonDir = (0, import_node_path83.join)(outputRoot, basePaths.relativeDirPath);
|
|
13482
|
+
const jsoncPath = (0, import_node_path83.join)(jsonDir, "opencode.jsonc");
|
|
13483
|
+
const jsonPath = (0, import_node_path83.join)(jsonDir, "opencode.json");
|
|
13376
13484
|
let fileContent = await readFileContentOrNull(jsoncPath);
|
|
13377
13485
|
let relativeFilePath = "opencode.jsonc";
|
|
13378
13486
|
if (!fileContent) {
|
|
@@ -13442,7 +13550,7 @@ var OpencodePermissions = class _OpencodePermissions extends ToolPermissions {
|
|
|
13442
13550
|
};
|
|
13443
13551
|
|
|
13444
13552
|
// src/features/permissions/qwencode-permissions.ts
|
|
13445
|
-
var
|
|
13553
|
+
var import_node_path84 = require("path");
|
|
13446
13554
|
var import_es_toolkit8 = require("es-toolkit");
|
|
13447
13555
|
var import_mini37 = require("zod/mini");
|
|
13448
13556
|
var QwenSettingsPermissionsSchema = import_mini37.z.looseObject({
|
|
@@ -13530,7 +13638,7 @@ var QwencodePermissions = class _QwencodePermissions extends ToolPermissions {
|
|
|
13530
13638
|
global = false
|
|
13531
13639
|
}) {
|
|
13532
13640
|
const paths = _QwencodePermissions.getSettablePaths({ global });
|
|
13533
|
-
const filePath = (0,
|
|
13641
|
+
const filePath = (0, import_node_path84.join)(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
|
|
13534
13642
|
const fileContent = await readFileContentOrNull(filePath) ?? '{"permissions":{}}';
|
|
13535
13643
|
return new _QwencodePermissions({
|
|
13536
13644
|
outputRoot,
|
|
@@ -13547,7 +13655,7 @@ var QwencodePermissions = class _QwencodePermissions extends ToolPermissions {
|
|
|
13547
13655
|
logger
|
|
13548
13656
|
}) {
|
|
13549
13657
|
const paths = _QwencodePermissions.getSettablePaths({ global });
|
|
13550
|
-
const filePath = (0,
|
|
13658
|
+
const filePath = (0, import_node_path84.join)(outputRoot, paths.relativeDirPath, paths.relativeFilePath);
|
|
13551
13659
|
const existingContent = await readFileContentOrNull(filePath) ?? "{}";
|
|
13552
13660
|
let settings;
|
|
13553
13661
|
try {
|
|
@@ -13620,7 +13728,7 @@ var QwencodePermissions = class _QwencodePermissions extends ToolPermissions {
|
|
|
13620
13728
|
settings = result.data;
|
|
13621
13729
|
} catch (error) {
|
|
13622
13730
|
throw new Error(
|
|
13623
|
-
`Failed to parse Qwen permissions content in ${(0,
|
|
13731
|
+
`Failed to parse Qwen permissions content in ${(0, import_node_path84.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${formatError(error)}`,
|
|
13624
13732
|
{ cause: error }
|
|
13625
13733
|
);
|
|
13626
13734
|
}
|
|
@@ -13963,25 +14071,25 @@ var PermissionsProcessor = class extends FeatureProcessor {
|
|
|
13963
14071
|
};
|
|
13964
14072
|
|
|
13965
14073
|
// src/features/rules/rules-processor.ts
|
|
13966
|
-
var
|
|
14074
|
+
var import_node_path166 = require("path");
|
|
13967
14075
|
var import_toon = require("@toon-format/toon");
|
|
13968
|
-
var
|
|
14076
|
+
var import_mini82 = require("zod/mini");
|
|
13969
14077
|
|
|
13970
14078
|
// src/constants/general.ts
|
|
13971
14079
|
var SKILL_FILE_NAME = "SKILL.md";
|
|
13972
14080
|
|
|
13973
14081
|
// src/features/skills/agentsmd-skill.ts
|
|
13974
|
-
var
|
|
14082
|
+
var import_node_path88 = require("path");
|
|
13975
14083
|
|
|
13976
14084
|
// src/features/skills/simulated-skill.ts
|
|
13977
|
-
var
|
|
14085
|
+
var import_node_path87 = require("path");
|
|
13978
14086
|
var import_mini39 = require("zod/mini");
|
|
13979
14087
|
|
|
13980
14088
|
// src/features/skills/tool-skill.ts
|
|
13981
|
-
var
|
|
14089
|
+
var import_node_path86 = require("path");
|
|
13982
14090
|
|
|
13983
14091
|
// src/types/ai-dir.ts
|
|
13984
|
-
var
|
|
14092
|
+
var import_node_path85 = __toESM(require("path"), 1);
|
|
13985
14093
|
var AiDir = class {
|
|
13986
14094
|
/**
|
|
13987
14095
|
* @example "."
|
|
@@ -14015,7 +14123,7 @@ var AiDir = class {
|
|
|
14015
14123
|
otherFiles = [],
|
|
14016
14124
|
global = false
|
|
14017
14125
|
}) {
|
|
14018
|
-
if (dirName.includes(
|
|
14126
|
+
if (dirName.includes(import_node_path85.default.sep) || dirName.includes("/") || dirName.includes("\\")) {
|
|
14019
14127
|
throw new Error(`Directory name cannot contain path separators: dirName="${dirName}"`);
|
|
14020
14128
|
}
|
|
14021
14129
|
this.outputRoot = outputRoot;
|
|
@@ -14038,11 +14146,11 @@ var AiDir = class {
|
|
|
14038
14146
|
return this.dirName;
|
|
14039
14147
|
}
|
|
14040
14148
|
getDirPath() {
|
|
14041
|
-
const fullPath =
|
|
14042
|
-
const resolvedFull = (0,
|
|
14043
|
-
const resolvedBase = (0,
|
|
14044
|
-
const rel = (0,
|
|
14045
|
-
if (rel.startsWith("..") ||
|
|
14149
|
+
const fullPath = import_node_path85.default.join(this.outputRoot, this.relativeDirPath, this.dirName);
|
|
14150
|
+
const resolvedFull = (0, import_node_path85.resolve)(fullPath);
|
|
14151
|
+
const resolvedBase = (0, import_node_path85.resolve)(this.outputRoot);
|
|
14152
|
+
const rel = (0, import_node_path85.relative)(resolvedBase, resolvedFull);
|
|
14153
|
+
if (rel.startsWith("..") || import_node_path85.default.isAbsolute(rel)) {
|
|
14046
14154
|
throw new Error(
|
|
14047
14155
|
`Path traversal detected: Final path escapes outputRoot. outputRoot="${this.outputRoot}", relativeDirPath="${this.relativeDirPath}", dirName="${this.dirName}"`
|
|
14048
14156
|
);
|
|
@@ -14059,7 +14167,7 @@ var AiDir = class {
|
|
|
14059
14167
|
* Returns the relative path from CWD with POSIX separators for consistent cross-platform output.
|
|
14060
14168
|
*/
|
|
14061
14169
|
getRelativePathFromCwd() {
|
|
14062
|
-
return toPosixPath(
|
|
14170
|
+
return toPosixPath(import_node_path85.default.join(this.relativeDirPath, this.dirName));
|
|
14063
14171
|
}
|
|
14064
14172
|
getGlobal() {
|
|
14065
14173
|
return this.global;
|
|
@@ -14078,15 +14186,15 @@ var AiDir = class {
|
|
|
14078
14186
|
* @returns Array of files with their relative paths and buffers
|
|
14079
14187
|
*/
|
|
14080
14188
|
static async collectOtherFiles(outputRoot, relativeDirPath, dirName, excludeFileName) {
|
|
14081
|
-
const dirPath = (0,
|
|
14082
|
-
const glob = (0,
|
|
14189
|
+
const dirPath = (0, import_node_path85.join)(outputRoot, relativeDirPath, dirName);
|
|
14190
|
+
const glob = (0, import_node_path85.join)(dirPath, "**", "*");
|
|
14083
14191
|
const filePaths = await findFilesByGlobs(glob, { type: "file" });
|
|
14084
|
-
const filteredPaths = filePaths.filter((filePath) => (0,
|
|
14192
|
+
const filteredPaths = filePaths.filter((filePath) => (0, import_node_path85.basename)(filePath) !== excludeFileName);
|
|
14085
14193
|
const files = await Promise.all(
|
|
14086
14194
|
filteredPaths.map(async (filePath) => {
|
|
14087
14195
|
const fileBuffer = await readFileBuffer(filePath);
|
|
14088
14196
|
return {
|
|
14089
|
-
relativeFilePathToDirPath: (0,
|
|
14197
|
+
relativeFilePathToDirPath: (0, import_node_path85.relative)(dirPath, filePath),
|
|
14090
14198
|
fileBuffer
|
|
14091
14199
|
};
|
|
14092
14200
|
})
|
|
@@ -14180,8 +14288,8 @@ var ToolSkill = class extends AiDir {
|
|
|
14180
14288
|
}) {
|
|
14181
14289
|
const settablePaths = getSettablePaths({ global });
|
|
14182
14290
|
const actualRelativeDirPath = relativeDirPath ?? settablePaths.relativeDirPath;
|
|
14183
|
-
const skillDirPath = (0,
|
|
14184
|
-
const skillFilePath = (0,
|
|
14291
|
+
const skillDirPath = (0, import_node_path86.join)(outputRoot, actualRelativeDirPath, dirName);
|
|
14292
|
+
const skillFilePath = (0, import_node_path86.join)(skillDirPath, SKILL_FILE_NAME);
|
|
14185
14293
|
if (!await fileExists(skillFilePath)) {
|
|
14186
14294
|
throw new Error(`${SKILL_FILE_NAME} not found in ${skillDirPath}`);
|
|
14187
14295
|
}
|
|
@@ -14205,7 +14313,7 @@ var ToolSkill = class extends AiDir {
|
|
|
14205
14313
|
}
|
|
14206
14314
|
requireMainFileFrontmatter() {
|
|
14207
14315
|
if (!this.mainFile?.frontmatter) {
|
|
14208
|
-
throw new Error(`Frontmatter is not defined in ${(0,
|
|
14316
|
+
throw new Error(`Frontmatter is not defined in ${(0, import_node_path86.join)(this.relativeDirPath, this.dirName)}`);
|
|
14209
14317
|
}
|
|
14210
14318
|
return this.mainFile.frontmatter;
|
|
14211
14319
|
}
|
|
@@ -14245,7 +14353,7 @@ var SimulatedSkill = class extends ToolSkill {
|
|
|
14245
14353
|
const result = SimulatedSkillFrontmatterSchema.safeParse(frontmatter);
|
|
14246
14354
|
if (!result.success) {
|
|
14247
14355
|
throw new Error(
|
|
14248
|
-
`Invalid frontmatter in ${(0,
|
|
14356
|
+
`Invalid frontmatter in ${(0, import_node_path87.join)(relativeDirPath, dirName)}: ${formatError(result.error)}`
|
|
14249
14357
|
);
|
|
14250
14358
|
}
|
|
14251
14359
|
}
|
|
@@ -14304,8 +14412,8 @@ var SimulatedSkill = class extends ToolSkill {
|
|
|
14304
14412
|
}) {
|
|
14305
14413
|
const settablePaths = this.getSettablePaths();
|
|
14306
14414
|
const actualRelativeDirPath = relativeDirPath ?? settablePaths.relativeDirPath;
|
|
14307
|
-
const skillDirPath = (0,
|
|
14308
|
-
const skillFilePath = (0,
|
|
14415
|
+
const skillDirPath = (0, import_node_path87.join)(outputRoot, actualRelativeDirPath, dirName);
|
|
14416
|
+
const skillFilePath = (0, import_node_path87.join)(skillDirPath, SKILL_FILE_NAME);
|
|
14309
14417
|
if (!await fileExists(skillFilePath)) {
|
|
14310
14418
|
throw new Error(`${SKILL_FILE_NAME} not found in ${skillDirPath}`);
|
|
14311
14419
|
}
|
|
@@ -14382,7 +14490,7 @@ var AgentsmdSkill = class _AgentsmdSkill extends SimulatedSkill {
|
|
|
14382
14490
|
throw new Error("AgentsmdSkill does not support global mode.");
|
|
14383
14491
|
}
|
|
14384
14492
|
return {
|
|
14385
|
-
relativeDirPath: (0,
|
|
14493
|
+
relativeDirPath: (0, import_node_path88.join)(".agents", "skills")
|
|
14386
14494
|
};
|
|
14387
14495
|
}
|
|
14388
14496
|
static async fromDir(params) {
|
|
@@ -14409,11 +14517,11 @@ var AgentsmdSkill = class _AgentsmdSkill extends SimulatedSkill {
|
|
|
14409
14517
|
};
|
|
14410
14518
|
|
|
14411
14519
|
// src/features/skills/factorydroid-skill.ts
|
|
14412
|
-
var
|
|
14520
|
+
var import_node_path89 = require("path");
|
|
14413
14521
|
var FactorydroidSkill = class _FactorydroidSkill extends SimulatedSkill {
|
|
14414
14522
|
static getSettablePaths(_options) {
|
|
14415
14523
|
return {
|
|
14416
|
-
relativeDirPath: (0,
|
|
14524
|
+
relativeDirPath: (0, import_node_path89.join)(".factory", "skills")
|
|
14417
14525
|
};
|
|
14418
14526
|
}
|
|
14419
14527
|
static async fromDir(params) {
|
|
@@ -14440,11 +14548,11 @@ var FactorydroidSkill = class _FactorydroidSkill extends SimulatedSkill {
|
|
|
14440
14548
|
};
|
|
14441
14549
|
|
|
14442
14550
|
// src/features/skills/rovodev-skill.ts
|
|
14443
|
-
var
|
|
14551
|
+
var import_node_path91 = require("path");
|
|
14444
14552
|
var import_mini41 = require("zod/mini");
|
|
14445
14553
|
|
|
14446
14554
|
// src/features/skills/rulesync-skill.ts
|
|
14447
|
-
var
|
|
14555
|
+
var import_node_path90 = require("path");
|
|
14448
14556
|
var import_mini40 = require("zod/mini");
|
|
14449
14557
|
var RulesyncSkillFrontmatterSchemaInternal = import_mini40.z.looseObject({
|
|
14450
14558
|
name: import_mini40.z.string(),
|
|
@@ -14531,7 +14639,7 @@ var RulesyncSkill = class _RulesyncSkill extends AiDir {
|
|
|
14531
14639
|
}
|
|
14532
14640
|
getFrontmatter() {
|
|
14533
14641
|
if (!this.mainFile?.frontmatter) {
|
|
14534
|
-
throw new Error(`Frontmatter is not defined in ${(0,
|
|
14642
|
+
throw new Error(`Frontmatter is not defined in ${(0, import_node_path90.join)(this.relativeDirPath, this.dirName)}`);
|
|
14535
14643
|
}
|
|
14536
14644
|
const result = RulesyncSkillFrontmatterSchema.parse(this.mainFile.frontmatter);
|
|
14537
14645
|
return result;
|
|
@@ -14557,8 +14665,8 @@ var RulesyncSkill = class _RulesyncSkill extends AiDir {
|
|
|
14557
14665
|
dirName,
|
|
14558
14666
|
global = false
|
|
14559
14667
|
}) {
|
|
14560
|
-
const skillDirPath = (0,
|
|
14561
|
-
const skillFilePath = (0,
|
|
14668
|
+
const skillDirPath = (0, import_node_path90.join)(outputRoot, relativeDirPath, dirName);
|
|
14669
|
+
const skillFilePath = (0, import_node_path90.join)(skillDirPath, SKILL_FILE_NAME);
|
|
14562
14670
|
if (!await fileExists(skillFilePath)) {
|
|
14563
14671
|
throw new Error(`${SKILL_FILE_NAME} not found in ${skillDirPath}`);
|
|
14564
14672
|
}
|
|
@@ -14595,7 +14703,7 @@ var RovodevSkillFrontmatterSchema = import_mini41.z.looseObject({
|
|
|
14595
14703
|
var RovodevSkill = class _RovodevSkill extends ToolSkill {
|
|
14596
14704
|
constructor({
|
|
14597
14705
|
outputRoot = process.cwd(),
|
|
14598
|
-
relativeDirPath = (0,
|
|
14706
|
+
relativeDirPath = (0, import_node_path91.join)(".rovodev", "skills"),
|
|
14599
14707
|
dirName,
|
|
14600
14708
|
frontmatter,
|
|
14601
14709
|
body,
|
|
@@ -14624,8 +14732,8 @@ var RovodevSkill = class _RovodevSkill extends ToolSkill {
|
|
|
14624
14732
|
}
|
|
14625
14733
|
static getSettablePaths(_options) {
|
|
14626
14734
|
return {
|
|
14627
|
-
relativeDirPath: (0,
|
|
14628
|
-
alternativeSkillRoots: [(0,
|
|
14735
|
+
relativeDirPath: (0, import_node_path91.join)(".rovodev", "skills"),
|
|
14736
|
+
alternativeSkillRoots: [(0, import_node_path91.join)(".agents", "skills")]
|
|
14629
14737
|
};
|
|
14630
14738
|
}
|
|
14631
14739
|
getFrontmatter() {
|
|
@@ -14713,13 +14821,13 @@ var RovodevSkill = class _RovodevSkill extends ToolSkill {
|
|
|
14713
14821
|
});
|
|
14714
14822
|
const result = RovodevSkillFrontmatterSchema.safeParse(loaded.frontmatter);
|
|
14715
14823
|
if (!result.success) {
|
|
14716
|
-
const skillDirPath = (0,
|
|
14824
|
+
const skillDirPath = (0, import_node_path91.join)(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
|
|
14717
14825
|
throw new Error(
|
|
14718
|
-
`Invalid frontmatter in ${(0,
|
|
14826
|
+
`Invalid frontmatter in ${(0, import_node_path91.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
|
|
14719
14827
|
);
|
|
14720
14828
|
}
|
|
14721
14829
|
if (result.data.name !== loaded.dirName) {
|
|
14722
|
-
const skillFilePath = (0,
|
|
14830
|
+
const skillFilePath = (0, import_node_path91.join)(
|
|
14723
14831
|
loaded.outputRoot,
|
|
14724
14832
|
loaded.relativeDirPath,
|
|
14725
14833
|
loaded.dirName,
|
|
@@ -14761,11 +14869,11 @@ var RovodevSkill = class _RovodevSkill extends ToolSkill {
|
|
|
14761
14869
|
};
|
|
14762
14870
|
|
|
14763
14871
|
// src/features/skills/skills-processor.ts
|
|
14764
|
-
var
|
|
14765
|
-
var
|
|
14872
|
+
var import_node_path114 = require("path");
|
|
14873
|
+
var import_mini60 = require("zod/mini");
|
|
14766
14874
|
|
|
14767
14875
|
// src/types/dir-feature-processor.ts
|
|
14768
|
-
var
|
|
14876
|
+
var import_node_path92 = require("path");
|
|
14769
14877
|
var DirFeatureProcessor = class {
|
|
14770
14878
|
outputRoot;
|
|
14771
14879
|
inputRoot;
|
|
@@ -14808,7 +14916,7 @@ var DirFeatureProcessor = class {
|
|
|
14808
14916
|
const mainFile = aiDir.getMainFile();
|
|
14809
14917
|
let mainFileContent;
|
|
14810
14918
|
if (mainFile) {
|
|
14811
|
-
const mainFilePath = (0,
|
|
14919
|
+
const mainFilePath = (0, import_node_path92.join)(dirPath, mainFile.name);
|
|
14812
14920
|
const content = stringifyFrontmatter(mainFile.body, mainFile.frontmatter, {
|
|
14813
14921
|
avoidBlockScalars: this.avoidBlockScalars
|
|
14814
14922
|
});
|
|
@@ -14828,7 +14936,7 @@ var DirFeatureProcessor = class {
|
|
|
14828
14936
|
const contentWithNewline = addTrailingNewline(file.fileBuffer.toString("utf-8"));
|
|
14829
14937
|
otherFileContents.push(contentWithNewline);
|
|
14830
14938
|
if (!dirHasChanges) {
|
|
14831
|
-
const filePath = (0,
|
|
14939
|
+
const filePath = (0, import_node_path92.join)(dirPath, file.relativeFilePathToDirPath);
|
|
14832
14940
|
const existingContent = await readFileContentOrNull(filePath);
|
|
14833
14941
|
if (!fileContentsEquivalent({
|
|
14834
14942
|
filePath,
|
|
@@ -14846,24 +14954,24 @@ var DirFeatureProcessor = class {
|
|
|
14846
14954
|
if (this.dryRun) {
|
|
14847
14955
|
this.logger.info(`[DRY RUN] Would create directory: ${dirPath}`);
|
|
14848
14956
|
if (mainFile) {
|
|
14849
|
-
this.logger.info(`[DRY RUN] Would write: ${(0,
|
|
14850
|
-
changedPaths.push((0,
|
|
14957
|
+
this.logger.info(`[DRY RUN] Would write: ${(0, import_node_path92.join)(dirPath, mainFile.name)}`);
|
|
14958
|
+
changedPaths.push((0, import_node_path92.join)(relativeDir, mainFile.name));
|
|
14851
14959
|
}
|
|
14852
14960
|
for (const file of otherFiles) {
|
|
14853
14961
|
this.logger.info(
|
|
14854
|
-
`[DRY RUN] Would write: ${(0,
|
|
14962
|
+
`[DRY RUN] Would write: ${(0, import_node_path92.join)(dirPath, file.relativeFilePathToDirPath)}`
|
|
14855
14963
|
);
|
|
14856
|
-
changedPaths.push((0,
|
|
14964
|
+
changedPaths.push((0, import_node_path92.join)(relativeDir, file.relativeFilePathToDirPath));
|
|
14857
14965
|
}
|
|
14858
14966
|
} else {
|
|
14859
14967
|
await ensureDir(dirPath);
|
|
14860
14968
|
if (mainFile && mainFileContent) {
|
|
14861
|
-
const mainFilePath = (0,
|
|
14969
|
+
const mainFilePath = (0, import_node_path92.join)(dirPath, mainFile.name);
|
|
14862
14970
|
await writeFileContent(mainFilePath, mainFileContent);
|
|
14863
|
-
changedPaths.push((0,
|
|
14971
|
+
changedPaths.push((0, import_node_path92.join)(relativeDir, mainFile.name));
|
|
14864
14972
|
}
|
|
14865
14973
|
for (const [i, file] of otherFiles.entries()) {
|
|
14866
|
-
const filePath = (0,
|
|
14974
|
+
const filePath = (0, import_node_path92.join)(dirPath, file.relativeFilePathToDirPath);
|
|
14867
14975
|
const content = otherFileContents[i];
|
|
14868
14976
|
if (content === void 0) {
|
|
14869
14977
|
throw new Error(
|
|
@@ -14871,7 +14979,7 @@ var DirFeatureProcessor = class {
|
|
|
14871
14979
|
);
|
|
14872
14980
|
}
|
|
14873
14981
|
await writeFileContent(filePath, content);
|
|
14874
|
-
changedPaths.push((0,
|
|
14982
|
+
changedPaths.push((0, import_node_path92.join)(relativeDir, file.relativeFilePathToDirPath));
|
|
14875
14983
|
}
|
|
14876
14984
|
}
|
|
14877
14985
|
changedCount++;
|
|
@@ -14903,7 +15011,7 @@ var DirFeatureProcessor = class {
|
|
|
14903
15011
|
};
|
|
14904
15012
|
|
|
14905
15013
|
// src/features/skills/agentsskills-skill.ts
|
|
14906
|
-
var
|
|
15014
|
+
var import_node_path93 = require("path");
|
|
14907
15015
|
var import_mini42 = require("zod/mini");
|
|
14908
15016
|
var AgentsSkillsSkillFrontmatterSchema = import_mini42.z.looseObject({
|
|
14909
15017
|
name: import_mini42.z.string(),
|
|
@@ -14912,7 +15020,7 @@ var AgentsSkillsSkillFrontmatterSchema = import_mini42.z.looseObject({
|
|
|
14912
15020
|
var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
|
|
14913
15021
|
constructor({
|
|
14914
15022
|
outputRoot = process.cwd(),
|
|
14915
|
-
relativeDirPath = (0,
|
|
15023
|
+
relativeDirPath = (0, import_node_path93.join)(".agents", "skills"),
|
|
14916
15024
|
dirName,
|
|
14917
15025
|
frontmatter,
|
|
14918
15026
|
body,
|
|
@@ -14944,7 +15052,7 @@ var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
|
|
|
14944
15052
|
throw new Error("AgentsSkillsSkill does not support global mode.");
|
|
14945
15053
|
}
|
|
14946
15054
|
return {
|
|
14947
|
-
relativeDirPath: (0,
|
|
15055
|
+
relativeDirPath: (0, import_node_path93.join)(".agents", "skills")
|
|
14948
15056
|
};
|
|
14949
15057
|
}
|
|
14950
15058
|
getFrontmatter() {
|
|
@@ -15024,9 +15132,9 @@ var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
|
|
|
15024
15132
|
});
|
|
15025
15133
|
const result = AgentsSkillsSkillFrontmatterSchema.safeParse(loaded.frontmatter);
|
|
15026
15134
|
if (!result.success) {
|
|
15027
|
-
const skillDirPath = (0,
|
|
15135
|
+
const skillDirPath = (0, import_node_path93.join)(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
|
|
15028
15136
|
throw new Error(
|
|
15029
|
-
`Invalid frontmatter in ${(0,
|
|
15137
|
+
`Invalid frontmatter in ${(0, import_node_path93.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
|
|
15030
15138
|
);
|
|
15031
15139
|
}
|
|
15032
15140
|
return new _AgentsSkillsSkill({
|
|
@@ -15061,10 +15169,10 @@ var AgentsSkillsSkill = class _AgentsSkillsSkill extends ToolSkill {
|
|
|
15061
15169
|
};
|
|
15062
15170
|
|
|
15063
15171
|
// src/features/skills/antigravity-shared-skill.ts
|
|
15064
|
-
var
|
|
15172
|
+
var import_node_path95 = require("path");
|
|
15065
15173
|
|
|
15066
15174
|
// src/features/skills/antigravity-skill.ts
|
|
15067
|
-
var
|
|
15175
|
+
var import_node_path94 = require("path");
|
|
15068
15176
|
var import_mini43 = require("zod/mini");
|
|
15069
15177
|
var AntigravitySkillFrontmatterSchema = import_mini43.z.looseObject({
|
|
15070
15178
|
name: import_mini43.z.string(),
|
|
@@ -15073,7 +15181,7 @@ var AntigravitySkillFrontmatterSchema = import_mini43.z.looseObject({
|
|
|
15073
15181
|
var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
|
|
15074
15182
|
constructor({
|
|
15075
15183
|
outputRoot = process.cwd(),
|
|
15076
|
-
relativeDirPath = (0,
|
|
15184
|
+
relativeDirPath = (0, import_node_path94.join)(".agent", "skills"),
|
|
15077
15185
|
dirName,
|
|
15078
15186
|
frontmatter,
|
|
15079
15187
|
body,
|
|
@@ -15105,11 +15213,11 @@ var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
|
|
|
15105
15213
|
} = {}) {
|
|
15106
15214
|
if (global) {
|
|
15107
15215
|
return {
|
|
15108
|
-
relativeDirPath: (0,
|
|
15216
|
+
relativeDirPath: (0, import_node_path94.join)(".gemini", "antigravity", "skills")
|
|
15109
15217
|
};
|
|
15110
15218
|
}
|
|
15111
15219
|
return {
|
|
15112
|
-
relativeDirPath: (0,
|
|
15220
|
+
relativeDirPath: (0, import_node_path94.join)(".agent", "skills")
|
|
15113
15221
|
};
|
|
15114
15222
|
}
|
|
15115
15223
|
getFrontmatter() {
|
|
@@ -15189,9 +15297,9 @@ var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
|
|
|
15189
15297
|
});
|
|
15190
15298
|
const result = AntigravitySkillFrontmatterSchema.safeParse(loaded.frontmatter);
|
|
15191
15299
|
if (!result.success) {
|
|
15192
|
-
const skillDirPath = (0,
|
|
15300
|
+
const skillDirPath = (0, import_node_path94.join)(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
|
|
15193
15301
|
throw new Error(
|
|
15194
|
-
`Invalid frontmatter in ${(0,
|
|
15302
|
+
`Invalid frontmatter in ${(0, import_node_path94.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
|
|
15195
15303
|
);
|
|
15196
15304
|
}
|
|
15197
15305
|
return new _AntigravitySkill({
|
|
@@ -15228,7 +15336,7 @@ var AntigravitySkill = class _AntigravitySkill extends ToolSkill {
|
|
|
15228
15336
|
var AntigravitySharedSkill = class extends ToolSkill {
|
|
15229
15337
|
constructor({
|
|
15230
15338
|
outputRoot = process.cwd(),
|
|
15231
|
-
relativeDirPath = (0,
|
|
15339
|
+
relativeDirPath = (0, import_node_path95.join)(".agents", "skills"),
|
|
15232
15340
|
dirName,
|
|
15233
15341
|
frontmatter,
|
|
15234
15342
|
body,
|
|
@@ -15268,11 +15376,11 @@ var AntigravitySharedSkill = class extends ToolSkill {
|
|
|
15268
15376
|
} = {}) {
|
|
15269
15377
|
if (global) {
|
|
15270
15378
|
return {
|
|
15271
|
-
relativeDirPath: (0,
|
|
15379
|
+
relativeDirPath: (0, import_node_path95.join)(".gemini", this.getGlobalSubdir(), "skills")
|
|
15272
15380
|
};
|
|
15273
15381
|
}
|
|
15274
15382
|
return {
|
|
15275
|
-
relativeDirPath: (0,
|
|
15383
|
+
relativeDirPath: (0, import_node_path95.join)(".agents", "skills")
|
|
15276
15384
|
};
|
|
15277
15385
|
}
|
|
15278
15386
|
getFrontmatter() {
|
|
@@ -15352,9 +15460,9 @@ var AntigravitySharedSkill = class extends ToolSkill {
|
|
|
15352
15460
|
});
|
|
15353
15461
|
const result = AntigravitySkillFrontmatterSchema.safeParse(loaded.frontmatter);
|
|
15354
15462
|
if (!result.success) {
|
|
15355
|
-
const skillDirPath = (0,
|
|
15463
|
+
const skillDirPath = (0, import_node_path95.join)(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
|
|
15356
15464
|
throw new Error(
|
|
15357
|
-
`Invalid frontmatter in ${(0,
|
|
15465
|
+
`Invalid frontmatter in ${(0, import_node_path95.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
|
|
15358
15466
|
);
|
|
15359
15467
|
}
|
|
15360
15468
|
return new this({
|
|
@@ -15408,10 +15516,10 @@ var AntigravityIdeSkill = class extends AntigravitySharedSkill {
|
|
|
15408
15516
|
};
|
|
15409
15517
|
|
|
15410
15518
|
// src/features/skills/claudecode-skill.ts
|
|
15411
|
-
var
|
|
15519
|
+
var import_node_path96 = require("path");
|
|
15412
15520
|
var import_mini44 = require("zod/mini");
|
|
15413
|
-
var CLAUDE_SKILLS_DIR_PATH = (0,
|
|
15414
|
-
var CLAUDE_SCHEDULED_TASKS_DIR_PATH = (0,
|
|
15521
|
+
var CLAUDE_SKILLS_DIR_PATH = (0, import_node_path96.join)(".claude", "skills");
|
|
15522
|
+
var CLAUDE_SCHEDULED_TASKS_DIR_PATH = (0, import_node_path96.join)(".claude", "scheduled-tasks");
|
|
15415
15523
|
var ClaudecodeSkillFrontmatterSchema = import_mini44.z.looseObject({
|
|
15416
15524
|
name: import_mini44.z.string(),
|
|
15417
15525
|
description: import_mini44.z.string(),
|
|
@@ -15423,7 +15531,7 @@ var ClaudecodeSkillFrontmatterSchema = import_mini44.z.looseObject({
|
|
|
15423
15531
|
var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
|
|
15424
15532
|
constructor({
|
|
15425
15533
|
outputRoot = process.cwd(),
|
|
15426
|
-
relativeDirPath = (0,
|
|
15534
|
+
relativeDirPath = (0, import_node_path96.join)(".claude", "skills"),
|
|
15427
15535
|
dirName,
|
|
15428
15536
|
frontmatter,
|
|
15429
15537
|
body,
|
|
@@ -15562,9 +15670,9 @@ var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
|
|
|
15562
15670
|
});
|
|
15563
15671
|
const result = ClaudecodeSkillFrontmatterSchema.safeParse(loaded.frontmatter);
|
|
15564
15672
|
if (!result.success) {
|
|
15565
|
-
const skillDirPath = (0,
|
|
15673
|
+
const skillDirPath = (0, import_node_path96.join)(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
|
|
15566
15674
|
throw new Error(
|
|
15567
|
-
`Invalid frontmatter in ${(0,
|
|
15675
|
+
`Invalid frontmatter in ${(0, import_node_path96.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
|
|
15568
15676
|
);
|
|
15569
15677
|
}
|
|
15570
15678
|
return new _ClaudecodeSkill({
|
|
@@ -15598,7 +15706,7 @@ var ClaudecodeSkill = class _ClaudecodeSkill extends ToolSkill {
|
|
|
15598
15706
|
};
|
|
15599
15707
|
|
|
15600
15708
|
// src/features/skills/cline-skill.ts
|
|
15601
|
-
var
|
|
15709
|
+
var import_node_path97 = require("path");
|
|
15602
15710
|
var import_mini45 = require("zod/mini");
|
|
15603
15711
|
var ClineSkillFrontmatterSchema = import_mini45.z.looseObject({
|
|
15604
15712
|
name: import_mini45.z.string(),
|
|
@@ -15607,7 +15715,7 @@ var ClineSkillFrontmatterSchema = import_mini45.z.looseObject({
|
|
|
15607
15715
|
var ClineSkill = class _ClineSkill extends ToolSkill {
|
|
15608
15716
|
constructor({
|
|
15609
15717
|
outputRoot = process.cwd(),
|
|
15610
|
-
relativeDirPath = (0,
|
|
15718
|
+
relativeDirPath = (0, import_node_path97.join)(".cline", "skills"),
|
|
15611
15719
|
dirName,
|
|
15612
15720
|
frontmatter,
|
|
15613
15721
|
body,
|
|
@@ -15636,7 +15744,7 @@ var ClineSkill = class _ClineSkill extends ToolSkill {
|
|
|
15636
15744
|
}
|
|
15637
15745
|
static getSettablePaths(_options = {}) {
|
|
15638
15746
|
return {
|
|
15639
|
-
relativeDirPath: (0,
|
|
15747
|
+
relativeDirPath: (0, import_node_path97.join)(".cline", "skills")
|
|
15640
15748
|
};
|
|
15641
15749
|
}
|
|
15642
15750
|
getFrontmatter() {
|
|
@@ -15724,13 +15832,13 @@ var ClineSkill = class _ClineSkill extends ToolSkill {
|
|
|
15724
15832
|
});
|
|
15725
15833
|
const result = ClineSkillFrontmatterSchema.safeParse(loaded.frontmatter);
|
|
15726
15834
|
if (!result.success) {
|
|
15727
|
-
const skillDirPath = (0,
|
|
15835
|
+
const skillDirPath = (0, import_node_path97.join)(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
|
|
15728
15836
|
throw new Error(
|
|
15729
|
-
`Invalid frontmatter in ${(0,
|
|
15837
|
+
`Invalid frontmatter in ${(0, import_node_path97.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
|
|
15730
15838
|
);
|
|
15731
15839
|
}
|
|
15732
15840
|
if (result.data.name !== loaded.dirName) {
|
|
15733
|
-
const skillFilePath = (0,
|
|
15841
|
+
const skillFilePath = (0, import_node_path97.join)(
|
|
15734
15842
|
loaded.outputRoot,
|
|
15735
15843
|
loaded.relativeDirPath,
|
|
15736
15844
|
loaded.dirName,
|
|
@@ -15771,7 +15879,7 @@ var ClineSkill = class _ClineSkill extends ToolSkill {
|
|
|
15771
15879
|
};
|
|
15772
15880
|
|
|
15773
15881
|
// src/features/skills/codexcli-skill.ts
|
|
15774
|
-
var
|
|
15882
|
+
var import_node_path98 = require("path");
|
|
15775
15883
|
var import_mini46 = require("zod/mini");
|
|
15776
15884
|
var CodexCliSkillFrontmatterSchema = import_mini46.z.looseObject({
|
|
15777
15885
|
name: import_mini46.z.string(),
|
|
@@ -15785,7 +15893,7 @@ var CodexCliSkillFrontmatterSchema = import_mini46.z.looseObject({
|
|
|
15785
15893
|
var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
|
|
15786
15894
|
constructor({
|
|
15787
15895
|
outputRoot = process.cwd(),
|
|
15788
|
-
relativeDirPath = (0,
|
|
15896
|
+
relativeDirPath = (0, import_node_path98.join)(".codex", "skills"),
|
|
15789
15897
|
dirName,
|
|
15790
15898
|
frontmatter,
|
|
15791
15899
|
body,
|
|
@@ -15816,7 +15924,7 @@ var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
|
|
|
15816
15924
|
global: _global = false
|
|
15817
15925
|
} = {}) {
|
|
15818
15926
|
return {
|
|
15819
|
-
relativeDirPath: (0,
|
|
15927
|
+
relativeDirPath: (0, import_node_path98.join)(".codex", "skills")
|
|
15820
15928
|
};
|
|
15821
15929
|
}
|
|
15822
15930
|
getFrontmatter() {
|
|
@@ -15906,9 +16014,9 @@ var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
|
|
|
15906
16014
|
});
|
|
15907
16015
|
const result = CodexCliSkillFrontmatterSchema.safeParse(loaded.frontmatter);
|
|
15908
16016
|
if (!result.success) {
|
|
15909
|
-
const skillDirPath = (0,
|
|
16017
|
+
const skillDirPath = (0, import_node_path98.join)(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
|
|
15910
16018
|
throw new Error(
|
|
15911
|
-
`Invalid frontmatter in ${(0,
|
|
16019
|
+
`Invalid frontmatter in ${(0, import_node_path98.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
|
|
15912
16020
|
);
|
|
15913
16021
|
}
|
|
15914
16022
|
return new _CodexCliSkill({
|
|
@@ -15942,7 +16050,7 @@ var CodexCliSkill = class _CodexCliSkill extends ToolSkill {
|
|
|
15942
16050
|
};
|
|
15943
16051
|
|
|
15944
16052
|
// src/features/skills/copilot-skill.ts
|
|
15945
|
-
var
|
|
16053
|
+
var import_node_path99 = require("path");
|
|
15946
16054
|
var import_mini47 = require("zod/mini");
|
|
15947
16055
|
var CopilotSkillFrontmatterSchema = import_mini47.z.looseObject({
|
|
15948
16056
|
name: import_mini47.z.string(),
|
|
@@ -15952,7 +16060,7 @@ var CopilotSkillFrontmatterSchema = import_mini47.z.looseObject({
|
|
|
15952
16060
|
var CopilotSkill = class _CopilotSkill extends ToolSkill {
|
|
15953
16061
|
constructor({
|
|
15954
16062
|
outputRoot = process.cwd(),
|
|
15955
|
-
relativeDirPath = (0,
|
|
16063
|
+
relativeDirPath = (0, import_node_path99.join)(".github", "skills"),
|
|
15956
16064
|
dirName,
|
|
15957
16065
|
frontmatter,
|
|
15958
16066
|
body,
|
|
@@ -15984,7 +16092,7 @@ var CopilotSkill = class _CopilotSkill extends ToolSkill {
|
|
|
15984
16092
|
throw new Error("CopilotSkill does not support global mode.");
|
|
15985
16093
|
}
|
|
15986
16094
|
return {
|
|
15987
|
-
relativeDirPath: (0,
|
|
16095
|
+
relativeDirPath: (0, import_node_path99.join)(".github", "skills")
|
|
15988
16096
|
};
|
|
15989
16097
|
}
|
|
15990
16098
|
getFrontmatter() {
|
|
@@ -16070,9 +16178,9 @@ var CopilotSkill = class _CopilotSkill extends ToolSkill {
|
|
|
16070
16178
|
});
|
|
16071
16179
|
const result = CopilotSkillFrontmatterSchema.safeParse(loaded.frontmatter);
|
|
16072
16180
|
if (!result.success) {
|
|
16073
|
-
const skillDirPath = (0,
|
|
16181
|
+
const skillDirPath = (0, import_node_path99.join)(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
|
|
16074
16182
|
throw new Error(
|
|
16075
|
-
`Invalid frontmatter in ${(0,
|
|
16183
|
+
`Invalid frontmatter in ${(0, import_node_path99.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
|
|
16076
16184
|
);
|
|
16077
16185
|
}
|
|
16078
16186
|
return new _CopilotSkill({
|
|
@@ -16107,7 +16215,7 @@ var CopilotSkill = class _CopilotSkill extends ToolSkill {
|
|
|
16107
16215
|
};
|
|
16108
16216
|
|
|
16109
16217
|
// src/features/skills/cursor-skill.ts
|
|
16110
|
-
var
|
|
16218
|
+
var import_node_path100 = require("path");
|
|
16111
16219
|
var import_mini48 = require("zod/mini");
|
|
16112
16220
|
var CursorSkillFrontmatterSchema = import_mini48.z.looseObject({
|
|
16113
16221
|
name: import_mini48.z.string(),
|
|
@@ -16116,7 +16224,7 @@ var CursorSkillFrontmatterSchema = import_mini48.z.looseObject({
|
|
|
16116
16224
|
var CursorSkill = class _CursorSkill extends ToolSkill {
|
|
16117
16225
|
constructor({
|
|
16118
16226
|
outputRoot = process.cwd(),
|
|
16119
|
-
relativeDirPath = (0,
|
|
16227
|
+
relativeDirPath = (0, import_node_path100.join)(".cursor", "skills"),
|
|
16120
16228
|
dirName,
|
|
16121
16229
|
frontmatter,
|
|
16122
16230
|
body,
|
|
@@ -16145,7 +16253,7 @@ var CursorSkill = class _CursorSkill extends ToolSkill {
|
|
|
16145
16253
|
}
|
|
16146
16254
|
static getSettablePaths(_options) {
|
|
16147
16255
|
return {
|
|
16148
|
-
relativeDirPath: (0,
|
|
16256
|
+
relativeDirPath: (0, import_node_path100.join)(".cursor", "skills")
|
|
16149
16257
|
};
|
|
16150
16258
|
}
|
|
16151
16259
|
getFrontmatter() {
|
|
@@ -16225,9 +16333,9 @@ var CursorSkill = class _CursorSkill extends ToolSkill {
|
|
|
16225
16333
|
});
|
|
16226
16334
|
const result = CursorSkillFrontmatterSchema.safeParse(loaded.frontmatter);
|
|
16227
16335
|
if (!result.success) {
|
|
16228
|
-
const skillDirPath = (0,
|
|
16336
|
+
const skillDirPath = (0, import_node_path100.join)(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
|
|
16229
16337
|
throw new Error(
|
|
16230
|
-
`Invalid frontmatter in ${(0,
|
|
16338
|
+
`Invalid frontmatter in ${(0, import_node_path100.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
|
|
16231
16339
|
);
|
|
16232
16340
|
}
|
|
16233
16341
|
return new _CursorSkill({
|
|
@@ -16262,7 +16370,7 @@ var CursorSkill = class _CursorSkill extends ToolSkill {
|
|
|
16262
16370
|
};
|
|
16263
16371
|
|
|
16264
16372
|
// src/features/skills/deepagents-skill.ts
|
|
16265
|
-
var
|
|
16373
|
+
var import_node_path101 = require("path");
|
|
16266
16374
|
var import_mini49 = require("zod/mini");
|
|
16267
16375
|
var DeepagentsSkillFrontmatterSchema = import_mini49.z.looseObject({
|
|
16268
16376
|
name: import_mini49.z.string(),
|
|
@@ -16272,7 +16380,7 @@ var DeepagentsSkillFrontmatterSchema = import_mini49.z.looseObject({
|
|
|
16272
16380
|
var DeepagentsSkill = class _DeepagentsSkill extends ToolSkill {
|
|
16273
16381
|
constructor({
|
|
16274
16382
|
outputRoot = process.cwd(),
|
|
16275
|
-
relativeDirPath = (0,
|
|
16383
|
+
relativeDirPath = (0, import_node_path101.join)(".deepagents", "skills"),
|
|
16276
16384
|
dirName,
|
|
16277
16385
|
frontmatter,
|
|
16278
16386
|
body,
|
|
@@ -16301,7 +16409,7 @@ var DeepagentsSkill = class _DeepagentsSkill extends ToolSkill {
|
|
|
16301
16409
|
}
|
|
16302
16410
|
static getSettablePaths(_options) {
|
|
16303
16411
|
return {
|
|
16304
|
-
relativeDirPath: (0,
|
|
16412
|
+
relativeDirPath: (0, import_node_path101.join)(".deepagents", "skills")
|
|
16305
16413
|
};
|
|
16306
16414
|
}
|
|
16307
16415
|
getFrontmatter() {
|
|
@@ -16387,9 +16495,9 @@ var DeepagentsSkill = class _DeepagentsSkill extends ToolSkill {
|
|
|
16387
16495
|
});
|
|
16388
16496
|
const result = DeepagentsSkillFrontmatterSchema.safeParse(loaded.frontmatter);
|
|
16389
16497
|
if (!result.success) {
|
|
16390
|
-
const skillDirPath = (0,
|
|
16498
|
+
const skillDirPath = (0, import_node_path101.join)(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
|
|
16391
16499
|
throw new Error(
|
|
16392
|
-
`Invalid frontmatter in ${(0,
|
|
16500
|
+
`Invalid frontmatter in ${(0, import_node_path101.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
|
|
16393
16501
|
);
|
|
16394
16502
|
}
|
|
16395
16503
|
return new _DeepagentsSkill({
|
|
@@ -16424,7 +16532,7 @@ var DeepagentsSkill = class _DeepagentsSkill extends ToolSkill {
|
|
|
16424
16532
|
};
|
|
16425
16533
|
|
|
16426
16534
|
// src/features/skills/geminicli-skill.ts
|
|
16427
|
-
var
|
|
16535
|
+
var import_node_path102 = require("path");
|
|
16428
16536
|
var import_mini50 = require("zod/mini");
|
|
16429
16537
|
var GeminiCliSkillFrontmatterSchema = import_mini50.z.looseObject({
|
|
16430
16538
|
name: import_mini50.z.string(),
|
|
@@ -16464,7 +16572,7 @@ var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
|
|
|
16464
16572
|
global: _global = false
|
|
16465
16573
|
} = {}) {
|
|
16466
16574
|
return {
|
|
16467
|
-
relativeDirPath: (0,
|
|
16575
|
+
relativeDirPath: (0, import_node_path102.join)(".gemini", "skills")
|
|
16468
16576
|
};
|
|
16469
16577
|
}
|
|
16470
16578
|
getFrontmatter() {
|
|
@@ -16544,9 +16652,9 @@ var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
|
|
|
16544
16652
|
});
|
|
16545
16653
|
const result = GeminiCliSkillFrontmatterSchema.safeParse(loaded.frontmatter);
|
|
16546
16654
|
if (!result.success) {
|
|
16547
|
-
const skillDirPath = (0,
|
|
16655
|
+
const skillDirPath = (0, import_node_path102.join)(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
|
|
16548
16656
|
throw new Error(
|
|
16549
|
-
`Invalid frontmatter in ${(0,
|
|
16657
|
+
`Invalid frontmatter in ${(0, import_node_path102.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
|
|
16550
16658
|
);
|
|
16551
16659
|
}
|
|
16552
16660
|
return new _GeminiCliSkill({
|
|
@@ -16581,7 +16689,7 @@ var GeminiCliSkill = class _GeminiCliSkill extends ToolSkill {
|
|
|
16581
16689
|
};
|
|
16582
16690
|
|
|
16583
16691
|
// src/features/skills/junie-skill.ts
|
|
16584
|
-
var
|
|
16692
|
+
var import_node_path103 = require("path");
|
|
16585
16693
|
var import_mini51 = require("zod/mini");
|
|
16586
16694
|
var JunieSkillFrontmatterSchema = import_mini51.z.looseObject({
|
|
16587
16695
|
name: import_mini51.z.string(),
|
|
@@ -16590,7 +16698,7 @@ var JunieSkillFrontmatterSchema = import_mini51.z.looseObject({
|
|
|
16590
16698
|
var JunieSkill = class _JunieSkill extends ToolSkill {
|
|
16591
16699
|
constructor({
|
|
16592
16700
|
outputRoot = process.cwd(),
|
|
16593
|
-
relativeDirPath = (0,
|
|
16701
|
+
relativeDirPath = (0, import_node_path103.join)(".junie", "skills"),
|
|
16594
16702
|
dirName,
|
|
16595
16703
|
frontmatter,
|
|
16596
16704
|
body,
|
|
@@ -16622,7 +16730,7 @@ var JunieSkill = class _JunieSkill extends ToolSkill {
|
|
|
16622
16730
|
throw new Error("JunieSkill does not support global mode.");
|
|
16623
16731
|
}
|
|
16624
16732
|
return {
|
|
16625
|
-
relativeDirPath: (0,
|
|
16733
|
+
relativeDirPath: (0, import_node_path103.join)(".junie", "skills")
|
|
16626
16734
|
};
|
|
16627
16735
|
}
|
|
16628
16736
|
getFrontmatter() {
|
|
@@ -16709,13 +16817,13 @@ var JunieSkill = class _JunieSkill extends ToolSkill {
|
|
|
16709
16817
|
});
|
|
16710
16818
|
const result = JunieSkillFrontmatterSchema.safeParse(loaded.frontmatter);
|
|
16711
16819
|
if (!result.success) {
|
|
16712
|
-
const skillDirPath = (0,
|
|
16820
|
+
const skillDirPath = (0, import_node_path103.join)(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
|
|
16713
16821
|
throw new Error(
|
|
16714
|
-
`Invalid frontmatter in ${(0,
|
|
16822
|
+
`Invalid frontmatter in ${(0, import_node_path103.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
|
|
16715
16823
|
);
|
|
16716
16824
|
}
|
|
16717
16825
|
if (result.data.name !== loaded.dirName) {
|
|
16718
|
-
const skillFilePath = (0,
|
|
16826
|
+
const skillFilePath = (0, import_node_path103.join)(
|
|
16719
16827
|
loaded.outputRoot,
|
|
16720
16828
|
loaded.relativeDirPath,
|
|
16721
16829
|
loaded.dirName,
|
|
@@ -16757,7 +16865,7 @@ var JunieSkill = class _JunieSkill extends ToolSkill {
|
|
|
16757
16865
|
};
|
|
16758
16866
|
|
|
16759
16867
|
// src/features/skills/kilo-skill.ts
|
|
16760
|
-
var
|
|
16868
|
+
var import_node_path104 = require("path");
|
|
16761
16869
|
var import_mini52 = require("zod/mini");
|
|
16762
16870
|
var KiloSkillFrontmatterSchema = import_mini52.z.looseObject({
|
|
16763
16871
|
name: import_mini52.z.string(),
|
|
@@ -16767,7 +16875,7 @@ var KiloSkillFrontmatterSchema = import_mini52.z.looseObject({
|
|
|
16767
16875
|
var KiloSkill = class _KiloSkill extends ToolSkill {
|
|
16768
16876
|
constructor({
|
|
16769
16877
|
outputRoot = process.cwd(),
|
|
16770
|
-
relativeDirPath = (0,
|
|
16878
|
+
relativeDirPath = (0, import_node_path104.join)(".kilo", "skills"),
|
|
16771
16879
|
dirName,
|
|
16772
16880
|
frontmatter,
|
|
16773
16881
|
body,
|
|
@@ -16796,7 +16904,7 @@ var KiloSkill = class _KiloSkill extends ToolSkill {
|
|
|
16796
16904
|
}
|
|
16797
16905
|
static getSettablePaths({ global = false } = {}) {
|
|
16798
16906
|
return {
|
|
16799
|
-
relativeDirPath: global ? (0,
|
|
16907
|
+
relativeDirPath: global ? (0, import_node_path104.join)(".config", "kilo", "skills") : (0, import_node_path104.join)(".kilo", "skills")
|
|
16800
16908
|
};
|
|
16801
16909
|
}
|
|
16802
16910
|
getFrontmatter() {
|
|
@@ -16882,9 +16990,9 @@ var KiloSkill = class _KiloSkill extends ToolSkill {
|
|
|
16882
16990
|
});
|
|
16883
16991
|
const result = KiloSkillFrontmatterSchema.safeParse(loaded.frontmatter);
|
|
16884
16992
|
if (!result.success) {
|
|
16885
|
-
const skillDirPath = (0,
|
|
16993
|
+
const skillDirPath = (0, import_node_path104.join)(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
|
|
16886
16994
|
throw new Error(
|
|
16887
|
-
`Invalid frontmatter in ${(0,
|
|
16995
|
+
`Invalid frontmatter in ${(0, import_node_path104.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
|
|
16888
16996
|
);
|
|
16889
16997
|
}
|
|
16890
16998
|
return new _KiloSkill({
|
|
@@ -16918,7 +17026,7 @@ var KiloSkill = class _KiloSkill extends ToolSkill {
|
|
|
16918
17026
|
};
|
|
16919
17027
|
|
|
16920
17028
|
// src/features/skills/kiro-skill.ts
|
|
16921
|
-
var
|
|
17029
|
+
var import_node_path105 = require("path");
|
|
16922
17030
|
var import_mini53 = require("zod/mini");
|
|
16923
17031
|
var KiroSkillFrontmatterSchema = import_mini53.z.looseObject({
|
|
16924
17032
|
name: import_mini53.z.string(),
|
|
@@ -16927,7 +17035,7 @@ var KiroSkillFrontmatterSchema = import_mini53.z.looseObject({
|
|
|
16927
17035
|
var KiroSkill = class _KiroSkill extends ToolSkill {
|
|
16928
17036
|
constructor({
|
|
16929
17037
|
outputRoot = process.cwd(),
|
|
16930
|
-
relativeDirPath = (0,
|
|
17038
|
+
relativeDirPath = (0, import_node_path105.join)(".kiro", "skills"),
|
|
16931
17039
|
dirName,
|
|
16932
17040
|
frontmatter,
|
|
16933
17041
|
body,
|
|
@@ -16959,7 +17067,7 @@ var KiroSkill = class _KiroSkill extends ToolSkill {
|
|
|
16959
17067
|
throw new Error("KiroSkill does not support global mode.");
|
|
16960
17068
|
}
|
|
16961
17069
|
return {
|
|
16962
|
-
relativeDirPath: (0,
|
|
17070
|
+
relativeDirPath: (0, import_node_path105.join)(".kiro", "skills")
|
|
16963
17071
|
};
|
|
16964
17072
|
}
|
|
16965
17073
|
getFrontmatter() {
|
|
@@ -17047,13 +17155,13 @@ var KiroSkill = class _KiroSkill extends ToolSkill {
|
|
|
17047
17155
|
});
|
|
17048
17156
|
const result = KiroSkillFrontmatterSchema.safeParse(loaded.frontmatter);
|
|
17049
17157
|
if (!result.success) {
|
|
17050
|
-
const skillDirPath = (0,
|
|
17158
|
+
const skillDirPath = (0, import_node_path105.join)(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
|
|
17051
17159
|
throw new Error(
|
|
17052
|
-
`Invalid frontmatter in ${(0,
|
|
17160
|
+
`Invalid frontmatter in ${(0, import_node_path105.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
|
|
17053
17161
|
);
|
|
17054
17162
|
}
|
|
17055
17163
|
if (result.data.name !== loaded.dirName) {
|
|
17056
|
-
const skillFilePath = (0,
|
|
17164
|
+
const skillFilePath = (0, import_node_path105.join)(
|
|
17057
17165
|
loaded.outputRoot,
|
|
17058
17166
|
loaded.relativeDirPath,
|
|
17059
17167
|
loaded.dirName,
|
|
@@ -17095,7 +17203,7 @@ var KiroSkill = class _KiroSkill extends ToolSkill {
|
|
|
17095
17203
|
};
|
|
17096
17204
|
|
|
17097
17205
|
// src/features/skills/opencode-skill.ts
|
|
17098
|
-
var
|
|
17206
|
+
var import_node_path106 = require("path");
|
|
17099
17207
|
var import_mini54 = require("zod/mini");
|
|
17100
17208
|
var OpenCodeSkillFrontmatterSchema = import_mini54.z.looseObject({
|
|
17101
17209
|
name: import_mini54.z.string(),
|
|
@@ -17105,7 +17213,7 @@ var OpenCodeSkillFrontmatterSchema = import_mini54.z.looseObject({
|
|
|
17105
17213
|
var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
|
|
17106
17214
|
constructor({
|
|
17107
17215
|
outputRoot = process.cwd(),
|
|
17108
|
-
relativeDirPath = (0,
|
|
17216
|
+
relativeDirPath = (0, import_node_path106.join)(".opencode", "skill"),
|
|
17109
17217
|
dirName,
|
|
17110
17218
|
frontmatter,
|
|
17111
17219
|
body,
|
|
@@ -17134,7 +17242,7 @@ var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
|
|
|
17134
17242
|
}
|
|
17135
17243
|
static getSettablePaths({ global = false } = {}) {
|
|
17136
17244
|
return {
|
|
17137
|
-
relativeDirPath: global ? (0,
|
|
17245
|
+
relativeDirPath: global ? (0, import_node_path106.join)(".config", "opencode", "skill") : (0, import_node_path106.join)(".opencode", "skill")
|
|
17138
17246
|
};
|
|
17139
17247
|
}
|
|
17140
17248
|
getFrontmatter() {
|
|
@@ -17220,9 +17328,9 @@ var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
|
|
|
17220
17328
|
});
|
|
17221
17329
|
const result = OpenCodeSkillFrontmatterSchema.safeParse(loaded.frontmatter);
|
|
17222
17330
|
if (!result.success) {
|
|
17223
|
-
const skillDirPath = (0,
|
|
17331
|
+
const skillDirPath = (0, import_node_path106.join)(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
|
|
17224
17332
|
throw new Error(
|
|
17225
|
-
`Invalid frontmatter in ${(0,
|
|
17333
|
+
`Invalid frontmatter in ${(0, import_node_path106.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
|
|
17226
17334
|
);
|
|
17227
17335
|
}
|
|
17228
17336
|
return new _OpenCodeSkill({
|
|
@@ -17256,7 +17364,7 @@ var OpenCodeSkill = class _OpenCodeSkill extends ToolSkill {
|
|
|
17256
17364
|
};
|
|
17257
17365
|
|
|
17258
17366
|
// src/features/skills/pi-skill.ts
|
|
17259
|
-
var
|
|
17367
|
+
var import_node_path107 = require("path");
|
|
17260
17368
|
var import_mini55 = require("zod/mini");
|
|
17261
17369
|
var PiSkillFrontmatterSchema = import_mini55.z.looseObject({
|
|
17262
17370
|
name: import_mini55.z.string(),
|
|
@@ -17296,11 +17404,11 @@ var PiSkill = class _PiSkill extends ToolSkill {
|
|
|
17296
17404
|
static getSettablePaths({ global } = {}) {
|
|
17297
17405
|
if (global) {
|
|
17298
17406
|
return {
|
|
17299
|
-
relativeDirPath: (0,
|
|
17407
|
+
relativeDirPath: (0, import_node_path107.join)(".pi", "agent", "skills")
|
|
17300
17408
|
};
|
|
17301
17409
|
}
|
|
17302
17410
|
return {
|
|
17303
|
-
relativeDirPath: (0,
|
|
17411
|
+
relativeDirPath: (0, import_node_path107.join)(".pi", "skills")
|
|
17304
17412
|
};
|
|
17305
17413
|
}
|
|
17306
17414
|
getFrontmatter() {
|
|
@@ -17379,9 +17487,9 @@ var PiSkill = class _PiSkill extends ToolSkill {
|
|
|
17379
17487
|
});
|
|
17380
17488
|
const result = PiSkillFrontmatterSchema.safeParse(loaded.frontmatter);
|
|
17381
17489
|
if (!result.success) {
|
|
17382
|
-
const skillDirPath = (0,
|
|
17490
|
+
const skillDirPath = (0, import_node_path107.join)(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
|
|
17383
17491
|
throw new Error(
|
|
17384
|
-
`Invalid frontmatter in ${(0,
|
|
17492
|
+
`Invalid frontmatter in ${(0, import_node_path107.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
|
|
17385
17493
|
);
|
|
17386
17494
|
}
|
|
17387
17495
|
return new _PiSkill({
|
|
@@ -17416,7 +17524,7 @@ var PiSkill = class _PiSkill extends ToolSkill {
|
|
|
17416
17524
|
};
|
|
17417
17525
|
|
|
17418
17526
|
// src/features/skills/replit-skill.ts
|
|
17419
|
-
var
|
|
17527
|
+
var import_node_path108 = require("path");
|
|
17420
17528
|
var import_mini56 = require("zod/mini");
|
|
17421
17529
|
var ReplitSkillFrontmatterSchema = import_mini56.z.looseObject({
|
|
17422
17530
|
name: import_mini56.z.string(),
|
|
@@ -17425,7 +17533,7 @@ var ReplitSkillFrontmatterSchema = import_mini56.z.looseObject({
|
|
|
17425
17533
|
var ReplitSkill = class _ReplitSkill extends ToolSkill {
|
|
17426
17534
|
constructor({
|
|
17427
17535
|
outputRoot = process.cwd(),
|
|
17428
|
-
relativeDirPath = (0,
|
|
17536
|
+
relativeDirPath = (0, import_node_path108.join)(".agents", "skills"),
|
|
17429
17537
|
dirName,
|
|
17430
17538
|
frontmatter,
|
|
17431
17539
|
body,
|
|
@@ -17457,7 +17565,7 @@ var ReplitSkill = class _ReplitSkill extends ToolSkill {
|
|
|
17457
17565
|
throw new Error("ReplitSkill does not support global mode.");
|
|
17458
17566
|
}
|
|
17459
17567
|
return {
|
|
17460
|
-
relativeDirPath: (0,
|
|
17568
|
+
relativeDirPath: (0, import_node_path108.join)(".agents", "skills")
|
|
17461
17569
|
};
|
|
17462
17570
|
}
|
|
17463
17571
|
getFrontmatter() {
|
|
@@ -17537,9 +17645,9 @@ var ReplitSkill = class _ReplitSkill extends ToolSkill {
|
|
|
17537
17645
|
});
|
|
17538
17646
|
const result = ReplitSkillFrontmatterSchema.safeParse(loaded.frontmatter);
|
|
17539
17647
|
if (!result.success) {
|
|
17540
|
-
const skillDirPath = (0,
|
|
17648
|
+
const skillDirPath = (0, import_node_path108.join)(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
|
|
17541
17649
|
throw new Error(
|
|
17542
|
-
`Invalid frontmatter in ${(0,
|
|
17650
|
+
`Invalid frontmatter in ${(0, import_node_path108.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
|
|
17543
17651
|
);
|
|
17544
17652
|
}
|
|
17545
17653
|
return new _ReplitSkill({
|
|
@@ -17574,7 +17682,7 @@ var ReplitSkill = class _ReplitSkill extends ToolSkill {
|
|
|
17574
17682
|
};
|
|
17575
17683
|
|
|
17576
17684
|
// src/features/skills/roo-skill.ts
|
|
17577
|
-
var
|
|
17685
|
+
var import_node_path109 = require("path");
|
|
17578
17686
|
var import_mini57 = require("zod/mini");
|
|
17579
17687
|
var RooSkillFrontmatterSchema = import_mini57.z.looseObject({
|
|
17580
17688
|
name: import_mini57.z.string(),
|
|
@@ -17583,7 +17691,7 @@ var RooSkillFrontmatterSchema = import_mini57.z.looseObject({
|
|
|
17583
17691
|
var RooSkill = class _RooSkill extends ToolSkill {
|
|
17584
17692
|
constructor({
|
|
17585
17693
|
outputRoot = process.cwd(),
|
|
17586
|
-
relativeDirPath = (0,
|
|
17694
|
+
relativeDirPath = (0, import_node_path109.join)(".roo", "skills"),
|
|
17587
17695
|
dirName,
|
|
17588
17696
|
frontmatter,
|
|
17589
17697
|
body,
|
|
@@ -17614,7 +17722,7 @@ var RooSkill = class _RooSkill extends ToolSkill {
|
|
|
17614
17722
|
global: _global = false
|
|
17615
17723
|
} = {}) {
|
|
17616
17724
|
return {
|
|
17617
|
-
relativeDirPath: (0,
|
|
17725
|
+
relativeDirPath: (0, import_node_path109.join)(".roo", "skills")
|
|
17618
17726
|
};
|
|
17619
17727
|
}
|
|
17620
17728
|
getFrontmatter() {
|
|
@@ -17702,13 +17810,13 @@ var RooSkill = class _RooSkill extends ToolSkill {
|
|
|
17702
17810
|
});
|
|
17703
17811
|
const result = RooSkillFrontmatterSchema.safeParse(loaded.frontmatter);
|
|
17704
17812
|
if (!result.success) {
|
|
17705
|
-
const skillDirPath = (0,
|
|
17813
|
+
const skillDirPath = (0, import_node_path109.join)(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
|
|
17706
17814
|
throw new Error(
|
|
17707
|
-
`Invalid frontmatter in ${(0,
|
|
17815
|
+
`Invalid frontmatter in ${(0, import_node_path109.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
|
|
17708
17816
|
);
|
|
17709
17817
|
}
|
|
17710
17818
|
if (result.data.name !== loaded.dirName) {
|
|
17711
|
-
const skillFilePath = (0,
|
|
17819
|
+
const skillFilePath = (0, import_node_path109.join)(
|
|
17712
17820
|
loaded.outputRoot,
|
|
17713
17821
|
loaded.relativeDirPath,
|
|
17714
17822
|
loaded.dirName,
|
|
@@ -17749,24 +17857,24 @@ var RooSkill = class _RooSkill extends ToolSkill {
|
|
|
17749
17857
|
};
|
|
17750
17858
|
|
|
17751
17859
|
// src/features/skills/skills-utils.ts
|
|
17752
|
-
var
|
|
17860
|
+
var import_node_path110 = require("path");
|
|
17753
17861
|
async function getLocalSkillDirNames(outputRoot) {
|
|
17754
|
-
const skillsDir = (0,
|
|
17862
|
+
const skillsDir = (0, import_node_path110.join)(outputRoot, RULESYNC_SKILLS_RELATIVE_DIR_PATH);
|
|
17755
17863
|
const names = /* @__PURE__ */ new Set();
|
|
17756
17864
|
if (!await directoryExists(skillsDir)) {
|
|
17757
17865
|
return names;
|
|
17758
17866
|
}
|
|
17759
|
-
const dirPaths = await findFilesByGlobs((0,
|
|
17867
|
+
const dirPaths = await findFilesByGlobs((0, import_node_path110.join)(skillsDir, "*"), { type: "dir" });
|
|
17760
17868
|
for (const dirPath of dirPaths) {
|
|
17761
|
-
const name = (0,
|
|
17762
|
-
if (name === (0,
|
|
17869
|
+
const name = (0, import_node_path110.basename)(dirPath);
|
|
17870
|
+
if (name === (0, import_node_path110.basename)(RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH)) continue;
|
|
17763
17871
|
names.add(name);
|
|
17764
17872
|
}
|
|
17765
17873
|
return names;
|
|
17766
17874
|
}
|
|
17767
17875
|
|
|
17768
17876
|
// src/features/skills/takt-skill.ts
|
|
17769
|
-
var
|
|
17877
|
+
var import_node_path111 = __toESM(require("path"), 1);
|
|
17770
17878
|
var DEFAULT_TAKT_SKILL_DIR = "knowledge";
|
|
17771
17879
|
var TaktSkill = class _TaktSkill extends ToolSkill {
|
|
17772
17880
|
fileName;
|
|
@@ -17803,7 +17911,7 @@ var TaktSkill = class _TaktSkill extends ToolSkill {
|
|
|
17803
17911
|
}
|
|
17804
17912
|
static getSettablePaths(_options = {}) {
|
|
17805
17913
|
return {
|
|
17806
|
-
relativeDirPath: (0,
|
|
17914
|
+
relativeDirPath: (0, import_node_path111.join)(".takt", "facets", DEFAULT_TAKT_SKILL_DIR)
|
|
17807
17915
|
};
|
|
17808
17916
|
}
|
|
17809
17917
|
/**
|
|
@@ -17814,11 +17922,11 @@ var TaktSkill = class _TaktSkill extends ToolSkill {
|
|
|
17814
17922
|
* malicious `relativeDirPath` cannot escape `outputRoot`.
|
|
17815
17923
|
*/
|
|
17816
17924
|
getDirPath() {
|
|
17817
|
-
const fullPath = (0,
|
|
17818
|
-
const resolvedFull = (0,
|
|
17819
|
-
const resolvedBase = (0,
|
|
17820
|
-
const rel = (0,
|
|
17821
|
-
if (rel.startsWith("..") ||
|
|
17925
|
+
const fullPath = (0, import_node_path111.join)(this.outputRoot, this.relativeDirPath);
|
|
17926
|
+
const resolvedFull = (0, import_node_path111.resolve)(fullPath);
|
|
17927
|
+
const resolvedBase = (0, import_node_path111.resolve)(this.outputRoot);
|
|
17928
|
+
const rel = (0, import_node_path111.relative)(resolvedBase, resolvedFull);
|
|
17929
|
+
if (rel.startsWith("..") || import_node_path111.default.isAbsolute(rel)) {
|
|
17822
17930
|
throw new Error(
|
|
17823
17931
|
`Path traversal detected: Final path escapes outputRoot. outputRoot="${this.outputRoot}", relativeDirPath="${this.relativeDirPath}"`
|
|
17824
17932
|
);
|
|
@@ -17855,7 +17963,7 @@ var TaktSkill = class _TaktSkill extends ToolSkill {
|
|
|
17855
17963
|
const stem = overrideName ?? rulesyncSkill.getDirName();
|
|
17856
17964
|
assertSafeTaktName({ name: stem, featureLabel: "skill", sourceLabel });
|
|
17857
17965
|
const fileName = `${stem}.md`;
|
|
17858
|
-
const relativeDirPath = (0,
|
|
17966
|
+
const relativeDirPath = (0, import_node_path111.join)(".takt", "facets", DEFAULT_TAKT_SKILL_DIR);
|
|
17859
17967
|
return new _TaktSkill({
|
|
17860
17968
|
outputRoot,
|
|
17861
17969
|
relativeDirPath,
|
|
@@ -17905,7 +18013,7 @@ var TaktSkill = class _TaktSkill extends ToolSkill {
|
|
|
17905
18013
|
};
|
|
17906
18014
|
|
|
17907
18015
|
// src/features/skills/windsurf-skill.ts
|
|
17908
|
-
var
|
|
18016
|
+
var import_node_path112 = require("path");
|
|
17909
18017
|
var import_mini58 = require("zod/mini");
|
|
17910
18018
|
var WindsurfSkillFrontmatterSchema = import_mini58.z.looseObject({
|
|
17911
18019
|
name: import_mini58.z.string(),
|
|
@@ -17944,11 +18052,11 @@ var WindsurfSkill = class _WindsurfSkill extends ToolSkill {
|
|
|
17944
18052
|
static getSettablePaths({ global = false } = {}) {
|
|
17945
18053
|
if (global) {
|
|
17946
18054
|
return {
|
|
17947
|
-
relativeDirPath: (0,
|
|
18055
|
+
relativeDirPath: (0, import_node_path112.join)(".codeium", "windsurf", "skills")
|
|
17948
18056
|
};
|
|
17949
18057
|
}
|
|
17950
18058
|
return {
|
|
17951
|
-
relativeDirPath: (0,
|
|
18059
|
+
relativeDirPath: (0, import_node_path112.join)(".windsurf", "skills")
|
|
17952
18060
|
};
|
|
17953
18061
|
}
|
|
17954
18062
|
getFrontmatter() {
|
|
@@ -18028,9 +18136,9 @@ var WindsurfSkill = class _WindsurfSkill extends ToolSkill {
|
|
|
18028
18136
|
});
|
|
18029
18137
|
const result = WindsurfSkillFrontmatterSchema.safeParse(loaded.frontmatter);
|
|
18030
18138
|
if (!result.success) {
|
|
18031
|
-
const skillDirPath = (0,
|
|
18139
|
+
const skillDirPath = (0, import_node_path112.join)(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
|
|
18032
18140
|
throw new Error(
|
|
18033
|
-
`Invalid frontmatter in ${(0,
|
|
18141
|
+
`Invalid frontmatter in ${(0, import_node_path112.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
|
|
18034
18142
|
);
|
|
18035
18143
|
}
|
|
18036
18144
|
return new _WindsurfSkill({
|
|
@@ -18064,6 +18172,161 @@ var WindsurfSkill = class _WindsurfSkill extends ToolSkill {
|
|
|
18064
18172
|
}
|
|
18065
18173
|
};
|
|
18066
18174
|
|
|
18175
|
+
// src/features/skills/zed-skill.ts
|
|
18176
|
+
var import_node_path113 = require("path");
|
|
18177
|
+
var import_mini59 = require("zod/mini");
|
|
18178
|
+
var ZedSkillFrontmatterSchema = import_mini59.z.looseObject({
|
|
18179
|
+
name: import_mini59.z.string(),
|
|
18180
|
+
description: import_mini59.z.string(),
|
|
18181
|
+
"disable-model-invocation": import_mini59.z.optional(import_mini59.z.boolean())
|
|
18182
|
+
});
|
|
18183
|
+
var ZedSkill = class _ZedSkill extends ToolSkill {
|
|
18184
|
+
constructor({
|
|
18185
|
+
outputRoot = process.cwd(),
|
|
18186
|
+
relativeDirPath = (0, import_node_path113.join)(".agents", "skills"),
|
|
18187
|
+
dirName,
|
|
18188
|
+
frontmatter,
|
|
18189
|
+
body,
|
|
18190
|
+
otherFiles = [],
|
|
18191
|
+
validate = true,
|
|
18192
|
+
global = false
|
|
18193
|
+
}) {
|
|
18194
|
+
super({
|
|
18195
|
+
outputRoot,
|
|
18196
|
+
relativeDirPath,
|
|
18197
|
+
dirName,
|
|
18198
|
+
mainFile: {
|
|
18199
|
+
name: SKILL_FILE_NAME,
|
|
18200
|
+
body,
|
|
18201
|
+
frontmatter: { ...frontmatter }
|
|
18202
|
+
},
|
|
18203
|
+
otherFiles,
|
|
18204
|
+
global
|
|
18205
|
+
});
|
|
18206
|
+
if (validate) {
|
|
18207
|
+
const result = this.validate();
|
|
18208
|
+
if (!result.success) {
|
|
18209
|
+
throw result.error;
|
|
18210
|
+
}
|
|
18211
|
+
}
|
|
18212
|
+
}
|
|
18213
|
+
static getSettablePaths(_options) {
|
|
18214
|
+
return {
|
|
18215
|
+
relativeDirPath: (0, import_node_path113.join)(".agents", "skills")
|
|
18216
|
+
};
|
|
18217
|
+
}
|
|
18218
|
+
getFrontmatter() {
|
|
18219
|
+
return ZedSkillFrontmatterSchema.parse(this.requireMainFileFrontmatter());
|
|
18220
|
+
}
|
|
18221
|
+
getBody() {
|
|
18222
|
+
return this.mainFile?.body ?? "";
|
|
18223
|
+
}
|
|
18224
|
+
validate() {
|
|
18225
|
+
if (!this.mainFile) {
|
|
18226
|
+
return {
|
|
18227
|
+
success: false,
|
|
18228
|
+
error: new Error(`${this.getDirPath()}: ${SKILL_FILE_NAME} file does not exist`)
|
|
18229
|
+
};
|
|
18230
|
+
}
|
|
18231
|
+
const result = ZedSkillFrontmatterSchema.safeParse(this.mainFile.frontmatter);
|
|
18232
|
+
if (!result.success) {
|
|
18233
|
+
return {
|
|
18234
|
+
success: false,
|
|
18235
|
+
error: new Error(
|
|
18236
|
+
`Invalid frontmatter in ${this.getDirPath()}: ${formatError(result.error)}`
|
|
18237
|
+
)
|
|
18238
|
+
};
|
|
18239
|
+
}
|
|
18240
|
+
return { success: true, error: null };
|
|
18241
|
+
}
|
|
18242
|
+
toRulesyncSkill() {
|
|
18243
|
+
const frontmatter = this.getFrontmatter();
|
|
18244
|
+
const rulesyncFrontmatter = {
|
|
18245
|
+
name: frontmatter.name,
|
|
18246
|
+
description: frontmatter.description,
|
|
18247
|
+
targets: ["*"]
|
|
18248
|
+
};
|
|
18249
|
+
return new RulesyncSkill({
|
|
18250
|
+
outputRoot: this.outputRoot,
|
|
18251
|
+
relativeDirPath: RULESYNC_SKILLS_RELATIVE_DIR_PATH,
|
|
18252
|
+
dirName: this.getDirName(),
|
|
18253
|
+
frontmatter: rulesyncFrontmatter,
|
|
18254
|
+
body: this.getBody(),
|
|
18255
|
+
otherFiles: this.getOtherFiles(),
|
|
18256
|
+
validate: true,
|
|
18257
|
+
global: this.global
|
|
18258
|
+
});
|
|
18259
|
+
}
|
|
18260
|
+
static fromRulesyncSkill({
|
|
18261
|
+
outputRoot = process.cwd(),
|
|
18262
|
+
rulesyncSkill,
|
|
18263
|
+
validate = true,
|
|
18264
|
+
global = false
|
|
18265
|
+
}) {
|
|
18266
|
+
const settablePaths = _ZedSkill.getSettablePaths({ global });
|
|
18267
|
+
const rulesyncFrontmatter = rulesyncSkill.getFrontmatter();
|
|
18268
|
+
const zedFrontmatter = {
|
|
18269
|
+
name: rulesyncFrontmatter.name,
|
|
18270
|
+
description: rulesyncFrontmatter.description
|
|
18271
|
+
};
|
|
18272
|
+
return new _ZedSkill({
|
|
18273
|
+
outputRoot,
|
|
18274
|
+
relativeDirPath: settablePaths.relativeDirPath,
|
|
18275
|
+
dirName: rulesyncSkill.getDirName(),
|
|
18276
|
+
frontmatter: zedFrontmatter,
|
|
18277
|
+
body: rulesyncSkill.getBody(),
|
|
18278
|
+
otherFiles: rulesyncSkill.getOtherFiles(),
|
|
18279
|
+
validate,
|
|
18280
|
+
global
|
|
18281
|
+
});
|
|
18282
|
+
}
|
|
18283
|
+
static isTargetedByRulesyncSkill(rulesyncSkill) {
|
|
18284
|
+
const targets = rulesyncSkill.getFrontmatter().targets;
|
|
18285
|
+
return targets.includes("*") || targets.includes("zed");
|
|
18286
|
+
}
|
|
18287
|
+
static async fromDir(params) {
|
|
18288
|
+
const loaded = await this.loadSkillDirContent({
|
|
18289
|
+
...params,
|
|
18290
|
+
getSettablePaths: _ZedSkill.getSettablePaths
|
|
18291
|
+
});
|
|
18292
|
+
const result = ZedSkillFrontmatterSchema.safeParse(loaded.frontmatter);
|
|
18293
|
+
if (!result.success) {
|
|
18294
|
+
const skillDirPath = (0, import_node_path113.join)(loaded.outputRoot, loaded.relativeDirPath, loaded.dirName);
|
|
18295
|
+
throw new Error(
|
|
18296
|
+
`Invalid frontmatter in ${(0, import_node_path113.join)(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
|
|
18297
|
+
);
|
|
18298
|
+
}
|
|
18299
|
+
return new _ZedSkill({
|
|
18300
|
+
outputRoot: loaded.outputRoot,
|
|
18301
|
+
relativeDirPath: loaded.relativeDirPath,
|
|
18302
|
+
dirName: loaded.dirName,
|
|
18303
|
+
frontmatter: result.data,
|
|
18304
|
+
body: loaded.body,
|
|
18305
|
+
otherFiles: loaded.otherFiles,
|
|
18306
|
+
validate: true,
|
|
18307
|
+
global: loaded.global
|
|
18308
|
+
});
|
|
18309
|
+
}
|
|
18310
|
+
static forDeletion({
|
|
18311
|
+
outputRoot = process.cwd(),
|
|
18312
|
+
relativeDirPath,
|
|
18313
|
+
dirName,
|
|
18314
|
+
global = false
|
|
18315
|
+
}) {
|
|
18316
|
+
const settablePaths = _ZedSkill.getSettablePaths({ global });
|
|
18317
|
+
return new _ZedSkill({
|
|
18318
|
+
outputRoot,
|
|
18319
|
+
relativeDirPath: relativeDirPath ?? settablePaths.relativeDirPath,
|
|
18320
|
+
dirName,
|
|
18321
|
+
frontmatter: { name: "", description: "" },
|
|
18322
|
+
body: "",
|
|
18323
|
+
otherFiles: [],
|
|
18324
|
+
validate: false,
|
|
18325
|
+
global
|
|
18326
|
+
});
|
|
18327
|
+
}
|
|
18328
|
+
};
|
|
18329
|
+
|
|
18067
18330
|
// src/features/skills/skills-processor.ts
|
|
18068
18331
|
var skillsProcessorToolTargetTuple = [
|
|
18069
18332
|
"agentsmd",
|
|
@@ -18089,9 +18352,10 @@ var skillsProcessorToolTargetTuple = [
|
|
|
18089
18352
|
"roo",
|
|
18090
18353
|
"rovodev",
|
|
18091
18354
|
"takt",
|
|
18092
|
-
"windsurf"
|
|
18355
|
+
"windsurf",
|
|
18356
|
+
"zed"
|
|
18093
18357
|
];
|
|
18094
|
-
var SkillsProcessorToolTargetSchema =
|
|
18358
|
+
var SkillsProcessorToolTargetSchema = import_mini60.z.enum(skillsProcessorToolTargetTuple);
|
|
18095
18359
|
var toolSkillFactories = /* @__PURE__ */ new Map([
|
|
18096
18360
|
[
|
|
18097
18361
|
"agentsmd",
|
|
@@ -18260,6 +18524,13 @@ var toolSkillFactories = /* @__PURE__ */ new Map([
|
|
|
18260
18524
|
class: WindsurfSkill,
|
|
18261
18525
|
meta: { supportsProject: true, supportsSimulated: false, supportsGlobal: true }
|
|
18262
18526
|
}
|
|
18527
|
+
],
|
|
18528
|
+
[
|
|
18529
|
+
"zed",
|
|
18530
|
+
{
|
|
18531
|
+
class: ZedSkill,
|
|
18532
|
+
meta: { supportsProject: true, supportsSimulated: false, supportsGlobal: true }
|
|
18533
|
+
}
|
|
18263
18534
|
]
|
|
18264
18535
|
]);
|
|
18265
18536
|
var defaultGetFactory4 = (target) => {
|
|
@@ -18356,11 +18627,11 @@ var SkillsProcessor = class extends DirFeatureProcessor {
|
|
|
18356
18627
|
)
|
|
18357
18628
|
);
|
|
18358
18629
|
const localSkillNames = new Set(localDirNames);
|
|
18359
|
-
const curatedDirPath = (0,
|
|
18630
|
+
const curatedDirPath = (0, import_node_path114.join)(this.inputRoot, RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH);
|
|
18360
18631
|
let curatedSkills = [];
|
|
18361
18632
|
if (await directoryExists(curatedDirPath)) {
|
|
18362
|
-
const curatedDirPaths = await findFilesByGlobs((0,
|
|
18363
|
-
const curatedDirNames = curatedDirPaths.map((path4) => (0,
|
|
18633
|
+
const curatedDirPaths = await findFilesByGlobs((0, import_node_path114.join)(curatedDirPath, "*"), { type: "dir" });
|
|
18634
|
+
const curatedDirNames = curatedDirPaths.map((path4) => (0, import_node_path114.basename)(path4));
|
|
18364
18635
|
const nonConflicting = curatedDirNames.filter((name) => {
|
|
18365
18636
|
if (localSkillNames.has(name)) {
|
|
18366
18637
|
this.logger.debug(`Skipping curated skill "${name}": local skill takes precedence.`);
|
|
@@ -18397,13 +18668,13 @@ var SkillsProcessor = class extends DirFeatureProcessor {
|
|
|
18397
18668
|
const seenDirNames = /* @__PURE__ */ new Set();
|
|
18398
18669
|
const loadEntries = [];
|
|
18399
18670
|
for (const root of roots) {
|
|
18400
|
-
const skillsDirPath = (0,
|
|
18671
|
+
const skillsDirPath = (0, import_node_path114.join)(this.outputRoot, root);
|
|
18401
18672
|
if (!await directoryExists(skillsDirPath)) {
|
|
18402
18673
|
continue;
|
|
18403
18674
|
}
|
|
18404
|
-
const dirPaths = await findFilesByGlobs((0,
|
|
18675
|
+
const dirPaths = await findFilesByGlobs((0, import_node_path114.join)(skillsDirPath, "*"), { type: "dir" });
|
|
18405
18676
|
for (const dirPath of dirPaths) {
|
|
18406
|
-
const dirName = (0,
|
|
18677
|
+
const dirName = (0, import_node_path114.basename)(dirPath);
|
|
18407
18678
|
if (seenDirNames.has(dirName)) {
|
|
18408
18679
|
continue;
|
|
18409
18680
|
}
|
|
@@ -18432,13 +18703,13 @@ var SkillsProcessor = class extends DirFeatureProcessor {
|
|
|
18432
18703
|
const roots = toolSkillSearchRoots(paths);
|
|
18433
18704
|
const toolSkills = [];
|
|
18434
18705
|
for (const root of roots) {
|
|
18435
|
-
const skillsDirPath = (0,
|
|
18706
|
+
const skillsDirPath = (0, import_node_path114.join)(this.outputRoot, root);
|
|
18436
18707
|
if (!await directoryExists(skillsDirPath)) {
|
|
18437
18708
|
continue;
|
|
18438
18709
|
}
|
|
18439
|
-
const dirPaths = await findFilesByGlobs((0,
|
|
18710
|
+
const dirPaths = await findFilesByGlobs((0, import_node_path114.join)(skillsDirPath, "*"), { type: "dir" });
|
|
18440
18711
|
for (const dirPath of dirPaths) {
|
|
18441
|
-
const dirName = (0,
|
|
18712
|
+
const dirName = (0, import_node_path114.basename)(dirPath);
|
|
18442
18713
|
const toolSkill = factory.class.forDeletion({
|
|
18443
18714
|
outputRoot: this.outputRoot,
|
|
18444
18715
|
relativeDirPath: root,
|
|
@@ -18500,11 +18771,11 @@ var SkillsProcessor = class extends DirFeatureProcessor {
|
|
|
18500
18771
|
};
|
|
18501
18772
|
|
|
18502
18773
|
// src/features/subagents/agentsmd-subagent.ts
|
|
18503
|
-
var
|
|
18774
|
+
var import_node_path116 = require("path");
|
|
18504
18775
|
|
|
18505
18776
|
// src/features/subagents/simulated-subagent.ts
|
|
18506
|
-
var
|
|
18507
|
-
var
|
|
18777
|
+
var import_node_path115 = require("path");
|
|
18778
|
+
var import_mini61 = require("zod/mini");
|
|
18508
18779
|
|
|
18509
18780
|
// src/features/subagents/tool-subagent.ts
|
|
18510
18781
|
var ToolSubagent = class extends ToolFile {
|
|
@@ -18556,9 +18827,9 @@ var ToolSubagent = class extends ToolFile {
|
|
|
18556
18827
|
};
|
|
18557
18828
|
|
|
18558
18829
|
// src/features/subagents/simulated-subagent.ts
|
|
18559
|
-
var SimulatedSubagentFrontmatterSchema =
|
|
18560
|
-
name:
|
|
18561
|
-
description:
|
|
18830
|
+
var SimulatedSubagentFrontmatterSchema = import_mini61.z.object({
|
|
18831
|
+
name: import_mini61.z.string(),
|
|
18832
|
+
description: import_mini61.z.optional(import_mini61.z.string())
|
|
18562
18833
|
});
|
|
18563
18834
|
var SimulatedSubagent = class extends ToolSubagent {
|
|
18564
18835
|
frontmatter;
|
|
@@ -18568,7 +18839,7 @@ var SimulatedSubagent = class extends ToolSubagent {
|
|
|
18568
18839
|
const result = SimulatedSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
18569
18840
|
if (!result.success) {
|
|
18570
18841
|
throw new Error(
|
|
18571
|
-
`Invalid frontmatter in ${(0,
|
|
18842
|
+
`Invalid frontmatter in ${(0, import_node_path115.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
|
|
18572
18843
|
);
|
|
18573
18844
|
}
|
|
18574
18845
|
}
|
|
@@ -18619,7 +18890,7 @@ var SimulatedSubagent = class extends ToolSubagent {
|
|
|
18619
18890
|
return {
|
|
18620
18891
|
success: false,
|
|
18621
18892
|
error: new Error(
|
|
18622
|
-
`Invalid frontmatter in ${(0,
|
|
18893
|
+
`Invalid frontmatter in ${(0, import_node_path115.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
|
|
18623
18894
|
)
|
|
18624
18895
|
};
|
|
18625
18896
|
}
|
|
@@ -18629,7 +18900,7 @@ var SimulatedSubagent = class extends ToolSubagent {
|
|
|
18629
18900
|
relativeFilePath,
|
|
18630
18901
|
validate = true
|
|
18631
18902
|
}) {
|
|
18632
|
-
const filePath = (0,
|
|
18903
|
+
const filePath = (0, import_node_path115.join)(outputRoot, this.getSettablePaths().relativeDirPath, relativeFilePath);
|
|
18633
18904
|
const fileContent = await readFileContent(filePath);
|
|
18634
18905
|
const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
|
|
18635
18906
|
const result = SimulatedSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
@@ -18639,7 +18910,7 @@ var SimulatedSubagent = class extends ToolSubagent {
|
|
|
18639
18910
|
return {
|
|
18640
18911
|
outputRoot,
|
|
18641
18912
|
relativeDirPath: this.getSettablePaths().relativeDirPath,
|
|
18642
|
-
relativeFilePath: (0,
|
|
18913
|
+
relativeFilePath: (0, import_node_path115.basename)(relativeFilePath),
|
|
18643
18914
|
frontmatter: result.data,
|
|
18644
18915
|
body: content.trim(),
|
|
18645
18916
|
validate
|
|
@@ -18665,7 +18936,7 @@ var SimulatedSubagent = class extends ToolSubagent {
|
|
|
18665
18936
|
var AgentsmdSubagent = class _AgentsmdSubagent extends SimulatedSubagent {
|
|
18666
18937
|
static getSettablePaths() {
|
|
18667
18938
|
return {
|
|
18668
|
-
relativeDirPath: (0,
|
|
18939
|
+
relativeDirPath: (0, import_node_path116.join)(".agents", "subagents")
|
|
18669
18940
|
};
|
|
18670
18941
|
}
|
|
18671
18942
|
static async fromFile(params) {
|
|
@@ -18688,11 +18959,11 @@ var AgentsmdSubagent = class _AgentsmdSubagent extends SimulatedSubagent {
|
|
|
18688
18959
|
};
|
|
18689
18960
|
|
|
18690
18961
|
// src/features/subagents/factorydroid-subagent.ts
|
|
18691
|
-
var
|
|
18962
|
+
var import_node_path117 = require("path");
|
|
18692
18963
|
var FactorydroidSubagent = class _FactorydroidSubagent extends SimulatedSubagent {
|
|
18693
18964
|
static getSettablePaths(_options) {
|
|
18694
18965
|
return {
|
|
18695
|
-
relativeDirPath: (0,
|
|
18966
|
+
relativeDirPath: (0, import_node_path117.join)(".factory", "droids")
|
|
18696
18967
|
};
|
|
18697
18968
|
}
|
|
18698
18969
|
static async fromFile(params) {
|
|
@@ -18715,19 +18986,19 @@ var FactorydroidSubagent = class _FactorydroidSubagent extends SimulatedSubagent
|
|
|
18715
18986
|
};
|
|
18716
18987
|
|
|
18717
18988
|
// src/features/subagents/geminicli-subagent.ts
|
|
18718
|
-
var
|
|
18719
|
-
var
|
|
18989
|
+
var import_node_path119 = require("path");
|
|
18990
|
+
var import_mini63 = require("zod/mini");
|
|
18720
18991
|
|
|
18721
18992
|
// src/features/subagents/rulesync-subagent.ts
|
|
18722
|
-
var
|
|
18723
|
-
var
|
|
18724
|
-
var RulesyncSubagentFrontmatterSchema =
|
|
18725
|
-
targets:
|
|
18726
|
-
name:
|
|
18727
|
-
description:
|
|
18728
|
-
takt:
|
|
18729
|
-
|
|
18730
|
-
name:
|
|
18993
|
+
var import_node_path118 = require("path");
|
|
18994
|
+
var import_mini62 = require("zod/mini");
|
|
18995
|
+
var RulesyncSubagentFrontmatterSchema = import_mini62.z.looseObject({
|
|
18996
|
+
targets: import_mini62.z._default(RulesyncTargetsSchema, ["*"]),
|
|
18997
|
+
name: import_mini62.z.string(),
|
|
18998
|
+
description: import_mini62.z.optional(import_mini62.z.string()),
|
|
18999
|
+
takt: import_mini62.z.optional(
|
|
19000
|
+
import_mini62.z.looseObject({
|
|
19001
|
+
name: import_mini62.z.optional(import_mini62.z.string())
|
|
18731
19002
|
})
|
|
18732
19003
|
)
|
|
18733
19004
|
});
|
|
@@ -18738,7 +19009,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
|
|
|
18738
19009
|
const parseResult = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
18739
19010
|
if (!parseResult.success && rest.validate !== false) {
|
|
18740
19011
|
throw new Error(
|
|
18741
|
-
`Invalid frontmatter in ${(0,
|
|
19012
|
+
`Invalid frontmatter in ${(0, import_node_path118.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
|
|
18742
19013
|
);
|
|
18743
19014
|
}
|
|
18744
19015
|
const parsedFrontmatter = parseResult.success ? { ...frontmatter, ...parseResult.data } : { ...frontmatter, targets: frontmatter?.targets ?? ["*"] };
|
|
@@ -18771,7 +19042,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
|
|
|
18771
19042
|
return {
|
|
18772
19043
|
success: false,
|
|
18773
19044
|
error: new Error(
|
|
18774
|
-
`Invalid frontmatter in ${(0,
|
|
19045
|
+
`Invalid frontmatter in ${(0, import_node_path118.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
|
|
18775
19046
|
)
|
|
18776
19047
|
};
|
|
18777
19048
|
}
|
|
@@ -18780,14 +19051,14 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
|
|
|
18780
19051
|
outputRoot = process.cwd(),
|
|
18781
19052
|
relativeFilePath
|
|
18782
19053
|
}) {
|
|
18783
|
-
const filePath = (0,
|
|
19054
|
+
const filePath = (0, import_node_path118.join)(outputRoot, RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, relativeFilePath);
|
|
18784
19055
|
const fileContent = await readFileContent(filePath);
|
|
18785
19056
|
const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
|
|
18786
19057
|
const result = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
18787
19058
|
if (!result.success) {
|
|
18788
19059
|
throw new Error(`Invalid frontmatter in ${relativeFilePath}: ${formatError(result.error)}`);
|
|
18789
19060
|
}
|
|
18790
|
-
const filename = (0,
|
|
19061
|
+
const filename = (0, import_node_path118.basename)(relativeFilePath);
|
|
18791
19062
|
return new _RulesyncSubagent({
|
|
18792
19063
|
outputRoot,
|
|
18793
19064
|
relativeDirPath: this.getSettablePaths().relativeDirPath,
|
|
@@ -18799,9 +19070,9 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
|
|
|
18799
19070
|
};
|
|
18800
19071
|
|
|
18801
19072
|
// src/features/subagents/geminicli-subagent.ts
|
|
18802
|
-
var GeminiCliSubagentFrontmatterSchema =
|
|
18803
|
-
name:
|
|
18804
|
-
description:
|
|
19073
|
+
var GeminiCliSubagentFrontmatterSchema = import_mini63.z.looseObject({
|
|
19074
|
+
name: import_mini63.z.string(),
|
|
19075
|
+
description: import_mini63.z.optional(import_mini63.z.string())
|
|
18805
19076
|
});
|
|
18806
19077
|
var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
|
|
18807
19078
|
frontmatter;
|
|
@@ -18811,7 +19082,7 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
|
|
|
18811
19082
|
const result = GeminiCliSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
18812
19083
|
if (!result.success) {
|
|
18813
19084
|
throw new Error(
|
|
18814
|
-
`Invalid frontmatter in ${(0,
|
|
19085
|
+
`Invalid frontmatter in ${(0, import_node_path119.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
|
|
18815
19086
|
);
|
|
18816
19087
|
}
|
|
18817
19088
|
}
|
|
@@ -18824,7 +19095,7 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
|
|
|
18824
19095
|
}
|
|
18825
19096
|
static getSettablePaths(_options = {}) {
|
|
18826
19097
|
return {
|
|
18827
|
-
relativeDirPath: (0,
|
|
19098
|
+
relativeDirPath: (0, import_node_path119.join)(".gemini", "agents")
|
|
18828
19099
|
};
|
|
18829
19100
|
}
|
|
18830
19101
|
getFrontmatter() {
|
|
@@ -18892,7 +19163,7 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
|
|
|
18892
19163
|
return {
|
|
18893
19164
|
success: false,
|
|
18894
19165
|
error: new Error(
|
|
18895
|
-
`Invalid frontmatter in ${(0,
|
|
19166
|
+
`Invalid frontmatter in ${(0, import_node_path119.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
|
|
18896
19167
|
)
|
|
18897
19168
|
};
|
|
18898
19169
|
}
|
|
@@ -18910,7 +19181,7 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
|
|
|
18910
19181
|
global = false
|
|
18911
19182
|
}) {
|
|
18912
19183
|
const paths = this.getSettablePaths({ global });
|
|
18913
|
-
const filePath = (0,
|
|
19184
|
+
const filePath = (0, import_node_path119.join)(outputRoot, paths.relativeDirPath, relativeFilePath);
|
|
18914
19185
|
const fileContent = await readFileContent(filePath);
|
|
18915
19186
|
const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
|
|
18916
19187
|
const result = GeminiCliSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
@@ -18946,11 +19217,11 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
|
|
|
18946
19217
|
};
|
|
18947
19218
|
|
|
18948
19219
|
// src/features/subagents/roo-subagent.ts
|
|
18949
|
-
var
|
|
19220
|
+
var import_node_path120 = require("path");
|
|
18950
19221
|
var RooSubagent = class _RooSubagent extends SimulatedSubagent {
|
|
18951
19222
|
static getSettablePaths() {
|
|
18952
19223
|
return {
|
|
18953
|
-
relativeDirPath: (0,
|
|
19224
|
+
relativeDirPath: (0, import_node_path120.join)(".roo", "subagents")
|
|
18954
19225
|
};
|
|
18955
19226
|
}
|
|
18956
19227
|
static async fromFile(params) {
|
|
@@ -18973,11 +19244,11 @@ var RooSubagent = class _RooSubagent extends SimulatedSubagent {
|
|
|
18973
19244
|
};
|
|
18974
19245
|
|
|
18975
19246
|
// src/features/subagents/rovodev-subagent.ts
|
|
18976
|
-
var
|
|
18977
|
-
var
|
|
18978
|
-
var RovodevSubagentFrontmatterSchema =
|
|
18979
|
-
name:
|
|
18980
|
-
description:
|
|
19247
|
+
var import_node_path121 = require("path");
|
|
19248
|
+
var import_mini64 = require("zod/mini");
|
|
19249
|
+
var RovodevSubagentFrontmatterSchema = import_mini64.z.looseObject({
|
|
19250
|
+
name: import_mini64.z.string(),
|
|
19251
|
+
description: import_mini64.z.optional(import_mini64.z.string())
|
|
18981
19252
|
});
|
|
18982
19253
|
var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
|
|
18983
19254
|
frontmatter;
|
|
@@ -18987,7 +19258,7 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
|
|
|
18987
19258
|
const result = RovodevSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
18988
19259
|
if (!result.success) {
|
|
18989
19260
|
throw new Error(
|
|
18990
|
-
`Invalid frontmatter in ${(0,
|
|
19261
|
+
`Invalid frontmatter in ${(0, import_node_path121.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
|
|
18991
19262
|
);
|
|
18992
19263
|
}
|
|
18993
19264
|
}
|
|
@@ -18999,7 +19270,7 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
|
|
|
18999
19270
|
}
|
|
19000
19271
|
static getSettablePaths(_options = {}) {
|
|
19001
19272
|
return {
|
|
19002
|
-
relativeDirPath: (0,
|
|
19273
|
+
relativeDirPath: (0, import_node_path121.join)(".rovodev", "subagents")
|
|
19003
19274
|
};
|
|
19004
19275
|
}
|
|
19005
19276
|
getFrontmatter() {
|
|
@@ -19062,7 +19333,7 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
|
|
|
19062
19333
|
return {
|
|
19063
19334
|
success: false,
|
|
19064
19335
|
error: new Error(
|
|
19065
|
-
`Invalid frontmatter in ${(0,
|
|
19336
|
+
`Invalid frontmatter in ${(0, import_node_path121.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
|
|
19066
19337
|
)
|
|
19067
19338
|
};
|
|
19068
19339
|
}
|
|
@@ -19079,7 +19350,7 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
|
|
|
19079
19350
|
global = false
|
|
19080
19351
|
}) {
|
|
19081
19352
|
const paths = this.getSettablePaths({ global });
|
|
19082
|
-
const filePath = (0,
|
|
19353
|
+
const filePath = (0, import_node_path121.join)(outputRoot, paths.relativeDirPath, relativeFilePath);
|
|
19083
19354
|
const fileContent = await readFileContent(filePath);
|
|
19084
19355
|
const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
|
|
19085
19356
|
const result = RovodevSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
@@ -19118,19 +19389,19 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
|
|
|
19118
19389
|
};
|
|
19119
19390
|
|
|
19120
19391
|
// src/features/subagents/subagents-processor.ts
|
|
19121
|
-
var
|
|
19122
|
-
var
|
|
19392
|
+
var import_node_path134 = require("path");
|
|
19393
|
+
var import_mini75 = require("zod/mini");
|
|
19123
19394
|
|
|
19124
19395
|
// src/features/subagents/claudecode-subagent.ts
|
|
19125
|
-
var
|
|
19126
|
-
var
|
|
19127
|
-
var ClaudecodeSubagentFrontmatterSchema =
|
|
19128
|
-
name:
|
|
19129
|
-
description:
|
|
19130
|
-
model:
|
|
19131
|
-
tools:
|
|
19132
|
-
permissionMode:
|
|
19133
|
-
skills:
|
|
19396
|
+
var import_node_path122 = require("path");
|
|
19397
|
+
var import_mini65 = require("zod/mini");
|
|
19398
|
+
var ClaudecodeSubagentFrontmatterSchema = import_mini65.z.looseObject({
|
|
19399
|
+
name: import_mini65.z.string(),
|
|
19400
|
+
description: import_mini65.z.optional(import_mini65.z.string()),
|
|
19401
|
+
model: import_mini65.z.optional(import_mini65.z.string()),
|
|
19402
|
+
tools: import_mini65.z.optional(import_mini65.z.union([import_mini65.z.string(), import_mini65.z.array(import_mini65.z.string())])),
|
|
19403
|
+
permissionMode: import_mini65.z.optional(import_mini65.z.string()),
|
|
19404
|
+
skills: import_mini65.z.optional(import_mini65.z.union([import_mini65.z.string(), import_mini65.z.array(import_mini65.z.string())]))
|
|
19134
19405
|
});
|
|
19135
19406
|
var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
|
|
19136
19407
|
frontmatter;
|
|
@@ -19140,7 +19411,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
|
|
|
19140
19411
|
const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
19141
19412
|
if (!result.success) {
|
|
19142
19413
|
throw new Error(
|
|
19143
|
-
`Invalid frontmatter in ${(0,
|
|
19414
|
+
`Invalid frontmatter in ${(0, import_node_path122.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
|
|
19144
19415
|
);
|
|
19145
19416
|
}
|
|
19146
19417
|
}
|
|
@@ -19152,7 +19423,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
|
|
|
19152
19423
|
}
|
|
19153
19424
|
static getSettablePaths(_options = {}) {
|
|
19154
19425
|
return {
|
|
19155
|
-
relativeDirPath: (0,
|
|
19426
|
+
relativeDirPath: (0, import_node_path122.join)(".claude", "agents")
|
|
19156
19427
|
};
|
|
19157
19428
|
}
|
|
19158
19429
|
getFrontmatter() {
|
|
@@ -19231,7 +19502,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
|
|
|
19231
19502
|
return {
|
|
19232
19503
|
success: false,
|
|
19233
19504
|
error: new Error(
|
|
19234
|
-
`Invalid frontmatter in ${(0,
|
|
19505
|
+
`Invalid frontmatter in ${(0, import_node_path122.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
|
|
19235
19506
|
)
|
|
19236
19507
|
};
|
|
19237
19508
|
}
|
|
@@ -19249,7 +19520,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
|
|
|
19249
19520
|
global = false
|
|
19250
19521
|
}) {
|
|
19251
19522
|
const paths = this.getSettablePaths({ global });
|
|
19252
|
-
const filePath = (0,
|
|
19523
|
+
const filePath = (0, import_node_path122.join)(outputRoot, paths.relativeDirPath, relativeFilePath);
|
|
19253
19524
|
const fileContent = await readFileContent(filePath);
|
|
19254
19525
|
const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
|
|
19255
19526
|
const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
@@ -19284,16 +19555,16 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
|
|
|
19284
19555
|
};
|
|
19285
19556
|
|
|
19286
19557
|
// src/features/subagents/codexcli-subagent.ts
|
|
19287
|
-
var
|
|
19558
|
+
var import_node_path123 = require("path");
|
|
19288
19559
|
var smolToml6 = __toESM(require("smol-toml"), 1);
|
|
19289
|
-
var
|
|
19290
|
-
var CodexCliSubagentTomlSchema =
|
|
19291
|
-
name:
|
|
19292
|
-
description:
|
|
19293
|
-
developer_instructions:
|
|
19294
|
-
model:
|
|
19295
|
-
model_reasoning_effort:
|
|
19296
|
-
sandbox_mode:
|
|
19560
|
+
var import_mini66 = require("zod/mini");
|
|
19561
|
+
var CodexCliSubagentTomlSchema = import_mini66.z.looseObject({
|
|
19562
|
+
name: import_mini66.z.string(),
|
|
19563
|
+
description: import_mini66.z.optional(import_mini66.z.string()),
|
|
19564
|
+
developer_instructions: import_mini66.z.optional(import_mini66.z.string()),
|
|
19565
|
+
model: import_mini66.z.optional(import_mini66.z.string()),
|
|
19566
|
+
model_reasoning_effort: import_mini66.z.optional(import_mini66.z.string()),
|
|
19567
|
+
sandbox_mode: import_mini66.z.optional(import_mini66.z.string())
|
|
19297
19568
|
});
|
|
19298
19569
|
function stringifyCodexCliSubagentToml(tomlObj) {
|
|
19299
19570
|
const { developer_instructions, ...restFields } = tomlObj;
|
|
@@ -19315,7 +19586,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
|
|
|
19315
19586
|
CodexCliSubagentTomlSchema.parse(parsed);
|
|
19316
19587
|
} catch (error) {
|
|
19317
19588
|
throw new Error(
|
|
19318
|
-
`Invalid TOML in ${(0,
|
|
19589
|
+
`Invalid TOML in ${(0, import_node_path123.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
|
|
19319
19590
|
{ cause: error }
|
|
19320
19591
|
);
|
|
19321
19592
|
}
|
|
@@ -19327,7 +19598,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
|
|
|
19327
19598
|
}
|
|
19328
19599
|
static getSettablePaths(_options = {}) {
|
|
19329
19600
|
return {
|
|
19330
|
-
relativeDirPath: (0,
|
|
19601
|
+
relativeDirPath: (0, import_node_path123.join)(".codex", "agents")
|
|
19331
19602
|
};
|
|
19332
19603
|
}
|
|
19333
19604
|
getBody() {
|
|
@@ -19339,7 +19610,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
|
|
|
19339
19610
|
parsed = CodexCliSubagentTomlSchema.parse(smolToml6.parse(this.body));
|
|
19340
19611
|
} catch (error) {
|
|
19341
19612
|
throw new Error(
|
|
19342
|
-
`Failed to parse TOML in ${(0,
|
|
19613
|
+
`Failed to parse TOML in ${(0, import_node_path123.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
|
|
19343
19614
|
{ cause: error }
|
|
19344
19615
|
);
|
|
19345
19616
|
}
|
|
@@ -19420,7 +19691,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
|
|
|
19420
19691
|
global = false
|
|
19421
19692
|
}) {
|
|
19422
19693
|
const paths = this.getSettablePaths({ global });
|
|
19423
|
-
const filePath = (0,
|
|
19694
|
+
const filePath = (0, import_node_path123.join)(outputRoot, paths.relativeDirPath, relativeFilePath);
|
|
19424
19695
|
const fileContent = await readFileContent(filePath);
|
|
19425
19696
|
const subagent = new _CodexCliSubagent({
|
|
19426
19697
|
outputRoot,
|
|
@@ -19458,13 +19729,13 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
|
|
|
19458
19729
|
};
|
|
19459
19730
|
|
|
19460
19731
|
// src/features/subagents/copilot-subagent.ts
|
|
19461
|
-
var
|
|
19462
|
-
var
|
|
19732
|
+
var import_node_path124 = require("path");
|
|
19733
|
+
var import_mini67 = require("zod/mini");
|
|
19463
19734
|
var REQUIRED_TOOL = "agent/runSubagent";
|
|
19464
|
-
var CopilotSubagentFrontmatterSchema =
|
|
19465
|
-
name:
|
|
19466
|
-
description:
|
|
19467
|
-
tools:
|
|
19735
|
+
var CopilotSubagentFrontmatterSchema = import_mini67.z.looseObject({
|
|
19736
|
+
name: import_mini67.z.string(),
|
|
19737
|
+
description: import_mini67.z.optional(import_mini67.z.string()),
|
|
19738
|
+
tools: import_mini67.z.optional(import_mini67.z.union([import_mini67.z.string(), import_mini67.z.array(import_mini67.z.string())]))
|
|
19468
19739
|
});
|
|
19469
19740
|
var normalizeTools = (tools) => {
|
|
19470
19741
|
if (!tools) {
|
|
@@ -19499,7 +19770,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
|
|
|
19499
19770
|
const result = CopilotSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
19500
19771
|
if (!result.success) {
|
|
19501
19772
|
throw new Error(
|
|
19502
|
-
`Invalid frontmatter in ${(0,
|
|
19773
|
+
`Invalid frontmatter in ${(0, import_node_path124.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
|
|
19503
19774
|
);
|
|
19504
19775
|
}
|
|
19505
19776
|
}
|
|
@@ -19511,7 +19782,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
|
|
|
19511
19782
|
}
|
|
19512
19783
|
static getSettablePaths(_options = {}) {
|
|
19513
19784
|
return {
|
|
19514
|
-
relativeDirPath: (0,
|
|
19785
|
+
relativeDirPath: (0, import_node_path124.join)(".github", "agents")
|
|
19515
19786
|
};
|
|
19516
19787
|
}
|
|
19517
19788
|
getFrontmatter() {
|
|
@@ -19585,7 +19856,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
|
|
|
19585
19856
|
return {
|
|
19586
19857
|
success: false,
|
|
19587
19858
|
error: new Error(
|
|
19588
|
-
`Invalid frontmatter in ${(0,
|
|
19859
|
+
`Invalid frontmatter in ${(0, import_node_path124.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
|
|
19589
19860
|
)
|
|
19590
19861
|
};
|
|
19591
19862
|
}
|
|
@@ -19603,7 +19874,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
|
|
|
19603
19874
|
global = false
|
|
19604
19875
|
}) {
|
|
19605
19876
|
const paths = this.getSettablePaths({ global });
|
|
19606
|
-
const filePath = (0,
|
|
19877
|
+
const filePath = (0, import_node_path124.join)(outputRoot, paths.relativeDirPath, relativeFilePath);
|
|
19607
19878
|
const fileContent = await readFileContent(filePath);
|
|
19608
19879
|
const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
|
|
19609
19880
|
const result = CopilotSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
@@ -19639,18 +19910,18 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
|
|
|
19639
19910
|
};
|
|
19640
19911
|
|
|
19641
19912
|
// src/features/subagents/copilotcli-subagent.ts
|
|
19642
|
-
var
|
|
19643
|
-
var
|
|
19644
|
-
var CopilotCliSubagentFrontmatterSchema =
|
|
19645
|
-
description:
|
|
19646
|
-
name:
|
|
19647
|
-
target:
|
|
19648
|
-
tools:
|
|
19649
|
-
model:
|
|
19650
|
-
"disable-model-invocation":
|
|
19651
|
-
"user-invocable":
|
|
19652
|
-
"mcp-servers":
|
|
19653
|
-
metadata:
|
|
19913
|
+
var import_node_path125 = require("path");
|
|
19914
|
+
var import_mini68 = require("zod/mini");
|
|
19915
|
+
var CopilotCliSubagentFrontmatterSchema = import_mini68.z.looseObject({
|
|
19916
|
+
description: import_mini68.z.string(),
|
|
19917
|
+
name: import_mini68.z.optional(import_mini68.z.string()),
|
|
19918
|
+
target: import_mini68.z.optional(import_mini68.z.string()),
|
|
19919
|
+
tools: import_mini68.z.optional(import_mini68.z.union([import_mini68.z.string(), import_mini68.z.array(import_mini68.z.string())])),
|
|
19920
|
+
model: import_mini68.z.optional(import_mini68.z.string()),
|
|
19921
|
+
"disable-model-invocation": import_mini68.z.optional(import_mini68.z.boolean()),
|
|
19922
|
+
"user-invocable": import_mini68.z.optional(import_mini68.z.boolean()),
|
|
19923
|
+
"mcp-servers": import_mini68.z.optional(import_mini68.z.record(import_mini68.z.string(), import_mini68.z.unknown())),
|
|
19924
|
+
metadata: import_mini68.z.optional(import_mini68.z.record(import_mini68.z.string(), import_mini68.z.unknown()))
|
|
19654
19925
|
});
|
|
19655
19926
|
var toCopilotCliAgentFilePath = (relativeFilePath) => {
|
|
19656
19927
|
if (relativeFilePath.endsWith(".agent.md")) {
|
|
@@ -19675,7 +19946,7 @@ var CopilotcliSubagent = class _CopilotcliSubagent extends ToolSubagent {
|
|
|
19675
19946
|
const result = CopilotCliSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
19676
19947
|
if (!result.success) {
|
|
19677
19948
|
throw new Error(
|
|
19678
|
-
`Invalid frontmatter in ${(0,
|
|
19949
|
+
`Invalid frontmatter in ${(0, import_node_path125.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
|
|
19679
19950
|
);
|
|
19680
19951
|
}
|
|
19681
19952
|
}
|
|
@@ -19687,9 +19958,9 @@ var CopilotcliSubagent = class _CopilotcliSubagent extends ToolSubagent {
|
|
|
19687
19958
|
global = false
|
|
19688
19959
|
} = {}) {
|
|
19689
19960
|
if (global) {
|
|
19690
|
-
return { relativeDirPath: (0,
|
|
19961
|
+
return { relativeDirPath: (0, import_node_path125.join)(".copilot", "agents") };
|
|
19691
19962
|
}
|
|
19692
|
-
return { relativeDirPath: (0,
|
|
19963
|
+
return { relativeDirPath: (0, import_node_path125.join)(".github", "agents") };
|
|
19693
19964
|
}
|
|
19694
19965
|
getFrontmatter() {
|
|
19695
19966
|
return this.frontmatter;
|
|
@@ -19767,7 +20038,7 @@ var CopilotcliSubagent = class _CopilotcliSubagent extends ToolSubagent {
|
|
|
19767
20038
|
return {
|
|
19768
20039
|
success: false,
|
|
19769
20040
|
error: new Error(
|
|
19770
|
-
`Invalid frontmatter in ${(0,
|
|
20041
|
+
`Invalid frontmatter in ${(0, import_node_path125.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
|
|
19771
20042
|
)
|
|
19772
20043
|
};
|
|
19773
20044
|
}
|
|
@@ -19784,7 +20055,7 @@ var CopilotcliSubagent = class _CopilotcliSubagent extends ToolSubagent {
|
|
|
19784
20055
|
global = false
|
|
19785
20056
|
}) {
|
|
19786
20057
|
const paths = this.getSettablePaths({ global });
|
|
19787
|
-
const filePath = (0,
|
|
20058
|
+
const filePath = (0, import_node_path125.join)(outputRoot, paths.relativeDirPath, relativeFilePath);
|
|
19788
20059
|
const fileContent = await readFileContent(filePath);
|
|
19789
20060
|
const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
|
|
19790
20061
|
const result = CopilotCliSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
@@ -19820,11 +20091,11 @@ var CopilotcliSubagent = class _CopilotcliSubagent extends ToolSubagent {
|
|
|
19820
20091
|
};
|
|
19821
20092
|
|
|
19822
20093
|
// src/features/subagents/cursor-subagent.ts
|
|
19823
|
-
var
|
|
19824
|
-
var
|
|
19825
|
-
var CursorSubagentFrontmatterSchema =
|
|
19826
|
-
name:
|
|
19827
|
-
description:
|
|
20094
|
+
var import_node_path126 = require("path");
|
|
20095
|
+
var import_mini69 = require("zod/mini");
|
|
20096
|
+
var CursorSubagentFrontmatterSchema = import_mini69.z.looseObject({
|
|
20097
|
+
name: import_mini69.z.string(),
|
|
20098
|
+
description: import_mini69.z.optional(import_mini69.z.string())
|
|
19828
20099
|
});
|
|
19829
20100
|
var CursorSubagent = class _CursorSubagent extends ToolSubagent {
|
|
19830
20101
|
frontmatter;
|
|
@@ -19834,7 +20105,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
|
|
|
19834
20105
|
const result = CursorSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
19835
20106
|
if (!result.success) {
|
|
19836
20107
|
throw new Error(
|
|
19837
|
-
`Invalid frontmatter in ${(0,
|
|
20108
|
+
`Invalid frontmatter in ${(0, import_node_path126.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
|
|
19838
20109
|
);
|
|
19839
20110
|
}
|
|
19840
20111
|
}
|
|
@@ -19846,7 +20117,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
|
|
|
19846
20117
|
}
|
|
19847
20118
|
static getSettablePaths(_options = {}) {
|
|
19848
20119
|
return {
|
|
19849
|
-
relativeDirPath: (0,
|
|
20120
|
+
relativeDirPath: (0, import_node_path126.join)(".cursor", "agents")
|
|
19850
20121
|
};
|
|
19851
20122
|
}
|
|
19852
20123
|
getFrontmatter() {
|
|
@@ -19913,7 +20184,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
|
|
|
19913
20184
|
return {
|
|
19914
20185
|
success: false,
|
|
19915
20186
|
error: new Error(
|
|
19916
|
-
`Invalid frontmatter in ${(0,
|
|
20187
|
+
`Invalid frontmatter in ${(0, import_node_path126.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
|
|
19917
20188
|
)
|
|
19918
20189
|
};
|
|
19919
20190
|
}
|
|
@@ -19931,7 +20202,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
|
|
|
19931
20202
|
global = false
|
|
19932
20203
|
}) {
|
|
19933
20204
|
const paths = this.getSettablePaths({ global });
|
|
19934
|
-
const filePath = (0,
|
|
20205
|
+
const filePath = (0, import_node_path126.join)(outputRoot, paths.relativeDirPath, relativeFilePath);
|
|
19935
20206
|
const fileContent = await readFileContent(filePath);
|
|
19936
20207
|
const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
|
|
19937
20208
|
const result = CursorSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
@@ -19967,12 +20238,12 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
|
|
|
19967
20238
|
};
|
|
19968
20239
|
|
|
19969
20240
|
// src/features/subagents/deepagents-subagent.ts
|
|
19970
|
-
var
|
|
19971
|
-
var
|
|
19972
|
-
var DeepagentsSubagentFrontmatterSchema =
|
|
19973
|
-
name:
|
|
19974
|
-
description:
|
|
19975
|
-
model:
|
|
20241
|
+
var import_node_path127 = require("path");
|
|
20242
|
+
var import_mini70 = require("zod/mini");
|
|
20243
|
+
var DeepagentsSubagentFrontmatterSchema = import_mini70.z.looseObject({
|
|
20244
|
+
name: import_mini70.z.string(),
|
|
20245
|
+
description: import_mini70.z.optional(import_mini70.z.string()),
|
|
20246
|
+
model: import_mini70.z.optional(import_mini70.z.string())
|
|
19976
20247
|
});
|
|
19977
20248
|
var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
|
|
19978
20249
|
frontmatter;
|
|
@@ -19982,7 +20253,7 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
|
|
|
19982
20253
|
const result = DeepagentsSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
19983
20254
|
if (!result.success) {
|
|
19984
20255
|
throw new Error(
|
|
19985
|
-
`Invalid frontmatter in ${(0,
|
|
20256
|
+
`Invalid frontmatter in ${(0, import_node_path127.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
|
|
19986
20257
|
);
|
|
19987
20258
|
}
|
|
19988
20259
|
}
|
|
@@ -19992,7 +20263,7 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
|
|
|
19992
20263
|
}
|
|
19993
20264
|
static getSettablePaths(_options = {}) {
|
|
19994
20265
|
return {
|
|
19995
|
-
relativeDirPath: (0,
|
|
20266
|
+
relativeDirPath: (0, import_node_path127.join)(".deepagents", "agents")
|
|
19996
20267
|
};
|
|
19997
20268
|
}
|
|
19998
20269
|
getFrontmatter() {
|
|
@@ -20067,7 +20338,7 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
|
|
|
20067
20338
|
return {
|
|
20068
20339
|
success: false,
|
|
20069
20340
|
error: new Error(
|
|
20070
|
-
`Invalid frontmatter in ${(0,
|
|
20341
|
+
`Invalid frontmatter in ${(0, import_node_path127.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
|
|
20071
20342
|
)
|
|
20072
20343
|
};
|
|
20073
20344
|
}
|
|
@@ -20085,7 +20356,7 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
|
|
|
20085
20356
|
global = false
|
|
20086
20357
|
}) {
|
|
20087
20358
|
const paths = this.getSettablePaths({ global });
|
|
20088
|
-
const filePath = (0,
|
|
20359
|
+
const filePath = (0, import_node_path127.join)(outputRoot, paths.relativeDirPath, relativeFilePath);
|
|
20089
20360
|
const fileContent = await readFileContent(filePath);
|
|
20090
20361
|
const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
|
|
20091
20362
|
const result = DeepagentsSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
@@ -20120,11 +20391,11 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
|
|
|
20120
20391
|
};
|
|
20121
20392
|
|
|
20122
20393
|
// src/features/subagents/junie-subagent.ts
|
|
20123
|
-
var
|
|
20124
|
-
var
|
|
20125
|
-
var JunieSubagentFrontmatterSchema =
|
|
20126
|
-
name:
|
|
20127
|
-
description:
|
|
20394
|
+
var import_node_path128 = require("path");
|
|
20395
|
+
var import_mini71 = require("zod/mini");
|
|
20396
|
+
var JunieSubagentFrontmatterSchema = import_mini71.z.looseObject({
|
|
20397
|
+
name: import_mini71.z.optional(import_mini71.z.string()),
|
|
20398
|
+
description: import_mini71.z.string()
|
|
20128
20399
|
});
|
|
20129
20400
|
var JunieSubagent = class _JunieSubagent extends ToolSubagent {
|
|
20130
20401
|
frontmatter;
|
|
@@ -20134,7 +20405,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
|
|
|
20134
20405
|
const result = JunieSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
20135
20406
|
if (!result.success) {
|
|
20136
20407
|
throw new Error(
|
|
20137
|
-
`Invalid frontmatter in ${(0,
|
|
20408
|
+
`Invalid frontmatter in ${(0, import_node_path128.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
|
|
20138
20409
|
);
|
|
20139
20410
|
}
|
|
20140
20411
|
}
|
|
@@ -20149,7 +20420,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
|
|
|
20149
20420
|
throw new Error("JunieSubagent does not support global mode.");
|
|
20150
20421
|
}
|
|
20151
20422
|
return {
|
|
20152
|
-
relativeDirPath: (0,
|
|
20423
|
+
relativeDirPath: (0, import_node_path128.join)(".junie", "agents")
|
|
20153
20424
|
};
|
|
20154
20425
|
}
|
|
20155
20426
|
getFrontmatter() {
|
|
@@ -20225,7 +20496,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
|
|
|
20225
20496
|
return {
|
|
20226
20497
|
success: false,
|
|
20227
20498
|
error: new Error(
|
|
20228
|
-
`Invalid frontmatter in ${(0,
|
|
20499
|
+
`Invalid frontmatter in ${(0, import_node_path128.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
|
|
20229
20500
|
)
|
|
20230
20501
|
};
|
|
20231
20502
|
}
|
|
@@ -20243,7 +20514,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
|
|
|
20243
20514
|
global = false
|
|
20244
20515
|
}) {
|
|
20245
20516
|
const paths = this.getSettablePaths({ global });
|
|
20246
|
-
const filePath = (0,
|
|
20517
|
+
const filePath = (0, import_node_path128.join)(outputRoot, paths.relativeDirPath, relativeFilePath);
|
|
20247
20518
|
const fileContent = await readFileContent(filePath);
|
|
20248
20519
|
const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
|
|
20249
20520
|
const result = JunieSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
@@ -20278,16 +20549,16 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
|
|
|
20278
20549
|
};
|
|
20279
20550
|
|
|
20280
20551
|
// src/features/subagents/kilo-subagent.ts
|
|
20281
|
-
var
|
|
20282
|
-
var
|
|
20552
|
+
var import_node_path130 = require("path");
|
|
20553
|
+
var import_mini73 = require("zod/mini");
|
|
20283
20554
|
|
|
20284
20555
|
// src/features/subagents/opencode-style-subagent.ts
|
|
20285
|
-
var
|
|
20286
|
-
var
|
|
20287
|
-
var OpenCodeStyleSubagentFrontmatterSchema =
|
|
20288
|
-
description:
|
|
20289
|
-
mode:
|
|
20290
|
-
name:
|
|
20556
|
+
var import_node_path129 = require("path");
|
|
20557
|
+
var import_mini72 = require("zod/mini");
|
|
20558
|
+
var OpenCodeStyleSubagentFrontmatterSchema = import_mini72.z.looseObject({
|
|
20559
|
+
description: import_mini72.z.optional(import_mini72.z.string()),
|
|
20560
|
+
mode: import_mini72.z._default(import_mini72.z.string(), "subagent"),
|
|
20561
|
+
name: import_mini72.z.optional(import_mini72.z.string())
|
|
20291
20562
|
});
|
|
20292
20563
|
var OpenCodeStyleSubagent = class extends ToolSubagent {
|
|
20293
20564
|
frontmatter;
|
|
@@ -20297,7 +20568,7 @@ var OpenCodeStyleSubagent = class extends ToolSubagent {
|
|
|
20297
20568
|
const result = OpenCodeStyleSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
20298
20569
|
if (!result.success) {
|
|
20299
20570
|
throw new Error(
|
|
20300
|
-
`Invalid frontmatter in ${(0,
|
|
20571
|
+
`Invalid frontmatter in ${(0, import_node_path129.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
|
|
20301
20572
|
);
|
|
20302
20573
|
}
|
|
20303
20574
|
}
|
|
@@ -20317,7 +20588,7 @@ var OpenCodeStyleSubagent = class extends ToolSubagent {
|
|
|
20317
20588
|
const { description, mode, name, ...toolSection } = this.frontmatter;
|
|
20318
20589
|
const rulesyncFrontmatter = {
|
|
20319
20590
|
targets: ["*"],
|
|
20320
|
-
name: name ?? (0,
|
|
20591
|
+
name: name ?? (0, import_node_path129.basename)(this.getRelativeFilePath(), ".md"),
|
|
20321
20592
|
description,
|
|
20322
20593
|
[this.getToolTarget()]: { mode, ...toolSection }
|
|
20323
20594
|
};
|
|
@@ -20339,31 +20610,31 @@ var OpenCodeStyleSubagent = class extends ToolSubagent {
|
|
|
20339
20610
|
return {
|
|
20340
20611
|
success: false,
|
|
20341
20612
|
error: new Error(
|
|
20342
|
-
`Invalid frontmatter in ${(0,
|
|
20613
|
+
`Invalid frontmatter in ${(0, import_node_path129.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
|
|
20343
20614
|
)
|
|
20344
20615
|
};
|
|
20345
20616
|
}
|
|
20346
20617
|
};
|
|
20347
20618
|
|
|
20348
20619
|
// src/features/subagents/kilo-subagent.ts
|
|
20349
|
-
var KiloSubagentFrontmatterSchema =
|
|
20350
|
-
description:
|
|
20351
|
-
mode:
|
|
20352
|
-
name:
|
|
20353
|
-
displayName:
|
|
20354
|
-
deprecated:
|
|
20355
|
-
native:
|
|
20356
|
-
hidden:
|
|
20357
|
-
top_p:
|
|
20358
|
-
temperature:
|
|
20359
|
-
color:
|
|
20360
|
-
permission:
|
|
20361
|
-
model:
|
|
20362
|
-
variant:
|
|
20363
|
-
prompt:
|
|
20364
|
-
options:
|
|
20365
|
-
steps:
|
|
20366
|
-
disable:
|
|
20620
|
+
var KiloSubagentFrontmatterSchema = import_mini73.z.looseObject({
|
|
20621
|
+
description: import_mini73.z.optional(import_mini73.z.string()),
|
|
20622
|
+
mode: import_mini73.z._default(import_mini73.z.string(), "all"),
|
|
20623
|
+
name: import_mini73.z.optional(import_mini73.z.string()),
|
|
20624
|
+
displayName: import_mini73.z.optional(import_mini73.z.string()),
|
|
20625
|
+
deprecated: import_mini73.z.optional(import_mini73.z.boolean()),
|
|
20626
|
+
native: import_mini73.z.optional(import_mini73.z.boolean()),
|
|
20627
|
+
hidden: import_mini73.z.optional(import_mini73.z.boolean()),
|
|
20628
|
+
top_p: import_mini73.z.optional(import_mini73.z.number()),
|
|
20629
|
+
temperature: import_mini73.z.optional(import_mini73.z.number()),
|
|
20630
|
+
color: import_mini73.z.optional(import_mini73.z.string()),
|
|
20631
|
+
permission: import_mini73.z.optional(import_mini73.z.string()),
|
|
20632
|
+
model: import_mini73.z.optional(import_mini73.z.string()),
|
|
20633
|
+
variant: import_mini73.z.optional(import_mini73.z.string()),
|
|
20634
|
+
prompt: import_mini73.z.optional(import_mini73.z.string()),
|
|
20635
|
+
options: import_mini73.z.optional(import_mini73.z.looseObject({})),
|
|
20636
|
+
steps: import_mini73.z.optional(import_mini73.z.array(import_mini73.z.looseObject({}))),
|
|
20637
|
+
disable: import_mini73.z.optional(import_mini73.z.boolean())
|
|
20367
20638
|
});
|
|
20368
20639
|
var KiloSubagent = class _KiloSubagent extends OpenCodeStyleSubagent {
|
|
20369
20640
|
constructor(params) {
|
|
@@ -20390,7 +20661,7 @@ var KiloSubagent = class _KiloSubagent extends OpenCodeStyleSubagent {
|
|
|
20390
20661
|
return {
|
|
20391
20662
|
success: false,
|
|
20392
20663
|
error: new Error(
|
|
20393
|
-
`Invalid frontmatter in ${(0,
|
|
20664
|
+
`Invalid frontmatter in ${(0, import_node_path130.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
|
|
20394
20665
|
)
|
|
20395
20666
|
};
|
|
20396
20667
|
}
|
|
@@ -20398,7 +20669,7 @@ var KiloSubagent = class _KiloSubagent extends OpenCodeStyleSubagent {
|
|
|
20398
20669
|
global = false
|
|
20399
20670
|
} = {}) {
|
|
20400
20671
|
return {
|
|
20401
|
-
relativeDirPath: global ? (0,
|
|
20672
|
+
relativeDirPath: global ? (0, import_node_path130.join)(".config", "kilo", "agent") : (0, import_node_path130.join)(".kilo", "agent")
|
|
20402
20673
|
};
|
|
20403
20674
|
}
|
|
20404
20675
|
static fromRulesyncSubagent({
|
|
@@ -20447,7 +20718,7 @@ var KiloSubagent = class _KiloSubagent extends OpenCodeStyleSubagent {
|
|
|
20447
20718
|
global = false
|
|
20448
20719
|
}) {
|
|
20449
20720
|
const paths = this.getSettablePaths({ global });
|
|
20450
|
-
const filePath = (0,
|
|
20721
|
+
const filePath = (0, import_node_path130.join)(outputRoot, paths.relativeDirPath, relativeFilePath);
|
|
20451
20722
|
const fileContent = await readFileContent(filePath);
|
|
20452
20723
|
const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
|
|
20453
20724
|
const result = KiloSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
@@ -20485,23 +20756,23 @@ var KiloSubagent = class _KiloSubagent extends OpenCodeStyleSubagent {
|
|
|
20485
20756
|
};
|
|
20486
20757
|
|
|
20487
20758
|
// src/features/subagents/kiro-subagent.ts
|
|
20488
|
-
var
|
|
20489
|
-
var
|
|
20490
|
-
var KiroCliSubagentJsonSchema =
|
|
20491
|
-
name:
|
|
20492
|
-
description:
|
|
20493
|
-
prompt:
|
|
20494
|
-
tools:
|
|
20495
|
-
toolAliases:
|
|
20496
|
-
toolSettings:
|
|
20497
|
-
toolSchema:
|
|
20498
|
-
hooks:
|
|
20499
|
-
model:
|
|
20500
|
-
mcpServers:
|
|
20501
|
-
useLegacyMcpJson:
|
|
20502
|
-
resources:
|
|
20503
|
-
allowedTools:
|
|
20504
|
-
includeMcpJson:
|
|
20759
|
+
var import_node_path131 = require("path");
|
|
20760
|
+
var import_mini74 = require("zod/mini");
|
|
20761
|
+
var KiroCliSubagentJsonSchema = import_mini74.z.looseObject({
|
|
20762
|
+
name: import_mini74.z.string(),
|
|
20763
|
+
description: import_mini74.z.optional(import_mini74.z.nullable(import_mini74.z.string())),
|
|
20764
|
+
prompt: import_mini74.z.optional(import_mini74.z.nullable(import_mini74.z.string())),
|
|
20765
|
+
tools: import_mini74.z.optional(import_mini74.z.nullable(import_mini74.z.array(import_mini74.z.string()))),
|
|
20766
|
+
toolAliases: import_mini74.z.optional(import_mini74.z.nullable(import_mini74.z.record(import_mini74.z.string(), import_mini74.z.string()))),
|
|
20767
|
+
toolSettings: import_mini74.z.optional(import_mini74.z.nullable(import_mini74.z.unknown())),
|
|
20768
|
+
toolSchema: import_mini74.z.optional(import_mini74.z.nullable(import_mini74.z.unknown())),
|
|
20769
|
+
hooks: import_mini74.z.optional(import_mini74.z.nullable(import_mini74.z.record(import_mini74.z.string(), import_mini74.z.array(import_mini74.z.unknown())))),
|
|
20770
|
+
model: import_mini74.z.optional(import_mini74.z.nullable(import_mini74.z.string())),
|
|
20771
|
+
mcpServers: import_mini74.z.optional(import_mini74.z.nullable(import_mini74.z.record(import_mini74.z.string(), import_mini74.z.unknown()))),
|
|
20772
|
+
useLegacyMcpJson: import_mini74.z.optional(import_mini74.z.nullable(import_mini74.z.boolean())),
|
|
20773
|
+
resources: import_mini74.z.optional(import_mini74.z.nullable(import_mini74.z.array(import_mini74.z.string()))),
|
|
20774
|
+
allowedTools: import_mini74.z.optional(import_mini74.z.nullable(import_mini74.z.array(import_mini74.z.string()))),
|
|
20775
|
+
includeMcpJson: import_mini74.z.optional(import_mini74.z.nullable(import_mini74.z.boolean()))
|
|
20505
20776
|
});
|
|
20506
20777
|
var KiroSubagent = class _KiroSubagent extends ToolSubagent {
|
|
20507
20778
|
body;
|
|
@@ -20512,7 +20783,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
|
|
|
20512
20783
|
KiroCliSubagentJsonSchema.parse(parsed);
|
|
20513
20784
|
} catch (error) {
|
|
20514
20785
|
throw new Error(
|
|
20515
|
-
`Invalid JSON in ${(0,
|
|
20786
|
+
`Invalid JSON in ${(0, import_node_path131.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
|
|
20516
20787
|
{ cause: error }
|
|
20517
20788
|
);
|
|
20518
20789
|
}
|
|
@@ -20524,7 +20795,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
|
|
|
20524
20795
|
}
|
|
20525
20796
|
static getSettablePaths(_options = {}) {
|
|
20526
20797
|
return {
|
|
20527
|
-
relativeDirPath: (0,
|
|
20798
|
+
relativeDirPath: (0, import_node_path131.join)(".kiro", "agents")
|
|
20528
20799
|
};
|
|
20529
20800
|
}
|
|
20530
20801
|
getBody() {
|
|
@@ -20536,7 +20807,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
|
|
|
20536
20807
|
parsed = JSON.parse(this.body);
|
|
20537
20808
|
} catch (error) {
|
|
20538
20809
|
throw new Error(
|
|
20539
|
-
`Failed to parse JSON in ${(0,
|
|
20810
|
+
`Failed to parse JSON in ${(0, import_node_path131.join)(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
|
|
20540
20811
|
{ cause: error }
|
|
20541
20812
|
);
|
|
20542
20813
|
}
|
|
@@ -20617,7 +20888,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
|
|
|
20617
20888
|
global = false
|
|
20618
20889
|
}) {
|
|
20619
20890
|
const paths = this.getSettablePaths({ global });
|
|
20620
|
-
const filePath = (0,
|
|
20891
|
+
const filePath = (0, import_node_path131.join)(outputRoot, paths.relativeDirPath, relativeFilePath);
|
|
20621
20892
|
const fileContent = await readFileContent(filePath);
|
|
20622
20893
|
const subagent = new _KiroSubagent({
|
|
20623
20894
|
outputRoot,
|
|
@@ -20655,7 +20926,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
|
|
|
20655
20926
|
};
|
|
20656
20927
|
|
|
20657
20928
|
// src/features/subagents/opencode-subagent.ts
|
|
20658
|
-
var
|
|
20929
|
+
var import_node_path132 = require("path");
|
|
20659
20930
|
var OpenCodeSubagentFrontmatterSchema = OpenCodeStyleSubagentFrontmatterSchema;
|
|
20660
20931
|
var OpenCodeSubagent = class _OpenCodeSubagent extends OpenCodeStyleSubagent {
|
|
20661
20932
|
getToolTarget() {
|
|
@@ -20665,7 +20936,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends OpenCodeStyleSubagent {
|
|
|
20665
20936
|
global = false
|
|
20666
20937
|
} = {}) {
|
|
20667
20938
|
return {
|
|
20668
|
-
relativeDirPath: global ? (0,
|
|
20939
|
+
relativeDirPath: global ? (0, import_node_path132.join)(".config", "opencode", "agent") : (0, import_node_path132.join)(".opencode", "agent")
|
|
20669
20940
|
};
|
|
20670
20941
|
}
|
|
20671
20942
|
static fromRulesyncSubagent({
|
|
@@ -20709,7 +20980,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends OpenCodeStyleSubagent {
|
|
|
20709
20980
|
global = false
|
|
20710
20981
|
}) {
|
|
20711
20982
|
const paths = this.getSettablePaths({ global });
|
|
20712
|
-
const filePath = (0,
|
|
20983
|
+
const filePath = (0, import_node_path132.join)(outputRoot, paths.relativeDirPath, relativeFilePath);
|
|
20713
20984
|
const fileContent = await readFileContent(filePath);
|
|
20714
20985
|
const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
|
|
20715
20986
|
const result = OpenCodeSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
@@ -20747,7 +21018,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends OpenCodeStyleSubagent {
|
|
|
20747
21018
|
};
|
|
20748
21019
|
|
|
20749
21020
|
// src/features/subagents/takt-subagent.ts
|
|
20750
|
-
var
|
|
21021
|
+
var import_node_path133 = require("path");
|
|
20751
21022
|
var DEFAULT_TAKT_SUBAGENT_DIR = "personas";
|
|
20752
21023
|
var TaktSubagent = class _TaktSubagent extends ToolSubagent {
|
|
20753
21024
|
body;
|
|
@@ -20759,7 +21030,7 @@ var TaktSubagent = class _TaktSubagent extends ToolSubagent {
|
|
|
20759
21030
|
}
|
|
20760
21031
|
static getSettablePaths(_options = {}) {
|
|
20761
21032
|
return {
|
|
20762
|
-
relativeDirPath: (0,
|
|
21033
|
+
relativeDirPath: (0, import_node_path133.join)(".takt", "facets", DEFAULT_TAKT_SUBAGENT_DIR)
|
|
20763
21034
|
};
|
|
20764
21035
|
}
|
|
20765
21036
|
getBody() {
|
|
@@ -20821,7 +21092,7 @@ var TaktSubagent = class _TaktSubagent extends ToolSubagent {
|
|
|
20821
21092
|
global = false
|
|
20822
21093
|
}) {
|
|
20823
21094
|
const paths = this.getSettablePaths({ global });
|
|
20824
|
-
const filePath = (0,
|
|
21095
|
+
const filePath = (0, import_node_path133.join)(outputRoot, paths.relativeDirPath, relativeFilePath);
|
|
20825
21096
|
const fileContent = await readFileContent(filePath);
|
|
20826
21097
|
const { body } = parseFrontmatter(fileContent, filePath);
|
|
20827
21098
|
return new _TaktSubagent({
|
|
@@ -20869,7 +21140,7 @@ var subagentsProcessorToolTargetTuple = [
|
|
|
20869
21140
|
"rovodev",
|
|
20870
21141
|
"takt"
|
|
20871
21142
|
];
|
|
20872
|
-
var SubagentsProcessorToolTargetSchema =
|
|
21143
|
+
var SubagentsProcessorToolTargetSchema = import_mini75.z.enum(subagentsProcessorToolTargetTuple);
|
|
20873
21144
|
var toolSubagentFactories = /* @__PURE__ */ new Map([
|
|
20874
21145
|
[
|
|
20875
21146
|
"agentsmd",
|
|
@@ -21078,7 +21349,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
|
|
|
21078
21349
|
* Load and parse rulesync subagent files from .rulesync/subagents/ directory
|
|
21079
21350
|
*/
|
|
21080
21351
|
async loadRulesyncFiles() {
|
|
21081
|
-
const subagentsDir = (0,
|
|
21352
|
+
const subagentsDir = (0, import_node_path134.join)(this.inputRoot, RulesyncSubagent.getSettablePaths().relativeDirPath);
|
|
21082
21353
|
const dirExists = await directoryExists(subagentsDir);
|
|
21083
21354
|
if (!dirExists) {
|
|
21084
21355
|
this.logger.debug(`Rulesync subagents directory not found: ${subagentsDir}`);
|
|
@@ -21093,7 +21364,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
|
|
|
21093
21364
|
this.logger.debug(`Found ${mdFiles.length} subagent files in ${subagentsDir}`);
|
|
21094
21365
|
const rulesyncSubagents = [];
|
|
21095
21366
|
for (const mdFile of mdFiles) {
|
|
21096
|
-
const filepath = (0,
|
|
21367
|
+
const filepath = (0, import_node_path134.join)(subagentsDir, mdFile);
|
|
21097
21368
|
try {
|
|
21098
21369
|
const rulesyncSubagent = await RulesyncSubagent.fromFile({
|
|
21099
21370
|
outputRoot: this.inputRoot,
|
|
@@ -21124,14 +21395,14 @@ var SubagentsProcessor = class extends FeatureProcessor {
|
|
|
21124
21395
|
const factory = this.getFactory(this.toolTarget);
|
|
21125
21396
|
const paths = factory.class.getSettablePaths({ global: this.global });
|
|
21126
21397
|
const subagentFilePaths = await findFilesByGlobs(
|
|
21127
|
-
(0,
|
|
21398
|
+
(0, import_node_path134.join)(this.outputRoot, paths.relativeDirPath, factory.meta.filePattern)
|
|
21128
21399
|
);
|
|
21129
21400
|
if (forDeletion) {
|
|
21130
21401
|
const toolSubagents2 = subagentFilePaths.map(
|
|
21131
21402
|
(path4) => factory.class.forDeletion({
|
|
21132
21403
|
outputRoot: this.outputRoot,
|
|
21133
21404
|
relativeDirPath: paths.relativeDirPath,
|
|
21134
|
-
relativeFilePath: (0,
|
|
21405
|
+
relativeFilePath: (0, import_node_path134.basename)(path4),
|
|
21135
21406
|
global: this.global
|
|
21136
21407
|
})
|
|
21137
21408
|
).filter((subagent) => subagent.isDeletable());
|
|
@@ -21144,7 +21415,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
|
|
|
21144
21415
|
subagentFilePaths.map(
|
|
21145
21416
|
(path4) => factory.class.fromFile({
|
|
21146
21417
|
outputRoot: this.outputRoot,
|
|
21147
|
-
relativeFilePath: (0,
|
|
21418
|
+
relativeFilePath: (0, import_node_path134.basename)(path4),
|
|
21148
21419
|
global: this.global
|
|
21149
21420
|
})
|
|
21150
21421
|
)
|
|
@@ -21191,55 +21462,55 @@ var SubagentsProcessor = class extends FeatureProcessor {
|
|
|
21191
21462
|
};
|
|
21192
21463
|
|
|
21193
21464
|
// src/features/rules/agentsmd-rule.ts
|
|
21194
|
-
var
|
|
21465
|
+
var import_node_path137 = require("path");
|
|
21195
21466
|
|
|
21196
21467
|
// src/features/rules/tool-rule.ts
|
|
21197
|
-
var
|
|
21468
|
+
var import_node_path136 = require("path");
|
|
21198
21469
|
|
|
21199
21470
|
// src/features/rules/rulesync-rule.ts
|
|
21200
|
-
var
|
|
21201
|
-
var
|
|
21202
|
-
var RulesyncRuleFrontmatterSchema =
|
|
21203
|
-
root:
|
|
21204
|
-
localRoot:
|
|
21205
|
-
targets:
|
|
21206
|
-
description:
|
|
21207
|
-
globs:
|
|
21208
|
-
agentsmd:
|
|
21209
|
-
|
|
21471
|
+
var import_node_path135 = require("path");
|
|
21472
|
+
var import_mini76 = require("zod/mini");
|
|
21473
|
+
var RulesyncRuleFrontmatterSchema = import_mini76.z.object({
|
|
21474
|
+
root: import_mini76.z.optional(import_mini76.z.boolean()),
|
|
21475
|
+
localRoot: import_mini76.z.optional(import_mini76.z.boolean()),
|
|
21476
|
+
targets: import_mini76.z._default(RulesyncTargetsSchema, ["*"]),
|
|
21477
|
+
description: import_mini76.z.optional(import_mini76.z.string()),
|
|
21478
|
+
globs: import_mini76.z.optional(import_mini76.z.array(import_mini76.z.string())),
|
|
21479
|
+
agentsmd: import_mini76.z.optional(
|
|
21480
|
+
import_mini76.z.looseObject({
|
|
21210
21481
|
// @example "path/to/subproject"
|
|
21211
|
-
subprojectPath:
|
|
21482
|
+
subprojectPath: import_mini76.z.optional(import_mini76.z.string())
|
|
21212
21483
|
})
|
|
21213
21484
|
),
|
|
21214
|
-
claudecode:
|
|
21215
|
-
|
|
21485
|
+
claudecode: import_mini76.z.optional(
|
|
21486
|
+
import_mini76.z.looseObject({
|
|
21216
21487
|
// Glob patterns for conditional rules (takes precedence over globs)
|
|
21217
21488
|
// @example ["src/**/*.ts", "tests/**/*.test.ts"]
|
|
21218
|
-
paths:
|
|
21489
|
+
paths: import_mini76.z.optional(import_mini76.z.array(import_mini76.z.string()))
|
|
21219
21490
|
})
|
|
21220
21491
|
),
|
|
21221
|
-
cursor:
|
|
21222
|
-
|
|
21223
|
-
alwaysApply:
|
|
21224
|
-
description:
|
|
21225
|
-
globs:
|
|
21492
|
+
cursor: import_mini76.z.optional(
|
|
21493
|
+
import_mini76.z.looseObject({
|
|
21494
|
+
alwaysApply: import_mini76.z.optional(import_mini76.z.boolean()),
|
|
21495
|
+
description: import_mini76.z.optional(import_mini76.z.string()),
|
|
21496
|
+
globs: import_mini76.z.optional(import_mini76.z.array(import_mini76.z.string()))
|
|
21226
21497
|
})
|
|
21227
21498
|
),
|
|
21228
|
-
copilot:
|
|
21229
|
-
|
|
21230
|
-
excludeAgent:
|
|
21499
|
+
copilot: import_mini76.z.optional(
|
|
21500
|
+
import_mini76.z.looseObject({
|
|
21501
|
+
excludeAgent: import_mini76.z.optional(import_mini76.z.union([import_mini76.z.literal("code-review"), import_mini76.z.literal("coding-agent")]))
|
|
21231
21502
|
})
|
|
21232
21503
|
),
|
|
21233
|
-
antigravity:
|
|
21234
|
-
|
|
21235
|
-
trigger:
|
|
21236
|
-
globs:
|
|
21504
|
+
antigravity: import_mini76.z.optional(
|
|
21505
|
+
import_mini76.z.looseObject({
|
|
21506
|
+
trigger: import_mini76.z.optional(import_mini76.z.string()),
|
|
21507
|
+
globs: import_mini76.z.optional(import_mini76.z.array(import_mini76.z.string()))
|
|
21237
21508
|
})
|
|
21238
21509
|
),
|
|
21239
|
-
takt:
|
|
21240
|
-
|
|
21510
|
+
takt: import_mini76.z.optional(
|
|
21511
|
+
import_mini76.z.looseObject({
|
|
21241
21512
|
// Rename the emitted file stem (e.g. "coder.md" → "{name}.md").
|
|
21242
|
-
name:
|
|
21513
|
+
name: import_mini76.z.optional(import_mini76.z.string())
|
|
21243
21514
|
})
|
|
21244
21515
|
)
|
|
21245
21516
|
});
|
|
@@ -21250,7 +21521,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
|
|
|
21250
21521
|
const parseResult = RulesyncRuleFrontmatterSchema.safeParse(frontmatter);
|
|
21251
21522
|
if (!parseResult.success && rest.validate !== false) {
|
|
21252
21523
|
throw new Error(
|
|
21253
|
-
`Invalid frontmatter in ${(0,
|
|
21524
|
+
`Invalid frontmatter in ${(0, import_node_path135.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
|
|
21254
21525
|
);
|
|
21255
21526
|
}
|
|
21256
21527
|
const parsedFrontmatter = parseResult.success ? parseResult.data : { ...frontmatter, targets: frontmatter.targets ?? ["*"] };
|
|
@@ -21285,7 +21556,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
|
|
|
21285
21556
|
return {
|
|
21286
21557
|
success: false,
|
|
21287
21558
|
error: new Error(
|
|
21288
|
-
`Invalid frontmatter in ${(0,
|
|
21559
|
+
`Invalid frontmatter in ${(0, import_node_path135.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
|
|
21289
21560
|
)
|
|
21290
21561
|
};
|
|
21291
21562
|
}
|
|
@@ -21295,7 +21566,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
|
|
|
21295
21566
|
relativeFilePath,
|
|
21296
21567
|
validate = true
|
|
21297
21568
|
}) {
|
|
21298
|
-
const filePath = (0,
|
|
21569
|
+
const filePath = (0, import_node_path135.join)(
|
|
21299
21570
|
outputRoot,
|
|
21300
21571
|
this.getSettablePaths().recommended.relativeDirPath,
|
|
21301
21572
|
relativeFilePath
|
|
@@ -21394,7 +21665,7 @@ var ToolRule = class extends ToolFile {
|
|
|
21394
21665
|
rulesyncRule,
|
|
21395
21666
|
validate = true,
|
|
21396
21667
|
rootPath = { relativeDirPath: ".", relativeFilePath: "AGENTS.md" },
|
|
21397
|
-
nonRootPath = { relativeDirPath: (0,
|
|
21668
|
+
nonRootPath = { relativeDirPath: (0, import_node_path136.join)(".agents", "memories") }
|
|
21398
21669
|
}) {
|
|
21399
21670
|
const params = this.buildToolRuleParamsDefault({
|
|
21400
21671
|
outputRoot,
|
|
@@ -21405,7 +21676,7 @@ var ToolRule = class extends ToolFile {
|
|
|
21405
21676
|
});
|
|
21406
21677
|
const rulesyncFrontmatter = rulesyncRule.getFrontmatter();
|
|
21407
21678
|
if (!rulesyncFrontmatter.root && rulesyncFrontmatter.agentsmd?.subprojectPath) {
|
|
21408
|
-
params.relativeDirPath = (0,
|
|
21679
|
+
params.relativeDirPath = (0, import_node_path136.join)(rulesyncFrontmatter.agentsmd.subprojectPath);
|
|
21409
21680
|
params.relativeFilePath = "AGENTS.md";
|
|
21410
21681
|
}
|
|
21411
21682
|
return params;
|
|
@@ -21454,7 +21725,7 @@ var ToolRule = class extends ToolFile {
|
|
|
21454
21725
|
}
|
|
21455
21726
|
};
|
|
21456
21727
|
function buildToolPath(toolDir, subDir, excludeToolDir) {
|
|
21457
|
-
return excludeToolDir ? subDir : (0,
|
|
21728
|
+
return excludeToolDir ? subDir : (0, import_node_path136.join)(toolDir, subDir);
|
|
21458
21729
|
}
|
|
21459
21730
|
|
|
21460
21731
|
// src/features/rules/agentsmd-rule.ts
|
|
@@ -21483,8 +21754,8 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
|
|
|
21483
21754
|
validate = true
|
|
21484
21755
|
}) {
|
|
21485
21756
|
const isRoot = relativeFilePath === "AGENTS.md";
|
|
21486
|
-
const relativePath = isRoot ? "AGENTS.md" : (0,
|
|
21487
|
-
const fileContent = await readFileContent((0,
|
|
21757
|
+
const relativePath = isRoot ? "AGENTS.md" : (0, import_node_path137.join)(".agents", "memories", relativeFilePath);
|
|
21758
|
+
const fileContent = await readFileContent((0, import_node_path137.join)(outputRoot, relativePath));
|
|
21488
21759
|
return new _AgentsMdRule({
|
|
21489
21760
|
outputRoot,
|
|
21490
21761
|
relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
|
|
@@ -21539,7 +21810,7 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
|
|
|
21539
21810
|
};
|
|
21540
21811
|
|
|
21541
21812
|
// src/features/rules/antigravity-cli-rule.ts
|
|
21542
|
-
var
|
|
21813
|
+
var import_node_path138 = require("path");
|
|
21543
21814
|
var AntigravityCliRule = class _AntigravityCliRule extends ToolRule {
|
|
21544
21815
|
static getSettablePaths({
|
|
21545
21816
|
global,
|
|
@@ -21574,7 +21845,7 @@ var AntigravityCliRule = class _AntigravityCliRule extends ToolRule {
|
|
|
21574
21845
|
if (isRoot) {
|
|
21575
21846
|
const relativePath2 = paths.root.relativeFilePath;
|
|
21576
21847
|
const fileContent2 = await readFileContent(
|
|
21577
|
-
(0,
|
|
21848
|
+
(0, import_node_path138.join)(outputRoot, paths.root.relativeDirPath, relativePath2)
|
|
21578
21849
|
);
|
|
21579
21850
|
return new _AntigravityCliRule({
|
|
21580
21851
|
outputRoot,
|
|
@@ -21588,8 +21859,8 @@ var AntigravityCliRule = class _AntigravityCliRule extends ToolRule {
|
|
|
21588
21859
|
if (!paths.nonRoot) {
|
|
21589
21860
|
throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
|
|
21590
21861
|
}
|
|
21591
|
-
const relativePath = (0,
|
|
21592
|
-
const fileContent = await readFileContent((0,
|
|
21862
|
+
const relativePath = (0, import_node_path138.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
|
|
21863
|
+
const fileContent = await readFileContent((0, import_node_path138.join)(outputRoot, relativePath));
|
|
21593
21864
|
return new _AntigravityCliRule({
|
|
21594
21865
|
outputRoot,
|
|
21595
21866
|
relativeDirPath: paths.nonRoot.relativeDirPath,
|
|
@@ -21648,24 +21919,24 @@ var AntigravityCliRule = class _AntigravityCliRule extends ToolRule {
|
|
|
21648
21919
|
};
|
|
21649
21920
|
|
|
21650
21921
|
// src/features/rules/antigravity-ide-rule.ts
|
|
21651
|
-
var
|
|
21922
|
+
var import_node_path140 = require("path");
|
|
21652
21923
|
|
|
21653
21924
|
// src/features/rules/antigravity-rule.ts
|
|
21654
|
-
var
|
|
21655
|
-
var
|
|
21656
|
-
var AntigravityRuleFrontmatterSchema =
|
|
21657
|
-
trigger:
|
|
21658
|
-
|
|
21659
|
-
|
|
21660
|
-
|
|
21661
|
-
|
|
21662
|
-
|
|
21663
|
-
|
|
21925
|
+
var import_node_path139 = require("path");
|
|
21926
|
+
var import_mini77 = require("zod/mini");
|
|
21927
|
+
var AntigravityRuleFrontmatterSchema = import_mini77.z.looseObject({
|
|
21928
|
+
trigger: import_mini77.z.optional(
|
|
21929
|
+
import_mini77.z.union([
|
|
21930
|
+
import_mini77.z.literal("always_on"),
|
|
21931
|
+
import_mini77.z.literal("glob"),
|
|
21932
|
+
import_mini77.z.literal("manual"),
|
|
21933
|
+
import_mini77.z.literal("model_decision"),
|
|
21934
|
+
import_mini77.z.string()
|
|
21664
21935
|
// accepts any string for forward compatibility
|
|
21665
21936
|
])
|
|
21666
21937
|
),
|
|
21667
|
-
globs:
|
|
21668
|
-
description:
|
|
21938
|
+
globs: import_mini77.z.optional(import_mini77.z.string()),
|
|
21939
|
+
description: import_mini77.z.optional(import_mini77.z.string())
|
|
21669
21940
|
});
|
|
21670
21941
|
function parseGlobsString(globs) {
|
|
21671
21942
|
if (!globs) {
|
|
@@ -21810,7 +22081,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
|
|
|
21810
22081
|
const result = AntigravityRuleFrontmatterSchema.safeParse(frontmatter);
|
|
21811
22082
|
if (!result.success) {
|
|
21812
22083
|
throw new Error(
|
|
21813
|
-
`Invalid frontmatter in ${(0,
|
|
22084
|
+
`Invalid frontmatter in ${(0, import_node_path139.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
|
|
21814
22085
|
);
|
|
21815
22086
|
}
|
|
21816
22087
|
}
|
|
@@ -21834,7 +22105,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
|
|
|
21834
22105
|
relativeFilePath,
|
|
21835
22106
|
validate = true
|
|
21836
22107
|
}) {
|
|
21837
|
-
const filePath = (0,
|
|
22108
|
+
const filePath = (0, import_node_path139.join)(
|
|
21838
22109
|
outputRoot,
|
|
21839
22110
|
this.getSettablePaths().nonRoot.relativeDirPath,
|
|
21840
22111
|
relativeFilePath
|
|
@@ -21982,7 +22253,7 @@ var AntigravityIdeRule = class _AntigravityIdeRule extends ToolRule {
|
|
|
21982
22253
|
const result = AntigravityRuleFrontmatterSchema.safeParse(frontmatter);
|
|
21983
22254
|
if (!result.success) {
|
|
21984
22255
|
throw new Error(
|
|
21985
|
-
`Invalid frontmatter in ${(0,
|
|
22256
|
+
`Invalid frontmatter in ${(0, import_node_path140.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
|
|
21986
22257
|
);
|
|
21987
22258
|
}
|
|
21988
22259
|
}
|
|
@@ -22025,7 +22296,7 @@ var AntigravityIdeRule = class _AntigravityIdeRule extends ToolRule {
|
|
|
22025
22296
|
if (global) {
|
|
22026
22297
|
const rootPath = _AntigravityIdeRule.getGlobalRootPath();
|
|
22027
22298
|
const fileContent2 = await readFileContent(
|
|
22028
|
-
(0,
|
|
22299
|
+
(0, import_node_path140.join)(outputRoot, rootPath.relativeDirPath, rootPath.relativeFilePath)
|
|
22029
22300
|
);
|
|
22030
22301
|
return new _AntigravityIdeRule({
|
|
22031
22302
|
outputRoot,
|
|
@@ -22038,7 +22309,7 @@ var AntigravityIdeRule = class _AntigravityIdeRule extends ToolRule {
|
|
|
22038
22309
|
});
|
|
22039
22310
|
}
|
|
22040
22311
|
const nonRootDirPath = buildToolPath(".agents", "rules");
|
|
22041
|
-
const filePath = (0,
|
|
22312
|
+
const filePath = (0, import_node_path140.join)(outputRoot, nonRootDirPath, relativeFilePath);
|
|
22042
22313
|
const fileContent = await readFileContent(filePath);
|
|
22043
22314
|
const { frontmatter, body } = parseFrontmatter(fileContent, filePath);
|
|
22044
22315
|
let parsedFrontmatter;
|
|
@@ -22167,7 +22438,7 @@ var AntigravityIdeRule = class _AntigravityIdeRule extends ToolRule {
|
|
|
22167
22438
|
};
|
|
22168
22439
|
|
|
22169
22440
|
// src/features/rules/augmentcode-legacy-rule.ts
|
|
22170
|
-
var
|
|
22441
|
+
var import_node_path141 = require("path");
|
|
22171
22442
|
var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
|
|
22172
22443
|
toRulesyncRule() {
|
|
22173
22444
|
const rulesyncFrontmatter = {
|
|
@@ -22227,8 +22498,8 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
|
|
|
22227
22498
|
}) {
|
|
22228
22499
|
const settablePaths = this.getSettablePaths();
|
|
22229
22500
|
const isRoot = relativeFilePath === settablePaths.root.relativeFilePath;
|
|
22230
|
-
const relativePath = isRoot ? settablePaths.root.relativeFilePath : (0,
|
|
22231
|
-
const fileContent = await readFileContent((0,
|
|
22501
|
+
const relativePath = isRoot ? settablePaths.root.relativeFilePath : (0, import_node_path141.join)(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
|
|
22502
|
+
const fileContent = await readFileContent((0, import_node_path141.join)(outputRoot, relativePath));
|
|
22232
22503
|
return new _AugmentcodeLegacyRule({
|
|
22233
22504
|
outputRoot,
|
|
22234
22505
|
relativeDirPath: isRoot ? settablePaths.root.relativeDirPath : settablePaths.nonRoot.relativeDirPath,
|
|
@@ -22257,7 +22528,7 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
|
|
|
22257
22528
|
};
|
|
22258
22529
|
|
|
22259
22530
|
// src/features/rules/augmentcode-rule.ts
|
|
22260
|
-
var
|
|
22531
|
+
var import_node_path142 = require("path");
|
|
22261
22532
|
var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
|
|
22262
22533
|
toRulesyncRule() {
|
|
22263
22534
|
return this.toRulesyncRuleDefault();
|
|
@@ -22288,7 +22559,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
|
|
|
22288
22559
|
relativeFilePath,
|
|
22289
22560
|
validate = true
|
|
22290
22561
|
}) {
|
|
22291
|
-
const filePath = (0,
|
|
22562
|
+
const filePath = (0, import_node_path142.join)(
|
|
22292
22563
|
outputRoot,
|
|
22293
22564
|
this.getSettablePaths().nonRoot.relativeDirPath,
|
|
22294
22565
|
relativeFilePath
|
|
@@ -22328,7 +22599,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
|
|
|
22328
22599
|
};
|
|
22329
22600
|
|
|
22330
22601
|
// src/features/rules/claudecode-legacy-rule.ts
|
|
22331
|
-
var
|
|
22602
|
+
var import_node_path143 = require("path");
|
|
22332
22603
|
var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
|
|
22333
22604
|
static getSettablePaths({
|
|
22334
22605
|
global,
|
|
@@ -22370,7 +22641,7 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
|
|
|
22370
22641
|
if (isRoot) {
|
|
22371
22642
|
const rootDirPath = overrideDirPath ?? paths.root.relativeDirPath;
|
|
22372
22643
|
const fileContent2 = await readFileContent(
|
|
22373
|
-
(0,
|
|
22644
|
+
(0, import_node_path143.join)(outputRoot, rootDirPath, paths.root.relativeFilePath)
|
|
22374
22645
|
);
|
|
22375
22646
|
return new _ClaudecodeLegacyRule({
|
|
22376
22647
|
outputRoot,
|
|
@@ -22384,8 +22655,8 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
|
|
|
22384
22655
|
if (!paths.nonRoot) {
|
|
22385
22656
|
throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
|
|
22386
22657
|
}
|
|
22387
|
-
const relativePath = (0,
|
|
22388
|
-
const fileContent = await readFileContent((0,
|
|
22658
|
+
const relativePath = (0, import_node_path143.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
|
|
22659
|
+
const fileContent = await readFileContent((0, import_node_path143.join)(outputRoot, relativePath));
|
|
22389
22660
|
return new _ClaudecodeLegacyRule({
|
|
22390
22661
|
outputRoot,
|
|
22391
22662
|
relativeDirPath: paths.nonRoot.relativeDirPath,
|
|
@@ -22444,10 +22715,10 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
|
|
|
22444
22715
|
};
|
|
22445
22716
|
|
|
22446
22717
|
// src/features/rules/claudecode-rule.ts
|
|
22447
|
-
var
|
|
22448
|
-
var
|
|
22449
|
-
var ClaudecodeRuleFrontmatterSchema =
|
|
22450
|
-
paths:
|
|
22718
|
+
var import_node_path144 = require("path");
|
|
22719
|
+
var import_mini78 = require("zod/mini");
|
|
22720
|
+
var ClaudecodeRuleFrontmatterSchema = import_mini78.z.object({
|
|
22721
|
+
paths: import_mini78.z.optional(import_mini78.z.array(import_mini78.z.string()))
|
|
22451
22722
|
});
|
|
22452
22723
|
var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
|
|
22453
22724
|
frontmatter;
|
|
@@ -22485,7 +22756,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
|
|
|
22485
22756
|
const result = ClaudecodeRuleFrontmatterSchema.safeParse(frontmatter);
|
|
22486
22757
|
if (!result.success) {
|
|
22487
22758
|
throw new Error(
|
|
22488
|
-
`Invalid frontmatter in ${(0,
|
|
22759
|
+
`Invalid frontmatter in ${(0, import_node_path144.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
|
|
22489
22760
|
);
|
|
22490
22761
|
}
|
|
22491
22762
|
}
|
|
@@ -22515,7 +22786,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
|
|
|
22515
22786
|
if (isRoot) {
|
|
22516
22787
|
const rootDirPath = overrideDirPath ?? paths.root.relativeDirPath;
|
|
22517
22788
|
const fileContent2 = await readFileContent(
|
|
22518
|
-
(0,
|
|
22789
|
+
(0, import_node_path144.join)(outputRoot, rootDirPath, paths.root.relativeFilePath)
|
|
22519
22790
|
);
|
|
22520
22791
|
return new _ClaudecodeRule({
|
|
22521
22792
|
outputRoot,
|
|
@@ -22530,8 +22801,8 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
|
|
|
22530
22801
|
if (!paths.nonRoot) {
|
|
22531
22802
|
throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
|
|
22532
22803
|
}
|
|
22533
|
-
const relativePath = (0,
|
|
22534
|
-
const filePath = (0,
|
|
22804
|
+
const relativePath = (0, import_node_path144.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
|
|
22805
|
+
const filePath = (0, import_node_path144.join)(outputRoot, relativePath);
|
|
22535
22806
|
const fileContent = await readFileContent(filePath);
|
|
22536
22807
|
const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
|
|
22537
22808
|
const result = ClaudecodeRuleFrontmatterSchema.safeParse(frontmatter);
|
|
@@ -22642,7 +22913,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
|
|
|
22642
22913
|
return {
|
|
22643
22914
|
success: false,
|
|
22644
22915
|
error: new Error(
|
|
22645
|
-
`Invalid frontmatter in ${(0,
|
|
22916
|
+
`Invalid frontmatter in ${(0, import_node_path144.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
|
|
22646
22917
|
)
|
|
22647
22918
|
};
|
|
22648
22919
|
}
|
|
@@ -22662,10 +22933,10 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
|
|
|
22662
22933
|
};
|
|
22663
22934
|
|
|
22664
22935
|
// src/features/rules/cline-rule.ts
|
|
22665
|
-
var
|
|
22666
|
-
var
|
|
22667
|
-
var ClineRuleFrontmatterSchema =
|
|
22668
|
-
description:
|
|
22936
|
+
var import_node_path145 = require("path");
|
|
22937
|
+
var import_mini79 = require("zod/mini");
|
|
22938
|
+
var ClineRuleFrontmatterSchema = import_mini79.z.object({
|
|
22939
|
+
description: import_mini79.z.string()
|
|
22669
22940
|
});
|
|
22670
22941
|
var ClineRule = class _ClineRule extends ToolRule {
|
|
22671
22942
|
static getSettablePaths(_options = {}) {
|
|
@@ -22708,7 +22979,7 @@ var ClineRule = class _ClineRule extends ToolRule {
|
|
|
22708
22979
|
validate = true
|
|
22709
22980
|
}) {
|
|
22710
22981
|
const fileContent = await readFileContent(
|
|
22711
|
-
(0,
|
|
22982
|
+
(0, import_node_path145.join)(outputRoot, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
|
|
22712
22983
|
);
|
|
22713
22984
|
return new _ClineRule({
|
|
22714
22985
|
outputRoot,
|
|
@@ -22734,7 +23005,7 @@ var ClineRule = class _ClineRule extends ToolRule {
|
|
|
22734
23005
|
};
|
|
22735
23006
|
|
|
22736
23007
|
// src/features/rules/codexcli-rule.ts
|
|
22737
|
-
var
|
|
23008
|
+
var import_node_path146 = require("path");
|
|
22738
23009
|
var CodexcliRule = class _CodexcliRule extends ToolRule {
|
|
22739
23010
|
static getSettablePaths({
|
|
22740
23011
|
global,
|
|
@@ -22769,7 +23040,7 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
|
|
|
22769
23040
|
if (isRoot) {
|
|
22770
23041
|
const relativePath2 = paths.root.relativeFilePath;
|
|
22771
23042
|
const fileContent2 = await readFileContent(
|
|
22772
|
-
(0,
|
|
23043
|
+
(0, import_node_path146.join)(outputRoot, paths.root.relativeDirPath, relativePath2)
|
|
22773
23044
|
);
|
|
22774
23045
|
return new _CodexcliRule({
|
|
22775
23046
|
outputRoot,
|
|
@@ -22783,8 +23054,8 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
|
|
|
22783
23054
|
if (!paths.nonRoot) {
|
|
22784
23055
|
throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
|
|
22785
23056
|
}
|
|
22786
|
-
const relativePath = (0,
|
|
22787
|
-
const fileContent = await readFileContent((0,
|
|
23057
|
+
const relativePath = (0, import_node_path146.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
|
|
23058
|
+
const fileContent = await readFileContent((0, import_node_path146.join)(outputRoot, relativePath));
|
|
22788
23059
|
return new _CodexcliRule({
|
|
22789
23060
|
outputRoot,
|
|
22790
23061
|
relativeDirPath: paths.nonRoot.relativeDirPath,
|
|
@@ -22843,15 +23114,15 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
|
|
|
22843
23114
|
};
|
|
22844
23115
|
|
|
22845
23116
|
// src/features/rules/copilot-rule.ts
|
|
22846
|
-
var
|
|
22847
|
-
var
|
|
22848
|
-
var CopilotRuleFrontmatterSchema =
|
|
22849
|
-
description:
|
|
22850
|
-
applyTo:
|
|
22851
|
-
excludeAgent:
|
|
23117
|
+
var import_node_path147 = require("path");
|
|
23118
|
+
var import_mini80 = require("zod/mini");
|
|
23119
|
+
var CopilotRuleFrontmatterSchema = import_mini80.z.object({
|
|
23120
|
+
description: import_mini80.z.optional(import_mini80.z.string()),
|
|
23121
|
+
applyTo: import_mini80.z.optional(import_mini80.z.string()),
|
|
23122
|
+
excludeAgent: import_mini80.z.optional(import_mini80.z.union([import_mini80.z.literal("code-review"), import_mini80.z.literal("coding-agent")]))
|
|
22852
23123
|
});
|
|
22853
23124
|
var normalizeRelativePath = (p) => toPosixPath(p).replace(/\/+/g, "/");
|
|
22854
|
-
var sameRelativePath = (left, right) => normalizeRelativePath((0,
|
|
23125
|
+
var sameRelativePath = (left, right) => normalizeRelativePath((0, import_node_path147.join)(left.dir, left.file)) === normalizeRelativePath((0, import_node_path147.join)(right.dir, right.file));
|
|
22855
23126
|
var CopilotRule = class _CopilotRule extends ToolRule {
|
|
22856
23127
|
frontmatter;
|
|
22857
23128
|
body;
|
|
@@ -22882,7 +23153,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
|
|
|
22882
23153
|
const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
|
|
22883
23154
|
if (!result.success) {
|
|
22884
23155
|
throw new Error(
|
|
22885
|
-
`Invalid frontmatter in ${(0,
|
|
23156
|
+
`Invalid frontmatter in ${(0, import_node_path147.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
|
|
22886
23157
|
);
|
|
22887
23158
|
}
|
|
22888
23159
|
}
|
|
@@ -22975,8 +23246,8 @@ var CopilotRule = class _CopilotRule extends ToolRule {
|
|
|
22975
23246
|
) : relativeFilePath === paths.root.relativeFilePath;
|
|
22976
23247
|
const resolvedRelativeDirPath = relativeDirPath ?? (isRoot ? paths.root.relativeDirPath : paths.nonRoot?.relativeDirPath ?? paths.root.relativeDirPath);
|
|
22977
23248
|
if (isRoot) {
|
|
22978
|
-
const relativePath2 = (0,
|
|
22979
|
-
const filePath2 = (0,
|
|
23249
|
+
const relativePath2 = (0, import_node_path147.join)(paths.root.relativeDirPath, paths.root.relativeFilePath);
|
|
23250
|
+
const filePath2 = (0, import_node_path147.join)(outputRoot, relativePath2);
|
|
22980
23251
|
const fileContent2 = await readFileContent(filePath2);
|
|
22981
23252
|
return new _CopilotRule({
|
|
22982
23253
|
outputRoot,
|
|
@@ -22991,8 +23262,8 @@ var CopilotRule = class _CopilotRule extends ToolRule {
|
|
|
22991
23262
|
if (!paths.nonRoot) {
|
|
22992
23263
|
throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
|
|
22993
23264
|
}
|
|
22994
|
-
const relativePath = (0,
|
|
22995
|
-
const filePath = (0,
|
|
23265
|
+
const relativePath = (0, import_node_path147.join)(resolvedRelativeDirPath, relativeFilePath);
|
|
23266
|
+
const filePath = (0, import_node_path147.join)(outputRoot, relativePath);
|
|
22996
23267
|
const fileContent = await readFileContent(filePath);
|
|
22997
23268
|
const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
|
|
22998
23269
|
const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
|
|
@@ -23041,7 +23312,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
|
|
|
23041
23312
|
return {
|
|
23042
23313
|
success: false,
|
|
23043
23314
|
error: new Error(
|
|
23044
|
-
`Invalid frontmatter in ${(0,
|
|
23315
|
+
`Invalid frontmatter in ${(0, import_node_path147.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
|
|
23045
23316
|
)
|
|
23046
23317
|
};
|
|
23047
23318
|
}
|
|
@@ -23097,12 +23368,12 @@ var CopilotcliRule = class _CopilotcliRule extends CopilotRule {
|
|
|
23097
23368
|
};
|
|
23098
23369
|
|
|
23099
23370
|
// src/features/rules/cursor-rule.ts
|
|
23100
|
-
var
|
|
23101
|
-
var
|
|
23102
|
-
var CursorRuleFrontmatterSchema =
|
|
23103
|
-
description:
|
|
23104
|
-
globs:
|
|
23105
|
-
alwaysApply:
|
|
23371
|
+
var import_node_path148 = require("path");
|
|
23372
|
+
var import_mini81 = require("zod/mini");
|
|
23373
|
+
var CursorRuleFrontmatterSchema = import_mini81.z.object({
|
|
23374
|
+
description: import_mini81.z.optional(import_mini81.z.string()),
|
|
23375
|
+
globs: import_mini81.z.optional(import_mini81.z.string()),
|
|
23376
|
+
alwaysApply: import_mini81.z.optional(import_mini81.z.boolean())
|
|
23106
23377
|
});
|
|
23107
23378
|
var CursorRule = class _CursorRule extends ToolRule {
|
|
23108
23379
|
frontmatter;
|
|
@@ -23119,7 +23390,7 @@ var CursorRule = class _CursorRule extends ToolRule {
|
|
|
23119
23390
|
const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
|
|
23120
23391
|
if (!result.success) {
|
|
23121
23392
|
throw new Error(
|
|
23122
|
-
`Invalid frontmatter in ${(0,
|
|
23393
|
+
`Invalid frontmatter in ${(0, import_node_path148.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
|
|
23123
23394
|
);
|
|
23124
23395
|
}
|
|
23125
23396
|
}
|
|
@@ -23235,7 +23506,7 @@ var CursorRule = class _CursorRule extends ToolRule {
|
|
|
23235
23506
|
relativeFilePath,
|
|
23236
23507
|
validate = true
|
|
23237
23508
|
}) {
|
|
23238
|
-
const filePath = (0,
|
|
23509
|
+
const filePath = (0, import_node_path148.join)(
|
|
23239
23510
|
outputRoot,
|
|
23240
23511
|
this.getSettablePaths().nonRoot.relativeDirPath,
|
|
23241
23512
|
relativeFilePath
|
|
@@ -23245,7 +23516,7 @@ var CursorRule = class _CursorRule extends ToolRule {
|
|
|
23245
23516
|
const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
|
|
23246
23517
|
if (!result.success) {
|
|
23247
23518
|
throw new Error(
|
|
23248
|
-
`Invalid frontmatter in ${(0,
|
|
23519
|
+
`Invalid frontmatter in ${(0, import_node_path148.join)(outputRoot, relativeFilePath)}: ${formatError(result.error)}`
|
|
23249
23520
|
);
|
|
23250
23521
|
}
|
|
23251
23522
|
return new _CursorRule({
|
|
@@ -23282,7 +23553,7 @@ var CursorRule = class _CursorRule extends ToolRule {
|
|
|
23282
23553
|
return {
|
|
23283
23554
|
success: false,
|
|
23284
23555
|
error: new Error(
|
|
23285
|
-
`Invalid frontmatter in ${(0,
|
|
23556
|
+
`Invalid frontmatter in ${(0, import_node_path148.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
|
|
23286
23557
|
)
|
|
23287
23558
|
};
|
|
23288
23559
|
}
|
|
@@ -23302,7 +23573,7 @@ var CursorRule = class _CursorRule extends ToolRule {
|
|
|
23302
23573
|
};
|
|
23303
23574
|
|
|
23304
23575
|
// src/features/rules/deepagents-rule.ts
|
|
23305
|
-
var
|
|
23576
|
+
var import_node_path149 = require("path");
|
|
23306
23577
|
var DeepagentsRule = class _DeepagentsRule extends ToolRule {
|
|
23307
23578
|
constructor({ fileContent, root, ...rest }) {
|
|
23308
23579
|
super({
|
|
@@ -23329,8 +23600,8 @@ var DeepagentsRule = class _DeepagentsRule extends ToolRule {
|
|
|
23329
23600
|
}) {
|
|
23330
23601
|
const settablePaths = this.getSettablePaths();
|
|
23331
23602
|
const isRoot = relativeFilePath === "AGENTS.md";
|
|
23332
|
-
const relativePath = isRoot ? (0,
|
|
23333
|
-
const fileContent = await readFileContent((0,
|
|
23603
|
+
const relativePath = isRoot ? (0, import_node_path149.join)(".deepagents", "AGENTS.md") : (0, import_node_path149.join)(".deepagents", "memories", relativeFilePath);
|
|
23604
|
+
const fileContent = await readFileContent((0, import_node_path149.join)(outputRoot, relativePath));
|
|
23334
23605
|
return new _DeepagentsRule({
|
|
23335
23606
|
outputRoot,
|
|
23336
23607
|
relativeDirPath: isRoot ? settablePaths.root.relativeDirPath : settablePaths.nonRoot.relativeDirPath,
|
|
@@ -23385,7 +23656,7 @@ var DeepagentsRule = class _DeepagentsRule extends ToolRule {
|
|
|
23385
23656
|
};
|
|
23386
23657
|
|
|
23387
23658
|
// src/features/rules/factorydroid-rule.ts
|
|
23388
|
-
var
|
|
23659
|
+
var import_node_path150 = require("path");
|
|
23389
23660
|
var FactorydroidRule = class _FactorydroidRule extends ToolRule {
|
|
23390
23661
|
constructor({ fileContent, root, ...rest }) {
|
|
23391
23662
|
super({
|
|
@@ -23425,8 +23696,8 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
|
|
|
23425
23696
|
const paths = this.getSettablePaths({ global });
|
|
23426
23697
|
const isRoot = relativeFilePath === paths.root.relativeFilePath;
|
|
23427
23698
|
if (isRoot) {
|
|
23428
|
-
const relativePath2 = (0,
|
|
23429
|
-
const fileContent2 = await readFileContent((0,
|
|
23699
|
+
const relativePath2 = (0, import_node_path150.join)(paths.root.relativeDirPath, paths.root.relativeFilePath);
|
|
23700
|
+
const fileContent2 = await readFileContent((0, import_node_path150.join)(outputRoot, relativePath2));
|
|
23430
23701
|
return new _FactorydroidRule({
|
|
23431
23702
|
outputRoot,
|
|
23432
23703
|
relativeDirPath: paths.root.relativeDirPath,
|
|
@@ -23439,8 +23710,8 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
|
|
|
23439
23710
|
if (!paths.nonRoot) {
|
|
23440
23711
|
throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
|
|
23441
23712
|
}
|
|
23442
|
-
const relativePath = (0,
|
|
23443
|
-
const fileContent = await readFileContent((0,
|
|
23713
|
+
const relativePath = (0, import_node_path150.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
|
|
23714
|
+
const fileContent = await readFileContent((0, import_node_path150.join)(outputRoot, relativePath));
|
|
23444
23715
|
return new _FactorydroidRule({
|
|
23445
23716
|
outputRoot,
|
|
23446
23717
|
relativeDirPath: paths.nonRoot.relativeDirPath,
|
|
@@ -23499,7 +23770,7 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
|
|
|
23499
23770
|
};
|
|
23500
23771
|
|
|
23501
23772
|
// src/features/rules/geminicli-rule.ts
|
|
23502
|
-
var
|
|
23773
|
+
var import_node_path151 = require("path");
|
|
23503
23774
|
var GeminiCliRule = class _GeminiCliRule extends ToolRule {
|
|
23504
23775
|
static getSettablePaths({
|
|
23505
23776
|
global,
|
|
@@ -23534,7 +23805,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
|
|
|
23534
23805
|
if (isRoot) {
|
|
23535
23806
|
const relativePath2 = paths.root.relativeFilePath;
|
|
23536
23807
|
const fileContent2 = await readFileContent(
|
|
23537
|
-
(0,
|
|
23808
|
+
(0, import_node_path151.join)(outputRoot, paths.root.relativeDirPath, relativePath2)
|
|
23538
23809
|
);
|
|
23539
23810
|
return new _GeminiCliRule({
|
|
23540
23811
|
outputRoot,
|
|
@@ -23548,8 +23819,8 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
|
|
|
23548
23819
|
if (!paths.nonRoot) {
|
|
23549
23820
|
throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
|
|
23550
23821
|
}
|
|
23551
|
-
const relativePath = (0,
|
|
23552
|
-
const fileContent = await readFileContent((0,
|
|
23822
|
+
const relativePath = (0, import_node_path151.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
|
|
23823
|
+
const fileContent = await readFileContent((0, import_node_path151.join)(outputRoot, relativePath));
|
|
23553
23824
|
return new _GeminiCliRule({
|
|
23554
23825
|
outputRoot,
|
|
23555
23826
|
relativeDirPath: paths.nonRoot.relativeDirPath,
|
|
@@ -23608,7 +23879,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
|
|
|
23608
23879
|
};
|
|
23609
23880
|
|
|
23610
23881
|
// src/features/rules/goose-rule.ts
|
|
23611
|
-
var
|
|
23882
|
+
var import_node_path152 = require("path");
|
|
23612
23883
|
var GooseRule = class _GooseRule extends ToolRule {
|
|
23613
23884
|
static getSettablePaths({
|
|
23614
23885
|
global,
|
|
@@ -23643,7 +23914,7 @@ var GooseRule = class _GooseRule extends ToolRule {
|
|
|
23643
23914
|
if (isRoot) {
|
|
23644
23915
|
const relativePath2 = paths.root.relativeFilePath;
|
|
23645
23916
|
const fileContent2 = await readFileContent(
|
|
23646
|
-
(0,
|
|
23917
|
+
(0, import_node_path152.join)(outputRoot, paths.root.relativeDirPath, relativePath2)
|
|
23647
23918
|
);
|
|
23648
23919
|
return new _GooseRule({
|
|
23649
23920
|
outputRoot,
|
|
@@ -23657,8 +23928,8 @@ var GooseRule = class _GooseRule extends ToolRule {
|
|
|
23657
23928
|
if (!paths.nonRoot) {
|
|
23658
23929
|
throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
|
|
23659
23930
|
}
|
|
23660
|
-
const relativePath = (0,
|
|
23661
|
-
const fileContent = await readFileContent((0,
|
|
23931
|
+
const relativePath = (0, import_node_path152.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
|
|
23932
|
+
const fileContent = await readFileContent((0, import_node_path152.join)(outputRoot, relativePath));
|
|
23662
23933
|
return new _GooseRule({
|
|
23663
23934
|
outputRoot,
|
|
23664
23935
|
relativeDirPath: paths.nonRoot.relativeDirPath,
|
|
@@ -23717,7 +23988,7 @@ var GooseRule = class _GooseRule extends ToolRule {
|
|
|
23717
23988
|
};
|
|
23718
23989
|
|
|
23719
23990
|
// src/features/rules/junie-rule.ts
|
|
23720
|
-
var
|
|
23991
|
+
var import_node_path153 = require("path");
|
|
23721
23992
|
var JunieRule = class _JunieRule extends ToolRule {
|
|
23722
23993
|
static getSettablePaths(_options = {}) {
|
|
23723
23994
|
return {
|
|
@@ -23746,8 +24017,8 @@ var JunieRule = class _JunieRule extends ToolRule {
|
|
|
23746
24017
|
}) {
|
|
23747
24018
|
const isRoot = _JunieRule.isRootRelativeFilePath(relativeFilePath);
|
|
23748
24019
|
const settablePaths = this.getSettablePaths();
|
|
23749
|
-
const relativePath = isRoot ? (0,
|
|
23750
|
-
const fileContent = await readFileContent((0,
|
|
24020
|
+
const relativePath = isRoot ? (0, import_node_path153.join)(settablePaths.root.relativeDirPath, settablePaths.root.relativeFilePath) : (0, import_node_path153.join)(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
|
|
24021
|
+
const fileContent = await readFileContent((0, import_node_path153.join)(outputRoot, relativePath));
|
|
23751
24022
|
return new _JunieRule({
|
|
23752
24023
|
outputRoot,
|
|
23753
24024
|
relativeDirPath: isRoot ? settablePaths.root.relativeDirPath : settablePaths.nonRoot.relativeDirPath,
|
|
@@ -23802,7 +24073,7 @@ var JunieRule = class _JunieRule extends ToolRule {
|
|
|
23802
24073
|
};
|
|
23803
24074
|
|
|
23804
24075
|
// src/features/rules/kilo-rule.ts
|
|
23805
|
-
var
|
|
24076
|
+
var import_node_path154 = require("path");
|
|
23806
24077
|
var KiloRule = class _KiloRule extends ToolRule {
|
|
23807
24078
|
static getSettablePaths({
|
|
23808
24079
|
global,
|
|
@@ -23837,7 +24108,7 @@ var KiloRule = class _KiloRule extends ToolRule {
|
|
|
23837
24108
|
if (isRoot) {
|
|
23838
24109
|
const relativePath2 = paths.root.relativeFilePath;
|
|
23839
24110
|
const fileContent2 = await readFileContent(
|
|
23840
|
-
(0,
|
|
24111
|
+
(0, import_node_path154.join)(outputRoot, paths.root.relativeDirPath, relativePath2)
|
|
23841
24112
|
);
|
|
23842
24113
|
return new _KiloRule({
|
|
23843
24114
|
outputRoot,
|
|
@@ -23851,8 +24122,8 @@ var KiloRule = class _KiloRule extends ToolRule {
|
|
|
23851
24122
|
if (!paths.nonRoot) {
|
|
23852
24123
|
throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
|
|
23853
24124
|
}
|
|
23854
|
-
const relativePath = (0,
|
|
23855
|
-
const fileContent = await readFileContent((0,
|
|
24125
|
+
const relativePath = (0, import_node_path154.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
|
|
24126
|
+
const fileContent = await readFileContent((0, import_node_path154.join)(outputRoot, relativePath));
|
|
23856
24127
|
return new _KiloRule({
|
|
23857
24128
|
outputRoot,
|
|
23858
24129
|
relativeDirPath: paths.nonRoot.relativeDirPath,
|
|
@@ -23911,7 +24182,7 @@ var KiloRule = class _KiloRule extends ToolRule {
|
|
|
23911
24182
|
};
|
|
23912
24183
|
|
|
23913
24184
|
// src/features/rules/kiro-rule.ts
|
|
23914
|
-
var
|
|
24185
|
+
var import_node_path155 = require("path");
|
|
23915
24186
|
var KiroRule = class _KiroRule extends ToolRule {
|
|
23916
24187
|
static getSettablePaths(_options = {}) {
|
|
23917
24188
|
return {
|
|
@@ -23926,7 +24197,7 @@ var KiroRule = class _KiroRule extends ToolRule {
|
|
|
23926
24197
|
validate = true
|
|
23927
24198
|
}) {
|
|
23928
24199
|
const fileContent = await readFileContent(
|
|
23929
|
-
(0,
|
|
24200
|
+
(0, import_node_path155.join)(outputRoot, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
|
|
23930
24201
|
);
|
|
23931
24202
|
return new _KiroRule({
|
|
23932
24203
|
outputRoot,
|
|
@@ -23980,7 +24251,7 @@ var KiroRule = class _KiroRule extends ToolRule {
|
|
|
23980
24251
|
};
|
|
23981
24252
|
|
|
23982
24253
|
// src/features/rules/opencode-rule.ts
|
|
23983
|
-
var
|
|
24254
|
+
var import_node_path156 = require("path");
|
|
23984
24255
|
var OpenCodeRule = class _OpenCodeRule extends ToolRule {
|
|
23985
24256
|
static getSettablePaths({
|
|
23986
24257
|
global,
|
|
@@ -24015,7 +24286,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
|
|
|
24015
24286
|
if (isRoot) {
|
|
24016
24287
|
const relativePath2 = paths.root.relativeFilePath;
|
|
24017
24288
|
const fileContent2 = await readFileContent(
|
|
24018
|
-
(0,
|
|
24289
|
+
(0, import_node_path156.join)(outputRoot, paths.root.relativeDirPath, relativePath2)
|
|
24019
24290
|
);
|
|
24020
24291
|
return new _OpenCodeRule({
|
|
24021
24292
|
outputRoot,
|
|
@@ -24029,8 +24300,8 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
|
|
|
24029
24300
|
if (!paths.nonRoot) {
|
|
24030
24301
|
throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
|
|
24031
24302
|
}
|
|
24032
|
-
const relativePath = (0,
|
|
24033
|
-
const fileContent = await readFileContent((0,
|
|
24303
|
+
const relativePath = (0, import_node_path156.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
|
|
24304
|
+
const fileContent = await readFileContent((0, import_node_path156.join)(outputRoot, relativePath));
|
|
24034
24305
|
return new _OpenCodeRule({
|
|
24035
24306
|
outputRoot,
|
|
24036
24307
|
relativeDirPath: paths.nonRoot.relativeDirPath,
|
|
@@ -24089,7 +24360,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
|
|
|
24089
24360
|
};
|
|
24090
24361
|
|
|
24091
24362
|
// src/features/rules/pi-rule.ts
|
|
24092
|
-
var
|
|
24363
|
+
var import_node_path157 = require("path");
|
|
24093
24364
|
var PiRule = class _PiRule extends ToolRule {
|
|
24094
24365
|
static getSettablePaths({
|
|
24095
24366
|
global,
|
|
@@ -24123,7 +24394,7 @@ var PiRule = class _PiRule extends ToolRule {
|
|
|
24123
24394
|
const isRoot = relativeFilePath === paths.root.relativeFilePath;
|
|
24124
24395
|
if (isRoot) {
|
|
24125
24396
|
const fileContent2 = await readFileContent(
|
|
24126
|
-
(0,
|
|
24397
|
+
(0, import_node_path157.join)(outputRoot, paths.root.relativeDirPath, paths.root.relativeFilePath)
|
|
24127
24398
|
);
|
|
24128
24399
|
return new _PiRule({
|
|
24129
24400
|
outputRoot,
|
|
@@ -24139,8 +24410,8 @@ var PiRule = class _PiRule extends ToolRule {
|
|
|
24139
24410
|
`PiRule does not support non-root rules in global mode; expected '${paths.root.relativeFilePath}' but got '${relativeFilePath}'`
|
|
24140
24411
|
);
|
|
24141
24412
|
}
|
|
24142
|
-
const relativePath = (0,
|
|
24143
|
-
const fileContent = await readFileContent((0,
|
|
24413
|
+
const relativePath = (0, import_node_path157.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
|
|
24414
|
+
const fileContent = await readFileContent((0, import_node_path157.join)(outputRoot, relativePath));
|
|
24144
24415
|
return new _PiRule({
|
|
24145
24416
|
outputRoot,
|
|
24146
24417
|
relativeDirPath: paths.nonRoot.relativeDirPath,
|
|
@@ -24204,7 +24475,7 @@ var PiRule = class _PiRule extends ToolRule {
|
|
|
24204
24475
|
};
|
|
24205
24476
|
|
|
24206
24477
|
// src/features/rules/qwencode-rule.ts
|
|
24207
|
-
var
|
|
24478
|
+
var import_node_path158 = require("path");
|
|
24208
24479
|
var QwencodeRule = class _QwencodeRule extends ToolRule {
|
|
24209
24480
|
static getSettablePaths(_options = {}) {
|
|
24210
24481
|
return {
|
|
@@ -24223,8 +24494,8 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
|
|
|
24223
24494
|
validate = true
|
|
24224
24495
|
}) {
|
|
24225
24496
|
const isRoot = relativeFilePath === "QWEN.md";
|
|
24226
|
-
const relativePath = isRoot ? "QWEN.md" : (0,
|
|
24227
|
-
const fileContent = await readFileContent((0,
|
|
24497
|
+
const relativePath = isRoot ? "QWEN.md" : (0, import_node_path158.join)(".qwen", "memories", relativeFilePath);
|
|
24498
|
+
const fileContent = await readFileContent((0, import_node_path158.join)(outputRoot, relativePath));
|
|
24228
24499
|
return new _QwencodeRule({
|
|
24229
24500
|
outputRoot,
|
|
24230
24501
|
relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
|
|
@@ -24276,7 +24547,7 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
|
|
|
24276
24547
|
};
|
|
24277
24548
|
|
|
24278
24549
|
// src/features/rules/replit-rule.ts
|
|
24279
|
-
var
|
|
24550
|
+
var import_node_path159 = require("path");
|
|
24280
24551
|
var ReplitRule = class _ReplitRule extends ToolRule {
|
|
24281
24552
|
static getSettablePaths(_options = {}) {
|
|
24282
24553
|
return {
|
|
@@ -24298,7 +24569,7 @@ var ReplitRule = class _ReplitRule extends ToolRule {
|
|
|
24298
24569
|
}
|
|
24299
24570
|
const relativePath = paths.root.relativeFilePath;
|
|
24300
24571
|
const fileContent = await readFileContent(
|
|
24301
|
-
(0,
|
|
24572
|
+
(0, import_node_path159.join)(outputRoot, paths.root.relativeDirPath, relativePath)
|
|
24302
24573
|
);
|
|
24303
24574
|
return new _ReplitRule({
|
|
24304
24575
|
outputRoot,
|
|
@@ -24364,7 +24635,7 @@ var ReplitRule = class _ReplitRule extends ToolRule {
|
|
|
24364
24635
|
};
|
|
24365
24636
|
|
|
24366
24637
|
// src/features/rules/roo-rule.ts
|
|
24367
|
-
var
|
|
24638
|
+
var import_node_path160 = require("path");
|
|
24368
24639
|
var RooRule = class _RooRule extends ToolRule {
|
|
24369
24640
|
static getSettablePaths(_options = {}) {
|
|
24370
24641
|
return {
|
|
@@ -24379,7 +24650,7 @@ var RooRule = class _RooRule extends ToolRule {
|
|
|
24379
24650
|
validate = true
|
|
24380
24651
|
}) {
|
|
24381
24652
|
const fileContent = await readFileContent(
|
|
24382
|
-
(0,
|
|
24653
|
+
(0, import_node_path160.join)(outputRoot, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
|
|
24383
24654
|
);
|
|
24384
24655
|
return new _RooRule({
|
|
24385
24656
|
outputRoot,
|
|
@@ -24448,7 +24719,7 @@ var RooRule = class _RooRule extends ToolRule {
|
|
|
24448
24719
|
};
|
|
24449
24720
|
|
|
24450
24721
|
// src/features/rules/rovodev-rule.ts
|
|
24451
|
-
var
|
|
24722
|
+
var import_node_path161 = require("path");
|
|
24452
24723
|
var DISALLOWED_ROVODEV_MODULAR_RULE_BASENAMES = /* @__PURE__ */ new Set(["agents.md", "agents.local.md"]);
|
|
24453
24724
|
var RovodevRule = class _RovodevRule extends ToolRule {
|
|
24454
24725
|
/**
|
|
@@ -24492,7 +24763,7 @@ var RovodevRule = class _RovodevRule extends ToolRule {
|
|
|
24492
24763
|
root: rovodevAgents,
|
|
24493
24764
|
alternativeRoots: [{ relativeDirPath: ".", relativeFilePath: "AGENTS.md" }],
|
|
24494
24765
|
nonRoot: {
|
|
24495
|
-
relativeDirPath: (0,
|
|
24766
|
+
relativeDirPath: (0, import_node_path161.join)(".rovodev", ".rulesync", "modular-rules")
|
|
24496
24767
|
}
|
|
24497
24768
|
};
|
|
24498
24769
|
}
|
|
@@ -24531,10 +24802,10 @@ var RovodevRule = class _RovodevRule extends ToolRule {
|
|
|
24531
24802
|
}) {
|
|
24532
24803
|
if (!this.isAllowedModularRulesRelativePath(relativeFilePath)) {
|
|
24533
24804
|
throw new Error(
|
|
24534
|
-
`Reserved Rovodev memory basename under modular-rules (not a modular rule): ${(0,
|
|
24805
|
+
`Reserved Rovodev memory basename under modular-rules (not a modular rule): ${(0, import_node_path161.join)(relativeDirPath, relativeFilePath)}`
|
|
24535
24806
|
);
|
|
24536
24807
|
}
|
|
24537
|
-
const fileContent = await readFileContent((0,
|
|
24808
|
+
const fileContent = await readFileContent((0, import_node_path161.join)(outputRoot, relativeDirPath, relativeFilePath));
|
|
24538
24809
|
return new _RovodevRule({
|
|
24539
24810
|
outputRoot,
|
|
24540
24811
|
relativeDirPath,
|
|
@@ -24554,10 +24825,10 @@ var RovodevRule = class _RovodevRule extends ToolRule {
|
|
|
24554
24825
|
paths
|
|
24555
24826
|
}) {
|
|
24556
24827
|
const relativeDirPath = overrideDirPath ?? paths.root.relativeDirPath;
|
|
24557
|
-
const agentsMdExpectedLocationsDescription = "alternativeRoots" in paths && paths.alternativeRoots && paths.alternativeRoots.length > 0 ? `${(0,
|
|
24828
|
+
const agentsMdExpectedLocationsDescription = "alternativeRoots" in paths && paths.alternativeRoots && paths.alternativeRoots.length > 0 ? `${(0, import_node_path161.join)(paths.root.relativeDirPath, paths.root.relativeFilePath)} or project root` : (0, import_node_path161.join)(paths.root.relativeDirPath, paths.root.relativeFilePath);
|
|
24558
24829
|
if (relativeFilePath !== "AGENTS.md") {
|
|
24559
24830
|
throw new Error(
|
|
24560
|
-
`Rovodev rules support only AGENTS.md at ${agentsMdExpectedLocationsDescription}, got: ${(0,
|
|
24831
|
+
`Rovodev rules support only AGENTS.md at ${agentsMdExpectedLocationsDescription}, got: ${(0, import_node_path161.join)(relativeDirPath, relativeFilePath)}`
|
|
24561
24832
|
);
|
|
24562
24833
|
}
|
|
24563
24834
|
const allowed = relativeDirPath === paths.root.relativeDirPath || "alternativeRoots" in paths && paths.alternativeRoots?.some(
|
|
@@ -24565,10 +24836,10 @@ var RovodevRule = class _RovodevRule extends ToolRule {
|
|
|
24565
24836
|
);
|
|
24566
24837
|
if (!allowed) {
|
|
24567
24838
|
throw new Error(
|
|
24568
|
-
`Rovodev AGENTS.md must be at ${agentsMdExpectedLocationsDescription}, got: ${(0,
|
|
24839
|
+
`Rovodev AGENTS.md must be at ${agentsMdExpectedLocationsDescription}, got: ${(0, import_node_path161.join)(relativeDirPath, relativeFilePath)}`
|
|
24569
24840
|
);
|
|
24570
24841
|
}
|
|
24571
|
-
const fileContent = await readFileContent((0,
|
|
24842
|
+
const fileContent = await readFileContent((0, import_node_path161.join)(outputRoot, relativeDirPath, relativeFilePath));
|
|
24572
24843
|
return new _RovodevRule({
|
|
24573
24844
|
outputRoot,
|
|
24574
24845
|
relativeDirPath,
|
|
@@ -24682,7 +24953,7 @@ var RovodevRule = class _RovodevRule extends ToolRule {
|
|
|
24682
24953
|
};
|
|
24683
24954
|
|
|
24684
24955
|
// src/features/rules/takt-rule.ts
|
|
24685
|
-
var
|
|
24956
|
+
var import_node_path162 = require("path");
|
|
24686
24957
|
var DEFAULT_TAKT_RULE_DIR = "policies";
|
|
24687
24958
|
var TaktRule = class _TaktRule extends ToolRule {
|
|
24688
24959
|
static getSettablePaths({
|
|
@@ -24694,7 +24965,7 @@ var TaktRule = class _TaktRule extends ToolRule {
|
|
|
24694
24965
|
root: {
|
|
24695
24966
|
relativeDirPath: buildToolPath(
|
|
24696
24967
|
".takt",
|
|
24697
|
-
(0,
|
|
24968
|
+
(0, import_node_path162.join)("facets", DEFAULT_TAKT_RULE_DIR),
|
|
24698
24969
|
excludeToolDir
|
|
24699
24970
|
),
|
|
24700
24971
|
relativeFilePath: "overview.md"
|
|
@@ -24705,7 +24976,7 @@ var TaktRule = class _TaktRule extends ToolRule {
|
|
|
24705
24976
|
nonRoot: {
|
|
24706
24977
|
relativeDirPath: buildToolPath(
|
|
24707
24978
|
".takt",
|
|
24708
|
-
(0,
|
|
24979
|
+
(0, import_node_path162.join)("facets", DEFAULT_TAKT_RULE_DIR),
|
|
24709
24980
|
excludeToolDir
|
|
24710
24981
|
)
|
|
24711
24982
|
}
|
|
@@ -24723,8 +24994,8 @@ var TaktRule = class _TaktRule extends ToolRule {
|
|
|
24723
24994
|
validate = true,
|
|
24724
24995
|
relativeDirPath: overrideDirPath
|
|
24725
24996
|
}) {
|
|
24726
|
-
const dirPath = overrideDirPath ?? (0,
|
|
24727
|
-
const filePath = (0,
|
|
24997
|
+
const dirPath = overrideDirPath ?? (0, import_node_path162.join)(".takt", "facets", DEFAULT_TAKT_RULE_DIR);
|
|
24998
|
+
const filePath = (0, import_node_path162.join)(outputRoot, dirPath, relativeFilePath);
|
|
24728
24999
|
const fileContent = await readFileContent(filePath);
|
|
24729
25000
|
const { body } = parseFrontmatter(fileContent, filePath);
|
|
24730
25001
|
return new _TaktRule({
|
|
@@ -24763,7 +25034,7 @@ var TaktRule = class _TaktRule extends ToolRule {
|
|
|
24763
25034
|
const stem = overrideName ?? sourceStem;
|
|
24764
25035
|
assertSafeTaktName({ name: stem, featureLabel: "rule", sourceLabel });
|
|
24765
25036
|
const relativeFilePath = `${stem}.md`;
|
|
24766
|
-
const relativeDirPath = (0,
|
|
25037
|
+
const relativeDirPath = (0, import_node_path162.join)(".takt", "facets", DEFAULT_TAKT_RULE_DIR);
|
|
24767
25038
|
return new _TaktRule({
|
|
24768
25039
|
outputRoot,
|
|
24769
25040
|
relativeDirPath,
|
|
@@ -24788,7 +25059,7 @@ var TaktRule = class _TaktRule extends ToolRule {
|
|
|
24788
25059
|
};
|
|
24789
25060
|
|
|
24790
25061
|
// src/features/rules/warp-rule.ts
|
|
24791
|
-
var
|
|
25062
|
+
var import_node_path163 = require("path");
|
|
24792
25063
|
var WarpRule = class _WarpRule extends ToolRule {
|
|
24793
25064
|
constructor({ fileContent, root, ...rest }) {
|
|
24794
25065
|
super({
|
|
@@ -24814,8 +25085,8 @@ var WarpRule = class _WarpRule extends ToolRule {
|
|
|
24814
25085
|
validate = true
|
|
24815
25086
|
}) {
|
|
24816
25087
|
const isRoot = relativeFilePath === this.getSettablePaths().root.relativeFilePath;
|
|
24817
|
-
const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : (0,
|
|
24818
|
-
const fileContent = await readFileContent((0,
|
|
25088
|
+
const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : (0, import_node_path163.join)(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
|
|
25089
|
+
const fileContent = await readFileContent((0, import_node_path163.join)(outputRoot, relativePath));
|
|
24819
25090
|
return new _WarpRule({
|
|
24820
25091
|
outputRoot,
|
|
24821
25092
|
relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : ".warp",
|
|
@@ -24870,7 +25141,7 @@ var WarpRule = class _WarpRule extends ToolRule {
|
|
|
24870
25141
|
};
|
|
24871
25142
|
|
|
24872
25143
|
// src/features/rules/windsurf-rule.ts
|
|
24873
|
-
var
|
|
25144
|
+
var import_node_path164 = require("path");
|
|
24874
25145
|
var WindsurfRule = class _WindsurfRule extends ToolRule {
|
|
24875
25146
|
static getSettablePaths(_options = {}) {
|
|
24876
25147
|
return {
|
|
@@ -24885,7 +25156,7 @@ var WindsurfRule = class _WindsurfRule extends ToolRule {
|
|
|
24885
25156
|
validate = true
|
|
24886
25157
|
}) {
|
|
24887
25158
|
const fileContent = await readFileContent(
|
|
24888
|
-
(0,
|
|
25159
|
+
(0, import_node_path164.join)(outputRoot, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
|
|
24889
25160
|
);
|
|
24890
25161
|
return new _WindsurfRule({
|
|
24891
25162
|
outputRoot,
|
|
@@ -24955,6 +25226,107 @@ var WindsurfRule = class _WindsurfRule extends ToolRule {
|
|
|
24955
25226
|
}
|
|
24956
25227
|
};
|
|
24957
25228
|
|
|
25229
|
+
// src/features/rules/zed-rule.ts
|
|
25230
|
+
var import_node_path165 = require("path");
|
|
25231
|
+
var ZedRule = class _ZedRule extends ToolRule {
|
|
25232
|
+
static getSettablePaths({
|
|
25233
|
+
global,
|
|
25234
|
+
excludeToolDir
|
|
25235
|
+
} = {}) {
|
|
25236
|
+
if (global) {
|
|
25237
|
+
return {
|
|
25238
|
+
root: {
|
|
25239
|
+
relativeDirPath: buildToolPath((0, import_node_path165.join)(".config", "zed"), ".", excludeToolDir),
|
|
25240
|
+
relativeFilePath: "AGENTS.md"
|
|
25241
|
+
}
|
|
25242
|
+
};
|
|
25243
|
+
}
|
|
25244
|
+
return {
|
|
25245
|
+
root: {
|
|
25246
|
+
relativeDirPath: ".",
|
|
25247
|
+
relativeFilePath: ".rules"
|
|
25248
|
+
}
|
|
25249
|
+
};
|
|
25250
|
+
}
|
|
25251
|
+
static async fromFile({
|
|
25252
|
+
outputRoot = process.cwd(),
|
|
25253
|
+
relativeFilePath,
|
|
25254
|
+
validate = true,
|
|
25255
|
+
global = false
|
|
25256
|
+
}) {
|
|
25257
|
+
const paths = this.getSettablePaths({ global });
|
|
25258
|
+
const isRoot = relativeFilePath === paths.root.relativeFilePath;
|
|
25259
|
+
if (!isRoot) {
|
|
25260
|
+
throw new Error(`ZedRule only supports root rules: ${relativeFilePath}`);
|
|
25261
|
+
}
|
|
25262
|
+
const fileContent = await readFileContent(
|
|
25263
|
+
(0, import_node_path165.join)(outputRoot, paths.root.relativeDirPath, paths.root.relativeFilePath)
|
|
25264
|
+
);
|
|
25265
|
+
return new _ZedRule({
|
|
25266
|
+
outputRoot,
|
|
25267
|
+
relativeDirPath: paths.root.relativeDirPath,
|
|
25268
|
+
relativeFilePath: paths.root.relativeFilePath,
|
|
25269
|
+
fileContent,
|
|
25270
|
+
validate,
|
|
25271
|
+
root: true
|
|
25272
|
+
});
|
|
25273
|
+
}
|
|
25274
|
+
static fromRulesyncRule({
|
|
25275
|
+
outputRoot = process.cwd(),
|
|
25276
|
+
rulesyncRule,
|
|
25277
|
+
validate = true,
|
|
25278
|
+
global = false
|
|
25279
|
+
}) {
|
|
25280
|
+
const paths = this.getSettablePaths({ global });
|
|
25281
|
+
const isRoot = rulesyncRule.getFrontmatter().root ?? false;
|
|
25282
|
+
if (!isRoot) {
|
|
25283
|
+
throw new Error(`ZedRule only supports root rules: ${rulesyncRule.getRelativeFilePath()}`);
|
|
25284
|
+
}
|
|
25285
|
+
return new _ZedRule(
|
|
25286
|
+
this.buildToolRuleParamsDefault({
|
|
25287
|
+
outputRoot,
|
|
25288
|
+
rulesyncRule,
|
|
25289
|
+
validate,
|
|
25290
|
+
rootPath: paths.root,
|
|
25291
|
+
nonRootPath: void 0
|
|
25292
|
+
})
|
|
25293
|
+
);
|
|
25294
|
+
}
|
|
25295
|
+
toRulesyncRule() {
|
|
25296
|
+
return this.toRulesyncRuleDefault();
|
|
25297
|
+
}
|
|
25298
|
+
validate() {
|
|
25299
|
+
return { success: true, error: null };
|
|
25300
|
+
}
|
|
25301
|
+
static forDeletion({
|
|
25302
|
+
outputRoot = process.cwd(),
|
|
25303
|
+
relativeDirPath,
|
|
25304
|
+
relativeFilePath,
|
|
25305
|
+
global = false
|
|
25306
|
+
}) {
|
|
25307
|
+
const paths = this.getSettablePaths({ global });
|
|
25308
|
+
const isRoot = relativeFilePath === paths.root.relativeFilePath;
|
|
25309
|
+
return new _ZedRule({
|
|
25310
|
+
outputRoot,
|
|
25311
|
+
relativeDirPath,
|
|
25312
|
+
relativeFilePath,
|
|
25313
|
+
fileContent: "",
|
|
25314
|
+
validate: false,
|
|
25315
|
+
root: isRoot
|
|
25316
|
+
});
|
|
25317
|
+
}
|
|
25318
|
+
static isTargetedByRulesyncRule(rulesyncRule) {
|
|
25319
|
+
const isRoot = rulesyncRule.getFrontmatter().root ?? false;
|
|
25320
|
+
if (!isRoot) {
|
|
25321
|
+
return false;
|
|
25322
|
+
}
|
|
25323
|
+
return this.isTargetedByRulesyncRuleDefault({
|
|
25324
|
+
rulesyncRule,
|
|
25325
|
+
toolTarget: "zed"
|
|
25326
|
+
});
|
|
25327
|
+
}
|
|
25328
|
+
};
|
|
25329
|
+
|
|
24958
25330
|
// src/features/rules/rules-processor.ts
|
|
24959
25331
|
var rulesProcessorToolTargets = [
|
|
24960
25332
|
"agentsmd",
|
|
@@ -24985,13 +25357,14 @@ var rulesProcessorToolTargets = [
|
|
|
24985
25357
|
"rovodev",
|
|
24986
25358
|
"takt",
|
|
24987
25359
|
"warp",
|
|
24988
|
-
"windsurf"
|
|
25360
|
+
"windsurf",
|
|
25361
|
+
"zed"
|
|
24989
25362
|
];
|
|
24990
|
-
var RulesProcessorToolTargetSchema =
|
|
24991
|
-
var formatRulePaths = (rules) => rules.map((r) => (0,
|
|
24992
|
-
var RulesFeatureOptionsSchema =
|
|
24993
|
-
ruleDiscoveryMode:
|
|
24994
|
-
includeLocalRoot:
|
|
25363
|
+
var RulesProcessorToolTargetSchema = import_mini82.z.enum(rulesProcessorToolTargets);
|
|
25364
|
+
var formatRulePaths = (rules) => rules.map((r) => (0, import_node_path166.join)(r.getRelativeDirPath(), r.getRelativeFilePath())).join(", ");
|
|
25365
|
+
var RulesFeatureOptionsSchema = import_mini82.z.looseObject({
|
|
25366
|
+
ruleDiscoveryMode: import_mini82.z.optional(import_mini82.z.enum(["none", "explicit"])),
|
|
25367
|
+
includeLocalRoot: import_mini82.z.optional(import_mini82.z.boolean())
|
|
24995
25368
|
});
|
|
24996
25369
|
var resolveRuleDiscoveryMode = ({
|
|
24997
25370
|
defaultMode,
|
|
@@ -25012,8 +25385,8 @@ var resolveRuleDiscoveryMode = ({
|
|
|
25012
25385
|
}
|
|
25013
25386
|
return parsed.data.ruleDiscoveryMode === "none" ? "auto" : "toon";
|
|
25014
25387
|
};
|
|
25015
|
-
var IncludeLocalRootSchema =
|
|
25016
|
-
includeLocalRoot:
|
|
25388
|
+
var IncludeLocalRootSchema = import_mini82.z.looseObject({
|
|
25389
|
+
includeLocalRoot: import_mini82.z.optional(import_mini82.z.boolean())
|
|
25017
25390
|
});
|
|
25018
25391
|
var resolveIncludeLocalRoot = (options) => {
|
|
25019
25392
|
if (!options) return true;
|
|
@@ -25374,6 +25747,20 @@ var toolRuleFactories = /* @__PURE__ */ new Map([
|
|
|
25374
25747
|
// skills from .windsurf/skills/ and ~/.codeium/windsurf/skills/ directories.
|
|
25375
25748
|
}
|
|
25376
25749
|
}
|
|
25750
|
+
],
|
|
25751
|
+
[
|
|
25752
|
+
"zed",
|
|
25753
|
+
{
|
|
25754
|
+
class: ZedRule,
|
|
25755
|
+
meta: {
|
|
25756
|
+
// Zed reads a single project rules file (`.rules`) and a single global
|
|
25757
|
+
// file (`~/.config/zed/AGENTS.md`). It is root-only with auto discovery,
|
|
25758
|
+
// so there is no non-root location to render a conventions block into.
|
|
25759
|
+
extension: "md",
|
|
25760
|
+
supportsGlobal: true,
|
|
25761
|
+
ruleDiscoveryMode: "auto"
|
|
25762
|
+
}
|
|
25763
|
+
}
|
|
25377
25764
|
]
|
|
25378
25765
|
]);
|
|
25379
25766
|
var rulesProcessorToolTargetsGlobal = Array.from(toolRuleFactories.entries()).filter(([_, factory]) => factory.meta.supportsGlobal).map(([target]) => target);
|
|
@@ -25510,7 +25897,7 @@ var RulesProcessor = class extends FeatureProcessor {
|
|
|
25510
25897
|
}).relativeDirPath;
|
|
25511
25898
|
return this.skills.filter((skill) => skillClass.isTargetedByRulesyncSkill(skill)).map((skill) => {
|
|
25512
25899
|
const frontmatter = skill.getFrontmatter();
|
|
25513
|
-
const relativePath = (0,
|
|
25900
|
+
const relativePath = (0, import_node_path166.join)(toolRelativeDirPath, skill.getDirName(), SKILL_FILE_NAME);
|
|
25514
25901
|
return {
|
|
25515
25902
|
name: frontmatter.name,
|
|
25516
25903
|
description: frontmatter.description,
|
|
@@ -25639,12 +26026,12 @@ var RulesProcessor = class extends FeatureProcessor {
|
|
|
25639
26026
|
* Load and parse rulesync rule files from .rulesync/rules/ directory
|
|
25640
26027
|
*/
|
|
25641
26028
|
async loadRulesyncFiles() {
|
|
25642
|
-
const rulesyncOutputRoot = (0,
|
|
25643
|
-
const files = await findFilesByGlobs((0,
|
|
26029
|
+
const rulesyncOutputRoot = (0, import_node_path166.join)(this.inputRoot, RULESYNC_RULES_RELATIVE_DIR_PATH);
|
|
26030
|
+
const files = await findFilesByGlobs((0, import_node_path166.join)(rulesyncOutputRoot, "**", "*.md"));
|
|
25644
26031
|
this.logger.debug(`Found ${files.length} rulesync files`);
|
|
25645
26032
|
const rulesyncRules = await Promise.all(
|
|
25646
26033
|
files.map((file) => {
|
|
25647
|
-
const relativeFilePath = (0,
|
|
26034
|
+
const relativeFilePath = (0, import_node_path166.relative)(rulesyncOutputRoot, file);
|
|
25648
26035
|
checkPathTraversal({
|
|
25649
26036
|
relativePath: relativeFilePath,
|
|
25650
26037
|
intendedRootDir: rulesyncOutputRoot
|
|
@@ -25720,7 +26107,7 @@ var RulesProcessor = class extends FeatureProcessor {
|
|
|
25720
26107
|
global: this.global
|
|
25721
26108
|
});
|
|
25722
26109
|
const resolveRelativeDirPath = (filePath) => {
|
|
25723
|
-
const dirName = (0,
|
|
26110
|
+
const dirName = (0, import_node_path166.dirname)((0, import_node_path166.relative)(this.outputRoot, filePath));
|
|
25724
26111
|
return dirName === "" ? "." : dirName;
|
|
25725
26112
|
};
|
|
25726
26113
|
const buildDeletionRulesFromPaths = (filePaths, opts) => {
|
|
@@ -25728,7 +26115,7 @@ var RulesProcessor = class extends FeatureProcessor {
|
|
|
25728
26115
|
const effectiveOutputRoot = isNonRoot ? opts.outputRootOverride : this.outputRoot;
|
|
25729
26116
|
return filePaths.map((filePath) => {
|
|
25730
26117
|
const relativeDirPath = isNonRoot ? opts.relativeDirPathOverride : resolveRelativeDirPath(filePath);
|
|
25731
|
-
const relativeFilePath = isNonRoot ? (0,
|
|
26118
|
+
const relativeFilePath = isNonRoot ? (0, import_node_path166.relative)(effectiveOutputRoot, filePath) : (0, import_node_path166.basename)(filePath);
|
|
25732
26119
|
checkPathTraversal({
|
|
25733
26120
|
relativePath: isNonRoot ? relativeFilePath : relativeDirPath,
|
|
25734
26121
|
intendedRootDir: effectiveOutputRoot
|
|
@@ -25756,13 +26143,13 @@ var RulesProcessor = class extends FeatureProcessor {
|
|
|
25756
26143
|
return [];
|
|
25757
26144
|
}
|
|
25758
26145
|
const uniqueRootFilePaths = await findFilesWithFallback(
|
|
25759
|
-
(0,
|
|
26146
|
+
(0, import_node_path166.join)(
|
|
25760
26147
|
this.outputRoot,
|
|
25761
26148
|
settablePaths.root.relativeDirPath ?? ".",
|
|
25762
26149
|
settablePaths.root.relativeFilePath
|
|
25763
26150
|
),
|
|
25764
26151
|
settablePaths.alternativeRoots,
|
|
25765
|
-
(alt) => (0,
|
|
26152
|
+
(alt) => (0, import_node_path166.join)(this.outputRoot, alt.relativeDirPath, alt.relativeFilePath)
|
|
25766
26153
|
);
|
|
25767
26154
|
if (forDeletion) {
|
|
25768
26155
|
return buildDeletionRulesFromPaths(uniqueRootFilePaths);
|
|
@@ -25776,7 +26163,7 @@ var RulesProcessor = class extends FeatureProcessor {
|
|
|
25776
26163
|
});
|
|
25777
26164
|
return factory.class.fromFile({
|
|
25778
26165
|
outputRoot: this.outputRoot,
|
|
25779
|
-
relativeFilePath: (0,
|
|
26166
|
+
relativeFilePath: (0, import_node_path166.basename)(filePath),
|
|
25780
26167
|
relativeDirPath,
|
|
25781
26168
|
global: this.global
|
|
25782
26169
|
});
|
|
@@ -25793,7 +26180,7 @@ var RulesProcessor = class extends FeatureProcessor {
|
|
|
25793
26180
|
return [];
|
|
25794
26181
|
}
|
|
25795
26182
|
const uniqueLocalRootFilePaths2 = await findFilesByGlobs(
|
|
25796
|
-
(0,
|
|
26183
|
+
(0, import_node_path166.join)(this.outputRoot, "AGENTS.local.md")
|
|
25797
26184
|
);
|
|
25798
26185
|
return buildDeletionRulesFromPaths(uniqueLocalRootFilePaths2);
|
|
25799
26186
|
}
|
|
@@ -25804,9 +26191,9 @@ var RulesProcessor = class extends FeatureProcessor {
|
|
|
25804
26191
|
return [];
|
|
25805
26192
|
}
|
|
25806
26193
|
const uniqueLocalRootFilePaths = await findFilesWithFallback(
|
|
25807
|
-
(0,
|
|
26194
|
+
(0, import_node_path166.join)(this.outputRoot, settablePaths.root.relativeDirPath ?? ".", "CLAUDE.local.md"),
|
|
25808
26195
|
settablePaths.alternativeRoots,
|
|
25809
|
-
(alt) => (0,
|
|
26196
|
+
(alt) => (0, import_node_path166.join)(this.outputRoot, alt.relativeDirPath, "CLAUDE.local.md")
|
|
25810
26197
|
);
|
|
25811
26198
|
return buildDeletionRulesFromPaths(uniqueLocalRootFilePaths);
|
|
25812
26199
|
})();
|
|
@@ -25817,20 +26204,20 @@ var RulesProcessor = class extends FeatureProcessor {
|
|
|
25817
26204
|
if (!forDeletion || this.toolTarget !== "rovodev" || this.global) {
|
|
25818
26205
|
return [];
|
|
25819
26206
|
}
|
|
25820
|
-
const primaryPaths = await findFilesByGlobs((0,
|
|
26207
|
+
const primaryPaths = await findFilesByGlobs((0, import_node_path166.join)(this.outputRoot, ".rovodev", "AGENTS.md"));
|
|
25821
26208
|
if (primaryPaths.length === 0) {
|
|
25822
26209
|
return [];
|
|
25823
26210
|
}
|
|
25824
|
-
const mirrorPaths = await findFilesByGlobs((0,
|
|
26211
|
+
const mirrorPaths = await findFilesByGlobs((0, import_node_path166.join)(this.outputRoot, "AGENTS.md"));
|
|
25825
26212
|
return buildDeletionRulesFromPaths(mirrorPaths);
|
|
25826
26213
|
})();
|
|
25827
26214
|
const nonRootToolRules = await (async () => {
|
|
25828
26215
|
if (!settablePaths.nonRoot) {
|
|
25829
26216
|
return [];
|
|
25830
26217
|
}
|
|
25831
|
-
const nonRootOutputRoot = (0,
|
|
26218
|
+
const nonRootOutputRoot = (0, import_node_path166.join)(this.outputRoot, settablePaths.nonRoot.relativeDirPath);
|
|
25832
26219
|
const nonRootFilePaths = await findFilesByGlobs(
|
|
25833
|
-
(0,
|
|
26220
|
+
(0, import_node_path166.join)(nonRootOutputRoot, "**", `*.${factory.meta.extension}`)
|
|
25834
26221
|
);
|
|
25835
26222
|
if (forDeletion) {
|
|
25836
26223
|
return buildDeletionRulesFromPaths(nonRootFilePaths, {
|
|
@@ -25840,18 +26227,18 @@ var RulesProcessor = class extends FeatureProcessor {
|
|
|
25840
26227
|
}
|
|
25841
26228
|
const modularRootRelative = settablePaths.nonRoot.relativeDirPath;
|
|
25842
26229
|
const nonRootPathsForImport = this.toolTarget === "rovodev" ? nonRootFilePaths.filter((filePath) => {
|
|
25843
|
-
const relativeFilePath = (0,
|
|
26230
|
+
const relativeFilePath = (0, import_node_path166.relative)(nonRootOutputRoot, filePath);
|
|
25844
26231
|
const ok = RovodevRule.isAllowedModularRulesRelativePath(relativeFilePath);
|
|
25845
26232
|
if (!ok) {
|
|
25846
26233
|
this.logger.warn(
|
|
25847
|
-
`Skipping reserved Rovodev path under modular-rules (import): ${(0,
|
|
26234
|
+
`Skipping reserved Rovodev path under modular-rules (import): ${(0, import_node_path166.join)(modularRootRelative, relativeFilePath)}`
|
|
25848
26235
|
);
|
|
25849
26236
|
}
|
|
25850
26237
|
return ok;
|
|
25851
26238
|
}) : nonRootFilePaths;
|
|
25852
26239
|
return await Promise.all(
|
|
25853
26240
|
nonRootPathsForImport.map((filePath) => {
|
|
25854
|
-
const relativeFilePath = (0,
|
|
26241
|
+
const relativeFilePath = (0, import_node_path166.relative)(nonRootOutputRoot, filePath);
|
|
25855
26242
|
checkPathTraversal({
|
|
25856
26243
|
relativePath: relativeFilePath,
|
|
25857
26244
|
intendedRootDir: nonRootOutputRoot
|
|
@@ -25970,14 +26357,14 @@ s/<command> [arguments]
|
|
|
25970
26357
|
This syntax employs a double slash (\`s/\`) to prevent conflicts with built-in slash commands.
|
|
25971
26358
|
The \`s\` in \`s/\` stands for *simulate*. Because custom slash commands are not built-in, this syntax provides a pseudo way to invoke them.
|
|
25972
26359
|
|
|
25973
|
-
When users call a custom slash command, you have to look for the markdown file, \`${(0,
|
|
26360
|
+
When users call a custom slash command, you have to look for the markdown file, \`${(0, import_node_path166.join)(RULESYNC_COMMANDS_RELATIVE_DIR_PATH, "{command}.md")}\`, then execute the contents of that file as the block of operations.` : "";
|
|
25974
26361
|
const subagentsSection = subagents ? `## Simulated Subagents
|
|
25975
26362
|
|
|
25976
26363
|
Simulated subagents are specialized AI assistants that can be invoked to handle specific types of tasks. In this case, it can be appear something like custom slash commands simply. Simulated subagents can be called by custom slash commands.
|
|
25977
26364
|
|
|
25978
|
-
When users call a simulated subagent, it will look for the corresponding markdown file, \`${(0,
|
|
26365
|
+
When users call a simulated subagent, it will look for the corresponding markdown file, \`${(0, import_node_path166.join)(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "{subagent}.md")}\`, and execute its contents as the block of operations.
|
|
25979
26366
|
|
|
25980
|
-
For example, if the user instructs \`Call planner subagent to plan the refactoring\`, you have to look for the markdown file, \`${(0,
|
|
26367
|
+
For example, if the user instructs \`Call planner subagent to plan the refactoring\`, you have to look for the markdown file, \`${(0, import_node_path166.join)(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "planner.md")}\`, and execute its contents as the block of operations.` : "";
|
|
25981
26368
|
const skillsSection = skills ? this.generateSkillsSection(skills) : "";
|
|
25982
26369
|
const result = [
|
|
25983
26370
|
overview,
|
|
@@ -26235,7 +26622,7 @@ function buildPermissionsStrategy(ctx) {
|
|
|
26235
26622
|
}
|
|
26236
26623
|
|
|
26237
26624
|
// src/lib/generate.ts
|
|
26238
|
-
var
|
|
26625
|
+
var import_node_path167 = require("path");
|
|
26239
26626
|
var import_es_toolkit9 = require("es-toolkit");
|
|
26240
26627
|
async function processFeatureGeneration(params) {
|
|
26241
26628
|
const { config, processor, toolFiles } = params;
|
|
@@ -26309,7 +26696,7 @@ function warnUnsupportedTargets(params) {
|
|
|
26309
26696
|
}
|
|
26310
26697
|
}
|
|
26311
26698
|
async function checkRulesyncDirExists(params) {
|
|
26312
|
-
return fileExists((0,
|
|
26699
|
+
return fileExists((0, import_node_path167.join)(params.inputRoot, RULESYNC_RELATIVE_DIR_PATH));
|
|
26313
26700
|
}
|
|
26314
26701
|
async function generate(params) {
|
|
26315
26702
|
const { config, logger } = params;
|