@probelabs/visor 0.1.124 → 0.1.126

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 (195) hide show
  1. package/dist/config.d.ts.map +1 -1
  2. package/dist/docs/DEPLOYMENT.md +117 -11
  3. package/dist/docs/GITHUB_CHECKS.md +18 -4
  4. package/dist/docs/NPM_USAGE.md +112 -39
  5. package/dist/docs/action-reference.md +63 -9
  6. package/dist/docs/advanced-ai.md +58 -51
  7. package/dist/docs/ai-configuration.md +99 -11
  8. package/dist/docs/ai-custom-tools-usage.md +70 -33
  9. package/dist/docs/ai-custom-tools.md +50 -27
  10. package/dist/docs/architecture.md +1232 -0
  11. package/dist/docs/bot-transports-rfc.md +13 -3
  12. package/dist/docs/ci-cli-mode.md +116 -8
  13. package/dist/docs/claude-code.md +111 -41
  14. package/dist/docs/command-provider.md +37 -15
  15. package/dist/docs/commands.md +252 -6
  16. package/dist/docs/configuration.md +138 -4
  17. package/dist/docs/contributing.md +737 -0
  18. package/dist/docs/custom-tools.md +39 -8
  19. package/dist/docs/dashboards/README.md +33 -19
  20. package/dist/docs/debug-visualizer-progress.md +14 -13
  21. package/dist/docs/debug-visualizer-rfc.md +14 -13
  22. package/dist/docs/debug-visualizer.md +30 -5
  23. package/dist/docs/debugging.md +73 -8
  24. package/dist/docs/default-output-schema.md +24 -20
  25. package/dist/docs/dependencies.md +75 -21
  26. package/dist/docs/dev-playbook.md +85 -9
  27. package/dist/docs/engine-pause-resume-rfc.md +11 -11
  28. package/dist/docs/engine-state-machine-plan.md +10 -3
  29. package/dist/docs/event-driven-github-integration-rfc.md +20 -11
  30. package/dist/docs/event-triggers.md +95 -6
  31. package/dist/docs/execution-statistics-rfc.md +16 -4
  32. package/dist/docs/fact-validator-gap-analysis.md +12 -1
  33. package/dist/docs/fact-validator-implementation-plan.md +19 -11
  34. package/dist/docs/fail-if.md +116 -11
  35. package/dist/docs/failure-conditions-implementation.md +40 -6
  36. package/dist/docs/failure-conditions-schema.md +243 -87
  37. package/dist/docs/failure-routing-rfc.md +43 -18
  38. package/dist/docs/failure-routing.md +80 -23
  39. package/dist/docs/faq.md +836 -0
  40. package/dist/docs/foreach-dependency-propagation.md +32 -15
  41. package/dist/docs/github-ops.md +6 -5
  42. package/dist/docs/glossary.md +322 -0
  43. package/dist/docs/goto-forward-run-plan.md +23 -10
  44. package/dist/docs/guides/criticality-modes.md +15 -13
  45. package/dist/docs/guides/fault-management-and-contracts.md +8 -5
  46. package/dist/docs/guides/workflow-style-guide.md +17 -8
  47. package/dist/docs/http.md +102 -3
  48. package/dist/docs/human-input-provider.md +20 -36
  49. package/dist/docs/index.md +206 -0
  50. package/dist/docs/lifecycle-hooks.md +322 -2
  51. package/dist/docs/limits.md +20 -5
  52. package/dist/docs/liquid-templates.md +86 -14
  53. package/dist/docs/loop-routing-refactor.md +4 -2
  54. package/dist/docs/mcp-provider.md +53 -19
  55. package/dist/docs/mcp.md +27 -1
  56. package/dist/docs/memory.md +7 -2
  57. package/dist/docs/migration.md +596 -0
  58. package/dist/docs/observability.md +227 -6
  59. package/dist/docs/output-formats.md +388 -9
  60. package/dist/docs/output-history.md +36 -6
  61. package/dist/docs/performance.md +510 -4
  62. package/dist/docs/pluggable.md +95 -4
  63. package/dist/docs/proposals/snapshot-scope-execution.md +6 -5
  64. package/dist/docs/providers/git-checkout.md +16 -14
  65. package/dist/docs/providers/noop.md +696 -0
  66. package/dist/docs/recipes.md +8 -9
  67. package/dist/docs/rfc/git-checkout-step.md +3 -1
  68. package/dist/docs/rfc/on_init-hook.md +18 -5
  69. package/dist/docs/rfc/workspace-isolation.md +16 -0
  70. package/dist/docs/roadmap/criticality-implementation-tasks.md +27 -27
  71. package/dist/docs/router-patterns.md +155 -43
  72. package/dist/docs/schema-templates.md +51 -15
  73. package/dist/docs/script.md +162 -13
  74. package/dist/docs/sdk.md +46 -12
  75. package/dist/docs/security.md +464 -5
  76. package/dist/docs/slack-integration.md +481 -0
  77. package/dist/docs/tag-filtering.md +60 -20
  78. package/dist/docs/telemetry-setup.md +157 -46
  79. package/dist/docs/test-framework-rfc.md +37 -36
  80. package/dist/docs/testing/assertions.md +92 -4
  81. package/dist/docs/testing/ci.md +56 -7
  82. package/dist/docs/testing/cli.md +57 -15
  83. package/dist/docs/testing/cookbook.md +53 -20
  84. package/dist/docs/testing/dsl-reference.md +110 -9
  85. package/dist/docs/testing/fixtures-and-mocks.md +28 -3
  86. package/dist/docs/testing/flows.md +59 -4
  87. package/dist/docs/testing/getting-started.md +14 -13
  88. package/dist/docs/testing/troubleshooting.md +39 -2
  89. package/dist/docs/timeouts.md +174 -18
  90. package/dist/docs/troubleshooting.md +176 -6
  91. package/dist/docs/workflow-creation-guide.md +101 -3
  92. package/dist/docs/workflows.md +138 -41
  93. package/dist/examples/README.md +169 -4
  94. package/dist/examples/ai-custom-tools-simple.yaml +2 -3
  95. package/dist/examples/cron-webhook-config.yaml +15 -0
  96. package/dist/examples/forEach-example.yaml +6 -0
  97. package/dist/examples/git-checkout-basic.yaml +4 -0
  98. package/dist/examples/git-checkout-compare.yaml +6 -0
  99. package/dist/examples/git-checkout-cross-repo.yaml +7 -0
  100. package/dist/examples/http-integration-config.yaml +30 -0
  101. package/dist/examples/https-server-config.yaml +15 -0
  102. package/dist/examples/mcp-provider-example.yaml +10 -10
  103. package/dist/examples/transform-example.yaml +3 -0
  104. package/dist/examples/webhook-pipeline-config.yaml +18 -0
  105. package/dist/examples/workflows/workflow-composition-example.yaml +4 -0
  106. package/dist/frontends/slack-frontend.d.ts +2 -0
  107. package/dist/frontends/slack-frontend.d.ts.map +1 -1
  108. package/dist/generated/config-schema.d.ts +11 -7
  109. package/dist/generated/config-schema.d.ts.map +1 -1
  110. package/dist/generated/config-schema.json +11 -7
  111. package/dist/index.js +3127 -974
  112. package/dist/output/traces/{run-2026-01-28T16-15-24-569Z.ndjson → run-2026-01-31T16-37-22-321Z.ndjson} +84 -84
  113. package/dist/output/traces/{run-2026-01-28T16-16-09-757Z.ndjson → run-2026-01-31T16-38-06-031Z.ndjson} +1013 -1013
  114. package/dist/providers/ai-check-provider.d.ts +9 -2
  115. package/dist/providers/ai-check-provider.d.ts.map +1 -1
  116. package/dist/providers/command-check-provider.d.ts.map +1 -1
  117. package/dist/providers/mcp-custom-sse-server.d.ts +17 -1
  118. package/dist/providers/mcp-custom-sse-server.d.ts.map +1 -1
  119. package/dist/providers/workflow-check-provider.d.ts.map +1 -1
  120. package/dist/providers/workflow-tool-executor.d.ts +68 -0
  121. package/dist/providers/workflow-tool-executor.d.ts.map +1 -0
  122. package/dist/sdk/{check-provider-registry-AQ3JETBG.mjs → check-provider-registry-3KI5RKXT.mjs} +6 -5
  123. package/dist/sdk/check-provider-registry-IYILYY35.mjs +28 -0
  124. package/dist/sdk/chunk-2CPMMNIX.mjs +1459 -0
  125. package/dist/sdk/chunk-2CPMMNIX.mjs.map +1 -0
  126. package/dist/sdk/chunk-5LI6T4O3.mjs +3600 -0
  127. package/dist/sdk/chunk-5LI6T4O3.mjs.map +1 -0
  128. package/dist/sdk/{chunk-YLQ4UN62.mjs → chunk-A4PGHURG.mjs} +6838 -6257
  129. package/dist/sdk/chunk-A4PGHURG.mjs.map +1 -0
  130. package/dist/sdk/chunk-EXFGO4FX.mjs +147 -0
  131. package/dist/sdk/chunk-EXFGO4FX.mjs.map +1 -0
  132. package/dist/sdk/chunk-PJ7K5UFC.mjs +17732 -0
  133. package/dist/sdk/chunk-PJ7K5UFC.mjs.map +1 -0
  134. package/dist/sdk/{chunk-BHZ4CKUS.mjs → chunk-PXFIALUH.mjs} +77 -8
  135. package/dist/sdk/chunk-PXFIALUH.mjs.map +1 -0
  136. package/dist/sdk/{chunk-PVITVJ6J.mjs → chunk-RTKJXNZS.mjs} +32 -9
  137. package/dist/sdk/chunk-RTKJXNZS.mjs.map +1 -0
  138. package/dist/sdk/chunk-VW2GBXQT.mjs +606 -0
  139. package/dist/sdk/chunk-VW2GBXQT.mjs.map +1 -0
  140. package/dist/sdk/{config-RQQPMLRD.mjs → config-5AUYQFHE.mjs} +2 -2
  141. package/dist/sdk/config-6CUVEH7H.mjs +16 -0
  142. package/dist/sdk/config-6CUVEH7H.mjs.map +1 -0
  143. package/dist/sdk/{github-frontend-6Q4BISZX.mjs → github-frontend-BZ4N3BFZ.mjs} +7 -3
  144. package/dist/sdk/github-frontend-BZ4N3BFZ.mjs.map +1 -0
  145. package/dist/sdk/host-4MT3EW2I.mjs +52 -0
  146. package/dist/sdk/{host-P5NQICP7.mjs → host-NYWXLIFC.mjs} +2 -2
  147. package/dist/sdk/host-NYWXLIFC.mjs.map +1 -0
  148. package/dist/sdk/{routing-DEY2AIXM.mjs → routing-6R42GXUO.mjs} +2 -2
  149. package/dist/sdk/routing-6R42GXUO.mjs.map +1 -0
  150. package/dist/sdk/routing-7FXPULTO.mjs +24 -0
  151. package/dist/sdk/routing-7FXPULTO.mjs.map +1 -0
  152. package/dist/sdk/sdk.d.mts +3 -1
  153. package/dist/sdk/sdk.d.ts +3 -1
  154. package/dist/sdk/sdk.js +12163 -11204
  155. package/dist/sdk/sdk.js.map +1 -1
  156. package/dist/sdk/sdk.mjs +14 -10
  157. package/dist/sdk/sdk.mjs.map +1 -1
  158. package/dist/sdk/slack-frontend-JUT3TYVC.mjs +821 -0
  159. package/dist/sdk/slack-frontend-JUT3TYVC.mjs.map +1 -0
  160. package/dist/sdk/workflow-check-provider-H3CUOLUD.mjs +28 -0
  161. package/dist/sdk/workflow-check-provider-H3CUOLUD.mjs.map +1 -0
  162. package/dist/sdk/workflow-check-provider-YUNNF4KC.mjs +28 -0
  163. package/dist/sdk/workflow-check-provider-YUNNF4KC.mjs.map +1 -0
  164. package/dist/sdk/workflow-registry-KFWSDSLM.mjs +12 -0
  165. package/dist/sdk/workflow-registry-KFWSDSLM.mjs.map +1 -0
  166. package/dist/slack/socket-runner.d.ts +2 -0
  167. package/dist/slack/socket-runner.d.ts.map +1 -1
  168. package/dist/state-machine/context/workflow-inputs.d.ts +20 -0
  169. package/dist/state-machine/context/workflow-inputs.d.ts.map +1 -0
  170. package/dist/state-machine/dispatch/execution-invoker.d.ts.map +1 -1
  171. package/dist/state-machine/dispatch/foreach-processor.d.ts.map +1 -1
  172. package/dist/state-machine/dispatch/stats-manager.d.ts.map +1 -1
  173. package/dist/state-machine/states/level-dispatch.d.ts.map +1 -1
  174. package/dist/state-machine/states/routing.d.ts +2 -1
  175. package/dist/state-machine/states/routing.d.ts.map +1 -1
  176. package/dist/traces/{run-2026-01-28T16-15-24-569Z.ndjson → run-2026-01-31T16-37-22-321Z.ndjson} +84 -84
  177. package/dist/traces/{run-2026-01-28T16-16-09-757Z.ndjson → run-2026-01-31T16-38-06-031Z.ndjson} +1013 -1013
  178. package/dist/types/config.d.ts +3 -1
  179. package/dist/types/config.d.ts.map +1 -1
  180. package/dist/utils/human-id.d.ts +12 -0
  181. package/dist/utils/human-id.d.ts.map +1 -0
  182. package/dist/utils/worktree-manager.d.ts +3 -0
  183. package/dist/utils/worktree-manager.d.ts.map +1 -1
  184. package/dist/workflow-executor.d.ts.map +1 -1
  185. package/dist/workflow-registry.d.ts +1 -0
  186. package/dist/workflow-registry.d.ts.map +1 -1
  187. package/package.json +2 -2
  188. package/dist/sdk/chunk-BHZ4CKUS.mjs.map +0 -1
  189. package/dist/sdk/chunk-PVITVJ6J.mjs.map +0 -1
  190. package/dist/sdk/chunk-YLQ4UN62.mjs.map +0 -1
  191. package/dist/sdk/github-frontend-6Q4BISZX.mjs.map +0 -1
  192. /package/dist/sdk/{check-provider-registry-AQ3JETBG.mjs.map → check-provider-registry-3KI5RKXT.mjs.map} +0 -0
  193. /package/dist/sdk/{config-RQQPMLRD.mjs.map → check-provider-registry-IYILYY35.mjs.map} +0 -0
  194. /package/dist/sdk/{routing-DEY2AIXM.mjs.map → config-5AUYQFHE.mjs.map} +0 -0
  195. /package/dist/sdk/{host-P5NQICP7.mjs.map → host-4MT3EW2I.mjs.map} +0 -0
