aivil 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +128 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
\# aivil
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
> The AI Vital Identity Layer — civil registry for AI agents.
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
\## Install
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
\\`\\`\\`
|
|
14
|
+
|
|
15
|
+
npm install aivil
|
|
16
|
+
|
|
17
|
+
\\`\\`\\`
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
\## Quick Start
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
\\`\\`\\`javascript
|
|
26
|
+
|
|
27
|
+
const { createAgent, audit, verify } = require('aivil')
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
const agent = createAgent({
|
|
32
|
+
|
|
33
|
+
  name: "Prometheus",
|
|
34
|
+
|
|
35
|
+
  role: "Procurement Specialist",
|
|
36
|
+
|
|
37
|
+
  owner: "Acme Corp",
|
|
38
|
+
|
|
39
|
+
  purpose: "Handle vendor search and purchasing",
|
|
40
|
+
|
|
41
|
+
  jurisdiction: "Delaware\_USA",
|
|
42
|
+
|
|
43
|
+
  policy: {
|
|
44
|
+
|
|
45
|
+
  spending\_limit: 100,
|
|
46
|
+
|
|
47
|
+
  requires\_human\_signoff\_over: 50,
|
|
48
|
+
|
|
49
|
+
  restricted\_domains: \["\*.crypto", "\*.gambling"],
|
|
50
|
+
|
|
51
|
+
  allowed\_actions: \["search\_vendor", "request\_quote"],
|
|
52
|
+
|
|
53
|
+
  }
|
|
54
|
+
|
|
55
|
+
})
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
console.log(agent.id)
|
|
60
|
+
|
|
61
|
+
// AGT-A3F8C2E1
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
const verdict = audit(agent, {
|
|
66
|
+
|
|
67
|
+
  type: "purchase",
|
|
68
|
+
|
|
69
|
+
  amount: 30,
|
|
70
|
+
|
|
71
|
+
  domain: "openai.com",
|
|
72
|
+
|
|
73
|
+
  description: "Buy API credits"
|
|
74
|
+
|
|
75
|
+
})
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
console.log(verdict.status)
|
|
80
|
+
|
|
81
|
+
// APPROVED
|
|
82
|
+
|
|
83
|
+
\\`\\`\\`
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
\## What It Does
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
Every AI agent gets:
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
\- A verified identity and unique ID
|
|
96
|
+
|
|
97
|
+
\- A cryptographic birth certificate
|
|
98
|
+
|
|
99
|
+
\- A Red Line policy — spending limits and restrictions
|
|
100
|
+
|
|
101
|
+
\- An AI-powered audit engine — APPROVED, ESCALATE, or BLOCKED
|
|
102
|
+
|
|
103
|
+
\- A complete life record — work, financials, reputation
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
\## Links
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
\- Live demo: https://aivil-lake.vercel.app
|
|
112
|
+
|
|
113
|
+
\- GitHub: https://github.com/scalatest01/AIVIL
|
|
114
|
+
|
|
115
|
+
\- Contact: ihimanshu882@gmail.com
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
\## License
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
MIT — open source forever.
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
Built for humanity.
|
|
128
|
+
|