@yottameta/yotta-logs 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -1
- package/README.md +3 -3
- package/README.zh-CN.md +3 -3
- package/SKILL.md +1 -1
- package/install.sh +24 -5
- package/package.json +1 -1
- package/scripts/yotta_logs.py +10 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,18 @@
|
|
|
1
|
-
## v0.3.
|
|
1
|
+
## v0.3.2 (2026-09-25)
|
|
2
|
+
|
|
3
|
+
安全修复:URL 内嵌凭据脱敏覆盖所有协议 + 查询串凭据。
|
|
4
|
+
|
|
5
|
+
- 背景:默认脱敏只处理 `http(s)://user:pass@`,`postgres://user:secret@…` 这类连接串与 `?token=…` 查询串会原样保留(ClawHub T09 Medium)。
|
|
6
|
+
- 修复:用户信息脱敏扩展到任意 `scheme://user:pass@`;新增查询串凭据遮蔽(`token / api_key / access_token / password / secret / sig` 等参数值替换为 `***`),非凭据参数保持不变。
|
|
7
|
+
- 安装器加固 + README 安装命令补锁定版本写法。
|
|
8
|
+
- 回归:新增 3 项脱敏用例,测试 146/146 通过。
|
|
2
9
|
|
|
3
10
|
- 修复本机专属路径硬编码:移除本机自定义数据目录候选;opencode 只认 `XDG_DATA_HOME` / `OPENCODE_DATA` / 官方默认路径,Codex notes 只认 `$CODEX_HOME/memories` 或 `~/.codex/memories`。
|
|
4
11
|
- 配置路径改为平台无关:`$YOTTA_LOGS_CONFIG` > Windows `%APPDATA%` > Unix `$XDG_CONFIG_HOME` / `~/.config`。
|
|
5
12
|
- 新增便携覆盖回归:`YOTTA_MEMORY_HOME`、`CODEX_HOME`、`YOTTA_LOGS_CONFIG`;并加本机自定义目录反向断言。
|
|
6
13
|
|
|
14
|
+
## v0.3.1 (2026-09-13)
|
|
15
|
+
|
|
7
16
|
## v0.3.0 (2026-09-08)
|
|
8
17
|
|
|
9
18
|
**评测驱动完善**:新增 FAQ,安装器错误处理与测试补齐。
|
package/README.md
CHANGED
|
@@ -111,8 +111,8 @@ Pick any of the four methods below; the order is the recommended priority. Skill
|
|
|
111
111
|
|
|
112
112
|
```text
|
|
113
113
|
# Optional China mirror: npm config set registry https://registry.npmmirror.com
|
|
114
|
-
npx -y @yottameta/yotta-logs --agent <agent-name> # install to the agent's default user-level skills dir
|
|
115
|
-
npx -y @yottameta/yotta-logs --dir <your-skills-dir> # point to the skills dir itself (e.g. ~/.codex/skills)
|
|
114
|
+
npx -y @yottameta/yotta-logs@0.3.2 --agent <agent-name> # install to the agent's default user-level skills dir
|
|
115
|
+
npx -y @yottameta/yotta-logs@0.3.2 --dir <your-skills-dir> # point to the skills dir itself (e.g. ~/.codex/skills)
|
|
116
116
|
```
|
|
117
117
|
|
|
118
118
|
- `--agent <name>` installs to that agent's default user-level directory; `--list` shows each agent's default directory.
|
|
@@ -165,7 +165,7 @@ bash install.sh --list # list agents -> default directories
|
|
|
165
165
|
- v0.3.1 (2026-09-13): Removed machine-specific hardcoded paths; discovery and config now follow environment variables and platform defaults, with regression coverage.
|
|
166
166
|
- v0.3.0 (2026-09-08): Evaluation-driven refinement — added FAQ, hardened installer error handling and exit codes, and added installer tests.
|
|
167
167
|
|
|
168
|
-
- v0.2.2 (2026-08-29): Install docs alignment — unified four install methods (npx -y @yottameta/yotta-logs --agent/--dir, git clone, GitHub Download ZIP, install.sh --agent/--dir/--list), removed the legacy GitHub-clone installer and global-install (-g) recommendations; bilingual README install section synced to 发布规范 §3.3.1. No functional change.
|
|
168
|
+
- v0.2.2 (2026-08-29): Install docs alignment — unified four install methods (npx -y @yottameta/yotta-logs@0.3.2 --agent/--dir, git clone, GitHub Download ZIP, install.sh --agent/--dir/--list), removed the legacy GitHub-clone installer and global-install (-g) recommendations; bilingual README install section synced to 发布规范 §3.3.1. No functional change.
|
|
169
169
|
|
|
170
170
|
- v0.2.1 (2026-08-27): Bilingual documentation — English README as the GitHub / npm / ClawHub homepage, full Chinese doc moved to README.zh-CN.md, English npm description.
|
|
171
171
|
- v0.2.0 (2026-08-27): Multi-format generalization — JSONL / single-file JSON / SQLite (opencode etc.) / Markdown (memory + free notes) / binary; unified Record + field-alias normalization + config fallback; discover; new --source / --kind / --format filters and default search scope (session + structured memory on, free notes / binary logs off). See CHANGELOG.md.
|
package/README.zh-CN.md
CHANGED
|
@@ -111,8 +111,8 @@ python3 scripts/yotta_logs.py search "部署方案" --dir /path/to/sessions --js
|
|
|
111
111
|
|
|
112
112
|
```text
|
|
113
113
|
# 可选国内加速:npm config set registry https://registry.npmmirror.com
|
|
114
|
-
npx -y @yottameta/yotta-logs --agent <智能体名称> # 装到指定智能体默认用户级技能目录
|
|
115
|
-
npx -y @yottameta/yotta-logs --dir <智能体的技能目录> # 指到技能目录本身(如 ~/.codex/skills)
|
|
114
|
+
npx -y @yottameta/yotta-logs@0.3.2 --agent <智能体名称> # 装到指定智能体默认用户级技能目录
|
|
115
|
+
npx -y @yottameta/yotta-logs@0.3.2 --dir <智能体的技能目录> # 指到技能目录本身(如 ~/.codex/skills)
|
|
116
116
|
```
|
|
117
117
|
|
|
118
118
|
- `--agent <name>` 自动装到该智能体默认用户级目录;`--list` 可查看各智能体默认目录。
|
|
@@ -165,7 +165,7 @@ bash install.sh --list # 列出智能体 -> 默认目录
|
|
|
165
165
|
- v0.3.1(2026-09-13):移除本机专属硬编码路径;discovery 与配置统一走环境变量和平台默认位置,并补回归覆盖。
|
|
166
166
|
- v0.3.0(2026-09-08):评测驱动完善——新增常见问题,安装器错误处理与退出码加固,并补齐安装器测试。
|
|
167
167
|
|
|
168
|
-
- v0.2.2(2026-08-29):安装方式统一为四方式(对齐发布规范 §3.3.1)——方式一 npx -y @yottameta/yotta-logs --agent / --dir(推荐,走 npm 源);方式二 git clone;方式三 GitHub Download ZIP;方式四 bash install.sh --agent/--dir/--list。移除旧式 GitHub 克隆安装器与全局安装(-g)推荐;中英 README 安装节同步。无功能变更。
|
|
168
|
+
- v0.2.2(2026-08-29):安装方式统一为四方式(对齐发布规范 §3.3.1)——方式一 npx -y @yottameta/yotta-logs@0.3.2 --agent / --dir(推荐,走 npm 源);方式二 git clone;方式三 GitHub Download ZIP;方式四 bash install.sh --agent/--dir/--list。移除旧式 GitHub 克隆安装器与全局安装(-g)推荐;中英 README 安装节同步。无功能变更。
|
|
169
169
|
|
|
170
170
|
- v0.2.0(2026-08-27):多格式通用化——JSONL / 单文件 JSON / SQLite(opencode 等)/ Markdown(记忆 + 自由笔记)/ 二进制五大格式族,统一 Record + 字段别名归一 + 配置兜底,discover 全源登记,新增 --source / --kind / --format 过滤与默认检索范围(会话 + 结构化记忆开、自由笔记 / 二进制日志关)。详见 CHANGELOG.md。
|
|
171
171
|
- v0.1.0(2026-08-27):首版——零依赖 JSONL 会话日志检索引擎(locate / scan / search / session / stats / tools / version + 默认脱敏 + sessions.json 别名 + 只读)。
|
package/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: yotta-logs
|
|
3
|
-
version: 0.3.
|
|
3
|
+
version: 0.3.2
|
|
4
4
|
description: 元史 —— 跨智能体的历史会话 / 记忆日志检索技能:零依赖检索 / 分析 JSONL、JSON、SQLite、Markdown 多格式会话与记忆文件,回溯旧对话与父会话上下文,为跨会话追溯提供原始日志依据。触发:用户问起先前聊过的内容 / 父会话 / 历史上下文、要查以前说过的结论、跨会话回溯某次讨论、需要从会话日志或记忆文件定位某段决策时。边界:仅读取本机自己的会话日志 / 记忆文件;不修改、不删除;只查本地不联网上传。
|
|
5
5
|
license: MIT
|
|
6
6
|
---
|
package/install.sh
CHANGED
|
@@ -61,10 +61,29 @@ resolve_user() {
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
install_to() {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
64
|
+
local base="$1"
|
|
65
|
+
local dest
|
|
66
|
+
case "$base" in
|
|
67
|
+
""|"/") echo "安装失败:拒绝不安全的目标目录:'$base'" >&2; return 1 ;;
|
|
68
|
+
esac
|
|
69
|
+
if [ -L "$base" ]; then
|
|
70
|
+
echo "安装失败:目标目录是符号链接,拒绝跟随:$base" >&2; return 1
|
|
71
|
+
fi
|
|
72
|
+
mkdir -p "$base"
|
|
73
|
+
dest="$base/$SKILL_NAME"
|
|
74
|
+
if [ -L "$dest" ]; then
|
|
75
|
+
echo "安装失败:技能目录是符号链接,拒绝跟随:$dest" >&2; return 1
|
|
76
|
+
fi
|
|
77
|
+
if [ -e "$dest" ] && [ ! -d "$dest" ]; then
|
|
78
|
+
echo "安装失败:技能路径已存在且不是目录:$dest" >&2; return 1
|
|
79
|
+
fi
|
|
80
|
+
mkdir -p "$dest"
|
|
81
|
+
cp -RP "$SOURCE_DIR/." "$dest/"
|
|
82
|
+
# 只清理副本内部的开发残留(固定子路径),不做整目录删除、不跟随符号链接
|
|
83
|
+
if [ -d "$dest/.git" ] && [ ! -L "$dest/.git" ]; then rm -rf "$dest/.git"; fi
|
|
84
|
+
find "$dest" -type d -name '__pycache__' -prune -exec rm -rf {} + 2>/dev/null || true
|
|
85
|
+
find "$dest" -type f -name '*.pyc' -delete 2>/dev/null || true
|
|
86
|
+
echo "installed -> $dest"
|
|
68
87
|
}
|
|
69
88
|
|
|
70
89
|
list() {
|
|
@@ -129,4 +148,4 @@ main() {
|
|
|
129
148
|
fi
|
|
130
149
|
}
|
|
131
150
|
|
|
132
|
-
main "$@"
|
|
151
|
+
main "$@"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yottameta/yotta-logs",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "Yuanshi — a skill for retrieving historical session / memory logs across AI agents: zero-dependency search and analysis of JSONL, JSON, SQLite and Markdown session & memory files (unified Record + field-alias normalization + config fallback), with full source discovery to recall past conversations and parent-session context. Triggers when the user asks about previously discussed content / a parent session / historical context, wants to look up an earlier conclusion, traces a past discussion across sessions, or needs to locate a decision in session logs or memory files. Boundaries: reads only the local agent's own session logs / memory files; never modifies or deletes records; local-only, never uploaded.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
package/scripts/yotta_logs.py
CHANGED
|
@@ -64,7 +64,7 @@ try:
|
|
|
64
64
|
except Exception:
|
|
65
65
|
pass
|
|
66
66
|
|
|
67
|
-
VERSION = "0.3.
|
|
67
|
+
VERSION = "0.3.2"
|
|
68
68
|
TOOL_NAME = "yotta-logs"
|
|
69
69
|
TOOL_CN = "元史"
|
|
70
70
|
DEFAULT_LIMIT = 50
|
|
@@ -92,7 +92,14 @@ TITLE_ALIASES = ("title", "subject", "name", "heading")
|
|
|
92
92
|
# ── 脱敏(默认开启)──────────────────────────────────────────────────────
|
|
93
93
|
|
|
94
94
|
_URL_RE = re.compile(r"(https?://[^\s\"'<>]+)", re.I)
|
|
95
|
-
|
|
95
|
+
# v0.3.2:URL 内嵌凭据脱敏覆盖所有协议(不只是 http/https),并遮蔽查询串里的
|
|
96
|
+
# 凭据参数 —— 旧行为只处理 http(s)://user:pass@,`postgres://` / `?token=...` 会漏。
|
|
97
|
+
_URL_USERPASS_RE = re.compile(
|
|
98
|
+
r"([a-z][a-z0-9+.\-]*://)([^/\s:@]*):([^/\s@]+)@", re.I)
|
|
99
|
+
_URL_SECRET_QUERY_RE = re.compile(
|
|
100
|
+
r"(?i)([?&](?:token|api[_-]?key|apikey|access[_-]?token|auth|authorization|"
|
|
101
|
+
r"password|passwd|pwd|secret|client[_-]?secret|session|sig|signature)=)"
|
|
102
|
+
r"[^&\s\"'<>]+")
|
|
96
103
|
_KNOWN_KEY_RE = re.compile(
|
|
97
104
|
r"(?i)\b("
|
|
98
105
|
r"sk-[a-z0-9_-]{8,}" # OpenAI 类 API key
|
|
@@ -120,6 +127,7 @@ def redact(text):
|
|
|
120
127
|
return text
|
|
121
128
|
text = _PEM_RE.sub("[PRIVATE KEY REDACTED]", text)
|
|
122
129
|
text = _URL_USERPASS_RE.sub(r"\1\2:***@", text)
|
|
130
|
+
text = _URL_SECRET_QUERY_RE.sub(r"\1***", text)
|
|
123
131
|
chunks = _URL_RE.split(text) # 奇数下标为 URL,原文保留(路径不算密钥)
|
|
124
132
|
out = []
|
|
125
133
|
for i, chunk in enumerate(chunks):
|