@auctra/sdk 0.1.0 → 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 +24 -14
- package/package.json +5 -1
package/README.md
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
# @auctra/sdk
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@auctra/sdk)
|
|
4
|
+
|
|
3
5
|
Official TypeScript SDK for [Auctra](https://auctra.tech) — authority infrastructure for AI agents.
|
|
4
6
|
|
|
5
7
|
Evaluate every agent action against delegated authority and org policies before execution.
|
|
6
8
|
|
|
9
|
+
- **Console:** https://console.auctra.tech
|
|
10
|
+
- **Docs:** https://auctra.tech/docs
|
|
11
|
+
- **API base URL:** `https://console.auctra.tech` (default — no `baseUrl` needed)
|
|
12
|
+
|
|
7
13
|
## Install
|
|
8
14
|
|
|
9
15
|
```bash
|
|
@@ -17,7 +23,6 @@ import { Auctra } from "@auctra/sdk";
|
|
|
17
23
|
|
|
18
24
|
const auctra = new Auctra({
|
|
19
25
|
apiKey: process.env.AUCTRA_API_KEY!,
|
|
20
|
-
// baseUrl defaults to https://console.auctra.tech
|
|
21
26
|
});
|
|
22
27
|
|
|
23
28
|
const decision = await auctra.evaluateAction({
|
|
@@ -36,6 +41,13 @@ if (decision.decision === "allowed") {
|
|
|
36
41
|
}
|
|
37
42
|
```
|
|
38
43
|
|
|
44
|
+
## Get an API key
|
|
45
|
+
|
|
46
|
+
1. [Sign up](https://console.auctra.tech/auth/signup) and create an organization
|
|
47
|
+
2. Register an agent and delegate scoped authority
|
|
48
|
+
3. Open [API Keys](https://console.auctra.tech/console/api-keys) → **Create API key**
|
|
49
|
+
4. Use a key with `write` permission for `evaluateAction`
|
|
50
|
+
|
|
39
51
|
## API
|
|
40
52
|
|
|
41
53
|
| Method | Description |
|
|
@@ -53,21 +65,19 @@ if (decision.decision === "allowed") {
|
|
|
53
65
|
| `listPolicies()` | List org policies |
|
|
54
66
|
| `listAuditEvents()` | List audit ledger events |
|
|
55
67
|
|
|
56
|
-
##
|
|
57
|
-
|
|
58
|
-
1. Sign in to the [Auctra console](https://console.auctra.tech/auth/login)
|
|
59
|
-
2. Go to **API Keys** → **Create API key**
|
|
60
|
-
3. Use a key with `write` permission for `evaluateAction`
|
|
61
|
-
|
|
62
|
-
## Publish to npm
|
|
68
|
+
## REST API (curl)
|
|
63
69
|
|
|
64
70
|
```bash
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
71
|
+
curl -X POST https://console.auctra.tech/v1/action-requests/evaluate \
|
|
72
|
+
-H "Authorization: Bearer YOUR_API_KEY" \
|
|
73
|
+
-H "Content-Type: application/json" \
|
|
74
|
+
-d '{
|
|
75
|
+
"agentId": "your-agent-uuid",
|
|
76
|
+
"actionType": "send_payment",
|
|
77
|
+
"payload": { "amount": 100, "currency": "USD" }
|
|
78
|
+
}'
|
|
69
79
|
```
|
|
70
80
|
|
|
71
|
-
|
|
81
|
+
## License
|
|
72
82
|
|
|
73
|
-
|
|
83
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@auctra/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Authority delegation SDK for AI agents — evaluate agent actions against delegated authority and org policies",
|
|
5
|
+
"homepage": "https://auctra.tech/docs",
|
|
6
|
+
"bugs": {
|
|
7
|
+
"url": "https://github.com/Matik103/auctra/issues"
|
|
8
|
+
},
|
|
5
9
|
"type": "module",
|
|
6
10
|
"main": "./dist/index.js",
|
|
7
11
|
"types": "./dist/index.d.ts",
|