ctxprotocol 0.15.0__tar.gz → 0.16.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.
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/PKG-INFO +6 -7
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/README.md +5 -6
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/ctxprotocol/client/resources/query.py +4 -2
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/ctxprotocol/client/types.py +6 -5
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/examples/server/hummingbot-contributor/requirements.txt +1 -1
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/pyproject.toml +1 -1
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/.codexignore +0 -0
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/.gitignore +0 -0
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/ctxprotocol/__init__.py +0 -0
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/ctxprotocol/auth/__init__.py +0 -0
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/ctxprotocol/client/__init__.py +0 -0
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/ctxprotocol/client/client.py +0 -0
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/ctxprotocol/client/resources/__init__.py +0 -0
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/ctxprotocol/client/resources/developer.py +0 -0
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/ctxprotocol/client/resources/discovery.py +0 -0
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/ctxprotocol/client/resources/tools.py +0 -0
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/ctxprotocol/context/__init__.py +0 -0
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/ctxprotocol/context/hyperliquid.py +0 -0
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/ctxprotocol/context/polymarket.py +0 -0
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/ctxprotocol/context/wallet.py +0 -0
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/ctxprotocol/contrib/__init__.py +0 -0
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/ctxprotocol/contrib/search/__init__.py +0 -0
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/ctxprotocol/contrib/search/core.py +0 -0
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/ctxprotocol/contrib/search/trace.py +0 -0
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/ctxprotocol/contrib/search/types.py +0 -0
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/ctxprotocol/contrib/search/validation.py +0 -0
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/ctxprotocol/handshake/__init__.py +0 -0
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/ctxprotocol/py.typed +0 -0
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/docs/README.md +0 -0
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/examples/client/execute_client.py +0 -0
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/examples/client/polymarket_query_trace_validation.py +0 -0
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/examples/client/query_client.py +0 -0
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/examples/client/test_favorites_only.py +0 -0
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/examples/client/test_get_tool.py +0 -0
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/examples/client/two_surfaces_client.py +0 -0
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/examples/client/validation/generate_contributor_search_validation_artifacts.py +0 -0
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/examples/client/validation/named-regression-iran-boots-on-ground.json +0 -0
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/examples/client/validation/named-regression-supreme-court-tariffs.json +0 -0
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/examples/client/validation/shared-capability-miss-unsupported-venue.json +0 -0
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/examples/client/validation/shared-generic-overlap-best-match.json +0 -0
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/examples/client/validation/shared-still-ambiguous-shortlist.json +0 -0
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/examples/server/hummingbot-contributor/README.md +0 -0
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/examples/server/hummingbot-contributor/env.example +0 -0
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/examples/server/hummingbot-contributor/server.py +0 -0
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/polymarket-query-trace-results-py.json +0 -0
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/tests/__init__.py +0 -0
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/tests/contrib_search_validation_cases.py +0 -0
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/tests/test_client.py +0 -0
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/tests/test_contrib_search.py +0 -0
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/tests/test_discovery.py +0 -0
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/tests/test_query.py +0 -0
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/tests/test_tools.py +0 -0
- {ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ctxprotocol
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.16.0
|
|
4
4
|
Summary: Official Python SDK for the Context Protocol - Discover and execute AI tools programmatically
|
|
5
5
|
Project-URL: Homepage, https://ctxprotocol.com
|
|
6
6
|
Project-URL: Documentation, https://docs.ctxprotocol.com
|
|
@@ -125,12 +125,12 @@ result = await client.tools.execute(
|
|
|
125
125
|
print(result.session) # method_price, spent, remaining, max_spend, ...
|
|
126
126
|
```
|
|
127
127
|
|
|
128
|
-
**Query mode** gives you a managed librarian contract — the server runs the live pipeline (`discover -> select -> iterative execute -> synthesize -> settle`) with model-aware context budgeting and
|
|
128
|
+
**Query mode** gives you a managed librarian contract — the server runs the live pipeline (`discover -> select -> iterative execute -> synthesize -> settle`) with model-aware context budgeting and returns structured evidence packages for one flat fee:
|
|
129
129
|
```python
|
|
130
130
|
answer = await client.query.run(
|
|
131
131
|
query="What are the top whale movements on Base?",
|
|
132
132
|
answer_model_id="glm-model", # optional: choose the final synthesis model
|
|
133
|
-
response_shape="answer_with_evidence", # optional:
|
|
133
|
+
response_shape="answer_with_evidence", # optional: answer_with_evidence (default) | evidence_only
|
|
134
134
|
include_data_url=True, # optional: persist full execution data to blob
|
|
135
135
|
include_developer_trace=True, # optional: include runtime developer trace
|
|
136
136
|
)
|
|
@@ -156,9 +156,8 @@ print(answer.orchestration_metrics) # Optional first-pass / rediscovery metrics
|
|
|
156
156
|
|
|
157
157
|
`response_shape` options:
|
|
158
158
|
|
|
159
|
-
- `
|
|
160
|
-
- `
|
|
161
|
-
- `evidence_only`: machine-friendly summary plus the same evidence package for downstream agents
|
|
159
|
+
- `answer_with_evidence` (default): prose plus `summary`, `evidence`, `artifacts`, `freshness`, `confidence`, `usage`, `outcome`, and `controller`
|
|
160
|
+
- `evidence_only`: raw fetched data, computed artifacts, and provenance for downstream agents (no prose synthesis)
|
|
162
161
|
|
|
163
162
|
Premium wedge answers can also expose `evidence.market_intelligence`, `view.rows`, `view.columns`, and the top-level controller fields `stop_reason`, `issue_class`, and `actions_taken`.
|
|
164
163
|
|
|
@@ -300,7 +299,7 @@ closed = await client.tools.close_session("sess_123")
|
|
|
300
299
|
|
|
301
300
|
#### `client.query.run(query, tools?, answer_model_id?, include_data?, include_data_url?, include_developer_trace?, idempotency_key?)`
|
|
302
301
|
|
|
303
|
-
Run an agentic query. The server applies the live librarian pipeline (`discover -> select -> iterative execute -> synthesize -> settle`) with up to 100 MCP calls per response turn, then returns the selected Query response contract (`
|
|
302
|
+
Run an agentic query. The server applies the live librarian pipeline (`discover -> select -> iterative execute -> synthesize -> settle`) with up to 100 MCP calls per response turn, then returns the selected Query response contract (`answer_with_evidence` or `evidence_only`, default `answer_with_evidence`).
|
|
304
303
|
|
|
305
304
|
`client.query.run()` buffers the same SSE transport used by `client.query.stream()` and returns the final `done` result. This keeps Python aligned with the TypeScript SDK and the live query runtime.
|
|
306
305
|
|
|
@@ -87,12 +87,12 @@ result = await client.tools.execute(
|
|
|
87
87
|
print(result.session) # method_price, spent, remaining, max_spend, ...
|
|
88
88
|
```
|
|
89
89
|
|
|
90
|
-
**Query mode** gives you a managed librarian contract — the server runs the live pipeline (`discover -> select -> iterative execute -> synthesize -> settle`) with model-aware context budgeting and
|
|
90
|
+
**Query mode** gives you a managed librarian contract — the server runs the live pipeline (`discover -> select -> iterative execute -> synthesize -> settle`) with model-aware context budgeting and returns structured evidence packages for one flat fee:
|
|
91
91
|
```python
|
|
92
92
|
answer = await client.query.run(
|
|
93
93
|
query="What are the top whale movements on Base?",
|
|
94
94
|
answer_model_id="glm-model", # optional: choose the final synthesis model
|
|
95
|
-
response_shape="answer_with_evidence", # optional:
|
|
95
|
+
response_shape="answer_with_evidence", # optional: answer_with_evidence (default) | evidence_only
|
|
96
96
|
include_data_url=True, # optional: persist full execution data to blob
|
|
97
97
|
include_developer_trace=True, # optional: include runtime developer trace
|
|
98
98
|
)
|
|
@@ -118,9 +118,8 @@ print(answer.orchestration_metrics) # Optional first-pass / rediscovery metrics
|
|
|
118
118
|
|
|
119
119
|
`response_shape` options:
|
|
120
120
|
|
|
121
|
-
- `
|
|
122
|
-
- `
|
|
123
|
-
- `evidence_only`: machine-friendly summary plus the same evidence package for downstream agents
|
|
121
|
+
- `answer_with_evidence` (default): prose plus `summary`, `evidence`, `artifacts`, `freshness`, `confidence`, `usage`, `outcome`, and `controller`
|
|
122
|
+
- `evidence_only`: raw fetched data, computed artifacts, and provenance for downstream agents (no prose synthesis)
|
|
124
123
|
|
|
125
124
|
Premium wedge answers can also expose `evidence.market_intelligence`, `view.rows`, `view.columns`, and the top-level controller fields `stop_reason`, `issue_class`, and `actions_taken`.
|
|
126
125
|
|
|
@@ -262,7 +261,7 @@ closed = await client.tools.close_session("sess_123")
|
|
|
262
261
|
|
|
263
262
|
#### `client.query.run(query, tools?, answer_model_id?, include_data?, include_data_url?, include_developer_trace?, idempotency_key?)`
|
|
264
263
|
|
|
265
|
-
Run an agentic query. The server applies the live librarian pipeline (`discover -> select -> iterative execute -> synthesize -> settle`) with up to 100 MCP calls per response turn, then returns the selected Query response contract (`
|
|
264
|
+
Run an agentic query. The server applies the live librarian pipeline (`discover -> select -> iterative execute -> synthesize -> settle`) with up to 100 MCP calls per response turn, then returns the selected Query response contract (`answer_with_evidence` or `evidence_only`, default `answer_with_evidence`).
|
|
266
265
|
|
|
267
266
|
`client.query.run()` buffers the same SSE transport used by `client.query.stream()` and returns the final `done` result. This keeps Python aligned with the TypeScript SDK and the live query runtime.
|
|
268
267
|
|
|
@@ -216,7 +216,8 @@ class Query:
|
|
|
216
216
|
tools: Optional tool IDs to use (auto-discover if not provided)
|
|
217
217
|
favorites_only: Restrict auto-discovery to favorite tools for this request
|
|
218
218
|
answer_model_id: Optional answer model ID for final synthesis
|
|
219
|
-
response_shape: Structured response mode
|
|
219
|
+
response_shape: Structured response mode (`answer_with_evidence` or
|
|
220
|
+
`evidence_only`; server default `answer_with_evidence`)
|
|
220
221
|
include_data: Include execution data inline in the query response
|
|
221
222
|
include_data_url: Persist execution data to blob and return URL
|
|
222
223
|
include_developer_trace: Include machine-readable Developer Mode traces
|
|
@@ -304,7 +305,8 @@ class Query:
|
|
|
304
305
|
tools: Optional tool IDs to use (auto-discover if not provided)
|
|
305
306
|
favorites_only: Restrict auto-discovery to favorite tools for this request
|
|
306
307
|
answer_model_id: Optional answer model ID for final synthesis
|
|
307
|
-
response_shape: Structured response mode
|
|
308
|
+
response_shape: Structured response mode (`answer_with_evidence` or
|
|
309
|
+
`evidence_only`; server default `answer_with_evidence`)
|
|
308
310
|
include_data: Include execution data inline in the query response
|
|
309
311
|
include_data_url: Persist execution data to blob and return URL
|
|
310
312
|
include_developer_trace: Include machine-readable Developer Mode traces
|
|
@@ -601,7 +601,7 @@ class ExecuteSessionResult(BaseModel):
|
|
|
601
601
|
# from the query; this is a soft hint rather than a hard switch.
|
|
602
602
|
QueryDepth = Literal["fast", "auto", "deep"]
|
|
603
603
|
QueryOutcomeType = Literal["answer", "capability_miss"]
|
|
604
|
-
QueryResponseShape = Literal["
|
|
604
|
+
QueryResponseShape = Literal["answer_with_evidence", "evidence_only"]
|
|
605
605
|
QueryAttemptForkReason = Literal[
|
|
606
606
|
"manual_fork",
|
|
607
607
|
"bounded_rediscovery",
|
|
@@ -712,13 +712,14 @@ class QueryOptions(BaseModel):
|
|
|
712
712
|
default=None,
|
|
713
713
|
alias="responseShape",
|
|
714
714
|
description=(
|
|
715
|
-
"Structured response mode.
|
|
716
|
-
"
|
|
717
|
-
"
|
|
715
|
+
"Structured response mode. Defaults to `answer_with_evidence` on the "
|
|
716
|
+
"server when omitted. The runtime always produces a grounded result "
|
|
717
|
+
"(raw data + computed artifacts + provenance); this controls whether "
|
|
718
|
+
"a prose synthesis layer is added on top. "
|
|
718
719
|
"`answer_with_evidence` returns prose plus the structured grounding "
|
|
719
720
|
"(chat parity); `evidence_only` returns grounding only with no prose "
|
|
720
721
|
"(the agent-harness shape, with raw data + computed_artifacts + "
|
|
721
|
-
"grounding by default)
|
|
722
|
+
"grounding by default)."
|
|
722
723
|
),
|
|
723
724
|
)
|
|
724
725
|
include_data: bool | None = Field(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/examples/client/polymarket_query_trace_validation.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ctxprotocol-0.15.0 → ctxprotocol-0.16.0}/examples/server/hummingbot-contributor/env.example
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|