安全修复(Critical): clear_stats() 添加 ADMIN_TOKEN 身份验证

- 防止未授权清空统计数据
- 需要设置环境变量 ADMIN_TOKEN 才能执行清空操作
This commit is contained in:
2026-03-09 15:17:38 +08:00
parent f9cc8bb82a
commit 65ef23de5d
4 changed files with 879 additions and 11 deletions
+862 -9
View File
@@ -1,7 +1,7 @@
{
"agent:haonan:main": {
"sessionId": "19d09a52-cb94-4eb2-8505-21860848a9e5",
"updatedAt": 1773026659270,
"updatedAt": 1773040623941,
"systemSent": true,
"skillsSnapshot": {
"prompt": "\n\nThe following skills provide specialized instructions for specific tasks.\nUse the read tool to load a skill's file when the task matches its description.\nWhen a skill file references a relative path, resolve it against the skill directory (parent of SKILL.md / dirname of the path) and use that absolute path in tool commands.\n\n<available_skills>\n <skill>\n <name>capability-evolver</name>\n <description>A self-evolution engine for AI agents. Analyzes runtime history to identify improvements and applies protocol-constrained evolution.</description>\n <location>~/.openclaw/skills/capability-evolver/SKILL.md</location>\n </skill>\n <skill>\n <name>clawlist</name>\n <description>MUST use for any multi-step project, long-running task, or infinite monitoring workflow. Plan, execute, track, and verify tasks with checkpoint validation. For projects, automation, and ongoing operations.</description>\n <location>~/.openclaw/skills/clawlist/SKILL.md</location>\n </skill>\n</available_skills>",
@@ -62,7 +62,7 @@
"sessionFile": "/home/starmen1265/.openclaw/agents/haonan/sessions/19d09a52-cb94-4eb2-8505-21860848a9e5.jsonl",
"systemPromptReport": {
"source": "run",
"generatedAt": 1773026614909,
"generatedAt": 1773040604443,
"sessionId": "19d09a52-cb94-4eb2-8505-21860848a9e5",
"sessionKey": "agent:haonan:main",
"provider": "zhipu",
@@ -75,9 +75,9 @@
"sandboxed": false
},
"systemPrompt": {
"chars": 29165,
"projectContextChars": 15820,
"nonProjectContextChars": 13345
"chars": 40480,
"projectContextChars": 27502,
"nonProjectContextChars": 12978
},
"injectedWorkspaceFiles": [
{
@@ -150,6 +150,114 @@
"injectedChars": 616,
"truncated": false
},
{
"path": "SELF_IMPROVEMENT_REMINDER.md",
"rawChars": 616,
"injectedChars": 616,
"truncated": false
},
{
"path": "SELF_IMPROVEMENT_REMINDER.md",
"rawChars": 616,
"injectedChars": 616,
"truncated": false
},
{
"path": "SELF_IMPROVEMENT_REMINDER.md",
"rawChars": 616,
"injectedChars": 616,
"truncated": false
},
{
"path": "SELF_IMPROVEMENT_REMINDER.md",
"rawChars": 616,
"injectedChars": 616,
"truncated": false
},
{
"path": "SELF_IMPROVEMENT_REMINDER.md",
"rawChars": 616,
"injectedChars": 616,
"truncated": false
},
{
"path": "SELF_IMPROVEMENT_REMINDER.md",
"rawChars": 616,
"injectedChars": 616,
"truncated": false
},
{
"path": "SELF_IMPROVEMENT_REMINDER.md",
"rawChars": 616,
"injectedChars": 616,
"truncated": false
},
{
"path": "SELF_IMPROVEMENT_REMINDER.md",
"rawChars": 616,
"injectedChars": 616,
"truncated": false
},
{
"path": "SELF_IMPROVEMENT_REMINDER.md",
"rawChars": 616,
"injectedChars": 616,
"truncated": false
},
{
"path": "SELF_IMPROVEMENT_REMINDER.md",
"rawChars": 616,
"injectedChars": 616,
"truncated": false
},
{
"path": "SELF_IMPROVEMENT_REMINDER.md",
"rawChars": 616,
"injectedChars": 616,
"truncated": false
},
{
"path": "SELF_IMPROVEMENT_REMINDER.md",
"rawChars": 616,
"injectedChars": 616,
"truncated": false
},
{
"path": "SELF_IMPROVEMENT_REMINDER.md",
"rawChars": 616,
"injectedChars": 616,
"truncated": false
},
{
"path": "SELF_IMPROVEMENT_REMINDER.md",
"rawChars": 616,
"injectedChars": 616,
"truncated": false
},
{
"path": "SELF_IMPROVEMENT_REMINDER.md",
"rawChars": 616,
"injectedChars": 616,
"truncated": false
},
{
"path": "SELF_IMPROVEMENT_REMINDER.md",
"rawChars": 616,
"injectedChars": 616,
"truncated": false
},
{
"path": "SELF_IMPROVEMENT_REMINDER.md",
"rawChars": 616,
"injectedChars": 616,
"truncated": false
},
{
"path": "SELF_IMPROVEMENT_REMINDER.md",
"rawChars": 616,
"injectedChars": 616,
"truncated": false
},
{
"path": "SELF_IMPROVEMENT_REMINDER.md",
"rawChars": 616,
@@ -383,14 +491,15 @@
},
"compactionCount": 0,
"totalTokensFresh": true,
"cacheRead": 12224,
"cacheRead": 91712,
"cacheWrite": 0,
"lastHeartbeatText": "已在飞书向蒋先生发送日历同步提醒!✅",
"lastHeartbeatSentAt": 1772924419184,
"contextTokens": 200000,
"inputTokens": 47223,
"outputTokens": 1658,
"totalTokens": 59447
"inputTokens": 72316,
"outputTokens": 351,
"totalTokens": 92082,
"channel": "feishu"
},
"agent:haonan:wecom:dm:zhangqing": {
"origin": {
@@ -950,5 +1059,749 @@
"totalTokensFresh": true,
"cacheRead": 60736,
"cacheWrite": 0
},
"agent:haonan:subagent:274e4fbc-df83-41ee-82af-c97904920b8e": {
"sessionId": "79a3a63f-e790-4594-a4b7-ca6b1faf27ab",
"updatedAt": 1773038094722,
"spawnDepth": 1,
"deliveryContext": {
"channel": "feishu"
},
"lastChannel": "feishu",
"label": "debate-claude",
"spawnedBy": "agent:haonan:main",
"channel": "feishu",
"skillsSnapshot": {
"prompt": "\n\nThe following skills provide specialized instructions for specific tasks.\nUse the read tool to load a skill's file when the task matches its description.\nWhen a skill file references a relative path, resolve it against the skill directory (parent of SKILL.md / dirname of the path) and use that absolute path in tool commands.\n\n<available_skills>\n <skill>\n <name>capability-evolver</name>\n <description>A self-evolution engine for AI agents. Analyzes runtime history to identify improvements and applies protocol-constrained evolution.</description>\n <location>~/.openclaw/skills/capability-evolver/SKILL.md</location>\n </skill>\n <skill>\n <name>clawlist</name>\n <description>MUST use for any multi-step project, long-running task, or infinite monitoring workflow. Plan, execute, track, and verify tasks with checkpoint validation. For projects, automation, and ongoing operations.</description>\n <location>~/.openclaw/skills/clawlist/SKILL.md</location>\n </skill>\n</available_skills>",
"skills": [
{
"name": "capability-evolver"
},
{
"name": "clawlist"
}
],
"skillFilter": [
"clawlist",
"capability-evolver",
"self-improving-agent"
],
"resolvedSkills": [
{
"name": "capability-evolver",
"description": "A self-evolution engine for AI agents. Analyzes runtime history to identify improvements and applies protocol-constrained evolution.",
"filePath": "/home/starmen1265/.openclaw/skills/capability-evolver/SKILL.md",
"baseDir": "/home/starmen1265/.openclaw/skills/capability-evolver",
"source": "openclaw-managed",
"disableModelInvocation": false
},
{
"name": "clawlist",
"description": "MUST use for any multi-step project, long-running task, or infinite monitoring workflow. Plan, execute, track, and verify tasks with checkpoint validation. For projects, automation, and ongoing operations.",
"filePath": "/home/starmen1265/.openclaw/skills/clawlist/SKILL.md",
"baseDir": "/home/starmen1265/.openclaw/skills/clawlist",
"source": "openclaw-managed",
"disableModelInvocation": false
}
],
"version": 0
},
"sessionFile": "/home/starmen1265/.openclaw/agents/haonan/sessions/79a3a63f-e790-4594-a4b7-ca6b1faf27ab.jsonl",
"contextTokens": 200000,
"modelProvider": "zhipu",
"model": "glm-5",
"abortedLastRun": false,
"inputTokens": 9848,
"outputTokens": 1096,
"totalTokens": 15151,
"totalTokensFresh": true,
"cacheRead": 19648,
"cacheWrite": 0
},
"agent:haonan:subagent:b57fed9b-07b9-4dc8-ae28-93cbc7cc5b19": {
"sessionId": "f6fef24b-e9d0-451a-a2d4-27901ce2a6fb",
"updatedAt": 1773038071878,
"spawnDepth": 1,
"deliveryContext": {
"channel": "feishu"
},
"lastChannel": "feishu",
"label": "debate-codex",
"spawnedBy": "agent:haonan:main",
"channel": "feishu",
"skillsSnapshot": {
"prompt": "\n\nThe following skills provide specialized instructions for specific tasks.\nUse the read tool to load a skill's file when the task matches its description.\nWhen a skill file references a relative path, resolve it against the skill directory (parent of SKILL.md / dirname of the path) and use that absolute path in tool commands.\n\n<available_skills>\n <skill>\n <name>capability-evolver</name>\n <description>A self-evolution engine for AI agents. Analyzes runtime history to identify improvements and applies protocol-constrained evolution.</description>\n <location>~/.openclaw/skills/capability-evolver/SKILL.md</location>\n </skill>\n <skill>\n <name>clawlist</name>\n <description>MUST use for any multi-step project, long-running task, or infinite monitoring workflow. Plan, execute, track, and verify tasks with checkpoint validation. For projects, automation, and ongoing operations.</description>\n <location>~/.openclaw/skills/clawlist/SKILL.md</location>\n </skill>\n</available_skills>",
"skills": [
{
"name": "capability-evolver"
},
{
"name": "clawlist"
}
],
"skillFilter": [
"clawlist",
"capability-evolver",
"self-improving-agent"
],
"resolvedSkills": [
{
"name": "capability-evolver",
"description": "A self-evolution engine for AI agents. Analyzes runtime history to identify improvements and applies protocol-constrained evolution.",
"filePath": "/home/starmen1265/.openclaw/skills/capability-evolver/SKILL.md",
"baseDir": "/home/starmen1265/.openclaw/skills/capability-evolver",
"source": "openclaw-managed",
"disableModelInvocation": false
},
{
"name": "clawlist",
"description": "MUST use for any multi-step project, long-running task, or infinite monitoring workflow. Plan, execute, track, and verify tasks with checkpoint validation. For projects, automation, and ongoing operations.",
"filePath": "/home/starmen1265/.openclaw/skills/clawlist/SKILL.md",
"baseDir": "/home/starmen1265/.openclaw/skills/clawlist",
"source": "openclaw-managed",
"disableModelInvocation": false
}
],
"version": 0
},
"sessionFile": "/home/starmen1265/.openclaw/agents/haonan/sessions/f6fef24b-e9d0-451a-a2d4-27901ce2a6fb.jsonl",
"contextTokens": 200000,
"modelProvider": "zhipu",
"model": "glm-5",
"abortedLastRun": false,
"inputTokens": 5975,
"outputTokens": 683,
"totalTokens": 15769,
"totalTokensFresh": true,
"cacheRead": 39168,
"cacheWrite": 0
},
"agent:haonan:subagent:9f7d6e74-6bf4-424e-8321-28399f52f72b": {
"sessionId": "8070a163-21e9-4f04-afba-3bc8a82eaf0b",
"updatedAt": 1773038063531,
"spawnDepth": 1,
"deliveryContext": {
"channel": "feishu"
},
"lastChannel": "feishu",
"label": "debate-gemini",
"spawnedBy": "agent:haonan:main",
"channel": "feishu",
"skillsSnapshot": {
"prompt": "\n\nThe following skills provide specialized instructions for specific tasks.\nUse the read tool to load a skill's file when the task matches its description.\nWhen a skill file references a relative path, resolve it against the skill directory (parent of SKILL.md / dirname of the path) and use that absolute path in tool commands.\n\n<available_skills>\n <skill>\n <name>capability-evolver</name>\n <description>A self-evolution engine for AI agents. Analyzes runtime history to identify improvements and applies protocol-constrained evolution.</description>\n <location>~/.openclaw/skills/capability-evolver/SKILL.md</location>\n </skill>\n <skill>\n <name>clawlist</name>\n <description>MUST use for any multi-step project, long-running task, or infinite monitoring workflow. Plan, execute, track, and verify tasks with checkpoint validation. For projects, automation, and ongoing operations.</description>\n <location>~/.openclaw/skills/clawlist/SKILL.md</location>\n </skill>\n</available_skills>",
"skills": [
{
"name": "capability-evolver"
},
{
"name": "clawlist"
}
],
"skillFilter": [
"clawlist",
"capability-evolver",
"self-improving-agent"
],
"resolvedSkills": [
{
"name": "capability-evolver",
"description": "A self-evolution engine for AI agents. Analyzes runtime history to identify improvements and applies protocol-constrained evolution.",
"filePath": "/home/starmen1265/.openclaw/skills/capability-evolver/SKILL.md",
"baseDir": "/home/starmen1265/.openclaw/skills/capability-evolver",
"source": "openclaw-managed",
"disableModelInvocation": false
},
{
"name": "clawlist",
"description": "MUST use for any multi-step project, long-running task, or infinite monitoring workflow. Plan, execute, track, and verify tasks with checkpoint validation. For projects, automation, and ongoing operations.",
"filePath": "/home/starmen1265/.openclaw/skills/clawlist/SKILL.md",
"baseDir": "/home/starmen1265/.openclaw/skills/clawlist",
"source": "openclaw-managed",
"disableModelInvocation": false
}
],
"version": 0
},
"sessionFile": "/home/starmen1265/.openclaw/agents/haonan/sessions/8070a163-21e9-4f04-afba-3bc8a82eaf0b.jsonl",
"contextTokens": 200000,
"modelProvider": "zhipu",
"model": "glm-5",
"abortedLastRun": false,
"inputTokens": 4499,
"outputTokens": 493,
"totalTokens": 14355,
"totalTokensFresh": true,
"cacheRead": 9856,
"cacheWrite": 0
},
"agent:haonan:subagent:20c2f592-717f-4142-80ef-559ed47f3731": {
"sessionId": "91aaba82-8ccd-41b0-ac50-a1f1b0f172cf",
"updatedAt": 1773038247318,
"spawnDepth": 1,
"deliveryContext": {
"channel": "feishu"
},
"lastChannel": "feishu",
"label": "cross-review-1",
"spawnedBy": "agent:haonan:main",
"channel": "feishu",
"skillsSnapshot": {
"prompt": "\n\nThe following skills provide specialized instructions for specific tasks.\nUse the read tool to load a skill's file when the task matches its description.\nWhen a skill file references a relative path, resolve it against the skill directory (parent of SKILL.md / dirname of the path) and use that absolute path in tool commands.\n\n<available_skills>\n <skill>\n <name>capability-evolver</name>\n <description>A self-evolution engine for AI agents. Analyzes runtime history to identify improvements and applies protocol-constrained evolution.</description>\n <location>~/.openclaw/skills/capability-evolver/SKILL.md</location>\n </skill>\n <skill>\n <name>clawlist</name>\n <description>MUST use for any multi-step project, long-running task, or infinite monitoring workflow. Plan, execute, track, and verify tasks with checkpoint validation. For projects, automation, and ongoing operations.</description>\n <location>~/.openclaw/skills/clawlist/SKILL.md</location>\n </skill>\n</available_skills>",
"skills": [
{
"name": "capability-evolver"
},
{
"name": "clawlist"
}
],
"skillFilter": [
"clawlist",
"capability-evolver",
"self-improving-agent"
],
"resolvedSkills": [
{
"name": "capability-evolver",
"description": "A self-evolution engine for AI agents. Analyzes runtime history to identify improvements and applies protocol-constrained evolution.",
"filePath": "/home/starmen1265/.openclaw/skills/capability-evolver/SKILL.md",
"baseDir": "/home/starmen1265/.openclaw/skills/capability-evolver",
"source": "openclaw-managed",
"disableModelInvocation": false
},
{
"name": "clawlist",
"description": "MUST use for any multi-step project, long-running task, or infinite monitoring workflow. Plan, execute, track, and verify tasks with checkpoint validation. For projects, automation, and ongoing operations.",
"filePath": "/home/starmen1265/.openclaw/skills/clawlist/SKILL.md",
"baseDir": "/home/starmen1265/.openclaw/skills/clawlist",
"source": "openclaw-managed",
"disableModelInvocation": false
}
],
"version": 0
},
"sessionFile": "/home/starmen1265/.openclaw/agents/haonan/sessions/91aaba82-8ccd-41b0-ac50-a1f1b0f172cf.jsonl",
"contextTokens": 200000,
"modelProvider": "zhipu",
"model": "glm-5",
"abortedLastRun": false,
"inputTokens": 4641,
"outputTokens": 531,
"totalTokens": 14497,
"totalTokensFresh": true,
"cacheRead": 9856,
"cacheWrite": 0
},
"agent:haonan:subagent:e67080fe-6710-4c69-bfb3-307900085f1c": {
"sessionId": "4ed0f48f-0dfb-4f37-ab24-4562e616439d",
"updatedAt": 1773038236930,
"spawnDepth": 1,
"deliveryContext": {
"channel": "feishu"
},
"lastChannel": "feishu",
"label": "cross-review-2",
"spawnedBy": "agent:haonan:main",
"channel": "feishu",
"skillsSnapshot": {
"prompt": "\n\nThe following skills provide specialized instructions for specific tasks.\nUse the read tool to load a skill's file when the task matches its description.\nWhen a skill file references a relative path, resolve it against the skill directory (parent of SKILL.md / dirname of the path) and use that absolute path in tool commands.\n\n<available_skills>\n <skill>\n <name>capability-evolver</name>\n <description>A self-evolution engine for AI agents. Analyzes runtime history to identify improvements and applies protocol-constrained evolution.</description>\n <location>~/.openclaw/skills/capability-evolver/SKILL.md</location>\n </skill>\n <skill>\n <name>clawlist</name>\n <description>MUST use for any multi-step project, long-running task, or infinite monitoring workflow. Plan, execute, track, and verify tasks with checkpoint validation. For projects, automation, and ongoing operations.</description>\n <location>~/.openclaw/skills/clawlist/SKILL.md</location>\n </skill>\n</available_skills>",
"skills": [
{
"name": "capability-evolver"
},
{
"name": "clawlist"
}
],
"skillFilter": [
"clawlist",
"capability-evolver",
"self-improving-agent"
],
"resolvedSkills": [
{
"name": "capability-evolver",
"description": "A self-evolution engine for AI agents. Analyzes runtime history to identify improvements and applies protocol-constrained evolution.",
"filePath": "/home/starmen1265/.openclaw/skills/capability-evolver/SKILL.md",
"baseDir": "/home/starmen1265/.openclaw/skills/capability-evolver",
"source": "openclaw-managed",
"disableModelInvocation": false
},
{
"name": "clawlist",
"description": "MUST use for any multi-step project, long-running task, or infinite monitoring workflow. Plan, execute, track, and verify tasks with checkpoint validation. For projects, automation, and ongoing operations.",
"filePath": "/home/starmen1265/.openclaw/skills/clawlist/SKILL.md",
"baseDir": "/home/starmen1265/.openclaw/skills/clawlist",
"source": "openclaw-managed",
"disableModelInvocation": false
}
],
"version": 0
},
"sessionFile": "/home/starmen1265/.openclaw/agents/haonan/sessions/4ed0f48f-0dfb-4f37-ab24-4562e616439d.jsonl",
"contextTokens": 200000,
"modelProvider": "zhipu",
"model": "glm-5",
"abortedLastRun": false,
"inputTokens": 4641,
"outputTokens": 443,
"totalTokens": 14497,
"totalTokensFresh": true,
"cacheRead": 9856,
"cacheWrite": 0
},
"agent:haonan:subagent:c2889dda-a0fe-4bb3-a8cc-24b6dc5961b1": {
"sessionId": "8dbba806-4d27-4bc3-9777-5c49d0b520f4",
"updatedAt": 1773038270563,
"spawnDepth": 1,
"deliveryContext": {
"channel": "feishu"
},
"lastChannel": "feishu",
"label": "cross-review-3",
"spawnedBy": "agent:haonan:main",
"channel": "feishu",
"skillsSnapshot": {
"prompt": "\n\nThe following skills provide specialized instructions for specific tasks.\nUse the read tool to load a skill's file when the task matches its description.\nWhen a skill file references a relative path, resolve it against the skill directory (parent of SKILL.md / dirname of the path) and use that absolute path in tool commands.\n\n<available_skills>\n <skill>\n <name>capability-evolver</name>\n <description>A self-evolution engine for AI agents. Analyzes runtime history to identify improvements and applies protocol-constrained evolution.</description>\n <location>~/.openclaw/skills/capability-evolver/SKILL.md</location>\n </skill>\n <skill>\n <name>clawlist</name>\n <description>MUST use for any multi-step project, long-running task, or infinite monitoring workflow. Plan, execute, track, and verify tasks with checkpoint validation. For projects, automation, and ongoing operations.</description>\n <location>~/.openclaw/skills/clawlist/SKILL.md</location>\n </skill>\n</available_skills>",
"skills": [
{
"name": "capability-evolver"
},
{
"name": "clawlist"
}
],
"skillFilter": [
"clawlist",
"capability-evolver",
"self-improving-agent"
],
"resolvedSkills": [
{
"name": "capability-evolver",
"description": "A self-evolution engine for AI agents. Analyzes runtime history to identify improvements and applies protocol-constrained evolution.",
"filePath": "/home/starmen1265/.openclaw/skills/capability-evolver/SKILL.md",
"baseDir": "/home/starmen1265/.openclaw/skills/capability-evolver",
"source": "openclaw-managed",
"disableModelInvocation": false
},
{
"name": "clawlist",
"description": "MUST use for any multi-step project, long-running task, or infinite monitoring workflow. Plan, execute, track, and verify tasks with checkpoint validation. For projects, automation, and ongoing operations.",
"filePath": "/home/starmen1265/.openclaw/skills/clawlist/SKILL.md",
"baseDir": "/home/starmen1265/.openclaw/skills/clawlist",
"source": "openclaw-managed",
"disableModelInvocation": false
}
],
"version": 0
},
"sessionFile": "/home/starmen1265/.openclaw/agents/haonan/sessions/8dbba806-4d27-4bc3-9777-5c49d0b520f4.jsonl",
"contextTokens": 200000,
"modelProvider": "zhipu",
"model": "glm-5",
"abortedLastRun": false,
"inputTokens": 4639,
"outputTokens": 546,
"totalTokens": 14495,
"totalTokensFresh": true,
"cacheRead": 9856,
"cacheWrite": 0
},
"agent:haonan:subagent:7fbdc597-2ade-4e22-9c9b-0334d3854818": {
"sessionId": "b197e49b-1512-4f90-bc88-eeb888031d25",
"updatedAt": 1773038676051,
"spawnDepth": 1,
"deliveryContext": {
"channel": "feishu"
},
"lastChannel": "feishu",
"label": "dev-cross-stats",
"spawnedBy": "agent:haonan:main",
"channel": "feishu",
"skillsSnapshot": {
"prompt": "\n\nThe following skills provide specialized instructions for specific tasks.\nUse the read tool to load a skill's file when the task matches its description.\nWhen a skill file references a relative path, resolve it against the skill directory (parent of SKILL.md / dirname of the path) and use that absolute path in tool commands.\n\n<available_skills>\n <skill>\n <name>capability-evolver</name>\n <description>A self-evolution engine for AI agents. Analyzes runtime history to identify improvements and applies protocol-constrained evolution.</description>\n <location>~/.openclaw/skills/capability-evolver/SKILL.md</location>\n </skill>\n <skill>\n <name>clawlist</name>\n <description>MUST use for any multi-step project, long-running task, or infinite monitoring workflow. Plan, execute, track, and verify tasks with checkpoint validation. For projects, automation, and ongoing operations.</description>\n <location>~/.openclaw/skills/clawlist/SKILL.md</location>\n </skill>\n</available_skills>",
"skills": [
{
"name": "capability-evolver"
},
{
"name": "clawlist"
}
],
"skillFilter": [
"clawlist",
"capability-evolver",
"self-improving-agent"
],
"resolvedSkills": [
{
"name": "capability-evolver",
"description": "A self-evolution engine for AI agents. Analyzes runtime history to identify improvements and applies protocol-constrained evolution.",
"filePath": "/home/starmen1265/.openclaw/skills/capability-evolver/SKILL.md",
"baseDir": "/home/starmen1265/.openclaw/skills/capability-evolver",
"source": "openclaw-managed",
"disableModelInvocation": false
},
{
"name": "clawlist",
"description": "MUST use for any multi-step project, long-running task, or infinite monitoring workflow. Plan, execute, track, and verify tasks with checkpoint validation. For projects, automation, and ongoing operations.",
"filePath": "/home/starmen1265/.openclaw/skills/clawlist/SKILL.md",
"baseDir": "/home/starmen1265/.openclaw/skills/clawlist",
"source": "openclaw-managed",
"disableModelInvocation": false
}
],
"version": 0
},
"sessionFile": "/home/starmen1265/.openclaw/agents/haonan/sessions/b197e49b-1512-4f90-bc88-eeb888031d25.jsonl",
"contextTokens": 200000,
"modelProvider": "zhipu",
"model": "glm-5",
"abortedLastRun": false,
"inputTokens": 14474,
"outputTokens": 6775,
"totalTokens": 23402,
"totalTokensFresh": true,
"cacheRead": 572992,
"cacheWrite": 0
},
"agent:haonan:subagent:4ab88429-06d1-4174-88a3-f2cf8e0302cb": {
"sessionId": "60fcc8db-4ea9-4a1c-a586-d4a0aa4b7070",
"updatedAt": 1773038828925,
"spawnDepth": 1,
"deliveryContext": {
"channel": "feishu"
},
"lastChannel": "feishu",
"label": "review-1-code",
"spawnedBy": "agent:haonan:main",
"channel": "feishu",
"skillsSnapshot": {
"prompt": "\n\nThe following skills provide specialized instructions for specific tasks.\nUse the read tool to load a skill's file when the task matches its description.\nWhen a skill file references a relative path, resolve it against the skill directory (parent of SKILL.md / dirname of the path) and use that absolute path in tool commands.\n\n<available_skills>\n <skill>\n <name>capability-evolver</name>\n <description>A self-evolution engine for AI agents. Analyzes runtime history to identify improvements and applies protocol-constrained evolution.</description>\n <location>~/.openclaw/skills/capability-evolver/SKILL.md</location>\n </skill>\n <skill>\n <name>clawlist</name>\n <description>MUST use for any multi-step project, long-running task, or infinite monitoring workflow. Plan, execute, track, and verify tasks with checkpoint validation. For projects, automation, and ongoing operations.</description>\n <location>~/.openclaw/skills/clawlist/SKILL.md</location>\n </skill>\n</available_skills>",
"skills": [
{
"name": "capability-evolver"
},
{
"name": "clawlist"
}
],
"skillFilter": [
"clawlist",
"capability-evolver",
"self-improving-agent"
],
"resolvedSkills": [
{
"name": "capability-evolver",
"description": "A self-evolution engine for AI agents. Analyzes runtime history to identify improvements and applies protocol-constrained evolution.",
"filePath": "/home/starmen1265/.openclaw/skills/capability-evolver/SKILL.md",
"baseDir": "/home/starmen1265/.openclaw/skills/capability-evolver",
"source": "openclaw-managed",
"disableModelInvocation": false
},
{
"name": "clawlist",
"description": "MUST use for any multi-step project, long-running task, or infinite monitoring workflow. Plan, execute, track, and verify tasks with checkpoint validation. For projects, automation, and ongoing operations.",
"filePath": "/home/starmen1265/.openclaw/skills/clawlist/SKILL.md",
"baseDir": "/home/starmen1265/.openclaw/skills/clawlist",
"source": "openclaw-managed",
"disableModelInvocation": false
}
],
"version": 0
},
"sessionFile": "/home/starmen1265/.openclaw/agents/haonan/sessions/60fcc8db-4ea9-4a1c-a586-d4a0aa4b7070.jsonl",
"contextTokens": 200000,
"modelProvider": "zhipu",
"model": "glm-5",
"abortedLastRun": false,
"inputTokens": 7448,
"outputTokens": 1143,
"totalTokens": 17265,
"totalTokensFresh": true,
"cacheRead": 53568,
"cacheWrite": 0
},
"agent:haonan:subagent:0e3d2373-fae5-4594-afe0-74d0905c6f12": {
"sessionId": "b84b460f-ff03-4095-a8bd-53e855c12f31",
"updatedAt": 1773038816835,
"spawnDepth": 1,
"deliveryContext": {
"channel": "feishu"
},
"lastChannel": "feishu",
"label": "review-2-docs",
"spawnedBy": "agent:haonan:main",
"channel": "feishu",
"skillsSnapshot": {
"prompt": "\n\nThe following skills provide specialized instructions for specific tasks.\nUse the read tool to load a skill's file when the task matches its description.\nWhen a skill file references a relative path, resolve it against the skill directory (parent of SKILL.md / dirname of the path) and use that absolute path in tool commands.\n\n<available_skills>\n <skill>\n <name>capability-evolver</name>\n <description>A self-evolution engine for AI agents. Analyzes runtime history to identify improvements and applies protocol-constrained evolution.</description>\n <location>~/.openclaw/skills/capability-evolver/SKILL.md</location>\n </skill>\n <skill>\n <name>clawlist</name>\n <description>MUST use for any multi-step project, long-running task, or infinite monitoring workflow. Plan, execute, track, and verify tasks with checkpoint validation. For projects, automation, and ongoing operations.</description>\n <location>~/.openclaw/skills/clawlist/SKILL.md</location>\n </skill>\n</available_skills>",
"skills": [
{
"name": "capability-evolver"
},
{
"name": "clawlist"
}
],
"skillFilter": [
"clawlist",
"capability-evolver",
"self-improving-agent"
],
"resolvedSkills": [
{
"name": "capability-evolver",
"description": "A self-evolution engine for AI agents. Analyzes runtime history to identify improvements and applies protocol-constrained evolution.",
"filePath": "/home/starmen1265/.openclaw/skills/capability-evolver/SKILL.md",
"baseDir": "/home/starmen1265/.openclaw/skills/capability-evolver",
"source": "openclaw-managed",
"disableModelInvocation": false
},
{
"name": "clawlist",
"description": "MUST use for any multi-step project, long-running task, or infinite monitoring workflow. Plan, execute, track, and verify tasks with checkpoint validation. For projects, automation, and ongoing operations.",
"filePath": "/home/starmen1265/.openclaw/skills/clawlist/SKILL.md",
"baseDir": "/home/starmen1265/.openclaw/skills/clawlist",
"source": "openclaw-managed",
"disableModelInvocation": false
}
],
"version": 0
},
"sessionFile": "/home/starmen1265/.openclaw/agents/haonan/sessions/b84b460f-ff03-4095-a8bd-53e855c12f31.jsonl",
"contextTokens": 200000,
"modelProvider": "zhipu",
"model": "glm-5",
"abortedLastRun": false,
"inputTokens": 9093,
"outputTokens": 719,
"totalTokens": 18843,
"totalTokensFresh": true,
"cacheRead": 56704,
"cacheWrite": 0
},
"agent:haonan:subagent:3256a590-a63b-4d8f-b811-14dedcaa71de": {
"sessionId": "70c4172e-bdff-4783-9f47-1282c9161d2e",
"updatedAt": 1773038858019,
"spawnDepth": 1,
"deliveryContext": {
"channel": "feishu"
},
"lastChannel": "feishu",
"label": "review-3-test",
"spawnedBy": "agent:haonan:main",
"channel": "feishu",
"skillsSnapshot": {
"prompt": "\n\nThe following skills provide specialized instructions for specific tasks.\nUse the read tool to load a skill's file when the task matches its description.\nWhen a skill file references a relative path, resolve it against the skill directory (parent of SKILL.md / dirname of the path) and use that absolute path in tool commands.\n\n<available_skills>\n <skill>\n <name>capability-evolver</name>\n <description>A self-evolution engine for AI agents. Analyzes runtime history to identify improvements and applies protocol-constrained evolution.</description>\n <location>~/.openclaw/skills/capability-evolver/SKILL.md</location>\n </skill>\n <skill>\n <name>clawlist</name>\n <description>MUST use for any multi-step project, long-running task, or infinite monitoring workflow. Plan, execute, track, and verify tasks with checkpoint validation. For projects, automation, and ongoing operations.</description>\n <location>~/.openclaw/skills/clawlist/SKILL.md</location>\n </skill>\n</available_skills>",
"skills": [
{
"name": "capability-evolver"
},
{
"name": "clawlist"
}
],
"skillFilter": [
"clawlist",
"capability-evolver",
"self-improving-agent"
],
"resolvedSkills": [
{
"name": "capability-evolver",
"description": "A self-evolution engine for AI agents. Analyzes runtime history to identify improvements and applies protocol-constrained evolution.",
"filePath": "/home/starmen1265/.openclaw/skills/capability-evolver/SKILL.md",
"baseDir": "/home/starmen1265/.openclaw/skills/capability-evolver",
"source": "openclaw-managed",
"disableModelInvocation": false
},
{
"name": "clawlist",
"description": "MUST use for any multi-step project, long-running task, or infinite monitoring workflow. Plan, execute, track, and verify tasks with checkpoint validation. For projects, automation, and ongoing operations.",
"filePath": "/home/starmen1265/.openclaw/skills/clawlist/SKILL.md",
"baseDir": "/home/starmen1265/.openclaw/skills/clawlist",
"source": "openclaw-managed",
"disableModelInvocation": false
}
],
"version": 0
},
"sessionFile": "/home/starmen1265/.openclaw/agents/haonan/sessions/70c4172e-bdff-4783-9f47-1282c9161d2e.jsonl",
"contextTokens": 200000,
"modelProvider": "zhipu",
"model": "glm-5",
"abortedLastRun": false,
"inputTokens": 8354,
"outputTokens": 1025,
"totalTokens": 18065,
"totalTokensFresh": true,
"cacheRead": 88384,
"cacheWrite": 0
},
"agent:haonan:subagent:49a814f6-a5fc-4872-815c-9b8e24f56177": {
"sessionId": "15e56762-4fc7-45a8-865c-b8429238ff06",
"updatedAt": 1773039182250,
"spawnDepth": 1,
"deliveryContext": {
"channel": "feishu"
},
"lastChannel": "feishu",
"label": "fix-cross-stats",
"spawnedBy": "agent:haonan:main",
"channel": "feishu",
"skillsSnapshot": {
"prompt": "\n\nThe following skills provide specialized instructions for specific tasks.\nUse the read tool to load a skill's file when the task matches its description.\nWhen a skill file references a relative path, resolve it against the skill directory (parent of SKILL.md / dirname of the path) and use that absolute path in tool commands.\n\n<available_skills>\n <skill>\n <name>capability-evolver</name>\n <description>A self-evolution engine for AI agents. Analyzes runtime history to identify improvements and applies protocol-constrained evolution.</description>\n <location>~/.openclaw/skills/capability-evolver/SKILL.md</location>\n </skill>\n <skill>\n <name>clawlist</name>\n <description>MUST use for any multi-step project, long-running task, or infinite monitoring workflow. Plan, execute, track, and verify tasks with checkpoint validation. For projects, automation, and ongoing operations.</description>\n <location>~/.openclaw/skills/clawlist/SKILL.md</location>\n </skill>\n</available_skills>",
"skills": [
{
"name": "capability-evolver"
},
{
"name": "clawlist"
}
],
"skillFilter": [
"clawlist",
"capability-evolver",
"self-improving-agent"
],
"resolvedSkills": [
{
"name": "capability-evolver",
"description": "A self-evolution engine for AI agents. Analyzes runtime history to identify improvements and applies protocol-constrained evolution.",
"filePath": "/home/starmen1265/.openclaw/skills/capability-evolver/SKILL.md",
"baseDir": "/home/starmen1265/.openclaw/skills/capability-evolver",
"source": "openclaw-managed",
"disableModelInvocation": false
},
{
"name": "clawlist",
"description": "MUST use for any multi-step project, long-running task, or infinite monitoring workflow. Plan, execute, track, and verify tasks with checkpoint validation. For projects, automation, and ongoing operations.",
"filePath": "/home/starmen1265/.openclaw/skills/clawlist/SKILL.md",
"baseDir": "/home/starmen1265/.openclaw/skills/clawlist",
"source": "openclaw-managed",
"disableModelInvocation": false
}
],
"version": 0
},
"sessionFile": "/home/starmen1265/.openclaw/agents/haonan/sessions/15e56762-4fc7-45a8-865c-b8429238ff06.jsonl",
"contextTokens": 200000,
"modelProvider": "zhipu",
"model": "glm-5",
"abortedLastRun": false,
"inputTokens": 18097,
"outputTokens": 7272,
"totalTokens": 26788,
"totalTokensFresh": true,
"cacheRead": 735488,
"cacheWrite": 0
},
"agent:haonan:subagent:7e637b77-b7f8-48d3-b325-78c7d0b71018": {
"sessionId": "f90f259a-6732-49b7-b9a3-c227fa6b9424",
"updatedAt": 1773039679096,
"spawnDepth": 1,
"deliveryContext": {
"channel": "feishu"
},
"lastChannel": "feishu",
"label": "security-audit",
"spawnedBy": "agent:haonan:main",
"channel": "feishu",
"skillsSnapshot": {
"prompt": "\n\nThe following skills provide specialized instructions for specific tasks.\nUse the read tool to load a skill's file when the task matches its description.\nWhen a skill file references a relative path, resolve it against the skill directory (parent of SKILL.md / dirname of the path) and use that absolute path in tool commands.\n\n<available_skills>\n <skill>\n <name>capability-evolver</name>\n <description>A self-evolution engine for AI agents. Analyzes runtime history to identify improvements and applies protocol-constrained evolution.</description>\n <location>~/.openclaw/skills/capability-evolver/SKILL.md</location>\n </skill>\n <skill>\n <name>clawlist</name>\n <description>MUST use for any multi-step project, long-running task, or infinite monitoring workflow. Plan, execute, track, and verify tasks with checkpoint validation. For projects, automation, and ongoing operations.</description>\n <location>~/.openclaw/skills/clawlist/SKILL.md</location>\n </skill>\n</available_skills>",
"skills": [
{
"name": "capability-evolver"
},
{
"name": "clawlist"
}
],
"skillFilter": [
"clawlist",
"capability-evolver",
"self-improving-agent"
],
"resolvedSkills": [
{
"name": "capability-evolver",
"description": "A self-evolution engine for AI agents. Analyzes runtime history to identify improvements and applies protocol-constrained evolution.",
"filePath": "/home/starmen1265/.openclaw/skills/capability-evolver/SKILL.md",
"baseDir": "/home/starmen1265/.openclaw/skills/capability-evolver",
"source": "openclaw-managed",
"disableModelInvocation": false
},
{
"name": "clawlist",
"description": "MUST use for any multi-step project, long-running task, or infinite monitoring workflow. Plan, execute, track, and verify tasks with checkpoint validation. For projects, automation, and ongoing operations.",
"filePath": "/home/starmen1265/.openclaw/skills/clawlist/SKILL.md",
"baseDir": "/home/starmen1265/.openclaw/skills/clawlist",
"source": "openclaw-managed",
"disableModelInvocation": false
}
],
"version": 0
},
"sessionFile": "/home/starmen1265/.openclaw/agents/haonan/sessions/f90f259a-6732-49b7-b9a3-c227fa6b9424.jsonl",
"contextTokens": 200000,
"modelProvider": "zhipu",
"model": "glm-5",
"abortedLastRun": false,
"inputTokens": 8423,
"outputTokens": 993,
"totalTokens": 18252,
"totalTokensFresh": true,
"cacheRead": 53888,
"cacheWrite": 0
},
"agent:haonan:subagent:04481c89-a8c4-4bfe-99d3-2f6dd3883092": {
"sessionId": "809eaaf8-435f-4056-869c-01224544fd1d",
"updatedAt": 1773040617015,
"spawnDepth": 1,
"deliveryContext": {
"channel": "feishu"
},
"lastChannel": "feishu",
"label": "fix-security",
"spawnedBy": "agent:haonan:main",
"channel": "feishu",
"skillsSnapshot": {
"prompt": "\n\nThe following skills provide specialized instructions for specific tasks.\nUse the read tool to load a skill's file when the task matches its description.\nWhen a skill file references a relative path, resolve it against the skill directory (parent of SKILL.md / dirname of the path) and use that absolute path in tool commands.\n\n<available_skills>\n <skill>\n <name>capability-evolver</name>\n <description>A self-evolution engine for AI agents. Analyzes runtime history to identify improvements and applies protocol-constrained evolution.</description>\n <location>~/.openclaw/skills/capability-evolver/SKILL.md</location>\n </skill>\n <skill>\n <name>clawlist</name>\n <description>MUST use for any multi-step project, long-running task, or infinite monitoring workflow. Plan, execute, track, and verify tasks with checkpoint validation. For projects, automation, and ongoing operations.</description>\n <location>~/.openclaw/skills/clawlist/SKILL.md</location>\n </skill>\n</available_skills>",
"skills": [
{
"name": "capability-evolver"
},
{
"name": "clawlist"
}
],
"skillFilter": [
"clawlist",
"capability-evolver",
"self-improving-agent"
],
"resolvedSkills": [
{
"name": "capability-evolver",
"description": "A self-evolution engine for AI agents. Analyzes runtime history to identify improvements and applies protocol-constrained evolution.",
"filePath": "/home/starmen1265/.openclaw/skills/capability-evolver/SKILL.md",
"baseDir": "/home/starmen1265/.openclaw/skills/capability-evolver",
"source": "openclaw-managed",
"disableModelInvocation": false
},
{
"name": "clawlist",
"description": "MUST use for any multi-step project, long-running task, or infinite monitoring workflow. Plan, execute, track, and verify tasks with checkpoint validation. For projects, automation, and ongoing operations.",
"filePath": "/home/starmen1265/.openclaw/skills/clawlist/SKILL.md",
"baseDir": "/home/starmen1265/.openclaw/skills/clawlist",
"source": "openclaw-managed",
"disableModelInvocation": false
}
],
"version": 0
},
"sessionFile": "/home/starmen1265/.openclaw/agents/haonan/sessions/809eaaf8-435f-4056-869c-01224544fd1d.jsonl"
}
}
@@ -337,6 +337,12 @@ def clear_stats(confirm: bool = False) -> bool:
if not confirm:
return False
# 安全检查:验证管理员令牌
admin_token = os.getenv("ADMIN_TOKEN")
if not admin_token:
logger.error("清空统计数据需要设置 ADMIN_TOKEN 环境变量")
return False
try:
if STATS_FILE.exists():
STATS_FILE.unlink()