@probelabs/visor 0.1.145-ee → 0.1.146-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.
Files changed (26) hide show
  1. package/dist/index.js +3 -3
  2. package/dist/sdk/{check-provider-registry-HFPKHYTG.mjs → check-provider-registry-WSFL2SVQ.mjs} +5 -5
  3. package/dist/sdk/{chunk-GZMQPC6D.mjs → chunk-74YJMONB.mjs} +14 -14
  4. package/dist/sdk/{host-CVJ3VG5Y.mjs → host-5BJ25CUZ.mjs} +2 -2
  5. package/dist/sdk/{schedule-tool-handler-BTLEDYAI.mjs → schedule-tool-handler-62K3NGH6.mjs} +5 -5
  6. package/dist/sdk/{workflow-check-provider-3IIKJFM4.mjs → workflow-check-provider-XC7E5OFH.mjs} +5 -5
  7. package/package.json +1 -1
  8. package/dist/sdk/chunk-O7WE6HCA.mjs +0 -443
  9. package/dist/sdk/chunk-O7WE6HCA.mjs.map +0 -1
  10. package/dist/sdk/chunk-PES5G5RR.mjs +0 -1502
  11. package/dist/sdk/chunk-PES5G5RR.mjs.map +0 -1
  12. package/dist/sdk/chunk-XHIXKNUF.mjs +0 -739
  13. package/dist/sdk/chunk-XHIXKNUF.mjs.map +0 -1
  14. package/dist/sdk/failure-condition-evaluator-2BJHKTMX.mjs +0 -17
  15. package/dist/sdk/github-frontend-ICKRZ4VV.mjs +0 -1356
  16. package/dist/sdk/github-frontend-ICKRZ4VV.mjs.map +0 -1
  17. package/dist/sdk/routing-3XDRYU3Z.mjs +0 -25
  18. package/dist/sdk/schedule-tool-handler-BTLEDYAI.mjs.map +0 -1
  19. package/dist/sdk/trace-helpers-VUUP6ILH.mjs +0 -25
  20. package/dist/sdk/trace-helpers-VUUP6ILH.mjs.map +0 -1
  21. package/dist/sdk/workflow-check-provider-3IIKJFM4.mjs.map +0 -1
  22. /package/dist/sdk/{check-provider-registry-HFPKHYTG.mjs.map → check-provider-registry-WSFL2SVQ.mjs.map} +0 -0
  23. /package/dist/sdk/{chunk-GZMQPC6D.mjs.map → chunk-74YJMONB.mjs.map} +0 -0
  24. /package/dist/sdk/{host-CVJ3VG5Y.mjs.map → host-5BJ25CUZ.mjs.map} +0 -0
  25. /package/dist/sdk/{failure-condition-evaluator-2BJHKTMX.mjs.map → schedule-tool-handler-62K3NGH6.mjs.map} +0 -0
  26. /package/dist/sdk/{routing-3XDRYU3Z.mjs.map → workflow-check-provider-XC7E5OFH.mjs.map} +0 -0
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
- process.env.VISOR_VERSION = '0.1.145';
2
+ process.env.VISOR_VERSION = '0.1.146';
3
3
  process.env.PROBE_VERSION = '0.6.0-rc260';
4
- process.env.VISOR_COMMIT_SHA = '7f399fc32c663ce91b7adbb19c6f29bcd7f41931';
5
- process.env.VISOR_COMMIT_SHORT = '7f399fc';
4
+ process.env.VISOR_COMMIT_SHA = 'd2ab098a3650d6798ede2306a8ed4b5fdb6214fb';
5
+ process.env.VISOR_COMMIT_SHORT = 'd2ab098';
6
6
  /******/ (() => { // webpackBootstrap
7
7
  /******/ var __webpack_modules__ = ({
8
8
 
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  CheckProviderRegistry,
3
3
  init_check_provider_registry
4
- } from "./chunk-GZMQPC6D.mjs";
4
+ } from "./chunk-74YJMONB.mjs";
5
5
  import "./chunk-M3BYMES6.mjs";
6
6
  import "./chunk-LG4AUKHB.mjs";
7
7
  import "./chunk-KFKHU6CM.mjs";
@@ -12,9 +12,9 @@ import "./chunk-DIND4ZCV.mjs";
12
12
  import "./chunk-YOKAA4IU.mjs";
13
13
  import "./chunk-NCWIZVOT.mjs";
14
14
  import "./chunk-XKCER23W.mjs";
15
- import "./chunk-PES5G5RR.mjs";
16
- import "./chunk-XHIXKNUF.mjs";
17
- import "./chunk-O7WE6HCA.mjs";
15
+ import "./chunk-I42ZCVA5.mjs";
16
+ import "./chunk-L3XPYQ6I.mjs";
17
+ import "./chunk-OM3WYVFI.mjs";
18
18
  import "./chunk-JL7JXCET.mjs";
19
19
  import "./chunk-ZUEQNCKB.mjs";
20
20
  import "./chunk-25IC7KXZ.mjs";
@@ -27,4 +27,4 @@ init_check_provider_registry();
27
27
  export {
28
28
  CheckProviderRegistry
29
29
  };
30
- //# sourceMappingURL=check-provider-registry-HFPKHYTG.mjs.map
30
+ //# sourceMappingURL=check-provider-registry-WSFL2SVQ.mjs.map
@@ -53,11 +53,11 @@ import {
53
53
  init_routing,
54
54
  init_snapshot_store,
55
55
  snapshot_store_exports
56
- } from "./chunk-PES5G5RR.mjs";
56
+ } from "./chunk-I42ZCVA5.mjs";
57
57
  import {
58
58
  FailureConditionEvaluator,
59
59
  init_failure_condition_evaluator
60
- } from "./chunk-XHIXKNUF.mjs";
60
+ } from "./chunk-L3XPYQ6I.mjs";
61
61
  import {
62
62
  addEvent,
63
63
  emitNdjsonFallback,
@@ -68,7 +68,7 @@ import {
68
68
  setSpanAttributes,
69
69
  trace_helpers_exports,
70
70
  withActiveSpan
71
- } from "./chunk-O7WE6HCA.mjs";
71
+ } from "./chunk-OM3WYVFI.mjs";
72
72
  import {
73
73
  addDiagramBlock,
74
74
  init_metrics
@@ -3947,7 +3947,7 @@ async function executeWorkflowAsTool(workflowId, args, context2, argsOverrides)
3947
3947
  ...args,
3948
3948
  ...argsOverrides
3949
3949
  };
3950
- const { WorkflowCheckProvider: WorkflowCheckProvider2 } = await import("./workflow-check-provider-3IIKJFM4.mjs");
3950
+ const { WorkflowCheckProvider: WorkflowCheckProvider2 } = await import("./workflow-check-provider-XC7E5OFH.mjs");
3951
3951
  const provider = new WorkflowCheckProvider2();
3952
3952
  const checkConfig = {
3953
3953
  type: "workflow",
@@ -8202,7 +8202,7 @@ async function executeCheckWithForEachItems2(checkId, forEachParent, forEachItem
8202
8202
  }
8203
8203
  }
