DEVELOPER DOCS

开发者文档

金鹰 Agent 企业版内部文档:插件开发、市场与工作台上架、网关与模型配置、IM 渠道与浏览器控制扩展、打包与更新、更新日志。所有内容以桌面 fork 仓库(desktop-fork/dsh-desktop)与市场仓库(ge-agent-market)的现状为准。

01快速开始

员工侧唯一入口是桌面端(官网首页下载按钮按系统直下 DMG / EXE,未签名包首次打开需右键确认)。Web / headless 仅开发调试用,由 MIT 内核直启:

# 桌面端安装包(与官网下载按钮同源) macOS :dist/jinying-agent-0.13.2-arm64.dmg (Apple 芯片 · macOS 13+) Windows:dist/jinying-agent-win-x64-setup.exe (64 位 · Windows 10+) # Web / headless:内核为 MIT 的 DeepSeek Harness,仅开发调试 $ npx @deepseek-ai/dsh web # 企业配置(网关 provider、市场索引、模式预设)经桌面 profile / patch 注入; # 办公模式预设文件:agent-platform-poc/presets/company-office.dshpreset # 2026-10-29 起的安装包已内置网关 provider(含历史图片 8MiB 请求预算)、默认模型 # 与公司插件市场(Discover 页签 + 网关镜像索引),装完只需设置 COMPANY_GATEWAY_API_KEY; # 无需再在 UI / profile 里重复配置 provider,若确需覆盖同 id 配置, # 注意保留 maxRequestImageBytes、plugin-market indexes 等字段

02插件开发(Cordis)

金鹰 Agent 基于 Cordis「一切皆插件」架构。一个 bundle 的最小形态是 package.json(含 dsh.bundle 声明与 engines.dsh 版本约束)加 client.js。也可以在应用内用「创造模式」让 Agent 直接写出来并安装。

常用平台缝(client 插件)

// 注册 / 命令:leadingClaim 让菜单点击后 composer 保留 token ctx.commands.register({ definitionId: CommandDefinitionId('my-plugin'), name: 'browser', input: { hint: '[<任务描述>]' }, }); // 注意:host 命令 handler 的返回值只是 UI 结果块,rawInput 不会自动进会话 invocation.agent.followup(createUserMessage(reminder + task)); // 大段工具指引进系统提示词(每轮可见、UI 无气泡) ctx.systemPrompt.context({ name: 'my-guide', order: 800, text }); // 右栏开 tab:openTab 不展开右栏,需自行 reveal ctx.sidebarRight.openTab('browser', { params: { url } }); // 中文菜单 label:注册到插件自己的 namespace,勿占用上游 namespace ctx.locale.register('my-plugin', { zh: { label: '浏览器操作' }, en: { label: 'Browser' } });

03插件市场上架

市场仓库:github.com/Zcx-BaixiaoBai/ge-agent-market;客户端实际读取公司网关镜像 http://aigateway.zcx-baixiaobai.cn/agent-market/plugins/index.json。

  1. 向 plugins/index.json 提 PR(条目含名称、版本、描述、安装源);
  2. 审批合并后生效;客户端索引使用 @<commit> 固定版(@main 有约 12h CDN 缓存);
  3. 若走 CDN 直连,push 后执行 curl https://purge.jsdelivr.net/gh/Zcx-BaixiaoBai/ge-agent-market@main/plugins/index.json 回源。
网络提示:本网络环境 github.com 直连不通时,用 Git Data API(blobs → trees → commits → PATCH refs)推送,脚本见 agent-platform-poc/bin/market-api-push.py。

04工作台上架(catalog v2)

工作台目录为市场仓库的 workbench/index.json(schemaVersion 2)。桌面端 packages/dsh-desktop-workbenches/catalog.mjs 导出 validatePublishedCatalog(),提 PR 前先本地校验。

字段要求
id / urlid 为小写 owner/repository,且 url 必须等于 https://github.com/<owner>/<repo>
category必须先在 categories 中声明
description中英双语
version / license必填
distributionnpm / github-release / github-source 三选一,且 distribution.version === version
screenshots≥1 张,带 sha256(64hex) / width / height / bytes / alt / https url

05网关与模型

06IM 渠道扩展

现有九个渠道:钉钉、飞书、QQ、微信个人、企业微信、MQTT、iMessage、语音、通用 Webhook;其中钉钉 / 飞书 / QQ / 企微 / 微信支持扫码接入。

07浏览器控制

08打包与更新

# 前置:必须先生成 ppt runtime,否则启动报 Cannot find module 'dsh-ppt-composer' $ npm run ppt:build # mac 整包(约 2 分钟;electronDist 用本地运行时绕开下载超时) $ npx electron-vite build $ POC_SKIP_OFFICE_RUNTIME=1 POC_SKIP_DMG_BACKGROUND=1 \ npx electron-builder --mac --arm64 --dir --publish never \ --config electron-builder.poc.cjs -c.electronDist=node_modules/electron/dist

09更新日志

与桌面仓库 CHANGELOG.md 同步;应用内更新弹窗的「更新日志」面板展示同一份内容。