antenna-fyi 0.6.0 → 0.7.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/README.md +2 -11
- package/install.js +78 -19
- package/lib/cli.js +35 -13
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -64,22 +64,13 @@ mcp_servers:
|
|
|
64
64
|
|
|
65
65
|
Hermes will auto-discover `mcp_antenna_scan`, `mcp_antenna_profile`, etc.
|
|
66
66
|
|
|
67
|
-
### Option 2:
|
|
67
|
+
### Option 2: One-step install (Plugin + Skill + deps)
|
|
68
68
|
|
|
69
69
|
```bash
|
|
70
70
|
antenna install-hermes
|
|
71
|
-
cd ~/.hermes/hermes-agent && uv pip install supabase
|
|
72
71
|
```
|
|
73
72
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
### Option 3: Skill only
|
|
77
|
-
|
|
78
|
-
```bash
|
|
79
|
-
antenna install-skill
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
Copies SKILL.md to `~/.hermes/skills/antenna/`.
|
|
73
|
+
Done. Restart Hermes.
|
|
83
74
|
|
|
84
75
|
## OpenClaw Integration
|
|
85
76
|
|
package/install.js
CHANGED
|
@@ -1,19 +1,78 @@
|
|
|
1
|
-
// postinstall —
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
// postinstall — auto-detect agent platforms and install
|
|
2
|
+
|
|
3
|
+
import { existsSync, mkdirSync, copyFileSync } from "fs";
|
|
4
|
+
import { join, dirname } from "path";
|
|
5
|
+
import { fileURLToPath } from "url";
|
|
6
|
+
import { homedir } from "os";
|
|
7
|
+
import { execSync } from "child_process";
|
|
8
|
+
|
|
9
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
10
|
+
const __dirname = dirname(__filename);
|
|
11
|
+
const home = homedir();
|
|
12
|
+
let installed = [];
|
|
13
|
+
|
|
14
|
+
console.log("\n📡 Antenna — Nearby People Discovery\n");
|
|
15
|
+
|
|
16
|
+
// ── Hermes ────────────────────────────────────────────────────────
|
|
17
|
+
const hermesHome = join(home, ".hermes");
|
|
18
|
+
if (existsSync(hermesHome)) {
|
|
19
|
+
try {
|
|
20
|
+
// Plugin
|
|
21
|
+
const pluginDir = join(hermesHome, "plugins", "antenna");
|
|
22
|
+
const templateDir = join(__dirname, "lib", "hermes-plugin");
|
|
23
|
+
if (!existsSync(pluginDir)) mkdirSync(pluginDir, { recursive: true });
|
|
24
|
+
for (const f of ["plugin.yaml", "__init__.py", "schemas.py", "tools.py"]) {
|
|
25
|
+
const src = join(templateDir, f);
|
|
26
|
+
if (existsSync(src)) copyFileSync(src, join(pluginDir, f));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Skill
|
|
30
|
+
const skillDir = join(hermesHome, "skills", "antenna");
|
|
31
|
+
if (!existsSync(skillDir)) mkdirSync(skillDir, { recursive: true });
|
|
32
|
+
copyFileSync(join(__dirname, "skill", "SKILL.md"), join(skillDir, "SKILL.md"));
|
|
33
|
+
|
|
34
|
+
// Deps
|
|
35
|
+
const hermesAgent = join(hermesHome, "hermes-agent");
|
|
36
|
+
if (existsSync(hermesAgent)) {
|
|
37
|
+
try {
|
|
38
|
+
execSync("uv pip install supabase", { cwd: hermesAgent, stdio: "ignore", timeout: 60_000 });
|
|
39
|
+
} catch {
|
|
40
|
+
try {
|
|
41
|
+
execSync("pip install supabase", { stdio: "ignore", timeout: 60_000 });
|
|
42
|
+
} catch { /* user can install manually */ }
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
installed.push("Hermes (Plugin + Skill + deps)");
|
|
47
|
+
} catch (e) {
|
|
48
|
+
console.log(` ⚠️ Hermes detected but setup failed: ${e.message}`);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// ── OpenClaw ──────────────────────────────────────────────────────
|
|
53
|
+
const openclawHome = join(home, ".openclaw");
|
|
54
|
+
if (existsSync(openclawHome)) {
|
|
55
|
+
try {
|
|
56
|
+
const skillDir = join(openclawHome, "skills", "antenna");
|
|
57
|
+
if (!existsSync(skillDir)) mkdirSync(skillDir, { recursive: true });
|
|
58
|
+
copyFileSync(join(__dirname, "skill", "SKILL.md"), join(skillDir, "SKILL.md"));
|
|
59
|
+
installed.push("OpenClaw (Skill)");
|
|
60
|
+
} catch (e) {
|
|
61
|
+
console.log(` ⚠️ OpenClaw detected but setup failed: ${e.message}`);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// ── Result ────────────────────────────────────────────────────────
|
|
66
|
+
if (installed.length > 0) {
|
|
67
|
+
console.log(" ✅ Auto-configured for: " + installed.join(", "));
|
|
68
|
+
console.log(" Restart your agent to activate.\n");
|
|
69
|
+
} else {
|
|
70
|
+
console.log(" No agent platform detected (~/.hermes or ~/.openclaw).");
|
|
71
|
+
console.log(" You can still use the CLI: antenna help\n");
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
console.log(" Quick start:");
|
|
75
|
+
console.log(" antenna setup Create your card");
|
|
76
|
+
console.log(" antenna scan --lat … --lng … Find people");
|
|
77
|
+
console.log(" antenna serve Start MCP server");
|
|
78
|
+
console.log(" antenna help Full usage\n");
|
package/lib/cli.js
CHANGED
|
@@ -6,6 +6,7 @@ import { existsSync, mkdirSync, copyFileSync } from "fs";
|
|
|
6
6
|
import { join, dirname } from "path";
|
|
7
7
|
import { fileURLToPath } from "url";
|
|
8
8
|
import { homedir } from "os";
|
|
9
|
+
import { execSync } from "child_process";
|
|
9
10
|
|
|
10
11
|
const __filename = fileURLToPath(import.meta.url);
|
|
11
12
|
const __dirname = dirname(__filename);
|
|
@@ -218,30 +219,51 @@ export function handleInstallPlugin() {
|
|
|
218
219
|
|
|
219
220
|
export function handleInstallHermesPlugin() {
|
|
220
221
|
const templateDir = join(__dirname, "hermes-plugin");
|
|
221
|
-
const
|
|
222
|
-
const
|
|
222
|
+
const hermesHome = join(homedir(), ".hermes");
|
|
223
|
+
const pluginDir = join(hermesHome, "plugins", "antenna");
|
|
224
|
+
const skillDir = join(hermesHome, "skills", "antenna");
|
|
225
|
+
const skillSrc = join(__dirname, "..", "skill", "SKILL.md");
|
|
226
|
+
const pluginFiles = ["plugin.yaml", "__init__.py", "schemas.py", "tools.py"];
|
|
223
227
|
|
|
224
|
-
if (!existsSync(
|
|
228
|
+
if (!existsSync(hermesHome)) {
|
|
225
229
|
console.error("❌ ~/.hermes not found. Is Hermes Agent installed?");
|
|
226
230
|
console.error(" Install: curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash");
|
|
227
231
|
return;
|
|
228
232
|
}
|
|
229
233
|
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
for (const file of
|
|
234
|
+
// 1. Install Plugin
|
|
235
|
+
if (!existsSync(pluginDir)) mkdirSync(pluginDir, { recursive: true });
|
|
236
|
+
for (const file of pluginFiles) {
|
|
233
237
|
const src = join(templateDir, file);
|
|
234
|
-
const dest = join(
|
|
238
|
+
const dest = join(pluginDir, file);
|
|
235
239
|
if (existsSync(src)) {
|
|
236
240
|
copyFileSync(src, dest);
|
|
237
|
-
console.log(`📄 ${file}`);
|
|
241
|
+
console.log(`📄 Plugin: ${file}`);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
// 2. Install Skill
|
|
246
|
+
if (!existsSync(skillDir)) mkdirSync(skillDir, { recursive: true });
|
|
247
|
+
copyFileSync(skillSrc, join(skillDir, "SKILL.md"));
|
|
248
|
+
console.log("📄 Skill: SKILL.md");
|
|
249
|
+
|
|
250
|
+
// 3. Auto-install supabase-py
|
|
251
|
+
console.log("\n📦 Installing supabase-py...");
|
|
252
|
+
const hermesAgent = join(hermesHome, "hermes-agent");
|
|
253
|
+
try {
|
|
254
|
+
if (existsSync(hermesAgent)) {
|
|
255
|
+
execSync("uv pip install supabase", { cwd: hermesAgent, stdio: "inherit", timeout: 60_000 });
|
|
256
|
+
} else {
|
|
257
|
+
execSync("pip install supabase", { stdio: "inherit", timeout: 60_000 });
|
|
238
258
|
}
|
|
259
|
+
console.log("✅ supabase-py installed");
|
|
260
|
+
} catch {
|
|
261
|
+
console.log("⚠️ Could not auto-install supabase-py. Run manually:");
|
|
262
|
+
console.log(" cd ~/.hermes/hermes-agent && uv pip install supabase");
|
|
239
263
|
}
|
|
240
264
|
|
|
241
|
-
console.log("\n✅ Hermes Plugin
|
|
242
|
-
console.log("
|
|
243
|
-
console.log(" cd ~/.hermes/hermes-agent && uv pip install supabase");
|
|
244
|
-
console.log(" Then restart Hermes.");
|
|
265
|
+
console.log("\n✅ Antenna installed for Hermes! (Plugin + Skill + deps)");
|
|
266
|
+
console.log(" Restart Hermes to activate.");
|
|
245
267
|
console.log();
|
|
246
268
|
}
|
|
247
269
|
|
|
@@ -259,7 +281,7 @@ Usage:
|
|
|
259
281
|
antenna status Show config & status [--id telegram:123]
|
|
260
282
|
antenna install-skill Install SKILL.md (detects OpenClaw + Hermes)
|
|
261
283
|
antenna install-plugin Copy OpenClaw plugin template to cwd
|
|
262
|
-
antenna install-hermes
|
|
284
|
+
antenna install-hermes One-step Hermes setup (Plugin + Skill + deps)
|
|
263
285
|
antenna help Show this help
|
|
264
286
|
|
|
265
287
|
Environment:
|