@royalcat/opencode-dcp-rc 4.0.0 → 4.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -1
- package/dist/index.js +1402 -27
- package/dist/index.js.map +1 -1
- package/dist/lib/commands/stats.d.ts +3 -1
- package/dist/lib/commands/stats.d.ts.map +1 -1
- package/dist/lib/compress/rc.d.ts.map +1 -1
- package/dist/lib/compress/summary.d.ts +11 -1
- package/dist/lib/compress/summary.d.ts.map +1 -1
- package/dist/lib/compress/types.d.ts +10 -1
- package/dist/lib/compress/types.d.ts.map +1 -1
- package/dist/lib/compress/usage.d.ts +45 -0
- package/dist/lib/compress/usage.d.ts.map +1 -0
- package/dist/lib/config.d.ts +2 -0
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/prompts/context-limit-nudge.d.ts +1 -1
- package/dist/lib/prompts/context-limit-nudge.d.ts.map +1 -1
- package/dist/lib/prompts/extensions/system.d.ts +2 -2
- package/dist/lib/prompts/extensions/system.d.ts.map +1 -1
- package/dist/lib/prompts/iteration-nudge.d.ts +1 -1
- package/dist/lib/prompts/iteration-nudge.d.ts.map +1 -1
- package/dist/lib/prompts/turn-nudge.d.ts +1 -1
- package/dist/lib/prompts/turn-nudge.d.ts.map +1 -1
- package/dist/lib/state/persistence.d.ts +2 -0
- package/dist/lib/state/persistence.d.ts.map +1 -1
- package/dist/lib/state/state.d.ts.map +1 -1
- package/dist/lib/state/types.d.ts +3 -0
- package/dist/lib/state/types.d.ts.map +1 -1
- package/dist/lib/tui/dialogs.d.ts.map +1 -1
- package/dist/lib/v2/index.d.ts.map +1 -1
- package/dist/lib/v2/rpc.d.ts +20 -0
- package/dist/lib/v2/rpc.d.ts.map +1 -1
- package/dist/lib/v2/scrub.d.ts +94 -0
- package/dist/lib/v2/scrub.d.ts.map +1 -0
- package/dist/lib/v2/usage.d.ts +45 -0
- package/dist/lib/v2/usage.d.ts.map +1 -0
- package/lib/commands/stats.ts +21 -0
- package/lib/compress/rc.ts +43 -7
- package/lib/compress/summary.ts +28 -1
- package/lib/compress/types.ts +14 -1
- package/lib/compress/usage.ts +168 -0
- package/lib/config.ts +30 -0
- package/lib/prompts/context-limit-nudge.ts +2 -0
- package/lib/prompts/extensions/system.ts +4 -0
- package/lib/prompts/iteration-nudge.ts +2 -0
- package/lib/prompts/system.ts +1 -1
- package/lib/prompts/turn-nudge.ts +2 -0
- package/lib/state/persistence.ts +18 -2
- package/lib/state/state.ts +4 -0
- package/lib/state/types.ts +3 -0
- package/lib/tui/dialogs.tsx +24 -0
- package/lib/v2/index.ts +58 -5
- package/lib/v2/rpc.ts +12 -0
- package/lib/v2/scrub.ts +954 -0
- package/lib/v2/usage.ts +450 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -15,7 +15,9 @@ management in OpenCode.
|
|
|
15
15
|
**Design goal: the plugin stays invisible.** Injected system prompts, message-ID
|
|
16
16
|
tags, nudges, and summary replacement only ever exist in the outgoing model
|
|
17
17
|
request. The user's stored history is never rewritten, and the only
|
|
18
|
-
user-visible artifact is the `compress` tool call itself.
|
|
18
|
+
user-visible artifact is the `compress` tool call itself. If the model echoes
|
|
19
|
+
injected tags or reminders into its reply, the fork strips them from the
|
|
20
|
+
response before OpenCode stores or displays it.
|
|
19
21
|
|
|
20
22
|
## How it differs from upstream DCP
|
|
21
23
|
|
|
@@ -37,6 +39,13 @@ user-visible artifact is the `compress` tool call itself.
|
|
|
37
39
|
`dcp-rc.json`, and no self-update. Commands and prompt overrides keep upstream
|
|
38
40
|
names: `/dcp`, `/dcp-compress`, and `dcp-prompts/overrides/`.
|
|
39
41
|
|
|
42
|
+
- **Echoes are filtered.** Models sometimes copy injected reminders or message-ID
|
|
43
|
+
tags into their replies. The fork scrubs those copies from the model response
|
|
44
|
+
before OpenCode stores or displays it. Controlled by
|
|
45
|
+
`compress.scrubModelOutput` and `compress.scrubMessageIds` (both on by
|
|
46
|
+
default); it never touches tool-call arguments, so working with DCP files or
|
|
47
|
+
quoting tags intentionally still works.
|
|
48
|
+
|
|
40
49
|
## Install
|
|
41
50
|
|
|
42
51
|
Requires OpenCode V2 (`@opencode/plugin` ^2.0.22; verified against 2.0.4).
|
|
@@ -77,6 +86,8 @@ opencode plugin add /path/to/opencode-dcp-rc
|
|
|
77
86
|
"permission": "allow",
|
|
78
87
|
"minContextLimit": 50000,
|
|
79
88
|
"maxContextLimit": 100000,
|
|
89
|
+
"scrubModelOutput": true,
|
|
90
|
+
"scrubMessageIds": true,
|
|
80
91
|
},
|
|
81
92
|
"pruneNotification": "off",
|
|
82
93
|
}
|
|
@@ -87,6 +98,11 @@ mode, subagents) still applies, except `compress.mode` and `autoUpdate`, which
|
|
|
87
98
|
the fork no longer uses. Compress prompt text can be overridden through
|
|
88
99
|
`dcp-prompts/overrides/` when `experimental.customPrompts` is enabled.
|
|
89
100
|
|
|
101
|
+
`scrubModelOutput` removes DCP tags and reminder blocks the model may echo into
|
|
102
|
+
its reply; `scrubMessageIds` also removes message-ID refs (`@N@`, `@bN@`,
|
|
103
|
+
`@blocked@`) that appear alone on a line. Both default to `true` and are
|
|
104
|
+
kill-switches only — for example to debug the raw model output.
|
|
105
|
+
|
|
90
106
|
## Status and limitations
|
|
91
107
|
|
|
92
108
|
- The hidden summary call uses the session's provider/model and consumes a normal
|
|
@@ -94,6 +110,10 @@ the fork no longer uses. Compress prompt text can be overridden through
|
|
|
94
110
|
with prefix caching can reuse it.
|
|
95
111
|
- If the host rejects nested generation, the `compress` call fails visibly and the
|
|
96
112
|
selection is left uncompressed so it can be retried.
|
|
113
|
+
- Output scrubbing covers HTTP provider responses (OpenAI Responses/Chat,
|
|
114
|
+
Anthropic, Google) and the AI SDK text/reasoning path. Providers using the
|
|
115
|
+
experimental WebSocket transport are not covered, and copies already stored
|
|
116
|
+
before upgrading are not rewritten.
|
|
97
117
|
- Forked from DCP v3.2.0. Upstream is AGPL-3.0-or-later; this fork keeps the
|
|
98
118
|
same license and attribution (see `LICENSE`).
|
|
99
119
|
|