ur-agent 1.14.0 → 1.15.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/USAGE.md CHANGED
@@ -84,11 +84,16 @@ UR includes slash commands and CLI subcommands for common workflows:
84
84
  - `ur agents` to list configured agents
85
85
  - `ur agent-trends` to inspect coverage for current agent technology trends
86
86
  - `ur a2a card` to print UR's Agent Card metadata for A2A discovery
87
+ - `ur bg ...` to run detached local background agents with optional worktrees and PRs
88
+ - `ur code-index watch` to keep the local semantic code index fresh
89
+ - `ur memory retention ...` to prune project-local memory by TTL, max entries, and decay
87
90
  - `ur spec ...` to scaffold requirements, design, and tasks, then run a spec task list
88
91
  - `ur escalate ...` to plan, run, or ask an oracle model for hard tasks
89
92
  - `ur arena ...` to run multiple agents on the same task and select a winner
90
93
  - `ur ci-loop ...` to run tests, repair failures, and rerun with a bounded loop
91
94
  - `ur artifacts ...` to capture reviewable diffs, test runs, notes, and feedback
95
+ - `ur ide diff ...` to capture editor-readable inline diff bundles
96
+ - `ur eval bench ...` to import local SWE-bench, Terminal-Bench, or Aider Polyglot exports
92
97
  - `ur doctor` to inspect CLI health
93
98
  - `ur update` or `ur upgrade` to check for updates
94
99
 
@@ -106,6 +111,9 @@ ur arena "implement a debounce helper" --agents 2 --dry-run
106
111
  ur escalate run "refactor the cache layer" --force-oracle --dry-run
107
112
  ur ci-loop --command "bun test" --dry-run
108
113
  ur artifacts capture-diff
114
+ ur bg run "fix the flaky parser test" --worktree --dry-run
115
+ ur ide diff capture --title "Working tree review"
116
+ ur eval bench list
109
117
  ```
110
118
 
111
119
  ## Permissions
@@ -17,7 +17,7 @@ You need:
17
17
 
18
18
  ```sh
19
19
  ur --version
