agentic-qe 3.7.21 → 3.8.0
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/.claude/helpers/brain-checkpoint.cjs +4 -1
- package/.claude/helpers/statusline-v3.cjs +3 -1
- package/.claude/skills/skills-manifest.json +1 -1
- package/CHANGELOG.md +45 -0
- package/README.md +2 -14
- package/assets/helpers/statusline-v3.cjs +3 -1
- package/dist/cli/brain-commands.js +6 -10
- package/dist/cli/bundle.js +7441 -4327
- package/dist/cli/commands/audit.d.ts +43 -0
- package/dist/cli/commands/audit.js +125 -0
- package/dist/cli/commands/hooks.js +29 -6
- package/dist/cli/commands/init.js +1 -73
- package/dist/cli/commands/learning.js +270 -13
- package/dist/cli/commands/ruvector-commands.d.ts +15 -0
- package/dist/cli/commands/ruvector-commands.js +271 -0
- package/dist/cli/handlers/init-handler.d.ts +0 -1
- package/dist/cli/handlers/init-handler.js +0 -6
- package/dist/cli/index.js +4 -2
- package/dist/context/sources/defect-source.js +2 -2
- package/dist/context/sources/memory-source.js +2 -2
- package/dist/context/sources/requirements-source.js +2 -2
- package/dist/coordination/behavior-tree/decorators.d.ts +108 -0
- package/dist/coordination/behavior-tree/decorators.js +251 -0
- package/dist/coordination/behavior-tree/index.d.ts +12 -0
- package/dist/coordination/behavior-tree/index.js +15 -0
- package/dist/coordination/behavior-tree/nodes.d.ts +165 -0
- package/dist/coordination/behavior-tree/nodes.js +338 -0
- package/dist/coordination/behavior-tree/qe-trees.d.ts +105 -0
- package/dist/coordination/behavior-tree/qe-trees.js +181 -0
- package/dist/coordination/coherence-action-gate.d.ts +284 -0
- package/dist/coordination/coherence-action-gate.js +512 -0
- package/dist/coordination/index.d.ts +4 -0
- package/dist/coordination/index.js +8 -0
- package/dist/coordination/reasoning-qec.d.ts +315 -0
- package/dist/coordination/reasoning-qec.js +585 -0
- package/dist/coordination/task-executor.d.ts +16 -0
- package/dist/coordination/task-executor.js +99 -0
- package/dist/coordination/workflow-orchestrator.d.ts +29 -0
- package/dist/coordination/workflow-orchestrator.js +42 -0
- package/dist/domains/visual-accessibility/cnn-visual-regression.d.ts +135 -0
- package/dist/domains/visual-accessibility/cnn-visual-regression.js +327 -0
- package/dist/domains/visual-accessibility/index.d.ts +1 -0
- package/dist/domains/visual-accessibility/index.js +4 -0
- package/dist/governance/coherence-validator.d.ts +112 -0
- package/dist/governance/coherence-validator.js +180 -0
- package/dist/governance/index.d.ts +1 -0
- package/dist/governance/index.js +2 -0
- package/dist/governance/witness-chain.d.ts +311 -0
- package/dist/governance/witness-chain.js +509 -0
- package/dist/init/index.d.ts +0 -2
- package/dist/init/index.js +0 -1
- package/dist/init/init-wizard-steps.d.ts +10 -0
- package/dist/init/init-wizard-steps.js +87 -1
- package/dist/init/init-wizard.d.ts +1 -9
- package/dist/init/init-wizard.js +3 -69
- package/dist/init/orchestrator.js +0 -1
- package/dist/init/phases/01-detection.js +0 -27
- package/dist/init/phases/07-hooks.js +6 -4
- package/dist/init/phases/phase-interface.d.ts +0 -1
- package/dist/init/settings-merge.js +1 -1
- package/dist/integrations/browser/qe-dashboard/clustering.d.ts +48 -0
- package/dist/integrations/browser/qe-dashboard/clustering.js +183 -0
- package/dist/integrations/browser/qe-dashboard/index.d.ts +12 -0
- package/dist/integrations/browser/qe-dashboard/index.js +15 -0
- package/dist/integrations/browser/qe-dashboard/pattern-explorer.d.ts +165 -0
- package/dist/integrations/browser/qe-dashboard/pattern-explorer.js +260 -0
- package/dist/integrations/browser/qe-dashboard/wasm-vector-store.d.ts +144 -0
- package/dist/integrations/browser/qe-dashboard/wasm-vector-store.js +277 -0
- package/dist/integrations/ruvector/cognitive-container-codec.d.ts +51 -0
- package/dist/integrations/ruvector/cognitive-container-codec.js +180 -0
- package/dist/integrations/ruvector/cognitive-container.d.ts +125 -0
- package/dist/integrations/ruvector/cognitive-container.js +306 -0
- package/dist/integrations/ruvector/coherence-gate.d.ts +309 -0
- package/dist/integrations/ruvector/coherence-gate.js +631 -0
- package/dist/integrations/ruvector/compressed-hnsw-integration.d.ts +176 -0
- package/dist/integrations/ruvector/compressed-hnsw-integration.js +301 -0
- package/dist/integrations/ruvector/dither-adapter.d.ts +122 -0
- package/dist/integrations/ruvector/dither-adapter.js +295 -0
- package/dist/integrations/ruvector/domain-transfer.d.ts +129 -0
- package/dist/integrations/ruvector/domain-transfer.js +220 -0
- package/dist/integrations/ruvector/feature-flags.d.ts +214 -2
- package/dist/integrations/ruvector/feature-flags.js +167 -2
- package/dist/integrations/ruvector/filter-adapter.d.ts +71 -0
- package/dist/integrations/ruvector/filter-adapter.js +285 -0
- package/dist/integrations/ruvector/gnn-wrapper.d.ts +20 -0
- package/dist/integrations/ruvector/gnn-wrapper.js +40 -0
- package/dist/integrations/ruvector/hnsw-health-monitor.d.ts +237 -0
- package/dist/integrations/ruvector/hnsw-health-monitor.js +394 -0
- package/dist/integrations/ruvector/index.d.ts +8 -2
- package/dist/integrations/ruvector/index.js +18 -2
- package/dist/integrations/ruvector/interfaces.d.ts +40 -0
- package/dist/integrations/ruvector/sona-persistence.d.ts +54 -0
- package/dist/integrations/ruvector/sona-persistence.js +162 -0
- package/dist/integrations/ruvector/sona-three-loop.d.ts +392 -0
- package/dist/integrations/ruvector/sona-three-loop.js +814 -0
- package/dist/integrations/ruvector/sona-wrapper.d.ts +97 -0
- package/dist/integrations/ruvector/sona-wrapper.js +147 -3
- package/dist/integrations/ruvector/spectral-math.d.ts +101 -0
- package/dist/integrations/ruvector/spectral-math.js +254 -0
- package/dist/integrations/ruvector/temporal-compression.d.ts +163 -0
- package/dist/integrations/ruvector/temporal-compression.js +318 -0
- package/dist/integrations/ruvector/thompson-sampler.d.ts +61 -0
- package/dist/integrations/ruvector/thompson-sampler.js +118 -0
- package/dist/integrations/ruvector/transfer-coherence-stub.d.ts +80 -0
- package/dist/integrations/ruvector/transfer-coherence-stub.js +63 -0
- package/dist/integrations/ruvector/transfer-verification.d.ts +119 -0
- package/dist/integrations/ruvector/transfer-verification.js +115 -0
- package/dist/kernel/hnsw-adapter.d.ts +52 -1
- package/dist/kernel/hnsw-adapter.js +139 -4
- package/dist/kernel/hnsw-index-provider.d.ts +5 -0
- package/dist/kernel/native-hnsw-backend.d.ts +110 -0
- package/dist/kernel/native-hnsw-backend.js +408 -0
- package/dist/kernel/unified-memory.js +5 -6
- package/dist/learning/aqe-learning-engine.d.ts +2 -0
- package/dist/learning/aqe-learning-engine.js +65 -0
- package/dist/learning/experience-capture-middleware.js +20 -0
- package/dist/learning/experience-capture.d.ts +10 -0
- package/dist/learning/experience-capture.js +34 -0
- package/dist/learning/index.d.ts +2 -2
- package/dist/learning/index.js +4 -4
- package/dist/learning/metrics-tracker.d.ts +11 -0
- package/dist/learning/metrics-tracker.js +29 -13
- package/dist/learning/pattern-lifecycle.d.ts +30 -1
- package/dist/learning/pattern-lifecycle.js +92 -20
- package/dist/learning/pattern-store.d.ts +8 -0
- package/dist/learning/pattern-store.js +8 -2
- package/dist/learning/qe-unified-memory.js +1 -28
- package/dist/learning/regret-tracker.d.ts +201 -0
- package/dist/learning/regret-tracker.js +361 -0
- package/dist/mcp/bundle.js +5915 -474
- package/dist/routing/index.d.ts +4 -2
- package/dist/routing/index.js +3 -1
- package/dist/routing/neural-tiny-dancer-router.d.ts +268 -0
- package/dist/routing/neural-tiny-dancer-router.js +514 -0
- package/dist/routing/queen-integration.js +5 -5
- package/dist/routing/routing-config.d.ts +6 -0
- package/dist/routing/routing-config.js +1 -0
- package/dist/routing/simple-neural-router.d.ts +76 -0
- package/dist/routing/simple-neural-router.js +202 -0
- package/dist/routing/tiny-dancer-router.d.ts +20 -1
- package/dist/routing/tiny-dancer-router.js +21 -2
- package/dist/test-scheduling/dag-attention-scheduler.d.ts +81 -0
- package/dist/test-scheduling/dag-attention-scheduler.js +358 -0
- package/dist/test-scheduling/dag-attention-types.d.ts +81 -0
- package/dist/test-scheduling/dag-attention-types.js +10 -0
- package/dist/test-scheduling/index.d.ts +1 -0
- package/dist/test-scheduling/index.js +4 -0
- package/dist/test-scheduling/pipeline.d.ts +8 -0
- package/dist/test-scheduling/pipeline.js +28 -0
- package/package.json +6 -2
- package/dist/cli/commands/migrate.d.ts +0 -9
- package/dist/cli/commands/migrate.js +0 -566
- package/dist/init/init-wizard-migration.d.ts +0 -52
- package/dist/init/init-wizard-migration.js +0 -345
- package/dist/init/migration/config-migrator.d.ts +0 -31
- package/dist/init/migration/config-migrator.js +0 -149
- package/dist/init/migration/data-migrator.d.ts +0 -72
- package/dist/init/migration/data-migrator.js +0 -232
- package/dist/init/migration/detector.d.ts +0 -44
- package/dist/init/migration/detector.js +0 -105
- package/dist/init/migration/index.d.ts +0 -8
- package/dist/init/migration/index.js +0 -8
- package/dist/learning/v2-to-v3-migration.d.ts +0 -86
- package/dist/learning/v2-to-v3-migration.js +0 -529
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Multi-Path Consensus Reasoning Validator - Task 4.5
|
|
3
|
+
*
|
|
4
|
+
* Applies error correction to AI reasoning using three independent paths.
|
|
5
|
+
* Generates multiple independent reasoning chains for critical decisions,
|
|
6
|
+
* extracts syndrome locations (disagreements between paths), and applies
|
|
7
|
+
* confidence-weighted voting to produce a high-confidence result.
|
|
8
|
+
*
|
|
9
|
+
* Use cases:
|
|
10
|
+
* - Test generation validation
|
|
11
|
+
* - Security audit consensus
|
|
12
|
+
* - Defect triage decisions
|
|
13
|
+
*
|
|
14
|
+
* TypeScript implementation (no native package exists for reasoning QEC —
|
|
15
|
+
* consensus logic doesn't benefit from native computation).
|
|
16
|
+
*
|
|
17
|
+
* @module coordination/reasoning-qec
|
|
18
|
+
* @see docs/research/ruvector-quantum-solvers.md
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* A problem requiring multi-path reasoning validation.
|
|
22
|
+
*/
|
|
23
|
+
export interface ReasoningProblem {
|
|
24
|
+
/** Problem domain: 'test-generation', 'security-audit', 'defect-triage' */
|
|
25
|
+
type: string;
|
|
26
|
+
/** Domain-specific context data */
|
|
27
|
+
context: Record<string, unknown>;
|
|
28
|
+
/** Reasoning steps to validate */
|
|
29
|
+
steps: string[];
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* A single step within a reasoning path.
|
|
33
|
+
*/
|
|
34
|
+
export interface ReasoningStep {
|
|
35
|
+
/** Zero-based step index within the path */
|
|
36
|
+
index: number;
|
|
37
|
+
/** Human-readable description of what this step does */
|
|
38
|
+
description: string;
|
|
39
|
+
/** The conclusion reached at this step */
|
|
40
|
+
conclusion: string;
|
|
41
|
+
/** Evidence supporting this conclusion */
|
|
42
|
+
evidence: string[];
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* An independent reasoning path through a problem.
|
|
46
|
+
*/
|
|
47
|
+
export interface ReasoningPath {
|
|
48
|
+
/** Path identifier (0, 1, 2) */
|
|
49
|
+
id: number;
|
|
50
|
+
/** Ordered reasoning steps */
|
|
51
|
+
steps: ReasoningStep[];
|
|
52
|
+
/** Final conclusion of this path */
|
|
53
|
+
conclusion: string;
|
|
54
|
+
/** Confidence in the conclusion (0-1) */
|
|
55
|
+
confidence: number;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* A syndrome identifies a disagreement location between paths.
|
|
59
|
+
*/
|
|
60
|
+
export interface Syndrome {
|
|
61
|
+
/** Step index where disagreement occurs */
|
|
62
|
+
stepIndex: number;
|
|
63
|
+
/** Which paths disagree, and what each concluded */
|
|
64
|
+
disagreements: {
|
|
65
|
+
pathId: number;
|
|
66
|
+
conclusion: string;
|
|
67
|
+
}[];
|
|
68
|
+
/** How severe the disagreement is */
|
|
69
|
+
severity: 'minor' | 'major' | 'critical';
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* The result after error correction has been applied.
|
|
73
|
+
*/
|
|
74
|
+
export interface CorrectedReasoning {
|
|
75
|
+
/** Corrected reasoning steps */
|
|
76
|
+
steps: ReasoningStep[];
|
|
77
|
+
/** Corrected final conclusion */
|
|
78
|
+
conclusion: string;
|
|
79
|
+
/** Confidence in the corrected reasoning (0-1) */
|
|
80
|
+
confidence: number;
|
|
81
|
+
/** List of corrections applied */
|
|
82
|
+
corrections: CorrectionEntry[];
|
|
83
|
+
/** Number of syndromes detected */
|
|
84
|
+
syndromeCount: number;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* A single correction applied during error correction.
|
|
88
|
+
*/
|
|
89
|
+
export interface CorrectionEntry {
|
|
90
|
+
/** Step index where the correction was applied */
|
|
91
|
+
stepIndex: number;
|
|
92
|
+
/** Original (minority) conclusion that was overridden */
|
|
93
|
+
original: string;
|
|
94
|
+
/** Corrected (majority) conclusion */
|
|
95
|
+
corrected: string;
|
|
96
|
+
/** Human-readable reason for the correction */
|
|
97
|
+
reason: string;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Result of validating a corrected reasoning chain.
|
|
101
|
+
*/
|
|
102
|
+
export interface ValidationResult {
|
|
103
|
+
/** Whether the corrected reasoning passes validation */
|
|
104
|
+
valid: boolean;
|
|
105
|
+
/** Overall confidence in the validated result (0-1) */
|
|
106
|
+
confidence: number;
|
|
107
|
+
/** Issues discovered during validation */
|
|
108
|
+
issues: ValidationIssue[];
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* A single issue found during validation.
|
|
112
|
+
*/
|
|
113
|
+
export interface ValidationIssue {
|
|
114
|
+
/** Step index where issue was found, or -1 for conclusion-level */
|
|
115
|
+
stepIndex: number;
|
|
116
|
+
/** Type of issue */
|
|
117
|
+
type: 'low-confidence' | 'no-majority' | 'inconsistent-evidence' | 'all-divergent';
|
|
118
|
+
/** Human-readable description */
|
|
119
|
+
description: string;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Configuration for the ReasoningQEC engine.
|
|
123
|
+
*/
|
|
124
|
+
export interface ReasoningQECConfig {
|
|
125
|
+
/** Minimum number of reasoning paths (default: 3) */
|
|
126
|
+
minPaths: number;
|
|
127
|
+
/** Confidence threshold below which syndromes are flagged (default: 0.5) */
|
|
128
|
+
confidenceThreshold: number;
|
|
129
|
+
/** Minimum agreement ratio for a corrected step to be considered valid (default: 0.5) */
|
|
130
|
+
majorityThreshold: number;
|
|
131
|
+
/** Whether to attempt loading the native ruqu-exotic module (default: true) */
|
|
132
|
+
useNativeBackend: boolean;
|
|
133
|
+
/** Voting method for error correction: 'weighted' uses path confidence, 'majority' uses simple count (default: 'weighted') */
|
|
134
|
+
votingMethod: 'majority' | 'weighted';
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Default configuration values.
|
|
138
|
+
*/
|
|
139
|
+
export declare const DEFAULT_QEC_CONFIG: ReasoningQECConfig;
|
|
140
|
+
/**
|
|
141
|
+
* Multi-Path Consensus Reasoning Validator.
|
|
142
|
+
*
|
|
143
|
+
* Named QEC by analogy with quantum error correction; implements consensus
|
|
144
|
+
* voting across multiple reasoning paths, not quantum algorithms.
|
|
145
|
+
*
|
|
146
|
+
* Generates multiple independent reasoning paths for a given problem,
|
|
147
|
+
* extracts syndrome locations where paths disagree, and applies
|
|
148
|
+
* confidence-weighted (or simple majority) voting to produce a
|
|
149
|
+
* high-confidence result.
|
|
150
|
+
*
|
|
151
|
+
* @example
|
|
152
|
+
* ```typescript
|
|
153
|
+
* const qec = new ReasoningQEC();
|
|
154
|
+
*
|
|
155
|
+
* const problem: ReasoningProblem = {
|
|
156
|
+
* type: 'security-audit',
|
|
157
|
+
* context: { file: 'auth.ts', finding: 'potential XSS' },
|
|
158
|
+
* steps: ['Analyze input handling', 'Check sanitization', 'Evaluate risk'],
|
|
159
|
+
* };
|
|
160
|
+
*
|
|
161
|
+
* const paths = qec.generatePaths(problem);
|
|
162
|
+
* const syndromes = qec.extractSyndromes(paths);
|
|
163
|
+
* const corrected = qec.correctErrors(paths, syndromes);
|
|
164
|
+
* const validation = qec.validate(corrected);
|
|
165
|
+
* ```
|
|
166
|
+
*/
|
|
167
|
+
export declare class ReasoningQEC {
|
|
168
|
+
private readonly config;
|
|
169
|
+
private nativeAvailable;
|
|
170
|
+
constructor(config?: Partial<ReasoningQECConfig>);
|
|
171
|
+
/**
|
|
172
|
+
* Initialize the engine, probing for the native backend if configured.
|
|
173
|
+
* Call this once before using generate/extract/correct methods.
|
|
174
|
+
* If not called, the engine works in pure TypeScript mode.
|
|
175
|
+
*/
|
|
176
|
+
initialize(): Promise<void>;
|
|
177
|
+
/**
|
|
178
|
+
* Generate independent reasoning paths for a problem.
|
|
179
|
+
*
|
|
180
|
+
* Each path represents a different analytical perspective on the problem,
|
|
181
|
+
* producing its own step-by-step reasoning chain and conclusion.
|
|
182
|
+
*
|
|
183
|
+
* @param problem - The reasoning problem to analyze
|
|
184
|
+
* @returns Array of independent reasoning paths (minimum 3)
|
|
185
|
+
*/
|
|
186
|
+
generatePaths(problem: ReasoningProblem): ReasoningPath[];
|
|
187
|
+
/**
|
|
188
|
+
* Extract syndromes (disagreement locations) from reasoning paths.
|
|
189
|
+
*
|
|
190
|
+
* Compares all paths step-by-step and identifies indices where
|
|
191
|
+
* paths reach different conclusions. Severity is classified as:
|
|
192
|
+
* - minor: only one path disagrees (easily correctable)
|
|
193
|
+
* - major: paths are split (no clear majority)
|
|
194
|
+
* - critical: all paths disagree (low confidence in any correction)
|
|
195
|
+
*
|
|
196
|
+
* @param paths - Array of reasoning paths to compare
|
|
197
|
+
* @returns Array of syndromes identifying disagreement locations
|
|
198
|
+
*/
|
|
199
|
+
extractSyndromes(paths: ReasoningPath[]): Syndrome[];
|
|
200
|
+
/**
|
|
201
|
+
* Correct errors using voting across paths.
|
|
202
|
+
*
|
|
203
|
+
* For each step, the conclusion with the highest vote weight among paths
|
|
204
|
+
* is selected. When votingMethod is 'weighted', path confidence is used
|
|
205
|
+
* as vote weight. When 'majority', simple count-based voting is used.
|
|
206
|
+
* If no clear majority exists, the highest-weighted conclusion is used
|
|
207
|
+
* but confidence is reduced.
|
|
208
|
+
*
|
|
209
|
+
* @param paths - Array of reasoning paths
|
|
210
|
+
* @param syndromes - Array of extracted syndromes
|
|
211
|
+
* @returns Corrected reasoning with applied corrections
|
|
212
|
+
*/
|
|
213
|
+
correctErrors(paths: ReasoningPath[], syndromes: Syndrome[]): CorrectedReasoning;
|
|
214
|
+
/**
|
|
215
|
+
* Validate a corrected reasoning chain.
|
|
216
|
+
*
|
|
217
|
+
* Checks for low confidence, missing majority, inconsistent evidence,
|
|
218
|
+
* and all-divergent conditions. Returns a validation result indicating
|
|
219
|
+
* whether the corrected reasoning is trustworthy.
|
|
220
|
+
*
|
|
221
|
+
* @param corrected - The corrected reasoning to validate
|
|
222
|
+
* @returns Validation result with confidence and any issues found
|
|
223
|
+
*/
|
|
224
|
+
validate(corrected: CorrectedReasoning): ValidationResult;
|
|
225
|
+
/**
|
|
226
|
+
* Convenience method: run the full QEC pipeline on a problem.
|
|
227
|
+
*
|
|
228
|
+
* @param problem - The reasoning problem
|
|
229
|
+
* @returns Object containing paths, syndromes, corrected reasoning, and validation
|
|
230
|
+
*/
|
|
231
|
+
process(problem: ReasoningProblem): {
|
|
232
|
+
paths: ReasoningPath[];
|
|
233
|
+
syndromes: Syndrome[];
|
|
234
|
+
corrected: CorrectedReasoning;
|
|
235
|
+
validation: ValidationResult;
|
|
236
|
+
};
|
|
237
|
+
/**
|
|
238
|
+
* Get current configuration.
|
|
239
|
+
*/
|
|
240
|
+
getConfig(): Readonly<ReasoningQECConfig>;
|
|
241
|
+
/**
|
|
242
|
+
* Check if native backend is available.
|
|
243
|
+
*/
|
|
244
|
+
isNativeAvailable(): boolean;
|
|
245
|
+
/**
|
|
246
|
+
* Generate steps for a single reasoning path from a given perspective.
|
|
247
|
+
*/
|
|
248
|
+
private generatePathSteps;
|
|
249
|
+
/**
|
|
250
|
+
* Generate a conclusion for a step based on perspective and context.
|
|
251
|
+
*
|
|
252
|
+
* Each perspective prioritizes different aspects of the context, producing
|
|
253
|
+
* genuinely diverse conclusions rather than identical text with a path suffix.
|
|
254
|
+
*
|
|
255
|
+
* In production this would call an LLM or apply domain-specific heuristics.
|
|
256
|
+
* The TypeScript fallback uses deterministic derivation from inputs.
|
|
257
|
+
*/
|
|
258
|
+
private generateStepConclusion;
|
|
259
|
+
/**
|
|
260
|
+
* Gather evidence for a step from the given perspective.
|
|
261
|
+
*/
|
|
262
|
+
private gatherEvidence;
|
|
263
|
+
/**
|
|
264
|
+
* Derive a final conclusion from a set of completed steps.
|
|
265
|
+
*/
|
|
266
|
+
private deriveConclusion;
|
|
267
|
+
/**
|
|
268
|
+
* Calculate confidence for a single path based on its steps.
|
|
269
|
+
*/
|
|
270
|
+
private calculatePathConfidence;
|
|
271
|
+
/**
|
|
272
|
+
* Classify syndrome severity based on how many distinct conclusions exist.
|
|
273
|
+
*/
|
|
274
|
+
private classifySyndromeSeverity;
|
|
275
|
+
/**
|
|
276
|
+
* Correct a single step by voting among paths.
|
|
277
|
+
*
|
|
278
|
+
* When votingMethod is 'weighted', each path's vote is weighted by its
|
|
279
|
+
* confidence score. When 'majority', simple count-based voting is used.
|
|
280
|
+
*/
|
|
281
|
+
private correctStep;
|
|
282
|
+
/**
|
|
283
|
+
* Correct the final conclusion using voting among paths.
|
|
284
|
+
*
|
|
285
|
+
* When votingMethod is 'weighted', each path's vote is weighted by its
|
|
286
|
+
* confidence score. When 'majority', simple count-based voting is used.
|
|
287
|
+
*/
|
|
288
|
+
private correctConclusion;
|
|
289
|
+
/**
|
|
290
|
+
* Calculate confidence for the corrected reasoning based on path agreement
|
|
291
|
+
* and syndrome severity.
|
|
292
|
+
*/
|
|
293
|
+
private calculateCorrectedConfidence;
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* Create a new ReasoningQEC engine with optional configuration.
|
|
297
|
+
*
|
|
298
|
+
* @param config - Partial configuration overrides
|
|
299
|
+
* @returns Configured ReasoningQEC instance
|
|
300
|
+
*/
|
|
301
|
+
export declare function createReasoningQEC(config?: Partial<ReasoningQECConfig>): ReasoningQEC;
|
|
302
|
+
/**
|
|
303
|
+
* Run the full QEC pipeline on a problem in one call.
|
|
304
|
+
*
|
|
305
|
+
* @param problem - The reasoning problem to process
|
|
306
|
+
* @param config - Optional configuration overrides
|
|
307
|
+
* @returns Pipeline result with paths, syndromes, corrected reasoning, and validation
|
|
308
|
+
*/
|
|
309
|
+
export declare function processReasoning(problem: ReasoningProblem, config?: Partial<ReasoningQECConfig>): {
|
|
310
|
+
paths: ReasoningPath[];
|
|
311
|
+
syndromes: Syndrome[];
|
|
312
|
+
corrected: CorrectedReasoning;
|
|
313
|
+
validation: ValidationResult;
|
|
314
|
+
};
|
|
315
|
+
//# sourceMappingURL=reasoning-qec.d.ts.map
|