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

@wevu/a2ui

Latest version: v0.0.0-dev.20261129.1

Overview

Last scanned
29 Nov 2026
Published
29 Nov 2026
npm package Publisher: icebreaker
529 Stars
33 Forks
4 Versions
273 Downloads
TypeScript Repo language

Scan summary

@wevu/a2ui was last scanned on 29 Nov 2026 at version 0.0.0-dev.20261129.1. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 4 versions, all published within 4 days (26–29 Nov 2026).
  • Findings: No rules fired in version 0.0.0-dev.20261129.1.
  • Downloads: 273 downloads.

Versions

4 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.0.0-dev.20261129.1 LATEST 29 Nov 2026 No rules fired
0.0.0-dev.20261128.1 28 Nov 2026 No rules fired
0.0.0-dev.20261127.1 27 Nov 2026 No rules fired
0.0.0-alpha.0 26 Nov 2026 Not shown

No rules fired in 0.0.0-dev.20261129.1

Findings

Findings for v0.0.0-dev.20261129.1. 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.0.0-dev.20261129.1; other versions have their own rules, not their own score.

README

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

@wevu/a2ui

A2UI 1.0 的组件无关小程序渲染运行时。复用 @a2ui/web_core@0.16.1 的消息处理、数据绑定与节点解析,把 surface 投影为纯 JSON 节点树,由消费方决定组件外观与交互入口。

当前为实验性 workspace 包,尚未发布到 npm;只承诺 A2UI 1.0 的四种 surface 状态消息与微信小程序目标。不在 AppService 中生成模板、执行模型返回的代码,也不引入 lit。

定位

与 @wevu/json-render 一样,本包只做运行时,不提供 UI 组件:

  • catalog 由消费方以 A2UI 1.0 catalog 文档注入,组件集合不受本包限制;
  • 投影结果是 A2uiNode JSON 树,渲染层用预编译递归组件按 node.type 静态分支,业务组件在同一组件内注册;
  • 数据模型由服务端 surface 权威维护,输入写回绑定,动作以 ActionPayload 外发给调用方。

安装与构建配置

仓库内的消费项目添加 "@wevu/a2ui": "workspace:*" 与 "@a2ui/web_core": "0.16.1",保留 wevu 依赖(渲染宿主使用)。原生 npm 依赖若打进小程序,需按应用的 npm 构建配置处理:

pnpm --filter @wevu/a2ui build
pnpm --filter wevu-a2ui-demo build

src/compat.ts 导出 installA2uiRuntimeCompat(),由 createA2uiCatalog 在进入 Core 前显式调用:Core 0.15 起使用 Object.hasOwn,0.16 起在动作解析路径构造 AbortController,而部分小程序基础库与 AppService 尚未提供这些内建。兼容层复用 @wevu/web-apis/abort 的 polyfill,宿主已有同名内建时保持原实现。这里刻意不用裸副作用导入,因为小程序构建会把无引用的副作用模块裁掉,sideEffects 声明并不能保证保留。

会话 API

import { createA2uiSession } from '@wevu/a2ui'
import catalog from './catalog.json'

const session = createA2uiSession({
  catalog,
  onSurfaces(views) {
    // views: A2uiSurfaceView[],每项为 { id, root: A2uiNode }
    render(views)
  },
  onAction(message) {
    // message: { version: '1.0', action: ActionPayload }
    socket.send(message)
  },
  onError(error) {
    report(error)
  },
  functionImplementations: {
    async format(args) {
      return String(args.value)
    },
  },
})

session.receive(message) // 单个 A2UI 1.0 状态消息
await session.interact(surfaceId, { type: 'input', nodeId, bindingName: 'value', value: 'hello' })
await session.interact(surfaceId, { type: 'action', nodeId, actionName: 'action' })
session.dispose()
API 行为
receive(message) 校验并应用 createSurface、updateComponents、updateDataModel、deleteSurface;RPC、内部操作、批量消息及空 surfaceId 直接拒绝
interact(surfaceId, event) input 写回选定的可写绑定;action 执行选定的 Core 动作并把产生的 ActionPayload 按顺序交给 onAction
onSurfaces(views) 每次可见状态变化后整体推送;updateDataModel 的标量写入与 null 删除只更新绑定值,不替换节点
onAction(message) 可返回 Promise;单个动作产生的消息按序串行等待,不同 interact 的异步回调可能交错;本地函数动作不会外发
onError(error) 可选;接收 Core surface、消息处理与表达式错误,可返回 Promise
dispose() 幂等;停止投影、释放 resolver 与 processor,之后不再回调

