Expand description
opencode 1.x and 2.x: the TS plugin adapters/opencode/borg.ts, compiled in and copied to
~/.config/opencode/plugins/borg.ts ($OPENCODE_CONFIG_DIR, $XDG_CONFIG_HOME/opencode). The plugin
translates both ways, sends opencode’s pid, emulates the stop’s second round and sets its budget.
Structs§
Constants§
- ADAPTER
- CHILDREN
- A guard, not a tuning knob: at most this many children of one session are exported, the rest read from the parent’s copy of their final text.
Functions§
- session_
runs - One run per main session that started subagents, oldest first:
session(ases_…id) only, else every parent of a subagent session sincesince(1.x’s query). A subagent is a child session; the parent’s task tool call (1.xtask, 2.xsubagent) names it (metadata.sessionId/sessionID) with its description, agent and prompt, and holds its final text. Its export gives its cwd and work. opencode has no structured output:outputstays None.