qcoder 0.5.0a7__tar.gz → 0.5.0a8__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.
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/CHANGELOG.md +8 -10
- {qcoder-0.5.0a7/src/qcoder.egg-info → qcoder-0.5.0a8}/PKG-INFO +6 -13
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/README.md +5 -10
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/pyproject.toml +1 -3
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/__init__.py +1 -1
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/cli.py +20 -54
- qcoder-0.5.0a8/src/qcoder/context_bridge_mcp.py +498 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/engines/feature_extraction/qasm2_regex_parser.py +1 -1
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/explorer/derived_evidence.py +1 -1
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/pipelines/analyze.py +1 -1
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/pipelines/review.py +1 -1
- {qcoder-0.5.0a7 → qcoder-0.5.0a8/src/qcoder.egg-info}/PKG-INFO +6 -13
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder.egg-info/SOURCES.txt +1 -3
- qcoder-0.5.0a7/src/qcoder/mcp/__init__.py +0 -5
- qcoder-0.5.0a7/src/qcoder/mcp/server.py +0 -87
- qcoder-0.5.0a7/src/qcoder/mcp/tools.py +0 -334
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/LICENSE +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/MANIFEST.in +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/NOTICE +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/setup.cfg +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/__main__.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/core/__init__.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/core/context.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/core/qasm2/__init__.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/core/qasm2/adjoint_eligibility.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/core/qasm2/mirror_build.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/core/run_config.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/core/schema.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/core/share_safe.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/engines/context/__init__.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/engines/context/bundle.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/engines/context/markdown.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/engines/feature_extraction/adapters/__init__.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/engines/feature_extraction/adapters/cirq_intake.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/engines/feature_extraction/adapters/pennylane_intake.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/engines/feature_extraction/adapters/qiskit_intake.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/engines/feature_extraction/extractor.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/engines/feature_extraction/features/compute_v0.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/engines/feature_extraction/features/glossary_v0.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/engines/feature_extraction/features/schema_v0.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/engines/feature_extraction/ir.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/engines/feature_extraction/labeling.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/engines/feature_extraction/parsers/__init__.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/engines/feature_extraction/reps/cut_profile.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/engines/feature_extraction/reps/depth.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/engines/feature_extraction/reps/entangling_layers.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/engines/feature_extraction/reps/gate_set_stats.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/engines/feature_extraction/reps/interaction_graph.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/engines/feature_extraction/reps/interaction_graph_metrics.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/engines/feature_extraction/reps/spans.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/engines/guidance/__init__.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/engines/guidance/model_pack.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/engines/guidance/resource.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/engines/guidance/structural_scores.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/engines/profiles/__init__.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/engines/profiles/feature_profiles_v0.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/engines/review/__init__.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/engines/review/bundle.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/engines/review/counts_v0.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/engines/review/markdown.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/engines/review/qiskit_counts.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/explorer/__init__.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/model_packs/__init__.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/model_packs/resource_guidance_local_v0.json +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/pipelines/batch.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/pipelines/context.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/pro_preview/__init__.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/pro_preview/client.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/pro_preview/config.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/pro_preview/errors.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/pro_preview/manifest.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder/tools/batch.py +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder.egg-info/dependency_links.txt +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder.egg-info/entry_points.txt +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder.egg-info/requires.txt +0 -0
- {qcoder-0.5.0a7 → qcoder-0.5.0a8}/src/qcoder.egg-info/top_level.txt +0 -0
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
## 0.5.
|
|
5
|
-
|
|
6
|
-
- Add
|
|
7
|
-
- Add
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
- Preserve launch boundaries: no public hosted MCP claim, no live service calls from MCP, no token requirement, no autonomous code modification, no QPU/simulator submission, and no runtime/fidelity/backend/QPU/correctness/advantage claims.
|
|
13
|
-
- This is release-candidate preparation only until separately published.
|
|
4
|
+
## 0.5.0a8
|
|
5
|
+
|
|
6
|
+
- Add `qcoder context-bridge mcp serve`, a stdio Context Bridge MCP adapter for eligible Explorer users.
|
|
7
|
+
- Add `qcoder context-bridge mcp smoke --token-file <path> --json` for sanitized install verification.
|
|
8
|
+
- Expose only the approved Context Bridge tools: guided evidence context, prompt context, Evidence Context Pack, Context Session Card, and Run Readiness Card.
|
|
9
|
+
- Read Context Bridge tokens from a local token file only; token values are not printed and are not required in IDE config.
|
|
10
|
+
- Reject raw QASM, raw counts, paths, unsupported artifact lookup, unknown tools, and non-current-context inputs before forwarding.
|
|
11
|
+
- Preserve qCoder OSS local commands, Explorer evidence commands, and archived Pro shell boundaries.
|
|
14
12
|
|
|
15
13
|
|
|
16
14
|
## 0.5.0a6
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: qcoder
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.0a8
|
|
4
4
|
Summary: Quantum circuit analysis and structured feature extraction tools.
|
|
5
5
|
Author-email: Quantum Ready Solutions <support@qcoder.ai>
|
|
6
6
|
Maintainer-email: Quantum Ready Solutions <support@qcoder.ai>
|
|
@@ -15,8 +15,6 @@ Classifier: Intended Audience :: Science/Research
|
|
|
15
15
|
Classifier: Topic :: Scientific/Engineering
|
|
16
16
|
Classifier: Programming Language :: Python :: 3
|
|
17
17
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
20
18
|
Requires-Python: >=3.11
|
|
21
19
|
Description-Content-Type: text/markdown
|
|
22
20
|
License-File: LICENSE
|
|
@@ -42,17 +40,18 @@ The current public local path is **qCoder OSS**. OSS commands run locally and do
|
|
|
42
40
|
- `qcoder batch`
|
|
43
41
|
- `qcoder context`
|
|
44
42
|
- `qcoder review`
|
|
45
|
-
- `qcoder mcp` (local read-only Cursor MCP tools)
|
|
46
43
|
- `qcoder explorer` (Explorer Beta account-backed status/demo/evidence checks)
|
|
44
|
+
- `qcoder context-bridge` (token-backed Context Bridge MCP adapter for eligible Explorer users)
|
|
47
45
|
- `qcoder student` (temporary compatibility alias for Explorer Beta)
|
|
48
46
|
- `qcoder pro` (archived pilot/bootstrap client contract; non-confidential local plumbing only, not a current public product path)
|
|
49
47
|
|
|
50
48
|
## Current product boundaries
|
|
51
49
|
|
|
52
|
-
Public `qcoder` ships **OSS local commands
|
|
50
|
+
Public `qcoder` ships **OSS local commands**, Explorer Beta compatibility commands, and the Context Bridge adapter command for eligible Explorer users. Pro is not launched and is not a current public product path.
|
|
53
51
|
|
|
54
52
|
- **OSS commands** (`analyze`, `batch`, `context`, `review`) are Apache-2.0, local-first/offline, and useful without an account or token. They do not upload data, call a qCoder hosted service, or run QPU/simulator jobs.
|
|
55
53
|
- **Explorer Beta commands** (`qcoder explorer status`, `qcoder explorer demo`, `qcoder explorer evidence`) are account-backed checks for Explorer Beta status, built-in guided evidence samples, and derived-context guided evidence for user-owned OpenQASM 2 artifacts. The older `qcoder student ...` commands remain available as beta compatibility aliases.
|
|
54
|
+
- **Context Bridge adapter commands** (`qcoder context-bridge mcp serve`, `qcoder context-bridge mcp smoke`) are for eligible Explorer users with support-managed Context Bridge token access. They expose bounded current-evidence context tools to configured MCP clients and read tokens from a local token file.
|
|
56
55
|
- Explorer Beta custom evidence uses locally derived qCoder context/features. The CLI may read QASM locally, but the hosted request must not include raw QASM, raw source text, local paths, operation lists, raw counts, notebooks, prompts, tokens, auth headers, or cookies.
|
|
57
56
|
- Explorer Beta custom evidence is stateless in this v0 slice; it does not create persistent Explorer history.
|
|
58
57
|
- **`qcoder pro` bootstrap/workflow commands** are archived pilot/client-contract surfaces. They are not a Pro purchase path, not a current public signup path, and not generally available hosted Pro.
|
|
@@ -90,14 +89,6 @@ qcoder review --counts-json counts.json --format qiskit_counts --preflight-json
|
|
|
90
89
|
|
|
91
90
|
Share-safe mode is designed for safer sharing: it redacts local paths and token/header-like strings, adds `share_safe=true`, and marks raw QASM/local paths/tokens as not included. Review artifacts before sharing; this is not a guarantee that all sensitive project content has been removed.
|
|
92
91
|
|
|
93
|
-
Local Cursor MCP:
|
|
94
|
-
|
|
95
|
-
```bash
|
|
96
|
-
qcoder mcp serve
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
The MCP server uses explicit user-selected local inputs only. It reads, inspects, explains, bounds, and recommends; it does not execute circuits, modify user code, read arbitrary files, call live services, or require tokens. See [Explorer Evidence-Grounded Coding Loop](examples/08_explorer_evidence_grounded_coding_loop.md) for the manual artifact loop, Cursor MCP setup, and claim boundaries.
|
|
100
|
-
|
|
101
92
|
Explorer Beta compatibility checks and archived Pro bootstrap:
|
|
102
93
|
|
|
103
94
|
```bash
|
|
@@ -107,6 +98,8 @@ qcoder explorer evidence
|
|
|
107
98
|
qcoder explorer evidence --qasm path/to/circuit.qasm
|
|
108
99
|
qcoder explorer evidence --context-json preflight.context.json
|
|
109
100
|
qcoder explorer evidence --qasm path/to/circuit.qasm --out-json explorer.json --out-md explorer.md --share-safe
|
|
101
|
+
qcoder context-bridge mcp serve --help
|
|
102
|
+
qcoder context-bridge mcp smoke --token-file ~/.qcoder/context-bridge/token.txt --json
|
|
110
103
|
qcoder pro --help
|
|
111
104
|
```
|
|
112
105
|
|
|
@@ -10,17 +10,18 @@ The current public local path is **qCoder OSS**. OSS commands run locally and do
|
|
|
10
10
|
- `qcoder batch`
|
|
11
11
|
- `qcoder context`
|
|
12
12
|
- `qcoder review`
|
|
13
|
-
- `qcoder mcp` (local read-only Cursor MCP tools)
|
|
14
13
|
- `qcoder explorer` (Explorer Beta account-backed status/demo/evidence checks)
|
|
14
|
+
- `qcoder context-bridge` (token-backed Context Bridge MCP adapter for eligible Explorer users)
|
|
15
15
|
- `qcoder student` (temporary compatibility alias for Explorer Beta)
|
|
16
16
|
- `qcoder pro` (archived pilot/bootstrap client contract; non-confidential local plumbing only, not a current public product path)
|
|
17
17
|
|
|
18
18
|
## Current product boundaries
|
|
19
19
|
|
|
20
|
-
Public `qcoder` ships **OSS local commands
|
|
20
|
+
Public `qcoder` ships **OSS local commands**, Explorer Beta compatibility commands, and the Context Bridge adapter command for eligible Explorer users. Pro is not launched and is not a current public product path.
|
|
21
21
|
|
|
22
22
|
- **OSS commands** (`analyze`, `batch`, `context`, `review`) are Apache-2.0, local-first/offline, and useful without an account or token. They do not upload data, call a qCoder hosted service, or run QPU/simulator jobs.
|
|
23
23
|
- **Explorer Beta commands** (`qcoder explorer status`, `qcoder explorer demo`, `qcoder explorer evidence`) are account-backed checks for Explorer Beta status, built-in guided evidence samples, and derived-context guided evidence for user-owned OpenQASM 2 artifacts. The older `qcoder student ...` commands remain available as beta compatibility aliases.
|
|
24
|
+
- **Context Bridge adapter commands** (`qcoder context-bridge mcp serve`, `qcoder context-bridge mcp smoke`) are for eligible Explorer users with support-managed Context Bridge token access. They expose bounded current-evidence context tools to configured MCP clients and read tokens from a local token file.
|
|
24
25
|
- Explorer Beta custom evidence uses locally derived qCoder context/features. The CLI may read QASM locally, but the hosted request must not include raw QASM, raw source text, local paths, operation lists, raw counts, notebooks, prompts, tokens, auth headers, or cookies.
|
|
25
26
|
- Explorer Beta custom evidence is stateless in this v0 slice; it does not create persistent Explorer history.
|
|
26
27
|
- **`qcoder pro` bootstrap/workflow commands** are archived pilot/client-contract surfaces. They are not a Pro purchase path, not a current public signup path, and not generally available hosted Pro.
|
|
@@ -58,14 +59,6 @@ qcoder review --counts-json counts.json --format qiskit_counts --preflight-json
|
|
|
58
59
|
|
|
59
60
|
Share-safe mode is designed for safer sharing: it redacts local paths and token/header-like strings, adds `share_safe=true`, and marks raw QASM/local paths/tokens as not included. Review artifacts before sharing; this is not a guarantee that all sensitive project content has been removed.
|
|
60
61
|
|
|
61
|
-
Local Cursor MCP:
|
|
62
|
-
|
|
63
|
-
```bash
|
|
64
|
-
qcoder mcp serve
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
The MCP server uses explicit user-selected local inputs only. It reads, inspects, explains, bounds, and recommends; it does not execute circuits, modify user code, read arbitrary files, call live services, or require tokens. See [Explorer Evidence-Grounded Coding Loop](examples/08_explorer_evidence_grounded_coding_loop.md) for the manual artifact loop, Cursor MCP setup, and claim boundaries.
|
|
68
|
-
|
|
69
62
|
Explorer Beta compatibility checks and archived Pro bootstrap:
|
|
70
63
|
|
|
71
64
|
```bash
|
|
@@ -75,6 +68,8 @@ qcoder explorer evidence
|
|
|
75
68
|
qcoder explorer evidence --qasm path/to/circuit.qasm
|
|
76
69
|
qcoder explorer evidence --context-json preflight.context.json
|
|
77
70
|
qcoder explorer evidence --qasm path/to/circuit.qasm --out-json explorer.json --out-md explorer.md --share-safe
|
|
71
|
+
qcoder context-bridge mcp serve --help
|
|
72
|
+
qcoder context-bridge mcp smoke --token-file ~/.qcoder/context-bridge/token.txt --json
|
|
78
73
|
qcoder pro --help
|
|
79
74
|
```
|
|
80
75
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "qcoder"
|
|
7
|
-
version = "0.5.
|
|
7
|
+
version = "0.5.0a8"
|
|
8
8
|
description = "Quantum circuit analysis and structured feature extraction tools."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.11"
|
|
@@ -23,8 +23,6 @@ classifiers = [
|
|
|
23
23
|
"Topic :: Scientific/Engineering",
|
|
24
24
|
"Programming Language :: Python :: 3",
|
|
25
25
|
"Programming Language :: Python :: 3 :: Only",
|
|
26
|
-
"Programming Language :: Python :: 3.11",
|
|
27
|
-
"Programming Language :: Python :: 3.12",
|
|
28
26
|
]
|
|
29
27
|
dependencies = ["numpy"]
|
|
30
28
|
|
|
@@ -3,7 +3,6 @@ from __future__ import annotations
|
|
|
3
3
|
import argparse
|
|
4
4
|
import json
|
|
5
5
|
import sys
|
|
6
|
-
from json import JSONDecodeError
|
|
7
6
|
from pathlib import Path
|
|
8
7
|
|
|
9
8
|
from qcoder.pipelines.analyze import analyze_qasm
|
|
@@ -285,29 +284,14 @@ def _cmd_review(argv: list[str]) -> int:
|
|
|
285
284
|
)
|
|
286
285
|
args = p.parse_args(argv)
|
|
287
286
|
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
)
|
|
297
|
-
except JSONDecodeError as exc:
|
|
298
|
-
print(
|
|
299
|
-
f"qcoder review: input JSON could not be parsed at line {exc.lineno}, column {exc.colno}. "
|
|
300
|
-
"Check that the counts/preflight file is UTF-8 JSON.",
|
|
301
|
-
file=sys.stderr,
|
|
302
|
-
)
|
|
303
|
-
return 2
|
|
304
|
-
except ValueError as exc:
|
|
305
|
-
print(
|
|
306
|
-
f"qcoder review: {exc}. For Qiskit counts, use --format qiskit_counts with a JSON object "
|
|
307
|
-
'like {"00": 10, "11": 6} or {"counts": {"00": 10, "11": 6}}.',
|
|
308
|
-
file=sys.stderr,
|
|
309
|
-
)
|
|
310
|
-
return 2
|
|
287
|
+
write_execution_review(
|
|
288
|
+
counts_json=args.counts_json,
|
|
289
|
+
counts_format=args.counts_format,
|
|
290
|
+
preflight_json=args.preflight_json,
|
|
291
|
+
out_json=args.out_json,
|
|
292
|
+
out_md=args.out_md,
|
|
293
|
+
share_safe=args.share_safe,
|
|
294
|
+
)
|
|
311
295
|
json_label = "<redacted-local-path>" if args.share_safe else args.out_json
|
|
312
296
|
md_label = "<redacted-local-path>" if args.share_safe else args.out_md
|
|
313
297
|
print(f"Wrote execution review JSON to {json_label}", file=sys.stderr)
|
|
@@ -315,30 +299,6 @@ def _cmd_review(argv: list[str]) -> int:
|
|
|
315
299
|
return 0
|
|
316
300
|
|
|
317
301
|
|
|
318
|
-
def _cmd_mcp(argv: list[str]) -> int:
|
|
319
|
-
p = argparse.ArgumentParser(
|
|
320
|
-
prog="qcoder mcp",
|
|
321
|
-
add_help=True,
|
|
322
|
-
description=(
|
|
323
|
-
"Local read-only qCoder MCP for Cursor. Uses explicit user-selected inputs only; "
|
|
324
|
-
"does not execute circuits, modify code, use tokens, or call live services."
|
|
325
|
-
),
|
|
326
|
-
)
|
|
327
|
-
sub = p.add_subparsers(dest="mcp_command")
|
|
328
|
-
p_serve = sub.add_parser("serve", help="Serve qCoder tools over MCP stdio.")
|
|
329
|
-
p_serve.set_defaults(mcp_command="serve")
|
|
330
|
-
args = p.parse_args(argv)
|
|
331
|
-
if args.mcp_command is None:
|
|
332
|
-
p.print_help()
|
|
333
|
-
return 0
|
|
334
|
-
if args.mcp_command == "serve":
|
|
335
|
-
from qcoder.mcp.server import serve_stdio
|
|
336
|
-
|
|
337
|
-
return serve_stdio()
|
|
338
|
-
p.print_help()
|
|
339
|
-
return 0
|
|
340
|
-
|
|
341
|
-
|
|
342
302
|
def _run_pro_preview_demo_check(
|
|
343
303
|
*,
|
|
344
304
|
base_url_override: str | None,
|
|
@@ -859,6 +819,12 @@ def _cmd_student(argv: list[str]) -> int:
|
|
|
859
819
|
return _cmd_explorer(argv, compatibility_alias=True)
|
|
860
820
|
|
|
861
821
|
|
|
822
|
+
def _cmd_context_bridge(argv: list[str]) -> int:
|
|
823
|
+
from qcoder.context_bridge_mcp import main as context_bridge_main
|
|
824
|
+
|
|
825
|
+
return context_bridge_main(argv)
|
|
826
|
+
|
|
827
|
+
|
|
862
828
|
def _cmd_pro(argv: list[str]) -> int:
|
|
863
829
|
p = argparse.ArgumentParser(
|
|
864
830
|
prog="qcoder pro",
|
|
@@ -1240,16 +1206,16 @@ def _cmd_pro(argv: list[str]) -> int:
|
|
|
1240
1206
|
|
|
1241
1207
|
def _print_root_help() -> None:
|
|
1242
1208
|
print(
|
|
1243
|
-
"usage: qcoder [--version | -V] [-h] {analyze,batch,context,review,
|
|
1209
|
+
"usage: qcoder [--version | -V] [-h] {analyze,batch,context,review,explorer,context-bridge,pro,student} ...\n\n"
|
|
1244
1210
|
"Quantum circuit analysis CLI.\n\n"
|
|
1245
1211
|
"positional arguments:\n"
|
|
1246
|
-
" {analyze,batch,context,review,
|
|
1212
|
+
" {analyze,batch,context,review,explorer,context-bridge,pro,student} subcommand\n\n"
|
|
1247
1213
|
" analyze Analyze a QASM file (feature extraction + metadata + run config).\n"
|
|
1248
1214
|
" batch Batch extract a directory to JSONL (requires --out).\n"
|
|
1249
1215
|
" context Build deterministic preflight context artifacts.\n"
|
|
1250
1216
|
" review Build deterministic execution review artifacts from counts.\n"
|
|
1251
|
-
" mcp Serve local read-only qCoder tools for Cursor over MCP stdio.\n"
|
|
1252
1217
|
" explorer Explorer Beta status/demo/evidence checks.\n"
|
|
1218
|
+
" context-bridge Run the Context Bridge MCP adapter for eligible Explorer users.\n"
|
|
1253
1219
|
" pro Archived Pro client-contract shell (not current public product).\n"
|
|
1254
1220
|
" student Compatibility alias for Explorer Beta checks.\n\n"
|
|
1255
1221
|
"Run `qcoder <subcommand> --help` for subcommand options.",
|
|
@@ -1280,17 +1246,17 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
1280
1246
|
return _cmd_context(rest)
|
|
1281
1247
|
if cmd == "review":
|
|
1282
1248
|
return _cmd_review(rest)
|
|
1283
|
-
if cmd == "mcp":
|
|
1284
|
-
return _cmd_mcp(rest)
|
|
1285
1249
|
if cmd == "explorer":
|
|
1286
1250
|
return _cmd_explorer(rest)
|
|
1251
|
+
if cmd == "context-bridge":
|
|
1252
|
+
return _cmd_context_bridge(rest)
|
|
1287
1253
|
if cmd == "pro":
|
|
1288
1254
|
return _cmd_pro(rest)
|
|
1289
1255
|
if cmd == "student":
|
|
1290
1256
|
return _cmd_student(rest)
|
|
1291
1257
|
|
|
1292
1258
|
print(
|
|
1293
|
-
f"qcoder: unknown subcommand {cmd!r} (expected analyze, batch, context, review,
|
|
1259
|
+
f"qcoder: unknown subcommand {cmd!r} (expected analyze, batch, context, review, explorer, context-bridge, pro, or student)",
|
|
1294
1260
|
file=sys.stderr,
|
|
1295
1261
|
)
|
|
1296
1262
|
print("Run `qcoder --help` for usage.", file=sys.stderr)
|