@probelabs/visor 0.1.90 → 0.1.93

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 (131) hide show
  1. package/README.md +68 -2
  2. package/action.yml +1 -1
  3. package/defaults/.visor.yaml +133 -168
  4. package/dist/13.index.js +82 -0
  5. package/dist/159.index.js +38 -0
  6. package/dist/168.index.js +82 -0
  7. package/dist/201.index.js +82 -0
  8. package/dist/262.index.js +48 -0
  9. package/dist/272.index.js +82 -0
  10. package/dist/273.index.js +48 -0
  11. package/dist/320.index.js +38 -0
  12. package/dist/34.index.js +81 -0
  13. package/dist/421.index.js +48 -0
  14. package/dist/437.index.js +82 -0
  15. package/dist/441.index.js +81 -0
  16. package/dist/450.index.js +82 -0
  17. package/dist/54.index.js +81 -0
  18. package/dist/544.index.js +38 -0
  19. package/dist/558.index.js +82 -0
  20. package/dist/715.index.js +38 -0
  21. package/dist/737.index.js +82 -0
  22. package/dist/834.index.js +48 -0
  23. package/dist/85.index.js +82 -0
  24. package/dist/861.index.js +48 -0
  25. package/dist/878.index.js +81 -0
  26. package/dist/940.index.js +38 -0
  27. package/dist/989.index.js +81 -0
  28. package/dist/996.index.js +82 -0
  29. package/dist/ai-review-service.d.ts +11 -1
  30. package/dist/ai-review-service.d.ts.map +1 -1
  31. package/dist/check-execution-engine.d.ts +15 -2
  32. package/dist/check-execution-engine.d.ts.map +1 -1
  33. package/dist/cli-main.d.ts.map +1 -1
  34. package/dist/cli.d.ts.map +1 -1
  35. package/dist/config.d.ts.map +1 -1
  36. package/dist/defaults/.visor.yaml +133 -168
  37. package/dist/failure-condition-evaluator.d.ts +3 -2
  38. package/dist/failure-condition-evaluator.d.ts.map +1 -1
  39. package/dist/generated/config-schema.d.ts +89 -2
  40. package/dist/generated/config-schema.d.ts.map +1 -1
  41. package/dist/generated/config-schema.json +109 -1
  42. package/dist/git-repository-analyzer.d.ts +17 -1
  43. package/dist/git-repository-analyzer.d.ts.map +1 -1
  44. package/dist/github-comments.d.ts.map +1 -1
  45. package/dist/github-reactions.d.ts +36 -0
  46. package/dist/github-reactions.d.ts.map +1 -0
  47. package/dist/index.d.ts +2 -0
  48. package/dist/index.d.ts.map +1 -1
  49. package/dist/index.js +173112 -46133
  50. package/dist/liquid-extensions.d.ts +15 -0
  51. package/dist/liquid-extensions.d.ts.map +1 -1
  52. package/dist/memory-store.d.ts +129 -0
  53. package/dist/memory-store.d.ts.map +1 -0
  54. package/dist/output/issue-assistant/schema.json +42 -0
  55. package/dist/output/issue-assistant/template.liquid +1 -0
  56. package/dist/output/overview/schema.json +33 -0
  57. package/dist/output/overview/template.liquid +16 -0
  58. package/dist/output-formatters.d.ts +1 -0
  59. package/dist/output-formatters.d.ts.map +1 -1
  60. package/dist/pr-analyzer.d.ts +2 -0
  61. package/dist/pr-analyzer.d.ts.map +1 -1
  62. package/dist/proto/channelz.proto +564 -0
  63. package/dist/providers/check-provider-registry.d.ts.map +1 -1
  64. package/dist/providers/command-check-provider.d.ts.map +1 -1
  65. package/dist/providers/github-ops-provider.d.ts +18 -0
  66. package/dist/providers/github-ops-provider.d.ts.map +1 -0
  67. package/dist/providers/memory-check-provider.d.ts +56 -0
  68. package/dist/providers/memory-check-provider.d.ts.map +1 -0
  69. package/dist/reviewer.d.ts +2 -0
  70. package/dist/reviewer.d.ts.map +1 -1
  71. package/dist/sdk/check-execution-engine-RORGGGGP.mjs +11 -0
  72. package/dist/sdk/chunk-I3GQJIR7.mjs +752 -0
  73. package/dist/sdk/chunk-I3GQJIR7.mjs.map +1 -0
  74. package/dist/sdk/chunk-KVHVCGY6.mjs +103 -0
  75. package/dist/sdk/chunk-KVHVCGY6.mjs.map +1 -0
  76. package/dist/sdk/chunk-TWJKAYT6.mjs +1124 -0
  77. package/dist/sdk/chunk-TWJKAYT6.mjs.map +1 -0
  78. package/dist/sdk/{chunk-N2PPFOSF.mjs → chunk-Z47UECAT.mjs} +2593 -264
  79. package/dist/sdk/chunk-Z47UECAT.mjs.map +1 -0
  80. package/dist/sdk/liquid-extensions-GMEGEGC3.mjs +18 -0
  81. package/dist/sdk/mermaid-telemetry-LZGDD35I.mjs +61 -0
  82. package/dist/sdk/mermaid-telemetry-LZGDD35I.mjs.map +1 -0
  83. package/dist/sdk/sdk.d.mts +48 -2
  84. package/dist/sdk/sdk.d.ts +48 -2
  85. package/dist/sdk/sdk.js +5372 -781
  86. package/dist/sdk/sdk.js.map +1 -1
  87. package/dist/sdk/sdk.mjs +112 -7
  88. package/dist/sdk/sdk.mjs.map +1 -1
  89. package/dist/sdk/tracer-init-O7RLXMJ3.mjs +10 -0
  90. package/dist/sdk/tracer-init-O7RLXMJ3.mjs.map +1 -0
  91. package/dist/session-registry.d.ts +19 -5
  92. package/dist/session-registry.d.ts.map +1 -1
  93. package/dist/telemetry/fallback-ndjson.d.ts +7 -0
  94. package/dist/telemetry/fallback-ndjson.d.ts.map +1 -0
  95. package/dist/telemetry/file-span-exporter.d.ts +17 -0
  96. package/dist/telemetry/file-span-exporter.d.ts.map +1 -0
  97. package/dist/telemetry/metrics.d.ts +13 -0
  98. package/dist/telemetry/metrics.d.ts.map +1 -0
  99. package/dist/telemetry/opentelemetry.d.ts +26 -0
  100. package/dist/telemetry/opentelemetry.d.ts.map +1 -0
  101. package/dist/telemetry/trace-helpers.d.ts +9 -0
  102. package/dist/telemetry/trace-helpers.d.ts.map +1 -0
  103. package/dist/telemetry/trace-report-exporter.d.ts +17 -0
  104. package/dist/telemetry/trace-report-exporter.d.ts.map +1 -0
  105. package/dist/traces/run-2025-10-15T11-54-04-087Z.ndjson +33 -0
  106. package/dist/traces/run-2025-10-15T11-54-14-046Z.ndjson +33 -0
  107. package/dist/traces/run-2025-10-15T11-54-14-575Z.ndjson +33 -0
  108. package/dist/traces/run-2025-10-15T11-54-15-082Z.ndjson +33 -0
  109. package/dist/traces/run-2025-10-15T11-54-15-561Z.ndjson +12 -0
  110. package/dist/types/cli.d.ts +4 -0
  111. package/dist/types/cli.d.ts.map +1 -1
  112. package/dist/types/config.d.ts +56 -2
  113. package/dist/types/config.d.ts.map +1 -1
  114. package/dist/utils/author-permissions.d.ts +74 -0
  115. package/dist/utils/author-permissions.d.ts.map +1 -0
  116. package/dist/utils/head-sha.d.ts +8 -0
  117. package/dist/utils/head-sha.d.ts.map +1 -0
  118. package/dist/utils/mermaid-telemetry.d.ts +3 -0
  119. package/dist/utils/mermaid-telemetry.d.ts.map +1 -0
  120. package/dist/utils/tracer-init.d.ts +12 -0
  121. package/dist/utils/tracer-init.d.ts.map +1 -0
  122. package/dist/utils/ui-helpers.d.ts +3 -0
  123. package/dist/utils/ui-helpers.d.ts.map +1 -0
  124. package/package.json +2 -2
  125. package/dist/sdk/check-execution-engine-Z2USLMN5.mjs +0 -9
  126. package/dist/sdk/chunk-FIL2OGF6.mjs +0 -68
  127. package/dist/sdk/chunk-FIL2OGF6.mjs.map +0 -1
  128. package/dist/sdk/chunk-N2PPFOSF.mjs.map +0 -1
  129. package/dist/sdk/liquid-extensions-KDECAJTV.mjs +0 -12
  130. /package/dist/sdk/{check-execution-engine-Z2USLMN5.mjs.map → check-execution-engine-RORGGGGP.mjs.map} +0 -0
  131. /package/dist/sdk/{liquid-extensions-KDECAJTV.mjs.map → liquid-extensions-GMEGEGC3.mjs.map} +0 -0
