diff --git a/README.md b/README.md index b02c381..05ea581 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ Meith is a desktop AI workbench for building web apps. -It puts the pieces of web app work in one desktop window: project folders, code files, terminals, run commands, dev-server logs, a built-in browser, plugins, and agent chats. A shared tool system connects them. The visual app, CLI, plugins, and agents all work against the same project state, so an agent can edit code, start your dev server, open the app in the browser, click through the UI, read console output, and show you the diff. +It puts the pieces of web app work in one desktop window: project folders, code files, terminals, run commands, dev-server logs, a built-in browser, plugins, and agent chats. A shared tool system connects them. The visual app, CLI, plugins, and agents all work against the same project state, so an agent can edit code, start your dev server, open the app in the browser, click through the UI, read console output, and surface Git changes. -Codex and Claude Code can write code. Meith gives them a place to work: the browser, terminal, logs, files, diffs, and permissions all sit in the same workbench the agent can use. +Codex and Claude Code can write code. Meith gives them a place to work: the browser, terminal, logs, files, Git changes, and permissions all sit in the same workbench the agent can use. Meith doesn't lock you into one AI provider. The agent runtime uses an adapter interface and connects to external agents via ACP (Agent Client Protocol), keeping the desktop app independent of any specific model vendor or SDK. @@ -20,7 +20,7 @@ The name comes from the Irish *meitheal*: a group of people coming together to w * Watch browser state and dev-server logs in the same window. * Split panes to arrange your browser, editor, terminal, or agent side by side. * Ask an agent to build features in the context of your current project: editing files, running the dev server, and checking the app in the browser. -* Review working-tree changes in the built-in Diff tab, with summary counts in the top bar and patches loaded only when you select a file. +* Review and manage working-tree changes in the built-in Git panel, with a top-bar branch switcher, staged and unstaged sections, stage-all, inline diffs, AI commit message suggestions, commit identity switching, commits, and guarded restore actions. * Install web-app plugins and explicitly approve the APIs they can use. * Use the `meith` terminal command to inspect and control a running app instance. @@ -146,7 +146,7 @@ pnpm cli call app_health The CLI covers the registered desktop tool catalog: browser tabs and automation, spaces/workspace tabs, projects/templates, workspace files, -git diff, terminals/dev servers, settings, storage, plugins, and runtime +git status/diff, terminals/dev servers, settings, storage, plugins, and runtime diagnostics. `pnpm cli call ` is the fallback for scripts and tools without a named CLI command yet. diff --git a/apps/web/components/mockups/workbench-mockup.tsx b/apps/web/components/mockups/workbench-mockup.tsx index 4132fa6..801d94d 100644 --- a/apps/web/components/mockups/workbench-mockup.tsx +++ b/apps/web/components/mockups/workbench-mockup.tsx @@ -10,8 +10,12 @@ import { FilePlus, Folder, FolderOpen, + GitBranch, + GitCommit, GitCompare, Hand, + Lightbulb, + ListPlus, Paperclip, PlayIcon, Plus, @@ -38,7 +42,13 @@ const workspaceToggles = [ const agentSessions = [ { title: "Pricing Section", active: true, status: "running", updated: "just now" }, - { title: "Hero Polish", active: false, status: "idle", updated: "12 min ago", unread: true }, + { + title: "Hero Polish", + active: false, + status: "idle", + updated: "12 min ago", + unread: true, + }, { title: "Nav Cleanup", active: false, status: "idle", updated: "31 min ago" }, ]; @@ -91,6 +101,11 @@ export function WorkbenchMockup({ className }: { className?: string }) { ))}
+
+ + main + +
@@ -173,7 +188,9 @@ export function WorkbenchMockup({ className }: { className?: string }) {
- 8 conversations + + 8 conversations +
{agentSessions.map((session) => ( @@ -235,69 +252,73 @@ export function WorkbenchMockup({ className }: { className?: string }) {
-
-
-
- Agent - streaming -
-
-
-
- Thoughts - - · Checking the existing layout and section spacing - - -
-
-
- Thoughts - - 2 updates +
+
+
+ Agent + streaming +
+
+
+
+ + Thoughts + + + · Checking the existing layout and section spacing - +
-
-
- +
+
- Ran 3 commands + Thoughts + + + 2 updates - + +
+
+
+ + + Ran 3 commands + + +
-
-
-
- - Permission required -
-

- The agent wants to run{" "} - project_run to - start a process. -

- -
- - Allow - - - Deny - +
+
+ + Permission required +
+

+ The agent wants to run{" "} + project_run{" "} + to start a process. +

+
+ + Remember for this tool in this session +
+
+ + Allow + + + Deny + +
-
@@ -333,7 +354,7 @@ export function WorkbenchMockup({ className }: { className?: string }) {
- Diff + Git
@@ -343,37 +364,75 @@ export function WorkbenchMockup({ className }: { className?: string }) { +107 - -12 - + + -12 + + + + Stage all + +
-
-
- - - apps - 2 -
-
- - - web -
-
- - page.tsx - - +23{" "} - -12 - +
+
+
+ Staged + 0 +
+
+ No files +
+
+ Changes + 2 +
+
+ + + apps + 2 +
+
+ + + web +
+
+ + page.tsx + + +23{" "} + -12 + +
+
+ + + pricing.tsx + + + +84 + +
-
- - pricing.tsx - - +84 - +
+
+ feat: add pricing section +
+
+ Jordan Harrison <jordan@...> +
+
+ + + + + + Commit + +
@@ -383,6 +442,9 @@ export function WorkbenchMockup({ className }: { className?: string }) { apps/web/app/page.tsx + + Stage + +23{" "} -12 @@ -393,33 +455,51 @@ export function WorkbenchMockup({ className }: { className?: string }) { @@ -12,3 +12,4 @@
- 12 - 12 + + 12 + + + 12 + {""}
- 13 + + 13 + - {"-"} + + {"-"} +
- 13 + + 13 + {"+"}
- 14 + + 14 + {"+"}
- 14 - 15 - {""} + + 14 + + + 15 + + + {""} +
diff --git a/apps/web/components/sections/cta.tsx b/apps/web/components/sections/cta.tsx index 6a5db0a..96b1e5c 100644 --- a/apps/web/components/sections/cta.tsx +++ b/apps/web/components/sections/cta.tsx @@ -19,7 +19,7 @@ export function Cta() {

Free and open source. Use meith to give your agent the editor, terminal, - browser, logs, and diffs it needs to build and check the app. + browser, logs, and Git panel it needs to build and check the app.

- AI agents can write code. meith gives them the rest of the loop: - files, terminal, a browser they can control, logs, diffs, and permissions in + AI agents can write code. meith gives them the rest of the loop: files, + terminal, a browser they can control, logs, Git changes, and permissions in one desktop app.

diff --git a/apps/web/components/sections/how-it-works.tsx b/apps/web/components/sections/how-it-works.tsx index cf1786f..0fd42b2 100644 --- a/apps/web/components/sections/how-it-works.tsx +++ b/apps/web/components/sections/how-it-works.tsx @@ -65,7 +65,12 @@ export function HowItWorks() {
- {["app state", "files and diffs", "browser control", "permissions & audit"].map((label) => ( + {[ + "app state", + "files and Git", + "browser control", + "permissions & audit", + ].map((label) => (
.json` records live runtime instances so the CLI can list, target, or kill them. - `/state.json` stores spaces, projects, browser tabs, workspace tabs - (including editor file focus and diff-tab selected file), file edit events, + (including editor file focus and git-tab selected file), file edit events, plugins, and app settings. - `/logs.jsonl` stores app logs. - `/audit.jsonl` stores tool authorization/audit records. @@ -177,16 +177,19 @@ Major surfaces: - `TerminalView` for PTY sessions. - `AgentView` for session list, transcript, composer, stop button, and permission cards. -- `DiffView` for a working-tree diff tab with a folder tree, refreshed summary - counts, persisted selected-file state, and lazy patch loading for the selected - file. +- `GitPanel` for the Git tab with staged/unstaged trees, commit + controls, stage-all, guarded restore actions, AI commit-message suggestions + via the renderer completion bridge, refreshed summary counts, persisted + selected-file state, and lazy patch loading for the selected file. - `SettingsView` for app preferences, per-project run commands, agent config, plugin management, and about info. - `DebugPanel` for tool runner, state, logs, and output diagnostics. - `StatusBar` for connection, tab counts, running process count, and active port. The renderer does not mutate services directly. It calls tools or dedicated IPC -stream channels, then re-renders from pushed app state. +stream channels, then re-renders from pushed app state. Short AI-assisted UI +features use `window.meith.ai.complete`, a one-shot completion bridge backed by +the configured agent adapter rather than a chat transcript. High-frequency app-state and dev-server updates are scheduled with React transitions so process logs, status updates, and large state pushes do not block diff --git a/docs/developer/TOOL_PROTOCOL.md b/docs/developer/TOOL_PROTOCOL.md index b55d848..fc97014 100644 --- a/docs/developer/TOOL_PROTOCOL.md +++ b/docs/developer/TOOL_PROTOCOL.md @@ -238,33 +238,69 @@ The current agent approval gate prompts for `writes-files`, `controls-browser`, declared capability model and audit trail, and plugins still need approved capabilities that cover the tools they call. -## Diff Tool Shape +## Git Tool Shape `git_diff` is the built-in read-only working-tree diff tool. It reports staged -and unstaged changes against `HEAD` plus untracked files: +and unstaged changes against `HEAD` plus untracked files. Pass `scope: +"staged"` or `scope: "unstaged"` to fetch a section-specific diff: ```json { "cwd": "/work/project", - "includePatches": false + "includePatches": false, + "scope": "all" } ``` `includePatches: false` returns file status and line-count summaries without -patch bodies. The renderer uses that cheap summary for the top-bar diff chip and -visible diff tab, refreshing while they are shown. The diff tab then requests a +patch bodies. `git_status` returns the corresponding branch, ahead/behind, and +staged/unstaged/untracked sections used by the Git panel. The renderer uses +these cheap summaries for the top-bar Git changes chip and visible Git tab, +refreshing while they are shown. The tab then requests a selected file on demand: ```json { "cwd": "/work/project", "includePatches": true, - "path": "src/app/page.tsx" + "path": "src/app/page.tsx", + "scope": "unstaged" } ``` -This keeps large repositories responsive while preserving the same structured -tool result for the CLI, renderer, plugins, and agents. +Mutating git tools are capability-gated. `git_stage`, `git_unstage`, +`git_commit`, `git_branch`, and `git_worktree` declare `writes-files`. +`git_restore` and `git_checkpoint_restore` declare `destructive` and require a +literal `confirm: true` argument. + +The Git panel stages individual files and its **Stage all** control by calling +`git_stage` with repository-relative paths. Its commit-message suggestion flow +first loads the full staged diff (`includePatches: true`, `scope: "staged"`), +or the full working-tree diff when nothing is staged, then sends that patch +through the renderer `ai.complete` bridge for a one-line Conventional Commit +subject. The deterministic filename heuristic is only a fallback when no real +agent completion is available. + +The top-header branch switcher uses `git_branch` with `action: "list"` to show +the current branch, `action: "switch"` to change branches, and `action: +"create"` followed by `switch` when creating a new branch. + +`git_commit` reads the active Git identity profile from app settings. When a +profile is selected, Meith passes that profile as the commit author and +committer for commits created through the tool. When no profile is selected, +Git's repository/global config decides the identity. + +`git_identity_detect` is read-only. It proposes commit identity profiles from +repo/effective Git config, global Git config, and installed provider CLI account +state such as `gh auth status` or `glab auth status`. It does not read credential +helper secrets, tokens, or private key material; the renderer only saves a +suggestion after the user explicitly adds it. + +Checkpoints are hidden git commit objects stored under +`refs/meith/checkpoints/*` with metadata in `.git/meith/checkpoints.json`. +`AgentService` creates a `git_checkpoint_create` snapshot before each agent run +and records the agent `sessionId`; callers can later list, compare, or restore +those checkpoints without moving the current branch ref. ## Caller Identity diff --git a/docs/user/CLI.md b/docs/user/CLI.md index 235c310..4570440 100644 --- a/docs/user/CLI.md +++ b/docs/user/CLI.md @@ -65,7 +65,15 @@ available with `meith --help`; common groups include: `meith create-project