8204
8204
  try {
8205
- const { evaluateTransitions } = await import("./routing-3XDRYU3Z.mjs");
8205
+ const { evaluateTransitions } = await import("./routing-RIHVCEIU.mjs");
8206
8206
  const transTarget = await evaluateTransitions(
8207
8207
  onFinish.transitions,
8208
8208
  forEachParent,
@@ -8262,7 +8262,7 @@ async function executeCheckWithForEachItems2(checkId, forEachParent, forEachItem
8262
8262
  `[LevelDispatch] Error evaluating on_finish transitions for ${forEachParent}: ${e instanceof Error ? e.message : String(e)}`
8263
8263
  );
8264
8264
  }
8265
- const { evaluateGoto: evaluateGoto2 } = await import("./routing-3XDRYU3Z.mjs");
8265
+ const { evaluateGoto: evaluateGoto2 } = await import("./routing-RIHVCEIU.mjs");
8266
8266
  if (context2.debug) {
8267
8267
  logger.info(
8268
8268
  `[LevelDispatch] Evaluating on_finish.goto_js for forEach parent: ${forEachParent}`
@@ -11801,7 +11801,7 @@ var init_state_machine_execution_engine = __esm({
11801
11801
  try {
11802
11802
  const map = options?.webhookContext?.webhookData;
11803
11803
  if (map) {
11804
- const { CheckProviderRegistry: CheckProviderRegistry2 } = await import("./check-provider-registry-HFPKHYTG.mjs");
11804
+ const { CheckProviderRegistry: CheckProviderRegistry2 } = await import("./check-provider-registry-WSFL2SVQ.mjs");
11805
11805
  const reg = CheckProviderRegistry2.getInstance();
11806
11806
  const p = reg.getProvider("http_input");
11807
11807
  if (p && typeof p.setWebhookContext === "function") p.setWebhookContext(map);
@@ -11924,7 +11924,7 @@ var init_state_machine_execution_engine = __esm({
11924
11924
  tag_filter: tagFilter
11925
11925
  } : config;
11926
11926
  try {
11927
- const { CheckProviderRegistry: CheckProviderRegistry2 } = await import("./check-provider-registry-HFPKHYTG.mjs");
11927
+ const { CheckProviderRegistry: CheckProviderRegistry2 } = await import("./check-provider-registry-WSFL2SVQ.mjs");
11928
11928
  const registry = CheckProviderRegistry2.getInstance();
11929
11929
  registry.setCustomTools(configWithTagFilter.tools || {});
11930
11930
  } catch (error) {
@@ -11988,7 +11988,7 @@ var init_state_machine_execution_engine = __esm({
11988
11988
  try {
11989
11989
  const webhookData = this.executionContext?.webhookContext?.webhookData;
11990
11990
  if (webhookData instanceof Map) {
11991
- const { extractSlackContext: extractSlackContext2 } = await import("./schedule-tool-handler-BTLEDYAI.mjs");
11991
+ const { extractSlackContext: extractSlackContext2 } = await import("./schedule-tool-handler-62K3NGH6.mjs");
11992
11992
  const slackCtx = extractSlackContext2(webhookData);
11993
11993
  if (slackCtx) {
11994
11994
  const payload = Array.from(webhookData.values())[0];
@@ -12017,7 +12017,7 @@ var init_state_machine_execution_engine = __esm({
12017
12017
  if (Array.isArray(configWithTagFilter.frontends) && configWithTagFilter.frontends.length > 0) {
12018
12018
  try {
12019
12019
  const { EventBus } = await import("./event-bus-5K3Y2FCS.mjs");
12020
- const { FrontendsHost } = await import("./host-CVJ3VG5Y.mjs");
12020
+ const { FrontendsHost } = await import("./host-5BJ25CUZ.mjs");
12021
12021
  const bus = new EventBus();
12022
12022
  context2.eventBus = bus;
12023
12023
  frontendsHost = new FrontendsHost(bus, logger);
@@ -12367,9 +12367,9 @@ var init_state_machine_execution_engine = __esm({
12367
12367
  * @returns Array of failure condition evaluation results
12368
12368
  */
12369
12369
  async evaluateFailureConditions(checkName, reviewSummary, config, previousOutputs, authorAssociation) {
12370
- const { FailureConditionEvaluator: FailureConditionEvaluator2 } = await import("./failure-condition-evaluator-2BJHKTMX.mjs");
12370
+ const { FailureConditionEvaluator: FailureConditionEvaluator2 } = await import("./failure-condition-evaluator-O464EJMD.mjs");
12371
12371
  const evaluator = new FailureConditionEvaluator2();
12372
- const { addEvent: addEvent3 } = await import("./trace-helpers-VUUP6ILH.mjs");
12372
+ const { addEvent: addEvent3 } = await import("./trace-helpers-QQSTZGDT.mjs");
12373
12373
  const { addFailIfTriggered } = await import("./metrics-I6A7IHG4.mjs");
12374
12374
  const checkConfig = config.checks?.[checkName];
12375
12375
  if (!checkConfig) {
@@ -37694,7 +37694,7 @@ function buildBuiltinGlobals(opts) {
37694
37694
  const scheduleFn = async (args = {}) => {
37695
37695
  try {
37696
37696
  const { handleScheduleAction: handleScheduleAction2, buildScheduleToolContext: buildScheduleToolContext2 } = await import("./schedule-tool-2COUUTF7.mjs");
37697
- const { extractSlackContext: extractSlackContext2 } = await import("./schedule-tool-handler-BTLEDYAI.mjs");
37697
+ const { extractSlackContext: extractSlackContext2 } = await import("./schedule-tool-handler-62K3NGH6.mjs");
37698
37698
  const parentCtx = opts.sessionInfo?._parentContext;
37699
37699
  const webhookData = parentCtx?.prInfo?.eventContext?.webhookData;
37700
37700
  const visorCfg = parentCtx?.config;
@@ -40648,4 +40648,4 @@ undici/lib/fetch/body.js:
40648
40648
  undici/lib/websocket/frame.js:
40649
40649
  (*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> *)
40650
40650
  */
40651
- //# sourceMappingURL=chunk-GZMQPC6D.mjs.map
40651
+ //# sourceMappingURL=chunk-74YJMONB.mjs.map
@@ -21,7 +21,7 @@ var init_host = __esm({
21
21
  const { NdjsonSink } = await import("./ndjson-sink-FD2PSXGD.mjs");
22
22
  this.frontends.push(new NdjsonSink(spec.config));
23
23
  } else if (spec.name === "github") {
24
- const { GitHubFrontend } = await import("./github-frontend-ICKRZ4VV.mjs");
24
+ const { GitHubFrontend } = await import("./github-frontend-MSX6Q2WL.mjs");
25
25
  this.frontends.push(new GitHubFrontend());
26
26
  } else if (spec.name === "slack") {
27
27
  const { SlackFrontend } = await import("./slack-frontend-TZU2HIK7.mjs");
@@ -60,4 +60,4 @@ init_host();
60
60
  export {
61
61
  FrontendsHost
62
62
  };
63
- //# sourceMappingURL=host-CVJ3VG5Y.mjs.map
63
+ //# sourceMappingURL=host-5BJ25CUZ.mjs.map
@@ -6,7 +6,7 @@ import {
6
6
  extractSlackContext,
7
7
  init_schedule_tool_handler,
8
8
  isScheduleToolCall
9
- } from "./chunk-GZMQPC6D.mjs";
9
+ } from "./chunk-74YJMONB.mjs";
10
10
  import "./chunk-M3BYMES6.mjs";
11
11
  import "./chunk-LG4AUKHB.mjs";
12
12
  import "./chunk-KFKHU6CM.mjs";
@@ -17,9 +17,9 @@ import "./chunk-DIND4ZCV.mjs";
17
17
  import "./chunk-YOKAA4IU.mjs";
18
18
  import "./chunk-NCWIZVOT.mjs";
19
19
  import "./chunk-XKCER23W.mjs";
20
- import "./chunk-PES5G5RR.mjs";
21
- import "./chunk-XHIXKNUF.mjs";
22
- import "./chunk-O7WE6HCA.mjs";
20
+ import "./chunk-I42ZCVA5.mjs";
21
+ import "./chunk-L3XPYQ6I.mjs";
22
+ import "./chunk-OM3WYVFI.mjs";
23
23
  import "./chunk-JL7JXCET.mjs";
24
24
  import "./chunk-ZUEQNCKB.mjs";
25
25
  import "./chunk-25IC7KXZ.mjs";
@@ -37,4 +37,4 @@ export {
37
37
  extractSlackContext,
38
38
  isScheduleToolCall
39
39
  };
40
- //# sourceMappingURL=schedule-tool-handler-BTLEDYAI.mjs.map
40
+ //# sourceMappingURL=schedule-tool-handler-62K3NGH6.mjs.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  WorkflowCheckProvider,
3
3
  init_workflow_check_provider
4
- } from "./chunk-GZMQPC6D.mjs";
4
+ } from "./chunk-74YJMONB.mjs";
5
5
  import "./chunk-M3BYMES6.mjs";
6
6
  import "./chunk-LG4AUKHB.mjs";
7
7
  import "./chunk-KFKHU6CM.mjs";
@@ -12,9 +12,9 @@ import "./chunk-DIND4ZCV.mjs";
12
12
  import "./chunk-YOKAA4IU.mjs";
13
13
  import "./chunk-NCWIZVOT.mjs";
14
14
  import "./chunk-XKCER23W.mjs";
15
- import "./chunk-PES5G5RR.mjs";
16
- import "./chunk-XHIXKNUF.mjs";
17
- import "./chunk-O7WE6HCA.mjs";
15
+ import "./chunk-I42ZCVA5.mjs";
16
+ import "./chunk-L3XPYQ6I.mjs";
17
+ import "./chunk-OM3WYVFI.mjs";
18
18
  import "./chunk-JL7JXCET.mjs";
19
19
  import "./chunk-ZUEQNCKB.mjs";
20
20
  import "./chunk-25IC7KXZ.mjs";
@@ -27,4 +27,4 @@ init_workflow_check_provider();
27
27
  export {
28
28
  WorkflowCheckProvider
29
29
  };
30
- //# sourceMappingURL=workflow-check-provider-3IIKJFM4.mjs.map
30
+ //# sourceMappingURL=workflow-check-provider-XC7E5OFH.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@probelabs/visor",
3
- "version": "0.1.145-ee",
3
+ "version": "0.1.146-ee",
4
4
  "main": "dist/index.js",
5
5
  "bin": {
6
6
  "visor": "./dist/index.js"
@@ -1,443 +0,0 @@
1
- import {
2
- SpanStatusCode,
3
- context,
4
- init_lazy_otel,
5
- trace
6
- } from "./chunk-UCMJJ3IM.mjs";
7
- import {
8
- __commonJS,
9
- __esm,
10
- __export,
11
- __require,
12
- __toCommonJS
13
- } from "./chunk-J7LXIPZS.mjs";
14
-
15
- // src/telemetry/fallback-ndjson.ts
16
- var fallback_ndjson_exports = {};
17
- __export(fallback_ndjson_exports, {
18
- emitNdjsonFallback: () => emitNdjsonFallback,
19
- emitNdjsonSpanWithEvents: () => emitNdjsonSpanWithEvents,
20
- flushNdjson: () => flushNdjson
21
- });
22
- import * as fs from "fs";
23
- import * as path from "path";
24
- function resolveTargetPath(outDir) {
25
- if (process.env.VISOR_FALLBACK_TRACE_FILE) {
26
- CURRENT_FILE = process.env.VISOR_FALLBACK_TRACE_FILE;
27
- return CURRENT_FILE;
28
- }
29
- if (CURRENT_FILE) return CURRENT_FILE;
30
- const ts = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
31
- CURRENT_FILE = path.join(outDir, `${ts}.ndjson`);
32
- return CURRENT_FILE;
33
- }
34
- function isEnabled() {
35
- if (process.env.VISOR_FALLBACK_TRACE_FILE) return true;
36
- return process.env.VISOR_TELEMETRY_ENABLED === "true" && (process.env.VISOR_TELEMETRY_SINK || "file") === "file";
37
- }
38
- function appendAsync(outDir, line) {
39
- writeChain = writeChain.then(async () => {
40
- if (!dirReady) {
41
- try {
42
- await fs.promises.mkdir(outDir, { recursive: true });
43
- } catch {
44
- }
45
- dirReady = true;
46
- }
47
- const target = resolveTargetPath(outDir);
48
- await fs.promises.appendFile(target, line, "utf8");
49
- }).catch(() => {
50
- });
51
- }
52
- async function flushNdjson() {
53
- try {
54
- await writeChain;
55
- } catch {
56
- }
57
- }
58
- function emitNdjsonFallback(name, attrs) {
59
- try {
60
- if (!isEnabled()) return;
61
- const outDir = process.env.VISOR_TRACE_DIR || path.join(process.cwd(), "output", "traces");
62
- const line = JSON.stringify({ name, attributes: attrs }) + "\n";
63
- appendAsync(outDir, line);
64
- } catch {
65
- }
66
- }
67
- function emitNdjsonSpanWithEvents(name, attrs, events) {
68
- try {
69
- if (!isEnabled()) return;
70
- const outDir = process.env.VISOR_TRACE_DIR || path.join(process.cwd(), "output", "traces");
71
- const line = JSON.stringify({ name, attributes: attrs, events }) + "\n";
72
- appendAsync(outDir, line);
73
- } catch {
74
- }
75
- }
76
- var CURRENT_FILE, dirReady, writeChain;
77
- var init_fallback_ndjson = __esm({
78
- "src/telemetry/fallback-ndjson.ts"() {
79
- "use strict";
80
- CURRENT_FILE = null;
81
- dirReady = false;
82
- writeChain = Promise.resolve();
83
- }
84
- });
85
-
86
- // package.json
87
- var require_package = __commonJS({
88
- "package.json"(exports, module) {
89
- module.exports = {
90
- name: "@probelabs/visor",
91
- version: "0.1.42",
92
- main: "dist/index.js",
93
- bin: {
94
- visor: "./dist/index.js"
95
- },
96
- exports: {
97
- ".": {
98
- require: "./dist/index.js",
99
- import: "./dist/index.js"
100
- },
101
- "./sdk": {
102
- types: "./dist/sdk/sdk.d.ts",
103
- import: "./dist/sdk/sdk.mjs",
104
- require: "./dist/sdk/sdk.js"
105
- },
106
- "./cli": {
107
- require: "./dist/index.js"
108
- }
109
- },
110
- files: [
111
- "dist/",
112
- "defaults/",
113
- "action.yml",
114
- "README.md",
115
- "LICENSE"
116
- ],
117
- publishConfig: {
118
- access: "public",
119
- registry: "https://registry.npmjs.org/"
120
- },
121
- scripts: {
122
- "build:cli": "ncc build src/index.ts -o dist && cp -r defaults dist/ && cp -r output dist/ && cp -r docs dist/ && cp -r examples dist/ && cp -r src/debug-visualizer/ui dist/debug-visualizer/ && node scripts/inject-version.js && echo '#!/usr/bin/env node' | cat - dist/index.js > temp && mv temp dist/index.js && chmod +x dist/index.js",
123
- "build:sdk": "tsup src/sdk.ts --dts --sourcemap --format esm,cjs --out-dir dist/sdk",
124
- build: "./scripts/build-oss.sh",
125
- "build:ee": "npm run build:cli && npm run build:sdk",
126
- test: "jest && npm run test:yaml",
127
- "test:unit": "jest",
128
- prepublishOnly: "npm run build",
129
- "test:watch": "jest --watch",
130
- "test:coverage": "jest --coverage",
131
- "test:ee": "jest --testPathPatterns='tests/ee' --testPathIgnorePatterns='/node_modules/' --no-coverage",
132
- "test:manual:bash": "RUN_MANUAL_TESTS=true jest tests/manual/bash-config-manual.test.ts",
133
- lint: "eslint src tests --ext .ts",
134
- "lint:fix": "eslint src tests --ext .ts --fix",
135
- format: "prettier --write src tests",
136
- "format:check": "prettier --check src tests",
137
- clean: "",
138
- "clean:traces": "node scripts/clean-traces.js",
139
- prebuild: "npm run clean && node scripts/generate-config-schema.js",
140
- pretest: "npm run clean:traces && node scripts/generate-config-schema.js && npm run build:cli",
141
- "pretest:unit": "npm run clean:traces && node scripts/generate-config-schema.js && npm run build:cli",
142
- "test:with-build": "npm run build:cli && jest",
143
- "test:yaml": "node dist/index.js test --progress compact",
144
- "test:yaml:parallel": "node dist/index.js test --progress compact --max-parallel 4",
145
- prepare: "husky",
146
- "pre-commit": "lint-staged",
147
- "deploy:site": "cd site && npx wrangler pages deploy . --project-name=visor-site --commit-dirty=true",
148
- "deploy:worker": "npx wrangler deploy",
149
- deploy: "npm run deploy:site && npm run deploy:worker",
150
- "publish:ee": "./scripts/publish-ee.sh",
151
- release: "./scripts/release.sh",
152
- "release:patch": "./scripts/release.sh patch",
153
- "release:minor": "./scripts/release.sh minor",
154
- "release:major": "./scripts/release.sh major",
155
- "release:prerelease": "./scripts/release.sh prerelease",
156
- "docs:validate": "node scripts/validate-readme-links.js",
157
- "workshop:setup": "npm install -D reveal-md@6.1.2",
158
- "workshop:serve": "cd workshop && reveal-md slides.md -w",
159
- "workshop:export": "reveal-md workshop/slides.md --static workshop/build",
160
- "workshop:pdf": "reveal-md workshop/slides.md --print workshop/Visor-Workshop.pdf --print-size letter",
161
- "workshop:pdf:ci": 'reveal-md workshop/slides.md --print workshop/Visor-Workshop.pdf --print-size letter --puppeteer-launch-args="--no-sandbox --disable-dev-shm-usage"',
162
- "workshop:pdf:a4": "reveal-md workshop/slides.md --print workshop/Visor-Workshop-A4.pdf --print-size A4",
163
- "workshop:build": "npm run workshop:export && npm run workshop:pdf",
164
- "simulate:issue": "TS_NODE_TRANSPILE_ONLY=1 ts-node scripts/simulate-gh-run.ts --event issues --action opened --debug",
165
- "simulate:comment": "TS_NODE_TRANSPILE_ONLY=1 ts-node scripts/simulate-gh-run.ts --event issue_comment --action created --debug"
166
- },
167
- keywords: [
168
- "code-review",
169
- "ai",
170
- "github-action",
171
- "cli",
172
- "pr-review",
173
- "visor"
174
- ],
175
- author: "Probe Labs",
176
- license: "MIT",
177
- description: "AI workflow engine for code review, assistants, and automation \u2014 orchestrate checks, MCP tools, and AI providers with YAML-driven pipelines",
178
- repository: {
179
- type: "git",
180
- url: "git+https://github.com/probelabs/visor.git"
181
- },
182
- bugs: {
183
- url: "https://github.com/probelabs/visor/issues"
184
- },
185
- homepage: "https://github.com/probelabs/visor#readme",
186
- dependencies: {
187
- "@actions/core": "^1.11.1",
188
- "@apidevtools/swagger-parser": "^12.1.0",
189
- "@modelcontextprotocol/sdk": "^1.25.3",
190
- "@nyariv/sandboxjs": "github:probelabs/SandboxJS#f1c13b8eee98734a8ea024061eada4aa9a9ff2e9",
191
- "@octokit/action": "^8.0.2",
192
- "@octokit/auth-app": "^8.1.0",
193
- "@octokit/core": "^7.0.3",
194
- "@octokit/rest": "^22.0.0",
195
- "@opentelemetry/api": "^1.9.0",
196
- "@opentelemetry/core": "^1.30.1",
197
- "@opentelemetry/exporter-trace-otlp-grpc": "^0.203.0",
198
- "@opentelemetry/exporter-trace-otlp-http": "^0.203.0",
199
- "@opentelemetry/instrumentation": "^0.203.0",
200
- "@opentelemetry/resources": "^1.30.1",
201
- "@opentelemetry/sdk-metrics": "^1.30.1",
202
- "@opentelemetry/sdk-node": "^0.203.0",
203
- "@opentelemetry/sdk-trace-base": "^1.30.1",
204
- "@opentelemetry/semantic-conventions": "^1.30.1",
205
- "@probelabs/probe": "^0.6.0-rc259",
206
- "@types/commander": "^2.12.0",
207
- "@types/uuid": "^10.0.0",
208
- acorn: "^8.16.0",
209
- "acorn-walk": "^8.3.5",
210
- ajv: "^8.17.1",
211
- "ajv-formats": "^3.0.1",
212
- "better-sqlite3": "^11.0.0",
213
- blessed: "^0.1.81",
214
- "cli-table3": "^0.6.5",
215
- commander: "^14.0.0",
216
- deepmerge: "^4.3.1",
217
- dotenv: "^17.2.3",
218
- ignore: "^7.0.5",
219
- "js-yaml": "^4.1.0",
220
- "jsonpath-plus": "^10.4.0",
221
- liquidjs: "^10.21.1",
222
- minimatch: "^10.2.2",
223
- "node-cron": "^3.0.3",
224
- open: "^9.1.0",
225
- "simple-git": "^3.28.0",
226
- uuid: "^11.1.0",
227
- ws: "^8.18.3"
228
- },
229
- optionalDependencies: {
230
- "@anthropic/claude-code-sdk": "npm:null@*",
231
- "@open-policy-agent/opa-wasm": "^1.10.0",
232
- knex: "^3.1.0",
233
- mysql2: "^3.11.0",
234
- pg: "^8.13.0",
235
- tedious: "^19.0.0"
236
- },
237
- devDependencies: {
238
- "@eslint/js": "^9.34.0",
239
- "@kie/act-js": "^2.6.2",
240
- "@kie/mock-github": "^2.0.1",
241
- "@swc/core": "^1.13.2",
242
- "@swc/jest": "^0.2.37",
243
- "@types/better-sqlite3": "^7.6.0",
244
- "@types/blessed": "^0.1.27",
245
- "@types/jest": "^30.0.0",
246
- "@types/js-yaml": "^4.0.9",
247
- "@types/node": "^24.3.0",
248
- "@types/node-cron": "^3.0.11",
249
- "@types/ws": "^8.18.1",
250
- "@typescript-eslint/eslint-plugin": "^8.42.0",
251
- "@typescript-eslint/parser": "^8.42.0",
252
- "@vercel/ncc": "^0.38.4",
253
- eslint: "^9.34.0",
254
- "eslint-config-prettier": "^10.1.8",
255
- "eslint-plugin-prettier": "^5.5.4",
256
- husky: "^9.1.7",
257
- jest: "^30.1.3",
258
- "lint-staged": "^16.1.6",
259
- prettier: "^3.6.2",
260
- "reveal-md": "^6.1.2",
261
- "ts-json-schema-generator": "^1.5.1",
262
- "ts-node": "^10.9.2",
263
- tsup: "^8.5.0",
264
- typescript: "^5.9.2",
265
- wrangler: "^3.0.0"
266
- },
267
- peerDependenciesMeta: {
268
- "@anthropic/claude-code-sdk": {
269
- optional: true
270
- }
271
- },
272
- directories: {
273
- test: "tests"
274
- },
275
- "lint-staged": {
276
- "src/**/*.{ts,js}": [
277
- "eslint --fix",
278
- "prettier --write"
279
- ],
280
- "tests/**/*.{ts,js}": [
281
- "eslint --fix",
282
- "prettier --write"
283
- ],
284
- "*.{json,md,yml,yaml}": [
285
- "prettier --write"
286
- ]
287
- }
288
- };
289
- }
290
- });
291
-
292
- // src/telemetry/trace-helpers.ts
293
- var trace_helpers_exports = {};
294
- __export(trace_helpers_exports, {
295
- __getOrCreateNdjsonPath: () => __getOrCreateNdjsonPath,
296
- _appendRunMarker: () => _appendRunMarker,
297
- addEvent: () => addEvent,
298
- getTracer: () => getTracer,
299
- getVisorRunAttributes: () => getVisorRunAttributes,
300
- setSpanAttributes: () => setSpanAttributes,
301
- setSpanError: () => setSpanError,
302
- withActiveSpan: () => withActiveSpan
303
- });
304
- function getTracer() {
305
- return trace.getTracer("visor");
306
- }
307
- async function withActiveSpan(name, attrs, fn) {
308
- const tracer = getTracer();
309
- return await new Promise((resolve, reject) => {
310
- const callback = async (span) => {
311
- try {
312
- const res = await fn(span);
313
- resolve(res);
314
- } catch (err) {
315
- try {
316
- if (err instanceof Error) span.recordException(err);
317
- span.setStatus({ code: SpanStatusCode.ERROR });
318
- } catch {
319
- }
320
- reject(err);
321
- } finally {
322
- try {
323
- span.end();
324
- } catch {
325
- }
326
- }
327
- };
328
- const options = attrs ? { attributes: attrs } : {};
329
- tracer.startActiveSpan(name, options, callback);
330
- });
331
- }
332
- function addEvent(name, attrs) {
333
- const span = trace.getSpan(context.active());
334
- if (span) {
335
- try {
336
- span.addEvent(name, attrs);
337
- } catch {
338
- }
339
- }
340
- try {
341
- const { emitNdjsonSpanWithEvents: emitNdjsonSpanWithEvents2 } = (init_fallback_ndjson(), __toCommonJS(fallback_ndjson_exports));
342
- emitNdjsonSpanWithEvents2("visor.event", {}, [{ name, attrs }]);
343
- if (name === "fail_if.triggered") {
344
- emitNdjsonSpanWithEvents2("visor.event", {}, [
345
- { name: "fail_if.evaluated", attrs },
346
- { name: "fail_if.triggered", attrs }
347
- ]);
348
- }
349
- } catch {
350
- }
351
- }
352
- function setSpanAttributes(attrs) {
353
- const span = trace.getSpan(context.active());
354
- if (!span) return;
355
- try {
356
- for (const [k, v] of Object.entries(attrs)) span.setAttribute(k, v);
357
- } catch {
358
- }
359
- }
360
- function setSpanError(err) {
361
- const span = trace.getSpan(context.active());
362
- if (!span) return;
363
- try {
364
- if (err instanceof Error) span.recordException(err);
365
- span.setStatus({ code: SpanStatusCode.ERROR });
366
- } catch {
367
- }
368
- }
369
- function getVisorRunAttributes() {
370
- const attrs = {};
371
- try {
372
- attrs["visor.version"] = process.env.VISOR_VERSION || (require_package()?.version ?? "dev");
373
- } catch {
374
- attrs["visor.version"] = "dev";
375
- }
376
- const commitShort = process.env.VISOR_COMMIT_SHORT || "";
377
- const commitFull = process.env.VISOR_COMMIT_SHA || process.env.VISOR_COMMIT || "";
378
- if (commitShort) {
379
- attrs["visor.commit"] = commitShort;
380
- }
381
- if (commitFull) {
382
- attrs["visor.commit.sha"] = commitFull;
383
- }
384
- return attrs;
385
- }
386
- function __getOrCreateNdjsonPath() {
387
- try {
388
- if (process.env.VISOR_TELEMETRY_SINK && process.env.VISOR_TELEMETRY_SINK !== "file")
389
- return null;
390
- const path2 = __require("path");
391
- const fs2 = __require("fs");
392
- if (process.env.VISOR_FALLBACK_TRACE_FILE) {
393
- __ndjsonPath = process.env.VISOR_FALLBACK_TRACE_FILE;
394
- const dir = path2.dirname(__ndjsonPath);
395
- if (!fs2.existsSync(dir)) fs2.mkdirSync(dir, { recursive: true });
396
- return __ndjsonPath;
397
- }
398
- const outDir = process.env.VISOR_TRACE_DIR || path2.join(process.cwd(), "output", "traces");
399
- if (!fs2.existsSync(outDir)) fs2.mkdirSync(outDir, { recursive: true });
400
- if (!__ndjsonPath) {
401
- const ts = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
402
- __ndjsonPath = path2.join(outDir, `${ts}.ndjson`);
403
- }
404
- return __ndjsonPath;
405
- } catch {
406
- return null;
407
- }
408
- }
409
- function _appendRunMarker() {
410
- try {
411
- const fs2 = __require("fs");
412
- const p = __getOrCreateNdjsonPath();
413
- if (!p) return;
414
- const line = { name: "visor.run", attributes: { started: true } };
415
- fs2.appendFileSync(p, JSON.stringify(line) + "\n", "utf8");
416
- } catch {
417
- }
418
- }
419
- var __ndjsonPath;
420
- var init_trace_helpers = __esm({
421
- "src/telemetry/trace-helpers.ts"() {
422
- init_lazy_otel();
423
- __ndjsonPath = null;
424
- }
425
- });
426
-
427
- export {
428
- emitNdjsonFallback,
429
- emitNdjsonSpanWithEvents,
430
- fallback_ndjson_exports,
431
- init_fallback_ndjson,
432
- getTracer,
433
- withActiveSpan,
434
- addEvent,
435
- setSpanAttributes,
436
- setSpanError,
437
- getVisorRunAttributes,
438
- __getOrCreateNdjsonPath,
439
- _appendRunMarker,
440
- trace_helpers_exports,
441
- init_trace_helpers
442
- };
443
- //# sourceMappingURL=chunk-O7WE6HCA.mjs.map