@probelabs/visor 0.1.107 → 0.1.111
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 +6 -0
- package/defaults/task-refinement.yaml +7 -3
- package/defaults/visor.tests.yaml +13 -2
- package/defaults/visor.yaml +1 -0
- package/dist/663.index.js +3 -2
- package/dist/80.index.js +3 -2
- package/dist/ai-review-service.d.ts +13 -9
- package/dist/ai-review-service.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/debug-visualizer/ws-server.d.ts +7 -1
- package/dist/debug-visualizer/ws-server.d.ts.map +1 -1
- package/dist/defaults/task-refinement.yaml +7 -3
- package/dist/defaults/visor.tests.yaml +13 -2
- package/dist/defaults/visor.yaml +1 -0
- package/dist/docs/advanced-ai.md +60 -1
- package/dist/docs/ai-configuration.md +67 -0
- package/dist/docs/ai-custom-tools-usage.md +261 -0
- package/dist/docs/ai-custom-tools.md +392 -0
- package/dist/docs/bot-transports-rfc.md +23 -0
- package/dist/docs/configuration.md +21 -0
- package/dist/docs/engine-pause-resume-rfc.md +192 -0
- package/dist/docs/lifecycle-hooks.md +253 -0
- package/dist/docs/liquid-templates.md +143 -0
- package/dist/docs/providers/git-checkout.md +589 -0
- package/dist/docs/recipes.md +458 -5
- package/dist/docs/rfc/git-checkout-step.md +601 -0
- package/dist/docs/rfc/on_init-hook.md +1294 -0
- package/dist/docs/rfc/workspace-isolation.md +216 -0
- package/dist/docs/router-patterns.md +339 -0
- package/dist/event-bus/types.d.ts +14 -0
- package/dist/event-bus/types.d.ts.map +1 -1
- package/dist/examples/ai-custom-tools-example.yaml +206 -0
- package/dist/examples/ai-custom-tools-simple.yaml +76 -0
- package/dist/examples/git-checkout-basic.yaml +32 -0
- package/dist/examples/git-checkout-compare.yaml +59 -0
- package/dist/examples/git-checkout-cross-repo.yaml +76 -0
- package/dist/examples/on-init-import-demo.yaml +179 -0
- package/dist/examples/reusable-tools.yaml +92 -0
- package/dist/examples/reusable-workflows.yaml +88 -0
- package/dist/examples/session-reuse-self.yaml +81 -0
- package/dist/examples/slack-simple-chat.yaml +775 -0
- package/dist/failure-condition-evaluator.d.ts +2 -0
- package/dist/failure-condition-evaluator.d.ts.map +1 -1
- package/dist/frontends/github-frontend.d.ts +20 -0
- package/dist/frontends/github-frontend.d.ts.map +1 -1
- package/dist/frontends/host.d.ts +4 -0
- package/dist/frontends/host.d.ts.map +1 -1
- package/dist/frontends/slack-frontend.d.ts +58 -0
- package/dist/frontends/slack-frontend.d.ts.map +1 -0
- package/dist/generated/config-schema.d.ts +409 -41
- package/dist/generated/config-schema.d.ts.map +1 -1
- package/dist/generated/config-schema.json +436 -47
- package/dist/github-comments.d.ts +2 -0
- package/dist/github-comments.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +83587 -56085
- package/dist/liquid-extensions.d.ts.map +1 -1
- package/dist/logger.d.ts +1 -0
- package/dist/logger.d.ts.map +1 -1
- package/dist/output/traces/{run-2025-11-21T11-50-46-505Z.ndjson → run-2026-01-20T19-22-58-043Z.ndjson} +91 -91
- package/dist/output/traces/run-2026-01-20T19-23-52-175Z.ndjson +1067 -0
- package/dist/output-formatters.d.ts.map +1 -1
- package/dist/providers/ai-check-provider.d.ts +12 -0
- package/dist/providers/ai-check-provider.d.ts.map +1 -1
- package/dist/providers/check-provider-registry.d.ts.map +1 -1
- package/dist/providers/check-provider.interface.d.ts +9 -0
- package/dist/providers/check-provider.interface.d.ts.map +1 -1
- package/dist/providers/command-check-provider.d.ts.map +1 -1
- package/dist/providers/custom-tool-executor.d.ts.map +1 -1
- package/dist/providers/git-checkout-provider.d.ts +25 -0
- package/dist/providers/git-checkout-provider.d.ts.map +1 -0
- package/dist/providers/http-client-provider.d.ts +3 -0
- package/dist/providers/http-client-provider.d.ts.map +1 -1
- package/dist/providers/human-input-check-provider.d.ts +2 -0
- package/dist/providers/human-input-check-provider.d.ts.map +1 -1
- package/dist/providers/log-check-provider.d.ts.map +1 -1
- package/dist/providers/mcp-check-provider.d.ts +1 -1
- package/dist/providers/mcp-check-provider.d.ts.map +1 -1
- package/dist/providers/mcp-custom-sse-server.d.ts +66 -0
- package/dist/providers/mcp-custom-sse-server.d.ts.map +1 -0
- package/dist/providers/memory-check-provider.d.ts.map +1 -1
- package/dist/providers/script-check-provider.d.ts.map +1 -1
- package/dist/providers/workflow-check-provider.d.ts.map +1 -1
- package/dist/reviewer.d.ts.map +1 -1
- package/dist/sdk/check-provider-registry-534KL5HT.mjs +27 -0
- package/dist/sdk/chunk-23L3QRYX.mjs +16872 -0
- package/dist/sdk/chunk-23L3QRYX.mjs.map +1 -0
- package/dist/sdk/{chunk-OOZITMRU.mjs → chunk-3OMWVM6J.mjs} +11 -1
- package/dist/sdk/{chunk-OOZITMRU.mjs.map → chunk-3OMWVM6J.mjs.map} +1 -1
- package/dist/sdk/{chunk-37ZSCMFC.mjs → chunk-7UK3NIIT.mjs} +2 -2
- package/dist/sdk/{chunk-VMPLF6FT.mjs → chunk-AGIZJ4UZ.mjs} +50 -4
- package/dist/sdk/chunk-AGIZJ4UZ.mjs.map +1 -0
- package/dist/sdk/{chunk-IEO6CFLG.mjs → chunk-AIVFBIS4.mjs} +161 -5
- package/dist/sdk/chunk-AIVFBIS4.mjs.map +1 -0
- package/dist/sdk/chunk-AK6BVWIT.mjs +426 -0
- package/dist/sdk/chunk-AK6BVWIT.mjs.map +1 -0
- package/dist/sdk/chunk-AUT26LHW.mjs +139 -0
- package/dist/sdk/chunk-AUT26LHW.mjs.map +1 -0
- package/dist/sdk/chunk-BOVFH3LI.mjs +232 -0
- package/dist/sdk/chunk-BOVFH3LI.mjs.map +1 -0
- package/dist/sdk/chunk-HTOKWMPO.mjs +157 -0
- package/dist/sdk/chunk-HTOKWMPO.mjs.map +1 -0
- package/dist/sdk/{chunk-6Y4YTKCF.mjs → chunk-NAW3DB3I.mjs} +2 -2
- package/dist/sdk/{chunk-OWUVOILT.mjs → chunk-QR7MOMJH.mjs} +4 -3
- package/dist/sdk/{chunk-OWUVOILT.mjs.map → chunk-QR7MOMJH.mjs.map} +1 -1
- package/dist/sdk/{chunk-PTL3K3PN.mjs → chunk-QY2XYPEV.mjs} +488 -60
- package/dist/sdk/chunk-QY2XYPEV.mjs.map +1 -0
- package/dist/sdk/{chunk-OZJ263FM.mjs → chunk-SIWNBRTK.mjs} +29 -215
- package/dist/sdk/chunk-SIWNBRTK.mjs.map +1 -0
- package/dist/sdk/command-executor-TYUV6HUS.mjs +14 -0
- package/dist/sdk/{config-M4ZNO6NU.mjs → config-YNC2EOOT.mjs} +5 -3
- package/dist/sdk/{failure-condition-evaluator-NBO5YRXW.mjs → failure-condition-evaluator-YGTF2GHG.mjs} +6 -5
- package/dist/sdk/{github-frontend-4AWRJT7D.mjs → github-frontend-SIAEOCON.mjs} +190 -12
- package/dist/sdk/github-frontend-SIAEOCON.mjs.map +1 -0
- package/dist/sdk/{host-7GBC3S7L.mjs → host-DXUYTNMU.mjs} +5 -2
- package/dist/sdk/host-DXUYTNMU.mjs.map +1 -0
- package/dist/sdk/{liquid-extensions-C7EG3YKH.mjs → liquid-extensions-PKWCKK7E.mjs} +5 -4
- package/dist/sdk/memory-store-XGBB7LX7.mjs +12 -0
- package/dist/sdk/prompt-state-YRJY6QAL.mjs +16 -0
- package/dist/sdk/{renderer-schema-6RF26VUS.mjs → renderer-schema-LPKN5UJS.mjs} +3 -2
- package/dist/sdk/{renderer-schema-6RF26VUS.mjs.map → renderer-schema-LPKN5UJS.mjs.map} +1 -1
- package/dist/sdk/{routing-RP56JTV2.mjs → routing-6N45MJ4F.mjs} +7 -6
- package/dist/sdk/sdk.d.mts +219 -5
- package/dist/sdk/sdk.d.ts +219 -5
- package/dist/sdk/sdk.js +21329 -14908
- package/dist/sdk/sdk.js.map +1 -1
- package/dist/sdk/sdk.mjs +407 -12874
- package/dist/sdk/sdk.mjs.map +1 -1
- package/dist/sdk/{session-registry-N5FFYFTM.mjs → session-registry-4E6YRQ77.mjs} +2 -2
- package/dist/sdk/session-registry-4E6YRQ77.mjs.map +1 -0
- package/dist/sdk/slack-frontend-BVKW3GD5.mjs +735 -0
- package/dist/sdk/slack-frontend-BVKW3GD5.mjs.map +1 -0
- package/dist/sdk/{tracer-init-WP4X46IF.mjs → tracer-init-GSLPPLCD.mjs} +2 -2
- package/dist/sdk/tracer-init-GSLPPLCD.mjs.map +1 -0
- package/dist/sdk/workflow-registry-R6KSACFR.mjs +12 -0
- package/dist/sdk/workflow-registry-R6KSACFR.mjs.map +1 -0
- package/dist/slack/adapter.d.ts +36 -0
- package/dist/slack/adapter.d.ts.map +1 -0
- package/dist/slack/cache-prewarmer.d.ts +31 -0
- package/dist/slack/cache-prewarmer.d.ts.map +1 -0
- package/dist/slack/client.d.ts +77 -0
- package/dist/slack/client.d.ts.map +1 -0
- package/dist/slack/markdown.d.ts +45 -0
- package/dist/slack/markdown.d.ts.map +1 -0
- package/dist/slack/prompt-state.d.ts +33 -0
- package/dist/slack/prompt-state.d.ts.map +1 -0
- package/dist/slack/rate-limiter.d.ts +56 -0
- package/dist/slack/rate-limiter.d.ts.map +1 -0
- package/dist/slack/signature.d.ts +2 -0
- package/dist/slack/signature.d.ts.map +1 -0
- package/dist/slack/socket-runner.d.ts +42 -0
- package/dist/slack/socket-runner.d.ts.map +1 -0
- package/dist/slack/thread-cache.d.ts +51 -0
- package/dist/slack/thread-cache.d.ts.map +1 -0
- package/dist/state-machine/context/build-engine-context.d.ts +8 -0
- package/dist/state-machine/context/build-engine-context.d.ts.map +1 -1
- 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/on-init-handlers.d.ts +43 -0
- package/dist/state-machine/dispatch/on-init-handlers.d.ts.map +1 -0
- package/dist/state-machine/dispatch/stats-manager.d.ts.map +1 -1
- package/dist/state-machine/dispatch/template-renderer.d.ts.map +1 -1
- package/dist/state-machine/runner.d.ts +6 -0
- package/dist/state-machine/runner.d.ts.map +1 -1
- package/dist/state-machine/states/level-dispatch.d.ts.map +1 -1
- package/dist/state-machine/states/plan-ready.d.ts.map +1 -1
- package/dist/state-machine/states/routing.d.ts.map +1 -1
- package/dist/state-machine/states/wave-planning.d.ts.map +1 -1
- package/dist/state-machine/workflow-projection.d.ts.map +1 -1
- package/dist/state-machine-execution-engine.d.ts +21 -9
- package/dist/state-machine-execution-engine.d.ts.map +1 -1
- package/dist/telemetry/state-capture.d.ts +5 -0
- package/dist/telemetry/state-capture.d.ts.map +1 -1
- package/dist/test-runner/core/flow-stage.d.ts.map +1 -1
- package/dist/test-runner/core/test-execution-wrapper.d.ts.map +1 -1
- package/dist/test-runner/evaluators.d.ts +37 -4
- package/dist/test-runner/evaluators.d.ts.map +1 -1
- package/dist/test-runner/index.d.ts +7 -0
- package/dist/test-runner/index.d.ts.map +1 -1
- package/dist/test-runner/recorders/slack-recorder.d.ts +17 -0
- package/dist/test-runner/recorders/slack-recorder.d.ts.map +1 -0
- package/dist/test-runner/validator.d.ts.map +1 -1
- package/dist/traces/{run-2025-11-21T11-50-46-505Z.ndjson → run-2026-01-20T19-22-58-043Z.ndjson} +91 -91
- package/dist/traces/run-2026-01-20T19-23-52-175Z.ndjson +1067 -0
- package/dist/types/bot.d.ts +109 -0
- package/dist/types/bot.d.ts.map +1 -0
- package/dist/types/cli.d.ts +4 -0
- package/dist/types/cli.d.ts.map +1 -1
- package/dist/types/config.d.ts +182 -5
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/engine.d.ts +5 -0
- package/dist/types/engine.d.ts.map +1 -1
- package/dist/types/git-checkout.d.ts +76 -0
- package/dist/types/git-checkout.d.ts.map +1 -0
- package/dist/utils/json-text-extractor.d.ts +17 -0
- package/dist/utils/json-text-extractor.d.ts.map +1 -0
- package/dist/utils/sandbox.d.ts +10 -0
- package/dist/utils/sandbox.d.ts.map +1 -1
- package/dist/utils/template-context.d.ts +1 -0
- package/dist/utils/template-context.d.ts.map +1 -1
- package/dist/utils/tracer-init.d.ts.map +1 -1
- package/dist/utils/workspace-manager.d.ts +118 -0
- package/dist/utils/workspace-manager.d.ts.map +1 -0
- package/dist/utils/worktree-cleanup.d.ts +33 -0
- package/dist/utils/worktree-cleanup.d.ts.map +1 -0
- package/dist/utils/worktree-manager.d.ts +153 -0
- package/dist/utils/worktree-manager.d.ts.map +1 -0
- package/dist/webhook-server.d.ts.map +1 -1
- package/dist/workflow-executor.d.ts.map +1 -1
- package/dist/workflow-registry.d.ts.map +1 -1
- package/package.json +4 -2
- package/dist/output/traces/run-2025-11-21T11-51-33-674Z.ndjson +0 -839
- package/dist/sdk/chunk-IEO6CFLG.mjs.map +0 -1
- package/dist/sdk/chunk-JEHPDJIF.mjs +0 -223
- package/dist/sdk/chunk-JEHPDJIF.mjs.map +0 -1
- package/dist/sdk/chunk-OZJ263FM.mjs.map +0 -1
- package/dist/sdk/chunk-PTL3K3PN.mjs.map +0 -1
- package/dist/sdk/chunk-VMPLF6FT.mjs.map +0 -1
- package/dist/sdk/github-frontend-4AWRJT7D.mjs.map +0 -1
- package/dist/sdk/host-7GBC3S7L.mjs.map +0 -1
- package/dist/sdk/memory-store-GJACZC2A.mjs +0 -11
- package/dist/sdk/workflow-registry-2YIIXQCK.mjs +0 -11
- package/dist/traces/run-2025-11-21T11-51-33-674Z.ndjson +0 -839
- /package/dist/sdk/{config-M4ZNO6NU.mjs.map → check-provider-registry-534KL5HT.mjs.map} +0 -0
- /package/dist/sdk/{chunk-37ZSCMFC.mjs.map → chunk-7UK3NIIT.mjs.map} +0 -0
- /package/dist/sdk/{chunk-6Y4YTKCF.mjs.map → chunk-NAW3DB3I.mjs.map} +0 -0
- /package/dist/sdk/{failure-condition-evaluator-NBO5YRXW.mjs.map → command-executor-TYUV6HUS.mjs.map} +0 -0
- /package/dist/sdk/{liquid-extensions-C7EG3YKH.mjs.map → config-YNC2EOOT.mjs.map} +0 -0
- /package/dist/sdk/{memory-store-GJACZC2A.mjs.map → failure-condition-evaluator-YGTF2GHG.mjs.map} +0 -0
- /package/dist/sdk/{routing-RP56JTV2.mjs.map → liquid-extensions-PKWCKK7E.mjs.map} +0 -0
- /package/dist/sdk/{session-registry-N5FFYFTM.mjs.map → memory-store-XGBB7LX7.mjs.map} +0 -0
- /package/dist/sdk/{tracer-init-WP4X46IF.mjs.map → prompt-state-YRJY6QAL.mjs.map} +0 -0
- /package/dist/sdk/{workflow-registry-2YIIXQCK.mjs.map → routing-6N45MJ4F.mjs.map} +0 -0
|
@@ -3,10 +3,14 @@ import {
|
|
|
3
3
|
config_merger_exports,
|
|
4
4
|
init_config_merger
|
|
5
5
|
} from "./chunk-O5EZDNYL.mjs";
|
|
6
|
+
import {
|
|
7
|
+
init_sandbox,
|
|
8
|
+
validateJsSyntax
|
|
9
|
+
} from "./chunk-BOVFH3LI.mjs";
|
|
6
10
|
import {
|
|
7
11
|
init_logger,
|
|
8
12
|
logger
|
|
9
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-AGIZJ4UZ.mjs";
|
|
10
14
|
import {
|
|
11
15
|
__esm,
|
|
12
16
|
__export,
|
|
@@ -457,6 +461,20 @@ var init_config_schema = __esm({
|
|
|
457
461
|
},
|
|
458
462
|
description: "Import workflow definitions from external files or URLs"
|
|
459
463
|
},
|
|
464
|
+
inputs: {
|
|
465
|
+
type: "array",
|
|
466
|
+
items: {
|
|
467
|
+
$ref: "#/definitions/WorkflowInput"
|
|
468
|
+
},
|
|
469
|
+
description: "Workflow inputs (for standalone reusable workflows)"
|
|
470
|
+
},
|
|
471
|
+
outputs: {
|
|
472
|
+
type: "array",
|
|
473
|
+
items: {
|
|
474
|
+
$ref: "#/definitions/WorkflowOutput"
|
|
475
|
+
},
|
|
476
|
+
description: "Workflow outputs (for standalone reusable workflows)"
|
|
477
|
+
},
|
|
460
478
|
steps: {
|
|
461
479
|
$ref: "#/definitions/Record%3Cstring%2CCheckConfig%3E",
|
|
462
480
|
description: "Step configurations (recommended)"
|
|
@@ -467,7 +485,7 @@ var init_config_schema = __esm({
|
|
|
467
485
|
},
|
|
468
486
|
output: {
|
|
469
487
|
$ref: "#/definitions/OutputConfig",
|
|
470
|
-
description: "Output configuration"
|
|
488
|
+
description: "Output configuration (optional - defaults provided)"
|
|
471
489
|
},
|
|
472
490
|
http_server: {
|
|
473
491
|
$ref: "#/definitions/HttpServerConfig",
|
|
@@ -538,9 +556,17 @@ var init_config_schema = __esm({
|
|
|
538
556
|
additionalProperties: false
|
|
539
557
|
},
|
|
540
558
|
description: "Optional integrations: event-driven frontends (e.g., ndjson-sink, github)"
|
|
559
|
+
},
|
|
560
|
+
workspace: {
|
|
561
|
+
$ref: "#/definitions/WorkspaceConfig",
|
|
562
|
+
description: "Workspace isolation configuration for sandboxed execution"
|
|
563
|
+
},
|
|
564
|
+
slack: {
|
|
565
|
+
$ref: "#/definitions/SlackConfig",
|
|
566
|
+
description: "Slack configuration"
|
|
541
567
|
}
|
|
542
568
|
},
|
|
543
|
-
required: ["
|
|
569
|
+
required: ["version"],
|
|
544
570
|
patternProperties: {
|
|
545
571
|
"^x-": {}
|
|
546
572
|
}
|
|
@@ -643,6 +669,63 @@ var init_config_schema = __esm({
|
|
|
643
669
|
type: "string"
|
|
644
670
|
}
|
|
645
671
|
},
|
|
672
|
+
WorkflowInput: {
|
|
673
|
+
type: "object",
|
|
674
|
+
properties: {
|
|
675
|
+
name: {
|
|
676
|
+
type: "string",
|
|
677
|
+
description: "Input parameter name"
|
|
678
|
+
},
|
|
679
|
+
schema: {
|
|
680
|
+
$ref: "#/definitions/Record%3Cstring%2Cunknown%3E",
|
|
681
|
+
description: "JSON Schema for the input"
|
|
682
|
+
},
|
|
683
|
+
required: {
|
|
684
|
+
type: "boolean",
|
|
685
|
+
description: "Whether this input is required"
|
|
686
|
+
},
|
|
687
|
+
default: {
|
|
688
|
+
description: "Default value if not provided"
|
|
689
|
+
},
|
|
690
|
+
description: {
|
|
691
|
+
type: "string",
|
|
692
|
+
description: "Human-readable description"
|
|
693
|
+
}
|
|
694
|
+
},
|
|
695
|
+
required: ["name"],
|
|
696
|
+
additionalProperties: false,
|
|
697
|
+
description: "Workflow input definition for standalone reusable workflows",
|
|
698
|
+
patternProperties: {
|
|
699
|
+
"^x-": {}
|
|
700
|
+
}
|
|
701
|
+
},
|
|
702
|
+
WorkflowOutput: {
|
|
703
|
+
type: "object",
|
|
704
|
+
properties: {
|
|
705
|
+
name: {
|
|
706
|
+
type: "string",
|
|
707
|
+
description: "Output name"
|
|
708
|
+
},
|
|
709
|
+
description: {
|
|
710
|
+
type: "string",
|
|
711
|
+
description: "Human-readable description"
|
|
712
|
+
},
|
|
713
|
+
value: {
|
|
714
|
+
type: "string",
|
|
715
|
+
description: "Value using Liquid template syntax (references step outputs)"
|
|
716
|
+
},
|
|
717
|
+
value_js: {
|
|
718
|
+
type: "string",
|
|
719
|
+
description: "Value using JavaScript expression (alternative to value)"
|
|
720
|
+
}
|
|
721
|
+
},
|
|
722
|
+
required: ["name"],
|
|
723
|
+
additionalProperties: false,
|
|
724
|
+
description: "Workflow output definition for standalone reusable workflows",
|
|
725
|
+
patternProperties: {
|
|
726
|
+
"^x-": {}
|
|
727
|
+
}
|
|
728
|
+
},
|
|
646
729
|
"Record<string,CheckConfig>": {
|
|
647
730
|
type: "object",
|
|
648
731
|
additionalProperties: {
|
|
@@ -762,6 +845,13 @@ var init_config_schema = __esm({
|
|
|
762
845
|
$ref: "#/definitions/Record%3Cstring%2CMcpServerConfig%3E",
|
|
763
846
|
description: "MCP servers for this AI check - overrides global setting"
|
|
764
847
|
},
|
|
848
|
+
ai_custom_tools: {
|
|
849
|
+
type: "array",
|
|
850
|
+
items: {
|
|
851
|
+
type: "string"
|
|
852
|
+
},
|
|
853
|
+
description: "List of custom tool names to expose to this AI check via ephemeral SSE MCP server"
|
|
854
|
+
},
|
|
765
855
|
claude_code: {
|
|
766
856
|
$ref: "#/definitions/ClaudeCodeConfig",
|
|
767
857
|
description: "Claude Code configuration (for claude-code type checks)"
|
|
@@ -775,11 +865,18 @@ var init_config_schema = __esm({
|
|
|
775
865
|
description: "Timeout in seconds for command execution (default: 60)"
|
|
776
866
|
},
|
|
777
867
|
depends_on: {
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
868
|
+
anyOf: [
|
|
869
|
+
{
|
|
870
|
+
type: "string"
|
|
871
|
+
},
|
|
872
|
+
{
|
|
873
|
+
type: "array",
|
|
874
|
+
items: {
|
|
875
|
+
type: "string"
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
],
|
|
879
|
+
description: "Check IDs that this check depends on (optional). Accepts single string or array."
|
|
783
880
|
},
|
|
784
881
|
group: {
|
|
785
882
|
type: "string",
|
|
@@ -854,6 +951,10 @@ var init_config_schema = __esm({
|
|
|
854
951
|
type: "boolean",
|
|
855
952
|
description: "Alias for fanout: 'reduce'"
|
|
856
953
|
},
|
|
954
|
+
on_init: {
|
|
955
|
+
$ref: "#/definitions/OnInitConfig",
|
|
956
|
+
description: "Init routing configuration for this check (runs before execution/preprocessing)"
|
|
957
|
+
},
|
|
857
958
|
on_fail: {
|
|
858
959
|
$ref: "#/definitions/OnFailConfig",
|
|
859
960
|
description: "Failure routing configuration for this check (retry/goto/run)"
|
|
@@ -1015,12 +1116,91 @@ var init_config_schema = __esm({
|
|
|
1015
1116
|
description: "Arguments/inputs for the workflow"
|
|
1016
1117
|
},
|
|
1017
1118
|
overrides: {
|
|
1018
|
-
$ref: "#/definitions/Record%3Cstring%2CPartial%3Cinterface-src_types_config.ts-
|
|
1119
|
+
$ref: "#/definitions/Record%3Cstring%2CPartial%3Cinterface-src_types_config.ts-11359-23556-src_types_config.ts-0-40845%3E%3E",
|
|
1019
1120
|
description: "Override specific step configurations in the workflow"
|
|
1020
1121
|
},
|
|
1021
1122
|
output_mapping: {
|
|
1022
1123
|
$ref: "#/definitions/Record%3Cstring%2Cstring%3E",
|
|
1023
1124
|
description: "Map workflow outputs to check outputs"
|
|
1125
|
+
},
|
|
1126
|
+
workflow_inputs: {
|
|
1127
|
+
$ref: "#/definitions/Record%3Cstring%2Cunknown%3E",
|
|
1128
|
+
description: "Alias for args - workflow inputs (backward compatibility)"
|
|
1129
|
+
},
|
|
1130
|
+
config: {
|
|
1131
|
+
type: "string",
|
|
1132
|
+
description: "Config file path - alternative to workflow ID (loads a Visor config file as workflow)"
|
|
1133
|
+
},
|
|
1134
|
+
workflow_overrides: {
|
|
1135
|
+
$ref: "#/definitions/Record%3Cstring%2CPartial%3Cinterface-src_types_config.ts-11359-23556-src_types_config.ts-0-40845%3E%3E",
|
|
1136
|
+
description: "Alias for overrides - workflow step overrides (backward compatibility)"
|
|
1137
|
+
},
|
|
1138
|
+
ref: {
|
|
1139
|
+
type: "string",
|
|
1140
|
+
description: "Git reference to checkout (branch, tag, commit SHA) - supports templates"
|
|
1141
|
+
},
|
|
1142
|
+
repository: {
|
|
1143
|
+
type: "string",
|
|
1144
|
+
description: "Repository URL or owner/repo format (defaults to current repository)"
|
|
1145
|
+
},
|
|
1146
|
+
token: {
|
|
1147
|
+
type: "string",
|
|
1148
|
+
description: "GitHub token for private repositories (defaults to GITHUB_TOKEN env)"
|
|
1149
|
+
},
|
|
1150
|
+
fetch_depth: {
|
|
1151
|
+
type: "number",
|
|
1152
|
+
description: "Number of commits to fetch (0 for full history, default: 1)"
|
|
1153
|
+
},
|
|
1154
|
+
fetch_tags: {
|
|
1155
|
+
type: "boolean",
|
|
1156
|
+
description: "Whether to fetch tags (default: false)"
|
|
1157
|
+
},
|
|
1158
|
+
submodules: {
|
|
1159
|
+
anyOf: [
|
|
1160
|
+
{
|
|
1161
|
+
type: "boolean"
|
|
1162
|
+
},
|
|
1163
|
+
{
|
|
1164
|
+
type: "string",
|
|
1165
|
+
const: "recursive"
|
|
1166
|
+
}
|
|
1167
|
+
],
|
|
1168
|
+
description: "Checkout submodules: false, true, or 'recursive'"
|
|
1169
|
+
},
|
|
1170
|
+
working_directory: {
|
|
1171
|
+
type: "string",
|
|
1172
|
+
description: "Working directory for the checkout (defaults to temp directory)"
|
|
1173
|
+
},
|
|
1174
|
+
use_worktree: {
|
|
1175
|
+
type: "boolean",
|
|
1176
|
+
description: "Use git worktree for efficient parallel checkouts (default: true)"
|
|
1177
|
+
},
|
|
1178
|
+
clean: {
|
|
1179
|
+
type: "boolean",
|
|
1180
|
+
description: "Clean the working directory before checkout (default: true)"
|
|
1181
|
+
},
|
|
1182
|
+
sparse_checkout: {
|
|
1183
|
+
type: "array",
|
|
1184
|
+
items: {
|
|
1185
|
+
type: "string"
|
|
1186
|
+
},
|
|
1187
|
+
description: "Sparse checkout paths - only checkout specific directories/files"
|
|
1188
|
+
},
|
|
1189
|
+
lfs: {
|
|
1190
|
+
type: "boolean",
|
|
1191
|
+
description: "Enable Git LFS (Large File Storage)"
|
|
1192
|
+
},
|
|
1193
|
+
clone_timeout_ms: {
|
|
1194
|
+
type: "number",
|
|
1195
|
+
description: "Timeout in ms for cloning the bare repository (default: 300000 = 5 min)"
|
|
1196
|
+
},
|
|
1197
|
+
cleanup_on_failure: {
|
|
1198
|
+
type: "boolean",
|
|
1199
|
+
description: "Clean up worktree on failure (default: true)"
|
|
1200
|
+
},
|
|
1201
|
+
persist_worktree: {
|
|
1202
|
+
type: "boolean",
|
|
1203
|
+
description: "Keep worktree after workflow completion (default: false)"
|
|
1024
1204
|
}
|
|
1025
1205
|
},
|
|
1026
1206
|
additionalProperties: false,
|
|
@@ -1045,7 +1225,8 @@ var init_config_schema = __esm({
|
|
|
1045
1225
|
"claude-code",
|
|
1046
1226
|
"mcp",
|
|
1047
1227
|
"human-input",
|
|
1048
|
-
"workflow"
|
|
1228
|
+
"workflow",
|
|
1229
|
+
"git-checkout"
|
|
1049
1230
|
],
|
|
1050
1231
|
description: "Valid check types in configuration"
|
|
1051
1232
|
},
|
|
@@ -1103,6 +1284,14 @@ var init_config_schema = __esm({
|
|
|
1103
1284
|
type: "boolean",
|
|
1104
1285
|
description: "Skip adding code context (diffs, files, PR info) to the prompt"
|
|
1105
1286
|
},
|
|
1287
|
+
skip_slack_context: {
|
|
1288
|
+
type: "boolean",
|
|
1289
|
+
description: "Skip adding Slack conversation context to the prompt (when running under Slack)"
|
|
1290
|
+
},
|
|
1291
|
+
skip_transport_context: {
|
|
1292
|
+
type: "boolean",
|
|
1293
|
+
description: "Skip adding transport-specific context (e.g., GitHub PR/issue XML, Slack conversation XML) to the prompt. When true, this behaves like setting both skip_code_context and skip_slack_context to true, unless those are explicitly overridden."
|
|
1294
|
+
},
|
|
1106
1295
|
mcpServers: {
|
|
1107
1296
|
$ref: "#/definitions/Record%3Cstring%2CMcpServerConfig%3E",
|
|
1108
1297
|
description: "MCP servers configuration"
|
|
@@ -1141,6 +1330,10 @@ var init_config_schema = __esm({
|
|
|
1141
1330
|
bashConfig: {
|
|
1142
1331
|
$ref: "#/definitions/BashConfig",
|
|
1143
1332
|
description: "Advanced bash command execution configuration"
|
|
1333
|
+
},
|
|
1334
|
+
completion_prompt: {
|
|
1335
|
+
type: "string",
|
|
1336
|
+
description: "Completion prompt for post-completion validation/review (runs after attempt_completion)"
|
|
1144
1337
|
}
|
|
1145
1338
|
},
|
|
1146
1339
|
additionalProperties: false,
|
|
@@ -1462,6 +1655,161 @@ var init_config_schema = __esm({
|
|
|
1462
1655
|
enum: ["error", "warning", "info"],
|
|
1463
1656
|
description: "Failure condition severity levels"
|
|
1464
1657
|
},
|
|
1658
|
+
OnInitConfig: {
|
|
1659
|
+
type: "object",
|
|
1660
|
+
properties: {
|
|
1661
|
+
run: {
|
|
1662
|
+
type: "array",
|
|
1663
|
+
items: {
|
|
1664
|
+
$ref: "#/definitions/OnInitRunItem"
|
|
1665
|
+
},
|
|
1666
|
+
description: "Items to run before this check executes"
|
|
1667
|
+
},
|
|
1668
|
+
run_js: {
|
|
1669
|
+
type: "string",
|
|
1670
|
+
description: "Dynamic init items: JS expression returning OnInitRunItem[]"
|
|
1671
|
+
},
|
|
1672
|
+
transitions: {
|
|
1673
|
+
type: "array",
|
|
1674
|
+
items: {
|
|
1675
|
+
$ref: "#/definitions/TransitionRule"
|
|
1676
|
+
},
|
|
1677
|
+
description: "Declarative transitions (optional, for advanced use cases)"
|
|
1678
|
+
}
|
|
1679
|
+
},
|
|
1680
|
+
additionalProperties: false,
|
|
1681
|
+
description: "Init routing configuration per check Runs BEFORE the check executes (preprocessing/setup)",
|
|
1682
|
+
patternProperties: {
|
|
1683
|
+
"^x-": {}
|
|
1684
|
+
}
|
|
1685
|
+
},
|
|
1686
|
+
OnInitRunItem: {
|
|
1687
|
+
anyOf: [
|
|
1688
|
+
{
|
|
1689
|
+
$ref: "#/definitions/OnInitToolInvocation"
|
|
1690
|
+
},
|
|
1691
|
+
{
|
|
1692
|
+
$ref: "#/definitions/OnInitStepInvocation"
|
|
1693
|
+
},
|
|
1694
|
+
{
|
|
1695
|
+
$ref: "#/definitions/OnInitWorkflowInvocation"
|
|
1696
|
+
},
|
|
1697
|
+
{
|
|
1698
|
+
type: "string"
|
|
1699
|
+
}
|
|
1700
|
+
],
|
|
1701
|
+
description: "Unified on_init run item - can be tool, step, workflow, or plain string"
|
|
1702
|
+
},
|
|
1703
|
+
OnInitToolInvocation: {
|
|
1704
|
+
type: "object",
|
|
1705
|
+
properties: {
|
|
1706
|
+
tool: {
|
|
1707
|
+
type: "string",
|
|
1708
|
+
description: "Tool name (must exist in tools: section)"
|
|
1709
|
+
},
|
|
1710
|
+
with: {
|
|
1711
|
+
$ref: "#/definitions/Record%3Cstring%2Cunknown%3E",
|
|
1712
|
+
description: "Arguments to pass to the tool (Liquid templates supported)"
|
|
1713
|
+
},
|
|
1714
|
+
as: {
|
|
1715
|
+
type: "string",
|
|
1716
|
+
description: "Custom output name (defaults to tool name)"
|
|
1717
|
+
}
|
|
1718
|
+
},
|
|
1719
|
+
required: ["tool"],
|
|
1720
|
+
additionalProperties: false,
|
|
1721
|
+
description: "Invoke a custom tool (from tools: section)",
|
|
1722
|
+
patternProperties: {
|
|
1723
|
+
"^x-": {}
|
|
1724
|
+
}
|
|
1725
|
+
},
|
|
1726
|
+
OnInitStepInvocation: {
|
|
1727
|
+
type: "object",
|
|
1728
|
+
properties: {
|
|
1729
|
+
step: {
|
|
1730
|
+
type: "string",
|
|
1731
|
+
description: "Step name (must exist in steps: section)"
|
|
1732
|
+
},
|
|
1733
|
+
with: {
|
|
1734
|
+
$ref: "#/definitions/Record%3Cstring%2Cunknown%3E",
|
|
1735
|
+
description: "Arguments to pass to the step (Liquid templates supported)"
|
|
1736
|
+
},
|
|
1737
|
+
as: {
|
|
1738
|
+
type: "string",
|
|
1739
|
+
description: "Custom output name (defaults to step name)"
|
|
1740
|
+
}
|
|
1741
|
+
},
|
|
1742
|
+
required: ["step"],
|
|
1743
|
+
additionalProperties: false,
|
|
1744
|
+
description: "Invoke a helper step (regular check)",
|
|
1745
|
+
patternProperties: {
|
|
1746
|
+
"^x-": {}
|
|
1747
|
+
}
|
|
1748
|
+
},
|
|
1749
|
+
OnInitWorkflowInvocation: {
|
|
1750
|
+
type: "object",
|
|
1751
|
+
properties: {
|
|
1752
|
+
workflow: {
|
|
1753
|
+
type: "string",
|
|
1754
|
+
description: "Workflow ID or path"
|
|
1755
|
+
},
|
|
1756
|
+
with: {
|
|
1757
|
+
$ref: "#/definitions/Record%3Cstring%2Cunknown%3E",
|
|
1758
|
+
description: "Workflow inputs (Liquid templates supported)"
|
|
1759
|
+
},
|
|
1760
|
+
as: {
|
|
1761
|
+
type: "string",
|
|
1762
|
+
description: "Custom output name (defaults to workflow name)"
|
|
1763
|
+
},
|
|
1764
|
+
overrides: {
|
|
1765
|
+
$ref: "#/definitions/Record%3Cstring%2CPartial%3Cinterface-src_types_config.ts-11359-23556-src_types_config.ts-0-40845%3E%3E",
|
|
1766
|
+
description: "Step overrides"
|
|
1767
|
+
},
|
|
1768
|
+
output_mapping: {
|
|
1769
|
+
$ref: "#/definitions/Record%3Cstring%2Cstring%3E",
|
|
1770
|
+
description: "Output mapping"
|
|
1771
|
+
}
|
|
1772
|
+
},
|
|
1773
|
+
required: ["workflow"],
|
|
1774
|
+
additionalProperties: false,
|
|
1775
|
+
description: "Invoke a reusable workflow",
|
|
1776
|
+
patternProperties: {
|
|
1777
|
+
"^x-": {}
|
|
1778
|
+
}
|
|
1779
|
+
},
|
|
1780
|
+
"Record<string,Partial<interface-src_types_config.ts-11359-23556-src_types_config.ts-0-40845>>": {
|
|
1781
|
+
type: "object",
|
|
1782
|
+
additionalProperties: {
|
|
1783
|
+
$ref: "#/definitions/Partial%3Cinterface-src_types_config.ts-11359-23556-src_types_config.ts-0-40845%3E"
|
|
1784
|
+
}
|
|
1785
|
+
},
|
|
1786
|
+
"Partial<interface-src_types_config.ts-11359-23556-src_types_config.ts-0-40845>": {
|
|
1787
|
+
type: "object",
|
|
1788
|
+
additionalProperties: false
|
|
1789
|
+
},
|
|
1790
|
+
TransitionRule: {
|
|
1791
|
+
type: "object",
|
|
1792
|
+
properties: {
|
|
1793
|
+
when: {
|
|
1794
|
+
type: "string",
|
|
1795
|
+
description: "JavaScript expression evaluated in the same sandbox as goto_js; truthy enables the rule."
|
|
1796
|
+
},
|
|
1797
|
+
to: {
|
|
1798
|
+
type: ["string", "null"],
|
|
1799
|
+
description: "Target step ID, or null to explicitly prevent goto."
|
|
1800
|
+
},
|
|
1801
|
+
goto_event: {
|
|
1802
|
+
$ref: "#/definitions/EventTrigger",
|
|
1803
|
+
description: "Optional event override when performing goto."
|
|
1804
|
+
}
|
|
1805
|
+
},
|
|
1806
|
+
required: ["when"],
|
|
1807
|
+
additionalProperties: false,
|
|
1808
|
+
description: "Declarative transition rule for on_* blocks.",
|
|
1809
|
+
patternProperties: {
|
|
1810
|
+
"^x-": {}
|
|
1811
|
+
}
|
|
1812
|
+
},
|
|
1465
1813
|
OnFailConfig: {
|
|
1466
1814
|
type: "object",
|
|
1467
1815
|
properties: {
|
|
@@ -1543,29 +1891,6 @@ var init_config_schema = __esm({
|
|
|
1543
1891
|
"^x-": {}
|
|
1544
1892
|
}
|
|
1545
1893
|
},
|
|
1546
|
-
TransitionRule: {
|
|
1547
|
-
type: "object",
|
|
1548
|
-
properties: {
|
|
1549
|
-
when: {
|
|
1550
|
-
type: "string",
|
|
1551
|
-
description: "JavaScript expression evaluated in the same sandbox as goto_js; truthy enables the rule."
|
|
1552
|
-
},
|
|
1553
|
-
to: {
|
|
1554
|
-
type: ["string", "null"],
|
|
1555
|
-
description: "Target step ID, or null to explicitly prevent goto."
|
|
1556
|
-
},
|
|
1557
|
-
goto_event: {
|
|
1558
|
-
$ref: "#/definitions/EventTrigger",
|
|
1559
|
-
description: "Optional event override when performing goto."
|
|
1560
|
-
}
|
|
1561
|
-
},
|
|
1562
|
-
required: ["when"],
|
|
1563
|
-
additionalProperties: false,
|
|
1564
|
-
description: "Declarative transition rule for on_* blocks.",
|
|
1565
|
-
patternProperties: {
|
|
1566
|
-
"^x-": {}
|
|
1567
|
-
}
|
|
1568
|
-
},
|
|
1569
1894
|
OnSuccessConfig: {
|
|
1570
1895
|
type: "object",
|
|
1571
1896
|
properties: {
|
|
@@ -1646,16 +1971,6 @@ var init_config_schema = __esm({
|
|
|
1646
1971
|
"^x-": {}
|
|
1647
1972
|
}
|
|
1648
1973
|
},
|
|
1649
|
-
"Record<string,Partial<interface-src_types_config.ts-10692-20779-src_types_config.ts-0-34222>>": {
|
|
1650
|
-
type: "object",
|
|
1651
|
-
additionalProperties: {
|
|
1652
|
-
$ref: "#/definitions/Partial%3Cinterface-src_types_config.ts-10692-20779-src_types_config.ts-0-34222%3E"
|
|
1653
|
-
}
|
|
1654
|
-
},
|
|
1655
|
-
"Partial<interface-src_types_config.ts-10692-20779-src_types_config.ts-0-34222>": {
|
|
1656
|
-
type: "object",
|
|
1657
|
-
additionalProperties: false
|
|
1658
|
-
},
|
|
1659
1974
|
OutputConfig: {
|
|
1660
1975
|
type: "object",
|
|
1661
1976
|
properties: {
|
|
@@ -1686,6 +2001,10 @@ var init_config_schema = __esm({
|
|
|
1686
2001
|
PrCommentOutput: {
|
|
1687
2002
|
type: "object",
|
|
1688
2003
|
properties: {
|
|
2004
|
+
enabled: {
|
|
2005
|
+
type: "boolean",
|
|
2006
|
+
description: "Whether PR comments are enabled"
|
|
2007
|
+
},
|
|
1689
2008
|
format: {
|
|
1690
2009
|
$ref: "#/definitions/ConfigOutputFormat",
|
|
1691
2010
|
description: "Format of the output"
|
|
@@ -2023,6 +2342,71 @@ var init_config_schema = __esm({
|
|
|
2023
2342
|
patternProperties: {
|
|
2024
2343
|
"^x-": {}
|
|
2025
2344
|
}
|
|
2345
|
+
},
|
|
2346
|
+
WorkspaceConfig: {
|
|
2347
|
+
type: "object",
|
|
2348
|
+
properties: {
|
|
2349
|
+
enabled: {
|
|
2350
|
+
type: "boolean",
|
|
2351
|
+
description: "Enable workspace isolation (default: true when config present)"
|
|
2352
|
+
},
|
|
2353
|
+
base_path: {
|
|
2354
|
+
type: "string",
|
|
2355
|
+
description: "Base path for workspaces (default: /tmp/visor-workspaces)"
|
|
2356
|
+
},
|
|
2357
|
+
cleanup_on_exit: {
|
|
2358
|
+
type: "boolean",
|
|
2359
|
+
description: "Clean up workspace on exit (default: true)"
|
|
2360
|
+
}
|
|
2361
|
+
},
|
|
2362
|
+
additionalProperties: false,
|
|
2363
|
+
description: "Workspace isolation configuration",
|
|
2364
|
+
patternProperties: {
|
|
2365
|
+
"^x-": {}
|
|
2366
|
+
}
|
|
2367
|
+
},
|
|
2368
|
+
SlackConfig: {
|
|
2369
|
+
type: "object",
|
|
2370
|
+
properties: {
|
|
2371
|
+
version: {
|
|
2372
|
+
type: "string",
|
|
2373
|
+
description: "Slack API version"
|
|
2374
|
+
},
|
|
2375
|
+
mentions: {
|
|
2376
|
+
type: "string",
|
|
2377
|
+
description: "Mention handling: 'all', 'direct', etc."
|
|
2378
|
+
},
|
|
2379
|
+
threads: {
|
|
2380
|
+
type: "string",
|
|
2381
|
+
description: "Thread handling: 'required', 'optional', etc."
|
|
2382
|
+
},
|
|
2383
|
+
show_raw_output: {
|
|
2384
|
+
type: "boolean",
|
|
2385
|
+
description: "Show raw output in Slack responses"
|
|
2386
|
+
},
|
|
2387
|
+
telemetry: {
|
|
2388
|
+
$ref: "#/definitions/SlackTelemetryConfig",
|
|
2389
|
+
description: "Append telemetry identifiers to Slack replies."
|
|
2390
|
+
}
|
|
2391
|
+
},
|
|
2392
|
+
additionalProperties: false,
|
|
2393
|
+
description: "Slack configuration",
|
|
2394
|
+
patternProperties: {
|
|
2395
|
+
"^x-": {}
|
|
2396
|
+
}
|
|
2397
|
+
},
|
|
2398
|
+
SlackTelemetryConfig: {
|
|
2399
|
+
type: "object",
|
|
2400
|
+
properties: {
|
|
2401
|
+
enabled: {
|
|
2402
|
+
type: "boolean",
|
|
2403
|
+
description: "Enable telemetry ID suffix in Slack messages"
|
|
2404
|
+
}
|
|
2405
|
+
},
|
|
2406
|
+
additionalProperties: false,
|
|
2407
|
+
patternProperties: {
|
|
2408
|
+
"^x-": {}
|
|
2409
|
+
}
|
|
2026
2410
|
}
|
|
2027
2411
|
}
|
|
2028
2412
|
};
|
|
@@ -2048,6 +2432,7 @@ var init_config = __esm({
|
|
|
2048
2432
|
init_logger();
|
|
2049
2433
|
init_config_loader();
|
|
2050
2434
|
init_config_merger();
|
|
2435
|
+
init_sandbox();
|
|
2051
2436
|
VALID_EVENT_TRIGGERS = [
|
|
2052
2437
|
"pr_opened",
|
|
2053
2438
|
"pr_updated",
|
|
@@ -2073,7 +2458,8 @@ var init_config = __esm({
|
|
|
2073
2458
|
"log",
|
|
2074
2459
|
"github",
|
|
2075
2460
|
"human-input",
|
|
2076
|
-
"workflow"
|
|
2461
|
+
"workflow",
|
|
2462
|
+
"git-checkout"
|
|
2077
2463
|
];
|
|
2078
2464
|
validEventTriggers = [...VALID_EVENT_TRIGGERS];
|
|
2079
2465
|
validOutputFormats = ["table", "json", "markdown", "sarif"];
|
|
@@ -2371,7 +2757,7 @@ var init_config = __esm({
|
|
|
2371
2757
|
* When a workflow YAML is run standalone, register the workflow and use its tests as checks
|
|
2372
2758
|
*/
|
|
2373
2759
|
async convertWorkflowToConfig(workflowData, _basePath) {
|
|
2374
|
-
const { WorkflowRegistry } = await import("./workflow-registry-
|
|
2760
|
+
const { WorkflowRegistry } = await import("./workflow-registry-R6KSACFR.mjs");
|
|
2375
2761
|
const registry = WorkflowRegistry.getInstance();
|
|
2376
2762
|
const workflowId = workflowData.id;
|
|
2377
2763
|
logger.info(`Detected standalone workflow file: ${workflowId}`);
|
|
@@ -2385,14 +2771,24 @@ var init_config = __esm({
|
|
|
2385
2771
|
${errors}`);
|
|
2386
2772
|
}
|
|
2387
2773
|
logger.info(`Registered workflow '${workflowId}' for standalone execution`);
|
|
2774
|
+
const workflowSteps = workflowData.steps || {};
|
|
2388
2775
|
const visorConfig = {
|
|
2389
2776
|
version: "1.0",
|
|
2390
|
-
steps:
|
|
2391
|
-
checks:
|
|
2392
|
-
|
|
2777
|
+
steps: workflowSteps,
|
|
2778
|
+
checks: workflowSteps,
|
|
2779
|
+
tests
|
|
2780
|
+
// Preserve test harness config (may be empty if stripped by test runner)
|
|
2393
2781
|
};
|
|
2394
|
-
|
|
2395
|
-
|
|
2782
|
+
if (workflowData.outputs) {
|
|
2783
|
+
visorConfig.outputs = workflowData.outputs;
|
|
2784
|
+
}
|
|
2785
|
+
if (workflowData.inputs) {
|
|
2786
|
+
visorConfig.inputs = workflowData.inputs;
|
|
2787
|
+
}
|
|
2788
|
+
logger.debug(
|
|
2789
|
+
`Standalone workflow config has ${Object.keys(workflowSteps).length} workflow steps as checks`
|
|
2790
|
+
);
|
|
2791
|
+
logger.debug(`Workflow step names: ${Object.keys(workflowSteps).join(", ")}`);
|
|
2396
2792
|
logger.debug(`Config keys after conversion: ${Object.keys(visorConfig).join(", ")}`);
|
|
2397
2793
|
return visorConfig;
|
|
2398
2794
|
}
|
|
@@ -2403,7 +2799,7 @@ ${errors}`);
|
|
|
2403
2799
|
if (!config.imports || config.imports.length === 0) {
|
|
2404
2800
|
return;
|
|
2405
2801
|
}
|
|
2406
|
-
const { WorkflowRegistry } = await import("./workflow-registry-
|
|
2802
|
+
const { WorkflowRegistry } = await import("./workflow-registry-R6KSACFR.mjs");
|
|
2407
2803
|
const registry = WorkflowRegistry.getInstance();
|
|
2408
2804
|
for (const source of config.imports) {
|
|
2409
2805
|
const results = await registry.import(source, { basePath, validate: true });
|
|
@@ -2743,29 +3139,31 @@ ${errors}`);
|
|
|
2743
3139
|
}
|
|
2744
3140
|
}
|
|
2745
3141
|
if (checkConfig.reuse_ai_session !== void 0) {
|
|
2746
|
-
const
|
|
2747
|
-
const
|
|
3142
|
+
const reuseValue = checkConfig.reuse_ai_session;
|
|
3143
|
+
const isString = typeof reuseValue === "string";
|
|
3144
|
+
const isBoolean = typeof reuseValue === "boolean";
|
|
3145
|
+
const isSelf = reuseValue === "self";
|
|
2748
3146
|
if (!isString && !isBoolean) {
|
|
2749
3147
|
errors.push({
|
|
2750
3148
|
field: `checks.${checkName}.reuse_ai_session`,
|
|
2751
3149
|
message: `Invalid reuse_ai_session value for "${checkName}": must be string (check name) or boolean`,
|
|
2752
|
-
value:
|
|
3150
|
+
value: reuseValue
|
|
2753
3151
|
});
|
|
2754
|
-
} else if (isString) {
|
|
2755
|
-
const targetCheckName =
|
|
3152
|
+
} else if (isString && !isSelf) {
|
|
3153
|
+
const targetCheckName = reuseValue;
|
|
2756
3154
|
if (!config?.checks || !config.checks[targetCheckName]) {
|
|
2757
3155
|
errors.push({
|
|
2758
3156
|
field: `checks.${checkName}.reuse_ai_session`,
|
|
2759
3157
|
message: `Check "${checkName}" references non-existent check "${targetCheckName}" for session reuse`,
|
|
2760
|
-
value:
|
|
3158
|
+
value: reuseValue
|
|
2761
3159
|
});
|
|
2762
3160
|
}
|
|
2763
|
-
} else if (
|
|
3161
|
+
} else if (reuseValue === true) {
|
|
2764
3162
|
if (!checkConfig.depends_on || !Array.isArray(checkConfig.depends_on) || checkConfig.depends_on.length === 0) {
|
|
2765
3163
|
errors.push({
|
|
2766
3164
|
field: `checks.${checkName}.reuse_ai_session`,
|
|
2767
3165
|
message: `Check "${checkName}" has reuse_ai_session=true but missing or empty depends_on. Session reuse requires dependency on another check.`,
|
|
2768
|
-
value:
|
|
3166
|
+
value: reuseValue
|
|
2769
3167
|
});
|
|
2770
3168
|
}
|
|
2771
3169
|
}
|
|
@@ -2821,6 +3219,33 @@ ${errors}`);
|
|
|
2821
3219
|
});
|
|
2822
3220
|
}
|
|
2823
3221
|
}
|
|
3222
|
+
try {
|
|
3223
|
+
const transformJs = checkConfig.transform_js;
|
|
3224
|
+
if (typeof transformJs === "string" && transformJs.trim().length > 0) {
|
|
3225
|
+
const result = validateJsSyntax(transformJs);
|
|
3226
|
+
if (!result.valid) {
|
|
3227
|
+
errors.push({
|
|
3228
|
+
field: `checks.${checkName}.transform_js`,
|
|
3229
|
+
message: `JavaScript syntax error in "${checkName}" transform_js: ${result.error}`,
|
|
3230
|
+
value: transformJs.slice(0, 100) + (transformJs.length > 100 ? "..." : "")
|
|
3231
|
+
});
|
|
3232
|
+
}
|
|
3233
|
+
}
|
|
3234
|
+
if (checkConfig.type === "script") {
|
|
3235
|
+
const content = checkConfig.content;
|
|
3236
|
+
if (typeof content === "string" && content.trim().length > 0) {
|
|
3237
|
+
const result = validateJsSyntax(content);
|
|
3238
|
+
if (!result.valid) {
|
|
3239
|
+
errors.push({
|
|
3240
|
+
field: `checks.${checkName}.content`,
|
|
3241
|
+
message: `JavaScript syntax error in "${checkName}" script: ${result.error}`,
|
|
3242
|
+
value: content.slice(0, 100) + (content.length > 100 ? "..." : "")
|
|
3243
|
+
});
|
|
3244
|
+
}
|
|
3245
|
+
}
|
|
3246
|
+
}
|
|
3247
|
+
} catch {
|
|
3248
|
+
}
|
|
2824
3249
|
}
|
|
2825
3250
|
/**
|
|
2826
3251
|
* Validate MCP servers object shape and values (basic shape only)
|
|
@@ -2923,6 +3348,9 @@ ${errors}`);
|
|
|
2923
3348
|
const addl = e.params && e.params.additionalProperty || "unknown";
|
|
2924
3349
|
const fullField = pathStr ? `${pathStr}.${addl}` : addl;
|
|
2925
3350
|
const topLevel = !pathStr;
|
|
3351
|
+
if (topLevel && (addl === "tests" || addl === "slack")) {
|
|
3352
|
+
continue;
|
|
3353
|
+
}
|
|
2926
3354
|
warnings.push({
|
|
2927
3355
|
field: fullField || "config",
|
|
2928
3356
|
message: topLevel ? `Unknown top-level key '${addl}' will be ignored.` : `Unknown key '${addl}' will be ignored`
|
|
@@ -3125,4 +3553,4 @@ export {
|
|
|
3125
3553
|
config_exports,
|
|
3126
3554
|
init_config
|
|
3127
3555
|
};
|
|
3128
|
-
//# sourceMappingURL=chunk-
|
|
3556
|
+
//# sourceMappingURL=chunk-QY2XYPEV.mjs.map
|