@@ -7,16 +7,8 @@ version: "1.0"
7
7
  # Global AI provider settings - users should configure their preferred provider
8
8
  # For CI testing, use --provider mock CLI flag instead
9
9
 
10
- # Run checks sequentially to ensure session reuse works correctly
11
- max_parallelism: 1
12
-
13
- # 🔄 AI Session Reuse Feature:
14
- # This configuration demonstrates the new 'reuse_ai_session' feature that allows
15
- # dependent checks to continue conversations with the same AI session, providing
16
- # context continuity and more intelligent follow-up analysis.
17
- #
18
- # Example: security-remediation reuses the session from the security check,
19
- # allowing the AI to reference the previous security analysis discussion.
10
+ # Run up to 4 checks in parallel for faster execution
11
+ max_parallelism: 4
20
12
 
21
13
  # Global fail condition - fail if critical or error severity issues are found
22
14
  fail_if: "output.issues && output.issues.some(i => i.severity === 'critical' || i.severity === 'error')"
@@ -69,36 +61,34 @@ checks:
69
61
  overview:
70
62
  type: ai
71
63
  group: overview
64
+ schema: overview
72
65
  prompt: |
73
- # 📋 Pull Request Overview: {{ pr.title }}
74
-
75
- {% if pr.body %}
76
- ## Description
77
- {{ pr.body }}
78
- {% endif %}
66
+ You are generating PR overview, to help owners of the repository to understand what this PR is above, and help reviewer to point to the right parts of the code. First you should provide detailed but concise description, mentioning all the changes.
79
67
 
