npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@kafca/agentdock

v0.1.41

Published

基于 Local AI Core 的本地桌面 AI 工作台,内置原生 Feishu/Lark 网关与本地 ACP 会话运行时。

Readme

AgentDock

基于 Local AI Core 的本地桌面 AI 工作台,内置原生 Feishu/Lark 网关与本地 ACP 会话运行时。

运行模式

  • 桌面模式 — Electron 作为壳进程启动本地 Local AI Core,并加载桌面 UI
  • Local AI Core 模式 — 通过本地 127.0.0.1:9831 提供 runtime、chat、知识库与 Lark 网关能力

技术栈

React 19 · Electron 35 · Vite · TypeScript · Tailwind CSS · Zustand · i18next · react-markdown

系统架构

AgentDock 由 Electron 桌面壳、React 渲染进程和 Local AI Core 组成。Electron 负责应用生命周期、窗口与本地进程编排;React 渲染进程通过 API 客户端与本地 core 通信,承载桌面、Web、线程、项目、知识库和系统配置界面;Local AI Core 提供 runtime、ACP 会话、channel 网关、定时任务、知识库和插件能力。跨进程契约集中在 shared/packages/contracts/,插件 SDK 与内置插件分别位于 packages/plugin-sdk/services/local-ai-core/src/plugins/

---
config:
  theme: base
  themeVariables:
    primaryColor: "#eef6ff"
    primaryBorderColor: "#2563eb"
    lineColor: "#64748b"
    textColor: "#0f172a"
---
flowchart LR
  Web["Web 入口<br/>apps/shell-web"]

  subgraph Desktop["AgentDock Desktop"]
    direction LR
    Electron["Electron Shell<br/>窗口 / 应用生命周期"]
    Renderer["React Renderer<br/>页面 / 状态 / API Client"]
  end

  subgraph Core["Local AI Core"]
    direction TB
    CoreApi["HTTP API / SSE<br/>127.0.0.1:9831"]
    Kernel["Kernel & Plugin Registry"]
    Runtime["Workspace Router / ACP / Scheduler / Knowledge"]
  end

  subgraph Integrations["外部通道与 Agent"]
    direction TB
    Channels["Lark / 微信 Channel"]
    Agents["Codex / Claude Code / Hermes / Pi / opencode"]
  end

  Contracts["共享契约<br/>shared/ · packages/contracts/"]
  PluginSdk["Plugin SDK<br/>packages/plugin-sdk/"]

  Web --> CoreApi
  Electron --> Renderer --> CoreApi
  Electron -.启动 / 管理.-> CoreApi
  CoreApi --> Kernel --> Runtime
  Kernel --> Channels
  Kernel --> Agents

  Contracts -.-> Renderer
  Contracts -.-> CoreApi
  PluginSdk -.-> Kernel

后台关键模块说明:

New

2026-05-09

  • 发布 AgentDock 0.1.41。
  • Lark channel 的 Markdown 表格回复改用 schema 2.0 卡片渲染,避免 Post md 消息吞掉表格行;超过飞书卡片表格上限时会自动降级为可见列表文本。
  • Lark 文本消息发送新增独立渲染层,统一记录 msgType、渲染原因和表格数量,便于排查不同飞书消息格式的显示差异。
  • 发布 AgentDock 0.1.40。
  • Lark channel 的 Post 消息改用 md 元素承载 Markdown,避免工具参数代码块显示为灰底富文本块。
  • 发布 AgentDock 0.1.39。
  • Lark channel 的普通消息改用富文本 Post 发送,Markdown 与工具参数代码块现在会正常渲染。
  • 发布 AgentDock 0.1.38。
  • Lark channel 的工具调用和最终回答改为发送普通消息,工具参数直接放在 Markdown 代码块中,避免卡片 Markdown 渲染问题。

2026-05-08

  • 发布 AgentDock 0.1.37。
  • 定时任务的 Lark/微信投递现在会回传执行过程、工具进度和最终回答,并记录 delivery 状态便于排查。
  • Lark/微信定时任务开始时会先发送任务标题,方便在 channel 中识别当前正在执行的任务。

2026-05-07

  • 发布 AgentDock 0.1.36。
  • 修复 Lark/微信定时任务在 Local AI Core 启动期提前捕获未初始化 workspace router,导致任务触发后无法发送到会话的问题。
  • 发布 AgentDock 0.1.35。
  • 发布 AgentDock 0.1.33。
  • README 新增系统架构简要介绍与 Mermaid 架构图。
  • 新增后台关键模块架构文档索引,并补充 kernel、router、channel gateway、knowledge runtime 与 ACP 流程图。
  • Local AI Core 日志统一写入 ~/.agentdock/logs,按 sys/info/warn/error/debug 分级文件记录并按文件大小轮动。

