feat(research): isolate candidates and add reviewed paper promotion
This commit is contained in:
parent
26b97265c6
commit
25b5cbf481
128 changed files with 13038 additions and 1388 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import { z } from 'zod';
|
||||
import { candidateExecutionSchema } from '@stock-bot/stock-config/candidate-execution';
|
||||
import { canonicalRunRequestSchema } from '@stock-bot/stock-config/canonical-research';
|
||||
import type {
|
||||
CanonicalDatasetCatalogEntry,
|
||||
|
|
@ -562,7 +563,18 @@ export const backtestApiV2 = {
|
|||
if (!response.ok) {
|
||||
throw await requestError(response, 'Could not check canonical execution eligibility');
|
||||
}
|
||||
return response.json();
|
||||
const capability = z
|
||||
.object({
|
||||
available: z.boolean(),
|
||||
reason: z.string().nullable(),
|
||||
execution: candidateExecutionSchema.optional(),
|
||||
})
|
||||
.strict()
|
||||
.parse(await response.json());
|
||||
if (capability.execution && !capability.available) {
|
||||
throw new Error('Unavailable execution cannot advertise an admitted sandbox profile');
|
||||
}
|
||||
return capability;
|
||||
},
|
||||
async listCanonicalDatasets(signal?: AbortSignal): Promise<CanonicalDatasetCatalogEntry[]> {
|
||||
const response = await fetch(`${API_BASE_URL}/api/v2/datasets/canonical?limit=50&offset=0`, {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue