@chatpanel/bridge 0.10.30 → 0.10.31
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/package.json +1 -1
- package/src/server.js +1 -1
- package/src/skills.js +17 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chatpanel/bridge",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.31",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Local bridge that exposes the AI coding agents installed on your machine \u2014 Claude Code (CLI), Codex (CLI), and Antigravity CLI (formerly Gemini CLI, which remains available for business/enterprise) \u2014 to the ChatPanel Chrome extension over a localhost SSE endpoint. Bring your own agent.",
|
|
6
6
|
"keywords": [
|
package/src/server.js
CHANGED
|
@@ -66,7 +66,7 @@ import {
|
|
|
66
66
|
// Hardcoded (not read from package.json) so it survives Bun's single-file
|
|
67
67
|
// --compile, where package.json isn't on a readable FS. CI fails the publish if
|
|
68
68
|
// this drifts from package.json, so the two can't silently diverge.
|
|
69
|
-
const VERSION = '0.10.
|
|
69
|
+
const VERSION = '0.10.31';
|
|
70
70
|
const HOST = process.env.CHATPANEL_BRIDGE_HOST || '127.0.0.1';
|
|
71
71
|
const PORT = Number(process.env.CHATPANEL_BRIDGE_PORT) || 4319;
|
|
72
72
|
|
package/src/skills.js
CHANGED
|
@@ -42,7 +42,12 @@ import { isSafeSkillPath, normalizeSkill, SKILL_FILE_KINDS } from './events/skil
|
|
|
42
42
|
const MAX_SKILL_MD = 512 * 1024; // a procedure document, not a corpus
|
|
43
43
|
const MAX_ASSET = 4 * 1024 * 1024; // a reference doc or a template; images live elsewhere
|
|
44
44
|
const MAX_SKILLS = 500; // a scan is bounded work, not "whatever is on disk"
|
|
45
|
-
const MAX_DEPTH =
|
|
45
|
+
const MAX_DEPTH = 3; // <root>/<name>/, <root>/<category>/<name>/, and one
|
|
46
|
+
// namespace above that (Codex: .system/<name>/)
|
|
47
|
+
|
|
48
|
+
// Never a skill and never worth walking: version control and package metadata. Everything
|
|
49
|
+
// else hidden IS walked — see the namespace note in scanSkills.
|
|
50
|
+
const SKIP_DIRS = new Set(['.git', '.svn', '.hg', '.cache', '.DS_Store', 'node_modules']);
|
|
46
51
|
|
|
47
52
|
/**
|
|
48
53
|
* The agent CLIs that keep skills in a well-known directory, and what to call each one.
|
|
@@ -238,13 +243,19 @@ export async function scanSkills({ roots = skillRoots(), platform = process.plat
|
|
|
238
243
|
if (index.size >= MAX_SKILLS || depth > MAX_DEPTH) return;
|
|
239
244
|
for (const entry of await listDir(dir)) {
|
|
240
245
|
if (index.size >= MAX_SKILLS) return;
|
|
241
|
-
if (!entry.isDirectory() || entry.name
|
|
246
|
+
if (!entry.isDirectory() || SKIP_DIRS.has(entry.name)) continue;
|
|
242
247
|
const childRel = rel ? `${rel}/${entry.name}` : entry.name;
|
|
243
248
|
const child = join(dir, entry.name);
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
249
|
+
// A hidden directory is a NAMESPACE, not a skill. Codex ships its built-ins under
|
|
250
|
+
// `~/.codex/skills/.system/<name>/SKILL.md`, so skipping every dot-directory —
|
|
251
|
+
// which was aimed at `.git` — hid six real skills. Walk through it, but never let
|
|
252
|
+
// it become a skill id of its own.
|
|
253
|
+
const loaded = entry.name.startsWith('.')
|
|
254
|
+
? null
|
|
255
|
+
: await loadSkill(child, childRel, source).catch((e) => {
|
|
256
|
+
problems.push({ path: childRel, reason: String(e?.message || e) });
|
|
257
|
+
return null;
|
|
258
|
+
});
|
|
248
259
|
if (loaded) {
|
|
249
260
|
// First root wins: ChatPanel's own directory is authoritative over a shared one.
|
|
250
261
|
if (!index.has(loaded.skill.id) && platformOk(loaded.skill, platform)) {
|