Wanwu is an enterprise platform for building AI agents, workflows, retrieval-augmented applications, and managing models in multi-tenant environments. It is designed for developers and enterprise teams delivering AI applications and integrations. The catalogue entries provide skills and agents for using the platform.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/unicomai/wanwu/agent-stream-nesting-logicnpx skills add UnicomAI/wanwu --skill agent-stream-nesting-logicgit clone --depth 1 https://github.com/UnicomAI/wanwuWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/unicomai/wanwu/agent-stream-nesting-logic)<a href="https://agentmods.dev/skills/unicomai/wanwu/agent-stream-nesting-logic"><img src="https://agentmods.dev/badge/skills/unicomai/wanwu/agent-stream-nesting-logic.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00063 | $0.00921 |
| Opus 5 | $0.00032 | $0.00461 |
| Sonnet 5 | $0.00013 | $0.00184 |
| Haiku 4.5 | $0.00006 | $0.00092 |
Grade A, and why
agent-stream-nesting-logic scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
子会话递归嵌套渲染架构协议 (Nesting Architecture Protocol)
本指南针对万悟平台中「主消息 -> 子会话 (Skill/Tool/Knowledge) -> 孙级会话」的递归序列化渲染标准,定义了 AI 助手及后续维护者必须遵守的底层逻辑。
1. 核心模型:三明治序列 (The Sandwich Sequence)
为了支持正文与多个子会话(工具调用、知识库)的任意插空排列,我们不再按类型分块渲染,而是通过 messageSequence 数组实现**“三明治”交错结构**。
type: 'main': 文本片段。直接由StreamProcessor驱动打字机渲染。type: 'sub': 子会话卡片。触发SubConversion.vue组件递归渲染。
核心映射逻辑:
- 顶级子会话:
parentId为空的包,进入主消息的messageSequence。 - 嵌套子会话: 具有
parentId的包,必须由对应的父组件 ID “领养”,存入其自身的messageSequence中。
2. 时序法则:Order 绝对排序
- 局部闭包排序: 在每一个
messageSequence内部,必须以order字段为唯一权重进行升序排列。 - 同 Order 追加协定: 若同一个 ID 下出现多个 Order 相同的数据包,前端视为“内容的物理追加”而非“组件的新增”。
3. 动力学:动静 Chunk 分层
在渲染 main 片段时,必须区分两种状态以防止打字时界面闪烁:
stableChunks: 已完成 Markdown 语法闭环解析并生成的 HTML 块集合。activeResponse: 正在缓冲区排队、尚未完成闭环解析的输入文本(打字动画部分)。
4. 引用溯源:Data Attributes 协议
所有生成的子会话 DOM 必须携带以下身份锚点,以支持「引文角标点击」的事件冒泡定位:
data-sub-id: 该段文字所属的原子消息 ID(若是吸收片段,则为分片 ID)。data-parent-id: 视觉所属的容器组件 ID(父卡片 ID)。
5. 响应式红线 (CRITICAL) - Vue 2 专供
[!IMPORTANT] 绝对禁止使用浅拷贝或快照!
在将子会话(尤其是
agentSkillText正文分段)注册进父组件序列时,必须直接传递原始响应式对象的引用(即parentSub.messageSequence.push(subConversion))。
- 原因: 只有保持引用一致,外部
StreamProcessor对activeResponse的实时增长才能无缝穿透进多层嵌套的子组件 UI 中。若使用{...subConversion}浅拷贝,会导致打字效果丢失或不连续。
6. 生命周期管理
- 状态单向锁: 状态
status: 3/4(结束/失败)一旦更新,不再受后续包干扰回退。 - ID 纠错逻辑: 若后端返回
id === parentId(自引用死循环),必须在sseMethod.js拦截层将其重刷 ID 为content_前缀的分片包。
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago First seen · 45 lines · 63 tokens per session scan A 8cd1dd6d70fd
agent-stream-nesting-logic is a skill published in the GitHub repository UnicomAI/wanwu (2,458 stars, last pushed yesterday), licensed Apache-2.0. It adds 63 tokens to every session and 921 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
dify
Use when building LLM applications with visual workflow — RAG knowledge bases, AI agents, chatbots with drag-and-drop orchestration. Dify: open-source LLM app platform supporting 30+ models (OpenAI, Claude, DeepSeek, Ollama, Qwen, GLM) with Docker deployment.
Web2Skill
Convert one public website URL or an explicit batch of public URLs into a reusable skill zip backed by rendered HTML snapshots and a bounded JSONL retrieval index. Use to discover a documentation directory from one URL, crawl a supplied URL set sequentially, generate a source profile, or package indexed web content as…
Book2Skill
Convert one or more TXT, Markdown, DOCX, or PDF documents into a reusable skill zip backed by normalized Markdown, extracted images, and a grounded JSONL knowledge index. Invoke this skill before inspecting task files, then execute its workflow directly without listing directories.
agent-evaluation
Testing and benchmarking LLM agents including behavioral testing, capability assessment, reliability metrics, and production monitoring—where even top agents achieve less than 50% on real-world benc.
agent-orchestration-multi-agent-optimize
Optimize multi-agent systems with coordinated profiling, workload distribution, and cost-aware orchestration. Use when improving agent performance, throughput, or reliability.
ai-engineer
Build production-ready LLM applications, advanced RAG systems, and intelligent agents. Implements vector search, multimodal AI, agent orchestration, and enterprise AI integrations.