@probelabs/visor 0.1.187 → 0.1.188-ee
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/{140.index.js → 102.index.js} +3 -3
- package/dist/{85.index.js → 663.index.js} +15 -15
- package/dist/{142.index.js → 736.index.js} +36 -36
- package/dist/{676.index.js → 840.index.js} +12 -12
- package/dist/{223.index.js → 961.index.js} +16 -16
- package/dist/action-cli-bridge.d.ts.map +1 -1
- package/dist/agent-protocol/a2a-frontend.d.ts.map +1 -1
- package/dist/agent-protocol/index.d.ts.map +1 -1
- package/dist/agent-protocol/push-notification-manager.d.ts.map +1 -1
- package/dist/agent-protocol/state-transitions.d.ts.map +1 -1
- package/dist/agent-protocol/task-evaluator.d.ts.map +1 -1
- package/dist/agent-protocol/task-live-update-slack.d.ts.map +1 -1
- package/dist/agent-protocol/task-live-update-teams.d.ts.map +1 -1
- package/dist/agent-protocol/task-live-update-telegram.d.ts.map +1 -1
- package/dist/agent-protocol/task-live-updates.d.ts.map +1 -1
- package/dist/agent-protocol/task-progress-tool.d.ts.map +1 -1
- package/dist/agent-protocol/task-queue.d.ts.map +1 -1
- package/dist/agent-protocol/task-store.d.ts.map +1 -1
- package/dist/agent-protocol/task-stream-manager.d.ts.map +1 -1
- package/dist/agent-protocol/task-trace-resolution.d.ts.map +1 -1
- package/dist/agent-protocol/tasks-cli-handler.d.ts.map +1 -1
- package/dist/agent-protocol/tasks-tui.d.ts.map +1 -1
- package/dist/agent-protocol/trace-serializer.d.ts.map +1 -1
- package/dist/agent-protocol/track-execution.d.ts.map +1 -1
- package/dist/agent-protocol/types.d.ts.map +1 -1
- package/dist/ai-review-service.d.ts.map +1 -1
- package/dist/check-execution-engine.d.ts.map +1 -1
- package/dist/cli-main.d.ts.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/commands.d.ts.map +1 -1
- package/dist/config/cli-handler.d.ts.map +1 -1
- package/dist/config/config-reloader.d.ts.map +1 -1
- package/dist/config/config-snapshot-store.d.ts.map +1 -1
- package/dist/config/config-watcher.d.ts.map +1 -1
- package/dist/config/types.d.ts.map +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/cron-scheduler.d.ts.map +1 -1
- package/dist/debug-visualizer/debug-span-exporter.d.ts.map +1 -1
- package/dist/debug-visualizer/trace-reader.d.ts.map +1 -1
- package/dist/debug-visualizer/ws-server.d.ts.map +1 -1
- package/dist/dependency-resolver.d.ts.map +1 -1
- package/dist/email/adapter.d.ts.map +1 -1
- package/dist/email/client.d.ts.map +1 -1
- package/dist/email/markdown.d.ts.map +1 -1
- package/dist/email/polling-runner.d.ts.map +1 -1
- package/dist/engine/on-finish/orchestrator.d.ts.map +1 -1
- package/dist/engine/on-finish/utils.d.ts.map +1 -1
- package/dist/enterprise/license/validator.d.ts +39 -0
- package/dist/enterprise/license/validator.d.ts.map +1 -0
- package/dist/enterprise/loader.d.ts +25 -0
- package/dist/enterprise/loader.d.ts.map +1 -0
- package/dist/enterprise/policy/opa-compiler.d.ts +37 -0
- package/dist/enterprise/policy/opa-compiler.d.ts.map +1 -0
- package/dist/enterprise/policy/opa-http-evaluator.d.ts +36 -0
- package/dist/enterprise/policy/opa-http-evaluator.d.ts.map +1 -0
- package/dist/enterprise/policy/opa-policy-engine.d.ts +48 -0
- package/dist/enterprise/policy/opa-policy-engine.d.ts.map +1 -0
- package/dist/enterprise/policy/opa-wasm-evaluator.d.ts +34 -0
- package/dist/enterprise/policy/opa-wasm-evaluator.d.ts.map +1 -0
- package/dist/enterprise/policy/policy-input-builder.d.ts +122 -0
- package/dist/enterprise/policy/policy-input-builder.d.ts.map +1 -0
- package/dist/enterprise/scheduler/knex-store.d.ts +47 -0
- package/dist/enterprise/scheduler/knex-store.d.ts.map +1 -0
- package/dist/event-bus/event-bus.d.ts.map +1 -1
- package/dist/event-bus/types.d.ts.map +1 -1
- package/dist/event-mapper.d.ts.map +1 -1
- package/dist/failure-condition-evaluator.d.ts.map +1 -1
- package/dist/footer.d.ts.map +1 -1
- package/dist/frontends/email-frontend.d.ts.map +1 -1
- package/dist/frontends/github-frontend.d.ts.map +1 -1
- package/dist/frontends/host.d.ts.map +1 -1
- package/dist/frontends/ndjson-sink.d.ts.map +1 -1
- package/dist/frontends/slack-frontend.d.ts.map +1 -1
- package/dist/frontends/teams-frontend.d.ts.map +1 -1
- package/dist/frontends/telegram-frontend.d.ts.map +1 -1
- package/dist/frontends/whatsapp-frontend.d.ts.map +1 -1
- package/dist/generated/config-schema.d.ts.map +1 -1
- package/dist/git-repository-analyzer.d.ts.map +1 -1
- package/dist/github-auth.d.ts.map +1 -1
- package/dist/github-check-service.d.ts.map +1 -1
- package/dist/github-comments.d.ts.map +1 -1
- package/dist/github-reactions.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9989 -8155
- package/dist/issue-filter.d.ts.map +1 -1
- package/dist/liquid-extensions.d.ts.map +1 -1
- package/dist/logger.d.ts.map +1 -1
- package/dist/mcp-job-manager.d.ts.map +1 -1
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/memory-store.d.ts.map +1 -1
- package/dist/output-formatters.d.ts.map +1 -1
- package/dist/policy/default-engine.d.ts.map +1 -1
- package/dist/policy/index.d.ts.map +1 -1
- package/dist/policy/policy-check-command.d.ts.map +1 -1
- package/dist/policy/types.d.ts.map +1 -1
- package/dist/pr-analyzer.d.ts.map +1 -1
- package/dist/pr-detector.d.ts.map +1 -1
- package/dist/providers/a2a-check-provider.d.ts.map +1 -1
- package/dist/providers/ai-check-provider.d.ts.map +1 -1
- package/dist/providers/api-tool-executor.d.ts.map +1 -1
- package/dist/providers/check-provider-registry.d.ts.map +1 -1
- package/dist/providers/check-provider.interface.d.ts.map +1 -1
- package/dist/providers/claude-code-check-provider.d.ts.map +1 -1
- package/dist/providers/claude-code-types.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.map +1 -1
- package/dist/providers/github-ops-provider.d.ts.map +1 -1
- package/dist/providers/http-check-provider.d.ts.map +1 -1
- package/dist/providers/http-client-provider.d.ts.map +1 -1
- package/dist/providers/http-input-provider.d.ts.map +1 -1
- package/dist/providers/human-input-check-provider.d.ts.map +1 -1
- package/dist/providers/index.d.ts.map +1 -1
- package/dist/providers/log-check-provider.d.ts.map +1 -1
- package/dist/providers/mcp-check-provider.d.ts.map +1 -1
- package/dist/providers/mcp-custom-sse-server.d.ts.map +1 -1
- package/dist/providers/mcp-tools.d.ts.map +1 -1
- package/dist/providers/memory-check-provider.d.ts.map +1 -1
- package/dist/providers/noop-check-provider.d.ts.map +1 -1
- package/dist/providers/script-check-provider.d.ts.map +1 -1
- package/dist/providers/utcp-check-provider.d.ts.map +1 -1
- package/dist/providers/workflow-check-provider.d.ts.map +1 -1
- package/dist/providers/workflow-tool-executor.d.ts.map +1 -1
- package/dist/reviewer.d.ts.map +1 -1
- package/dist/runners/config-reload-runtime.d.ts.map +1 -1
- package/dist/runners/graceful-restart.d.ts.map +1 -1
- package/dist/runners/mcp-server-runner.d.ts.map +1 -1
- package/dist/runners/process-cli-handler.d.ts.map +1 -1
- package/dist/runners/process-discovery.d.ts.map +1 -1
- package/dist/runners/runner-factory.d.ts.map +1 -1
- package/dist/runners/runner-host.d.ts.map +1 -1
- package/dist/runners/runner.d.ts.map +1 -1
- package/dist/runners/telemetry-init.d.ts.map +1 -1
- package/dist/sandbox/bubblewrap-sandbox.d.ts.map +1 -1
- package/dist/sandbox/cache-volume-manager.d.ts.map +1 -1
- package/dist/sandbox/check-runner.d.ts.map +1 -1
- package/dist/sandbox/compose-generator.d.ts.map +1 -1
- package/dist/sandbox/docker-compose-sandbox.d.ts.map +1 -1
- package/dist/sandbox/docker-image-sandbox.d.ts.map +1 -1
- package/dist/sandbox/env-filter.d.ts.map +1 -1
- package/dist/sandbox/index.d.ts.map +1 -1
- package/dist/sandbox/sandbox-manager.d.ts.map +1 -1
- package/dist/sandbox/sandbox-telemetry.d.ts.map +1 -1
- package/dist/sandbox/seatbelt-sandbox.d.ts.map +1 -1
- package/dist/sandbox/trace-ingester.d.ts.map +1 -1
- package/dist/sandbox/types.d.ts.map +1 -1
- package/dist/scheduler/cli-handler.d.ts.map +1 -1
- package/dist/scheduler/index.d.ts.map +1 -1
- package/dist/scheduler/message-trigger.d.ts.map +1 -1
- package/dist/scheduler/schedule-parser.d.ts.map +1 -1
- package/dist/scheduler/schedule-store.d.ts.map +1 -1
- package/dist/scheduler/schedule-tool.d.ts.map +1 -1
- package/dist/scheduler/scheduler.d.ts.map +1 -1
- package/dist/scheduler/store/index.d.ts.map +1 -1
- package/dist/scheduler/store/json-migrator.d.ts.map +1 -1
- package/dist/scheduler/store/sqlite-store.d.ts.map +1 -1
- package/dist/scheduler/store/types.d.ts.map +1 -1
- package/dist/sdk/a2a-frontend-7EGXSULE.mjs +1751 -0
- package/dist/sdk/a2a-frontend-7EGXSULE.mjs.map +1 -0
- package/dist/sdk/{a2a-frontend-XCQ4CQUF.mjs → a2a-frontend-QVKJ7MVW.mjs} +3 -3
- package/dist/sdk/check-provider-registry-IGNTM4MW.mjs +32 -0
- package/dist/sdk/{check-provider-registry-2D3MCWP3.mjs → check-provider-registry-QUUL6JI2.mjs} +6 -6
- package/dist/sdk/chunk-6DDNEBZ7.mjs +6119 -0
- package/dist/sdk/chunk-6DDNEBZ7.mjs.map +1 -0
- package/dist/sdk/{chunk-B2LQT6QU.mjs → chunk-6LQEODDA.mjs} +2 -2
- package/dist/sdk/chunk-6LQEODDA.mjs.map +1 -0
- package/dist/sdk/{chunk-S3GSZRYC.mjs → chunk-7XKHFRPN.mjs} +2 -2
- package/dist/sdk/{chunk-VS3JE2DL.mjs → chunk-BBLBZVWC.mjs} +3 -3
- package/dist/sdk/chunk-D6O5SCPC.mjs +621 -0
- package/dist/sdk/chunk-D6O5SCPC.mjs.map +1 -0
- package/dist/sdk/chunk-H2ZWNJJO.mjs +204 -0
- package/dist/sdk/chunk-H2ZWNJJO.mjs.map +1 -0
- package/dist/sdk/chunk-HMVD3AEC.mjs +47064 -0
- package/dist/sdk/chunk-HMVD3AEC.mjs.map +1 -0
- package/dist/sdk/{chunk-TGQBEM3Y.mjs → chunk-HQCCT6WP.mjs} +203 -203
- package/dist/sdk/chunk-HQCCT6WP.mjs.map +1 -0
- package/dist/sdk/chunk-IY5PQ5EN.mjs +1724 -0
- package/dist/sdk/chunk-IY5PQ5EN.mjs.map +1 -0
- package/dist/sdk/chunk-PDQTEBOJ.mjs +213 -0
- package/dist/sdk/chunk-PDQTEBOJ.mjs.map +1 -0
- package/dist/sdk/chunk-PUHU6UY6.mjs +391 -0
- package/dist/sdk/chunk-PUHU6UY6.mjs.map +1 -0
- package/dist/sdk/chunk-PZADRRLX.mjs +739 -0
- package/dist/sdk/chunk-PZADRRLX.mjs.map +1 -0
- package/dist/sdk/{chunk-YETG675X.mjs → chunk-QLT42TX7.mjs} +2 -2
- package/dist/sdk/chunk-RQDLVMER.mjs +1507 -0
- package/dist/sdk/chunk-RQDLVMER.mjs.map +1 -0
- package/dist/sdk/chunk-TSX3YS3F.mjs +825 -0
- package/dist/sdk/chunk-TSX3YS3F.mjs.map +1 -0
- package/dist/sdk/chunk-WZQMTD7W.mjs +33 -0
- package/dist/sdk/chunk-WZQMTD7W.mjs.map +1 -0
- package/dist/sdk/chunk-XXAEN5KU.mjs +197 -0
- package/dist/sdk/chunk-XXAEN5KU.mjs.map +1 -0
- package/dist/sdk/chunk-ZCBVXBKG.mjs +1150 -0
- package/dist/sdk/chunk-ZCBVXBKG.mjs.map +1 -0
- package/dist/sdk/config-BI5ZXG6D.mjs +16 -0
- package/dist/sdk/dist-NERCHNRR.mjs +7955 -0
- package/dist/sdk/dist-NERCHNRR.mjs.map +1 -0
- package/dist/sdk/{dist-VBYEFQ6T.mjs → dist-YLO6HUFD.mjs} +311 -85
- package/dist/sdk/dist-YLO6HUFD.mjs.map +1 -0
- package/dist/sdk/{email-frontend-AE5TYWNC.mjs → email-frontend-6O454VL5.mjs} +2 -2
- package/dist/sdk/email-frontend-JE7H3LBC.mjs +701 -0
- package/dist/sdk/email-frontend-JE7H3LBC.mjs.map +1 -0
- package/dist/sdk/{failure-condition-evaluator-66PWLV3D.mjs → failure-condition-evaluator-7WHZUYDC.mjs} +4 -4
- package/dist/sdk/failure-condition-evaluator-USY3ISVA.mjs +18 -0
- package/dist/sdk/{github-frontend-BBFKCY4M.mjs → github-frontend-2T5PWYD5.mjs} +4 -4
- package/dist/sdk/github-frontend-RGK4DPRI.mjs +1394 -0
- package/dist/sdk/github-frontend-RGK4DPRI.mjs.map +1 -0
- package/dist/sdk/{host-UQRZDLT7.mjs → host-UZESVA6Z.mjs} +4 -4
- package/dist/sdk/host-YWXWROIE.mjs +87 -0
- package/dist/sdk/host-YWXWROIE.mjs.map +1 -0
- package/dist/sdk/knex-store-KCMFAMH5.mjs +527 -0
- package/dist/sdk/knex-store-KCMFAMH5.mjs.map +1 -0
- package/dist/sdk/loader-35YWX5UQ.mjs +89 -0
- package/dist/sdk/loader-35YWX5UQ.mjs.map +1 -0
- package/dist/sdk/opa-policy-engine-FY5D45YS.mjs +655 -0
- package/dist/sdk/opa-policy-engine-FY5D45YS.mjs.map +1 -0
- package/dist/sdk/{routing-Q647KUMO.mjs → routing-PHHRW2C7.mjs} +5 -5
- package/dist/sdk/routing-TYXT3STD.mjs +26 -0
- package/dist/sdk/schedule-tool-ITD445EO.mjs +38 -0
- package/dist/sdk/schedule-tool-ITD445EO.mjs.map +1 -0
- package/dist/sdk/{schedule-tool-WMGSM6IT.mjs → schedule-tool-ODMIDBMT.mjs} +6 -6
- package/dist/sdk/schedule-tool-ODMIDBMT.mjs.map +1 -0
- package/dist/sdk/schedule-tool-handler-5WPHFBOG.mjs +42 -0
- package/dist/sdk/schedule-tool-handler-5WPHFBOG.mjs.map +1 -0
- package/dist/sdk/{schedule-tool-handler-JMDHCGZ2.mjs → schedule-tool-handler-IQSKBFLS.mjs} +6 -6
- package/dist/sdk/schedule-tool-handler-IQSKBFLS.mjs.map +1 -0
- package/dist/sdk/sdk.js +2290 -916
- package/dist/sdk/sdk.js.map +1 -1
- package/dist/sdk/sdk.mjs +5 -5
- package/dist/sdk/session-registry-6PV6SGEJ.mjs +10 -0
- package/dist/sdk/session-registry-6PV6SGEJ.mjs.map +1 -0
- package/dist/sdk/slack-frontend-H7PX5GE7.mjs +985 -0
- package/dist/sdk/slack-frontend-H7PX5GE7.mjs.map +1 -0
- package/dist/sdk/task-evaluator-H3BXC7SE.mjs +263 -0
- package/dist/sdk/task-evaluator-H3BXC7SE.mjs.map +1 -0
- package/dist/sdk/teams-frontend-HCT4MTY4.mjs +342 -0
- package/dist/sdk/teams-frontend-HCT4MTY4.mjs.map +1 -0
- package/dist/sdk/telegram-frontend-YQRYDKPN.mjs +586 -0
- package/dist/sdk/telegram-frontend-YQRYDKPN.mjs.map +1 -0
- package/dist/sdk/{trace-helpers-AIUGQLK5.mjs → trace-helpers-AM2QE5UZ.mjs} +3 -3
- package/dist/sdk/trace-helpers-AM2QE5UZ.mjs.map +1 -0
- package/dist/sdk/trace-helpers-OMF4C24T.mjs +31 -0
- package/dist/sdk/trace-helpers-OMF4C24T.mjs.map +1 -0
- package/dist/sdk/trace-reader-OVE4DL2D.mjs +270 -0
- package/dist/sdk/trace-reader-OVE4DL2D.mjs.map +1 -0
- package/dist/sdk/trace-serializer-EBHTHZYT.mjs +24 -0
- package/dist/sdk/trace-serializer-EBHTHZYT.mjs.map +1 -0
- package/dist/sdk/track-execution-BULXL2XD.mjs +249 -0
- package/dist/sdk/track-execution-BULXL2XD.mjs.map +1 -0
- package/dist/sdk/{track-execution-CFRZXMEC.mjs → track-execution-VJJVJH6K.mjs} +2 -2
- package/dist/sdk/utcp-check-provider-Q4PD5EP2.mjs +16 -0
- package/dist/sdk/utcp-check-provider-Q4PD5EP2.mjs.map +1 -0
- package/dist/sdk/validator-XTZJZZJH.mjs +134 -0
- package/dist/sdk/validator-XTZJZZJH.mjs.map +1 -0
- package/dist/sdk/whatsapp-frontend-72XEIUIR.mjs +438 -0
- package/dist/sdk/whatsapp-frontend-72XEIUIR.mjs.map +1 -0
- package/dist/sdk/workflow-check-provider-OVZDCL4E.mjs +32 -0
- package/dist/sdk/workflow-check-provider-OVZDCL4E.mjs.map +1 -0
- package/dist/sdk/{workflow-check-provider-G7A67EPP.mjs → workflow-check-provider-XOWQYWTC.mjs} +6 -6
- package/dist/sdk/workflow-check-provider-XOWQYWTC.mjs.map +1 -0
- package/dist/sdk.d.ts.map +1 -1
- package/dist/session-registry.d.ts.map +1 -1
- package/dist/slack/adapter.d.ts.map +1 -1
- package/dist/slack/cache-prewarmer.d.ts.map +1 -1
- package/dist/slack/client.d.ts.map +1 -1
- package/dist/slack/markdown.d.ts.map +1 -1
- package/dist/slack/prompt-state.d.ts.map +1 -1
- package/dist/slack/rate-limiter.d.ts.map +1 -1
- package/dist/slack/schedule-tool-handler.d.ts.map +1 -1
- package/dist/slack/signature.d.ts.map +1 -1
- package/dist/slack/slack-output-adapter.d.ts.map +1 -1
- package/dist/slack/socket-runner.d.ts +1 -0
- package/dist/slack/socket-runner.d.ts.map +1 -1
- package/dist/slack/thread-cache.d.ts.map +1 -1
- package/dist/snapshot-store.d.ts.map +1 -1
- package/dist/state-machine/context/build-engine-context.d.ts.map +1 -1
- package/dist/state-machine/context/workflow-inputs.d.ts.map +1 -1
- package/dist/state-machine/dispatch/debounce-manager.d.ts.map +1 -1
- package/dist/state-machine/dispatch/dependency-gating.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/history-snapshot.d.ts.map +1 -1
- package/dist/state-machine/dispatch/on-init-handlers.d.ts.map +1 -1
- package/dist/state-machine/dispatch/policy-gate.d.ts.map +1 -1
- package/dist/state-machine/dispatch/renderer-schema.d.ts.map +1 -1
- package/dist/state-machine/dispatch/sandbox-routing.d.ts.map +1 -1
- 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/execution/summary.d.ts.map +1 -1
- package/dist/state-machine/runner.d.ts.map +1 -1
- package/dist/state-machine/states/check-running.d.ts.map +1 -1
- package/dist/state-machine/states/completed.d.ts.map +1 -1
- package/dist/state-machine/states/error.d.ts.map +1 -1
- package/dist/state-machine/states/init.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.map +1 -1
- package/dist/teams/adapter.d.ts.map +1 -1
- package/dist/teams/client.d.ts.map +1 -1
- package/dist/teams/markdown.d.ts.map +1 -1
- package/dist/teams/webhook-runner.d.ts.map +1 -1
- package/dist/telegram/adapter.d.ts.map +1 -1
- package/dist/telegram/client.d.ts.map +1 -1
- package/dist/telegram/markdown.d.ts.map +1 -1
- package/dist/telegram/polling-runner.d.ts.map +1 -1
- package/dist/telemetry/fallback-ndjson.d.ts.map +1 -1
- package/dist/telemetry/file-span-exporter.d.ts.map +1 -1
- package/dist/telemetry/lazy-otel.d.ts.map +1 -1
- package/dist/telemetry/metrics.d.ts.map +1 -1
- package/dist/telemetry/opentelemetry.d.ts.map +1 -1
- package/dist/telemetry/state-capture.d.ts.map +1 -1
- package/dist/telemetry/trace-helpers.d.ts.map +1 -1
- package/dist/telemetry/trace-report-exporter.d.ts.map +1 -1
- package/dist/test-runner/assertions.d.ts.map +1 -1
- package/dist/test-runner/conversation-sugar.d.ts.map +1 -1
- package/dist/test-runner/core/environment.d.ts.map +1 -1
- package/dist/test-runner/core/fixture.d.ts.map +1 -1
- package/dist/test-runner/core/flow-stage.d.ts.map +1 -1
- package/dist/test-runner/core/mocks.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.map +1 -1
- package/dist/test-runner/fixture-loader.d.ts.map +1 -1
- package/dist/test-runner/index.d.ts.map +1 -1
- package/dist/test-runner/llm-judge.d.ts.map +1 -1
- package/dist/test-runner/recorders/github-recorder.d.ts.map +1 -1
- package/dist/test-runner/recorders/global-recorder.d.ts.map +1 -1
- package/dist/test-runner/recorders/slack-recorder.d.ts.map +1 -1
- package/dist/test-runner/utils/selectors.d.ts.map +1 -1
- package/dist/test-runner/validator.d.ts.map +1 -1
- package/dist/tui/chat-runner.d.ts.map +1 -1
- package/dist/tui/chat-state.d.ts.map +1 -1
- package/dist/tui/chat-tui.d.ts.map +1 -1
- package/dist/tui/components/chat-box.d.ts.map +1 -1
- package/dist/tui/components/input-bar.d.ts.map +1 -1
- package/dist/tui/components/status-bar.d.ts.map +1 -1
- package/dist/tui/components/trace-viewer.d.ts.map +1 -1
- package/dist/tui/index.d.ts.map +1 -1
- package/dist/tui/tui-frontend.d.ts.map +1 -1
- package/dist/types/bot.d.ts.map +1 -1
- package/dist/types/cli.d.ts.map +1 -1
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/engine.d.ts.map +1 -1
- package/dist/types/execution.d.ts.map +1 -1
- package/dist/types/git-checkout.d.ts.map +1 -1
- package/dist/types/github.d.ts.map +1 -1
- package/dist/types/workflow.d.ts.map +1 -1
- package/dist/utils/author-permissions.d.ts.map +1 -1
- package/dist/utils/child-process-error-handler.d.ts.map +1 -1
- package/dist/utils/command-executor.d.ts.map +1 -1
- package/dist/utils/comment-metadata.d.ts.map +1 -1
- package/dist/utils/config-loader.d.ts.map +1 -1
- package/dist/utils/config-merger.d.ts.map +1 -1
- package/dist/utils/diff-processor.d.ts.map +1 -1
- package/dist/utils/env-exposure.d.ts.map +1 -1
- package/dist/utils/env-resolver.d.ts.map +1 -1
- package/dist/utils/fair-concurrency-limiter.d.ts.map +1 -1
- package/dist/utils/file-exclusion.d.ts.map +1 -1
- package/dist/utils/head-sha.d.ts.map +1 -1
- package/dist/utils/human-id.d.ts.map +1 -1
- package/dist/utils/instance-id.d.ts.map +1 -1
- package/dist/utils/interactive-prompt.d.ts.map +1 -1
- package/dist/utils/issue-normalizer.d.ts.map +1 -1
- package/dist/utils/json-text-extractor.d.ts.map +1 -1
- package/dist/utils/mermaid-telemetry.d.ts.map +1 -1
- package/dist/utils/oauth2-token-cache.d.ts.map +1 -1
- package/dist/utils/rate-limiter.d.ts.map +1 -1
- package/dist/utils/sandbox.d.ts.map +1 -1
- package/dist/utils/script-memory-ops.d.ts.map +1 -1
- package/dist/utils/script-tool-environment.d.ts.map +1 -1
- package/dist/utils/stdin-reader.d.ts.map +1 -1
- package/dist/utils/template-context.d.ts.map +1 -1
- package/dist/utils/tool-resolver.d.ts.map +1 -1
- package/dist/utils/toolkit-expander.d.ts.map +1 -1
- package/dist/utils/tracer-init.d.ts.map +1 -1
- package/dist/utils/ui-helpers.d.ts.map +1 -1
- package/dist/utils/user-facing-error.d.ts.map +1 -1
- package/dist/utils/workspace-manager.d.ts.map +1 -1
- package/dist/utils/worktree-cleanup.d.ts.map +1 -1
- package/dist/utils/worktree-manager.d.ts.map +1 -1
- package/dist/webhook-server.d.ts.map +1 -1
- package/dist/whatsapp/adapter.d.ts.map +1 -1
- package/dist/whatsapp/client.d.ts.map +1 -1
- package/dist/whatsapp/markdown.d.ts.map +1 -1
- package/dist/whatsapp/webhook-runner.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 +1 -1
- package/dist/output/traces/run-2026-08-20T13-50-06-218Z.ndjson +0 -3148
- package/dist/sdk/chunk-B2LQT6QU.mjs.map +0 -1
- package/dist/sdk/chunk-TGQBEM3Y.mjs.map +0 -1
- package/dist/sdk/dist-VBYEFQ6T.mjs.map +0 -1
- package/dist/traces/run-2026-08-20T13-50-06-218Z.ndjson +0 -3148
- /package/dist/sdk/{a2a-frontend-XCQ4CQUF.mjs.map → a2a-frontend-QVKJ7MVW.mjs.map} +0 -0
- /package/dist/sdk/{check-provider-registry-2D3MCWP3.mjs.map → check-provider-registry-IGNTM4MW.mjs.map} +0 -0
- /package/dist/sdk/{failure-condition-evaluator-66PWLV3D.mjs.map → check-provider-registry-QUUL6JI2.mjs.map} +0 -0
- /package/dist/sdk/{chunk-S3GSZRYC.mjs.map → chunk-7XKHFRPN.mjs.map} +0 -0
- /package/dist/sdk/{chunk-VS3JE2DL.mjs.map → chunk-BBLBZVWC.mjs.map} +0 -0
- /package/dist/sdk/{chunk-YETG675X.mjs.map → chunk-QLT42TX7.mjs.map} +0 -0
- /package/dist/sdk/{routing-Q647KUMO.mjs.map → config-BI5ZXG6D.mjs.map} +0 -0
- /package/dist/sdk/{email-frontend-AE5TYWNC.mjs.map → email-frontend-6O454VL5.mjs.map} +0 -0
- /package/dist/sdk/{schedule-tool-WMGSM6IT.mjs.map → failure-condition-evaluator-7WHZUYDC.mjs.map} +0 -0
- /package/dist/sdk/{schedule-tool-handler-JMDHCGZ2.mjs.map → failure-condition-evaluator-USY3ISVA.mjs.map} +0 -0
- /package/dist/sdk/{github-frontend-BBFKCY4M.mjs.map → github-frontend-2T5PWYD5.mjs.map} +0 -0
- /package/dist/sdk/{host-UQRZDLT7.mjs.map → host-UZESVA6Z.mjs.map} +0 -0
- /package/dist/sdk/{trace-helpers-AIUGQLK5.mjs.map → routing-PHHRW2C7.mjs.map} +0 -0
- /package/dist/sdk/{workflow-check-provider-G7A67EPP.mjs.map → routing-TYXT3STD.mjs.map} +0 -0
- /package/dist/sdk/{track-execution-CFRZXMEC.mjs.map → track-execution-VJJVJH6K.mjs.map} +0 -0
|
@@ -0,0 +1,739 @@
|
|
|
1
|
+
import {
|
|
2
|
+
addEvent,
|
|
3
|
+
fallback_ndjson_exports,
|
|
4
|
+
init_fallback_ndjson,
|
|
5
|
+
init_trace_helpers
|
|
6
|
+
} from "./chunk-ZCBVXBKG.mjs";
|
|
7
|
+
import {
|
|
8
|
+
addFailIfTriggered,
|
|
9
|
+
init_metrics
|
|
10
|
+
} from "./chunk-FWWLD555.mjs";
|
|
11
|
+
import {
|
|
12
|
+
createPermissionHelpers,
|
|
13
|
+
detectLocalMode,
|
|
14
|
+
init_author_permissions
|
|
15
|
+
} from "./chunk-25IC7KXZ.mjs";
|
|
16
|
+
import {
|
|
17
|
+
createSecureSandbox,
|
|
18
|
+
init_sandbox
|
|
19
|
+
} from "./chunk-LW3INISN.mjs";
|
|
20
|
+
import {
|
|
21
|
+
MemoryStore,
|
|
22
|
+
init_memory_store
|
|
23
|
+
} from "./chunk-4MHHELVZ.mjs";
|
|
24
|
+
import {
|
|
25
|
+
init_logger,
|
|
26
|
+
logger_exports
|
|
27
|
+
} from "./chunk-6E625R3C.mjs";
|
|
28
|
+
import {
|
|
29
|
+
__esm,
|
|
30
|
+
__export,
|
|
31
|
+
__toCommonJS
|
|
32
|
+
} from "./chunk-J7LXIPZS.mjs";
|
|
33
|
+
|
|
34
|
+
// src/failure-condition-evaluator.ts
|
|
35
|
+
var failure_condition_evaluator_exports = {};
|
|
36
|
+
__export(failure_condition_evaluator_exports, {
|
|
37
|
+
FailureConditionEvaluator: () => FailureConditionEvaluator
|
|
38
|
+
});
|
|
39
|
+
var FailureConditionEvaluator;
|
|
40
|
+
var init_failure_condition_evaluator = __esm({
|
|
41
|
+
"src/failure-condition-evaluator.ts"() {
|
|
42
|
+
init_trace_helpers();
|
|
43
|
+
init_metrics();
|
|
44
|
+
init_sandbox();
|
|
45
|
+
init_author_permissions();
|
|
46
|
+
init_memory_store();
|
|
47
|
+
FailureConditionEvaluator = class _FailureConditionEvaluator {
|
|
48
|
+
sandbox;
|
|
49
|
+
constructor() {
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Create a secure sandbox with whitelisted functions and globals
|
|
53
|
+
*/
|
|
54
|
+
createSecureSandbox() {
|
|
55
|
+
return createSecureSandbox();
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Evaluate simple fail_if condition
|
|
59
|
+
*/
|
|
60
|
+
async evaluateSimpleCondition(checkName, checkSchema, checkGroup, reviewSummary, expression, previousOutputs, authorAssociation) {
|
|
61
|
+
const context = this.buildEvaluationContext(
|
|
62
|
+
checkName,
|
|
63
|
+
checkSchema,
|
|
64
|
+
checkGroup,
|
|
65
|
+
reviewSummary,
|
|
66
|
+
previousOutputs,
|
|
67
|
+
authorAssociation
|
|
68
|
+
);
|
|
69
|
+
try {
|
|
70
|
+
try {
|
|
71
|
+
const isObj = context.output && typeof context.output === "object";
|
|
72
|
+
const keys = isObj ? Object.keys(context.output).join(",") : typeof context.output;
|
|
73
|
+
let errorVal = void 0;
|
|
74
|
+
if (isObj && context.output.error !== void 0)
|
|
75
|
+
errorVal = context.output.error;
|
|
76
|
+
(init_logger(), __toCommonJS(logger_exports)).logger.debug(
|
|
77
|
+
` fail_if: evaluating '${expression}' with output keys=${keys} error=${String(errorVal)}`
|
|
78
|
+
);
|
|
79
|
+
} catch {
|
|
80
|
+
}
|
|
81
|
+
const res = this.evaluateExpression(expression, context);
|
|
82
|
+
if (res === true) {
|
|
83
|
+
try {
|
|
84
|
+
addEvent("fail_if.triggered", {
|
|
85
|
+
check: checkName,
|
|
86
|
+
scope: "check",
|
|
87
|
+
name: `${checkName}_fail_if`,
|
|
88
|
+
expression,
|
|
89
|
+
severity: "error"
|
|
90
|
+
});
|
|
91
|
+
} catch {
|
|
92
|
+
}
|
|
93
|
+
try {
|
|
94
|
+
const { emitNdjsonSpanWithEvents } = (init_fallback_ndjson(), __toCommonJS(fallback_ndjson_exports));
|
|
95
|
+
emitNdjsonSpanWithEvents(
|
|
96
|
+
"visor.fail_if",
|
|
97
|
+
{ check: checkName, scope: "check", name: `${checkName}_fail_if` },
|
|
98
|
+
[
|
|
99
|
+
{
|
|
100
|
+
name: "fail_if.triggered",
|
|
101
|
+
attrs: {
|
|
102
|
+
check: checkName,
|
|
103
|
+
scope: "check",
|
|
104
|
+
name: `${checkName}_fail_if`,
|
|
105
|
+
expression,
|
|
106
|
+
severity: "error"
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
);
|
|
111
|
+
} catch {
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
return res;
|
|
115
|
+
} catch (error) {
|
|
116
|
+
console.warn(`Failed to evaluate fail_if expression: ${error}`);
|
|
117
|
+
return false;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Determine if the event is related to pull requests
|
|
122
|
+
*/
|
|
123
|
+
determineIfPullRequest(eventType) {
|
|
124
|
+
if (!eventType) return false;
|
|
125
|
+
const prEvents = ["pr_opened", "pr_updated", "pr_closed", "pull_request"];
|
|
126
|
+
return prEvents.includes(eventType) || eventType.startsWith("pr_");
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Determine if the event is related to issues
|
|
130
|
+
*/
|
|
131
|
+
determineIfIssue(eventType) {
|
|
132
|
+
if (!eventType) return false;
|
|
133
|
+
const issueEvents = ["issue_opened", "issue_comment", "issues"];
|
|
134
|
+
return issueEvents.includes(eventType) || eventType.startsWith("issue_");
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Evaluate if condition to determine whether a check should run
|
|
138
|
+
*/
|
|
139
|
+
async evaluateIfCondition(checkName, expression, contextData) {
|
|
140
|
+
const context = {
|
|
141
|
+
// Check metadata
|
|
142
|
+
checkName,
|
|
143
|
+
// Git context
|
|
144
|
+
branch: contextData?.branch || "unknown",
|
|
145
|
+
baseBranch: contextData?.baseBranch || "main",
|
|
146
|
+
filesChanged: contextData?.filesChanged || [],
|
|
147
|
+
filesCount: contextData?.filesChanged?.length || 0,
|
|
148
|
+
// GitHub event context
|
|
149
|
+
event: {
|
|
150
|
+
event_name: contextData?.event || "manual",
|
|
151
|
+
action: void 0,
|
|
152
|
+
// Would be populated from actual GitHub context
|
|
153
|
+
repository: void 0
|
|
154
|
+
// Would be populated from actual GitHub context
|
|
155
|
+
},
|
|
156
|
+
// Environment variables
|
|
157
|
+
env: contextData?.environment || {},
|
|
158
|
+
// Previous check results (unwrap output field like templates do)
|
|
159
|
+
outputs: contextData?.previousResults ? (() => {
|
|
160
|
+
const outputs = {};
|
|
161
|
+
for (const [checkName2, result] of contextData.previousResults) {
|
|
162
|
+
const summary = result;
|
|
163
|
+
outputs[checkName2] = summary.output !== void 0 ? summary.output : summary;
|
|
164
|
+
}
|
|
165
|
+
return outputs;
|
|
166
|
+
})() : {},
|
|
167
|
+
// Workflow inputs (for workflows)
|
|
168
|
+
inputs: contextData?.workflowInputs || {},
|
|
169
|
+
// Output property: use provided output for guarantee evaluation, or empty for if conditions
|
|
170
|
+
output: contextData?.output !== void 0 && contextData.output !== null && typeof contextData.output === "object" ? contextData.output : { issues: [] },
|
|
171
|
+
// Author association (used by permission helpers)
|
|
172
|
+
authorAssociation: contextData?.authorAssociation,
|
|
173
|
+
// Utility metadata
|
|
174
|
+
metadata: {
|
|
175
|
+
checkName,
|
|
176
|
+
schema: "",
|
|
177
|
+
group: "",
|
|
178
|
+
criticalIssues: 0,
|
|
179
|
+
errorIssues: 0,
|
|
180
|
+
warningIssues: 0,
|
|
181
|
+
infoIssues: 0,
|
|
182
|
+
totalIssues: 0,
|
|
183
|
+
hasChanges: (contextData?.filesChanged?.length || 0) > 0,
|
|
184
|
+
branch: contextData?.branch || "unknown",
|
|
185
|
+
event: contextData?.event || "manual"
|
|
186
|
+
},
|
|
187
|
+
// Conversation context (for TUI/CLI/Slack)
|
|
188
|
+
conversation: contextData?.conversation
|
|
189
|
+
};
|
|
190
|
+
try {
|
|
191
|
+
const res = this.evaluateExpression(expression, context);
|
|
192
|
+
try {
|
|
193
|
+
if (process.env.VISOR_DEBUG === "true") {
|
|
194
|
+
const outputKeys = Object.keys(context.outputs || {});
|
|
195
|
+
console.error(
|
|
196
|
+
`[if-eval] check=${checkName} expr="${expression}" result=${String(res)} outputKeys=[${outputKeys.join(",")}]`
|
|
197
|
+
);
|
|
198
|
+
}
|
|
199
|
+
} catch {
|
|
200
|
+
}
|
|
201
|
+
return res;
|
|
202
|
+
} catch (error) {
|
|
203
|
+
console.warn(`Failed to evaluate if expression for check '${checkName}': ${error}`);
|
|
204
|
+
return false;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Evaluate all failure conditions for a check result
|
|
209
|
+
*/
|
|
210
|
+
async evaluateConditions(checkName, checkSchema, checkGroup, reviewSummary, globalConditions, checkConditions, previousOutputs, authorAssociation) {
|
|
211
|
+
const context = this.buildEvaluationContext(
|
|
212
|
+
checkName,
|
|
213
|
+
checkSchema,
|
|
214
|
+
checkGroup,
|
|
215
|
+
reviewSummary,
|
|
216
|
+
previousOutputs,
|
|
217
|
+
authorAssociation
|
|
218
|
+
);
|
|
219
|
+
const results = [];
|
|
220
|
+
if (globalConditions) {
|
|
221
|
+
const globalResults = await this.evaluateConditionSet(globalConditions, context, "global");
|
|
222
|
+
results.push(...globalResults);
|
|
223
|
+
}
|
|
224
|
+
if (checkConditions) {
|
|
225
|
+
const checkResults = await this.evaluateConditionSet(checkConditions, context, "check");
|
|
226
|
+
const overriddenConditions = new Set(Object.keys(checkConditions));
|
|
227
|
+
const filteredResults = results.filter(
|
|
228
|
+
(result) => !overriddenConditions.has(result.conditionName)
|
|
229
|
+
);
|
|
230
|
+
results.length = 0;
|
|
231
|
+
results.push(...filteredResults, ...checkResults);
|
|
232
|
+
}
|
|
233
|
+
return results;
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* Evaluate a set of failure conditions
|
|
237
|
+
*/
|
|
238
|
+
async evaluateConditionSet(conditions, context, source) {
|
|
239
|
+
const results = [];
|
|
240
|
+
for (const [conditionName, condition] of Object.entries(conditions)) {
|
|
241
|
+
try {
|
|
242
|
+
addEvent("fail_if.evaluated", {
|
|
243
|
+
check: context.checkName,
|
|
244
|
+
scope: source,
|
|
245
|
+
name: conditionName,
|
|
246
|
+
expression: this.extractExpression(condition)
|
|
247
|
+
});
|
|
248
|
+
} catch {
|
|
249
|
+
}
|
|
250
|
+
try {
|
|
251
|
+
const { emitNdjsonSpanWithEvents } = (init_fallback_ndjson(), __toCommonJS(fallback_ndjson_exports));
|
|
252
|
+
emitNdjsonSpanWithEvents(
|
|
253
|
+
"visor.fail_if",
|
|
254
|
+
{ check: context.checkName || "unknown", scope: source, name: conditionName },
|
|
255
|
+
[
|
|
256
|
+
{
|
|
257
|
+
name: "fail_if.evaluated",
|
|
258
|
+
attrs: {
|
|
259
|
+
check: context.checkName,
|
|
260
|
+
scope: source,
|
|
261
|
+
name: conditionName,
|
|
262
|
+
expression: this.extractExpression(condition)
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
]
|
|
266
|
+
);
|
|
267
|
+
} catch {
|
|
268
|
+
}
|
|
269
|
+
try {
|
|
270
|
+
const result = await this.evaluateSingleCondition(conditionName, condition, context);
|
|
271
|
+
results.push(result);
|
|
272
|
+
if (result.failed) {
|
|
273
|
+
try {
|
|
274
|
+
addEvent("fail_if.triggered", {
|
|
275
|
+
check: context.checkName,
|
|
276
|
+
scope: source,
|
|
277
|
+
name: conditionName,
|
|
278
|
+
expression: result.expression,
|
|
279
|
+
severity: result.severity,
|
|
280
|
+
halt_execution: result.haltExecution
|
|
281
|
+
});
|
|
282
|
+
} catch {
|
|
283
|
+
}
|
|
284
|
+
try {
|
|
285
|
+
addFailIfTriggered(context.checkName || "unknown", source);
|
|
286
|
+
} catch {
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
} catch (error) {
|
|
290
|
+
results.push({
|
|
291
|
+
conditionName,
|
|
292
|
+
failed: false,
|
|
293
|
+
expression: this.extractExpression(condition),
|
|
294
|
+
severity: "error",
|
|
295
|
+
haltExecution: false,
|
|
296
|
+
error: `Failed to evaluate ${source} condition '${conditionName}': ${error instanceof Error ? error.message : String(error)}`
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
return results;
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Evaluate a single failure condition
|
|
304
|
+
*/
|
|
305
|
+
async evaluateSingleCondition(conditionName, condition, context) {
|
|
306
|
+
const expression = this.extractExpression(condition);
|
|
307
|
+
const config = this.extractConditionConfig(condition);
|
|
308
|
+
try {
|
|
309
|
+
const failed = this.evaluateExpression(expression, context);
|
|
310
|
+
return {
|
|
311
|
+
conditionName,
|
|
312
|
+
failed,
|
|
313
|
+
expression,
|
|
314
|
+
message: config.message,
|
|
315
|
+
severity: config.severity || "error",
|
|
316
|
+
haltExecution: config.halt_execution || false
|
|
317
|
+
};
|
|
318
|
+
} catch (error) {
|
|
319
|
+
throw new Error(
|
|
320
|
+
`Expression evaluation error: ${error instanceof Error ? error.message : String(error)}`
|
|
321
|
+
);
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* Secure expression evaluation using SandboxJS
|
|
326
|
+
* Supports the same GitHub Actions-style functions as the previous implementation
|
|
327
|
+
*/
|
|
328
|
+
evaluateExpression(condition, context) {
|
|
329
|
+
try {
|
|
330
|
+
const normalize = (expr) => {
|
|
331
|
+
const trimmed = expr.trim();
|
|
332
|
+
if (!/[\n;]/.test(trimmed)) return trimmed;
|
|
333
|
+
const parts = trimmed.split(/[\n;]+/).map((s) => s.trim()).filter((s) => s.length > 0 && !s.startsWith("//"));
|
|
334
|
+
if (parts.length === 0) return "true";
|
|
335
|
+
const lastRaw = parts.pop();
|
|
336
|
+
const last = lastRaw.replace(/^return\s+/i, "").trim();
|
|
337
|
+
if (parts.length === 0) return last;
|
|
338
|
+
return `(${parts.join(", ")}, ${last})`;
|
|
339
|
+
};
|
|
340
|
+
const contains = (searchString, searchValue) => String(searchString).toLowerCase().includes(String(searchValue).toLowerCase());
|
|
341
|
+
const startsWith = (searchString, searchValue) => String(searchString).toLowerCase().startsWith(String(searchValue).toLowerCase());
|
|
342
|
+
const endsWith = (searchString, searchValue) => String(searchString).toLowerCase().endsWith(String(searchValue).toLowerCase());
|
|
343
|
+
const length = (value) => {
|
|
344
|
+
if (typeof value === "string" || Array.isArray(value)) {
|
|
345
|
+
return value.length;
|
|
346
|
+
}
|
|
347
|
+
if (value && typeof value === "object") {
|
|
348
|
+
return Object.keys(value).length;
|
|
349
|
+
}
|
|
350
|
+
return 0;
|
|
351
|
+
};
|
|
352
|
+
const always = () => true;
|
|
353
|
+
const success = () => true;
|
|
354
|
+
const failure = () => false;
|
|
355
|
+
const log = (...args) => {
|
|
356
|
+
console.log("\u{1F50D} Debug:", ...args);
|
|
357
|
+
};
|
|
358
|
+
const hasIssue = (issues2, field, value) => {
|
|
359
|
+
if (!Array.isArray(issues2)) return false;
|
|
360
|
+
return issues2.some((issue) => issue[field] === value);
|
|
361
|
+
};
|
|
362
|
+
const countIssues = (issues2, field, value) => {
|
|
363
|
+
if (!Array.isArray(issues2)) return 0;
|
|
364
|
+
return issues2.filter((issue) => issue[field] === value).length;
|
|
365
|
+
};
|
|
366
|
+
const hasFileMatching = (issues2, pattern) => {
|
|
367
|
+
if (!Array.isArray(issues2)) return false;
|
|
368
|
+
return issues2.some((issue) => issue.file?.includes(pattern));
|
|
369
|
+
};
|
|
370
|
+
const hasIssueWith = hasIssue;
|
|
371
|
+
const hasFileWith = hasFileMatching;
|
|
372
|
+
const permissionHelpers = createPermissionHelpers(
|
|
373
|
+
context.authorAssociation,
|
|
374
|
+
detectLocalMode()
|
|
375
|
+
);
|
|
376
|
+
const hasMinPermission = permissionHelpers.hasMinPermission;
|
|
377
|
+
const isOwner = permissionHelpers.isOwner;
|
|
378
|
+
const isMember = permissionHelpers.isMember;
|
|
379
|
+
const isCollaborator = permissionHelpers.isCollaborator;
|
|
380
|
+
const isContributor = permissionHelpers.isContributor;
|
|
381
|
+
const isFirstTimer = permissionHelpers.isFirstTimer;
|
|
382
|
+
const output = context.output || {};
|
|
383
|
+
let issues = output.issues || [];
|
|
384
|
+
if (typeof issues === "string") {
|
|
385
|
+
try {
|
|
386
|
+
issues = JSON.parse(issues);
|
|
387
|
+
} catch {
|
|
388
|
+
issues = [];
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
if (!Array.isArray(issues)) {
|
|
392
|
+
issues = [];
|
|
393
|
+
}
|
|
394
|
+
const metadata = context.metadata || {
|
|
395
|
+
checkName: context.checkName || "",
|
|
396
|
+
schema: context.schema || "",
|
|
397
|
+
group: context.group || "",
|
|
398
|
+
criticalIssues: issues.filter((i) => i.severity === "critical").length,
|
|
399
|
+
errorIssues: issues.filter((i) => i.severity === "error").length,
|
|
400
|
+
warningIssues: issues.filter((i) => i.severity === "warning").length,
|
|
401
|
+
infoIssues: issues.filter((i) => i.severity === "info").length,
|
|
402
|
+
totalIssues: issues.length,
|
|
403
|
+
hasChanges: context.hasChanges || false
|
|
404
|
+
};
|
|
405
|
+
const criticalIssues = metadata.criticalIssues;
|
|
406
|
+
const errorIssues = metadata.errorIssues;
|
|
407
|
+
const totalIssues = metadata.totalIssues;
|
|
408
|
+
const warningIssues = metadata.warningIssues;
|
|
409
|
+
const infoIssues = metadata.infoIssues;
|
|
410
|
+
const checkName = context.checkName || "";
|
|
411
|
+
const schema = context.schema || "";
|
|
412
|
+
const group = context.group || "";
|
|
413
|
+
const branch = context.branch || "unknown";
|
|
414
|
+
const baseBranch = context.baseBranch || "main";
|
|
415
|
+
const filesChanged = context.filesChanged || [];
|
|
416
|
+
const filesCount = context.filesCount || 0;
|
|
417
|
+
const event = context.event || "manual";
|
|
418
|
+
const env = context.env || {};
|
|
419
|
+
const outputs = context.outputs || {};
|
|
420
|
+
const inputs = context.inputs || {};
|
|
421
|
+
const debugData = context.debug || null;
|
|
422
|
+
const conversation = context.conversation || null;
|
|
423
|
+
const memoryStore = MemoryStore.getInstance();
|
|
424
|
+
const memoryAccessor = {
|
|
425
|
+
get: (key, ns) => memoryStore.get(key, ns),
|
|
426
|
+
has: (key, ns) => memoryStore.has(key, ns),
|
|
427
|
+
list: (ns) => memoryStore.list(ns),
|
|
428
|
+
getAll: (ns) => memoryStore.getAll(ns)
|
|
429
|
+
};
|
|
430
|
+
const scope = {
|
|
431
|
+
// Primary context variables
|
|
432
|
+
output,
|
|
433
|
+
outputs,
|
|
434
|
+
debug: debugData,
|
|
435
|
+
// Memory accessor for fail_if expressions
|
|
436
|
+
memory: memoryAccessor,
|
|
437
|
+
// Legacy compatibility variables
|
|
438
|
+
issues,
|
|
439
|
+
metadata,
|
|
440
|
+
criticalIssues,
|
|
441
|
+
errorIssues,
|
|
442
|
+
totalIssues,
|
|
443
|
+
warningIssues,
|
|
444
|
+
infoIssues,
|
|
445
|
+
// If condition context
|
|
446
|
+
checkName,
|
|
447
|
+
schema,
|
|
448
|
+
group,
|
|
449
|
+
branch,
|
|
450
|
+
baseBranch,
|
|
451
|
+
filesChanged,
|
|
452
|
+
filesCount,
|
|
453
|
+
event,
|
|
454
|
+
env,
|
|
455
|
+
inputs,
|
|
456
|
+
// Conversation context (TUI/CLI/Slack)
|
|
457
|
+
conversation,
|
|
458
|
+
// Helper functions
|
|
459
|
+
contains,
|
|
460
|
+
startsWith,
|
|
461
|
+
endsWith,
|
|
462
|
+
length,
|
|
463
|
+
always,
|
|
464
|
+
success,
|
|
465
|
+
failure,
|
|
466
|
+
log,
|
|
467
|
+
hasIssue,
|
|
468
|
+
countIssues,
|
|
469
|
+
hasFileMatching,
|
|
470
|
+
hasIssueWith,
|
|
471
|
+
hasFileWith,
|
|
472
|
+
// Permission helpers
|
|
473
|
+
hasMinPermission,
|
|
474
|
+
isOwner,
|
|
475
|
+
isMember,
|
|
476
|
+
isCollaborator,
|
|
477
|
+
isContributor,
|
|
478
|
+
isFirstTimer
|
|
479
|
+
};
|
|
480
|
+
const raw = condition.trim();
|
|
481
|
+
if (!this.sandbox) {
|
|
482
|
+
this.sandbox = this.createSecureSandbox();
|
|
483
|
+
}
|
|
484
|
+
let exec;
|
|
485
|
+
try {
|
|
486
|
+
exec = this.sandbox.compile(`return (${raw});`);
|
|
487
|
+
} catch {
|
|
488
|
+
const normalizedExpr = normalize(condition);
|
|
489
|
+
exec = this.sandbox.compile(`return (${normalizedExpr});`);
|
|
490
|
+
}
|
|
491
|
+
const result = exec(scope).run();
|
|
492
|
+
try {
|
|
493
|
+
(init_logger(), __toCommonJS(logger_exports)).logger.debug(` fail_if: result=${Boolean(result)}`);
|
|
494
|
+
} catch {
|
|
495
|
+
}
|
|
496
|
+
return Boolean(result);
|
|
497
|
+
} catch (error) {
|
|
498
|
+
console.error("\u274C Failed to evaluate expression:", condition, error);
|
|
499
|
+
throw error;
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
/**
|
|
503
|
+
* Extract the expression from a failure condition
|
|
504
|
+
*/
|
|
505
|
+
extractExpression(condition) {
|
|
506
|
+
if (typeof condition === "string") {
|
|
507
|
+
return condition;
|
|
508
|
+
}
|
|
509
|
+
return condition.condition;
|
|
510
|
+
}
|
|
511
|
+
/**
|
|
512
|
+
* Extract configuration from a failure condition
|
|
513
|
+
*/
|
|
514
|
+
extractConditionConfig(condition) {
|
|
515
|
+
if (typeof condition === "string") {
|
|
516
|
+
return {};
|
|
517
|
+
}
|
|
518
|
+
return {
|
|
519
|
+
message: condition.message,
|
|
520
|
+
severity: condition.severity,
|
|
521
|
+
halt_execution: condition.halt_execution
|
|
522
|
+
};
|
|
523
|
+
}
|
|
524
|
+
/**
|
|
525
|
+
* Build the evaluation context for expressions
|
|
526
|
+
*/
|
|
527
|
+
buildEvaluationContext(checkName, checkSchema, checkGroup, reviewSummary, previousOutputs, authorAssociation) {
|
|
528
|
+
const { issues, debug } = reviewSummary;
|
|
529
|
+
const reviewSummaryWithOutput = reviewSummary;
|
|
530
|
+
const {
|
|
531
|
+
output: extractedOutput,
|
|
532
|
+
// Exclude issues from otherFields since we handle it separately
|
|
533
|
+
issues: _issues,
|
|
534
|
+
// eslint-disable-line @typescript-eslint/no-unused-vars
|
|
535
|
+
...otherFields
|
|
536
|
+
} = reviewSummaryWithOutput;
|
|
537
|
+
const aggregatedOutput = {
|
|
538
|
+
issues: (issues || []).map((issue) => ({
|
|
539
|
+
file: issue.file,
|
|
540
|
+
line: issue.line,
|
|
541
|
+
endLine: issue.endLine,
|
|
542
|
+
ruleId: issue.ruleId,
|
|
543
|
+
message: issue.message,
|
|
544
|
+
severity: issue.severity,
|
|
545
|
+
category: issue.category,
|
|
546
|
+
group: issue.group,
|
|
547
|
+
schema: issue.schema,
|
|
548
|
+
suggestion: issue.suggestion,
|
|
549
|
+
replacement: issue.replacement
|
|
550
|
+
})),
|
|
551
|
+
// Include additional schema-specific data from reviewSummary
|
|
552
|
+
...otherFields
|
|
553
|
+
};
|
|
554
|
+
if (Array.isArray(extractedOutput)) {
|
|
555
|
+
aggregatedOutput.items = extractedOutput;
|
|
556
|
+
const anyError = extractedOutput.find(
|
|
557
|
+
(it) => it && typeof it === "object" && it.error
|
|
558
|
+
);
|
|
559
|
+
if (anyError && anyError.error !== void 0) {
|
|
560
|
+
aggregatedOutput.error = anyError.error;
|
|
561
|
+
}
|
|
562
|
+
} else if (extractedOutput && typeof extractedOutput === "object") {
|
|
563
|
+
Object.assign(aggregatedOutput, extractedOutput);
|
|
564
|
+
}
|
|
565
|
+
try {
|
|
566
|
+
const raw = reviewSummaryWithOutput.__raw;
|
|
567
|
+
if (raw && typeof raw === "object") {
|
|
568
|
+
Object.assign(aggregatedOutput, raw);
|
|
569
|
+
}
|
|
570
|
+
} catch {
|
|
571
|
+
}
|
|
572
|
+
try {
|
|
573
|
+
if (typeof extractedOutput === "string") {
|
|
574
|
+
const parsed = this.tryExtractJsonFromEnd(extractedOutput) ?? (() => {
|
|
575
|
+
try {
|
|
576
|
+
return JSON.parse(extractedOutput);
|
|
577
|
+
} catch {
|
|
578
|
+
return null;
|
|
579
|
+
}
|
|
580
|
+
})();
|
|
581
|
+
if (parsed !== null) {
|
|
582
|
+
if (Array.isArray(parsed)) {
|
|
583
|
+
aggregatedOutput.items = parsed;
|
|
584
|
+
} else if (typeof parsed === "object") {
|
|
585
|
+
Object.assign(aggregatedOutput, parsed);
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
const lower = extractedOutput.toLowerCase();
|
|
589
|
+
const boolFrom = (key) => {
|
|
590
|
+
const reTrue = new RegExp(
|
|
591
|
+
`(?:^|[^a-z0-9_])${key}[^a-z0-9_]*[:=][^a-z0-9_]*true(?:[^a-z0-9_]|$)`
|
|
592
|
+
);
|
|
593
|
+
const reFalse = new RegExp(
|
|
594
|
+
`(?:^|[^a-z0-9_])${key}[^a-z0-9_]*[:=][^a-z0-9_]*false(?:[^a-z0-9_]|$)`
|
|
595
|
+
);
|
|
596
|
+
if (reTrue.test(lower)) return true;
|
|
597
|
+
if (reFalse.test(lower)) return false;
|
|
598
|
+
return null;
|
|
599
|
+
};
|
|
600
|
+
const keys = ["error"];
|
|
601
|
+
for (const k of keys) {
|
|
602
|
+
const v = boolFrom(k);
|
|
603
|
+
if (v !== null && aggregatedOutput[k] === void 0) {
|
|
604
|
+
aggregatedOutput[k] = v;
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
} catch {
|
|
609
|
+
}
|
|
610
|
+
try {
|
|
611
|
+
const rsAny = reviewSummaryWithOutput;
|
|
612
|
+
const hasStructuredOutput = extractedOutput !== void 0 && extractedOutput !== null;
|
|
613
|
+
if (!hasStructuredOutput && typeof rsAny?.content === "string") {
|
|
614
|
+
const parsedFromContent = this.tryExtractJsonFromEnd(rsAny.content);
|
|
615
|
+
if (parsedFromContent !== null && parsedFromContent !== void 0) {
|
|
616
|
+
if (Array.isArray(parsedFromContent)) {
|
|
617
|
+
aggregatedOutput.items = parsedFromContent;
|
|
618
|
+
} else if (typeof parsedFromContent === "object") {
|
|
619
|
+
Object.assign(aggregatedOutput, parsedFromContent);
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
} catch {
|
|
624
|
+
}
|
|
625
|
+
const memoryStore = MemoryStore.getInstance();
|
|
626
|
+
const context = {
|
|
627
|
+
output: aggregatedOutput,
|
|
628
|
+
outputs: (() => {
|
|
629
|
+
if (!previousOutputs) return {};
|
|
630
|
+
const outputs = {};
|
|
631
|
+
for (const [checkName2, result] of Object.entries(previousOutputs)) {
|
|
632
|
+
const summary = result;
|
|
633
|
+
outputs[checkName2] = summary.output !== void 0 ? summary.output : summary;
|
|
634
|
+
}
|
|
635
|
+
return outputs;
|
|
636
|
+
})(),
|
|
637
|
+
// Add memory accessor for fail_if expressions
|
|
638
|
+
memory: {
|
|
639
|
+
get: (key, ns) => memoryStore.get(key, ns),
|
|
640
|
+
has: (key, ns) => memoryStore.has(key, ns),
|
|
641
|
+
list: (ns) => memoryStore.list(ns),
|
|
642
|
+
getAll: (ns) => memoryStore.getAll(ns)
|
|
643
|
+
},
|
|
644
|
+
// Add basic context info for failure conditions
|
|
645
|
+
checkName,
|
|
646
|
+
schema: checkSchema,
|
|
647
|
+
group: checkGroup,
|
|
648
|
+
authorAssociation
|
|
649
|
+
};
|
|
650
|
+
if (debug) {
|
|
651
|
+
context.debug = {
|
|
652
|
+
errors: debug.errors || [],
|
|
653
|
+
processingTime: debug.processingTime || 0,
|
|
654
|
+
provider: debug.provider || "unknown",
|
|
655
|
+
model: debug.model || "unknown"
|
|
656
|
+
};
|
|
657
|
+
}
|
|
658
|
+
return context;
|
|
659
|
+
}
|
|
660
|
+
// Minimal JSON-from-end extractor for fail_if context fallback
|
|
661
|
+
tryExtractJsonFromEnd(text) {
|
|
662
|
+
try {
|
|
663
|
+
const lines = text.split("\n");
|
|
664
|
+
for (let i = lines.length - 1; i >= 0; i--) {
|
|
665
|
+
const t = lines[i].trim();
|
|
666
|
+
if (t.startsWith("{") || t.startsWith("[")) {
|
|
667
|
+
const candidate = lines.slice(i).join("\n").trim();
|
|
668
|
+
if (candidate.startsWith("{") && candidate.endsWith("}") || candidate.startsWith("[") && candidate.endsWith("]")) {
|
|
669
|
+
return JSON.parse(candidate);
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
} catch {
|
|
674
|
+
}
|
|
675
|
+
return null;
|
|
676
|
+
}
|
|
677
|
+
/**
|
|
678
|
+
* Check if any failure condition requires halting execution
|
|
679
|
+
*/
|
|
680
|
+
static shouldHaltExecution(results) {
|
|
681
|
+
return results.some((result) => result.failed && result.haltExecution);
|
|
682
|
+
}
|
|
683
|
+
/**
|
|
684
|
+
* Get all failed conditions
|
|
685
|
+
*/
|
|
686
|
+
static getFailedConditions(results) {
|
|
687
|
+
return results.filter((result) => result.failed);
|
|
688
|
+
}
|
|
689
|
+
/**
|
|
690
|
+
* Group results by severity
|
|
691
|
+
*/
|
|
692
|
+
static groupResultsBySeverity(results) {
|
|
693
|
+
return {
|
|
694
|
+
// Only 'error' severity now (no backward compatibility needed here as this is internal)
|
|
695
|
+
error: results.filter((r) => r.severity === "error"),
|
|
696
|
+
warning: results.filter((r) => r.severity === "warning"),
|
|
697
|
+
info: results.filter((r) => r.severity === "info")
|
|
698
|
+
};
|
|
699
|
+
}
|
|
700
|
+
/**
|
|
701
|
+
* Format results for display
|
|
702
|
+
*/
|
|
703
|
+
static formatResults(results) {
|
|
704
|
+
const failed = _FailureConditionEvaluator.getFailedConditions(results);
|
|
705
|
+
if (failed.length === 0) {
|
|
706
|
+
return "\u2705 All failure conditions passed";
|
|
707
|
+
}
|
|
708
|
+
const grouped = _FailureConditionEvaluator.groupResultsBySeverity(failed);
|
|
709
|
+
const sections = [];
|
|
710
|
+
if (grouped.error.length > 0) {
|
|
711
|
+
sections.push(`\u274C **Error severity conditions (${grouped.error.length}):**`);
|
|
712
|
+
grouped.error.forEach((result) => {
|
|
713
|
+
sections.push(` - ${result.conditionName}: ${result.message || result.expression}`);
|
|
714
|
+
});
|
|
715
|
+
}
|
|
716
|
+
if (grouped.warning.length > 0) {
|
|
717
|
+
sections.push(`\u26A0\uFE0F **Warning conditions (${grouped.warning.length}):**`);
|
|
718
|
+
grouped.warning.forEach((result) => {
|
|
719
|
+
sections.push(` - ${result.conditionName}: ${result.message || result.expression}`);
|
|
720
|
+
});
|
|
721
|
+
}
|
|
722
|
+
if (grouped.info.length > 0) {
|
|
723
|
+
sections.push(`\u2139\uFE0F **Info conditions (${grouped.info.length}):**`);
|
|
724
|
+
grouped.info.forEach((result) => {
|
|
725
|
+
sections.push(` - ${result.conditionName}: ${result.message || result.expression}`);
|
|
726
|
+
});
|
|
727
|
+
}
|
|
728
|
+
return sections.join("\n");
|
|
729
|
+
}
|
|
730
|
+
};
|
|
731
|
+
}
|
|
732
|
+
});
|
|
733
|
+
|
|
734
|
+
export {
|
|
735
|
+
FailureConditionEvaluator,
|
|
736
|
+
failure_condition_evaluator_exports,
|
|
737
|
+
init_failure_condition_evaluator
|
|
738
|
+
};
|
|
739
|
+
//# sourceMappingURL=chunk-PZADRRLX.mjs.map
|