80
68
  ## Files Changed Analysis
69
+ After you need to summarize insights from `<files_summary>`: changed files, additions/deletions, notable patterns.
81
70
 
82
- Analyze the files listed in the `<files_summary>` section, which provides a structured overview of all changes including filenames, status, additions, and deletions.
71
+ Next ensure you cover all below:
83
72
 
84
73
  ## Architecture & Impact Assessment
85
-
86
- Please generate a comprehensive overview and analysis of this pull request.
87
-
88
- Follow these instructions to create a thorough assessment:
89
-
90
- 1. **Change Impact Analysis**
91
- - What this PR accomplishes
92
- - Key technical changes introduced
93
- - Affected system components
94
-
95
- 2. **Architecture Visualization**
96
- - Create appropriate mermaid diagram(s) to visualize the changes
97
- - Choose the best diagram type for the context
98
- - Use multiple diagrams if needed to explain different aspects
99
- - Focus on modified components and their relationships
100
-
101
- Provide a balanced technical assessment suitable for both developers and stakeholders.
74
+ - What this PR accomplishes
75
+ - Key technical changes introduced
76
+ - Affected system components
77
+ - Include one or more mermaid diagrams when useful to visualize component relationships or flow.
78
+
79
+ ## Scope Discovery & Context Expansion
80
+ - From the `<files_summary>` and code diffs, infer the broader scope of impact across modules, services, and boundaries.
81
+ - If your environment supports code search/extract tools, use them to peek at immediately-related files (tests, configs, entrypoints) for better context. If tools are not available, infer and list what you would search next.
82
+
83
+ You may also be asked to assign labels to PR; if so use this:
84
+ - `tags.review-effort`: integer 1–5 estimating review effort (1=trivial, 5=very high).
85
+ - `tags.label`: one of [bug, chore, documentation, enhancement, feature]. Choose the best fit.
86
+
87
+ Important:
88
+ - Propose `tags.review-effort` and `tags.label` only for the initial PR open event.
89
+ - Do not change or re-suggest labels on PR update events; the repository applies labels only on `pr_opened`.
90
+
91
+ Be concise, specific, and actionable. Avoid praise or celebration.
102
92
  on: [pr_opened, pr_updated]
103
93
 
104
94
  # Security analysis - Critical for all projects
@@ -146,7 +136,6 @@ checks:
146
136
  - **warning**: Security concerns that should be addressed (verbose errors, missing rate limiting, insecure defaults)
147
137
  - **info**: Security best practices and hardening suggestions (defense in depth, additional validation)
148
138
  depends_on: [overview]
149
- reuse_ai_session: overview # 🔄 Reuses the overview check's AI session for context continuity
150
139
  on: [pr_opened, pr_updated]
151
140
 
152
141
  # Performance analysis - Important for all applications
@@ -155,7 +144,7 @@ checks:
155
144
  group: review
156
145
  schema: code-review
157
146
  prompt: |
158
- Building on our overview and security analysis, now review the code changes for performance issues.
147
+ Building on our overview analysis, now review the code changes for performance issues.
159
148
 
160
149
  Focus on the files listed in `<files_summary>` and analyze the code changes shown in the `<full_diff>` or `<commit_diff>` sections.
161
150
 
@@ -183,7 +172,7 @@ checks:
183
172
  - Race conditions and deadlocks
184
173
  - Inefficient parallel processing
185
174
 
186
- Building on our overview and security analysis, identify performance issues and provide optimization recommendations that complement our previous findings.
175
+ Building on our overview analysis, identify performance issues and provide optimization recommendations.
187
176
 
188
177
  ## Severity Guidelines
189
178
  Use the following severity levels appropriately:
@@ -191,8 +180,7 @@ checks:
191
180
  - **error**: Significant performance problems affecting user experience (O(n²) in critical path, N+1 queries, blocking I/O)
192
181
  - **warning**: Performance concerns that should be optimized (inefficient algorithms, missing indexes, unnecessary operations)
193
182
  - **info**: Performance best practices and optimization opportunities (caching suggestions, async improvements)
194
- depends_on: [security]
195
- reuse_ai_session: overview # 🔄 Reuses the overview check's AI session for context continuity
183
+ depends_on: [overview]
196
184
  on: [pr_opened, pr_updated]
197
185
 
198
186
  # Code quality and maintainability
@@ -201,7 +189,7 @@ checks:
201
189
  group: review
202
190
  schema: code-review
203
191
  prompt: |
204
- Building on our overview, security, and performance discussions, evaluate the code quality and maintainability.
192
+ Building on our overview discussion, evaluate the code quality and maintainability.
205
193
 
206
194
  Review the code changes shown in the `<full_diff>` or `<commit_diff>` sections, considering the files listed in `<files_summary>`.
207
195
 
@@ -235,7 +223,7 @@ checks:
235
223
  - Framework/library best practices
236
224
  - Type safety (if applicable)
237
225
 
238
- Focus on actionable improvements that enhance code maintainability while considering the overview, security, and performance findings we've already discussed.
226
+ Focus on actionable improvements that enhance code maintainability based on the overview analysis.
239
227
 
240
228
  ## Severity Guidelines
241
229
  Use the following severity levels appropriately:
@@ -243,8 +231,7 @@ checks:
243
231
  - **error**: Quality problems that significantly impact maintainability (no error handling, high complexity, severe coupling)
244
232
  - **warning**: Quality concerns that should be addressed (missing tests, code duplication, poor naming)
245
233
  - **info**: Best practices and improvement suggestions (refactoring opportunities, documentation improvements)
246
- depends_on: [performance]
247
- reuse_ai_session: overview # 🔄 Reuses the overview check's AI session for context continuity
234
+ depends_on: [overview]
248
235
  on: [pr_opened, pr_updated]
249
236
 
250
237
  # Code style and formatting analysis
@@ -253,7 +240,7 @@ checks:
253
240
  group: review
254
241
  schema: code-review
255
242
  prompt: |
256
- Building on our overview, security, performance, and quality discussions, analyze the code style and formatting consistency.
243
+ Building on our overview discussion, analyze the code style and formatting consistency.
257
244
 
258
245
  Review the code changes shown in the `<full_diff>` or `<commit_diff>` sections, considering the files listed in `<files_summary>`.
259
246
 
@@ -276,7 +263,7 @@ checks:
276
263
  - Documentation standards adherence
277
264
  - Code comment quality and completeness
278
265
 
279
- Focus on style improvements that enhance code readability and maintainability while considering our previous analysis.
266
+ Focus on style improvements that enhance code readability and maintainability based on the overview analysis.
280
267
 
281
268
  ## Severity Guidelines
282
269
  Use the following severity levels appropriately:
@@ -284,135 +271,113 @@ checks:
284
271
  - **error**: Major style violations that significantly harm readability (completely inconsistent formatting, misleading names)
285
272
  - **warning**: Style inconsistencies that should be fixed (mixed conventions, unclear naming, formatting issues)
286
273
  - **info**: Style suggestions and minor improvements (spacing, comment formatting, optional conventions)
287
- depends_on: [quality]
288
- reuse_ai_session: overview # 🔄 Reuses the overview check's AI session for context continuity
274
+ depends_on: [overview]
289
275
  on: [pr_opened, pr_updated]
290
276
 
291
- # Command orchestrator - demonstrates noop type for triggering multiple checks
292
- review-all:
293
- type: noop
294
- command: '/review'
295
- depends_on: [overview, security, performance, quality, style]
296
- on: [issue_comment]
297
- if: "event.isPullRequest" # Only trigger on PR comments, not issues
298
- group: orchestrator
299
-
300
- # Intelligent Issue Assistant - provides sophisticated issue triage and assistance
277
+ # Apply labels based on overview tags runs only on PR open (GitHub environments only)
278
+ apply-overview-labels:
279
+ type: github
280
+ tags: [github]
281
+ depends_on: [overview]
282
+ on: [pr_opened]
283
+ op: labels.add
284
+ values:
285
+ - "{{ outputs.overview.tags.label | default: '' | safe_label }}"
286
+ - "{{ outputs.overview.tags['review-effort'] | default: '' | prepend: 'review/effort:' | safe_label }}"
287
+ value_js: |
288
+ return values.filter(v => typeof v === 'string' && v.trim().length > 0);
289
+
290
+ # Issue Assistant (issues only) — triage-quality prompt from main branch, structured output
301
291
  issue-assistant:
302
292
  type: ai
