v0.29.1 d92a60f

model.go RawHistoryFolder

1package subagents
2
3import "time"
4
5// WebSearchPolicy is the capability decision propagated from a host agent to
6// a resident child.
7type WebSearchPolicy uint8
8
9const (
10	WebSearchInherit WebSearchPolicy = iota
11	WebSearchDeny
12	WebSearchAllow
13)
14
15func (p WebSearchPolicy) Allows() bool { return p == WebSearchAllow }
16
17func (p WebSearchPolicy) String() string {
18	switch p {
19	case WebSearchAllow:
20		return "allow"
21	case WebSearchDeny:
22		return "deny"
23	case WebSearchInherit:
24		return "inherit"
25	default:
26		// Unknown values must not serialize as inherit: that would let a
27		// worker fall back to its own default and potentially regain access.
28		return "deny"
29	}
30}
31
32// WorkspaceMode selects how a child is allowed to access the repository.
33type WorkspaceMode string
34
35const (
36	WorkspaceShared   WorkspaceMode = "shared"
37	WorkspaceWorktree WorkspaceMode = "worktree"
38)
39
40// CaptureMode controls which durable worktree output is collected.
41type CaptureMode string
42
43const (
44	CapturePatch CaptureMode = "patch"
45	CaptureDiff  CaptureMode = "diff"
46)
47
48// SubagentPolicy contains the resident manager's limits and capability ceiling.
49type SubagentPolicy struct {
50	MaxConcurrent int
51	QueueTimeout  time.Duration
52	AllowedTools  []string
53	AllowedRoots  []string
54}
55
56func (p SubagentPolicy) allowedTool(name string) bool {
57	if len(p.AllowedTools) == 0 {
58		return true
59	}
60	for _, allowed := range p.AllowedTools {
61		if allowed == name {
62			return true
63		}
64	}
65	return false
66}
67
68// AllowsTool reports whether a child may receive name under the host policy.
69// An empty allowlist retains the historical unrestricted policy.
70func (p SubagentPolicy) AllowsTool(name string) bool { return p.allowedTool(name) }

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 476

↑↓ moveenter openesc close