playcanvas-agent-bridge-cli 0.2.0 → 0.2.1

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
@@ -6,14 +6,14 @@ The core interface is the `pcbridge` command plus a local daemon and a Chrome Ma
6
6
 
7
7
  ## Install
8
8
 
9
- When published to npm:
9
+ From npm:
10
10
 
11
11
  ```bash
12
12
  npm install -g playcanvas-agent-bridge-cli
13
13
  pcbridge install-skill --agent all
14
14
  ```
15
15
 
16
- From this GitHub repository before npm publishing:
16
+ From this GitHub repository for unreleased changes:
17
17
 
18
18
  ```bash
19
19
  npm install -g github:Q-My99/playcanvas-agent-bridge-cli
@@ -23,8 +23,8 @@ pcbridge install-skill --agent all
23
23
  One-shot with npx:
24
24
 
25
25
  ```bash
26
- npx github:Q-My99/playcanvas-agent-bridge-cli doctor
27
- npx github:Q-My99/playcanvas-agent-bridge-cli install-skill --agent all
26
+ npx playcanvas-agent-bridge-cli doctor
27
+ npx playcanvas-agent-bridge-cli install-skill --agent all
28
28
  ```
29
29
 
30
30
  ## Install the Chrome extension
package/README.zh-CN.md CHANGED
@@ -6,14 +6,14 @@
6
6
 
7
7
  ## 安装
8
8
 
9
- 发布到 npm 后:
9
+ 从 npm 安装:
10
10
 
11
11
  ```bash
12
12
  npm install -g playcanvas-agent-bridge-cli
13
13
  pcbridge install-skill --agent all
14
14
  ```
15
15
 
16
- 在 npm 发布前,也可以直接从这个 GitHub 仓库安装:
16
+ 如果要测试尚未发布的改动,也可以直接从这个 GitHub 仓库安装:
17
17
 
18
18
  ```bash
19
19
  npm install -g github:Q-My99/playcanvas-agent-bridge-cli
@@ -23,8 +23,8 @@ pcbridge install-skill --agent all
23
23
  用 npx 一次性运行:
24
24
 
25
25
  ```bash
26
- npx github:Q-My99/playcanvas-agent-bridge-cli doctor
27
- npx github:Q-My99/playcanvas-agent-bridge-cli install-skill --agent all
26
+ npx playcanvas-agent-bridge-cli doctor
27
+ npx playcanvas-agent-bridge-cli install-skill --agent all
28
28
  ```
29
29
 
30
30
  ## 安装 Chrome 插件
package/dist/cli.js CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { spawn } from "node:child_process";
3
+ import { realpathSync } from "node:fs";
3
4
  import { readFile, writeFile, mkdir } from "node:fs/promises";
4
5
  import { homedir } from "node:os";
5
6
  import { basename, dirname, extname, join } from "node:path";
@@ -696,7 +697,19 @@ async function main() {
696
697
  process.exitCode = 1;
697
698
  }
698
699
  }
699
- const isMain = process.argv[1] === fileURLToPath(import.meta.url);
700
+ function isCliEntrypoint() {
701
+ const entrypoint = process.argv[1];
702
+ if (!entrypoint)
703
+ return false;
704
+ const modulePath = fileURLToPath(import.meta.url);
705
+ try {
706
+ return realpathSync(entrypoint) === modulePath;
707
+ }
708
+ catch {
709
+ return entrypoint === modulePath;
710
+ }
711
+ }
712
+ const isMain = isCliEntrypoint();
700
713
  if (isMain) {
701
714
  main();
702
715
  }
package/dist/config.js CHANGED
@@ -4,7 +4,7 @@ import { existsSync } from "node:fs";
4
4
  import { homedir } from "node:os";
5
5
  import { dirname, join, resolve } from "node:path";
6
6
  import { fileURLToPath } from "node:url";
7
- export const VERSION = "0.2.0";
7
+ export const VERSION = "0.2.1";
8
8
  export const DEFAULT_HOST = "127.0.0.1";
9
9
  export const DEFAULT_PORT = 17329;
10
10
  export const CONFIG_DIR = join(homedir(), ".pcbridge");
@@ -2,7 +2,7 @@
2
2
  "manifest_version": 3,
3
3
  "name": "PlayCanvas Agent Bridge",
4
4
  "description": "Connects open PlayCanvas Editor tabs to the local pcbridge daemon.",
5
- "version": "0.2.0",
5
+ "version": "0.2.1",
6
6
  "permissions": ["activeTab", "storage"],
7
7
  "host_permissions": [
8
8
  "http://playcanvas.com/*",
package/package.json CHANGED
@@ -1,10 +1,20 @@
1
1
  {
2
2
  "name": "playcanvas-agent-bridge-cli",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "CLI-first local bridge for automating open PlayCanvas Editor tabs from AI coding agents.",
5
5
  "type": "module",
6
+ "license": "MIT",
7
+ "author": "Q-My99",
8
+ "homepage": "https://github.com/Q-My99/playcanvas-agent-bridge-cli#readme",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/Q-My99/playcanvas-agent-bridge-cli.git"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/Q-My99/playcanvas-agent-bridge-cli/issues"
15
+ },
6
16
  "bin": {
7
- "pcbridge": "./dist/cli.js"
17
+ "pcbridge": "dist/cli.js"
8
18
  },
9
19
  "files": [
10
20
  "dist",
@@ -15,7 +25,7 @@
15
25
  "LICENSE"
16
26
  ],
17
27
  "scripts": {
18
- "build": "tsc -p tsconfig.json",
28
+ "build": "tsc -p tsconfig.json && node -e \"require('fs').chmodSync('dist/cli.js', 0o755)\"",
19
29
  "check": "tsc -p tsconfig.json --noEmit",
20
30
  "prepare": "npm run build"
21
31
  },
@@ -26,11 +36,13 @@
26
36
  "automation",
27
37
  "agent"
28
38
  ],
29
- "author": "",
30
- "license": "MIT",
31
39
  "engines": {
32
40
  "node": ">=20"
33
41
  },
42
+ "publishConfig": {
43
+ "access": "public",
44
+ "registry": "https://registry.npmjs.org/"
45
+ },
34
46
  "dependencies": {
35
47
  "ws": "^8.18.3"
36
48
  },
@@ -38,5 +50,6 @@
38
50
  "@types/node": "^24.0.4",
39
51
  "@types/ws": "^8.18.1",
40
52
  "typescript": "5.8.3"
41
- }
53
+ },
54
+ "packageManager": "pnpm@11.1.0"
42
55
  }