SuperAPI AI 工具集

history-explorer

数据与分析

查看项目

更新于 10-16 03:39

技能介绍

用途:History Explorer 提供对 ~/.opensquilla/logs/decisions-*.jsonl 决策日志的轻量只读视图,用于查询每轮 DecisionEntry 中的技能共现模式、元技能使用统计,以及路由测试语料(router fixture corpus)。

主要能力:将 DecisionEntry.skills_invoked(SCHEMA_VERSION 10)聚合为共现频率;与 SkillLoader.list_meta_specs() 关联以生成元技能使用统计;展示 tests/test_skills/router_fixtures/ 语料;结果以 JSON 输出到 stdout,包含 co_occurrences、meta_usage、router_fixtures 等键。日志为空时输出占位字符串;若无决策日志,则返回空结果并提示“no history; downstream should rely on user intent only”。

使用方式:通过命令 uv run python {baseDir}/scripts/explore.py 运行,可指定 --log-dir(如 ~/.opensquilla/logs)、--query(自然语言查询,如 "Co-occurring chains for PDF workflows")、--window-days(如 30)、--include(如 co_occurrences,meta_usage,router_fixtures)与 --top-k(如 10)等参数。

适用场景:需要了解技能组合调用规律、元技能使用情况或路由夹具覆盖时。

限制:仅读取本地决策日志,日志缺失或无记录时结果为空或含占位说明;其余未在资料中提供的细节暂未提供。