@@ -37,12 +37,17 @@ Use this top‑down order for every step. Omit sections that don’t apply.
37
37
  - `if`
38
38
 
39
39
  4) Provider Configuration (Only fields for the given type)
40
- - ai: `prompt`, `ai.{model,provider,tools,…}`
41
- - command: `exec`, `args`, `cwd`, `shell`
42
- - script: `content` or `file`
40
+ - ai: `prompt`, `ai.{model,provider,tools,…}`, `ai_custom_tools`
41
+ - command: `exec`, `stdin`, `cwd`, `timeout`
42
+ - script: `content`
43
43
  - github: `op`, `values`
44
- - http/http_client/http_input: `url`, `method`, `body`, `headers`
45
- - log/memory/workflow/noop: minimal fields
44
+ - http/http_client/http_input: `url`, `method`, `body`, `headers`, `endpoint`, `transform`
45
+ - mcp: `transport`, `url`, `command`, `command_args`, `methodArgs`
46
+ - log: `message`, `level`
47
+ - memory: `operation`, `key`, `value`, `namespace`
48
+ - workflow: `workflow`, `args`, `overrides`, `output_mapping`
49
+ - git-checkout: `ref`, `repository`, `working_directory`
50
+ - noop/human-input/claude-code: minimal fields
46
51
 
