ur-agent 1.65.5 → 1.65.7

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/CHANGELOG.md CHANGED
@@ -1,5 +1,117 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.65.7
4
+
5
+ - Audited all 14 technical chapters against the shipped source and generated
6
+ CLI. The manual now distinguishes public runtime behavior from compile-time
7
+ flags, compatibility-only state, and source helpers; it is included in the
8
+ npm package and checked for valid paths, commands, configuration, and package
9
+ coverage.
10
+ - Reworked agent guidance into one compact, ordered execution contract plus
11
+ mode-specific code, research, debug, browser, image, video, and data
12
+ workflows. Structured tool calls, dependency-aware planning, bounded
13
+ parallelism, failure recovery, result inspection, verification, honest
14
+ completion, and prompt-injection boundaries remain explicit without unsafe
15
+ package-manager guesses or examples that merely narrate fake tool calls.
16
+ - Hardened task execution end to end. Both Task V2 and legacy TodoWrite plans
17
+ participate in mutation and completion gates, task order is numeric and
18
+ dependency-aware, failed/skipped states are rendered honestly, and the
19
+ verifier refuses an overall completion while actionable work remains or task
20
+ state cannot be read.
21
+ - Workflow execution now checks approval before invoking a side effect,
22
+ enforces verification unless explicitly advisory, records every settled
23
+ parallel branch, and persists progress atomically. Resume restores bounded
24
+ exact dependency outputs without replaying completed steps; missing or
25
+ oversized required output fails closed and explains how to recover.
26
+ - Multi-agent crews and planned `/exec` runs use bounded parallel workers,
27
+ dependency fan-in, exact verdicts, cancellation-aware respawn, isolated retry
28
+ worktrees, and a shared-checkout write gate. Ambiguous side effects are not
29
+ replayed, per-prompt worktrees keep dependent steps together, and concurrent
30
+ output files cannot overwrite one another.
31
+ - Fixed false-success and argument-parsing behavior across root and slash
32
+ commands. Invalid usage returns 2, failed operations return 1, child process
33
+ failures propagate, previews do not mutate, and claim-ledger persistence is
34
+ structurally validated, workspace-contained, private, atomic, and bounded.
35
+ - Strengthened provider and tool-call interoperability for smaller/local
36
+ models: streamed calls keep stable ordinals, cumulative fragments are
37
+ deduplicated conservatively, malformed or rewritten inputs are revalidated,
38
+ Ollama image results and session-host overrides are preserved, and OpenAI
39
+ Responses transport settings now reach actual client selection.
40
+ - Improved terminal task UX: live task/status displays use the selected
41
+ session model, show only actionable or active background work, preserve
42
+ selection as rows change, handle narrow terminals, expose blockers and every
43
+ terminal status, and never advertise blocked work as the next action.
44
+ - Hardened session, export, research, notes, file-operation, worktree, and
45
+ sandbox paths against traversal, symlink escape, oversized/corrupt state,
46
+ interrupted writes, stale replay, and misleading success. Unsupported
47
+ workflow/monitor task implementations remain inspectable as history but are
48
+ no longer presented as runnable.
49
+ - Added a typed `ur-agent/sdk` subpath for ESM and CommonJS with validated
50
+ subprocess inputs, deterministic JSON/NDJSON result parsing, environment
51
+ precedence, and nonzero-exit handling. Release gates rebuild generated
52
+ artifacts before publish, smoke-test both SDK module formats from the packed
53
+ tarball, require the technical manual, and verify runtime dependency ranges.
54
+
55
+ ## 1.65.6
56
+
57
+ - Remote sessions no longer reconnect forever when the server repeatedly
58
+ accepts a WebSocket upgrade and then reports that the session is missing.
59
+ Repeated `connect()` calls reuse the live client, malformed permission and
60
+ cancellation frames fail safely, and the cancellation wire type now matches
61
+ the runtime schema.
62
+ - Tool execution can no longer silently run zero tools because of a negative
63
+ concurrency setting. Concurrency is normalized to a bounded range, and
64
+ serial or parallel tool cancellation always clears in-progress state.
65
+ - Replaced scattered and sometimes unsafe model instructions with one compact,
66
+ ordered execution contract shared by normal, minimal, and remote modes. It
67
+ preserves structured tool use, dependency-aware parallel calls, result
68
+ observation, recovery, verification, honest completion, and prompt-injection
69
+ boundaries while removing guesses such as forcing system Python package
70
+ installs. Ollama retains an explicit native-tool discipline and may use text
71
+ recovery only when the runtime says native tools are unavailable.
72
+ - Tool calls are normalized and validated again at the final execution
73
+ boundary, including permission-hook rewrites. Unknown tools, duplicate IDs,
74
+ malformed object inputs, and unsafe read-to-write rewrites fail closed.
75
+ Ollama/Kimi streaming repairs supported split calls without turning invalid
76
+ arguments into empty objects, deduplicates cumulative frames, and preserves
77
+ distinct same-name calls.
78
+ - Task planning now uses dependency-ordered lifecycle guidance, atomic
79
+ task-store updates, transactional dependency checks, and strict gate reads.
80
+ Mutations are classified at execution time, delegation cannot consume the
81
+ short-task allowance, and completion claims are rejected while actionable
82
+ tasks remain or task state cannot be verified.
83
+ - Repeated failing calls now use bounded SHA-256 identities with per-query
84
+ cleanup, TTL and capacity limits, so large or sensitive tool inputs are not
85
+ retained. Identical failures are refused and eventually abort the turn;
86
+ corrected inputs are allowed immediately.
87
+ - `ur crew` now runs independent workers in parallel, honors dependency
88
+ fan-in, claims work across processes, and supports bounded respawns with
89
+ backoff and cancellation. Automatic retries use isolated fresh worktrees;
90
+ ambiguous shared-workspace mutations are never replayed.
91
+ - Hardened the upstream proxy relay against unterminated or overflowing
92
+ protobuf varints, half-open rejected HTTP clients, and synchronous WebSocket
93
+ constructor failures.
94
+ - Terminal UI layouts now remain valid in very small windows. Search pickers,
95
+ fullscreen modals, dividers, highlighted code, the startup logo, and cursor
96
+ widths clamp or reflow instead of overflowing; empty picker focus,
97
+ Meta-key punctuation/input-buffer handling, prompt-footer sizing, live-model
98
+ status refreshes, and task progress presentation are corrected.
99
+ - Hardened IDE state storage against symlink redirection, oversized or corrupt
100
+ state, and interrupted writes. The VS Code chat now treats an abnormal
101
+ process exit as failure even after a result frame, bounds NDJSON/stderr
102
+ buffering, validates webview messages, and improves keyboard focus, live
103
+ status, alert, and attachment accessibility.
104
+ - The Node launcher now enforces the declared Bun minimum, including
105
+ prerelease ordering, rather than checking only whether a `bun` executable
106
+ exists.
107
+ - Release automation now runs the validated serial Bun test command (parallel
108
+ workers currently collide on ephemeral test servers), grants the permissions
109
+ needed to download verified artifacts, keeps
110
+ prereleases off npm's `latest` tag, marks GitHub prereleases correctly,
111
+ validates every version-bearing surface, supports safe prerelease bumps, and
112
+ cleans package-check temporary state. Validation docs and historical
113
+ changelog ordering were corrected.
114
+
3
115
  ## 1.65.5
