@tedbrain/vlink 0.1.43 → 0.1.44

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/README.md CHANGED
@@ -15,6 +15,9 @@ PATH,并启动 `vlink setup tedbrain`。安装完成后可直接运行:
15
15
  vlink --version
16
16
  ```
17
17
 
18
+ Windows 会在 `vlink.exe` 旁同时生成 `vlink.cmd`。安装目录加入用户 PATH 后,
19
+ 可在 PowerShell 或 cmd 中直接运行 `vlink ...`,也可显式使用 `vlink.cmd ...`。
20
+
18
21
  也可以只把 npm 包作为临时 CLI 使用:
19
22
 
20
23
  ```bash
package/binaries.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
- "version": "0.1.43",
2
+ "version": "0.1.44",
3
3
  "binaries": {
4
- "linux-x86_64": "cea6ec73c69fe0e8e0a0103073298bf26082aeda3e35442194646321df5fb52e",
5
- "linux-x86_64-glibc2.17": "3641a7c0fcb8d2e14a15dfb2cbb477bc0f4aa0766cb3dd6432cacf9dcbb01388",
6
- "linux-aarch64": "2f9f607ec7d562424dbb919d5b681fc6c2f37be5a7f98312c567f816f12353af",
7
- "macos-x86_64": "4381e5e0ba28447367a44f62a23f7f51db7594ebde3938c5466ceacc0108af0f",
8
- "macos-aarch64": "9b853aa9cc6b33cc366ad90fdb2a8240154b074ad0a115a69607541a088ad6de",
9
- "windows-x86_64.exe": "8813df57d23b1b4043c955b19113cbbe3451241066cb87f0aceba614b352a207",
10
- "windows-aarch64.exe": "ebf3f3c9cf1b89ff3651375de58ea53fdc06cb04a057b071ea47ff1a8df7be1d"
4
+ "linux-x86_64": "935a98d64be6530c01d3e4c5a9ed24f672f8f3881889dc0970398978cdd8647c",
5
+ "linux-x86_64-glibc2.17": "eac985196bb3c31e2029b43a35e576b3fb02256b1a86fb2cdf40e2fd6cf80ffb",
6
+ "linux-aarch64": "45c11039633f881bdf889bef4da90d5f6275c9beaeb6066d0734e7eb0736845b",
7
+ "macos-x86_64": "ed1143ffa8bdce153f02a7a987d24033e31e604e0ef2653cf454fa470077c3cf",
8
+ "macos-aarch64": "d9c590290b1c383c60685feb7c9e88f6f6f52ba2c49bed5d0cf1f3e79b773cd8",
9
+ "windows-x86_64.exe": "b38582348385131acba91abec301f7249b65ef3eb880179185a976c2f9038ebc",
10
+ "windows-aarch64.exe": "815ef8fad0c2ab9ae83ca080e2f28109bb956ec4829bd3cae765d9097339f7e0"
11
11
  }
12
12
  }
package/installer.js CHANGED
@@ -318,6 +318,45 @@ function installBinary(sourcePath, targetPath, options = {}) {
318
318
  return targetPath;
319
319
  }
320
320
 
321
+ function windowsCommandShimPath(vlinkPath) {
322
+ return path.join(path.dirname(vlinkPath), 'vlink.cmd');
323
+ }
324
+
325
+ function windowsCommandShimContents() {
326
+ return [
327
+ '@echo off',
328
+ '"%~dp0vlink.exe" %*',
329
+ 'exit /b %ERRORLEVEL%',
330
+ ''
331
+ ].join('\r\n');
332
+ }
333
+
334
+ function installWindowsCommandShim(vlinkPath, options = {}) {
335
+ const platform = options.platform || process.platform;
336
+ if (platform !== 'win32') return null;
337
+
338
+ const fsImpl = options.fs || fs;
339
+ const output = options.output || process.stderr;
340
+ const commandPath = windowsCommandShimPath(vlinkPath);
341
+ const temporary = `${commandPath}.install-${process.pid}-${Date.now()}`;
342
+
343
+ try {
344
+ fsImpl.writeFileSync(temporary, windowsCommandShimContents(), 'utf8');
345
+ if (fsImpl.existsSync(commandPath)) {
346
+ fsImpl.rmSync(commandPath, { force: true });
347
+ }
348
+ fsImpl.renameSync(temporary, commandPath);
349
+ } catch (error) {
350
+ fsImpl.rmSync(temporary, { force: true });
351
+ throw new VlinkSetupError(
352
+ `failed to install Windows command shim at ${commandPath}: ${error.message}`
353
+ );
354
+ }
355
+
356
+ log(`installed Windows command shim at ${commandPath}`, output);
357
+ return commandPath;
358
+ }
359
+
321
360
  function binaryIsStaticElf(binaryPath, options = {}) {
322
361
  if ((options.platform || process.platform) !== 'linux') return false;
323
362
  const spawnSyncImpl = options.spawnSync || spawnSync;
@@ -416,6 +455,7 @@ async function runInstaller(options = {}) {
416
455
  ...sharedOptions,
417
456
  ensureBinary
418
457
  });
458
+ const commandShimPath = installWindowsCommandShim(vlinkPath, sharedOptions);
419
459
 
420
460
  if (skipSetup) {
421
461
  log('skipping TedBrain Agent setup', output);
@@ -428,7 +468,7 @@ async function runInstaller(options = {}) {
428
468
  if (failure) throw new VlinkSetupError(failure);
429
469
  }
430
470
 
431
- return { installDir, vlinkPath, setupSkipped: skipSetup };
471
+ return { installDir, vlinkPath, commandShimPath, setupSkipped: skipSetup };
432
472
  }
433
473
 
434
474
  function printInstallHelp(output = process.stdout) {
@@ -471,6 +511,8 @@ module.exports = {
471
511
  ensureUserPath,
472
512
  runVlinkUpdate,
473
513
  installBinary,
514
+ windowsCommandShimPath,
515
+ installWindowsCommandShim,
474
516
  binaryIsStaticElf,
475
517
  runInstaller,
476
518
  runInstallerFromArgs,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tedbrain/vlink",
3
- "version": "0.1.43",
3
+ "version": "0.1.44",
4
4
  "description": "vlink Virtuoso bridge CLI installer. Installs the matching platform binary at npm install time, like Claude Code / Codex.",
5
5
  "license": "UNLICENSED",
6
6
  "bin": {