47
52
  5) Contracts (Post‑Exec)
48
53
  - `schema` (renderer name or JSON Schema)
@@ -53,6 +58,7 @@ Use this top‑down order for every step. Omit sections that don’t apply.
53
58
  - `continue_on_failure`
54
59
 
55
60
  7) Routing & Transitions
61
+ - `on_init`
56
62
  - `on_success`
57
63
  - `on_fail`
58
64
  - `on_finish`
@@ -170,6 +176,7 @@ apply-issue-labels:
170
176
 
171
177
  ## YAML Style
172
178
 
179
+ - Use `steps:` (preferred) or `checks:` as the top‑level key for step definitions.
173
180
  - Prefer block arrays/lists over inline `[]` unless trivially short.
174
181
  - Quote JS expressions in `assume`/`if` using double quotes.
175
182
  - Use `|` for multiline `prompt`/`content`; avoid trailing whitespace.
@@ -218,7 +225,9 @@ apply-overview-labels:
218
225
 
219
226
  ## References
220
227
 
221
- - Fault Management & Contracts
222
- - Criticality Modes
223
- - Dependencies & Routing
228
+ - [Fault Management & Contracts](./fault-management-and-contracts.md) — safety checklist, behavior matrix, examples
229
+ - [Criticality Modes](./criticality-modes.md) — external, internal, policy, info definitions and defaults
230
+ - [Dependencies & Routing](../dependencies.md) — dependency patterns, fanout, session reuse
231
+ - [Failure Routing](../failure-routing.md) — on_fail, on_success, on_finish hooks
232
+ - [Output History](../output-history.md) — accessing historical outputs in expressions
224
233
 
