@probelabs/visor 0.1.94 → 0.1.96

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.
Files changed (44) hide show
  1. package/README.md +4 -4
  2. package/defaults/.visor.yaml +86 -6
  3. package/dist/ai-review-service.d.ts +1 -1
  4. package/dist/ai-review-service.d.ts.map +1 -1
  5. package/dist/cli-main.d.ts +1 -0
  6. package/dist/cli-main.d.ts.map +1 -1
  7. package/dist/cli.d.ts +1 -0
  8. package/dist/cli.d.ts.map +1 -1
  9. package/dist/commands.d.ts.map +1 -1
  10. package/dist/config.d.ts +6 -1
  11. package/dist/config.d.ts.map +1 -1
  12. package/dist/defaults/.visor.yaml +86 -6
  13. package/dist/failure-condition-evaluator.d.ts.map +1 -1
  14. package/dist/footer.d.ts +25 -0
  15. package/dist/footer.d.ts.map +1 -0
  16. package/dist/github-check-service.d.ts.map +1 -1
  17. package/dist/github-comments.d.ts.map +1 -1
  18. package/dist/index.d.ts +1 -0
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +1968 -521
  21. package/dist/output/code-review/schema.json +0 -23
  22. package/dist/reviewer.d.ts +5 -2
  23. package/dist/reviewer.d.ts.map +1 -1
  24. package/dist/sdk/{check-execution-engine-YBRPVUWD.mjs → check-execution-engine-NMPXJ7FQ.mjs} +2 -2
  25. package/dist/sdk/{chunk-DQRFOQAP.mjs → chunk-Q4S5A5TO.mjs} +199 -113
  26. package/dist/sdk/chunk-Q4S5A5TO.mjs.map +1 -0
  27. package/dist/sdk/sdk.js +249 -149
  28. package/dist/sdk/sdk.js.map +1 -1
  29. package/dist/sdk/sdk.mjs +23 -19
  30. package/dist/sdk/sdk.mjs.map +1 -1
  31. package/dist/traces/{run-2025-10-16T11-33-32-682Z.ndjson → run-2025-10-18T20-24-27-886Z.ndjson} +8 -1
  32. package/dist/traces/{run-2025-10-16T11-33-43-618Z.ndjson → run-2025-10-18T20-24-38-817Z.ndjson} +8 -1
  33. package/dist/traces/{run-2025-10-16T11-33-44-157Z.ndjson → run-2025-10-18T20-24-39-361Z.ndjson} +8 -1
  34. package/dist/traces/{run-2025-10-16T11-33-44-647Z.ndjson → run-2025-10-18T20-24-39-852Z.ndjson} +8 -1
  35. package/dist/types/cli.d.ts +3 -2
  36. package/dist/types/cli.d.ts.map +1 -1
  37. package/dist/types/config.d.ts +0 -2
  38. package/dist/types/config.d.ts.map +1 -1
  39. package/dist/utils/diff-processor.d.ts +6 -0
  40. package/dist/utils/diff-processor.d.ts.map +1 -0
  41. package/package.json +3 -2
  42. package/dist/sdk/chunk-DQRFOQAP.mjs.map +0 -1
  43. /package/dist/sdk/{check-execution-engine-YBRPVUWD.mjs.map → check-execution-engine-NMPXJ7FQ.mjs.map} +0 -0
  44. /package/dist/traces/{run-2025-10-16T11-33-45-128Z.ndjson → run-2025-10-18T20-24-40-335Z.ndjson} +0 -0
package/dist/sdk/sdk.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  CheckExecutionEngine
3
- } from "./chunk-DQRFOQAP.mjs";
3
+ } from "./chunk-Q4S5A5TO.mjs";
4
4
  import "./chunk-KVHVCGY6.mjs";
