quoroom 0.1.16 → 0.1.18
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/out/mcp/api-server.js +87 -48
- package/out/mcp/cli.js +115 -69
- package/out/mcp/server.js +2 -2
- package/package.json +3 -3
package/out/mcp/api-server.js
CHANGED
|
@@ -9914,7 +9914,7 @@ var require_package = __commonJS({
|
|
|
9914
9914
|
"package.json"(exports2, module2) {
|
|
9915
9915
|
module2.exports = {
|
|
9916
9916
|
name: "quoroom",
|
|
9917
|
-
version: "0.1.
|
|
9917
|
+
version: "0.1.18",
|
|
9918
9918
|
description: "Autonomous AI agent collective engine \u2014 Queen, Workers, Quorum",
|
|
9919
9919
|
main: "./out/mcp/server.js",
|
|
9920
9920
|
bin: {
|
|
@@ -9939,14 +9939,14 @@ var require_package = __commonJS({
|
|
|
9939
9939
|
"build:mcp": "node scripts/build-mcp.js",
|
|
9940
9940
|
"build:ui": "vite build --config src/ui/vite.config.ts",
|
|
9941
9941
|
"kill:ports": "node scripts/kill-ports.js",
|
|
9942
|
-
"kill:dev-ports": "npm run kill:ports -- 4700 3710",
|
|
9942
|
+
"kill:dev-ports": "npm run kill:ports -- 4700 3710 5173",
|
|
9943
9943
|
"dev:links": "node scripts/dev-links.js",
|
|
9944
9944
|
dev: `sh -c 'npm run kill:dev-ports && trap "kill 0" INT TERM EXIT; npm run dev:links & npm run dev:room & npm run dev:cloud & wait'`,
|
|
9945
9945
|
"dev:room": "sh -c 'export QUOROOM_DATA_DIR=$HOME/.quoroom-dev QUOROOM_SKIP_MCP_REGISTER=1; npm run build:mcp && npm run build:ui && node scripts/dev-server.js --port 4700'",
|
|
9946
9946
|
"dev:room:isolated": "sh -c 'export QUOROOM_DATA_DIR=$HOME/.quoroom-dev QUOROOM_SKIP_MCP_REGISTER=1; npm run build:mcp && npm run build:ui && node scripts/dev-server.js --port 4700'",
|
|
9947
9947
|
"dev:room:shared": "npm run build:mcp && npm run build:ui && node scripts/dev-server.js",
|
|
9948
9948
|
"doctor:split": "node scripts/doctor-split.js",
|
|
9949
|
-
"dev:isolated": `sh -c 'npm run kill:dev-ports && trap "kill 0" INT TERM EXIT; npm run dev:links & npm run dev:room:isolated & npm run dev:cloud & wait'`,
|
|
9949
|
+
"dev:isolated": `sh -c 'npm run kill:dev-ports && trap "kill 0" INT TERM EXIT; npm run dev:links & npm run dev:room:isolated & npm run dev:cloud & VITE_API_PORT=4700 npm run dev:ui & wait'`,
|
|
9950
9950
|
"dev:cloud": `sh -c 'npm run kill:ports -- 3710 && cd ../cloud && PORT=3710 CLOUD_PUBLIC_URL=http://127.0.0.1:3710 CLOUD_ALLOWED_ORIGINS='"'"'http://127.0.0.1:3710,http://localhost:3710,http://localhost:5173,http://127.0.0.1:5173,https://quoroom.ai,https://www.quoroom.ai,https://app.quoroom.ai'"'"' npm start'`,
|
|
9951
9951
|
"dev:ui": "vite --config src/ui/vite.config.ts",
|
|
9952
9952
|
"seed:style-demo": "sh -c 'export QUOROOM_DATA_DIR=$HOME/.quoroom-dev; node scripts/seed-style-demo.js'",
|
|
@@ -10799,7 +10799,7 @@ var require_scheduled_task = __commonJS({
|
|
|
10799
10799
|
var require_background_scheduled_task = __commonJS({
|
|
10800
10800
|
"node_modules/node-cron/src/background-scheduled-task/index.js"(exports2, module2) {
|
|
10801
10801
|
var EventEmitter = require("events");
|
|
10802
|
-
var
|
|
10802
|
+
var path4 = require("path");
|
|
10803
10803
|
var { fork } = require("child_process");
|
|
10804
10804
|
var uuid = (init_esm_node(), __toCommonJS(esm_node_exports));
|
|
10805
10805
|
var daemonPath = `${__dirname}/daemon.js`;
|
|
@@ -10834,7 +10834,7 @@ var require_background_scheduled_task = __commonJS({
|
|
|
10834
10834
|
options.scheduled = true;
|
|
10835
10835
|
this.forkProcess.send({
|
|
10836
10836
|
type: "register",
|
|
10837
|
-
path:
|
|
10837
|
+
path: path4.resolve(this.taskPath),
|
|
10838
10838
|
cron: this.cronExpression,
|
|
10839
10839
|
options
|
|
10840
10840
|
});
|
|
@@ -10924,32 +10924,32 @@ module.exports = __toCommonJS(index_exports);
|
|
|
10924
10924
|
var import_node_http = __toESM(require("node:http"));
|
|
10925
10925
|
var import_node_https2 = __toESM(require("node:https"));
|
|
10926
10926
|
var import_node_url = require("node:url");
|
|
10927
|
-
var
|
|
10928
|
-
var
|
|
10927
|
+
var import_node_fs4 = __toESM(require("node:fs"));
|
|
10928
|
+
var import_node_path5 = __toESM(require("node:path"));
|
|
10929
10929
|
var import_node_os4 = require("node:os");
|
|
10930
|
-
var
|
|
10930
|
+
var import_node_child_process7 = require("node:child_process");
|
|
10931
10931
|
|
|
10932
10932
|
// src/server/router.ts
|
|
10933
10933
|
var Router = class {
|
|
10934
10934
|
routes = [];
|
|
10935
|
-
get(
|
|
10936
|
-
this.add("GET",
|
|
10935
|
+
get(path4, handler) {
|
|
10936
|
+
this.add("GET", path4, handler);
|
|
10937
10937
|
}
|
|
10938
|
-
post(
|
|
10939
|
-
this.add("POST",
|
|
10938
|
+
post(path4, handler) {
|
|
10939
|
+
this.add("POST", path4, handler);
|
|
10940
10940
|
}
|
|
10941
|
-
patch(
|
|
10942
|
-
this.add("PATCH",
|
|
10941
|
+
patch(path4, handler) {
|
|
10942
|
+
this.add("PATCH", path4, handler);
|
|
10943
10943
|
}
|
|
10944
|
-
put(
|
|
10945
|
-
this.add("PUT",
|
|
10944
|
+
put(path4, handler) {
|
|
10945
|
+
this.add("PUT", path4, handler);
|
|
10946
10946
|
}
|
|
10947
|
-
delete(
|
|
10948
|
-
this.add("DELETE",
|
|
10947
|
+
delete(path4, handler) {
|
|
10948
|
+
this.add("DELETE", path4, handler);
|
|
10949
10949
|
}
|
|
10950
|
-
add(method,
|
|
10950
|
+
add(method, path4, handler) {
|
|
10951
10951
|
const paramNames = [];
|
|
10952
|
-
const patternStr =
|
|
10952
|
+
const patternStr = path4.replace(/:(\w+)/g, (_, name) => {
|
|
10953
10953
|
paramNames.push(name);
|
|
10954
10954
|
return "([^/]+)";
|
|
10955
10955
|
});
|
|
@@ -11630,8 +11630,8 @@ function pauseTask(db2, id) {
|
|
|
11630
11630
|
function resumeTask(db2, id) {
|
|
11631
11631
|
updateTask(db2, id, { status: "active" });
|
|
11632
11632
|
}
|
|
11633
|
-
function createWatch(db2,
|
|
11634
|
-
const result = db2.prepare("INSERT INTO watches (path, description, action_prompt, room_id) VALUES (?, ?, ?, ?)").run(
|
|
11633
|
+
function createWatch(db2, path4, description, actionPrompt, roomId) {
|
|
11634
|
+
const result = db2.prepare("INSERT INTO watches (path, description, action_prompt, room_id) VALUES (?, ?, ?, ?)").run(path4, description ?? null, actionPrompt ?? null, roomId ?? null);
|
|
11635
11635
|
return getWatch(db2, result.lastInsertRowid);
|
|
11636
11636
|
}
|
|
11637
11637
|
function getWatch(db2, id) {
|
|
@@ -22693,7 +22693,7 @@ function resolveClaudePath() {
|
|
|
22693
22693
|
for (const sh of shells) {
|
|
22694
22694
|
if (!(0, import_fs.existsSync)(sh)) continue;
|
|
22695
22695
|
try {
|
|
22696
|
-
const resolved = (0, import_child_process.execSync)(`${sh} -
|
|
22696
|
+
const resolved = (0, import_child_process.execSync)(`${sh} -lic 'which claude'`, {
|
|
22697
22697
|
encoding: "utf-8",
|
|
22698
22698
|
env,
|
|
22699
22699
|
timeout: 5e3
|
|
@@ -28740,7 +28740,7 @@ var cachedVersion = null;
|
|
|
28740
28740
|
function getVersion3() {
|
|
28741
28741
|
if (cachedVersion) return cachedVersion;
|
|
28742
28742
|
try {
|
|
28743
|
-
cachedVersion = true ? "0.1.
|
|
28743
|
+
cachedVersion = true ? "0.1.18" : null.version;
|
|
28744
28744
|
} catch {
|
|
28745
28745
|
cachedVersion = "unknown";
|
|
28746
28746
|
}
|
|
@@ -30338,6 +30338,44 @@ async function handleWebhookRequest(pathname, body, db2) {
|
|
|
30338
30338
|
return { status: 404, data: { error: "Not found" } };
|
|
30339
30339
|
}
|
|
30340
30340
|
|
|
30341
|
+
// src/server/shell-path.ts
|
|
30342
|
+
var import_node_child_process6 = require("node:child_process");
|
|
30343
|
+
var import_node_fs3 = require("node:fs");
|
|
30344
|
+
var import_node_path4 = __toESM(require("node:path"));
|
|
30345
|
+
function inheritShellPath() {
|
|
30346
|
+
if (process.platform !== "darwin") return;
|
|
30347
|
+
const currentPath = process.env.PATH || "";
|
|
30348
|
+
const currentParts = new Set(currentPath.split(import_node_path4.default.delimiter).filter(Boolean));
|
|
30349
|
+
const shells = [process.env.SHELL, "/bin/zsh", "/bin/bash"].filter(Boolean);
|
|
30350
|
+
for (const sh of shells) {
|
|
30351
|
+
if (!(0, import_node_fs3.existsSync)(sh)) continue;
|
|
30352
|
+
try {
|
|
30353
|
+
const env = { ...process.env };
|
|
30354
|
+
delete env.ELECTRON_RUN_AS_NODE;
|
|
30355
|
+
const shellPath = (0, import_node_child_process6.execSync)(`${sh} -lic 'echo $PATH'`, {
|
|
30356
|
+
encoding: "utf-8",
|
|
30357
|
+
env,
|
|
30358
|
+
timeout: 5e3,
|
|
30359
|
+
stdio: ["ignore", "pipe", "ignore"]
|
|
30360
|
+
}).trim();
|
|
30361
|
+
if (!shellPath) continue;
|
|
30362
|
+
const newParts = shellPath.split(import_node_path4.default.delimiter).filter(Boolean);
|
|
30363
|
+
const additions = [];
|
|
30364
|
+
for (const p of newParts) {
|
|
30365
|
+
if (!currentParts.has(p)) {
|
|
30366
|
+
additions.push(p);
|
|
30367
|
+
currentParts.add(p);
|
|
30368
|
+
}
|
|
30369
|
+
}
|
|
30370
|
+
if (additions.length > 0) {
|
|
30371
|
+
process.env.PATH = `${currentPath}${import_node_path4.default.delimiter}${additions.join(import_node_path4.default.delimiter)}`;
|
|
30372
|
+
}
|
|
30373
|
+
return;
|
|
30374
|
+
} catch {
|
|
30375
|
+
}
|
|
30376
|
+
}
|
|
30377
|
+
}
|
|
30378
|
+
|
|
30341
30379
|
// src/server/index.ts
|
|
30342
30380
|
try {
|
|
30343
30381
|
process.loadEnvFile?.(".env");
|
|
@@ -30441,7 +30479,7 @@ function scheduleSelfRestart() {
|
|
|
30441
30479
|
const args = [...process.execArgv, ...process.argv.slice(1)];
|
|
30442
30480
|
if (process.platform === "win32") {
|
|
30443
30481
|
const cmd = [process.execPath, ...args].map(windowsQuote).join(" ");
|
|
30444
|
-
const child = (0,
|
|
30482
|
+
const child = (0, import_node_child_process7.spawn)("cmd.exe", ["/d", "/s", "/c", `ping -n 2 127.0.0.1 >nul && ${cmd}`], {
|
|
30445
30483
|
detached: true,
|
|
30446
30484
|
stdio: "ignore",
|
|
30447
30485
|
windowsHide: true,
|
|
@@ -30450,7 +30488,7 @@ function scheduleSelfRestart() {
|
|
|
30450
30488
|
child.unref();
|
|
30451
30489
|
} else {
|
|
30452
30490
|
const cmd = [process.execPath, ...args].map(shellQuote).join(" ");
|
|
30453
|
-
const child = (0,
|
|
30491
|
+
const child = (0, import_node_child_process7.spawn)("/bin/sh", ["-c", `sleep 1; exec ${cmd}`], {
|
|
30454
30492
|
detached: true,
|
|
30455
30493
|
stdio: "ignore",
|
|
30456
30494
|
env: process.env
|
|
@@ -30504,7 +30542,7 @@ function maybeLogHttpProfile(method, pathname, statusCode, durationMs) {
|
|
|
30504
30542
|
}
|
|
30505
30543
|
function getCacheControl(filePath, ext) {
|
|
30506
30544
|
const normalized = filePath.replace(/\\/g, "/");
|
|
30507
|
-
const base2 =
|
|
30545
|
+
const base2 = import_node_path5.default.basename(filePath);
|
|
30508
30546
|
if (base2 === "sw.js") return "no-cache, no-store, must-revalidate";
|
|
30509
30547
|
if (ext === ".html") return "no-cache, no-store, must-revalidate";
|
|
30510
30548
|
if (ext === ".webmanifest") return "public, max-age=3600";
|
|
@@ -30523,15 +30561,15 @@ function getCacheControl(filePath, ext) {
|
|
|
30523
30561
|
return "no-cache, max-age=0";
|
|
30524
30562
|
}
|
|
30525
30563
|
function serveStatic(staticDir, pathname, res) {
|
|
30526
|
-
const safePath =
|
|
30527
|
-
let filePath =
|
|
30564
|
+
const safePath = import_node_path5.default.normalize(pathname).replace(/^(\.\.[/\\])+/, "");
|
|
30565
|
+
let filePath = import_node_path5.default.join(staticDir, safePath);
|
|
30528
30566
|
try {
|
|
30529
|
-
const stat =
|
|
30567
|
+
const stat = import_node_fs4.default.statSync(filePath);
|
|
30530
30568
|
if (stat.isDirectory()) {
|
|
30531
|
-
filePath =
|
|
30569
|
+
filePath = import_node_path5.default.join(filePath, "index.html");
|
|
30532
30570
|
}
|
|
30533
30571
|
} catch {
|
|
30534
|
-
if (
|
|
30572
|
+
if (import_node_path5.default.extname(safePath)) {
|
|
30535
30573
|
res.writeHead(404, {
|
|
30536
30574
|
"Content-Type": "text/plain; charset=utf-8",
|
|
30537
30575
|
"Cache-Control": "no-cache, no-store, must-revalidate"
|
|
@@ -30539,15 +30577,15 @@ function serveStatic(staticDir, pathname, res) {
|
|
|
30539
30577
|
res.end("Not Found");
|
|
30540
30578
|
return;
|
|
30541
30579
|
}
|
|
30542
|
-
filePath =
|
|
30580
|
+
filePath = import_node_path5.default.join(staticDir, "index.html");
|
|
30543
30581
|
}
|
|
30544
|
-
const ext =
|
|
30582
|
+
const ext = import_node_path5.default.extname(filePath).toLowerCase();
|
|
30545
30583
|
const contentType = MIME_TYPES[ext] ?? "application/octet-stream";
|
|
30546
30584
|
const headers = {
|
|
30547
30585
|
"Content-Type": contentType,
|
|
30548
30586
|
"Cache-Control": getCacheControl(filePath, ext)
|
|
30549
30587
|
};
|
|
30550
|
-
const stream =
|
|
30588
|
+
const stream = import_node_fs4.default.createReadStream(filePath);
|
|
30551
30589
|
stream.on("open", () => {
|
|
30552
30590
|
res.writeHead(200, headers);
|
|
30553
30591
|
stream.pipe(res);
|
|
@@ -30801,16 +30839,16 @@ function createApiServer(options = {}) {
|
|
|
30801
30839
|
}
|
|
30802
30840
|
function patchMcpConfig(configPath, entry) {
|
|
30803
30841
|
try {
|
|
30804
|
-
if (!
|
|
30842
|
+
if (!import_node_fs4.default.existsSync(configPath)) return false;
|
|
30805
30843
|
let config = {};
|
|
30806
30844
|
try {
|
|
30807
|
-
config = JSON.parse(
|
|
30845
|
+
config = JSON.parse(import_node_fs4.default.readFileSync(configPath, "utf-8"));
|
|
30808
30846
|
} catch {
|
|
30809
30847
|
}
|
|
30810
30848
|
const mcpServers = config.mcpServers ?? {};
|
|
30811
30849
|
mcpServers["quoroom"] = entry;
|
|
30812
30850
|
config.mcpServers = mcpServers;
|
|
30813
|
-
|
|
30851
|
+
import_node_fs4.default.writeFileSync(configPath, JSON.stringify(config, null, 2) + "\n");
|
|
30814
30852
|
return true;
|
|
30815
30853
|
} catch {
|
|
30816
30854
|
return false;
|
|
@@ -30819,7 +30857,7 @@ function patchMcpConfig(configPath, entry) {
|
|
|
30819
30857
|
function registerMcpGlobally(dbPath) {
|
|
30820
30858
|
try {
|
|
30821
30859
|
const home = (0, import_node_os4.homedir)();
|
|
30822
|
-
const mcpServerPath =
|
|
30860
|
+
const mcpServerPath = import_node_path5.default.join(__dirname, "server.js");
|
|
30823
30861
|
const nodePath = process.execPath;
|
|
30824
30862
|
const entry = (source) => ({
|
|
30825
30863
|
command: nodePath,
|
|
@@ -30828,28 +30866,29 @@ function registerMcpGlobally(dbPath) {
|
|
|
30828
30866
|
});
|
|
30829
30867
|
const isWin = process.platform === "win32";
|
|
30830
30868
|
const isMac = process.platform === "darwin";
|
|
30831
|
-
patchMcpConfig(
|
|
30832
|
-
const claudeDesktopPath = isWin ?
|
|
30869
|
+
patchMcpConfig(import_node_path5.default.join(home, ".claude.json"), entry("claude-code"));
|
|
30870
|
+
const claudeDesktopPath = isWin ? import_node_path5.default.join(home, "AppData", "Roaming", "Claude", "claude_desktop_config.json") : isMac ? import_node_path5.default.join(home, "Library", "Application Support", "Claude", "claude_desktop_config.json") : import_node_path5.default.join(home, ".config", "Claude", "claude_desktop_config.json");
|
|
30833
30871
|
patchMcpConfig(claudeDesktopPath, entry("claude-desktop"));
|
|
30834
|
-
patchMcpConfig(
|
|
30872
|
+
patchMcpConfig(import_node_path5.default.join(home, ".cursor", "mcp.json"), entry("cursor"));
|
|
30835
30873
|
patchMcpConfig(
|
|
30836
|
-
|
|
30874
|
+
import_node_path5.default.join(home, ".codeium", "windsurf", "mcp_config.json"),
|
|
30837
30875
|
entry("windsurf")
|
|
30838
30876
|
);
|
|
30839
30877
|
} catch {
|
|
30840
30878
|
}
|
|
30841
30879
|
}
|
|
30842
30880
|
function startServer(options = {}) {
|
|
30881
|
+
inheritShellPath();
|
|
30843
30882
|
const port = options.port ?? DEFAULT_PORT;
|
|
30844
30883
|
const deploymentMode = getDeploymentMode();
|
|
30845
30884
|
const bindHost = process.env.QUOROOM_BIND_HOST || (deploymentMode === "cloud" ? DEFAULT_BIND_HOST_CLOUD : DEFAULT_BIND_HOST_LOCAL);
|
|
30846
30885
|
if (!options.staticDir) {
|
|
30847
|
-
const defaultUiDir =
|
|
30848
|
-
if (
|
|
30886
|
+
const defaultUiDir = import_node_path5.default.join(__dirname, "../ui");
|
|
30887
|
+
if (import_node_fs4.default.existsSync(defaultUiDir)) {
|
|
30849
30888
|
options.staticDir = defaultUiDir;
|
|
30850
30889
|
}
|
|
30851
30890
|
}
|
|
30852
|
-
const dbPath = process.env.QUOROOM_DB_PATH ||
|
|
30891
|
+
const dbPath = process.env.QUOROOM_DB_PATH || import_node_path5.default.join(options.dataDir ?? getDataDir(), "data.db");
|
|
30853
30892
|
const { server, token, db: serverDb } = createApiServer(options);
|
|
30854
30893
|
if (!process.env.QUOROOM_SKIP_MCP_REGISTER) {
|
|
30855
30894
|
registerMcpGlobally(dbPath);
|
|
@@ -30869,7 +30908,7 @@ function startServer(options = {}) {
|
|
|
30869
30908
|
console.error(`Auth token: ${token.slice(0, 8)}...`);
|
|
30870
30909
|
if (process.env.NODE_ENV === "production" && deploymentMode !== "cloud") {
|
|
30871
30910
|
const cmd = process.platform === "darwin" ? "open" : process.platform === "win32" ? "start" : "xdg-open";
|
|
30872
|
-
(0,
|
|
30911
|
+
(0, import_node_child_process7.exec)(`${cmd} ${dashboardUrl}`);
|
|
30873
30912
|
}
|
|
30874
30913
|
});
|
|
30875
30914
|
}
|
|
@@ -30877,7 +30916,7 @@ function startServer(options = {}) {
|
|
|
30877
30916
|
if (err.code === "EADDRINUSE") {
|
|
30878
30917
|
console.error(`Port ${port} is in use \u2014 killing existing process...`);
|
|
30879
30918
|
try {
|
|
30880
|
-
(0,
|
|
30919
|
+
(0, import_node_child_process7.execSync)(`lsof -ti :${port} | xargs kill -9`, { stdio: "ignore" });
|
|
30881
30920
|
} catch {
|
|
30882
30921
|
}
|
|
30883
30922
|
setTimeout(listen, 500);
|
package/out/mcp/cli.js
CHANGED
|
@@ -446,8 +446,8 @@ var init_parseUtil = __esm({
|
|
|
446
446
|
init_errors();
|
|
447
447
|
init_en();
|
|
448
448
|
makeIssue = (params) => {
|
|
449
|
-
const { data, path:
|
|
450
|
-
const fullPath = [...
|
|
449
|
+
const { data, path: path4, errorMaps, issueData } = params;
|
|
450
|
+
const fullPath = [...path4, ...issueData.path || []];
|
|
451
451
|
const fullIssue = {
|
|
452
452
|
...issueData,
|
|
453
453
|
path: fullPath
|
|
@@ -755,11 +755,11 @@ var init_types = __esm({
|
|
|
755
755
|
init_parseUtil();
|
|
756
756
|
init_util();
|
|
757
757
|
ParseInputLazyPath = class {
|
|
758
|
-
constructor(parent, value,
|
|
758
|
+
constructor(parent, value, path4, key) {
|
|
759
759
|
this._cachedPath = [];
|
|
760
760
|
this.parent = parent;
|
|
761
761
|
this.data = value;
|
|
762
|
-
this._path =
|
|
762
|
+
this._path = path4;
|
|
763
763
|
this._key = key;
|
|
764
764
|
}
|
|
765
765
|
get path() {
|
|
@@ -4340,10 +4340,10 @@ function assignProp(target, prop, value) {
|
|
|
4340
4340
|
configurable: true
|
|
4341
4341
|
});
|
|
4342
4342
|
}
|
|
4343
|
-
function getElementAtPath(obj,
|
|
4344
|
-
if (!
|
|
4343
|
+
function getElementAtPath(obj, path4) {
|
|
4344
|
+
if (!path4)
|
|
4345
4345
|
return obj;
|
|
4346
|
-
return
|
|
4346
|
+
return path4.reduce((acc, key) => acc?.[key], obj);
|
|
4347
4347
|
}
|
|
4348
4348
|
function promiseAllObject(promisesObj) {
|
|
4349
4349
|
const keys = Object.keys(promisesObj);
|
|
@@ -4592,11 +4592,11 @@ function aborted(x, startIndex = 0) {
|
|
|
4592
4592
|
}
|
|
4593
4593
|
return false;
|
|
4594
4594
|
}
|
|
4595
|
-
function prefixIssues(
|
|
4595
|
+
function prefixIssues(path4, issues) {
|
|
4596
4596
|
return issues.map((iss) => {
|
|
4597
4597
|
var _a;
|
|
4598
4598
|
(_a = iss).path ?? (_a.path = []);
|
|
4599
|
-
iss.path.unshift(
|
|
4599
|
+
iss.path.unshift(path4);
|
|
4600
4600
|
return iss;
|
|
4601
4601
|
});
|
|
4602
4602
|
}
|
|
@@ -16402,8 +16402,8 @@ var require_utils = __commonJS({
|
|
|
16402
16402
|
}
|
|
16403
16403
|
return ind;
|
|
16404
16404
|
}
|
|
16405
|
-
function removeDotSegments(
|
|
16406
|
-
let input =
|
|
16405
|
+
function removeDotSegments(path4) {
|
|
16406
|
+
let input = path4;
|
|
16407
16407
|
const output = [];
|
|
16408
16408
|
let nextSlash = -1;
|
|
16409
16409
|
let len = 0;
|
|
@@ -16602,8 +16602,8 @@ var require_schemes = __commonJS({
|
|
|
16602
16602
|
wsComponent.secure = void 0;
|
|
16603
16603
|
}
|
|
16604
16604
|
if (wsComponent.resourceName) {
|
|
16605
|
-
const [
|
|
16606
|
-
wsComponent.path =
|
|
16605
|
+
const [path4, query] = wsComponent.resourceName.split("?");
|
|
16606
|
+
wsComponent.path = path4 && path4 !== "/" ? path4 : void 0;
|
|
16607
16607
|
wsComponent.query = query;
|
|
16608
16608
|
wsComponent.resourceName = void 0;
|
|
16609
16609
|
}
|
|
@@ -22519,8 +22519,8 @@ function pauseTask(db3, id) {
|
|
|
22519
22519
|
function resumeTask(db3, id) {
|
|
22520
22520
|
updateTask(db3, id, { status: "active" });
|
|
22521
22521
|
}
|
|
22522
|
-
function createWatch(db3,
|
|
22523
|
-
const result = db3.prepare("INSERT INTO watches (path, description, action_prompt, room_id) VALUES (?, ?, ?, ?)").run(
|
|
22522
|
+
function createWatch(db3, path4, description, actionPrompt, roomId) {
|
|
22523
|
+
const result = db3.prepare("INSERT INTO watches (path, description, action_prompt, room_id) VALUES (?, ?, ?, ?)").run(path4, description ?? null, actionPrompt ?? null, roomId ?? null);
|
|
22524
22524
|
return getWatch(db3, result.lastInsertRowid);
|
|
22525
22525
|
}
|
|
22526
22526
|
function getWatch(db3, id) {
|
|
@@ -25065,7 +25065,7 @@ var require_scheduled_task = __commonJS({
|
|
|
25065
25065
|
var require_background_scheduled_task = __commonJS({
|
|
25066
25066
|
"node_modules/node-cron/src/background-scheduled-task/index.js"(exports2, module2) {
|
|
25067
25067
|
var EventEmitter = require("events");
|
|
25068
|
-
var
|
|
25068
|
+
var path4 = require("path");
|
|
25069
25069
|
var { fork } = require("child_process");
|
|
25070
25070
|
var uuid2 = (init_esm_node(), __toCommonJS(esm_node_exports));
|
|
25071
25071
|
var daemonPath = `${__dirname}/daemon.js`;
|
|
@@ -25100,7 +25100,7 @@ var require_background_scheduled_task = __commonJS({
|
|
|
25100
25100
|
options.scheduled = true;
|
|
25101
25101
|
this.forkProcess.send({
|
|
25102
25102
|
type: "register",
|
|
25103
|
-
path:
|
|
25103
|
+
path: path4.resolve(this.taskPath),
|
|
25104
25104
|
cron: this.cronExpression,
|
|
25105
25105
|
options
|
|
25106
25106
|
});
|
|
@@ -25225,7 +25225,7 @@ function resolveClaudePath() {
|
|
|
25225
25225
|
for (const sh of shells) {
|
|
25226
25226
|
if (!(0, import_fs.existsSync)(sh)) continue;
|
|
25227
25227
|
try {
|
|
25228
|
-
const resolved = (0, import_child_process.execSync)(`${sh} -
|
|
25228
|
+
const resolved = (0, import_child_process.execSync)(`${sh} -lic 'which claude'`, {
|
|
25229
25229
|
encoding: "utf-8",
|
|
25230
25230
|
env,
|
|
25231
25231
|
timeout: 5e3
|
|
@@ -28057,20 +28057,20 @@ function registerWatcherTools(server) {
|
|
|
28057
28057
|
)
|
|
28058
28058
|
}
|
|
28059
28059
|
},
|
|
28060
|
-
async ({ path:
|
|
28061
|
-
const pathError = validateWatchPath(
|
|
28060
|
+
async ({ path: path4, description, actionPrompt, roomId }) => {
|
|
28061
|
+
const pathError = validateWatchPath(path4);
|
|
28062
28062
|
if (pathError) {
|
|
28063
28063
|
return {
|
|
28064
28064
|
content: [{ type: "text", text: `Invalid watch path: ${pathError}` }]
|
|
28065
28065
|
};
|
|
28066
28066
|
}
|
|
28067
28067
|
const db3 = getMcpDatabase();
|
|
28068
|
-
createWatch(db3,
|
|
28068
|
+
createWatch(db3, path4, description, actionPrompt, roomId);
|
|
28069
28069
|
return {
|
|
28070
28070
|
content: [
|
|
28071
28071
|
{
|
|
28072
28072
|
type: "text",
|
|
28073
|
-
text: `Watching "${
|
|
28073
|
+
text: `Watching "${path4}".`
|
|
28074
28074
|
}
|
|
28075
28075
|
]
|
|
28076
28076
|
};
|
|
@@ -51040,7 +51040,7 @@ var server_exports = {};
|
|
|
51040
51040
|
async function main() {
|
|
51041
51041
|
const server = new McpServer({
|
|
51042
51042
|
name: "quoroom",
|
|
51043
|
-
version: true ? "0.1.
|
|
51043
|
+
version: true ? "0.1.18" : "0.0.0"
|
|
51044
51044
|
});
|
|
51045
51045
|
registerMemoryTools(server);
|
|
51046
51046
|
registerSchedulerTools(server);
|
|
@@ -51106,24 +51106,24 @@ var init_router = __esm({
|
|
|
51106
51106
|
"use strict";
|
|
51107
51107
|
Router = class {
|
|
51108
51108
|
routes = [];
|
|
51109
|
-
get(
|
|
51110
|
-
this.add("GET",
|
|
51109
|
+
get(path4, handler) {
|
|
51110
|
+
this.add("GET", path4, handler);
|
|
51111
51111
|
}
|
|
51112
|
-
post(
|
|
51113
|
-
this.add("POST",
|
|
51112
|
+
post(path4, handler) {
|
|
51113
|
+
this.add("POST", path4, handler);
|
|
51114
51114
|
}
|
|
51115
|
-
patch(
|
|
51116
|
-
this.add("PATCH",
|
|
51115
|
+
patch(path4, handler) {
|
|
51116
|
+
this.add("PATCH", path4, handler);
|
|
51117
51117
|
}
|
|
51118
|
-
put(
|
|
51119
|
-
this.add("PUT",
|
|
51118
|
+
put(path4, handler) {
|
|
51119
|
+
this.add("PUT", path4, handler);
|
|
51120
51120
|
}
|
|
51121
|
-
delete(
|
|
51122
|
-
this.add("DELETE",
|
|
51121
|
+
delete(path4, handler) {
|
|
51122
|
+
this.add("DELETE", path4, handler);
|
|
51123
51123
|
}
|
|
51124
|
-
add(method,
|
|
51124
|
+
add(method, path4, handler) {
|
|
51125
51125
|
const paramNames = [];
|
|
51126
|
-
const patternStr =
|
|
51126
|
+
const patternStr = path4.replace(/:(\w+)/g, (_, name) => {
|
|
51127
51127
|
paramNames.push(name);
|
|
51128
51128
|
return "([^/]+)";
|
|
51129
51129
|
});
|
|
@@ -52847,7 +52847,7 @@ var require_package = __commonJS({
|
|
|
52847
52847
|
"package.json"(exports2, module2) {
|
|
52848
52848
|
module2.exports = {
|
|
52849
52849
|
name: "quoroom",
|
|
52850
|
-
version: "0.1.
|
|
52850
|
+
version: "0.1.18",
|
|
52851
52851
|
description: "Autonomous AI agent collective engine \u2014 Queen, Workers, Quorum",
|
|
52852
52852
|
main: "./out/mcp/server.js",
|
|
52853
52853
|
bin: {
|
|
@@ -52872,14 +52872,14 @@ var require_package = __commonJS({
|
|
|
52872
52872
|
"build:mcp": "node scripts/build-mcp.js",
|
|
52873
52873
|
"build:ui": "vite build --config src/ui/vite.config.ts",
|
|
52874
52874
|
"kill:ports": "node scripts/kill-ports.js",
|
|
52875
|
-
"kill:dev-ports": "npm run kill:ports -- 4700 3710",
|
|
52875
|
+
"kill:dev-ports": "npm run kill:ports -- 4700 3710 5173",
|
|
52876
52876
|
"dev:links": "node scripts/dev-links.js",
|
|
52877
52877
|
dev: `sh -c 'npm run kill:dev-ports && trap "kill 0" INT TERM EXIT; npm run dev:links & npm run dev:room & npm run dev:cloud & wait'`,
|
|
52878
52878
|
"dev:room": "sh -c 'export QUOROOM_DATA_DIR=$HOME/.quoroom-dev QUOROOM_SKIP_MCP_REGISTER=1; npm run build:mcp && npm run build:ui && node scripts/dev-server.js --port 4700'",
|
|
52879
52879
|
"dev:room:isolated": "sh -c 'export QUOROOM_DATA_DIR=$HOME/.quoroom-dev QUOROOM_SKIP_MCP_REGISTER=1; npm run build:mcp && npm run build:ui && node scripts/dev-server.js --port 4700'",
|
|
52880
52880
|
"dev:room:shared": "npm run build:mcp && npm run build:ui && node scripts/dev-server.js",
|
|
52881
52881
|
"doctor:split": "node scripts/doctor-split.js",
|
|
52882
|
-
"dev:isolated": `sh -c 'npm run kill:dev-ports && trap "kill 0" INT TERM EXIT; npm run dev:links & npm run dev:room:isolated & npm run dev:cloud & wait'`,
|
|
52882
|
+
"dev:isolated": `sh -c 'npm run kill:dev-ports && trap "kill 0" INT TERM EXIT; npm run dev:links & npm run dev:room:isolated & npm run dev:cloud & VITE_API_PORT=4700 npm run dev:ui & wait'`,
|
|
52883
52883
|
"dev:cloud": `sh -c 'npm run kill:ports -- 3710 && cd ../cloud && PORT=3710 CLOUD_PUBLIC_URL=http://127.0.0.1:3710 CLOUD_ALLOWED_ORIGINS='"'"'http://127.0.0.1:3710,http://localhost:3710,http://localhost:5173,http://127.0.0.1:5173,https://quoroom.ai,https://www.quoroom.ai,https://app.quoroom.ai'"'"' npm start'`,
|
|
52884
52884
|
"dev:ui": "vite --config src/ui/vite.config.ts",
|
|
52885
52885
|
"seed:style-demo": "sh -c 'export QUOROOM_DATA_DIR=$HOME/.quoroom-dev; node scripts/seed-style-demo.js'",
|
|
@@ -55483,7 +55483,7 @@ var init_updateChecker = __esm({
|
|
|
55483
55483
|
function getVersion3() {
|
|
55484
55484
|
if (cachedVersion) return cachedVersion;
|
|
55485
55485
|
try {
|
|
55486
|
-
cachedVersion = true ? "0.1.
|
|
55486
|
+
cachedVersion = true ? "0.1.18" : null.version;
|
|
55487
55487
|
} catch {
|
|
55488
55488
|
cachedVersion = "unknown";
|
|
55489
55489
|
}
|
|
@@ -60818,6 +60818,50 @@ var init_webhooks = __esm({
|
|
|
60818
60818
|
}
|
|
60819
60819
|
});
|
|
60820
60820
|
|
|
60821
|
+
// src/server/shell-path.ts
|
|
60822
|
+
function inheritShellPath() {
|
|
60823
|
+
if (process.platform !== "darwin") return;
|
|
60824
|
+
const currentPath = process.env.PATH || "";
|
|
60825
|
+
const currentParts = new Set(currentPath.split(import_node_path4.default.delimiter).filter(Boolean));
|
|
60826
|
+
const shells = [process.env.SHELL, "/bin/zsh", "/bin/bash"].filter(Boolean);
|
|
60827
|
+
for (const sh of shells) {
|
|
60828
|
+
if (!(0, import_node_fs3.existsSync)(sh)) continue;
|
|
60829
|
+
try {
|
|
60830
|
+
const env = { ...process.env };
|
|
60831
|
+
delete env.ELECTRON_RUN_AS_NODE;
|
|
60832
|
+
const shellPath = (0, import_node_child_process6.execSync)(`${sh} -lic 'echo $PATH'`, {
|
|
60833
|
+
encoding: "utf-8",
|
|
60834
|
+
env,
|
|
60835
|
+
timeout: 5e3,
|
|
60836
|
+
stdio: ["ignore", "pipe", "ignore"]
|
|
60837
|
+
}).trim();
|
|
60838
|
+
if (!shellPath) continue;
|
|
60839
|
+
const newParts = shellPath.split(import_node_path4.default.delimiter).filter(Boolean);
|
|
60840
|
+
const additions = [];
|
|
60841
|
+
for (const p of newParts) {
|
|
60842
|
+
if (!currentParts.has(p)) {
|
|
60843
|
+
additions.push(p);
|
|
60844
|
+
currentParts.add(p);
|
|
60845
|
+
}
|
|
60846
|
+
}
|
|
60847
|
+
if (additions.length > 0) {
|
|
60848
|
+
process.env.PATH = `${currentPath}${import_node_path4.default.delimiter}${additions.join(import_node_path4.default.delimiter)}`;
|
|
60849
|
+
}
|
|
60850
|
+
return;
|
|
60851
|
+
} catch {
|
|
60852
|
+
}
|
|
60853
|
+
}
|
|
60854
|
+
}
|
|
60855
|
+
var import_node_child_process6, import_node_fs3, import_node_path4;
|
|
60856
|
+
var init_shell_path = __esm({
|
|
60857
|
+
"src/server/shell-path.ts"() {
|
|
60858
|
+
"use strict";
|
|
60859
|
+
import_node_child_process6 = require("node:child_process");
|
|
60860
|
+
import_node_fs3 = require("node:fs");
|
|
60861
|
+
import_node_path4 = __toESM(require("node:path"));
|
|
60862
|
+
}
|
|
60863
|
+
});
|
|
60864
|
+
|
|
60821
60865
|
// src/server/index.ts
|
|
60822
60866
|
var server_exports2 = {};
|
|
60823
60867
|
__export(server_exports2, {
|
|
@@ -60919,7 +60963,7 @@ function scheduleSelfRestart() {
|
|
|
60919
60963
|
const args2 = [...process.execArgv, ...process.argv.slice(1)];
|
|
60920
60964
|
if (process.platform === "win32") {
|
|
60921
60965
|
const cmd = [process.execPath, ...args2].map(windowsQuote).join(" ");
|
|
60922
|
-
const child = (0,
|
|
60966
|
+
const child = (0, import_node_child_process7.spawn)("cmd.exe", ["/d", "/s", "/c", `ping -n 2 127.0.0.1 >nul && ${cmd}`], {
|
|
60923
60967
|
detached: true,
|
|
60924
60968
|
stdio: "ignore",
|
|
60925
60969
|
windowsHide: true,
|
|
@@ -60928,7 +60972,7 @@ function scheduleSelfRestart() {
|
|
|
60928
60972
|
child.unref();
|
|
60929
60973
|
} else {
|
|
60930
60974
|
const cmd = [process.execPath, ...args2].map(shellQuote).join(" ");
|
|
60931
|
-
const child = (0,
|
|
60975
|
+
const child = (0, import_node_child_process7.spawn)("/bin/sh", ["-c", `sleep 1; exec ${cmd}`], {
|
|
60932
60976
|
detached: true,
|
|
60933
60977
|
stdio: "ignore",
|
|
60934
60978
|
env: process.env
|
|
@@ -60953,7 +60997,7 @@ function maybeLogHttpProfile(method, pathname, statusCode, durationMs) {
|
|
|
60953
60997
|
}
|
|
60954
60998
|
function getCacheControl(filePath, ext) {
|
|
60955
60999
|
const normalized = filePath.replace(/\\/g, "/");
|
|
60956
|
-
const base2 =
|
|
61000
|
+
const base2 = import_node_path5.default.basename(filePath);
|
|
60957
61001
|
if (base2 === "sw.js") return "no-cache, no-store, must-revalidate";
|
|
60958
61002
|
if (ext === ".html") return "no-cache, no-store, must-revalidate";
|
|
60959
61003
|
if (ext === ".webmanifest") return "public, max-age=3600";
|
|
@@ -60972,15 +61016,15 @@ function getCacheControl(filePath, ext) {
|
|
|
60972
61016
|
return "no-cache, max-age=0";
|
|
60973
61017
|
}
|
|
60974
61018
|
function serveStatic(staticDir, pathname, res) {
|
|
60975
|
-
const safePath =
|
|
60976
|
-
let filePath =
|
|
61019
|
+
const safePath = import_node_path5.default.normalize(pathname).replace(/^(\.\.[/\\])+/, "");
|
|
61020
|
+
let filePath = import_node_path5.default.join(staticDir, safePath);
|
|
60977
61021
|
try {
|
|
60978
|
-
const stat =
|
|
61022
|
+
const stat = import_node_fs4.default.statSync(filePath);
|
|
60979
61023
|
if (stat.isDirectory()) {
|
|
60980
|
-
filePath =
|
|
61024
|
+
filePath = import_node_path5.default.join(filePath, "index.html");
|
|
60981
61025
|
}
|
|
60982
61026
|
} catch {
|
|
60983
|
-
if (
|
|
61027
|
+
if (import_node_path5.default.extname(safePath)) {
|
|
60984
61028
|
res.writeHead(404, {
|
|
60985
61029
|
"Content-Type": "text/plain; charset=utf-8",
|
|
60986
61030
|
"Cache-Control": "no-cache, no-store, must-revalidate"
|
|
@@ -60988,15 +61032,15 @@ function serveStatic(staticDir, pathname, res) {
|
|
|
60988
61032
|
res.end("Not Found");
|
|
60989
61033
|
return;
|
|
60990
61034
|
}
|
|
60991
|
-
filePath =
|
|
61035
|
+
filePath = import_node_path5.default.join(staticDir, "index.html");
|
|
60992
61036
|
}
|
|
60993
|
-
const ext =
|
|
61037
|
+
const ext = import_node_path5.default.extname(filePath).toLowerCase();
|
|
60994
61038
|
const contentType = MIME_TYPES[ext] ?? "application/octet-stream";
|
|
60995
61039
|
const headers = {
|
|
60996
61040
|
"Content-Type": contentType,
|
|
60997
61041
|
"Cache-Control": getCacheControl(filePath, ext)
|
|
60998
61042
|
};
|
|
60999
|
-
const stream =
|
|
61043
|
+
const stream = import_node_fs4.default.createReadStream(filePath);
|
|
61000
61044
|
stream.on("open", () => {
|
|
61001
61045
|
res.writeHead(200, headers);
|
|
61002
61046
|
stream.pipe(res);
|
|
@@ -61234,16 +61278,16 @@ function createApiServer(options = {}) {
|
|
|
61234
61278
|
}
|
|
61235
61279
|
function patchMcpConfig(configPath, entry) {
|
|
61236
61280
|
try {
|
|
61237
|
-
if (!
|
|
61281
|
+
if (!import_node_fs4.default.existsSync(configPath)) return false;
|
|
61238
61282
|
let config2 = {};
|
|
61239
61283
|
try {
|
|
61240
|
-
config2 = JSON.parse(
|
|
61284
|
+
config2 = JSON.parse(import_node_fs4.default.readFileSync(configPath, "utf-8"));
|
|
61241
61285
|
} catch {
|
|
61242
61286
|
}
|
|
61243
61287
|
const mcpServers = config2.mcpServers ?? {};
|
|
61244
61288
|
mcpServers["quoroom"] = entry;
|
|
61245
61289
|
config2.mcpServers = mcpServers;
|
|
61246
|
-
|
|
61290
|
+
import_node_fs4.default.writeFileSync(configPath, JSON.stringify(config2, null, 2) + "\n");
|
|
61247
61291
|
return true;
|
|
61248
61292
|
} catch {
|
|
61249
61293
|
return false;
|
|
@@ -61252,7 +61296,7 @@ function patchMcpConfig(configPath, entry) {
|
|
|
61252
61296
|
function registerMcpGlobally(dbPath) {
|
|
61253
61297
|
try {
|
|
61254
61298
|
const home = (0, import_node_os5.homedir)();
|
|
61255
|
-
const mcpServerPath =
|
|
61299
|
+
const mcpServerPath = import_node_path5.default.join(__dirname, "server.js");
|
|
61256
61300
|
const nodePath = process.execPath;
|
|
61257
61301
|
const entry = (source) => ({
|
|
61258
61302
|
command: nodePath,
|
|
@@ -61261,28 +61305,29 @@ function registerMcpGlobally(dbPath) {
|
|
|
61261
61305
|
});
|
|
61262
61306
|
const isWin = process.platform === "win32";
|
|
61263
61307
|
const isMac = process.platform === "darwin";
|
|
61264
|
-
patchMcpConfig(
|
|
61265
|
-
const claudeDesktopPath = isWin ?
|
|
61308
|
+
patchMcpConfig(import_node_path5.default.join(home, ".claude.json"), entry("claude-code"));
|
|
61309
|
+
const claudeDesktopPath = isWin ? import_node_path5.default.join(home, "AppData", "Roaming", "Claude", "claude_desktop_config.json") : isMac ? import_node_path5.default.join(home, "Library", "Application Support", "Claude", "claude_desktop_config.json") : import_node_path5.default.join(home, ".config", "Claude", "claude_desktop_config.json");
|
|
61266
61310
|
patchMcpConfig(claudeDesktopPath, entry("claude-desktop"));
|
|
61267
|
-
patchMcpConfig(
|
|
61311
|
+
patchMcpConfig(import_node_path5.default.join(home, ".cursor", "mcp.json"), entry("cursor"));
|
|
61268
61312
|
patchMcpConfig(
|
|
61269
|
-
|
|
61313
|
+
import_node_path5.default.join(home, ".codeium", "windsurf", "mcp_config.json"),
|
|
61270
61314
|
entry("windsurf")
|
|
61271
61315
|
);
|
|
61272
61316
|
} catch {
|
|
61273
61317
|
}
|
|
61274
61318
|
}
|
|
61275
61319
|
function startServer(options = {}) {
|
|
61320
|
+
inheritShellPath();
|
|
61276
61321
|
const port = options.port ?? DEFAULT_PORT;
|
|
61277
61322
|
const deploymentMode = getDeploymentMode();
|
|
61278
61323
|
const bindHost = process.env.QUOROOM_BIND_HOST || (deploymentMode === "cloud" ? DEFAULT_BIND_HOST_CLOUD : DEFAULT_BIND_HOST_LOCAL);
|
|
61279
61324
|
if (!options.staticDir) {
|
|
61280
|
-
const defaultUiDir =
|
|
61281
|
-
if (
|
|
61325
|
+
const defaultUiDir = import_node_path5.default.join(__dirname, "../ui");
|
|
61326
|
+
if (import_node_fs4.default.existsSync(defaultUiDir)) {
|
|
61282
61327
|
options.staticDir = defaultUiDir;
|
|
61283
61328
|
}
|
|
61284
61329
|
}
|
|
61285
|
-
const dbPath = process.env.QUOROOM_DB_PATH ||
|
|
61330
|
+
const dbPath = process.env.QUOROOM_DB_PATH || import_node_path5.default.join(options.dataDir ?? getDataDir(), "data.db");
|
|
61286
61331
|
const { server, token, db: serverDb } = createApiServer(options);
|
|
61287
61332
|
if (!process.env.QUOROOM_SKIP_MCP_REGISTER) {
|
|
61288
61333
|
registerMcpGlobally(dbPath);
|
|
@@ -61302,7 +61347,7 @@ function startServer(options = {}) {
|
|
|
61302
61347
|
console.error(`Auth token: ${token.slice(0, 8)}...`);
|
|
61303
61348
|
if (process.env.NODE_ENV === "production" && deploymentMode !== "cloud") {
|
|
61304
61349
|
const cmd = process.platform === "darwin" ? "open" : process.platform === "win32" ? "start" : "xdg-open";
|
|
61305
|
-
(0,
|
|
61350
|
+
(0, import_node_child_process7.exec)(`${cmd} ${dashboardUrl}`);
|
|
61306
61351
|
}
|
|
61307
61352
|
});
|
|
61308
61353
|
}
|
|
@@ -61310,7 +61355,7 @@ function startServer(options = {}) {
|
|
|
61310
61355
|
if (err.code === "EADDRINUSE") {
|
|
61311
61356
|
console.error(`Port ${port} is in use \u2014 killing existing process...`);
|
|
61312
61357
|
try {
|
|
61313
|
-
(0,
|
|
61358
|
+
(0, import_node_child_process7.execSync)(`lsof -ti :${port} | xargs kill -9`, { stdio: "ignore" });
|
|
61314
61359
|
} catch {
|
|
61315
61360
|
}
|
|
61316
61361
|
setTimeout(listen, 500);
|
|
@@ -61349,17 +61394,17 @@ function startServer(options = {}) {
|
|
|
61349
61394
|
process.exit(0);
|
|
61350
61395
|
});
|
|
61351
61396
|
}
|
|
61352
|
-
var import_node_http, import_node_https2, import_node_url,
|
|
61397
|
+
var import_node_http, import_node_https2, import_node_url, import_node_fs4, import_node_path5, import_node_os5, import_node_child_process7, DEFAULT_PORT, DEFAULT_BIND_HOST_LOCAL, DEFAULT_BIND_HOST_CLOUD, MIME_TYPES, PROFILE_HTTP, PROFILE_HTTP_SLOW_MS, PROFILE_HTTP_ENDPOINTS, RATE_LIMIT_WINDOW_MS2, RATE_LIMIT_READ, RATE_LIMIT_WRITE, rateBuckets2, CLOUD_SECURITY_HEADERS;
|
|
61353
61398
|
var init_server4 = __esm({
|
|
61354
61399
|
"src/server/index.ts"() {
|
|
61355
61400
|
"use strict";
|
|
61356
61401
|
import_node_http = __toESM(require("node:http"));
|
|
61357
61402
|
import_node_https2 = __toESM(require("node:https"));
|
|
61358
61403
|
import_node_url = require("node:url");
|
|
61359
|
-
|
|
61360
|
-
|
|
61404
|
+
import_node_fs4 = __toESM(require("node:fs"));
|
|
61405
|
+
import_node_path5 = __toESM(require("node:path"));
|
|
61361
61406
|
import_node_os5 = require("node:os");
|
|
61362
|
-
|
|
61407
|
+
import_node_child_process7 = require("node:child_process");
|
|
61363
61408
|
init_router();
|
|
61364
61409
|
init_auth();
|
|
61365
61410
|
init_access();
|
|
@@ -61373,6 +61418,7 @@ var init_server4 = __esm({
|
|
|
61373
61418
|
init_runtime();
|
|
61374
61419
|
init_web_tools();
|
|
61375
61420
|
init_webhooks();
|
|
61421
|
+
init_shell_path();
|
|
61376
61422
|
try {
|
|
61377
61423
|
process.loadEnvFile?.(".env");
|
|
61378
61424
|
} catch {
|
|
@@ -61445,8 +61491,8 @@ function getConnection() {
|
|
|
61445
61491
|
process.exit(1);
|
|
61446
61492
|
}
|
|
61447
61493
|
}
|
|
61448
|
-
async function apiRequest(port, token, method,
|
|
61449
|
-
const res = await fetch(`http://localhost:${port}${
|
|
61494
|
+
async function apiRequest(port, token, method, path4, body) {
|
|
61495
|
+
const res = await fetch(`http://localhost:${port}${path4}`, {
|
|
61450
61496
|
method,
|
|
61451
61497
|
headers: {
|
|
61452
61498
|
"Content-Type": "application/json",
|
package/out/mcp/server.js
CHANGED
|
@@ -33338,7 +33338,7 @@ function resolveClaudePath() {
|
|
|
33338
33338
|
for (const sh of shells) {
|
|
33339
33339
|
if (!(0, import_fs.existsSync)(sh)) continue;
|
|
33340
33340
|
try {
|
|
33341
|
-
const resolved = (0, import_child_process.execSync)(`${sh} -
|
|
33341
|
+
const resolved = (0, import_child_process.execSync)(`${sh} -lic 'which claude'`, {
|
|
33342
33342
|
encoding: "utf-8",
|
|
33343
33343
|
env,
|
|
33344
33344
|
timeout: 5e3
|
|
@@ -47485,7 +47485,7 @@ Share this with the keeper or potential collaborators. Rooms created through thi
|
|
|
47485
47485
|
async function main() {
|
|
47486
47486
|
const server = new McpServer({
|
|
47487
47487
|
name: "quoroom",
|
|
47488
|
-
version: true ? "0.1.
|
|
47488
|
+
version: true ? "0.1.18" : "0.0.0"
|
|
47489
47489
|
});
|
|
47490
47490
|
registerMemoryTools(server);
|
|
47491
47491
|
registerSchedulerTools(server);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "quoroom",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.18",
|
|
4
4
|
"description": "Autonomous AI agent collective engine — Queen, Workers, Quorum",
|
|
5
5
|
"main": "./out/mcp/server.js",
|
|
6
6
|
"bin": {
|
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
"build:mcp": "node scripts/build-mcp.js",
|
|
26
26
|
"build:ui": "vite build --config src/ui/vite.config.ts",
|
|
27
27
|
"kill:ports": "node scripts/kill-ports.js",
|
|
28
|
-
"kill:dev-ports": "npm run kill:ports -- 4700 3710",
|
|
28
|
+
"kill:dev-ports": "npm run kill:ports -- 4700 3710 5173",
|
|
29
29
|
"dev:links": "node scripts/dev-links.js",
|
|
30
30
|
"dev": "sh -c 'npm run kill:dev-ports && trap \"kill 0\" INT TERM EXIT; npm run dev:links & npm run dev:room & npm run dev:cloud & wait'",
|
|
31
31
|
"dev:room": "sh -c 'export QUOROOM_DATA_DIR=$HOME/.quoroom-dev QUOROOM_SKIP_MCP_REGISTER=1; npm run build:mcp && npm run build:ui && node scripts/dev-server.js --port 4700'",
|
|
32
32
|
"dev:room:isolated": "sh -c 'export QUOROOM_DATA_DIR=$HOME/.quoroom-dev QUOROOM_SKIP_MCP_REGISTER=1; npm run build:mcp && npm run build:ui && node scripts/dev-server.js --port 4700'",
|
|
33
33
|
"dev:room:shared": "npm run build:mcp && npm run build:ui && node scripts/dev-server.js",
|
|
34
34
|
"doctor:split": "node scripts/doctor-split.js",
|
|
35
|
-
"dev:isolated": "sh -c 'npm run kill:dev-ports && trap \"kill 0\" INT TERM EXIT; npm run dev:links & npm run dev:room:isolated & npm run dev:cloud & wait'",
|
|
35
|
+
"dev:isolated": "sh -c 'npm run kill:dev-ports && trap \"kill 0\" INT TERM EXIT; npm run dev:links & npm run dev:room:isolated & npm run dev:cloud & VITE_API_PORT=4700 npm run dev:ui & wait'",
|
|
36
36
|
"dev:cloud": "sh -c 'npm run kill:ports -- 3710 && cd ../cloud && PORT=3710 CLOUD_PUBLIC_URL=http://127.0.0.1:3710 CLOUD_ALLOWED_ORIGINS='\"'\"'http://127.0.0.1:3710,http://localhost:3710,http://localhost:5173,http://127.0.0.1:5173,https://quoroom.ai,https://www.quoroom.ai,https://app.quoroom.ai'\"'\"' npm start'",
|
|
37
37
|
"dev:ui": "vite --config src/ui/vite.config.ts",
|
|
38
38
|
"seed:style-demo": "sh -c 'export QUOROOM_DATA_DIR=$HOME/.quoroom-dev; node scripts/seed-style-demo.js'",
|