@permission-protocol/sdk 0.1.0-alpha.1 → 0.1.0-alpha.3

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.
Files changed (2) hide show
  1. package/README.md +45 -0
  2. package/package.json +3 -2
package/README.md ADDED
@@ -0,0 +1,45 @@
1
+ # Permission Protocol SDK
2
+
3
+ Standardized authorization and receipts for autonomous AI actions.
4
+
5
+ > **No receipt = unauthorized autonomy**
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm i @permission-protocol/sdk
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ ```typescript
16
+ import { PermissionRouter } from '@permission-protocol/sdk';
17
+
18
+ PermissionRouter.configure({
19
+ endpoint: process.env.PP_ENDPOINT!,
20
+ apiKey: process.env.PP_API_KEY!,
21
+ });
22
+
23
+ const decision = await PermissionRouter.execute({
24
+ tenantId: 'acme',
25
+ agentId: 'example-agent',
26
+ tool: 'db.write',
27
+ operation: 'upsert_record',
28
+ input: { id: 123, value: 'hello' },
29
+ });
30
+
31
+ if (decision.status !== 'APPROVED') {
32
+ throw new Error(`Blocked: ${decision.status}`);
33
+ }
34
+ ```
35
+
36
+ ## Learn more
37
+
38
+ - [Receipt Standard](https://github.com/permission-protocol/reference/blob/main/docs/receipt-standard.md)
39
+ - [Reference Demo](https://github.com/permission-protocol/reference/tree/main/reference-demo)
40
+ - [CI Receipt Gate](https://github.com/permission-protocol/reference/tree/main/templates/github-actions/receipt-gate)
41
+
42
+ ---
43
+
44
+ This SDK is intentionally minimal.
45
+ Policy evaluation and enforcement live in the hosted Permission Protocol.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@permission-protocol/sdk",
3
- "version": "0.1.0-alpha.1",
3
+ "version": "0.1.0-alpha.3",
4
4
  "description": "Standardized authorization and receipts for autonomous AI actions",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -13,7 +13,8 @@
13
13
  }
14
14
  },
15
15
  "files": [
16
- "dist"
16
+ "dist",
17
+ "README.md"
17
18
  ],
18
19
  "license": "Apache-2.0",
19
20
  "homepage": "https://github.com/permission-protocol/permission-protocol",