OSOP Report Generator
Convert workflow definition and/or execution log into a self-contained HTML report.
Arguments
$ARGUMENTS
If no arguments provided, look for the most recent files in sessions/ directory.
Steps
- 1. Find the files — read the .osop file (first argument). If a .osoplog.yaml is also provided (second argument), read that too.
- 2. Generate the HTML report using the embedded report generator or by building inline HTML:
- Read both YAML files
- Create a self-contained HTML with inline CSS
- Each node becomes an expandable
<details> element
- Color-code by node type (orange=human, purple=agent, blue=api/cli/mcp, gray=git/docker/cicd, green=db/data)
- Show status badges, duration bars, tool usage, AI metadata, reasoning blocks
- Include dark mode via INLINECODE2
- 3. Save the HTML next to the source file with
-report.html suffix.
- 4. Tell the user the file path so they can open it in a browser.
Output format
The HTML report includes:
- - Header: workflow name, status badge, duration, cost, node count
- Error banner: any failed nodes listed prominently
- Node list: expandable cards with type badge, duration bar, inputs/outputs, AI metadata, tool usage, reasoning
- Dark mode responsive, <15KB, zero external dependencies
OSOP 报告生成器
将工作流定义和/或执行日志转换为自包含的HTML报告。
参数
$ARGUMENTS
如果未提供参数,则查找 sessions/ 目录中最近的文件。
步骤
- 1. 查找文件 — 读取.osop文件(第一个参数)。如果还提供了.osoplog.yaml文件(第二个参数),则一并读取。
- 2. 生成HTML报告,使用内置报告生成器或通过构建内联HTML:
- 读取两个YAML文件
- 创建包含内联CSS的自包含HTML
- 每个节点变为可展开的
元素
- 按节点类型进行颜色编码(橙色=人类,紫色=智能体,蓝色=API/CLI/MCP,灰色=Git/Docker/CI/CD,绿色=数据库/数据)
- 显示状态徽章、持续时间条、工具使用情况、AI元数据、推理块
- 通过 prefers-color-scheme 包含深色模式
- 3. 保存HTML 到源文件旁边,添加 -report.html 后缀。
- 4. 告知用户 文件路径,以便在浏览器中打开。
输出格式
HTML报告包含:
- - 页眉:工作流名称、状态徽章、持续时间、成本、节点数量
- 错误横幅:醒目地列出所有失败的节点
- 节点列表:可展开的卡片,包含类型徽章、持续时间条、输入/输出、AI元数据、工具使用情况、推理
- 深色模式响应式设计,小于15KB,零外部依赖