mekugi

package module
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2026 License: MIT Imports: 8 Imported by: 0

README

mekugi

A mekugi is the small peg that pins a Japanese sword's handle to the blade. Take it out and the handle comes off. Leave it in and the blade is still the blade.

Mekugi adds compact, recoverable tools and live subagent activity to stock Codex. Codex keeps editing, execution, the sandbox, permissions, command sessions, and patch review. No fork, no config edits, no daemon.

Features · Install · Usage · UI · Metrics · Configuration · Documentation

Features

Agent-facing
  • Fewer tokens and round trips. Session helpers offer bounded and batched reads, semantic symbol lookup, and structural outlines.
  • Recoverable output and changes. Continue omitted output without rerunning, and review, revert, or reapply captured edits by ID. Gaps in coverage are labeled.
  • Leaner instructions. Omit marked instruction blocks for the session without changing instruction files or unmarked policy.
  • Output deduplication. Replace unchanged runs in tool output and attached file or skill content with references to earlier visible text by default in Mekugi mode. Full host results, retained evidence, and the UI stay intact. Transcript suffixes mark repeated output; /session shows occurrences and estimated saved tokens. Disable with --deduplicate-output=false; see the projection contract.
  • Task journal. Record plans, results, constraints, and blockers as durable work state, rather than repeating status summaries in conversation.
  • Journal context reset. Manual and context-full resets use retained journal, change and failure evidence by default, including subagents, without a provider summary request. Opt out with --journal-compaction=off; see recovery behavior and limits.
  • Session continuity. Retained journal and change evidence survives resume, forks, side threads, and compaction, subject to storage retention.
  • Custom tools. Extend the agent's capabilities with your own JavaScript tool plugins.
User-facing
  • Auto resume accidental stop. Continue unfinished journal work when the agent stops, including after answering a follow-up. Explicit user stops, blockers, and pending questions are respected. See the Journal pane.
  • Native terminal UI. Main, Diff, Activity, Journal, and Agents share one terminal without an external pane manager.
  • Task journal. Plans, results, and blockers stay visible without extra model requests for status reports. Work established complete by the final tool result needs no separate model-generated completion acknowledgment. See the Journal pane.
  • Live subagent activity. See model, effort, progress, and message excerpts in Main or the Agents pane, alongside elapsed time and edit activity.
  • Live diffs. Inspect streaming previews and saved edits; click an Edit event to open its captured file and hunk.
  • Readable command output. Open searchable retained output. With mekugi-exec, supported Bash and Linux dash-backed sh command lists show each command's streamed output, exit status, and timing. Markdown file links open local source in the same dialog. Supported single commands and pipelines, including Bash timed commands, show measured command time excluding startup and matching.
  • File, directory and skill attachments. Send selected contents or a bounded directory tree directly without a separate agent read; unreadable or oversized attachments have explicit notices.
  • Composer additions. Mention selected messages or diffs, and ask /btw side questions without interrupting Main.
  • Usage, throughput and cost. See per-thread usage and estimated API costs in Agents, with output tokens/sec in Main's composer and child-agent rows, plus launch-wide average throughput, usage coverage, retries, and diagnostics in /session.
  • Other providers and tiers. Use Grok or OpenCode Go and Zen, and choose service tiers.
  • Diagnostics. Inspect past sessions, record debug evidence, or replay the UI offline with CPU and heap profiling.

Bounded output and leaner instructions aim to reduce tokens and round trips; these savings don't guarantee better results on every task. For controlled comparisons, use codex-setup-ab.

Install

Requirements:

  • Codex CLI for tool execution in every launch mode.
  • For configured JavaScript plugins only: Node.js 24+ as node. Plugins declaring regex grammars also require ripgrep as rg on the router's PATH.
  • Built-in frontends need neither Node.js nor Bun; semantic lookup requires the language servers listed under agent-facing tools.
  • Any interpreter your agent picks, such as python3, on the executor's PATH.
Release binaries

Download an archive from GitHub Releases. Each archive includes mekugi and mekugi-exec; Go and a C toolchain are not needed.

Platform Archive Minimum OS
Linux x86-64 mekugi_linux_amd64.tar.gz glibc 2.39, such as Ubuntu 24.04
Linux ARM64 mekugi_linux_arm64.tar.gz glibc 2.39, such as Ubuntu 24.04
macOS Apple Silicon mekugi_darwin_arm64.tar.gz macOS 15

The installer selects your platform, verifies the release checksum, and installs both binaries into ~/.local/bin, replacing existing copies:

curl -fsSL https://raw.githubusercontent.com/yusing/mekugi/main/install.sh | sh

Add ~/.local/bin to your PATH if needed. Linux releases need glibc and do not run on stock Alpine Linux; use a source build for other environments.

Build from source

Source installs require Go 1.27+, CGO enabled, and a C toolchain:

go install github.com/yusing/mekugi/cmd/mekugi@latest github.com/yusing/mekugi/cmd/mekugi-exec@latest

Add $GOBIN, or $(go env GOPATH)/bin if that is unset, to your PATH.

From a checkout with Make, run make install. It regenerates the optional plugin shared core and installs mekugi and mekugi-exec. make uninstall removes only those binaries. Running sessions keep their worker executable, so start a new session to pick up an update.

Usage

Start Mekugi
Launch Models Authentication
mekugi Third-party grok:... and opencode*: IDs Grok or OpenCode credentials
mekugi grok Plain Grok IDs, such as grok-4.7 Grok credentials
mekugi codex Codex models only codex login with ChatGPT authentication

Standalone requires third-party credentials. Its default follows Grok's model selection when authenticated, otherwise the first available OpenCode Go model, then Zen. Mekugi flags go before codex, grok, or standalone Codex arguments.

Codex's approval/sandbox policy applies. The UI's remote-write guard needs unsandboxed execution: configure sandbox_mode="danger-full-access", or use --yolo to disable Codex approvals/sandboxing while keeping the guard. To disable only the guard and keep Codex's configured policy, use --vcs-guard=false.

mekugi codex
mekugi grok -m grok-4.7
mekugi -m opencode-go:glm-5.3
mekugi exec "Explain this repository"

Interactive launches open the UI; noninteractive commands retain Codex's arguments/output/exit status. Ctrl-C cancels startup; exit prints resume/replay commands. Mekugi mode needs JavaScript exec. There is no daemon, fixed/custom endpoint, or --oss. See launch and transport limits; invocation overrides leave config unchanged.

Grok models

Use grok login --oauth or XAI_API_KEY (takes precedence); Codex credentials stay separate. The default follows [models].default in ~/.grok/config.toml, then the latest standard model (currently grok-4.7); -m/-c model=... overrides it. Standalone IDs need grok:; mekugi grok uses plain IDs. Subagents use fresh context (fork_turns="none"). Build Fast needs OAuth; encrypted OpenAI history cannot switch to Grok. See Grok requirements.

OpenCode Go and Zen
OPENCODE_GO_API_KEY='your-key' mekugi -m opencode-go:glm-5.3
OPENCODE_ZEN_API_KEY='your-key' mekugi -m opencode-zen:kimi-k3

Keys can also live in settings. OPENCODE_API_KEY overrides file keys; per-service variables override it, and an empty value disables that service. Models/prices refresh hourly; the picker updates next launch. See OpenCode.

Resume

resume THREAD_ID or resume --last restores a session; bare resume opens the workspace picker. Type to search, Tab for all workspaces, Enter to resume. Inside an idle session, /resume opens the picker or /resume THREAD_ID switches directly. Saved model/effort/tier, layout, roster, Activity, and retained Diff return; explicit -m/-c overrides named settings. Drafts, selections, filters, and scroll positions do not return. UI histories above 16 MiB cannot resume. Third-party exec resume/exec fork uses the mode's default model unless given -m. See resume details.

Approvals

Codex approvals open over an empty composer; otherwise press Ctrl-B, then q. Arrows choose, Enter confirms, Esc hides without answering. Typing/pasting in Mekugi-mode command approvals selects denial with an optional reason; feedback reaches the current turn. Your draft/attachments return afterward.

The guard asks before supported Git/GitHub/Mercurial/SVN/Jujutsu remote writes in interactive Mekugi mode, even with --yolo; headless/noninteractive runs have no guard. It needs mekugi-exec beside mekugi, native MCP hooks, and unsandboxed execution. Approve once, approve the exact command/workdir/executable for this UI session, or deny. Denial, a five-minute timeout, or an unreachable approval connection fails only that command with status 1; the shell follows normal ;/&& behavior. Session grants expire when the UI closes. Missing/conflicting trusted guard hooks block turns; explicit hook overrides conflict. Read-only commands run without asking.

Coverage is incomplete for runtime-computed commands, eval, scripts/sourced files, and arbitrary programs invoking VCS internally. See guard limits.

Interactive sudo commands also ask for approval, even with cached credentials or passwordless sudo. If authentication is needed afterward, a separate secret password dialog keeps the answer out of model input and retained history. Sudo approval works independently of --vcs-guard and grants no sandbox permissions. See sudo support and limits.

Headless slice plans
mekugi --journal-compaction=slice headless --yolo < prompt.txt

Headless requires --yolo and one nonempty stdin prompt up to 16 MiB; model/-c options are accepted, resume/positional prompts are not. It continues journal work/slices without a countdown. Questions/approvals fail; Ctrl-C stops the run. Stdout JSONL contains private prompt/tool/answer evidence and reset/completion events; diagnostics go to stderr. Run/shutdown failure exits nonzero. codex exec is unchanged.

UI

Main holds the conversation/composer; Diff, Activity, and Journal share the right column, with Agents below. New sessions show Journal; child activity temporarily shows Activity unless you select another pane. Narrow terminals show one pane.

Action Shortcut
Focus Main / Diff / Activity / Agents / Journal Ctrl-B, then 1 / 2 / 3 / 4 / 5
Resize splits Drag dividers, or Ctrl-B, then arrows; Up/Down in Agents adjusts its height
Resize Diff navigator Ctrl-B, then [ / ]
Browse Main history Ctrl-B, then PageUp / PageDown
Return to Main Ctrl-C

The wheel scrolls under the pointer. Markdown supports colored code, responsive tables, and terminal Mermaid flowcharts; unsupported diagrams remain source. /title TITLE saves a manual title and skips automatic naming. Otherwise a new session may make a separate GPT-6 Luna medium-reasoning title request; unavailable credentials or Luna silently skip it. Notifications follow Codex's tui.notifications. See the UI contract for complete controls.

Composer
  • Enter steers; Tab queues. Type ? in an empty draft for shortcuts.
  • A breathing count shows running commands from Main and its children. /ps opens their live output, one tab per command, without interrupting work.
  • @ attaches files; @! includes ignored files. VCS metadata is excluded; unreadable/oversized content has omission notices. Directories attach two-level trees honoring .gitignore, bounded to 256 entries/16 KiB with truncation notices.
  • Enabled $skill-name references attach instructions, using skills-mgr when available. Use it for managed skills, /skills for Codex toggles; click receipts for submitted contents.
  • Select Main/Activity/saved Diff text and press r to mention it.
  • /btw QUESTION answers while Main works; repeat to follow up. Esc closes the panel, discarding the unresumable side conversation. If compaction is needed, reset Main and retry.
  • /model, /effort (or /reasoning), and /tier open pickers or accept values. /tier default clears the tier. Changes reach upcoming steps without editing config.
  • /compact resets context: Enter interrupts then resets, Tab queues. /clear starts fresh while idle, preserving sessions/files. See reset policy.
  • /lock prevents Esc/Ctrl-C interruption and Ctrl-C exit; /unlock restores them. The lock survives resume; explicit commands and steering still work.

Alt+Up or Shift+Left restores locally waiting input. Esc interrupts then resends only uncommitted steers; committed input is never resent and Tab-queued input stays queued. Without steers, Esc interrupts without resending. Ctrl-C clears the draft first, then interrupts/restores input. Picker/help/selection dismissal takes precedence. Copying needs OSC 52; Linux image paste needs wl-paste or xclip. See input details.

Live diff pane

Source-content edits stream, including patches, cat heredocs, and supported Python writes. Copies, removals, formatters, and other command effects stay in saved changes. Only completed edits become saved changes. Temporary views replace only the editing agent's transcript. /live toggles them without stopping capture; new launches enable them again. v switches views, s opens the navigator, / filters, n/p changes files, [/] jumps hunks. Tab opens Changes by caller. Click an Edit for its hunk; Ctrl-B e pins files, Ctrl-B r resumes following. See all diff controls.

Journal pane

Journal shows work, results, constraints, and blockers, including delegated journals. j/k selects, Space expands, Enter opens details, c copies the address, Esc returns. Unfinished work continues immediately; blockers/questions pause it. Explicit stops stay paused across questions/forks/resume until reactivated. Ordinary continuation keeps context; slices follow reset policy. See Journal.

Agents pane

Click a child for Activity or reply links to address it. a filters, End resumes following, o loads older history. The roster shows active time, round trips, throughput, usage, estimated API cost, and composed captured edits. Usage/rates survive resume while retained; ≥ marks lower bounds, ? uncertain edits, unavailable metrics stay blank. Main's throughput appears beside composer context. Herdr is optional; redirected sessions keep Codex input/output. See activity details.

Output dialog

Click output/errors/excerpts for retained content; Ctrl-B ! opens the newest error. Supported Bash/dash-backed sh lists show per-command output/status/time; missing boundaries are labeled combined. Host-omitted text cannot be recovered. Left/Right switches tabs; / searches, n/N moves matches, y copies, Esc/q closes. Select text to copy portions. Local links read current UTF-8 files up to 8 MiB; relative paths use the workspace, :line scrolls, reopening rereads. See dialog controls and command tracking.

Recoverable output and change review

Wrapped-session helpers

Ask the agent to use these inside a wrapped session:

Command Purpose Requirements
mread Continue retained output without rerunning Replay directory access
mrun Bound foreground output, optionally keeping its ending The wrapped command
mchanges Review/compose/revert/reapply captured edits by ID Replay directory access
mcat Batched UTF-8 reads, ranges, tails None
msymbol Batched definitions/references Go: gopls; JS/TS/JSON: TypeScript 7 tsc; Python: pyright-langserver
inspect_file Structural outlines None
mchanges amber1..amber3 --summary
mchanges revert amber2
mcat --number source.ts 10-20 40:60
mread REF

Captured edits are not a live Git diff. Named ignored files are included; unknown-target commands capture observed effects, possibly from other writers. Previews are provisional; missing evidence is labeled. Dependency-directory contents are not retained and cannot be reverted/reapplied. Revert merges later edits, may create conflicts, and is captured too. See changes and reads.

Configuration

Mekugi settings

Create mekugi/config.toml under $XDG_CONFIG_HOME (default ~/.config on Linux, ~/Library/Application Support on macOS). Optional sections are read at startup, never rewritten:

[service_tiers]
"gpt-6-astra" = "fast"
[providers.opencode_go]
api_key = "your-go-key"
[providers.opencode_zen]
api_key = "your-zen-key"

Exact model IDs select tiers: auto, default, fast (sent as priority), priority, or flex, subject to provider support. /tier choices override defaults for that thread/model during the invocation. The composer shows the effective tier; /session shows the provider-returned tier.

Options
Flag Default Purpose
--ansi-faint auto Detect mosh; on uses ANSI faint, off fixed muted colors
--mode mekugi passthrough forwards Codex without Mekugi tools/plugins
--vcs-guard true Ask before UI remote writes, even with --yolo
--post-compact-recovery true Restore Main after provider compaction
--journal-compaction auto Select reset policy below
--deduplicate-output true Reference duplicates in model input; full results/evidence stay intact
--grok-auth-file ~/.grok/auth.json OAuth store
--timeout 10m Wait for response start
--stream-idle-timeout 4m Limit provider-message or HTTP-byte gaps
--capture-output PATH Disabled Append sanitized JSONL metrics
--debug Disabled Record private diagnostic evidence

mekugi --mode passthrough --vcs-guard=false codex retains Codex policy/metrics, but disables Mekugi tools/plugins/guard and implies --journal-compaction=off; explicit auto/slice is rejected. Use --ansi-faint=off if a multiplexer hides mosh.

Context reset and recovery
--journal-compaction Manual/context-full requests Slice boundaries
auto (default) Journal reset Journal reset
slice Provider compaction Journal reset
off Provider compaction Continue in the same context

Journal resets recover retained work/constraints/change/failure evidence without provider summaries, including children; missing/ambiguous evidence stops reset. Click Context reset from journal for retained recovery text. Interrupted resets may need manual continuation. See reset behavior. The separate post-compaction hook restores Main only. Review via /hooks or opt out with --post-compact-recovery=false; see hook setup.

Troubleshooting and integrations
  • Instructions: wrapped sessions disable /goal; <!-- mekugi:omit --> through <!-- /mekugi:omit --> omits marked blocks without changing files/unmarked policy. With skills-mgr, managed selections attach instructions and the stock catalog is disabled for the session. See guidance.
  • Recovery: see resets and storage.
  • Plugins: put .js/.mjs in user-config mekugi/plugins; see plugins.
  • Issue reports: MEKUGI_DIAGNOSE=1 enables report_issue, running configured hooks.diagnose commands. See setup and effects.
  • Environment: router/executor must share paths/runtime directory; MEKUGI_RUNTIME_DIR overrides the temporary-directory default. Startup errors print before Codex; session failures show commentary/stderr. Finish sessions before replacing older installations; preserve unrelated settings/authentication.
Replay storage

Records live in $XDG_STATE_HOME/mekugi/replay, default ~/.local/state/mekugi/replay. Replay never reruns commands/restores processes. Data is capped at 4 GiB, removed after 14 inactive days; capacity cleanup removes oldest inactive sessions, never running work. Codex chats/workspace files are never deleted. Cleanup invalidates references; power loss can lose recent records. If retention fails, free space and retry retention, not the operation. Stop wrappers before moving storage aside. Use mekugi inspect-storage; see storage details.

Metrics

/session shows launch-wide usage/retries/coverage/throughput/cache/transport. Left/Right or Tab switches tabs; Up/Down/PgUp/PgDn scrolls, [/] selects exchanges, r refreshes, Esc closes. Launch totals do not restore; the roster retains thread usage. Throughput divides authoritative output tokens (including reasoning) by measured request seconds, including latency/retries, excluding tools/idle time. Missing measurements are unavailable; costs are API estimates, not subscription charges. Local estimates are not billing figures. See metrics.

curl -sS "${MEKUGI_BASE_URL%/v1}/api/metrics"
mekugi --capture-output capture.jsonl codex

Captures exclude prompts, patches, and credentials.

Documentation

Contributing · Product · Interfaces · Architecture · Comparisons · Codex end-to-end checks

License

MIT. See LICENSE.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReviewAction

type ReviewAction string

ReviewAction classifies a committed before/after file identity. Renderers use this one classification instead of inferring operation labels independently.

const (
	ReviewAdd    ReviewAction = "add"
	ReviewUpdate ReviewAction = "update"
	ReviewDelete ReviewAction = "delete"
	ReviewMove   ReviewAction = "move"
)

func (ReviewAction) Title

func (action ReviewAction) Title() string

Title returns the user-facing operation name for reports and commentary.

type ReviewComposition

type ReviewComposition struct {
	// contains filtered or unexported fields
}

ReviewComposition composes one file's ordered, applied review captures. It retains only captured lines, not source files. Its zero value is ready to use. Hidden captures hide their regions without discarding the original baseline.

func (*ReviewComposition) ApplyWithHighlight

func (c *ReviewComposition) ApplyWithHighlight(file ReviewFile, hidden, highlighted bool) error

ApplyWithHighlight also marks touched net regions for auxiliary display. It validates the captured chain before publishing any new composition. The hidden flag prevents a late receipt from reviving already hidden content. Highlights follow source regions through composition, not rendered line numbers. Hidden captures cannot introduce highlights; a full revert removes them.

func (*ReviewComposition) Consistent

func (c *ReviewComposition) Consistent(content string) bool

Consistent reports whether content agrees with every source line the composition has learned at its current positions. An edit made outside the composed captures breaks this, even when no captured hunk would touch it.

func (*ReviewComposition) FilesWithHighlights

func (c *ReviewComposition) FilesWithHighlights() []ReviewHighlightedFile

FilesWithHighlights returns visible unhidden original-to-latest regions, with highlights introduced by ApplyWithHighlight. Matching captured context is included when available; unknown source is never synthesized. Path-only changes mark their header projection.

type ReviewFile

type ReviewFile struct {
	BeforePath string
	AfterPath  string
	Diff       string
	// Incomplete describes unavailable content; it is not an empty-file diff.
	Incomplete string `json:",omitzero"`
	// Directory is a metadata-only directory change. Its contents and descendant
	// paths are not retained and cannot be composed, reverted or reapplied.
	Directory bool `json:",omitzero"`
	// Binary marks intact non-text content, reviewed by size and hash only.
	Binary bool `json:",omitzero"`
	// Link marks a symbolic link on either side; its rows are link targets,
	// not file content.
	Link bool `json:",omitzero"`
	// CopyFrom names an unchanged source whose content an added file copies.
	CopyFrom string `json:",omitzero"`
	// Origin labels the tool that chose this file or its content. Empty means
	// the agent chose both.
	Origin     string `json:",omitzero"`
	OriginNote string `json:",omitzero"`
}

ReviewFile is an immutable original-to-final review projection. Unlike the executor patch it includes deleted content and preserves line-ending changes. Paths are empty on the absent side of an addition or deletion.

func RenderBinaryReviewFile

func RenderBinaryReviewFile(beforePath, afterPath string, beforeSize, afterSize int64, beforeHash, afterHash string) ReviewFile

RenderBinaryReviewFile reviews intact non-text content without source rows, in the spirit of git's "Binary files differ".

func RenderIncompleteReviewFile

func RenderIncompleteReviewFile(beforePath, afterPath, reason string) ReviewFile

RenderIncompleteReviewFile retains an applied operation's identity without inventing source rows when its contents could not be captured.

func RenderReviewFile

func RenderReviewFile(beforePath, afterPath, before, after string) ReviewFile

RenderReviewFile captures an operation-owned before/after pair using the same diff semantics as engine edits. An empty path denotes an absent side. Pure moves may supply empty contents on both sides without reading the source.

func RenderReviewPreviewFile

func RenderReviewPreviewFile(beforePath, afterPath, before, after string) ReviewFile

RenderReviewPreviewFile projects provisional before/after content with compact context. It is display-only, not completed historical capture evidence.

func RenderUnbasedReviewFile

func RenderUnbasedReviewFile(path, after, reason string) ReviewFile

RenderUnbasedReviewFile shows a file's current content when its prior content is unknown. The rows are context for review, not a diff against an empty file, so line counts stay unavailable.

func (ReviewFile) Action

func (file ReviewFile) Action() ReviewAction

Action classifies the committed file operation from its captured identities.

func (ReviewFile) Hunks

func (file ReviewFile) Hunks() ([]ReviewHunk, error)

Hunks exposes captured geometry without reading files or duplicating the engine's diff parser in viewers. Path-only changes return no hunks.

func (ReviewFile) LineCounts

func (file ReviewFile) LineCounts() (added, removed int)

LineCounts counts added and removed source rows in a captured review projection. File headers, context, and missing-final-newline markers are not source changes. Incomplete captures return -1 for both counts.

func (ReviewFile) Merge

func (file ReviewFile) Merge(current string, reverse bool, label string) (ReviewMerge, error)

Merge applies the captured hunks to current content: forward replays the recorded change and reverse undoes it. A hunk is located exactly near its recorded position first. Otherwise its surrounding context anchors a region that is merged three ways, leaving conflict markers where the region and the requested side both changed. A hunk without locatable context is rejected instead of guessed. Captures hold only hunk context, so no file is read.

func (ReviewFile) UnifiedDiff

func (file ReviewFile) UnifiedDiff() string

UnifiedDiff omits the redundant operation header when unified headers already describe the file. Header-only changes (empty files and pure moves) retain it. Rendering captured records here also keeps historical reads consistent.

func (ReviewFile) UnifiedDiffForWorkspace

func (file ReviewFile) UnifiedDiffForWorkspace(workspace string) string

UnifiedDiffForWorkspace shortens display headers without changing retained paths or source rows. Composition and filesystem operations use the originals.

type ReviewHighlightedFile

type ReviewHighlightedFile struct {
	ReviewFile
	Highlighted bool
}

ReviewHighlightedFile pairs a composed projection with process-local display metadata. Highlights are not part of immutable captured ReviewFile records.

type ReviewHunk

type ReviewHunk struct {
	BeforeStart, AfterStart int
	ChangedStart            int
	Rows                    []ReviewRow
}

ReviewHunk is one validated captured hunk with zero-based source coordinates. ChangedStart excludes leading context; deletions use their anchor. Rows exposes source content without diff framing.

type ReviewMerge

type ReviewMerge struct {
	Content string
	// Conflicts counts regions written with git-style conflict markers.
	Conflicts int
	// Satisfied counts hunks whose requested side was already present.
	Satisfied int
	// Rejected holds captured hunks, in review format, that could not be located.
	Rejected []string
}

ReviewMerge is the result of replaying or undoing one captured review against current content. Rejected hunks are left out of Content.

type ReviewRow

type ReviewRow struct {
	Kind byte
	Text string
}

ReviewRow is a validated source row. Kind is ' ', '-', or '+' for context, removal, or addition. Text retains source bytes, including its line terminator; a missing final newline is represented by the absence of that terminator.

Directories

Path Synopsis
Package capturer observes the router's existing client and provider seams without adding a listener or changing request and response bytes.
Package capturer observes the router's existing client and provider seams without adding a listener or changing request and response bytes.
cmd
mekugi command
mekugi-exec command
Command mekugi-exec tracks the segments of one Codex command script.
Command mekugi-exec tracks the segments of one Codex command script.
internal
appserver
Package appserver owns the Codex stdio RPC connection and its child process.
Package appserver owns the Codex stdio RPC connection and its child process.
chat
Package chat classifies Chat Completions wire facts.
Package chat classifies Chat Completions wire facts.
commentaryid
Package commentaryid owns the reserved IDs used for router-generated messages.
Package commentaryid owns the reserved IDs used for router-generated messages.
execscope
Package execscope derives bounded write scopes without executing the user's program.
Package execscope derives bounded write scopes without executing the user's program.
execsegment
Package execsegment splits a Codex command script into its top-level segments and instruments them for per-segment tracking.
Package execsegment splits a Codex command script into its top-level segments and instruments them for per-segment tracking.
gooutline
Package gooutline supplies declaration boundaries from the host Go grammar.
Package gooutline supplies declaration boundaries from the host Go grammar.
outputdedupe
Package outputdedupe finds repeated line runs in earlier visible text.
Package outputdedupe finds repeated line runs in earlier visible text.
persistence
Package persistence owns application-write accounting and atomic publication.
Package persistence owns application-write accounting and atomic publication.
responses
Package responses owns wire-level Responses event facts, not feature policy, transport lifetimes, or execution.
Package responses owns wire-level Responses event facts, not feature policy, transport lifetimes, or execution.
sharedwasm command
sourceparse
Package sourceparse shares read-only source input and syntax between classifiers and literal previews.
Package sourceparse shares read-only source input and syntax between classifiers and literal previews.
sudoask
Package sudoask owns invocation-local sudo askpass setup.
Package sudoask owns invocation-local sudo askpass setup.
tokenizer
Source: github.com/tiktoken-go/tokenizer/codec/codec.go@v0.8.1 The splitting and byte-pair merge algorithm is retained verbatim; long pieces use an equivalent heap merge, and vocabulary storage is owned by tokenizer.go.
Source: github.com/tiktoken-go/tokenizer/codec/codec.go@v0.8.1 The splitting and byte-pair merge algorithm is retained verbatim; long pieces use an equivalent heap merge, and vocabulary storage is owned by tokenizer.go.
tokenizer/regex
Package codec registers the pinned upstream generated regex engines.
Package codec registers the pinned upstream generated regex engines.
ui/activity
Package activity renders display-only activity blocks, Markdown, and journal result layouts.
Package activity renders display-only activity blocks, Markdown, and journal result layouts.
ui/diffview
Package diffview presents captured diff navigation and provisional live cards.
Package diffview presents captured diff navigation and provisional live cards.
ui/mermaid
Package mermaid renders an extended bounded Codex flowchart subset without I/O. Source: codex-rs/mermaid/src/parse.rs:15:217@[687a119f0fcaace47e1f1abcc77cec6c813fd6da] parse Source: codex-rs/mermaid/src/syntax.rs:9:105@[687a119f0fcaace47e1f1abcc77cec6c813fd6da] statements
Package mermaid renders an extended bounded Codex flowchart subset without I/O. Source: codex-rs/mermaid/src/parse.rs:15:217@[687a119f0fcaace47e1f1abcc77cec6c813fd6da] parse Source: codex-rs/mermaid/src/syntax.rs:9:105@[687a119f0fcaace47e1f1abcc77cec6c813fd6da] statements
ui/terminal
Package terminal provides terminal input, scrolling, and raw-mode lifecycle primitives independently of router state and pane composition.
Package terminal provides terminal input, scrolling, and raw-mode lifecycle primitives independently of router state and pane composition.
uisnapshot
Package uisnapshot supports rendered UI regression fixtures in tests.
Package uisnapshot supports rendered UI regression fixtures in tests.
vcsguard
Package vcsguard decides which version-control invocations publish to a remote, and defines the approval channel between a guarded command and the router.
Package vcsguard decides which version-control invocations publish to a remote, and defines the approval channel between a guarded command and the router.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL