mirror of
https://git.openapi.site/https://github.com/desirecore/market.git
synced 2026-09-05 20:03:43 +08:00
6c303ef21fa80fa80dde9b02eacc148cb03e195f
1 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
| 43a8cbd549 |
feat: 新增钉钉工作台助手 Agent 市场登记条目 (#107)
## 摘要 / Summary
**中文**:新增市场第 2 个 Agent 条目
`dingtalk-workspace`(钉钉工作台助手),作为钉钉全产品能力的**发现入口**。条目只提供发现元数据与治理事实,Agent
正文不在本仓库分发。
**English**: Adds the marketplace's second Agent listing,
`dingtalk-workspace` (DingTalk Workspace Assistant), as a **discovery
entry** for DingTalk's product surface. The listing carries discovery
metadata and governance facts only; the Agent's own content is not
distributed from this repository.
## 变更 / Changes
| 文件 / File | 说明 / Note |
| --- | --- |
| `agents/dingtalk-workspace/agent.json` | 市场展示元数据,zh-CN + en-US 双语 /
Market display metadata, zh-CN + en-US |
| `agents/dingtalk-workspace/catalog-metadata.v1.json` | 治理 sidecar /
Governance sidecar |
| `agents/dingtalk-workspace/assets/avatar.webp` | 512×512 中性图形头像 /
Neutral 512×512 avatar |
| `manifest.json` | `totalAgents` 1 → 2;version 1.2.30 →
1.3.0;lastUpdated |
| `README.md` | Agent 计数与目录示意 / Agent count and repository shape |
## 条目形态:可安装 / Shape: installable
**中文**:条目随附完整 Agent 正文(`persona.md`、`principles.md`、2 个 Skill、13
篇文档),安装后即得到完整可用的 Agent。
治理字段取值与理由:
| 字段 | 取值 | 理由 |
| --- | --- | --- |
| `installPolicy` / `updatePolicy` | `market` / `market` |
正文已在条目内,Market 负责安装与更新。这也避开了
`isMarketAgentMetadataOnly()`(`sync/market.ts:113-128`)——它只在
`system`+`repository` 时返回 true,另一条分支是对 `desirecore` 的 id 硬编码特判,本条目不适用 |
| `release` | `known` `1.0.0` `semver` | 非 system Agent 时
`validate_catalog_metadata.py:625-630` 要求 `release` 保留 legacy `version`
|
| `timestamps.releasePublishedAt` | `2026-09-01` | 本次发布日 |
| `governance.availability` | `listing-only` | 见下 |
**为什么 `availability` 不是
`installable`**:`validate_catalog_metadata.py:650-712` 的强证据门禁要求不可变
`provenance.content`(git 40 位 SHA 或 sha256)+ 已知 license + 已知
`reviewedAt` + `compliance`。本条目正文就在本仓库这次提交里,无法自指一个尚不存在的固定
ref;未做治理审查,也不会编造 `reviewedAt` 与许可证据。`listing-only`
在本仓库既有先例(`wecom-cli`、`larksuite-cli` 都是 `listing-only`
且实际可安装),且客户端不读该字段——真正决定可安装性的是 `installPolicy`。
**English**: The listing ships the complete Agent content (`persona.md`,
`principles.md`, 2 Skills, 13 documents), so installing yields a fully
working Agent.
| Field | Value | Rationale |
| --- | --- | --- |
| `installPolicy` / `updatePolicy` | `market` / `market` | Content lives
in the listing, so Market owns install and update. This also avoids
`isMarketAgentMetadataOnly()` (`sync/market.ts:113-128`), which returns
true only for `system`+`repository`; its other branch is an id-hardcoded
special case for `desirecore` that does not apply here |
| `release` | `known` `1.0.0` `semver` | For a non-system Agent,
`validate_catalog_metadata.py:625-630` requires `release` to preserve
the legacy `version` |
| `timestamps.releasePublishedAt` | `2026-09-01` | Publication date |
| `governance.availability` | `listing-only` | See below |
**Why `availability` is not `installable`**: the strict evidence gate at
`validate_catalog_metadata.py:650-712` requires an immutable
`provenance.content` (40-hex Git SHA or sha256) plus a known license, a
known `reviewedAt`, and `compliance`. This listing's content lives in
this very commit, so it cannot pin a ref that does not yet exist; no
governance review was performed, and no `reviewedAt` or license evidence
will be invented. `listing-only` has precedent here (`wecom-cli` and
`larksuite-cli` are both `listing-only` yet installable in practice),
and the client does not read the field — installability is actually
decided by `installPolicy`.
### agent.json 的双重身份 / agent.json serves two contracts
**中文**:安装时整个 `agents/<id>/` 目录被 `cpSync` 到
`~/.desirecore/agents/<id>/`(`market-routes.ts:1228-1252`),因此这个
`agent.json` **同时**是市场展示元数据和 AgentFS 运行时配置。已把源 Agent 的运行时配置并入(`llm` 智能路由
flagship、`heartbeat`、`session_mode`、`env`、`mcp_servers`、并发上限等)。
已知副作用:两套 Schema 在 10 个字段上不相交(市场侧的 `category` / `updatedAt` /
`maintainer` / `i18n` / `persona` / `changelog` / `installPolicy` /
`updatePolicy`,以及 `avatar.t` / `avatar.bg`),AgentFS 侧
`agentConfigSchema` 是 `additionalProperties: false`,`id` 还要求 UUID
形态。因此安装后
`parseAgentJsonText`(`agent/reader.ts:375-397`)会走宽松解析分支,每个进程打印一条
warning。宽松分支原样返回解析结果,配置全部生效——已实测确认(见下)。这是「内联可安装 Market
Agent」这一形态固有的,本仓库此前没有先例。
**English**: On install the whole `agents/<id>/` directory is
`cpSync`-ed into `~/.desirecore/agents/<id>/`
(`market-routes.ts:1228-1252`), so this `agent.json` is
**simultaneously** the marketplace display metadata and the AgentFS
runtime config. The source Agent's runtime configuration has been merged
in (`llm` smart routing at flagship tier, `heartbeat`, `session_mode`,
`env`, `mcp_servers`, concurrency cap).
Known side effect: the two schemas are disjoint on 10 fields
(market-side `category`, `updatedAt`, `maintainer`, `i18n`, `persona`,
`changelog`, `installPolicy`, `updatePolicy`, plus `avatar.t` /
`avatar.bg`), AgentFS's `agentConfigSchema` is `additionalProperties:
false`, and its `id` expects a UUID shape. So after install,
`parseAgentJsonText` (`agent/reader.ts:375-397`) takes the lenient
branch and prints one warning per process. That branch returns the
parsed object as-is, so every setting still applies — verified below.
This is inherent to the "inline installable Market Agent" shape, which
has no prior precedent in this repository.
## 外部依赖披露 / External dependency disclosure
**中文**:本 Agent 依赖一个由第三方独立分发的命令行程序,并需要用户自行完成钉钉账号 OAuth 授权。按仓库
`CLAUDE.md`「External dependency disclosure」要求,已在四处披露:
1. **发现描述** — `agent.json#i18n.<locale>.shortDesc`(zh-CN 与 en-US 各一份)
2. **`compatibility` 字段** — sidecar `compatibility.requirements[]`,4
条:runtime(用户自行安装第三方 CLI)、runtime(官方产品技能需手工拷贝且每次升级重做)、permission(钉钉账号
OAuth,能力范围取决于授权范围)、connection(网络与所在组织已开通的产品/权益)
3. **本地化市场文案** — `agent.json#i18n.<locale>.fullDesc` 与 sidecar
`presentation.i18n.<locale>.description` 中的「外部依赖声明」整节
4. **执行约定** — 同一节明确:依赖不可用(未安装 / 未授权 / 无权限 /
组织未开通)时,在发起外部调用**之前**停止并如实说明,**不编造成功结果**
明确声明 DesireCore
**不打包、不分发、不授权、不安装、不代付、不运营**该程序及其背后的产品;凭据与费用由用户与服务方之间的条款约束。
**English**: This Agent depends on an independently distributed
third-party CLI and requires the user's own account OAuth. Per
`CLAUDE.md` "External dependency disclosure", it is disclosed in all
four required places:
1. **Discovery description** — `agent.json#i18n.<locale>.shortDesc`, in
both zh-CN and en-US
2. **`compatibility` field** — sidecar `compatibility.requirements[]`,
four entries: runtime (user installs the third-party CLI), runtime
(official product skills must be copied manually and re-copied after
each upgrade), permission (account OAuth; coverage depends on granted
scopes), connection (network plus the products and entitlements enabled
for the user's own organization)
3. **Localized marketplace text** — the "External dependency disclosure"
section inside `agent.json#i18n.<locale>.fullDesc` and sidecar
`presentation.i18n.<locale>.description`
4. **Execution instructions** — the same section states that when the
dependency is unavailable (not installed, not authorized, not permitted,
or not enabled), the Agent stops **before** the external call and never
fabricates a successful result
It states explicitly that DesireCore does **not bundle, distribute,
license, install, pay for, or operate** that program or the products
behind it; credentials and fees are governed by terms between the user
and the service provider.
## 品牌与商标 / Branding
**中文**:`branding.relationship: independent-listing` / `nameUsage:
nominative` / `logoStatus: not-used`。头像是自制的中性图形(对话气泡 + 终端提示符
`>_`,表达「自然语言意图 → 命令调用」),**未使用任何第三方 logo 或商标图形**。
**English**: `branding.relationship: independent-listing` / `nameUsage:
nominative` / `logoStatus: not-used`. The avatar is an original neutral
mark (a speech bubble containing a `>_` terminal prompt, expressing
"natural-language intent becomes a command call"). **No third-party logo
or trademark artwork is used.**
## 未审查的事实保持 unknown / Unverified facts left unknown
**中文**:未做治理审查,因此
`governance.license`、`timestamps.reviewedAt`、`timestamps.releasePublishedAt`、`timestamps.upstreamObservedAt`、`release`
一律如实为 `unknown`,不编造许可证据或审查时间。`compatibility.platforms` 同样为
`unknown`——实际只在 macOS 上验证过,不宣称未验证的平台。
**English**: No governance review was performed, so
`governance.license`, `timestamps.reviewedAt`,
`timestamps.releasePublishedAt`, `timestamps.upstreamObservedAt`, and
`release` are all honestly `unknown`; no license evidence or review date
is invented. `compatibility.platforms` is likewise `unknown` — only
macOS was actually exercised, and untested platforms are not claimed.
## 校验 / Validation
**中文**:按 `.github/workflows/i18n-validate.yml` 的顺序在本地跑完 7 步,全部 `exit
0`;`0 error(s)`,116 warning 全部是主干既有条目的历史告警,**新条目零告警**。
**English**: All seven steps from `.github/workflows/i18n-validate.yml`
were run locally in order; every step exited `0`. `0 error(s)`; all 116
warnings are pre-existing on `main` for other listings — **the new
listing produces none**.
```
exit=0 errors=0 新条目命中=0 <-- scripts/i18n/test_validate_i18n.py
exit=0 errors=0 新条目命中=0 <-- scripts/catalog/test_validate_catalog_metadata.py
exit=0 errors=0 新条目命中=0 <-- scripts/catalog/test_collection_generator.py
exit=0 errors=0 新条目命中=0 <-- scripts/catalog/validate_catalog_metadata.py --require-complete
exit=0 errors=0 新条目命中=0 <-- scripts/i18n/validate-i18n.py
exit=0 errors=0 新条目命中=0 <-- scripts/i18n/translate.py --check
exit=0 errors=0 新条目命中=0 <-- scripts/gen-collection-children.py --check
0 error(s), 116 warning(s). agents=2, builtinSkills=34, pointerSkills=28,
publishableSkills=62, collections=7, collectionChildren=147, sidecars=64
```
另外用客户端契约做了运行时验证:按 `readAgentDetail` 的归一化逻辑(i18n 拍平 + changelog 按 locale
解析 + system 策略下 `version` → `metadataRevision`)还原 detail
对象后,`validateMarketAgent` 在 zh-CN 与 en-US 下均 PASS。
Additionally verified against the client contract: after reproducing
`readAgentDetail`'s normalization (i18n flattening, per-locale changelog
resolution, and `version` → `metadataRevision` under the system policy),
`validateMarketAgent` PASSes for both zh-CN and en-US.
### 安装验证 / Install verification
**中文**:用 agent-service 的**真实导出函数**复刻 `market-routes.ts:1185-1260`
的安装流水线(`skillCopyFilter`、`computeCapabilityContentDigest`、`isMarketAgentMetadataOnly`、`extractAgentVersion`、`parseAgentJsonText`),在
vitest unit project 中执行。
**English**: The install pipeline from `market-routes.ts:1185-1260` was
reproduced using agent-service's **real exported functions**
(`skillCopyFilter`, `computeCapabilityContentDigest`,
`isMarketAgentMetadataOnly`, `extractAgentVersion`,
`parseAgentJsonText`) and executed inside the vitest unit project.
```
[1] isMarketAgentMetadataOnly = false => 放行可装
[2] cpSync ok; source=cb8c961bb55b9abe… staged=cb8c961bb55b9abe…
[3] installedVersion = 1.0.0
[5] 应存在 19 项,缺失 0 项
[6] parseAgentJsonText => 可用配置
name=钉钉工作台助手 llm.routingMode=smart tier=flagship
max_concurrent_sessions=3 accepts_messages=true
avatar.image.path=assets/avatar.webp
✓ packages/agent-service/src/__tests__/… (1 test) 75ms
Test Files 1 passed (1)
```
19 项断言覆盖 `agent.json` / `persona.md` / `principles.md` / 2 个 `SKILL.md`
/ `assets/avatar.webp` / 13 篇文档,全部存在;staged 摘要与源摘要一致(内容无漂移)。
All 19 assertions — `agent.json`, `persona.md`, `principles.md`, both
`SKILL.md` files, `assets/avatar.webp`, and all 13 documents — are
present, and the staged digest matches the source digest (no content
drift).
## 公开信息边界 / Public information boundary
**中文**:按 `CLAUDE.md`「Required pre-publication
check」执行完毕。敏感令牌清单通过私有渠道获取并保存在仓库之外,未落盘、未写入否定名单。全工作树扫描(含隐藏文件、排除 `.git`)后,本
PR 新增与修改的文件(含本次新增的 17
个正文文件)**零命中**;已对示例做语义复核,正文示例统一使用「某某」「张三」这类中文通用占位人名,正文只描述公开的软件包名、公开命令与中立能力域,不含任何租户、客户、伙伴或个人身份,也无截图。分支名、commit
标题与正文、以及本 PR 文本同样零命中。检查通过。
**English**: The `CLAUDE.md` "Required pre-publication check" was
completed. The sensitive token list was obtained through a private
channel and kept outside the repository; it was not persisted and not
added to any denylist. After scanning the complete working tree
(including hidden files, excluding `.git`), the files added or modified
by this PR — including the 17 content files added in this round —
produce **zero hits**. Examples were reviewed semantically: the text
describes only public package names, public commands, and neutral
capability domains, with no tenant, customer, partner, or individual
identity, and no screenshots. The branch name, commit subject and body,
and this PR text are likewise clean. Check passed.
## 备注 / Notes
**中文**:与 #104(`skills/dingtalk-cli` 技能条目)互补——那个 PR 登记工具层,本 PR 登记 Agent
层。两者都改了 `manifest.json` 与 `README.md` 的统计行,后合并的一方需要重算计数。本分支基于 `main`,不依赖
#104。
目录 slug 选用 `dingtalk-workspace` 而非本机 AgentFS 实例目录名:AgentFS
实例目录是创建时按中文名自动生成的拼音串,不满足市场 slug 的语义可读性要求;`dingtalk-workspace`
与它所面向的产品域(钉钉工作台)及上游 CLI 包名一一对应,对应关系明确可查。
**English**: Complementary to #104 (the `skills/dingtalk-cli` listing) —
that PR registers the tool layer, this one the Agent layer. Both touch
the stats lines in `manifest.json` and `README.md`, so whichever merges
second must recount. This branch is based on `main` and does not depend
on #104.
The directory slug is `dingtalk-workspace` rather than the local AgentFS
instance directory name: that instance directory is an auto-generated
pinyin transliteration of the Chinese display name and is not
meaningfully readable as a marketplace slug. `dingtalk-workspace` maps
one-to-one onto the product surface it fronts and onto the upstream CLI
package name, so the correspondence stays explicit.
---------
Co-authored-by: yi-ge <jackyoncode@gmail.com>
|