lcc — Local Context Compiler
v1.2.0Compact agent context verbatim, offline: cut spent tool outputs, recall them by hash.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
compact
Drop context blocks irrelevant to an objective. Default provider mechanical is fully offline (no key, no network); laya is offline semantic (needs the [laya] extra, else honest mechanical fallback); jev needs TYPESAFE_API_KEY. Fail-safe: failures keep content.
| Parameter | Type | Description |
|---|---|---|
question * | string | |
text * | string | |
provider | string | |
threshold | number |
compact_transcript
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.
| Parameter | Type | Description |
|---|---|---|
messages * | array | Messages with role/text and toolUses/toolResults blocks (Claude Code hook shape) or tool_calls/tool_results. |
question * | string | |
allow_command_pointers | boolean | rules_mode 'recoverable' only: also replace allowlisted read-only command outputs with a re-run pointer. Off by default. |
disk_check | boolean | |
idle_gap_bucket | string | Request-log label only: the idle gap bucket, e.g. '1h-2h'. |
jev_model | string | |
laya_model | string | |
max_request_tokens | integer | |
max_state_tokens | integer | |
max_workers | integer | |
min_reduction | number | |
preserve_recent | integer | |
provider | string | '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. 'lay… |
ref_blocks | boolean | 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'?… |
ref_unchanged | boolean | Return each message the pass left unchanged as {'ref': <input index>} and leave per-call decisions out, for size-capped callers. |
rules_mode | string | 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… |
threshold | number | |
trigger | string | Request-log label only: 'idle' for the plugin's idle stash. |
trim_head_chars | integer | |
workspace_root | string | 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… |
inspect
Read-only diagnostic inspection of a text: tokens, structure, duplication, cleanup projection, and recommendation. Offline.
| Parameter | Type | Description |
|---|---|---|
text * | string |
prepare
Inspect-first deterministic prompt preparation: runs inspection, then lexical selection + safe optimization only when recommended. Never summarizes or paraphrases. Offline.
| Parameter | Type | Description |
|---|---|---|
text * | string | |
question | string |
explain
Explain a relevance-compaction report (as produced by compact): why every block was kept, trimmed, or dropped. Never re-runs, never touches the network.
| Parameter | Type | Description |
|---|---|---|
report * | object | |
limit | integer | |
only | string | |
source_text | string |
recall
Return a tool output that compact_transcript (rules_mode 'stashed') replaced with '[removed: N tokens · lcc recall <id>]'. The bytes are re-hashed on read, so the text is exactly what was removed. Offline, local stash only.
| Parameter | Type | Description |
|---|---|---|
id * | string | The hex id from the pointer. |
lines | string | Optional 1-based range 'a-b'. |
intake
Intake triage for raw prompt input: readiness, intent, clarifying questions, assumptions, and a compiled prompt. Offline by default.
| Parameter | Type | Description |
|---|---|---|
text * | string | |
question | string |