5
5
  import {
6
6
  init_logger,
@@ -1417,6 +1417,16 @@ var ConfigLoader = class {
1417
1417
  // src/config.ts
1418
1418
  import Ajv from "ajv";
1419
1419
  import addFormats from "ajv-formats";
1420
+ var VALID_EVENT_TRIGGERS = [
1421
+ "pr_opened",
1422
+ "pr_updated",
1423
+ "pr_closed",
1424
+ "issue_opened",
1425
+ "issue_comment",
1426
+ "manual",
1427
+ "schedule",
1428
+ "webhook_received"
1429
+ ];
1420
1430
  var ConfigManager = class {
1421
1431
  validCheckTypes = [
1422
1432
  "ai",
@@ -1425,20 +1435,13 @@ var ConfigManager = class {
1425
1435
  "http",
1426
1436
  "http_input",
1427
1437
  "http_client",
1438
+ "memory",
1428
1439
  "noop",
1429
1440
  "log",
1441
+ "memory",
1430
1442
  "github"
1431
1443
  ];
1432
- validEventTriggers = [
1433
- "pr_opened",
1434
- "pr_updated",
1435
- "pr_closed",
1436
- "issue_opened",
1437
- "issue_comment",
1438
- "manual",
1439
- "schedule",
1440
- "webhook_received"
1441
- ];
1444
+ validEventTriggers = [...VALID_EVENT_TRIGGERS];
1442
1445
  validOutputFormats = ["table", "json", "markdown", "sarif"];
1443
1446
  validGroupByOptions = ["check", "file", "severity", "group"];
1444
1447
  /**
@@ -1446,24 +1449,25 @@ var ConfigManager = class {
1446
1449
  */
1447
1450
  async loadConfig(configPath, options = {}) {
1448
1451
  const { validate = true, mergeDefaults = true, allowedRemotePatterns } = options;
1452
+ const resolvedPath = path2.isAbsolute(configPath) ? configPath : path2.resolve(process.cwd(), configPath);
1449
1453
  try {
1450
- if (!fs2.existsSync(configPath)) {
1451
- throw new Error(`Configuration file not found: ${configPath}`);
1454
+ if (!fs2.existsSync(resolvedPath)) {
1455
+ throw new Error(`Configuration file not found: ${resolvedPath}`);
1452
1456
  }
1453
- const configContent = fs2.readFileSync(configPath, "utf8");
1457
+ const configContent = fs2.readFileSync(resolvedPath, "utf8");
1454
1458
  let parsedConfig;
1455
1459
  try {
1456
1460
  parsedConfig = yaml2.load(configContent);
1457
1461
  } catch (yamlError) {
1458
1462
  const errorMessage = yamlError instanceof Error ? yamlError.message : String(yamlError);
1459
- throw new Error(`Invalid YAML syntax in ${configPath}: ${errorMessage}`);
1463
+ throw new Error(`Invalid YAML syntax in ${resolvedPath}: ${errorMessage}`);
1460
1464
  }
1461
1465
  if (!parsedConfig || typeof parsedConfig !== "object") {
1462
1466
  throw new Error("Configuration file must contain a valid YAML object");
1463
1467
  }
1464
1468
  if (parsedConfig.extends) {
1465
1469
  const loaderOptions = {
1466
- baseDir: path2.dirname(configPath),
1470
+ baseDir: path2.dirname(resolvedPath),
1467
1471
  allowRemote: this.isRemoteExtendsAllowed(),
1468
1472
  maxDepth: 10,
1469
1473
  allowedRemotePatterns
@@ -1495,12 +1499,12 @@ var ConfigManager = class {
1495
1499
  throw error;
1496
1500
  }
1497
1501
  if (error.message.includes("ENOENT")) {
1498
- throw new Error(`Configuration file not found: ${configPath}`);
1502
+ throw new Error(`Configuration file not found: ${resolvedPath}`);
1499
1503
  }
1500
1504
  if (error.message.includes("EPERM")) {
1501
- throw new Error(`Permission denied reading configuration file: ${configPath}`);
1505
+ throw new Error(`Permission denied reading configuration file: ${resolvedPath}`);
1502
1506
  }
1503
- throw new Error(`Failed to read configuration file ${configPath}: ${error.message}`);
1507
+ throw new Error(`Failed to read configuration file ${resolvedPath}: ${error.message}`);
1504
1508
  }
1505
1509
  throw error;
1506
1510
  }