behavior-wrapped 0.8.3 → 0.8.4

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": "behavior-wrapped",
3
- "version": "0.8.3",
3
+ "version": "0.8.4",
4
4
  "description": "A private, local-first Wrapped report for Claude Code, Cowork, and Codex behavior.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -42,9 +42,10 @@ export function createIdleShutdownController({
42
42
  }
43
43
 
44
44
  export function isVerifiedLauncherCommand(command, port) {
45
- const escapedPort = String(port).replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
46
- return new RegExp(`(?:/(?:agent-)?behavior-wrapped/|(?:^|\\s))server/launcher\\.mjs(?:\\s|$)`, "i").test(command || "")
47
- && new RegExp(`(?:^|\\s)--port=${escapedPort}(?:\\s|$)`).test(command || "");
45
+ const value = String(command || "");
46
+ if (!new RegExp(`(?:/(?:agent-)?behavior-wrapped/|(?:^|\\s))server/launcher\\.mjs(?:\\s|$)`, "i").test(value)) return false;
47
+ const explicitPort = value.match(/(?:^|\s)--port=(\d+)(?:\s|$)/)?.[1];
48
+ return explicitPort ? Number(explicitPort) === Number(port) : Number(port) === 4317;
48
49
  }
49
50
 
50
51
  function processTools(platform) {