2026-05-06

  • 新增 Hermes 原生 ACP runtime,可通过 agent.type = "hermes" 使用 hermes acp 对接本地会话运行时。
  • Hermes runtime 默认以 YOLO 权限模式启动,先绕开 Hermes ACP 审批回调兼容问题,避免危险命令审批被提前拒绝。
  • LAC 定时任务不再固化线程路由,改为按项目和 channel 投递目标动态解析当前线程,避免切换线程后 same-thread 任务失败。
  • 收紧公开仓库前的 CI/CD 安全边界:Release 改为 tag-only,部署目标改由 GitHub Secrets 提供,Actions 依赖固定到 commit SHA。
  • 项目采用 PolyForm Noncommercial License 1.0.0;商业使用需单独授权。

2026-05-04

  • LAC 定时任务创建改由 Local Core 根据当前线程绑定解析 Lark/微信路由,agent 仍可直接使用 lac scheduler add,避免飞书创建的任务误落到 local route。
  • LAC 定时任务运行默认使用 yolo 权限,自动执行工具调用,避免后台任务卡在权限确认上。

2026-05-03

  • Lark 回传拆分为独立卡片:思考过程按阶段汇总发送,工具调用只发送一次,最终回答使用本轮独立卡片,避免覆盖旧消息。
  • 新增内置 Pi Agent runtime,可通过 agent.type = "pi" 使用 bundled Pi coding agent 与 ACP adapter,无需额外安装 Claude Code、Codex 或 opencode。
  • 新增 Lark 机器人扫码新建/绑定入口,基于官方 Device Flow 自动创建应用,扫码确认后自动感知、写回 App ID/App Secret,并立即激活到可发送消息状态。
  • 支持同一个 workspace 绑定多个 Lark/微信 channel 实例,实例级隔离运行时、扫码绑定和消息路由。
  • Lark 扫码创建机器人改用官方 OpenClaw 一键配置入口,默认带上 card.action.trigger 卡片回传交互回调,并自动启用卡片按钮处理。
  • 优化 channel 工具与权限交互:Lark 工具结果默认隐藏详细输出,权限按钮点击完成后移除可重复点击按钮。
  • 新增通用 channel outbound 文件回传能力,支持通过当前或指定 Lark/微信会话发送本地文件。
  • LAC 定时任务 ID 改为短 ID 展示与操作,list/info/edit/del/run 可直接使用列表中的短 ID。
  • 调整 Local AI Core channel 目录结构,将 Lark、微信实现隔离到独立模块,并保留公共文件处理能力。
  • app、web、Lark/微信 channel 支持线程级 /mode 命令,/mode yolo 可长期切换为跳过工具权限申请,直到 /mode default 恢复。

2026-05-02

  • 新增通用 channel 图片消息到 ACP 多模态传递。
  • 新增 Codex Agent ACP 支持,并接入 runtime 检测与交互权限流程。

快速开始

pnpm install
pnpm dev          # 启动开发环境(Vite + Electron)
pnpm start:core   # 启动已构建的 Local AI Core

macOS 打开应用

如果安装后提示应用无法打开,可先清除隔离属性再启动:

xattr -cr /Applications/AgentDock.app

常用命令

| 命令 | 说明 | |---|---| | pnpm dev | 启动开发环境 | | pnpm dev:web | 仅启动 Web 开发服务器 | | pnpm dev:core | 构建并启动 Local AI Core | | pnpm build | 完整生产构建 | | pnpm build:renderer | 仅构建 React 前端 | | pnpm build:electron | 仅构建 Electron 主进程 | | pnpm build:core | 构建 Local AI Core 产物 | | pnpm start:core | 运行已构建的 Local AI Core | | pnpm start:prod | 运行已构建的 Electron 应用 | | pnpm e2e:smoke | E2E 冒烟测试 |

环境变量

| 变量 | 说明 | |---|---| | AI_WORKSTATION_USER_DATA_DIR | 用户数据目录 | | AI_WORKSTATION_SMOKE_OUTPUT | 冒烟测试输出路径 | | AI_WORKSTATION_SMOKE_SCENARIO | 冒烟测试场景 | | AI_WORKSTATION_FORCE_RUNTIME_STATUS_ERROR | 强制触发运行时状态错误,用于测试 | | AI_WORKSTATION_DEV_SERVER_URL | Electron 开发模式连接的前端地址 | | AGENTDOCK_LOG_DIR | 日志目录,默认 ~/.agentdock/logs | | AGENTDOCK_LOG_MAX_BYTES | 单个日志文件轮动大小,默认 10MB | | AGENTDOCK_LOG_MAX_FILES | 单个日志保留的轮动文件数,默认 5 |

项目结构

├── electron/        # Electron 主进程壳
├── apps/            # 未来的桌面/Web 前端壳目录
├── packages/        # contracts、core-sdk、knowledge-api
├── services/        # Local AI Core
├── src/             # React 渲染进程
│   ├── pages/       # 页面组件
│   ├── components/  # UI 组件库
│   ├── api/         # API 客户端
│   ├── store/       # Zustand 状态管理
│   └── types/       # 类型定义
├── shared/          # 跨进程共享类型
└── scripts/         # 构建/启动脚本

License

AgentDock is source-available under the PolyForm Noncommercial License 1.0.0. Commercial use requires a separate commercial license.