ai-agent-config 2.4.0 ā 2.4.1
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/.agent/skills/ai-agent-config/SKILL.md +3 -10
- package/bin/cli.js +2 -44
- package/package.json +1 -1
- package/scripts/installer.js +4 -7
- package/scripts/sync-manager.js +21 -1
|
@@ -104,11 +104,8 @@ ai-agent push --message "Initial setup"
|
|
|
104
104
|
|
|
105
105
|
**Assistant**:
|
|
106
106
|
```bash
|
|
107
|
-
# Pull latest from GitHub
|
|
107
|
+
# Pull latest from GitHub (auto-installs)
|
|
108
108
|
ai-agent pull
|
|
109
|
-
|
|
110
|
-
# Install to all platforms
|
|
111
|
-
ai-agent install --force
|
|
112
109
|
```
|
|
113
110
|
|
|
114
111
|
### Adding Custom Skills
|
|
@@ -122,11 +119,8 @@ ai-agent source add https://github.com/company/ai-skills.git \
|
|
|
122
119
|
--name company-skills \
|
|
123
120
|
--branch main
|
|
124
121
|
|
|
125
|
-
# Update from new source
|
|
122
|
+
# Update from new source (auto-installs)
|
|
126
123
|
ai-agent update --source company-skills
|
|
127
|
-
|
|
128
|
-
# Install to platforms
|
|
129
|
-
ai-agent install
|
|
130
124
|
```
|
|
131
125
|
|
|
132
126
|
### Team Sharing
|
|
@@ -138,9 +132,8 @@ ai-agent install
|
|
|
138
132
|
# Push to GitHub
|
|
139
133
|
ai-agent push --message "Added debugging skills"
|
|
140
134
|
|
|
141
|
-
# Team members pull
|
|
135
|
+
# Team members pull (auto-installs)
|
|
142
136
|
ai-agent pull
|
|
143
|
-
ai-agent install
|
|
144
137
|
```
|
|
145
138
|
|
|
146
139
|
## Architecture
|
package/bin/cli.js
CHANGED
|
@@ -8,7 +8,7 @@ const installer = require("../scripts/installer");
|
|
|
8
8
|
const platforms = require("../scripts/platforms");
|
|
9
9
|
const migration = require("../scripts/migration");
|
|
10
10
|
|
|
11
|
-
const VERSION = "2.4.
|
|
11
|
+
const VERSION = "2.4.1";
|
|
12
12
|
|
|
13
13
|
// Get package root (one level up from bin/)
|
|
14
14
|
const PACKAGE_ROOT = path.join(__dirname, "..");
|
|
@@ -818,46 +818,6 @@ function pull(args) {
|
|
|
818
818
|
}
|
|
819
819
|
}
|
|
820
820
|
|
|
821
|
-
/**
|
|
822
|
-
* Bi-directional sync (pull + push)
|
|
823
|
-
*/
|
|
824
|
-
function sync(args) {
|
|
825
|
-
console.log("\\nš Bi-directional sync...\\n");
|
|
826
|
-
|
|
827
|
-
const config = configManager.loadConfig();
|
|
828
|
-
|
|
829
|
-
if (!config.repository.url) {
|
|
830
|
-
// Fallback to old sync behavior
|
|
831
|
-
return oldSync(args);
|
|
832
|
-
}
|
|
833
|
-
|
|
834
|
-
const SyncManager = require("../scripts/sync-manager");
|
|
835
|
-
const syncManager = new SyncManager(config);
|
|
836
|
-
|
|
837
|
-
const options = {
|
|
838
|
-
message: getArgValue(args, "--message") || "Update skills and workflows",
|
|
839
|
-
};
|
|
840
|
-
|
|
841
|
-
try {
|
|
842
|
-
const result = syncManager.sync(options);
|
|
843
|
-
|
|
844
|
-
if (result.synced) {
|
|
845
|
-
console.log("ā
Sync completed!\\n");
|
|
846
|
-
} else {
|
|
847
|
-
console.log(`ā ļø ${result.reason}`);
|
|
848
|
-
|
|
849
|
-
if (result.conflicts && result.conflicts.length > 0) {
|
|
850
|
-
console.log("\\n Conflicts in:");
|
|
851
|
-
result.conflicts.forEach((f) => console.log(` - ${f}`));
|
|
852
|
-
console.log("\\n Resolve manually and try again.\\n");
|
|
853
|
-
}
|
|
854
|
-
process.exit(1);
|
|
855
|
-
}
|
|
856
|
-
} catch (error) {
|
|
857
|
-
console.error(`ā Sync failed: ${error.message}\\n`);
|
|
858
|
-
process.exit(1);
|
|
859
|
-
}
|
|
860
|
-
}
|
|
861
821
|
|
|
862
822
|
/**
|
|
863
823
|
* Old sync function (backward compatibility)
|
|
@@ -1011,9 +971,7 @@ if (command === "source") {
|
|
|
1011
971
|
case "update":
|
|
1012
972
|
update(args.slice(1));
|
|
1013
973
|
break;
|
|
1014
|
-
|
|
1015
|
-
sync(args.slice(1));
|
|
1016
|
-
break;
|
|
974
|
+
|
|
1017
975
|
case "sync-external":
|
|
1018
976
|
// Backward compatibility - alias for update
|
|
1019
977
|
update(args.slice(1));
|
package/package.json
CHANGED
package/scripts/installer.js
CHANGED
|
@@ -81,12 +81,12 @@ function isRepoCached() {
|
|
|
81
81
|
|
|
82
82
|
/**
|
|
83
83
|
* Get list of available skills
|
|
84
|
-
*
|
|
84
|
+
* Merges package bundled skills + external repo cache
|
|
85
85
|
*/
|
|
86
86
|
function getAvailableSkills() {
|
|
87
87
|
const skills = new Set();
|
|
88
88
|
|
|
89
|
-
//
|
|
89
|
+
// Add package bundled skills first (.agent/skills/)
|
|
90
90
|
if (fs.existsSync(PACKAGE_SKILLS_DIR)) {
|
|
91
91
|
const packageSkills = fs.readdirSync(PACKAGE_SKILLS_DIR);
|
|
92
92
|
packageSkills.forEach((name) => {
|
|
@@ -97,13 +97,10 @@ function getAvailableSkills() {
|
|
|
97
97
|
}
|
|
98
98
|
});
|
|
99
99
|
|
|
100
|
-
|
|
101
|
-
if (skills.size > 0) {
|
|
102
|
-
return Array.from(skills);
|
|
103
|
-
}
|
|
100
|
+
|
|
104
101
|
}
|
|
105
102
|
|
|
106
|
-
//
|
|
103
|
+
// Merge with skills from external repo cache
|
|
107
104
|
if (fs.existsSync(REPO_SKILLS_DIR)) {
|
|
108
105
|
fs.readdirSync(REPO_SKILLS_DIR).forEach((name) => {
|
|
109
106
|
const skillPath = path.join(REPO_SKILLS_DIR, name);
|
package/scripts/sync-manager.js
CHANGED
|
@@ -165,7 +165,27 @@ class SyncManager {
|
|
|
165
165
|
*/
|
|
166
166
|
gitCommit(message) {
|
|
167
167
|
try {
|
|
168
|
-
|
|
168
|
+
// Add all .agent/ files except bundled package skills
|
|
169
|
+
execSync("git add .agent/workflows/", { cwd: this.repoPath, stdio: "pipe" });
|
|
170
|
+
|
|
171
|
+
// Add skills individually, excluding bundled ones
|
|
172
|
+
const fs = require("fs");
|
|
173
|
+
const path = require("path");
|
|
174
|
+
const skillsDir = path.join(this.repoPath, ".agent/skills");
|
|
175
|
+
const bundledSkills = ["ai-agent-config", "config-manager"];
|
|
176
|
+
|
|
177
|
+
if (fs.existsSync(skillsDir)) {
|
|
178
|
+
const skills = fs.readdirSync(skillsDir);
|
|
179
|
+
skills.forEach(skill => {
|
|
180
|
+
if (!bundledSkills.includes(skill)) {
|
|
181
|
+
execSync(`git add .agent/skills/${skill}`, {
|
|
182
|
+
cwd: this.repoPath,
|
|
183
|
+
stdio: "pipe"
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
|
|
169
189
|
execSync(`git commit -m "${message}"`, { cwd: this.repoPath, stdio: "pipe" });
|
|
170
190
|
} catch (error) {
|
|
171
191
|
// Ignore commit errors if nothing to commit
|