ur-agent 1.36.1 → 1.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs/IDE.md CHANGED
@@ -1,44 +1,63 @@
1
1
  # IDE Integration
2
2
 
3
- UR integrates with editors through three mechanisms, chosen per editor and stated
4
- honestly nothing claims support it does not have:
5
-
6
- - **Native extension** a UR extension/plugin runs inside the editor (VS Code
7
- family, JetBrains). UR connects to it via the `/ide` flow.
8
- - **Stdio ACP** the editor launches UR as an [Agent Client Protocol](ACP.md)
9
- agent over stdio (`ur acp stdio`). Used by Zed and ACP-capable Neovim clients.
3
+ UR's professional IDE integration is the **UR Inline Diffs** VS Code extension,
4
+ bundled in this repository (`extensions/vscode-ur-inline-diffs`). It gives VS
5
+ Code, Cursor, and Windsurf a chat panel, inline diff review, an actions panel,
6
+ an agent status card, a searchable command palette, and an agent options
7
+ panel all driven by the same `ur` CLI you already use from a terminal, with
8
+ no separate server process and no new network surface.
9
+
10
+ Other editors connect through different mechanisms, chosen per editor and
11
+ stated honestly — nothing here claims support that does not exist:
12
+
13
+ - **VS Code extension** — the professional integration described in full
14
+ below. Ships to VS Code, Cursor, and Windsurf (one extension; Cursor and
15
+ Windsurf are VS Code forks). This is the integration everything else on
16
+ this page is compared against.
17
+ - **Stdio ACP** (`ur acp stdio`) — the real, spec-compliant
18
+ [Agent Client Protocol](ACP.md) over stdio, used by Zed and ACP-capable
19
+ Neovim clients. This remains a separate transport from the VS Code
20
+ extension's chat bridge below; the two are independent and neither depends
21
+ on the other.
10
22
  - **Manual** — no auto-config; install a plugin and connect via `/ide`.
23
+ **JetBrains is not implemented in this repository.** UR can detect whether
24
+ a plugin named `ur-jetbrains-plugin` is installed
25
+ (`src/utils/jetbrains.ts`), but this repo does not build, ship, or publish
26
+ that plugin. Nothing in this document should be read as "install our
27
+ JetBrains plugin today" — there isn't one yet.
11
28
 
12
29
  ## Supported targets
13
30
 
14
- | Editor | Mechanism | Auto config | Apply/reject | Notes |
15
- | --- | --- | --- | --- | --- |
16
- | VS Code | native extension | `.vscode/settings.json` | via UR extension | Install the UR Inline Diffs extension. |
17
- | Cursor | native extension (VS Code fork) | `.vscode/settings.json` | via UR extension | Same extension as VS Code. |
18
- | Windsurf | native extension (VS Code fork) | `.vscode/settings.json` | via UR extension | Same extension as VS Code. |
19
- | Zed | stdio ACP | `.zed/settings.json` | in-editor (ACP) | Real Agent Client Protocol over stdio. |
20
- | JetBrains | manual plugin | none | via plugin | Install the UR JetBrains plugin, then `/ide`. |
21
- | Neovim | stdio ACP | snippet | client-dependent | Requires a third-party ACP client plugin. |
22
- | Generic ACP | stdio ACP / HTTP | snippet | client-dependent | `ur acp stdio` (native ACP) or `ur acp serve` (HTTP JSON-RPC). |
31
+ | Editor | Mechanism | Auto config | Notes |
32
+ | --- | --- | --- | --- |
33
+ | VS Code | UR Inline Diffs extension | `.vscode/settings.json` | Full chat, diff, actions, status, and search integration see below. |
34
+ | Cursor | UR Inline Diffs extension (VS Code fork) | `.vscode/settings.json` | Same extension as VS Code. |
35
+ | Windsurf | UR Inline Diffs extension (VS Code fork) | `.vscode/settings.json` | Same extension as VS Code. |
36
+ | Zed | stdio ACP | `.zed/settings.json` | Real Agent Client Protocol over stdio. |
37
+ | JetBrains | not implemented | none | Detection code exists; no plugin ships from this repo. Use the CLI directly in the meantime. |
38
+ | Neovim | stdio ACP | snippet | Requires a third-party ACP client plugin. |
39
+ | Generic ACP | stdio ACP / HTTP | snippet | `ur acp stdio` (native ACP) or `ur acp serve` (HTTP JSON-RPC; not a streaming transport — see Known limitations). |
23
40
 
24
41
  ## Commands
25
42
 
26
43
  ```sh
27
- ur ide status # workspace, ACP server, provider/model, plugin count, warnings
28
- ur ide doctor # pass/warn/fail checks; reports missing config clearly
29
- ur ide config <editor> # print setup + config snippet for the chosen editor
30
- ur ide open # open the current project/worktree in a detected IDE
31
- ur ide diff capture # capture the current diff as a review bundle
32
- ur ide diff list|show <id> # inspect captured bundles
44
+ ur ide status # workspace, ACP server, provider/model, sandbox/verifier mode, plugin count, warnings
45
+ ur ide doctor # pass/warn/fail checks; reports missing config clearly
46
+ ur ide config <editor> # print setup + config snippet for the chosen editor
47
+ ur ide open # open the current project/worktree in a detected IDE
48
+ ur ide diff capture # capture the current diff as a review bundle
49
+ ur ide diff list|show <id> # inspect captured bundles
33
50
  ur ide diff approve|reject <id>
34
51
  ```
35
52
 
36
53
  `ur ide config` targets: `vscode`, `cursor`, `windsurf`, `zed`, `jetbrains`,
37
54
  `neovim`, `generic-acp` (aliases like `nvim`, `intellij`, `code` also resolve).
38
55
 
39
- `ur ide status` reports the active workspace, whether the ACP server is running
40
- and on which port, the active provider/model and runtime backend, the number of
41
- loaded plugins, and any warnings. Add `--json` for machine-readable output.
56
+ `ur ide status` reports the active workspace, whether the ACP server is
57
+ running and on which port, the active provider/model and runtime backend,
58
+ sandbox mode, verifier mode, the number of loaded plugins, and any warnings.
59
+ Add `--json` for machine-readable output — this is the same JSON surface the
60
+ VS Code extension's status card and actions panel read from.
42
61
 
43
62
  ## Patch / diff workflow
44
63
 
@@ -47,23 +66,147 @@ under `.ur/ide/diffs/` (`ur ide diff capture`), then previewed and explicitly
47
66
  applied or rejected:
48
67
 
49
68
  - **CLI:** `ur ide diff show <id>`, `ur ide diff approve <id>`, `ur ide diff reject <id>`.
50
- - **VS Code:** the UR Inline Diffs view lists bundles; right-click a bundle to
51
- Open (preview), Apply (`git apply`, with a confirmation prompt), Reject, or
52
- Comment. Applying is always an explicit, confirmed action.
69
+ - **VS Code:** the **Inline Diffs** view (and the **Actions** view they show
70
+ the same bundles) lists bundles; right-click one to Open (preview), Apply,
71
+ Reject, or Comment. Apply asks for confirmation, runs `git apply`, then
72
+ records the approval through `ur ide diff approve` — the same command the
73
+ terminal workflow uses, so the status VS Code shows always matches what
74
+ `ur ide diff list` reports. The extension never writes a diff status value
75
+ the CLI does not recognize.
53
76
 
54
77
  ## VS Code extension
55
78
 
56
- The bundled `UR Inline Diffs` extension (`extensions/vscode-ur-inline-diffs`)
57
- provides:
79
+ The bundled **UR Inline Diffs** extension is the professional IDE integration
80
+ for VS Code, Cursor, and Windsurf. It adds a UR container to the Activity Bar
81
+ with two views, **Inline Diffs** and **Actions**, plus a chat panel, a status
82
+ card, an agent options panel, and a searchable command palette.
83
+
84
+ Install it with `ur ide install` (offers the bundled VSIX) or from the
85
+ packaged `.vsix`. The extension is bundled inside this repository and
86
+ packaged as a local VSIX when installed from UR-AGENT; the public install
87
+ path does not depend on an unpublished marketplace extension ID. Every
88
+ feature below requires the UR CLI on your `PATH` — the extension calls `ur`
89
+ as a local subprocess and never talks to a model provider or network service
90
+ directly.
91
+
92
+ ### Chat panel
58
93
 
59
- - a tree view of captured diff bundles;
60
- - a read-only webview preview of each patch and its comments;
61
- - **Apply** (confirmed `git apply`) and **Reject** actions;
62
- - **UR: Show Status**, which runs `ur ide status` and prints provider/model and
63
- plugin information to the UR output channel.
94
+ **UR: New Chat** and **UR: Open Chat** open a chat panel that streams
95
+ responses over the same headless contract the CLI itself uses for scripted
96
+ runs:
97
+
98
+ ```
99
+ ur -p --output-format stream-json --verbose --permission-prompt-tool stdio [--resume <id>] "<prompt>"
100
+ ```
64
101
 
