@gentid/sdk 1.0.2 → 1.1.1
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/LICENSE +21 -0
- package/README.md +185 -57
- package/dist/client.d.ts +28 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +48 -0
- package/dist/client.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +49 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +11 -2
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 GentID (https://gentid.com)
|
|
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.
|
package/README.md
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
# @gentid/sdk
|
|
2
2
|
|
|
3
|
-
TypeScript SDK for [GentID](https://gentid.com) — cryptographic identity infrastructure for AI agents.
|
|
3
|
+
TypeScript SDK for [GentID](https://gentid.com) — cryptographic identity, permissions, and agent gateway infrastructure for AI agents.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@gentid/sdk)
|
|
6
|
+
[](LICENSE)
|
|
4
7
|
|
|
5
8
|
## Installation
|
|
6
9
|
|
|
@@ -10,6 +13,8 @@ npm install @gentid/sdk
|
|
|
10
13
|
|
|
11
14
|
Requires Node.js 18 or later.
|
|
12
15
|
|
|
16
|
+
---
|
|
17
|
+
|
|
13
18
|
## Quick start
|
|
14
19
|
|
|
15
20
|
```typescript
|
|
@@ -21,110 +26,233 @@ const gentid = new GentIDClient({
|
|
|
21
26
|
|
|
22
27
|
// 1. Create an agent identity
|
|
23
28
|
const agent = await gentid.createAgent({ name: 'payments-bot', owner: 'acme-corp' });
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
// ⚠ Store agent.privateKey securely — it is returned only once, never again.
|
|
29
|
+
// ⚠ Store agent.privateKey — it is returned only once, never again.
|
|
27
30
|
|
|
28
31
|
// 2. Sign any action
|
|
29
32
|
const { signature } = await gentid.signMessage(agent.id, 'approve-payment-$500');
|
|
30
33
|
|
|
31
34
|
// 3. Verify from anywhere — no API key needed
|
|
32
35
|
const { valid } = await gentid.verifySignature(agent.id, 'approve-payment-$500', signature);
|
|
33
|
-
|
|
36
|
+
|
|
37
|
+
// 4. Issue a permission token for a third party to verify
|
|
38
|
+
const { token } = await gentid.getToken(agent.id);
|
|
39
|
+
|
|
40
|
+
// 5. Any server can verify the token offline — no API key needed
|
|
41
|
+
const verified = await gentid.verifyToken(token);
|
|
42
|
+
// { valid: true, agentId, agentName, owner, permissions, ... }
|
|
34
43
|
```
|
|
35
44
|
|
|
36
|
-
|
|
45
|
+
---
|
|
37
46
|
|
|
38
|
-
|
|
47
|
+
## Agents
|
|
39
48
|
|
|
40
49
|
```typescript
|
|
41
|
-
// Create
|
|
42
|
-
const agent
|
|
43
|
-
// agent.privateKey is returned ONCE — store it in your secrets vault
|
|
50
|
+
// Create
|
|
51
|
+
const agent = await gentid.createAgent({ name: 'my-agent', owner: 'acme-corp' });
|
|
44
52
|
|
|
45
|
-
//
|
|
46
|
-
const agent
|
|
47
|
-
|
|
48
|
-
// List agents by owner
|
|
53
|
+
// Read
|
|
54
|
+
const agent = await gentid.getAgent('gentic:agent:a3f9d2c1e8b4');
|
|
49
55
|
const { agents, total } = await gentid.listAgents('acme-corp', { limit: 50, offset: 0 });
|
|
50
56
|
|
|
51
|
-
//
|
|
52
|
-
await gentid.suspendAgent(
|
|
53
|
-
await gentid.reactivateAgent(
|
|
54
|
-
await gentid.revokeAgent(
|
|
57
|
+
// Lifecycle
|
|
58
|
+
await gentid.suspendAgent(agent.id);
|
|
59
|
+
await gentid.reactivateAgent(agent.id);
|
|
60
|
+
await gentid.revokeAgent(agent.id); // permanent
|
|
55
61
|
```
|
|
56
62
|
|
|
57
|
-
|
|
63
|
+
## Signatures
|
|
58
64
|
|
|
59
65
|
```typescript
|
|
60
|
-
// Sign a message
|
|
61
|
-
const { signature
|
|
66
|
+
// Sign a message locally, then log to GentID for audit
|
|
67
|
+
const { signature } = await gentid.signMessage(agent.id, 'approve-order-123');
|
|
62
68
|
|
|
63
|
-
// Verify
|
|
64
|
-
const { valid } = await gentid.verifySignature(
|
|
69
|
+
// Verify — public endpoint, no API key required
|
|
70
|
+
const { valid } = await gentid.verifySignature(agent.id, 'approve-order-123', signature);
|
|
65
71
|
```
|
|
66
72
|
|
|
67
|
-
|
|
73
|
+
## Verification
|
|
68
74
|
|
|
69
75
|
```typescript
|
|
70
76
|
// Public lookup — no API key required
|
|
71
|
-
//
|
|
72
|
-
const identity
|
|
73
|
-
// { id, name, status, publicKey, algorithm, owner, issuedAt }
|
|
77
|
+
// Returns identity, public key, status, and trust score (0–100)
|
|
78
|
+
const identity = await gentid.lookupAgent('gentic:agent:a3f9d2c1e8b4');
|
|
79
|
+
// { id, name, status, publicKey, algorithm, owner, issuedAt, trustScore }
|
|
80
|
+
|
|
81
|
+
// Request formal verification (email | domain | manual)
|
|
82
|
+
await gentid.requestVerification(agent.id, 'domain');
|
|
83
|
+
const records = await gentid.getVerificationStatus(agent.id);
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Permissions
|
|
87
|
+
|
|
88
|
+
Set what each agent is allowed to do. Permissions are free-form JSON — define any schema that fits your use case.
|
|
89
|
+
|
|
90
|
+
```typescript
|
|
91
|
+
// Set permissions for an agent
|
|
92
|
+
await gentid.setPermissions(agent.id, {
|
|
93
|
+
travel_booking: true,
|
|
94
|
+
max_transaction_usd: 1500,
|
|
95
|
+
allowed_merchants: ['delta.com', 'united.com'],
|
|
96
|
+
expires_at: '2026-12-31T00:00:00Z',
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
// Read back
|
|
100
|
+
const { permissions } = await gentid.getPermissions(agent.id);
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Permission tokens
|
|
104
|
+
|
|
105
|
+
Issue a signed JWT that encodes the agent's identity and permissions. Any third party can verify it — online or offline.
|
|
74
106
|
|
|
75
|
-
|
|
76
|
-
|
|
107
|
+
```typescript
|
|
108
|
+
// Agent side — get a short-lived signed token (1 hour TTL)
|
|
109
|
+
const { token, expiresAt } = await gentid.getToken(agent.id);
|
|
110
|
+
|
|
111
|
+
// Attach to outgoing requests
|
|
112
|
+
fetch('https://partner-site.com/api/book', {
|
|
113
|
+
headers: { 'Authorization': `GentID ${token}` },
|
|
114
|
+
});
|
|
77
115
|
|
|
78
|
-
//
|
|
79
|
-
const
|
|
116
|
+
// Third-party server — verify with no API key
|
|
117
|
+
const result = await gentid.verifyToken(token);
|
|
118
|
+
// {
|
|
119
|
+
// valid: true,
|
|
120
|
+
// agentId: 'gentic:agent:...',
|
|
121
|
+
// agentName: 'payments-bot',
|
|
122
|
+
// owner: 'acme-corp',
|
|
123
|
+
// status: 'active',
|
|
124
|
+
// permissions: { travel_booking: true, max_transaction_usd: 1500 },
|
|
125
|
+
// issuedAt: '...',
|
|
126
|
+
// expiresAt: '...',
|
|
127
|
+
// }
|
|
80
128
|
```
|
|
81
129
|
|
|
130
|
+
## Approval requests
|
|
131
|
+
|
|
132
|
+
Request a human owner to approve an action in real time. The owner has 15 minutes to respond via the GentID dashboard.
|
|
133
|
+
|
|
134
|
+
```typescript
|
|
135
|
+
const request = await gentid.requestApproval(
|
|
136
|
+
agent.id,
|
|
137
|
+
'purchase-macbook-pro',
|
|
138
|
+
{ merchant: 'apple.com', amount: 1799, currency: 'USD' },
|
|
139
|
+
);
|
|
140
|
+
// { id, status: 'pending', expiresAt, ... }
|
|
141
|
+
// Owner receives a real-time push notification and approves/rejects in the dashboard.
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## Trust
|
|
145
|
+
|
|
146
|
+
Grant one agent the ability to act on behalf of another, within a scoped set of permissions.
|
|
147
|
+
|
|
148
|
+
```typescript
|
|
149
|
+
// Grant trust
|
|
150
|
+
const grant = await gentid.grantTrust(agentA.id, {
|
|
151
|
+
granteeAgentId: agentB.id,
|
|
152
|
+
scope: ['read', 'sign'],
|
|
153
|
+
expiresAt: '2026-12-31T00:00:00Z',
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
// List and revoke
|
|
157
|
+
const grants = await gentid.listTrustedAgents(agentA.id);
|
|
158
|
+
await gentid.revokeTrust(agentA.id, grant.id);
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## Badge
|
|
162
|
+
|
|
163
|
+
Embed a verified identity badge on any page.
|
|
164
|
+
|
|
165
|
+
```typescript
|
|
166
|
+
// No API key required
|
|
167
|
+
const badge = await gentid.getBadge(agent.id);
|
|
168
|
+
// badge.embedSnippet — paste into any HTML page
|
|
169
|
+
// badge.trustScore — 0–100 public trust score
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## Agent Gateway — `@gentid/auth`
|
|
175
|
+
|
|
176
|
+
To accept GentID-authenticated agents on your server, install the companion middleware package:
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
npm install @gentid/auth
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### Express
|
|
183
|
+
|
|
184
|
+
```typescript
|
|
185
|
+
import { gentidAuth } from '@gentid/auth/express';
|
|
186
|
+
|
|
187
|
+
app.use('/api', gentidAuth());
|
|
188
|
+
|
|
189
|
+
app.post('/api/book', (req, res) => {
|
|
190
|
+
const { agentName, permissions } = req.agent!;
|
|
191
|
+
res.json({ ok: true, bookedBy: agentName });
|
|
192
|
+
});
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
### Next.js (App Router)
|
|
196
|
+
|
|
197
|
+
```typescript
|
|
198
|
+
// app/api/book/route.ts
|
|
199
|
+
import { withGentidAuth } from '@gentid/auth/next';
|
|
200
|
+
|
|
201
|
+
export const POST = withGentidAuth(async (req, agent) => {
|
|
202
|
+
return Response.json({ ok: true, bookedBy: agent.agentName });
|
|
203
|
+
});
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### Cloudflare Worker
|
|
207
|
+
|
|
208
|
+
```typescript
|
|
209
|
+
import { withGentidAuth } from '@gentid/auth/cloudflare';
|
|
210
|
+
|
|
211
|
+
export default {
|
|
212
|
+
fetch: withGentidAuth(async (request, agent, env, ctx) => {
|
|
213
|
+
return Response.json({ agent: agent.agentName });
|
|
214
|
+
}),
|
|
215
|
+
};
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
82
220
|
## Error handling
|
|
83
221
|
|
|
84
|
-
All methods throw `GentIDError` on
|
|
222
|
+
All methods throw `GentIDError` on non-2xx responses:
|
|
85
223
|
|
|
86
224
|
```typescript
|
|
87
225
|
import { GentIDClient, GentIDError } from '@gentid/sdk';
|
|
88
226
|
|
|
89
227
|
try {
|
|
90
|
-
await gentid.getAgent('gentic:agent:
|
|
228
|
+
const agent = await gentid.getAgent('gentic:agent:does-not-exist');
|
|
91
229
|
} catch (err) {
|
|
92
230
|
if (err instanceof GentIDError) {
|
|
93
|
-
console.
|
|
94
|
-
console.
|
|
95
|
-
console.
|
|
231
|
+
console.log(err.statusCode); // 404
|
|
232
|
+
console.log(err.code); // 'AGENT_NOT_FOUND'
|
|
233
|
+
console.log(err.message); // 'Agent not found'
|
|
96
234
|
}
|
|
97
235
|
}
|
|
98
236
|
```
|
|
99
237
|
|
|
238
|
+
---
|
|
239
|
+
|
|
100
240
|
## Configuration
|
|
101
241
|
|
|
102
242
|
```typescript
|
|
103
243
|
const gentid = new GentIDClient({
|
|
104
|
-
apiKey: '
|
|
105
|
-
baseUrl: 'https://api.gentid.com', // optional
|
|
244
|
+
apiKey: 'gid_live_xxxxxxxxxxxx', // required
|
|
245
|
+
baseUrl: 'https://api.gentid.com', // optional override
|
|
106
246
|
});
|
|
107
247
|
```
|
|
108
248
|
|
|
109
|
-
|
|
249
|
+
API keys are generated in the [GentID dashboard](https://gentid.com/dashboard/api-keys). Keys are prefixed with `gid_live_` for production.
|
|
110
250
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
```typescript
|
|
114
|
-
import crypto from 'crypto';
|
|
115
|
-
|
|
116
|
-
function verifyWebhook(secret: string, rawBody: string, signatureHeader: string): boolean {
|
|
117
|
-
const [tPart, v1Part] = signatureHeader.split(',');
|
|
118
|
-
const timestamp = tPart.replace('t=', '');
|
|
119
|
-
const expected = v1Part.replace('v1=', '');
|
|
120
|
-
const sig = crypto
|
|
121
|
-
.createHmac('sha256', secret)
|
|
122
|
-
.update(`${timestamp}.${rawBody}`)
|
|
123
|
-
.digest('hex');
|
|
124
|
-
return crypto.timingSafeEqual(Buffer.from(sig), Buffer.from(expected));
|
|
125
|
-
}
|
|
126
|
-
```
|
|
251
|
+
---
|
|
127
252
|
|
|
128
|
-
##
|
|
253
|
+
## Links
|
|
129
254
|
|
|
130
|
-
|
|
255
|
+
- [Documentation](https://gentid.com/docs)
|
|
256
|
+
- [Dashboard](https://gentid.com/dashboard)
|
|
257
|
+
- [GitHub](https://github.com/010101G/gentid-sdk)
|
|
258
|
+
- [npm — @gentid/auth](https://www.npmjs.com/package/@gentid/auth)
|
package/dist/client.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { GentIDClientOptions, Agent, CreatedAgent, SignResult, VerifyResult, VerificationRecord, VerificationType, ListAgentsResult, LookupResult } from './types';
|
|
1
|
+
import type { GentIDClientOptions, Agent, CreatedAgent, SignResult, VerifyResult, VerificationRecord, VerificationType, ListAgentsResult, LookupResult, AgentPermissions, AgentTrustGrant, BadgeData, PermissionToken, VerifiedToken, ApprovalRequest } from './types';
|
|
2
2
|
export declare class GentIDError extends Error {
|
|
3
3
|
readonly statusCode: number;
|
|
4
4
|
readonly code?: string | undefined;
|
|
@@ -28,5 +28,32 @@ export declare class GentIDClient {
|
|
|
28
28
|
lookupAgent(agentId: string): Promise<LookupResult>;
|
|
29
29
|
requestVerification(agentId: string, type: VerificationType): Promise<VerificationRecord>;
|
|
30
30
|
getVerificationStatus(agentId: string): Promise<VerificationRecord[]>;
|
|
31
|
+
getPermissions(agentId: string): Promise<AgentPermissions>;
|
|
32
|
+
setPermissions(agentId: string, permissions: Record<string, unknown>): Promise<AgentPermissions>;
|
|
33
|
+
listTrustedAgents(agentId: string): Promise<AgentTrustGrant[]>;
|
|
34
|
+
grantTrust(grantorAgentId: string, params: {
|
|
35
|
+
granteeAgentId: string;
|
|
36
|
+
scope?: string[];
|
|
37
|
+
expiresAt?: string;
|
|
38
|
+
}): Promise<AgentTrustGrant>;
|
|
39
|
+
revokeTrust(grantorAgentId: string, trustId: string): Promise<void>;
|
|
40
|
+
/** Returns badge data + embed snippet. No API key required. */
|
|
41
|
+
getBadge(agentId: string): Promise<BadgeData>;
|
|
42
|
+
/**
|
|
43
|
+
* Issue a signed permission token for an agent.
|
|
44
|
+
* The JWT encodes the agent's identity + permissions and can be verified
|
|
45
|
+
* by any third party without calling GentID (offline-verifiable).
|
|
46
|
+
*/
|
|
47
|
+
getToken(agentId: string): Promise<PermissionToken>;
|
|
48
|
+
/**
|
|
49
|
+
* Verify a permission token issued by GentID.
|
|
50
|
+
* No API key required — useful for third-party server verification.
|
|
51
|
+
*/
|
|
52
|
+
verifyToken(token: string): Promise<VerifiedToken>;
|
|
53
|
+
/**
|
|
54
|
+
* Request owner approval for an action above the agent's configured threshold.
|
|
55
|
+
* The org owner is notified in real time and has 15 minutes to approve or reject.
|
|
56
|
+
*/
|
|
57
|
+
requestApproval(agentId: string, action: string, metadata?: Record<string, unknown>): Promise<ApprovalRequest>;
|
|
31
58
|
}
|
|
32
59
|
//# sourceMappingURL=client.d.ts.map
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,KAAK,EACL,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACb,MAAM,SAAS,CAAC;AAEjB,qBAAa,WAAY,SAAQ,KAAK;aAElB,UAAU,EAAE,MAAM;aAElB,IAAI,CAAC,EAAE,MAAM;gBAFb,UAAU,EAAE,MAAM,EAClC,OAAO,EAAE,MAAM,EACC,IAAI,CAAC,EAAE,MAAM,YAAA;CAKhC;AAID,qBAAa,YAAY;IACvB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;gBAEpB,EAAE,OAA0B,EAAE,MAAM,EAAE,EAAE,mBAAmB;YAKzD,OAAO;IA0BrB,4FAA4F;IACtF,WAAW,CAAC,MAAM,EAAE;QAAE,IAAI,EAA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 -76,6 +76,54 @@ class GentIDClient {
|
|
|
76
76
|
const params = new URLSearchParams({ agentId });
|
|
77
77
|
return this.request('GET', `/verification/status?${params}`);
|
|
78
78
|
}
|
|
79
|
+
// ─── Permissions ──────────────────────────────────────────────────────────────
|
|
80
|
+
async getPermissions(agentId) {
|
|
81
|
+
return this.request('GET', `/portal/agents/${encodeURIComponent(agentId)}/permissions`);
|
|
82
|
+
}
|
|
83
|
+
async setPermissions(agentId, permissions) {
|
|
84
|
+
return this.request('PUT', `/portal/agents/${encodeURIComponent(agentId)}/permissions`, { permissions });
|
|
85
|
+
}
|
|
86
|
+
// ─── Trust ────────────────────────────────────────────────────────────────────
|
|
87
|
+
async listTrustedAgents(agentId) {
|
|
88
|
+
return this.request('GET', `/portal/agents/${encodeURIComponent(agentId)}/trust`);
|
|
89
|
+
}
|
|
90
|
+
async grantTrust(grantorAgentId, params) {
|
|
91
|
+
return this.request('POST', `/portal/agents/${encodeURIComponent(grantorAgentId)}/trust`, params);
|
|
92
|
+
}
|
|
93
|
+
async revokeTrust(grantorAgentId, trustId) {
|
|
94
|
+
return this.request('DELETE', `/portal/agents/${encodeURIComponent(grantorAgentId)}/trust/${encodeURIComponent(trustId)}`);
|
|
95
|
+
}
|
|
96
|
+
// ─── Badge ────────────────────────────────────────────────────────────────────
|
|
97
|
+
/** Returns badge data + embed snippet. No API key required. */
|
|
98
|
+
async getBadge(agentId) {
|
|
99
|
+
return this.request('GET', `/badge/${encodeURIComponent(agentId)}`, undefined, false);
|
|
100
|
+
}
|
|
101
|
+
// ─── Delegation ───────────────────────────────────────────────────────────────
|
|
102
|
+
/**
|
|
103
|
+
* Issue a signed permission token for an agent.
|
|
104
|
+
* The JWT encodes the agent's identity + permissions and can be verified
|
|
105
|
+
* by any third party without calling GentID (offline-verifiable).
|
|
106
|
+
*/
|
|
107
|
+
async getToken(agentId) {
|
|
108
|
+
return this.request('GET', `/portal/agents/${encodeURIComponent(agentId)}/token`);
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Verify a permission token issued by GentID.
|
|
112
|
+
* No API key required — useful for third-party server verification.
|
|
113
|
+
*/
|
|
114
|
+
async verifyToken(token) {
|
|
115
|
+
return this.request('POST', '/verification/verify-token', { token }, false);
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Request owner approval for an action above the agent's configured threshold.
|
|
119
|
+
* The org owner is notified in real time and has 15 minutes to approve or reject.
|
|
120
|
+
*/
|
|
121
|
+
async requestApproval(agentId, action, metadata) {
|
|
122
|
+
return this.request('POST', `/agents/${encodeURIComponent(agentId)}/request-approval`, {
|
|
123
|
+
action,
|
|
124
|
+
metadata: metadata ?? {},
|
|
125
|
+
});
|
|
126
|
+
}
|
|
79
127
|
}
|
|
80
128
|
exports.GentIDClient = GentIDClient;
|
|
81
129
|
//# sourceMappingURL=client.js.map
|
package/dist/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":";;;AAkBA,MAAa,WAAY,SAAQ,KAAK;IACpC,YACkB,UAAkB,EAClC,OAAe,EACC,IAAa;QAE7B,KAAK,CAAC,OAAO,CAAC,CAAC;QAJC,eAAU,GAAV,UAAU,CAAQ;QAElB,SAAI,GAAJ,IAAI,CAAS;QAG7B,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC;IAC5B,CAAC;CACF;AATD,kCASC;AAED,MAAM,gBAAgB,GAAG,wBAAwB,CAAC;AAElD,MAAa,YAAY;IAIvB,YAAY,EAAE,OAAO,GAAG,gBAAgB,EAAE,MAAM,EAAuB;QACrE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAC1C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAEO,KAAK,CAAC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AAkB,CAAC,cAAc,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IACrH,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,cAAsB,EAAE,OAAe;QACvD,OAAO,IAAI,CAAC,OAAO,CAAO,QAAQ,EAAE,kBAAkB,kBAAkB,CAAC,cAAc,CAAC,UAAU,kBAAkB,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACnI,CAAC;IAED,iFAAiF;IAEjF,+DAA+D;IAC/D,KAAK,CAAC,QAAQ,CAAC,OAAe;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAY,KAAK,EAAE,UAAU,kBAAkB,CAAC,OAAO,CAAC,EAAE,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;IACnG,CAAC;IAED,iFAAiF;IAEjF;;;;OAIG;IACH,KAAK,CAAC,QAAQ,CAAC,OAAe;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAkB,KAAK,EAAE,kBAAkB,kBAAkB,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACrG,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,WAAW,CAAC,KAAa;QAC7B,OAAO,IAAI,CAAC,OAAO,CAAgB,MAAM,EAAE,4BAA4B,EAAE,EAAE,KAAK,EAAE,EAAE,KAAK,CAAC,CAAC;IAC7F,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,eAAe,CACnB,OAAe,EACf,MAAc,EACd,QAAkC;QAElC,OAAO,IAAI,CAAC,OAAO,CAAkB,MAAM,EAAE,WAAW,kBAAkB,CAAC,OAAO,CAAC,mBAAmB,EAAE;YACtG,MAAM;YACN,QAAQ,EAAE,QAAQ,IAAI,EAAE;SACzB,CAAC,CAAC;IACL,CAAC;CACF;AA5JD,oCA4JC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { GentIDClient, GentIDError } from './client';
|
|
2
|
-
export type { Agent, CreatedAgent, SignResult, VerifyResult, VerificationRecord, VerificationType, VerificationStatus, AgentStatus, LookupResult, ListAgentsResult, GentIDClientOptions, } from './types';
|
|
2
|
+
export type { Agent, CreatedAgent, SignResult, VerifyResult, VerificationRecord, VerificationType, VerificationStatus, AgentStatus, LookupResult, ListAgentsResult, GentIDClientOptions, AgentPermissions, AgentTrustGrant, BadgeData, PermissionToken, VerifiedToken, ApprovalRequest, } from './types';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACrD,YAAY,EACV,KAAK,EACL,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,WAAW,EACX,YAAY,EACZ,gBAAgB,EAChB,mBAAmB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACrD,YAAY,EACV,KAAK,EACL,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,WAAW,EACX,YAAY,EACZ,gBAAgB,EAChB,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,SAAS,EACT,eAAe,EACf,aAAa,EACb,eAAe,GAChB,MAAM,SAAS,CAAC"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,mCAAqD;AAA5C,sGAAA,YAAY,OAAA;AAAE,qGAAA,WAAW,OAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,mCAAqD;AAA5C,sGAAA,YAAY,OAAA;AAAE,qGAAA,WAAW,OAAA;AAqBlC,eAAe;AACf,EAAE;AACF,8CAA8C;AAC9C,EAAE;AACF,gEAAgE;AAChE,EAAE;AACF,wFAAwF;AACxF,4DAA4D;AAC5D,EAAE;AACF,kFAAkF;AAClF,6FAA6F;AAC7F,EAAE;AACF,uCAAuC;AACvC,uDAAuD"}
|
package/dist/types.d.ts
CHANGED
|
@@ -43,6 +43,55 @@ export interface LookupResult {
|
|
|
43
43
|
algorithm: string;
|
|
44
44
|
owner: string;
|
|
45
45
|
issuedAt: string;
|
|
46
|
+
/** 0–100 trust score computed from age, owner verification, signature volume, and verified records. */
|
|
47
|
+
trustScore: number;
|
|
48
|
+
}
|
|
49
|
+
export interface AgentPermissions {
|
|
50
|
+
agentId: string;
|
|
51
|
+
permissions: Record<string, unknown>;
|
|
52
|
+
}
|
|
53
|
+
export interface AgentTrustGrant {
|
|
54
|
+
id: string;
|
|
55
|
+
granteeAgentId: string;
|
|
56
|
+
scope: string[];
|
|
57
|
+
expiresAt: string | null;
|
|
58
|
+
createdAt: string;
|
|
59
|
+
}
|
|
60
|
+
export interface BadgeData {
|
|
61
|
+
agentId: string;
|
|
62
|
+
name: string;
|
|
63
|
+
status: AgentStatus;
|
|
64
|
+
owner: string;
|
|
65
|
+
trustScore: number;
|
|
66
|
+
issuedAt: string;
|
|
67
|
+
embedUrl: string;
|
|
68
|
+
embedSnippet: string;
|
|
69
|
+
}
|
|
70
|
+
export interface PermissionToken {
|
|
71
|
+
token: string;
|
|
72
|
+
expiresAt: string;
|
|
73
|
+
}
|
|
74
|
+
export interface VerifiedToken {
|
|
75
|
+
valid: true;
|
|
76
|
+
agentId: string;
|
|
77
|
+
agentName: string;
|
|
78
|
+
owner: string;
|
|
79
|
+
status: string;
|
|
80
|
+
permissions: Record<string, unknown>;
|
|
81
|
+
issuedAt: string;
|
|
82
|
+
expiresAt: string;
|
|
83
|
+
}
|
|
84
|
+
export interface ApprovalRequest {
|
|
85
|
+
id: string;
|
|
86
|
+
agentId: string;
|
|
87
|
+
agentName: string;
|
|
88
|
+
orgId: string;
|
|
89
|
+
action: string;
|
|
90
|
+
metadata: Record<string, unknown>;
|
|
91
|
+
status: 'pending' | 'approved' | 'rejected' | 'expired';
|
|
92
|
+
requestedAt: string;
|
|
93
|
+
resolvedAt: string | null;
|
|
94
|
+
expiresAt: string;
|
|
46
95
|
}
|
|
47
96
|
export interface ListAgentsResult {
|
|
48
97
|
agents: Agent[];
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,CAAC;AAC7D,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAC7D,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,UAAU,GAAG,QAAQ,CAAC;AAEnE,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,WAAW,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,YAAa,SAAQ,KAAK;IACzC,0DAA0D;IAC1D,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC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,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,IAAI,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,MAAM,EAAE,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,CAAC;IACxD,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,yCAAyC;IACzC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gentid/sdk",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "TypeScript SDK for GentID — cryptographic identity for AI agents",
|
|
3
|
+
"version": "1.1.1",
|
|
4
|
+
"description": "TypeScript SDK for GentID — cryptographic identity, permissions, and agent gateway for AI agents",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"homepage": "https://gentid.com",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/010101G/gentid-sdk.git"
|
|
10
|
+
},
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/010101G/gentid-sdk/issues"
|
|
13
|
+
},
|
|
5
14
|
"main": "dist/index.js",
|
|
6
15
|
"types": "dist/index.d.ts",
|
|
7
16
|
"keywords": [
|