@probelabs/visor 0.1.149 → 0.1.150

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 (123) hide show
  1. package/README.md +52 -1
  2. package/dist/909.index.js +27117 -0
  3. package/dist/ai-review-service.d.ts.map +1 -1
  4. package/dist/config.d.ts.map +1 -1
  5. package/dist/docs/assistant-workflows.md +805 -0
  6. package/dist/docs/event-triggers.md +25 -0
  7. package/dist/docs/scheduler.md +156 -0
  8. package/dist/docs/slack-integration.md +48 -0
  9. package/dist/enterprise/scheduler/knex-store.d.ts +7 -1
  10. package/dist/enterprise/scheduler/knex-store.d.ts.map +1 -1
  11. package/dist/examples/code-talk-as-tool.yaml +76 -0
  12. package/dist/examples/code-talk-workflow.yaml +68 -0
  13. package/dist/examples/intent-router-workflow.yaml +66 -0
  14. package/dist/examples/slack-message-triggers.yaml +270 -0
  15. package/dist/generated/config-schema.d.ts +102 -7
  16. package/dist/generated/config-schema.d.ts.map +1 -1
  17. package/dist/generated/config-schema.json +116 -7
  18. package/dist/git-repository-analyzer.d.ts +8 -0
  19. package/dist/git-repository-analyzer.d.ts.map +1 -1
  20. package/dist/index.js +4030 -4735
  21. package/dist/output/traces/{run-2026-03-03T07-19-07-543Z.ndjson → run-2026-03-03T20-21-24-501Z.ndjson} +84 -84
  22. package/dist/{traces/run-2026-03-03T07-19-50-933Z.ndjson → output/traces/run-2026-03-03T20-22-08-701Z.ndjson} +1806 -1730
  23. package/dist/scheduler/message-trigger.d.ts +47 -0
  24. package/dist/scheduler/message-trigger.d.ts.map +1 -0
  25. package/dist/scheduler/schedule-store.d.ts +31 -1
  26. package/dist/scheduler/schedule-store.d.ts.map +1 -1
  27. package/dist/scheduler/schedule-tool.d.ts +17 -1
  28. package/dist/scheduler/schedule-tool.d.ts.map +1 -1
  29. package/dist/scheduler/store/sqlite-store.d.ts +7 -1
  30. package/dist/scheduler/store/sqlite-store.d.ts.map +1 -1
  31. package/dist/scheduler/store/types.d.ts +45 -0
  32. package/dist/scheduler/store/types.d.ts.map +1 -1
  33. package/dist/sdk/{check-provider-registry-LVLC4EPF.mjs → check-provider-registry-6D5CAX44.mjs} +6 -6
  34. package/dist/sdk/{check-provider-registry-X4OZJWPK.mjs → check-provider-registry-RRYBG6AU.mjs} +6 -6
  35. package/dist/sdk/{check-provider-registry-IYSUDKPB.mjs → check-provider-registry-YFC5KSJY.mjs} +6 -6
  36. package/dist/sdk/{chunk-V6GI4U2M.mjs → chunk-AADKUA6L.mjs} +585 -29
  37. package/dist/sdk/{chunk-6EXCUX7Y.mjs.map → chunk-AADKUA6L.mjs.map} +1 -1
  38. package/dist/sdk/{chunk-6EXCUX7Y.mjs → chunk-CKDFGNF4.mjs} +585 -29
  39. package/dist/sdk/{chunk-GFNXX64M.mjs.map → chunk-CKDFGNF4.mjs.map} +1 -1
  40. package/dist/sdk/{chunk-YYZAN5NK.mjs → chunk-FYK2DJK6.mjs} +106 -9
  41. package/dist/sdk/chunk-FYK2DJK6.mjs.map +1 -0
  42. package/dist/sdk/{chunk-RJLJUTSU.mjs → chunk-FZEQ744M.mjs} +2 -2
  43. package/dist/sdk/{chunk-Q6EPAJ6Z.mjs → chunk-GIAN7HCT.mjs} +3 -3
  44. package/dist/sdk/{chunk-CISJ6DJW.mjs → chunk-GLROSEYJ.mjs} +3 -3
  45. package/dist/sdk/{chunk-VLUGLWLA.mjs → chunk-H4HFH7HH.mjs} +3 -3
  46. package/dist/sdk/{chunk-VLUGLWLA.mjs.map → chunk-H4HFH7HH.mjs.map} +1 -1
  47. package/dist/sdk/{chunk-62TNF5PJ.mjs → chunk-PETLPNRA.mjs} +2 -2
  48. package/dist/sdk/{chunk-62TNF5PJ.mjs.map → chunk-PETLPNRA.mjs.map} +1 -1
  49. package/dist/sdk/{chunk-BR7DYA3S.mjs → chunk-SWO4W57C.mjs} +2 -2
  50. package/dist/sdk/{chunk-GFNXX64M.mjs → chunk-YY3KADY2.mjs} +585 -29
  51. package/dist/sdk/{chunk-V6GI4U2M.mjs.map → chunk-YY3KADY2.mjs.map} +1 -1
  52. package/dist/sdk/{config-KQH254CA.mjs → config-MTEIGCOQ.mjs} +2 -2
  53. package/dist/sdk/{failure-condition-evaluator-IVCTD4BZ.mjs → failure-condition-evaluator-P6QUFLIN.mjs} +3 -3
  54. package/dist/sdk/{failure-condition-evaluator-LZ2AG5PY.mjs → failure-condition-evaluator-XV2ZMFFY.mjs} +3 -3
  55. package/dist/sdk/{git-repository-analyzer-QFMW6WIS.mjs → git-repository-analyzer-TWNJUN42.mjs} +34 -3
  56. package/dist/sdk/git-repository-analyzer-TWNJUN42.mjs.map +1 -0
  57. package/dist/sdk/{github-frontend-DFT5G32K.mjs → github-frontend-A2R7D4N6.mjs} +3 -3
  58. package/dist/sdk/{github-frontend-S523EEJB.mjs → github-frontend-GSB2P5PE.mjs} +3 -3
  59. package/dist/sdk/{host-7YKRMOUJ.mjs → host-CLPM2WVQ.mjs} +2 -2
  60. package/dist/sdk/{host-H7IX4GBK.mjs → host-MR7L57QI.mjs} +2 -2
  61. package/dist/sdk/{routing-LU5PAREW.mjs → routing-KLVK2MJZ.mjs} +4 -4
  62. package/dist/sdk/{routing-ZMBKWMVI.mjs → routing-V3MYZAOH.mjs} +4 -4
  63. package/dist/sdk/{schedule-tool-EOMZFICZ.mjs → schedule-tool-HYM55K3H.mjs} +6 -6
  64. package/dist/sdk/{schedule-tool-NX75VKGA.mjs → schedule-tool-NYLNJUEW.mjs} +6 -6
  65. package/dist/sdk/{schedule-tool-CDVUSZEG.mjs → schedule-tool-PRXFAV4K.mjs} +6 -6
  66. package/dist/sdk/{schedule-tool-handler-3FJHDIPG.mjs → schedule-tool-handler-EFQIYD3W.mjs} +6 -6
  67. package/dist/sdk/{schedule-tool-handler-KKN7XJYT.mjs → schedule-tool-handler-HVWCEGQ6.mjs} +6 -6
  68. package/dist/sdk/{schedule-tool-handler-QNZG55DX.mjs → schedule-tool-handler-M5YI573R.mjs} +6 -6
  69. package/dist/sdk/sdk.d.mts +38 -1
  70. package/dist/sdk/sdk.d.ts +38 -1
  71. package/dist/sdk/sdk.js +706 -22
  72. package/dist/sdk/sdk.js.map +1 -1
  73. package/dist/sdk/sdk.mjs +5 -5
  74. package/dist/sdk/{trace-helpers-EJUIOP6L.mjs → trace-helpers-6NSZBC35.mjs} +2 -2
  75. package/dist/sdk/{trace-helpers-6ROJR7N3.mjs → trace-helpers-TORF3JD5.mjs} +2 -2
  76. package/dist/sdk/{workflow-check-provider-AGZ5JY2I.mjs → workflow-check-provider-3F6CBHVD.mjs} +6 -6
  77. package/dist/sdk/{workflow-check-provider-PTNUWM5W.mjs → workflow-check-provider-OXHMLICJ.mjs} +6 -6
  78. package/dist/sdk/{workflow-check-provider-6ERNNCNA.mjs → workflow-check-provider-XLH7N4FV.mjs} +6 -6
  79. package/dist/slack/socket-runner.d.ts +14 -0
  80. package/dist/slack/socket-runner.d.ts.map +1 -1
  81. package/dist/test-runner/core/flow-stage.d.ts.map +1 -1
  82. package/dist/test-runner/fixture-loader.d.ts +1 -1
  83. package/dist/test-runner/fixture-loader.d.ts.map +1 -1
  84. package/dist/test-runner/index.d.ts.map +1 -1
  85. package/dist/test-runner/validator.d.ts.map +1 -1
  86. package/dist/traces/{run-2026-03-03T07-19-07-543Z.ndjson → run-2026-03-03T20-21-24-501Z.ndjson} +84 -84
  87. package/dist/{output/traces/run-2026-03-03T07-19-50-933Z.ndjson → traces/run-2026-03-03T20-22-08-701Z.ndjson} +1806 -1730
  88. package/dist/types/config.d.ts +38 -1
  89. package/dist/types/config.d.ts.map +1 -1
  90. package/dist/utils/workspace-manager.d.ts +4 -0
  91. package/dist/utils/workspace-manager.d.ts.map +1 -1
  92. package/dist/utils/worktree-manager.d.ts +15 -1
  93. package/dist/utils/worktree-manager.d.ts.map +1 -1
  94. package/package.json +2 -2
  95. package/dist/sdk/chunk-YYZAN5NK.mjs.map +0 -1
  96. package/dist/sdk/git-repository-analyzer-QFMW6WIS.mjs.map +0 -1
  97. /package/dist/sdk/{check-provider-registry-IYSUDKPB.mjs.map → check-provider-registry-6D5CAX44.mjs.map} +0 -0
  98. /package/dist/sdk/{check-provider-registry-LVLC4EPF.mjs.map → check-provider-registry-RRYBG6AU.mjs.map} +0 -0
  99. /package/dist/sdk/{check-provider-registry-X4OZJWPK.mjs.map → check-provider-registry-YFC5KSJY.mjs.map} +0 -0
  100. /package/dist/sdk/{chunk-BR7DYA3S.mjs.map → chunk-FZEQ744M.mjs.map} +0 -0
  101. /package/dist/sdk/{chunk-CISJ6DJW.mjs.map → chunk-GIAN7HCT.mjs.map} +0 -0
  102. /package/dist/sdk/{chunk-Q6EPAJ6Z.mjs.map → chunk-GLROSEYJ.mjs.map} +0 -0
  103. /package/dist/sdk/{chunk-RJLJUTSU.mjs.map → chunk-SWO4W57C.mjs.map} +0 -0
  104. /package/dist/sdk/{config-KQH254CA.mjs.map → config-MTEIGCOQ.mjs.map} +0 -0
  105. /package/dist/sdk/{failure-condition-evaluator-IVCTD4BZ.mjs.map → failure-condition-evaluator-P6QUFLIN.mjs.map} +0 -0
  106. /package/dist/sdk/{failure-condition-evaluator-LZ2AG5PY.mjs.map → failure-condition-evaluator-XV2ZMFFY.mjs.map} +0 -0
  107. /package/dist/sdk/{github-frontend-DFT5G32K.mjs.map → github-frontend-A2R7D4N6.mjs.map} +0 -0
  108. /package/dist/sdk/{github-frontend-S523EEJB.mjs.map → github-frontend-GSB2P5PE.mjs.map} +0 -0
  109. /package/dist/sdk/{host-7YKRMOUJ.mjs.map → host-CLPM2WVQ.mjs.map} +0 -0
  110. /package/dist/sdk/{host-H7IX4GBK.mjs.map → host-MR7L57QI.mjs.map} +0 -0
  111. /package/dist/sdk/{routing-LU5PAREW.mjs.map → routing-KLVK2MJZ.mjs.map} +0 -0
  112. /package/dist/sdk/{routing-ZMBKWMVI.mjs.map → routing-V3MYZAOH.mjs.map} +0 -0
  113. /package/dist/sdk/{schedule-tool-CDVUSZEG.mjs.map → schedule-tool-HYM55K3H.mjs.map} +0 -0
  114. /package/dist/sdk/{schedule-tool-EOMZFICZ.mjs.map → schedule-tool-NYLNJUEW.mjs.map} +0 -0
  115. /package/dist/sdk/{schedule-tool-NX75VKGA.mjs.map → schedule-tool-PRXFAV4K.mjs.map} +0 -0
  116. /package/dist/sdk/{schedule-tool-handler-3FJHDIPG.mjs.map → schedule-tool-handler-EFQIYD3W.mjs.map} +0 -0
  117. /package/dist/sdk/{schedule-tool-handler-KKN7XJYT.mjs.map → schedule-tool-handler-HVWCEGQ6.mjs.map} +0 -0
  118. /package/dist/sdk/{schedule-tool-handler-QNZG55DX.mjs.map → schedule-tool-handler-M5YI573R.mjs.map} +0 -0
  119. /package/dist/sdk/{trace-helpers-6ROJR7N3.mjs.map → trace-helpers-6NSZBC35.mjs.map} +0 -0
  120. /package/dist/sdk/{trace-helpers-EJUIOP6L.mjs.map → trace-helpers-TORF3JD5.mjs.map} +0 -0
  121. /package/dist/sdk/{workflow-check-provider-6ERNNCNA.mjs.map → workflow-check-provider-3F6CBHVD.mjs.map} +0 -0
  122. /package/dist/sdk/{workflow-check-provider-AGZ5JY2I.mjs.map → workflow-check-provider-OXHMLICJ.mjs.map} +0 -0
  123. /package/dist/sdk/{workflow-check-provider-PTNUWM5W.mjs.map → workflow-check-provider-XLH7N4FV.mjs.map} +0 -0
