feat(research): cut over canonical runtime and enforce agent budgets
This commit is contained in:
parent
ab08db82fd
commit
bbf0dd4453
103 changed files with 6138 additions and 3112 deletions
|
|
@ -11,28 +11,9 @@ import type { CanonicalBacktestAnalytics } from '@stock-bot/types';
|
|||
import { replayTraceSchema } from '../contracts/native-replay';
|
||||
import type { ReplayReportResult } from '../contracts/native-replay';
|
||||
import { strategyReplayRequestSchema } from '../contracts/strategy-replay';
|
||||
import { BacktestConfigSchema } from '../types';
|
||||
import { buildCanonicalBacktestReport } from './canonical-result';
|
||||
|
||||
const finite = z.number().finite();
|
||||
const legacyRequestSchema = z.object({
|
||||
type: z.literal('run'),
|
||||
config: BacktestConfigSchema,
|
||||
data: z.array(
|
||||
z.object({
|
||||
symbol: z.string(),
|
||||
timestamp: finite,
|
||||
type: z.literal('bar'),
|
||||
open: finite,
|
||||
high: finite,
|
||||
low: finite,
|
||||
close: finite,
|
||||
volume: finite,
|
||||
vwap: finite,
|
||||
})
|
||||
),
|
||||
});
|
||||
|
||||
export const retainedStrategyRequestSchema = z
|
||||
.object({
|
||||
type: z.literal('runRetainedStrategy'),
|
||||
|
|
@ -42,7 +23,6 @@ export const retainedStrategyRequestSchema = z
|
|||
.strict();
|
||||
|
||||
export const nativeWorkerRequestSchema = z.union([
|
||||
legacyRequestSchema,
|
||||
replayTraceSchema,
|
||||
strategyReplayRequestSchema,
|
||||
retainedStrategyRequestSchema,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue