@probelabs/visor 0.1.124 → 0.1.126
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/dist/config.d.ts.map +1 -1
- package/dist/docs/DEPLOYMENT.md +117 -11
- package/dist/docs/GITHUB_CHECKS.md +18 -4
- package/dist/docs/NPM_USAGE.md +112 -39
- package/dist/docs/action-reference.md +63 -9
- package/dist/docs/advanced-ai.md +58 -51
- package/dist/docs/ai-configuration.md +99 -11
- package/dist/docs/ai-custom-tools-usage.md +70 -33
- package/dist/docs/ai-custom-tools.md +50 -27
- package/dist/docs/architecture.md +1232 -0
- package/dist/docs/bot-transports-rfc.md +13 -3
- package/dist/docs/ci-cli-mode.md +116 -8
- package/dist/docs/claude-code.md +111 -41
- package/dist/docs/command-provider.md +37 -15
- package/dist/docs/commands.md +252 -6
- package/dist/docs/configuration.md +138 -4
- package/dist/docs/contributing.md +737 -0
- package/dist/docs/custom-tools.md +39 -8
- package/dist/docs/dashboards/README.md +33 -19
- package/dist/docs/debug-visualizer-progress.md +14 -13
- package/dist/docs/debug-visualizer-rfc.md +14 -13
- package/dist/docs/debug-visualizer.md +30 -5
- package/dist/docs/debugging.md +73 -8
- package/dist/docs/default-output-schema.md +24 -20
- package/dist/docs/dependencies.md +75 -21
- package/dist/docs/dev-playbook.md +85 -9
- package/dist/docs/engine-pause-resume-rfc.md +11 -11
- package/dist/docs/engine-state-machine-plan.md +10 -3
- package/dist/docs/event-driven-github-integration-rfc.md +20 -11
- package/dist/docs/event-triggers.md +95 -6
- package/dist/docs/execution-statistics-rfc.md +16 -4
- package/dist/docs/fact-validator-gap-analysis.md +12 -1
- package/dist/docs/fact-validator-implementation-plan.md +19 -11
- package/dist/docs/fail-if.md +116 -11
- package/dist/docs/failure-conditions-implementation.md +40 -6
- package/dist/docs/failure-conditions-schema.md +243 -87
- package/dist/docs/failure-routing-rfc.md +43 -18
- package/dist/docs/failure-routing.md +80 -23
- package/dist/docs/faq.md +836 -0
- package/dist/docs/foreach-dependency-propagation.md +32 -15
- package/dist/docs/github-ops.md +6 -5
- package/dist/docs/glossary.md +322 -0
- package/dist/docs/goto-forward-run-plan.md +23 -10
- package/dist/docs/guides/criticality-modes.md +15 -13
- package/dist/docs/guides/fault-management-and-contracts.md +8 -5
- package/dist/docs/guides/workflow-style-guide.md +17 -8
- package/dist/docs/http.md +102 -3
- package/dist/docs/human-input-provider.md +20 -36
- package/dist/docs/index.md +206 -0
- package/dist/docs/lifecycle-hooks.md +322 -2
- package/dist/docs/limits.md +20 -5
- package/dist/docs/liquid-templates.md +86 -14
- package/dist/docs/loop-routing-refactor.md +4 -2
- package/dist/docs/mcp-provider.md +53 -19
- package/dist/docs/mcp.md +27 -1
- package/dist/docs/memory.md +7 -2
- package/dist/docs/migration.md +596 -0
- package/dist/docs/observability.md +227 -6
- package/dist/docs/output-formats.md +388 -9
- package/dist/docs/output-history.md +36 -6
- package/dist/docs/performance.md +510 -4
- package/dist/docs/pluggable.md +95 -4
- package/dist/docs/proposals/snapshot-scope-execution.md +6 -5
- package/dist/docs/providers/git-checkout.md +16 -14
- package/dist/docs/providers/noop.md +696 -0
- package/dist/docs/recipes.md +8 -9
- package/dist/docs/rfc/git-checkout-step.md +3 -1
- package/dist/docs/rfc/on_init-hook.md +18 -5
- package/dist/docs/rfc/workspace-isolation.md +16 -0
- package/dist/docs/roadmap/criticality-implementation-tasks.md +27 -27
- package/dist/docs/router-patterns.md +155 -43
- package/dist/docs/schema-templates.md +51 -15
- package/dist/docs/script.md +162 -13
- package/dist/docs/sdk.md +46 -12
- package/dist/docs/security.md +464 -5
- package/dist/docs/slack-integration.md +481 -0
- package/dist/docs/tag-filtering.md +60 -20
- package/dist/docs/telemetry-setup.md +157 -46
- package/dist/docs/test-framework-rfc.md +37 -36
- package/dist/docs/testing/assertions.md +92 -4
- package/dist/docs/testing/ci.md +56 -7
- package/dist/docs/testing/cli.md +57 -15
- package/dist/docs/testing/cookbook.md +53 -20
- package/dist/docs/testing/dsl-reference.md +110 -9
- package/dist/docs/testing/fixtures-and-mocks.md +28 -3
- package/dist/docs/testing/flows.md +59 -4
- package/dist/docs/testing/getting-started.md +14 -13
- package/dist/docs/testing/troubleshooting.md +39 -2
- package/dist/docs/timeouts.md +174 -18
- package/dist/docs/troubleshooting.md +176 -6
- package/dist/docs/workflow-creation-guide.md +101 -3
- package/dist/docs/workflows.md +138 -41
- package/dist/examples/README.md +169 -4
- package/dist/examples/ai-custom-tools-simple.yaml +2 -3
- package/dist/examples/cron-webhook-config.yaml +15 -0
- package/dist/examples/forEach-example.yaml +6 -0
- package/dist/examples/git-checkout-basic.yaml +4 -0
- package/dist/examples/git-checkout-compare.yaml +6 -0
- package/dist/examples/git-checkout-cross-repo.yaml +7 -0
- package/dist/examples/http-integration-config.yaml +30 -0
- package/dist/examples/https-server-config.yaml +15 -0
- package/dist/examples/mcp-provider-example.yaml +10 -10
- package/dist/examples/transform-example.yaml +3 -0
- package/dist/examples/webhook-pipeline-config.yaml +18 -0
- package/dist/examples/workflows/workflow-composition-example.yaml +4 -0
- package/dist/frontends/slack-frontend.d.ts +2 -0
- package/dist/frontends/slack-frontend.d.ts.map +1 -1
- package/dist/generated/config-schema.d.ts +11 -7
- package/dist/generated/config-schema.d.ts.map +1 -1
- package/dist/generated/config-schema.json +11 -7
- package/dist/index.js +3127 -974
- package/dist/output/traces/{run-2026-01-28T16-15-24-569Z.ndjson → run-2026-01-31T16-37-22-321Z.ndjson} +84 -84
- package/dist/output/traces/{run-2026-01-28T16-16-09-757Z.ndjson → run-2026-01-31T16-38-06-031Z.ndjson} +1013 -1013
- package/dist/providers/ai-check-provider.d.ts +9 -2
- package/dist/providers/ai-check-provider.d.ts.map +1 -1
- package/dist/providers/command-check-provider.d.ts.map +1 -1
- package/dist/providers/mcp-custom-sse-server.d.ts +17 -1
- package/dist/providers/mcp-custom-sse-server.d.ts.map +1 -1
- package/dist/providers/workflow-check-provider.d.ts.map +1 -1
- package/dist/providers/workflow-tool-executor.d.ts +68 -0
- package/dist/providers/workflow-tool-executor.d.ts.map +1 -0
- package/dist/sdk/{check-provider-registry-AQ3JETBG.mjs → check-provider-registry-3KI5RKXT.mjs} +6 -5
- package/dist/sdk/check-provider-registry-IYILYY35.mjs +28 -0
- package/dist/sdk/chunk-2CPMMNIX.mjs +1459 -0
- package/dist/sdk/chunk-2CPMMNIX.mjs.map +1 -0
- package/dist/sdk/chunk-5LI6T4O3.mjs +3600 -0
- package/dist/sdk/chunk-5LI6T4O3.mjs.map +1 -0
- package/dist/sdk/{chunk-YLQ4UN62.mjs → chunk-A4PGHURG.mjs} +6838 -6257
- package/dist/sdk/chunk-A4PGHURG.mjs.map +1 -0
- package/dist/sdk/chunk-EXFGO4FX.mjs +147 -0
- package/dist/sdk/chunk-EXFGO4FX.mjs.map +1 -0
- package/dist/sdk/chunk-PJ7K5UFC.mjs +17732 -0
- package/dist/sdk/chunk-PJ7K5UFC.mjs.map +1 -0
- package/dist/sdk/{chunk-BHZ4CKUS.mjs → chunk-PXFIALUH.mjs} +77 -8
- package/dist/sdk/chunk-PXFIALUH.mjs.map +1 -0
- package/dist/sdk/{chunk-PVITVJ6J.mjs → chunk-RTKJXNZS.mjs} +32 -9
- package/dist/sdk/chunk-RTKJXNZS.mjs.map +1 -0
- package/dist/sdk/chunk-VW2GBXQT.mjs +606 -0
- package/dist/sdk/chunk-VW2GBXQT.mjs.map +1 -0
- package/dist/sdk/{config-RQQPMLRD.mjs → config-5AUYQFHE.mjs} +2 -2
- package/dist/sdk/config-6CUVEH7H.mjs +16 -0
- package/dist/sdk/config-6CUVEH7H.mjs.map +1 -0
- package/dist/sdk/{github-frontend-6Q4BISZX.mjs → github-frontend-BZ4N3BFZ.mjs} +7 -3
- package/dist/sdk/github-frontend-BZ4N3BFZ.mjs.map +1 -0
- package/dist/sdk/host-4MT3EW2I.mjs +52 -0
- package/dist/sdk/{host-P5NQICP7.mjs → host-NYWXLIFC.mjs} +2 -2
- package/dist/sdk/host-NYWXLIFC.mjs.map +1 -0
- package/dist/sdk/{routing-DEY2AIXM.mjs → routing-6R42GXUO.mjs} +2 -2
- package/dist/sdk/routing-6R42GXUO.mjs.map +1 -0
- package/dist/sdk/routing-7FXPULTO.mjs +24 -0
- package/dist/sdk/routing-7FXPULTO.mjs.map +1 -0
- package/dist/sdk/sdk.d.mts +3 -1
- package/dist/sdk/sdk.d.ts +3 -1
- package/dist/sdk/sdk.js +12163 -11204
- package/dist/sdk/sdk.js.map +1 -1
- package/dist/sdk/sdk.mjs +14 -10
- package/dist/sdk/sdk.mjs.map +1 -1
- package/dist/sdk/slack-frontend-JUT3TYVC.mjs +821 -0
- package/dist/sdk/slack-frontend-JUT3TYVC.mjs.map +1 -0
- package/dist/sdk/workflow-check-provider-H3CUOLUD.mjs +28 -0
- package/dist/sdk/workflow-check-provider-H3CUOLUD.mjs.map +1 -0
- package/dist/sdk/workflow-check-provider-YUNNF4KC.mjs +28 -0
- package/dist/sdk/workflow-check-provider-YUNNF4KC.mjs.map +1 -0
- package/dist/sdk/workflow-registry-KFWSDSLM.mjs +12 -0
- package/dist/sdk/workflow-registry-KFWSDSLM.mjs.map +1 -0
- package/dist/slack/socket-runner.d.ts +2 -0
- package/dist/slack/socket-runner.d.ts.map +1 -1
- package/dist/state-machine/context/workflow-inputs.d.ts +20 -0
- package/dist/state-machine/context/workflow-inputs.d.ts.map +1 -0
- package/dist/state-machine/dispatch/execution-invoker.d.ts.map +1 -1
- package/dist/state-machine/dispatch/foreach-processor.d.ts.map +1 -1
- package/dist/state-machine/dispatch/stats-manager.d.ts.map +1 -1
- package/dist/state-machine/states/level-dispatch.d.ts.map +1 -1
- package/dist/state-machine/states/routing.d.ts +2 -1
- package/dist/state-machine/states/routing.d.ts.map +1 -1
- package/dist/traces/{run-2026-01-28T16-15-24-569Z.ndjson → run-2026-01-31T16-37-22-321Z.ndjson} +84 -84
- package/dist/traces/{run-2026-01-28T16-16-09-757Z.ndjson → run-2026-01-31T16-38-06-031Z.ndjson} +1013 -1013
- package/dist/types/config.d.ts +3 -1
- package/dist/types/config.d.ts.map +1 -1
- package/dist/utils/human-id.d.ts +12 -0
- package/dist/utils/human-id.d.ts.map +1 -0
- package/dist/utils/worktree-manager.d.ts +3 -0
- package/dist/utils/worktree-manager.d.ts.map +1 -1
- package/dist/workflow-executor.d.ts.map +1 -1
- package/dist/workflow-registry.d.ts +1 -0
- package/dist/workflow-registry.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/sdk/chunk-BHZ4CKUS.mjs.map +0 -1
- package/dist/sdk/chunk-PVITVJ6J.mjs.map +0 -1
- package/dist/sdk/chunk-YLQ4UN62.mjs.map +0 -1
- package/dist/sdk/github-frontend-6Q4BISZX.mjs.map +0 -1
- /package/dist/sdk/{check-provider-registry-AQ3JETBG.mjs.map → check-provider-registry-3KI5RKXT.mjs.map} +0 -0
- /package/dist/sdk/{config-RQQPMLRD.mjs.map → check-provider-registry-IYILYY35.mjs.map} +0 -0
- /package/dist/sdk/{routing-DEY2AIXM.mjs.map → config-5AUYQFHE.mjs.map} +0 -0
- /package/dist/sdk/{host-P5NQICP7.mjs.map → host-4MT3EW2I.mjs.map} +0 -0
package/dist/docs/script.md
CHANGED
|
@@ -1,18 +1,69 @@
|
|
|
1
|
-
## Script
|
|
1
|
+
## Script Step (`type: script`)
|
|
2
2
|
|
|
3
|
-
The `script` provider executes JavaScript in a secure sandbox with access to
|
|
4
|
-
PR context, dependency outputs, and the Visor memory store.
|
|
3
|
+
The `script` provider executes JavaScript in a secure sandbox with access to PR context, dependency outputs, workflow inputs, environment variables, and the Visor memory store.
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
- The sandbox exposes these objects:
|
|
8
|
-
- `pr`: basic PR metadata and file list.
|
|
9
|
-
- `outputs`: map of dependency outputs (plus `outputs.history`).
|
|
10
|
-
- `outputs_raw`: aggregated values from `-raw` dependencies.
|
|
11
|
-
- `outputs_history_stage`: per-stage output history slice for tests.
|
|
12
|
-
- `memory`: synchronous helpers `get`, `set`, `append`, `increment`, `delete`, `clear`.
|
|
13
|
-
- The value you `return` becomes this step’s `output` (for `depends_on`).
|
|
5
|
+
## Configuration
|
|
14
6
|
|
|
15
|
-
|
|
7
|
+
| Property | Required | Description |
|
|
8
|
+
|----------|----------|-------------|
|
|
9
|
+
| `type` | Yes | Must be `script` |
|
|
10
|
+
| `content` | Yes | JavaScript code to execute (max 1MB) |
|
|
11
|
+
| `depends_on` | No | Array of step IDs this step depends on |
|
|
12
|
+
| `group` | No | Group name for organizing steps |
|
|
13
|
+
| `on` | No | Event triggers for this step |
|
|
14
|
+
| `if` | No | Condition to evaluate before running |
|
|
15
|
+
| `fail_if` | No | Condition to fail the step |
|
|
16
|
+
| `on_fail` | No | Routing configuration on failure |
|
|
17
|
+
| `on_success` | No | Routing configuration on success |
|
|
18
|
+
|
|
19
|
+
## Sandbox Context
|
|
20
|
+
|
|
21
|
+
The secure sandbox exposes these objects and functions:
|
|
22
|
+
|
|
23
|
+
### Data Objects
|
|
24
|
+
|
|
25
|
+
| Object | Description |
|
|
26
|
+
|--------|-------------|
|
|
27
|
+
| `pr` | PR metadata: `number`, `title`, `body`, `author`, `base`, `head`, `totalAdditions`, `totalDeletions`, `files[]` |
|
|
28
|
+
| `outputs` | Map of dependency outputs (current values). Access via `outputs['step-name']` |
|
|
29
|
+
| `outputs.history` | Map of all historical outputs per step (arrays). See [Output History](./output-history.md) |
|
|
30
|
+
| `outputs_history` | Alias for `outputs.history` (top-level access) |
|
|
31
|
+
| `outputs_raw` | Aggregated values from `-raw` suffix dependencies |
|
|
32
|
+
| `outputs_history_stage` | Per-stage output history slice (used by test framework) |
|
|
33
|
+
| `inputs` | Workflow inputs (when running inside a workflow) |
|
|
34
|
+
| `args` | Arguments passed via `with:` directive in `on_init` |
|
|
35
|
+
| `env` | Environment variables (`process.env`) |
|
|
36
|
+
|
|
37
|
+
### Memory Operations
|
|
38
|
+
|
|
39
|
+
| Method | Description |
|
|
40
|
+
|--------|-------------|
|
|
41
|
+
| `memory.get(key, namespace?)` | Retrieve a value |
|
|
42
|
+
| `memory.has(key, namespace?)` | Check if key exists |
|
|
43
|
+
| `memory.list(namespace?)` | List all keys in namespace |
|
|
44
|
+
| `memory.getAll(namespace?)` | Get all key-value pairs |
|
|
45
|
+
| `memory.set(key, value, namespace?)` | Set a value |
|
|
46
|
+
| `memory.append(key, value, namespace?)` | Append to an array |
|
|
47
|
+
| `memory.increment(key, amount?, namespace?)` | Increment numeric value (default: 1) |
|
|
48
|
+
| `memory.delete(key, namespace?)` | Delete a key |
|
|
49
|
+
| `memory.clear(namespace?)` | Clear all keys in namespace |
|
|
50
|
+
|
|
51
|
+
### Utility Functions
|
|
52
|
+
|
|
53
|
+
| Function | Description |
|
|
54
|
+
|----------|-------------|
|
|
55
|
+
| `log(...args)` | Debug logging (outputs with prefix for identification) |
|
|
56
|
+
| `escapeXml(str)` | Escape string for XML output |
|
|
57
|
+
| `btoa(str)` | Base64 encode a string |
|
|
58
|
+
| `atob(str)` | Base64 decode a string |
|
|
59
|
+
|
|
60
|
+
## Return Value
|
|
61
|
+
|
|
62
|
+
The value you `return` from the script becomes the step's `output`, accessible to dependent steps via `outputs['step-name']`.
|
|
63
|
+
|
|
64
|
+
## Examples
|
|
65
|
+
|
|
66
|
+
### Basic Example
|
|
16
67
|
|
|
17
68
|
```yaml
|
|
18
69
|
steps:
|
|
@@ -31,4 +82,102 @@ steps:
|
|
|
31
82
|
return { total: memory.get('total_facts', 'fact-validation'), allValid };
|
|
32
83
|
```
|
|
33
84
|
|
|
34
|
-
|
|
85
|
+
### Using PR Context
|
|
86
|
+
|
|
87
|
+
```yaml
|
|
88
|
+
steps:
|
|
89
|
+
analyze-pr:
|
|
90
|
+
type: script
|
|
91
|
+
content: |
|
|
92
|
+
const largeFiles = pr.files.filter(f => f.additions > 100);
|
|
93
|
+
const totalChanges = pr.totalAdditions + pr.totalDeletions;
|
|
94
|
+
|
|
95
|
+
return {
|
|
96
|
+
largeFileCount: largeFiles.length,
|
|
97
|
+
totalChanges,
|
|
98
|
+
isLargePR: totalChanges > 500,
|
|
99
|
+
author: pr.author
|
|
100
|
+
};
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Using Output History
|
|
104
|
+
|
|
105
|
+
```yaml
|
|
106
|
+
steps:
|
|
107
|
+
track-retries:
|
|
108
|
+
type: script
|
|
109
|
+
depends_on: [some-check]
|
|
110
|
+
content: |
|
|
111
|
+
// Access all previous outputs from a check
|
|
112
|
+
const history = outputs.history['some-check'] || [];
|
|
113
|
+
const retryCount = history.length;
|
|
114
|
+
|
|
115
|
+
log('Retry count:', retryCount);
|
|
116
|
+
log('Previous outputs:', history);
|
|
117
|
+
|
|
118
|
+
return {
|
|
119
|
+
retryCount,
|
|
120
|
+
lastOutput: history[history.length - 1]
|
|
121
|
+
};
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Using Workflow Inputs
|
|
125
|
+
|
|
126
|
+
```yaml
|
|
127
|
+
# In a workflow file
|
|
128
|
+
inputs:
|
|
129
|
+
- name: threshold
|
|
130
|
+
default: 10
|
|
131
|
+
|
|
132
|
+
steps:
|
|
133
|
+
check-threshold:
|
|
134
|
+
type: script
|
|
135
|
+
content: |
|
|
136
|
+
const threshold = inputs.threshold || 10;
|
|
137
|
+
const count = outputs['counter'].value;
|
|
138
|
+
|
|
139
|
+
return {
|
|
140
|
+
passed: count < threshold,
|
|
141
|
+
message: count < threshold
|
|
142
|
+
? 'Within threshold'
|
|
143
|
+
: `Exceeded threshold of ${threshold}`
|
|
144
|
+
};
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Complex Data Processing
|
|
148
|
+
|
|
149
|
+
```yaml
|
|
150
|
+
steps:
|
|
151
|
+
process-results:
|
|
152
|
+
type: script
|
|
153
|
+
depends_on: [run-tests]
|
|
154
|
+
content: |
|
|
155
|
+
const results = outputs['run-tests'];
|
|
156
|
+
|
|
157
|
+
// Calculate statistics
|
|
158
|
+
const stats = {
|
|
159
|
+
total: results.tests?.length || 0,
|
|
160
|
+
passed: results.tests?.filter(t => t.passed).length || 0,
|
|
161
|
+
failed: results.tests?.filter(t => !t.passed).length || 0
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
stats.passRate = stats.total > 0
|
|
165
|
+
? ((stats.passed / stats.total) * 100).toFixed(2)
|
|
166
|
+
: 0;
|
|
167
|
+
|
|
168
|
+
// Store in memory for other steps
|
|
169
|
+
memory.set('test_stats', stats);
|
|
170
|
+
|
|
171
|
+
// Debug logging
|
|
172
|
+
log('Test stats:', stats);
|
|
173
|
+
|
|
174
|
+
return stats;
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## Related Documentation
|
|
178
|
+
|
|
179
|
+
- [Memory Provider](./memory.md) - Persistent key-value storage
|
|
180
|
+
- [Output History](./output-history.md) - Tracking outputs across iterations
|
|
181
|
+
- [Dependencies](./dependencies.md) - Step dependency system
|
|
182
|
+
- [Liquid Templates](./liquid-templates.md) - Template syntax for other providers
|
|
183
|
+
- [Debugging](./debugging.md) - Debugging techniques including the `log()` function
|
package/dist/docs/sdk.md
CHANGED
|
@@ -119,6 +119,8 @@ try {
|
|
|
119
119
|
|
|
120
120
|
## API
|
|
121
121
|
|
|
122
|
+
### Functions
|
|
123
|
+
|
|
122
124
|
- `loadConfig(configOrPath?: string | Partial<VisorConfig>, options?: { strict?: boolean }): Promise<VisorConfig>`
|
|
123
125
|
- Loads and validates a config from an object, file path, or discovers defaults
|
|
124
126
|
- Accepts config objects (validates and applies defaults) or file paths
|
|
@@ -126,26 +128,58 @@ try {
|
|
|
126
128
|
- Set `options.strict` to treat warnings as errors
|
|
127
129
|
- `resolveChecks(checkIds: string[], config: VisorConfig | undefined): string[]`
|
|
128
130
|
- Expands check IDs to include dependencies in the correct order.
|
|
131
|
+
- Detects and throws on circular dependencies.
|
|
129
132
|
- `runChecks(options: RunOptions): Promise<AnalysisResult>`
|
|
130
133
|
- Runs checks programmatically. Thin wrapper around the engine's `executeChecks`.
|
|
131
134
|
|
|
132
135
|
### Types
|
|
133
136
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
- `cwd?: string`
|
|
138
|
-
- `
|
|
139
|
-
- `
|
|
140
|
-
- `
|
|
141
|
-
- `
|
|
142
|
-
|
|
143
|
-
|
|
137
|
+
All types below are exported from `@probelabs/visor/sdk`.
|
|
138
|
+
|
|
139
|
+
- `VisorOptions` (base options used by `RunOptions`)
|
|
140
|
+
- `cwd?: string` - Working directory for execution
|
|
141
|
+
- `debug?: boolean` - Enable debug mode
|
|
142
|
+
- `maxParallelism?: number` - Maximum parallel checks
|
|
143
|
+
- `failFast?: boolean` - Stop on first failure
|
|
144
|
+
- `tagFilter?: TagFilter` - Filter checks by tags
|
|
145
|
+
|
|
146
|
+
- `RunOptions` (extends `VisorOptions`)
|
|
147
|
+
- `config?: VisorConfig` - Config object (mutually exclusive with `configPath`)
|
|
148
|
+
- `configPath?: string` - Path to config file (mutually exclusive with `config`)
|
|
149
|
+
- `checks?: string[]` - Check IDs to run (default: all checks from config)
|
|
150
|
+
- `timeoutMs?: number` - Execution timeout in milliseconds
|
|
151
|
+
- `output?: { format?: 'table'|'json'|'markdown'|'sarif' }` - Output format
|
|
144
152
|
- `strictValidation?: boolean` - Treat config warnings (unknown keys) as errors (default: false)
|
|
153
|
+
- `executionContext?: ExecutionContext` - Execution context for providers (hooks, CLI state, etc.)
|
|
145
154
|
|
|
146
155
|
- `AnalysisResult`
|
|
147
|
-
- `reviewSummary
|
|
148
|
-
- `executionTime: number
|
|
156
|
+
- `reviewSummary: ReviewSummary` - Contains `issues: Issue[]` and scoring
|
|
157
|
+
- `executionTime: number` - Total execution time in ms
|
|
158
|
+
- `timestamp: string` - ISO timestamp
|
|
159
|
+
- `checksExecuted: string[]` - List of executed check IDs
|
|
160
|
+
- `repositoryInfo: GitRepositoryInfo` - Repository metadata
|
|
161
|
+
- `executionStatistics?: ExecutionStatistics` - Detailed per-check statistics (optional)
|
|
162
|
+
- `debug?: DebugInfo` - Debug information when debug mode enabled (optional)
|
|
163
|
+
- `failureConditions?: FailureConditionResult[]` - Failure condition results (optional)
|
|
164
|
+
|
|
165
|
+
- `ExecutionContext` - Context passed to check providers
|
|
166
|
+
- `cliMessage?: string` - CLI message value (from `--message` argument)
|
|
167
|
+
- `hooks?: VisorHooks` - SDK hooks for human input and check completion
|
|
168
|
+
- `workflowInputs?: Record<string, unknown>` - Inputs when executing within a workflow
|
|
169
|
+
- `args?: Record<string, unknown>` - Custom arguments from `on_init` directives
|
|
170
|
+
|
|
171
|
+
- `HumanInputRequest` - Request object for human input hooks
|
|
172
|
+
- `checkId: string` - Check ID requesting input
|
|
173
|
+
- `prompt: string` - Prompt to display
|
|
174
|
+
- `placeholder?: string` - Placeholder text
|
|
175
|
+
- `allowEmpty: boolean` - Whether empty input is allowed
|
|
176
|
+
- `multiline: boolean` - Whether multiline input is supported
|
|
177
|
+
- `timeout?: number` - Timeout in milliseconds
|
|
178
|
+
- `default?: string` - Default value
|
|
179
|
+
|
|
180
|
+
- `TagFilter` - Tag filtering configuration
|
|
181
|
+
- `include?: string[]` - Tags to include (ANY match)
|
|
182
|
+
- `exclude?: string[]` - Tags to exclude (ANY match)
|
|
149
183
|
|
|
150
184
|
Refer to `src/types/config.ts` for `VisorConfig`, `Issue`, and related types.
|
|
151
185
|
|