@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.
Files changed (44) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/SECURITY.md +5 -11
  3. package/dist/auth/downstream-oauth.d.ts +15 -6
  4. package/dist/auth/downstream-oauth.d.ts.map +1 -1
  5. package/dist/auth/downstream-oauth.js +60 -11
  6. package/dist/auth/downstream-oauth.js.map +1 -1
  7. package/dist/connectors/remote-mcp.d.ts +1 -1
  8. package/dist/connectors/remote-mcp.d.ts.map +1 -1
  9. package/dist/connectors/remote-mcp.js +65 -50
  10. package/dist/connectors/remote-mcp.js.map +1 -1
  11. package/dist/errors.d.ts +1 -1
  12. package/dist/errors.d.ts.map +1 -1
  13. package/dist/errors.js +1 -0
  14. package/dist/errors.js.map +1 -1
  15. package/dist/execute.d.ts +3 -1
  16. package/dist/execute.d.ts.map +1 -1
  17. package/dist/execute.js +38 -7
  18. package/dist/execute.js.map +1 -1
  19. package/dist/meta-tools.d.ts +1 -1
  20. package/dist/meta-tools.d.ts.map +1 -1
  21. package/dist/meta-tools.js +17 -15
  22. package/dist/meta-tools.js.map +1 -1
  23. package/dist/routes/mcp.d.ts.map +1 -1
  24. package/dist/routes/mcp.js +63 -44
  25. package/dist/routes/mcp.js.map +1 -1
  26. package/dist/routes/oauth.js +1 -1
  27. package/dist/routes/oauth.js.map +1 -1
  28. package/dist/routes/shared.d.ts +2 -2
  29. package/dist/routes/shared.d.ts.map +1 -1
  30. package/dist/types.d.ts +6 -2
  31. package/dist/types.d.ts.map +1 -1
  32. package/dist/version.d.ts +1 -1
  33. package/dist/version.js +1 -1
  34. package/package.json +3 -2
  35. package/src/auth/downstream-oauth.ts +106 -24
  36. package/src/connectors/remote-mcp.ts +96 -64
  37. package/src/errors.ts +2 -0
  38. package/src/execute.ts +40 -6
  39. package/src/meta-tools.ts +20 -16
  40. package/src/routes/mcp.ts +70 -44
  41. package/src/routes/oauth.ts +1 -1
  42. package/src/routes/shared.ts +2 -2
  43. package/src/types.ts +10 -2
  44. package/src/version.ts +1 -1
@@ -1,4 +1,4 @@
1
- import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
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: ConstructorParameters<typeof McpServer>[0];
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
- /** Optional: complete a downstream OAuth flow (called by /oauth/callback/<id>). */
280
- finishAuth?(code: string, ctx: ConnectorContext): Promise<void>;
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
@@ -4,4 +4,4 @@
4
4
  * a bump that forgets this file fails the build rather than shipping a stale
5
5
  * version to `/health` and to downstream MCP handshakes.
6
6
  */
7
- export const CONNECTA_VERSION = "0.8.1";
7
+ export const CONNECTA_VERSION = "0.9.0";