vallignus 0.4.0__py3-none-any.whl
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.
- vallignus/__init__.py +3 -0
- vallignus/auth.py +699 -0
- vallignus/cli.py +780 -0
- vallignus/identity/__init__.py +5 -0
- vallignus/identity/chrome.py +47 -0
- vallignus/identity/manager.py +175 -0
- vallignus/logger.py +86 -0
- vallignus/proxy.py +122 -0
- vallignus/rules.py +90 -0
- vallignus/sessions.py +529 -0
- vallignus-0.4.0.dist-info/METADATA +250 -0
- vallignus-0.4.0.dist-info/RECORD +15 -0
- vallignus-0.4.0.dist-info/WHEEL +5 -0
- vallignus-0.4.0.dist-info/entry_points.txt +2 -0
- vallignus-0.4.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: vallignus
|
|
3
|
+
Version: 0.4.0
|
|
4
|
+
Summary: Local runtime wrapper for AI agents: sessions, replay, and hard caps
|
|
5
|
+
Author-email: Jacob Gadek <your.email@example.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Repository, https://github.com/jacobgadek/vallignus
|
|
8
|
+
Keywords: ai,security,firewall,agent,llm,authority
|
|
9
|
+
Requires-Python: >=3.8
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
Requires-Dist: browser-cookie3
|
|
12
|
+
Requires-Dist: click
|
|
13
|
+
Requires-Dist: mitmproxy<10.0.0,>=9.0.0
|
|
14
|
+
Requires-Dist: rich
|
|
15
|
+
Requires-Dist: cryptography>=38.0.0
|
|
16
|
+
Provides-Extra: dev
|
|
17
|
+
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
18
|
+
|
|
19
|
+
<div align="center">
|
|
20
|
+
<img src="docs/vallignuslogo.svg" alt="Vallignus" width="200">
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
# Vallignus π₯
|
|
24
|
+
|
|
25
|
+
**The Infrastructure-Grade Firewall for AI Agents**
|
|
26
|
+
|
|
27
|
+
*Because prompts are not permissions.*
|
|
28
|
+
|
|
29
|
+
Built for local agents, headless workflows, and unattended execution.
|
|
30
|
+
|
|
31
|
+
[](https://badge.fury.io/py/vallignus)
|
|
32
|
+
[](https://opensource.org/licenses/MIT)
|
|
33
|
+
|
|
34
|
+
## Problem
|
|
35
|
+
|
|
36
|
+
AI agents are unpredictable. They can loop indefinitely, overspend on API calls in seconds, or execute dangerous network requests that compromise security.
|
|
37
|
+
|
|
38
|
+
## Solution
|
|
39
|
+
|
|
40
|
+
Vallignus is a local execution firewall that sits between your agent and the internet. It enforces **who** can run, **what** they are allowed to do, and **logs every decision**, without changing your code.
|
|
41
|
+
|
|
42
|
+
## How It Works
|
|
43
|
+
```
|
|
44
|
+
βββββββββββ βββββββββββββ βββββββββββββββββββ
|
|
45
|
+
β Agent β ββββΆ β Vallignus β ββββΆ β LLM / APIs / Netβ
|
|
46
|
+
βββββββββββ βββββββββββββ βββββββββββββββββββ
|
|
47
|
+
β
|
|
48
|
+
identity + policy
|
|
49
|
+
+ spend limits
|
|
50
|
+
+ audit log
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Every outbound request is checked against the policy before it leaves.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## π 5-Minute Quickstart
|
|
58
|
+
|
|
59
|
+
Protect any AI agent with identity, limits, and audit - without changing your code.
|
|
60
|
+
|
|
61
|
+
### Install
|
|
62
|
+
```bash
|
|
63
|
+
pip install vallignus
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### 1. Initialize Vallignus
|
|
67
|
+
|
|
68
|
+
Creates local authority storage and cryptographic keys.
|
|
69
|
+
```bash
|
|
70
|
+
vallignus auth init
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
This creates:
|
|
74
|
+
```
|
|
75
|
+
~/.vallignus/
|
|
76
|
+
βββ agents/
|
|
77
|
+
βββ policies/
|
|
78
|
+
βββ keys/
|
|
79
|
+
βββ revoked/
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### 2. Register an agent identity
|
|
83
|
+
```bash
|
|
84
|
+
vallignus auth create-agent \
|
|
85
|
+
--agent-id support-bot \
|
|
86
|
+
--owner "you@example.com"
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
An agent now has a stable identity.
|
|
90
|
+
|
|
91
|
+
### 3. Create a permission policy
|
|
92
|
+
|
|
93
|
+
Define what the agent is allowed to do.
|
|
94
|
+
```bash
|
|
95
|
+
vallignus auth create-policy \
|
|
96
|
+
--policy-id support \
|
|
97
|
+
--max-spend-usd 5 \
|
|
98
|
+
--allowed-domains "httpbin.org"
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
This policy allows:
|
|
102
|
+
- up to $5 in API spend
|
|
103
|
+
- network access only to `httpbin.org`
|
|
104
|
+
|
|
105
|
+
Policies are versioned automatically.
|
|
106
|
+
|
|
107
|
+
### 4. Issue a signed execution token
|
|
108
|
+
```bash
|
|
109
|
+
export VALLIGNUS_TOKEN=$(vallignus auth issue-token \
|
|
110
|
+
--agent-id support-bot \
|
|
111
|
+
--policy-id support)
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
This token cryptographically binds:
|
|
115
|
+
- the agent identity
|
|
116
|
+
- the policy version
|
|
117
|
+
- an expiration time
|
|
118
|
+
|
|
119
|
+
### 5. Run your agent (no code changes)
|
|
120
|
+
```bash
|
|
121
|
+
vallignus run -- python agent.py
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Vallignus will now:
|
|
125
|
+
- β
allow permitted requests
|
|
126
|
+
- β block disallowed domains
|
|
127
|
+
- πΈ stop runaway spending
|
|
128
|
+
- π§Ύ log every allow/deny decision with identity and policy context
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## Example: Blocked Request
|
|
133
|
+
|
|
134
|
+
If your agent tries to access an unauthorized domain:
|
|
135
|
+
```json
|
|
136
|
+
{
|
|
137
|
+
"decision": "deny",
|
|
138
|
+
"agent_id": "support-bot",
|
|
139
|
+
"owner": "you@example.com",
|
|
140
|
+
"policy_id": "support",
|
|
141
|
+
"policy_version": 1,
|
|
142
|
+
"deny_reason": "domain_not_allowed"
|
|
143
|
+
}
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Nothing escapes silently.
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## What Vallignus Does
|
|
151
|
+
|
|
152
|
+
Before every network request, Vallignus asks:
|
|
153
|
+
|
|
154
|
+
> "Is this agent allowed to do this under its policy?"
|
|
155
|
+
|
|
156
|
+
- **If yes** β request proceeds
|
|
157
|
+
- **If no** β request is blocked and audited
|
|
158
|
+
|
|
159
|
+
All decisions are enforced locally.
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## Why Not Just Kill the Process?
|
|
164
|
+
|
|
165
|
+
For simple local scripts, killing a process may be enough.
|
|
166
|
+
|
|
167
|
+
However many agent setups today run:
|
|
168
|
+
- headless or remote workloads
|
|
169
|
+
- long-lived background processes
|
|
170
|
+
- scheduled or unattended execution
|
|
171
|
+
- indirect network calls through libraries or subprocesses
|
|
172
|
+
|
|
173
|
+
In these cases, control often degrades into emergency shutdowns or power cuts.
|
|
174
|
+
|
|
175
|
+
Vallignus provides a safer middle layer by enforcing permissions before actions occur, rather than reacting after something goes wrong.
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## Why Monitoring Isn't Enough
|
|
180
|
+
|
|
181
|
+
Dashboards show damage after it happens. Alerts arrive too late.
|
|
182
|
+
|
|
183
|
+
By the time you see the spike:
|
|
184
|
+
- the budget is already gone
|
|
185
|
+
- the requests already hit production
|
|
186
|
+
- the agent already accessed what it should not have
|
|
187
|
+
|
|
188
|
+
Prevention must sit inline, not alongside.
|
|
189
|
+
|
|
190
|
+
Vallignus gates execution before it occurs. It does not observe and report. It decides and enforces.
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## What Vallignus is NOT
|
|
195
|
+
|
|
196
|
+
- β Not a model wrapper
|
|
197
|
+
- β Not prompt engineering
|
|
198
|
+
- β Not surveillance
|
|
199
|
+
- β Not cloud-hosted
|
|
200
|
+
|
|
201
|
+
Vallignus runs entirely on your machine.
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
## When to Use Vallignus
|
|
206
|
+
|
|
207
|
+
- You're building autonomous agents
|
|
208
|
+
- You want hard spend limits
|
|
209
|
+
- You need domain allowlists
|
|
210
|
+
- You want auditability and reproducibility
|
|
211
|
+
- You don't trust "just prompts"
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## Key Commands
|
|
216
|
+
```bash
|
|
217
|
+
# Policy management
|
|
218
|
+
vallignus auth update-policy --policy-id X --max-spend-usd 50
|
|
219
|
+
|
|
220
|
+
# Token management
|
|
221
|
+
vallignus auth inspect-token <token> # Debug token contents
|
|
222
|
+
vallignus auth revoke-token --jti <id> # Instantly stop an agent
|
|
223
|
+
|
|
224
|
+
# Key rotation
|
|
225
|
+
vallignus auth rotate-key # Rotate signing keys
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
## Demo
|
|
231
|
+
|
|
232
|
+

|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
## Project Status
|
|
237
|
+
|
|
238
|
+
Vallignus is early-stage infrastructure under active development.
|
|
239
|
+
|
|
240
|
+
APIs may evolve, but core guarantees are stable:
|
|
241
|
+
- local-only execution
|
|
242
|
+
- explicit permissions
|
|
243
|
+
- revocable authority
|
|
244
|
+
- auditable decisions
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
## License
|
|
249
|
+
|
|
250
|
+
MIT
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
vallignus/__init__.py,sha256=I7FUxRQjOXenk5-YyfXksXCcI-phtjE_bD4xV6JOTXo,76
|
|
2
|
+
vallignus/auth.py,sha256=Pt1sqL4TH0tP6KsM9UtnwX90NJ1rUIxX9-rvGY1AcC4,22427
|
|
3
|
+
vallignus/cli.py,sha256=YJJBTknHiJAUDgb7HfkIRWNEIfj6NOwIzb0Hsyz-AM4,30555
|
|
4
|
+
vallignus/logger.py,sha256=PJ9O5tcxBWs-HsM_49mGX7VeTfcXL4kiYfrVBneW15w,2527
|
|
5
|
+
vallignus/proxy.py,sha256=cWqk5bUODBQGRmoRc3swtW_ggDe4yqB0-axCLdP9g1o,4208
|
|
6
|
+
vallignus/rules.py,sha256=skzM_hsivN3sfWD_E-hXRtsvFKc6-H4FsB_ZZNBwnzk,3163
|
|
7
|
+
vallignus/sessions.py,sha256=Go-e88P-c633hekc-DAs-NFNnrtkna9TitC32QquOZ0,18911
|
|
8
|
+
vallignus/identity/__init__.py,sha256=dL_SjSnRWWyM7c3wALyBfZnX7KC5N1GYs4hbF2XNS_o,159
|
|
9
|
+
vallignus/identity/chrome.py,sha256=QRrZ8JiAZGJY8LETKGgd04-o8qy_QQzPTLlybiF-H0E,1732
|
|
10
|
+
vallignus/identity/manager.py,sha256=XlDe24ztxObvlxrjTDkl3HsV35JQyTQY5rG2B2g86gE,5941
|
|
11
|
+
vallignus-0.4.0.dist-info/METADATA,sha256=KGaLG-0nZSDiYIAZrtOqFT9IEb4kf8ZKPVUx3miyPMA,5945
|
|
12
|
+
vallignus-0.4.0.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
|
|
13
|
+
vallignus-0.4.0.dist-info/entry_points.txt,sha256=A51aEANpovqIRE1ESCwGE_o1VImJBhwUpXou7T-O3YQ,49
|
|
14
|
+
vallignus-0.4.0.dist-info/top_level.txt,sha256=txQPDrnE7x7uIDhkP4zCQVYnV9wDAX-vsp2ANSGaYDk,10
|
|
15
|
+
vallignus-0.4.0.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
vallignus
|