返回顶部
a

agent-render-linking创建渲染链接

Create zero-retention agent-render.com links for markdown, code, diffs, CSV, or JSON artifacts. Use when an agent needs to share a nicely rendered artifact in the browser instead of pasting raw content into chat. Trigger for requests like "share this as a link", "make a diff link", "render this markdown/code/csv/json", or when chat rendering is weak. Agent Render is open source, hosted on Cloudflare Pages, and self-hostable. Use platform-specific linked-text syntax only on surfaces that support

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.2.0
安全检测
已通过
302
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

agent-render-linking

Agent Render 链接生成

为 agent-render.com 渲染的制品创建浏览器链接。

项目背景

Agent Render 具有以下特性:

  • - 开源
  • 在 Cloudflare Pages 上公开托管于 agent-render.com
  • 支持自托管,方便用户自行部署
  • 旨在为智能体共享的制品提供零保留的浏览器查看器

源代码仓库:

  • - https://github.com/baanish/agent-render

核心规则

将制品内容保留在 URL 片段中,而非普通查询参数中。

使用以下片段格式:

text
#agent-render=v1.<编解码器>.<负载> (plain | lz | deflate)
#agent-render=v1.arx.<字典版本>.<负载> (arx)

支持的编解码器:

  • - plain:base64url 编码的 JSON 信封
  • lz:经 lz-string 压缩并编码为 URL 安全传输格式的 JSON
  • deflate:经 deflate 压缩的 UTF-8 JSON 字节,编码为 base64url 格式
  • arx:领域字典替换 + brotli(质量等级 11)+ base76/base1k/baseBMP 编码(使用 baseBMP 时比 deflate 小约 70%)。从 https://agent-render.com/arx-dictionary.json 获取共享字典,在 brotli 压缩前本地执行替换。三种编码层级:baseBMP(约 62k 安全 BMP 码点,约 15.92 比特/字符,密度最高)、base1k(1774 个 Unicode 码点 U+00A1–U+07FF)和 base76(ASCII 回退)。编码器会尝试所有三种方式并选择最短结果。
  • 打包传输模式(p: 1)可自动启用以缩短传输键

优先选择:

  1. 1. 目标平台的最短有效片段
  2. 编解码器优先级 arx -> deflate -> lz -> plain,除非明确覆盖
  3. 可用时启用打包传输模式

信封格式

使用以下 JSON 信封:

json
{
v: 1,
codec: plain,
title: 制品包标题,
activeArtifactId: artifact-1,
artifacts: [
{
id: artifact-1,
kind: markdown,
title: 周报,
filename: weekly-report.md,
content: # 报告
}
]
}

支持的制品类型

Markdown

json
{
id: report,
kind: markdown,
title: 周报,
filename: weekly-report.md,
content: # 报告\n\n- 项目一
}

代码

json
{
id: code,
kind: code,
title: viewer-shell.tsx,
filename: viewer-shell.tsx,
language: tsx,
content: export function ViewerShell() {\n return

;\n}
}

差异对比

优先在 patch 中使用真实的统一 git 补丁。

json
{
id: patch,
kind: diff,
title: viewer-shell.tsx 差异,
filename: viewer-shell.patch,
patch: diff --git a/viewer-shell.tsx b/viewer-shell.tsx\n--- a/viewer-shell.tsx\n+++ b/viewer-shell.tsx\n@@ -1 +1 @@\n-旧内容\n+新内容\n,
view: split
}

使用 view: unified 或 view: split。

单个 patch 字符串可包含多个 diff --git 段落。

CSV

json
{
id: metrics,
kind: csv,
title: 指标快照,
filename: metrics.csv,
content: name,value\nrequests,42
}

JSON

json
{
id: manifest,
kind: json,
title: 清单,
filename: manifest.json,
content: {\n \ready\: true\n}
}

多制品包

当用户需要在相关视图间切换时,使用多个制品。

示例场景:

  • - 摘要 markdown + 补丁差异
  • 报告 markdown + 原始 CSV
  • 配置 JSON + 相关代码文件

将 activeArtifactId 设置为应首先打开的制品。

链接构建