303
- group: dynamic # Special group: creates new comment each time instead of updating
293
+ group: dynamic # New issue triage posts a standalone comment
294
+ schema: issue-assistant
295
+ prompt: |
296
+ You are an intelligent GitHub issue assistant for the {{ event.repository.fullName }} repository. Your role is to provide professional, knowledgeable assistance when a NEW issue is opened.
297
+
298
+ Return ONE JSON object (no prose outside JSON) that validates the `issue-assistant` schema with:
299
+ - `text`: write a clear, well-structured markdown reply that welcomes the reporter, shows understanding, and provides next steps. Use sections and bullets where helpful.
300
+ - `intent`: must be "issue_triage" for this flow.
301
+ - `labels` (optional): array of labels that would help organization for this new issue.
302
+
303
+ Use this triage rubric (adopted from our main prompt):
304
+ 1) Categorize the issue - choose from: bug, chore, documentation, enhancement, feature, question, wontfix, invalid, duplicate
305
+ 2) Assess priority (low/medium/high/urgent)
306
+ 3) Estimate complexity (trivial/simple/moderate/complex)
307
+ 4) Recommend labels from the categories above
308
+ 5) Identify potential areas affected or relevant documentation
309
+ 6) Provide an initial response with clarifying questions if needed
310
+
311
+ Response style:
312
+ - Professional and welcoming
313
+ - Actionable guidance and clear next steps
314
+ - Ask clarifying questions when information is missing
315
+ - Use markdown formatting; include code snippets where useful
316
+ - NEVER make promises about timelines, release dates, or team commitments
317
+ - NEVER say things like "we'll pick this up", "will be included in upcoming release", or "we will post updates"
318
+ - Focus on technical analysis and helpful information rather than commitments
319
+ on: [issue_opened]
320
+
321
+ # Comment Assistant (comments only) — intent detection and reply
322
+ comment-assistant:
323
+ type: ai
324
+ group: dynamic
325
+ schema: issue-assistant
304
326
  command: "visor"
305
- if: "event.name === 'issues' && event.action === 'opened' || (event.name === 'issue_comment' && event.comment && event.comment.body && event.comment.body.trim().startsWith('/visor'))"
306
327
  prompt: |
