ur-agent 1.14.1 → 1.16.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.
@@ -0,0 +1,997 @@
1
+ # UR Agent code feature inventory
2
+
3
+ This file is a code-derived inventory of what this agent can do in the
4
+ `ur-agent` 1.16.0 source tree. It is meant to cover behavior that is easy to
5
+ miss in user-facing documentation.
6
+
7
+ Sources traced include:
8
+
9
+ - `package.json`
10
+ - `bin/ur.js`
11
+ - `src/entrypoints/cli.tsx`
12
+ - `src/main.tsx`
13
+ - `src/query.ts`
14
+ - `src/commands.ts`
15
+ - `src/tools.ts`
16
+ - `src/constants/prompts.ts`
17
+ - `src/tools/**`
18
+ - `src/commands/**`
19
+ - `src/services/**`
20
+ - `src/security/**`
21
+ - `src/utils/settings/**`
22
+ - `src/utils/plugins/**`
23
+ - `src/entrypoints/mcp.ts`
24
+ - `src/sdk/index.ts`
25
+ - `marketplace-plugins/**`
26
+
27
+ Notes:
28
+
29
+ - "Feature-gated" means the code exists but is conditional on env vars,
30
+ feature flags, build type, user type, or settings.
31
+ - "Internal-only" means the code path is restricted to Anthropic/internal
32
+ user types or similar checks in this tree.
33
+ - "Stub" means the source exposes a command/tool name but the implementation is
34
+ intentionally disabled, null, or placeholder in this build.
35
+ - Copy-artifact files with names like `* 2.ts` are not treated as canonical;
36
+ the cleanup pass removed the stale `escalate 2.ts` and `ollama 2.ts` copies.
37
+
38
+ ## Package and binary entry
39
+
40
+ - Publishes the CLI as `ur` from `bin/ur.js`.
41
+ - Uses Bun as the runtime.
42
+ - Runs `dist/cli.js` when present, otherwise `src/entrypoints/cli.tsx` with
43
+ build macros.
44
+ - Exposes package scripts for start, dev, bundling, release checks,
45
+ typechecking, tests, smoke tests, secret scanning, package checks, and
46
+ prepack bundling.
47
+ - Includes a dependency-free TypeScript SDK in `src/sdk/index.ts` that shells
48
+ out to `ur -p --output-format json`.
49
+
50
+ ## Startup and runtime modes
51
+
52
+ - Fast `--version`, `-v`, and `-V` handling before full CLI load.
53
+ - Normal interactive terminal UI.
54
+ - Headless print mode with `-p` / `--print`.
55
+ - Output modes:
56
+ - `text`
57
+ - `json`
58
+ - `stream-json`
59
+ - Streaming JSON input mode via `--input-format stream-json`.
60
+ - Structured output through `--json-schema`.
61
+ - Optional inclusion of hook events, partial assistant messages, and replayed
62
+ user messages in streamed output.
63
+ - Debug modes:
64
+ - `--debug`
65
+ - `--debug-to-stderr`
66
+ - `--debug-file`
67
+ - verbose mode
68
+ - Minimal `--bare` mode that forces simple/local behavior and skips many
69
+ startup features such as hooks, LSP, plugin sync, attribution, auto-memory,
70
+ background prefetches, keychain prefetch, and project instruction discovery.
71
+ - Init flows:
72
+ - `--init`
73
+ - `--init-only`
74
+ - maintenance mode
75
+ - Resume flows:
76
+ - continue last session
77
+ - resume by session
78
+ - fork/resume variants
79
+ - resume from pull request context
80
+ - no-persistence mode
81
+ - rewind files
82
+ - Model controls:
83
+ - model selection
84
+ - effort selection
85
+ - fallback model
86
+ - workload flags
87
+ - beta flags
88
+ - custom agents passed by `--agents <json>`
89
+ - Turn and budget controls:
90
+ - max turns
91
+ - task budget
92
+ - max budget
93
+ - thinking controls
94
+ - System prompt controls:
95
+ - override system prompt
96
+ - append system prompt
97
+ - load prompt additions from a file
98
+ - dump system prompt when gated
99
+ - Workspace controls:
100
+ - `--add-dir`
101
+ - `--settings`
102
+ - `--setting-sources`
103
+ - `--ide`
104
+ - `--strict-mcp-config`
105
+ - `--session-id`
106
+ - `--name`
107
+ - `--file`
108
+ - Worktree controls:
109
+ - `-w` / `--worktree [name]`
110
+ - `--tmux`
111
+ - tmux worktree fast path
112
+ - Background session controls, feature-gated:
113
+ - `ps`
114
+ - `logs`
115
+ - `attach`
116
+ - `kill`
117
+ - `--bg` / `--background`
118
+ - Daemon and worker modes, feature-gated:
119
+ - `daemon`
120
+ - `--daemon-worker`
121
+ - environment runner
122
+ - self-hosted runner
123
+ - Browser and desktop integration entrypoints:
124
+ - Chrome MCP mode
125
+ - Chrome native host mode
126
+ - computer-use MCP mode, feature-gated
127
+ - deep-link handling, feature-gated
128
+ - Remote/session server entrypoints:
129
+ - `server`
130
+ - `open <cc-url>`
131
+ - SSH remote runner, feature-gated
132
+ - remote-control / assistant bridge, feature-gated
133
+ - A2A fast path in `bin/ur.js`:
134
+ - local A2A HTTP server
135
+ - health endpoint
136
+ - agent-card endpoint
137
+ - task endpoint
138
+ - loopback-only protection unless bearer token is configured
139
+ - dry-run mode
140
+ - headless `ur -p --output-format json` execution for tasks
141
+
142
+ ## Main CLI command families
143
+
144
+ The CLI registers these top-level command families in `src/main.tsx`:
145
+
146
+ - `mcp`: configure and manage MCP servers.
147
+ - `auth`: login, status, and logout.
148
+ - `plugin` / `plugins`: validate, install, update, enable, disable, uninstall,
149
+ and manage marketplaces.
150
+ - `setup-token`: configure a long-lived authentication token.
151
+ - `agents`: list configured agents.
152
+ - `agent-trends`: show coverage against current agent technology trends.
153
+ - `agent-features` / `agent-roadmap`: show or initialize agent feature
154
+ scaffolds.
155
+ - `agent-templates` / `agent-template`: list or install reusable project
156
+ agent templates.
157
+ - `automation` / `automations`: manage project-local automation specs and the
158
+ resident scheduler.
159
+ - `agent-task` / `task-pr`: summarize task state, git diff status, and PR
160
+ handoff commands.
161
+ - `model-doctor` / `model-capabilities`: inspect local Ollama model
162
+ capabilities.
163
+ - `semantic-memory` / `memory-index`: build and search a project memory index.
164
+ - `claim-ledger` / `claims`: manage claim-to-source provenance.
165
+ - `browser-qa`: validate and smoke-run browser QA replay fixtures.
166
+ - `pattern` / `patterns`: run or install multi-agent collaboration patterns.
167
+ - `workflow` / `wf`: create, validate, graph, run, plan, and resume declarative
168
+ workflows.
169
+ - `agent-inspect` / `inspect-agents`: reconstruct subagent timelines from
170
+ transcripts.
171
+ - `route` / `intent`: classify task intent and recommend agents/patterns.
172
+ - `model-route` / `model-pick`: recommend a local Ollama model for a task.
173
+ - `crew` / `crews`: run a headless multi-agent crew with a shared board.
174
+ - `goal` / `goals`: track long-horizon objectives and resume workflows.
175
+ - `spec` / `specs`: spec-driven development scaffolding and execution.
176
+ - `escalate`: capability-aware local model escalation.
177
+ - `arena` / `best-of`: run competing agents in isolated worktrees and judge
178
+ diffs.
179
+ - `bg` / `background-agent`: run detached local background agents with durable
180
+ state, logs, optional worktrees, fanout, live steering, and opt-in PRs.
181
+ - `ci-loop` / `heal`: self-healing build/test loop with bounded fix attempts.
182
+ - `artifacts` / `artifact`: create, review, approve, reject, and capture
183
+ deliverables; comments can steer linked background tasks.
184
+ - `trigger` / `mention`: parse webhook payloads and optionally launch a run.
185
+ - `sdk` / `embed`: show or scaffold programmatic SDK usage.
186
+ - `knowledge` / `kb`: curated project knowledge base with provenance.
187
+ - `eval` / `evals`: public agent eval harness.
188
+ - `code-index` / `codeindex`: semantic code index backed by local embeddings,
189
+ including watch mode for auto-reindex.
190
+ - `memory retention`: project-local memory retention controls.
191
+ - `ide diff`: editor-readable inline diff bundles for native review surfaces.
192
+ - `role-mode` / `roles`: built-in role modes such as Architect, Code, Debug,
193
+ and Ask.
194
+ - `a2a`: agent-to-agent card, server, and token utilities.
195
+ - `auto-mode`: inspect classifier defaults/config/critique when gated.
196
+ - `doctor`: updater and health diagnostics.
197
+ - `update` / `upgrade`: check and install updates.
198
+ - `install`: install native builds.
199
+ - `completion`: shell completion support.
200
+
201
+ Internal-only or gated command families include rollback, log, error, export,
202
+ task-list management, remote control, assistant bridge, and selected dev
203
+ commands.
204
+
205
+ ## Slash command inventory
206
+
207
+ Slash commands are assembled from built-ins, skills, plugins, workflow commands,
208
+ MCP prompt commands, and feature-gated sources in `src/commands.ts`.
209
+
210
+ Code-visible slash command names include:
211
+
212
+ - `a2a-card`
213
+ - `actions`
214
+ - `add-dir`
215
+ - `advisor`
216
+ - `agent-features`
217
+ - `agent-inspect`
218
+ - `agent-task`
219
+ - `agent-templates`
220
+ - `agent-trends`
221
+ - `agents`
222
+ - `analyze`
223
+ - `arena`
224
+ - `artifacts`
225
+ - `automation`
226
+ - `branch`
227
+ - `brief`
228
+ - `browser`
229
+ - `browser-qa`
230
+ - `btw`
231
+ - `chrome`
232
+ - `ci-loop`
233
+ - `cite`
234
+ - `claim-ledger`
235
+ - `clear`
236
+ - `code-index`
237
+ - `color`
238
+ - `compact`
239
+ - `compliance`
240
+ - `config`
241
+ - `context`
242
+ - `convert`
243
+ - `copy`
244
+ - `cost`
245
+ - `create-skill`
246
+ - `crew`
247
+ - `desktop`
248
+ - `devcontainer`
249
+ - `diff`
250
+ - `dna`
251
+ - `doctor`
252
+ - `effort`
253
+ - `escalate`
254
+ - `eval`
255
+ - `evidence`
256
+ - `exit`
257
+ - `export`
258
+ - `extra-usage`
259
+ - `fast`
260
+ - `feedback`
261
+ - `files`
262
+ - `forget`
263
+ - `goal`
264
+ - `graph`
265
+ - `guardrails`
266
+ - `harden`
267
+ - `heapdump`
268
+ - `help`
269
+ - `hooks`
270
+ - `ide`
271
+ - `image`
272
+ - `index`
273
+ - `init`
274
+ - `install-github-app`
275
+ - `install-slack-app`
276
+ - `ir`
277
+ - `kali`
278
+ - `keybindings`
279
+ - `knowledge`
280
+ - `lab`
281
+ - `learn`
282
+ - `login`
283
+ - `logout`
284
+ - `mcp`
285
+ - `memory`
286
+ - `mode`
287
+ - `model`
288
+ - `model-doctor`
289
+ - `model-route`
290
+ - `os`
291
+ - `output-style`
292
+ - `paper`
293
+ - `passes`
294
+ - `pattern`
295
+ - `permissions`
296
+ - `plan`
297
+ - `playbook`
298
+ - `plugin`
299
+ - `pr-comments`
300
+ - `privacy-settings`
301
+ - `project`
302
+ - `insights`
303
+ - `rate-limit-options`
304
+ - `read`
305
+ - `release-notes`
306
+ - `reload-plugins`
307
+ - `remember`
308
+ - `remote-control`
309
+ - `remote-env`
310
+ - `rename`
311
+ - `research`
312
+ - `resume`
313
+ - `review` / `ultrareview`
314
+ - `rewind`
315
+ - `role-mode`
316
+ - `route`
317
+ - `sandbox`
318
+ - `scope`
319
+ - `sdk`
320
+ - `search`
321
+ - `security`
322
+ - `security-review`
323
+ - `semantic-memory`
324
+ - `session`
325
+ - `skills`
326
+ - `spec`
327
+ - `stability`
328
+ - `stats`
329
+ - `status`
330
+ - `statusline`
331
+ - `summarize`
332
+ - `tag`
333
+ - `tasks`
334
+ - `terminal-setup`
335
+ - `theme`
336
+ - `think-back` / `thinkback-play`
337
+ - `threat-model`
338
+ - `toolsmith`
339
+ - `trace`
340
+ - `trigger`
341
+ - `upgrade`
342
+ - `ur-doctor`
343
+ - `ur-init`
344
+ - `usage`
345
+ - `verify`
346
+ - `video`
347
+ - `vim`
348
+ - `voice`
349
+ - `vuln`
350
+ - `web-setup`
351
+ - `workflow`
352
+ - `workspace`
353
+ - `youtube`
354
+
355
+ Internal-only command stubs or restricted commands in the registry include
356
+ backfill sessions, break cache, bughunter, commit, commit/push/PR, context
357
+ visualization, good UR, issue, init verifiers, force snip, mock limits, bridge
358
+ kick, version, ultraplan, subscribe PR, reset limits, onboarding, share,
359
+ summary, teleport, trace/debug helpers, perf issue, env, OAuth refresh,
360
+ debug-tool-call, agents platform, and autofix PR.
361
+
362
+ Remote-safe slash commands are limited to session, exit, clear, help, theme,
363
+ color, vim, cost, usage, copy, btw, feedback, plan, keybindings, and
364
+ statusline.
365
+
366
+ Bridge-safe local commands include compact, clear, cost, summary,
367
+ release-notes, and files. Prompt commands are allowed in the bridge path, while
368
+ local JSX commands are blocked.
369
+
370
+ ## Conversation loop features
371
+
372
+ - Maintains an assistant/user/tool message loop in `src/query.ts`.
373
+ - Streams assistant output and tool-use events.
374
+ - Executes tool calls through streaming and non-streaming orchestration.
375
+ - Supports parallel tool calls where the model emits them.
376
+ - Validates and repairs missing tool result blocks.
377
+ - Tracks tool-use summaries.
378
+ - Enforces turn limits and task budgets.
379
+ - Handles retryable API/model errors.
380
+ - Supports fallback models.
381
+ - Handles token-budget continuation.
382
+ - Applies tool result output budgets and content replacement.
383
+ - Supports large-output persistence and references.
384
+ - Performs auto-compaction and micro-compaction.
385
+ - Supports session-memory compaction.
386
+ - Supports post-compact cleanup.
387
+ - Has a disabled/stubbed context-collapse service in this build.
388
+ - Handles prompt-too-long recovery when feature-gated.
389
+ - Supports stop hooks and post-sampling hooks.
390
+ - Tracks verifier state and can inject reminders.
391
+ - Supports structured JSON output through a synthetic output tool.
392
+
393
+ ## Prompt and behavioral system
394
+
395
+ The system prompt source in `src/constants/prompts.ts` includes:
396
+
397
+ - UR identity as a coding agent.
398
+ - Concise terminal-oriented output rules.
399
+ - Code editing expectations.
400
+ - Tool-use discipline and preference for file tools over shell ad hoc edits.
401
+ - Planning guidance for multi-step tasks.
402
+ - Guidance for using subagents.
403
+ - Guidance for invoking skills.
404
+ - Optional verification contract.
405
+ - Cyber-safety risk guidance.
406
+ - Hook instructions.
407
+ - MCP instructions.
408
+ - Memory instructions.
409
+ - Language and output-style customization.
410
+ - System reminders.
411
+ - Token-budget instructions.
412
+ - Brief/proactive sections.
413
+ - Scratchpad and function-result clearing sections.
414
+
415
+ For Ollama-backed providers, the prompt adds stricter instructions around:
416
+
417
+ - using structured tool calls rather than raw JSON/tool XML
418
+ - using `Write` and `Edit` for file changes
419
+ - preferring parallel tool calls
420
+ - planning before larger tasks
421
+ - stopping repeated failing calls
422
+ - verifying before claiming completion
423
+ - responding to command failures
424
+ - avoiding empty responses
425
+
426
+ `UR_CODE_SIMPLE` replaces this with a minimal prompt containing identity, cwd,
427
+ and date.
428
+
429
+ ## Built-in tools
430
+
431
+ Tool assembly is centralized in `src/tools.ts`. Availability depends on mode,
432
+ feature flags, user type, MCP, and settings.
433
+
434
+ Core tools:
435
+
436
+ - `Bash`: run shell commands with permissions, sandbox checks, timeout,
437
+ background execution, read-only auto-approval heuristics, destructive command
438
+ warnings, output truncation/persistence, image output handling, git operation
439
+ tracking, and UI collapsing for common read/search commands.
440
+ - `PowerShell`: PowerShell command execution with similar permission,
441
+ path-safety, destructive-warning, and constrained-language checks.
442
+ - `Read`: read text files, selected line ranges, images, notebooks, and PDF
443
+ page ranges; blocks binary or risky device paths; enforces size/token limits;
444
+ tracks reads before edits.
445
+ - `Edit`: replace exact strings in files after prior read; validates paths,
446
+ permissions, concurrent modifications, max file size, and secret exposure;
447
+ records diffs/history.
448
+ - `Write`: create or overwrite files; requires prior read for existing files;
449
+ validates permissions and unexpected modifications; records diffs/history.
450
+ - `NotebookEdit`: edit notebook cells.
451
+ - `Glob`: find files by glob pattern.
452
+ - `Grep`: search file contents with optimized ripgrep-backed behavior.
453
+ - `CodeSearch`: semantic code search through a local embedding index.
454
+ - `WebFetch`: fetch a URL and run a prompt over retrieved content.
455
+ - `WebSearch`: web search through the configured model/tool backend.
456
+ - `TodoWrite`: maintain conversation-local todo state.
457
+ - `Agent`: launch subagents synchronously or in the background; supports custom
458
+ agents, built-in agents, plugin agents, MCP requirements, worktree isolation,
459
+ remote mode, permission modes, cwd, background output files, teams, memory,
460
+ and model overrides.
461
+ - `TaskOutput`: read background task output. Deprecated in favor of reading the
462
+ output file directly.
463
+ - `TaskStop`: stop background tasks.
464
+ - `TaskCreate`, `TaskGet`, `TaskUpdate`, `TaskList`: task-list v2 tools for
465
+ tracked work items, ownership, status, and blockers.
466
+ - `TeamCreate`, `TeamDelete`, `SendMessage`: multi-agent team coordination.
467
+ - `AskUserQuestion`: ask structured user questions from the agent loop.
468
+ - `EnterPlanMode` and `ExitPlanMode`: proposal/approval planning flow.
469
+ - `EnterWorktree` and `ExitWorktree`: enter or leave isolated worktree sessions.
470
+ - `Skill`: execute prompt-backed skills from local skills, bundled skills,
471
+ plugins, or MCP.
472
+ - `Brief`: send concise status messages or user-facing updates.
473
+ - `SendUserFile`: send a generated file to the user, feature-gated.
474
+ - `ListMcpResourcesTool` and `ReadMcpResourceTool`: enumerate and read MCP
475
+ resources.
476
+ - `ToolSearch`: deferred tool discovery over tool metadata.
477
+ - `Config`: read/write supported settings, internal-only in this build.
478
+ - `REPL`: internal REPL tooling.
479
+ - `Tungsten`: internal-only tooling.
480
+ - `SuggestBackgroundPR`: internal-only background PR suggestion.
481
+ - `LSP`: language-server diagnostics and symbol context, feature-gated.
482
+ - `WorkflowTool`: workflow execution helper, feature-gated.
483
+ - `CronCreate`, `CronDelete`, `CronList`: schedule recurring tasks,
484
+ feature-gated.
485
+ - `RemoteTrigger`: trigger remote runs, feature-gated.
486
+ - `Monitor`: monitoring helper, feature-gated or stubbed depending on build.
487
+ - `Sleep`: wait/sleep tool.
488
+ - `PushNotification`: push notifications, feature-gated.
489
+ - `SubscribePR`: subscribe to PR changes, feature-gated/internal.
490
+ - `Snip`: snip tool, feature-gated/internal.
491
+ - `WebBrowserTool`, `CtxInspectTool`, `TerminalCaptureTool`: present as
492
+ tool surfaces but stubbed or disabled in this build.
493
+ - `StructuredOutput`: synthetic tool used for JSON-schema output.
494
+ - `mcp__<server>__<tool>`: dynamically assembled MCP server tools.
495
+
496
+ Simple/bare mode keeps the tool set narrow, generally `Bash`, `Read`, and
497
+ `Edit`, with REPL mode substituting `REPL` where applicable.
498
+
499
+ ## Built-in agents
500
+
501
+ Built-in agents live under `src/tools/AgentTool/built-in`:
502
+
503
+ - `general-purpose`: broad-purpose subagent with all tools.
504
+ - `Explore`: read/search-only exploration agent, no file writes.
505
+ - `plan`: planning agent for implementation designs, no file writes.
506
+ - `verification`: adversarial verification agent for checking tests, builds,
507
+ browser behavior, and task completion.
508
+ - `statusline-setup`: statusline configuration agent with read/edit tools.
509
+ - `urCodeGuide`: UR documentation and guide agent with read/search/web tools.
510
+
511
+ Custom agents can be loaded from user, project, managed, flag, or plugin
512
+ sources. Agent definitions can configure:
513
+
514
+ - description
515
+ - tool allowlist
516
+ - disallowed tools
517
+ - prompt
518
+ - model
519
+ - effort
520
+ - permission mode
521
+ - required MCP servers
522
+ - hooks
523
+ - max turns
524
+ - skills
525
+ - initial prompt
526
+ - memory
527
+ - background behavior
528
+ - isolation mode
529
+
530
+ Agent resolution considers built-ins, plugins, user settings, project settings,
531
+ CLI-provided agents, and managed settings.
532
+
533
+ ## Agent-platform features
534
+
535
+ The `src/services/agents/**` area implements a large set of higher-level agent
536
+ systems:
537
+
538
+ - A2A server and Agent Card metadata, with task submit/list/status/output/cancel
539
+ routes backed by local background tasks.
540
+ - Background-agent runner under `.ur/background`, including stream-json stdin
541
+ injection for live artifact steering.
542
+ - HMAC-based attenuated A2A delegation tokens with audience, subject, scope,
543
+ and TTL.
544
+ - Arena/best-of workflow: run multiple agents in isolated worktrees, judge
545
+ diffs, optionally apply the winner.
546
+ - Reviewable artifacts under `.ur/artifacts`.
547
+ - IDE diff bundles under `.ur/ide/diffs` plus the
548
+ `extensions/vscode-ur-inline-diffs` native VS Code review extension.
549
+ - Benchmark adapters that import local SWE-bench, Terminal-Bench, and Aider
550
+ Polyglot JSON/JSONL exports into UR eval suites.
551
+ - CI loop: run build/test commands, capture failures, spawn a fix agent, rerun
552
+ with bounded attempts, optionally commit/push.
553
+ - Crew mode: lead agent decomposes a goal into a shared task board that worker
554
+ agents claim and execute.
555
+ - Long-horizon goals persisted across sessions.
556
+ - Spec-driven development under `.ur/specs`.
557
+ - Declarative workflows with steps, dependencies, gates, resume state, and
558
+ graph rendering.
559
+ - Live workflow board.
560
+ - Scheduler service for automations through launchd, systemd, cron, or daemon
561
+ mode.
562
+ - Knowledge base with source provenance, chunking, dense embeddings, search,
563
+ list, prune, and status.
564
+ - Learning from artifact outcomes into model/category success stats and
565
+ lessons.
566
+ - Local model routing based on capability fit.
567
+ - Intent routing for task category, agent choice, and collaboration pattern.
568
+ - Multi-agent collaboration patterns such as PEER and DOE.
569
+ - Webhook trigger parsing for GitHub, Slack, and generic payloads.
570
+ - Execution target wrappers for local, Docker, and devcontainer execution.
571
+ - Eval harness with suites, cases, checks, reports, and replayable runs.
572
+ - Agent inspector for reconstructing subagent timelines from transcripts.
573
+ - Capability-aware model escalation between fast and oracle models.
574
+ - Feature scaffold and reusable agent-template installation.
575
+
576
+ ## Memory and project knowledge
577
+
578
+ - User/project/team memory loading.
579
+ - Relevant memory scan.
580
+ - Conversation/session memory compaction.
581
+ - Memory extraction from sessions.
582
+ - Auto-dream background memory consolidation.
583
+ - Team memory sync.
584
+ - Secret scanning and guards for team memory writes.
585
+ - Memory commands:
586
+ - remember
587
+ - forget
588
+ - memory
589
+ - semantic-memory
590
+ - knowledge
591
+ - Lightweight project file operations under `src/ur/fileops.ts`:
592
+ - read project files
593
+ - search text-like files
594
+ - maintain `.ur/index/files.txt`
595
+ - Project DNA generation under `src/ur/projectDna.ts`:
596
+ - language detection
597
+ - package manager detection
598
+ - build/test/lint/run command detection
599
+ - key folders
600
+ - git/readme context
601
+ - `.ur/project_dna.md`
602
+ - Project notes and research graph helpers under `src/ur/**`.
603
+
604
+ ## Verification and quality gates
605
+
606
+ The verifier service in `src/services/verifier/**` includes:
607
+
608
+ - L1 deterministic verifier enabled by default unless disabled by env.
609
+ - Modes:
610
+ - `off`
611
+ - `loose`
612
+ - `strict`
613
+ - Empty-turn detection.
614
+ - Done-claim detection against actual tool/mutation evidence.
615
+ - Project gates from `.ur/verify.json`.
616
+ - Loop detection.
617
+ - Rejection cap.
618
+ - Optional L2 verification subagent through env opt-in.
619
+ - Manual deeper verification through `/verify`.
620
+ - Verifier reminders injected back into the conversation loop.
621
+
622
+ ## Permissions and sandboxing
623
+
624
+ Permission modes:
625
+
626
+ - `default`
627
+ - `plan`
628
+ - `acceptEdits`
629
+ - `bypassPermissions`
630
+ - `dontAsk`
631
+ - `auto`, feature-gated
632
+
633
+ Permission features:
634
+
635
+ - Tool-level allow, deny, and ask rules.
636
+ - MCP server/tool permission rules.
637
+ - CLI, command, session, user, project, local, and managed setting sources.
638
+ - Permission request hooks.
639
+ - Permission-denial tracking.
640
+ - Auto-mode classifier integration when gated.
641
+ - Dangerous Bash/PowerShell rule detection.
642
+ - Auto-mode stripping of dangerous rules.
643
+ - Additional directory validation.
644
+ - Security restriction gates.
645
+
646
+ Sandbox configuration supports:
647
+
648
+ - enabled/disabled state
649
+ - fail-if-unavailable
650
+ - automatic Bash approval when sandboxed
651
+ - explicit unsandboxed command allowances
652
+ - network allowed domains
653
+ - managed-only network controls
654
+ - Unix socket controls
655
+ - local binding controls
656
+ - proxy ports
657
+ - filesystem read/write allow and deny rules
658
+ - ignored violations
659
+ - weaker nested/network isolation flags
660
+ - excluded commands
661
+ - custom ripgrep behavior
662
+
663
+ ## MCP integration
664
+
665
+ MCP features:
666
+
667
+ - CLI management through `ur mcp`.
668
+ - MCP stdio server via `src/entrypoints/mcp.ts`.
669
+ - Exposes built-in tools through MCP.
670
+ - Converts Zod schemas to JSON schema for MCP tools.
671
+ - Runs tools in non-interactive context with normal permission checks.
672
+ - Server scopes:
673
+ - local
674
+ - user
675
+ - project
676
+ - dynamic
677
+ - enterprise
678
+ - urai
679
+ - managed
680
+ - Transports:
681
+ - stdio
682
+ - SSE
683
+ - HTTP
684
+ - WebSocket
685
+ - SDK/in-process
686
+ - IDE variants
687
+ - UR.ai proxy
688
+ - Config support:
689
+ - command/args/env
690
+ - URL/headers
691
+ - headers helper
692
+ - OAuth
693
+ - client IDs and client secrets
694
+ - callback ports
695
+ - auth server metadata URL
696
+ - XAA identity-provider settings, feature-gated
697
+ - Connection states:
698
+ - connected
699
+ - failed
700
+ - needs auth
701
+ - pending
702
+ - disabled
703
+ - MCP resources and prompt commands.
704
+ - Official registry lookup/cache.
705
+ - Environment variable expansion.
706
+ - Channel allowlists, permissions, and notifications.
707
+ - Elicitation handling.
708
+ - VS Code SDK MCP support.
709
+ - Tool normalization as `mcp__server__tool`.
710
+
711
+ ## Hooks
712
+
713
+ Hook events include:
714
+
715
+ - `PreToolUse`
716
+ - `PostToolUse`
717
+ - `PostToolUseFailure`
718
+ - `Notification`
719
+ - `UserPromptSubmit`
720
+ - `SessionStart`
721
+ - `SessionEnd`
722
+ - `Stop`
723
+ - `StopFailure`
724
+ - `SubagentStart`
725
+ - `SubagentStop`
726
+ - `PreCompact`
727
+ - `PostCompact`
728
+ - `PermissionRequest`
729
+ - `PermissionDenied`
730
+ - `Setup`
731
+ - `TeammateIdle`
732
+ - `TaskCreated`
733
+ - `TaskCompleted`
734
+ - `Elicitation`
735
+ - `ElicitationResult`
736
+ - `ConfigChange`
737
+ - `WorktreeCreate`
738
+ - `WorktreeRemove`
739
+ - `InstructionsLoaded`
740
+ - `CwdChanged`
741
+ - `FileChanged`
742
+
743
+ Hook command types:
744
+
745
+ - shell command hooks
746
+ - PowerShell hooks
747
+ - prompt/LLM hooks
748
+ - HTTP hooks
749
+ - agent/verifier hooks
750
+
751
+ Hook features:
752
+
753
+ - conditional `if` permission-rule filters
754
+ - timeouts
755
+ - status messages
756
+ - once-only hooks
757
+ - async command hooks
758
+ - async rewake behavior
759
+ - model selection for prompt/agent hooks
760
+ - HTTP headers and allowed environment variables
761
+ - exit-code semantics that can block, feed stderr to the model, erase prompts,
762
+ or decide permission requests depending on event type
763
+
764
+ ## Security features
765
+
766
+ The `src/security/**` subsystem and related slash commands provide:
767
+
768
+ - Security command dispatcher.
769
+ - Source-code security audit.
770
+ - Secret scanning and redaction.
771
+ - Attack-surface mapping.
772
+ - Dependency inventory.
773
+ - OSV vulnerability audit.
774
+ - Dockerfile, Kubernetes, Terraform, and cloud/IaC audit.
775
+ - Threat modeling.
776
+ - Network snapshot and packet-capture summary helpers.
777
+ - Incident response collection.
778
+ - IR timeline support.
779
+ - Containment planning.
780
+ - Compliance reports.
781
+ - SSDF, CIS, ASVS, OWASP, CWE, and MITRE mappings.
782
+ - Playbooks.
783
+ - Local security labs.
784
+ - Hardening checks.
785
+ - Safe command runner.
786
+ - Policy/classifier helpers.
787
+ - Vulnerability-intelligence helpers.
788
+ - Web audit helpers.
789
+
790
+ Security slash-command families include:
791
+
792
+ - `/security`
793
+ - `/security-review`
794
+ - `/threat-model`
795
+ - `/vuln`
796
+ - `/ir`
797
+ - `/compliance`
798
+ - `/playbook`
799
+ - `/lab`
800
+ - `/harden`
801
+ - `/kali`
802
+
803
+ `/security` subcommands include scan, code, secrets, attack-surface,
804
+ dependencies, classify, status, rules, report, scope, mode, threat-model, vuln,
805
+ net, ir, attack, compliance, playbook(s), lab, secure-design, secure-api,
806
+ secure-ci, secure-docker, and secure-deploy.
807
+
808
+ ## Plugins and marketplaces
809
+
810
+ Plugin loading supports:
811
+
812
+ - installed marketplace plugins
813
+ - session-only `--plugin-dir`
814
+ - plugin manifests
815
+ - plugin commands
816
+ - plugin agents
817
+ - plugin skills
818
+ - plugin hooks
819
+ - output styles
820
+ - MCP servers
821
+ - LSP servers
822
+ - plugin settings
823
+ - duplicate-name handling
824
+ - enable/disable state
825
+ - trust warnings
826
+ - marketplace add/list/remove/update
827
+ - sparse marketplace checkouts
828
+ - cached marketplace installs
829
+ - versioned plugin cache
830
+ - seed caches
831
+ - zip caches
832
+ - legacy cache migration
833
+ - blocked marketplaces
834
+ - strict known-marketplace policy
835
+ - managed plugin settings
836
+
837
+ Bundled marketplace plugin families in `marketplace-plugins/**`:
838
+
839
+ - code review
840
+ - evaluate response
841
+ - explain error
842
+ - git summary
843
+ - GitHub issues, PR creation, PR review, repo health, and GitHub workflow skill
844
+ - GitLab issues, merge request creation/review, pipeline, and GitLab workflow
845
+ skill
846
+ - hello example plugin
847
+ - Hugging Face model/dataset search, downloads, model cards, and HF workflow
848
+ skill
849
+ - Miro board, diagram, export, stickies, and Miro workflow skill
850
+ - Obsidian backlinks, daily notes, MOC, second brain, vault search, and second
851
+ brain skill
852
+ - PowerPoint deck creation, markdown-to-deck, review, theme, and deck-craft
853
+ skill
854
+ - release notes
855
+ - skill forge and skill authoring
856
+ - Word document creation, markdown-to-docx, edit, review, and document-craft
857
+ skill
858
+
859
+ ## Configuration features
860
+
861
+ The Config tool supports these settings where available:
862
+
863
+ - `theme`
864
+ - `editorMode`
865
+ - `verbose`
866
+ - `preferredNotifChannel`
867
+ - `autoCompactEnabled`
868
+ - `autoMemoryEnabled`
869
+ - `autoDreamEnabled`
870
+ - `fileCheckpointingEnabled`
871
+ - `showTurnDuration`
872
+ - `terminalProgressBarEnabled`
873
+ - `todoFeatureEnabled`
874
+ - `model`
875
+ - `alwaysThinkingEnabled`
876
+ - `permissions.defaultMode`
877
+ - `language`
878
+ - `teammateMode`
879
+ - `classifierPermissionsEnabled`, internal-only
880
+ - `voiceEnabled`, feature-gated
881
+ - `remoteControlAtStartup`, feature-gated
882
+ - push-notification settings, feature-gated
883
+
884
+ The broader settings schema also covers:
885
+
886
+ - environment variables
887
+ - API-key helpers
888
+ - AWS/GCP auth refresh
889
+ - XAA identity-provider settings
890
+ - file suggestions
891
+ - gitignore behavior
892
+ - cleanup retention
893
+ - attribution
894
+ - git instructions
895
+ - permission allow/deny/ask/default mode/additional dirs
896
+ - model lists and model overrides
897
+ - MCP allow/deny/project approvals
898
+ - hooks
899
+ - worktree symlink and sparse settings
900
+ - hook disabling
901
+ - default shell
902
+ - managed-only hooks, permissions, and MCP settings
903
+ - HTTP hook URL/env policies
904
+ - strict plugin-only customization
905
+ - statusline command
906
+ - enabled plugins
907
+ - extra marketplaces
908
+ - marketplace blocklists
909
+ - authentication organization/method
910
+ - output style
911
+ - language
912
+ - sandbox settings
913
+ - surveys
914
+ - spinner
915
+ - syntax highlighting
916
+ - terminal title
917
+ - thinking and effort
918
+ - advisor
919
+ - fast mode
920
+ - prompt suggestions
921
+ - agent settings
922
+ - company announcements
923
+ - plugin config
924
+ - remote defaults
925
+ - auto updates/channels
926
+ - reduced motion
927
+ - auto memory and auto dream
928
+ - dangerous-mode prompts
929
+ - auto-mode config
930
+ - SSH configs
931
+ - UR.md excludes
932
+ - plugin trust message state
933
+
934
+ ## Model/provider behavior
935
+
936
+ - This external build routes model calls through an Ollama provider shim.
937
+ - The Ollama router inspects local models and classifies likely coding/fast
938
+ capabilities.
939
+ - Auto-routing is on by default through `UR_OLLAMA_AUTO_ROUTE`.
940
+ - Simple prompts can route to a faster model.
941
+ - Complex coding prompts can route to the best available coder model.
942
+ - Model doctor and model route commands expose capability reports and
943
+ recommendations.
944
+ - Embedding-backed features use local Ollama embeddings such as
945
+ `nomic-embed-text` where configured.
946
+
947
+ ## UI and terminal experience
948
+
949
+ Terminal/UI features include:
950
+
951
+ - Ink/React interactive UI.
952
+ - Theming and color controls.
953
+ - Vim mode.
954
+ - Status line configuration.
955
+ - Keybinding help.
956
+ - Cost and usage displays.
957
+ - Session browser and resume UI.
958
+ - Compacting UI.
959
+ - Permission prompts.
960
+ - MCP approval UI.
961
+ - Plugin management UI.
962
+ - Install/setup flows.
963
+ - Feedback and BTW commands.
964
+ - Terminal setup.
965
+ - Desktop, Chrome, IDE, remote environment, and OS integration commands.
966
+ - Voice command surface, feature-gated.
967
+ - Image/video/youtube command surfaces.
968
+
969
+ ## SDK and embedding
970
+
971
+ `src/sdk/index.ts` exposes:
972
+
973
+ - `query`
974
+ - `queryJSON`
975
+ - `UrClient`
976
+ - `parseResultText`
977
+
978
+ The SDK is intentionally small and dependency-free. It shells out to the local
979
+ `ur` binary in print mode, uses JSON output, supports cwd/env/bin overrides, and
980
+ can pass max turns, model, permission mode, and extra args.
981
+
982
+ ## Documentation gaps this inventory exposes
983
+
984
+ The code includes many features that are easy to miss if reading only user docs:
985
+
986
+ - Agent-platform workflows, goals, specs, crews, arena, CI loop, artifacts,
987
+ triggers, evals, and learning.
988
+ - A2A card/server/token support.
989
+ - Rich hook event model.
990
+ - Plugin marketplace and bundled plugin system.
991
+ - Security audit, incident-response, compliance, and lab features.
992
+ - Local knowledge, semantic memory, project DNA, and code-index subsystems.
993
+ - Verifier and project gate logic.
994
+ - Multiple remote/background/daemon/server modes.
995
+ - MCP server mode that exposes UR tools to other clients.
996
+ - Feature-gated browser, Chrome, computer-use, voice, push, cron, and remote
997
+ features.