awesome-agv 3.2.0 → 3.3.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/bin/awesome-agv.js +46 -2
- package/package.json +1 -1
package/bin/awesome-agv.js
CHANGED
|
@@ -694,6 +694,35 @@ function writeAgvrc(targetDir, mode, selectedStacks, deselected) {
|
|
|
694
694
|
fs.writeFileSync(rcPath, JSON.stringify(config, null, 2) + '\n');
|
|
695
695
|
}
|
|
696
696
|
|
|
697
|
+
// ── Patch .gitignore ───────────────────────────────────────────────────────────
|
|
698
|
+
const AGENTWORK_ENTRY = '.agentwork/';
|
|
699
|
+
|
|
700
|
+
/**
|
|
701
|
+
* Ensures .agentwork/ is listed in .gitignore.
|
|
702
|
+
* Creates .gitignore if it doesn't exist.
|
|
703
|
+
* Returns: 'created' | 'patched' | 'already_present'
|
|
704
|
+
*/
|
|
705
|
+
function patchGitignore(targetDir) {
|
|
706
|
+
const gitignorePath = path.join(targetDir, '.gitignore');
|
|
707
|
+
|
|
708
|
+
if (!fs.existsSync(gitignorePath)) {
|
|
709
|
+
fs.writeFileSync(gitignorePath, `${AGENTWORK_ENTRY}\n`, 'utf8');
|
|
710
|
+
return 'created';
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
const content = fs.readFileSync(gitignorePath, 'utf8');
|
|
714
|
+
const lines = content.split('\n').map((l) => l.trim());
|
|
715
|
+
|
|
716
|
+
if (lines.includes(AGENTWORK_ENTRY)) {
|
|
717
|
+
return 'already_present';
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
// Append with a preceding newline if the file doesn't end with one
|
|
721
|
+
const separator = content.endsWith('\n') ? '' : '\n';
|
|
722
|
+
fs.appendFileSync(gitignorePath, `${separator}${AGENTWORK_ENTRY}\n`, 'utf8');
|
|
723
|
+
return 'patched';
|
|
724
|
+
}
|
|
725
|
+
|
|
697
726
|
// ── Read existing .agvrc ───────────────────────────────────────────────────────
|
|
698
727
|
function readAgvrc(targetDir) {
|
|
699
728
|
const rcPath = path.join(targetDir, AGENT_DIR, CONFIG_FILE);
|
|
@@ -760,7 +789,7 @@ function readManifest(tarballPath) {
|
|
|
760
789
|
}
|
|
761
790
|
|
|
762
791
|
// ── Print Success Summary ──────────────────────────────────────────────────────
|
|
763
|
-
function printSuccess(targetDir, mode, selectedStacks) {
|
|
792
|
+
function printSuccess(targetDir, mode, selectedStacks, gitignoreResult) {
|
|
764
793
|
const agentDir = path.join(targetDir, AGENT_DIR);
|
|
765
794
|
const rulesDir = path.join(agentDir, 'rules');
|
|
766
795
|
const skillsDir = path.join(agentDir, 'skills');
|
|
@@ -788,6 +817,16 @@ function printSuccess(targetDir, mode, selectedStacks) {
|
|
|
788
817
|
? `${icon.target} Curated`
|
|
789
818
|
: `${icon.gear} Advanced`;
|
|
790
819
|
|
|
820
|
+
// Gitignore status message
|
|
821
|
+
let gitignoreMsg;
|
|
822
|
+
if (gitignoreResult === 'created') {
|
|
823
|
+
gitignoreMsg = `${icon.check} ${c.bold}.gitignore${c.reset} created with ${c.cyan}.agentwork/${c.reset} entry`;
|
|
824
|
+
} else if (gitignoreResult === 'patched') {
|
|
825
|
+
gitignoreMsg = `${icon.check} ${c.bold}.gitignore${c.reset} patched — added ${c.cyan}.agentwork/${c.reset}`;
|
|
826
|
+
} else {
|
|
827
|
+
gitignoreMsg = `${icon.check} ${c.bold}.gitignore${c.reset} already contains ${c.cyan}.agentwork/${c.reset}`;
|
|
828
|
+
}
|
|
829
|
+
|
|
791
830
|
console.log(`
|
|
792
831
|
${c.green}${c.bold} Installation complete! ${icon.rocket}${c.reset}
|
|
793
832
|
|
|
@@ -798,6 +837,8 @@ ${c.green}${c.bold} Installation complete! ${icon.rocket}${c.reset}
|
|
|
798
837
|
${icon.tool} ${c.bold}${skillsCount}${c.reset} Skills ${c.dim}Debugging, design, code review, language idioms${c.reset}
|
|
799
838
|
${icon.cycle} ${c.bold}${workflowsCount}${c.reset} Workflows ${c.dim}End-to-end dev processes${c.reset}
|
|
800
839
|
🤖 ${c.bold}${agentsCount}${c.reset} Agents ${c.dim}Specialized multi-agent personas${c.reset}
|
|
840
|
+
|
|
841
|
+
${gitignoreMsg}
|
|
801
842
|
`);
|
|
802
843
|
|
|
803
844
|
if (selectedStacks && selectedStacks.size > 0) {
|
|
@@ -1005,8 +1046,11 @@ async function main() {
|
|
|
1005
1046
|
// ── Write .agvrc ──
|
|
1006
1047
|
writeAgvrc(options.targetDir, mode, selectedStackKeys, deselected);
|
|
1007
1048
|
|
|
1049
|
+
// ── Patch .gitignore ──
|
|
1050
|
+
const gitignoreResult = patchGitignore(options.targetDir);
|
|
1051
|
+
|
|
1008
1052
|
// ── Success ──
|
|
1009
|
-
printSuccess(options.targetDir, mode, selectedStackKeys);
|
|
1053
|
+
printSuccess(options.targetDir, mode, selectedStackKeys, gitignoreResult);
|
|
1010
1054
|
} catch (err) {
|
|
1011
1055
|
console.error(`\n ${icon.error} ${c.red}Installation failed:${c.reset} ${err.message}\n`);
|
|
1012
1056
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "awesome-agv",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"description": "Selective installer for Awesome AGV — a rugged, high-quality AI Agent configuration suite with 25 rules, 59 skills, 12 workflows, and 21 agent personas.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"awesome-agv": "./bin/awesome-agv.js"
|