feat(session): add used() endpoint for context/skill tracking#684
feat(session): add used() endpoint for context/skill tracking#684
Conversation
Add POST /sessions/{session_id}/used API to record actually used
contexts and skills, enabling active_count tracking on commit.
Overhaul all plugin installation docs: simplify to npm global install,
add OpenClaw >= 2026.3.12 compatibility warning, expand troubleshooting
and configuration reference.
Co-Authored-By: Claude Opus 4.6
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
Description
Add a new
POST /api/v1/sessions/{session_id}/usedendpoint that records actually used contexts and skills during a session. Whencommit()is called,active_countis updated based on this usage data. Also overhauls all plugin installation documentation with simplified flows, compatibility warnings, and expanded troubleshooting.Related Issue
Type of Change
Changes Made
POST /{session_id}/usedAPI endpoint insessions.pywithUsedRequestmodel (acceptscontextsandskillfields)used()API documentation in both English and Chinese session docsREADME.md: restructure with table of contents, one-click installation, configuration reference, daily usage, web console, troubleshooting, and uninstallation sectionsINSTALL.mdandINSTALL-ZH.md: simplify to npm global package, add curl one-click method, add OpenClaw >= 2026.3.12 compatibility warning, add Plugin 2.0 announcement, expand troubleshootingINSTALL-AGENT.md: replace repo-clone workflow with npm global installTesting
Checklist
Screenshots (if applicable)
N/A
Additional Notes
The
used()endpoint is designed to be called betweenadd-message()andcommit()in the session lifecycle, allowing clients to report which loaded contexts and skills were actually consumed during the conversation turn.🤖 Generated with Claude Code