Token导航 LogoToken导航TokenDH.com
研究检索只读clawhub未标认证来源可访问clear审计提醒

session-history-enhancements会话历史记录增强

Agent Skill

session-history-enhancements 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

12,807

周安装

539

GitHub Stars

公开资料未说明

下载量

4,484
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:session-history-enhancements(会话历史记录增强)
来源仓库:https://github.com/maverick-software/session-history-enhancements
安装命令:
openclaw skills install session-history-enhancements
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install session-history-enhancements

简介

会话历史增强系统提供持久化、可浏览的聊天会话管理。

  • 适合具有 SQLite 索引、存档恢复与分页 UI 的高级历史访问。
  • 支持迁移与聊天记录整合,改善大规模会话检索体验。
  • 安装前请确认数据库连接权限,避免因路径错误无法初始化。
  • session-history-enhancements 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

name
session-history
description
Session history system for OpenClaw — persistent, browsable, resumable chat sessions with SQLite index, archive/restore, migration, paginated UI, and chat dropdown integration. Use when: (1) adding session archival/indexing to OpenClaw, (2) implementing session browsing/search in the dashboard, (3) adding session resume/rename/delete, (4) archiving active sessions from the dashboard, (5) adding pagination to session lists, or (6) integrating recent sessions into the chat dropdown.

Session History

Transforms OpenClaw's single-slot session model into a multi-session history system with SQLite indexing, archive/restore, and full dashboard UI.

Architecture

~/.openclaw/agents/{agentId}/sessions/
├── sessions.json           # routing table (unchanged)
├── history.db              # SQLite index (auto-created)
├── {activeSessionId}.jsonl # active transcript
└── archive/
    └── {sessionId}.jsonl   # archived transcripts

Lifecycle:

  • On /new or session reset → old transcript moves to archive/, metadata indexed in SQLite
  • On archive (from UI) → session deactivated, transcript archived, indexed, removed from store
  • On resume → transcript moves back from archive/, SQLite status flips to active
  • Migration auto-runs on first access: indexes all orphaned .jsonl files

File Map

Backend (new files)

FileReferencePurpose
src/config/sessions/history-db.tsreferences/backend-history-db.ts.txtSQLite CRUD operations
src/config/sessions/history-migration.tsreferences/backend-history-migration.ts.txtOne-time migration + initHistoryDbWithMigration
src/gateway/session-archive.tsreferences/backend-session-archive.ts.txtArchive/restore logic

Backend (modified files)

FileReferencePurpose
src/gateway/protocol/schema/sessions.tsreferences/backend-protocol-schemas.ts.txtTypeBox schemas for new RPCs
src/gateway/server-methods/sessions.tsreferences/backend-rpc-handlers.ts.txt5 RPC handler implementations

Frontend (modified files)

FileReferencePurpose
ui/src/ui/controllers/sessions.tsreferences/frontend-controllers-sessions.ts.txtFull controller with archived session CRUD + pagination
ui/src/ui/views/sessions.tsreferences/frontend-views-sessions.ts.txtFull view with Session History section, Archive button, pagination
ui/src/ui/app-view-state.tsreferences/frontend-state-changes.txtState + app.ts + app-render.ts + app-chat.ts + app-settings.ts + app-render.helpers.ts wiring

Installation

See references/INSTALL.md for step-by-step instructions.

RPC Endpoints

MethodParamsPurpose
sessions.archivekeyArchive active session — deactivates, moves transcript, indexes in SQLite, removes from store
sessions.archivedagentId?, limit?, offset?, search?, status?List archived sessions with pagination and search
sessions.resumesessionId, agentId?Restore archived session to active
sessions.renamesessionId, displayName, agentId?Update session display name
sessions.deleteArchivedsessionId, agentId?, deleteTranscript?Delete archived session + optional transcript

UI Features

Sessions Page

  • Active Sessions grid — with Archive button (hidden for Main Session), History, Delete
  • Session History section — archived sessions with search, Resume/Rename/Delete buttons
  • Pagination — both sections have 10/20/25 page-size dropdown + Prev/Next

Chat Dropdown

  • Filters out cron/subagent/openai sessions (only user-facing sessions shown)
  • "Recent Sessions" <optgroup> with 10 most recent archived sessions
  • "📋 View All Sessions" link navigates to Sessions tab
  • Selecting an archived session auto-resumes it

Key Design Decisions

  • SQLite over JSON: Supports search, pagination, and indexing without loading everything into memory
  • Server-side pagination for archives: Pass limit/offset to sessions.archived RPC
  • Client-side pagination for live sessions: Slice the already-loaded array
  • sessionId-based dropdown values: Archived sessions all share the same sessionKey (agent:main:main), so the dropdown uses __archived__:{sessionId} as the option value
  • sessions.archive reuses sessions.delete param schema: Both need just { key }

Common Pitfalls

  1. RPC handler signature: Must use ({ params, respond }) destructuring, not (request, respond)
  2. assertValidParams: Takes 4 args: (params, validator, "method.name", respond)
  3. Sessions directory: Use resolveSessionTranscriptsDirForAgent(agentId) — NOT resolveGatewaySessionStoreTarget(config)
  4. Pagination on every load: All loadArchivedSessions calls must pass limit and offset
  5. Page reset: Changing page size or search query must reset page to 1
  6. Archived session dropdown filtering: Filter by sessionId, not sessionKey (all archived sessions share the same sessionKey)

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

72.28%
按下载量换算3,241

安全审计

VirusTotal

可疑

ClawScan

通过

Static analysis

未展示

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills