px2cc 2.0.1 → 2.0.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": "px2cc",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "CLI tool that implements complete PromptX Action flow in Claude Code - role activation, dependency loading, cognition networks & memory systems",
5
5
  "main": "cli.js",
6
6
  "type": "module",
@@ -164,8 +164,8 @@ class DependencyAnalyzer {
164
164
 
165
165
  const extractFromText = (text) => {
166
166
  if (!text) return [];
167
- // 匹配 @protocol://resource 格式
168
- const matches = text.matchAll(/@([^:]+):\/\/([^\\s\\>\\<]+)/g);
167
+ // 匹配 @!protocol://resource 或 @protocol://resource 格式
168
+ const matches = text.matchAll(/@!?([^:]+):\/\/([^\s\>\<\n]+)/g);
169
169
  return Array.from(matches).map(match => ({
170
170
  protocol: match[1],
171
171
  resource: match[2]
@@ -420,6 +420,8 @@ class LayerAssembler {
420
420
  // 移除PromptX资源引用标签(但保留引用内容的展开结果)
421
421
  .replace(/<reference[^>]*>/g, '')
422
422
  .replace(/<\/reference>/g, '')
423
+ // 移除@!protocol://resource引用行(因为依赖内容会单独展示)
424
+ .replace(/\s*@!?[^:]+:\/\/[^\s\>\<\n]+\s*/g, '')
423
425
  // 清理多余空行
424
426
  .replace(/\n\s*\n\s*\n/g, '\n\n')
425
427
  // 移除开头结尾空白