@kya-os/mcp-i-cloudflare 1.7.2 → 1.7.3

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.
@@ -39,31 +39,35 @@ export declare const OAUTH_DELEGATION_EXPIRY_SECONDS: number;
39
39
  * Used for OAuth-scoped Ed25519 key pair persistence in KV storage
40
40
  */
41
41
  export declare const KEY_PAIR_TTL_SECONDS: number;
42
+ import { type ConsentProviderType as ContractsConsentProviderType } from "@kya-os/contracts/tool-protection";
42
43
  /**
43
44
  * Provider types for consent/delegation flows
44
45
  *
46
+ * Re-exported from @kya-os/contracts for backward compatibility.
47
+ * See contracts package for authoritative definitions.
48
+ *
45
49
  * These constants define the authentication method used during consent:
46
50
  * - NONE: Consent-only mode (clickwrap) - user agrees without authentication
47
51
  * - OAUTH2: OAuth provider authentication (GitHub, Google, etc.)
48
- * - CREDENTIAL: Credential-based authentication (email/password)
52
+ * - PASSWORD: Password-based authentication (email/password)
53
+ * - CREDENTIAL: Alias for PASSWORD (backward compatibility)
49
54
  */
50
55
  export declare const CONSENT_PROVIDER_TYPES: {
51
- /** Consent-only mode - no authentication, just clickwrap agreement */
52
56
  readonly NONE: "none";
53
- /** OAuth2 provider authentication */
54
57
  readonly OAUTH2: "oauth2";
55
- /** Credential-based authentication (email/password) */
58
+ readonly PASSWORD: "password";
56
59
  readonly CREDENTIAL: "credential";
60
+ readonly MAGIC_LINK: "magic_link";
61
+ readonly OTP: "otp";
57
62
  };
58
63
  /**
59
64
  * Type for consent provider types
60
65
  */
61
- export type ConsentProviderType = (typeof CONSENT_PROVIDER_TYPES)[keyof typeof CONSENT_PROVIDER_TYPES];
66
+ export type ConsentProviderType = ContractsConsentProviderType;
62
67
  /**
63
68
  * Determine provider type based on available identity information
64
69
  *
65
- * This is the single source of truth for provider type determination.
66
- * Used by consent page renderer and consent service.
70
+ * Returns 'credential' for credential flows (backward compatible with existing delegations).
67
71
  *
68
72
  * @param hasOAuthIdentity - Whether OAuth identity is present
69
73
  * @param isCredentialFlow - Whether this is a credential-based flow
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,eAAO,MAAM,uBAAuB,2BAA2B,CAAC;AAEhE;;GAEG;AACH,eAAO,MAAM,mBAAmB,QAAiB,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,sBAAsB,QAAmB,CAAC;AAEvD;;GAEG;AACH,eAAO,MAAM,iBAAiB,QAAgB,CAAC;AAE/C;;GAEG;AACH,eAAO,MAAM,8BAA8B,KAAK,CAAC;AAEjD;;;GAGG;AACH,eAAO,MAAM,yBAAyB,MAAM,CAAC;AAE7C;;;GAGG;AACH,eAAO,MAAM,+BAA+B,QAAoB,CAAC;AAEjE;;;GAGG;AACH,eAAO,MAAM,oBAAoB,QAAqB,CAAC;AAMvD;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB;IACjC,sEAAsE;;IAEtE,qCAAqC;;IAErC,uDAAuD;;CAE/C,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAC7B,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,OAAO,sBAAsB,CAAC,CAAC;AAEvE;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACnC,gBAAgB,EAAE,OAAO,EACzB,gBAAgB,GAAE,OAAe,GAChC,mBAAmB,CAQrB"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,eAAO,MAAM,uBAAuB,2BAA2B,CAAC;AAEhE;;GAEG;AACH,eAAO,MAAM,mBAAmB,QAAiB,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,sBAAsB,QAAmB,CAAC;AAEvD;;GAEG;AACH,eAAO,MAAM,iBAAiB,QAAgB,CAAC;AAE/C;;GAEG;AACH,eAAO,MAAM,8BAA8B,KAAK,CAAC;AAEjD;;;GAGG;AACH,eAAO,MAAM,yBAAyB,MAAM,CAAC;AAE7C;;;GAGG;AACH,eAAO,MAAM,+BAA+B,QAAoB,CAAC;AAEjE;;;GAGG;AACH,eAAO,MAAM,oBAAoB,QAAqB,CAAC;AAQvD,OAAO,EAEL,KAAK,mBAAmB,IAAI,4BAA4B,EAEzD,MAAM,mCAAmC,CAAC;AAE3C;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,sBAAsB;;;;;;;CAAmC,CAAC;AAEvE;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,4BAA4B,CAAC;AAE/D;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACnC,gBAAgB,EAAE,OAAO,EACzB,gBAAgB,GAAE,OAAe,GAChC,mBAAmB,CASrB"}
package/dist/constants.js CHANGED
@@ -41,34 +41,34 @@ export const OAUTH_DELEGATION_EXPIRY_SECONDS = 30 * 24 * 60 * 60;
41
41
  export const KEY_PAIR_TTL_SECONDS = 365 * 24 * 60 * 60;
42
42
  // ============================================================================
43
43
  // Consent Provider Types
44
+ // Re-exported from @kya-os/contracts for single source of truth
44
45
  // ============================================================================
46
+ // Import from contracts (the canonical source)
47
+ import { CONSENT_PROVIDER_TYPES as CONTRACTS_CONSENT_PROVIDER_TYPES, } from "@kya-os/contracts/tool-protection";
45
48
  /**
46
49
  * Provider types for consent/delegation flows
47
50
  *
51
+ * Re-exported from @kya-os/contracts for backward compatibility.
52
+ * See contracts package for authoritative definitions.
53
+ *
48
54
  * These constants define the authentication method used during consent:
49
55
  * - NONE: Consent-only mode (clickwrap) - user agrees without authentication
50
56
  * - OAUTH2: OAuth provider authentication (GitHub, Google, etc.)
51
- * - CREDENTIAL: Credential-based authentication (email/password)
57
+ * - PASSWORD: Password-based authentication (email/password)
58
+ * - CREDENTIAL: Alias for PASSWORD (backward compatibility)
52
59
  */
53
- export const CONSENT_PROVIDER_TYPES = {
54
- /** Consent-only mode - no authentication, just clickwrap agreement */
55
- NONE: "none",
56
- /** OAuth2 provider authentication */
57
- OAUTH2: "oauth2",
58
- /** Credential-based authentication (email/password) */
59
- CREDENTIAL: "credential",
60
- };
60
+ export const CONSENT_PROVIDER_TYPES = CONTRACTS_CONSENT_PROVIDER_TYPES;
61
61
  /**
62
62
  * Determine provider type based on available identity information
63
63
  *
64
- * This is the single source of truth for provider type determination.
65
- * Used by consent page renderer and consent service.
64
+ * Returns 'credential' for credential flows (backward compatible with existing delegations).
66
65
  *
67
66
  * @param hasOAuthIdentity - Whether OAuth identity is present
68
67
  * @param isCredentialFlow - Whether this is a credential-based flow
69
68
  * @returns The appropriate provider type
70
69
  */
71
70
  export function determineProviderType(hasOAuthIdentity, isCredentialFlow = false) {
71
+ // Return 'credential' for credential flows (backward compatible)
72
72
  if (isCredentialFlow) {
73
73
  return CONSENT_PROVIDER_TYPES.CREDENTIAL;
74
74
  }
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,wBAAwB,CAAC;AAEhE;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAElD;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAEvD;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;AAE/C;;GAEG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,EAAE,CAAC;AAEjD;;;GAGG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAG,CAAC;AAE7C;;;GAGG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAEjE;;;GAG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,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAEjE;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAEvD,+EAA+E;AAC/E,yBAAyB;AACzB,gEAAgE;AAChE,+EAA+E;AAE/E,+CAA+C;AAC/C,OAAO,EACL,sBAAsB,IAAI,gCAAgC,GAG3D,MAAM,mCAAmC,CAAC;AAE3C;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,gCAAgC,CAAC;AAOvE;;;;;;;;GAQG;AACH,MAAM,UAAU,qBAAqB,CACnC,gBAAyB,EACzB,mBAA4B,KAAK;IAEjC,iEAAiE;IACjE,IAAI,gBAAgB,EAAE,CAAC;QACrB,OAAO,sBAAsB,CAAC,UAAU,CAAC;IAC3C,CAAC;IACD,IAAI,gBAAgB,EAAE,CAAC;QACrB,OAAO,sBAAsB,CAAC,MAAM,CAAC;IACvC,CAAC;IACD,OAAO,sBAAsB,CAAC,IAAI,CAAC;AACrC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kya-os/mcp-i-cloudflare",
3
- "version": "1.7.2",
3
+ "version": "1.7.3",
4
4
  "description": "Cloudflare Workers adapter for MCP-I framework",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -20,7 +20,7 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "@kya-os/consent": "^0.1.4",
23
- "@kya-os/contracts": "^1.7.2",
23
+ "@kya-os/contracts": "^1.7.4",
24
24
  "@kya-os/mcp-i-core": "^1.4.1",
25
25
  "@modelcontextprotocol/sdk": "^1.24.0",
26
26
  "agents": "^0.2.30",