rulesync 3.3.1 → 3.4.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/index.cjs +48 -29
- package/dist/index.js +48 -29
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -58,7 +58,7 @@ Rulesync supports both **generation** and **import** for All of the major AI cod
|
|
|
58
58
|
| Tool | rules | ignore | mcp | commands | subagents |
|
|
59
59
|
|------------------------|:-----:|:------:|:-----:|:--------:|:---------:|
|
|
60
60
|
| AGENTS.md | ✅ | | | 🎮 | 🎮 |
|
|
61
|
-
| Claude Code | ✅ 🌏 | ✅ | ✅ 🌏 | ✅ 🌏 | ✅
|
|
61
|
+
| Claude Code | ✅ 🌏 | ✅ | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 |
|
|
62
62
|
| Codex CLI | ✅ 🌏 | | 🌏 | 🌏 | 🎮 |
|
|
63
63
|
| Gemini CLI | ✅ 🌏 | ✅ | | ✅ 🌏 | 🎮 |
|
|
64
64
|
| GitHub Copilot | ✅ | | ✅ | 🎮 | 🎮 |
|
package/dist/index.cjs
CHANGED
|
@@ -3656,6 +3656,11 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
|
|
|
3656
3656
|
relativeDirPath: ".claude/agents"
|
|
3657
3657
|
};
|
|
3658
3658
|
}
|
|
3659
|
+
static getSettablePathsGlobal() {
|
|
3660
|
+
return {
|
|
3661
|
+
relativeDirPath: (0, import_node_path35.join)(".claude", "agents")
|
|
3662
|
+
};
|
|
3663
|
+
}
|
|
3659
3664
|
getFrontmatter() {
|
|
3660
3665
|
return this.frontmatter;
|
|
3661
3666
|
}
|
|
@@ -3675,9 +3680,10 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
|
|
|
3675
3680
|
};
|
|
3676
3681
|
const fileContent = stringifyFrontmatter(this.body, rulesyncFrontmatter);
|
|
3677
3682
|
return new RulesyncSubagent({
|
|
3683
|
+
baseDir: ".",
|
|
3684
|
+
// RulesyncCommand baseDir is always the project root directory
|
|
3678
3685
|
frontmatter: rulesyncFrontmatter,
|
|
3679
3686
|
body: this.body,
|
|
3680
|
-
baseDir: this.baseDir,
|
|
3681
3687
|
relativeDirPath: ".rulesync/subagents",
|
|
3682
3688
|
relativeFilePath: this.getRelativeFilePath(),
|
|
3683
3689
|
fileContent,
|
|
@@ -3687,7 +3693,8 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
|
|
|
3687
3693
|
static fromRulesyncSubagent({
|
|
3688
3694
|
baseDir = ".",
|
|
3689
3695
|
rulesyncSubagent,
|
|
3690
|
-
validate = true
|
|
3696
|
+
validate = true,
|
|
3697
|
+
global = false
|
|
3691
3698
|
}) {
|
|
3692
3699
|
const rulesyncFrontmatter = rulesyncSubagent.getFrontmatter();
|
|
3693
3700
|
const claudecodeFrontmatter = {
|
|
@@ -3697,11 +3704,12 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
|
|
|
3697
3704
|
};
|
|
3698
3705
|
const body = rulesyncSubagent.getBody();
|
|
3699
3706
|
const fileContent = stringifyFrontmatter(body, claudecodeFrontmatter);
|
|
3707
|
+
const paths = global ? this.getSettablePathsGlobal() : this.getSettablePaths();
|
|
3700
3708
|
return new _ClaudecodeSubagent({
|
|
3701
3709
|
baseDir,
|
|
3702
3710
|
frontmatter: claudecodeFrontmatter,
|
|
3703
3711
|
body,
|
|
3704
|
-
relativeDirPath:
|
|
3712
|
+
relativeDirPath: paths.relativeDirPath,
|
|
3705
3713
|
relativeFilePath: rulesyncSubagent.getRelativeFilePath(),
|
|
3706
3714
|
fileContent,
|
|
3707
3715
|
validate
|
|
@@ -3727,17 +3735,20 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
|
|
|
3727
3735
|
static async fromFile({
|
|
3728
3736
|
baseDir = ".",
|
|
3729
3737
|
relativeFilePath,
|
|
3730
|
-
validate = true
|
|
3738
|
+
validate = true,
|
|
3739
|
+
global = false
|
|
3731
3740
|
}) {
|
|
3732
|
-
const
|
|
3741
|
+
const paths = global ? this.getSettablePathsGlobal() : this.getSettablePaths();
|
|
3742
|
+
const filePath = (0, import_node_path35.join)(baseDir, paths.relativeDirPath, relativeFilePath);
|
|
3743
|
+
const fileContent = await readFileContent(filePath);
|
|
3733
3744
|
const { frontmatter, body: content } = parseFrontmatter(fileContent);
|
|
3734
3745
|
const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
3735
3746
|
if (!result.success) {
|
|
3736
|
-
throw new Error(`Invalid frontmatter in ${
|
|
3747
|
+
throw new Error(`Invalid frontmatter in ${filePath}: ${result.error.message}`);
|
|
3737
3748
|
}
|
|
3738
3749
|
return new _ClaudecodeSubagent({
|
|
3739
3750
|
baseDir,
|
|
3740
|
-
relativeDirPath:
|
|
3751
|
+
relativeDirPath: paths.relativeDirPath,
|
|
3741
3752
|
relativeFilePath,
|
|
3742
3753
|
frontmatter: result.data,
|
|
3743
3754
|
body: content.trim(),
|
|
@@ -3765,15 +3776,19 @@ var subagentsProcessorToolTargetsSimulated = [
|
|
|
3765
3776
|
"geminicli",
|
|
3766
3777
|
"roo"
|
|
3767
3778
|
];
|
|
3779
|
+
var subagentsProcessorToolTargetsGlobal = ["claudecode"];
|
|
3768
3780
|
var SubagentsProcessorToolTargetSchema = import_mini15.z.enum(subagentsProcessorToolTargets);
|
|
3769
3781
|
var SubagentsProcessor = class extends FeatureProcessor {
|
|
3770
3782
|
toolTarget;
|
|
3783
|
+
global;
|
|
3771
3784
|
constructor({
|
|
3772
3785
|
baseDir = ".",
|
|
3773
|
-
toolTarget
|
|
3786
|
+
toolTarget,
|
|
3787
|
+
global = false
|
|
3774
3788
|
}) {
|
|
3775
3789
|
super({ baseDir });
|
|
3776
3790
|
this.toolTarget = SubagentsProcessorToolTargetSchema.parse(toolTarget);
|
|
3791
|
+
this.global = global;
|
|
3777
3792
|
}
|
|
3778
3793
|
async convertRulesyncFilesToToolFiles(rulesyncFiles) {
|
|
3779
3794
|
const rulesyncSubagents = rulesyncFiles.filter(
|
|
@@ -3797,7 +3812,8 @@ var SubagentsProcessor = class extends FeatureProcessor {
|
|
|
3797
3812
|
return ClaudecodeSubagent.fromRulesyncSubagent({
|
|
3798
3813
|
baseDir: this.baseDir,
|
|
3799
3814
|
relativeDirPath: RulesyncSubagent.getSettablePaths().relativeDirPath,
|
|
3800
|
-
rulesyncSubagent
|
|
3815
|
+
rulesyncSubagent,
|
|
3816
|
+
global: this.global
|
|
3801
3817
|
});
|
|
3802
3818
|
case "copilot":
|
|
3803
3819
|
if (!CopilotSubagent.isTargetedByRulesyncSubagent(rulesyncSubagent)) {
|
|
@@ -3871,7 +3887,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
|
|
|
3871
3887
|
* Load and parse rulesync subagent files from .rulesync/subagents/ directory
|
|
3872
3888
|
*/
|
|
3873
3889
|
async loadRulesyncFiles() {
|
|
3874
|
-
const subagentsDir = (0, import_node_path36.join)(
|
|
3890
|
+
const subagentsDir = (0, import_node_path36.join)(RulesyncSubagent.getSettablePaths().relativeDirPath);
|
|
3875
3891
|
const dirExists = await directoryExists(subagentsDir);
|
|
3876
3892
|
if (!dirExists) {
|
|
3877
3893
|
logger.debug(`Rulesync subagents directory not found: ${subagentsDir}`);
|
|
@@ -3946,9 +3962,14 @@ var SubagentsProcessor = class extends FeatureProcessor {
|
|
|
3946
3962
|
* Load Claude Code subagent configurations from .claude/agents/ directory
|
|
3947
3963
|
*/
|
|
3948
3964
|
async loadClaudecodeSubagents() {
|
|
3965
|
+
const paths = this.global ? ClaudecodeSubagent.getSettablePathsGlobal() : ClaudecodeSubagent.getSettablePaths();
|
|
3949
3966
|
return await this.loadToolSubagentsDefault({
|
|
3950
|
-
relativeDirPath:
|
|
3951
|
-
fromFile: (relativeFilePath) => ClaudecodeSubagent.fromFile({
|
|
3967
|
+
relativeDirPath: paths.relativeDirPath,
|
|
3968
|
+
fromFile: (relativeFilePath) => ClaudecodeSubagent.fromFile({
|
|
3969
|
+
baseDir: this.baseDir,
|
|
3970
|
+
relativeFilePath,
|
|
3971
|
+
global: this.global
|
|
3972
|
+
})
|
|
3952
3973
|
});
|
|
3953
3974
|
}
|
|
3954
3975
|
/**
|
|
@@ -4022,6 +4043,9 @@ var SubagentsProcessor = class extends FeatureProcessor {
|
|
|
4022
4043
|
static getToolTargetsSimulated() {
|
|
4023
4044
|
return subagentsProcessorToolTargetsSimulated;
|
|
4024
4045
|
}
|
|
4046
|
+
static getToolTargetsGlobal() {
|
|
4047
|
+
return subagentsProcessorToolTargetsGlobal;
|
|
4048
|
+
}
|
|
4025
4049
|
};
|
|
4026
4050
|
|
|
4027
4051
|
// src/rules/agentsmd-rule.ts
|
|
@@ -6630,22 +6654,20 @@ async function generateSubagents(config) {
|
|
|
6630
6654
|
logger.debug("Skipping subagent file generation (not in --features)");
|
|
6631
6655
|
return 0;
|
|
6632
6656
|
}
|
|
6633
|
-
if (config.getExperimentalGlobal()) {
|
|
6634
|
-
logger.debug("Skipping subagent file generation (not supported in global mode)");
|
|
6635
|
-
return 0;
|
|
6636
|
-
}
|
|
6637
6657
|
let totalSubagentOutputs = 0;
|
|
6638
6658
|
logger.info("Generating subagent files...");
|
|
6659
|
+
const toolTargets = config.getExperimentalGlobal() ? (0, import_es_toolkit2.intersection)(config.getTargets(), SubagentsProcessor.getToolTargetsGlobal()) : (0, import_es_toolkit2.intersection)(
|
|
6660
|
+
config.getTargets(),
|
|
6661
|
+
SubagentsProcessor.getToolTargets({
|
|
6662
|
+
includeSimulated: config.getExperimentalSimulateSubagents()
|
|
6663
|
+
})
|
|
6664
|
+
);
|
|
6639
6665
|
for (const baseDir of config.getBaseDirs()) {
|
|
6640
|
-
for (const toolTarget of
|
|
6641
|
-
config.getTargets(),
|
|
6642
|
-
SubagentsProcessor.getToolTargets({
|
|
6643
|
-
includeSimulated: config.getExperimentalSimulateSubagents()
|
|
6644
|
-
})
|
|
6645
|
-
)) {
|
|
6666
|
+
for (const toolTarget of toolTargets) {
|
|
6646
6667
|
const processor = new SubagentsProcessor({
|
|
6647
6668
|
baseDir,
|
|
6648
|
-
toolTarget
|
|
6669
|
+
toolTarget,
|
|
6670
|
+
global: config.getExperimentalGlobal()
|
|
6649
6671
|
});
|
|
6650
6672
|
if (config.getDelete()) {
|
|
6651
6673
|
const oldToolFiles = await processor.loadToolFilesToDelete();
|
|
@@ -6869,17 +6891,14 @@ async function importSubagents(config, tool) {
|
|
|
6869
6891
|
if (!config.getFeatures().includes("subagents")) {
|
|
6870
6892
|
return 0;
|
|
6871
6893
|
}
|
|
6872
|
-
if (config.getExperimentalGlobal()) {
|
|
6873
|
-
logger.debug("Skipping subagent file import (not supported in global mode)");
|
|
6874
|
-
return 0;
|
|
6875
|
-
}
|
|
6876
6894
|
const supportedTargets = SubagentsProcessor.getToolTargets({ includeSimulated: false });
|
|
6877
6895
|
if (!supportedTargets.includes(tool)) {
|
|
6878
6896
|
return 0;
|
|
6879
6897
|
}
|
|
6880
6898
|
const subagentsProcessor = new SubagentsProcessor({
|
|
6881
6899
|
baseDir: config.getBaseDirs()[0] ?? ".",
|
|
6882
|
-
toolTarget: tool
|
|
6900
|
+
toolTarget: tool,
|
|
6901
|
+
global: config.getExperimentalGlobal()
|
|
6883
6902
|
});
|
|
6884
6903
|
const toolFiles = await subagentsProcessor.loadToolFiles();
|
|
6885
6904
|
if (toolFiles.length === 0) {
|
|
@@ -6978,7 +6997,7 @@ globs: ["**/*"]
|
|
|
6978
6997
|
}
|
|
6979
6998
|
|
|
6980
6999
|
// src/cli/index.ts
|
|
6981
|
-
var getVersion = () => "3.
|
|
7000
|
+
var getVersion = () => "3.4.0";
|
|
6982
7001
|
var main = async () => {
|
|
6983
7002
|
const program = new import_commander.Command();
|
|
6984
7003
|
const version = getVersion();
|
package/dist/index.js
CHANGED
|
@@ -3633,6 +3633,11 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
|
|
|
3633
3633
|
relativeDirPath: ".claude/agents"
|
|
3634
3634
|
};
|
|
3635
3635
|
}
|
|
3636
|
+
static getSettablePathsGlobal() {
|
|
3637
|
+
return {
|
|
3638
|
+
relativeDirPath: join34(".claude", "agents")
|
|
3639
|
+
};
|
|
3640
|
+
}
|
|
3636
3641
|
getFrontmatter() {
|
|
3637
3642
|
return this.frontmatter;
|
|
3638
3643
|
}
|
|
@@ -3652,9 +3657,10 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
|
|
|
3652
3657
|
};
|
|
3653
3658
|
const fileContent = stringifyFrontmatter(this.body, rulesyncFrontmatter);
|
|
3654
3659
|
return new RulesyncSubagent({
|
|
3660
|
+
baseDir: ".",
|
|
3661
|
+
// RulesyncCommand baseDir is always the project root directory
|
|
3655
3662
|
frontmatter: rulesyncFrontmatter,
|
|
3656
3663
|
body: this.body,
|
|
3657
|
-
baseDir: this.baseDir,
|
|
3658
3664
|
relativeDirPath: ".rulesync/subagents",
|
|
3659
3665
|
relativeFilePath: this.getRelativeFilePath(),
|
|
3660
3666
|
fileContent,
|
|
@@ -3664,7 +3670,8 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
|
|
|
3664
3670
|
static fromRulesyncSubagent({
|
|
3665
3671
|
baseDir = ".",
|
|
3666
3672
|
rulesyncSubagent,
|
|
3667
|
-
validate = true
|
|
3673
|
+
validate = true,
|
|
3674
|
+
global = false
|
|
3668
3675
|
}) {
|
|
3669
3676
|
const rulesyncFrontmatter = rulesyncSubagent.getFrontmatter();
|
|
3670
3677
|
const claudecodeFrontmatter = {
|
|
@@ -3674,11 +3681,12 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
|
|
|
3674
3681
|
};
|
|
3675
3682
|
const body = rulesyncSubagent.getBody();
|
|
3676
3683
|
const fileContent = stringifyFrontmatter(body, claudecodeFrontmatter);
|
|
3684
|
+
const paths = global ? this.getSettablePathsGlobal() : this.getSettablePaths();
|
|
3677
3685
|
return new _ClaudecodeSubagent({
|
|
3678
3686
|
baseDir,
|
|
3679
3687
|
frontmatter: claudecodeFrontmatter,
|
|
3680
3688
|
body,
|
|
3681
|
-
relativeDirPath:
|
|
3689
|
+
relativeDirPath: paths.relativeDirPath,
|
|
3682
3690
|
relativeFilePath: rulesyncSubagent.getRelativeFilePath(),
|
|
3683
3691
|
fileContent,
|
|
3684
3692
|
validate
|
|
@@ -3704,17 +3712,20 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
|
|
|
3704
3712
|
static async fromFile({
|
|
3705
3713
|
baseDir = ".",
|
|
3706
3714
|
relativeFilePath,
|
|
3707
|
-
validate = true
|
|
3715
|
+
validate = true,
|
|
3716
|
+
global = false
|
|
3708
3717
|
}) {
|
|
3709
|
-
const
|
|
3718
|
+
const paths = global ? this.getSettablePathsGlobal() : this.getSettablePaths();
|
|
3719
|
+
const filePath = join34(baseDir, paths.relativeDirPath, relativeFilePath);
|
|
3720
|
+
const fileContent = await readFileContent(filePath);
|
|
3710
3721
|
const { frontmatter, body: content } = parseFrontmatter(fileContent);
|
|
3711
3722
|
const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
|
|
3712
3723
|
if (!result.success) {
|
|
3713
|
-
throw new Error(`Invalid frontmatter in ${
|
|
3724
|
+
throw new Error(`Invalid frontmatter in ${filePath}: ${result.error.message}`);
|
|
3714
3725
|
}
|
|
3715
3726
|
return new _ClaudecodeSubagent({
|
|
3716
3727
|
baseDir,
|
|
3717
|
-
relativeDirPath:
|
|
3728
|
+
relativeDirPath: paths.relativeDirPath,
|
|
3718
3729
|
relativeFilePath,
|
|
3719
3730
|
frontmatter: result.data,
|
|
3720
3731
|
body: content.trim(),
|
|
@@ -3742,15 +3753,19 @@ var subagentsProcessorToolTargetsSimulated = [
|
|
|
3742
3753
|
"geminicli",
|
|
3743
3754
|
"roo"
|
|
3744
3755
|
];
|
|
3756
|
+
var subagentsProcessorToolTargetsGlobal = ["claudecode"];
|
|
3745
3757
|
var SubagentsProcessorToolTargetSchema = z15.enum(subagentsProcessorToolTargets);
|
|
3746
3758
|
var SubagentsProcessor = class extends FeatureProcessor {
|
|
3747
3759
|
toolTarget;
|
|
3760
|
+
global;
|
|
3748
3761
|
constructor({
|
|
3749
3762
|
baseDir = ".",
|
|
3750
|
-
toolTarget
|
|
3763
|
+
toolTarget,
|
|
3764
|
+
global = false
|
|
3751
3765
|
}) {
|
|
3752
3766
|
super({ baseDir });
|
|
3753
3767
|
this.toolTarget = SubagentsProcessorToolTargetSchema.parse(toolTarget);
|
|
3768
|
+
this.global = global;
|
|
3754
3769
|
}
|
|
3755
3770
|
async convertRulesyncFilesToToolFiles(rulesyncFiles) {
|
|
3756
3771
|
const rulesyncSubagents = rulesyncFiles.filter(
|
|
@@ -3774,7 +3789,8 @@ var SubagentsProcessor = class extends FeatureProcessor {
|
|
|
3774
3789
|
return ClaudecodeSubagent.fromRulesyncSubagent({
|
|
3775
3790
|
baseDir: this.baseDir,
|
|
3776
3791
|
relativeDirPath: RulesyncSubagent.getSettablePaths().relativeDirPath,
|
|
3777
|
-
rulesyncSubagent
|
|
3792
|
+
rulesyncSubagent,
|
|
3793
|
+
global: this.global
|
|
3778
3794
|
});
|
|
3779
3795
|
case "copilot":
|
|
3780
3796
|
if (!CopilotSubagent.isTargetedByRulesyncSubagent(rulesyncSubagent)) {
|
|
@@ -3848,7 +3864,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
|
|
|
3848
3864
|
* Load and parse rulesync subagent files from .rulesync/subagents/ directory
|
|
3849
3865
|
*/
|
|
3850
3866
|
async loadRulesyncFiles() {
|
|
3851
|
-
const subagentsDir = join35(
|
|
3867
|
+
const subagentsDir = join35(RulesyncSubagent.getSettablePaths().relativeDirPath);
|
|
3852
3868
|
const dirExists = await directoryExists(subagentsDir);
|
|
3853
3869
|
if (!dirExists) {
|
|
3854
3870
|
logger.debug(`Rulesync subagents directory not found: ${subagentsDir}`);
|
|
@@ -3923,9 +3939,14 @@ var SubagentsProcessor = class extends FeatureProcessor {
|
|
|
3923
3939
|
* Load Claude Code subagent configurations from .claude/agents/ directory
|
|
3924
3940
|
*/
|
|
3925
3941
|
async loadClaudecodeSubagents() {
|
|
3942
|
+
const paths = this.global ? ClaudecodeSubagent.getSettablePathsGlobal() : ClaudecodeSubagent.getSettablePaths();
|
|
3926
3943
|
return await this.loadToolSubagentsDefault({
|
|
3927
|
-
relativeDirPath:
|
|
3928
|
-
fromFile: (relativeFilePath) => ClaudecodeSubagent.fromFile({
|
|
3944
|
+
relativeDirPath: paths.relativeDirPath,
|
|
3945
|
+
fromFile: (relativeFilePath) => ClaudecodeSubagent.fromFile({
|
|
3946
|
+
baseDir: this.baseDir,
|
|
3947
|
+
relativeFilePath,
|
|
3948
|
+
global: this.global
|
|
3949
|
+
})
|
|
3929
3950
|
});
|
|
3930
3951
|
}
|
|
3931
3952
|
/**
|
|
@@ -3999,6 +4020,9 @@ var SubagentsProcessor = class extends FeatureProcessor {
|
|
|
3999
4020
|
static getToolTargetsSimulated() {
|
|
4000
4021
|
return subagentsProcessorToolTargetsSimulated;
|
|
4001
4022
|
}
|
|
4023
|
+
static getToolTargetsGlobal() {
|
|
4024
|
+
return subagentsProcessorToolTargetsGlobal;
|
|
4025
|
+
}
|
|
4002
4026
|
};
|
|
4003
4027
|
|
|
4004
4028
|
// src/rules/agentsmd-rule.ts
|
|
@@ -6607,22 +6631,20 @@ async function generateSubagents(config) {
|
|
|
6607
6631
|
logger.debug("Skipping subagent file generation (not in --features)");
|
|
6608
6632
|
return 0;
|
|
6609
6633
|
}
|
|
6610
|
-
if (config.getExperimentalGlobal()) {
|
|
6611
|
-
logger.debug("Skipping subagent file generation (not supported in global mode)");
|
|
6612
|
-
return 0;
|
|
6613
|
-
}
|
|
6614
6634
|
let totalSubagentOutputs = 0;
|
|
6615
6635
|
logger.info("Generating subagent files...");
|
|
6636
|
+
const toolTargets = config.getExperimentalGlobal() ? intersection(config.getTargets(), SubagentsProcessor.getToolTargetsGlobal()) : intersection(
|
|
6637
|
+
config.getTargets(),
|
|
6638
|
+
SubagentsProcessor.getToolTargets({
|
|
6639
|
+
includeSimulated: config.getExperimentalSimulateSubagents()
|
|
6640
|
+
})
|
|
6641
|
+
);
|
|
6616
6642
|
for (const baseDir of config.getBaseDirs()) {
|
|
6617
|
-
for (const toolTarget of
|
|
6618
|
-
config.getTargets(),
|
|
6619
|
-
SubagentsProcessor.getToolTargets({
|
|
6620
|
-
includeSimulated: config.getExperimentalSimulateSubagents()
|
|
6621
|
-
})
|
|
6622
|
-
)) {
|
|
6643
|
+
for (const toolTarget of toolTargets) {
|
|
6623
6644
|
const processor = new SubagentsProcessor({
|
|
6624
6645
|
baseDir,
|
|
6625
|
-
toolTarget
|
|
6646
|
+
toolTarget,
|
|
6647
|
+
global: config.getExperimentalGlobal()
|
|
6626
6648
|
});
|
|
6627
6649
|
if (config.getDelete()) {
|
|
6628
6650
|
const oldToolFiles = await processor.loadToolFilesToDelete();
|
|
@@ -6846,17 +6868,14 @@ async function importSubagents(config, tool) {
|
|
|
6846
6868
|
if (!config.getFeatures().includes("subagents")) {
|
|
6847
6869
|
return 0;
|
|
6848
6870
|
}
|
|
6849
|
-
if (config.getExperimentalGlobal()) {
|
|
6850
|
-
logger.debug("Skipping subagent file import (not supported in global mode)");
|
|
6851
|
-
return 0;
|
|
6852
|
-
}
|
|
6853
6871
|
const supportedTargets = SubagentsProcessor.getToolTargets({ includeSimulated: false });
|
|
6854
6872
|
if (!supportedTargets.includes(tool)) {
|
|
6855
6873
|
return 0;
|
|
6856
6874
|
}
|
|
6857
6875
|
const subagentsProcessor = new SubagentsProcessor({
|
|
6858
6876
|
baseDir: config.getBaseDirs()[0] ?? ".",
|
|
6859
|
-
toolTarget: tool
|
|
6877
|
+
toolTarget: tool,
|
|
6878
|
+
global: config.getExperimentalGlobal()
|
|
6860
6879
|
});
|
|
6861
6880
|
const toolFiles = await subagentsProcessor.loadToolFiles();
|
|
6862
6881
|
if (toolFiles.length === 0) {
|
|
@@ -6955,7 +6974,7 @@ globs: ["**/*"]
|
|
|
6955
6974
|
}
|
|
6956
6975
|
|
|
6957
6976
|
// src/cli/index.ts
|
|
6958
|
-
var getVersion = () => "3.
|
|
6977
|
+
var getVersion = () => "3.4.0";
|
|
6959
6978
|
var main = async () => {
|
|
6960
6979
|
const program = new Command();
|
|
6961
6980
|
const version = getVersion();
|