@probelabs/visor 0.1.96 → 0.1.98

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 (88) hide show
  1. package/README.md +20 -19
  2. package/defaults/.visor.yaml +3 -2
  3. package/dist/{168.index.js → 136.index.js} +5 -5
  4. package/dist/{272.index.js → 146.index.js} +5 -5
  5. package/dist/{13.index.js → 160.index.js} +5 -5
  6. package/dist/{421.index.js → 179.index.js} +3 -3
  7. package/dist/{85.index.js → 191.index.js} +5 -5
  8. package/dist/{544.index.js → 384.index.js} +3 -3
  9. package/dist/{861.index.js → 405.index.js} +3 -3
  10. package/dist/{320.index.js → 42.index.js} +3 -3
  11. package/dist/448.index.js +48 -0
  12. package/dist/{878.index.js → 491.index.js} +5 -5
  13. package/dist/663.index.js +321 -0
  14. package/dist/69.index.js +38 -0
  15. package/dist/{54.index.js → 760.index.js} +5 -5
  16. package/dist/80.index.js +263 -0
  17. package/dist/886.index.js +81 -0
  18. package/dist/917.index.js +82 -0
  19. package/dist/955.index.js +82 -0
  20. package/dist/ai-review-service.d.ts +2 -3
  21. package/dist/ai-review-service.d.ts.map +1 -1
  22. package/dist/check-execution-engine.d.ts.map +1 -1
  23. package/dist/cli.d.ts.map +1 -1
  24. package/dist/config.d.ts +5 -0
  25. package/dist/config.d.ts.map +1 -1
  26. package/dist/defaults/.visor.yaml +3 -2
  27. package/dist/generated/config-schema.d.ts +24 -3
  28. package/dist/generated/config-schema.d.ts.map +1 -1
  29. package/dist/generated/config-schema.json +28 -3
  30. package/dist/index.js +198171 -161819
  31. package/dist/proto/protoc-gen-validate/LICENSE +202 -0
  32. package/dist/proto/protoc-gen-validate/validate/validate.proto +797 -0
  33. package/dist/proto/xds/LICENSE +201 -0
  34. package/dist/proto/xds/xds/data/orca/v3/orca_load_report.proto +58 -0
  35. package/dist/proto/xds/xds/service/orca/v3/orca.proto +36 -0
  36. package/dist/protoc-gen-validate/LICENSE +202 -0
  37. package/dist/protoc-gen-validate/validate/validate.proto +797 -0
  38. package/dist/providers/check-provider-registry.d.ts.map +1 -1
  39. package/dist/providers/index.d.ts +1 -0
  40. package/dist/providers/index.d.ts.map +1 -1
  41. package/dist/providers/mcp-check-provider.d.ts +102 -0
  42. package/dist/providers/mcp-check-provider.d.ts.map +1 -0
  43. package/dist/sdk/check-execution-engine-W5FLIWZL.mjs +11 -0
  44. package/dist/sdk/chunk-IG3BFIIN.mjs +174 -0
  45. package/dist/sdk/chunk-IG3BFIIN.mjs.map +1 -0
  46. package/dist/sdk/{chunk-Q4S5A5TO.mjs → chunk-POYXI3MQ.mjs} +610 -21
  47. package/dist/sdk/chunk-POYXI3MQ.mjs.map +1 -0
  48. package/dist/sdk/chunk-YXOWIDEF.mjs +60 -0
  49. package/dist/sdk/chunk-YXOWIDEF.mjs.map +1 -0
  50. package/dist/sdk/{mermaid-telemetry-LZGDD35I.mjs → mermaid-telemetry-4DUEYCLE.mjs} +2 -2
  51. package/dist/sdk/sdk.d.mts +16 -3
  52. package/dist/sdk/sdk.d.ts +16 -3
  53. package/dist/sdk/sdk.js +994 -1513
  54. package/dist/sdk/sdk.js.map +1 -1
  55. package/dist/sdk/sdk.mjs +70 -13
  56. package/dist/sdk/sdk.mjs.map +1 -1
  57. package/dist/sdk/{tracer-init-O7RLXMJ3.mjs → tracer-init-RJGAIOBP.mjs} +2 -2
  58. package/dist/session-registry.d.ts +2 -3
  59. package/dist/session-registry.d.ts.map +1 -1
  60. package/dist/traces/run-2025-10-19T19-05-29-328Z.ndjson +40 -0
  61. package/dist/traces/run-2025-10-19T19-05-42-253Z.ndjson +40 -0
  62. package/dist/traces/run-2025-10-19T19-05-42-805Z.ndjson +40 -0
  63. package/dist/traces/run-2025-10-19T19-05-43-323Z.ndjson +40 -0
  64. package/dist/traces/run-2025-10-19T19-05-43-841Z.ndjson +12 -0
  65. package/dist/types/config.d.ts +16 -3
  66. package/dist/types/config.d.ts.map +1 -1
  67. package/dist/utils/config-loader.d.ts +5 -0
  68. package/dist/utils/config-loader.d.ts.map +1 -1
  69. package/dist/utils/tracer-init.d.ts +3 -4
  70. package/dist/utils/tracer-init.d.ts.map +1 -1
  71. package/dist/xds/LICENSE +201 -0
  72. package/dist/xds/xds/data/orca/v3/orca_load_report.proto +58 -0
  73. package/dist/xds/xds/service/orca/v3/orca.proto +36 -0
  74. package/package.json +15 -8
  75. package/dist/sdk/check-execution-engine-NMPXJ7FQ.mjs +0 -11
  76. package/dist/sdk/chunk-KVHVCGY6.mjs +0 -103
  77. package/dist/sdk/chunk-KVHVCGY6.mjs.map +0 -1
  78. package/dist/sdk/chunk-Q4S5A5TO.mjs.map +0 -1
  79. package/dist/sdk/chunk-TWJKAYT6.mjs +0 -1124
  80. package/dist/sdk/chunk-TWJKAYT6.mjs.map +0 -1
  81. /package/dist/{traces/run-2025-10-18T20-24-27-886Z.ndjson → output/traces/run-2025-10-19T19-05-29-328Z.ndjson} +0 -0
  82. /package/dist/{traces/run-2025-10-18T20-24-38-817Z.ndjson → output/traces/run-2025-10-19T19-05-42-253Z.ndjson} +0 -0
  83. /package/dist/{traces/run-2025-10-18T20-24-39-361Z.ndjson → output/traces/run-2025-10-19T19-05-42-805Z.ndjson} +0 -0
  84. /package/dist/{traces/run-2025-10-18T20-24-39-852Z.ndjson → output/traces/run-2025-10-19T19-05-43-323Z.ndjson} +0 -0
  85. /package/dist/{traces/run-2025-10-18T20-24-40-335Z.ndjson → output/traces/run-2025-10-19T19-05-43-841Z.ndjson} +0 -0
  86. /package/dist/sdk/{check-execution-engine-NMPXJ7FQ.mjs.map → check-execution-engine-W5FLIWZL.mjs.map} +0 -0
  87. /package/dist/sdk/{mermaid-telemetry-LZGDD35I.mjs.map → mermaid-telemetry-4DUEYCLE.mjs.map} +0 -0
  88. /package/dist/sdk/{tracer-init-O7RLXMJ3.mjs.map → tracer-init-RJGAIOBP.mjs.map} +0 -0
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,58 @@
1
+ syntax = "proto3";
2
+
3
+ package xds.data.orca.v3;
4
+
5
+ option java_outer_classname = "OrcaLoadReportProto";
6
+ option java_multiple_files = true;
7
+ option java_package = "com.github.xds.data.orca.v3";
8
+ option go_package = "github.com/cncf/xds/go/xds/data/orca/v3";
9
+
10
+ import "validate/validate.proto";
11
+
12
+ // See section `ORCA load report format` of the design document in
13
+ // :ref:`https://github.com/envoyproxy/envoy/issues/6614`.
14
+
15
+ message OrcaLoadReport {
16
+ // CPU utilization expressed as a fraction of available CPU resources. This
17
+ // should be derived from the latest sample or measurement. The value may be
18
+ // larger than 1.0 when the usage exceeds the reporter dependent notion of
19
+ // soft limits.
20
+ double cpu_utilization = 1 [(validate.rules).double.gte = 0];
21
+
22
+ // Memory utilization expressed as a fraction of available memory
23
+ // resources. This should be derived from the latest sample or measurement.
24
+ double mem_utilization = 2 [(validate.rules).double.gte = 0, (validate.rules).double.lte = 1];
25
+
26
+ // Total RPS being served by an endpoint. This should cover all services that an endpoint is
27
+ // responsible for.
28
+ // Deprecated -- use ``rps_fractional`` field instead.
29
+ uint64 rps = 3 [deprecated = true];
30
+
31
+ // Application specific requests costs. Each value is an absolute cost (e.g. 3487 bytes of
32
+ // storage) associated with the request.
33
+ map<string, double> request_cost = 4;
34
+
35
+ // Resource utilization values. Each value is expressed as a fraction of total resources
36
+ // available, derived from the latest sample or measurement.
37
+ map<string, double> utilization = 5
38
+ [(validate.rules).map.values.double.gte = 0, (validate.rules).map.values.double.lte = 1];
39
+
40
+ // Total RPS being served by an endpoint. This should cover all services that an endpoint is
41
+ // responsible for.
42
+ double rps_fractional = 6 [(validate.rules).double.gte = 0];
43
+
44
+ // Total EPS (errors/second) being served by an endpoint. This should cover
45
+ // all services that an endpoint is responsible for.
46
+ double eps = 7 [(validate.rules).double.gte = 0];
47
+
48
+ // Application specific opaque metrics.
49
+ map<string, double> named_metrics = 8;
50
+
51
+ // Application specific utilization expressed as a fraction of available
52
+ // resources. For example, an application may report the max of CPU and memory
53
+ // utilization for better load balancing if it is both CPU and memory bound.
54
+ // This should be derived from the latest sample or measurement.
55
+ // The value may be larger than 1.0 when the usage exceeds the reporter
56
+ // dependent notion of soft limits.
57
+ double application_utilization = 9 [(validate.rules).double.gte = 0];
58
+ }
@@ -0,0 +1,36 @@
1
+ syntax = "proto3";
2
+
3
+ package xds.service.orca.v3;
4
+
5
+ option java_outer_classname = "OrcaProto";
6
+ option java_multiple_files = true;
7
+ option java_package = "com.github.xds.service.orca.v3";
8
+ option go_package = "github.com/cncf/xds/go/xds/service/orca/v3";
9
+
10
+ import "xds/data/orca/v3/orca_load_report.proto";
11
+
12
+ import "google/protobuf/duration.proto";
13
+
14
+ // See section `Out-of-band (OOB) reporting` of the design document in
15
+ // :ref:`https://github.com/envoyproxy/envoy/issues/6614`.
16
+
17
+ // Out-of-band (OOB) load reporting service for the additional load reporting
18
+ // agent that does not sit in the request path. Reports are periodically sampled
19
+ // with sufficient frequency to provide temporal association with requests.
20
+ // OOB reporting compensates the limitation of in-band reporting in revealing
21
+ // costs for backends that do not provide a steady stream of telemetry such as
22
+ // long running stream operations and zero QPS services. This is a server
23
+ // streaming service, client needs to terminate current RPC and initiate
24
+ // a new call to change backend reporting frequency.
25
+ service OpenRcaService {
26
+ rpc StreamCoreMetrics(OrcaLoadReportRequest) returns (stream xds.data.orca.v3.OrcaLoadReport);
27
+ }
28
+
29
+ message OrcaLoadReportRequest {
30
+ // Interval for generating Open RCA core metric responses.
31
+ google.protobuf.Duration report_interval = 1;
32
+ // Request costs to collect. If this is empty, all known requests costs tracked by
33
+ // the load reporting agent will be returned. This provides an opportunity for
34
+ // the client to selectively obtain a subset of tracked costs.
35
+ repeated string request_cost_names = 2;
36
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@probelabs/visor",
3
- "version": "0.1.96",
3
+ "version": "0.1.98",
4
4
  "main": "dist/index.js",
5
5
  "bin": {
6
6
  "visor": "./dist/index.js"
@@ -31,7 +31,7 @@
31
31
  "registry": "https://registry.npmjs.org/"
32
32
  },
33
33
  "scripts": {
34
- "build:cli": "ncc build src/index.ts -o dist && cp -r defaults dist/ && 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",
34
+ "build:cli": "ncc build src/index.ts -o dist && cp -r defaults dist/ && cp -r output dist/ && 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",
35
35
  "build:sdk": "tsup src/sdk.ts --dts --sourcemap --format esm,cjs --out-dir dist/sdk",
36
36
  "build": "npm run build:cli && npm run build:sdk",
37
37
  "test": "jest",
@@ -85,12 +85,23 @@
85
85
  "homepage": "https://github.com/probelabs/visor#readme",
86
86
  "dependencies": {
87
87
  "@actions/core": "^1.11.1",
88
+ "@modelcontextprotocol/sdk": "^1.20.1",
88
89
  "@nyariv/sandboxjs": "^0.8.25",
89
90
  "@octokit/action": "^8.0.2",
90
91
  "@octokit/auth-app": "^8.1.0",
91
92
  "@octokit/core": "^7.0.3",
92
93
  "@octokit/rest": "^22.0.0",
93
- "@probelabs/probe": "^0.6.0-rc146",
94
+ "@opentelemetry/api": "^1.9.0",
95
+ "@opentelemetry/core": "^1.30.1",
96
+ "@opentelemetry/exporter-trace-otlp-grpc": "^0.203.0",
97
+ "@opentelemetry/exporter-trace-otlp-http": "^0.203.0",
98
+ "@opentelemetry/instrumentation": "^0.203.0",
99
+ "@opentelemetry/resources": "^1.30.1",
100
+ "@opentelemetry/sdk-metrics": "^1.30.1",
101
+ "@opentelemetry/sdk-node": "^0.203.0",
102
+ "@opentelemetry/sdk-trace-base": "^1.30.1",
103
+ "@opentelemetry/semantic-conventions": "^1.30.1",
104
+ "@probelabs/probe": "^0.6.0-rc148",
94
105
  "@types/commander": "^2.12.0",
95
106
  "@types/uuid": "^10.0.0",
96
107
  "ajv": "^8.17.1",
@@ -131,15 +142,11 @@
131
142
  "wrangler": "^3.0.0"
132
143
  },
133
144
  "peerDependencies": {
134
- "@anthropic/claude-code-sdk": "^1.0.0",
135
- "@modelcontextprotocol/sdk": "^1.0.0"
145
+ "@anthropic/claude-code-sdk": "^1.0.0"
136
146
  },
137
147
  "peerDependenciesMeta": {
138
148
  "@anthropic/claude-code-sdk": {
139
149
  "optional": true
140
- },
141
- "@modelcontextprotocol/sdk": {
142
- "optional": true
143
150
  }
144
151
  },
145
152
  "directories": {
@@ -1,11 +0,0 @@
1
- import {
2
- CheckExecutionEngine
3
- } from "./chunk-Q4S5A5TO.mjs";
4
- import "./chunk-KVHVCGY6.mjs";
5
- import "./chunk-I3GQJIR7.mjs";
6
- import "./chunk-TWJKAYT6.mjs";
7
- import "./chunk-WMJKH4XE.mjs";
8
- export {
9
- CheckExecutionEngine
10
- };
11
- //# sourceMappingURL=check-execution-engine-NMPXJ7FQ.mjs.map
@@ -1,103 +0,0 @@
1
- import {
2
- __esm
3
- } from "./chunk-WMJKH4XE.mjs";
4
-
5
- // src/utils/tracer-init.ts
6
- import * as path from "path";
7
- import * as fs from "fs";
8
- import { TelemetryConfig, AppTracer, SimpleTelemetry, SimpleAppTracer } from "@probelabs/probe";
9
- async function initializeTracer(sessionId, checkName) {
10
- try {
11
- if (TelemetryConfig && AppTracer) {
12
- const sanitizedCheckName = checkName ? path.basename(checkName) : "check";
13
- const timestamp = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
14
- const traceDir = process.env.GITHUB_WORKSPACE ? path.join(process.env.GITHUB_WORKSPACE, "debug-artifacts") : path.join(process.cwd(), "debug-artifacts");
15
- if (!fs.existsSync(traceDir)) {
16
- fs.mkdirSync(traceDir, { recursive: true });
17
- }
18
- const traceFilePath = path.join(traceDir, `trace-${sanitizedCheckName}-${timestamp}.jsonl`);
19
- const resolvedTracePath = path.resolve(traceFilePath);
20
- const resolvedTraceDir = path.resolve(traceDir);
21
- if (!resolvedTracePath.startsWith(resolvedTraceDir)) {
22
- console.error(
23
- `\u26A0\uFE0F Security: Attempted path traversal detected. Check name: ${checkName}, resolved path: ${resolvedTracePath}`
24
- );
25
- return null;
26
- }
27
- const telemetryConfig = new TelemetryConfig({
28
- serviceName: "visor-ai",
29
- serviceVersion: "1.0.0",
30
- enableFile: true,
31
- filePath: traceFilePath,
32
- enableConsole: false,
33
- // Disable console to reduce noise
34
- enableRemote: false
35
- // Can be enabled via OTEL_EXPORTER_OTLP_ENDPOINT env var
36
- });
37
- telemetryConfig.initialize();
38
- const tracer = new AppTracer(telemetryConfig, sessionId);
39
- console.error(`\u{1F4CA} OpenTelemetry tracing enabled for visor-ai, saving to: ${traceFilePath}`);
40
- console.error(
41
- `\u{1F332} Trace spans will show hierarchical relationships between visor checks and probe agent operations`
42
- );
43
- if (process.env.GITHUB_ACTIONS) {
44
- console.log(
45
- `::notice title=AI Trace::OpenTelemetry trace will be saved to ${traceFilePath}`
46
- );
47
- console.log(`::set-output name=trace-path::${traceFilePath}`);
48
- }
49
- return { tracer, telemetryConfig, filePath: traceFilePath };
50
- }
51
- if (SimpleTelemetry && SimpleAppTracer) {
52
- console.warn(
53
- "\u26A0\uFE0F Using SimpleTelemetry fallback - hierarchical span relationships may not be available"
54
- );
55
- const sanitizedCheckName = checkName ? path.basename(checkName) : "check";
56
- const timestamp = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
57
- const traceDir = process.env.GITHUB_WORKSPACE ? path.join(process.env.GITHUB_WORKSPACE, "debug-artifacts") : path.join(process.cwd(), "debug-artifacts");
58
- if (!fs.existsSync(traceDir)) {
59
- fs.mkdirSync(traceDir, { recursive: true });
60
- }
61
- const traceFilePath = path.join(traceDir, `trace-${sanitizedCheckName}-${timestamp}.jsonl`);
62
- const resolvedTracePath = path.resolve(traceFilePath);
63
- const resolvedTraceDir = path.resolve(traceDir);
64
- if (!resolvedTracePath.startsWith(resolvedTraceDir)) {
65
- console.error(
66
- `\u26A0\uFE0F Security: Attempted path traversal detected. Check name: ${checkName}, resolved path: ${resolvedTracePath}`
67
- );
68
- return null;
69
- }
70
- const telemetry = new SimpleTelemetry({
71
- enableFile: true,
72
- filePath: traceFilePath,
73
- enableConsole: false
74
- });
75
- const tracer = new SimpleAppTracer(telemetry, sessionId);
76
- console.error(`\u{1F4CA} Simple tracing enabled, will save to: ${traceFilePath}`);
77
- if (process.env.GITHUB_ACTIONS) {
78
- console.log(`::notice title=AI Trace::Trace will be saved to ${traceFilePath}`);
79
- console.log(`::set-output name=trace-path::${traceFilePath}`);
80
- }
81
- return {
82
- tracer,
83
- telemetryConfig: telemetry,
84
- filePath: traceFilePath
85
- };
86
- }
87
- console.error("\u26A0\uFE0F Telemetry classes not available in ProbeAgent, skipping tracing");
88
- return null;
89
- } catch (error) {
90
- console.error("\u26A0\uFE0F Warning: Failed to initialize tracing:", error);
91
- return null;
92
- }
93
- }
94
- var init_tracer_init = __esm({
95
- "src/utils/tracer-init.ts"() {
96
- }
97
- });
98
-
99
- export {
100
- initializeTracer,
101
- init_tracer_init
102
- };
103
- //# sourceMappingURL=chunk-KVHVCGY6.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/utils/tracer-init.ts"],"sourcesContent":["import * as path from 'path';\nimport * as fs from 'fs';\nimport { TelemetryConfig, AppTracer, SimpleTelemetry, SimpleAppTracer } from '@probelabs/probe';\n\n/**\n * Safely initialize a tracer for ProbeAgent with proper path sanitization\n * Uses full OpenTelemetry integration for hierarchical span relationships\n * This prevents path traversal vulnerabilities by sanitizing the checkName\n */\nexport async function initializeTracer(\n sessionId: string,\n checkName?: string\n): Promise<{ tracer: AppTracer; telemetryConfig: TelemetryConfig; filePath: string } | null> {\n try {\n // Try to use full OpenTelemetry integration first (provides proper span hierarchy)\n if (TelemetryConfig && AppTracer) {\n // SECURITY: Sanitize checkName to prevent path traversal attacks\n // Use path.basename to strip any directory traversal characters (../, etc.)\n const sanitizedCheckName = checkName ? path.basename(checkName) : 'check';\n\n // Create trace file path in debug-artifacts directory\n const timestamp = new Date().toISOString().replace(/[:.]/g, '-');\n const traceDir = process.env.GITHUB_WORKSPACE\n ? path.join(process.env.GITHUB_WORKSPACE, 'debug-artifacts')\n : path.join(process.cwd(), 'debug-artifacts');\n\n // Create traces directory if it doesn't exist\n if (!fs.existsSync(traceDir)) {\n fs.mkdirSync(traceDir, { recursive: true });\n }\n\n // SECURITY: Use path.join to safely construct the path\n // This ensures the final path is within traceDir\n const traceFilePath = path.join(traceDir, `trace-${sanitizedCheckName}-${timestamp}.jsonl`);\n\n // SECURITY: Verify the resolved path is within the intended directory\n const resolvedTracePath = path.resolve(traceFilePath);\n const resolvedTraceDir = path.resolve(traceDir);\n if (!resolvedTracePath.startsWith(resolvedTraceDir)) {\n console.error(\n `⚠️ Security: Attempted path traversal detected. Check name: ${checkName}, resolved path: ${resolvedTracePath}`\n );\n return null;\n }\n\n // Initialize OpenTelemetry with file exporter\n // This provides proper span hierarchy and parent-child relationships\n const telemetryConfig = new TelemetryConfig({\n serviceName: 'visor-ai',\n serviceVersion: '1.0.0',\n enableFile: true,\n filePath: traceFilePath,\n enableConsole: false, // Disable console to reduce noise\n enableRemote: false, // Can be enabled via OTEL_EXPORTER_OTLP_ENDPOINT env var\n });\n\n // Initialize the OpenTelemetry SDK\n telemetryConfig.initialize();\n\n // Create the AppTracer with session ID for consistent tracing\n const tracer = new AppTracer(telemetryConfig, sessionId);\n\n console.error(`📊 OpenTelemetry tracing enabled for visor-ai, saving to: ${traceFilePath}`);\n console.error(\n `🌲 Trace spans will show hierarchical relationships between visor checks and probe agent operations`\n );\n\n // If in GitHub Actions, log the path for artifact upload\n if (process.env.GITHUB_ACTIONS) {\n console.log(\n `::notice title=AI Trace::OpenTelemetry trace will be saved to ${traceFilePath}`\n );\n console.log(`::set-output name=trace-path::${traceFilePath}`);\n }\n\n return { tracer, telemetryConfig, filePath: traceFilePath };\n }\n\n // Fallback to SimpleTelemetry if full OpenTelemetry is not available\n if (SimpleTelemetry && SimpleAppTracer) {\n console.warn(\n '⚠️ Using SimpleTelemetry fallback - hierarchical span relationships may not be available'\n );\n\n // SECURITY: Sanitize checkName to prevent path traversal attacks\n const sanitizedCheckName = checkName ? path.basename(checkName) : 'check';\n\n // Create trace file path in debug-artifacts directory\n const timestamp = new Date().toISOString().replace(/[:.]/g, '-');\n const traceDir = process.env.GITHUB_WORKSPACE\n ? path.join(process.env.GITHUB_WORKSPACE, 'debug-artifacts')\n : path.join(process.cwd(), 'debug-artifacts');\n\n // Create traces directory if it doesn't exist\n if (!fs.existsSync(traceDir)) {\n fs.mkdirSync(traceDir, { recursive: true });\n }\n\n // SECURITY: Use path.join to safely construct the path\n const traceFilePath = path.join(traceDir, `trace-${sanitizedCheckName}-${timestamp}.jsonl`);\n\n // SECURITY: Verify the resolved path is within the intended directory\n const resolvedTracePath = path.resolve(traceFilePath);\n const resolvedTraceDir = path.resolve(traceDir);\n if (!resolvedTracePath.startsWith(resolvedTraceDir)) {\n console.error(\n `⚠️ Security: Attempted path traversal detected. Check name: ${checkName}, resolved path: ${resolvedTracePath}`\n );\n return null;\n }\n\n // Initialize simple telemetry\n const telemetry = new SimpleTelemetry({\n enableFile: true,\n filePath: traceFilePath,\n enableConsole: false,\n });\n\n const tracer = new SimpleAppTracer(telemetry, sessionId);\n\n console.error(`📊 Simple tracing enabled, will save to: ${traceFilePath}`);\n\n // If in GitHub Actions, log the path for artifact upload\n if (process.env.GITHUB_ACTIONS) {\n console.log(`::notice title=AI Trace::Trace will be saved to ${traceFilePath}`);\n console.log(`::set-output name=trace-path::${traceFilePath}`);\n }\n\n // Return with proper typing for SimpleTelemetry\n return {\n tracer: tracer as any as AppTracer,\n telemetryConfig: telemetry as any as TelemetryConfig,\n filePath: traceFilePath,\n };\n }\n\n console.error('⚠️ Telemetry classes not available in ProbeAgent, skipping tracing');\n return null;\n } catch (error) {\n console.error('⚠️ Warning: Failed to initialize tracing:', error);\n return null;\n }\n}\n"],"mappings":";;;;;AAAA,YAAY,UAAU;AACtB,YA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