4
116
 
5
117
  - Syntax highlighting works again — in assistant messages, code previews and
@@ -1658,36 +1770,6 @@ Top-tier feature release — closes the gaps against 2026's leading agents.
1658
1770
  `FileEditTool.call`.
1659
1771
  - Verified source and production bundle release checks for the `1.22.6` build.
1660
1772
 
1661
- ## 1.22.3
1662
-
1663
- ### Added
1664
- - **Executable skill directories.** A `.ur/skills/<name>/` directory containing
1665
- `skill.yaml` is now an executable skill that compiles into a `WorkflowSpec`.
1666
- Supports `instructions.md`, `scripts/`, `templates/`, and `checklists/`.
1667
- `src/skills/skillSpec.ts` parses, validates, and compiles skills; step prompts
1668
- support `$ARGUMENTS`, `$0..$N`, and `$ARGUMENTS[N]` substitution.
1669
- - **`ur skill` CLI.** New command surface: `ur skill list`, `ur skill show <name>`,
1670
- `ur skill run <name> [args]`, and `ur skill init <name>`. Registered in
1671
- `src/commands.ts` and `src/main.tsx`.
1672
- - **Semantic repo index.** `src/utils/codeIndex/repoIndex.ts` builds offline,
1673
- dependency-free indexes under `.ur/code-index/`: `repo.json` (file
1674
- classification + imports/importedBy), `symbols.json`, `calls.json`,
1675
- `tests.json`, `docs.json`, and `configs.json`. `ur code-index repo` exposes
1676
- `build|status|search|symbols|callers|tests|docs|configs` subcommands.
1677
- - **`--repo` flag for code-index build/watch.** `ur code-index build --repo`
1678
- builds both the embedding index and the repo index; `watch --repo` refreshes
1679
- the repo index on file changes.
1680
-
1681
- ### Changed
1682
- - Reused the existing workflow engine for executable skills and extended the
1683
- existing `ur code-index` surface for the repo index, keeping changes additive.
1684
-
1685
- ### Verified
1686
- - Added `test/skillSpec.test.ts`, `test/skillCommand.test.ts`, and
1687
- `test/repoIndex.test.ts` covering skill parsing, compilation, CLI scaffolding,
1688
- repo file classification, symbol/call/test/doc/config extraction, and index
1689
- round-trips.
1690
-
1691
1773
  ## 1.22.5
