@inkbox/sdk 0.1.4 → 0.2.0
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 +42 -2
- package/dist/_http.d.ts +7 -1
- package/dist/_http.d.ts.map +1 -1
- package/dist/_http.js +13 -1
- package/dist/_http.js.map +1 -1
- package/dist/agent_identity.d.ts +36 -4
- package/dist/agent_identity.d.ts.map +1 -1
- package/dist/agent_identity.js +70 -6
- package/dist/agent_identity.js.map +1 -1
- package/dist/authenticator/resources/accounts.d.ts +1 -1
- package/dist/authenticator/resources/accounts.js +1 -1
- package/dist/authenticator/resources/apps.d.ts +2 -2
- package/dist/authenticator/resources/apps.js +2 -2
- package/dist/credentials.d.ts +86 -0
- package/dist/credentials.d.ts.map +1 -0
- package/dist/credentials.js +130 -0
- package/dist/credentials.js.map +1 -0
- package/dist/identities/resources/identities.d.ts +1 -1
- package/dist/identities/resources/identities.js +1 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/inkbox.d.ts +25 -0
- package/dist/inkbox.d.ts.map +1 -1
- package/dist/inkbox.js +34 -1
- package/dist/inkbox.js.map +1 -1
- package/dist/mail/resources/messages.d.ts +2 -2
- package/dist/mail/resources/messages.d.ts.map +1 -1
- package/dist/mail/resources/messages.js.map +1 -1
- package/dist/mail/types.d.ts +8 -1
- package/dist/mail/types.d.ts.map +1 -1
- package/dist/mail/types.js +8 -0
- package/dist/mail/types.js.map +1 -1
- package/dist/vault/crypto.d.ts +136 -0
- package/dist/vault/crypto.d.ts.map +1 -0
- package/dist/vault/crypto.js +265 -0
- package/dist/vault/crypto.js.map +1 -0
- package/dist/vault/resources/vault.d.ts +149 -0
- package/dist/vault/resources/vault.d.ts.map +1 -0
- package/dist/vault/resources/vault.js +291 -0
- package/dist/vault/resources/vault.js.map +1 -0
- package/dist/vault/types.d.ts +236 -0
- package/dist/vault/types.d.ts.map +1 -0
- package/dist/vault/types.js +225 -0
- package/dist/vault/types.js.map +1 -0
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @inkbox/sdk
|
|
2
2
|
|
|
3
|
-
TypeScript SDK for the [Inkbox API](https://
|
|
3
|
+
TypeScript SDK for the [Inkbox API](https://inkbox.ai/docs) — API-first communication infrastructure for AI agents (email, phone, authenticator/OTP, identities).
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
@@ -19,7 +19,10 @@ You'll need an API key to use this SDK. Get one at [console.inkbox.ai](https://c
|
|
|
19
19
|
```ts
|
|
20
20
|
import { Inkbox } from "@inkbox/sdk";
|
|
21
21
|
|
|
22
|
-
const inkbox = new Inkbox({
|
|
22
|
+
const inkbox = new Inkbox({
|
|
23
|
+
apiKey: process.env.INKBOX_API_KEY!,
|
|
24
|
+
vaultKey: process.env.INKBOX_VAULT_KEY,
|
|
25
|
+
});
|
|
23
26
|
|
|
24
27
|
// Create an agent identity
|
|
25
28
|
const identity = await inkbox.createIdentity("support-bot");
|
|
@@ -48,6 +51,12 @@ for await (const message of identity.iterEmails()) {
|
|
|
48
51
|
|
|
49
52
|
// List calls
|
|
50
53
|
const calls = await identity.listCalls();
|
|
54
|
+
|
|
55
|
+
// Access credentials (vault unlocked at construction)
|
|
56
|
+
const creds = await identity.getCredentials();
|
|
57
|
+
for (const login of creds.listLogins()) {
|
|
58
|
+
console.log(login.name);
|
|
59
|
+
}
|
|
51
60
|
```
|
|
52
61
|
|
|
53
62
|
## Authentication
|
|
@@ -246,6 +255,37 @@ await inkbox.authenticatorApps.delete("app-uuid");
|
|
|
246
255
|
|
|
247
256
|
---
|
|
248
257
|
|
|
258
|
+
## Credentials
|
|
259
|
+
|
|
260
|
+
Access credentials stored in the vault through the agent-facing `credentials` surface. The vault must be unlocked first.
|
|
261
|
+
|
|
262
|
+
```ts
|
|
263
|
+
// Unlock the vault (once per session)
|
|
264
|
+
await inkbox.vault.unlock("my-Vault-key-01!");
|
|
265
|
+
|
|
266
|
+
const identity = await inkbox.getIdentity("my-agent");
|
|
267
|
+
const creds = await identity.getCredentials();
|
|
268
|
+
|
|
269
|
+
// Discovery — list credentials this identity has access to
|
|
270
|
+
for (const login of creds.listLogins()) {
|
|
271
|
+
console.log(login.name, (login.payload as LoginPayload).username);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
for (const key of creds.listApiKeys()) {
|
|
275
|
+
console.log(key.name, (key.payload as APIKeyPayload).accessKey);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
// Access by UUID — returns the typed payload directly
|
|
279
|
+
const login = creds.getLogin("secret-uuid"); // → LoginPayload
|
|
280
|
+
const apiKey = creds.getApiKey("secret-uuid"); // → APIKeyPayload
|
|
281
|
+
const sshKey = creds.getSshKey("secret-uuid"); // → SSHKeyPayload
|
|
282
|
+
|
|
283
|
+
// Generic access
|
|
284
|
+
const secret = creds.get("secret-uuid"); // → DecryptedVaultSecret
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
---
|
|
288
|
+
|
|
249
289
|
## Org-level Mailboxes
|
|
250
290
|
|
|
251
291
|
Manage mailboxes directly without going through an identity. Access via `inkbox.mailboxes`.
|
package/dist/_http.d.ts
CHANGED
|
@@ -3,7 +3,13 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Async HTTP transport (internal). Zero runtime dependencies — uses native fetch.
|
|
5
5
|
*/
|
|
6
|
-
export declare class
|
|
6
|
+
export declare class InkboxError extends Error {
|
|
7
|
+
constructor(message: string);
|
|
8
|
+
}
|
|
9
|
+
export declare class InkboxVaultKeyError extends InkboxError {
|
|
10
|
+
constructor(message: string);
|
|
11
|
+
}
|
|
12
|
+
export declare class InkboxAPIError extends InkboxError {
|
|
7
13
|
readonly statusCode: number;
|
|
8
14
|
readonly detail: string;
|
|
9
15
|
constructor(statusCode: number, detail: string);
|
package/dist/_http.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
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
|
package/dist/_http.js
CHANGED
|
@@ -3,7 +3,19 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Async HTTP transport (internal). Zero runtime dependencies — uses native fetch.
|
|
5
5
|
*/
|
|
6
|
-
export class
|
|
6
|
+
export class InkboxError extends Error {
|
|
7
|
+
constructor(message) {
|
|
8
|
+
super(message);
|
|
9
|
+
this.name = "InkboxError";
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export class InkboxVaultKeyError extends InkboxError {
|
|
13
|
+
constructor(message) {
|
|
14
|
+
super(message);
|
|
15
|
+
this.name = "InkboxVaultKeyError";
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export class InkboxAPIError extends InkboxError {
|
|
7
19
|
statusCode;
|
|
8
20
|
detail;
|
|
9
21
|
constructor(statusCode, detail) {
|
package/dist/_http.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_http.js","sourceRoot":"","sources":["../src/_http.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"_http.js","sourceRoot":"","sources":["../src/_http.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,OAAO,WAAY,SAAQ,KAAK;IACpC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC;IAC5B,CAAC;CACF;AAED,MAAM,OAAO,mBAAoB,SAAQ,WAAW;IAClD,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;IACpC,CAAC;CACF;AAED,MAAM,OAAO,cAAe,SAAQ,WAAW;IACpC,UAAU,CAAS;IACnB,MAAM,CAAS;IAExB,YAAY,UAAkB,EAAE,MAAc;QAC5C,KAAK,CAAC,QAAQ,UAAU,KAAK,MAAM,EAAE,CAAC,CAAC;QACvC,IAAI,CAAC,IA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AAC,MAAM,IAAI,IAAI,CAAC,UAAU,CAAC;YACzC,CAAC;YAAC,MAAM,CAAC;gBACP,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC;YAC3B,CAAC;YACD,MAAM,IAAI,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAChD,CAAC;QAED,IAAI,IAAI,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;YACxB,OAAO,SAAc,CAAC;QACxB,CAAC;QAED,OAAO,IAAI,CAAC,IAAI,EAAgB,CAAC;IACnC,CAAC;CACF"}
|
package/dist/agent_identity.d.ts
CHANGED
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
* address or phone number ID explicitly.
|
|
10
10
|
*/
|
|
11
11
|
import type { AuthenticatorAccount, AuthenticatorApp, OTPCode } from "./authenticator/types.js";
|
|
12
|
+
import { Credentials } from "./credentials.js";
|
|
13
|
+
import { MessageDirection } from "./mail/types.js";
|
|
12
14
|
import type { Message, MessageDetail, ThreadDetail } from "./mail/types.js";
|
|
13
15
|
import type { PhoneCall, PhoneCallWithRateLimit, PhoneTranscript } from "./phone/types.js";
|
|
14
16
|
import type { _AgentIdentityData, IdentityAuthenticatorApp, IdentityMailbox, IdentityPhoneNumber } from "./identities/types.js";
|
|
@@ -19,6 +21,8 @@ export declare class AgentIdentity {
|
|
|
19
21
|
private _mailbox;
|
|
20
22
|
private _phoneNumber;
|
|
21
23
|
private _authenticatorApp;
|
|
24
|
+
private _credentials;
|
|
25
|
+
private _credentialsVaultRef;
|
|
22
26
|
constructor(data: _AgentIdentityData, inkbox: Inkbox);
|
|
23
27
|
get agentHandle(): string;
|
|
24
28
|
get id(): string;
|
|
@@ -29,6 +33,29 @@ export declare class AgentIdentity {
|
|
|
29
33
|
get phoneNumber(): IdentityPhoneNumber | null;
|
|
30
34
|
/** The authenticator app currently assigned to this identity, or `null` if none. */
|
|
31
35
|
get authenticatorApp(): IdentityAuthenticatorApp | null;
|
|
36
|
+
/**
|
|
37
|
+
* Identity-scoped credential access.
|
|
38
|
+
*
|
|
39
|
+
* Returns a {@link Credentials} object filtered to the secrets this
|
|
40
|
+
* identity has been granted access to. The vault must be unlocked
|
|
41
|
+
* first via `inkbox.vault.unlock(vaultKey)`.
|
|
42
|
+
*
|
|
43
|
+
* The result is cached and automatically invalidated when the
|
|
44
|
+
* vault is re-unlocked. Call {@link refresh} to manually clear
|
|
45
|
+
* the cache (e.g. after access-rule changes).
|
|
46
|
+
*
|
|
47
|
+
* @throws Error if the vault has not been unlocked.
|
|
48
|
+
*/
|
|
49
|
+
getCredentials(): Promise<Credentials>;
|
|
50
|
+
/**
|
|
51
|
+
* Revoke this identity's access to a vault secret.
|
|
52
|
+
*
|
|
53
|
+
* Also clears the credentials cache so the next call to
|
|
54
|
+
* {@link getCredentials} reflects the change.
|
|
55
|
+
*
|
|
56
|
+
* @param secretId - UUID of the secret to revoke access from.
|
|
57
|
+
*/
|
|
58
|
+
revokeCredentialAccess(secretId: string): Promise<void>;
|
|
32
59
|
/**
|
|
33
60
|
* Create a new mailbox and link it to this identity.
|
|
34
61
|
*
|
|
@@ -127,7 +154,7 @@ export declare class AgentIdentity {
|
|
|
127
154
|
*/
|
|
128
155
|
iterEmails(options?: {
|
|
129
156
|
pageSize?: number;
|
|
130
|
-
direction?:
|
|
157
|
+
direction?: MessageDirection;
|
|
131
158
|
}): AsyncGenerator<Message>;
|
|
132
159
|
/**
|
|
133
160
|
* Iterate over unread emails in this identity's inbox, newest first.
|
|
@@ -139,7 +166,7 @@ export declare class AgentIdentity {
|
|
|
139
166
|
*/
|
|
140
167
|
iterUnreadEmails(options?: {
|
|
141
168
|
pageSize?: number;
|
|
142
|
-
direction?:
|
|
169
|
+
direction?: MessageDirection;
|
|
143
170
|
}): AsyncGenerator<Message>;
|
|
144
171
|
/**
|
|
145
172
|
* Mark a list of messages as read.
|
|
@@ -219,7 +246,7 @@ export declare class AgentIdentity {
|
|
|
219
246
|
description?: string | null;
|
|
220
247
|
}): Promise<AuthenticatorAccount>;
|
|
221
248
|
/**
|
|
222
|
-
*
|
|
249
|
+
* Delete an authenticator account.
|
|
223
250
|
*
|
|
224
251
|
* @param accountId - UUID of the authenticator account to delete.
|
|
225
252
|
*/
|
|
@@ -244,11 +271,16 @@ export declare class AgentIdentity {
|
|
|
244
271
|
/**
|
|
245
272
|
* Re-fetch this identity from the API and update cached channels.
|
|
246
273
|
*
|
|
274
|
+
* Also clears the credentials filter cache so the next call to
|
|
275
|
+
* {@link getCredentials} re-evaluates access rules. (The cache is
|
|
276
|
+
* also automatically invalidated when the vault is re-unlocked.)
|
|
277
|
+
*
|
|
247
278
|
* @returns `this` for chaining.
|
|
248
279
|
*/
|
|
249
280
|
refresh(): Promise<AgentIdentity>;
|
|
250
|
-
/**
|
|
281
|
+
/** Delete this identity (unlinks channels without deleting them). */
|
|
251
282
|
delete(): Promise<void>;
|
|
283
|
+
private _requireVaultUnlocked;
|
|
252
284
|
private _requireMailbox;
|
|
253
285
|
private _requirePhone;
|
|
254
286
|
private _requireAuthenticatorApp;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent_identity.d.ts","sourceRoot":"","sources":["../src/agent_identity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAChG,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,KAAK,EAAE,SAAS,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAC3F,OAAO,KAAK,EAEV,kBAAkB,EAClB,wBAAwB,EACxB,eAAe,EACf,mBAAmB,EACpB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,qBAAa,aAAa;IACxB,OAAO,CAAC,KAAK,CAAqB;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_identity.js
CHANGED
|
@@ -8,13 +8,16 @@
|
|
|
8
8
|
* identity's assigned channels so callers never need to pass an email
|
|
9
9
|
* address or phone number ID explicitly.
|
|
10
10
|
*/
|
|
11
|
-
import {
|
|
11
|
+
import { InkboxError } from "./_http.js";
|
|
12
|
+
import { Credentials } from "./credentials.js";
|
|
12
13
|
export class AgentIdentity {
|
|
13
14
|
_data;
|
|
14
15
|
_inkbox;
|
|
15
16
|
_mailbox;
|
|
16
17
|
_phoneNumber;
|
|
17
18
|
_authenticatorApp;
|
|
19
|
+
_credentials = null;
|
|
20
|
+
_credentialsVaultRef = null; // tracks which _unlocked built the cache
|
|
18
21
|
constructor(data, inkbox) {
|
|
19
22
|
this._data = data;
|
|
20
23
|
this._inkbox = inkbox;
|
|
@@ -34,6 +37,57 @@ export class AgentIdentity {
|
|
|
34
37
|
get phoneNumber() { return this._phoneNumber; }
|
|
35
38
|
/** The authenticator app currently assigned to this identity, or `null` if none. */
|
|
36
39
|
get authenticatorApp() { return this._authenticatorApp; }
|
|
40
|
+
/**
|
|
41
|
+
* Identity-scoped credential access.
|
|
42
|
+
*
|
|
43
|
+
* Returns a {@link Credentials} object filtered to the secrets this
|
|
44
|
+
* identity has been granted access to. The vault must be unlocked
|
|
45
|
+
* first via `inkbox.vault.unlock(vaultKey)`.
|
|
46
|
+
*
|
|
47
|
+
* The result is cached and automatically invalidated when the
|
|
48
|
+
* vault is re-unlocked. Call {@link refresh} to manually clear
|
|
49
|
+
* the cache (e.g. after access-rule changes).
|
|
50
|
+
*
|
|
51
|
+
* @throws Error if the vault has not been unlocked.
|
|
52
|
+
*/
|
|
53
|
+
async getCredentials() {
|
|
54
|
+
// If the vault was unlocked via constructor vaultKey, wait for it.
|
|
55
|
+
if (this._inkbox._vaultUnlockPromise !== null) {
|
|
56
|
+
await this._inkbox._vaultUnlockPromise;
|
|
57
|
+
}
|
|
58
|
+
const vault = this._inkbox._vaultResource;
|
|
59
|
+
// Invalidate cache if the vault was re-unlocked since we last built it.
|
|
60
|
+
if (this._credentials !== null && vault._unlocked === this._credentialsVaultRef) {
|
|
61
|
+
return this._credentials;
|
|
62
|
+
}
|
|
63
|
+
this._requireVaultUnlocked();
|
|
64
|
+
const unlocked = vault._unlocked;
|
|
65
|
+
// Filter secrets by identity access rules (same logic as
|
|
66
|
+
// VaultResource.unlock with identityId).
|
|
67
|
+
const idStr = this.id;
|
|
68
|
+
const filtered = [];
|
|
69
|
+
for (const secret of unlocked.secrets) {
|
|
70
|
+
const rules = await vault.http.get(`/secrets/${secret.id}/access`);
|
|
71
|
+
if (rules.some((r) => r.identity_id === idStr)) {
|
|
72
|
+
filtered.push(secret);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
this._credentials = new Credentials(filtered);
|
|
76
|
+
this._credentialsVaultRef = unlocked;
|
|
77
|
+
return this._credentials;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Revoke this identity's access to a vault secret.
|
|
81
|
+
*
|
|
82
|
+
* Also clears the credentials cache so the next call to
|
|
83
|
+
* {@link getCredentials} reflects the change.
|
|
84
|
+
*
|
|
85
|
+
* @param secretId - UUID of the secret to revoke access from.
|
|
86
|
+
*/
|
|
87
|
+
async revokeCredentialAccess(secretId) {
|
|
88
|
+
await this._inkbox._vaultResource.revokeAccess(secretId, this.id);
|
|
89
|
+
this._credentials = null;
|
|
90
|
+
}
|
|
37
91
|
// ------------------------------------------------------------------
|
|
38
92
|
// Channel management
|
|
39
93
|
// ------------------------------------------------------------------
|
|
@@ -311,7 +365,7 @@ export class AgentIdentity {
|
|
|
311
365
|
return this._inkbox._authAccounts.update(this._authenticatorApp.id, accountId, options);
|
|
312
366
|
}
|
|
313
367
|
/**
|
|
314
|
-
*
|
|
368
|
+
* Delete an authenticator account.
|
|
315
369
|
*
|
|
316
370
|
* @param accountId - UUID of the authenticator account to delete.
|
|
317
371
|
*/
|
|
@@ -350,6 +404,10 @@ export class AgentIdentity {
|
|
|
350
404
|
/**
|
|
351
405
|
* Re-fetch this identity from the API and update cached channels.
|
|
352
406
|
*
|
|
407
|
+
* Also clears the credentials filter cache so the next call to
|
|
408
|
+
* {@link getCredentials} re-evaluates access rules. (The cache is
|
|
409
|
+
* also automatically invalidated when the vault is re-unlocked.)
|
|
410
|
+
*
|
|
353
411
|
* @returns `this` for chaining.
|
|
354
412
|
*/
|
|
355
413
|
async refresh() {
|
|
@@ -358,28 +416,34 @@ export class AgentIdentity {
|
|
|
358
416
|
this._mailbox = data.mailbox;
|
|
359
417
|
this._phoneNumber = data.phoneNumber;
|
|
360
418
|
this._authenticatorApp = data.authenticatorApp;
|
|
419
|
+
this._credentials = null;
|
|
361
420
|
return this;
|
|
362
421
|
}
|
|
363
|
-
/**
|
|
422
|
+
/** Delete this identity (unlinks channels without deleting them). */
|
|
364
423
|
async delete() {
|
|
365
424
|
await this._inkbox._idsResource.delete(this.agentHandle);
|
|
366
425
|
}
|
|
367
426
|
// ------------------------------------------------------------------
|
|
368
427
|
// Internal guards
|
|
369
428
|
// ------------------------------------------------------------------
|
|
429
|
+
_requireVaultUnlocked() {
|
|
430
|
+
if (this._inkbox._vaultResource._unlocked === null) {
|
|
431
|
+
throw new InkboxError("Vault must be unlocked before accessing credentials. Call inkbox.vault.unlock(vaultKey) first.");
|
|
432
|
+
}
|
|
433
|
+
}
|
|
370
434
|
_requireMailbox() {
|
|
371
435
|
if (!this._mailbox) {
|
|
372
|
-
throw new
|
|
436
|
+
throw new InkboxError(`Identity '${this.agentHandle}' has no mailbox assigned. Call identity.createMailbox() or identity.assignMailbox() first.`);
|
|
373
437
|
}
|
|
374
438
|
}
|
|
375
439
|
_requirePhone() {
|
|
376
440
|
if (!this._phoneNumber) {
|
|
377
|
-
throw new
|
|
441
|
+
throw new InkboxError(`Identity '${this.agentHandle}' has no phone number assigned. Call identity.provisionPhoneNumber() or identity.assignPhoneNumber() first.`);
|
|
378
442
|
}
|
|
379
443
|
}
|
|
380
444
|
_requireAuthenticatorApp() {
|
|
381
445
|
if (!this._authenticatorApp) {
|
|
382
|
-
throw new
|
|
446
|
+
throw new InkboxError(`Identity '${this.agentHandle}' has no authenticator app assigned. Call identity.createAuthenticatorApp() or identity.assignAuthenticatorApp() first.`);
|
|
383
447
|
}
|
|
384
448
|
}
|
|
385
449
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent_identity.js","sourceRoot":"","sources":["../src/agent_identity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"agent_identity.js","sourceRoot":"","sources":["../src/agent_identity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAkB,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAa/C,MAAM,OAAO,aAAa;IAChB,KAAK,CAAqB;IACjB,OAAO,CAAS;IACzB,QAAQ,CAAyB;IACjC,YAAY,CAA6B;IACzC,iBAAiB,CAAkC;IACnD,YAAY,GAAuB,IAAI,CAAC;IACxC,oBAAoB,GAAkB,IAAI,CAAC,CAAC,yCAAyC;IAE7F,YAAY,IAAwB,EAAE,MAAc;QAClD,IAAI,CAAC,KAAK,GAAgB,IAAI,CAAC;QAC/B,IAAI,CAAC,OAAO,GAAc,MAAM,CAAC;QACjC,IAAI,CAAC,QAAQ,GAAa,IAAI,CAAC,OAAO,CAAC;QACvC,IAAI,CAAC,YAAY,GAAS,IAAI,CAAC,WAAW,CAAC;QAC3C,IAAI,CAAC,iBAAiB,GAAI,IAAI,CAAC,gBAAgB,CAAC;IAClD,CAAC;IAED,qEAAqE;IACrE,sBAAsB;IACtB,qEAAqE;IAErE,IAAI,WAAW,KAAa,OAAO,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC;IAC5D,IAAI,EAAE,KAAuB,OAAO,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;IACpD,IAAI,MAAM,KAA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ACvB,MAAM,IAAI,WAAW,CACnB,aAAa,IAAI,CAAC,WAAW,6GAA6G,CAC3I,CAAC;QACJ,CAAC;IACH,CAAC;IAEO,wBAAwB;QAC9B,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC;YAC5B,MAAM,IAAI,WAAW,CACnB,aAAa,IAAI,CAAC,WAAW,yHAAyH,CACvJ,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
|
|
@@ -49,7 +49,7 @@ export declare class AuthenticatorAccountsResource {
|
|
|
49
49
|
description?: string | null;
|
|
50
50
|
}): Promise<AuthenticatorAccount>;
|
|
51
51
|
/**
|
|
52
|
-
*
|
|
52
|
+
* Delete an authenticator account.
|
|
53
53
|
*
|
|
54
54
|
* @param authenticatorAppId - UUID of the parent authenticator app.
|
|
55
55
|
* @param accountId - UUID of the authenticator account to delete.
|
|
@@ -65,7 +65,7 @@ export class AuthenticatorAccountsResource {
|
|
|
65
65
|
return parseAuthenticatorAccount(data);
|
|
66
66
|
}
|
|
67
67
|
/**
|
|
68
|
-
*
|
|
68
|
+
* Delete an authenticator account.
|
|
69
69
|
*
|
|
70
70
|
* @param authenticatorAppId - UUID of the parent authenticator app.
|
|
71
71
|
* @param accountId - UUID of the authenticator account to delete.
|
|
@@ -26,10 +26,10 @@ export declare class AuthenticatorAppsResource {
|
|
|
26
26
|
*/
|
|
27
27
|
get(authenticatorAppId: string): Promise<AuthenticatorApp>;
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* Delete an authenticator app.
|
|
30
30
|
*
|
|
31
31
|
* This also unlinks the app from its identity (if any) and
|
|
32
|
-
*
|
|
32
|
+
* deletes all child authenticator accounts.
|
|
33
33
|
*
|
|
34
34
|
* @param authenticatorAppId - UUID of the authenticator app to delete.
|
|
35
35
|
*/
|
|
@@ -38,10 +38,10 @@ export class AuthenticatorAppsResource {
|
|
|
38
38
|
return parseAuthenticatorApp(data);
|
|
39
39
|
}
|
|
40
40
|
/**
|
|
41
|
-
*
|
|
41
|
+
* Delete an authenticator app.
|
|
42
42
|
*
|
|
43
43
|
* This also unlinks the app from its identity (if any) and
|
|
44
|
-
*
|
|
44
|
+
* deletes all child authenticator accounts.
|
|
45
45
|
*
|
|
46
46
|
* @param authenticatorAppId - UUID of the authenticator app to delete.
|
|
47
47
|
*/
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* inkbox/src/credentials.ts
|
|
3
|
+
*
|
|
4
|
+
* Credentials — agent-facing credential access, typed and identity-scoped.
|
|
5
|
+
*
|
|
6
|
+
* This is the *runtime* surface for agents that need their credentials.
|
|
7
|
+
* The vault remains the *admin* surface for creating secrets, managing
|
|
8
|
+
* keys, and configuring access rules.
|
|
9
|
+
*/
|
|
10
|
+
import type { APIKeyPayload, DecryptedVaultSecret, KeyPairPayload, LoginPayload, SSHKeyPayload } from "./vault/types.js";
|
|
11
|
+
/**
|
|
12
|
+
* Agent-facing credential access — typed, identity-scoped.
|
|
13
|
+
*
|
|
14
|
+
* Wraps a pre-filtered list of {@link DecryptedVaultSecret} objects and
|
|
15
|
+
* provides typed accessors so agents can retrieve credentials without
|
|
16
|
+
* dealing with vault internals.
|
|
17
|
+
*
|
|
18
|
+
* Obtain via {@link AgentIdentity.getCredentials} after unlocking the vault:
|
|
19
|
+
*
|
|
20
|
+
* ```ts
|
|
21
|
+
* await inkbox.vault.unlock("my-Vault-key-01!");
|
|
22
|
+
* const identity = await inkbox.getIdentity("support-bot");
|
|
23
|
+
*
|
|
24
|
+
* const creds = await identity.getCredentials();
|
|
25
|
+
* const logins = creds.listLogins();
|
|
26
|
+
* const apiKey = creds.getApiKey("cccc3333-...");
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export declare class Credentials {
|
|
30
|
+
private readonly _secrets;
|
|
31
|
+
private readonly _byId;
|
|
32
|
+
constructor(secrets: DecryptedVaultSecret[]);
|
|
33
|
+
/** List all credentials this identity has access to. */
|
|
34
|
+
list(): DecryptedVaultSecret[];
|
|
35
|
+
/** List login credentials (username/password). */
|
|
36
|
+
listLogins(): DecryptedVaultSecret[];
|
|
37
|
+
/** List API key credentials. */
|
|
38
|
+
listApiKeys(): DecryptedVaultSecret[];
|
|
39
|
+
/** List key pair credentials (access key + secret key). */
|
|
40
|
+
listKeyPairs(): DecryptedVaultSecret[];
|
|
41
|
+
/** List SSH key credentials. */
|
|
42
|
+
listSshKeys(): DecryptedVaultSecret[];
|
|
43
|
+
/**
|
|
44
|
+
* Get any credential by UUID.
|
|
45
|
+
*
|
|
46
|
+
* @param secretId - UUID of the secret.
|
|
47
|
+
* @throws Error if no credential with this UUID is accessible.
|
|
48
|
+
*/
|
|
49
|
+
get(secretId: string): DecryptedVaultSecret;
|
|
50
|
+
/**
|
|
51
|
+
* Get a login credential's payload by UUID.
|
|
52
|
+
*
|
|
53
|
+
* @param secretId - UUID of the secret.
|
|
54
|
+
* @throws Error if not found.
|
|
55
|
+
* @throws TypeError if the credential is not a login type.
|
|
56
|
+
*/
|
|
57
|
+
getLogin(secretId: string): LoginPayload;
|
|
58
|
+
/**
|
|
59
|
+
* Get an API key credential's payload by UUID.
|
|
60
|
+
*
|
|
61
|
+
* @param secretId - UUID of the secret.
|
|
62
|
+
* @throws Error if not found.
|
|
63
|
+
* @throws TypeError if the credential is not an api_key type.
|
|
64
|
+
*/
|
|
65
|
+
getApiKey(secretId: string): APIKeyPayload;
|
|
66
|
+
/**
|
|
67
|
+
* Get a key pair credential's payload by UUID.
|
|
68
|
+
*
|
|
69
|
+
* @param secretId - UUID of the secret.
|
|
70
|
+
* @throws Error if not found.
|
|
71
|
+
* @throws TypeError if the credential is not a key_pair type.
|
|
72
|
+
*/
|
|
73
|
+
getKeyPair(secretId: string): KeyPairPayload;
|
|
74
|
+
/**
|
|
75
|
+
* Get an SSH key credential's payload by UUID.
|
|
76
|
+
*
|
|
77
|
+
* @param secretId - UUID of the secret.
|
|
78
|
+
* @throws Error if not found.
|
|
79
|
+
* @throws TypeError if the credential is not an ssh_key type.
|
|
80
|
+
*/
|
|
81
|
+
getSshKey(secretId: string): SSHKeyPayload;
|
|
82
|
+
private _getTyped;
|
|
83
|
+
/** Number of credentials accessible to this identity. */
|
|
84
|
+
get length(): number;
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=credentials.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,aAAa,EACb,oBAAoB,EACpB,cAAc,EACd,YAAY,EACZ,aAAa,EACd,MAAM,kBAAkB,CAAC;AAG1B;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAyB;IAClD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAoC;gBAE9C,OAAO,EAAE,oBAAoB,EAAE;IAS3C,wDAAwD;IACxD,IAAI,IAAI,oBAAoB,EAAE;IAI9B,kDAAkD;IAClD,UAAU,IAAI,oBAAoB,EAAE;IAIpC,gCAAgC;IAChC,WAAW,IAAI,oBAAoB,EAAE;IAIrC,2DAA2D;IAC3D,YAAY,IAAI,oBAAoB,EAAE;IAItC,gCAAgC;IAChC,WAAW,IAAI,oBAAoB,EAAE;IAQrC;;;;;OAKG;IACH,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,oBAAoB;IAU3C;;;;;;OAMG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,YAAY;IAIxC;;;;;;OAMG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,aAAa;IAI1C;;;;;;OAMG;IACH,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,cAAc;IAI5C;;;;;;OAMG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,aAAa;IAQ1C,OAAO,CAAC,SAAS;IAUjB,yDAAyD;IACzD,IAAI,MAAM,IAAI,MAAM,CAEnB;CACF"}
|