internal/

directory
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: MIT

Directories

Path Synopsis
Package agent knows the coding agents a launch can start, Claude Code and OpenAI Codex, and checks the options a launch passes them, so every place that stores those options (profiles, prompts, and launch defaults) and the launcher that passes them apply the same rules.
Package agent knows the coding agents a launch can start, Claude Code and OpenAI Codex, and checks the options a launch passes them, so every place that stores those options (profiles, prompts, and launch defaults) and the launcher that passes them apply the same rules.
Package appdata resolves where the application keeps its per-user data: the SQLite database, the copies of the prompt library and the launch defaults kept beside it, generated launch scripts, and logs.
Package appdata resolves where the application keeps its per-user data: the SQLite database, the copies of the prompt library and the launch defaults kept beside it, generated launch scripts, and logs.
Package appinfo tells the frontend who the app is and takes its first-paint report.
Package appinfo tells the frontend who the app is and takes its first-paint report.
Package avatars keeps the profile pictures of the people the sheets show, by login.
Package avatars keeps the profile pictures of the people the sheets show, by login.
Package backup exports the user's whole setup to one file and imports it back: their settings, their repositories, the prompt library, the launch defaults, and their own scripts, each a category the user ticks on export and again on import (see File for the format).
Package backup exports the user's whole setup to one file and imports it back: their settings, their repositories, the prompt library, the launch defaults, and their own scripts, each a category the user ticks on export and again on import (see File for the format).
Package branchrules holds the user's rules for deleting local branches: which branches go with a worktree the app removes or cleans up, whether a branch whose pull request merged starts checked in the cleanup of a clone's merged branches, and which branches are never deleted.
Package branchrules holds the user's rules for deleting local branches: which branches go with a worktree the app removes or cleans up, whether a branch whose pull request merged starts checked in the cleanup of a clone's merged branches, and which branches are never deleted.
Package brand is the single source of truth for the product's identity: its name, identifiers, tagline, color palette, and logo mark.
Package brand is the single source of truth for the product's identity: its name, identifiers, tagline, color palette, and logo mark.
Package brandgen renders the files that are generated from internal/brand: the frontend's theme tokens and brand constants, the macOS app bundle's Info.plist, and the app icon artwork that `magex brand:icons` renders into the raster icons.
Package brandgen renders the files that are generated from internal/brand: the frontend's theme tokens and brand constants, the macOS app bundle's Info.plist, and the app icon artwork that `magex brand:icons` renders into the raster icons.
Package budget keeps the app's view of the user's GitHub API budgets current.
Package budget keeps the app's view of the user's GitHub API budgets current.
Package bump recognizes a dependency-update pull request from its title, as Dependabot and Renovate write them, and says how big its version jump is.
Package bump recognizes a dependency-update pull request from its title, as Dependabot and Renovate write them, and says how big its version jump is.
Package clock tells the services the time and writes times the one way the app does.
Package clock tells the services the time and writes times the one way the app does.
Package clonelock keeps one clone-changing job at a time on each clone: a worktree made or removed, a release, a hooks install, a checks run, a script, or a pull.
Package clonelock keeps one clone-changing job at a time on each clone: a worktree made or removed, a release, a hooks install, a checks run, a script, or a pull.
Package core assembles the app: it prepares the data directory, opens and migrates the database (starting over first when the user asked to), syncs the discovered agent profiles, brings back the prompt library, the launch defaults, and the user's own scripts the database lost, adds the starter prompts, decides once whether the first-run setup shows, and builds every service the window binds to.
Package core assembles the app: it prepares the data directory, opens and migrates the database (starting over first when the user asked to), syncs the discovered agent profiles, brings back the prompt library, the launch defaults, and the user's own scripts the database lost, adds the starter prompts, decides once whether the first-run setup shows, and builds every service the window binds to.
Package desktop is the desktop shell's logic, kept apart from the desktop runtime: what the app does with the services' events, how the menu bar icon is kept current, the background work that runs while the app is open, and the order the app shuts down in.
Package desktop is the desktop shell's logic, kept apart from the desktop runtime: what the app does with the services' events, how the menu bar icon is kept current, the background work that runs while the app is open, and the order the app shuts down in.
Package event defines what happens in the app that another part of it reacts to: one Go type per event, the name each is known by, and the Sink that receives them.
Package event defines what happens in the app that another part of it reacts to: one Go type per event, the name each is known by, and the Sink that receives them.
Package execpath finds the external programs the app runs (gh, git, claude) and runs them.
Package execpath finds the external programs the app runs (gh, git, claude) and runs them.
Package flight runs one call per key at a time and hands its result to every caller that asked while it ran, the way golang.org/x/sync/singleflight does, with each caller's context kept:
Package flight runs one call per key at a time and hands its result to every caller that asked while it ran, the way golang.org/x/sync/singleflight does, with each caller's context kept:
Package ghthreads mirrors the user's GitHub notifications, which GitHub's REST API calls threads, as the web inbox lists them (read and unread, not done), in the gh_threads table it owns, one row per account and thread, so the window counts and lists them without asking GitHub, and clears them by the user's rules (clear.go): it marks a thread done, or read, once the work behind it is finished.
Package ghthreads mirrors the user's GitHub notifications, which GitHub's REST API calls threads, as the web inbox lists them (read and unread, not done), in the gh_threads table it owns, one row per account and thread, so the window counts and lists them without asking GitHub, and clears them by the user's rules (clear.go): it marks a thread done, or read, once the work behind it is finished.
Package github talks to GitHub on the user's behalf.
Package github talks to GitHub on the user's behalf.
Package gitread runs the read-only git commands the release, hooks, and Repo scripts services ask of a clone, and reads their answers: the current branch, uncommitted changes, what git is in the middle of, branches and tags here and on origin, the commits between two, the signing settings, and where the hooks live.
Package gitread runs the read-only git commands the release, hooks, and Repo scripts services ask of a clone, and reads their answers: the current branch, uncommitted changes, what git is in the middle of, branches and tags here and on origin, the commits between two, the signing settings, and where the hooks live.
Package hooks is the Hooks page's service: the clones in the repository locations with a go-pre-commit config, the pre-commit hook in each, and what go-pre-commit does in them on the user's click, installing, updating, replacing, or removing the hook, and running the checks.
Package hooks is the Hooks page's service: the clones in the repository locations with a go-pre-commit config, the pre-commit hook in each, and what go-pre-commit does in them on the user's click, installing, updating, replacing, or removing the hook, and running the checks.
Package inbox keeps the local inbox in step with GitHub and serves it to the UI.
Package inbox keeps the local inbox in step with GitHub and serves it to the UI.
Package integrationprefs declares the integrations' preference keys and decodes and encodes their values: whether each integration is on, off, or automatic, which copy of a tool to use, where the runs go, whether a merge offers a release, which sources Repo scripts lists, whether a run Repo scripts starts shows beside its scripts, and the window's memory of the Scripts tab (whether it was announced, the page and clone it reopens on, and the sections the user opened or folded).
Package integrationprefs declares the integrations' preference keys and decodes and encodes their values: whether each integration is on, off, or automatic, which copy of a tool to use, where the runs go, whether a merge offers a release, which sources Repo scripts lists, whether a run Repo scripts starts shows beside its scripts, and the window's memory of the Scripts tab (whether it was announced, the page and clone it reopens on, and the sections the user opened or folded).
Package integrations finds the tools the app drives, mage-x's magex and go-pre-commit, says what the settings show about each, and checks once a day for a newer release.
Package integrations finds the tools the app drives, mage-x's magex and go-pre-commit, says what the settings show about each, and checks once a day for a newer release.
Package issues is the issue sheet: it shows one issue the user is assigned (its description, its conversation, where it stands, and the details beside it) and acts on it at the user's click: comment on it, or close it as completed or as not planned.
Package issues is the issue sheet: it shows one issue the user is assigned (its description, its conversation, where it stands, and the details beside it) and acts on it at the user's click: comment on it, or close it as completed or as not planned.
Package item names the pull requests and issues the app works on: their kind, a reference to one item, and the name of the worktree a session on an item runs in.
Package item names the pull requests and issues the app works on: their kind, a reference to one item, and the name of the worktree a session on an item runs in.
Package launchdefaults stores launch defaults for orgs and repositories: the coding agent, each agent's profile, model, and extra flags, the default prompt for each kind of item, and the effort, plan mode, and worktree that launches on their items start from.
Package launchdefaults stores launch defaults for orgs and repositories: the coding agent, each agent's profile, model, and extra flags, the default prompt for each kind of item, and the effort, plan mode, and worktree that launches on their items start from.
Package launcher starts a coding-agent session (Claude Code or Codex) on a pull request or issue.
Package launcher starts a coding-agent session (Claude Code or Codex) on a pull request or issue.
terminal
Package terminal opens launch scripts in the user's terminal app.
Package terminal opens launch scripts in the user's terminal app.
Package localrepos finds the user's local clones of GitHub repositories.
Package localrepos finds the user's local clones of GitHub repositories.
Package logging builds the app's one logger.
Package logging builds the app's one logger.
Package measure times the app for its performance record: startup to the first painted frame, the batched inbox refresh, an agent launch, and the size of the app bundle.
Package measure times the app for its performance record: startup to the first painted frame, the batched inbox refresh, an agent launch, and the size of the app bundle.
Package menubar works out what the app's menu bar icon shows for the stored inbox, the agent sessions, and the app's update: how many items need the user, beside the icon, and in its menu the sessions waiting for the user first, then a short list of the items, by list, then Check for Updates… and the update ready, in a build that updates.
Package menubar works out what the app's menu bar icon shows for the stored inbox, the agent sessions, and the app's update: how many items need the user, beside the icon, and in its menu the sessions waiting for the user first, then a short list of the items, by list, then Check for Updates… and the update ready, in a build that updates.
Package notify tells the user about the items that newly need them, and keeps a log of everything it told.
Package notify tells the user about the items that newly need them, and keeps a log of everything it told.
Package notifyprefs reads and writes which kinds of notification show a banner, the pref the settings page changes and the notify package obeys.
Package notifyprefs reads and writes which kinds of notification show a banner, the pref the settings page changes and the notify package obeys.
Package paths turns the paths a user types into absolute ones and back: a leading ~ expands to the home directory, and a path under home is shown as ~/....
Package paths turns the paths a user types into absolute ones and back: a leading ~ expands to the home directory, and a path under home is shown as ~/....
Package periodic runs a job now and then, as often as a setting says, until its context ends, the way the inbox refresh, the checks follower, and the worktree sweep run.
Package periodic runs a job now and then, as often as a setting says, until its context ends, the way the inbox refresh, the checks follower, and the worktree sweep run.
Package prefs owns the prefs table: the user's settings and the app state that has no table of its own, each stored as text under a string key.
Package prefs owns the prefs table: the user's settings and the app state that has no table of its own, each stored as text under a string key.
prefval
Package prefval reads and writes the two shapes of value most preferences hold: a switch, stored as a boolean, and a list, stored as a JSON array of strings.
Package prefval reads and writes the two shapes of value most preferences hold: a switch, stored as a boolean, and a list, stored as a JSON array of strings.
Package procs lists the running processes of the signed-in user with the directory each works in, so the app can tell a worktree some session still runs in, whichever coding agent or tool that is.
Package procs lists the running processes of the signed-in user with the directory each works in, so the app can tell a worktree some session still runs in, whichever coding agent or tool that is.
Package profiles discovers the user's coding-agent profiles and serves them to the UI.
Package profiles discovers the user's coding-agent profiles and serves them to the UI.
Package progress tells the window how far a long read has got while it runs: the phase under way and how many of the phase's things are done, as an event the caller builds, at most a few times a second.
Package progress tells the window how far a long read has got while it runs: the phase under way and how many of the phase's things are done, as an event the caller builds, at most a few times a second.
Package prompts is the prompt library: the prompts a launch can fill in for a pull request or issue, with the launch settings each one sets, and the defaults for each kind of item; and, beside them in the same table, the review replies the review sheet fills in as the text of a review (see Purpose).
Package prompts is the prompt library: the prompts a launch can fill in for a pull request or issue, with the launch settings each one sets, and the defaults for each kind of item; and, beside them in the same table, the review replies the review sheet fills in as the text of a review (see Purpose).
Package release is the Release page's service: which clones have changes to release, and the release itself, through mage-x's magex.
Package release is the Release page's service: which clones have changes to release, and the release itself, through mage-x's magex.
Package repo names GitHub repositories: an owner and a repository name, checked against GitHub's own rules, compared ignoring case, and written as "owner/name".
Package repo names GitHub repositories: an owner and a repository name, checked against GitHub's own rules, compared ignoring case, and written as "owner/name".
Package repoguard holds repository-wide guard tests.
Package repoguard holds repository-wide guard tests.
Package reporules holds the user's rules for whole repositories and orgs: a pinned one's pull requests and issues count as pinned in the inbox, and a muted one's are set apart in each list's Muted tab, counted nowhere, told in no banner, and followed by nothing.
Package reporules holds the user's rules for whole repositories and orgs: a pinned one's pull requests and issues count as pinned in the inbox, and a muted one's are set apart in each list's Muted tab, counted nowhere, told in no banner, and followed by nothing.
Package review is the review sheet: it shows one pull request (what it changes, its description, checks, reviewers, its conversation, and what it still needs to merge) and acts on it at the user's click: approve, request changes, comment, merge, turn on auto-merge, update the branch, ask Dependabot to rebase, or close it.
Package review is the review sheet: it shows one pull request (what it changes, its description, checks, reviewers, its conversation, and what it still needs to merge) and acts on it at the user's click: approve, request changes, comment, merge, turn on auto-merge, update the branch, ask Dependabot to rebase, or close it.
Package scriptrun runs the commands of the Scripts tab, a release, a hooks action, a checks run, a script, or a clone's fast-forward pull, and a tool's own updater, in the app or in the user's terminal, and keeps their history.
Package scriptrun runs the commands of the Scripts tab, a release, a hooks action, a checks run, a script, or a clone's fast-forward pull, and a tool's own updater, in the app or in the user's terminal, and keeps their history.
scriptruntest
Package scriptruntest is the runner the suites of scriptrun's kinds share (hooks, scripts, and release): a real scriptrun Engine and its Service over a fresh database, the app's next start over the same history, a fake terminal app that runs each run meant for the user's terminal under /bin/sh (Terminal), and waits for a run's end that look again only when the engine says the runs changed, never on a timer (AwaitShell alone polls, for a shell the engine notes without telling).
Package scriptruntest is the runner the suites of scriptrun's kinds share (hooks, scripts, and release): a real scriptrun Engine and its Service over a fresh database, the app's next start over the same history, a fake terminal app that runs each run meant for the user's terminal under /bin/sh (Terminal), and waits for a run's end that look again only when the engine says the runs changed, never on a timer (AwaitShell alone polls, for a shell the engine notes without telling).
Package scripts is Repo scripts' service: the commands a clone's own files name (its t3.json scripts, its .vscode/tasks.json tasks, and its magex targets), listed for the page, and run on the user's click through scriptrun.
Package scripts is Repo scripts' service: the commands a clone's own files name (its t3.json scripts, its .vscode/tasks.json tasks, and its magex targets), listed for the page, and run on the user's click through scriptrun.
Package semver reads semantic versions and compares them by semantic versioning's precedence: MAJOR.MINOR.PATCH, with an optional prerelease (-rc.1) and build metadata (+build.5), with or without a leading v.
Package semver reads semantic versions and compares them by semantic versioning's precedence: MAJOR.MINOR.PATCH, with an optional prerelease (-rc.1) and build metadata (+build.5), with or without a leading v.
Package sensitive decides which of a pull request's changed files deserve a closer look before anyone reviews, merges, or opens an agent on it: files that run on CI with the repository's token and secrets, files a coding agent loads or runs, files that run on the reviewer's machine, files that change who must review, and files that bring in third-party code.
Package sensitive decides which of a pull request's changed files deserve a closer look before anyone reviews, merges, or opens an agent on it: files that run on CI with the repository's token and secrets, files a coding agent loads or runs, files that run on the reviewer's machine, files that change who must review, and files that bring in third-party code.
Package sessions follows the coding-agent sessions the app launches, from the item each was launched on, while they run in the user's own terminal.
Package sessions follows the coding-agent sessions the app launches, from the item each was launched on, while they run in the user's own terminal.
observe/claude
Package claude observes Claude Code sessions through `claude agents --json`, which Claude Code documents as the supported way to read session state from outside it, and reads a session's last message from the transcript it keeps.
Package claude observes Claude Code sessions through `claude agents --json`, which Claude Code documents as the supported way to read session state from outside it, and reads a session's last message from the transcript it keeps.
observe/codex
Package codex observes OpenAI Codex sessions through the local app-server daemon's JSON-RPC protocol, the one Codex's own IDE and desktop clients use, reached through `codex app-server proxy`.
Package codex observes OpenAI Codex sessions through the local app-server daemon's JSON-RPC protocol, the one Codex's own IDE and desktop clients use, reached through `codex app-server proxy`.
Package settings stores the user's preferences in the prefs table and serves them to the UI.
Package settings stores the user's preferences in the prefs table and serves them to the UI.
Package setup is the first-run setup's service: where the user is in it and whether it is done, and the checks its steps make that no other service makes for them: whether the GitHub CLI's sign-in gives the inbox what it needs, which terminals are installed, and how many of the user's clones use the tools the Tools step offers.
Package setup is the first-run setup's service: where the user is in it and whether it is done, and the checks its steps make that no other service makes for them: whether the GitHub CLI's sign-in gives the inbox what it needs, which terminals are installed, and how many of the user's clones use the tools the Tools step offers.
Package shellenv reads the environment the user's login shell sets up, as editors do, so the tools the app runs see the PATH, the ssh agent, and the settings the user's terminal has.
Package shellenv reads the environment the user's login shell sets up, as editors do, so the tools the app runs see the PATH, the ssh agent, and the settings the user's terminal has.
Package snooze decides how long a snooze lasts and what new activity ends one early.
Package snooze decides how long a snooze lasts and what new activity ends one early.
Package statusprefs holds the catalog of the status pages the app checks (GitHub's, Claude's, and OpenAI's) and the user's choices of what to watch on them: which providers are on, and which of each one's parts count.
Package statusprefs holds the catalog of the status pages the app checks (GitHub's, Claude's, and OpenAI's) and the user's choices of what to watch on them: which providers are on, and which of each one's parts count.
Package store opens the application's local SQLite database.
Package store opens the application's local SQLite database.
migrate
Package migrate applies the application's SQLite schema migrations.
Package migrate applies the application's SQLite schema migrations.
Package svcstatus follows the status pages of the services the app depends on (GitHub, Claude, and OpenAI's Codex), so the window can say, without getting in the way, when a part the user watches has an incident: the inbox, reviews, and checks can lag or fail while GitHub has one, and the agents the app launches while Claude or Codex do.
Package svcstatus follows the status pages of the services the app depends on (GitHub, Claude, and OpenAI's Codex), so the window can say, without getting in the way, when a part the user watches has an incident: the inbox, reviews, and checks can lag or fail while GitHub has one, and the agents the app launches while Claude or Codex do.
Package testutil holds the helpers and fakes the test suites share: a fresh database, an isolated git, git repositories built once per test binary and copied into each test (GitTemplate), programs planted in a clone's own config for the guard tests, temporary files and agent homes, recorded runs of real tools (Recording), fakes for the small interfaces services take (a program runner, a program finder, a clock, and an event sink), and an in-memory log.
Package testutil holds the helpers and fakes the test suites share: a fresh database, an isolated git, git repositories built once per test binary and copied into each test (GitTemplate), programs planted in a clone's own config for the guard tests, temporary files and agent homes, recorded runs of real tools (Recording), fakes for the small interfaces services take (a program runner, a program finder, a clock, and an event sink), and an in-memory log.
Package textutil holds the small text helpers the services share for what they show: cutting text to a length, turning an error message into a sentence, counting a noun and listing names as a sentence does, handing the UI an empty list instead of a nil one, and quoting a word for a POSIX shell, always (ShellQuote) or only when it needs it (ShellWord).
Package textutil holds the small text helpers the services share for what they show: cutting text to a length, turning an error message into a sentence, counting a noun and listing names as a sentence does, handing the UI an empty list instead of a nil one, and quoting a word for a POSIX shell, always (ShellQuote) or only when it needs it (ShellWord).
Package threadrules holds the user's rules for their GitHub notifications, the threads GitHub keeps for each pull request and issue: whether the app reads them, whether it clears one on its own once the work behind it is finished, whether clearing marks it done or read, and which moments count as finished.
Package threadrules holds the user's rules for their GitHub notifications, the threads GitHub keeps for each pull request and issue: whether the app reads them, whether it clears one on its own once the work behind it is finished, whether clearing marks it done or read, and which moments count as finished.
Package timeline is the conversation the issue sheet and the review sheet show: the comments, reviews, and events of an issue or a pull request, one page of entries at a time, oldest first.
Package timeline is the conversation the issue sheet and the review sheet show: the comments, reviews, and events of an issue or a pull request, one page of entries at a time, oldest first.
Package timing measures how long the app takes to show its first frame.
Package timing measures how long the app takes to show its first frame.
Package toolinstall turns a tool's GitHub release into a verified program in place: it picks the release's archive and checksums file, downloads both into a fresh private folder, checks the archive against the checksums file and GitHub's digests, extracts the program's one entry, tries it, and puts it in its folder so that the target is never missing, rolling back when the placed copy won't run.
Package toolinstall turns a tool's GitHub release into a verified program in place: it picks the release's archive and checksums file, downloads both into a fresh private folder, checks the archive against the checksums file and GitHub's digests, extracts the program's one entry, tries it, and puts it in its folder so that the target is never missing, rolling back when the placed copy won't run.
Package trust decides whether a pull request or issue comes from someone trusted with the repository.
Package trust decides whether a pull request or issue comes from someone trusted with the repository.
Package uierr keeps what the user is told about a failure apart from the error the logs record.
Package uierr keeps what the user is told about a failure apart from the error the logs record.
Package update is how the app updates itself.
Package update is how the app updates itself.
Package updateprefs declares the update setting's key and its choices: what the app does when a new version is out (update.mode).
Package updateprefs declares the update setting's key and its choices: what the app does when a new version is out (update.mode).
Package worklog records the worktrees the app made for pull requests and issues, which item each is for and the sessions started in it, and the worktrees it cleaned up.
Package worklog records the worktrees the app made for pull requests and issues, which item each is for and the sessions started in it, and the worktrees it cleaned up.
Package workspacetrust marks the folder a session starts in trusted in the coding agent's own config, so a session launched there starts without the agent's workspace trust question.
Package workspacetrust marks the folder a session starts in trusted in the coding agent's own config, so a session launched there starts without the agent's workspace trust question.
Package worktrees makes the worktrees coding sessions run in, keeps track of them, lists the git worktrees of the user's local clones, and removes them safely.
Package worktrees makes the worktrees coding sessions run in, keeps track of them, lists the git worktrees of the user's local clones, and removes them safely.

Jump to

Keyboard shortcuts

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