65
- Install it with `ur ide install` (offers the bundled VSIX) or from the packaged
66
- `.vsix`. Apply/reject and status require the UR CLI on your `PATH`.
102
+ Output is NDJSON one JSON object per line. Assistant text and tool-use/
103
+ tool-result blocks render as they arrive; nothing is buffered and dumped only
104
+ at the end. If the underlying `ur` process exits with an error, the panel
105
+ shows an error banner — it never fabricates a success message when the run
106
+ failed.
107
+
108
+ **Permission prompts.** When a turn wants to use a tool that needs approval,
109
+ UR emits a `control_request` message in the same stream. The chat panel shows
110
+ an inline Allow/Deny prompt and writes the decision back as a
111
+ `control_response` on the child process's stdin. The default posture is to
112
+ ask, not to silently auto-approve; canceling a request denies it safely
113
+ rather than leaving it hanging.
114
+
115
+ **Session persistence.** Each chat is a session persisted under
116
+ `.ur/ide/chat/` in the workspace (a manifest plus one file per session).
117
+ **UR: Open Chat** can resume a previous session — using the CLI's own
118
+ `--resume` — or start a new one; sessions survive closing and reopening VS
119
+ Code.
120
+
121
+ **File and selection context.** **UR: Add Current File to Chat** and
122
+ **UR: Add Selection to Chat** attach the active file or selection as explicit
123
+ context. Nothing is sent to UR until one of these actions is taken or a
124
+ message is sent — the extension never silently uploads file content in the
125
+ background.
126
+
127
+ **Editor actions.** **UR: Explain Selection**, **UR: Fix Selection**, and
128
+ **UR: Generate Tests for Selection** (also on the editor right-click menu)
129
+ open the same chat panel with a structured prompt built from the current
130
+ selection. There is no separate backend path for these — they reuse the chat
131
+ pathway above.
132
+
133
+ ### Actions panel
134
+
135
+ The **Actions** view lists diff bundles from `.ur/ide/diffs/` and background
136
+ tasks (`ur bg list --json`) together in one place, with its own refresh
137
+ button and a clear empty state when there is nothing captured yet. Diff rows
138
+ support the same Open/Apply/Reject/Comment actions as the Inline Diffs view
139
+ (routed through the CLI, as described above). Background task rows are
140
+ read-only in this release — click one to open its log file; starting or
141
+ canceling a task from the panel is not implemented yet, use
142
+ `ur bg run|kill` from a terminal.
143
+
144
+ ### Agent status card
145
+
146
+ **UR: Agent Status** opens a panel assembled from `ur ide status --json` and
147
+ `ur provider status --json`: UR version, workspace root, provider, model,
148
+ provider kind (UR-native, subscription CLI, or subscription placeholder),
149
+ native tool-call support, native streaming support, multimodal support, the
150
+ active provider's safety-boundary description, sandbox mode, verifier mode,
151
+ ACP status, plugin count, and warnings, with a refresh button. Any field the
152
+ CLI does not report renders as the literal word **unknown** — never a guess.
153
+
154
+ ### Search actions
155
+
156
+ **UR: Search Actions** is a single searchable palette covering every stable
157
+ action the extension exposes: New Chat, Open Chat, Explain Selection, Fix
158
+ Selection, Generate Tests, Review Current Diff, Run Verifier, Provider
159
+ Status, Agent Status, Agent Options, Open Settings, Open Docs, Open
160
+ Artifacts, Run Spec, Run Workflow, and Refresh IDE Actions.
161
+
162
+ ### Agent options panel
163
+
164
+ **UR: Agent Options** shows recommendations for privacy, speed, multimodal
165
+ support, tool calling, native streaming, subscription CLI access, local/
166
+ offline use, complex refactors, and docs/review work. **This panel is built
167
+ from local, curated data and the UR CLI's own provider registry
168
+ (`ur provider list --json`) only — it is not live market research and does
169
+ not rank model quality.** Every provider is labeled by kind (UR-native,
170
+ subscription CLI, local, or API), and a capability renders as **unknown**
171
+ rather than a guess whenever the CLI does not expose it — for example,
172
+ multimodal support for local/self-hosted models, which depends on whichever
173
+ model happens to be loaded rather than being a fixed provider fact.
174
+
175
+ ### Review Current Diff and Run Verifier
176
+
177
+ **UR: Review Current Diff** reads the current `git diff` directly through a
178
+ safe subprocess call (no shell interpolation), asks for confirmation before
179
+ sending a large diff, then opens chat with a structured review prompt — the
180
+ diff is never sent without that explicit action.
181
+
182
+ **UR: Run Verifier** opens chat and asks UR to run its real verification
183
+ subagent (the same mechanism behind the `/verify` prompt command) and report
184
+ a verdict. There is no standalone `ur verify` CLI command today, so this
185
+ always goes through chat rather than a direct CLI call; if the underlying
186
+ `ur` process fails, the panel shows the failure clearly and never reports a
187
+ success it did not observe.
188
+
189
+ ## Known limitations
190
+
191
+ - **JetBrains is not implemented.** No JetBrains plugin ships from this
192
+ repository; see "Supported targets" above.
193
+ - **The lockfile/MCP IDE bridge is Phase 2 and not part of this MVP.** The
194
+ CLI already implements the *client* half of a lockfile-discovered MCP
195
+ connection to a running IDE (`src/utils/ide.ts`), used by the terminal
196
+ `/ide` connect flow for live diagnostics and native diff tabs from a
197
+ terminal-hosted `ur` session. The VS Code extension's chat panel does not
198
+ use this bridge — it talks to UR entirely through the `stream-json`
199
+ subprocess contract described above.
200
+ - **The ACP HTTP server (`ur acp serve`) is not the VS Code chat streaming
201
+ transport.** It is a separate, non-streaming JSON-RPC endpoint intended for
202
+ scripts and other clients; the VS Code extension does not route chat
203
+ through it, and `ur acp stdio` (used by Zed and ACP Neovim clients) is
204
+ unaffected by any of the VS Code work described here.
205
+ - **Background task actions are read-only** in the Actions panel — no start
206
+ or cancel from the panel yet.
207
+ - **Run Spec / Run Workflow** open chat with a prompt asking UR to list and
208
+ run the relevant items, rather than shelling out directly — `ur spec` and
209
+ `ur workflow` are full agentic commands, not one-shot JSON lookups.
67
210
 