307
- You are an intelligent GitHub issue assistant for the {{ event.repository.fullName }} repository. Your role is to provide professional, knowledgeable assistance based on the trigger event.
308
-
309
- ## Event Context
310
- **Event Type**: {{ event.name }} - {{ event.action }}
311
- {% if event.issue -%}
312
- **Issue #{{ event.issue.number }}**: {{ event.issue.title }}
313
- **Author**: {{ event.issue.author }}
314
- **State**: {{ event.issue.state }}
315
- **Created**: {{ event.issue.createdAt }}
316
- {%- if event.issue.labels.size > 0 %}
317
- **Labels**: {% for label in event.issue.labels %}{{ label.name }}{% unless forloop.last %}, {% endunless %}{% endfor %}
318
- {%- endif %}
319
- {%- if event.issue.assignees.size > 0 %}
320
- **Assignees**: {% for assignee in event.issue.assignees %}{{ assignee }}{% unless forloop.last %}, {% endunless %}{% endfor %}
321
- {%- endif %}
322
- {%- endif %}
323
- {%- if event.comment %}
324
- **Comment by**: {{ event.comment.author }}
325
- {%- endif %}
326
-
327
- ## Repository Analysis Context
328
- {%- if event.isPullRequest and pr.title %}
329
- **PR Context**: {{ pr.title }}
330
- {%- endif %}
331
- {%- if event.repository %}
332
- **Repository**: {{ event.repository.fullName }}
333
- {%- endif %}
334
-
335
- ## Instructions
336
-
337
- {%- if event.name == 'issues' and event.action == 'opened' %}
338
-
339
- **ISSUE TRIAGE MODE**
340
-
341
- Analyze this new issue and provide intelligent triage:
342
-
343
- ### Issue Content
344
- {{ event.issue.body }}
345
-
346
- ### Analysis Tasks
347
- 1. **Categorize** the issue (bug/feature/documentation/question/enhancement/maintenance)
348
- 2. **Assess priority** (low/medium/high/urgent) based on:
349
- - Impact on users/system
350
- - Security implications
351
- - Blocking nature
352
- - Community interest
353
- 3. **Estimate complexity** (trivial/simple/moderate/complex)
354
- 4. **Suggest timeline** for resolution
355
- 5. **Recommend labels** that would help with organization
356
- 6. **Identify stakeholders** who should be involved or assignees
357
- 7. **Provide initial response** to the issue author
358
-
359
- ### Response Requirements
360
- - Be professional and welcoming
361
- - Show you understand the request
362
- - Provide clear next steps
363
- - Ask clarifying questions if needed
364
- - Include technical insights where appropriate
365
-
366
- {%- elsif event.name == 'issue_comment' %}
367
-
368
- **ASSISTANCE MODE**
369
-
370
- A user has asked a question or provided additional information. Provide helpful technical assistance:
371
-
372
- ### Original Issue
373
- {%- if event.issue.title %}
374
- **Title**: {{ event.issue.title }}
375
- {%- endif %}
376
- {%- if event.issue.body %}
377
- **Description**: {{ event.issue.body }}
378
- {%- endif %}
379
-
380
- ### Latest Comment
381
- {{ event.comment.body }}
382
-
383
- ### Analysis Tasks
384
- 1. **Understand the context** of their question/comment
385
- 2. **Provide technical guidance** based on project knowledge
386
- 3. **Reference relevant code/files** if applicable
387
- 4. **Suggest implementation approaches** for feature requests
388
- 5. **Provide debugging steps** for bug reports
389
- 6. **Link to documentation** or similar issues if helpful
390
- 7. **Offer code examples** when appropriate
391
-
392
- ### Response Requirements
393
- - Address their specific question directly
394
- - Provide actionable guidance
395
- - Be encouraging and supportive
396
- - Use technical language appropriate to their level
397
- - Include code examples where helpful
398
- - Reference project conventions and patterns
399
-
400
- {%- endif %}
401
-
402
- ### Special Instructions
403
- - Always be professional, helpful, and encouraging
404
- - Focus on actionable advice and clear next steps
405
- - Use markdown formatting for better readability
406
- - Include relevant code examples when helpful
407
- - Reference project context and patterns when applicable
408
- - If dealing with `/visor` commands in comments, acknowledge and provide assistance
409
- - Maintain consistency with project tone and contributor guidelines
410
-
411
- ### Response Format
412
- Provide a well-structured markdown response with clear sections and helpful guidance.
413
- on: [issue_opened, issue_comment]
414
-
415
- # Output configuration
328
+ You are the GitHub comment assistant for {{ event.repository.fullName }}. Respond to user comments on issues or PR discussion threads.
329
+
330
+ Return ONE JSON object (no prose outside JSON) that validates the `issue-assistant` schema with:
331
+ - `text`: a concise, helpful markdown reply to the latest comment.
332
+ - `intent`: choose one: "comment_reply" (normal reply) or "comment_retrigger" (pick this ONLY when the user explicitly asks to re-run checks OR explicitly asks to disable some checks).
333
+ - `labels`: omit for comments (do not include).
334
+
335
+ Rules:
336
+ - Never suggest rerun/disable unless asked explicitly.
337
+ - If asked to disable any check(s), set `intent` = "comment_retrigger" and in `text` acknowledge the request and say the checks will be re-run; DO NOT propose slash/directive comments.
338
+ - Stay technical, direct, and specific; add code snippets or links when helpful.
339
+ on: [issue_comment]
340
+ on_success:
341
+ goto_js: |
342
+ const intent = (typeof output === 'object' && output) ? output.intent : undefined;
343
+ const isComment = (event && event.name) ? (event.name == 'issue_comment') : true;
344
+ const allowed = typeof hasMinPermission === 'function' ? hasMinPermission('MEMBER') : true;
345
+ return (isComment && allowed && intent === 'comment_retrigger') ? 'overview' : null
346
+ goto_event: pr_updated
347
+
348
+ # Apply labels to new issues based on assistant output (GitHub-only)
349
+ apply-issue-labels:
350
+ type: github
351
+ tags: [github]
352
+ depends_on: [issue-assistant]
353
+ on: [issue_opened]
354
+ op: labels.add
355
+ value_js: |
356
+ try {
357
+ const labels = outputs['issue-assistant']?.labels;
358
+ if (!Array.isArray(labels)) return [];
359
+ // Sanitize labels: remove non-alphanumeric chars except :/ and collapse repeated /
360
+ return labels
361
+ .map(v => v == null ? '' : String(v))
362
+ .map(s => s.replace(/[^A-Za-z0-9:\/]/g, '').replace(/\/{2,}/g, '/'))
363
+ .filter(s => s.length > 0);
364
+ } catch (error) {
365
+ log('Error processing issue labels:', error);
366
+ return [];
367
+ }
368
+
369
+ # External origin labelling for PRs and Issues
370
+ external-label:
371
+ type: github
372
+ tags: [github]
373
+ on: [pr_opened, issue_opened]
374
+ if: "!isMember() && !isContributor()"
375
+ op: labels.add
376
+ values:
377
+ - "external"
378
+
379
+ # Retrigger noop removed — comment-assistant schedules overview directly
380
+
416
381
  output:
417
382
  pr_comment:
418
383
  format: markdown
@@ -16,7 +16,7 @@ export declare class FailureConditionEvaluator {
16
16
  /**
17
17
  * Evaluate simple fail_if condition
18
18
  */
19
- evaluateSimpleCondition(checkName: string, checkSchema: string, checkGroup: string, reviewSummary: ReviewSummary, expression: string, previousOutputs?: Record<string, ReviewSummary>): Promise<boolean>;
19
+ evaluateSimpleCondition(checkName: string, checkSchema: string, checkGroup: string, reviewSummary: ReviewSummary, expression: string, previousOutputs?: Record<string, ReviewSummary>, authorAssociation?: string): Promise<boolean>;
20
20
  /**
21
21
  * Determine if the event is related to pull requests
22
22
  */
@@ -35,11 +35,12 @@ export declare class FailureConditionEvaluator {
35
35
  event?: string;
36
36
  environment?: Record<string, string>;
37
37
  previousResults?: Map<string, ReviewSummary>;
38
+ authorAssociation?: string;
38
39
  }): Promise<boolean>;
