cortexhub 1.0.3__tar.gz → 1.1.0__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cortexhub
3
- Version: 1.0.3
3
+ Version: 1.1.0
4
4
  Summary: MCP gateway client for cortexhub agents — authenticate, hand the MCP URL to your framework of choice, done.
5
5
  Project-URL: Homepage, https://cortexhub.ai
6
6
  Project-URL: Documentation, https://docs.cortexhub.ai
@@ -40,7 +40,7 @@ from cortexhub import Cortexhub
40
40
  cortexhub = Cortexhub() # reads CORTEXHUB_API_KEY
41
41
  session = cortexhub.create(user_id="user_123")
42
42
 
43
- print(session.mcp.url) # https://api.cortexhub.ai/v1/mcp
43
+ print(session.mcp.url) # https://mcp.cortexhub.ai/v1/mcp
44
44
  print(session.mcp.headers) # {"X-API-Key": "ch_live_…", "X-Cortexhub-End-User-Subject": "user_123"}
45
45
  ```
46
46
 
@@ -150,7 +150,7 @@ Or pass it explicitly:
150
150
  cortexhub = Cortexhub(api_key="ch_live_…")
151
151
  ```
152
152
 
153
- The MCP gateway URL is fixed — `https://api.cortexhub.ai/v1/mcp`. There is no self-hosted mode and no base-URL override.
153
+ The MCP gateway URL is fixed — `https://mcp.cortexhub.ai/v1/mcp`. There is no self-hosted mode and no base-URL override.
154
154
 
155
155
  ## Attributing tool calls to a user
156
156
 
@@ -177,7 +177,7 @@ X-Cortexhub-End-User-Subject: user_123
177
177
  E.g. with curl:
178
178
 
179
179
  ```bash
180
- curl -N "https://api.cortexhub.ai/v1/mcp" \
180
+ curl -N "https://mcp.cortexhub.ai/v1/mcp" \
181
181
  -H "x-api-key: $CORTEXHUB_API_KEY" \
182
182
  -H "X-Cortexhub-End-User-Subject: user_123" \
183
183
  -H "Content-Type: application/json" \
@@ -17,7 +17,7 @@ from cortexhub import Cortexhub
17
17
  cortexhub = Cortexhub() # reads CORTEXHUB_API_KEY
18
18
  session = cortexhub.create(user_id="user_123")
19
19
 
20
- print(session.mcp.url) # https://api.cortexhub.ai/v1/mcp
20
+ print(session.mcp.url) # https://mcp.cortexhub.ai/v1/mcp
21
21
  print(session.mcp.headers) # {"X-API-Key": "ch_live_…", "X-Cortexhub-End-User-Subject": "user_123"}
22
22
  ```
23
23
 
@@ -127,7 +127,7 @@ Or pass it explicitly:
127
127
  cortexhub = Cortexhub(api_key="ch_live_…")
128
128
  ```
129
129
 
130
- The MCP gateway URL is fixed — `https://api.cortexhub.ai/v1/mcp`. There is no self-hosted mode and no base-URL override.
130
+ The MCP gateway URL is fixed — `https://mcp.cortexhub.ai/v1/mcp`. There is no self-hosted mode and no base-URL override.
131
131
 
132
132
  ## Attributing tool calls to a user
133
133
 
@@ -154,7 +154,7 @@ X-Cortexhub-End-User-Subject: user_123
154
154
  E.g. with curl:
155
155
 
156
156
  ```bash
157
- curl -N "https://api.cortexhub.ai/v1/mcp" \
157
+ curl -N "https://mcp.cortexhub.ai/v1/mcp" \
158
158
  -H "x-api-key: $CORTEXHUB_API_KEY" \
159
159
  -H "X-Cortexhub-End-User-Subject: user_123" \
160
160
  -H "Content-Type: application/json" \
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "cortexhub"
3
- version = "1.0.3"
3
+ version = "1.1.0"
4
4
  description = "MCP gateway client for cortexhub agents — authenticate, hand the MCP URL to your framework of choice, done."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -30,7 +30,7 @@ from .errors import (
30
30
  )
31
31
  from .session import Session, SessionMcp
32
32
 
33
- __version__ = "1.0.3"
33
+ __version__ = "1.1.0"
34
34
  __all__ = [
35
35
  "Cortexhub",
36
36
  "Session",
@@ -11,9 +11,10 @@ Usage:
11
11
  The class has exactly one method (``create``). The constructor reads
12
12
  ``CORTEXHUB_API_KEY`` from the environment unless the caller passes one in.
13
13
 
14
- There is **no base-URL override**: the cortexhub MCP gateway is a hosted SaaS
15
- at ``https://api.cortexhub.ai`` and the SDK always points there. We don't
16
- support self-hosted deployments.
14
+ There is **no base-URL override**: the cortexhub MCP gateway is hosted at
15
+ ``https://mcp.cortexhub.ai`` (dedicated public ALB, separate from the REST
16
+ control-plane at ``https://api.cortexhub.ai``). We don't support self-hosted
17
+ deployments.
17
18
  """
18
19
 
19
20
  from __future__ import annotations
@@ -23,10 +24,6 @@ import os
23
24
  from .errors import ConfigurationError
24
25
  from .session import Session
25
26
 
26
- # Hosted gateway origin. Hard-coded on purpose — see module docstring.
27
- _API_ORIGIN = "https://api.cortexhub.ai"
28
-
29
-
30
27
  class Cortexhub:
31
28
  """Per-agent cortexhub client.
32
29
 
@@ -24,9 +24,11 @@ from __future__ import annotations
24
24
 
25
25
  from dataclasses import dataclass, field
26
26
 
27
- # Hosted gateway URL. Hard-coded — the SDK does not support self-hosted
28
- # deployments, so there is no override to thread through.
29
- _MCP_URL = "https://api.cortexhub.ai/v1/mcp"
27
+ # Hosted MCP gateway URL. Points to the dedicated public ALB (mcp.cortexhub.ai),
28
+ # NOT to api.cortexhub.ai (API Gateway). The MCP ALB has a 3600 s idle timeout
29
+ # and AWS WAF — API Gateway has a hard 29 s timeout that kills SSE connections.
30
+ # Hard-coded — the SDK does not support self-hosted deployments.
31
+ _MCP_URL = "https://mcp.cortexhub.ai/v1/mcp"
30
32
 
31
33
  # Headers the gateway reads. Both are namespaced ``X-Cortexhub-…`` /
32
34
  # ``X-API-Key`` so they don't clash with framework-injected Bearer tokens
File without changes
File without changes