playcanvas-agent-bridge-cli 0.6.1 → 0.7.0
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 +148 -31
- package/README.zh-CN.md +137 -33
- package/dist/cli.js +514 -95
- package/dist/config.js +23 -1
- package/dist/daemon/server.js +336 -28
- package/dist/daemon/target-registry.js +3 -0
- package/dist/plugins/host.js +260 -0
- package/dist/plugins/store.js +567 -0
- package/dist/processing/manager.js +265 -0
- package/dist/processing/tools.js +97 -0
- package/dist/snippets.js +27 -0
- package/dist/updates.js +475 -0
- package/dist/workspace/json-sync.js +821 -0
- package/dist/workspace/manager.js +1973 -326
- package/extension/icons/icon-128.png +0 -0
- package/extension/icons/icon-16.png +0 -0
- package/extension/icons/icon-256.png +0 -0
- package/extension/icons/icon-32.png +0 -0
- package/extension/icons/icon-48.png +0 -0
- package/extension/isolated.js +59 -2
- package/extension/main.js +770 -275
- package/extension/manifest.json +60 -10
- package/extension/popup.html +115 -3
- package/extension/popup.js +398 -14
- package/extension/service-worker.js +221 -4
- package/package.json +18 -18
- package/plugins/index.json +14 -0
- package/plugins/tinyapp-builder/node/builder.js +589 -0
- package/plugins/tinyapp-builder/node/index.js +30 -0
- package/plugins/tinyapp-builder/package.json +13 -0
- package/plugins/tinyapp-builder/page/editor.js +249 -0
- package/plugins/tinyapp-builder/pcbridge-plugin.json +28 -0
- package/skills/claude/pcbridge-plugin-authoring/SKILL.md +220 -0
- package/skills/claude/playcanvas-agent-bridge-cli/SKILL.md +99 -43
- package/skills/codex/pcbridge-plugin-authoring/SKILL.md +220 -0
- package/skills/codex/pcbridge-plugin-authoring/agents/openai.yaml +4 -0
- package/skills/codex/playcanvas-agent-bridge-cli/SKILL.md +89 -62
- package/skills/cursor/pcbridge-plugin-authoring.mdc +221 -0
- package/skills/cursor/playcanvas-agent-bridge-cli.mdc +69 -33
- package/skills/windsurf/pcbridge-plugin-authoring.md +215 -0
- package/skills/windsurf/playcanvas-agent-bridge-cli.md +68 -33
- package/dist/builder/manager.js +0 -564
package/extension/manifest.json
CHANGED
|
@@ -2,15 +2,27 @@
|
|
|
2
2
|
"manifest_version": 3,
|
|
3
3
|
"name": "PlayCanvas Agent Bridge",
|
|
4
4
|
"description": "Connects open PlayCanvas Editor and Launch tabs to the local pcbridge daemon.",
|
|
5
|
-
"version": "0.
|
|
6
|
-
"permissions": [
|
|
5
|
+
"version": "0.7.0",
|
|
6
|
+
"permissions": [
|
|
7
|
+
"activeTab",
|
|
8
|
+
"storage",
|
|
9
|
+
"scripting"
|
|
10
|
+
],
|
|
7
11
|
"host_permissions": [
|
|
8
12
|
"http://playcanvas.com/*",
|
|
9
13
|
"https://playcanvas.com/*",
|
|
10
14
|
"http://127.0.0.1/*",
|
|
11
15
|
"http://localhost/*",
|
|
12
16
|
"ws://127.0.0.1/*",
|
|
13
|
-
"ws://localhost/*"
|
|
17
|
+
"ws://localhost/*",
|
|
18
|
+
"http://launch.playcanvas.com/*",
|
|
19
|
+
"https://launch.playcanvas.com/*",
|
|
20
|
+
"http://pc-editor.sightp.com/*",
|
|
21
|
+
"https://pc-editor.sightp.com/*",
|
|
22
|
+
"http://pc-launch.sightp.com/*",
|
|
23
|
+
"https://pc-launch.sightp.com/*",
|
|
24
|
+
"https://localhost/*",
|
|
25
|
+
"https://127.0.0.1/*"
|
|
14
26
|
],
|
|
15
27
|
"action": {
|
|
16
28
|
"default_popup": "popup.html",
|
|
@@ -19,14 +31,16 @@
|
|
|
19
31
|
"16": "icons/icon-16.png",
|
|
20
32
|
"32": "icons/icon-32.png",
|
|
21
33
|
"48": "icons/icon-48.png",
|
|
22
|
-
"128": "icons/icon-128.png"
|
|
34
|
+
"128": "icons/icon-128.png",
|
|
35
|
+
"256": "icons/icon-256.png"
|
|
23
36
|
}
|
|
24
37
|
},
|
|
25
38
|
"icons": {
|
|
26
39
|
"16": "icons/icon-16.png",
|
|
27
40
|
"32": "icons/icon-32.png",
|
|
28
41
|
"48": "icons/icon-48.png",
|
|
29
|
-
"128": "icons/icon-128.png"
|
|
42
|
+
"128": "icons/icon-128.png",
|
|
43
|
+
"256": "icons/icon-256.png"
|
|
30
44
|
},
|
|
31
45
|
"background": {
|
|
32
46
|
"service_worker": "service-worker.js"
|
|
@@ -37,9 +51,25 @@
|
|
|
37
51
|
"http://playcanvas.com/editor*",
|
|
38
52
|
"https://playcanvas.com/editor*",
|
|
39
53
|
"http://launch.playcanvas.com/*",
|
|
40
|
-
"https://launch.playcanvas.com/*"
|
|
54
|
+
"https://launch.playcanvas.com/*",
|
|
55
|
+
"http://pc-editor.sightp.com/editor*",
|
|
56
|
+
"https://pc-editor.sightp.com/editor*",
|
|
57
|
+
"http://pc-editor.sightp.com/launch/*",
|
|
58
|
+
"https://pc-editor.sightp.com/launch/*",
|
|
59
|
+
"http://pc-launch.sightp.com/*",
|
|
60
|
+
"https://pc-launch.sightp.com/*",
|
|
61
|
+
"http://localhost/editor/*",
|
|
62
|
+
"http://localhost/launch/*",
|
|
63
|
+
"http://127.0.0.1/editor/*",
|
|
64
|
+
"http://127.0.0.1/launch/*",
|
|
65
|
+
"https://localhost/editor/*",
|
|
66
|
+
"https://localhost/launch/*",
|
|
67
|
+
"https://127.0.0.1/editor/*",
|
|
68
|
+
"https://127.0.0.1/launch/*"
|
|
69
|
+
],
|
|
70
|
+
"js": [
|
|
71
|
+
"main.js"
|
|
41
72
|
],
|
|
42
|
-
"js": ["main.js"],
|
|
43
73
|
"world": "MAIN",
|
|
44
74
|
"run_at": "document_start"
|
|
45
75
|
},
|
|
@@ -48,14 +78,34 @@
|
|
|
48
78
|
"http://playcanvas.com/editor*",
|
|
49
79
|
"https://playcanvas.com/editor*",
|
|
50
80
|
"http://launch.playcanvas.com/*",
|
|
51
|
-
"https://launch.playcanvas.com/*"
|
|
81
|
+
"https://launch.playcanvas.com/*",
|
|
82
|
+
"http://pc-editor.sightp.com/editor*",
|
|
83
|
+
"https://pc-editor.sightp.com/editor*",
|
|
84
|
+
"http://pc-editor.sightp.com/launch/*",
|
|
85
|
+
"https://pc-editor.sightp.com/launch/*",
|
|
86
|
+
"http://pc-launch.sightp.com/*",
|
|
87
|
+
"https://pc-launch.sightp.com/*",
|
|
88
|
+
"http://localhost/editor/*",
|
|
89
|
+
"http://localhost/launch/*",
|
|
90
|
+
"http://127.0.0.1/editor/*",
|
|
91
|
+
"http://127.0.0.1/launch/*",
|
|
92
|
+
"https://localhost/editor/*",
|
|
93
|
+
"https://localhost/launch/*",
|
|
94
|
+
"https://127.0.0.1/editor/*",
|
|
95
|
+
"https://127.0.0.1/launch/*"
|
|
96
|
+
],
|
|
97
|
+
"js": [
|
|
98
|
+
"isolated.js"
|
|
52
99
|
],
|
|
53
|
-
"js": ["isolated.js"],
|
|
54
100
|
"world": "ISOLATED",
|
|
55
101
|
"run_at": "document_start"
|
|
56
102
|
}
|
|
57
103
|
],
|
|
58
104
|
"content_security_policy": {
|
|
59
105
|
"extension_pages": "script-src 'self'; object-src 'self'; connect-src http://127.0.0.1:* ws://127.0.0.1:* http://localhost:* ws://localhost:*"
|
|
60
|
-
}
|
|
106
|
+
},
|
|
107
|
+
"optional_host_permissions": [
|
|
108
|
+
"http://*/*",
|
|
109
|
+
"https://*/*"
|
|
110
|
+
]
|
|
61
111
|
}
|
package/extension/popup.html
CHANGED
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
border-radius: 8px;
|
|
46
46
|
display: block;
|
|
47
47
|
height: 28px;
|
|
48
|
-
object-fit:
|
|
48
|
+
object-fit: contain;
|
|
49
49
|
width: 28px;
|
|
50
50
|
}
|
|
51
51
|
|
|
@@ -123,6 +123,24 @@
|
|
|
123
123
|
.metric strong { display: block; font-size: 14px; }
|
|
124
124
|
.metric span { color: var(--muted); display: block; font-size: 9px; margin-top: 2px; text-transform: uppercase; }
|
|
125
125
|
|
|
126
|
+
.slider-row { padding: 0 12px 10px; }
|
|
127
|
+
.slider-header { align-items: center; display: flex; justify-content: space-between; margin-bottom: 5px; }
|
|
128
|
+
.slider-header label { color: var(--muted); font-size: 11px; }
|
|
129
|
+
.slider-badge {
|
|
130
|
+
background: var(--surface-raised);
|
|
131
|
+
border: 1px solid var(--border);
|
|
132
|
+
border-radius: 6px;
|
|
133
|
+
color: var(--foreground);
|
|
134
|
+
padding: 1px 7px;
|
|
135
|
+
}
|
|
136
|
+
input[type="range"] {
|
|
137
|
+
accent-color: var(--accent);
|
|
138
|
+
cursor: pointer;
|
|
139
|
+
display: block;
|
|
140
|
+
margin: 0;
|
|
141
|
+
width: 100%;
|
|
142
|
+
}
|
|
143
|
+
|
|
126
144
|
.note { color: var(--muted); margin: 0; padding: 0 12px 10px; }
|
|
127
145
|
.note.error { color: var(--red); }
|
|
128
146
|
.actions { display: grid; gap: 7px; grid-template-columns: 1fr 1fr; padding: 0 12px 12px; }
|
|
@@ -143,13 +161,45 @@
|
|
|
143
161
|
button.primary { background: oklch(0.58 0.16 246); border-color: oklch(0.66 0.16 246); }
|
|
144
162
|
button:disabled { cursor: not-allowed; opacity: 0.4; }
|
|
145
163
|
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
|
|
164
|
+
|
|
165
|
+
nav { border-bottom: 1px solid var(--border); display: grid; grid-template-columns: 1fr 1fr; }
|
|
166
|
+
nav button {
|
|
167
|
+
background: none;
|
|
168
|
+
border: 0;
|
|
169
|
+
border-bottom: 2px solid transparent;
|
|
170
|
+
border-radius: 0;
|
|
171
|
+
color: var(--muted);
|
|
172
|
+
font-weight: 650;
|
|
173
|
+
}
|
|
174
|
+
nav button:hover:not(:disabled) { background: var(--surface); border-color: transparent; }
|
|
175
|
+
nav button[aria-selected="true"] { border-bottom-color: var(--accent); color: var(--foreground); }
|
|
176
|
+
|
|
177
|
+
.plugin { border-top: 1px solid var(--border); display: grid; gap: 5px; padding: 10px 12px; }
|
|
178
|
+
.plugin-head { align-items: baseline; display: flex; gap: 8px; }
|
|
179
|
+
.plugin-head strong { font-size: 13px; }
|
|
180
|
+
.plugin-head .status { margin-left: auto; }
|
|
181
|
+
.plugin p { color: var(--muted); margin: 0; overflow-wrap: anywhere; }
|
|
182
|
+
.plugin p.error { color: var(--red); }
|
|
183
|
+
.plugin-actions { display: flex; gap: 7px; margin-top: 3px; }
|
|
184
|
+
.plugin-actions button { flex: 1; min-height: 30px; padding: 4px 9px; }
|
|
185
|
+
.plugin-add { display: flex; gap: 7px; padding: 0 12px 10px; }
|
|
186
|
+
.plugin-add input {
|
|
187
|
+
background: var(--background);
|
|
188
|
+
border: 1px solid var(--border);
|
|
189
|
+
border-radius: 7px;
|
|
190
|
+
color: var(--foreground);
|
|
191
|
+
flex: 1;
|
|
192
|
+
min-width: 0;
|
|
193
|
+
padding: 7px 8px;
|
|
194
|
+
}
|
|
195
|
+
.plugin-add input:focus-visible { border-color: var(--accent); outline: none; }
|
|
146
196
|
[hidden] { display: none !important; }
|
|
147
197
|
</style>
|
|
148
198
|
</head>
|
|
149
199
|
<body>
|
|
150
200
|
<header>
|
|
151
201
|
<div class="brand">
|
|
152
|
-
<img class="brand-mark" src="icons/icon-
|
|
202
|
+
<img class="brand-mark" src="icons/icon-128.png" srcset="icons/icon-128.png 1x, icons/icon-256.png 2x" alt="" aria-hidden="true">
|
|
153
203
|
<div>
|
|
154
204
|
<h1>PlayCanvas Agent Bridge</h1>
|
|
155
205
|
<div class="version" id="version">Loading</div>
|
|
@@ -158,7 +208,24 @@
|
|
|
158
208
|
<span class="status" id="overall-status" data-state="neutral">Loading</span>
|
|
159
209
|
</header>
|
|
160
210
|
|
|
161
|
-
<
|
|
211
|
+
<nav role="tablist">
|
|
212
|
+
<button id="tab-bridge" type="button" role="tab" aria-selected="true" aria-controls="view-bridge">Bridge</button>
|
|
213
|
+
<button id="tab-plugins" type="button" role="tab" aria-selected="false" aria-controls="view-plugins">Plugins</button>
|
|
214
|
+
</nav>
|
|
215
|
+
|
|
216
|
+
<main id="view-bridge" role="tabpanel" aria-labelledby="tab-bridge">
|
|
217
|
+
<section id="update-banner" aria-labelledby="update-title" hidden>
|
|
218
|
+
<div class="section-heading">
|
|
219
|
+
<h2 id="update-title">Update Available</h2>
|
|
220
|
+
<span class="status" id="update-status" data-state="warning">Update</span>
|
|
221
|
+
</div>
|
|
222
|
+
<p class="note" id="update-note"></p>
|
|
223
|
+
<div class="actions">
|
|
224
|
+
<button id="update-apply" class="primary" type="button">Update & Reload</button>
|
|
225
|
+
<button id="update-reload-ext" type="button">Reload Extension</button>
|
|
226
|
+
</div>
|
|
227
|
+
</section>
|
|
228
|
+
|
|
162
229
|
<section aria-labelledby="connection-title">
|
|
163
230
|
<div class="section-heading">
|
|
164
231
|
<h2 id="connection-title">Connection</h2>
|
|
@@ -187,6 +254,13 @@
|
|
|
187
254
|
<div class="metric"><strong id="metric-lazy">—</strong><span>Lazy</span></div>
|
|
188
255
|
<div class="metric"><strong id="metric-conflicts">—</strong><span>Conflicts</span></div>
|
|
189
256
|
</div>
|
|
257
|
+
<div class="slider-row">
|
|
258
|
+
<div class="slider-header">
|
|
259
|
+
<label for="eager-limit">Direct sync limit</label>
|
|
260
|
+
<span class="mono slider-badge" id="eager-limit-value">2 MB</span>
|
|
261
|
+
</div>
|
|
262
|
+
<input id="eager-limit" type="range" min="1" max="10" step="1" value="2">
|
|
263
|
+
</div>
|
|
190
264
|
<p class="note" id="workspace-note">Waiting for a ready Editor target.</p>
|
|
191
265
|
</section>
|
|
192
266
|
|
|
@@ -200,11 +274,49 @@
|
|
|
200
274
|
<dt>Mode</dt><dd id="mode">Unavailable</dd>
|
|
201
275
|
<dt>Project preference</dt><dd id="frontend-preference">Unavailable</dd>
|
|
202
276
|
</dl>
|
|
277
|
+
<p class="note" id="frontend-note" hidden></p>
|
|
203
278
|
<div class="actions">
|
|
204
279
|
<button id="use-custom" class="primary" type="button">Use custom</button>
|
|
205
280
|
<button id="use-official" type="button">Use official</button>
|
|
206
281
|
</div>
|
|
207
282
|
</section>
|
|
283
|
+
<section aria-labelledby="site-title">
|
|
284
|
+
<h2 id="site-title">Site access</h2>
|
|
285
|
+
<p class="note" id="site-status">Checking site permission…</p>
|
|
286
|
+
<button id="site-toggle" type="button" disabled>Enable on this site</button>
|
|
287
|
+
</section>
|
|
288
|
+
</main>
|
|
289
|
+
|
|
290
|
+
<main id="view-plugins" role="tabpanel" aria-labelledby="tab-plugins" hidden>
|
|
291
|
+
<section aria-labelledby="plugins-title">
|
|
292
|
+
<div class="section-heading">
|
|
293
|
+
<h2 id="plugins-title">Installed</h2>
|
|
294
|
+
<div style="display:flex;align-items:center;gap:8px;">
|
|
295
|
+
<button id="plugin-update-all" class="primary" type="button" hidden style="min-height:24px;padding:2px 8px;font-size:11px;">Update all</button>
|
|
296
|
+
<span class="status" id="plugin-count" data-state="neutral">Checking</span>
|
|
297
|
+
</div>
|
|
298
|
+
</div>
|
|
299
|
+
<p class="note" id="plugin-empty" hidden>No plugins installed.</p>
|
|
300
|
+
<div id="plugin-list"></div>
|
|
301
|
+
</section>
|
|
302
|
+
|
|
303
|
+
<section aria-labelledby="plugin-available-title" id="plugin-available-section" hidden>
|
|
304
|
+
<div class="section-heading">
|
|
305
|
+
<h2 id="plugin-available-title">Available</h2>
|
|
306
|
+
</div>
|
|
307
|
+
<div id="plugin-available"></div>
|
|
308
|
+
</section>
|
|
309
|
+
|
|
310
|
+
<section aria-labelledby="plugin-add-title">
|
|
311
|
+
<div class="section-heading">
|
|
312
|
+
<h2 id="plugin-add-title">Add plugin</h2>
|
|
313
|
+
</div>
|
|
314
|
+
<div class="plugin-add">
|
|
315
|
+
<input class="mono" id="plugin-source" type="text" spellcheck="false" aria-label="Plugin source" placeholder="github:owner/repo or /path/to/plugin">
|
|
316
|
+
<button id="plugin-add" class="primary" type="button">Add</button>
|
|
317
|
+
</div>
|
|
318
|
+
<p class="note" id="plugin-note">Plugins run with full local and page access. Add only plugins you trust.</p>
|
|
319
|
+
</section>
|
|
208
320
|
</main>
|
|
209
321
|
<script src="popup.js"></script>
|
|
210
322
|
</body>
|