@ibgib/web-gib 0.0.25 → 0.0.26
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibgib/web-gib",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.26",
|
|
4
4
|
"description": "Framework for creating agentic ibGib web apps. Contains plumbing for ibgib components, agentic framework (currently only Gemini implemented), web-based IndexedDB storage substrate, and more.",
|
|
5
5
|
"funding": {
|
|
6
6
|
"type": "individual",
|
package/tools/init-agents.js
CHANGED
|
@@ -25,29 +25,56 @@ console.log(`${logPref} Copying ibgib agent skills...`);
|
|
|
25
25
|
console.log(`${logPref} From: ${sourceAgentsDir}`);
|
|
26
26
|
console.log(`${logPref} To: ${targetAgentsDir}`);
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
const sourceSkillsDir = path.join(sourceAgentsDir, 'skills');
|
|
29
|
+
const targetSkillsDir = path.join(targetAgentsDir, 'skills');
|
|
29
30
|
|
|
30
|
-
if (fs.existsSync(
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
31
|
+
if (!fs.existsSync(sourceSkillsDir)) {
|
|
32
|
+
console.error(`${logPref} Error: Source skills directory not found at ${sourceSkillsDir}`);
|
|
33
|
+
process.exit(1);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Ensure the target skills directory exists
|
|
37
|
+
if (!fs.existsSync(targetSkillsDir)) {
|
|
38
|
+
fs.mkdirSync(targetSkillsDir, { recursive: true });
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
41
|
+
const skillDirs = fs.readdirSync(sourceSkillsDir, { withFileTypes: true });
|
|
42
|
+
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
43
|
+
|
|
44
|
+
try {
|
|
45
|
+
for (const dirent of skillDirs) {
|
|
46
|
+
if (!dirent.isDirectory()) continue;
|
|
47
|
+
|
|
48
|
+
const skillName = dirent.name;
|
|
49
|
+
// Proceed only with explicitly targeted ibgib prefixed skills
|
|
50
|
+
if (!skillName.startsWith('ibgib-')) continue;
|
|
51
|
+
|
|
52
|
+
const srcSkillPath = path.join(sourceSkillsDir, skillName);
|
|
53
|
+
const targetSkillPath = path.join(targetSkillsDir, skillName);
|
|
54
|
+
|
|
55
|
+
let shouldCopy = true;
|
|
56
|
+
|
|
57
|
+
if (fs.existsSync(targetSkillPath)) {
|
|
58
|
+
const answer = await rl.question(`${logPref} Skill folder '${skillName}' already exists. Overwrite? (y/N) `);
|
|
59
|
+
if (answer.toLowerCase() !== 'y') {
|
|
60
|
+
shouldCopy = false;
|
|
61
|
+
console.log(`${logPref} Skipped overwriting ${skillName}.`);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if (shouldCopy) {
|
|
66
|
+
fs.cpSync(srcSkillPath, targetSkillPath, {
|
|
67
|
+
recursive: true,
|
|
68
|
+
force: true,
|
|
69
|
+
errorOnExist: false
|
|
70
|
+
});
|
|
71
|
+
console.log(`${logPref} ✅ Copied skill: ${skillName}`);
|
|
72
|
+
}
|
|
52
73
|
}
|
|
74
|
+
console.log(`${logPref} Finished initializing agent skills.`);
|
|
75
|
+
} catch (error) {
|
|
76
|
+
console.error(`${logPref} ❌ Failed to copy agent skills:`, error);
|
|
77
|
+
process.exit(1);
|
|
78
|
+
} finally {
|
|
79
|
+
rl.close();
|
|
53
80
|
}
|