Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@jackice/pi-ui

Latest version: v0.5.0

Overview

Last scanned
25 Nov 2026
Published
25 Nov 2026
npm package Publisher: jackice
0 Stars
0 Forks
3 Versions
TypeScript Repo language

Scan summary

@jackice/pi-ui was last scanned on 25 Nov 2026 at version 0.5.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 3 versions, all published within 2 days (24 and 25 Nov 2026).
  • Findings: No rules fired in version 0.5.0.

Versions

3 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.5.0 LATEST 25 Nov 2026 No rules fired
0.4.2 24 Nov 2026 No rules fired
0.0.0-stage 24 Nov 2026 Not shown

No rules fired in 0.5.0

Findings

Findings for v0.5.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.5.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

@jackice/pi-ui

Pi 扩展的终端 UI 组件库。提供主题适配、ANSI 安全宽度处理、Panel / StatusLine / CodeFrame / TreeList,以及 EditView、TodoView 和 ApprovalView。

  • 基线:Pi 1.6.0、@earendil-works/pi-tui 1.6.0、Node >=22
  • 发布范围:本包是独立 UI 预览,不包含工具注册、TODO 持久化或审批 Gate。
  • 不注册工具、不持久化业务数据、不读取工作区、不批准命令、不持有 AgentSession

安装

pnpm add @jackice/pi-ui@next

预览版通过 npm 的 next 标签分发,不使用 latest。

@earendil-works/pi-tui 为 peer dependency,由 Pi 宿主提供;库不会打包第二套 Pi runtime。

使用

import { fromPiTheme, Panel } from "@jackice/pi-ui";
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
import { Text } from "@earendil-works/pi-tui";

export default function (pi: ExtensionAPI) {
  pi.registerCommand("pi-ui-demo", {
    description: "Render a pi-ui panel",
    handler: async (_args, ctx) => {
      if (ctx.mode !== "tui") return;

      await ctx.ui.custom<string | undefined>((tui, piTheme, keybindings, done) => {
        const theme = fromPiTheme(piTheme);
        const panel = new Panel(theme, {
          title: "Demo",
          titleRight: "esc to close",
          border: "rounded",
          paddingX: 1,
          children: [new Text("body", 0, 0)],
        });

        return {
          render: (width: number) => panel.render(width),
          handleInput: (data: string) => {
            if (keybindings.matches(data, "tui.select.cancel")) done(undefined);
          },
          invalidate: () => panel.invalidate(),
        };
      });
    },
  });
}

API

导出 说明
UiTheme / Tone 语义 tone:text muted accent success warning error border added removed
fromPiTheme(theme) 映射 Pi Theme.fg / bold;added→success、removed→error;未知 token 降级为原文
plainTheme() 无 ANSI 的确定性主题,供测试与 Gallery
displayWidth 终端显示列宽(CJK/emoji/组合字符/ANSI)
sanitizeLine / sanitizeText 移除 OSC/CSI/DCS 等控制序列与剩余控制字符
truncate / pad / wrap / middleTruncate 宽度安全文本处理;pad 为硬截断
Panel 标题嵌入边框、左右标题、圆角/方角/无边框、X/Y padding、按宽度缓存
StatusLine 图标、标题、路径中间省略、右侧元数据;窄宽优先保留 meta
CodeFrame 双侧行号、+/- marker、上下文/新增/删除着色、Tab 箭头、悬挂缩进、折叠提示
adaptHashlineDetails(details) 将 Hashline details version 1 适配为 EditViewModel;未知版本返回 undefined
EditView Panel + StatusLine + CodeFrame,多文件、partial/error/not_written、折叠与源截断提示
TreeList 通用树节点、递归连接线、折叠、ASCII fallback、行数上限;无业务字段
TodoView 阶段进度、当前任务高亮、完成/放弃标记、后续阶段折叠、活跃任务优先与隐藏计数
ApprovalView 完整命令、cwd、reason、风险、Allow once/Deny、滚动、arm 提示
joinSides / rule / fitLine 布局原语

组件通过 setProps / setTheme 更新,随后调用 invalidate();invalidate() 幂等。render(width) 同步、无 I/O,返回行不超过 width。

安全与宽度保证

  • 所有行按 visibleWidth 计算,不使用 string.length
  • 宽度 0/1/2 安全降级;Panel 在无法容纳边框时退化为无边框
  • 外部不可信文本需先 sanitizeLine / sanitizeText;本库对 Panel 标题与 StatusLine 字段自动清理
  • 组件自身生成的 ANSI 不会被清理
  • 不在 render 中注册事件、启动定时器或访问文件

兼容性与限制

  • 仅声明并验证 Pi 1.6.0;未测试版本不声称兼容
  • Edit 视图消费 Hashline details version 1;npm 上的 @jackice/hashline@0.1.1 尚不提供该契约,本地 0.1.2 候选版已验证。
  • 旧结果或未知 details 版本必须回退到原始文本 renderer;adaptHashlineDetails 返回 undefined 表示不可适配
  • TodoView 仅是无副作用的展示组件;session_todo 工具、store、/session-todo 与 widget 集成位于独立仓库 @jackice/pi-session-todo
  • ApprovalView 是展示组件,会返回用户选项,但不批准命令。独立审批扩展仍需通过安全复审,不属于本次预览。

集成示例见 docs/integration.md。详见 docs/compatibility.md 与 docs/implementation-status.md。

开发

pnpm install
pnpm typecheck
pnpm test
pnpm build
pnpm gallery
pnpm bench
pnpm bench:startup
pnpm bench:heap
pnpm bench:coldstart

Gallery 离线运行,无 LLM、无网络、无文件写入。

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @jackice/pi-ui

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Vulnerability Insights

Compromised Claude Code extensions (versions 2.1.312 & 2.1.313) in Cursor try to install a backdoor

CVE

Java4Shell (CVE-2026-114938): Easy to Crash, Hard to Exploit — Less Than 0.12% of JVMs Estimated at Risk of RCE

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

Frame 2085668439 (1)
Group 1261154229