1692
1774
 
1693
1775
  ### Added
@@ -1742,6 +1824,36 @@ Top-tier feature release — closes the gaps against 2026's leading agents.
1742
1824
  import updates, rollback on check failure, move, organize imports, unused
1743
1825
  detection, and caller mapping.
1744
1826
 
1827
+ ## 1.22.3
1828
+
1829
+ ### Added
1830
+ - **Executable skill directories.** A `.ur/skills/<name>/` directory containing
1831
+ `skill.yaml` is now an executable skill that compiles into a `WorkflowSpec`.
1832
+ Supports `instructions.md`, `scripts/`, `templates/`, and `checklists/`.
1833
+ `src/skills/skillSpec.ts` parses, validates, and compiles skills; step prompts
1834
+ support `$ARGUMENTS`, `$0..$N`, and `$ARGUMENTS[N]` substitution.
1835
+ - **`ur skill` CLI.** New command surface: `ur skill list`, `ur skill show <name>`,
1836
+ `ur skill run <name> [args]`, and `ur skill init <name>`. Registered in
1837
+ `src/commands.ts` and `src/main.tsx`.
1838
+ - **Semantic repo index.** `src/utils/codeIndex/repoIndex.ts` builds offline,
1839
+ dependency-free indexes under `.ur/code-index/`: `repo.json` (file
1840
+ classification + imports/importedBy), `symbols.json`, `calls.json`,
1841
+ `tests.json`, `docs.json`, and `configs.json`. `ur code-index repo` exposes
1842
+ `build|status|search|symbols|callers|tests|docs|configs` subcommands.
1843
+ - **`--repo` flag for code-index build/watch.** `ur code-index build --repo`
1844
+ builds both the embedding index and the repo index; `watch --repo` refreshes
1845
+ the repo index on file changes.
1846
+
1847
+ ### Changed
1848
+ - Reused the existing workflow engine for executable skills and extended the
1849
+ existing `ur code-index` surface for the repo index, keeping changes additive.
1850
+
1851
+ ### Verified
1852
+ - Added `test/skillSpec.test.ts`, `test/skillCommand.test.ts`, and
1853
+ `test/repoIndex.test.ts` covering skill parsing, compilation, CLI scaffolding,
1854
+ repo file classification, symbol/call/test/doc/config extraction, and index
1855
+ round-trips.
1856
+
1745
1857
  ## 1.22.2
1746
1858
 
1747
1859
  ### Added
package/README.md CHANGED
@@ -400,7 +400,7 @@ as first-class subcommands in the shipped CLI.
400
400
  | `ur task` | Start, run, and hand off worktree-per-task sessions with optional PR creation. |
401
401
  | `ur automation` | Store and run project-local scheduled automation specs under `.ur/automations/`. |
402
402
  | `ur workflow` | Define, validate, graph, run, and resume declarative agent workflows. |
403
- | `ur crew` | Run a lead and worker subagent crew over a shared task board; `--decompose` auto-splits tasks with risk/tests/rollback metadata. |
403
+ | `ur crew` | Run dependency-aware worker subagents over a shared task board; independent tasks fan out, while bounded retries require isolated worktrees. |
404
404
  | `ur pattern` | Run multi-agent collaboration patterns (PEER, DOE, concurrent, handoff, debate, parallel); `--execute` runs them as a workflow. |
405
405
  | `ur goal` | Track long-horizon objectives that persist across sessions. |
