utim-cli 1.46.22__tar.gz → 1.46.28__tar.gz
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.
- {utim_cli-1.46.22 → utim_cli-1.46.28}/CHANGELOG.md +35 -0
- {utim_cli-1.46.22/utim_cli.egg-info → utim_cli-1.46.28}/PKG-INFO +43 -1
- {utim_cli-1.46.22 → utim_cli-1.46.28}/README.md +124 -82
- {utim_cli-1.46.22 → utim_cli-1.46.28}/pyproject.toml +1 -1
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/__init__.py +21 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/bootstrap.py +95 -24
- utim_cli-1.46.28/utim_cli/client_utils.py +397 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/context_pruner.py +3 -4
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/mcp_client.py +7 -2
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/orchestrator.py +391 -139
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/reflection.py +401 -25
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/server/models.py +81 -0
- utim_cli-1.46.28/utim_cli/server/pricing_updater.py +82 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/server/router.py +5 -2
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/server/routes/completion_routes.py +91 -4
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/server/routes/quota_routes.py +15 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/tools.py +67 -34
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/tui/feedback_dialog.py +16 -2
- utim_cli-1.46.28/utim_cli/utilities.py +184 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/utim.py +129 -48
- {utim_cli-1.46.22 → utim_cli-1.46.28/utim_cli.egg-info}/PKG-INFO +43 -1
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli.egg-info/SOURCES.txt +2 -0
- utim_cli-1.46.22/utim_cli/client_utils.py +0 -223
- {utim_cli-1.46.22 → utim_cli-1.46.28}/LICENSE +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/MANIFEST.in +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/setup.cfg +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/setup.py +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/agent.py +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/auth.py +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/backup.py +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/blender_agent.py +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/config.py +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/constants.py +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/doctor.py +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/knowledge_graph.py +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/local_db.py +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/logger.py +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/mcp_clean_wrapper.py +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/mcp_registry.json +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/report.py +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/scrapy_search.py +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/server/__init__.py +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/server/auth.py +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/server/db.py +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/server/email_utils.py +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/server/exchange_rate.py +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/server/firebase.py +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/server/history.py +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/server/logging_config.py +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/server/rate_limit.py +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/server/routes/__init__.py +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/server/routes/auth_routes.py +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/server/routes/credit_routes.py +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/server/routes/feedback_routes.py +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/server/routes/session_routes.py +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/server/routes/share_routes.py +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/server/server.py +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/share.py +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/share_tui.py +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/situational_scoring.py +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/state.py +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/tui/__init__.py +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/tui/history_dialog.py +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/tui/mcp_dialog.py +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/tui/model_dialog.py +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/tui/resume_dialog.py +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/tui/tools_dialog.py +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/tui/update_dialog.py +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/vector_memory.py +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli/workspace.py +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli.egg-info/dependency_links.txt +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli.egg-info/entry_points.txt +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli.egg-info/requires.txt +0 -0
- {utim_cli-1.46.22 → utim_cli-1.46.28}/utim_cli.egg-info/top_level.txt +0 -0
|
@@ -2,6 +2,41 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to the UTIM CLI Agent will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [1.46.28] - 2026-07-11
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- **Intelligent Experience Compression**: Replaced simple per-experience truncation/token-cutoff logic with advanced LLM-based context compression (utilizing `poolside/laguna-xs-2.1:free`, `cohere/north-mini-code:free`, and `openrouter/free`). When relevant lessons exceed 5,000 tokens, the LLM dynamically compresses them into a concise bullet-point summary, which is cached to prevent per-iteration latency.
|
|
9
|
+
- **Aborted Turn Progress & Reflection**: Ensured aborted responses preserve partial progress and trigger a background reflection phase to extract lessons from failed/interrupted runs.
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
- **Redundancy Filter Correction**: Fixed the experience retrieval redundancy filter to only deduplicate exact matches rather than checking substrings, preventing the silent dropping of detailed shell/PowerShell lessons.
|
|
13
|
+
- **Filtered MCP Notification Context**: Updated MCP notifications to filter out disabled tools, preventing the agent from trying to call disabled MCP tools.
|
|
14
|
+
- **Research File XML Cleanup**: Fixed the codebase research subagent to forbid and automatically strip hallucinated XML tool-calling syntax in its markdown reports.
|
|
15
|
+
|
|
16
|
+
## [1.46.27] - 2026-07-10
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
- **Image Generation Quota Bypass**: Fixed the image generation tool to bypass the monthly base credit check when the user has a positive bonus credit balance.
|
|
20
|
+
- **Piped Output Formatting**: Corrected command output formatting and token usage tracking when the CLI is run in a piped or non-TTY environment.
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
- **Model Pricing Docs**: Replaced static tables on the documentation page with an interactive component providing category filter chips and capabilities search for all UTIM models.
|
|
24
|
+
|
|
25
|
+
## [1.46.26] - 2026-07-09
|
|
26
|
+
|
|
27
|
+
### Added
|
|
28
|
+
- **OpenRouter Models Addition**: Added `aion-labs/aion-3.0`, `aion-labs/aion-3.0-mini`, `x-ai/grok-4.5`, `openai/gpt-5.6-luna-pro`, `openai/gpt-5.6-luna`, `openai/gpt-5.6-terra-pro`, `openai/gpt-5.6-terra`, `openai/gpt-5.6-sol-pro`, and `openai/gpt-5.6-sol` to the CLI's `/model` selector list.
|
|
29
|
+
|
|
30
|
+
## [1.46.24] - 2026-07-09
|
|
31
|
+
|
|
32
|
+
### Added
|
|
33
|
+
- **Interactive Learnt Verification Questions**: Integrated a feedback reflection loop that analyzes low-rated chats (under 4 stars) to extract candidate lessons and draft clarifying questions. The CLI will dynamically ask the user confirmation questions in future runs when matching contexts are detected to verify or reject the learned patterns.
|
|
34
|
+
|
|
35
|
+
## [1.46.23] - 2026-07-09
|
|
36
|
+
|
|
37
|
+
### Fixed
|
|
38
|
+
- **Feedback Details Crash**: Resolved a critical AttributeError crash when selecting a feedback entry in the `/feedbacks` dashboard. The UI now gracefully handles and parses `chat_history` payload data under all serialization conditions.
|
|
39
|
+
|
|
5
40
|
## [1.46.22] - 2026-07-09
|
|
6
41
|
|
|
7
42
|
### Fixed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: utim-cli
|
|
3
|
-
Version: 1.46.
|
|
3
|
+
Version: 1.46.28
|
|
4
4
|
Summary: UTIM – Universal Terminal Intelligence Manager. A powerful agentic AI coding assistant for your terminal.
|
|
5
5
|
License: MIT
|
|
6
6
|
Project-URL: Homepage, https://utim.dev
|
|
@@ -136,3 +136,45 @@ Inside the interactive chat terminal, type these slash commands for direct works
|
|
|
136
136
|
- **No Remote Code Execution**: Runs locally on your machine.
|
|
137
137
|
- **Unverified Sensitive Reads Blocked**: Reading files or memory matching sensitive keys (like passwords, secret codes, or personal data) is blocked unless verified via your configured verification code.
|
|
138
138
|
- **No Auto-Deletions**: Any command that deletes files outside the working directory is blocked automatically.
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## 📋 Compatibility Matrix
|
|
143
|
+
|
|
144
|
+
| Component | Minimum Version | Recommended Version | Notes |
|
|
145
|
+
|-----------|-----------------|---------------------|-------|
|
|
146
|
+
| **Python** | 3.10 | 3.11+ | 3.10 required for asyncio features |
|
|
147
|
+
| **pip** | 21.0 | 23.0+ | For modern dependency resolution |
|
|
148
|
+
| **Node.js** | 18.0 | 20.0+ | Only if using MCP servers |
|
|
149
|
+
| **Operating System** | | | |
|
|
150
|
+
| - Windows | 10 (1903+) | 11 | PowerShell or CMD required |
|
|
151
|
+
| - macOS | 11 (Big Sur) | 14 (Sonoma) | Terminal.app or iTerm2 |
|
|
152
|
+
| - Linux | Ubuntu 20.04 | Ubuntu 22.04+ | Any modern distro with bash |
|
|
153
|
+
| **Terminals** | | | |
|
|
154
|
+
| - Windows Terminal | 1.0 | 1.19+ | Full color support |
|
|
155
|
+
| - iTerm2 | 3.4+ | 3.5+ | Recommended on macOS |
|
|
156
|
+
| - VS Code Terminal | 1.70+ | 1.85+ | Full support |
|
|
157
|
+
| **Required Tools** | | | |
|
|
158
|
+
| - git | 2.30 | 2.40+ | For undo/redo and diffs |
|
|
159
|
+
| - Docker | 20.10 | 24.0+ | Optional, for sandbox mode |
|
|
160
|
+
|
|
161
|
+
### Supported LLM Providers
|
|
162
|
+
|
|
163
|
+
| Provider | API Type | Models Supported |
|
|
164
|
+
|----------|----------|------------------|
|
|
165
|
+
| OpenRouter | REST | Claude, GPT, Gemini, Mistral, etc. |
|
|
166
|
+
| OpenAI | REST | GPT-4o, GPT-4 Turbo, GPT-3.5 |
|
|
167
|
+
| Anthropic | REST | Claude 3.5, 3, 2 |
|
|
168
|
+
| Google AI | REST | Gemini 1.5 Pro/Flash |
|
|
169
|
+
| Azure OpenAI | REST | GPT-4, GPT-3.5 |
|
|
170
|
+
| Ollama | Local | Llama 3, Mistral, CodeLlama |
|
|
171
|
+
| Custom Server | REST | Any OpenAI-compatible API |
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## 📄 Related Documentation
|
|
176
|
+
|
|
177
|
+
- [📖 Full Documentation](https://utim.dev/docs)
|
|
178
|
+
- [🔒 Security Policy](SECURITY.md)
|
|
179
|
+
- [📊 SLA & Support](SLA.md)
|
|
180
|
+
- [🛡️ Privacy Policy](landing/src/docs_md/privacy.md)
|
|
@@ -1,82 +1,124 @@
|
|
|
1
|
-
# UTIM CLI Agent: Enterprise Coder Assistant
|
|
2
|
-
|
|
3
|
-
UTIM is an agentic developer CLI assistant designed to automate coding tasks directly inside your local terminal, featuring robust safety controls, self-healing quality gates, and local-first semantic memory.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## 🚀 Quick Start
|
|
8
|
-
|
|
9
|
-
### 1. Installation
|
|
10
|
-
Install the package from your local source directory:
|
|
11
|
-
|
|
12
|
-
```bash
|
|
13
|
-
# Basic installation
|
|
14
|
-
pip install .
|
|
15
|
-
|
|
16
|
-
# Recommended: Full installation (includes semantic vector RAG & web search)
|
|
17
|
-
pip install ".[full]"
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
### 2. Provider & Model Configuration
|
|
21
|
-
Start the chat session:
|
|
22
|
-
```bash
|
|
23
|
-
utim
|
|
24
|
-
```
|
|
25
|
-
On first run, UTIM checks for `.utim/config.json`. If it does not exist, it runs a provider and model configuration wizard. You can configure:
|
|
26
|
-
- **Default Providers**: OpenRouter, OpenAI, custom servers, etc.
|
|
27
|
-
- **Model Picker**: Press `Ctrl+M` in the chat terminal at any time to configure, pick, add, or delete LLMs.
|
|
28
|
-
|
|
29
|
-
---
|
|
30
|
-
|
|
31
|
-
## ⚡ Main CLI Commands
|
|
32
|
-
|
|
33
|
-
- **`utim`**: Starts the interactive chat terminal (TUI).
|
|
34
|
-
- **`utim task "<prompt>"`**: Executes a single task autonomously from the command line and exits. In an interactive terminal (`stdin` is a TTY) file writes and commands prompt for confirmation; when piped/scripted they run in auto-accept mode.
|
|
35
|
-
- **`utim --dry-run`**: Starts the session in **Dry-Run Mode** (all code modifications and shell commands are simulated, not written/executed).
|
|
36
|
-
- **`utim --sandbox`**: Runs all mutating shell command proposals in the intelligent local sandbox (untrusted commands will block until approved).
|
|
37
|
-
- **`utim doctor`** / **`utim init`** / **`utim reset`**: Administrative commands for state diagnosis, initialization, and factory resets.
|
|
38
|
-
|
|
39
|
-
---
|
|
40
|
-
|
|
41
|
-
## 🛠️ In-Chat Slash Commands
|
|
42
|
-
|
|
43
|
-
Inside the interactive chat terminal, type these slash commands for direct workspace control:
|
|
44
|
-
|
|
45
|
-
- **`/undo`**: Reverts the last assistant action, restoring files to their exact "before" state and rolling back messages.
|
|
46
|
-
- **`/redo`**: Re-applies the last undone turn, re-writing files and restoring conversation logs.
|
|
47
|
-
- **`/rewind <turn_index>`**: Rolls back the entire session to a specific conversation turn.
|
|
48
|
-
- **`/doctor`**: Run diagnostics on environment variables, Python version, dependencies, API model connections, and MCP server status.
|
|
49
|
-
- **`/report`**: Generates a support bundle under `.utim_tmp/report_bundle.zip` (automatically redacts secrets, passwords, or personal names/files).
|
|
50
|
-
- **`/reset`**: Wipes the current chat history without deleting persistent local vector memory.
|
|
51
|
-
|
|
52
|
-
---
|
|
53
|
-
|
|
54
|
-
## 🧠 Architecture & How it Works
|
|
55
|
-
|
|
56
|
-
1. **Local Memory (`.utim/memory.json` & ChromaDB)**:
|
|
57
|
-
- Global user preferences, rules, and facts are synced to a semantic vector database (`.utim_tmp/vector_db`).
|
|
58
|
-
- Relevant memories are dynamically fetched via semantic similarity (RAG) and injected into the system prompt context, preventing prompt bloating.
|
|
59
|
-
2. **Undo/Redo Stack & Session State**:
|
|
60
|
-
- Every file change (writes, batch string edits, moves, deletions) computes a diff snapshot.
|
|
61
|
-
- The entire stack is serialized dynamically to `.utim/session_state.json`. You can close your shell, shut down your computer, and resume later with intact rollback features.
|
|
62
|
-
3. **Workspace Boundary & Safety Controls**:
|
|
63
|
-
- Prior to writing files, UTIM performs **Pre-Commit Syntax Checks** (AST compilation for Python, JSON loads, JS/TS checks).
|
|
64
|
-
- If tests are available (`pytest`, `npm test`, etc.), UTIM runs them in a background **Regression testing loop**, prompting the model to self-heal code errors if assertions fail.
|
|
65
|
-
- **Interactive TUI mode** (`utim`): every file mutation shows an interactive diff dialog; the developer accepts, edits, or rejects individual hunks before they are applied.
|
|
66
|
-
- **CLI task mode** (`utim task`): when running in a real terminal, destructive operations (`rm`, package installs, `>` redirects) prompt for `y/n` confirmation. When stdin is piped/non-interactive all edits are auto-accepted.
|
|
67
|
-
- **Sandbox mode** (`utim --sandbox`): classifies every terminal command as safe or risky and blocks risky commands until explicitly approved.
|
|
68
|
-
|
|
69
|
-
---
|
|
70
|
-
|
|
71
|
-
## ⚠️ What this Tool Can and Cannot Do
|
|
72
|
-
|
|
73
|
-
### Can Do:
|
|
74
|
-
- Read, write, and patch codebases safely.
|
|
75
|
-
- Install and coordinate custom MCP (Model Context Protocol) servers.
|
|
76
|
-
- Self-heal syntax and test errors before files are written.
|
|
77
|
-
- Revert any file modification instantly.
|
|
78
|
-
|
|
79
|
-
### Cannot Do:
|
|
80
|
-
- **No Remote Code Execution**: Runs locally on your machine.
|
|
81
|
-
- **Unverified Sensitive Reads Blocked**: Reading files or memory matching sensitive keys (like passwords, secret codes, or personal data) is blocked unless verified via your configured verification code.
|
|
82
|
-
- **No Auto-Deletions**: Any command that deletes files outside the working directory is blocked automatically.
|
|
1
|
+
# UTIM CLI Agent: Enterprise Coder Assistant
|
|
2
|
+
|
|
3
|
+
UTIM is an agentic developer CLI assistant designed to automate coding tasks directly inside your local terminal, featuring robust safety controls, self-healing quality gates, and local-first semantic memory.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 🚀 Quick Start
|
|
8
|
+
|
|
9
|
+
### 1. Installation
|
|
10
|
+
Install the package from your local source directory:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
# Basic installation
|
|
14
|
+
pip install .
|
|
15
|
+
|
|
16
|
+
# Recommended: Full installation (includes semantic vector RAG & web search)
|
|
17
|
+
pip install ".[full]"
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### 2. Provider & Model Configuration
|
|
21
|
+
Start the chat session:
|
|
22
|
+
```bash
|
|
23
|
+
utim
|
|
24
|
+
```
|
|
25
|
+
On first run, UTIM checks for `.utim/config.json`. If it does not exist, it runs a provider and model configuration wizard. You can configure:
|
|
26
|
+
- **Default Providers**: OpenRouter, OpenAI, custom servers, etc.
|
|
27
|
+
- **Model Picker**: Press `Ctrl+M` in the chat terminal at any time to configure, pick, add, or delete LLMs.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## ⚡ Main CLI Commands
|
|
32
|
+
|
|
33
|
+
- **`utim`**: Starts the interactive chat terminal (TUI).
|
|
34
|
+
- **`utim task "<prompt>"`**: Executes a single task autonomously from the command line and exits. In an interactive terminal (`stdin` is a TTY) file writes and commands prompt for confirmation; when piped/scripted they run in auto-accept mode.
|
|
35
|
+
- **`utim --dry-run`**: Starts the session in **Dry-Run Mode** (all code modifications and shell commands are simulated, not written/executed).
|
|
36
|
+
- **`utim --sandbox`**: Runs all mutating shell command proposals in the intelligent local sandbox (untrusted commands will block until approved).
|
|
37
|
+
- **`utim doctor`** / **`utim init`** / **`utim reset`**: Administrative commands for state diagnosis, initialization, and factory resets.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## 🛠️ In-Chat Slash Commands
|
|
42
|
+
|
|
43
|
+
Inside the interactive chat terminal, type these slash commands for direct workspace control:
|
|
44
|
+
|
|
45
|
+
- **`/undo`**: Reverts the last assistant action, restoring files to their exact "before" state and rolling back messages.
|
|
46
|
+
- **`/redo`**: Re-applies the last undone turn, re-writing files and restoring conversation logs.
|
|
47
|
+
- **`/rewind <turn_index>`**: Rolls back the entire session to a specific conversation turn.
|
|
48
|
+
- **`/doctor`**: Run diagnostics on environment variables, Python version, dependencies, API model connections, and MCP server status.
|
|
49
|
+
- **`/report`**: Generates a support bundle under `.utim_tmp/report_bundle.zip` (automatically redacts secrets, passwords, or personal names/files).
|
|
50
|
+
- **`/reset`**: Wipes the current chat history without deleting persistent local vector memory.
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## 🧠 Architecture & How it Works
|
|
55
|
+
|
|
56
|
+
1. **Local Memory (`.utim/memory.json` & ChromaDB)**:
|
|
57
|
+
- Global user preferences, rules, and facts are synced to a semantic vector database (`.utim_tmp/vector_db`).
|
|
58
|
+
- Relevant memories are dynamically fetched via semantic similarity (RAG) and injected into the system prompt context, preventing prompt bloating.
|
|
59
|
+
2. **Undo/Redo Stack & Session State**:
|
|
60
|
+
- Every file change (writes, batch string edits, moves, deletions) computes a diff snapshot.
|
|
61
|
+
- The entire stack is serialized dynamically to `.utim/session_state.json`. You can close your shell, shut down your computer, and resume later with intact rollback features.
|
|
62
|
+
3. **Workspace Boundary & Safety Controls**:
|
|
63
|
+
- Prior to writing files, UTIM performs **Pre-Commit Syntax Checks** (AST compilation for Python, JSON loads, JS/TS checks).
|
|
64
|
+
- If tests are available (`pytest`, `npm test`, etc.), UTIM runs them in a background **Regression testing loop**, prompting the model to self-heal code errors if assertions fail.
|
|
65
|
+
- **Interactive TUI mode** (`utim`): every file mutation shows an interactive diff dialog; the developer accepts, edits, or rejects individual hunks before they are applied.
|
|
66
|
+
- **CLI task mode** (`utim task`): when running in a real terminal, destructive operations (`rm`, package installs, `>` redirects) prompt for `y/n` confirmation. When stdin is piped/non-interactive all edits are auto-accepted.
|
|
67
|
+
- **Sandbox mode** (`utim --sandbox`): classifies every terminal command as safe or risky and blocks risky commands until explicitly approved.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## ⚠️ What this Tool Can and Cannot Do
|
|
72
|
+
|
|
73
|
+
### Can Do:
|
|
74
|
+
- Read, write, and patch codebases safely.
|
|
75
|
+
- Install and coordinate custom MCP (Model Context Protocol) servers.
|
|
76
|
+
- Self-heal syntax and test errors before files are written.
|
|
77
|
+
- Revert any file modification instantly.
|
|
78
|
+
|
|
79
|
+
### Cannot Do:
|
|
80
|
+
- **No Remote Code Execution**: Runs locally on your machine.
|
|
81
|
+
- **Unverified Sensitive Reads Blocked**: Reading files or memory matching sensitive keys (like passwords, secret codes, or personal data) is blocked unless verified via your configured verification code.
|
|
82
|
+
- **No Auto-Deletions**: Any command that deletes files outside the working directory is blocked automatically.
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## 📋 Compatibility Matrix
|
|
87
|
+
|
|
88
|
+
| Component | Minimum Version | Recommended Version | Notes |
|
|
89
|
+
|-----------|-----------------|---------------------|-------|
|
|
90
|
+
| **Python** | 3.10 | 3.11+ | 3.10 required for asyncio features |
|
|
91
|
+
| **pip** | 21.0 | 23.0+ | For modern dependency resolution |
|
|
92
|
+
| **Node.js** | 18.0 | 20.0+ | Only if using MCP servers |
|
|
93
|
+
| **Operating System** | | | |
|
|
94
|
+
| - Windows | 10 (1903+) | 11 | PowerShell or CMD required |
|
|
95
|
+
| - macOS | 11 (Big Sur) | 14 (Sonoma) | Terminal.app or iTerm2 |
|
|
96
|
+
| - Linux | Ubuntu 20.04 | Ubuntu 22.04+ | Any modern distro with bash |
|
|
97
|
+
| **Terminals** | | | |
|
|
98
|
+
| - Windows Terminal | 1.0 | 1.19+ | Full color support |
|
|
99
|
+
| - iTerm2 | 3.4+ | 3.5+ | Recommended on macOS |
|
|
100
|
+
| - VS Code Terminal | 1.70+ | 1.85+ | Full support |
|
|
101
|
+
| **Required Tools** | | | |
|
|
102
|
+
| - git | 2.30 | 2.40+ | For undo/redo and diffs |
|
|
103
|
+
| - Docker | 20.10 | 24.0+ | Optional, for sandbox mode |
|
|
104
|
+
|
|
105
|
+
### Supported LLM Providers
|
|
106
|
+
|
|
107
|
+
| Provider | API Type | Models Supported |
|
|
108
|
+
|----------|----------|------------------|
|
|
109
|
+
| OpenRouter | REST | Claude, GPT, Gemini, Mistral, etc. |
|
|
110
|
+
| OpenAI | REST | GPT-4o, GPT-4 Turbo, GPT-3.5 |
|
|
111
|
+
| Anthropic | REST | Claude 3.5, 3, 2 |
|
|
112
|
+
| Google AI | REST | Gemini 1.5 Pro/Flash |
|
|
113
|
+
| Azure OpenAI | REST | GPT-4, GPT-3.5 |
|
|
114
|
+
| Ollama | Local | Llama 3, Mistral, CodeLlama |
|
|
115
|
+
| Custom Server | REST | Any OpenAI-compatible API |
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## 📄 Related Documentation
|
|
120
|
+
|
|
121
|
+
- [📖 Full Documentation](https://utim.dev/docs)
|
|
122
|
+
- [🔒 Security Policy](SECURITY.md)
|
|
123
|
+
- [📊 SLA & Support](SLA.md)
|
|
124
|
+
- [🛡️ Privacy Policy](landing/src/docs_md/privacy.md)
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "utim-cli"
|
|
7
|
-
version = "1.46.
|
|
7
|
+
version = "1.46.28"
|
|
8
8
|
description = "UTIM – Universal Terminal Intelligence Manager. A powerful agentic AI coding assistant for your terminal."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
|
@@ -1,6 +1,27 @@
|
|
|
1
1
|
# UTIM CLI Package
|
|
2
|
+
__version__ = "1.46.28"
|
|
3
|
+
|
|
2
4
|
import builtins, os, pathlib, urllib.parse, re
|
|
3
5
|
|
|
6
|
+
# Import hint handling utilities lazily to avoid circular imports during CLI startup
|
|
7
|
+
def _get_hint_utils():
|
|
8
|
+
"""Lazy import of hint handling utilities."""
|
|
9
|
+
from utim_cli.utilities import state, parse_hint_commands, process_hint_messages, apply_hint_context
|
|
10
|
+
return state, parse_hint_commands, process_hint_messages, apply_hint_context
|
|
11
|
+
|
|
12
|
+
# Export hint utilities as properties for dynamic import
|
|
13
|
+
class _HintUtilsProxy:
|
|
14
|
+
def __getattr__(self, name):
|
|
15
|
+
if name in ['state', 'parse_hint_commands', 'process_hint_messages', 'apply_hint_context']:
|
|
16
|
+
# Import on demand
|
|
17
|
+
utils = _get_hint_utils()
|
|
18
|
+
module_vars = {'state': utils[0], 'parse_hint_commands': utils[1],
|
|
19
|
+
'process_hint_messages': utils[2], 'apply_hint_context': utils[3]}
|
|
20
|
+
# Set the attribute on this module to cache the import
|
|
21
|
+
setattr(self, name, module_vars[name])
|
|
22
|
+
return module_vars[name]
|
|
23
|
+
raise AttributeError(f"'module' object has no attribute '{name}'")
|
|
24
|
+
|
|
4
25
|
def _make_file_uri(path: str) -> str:
|
|
5
26
|
p = pathlib.Path(path).resolve()
|
|
6
27
|
encoded = urllib.parse.quote(str(p).replace('\\', '/'))
|
|
@@ -351,33 +351,103 @@ def _write_utim_md():
|
|
|
351
351
|
from utim_cli.logger import log_error
|
|
352
352
|
log_error("bootstrap", f"Failed to write UTIM.md markdown to {md_path}", e)
|
|
353
353
|
|
|
354
|
+
def scan_available_skills():
|
|
355
|
+
"""
|
|
356
|
+
Scans .utim/skills and .agents/skills for directories containing SKILL.md.
|
|
357
|
+
Returns:
|
|
358
|
+
dict: A dictionary mapping skill_name to dict containing path, name, description, and keywords.
|
|
359
|
+
"""
|
|
360
|
+
import os
|
|
361
|
+
from pathlib import Path
|
|
362
|
+
import yaml
|
|
363
|
+
|
|
364
|
+
skills = {}
|
|
365
|
+
paths_to_check = [Path('.utim/skills'), Path('.agents/skills')]
|
|
366
|
+
|
|
367
|
+
for base_dir in paths_to_check:
|
|
368
|
+
if not base_dir.exists():
|
|
369
|
+
continue
|
|
370
|
+
for name in os.listdir(base_dir):
|
|
371
|
+
skill_dir = base_dir / name
|
|
372
|
+
if skill_dir.is_dir():
|
|
373
|
+
skill_md = skill_dir / 'SKILL.md'
|
|
374
|
+
if skill_md.exists():
|
|
375
|
+
# Avoid duplicates
|
|
376
|
+
if name in skills:
|
|
377
|
+
continue
|
|
378
|
+
|
|
379
|
+
description = ""
|
|
380
|
+
frontmatter_name = name
|
|
381
|
+
content = ""
|
|
382
|
+
try:
|
|
383
|
+
with open(skill_md, 'r', encoding='utf-8') as f:
|
|
384
|
+
content = f.read()
|
|
385
|
+
if content.startswith('---'):
|
|
386
|
+
parts = content.split('---', 2)
|
|
387
|
+
if len(parts) >= 3:
|
|
388
|
+
ydata = yaml.safe_load(parts[1])
|
|
389
|
+
if ydata:
|
|
390
|
+
description = ydata.get('description', '')
|
|
391
|
+
frontmatter_name = ydata.get('name', name)
|
|
392
|
+
except Exception:
|
|
393
|
+
pass
|
|
394
|
+
|
|
395
|
+
# Generate keywords from description and name
|
|
396
|
+
words = set()
|
|
397
|
+
# 1. Words from name
|
|
398
|
+
for word in name.replace('-', ' ').replace('_', ' ').split():
|
|
399
|
+
if len(word) > 2:
|
|
400
|
+
words.add(word.lower())
|
|
401
|
+
# 2. Words from description
|
|
402
|
+
stop_words = {
|
|
403
|
+
"and", "the", "a", "of", "to", "for", "in", "on", "with", "is", "this", "when", "focus",
|
|
404
|
+
"that", "are", "from", "these", "those", "by", "an", "at", "or", "as", "be", "your", "our",
|
|
405
|
+
"their", "guidelines", "design", "patterns", "focusing", "within", "system",
|
|
406
|
+
"terminal", "cli", "agent", "development", "workspace", "programming", "python", "code",
|
|
407
|
+
"codebase", "files", "tools", "user", "developer", "task", "project", "run", "running",
|
|
408
|
+
"implement", "implementing", "highly", "polished", "covers", "options", "status", "updates",
|
|
409
|
+
"prevention", "activate", "refining", "flows", "input/output"
|
|
410
|
+
}
|
|
411
|
+
for word in description.replace(',', ' ').replace('.', ' ').replace('(', ' ').replace(')', ' ').split():
|
|
412
|
+
w = word.lower().strip()
|
|
413
|
+
if len(w) > 2 and w not in stop_words:
|
|
414
|
+
words.add(w)
|
|
415
|
+
|
|
416
|
+
skills[name] = {
|
|
417
|
+
"path": skill_md,
|
|
418
|
+
"name": frontmatter_name,
|
|
419
|
+
"description": description,
|
|
420
|
+
"keywords": list(words),
|
|
421
|
+
"content": content
|
|
422
|
+
}
|
|
423
|
+
return skills
|
|
424
|
+
|
|
354
425
|
def get_rag_context(user_prompt: str = "") -> str:
|
|
355
426
|
"""Get RAG context string for system prompt injection by matching user_prompt keywords to skills."""
|
|
356
427
|
try:
|
|
357
428
|
from utim_cli.state import STATE
|
|
358
429
|
STATE["injected_contexts"] = []
|
|
359
430
|
|
|
360
|
-
|
|
431
|
+
skills = scan_available_skills()
|
|
361
432
|
matched_skills = []
|
|
362
433
|
user_prompt_lower = user_prompt.lower()
|
|
363
434
|
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
for skill_name, keys in keywords.items():
|
|
375
|
-
if any(k in user_prompt_lower for k in keys):
|
|
435
|
+
for skill_name, skill_info in skills.items():
|
|
436
|
+
matched = False
|
|
437
|
+
if any(kw in user_prompt_lower for kw in skill_info["keywords"]):
|
|
438
|
+
matched = True
|
|
439
|
+
if not matched:
|
|
440
|
+
if skill_name.replace("-", " ") in user_prompt_lower or skill_name in user_prompt_lower:
|
|
441
|
+
matched = True
|
|
442
|
+
if matched:
|
|
376
443
|
matched_skills.append(skill_name)
|
|
377
444
|
|
|
378
445
|
# If no keywords matched, default to AGENTS.md
|
|
379
446
|
if not matched_skills:
|
|
380
447
|
agents_path = UTIM_DIR / 'AGENTS.md'
|
|
448
|
+
if not agents_path.exists():
|
|
449
|
+
from pathlib import Path
|
|
450
|
+
agents_path = Path('.agents/AGENTS.md')
|
|
381
451
|
if agents_path.exists():
|
|
382
452
|
with open(agents_path, 'r', encoding='utf-8') as f:
|
|
383
453
|
content = f.read()
|
|
@@ -387,17 +457,15 @@ def get_rag_context(user_prompt: str = "") -> str:
|
|
|
387
457
|
|
|
388
458
|
context = ""
|
|
389
459
|
for skill_name in matched_skills[:2]: # Load top 2 matched skills
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
if
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
context += f"\n### RELEVANT CORE SKILL: {skill_name.upper()} ###\n{content[:1500]}\n"
|
|
400
|
-
|
|
460
|
+
skill_info = skills[skill_name]
|
|
461
|
+
content = skill_info["content"]
|
|
462
|
+
if content.startswith('---'):
|
|
463
|
+
parts = content.split('---', 2)
|
|
464
|
+
if len(parts) >= 3:
|
|
465
|
+
content = parts[2].strip()
|
|
466
|
+
STATE["injected_contexts"].append(content)
|
|
467
|
+
context += f"\n### RELEVANT CORE SKILL: {skill_name.upper()} ###\n{content[:1500]}\n"
|
|
468
|
+
|
|
401
469
|
return context
|
|
402
470
|
except Exception as e:
|
|
403
471
|
from utim_cli.logger import log_error
|
|
@@ -419,6 +487,9 @@ def get_subagent_rag_context(subagent_name: str, query: str = "") -> str:
|
|
|
419
487
|
return ""
|
|
420
488
|
|
|
421
489
|
skill_path = UTIM_DIR / 'skills' / skill_name / 'SKILL.md'
|
|
490
|
+
if not skill_path.exists():
|
|
491
|
+
from pathlib import Path
|
|
492
|
+
skill_path = Path('.agents/skills') / skill_name / 'SKILL.md'
|
|
422
493
|
if not skill_path.exists():
|
|
423
494
|
return ""
|
|
424
495
|
|