39
40
  /**
40
41
  * Evaluate all failure conditions for a check result
41
42
  */
42
- evaluateConditions(checkName: string, checkSchema: string, checkGroup: string, reviewSummary: ReviewSummary, globalConditions?: FailureConditions, checkConditions?: FailureConditions, previousOutputs?: Record<string, ReviewSummary>): Promise<FailureConditionResult[]>;
43
+ evaluateConditions(checkName: string, checkSchema: string, checkGroup: string, reviewSummary: ReviewSummary, globalConditions?: FailureConditions, checkConditions?: FailureConditions, previousOutputs?: Record<string, ReviewSummary>, authorAssociation?: string): Promise<FailureConditionResult[]>;
43
44
  /**
44
45
  * Evaluate a set of failure conditions
45
46
  */
@@ -1 +1 @@
1
- {"version":3,"file":"","sourceRoot":"","sources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,EACnC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,GAC9C,OAAO,CAAC,sBAAsB,EAAE,CAAC;IA2CpC;;OAEG;YACW,oBAAoB;IA6BlC;;OAEG;YACW,uBAAuB;IA0BrC;;;OAGG;IACH,OAAO,CAAC,kBAAkB;IAmM1B;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAOzB;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAe9B;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAsJ9B,OAAO,CAAC,qBAAqB;IAmB7B;;OAEG;IACH,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,sBAAsB,EAAE,GAAG,OAAO;IAItE;;OAEG;IACH,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,sBAAsB,EAAE,GAAG,sBAAsB,EAAE;IAIvF;;OAEG;IACH,MAAM,CAAC,sBAAsB,CAAC,OAAO,EAAE,sBAAsB,EAAE,GAAG;QAChE,KAAK,EAAE,sBAAsB,EAAE,CAAC;QAChC,OAAO,EAAE,sBAAsB,EAAE,CAAC;QAClC,IAAI,EAAE,sBAAsB,EAAE,CAAC;KAChC;IASD;;OAEG;IACH,MAAM,CAAC,aAAa,CAAC,OAAO,EAAE,sBAAsB,EAAE,GAAG,MAAM;CAiChE"}
1
+ {"version":3,"file":"","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/failure-condition-evaluator.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAG3C,OAAO,EACL,iBAAiB,EAGjB,sBAAsB,EAEvB,MAAM,gBAAgB,CAAC;AAKxB;;GAEG;AACH,qBAAa,yBAAyB;IACpC,OAAO,CAAC,OAAO,CAAC,CAAU;;IAI1B;;OAEG;IACH,OAAO,CAAC,mBAAmB;IA6D3B;;OAEG;IACG,uBAAuB,CAC3B,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,EACnB,U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B;IAe9B;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAkK9B,OAAO,CAAC,qBAAqB;IAmB7B;;OAEG;IACH,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,sBAAsB,EAAE,GAAG,OAAO;IAItE;;OAEG;IACH,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,sBAAsB,EAAE,GAAG,sBAAsB,EAAE;IAIvF;;OAEG;IACH,MAAM,CAAC,sBAAsB,CAAC,OAAO,EAAE,sBAAsB,EAAE,GAAG;QAChE,KAAK,EAAE,sBAAsB,EAAE,CAAC;QAChC,OAAO,EAAE,sBAAsB,EAAE,CAAC;QAClC,IAAI,EAAE,sBAAsB,EAAE,CAAC;KAChC;IASD;;OAEG;IACH,MAAM,CAAC,aAAa,CAAC,OAAO,EAAE,sBAAsB,EAAE,GAAG,MAAM;CAiChE"}
@@ -32,6 +32,10 @@ export declare const configSchema: {
32
32
  readonly $ref: "#/definitions/HttpServerConfig";
33
33
  readonly description: "HTTP server configuration for receiving webhooks";
34
34
  };
