← 返回 Skills 市场
maverick-software

Archived Session Management

作者 maverick-software · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
96
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install archived-session-management
功能描述
Implement, extend, or repair archived-session browsing in OpenClaw Control UI. Use when adding or fixing Archived Sessions / Recent Archived Sessions UI, arc...
使用说明 (SKILL.md)

Archived Session Management

Implement archived-session UX as an end-to-end feature, not a single-button patch. Archived session work spans the Control UI, gateway RPC handlers, transcript file moves, the session_history SQLite index, and the live sessions.json store.

Core workflow

  1. Inspect the whole chain first

    • UI list/search rendering
    • gateway methods for sessions.archived, sessions.resume, sessions.deleteArchived
    • archive/restore helpers in src/gateway/session-archive.ts
    • history DB filters in src/config/sessions/history-db.ts
    • live session store behavior in sessions.json
  2. Treat these as separate failure classes

    • archived list cannot find a real session
    • archived list finds the session but resume fails
    • resume works but opens the wrong live session
    • session vanishes from both Live and Archived due to DB/store drift
  3. Fix backend truth before UI polish

    • Make archived search and restore semantics correct.
    • Then wire or refine UI buttons, copy, filters, and pagination.
  4. Reconcile legacy/inconsistent rows when needed

    • Archived session features often fail because the DB, transcript path, and live store disagree.
    • Be tolerant in reads, then repair writes so future rows stay consistent.

Required implementation areas

1. Archived-session search

Archived search must match more than just friendly labels. Include at least:

  • sessionId
  • sessionKey
  • displayName
  • firstMessage
  • agentId
  • channel
  • chatType
  • status
  • filePath

When filtering archived sessions, do not rely on status = 'archived' alone. Legacy rows can still be archived-discoverable when:

  • archivedAt IS NOT NULL, or
  • filePath points into /sessions/archive/

Read references/implementation-map.md before editing the query layer.

2. Restore / resume behavior

Restoring an archived session must be idempotent.

Handle all three cases:

  • transcript exists only in archive → move it back to active sessions dir
  • transcript already exists in active sessions dir → do not fail; repair metadata and continue
  • transcript exists nowhere → return not found

When restore succeeds, update the history row so it reflects the active transcript path and active status.

3. Rebind restored sessions into a unique live key

Do not resume old archived main sessions into agent:main:main.

Older rows often store that key, which causes the UI to jump back into the current main thread instead of the restored transcript.

Bind restored transcripts to a distinct live key such as:

  • agent:\x3CagentId>:archive-\x3CsessionId>

Then write that binding into the live session store so the session actually appears in Live and can be opened by URL.

4. UI expectations

Archived-session UI should include:

  • Archived tab / section
  • search box
  • Resume button
  • Delete action for archived transcripts when supported
  • loading / empty states that are specific enough to debug

If the repo already has the UI shell, wire it to the corrected backend instead of rebuilding it.

Debugging checklist

When a user says an archived session is broken, verify all four:

  1. History row exists in session_history
  2. Transcript file exists at the path the row expects, or at the active fallback path
  3. History row status/path fields are coherent
  4. Live store contains a session binding after resume

If a session is in neither Live nor Archived, suspect DB/store drift immediately.

File map

Read references/implementation-map.md for the concrete OpenClaw file map, bug patterns, and example fixes.

Delivery standard

When work is complete, report:

  • what failed
  • which layer was wrong (UI, restore logic, DB filter, store binding, or mixed state)
  • what changed
  • whether a rebuild / gateway restart is needed
安全使用建议
This is a developer-facing implementation guide and appears coherent with its stated purpose. Before applying fixes, verify the skill's source (origin is unknown), work in a development or staging environment, and back up session DBs and transcript files (history.db, sessions.json, transcripts) before making changes. Review any code changes produced against your repo's security standards, avoid running unreviewed scripts, and ensure migrations/rebinds are tested so live user data isn't lost. If you need higher assurance, ask the author for provenance or a code diff/PR rather than following instructions from an unverified package.
功能分析
Type: OpenClaw Skill Name: archived-session-management Version: 1.0.0 The skill bundle provides legitimate instructions and technical references for implementing and repairing archived session management within the OpenClaw framework. The instructions in SKILL.md and references/implementation-map.md guide the agent to fix specific bugs related to session search, restoration, and database reconciliation in files such as src/config/sessions/history-db.ts and src/gateway/session-archive.ts. No evidence of malicious intent, data exfiltration, or unauthorized execution was found.
能力评估
Purpose & Capability
The name/description match the content: the instructions focus on archived-session search, restore, rebind, and UI wiring. No unrelated environment variables, binaries, or external services are requested.
Instruction Scope
SKILL.md explicitly directs inspection and fixes for DB queries, gateway methods, transcript file paths, and the live session store — all directly relevant to archived-session behavior. It does instruct reading and modifying local files/DB rows (session_history/history.db, sessions.json, transcript dirs), which is appropriate given the stated purpose.
Install Mechanism
There is no install spec or bundled code; the skill is instruction-only so nothing will be downloaded or written to disk by an installer.
Credentials
The skill requests no environment variables, credentials, or config paths beyond the project files it describes. The guidance to read/repair local DB and file paths is proportional to implementing archived-session behavior.
Persistence & Privilege
The skill does not request permanent/autonomous privileges (always is false) and does not instruct modifying other skills or global agent settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install archived-session-management
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /archived-session-management 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release: archived-session search, restore/resume flow, live session rebind, DB/store reconciliation, and OpenClaw Control UI wiring guidance.
元数据
Slug archived-session-management
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Archived Session Management 是什么?

Implement, extend, or repair archived-session browsing in OpenClaw Control UI. Use when adding or fixing Archived Sessions / Recent Archived Sessions UI, arc... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 96 次。

如何安装 Archived Session Management?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install archived-session-management」即可一键安装,无需额外配置。

Archived Session Management 是免费的吗?

是的,Archived Session Management 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Archived Session Management 支持哪些平台?

Archived Session Management 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Archived Session Management?

由 maverick-software(@maverick-software)开发并维护,当前版本 v1.0.0。

💬 留言讨论