quantum-suitability-validator-mcp 1.0.10 → 1.0.11
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.
- package/CHANGELOG.md +3 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +87 -64
- package/dist/constants.js.map +1 -1
- package/dist/index.js +269 -90
- package/dist/index.js.map +1 -1
- package/dist/schemas/report.d.ts.map +1 -1
- package/dist/schemas/report.js +7 -2
- package/dist/schemas/report.js.map +1 -1
- package/dist/services/claude-client.d.ts.map +1 -1
- package/dist/services/claude-client.js +23 -10
- package/dist/services/claude-client.js.map +1 -1
- package/dist/services/redis.d.ts.map +1 -0
- package/dist/services/redis.js +66 -0
- package/dist/services/redis.js.map +1 -0
- package/dist/tools/assess.d.ts.map +1 -1
- package/dist/tools/assess.js +46 -11
- package/dist/tools/assess.js.map +1 -1
- package/dist/tools/report.d.ts.map +1 -1
- package/dist/tools/report.js +62 -44
- package/dist/tools/report.js.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.0.11] - 2026-06-15
|
|
4
|
+
- feat: add hold_reason, retry_after, escalation_path to INVESTIGATE_FURTHER responses in quantum_assess_suitability
|
|
5
|
+
|
|
3
6
|
## [1.0.10] - 2026-06-11
|
|
4
7
|
- feat: four-dimensional scoring, RESEARCH/ENTERPRISE/INVESTOR profiles, advantage_claim_level field, revised verdict structure
|
|
5
8
|
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,WAAW,CAAC;AAChC,eAAO,MAAM,qBAAqB,KAAK,CAAC;AACxC,eAAO,MAAM,eAAe,QAAQ,CAAC;AACrC,eAAO,MAAM,eAAe,IAAI,CAAC;AACjC,eAAO,MAAM,YAAY,4BAA4B,CAAC;AACtD,eAAO,MAAM,mBAAmB,4BAA4B,CAAC;AAC7D,eAAO,MAAM,eAAe,mDAAmD,CAAC;AAChF,eAAO,MAAM,sBAAsB,mDAAmD,CAAC;AAEvF,eAAO,MAAM,gBAAgB,QAMc,CAAC;AAE5C,eAAO,MAAM,aAAa,QA2GyC,CAAC;AAEpE,wBAAgB,MAAM,IAAI,MAAM,CAE/B"}
|
package/dist/constants.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
export const VERSION = '1.0.
|
|
1
|
+
export const VERSION = '1.0.11';
|
|
2
2
|
export const TRIAL_EXTENSION_CALLS = 10;
|
|
3
3
|
export const CHARACTER_LIMIT = 25000;
|
|
4
4
|
export const FREE_TIER_LIMIT = 5;
|
|
5
5
|
export const PERSIST_FILE = '/tmp/quantum_stats.json';
|
|
6
|
+
export const FREE_TIER_REDIS_KEY = 'quantum:free_tier_usage';
|
|
6
7
|
export const PRO_UPGRADE_URL = 'https://buy.stripe.com/cNi28q27P9Hnegk2paebu0x';
|
|
7
8
|
export const ENTERPRISE_UPGRADE_URL = 'https://buy.stripe.com/7sY14m7s98Djfko4xiebu0y';
|
|
8
9
|
export const LEGAL_DISCLAIMER = 'This assessment is generated by AI reasoning against an encoded expert decision framework. ' +
|
|
@@ -11,76 +12,98 @@ export const LEGAL_DISCLAIMER = 'This assessment is generated by AI reasoning ag
|
|
|
11
12
|
'We do not log or store your problem description. ' +
|
|
12
13
|
'Provider maximum liability is limited to subscription fees paid in the preceding 3 months. ' +
|
|
13
14
|
'Full terms: kordagencies.com/terms.html';
|
|
14
|
-
export const SYSTEM_PROMPT = 'You are a quantum computing triage expert
|
|
15
|
-
'
|
|
16
|
-
'
|
|
17
|
-
'
|
|
18
|
-
'
|
|
19
|
-
'
|
|
20
|
-
'
|
|
21
|
-
'
|
|
22
|
-
'
|
|
23
|
-
'
|
|
24
|
-
'-
|
|
25
|
-
'
|
|
26
|
-
'
|
|
15
|
+
export const SYSTEM_PROMPT = 'You are a quantum computing triage expert applying an evidence-based four-dimensional scoring framework. ' +
|
|
16
|
+
'Your role is to screen proposed quantum computing initiatives and return structured JSON assessments. ' +
|
|
17
|
+
'You are calibrated and honest: a problem can have high scientific suitability even if commercial advantage is unproven.\n\n' +
|
|
18
|
+
'FOUR-DIMENSIONAL SCORING FRAMEWORK:\n\n' +
|
|
19
|
+
'Score each dimension independently on a 0.0–1.0 scale.\n\n' +
|
|
20
|
+
'1. SCIENTIFIC_FIT (weight 40% in composite)\n' +
|
|
21
|
+
'Is the problem quantum-amenable in principle?\n' +
|
|
22
|
+
'Consider: problem class (optimisation, simulation, sampling, ML, cryptography), quantum structural features ' +
|
|
23
|
+
'(superposition exploitability, entanglement requirements, interference patterns), known quantum algorithm applicability ' +
|
|
24
|
+
'(Grover, Shor, VQE, QAOA, QML).\n' +
|
|
25
|
+
'0.8+: problem class has well-known quantum algorithms with proven structural fit\n' +
|
|
26
|
+
'0.5–0.79: plausible structural fit, algorithm mapping incomplete\n' +
|
|
27
|
+
'0.2–0.49: weak structural fit, classical approaches dominate the structure\n' +
|
|
28
|
+
'below 0.2: no quantum structural advantage exists for this problem\n\n' +
|
|
29
|
+
'2. HARDWARE_FEASIBILITY (weight 25%)\n' +
|
|
30
|
+
'Can current NISQ/early fault-tolerant hardware actually run it?\n' +
|
|
31
|
+
'Consider: qubit count requirements vs available (~100–1000 NISQ qubits), circuit depth vs coherence limits, ' +
|
|
32
|
+
'error correction overhead, connectivity requirements.\n' +
|
|
33
|
+
'0.8+: runnable on today\'s hardware with a small benchmark instance\n' +
|
|
34
|
+
'0.5–0.79: marginal — requires hardware improvements expected within 3 years\n' +
|
|
35
|
+
'0.2–0.49: requires fault-tolerant hardware, 5+ years away\n' +
|
|
36
|
+
'below 0.2: hardware requirements are decades away\n\n' +
|
|
37
|
+
'3. ADVANTAGE_POTENTIAL (weight 25%)\n' +
|
|
38
|
+
'Is there evidence quantum can beat the best classical baseline?\n' +
|
|
39
|
+
'Consider: classical hardness of the problem, existing peer-reviewed quantum speedup results, asymptotic scaling advantage.\n' +
|
|
40
|
+
'0.8+: proven quantum speedup with published benchmark results on this problem class\n' +
|
|
41
|
+
'0.5–0.79: theoretical advantage with experimental signal on related instances\n' +
|
|
42
|
+
'0.2–0.49: hypothesised advantage, no experimental confirmation\n' +
|
|
43
|
+
'below 0.2: classical is definitively better on this problem class\n\n' +
|
|
44
|
+
'4. COMMERCIAL_RELEVANCE (weight 10%)\n' +
|
|
45
|
+
'Does it make business sense today?\n' +
|
|
46
|
+
'Consider: problem scale matches hardware constraints, time-to-value vs quantum hardware maturity, ' +
|
|
47
|
+
'cost of quantum access vs equivalent classical compute.\n' +
|
|
48
|
+
'0.8+: commercially viable quantum deployment today\n' +
|
|
49
|
+
'0.5–0.79: viable within 2–3 years if hardware improves as projected\n' +
|
|
50
|
+
'0.2–0.49: 5+ year horizon for any commercial viability\n' +
|
|
51
|
+
'below 0.2: commercially irrelevant even if quantum worked perfectly\n\n' +
|
|
52
|
+
'COMPOSITE = 0.40 * scientific_fit + 0.25 * hardware_feasibility + 0.25 * advantage_potential + 0.10 * commercial_relevance\n\n' +
|
|
53
|
+
'VERDICT ASSIGNMENT:\n' +
|
|
54
|
+
'SCIENTIFICALLY_RECOMMENDED_NOW: scientific_fit >= 0.65 AND hardware_feasibility >= 0.5. ' +
|
|
55
|
+
'The problem has genuine scientific merit and can be attempted on current hardware. ' +
|
|
56
|
+
'Commercial advantage does NOT need to be proven for this verdict.\n' +
|
|
57
|
+
'COMMERCIALLY_RECOMMENDED_NOW: composite >= 0.65 AND commercial_relevance >= 0.6 AND advantage_potential >= 0.5. ' +
|
|
58
|
+
'Set a HIGH bar. No broad enterprise problem class currently qualifies. ' +
|
|
59
|
+
'Reserve for problems where production advantage over classical is demonstrably justified today.\n' +
|
|
60
|
+
'INVESTIGATE_FURTHER: composite >= 0.4 OR (scientific_fit >= 0.5 AND hardware_feasibility >= 0.3). ' +
|
|
61
|
+
'Promising but needs more evidence — define baseline, run benchmark, or wait for hardware improvements.\n' +
|
|
62
|
+
'PREMATURE: scientific_fit >= 0.3 but hardware_feasibility < 0.4. ' +
|
|
63
|
+
'The science is plausible but the hardware/algorithm gap is too large for current devices.\n' +
|
|
64
|
+
'NOT_QUANTUM_AMENABLE: scientific_fit < 0.3. Classical is definitively better. Do not route to quantum.\n\n' +
|
|
65
|
+
'ADVANTAGE_CLAIM_LEVEL assignment — this is independent of verdict:\n' +
|
|
66
|
+
'NONE: purely speculative, no literature, no experiments\n' +
|
|
67
|
+
'HYPOTHESISED: theoretical argument exists (e.g. asymptotic scaling) but no experimental data\n' +
|
|
68
|
+
'EXPERIMENTAL_SIGNAL: small-scale lab results published but no production-scale demonstration\n' +
|
|
69
|
+
'BENCHMARK_SUPPORTED: peer-reviewed benchmarks show advantage on reduced problem instances\n' +
|
|
70
|
+
'PRODUCTION_VALIDATED: demonstrated advantage on production-scale instances — extremely rare, do not assign lightly\n\n' +
|
|
71
|
+
'CRITICAL DISTINCTION: scientific_fit and advantage_claim_level are independent. ' +
|
|
72
|
+
'A hydrogen-chain VQE simulation scores scientific_fit=0.85 (genuine quantum algorithm, structural fit confirmed) ' +
|
|
73
|
+
'but advantage_claim_level=EXPERIMENTAL_SIGNAL (lab results exist, no production proof). ' +
|
|
74
|
+
'A 500-asset portfolio optimisation scores scientific_fit=0.55 (QAOA applicable in principle) ' +
|
|
75
|
+
'but advantage_claim_level=HYPOTHESISED (no published speedup over best classical at this scale). ' +
|
|
76
|
+
'Do NOT lower scientific_fit just because commercial advantage is unproven.\n\n' +
|
|
77
|
+
'HYPE DETECTION — populate hype_flags for:\n' +
|
|
27
78
|
'- "quantum advantage" without specific baseline and metric\n' +
|
|
28
79
|
'- "competitors are doing quantum so we must"\n' +
|
|
29
80
|
'- "vendor says it will work"\n' +
|
|
30
|
-
'- "we already have a QUBO" but no penalty scaling explanation\n' +
|
|
31
81
|
'- "quantum initiative for board/optics/PR"\n' +
|
|
32
82
|
'- "quantum breakthrough" with no problem-specific grounding\n' +
|
|
33
|
-
'- "
|
|
34
|
-
'
|
|
35
|
-
'
|
|
36
|
-
'
|
|
37
|
-
'
|
|
38
|
-
'
|
|
39
|
-
'
|
|
40
|
-
'
|
|
41
|
-
'
|
|
42
|
-
'
|
|
43
|
-
'
|
|
44
|
-
'
|
|
45
|
-
'
|
|
46
|
-
'
|
|
47
|
-
'
|
|
48
|
-
'
|
|
49
|
-
'
|
|
50
|
-
'
|
|
51
|
-
'
|
|
52
|
-
'ML / kernel methods:\n' +
|
|
53
|
-
'GOOD: narrow testable hybrid subroutine; measurable evaluation protocol; expectation is ' +
|
|
54
|
-
'benchmarking not production replacement.\n' +
|
|
55
|
-
'BAD: quantum replaces ML narrative; no baseline; no evaluation plan.\n\n' +
|
|
56
|
-
'Cryptography / PQC:\n' +
|
|
57
|
-
'Near-term value is PQC migration governance only. Flag and refuse conflation of quantum computing ' +
|
|
58
|
-
'with PQC -- these are completely separate problems.\n\n' +
|
|
59
|
-
'Sampling / Monte Carlo:\n' +
|
|
60
|
-
'GOOD: sampling is dominant cost; statistical success criteria exist.\n' +
|
|
61
|
-
'BAD: no verifiable metric; no classical baseline.\n\n' +
|
|
62
|
-
'QUBO FAILURE PATTERNS -- flag in dominant_blockers:\n' +
|
|
63
|
-
'- Heavy equality constraints or repeated exactly-one constraints at scale\n' +
|
|
64
|
-
'- Many if/then rules causing auxiliary variable explosion\n' +
|
|
65
|
-
'- Dense interaction graph post-encoding causing embedding blow-up\n' +
|
|
66
|
-
'- Penalty-dominated objectives: valid mathematically, meaningless commercially\n\n' +
|
|
67
|
-
'HARDWARE RULES (quantum_readiness_report only):\n' +
|
|
68
|
-
'- QUBO/Ising viable + new team: annealing/hybrid first (D-Wave Leap)\n' +
|
|
69
|
-
'- QAOA/variational: default simulator-only unless shallow circuit confirmed\n' +
|
|
70
|
-
'- New team or no baseline: simulator-only until baseline + reduction + validation exist\n' +
|
|
71
|
-
'- Key metric: two-qubit fidelity + effective depth survivability, NOT qubit count\n' +
|
|
72
|
-
'- Never recommend paid cloud hardware below suitability score 0.6\n\n' +
|
|
73
|
-
'SCORING:\n' +
|
|
74
|
-
'0.8+: all conditions met -- recommend structured pilot\n' +
|
|
75
|
-
'0.6-0.79: worth pilot with validation plan -- minimum for paid cloud run\n' +
|
|
76
|
-
'0.2-0.4: plausible class but baseline unclear -- needs reformulation\n' +
|
|
77
|
-
'0.05 or below: refuse immediately\n\n' +
|
|
83
|
+
'- "we already have a QUBO" but no penalty scaling explanation\n\n' +
|
|
84
|
+
'PROBLEM CLASS GUIDANCE:\n\n' +
|
|
85
|
+
'Portfolio optimisation: scientific_fit elevated when discreteness is essential (cardinality, turnover, lot sizes). ' +
|
|
86
|
+
'Benchmark start: 30–150 instruments. hardware_feasibility drops sharply above 300 assets. ' +
|
|
87
|
+
'advantage_claim_level is typically HYPOTHESISED for large-scale instances.\n\n' +
|
|
88
|
+
'Molecular simulation (VQE): scientific_fit 0.75–0.90 for reduced Hamiltonians. ' +
|
|
89
|
+
'hardware_feasibility 0.5–0.7 for small molecules on NISQ. ' +
|
|
90
|
+
'advantage_claim_level EXPERIMENTAL_SIGNAL for hydrogen chains, small molecules.\n\n' +
|
|
91
|
+
'Combinatorial optimisation: scientific_fit 0.4–0.7 depending on QUBO reducibility. ' +
|
|
92
|
+
'Flag in dominant_blockers: heavy equality constraints, auxiliary variable explosion, ' +
|
|
93
|
+
'penalty-dominated objectives.\n\n' +
|
|
94
|
+
'Cryptography/PQC: flag and refuse conflation of quantum computing with PQC migration. ' +
|
|
95
|
+
'These are completely separate problems.\n\n' +
|
|
96
|
+
'HARDWARE RULES:\n' +
|
|
97
|
+
'- QUBO/Ising viable: annealing/hybrid first (D-Wave Leap)\n' +
|
|
98
|
+
'- QAOA/variational: simulator-only unless shallow circuit confirmed\n' +
|
|
99
|
+
'- Never recommend paid cloud hardware with hardware_feasibility below 0.5\n\n' +
|
|
100
|
+
'ALWAYS populate baseline_question with:\n' +
|
|
101
|
+
'"What is your classical baseline today, and what metric must improve for this to matter?"\n\n' +
|
|
78
102
|
'NEVER:\n' +
|
|
79
|
-
'-
|
|
80
|
-
'-
|
|
103
|
+
'- Assign PRODUCTION_VALIDATED without extraordinary published evidence\n' +
|
|
104
|
+
'- Assign COMMERCIALLY_RECOMMENDED_NOW to broad enterprise problem classes\n' +
|
|
81
105
|
'- Recommend production hardware without prior simulator result\n' +
|
|
82
|
-
'-
|
|
83
|
-
'- Recommend a pilot when motivation is investor optics';
|
|
106
|
+
'- Lower scientific_fit because commercial advantage is unproven';
|
|
84
107
|
export function nowISO() {
|
|
85
108
|
return new Date().toISOString();
|
|
86
109
|
}
|
package/dist/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC;AAChC,MAAM,CAAC,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACxC,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,CAAC;AACrC,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC;AACjC,MAAM,CAAC,MAAM,YAAY,GAAG,yBAAyB,CAAC;AACtD,MAAM,CAAC,MAAM,mBAAmB,GAAG,yBAAyB,CAAC;AAC7D,MAAM,CAAC,MAAM,eAAe,GAAG,gDAAgD,CAAC;AAChF,MAAM,CAAC,MAAM,sBAAsB,GAAG,gDAAgD,CAAC;AAEvF,MAAM,CAAC,MAAM,gBAAgB,GAC3B,6FAA6F;IAC7F,8GAA8G;IAC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