@@ -2,7 +2,7 @@ import {
2
2
  ConfigManager,
3
3
  VALID_EVENT_TRIGGERS,
4
4
  init_config
5
- } from "./chunk-YYZAN5NK.mjs";
5
+ } from "./chunk-FYK2DJK6.mjs";
6
6
  import "./chunk-NCWIZVOT.mjs";
7
7
  import "./chunk-LW3INISN.mjs";
8
8
  import "./chunk-SZXICFQ3.mjs";
@@ -13,4 +13,4 @@ export {
13
13
  ConfigManager,
14
14
  VALID_EVENT_TRIGGERS
15
15
  };
16
- //# sourceMappingURL=config-KQH254CA.mjs.map
16
+ //# sourceMappingURL=config-MTEIGCOQ.mjs.map
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  FailureConditionEvaluator,
3
3
  init_failure_condition_evaluator
4
- } from "./chunk-RJLJUTSU.mjs";
5
- import "./chunk-62TNF5PJ.mjs";
4
+ } from "./chunk-SWO4W57C.mjs";
5
+ import "./chunk-H4HFH7HH.mjs";
6
6
  import "./chunk-JL7JXCET.mjs";
7
7
  import "./chunk-25IC7KXZ.mjs";
8
8
  import "./chunk-LW3INISN.mjs";
@@ -14,4 +14,4 @@ init_failure_condition_evaluator();
14
14
  export {
15
15
  FailureConditionEvaluator
16
16
  };
17
- //# sourceMappingURL=failure-condition-evaluator-IVCTD4BZ.mjs.map
17
+ //# sourceMappingURL=failure-condition-evaluator-P6QUFLIN.mjs.map
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  FailureConditionEvaluator,
3
3
  init_failure_condition_evaluator
4
- } from "./chunk-BR7DYA3S.mjs";
5
- import "./chunk-VLUGLWLA.mjs";
4
+ } from "./chunk-FZEQ744M.mjs";
5
+ import "./chunk-PETLPNRA.mjs";
6
6
  import "./chunk-JL7JXCET.mjs";
7
7
  import "./chunk-25IC7KXZ.mjs";
8
8
  import "./chunk-LW3INISN.mjs";
@@ -14,4 +14,4 @@ init_failure_condition_evaluator();
14
14
  export {
15
15
  FailureConditionEvaluator
16
16
  };
17
- //# sourceMappingURL=failure-condition-evaluator-LZ2AG5PY.mjs.map
17
+ //# sourceMappingURL=failure-condition-evaluator-XV2ZMFFY.mjs.map
@@ -290,9 +290,40 @@ ${file.patch}`).join("\n\n");
290
290
  /**
291
291
  * Get diff between current branch and base branch (for feature branch analysis)
292
292
  */
293
+ /**
294
+ * Resolve the base branch ref to a revision that exists locally.
295
+ * In CI (shallow clones), the local branch may not exist, so we try:
296
+ * 1. The branch name as-is (e.g. "main")
297
+ * 2. The remote-tracking ref (e.g. "origin/main")
298
+ * 3. Fetch from origin then retry
299
+ */
300
+ async resolveBaseBranchRef(baseBranch) {
301
+ try {
302
+ await this.git.revparse([baseBranch]);
303
+ return baseBranch;
304
+ } catch {
305
+ }
306
+ const remoteBranch = `origin/${baseBranch}`;
307
+ try {
308
+ await this.git.revparse([remoteBranch]);
309
+ return remoteBranch;
310
+ } catch {
311
+ }
312
+ try {
313
+ await this.git.fetch(["origin", baseBranch]);
314
+ await this.git.revparse([remoteBranch]);
315
+ return remoteBranch;
316
+ } catch {
317
+ return baseBranch;
318
+ }
319
+ }
293
320
  async getBranchDiff(baseBranch, includeContext = true) {
294
321
  try {
295
- const diffSummary = await this.git.diffSummary([baseBranch]);
322
+ const resolvedBase = await this.resolveBaseBranchRef(baseBranch);
323
+ if (resolvedBase !== baseBranch) {
324
+ console.error(`\u{1F4CE} Resolved base branch: ${baseBranch} \u2192 ${resolvedBase}`);
325
+ }
326
+ const diffSummary = await this.git.diffSummary([resolvedBase]);
296
327
  const changes = [];
297
328
  if (!diffSummary || !diffSummary.files) {
298
329
  return [];
@@ -320,7 +351,7 @@ ${file.patch}`).join("\n\n");
320
351
  let truncated = false;
321
352
  if (includeContext && !isBinary) {
322
353
  try {
323
- const rawPatch = await this.git.diff([baseBranch, "--", file.file]);
354
+ const rawPatch = await this.git.diff([resolvedBase, "--", file.file]);
324
355
  if (rawPatch) {
325
356
  const result = this.truncatePatch(rawPatch, file.file);
326
357
  patch = result.patch;
@@ -468,4 +499,4 @@ init_git_repository_analyzer();
468
499
  export {
469
500
  GitRepositoryAnalyzer
470
501
  };
471
- //# sourceMappingURL=git-repository-analyzer-QFMW6WIS.mjs.map
502
+ //# sourceMappingURL=git-repository-analyzer-TWNJUN42.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/utils/file-exclusion.ts","../../src/git-repository-analyzer.ts"],"sourcesContent":["import ignore from 'ignore';\nimport * as fs from 'fs';\nimport * as path from 'path';\n\n/**\n * Default exclusion patterns for common build artifacts and dependencies.\n * These can be overridden by providing custom patterns to the constructor.\n */\nconst DEFAULT_EXCLUSION_PATTERNS = [\n 'dist/',\n 'build/',\n '.next/',\n 'out/',\n 'node_modules/',\n 'coverage/',\n '.turbo/',\n 'bundled/',\n];\n\n/**\n * Shared utility for filtering files based on .gitignore patterns\n *\n * Design Decision: Synchronous I/O in Constructor\n * ------------------------------------------------\n * This class intentionally uses synchronous file I/O in the constructor for the following reasons:\n *\n * 1. **Initialization Context**: The constructor is called once during application startup,\n * not in request handling or performance-critical paths.\n *\n * 2. **Small File Sizes**: .gitignore files are typically <10KB. Even in large monorepos,\n * they rarely exceed 100KB. Reading such small files synchronously has negligible impact.\n *\n * 3. **Immediate Availability**: The exclusion patterns must be ready immediately for use.\n * Asynchronous initialization would require either:\n * - Async factory method (adds API complexity)\n * - Lazy loading (race conditions, repeated checks)\n * - Promise-based initialization (complicates usage across codebase)\n *\n * 4. **Simplicity**: Synchronous loading keeps the API simple and prevents async contagion\n * throughout the codebase. Methods like shouldExcludeFile() remain synchronous.\n *\n * 5. **No DoS Risk**: The file reading happens exactly once per instance during construction.\n * Attackers cannot trigger repeated synchronous reads.\n *\n * 6. **Consistency**: This follows the same pattern as other configuration loaders in Node.js\n * ecosystem (e.g., require(), cosmiconfig's sync mode).\n *\n * Alternative Considered: Async factory pattern would add complexity without meaningful benefit\n * given the usage patterns and file sizes involved.\n */\nexport class FileExclusionHelper {\n private gitignore: ReturnType<typeof ignore> | null = null;\n private workingDirectory: string;\n\n /**\n * @param workingDirectory - Directory to search for .gitignore\n * @param additionalPatterns - Additional patterns to include (optional, defaults to common build artifacts)\n */\n constructor(\n workingDirectory: string = process.cwd(),\n additionalPatterns: string[] | null = DEFAULT_EXCLUSION_PATTERNS\n ) {\n // Validate and normalize workingDirectory to prevent path traversal\n const normalizedPath = path.resolve(workingDirectory);\n\n // Ensure path doesn't contain suspicious patterns after normalization\n // Check for null bytes which could be used for injection\n if (normalizedPath.includes('\\0')) {\n throw new Error('Invalid workingDirectory: contains null bytes');\n }\n\n this.workingDirectory = normalizedPath;\n\n // Load gitignore synchronously during construction\n // This is acceptable because:\n // 1. Constructor is called once during initialization\n // 2. .gitignore files are typically small (<10KB)\n // 3. Synchronous loading ensures patterns are ready immediately\n // 4. Avoids async constructor complexity\n this.loadGitignore(additionalPatterns);\n }\n\n /**\n * Load .gitignore patterns from the working directory (called once in constructor)\n * @param additionalPatterns - Additional patterns to add to gitignore rules\n */\n private loadGitignore(additionalPatterns: string[] | null): void {\n // Resolve both paths to absolute, normalized forms\n const gitignorePath = path.resolve(this.workingDirectory, '.gitignore');\n const resolvedWorkingDir = path.resolve(this.workingDirectory);\n\n try {\n // Robust path validation using path.relative()\n // This handles symlinks and edge cases better than string comparison\n const relativePath = path.relative(resolvedWorkingDir, gitignorePath);\n\n // Security check: ensure .gitignore is within working directory\n // Reject if:\n // - Starts with '..' (parent directory)\n // - Is an absolute path (should be relative after path.relative())\n if (relativePath.startsWith('..') || path.isAbsolute(relativePath)) {\n throw new Error('Invalid gitignore path: path traversal detected');\n }\n\n // Additionally verify it's exactly '.gitignore' (no subdirectories)\n if (relativePath !== '.gitignore') {\n throw new Error('Invalid gitignore path: must be .gitignore in working directory');\n }\n\n this.gitignore = ignore();\n\n // Add additional patterns first (lower priority)\n if (additionalPatterns && additionalPatterns.length > 0) {\n this.gitignore.add(additionalPatterns);\n }\n\n // Load and add .gitignore patterns (higher priority)\n if (fs.existsSync(gitignorePath)) {\n const rawContent = fs.readFileSync(gitignorePath, 'utf8');\n\n // Comprehensive sanitization to prevent injection attacks\n const gitignoreContent = rawContent\n .replace(/[\\r\\n]+/g, '\\n') // Normalize line endings first\n .replace(/[\\x00-\\x09\\x0B-\\x1F\\x7F]/g, '') // Remove control chars except \\n (0x0A)\n .split('\\n')\n .filter(line => line.length < 1000) // Reject extremely long lines that could cause DoS\n .join('\\n')\n .trim();\n\n this.gitignore.add(gitignoreContent);\n if (process.env.VISOR_DEBUG === 'true') {\n console.error('✅ Loaded .gitignore patterns for file filtering');\n }\n } else if (additionalPatterns && additionalPatterns.length > 0) {\n // Always emit a user-visible warning so callers can assert this behavior in tests\n console.error('No .gitignore found, using default exclusion patterns');\n console.warn('No .gitignore found, using default exclusion patterns');\n }\n } catch (error) {\n // Always emit a warning with the error for visibility and tests\n console.warn('Failed to load .gitignore:', error instanceof Error ? error.message : error);\n }\n }\n\n /**\n * Check if a file should be excluded based on .gitignore patterns\n */\n shouldExcludeFile(filename: string): boolean {\n // Check against .gitignore patterns if loaded\n if (this.gitignore) {\n return this.gitignore.ignores(filename);\n }\n\n return false;\n }\n}\n","import { simpleGit, SimpleGit, type DefaultLogFields, type ListLogLine } from 'simple-git';\nimport * as path from 'path';\nimport * as fs from 'fs';\nimport { PRInfo, PRDiff } from './pr-analyzer';\nimport { FileExclusionHelper } from './utils/file-exclusion';\n\nexport interface GitFileChange {\n filename: string;\n status: 'added' | 'removed' | 'modified' | 'renamed';\n additions: number;\n deletions: number;\n changes: number;\n content?: string;\n patch?: string;\n truncated?: boolean;\n}\n\n// Maximum patch size in bytes (50KB) - helps prevent token limit issues\nconst MAX_PATCH_SIZE = 50 * 1024;\n\nexport interface GitRepositoryInfo {\n title: string;\n body: string;\n author: string;\n base: string;\n head: string;\n files: GitFileChange[];\n totalAdditions: number;\n totalDeletions: number;\n isGitRepository: boolean;\n workingDirectory: string;\n}\n\nexport class GitRepositoryAnalyzer {\n private git: SimpleGit;\n private cwd: string;\n private fileExclusionHelper: FileExclusionHelper;\n\n constructor(workingDirectory: string = process.cwd()) {\n this.cwd = workingDirectory;\n this.git = simpleGit(workingDirectory);\n this.fileExclusionHelper = new FileExclusionHelper(workingDirectory);\n }\n\n /**\n * Analyze the current git repository state and return data compatible with PRInfo interface\n */\n async analyzeRepository(\n includeContext: boolean = true,\n enableBranchDiff: boolean = false\n ): Promise<GitRepositoryInfo> {\n // Check if we're in a git repository\n const isRepo = await this.isGitRepository();\n if (!isRepo) {\n return this.createEmptyRepositoryInfo('Not a git repository');\n }\n\n try {\n // Get current branch and status\n const [status, currentBranch, baseBranch] = await Promise.all([\n this.git.status(),\n this.getCurrentBranch(),\n this.getBaseBranch(),\n ]);\n\n // Determine if we're on a feature branch\n const isFeatureBranch =\n currentBranch !== baseBranch && currentBranch !== 'main' && currentBranch !== 'master';\n\n // Get uncommitted changes first\n let uncommittedFiles = await this.getUncommittedChanges(includeContext);\n\n // If branch diff is explicitly enabled, use branch diff (ignoring uncommitted changes)\n // Otherwise, if on a feature branch with no uncommitted changes AND branch diff is enabled, get diff vs base branch\n if (isFeatureBranch && includeContext && enableBranchDiff) {\n if (uncommittedFiles.length > 0) {\n console.error(`📊 Feature branch detected: ${currentBranch}`);\n console.error(\n `⚠️ Ignoring ${uncommittedFiles.length} uncommitted file(s) due to --analyze-branch-diff flag`\n );\n } else {\n console.error(`📊 Feature branch detected: ${currentBranch}`);\n }\n console.error(\n `📂 Analyzing diff vs ${baseBranch} (${uncommittedFiles.length > 0 ? 'forced by --analyze-branch-diff' : 'auto-enabled for code-review schemas'})`\n );\n uncommittedFiles = await this.getBranchDiff(baseBranch, includeContext);\n } else if (uncommittedFiles.length > 0) {\n console.error(`📝 Analyzing uncommitted changes (${uncommittedFiles.length} files)`);\n }\n\n // Get recent commit info (handle repos with no commits)\n let lastCommit: (ListLogLine & DefaultLogFields) | null = null;\n try {\n const recentCommits = await this.git.log({ maxCount: 1 });\n lastCommit = recentCommits.latest;\n } catch {\n // Repository has no commits yet - this is OK\n console.error('📝 Repository has no commits yet, analyzing uncommitted changes');\n }\n\n // Get author from git config if no commits exist\n let author = lastCommit?.author_name;\n if (!author) {\n try {\n // Read ONLY repository-local config to avoid leaking global user identity into tests\n const [userName, userEmail] = await Promise.all([\n this.git.raw(['config', '--local', 'user.name']).catch(() => null),\n this.git.raw(['config', '--local', 'user.email']).catch(() => null),\n ]);\n author = userName?.trim() || userEmail?.trim() || 'unknown';\n } catch {\n author = 'unknown';\n }\n }\n\n // Create repository info\n const repositoryInfo: GitRepositoryInfo = {\n title: this.generateTitle(status, currentBranch),\n body: this.generateDescription(status, lastCommit),\n author,\n base: baseBranch,\n head: currentBranch,\n files: uncommittedFiles,\n totalAdditions: uncommittedFiles.reduce((sum, file) => sum + file.additions, 0),\n totalDeletions: uncommittedFiles.reduce((sum, file) => sum + file.deletions, 0),\n isGitRepository: true,\n workingDirectory: this.cwd,\n };\n\n return repositoryInfo;\n } catch (error) {\n // Don't log the full error object to avoid confusing stack traces\n const errorMessage = error instanceof Error ? error.message : 'Unknown error';\n console.error('Error analyzing git repository:', errorMessage);\n return this.createEmptyRepositoryInfo('Error analyzing git repository');\n }\n }\n\n /**\n * Convert GitRepositoryInfo to PRInfo format for compatibility with existing PRReviewer\n */\n toPRInfo(repositoryInfo: GitRepositoryInfo, includeContext: boolean = true): PRInfo {\n const files = repositoryInfo.files.map(\n (file): PRDiff => ({\n filename: file.filename,\n additions: file.additions,\n deletions: file.deletions,\n changes: file.changes,\n patch: includeContext ? file.patch : undefined,\n status: file.status,\n })\n );\n\n // Generate fullDiff from patches if includeContext is true\n let fullDiff: string | undefined;\n if (includeContext) {\n fullDiff = files\n .filter(file => file.patch)\n .map(file => `--- ${file.filename}\\n${file.patch}`)\n .join('\\n\\n');\n }\n\n return {\n number: 0, // Local analysis doesn't have PR number\n title: repositoryInfo.title,\n body: repositoryInfo.body,\n author: repositoryInfo.author,\n base: repositoryInfo.base,\n head: repositoryInfo.head,\n files,\n totalAdditions: repositoryInfo.totalAdditions,\n totalDeletions: repositoryInfo.totalDeletions,\n fullDiff,\n };\n }\n\n private async isGitRepository(): Promise<boolean> {\n try {\n await this.git.checkIsRepo();\n return true;\n } catch {\n return false;\n }\n }\n\n private async getCurrentBranch(): Promise<string> {\n try {\n const branchSummary = await this.git.branch();\n return branchSummary.current || 'unknown';\n } catch {\n return 'unknown';\n }\n }\n\n private async getBaseBranch(): Promise<string> {\n try {\n // Try to get the default branch from remote\n const branches = await this.git.branch(['-r']);\n const mainBranches = ['origin/main', 'origin/master', 'origin/develop'];\n\n for (const mainBranch of mainBranches) {\n if (branches.all.includes(mainBranch)) {\n return mainBranch.replace('origin/', '');\n }\n }\n\n // Fallback to main/master\n return 'main';\n } catch {\n return 'main';\n }\n }\n\n /**\n * Truncate a patch if it exceeds MAX_PATCH_SIZE\n */\n private truncatePatch(patch: string, filename: string): { patch: string; truncated: boolean } {\n const patchSize = Buffer.byteLength(patch, 'utf8');\n\n if (patchSize <= MAX_PATCH_SIZE) {\n return { patch, truncated: false };\n }\n\n // Truncate to MAX_PATCH_SIZE and add a notice\n const truncated = patch.substring(0, MAX_PATCH_SIZE);\n const truncatedPatch = `${truncated}\\n\\n... [TRUNCATED: Diff too large (${(patchSize / 1024).toFixed(1)}KB), showing first ${(MAX_PATCH_SIZE / 1024).toFixed(0)}KB] ...`;\n\n console.error(\n `⚠️ Truncated diff for ${filename} (${(patchSize / 1024).toFixed(1)}KB → ${(MAX_PATCH_SIZE / 1024).toFixed(0)}KB)`\n );\n\n return { patch: truncatedPatch, truncated: true };\n }\n\n private async getRemoteInfo(): Promise<{ name: string; url: string } | null> {\n try {\n const remotes = await this.git.getRemotes(true);\n const origin = remotes.find(r => r.name === 'origin');\n return origin\n ? { name: origin.name, url: origin.refs.fetch || origin.refs.push || '' }\n : null;\n } catch {\n return null;\n }\n }\n\n private async getUncommittedChanges(includeContext: boolean = true): Promise<GitFileChange[]> {\n try {\n const status = await this.git.status();\n const changes: GitFileChange[] = [];\n\n // Process different types of changes\n const fileChanges = [\n ...status.created.map(f => ({ file: f, status: 'added' as const })),\n ...status.deleted.map(f => ({ file: f, status: 'removed' as const })),\n ...status.modified.map(f => ({ file: f, status: 'modified' as const })),\n ...status.renamed.map(f => ({\n file: typeof f === 'string' ? f : f.to || f.from,\n status: 'renamed' as const,\n })),\n ];\n\n for (const { file, status } of fileChanges) {\n // Skip files that should be excluded from analysis\n // FileExclusionHelper uses .gitignore patterns, which is sufficient\n if (this.fileExclusionHelper.shouldExcludeFile(file)) {\n console.error(`⏭️ Skipping excluded file: ${file}`);\n continue;\n }\n\n const filePath = path.join(this.cwd, file);\n const fileChange = await this.analyzeFileChange(file, status, filePath, includeContext);\n changes.push(fileChange);\n }\n\n return changes;\n } catch (error) {\n console.error('Error getting uncommitted changes:', error);\n return [];\n }\n }\n\n /**\n * Get diff between current branch and base branch (for feature branch analysis)\n */\n /**\n * Resolve the base branch ref to a revision that exists locally.\n * In CI (shallow clones), the local branch may not exist, so we try:\n * 1. The branch name as-is (e.g. \"main\")\n * 2. The remote-tracking ref (e.g. \"origin/main\")\n * 3. Fetch from origin then retry\n */\n private async resolveBaseBranchRef(baseBranch: string): Promise<string> {\n // 1. Try the branch name directly\n try {\n await this.git.revparse([baseBranch]);\n return baseBranch;\n } catch {\n // Not available locally\n }\n\n // 2. Try origin/<baseBranch>\n const remoteBranch = `origin/${baseBranch}`;\n try {\n await this.git.revparse([remoteBranch]);\n return remoteBranch;\n } catch {\n // Not available either\n }\n\n // 3. Fetch from origin and retry\n try {\n await this.git.fetch(['origin', baseBranch]);\n // After fetching, origin/<baseBranch> should exist\n await this.git.revparse([remoteBranch]);\n return remoteBranch;\n } catch {\n // Fetch failed — fall back to the original name and let the caller handle the error\n return baseBranch;\n }\n }\n\n private async getBranchDiff(\n baseBranch: string,\n includeContext: boolean = true\n ): Promise<GitFileChange[]> {\n try {\n // Resolve the base branch to an available local ref (handles CI shallow clones)\n const resolvedBase = await this.resolveBaseBranchRef(baseBranch);\n if (resolvedBase !== baseBranch) {\n console.error(`📎 Resolved base branch: ${baseBranch} → ${resolvedBase}`);\n }\n\n // Get the list of changed files between base and current branch\n const diffSummary = await this.git.diffSummary([resolvedBase]);\n const changes: GitFileChange[] = [];\n\n if (!diffSummary || !diffSummary.files) {\n return [];\n }\n\n for (const file of diffSummary.files) {\n // Skip files that should be excluded from analysis\n // FileExclusionHelper uses .gitignore patterns, which is sufficient\n if (this.fileExclusionHelper.shouldExcludeFile(file.file)) {\n console.error(`⏭️ Skipping excluded file: ${file.file}`);\n continue;\n }\n\n // Handle different file types (binary files don't have insertions/deletions)\n const isBinary = 'binary' in file && file.binary;\n const insertions = 'insertions' in file ? file.insertions : 0;\n const deletions = 'deletions' in file ? file.deletions : 0;\n const fileChanges = 'changes' in file ? file.changes : 0;\n\n // Determine status based on insertions/deletions\n let status: 'added' | 'removed' | 'modified' | 'renamed';\n if (isBinary) {\n status = 'modified';\n } else if (insertions > 0 && deletions === 0) {\n status = 'added';\n } else if (insertions === 0 && deletions > 0) {\n status = 'removed';\n } else {\n status = 'modified';\n }\n\n // Get the actual diff patch if needed\n let patch: string | undefined;\n let truncated = false;\n if (includeContext && !isBinary) {\n try {\n const rawPatch = await this.git.diff([resolvedBase, '--', file.file]);\n if (rawPatch) {\n const result = this.truncatePatch(rawPatch, file.file);\n patch = result.patch;\n truncated = result.truncated;\n }\n } catch {\n // Ignore diff errors for specific files\n }\n }\n\n const fileChange: GitFileChange = {\n filename: file.file,\n additions: insertions,\n deletions: deletions,\n changes: fileChanges,\n status,\n patch,\n truncated,\n };\n\n changes.push(fileChange);\n }\n\n return changes;\n } catch (error) {\n console.error('Error getting branch diff:', error);\n return [];\n }\n }\n\n private async analyzeFileChange(\n filename: string,\n status: 'added' | 'removed' | 'modified' | 'renamed',\n filePath: string,\n includeContext: boolean = true\n ): Promise<GitFileChange> {\n let additions = 0;\n let deletions = 0;\n let patch: string | undefined;\n let content: string | undefined;\n let truncated = false;\n\n try {\n // Get diff for the file if it exists and is not binary\n if (includeContext && status !== 'added' && fs.existsSync(filePath)) {\n const diff = await this.git.diff(['--', filename]).catch(() => '');\n if (diff) {\n const result = this.truncatePatch(diff, filename);\n patch = result.patch;\n truncated = result.truncated;\n // Count additions and deletions from diff\n const lines = diff.split('\\n');\n additions = lines.filter(line => line.startsWith('+')).length;\n deletions = lines.filter(line => line.startsWith('-')).length;\n }\n } else if (status !== 'added' && fs.existsSync(filePath)) {\n // If not including context, still count changes for statistics\n const diff = await this.git.diff(['--', filename]).catch(() => '');\n if (diff) {\n const lines = diff.split('\\n');\n additions = lines.filter(line => line.startsWith('+')).length;\n deletions = lines.filter(line => line.startsWith('-')).length;\n }\n }\n\n // For added files\n if (status === 'added' && fs.existsSync(filePath)) {\n try {\n const stats = fs.statSync(filePath);\n if (stats.isFile() && stats.size < 1024 * 1024) {\n // Skip files larger than 1MB\n if (includeContext) {\n content = fs.readFileSync(filePath, 'utf8');\n const result = this.truncatePatch(content, filename);\n patch = result.patch; // For new files, the entire content is the \"patch\"\n truncated = result.truncated;\n }\n // Always count additions for statistics\n const fileContent = includeContext ? content : fs.readFileSync(filePath, 'utf8');\n additions = fileContent!.split('\\n').length;\n }\n } catch {\n // Skip binary or unreadable files\n }\n }\n\n // For removed files, we can't easily count the lines without the previous version\n if (status === 'removed') {\n deletions = 1; // Placeholder - in real git we'd need the previous version\n }\n } catch (error) {\n console.error(`Error analyzing file change for ${filename}:`, error);\n }\n\n return {\n filename,\n status,\n additions,\n deletions,\n changes: additions + deletions,\n content,\n patch,\n truncated,\n };\n }\n\n private generateTitle(status: import('simple-git').StatusResult, branch: string): string {\n if (status.files.length === 0) {\n return `Local Analysis: ${branch} (No changes)`;\n }\n\n const changeTypes = [];\n if (status.created.length > 0) changeTypes.push(`${status.created.length} added`);\n if (status.modified.length > 0) changeTypes.push(`${status.modified.length} modified`);\n if (status.deleted.length > 0) changeTypes.push(`${status.deleted.length} deleted`);\n if (status.renamed.length > 0) changeTypes.push(`${status.renamed.length} renamed`);\n\n return `Local Analysis: ${branch} (${changeTypes.join(', ')})`;\n }\n\n private generateDescription(\n status: import('simple-git').StatusResult,\n lastCommit: import('simple-git').DefaultLogFields | null\n ): string {\n let description = `Analysis of local git repository working directory.\\n\\n`;\n\n if (lastCommit) {\n description += `**Last Commit:** ${lastCommit.message}\\n`;\n description += `**Author:** ${lastCommit.author_name} <${lastCommit.author_email}>\\n`;\n description += `**Date:** ${lastCommit.date}\\n\\n`;\n }\n\n if (status.files.length === 0) {\n description += `**Status:** Working directory is clean - no uncommitted changes found.\\n`;\n } else {\n description += `**Changes Summary:**\\n`;\n description += `- Files to be committed: ${status.staged.length}\\n`;\n description += `- Modified files: ${status.modified.length}\\n`;\n description += `- Untracked files: ${status.not_added.length}\\n`;\n\n if (status.conflicted.length > 0) {\n description += `- Conflicted files: ${status.conflicted.length}\\n`;\n }\n }\n\n return description;\n }\n\n private createEmptyRepositoryInfo(reason: string): GitRepositoryInfo {\n return {\n title: `Local Analysis: ${reason}`,\n body: `Unable to analyze repository: ${reason}`,\n author: 'system',\n base: 'main',\n head: 'HEAD',\n files: [],\n totalAdditions: 0,\n totalDeletions: 0,\n isGitRepository: false,\n workingDirectory: this.cwd,\n };\n }\n}\n"],"mappings":";;;;;AAAA,OAAO,YAAY;AACnB,YAAY,QAAQ;AACpB,YAAY,UAAU;AAFtB,IAQM,4BA0CO;AAlDb;AAAA;AAAA;AAQA,IAAM,6BAA6B;AAAA,MACjC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAiCO,IAAM,sBAAN,MAA0B;AAAA,MACvB,YAA8C;AAAA,MAC9C;AAAA;AAAA;AAAA;AAAA;AAAA,MAMR,YACE,mBAA2B,QAAQ,IAAI,GACvC,qBAAsC,4BACtC;AAEA,cAAM,iBAAsB,aAAQ,gBAAgB;AAIpD,YAAI,eAAe,SAAS,IAAI,GAAG;AACjC,gBAAM,IAAI,MAAM,+CAA+C;AAAA,QACjE;AAEA,aAAK,mBAAmB;AAQxB,aAAK,cAAc,kBAAkB;AAAA,MACvC;AAAA;AAAA;AAAA;AAAA;AAAA,MAMQ,cAAc,oBAA2C;AAE/D,cAAM,gBAAqB,aAAQ,KAAK,kBAAkB,YAAY;AACtE,cAAM,qBAA0B,aAAQ,KAAK,gBAAgB;AAE7D,YAAI;AAGF,gBAAM,eAAoB,cAAS,oBAAoB,aAAa;AAMpE,cAAI,aAAa,WAAW,IAAI,KAAU,gBAAW,YAAY,GAAG;AAClE,kBAAM,IAAI,MAAM,iDAAiD;AAAA,UACnE;AAGA,cAAI,iBAAiB,cAAc;AACjC,kBAAM,IAAI,MAAM,iEAAiE;AAAA,UACnF;AAEA,eAAK,YAAY,OAAO;AAGxB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AW,MAAM;AAAA;AAAA,UAChE;AAAA,QACF;AAEA,eAAO;AAAA,MACT;AAAA,MAEQ,0BAA0B,QAAmC;AACnE,eAAO;AAAA,UACL,OAAO,mBAAmB,MAAM;AAAA,UAChC,MAAM,iCAAiC,MAAM;AAAA,UAC7C,QAAQ;AAAA,UACR,MAAM;AAAA,UACN,MAAM;AAAA,UACN,OAAO,CAAC;AAAA,UACR,gBAAgB;AAAA,UAChB,gBAAgB;AAAA,UAChB,iBAAiB;AAAA,UACjB,kBAAkB,KAAK;AAAA,QACzB;AAAA,MACF;AAAA,IACF;AAAA;AAAA;","names":["path","fs","status"]}
@@ -9,8 +9,8 @@ import {
9
9
  import {
10
10
  failure_condition_evaluator_exports,
11
11
  init_failure_condition_evaluator
12
- } from "./chunk-RJLJUTSU.mjs";
13
- import "./chunk-62TNF5PJ.mjs";
12
+ } from "./chunk-FZEQ744M.mjs";
13
+ import "./chunk-PETLPNRA.mjs";
14
14
  import "./chunk-JL7JXCET.mjs";
15
15
  import "./chunk-25IC7KXZ.mjs";
16
16
  import "./chunk-LW3INISN.mjs";
@@ -1365,4 +1365,4 @@ init_github_frontend();
1365
1365
  export {
1366
1366
  GitHubFrontend
1367
1367
  };
1368
- //# sourceMappingURL=github-frontend-DFT5G32K.mjs.map
1368
+ //# sourceMappingURL=github-frontend-A2R7D4N6.mjs.map
@@ -9,8 +9,8 @@ import {
9
9
  import {
10
10
  failure_condition_evaluator_exports,
11
11
  init_failure_condition_evaluator
12
- } from "./chunk-BR7DYA3S.mjs";
13
- import "./chunk-VLUGLWLA.mjs";
12
+ } from "./chunk-SWO4W57C.mjs";
13
+ import "./chunk-H4HFH7HH.mjs";
14
14
  import "./chunk-JL7JXCET.mjs";
15
15
  import "./chunk-25IC7KXZ.mjs";
16
16
  import "./chunk-LW3INISN.mjs";
@@ -1365,4 +1365,4 @@ init_github_frontend();
1365
1365
  export {
1366
1366
  GitHubFrontend
1367
1367
  };
1368
- //# sourceMappingURL=github-frontend-S523EEJB.mjs.map
1368
+ //# sourceMappingURL=github-frontend-GSB2P5PE.mjs.map
@@ -21,7 +21,7 @@ var init_host = __esm({
21
21
  const { NdjsonSink } = await import("./ndjson-sink-FD2PSXGD.mjs");
22
22
  this.frontends.push(new NdjsonSink(spec.config));
23
23
  } else if (spec.name === "github") {
24
- const { GitHubFrontend } = await import("./github-frontend-S523EEJB.mjs");
24
+ const { GitHubFrontend } = await import("./github-frontend-GSB2P5PE.mjs");
25
25
  this.frontends.push(new GitHubFrontend());
26
26
  } else if (spec.name === "slack") {
27
27
  const { SlackFrontend } = await import("./slack-frontend-TZU2HIK7.mjs");
@@ -60,4 +60,4 @@ init_host();
60
60
  export {
61
61
  FrontendsHost
62
62
  };
63
- //# sourceMappingURL=host-7YKRMOUJ.mjs.map
63
+ //# sourceMappingURL=host-CLPM2WVQ.mjs.map
@@ -21,7 +21,7 @@ var init_host = __esm({
21
21
  const { NdjsonSink } = await import("./ndjson-sink-FD2PSXGD.mjs");
22
22
  this.frontends.push(new NdjsonSink(spec.config));
23
23
  } else if (spec.name === "github") {
24
- const { GitHubFrontend } = await import("./github-frontend-DFT5G32K.mjs");
24
+ const { GitHubFrontend } = await import("./github-frontend-A2R7D4N6.mjs");
25
25
  this.frontends.push(new GitHubFrontend());
26
26
  } else if (spec.name === "slack") {
27
27
  const { SlackFrontend } = await import("./slack-frontend-TZU2HIK7.mjs");
@@ -60,4 +60,4 @@ init_host();
60
60
  export {
61
61
  FrontendsHost
62
62
  };
63
- //# sourceMappingURL=host-H7IX4GBK.mjs.map
63
+ //# sourceMappingURL=host-MR7L57QI.mjs.map
@@ -4,9 +4,9 @@ import {
4
4
  evaluateTransitions,
5
5
  handleRouting,
6
6
  init_routing
7
- } from "./chunk-CISJ6DJW.mjs";
8
- import "./chunk-RJLJUTSU.mjs";
9
- import "./chunk-62TNF5PJ.mjs";
7
+ } from "./chunk-GIAN7HCT.mjs";
8
+ import "./chunk-SWO4W57C.mjs";
9
+ import "./chunk-H4HFH7HH.mjs";
10
10
  import "./chunk-JL7JXCET.mjs";
11
11
  import "./chunk-ZUEQNCKB.mjs";
12
12
  import "./chunk-25IC7KXZ.mjs";
@@ -22,4 +22,4 @@ export {
22
22
  evaluateTransitions,
23
23
  handleRouting
24
24
  };
25
- //# sourceMappingURL=routing-LU5PAREW.mjs.map
25
+ //# sourceMappingURL=routing-KLVK2MJZ.mjs.map
@@ -4,9 +4,9 @@ import {
4
4
  evaluateTransitions,
5
5
  handleRouting,
6
6
  init_routing
7
- } from "./chunk-Q6EPAJ6Z.mjs";
8
- import "./chunk-BR7DYA3S.mjs";
9
- import "./chunk-VLUGLWLA.mjs";
7
+ } from "./chunk-GLROSEYJ.mjs";
8
+ import "./chunk-FZEQ744M.mjs";
9
+ import "./chunk-PETLPNRA.mjs";
10
10
  import "./chunk-JL7JXCET.mjs";
11
11
  import "./chunk-ZUEQNCKB.mjs";
12
12
  import "./chunk-25IC7KXZ.mjs";
@@ -22,4 +22,4 @@ export {
22
22
  evaluateTransitions,
23
23
  handleRouting
24
24
  };
25
- //# sourceMappingURL=routing-ZMBKWMVI.mjs.map
25
+ //# sourceMappingURL=routing-V3MYZAOH.mjs.map
@@ -4,7 +4,7 @@ import {
4
4
  handleScheduleAction,
5
5
  init_schedule_tool,
6
6
  isScheduleTool
7
- } from "./chunk-6EXCUX7Y.mjs";
7
+ } from "./chunk-CKDFGNF4.mjs";
8
8
  import "./chunk-KFKHU6CM.mjs";
9
9
  import "./chunk-M3BYMES6.mjs";
10
10
  import "./chunk-LG4AUKHB.mjs";
@@ -12,11 +12,11 @@ import "./chunk-B7BVQM5K.mjs";
12
12
  import "./chunk-XXAEN5KU.mjs";
13
13
  import "./chunk-GEW6LS32.mjs";
14
14
  import "./chunk-DNDS7R3N.mjs";
15
- import "./chunk-YYZAN5NK.mjs";
15
+ import "./chunk-FYK2DJK6.mjs";
16
16
  import "./chunk-NCWIZVOT.mjs";
17
- import "./chunk-CISJ6DJW.mjs";
18
- import "./chunk-RJLJUTSU.mjs";
19
- import "./chunk-62TNF5PJ.mjs";
17
+ import "./chunk-GIAN7HCT.mjs";
18
+ import "./chunk-SWO4W57C.mjs";
19
+ import "./chunk-H4HFH7HH.mjs";
20
20
  import "./chunk-JL7JXCET.mjs";
21
21
  import "./chunk-ZUEQNCKB.mjs";
22
22
  import "./chunk-25IC7KXZ.mjs";
@@ -32,4 +32,4 @@ export {
32
32
  handleScheduleAction,
33
33
  isScheduleTool
34
34
  };
35
- //# sourceMappingURL=schedule-tool-EOMZFICZ.mjs.map
35
+ //# sourceMappingURL=schedule-tool-HYM55K3H.mjs.map
@@ -4,7 +4,7 @@ import {
4
4
  handleScheduleAction,
5
5
  init_schedule_tool,
6
6
  isScheduleTool
7
- } from "./chunk-V6GI4U2M.mjs";
7
+ } from "./chunk-AADKUA6L.mjs";
8
8
  import "./chunk-KFKHU6CM.mjs";
9
9
  import "./chunk-M3BYMES6.mjs";
10
10
  import "./chunk-LG4AUKHB.mjs";
@@ -12,11 +12,11 @@ import "./chunk-B7BVQM5K.mjs";
12
12
  import "./chunk-XXAEN5KU.mjs";
13
13
  import "./chunk-GEW6LS32.mjs";
14
14
  import "./chunk-DNDS7R3N.mjs";
15
- import "./chunk-YYZAN5NK.mjs";
15
+ import "./chunk-FYK2DJK6.mjs";
16
16
  import "./chunk-NCWIZVOT.mjs";
17
- import "./chunk-CISJ6DJW.mjs";
18
- import "./chunk-RJLJUTSU.mjs";
19
- import "./chunk-62TNF5PJ.mjs";
17
+ import "./chunk-GLROSEYJ.mjs";
18
+ import "./chunk-FZEQ744M.mjs";
19
+ import "./chunk-PETLPNRA.mjs";
20
20
  import "./chunk-JL7JXCET.mjs";
21
21
  import "./chunk-ZUEQNCKB.mjs";
22
22
  import "./chunk-25IC7KXZ.mjs";
@@ -32,4 +32,4 @@ export {
32
32
  handleScheduleAction,
33
33
  isScheduleTool
34
34
  };
35
- //# sourceMappingURL=schedule-tool-NX75VKGA.mjs.map
35
+ //# sourceMappingURL=schedule-tool-NYLNJUEW.mjs.map
@@ -4,7 +4,7 @@ import {
4
4
  handleScheduleAction,
5
5
  init_schedule_tool,
6
6
  isScheduleTool
7
- } from "./chunk-GFNXX64M.mjs";
7
+ } from "./chunk-YY3KADY2.mjs";
8
8
  import "./chunk-KFKHU6CM.mjs";
9
9
  import "./chunk-M3BYMES6.mjs";
10
10
  import "./chunk-LG4AUKHB.mjs";
@@ -12,11 +12,11 @@ import "./chunk-B7BVQM5K.mjs";
12
12
  import "./chunk-XXAEN5KU.mjs";
13
13
  import "./chunk-GEW6LS32.mjs";
14
14
  import "./chunk-DNDS7R3N.mjs";
15
- import "./chunk-YYZAN5NK.mjs";
15
+ import "./chunk-FYK2DJK6.mjs";
16
16
  import "./chunk-NCWIZVOT.mjs";
17
- import "./chunk-Q6EPAJ6Z.mjs";
18
- import "./chunk-BR7DYA3S.mjs";
19
- import "./chunk-VLUGLWLA.mjs";
17
+ import "./chunk-GLROSEYJ.mjs";
18
+ import "./chunk-FZEQ744M.mjs";
19
+ import "./chunk-PETLPNRA.mjs";
20
20
  import "./chunk-JL7JXCET.mjs";
21
21
  import "./chunk-ZUEQNCKB.mjs";
22
22
  import "./chunk-25IC7KXZ.mjs";
@@ -32,4 +32,4 @@ export {
32
32
  handleScheduleAction,
33
33
  isScheduleTool
34
34
  };
35
- //# sourceMappingURL=schedule-tool-CDVUSZEG.mjs.map
35
+ //# sourceMappingURL=schedule-tool-PRXFAV4K.mjs.map
@@ -6,7 +6,7 @@ import {
6
6
  extractSlackContext,
7
7
  init_schedule_tool_handler,
8
8
  isScheduleToolCall
9
- } from "./chunk-GFNXX64M.mjs";
9
+ } from "./chunk-AADKUA6L.mjs";
10
10
  import "./chunk-KFKHU6CM.mjs";
11
11
  import "./chunk-M3BYMES6.mjs";
12
12
  import "./chunk-LG4AUKHB.mjs";
@@ -14,11 +14,11 @@ import "./chunk-B7BVQM5K.mjs";
14
14
  import "./chunk-XXAEN5KU.mjs";
15
15
  import "./chunk-GEW6LS32.mjs";
16
16
  import "./chunk-DNDS7R3N.mjs";
17
- import "./chunk-YYZAN5NK.mjs";
17
+ import "./chunk-FYK2DJK6.mjs";
18
18
  import "./chunk-NCWIZVOT.mjs";
19
- import "./chunk-Q6EPAJ6Z.mjs";
20
- import "./chunk-BR7DYA3S.mjs";
21
- import "./chunk-VLUGLWLA.mjs";
19
+ import "./chunk-GLROSEYJ.mjs";
20
+ import "./chunk-FZEQ744M.mjs";
21
+ import "./chunk-PETLPNRA.mjs";
22
22
  import "./chunk-JL7JXCET.mjs";
23
23
  import "./chunk-ZUEQNCKB.mjs";
24
24
  import "./chunk-25IC7KXZ.mjs";
@@ -36,4 +36,4 @@ export {
36
36
  extractSlackContext,
37
37
  isScheduleToolCall
38
38
  };
39
- //# sourceMappingURL=schedule-tool-handler-3FJHDIPG.mjs.map
39
+ //# sourceMappingURL=schedule-tool-handler-EFQIYD3W.mjs.map
@@ -6,7 +6,7 @@ import {
6
6
  extractSlackContext,
7
7
  init_schedule_tool_handler,
8
8
  isScheduleToolCall
9
- } from "./chunk-V6GI4U2M.mjs";
9
+ } from "./chunk-CKDFGNF4.mjs";
10
10
  import "./chunk-KFKHU6CM.mjs";
11
11
  import "./chunk-M3BYMES6.mjs";
12
12
  import "./chunk-LG4AUKHB.mjs";
@@ -14,11 +14,11 @@ import "./chunk-B7BVQM5K.mjs";
14
14
  import "./chunk-XXAEN5KU.mjs";
15
15
  import "./chunk-GEW6LS32.mjs";
16
16
  import "./chunk-DNDS7R3N.mjs";
17
- import "./chunk-YYZAN5NK.mjs";
17
+ import "./chunk-FYK2DJK6.mjs";
18
18
  import "./chunk-NCWIZVOT.mjs";
19
- import "./chunk-CISJ6DJW.mjs";
20
- import "./chunk-RJLJUTSU.mjs";
21
- import "./chunk-62TNF5PJ.mjs";
19
+ import "./chunk-GIAN7HCT.mjs";
20
+ import "./chunk-SWO4W57C.mjs";
21
+ import "./chunk-H4HFH7HH.mjs";
22
22
  import "./chunk-JL7JXCET.mjs";
23
23
  import "./chunk-ZUEQNCKB.mjs";
24
24
  import "./chunk-25IC7KXZ.mjs";
@@ -36,4 +36,4 @@ export {
36
36
  extractSlackContext,
37
37
  isScheduleToolCall
38
38
  };
39
- //# sourceMappingURL=schedule-tool-handler-KKN7XJYT.mjs.map
39
+ //# sourceMappingURL=schedule-tool-handler-HVWCEGQ6.mjs.map
@@ -6,7 +6,7 @@ import {
6
6
  extractSlackContext,
7
7
  init_schedule_tool_handler,
8
8
  isScheduleToolCall
9
- } from "./chunk-6EXCUX7Y.mjs";
9
+ } from "./chunk-YY3KADY2.mjs";
10
10
  import "./chunk-KFKHU6CM.mjs";
11
11
  import "./chunk-M3BYMES6.mjs";
12
12
  import "./chunk-LG4AUKHB.mjs";
@@ -14,11 +14,11 @@ import "./chunk-B7BVQM5K.mjs";
14
14
  import "./chunk-XXAEN5KU.mjs";
15
15
  import "./chunk-GEW6LS32.mjs";
16
16
  import "./chunk-DNDS7R3N.mjs";
17
- import "./chunk-YYZAN5NK.mjs";
17
+ import "./chunk-FYK2DJK6.mjs";
18
18
  import "./chunk-NCWIZVOT.mjs";
19
- import "./chunk-CISJ6DJW.mjs";
20
- import "./chunk-RJLJUTSU.mjs";
21
- import "./chunk-62TNF5PJ.mjs";
19
+ import "./chunk-GLROSEYJ.mjs";
20
+ import "./chunk-FZEQ744M.mjs";
21
+ import "./chunk-PETLPNRA.mjs";
22
22
  import "./chunk-JL7JXCET.mjs";
23
23
  import "./chunk-ZUEQNCKB.mjs";
24
24
  import "./chunk-25IC7KXZ.mjs";
@@ -36,4 +36,4 @@ export {
36
36
  extractSlackContext,
37
37
  isScheduleToolCall
38
38
  };
39
- //# sourceMappingURL=schedule-tool-handler-QNZG55DX.mjs.map
39
+ //# sourceMappingURL=schedule-tool-handler-M5YI573R.mjs.map
@@ -223,7 +223,7 @@ type ConfigCheckType = 'ai' | 'command' | 'script' | 'http' | 'http_input' | 'ht
223
223
  /**
224
224
  * Valid event triggers for checks
225
225
  */
226
- type EventTrigger = 'pr_opened' | 'pr_updated' | 'pr_closed' | 'issue_opened' | 'issue_comment' | 'manual' | 'schedule' | 'webhook_received';
226
+ type EventTrigger = 'pr_opened' | 'pr_updated' | 'pr_closed' | 'issue_opened' | 'issue_comment' | 'manual' | 'schedule' | 'webhook_received' | 'slack_message';
227
227
  /**
228
228
  * Valid output formats
229
229
  */
@@ -1205,6 +1205,41 @@ interface SandboxDefaults {
1205
1205
  /** Base env var patterns for all sandboxes (replaces hardcoded defaults when set) */
1206
1206
  env_passthrough?: string[];
1207
1207
  }