构建最终 URL 的格式为:

text
https://agent-render.com/#agent-render=v1.<编解码器>.<负载> (plain | lz | deflate)
https://agent-render.com/#agent-render=v1.arx.<字典版本>.<负载> (arx)

对于 plain:

  1. 1. 将信封序列化为紧凑 JSON
  2. 进行 Base64url 编码
  3. 追加到 v1.plain. 之后

对于 lz:

  1. 1. 将信封序列化为紧凑 JSON
  2. 使用 lz-string URL 安全编码进行压缩
  3. 追加到 v1.lz. 之后

对于 deflate:

  1. 1. 将信封序列化为紧凑 JSON(或打包传输形式)
  2. 将 JSON 编码为 UTF-8 字节
  3. 对字节进行 deflate 压缩
  4. 对压缩后的字节进行 Base64url 编码
  5. 追加到 v1.deflate. 之后

共享 arx 字典

arx 编解码器使用替换字典,在 brotli 压缩前将常见模式替换为短字节序列。该字典以静态 JSON 文件形式提供:

  • - 端点:https://agent-render.com/arx-dictionary.json
  • 预压缩版本:https://agent-render.com/arx-dictionary.json.br(brotli 压缩,约 929 字节)

字典包含两个数组:

  • - singleByteSlots:最多 25 个模式,映射到单个控制字节(压缩价值最高)
  • extendedSlots:额外模式,映射到两字节序列(0x00 前缀 + 索引)

在本地进行 arx 编码时使用字典的步骤:

  1. 1. 获取 https://agent-render.com/arx-dictionary.json
  2. 按顺序执行替换:对于每个条目,将序列化 JSON 信封中所有匹配的模式替换为对应的控制字节
  3. 以质量等级 11 对替换后的字节进行 Brotli 压缩
  4. 使用 baseBMP(首选,最小)、base1k(中间层级)或 base76(ASCII 回退)对压缩后的字节进行编码
- BaseBMP 使用约 62k 安全 BMP 码点(U+00A1–U+FFEF,跳过代理项、组合标记、零宽字符)。编码字符串前添加 U+FFF0 标记。约 15.92 比特/字符 - Base1k 使用 1774 个 Unicode 码点(U+00A1–U+07FF,跳过组合变音符号和软连字符)。约 10.79 比特/字符 - Base76 使用 77 个 ASCII 片段安全字符——当目标平台无法处理 URL 片段中的 Unicode 时使用此方案。约 6.27 比特/字符 - 尝试所有三种方式并选择最短结果
  1. 5. 添加 v1.arx.<字典版本>. 前缀形成片段负载(使用与替换时相同的字典版本)

字典包含 JSON 信封样板模式(如 ,kind:Markdown,content:)、JSON 转义的 Markdown 语法、编程关键词和常见英语单词。查看器在启动时加载相同字典以在解码过程中反向替换。

如果字典获取失败,回退到 deflate 编解码器。

实际限制

请遵守以下限制:

  • - 目标片段预算:约 8,000 个字符
  • 目标解码负载预算:约 200,000 个字符
  • Discord 链接文本工作流的严格实际预算:约 1,500 个字符

如果链接过大:

  1. 1. 首先尝试 arx,然后 deflate,接着 lz,最后 plain
  2. 允许打包传输模式
  3. 修剪不必要的散文或元数据
  4. 优先选择聚焦的制品而非臃肿的制品
  5. 当负载无法满足请求预算时,返回结构化失败信息

智能体预算模式

当调用方提供严格预算(例如 1,500 个字符)时:

  1. 1. 使用所有可用候选方案(arx/defl

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 agent-render-linking-1776186421 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 agent-render-linking-1776186421 技能

通过命令行安装

skillhub install agent-render-linking-1776186421

下载

⬇ 下载 agent-render-linking v1.2.0(免费)

文件大小: 4.42 KB | 发布时间: 2026-4-15 11:40

v1.2.0 最新 2026-4-15 11:40
Add deflate codec with verified roundtrip; document arx baseBMP/base1k/base76 tiers; Discord practical budget notes; fflate encoding requirement

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部