lockage 0.9.0 → 0.9.2

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/dist/index.js CHANGED
@@ -670,9 +670,22 @@ async function main() {
670
670
  // Startup log to stderr only (stdout is reserved for JSON-RPC, so do not write there)
671
671
  process.stderr.write(`[lockage] ready (db=${DB_PATH}, toolsets=${['core', ...toolsets].join(',')})\n`);
672
672
  }
673
- // Start only when run as the entry point (do not start when imported from tests)
673
+ // Start only when run as the entry point (do not start when imported from tests).
674
+ // Compare realpath-resolved paths: when launched via a bin symlink (npx / a Node version
675
+ // manager's bin), process.argv[1] is the symlink while import.meta.url resolves to the real
676
+ // file, so a raw string compare never matches and the server would silently never start.
674
677
  import { fileURLToPath } from 'node:url';
675
- if (process.argv[1] && fileURLToPath(import.meta.url) === process.argv[1]) {
678
+ import { realpathSync } from 'node:fs';
679
+ const resolveReal = (p) => {
680
+ try {
681
+ return realpathSync(p);
682
+ }
683
+ catch {
684
+ return p;
685
+ }
686
+ };
687
+ if (process.argv[1] &&
688
+ resolveReal(fileURLToPath(import.meta.url)) === resolveReal(process.argv[1])) {
676
689
  const fatal = (e) => {
677
690
  process.stderr.write(`[lockage] fatal: ${e?.stack ?? e}\n`);
678
691
  process.exit(1);
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lockage",
3
- "version": "0.9.0",
3
+ "version": "0.9.2",
4
4
  "description": "Lockage — an MCP server for multiple coding LLMs to collaborate around a local git repository (single host)",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -13,7 +13,7 @@
13
13
  "lockage-publish": "dist/launcher/publish-cli.js"
14
14
  },
15
15
  "scripts": {
16
- "build": "tsc && cp src/db/schema.sql dist/db/schema.sql",
16
+ "build": "tsc && cp src/db/schema.sql dist/db/schema.sql && chmod +x dist/index.js dist/launcher/publish-cli.js",
17
17
  "prepublishOnly": "rm -rf dist && npm run build",
18
18
  "dev": "tsx src/index.ts",
19
19
  "pretest": "npm run build",
@@ -42,4 +42,4 @@
42
42
  "esbuild@0.28.2": true,
43
43
  "fsevents@2.3.3": true
44
44
  }
45
- }
45
+ }