aboutsummaryrefslogtreecommitdiff
path: root/distribution/agent-detection/opencode.toml
blob: 5245238371da8db0ed722312e457abaf29df137a (plain)
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
id = "opencode"
version = "2026.06.10.1"
min_engine_version = 1
updated_at = "2026-06-10T00:00:00Z"
aliases = ["open-code", "herdr:opencode"]

[[rules]]
id = "permission_required"
state = "blocked"
priority = 300
region = "whole_recent"
visible_blocker = true
any = [
  { contains = ["△ Permission required"] },
  { contains = ["esc dismiss"], any = [{ contains = ["enter confirm"] }, { contains = ["enter submit"] }, { contains = ["enter toggle"] }], all = [{ any = [{ contains = ["↑↓ select"] }, { contains = ["⇆ tab"] }] }] },
]

[[rules]]
id = "interrupt_hint_working"
state = "working"
priority = 110
region = "whole_recent"
visible_working = true
any = [
  { contains = ["esc to interrupt"] },
  { contains = ["ctrl+c to interrupt"] },
  { contains = ["press esc to interrupt"] },
  { line_regex = ['(?i).*opencode.*esc (again to )?interrupt'] },
]

[[rules]]
id = "progress_bar_working"
state = "working"
priority = 100
region = "whole_recent"
visible_working = true
regex = ['(■|⬝){4,}']