Skip to content

Commit 7bacd39

Browse files
Merge pull request #17 from semantic-developer/feature/sd-19
feature/sd-19
2 parents 0fbb1b6 + 62562f5 commit 7bacd39

File tree

7 files changed

+1086
-347
lines changed

7 files changed

+1086
-347
lines changed

AGENTS.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Repository Guidelines
2+
3+
## Project Structure & Module Organization
4+
- Root solution lives in `SemanticDeveloper/SemanticDeveloper.sln`; the primary desktop app sits under `SemanticDeveloper/SemanticDeveloper/`.
5+
- UI resources are split between Avalonia XAML (`*.axaml`) and backing C# files (`*.axaml.cs`); dialogs reside in `Views/`, shared models in `Models/`, and service logic (Codex, Git, MCP, settings) in `Services/`.
6+
- Static assets (icons, images) are in `SemanticDeveloper/SemanticDeveloper/Images/`; installer scaffolding lives in `SemanticDeveloper/Installers/`.
7+
8+
## Build, Test, and Development Commands
9+
- Restore & compile the app: `dotnet build SemanticDeveloper/SemanticDeveloper/SemanticDeveloper.csproj` (the installer projects lack entry points).
10+
- Run the desktop app: `dotnet run --project SemanticDeveloper/SemanticDeveloper`.
11+
- Update NuGet dependencies: `dotnet restore SemanticDeveloper/SemanticDeveloper/SemanticDeveloper.csproj`.
12+
13+
## Coding Style & Naming Conventions
14+
- Follow standard C# conventions: 4-space indentation, PascalCase for types, camelCase for locals/fields (prefix private fields with `_` when mutable).
15+
- Keep Avalonia XAML tidy: align attributes, prefer named handlers declared in the paired code-behind.
16+
- Favor expression-bodied members for single-line getters and avoid trailing whitespace; run `dotnet format` before large refactors.
17+
- When logging to the CLI pane, use `AppendCliLog` for line entries and prefer the existing `System:` prefixes for system-generated lines.
18+
19+
## Testing Guidelines
20+
- No automated test project exists yet; add new tests alongside features if appropriate.
21+
- For manual verification, exercise key flows: workspace selection, MCP server loading, Codex login (`codex auth login`), and session restarts.
22+
- If you introduce automated tests, place them under a `Tests/` sibling folder and document the execution command (e.g., `dotnet test`).
23+
24+
## Commit & Pull Request Guidelines
25+
- Write concise, imperative commit subjects (`Add MCP startup summary`, `Fix Codex auth probe`), with optional body paragraphs for context.
26+
- Reference issue IDs in the body when applicable and squash trivial commits before submitting a PR.
27+
- Pull requests should include: a brief summary, testing notes, screenshots/GIFs for UI changes, and links to relevant issues or discussions.
28+
29+
## Configuration & Security Notes
30+
- User-specific MCP servers live at `~/.config/SemanticDeveloper/mcp_servers.json` (or `%AppData%\SemanticDeveloper\mcp_servers.json` on Windows); avoid committing sample credentials.
31+
- API keys are configured through the app settings; never hard-code secrets—use environment variables or the settings dialog.

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@
22

33
![Semantic Developer Img](/SemanticDeveloper/SemanticDeveloper/Images/SemanticDeveloperLogo.ico)
44

5-
A cross‑platform desktop UI (Avalonia/.NET 8) for driving the Codex CLI using its JSON protocol. It lets you:
5+
A cross‑platform desktop UI (Avalonia/.NET 8) for driving the Codex CLI app server using its JSON protocol. It lets you:
66

77
- Select a workspace folder and browse files via a lazy file tree
88
- Start a Codex session and stream assistant output in real time
9-
- Send user input that is wrapped as protocol `Submission`s (proto)
9+
- Send user input that is wrapped as protocol `Submission`s (app server)
1010
- Auto‑approve exec/patch requests (automatic)
1111
- Select a Codex profile (from `config.toml`) and load MCP servers from a JSON config
1212
– See live token usage and estimated context remaining in the header
1313

14-
> Important: This app always runs Codex in proto mode via the `proto` subcommand.
14+
> Important: This app runs Codex through the `app-server` subcommand.
1515
1616
## Requirements
1717

1818
- .NET SDK 8.0+
1919
- Codex CLI installed and on `PATH`
20-
- Verify with: `codex proto --help`
20+
- Verify with: `codex app-server --help`
2121
- No external Git required — uses LibGit2Sharp for repo init/staging/commit
2222

