@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.
- package/README.md +68 -2
- package/action.yml +1 -1
- package/defaults/.visor.yaml +133 -168
- package/dist/13.index.js +82 -0
- package/dist/159.index.js +38 -0
- package/dist/168.index.js +82 -0
- package/dist/201.index.js +82 -0
- package/dist/262.index.js +48 -0
- package/dist/272.index.js +82 -0
- package/dist/273.index.js +48 -0
- package/dist/320.index.js +38 -0
- package/dist/34.index.js +81 -0
- package/dist/421.index.js +48 -0
- package/dist/437.index.js +82 -0
- package/dist/441.index.js +81 -0
- package/dist/450.index.js +82 -0
- package/dist/54.index.js +81 -0
- package/dist/544.index.js +38 -0
- package/dist/558.index.js +82 -0
- package/dist/715.index.js +38 -0
- package/dist/737.index.js +82 -0
- package/dist/834.index.js +48 -0
- package/dist/85.index.js +82 -0
- package/dist/861.index.js +48 -0
- package/dist/878.index.js +81 -0
- package/dist/940.index.js +38 -0
- package/dist/989.index.js +81 -0
- package/dist/996.index.js +82 -0
- package/dist/ai-review-service.d.ts +11 -1
- package/dist/ai-review-service.d.ts.map +1 -1
- package/dist/check-execution-engine.d.ts +15 -2
- package/dist/check-execution-engine.d.ts.map +1 -1
- package/dist/cli-main.d.ts.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/defaults/.visor.yaml +133 -168
- package/dist/failure-condition-evaluator.d.ts +3 -2
- package/dist/failure-condition-evaluator.d.ts.map +1 -1
- package/dist/generated/config-schema.d.ts +89 -2
- package/dist/generated/config-schema.d.ts.map +1 -1
- package/dist/generated/config-schema.json +109 -1
- package/dist/git-repository-analyzer.d.ts +17 -1
- package/dist/git-repository-analyzer.d.ts.map +1 -1
- package/dist/github-comments.d.ts.map +1 -1
- package/dist/github-reactions.d.ts +36 -0
- package/dist/github-reactions.d.ts.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +173112 -46133
- package/dist/liquid-extensions.d.ts +15 -0
- package/dist/liquid-extensions.d.ts.map +1 -1
- package/dist/memory-store.d.ts +129 -0
- package/dist/memory-store.d.ts.map +1 -0
- package/dist/output/issue-assistant/schema.json +42 -0
- package/dist/output/issue-assistant/template.liquid +1 -0
- package/dist/output/overview/schema.json +33 -0
- package/dist/output/overview/template.liquid +16 -0
- package/dist/output-formatters.d.ts +1 -0
- package/dist/output-formatters.d.ts.map +1 -1
- package/dist/pr-analyzer.d.ts +2 -0
- package/dist/pr-analyzer.d.ts.map +1 -1
- package/dist/proto/channelz.proto +564 -0
- package/dist/providers/check-provider-registry.d.ts.map +1 -1
- package/dist/providers/command-check-provider.d.ts.map +1 -1
- package/dist/providers/github-ops-provider.d.ts +18 -0
- package/dist/providers/github-ops-provider.d.ts.map +1 -0
- package/dist/providers/memory-check-provider.d.ts +56 -0
- package/dist/providers/memory-check-provider.d.ts.map +1 -0
- package/dist/reviewer.d.ts +2 -0
- package/dist/reviewer.d.ts.map +1 -1
- package/dist/sdk/check-execution-engine-RORGGGGP.mjs +11 -0
- package/dist/sdk/chunk-I3GQJIR7.mjs +752 -0
- package/dist/sdk/chunk-I3GQJIR7.mjs.map +1 -0
- package/dist/sdk/chunk-KVHVCGY6.mjs +103 -0
- package/dist/sdk/chunk-KVHVCGY6.mjs.map +1 -0
- package/dist/sdk/chunk-TWJKAYT6.mjs +1124 -0
- package/dist/sdk/chunk-TWJKAYT6.mjs.map +1 -0
- package/dist/sdk/{chunk-N2PPFOSF.mjs → chunk-Z47UECAT.mjs} +2593 -264
- package/dist/sdk/chunk-Z47UECAT.mjs.map +1 -0
- package/dist/sdk/liquid-extensions-GMEGEGC3.mjs +18 -0
- package/dist/sdk/mermaid-telemetry-LZGDD35I.mjs +61 -0
- package/dist/sdk/mermaid-telemetry-LZGDD35I.mjs.map +1 -0
- package/dist/sdk/sdk.d.mts +48 -2
- package/dist/sdk/sdk.d.ts +48 -2
- package/dist/sdk/sdk.js +5372 -781
- package/dist/sdk/sdk.js.map +1 -1
- package/dist/sdk/sdk.mjs +112 -7
- package/dist/sdk/sdk.mjs.map +1 -1
- package/dist/sdk/tracer-init-O7RLXMJ3.mjs +10 -0
- package/dist/sdk/tracer-init-O7RLXMJ3.mjs.map +1 -0
- package/dist/session-registry.d.ts +19 -5
- package/dist/session-registry.d.ts.map +1 -1
- package/dist/telemetry/fallback-ndjson.d.ts +7 -0
- package/dist/telemetry/fallback-ndjson.d.ts.map +1 -0
- package/dist/telemetry/file-span-exporter.d.ts +17 -0
- package/dist/telemetry/file-span-exporter.d.ts.map +1 -0
- package/dist/telemetry/metrics.d.ts +13 -0
- package/dist/telemetry/metrics.d.ts.map +1 -0
- package/dist/telemetry/opentelemetry.d.ts +26 -0
- package/dist/telemetry/opentelemetry.d.ts.map +1 -0
- package/dist/telemetry/trace-helpers.d.ts +9 -0
- package/dist/telemetry/trace-helpers.d.ts.map +1 -0
- package/dist/telemetry/trace-report-exporter.d.ts +17 -0
- package/dist/telemetry/trace-report-exporter.d.ts.map +1 -0
- package/dist/traces/run-2025-10-15T11-54-04-087Z.ndjson +33 -0
- package/dist/traces/run-2025-10-15T11-54-14-046Z.ndjson +33 -0
- package/dist/traces/run-2025-10-15T11-54-14-575Z.ndjson +33 -0
- package/dist/traces/run-2025-10-15T11-54-15-082Z.ndjson +33 -0
- package/dist/traces/run-2025-10-15T11-54-15-561Z.ndjson +12 -0
- package/dist/types/cli.d.ts +4 -0
- package/dist/types/cli.d.ts.map +1 -1
- package/dist/types/config.d.ts +56 -2
- package/dist/types/config.d.ts.map +1 -1
- package/dist/utils/author-permissions.d.ts +74 -0
- package/dist/utils/author-permissions.d.ts.map +1 -0
- package/dist/utils/head-sha.d.ts +8 -0
- package/dist/utils/head-sha.d.ts.map +1 -0
- package/dist/utils/mermaid-telemetry.d.ts +3 -0
- package/dist/utils/mermaid-telemetry.d.ts.map +1 -0
- package/dist/utils/tracer-init.d.ts +12 -0
- package/dist/utils/tracer-init.d.ts.map +1 -0
- package/dist/utils/ui-helpers.d.ts +3 -0
- package/dist/utils/ui-helpers.d.ts.map +1 -0
- package/package.json +2 -2
- package/dist/sdk/check-execution-engine-Z2USLMN5.mjs +0 -9
- package/dist/sdk/chunk-FIL2OGF6.mjs +0 -68
- package/dist/sdk/chunk-FIL2OGF6.mjs.map +0 -1
- package/dist/sdk/chunk-N2PPFOSF.mjs.map +0 -1
- package/dist/sdk/liquid-extensions-KDECAJTV.mjs +0 -12
- /package/dist/sdk/{check-execution-engine-Z2USLMN5.mjs.map → check-execution-engine-RORGGGGP.mjs.map} +0 -0
- /package/dist/sdk/{liquid-extensions-KDECAJTV.mjs.map → liquid-extensions-GMEGEGC3.mjs.map} +0 -0
package/README.md
CHANGED
|
@@ -88,12 +88,26 @@ Tip: Pin releases for stability, e.g. `uses: probelabs/visor@v1`.
|
|
|
88
88
|
Short cheatsheet for common tasks:
|
|
89
89
|
|
|
90
90
|
```bash
|
|
91
|
+
# Validate configuration before running checks
|
|
92
|
+
visor validate # Search for .visor.yaml in current directory
|
|
93
|
+
visor validate --config .visor.yaml # Validate specific config file
|
|
94
|
+
|
|
91
95
|
# Run all checks with a table output
|
|
92
96
|
visor --check all --output table
|
|
93
97
|
|
|
94
98
|
# Filter by tags (e.g., fast/local) and increase parallelism
|
|
95
99
|
visor --tags fast,local --max-parallelism 5
|
|
96
100
|
|
|
101
|
+
# Analyze full PR diff vs base branch (like GitHub Actions does)
|
|
102
|
+
# Auto-enabled for code-review schemas, or force with --analyze-branch-diff
|
|
103
|
+
visor --analyze-branch-diff # Analyzes diff vs main/master branch
|
|
104
|
+
visor --check security --analyze-branch-diff # Specific checks on branch diff
|
|
105
|
+
|
|
106
|
+
# Simulate GitHub events for event-based check filtering
|
|
107
|
+
visor --event pr_updated # Run checks triggered by PR updates (auto for code-review)
|
|
108
|
+
visor --event issue_opened # Run checks triggered by new issues
|
|
109
|
+
visor --event all # Run all checks regardless of event filters (default)
|
|
110
|
+
|
|
97
111
|
# Emit machine‑readable results and save to a file
|
|
98
112
|
visor --check security --output json --output-file visor-results.json
|
|
99
113
|
|
|
@@ -116,7 +130,7 @@ Additional guides:
|
|
|
116
130
|
- Schema – JSON shape checks return (e.g., `code-review`).
|
|
117
131
|
- Template – renders results (tables/markdown).
|
|
118
132
|
- Group – which comment a check is posted into.
|
|
119
|
-
- Provider – how a check runs (`ai`, `http`, `command`, `claude-code`).
|
|
133
|
+
- Provider – how a check runs (`ai`, `http`, `http_client`, `command`, `log`, `github`, `claude-code`).
|
|
120
134
|
- Dependencies – `depends_on` controls order; independents run in parallel.
|
|
121
135
|
- Tags – label checks (`fast`, `local`, `comprehensive`) and filter with `--tags`.
|
|
122
136
|
- Events – PRs, issues, `/review` comments, webhooks, or cron schedules.
|
|
@@ -153,6 +167,7 @@ Visor is a general SDLC automation framework:
|
|
|
153
167
|
- [Step Dependencies & Intelligent Execution](#-step-dependencies--intelligent-execution)
|
|
154
168
|
- [Failure Routing (Auto-fix Loops)](#-failure-routing-auto-fix-loops)
|
|
155
169
|
- [Claude Code Provider](#-claude-code-provider)
|
|
170
|
+
- [GitHub Provider](#-github-provider)
|
|
156
171
|
- [AI Session Reuse](#-ai-session-reuse)
|
|
157
172
|
- [Schema-Template System](#-schema-template-system)
|
|
158
173
|
- [Enhanced Prompts](#-enhanced-prompts)
|
|
@@ -174,9 +189,10 @@ Visor is a general SDLC automation framework:
|
|
|
174
189
|
- Structured outputs: JSON Schema validation drives deterministic rendering, annotations, and SARIF.
|
|
175
190
|
- Orchestrated pipelines: Dependencies, parallelism, and tag‑based profiles; run in Actions or any CI.
|
|
176
191
|
- Multi‑provider AI: Google Gemini, Anthropic Claude, OpenAI, AWS Bedrock — plus MCP tools and Claude Code SDK.
|
|
192
|
+
- Author permissions: Built-in functions to customize workflows based on contributor trust level (owner, member, collaborator, etc).
|
|
177
193
|
- Assistants & commands: `/review` to rerun checks, `/visor …` for Q&A, predictable comment groups.
|
|
178
194
|
- HTTP & schedules: Receive webhooks, call external APIs, and run cron‑scheduled audits and reports.
|
|
179
|
-
- Extensible providers: `ai`, `http`, `http_client`, `log`, `command`, `claude-code` — or add your own.
|
|
195
|
+
- Extensible providers: `ai`, `http`, `http_client`, `log`, `command`, `github`, `claude-code` — or add your own.
|
|
180
196
|
- Security by default: GitHub App support, scoped tokens, remote‑extends allowlist, opt‑in network usage.
|
|
181
197
|
- Observability & control: JSON/SARIF outputs, fail‑fast and timeouts, parallelism and cost control.
|
|
182
198
|
|
|
@@ -232,6 +248,37 @@ Examples:
|
|
|
232
248
|
|
|
233
249
|
Learn more: [docs/commands.md](docs/commands.md)
|
|
234
250
|
|
|
251
|
+
## 🔐 Author Permissions
|
|
252
|
+
|
|
253
|
+
Customize workflows based on PR author's permission level using built-in functions in JavaScript expressions:
|
|
254
|
+
|
|
255
|
+
```yaml
|
|
256
|
+
checks:
|
|
257
|
+
# Run security scan only for external contributors
|
|
258
|
+
security-scan:
|
|
259
|
+
type: command
|
|
260
|
+
exec: npm run security:full
|
|
261
|
+
if: "!hasMinPermission('MEMBER')"
|
|
262
|
+
|
|
263
|
+
# Auto-approve PRs from collaborators
|
|
264
|
+
auto-approve:
|
|
265
|
+
type: command
|
|
266
|
+
exec: gh pr review --approve
|
|
267
|
+
if: "hasMinPermission('COLLABORATOR') && totalIssues === 0"
|
|
268
|
+
|
|
269
|
+
# Block sensitive file changes from non-members
|
|
270
|
+
protect-secrets:
|
|
271
|
+
type: command
|
|
272
|
+
exec: echo "Checking permissions..."
|
|
273
|
+
fail_if: "!isMember() && files.some(f => f.filename.startsWith('secrets/'))"
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
**Available functions:**
|
|
277
|
+
- `hasMinPermission(level)` - Check if author has >= permission level
|
|
278
|
+
- `isOwner()`, `isMember()`, `isCollaborator()`, `isContributor()`, `isFirstTimer()` - Boolean checks
|
|
279
|
+
|
|
280
|
+
Learn more: [docs/author-permissions.md](docs/author-permissions.md)
|
|
281
|
+
|
|
235
282
|
## 🔇 Suppressing Warnings
|
|
236
283
|
|
|
237
284
|
Suppress a specific issue by adding a nearby `visor-disable` comment.
|
|
@@ -624,3 +671,22 @@ MIT License — see [LICENSE](LICENSE)
|
|
|
624
671
|
<div align="center">
|
|
625
672
|
Made with ❤️ by <a href="https://probelabs.com">Probe Labs</a>
|
|
626
673
|
</div>
|
|
674
|
+
## 🧰 GitHub Provider
|
|
675
|
+
|
|
676
|
+
Use the native GitHub provider for safe labels and comments without invoking the `gh` CLI.
|
|
677
|
+
|
|
678
|
+
Example — apply overview‑derived labels to a PR:
|
|
679
|
+
|
|
680
|
+
```yaml
|
|
681
|
+
checks:
|
|
682
|
+
apply-overview-labels:
|
|
683
|
+
type: github
|
|
684
|
+
op: labels.add
|
|
685
|
+
values:
|
|
686
|
+
- "{{ outputs.overview.tags.label | default: '' | safe_label }}"
|
|
687
|
+
- "{{ outputs.overview.tags['review-effort'] | default: '' | prepend: 'review/effort:' | safe_label }}"
|
|
688
|
+
value_js: |
|
|
689
|
+
return values.filter(v => typeof v === 'string' && v.trim().length > 0);
|
|
690
|
+
```
|
|
691
|
+
|
|
692
|
+
See docs: docs/github-ops.md
|
package/action.yml
CHANGED
package/defaults/.visor.yaml
CHANGED
|
@@ -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
|
|
11
|
-
max_parallelism:
|
|
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
|
-
|
|
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
|
-
|
|
71
|
+
Next ensure you cover all below:
|
|
83
72
|
|
|
84
73
|
## Architecture & Impact Assessment
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
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
|
|
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
|
|
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: [
|
|
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
|
|
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
|
|
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: [
|
|
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
|
|
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
|
|
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: [
|
|
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
|
-
#
|
|
292
|
-
|
|
293
|
-
type:
|
|
294
|
-
|
|
295
|
-
depends_on: [overview
|
|
296
|
-
on: [
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
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 #
|
|
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
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
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
|
package/dist/13.index.js
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
exports.id = 13;
|
|
3
|
+
exports.ids = [13];
|
|
4
|
+
exports.modules = {
|
|
5
|
+
|
|
6
|
+
/***/ 31223:
|
|
7
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
/*
|
|
11
|
+
* Copyright The OpenTelemetry Authors
|
|
12
|
+
*
|
|
13
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
14
|
+
* you may not use this file except in compliance with the License.
|
|
15
|
+
* You may obtain a copy of the License at
|
|
16
|
+
*
|
|
17
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
18
|
+
*
|
|
19
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
20
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
21
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
22
|
+
* See the License for the specific language governing permissions and
|
|
23
|
+
* limitations under the License.
|
|
24
|
+
*/
|
|
25
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
26
|
+
exports.execAsync = void 0;
|
|
27
|
+
const child_process = __webpack_require__(35317);
|
|
28
|
+
const util = __webpack_require__(39023);
|
|
29
|
+
exports.execAsync = util.promisify(child_process.exec);
|
|
30
|
+
//# sourceMappingURL=execAsync.js.map
|
|
31
|
+
|
|
32
|
+
/***/ }),
|
|
33
|
+
|
|
34
|
+
/***/ 80013:
|
|
35
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
/*
|
|
39
|
+
* Copyright The OpenTelemetry Authors
|
|
40
|
+
*
|
|
41
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
42
|
+
* you may not use this file except in compliance with the License.
|
|
43
|
+
* You may obtain a copy of the License at
|
|
44
|
+
*
|
|
45
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
46
|
+
*
|
|
47
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
48
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
49
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
50
|
+
* See the License for the specific language governing permissions and
|
|
51
|
+
* limitations under the License.
|
|
52
|
+
*/
|
|
53
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
54
|
+
exports.getMachineId = void 0;
|
|
55
|
+
const process = __webpack_require__(932);
|
|
56
|
+
const execAsync_1 = __webpack_require__(31223);
|
|
57
|
+
const api_1 = __webpack_require__(63914);
|
|
58
|
+
async function getMachineId() {
|
|
59
|
+
const args = 'QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid';
|
|
60
|
+
let command = '%windir%\\System32\\REG.exe';
|
|
61
|
+
if (process.arch === 'ia32' && 'PROCESSOR_ARCHITEW6432' in process.env) {
|
|
62
|
+
command = '%windir%\\sysnative\\cmd.exe /c ' + command;
|
|
63
|
+
}
|
|
64
|
+
try {
|
|
65
|
+
const result = await (0, execAsync_1.execAsync)(`${command} ${args}`);
|
|
66
|
+
const parts = result.stdout.split('REG_SZ');
|
|
67
|
+
if (parts.length === 2) {
|
|
68
|
+
return parts[1].trim();
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
catch (e) {
|
|
72
|
+
api_1.diag.debug(`error reading machine id: ${e}`);
|
|
73
|
+
}
|
|
74
|
+
return undefined;
|
|
75
|
+
}
|
|
76
|
+
exports.getMachineId = getMachineId;
|
|
77
|
+
//# sourceMappingURL=getMachineId-win.js.map
|
|
78
|
+
|
|
79
|
+
/***/ })
|
|
80
|
+
|
|
81
|
+
};
|
|
82
|
+
;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
exports.id = 159;
|
|
3
|
+
exports.ids = [159];
|
|
4
|
+
exports.modules = {
|
|
5
|
+
|
|
6
|
+
/***/ 31159:
|
|
7
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
/*
|
|
11
|
+
* Copyright The OpenTelemetry Authors
|
|
12
|
+
*
|
|
13
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
14
|
+
* you may not use this file except in compliance with the License.
|
|
15
|
+
* You may obtain a copy of the License at
|
|
16
|
+
*
|
|
17
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
18
|
+
*
|
|
19
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
20
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
21
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
22
|
+
* See the License for the specific language governing permissions and
|
|
23
|
+
* limitations under the License.
|
|
24
|
+
*/
|
|
25
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
26
|
+
exports.getMachineId = void 0;
|
|
27
|
+
const api_1 = __webpack_require__(63914);
|
|
28
|
+
async function getMachineId() {
|
|
29
|
+
api_1.diag.debug('could not read machine-id: unsupported platform');
|
|
30
|
+
return undefined;
|
|
31
|
+
}
|
|
32
|
+
exports.getMachineId = getMachineId;
|
|
33
|
+
//# sourceMappingURL=getMachineId-unsupported.js.map
|
|
34
|
+
|
|
35
|
+
/***/ })
|
|
36
|
+
|
|
37
|
+
};
|
|
38
|
+
;
|