@deepagents/text2sql 6.1.0 → 6.1.2

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.
@@ -419,6 +419,9 @@ var Adapter = class {
419
419
  return this.validateImpl(decoded);
420
420
  }
421
421
  async execute(sql) {
422
+ return this.executeImpl(await this.enforceExecutionPolicy(sql));
423
+ }
424
+ async enforceExecutionPolicy(sql) {
422
425
  const decoded = this.#decodeShellEscapes(sql);
423
426
  const violation = await this.#analyzePolicy(decoded);
424
427
  if (violation?.kind === "read-only") {
@@ -427,7 +430,7 @@ var Adapter = class {
427
430
  if (violation?.kind === "scope") {
428
431
  throw new SQLScopeError(violation.payload);
429
432
  }
430
- return this.executeImpl(decoded);
433
+ return decoded;
431
434
  }
432
435
  /**
433
436
  * Convert unknown database value to number.