@musnows/scriverse 1.0.9 → 1.0.10

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/dist/app.js CHANGED
@@ -1400,9 +1400,14 @@ export function createRuntime(options) {
1400
1400
  });
1401
1401
  if (!options.liteLlmPriceCache && options.liteLlmPriceCachePath)
1402
1402
  liteLlmPriceCache.start();
1403
- const ai = new AiManager(store, credentialVault, options.fetchImpl ?? fetch, options.developmentServer === true || options.disableAiEndpointValidation === true
1403
+ const disableAiEndpointValidation = options.developmentServer === true || options.disableAiEndpointValidation === true;
1404
+ const validateAiEndpoint = disableAiEndpointValidation || options.disableAiProviderEndpointValidation === true
1404
1405
  ? undefined
1405
- : options.security ? (url) => assertSafeAiEndpoint(url, options.security?.allowPrivateAiEndpoints) : undefined, (task, actor) => {
1406
+ : options.security ? (url) => assertSafeAiEndpoint(url, options.security?.allowPrivateAiEndpoints) : undefined;
1407
+ const validateRemoteMcpEndpoint = disableAiEndpointValidation
1408
+ ? undefined
1409
+ : options.security ? (url) => assertSafeAiEndpoint(url, options.security?.allowPrivateAiEndpoints) : undefined;
1410
+ const ai = new AiManager(store, credentialVault, options.fetchImpl ?? fetch, validateAiEndpoint, (task, actor) => {
1406
1411
  const requiredModules = analysisTaskReadModules(task.taskType, task.scope);
1407
1412
  const creator = actor ? null : database.get("SELECT created_by_user_id, created_via_api_key FROM analysis_tasks WHERE id = ?", String(task.id));
1408
1413
  const userId = actor?.userId ?? (typeof creator?.created_by_user_id === "string" ? creator.created_by_user_id : null);
@@ -1421,6 +1426,7 @@ export function createRuntime(options) {
1421
1426
  retrySleep: options.aiRetrySleep,
1422
1427
  aiChatImageMaxBytes: uploadLimits.chatImageBytes,
1423
1428
  liteLlmPriceCache,
1429
+ remoteMcpValidateOutboundUrl: validateRemoteMcpEndpoint,
1424
1430
  allowPrivateAiEndpoints: options.security?.allowPrivateAiEndpoints === true
1425
1431
  });
1426
1432
  const imOrchestrator = new ImOrchestrator(store, auth, im, ai);