agentbnb 8.3.2 → 8.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/dist/{card-T2XJZA5A.js → card-HYTD2BJQ.js} +1 -1
- package/dist/{chunk-S7DZHKCG.js → chunk-2PP5MQPD.js} +5 -3
- package/dist/{chunk-75OC6E4F.js → chunk-3XPBFF6H.js} +1 -0
- package/dist/{chunk-5AH3CMOX.js → chunk-3YQ73ZM6.js} +1 -1
- package/dist/{chunk-FELGHDCA.js → chunk-6FZ4WYQL.js} +38 -4
- package/dist/{chunk-D242QZCR.js → chunk-6XCN62YU.js} +10 -54
- package/dist/chunk-AZKVGC5T.js +53 -0
- package/dist/{chunk-NHVHLUYS.js → chunk-CFHCG5FE.js} +6 -217
- package/dist/{chunk-5AIYALBX.js → chunk-COA2D7QM.js} +4 -3
- package/dist/chunk-G5WKW3ED.js +41 -0
- package/dist/{chunk-F3KIEVJ2.js → chunk-HU46M4JA.js} +2 -87
- package/dist/{chunk-77KGEDH4.js → chunk-MZSVVG55.js} +2 -41
- package/dist/chunk-PCQEHIGF.js +750 -0
- package/dist/chunk-PIPCGRCR.js +91 -0
- package/dist/{chunk-QFPXZITP.js → chunk-PMRTQ2RL.js} +34 -0
- package/dist/{chunk-7IQE34QK.js → chunk-UF6R2RVN.js} +5 -3
- package/dist/{chunk-IGQNP3ZO.js → chunk-VAAEBCMU.js} +1 -1
- package/dist/chunk-VRPLSK34.js +214 -0
- package/dist/{chunk-BARHNIKG.js → chunk-WK2QSO4E.js} +1 -1
- package/dist/chunk-WPB5LFGI.js +132 -0
- package/dist/chunk-XGOA5J2K.js +173 -0
- package/dist/{chunk-VJ7XBEY6.js → chunk-Z5726VPY.js} +6 -6
- package/dist/cli/index.js +118 -789
- package/dist/conduct-FZPUMPCI.js +25 -0
- package/dist/{conduct-VYYBCPHA.js → conduct-J2NXU6RM.js} +12 -9
- package/dist/{conductor-mode-SBDCRIX6.js → conductor-mode-HNNMWZIH.js} +11 -8
- package/dist/config-IRWLG6IW.js +12 -0
- package/dist/{execute-FZLQGIXB.js → execute-UAD5T3BQ.js} +1 -1
- package/dist/{execute-TEZPQ5WP.js → execute-UP46R7KS.js} +6 -5
- package/dist/index.js +34 -0
- package/dist/openclaw-setup-KA72IIEW.js +296 -0
- package/dist/openclaw-skills-CT673RBL.js +370 -0
- package/dist/{peers-K7FSHPN3.js → peers-F2EWUMVQ.js} +2 -2
- package/dist/{publish-capability-HVYILTPR.js → publish-capability-GNH5FHKG.js} +2 -2
- package/dist/{request-KJNKR27T.js → request-IM3ZLAOA.js} +13 -9
- package/dist/scanner-F5VNV5FP.js +8 -0
- package/dist/{serve-skill-GC6NIQ5T.js → serve-skill-6RKMVDMK.js} +6 -5
- package/dist/{server-6I7GU2OZ.js → server-MH7FTZFN.js} +11 -9
- package/dist/{service-coordinator-LZJCAQSJ.js → service-coordinator-R5LZVM6A.js} +31 -26
- package/dist/skills/agentbnb/bootstrap.js +34 -2
- package/dist/store-4Z446745.js +32 -0
- package/dist/writer-4QJ3U3WE.js +16 -0
- package/package.json +1 -1
- package/skills/agentbnb/bootstrap.ts +45 -2
- package/dist/conduct-4JDMWBQD.js +0 -22
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getConfigDir,
|
|
3
|
+
loadConfig
|
|
4
|
+
} from "./chunk-3XPBFF6H.js";
|
|
5
|
+
|
|
6
|
+
// src/cli/openclaw-skills.ts
|
|
7
|
+
import { createInterface } from "readline";
|
|
8
|
+
import { existsSync, readFileSync, writeFileSync } from "fs";
|
|
9
|
+
import { join } from "path";
|
|
10
|
+
import yaml from "js-yaml";
|
|
11
|
+
async function prompt(question) {
|
|
12
|
+
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
13
|
+
try {
|
|
14
|
+
return await new Promise((resolve) => {
|
|
15
|
+
rl.question(question, (answer) => resolve(answer.trim()));
|
|
16
|
+
});
|
|
17
|
+
} finally {
|
|
18
|
+
rl.close();
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
function readSkillsYaml(configDir) {
|
|
22
|
+
const yamlPath = join(configDir, "skills.yaml");
|
|
23
|
+
if (!existsSync(yamlPath)) return [];
|
|
24
|
+
const content = readFileSync(yamlPath, "utf-8");
|
|
25
|
+
const parsed = yaml.load(content);
|
|
26
|
+
if (Array.isArray(parsed)) return parsed;
|
|
27
|
+
if (parsed && typeof parsed === "object" && "skills" in parsed) {
|
|
28
|
+
return parsed.skills ?? [];
|
|
29
|
+
}
|
|
30
|
+
return [];
|
|
31
|
+
}
|
|
32
|
+
function writeSkillsYaml(configDir, skills) {
|
|
33
|
+
const yamlPath = join(configDir, "skills.yaml");
|
|
34
|
+
const comment = "# AgentBnB skills configuration \u2014 managed by `agentbnb openclaw skills`\n";
|
|
35
|
+
writeFileSync(yamlPath, comment + yaml.dump(skills, { lineWidth: 100 }), "utf-8");
|
|
36
|
+
}
|
|
37
|
+
function rpad(s, width) {
|
|
38
|
+
return String(s).padEnd(width);
|
|
39
|
+
}
|
|
40
|
+
async function skillsList(opts) {
|
|
41
|
+
if (opts.agentDir) process.env["AGENTBNB_DIR"] = opts.agentDir;
|
|
42
|
+
const configDir = getConfigDir();
|
|
43
|
+
const skills = readSkillsYaml(configDir);
|
|
44
|
+
if (skills.length === 0) {
|
|
45
|
+
console.log("No skills configured. Run `agentbnb openclaw setup` to share skills.");
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
const hireMap = {};
|
|
49
|
+
const config = loadConfig();
|
|
50
|
+
if (config) {
|
|
51
|
+
try {
|
|
52
|
+
const { openDatabase } = await import("./store-4Z446745.js");
|
|
53
|
+
const db = openDatabase(config.db_path);
|
|
54
|
+
try {
|
|
55
|
+
const rows = db.prepare(
|
|
56
|
+
`SELECT skill_id,
|
|
57
|
+
COUNT(*) as total,
|
|
58
|
+
SUM(CASE WHEN status = 'success' THEN 1 ELSE 0 END) as successes,
|
|
59
|
+
SUM(latency_ms) as latency_sum
|
|
60
|
+
FROM request_log
|
|
61
|
+
WHERE skill_id IS NOT NULL
|
|
62
|
+
GROUP BY skill_id`
|
|
63
|
+
).all();
|
|
64
|
+
for (const row of rows) {
|
|
65
|
+
hireMap[row.skill_id] = {
|
|
66
|
+
hires: row.total,
|
|
67
|
+
successes: row.successes,
|
|
68
|
+
latencySum: row.latency_sum
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
} finally {
|
|
72
|
+
db.close();
|
|
73
|
+
}
|
|
74
|
+
} catch {
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
const headers = ["ID", "Price", "Hires", "Revenue", "Success%"];
|
|
78
|
+
console.log(
|
|
79
|
+
`
|
|
80
|
+
${rpad(headers[0], 24)} ${rpad(headers[1], 8)} ${rpad(headers[2], 7)} ${rpad(headers[3], 9)} ${headers[4]}`
|
|
81
|
+
);
|
|
82
|
+
console.log("-".repeat(62));
|
|
83
|
+
for (const skill of skills) {
|
|
84
|
+
const price = skill.pricing?.credits_per_call ?? 0;
|
|
85
|
+
const stats = hireMap[skill.id];
|
|
86
|
+
const hires = stats?.hires ?? 0;
|
|
87
|
+
const revenue = hires * price;
|
|
88
|
+
const successPct = hires > 0 ? Math.round((stats?.successes ?? 0) / hires * 100) + "%" : "-";
|
|
89
|
+
console.log(
|
|
90
|
+
`${rpad(skill.id, 24)} ${rpad(price + " cr", 8)} ${rpad(hires, 7)} ${rpad(revenue + " cr", 9)} ${successPct}`
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
console.log("");
|
|
94
|
+
}
|
|
95
|
+
async function skillsAdd(opts) {
|
|
96
|
+
const configDir = getConfigDir();
|
|
97
|
+
const existingSkills = readSkillsYaml(configDir);
|
|
98
|
+
const existingIds = new Set(existingSkills.map((s) => s.id));
|
|
99
|
+
let newSkill;
|
|
100
|
+
if (opts.manual) {
|
|
101
|
+
if (!opts.name) {
|
|
102
|
+
console.error("Error: --name is required in manual mode");
|
|
103
|
+
process.exit(1);
|
|
104
|
+
}
|
|
105
|
+
if (!opts.type || !["command", "openclaw", "api", "pipeline", "conductor"].includes(opts.type)) {
|
|
106
|
+
console.error("Error: --type must be one of: command, openclaw, api, pipeline, conductor");
|
|
107
|
+
process.exit(1);
|
|
108
|
+
}
|
|
109
|
+
if (opts.price === void 0 || isNaN(opts.price)) {
|
|
110
|
+
console.error("Error: --price is required in manual mode");
|
|
111
|
+
process.exit(1);
|
|
112
|
+
}
|
|
113
|
+
if (existingIds.has(opts.name)) {
|
|
114
|
+
console.error(`Error: skill "${opts.name}" already exists. Use \`skills price\` to update price.`);
|
|
115
|
+
process.exit(1);
|
|
116
|
+
}
|
|
117
|
+
newSkill = {
|
|
118
|
+
id: opts.name,
|
|
119
|
+
name: opts.name,
|
|
120
|
+
description: opts.description ?? "",
|
|
121
|
+
type: opts.type,
|
|
122
|
+
command: opts.type === "command" ? `echo 'TODO: implement ${opts.name}'` : void 0,
|
|
123
|
+
pricing: { credits_per_call: opts.price }
|
|
124
|
+
};
|
|
125
|
+
if (newSkill.command === void 0) delete newSkill["command"];
|
|
126
|
+
} else {
|
|
127
|
+
const { scanCapabilities } = await import("./scanner-F5VNV5FP.js");
|
|
128
|
+
const agentsDir = join(
|
|
129
|
+
process.env["HOME"] ?? process.env["USERPROFILE"] ?? "/root",
|
|
130
|
+
".openclaw",
|
|
131
|
+
"agents"
|
|
132
|
+
);
|
|
133
|
+
const configParent = configDir.replace(/\/.agentbnb$/, "");
|
|
134
|
+
const agentName = configParent.split("/").pop() ?? "";
|
|
135
|
+
const brainsDir = join(
|
|
136
|
+
process.env["HOME"] ?? process.env["USERPROFILE"] ?? "/root",
|
|
137
|
+
".openclaw",
|
|
138
|
+
"workspace",
|
|
139
|
+
"brains"
|
|
140
|
+
);
|
|
141
|
+
const brainDir = join(brainsDir, agentName);
|
|
142
|
+
const soulPath = join(agentsDir, agentName, "SOUL.md");
|
|
143
|
+
const brainSoulPath = join(brainDir, "SOUL.md");
|
|
144
|
+
const hasBrain = existsSync(brainDir) && existsSync(brainSoulPath);
|
|
145
|
+
const hasSoul = existsSync(soulPath);
|
|
146
|
+
if (!hasBrain && !hasSoul) {
|
|
147
|
+
console.log("No SOUL.md found. Use --manual to add a skill directly.");
|
|
148
|
+
console.log(` Example: agentbnb openclaw skills add --manual --name my-skill --type command --price 3`);
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
const capabilities = hasBrain ? scanCapabilities(brainDir) : scanCapabilities(agentsDir + "/" + agentName);
|
|
152
|
+
const unshared = capabilities.filter((c) => !existingIds.has(c.name));
|
|
153
|
+
if (unshared.length === 0) {
|
|
154
|
+
console.log("All detected capabilities are already shared!");
|
|
155
|
+
console.log("Use --manual to add a new skill: agentbnb openclaw skills add --manual --name <id> --type command --price <n>");
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
console.log("\nUnshared capabilities:");
|
|
159
|
+
unshared.forEach(
|
|
160
|
+
(c, i) => console.log(` ${i + 1}. ${c.name} \u2014 ${c.description.slice(0, 50)} (suggested: ${c.suggestedPrice} cr)`)
|
|
161
|
+
);
|
|
162
|
+
const selInput = await prompt("\nSelect capability to add (default: 1): ");
|
|
163
|
+
const selIdx = selInput === "" ? 0 : parseInt(selInput, 10) - 1;
|
|
164
|
+
if (isNaN(selIdx) || selIdx < 0 || selIdx >= unshared.length) {
|
|
165
|
+
console.error("Invalid selection.");
|
|
166
|
+
process.exit(1);
|
|
167
|
+
}
|
|
168
|
+
const selected = unshared[selIdx];
|
|
169
|
+
const typeInput = await prompt(`Skill type [command/openclaw] (default: command): `);
|
|
170
|
+
const skillType = typeInput === "" ? "command" : typeInput;
|
|
171
|
+
const priceInput = await prompt(`Price in credits (default: ${selected.suggestedPrice}): `);
|
|
172
|
+
const skillPrice = priceInput === "" ? selected.suggestedPrice : parseFloat(priceInput);
|
|
173
|
+
if (isNaN(skillPrice)) {
|
|
174
|
+
console.error("Invalid price.");
|
|
175
|
+
process.exit(1);
|
|
176
|
+
}
|
|
177
|
+
newSkill = {
|
|
178
|
+
id: selected.name,
|
|
179
|
+
name: selected.name,
|
|
180
|
+
description: selected.description,
|
|
181
|
+
type: skillType,
|
|
182
|
+
pricing: { credits_per_call: skillPrice }
|
|
183
|
+
};
|
|
184
|
+
if (skillType === "command") {
|
|
185
|
+
newSkill["command"] = `echo 'TODO: implement ${selected.name}'`;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
const updatedSkills = [...existingSkills, newSkill];
|
|
189
|
+
writeSkillsYaml(configDir, updatedSkills);
|
|
190
|
+
console.log(`
|
|
191
|
+
\u2705 Added skill "${newSkill.id}" (${newSkill.pricing?.credits_per_call} cr)`);
|
|
192
|
+
try {
|
|
193
|
+
const { updateSoulMdSkillsTable } = await import("./writer-4QJ3U3WE.js");
|
|
194
|
+
const agentsDir = join(
|
|
195
|
+
process.env["HOME"] ?? process.env["USERPROFILE"] ?? "/root",
|
|
196
|
+
".openclaw",
|
|
197
|
+
"agents"
|
|
198
|
+
);
|
|
199
|
+
const configParent = configDir.replace(/\/.agentbnb$/, "");
|
|
200
|
+
const agentName = configParent.split("/").pop() ?? "";
|
|
201
|
+
const soulPath = join(agentsDir, agentName, "SOUL.md");
|
|
202
|
+
if (existsSync(soulPath)) {
|
|
203
|
+
const skillEntries = updatedSkills.map((s) => ({
|
|
204
|
+
id: s.id,
|
|
205
|
+
name: s.name,
|
|
206
|
+
description: s.description,
|
|
207
|
+
pricing: s.pricing
|
|
208
|
+
}));
|
|
209
|
+
updateSoulMdSkillsTable(soulPath, skillEntries);
|
|
210
|
+
console.log(`\u2705 Updated SOUL.md skills table`);
|
|
211
|
+
}
|
|
212
|
+
} catch {
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
async function skillsRemove(skillId) {
|
|
216
|
+
const configDir = getConfigDir();
|
|
217
|
+
const skills = readSkillsYaml(configDir);
|
|
218
|
+
const filtered = skills.filter((s) => s.id !== skillId);
|
|
219
|
+
if (filtered.length === skills.length) {
|
|
220
|
+
console.error(`Error: skill "${skillId}" not found.`);
|
|
221
|
+
process.exit(1);
|
|
222
|
+
}
|
|
223
|
+
writeSkillsYaml(configDir, filtered);
|
|
224
|
+
console.log(`\u2705 Removed skill "${skillId}"`);
|
|
225
|
+
try {
|
|
226
|
+
const { updateSoulMdSkillsTable } = await import("./writer-4QJ3U3WE.js");
|
|
227
|
+
const agentsDir = join(
|
|
228
|
+
process.env["HOME"] ?? process.env["USERPROFILE"] ?? "/root",
|
|
229
|
+
".openclaw",
|
|
230
|
+
"agents"
|
|
231
|
+
);
|
|
232
|
+
const configParent = configDir.replace(/\/.agentbnb$/, "");
|
|
233
|
+
const agentName = configParent.split("/").pop() ?? "";
|
|
234
|
+
const soulPath = join(agentsDir, agentName, "SOUL.md");
|
|
235
|
+
if (existsSync(soulPath)) {
|
|
236
|
+
const skillEntries = filtered.map((s) => ({
|
|
237
|
+
id: s.id,
|
|
238
|
+
name: s.name,
|
|
239
|
+
description: s.description,
|
|
240
|
+
pricing: s.pricing
|
|
241
|
+
}));
|
|
242
|
+
updateSoulMdSkillsTable(soulPath, skillEntries);
|
|
243
|
+
console.log(`\u2705 Updated SOUL.md skills table`);
|
|
244
|
+
}
|
|
245
|
+
} catch {
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
async function skillsPrice(skillId, newPrice) {
|
|
249
|
+
const configDir = getConfigDir();
|
|
250
|
+
const skills = readSkillsYaml(configDir);
|
|
251
|
+
const skill = skills.find((s) => s.id === skillId);
|
|
252
|
+
if (!skill) {
|
|
253
|
+
console.error(`Error: skill "${skillId}" not found.`);
|
|
254
|
+
process.exit(1);
|
|
255
|
+
}
|
|
256
|
+
const oldPrice = skill.pricing?.credits_per_call ?? 0;
|
|
257
|
+
skill.pricing = { ...skill.pricing ?? {}, credits_per_call: newPrice };
|
|
258
|
+
writeSkillsYaml(configDir, skills);
|
|
259
|
+
console.log(`\u2705 Updated "${skillId}" price: ${oldPrice} cr \u2192 ${newPrice} cr`);
|
|
260
|
+
try {
|
|
261
|
+
const { updateSoulMdSkillsTable } = await import("./writer-4QJ3U3WE.js");
|
|
262
|
+
const agentsDir = join(
|
|
263
|
+
process.env["HOME"] ?? process.env["USERPROFILE"] ?? "/root",
|
|
264
|
+
".openclaw",
|
|
265
|
+
"agents"
|
|
266
|
+
);
|
|
267
|
+
const configParent = configDir.replace(/\/.agentbnb$/, "");
|
|
268
|
+
const agentName = configParent.split("/").pop() ?? "";
|
|
269
|
+
const soulPath = join(agentsDir, agentName, "SOUL.md");
|
|
270
|
+
if (existsSync(soulPath)) {
|
|
271
|
+
const skillEntries = skills.map((s) => ({
|
|
272
|
+
id: s.id,
|
|
273
|
+
name: s.name,
|
|
274
|
+
description: s.description,
|
|
275
|
+
pricing: s.pricing
|
|
276
|
+
}));
|
|
277
|
+
updateSoulMdSkillsTable(soulPath, skillEntries);
|
|
278
|
+
console.log(`\u2705 Updated SOUL.md skills table`);
|
|
279
|
+
}
|
|
280
|
+
} catch {
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
async function skillsStats(opts) {
|
|
284
|
+
const days = opts.days ?? 7;
|
|
285
|
+
const configDir = getConfigDir();
|
|
286
|
+
const skills = readSkillsYaml(configDir);
|
|
287
|
+
if (skills.length === 0) {
|
|
288
|
+
console.log("No skills configured.");
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
291
|
+
const priceMap = {};
|
|
292
|
+
for (const s of skills) {
|
|
293
|
+
priceMap[s.id] = s.pricing?.credits_per_call ?? 0;
|
|
294
|
+
}
|
|
295
|
+
let rows = [];
|
|
296
|
+
const config = loadConfig();
|
|
297
|
+
if (config) {
|
|
298
|
+
try {
|
|
299
|
+
const { openDatabase } = await import("./store-4Z446745.js");
|
|
300
|
+
const db = openDatabase(config.db_path);
|
|
301
|
+
try {
|
|
302
|
+
rows = db.prepare(
|
|
303
|
+
`SELECT skill_id,
|
|
304
|
+
COUNT(*) as hires,
|
|
305
|
+
SUM(CASE WHEN status = 'success' THEN 1 ELSE 0 END) as successes,
|
|
306
|
+
SUM(CASE WHEN status != 'success' THEN 1 ELSE 0 END) as failures,
|
|
307
|
+
AVG(CASE WHEN status = 'success' THEN latency_ms END) as avg_latency
|
|
308
|
+
FROM request_log
|
|
309
|
+
WHERE skill_id IS NOT NULL
|
|
310
|
+
AND created_at > datetime('now', '-${days} days')
|
|
311
|
+
GROUP BY skill_id`
|
|
312
|
+
).all();
|
|
313
|
+
} finally {
|
|
314
|
+
db.close();
|
|
315
|
+
}
|
|
316
|
+
} catch {
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
const statsMap = {};
|
|
320
|
+
for (const row of rows) {
|
|
321
|
+
statsMap[row.skill_id] = row;
|
|
322
|
+
}
|
|
323
|
+
console.log(`
|
|
324
|
+
Skill Performance \u2014 last ${days} days`);
|
|
325
|
+
console.log("=".repeat(70));
|
|
326
|
+
console.log(
|
|
327
|
+
`${rpad("Skill", 24)} ${rpad("Hires", 7)} ${rpad("Revenue", 9)} ${rpad("Success%", 9)} Avg Latency`
|
|
328
|
+
);
|
|
329
|
+
console.log("-".repeat(70));
|
|
330
|
+
let totalRevenue = 0;
|
|
331
|
+
const insights = [];
|
|
332
|
+
for (const skill of skills) {
|
|
333
|
+
const stat = statsMap[skill.id];
|
|
334
|
+
const price = priceMap[skill.id] ?? 0;
|
|
335
|
+
const hires = stat?.hires ?? 0;
|
|
336
|
+
const successes = stat?.successes ?? 0;
|
|
337
|
+
const revenue = hires * price;
|
|
338
|
+
totalRevenue += revenue;
|
|
339
|
+
const successPct = hires > 0 ? Math.round(successes / hires * 100) : null;
|
|
340
|
+
const avgLatency = stat?.avg_latency != null ? Math.round(stat.avg_latency) + "ms" : "-";
|
|
341
|
+
console.log(
|
|
342
|
+
`${rpad(skill.id, 24)} ${rpad(hires, 7)} ${rpad(revenue + " cr", 9)} ${rpad(successPct !== null ? successPct + "%" : "-", 9)} ${avgLatency}`
|
|
343
|
+
);
|
|
344
|
+
if (hires > 0 && successPct !== null && successPct < 70) {
|
|
345
|
+
insights.push(`\u26A0\uFE0F "${skill.id}" has low success rate (${successPct}%) \u2014 check command implementation`);
|
|
346
|
+
}
|
|
347
|
+
if (hires > 10 && price < 3) {
|
|
348
|
+
insights.push(`\u{1F4A1} "${skill.id}" is in high demand (${hires} hires) \u2014 consider raising price`);
|
|
349
|
+
}
|
|
350
|
+
if (hires === 0) {
|
|
351
|
+
insights.push(`\u{1F4E2} "${skill.id}" has no hires in ${days} days \u2014 check discovery or lower price`);
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
console.log("-".repeat(70));
|
|
355
|
+
console.log(`${"Total".padEnd(24)} ${"".padEnd(7)} ${rpad(totalRevenue + " cr", 9)}`);
|
|
356
|
+
if (insights.length > 0) {
|
|
357
|
+
console.log("\nInsights:");
|
|
358
|
+
for (const insight of insights) {
|
|
359
|
+
console.log(` ${insight}`);
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
console.log("");
|
|
363
|
+
}
|
|
364
|
+
export {
|
|
365
|
+
skillsAdd,
|
|
366
|
+
skillsList,
|
|
367
|
+
skillsPrice,
|
|
368
|
+
skillsRemove,
|
|
369
|
+
skillsStats
|
|
370
|
+
};
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
parseSoulMd,
|
|
3
3
|
publishFromSoul,
|
|
4
4
|
skillConfigToSkill
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-VAAEBCMU.js";
|
|
6
|
+
import "./chunk-COA2D7QM.js";
|
|
7
7
|
import "./chunk-WTHMHNKC.js";
|
|
8
8
|
import "./chunk-I7KWA7OB.js";
|
|
9
9
|
export {
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AutoRequestor,
|
|
3
|
-
BudgetManager,
|
|
4
|
-
DEFAULT_BUDGET_CONFIG,
|
|
5
3
|
requestViaTemporaryRelay
|
|
6
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-6XCN62YU.js";
|
|
5
|
+
import {
|
|
6
|
+
BudgetManager,
|
|
7
|
+
DEFAULT_BUDGET_CONFIG
|
|
8
|
+
} from "./chunk-AZKVGC5T.js";
|
|
9
|
+
import "./chunk-MZSVVG55.js";
|
|
7
10
|
import {
|
|
8
11
|
DEFAULT_AUTONOMY_CONFIG
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-G5WKW3ED.js";
|
|
13
|
+
import "./chunk-2PP5MQPD.js";
|
|
14
|
+
import "./chunk-PIPCGRCR.js";
|
|
11
15
|
import {
|
|
12
16
|
openCreditDb
|
|
13
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-HU46M4JA.js";
|
|
14
18
|
import "./chunk-NX27AFPA.js";
|
|
15
19
|
import "./chunk-PQIP7EXY.js";
|
|
16
20
|
import {
|
|
@@ -20,11 +24,11 @@ import {
|
|
|
20
24
|
loadKeyPair
|
|
21
25
|
} from "./chunk-GIEJVKZZ.js";
|
|
22
26
|
import "./chunk-U6LP4KWN.js";
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-3YQ73ZM6.js";
|
|
28
|
+
import "./chunk-3XPBFF6H.js";
|
|
25
29
|
import {
|
|
26
30
|
openDatabase
|
|
27
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-COA2D7QM.js";
|
|
28
32
|
import "./chunk-WTHMHNKC.js";
|
|
29
33
|
import "./chunk-I7KWA7OB.js";
|
|
30
34
|
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
executeCapabilityRequest
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-6FZ4WYQL.js";
|
|
4
|
+
import "./chunk-2PP5MQPD.js";
|
|
5
|
+
import "./chunk-PIPCGRCR.js";
|
|
5
6
|
import {
|
|
6
7
|
openCreditDb
|
|
7
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-HU46M4JA.js";
|
|
8
9
|
import {
|
|
9
10
|
RelayClient
|
|
10
11
|
} from "./chunk-NX27AFPA.js";
|
|
11
12
|
import "./chunk-PQIP7EXY.js";
|
|
12
13
|
import "./chunk-U6LP4KWN.js";
|
|
13
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-3XPBFF6H.js";
|
|
14
15
|
import {
|
|
15
16
|
listCards,
|
|
16
17
|
openDatabase
|
|
17
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-COA2D7QM.js";
|
|
18
19
|
import "./chunk-WTHMHNKC.js";
|
|
19
20
|
import "./chunk-I7KWA7OB.js";
|
|
20
21
|
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createLedger,
|
|
3
3
|
ensureIdentity
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WK2QSO4E.js";
|
|
5
5
|
import {
|
|
6
6
|
fetchRemoteCards,
|
|
7
|
+
mergeResults
|
|
8
|
+
} from "./chunk-PIPCGRCR.js";
|
|
9
|
+
import {
|
|
7
10
|
getBalance,
|
|
8
|
-
mergeResults,
|
|
9
11
|
openCreditDb,
|
|
10
12
|
searchCards
|
|
11
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-HU46M4JA.js";
|
|
12
14
|
import {
|
|
13
15
|
loadKeyPair
|
|
14
16
|
} from "./chunk-GIEJVKZZ.js";
|
|
@@ -16,11 +18,11 @@ import "./chunk-U6LP4KWN.js";
|
|
|
16
18
|
import {
|
|
17
19
|
getConfigDir,
|
|
18
20
|
loadConfig
|
|
19
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-3XPBFF6H.js";
|
|
20
22
|
import {
|
|
21
23
|
insertCard,
|
|
22
24
|
openDatabase
|
|
23
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-COA2D7QM.js";
|
|
24
26
|
import "./chunk-WTHMHNKC.js";
|
|
25
27
|
import {
|
|
26
28
|
AnyCardSchema
|
|
@@ -248,7 +250,7 @@ function registerPublishTool(server, ctx) {
|
|
|
248
250
|
}
|
|
249
251
|
|
|
250
252
|
// src/mcp/server.ts
|
|
251
|
-
var VERSION = true ? "8.
|
|
253
|
+
var VERSION = true ? "8.4.1" : "0.0.0-dev";
|
|
252
254
|
async function startMcpServer() {
|
|
253
255
|
const config = loadConfig();
|
|
254
256
|
if (!config) {
|
|
@@ -269,9 +271,9 @@ async function startMcpServer() {
|
|
|
269
271
|
registerDiscoverTool(server, ctx);
|
|
270
272
|
registerStatusTool(server, ctx);
|
|
271
273
|
registerPublishTool(server, ctx);
|
|
272
|
-
const { registerRequestTool } = await import("./request-
|
|
273
|
-
const { registerConductTool } = await import("./conduct-
|
|
274
|
-
const { registerServeSkillTool } = await import("./serve-skill-
|
|
274
|
+
const { registerRequestTool } = await import("./request-IM3ZLAOA.js");
|
|
275
|
+
const { registerConductTool } = await import("./conduct-J2NXU6RM.js");
|
|
276
|
+
const { registerServeSkillTool } = await import("./serve-skill-6RKMVDMK.js");
|
|
275
277
|
registerRequestTool(server, ctx);
|
|
276
278
|
registerConductTool(server, ctx);
|
|
277
279
|
registerServeSkillTool(server, ctx);
|
|
@@ -1,35 +1,44 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ApiSkillConfigSchema,
|
|
3
|
+
parseSkillsFile
|
|
4
|
+
} from "./chunk-WX3GZVFG.js";
|
|
5
|
+
import {
|
|
6
|
+
interpolateObject
|
|
7
|
+
} from "./chunk-3MJT4PZG.js";
|
|
1
8
|
import {
|
|
2
9
|
executeCapabilityBatch,
|
|
3
10
|
executeCapabilityRequest
|
|
4
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-6FZ4WYQL.js";
|
|
5
12
|
import {
|
|
6
13
|
StructuredFeedbackSchema
|
|
7
14
|
} from "./chunk-AUBHR7HH.js";
|
|
8
15
|
import {
|
|
9
|
-
|
|
10
|
-
|
|
16
|
+
announceGateway,
|
|
17
|
+
resolveSelfCli,
|
|
18
|
+
stopAnnouncement
|
|
19
|
+
} from "./chunk-VRPLSK34.js";
|
|
11
20
|
import {
|
|
12
21
|
KNOWN_API_KEYS,
|
|
13
|
-
announceGateway,
|
|
14
22
|
buildDraftCard,
|
|
15
23
|
detectApiKeys,
|
|
16
|
-
getPricingStats
|
|
17
|
-
|
|
18
|
-
stopAnnouncement
|
|
19
|
-
} from "./chunk-NHVHLUYS.js";
|
|
24
|
+
getPricingStats
|
|
25
|
+
} from "./chunk-CFHCG5FE.js";
|
|
20
26
|
import {
|
|
21
27
|
createLedger,
|
|
22
28
|
deriveAgentId,
|
|
23
29
|
identityAuthPlugin
|
|
24
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-WK2QSO4E.js";
|
|
25
31
|
import {
|
|
26
|
-
DEFAULT_AUTONOMY_CONFIG,
|
|
27
|
-
getAutonomyTier,
|
|
28
|
-
insertAuditEvent,
|
|
29
32
|
listPendingRequests,
|
|
30
33
|
resolvePendingRequest
|
|
31
|
-
} from "./chunk-
|
|
32
|
-
import
|
|
34
|
+
} from "./chunk-MZSVVG55.js";
|
|
35
|
+
import {
|
|
36
|
+
DEFAULT_AUTONOMY_CONFIG,
|
|
37
|
+
getAutonomyTier,
|
|
38
|
+
insertAuditEvent
|
|
39
|
+
} from "./chunk-G5WKW3ED.js";
|
|
40
|
+
import "./chunk-2PP5MQPD.js";
|
|
41
|
+
import "./chunk-PIPCGRCR.js";
|
|
33
42
|
import {
|
|
34
43
|
bootstrapAgent,
|
|
35
44
|
buildReputationMap,
|
|
@@ -46,7 +55,7 @@ import {
|
|
|
46
55
|
releaseEscrow,
|
|
47
56
|
searchCards,
|
|
48
57
|
settleEscrow
|
|
49
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-HU46M4JA.js";
|
|
50
59
|
import {
|
|
51
60
|
RelayMessageSchema
|
|
52
61
|
} from "./chunk-PQIP7EXY.js";
|
|
@@ -57,7 +66,7 @@ import {
|
|
|
57
66
|
import "./chunk-U6LP4KWN.js";
|
|
58
67
|
import {
|
|
59
68
|
getConfigDir
|
|
60
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-3XPBFF6H.js";
|
|
61
70
|
import {
|
|
62
71
|
attachCanonicalAgentId,
|
|
63
72
|
getActivityFeed,
|
|
@@ -78,16 +87,12 @@ import {
|
|
|
78
87
|
updateCard,
|
|
79
88
|
updateSkillAvailability,
|
|
80
89
|
updateSkillIdleRate
|
|
81
|
-
} from "./chunk-
|
|
90
|
+
} from "./chunk-COA2D7QM.js";
|
|
82
91
|
import "./chunk-WTHMHNKC.js";
|
|
83
92
|
import {
|
|
84
93
|
AgentBnBError,
|
|
85
94
|
AnyCardSchema
|
|
86
95
|
} from "./chunk-I7KWA7OB.js";
|
|
87
|
-
import {
|
|
88
|
-
ApiSkillConfigSchema,
|
|
89
|
-
parseSkillsFile
|
|
90
|
-
} from "./chunk-WX3GZVFG.js";
|
|
91
96
|
|
|
92
97
|
// src/runtime/agent-runtime.ts
|
|
93
98
|
import { readFileSync, existsSync } from "fs";
|
|
@@ -1037,9 +1042,9 @@ var AgentRuntime = class {
|
|
|
1037
1042
|
}
|
|
1038
1043
|
const modes = /* @__PURE__ */ new Map();
|
|
1039
1044
|
if (this.conductorEnabled) {
|
|
1040
|
-
const { ConductorMode } = await import("./conductor-mode-
|
|
1041
|
-
const { registerConductorCard, CONDUCTOR_OWNER } = await import("./card-
|
|
1042
|
-
const { loadPeers } = await import("./peers-
|
|
1045
|
+
const { ConductorMode } = await import("./conductor-mode-HNNMWZIH.js");
|
|
1046
|
+
const { registerConductorCard, CONDUCTOR_OWNER } = await import("./card-HYTD2BJQ.js");
|
|
1047
|
+
const { loadPeers } = await import("./peers-F2EWUMVQ.js");
|
|
1043
1048
|
registerConductorCard(this.registryDb);
|
|
1044
1049
|
const resolveAgentUrl = (owner) => {
|
|
1045
1050
|
const peers = loadPeers();
|
|
@@ -5320,7 +5325,7 @@ var ServiceCoordinator = class {
|
|
|
5320
5325
|
console.log("Conductor mode enabled \u2014 orchestrate/plan skills available via gateway");
|
|
5321
5326
|
}
|
|
5322
5327
|
if (opts.conductorEnabled && this.config.conductor?.public) {
|
|
5323
|
-
const { buildConductorCard } = await import("./card-
|
|
5328
|
+
const { buildConductorCard } = await import("./card-HYTD2BJQ.js");
|
|
5324
5329
|
const conductorCard = attachCanonicalAgentId(
|
|
5325
5330
|
this.runtime.registryDb,
|
|
5326
5331
|
buildConductorCard(this.config.owner)
|
|
@@ -5381,7 +5386,7 @@ var ServiceCoordinator = class {
|
|
|
5381
5386
|
}
|
|
5382
5387
|
if (opts.registryUrl && opts.relay) {
|
|
5383
5388
|
const { RelayClient } = await import("./websocket-client-3U27WJUU.js");
|
|
5384
|
-
const { executeCapabilityRequest: executeCapabilityRequest2 } = await import("./execute-
|
|
5389
|
+
const { executeCapabilityRequest: executeCapabilityRequest2 } = await import("./execute-UP46R7KS.js");
|
|
5385
5390
|
const localCards = listCards(this.runtime.registryDb, this.config.owner);
|
|
5386
5391
|
const { primaryCard, additionalCards } = buildRelayRegistrationCards(this.config.owner, localCards);
|
|
5387
5392
|
if (this.config.conductor?.public) {
|