{
  "schemaVersion": "1.0",
  "item": {
    "slug": "session-history-enhancements",
    "name": "Session History Enhanced",
    "source": "tencent",
    "type": "skill",
    "category": "通讯协作",
    "sourceUrl": "https://clawhub.ai/maverick-software/session-history-enhancements",
    "canonicalUrl": "https://clawhub.ai/maverick-software/session-history-enhancements",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/session-history-enhancements",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=session-history-enhancements",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "references/backend-protocol-schemas.ts.txt",
      "references/backend-history-migration.ts.txt",
      "references/backend-session-archive.ts.txt",
      "references/frontend-state-changes.txt",
      "references/backend-rpc-handlers.ts.txt"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/session-history-enhancements"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/session-history-enhancements",
    "agentPageUrl": "https://openagent3.xyz/skills/session-history-enhancements/agent",
    "manifestUrl": "https://openagent3.xyz/skills/session-history-enhancements/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/session-history-enhancements/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Session History",
        "body": "Transforms OpenClaw's single-slot session model into a multi-session history system with SQLite indexing, archive/restore, and full dashboard UI."
      },
      {
        "title": "Architecture",
        "body": "~/.openclaw/agents/{agentId}/sessions/\n├── sessions.json           # routing table (unchanged)\n├── history.db              # SQLite index (auto-created)\n├── {activeSessionId}.jsonl # active transcript\n└── archive/\n    └── {sessionId}.jsonl   # archived transcripts\n\nLifecycle:\n\nOn /new or session reset → old transcript moves to archive/, metadata indexed in SQLite\nOn archive (from UI) → session deactivated, transcript archived, indexed, removed from store\nOn resume → transcript moves back from archive/, SQLite status flips to active\nMigration auto-runs on first access: indexes all orphaned .jsonl files"
      },
      {
        "title": "Backend (new files)",
        "body": "FileReferencePurposesrc/config/sessions/history-db.tsreferences/backend-history-db.ts.txtSQLite CRUD operationssrc/config/sessions/history-migration.tsreferences/backend-history-migration.ts.txtOne-time migration + initHistoryDbWithMigrationsrc/gateway/session-archive.tsreferences/backend-session-archive.ts.txtArchive/restore logic"
      },
      {
        "title": "Backend (modified files)",
        "body": "FileReferencePurposesrc/gateway/protocol/schema/sessions.tsreferences/backend-protocol-schemas.ts.txtTypeBox schemas for new RPCssrc/gateway/server-methods/sessions.tsreferences/backend-rpc-handlers.ts.txt5 RPC handler implementations"
      },
      {
        "title": "Frontend (modified files)",
        "body": "FileReferencePurposeui/src/ui/controllers/sessions.tsreferences/frontend-controllers-sessions.ts.txtFull controller with archived session CRUD + paginationui/src/ui/views/sessions.tsreferences/frontend-views-sessions.ts.txtFull view with Session History section, Archive button, paginationui/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"
      },
      {
        "title": "Installation",
        "body": "See references/INSTALL.md for step-by-step instructions."
      },
      {
        "title": "RPC Endpoints",
        "body": "MethodParamsPurposesessions.archivekeyArchive active session — deactivates, moves transcript, indexes in SQLite, removes from storesessions.archivedagentId?, limit?, offset?, search?, status?List archived sessions with pagination and searchsessions.resumesessionId, agentId?Restore archived session to activesessions.renamesessionId, displayName, agentId?Update session display namesessions.deleteArchivedsessionId, agentId?, deleteTranscript?Delete archived session + optional transcript"
      },
      {
        "title": "Sessions Page",
        "body": "Active Sessions grid — with Archive button (hidden for Main Session), History, Delete\nSession History section — archived sessions with search, Resume/Rename/Delete buttons\nPagination — both sections have 10/20/25 page-size dropdown + Prev/Next"
      },
      {
        "title": "Chat Dropdown",
        "body": "Filters out cron/subagent/openai sessions (only user-facing sessions shown)\n\"Recent Sessions\" <optgroup> with 10 most recent archived sessions\n\"📋 View All Sessions\" link navigates to Sessions tab\nSelecting an archived session auto-resumes it"
      },
      {
        "title": "Key Design Decisions",
        "body": "SQLite over JSON: Supports search, pagination, and indexing without loading everything into memory\nServer-side pagination for archives: Pass limit/offset to sessions.archived RPC\nClient-side pagination for live sessions: Slice the already-loaded array\nsessionId-based dropdown values: Archived sessions all share the same sessionKey (agent:main:main), so the dropdown uses __archived__:{sessionId} as the option value\nsessions.archive reuses sessions.delete param schema: Both need just { key }"
      },
      {
        "title": "Common Pitfalls",
        "body": "RPC handler signature: Must use ({ params, respond }) destructuring, not (request, respond)\nassertValidParams: Takes 4 args: (params, validator, \"method.name\", respond)\nSessions directory: Use resolveSessionTranscriptsDirForAgent(agentId) — NOT resolveGatewaySessionStoreTarget(config)\nPagination on every load: All loadArchivedSessions calls must pass limit and offset\nPage reset: Changing page size or search query must reset page to 1\nArchived session dropdown filtering: Filter by sessionId, not sessionKey (all archived sessions share the same sessionKey)"
      }
    ],
    "body": "Session History\n\nTransforms OpenClaw's single-slot session model into a multi-session history system with SQLite indexing, archive/restore, and full dashboard UI.\n\nArchitecture\n~/.openclaw/agents/{agentId}/sessions/\n├── sessions.json           # routing table (unchanged)\n├── history.db              # SQLite index (auto-created)\n├── {activeSessionId}.jsonl # active transcript\n└── archive/\n    └── {sessionId}.jsonl   # archived transcripts\n\n\nLifecycle:\n\nOn /new or session reset → old transcript moves to archive/, metadata indexed in SQLite\nOn archive (from UI) → session deactivated, transcript archived, indexed, removed from store\nOn resume → transcript moves back from archive/, SQLite status flips to active\nMigration auto-runs on first access: indexes all orphaned .jsonl files\nFile Map\nBackend (new files)\nFile\tReference\tPurpose\nsrc/config/sessions/history-db.ts\treferences/backend-history-db.ts.txt\tSQLite CRUD operations\nsrc/config/sessions/history-migration.ts\treferences/backend-history-migration.ts.txt\tOne-time migration + initHistoryDbWithMigration\nsrc/gateway/session-archive.ts\treferences/backend-session-archive.ts.txt\tArchive/restore logic\nBackend (modified files)\nFile\tReference\tPurpose\nsrc/gateway/protocol/schema/sessions.ts\treferences/backend-protocol-schemas.ts.txt\tTypeBox schemas for new RPCs\nsrc/gateway/server-methods/sessions.ts\treferences/backend-rpc-handlers.ts.txt\t5 RPC handler implementations\nFrontend (modified files)\nFile\tReference\tPurpose\nui/src/ui/controllers/sessions.ts\treferences/frontend-controllers-sessions.ts.txt\tFull controller with archived session CRUD + pagination\nui/src/ui/views/sessions.ts\treferences/frontend-views-sessions.ts.txt\tFull view with Session History section, Archive button, pagination\nui/src/ui/app-view-state.ts\treferences/frontend-state-changes.txt\tState + app.ts + app-render.ts + app-chat.ts + app-settings.ts + app-render.helpers.ts wiring\nInstallation\n\nSee references/INSTALL.md for step-by-step instructions.\n\nRPC Endpoints\nMethod\tParams\tPurpose\nsessions.archive\tkey\tArchive active session — deactivates, moves transcript, indexes in SQLite, removes from store\nsessions.archived\tagentId?, limit?, offset?, search?, status?\tList archived sessions with pagination and search\nsessions.resume\tsessionId, agentId?\tRestore archived session to active\nsessions.rename\tsessionId, displayName, agentId?\tUpdate session display name\nsessions.deleteArchived\tsessionId, agentId?, deleteTranscript?\tDelete archived session + optional transcript\nUI Features\nSessions Page\nActive Sessions grid — with Archive button (hidden for Main Session), History, Delete\nSession History section — archived sessions with search, Resume/Rename/Delete buttons\nPagination — both sections have 10/20/25 page-size dropdown + Prev/Next\nChat Dropdown\nFilters out cron/subagent/openai sessions (only user-facing sessions shown)\n\"Recent Sessions\" <optgroup> with 10 most recent archived sessions\n\"📋 View All Sessions\" link navigates to Sessions tab\nSelecting an archived session auto-resumes it\nKey Design Decisions\nSQLite over JSON: Supports search, pagination, and indexing without loading everything into memory\nServer-side pagination for archives: Pass limit/offset to sessions.archived RPC\nClient-side pagination for live sessions: Slice the already-loaded array\nsessionId-based dropdown values: Archived sessions all share the same sessionKey (agent:main:main), so the dropdown uses __archived__:{sessionId} as the option value\nsessions.archive reuses sessions.delete param schema: Both need just { key }\nCommon Pitfalls\nRPC handler signature: Must use ({ params, respond }) destructuring, not (request, respond)\nassertValidParams: Takes 4 args: (params, validator, \"method.name\", respond)\nSessions directory: Use resolveSessionTranscriptsDirForAgent(agentId) — NOT resolveGatewaySessionStoreTarget(config)\nPagination on every load: All loadArchivedSessions calls must pass limit and offset\nPage reset: Changing page size or search query must reset page to 1\nArchived session dropdown filtering: Filter by sessionId, not sessionKey (all archived sessions share the same sessionKey)"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/maverick-software/session-history-enhancements",
    "publisherUrl": "https://clawhub.ai/maverick-software/session-history-enhancements",
    "owner": "maverick-software",
    "version": "1.0.1",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/session-history-enhancements",
    "downloadUrl": "https://openagent3.xyz/downloads/session-history-enhancements",
    "agentUrl": "https://openagent3.xyz/skills/session-history-enhancements/agent",
    "manifestUrl": "https://openagent3.xyz/skills/session-history-enhancements/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/session-history-enhancements/agent.md"
  }
}