@zackbart/connecta 0.8.1 → 0.9.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/CHANGELOG.md +41 -0
- package/SECURITY.md +5 -11
- package/dist/auth/downstream-oauth.d.ts +15 -6
- package/dist/auth/downstream-oauth.d.ts.map +1 -1
- package/dist/auth/downstream-oauth.js +60 -11
- package/dist/auth/downstream-oauth.js.map +1 -1
- package/dist/connectors/remote-mcp.d.ts +1 -1
- package/dist/connectors/remote-mcp.d.ts.map +1 -1
- package/dist/connectors/remote-mcp.js +65 -50
- package/dist/connectors/remote-mcp.js.map +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +1 -0
- package/dist/errors.js.map +1 -1
- package/dist/execute.d.ts +3 -1
- package/dist/execute.d.ts.map +1 -1
- package/dist/execute.js +38 -7
- package/dist/execute.js.map +1 -1
- package/dist/meta-tools.d.ts +1 -1
- package/dist/meta-tools.d.ts.map +1 -1
- package/dist/meta-tools.js +17 -15
- package/dist/meta-tools.js.map +1 -1
- package/dist/routes/mcp.d.ts.map +1 -1
- package/dist/routes/mcp.js +63 -44
- package/dist/routes/mcp.js.map +1 -1
- package/dist/routes/oauth.js +1 -1
- package/dist/routes/oauth.js.map +1 -1
- package/dist/routes/shared.d.ts +2 -2
- package/dist/routes/shared.d.ts.map +1 -1
- package/dist/types.d.ts +6 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -2
- package/src/auth/downstream-oauth.ts +106 -24
- package/src/connectors/remote-mcp.ts +96 -64
- package/src/errors.ts +2 -0
- package/src/execute.ts +40 -6
- package/src/meta-tools.ts +20 -16
- package/src/routes/mcp.ts +70 -44
- package/src/routes/oauth.ts +1 -1
- package/src/routes/shared.ts +2 -2
- package/src/types.ts +10 -2
- package/src/version.ts +1 -1
package/src/routes/shared.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Implementation } from "@modelcontextprotocol/server";
|
|
2
2
|
import type { ActivityActor, ActivityReadGate, ActivityStore } from "../activity.js";
|
|
3
3
|
import type { CredentialVault } from "../credentials.js";
|
|
4
4
|
import type { DeferredWork } from "../connector-scope.js";
|
|
@@ -18,7 +18,7 @@ export interface ServerOptions {
|
|
|
18
18
|
publicUrl?: string;
|
|
19
19
|
// The SDK's Implementation shape: name/version plus optional title,
|
|
20
20
|
// websiteUrl, and icons (MCP icons spec) that clients may render.
|
|
21
|
-
serverInfo:
|
|
21
|
+
serverInfo: Implementation;
|
|
22
22
|
logger: Logger;
|
|
23
23
|
activity?: ActivityStore;
|
|
24
24
|
activityReadGate?: ActivityReadGate;
|
package/src/types.ts
CHANGED
|
@@ -276,8 +276,16 @@ export interface Connector {
|
|
|
276
276
|
* pending URL could complete consent with their own account.
|
|
277
277
|
*/
|
|
278
278
|
verifyState?(state: string | null, ctx: ConnectorContext): Promise<boolean>;
|
|
279
|
-
/**
|
|
280
|
-
|
|
279
|
+
/**
|
|
280
|
+
* Optional: complete a downstream OAuth flow (called by
|
|
281
|
+
* /oauth/callback/<id>). `callbackParams` preserves the authorization
|
|
282
|
+
* server's RFC 9207 `iss` response parameter for SDK validation.
|
|
283
|
+
*/
|
|
284
|
+
finishAuth?(
|
|
285
|
+
code: string,
|
|
286
|
+
ctx: ConnectorContext,
|
|
287
|
+
callbackParams?: URLSearchParams,
|
|
288
|
+
): Promise<void>;
|
|
281
289
|
/**
|
|
282
290
|
* Optional: serve a connector-owned HTTP route — for example a signed
|
|
283
291
|
* download link minted by one of the connector's tools. Called only after
|
package/src/version.ts
CHANGED