{
  "ml": {
    "v": "7",
    "eng": "2.9.1",
    "lvl": -1,
    "conf": 0,
    "mods": [
      {
        "cls": 0,
        "raw": 0.000016729036,
        "rte": "az",
        "prob": 0.000016729036
      },
      {
        "cls": 0,
        "raw": 0.0009842118,
        "rte": "az/npm",
        "prob": 0.0009842118
      }
    ],
    "prob": 0.000016729036,
    "files": [
      {
        "id": 0,
        "lvl": -1,
        "conf": 0,
        "prob": 0.000016729036360629834,
        "type": "npm"
      },
      {
        "id": 2,
        "lvl": -1,
        "conf": 0,
        "prob": 0.000010699033737182617,
        "type": "package.json"
      },
      {
        "id": 6,
        "lvl": -1,
        "conf": 0,
        "prob": 0.0000099639100881177,
        "type": "javascript"
      },
      {
        "id": 10,
        "lvl": -1,
        "conf": 0,
        "prob": 0.000010132789611816406,
        "type": "registry"
      }
    ],
    "version": "v18.18",
    "analyzed_at": "2026-09-13T04:16:46Z"
  },
  "path": "@nguyenquangthai-pi-btw-1.2.0.tgz",
  "raw": {
    "files": [
      {
        "id": 0,
        "mol": "H(Po)",
        "sha": "435b4d42b718e58d95e60f430f4b0a45fbe70a2f6ce3c70cc4a03243c37c995d",
        "path": "@nguyenquangthai-pi-btw-1.2.0.tgz",
        "refs": [
          {
            "to": "pkg:github/quangthai/pi-btw",
            "off": 0,
            "kind": "repository"
          }
        ],
        "risk": 2,
        "size": 159294,
        "type": "npm",
        "facts": {
          "metrics": {
            "file": {
              "size": 159294,
              "entropy": 8
            },
            "parse": {
              "error_count": 1
            },
            "binary": {
              "peak_region_bytes": 159294,
              "peak_region_entropy": 7.85
            },
            "consistency": {
              "name_repo_mismatch": 1
            }
          }
        },
        "ident": {
          "name": {
            "value": "@nguyenquangthai/pi-btw",
            "source": "npm.name",
            "verified": false
          },
          "urls": [
            {
              "url": "git+https://github.com/QuangThai/pi-btw.git",
              "kind": "repository",
              "source": "npm.repository.url"
            },
            {
              "url": "https://github.com/QuangThai/pi-btw#readme",
              "kind": "homepage",
              "source": "npm.homepage"
            }
          ],
          "trust": "unsigned",
          "version": {
            "value": "1.2.0",
            "source": "npm.version",
            "verified": false
          },
          "identifier": {
            "value": "@nguyenquangthai/pi-btw",
            "source": "npm.name",
            "verified": false
          }
        },
        "traits": [
          {
            "id": "supply-chain/missing-author",
            "conf": 0.5,
            "crit": 3,
            "desc": "Package has empty or missing author field"
          },
          {
            "id": "micro-behaviors/process/create/spawn-variable::spawn-variable-program",
            "conf": 0.82,
            "crit": 3,
            "desc": "Node spawns a variable program path",
            "from": [
              {
                "file": 6
              }
            ]
          }
        ]
      },
      {
        "ctx": [
          {
            "b": "DKp(rb5Q?awG\u003ceTb0Z3UB:mLoADLYcxlm/}x!KBteN\u0026*Ca$K6zar\u003e#uA=U@kzx.a:a#7Y9e?!F23lQDnBA}?pb03?\u003czeS%cy?j!w3lQDnwmY*(A+PGmx(v(kiV]RovrlJwaz#aneN\u0026Kmv@2^@xdLfAvrb^)y?mA9B7]e@aAqKnB98bmzGu}jz/M%%x-",
            "ln": 0,
            "col": 1,
            "line": 1
          }
        ],
        "depth": 1,
        "facts": {
          "imp": [
            [
              "*",
              "@earendil-works/pi-agent-core"
            ],
            [
              "*",
              "@earendil-works/pi-tui"
            ],
            [
              "*",
              "@earendil-works/pi-coding-agent"
            ],
            [
              "^5.9.0",
              "typescript"
            ],
            [
              "*",
              "@earendil-works/pi-ai"
            ],
            [
              "^24.0.0",
              "@types/node"
            ],
            [
              "*",
              "@earendil-works/pi-ai"
            ],
            [
              "*",
              "@earendil-works/pi-coding-agent"
            ],
            [
              "*",
              "@earendil-works/pi-agent-core"
            ],
            [
              "*",
              "@earendil-works/pi-tui"
            ]
          ],
          "metrics": {
            "file": {
              "size": 2211,
              "entropy": 4.76
            },
            "binary": {
              "peak_region_bytes": 2048,
              "peak_region_entropy": 4.75
            },
            "consistency": {
              "name_repo_mismatch": 1
            }
          }
        },
        "id": 2,
        "path": "@nguyenquangthai-pi-btw-1.2.0.tgz!!package/package.json",
        "pid": 0,
        "refs": [
          {
            "to": "pkg:github/quangthai/pi-btw",
            "off": 592,
            "kind": "repository"
          }
        ],
        "risk": 1,
        "sha": "84aa0195a682a45d86d63405a0a8ea09a7b1155a7fb1513fc2d3b1ecbb00e4b3",
        "size": 2211,
        "traits": [
          {
            "id": "supply-chain/missing-author",
            "conf": 0.5,
            "crit": 3,
            "desc": "Package has empty or missing author field",
            "spans": [
              [
                0,
                21
              ]
            ]
          }
        ],
        "type": "package.json"
      },
      {
        "ctx": [
          {
            "b": "fdFBUasXH2BAZ8=x(4r5\u0026^^moqCY.6v}YN)wft\u0026iz!0v1B0b7kAV^2ABAX6mdHEpFax9k/Cw.EAp?.p#aAz4mz!%PdwfslknG.OZBAhTHBzbYkB.twgBzbkdv%8*jwO#PjA=(nw",
            "ln": 0,
            "col": 1,
            "line": 1
          },
          {
            "b": "3lQDlaARphB1RJMvrVP=A=k/eB7D$lvru0)c[3I!jW70hzE^r\u003cx(mG)dlv\u003ezarR^HBzbxfe]U\u0026Hv\u003c0]SB8UMizyxjpC5H(0BzkVhe[n*pzddr)efFUAC5H(0BzkVhe[5^kB1wCX3lQDlarR!pCvSliarR^HarU-swO=fzazb4#B7D)farR^HarU-Ewnb%yax{4ex(EScefDcQx(EScefDcQx(ESct}us9arR^Haz2CliV@+(e?O+}A=kD0B8@%BzGWMNp!t1Xr99A]",
            "ln": 8087,
            "col": 72,
            "line": 229
          },
          {
            "b": "x(+[FAa9%dp\u0026ZF\u003ex(^\u0026E3lQDlayPF5x(\u003eFtxLzJuB7Gl1d0)7UD2NsQar\u003eDfByf9hvru68aBL^-qBJ(tsZLc1o*}\u0026Tr4f)oarR^HvrVc]BrCWsx(+[FwO#3bDMWAQAaG",
            "ln": 9633,
            "col": 13,
            "line": 275
          }
        ],
        "depth": 1,
        "facts": {
          "imp": [
            [
              "",
              "getPackageDir"
            ],
            [
              "",
              "join"
            ],
            [
              "",
              "join"
            ],
            [
              "",
              "candidates.find"
            ],
            [
              "",
              "existsSync"
            ],
            [
              "",
              "resolvePiCliPath"
            ],
            [
              "",
              "getPackageDir"
            ],
            [
              "",
              "Array.isArray"
            ],
            [
              "",
              "t.trim"
            ],
            [
              "",
              "parts.push"
            ],
            [
              "",
              "t.trim"
            ],
            [
              "",
              "parts.push"
            ],
            [
              "",
              "String"
            ],
            [
              "",
              "t.trim"
            ],
            [
              "",
              "parts.push"
            ],
            [
              "",
              "parts.join"
            ],
            [
              "",
              "raw.replace.replace.replace.replace.replace.trim"
            ],
            [
              "",
              "raw.replace.replace.replace.replace.replace"
            ],
            [
              "",
              "raw.replace.replace.replace.replace"
            ],
            [
              "",
              "raw.replace.replace.replace"
            ],
            [
              "",
              "raw.replace.replace"
            ],
            [
              "",
              "raw.replace"
            ],
            [
              "",
              "raw.trim"
            ],
            [
              "",
              "text.slice"
            ],
            [
              "",
              "content.trim"
            ],
            [
              "",
              "content.trim"
            ],
            [
              "",
              "Array.isArray"
            ],
            [
              "",
              "p.text.trim"
            ],
            [
              "",
              "textParts.push"
            ],
            [
              "",
              "answerParts.push"
            ],
            [
              "",
              "p.thinking.trim"
            ],
            [
              "",
              "textParts.push"
            ],
            [
              "",
              "String"
            ],
            [
              "",
              "t.trim"
            ],
            [
              "",
              "textParts.push"
            ],
            [
              "",
              "answerParts.join.trim"
            ],
            [
              "",
              "answerParts.join"
            ],
            [
              "",
              "textParts.join.trim"
            ],
            [
              "",
              "textParts.join"
            ],
            [
              "",
              "buildPiRpcInvocation"
            ],
            [
              "",
              "spawn"
            ],
            [
              "",
              "resolveSpawn"
            ],
            [
              "",
              "chunk.toString"
            ],
            [
              "",
              "clearTimeout"
            ],
            [
              "",
              "rejectSpawn"
            ],
            [
              "",
              "rejectSpawn"
            ],
            [
              "",
              "getFinalOutput"
            ],
            [
              "",
              "summarizeProviderError"
            ],
            [
              "",
              "clearTimeout"
            ],
            [
              "",
              "resolve"
            ],
            [
              "",
              "finish"
            ],
            [
              "",
              "setTimeout"
            ],
            [
              "",
              "finish"
            ],
            [
              "",
              "setTimeout.unref"
            ],
            [
              "",
              "setTimeout"
            ],
            [
              "",
              "killTimer.unref"
            ],
            [
              "",
              "finish"
            ],
            [
              "",
              "Promise.resolve"
            ],
            [
              "",
              "Promise.reject"
            ],
            [
              "",
              "setTimeout"
            ],
            [
              "",
              "reject"
            ],
            [
              "",
              "Math.round"
            ],
            [
              "",
              "timeout.unref"
            ],
            [
              "",
              "clearTimeout"
            ],
            [
              "",
              "resolve"
            ],
            [
              "",
              "clearTimeout"
            ],
            [
              "",
              "reject"
            ],
            [
              "",
              "setTimeout"
            ],
            [
              "",
              "reject"
            ],
            [
              "",
              "String"
            ],
            [
              "",
              "resolve"
            ],
            [
              "",
              "JSON.stringify"
            ],
            [
              "",
              "String"
            ],
            [
              "",
              "lines.pop"
            ],
            [
              "",
              "line.endsWith"
            ],
            [
              "",
              "line.slice"
            ],
            [
              "",
              "line.trim"
            ],
            [
              "",
              "JSON.parse"
            ],
            [
              "",
              "String"
            ],
            [
              "",
              "clearTimeout"
            ],
            [
              "",
              "pending.reject"
            ],
            [
              "",
              "String"
            ],
            [
              "",
              "pending.resolve"
            ],
            [
              "",
              "clearTimeout"
            ],
            [
              "",
              "setTimeout"
            ],
            [
              "",
              "clearTimeout"
            ],
            [
              "",
              "waiter.resolve"
            ],
            [
              "",
              "getPartialText"
            ],
            [
              "",
              "clearTimeout"
            ],
            [
              "",
              "p.reject"
            ],
            [
              "",
              "waiter.reject"
            ],
            [
              "",
              "./types.ts"
            ],
            [
              "",
              "@earendil-works/pi-ai"
            ],
            [
              "",
              "@earendil-works/pi-coding-agent"
            ],
            [
              "",
              "node:child_process"
            ],
            [
              "",
              "node:fs"
            ],
            [
              "",
              "node:path"
            ],
            [
              "",
              "node:string_decoder"
            ]
          ],
          "mbr": [
            "Array.isArray",
            "JSON.parse",
            "JSON.stringify",
            "Math.round",
            "Promise.reject",
            "Promise.resolve",
            "answerParts.join",
            "answerParts.join().trim",
            "answerParts.length",
            "answerParts.push",
            "assistantEvent.partial",
            "beforeUsage.cacheRead",
            "beforeUsage.cacheWrite",
            "beforeUsage.cost",
            "beforeUsage.input",
            "beforeUsage.output",
            "candidates.find",
            "chunk.toString",
            "command.type",
            "content.trim",
            "data.id",
            "data.message",
            "data.success",
            "data.type",
            "err.message",
            "event.willRetry",
            "invocation.args",
            "invocation.command",
            "killTimer.unref",
            "line.endsWith",
            "line.slice",
            "line.trim",
            "lines.pop",
            "m.role",
            "message.role",
            "messages.length",
            "p.reasoning",
            "p.reasoningContent",
            "p.reject",
            "p.text",
            "p.text.trim",
            "p.thinking",
            "p.thinking.trim",
            "p.timeout",
            "p.type",
            "partial.role",
            "parts.join",
            "parts.push",
            "pending.reject",
            "pending.resolve",
            "pending.timeout",
            "process.env",
            "process.execPath",
            "process.versions",
            "process.versions.bun",
            "raw.replace",
            "raw.replace().replace",
            "raw.replace().replace().replace",
            "raw.replace().replace().replace().replace",
            "raw.replace().replace().replace().replace().replace",
            "raw.replace().replace().replace().replace().replace().trim",
            "raw.trim",
            "rawMsg.content",
            "setTimeout().unref",
            "t.trim",
            "text.length",
            "text.slice",
            "textParts.join",
            "textParts.join().trim",
            "textParts.length",
            "textParts.push",
            "timeout.unref",
            "u.cacheRead",
            "u.cacheWrite",
            "u.cost",
            "u.cost.total",
            "u.input",
            "u.output",
            "u.totalTokens",
            "waiter.after",
            "waiter.reject",
            "waiter.resolve"
          ],
          "tgt": [
            "Array.isArray",
            "Error",
            "JSON.parse",
            "JSON.stringify",
            "Map",
            "Math.round",
            "Promise",
            "Promise.reject",
            "Promise.resolve",
            "Set",
            "String",
            "StringDecoder",
            "answerParts.join",
            "answerParts.join().trim",
            "answerParts.push",
            "buildPiRpcInvocation",
            "candidates.find",
            "chunk.toString",
            "clearTimeout",
            "content.trim",
            "existsSync",
            "finish",
            "getFinalOutput",
            "getPackageDir",
            "getPartialText",
            "join",
            "killTimer.unref",
            "line.endsWith",
            "line.slice",
            "line.trim",
            "lines.pop",
            "p.reject",
            "p.text.trim",
            "p.thinking.trim",
            "parts.join",
            "parts.push",
            "pending.reject",
            "pending.resolve",
            "raw.replace",
            "raw.replace().replace",
            "raw.replace().replace().replace",
            "raw.replace().replace().replace().replace",
            "raw.replace().replace().replace().replace().replace",
            "raw.replace().replace().replace().replace().replace().trim",
            "raw.trim",
            "reject",
            "rejectSpawn",
            "resolve",
            "resolvePiCliPath",
            "resolveSpawn",
            "setTimeout",
            "setTimeout().unref",
            "spawn",
            "summarizeProviderError",
            "t.trim",
            "text.slice",
            "textParts.join",
            "textParts.join().trim",
            "textParts.push",
            "timeout.unref",
            "waiter.reject",
            "waiter.resolve"
          ],
          "funcs": [
            [
              "resolvePiCliPath",
              1469
            ],
            [
              "anonymous",
              1682
            ],
            [
              "buildPiRpcInvocation",
              1731
            ],
            [
              "getPartialText",
              2832
            ],
            [
              "summarizeProviderError",
              4015
            ],
            [
              "getFinalOutput",
              4478
            ],
            [
              "constructor",
              7347
            ],
            [
              "anonymous",
              7927
            ],
            [
              "anonymous",
              8116
            ],
            [
              "anonymous",
              8353
            ],
            [
              "anonymous",
              8408
            ],
            [
              "anonymous",
              8482
            ],
            [
              "anonymous",
              8615
            ],
            [
              "anonymous",
              8791
            ],
            [
              "anonymous",
              9369
            ],
            [
              "ready",
              9590
            ],
            [
              "ask",
              9849
            ],
            [
              "abort",
              12226
            ],
            [
              "stop",
              12481
            ],
            [
              "anonymous",
              12599
            ],
            [
              "anonymous",
              12662
            ],
            [
              "anonymous",
              12847
            ],
            [
              "anonymous",
              13054
            ],
            [
              "waitForSettlement",
              13457
            ],
            [
              "anonymous",
              13803
            ],
            [
              "anonymous",
              13935
            ],
            [
              "anonymous",
              14246
            ],
            [
              "anonymous",
              14307
            ],
            [
              "send",
              14471
            ],
            [
              "anonymous",
              14817
            ],
            [
              "anonymous",
              14873
            ],
            [
              "anonymous",
              15060
            ],
            [
              "anonymous",
              15215
            ],
            [
              "onStdout",
              15558
            ],
            [
              "flushStdout",
              15858
            ],
            [
              "handleLine",
              16157
            ],
            [
              "handleResponse",
              16717
            ],
            [
              "handleAgentEnd",
              17704
            ],
            [
              "anonymous",
              18100
            ],
            [
              "handleAgentSettled",
              18269
            ],
            [
              "handleMessageUpdate",
              18754
            ],
            [
              "handleMessageEnd",
              19199
            ],
            [
              "makeProcessError",
              20034
            ],
            [
              "fail",
              20212
            ],
            [
              "rejectAll",
              20461
            ],
            [
              "rejectSettlementWaiters",
              20633
            ]
          ],
          "metrics": {
            "ast": {
              "op.eq": 27,
              "op.ge": 1,
              "op.gt": 4,
              "op.le": 1,
              "op.ne": 6,
              "op.add": 10,
              "op.div": 1,
              "op.lor": 21,
              "op.sub": 9,
              "op.land": 9,
              "op.lnot": 14,
              "max_depth": 28,
              "call_count": 176,
              "node_count": 6106,
              "op.coalesce": 12,
              "member_count": 82,
              "max_array_len": 17,
              "op_density.eq": 0,
              "op_density.ge": 0,
              "op_density.gt": 0,
              "op_density.le": 0,
              "op_density.ne": 0,
              "op_density.add": 0,
              "op_density.div": 0,
              "op_density.lor": 0,
              "op_density.sub": 0,
              "op_density.land": 0,
              "op_density.lnot": 0,
              "max_concat_chain": 2,
              "member_depth_max": 7,
              "op_density.coalesce": 0
            },
            "file": {
              "size": 20786,
              "entropy": 4.82
            },
            "text": {
              "lines": 595,
              "top_char": 101,
              "max_ws_run": 6,
              "digit_ratio": 0.01,
              "space_count": 4310,
              "char_entropy": 4.82,
              "unique_chars": 91,
              "top_char_null": 0,
              "string_density": 0.24,
              "top_char_ratio": 0.07,
              "avg_line_length": 33.93,
              "max_line_length": 131,
              "non_ascii_ratio": 0,
              "empty_line_ratio": 0.08,
              "last_line_length": 1,
              "whitespace_ratio": 0.24,
              "identifier_density": 1.53,
              "line_length_stddev": 25.31,
              "encoded_string_ratio": 0.01,
              "normalized_string_count": 5.78,
              "repeated_char_sequences": 22,
              "suspicious_string_ratio": 0.01,
              "suspicious_comment_ratio": 0.09,
              "suspicious_identifier_ratio": 0.05,
              "normalized_unique_identifiers": 21.48
            },
            "binds": {
              "count": 56
            },
            "binary": {
              "peak_region_bytes": 6144,
              "peak_region_entropy": 5.23
            },
            "source": {
              "class_count": 2,
              "function_count": 24
            },
            "imports": {
              "count": 7,
              "relative": 1,
              "stdlib_count": 4,
              "stdlib_ratio": 0.57,
              "relative_ratio": 0.14,
              "third_party_count": 3,
              "third_party_ratio": 0.43
            },
            "strings": {
              "bytes": 1820,
              "count": 141,
              "shell": 2,
              "avg_length": 12.91,
              "max_length": 87,
              "path_count": 1,
              "avg_entropy": 2.53,
              "empty_count": 8,
              "entropy_stddev": 1.14,
              "base64_candidates": 2
            },
            "comments": {
              "chars": 3334,
              "count": 46,
              "lines": 73,
              "base64": 1,
              "high_entropy": 3,
              "to_code_ratio": 0.14,
              "url_in_comments": 1
            },
            "functions": {
              "count": 26,
              "nested": 9,
              "density": 7.73,
              "anonymous": 22,
              "avg_params": 0.93,
              "code_ratio": 1.04,
              "max_params": 4,
              "one_liners": 8,
              "length_stddev": 14.55,
              "avg_name_length": 12.38,
              "no_params_count": 14,
              "avg_length_lines": 13.41,
              "max_length_lines": 70,
              "min_length_lines": 1,
              "avg_nesting_depth": 0.67,
              "max_nesting_depth": 2,
              "high_entropy_names": 1,
              "single_char_params": 1,
              "avg_param_name_length": 6
            },
            "identifiers": {
              "count": 913,
              "unique": 198,
              "avg_length": 8.21,
              "max_length": 30,
              "min_length": 1,
              "avg_entropy": 2.43,
              "reuse_ratio": 0.22,
              "length_stddev": 5.09,
              "sequential_names": 8,
              "single_char_count": 8,
              "single_char_ratio": 0.04,
              "high_entropy_count": 5,
              "high_entropy_ratio": 0.03,
              "all_lowercase_ratio": 0.53,
              "all_uppercase_ratio": 0.05,
              "keyboard_pattern_names": 1
            }
          }
        },
        "id": 6,
        "mol": "H(Po)",
        "path": "@nguyenquangthai-pi-btw-1.2.0.tgz!!package/src/btw-child.ts",
        "pid": 0,
        "refs": [
          {
            "to": "./types.ts",
            "off": 716,
            "file": 9,
            "kind": "local"
          }
        ],
        "risk": 1,
        "sha": "c897b22a3b8e4a6d959a5680b99aa5405b5cbf08a70305f8255ef726f7fe10b8",
        "size": 20786,
        "traits": [
          {
            "id": "micro-behaviors/process/create/spawn-variable::spawn-variable-program",
            "conf": 0.82,
            "crit": 3,
            "desc": "Node spawns a variable program path",
            "spans": [
              [
                8151,
                24
              ]
            ]
          }
        ],
        "type": "javascript"
      },
      {
        "depth": 1,
        "facts": {
          "metrics": {
            "file": {
              "size": 989,
              "entropy": 4.95
            },
            "binary": {
              "peak_region_bytes": 989,
              "peak_region_entropy": 4.95
            },
            "registry": {
              "age_days": 0,
              "file_count": 9,
              "maintainers": 1,
              "published_at": 1789232371,
              "releases_24h": 1,
              "releases_48h": 1,
              "is_deprecated": 0,
              "release_count": 7,
              "security_hold": 0,
              "unpacked_size": 244252,
              "version_removed": 0,
              "downloads_recent": 115,
              "package_age_days": 67,
              "first_published_at": 1783442967,
              "has_install_script": 0,
              "previous_published_at": 1786348445,
              "publisher_in_maintainers": 1,
              "days_since_previous_release": 33
            }
          }
        },
        "id": 10,
        "path": "@nguyenquangthai_pi-btw@1.2.0.registry.json",
        "pid": 0,
        "rel": "registry",
        "role": "sidecar",
        "sha": "4365f3609298fa7bb711548e078ed8fcd34a222a84f783b2d35ed97341335a63",
        "size": 989,
        "type": "registry"
      }
    ],
    "v": "8"
  }
}