opencode-agent-plus 0.4.2 → 0.5.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/README.md +15 -0
- package/package.json +31 -7
- package/src/clockwork.ts +67 -0
- package/src/frontmatter.ts +10 -2
- package/src/index.ts +8 -0
- package/src/misplacedtag.test.ts +47 -0
- package/src/misplacedtag.ts +116 -0
- package/src/presets.ts +1 -7
- package/src/tui.tsx +2 -0
package/README.md
CHANGED
|
@@ -206,6 +206,13 @@ saved to history). The model ponders where the conversation is going. The
|
|
|
206
206
|
result rides into your next message as a `<pondering>` block, which the model
|
|
207
207
|
uses silently — like the reminder, it never replies to it.
|
|
208
208
|
|
|
209
|
+
## Misplaced tag filter
|
|
210
|
+
|
|
211
|
+
With `misplaced_tag_filter: on`, tag signs (`<`, `>`, `|`) that leak into the
|
|
212
|
+
thinking or message text are swapped for safe look-alikes, so they cannot break
|
|
213
|
+
the next turn. Tool calls are not touched. When a message was changed, a short
|
|
214
|
+
note is added so you do not copy broken code from it.
|
|
215
|
+
|
|
209
216
|
## Green light
|
|
210
217
|
|
|
211
218
|
With `manual_green_light: on`, tool calls are denied unless your latest message ends with an approval word (in its last
|
|
@@ -215,6 +222,14 @@ is always allowed. Set your own words with `manual_green_light_words: yes, do, g
|
|
|
215
222
|
With `auto_green_light: on`, the model checks itself before the first tool call of each turn: it must allow the call
|
|
216
223
|
and state its plan, or explain why it cannot. The check fires once per turn and is not saved in the chat history.
|
|
217
224
|
|
|
225
|
+
## Clockwork
|
|
226
|
+
|
|
227
|
+
With `clockwork: on`, the agent runs hands-off. Every permission ask is denied,
|
|
228
|
+
and after each finished turn the plugin runs one quiet thinking request (like
|
|
229
|
+
pondering) to write a fresh "keep going" message, then sends it. The session
|
|
230
|
+
keeps working on its own until you stop it. Only agents with `clockwork: on` are
|
|
231
|
+
affected.
|
|
232
|
+
|
|
218
233
|
## Notes
|
|
219
234
|
|
|
220
235
|
- Use `max_completion_tokens`, not `max_tokens`: OpenCode already sends `max_completion_tokens`, and servers use that one.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-agent-plus",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "OpenCode plugin: safe-command auto-allow (no prompt for read-only calls), per-agent chat_template_kwargs (enable_thinking), sampling settings and system reminders from agent frontmatter. For llama.cpp, LiteLLM and OpenAI-compatible providers.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Anoosh Ahmadi",
|
|
@@ -9,21 +9,45 @@
|
|
|
9
9
|
"url": "git+https://github.com/Anooshiravan/opencode-agent-plus.git"
|
|
10
10
|
},
|
|
11
11
|
"keywords": [
|
|
12
|
-
"opencode",
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
12
|
+
"opencode",
|
|
13
|
+
"opencode-plugin",
|
|
14
|
+
"opencode-agent",
|
|
15
|
+
"agent",
|
|
16
|
+
"agents",
|
|
17
|
+
"frontmatter",
|
|
18
|
+
"llama.cpp",
|
|
19
|
+
"llama-cpp",
|
|
20
|
+
"litellm",
|
|
21
|
+
"openai-compatible",
|
|
22
|
+
"local-llm",
|
|
23
|
+
"chat_template_kwargs",
|
|
24
|
+
"chat-template-kwargs",
|
|
25
|
+
"enable_thinking",
|
|
26
|
+
"thinking",
|
|
27
|
+
"reasoning",
|
|
28
|
+
"temperature",
|
|
29
|
+
"sampling",
|
|
30
|
+
"top_p",
|
|
31
|
+
"top_k",
|
|
32
|
+
"min_p",
|
|
33
|
+
"system-reminder",
|
|
34
|
+
"reminder",
|
|
35
|
+
"qwen"
|
|
17
36
|
],
|
|
18
37
|
"type": "module",
|
|
19
38
|
"exports": {
|
|
20
39
|
".": "./src/index.ts",
|
|
21
40
|
"./tui": "./src/tui.tsx"
|
|
22
41
|
},
|
|
23
|
-
"files": [
|
|
42
|
+
"files": [
|
|
43
|
+
"src"
|
|
44
|
+
],
|
|
24
45
|
"peerDependencies": {
|
|
25
46
|
"@opentui/core": ">=0.7.0",
|
|
26
47
|
"@opentui/solid": ">=0.7.0",
|
|
27
48
|
"solid-js": ">=1.9.0"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"tsx": "^4.23.15"
|
|
28
52
|
}
|
|
29
53
|
}
|
package/src/clockwork.ts
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
// `clockwork: on` — hands-off loop. Denies every permission ask, and after the
|
|
2
|
+
// agent finishes a turn it asks the LLM endpoint to write a fresh proactive
|
|
3
|
+
// message, then sends it so the agent keeps going. Only agents with
|
|
4
|
+
// `clockwork: on` are affected.
|
|
5
|
+
import { log } from "./log"
|
|
6
|
+
|
|
7
|
+
const FALLBACK =
|
|
8
|
+
"Work autonomously. Decide for yourself, pick the option that best fits " +
|
|
9
|
+
"the task and the surrounding code, and keep going. If the situation is " +
|
|
10
|
+
"ambiguous, trust your feeling. Use all available tools to solve the task."
|
|
11
|
+
|
|
12
|
+
const META =
|
|
13
|
+
"You are nudging an autonomous coding agent that just stopped. Write ONE " +
|
|
14
|
+
"short imperative sentence telling it what to do next to keep making " +
|
|
15
|
+
"progress. Do not greet, do not ask questions, do not repeat prior work. " +
|
|
16
|
+
"Reply with that one sentence only."
|
|
17
|
+
|
|
18
|
+
export async function clockwork(ctx: any, { settings }: { settings: (agent: string) => Promise<{ keys: Record<string, string> }> }) {
|
|
19
|
+
const shared = ((globalThis as any).__agentPlusClockwork ??= { running: new Set<string>(), denied: new Set<string>() })
|
|
20
|
+
const running = shared.running as Set<string> // a keep-going prompt is in flight
|
|
21
|
+
const denied = shared.denied as Set<string> // this turn had a denied ask
|
|
22
|
+
|
|
23
|
+
// Deny every permission ask for clockwork agents.
|
|
24
|
+
await ctx.permission.hook("evaluate", async (event: any) => {
|
|
25
|
+
if (!event.agent) return
|
|
26
|
+
const { keys } = await settings(event.agent)
|
|
27
|
+
if (keys.clockwork !== "on") return
|
|
28
|
+
if (event.effect !== "ask") return
|
|
29
|
+
event.effect = "deny"
|
|
30
|
+
event.message = "Clockwork: permission denied. Pick a different approach."
|
|
31
|
+
denied.add(String(event.sessionID))
|
|
32
|
+
log(`clockwork: denied ask session=${event.sessionID} action=${event.action}`)
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
// After each finished turn, ask the endpoint for a fresh nudge and send it.
|
|
36
|
+
const controller = new AbortController()
|
|
37
|
+
log(`clockwork: listener started`)
|
|
38
|
+
void (async () => {
|
|
39
|
+
for await (const event of ctx.event.subscribe({ signal: controller.signal })) {
|
|
40
|
+
if (event.id === shared.lastEvent) continue
|
|
41
|
+
shared.lastEvent = event.id
|
|
42
|
+
if (event.type !== "session.execution.succeeded") continue
|
|
43
|
+
const sessionID: string | undefined = event.data?.sessionID
|
|
44
|
+
if (!sessionID || running.has(sessionID)) continue
|
|
45
|
+
try {
|
|
46
|
+
const session = await ctx.session.get({ sessionID })
|
|
47
|
+
const { keys } = await settings(session.agent)
|
|
48
|
+
if (keys.clockwork !== "on") continue
|
|
49
|
+
running.add(sessionID)
|
|
50
|
+
const wasDenied = denied.delete(sessionID)
|
|
51
|
+
|
|
52
|
+
const { text: next } = await ctx.session.generate({ sessionID, prompt: META })
|
|
53
|
+
const text = String(next).trim() || FALLBACK
|
|
54
|
+
|
|
55
|
+
const final = wasDenied ? `Request is rejected. ${text}` : text
|
|
56
|
+
log(`clockwork: continuing session=${sessionID} denied=${wasDenied} text=${final}`)
|
|
57
|
+
await ctx.session.prompt({ sessionID, text: final, delivery: "steer" })
|
|
58
|
+
} catch (error) {
|
|
59
|
+
log(`clockwork: prompt failed session=${sessionID} error=${String(error)}`)
|
|
60
|
+
} finally {
|
|
61
|
+
running.delete(sessionID)
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
})().catch((error) => log(`clockwork: listener died error=${String(error)}`))
|
|
65
|
+
|
|
66
|
+
return () => controller.abort()
|
|
67
|
+
}
|
package/src/frontmatter.ts
CHANGED
|
@@ -37,7 +37,7 @@ const OPENCODE_KEYS = [
|
|
|
37
37
|
"disabled",
|
|
38
38
|
"request",
|
|
39
39
|
]
|
|
40
|
-
const KNOWN = new Set([...OPENCODE_KEYS, "reminder", "on_error_command", "safe_commands", "max_word_repeat", "max_tool_repeat", "manual_green_light", "manual_green_light_words", "auto_green_light", "pondering", ...BODY, ...TEMPLATE_KWARGS])
|
|
40
|
+
const KNOWN = new Set([...OPENCODE_KEYS, "reminder", "on_error_command", "safe_commands", "max_word_repeat", "max_tool_repeat", "manual_green_light", "manual_green_light_words", "auto_green_light", "pondering", "misplaced_tag_filter", "clockwork", ...BODY, ...TEMPLATE_KWARGS])
|
|
41
41
|
|
|
42
42
|
export const read = (file: string) => readFile(file, "utf8").catch(() => "")
|
|
43
43
|
|
|
@@ -159,11 +159,19 @@ export async function problems(file: string, keys: Record<string, string>) {
|
|
|
159
159
|
keys.pondering && !["on", "off"].includes(keys.pondering)
|
|
160
160
|
? [`pondering: must be on or off`]
|
|
161
161
|
: []
|
|
162
|
+
const misplacedTagFilter =
|
|
163
|
+
keys.misplaced_tag_filter && !["on", "off"].includes(keys.misplaced_tag_filter)
|
|
164
|
+
? [`misplaced_tag_filter: must be on or off`]
|
|
165
|
+
: []
|
|
166
|
+
const clockwork =
|
|
167
|
+
keys.clockwork && !["on", "off"].includes(keys.clockwork)
|
|
168
|
+
? [`clockwork: must be on or off`]
|
|
169
|
+
: []
|
|
162
170
|
const wrong = [...BODY, ...TEMPLATE_KWARGS]
|
|
163
171
|
.filter((k) => k in keys)
|
|
164
172
|
.flatMap((k) => {
|
|
165
173
|
const result = requestValue(k, keys[k])
|
|
166
174
|
return "error" in result ? [result.error] : []
|
|
167
175
|
})
|
|
168
|
-
return [...misspelledKeys(keys), ...wrong, ...safeCommands, ...maxWordRepeat, ...maxToolRepeat, ...greenLight, ...autoGreenLight, ...pondering]
|
|
176
|
+
return [...misspelledKeys(keys), ...wrong, ...safeCommands, ...maxWordRepeat, ...maxToolRepeat, ...greenLight, ...autoGreenLight, ...pondering, ...misplacedTagFilter, ...clockwork]
|
|
169
177
|
}
|
package/src/index.ts
CHANGED
|
@@ -8,6 +8,8 @@ import { autoGreenLight } from "./autogreenlight"
|
|
|
8
8
|
import { onErrorCommand } from "./onerrorcommand"
|
|
9
9
|
import { httpRequest } from "./httprequest"
|
|
10
10
|
import { pondering } from "./pondering"
|
|
11
|
+
import { misplacedTagFilter } from "./misplacedtag"
|
|
12
|
+
import { clockwork } from "./clockwork"
|
|
11
13
|
|
|
12
14
|
// Server half: adds the agent's reminders to every model request and its settings to the request body.
|
|
13
15
|
// The supported frontmatter keys are listed in frontmatter.ts and explained in README.md.
|
|
@@ -60,6 +62,12 @@ export default {
|
|
|
60
62
|
// `pondering: on` — think during idle time; the result rides into the next user message.
|
|
61
63
|
await pondering(ctx, { settings })
|
|
62
64
|
|
|
65
|
+
// `misplaced_tag_filter: on` — swap stray tag signs in thinking/message text for safe look-alikes.
|
|
66
|
+
await misplacedTagFilter(ctx, { settings })
|
|
67
|
+
|
|
68
|
+
// `clockwork: on` — deny all asks and keep the agent going on its own.
|
|
69
|
+
await clockwork(ctx, { settings })
|
|
70
|
+
|
|
63
71
|
await ctx.session.hook("context", async (event: any) => {
|
|
64
72
|
// A request got through: allow on_error_command to fire again next time.
|
|
65
73
|
allowWake(event.sessionID)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { expect, test } from "bun:test"
|
|
2
|
+
import { filterResponse } from "./misplacedtag"
|
|
3
|
+
|
|
4
|
+
// Runs the filter over fake SSE chunks and returns the output text.
|
|
5
|
+
async function run(chunks: string[]) {
|
|
6
|
+
const body = new ReadableStream({
|
|
7
|
+
start(controller) {
|
|
8
|
+
for (const c of chunks) controller.enqueue(new TextEncoder().encode(c))
|
|
9
|
+
controller.close()
|
|
10
|
+
},
|
|
11
|
+
})
|
|
12
|
+
const out = await filterResponse(new Response(body)).text()
|
|
13
|
+
return out
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const chunk = (field: string, value: string) =>
|
|
17
|
+
`data: {"choices":[{"index":0,"delta":{"${field}":"${value}"}}]}\n\n`
|
|
18
|
+
|
|
19
|
+
test("swaps tag signs in content", async () => {
|
|
20
|
+
const out = await run([chunk("content", "a <|end|> b")])
|
|
21
|
+
expect(out).toContain("a <|end|> b")
|
|
22
|
+
expect(out).toContain("safe look-alikes")
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
test("swaps tag signs in reasoning_content, no note", async () => {
|
|
26
|
+
const out = await run([chunk("reasoning_content", "x <|think|> y")])
|
|
27
|
+
expect(out).toContain("x <|think|> y")
|
|
28
|
+
expect(out).not.toContain("safe look-alikes")
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
test("leaves tool_calls alone", async () => {
|
|
32
|
+
const out = await run([`data: {"choices":[{"index":0,"delta":{"tool_calls":[{"function":{"arguments":"{\\"a\\": 1<2}"}}]}}]}\n\n`])
|
|
33
|
+
expect(out).toContain("1<2")
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
test("handles a field split across chunks", async () => {
|
|
37
|
+
const full = chunk("content", "a <|end|> b")
|
|
38
|
+
const cut = full.indexOf("<|")
|
|
39
|
+
const out = await run([full.slice(0, cut), full.slice(cut)])
|
|
40
|
+
expect(out).toContain("a <|end|> b")
|
|
41
|
+
})
|
|
42
|
+
|
|
43
|
+
test("clean text passes through unchanged", async () => {
|
|
44
|
+
const out = await run([chunk("content", "plain text")])
|
|
45
|
+
expect(out).toContain("plain text")
|
|
46
|
+
expect(out).not.toContain("safe look-alikes")
|
|
47
|
+
})
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
// `misplaced_tag_filter: on` — the server already splits the reply into
|
|
2
|
+
// `reasoning_content` (thinking) and `content` (message). Any tag sign that
|
|
3
|
+
// still shows up inside those fields is misplaced, so we swap it for a safe
|
|
4
|
+
// look-alike. Tool calls are left alone. When the message part was changed, a
|
|
5
|
+
// short note is appended so the user does not copy broken code.
|
|
6
|
+
import { log } from "./log"
|
|
7
|
+
|
|
8
|
+
export interface TagFilterOptions {
|
|
9
|
+
/** Reads the agent's frontmatter keys. */
|
|
10
|
+
settings: (agent: string) => Promise<{ keys: Record<string, string> }>
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const NOTE = "\n\n[Note: some tag characters in this message were replaced with safe look-alikes. Do not copy/paste code from it.]"
|
|
14
|
+
|
|
15
|
+
// Sign → safe look-alike.
|
|
16
|
+
const SWAP: Record<string, string> = { "<": "<", ">": ">", "|": "|" }
|
|
17
|
+
|
|
18
|
+
const swap = (value: string) => value.replace(/[<>|]/g, (c) => SWAP[c])
|
|
19
|
+
|
|
20
|
+
// The two fields we filter, by their JSON key.
|
|
21
|
+
const KEYS = ['"content":"', '"reasoning_content":"']
|
|
22
|
+
|
|
23
|
+
// Rewrites complete `"<key>":"<value>"` fields in `text`. Returns the processed
|
|
24
|
+
// part, the unfinished tail, and whether the message part was changed.
|
|
25
|
+
function filter(text: string): { out: string; rest: string; messageChanged: boolean } {
|
|
26
|
+
let out = ""
|
|
27
|
+
let messageChanged = false
|
|
28
|
+
let i = 0
|
|
29
|
+
for (;;) {
|
|
30
|
+
// Find the nearest field key ahead.
|
|
31
|
+
let at = -1
|
|
32
|
+
let key = ""
|
|
33
|
+
for (const k of KEYS) {
|
|
34
|
+
const p = text.indexOf(k, i)
|
|
35
|
+
if (p >= 0 && (at < 0 || p < at)) {
|
|
36
|
+
at = p
|
|
37
|
+
key = k
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
if (at < 0) {
|
|
41
|
+
// No key left; keep a tail so a key split across chunks is not missed.
|
|
42
|
+
const keep = 24
|
|
43
|
+
out += text.slice(i, Math.max(i, text.length - keep))
|
|
44
|
+
return { out, rest: text.slice(Math.max(i, text.length - keep)), messageChanged }
|
|
45
|
+
}
|
|
46
|
+
out += text.slice(i, at)
|
|
47
|
+
let j = at + key.length
|
|
48
|
+
let value = ""
|
|
49
|
+
let closed = false
|
|
50
|
+
while (j < text.length) {
|
|
51
|
+
const c = text[j]
|
|
52
|
+
if (c === "\\") {
|
|
53
|
+
if (j + 1 >= text.length) break
|
|
54
|
+
value += c + text[j + 1]
|
|
55
|
+
j += 2
|
|
56
|
+
continue
|
|
57
|
+
}
|
|
58
|
+
if (c === '"') {
|
|
59
|
+
closed = true
|
|
60
|
+
j++
|
|
61
|
+
break
|
|
62
|
+
}
|
|
63
|
+
value += c
|
|
64
|
+
j++
|
|
65
|
+
}
|
|
66
|
+
if (!closed) return { out, rest: text.slice(at), messageChanged }
|
|
67
|
+
const swapped = swap(value)
|
|
68
|
+
if (key === '"content":"' && swapped !== value) messageChanged = true
|
|
69
|
+
out += key + swapped + '"'
|
|
70
|
+
i = j
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function filterResponse(response: Response): Response {
|
|
75
|
+
if (!response.body) return response
|
|
76
|
+
const decoder = new TextDecoder()
|
|
77
|
+
const encoder = new TextEncoder()
|
|
78
|
+
let pending = ""
|
|
79
|
+
let messageChanged = false
|
|
80
|
+
|
|
81
|
+
const stream = new TransformStream<Uint8Array, Uint8Array>({
|
|
82
|
+
transform(chunk, controller) {
|
|
83
|
+
const { out, rest, messageChanged: changed } = filter(pending + decoder.decode(chunk, { stream: true }))
|
|
84
|
+
pending = rest
|
|
85
|
+
messageChanged = messageChanged || changed
|
|
86
|
+
if (out) controller.enqueue(encoder.encode(out))
|
|
87
|
+
},
|
|
88
|
+
flush(controller) {
|
|
89
|
+
// Process whatever is left; emit the held tail as-is (stream is over).
|
|
90
|
+
const { out, rest, messageChanged: changed } = filter(pending + decoder.decode())
|
|
91
|
+
messageChanged = messageChanged || changed
|
|
92
|
+
const final = out + rest
|
|
93
|
+
if (final) controller.enqueue(encoder.encode(final))
|
|
94
|
+
if (messageChanged) {
|
|
95
|
+
const note = `data: ${JSON.stringify({ choices: [{ index: 0, delta: { content: NOTE } }] })}\n\n`
|
|
96
|
+
controller.enqueue(encoder.encode(note))
|
|
97
|
+
log("misplaced_tag_filter: note appended")
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
})
|
|
101
|
+
|
|
102
|
+
return new Response(response.body.pipeThrough(stream), {
|
|
103
|
+
status: response.status,
|
|
104
|
+
statusText: response.statusText,
|
|
105
|
+
headers: response.headers,
|
|
106
|
+
})
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export function misplacedTagFilter(ctx: any, options: TagFilterOptions) {
|
|
110
|
+
return ctx.session.hook("http.response", async (event: any) => {
|
|
111
|
+
const { keys } = await options.settings(event.agent)
|
|
112
|
+
if (keys.misplaced_tag_filter !== "on") return
|
|
113
|
+
log(`misplaced_tag_filter: http.response fired session=${event.sessionID} agent=${event.agent}`)
|
|
114
|
+
event.response = filterResponse(event.response)
|
|
115
|
+
})
|
|
116
|
+
}
|
package/src/presets.ts
CHANGED
|
@@ -6,13 +6,7 @@ import { log } from "./log"
|
|
|
6
6
|
|
|
7
7
|
const PRESETS: Record<string, string> = {
|
|
8
8
|
concise: [
|
|
9
|
-
|
|
10
|
-
"Be concise in chat: short simple answers covering only the requested task. When request is unclear, say it so instead of guessing.",
|
|
11
|
-
"Always answer in plain simple English, no jargon.",
|
|
12
|
-
"Do NOT over-explain. Do not add details that are not asked. You are required to be short and quickly readable, NOT complete and comprehensive.",
|
|
13
|
-
"Do not use system folders like /tmp /opt. Use ./local/tmp for your temp files.",
|
|
14
|
-
"Never use chained shell commands (; or &&). Run one command per call; chaining causes permission and execution issues.",
|
|
15
|
-
"Reasoning effort is set to low. Keep your thinking brief and focused.",
|
|
9
|
+
"Be concise and straight to the point. Cut the crap and jargon, and talk plain English. Do only what the user asked, and nothing else.",
|
|
16
10
|
].join("\n"),
|
|
17
11
|
"ultra-concise": [
|
|
18
12
|
'You are "Concise" agents, a helpful assistant.',
|
package/src/tui.tsx
CHANGED
|
@@ -24,6 +24,8 @@ function sidebarLines(keys: Record<string, string>) {
|
|
|
24
24
|
lines.push(`manual_green_light: ${onOff(keys.manual_green_light)}`)
|
|
25
25
|
lines.push(`auto_green_light: ${onOff(keys.auto_green_light)}`)
|
|
26
26
|
lines.push(`pondering: ${onOff(keys.pondering)}`)
|
|
27
|
+
lines.push(`misplaced_tag_filter: ${onOff(keys.misplaced_tag_filter)}`)
|
|
28
|
+
lines.push(`clockwork: ${onOff(keys.clockwork)}`)
|
|
27
29
|
if ("reasoning_effort" in keys && "value" in requestValue("reasoning_effort", keys.reasoning_effort))
|
|
28
30
|
lines.push(`reasoning_effort: ${keys.reasoning_effort}`)
|
|
29
31
|
for (const k of BODY) {
|