68
211
  ## Troubleshooting
69
212
 
@@ -75,3 +218,6 @@ Install it with `ur ide install` (offers the bundled VSIX) or from the packaged
75
218
  `agent_servers.UR` block from `ur ide config zed`, then reload Zed.
76
219
  - **Apply fails in VS Code:** the patch may not match the current tree; re-capture
77
220
  with `ur ide diff capture`.
221
+ - **Chat panel shows an error banner:** the underlying `ur` process failed or
222
+ exited non-zero; check that the UR CLI is on your `PATH` and that a
223
+ provider/model is configured (`ur provider status`).
@@ -44,7 +44,7 @@
44
44
  <main id="content" class="content">
45
45
  <header class="topbar">
46
46
  <div>
47
- <p class="eyebrow">Version 1.36.1</p>
47
+ <p class="eyebrow">Version 1.37.0</p>
48
48
  <h1>UR-AGENT Documentation</h1>
49
49
  <p class="lead">A practical, tutorial-style reference for installing, configuring, automating, extending, and operating UR-AGENT.</p>
50
50
  </div>
@@ -159,7 +159,7 @@ ur config set provider.fallback ollama</code></pre>
159
159
  </article>
160
160
  <article>
161
161
  <h3>Status bar and updates</h3>
162
- <pre><code>Ollama | llama3 | ask | main | update 1.36.1 available</code></pre>
162
+ <pre><code>Ollama | llama3 | ask | main | update 1.37.0 available</code></pre>
163
163
  <p>The interactive status bar shows only important runtime state: provider, model, mode, branch, active tasks, checks status when known, and update availability. It is hidden in CI, dumb terminals, and non-interactive mode.</p>
164
164
  </article>
165
165
  </div>
@@ -1,12 +1,39 @@
1
1
  # UR Inline Diffs for VS Code
2
2
 
3
- Native VS Code surface for UR inline diff bundles.
3
+ The professional UR IDE integration for VS Code, Cursor, and Windsurf: chat,
4
+ inline diff review, an actions panel, an agent status card, a searchable
5
+ command palette, and an agent options panel — all backed by the `ur` CLI
6
+ already on your machine.
4
7
 
5
8
  UR-AGENT packages this extension from the repository as a local VSIX when the
6
9
  CLI installs the public IDE integration. It does not depend on an unpublished
7
10
  marketplace extension ID.
8
11
 
