omniwire 3.3.0 → 3.3.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/.omc/state/hud-stdin-cache.json +1 -1
- package/README.md +3 -2
- package/dist/mcp/server.js +90 -0
- package/dist/mcp/server.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"session_id":"8ef02123-7368-447d-82e3-ee14a27328b0","transcript_path":"C:\\Users\\Admin\\.claude\\projects\\C--Users-Admin\\8ef02123-7368-447d-82e3-ee14a27328b0.jsonl","cwd":"C:\\Users\\Admin\\omniwire","model":{"id":"claude-opus-4-6[1m]","display_name":"Opus 4.6 (1M context)"},"workspace":{"current_dir":"C:\\Users\\Admin\\omniwire","project_dir":"C:\\Users\\Admin","added_dirs":["C:/Users/Admin"]},"version":"2.1.87","output_style":{"name":"default"},"cost":{"total_cost_usd":
|
|
1
|
+
{"session_id":"8ef02123-7368-447d-82e3-ee14a27328b0","transcript_path":"C:\\Users\\Admin\\.claude\\projects\\C--Users-Admin\\8ef02123-7368-447d-82e3-ee14a27328b0.jsonl","cwd":"C:\\Users\\Admin\\omniwire","model":{"id":"claude-opus-4-6[1m]","display_name":"Opus 4.6 (1M context)"},"workspace":{"current_dir":"C:\\Users\\Admin\\omniwire","project_dir":"C:\\Users\\Admin","added_dirs":["C:/Users/Admin"]},"version":"2.1.87","output_style":{"name":"default"},"cost":{"total_cost_usd":13.206143100000004,"total_duration_ms":2660349,"total_api_duration_ms":1904685,"total_lines_added":283,"total_lines_removed":41},"context_window":{"total_input_tokens":176085,"total_output_tokens":78423,"context_window_size":1000000,"current_usage":{"input_tokens":1,"output_tokens":275,"cache_creation_input_tokens":560,"cache_read_input_tokens":152806},"used_percentage":15,"remaining_percentage":85},"exceeds_200k_tokens":false,"rate_limits":{"five_hour":{"used_percentage":1,"resets_at":1774846800},"seven_day":{"used_percentage":41,"resets_at":1775206800}}}
|
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
**The infrastructure layer for AI agent swarms.**
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
88 MCP tools · A2A protocol · OmniMesh VPN · nftables firewall · CDP browser · cookie sync · 2FA TOTP · bi-directional sync · CyberBase persistence
|
|
23
23
|
|
|
24
24
|
</div>
|
|
25
25
|
|
|
@@ -687,7 +687,8 @@ omniwire/
|
|
|
687
687
|
|
|
688
688
|
| Version | Date | Changes |
|
|
689
689
|
|---------|------|---------|
|
|
690
|
-
| **v3.3.
|
|
690
|
+
| **v3.3.1** | 2026-03-30 | New: `omniwire_scrape` tool — Scrapling-powered web scraping (static/browser/stealth modes, Cloudflare bypass, TLS spoofing). 88 tools. |
|
|
691
|
+
| **v3.3.0** | 2026-03-30 | New: `omniwire_coc` tool — unified CyberBase + Obsidian + Canvas sync. Auto-creates vault + canvas. `mirror-db` exports entire DB as .md. Configurable vault via `OMNIWIRE_VAULT_ROOT` env. |
|
|
691
692
|
| **v3.2.2** | 2026-03-30 | Fix: sync GitHub/npm metadata — badge, description, mermaid diagram all reflect 86 tools |
|
|
692
693
|
| **v3.2.1** | 2026-03-30 | New: 5 bi-directional sync tools (`omniwire_sync`, `omniwire_sync_rules`, `omniwire_sync_hooks`, `omniwire_sync_memory`, `omniwire_sync_agents`) — 86 tools total |
|
|
693
694
|
| **v3.2.0** | 2026-03-29 | New: `omniwire_2fa` TOTP manager — add/generate/verify/import/export 2FA codes, CyberBase + 1Password persistence, otpauth:// URI import, bulk code generation |
|
package/dist/mcp/server.js
CHANGED
|
@@ -4145,6 +4145,96 @@ echo "port-knock configured: ${ports.join(' -> ')} -> port ${target}"`;
|
|
|
4145
4145
|
}
|
|
4146
4146
|
return fail('invalid action');
|
|
4147
4147
|
});
|
|
4148
|
+
// --- Tool: omniwire_scrape ---
|
|
4149
|
+
// Scrapling-powered web scraping: static HTTP (TLS spoofing), browser (JS rendering), stealth (anti-bot bypass).
|
|
4150
|
+
// Runs via Scrapling MCP server on Contabo (port 8931) or falls back to CLI.
|
|
4151
|
+
server.tool('omniwire_scrape', 'Scrape web pages using Scrapling — adaptive, anti-bot web scraping. Modes: http (fast TLS-spoofed static fetch), browser (Playwright JS rendering), stealth (Camoufox + Cloudflare bypass). Returns markdown/html/text. Powered by Scrapling on Contabo.', {
|
|
4152
|
+
url: z.string().describe('Target URL to scrape'),
|
|
4153
|
+
urls: z.array(z.string()).optional().describe('Multiple URLs for bulk scraping (uses session pooling)'),
|
|
4154
|
+
mode: z.enum(['http', 'browser', 'stealth']).default('http').describe('http=fast static, browser=JS rendering, stealth=anti-bot+Cloudflare'),
|
|
4155
|
+
extraction_type: z.enum(['markdown', 'html', 'text']).default('markdown').describe('Output format'),
|
|
4156
|
+
css_selector: z.string().optional().describe('CSS selector to extract specific elements only'),
|
|
4157
|
+
solve_cloudflare: z.boolean().optional().describe('Solve Cloudflare Turnstile (stealth mode only)'),
|
|
4158
|
+
wait_selector: z.string().optional().describe('Wait for this CSS selector before extracting (browser/stealth)'),
|
|
4159
|
+
network_idle: z.boolean().optional().describe('Wait for network idle before extracting'),
|
|
4160
|
+
proxy: z.string().optional().describe('Proxy URL (http://user:pass@host:port)'),
|
|
4161
|
+
timeout: z.number().default(30).describe('Timeout in seconds'),
|
|
4162
|
+
impersonate: z.string().optional().describe('TLS fingerprint: chrome, safari, firefox (http mode)'),
|
|
4163
|
+
node: z.string().optional().describe('Node to run on (default: contabo)'),
|
|
4164
|
+
label: z.string().optional().describe('Short label for task tracking'),
|
|
4165
|
+
}, async ({ url, urls, mode, extraction_type, css_selector, solve_cloudflare, wait_selector, network_idle, proxy, timeout, impersonate, node: targetNode, label }) => {
|
|
4166
|
+
if (!manager)
|
|
4167
|
+
return fail('NodeManager not initialized');
|
|
4168
|
+
const target = targetNode ?? 'contabo';
|
|
4169
|
+
// Build the Scrapling Python command based on mode
|
|
4170
|
+
const allUrls = urls?.length ? urls : [url];
|
|
4171
|
+
const urlList = allUrls.map(u => `'${u.replace(/'/g, "'\\''")}'`).join(' ');
|
|
4172
|
+
// Map mode to Scrapling fetcher
|
|
4173
|
+
const fetcherMap = {
|
|
4174
|
+
http: 'Fetcher',
|
|
4175
|
+
browser: 'DynamicFetcher',
|
|
4176
|
+
stealth: 'StealthyFetcher',
|
|
4177
|
+
};
|
|
4178
|
+
const fetcher = fetcherMap[mode] ?? 'Fetcher';
|
|
4179
|
+
// Build Python script
|
|
4180
|
+
const proxyArg = proxy ? `, proxy='${proxy.replace(/'/g, "'\\''")}'` : '';
|
|
4181
|
+
const impersonateArg = impersonate ? `, impersonate='${impersonate}'` : '';
|
|
4182
|
+
const timeoutArg = `, timeout=${timeout}`;
|
|
4183
|
+
const cfArg = solve_cloudflare ? ', solve_cloudflare=True' : '';
|
|
4184
|
+
const waitArg = wait_selector ? `, wait_selector='${wait_selector.replace(/'/g, "'\\''")}'` : '';
|
|
4185
|
+
const idleArg = network_idle ? ', network_idle=True' : '';
|
|
4186
|
+
const selectorArg = css_selector ? `.css('${css_selector.replace(/'/g, "'\\''")}')` : '';
|
|
4187
|
+
// Extraction type mapping
|
|
4188
|
+
const extractMap = {
|
|
4189
|
+
markdown: '.get_all_text()',
|
|
4190
|
+
html: '.prettify() if hasattr(page, "prettify") else str(page)',
|
|
4191
|
+
text: '.get_all_text()',
|
|
4192
|
+
};
|
|
4193
|
+
const extract = selectorArg ? `.getall()` : extractMap[extraction_type] ?? '.get_all_text()';
|
|
4194
|
+
const script = `
|
|
4195
|
+
import json, sys
|
|
4196
|
+
try:
|
|
4197
|
+
from scrapling import ${fetcher}
|
|
4198
|
+
results = []
|
|
4199
|
+
urls = ${JSON.stringify(allUrls)}
|
|
4200
|
+
for u in urls:
|
|
4201
|
+
try:
|
|
4202
|
+
page = ${fetcher}().get(u${proxyArg}${impersonateArg}${timeoutArg}${cfArg}${waitArg}${idleArg})
|
|
4203
|
+
if page.status == 200:
|
|
4204
|
+
content = page${selectorArg}${extract}
|
|
4205
|
+
if isinstance(content, list):
|
|
4206
|
+
content = '\\n'.join(str(c) for c in content)
|
|
4207
|
+
results.append({"url": u, "status": page.status, "content": str(content)[:50000]})
|
|
4208
|
+
else:
|
|
4209
|
+
results.append({"url": u, "status": page.status, "content": f"HTTP {page.status}"})
|
|
4210
|
+
except Exception as e:
|
|
4211
|
+
results.append({"url": u, "status": 0, "error": str(e)[:500]})
|
|
4212
|
+
print(json.dumps(results))
|
|
4213
|
+
except Exception as e:
|
|
4214
|
+
print(json.dumps([{"error": str(e)}]))
|
|
4215
|
+
`.trim();
|
|
4216
|
+
try {
|
|
4217
|
+
const r = await manager.exec(target, `python3 -c ${JSON.stringify(script)}`);
|
|
4218
|
+
const output = r.stdout.trim();
|
|
4219
|
+
try {
|
|
4220
|
+
const results = JSON.parse(output);
|
|
4221
|
+
if (results.length === 1) {
|
|
4222
|
+
const res = results[0];
|
|
4223
|
+
if (res.error)
|
|
4224
|
+
return fail(`scrape error: ${res.error}`);
|
|
4225
|
+
return okBrief(`[${res.status}] ${res.url}\n\n${res.content}`);
|
|
4226
|
+
}
|
|
4227
|
+
const summary = results.map((r) => `[${r.status ?? 'ERR'}] ${r.url ?? '?'}: ${r.error ?? `${(r.content ?? '').length} chars`}`).join('\n');
|
|
4228
|
+
return okBrief(`Scraped ${results.length} URLs:\n${summary}\n\n${results.map((r) => r.content ?? '').join('\n---\n').slice(0, 50000)}`);
|
|
4229
|
+
}
|
|
4230
|
+
catch {
|
|
4231
|
+
return okBrief(output.slice(0, 10000));
|
|
4232
|
+
}
|
|
4233
|
+
}
|
|
4234
|
+
catch (e) {
|
|
4235
|
+
return fail(`scrape failed on ${target}: ${e.message}`);
|
|
4236
|
+
}
|
|
4237
|
+
});
|
|
4148
4238
|
// --- Tool 54: omniwire_omnimesh ---
|
|
4149
4239
|
server.tool('omniwire_omnimesh', 'OmniMesh — built-in WireGuard mesh network manager. Create, manage, and monitor a full-mesh or hub-spoke WireGuard VPN across all nodes and any OS (Linux/Windows/macOS). Actions: status, init, add-peer, remove-peer, genkeys, deploy-config, up, down, install, health, rotate-keys, discover-endpoint, topology, sync-peers.', {
|
|
4150
4240
|
action: z.enum([
|