@shaik_munawar/doc-verify 1.0.2

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 (43) hide show
  1. package/.github/workflows/test-action.yml +20 -0
  2. package/.github/workflows/verify.yml +43 -0
  3. package/README.md +265 -0
  4. package/action.yml +42 -0
  5. package/dist/ai/cache.js +42 -0
  6. package/dist/ai/prompt.js +483 -0
  7. package/dist/ai/repair.js +131 -0
  8. package/dist/auth.proto +54 -0
  9. package/dist/engine/mocks/network-shim.js +29 -0
  10. package/dist/engine/runner.js +15 -0
  11. package/dist/index.js +110198 -0
  12. package/dist/licenses.txt +4049 -0
  13. package/dist/pagent.exe +0 -0
  14. package/dist/parser/extracts.js +39 -0
  15. package/dist/proto/channelz.proto +564 -0
  16. package/dist/proto/protoc-gen-validate/LICENSE +202 -0
  17. package/dist/proto/protoc-gen-validate/validate/validate.proto +797 -0
  18. package/dist/proto/xds/LICENSE +201 -0
  19. package/dist/proto/xds/xds/data/orca/v3/orca_load_report.proto +58 -0
  20. package/dist/proto/xds/xds/service/orca/v3/orca.proto +36 -0
  21. package/dist/protoc-gen-validate/LICENSE +202 -0
  22. package/dist/protoc-gen-validate/validate/validate.proto +797 -0
  23. package/dist/runners/base-runner.js +96 -0
  24. package/dist/runners/bash-runner.js +12 -0
  25. package/dist/runners/c-runner.js +12 -0
  26. package/dist/runners/cpp-runner.js +12 -0
  27. package/dist/runners/go-runner.js +12 -0
  28. package/dist/runners/index.js +96 -0
  29. package/dist/runners/java-runner.js +12 -0
  30. package/dist/runners/javascript-runner.js +16 -0
  31. package/dist/runners/lua-runner.js +12 -0
  32. package/dist/runners/perl-runner.js +12 -0
  33. package/dist/runners/php-runner.js +12 -0
  34. package/dist/runners/python-runner.js +12 -0
  35. package/dist/runners/ruby-runner.js +12 -0
  36. package/dist/runners/rust-runner.js +12 -0
  37. package/dist/runners/typescript-runner.js +16 -0
  38. package/dist/utils/badge.js +27 -0
  39. package/dist/utils/patcher.js +23 -0
  40. package/dist/xds/LICENSE +201 -0
  41. package/dist/xds/xds/data/orca/v3/orca_load_report.proto +58 -0
  42. package/dist/xds/xds/service/orca/v3/orca.proto +36 -0
  43. package/package.json +42 -0
@@ -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 ADDED
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "@shaik_munawar/doc-verify",
3
+ "version": "1.0.2",
4
+ "description": "Verify documentation code snippets by running them in sandboxed Docker containers",
5
+ "type": "commonjs",
6
+ "main": "index.js",
7
+ "scripts": {
8
+ "dev": "tsx src/index.ts",
9
+ "build": "tsc",
10
+ "start": "node dist/index.js",
11
+ "test": "echo \"Error: no test specified\" && exit 1",
12
+ "bundle": "ncc build src/index.ts -o dist --license licenses.txt"
13
+ },
14
+ "bin": {
15
+ "dv": "./dist/index.js"
16
+ },
17
+ "keywords": [],
18
+ "author": "Shaik Abdul Munawar",
19
+ "license": "MIT",
20
+ "dependencies": {
21
+ "@inquirer/prompts": "^8.1.0",
22
+ "chalk": "^5.6.2",
23
+ "commander": "^14.0.2",
24
+ "dockerode": "^4.0.9",
25
+ "dotenv": "^17.2.3",
26
+ "mdast": "^3.0.0",
27
+ "openai": "^6.15.0",
28
+ "remark-gfm": "^4.0.1",
29
+ "remark-parse": "^11.0.0",
30
+ "unified": "^11.0.5",
31
+ "unist-util-visit": "^5.0.0"
32
+ },
33
+ "devDependencies": {
34
+ "@types/dockerode": "^3.3.47",
35
+ "@types/mdast": "^4.0.4",
36
+ "@types/node": "^25.0.3",
37
+ "@types/unist": "^3.0.3",
38
+ "@vercel/ncc": "^0.38.4",
39
+ "tsx": "^4.21.0",
40
+ "typescript": "^5.9.3"
41
+ }
42
+ }