@vikrant82/opencode-cache-keepalive 0.1.6 → 0.2.0
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/MIGRATION.md +57 -0
- package/README.md +75 -51
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1093 -649
- package/dist/index.js.map +1 -1
- package/dist/lib/config.d.ts +8 -25
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/control.d.ts +10 -37
- package/dist/lib/control.d.ts.map +1 -1
- package/dist/lib/paths.d.ts +5 -12
- package/dist/lib/paths.d.ts.map +1 -1
- package/dist/lib/replay-warmer.d.ts +95 -0
- package/dist/lib/replay-warmer.d.ts.map +1 -0
- package/dist/lib/state.d.ts +15 -117
- package/dist/lib/state.d.ts.map +1 -1
- package/dist/lib/tui/commands.d.ts +1 -6
- package/dist/lib/tui/commands.d.ts.map +1 -1
- package/dist/lib/tui/footer.d.ts +5 -5
- package/dist/lib/tui/footer.d.ts.map +1 -1
- package/dist/lib/tui/format.d.ts.map +1 -1
- package/dist/lib/types.d.ts +123 -0
- package/dist/lib/types.d.ts.map +1 -0
- package/dist/tui.d.ts +3 -0
- package/dist/tui.d.ts.map +1 -1
- package/lib/config.ts +106 -74
- package/lib/control.ts +50 -86
- package/lib/paths.ts +12 -14
- package/lib/replay-warmer.ts +1200 -0
- package/lib/state.ts +171 -181
- package/lib/tui/commands.tsx +36 -144
- package/lib/tui/footer.tsx +54 -156
- package/lib/tui/format.ts +4 -0
- package/lib/types.ts +130 -0
- package/package.json +3 -2
- package/tui.tsx +40 -0
- package/dist/lib/keepalive.d.ts +0 -88
- package/dist/lib/keepalive.d.ts.map +0 -1
- package/dist/lib/model.d.ts +0 -8
- package/dist/lib/model.d.ts.map +0 -1
- package/dist/lib/system.d.ts +0 -11
- package/dist/lib/system.d.ts.map +0 -1
- package/lib/keepalive.ts +0 -665
- package/lib/model.ts +0 -19
- package/lib/system.ts +0 -19
package/lib/system.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Stable keepalive instruction appended to the system prompt.
|
|
3
|
-
*
|
|
4
|
-
* IMPORTANT: this text must be byte-stable and applied to *every* request for an
|
|
5
|
-
* eligible model (real turns and pings alike). If it were only added on pings, the
|
|
6
|
-
* system prefix would differ from real turns and the ping would miss the cache.
|
|
7
|
-
* Adding it consistently keeps the cached prefix identical and lets the model
|
|
8
|
-
* answer a ping with a single token instead of a paragraph or a tool call.
|
|
9
|
-
*/
|
|
10
|
-
export function keepaliveInstruction(pingToken: string): string {
|
|
11
|
-
return [
|
|
12
|
-
"<cache_keepalive>",
|
|
13
|
-
`A user message consisting of exactly the single token "${pingToken}" is an`,
|
|
14
|
-
"automated cache-keepalive ping, not a real request. When you receive it,",
|
|
15
|
-
`reply with exactly "${pingToken}" and nothing else. Do not call any tools,`,
|
|
16
|
-
"do not explain, and do not take any action.",
|
|
17
|
-
"</cache_keepalive>",
|
|
18
|
-
].join("\n")
|
|
19
|
-
}
|