package/dist/docs/http.md CHANGED
@@ -39,6 +39,8 @@ Note: The HTTP server is automatically disabled when running in GitHub Actions t
39
39
 
40
40
  ### Check Types for HTTP Integration
41
41
 
42
+ > **Important:** HTTP steps that interact with external services should declare `criticality: external` and include `assume`/`guarantee` contracts for safety. See [Criticality Modes](./guides/criticality-modes.md) for details.
43
+
42
44
  #### 1. HTTP Input (Webhook Receiver)
43
45
  Receive data from configured webhook endpoints:
44
46
 
@@ -46,6 +48,9 @@ Receive data from configured webhook endpoints:
46
48
  steps:
47
49
  github-webhook:
48
50
  type: http_input
51
+ criticality: external # Receives from external system
52
+ assume: "true" # Precondition guard (required for critical steps)
53
+ schema: plain # Output contract
49
54
  endpoint: "/webhook/github"
50
55
  on: [webhook_received]
51
56
  transform: |
@@ -55,6 +60,15 @@ steps:
55
60
  }
56
61
  ```
57
62
 
63
+ **HTTP Input Options:**
64
+
65
+ | Option | Description | Default |
66
+ |--------|-------------|---------|
67
+ | `endpoint` | Webhook endpoint path (must match http_server endpoints) | Required |
68
+ | `on` | Event triggers (typically `[webhook_received]`) | - |
69
+ | `transform` | Liquid template to transform received webhook data | - |
70
+ | `group` | Grouping category for the step | - |
71
+
58
72
  #### 2. HTTP Output (Send Data)
59
73
  Send check results to external services:
60
74
 
@@ -62,12 +76,16 @@ Send check results to external services:
62
76
  steps:
63
77
  notify-external:
64
78
  type: http
79
+ criticality: external # Sends to external system
80
+ assume: "outputs['security-check']" # Only run if dependency succeeded
81
+ schema: plain
65
82
  depends_on: [security-check]
66
83
  url: "https://api.example.com/notify"
67
84
  method: POST
68
85
  headers:
69
86
  Content-Type: "application/json"
70
87
  Authorization: "Bearer ${API_TOKEN}"
88
+ timeout: 30000 # Optional timeout in milliseconds (default: 30000)
71
89
  body: |
72
90
  {
73
91
  "results": {{ outputs['security-check'] | json }},
@@ -75,6 +93,17 @@ steps:
75
93
  }
76
94
  ```
77
95
 
96
+ **HTTP Output Options:**
97
+
98
+ | Option | Description | Default |
99
+ |--------|-------------|---------|
100
+ | `url` | Target URL | Required |
101
+ | `body` | Request body template (Liquid) | Required |
102
+ | `method` | HTTP method | POST |
103
+ | `headers` | Request headers (supports env var substitution) | {} |
104
+ | `timeout` | Request timeout in milliseconds | 30000 |
105
+ | `metadata` | Additional metadata available in templates | {} |
106
+
78
107
  #### 3. HTTP Client (Fetch Data)
79
108
  Fetch data from external APIs:
80
109
 
@@ -82,10 +111,14 @@ Fetch data from external APIs:
82
111
  steps:
83
112
  fetch-config:
84
113
  type: http_client
114
+ criticality: external # Fetches from external system
115
+ assume: "env.API_TOKEN" # Require API token to be set
116
+ schema: plain
85
117
  url: "https://api.example.com/config"
86
118
  method: GET
87
119
  headers:
88
120
  Authorization: "Bearer ${API_TOKEN}"
121
+ timeout: 30000 # Optional timeout in milliseconds (default: 30000)
89
122
  transform: |
