dist / index.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.main = main;
const config_1 = require("./config");
const generator_1 = require("./generator");
const preprocess_1 = require("./preprocess");
const visionPrimer_1 = require("./visionPrimer");
async function main(context) {
context.withConfigSchematics(config_1.configSchematics);
context.withGlobalConfigSchematics(config_1.globalConfigSchematics);
context.withPromptPreprocessor(preprocess_1.preprocess);
context.withGenerator(generator_1.generate);
// Give the small SDK load time to finish before the host tears down a short
// discovery process, while bounding the delay during plugin registration.
let timeout;
const ready = (0, visionPrimer_1.startVisionPrimer)(undefined, true).catch(error => console.warn("[Strata] Vision primer:", error.message));
await Promise.race([ready, new Promise(resolve => { timeout = setTimeout(resolve, 5000); })]);
if (timeout)
clearTimeout(timeout);
}
dist / index.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.main = main;
const config_1 = require("./config");
const generator_1 = require("./generator");
const preprocess_1 = require("./preprocess");
const visionPrimer_1 = require("./visionPrimer");
async function main(context) {
context.withConfigSchematics(config_1.configSchematics);
context.withGlobalConfigSchematics(config_1.globalConfigSchematics);
context.withPromptPreprocessor(preprocess_1.preprocess);
context.withGenerator(generator_1.generate);
// Give the small SDK load time to finish before the host tears down a short
// discovery process, while bounding the delay during plugin registration.
let timeout;
const ready = (0, visionPrimer_1.startVisionPrimer)(undefined, true).catch(error => console.warn("[Strata] Vision primer:", error.message));
await Promise.race([ready, new Promise(resolve => { timeout = setTimeout(resolve, 5000); })]);
if (timeout)
clearTimeout(timeout);
}