Plugins bundle pages and Discover entry pages show the plugin's long description first, as Markdown with images, in a height-limited region without its own heading. The document is the file locale meta.detail names, otherwise the package README, otherwise (market entries only) the declared repository's README. The new dsh-plugin-detail library selects documents and reads local package directories and npm file CDNs without state. plugin-manager reads installed and offered bundles through readBundleDetail; plugin-market reads market entries through readEntryDetail, single-file APIs, and a size-limited partial clone cache serialized across processes. Raw HTML is omitted, relative links stay text, and relative images load from Host routes with a sandbox CSP.
3.6 KiB
3.6 KiB
description, kind
| description | kind |
|---|---|
| 共享工具家族的包映射:原子文件写入、品牌化 id、双端队列、JSON 值、harness 主目录路径、启动环境、原生命令、输出保留、时间与时区词汇、超时。 | package-group |
util/:共享工具
English | 中文
概述
util/ 组为能力包提供共享的机制原语,避免重复实现。它涵盖原子写入、品牌化 id、双端队列、无损 JSON 值、UUID、Harness home 路径、启动环境、出站代理策略、原生命令、输出保留、时区、时刻与时间段词汇,以及超时处理。这里的每个根入口都是库:它不注册产品服务或事件,业务语义仍由消费它的能力负责。
目录
包
每个包提供一个原语;打开对应包页面了解如何使用。
| 包 | 职责 |
|---|---|
brand/ |
提供名义字符串类型及其无状态构造函数 |
package-manifest/ |
包 manifest(元数据清单)的共享 TypeScript 声明 |
plugin-detail/ |
选择插件详细介绍文档,并从本地包和 npm 文件 CDN 读取它们 |
plugin-market-index/ |
校验插件市场索引格式 1,并生成锁定版本的安装参数 |
crypto/ |
基于跨运行时 crypto.getRandomValues 原语生成 RFC 9562 v4 UUID |
deque/ |
提供摊销常数时间的队列操作和有界空闲存储 |
chunked-list/ |
通过有界追加复制和检查点校验保留不可变列表版本 |
values/ |
校验、创建快照、比较和冻结无损 JSON 兼容值 |
home-paths/ |
解析统一的 Harness 主目录并拼接共享的用户数据路径 |
http-proxy/ |
解析出唯一的出站代理策略,并为 fetch、SDK agent(智能体)与 spawn 的子进程安装它 |
launch-environment/ |
冻结的启动环境,记住每个值来自哪一层 |
atomic-write/ |
原子文件替换与跨进程写锁 |
lazy-require/ |
在首次使用时按调用方位置加载兼容 CommonJS 的 Host 依赖 |
native-command/ |
直接运行宿主原生命令,绝不拼 shell 字符串 |
workspace-path/ |
提供浏览器安全的 Workspace 路径与显示辅助函数 |
code-language/ |
把文件名后缀映射为 Code 预览、diff 审阅与 read 卡片所渲染的语法高亮语言 |
output-retention/ |
限制面向模型的输出并报告精确的省略元数据 |
time/ |
解析严格的时刻、本地日历与调用方所报的 IANA 时区,并持有毫秒精度的时间段 |
timeout/ |
截止时间运算、信号融合与超时和取消分类 |
相关文档
开发备注
维护者的工作上下文——点击展开
无。