agentvcs 1.0.0__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.
- agentvcs-1.0.0/LICENSE +21 -0
- agentvcs-1.0.0/PKG-INFO +615 -0
- agentvcs-1.0.0/README.md +579 -0
- agentvcs-1.0.0/pyproject.toml +65 -0
- agentvcs-1.0.0/setup.cfg +4 -0
- agentvcs-1.0.0/src/agentvcs/__init__.py +4 -0
- agentvcs-1.0.0/src/agentvcs/agents/__init__.py +6 -0
- agentvcs-1.0.0/src/agentvcs/agents/base.py +254 -0
- agentvcs-1.0.0/src/agentvcs/agents/registry.py +36 -0
- agentvcs-1.0.0/src/agentvcs/cli.py +1453 -0
- agentvcs-1.0.0/src/agentvcs/core/__init__.py +5 -0
- agentvcs-1.0.0/src/agentvcs/core/storage.py +119 -0
- agentvcs-1.0.0/src/agentvcs/events/__init__.py +5 -0
- agentvcs-1.0.0/src/agentvcs/events/stream.py +64 -0
- agentvcs-1.0.0/src/agentvcs/graph/__init__.py +5 -0
- agentvcs-1.0.0/src/agentvcs/graph/builder.py +117 -0
- agentvcs-1.0.0/src/agentvcs/merge/__init__.py +5 -0
- agentvcs-1.0.0/src/agentvcs/merge/engine.py +114 -0
- agentvcs-1.0.0/src/agentvcs/models.py +174 -0
- agentvcs-1.0.0/src/agentvcs/policy/__init__.py +5 -0
- agentvcs-1.0.0/src/agentvcs/policy/engine.py +127 -0
- agentvcs-1.0.0/src/agentvcs.egg-info/PKG-INFO +615 -0
- agentvcs-1.0.0/src/agentvcs.egg-info/SOURCES.txt +25 -0
- agentvcs-1.0.0/src/agentvcs.egg-info/dependency_links.txt +1 -0
- agentvcs-1.0.0/src/agentvcs.egg-info/entry_points.txt +2 -0
- agentvcs-1.0.0/src/agentvcs.egg-info/requires.txt +16 -0
- agentvcs-1.0.0/src/agentvcs.egg-info/top_level.txt +1 -0
agentvcs-1.0.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 live-by-unix
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
agentvcs-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,615 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: agentvcs
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: The world's first agentic version control system
|
|
5
|
+
Author-email: live-by-unix <hyperpixel189@outlook.com>
|
|
6
|
+
Project-URL: Homepage, https://github.com/agentvcs/agentvcs
|
|
7
|
+
Project-URL: Documentation, https://docs.agentvcs.dev
|
|
8
|
+
Project-URL: Repository, https://github.com/agentvcs/agentvcs
|
|
9
|
+
Classifier: Development Status :: 3 - Alpha
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Requires-Python: >=3.9
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
License-File: LICENSE
|
|
20
|
+
Requires-Dist: click>=8.1.0
|
|
21
|
+
Requires-Dist: pydantic>=2.0.0
|
|
22
|
+
Requires-Dist: pyyaml>=6.0
|
|
23
|
+
Requires-Dist: rich>=13.0.0
|
|
24
|
+
Requires-Dist: gitpython>=3.1.0
|
|
25
|
+
Requires-Dist: networkx>=3.0
|
|
26
|
+
Requires-Dist: aiohttp>=3.8.0
|
|
27
|
+
Requires-Dist: watchdog>=3.0.0
|
|
28
|
+
Requires-Dist: jinja2>=3.1.0
|
|
29
|
+
Provides-Extra: dev
|
|
30
|
+
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
31
|
+
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
|
|
32
|
+
Requires-Dist: black>=23.0.0; extra == "dev"
|
|
33
|
+
Requires-Dist: mypy>=1.0.0; extra == "dev"
|
|
34
|
+
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
|
35
|
+
Dynamic: license-file
|
|
36
|
+
|
|
37
|
+
# AgentVCS
|
|
38
|
+
|
|
39
|
+
[](LICENSE)  
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
The world's first agentic version control system — a git-like VCS (version control system) built for agents where humans are second priority and agents are first.
|
|
43
|
+
|
|
44
|
+
<img width="1264" height="1264" alt="AgentVCS Robot Open Source Logo" src="https://github.com/user-attachments/assets/fc15622c-7194-4812-8628-a16a668f01e3" />
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
## Overview
|
|
48
|
+
|
|
49
|
+
AgentVCS is a semantic, agent-native version control system designed for autonomous AI workflows. Unlike traditional VCS tools built for human collaboration, AgentVCS prioritizes agent autonomy with:
|
|
50
|
+
|
|
51
|
+
- **Semantic commits** with intent, risk levels, and reasoning traces
|
|
52
|
+
- **Multi-agent review swarms** for security, performance, and architecture
|
|
53
|
+
- **Predictive merge engine** that simulates and resolves conflicts before they occur
|
|
54
|
+
- **Machine-first permissions** and policy enforcement
|
|
55
|
+
- **Intent-aware history** queries for understanding change rationale
|
|
56
|
+
- **Continuous risk monitoring** with sentinel agents
|
|
57
|
+
- **Event streaming** for real-time awareness
|
|
58
|
+
- **Semantic repository graphs** for dependency and impact analysis
|
|
59
|
+
- **Remote repository support** with Git-compatible push/pull operations
|
|
60
|
+
- **Backup and restore** capabilities for data safety
|
|
61
|
+
|
|
62
|
+
## Why AgentVCS
|
|
63
|
+
AgentVCS, as the name suggested was made for agents.
|
|
64
|
+
There are many reasons to use AgentVCS for your agents.
|
|
65
|
+
One of them are the fact that with the normal Git VCS, the AI has to invesigate diffs, find intent, then work. With AgentVCS, the intent is already defined, so it uses less tokens.
|
|
66
|
+
Another use case is AgentVCS's risk levels, allowing for autonomous agents like Devin to analyze and see if the commit should be reversed.
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
## Installation
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
git clone https://github.com/live-by-unix/agentvcs.git
|
|
73
|
+
```
|
|
74
|
+
OR
|
|
75
|
+
Download latest release & unzip.
|
|
76
|
+
Then `cd` into your downloaded version of AgentVCS and run:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
pip install -e .
|
|
80
|
+
```
|
|
81
|
+
Switch pip for pip3 if you need to.
|
|
82
|
+
|
|
83
|
+
## Quick Start
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
# Initialize a new agent-native repository
|
|
87
|
+
agentvcs init --name my-project
|
|
88
|
+
|
|
89
|
+
# Add a remote repository (Git-compatible)
|
|
90
|
+
agentvcs remote add origin https://github.com/user/repo --type git --set-default
|
|
91
|
+
|
|
92
|
+
# Make a semantic commit with full context
|
|
93
|
+
agentvcs commit --intent "fix authentication bug" \
|
|
94
|
+
--risk medium \
|
|
95
|
+
--subsystem auth \
|
|
96
|
+
--reasoning "JWT validation was failing due to clock skew" \
|
|
97
|
+
--tags security,auth
|
|
98
|
+
|
|
99
|
+
# Push to remote repository
|
|
100
|
+
agentvcs push
|
|
101
|
+
|
|
102
|
+
# View repository status
|
|
103
|
+
agentvcs status --all
|
|
104
|
+
|
|
105
|
+
# Query intent-aware history
|
|
106
|
+
agentvcs history --format detailed
|
|
107
|
+
|
|
108
|
+
# Launch multi-agent review
|
|
109
|
+
agentvcs review --commit abc123 --agents security,performance,architecture
|
|
110
|
+
|
|
111
|
+
# Analyze repository
|
|
112
|
+
agentvcs analyze --type risk
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Complete Command Reference
|
|
116
|
+
|
|
117
|
+
### Repository Management
|
|
118
|
+
|
|
119
|
+
#### `agentvcs init`
|
|
120
|
+
Initialize a new agent-native repository with semantic metadata and agent policies.
|
|
121
|
+
|
|
122
|
+
**Options:**
|
|
123
|
+
- `--git-migrate`: Migrate from existing Git repository
|
|
124
|
+
- `--name`: Repository name
|
|
125
|
+
|
|
126
|
+
**Example:**
|
|
127
|
+
```bash
|
|
128
|
+
agentvcs init --name my-project --git-migrate
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
#### `agentvcs status`
|
|
132
|
+
Show repository status including remote information and commit counts.
|
|
133
|
+
|
|
134
|
+
**Options:**
|
|
135
|
+
- `--all`: Show all remotes including Git remotes
|
|
136
|
+
|
|
137
|
+
**Example:**
|
|
138
|
+
```bash
|
|
139
|
+
agentvcs status --all
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
#### `agentvcs remote add`
|
|
143
|
+
Add a remote repository for push/pull operations.
|
|
144
|
+
|
|
145
|
+
**Options:**
|
|
146
|
+
- `--name`: Remote name (default: origin)
|
|
147
|
+
- `--url`: Remote URL (required)
|
|
148
|
+
- `--type`: Remote type (agentvcs, git, custom)
|
|
149
|
+
- `--set-default`: Set as default remote
|
|
150
|
+
|
|
151
|
+
**Example:**
|
|
152
|
+
```bash
|
|
153
|
+
agentvcs remote add origin https://github.com/user/repo --type git --set-default
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
#### `agentvcs remote remove`
|
|
157
|
+
Remove a remote repository.
|
|
158
|
+
|
|
159
|
+
**Options:**
|
|
160
|
+
- `--name`: Remote name (removes all if not specified)
|
|
161
|
+
|
|
162
|
+
**Example:**
|
|
163
|
+
```bash
|
|
164
|
+
agentvcs remote remove origin
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
#### `agentvcs remote list`
|
|
168
|
+
List all configured remote repositories.
|
|
169
|
+
|
|
170
|
+
**Example:**
|
|
171
|
+
```bash
|
|
172
|
+
agentvcs remote list
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
#### `agentvcs push`
|
|
176
|
+
Push commits and semantic metadata to remote repository.
|
|
177
|
+
|
|
178
|
+
**Options:**
|
|
179
|
+
- `--remote`: Remote name (uses default if not specified)
|
|
180
|
+
- `--force`: Force push even if remote has newer commits
|
|
181
|
+
- `--dry-run`: Show what would be pushed without actually pushing
|
|
182
|
+
|
|
183
|
+
**Example:**
|
|
184
|
+
```bash
|
|
185
|
+
agentvcs push --dry-run
|
|
186
|
+
agentvcs push --force
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
#### `agentvcs pull`
|
|
190
|
+
Pull commits and semantic metadata from remote repository.
|
|
191
|
+
|
|
192
|
+
**Options:**
|
|
193
|
+
- `--remote`: Remote name (uses default if not specified)
|
|
194
|
+
- `--force`: Force pull even if local has unpushed changes
|
|
195
|
+
- `--dry-run`: Show what would be pulled without actually pulling
|
|
196
|
+
|
|
197
|
+
**Example:**
|
|
198
|
+
```bash
|
|
199
|
+
agentvcs pull
|
|
200
|
+
agentvcs pull --remote upstream
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
#### `agentvcs fetch`
|
|
204
|
+
Fetch updates from remote without merging.
|
|
205
|
+
|
|
206
|
+
**Options:**
|
|
207
|
+
- `--remote`: Remote name (uses default if not specified)
|
|
208
|
+
|
|
209
|
+
**Example:**
|
|
210
|
+
```bash
|
|
211
|
+
agentvcs fetch
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
### Commit Operations
|
|
215
|
+
|
|
216
|
+
#### `agentvcs commit`
|
|
217
|
+
Create a semantic commit with intent, risk level, and reasoning trace.
|
|
218
|
+
|
|
219
|
+
**Options:**
|
|
220
|
+
- `--intent`: Intent behind the change (required)
|
|
221
|
+
- `--risk`: Risk level (low, medium, high, critical)
|
|
222
|
+
- `--subsystem`: Affected subsystem
|
|
223
|
+
- `--type`: Change type (bugfix, feature, refactor, perf, security, docs, test, chore)
|
|
224
|
+
- `--reasoning`: Reasoning trace for the change (required)
|
|
225
|
+
- `--bug-id`: Bug ID if this is a fix
|
|
226
|
+
- `--author`: Author of the commit
|
|
227
|
+
- `--files`: Files affected by this commit
|
|
228
|
+
- `--tags`: Tags for the commit
|
|
229
|
+
- `--dependencies`: Dependencies for this commit (format: target:type)
|
|
230
|
+
- `--metadata`: Additional metadata (format: key=value)
|
|
231
|
+
|
|
232
|
+
**Example:**
|
|
233
|
+
```bash
|
|
234
|
+
agentvcs commit --intent "fix authentication bug" \
|
|
235
|
+
--risk medium \
|
|
236
|
+
--subsystem auth \
|
|
237
|
+
--type bugfix \
|
|
238
|
+
--reasoning "JWT validation was failing due to clock skew" \
|
|
239
|
+
--bug-id CVE-2024-1234 \
|
|
240
|
+
--tags security,critical \
|
|
241
|
+
--files src/auth.py
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
#### `agentvcs propose`
|
|
245
|
+
Agents propose autonomous changes for human or agent review.
|
|
246
|
+
|
|
247
|
+
**Options:**
|
|
248
|
+
- `--type`: Change type (bugfix, feature, refactor, perf, security)
|
|
249
|
+
- `--target`: Target file or subsystem (required)
|
|
250
|
+
- `--agent`: Agent proposing the change
|
|
251
|
+
- `--reasoning`: Agent's reasoning (required)
|
|
252
|
+
- `--risk`: Risk level
|
|
253
|
+
- `--impact`: Estimated impact
|
|
254
|
+
|
|
255
|
+
**Example:**
|
|
256
|
+
```bash
|
|
257
|
+
agentvcs propose --type refactor --target src/auth.py \
|
|
258
|
+
--agent refactor-bot \
|
|
259
|
+
--reasoning "Extract token validation into separate method" \
|
|
260
|
+
--risk low
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
#### `agentvcs merge`
|
|
264
|
+
Predictive merge engine with conflict simulation and resolution.
|
|
265
|
+
|
|
266
|
+
**Options:**
|
|
267
|
+
- `--branch`: Branch to merge (required)
|
|
268
|
+
- `--simulate`: Simulate merge without applying
|
|
269
|
+
- `--strategy`: Merge strategy (auto, manual, agent)
|
|
270
|
+
|
|
271
|
+
**Example:**
|
|
272
|
+
```bash
|
|
273
|
+
agentvcs merge --branch feature/new-auth --simulate --strategy auto
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
#### `agentvcs history`
|
|
277
|
+
Query intent-aware history with advanced filtering.
|
|
278
|
+
|
|
279
|
+
**Options:**
|
|
280
|
+
- `--query`: Natural language query about history
|
|
281
|
+
- `--commit`: Specific commit to query
|
|
282
|
+
- `--agent`: Filter by agent
|
|
283
|
+
- `--limit`: Number of results
|
|
284
|
+
- `--risk`: Filter by risk level
|
|
285
|
+
- `--type`: Filter by change type
|
|
286
|
+
- `--subsystem`: Filter by subsystem
|
|
287
|
+
- `--since`: Show commits since (YYYY-MM-DD)
|
|
288
|
+
- `--format`: Output format (table, json, detailed)
|
|
289
|
+
|
|
290
|
+
**Example:**
|
|
291
|
+
```bash
|
|
292
|
+
agentvcs history --query "authentication" --format detailed
|
|
293
|
+
agentvcs history --agent security-bot --risk high --limit 20
|
|
294
|
+
agentvcs history --since 2024-01-01 --type security
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
### Agent Operations
|
|
298
|
+
|
|
299
|
+
#### `agentvcs review`
|
|
300
|
+
Launch a multi-agent review swarm to evaluate a commit.
|
|
301
|
+
|
|
302
|
+
**Options:**
|
|
303
|
+
- `--commit`: Commit hash to review (required)
|
|
304
|
+
- `--agents`: Comma-separated list of agent roles (security, performance, architecture)
|
|
305
|
+
|
|
306
|
+
**Example:**
|
|
307
|
+
```bash
|
|
308
|
+
agentvcs review --commit abc123 --agents security,performance,architecture
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
#### `agentvcs refactor`
|
|
312
|
+
Autonomous refactor pipeline with structural improvement proposals.
|
|
313
|
+
|
|
314
|
+
**Options:**
|
|
315
|
+
- `--target`: Target file or directory (required)
|
|
316
|
+
- `--pattern`: Refactor pattern (e.g., extract-method, simplify-logic)
|
|
317
|
+
- `--agent`: Agent performing the refactor
|
|
318
|
+
|
|
319
|
+
**Example:**
|
|
320
|
+
```bash
|
|
321
|
+
agentvcs refactor --target src/auth.py --pattern extract-method --agent refactor-bot
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
#### `agentvcs sentinel`
|
|
325
|
+
Continuous risk monitoring for vulnerabilities, dependency drift, and regressions.
|
|
326
|
+
|
|
327
|
+
**Options:**
|
|
328
|
+
- `--watch`: Watch continuously
|
|
329
|
+
- `--interval`: Check interval in seconds
|
|
330
|
+
|
|
331
|
+
**Example:**
|
|
332
|
+
```bash
|
|
333
|
+
agentvcs sentinel --watch --interval 60
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
#### `agentvcs swarm`
|
|
337
|
+
Coordinate multi-agent collaboration with negotiation and consensus.
|
|
338
|
+
|
|
339
|
+
**Options:**
|
|
340
|
+
- `--task`: Task description for swarm (required)
|
|
341
|
+
- `--agents`: Comma-separated list of agents (required)
|
|
342
|
+
- `--timeout`: Timeout in seconds
|
|
343
|
+
|
|
344
|
+
**Example:**
|
|
345
|
+
```bash
|
|
346
|
+
agentvcs swarm --task "optimize database queries" \
|
|
347
|
+
--agents performance,architecture \
|
|
348
|
+
--timeout 300
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
### Management Operations
|
|
352
|
+
|
|
353
|
+
#### `agentvcs policy`
|
|
354
|
+
Define machine-first permissions and agent policies.
|
|
355
|
+
|
|
356
|
+
**Options:**
|
|
357
|
+
- `--add-rule`: Add a policy rule (format: 'agent_pattern:action:condition')
|
|
358
|
+
- `--list-rules`: List all policy rules
|
|
359
|
+
- `--remove-rule`: Remove a policy rule by ID
|
|
360
|
+
|
|
361
|
+
**Example:**
|
|
362
|
+
```bash
|
|
363
|
+
agentvcs policy --list-rules
|
|
364
|
+
agentvcs policy --add-rule "security-bot:*:always"
|
|
365
|
+
agentvcs policy --remove-rule rule-1
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
#### `agentvcs events`
|
|
369
|
+
Subscribe to event streams and view recent events.
|
|
370
|
+
|
|
371
|
+
**Options:**
|
|
372
|
+
- `--subscribe`: Comma-separated event types to subscribe
|
|
373
|
+
- `--tail`: Number of recent events to show
|
|
374
|
+
|
|
375
|
+
**Example:**
|
|
376
|
+
```bash
|
|
377
|
+
agentvcs events --tail 10
|
|
378
|
+
agentvcs events --subscribe commit,merge,review
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
#### `agentvcs graph`
|
|
382
|
+
Query the semantic repository graph.
|
|
383
|
+
|
|
384
|
+
**Options:**
|
|
385
|
+
- `--query`: Graph query (e.g., 'dependencies of src/auth.py')
|
|
386
|
+
- `--node-type`: Filter by node type (file, function, class, commit, agent)
|
|
387
|
+
- `--export`: Export graph to file (format: json, dot)
|
|
388
|
+
|
|
389
|
+
**Example:**
|
|
390
|
+
```bash
|
|
391
|
+
agentvcs graph --query "dependencies of src/auth.py"
|
|
392
|
+
agentvcs graph --export json
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
#### `agentvcs analyze`
|
|
396
|
+
Repository analytics and insights.
|
|
397
|
+
|
|
398
|
+
**Options:**
|
|
399
|
+
- `--type`: Analysis type (overview, risk, agents, commits, trends)
|
|
400
|
+
- `--format`: Output format (table, json, text)
|
|
401
|
+
- `--days`: Time period in days for trend analysis
|
|
402
|
+
|
|
403
|
+
**Example:**
|
|
404
|
+
```bash
|
|
405
|
+
agentvcs analyze --type overview
|
|
406
|
+
agentvcs analyze --type risk --format json
|
|
407
|
+
agentvcs analyze --type trends --days 90
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
#### `agentvcs backup`
|
|
411
|
+
Backup repository with semantic metadata.
|
|
412
|
+
|
|
413
|
+
**Options:**
|
|
414
|
+
- `--output`: Output file path for backup
|
|
415
|
+
- `--include-git`: Include Git data if available
|
|
416
|
+
|
|
417
|
+
**Example:**
|
|
418
|
+
```bash
|
|
419
|
+
agentvcs backup --output my-backup.tar.gz --include-git
|
|
420
|
+
```
|
|
421
|
+
|
|
422
|
+
#### `agentvcs restore`
|
|
423
|
+
Restore repository from backup.
|
|
424
|
+
|
|
425
|
+
**Options:**
|
|
426
|
+
- `--input`: Backup file to restore (required)
|
|
427
|
+
- `--force`: Force restore without confirmation
|
|
428
|
+
|
|
429
|
+
**Example:**
|
|
430
|
+
```bash
|
|
431
|
+
agentvcs restore --input my-backup.tar.gz --force
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
#### `agentvcs export`
|
|
435
|
+
Export repository data to various formats.
|
|
436
|
+
|
|
437
|
+
**Options:**
|
|
438
|
+
- `--format`: Export format (json, yaml, csv)
|
|
439
|
+
- `--output`: Output file path
|
|
440
|
+
- `--data`: Data to export (commits, events, proposals, graph, all)
|
|
441
|
+
|
|
442
|
+
**Example:**
|
|
443
|
+
```bash
|
|
444
|
+
agentvcs export --format json --data commits
|
|
445
|
+
agentvcs export --format yaml --output export.yaml
|
|
446
|
+
```
|
|
447
|
+
|
|
448
|
+
#### `agentvcs import`
|
|
449
|
+
Import repository data from exported file.
|
|
450
|
+
|
|
451
|
+
**Options:**
|
|
452
|
+
- `--input`: Import file (required)
|
|
453
|
+
- `--format`: Import format (auto-detected if not specified)
|
|
454
|
+
|
|
455
|
+
**Example:**
|
|
456
|
+
```bash
|
|
457
|
+
agentvcs import --input export.json
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
#### `agentvcs --version` / `agentvcs -v`
|
|
461
|
+
Output the current AgentVCS version.
|
|
462
|
+
|
|
463
|
+
## Git Integration
|
|
464
|
+
|
|
465
|
+
AgentVCS provides seamless Git integration for hybrid workflows:
|
|
466
|
+
|
|
467
|
+
### Adding Git Remotes
|
|
468
|
+
|
|
469
|
+
```bash
|
|
470
|
+
# Add a Git remote
|
|
471
|
+
agentvcs remote add origin https://github.com/user/repo --type git --set-default
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
### Git-Compatible Operations
|
|
475
|
+
|
|
476
|
+
When using Git-type remotes, AgentVCS automatically:
|
|
477
|
+
|
|
478
|
+
- **Push**: Runs `git push` to the Git remote alongside AgentVCS metadata push
|
|
479
|
+
- **Pull**: Runs `git pull` from the Git remote alongside AgentVCS metadata pull
|
|
480
|
+
- **Fetch**: Runs `git fetch` to get updates without merging
|
|
481
|
+
|
|
482
|
+
### Hybrid Workflow Example
|
|
483
|
+
|
|
484
|
+
```bash
|
|
485
|
+
# Initialize with Git compatibility
|
|
486
|
+
agentvcs init --git-migrate
|
|
487
|
+
|
|
488
|
+
# Add Git remote
|
|
489
|
+
agentvcs remote add origin https://github.com/user/repo --type git --set-default
|
|
490
|
+
|
|
491
|
+
# Make semantic commits
|
|
492
|
+
agentvcs commit --intent "add feature" --reasoning "..." --risk low
|
|
493
|
+
|
|
494
|
+
# Push to both Git and AgentVCS
|
|
495
|
+
agentvcs push
|
|
496
|
+
|
|
497
|
+
# Pull from both Git and AgentVCS
|
|
498
|
+
agentvcs pull
|
|
499
|
+
```
|
|
500
|
+
|
|
501
|
+
### Git Compatibility Features
|
|
502
|
+
|
|
503
|
+
- **Migration**: `--git-migrate` flag preserves existing Git history
|
|
504
|
+
- **Coexistence**: Git and AgentVCS commands work side-by-side
|
|
505
|
+
- **Storage**: Semantic metadata stored in `.agentvcs/` (separate from `.git/`)
|
|
506
|
+
- **Status**: `--all` flag shows both AgentVCS and Git remotes
|
|
507
|
+
|
|
508
|
+
## Architecture
|
|
509
|
+
|
|
510
|
+
AgentVCS is built with a modular, pluggable architecture:
|
|
511
|
+
|
|
512
|
+
```
|
|
513
|
+
agentvcs/
|
|
514
|
+
├── cli.py # Main CLI entry point with 24 commands
|
|
515
|
+
├── models.py # Pydantic data models for semantic data
|
|
516
|
+
├── core/
|
|
517
|
+
│ └── storage.py # JSON-based storage layer
|
|
518
|
+
├── agents/
|
|
519
|
+
│ ├── base.py # Base agent + 4 built-in agents
|
|
520
|
+
│ └── registry.py # Agent registration system
|
|
521
|
+
├── merge/
|
|
522
|
+
│ └── engine.py # Predictive merge engine
|
|
523
|
+
├── graph/
|
|
524
|
+
│ └── builder.py # Semantic graph builder
|
|
525
|
+
├── events/
|
|
526
|
+
│ └── stream.py # Event streaming system
|
|
527
|
+
└── policy/
|
|
528
|
+
└── engine.py # Policy and permission engine
|
|
529
|
+
```
|
|
530
|
+
|
|
531
|
+
## Agent Plugin System
|
|
532
|
+
|
|
533
|
+
AgentVCS supports custom agents through a simple plugin interface:
|
|
534
|
+
|
|
535
|
+
```python
|
|
536
|
+
from agentvcs.agents.base import BaseAgent
|
|
537
|
+
from agentvcs.models import AgentRole
|
|
538
|
+
|
|
539
|
+
class CustomAgent(BaseAgent):
|
|
540
|
+
def __init__(self):
|
|
541
|
+
super().__init__(AgentRole.DEVELOPER, "custom-agent")
|
|
542
|
+
|
|
543
|
+
def review_commit(self, commit: Dict[str, Any]) -> Dict[str, Any]:
|
|
544
|
+
# Custom review logic
|
|
545
|
+
return {
|
|
546
|
+
"agent": self.name,
|
|
547
|
+
"role": self.role.value,
|
|
548
|
+
"approved": True,
|
|
549
|
+
"findings": ["Custom finding"],
|
|
550
|
+
"concerns": [],
|
|
551
|
+
"suggestions": [],
|
|
552
|
+
"score": 0.9
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
def propose_change(self, context: Dict[str, Any]) -> Proposal:
|
|
556
|
+
# Custom proposal logic
|
|
557
|
+
pass
|
|
558
|
+
|
|
559
|
+
def analyze_risk(self, change: Dict[str, Any]) -> Dict[str, Any]:
|
|
560
|
+
# Custom risk analysis
|
|
561
|
+
pass
|
|
562
|
+
```
|
|
563
|
+
|
|
564
|
+
## Remote Repository Support
|
|
565
|
+
|
|
566
|
+
AgentVCS supports multiple remote repository types:
|
|
567
|
+
|
|
568
|
+
### AgentVCS Remotes
|
|
569
|
+
Native AgentVCS remotes for semantic metadata synchronization:
|
|
570
|
+
```bash
|
|
571
|
+
agentvcs remote add origin https://agentvcs.example.com/repo --type agentvcs
|
|
572
|
+
```
|
|
573
|
+
|
|
574
|
+
### Git Remotes
|
|
575
|
+
Git-compatible remotes for hybrid workflows:
|
|
576
|
+
```bash
|
|
577
|
+
agentvcs remote add origin https://github.com/user/repo --type git
|
|
578
|
+
```
|
|
579
|
+
|
|
580
|
+
### Custom Remotes
|
|
581
|
+
Custom remote implementations for specialized needs:
|
|
582
|
+
```bash
|
|
583
|
+
agentvcs remote add custom https://custom.example.com/repo --type custom
|
|
584
|
+
```
|
|
585
|
+
|
|
586
|
+
## Data Models
|
|
587
|
+
|
|
588
|
+
### Commit
|
|
589
|
+
Semantic commit with full agent context:
|
|
590
|
+
- `id`: Unique commit identifier
|
|
591
|
+
- `intent`: Intent behind the change
|
|
592
|
+
- `risk_level`: Risk assessment (low, medium, high, critical)
|
|
593
|
+
- `subsystem`: Affected subsystem
|
|
594
|
+
- `change_type`: Type of change (bugfix, feature, etc.)
|
|
595
|
+
- `reasoning`: Detailed reasoning trace
|
|
596
|
+
- `dependencies`: Dependency graph
|
|
597
|
+
- `metadata`: Additional metadata and tags
|
|
598
|
+
|
|
599
|
+
### Remote
|
|
600
|
+
Remote repository configuration:
|
|
601
|
+
- `name`: Remote name (e.g., origin)
|
|
602
|
+
- `url`: Remote URL
|
|
603
|
+
- `type`: Remote type (agentvcs, git, custom)
|
|
604
|
+
- `last_push`: Last push timestamp
|
|
605
|
+
- `last_pull`: Last pull timestamp
|
|
606
|
+
|
|
607
|
+
## Documentation
|
|
608
|
+
|
|
609
|
+
- [Developer Guide](docs/developer-guide.md) - Architecture and development
|
|
610
|
+
- [Agent API Reference](docs/agent-api.md) - Creating custom agents
|
|
611
|
+
- [Policy Configuration](docs/policy-config.md) - Machine-first permissions
|
|
612
|
+
- [Event Streaming](docs/event-streaming.md) - Real-time event monitoring
|
|
613
|
+
|
|
614
|
+
## License
|
|
615
|
+
MIT License - see [LICENSE](LICENSE) file for details.
|