@cef-ai/vault-sdk 5.1.0 → 5.3.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 +2 -0
- package/dist/client.d.ts +45 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +57 -1
- package/dist/client.js.map +1 -1
- package/dist/core/auth-token.d.ts +27 -0
- package/dist/core/auth-token.d.ts.map +1 -0
- package/dist/core/auth-token.js +101 -0
- package/dist/core/auth-token.js.map +1 -0
- package/dist/core/delegation-tokens.d.ts +47 -0
- package/dist/core/delegation-tokens.d.ts.map +1 -0
- package/dist/core/delegation-tokens.js +113 -0
- package/dist/core/delegation-tokens.js.map +1 -0
- package/dist/core/endpoints.d.ts +7 -0
- package/dist/core/endpoints.d.ts.map +1 -1
- package/dist/core/endpoints.js +10 -0
- package/dist/core/endpoints.js.map +1 -1
- package/dist/core/errors.d.ts +55 -0
- package/dist/core/errors.d.ts.map +1 -1
- package/dist/core/errors.js +92 -0
- package/dist/core/errors.js.map +1 -1
- package/dist/core/types.d.ts +54 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/fluent/agent-connection.d.ts +3 -1
- package/dist/fluent/agent-connection.d.ts.map +1 -1
- package/dist/fluent/agent-connection.js +3 -0
- package/dist/fluent/agent-connection.js.map +1 -1
- package/dist/fluent/vault.d.ts +32 -0
- package/dist/fluent/vault.d.ts.map +1 -1
- package/dist/fluent/vault.js +29 -0
- package/dist/fluent/vault.js.map +1 -1
- package/dist/index.d.ts +9 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/internal/agents.d.ts +6 -0
- package/dist/internal/agents.d.ts.map +1 -1
- package/dist/internal/agents.js +6 -0
- package/dist/internal/agents.js.map +1 -1
- package/dist/internal/connectors.d.ts +161 -0
- package/dist/internal/connectors.d.ts.map +1 -0
- package/dist/internal/connectors.js +66 -0
- package/dist/internal/connectors.js.map +1 -0
- package/dist/internal/memberships.d.ts +90 -17
- package/dist/internal/memberships.d.ts.map +1 -1
- package/dist/internal/memberships.js +133 -29
- package/dist/internal/memberships.js.map +1 -1
- package/dist/internal/vaults.d.ts +8 -1
- package/dist/internal/vaults.d.ts.map +1 -1
- package/dist/internal/vaults.js +9 -0
- package/dist/internal/vaults.js.map +1 -1
- package/dist/internal-exports.d.ts +2 -1
- package/dist/internal-exports.d.ts.map +1 -1
- package/dist/internal-exports.js +1 -0
- package/dist/internal-exports.js.map +1 -1
- package/package.json +1 -1
package/dist/core/errors.d.ts
CHANGED
|
@@ -18,8 +18,63 @@ export declare class VaultRequestError extends Error {
|
|
|
18
18
|
export declare class VaultNotImplementedError extends VaultRequestError {
|
|
19
19
|
constructor(message?: string);
|
|
20
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* 409 `BUNDLE_CHANGED`: the connect named a `bundleCid`, and the agent's
|
|
23
|
+
* manifest now carries a different bundle (a publish landed after the person
|
|
24
|
+
* reviewed it). Nothing was stored. Show the person the new bundle and, if
|
|
25
|
+
* they accept, connect again naming it.
|
|
26
|
+
*
|
|
27
|
+
* `requestedCid` is the id the refused request named; `currentCid` the one
|
|
28
|
+
* the agent carries now. Both are read from the server's message and may be
|
|
29
|
+
* absent; re-read the manifest when `currentCid` is missing.
|
|
30
|
+
*/
|
|
31
|
+
export declare class BundleChangedError extends VaultRequestError {
|
|
32
|
+
readonly requestedCid?: string;
|
|
33
|
+
readonly currentCid?: string;
|
|
34
|
+
constructor(message: string, retryable?: boolean);
|
|
35
|
+
static readonly code = "BUNDLE_CHANGED";
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* 409 `RECONSENT_REQUIRED`: a reconnect would run a different bundle than
|
|
39
|
+
* the connection it replaces was pinned to, and the request named no
|
|
40
|
+
* `bundleCid`. Nothing was changed. Ask the person to consent to the new
|
|
41
|
+
* code, then connect again with its `bundleCid`.
|
|
42
|
+
*
|
|
43
|
+
* `previousCid` is the bundle the earlier connection was pinned to;
|
|
44
|
+
* `currentCid` the one the agent carries now. Both are read from the
|
|
45
|
+
* server's message and may be absent.
|
|
46
|
+
*/
|
|
47
|
+
export declare class ReconsentRequiredError extends VaultRequestError {
|
|
48
|
+
readonly previousCid?: string;
|
|
49
|
+
readonly currentCid?: string;
|
|
50
|
+
constructor(message: string, retryable?: boolean);
|
|
51
|
+
static readonly code = "RECONSENT_REQUIRED";
|
|
52
|
+
}
|
|
21
53
|
export declare class VaultSignerRequiredError extends Error {
|
|
22
54
|
constructor(message?: string);
|
|
23
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* A scope write could not be signed correctly because the privacy ceiling
|
|
58
|
+
* the member holds is not known to this client.
|
|
59
|
+
*
|
|
60
|
+
* `memberships.putScopes` reads the ceiling from the signed roster, which
|
|
61
|
+
* serves live memberships only. For a member it does not serve (suspended,
|
|
62
|
+
* or a row with no stored grant document) it signs the ceiling-less v1
|
|
63
|
+
* document. vault-api rebuilds the document from the ceiling it stores, so
|
|
64
|
+
* when that member does hold one, the signature covers the wrong bytes and
|
|
65
|
+
* the write is refused with a 400; nothing is written. This error is that
|
|
66
|
+
* refusal. Retry with `{ standing: { role, expiresAt, privacyCeiling } }`
|
|
67
|
+
* naming the ceiling the member holds.
|
|
68
|
+
*
|
|
69
|
+
* `status` and `code` are the server's own, so a caller already handling
|
|
70
|
+
* `VaultRequestError` keeps working.
|
|
71
|
+
*/
|
|
72
|
+
export declare class CeilingUnknownError extends VaultRequestError {
|
|
73
|
+
/** The member the write was for, in canonical `0x` + lowercase hex. */
|
|
74
|
+
readonly memberPubkey: string;
|
|
75
|
+
constructor(message: string,
|
|
76
|
+
/** The member the write was for, in canonical `0x` + lowercase hex. */
|
|
77
|
+
memberPubkey: string, status?: number, code?: string | number);
|
|
78
|
+
}
|
|
24
79
|
export declare function mapResponseError(status: number, body: unknown): VaultRequestError;
|
|
25
80
|
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/core/errors.ts"],"names":[],"mappings":"AACA,qBAAa,iBAAkB,SAAQ,KAAK;aAGxB,MAAM,CAAC,EAAE,MAAM;aACf,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM;IACtC;;;;OAIG;aACa,SAAS,CAAC,EAAE,OAAO;gBARnC,OAAO,EAAE,MAAM,EACC,MAAM,CAAC,EAAE,MAAM,YAAA,EACf,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,YAAA;IACtC;;;;OAIG;IACa,SAAS,CAAC,EAAE,OAAO,YAAA;CAKtC;AAED,qBAAa,wBAAyB,SAAQ,iBAAiB;gBACjD,OAAO,SAAmC;CAIvD;AAED,qBAAa,wBAAyB,SAAQ,KAAK;gBAE/C,OAAO,SAAiE;CAK3E;AAUD,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,OAAO,GACZ,iBAAiB,
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/core/errors.ts"],"names":[],"mappings":"AACA,qBAAa,iBAAkB,SAAQ,KAAK;aAGxB,MAAM,CAAC,EAAE,MAAM;aACf,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM;IACtC;;;;OAIG;aACa,SAAS,CAAC,EAAE,OAAO;gBARnC,OAAO,EAAE,MAAM,EACC,MAAM,CAAC,EAAE,MAAM,YAAA,EACf,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,YAAA;IACtC;;;;OAIG;IACa,SAAS,CAAC,EAAE,OAAO,YAAA;CAKtC;AAED,qBAAa,wBAAyB,SAAQ,iBAAiB;gBACjD,OAAO,SAAmC;CAIvD;AAmBD;;;;;;;;;GASG;AACH,qBAAa,kBAAmB,SAAQ,iBAAiB;IACvD,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;gBACjB,OAAO,EAAE,MAAM,EAAE,SAAS,UAAQ;IAO9C,MAAM,CAAC,QAAQ,CAAC,IAAI,oBAAoB;CACzC;AAED;;;;;;;;;GASG;AACH,qBAAa,sBAAuB,SAAQ,iBAAiB;IAC3D,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;gBACjB,OAAO,EAAE,MAAM,EAAE,SAAS,UAAQ;IAO9C,MAAM,CAAC,QAAQ,CAAC,IAAI,wBAAwB;CAC7C;AAED,qBAAa,wBAAyB,SAAQ,KAAK;gBAE/C,OAAO,SAAiE;CAK3E;AAED;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,mBAAoB,SAAQ,iBAAiB;IAGtD,uEAAuE;IACvE,QAAQ,CAAC,YAAY,EAAE,MAAM;gBAF7B,OAAO,EAAE,MAAM;IACf,uEAAuE;IAC9D,YAAY,EAAE,MAAM,EAC7B,MAAM,CAAC,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM;CAKzB;AAUD,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,OAAO,GACZ,iBAAiB,CAkBnB"}
|
package/dist/core/errors.js
CHANGED
|
@@ -23,12 +23,98 @@ export class VaultNotImplementedError extends VaultRequestError {
|
|
|
23
23
|
this.name = "VaultNotImplementedError";
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* Pull the content ids out of a bundle-refusal message. vault-api's 409 body
|
|
28
|
+
* carries only a code and a message, and the message names the ids as quoted
|
|
29
|
+
* strings: `requested "<cid>"` for the bundle the caller named, or
|
|
30
|
+
* `last consented "<cid>"` for the one the earlier connection was pinned to, and `now carries "<cid>"` for the one the
|
|
31
|
+
* agent's manifest carries now. Either can be absent if the wording changes,
|
|
32
|
+
* so callers must treat both as optional and fall back to their own copy.
|
|
33
|
+
*/
|
|
34
|
+
function bundleCidsFromMessage(message) {
|
|
35
|
+
const prior = /(?:requested|last consented) "([^"]+)"/.exec(message)?.[1];
|
|
36
|
+
const current = /now carries "([^"]+)"/.exec(message)?.[1];
|
|
37
|
+
return {
|
|
38
|
+
...(prior !== undefined ? { priorCid: prior } : {}),
|
|
39
|
+
...(current !== undefined ? { currentCid: current } : {}),
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* 409 `BUNDLE_CHANGED`: the connect named a `bundleCid`, and the agent's
|
|
44
|
+
* manifest now carries a different bundle (a publish landed after the person
|
|
45
|
+
* reviewed it). Nothing was stored. Show the person the new bundle and, if
|
|
46
|
+
* they accept, connect again naming it.
|
|
47
|
+
*
|
|
48
|
+
* `requestedCid` is the id the refused request named; `currentCid` the one
|
|
49
|
+
* the agent carries now. Both are read from the server's message and may be
|
|
50
|
+
* absent; re-read the manifest when `currentCid` is missing.
|
|
51
|
+
*/
|
|
52
|
+
export class BundleChangedError extends VaultRequestError {
|
|
53
|
+
requestedCid;
|
|
54
|
+
currentCid;
|
|
55
|
+
constructor(message, retryable = false) {
|
|
56
|
+
super(message, 409, BundleChangedError.code, retryable);
|
|
57
|
+
this.name = "BundleChangedError";
|
|
58
|
+
const { priorCid, currentCid } = bundleCidsFromMessage(message);
|
|
59
|
+
this.requestedCid = priorCid;
|
|
60
|
+
this.currentCid = currentCid;
|
|
61
|
+
}
|
|
62
|
+
static code = "BUNDLE_CHANGED";
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* 409 `RECONSENT_REQUIRED`: a reconnect would run a different bundle than
|
|
66
|
+
* the connection it replaces was pinned to, and the request named no
|
|
67
|
+
* `bundleCid`. Nothing was changed. Ask the person to consent to the new
|
|
68
|
+
* code, then connect again with its `bundleCid`.
|
|
69
|
+
*
|
|
70
|
+
* `previousCid` is the bundle the earlier connection was pinned to;
|
|
71
|
+
* `currentCid` the one the agent carries now. Both are read from the
|
|
72
|
+
* server's message and may be absent.
|
|
73
|
+
*/
|
|
74
|
+
export class ReconsentRequiredError extends VaultRequestError {
|
|
75
|
+
previousCid;
|
|
76
|
+
currentCid;
|
|
77
|
+
constructor(message, retryable = false) {
|
|
78
|
+
super(message, 409, ReconsentRequiredError.code, retryable);
|
|
79
|
+
this.name = "ReconsentRequiredError";
|
|
80
|
+
const { priorCid, currentCid } = bundleCidsFromMessage(message);
|
|
81
|
+
this.previousCid = priorCid;
|
|
82
|
+
this.currentCid = currentCid;
|
|
83
|
+
}
|
|
84
|
+
static code = "RECONSENT_REQUIRED";
|
|
85
|
+
}
|
|
26
86
|
export class VaultSignerRequiredError extends Error {
|
|
27
87
|
constructor(message = "Vault signing requires a signer that implements sign(bytes).") {
|
|
28
88
|
super(message);
|
|
29
89
|
this.name = "VaultSignerRequiredError";
|
|
30
90
|
}
|
|
31
91
|
}
|
|
92
|
+
/**
|
|
93
|
+
* A scope write could not be signed correctly because the privacy ceiling
|
|
94
|
+
* the member holds is not known to this client.
|
|
95
|
+
*
|
|
96
|
+
* `memberships.putScopes` reads the ceiling from the signed roster, which
|
|
97
|
+
* serves live memberships only. For a member it does not serve (suspended,
|
|
98
|
+
* or a row with no stored grant document) it signs the ceiling-less v1
|
|
99
|
+
* document. vault-api rebuilds the document from the ceiling it stores, so
|
|
100
|
+
* when that member does hold one, the signature covers the wrong bytes and
|
|
101
|
+
* the write is refused with a 400; nothing is written. This error is that
|
|
102
|
+
* refusal. Retry with `{ standing: { role, expiresAt, privacyCeiling } }`
|
|
103
|
+
* naming the ceiling the member holds.
|
|
104
|
+
*
|
|
105
|
+
* `status` and `code` are the server's own, so a caller already handling
|
|
106
|
+
* `VaultRequestError` keeps working.
|
|
107
|
+
*/
|
|
108
|
+
export class CeilingUnknownError extends VaultRequestError {
|
|
109
|
+
memberPubkey;
|
|
110
|
+
constructor(message,
|
|
111
|
+
/** The member the write was for, in canonical `0x` + lowercase hex. */
|
|
112
|
+
memberPubkey, status, code) {
|
|
113
|
+
super(message, status, code, false);
|
|
114
|
+
this.memberPubkey = memberPubkey;
|
|
115
|
+
this.name = "CeilingUnknownError";
|
|
116
|
+
}
|
|
117
|
+
}
|
|
32
118
|
export function mapResponseError(status, body) {
|
|
33
119
|
const parsed = body && typeof body === "object" ? body : undefined;
|
|
34
120
|
const message = parsed?.error?.message ?? `Request failed with status ${status}`;
|
|
@@ -39,6 +125,12 @@ export function mapResponseError(status, body) {
|
|
|
39
125
|
const retryable = parsed?.error?.retryable === true;
|
|
40
126
|
if (status === 501)
|
|
41
127
|
return new VaultNotImplementedError(message);
|
|
128
|
+
if (status === 409 && code === BundleChangedError.code) {
|
|
129
|
+
return new BundleChangedError(message, retryable);
|
|
130
|
+
}
|
|
131
|
+
if (status === 409 && code === ReconsentRequiredError.code) {
|
|
132
|
+
return new ReconsentRequiredError(message, retryable);
|
|
133
|
+
}
|
|
42
134
|
return new VaultRequestError(message, status, code, retryable);
|
|
43
135
|
}
|
|
44
136
|
//# sourceMappingURL=errors.js.map
|
package/dist/core/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/core/errors.ts"],"names":[],"mappings":"AAAA,qBAAqB;AACrB,MAAM,OAAO,iBAAkB,SAAQ,KAAK;IAGxB;IACA;IAMA;IATlB,YACE,OAAe,EACC,MAAe,EACf,IAAsB;IACtC;;;;OAIG;IACa,SAAmB;QAEnC,KAAK,CAAC,OAAO,CAAC,CAAC;QATC,WAAM,GAAN,MAAM,CAAS;QACf,SAAI,GAAJ,IAAI,CAAkB;QAMtB,cAAS,GAAT,SAAS,CAAU;QAGnC,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;IAClC,CAAC;CACF;AAED,MAAM,OAAO,wBAAyB,SAAQ,iBAAiB;IAC7D,YAAY,OAAO,GAAG,gCAAgC;QACpD,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE,iBAAiB,CAAC,CAAC;QACvC,IAAI,CAAC,IAAI,GAAG,0BAA0B,CAAC;IACzC,CAAC;CACF;AAED,MAAM,O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0E;IAC1E,sDAAsD;IACtD,MAAM,SAAS,GAAG,MAAM,EAAE,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;IACpD,IAAI,MAAM,KAAK,GAAG;QAAE,OAAO,IAAI,wBAAwB,CAAC,OAAO,CAAC,CAAC;IACjE,IAAI,MAAM,KAAK,GAAG,IAAI,IAAI,KAAK,kBAAkB,CAAC,IAAI,EAAE,CAAC;QACvD,OAAO,IAAI,kBAAkB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IACpD,CAAC;IACD,IAAI,MAAM,KAAK,GAAG,IAAI,IAAI,KAAK,sBAAsB,CAAC,IAAI,EAAE,CAAC;QAC3D,OAAO,IAAI,sBAAsB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IACxD,CAAC;IACD,OAAO,IAAI,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;AACjE,CAAC"}
|
package/dist/core/types.d.ts
CHANGED
|
@@ -22,6 +22,33 @@ export interface VaultRecord {
|
|
|
22
22
|
* org entity to carry one (D1).
|
|
23
23
|
*/
|
|
24
24
|
displayName?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Chain id of the organization's public registry bucket — where vault-api
|
|
27
|
+
* publishes this vault's agent versions — as a decimal string (chain ids
|
|
28
|
+
* are uint64; a JSON number loses precision above 2^53). Recorded by the
|
|
29
|
+
* delegation ceremony (`sdk.vault.delegations`). Absent when no registry
|
|
30
|
+
* bucket is recorded.
|
|
31
|
+
*/
|
|
32
|
+
registryBucketId?: string;
|
|
33
|
+
}
|
|
34
|
+
/** Body of `PUT /api/v1/vaults/:vaultId/delegations`, less the signing timestamp. */
|
|
35
|
+
export interface PutDelegationsRequest {
|
|
36
|
+
/** base58 AuthToken naming the vault's own private bucket. */
|
|
37
|
+
vaultDelegationToken: string;
|
|
38
|
+
/** base58 AuthToken naming the organization's public registry bucket. */
|
|
39
|
+
registryDelegationToken: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* vault-api's answer to a completed ceremony: the vault row, plus the bucket
|
|
43
|
+
* ids and expiry read out of the two tokens it verified.
|
|
44
|
+
*/
|
|
45
|
+
export interface PutDelegationsResponse extends VaultRecord {
|
|
46
|
+
/** The bucket the vault token names (decimal string). Reported, not stored on the vault row. */
|
|
47
|
+
vaultBucketId: string;
|
|
48
|
+
/** The bucket the registry token names (decimal string), now recorded as the vault's registry bucket. */
|
|
49
|
+
registryBucketId: string;
|
|
50
|
+
/** RFC 3339: the EARLIER of the two tokens' expiries — when the ceremony must be run again. */
|
|
51
|
+
delegationsExpireAt: string;
|
|
25
52
|
}
|
|
26
53
|
export interface Scope {
|
|
27
54
|
name: string;
|
|
@@ -53,6 +80,17 @@ export interface ConnectionCeiling {
|
|
|
53
80
|
/** Ceiling on agent-SELF-REPORTED A2A tokens (integer). Absent or 0 = no ceiling. */
|
|
54
81
|
a2aTokens?: number;
|
|
55
82
|
}
|
|
83
|
+
/**
|
|
84
|
+
* The agent code a connection consented to run: the `bundle` of the manifest
|
|
85
|
+
* vault-api validated at connect time. Dispatch runs exactly this bundle; a
|
|
86
|
+
* later re-publish of the agent does not change it. vault-api omits it for a
|
|
87
|
+
* connection made before pins existed and for external agents, which have no
|
|
88
|
+
* bundle.
|
|
89
|
+
*/
|
|
90
|
+
export interface BundlePin {
|
|
91
|
+
bucketId: string;
|
|
92
|
+
cid: string;
|
|
93
|
+
}
|
|
56
94
|
export interface AgentConnection {
|
|
57
95
|
vaultId: string;
|
|
58
96
|
agentId: string;
|
|
@@ -75,6 +113,11 @@ export interface AgentConnection {
|
|
|
75
113
|
* vault-api) = no ceiling on either axis. See {@link ConnectionCeiling}.
|
|
76
114
|
*/
|
|
77
115
|
ceiling?: ConnectionCeiling;
|
|
116
|
+
/**
|
|
117
|
+
* The bundle this connection is pinned to run. Absent for a connection that
|
|
118
|
+
* predates pinning and for external agents. See {@link BundlePin}.
|
|
119
|
+
*/
|
|
120
|
+
bundle?: BundlePin;
|
|
78
121
|
createdAt: string;
|
|
79
122
|
updatedAt: string;
|
|
80
123
|
}
|
|
@@ -259,6 +302,17 @@ export type ConnectAgentRequest = ScopeSelector & {
|
|
|
259
302
|
* as `0`). Omitted from the body entirely when `undefined`.
|
|
260
303
|
*/
|
|
261
304
|
ceiling?: ConnectionCeiling;
|
|
305
|
+
/**
|
|
306
|
+
* Content id of the agent bundle the person is consenting to run — the
|
|
307
|
+
* `bundle.cid` of the manifest shown to them. When present, vault-api
|
|
308
|
+
* refuses the connect with {@link BundleChangedError} if the agent's
|
|
309
|
+
* manifest now carries a different bundle, so a publish that lands between
|
|
310
|
+
* review and connect is never silently accepted. Required when
|
|
311
|
+
* reconnecting to a bundle other than the one previously pinned
|
|
312
|
+
* ({@link ReconsentRequiredError} otherwise). Omitted from the body when
|
|
313
|
+
* `undefined`.
|
|
314
|
+
*/
|
|
315
|
+
bundleCid?: string;
|
|
262
316
|
};
|
|
263
317
|
/**
|
|
264
318
|
* ADR-002 object storage (company-memory-bank
|
package/dist/core/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/core/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,SAAS,CAAC;AAEjD,MAAM,MAAM,qBAAqB,GAAG,QAAQ,GAAG,YAAY,GAAG,cAAc,CAAC;AAE7E,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,mBAAmB,EAAE,MAAM,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,0FAA0F;IAC1F,MAAM,CAAC,EAAE,qBAAqB,CAAC;IAC/B,2EAA2E;IAC3E,cA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AAM,CAAC;CACb;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,WAAW,EAAE,CAAC;CACvB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { VaultHttpClient } from "../core/http.js";
|
|
2
2
|
import { type ListJobsOptions } from "../internal/browse.js";
|
|
3
|
-
import type { AgentConnection, AgentConnectionStatus, ConnectionCeiling, JobsPage } from "../core/types.js";
|
|
3
|
+
import type { AgentConnection, AgentConnectionStatus, BundlePin, ConnectionCeiling, JobsPage } from "../core/types.js";
|
|
4
4
|
import { CubbyHandle } from "./cubby.js";
|
|
5
5
|
export declare class AgentConnectionHandle implements AgentConnection {
|
|
6
6
|
private readonly http;
|
|
@@ -22,6 +22,8 @@ export declare class AgentConnectionHandle implements AgentConnection {
|
|
|
22
22
|
readonly manifest?: unknown;
|
|
23
23
|
/** Spend ceiling; absent = no ceiling on either axis. See {@link ConnectionCeiling}. */
|
|
24
24
|
readonly ceiling?: ConnectionCeiling;
|
|
25
|
+
/** The bundle this connection is pinned to run; absent when unpinned. See {@link BundlePin}. */
|
|
26
|
+
readonly bundle?: BundlePin;
|
|
25
27
|
readonly createdAt: string;
|
|
26
28
|
readonly updatedAt: string;
|
|
27
29
|
private readonly api;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-connection.d.ts","sourceRoot":"","sources":["../../src/fluent/agent-connection.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEvD,OAAO,EAAU,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,KAAK,EAAE,eAAe,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"agent-connection.d.ts","sourceRoot":"","sources":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AE,eAAe;IAmBzB,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW;IAS3B,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAK/E;;;;OAIG;IACG,UAAU,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAK5E,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3B,IAAI;mBACQ,eAAe,KAAQ,OAAO,CAAC,QAAQ,CAAC;MAElD;CACH"}
|
|
@@ -21,6 +21,8 @@ export class AgentConnectionHandle {
|
|
|
21
21
|
manifest;
|
|
22
22
|
/** Spend ceiling; absent = no ceiling on either axis. See {@link ConnectionCeiling}. */
|
|
23
23
|
ceiling;
|
|
24
|
+
/** The bundle this connection is pinned to run; absent when unpinned. See {@link BundlePin}. */
|
|
25
|
+
bundle;
|
|
24
26
|
createdAt;
|
|
25
27
|
updatedAt;
|
|
26
28
|
api;
|
|
@@ -38,6 +40,7 @@ export class AgentConnectionHandle {
|
|
|
38
40
|
this.status = record.status;
|
|
39
41
|
this.manifest = record.manifest;
|
|
40
42
|
this.ceiling = record.ceiling;
|
|
43
|
+
this.bundle = record.bundle;
|
|
41
44
|
this.createdAt = record.createdAt;
|
|
42
45
|
this.updatedAt = record.updatedAt;
|
|
43
46
|
this.api = new Agents(http);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-connection.js","sourceRoot":"","sources":["../../src/fluent/agent-connection.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAwB,MAAM,uBAAuB,CAAC;AAErE,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,MAAM,OAAO,qBAAqB;
|
|
1
|
+
{"version":3,"file":"agent-connection.js","sourceRoot":"","sources":["../../src/fluent/agent-connection.ts"],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C,WAAW,EAAE,OAAO,CAAC,CAAC;IACzE,CAAC;IAED,UAAU;QACR,OAAO,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IAC7D,CAAC;IAED,IAAI,GAAG;QACL,IAAI,EAAE,CAAC,IAAqB,EAAE,EAAqB,EAAE,CACnD,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;KAC/D,CAAC;CACH"}
|
package/dist/fluent/vault.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { VaultHttpClient } from "../core/http.js";
|
|
2
2
|
import { type CreateScopeRequest, type UpdateScopeRequest } from "../internal/scopes.js";
|
|
3
3
|
import { Memory } from "../internal/memory.js";
|
|
4
|
+
import { Connections, type AgentAccess, type ConnectorDescriptor, type SetAgentAccessRequest } from "../internal/connectors.js";
|
|
4
5
|
import type { ConnectionCeiling, JobsPage, Scope, ScopeSelector, VaultCredentialStatus, VaultRecord } from "../core/types.js";
|
|
5
6
|
import { ScopeHandle } from "./scope.js";
|
|
6
7
|
import { ServiceHandle } from "./service.js";
|
|
@@ -43,6 +44,15 @@ export type ConnectAgentInput = ScopeSelector & {
|
|
|
43
44
|
* ceremony.
|
|
44
45
|
*/
|
|
45
46
|
ceiling?: ConnectionCeiling;
|
|
47
|
+
/**
|
|
48
|
+
* Content id of the agent bundle the person is consenting to run — the
|
|
49
|
+
* `bundle.cid` of the manifest shown to them. Sent in the signed connect
|
|
50
|
+
* body. When the agent's manifest now carries a different bundle the
|
|
51
|
+
* connect rejects with `BundleChangedError`; a reconnect to changed code
|
|
52
|
+
* without it rejects with `ReconsentRequiredError`. See
|
|
53
|
+
* `ConnectAgentRequest.bundleCid`.
|
|
54
|
+
*/
|
|
55
|
+
bundleCid?: string;
|
|
46
56
|
};
|
|
47
57
|
export declare class Vault {
|
|
48
58
|
readonly id: string;
|
|
@@ -58,6 +68,11 @@ export declare class Vault {
|
|
|
58
68
|
* before the field existed.
|
|
59
69
|
*/
|
|
60
70
|
readonly displayName?: string;
|
|
71
|
+
/**
|
|
72
|
+
* Chain id of the organization's public registry bucket (decimal string),
|
|
73
|
+
* recorded by the delegation ceremony. Absent when none is recorded.
|
|
74
|
+
*/
|
|
75
|
+
readonly registryBucketId?: string;
|
|
61
76
|
/** @internal — exposed so subhandles can construct their own internals. */
|
|
62
77
|
readonly _http: VaultHttpClient;
|
|
63
78
|
private readonly _scopes;
|
|
@@ -69,6 +84,13 @@ export declare class Vault {
|
|
|
69
84
|
* agent-side (`ctx.memory` in `@cef-ai/agent-sdk`).
|
|
70
85
|
*/
|
|
71
86
|
readonly memory: Memory;
|
|
87
|
+
/**
|
|
88
|
+
* This vault's connections: configured accounts of a connector (Slack,
|
|
89
|
+
* email, Telegram). Secrets go in on `create`/`update` and never come back
|
|
90
|
+
* out. An agent's access to one is under `vault.agents`.
|
|
91
|
+
*/
|
|
92
|
+
readonly connections: Connections;
|
|
93
|
+
private readonly _access;
|
|
72
94
|
private readonly _gar?;
|
|
73
95
|
private readonly _signer?;
|
|
74
96
|
private readonly _userPubKey;
|
|
@@ -95,6 +117,8 @@ export declare class Vault {
|
|
|
95
117
|
* `ctx.cubby` and cannot name another.
|
|
96
118
|
*/
|
|
97
119
|
service(asPubKey: string): ServiceHandle;
|
|
120
|
+
/** The connectors vault-api supports (Slack, email, Telegram): the public catalogue. */
|
|
121
|
+
connectors(): Promise<ConnectorDescriptor[]>;
|
|
98
122
|
/** True when vault-api reports its S3 credential can no longer be refreshed. */
|
|
99
123
|
isDisconnected(): boolean;
|
|
100
124
|
agents: {
|
|
@@ -130,6 +154,14 @@ export declare class Vault {
|
|
|
130
154
|
connect: (input: ConnectAgentInput) => Promise<AgentConnectionHandle>;
|
|
131
155
|
list: () => Promise<AgentConnectionHandle[]>;
|
|
132
156
|
get: (a: string) => Promise<AgentConnectionHandle>;
|
|
157
|
+
/** The agent's access to this vault's connections. */
|
|
158
|
+
connections: (agentId: string) => Promise<AgentAccess[]>;
|
|
159
|
+
/**
|
|
160
|
+
* Sets what the agent may do with a connection, in the agent connection's
|
|
161
|
+
* own scope. Both lists empty deletes the access and resolves `undefined`.
|
|
162
|
+
*/
|
|
163
|
+
setConnection: (agentId: string, connectionId: string, body: SetAgentAccessRequest) => Promise<AgentAccess | undefined>;
|
|
164
|
+
removeConnection: (agentId: string, connectionId: string) => Promise<void>;
|
|
133
165
|
};
|
|
134
166
|
jobs: {
|
|
135
167
|
list: (o?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vault.d.ts","sourceRoot":"","sources":["../../src/fluent/vault.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACxB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,KAAK,EAEV,iBAAiB,EACjB,QAAQ,EACR,KAAK,EACL,aAAa,EACb,qBAAqB,EACrB,WAAW,EACZ,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAI7D,MAAM,WAAW,SAAS;IACxB,uEAAuE;IACvE,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,yDAAyD;IACzD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;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S;MAE/B;CACH"}
|
package/dist/fluent/vault.js
CHANGED
|
@@ -2,6 +2,7 @@ import { Scopes, } from "../internal/scopes.js";
|
|
|
2
2
|
import { Agents, validateCeiling } from "../internal/agents.js";
|
|
3
3
|
import { Browse } from "../internal/browse.js";
|
|
4
4
|
import { Memory } from "../internal/memory.js";
|
|
5
|
+
import { AgentConnectionAccess, Connections, listConnectors, } from "../internal/connectors.js";
|
|
5
6
|
import { resolveConnectScopes } from "../core/connect-scopes.js";
|
|
6
7
|
import { ScopeHandle } from "./scope.js";
|
|
7
8
|
import { ServiceHandle } from "./service.js";
|
|
@@ -23,6 +24,11 @@ export class Vault {
|
|
|
23
24
|
* before the field existed.
|
|
24
25
|
*/
|
|
25
26
|
displayName;
|
|
27
|
+
/**
|
|
28
|
+
* Chain id of the organization's public registry bucket (decimal string),
|
|
29
|
+
* recorded by the delegation ceremony. Absent when none is recorded.
|
|
30
|
+
*/
|
|
31
|
+
registryBucketId;
|
|
26
32
|
/** @internal — exposed so subhandles can construct their own internals. */
|
|
27
33
|
_http;
|
|
28
34
|
_scopes;
|
|
@@ -34,6 +40,13 @@ export class Vault {
|
|
|
34
40
|
* agent-side (`ctx.memory` in `@cef-ai/agent-sdk`).
|
|
35
41
|
*/
|
|
36
42
|
memory;
|
|
43
|
+
/**
|
|
44
|
+
* This vault's connections: configured accounts of a connector (Slack,
|
|
45
|
+
* email, Telegram). Secrets go in on `create`/`update` and never come back
|
|
46
|
+
* out. An agent's access to one is under `vault.agents`.
|
|
47
|
+
*/
|
|
48
|
+
connections;
|
|
49
|
+
_access;
|
|
37
50
|
_gar;
|
|
38
51
|
_signer;
|
|
39
52
|
_userPubKey;
|
|
@@ -46,11 +59,14 @@ export class Vault {
|
|
|
46
59
|
this.status = record.status;
|
|
47
60
|
this.disconnectedAt = record.disconnectedAt;
|
|
48
61
|
this.displayName = record.displayName;
|
|
62
|
+
this.registryBucketId = record.registryBucketId;
|
|
49
63
|
this._http = http;
|
|
50
64
|
this._scopes = new Scopes(http);
|
|
51
65
|
this._agents = new Agents(http);
|
|
52
66
|
this._browse = new Browse(http);
|
|
53
67
|
this.memory = new Memory(this._http, this.id);
|
|
68
|
+
this.connections = new Connections(this._http, this.id);
|
|
69
|
+
this._access = new AgentConnectionAccess(this._http, this.id);
|
|
54
70
|
this._gar = deps.gar;
|
|
55
71
|
this._signer = deps.signer;
|
|
56
72
|
// Prefer the live signer pubkey (the user's actual key) over whatever the
|
|
@@ -86,6 +102,10 @@ export class Vault {
|
|
|
86
102
|
service(asPubKey) {
|
|
87
103
|
return new ServiceHandle(this._http, this.id, asPubKey);
|
|
88
104
|
}
|
|
105
|
+
/** The connectors vault-api supports (Slack, email, Telegram): the public catalogue. */
|
|
106
|
+
connectors() {
|
|
107
|
+
return listConnectors(this._http);
|
|
108
|
+
}
|
|
89
109
|
/** True when vault-api reports its S3 credential can no longer be refreshed. */
|
|
90
110
|
isDisconnected() { return this.status === "disconnected"; }
|
|
91
111
|
agents = {
|
|
@@ -164,6 +184,7 @@ export class Vault {
|
|
|
164
184
|
settings: input.settings ?? {},
|
|
165
185
|
agreementSignature,
|
|
166
186
|
...(input.ceiling !== undefined ? { ceiling: input.ceiling } : {}),
|
|
187
|
+
...(input.bundleCid !== undefined ? { bundleCid: input.bundleCid } : {}),
|
|
167
188
|
};
|
|
168
189
|
const conn = await this._agents.connect(this.id, req);
|
|
169
190
|
return new AgentConnectionHandle(this._http, this.id, conn);
|
|
@@ -176,6 +197,14 @@ export class Vault {
|
|
|
176
197
|
const conn = await this._agents.get(this.id, a);
|
|
177
198
|
return new AgentConnectionHandle(this._http, this.id, conn);
|
|
178
199
|
},
|
|
200
|
+
/** The agent's access to this vault's connections. */
|
|
201
|
+
connections: (agentId) => this._access.list(agentId),
|
|
202
|
+
/**
|
|
203
|
+
* Sets what the agent may do with a connection, in the agent connection's
|
|
204
|
+
* own scope. Both lists empty deletes the access and resolves `undefined`.
|
|
205
|
+
*/
|
|
206
|
+
setConnection: (agentId, connectionId, body) => this._access.set(agentId, connectionId, body),
|
|
207
|
+
removeConnection: (agentId, connectionId) => this._access.remove(agentId, connectionId),
|
|
179
208
|
};
|
|
180
209
|
jobs = {
|
|
181
210
|
list: (o = {}) => this._browse.listJobs(this.id, o),
|
package/dist/fluent/vault.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vault.js","sourceRoot":"","sources":["../../src/fluent/vault.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,MAAM,GAGP,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"vault.js","sourceRoot":"","sources":["../../src/fluent/vault.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,MAAM,GAGP,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EACL,qBAAqB,EACrB,WAAW,EACX,cAAc,GAIf,MAAM,2BAA2B,CAAC;AAUnC,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAGrC,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,sBAAsB,CA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,CACzE,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,YAAY,CAAC;KAC7C,CAAC;IAEF,IAAI,GAAG;QACL,IAAI,EAAE,CACJ,IAAyD,EAAE,EACxC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;QACzD,GAAG,EAAE,CAAC,KAAa,EAAa,EAAE,CAChC,IAAI,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC;KAC5C,CAAC;CACH"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
export { VaultSDK } from "./client.js";
|
|
2
|
-
export type { VaultSDKConfig, EnsureVaultOptions, EnsureProgressEvent, } from "./client.js";
|
|
2
|
+
export type { VaultSDKConfig, EnsureVaultOptions, EnsureProgressEvent, VaultDelegationsResult, } from "./client.js";
|
|
3
|
+
export { mintDelegationTokens, MAX_DELEGATION_TTL_MS, DEFAULT_DELEGATION_TTL_MS, VAULT_DELEGATION_OPERATIONS, REGISTRY_DELEGATION_OPERATIONS, } from "./core/delegation-tokens.js";
|
|
4
|
+
export type { MintDelegationTokensInput, DelegationTokens } from "./core/delegation-tokens.js";
|
|
5
|
+
export { AUTH_TOKEN_OPERATION } from "./core/auth-token.js";
|
|
6
|
+
export type { AuthTokenOperation } from "./core/auth-token.js";
|
|
3
7
|
export { OnboardingRequiredError, OnboardingTimeoutError, } from "./internal/onboarding.js";
|
|
4
8
|
export type { OnboardingStatus, OnboardingResult, BootstrapResult, } from "./internal/onboarding.js";
|
|
5
9
|
export { Vault } from "./fluent/vault.js";
|
|
@@ -19,13 +23,14 @@ export { DelegationAuthProvider } from "./auth/delegation.js";
|
|
|
19
23
|
export type { AgentManifest, AgentCard, MarketplaceAgentCardResponse, MarketplaceAgentSummary, } from "./internal/marketplace.js";
|
|
20
24
|
export type { HealthResponse } from "./internal/health.js";
|
|
21
25
|
export type { MemoryRows } from "./internal/memory.js";
|
|
26
|
+
export type { AgentAccess, Connection, ConnectionOwner, ConnectorAction, ConnectorCredentialKind, ConnectorDescriptor, ConnectorEvent, ConnectorField, CreateConnectionRequest, SetAgentAccessRequest, UpdateConnectionRequest, } from "./internal/connectors.js";
|
|
22
27
|
export { GarClient, signAndSubmitAgreement, getAsPubkey, } from "./agreements/index.js";
|
|
23
28
|
export type { SignedAgreementEnvelope, SignAndSubmitAgreementOptions, SignAndSubmitAgreementResult, } from "./agreements/index.js";
|
|
24
|
-
export { VaultRequestError, VaultNotImplementedError, VaultSignerRequiredError, } from "./core/errors.js";
|
|
29
|
+
export { VaultRequestError, VaultNotImplementedError, VaultSignerRequiredError, BundleChangedError, ReconsentRequiredError, CeilingUnknownError, } from "./core/errors.js";
|
|
25
30
|
export { GRANT_ISSUED_AT_HEADER, GRANT_SCHEMA, GRANT_SCHEMA_V2, GRANT_SIGNATURE_HEADER, GrantVerificationError, NO_GRANT_EXPIRY, NO_PRIVACY_CEILING, PRIVACY_CEILINGS, canonicalGrantBytes, canonicalGrantBytesWithCeiling, canonicalPubkeyHex, decodeGrantDoc, grantExpiry, isValidPrivacyCeiling, privacyCeiling, vaultIdFor, verifyGrant, verifyGrantSig, verifySignedRoster, } from "./core/grant-doc.js";
|
|
26
31
|
export type { Grant, GrantExpiry, PrivacyCeiling, PrivacyCeilingName, RosterVerifyOptions } from "./core/grant-doc.js";
|
|
27
|
-
export type { PutMemberOptions, PutScopesOptions } from "./internal/memberships.js";
|
|
28
|
-
export type { Task, TasksPage, TaskState, AgentConnection, AgentConnectionStatus, ConnectAgentRequest, ConnectionCeiling, CubbyQueryResponse, CubbyExecResponse, EventInput, EventRole, EventsPage, IngestOrigin, Job, JobsPage, JobState, Member, MemberRole, MembershipState, MembershipSummary, PublishResult, Scope, ScopeGrants, ScopeLevel, ScopeSelector, SignedGrant, SignedRoster, StreamSummary, StreamsListResponse, VaultCredentialStatus, VaultEvent, VaultRecord, VaultSigType, } from "./core/types.js";
|
|
32
|
+
export type { HeldStanding, PutMemberOptions, PutScopesOptions } from "./internal/memberships.js";
|
|
33
|
+
export type { Task, TasksPage, TaskState, AgentConnection, AgentConnectionStatus, BundlePin, ConnectAgentRequest, ConnectionCeiling, CubbyQueryResponse, CubbyExecResponse, EventInput, EventRole, EventsPage, IngestOrigin, Job, JobsPage, JobState, Member, MemberRole, MembershipState, MembershipSummary, PublishResult, PutDelegationsRequest, PutDelegationsResponse, Scope, ScopeGrants, ScopeLevel, ScopeSelector, SignedGrant, SignedRoster, StreamSummary, StreamsListResponse, VaultCredentialStatus, VaultEvent, VaultRecord, VaultSigType, } from "./core/types.js";
|
|
29
34
|
export { VaultInfo } from "./internal/vault-info.js";
|
|
30
35
|
export type { DelegateInfo } from "./internal/vault-info.js";
|
|
31
36
|
//# 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":"AAIA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,YAAY,EACV,cAAc,EACd,kBAAkB,EAClB,mBAAmB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,YAAY,EACV,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,aAAa,CAAC;AAIrB,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,yBAAyB,EACzB,2BAA2B,EAC3B,8BAA8B,GAC/B,MAAM,6BAA6B,CAAC;AACrC,YAAY,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/F,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,YAAY,EAAE,kBAAkB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