406
406
  | `ur repo-edit` | Build a repo edit index, plan AST-aware renames, preview patches, and apply with rollback. |
@@ -549,10 +549,11 @@ ur plugin disable <plugin>
549
549
  manifest and reports its declared components and capability surface, so you can
550
550
  review what a plugin touches before enabling it.
551
551
 
552
- The npm package includes `README.md`, `QUALITY.md`, `docs/`, `documentation/`,
553
- and `plugins/`, so the npm package page and installed artifact both carry the
554
- marketplace documentation, core plugins, community staging directory, and
555
- example plugin template. See [Plugin Guide](docs/plugins.md).
552
+ The npm package includes `README.md`, `QUALITY.md`, `docs/`, `technical/`,
553
+ `documentation/`, and `plugins/`, so the npm package page and installed
554
+ artifact carry the audited technical manual, marketplace documentation, core
555
+ plugins, community staging directory, and example plugin template. See
556
+ [Plugin Guide](docs/plugins.md).
556
557
 
557
558
  UR also documents the core Cursor-style agent primitives as first-class,
558
559
  project-backed features: Agent surfaces (`ur`, `ur agents`, `ur crew`, `ur bg`),
@@ -572,6 +573,7 @@ ur spec verify checkout --kernel
572
573
  ur crew create parser-crew --goal "fix the flaky parser test" --decompose --dry-run
573
574
  ur crew plan parser-crew --goal "fix the flaky parser test" --decompose
574
575
  ur crew run parser-crew --workers 3 --decompose --dry-run
576
+ ur crew run parser-crew --workers 3 --worktrees --max-attempts 2
575
577
  ur pattern parallel "refactor login without changing behavior" --execute --dry-run
576
578
  ur arena "implement a debounce helper" --agents 3 --judge hybrid --verify "bun test"
577
579
  ur agent-ci init default
package/RELEASE.md CHANGED
@@ -54,15 +54,26 @@ rg -n "Version [0-9]|expected: [0-9]|UR-Nexus v[0-9]" README.md docs documentati
54
54
  bun test test/docsCoverage.test.ts test/docsCommands.test.ts
