Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

264 changes: 264 additions & 0 deletions packages/gittensory-mcp/CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/gittensory-mcp/bin/gittensory-mcp.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { buildBranchAnalysisPayload, collectLocalDiff, collectLocalBranchMetadat
const defaultApiUrl = "https://gittensory-api.aethereal.dev";
const legacyDefaultApiUrls = new Set(["https://gittensory-api.zeronode.workers.dev"]);
const packageName = "@jsonbored/gittensory-mcp";
const packageVersion = "0.6.0";
const packageVersion = "0.7.0";
const npmRegistryUrl = (process.env.GITTENSORY_NPM_REGISTRY_URL ?? "https://registry.npmjs.org").replace(/\/+$/, "");
const upgradeCommand = `npm install -g ${packageName}@latest`;
const npxFallbackCommand = `npx ${packageName}@latest <command>`;
Expand Down
2 changes: 1 addition & 1 deletion packages/gittensory-mcp/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jsonbored/gittensory-mcp",
"version": "0.6.0",
"version": "0.7.0",
"license": "AGPL-3.0-only",
"type": "module",
"description": "Local stdio MCP wrapper for the Gittensory Gittensor base-agent.",
Expand Down
2 changes: 1 addition & 1 deletion scripts/check-mcp-release-due.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function readCommitFiles(sha) {
}

function git(args) {
return execFileSync("git", args, { encoding: "utf8" });
return execFileSync("git", args, { encoding: "utf8", maxBuffer: 1024 * 1024 * 200 });
}

async function upsertIssue(report) {
Expand Down
2 changes: 1 addition & 1 deletion scripts/generate-mcp-changelog.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ function todayIsoDate() {
}

function git(args) {
return execFileSync("git", args, { encoding: "utf8" });
return execFileSync("git", args, { encoding: "utf8", maxBuffer: 1024 * 1024 * 200 });
}

function escapeRegExp(value) {
Expand Down
2 changes: 1 addition & 1 deletion src/services/mcp-compatibility.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export const GITTENSORY_API_VERSION = "0.1.0";
export const GITTENSORY_MCP_PACKAGE_NAME = "@jsonbored/gittensory-mcp";
export const MINIMUM_SUPPORTED_MCP_VERSION = "0.5.0";
export const LATEST_RECOMMENDED_MCP_VERSION = "0.6.0";
export const LATEST_RECOMMENDED_MCP_VERSION = "0.7.0";

export type McpCompatibilityStatus = "current" | "stale" | "incompatible" | "unknown";

Expand Down
10 changes: 5 additions & 5 deletions test/integration/api.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ describe("api routes", () => {
status: "ok",
service: "gittensory-api",
minMcpVersion: "0.5.0",
latestRecommendedMcpVersion: "0.6.0",
latestRecommendedMcpVersion: "0.7.0",
});

const compatibility = await app.request("/v1/mcp/compatibility", {}, env);
Expand All @@ -110,8 +110,8 @@ describe("api routes", () => {
mcp: {
packageName: "@jsonbored/gittensory-mcp",
minimumSupportedVersion: "0.5.0",
latestRecommendedVersion: "0.6.0",
latestPackageVersion: "0.6.0",
latestRecommendedVersion: "0.7.0",
latestPackageVersion: "0.7.0",
},
compatibilityWarnings: [],
breakingChanges: [],
Expand Down Expand Up @@ -3928,7 +3928,7 @@ describe("api routes", () => {
expect(mcpCompatibilityBody).toMatchObject({
adoption: expect.objectContaining({
minimumSupportedVersion: "0.5.0",
latestRecommendedVersion: "0.6.0",
latestRecommendedVersion: "0.7.0",
staleEvents: 1,
incompatibleEvents: 3,
totalEvents: 4,
Expand Down Expand Up @@ -5817,7 +5817,7 @@ describe("api routes", () => {
protocolVersion: "2025-03-26",
compatibilityStatus: "incompatible",
minimumSupportedVersion: "0.5.0",
latestRecommendedVersion: "0.6.0",
latestRecommendedVersion: "0.7.0",
}),
}),
]),
Expand Down
4 changes: 2 additions & 2 deletions test/unit/mcp-cli-basics.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ describe("gittensory-mcp CLI — basics", () => {
});

it("reports the package version via version, --version, and -v", () => {
const expected = "@jsonbored/gittensory-mcp/0.6.0";
const expected = "@jsonbored/gittensory-mcp/0.7.0";
for (const flag of ["version", "--version", "-v"]) {
const plain = run([flag]).trim();
expect(plain).toContain(expected);
Expand All @@ -131,7 +131,7 @@ describe("gittensory-mcp CLI — basics", () => {
it("emits machine-readable version output with --json", () => {
const payload = JSON.parse(run(["version", "--json"])) as { name: string; version: string; apiVersion: string; node: string };
expect(payload.name).toBe("@jsonbored/gittensory-mcp");
expect(payload.version).toBe("0.6.0");
expect(payload.version).toBe("0.7.0");
expect(payload.apiVersion).toBe("0.1.0");
expect(payload.node).toBe(process.version);
});
Expand Down
12 changes: 6 additions & 6 deletions test/unit/mcp-cli-doctor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ describe("gittensory-mcp CLI — doctor", () => {

it("reports a current install without upgrade guidance", async () => {
tempDir = mkdtempSync(join(tmpdir(), "gittensory-cli-"));
const url = await startFixtureServer({ latestVersion: "0.6.0", minMcpVersion: "0.5.0" });
const url = await startFixtureServer({ latestVersion: "0.7.0", minMcpVersion: "0.5.0" });
const payload = JSON.parse(
await runAsync(["status", "--json"], {
GITTENSORY_API_URL: url,
Expand All @@ -166,7 +166,7 @@ describe("gittensory-mcp CLI — doctor", () => {
status: "compatible",
source: "compatibility_endpoint",
minVersion: "0.5.0",
latestRecommendedVersion: "0.6.0",
latestRecommendedVersion: "0.7.0",
apiVersion: "0.1.0",
});
});
Expand All @@ -186,8 +186,8 @@ describe("gittensory-mcp CLI — doctor", () => {
expect(ahead.package).toMatchObject({ state: "ahead", updateAvailable: false });
await closeFixtureServer();

// Local 0.6.0 vs a higher-core prerelease 0.7.0-rc.1 -> stale.
const staleUrl = await startFixtureServer({ latestVersion: "0.7.0-rc.1" });
// Local 0.7.0 vs a higher-core prerelease 0.8.0-rc.1 -> stale.
const staleUrl = await startFixtureServer({ latestVersion: "0.8.0-rc.1" });
const stale = JSON.parse(
await runAsync(["status", "--json"], {
GITTENSORY_API_URL: staleUrl,
Expand Down Expand Up @@ -282,7 +282,7 @@ describe("gittensory-mcp CLI — doctor", () => {

it("uses API recommended package metadata when the npm registry is unavailable", async () => {
tempDir = mkdtempSync(join(tmpdir(), "gittensory-cli-"));
const url = await startFixtureServer({ npmStatus: 500, latestRecommendedMcpVersion: "0.7.0" });
const url = await startFixtureServer({ npmStatus: 500, latestRecommendedMcpVersion: "0.8.0" });
const payload = JSON.parse(
await runAsync(["status", "--json"], {
GITTENSORY_API_URL: url,
Expand All @@ -294,7 +294,7 @@ describe("gittensory-mcp CLI — doctor", () => {
expect(payload.package).toMatchObject({
state: "stale",
latestStatus: "api",
latestVersion: "0.7.0",
latestVersion: "0.8.0",
upgradeCommand: "npm install -g @jsonbored/gittensory-mcp@latest",
});
});
Expand Down
6 changes: 3 additions & 3 deletions test/unit/mcp-cli-profiles.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,12 @@ describe("gittensory-mcp CLI — profiles", () => {
}),
) as { package: { name: string; version: string; latestStatus: string }; api: { status: string }; auth: { login: string } };

expect(status.package).toMatchObject({ name: "@jsonbored/gittensory-mcp", version: "0.6.0", latestStatus: "skipped" });
expect(status.package).toMatchObject({ name: "@jsonbored/gittensory-mcp", version: "0.7.0", latestStatus: "skipped" });
expect(status.api.status).toBe("ok");
expect(status.auth.login).toBe("JSONbored");

const changelog = JSON.parse(run(["changelog", "--json"])) as { package: { version: string }; changelog: string };
expect(changelog.package.version).toBe("0.6.0");
expect(changelog.package.version).toBe("0.7.0");
expect(changelog.changelog).toContain("# Changelog");
});

Expand All @@ -180,7 +180,7 @@ describe("gittensory-mcp CLI — profiles", () => {

const sessionRequest = requests.find((request) => request.url === "/v1/auth/session");
expect(sessionRequest?.headers["x-gittensory-mcp-package"]).toBe("@jsonbored/gittensory-mcp");
expect(sessionRequest?.headers["x-gittensory-mcp-version"]).toBe("0.6.0");
expect(sessionRequest?.headers["x-gittensory-mcp-version"]).toBe("0.7.0");
expect(sessionRequest?.headers["x-gittensory-mcp-client"]).toBe("gittensory-mcp-cli");
const telemetryHeaders = JSON.stringify({
package: sessionRequest?.headers["x-gittensory-mcp-package"],
Expand Down
12 changes: 6 additions & 6 deletions test/unit/mcp-compatibility.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe("MCP compatibility telemetry", () => {
expect(classifyMcpClientVersion("0.4.0")).toBe("incompatible");
expect(classifyMcpClientVersion("0.5.0")).toBe("stale");
expect(classifyMcpClientVersion("0.5.9")).toBe("stale");
expect(classifyMcpClientVersion("0.6.0")).toBe("current");
expect(classifyMcpClientVersion("0.6.0")).toBe("stale");
expect(classifyMcpClientVersion("0.7.0")).toBe("current");
expect(classifyMcpClientVersion("not-a-version")).toBe("unknown");
expect(classifyMcpClientVersion(undefined)).toBe("unknown");
Expand All @@ -20,15 +20,15 @@ describe("MCP compatibility telemetry", () => {
it("treats prerelease builds below the minimum or recommended cutoffs as incompatible or stale", () => {
expect(classifyMcpClientVersion("0.4.9-rc.1")).toBe("incompatible");
expect(classifyMcpClientVersion("0.5.0-rc.1")).toBe("incompatible");
expect(classifyMcpClientVersion("0.6.0-rc.1")).toBe("stale");
expect(classifyMcpClientVersion("0.7.0-rc.1")).toBe("stale");
});

it("classifies the exact recommended version and newer releases as current", () => {
expect(classifyMcpClientVersion("0.6.0")).toBe("current");
expect(classifyMcpClientVersion("0.6.1")).toBe("current");
expect(classifyMcpClientVersion("0.7.0")).toBe("current");
expect(classifyMcpClientVersion("0.7.1")).toBe("current");
expect(classifyMcpClientVersion("1.0.0")).toBe("current");
expect(compareMcpSemver("0.6.0", "0.6.0")).toBe(0);
expect(compareMcpSemver("0.7.0", "0.6.0")).toBe(1);
expect(compareMcpSemver("0.7.0", "0.7.0")).toBe(0);
expect(compareMcpSemver("0.8.0", "0.7.0")).toBe(1);
});

it("builds bounded telemetry from allowlisted MCP headers", () => {
Expand Down
Loading