functionImplementations 为可选能力扩展。catalog 中声明的函数会保留完整签名并照常参与校验,未提供实现的函数在调用时抛出表达式错误,并通过 onError 上报;构造会话时提供未声明函数的实现会立即失败。只按对象自身属性查找实现,toString 等继承成员不会被误当作实现。

实现只接收已校验的参数字典,不接收 Core DataContext 或 AbortSignal,因此 dispose() 不会强制取消已启动的异步实现。动作 handler 不要 await session.interact(...):动作捕获区通过会话级队列串行,等待同一队列会挂起。functionCall 动作在本地执行且不外发 onAction;本包不接收 callRendererFunction / agentFunctionResponse。

视图投影

A2uiNode 的结构:

interface A2uiNode {
  readonly id: string // `${节点ID}-v${generation}`,仅在当前 generation 内稳定
  readonly componentId: string
  readonly type: string // catalog 组件名
  readonly props: { readonly [key: string]: A2uiPropValue }
  readonly children: readonly A2uiNode[]
  readonly actions: readonly string[] // 值为动作的属性名
}

A2uiPropValue 是 JSON 值、A2uiNode 或包含两者的递归数组/对象。直接作为属性值的组件节点与纯组件节点数组进入 children;嵌套在对象或混合数组中的节点保留在 props 原位置,例如 Basic Catalog 的 Tabs.tabs[].child。这些嵌套节点同样进入操作表,可执行其动作与顶层可写绑定。

  • ResolvedBinding 投影为其当前值;WritableBinding 除投影值外按 catalog 属性名登记为可写输入,一个节点可以保留多个;
  • 可写输入与动作分别通过 bindingName / actionName 选择;省略时仅在候选数量为 1 时回退,多个候选或显式未知名称会抛出 TypeError;
  • 仅直接暴露在节点顶层的可写绑定可选择;深层绑定只投影当前值,深层函数属性也不会被登记为动作;
  • 同一节点的可写绑定与动作可同时存在;动作执行通过会话级队列串行,异步动作完成前不会提前清理消息捕获状态;
  • updateComponents 或非 null 对象型 updateDataModel 会递增 generation 并清空旧操作表,视图层可通过 id 变化重建引用;标量写入与 null 删除只更新绑定值。
interface A2uiSession {
  receive: (message: unknown) => void
  interact: (surfaceId: string, event: A2uiInteraction) => Promise<void>
  dispose: () => void
}

type A2uiInteraction
  = | { type: 'input', nodeId: string, value: A2uiJsonValue, bindingName?: string }
    | { type: 'action', nodeId: string, actionName?: string }

interact 使用投影时的操作表;节点已被替换或 surface 已删除时静默忽略。

渲染宿主

小程序模板不支持 <component :is>,渲染层需要预编译一个递归组件,为目录里的每个类型提供静态分支:

<script setup lang="ts">
import type { A2uiInteraction, A2uiNode } from '@wevu/a2ui'

const props = defineProps<{ node: A2uiNode }>()
const emit = defineEmits<{ (event: 'interaction', payload: A2uiInteraction): void }>()
defineComponentJson({
  usingComponents: { 'a2ui-node': './index', 'a2ui-order': '/components/a2ui-order/index' },
})
</script>

<template>
  <view v-if="props.node.type === 'Column' || props.node.type === 'List'">
    <a2ui-node
      v-for="child in props.node.children"
      :key="child.id"
      :node="child"
      @interaction="emit('interaction', $event)"
    />
  </view>
  <text v-else-if="props.node.type === 'Text'">{{ props.node.props.text }}</text>
  <input
    v-else-if="props.node.type === 'TextField'"
    :value="props.node.props.value"
    @input="emit('interaction', { type: 'input', nodeId: props.node.id, bindingName: 'value', value: $event.detail.value })"
  >
  <button v-else-if="props.node.type === 'Button'" @tap="emit('interaction', { type: 'action', nodeId: props.node.id })">
    {{ props.node.children[0]?.props.text }}
  </button>
  <a2ui-order v-else-if="props.node.type === 'OrderSummary'" :number="props.node.props.number" />
  <text v-else>未支持组件:{{ props.node.type }}</text>