20
- # expected: 1.14.0 (Ur)
20
+ # expected: 1.15.0 (Ur)
21
21
  ```
22
22
 
23
23
  ## 1. Marketplace tree resolves
@@ -43,7 +43,7 @@
43
43
  <main id="content" class="content">
44
44
  <header class="topbar">
45
45
  <div>
46
- <p class="eyebrow">Version 1.14.0</p>
46
+ <p class="eyebrow">Version 1.14.1</p>
47
47
  <h1>UR Agent Documentation</h1>
48
48
  <p class="lead">A practical, tutorial-style reference for installing, configuring, automating, extending, and operating UR Agent.</p>
49
49
  </div>
@@ -0,0 +1,23 @@
1
+ # UR Inline Diffs for VS Code
2
+
3
+ Native VS Code surface for UR inline diff bundles.
4
+
5
+ ## Workflow
6
+
7
+ Create a bundle from the UR CLI:
8
+
9
+ ```sh
10
+ ur ide diff capture --title "Parser fix"
11
+ ```
12
+
13
+ Open VS Code in the same workspace. The UR activity-bar view lists bundles from
14
+ `.ur/ide/diffs/manifest.json`.
15
+
16
+ Supported actions:
17
+
18
+ - refresh the bundle list
19
+ - open a patch preview with metadata and comments
20
+ - add a comment that writes back to the UR metadata and manifest
21
+
22
+ The extension is local-only. It reads and writes files under the current
23
+ workspace and does not call any model provider or network service.
@@ -0,0 +1,186 @@
1
+ const fs = require('node:fs')
2
+ const path = require('node:path')
3
+ const vscode = require('vscode')
4
+
5
+ function workspaceRoot() {
6
+ return vscode.workspace.workspaceFolders?.[0]?.uri.fsPath
7
+ }
8
+
9
+ function diffsRoot(root) {
10
+ return path.join(root, '.ur', 'ide', 'diffs')
11
+ }
12
+
13
+ function manifestPath(root) {
14
+ return path.join(diffsRoot(root), 'manifest.json')
15
+ }
16
+
17
+ function readJson(file, fallback) {
18
+ try {
19
+ return JSON.parse(fs.readFileSync(file, 'utf8'))
20
+ } catch {
21
+ return fallback
22
+ }
23
+ }
24
+
25
+ function writeJson(file, value) {
26
+ fs.mkdirSync(path.dirname(file), { recursive: true })
27
+ fs.writeFileSync(file, `${JSON.stringify(value, null, 2)}\n`)
28
+ }
29
+
30
+ function loadManifest(root) {
31
+ const manifest = readJson(manifestPath(root), { version: 1, diffs: [] })
32
+ return Array.isArray(manifest.diffs) ? manifest : { version: 1, diffs: [] }
33
+ }
34
+
35
+ function patchPath(root, bundle) {
36
+ return path.join(diffsRoot(root), bundle.patchFile)
37
+ }
38
+
39
+ function metadataPath(root, bundle) {
40
+ return path.join(diffsRoot(root), bundle.metadataFile)
41
+ }
42
+
43
+ function escapeHtml(text) {
44
+ return String(text)
45
+ .replace(/&/g, '&amp;')
46
+ .replace(/</g, '&lt;')
47
+ .replace(/>/g, '&gt;')
48
+ .replace(/"/g, '&quot;')
49
+ }
50
+
51
+ class DiffItem extends vscode.TreeItem {
52
+ constructor(bundle) {
53
+ super(`${bundle.id}: ${bundle.title}`, vscode.TreeItemCollapsibleState.None)
54
+ this.bundle = bundle
55
+ this.contextValue = 'diff'
56
+ this.description = `${bundle.status} · ${bundle.files?.length ?? 0} file(s)`
57
+ this.tooltip = `${bundle.title}\n${bundle.patchFile}`
58
+ this.command = {
59
+ command: 'urInlineDiffs.open',
60
+ title: 'Open Inline Diff',
61
+ arguments: [this],
62
+ }
63
+ }
64
+ }
65
+
66
+ class DiffProvider {
67
+ constructor() {
68
+ this._onDidChangeTreeData = new vscode.EventEmitter()
69
+ this.onDidChangeTreeData = this._onDidChangeTreeData.event
70
+ }
71
+
72
+ refresh() {
73
+ this._onDidChangeTreeData.fire()
74
+ }
75
+
76
+ getTreeItem(item) {
77
+ return item
78
+ }
79
+
80
+ getChildren() {
81
+ const root = workspaceRoot()
82
+ if (!root) return []
83
+ return loadManifest(root)
84
+ .diffs
85
+ .slice()
86
+ .sort((a, b) => String(b.createdAt).localeCompare(String(a.createdAt)))
87
+ .map(bundle => new DiffItem(bundle))
88
+ }
89
+ }
90
+
91
+ function renderDiffHtml(root, bundle) {
92
+ const patch = fs.existsSync(patchPath(root, bundle))
93
+ ? fs.readFileSync(patchPath(root, bundle), 'utf8')
94
+ : ''
95
+ const comments = bundle.comments ?? []
96
+ return `<!doctype html>
97
+ <html lang="en">
98
+ <head>
99
+ <meta charset="utf-8">
100
+ <meta name="viewport" content="width=device-width, initial-scale=1">
101
+ <style>
102
+ body { font: 13px/1.45 var(--vscode-editor-font-family); color: var(--vscode-editor-foreground); padding: 16px; }
103
+ h1 { font-size: 18px; margin: 0 0 4px; }
104
+ .meta { color: var(--vscode-descriptionForeground); margin-bottom: 14px; }
105
+ pre { background: var(--vscode-editor-background); border: 1px solid var(--vscode-panel-border); padding: 12px; overflow: auto; }
106
+ .comments { margin-top: 18px; }
107
+ .comment { border-top: 1px solid var(--vscode-panel-border); padding: 8px 0; }
108
+ .where { color: var(--vscode-descriptionForeground); }
109
+ </style>
110
+ </head>
111
+ <body>
112
+ <h1>${escapeHtml(bundle.title)}</h1>
113
+ <div class="meta">${escapeHtml(bundle.id)} · ${escapeHtml(bundle.status)} · ${escapeHtml(bundle.files?.length ?? 0)} file(s)</div>
114
+ <pre>${escapeHtml(patch)}</pre>
115
+ <section class="comments">
116
+ <h2>Comments</h2>
117
+ ${comments.length === 0 ? '<p class="meta">No comments yet.</p>' : comments.map(comment => {
118
+ const where = comment.file ? `${comment.file}${comment.line ? `:${comment.line}` : ''}` : 'General'
119
+ return `<div class="comment"><div class="where">${escapeHtml(where)} · ${escapeHtml(comment.at ?? '')}</div><div>${escapeHtml(comment.text)}</div></div>`
120
+ }).join('')}
121
+ </section>
122
+ </body>
123
+ </html>`
124
+ }
125
+
126
+ async function openDiff(item) {
127
+ const root = workspaceRoot()
128
+ const bundle = item?.bundle
129
+ if (!root || !bundle) {
130
+ vscode.window.showWarningMessage('No UR inline diff selected.')
131
+ return
132
+ }
133
+ const panel = vscode.window.createWebviewPanel(
134
+ 'urInlineDiff',
135
+ `UR ${bundle.id}`,
136
+ vscode.ViewColumn.Active,
137
+ { enableScripts: false },
138
+ )
139
+ const latest = readJson(metadataPath(root, bundle), bundle)
140
+ panel.webview.html = renderDiffHtml(root, latest)
141
+ }
142
+
143
+ async function commentDiff(item, provider) {
144
+ const root = workspaceRoot()
145
+ const bundle = item?.bundle
146
+ if (!root || !bundle) {
147
+ vscode.window.showWarningMessage('No UR inline diff selected.')
148
+ return
149
+ }
150
+ const text = await vscode.window.showInputBox({
151
+ title: `Comment on ${bundle.id}`,
152
+ prompt: 'Comment text',
153
+ ignoreFocusOut: true,
154
+ })
155
+ if (!text?.trim()) return
156
+
157
+ const manifest = loadManifest(root)
158
+ const manifestBundle = manifest.diffs.find(diff => diff.id === bundle.id)
159
+ if (!manifestBundle) {
160
+ vscode.window.showErrorMessage(`UR inline diff not found: ${bundle.id}`)
161
+ return
162
+ }
163
+ const at = new Date().toISOString()
164
+ const comment = { at, text: text.trim() }
165
+ manifestBundle.status = 'commented'
166
+ manifestBundle.updatedAt = at
167
+ manifestBundle.comments = [...(manifestBundle.comments ?? []), comment]
168
+ writeJson(manifestPath(root), manifest)
169
+ writeJson(metadataPath(root, manifestBundle), manifestBundle)
170
+ provider.refresh()
171
+ vscode.window.showInformationMessage(`Added UR comment to ${bundle.id}.`)
172
+ }
173
+
174
+ function activate(context) {
175
+ const provider = new DiffProvider()
176
+ context.subscriptions.push(
177
+ vscode.window.registerTreeDataProvider('urInlineDiffs', provider),
178
+ vscode.commands.registerCommand('urInlineDiffs.refresh', () => provider.refresh()),
179
+ vscode.commands.registerCommand('urInlineDiffs.open', item => openDiff(item)),
180
+ vscode.commands.registerCommand('urInlineDiffs.comment', item => commentDiff(item, provider)),
181
+ )
182
+ }
183
+
184
+ function deactivate() {}
185
+
186
+ module.exports = { activate, deactivate }
@@ -0,0 +1,5 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" role="img" aria-label="UR">
2
+ <rect width="64" height="64" rx="12" fill="#161616"/>
3
+ <path d="M16 16v18c0 9 6 15 16 15s16-6 16-15V16h-8v18c0 5-3 8-8 8s-8-3-8-8V16h-8z" fill="#f5f5f5"/>
4
+ <path d="M36 16h12v8h-7v7h-5V16z" fill="#64d2ff"/>
5
+ </svg>
@@ -0,0 +1,74 @@
1
+ {
2
+ "name": "ur-inline-diffs",
3
+ "displayName": "UR Inline Diffs",
4
+ "description": "Review UR inline diff bundles from .ur/ide/diffs inside VS Code.",
5
+ "version": "1.15.0",
6
+ "publisher": "ur-agent",
7
+ "engines": {
8
+ "vscode": "^1.92.0"
9
+ },
10
+ "categories": [
11
+ "Other"
12
+ ],
13
+ "activationEvents": [
14
+ "onView:urInlineDiffs",
15
+ "onCommand:urInlineDiffs.refresh",
16
+ "onCommand:urInlineDiffs.open",
17
+ "onCommand:urInlineDiffs.comment"
18
+ ],
19
+ "main": "./extension.js",
20
+ "contributes": {
21
+ "viewsContainers": {
22
+ "activitybar": [
23
+ {
24
+ "id": "ur",
25
+ "title": "UR",
26
+ "icon": "media/ur.svg"
27
+ }
28
+ ]
29
+ },
30
+ "views": {
31
+ "ur": [
32
+ {
33
+ "id": "urInlineDiffs",
34
+ "name": "Inline Diffs"
35
+ }
36
+ ]
37
+ },
38
+ "commands": [
39
+ {
40
+ "command": "urInlineDiffs.refresh",
41
+ "title": "UR: Refresh Inline Diffs"
42
+ },
43
+ {
44
+ "command": "urInlineDiffs.open",
45
+ "title": "UR: Open Inline Diff"
46
+ },
47
+ {
48
+ "command": "urInlineDiffs.comment",
49
+ "title": "UR: Comment On Inline Diff"
50
+ }
51
+ ],
52
+ "menus": {
53
+ "view/title": [
54
+ {
55
+ "command": "urInlineDiffs.refresh",
56
+ "when": "view == urInlineDiffs",
57
+ "group": "navigation"
58
+ }
59
+ ],
60
+ "view/item/context": [
61
+ {
62
+ "command": "urInlineDiffs.open",
63
+ "when": "view == urInlineDiffs && viewItem == diff",
64
+ "group": "inline"
65
+ },
66
+ {
67
+ "command": "urInlineDiffs.comment",
68
+ "when": "view == urInlineDiffs && viewItem == diff",
69
+ "group": "inline"
70
+ }
71
+ ]
72
+ }
73
+ }
74
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ur-agent",
3
- "version": "1.14.0",
3
+ "version": "1.15.0",
4
4
  "description": "UR terminal coding agent CLI",
5
5
  "type": "module",
6
6
  "packageManager": "bun@1.3.14",
@@ -28,6 +28,7 @@
28
28
  "dist",
29
29
  "docs",
30
30
  "documentation",
31
+ "extensions",
31
32
  "examples",
32
33
  "CHANGELOG.md",
33
34
  "QUALITY.md",