@tomflow/chatloop-extension 0.3.36 → 0.3.37

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.
@@ -8,14 +8,19 @@
8
8
  const match = MARKER.exec(lines.at(-1)?.trim() || "");
9
9
  if (!match) return "UNKNOWN";
10
10
  const markers = text.match(ALL_MARKERS) || [];
11
- // A portable handoff packet may legitimately quote DONE/CONTINUE rules for
12
- // the next Chat. Only its final HANDOFF token must be unique; all other
13
- // statuses still require a single marker in the entire reply.
11
+ // Status is a protocol line, not any occurrence of its token in prose.
12
+ // A reply may describe a previous Turn as, e.g., "it ended with
13
+ // [CHAT_LOOP_STATUS:CONTINUE]" and still legitimately finish with DONE.
14
+ // Require exactly one standalone status line, at the end. Never accept
15
+ // two standalone statuses (even if they have the same value).
16
+ const standalone = lines.filter(line => MARKER.test(line.trim()));
17
+ // Historical HANDOFF packets may embed prior standalone statuses. Keep
18
+ // its compatibility rule while requiring only one HANDOFF token total.
14
19
  if (match[1] === "HANDOFF") {
15
20
  return markers.filter(v => v === "[CHAT_LOOP_STATUS:HANDOFF]").length === 1
16
21
  ? "HANDOFF" : "UNKNOWN";
17
22
  }
18
- if (markers.length !== 1) return "UNKNOWN";
23
+ if (standalone.length !== 1) return "UNKNOWN";
19
24
  return match[1];
20
25
  }
21
26
  function fingerprint(text) {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "manifest_version": 3,
3
3
  "name": "Chat Loop Extension",
4
- "version": "0.3.36",
4
+ "version": "0.3.37",
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.36",
3
+ "version": "0.3.37",
4
4
  "type": "module",
5
5
  "description": "Chat Loop Extension package: nine formal Action pages and its own native CLI bridge",
6
6
  "bin": {