@keycardai/eve 0.1.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/LICENSE +9 -0
- package/README.md +223 -0
- package/dist/esm/auth.d.ts +62 -0
- package/dist/esm/auth.d.ts.map +1 -0
- package/dist/esm/auth.js +165 -0
- package/dist/esm/auth.js.map +1 -0
- package/dist/esm/config.d.ts +50 -0
- package/dist/esm/config.d.ts.map +1 -0
- package/dist/esm/config.js +83 -0
- package/dist/esm/config.js.map +1 -0
- package/dist/esm/connections.d.ts +48 -0
- package/dist/esm/connections.d.ts.map +1 -0
- package/dist/esm/connections.js +167 -0
- package/dist/esm/connections.js.map +1 -0
- package/dist/esm/errors.d.ts +78 -0
- package/dist/esm/errors.d.ts.map +1 -0
- package/dist/esm/errors.js +93 -0
- package/dist/esm/errors.js.map +1 -0
- package/dist/esm/expiry.d.ts +20 -0
- package/dist/esm/expiry.d.ts.map +1 -0
- package/dist/esm/expiry.js +49 -0
- package/dist/esm/expiry.js.map +1 -0
- package/dist/esm/index.d.ts +44 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +37 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/interactive.d.ts +90 -0
- package/dist/esm/interactive.d.ts.map +1 -0
- package/dist/esm/interactive.js +190 -0
- package/dist/esm/interactive.js.map +1 -0
- package/dist/esm/package.json +1 -0
- package/dist/esm/requireAuth.d.ts +35 -0
- package/dist/esm/requireAuth.d.ts.map +1 -0
- package/dist/esm/requireAuth.js +26 -0
- package/dist/esm/requireAuth.js.map +1 -0
- package/dist/esm/subjectTokens.d.ts +50 -0
- package/dist/esm/subjectTokens.d.ts.map +1 -0
- package/dist/esm/subjectTokens.js +73 -0
- package/dist/esm/subjectTokens.js.map +1 -0
- package/dist/esm/testing/index.d.ts +10 -0
- package/dist/esm/testing/index.d.ts.map +1 -0
- package/dist/esm/testing/index.js +9 -0
- package/dist/esm/testing/index.js.map +1 -0
- package/dist/esm/testing/testUtils.d.ts +51 -0
- package/dist/esm/testing/testUtils.d.ts.map +1 -0
- package/dist/esm/testing/testUtils.js +90 -0
- package/dist/esm/testing/testUtils.js.map +1 -0
- package/dist/esm/zoneClient.d.ts +42 -0
- package/dist/esm/zoneClient.d.ts.map +1 -0
- package/dist/esm/zoneClient.js +45 -0
- package/dist/esm/zoneClient.js.map +1 -0
- package/package.json +53 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A zone client that mints deterministic tokens and records what it was asked
|
|
3
|
+
* for.
|
|
4
|
+
*
|
|
5
|
+
* Covers the three cases the contract requires from a testing seam: successful
|
|
6
|
+
* acquisition, failure of one resource, and failure of every call.
|
|
7
|
+
*/
|
|
8
|
+
export function fakeZoneClient(options = {}) {
|
|
9
|
+
const calls = { exchanges: [], impersonations: [], clientCredentials: [] };
|
|
10
|
+
const issue = (kind, resource) => {
|
|
11
|
+
if (options.fail)
|
|
12
|
+
throw options.fail;
|
|
13
|
+
const failure = resource ? options.failResources?.[resource] : undefined;
|
|
14
|
+
if (failure)
|
|
15
|
+
throw failure;
|
|
16
|
+
return {
|
|
17
|
+
accessToken: `${kind}-token-for-${resource ?? "unknown"}`,
|
|
18
|
+
tokenType: "Bearer",
|
|
19
|
+
...(options.expiresIn !== undefined ? { expiresIn: options.expiresIn } : {}),
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
return {
|
|
23
|
+
calls,
|
|
24
|
+
async exchangeToken(request) {
|
|
25
|
+
calls.exchanges.push(request);
|
|
26
|
+
return issue("exchanged", request.resource);
|
|
27
|
+
},
|
|
28
|
+
async impersonate(request) {
|
|
29
|
+
calls.impersonations.push(request);
|
|
30
|
+
return issue("impersonated", request.resource);
|
|
31
|
+
},
|
|
32
|
+
async clientCredentialsGrant(request) {
|
|
33
|
+
calls.clientCredentials.push(request ?? {});
|
|
34
|
+
return issue("app", request?.resource);
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
/** An unsigned JWT with the given claims, for decode-only paths. */
|
|
39
|
+
export function unsignedJwt(claims) {
|
|
40
|
+
const encode = (value) => Buffer.from(JSON.stringify(value)).toString("base64url");
|
|
41
|
+
return `${encode({ alg: "RS256", typ: "JWT" })}.${encode(claims)}.signature`;
|
|
42
|
+
}
|
|
43
|
+
/** A JWT that expired `secondsAgo` seconds ago. */
|
|
44
|
+
export function expiredJwt(secondsAgo = 60) {
|
|
45
|
+
return unsignedJwt({ exp: Math.floor(Date.now() / 1000) - secondsAgo, sub: "user-1" });
|
|
46
|
+
}
|
|
47
|
+
/** A JWT that is valid for another `secondsAhead` seconds. */
|
|
48
|
+
export function validJwt(secondsAhead = 3600, claims = {}) {
|
|
49
|
+
return unsignedJwt({
|
|
50
|
+
exp: Math.floor(Date.now() / 1000) + secondsAhead,
|
|
51
|
+
sub: "user-1",
|
|
52
|
+
...claims,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
/** A request carrying a bearer token. */
|
|
56
|
+
export function bearerRequest(token, url = "https://agent.example.com/chat") {
|
|
57
|
+
return new Request(url, { headers: { authorization: `Bearer ${token}` } });
|
|
58
|
+
}
|
|
59
|
+
/** A verification seam that accepts one token and rejects everything else. */
|
|
60
|
+
export function fakeVerifier(accepted, claims) {
|
|
61
|
+
return async (token) => {
|
|
62
|
+
if (token !== accepted)
|
|
63
|
+
throw new Error("Invalid token");
|
|
64
|
+
return claims;
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
/** A user connection principal. */
|
|
68
|
+
export function userPrincipal(id = "user-1", issuer = "https://zone.example.com", attributes) {
|
|
69
|
+
return { type: "user", id, issuer, ...(attributes ? { attributes } : {}) };
|
|
70
|
+
}
|
|
71
|
+
/** The app connection principal. */
|
|
72
|
+
export function appPrincipal() {
|
|
73
|
+
return { type: "app" };
|
|
74
|
+
}
|
|
75
|
+
/** A session auth context, as `keycardAuth` would return it. */
|
|
76
|
+
export function sessionAuthContext(overrides = {}) {
|
|
77
|
+
return {
|
|
78
|
+
attributes: {},
|
|
79
|
+
authenticator: "keycard",
|
|
80
|
+
issuer: "https://zone.example.com",
|
|
81
|
+
principalId: "user-1",
|
|
82
|
+
principalType: "user",
|
|
83
|
+
...overrides,
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
/** The connection metadata eve passes to every authorization callback. */
|
|
87
|
+
export function connectionContext(url = "https://mcp.example.com/mcp") {
|
|
88
|
+
return { url };
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=testUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testUtils.js","sourceRoot":"","sources":["../../../src/testing/testUtils.ts"],"names":[],"mappings":"AAiCA;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAC,UAAiC,EAAE;IAChE,MAAM,KAAK,GAAc,EAAE,SAAS,EAAE,EAAE,EAAE,cAAc,EAAE,EAAE,EAAE,iBAAiB,EAAE,EAAE,EAAE,CAAC;IAEtF,MAAM,KAAK,GAAG,CAAC,IAAY,EAAE,QAA4B,EAAiB,EAAE;QAC1E,IAAI,OAAO,CAAC,IAAI;YAAE,MAAM,OAAO,CAAC,IAAI,CAAC;QACrC,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QACzE,IAAI,OAAO;YAAE,MAAM,OAAO,CAAC;QAC3B,OAAO;YACL,WAAW,EAAE,GAAG,IAAI,cAAc,QAAQ,IAAI,SAAS,EAAE;YACzD,SAAS,EAAE,QAAQ;YACnB,GAAG,CAAC,OAAO,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC7E,CAAC;IACJ,CAAC,CAAC;IAEF,OAAO;QACL,KAAK;QACL,KAAK,CAAC,aAAa,CAA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,CAAC;AAED,0EAA0E;AAC1E,MAAM,UAAU,iBAAiB,CAAC,GAAG,GAAG,6BAA6B;IACnE,OAAO,EAAE,GAAG,EAAE,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type ApplicationCredential, type ClientCredentialsRequest, type ImpersonateRequest, type TokenExchangeRequest, type TokenResponse } from "@keycardai/oauth";
|
|
2
|
+
/**
|
|
3
|
+
* The zone operations a connection auth factory needs, as one seam.
|
|
4
|
+
*
|
|
5
|
+
* `@keycardai/oauth` splits acquisition across `TokenExchangeClient` and
|
|
6
|
+
* `ClientCredentialsClient`; this interface is the single injection point the
|
|
7
|
+
* contract calls for (`client`), and lets a test stand in for the zone with no
|
|
8
|
+
* network.
|
|
9
|
+
*/
|
|
10
|
+
export interface ZoneClient {
|
|
11
|
+
/** RFC 8693 exchange of a subject token for a resource token. */
|
|
12
|
+
exchangeToken(request: TokenExchangeRequest, options?: {
|
|
13
|
+
issuer?: string;
|
|
14
|
+
}): Promise<TokenResponse>;
|
|
15
|
+
/** Substitute-user exchange for a user the agent holds no token for. */
|
|
16
|
+
impersonate(request: ImpersonateRequest): Promise<TokenResponse>;
|
|
17
|
+
/** Client-credentials grant under the agent's own authority. */
|
|
18
|
+
clientCredentialsGrant(request?: ClientCredentialsRequest, options?: {
|
|
19
|
+
issuer?: string;
|
|
20
|
+
}): Promise<TokenResponse>;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The default `ZoneClient`: one warm `TokenExchangeClient` and one warm
|
|
24
|
+
* `ClientCredentialsClient` per factory.
|
|
25
|
+
*
|
|
26
|
+
* Both underlying clients cache authorization-server metadata after their
|
|
27
|
+
* first call, so discovery happens once per process rather than once per tool
|
|
28
|
+
* call. eve resolves connection auth on every step, which makes per-call
|
|
29
|
+
* client construction the thing to avoid here.
|
|
30
|
+
*/
|
|
31
|
+
export declare class KeycardZoneClient implements ZoneClient {
|
|
32
|
+
#private;
|
|
33
|
+
constructor(issuer: string, credential?: ApplicationCredential);
|
|
34
|
+
exchangeToken(request: TokenExchangeRequest, options?: {
|
|
35
|
+
issuer?: string;
|
|
36
|
+
}): Promise<TokenResponse>;
|
|
37
|
+
impersonate(request: ImpersonateRequest): Promise<TokenResponse>;
|
|
38
|
+
clientCredentialsGrant(request?: ClientCredentialsRequest, options?: {
|
|
39
|
+
issuer?: string;
|
|
40
|
+
}): Promise<TokenResponse>;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=zoneClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zoneClient.d.ts","sourceRoot":"","sources":["../../src/zoneClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,aAAa,EACnB,MAAM,kBAAkB,CAAC;AAE1B;;;;;;;GAOG;AACH,MAAM,WAAW,UAAU;IACzB,iEAAiE;IACjE,aAAa,CACX,OAAO,EAAE,oBAAoB,EAC7B,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,GAC5B,OAAO,CAAC,aAAa,CAAC,CAAC;IAC1B,wEAAwE;IACxE,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IACjE,gEAAgE;IAChE,sBAAsB,CACpB,OAAO,CAAC,EAAE,wBAAwB,EAClC,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,GAC5B,OAAO,CAAC,aAAa,CAAC,CAAC;CAC3B;AAED;;;;;;;;GAQG;AACH,qBAAa,iBAAkB,YAAW,UAAU;;gBAKtC,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,qBAAqB;IAM9D,aAAa,CACX,OAAO,EAAE,oBAAoB,EAC7B,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,GAC5B,OAAO,CAAC,aAAa,CAAC;IAIzB,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,aAAa,CAAC;IAIhE,sBAAsB,CACpB,OAAO,CAAC,EAAE,wBAAwB,EAClC,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,GAC5B,OAAO,CAAC,aAAa,CAAC;CAK1B"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
2
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
3
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
4
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
5
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
6
|
+
};
|
|
7
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
8
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
9
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
10
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
|
+
};
|
|
12
|
+
var _KeycardZoneClient_issuer, _KeycardZoneClient_exchange, _KeycardZoneClient_clientCredentials;
|
|
13
|
+
import { ClientCredentialsClient, TokenExchangeClient, } from "@keycardai/oauth";
|
|
14
|
+
/**
|
|
15
|
+
* The default `ZoneClient`: one warm `TokenExchangeClient` and one warm
|
|
16
|
+
* `ClientCredentialsClient` per factory.
|
|
17
|
+
*
|
|
18
|
+
* Both underlying clients cache authorization-server metadata after their
|
|
19
|
+
* first call, so discovery happens once per process rather than once per tool
|
|
20
|
+
* call. eve resolves connection auth on every step, which makes per-call
|
|
21
|
+
* client construction the thing to avoid here.
|
|
22
|
+
*/
|
|
23
|
+
export class KeycardZoneClient {
|
|
24
|
+
constructor(issuer, credential) {
|
|
25
|
+
_KeycardZoneClient_issuer.set(this, void 0);
|
|
26
|
+
_KeycardZoneClient_exchange.set(this, void 0);
|
|
27
|
+
_KeycardZoneClient_clientCredentials.set(this, void 0);
|
|
28
|
+
__classPrivateFieldSet(this, _KeycardZoneClient_issuer, issuer, "f");
|
|
29
|
+
__classPrivateFieldSet(this, _KeycardZoneClient_exchange, new TokenExchangeClient(issuer, { credential }), "f");
|
|
30
|
+
__classPrivateFieldSet(this, _KeycardZoneClient_clientCredentials, new ClientCredentialsClient(issuer, { credential }), "f");
|
|
31
|
+
}
|
|
32
|
+
exchangeToken(request, options) {
|
|
33
|
+
return __classPrivateFieldGet(this, _KeycardZoneClient_exchange, "f").exchangeToken(request, { issuer: options?.issuer ?? __classPrivateFieldGet(this, _KeycardZoneClient_issuer, "f") });
|
|
34
|
+
}
|
|
35
|
+
impersonate(request) {
|
|
36
|
+
return __classPrivateFieldGet(this, _KeycardZoneClient_exchange, "f").impersonate(request);
|
|
37
|
+
}
|
|
38
|
+
clientCredentialsGrant(request, options) {
|
|
39
|
+
return __classPrivateFieldGet(this, _KeycardZoneClient_clientCredentials, "f").requestToken(request, {
|
|
40
|
+
issuer: options?.issuer ?? __classPrivateFieldGet(this, _KeycardZoneClient_issuer, "f"),
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
_KeycardZoneClient_issuer = new WeakMap(), _KeycardZoneClient_exchange = new WeakMap(), _KeycardZoneClient_clientCredentials = new WeakMap();
|
|
45
|
+
//# sourceMappingURL=zoneClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zoneClient.js","sourceRoot":"","sources":["../../src/zoneClient.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EACL,uBAAuB,EACvB,mBAAmB,GAMpB,MAAM,kBAAkB,CAAC;AAyB1B;;;;;;;;GAQG;AACH,MAAM,OAAO,iBAAiB;IAK5B,YAAY,MAAc,EAAE,UAAkC;QAJ9D,4CAAgB;QAChB,8CAA+B;QAC/B,uDAA4C;QAG1C,uBAAA,IAAI,6BAAW,MAAM,MAAA,CAAC;QACtB,uBAAA,IAAI,+BAAa,IAAI,mBAAmB,CAAC,MAAM,EAAE,EAAE,UAAU,EAAE,CAAC,MAAA,CAAC;QACjE,uBAAA,IAAI,wCAAsB,IAAI,uBAAuB,CAAC,MAAM,EAAE,EAAE,UAAU,EAAE,CAAC,MAAA,CAAC;IAChF,CAAC;IAED,aAAa,CACX,OAA6B,EAC7B,OAA6B;QAE7B,OAAO,uBAAA,IAAI,mCAAU,CAAC,aAAa,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,IAAI,uBAAA,IAAI,iCAAQ,EAAE,CAAC,CAAC;IAC5F,CAAC;IAED,WAAW,CAAC,OAA2B;QACrC,OAAO,uBAAA,IAAI,mCAAU,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAC7C,CAAC;IAED,sBAAsB,CACpB,OAAkC,EAClC,OAA6B;QAE7B,OAAO,uBAAA,IAAI,4CAAmB,CAAC,YAAY,CAAC,OAAO,EAAE;YACnD,MAAM,EAAE,OAAO,EAAE,MAAM,IAAI,uBAAA,IAAI,iCAAQ;SACxC,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/package.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@keycardai/eve",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "[Preview] Keycard auth adapters for eve agents: a zone token verifier for the channel auth walk, Keycard-backed connection auth, and interactive authorization over the zone's web flow",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/keycardai/typescript-sdk.git",
|
|
9
|
+
"directory": "packages/eve"
|
|
10
|
+
},
|
|
11
|
+
"type": "module",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"import": "./dist/esm/index.js",
|
|
15
|
+
"types": "./dist/esm/index.d.ts"
|
|
16
|
+
},
|
|
17
|
+
"./testing": {
|
|
18
|
+
"import": "./dist/esm/testing/index.js",
|
|
19
|
+
"types": "./dist/esm/testing/index.d.ts"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"dist"
|
|
24
|
+
],
|
|
25
|
+
"typesVersions": {
|
|
26
|
+
"*": {
|
|
27
|
+
"*": [
|
|
28
|
+
"./dist/esm/*"
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@keycardai/oauth": "0.22.0"
|
|
34
|
+
},
|
|
35
|
+
"peerDependencies": {
|
|
36
|
+
"eve": ">=0.47.3 <0.48.0"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@jest/globals": "^30.0.4",
|
|
40
|
+
"@types/node": "^25.6.0",
|
|
41
|
+
"eve": "0.47.3",
|
|
42
|
+
"jest": "^30.0.4",
|
|
43
|
+
"ts-jest": "^29.4.7",
|
|
44
|
+
"typescript": "^5.8.3"
|
|
45
|
+
},
|
|
46
|
+
"scripts": {
|
|
47
|
+
"build": "pnpm run build:esm",
|
|
48
|
+
"build:esm": "tsc -p tsconfig.prod.json && echo '{\"type\": \"module\"}' > dist/esm/package.json",
|
|
49
|
+
"test": "NODE_OPTIONS='--experimental-vm-modules' jest",
|
|
50
|
+
"typecheck": "tsc --noEmit",
|
|
51
|
+
"clean": "rm -rf dist"
|
|
52
|
+
}
|
|
53
|
+
}
|