|
|
@@ -13,6 +13,8 @@ import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js"
|
|
|
|
|
|
const execFileAsync = promisify(execFile);
|
|
|
const EXPECTED_TOOLS = ["overview", "list_threads", "inspect_thread", "wait_for_change"];
|
|
|
+const PACKAGE_NAME = "@bodicsek/codex-chief-of-staff";
|
|
|
+const BIN_NAME = "codex-chief-of-staff";
|
|
|
const DEFAULT_CACHE = "/private/tmp/codex-chief-of-staff-npm-cache";
|
|
|
const USAGE = "usage: npm run verify:git-package -- <git+https|git+ssh|git+file URL>#<vX.Y.Z|40-character-commit>";
|
|
|
|
|
|
@@ -59,8 +61,8 @@ async function installPackage(prefix, cache, packageSpec) {
|
|
|
}
|
|
|
|
|
|
async function installedPackage(prefix, cache) {
|
|
|
- const packageRoot = join(prefix, "lib", "node_modules", "codex-chief-of-staff");
|
|
|
- const executable = join(prefix, "bin", "codex-chief-of-staff");
|
|
|
+ const packageRoot = join(prefix, "lib", "node_modules", PACKAGE_NAME);
|
|
|
+ const executable = join(prefix, "bin", BIN_NAME);
|
|
|
await access(executable, constants.X_OK);
|
|
|
|
|
|
const packageMetadata = await lstat(packageRoot);
|
|
|
@@ -82,8 +84,8 @@ async function installedPackage(prefix, cache) {
|
|
|
}
|
|
|
|
|
|
const manifest = JSON.parse(await readFile(join(realPackage, "package.json"), "utf8"));
|
|
|
- assert.equal(manifest.name, "codex-chief-of-staff");
|
|
|
- assert.deepEqual(manifest.bin, { "codex-chief-of-staff": "dist/src/index.js" });
|
|
|
+ assert.equal(manifest.name, PACKAGE_NAME);
|
|
|
+ assert.deepEqual(manifest.bin, { [BIN_NAME]: "dist/src/index.js" });
|
|
|
return { executable, version: String(manifest.version) };
|
|
|
}
|
|
|
|
|
|
@@ -112,9 +114,9 @@ async function verify() {
|
|
|
|
|
|
process.stdout.write(`${JSON.stringify({
|
|
|
ok: true,
|
|
|
- package: `codex-chief-of-staff@${installed.version}`,
|
|
|
+ package: `${PACKAGE_NAME}@${installed.version}`,
|
|
|
revision,
|
|
|
- executable: "bin/codex-chief-of-staff",
|
|
|
+ executable: `bin/${BIN_NAME}`,
|
|
|
storage: "isolated-prefix",
|
|
|
instructions: "verified",
|
|
|
tools: EXPECTED_TOOLS,
|