From 7fbcf9f4a2516c83f41b861fb54efd976e77fa5a Mon Sep 17 00:00:00 2001 From: Jeffery Orazulike Date: Tue, 24 Nov 2026 18:33:48 +0100 Subject: [PATCH 1/2] chore(release): sync plugin and MCP version (0.2.4) Read MCP server VERSION from package.json, sync Claude plugin.json version during `pnpm build` and in publish.yml, and bump to 0.2.4. --- .github/workflows/publish.yml | 3 ++- package.json | 5 +++-- src/adapters/claude/plugin/.claude-plugin/plugin.json | 2 +- src/mcp/identity.ts | 6 +++++- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 31adc6c..4c93cf1 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -99,6 +99,7 @@ jobs: path: | dist package.json + src/adapters/claude/plugin/.claude-plugin/plugin.json if-no-files-found: error retention-days: 1 @@ -133,7 +134,7 @@ jobs: run: | git config user.name "github-actions[bot]" git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - git add package.json + git add package.json src/adapters/claude/plugin/.claude-plugin/plugin.json git commit -m "chore(release): $VERSION [skip ci]" git push origin HEAD:main diff --git a/package.json b/package.json index 55c8329..f06a257 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@logickoder/agent-bridge", - "version": "0.2.3", + "version": "0.2.4", "description": "Live messaging between agent CLI sessions (Claude Code, Antigravity, opencode). Each message wakes the receiving session in place.", "author": { "name": "Jeffery Orazulike", @@ -16,7 +16,8 @@ }, "packageManager": "pnpm@12.16.1", "scripts": { - "build": "rm -rf dist && tsc -p tsconfig.build.json && chmod +x dist/cli.js", + "sync-version": "node -e \"const fs=require('fs'),p='src/adapters/claude/plugin/.claude-plugin/plugin.json',v=JSON.parse(fs.readFileSync('package.json','utf8')).version,j=JSON.parse(fs.readFileSync(p,'utf8'));if(j.version!==v){j.version=v;fs.writeFileSync(p,JSON.stringify(j,null,2)+'\\n')}\"", + "build": "pnpm sync-version && rm -rf dist && tsc -p tsconfig.build.json && chmod +x dist/cli.js", "typecheck": "tsc --noEmit", "test": "vitest run --dir src", "test:e2e": "pnpm build && vitest run --dir test", diff --git a/src/adapters/claude/plugin/.claude-plugin/plugin.json b/src/adapters/claude/plugin/.claude-plugin/plugin.json index 4b93b29..2a46276 100644 --- a/src/adapters/claude/plugin/.claude-plugin/plugin.json +++ b/src/adapters/claude/plugin/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "agent-bridge", - "version": "0.2.0", + "version": "0.2.4", "description": "Join agent-bridge from Claude Code with /bridge. A monitor delivers messages from peer agents (other Claude sessions, agy).", "author": { "name": "logickoder" } } diff --git a/src/mcp/identity.ts b/src/mcp/identity.ts index a80bd53..d09944b 100644 --- a/src/mcp/identity.ts +++ b/src/mcp/identity.ts @@ -1,3 +1,7 @@ +import fs from 'node:fs' + /** Name every client sees for this server. Also the key in client configs. */ export const SERVER_NAME = 'agent-bridge' -export const VERSION = '0.1.0' + +const pkg = JSON.parse(fs.readFileSync(new URL('../../package.json', import.meta.url), 'utf8')) as { version: string } +export const VERSION: string = pkg.version From ea49f153b96254a98a7bec9e9a32873668f02618 Mon Sep 17 00:00:00 2001 From: Jeffery Orazulike Date: Tue, 24 Nov 2026 18:49:45 +0100 Subject: [PATCH 2/2] chore(build): generate identity.ts via scripts/sync-version.mjs --- .gitignore | 1 + package.json | 3 ++- scripts/sync-version.mjs | 25 +++++++++++++++++++++++++ src/mcp/identity.ts | 7 ------- 4 files changed, 28 insertions(+), 8 deletions(-) create mode 100644 scripts/sync-version.mjs delete mode 100644 src/mcp/identity.ts diff --git a/.gitignore b/.gitignore index b947077..38e16cb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ node_modules/ dist/ +src/mcp/identity.ts diff --git a/package.json b/package.json index f06a257..42b1c9c 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,8 @@ }, "packageManager": "pnpm@12.16.1", "scripts": { - "sync-version": "node -e \"const fs=require('fs'),p='src/adapters/claude/plugin/.claude-plugin/plugin.json',v=JSON.parse(fs.readFileSync('package.json','utf8')).version,j=JSON.parse(fs.readFileSync(p,'utf8'));if(j.version!==v){j.version=v;fs.writeFileSync(p,JSON.stringify(j,null,2)+'\\n')}\"", + "sync-version": "node scripts/sync-version.mjs", + "prepare": "pnpm sync-version", "build": "pnpm sync-version && rm -rf dist && tsc -p tsconfig.build.json && chmod +x dist/cli.js", "typecheck": "tsc --noEmit", "test": "vitest run --dir src", diff --git a/scripts/sync-version.mjs b/scripts/sync-version.mjs new file mode 100644 index 0000000..21d8fe8 --- /dev/null +++ b/scripts/sync-version.mjs @@ -0,0 +1,25 @@ +import fs from 'node:fs' + +const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8')) +const name = pkg.name.replace(/^@[^/]+\//, '') +const version = pkg.version + +const pluginPath = 'src/adapters/claude/plugin/.claude-plugin/plugin.json' +const plugin = JSON.parse(fs.readFileSync(pluginPath, 'utf8')) +if (plugin.version !== version) { + plugin.version = version + fs.writeFileSync(pluginPath, `${JSON.stringify(plugin, null, 2)}\n`) +} + +const identityPath = 'src/mcp/identity.ts' +const nextIdentity = [ + '// Generated from package.json by scripts/sync-version.mjs. Do not edit by hand.', + '/** Name every client sees for this server. Also the key in client configs. */', + `export const SERVER_NAME = ${JSON.stringify(name)}`, + `export const VERSION = ${JSON.stringify(version)}`, + '', +].join('\n') +const prevIdentity = fs.existsSync(identityPath) ? fs.readFileSync(identityPath, 'utf8') : '' +if (nextIdentity !== prevIdentity) { + fs.writeFileSync(identityPath, nextIdentity) +} diff --git a/src/mcp/identity.ts b/src/mcp/identity.ts deleted file mode 100644 index d09944b..0000000 --- a/src/mcp/identity.ts +++ /dev/null @@ -1,7 +0,0 @@ -import fs from 'node:fs' - -/** Name every client sees for this server. Also the key in client configs. */ -export const SERVER_NAME = 'agent-bridge' - -const pkg = JSON.parse(fs.readFileSync(new URL('../../package.json', import.meta.url), 'utf8')) as { version: string } -export const VERSION: string = pkg.version