9
- ## Workflow
12
+ The extension never talks to a model provider or network service directly —
13
+ every AI request goes through your local `ur` CLI, the same way `ur` behaves
14
+ in a terminal. Everything below requires the UR CLI on your `PATH`.
15
+
16
+ ## Chat
17
+
18
+ **UR: New Chat** / **UR: Open Chat** open a chat panel that streams UR's
19
+ response as it's generated, over the same NDJSON `stream-json` contract the
20
+ CLI uses for scripted runs. Tool calls, tool results, and permission prompts
21
+ (`control_request`/`control_response`) render inline as they arrive; nothing
22
+ is buffered and shown only at the end, and a failed run shows an error
23
+ banner rather than a fabricated success message.
24
+
25
+ Each chat is a session persisted under `.ur/ide/chat/` in the workspace, so
26
+ sessions survive closing and reopening VS Code and can be resumed (via the
27
+ CLI's own `--resume`) from **UR: Open Chat**.
28
+
29
+ **UR: Add Current File to Chat** and **UR: Add Selection to Chat** attach
30
+ context explicitly — nothing is sent to UR until you take one of those
31
+ actions or send a message. **UR: Explain Selection**, **UR: Fix Selection**,
32
+ and **UR: Generate Tests for Selection** (also on the editor right-click
33
+ menu) open the same chat panel with a structured prompt built from the
34
+ current selection; they are not a separate code path from chat.
35
+
36
+ ## Inline diffs and actions panel
10
37
 
11
38
  Create a bundle from the UR CLI:
12
39
 
@@ -14,14 +41,49 @@ Create a bundle from the UR CLI:
14
41
  ur ide diff capture --title "Parser fix"
15
42
  ```
16
43
 
17
- Open VS Code in the same workspace. The UR activity-bar view lists bundles from
18
- `.ur/ide/diffs/manifest.json`.
44
+ The **Inline Diffs** view lists bundles from `.ur/ide/diffs/manifest.json`.
45
+ A second view, **Actions**, shows the same diff bundles alongside background
46
+ tasks (`ur bg list`) in one place. Supported actions on a diff bundle:
47
+
48
+ - refresh the bundle list;
49
+ - open a patch preview with metadata and comments;
50
+ - **Apply** — asks for confirmation, runs `git apply`, then records the
51
+ approval through `ur ide diff approve` (never a status value the CLI
52
+ doesn't recognize);
53
+ - **Reject**, via `ur ide diff reject`;
54
+ - add a comment that writes back through `ur ide diff comment`.
55
+
56
+ Background task rows in the Actions panel are read-only for now — click one
57
+ to open its log file.
58
+
59
+ ## Status and options
60
+
61
+ **UR: Agent Status** shows UR version, workspace root, provider, model,
62
+ provider kind, native tool-call/streaming support, multimodal support,
63
+ sandbox mode, verifier mode, ACP status, plugin count, and warnings, built
64
+ from `ur ide status --json` and `ur provider status --json`. Anything the
65
+ CLI doesn't report shows as **unknown**, not a guess.
66
+
67
+ **UR: Agent Options** shows recommendations for privacy, speed, multimodal,
68
+ tool calling, native streaming, subscription CLI access, local/offline use,
69
+ complex refactors, and docs/review, built from `ur provider list --json`
70
+ plus a small local, curated table. It is not live market research and does
71
+ not rank model quality; it labels each provider's kind (UR-native,
72
+ subscription CLI, local, or API) and uses **unknown** wherever a capability
73
+ isn't known rather than guessing.
74
+
75
+ ## Search
76
+
77
+ **UR: Search Actions** is one searchable palette for every stable action the
78
+ extension exposes — chat, selection actions, diff review, the verifier, and
79
+ the status/options panels — instead of hunting through the command palette.
19
80
 
20
- Supported actions:
81
+ ## Review and verify
21
82
 
22
- - refresh the bundle list
23
- - open a patch preview with metadata and comments
24
- - add a comment that writes back to the UR metadata and manifest
83
+ **UR: Review Current Diff** reads your current `git diff`, confirms before
84
+ sending anything large, and opens chat with a structured review prompt.
25
85
 
26
- The extension is local-only. It reads and writes files under the current
27
- workspace and does not call any model provider or network service.
86
+ **UR: Run Verifier** opens chat and asks UR to run its verification subagent
87
+ and report a verdict; there is no standalone verifier CLI command today, so
88
+ this always goes through chat, and a failed run is always shown as a
89
+ failure, never a false success.