90
123
  {
91
124
  "settings": {{ response.data | json }},
@@ -93,6 +126,44 @@ steps:
93
126
  }
94
127
  ```
95
128
 
129
+ **HTTP Client Options:**
130
+
131
+ | Option | Description | Default |
132
+ |--------|-------------|---------|
133
+ | `url` | Target URL (supports Liquid templates and env vars) | Required |
134
+ | `method` | HTTP method (GET, POST, PUT, DELETE, etc.) | GET |
135
+ | `headers` | Request headers (supports env var substitution) | {} |
136
+ | `body` | Request body for POST/PUT (supports Liquid templates) | - |
137
+ | `timeout` | Request timeout in milliseconds | 30000 |
138
+ | `transform` | Liquid template to transform response | - |
139
+ | `transform_js` | JavaScript expression to transform response | - |
140
+ | `output_file` | Download response to file instead of returning data | - |
141
+ | `skip_if_exists` | Skip download if file exists (caching) | true |
142
+
143
+ **File Download Example:**
144
+
145
+ ```yaml
146
+ steps:
147
+ download-artifact:
148
+ type: http_client
149
+ url: "https://example.com/artifacts/{{ pr.number }}.zip"
150
+ output_file: "./downloads/artifact.zip"
151
+ skip_if_exists: true # Use cached file if exists
152
+ ```
153
+
154
+ **JavaScript Transform Example:**
155
+
156
+ ```yaml
157
+ steps:
158
+ fetch-and-transform:
159
+ type: http_client
160
+ url: "https://api.example.com/data"
161
+ transform_js: |
162
+ // Access response via 'output' variable
163
+ const items = output.items || [];
164
+ return items.filter(i => i.status === 'active');
165
+ ```
166
+
96
167
  #### 4. Log Provider (Debugging & Monitoring)
97
168
  Output debugging information and monitor workflow execution:
98
169
 
@@ -102,7 +173,7 @@ steps:
102
173
  type: log
103
174
  group: debugging
104
175
  level: info
105
- message: "🚀 Starting code review for PR #{{ pr.number }} by {{ pr.author }}"
176
+ message: "Starting code review for PR #{{ pr.number }} by {{ pr.author }}"
106
177
  include_pr_context: true
107
178
  include_dependencies: false
108
179
  include_metadata: true
@@ -113,7 +184,7 @@ steps:
113
184
  level: debug
114
185
  depends_on: [security-check]
115
186
  message: |
116
- 📊 Dependency results summary:
187
+ Dependency results summary:
117
188
  {% if dependencies %}
118
189
  - Security check found {{ dependencies['security-check'].issueCount }} issues
119
190
  {% else %}
@@ -125,7 +196,31 @@ steps:
125
196
  type: log
126
197
  group: monitoring
127
198
  level: warn
128
- message: "⚠️ Large PR detected: {{ pr.totalAdditions }} lines added"
199
+ message: "Large PR detected: {{ pr.totalAdditions }} lines added"
200
+ ```
201
+
202
+ **Log Provider Options:**
203
+
204
+ | Option | Description | Default |
205
+ |--------|-------------|---------|
206
+ | `message` | Log message template (Liquid) | Required |
207
+ | `level` | Log level: `debug`, `info`, `warn`, `error` | info |
208
+ | `group` | Grouping category (e.g., `debugging`, `monitoring`, `chat`) | - |
209
+ | `include_pr_context` | Include PR details in output | true |
210
+ | `include_dependencies` | Include dependency results in output | true |
211
+ | `include_metadata` | Include execution metadata in output | true |
212
+
213
+ **Chat Group Example:**
214
+
215
+ When `group: chat` is set, the log provider exposes a structured `output.text` field for chat-style integrations:
216
+
217
+ ```yaml
218
+ steps:
219
+ chat-response:
220
+ type: log
221
+ group: chat
222
+ level: info
223
+ message: "Analysis complete for PR #{{ pr.number }}"
129
224
  ```
130
225
 
131
226
  ### Cron Scheduling
@@ -195,6 +290,10 @@ auth:
195
290
  type: basic
196
291
  username: "${HTTP_USERNAME}"
197
292
  password: "${HTTP_PASSWORD}"
293
+
294
+ # No Authentication (not recommended for production)
295
+ auth:
296
+ type: none
198
297
  ```
199
298
 
200
299
  #### HMAC Authentication Details
@@ -61,9 +61,9 @@ checks:
61
61
  # Prefer .text to read the string payload
62
62
  git tag v{{ outputs['get-version'].text | default: outputs['get-version'] }}
63
63
  git push origin v{{ outputs['get-version'].text | default: outputs['get-version'] }}
64
+ ```
64
65
 
65
66
  > See also: [Default Output Schema](./default-output-schema.md)
66
- ```
67
67
 
68
68
  ## Input Methods
69
69
 
@@ -99,19 +99,13 @@ curl https://api.example.com/approval | visor --check approval
99
99
  Use a custom hook for programmatic input:
100
100
 
101
101
  ```typescript
102
- import { runChecks, HumanInputCheckProvider } from '@probelabs/visor';
102
+ import { runChecks } from '@probelabs/visor/sdk';
103
103
 
104
104
  // Option 1: Using deprecated static method (backward compatible)
