Repository navigation
Expand file tree
/
Copy pathplugin.config.json
More file actions
202 lines (202 loc) · 7.75 KB
/
Copy pathplugin.config.json
File metadata and controls
202 lines (202 loc) · 7.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
{
"name": "custom-compaction",
"displayName": "Custom Compaction",
"version": "0.8.3",
"description": "Replaces Claude Code's built-in compaction with a custom summarizer prompt and transcript layout; the summarizer can be any OpenAI- or Anthropic-compatible endpoint.",
"shortDescription": "Your own compaction summarizer",
"author": {
"name": "rjstone"
},
"homepage": "https://github.com/rjstone/custom-compaction-plugin",
"repository": "https://github.com/rjstone/custom-compaction-plugin",
"license": "MIT",
"keywords": [
"compaction",
"summarizer",
"context",
"mod"
],
"icon": "assets/icon.png",
"category": "Developer Tools",
"harnesses": {
"agentPlugins": false,
"claude": true,
"cursor": false,
"antigravity": false,
"gemini": false,
"copilotExtras": false,
"opencodeCatalog": false,
"opencode": false,
"pi": false,
"kimi": false,
"muse": false
},
"ci": {
"repo": "rjstone/plugin-marketplace",
"ref": "main",
"templateRepo": "rjstone/harness-plugin-template",
"pluginTests": true,
"notifyMarketplace": true
},
"changelog": {
"commitPreprocessors": [
{
"pattern": "^custom-compaction ([0-9]+\\.[0-9]+\\.[0-9]+)(?: [^:\\n]*)?: ([^\\n]*)",
"replace": "${2} (${1})"
}
]
},
"claude": {
"userConfig": {
"mode": {
"type": "string",
"title": "Mode",
"description": "replace: our own summarizer writes the new transcript. steer: built-in compaction with our instructions. off: built-in, untouched.",
"options": [
"replace",
"steer",
"off"
],
"default": "replace"
},
"autoTrigger": {
"type": "string",
"title": "Auto compactions",
"description": "replace (default): also replace Claude Code's own mid-turn auto compactions (live-tested to survive resume with tailMode text); core: leave them to Claude Code.",
"options": [
"core",
"replace"
],
"default": "replace"
},
"model": {
"type": "string",
"title": "Summarizer model",
"description": "Summarizer model. Without `endpoint`: an alias or id resolved like --model (session credentials). With `endpoint`: the provider's model id, e.g. deepseek-v4.1-flash.",
"default": "sonnet"
},
"endpoint": {
"type": "string",
"title": "Summarizer endpoint URL",
"description": "Base URL of an external summarizer, e.g. https://opencode.ai/inference/go/v1 (empty: the session's own model). Any path after the base is stripped; apiFormat adds /chat/completions or /messages.",
"default": ""
},
"apiFormat": {
"type": "string",
"title": "Endpoint API format",
"description": "openai: POST {model, messages, max_tokens}; anthropic: POST {model, system, messages, max_tokens} with anthropic-version.",
"options": [
"openai",
"anthropic"
],
"default": "openai"
},
"apiKeyEnv": {
"type": "string",
"title": "API key environment variable",
"description": "Name of the environment variable holding the endpoint's key (sent as Authorization: Bearer, or x-api-key for anthropic). Empty or unset: no auth header (e.g. a proxy injects it).",
"default": ""
},
"curlPath": {
"type": "string",
"title": "curl executable",
"description": "curl 8.3+ used for endpoint calls, run directly (no shell). Default curl from PATH (curl.exe on Windows 10/11).",
"default": "curl"
},
"extraHeaders": {
"type": "string",
"title": "Extra request headers (JSON object)",
"description": "JSON object of non-secret headers. In a value, {requestId} becomes a fresh UUID per compaction (the same for all of its refine calls) and {sessionId} the Claude Code session id. For an opencode.ai endpoint, x-opencode-session is added automatically (the per-compaction id) unless set here.",
"default": ""
},
"extraBody": {
"type": "string",
"title": "Extra request body fields (JSON object)",
"description": "Merged into the request body, e.g. {\"reasoning_effort\":\"low\"}.",
"default": ""
},
"timeoutSeconds": {
"type": "number",
"title": "Endpoint timeout (seconds)",
"description": "Whole-request limit for the endpoint call, 30-590.",
"default": 480
},
"stream": {
"type": "boolean",
"title": "Stream the endpoint reply",
"description": "Use server-sent events (some providers cut long non-streamed calls).",
"default": true
},
"keepMessages": {
"type": "number",
"title": "Recent messages kept verbatim",
"description": "How many of the newest transcript messages survive compaction as-is (rounded back to a clean turn boundary).",
"default": 6
},
"tailMode": {
"type": "string",
"title": "Kept tail format",
"description": "text: recent messages kept as plain text with tool calls as one-line notes (survives resume); verbatim: kept as the engine's own messages (a kept tool result breaks the transcript chain on resume).",
"options": [
"text",
"verbatim"
],
"default": "text"
},
"maxSummaryTokens": {
"type": "number",
"title": "Summary token cap",
"description": "maxTokens for the summarizer reply.",
"default": 16000
},
"maxSummarizerInputTokens": {
"type": "number",
"title": "Summarizer input budget (tokens)",
"description": "Most tokens sent in one summarizer request (estimated at 3 characters per token). A longer transcript is summarized in parts with refine: each call gets the summary so far plus the next part. Minimum 128000: a smaller value is raised to it.",
"default": 500000
},
"maxToolResultChars": {
"type": "number",
"title": "Tool result characters",
"description": "How much of each tool call's result the summarizer sees (longer results are cut). 0 shows none.",
"default": 1500
},
"maxToolInputChars": {
"type": "number",
"title": "Tool input characters",
"description": "How much of each tool call's input (its arguments, as JSON) the summarizer sees. 0 shows none.",
"default": 400
},
"extraInstructions": {
"type": "string",
"title": "Extra instructions",
"description": "Appended to the summarizer prompt on every compaction.",
"default": ""
},
"systemPromptFile": {
"type": "string",
"title": "System prompt file",
"description": "Path to the summarizer's system prompt (~/ = home, relative = project root). Empty: <project>/.claude/custom-compaction/system.md, then ~/.claude/custom-compaction/system.md, then the built-in.",
"default": ""
},
"steerPromptFile": {
"type": "string",
"title": "Steer prompt file",
"description": "Path to the instructions steer mode gives the built-in compaction. Empty: <project>/.claude/custom-compaction/steer.md, then ~/.claude/custom-compaction/steer.md, then the built-in.",
"default": ""
},
"applyToSubagents": {
"type": "boolean",
"title": "Apply to subagents",
"description": "Also replace compaction of subagent / fork transcripts (agentId set).",
"default": false
},
"saveSummaries": {
"type": "boolean",
"title": "Save summaries to disk",
"description": "Write each custom summary to .claude/custom-compaction/ under the working directory.",
"default": false
}
}
}
}