vibedate 0.8.5 → 0.8.6
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/{chunk-VHO7JWSS.js → chunk-NSSNOQJG.js} +10 -2
- package/dist/{chunk-KIFZHCWP.js → chunk-ZU5UPYSF.js} +19 -2
- package/dist/cli.js +3 -3
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/mcp-bin.d.ts +1 -0
- package/dist/mcp-bin.js +14 -0
- package/dist/mcp.d.ts +1 -31
- package/dist/mcp.js +2 -2
- package/dist/{room-B-0DreC0.d.ts → room-DgdlQcRD.d.ts} +1 -1
- package/package.json +6 -5
|
@@ -29,9 +29,10 @@ import {
|
|
|
29
29
|
signHelloClaims,
|
|
30
30
|
startDiscovery,
|
|
31
31
|
startRoom
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-ZU5UPYSF.js";
|
|
33
33
|
|
|
34
34
|
// src/mcp.ts
|
|
35
|
+
import { createRequire } from "module";
|
|
35
36
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
36
37
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
37
38
|
|
|
@@ -15046,7 +15047,14 @@ function textBlock(text) {
|
|
|
15046
15047
|
function jsonResult(value) {
|
|
15047
15048
|
return { content: [textBlock(JSON.stringify(value, null, 2))] };
|
|
15048
15049
|
}
|
|
15049
|
-
var VERSION =
|
|
15050
|
+
var VERSION = (() => {
|
|
15051
|
+
try {
|
|
15052
|
+
const require2 = createRequire(import.meta.url);
|
|
15053
|
+
return require2("../package.json").version ?? "0.0.0";
|
|
15054
|
+
} catch {
|
|
15055
|
+
return "0.0.0";
|
|
15056
|
+
}
|
|
15057
|
+
})();
|
|
15050
15058
|
function discoveryScope(myLeague, any2) {
|
|
15051
15059
|
const names = any2 ? allLeagueNames() : leaguesWithin(myLeague, 1);
|
|
15052
15060
|
const ordered = [myLeague, ...names.filter((n) => n !== myLeague)];
|
|
@@ -255,7 +255,8 @@ function writeJsonAtomic(filePath, obj) {
|
|
|
255
255
|
var CONSENT_SCOPE = "share:league";
|
|
256
256
|
var LIVE_CONSENT_SCOPE = "share:live";
|
|
257
257
|
function defaultStateDir() {
|
|
258
|
-
|
|
258
|
+
const home = process.env["VIBEDATE_HOME"];
|
|
259
|
+
return home && home.length > 0 ? home : path.join(os.homedir(), ".vibedating");
|
|
259
260
|
}
|
|
260
261
|
var FileConsentStore = class {
|
|
261
262
|
constructor(file) {
|
|
@@ -995,7 +996,8 @@ async function startDiscovery(opts) {
|
|
|
995
996
|
const topics = opts.topics ? [...opts.topics] : opts.topic !== void 0 ? [opts.topic] : [leagueTopic(hello.league)];
|
|
996
997
|
const acceptLeague = opts.acceptLeague ?? ((l) => l === hello.league);
|
|
997
998
|
const { default: Hyperswarm } = await import("hyperswarm");
|
|
998
|
-
const
|
|
999
|
+
const bootstrap = opts.bootstrap ?? parseBootstrapEnv(process.env["VIBEDATE_BOOTSTRAP"]);
|
|
1000
|
+
const swarm = new Hyperswarm(bootstrap === void 0 ? {} : { bootstrap });
|
|
999
1001
|
await swarm.dht.fullyBootstrapped();
|
|
1000
1002
|
const peers = /* @__PURE__ */ new Map();
|
|
1001
1003
|
swarm.on("connection", (socket, info) => {
|
|
@@ -1110,6 +1112,21 @@ async function startDiscovery(opts) {
|
|
|
1110
1112
|
}
|
|
1111
1113
|
};
|
|
1112
1114
|
}
|
|
1115
|
+
function parseBootstrapEnv(raw) {
|
|
1116
|
+
if (raw === void 0 || raw.trim() === "") return void 0;
|
|
1117
|
+
const nodes = [];
|
|
1118
|
+
for (const entry of raw.split(",")) {
|
|
1119
|
+
const trimmed = entry.trim();
|
|
1120
|
+
if (trimmed === "") continue;
|
|
1121
|
+
const idx = trimmed.lastIndexOf(":");
|
|
1122
|
+
if (idx <= 0) continue;
|
|
1123
|
+
const host = trimmed.slice(0, idx);
|
|
1124
|
+
const port = Number(trimmed.slice(idx + 1));
|
|
1125
|
+
if (!Number.isInteger(port) || port <= 0 || port > 65535) continue;
|
|
1126
|
+
nodes.push({ host, port });
|
|
1127
|
+
}
|
|
1128
|
+
return nodes.length > 0 ? nodes : void 0;
|
|
1129
|
+
}
|
|
1113
1130
|
|
|
1114
1131
|
// src/relay.ts
|
|
1115
1132
|
import { createHash as createHash2 } from "crypto";
|
package/dist/cli.js
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
stopDaemon,
|
|
11
11
|
uninstallDaemonService,
|
|
12
12
|
writeDaemonState
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-NSSNOQJG.js";
|
|
14
14
|
import {
|
|
15
15
|
CANDIDATES,
|
|
16
16
|
LIVE_NOTICE,
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
signHelloClaims,
|
|
47
47
|
startDiscovery,
|
|
48
48
|
startRoom
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-ZU5UPYSF.js";
|
|
50
50
|
|
|
51
51
|
// src/cli.ts
|
|
52
52
|
import readline from "readline";
|
|
@@ -2795,7 +2795,7 @@ async function handle(req, res, opts) {
|
|
|
2795
2795
|
}
|
|
2796
2796
|
|
|
2797
2797
|
// src/cli.ts
|
|
2798
|
-
var VERSION = "0.8.
|
|
2798
|
+
var VERSION = "0.8.6";
|
|
2799
2799
|
function parsePort(raw) {
|
|
2800
2800
|
const n = Number(raw);
|
|
2801
2801
|
if (!Number.isInteger(n) || n < 1 || n > 65535) return void 0;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { UsageSnapshot, UsageSource, Harness, HarnessUsageOptions } from '@pooriaarab/vibe-core';
|
|
2
2
|
export { Harness, UsageSnapshot, UsageSource, createConsentLedger } from '@pooriaarab/vibe-core';
|
|
3
|
-
import {
|
|
4
|
-
export {
|
|
3
|
+
import { a as PeerHello, P as PeerLink } from './room-DgdlQcRD.js';
|
|
4
|
+
export { c as DiscoveryOptions, D as DiscoverySession, L as LIVE_NOTICE, d as ROOM_TOPIC_PREFIX, e as RoomMember, b as RoomMessage, f as RoomOptions, R as RoomSession, S as StoredPeer, T as TOPIC_PREFIX, l as leagueTopic, g as loadPeers, p as parseHandshake, r as recordPeer, h as recordPeerMessage, i as roomTopic, s as serializeHandshake, j as startDiscovery, k as startRoom } from './room-DgdlQcRD.js';
|
|
5
5
|
import { KeyObject } from 'node:crypto';
|
|
6
6
|
|
|
7
7
|
/**
|
package/dist/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
package/dist/mcp-bin.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
runMcp
|
|
4
|
+
} from "./chunk-NSSNOQJG.js";
|
|
5
|
+
import "./chunk-ZU5UPYSF.js";
|
|
6
|
+
|
|
7
|
+
// src/mcp-bin.ts
|
|
8
|
+
runMcp().catch((err) => {
|
|
9
|
+
process.stderr.write(
|
|
10
|
+
`vibedate-mcp: ${err instanceof Error ? err.stack ?? err.message : String(err)}
|
|
11
|
+
`
|
|
12
|
+
);
|
|
13
|
+
process.exit(1);
|
|
14
|
+
});
|
package/dist/mcp.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
-
import {
|
|
2
|
+
import { P as PeerLink, a as PeerHello, R as RoomSession, D as DiscoverySession, b as RoomMessage } from './room-DgdlQcRD.js';
|
|
3
3
|
import '@pooriaarab/vibe-core';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -86,36 +86,6 @@ interface LivePairing {
|
|
|
86
86
|
queued(): PeerLink[];
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
/**
|
|
90
|
-
* vibedating MCP server (stdio) — full agent-native tool surface.
|
|
91
|
-
*
|
|
92
|
-
* An agent drives vibedate ENTIRELY via tool calls — no interactive terminal.
|
|
93
|
-
* This is the fix for agents whose interactive `live` sessions time out.
|
|
94
|
-
*
|
|
95
|
-
* Tools (every response is structured JSON with `{ ok, ... }` / `{ ok:false, error }`):
|
|
96
|
-
*
|
|
97
|
-
* READ/STATE
|
|
98
|
-
* get_profile · connect · matches · handle_get · handle_set · blocklist
|
|
99
|
-
* block · unblock · daemon_status
|
|
100
|
-
*
|
|
101
|
-
* DISCOVERY
|
|
102
|
-
* discover · who · find
|
|
103
|
-
*
|
|
104
|
-
* LIVE CHAT (stateful in-process session — poll, don't block a TTY)
|
|
105
|
-
* live_start · live_peers · live_send · live_poll · live_open · live_next · live_stop
|
|
106
|
-
*
|
|
107
|
-
* ROOMS
|
|
108
|
-
* room_join · room_send · room_poll · room_who · room_leave
|
|
109
|
-
*
|
|
110
|
-
* MEDIA
|
|
111
|
-
* media_send
|
|
112
|
-
*
|
|
113
|
-
* Legacy aliases `profile` / `matches` remain registered for back-compat.
|
|
114
|
-
*
|
|
115
|
-
* AEGIS: peer text is UNTRUSTED display data — sanitized before return, never
|
|
116
|
-
* executed, never fed to a shell.
|
|
117
|
-
*/
|
|
118
|
-
|
|
119
89
|
/** Injectable hooks so tests can drive live/room without the real DHT. */
|
|
120
90
|
interface McpLiveHooks {
|
|
121
91
|
/** Build (or inject) the pairing object used by live_* tools. */
|
package/dist/mcp.js
CHANGED
|
@@ -329,4 +329,4 @@ interface RoomSession {
|
|
|
329
329
|
*/
|
|
330
330
|
declare function startRoom(opts: RoomOptions): Promise<RoomSession>;
|
|
331
331
|
|
|
332
|
-
export { type
|
|
332
|
+
export { type DiscoverySession as D, LIVE_NOTICE as L, type PeerLink as P, type RoomSession as R, type StoredPeer as S, TOPIC_PREFIX as T, type PeerHello as a, type RoomMessage as b, type DiscoveryOptions as c, ROOM_TOPIC_PREFIX as d, type RoomMember as e, type RoomOptions as f, loadPeers as g, recordPeerMessage as h, roomTopic as i, startDiscovery as j, startRoom as k, leagueTopic as l, parseHandshake as p, recordPeer as r, serializeHandshake as s };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vibedate",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.6",
|
|
4
4
|
"description": "Dating by tokens — matched by usage league across agentic CLIs. Raw usage stays local; only your league is shared. CLI + local web app + MCP. Local-first.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"bin": {
|
|
9
9
|
"vibedate": "./dist/cli.js",
|
|
10
10
|
"vibedating": "./dist/cli.js",
|
|
11
|
-
"vibedate-mcp": "./dist/mcp.js"
|
|
11
|
+
"vibedate-mcp": "./dist/mcp-bin.js"
|
|
12
12
|
},
|
|
13
13
|
"main": "./dist/index.js",
|
|
14
14
|
"types": "./dist/index.d.ts",
|
|
@@ -22,11 +22,12 @@
|
|
|
22
22
|
"dist"
|
|
23
23
|
],
|
|
24
24
|
"scripts": {
|
|
25
|
-
"build": "tsup src/index.ts src/cli.ts src/mcp.ts --format esm --dts --clean",
|
|
25
|
+
"build": "tsup src/index.ts src/cli.ts src/mcp.ts src/mcp-bin.ts --format esm --dts --clean",
|
|
26
26
|
"typecheck": "tsc --noEmit",
|
|
27
|
-
"test": "vitest run",
|
|
27
|
+
"test": "vitest run --exclude '**/*.harness.test.ts'",
|
|
28
28
|
"test:watch": "vitest",
|
|
29
|
-
"bench": "tsx bench/run.ts"
|
|
29
|
+
"bench": "tsx bench/run.ts",
|
|
30
|
+
"test:harness": "npm run build && vitest run harness.test"
|
|
30
31
|
},
|
|
31
32
|
"dependencies": {
|
|
32
33
|
"@modelcontextprotocol/sdk": "^1.0.0",
|