@tomflow/chatloop-extension 0.3.76 → 0.3.77

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.
@@ -522,6 +522,23 @@
522
522
  const confirms=(value,type)=>{
523
523
  const line=value.replace(/\s+/g," ").trim();
524
524
  if(!line||line.length>500)return false;
525
+ // Native R/P review controls send two explicit, task-scoped fields:
526
+ // "TASK|R2-ISSUE:<uuid>|我确认 R2 v2。..." (and likewise P2).
527
+ // Accept only a matching kind+version from a genuine user message,
528
+ // never arbitrary prose containing an approval quote or TEST_ONLY.
529
+ const native=line.match(/^([A-Z][A-Z0-9._:-]{7,120})[||]\s*([RP][1-9][0-9]*)-ISSUE:([0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12})[||]\s*我确认\s+([RP][1-9][0-9]*)\s+v([1-9][0-9]*)[。.!!]\s*(.{0,320})$/i);
530
+ if(native){
531
+ const declared=native[2].toUpperCase(),approved=native[4].toUpperCase();
532
+ if(declared[0]!==type||declared!==approved
533
+ ||Number(declared.slice(1))!==Number(native[5]))return false;
534
+ const note=native[6];
535
+ if(/TEST_ONLY|NOT_APPROVED|只是测试|仅供测试|仅为引用|复制示例|不作为.{0,15}(?:审批|批准)|此确认无效/i.test(note))return false;
536
+ if(type==="R"&&/(?:撤销|拒绝|不批准|不确认|不同意).{0,12}(?:需求|R[1-9][0-9]*)/i.test(note)
537
+ ||type==="P"&&/(?:撤销|拒绝|不批准|不确认|不同意).{0,12}(?:方案|计划|P[1-9][0-9]*)/i.test(note)
538
+ ||type==="P"&&/(?:不授权|未授权|禁止|不要|不能).{0,15}(?:Start|执行|实施|开始|启动)/i.test(note))
539
+ return false;
540
+ return true;
541
+ }
525
542
  const target=type==="R"
526
543
  ? "(?:这份|当前|本版|上述)?(?:需求(?:R[1-9][0-9]*)?|R[1-9][0-9]*)"
527
544
  : "(?:这份|当前|本版|上述)?(?:方案(?:与|及|和)?计划|实施计划|方案|计划|P[1-9][0-9]*)(?:P[1-9][0-9]*)?";
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "manifest_version": 3,
3
3
  "name": "Chat Loop Extension",
4
- "version": "0.3.76",
4
+ "version": "0.3.77",
5
5
  "description": "Chat Loop browser companion: Eye actions, Turn observer, Continue and Handoff Actions",
6
6
  "permissions": [
7
7
  "activeTab",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tomflow/chatloop-extension",
3
- "version": "0.3.76",
3
+ "version": "0.3.77",
4
4
  "type": "module",
5
5
  "description": "Chat Loop Extension package: nine formal Action pages and its own native CLI bridge",
6
6
  "bin": {