2323
## Build & Run
@@ -32,7 +32,7 @@ A cross‑platform desktop UI (Avalonia/.NET 8) for driving the Codex CLI using
3232
1. Open the app, click “Select Workspace…” and choose a folder.
3333
- If it isn’t a git repo and the Git library is available, you’ll be prompted to initialize one.
3434
- You can also initialize later from the header via “Initialize Git…”.
35-
2. Click “Restart Session” to launch `codex proto` in the workspace directory (a session also starts automatically after you select a workspace).
35+
2. Click “Restart Session” to launch `codex app-server` in the workspace directory (a session also starts automatically after you select a workspace).
3636
3. Type into the input box and press Enter to send. Output appears in the right panel.
3737
4. “CLI Settings” lets you change:
3838
- Profile (from Codex `config.toml`) — passed via `-c profile=<name>`
@@ -154,7 +154,7 @@ Notes
154154

155155
## Conversation & Protocol Behavior
156156

157-
- Always uses proto mode: the app starts the CLI with `codex proto`.
157+
- Always uses the Codex app server: the app starts the CLI with `codex app-server`.
158158
- User input is wrapped as a protocol `Submission` with a new `id` and an `op` payload:
159159
- Defaults to `user_input` with `items: [{ type: "text", text: "..." }]`.
160160
- When the app infers that a full turn is required, it sends `user_turn` and includes
@@ -175,7 +175,7 @@ Notes
175175
- Returns to `idle` only when the server signals `task_complete` (or `turn_aborted`).
176176

177177
- Stop vs. Restart:
178-
- Stop sends a proto `interrupt` to abort the current turn (like pressing Esc in the CLI) without killing the session; it falls back to terminating the process if needed.
178+
- Stop sends an `interrupt` to the app server to abort the current turn (like pressing Esc in the CLI) without killing the session; it falls back to terminating the process if needed.
179179
- Restart ends the current process and starts a fresh session in the same workspace.
180180

181181
- Clear Log clears both the on‑screen log and the underlying editor document; it does not affect the session.
@@ -206,12 +206,12 @@ Selection behavior:
206206
- Change selections, then click “Restart Session” to apply.
207207
## Troubleshooting
208208

209-
- “Failed to start 'codex'”: Ensure the CLI is installed and on `PATH`. Test with `codex --help` and `codex proto --help`.
209+
- “Failed to start 'codex'”: Ensure the CLI is installed and on `PATH`. Test with `codex --help` and `codex app-server --help`.
210210
- Model selection: Prefer using `config.toml` (via Profiles). You can set `model`, `model_provider`, and related options per the Codex docs.
211211
- Git init issues: The app uses LibGit2Sharp (no Git CLI needed). If the native lib fails to load, the app skips initialization. Commits use your configured name/email if available; otherwise a fallback signature is used.
212212

213213
- Authentication:
214-
- If you are not using an API key and the Codex CLI is not logged in (no `~/.codex/auth.json`), the proto stream returns 401. The app detects this and prompts to run `codex auth login` for you. Follow the browser flow; on success the app restarts the proto session automatically.
214+
- If you are not using an API key and the Codex CLI is not logged in (no `~/.codex/auth.json`), the app-server stream returns 401. The app detects this and prompts to run `codex auth login` for you. Follow the browser flow; on success the app restarts the session automatically.
215215
- If your CLI version doesn’t support `auth login`, the app falls back to `codex login`.
216216
- When “Use API Key” is enabled in CLI Settings, the app attempts a non‑interactive `codex login --api-key <key>` before sessions and on 401. If login succeeds, it restarts the session automatically.
217217

@@ -235,7 +235,7 @@ Selection behavior:
235235

236236
## Notes
237237

238-
- Proto mode is enforced in code; the app does not fall back to non‑proto modes.
238+
- App-server mode is enforced in code; the app does not fall back to legacy proto mode.
239239
- Settings are stored under the OS‑specific application data directory and loaded on startup.
240240
- The log view uses AvaloniaEdit + TextMate (Dark+) for better legibility and simple JSON syntax coloring.
241241

SemanticDeveloper/Installers/Linux/build_deb.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ APP_PROJ="$ROOT/SemanticDeveloper/SemanticDeveloper.csproj"
88
PUBLISH_DIR="$SCRIPT_DIR/out/publish"
99
PKG_ROOT="$SCRIPT_DIR/pkgroot"
1010
DIST_DIR="$SCRIPT_DIR/dist"
11-
VERSION="1.0.2"
11+
VERSION="1.0.3"
1212
ARCH="amd64"
1313
if [[ "$RID" == "linux-arm64" ]]; then ARCH="arm64"; fi
1414

Binary file not shown.

0 commit comments

Comments
 (0)