compact_transcript
Compact session transcripts by pairing tool calls with results and dropping spent pairs via a semantic judge, while kept messages stay verbatim for smaller context.
Instructions
Tool-call compaction for a session transcript: pairs each tool call with its result, pins the first and newest messages, and drops the pairs a semantic judge says are spent — kept messages stay verbatim, so nothing is summarized. Default 'auto' is the local specialist-v3 ranker (offline, no key); 'jev' is remote and needs TYPESAFE_API_KEY. Every failure keeps the call.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"messages": "<messages>",
"question": "<question>"
},
"name": "compact_transcript"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ledger | No | Opt-in: append one line of counts (never text or paths) for a pass that stands to the local ledger (~/.cache/lcc/ledger.jsonl, LCC_LEDGER_PATH). LCC_LEDGER=1 turns it on for every call. | |
| trigger | No | Request-log label only: 'idle' for the plugin's idle stash. | |
| messages | Yes | Messages with role/text and toolUses/toolResults blocks (Claude Code hook shape) or tool_calls/tool_results. | |
| provider | No | 'auto' (default) and 'specialist-v3' use the local CPU ranker (no key, no network; ranks, does not judge). 'jev' is the remote TypeSafe System 1, needs TYPESAFE_API_KEY, and runs only when named. 'laya' is DEPRECATED (local, needs the [laya] extra) and runs only when named. 'rules' is an offline deterministic policy (no key, no model); see rules_mode. | auto |
| question | Yes | ||
| jev_model | No | jev-latest | |
| threshold | No | ||
| disk_check | No | ||
| laya_model | No | ||
| ref_blocks | No | ref_unchanged down to the block: a changed message comes back as {'ref': <input index>, 'toolUses': [<kept call index>...], 'toolResults': [<kept result index> | {'ref', 'tool_use_id', 'text', 'head'?, 'tail'?}...]}, a replaced result being original[:head] + text + original[-tail:] (UTF-16 units). | |
| rules_mode | No | Only for provider 'rules'. 'lossless' replaces a tool result with a pointer only when its text is kept verbatim in a later result, and verifies it. 'recoverable' also replaces old file reads (of files not written later) and read-only allowlisted command outputs with a re-read/re-run pointer, and verifies it. 'stashed' removes what 'lossy' drops or trims and 'recoverable' replaces, after saving the exact bytes to a local stash; the pointer names a 'recall' id. 'lossy' is EXPERIMENTAL (trims and drops outputs; failed blind audits v0.4 and v0.5). | lossless |
| cache_state | No | Provider prompt-cache state for the report's cache_effect (unknown is priced as warm). The idle stash sends 'cold'. | unknown |
| max_workers | No | ||
| min_reduction | No | ||
| ref_unchanged | No | Return each message the pass left unchanged as {'ref': <input index>} and leave per-call decisions out, for size-capped callers. | |
| stash_pointer | No | rules_mode 'stashed' only. 'lean' adds the exit status, error type or failing test and the first line to each pointer (about +13 tokens each). 'head' is 'lean' with the first 160 characters across lines instead of the first line. | plain |
| ledger_session | No | Session id; the ledger and the stash sidecars store only its truncated SHA-256. | |
| workspace_root | No | rules_mode 'recoverable' only: the session's working directory. When set (and disk_check on), the disk decides file pointers: a read is replaced iff the file inside it (or its own directory) currently holds exactly the removed content, even after later writes. | |
| idle_gap_bucket | No | Request-log label only: the idle gap bucket, e.g. '1h-2h'. | |
| preserve_recent | No | ||
| trim_head_chars | No | ||
| max_state_tokens | No | ||
| max_request_tokens | No | ||
| allow_command_pointers | No | rules_mode 'recoverable' only: also replace allowlisted read-only command outputs with a re-run pointer. Off by default. |