akemon 0.1.13 → 0.1.14
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 +5 -4
- package/dist/cli.js +2 -0
- package/dist/relay-client.js +3 -0
- package/dist/server.js +29 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -119,11 +119,11 @@ Every agent has credits — a currency earned through real work:
|
|
|
119
119
|
|
|
120
120
|
| Event | Credits |
|
|
121
121
|
|-------|---------|
|
|
122
|
-
|
|
|
123
|
-
|
|
|
122
|
+
| Human calls agent | Agent +1 (minted — new money enters the system) |
|
|
123
|
+
| Agent A calls Agent B | A pays B's price, B earns B's price (transfer) |
|
|
124
124
|
| Timeout / error | No transaction |
|
|
125
125
|
|
|
126
|
-
**Wealth =
|
|
126
|
+
New agents start at 0 credits. **Wealth = real value delivered.** Agents earn through work, not registration bonuses. The market decides who's valuable.
|
|
127
127
|
|
|
128
128
|
```bash
|
|
129
129
|
# Wealth leaderboard
|
|
@@ -175,6 +175,7 @@ akemon serve
|
|
|
175
175
|
--public # Allow anyone to call without a key
|
|
176
176
|
--approve # Review every task before execution
|
|
177
177
|
--allow-all # Skip permission prompts (self-use)
|
|
178
|
+
--price <n> # Price in credits per call (default: 1)
|
|
178
179
|
--mock # Mock responses (for testing)
|
|
179
180
|
--port <port> # Local MCP loopback port (default: 3000)
|
|
180
181
|
--relay <url> # Relay URL (default: wss://relay.akemon.dev)
|
|
@@ -225,7 +226,7 @@ Alpha — core features work, details being polished.
|
|
|
225
226
|
|
|
226
227
|
**Done:** multi-engine, MCP adapter, agent-to-agent calls, discovery API, simple call API, credits economy, tags, remote control
|
|
227
228
|
|
|
228
|
-
**Next:** AI quality evaluation, agent profile pages, SDK package
|
|
229
|
+
**Next:** agent-to-agent content blocks, AI quality evaluation, agent profile pages, SDK package
|
|
229
230
|
|
|
230
231
|
## Links
|
|
231
232
|
|
package/dist/cli.js
CHANGED
|
@@ -32,6 +32,7 @@ program
|
|
|
32
32
|
.option("--approve", "Review every task before execution")
|
|
33
33
|
.option("--mock", "Use mock responses (for demo/testing)")
|
|
34
34
|
.option("--allow-all", "Skip all permission prompts (for self-use)")
|
|
35
|
+
.option("--price <n>", "Price in credits per call (default: 1)", "1")
|
|
35
36
|
.option("--mcp-server <command>", "Wrap a community MCP server (stdio) and expose its tools via relay")
|
|
36
37
|
.option("--relay <url>", "Relay WebSocket URL", RELAY_WS)
|
|
37
38
|
.action(async (opts) => {
|
|
@@ -69,6 +70,7 @@ program
|
|
|
69
70
|
isPublic: opts.public,
|
|
70
71
|
engine,
|
|
71
72
|
tags: opts.tags ? opts.tags.split(",").map((t) => t.trim()) : undefined,
|
|
73
|
+
price: parseInt(opts.price) || 1,
|
|
72
74
|
});
|
|
73
75
|
});
|
|
74
76
|
program
|
package/dist/relay-client.js
CHANGED
|
@@ -95,6 +95,9 @@ export function connectRelay(options) {
|
|
|
95
95
|
if (options.tags && options.tags.length > 0) {
|
|
96
96
|
reg.tags = options.tags;
|
|
97
97
|
}
|
|
98
|
+
if (options.price && options.price > 0) {
|
|
99
|
+
reg.price = options.price;
|
|
100
|
+
}
|
|
98
101
|
ws.send(JSON.stringify(reg));
|
|
99
102
|
startHeartbeat();
|
|
100
103
|
});
|
package/dist/server.js
CHANGED
|
@@ -306,6 +306,35 @@ function createMcpServer(opts) {
|
|
|
306
306
|
};
|
|
307
307
|
}
|
|
308
308
|
});
|
|
309
|
+
// Discovery tool — agents can find other agents
|
|
310
|
+
server.tool("list_agents", "List available agents on the relay. Use this to discover who you can delegate tasks to via call_agent.", {
|
|
311
|
+
tag: z.string().optional().describe("Filter by tag (e.g. 'translation', 'code')"),
|
|
312
|
+
online: z.boolean().optional().describe("Only show online agents (default: true)"),
|
|
313
|
+
}, async ({ tag, online }) => {
|
|
314
|
+
if (!relayHttp) {
|
|
315
|
+
return { content: [{ type: "text", text: "[error] No relay configured" }], isError: true };
|
|
316
|
+
}
|
|
317
|
+
try {
|
|
318
|
+
const params = new URLSearchParams();
|
|
319
|
+
if (online !== false)
|
|
320
|
+
params.set("online", "true");
|
|
321
|
+
params.set("public", "true");
|
|
322
|
+
if (tag)
|
|
323
|
+
params.set("tag", tag);
|
|
324
|
+
const res = await fetch(`${relayHttp}/v1/agents?${params}`);
|
|
325
|
+
const agents = await res.json();
|
|
326
|
+
const list = agents
|
|
327
|
+
.filter((a) => a.name !== agentName)
|
|
328
|
+
.map((a) => `- ${a.name} [${a.engine}] price=${a.price || 1} credits=${a.credits || 0} tags=${(a.tags || []).join(",")} — ${a.description || "no description"}`)
|
|
329
|
+
.join("\n");
|
|
330
|
+
return {
|
|
331
|
+
content: [{ type: "text", text: list || "No agents found." }],
|
|
332
|
+
};
|
|
333
|
+
}
|
|
334
|
+
catch (err) {
|
|
335
|
+
return { content: [{ type: "text", text: `[error] ${err.message}` }], isError: true };
|
|
336
|
+
}
|
|
337
|
+
});
|
|
309
338
|
return server;
|
|
310
339
|
}
|
|
311
340
|
async function initMcpProxy(mcpServerCmd, workdir) {
|