@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/workflows.md
CHANGED
|
@@ -229,6 +229,19 @@ steps:
|
|
|
229
229
|
on: [pr_opened, pr_updated]
|
|
230
230
|
```
|
|
231
231
|
|
|
232
|
+
### Using Config Path
|
|
233
|
+
|
|
234
|
+
Alternatively, reference a config file directly instead of a pre-registered workflow:
|
|
235
|
+
|
|
236
|
+
```yaml
|
|
237
|
+
steps:
|
|
238
|
+
external_workflow:
|
|
239
|
+
type: workflow
|
|
240
|
+
config: ./other-workflow.yaml # Path to workflow config file
|
|
241
|
+
args:
|
|
242
|
+
param1: value1
|
|
243
|
+
```
|
|
244
|
+
|
|
232
245
|
### With Output Mapping
|
|
233
246
|
|
|
234
247
|
Map workflow outputs to check outputs:
|
|
@@ -264,6 +277,18 @@ steps:
|
|
|
264
277
|
ai_model: claude-3-opus-20240229
|
|
265
278
|
```
|
|
266
279
|
|
|
280
|
+
### Workflow Step Configuration Reference
|
|
281
|
+
|
|
282
|
+
| Property | Type | Description |
|
|
283
|
+
|----------|------|-------------|
|
|
284
|
+
| `workflow` | string | Workflow ID from imported workflow (required if not using `config`) |
|
|
285
|
+
| `config` | string | Path to workflow config file (alternative to `workflow`) |
|
|
286
|
+
| `args` | object | Input parameter values to pass to the workflow |
|
|
287
|
+
| `overrides` | object | Override specific step configurations within the workflow |
|
|
288
|
+
| `output_mapping` | object | Map workflow output names to check output names |
|
|
289
|
+
| `timeout` | number | Maximum execution time in milliseconds |
|
|
290
|
+
| `env` | object | Environment variables to set for workflow execution |
|
|
291
|
+
|
|
267
292
|
## Advanced Features
|
|
268
293
|
|
|
269
294
|
### Conditional Steps
|
|
@@ -300,32 +325,45 @@ steps:
|
|
|
300
325
|
|
|
301
326
|
### Workflow Composition
|
|
302
327
|
|
|
303
|
-
Workflows can use other workflows:
|
|
328
|
+
Workflows can use other workflows. Create a parent workflow file that imports and uses child workflows:
|
|
304
329
|
|
|
305
330
|
```yaml
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
331
|
+
# comprehensive-check.yaml
|
|
332
|
+
id: comprehensive-check
|
|
333
|
+
name: Comprehensive Check
|
|
334
|
+
version: "1.0"
|
|
335
|
+
|
|
336
|
+
inputs:
|
|
337
|
+
- name: security_level
|
|
338
|
+
schema:
|
|
339
|
+
type: string
|
|
340
|
+
default: medium
|
|
341
|
+
- name: language
|
|
342
|
+
schema:
|
|
343
|
+
type: string
|
|
344
|
+
required: true
|
|
345
|
+
|
|
346
|
+
steps:
|
|
347
|
+
security:
|
|
348
|
+
type: workflow
|
|
349
|
+
workflow: security-scan
|
|
350
|
+
args:
|
|
351
|
+
severity_threshold: "{{ inputs.security_level }}"
|
|
352
|
+
|
|
353
|
+
quality:
|
|
354
|
+
type: workflow
|
|
355
|
+
workflow: code-quality
|
|
356
|
+
args:
|
|
357
|
+
language: "{{ inputs.language }}"
|
|
358
|
+
|
|
359
|
+
aggregate:
|
|
360
|
+
type: script
|
|
361
|
+
content: |
|
|
362
|
+
return {
|
|
363
|
+
passed: outputs['security'].passed && outputs['quality'].passed,
|
|
364
|
+
score: (outputs['security'].score + outputs['quality'].score) / 2
|
|
365
|
+
};
|
|
366
|
+
depends_on: [security, quality]
|
|
329
367
|
```
|
|
330
368
|
|
|
331
369
|
## Examples
|
|
@@ -470,7 +508,38 @@ examples:
|
|
|
470
508
|
|
|
471
509
|
### 6. Test Your Workflows
|
|
472
510
|
|
|
473
|
-
|
|
511
|
+
You can include inline tests in workflow files that are automatically stripped when the workflow is imported:
|
|
512
|
+
|
|
513
|
+
```yaml
|
|
514
|
+
# my-workflow.yaml
|
|
515
|
+
id: my-workflow
|
|
516
|
+
name: My Workflow
|
|
517
|
+
version: "1.0"
|
|
518
|
+
|
|
519
|
+
inputs:
|
|
520
|
+
- name: test_param
|
|
521
|
+
schema:
|
|
522
|
+
type: string
|
|
523
|
+
|
|
524
|
+
steps:
|
|
525
|
+
process:
|
|
526
|
+
type: script
|
|
527
|
+
content: |
|
|
528
|
+
return { result: inputs.test_param, score: 85 };
|
|
529
|
+
|
|
530
|
+
# Inline tests - NOT imported when used as component
|
|
531
|
+
tests:
|
|
532
|
+
basic-test:
|
|
533
|
+
type: script
|
|
534
|
+
content: |
|
|
535
|
+
const output = outputs['process'];
|
|
536
|
+
if (output.result !== "test_value") throw new Error("Result mismatch");
|
|
537
|
+
if (output.score < 0 || output.score > 100) throw new Error("Score out of range");
|
|
538
|
+
return { passed: true };
|
|
539
|
+
depends_on: [process]
|
|
540
|
+
```
|
|
541
|
+
|
|
542
|
+
Alternatively, create a separate test config:
|
|
474
543
|
|
|
475
544
|
```yaml
|
|
476
545
|
# test-workflow.yaml
|
|
@@ -478,15 +547,16 @@ steps:
|
|
|
478
547
|
test_workflow:
|
|
479
548
|
type: workflow
|
|
480
549
|
workflow: my-workflow
|
|
481
|
-
|
|
550
|
+
args:
|
|
482
551
|
test_param: "test_value"
|
|
483
552
|
|
|
484
553
|
validate_output:
|
|
485
554
|
type: script
|
|
486
555
|
content: |
|
|
487
|
-
const output = outputs
|
|
488
|
-
|
|
489
|
-
|
|
556
|
+
const output = outputs['test_workflow'];
|
|
557
|
+
if (output.result === undefined) throw new Error("Result is required");
|
|
558
|
+
if (output.score < 0 || output.score > 100) throw new Error("Score out of range");
|
|
559
|
+
return { valid: true };
|
|
490
560
|
depends_on: [test_workflow]
|
|
491
561
|
```
|
|
492
562
|
|
|
@@ -496,22 +566,22 @@ Complete workflow schema:
|
|
|
496
566
|
|
|
497
567
|
```typescript
|
|
498
568
|
interface WorkflowDefinition {
|
|
499
|
-
id: string; // Unique identifier
|
|
500
|
-
name: string;
|
|
501
|
-
description?: string;
|
|
569
|
+
id: string; // Unique identifier (required)
|
|
570
|
+
name: string; // Display name (required)
|
|
571
|
+
description?: string; // Description
|
|
502
572
|
version?: string; // Semantic version
|
|
503
573
|
tags?: string[]; // Categorization tags
|
|
504
574
|
category?: string; // Category (security, quality, etc.)
|
|
505
575
|
|
|
506
576
|
inputs?: WorkflowInputParam[]; // Input parameters
|
|
507
577
|
outputs?: WorkflowOutputParam[]; // Output parameters
|
|
508
|
-
steps: Record<string, WorkflowStep>; // Workflow steps
|
|
578
|
+
steps: Record<string, WorkflowStep>; // Workflow steps (required)
|
|
509
579
|
|
|
510
|
-
on?: EventTrigger[];
|
|
580
|
+
on?: EventTrigger[]; // Events that can trigger this workflow
|
|
511
581
|
defaults?: Partial<CheckConfig>; // Default config for steps
|
|
512
|
-
|
|
582
|
+
tests?: Record<string, CheckConfig>; // Inline tests (NOT imported when used as component)
|
|
513
583
|
|
|
514
|
-
author?: {
|
|
584
|
+
author?: { // Author information
|
|
515
585
|
name?: string;
|
|
516
586
|
email?: string;
|
|
517
587
|
url?: string;
|
|
@@ -522,6 +592,8 @@ interface WorkflowDefinition {
|
|
|
522
592
|
}
|
|
523
593
|
```
|
|
524
594
|
|
|
595
|
+
**Note:** The `tests` field allows you to include inline test cases in a workflow file. When the workflow is imported via `imports`, the tests are stripped out and NOT executed. Tests only run when the workflow file is executed directly or via `visor test`.
|
|
596
|
+
|
|
525
597
|
## Integration with CI/CD
|
|
526
598
|
|
|
527
599
|
Workflows integrate seamlessly with GitHub Actions:
|
|
@@ -540,19 +612,36 @@ jobs:
|
|
|
540
612
|
uses: your-org/visor-action@v1
|
|
541
613
|
with:
|
|
542
614
|
config: .visor.yaml
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
615
|
+
```
|
|
616
|
+
|
|
617
|
+
In your `.visor.yaml`, use the `imports` field to include workflow files:
|
|
618
|
+
|
|
619
|
+
```yaml
|
|
620
|
+
# .visor.yaml
|
|
621
|
+
version: "1.0"
|
|
622
|
+
|
|
623
|
+
# Import workflow definitions
|
|
624
|
+
imports:
|
|
625
|
+
- ./workflows/*.yaml
|
|
626
|
+
- https://workflows.example.com/shared/security.yaml
|
|
627
|
+
|
|
628
|
+
steps:
|
|
629
|
+
run-security:
|
|
630
|
+
type: workflow
|
|
631
|
+
workflow: security-scan
|
|
632
|
+
args:
|
|
633
|
+
level: high
|
|
546
634
|
```
|
|
547
635
|
|
|
548
636
|
## Troubleshooting
|
|
549
637
|
|
|
550
638
|
### Common Issues
|
|
551
639
|
|
|
552
|
-
1. **Workflow not found**: Ensure the workflow is
|
|
640
|
+
1. **Workflow not found**: Ensure the workflow is imported via the `imports` field in your config, or use the `config` property to reference the file path directly
|
|
553
641
|
2. **Input validation failed**: Check that inputs match the defined schema
|
|
554
642
|
3. **Circular dependencies**: Ensure workflow steps don't have circular `depends_on`
|
|
555
643
|
4. **Output computation error**: Verify JavaScript expressions and Liquid templates are valid
|
|
644
|
+
5. **Tests running unexpectedly**: When importing workflows, `tests` blocks are automatically stripped; if tests are running, check if you're executing the workflow file directly
|
|
556
645
|
|
|
557
646
|
### Debug Mode
|
|
558
647
|
|
|
@@ -566,4 +655,12 @@ This will show:
|
|
|
566
655
|
- Workflow registration details
|
|
567
656
|
- Input validation results
|
|
568
657
|
- Step execution order
|
|
569
|
-
- Output computation values
|
|
658
|
+
- Output computation values
|
|
659
|
+
|
|
660
|
+
## See Also
|
|
661
|
+
|
|
662
|
+
- [Workflow Creation Guide](workflow-creation-guide.md) - Comprehensive guide with all check types and patterns
|
|
663
|
+
- [Configuration](configuration.md) - Main configuration reference
|
|
664
|
+
- [Event Triggers](event-triggers.md) - Configuring when workflows run
|
|
665
|
+
- [Liquid Templates](liquid-templates.md) - Template syntax for dynamic values
|
|
666
|
+
- [Debugging](debugging.md) - Debugging techniques for workflows
|
package/dist/examples/README.md
CHANGED
|
@@ -63,10 +63,83 @@ Example configurations demonstrating various Visor features and use cases.
|
|
|
63
63
|
### Basic Examples
|
|
64
64
|
- **`quick-start-tags.yaml`** - Simple configuration showing basic tag usage
|
|
65
65
|
- **`visor-with-tags.yaml`** - Comprehensive configuration with all tag features
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
66
|
+
- **`enhanced-config.yaml`** - Enhanced configuration with advanced features
|
|
67
|
+
|
|
68
|
+
### Routing Examples
|
|
69
|
+
- **`routing-basic.yaml`** - Failure routing with retry + goto ancestor
|
|
70
|
+
- **`routing-on-success.yaml`** - on_success post-steps + single jump-back
|
|
71
|
+
- **`routing-foreach.yaml`** - forEach remediation with run + retry
|
|
72
|
+
- **`routing-dynamic-js.yaml`** - Dynamic routing via goto_js/run_js
|
|
73
|
+
- **`routing-goto-event.yaml`** - Goto routing with event handling
|
|
74
|
+
|
|
75
|
+
### Control Flow Examples
|
|
76
|
+
- **`if-conditions.yaml`** - Conditional execution with if statements
|
|
77
|
+
- **`for-loop-example.yaml`** - Loop iteration patterns
|
|
78
|
+
- **`forEach-example.yaml`** - ForEach iteration over collections
|
|
79
|
+
- **`transform-example.yaml`** - Data transformation between steps
|
|
80
|
+
|
|
81
|
+
### AI Provider Examples
|
|
82
|
+
- **`ai-custom-tools-example.yaml`** - AI with custom shell-based tools via ephemeral MCP servers
|
|
83
|
+
- **`ai-custom-tools-simple.yaml`** - Simplified AI custom tools example
|
|
84
|
+
- **`ai-retry-fallback-config.yaml`** - AI with retry and fallback providers
|
|
85
|
+
- **`ai-with-bash.yaml`** - AI check combined with bash command execution
|
|
86
|
+
- **`ai-with-mcp.yaml`** - AI check with MCP tool integration
|
|
87
|
+
- **`bedrock-config.yaml`** - AWS Bedrock AI provider configuration
|
|
88
|
+
- **`claude-code-config.yaml`** - Claude Code SDK integration with MCP tools
|
|
89
|
+
- **`fact-validator.yaml`** - AI-based fact validation workflow
|
|
90
|
+
|
|
91
|
+
### MCP & Tools Examples
|
|
92
|
+
- **`mcp-provider-example.yaml`** - MCP provider with stdio/SSE/HTTP transports
|
|
93
|
+
- **`custom-tools-example.yaml`** - Custom tool definitions
|
|
94
|
+
- **`tools-library.yaml`** - Reusable tool library (git, docker, npm, testing, code quality tools)
|
|
95
|
+
- **`reusable-tools.yaml`** - Patterns for reusable tool definitions
|
|
96
|
+
- **`project-with-tools.yaml`** - Project configuration with integrated tools
|
|
97
|
+
|
|
98
|
+
### Memory & State Examples
|
|
99
|
+
- **`memory-counter.yaml`** - Basic memory counter implementation
|
|
100
|
+
- **`memory-error-collection.yaml`** - Collecting errors in memory across steps
|
|
101
|
+
- **`memory-exec-js.yaml`** - JavaScript execution within memory provider
|
|
102
|
+
- **`memory-namespace-isolation.yaml`** - Memory namespace isolation between workflows
|
|
103
|
+
- **`memory-retry-counter.yaml`** - Retry logic with memory-based counter tracking
|
|
104
|
+
- **`memory-state-machine.yaml`** - State machine implementation using memory
|
|
105
|
+
|
|
106
|
+
### Human Input Examples
|
|
107
|
+
- **`human-input-example.yaml`** - Interactive human-in-the-loop patterns
|
|
108
|
+
- **`basic-human-input.yaml`** - Basic human input workflow
|
|
109
|
+
- **`calculator-config.yaml`** - Interactive calculator with memory and validation
|
|
110
|
+
|
|
111
|
+
### HTTP & Webhooks Examples
|
|
112
|
+
- **`http-integration-config.yaml`** - HTTP API integration patterns
|
|
113
|
+
- **`https-server-config.yaml`** - HTTPS server configuration
|
|
114
|
+
- **`webhook-pipeline-config.yaml`** - Multi-pipeline webhook system (GitHub, JIRA integration)
|
|
115
|
+
- **`cron-webhook-config.yaml`** - Scheduled cron triggers with webhooks
|
|
116
|
+
|
|
117
|
+
### Git Operations Examples
|
|
118
|
+
- **`git-checkout-basic.yaml`** - Basic git checkout operations
|
|
119
|
+
- **`git-checkout-compare.yaml`** - Git checkout with comparison workflows
|
|
120
|
+
- **`git-checkout-cross-repo.yaml`** - Cross-repository git operations
|
|
121
|
+
|
|
122
|
+
### Failure Handling Examples
|
|
123
|
+
- **`fail-if-simple.yaml`** - Simple fail_if conditions
|
|
124
|
+
- **`failure-conditions-basic.yaml`** - Basic failure condition patterns
|
|
125
|
+
- **`failure-conditions-advanced.yaml`** - Advanced failure handling with complex conditions
|
|
126
|
+
- **`failure-conditions-github-style.yaml`** - GitHub-style failure conditions
|
|
127
|
+
- **`failure-conditions-migration.yaml`** - Migration patterns for failure conditions
|
|
128
|
+
|
|
129
|
+
### Integration Examples
|
|
130
|
+
- **`jira-simple-example.yaml`** - Simple JIRA integration
|
|
131
|
+
- **`jira-single-issue-workflow.yaml`** - Single JIRA issue workflow
|
|
132
|
+
- **`jira-workflow-mcp.yaml`** - JIRA workflow with MCP tools
|
|
133
|
+
- **`slack-simple-chat.yaml`** - Slack bot simple chat integration
|
|
134
|
+
|
|
135
|
+
### Session & Import Examples
|
|
136
|
+
- **`session-reuse-config.yaml`** - Session reuse configuration
|
|
137
|
+
- **`session-reuse-self.yaml`** - Self-referencing session reuse patterns
|
|
138
|
+
- **`on-init-import-demo.yaml`** - On-init hooks with imports
|
|
139
|
+
- **`reusable-workflows.yaml`** - Reusable workflow patterns
|
|
140
|
+
|
|
141
|
+
### Output Examples
|
|
142
|
+
- **`outputs-raw-basic.yaml`** - Raw output formatting
|
|
70
143
|
|
|
71
144
|
### GitHub Actions Workflows
|
|
72
145
|
- **`github-workflow-with-tags.yml`** - Progressive code review workflow using tags
|
|
@@ -77,6 +150,12 @@ Example configurations demonstrating various Visor features and use cases.
|
|
|
77
150
|
- **`environments/visor.staging.yaml`** - Staging environment (balanced checks)
|
|
78
151
|
- **`environments/visor.prod.yaml`** - Production environment (comprehensive validation)
|
|
79
152
|
|
|
153
|
+
### Reusable Workflows (`workflows/` directory)
|
|
154
|
+
- **`workflows/calculator-workflow.yaml`** - Reusable calculator workflow with inputs/outputs
|
|
155
|
+
- **`workflows/code-quality.yaml`** - Code quality workflow (linting, complexity, formatting)
|
|
156
|
+
- **`workflows/quick-pr-check.yaml`** - Quick PR validation workflow
|
|
157
|
+
- **`workflows/workflow-composition-example.yaml`** - Workflow composition and state isolation demo
|
|
158
|
+
|
|
80
159
|
## 🚀 Quick Start
|
|
81
160
|
|
|
82
161
|
### 1. Basic Tag Usage
|
|
@@ -269,6 +348,92 @@ steps:
|
|
|
269
348
|
- Use environment-specific configs with `extends` for DRY principles
|
|
270
349
|
- Test tag filters with `--debug` to see which checks run
|
|
271
350
|
|
|
351
|
+
## 🔌 Integration Examples
|
|
352
|
+
|
|
353
|
+
### Slack Integration
|
|
354
|
+
|
|
355
|
+
```bash
|
|
356
|
+
# Run Slack bot (requires SLACK_BOT_TOKEN, SLACK_APP_TOKEN env vars)
|
|
357
|
+
visor --config examples/slack-simple-chat.yaml
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
### JIRA Integration
|
|
361
|
+
|
|
362
|
+
```bash
|
|
363
|
+
# Simple JIRA workflow
|
|
364
|
+
visor --config examples/jira-simple-example.yaml
|
|
365
|
+
|
|
366
|
+
# JIRA with MCP tools
|
|
367
|
+
visor --config examples/jira-workflow-mcp.yaml
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
### Webhook Pipelines
|
|
371
|
+
|
|
372
|
+
```bash
|
|
373
|
+
# Multi-pipeline webhook server
|
|
374
|
+
visor --config examples/webhook-pipeline-config.yaml
|
|
375
|
+
|
|
376
|
+
# Cron-triggered webhooks
|
|
377
|
+
visor --config examples/cron-webhook-config.yaml
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
## 🧠 Memory & State Examples
|
|
381
|
+
|
|
382
|
+
```bash
|
|
383
|
+
# Basic memory counter
|
|
384
|
+
visor --config examples/memory-counter.yaml
|
|
385
|
+
|
|
386
|
+
# State machine with memory
|
|
387
|
+
visor --config examples/memory-state-machine.yaml
|
|
388
|
+
|
|
389
|
+
# Retry logic with counter
|
|
390
|
+
visor --config examples/memory-retry-counter.yaml
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
## 🤖 AI Provider Examples
|
|
394
|
+
|
|
395
|
+
```bash
|
|
396
|
+
# AI with custom tools (ephemeral MCP servers)
|
|
397
|
+
visor --config examples/ai-custom-tools-example.yaml
|
|
398
|
+
|
|
399
|
+
# AI with bash execution
|
|
400
|
+
visor --config examples/ai-with-bash.yaml
|
|
401
|
+
|
|
402
|
+
# AWS Bedrock provider
|
|
403
|
+
visor --config examples/bedrock-config.yaml --provider bedrock
|
|
404
|
+
|
|
405
|
+
# Claude Code SDK integration
|
|
406
|
+
visor --config examples/claude-code-config.yaml
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
## 🔧 MCP & Tools Examples
|
|
410
|
+
|
|
411
|
+
```bash
|
|
412
|
+
# MCP provider with different transports
|
|
413
|
+
visor --config examples/mcp-provider-example.yaml
|
|
414
|
+
|
|
415
|
+
# Custom tools
|
|
416
|
+
visor --config examples/custom-tools-example.yaml
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
## 🔄 Reusable Workflows
|
|
420
|
+
|
|
421
|
+
Import and compose workflows:
|
|
422
|
+
|
|
423
|
+
```bash
|
|
424
|
+
# Use the calculator workflow
|
|
425
|
+
visor --config examples/workflows/calculator-workflow.yaml --input "num1=10" --input "num2=5" --input "operation=add"
|
|
426
|
+
|
|
427
|
+
# Code quality workflow
|
|
428
|
+
visor --config examples/workflows/code-quality.yaml --input "language=typescript"
|
|
429
|
+
|
|
430
|
+
# Quick PR check
|
|
431
|
+
visor --config examples/workflows/quick-pr-check.yaml --input "pr_type=feature"
|
|
432
|
+
|
|
433
|
+
# Workflow composition example (imports calculator-workflow)
|
|
434
|
+
visor --config examples/workflows/workflow-composition-example.yaml
|
|
435
|
+
```
|
|
436
|
+
|
|
272
437
|
## 📚 Further Reading
|
|
273
438
|
|
|
274
439
|
- [Main README](../README.md) - Complete Visor documentation
|
|
@@ -45,10 +45,9 @@ steps:
|
|
|
45
45
|
You have access to custom security scanning tools.
|
|
46
46
|
Use check-secrets to scan for hardcoded credentials.
|
|
47
47
|
Use grep-pattern to find dangerous function calls.
|
|
48
|
+
# Use ai_custom_tools to reference custom tools defined in this file
|
|
49
|
+
ai_custom_tools: [check-secrets, grep-pattern]
|
|
48
50
|
ai_mcp_servers:
|
|
49
|
-
# Use "tools:" to reference custom tools - they'll be served via ephemeral SSE!
|
|
50
|
-
custom-tools:
|
|
51
|
-
tools: [check-secrets, grep-pattern] # ← Magic happens here!
|
|
52
51
|
# You can still combine with external MCP servers
|
|
53
52
|
filesystem:
|
|
54
53
|
command: npx
|
|
@@ -42,6 +42,9 @@ steps:
|
|
|
42
42
|
# Send security scan results to Slack
|
|
43
43
|
security-to-slack:
|
|
44
44
|
type: http
|
|
45
|
+
criticality: external
|
|
46
|
+
assume: "outputs['nightly-security-scan']"
|
|
47
|
+
schema: plain
|
|
45
48
|
depends_on: [nightly-security-scan]
|
|
46
49
|
url: "${SLACK_WEBHOOK_URL}" # Read from SLACK_WEBHOOK_URL environment variable
|
|
47
50
|
method: POST
|
|
@@ -103,6 +106,9 @@ steps:
|
|
|
103
106
|
# Webhook input for deployment notifications
|
|
104
107
|
deployment-webhook:
|
|
105
108
|
type: http_input
|
|
109
|
+
criticality: external
|
|
110
|
+
assume: "true"
|
|
111
|
+
schema: plain
|
|
106
112
|
endpoint: "/deploy"
|
|
107
113
|
on: [webhook_received]
|
|
108
114
|
|
|
@@ -129,6 +135,9 @@ steps:
|
|
|
129
135
|
# Send deployment analysis to ops team
|
|
130
136
|
notify-ops-team:
|
|
131
137
|
type: http
|
|
138
|
+
criticality: external
|
|
139
|
+
assume: "outputs['post-deploy-validation']"
|
|
140
|
+
schema: plain
|
|
132
141
|
depends_on: [post-deploy-validation]
|
|
133
142
|
url: "${OPS_WEBHOOK_URL}" # Read from OPS_WEBHOOK_URL environment variable
|
|
134
143
|
method: POST
|
|
@@ -154,6 +163,9 @@ steps:
|
|
|
154
163
|
# CI completion webhook input
|
|
155
164
|
ci-completion:
|
|
156
165
|
type: http_input
|
|
166
|
+
criticality: external
|
|
167
|
+
assume: "true"
|
|
168
|
+
schema: plain
|
|
157
169
|
endpoint: "/ci-complete"
|
|
158
170
|
transform: |
|
|
159
171
|
{
|
|
@@ -196,6 +208,9 @@ steps:
|
|
|
196
208
|
# Send monitoring alerts
|
|
197
209
|
monitoring-alert:
|
|
198
210
|
type: http
|
|
211
|
+
criticality: external
|
|
212
|
+
assume: "outputs['business-hours-monitor']"
|
|
213
|
+
schema: plain
|
|
199
214
|
depends_on: [business-hours-monitor]
|
|
200
215
|
url: "${ALERT_WEBHOOK_URL}" # Read from ALERT_WEBHOOK_URL environment variable
|
|
201
216
|
body: |
|
|
@@ -85,6 +85,9 @@ steps:
|
|
|
85
85
|
# Complex example: Process webhook data
|
|
86
86
|
get-jira-tickets:
|
|
87
87
|
type: http_client
|
|
88
|
+
criticality: external
|
|
89
|
+
assume: "pr.number"
|
|
90
|
+
schema: plain
|
|
88
91
|
url: "https://api.example.com/jira/tickets?pr={{ pr.number }}"
|
|
89
92
|
transform: |
|
|
90
93
|
{{ data.issues | json }}
|
|
@@ -93,6 +96,9 @@ steps:
|
|
|
93
96
|
|
|
94
97
|
update-each-ticket:
|
|
95
98
|
type: http
|
|
99
|
+
criticality: external
|
|
100
|
+
assume: "outputs['get-jira-tickets']"
|
|
101
|
+
schema: plain
|
|
96
102
|
url: "https://api.example.com/jira/ticket/{{ outputs.get-jira-tickets.id }}"
|
|
97
103
|
body: |
|
|
98
104
|
{
|
|
@@ -13,6 +13,7 @@ steps:
|
|
|
13
13
|
type: git-checkout
|
|
14
14
|
ref: "{{ pr.head }}"
|
|
15
15
|
criticality: internal
|
|
16
|
+
assume: "pr.head" # Ensure PR head ref exists before checkout
|
|
16
17
|
|
|
17
18
|
# Run tests on the checked out code
|
|
18
19
|
test:
|
|
@@ -21,6 +22,7 @@ steps:
|
|
|
21
22
|
exec: npm test
|
|
22
23
|
working_directory: "{{ outputs.checkout.path }}"
|
|
23
24
|
assume: "outputs.checkout.success"
|
|
25
|
+
schema: plain
|
|
24
26
|
criticality: internal
|
|
25
27
|
|
|
26
28
|
# Build the project
|
|
@@ -29,4 +31,6 @@ steps:
|
|
|
29
31
|
depends_on: [test]
|
|
30
32
|
exec: npm run build
|
|
31
33
|
working_directory: "{{ outputs.checkout.path }}"
|
|
34
|
+
assume: "outputs.test"
|
|
35
|
+
schema: plain
|
|
32
36
|
criticality: internal
|
|
@@ -17,12 +17,14 @@ steps:
|
|
|
17
17
|
type: git-checkout
|
|
18
18
|
ref: "{{ pr.head }}"
|
|
19
19
|
criticality: internal
|
|
20
|
+
assume: "pr.head" # Ensure PR head ref exists
|
|
20
21
|
|
|
21
22
|
# Checkout PR base branch
|
|
22
23
|
checkout-base:
|
|
23
24
|
type: git-checkout
|
|
24
25
|
ref: "{{ pr.base }}"
|
|
25
26
|
criticality: internal
|
|
27
|
+
assume: "pr.base" # Ensure PR base ref exists
|
|
26
28
|
|
|
27
29
|
# Run tests on head branch
|
|
28
30
|
test-head:
|
|
@@ -31,6 +33,8 @@ steps:
|
|
|
31
33
|
exec: npm test
|
|
32
34
|
working_directory: "{{ outputs['checkout-head'].path }}"
|
|
33
35
|
continue_on_failure: true
|
|
36
|
+
assume: "outputs['checkout-head']"
|
|
37
|
+
schema: plain
|
|
34
38
|
criticality: internal
|
|
35
39
|
|
|
36
40
|
# Run tests on base branch
|
|
@@ -40,6 +44,8 @@ steps:
|
|
|
40
44
|
exec: npm test
|
|
41
45
|
working_directory: "{{ outputs['checkout-base'].path }}"
|
|
42
46
|
continue_on_failure: true
|
|
47
|
+
assume: "outputs['checkout-base']"
|
|
48
|
+
schema: plain
|
|
43
49
|
criticality: internal
|
|
44
50
|
|
|
45
51
|
# Compare results
|
|
@@ -13,6 +13,7 @@ steps:
|
|
|
13
13
|
ref: "{{ pr.head }}"
|
|
14
14
|
token: "{{ env.GITHUB_TOKEN }}"
|
|
15
15
|
criticality: internal
|
|
16
|
+
assume: "env.GITHUB_TOKEN" # Ensure token is available
|
|
16
17
|
|
|
17
18
|
# Checkout shared library repository
|
|
18
19
|
checkout-lib:
|
|
@@ -21,6 +22,7 @@ steps:
|
|
|
21
22
|
ref: main
|
|
22
23
|
token: "{{ env.GITHUB_TOKEN }}"
|
|
23
24
|
criticality: internal
|
|
25
|
+
assume: "env.GITHUB_TOKEN" # Ensure token is available
|
|
24
26
|
|
|
25
27
|
# Checkout test utilities repository
|
|
26
28
|
checkout-test-utils:
|
|
@@ -29,6 +31,7 @@ steps:
|
|
|
29
31
|
ref: v2.0.0
|
|
30
32
|
token: "{{ env.GITHUB_TOKEN }}"
|
|
31
33
|
criticality: internal
|
|
34
|
+
assume: "env.GITHUB_TOKEN" # Ensure token is available
|
|
32
35
|
|
|
33
36
|
# Install dependencies in all repositories
|
|
34
37
|
install-deps:
|
|
@@ -43,6 +46,8 @@ steps:
|
|
|
43
46
|
|
|
44
47
|
echo "Installing dependencies for test utils..."
|
|
45
48
|
cd "{{ outputs['checkout-test-utils'].path }}" && npm install
|
|
49
|
+
assume: "outputs['checkout-app'] && outputs['checkout-lib'] && outputs['checkout-test-utils']"
|
|
50
|
+
schema: plain
|
|
46
51
|
criticality: internal
|
|
47
52
|
|
|
48
53
|
# Run integration tests
|
|
@@ -54,6 +59,8 @@ steps:
|
|
|
54
59
|
export TEST_UTILS_PATH="{{ outputs['checkout-test-utils'].path }}"
|
|
55
60
|
npm run test:integration
|
|
56
61
|
working_directory: "{{ outputs['checkout-app'].path }}"
|
|
62
|
+
assume: "outputs['install-deps']"
|
|
63
|
+
schema: plain
|
|
57
64
|
criticality: internal
|
|
58
65
|
|
|
59
66
|
# Generate integration report
|