codex-dev-mcp-suite 1.0.0 → 1.1.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.
@@ -1,53 +0,0 @@
1
- // Optional online test: LLM rerank via 9router Kiro. Skips cleanly if offline.
2
- import { McpClient, describe, it, assert, assertIncludes, run, tmpDir, rmrf } from "../_testkit/harness.mjs";
3
- import path from "path";
4
- import http from "http";
5
- import { fileURLToPath } from "url";
6
-
7
- const __dirname = path.dirname(fileURLToPath(import.meta.url));
8
- const SERVER = path.join(__dirname, "server.js");
9
- const KEY = process.env.LLM_API_KEY || process.env.RERANK_KEY || process.env.NINEROUTER_KEY || "";
10
- const URL_BASE = "http://localhost:20128";
11
-
12
- function ping() {
13
- return new Promise((resolve) => {
14
- const req = http.request(URL_BASE + "/v1/models", { method: "GET", timeout: 4000, headers: { Authorization: `Bearer ${KEY}` } }, (r) => { r.resume(); resolve(r.statusCode === 200); });
15
- req.on("error", () => resolve(false));
16
- req.on("timeout", () => { req.destroy(); resolve(false); });
17
- req.end();
18
- });
19
- }
20
-
21
- if (!KEY) { console.log(" ⚠ rerank test skipped (no LLM_API_KEY in env)"); process.exit(0); }
22
- const online = await ping();
23
- if (!online) {
24
- console.log(" ⚠ rerank test skipped (9router not reachable)");
25
- process.exit(0);
26
- }
27
-
28
- const VAULT = tmpDir("pm-rr-");
29
- const DEMO = "/tmp/pm-rr-demo";
30
- const env = { MEMORY_VAULT_DIR: VAULT, LLM_BASE_URL: URL_BASE, LLM_API_KEY: KEY, EMBED_KEY: "", RERANK_MODEL: "kr/claude-haiku-4.5", RERANK_TIMEOUT_MS: "40000" };
31
- const client = new McpClient(SERVER, env);
32
-
33
- describe("project-memory (rerank/online)", () => {
34
- it("seeds distinct notes", async () => {
35
- await client.callTool("memory_save", { dir: DEMO, title: "JWT auth flow", content: "login issues JWT; refresh token stored in httpOnly cookie", tags: ["auth"] });
36
- await client.callTool("memory_save", { dir: DEMO, title: "Dark mode toggle", content: "CSS variables and localStorage for theme switching", tags: ["ui"] });
37
- await client.callTool("memory_save", { dir: DEMO, title: "Nginx docker setup", content: "Dockerfile and compose for nginx reverse proxy", tags: ["infra"] });
38
- const r = await client.callTool("memory_list", { dir: DEMO });
39
- assertIncludes(r.text, "(3)");
40
- });
41
-
42
- it("reranks a semantic query to the auth note (no keyword overlap)", async () => {
43
- const r = await client.callTool("memory_recall", { dir: DEMO, query: "how do users sign in securely with tokens", limit: 1 }, 60000);
44
- assertIncludes(r.text, "[rerank]");
45
- assertIncludes(r.text, "JWT auth flow");
46
- });
47
- });
48
-
49
- await client.start();
50
- const { fail } = await run();
51
- await client.stop();
52
- rmrf(VAULT);
53
- process.exit(fail > 0 ? 1 : 0);
package/run-tests.mjs DELETED
@@ -1,42 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Runs every server's test.mjs and prints a combined summary.
4
- * Usage: node run-tests.mjs (from ~/.codex/mcp-servers)
5
- */
6
- import { spawn } from "child_process";
7
- import path from "path";
8
- import { fileURLToPath } from "url";
9
-
10
- const __dirname = path.dirname(fileURLToPath(import.meta.url));
11
- const SERVERS = ["project-memory", "checkpoint", "context-pack", "devjournal"];
12
-
13
- function runOne(name) {
14
- return new Promise((resolve) => {
15
- const test = path.join(__dirname, name, "test.mjs");
16
- const proc = spawn("node", [test], { stdio: ["ignore", "pipe", "pipe"] });
17
- let out = "";
18
- proc.stdout.on("data", (d) => (out += d));
19
- proc.stderr.on("data", (d) => (out += d));
20
- proc.on("close", (code) => resolve({ name, code, out }));
21
- });
22
- }
23
-
24
- const results = [];
25
- for (const s of SERVERS) {
26
- console.log(`\n=== ${s} ===`);
27
- const r = await runOne(s);
28
- process.stdout.write(r.out);
29
- results.push(r);
30
- }
31
-
32
- console.log("\n================ SUMMARY ================");
33
- let anyFail = false;
34
- for (const r of results) {
35
- const ok = r.code === 0;
36
- if (!ok) anyFail = true;
37
- const m = r.out.match(/(\d+) passed, (\d+) failed/);
38
- const stat = m ? `${m[1]} passed, ${m[2]} failed` : (ok ? "ok" : "FAILED");
39
- console.log(` ${ok ? "✓" : "✗"} ${r.name.padEnd(16)} ${stat}`);
40
- }
41
- console.log("========================================");
42
- process.exit(anyFail ? 1 : 0);