</template>

宿主按 node.type 显式分支,未覆盖的类型渲染兜底节点;业务组件在同一递归组件的 usingComponents 中注册,同样按 node.children 渲染子节点。宿主组件的 v-for 使用 node.id(含 generation 后缀)以保证替换后重建,页面 usingComponents 仍按路径注册。本包不提供任何具体组件实现,apps/wevu-a2ui-demo 给出一份可直接参考的宿主组件。

Chat 消息编排的参考实现采用同样的 envelope 校验、generation 操作表与 WritableBinding.set 回写语义,组件层则直接绑定各自 UI 库的输入、按钮与卡片;本包把组件层完全留给消费方。

协议与边界

  • 消息:仅 version: '1.0' 的 createSurface、updateComponents、updateDataModel、deleteSurface;使用 STRICT_VALIDATION 与 1.0 目标版本。
  • updateComponents 按 id upsert 且必须保持整树可达:协议不删除单个组件,隐藏节点通过绑定值表达,否则 Core 抛出可达性完整性错误。
  • 节点 ID 遵循 Core 的 UAX #31 校验;模板 ChildList({ componentId, path })由 Core 解析,数据更新会导致实例重建。
  • 支持通过宿主实现 catalog 函数;不支持 checks、RPC 与 agent 函数响应,事件动作只外发且不等待 agent 回写。
  • 不包含 Markdown 渲染、图片/勾选等目录扩展;catalog 能声明哪些组件由消费方决定,但视图层必须为每个类型提供宿主分支。
  • updateDataModel 失败时回滚目标 surface 的整份数据快照,避免 Core 部分写入后留下半成品;失败仍会向调用方抛出。快照是 O(N) 深拷贝,数据模型很大时应优先使用更小的增量路径。
  • 运行时只接受 JSON 数据;投影会丢弃未登记的函数与 undefined,将 NaN/Infinity 转为 null,并保留 props 中的嵌套组件节点。
  • 无 lit、无动态求值;兼容层只补齐 Object.hasOwn、AbortController 与 AbortSignal。
  • 需要显式调用 dispose();receive 不接管 transport、重连或排队。

验证与发布边界

包级 22 项单测覆盖投影绑定、多绑定/多动作选择、嵌套槽位、输入回写、动作外发、异步动作隔离、本地 functionCall、函数错误与继承成员边界、模板列表 respawn、路径删除、消息校验、失败回滚与幂等销毁;tsd 锁定公开类型。构建产物为 ESM + d.mts,@a2ui/web_core 作为外部依赖由宿主应用打包。

apps/wevu-a2ui-demo 与 e2e/ide/wevu-a2ui.runtime.test.ts 提供 headless 与真实微信 DevTools 的同场景验收,覆盖基础目录页、递归宿主、输入写回、增量替换后的输入保留、异常消息保留上一版界面和卸载清理。应用的 test/noEval.test.ts 从公共入口打包,在禁用 Function / eval 的 vm 上下文执行。

尚未提供:内置组件包与构建期 resolver(宿主组件目前由 apps/wevu-a2ui-demo 自带)、catalog 子集对齐(Row/Image/ChoicePicker 等)以及 checks/RPC 长尾。本包也未执行 npm 发布。

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 @wevu/a2ui

References

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

Powered by Read the latest findings

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

Critical Apache HTTP Server Flaw Exposes Web Servers to RCE (1)
CVE

CVE-2026-119618: Critical Apache HTTP Server Flaw Exposes Web Servers to Remote Code Execution

Copy of Template Design OX Blog (3)
Research

Ruby2Shell: Ruby Memory Corruption Flaws Expose Applications to Remote Code Execution, But is it an Actual Risk?

Frame 2085668439 (1)
Group 1261154229