105
- HumanInputCheckProvider.setHooks({
106
- onHumanInput: async (request) => {
107
- console.log(`Prompt: ${request.prompt}`);
108
- return 'yes';
109
- }
110
- });
111
-
112
- await runChecks({ config });
105
+ // Note: HumanInputCheckProvider is not exported from the SDK;
106
+ // use executionContext instead (recommended)
113
107
 
114
- // Option 2: Using new ExecutionContext (recommended)
108
+ // Option 2: Using ExecutionContext (recommended)
115
109
  await runChecks({
116
110
  config,
117
111
  executionContext: {
@@ -132,8 +126,8 @@ interface HumanInputRequest {
132
126
  checkId: string; // Check name/ID
133
127
  prompt: string; // Prompt text
134
128
  placeholder?: string; // Placeholder text
135
- allowEmpty?: boolean; // Allow empty input
136
- multiline?: boolean; // Multiline mode
129
+ allowEmpty: boolean; // Allow empty input
130
+ multiline: boolean; // Multiline mode
137
131
  timeout?: number; // Timeout in milliseconds
138
132
  default?: string; // Default value
139
133
  }
@@ -225,7 +219,7 @@ See [examples/calculator-sdk-real.ts](../examples/calculator-sdk-real.ts) for a
225
219
  ### Basic SDK Usage
226
220
 
227
221
  ```typescript
228
- import { runChecks } from '@probelabs/visor';
222
+ import { runChecks } from '@probelabs/visor/sdk';
229
223
 
230
224
  const config = {
231
225
  version: '1.0',
@@ -254,25 +248,23 @@ const result = await runChecks({
254
248
  ### With CLI Message
255
249
 
256
250
  ```typescript
257
- import { CheckExecutionEngine } from '@probelabs/visor';
251
+ import { runChecks } from '@probelabs/visor/sdk';
258
252
 
259
- const engine = new CheckExecutionEngine();
260
-
261
- // Set execution context
262
- engine.setExecutionContext({
263
- cliMessage: 'yes' // Simulates --message flag
264
- });
265
-
266
- const result = await engine.executeChecks({
253
+ const result = await runChecks({
254
+ config,
267
255
  checks: ['approval'],
268
- config
256
+ executionContext: {
257
+ cliMessage: 'yes' // Simulates --message flag
258
+ }
269
259
  });
270
260
  ```
271
261
 
272
262
  ### Automated Testing
273
263
 
274
264
  ```typescript
275
- const testInputs = {
265
+ import { runChecks } from '@probelabs/visor/sdk';
266
+
267
+ const testInputs: Record<string, string> = {
276
268
  'get-number1': '42',
277
269
  'get-number2': '7',
278
270
  'get-operation': '+'
@@ -331,22 +323,14 @@ The new ExecutionContext pattern eliminates global state:
331
323
 
332
324
  ### From Static API to ExecutionContext
333
325
 
334
- **Old way (still works but deprecated):**
326
+ **Old way (deprecated, internal use only):**
335
327
 
336
- ```typescript
337
- import { HumanInputCheckProvider, runChecks } from '@probelabs/visor';
338
-
339
- HumanInputCheckProvider.setHooks({
340
- onHumanInput: async (request) => 'yes'
341
- });
342
-
343
- await runChecks({ config });
344
- ```
328
+ The static `HumanInputCheckProvider.setHooks()` method is deprecated and not exported from the public SDK. If you were using it directly by importing from internal paths, migrate to the new pattern.
345
329
 
346
330
  **New way (recommended):**
347
331
 
348
332
  ```typescript
349
- import { runChecks } from '@probelabs/visor';
333
+ import { runChecks } from '@probelabs/visor/sdk';
350
334
 
351
335
  await runChecks({
352
336
  config,
@@ -0,0 +1,206 @@
1
+ # Visor Documentation
2
+
3
+ Visor is an AI-powered workflow orchestration tool for code review, automation, and CI/CD pipelines. It supports multiple AI providers, pluggable check providers, and integrates with GitHub Actions and Slack.
4
+
5
+ ---
6
+
7
+ ## Getting Started
8
+
9
+ | Document | Description |
10
+ |----------|-------------|
11
+ | [NPM Usage](./NPM_USAGE.md) | Quick start guide for installing and running Visor via npm/npx |
12
+ | [Configuration](./configuration.md) | Core configuration reference for `.visor.yaml` files |
13
+ | [Commands](./commands.md) | CLI commands and PR comment commands reference |
14
+ | [Action Reference](./action-reference.md) | GitHub Action inputs, outputs, and usage examples |
15
+ | [CI/CLI Mode](./ci-cli-mode.md) | Running Visor in CI pipelines and CLI mode |
16
+
17
+ ---
18
+
19
+ ## Configuration
20
+
21
+ | Document | Description |
22
+ |----------|-------------|
23
+ | [Configuration](./configuration.md) | Main configuration guide including check types and validation |
24
+ | [Tag Filtering](./tag-filtering.md) | Filter check execution using tags for different environments |
25
+ | [Event Triggers](./event-triggers.md) | GitHub events and how to trigger checks based on PR/issue actions |
26
+ | [Timeouts](./timeouts.md) | Per-provider timeout configuration and behavior |
27
+ | [Execution Limits](./limits.md) | Run caps and loop protection for workflow safety |
28
+ | [Liquid Templates](./liquid-templates.md) | Template syntax for dynamic content in prompts and commands |
29
+ | [Schema Templates](./schema-templates.md) | JSON Schema validation and output rendering system |
30
+ | [Default Output Schema](./default-output-schema.md) | Automatic timestamp injection and output normalization |
31
+ | [Suppressions](./suppressions.md) | Suppressing warnings using code comments |
32
+
33
+ ---
34
+
35
+ ## Providers
36
+
37
+ Visor supports 15 provider types for different check and workflow operations.
38
+
39
+ ### AI Providers
40
+
41
+ | Document | Description |
42
+ |----------|-------------|
43
+ | [AI Configuration](./ai-configuration.md) | Configure AI providers (Gemini, Claude, OpenAI, Bedrock) |
44
+ | [Claude Code](./claude-code.md) | Claude Code SDK integration with MCP tools and subagents |
45
+ | [Advanced AI](./advanced-ai.md) | Session reuse, multi-turn conversations, and advanced AI features |
46
+ | [AI Custom Tools](./ai-custom-tools.md) | Define custom shell-based tools for AI via ephemeral MCP servers |
47
+ | [AI Custom Tools Usage](./ai-custom-tools-usage.md) | Practical examples of using custom tools with AI providers |
48
+ | [MCP Support for AI](./mcp.md) | MCP server configuration for AI provider enhancement |
49
+
50
+ ### Execution Providers
51
+
52
+ | Document | Description |
53
+ |----------|-------------|
54
+ | [MCP Provider](./mcp-provider.md) | Direct MCP tool execution via stdio, SSE, or HTTP transports |
55
+ | [Command Provider](./command-provider.md) | Execute shell commands with output parsing and templating |
56
+ | [Script Provider](./script.md) | Run JavaScript in a secure sandbox with PR context access |
57
+ | [Custom Tools](./custom-tools.md) | Define reusable command-line tools in YAML configuration |
58
+
59
+ ### Integration Providers
60
+
61
+ | Document | Description |
62
+ |----------|-------------|
63
+ | [HTTP Integration](./http.md) | HTTP server, webhooks, scheduling, and TLS configuration |
64
+ | [GitHub Provider](./github-ops.md) | Native GitHub operations (labels, comments) via Octokit |
65
+ | [Git Checkout](./providers/git-checkout.md) | Checkout code from repositories using git worktrees |
66
+ | [Memory Provider](./memory.md) | Persistent key-value storage for stateful workflows |
67
+ | [Human Input](./human-input-provider.md) | Pause workflows to collect user input via CLI, stdin, or SDK |
68
+
69
+ ### Utility Providers
70
+
71
+ | Document | Description |
72
+ |----------|-------------|
73
+ | [Pluggable Architecture](./pluggable.md) | Overview of all providers and custom provider development |
74
+
75
+ ---
76
+
77
+ ## Workflows and Routing
78
+
79
+ | Document | Description |
80
+ |----------|-------------|
81
+ | [Reusable Workflows](./workflows.md) | Define modular, parameterized workflow components |
82
+ | [Dependencies](./dependencies.md) | Step dependencies, parallel execution, and DAG scheduling |
83
+ | [Failure Routing](./failure-routing.md) | Auto-fix loops, retries, goto routing, and remediation |
84
+ | [Router Patterns](./router-patterns.md) | Best practices for router steps and control flow |
85
+ | [Lifecycle Hooks](./lifecycle-hooks.md) | on_init, on_success, on_fail, on_finish hooks |
86
+ | [ForEach Propagation](./foreach-dependency-propagation.md) | ForEach output validation and dependent propagation |
87
+ | [Output History](./output-history.md) | Track outputs across loops, retries, and forEach iterations |
88
+ | [Fail If](./fail-if.md) | Conditional failure expressions for any provider |
89
+ | [Author Permissions](./author-permissions.md) | Permission checking functions based on PR author association |
90
+ | [Workflow Creation Guide](./workflow-creation-guide.md) | Comprehensive guide to creating Visor workflows |
91
+ | [Recipes](./recipes.md) | Copy-pasteable examples for common workflow patterns |
92
+
93
+ ---
94
+
95
+ ## Testing
96
+
97
+ The test framework allows you to write integration tests for your Visor workflows in YAML.
98
+
99
+ | Document | Description |
100
+ |----------|-------------|
101
+ | [Getting Started](./testing/getting-started.md) | Quick start guide for writing and running tests |
102
+ | [CLI Reference](./testing/cli.md) | Test runner commands, flags, and parallelism options |
103
+ | [DSL Reference](./testing/dsl-reference.md) | Complete schema reference for `.visor.tests.yaml` files |
104
+ | [Assertions](./testing/assertions.md) | Writing expectations for calls, prompts, outputs, and failures |
105
+ | [Flow Tests](./testing/flows.md) | Multi-stage flow tests across multiple events |
106
+ | [Fixtures and Mocks](./testing/fixtures-and-mocks.md) | Built-in fixtures and mocking AI/provider responses |
107
+ | [CI Integration](./testing/ci.md) | Running tests in CI pipelines with reporting |
108
+ | [Troubleshooting](./testing/troubleshooting.md) | Common test issues and solutions |
109
+ | [Cookbook](./testing/cookbook.md) | Copy-pasteable test recipes for common scenarios |
110
+
111
+ ---
112
+
113
+ ## Integrations
114
+
115
+ | Document | Description |
116
+ |----------|-------------|
117
+ | [GitHub Checks](./GITHUB_CHECKS.md) | GitHub Checks API integration for PR status reporting |
118
+ | [Slack Integration](./slack-integration.md) | Bidirectional Slack integration via Socket Mode |
119
+ | [Deployment](./DEPLOYMENT.md) | Cloudflare Pages deployment for landing page |
120
+
121
+ ---
122
+
123
+ ## Observability
124
+
125
+ | Document | Description |
126
+ |----------|-------------|
127
+ | [Observability Overview](./observability.md) | Output formats, logging, telemetry, and execution statistics |
128
+ | [Output Formats](./output-formats.md) | Table, JSON, markdown, and SARIF output format details |
129
+ | [Debugging](./debugging.md) | Debug mode, logging, expression debugging, and visualizer |
130
+ | [Telemetry Setup](./telemetry-setup.md) | OpenTelemetry configuration for traces and metrics |
131
+ | [Dashboards](./dashboards/README.md) | Grafana dashboards for Visor telemetry visualization |
132
+ | [Troubleshooting](./troubleshooting.md) | Common issues and diagnostic techniques |
133
+ | [Performance](./performance.md) | Parallelism, cost controls, and optimization strategies |
134
+
135
+ ---
136
+
137
+ ## Guides
138
+
139
+ Best practices and style guides for writing maintainable workflows.
140
+
141
+ | Document | Description |
142
+ |----------|-------------|
143
+ | [Workflow Style Guide](./guides/workflow-style-guide.md) | Conventions for clear, safe, and maintainable workflows |
144
+ | [Criticality Modes](./guides/criticality-modes.md) | external, internal, policy, info classification and defaults |
145
+ | [Fault Management](./guides/fault-management-and-contracts.md) | NASA-style fault handling with assume/guarantee contracts |
146
+ | [Security](./security.md) | Authentication, permissions, and security best practices |
147
+ | [Development Playbook](./dev-playbook.md) | Internal development guide and conventions |
148
+
149
+ ---
150
+
151
+ ## Reference
152
+
153
+ | Document | Description |
154
+ |----------|-------------|
155
+ | [SDK](./sdk.md) | Programmatic usage of Visor from Node.js |
156
+ | [Output Formatting](./output-formatting.md) | Output format specification and customization |
157
+
158
+ ---
159
+
160
+ ## RFCs and Design Documents
161
+
162
+ Internal design documents, proposals, and implementation tracking.
163
+
164
+ ### Implemented RFCs
165
+
166
+ | Document | Description |
167
+ |----------|-------------|
168
+ | [Git Checkout Step](./rfc/git-checkout-step.md) | Design for git worktree-based checkout provider |
169
+ | [Workspace Isolation](./rfc/workspace-isolation.md) | Isolated workspace implementation using /tmp |
170
+ | [on_init Hook](./rfc/on_init-hook.md) | Lifecycle hook for context preprocessing |
171
+ | [Telemetry Tracing](./telemetry-tracing-rfc.md) | OpenTelemetry tracing architecture |
172
+ | [Test Framework](./test-framework-rfc.md) | In-YAML integration test framework design |
173
+
174
+ ### Design Documents
175
+
176
+ | Document | Description |
177
+ |----------|-------------|
178
+ | [Failure Routing RFC](./failure-routing-rfc.md) | Auto-fix loops and routing design |
179
+ | [Failure Conditions Schema](./failure-conditions-schema.md) | Schema for failure condition configuration |
180
+ | [Failure Conditions Implementation](./failure-conditions-implementation.md) | Implementation details for failure handling |
181
+ | [Engine State Machine Plan](./engine-state-machine-plan.md) | State machine execution engine design |
182
+ | [Loop Routing Refactor](./loop-routing-refactor.md) | Refactoring plan for routing loops |
183
+ | [Goto Forward Run Plan](./goto-forward-run-plan.md) | Forward-run implementation for goto routing |
184
+ | [Debug Visualizer](./debug-visualizer.md) | Interactive debugging visualizer design |
185
+ | [Debug Visualizer RFC](./debug-visualizer-rfc.md) | Debug visualizer architecture RFC |
186
+ | [Debug Visualizer Progress](./debug-visualizer-progress.md) | Implementation progress tracker |
187
+ | [Execution Statistics RFC](./execution-statistics-rfc.md) | Execution metrics and statistics design |
188
+ | [Event-Driven GitHub](./event-driven-github-integration-rfc.md) | Event-driven GitHub integration design |
189
+ | [Bot Transports RFC](./bot-transports-rfc.md) | Transport layer design for bot integrations |
190
+ | [Engine Pause/Resume RFC](./engine-pause-resume-rfc.md) | Pause and resume functionality design |
191
+ | [Visor SDK RFC](./visor-sdk-rfc.md) | SDK architecture and API design |
192
+ | [Schema Next PR](./schema-next-pr.md) | Schema evolution planning |
193
+
194
+ ### Proposals
195
+
196
+ | Document | Description |
197
+ |----------|-------------|
198
+ | [Snapshot Scope Execution](./proposals/snapshot-scope-execution.md) | MVCC-style snapshot isolation execution model |
199
+
200
+ ### Roadmap
201
+
202
+ | Document | Description |
203
+ |----------|-------------|
204
+ | [Criticality Implementation](./roadmap/criticality-implementation-tasks.md) | Implementation tasks for criticality model |
205
+ | [Fact Validator Implementation](./fact-validator-implementation-plan.md) | Fact validation feature implementation plan |
206
+ | [Fact Validator Gap Analysis](./fact-validator-gap-analysis.md) | Gap analysis for fact validation system |