Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,5 @@ _workspace*
/.nexus-brain/
/.nexus-collab/

/.adw/config.yaml
/.adw/templates/.prefs.json
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Keep the mental model high-level:
- `src/hooks/` — reusable editor and data hooks
- `src/types/` — shared type definitions
- `docs/tasks/` — task-specific plans and notes
- `packages/` — auxiliary packages such as `nexus-acp-bridge`
- `packages/` — auxiliary packages such as `nexus-acp-bridge` (see `packages/nexus-acp-bridge/CLAUDE.md` for package-scoped guidance)

---

Expand Down
47 changes: 44 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ Nexus is a visual workflow editor for designing, composing, and exporting AI wor
- Export generated files as a ZIP or write them directly into a target folder
- Include generated `run-<workflow>.sh` and `run-<workflow>.bat` helper scripts with exported workflow artifacts

### 🔎 Workspace Research and Planning

- Open a workspace-native Research surface from every workspace dashboard at `/workspace/[id]/research`
- Create research spaces from Research Brief, PRD, Implementation Plan, and Decision Log templates
- Capture tile-based notes, tasks, sources, relationships, syntheses, and promote curated findings into Brain
- Import/export portable `.nodepad` files and copy/export research as markdown
- Research editing stays local-first when optional AI connector features are disconnected

### 📝 Content and Agent Authoring

- Fullscreen editing for prompts and documents
Expand Down Expand Up @@ -119,16 +127,48 @@ bun run docker:down

### 3. Use AI features (optional)

AI features require a running [OpenCode](https://github.com/nichochar/opencode) server.
AI features require a running [OpenCode](https://github.com/nichochar/opencode) server **or** a compatible bridge endpoint such as the bundled ACP bridge.

Nexus now defaults its connection UI to the bundled ACP bridge endpoint (`http://127.0.0.1:4080`). The connect dialog includes quick-start presets for:

- Claude Code via the ACP bridge
- OpenCode via the ACP bridge
- Direct OpenCode server mode

```bash
bun add -g opencode-ai
opencode serve --cors http://localhost:3000
```

Then connect from the Nexus header.
Then connect from the Nexus header. If you prefer the bundled bridge, use one of the ACP presets below instead.

### Optional: run the bundled ACP bridge

The repository also includes a minimal ACP bridge under `packages/nexus-acp-bridge/`. It exposes the subset of the OpenCode-style HTTP/SSE API that Nexus currently uses, so you can point Nexus at the bridge URL instead of a direct OpenCode server.

```bash
bun run nexus-acp-bridge
```

That command auto-loads the checked-in defaults in `packages/nexus-acp-bridge/.env.defaults`, which currently select the `claude-code` preset. Customise it with simple flags:

```bash
bun run nexus-acp-bridge --agent claude --cors http://localhost:3000
bun run nexus-acp-bridge --agent codex
bun run nexus-acp-bridge --agent opencode
```

The first time you run `--agent claude`, the bridge auto-vendors `@agentclientprotocol/claude-agent-acp`. Pass `--no-auto-setup` to opt out. Other supported flags include `--port`, `--host`, and repeatable `--project-dir`. Environment variables still override everything.

By default the bridge listens on:

```text
http://127.0.0.1:4080
```

You can configure it with the environment variables documented in `packages/nexus-acp-bridge/README.md` and the example file at `packages/nexus-acp-bridge/examples/.env.claude.example`.

OpenCode is only required for AI-powered features such as:
An OpenCode server or compatible bridge is only required for AI-powered features such as:

- AI workflow generation
- AI prompt generation and editing
Expand Down Expand Up @@ -334,6 +374,7 @@ The timer starts after the initial refresh on server startup completes. Manual r
| `Ctrl/Cmd + Alt + E` | Export workflow JSON |
| `Ctrl/Cmd + Alt + G` | Open generate/export dialog |
| `Ctrl/Cmd + Alt + A` | AI generate workflow |
| `Ctrl/Cmd + Alt + I` | Toggle AI side-kick |
| `Ctrl/Cmd + Alt + P` | Preview generated output |
| `H` / `V` | Hand tool / Selection tool |
| `?` | View all shortcuts |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# E2E Specification — AI Side-Kick ACP UX

## User Story

Validate that a workflow author can open the persistent AI side-kick, ask it to inspect the canvas, apply Nexus workflow actions, approve or deny destructive actions, and respond to forwarded ACP permission requests without leaving the editor.

## Test Steps

> Browser driving is reserved for the E2E pipeline and should use `playwright-cli` there only.

1. Open the side-kick via the header button and capture screenshot `sidekick-open-empty`.
2. Send `What can you tell me about this canvas?` and assert an assistant text response appears with no Nexus action card.
3. Send `Add a Prompt node named Draft Prompt and connect it after Start` using a mocked/deterministic bridge response, then assert an `addNode` card is `done`, a `connectNodes` card is `done`, and the canvas contains `Draft Prompt`; capture `sidekick-action-success`.
4. Select the created node and send `Delete this node`, assert a destructive action card appears with `Allow once`, `Allow always`, and `Deny`; capture `sidekick-approval-card`.
5. Click `Deny`, assert the node remains and the card status is `denied`.
6. Repeat delete, click `Allow once`, assert the node is removed and status is `done`.
7. Trigger a mocked forwarded ACP permission request, assert the permission card displays option buttons, choose `allow_once`, and assert it becomes resolved; capture `sidekick-permission-resolved`.
8. Click `New conversation`, assert message history clears and side-kick remains open; capture `sidekick-new-conversation`.

## Success Criteria

- Side-kick opens from the header and remains anchored in the bottom-right editor area.
- Text-only assistant responses render as assistant messages with no action cards.
- Nexus action cards show action names, arguments, and terminal `done` or `error` state.
- Destructive actions show exactly `Allow once`, `Allow always`, and `Deny` while awaiting approval.
- Denying a destructive action leaves the target node on the canvas and marks the card `denied`.
- Allowing once removes the target node and marks the card `done`.
- Forwarded ACP permission cards show option buttons and transition to resolved after choosing an option.
- New conversation clears visible message history, resets approvals, and keeps the panel open.

## Screenshot Capture Points

- `sidekick-open-empty`
- `sidekick-action-success`
- `sidekick-approval-card`
- `sidekick-permission-resolved`
- `sidekick-new-conversation`
Loading