pi-codex-marketplace 0.6.1 → 0.6.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-codex-marketplace",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
4
4
  "description": "Bridge Package for Codex and Claude Marketplace compatibility in Pi — 極簡 /codex-marketplace 純文字指令(add/list/install/update/disable/enable/remove/forget)、單一 Global Bridge State、當下最新安裝與即時投影",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -25,10 +25,10 @@ export function containedPathSyntax(p: string): PathSyntax {
25
25
  if (p.includes('\\')) return { ok: false, reason: 'backslash' };
26
26
  if (isAbsolute(p)) return { ok: false, reason: 'absolute path' };
27
27
  if (!p.startsWith('./')) return { ok: false, reason: 'not ./ relative' };
28
- const segments = p.split('/');
29
- // "./x" -> segments ['', '.', 'x']; a bare "." or ".." component anywhere is rejected
30
- const rest = segments.slice(1);
31
- for (const seg of rest) {
28
+ if (p === './') return { ok: true };
29
+ // The mandatory "./" prefix is not a path component; validate only the declared remainder.
30
+ const segments = p.slice(2).split('/');
31
+ for (const seg of segments) {
32
32
  if (seg === '' || seg === '.' || seg === '..') {
33
33
  return { ok: false, reason: `dot or parent segment '${seg}'` };
34
34
  }