35
+ readonly memory: {
36
+ readonly $ref: "#/definitions/MemoryConfig";
37
+ readonly description: "Memory storage configuration";
38
+ };
35
39
  readonly env: {
36
40
  readonly $ref: "#/definitions/EnvConfig";
37
41
  readonly description: "Global environment variables";
@@ -275,6 +279,45 @@ export declare const configSchema: {
275
279
  readonly type: "boolean";
276
280
  readonly description: "Include execution metadata in log output";
277
281
  };
282
+ readonly operation: {
283
+ readonly type: "string";
284
+ readonly enum: readonly ["get", "set", "append", "increment", "delete", "clear", "list", "exec_js"];
285
+ readonly description: "Memory operation to perform";
286
+ };
287
+ readonly key: {
288
+ readonly type: "string";
289
+ readonly description: "Key for memory operation";
290
+ };
291
+ readonly value: {
292
+ readonly description: "Value for set/append operations";
293
+ };
294
+ readonly value_js: {
295
+ readonly type: "string";
296
+ readonly description: "JavaScript expression to compute value dynamically";
297
+ };
298
+ readonly memory_js: {
299
+ readonly type: "string";
300
+ readonly description: "JavaScript code for exec_js operation with full memory access";
301
+ };
302
+ readonly namespace: {
303
+ readonly type: "string";
304
+ readonly description: "Override namespace for this check";
305
+ };
306
+ readonly op: {
307
+ readonly type: "string";
308
+ readonly description: "GitHub operation to perform (e.g., 'labels.add', 'labels.remove', 'comment.create')";
309
+ };
310
+ readonly values: {
311
+ readonly anyOf: readonly [{
312
+ readonly type: "array";
313
+ readonly items: {
314
+ readonly type: "string";
315
+ };
316
+ }, {
317
+ readonly type: "string";
318
+ }];
319
+ readonly description: "Values for GitHub operations (can be array or single value)";
320
+ };
278
321
  };
279
322
  readonly additionalProperties: false;
280
323
  readonly description: "Configuration for a single check";
@@ -284,7 +327,7 @@ export declare const configSchema: {
284
327
  };
285
328
  readonly ConfigCheckType: {
286
329
  readonly type: "string";
287
- readonly enum: readonly ["ai", "command", "http", "http_input", "http_client", "noop", "log", "claude-code"];
330
+ readonly enum: readonly ["ai", "command", "http", "http_input", "http_client", "noop", "log", "memory", "github", "claude-code"];
288
331
  readonly description: "Valid check types in configuration";
289
332
  };
290
333
  readonly 'Record<string,string>': {
@@ -518,6 +561,10 @@ export declare const configSchema: {
518
561
  readonly type: "string";
519
562
  readonly description: "Jump back to an ancestor step (by id)";
520
563
  };
564
+ readonly goto_event: {
565
+ readonly $ref: "#/definitions/EventTrigger";
566
+ readonly description: "Simulate a different event when performing goto (e.g., 'pr_updated')";
567
+ };
521
568
  readonly goto_js: {
522
569
  readonly type: "string";
523
570
  readonly description: "Dynamic goto: JS expression returning step id or null";
@@ -584,6 +631,10 @@ export declare const configSchema: {
584
631
  readonly type: "string";
585
632
  readonly description: "Optional jump back to ancestor step (by id)";
586
633
  };
634
+ readonly goto_event: {
635
+ readonly $ref: "#/definitions/EventTrigger";
636
+ readonly description: "Simulate a different event when performing goto (e.g., 'pr_updated')";
637
+ };
587
638
  readonly goto_js: {
588
639
  readonly type: "string";
589
640
  readonly description: "Dynamic goto: JS expression returning step id or null";
@@ -660,7 +711,7 @@ export declare const configSchema: {
660
711
  };
661
712
  readonly GroupByOption: {
662
713
  readonly type: "string";
663
- readonly enum: readonly ["check", "file", "severity"];
714
+ readonly enum: readonly ["check", "file", "severity", "group"];
664
715
  readonly description: "Valid grouping options";
665
716
  };
666
717
  readonly DebugConfig: {
@@ -856,6 +907,42 @@ export declare const configSchema: {
856
907
  readonly '^x-': {};
857
908
  };
858
909
  };
910
+ readonly MemoryConfig: {
911
+ readonly type: "object";
912
+ readonly properties: {
913
+ readonly storage: {
914
+ readonly type: "string";
915
+ readonly enum: readonly ["memory", "file"];
916
+ readonly description: "Storage mode: \"memory\" (in-memory, default) or \"file\" (persistent)";
917
+ };
918
+ readonly format: {
919
+ readonly type: "string";
920
+ readonly enum: readonly ["json", "csv"];
921
+ readonly description: "Storage format (only for file storage, default: json)";
922
+ };
923
+ readonly file: {
924
+ readonly type: "string";
925
+ readonly description: "File path (required if storage: file)";
926
+ };
927
+ readonly namespace: {
928
+ readonly type: "string";
929
+ readonly description: "Default namespace (default: \"default\")";
930
+ };
931
+ readonly auto_load: {
932
+ readonly type: "boolean";
933
+ readonly description: "Auto-load on startup (default: true if storage: file)";
934
+ };
935
+ readonly auto_save: {
936
+ readonly type: "boolean";
937
+ readonly description: "Auto-save after operations (default: true if storage: file)";
938
+ };
939
+ };
940
+ readonly additionalProperties: false;
941
+ readonly description: "Memory storage configuration";
942
+ readonly patternProperties: {
943
+ readonly '^x-': {};
944
+ };
945
+ };
859
946
  readonly TagFilter: {
860
947
  readonly type: "object";
861
948
  readonly properties: {
@@ -1 +1 @@
1
- {"version":3,"file":"config-schema.d.ts","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/generated/config-schema.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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