55
55
  ```
56
56
 
57
+ Run the repository-owned bump script so dependency ranges cannot be changed by
58
+ an accidental text replacement:
59
+
60
+ ```bash
61
+ node scripts/version-bump.mjs <next-version>
62
+ ```
63
+
57
64
  Version bump checklist (all versioned release surfaces must move together):
58
65
 
59
66
  1. `package.json` `version`
60
67
  2. `bunfig.toml` `MACRO.VERSION`
61
- 3. `documentation/index.html` version eyebrow
68
+ 3. `documentation/index.html` version eyebrow and the expected version in
69
+ `docs/VALIDATION.md`
62
70
  4. `extensions/vscode-ur-inline-diffs/package.json` and its lockfile version
63
71
  fields (the VSIX test requires them to match the root package version)
64
72
  5. `extensions/jetbrains-ur/build.gradle.kts` `version`
65
- 6. Add a `CHANGELOG.md` entry, then run `bun run build` so `dist/cli.js`
73
+ 6. The `MACRO.VERSION` fallbacks in `src/commands/agent-ci/agent-ci.ts`,
74
+ `src/services/agents/agenticCi.ts`, and
75
+ `src/services/agents/featureScaffolds.ts`
76
+ 7. Add a `CHANGELOG.md` entry, then run `bun run build` so `dist/cli.js`
66
77
  embeds the new version (`bun run release:check` verifies all of this).
67
78
 
68
79
  If `npm whoami` fails, run:
package/bin/ur.js CHANGED
@@ -38,7 +38,10 @@ const bun = process.env.BUN_BIN || process.env.BUN_EXECUTABLE || 'bun'
38
38
  const ollamaModel =
39
39
  process.env.OLLAMA_MODEL || process.env.UR_MODEL
40
40
  const userArgs = process.argv.slice(2)
41
- const requiredBun = packageMetadata.engines?.bun ?? '>=1.3.0'
41
+ const requiredBun =
42
+ typeof packageMetadata.engines?.bun === 'string'
43
+ ? packageMetadata.engines.bun
44
+ : '>=1.3.0'
42
45
 
43
46
  function printBunRuntimeError(detail) {
44
47
  const attempted = bun
@@ -51,12 +54,62 @@ function printBunRuntimeError(detail) {
51
54
  console.error(
52
55
  [
53
56
  `UR-Nexus requires Bun ${requiredBun} at runtime because the published CLI bundle is built with --target bun.`,
54
- `Could not execute "${attempted}" from ${source}.${detail ? ` ${detail}` : ''}`,
57
+ `Bun executable: "${attempted}" (resolved from ${source}).`,
58
+ detail,
55
59
  'Install Bun from https://bun.sh, or set BUN_BIN to the absolute path of a Bun executable.',
56
- ].join('\n'),
60
+ ].filter(Boolean).join('\n'),
57
61
  )
58
62
  }
59
63
 
64
+ function parseSemver(value) {
65
+ const match = value.match(
66
+ /^v?(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?(?:\+[0-9A-Za-z.-]+)?$/,
67
+ )
68
+ if (!match) return null
69
+ return {
70
+ core: [Number(match[1]), Number(match[2]), Number(match[3])],
71
+ prerelease: match[4]?.split('.') ?? [],
72
+ }
73
+ }
74
+
75
+ function compareSemver(left, right) {
76
+ for (let index = 0; index < 3; index += 1) {
77
+ if (left.core[index] !== right.core[index]) {
78
+ return left.core[index] > right.core[index] ? 1 : -1
79
+ }
80
+ }
81
+
82
+ if (left.prerelease.length === 0 && right.prerelease.length === 0) return 0
83
+ if (left.prerelease.length === 0) return 1
84
+ if (right.prerelease.length === 0) return -1
85
+
86
+ const length = Math.max(left.prerelease.length, right.prerelease.length)
87
+ for (let index = 0; index < length; index += 1) {
88
+ const leftPart = left.prerelease[index]
89
+ const rightPart = right.prerelease[index]
90
+ if (leftPart === undefined) return -1
91
+ if (rightPart === undefined) return 1
92
+ if (leftPart === rightPart) continue
93
+
94
+ const leftNumeric = /^\d+$/.test(leftPart)
95
+ const rightNumeric = /^\d+$/.test(rightPart)
96
+ if (leftNumeric && rightNumeric) {
97
+ return Number(leftPart) > Number(rightPart) ? 1 : -1
98
+ }
99
+ if (leftNumeric !== rightNumeric) return leftNumeric ? -1 : 1
100
+ return leftPart > rightPart ? 1 : -1
101
+ }
102
+ return 0
103
+ }
104
+
105
+ function satisfiesBunEngine(version, range) {
106
+ const actual = parseSemver(version)
107
+ const minimumMatch = range.trim().match(/^>=\s*(.+)$/)
108
+ const minimum = minimumMatch ? parseSemver(minimumMatch[1]) : null
109
+ if (!actual || !minimum) return null
110
+ return compareSemver(actual, minimum) >= 0
111
+ }
112
+
60
113
  function assertBunAvailable() {
61
114
  const result = spawnSync(bun, ['--version'], {
62
115
  encoding: 'utf8',
@@ -64,14 +117,33 @@ function assertBunAvailable() {
64
117
  })
65
118
 
66
119
  if (result.error) {
67
- printBunRuntimeError(result.error.message)
120
+ printBunRuntimeError(`Could not execute Bun: ${result.error.message}`)
68
121
  process.exit(1)
69
122
  }
70
123
  if (result.status !== 0) {
71
124
  const detail = (result.stderr || result.stdout || '').trim()
72
- printBunRuntimeError(detail || `Exited with status ${result.status}.`)
125
+ printBunRuntimeError(
126
+ detail
127
+ ? `Bun --version failed: ${detail}`
128
+ : `Bun --version exited with status ${result.status}.`,
129
+ )
73
130
  process.exit(result.status ?? 1)
74
131
  }
132
+
133
+ const installedBun = result.stdout.trim()
134
+ const satisfies = satisfiesBunEngine(installedBun, requiredBun)
135
+ if (satisfies === null) {
136
+ printBunRuntimeError(
137
+ `Could not validate Bun version "${installedBun}" against engines.bun "${requiredBun}".`,
138
+ )
139
+ process.exit(1)
140
+ }
141
+ if (!satisfies) {
142
+ printBunRuntimeError(
143
+ `Found Bun ${installedBun}, which does not satisfy engines.bun "${requiredBun}".`,
144
+ )
145
+ process.exit(1)
146
+ }
75
147
  }
76
148
 
77
149
  const args =