1208
+ /**
1209
+ * Slack message trigger for reactive workflow execution
1210
+ * Triggers workflows based on Slack messages matching configured filters
1211
+ */
1212
+ interface SlackMessageTrigger {
1213
+ /** Channel IDs to monitor (supports wildcard suffix, e.g., "CENG*") */
1214
+ channels?: string[];
1215
+ /** Only trigger on messages from these user IDs */
1216
+ from?: string[];
1217
+ /** Allow bot messages to trigger (default: false) */
1218
+ from_bots?: boolean;
1219
+ /** Keyword match - any keyword triggers (case-insensitive OR) */
1220
+ contains?: string[];
1221
+ /** Regex pattern to match against message text */
1222
+ match?: string;
1223
+ /** Thread scope filter (default: 'any') */
1224
+ threads?: 'root_only' | 'thread_only' | 'any';
1225
+ /** Workflow/check ID to execute */
1226
+ workflow: string;
1227
+ /** Optional workflow inputs */
1228
+ inputs?: Record<string, unknown>;
1229
+ /** Output destination configuration */
1230
+ output?: {
1231
+ /** Output type: slack, github, webhook, or none */
1232
+ type: 'slack' | 'github' | 'webhook' | 'none';
1233
+ /** Target (channel name, repo, URL) */
1234
+ target?: string;
1235
+ /** Thread ID for threaded outputs */
1236
+ thread_id?: string;
1237
+ };
1238
+ /** Description for logging/display */
1239
+ description?: string;
1240
+ /** Enable/disable this trigger (default: true) */
1241
+ enabled?: boolean;
1242
+ }
1208
1243
  /**
1209
1244
  * Static cron job defined in YAML configuration
1210
1245
  * These are always executed by the scheduler daemon
@@ -1339,6 +1374,8 @@ interface SchedulerConfig {
1339
1374
  permissions?: SchedulerPermissionsConfig;
1340
1375
  /** Static cron jobs defined in configuration (always executed) */
1341
1376
  cron?: Record<string, StaticCronJob>;
1377
+ /** Slack message triggers for reactive workflow execution */
1378
+ on_message?: Record<string, SlackMessageTrigger>;
1342
1379
  }
1343
1380
  /**
1344
1381
  * Main Visor configuration
package/dist/sdk/sdk.d.ts CHANGED
@@ -223,7 +223,7 @@ type ConfigCheckType = 'ai' | 'command' | 'script' | 'http' | 'http_input' | 'ht
223
223
  /**
224
224
  * Valid event triggers for checks
225
225
  */
226
- type EventTrigger = 'pr_opened' | 'pr_updated' | 'pr_closed' | 'issue_opened' | 'issue_comment' | 'manual' | 'schedule' | 'webhook_received';
226
+ type EventTrigger = 'pr_opened' | 'pr_updated' | 'pr_closed' | 'issue_opened' | 'issue_comment' | 'manual' | 'schedule' | 'webhook_received' | 'slack_message';
227
227
  /**
228
228
  * Valid output formats
229
229
  */
@@ -1205,6 +1205,41 @@ interface SandboxDefaults {
1205
1205
  /** Base env var patterns for all sandboxes (replaces hardcoded defaults when set) */
1206
1206
  env_passthrough?: string[];
1207
1207
  }
1208
+ /**
1209
+ * Slack message trigger for reactive workflow execution
1210
+ * Triggers workflows based on Slack messages matching configured filters
1211
+ */
1212
+ interface SlackMessageTrigger {
1213
+ /** Channel IDs to monitor (supports wildcard suffix, e.g., "CENG*") */
1214
+ channels?: string[];
1215
+ /** Only trigger on messages from these user IDs */
1216
+ from?: string[];
1217
+ /** Allow bot messages to trigger (default: false) */
1218
+ from_bots?: boolean;
1219
+ /** Keyword match - any keyword triggers (case-insensitive OR) */
1220
+ contains?: string[];
1221
+ /** Regex pattern to match against message text */
1222
+ match?: string;
1223
+ /** Thread scope filter (default: 'any') */
1224
+ threads?: 'root_only' | 'thread_only' | 'any';
1225
+ /** Workflow/check ID to execute */
1226
+ workflow: string;
1227
+ /** Optional workflow inputs */
1228
+ inputs?: Record<string, unknown>;
1229
+ /** Output destination configuration */
1230
+ output?: {
1231
+ /** Output type: slack, github, webhook, or none */
1232
+ type: 'slack' | 'github' | 'webhook' | 'none';
1233
+ /** Target (channel name, repo, URL) */
1234
+ target?: string;
1235
+ /** Thread ID for threaded outputs */
1236
+ thread_id?: string;
1237
+ };
1238
+ /** Description for logging/display */
1239
+ description?: string;
1240
+ /** Enable/disable this trigger (default: true) */
1241
+ enabled?: boolean;
1242
+ }
1208
1243
  /**
1209
1244
  * Static cron job defined in YAML configuration
1210
1245
  * These are always executed by the scheduler daemon
@@ -1339,6 +1374,8 @@ interface SchedulerConfig {
1339
1374
  permissions?: SchedulerPermissionsConfig;
1340
1375
  /** Static cron jobs defined in configuration (always executed) */
1341
1376
  cron?: Record<string, StaticCronJob>;
1377
+ /** Slack message triggers for reactive workflow execution */
1378
+ on_message?: Record<string, SlackMessageTrigger>;
1342
1379
  }
1343
1380
  /**
1344
1381
  * Main Visor configuration