# @ai-agent-forge/plugin-desktop-windows-input 中文文档

规范地址：https://npmcn.com/package/%40ai-agent-forge/plugin-desktop-windows-input/

版本：0\.88\.28
npm 元数据更新时间：2026-11-02T01:01:47.570Z
中文译文更新时间：2026-11-06T06:18:43.949Z
软件包许可：MIT

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40ai-agent-forge/plugin-desktop-windows-input
原文对照：https://npmcn.com/package/%40ai-agent-forge/plugin-desktop-windows-input/?lang=original
项目主页：https://github.com/agent-forge/agent-forge#readme
源码仓库：https://github.com/agent-forge/agent-forge

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：404 kB，37 个文件
- 模块格式：ES Module
- TypeScript 类型：包内自带
- Node.js 要求：\>=22\.19\.0
- 运行依赖：2 个
- 首次发布：2026-09-28T16:26:07.266Z
- 最新版本发布：2026-11-02T01:01:47.307Z
- 近 30 天下载量：4475（2026-10-05 至 2026-11-03，npm 官方下载统计）
- 已发布版本数：63（近 12 个月 63 个）

## 中文简介

为 Agent Forge (desktop execution, 当运行时间提供回放时, 桌面 replay) 设定的 Windows 桌面输入能力插件

## 安装

```sh
npm install @ai-agent-forge/plugin-desktop-windows-input
```

也可以使用：`pnpm add @ai-agent-forge/plugin-desktop-windows-input`、`yarn add @ai-agent-forge/plugin-desktop-windows-input`、`bun add @ai-agent-forge/plugin-desktop-windows-input`

## README

# @ agent-forge/plugin-桌面窗口输入

关闭的 Windows 桌面输入能力插件 [福吉探员](https://github.com/agent-forge/agent-forge)从主机中提取 `src/plugins/desktop` (D-075 S3) (英语). 登记 `desktop_execute` (一个焦点/点击/类型/关键/对观察到的UIA目标移动动作,总是 之后是新的观察),并且,只有在被注入的运行时间暴露出重放方法时, `desktop_replay`。运出的生产外观 故意暴露没有重播.

当主机运行时, 插件拒绝注册任何工具 `readonly` 模式。 在导入软件包的非窗口平台上不投掷; 工具报告明确 `unsupported` 而不是去探险 或回到不同的驱动器.

## 安装

```sh
# from a local checkout
agent-forge plugin install ./plugins/desktop-windows-input

# from npm
agent-forge plugin install @ai-agent-forge/plugin-desktop-windows-input
```

货包船有两艘货单: `agent-forge.json` (确定性插件解析器显示的系统, `platform.os: ["windows"]`和 `plugin.json` (主机载重清单 `loadCapabilityPluginFromManifest`条目 `./dist/entry.js`) (中文(简体) ).

## 图书馆表面

`import { DesktopWindowsInputAdapter, WindowsUiAutomationDriver } from "@agent-forge/plugin-desktop-windows-input";`

-   `DesktopWindowsInputAdapter` ——生产输入外观(无回放方法).
-   `WindowsUiAutomationDriver(options?)` — PowerShell UIA 驱动程序;支持 `command`编号 :`timeoutMs`编号 :`spawnSync`编号 :`platform` 给经纪人注射和测试.
-   `DesktopWindowsAdapter` ——有回放的全控适配器,为主机接线等同观察包所携带.
-   `createDesktopInputCapabilityFactoryV1(runtime)` - 登记册 `desktop_execute` (和 `desktop_replay` 当运行时间提供它),在一个 `CapabilityAPI`。 。 。 .
-   默认导出 `dist/entry.js` ——外部插件加载所使用的预编厂.

UIA适配码是一个有意的内置复制件,与 `@agent-forge/plugin-desktop-windows-observe` 所以两个包裹都保持自成一体.

## 发展

```sh
npm install --ignore-scripts        # repo root, creates the workspace symlink
npm run build                       # plugins/desktop-windows-input (tsgo)
npm test                            # vitest; the entry fidelity test requires `npm run build` first
```

## 常见问题

### @ai-agent-forge/plugin-desktop-windows-input 是什么？

为 Agent Forge \(desktop execution, 当运行时间提供回放时, 桌面 replay\) 设定的 Windows 桌面输入能力插件

### 如何安装 @ai-agent-forge/plugin-desktop-windows-input？

在项目目录运行 npm install @ai-agent-forge/plugin-desktop-windows-input，或使用 pnpm add / yarn add / bun add。

### @ai-agent-forge/plugin-desktop-windows-input 支持 TypeScript 吗？

支持。包内自带 TypeScript 类型声明（package\.json 声明了 types 入口），安装后即可获得类型提示，无需再安装 @types 包。

### @ai-agent-forge/plugin-desktop-windows-input 支持 ESM 还是 CommonJS？

以 ES Module 形式发布，推荐使用 import 引入。在 CommonJS 项目中，Node\.js 20\.19\+ / 22\.12\+ 可以直接 require\(\) 不含顶层 await 的 ES Module，更早的版本需要改用动态 import\(\)。

### @ai-agent-forge/plugin-desktop-windows-input 需要什么版本的 Node\.js？

package\.json 的 engines 字段要求 Node\.js \>=22\.19\.0。版本不符时 npm 默认只给出警告，开启 engine-strict 后会拒绝安装。

### @ai-agent-forge/plugin-desktop-windows-input 可以商用吗？

@ai-agent-forge/plugin-desktop-windows-input 使用 MIT 许可。宽松许可：允许商业使用、修改和再分发，通常只需在分发时保留原版权与许可声明。以上为概括，不构成法律意见，请以许可原文为准。

### @ai-agent-forge/plugin-desktop-windows-input 的下载量有多少？

根据 npm 官方下载统计，@ai-agent-forge/plugin-desktop-windows-input 在 2026/10/05 – 2026/11/03 这 30 天内被下载 4,475 次，日均约 149 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入，适合横向比较热度，不能直接等同于使用人数。

### @ai-agent-forge/plugin-desktop-windows-input 还在维护吗？

最新版本 0\.88\.28 发布于 2026/11/02（4 天前）；至今共发布 63 个版本，其中过去 12 个月发布了 63 个；首次发布于 2026/09/29。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

