feat: add autonomous paper-trading and calibration pipeline
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
// Initializes the additive autonomy schema and creates one reconciliation job.
|
||||
// It deliberately does not rewrite legacy intelligence or enqueue millions of
|
||||
// historical records; reconciliation workers discover those in bounded batches.
|
||||
const path = require('path');
|
||||
const Database = require('better-sqlite3');
|
||||
const { initAutonomySchema } = require('../src/autonomy/schema');
|
||||
const { enqueueJob } = require('../src/autonomy/jobs');
|
||||
|
||||
const intelligencePath = process.env.INTELLIGENCE_DB || path.resolve(process.cwd(), 'intelligence.sqlite');
|
||||
const db = new Database(intelligencePath);
|
||||
db.pragma('journal_mode = WAL');
|
||||
initAutonomySchema(db);
|
||||
const result = enqueueJob(db, {
|
||||
jobType: 'reconcile_archive',
|
||||
lane: 'maintenance',
|
||||
priority: 100,
|
||||
entityType: 'archive',
|
||||
entityId: 'archive',
|
||||
idempotencyKey: 'reconcile_archive:v1',
|
||||
});
|
||||
console.log(JSON.stringify({ intelligencePath, reconciliationJobInserted: result.inserted }));
|
||||
db.close();
|
||||
Reference in New Issue
Block a user