@probelabs/visor 0.1.177-ee → 0.1.178-ee
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/defaults/code-talk.yaml +10 -5
- package/dist/defaults/code-talk.yaml +10 -5
- package/dist/docs/ai-custom-tools.md +49 -0
- package/dist/docs/http.md +23 -0
- package/dist/docs/testing/cookbook.md +48 -0
- package/dist/docs/testing/dsl-reference.md +4 -2
- package/dist/docs/testing/flows.md +33 -1
- package/dist/examples/http-integration-config.yaml +16 -0
- package/dist/generated/config-schema.d.ts +51 -6
- package/dist/generated/config-schema.d.ts.map +1 -1
- package/dist/generated/config-schema.json +61 -6
- package/dist/github-comments.d.ts +5 -1
- package/dist/github-comments.d.ts.map +1 -1
- package/dist/index.js +386 -72
- package/dist/providers/api-tool-executor.d.ts +2 -0
- package/dist/providers/api-tool-executor.d.ts.map +1 -1
- package/dist/providers/http-client-provider.d.ts.map +1 -1
- package/dist/providers/mcp-custom-sse-server.d.ts.map +1 -1
- package/dist/providers/workflow-check-provider.d.ts.map +1 -1
- package/dist/sdk/{a2a-frontend-BPWLYLCG.mjs → a2a-frontend-U3PTNCLR.mjs} +2 -2
- package/dist/sdk/{check-provider-registry-G64PWDCZ.mjs → check-provider-registry-SRASECAR.mjs} +6 -6
- package/dist/sdk/{check-provider-registry-HW4QPPSA.mjs → check-provider-registry-ZX76MY2L.mjs} +6 -6
- package/dist/sdk/{chunk-OPI632LK.mjs → chunk-4ECMTCOM.mjs} +2 -2
- package/dist/sdk/{chunk-65SHRIQF.mjs → chunk-6YGCACBF.mjs} +2 -2
- package/dist/sdk/{chunk-65SHRIQF.mjs.map → chunk-6YGCACBF.mjs.map} +1 -1
- package/dist/sdk/{chunk-Y6PVSFCS.mjs → chunk-B7XHSG3L.mjs} +237 -47
- package/dist/sdk/chunk-B7XHSG3L.mjs.map +1 -0
- package/dist/sdk/{chunk-MM3TGVQ4.mjs → chunk-BMXVAJ2M.mjs} +52 -7
- package/dist/sdk/chunk-BMXVAJ2M.mjs.map +1 -0
- package/dist/sdk/{chunk-OHOBWVPP.mjs → chunk-ENSZDV3O.mjs} +3 -3
- package/dist/sdk/{chunk-IYXOLUDJ.mjs → chunk-MGY5JAN2.mjs} +221 -36
- package/dist/sdk/chunk-MGY5JAN2.mjs.map +1 -0
- package/dist/sdk/{config-OOUMTCEA.mjs → config-DFOF7LP4.mjs} +2 -2
- package/dist/sdk/{failure-condition-evaluator-HL33X7MH.mjs → failure-condition-evaluator-P3MS5DRL.mjs} +3 -3
- package/dist/sdk/{github-frontend-F2YCPK6H.mjs → github-frontend-QTKOYB56.mjs} +11 -3
- package/dist/sdk/github-frontend-QTKOYB56.mjs.map +1 -0
- package/dist/sdk/{host-HFOJQIOF.mjs → host-I2TBBKD5.mjs} +3 -3
- package/dist/sdk/{host-6TBS44ER.mjs → host-THORKOEL.mjs} +4 -4
- package/dist/sdk/{routing-GF2CF3JT.mjs → routing-2X6QF5IW.mjs} +4 -4
- package/dist/sdk/{schedule-tool-45NAALKS.mjs → schedule-tool-M6Y4YTXR.mjs} +6 -6
- package/dist/sdk/{schedule-tool-7O7SWSJ4.mjs → schedule-tool-R6JJIDZ6.mjs} +6 -6
- package/dist/sdk/{schedule-tool-handler-6MPP5DXK.mjs → schedule-tool-handler-AOMZV3Q3.mjs} +6 -6
- package/dist/sdk/{schedule-tool-handler-KYDXJ2ZL.mjs → schedule-tool-handler-JYCVH377.mjs} +6 -6
- package/dist/sdk/sdk.d.mts +21 -0
- package/dist/sdk/sdk.d.ts +21 -0
- package/dist/sdk/sdk.js +264 -26
- package/dist/sdk/sdk.js.map +1 -1
- package/dist/sdk/sdk.mjs +5 -5
- package/dist/sdk/{trace-helpers-FKM2MEDW.mjs → trace-helpers-K47ZVJSU.mjs} +2 -2
- package/dist/sdk/{workflow-check-provider-JIXZJNV5.mjs → workflow-check-provider-A3YH2UZJ.mjs} +6 -6
- package/dist/sdk/{workflow-check-provider-OA33MESM.mjs → workflow-check-provider-EMFC7A5K.mjs} +6 -6
- package/dist/state-machine/context/build-engine-context.d.ts.map +1 -1
- package/dist/test-runner/conversation-sugar.d.ts +3 -0
- package/dist/test-runner/conversation-sugar.d.ts.map +1 -1
- package/dist/test-runner/validator.d.ts.map +1 -1
- package/dist/types/config.d.ts +21 -0
- package/dist/types/config.d.ts.map +1 -1
- package/dist/utils/rate-limiter.d.ts +61 -0
- package/dist/utils/rate-limiter.d.ts.map +1 -0
- package/package.json +2 -2
- package/dist/sdk/a2a-frontend-FUJRKHJB.mjs +0 -1658
- package/dist/sdk/a2a-frontend-FUJRKHJB.mjs.map +0 -1
- package/dist/sdk/chunk-EFNNJIMY.mjs +0 -739
- package/dist/sdk/chunk-GVTWESYN.mjs +0 -516
- package/dist/sdk/chunk-GVTWESYN.mjs.map +0 -1
- package/dist/sdk/chunk-IYXOLUDJ.mjs.map +0 -1
- package/dist/sdk/chunk-MM3TGVQ4.mjs.map +0 -1
- package/dist/sdk/chunk-OPI632LK.mjs.map +0 -1
- package/dist/sdk/chunk-WJIV7MKY.mjs +0 -1502
- package/dist/sdk/chunk-WJIV7MKY.mjs.map +0 -1
- package/dist/sdk/chunk-Y6PVSFCS.mjs.map +0 -1
- package/dist/sdk/failure-condition-evaluator-DL6H57NX.mjs +0 -18
- package/dist/sdk/github-frontend-F2YCPK6H.mjs.map +0 -1
- package/dist/sdk/github-frontend-U2U42CKV.mjs +0 -1386
- package/dist/sdk/github-frontend-U2U42CKV.mjs.map +0 -1
- package/dist/sdk/routing-SFP4D6O3.mjs +0 -26
- package/dist/sdk/slack-frontend-6SXPTQDI.mjs +0 -895
- package/dist/sdk/slack-frontend-6SXPTQDI.mjs.map +0 -1
- package/dist/sdk/trace-helpers-L3EOYW5P.mjs +0 -29
- package/dist/sdk/trace-helpers-L3EOYW5P.mjs.map +0 -1
- package/dist/sdk/workflow-check-provider-JIXZJNV5.mjs.map +0 -1
- package/dist/sdk/workflow-check-provider-OA33MESM.mjs.map +0 -1
- /package/dist/sdk/{a2a-frontend-BPWLYLCG.mjs.map → a2a-frontend-U3PTNCLR.mjs.map} +0 -0
- /package/dist/sdk/{check-provider-registry-G64PWDCZ.mjs.map → check-provider-registry-SRASECAR.mjs.map} +0 -0
- /package/dist/sdk/{check-provider-registry-HW4QPPSA.mjs.map → check-provider-registry-ZX76MY2L.mjs.map} +0 -0
- /package/dist/sdk/{chunk-EFNNJIMY.mjs.map → chunk-4ECMTCOM.mjs.map} +0 -0
- /package/dist/sdk/{chunk-OHOBWVPP.mjs.map → chunk-ENSZDV3O.mjs.map} +0 -0
- /package/dist/sdk/{config-OOUMTCEA.mjs.map → config-DFOF7LP4.mjs.map} +0 -0
- /package/dist/sdk/{failure-condition-evaluator-DL6H57NX.mjs.map → failure-condition-evaluator-P3MS5DRL.mjs.map} +0 -0
- /package/dist/sdk/{host-6TBS44ER.mjs.map → host-I2TBBKD5.mjs.map} +0 -0
- /package/dist/sdk/{host-HFOJQIOF.mjs.map → host-THORKOEL.mjs.map} +0 -0
- /package/dist/sdk/{failure-condition-evaluator-HL33X7MH.mjs.map → routing-2X6QF5IW.mjs.map} +0 -0
- /package/dist/sdk/{routing-GF2CF3JT.mjs.map → schedule-tool-M6Y4YTXR.mjs.map} +0 -0
- /package/dist/sdk/{routing-SFP4D6O3.mjs.map → schedule-tool-R6JJIDZ6.mjs.map} +0 -0
- /package/dist/sdk/{schedule-tool-45NAALKS.mjs.map → schedule-tool-handler-AOMZV3Q3.mjs.map} +0 -0
- /package/dist/sdk/{schedule-tool-7O7SWSJ4.mjs.map → schedule-tool-handler-JYCVH377.mjs.map} +0 -0
- /package/dist/sdk/{schedule-tool-handler-6MPP5DXK.mjs.map → trace-helpers-K47ZVJSU.mjs.map} +0 -0
- /package/dist/sdk/{schedule-tool-handler-KYDXJ2ZL.mjs.map → workflow-check-provider-A3YH2UZJ.mjs.map} +0 -0
- /package/dist/sdk/{trace-helpers-FKM2MEDW.mjs.map → workflow-check-provider-EMFC7A5K.mjs.map} +0 -0
package/defaults/code-talk.yaml
CHANGED
|
@@ -473,7 +473,7 @@ steps:
|
|
|
473
473
|
skip_code_context: true
|
|
474
474
|
enableDelegate: true
|
|
475
475
|
enableExecutePlan: false
|
|
476
|
-
max_iterations:
|
|
476
|
+
max_iterations: 50
|
|
477
477
|
prompt_type: code-explorer
|
|
478
478
|
allowBash: true
|
|
479
479
|
bashConfig:
|
|
@@ -613,10 +613,15 @@ steps:
|
|
|
613
613
|
- Use the workingDirectory parameter instead of `cd`; no pipes or chained commands
|
|
614
614
|
- Always use relative paths (e.g., "gateway/mw_jwt.go"), never absolute /tmp/ paths
|
|
615
615
|
|
|
616
|
-
|
|
617
|
-
- Repos
|
|
618
|
-
-
|
|
619
|
-
|
|
616
|
+
Branch switching:
|
|
617
|
+
- Repos are shallow clones (fetch_depth: 1). Always fetch before checkout.
|
|
618
|
+
- IMPORTANT: Never use `git checkout <branch-name>` — it fails when the branch
|
|
619
|
+
is checked out in another worktree. Instead use detached HEAD:
|
|
620
|
+
`git fetch origin <branch> && git checkout FETCH_HEAD`
|
|
621
|
+
- For PRs: `git fetch origin pull/<N>/head && git checkout FETCH_HEAD`
|
|
622
|
+
- For tags: `git fetch --tags` then `git checkout <tag>`
|
|
623
|
+
- If the question mentions a specific branch (e.g. "on the feature-x branch"),
|
|
624
|
+
switch to it FIRST before searching. Content may only exist on that branch.
|
|
620
625
|
|
|
621
626
|
Delegate usage:
|
|
622
627
|
- Each delegate should answer ONE specific question (not "look at the code")
|
|
@@ -473,7 +473,7 @@ steps:
|
|
|
473
473
|
skip_code_context: true
|
|
474
474
|
enableDelegate: true
|
|
475
475
|
enableExecutePlan: false
|
|
476
|
-
max_iterations:
|
|
476
|
+
max_iterations: 50
|
|
477
477
|
prompt_type: code-explorer
|
|
478
478
|
allowBash: true
|
|
479
479
|
bashConfig:
|
|
@@ -613,10 +613,15 @@ steps:
|
|
|
613
613
|
- Use the workingDirectory parameter instead of `cd`; no pipes or chained commands
|
|
614
614
|
- Always use relative paths (e.g., "gateway/mw_jwt.go"), never absolute /tmp/ paths
|
|
615
615
|
|
|
616
|
-
|
|
617
|
-
- Repos
|
|
618
|
-
-
|
|
619
|
-
|
|
616
|
+
Branch switching:
|
|
617
|
+
- Repos are shallow clones (fetch_depth: 1). Always fetch before checkout.
|
|
618
|
+
- IMPORTANT: Never use `git checkout <branch-name>` — it fails when the branch
|
|
619
|
+
is checked out in another worktree. Instead use detached HEAD:
|
|
620
|
+
`git fetch origin <branch> && git checkout FETCH_HEAD`
|
|
621
|
+
- For PRs: `git fetch origin pull/<N>/head && git checkout FETCH_HEAD`
|
|
622
|
+
- For tags: `git fetch --tags` then `git checkout <tag>`
|
|
623
|
+
- If the question mentions a specific branch (e.g. "on the feature-x branch"),
|
|
624
|
+
switch to it FIRST before searching. Content may only exist on that branch.
|
|
620
625
|
|
|
621
626
|
Delegate usage:
|
|
622
627
|
- Each delegate should answer ONE specific question (not "look at the code")
|
|
@@ -8,6 +8,7 @@ This feature allows AI checks to use custom tools defined in your Visor configur
|
|
|
8
8
|
|
|
9
9
|
- shell/command tools (`exec`)
|
|
10
10
|
- OpenAPI-backed API tool bundles (`type: api`)
|
|
11
|
+
- HTTP client tools (`type: http_client`) — proxy REST API calls
|
|
11
12
|
- workflow tools (`type: workflow`) — inline or file-referenced multi-step tools
|
|
12
13
|
|
|
13
14
|
Custom tools are automatically exposed to AI via ephemeral SSE (Server-Sent Events) MCP (Model Context Protocol) servers that start on-demand and clean up automatically.
|
|
@@ -165,6 +166,54 @@ See runnable examples:
|
|
|
165
166
|
- `examples/api-tools-mcp-example.yaml` (embedded tests)
|
|
166
167
|
- `examples/api-tools-inline-overlay-example.yaml` (embedded tests)
|
|
167
168
|
|
|
169
|
+
### Rate Limiting for API and HTTP Client Tools
|
|
170
|
+
|
|
171
|
+
External APIs often enforce rate limits. Add `rate_limit` to any tool definition (`type: api` or `type: http_client`) to throttle outgoing requests. Tools sharing the same `key` share a single global token bucket.
|
|
172
|
+
|
|
173
|
+
```yaml
|
|
174
|
+
tools:
|
|
175
|
+
workable-api:
|
|
176
|
+
type: api
|
|
177
|
+
name: workable-api
|
|
178
|
+
spec: https://workable.com/openapi.yaml
|
|
179
|
+
targetUrl: https://www.workable.com/spi/v3
|
|
180
|
+
headers:
|
|
181
|
+
Authorization: "Bearer ${WORKABLE_TOKEN}"
|
|
182
|
+
rate_limit:
|
|
183
|
+
key: workable # shared bucket name (defaults to URL origin)
|
|
184
|
+
requests: 10 # max requests per window
|
|
185
|
+
per: minute # second | minute | hour
|
|
186
|
+
max_retries: 5 # retries on 429 (default: 3)
|
|
187
|
+
backoff: exponential # fixed | exponential (default: exponential)
|
|
188
|
+
initial_delay_ms: 1000 # base delay for backoff (default: 1000)
|
|
189
|
+
|
|
190
|
+
github-rest:
|
|
191
|
+
type: http_client
|
|
192
|
+
name: github-rest
|
|
193
|
+
base_url: https://api.github.com
|
|
194
|
+
headers:
|
|
195
|
+
Authorization: "Bearer ${GITHUB_TOKEN}"
|
|
196
|
+
rate_limit:
|
|
197
|
+
key: github
|
|
198
|
+
requests: 30
|
|
199
|
+
per: minute
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
**Rate limit options:**
|
|
203
|
+
|
|
204
|
+
| Option | Description | Default |
|
|
205
|
+
|--------|-------------|---------|
|
|
206
|
+
| `key` | Shared bucket name; tools with the same key share one bucket | URL origin |
|
|
207
|
+
| `requests` | Maximum requests allowed per window | Required |
|
|
208
|
+
| `per` | Window duration: `second`, `minute`, or `hour` | Required |
|
|
209
|
+
| `max_retries` | Number of retries on HTTP 429 responses | 3 |
|
|
210
|
+
| `backoff` | Retry strategy: `fixed` or `exponential` | exponential |
|
|
211
|
+
| `initial_delay_ms` | Base delay in milliseconds for backoff | 1000 |
|
|
212
|
+
|
|
213
|
+
When a 429 response is received, the limiter automatically retries with backoff and respects the server's `Retry-After` header when present.
|
|
214
|
+
|
|
215
|
+
Rate limiting also works on `http_client` check steps — see [HTTP Integration](./http.md) for details.
|
|
216
|
+
|
|
168
217
|
### Advanced Example with Multiple Tools
|
|
169
218
|
|
|
170
219
|
```yaml
|
package/dist/docs/http.md
CHANGED
|
@@ -139,6 +139,29 @@ steps:
|
|
|
139
139
|
| `transform_js` | JavaScript expression to transform response | - |
|
|
140
140
|
| `output_file` | Download response to file instead of returning data | - |
|
|
141
141
|
| `skip_if_exists` | Skip download if file exists (caching) | true |
|
|
142
|
+
| `rate_limit` | Rate limiting configuration (see below) | - |
|
|
143
|
+
|
|
144
|
+
**Rate Limiting:**
|
|
145
|
+
|
|
146
|
+
Throttle outgoing requests to avoid hitting API rate limits. Multiple steps sharing the same `key` share a single token bucket globally.
|
|
147
|
+
|
|
148
|
+
```yaml
|
|
149
|
+
steps:
|
|
150
|
+
fetch-data:
|
|
151
|
+
type: http_client
|
|
152
|
+
url: "https://api.example.com/data"
|
|
153
|
+
headers:
|
|
154
|
+
Authorization: "Bearer ${API_TOKEN}"
|
|
155
|
+
rate_limit:
|
|
156
|
+
key: example-api # Shared bucket name (defaults to URL origin)
|
|
157
|
+
requests: 30 # Max requests per window
|
|
158
|
+
per: minute # second | minute | hour
|
|
159
|
+
max_retries: 3 # Retries on 429 (default: 3)
|
|
160
|
+
backoff: exponential # fixed | exponential (default: exponential)
|
|
161
|
+
initial_delay_ms: 1000 # Base delay for backoff (default: 1000)
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
On a 429 response, the limiter automatically retries with backoff and respects the server's `Retry-After` header when present.
|
|
142
165
|
|
|
143
166
|
**File Download Example:**
|
|
144
167
|
|
|
@@ -409,6 +409,54 @@ The `conversation:` format auto-builds message history from prior turns, removin
|
|
|
409
409
|
|
|
410
410
|
Compare this with the equivalent `flow:` format in recipe #10 — the `conversation:` format is significantly more concise.
|
|
411
411
|
|
|
412
|
+
## 13) Multi-user conversation: group chat isolation
|
|
413
|
+
|
|
414
|
+
Use the `user:` field on turns to simulate different users in the same conversation thread. The value is exposed as `conversation.current.user` in Liquid templates.
|
|
415
|
+
|
|
416
|
+
```yaml
|
|
417
|
+
- name: group-chat-data-isolation
|
|
418
|
+
conversation:
|
|
419
|
+
turns:
|
|
420
|
+
# User 1 asks about their data
|
|
421
|
+
- role: user
|
|
422
|
+
user: "user-1"
|
|
423
|
+
text: "What are my open tickets?"
|
|
424
|
+
mocks:
|
|
425
|
+
chat: { text: "You have 3 open tickets: AUTH-1, AUTH-2, AUTH-3.", intent: chat }
|
|
426
|
+
getUserContext:
|
|
427
|
+
user: { id: 1, name: "Alice", role: "engineer" }
|
|
428
|
+
tickets: [{ id: "AUTH-1" }, { id: "AUTH-2" }, { id: "AUTH-3" }]
|
|
429
|
+
expect:
|
|
430
|
+
outputs:
|
|
431
|
+
- step: chat
|
|
432
|
+
path: text
|
|
433
|
+
matches: "(?i)3|AUTH|ticket"
|
|
434
|
+
|
|
435
|
+
# Different user in the same thread — sees DIFFERENT data
|
|
436
|
+
- role: user
|
|
437
|
+
user: "user-2"
|
|
438
|
+
text: "Show me my tickets too"
|
|
439
|
+
mocks:
|
|
440
|
+
chat: { text: "You have 1 open ticket: API-42.", intent: chat }
|
|
441
|
+
getUserContext:
|
|
442
|
+
user: { id: 2, name: "Bob", role: "manager" }
|
|
443
|
+
tickets: [{ id: "API-42" }]
|
|
444
|
+
expect:
|
|
445
|
+
outputs:
|
|
446
|
+
- step: chat
|
|
447
|
+
path: text
|
|
448
|
+
matches: "(?i)1|API-42|ticket"
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
**How it works in `--no-mocks` mode:**
|
|
452
|
+
|
|
453
|
+
1. The test runner sets `conversation.current.user` from the turn's `user:` field
|
|
454
|
+
2. Your system prompt uses Liquid: `provider_id: "{{ conversation.current.user }}"`
|
|
455
|
+
3. The AI reads the rendered prompt and passes the identity as a tool argument
|
|
456
|
+
4. Your backend resolves the identity and returns user-specific data
|
|
457
|
+
|
|
458
|
+
This enables end-to-end testing of per-user data isolation without mocks.
|
|
459
|
+
|
|
412
460
|
## Related Documentation
|
|
413
461
|
|
|
414
462
|
- [Getting Started](./getting-started.md) - Introduction to the test framework
|
|
@@ -71,8 +71,9 @@ tests:
|
|
|
71
71
|
conversation:
|
|
72
72
|
- role: user|assistant
|
|
73
73
|
text: <string>
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
user: <string> # optional — sets conversation.current.user
|
|
75
|
+
mocks: { <step>: <value> } # per-turn mocks
|
|
76
|
+
expect: <expect-block> # per-turn assertions
|
|
76
77
|
# OR conversation with config
|
|
77
78
|
conversation:
|
|
78
79
|
transport: slack # default: slack
|
|
@@ -82,6 +83,7 @@ tests:
|
|
|
82
83
|
turns:
|
|
83
84
|
- role: user
|
|
84
85
|
text: <string>
|
|
86
|
+
user: <string> # optional — sets conversation.current.user
|
|
85
87
|
mocks: ...
|
|
86
88
|
expect: ...
|
|
87
89
|
|
|
@@ -279,7 +279,39 @@ For multi-turn conversation tests, the `conversation:` format provides a more co
|
|
|
279
279
|
- `turn: N` (1-based) references the Nth turn's output; `turn: current` references the current turn
|
|
280
280
|
- Use `role: assistant` turns to override mock-inferred responses in the history
|
|
281
281
|
|
|
282
|
-
|
|
282
|
+
### Per-turn user identity
|
|
283
|
+
|
|
284
|
+
Add `user:` to a turn to set `conversation.current.user` for that stage. This is useful for testing multi-user scenarios like group chats where different users interact in the same thread.
|
|
285
|
+
|
|
286
|
+
```yaml
|
|
287
|
+
- name: group-chat-isolation
|
|
288
|
+
conversation:
|
|
289
|
+
turns:
|
|
290
|
+
- role: user
|
|
291
|
+
user: "alice"
|
|
292
|
+
text: "What are my open tickets?"
|
|
293
|
+
mocks:
|
|
294
|
+
chat: { text: "You have 3 open tickets.", intent: chat }
|
|
295
|
+
expect:
|
|
296
|
+
outputs:
|
|
297
|
+
- step: chat
|
|
298
|
+
path: text
|
|
299
|
+
matches: "(?i)3|ticket"
|
|
300
|
+
- role: user
|
|
301
|
+
user: "bob"
|
|
302
|
+
text: "Show me my tickets"
|
|
303
|
+
mocks:
|
|
304
|
+
chat: { text: "You have 1 open ticket.", intent: chat }
|
|
305
|
+
expect:
|
|
306
|
+
outputs:
|
|
307
|
+
- step: chat
|
|
308
|
+
path: text
|
|
309
|
+
matches: "(?i)1|ticket"
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
The `user` value is available in Liquid templates as `{{ conversation.current.user }}`. This lets the system prompt pass per-user identity to tool calls, enabling true data isolation testing in `--no-mocks` mode.
|
|
313
|
+
|
|
314
|
+
See [DSL Reference](./dsl-reference.md#conversation-sugar) for the full schema and [Cookbook](./cookbook.md) recipes #12–13 for more examples.
|
|
283
315
|
|
|
284
316
|
## Debugging flows
|
|
285
317
|
|
|
@@ -78,6 +78,22 @@ steps:
|
|
|
78
78
|
"risk_score": {{ response.risk_score | default: 0 }}
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
+
# Rate-limited API call — throttle to avoid hitting API limits
|
|
82
|
+
rate-limited-fetch:
|
|
83
|
+
type: http_client
|
|
84
|
+
criticality: external
|
|
85
|
+
assume: "env.EXTERNAL_API_TOKEN"
|
|
86
|
+
schema: plain
|
|
87
|
+
url: "https://api.external-service.com/v1/data"
|
|
88
|
+
headers:
|
|
89
|
+
Authorization: "Bearer ${EXTERNAL_API_TOKEN}"
|
|
90
|
+
rate_limit:
|
|
91
|
+
key: external-service # Tools sharing this key share one bucket
|
|
92
|
+
requests: 10
|
|
93
|
+
per: minute
|
|
94
|
+
max_retries: 3
|
|
95
|
+
backoff: exponential
|
|
96
|
+
|
|
81
97
|
# === HTTP INPUT: Receive webhook data ===
|
|
82
98
|
|
|
83
99
|
# Receive GitHub webhook events
|
|
@@ -421,6 +421,10 @@ export declare const configSchema: {
|
|
|
421
421
|
readonly '^x-': {};
|
|
422
422
|
};
|
|
423
423
|
};
|
|
424
|
+
readonly rate_limit: {
|
|
425
|
+
readonly $ref: "#/definitions/RateLimitConfig";
|
|
426
|
+
readonly description: "Rate limiting configuration for HTTP/API tools";
|
|
427
|
+
};
|
|
424
428
|
readonly workflow: {
|
|
425
429
|
readonly type: "string";
|
|
426
430
|
readonly description: "Workflow ID (registry lookup) or file path (for type: 'workflow')";
|
|
@@ -457,6 +461,43 @@ export declare const configSchema: {
|
|
|
457
461
|
readonly type: "string";
|
|
458
462
|
};
|
|
459
463
|
};
|
|
464
|
+
readonly RateLimitConfig: {
|
|
465
|
+
readonly type: "object";
|
|
466
|
+
readonly properties: {
|
|
467
|
+
readonly key: {
|
|
468
|
+
readonly type: "string";
|
|
469
|
+
readonly description: "Shared bucket name; defaults to URL origin";
|
|
470
|
+
};
|
|
471
|
+
readonly requests: {
|
|
472
|
+
readonly type: "number";
|
|
473
|
+
readonly description: "Max requests per window";
|
|
474
|
+
};
|
|
475
|
+
readonly per: {
|
|
476
|
+
readonly type: "string";
|
|
477
|
+
readonly enum: readonly ["second", "minute", "hour"];
|
|
478
|
+
readonly description: "Time window unit";
|
|
479
|
+
};
|
|
480
|
+
readonly max_retries: {
|
|
481
|
+
readonly type: "number";
|
|
482
|
+
readonly description: "Max retries on 429 (default: 3)";
|
|
483
|
+
};
|
|
484
|
+
readonly backoff: {
|
|
485
|
+
readonly type: "string";
|
|
486
|
+
readonly enum: readonly ["fixed", "exponential"];
|
|
487
|
+
readonly description: "Backoff strategy (default: exponential)";
|
|
488
|
+
};
|
|
489
|
+
readonly initial_delay_ms: {
|
|
490
|
+
readonly type: "number";
|
|
491
|
+
readonly description: "Base delay for backoff in ms (default: 1000)";
|
|
492
|
+
};
|
|
493
|
+
};
|
|
494
|
+
readonly required: readonly ["requests", "per"];
|
|
495
|
+
readonly additionalProperties: false;
|
|
496
|
+
readonly description: "Rate limit configuration for HTTP/API requests.";
|
|
497
|
+
readonly patternProperties: {
|
|
498
|
+
readonly '^x-': {};
|
|
499
|
+
};
|
|
500
|
+
};
|
|
460
501
|
readonly WorkflowInput: {
|
|
461
502
|
readonly type: "object";
|
|
462
503
|
readonly properties: {
|
|
@@ -559,6 +600,10 @@ export declare const configSchema: {
|
|
|
559
600
|
readonly $ref: "#/definitions/Record%3Cstring%2Cstring%3E";
|
|
560
601
|
readonly description: "HTTP headers";
|
|
561
602
|
};
|
|
603
|
+
readonly rate_limit: {
|
|
604
|
+
readonly $ref: "#/definitions/RateLimitConfig";
|
|
605
|
+
readonly description: "Rate limiting configuration for http_client checks";
|
|
606
|
+
};
|
|
562
607
|
readonly endpoint: {
|
|
563
608
|
readonly type: "string";
|
|
564
609
|
readonly description: "HTTP endpoint path - required for http_input checks";
|
|
@@ -942,7 +987,7 @@ export declare const configSchema: {
|
|
|
942
987
|
readonly description: "Arguments/inputs for the workflow";
|
|
943
988
|
};
|
|
944
989
|
readonly overrides: {
|
|
945
|
-
readonly $ref: "#/definitions/Record%3Cstring%2CPartial%3Cinterface-src_types_config.ts-
|
|
990
|
+
readonly $ref: "#/definitions/Record%3Cstring%2CPartial%3Cinterface-src_types_config.ts-14532-29218-src_types_config.ts-0-57785%3E%3E";
|
|
946
991
|
readonly description: "Override specific step configurations in the workflow";
|
|
947
992
|
};
|
|
948
993
|
readonly output_mapping: {
|
|
@@ -958,7 +1003,7 @@ export declare const configSchema: {
|
|
|
958
1003
|
readonly description: "Config file path - alternative to workflow ID (loads a Visor config file as workflow)";
|
|
959
1004
|
};
|
|
960
1005
|
readonly workflow_overrides: {
|
|
961
|
-
readonly $ref: "#/definitions/Record%3Cstring%2CPartial%3Cinterface-src_types_config.ts-
|
|
1006
|
+
readonly $ref: "#/definitions/Record%3Cstring%2CPartial%3Cinterface-src_types_config.ts-14532-29218-src_types_config.ts-0-57785%3E%3E";
|
|
962
1007
|
readonly description: "Alias for overrides - workflow step overrides (backward compatibility)";
|
|
963
1008
|
};
|
|
964
1009
|
readonly ref: {
|
|
@@ -1618,7 +1663,7 @@ export declare const configSchema: {
|
|
|
1618
1663
|
readonly description: "Custom output name (defaults to workflow name)";
|
|
1619
1664
|
};
|
|
1620
1665
|
readonly overrides: {
|
|
1621
|
-
readonly $ref: "#/definitions/Record%3Cstring%2CPartial%3Cinterface-src_types_config.ts-
|
|
1666
|
+
readonly $ref: "#/definitions/Record%3Cstring%2CPartial%3Cinterface-src_types_config.ts-14532-29218-src_types_config.ts-0-57785%3E%3E";
|
|
1622
1667
|
readonly description: "Step overrides";
|
|
1623
1668
|
};
|
|
1624
1669
|
readonly output_mapping: {
|
|
@@ -1633,13 +1678,13 @@ export declare const configSchema: {
|
|
|
1633
1678
|
readonly '^x-': {};
|
|
1634
1679
|
};
|
|
1635
1680
|
};
|
|
1636
|
-
readonly 'Record<string,Partial<interface-src_types_config.ts-
|
|
1681
|
+
readonly 'Record<string,Partial<interface-src_types_config.ts-14532-29218-src_types_config.ts-0-57785>>': {
|
|
1637
1682
|
readonly type: "object";
|
|
1638
1683
|
readonly additionalProperties: {
|
|
1639
|
-
readonly $ref: "#/definitions/Partial%3Cinterface-src_types_config.ts-
|
|
1684
|
+
readonly $ref: "#/definitions/Partial%3Cinterface-src_types_config.ts-14532-29218-src_types_config.ts-0-57785%3E";
|
|
1640
1685
|
};
|
|
1641
1686
|
};
|
|
1642
|
-
readonly 'Partial<interface-src_types_config.ts-
|
|
1687
|
+
readonly 'Partial<interface-src_types_config.ts-14532-29218-src_types_config.ts-0-57785>': {
|
|
1643
1688
|
readonly type: "object";
|
|
1644
1689
|
readonly additionalProperties: false;
|
|
1645
1690
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-schema.d.ts","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/generated/config-schema.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"config-schema.d.ts","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/generated/config-schema.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4oHf,CAAC;AACX,eAAe,YAAY,CAAC"}
|
|
@@ -456,6 +456,10 @@
|
|
|
456
456
|
"^x-": {}
|
|
457
457
|
}
|
|
458
458
|
},
|
|
459
|
+
"rate_limit": {
|
|
460
|
+
"$ref": "#/definitions/RateLimitConfig",
|
|
461
|
+
"description": "Rate limiting configuration for HTTP/API tools"
|
|
462
|
+
},
|
|
459
463
|
"workflow": {
|
|
460
464
|
"type": "string",
|
|
461
465
|
"description": "Workflow ID (registry lookup) or file path (for type: 'workflow')"
|
|
@@ -494,6 +498,53 @@
|
|
|
494
498
|
"type": "string"
|
|
495
499
|
}
|
|
496
500
|
},
|
|
501
|
+
"RateLimitConfig": {
|
|
502
|
+
"type": "object",
|
|
503
|
+
"properties": {
|
|
504
|
+
"key": {
|
|
505
|
+
"type": "string",
|
|
506
|
+
"description": "Shared bucket name; defaults to URL origin"
|
|
507
|
+
},
|
|
508
|
+
"requests": {
|
|
509
|
+
"type": "number",
|
|
510
|
+
"description": "Max requests per window"
|
|
511
|
+
},
|
|
512
|
+
"per": {
|
|
513
|
+
"type": "string",
|
|
514
|
+
"enum": [
|
|
515
|
+
"second",
|
|
516
|
+
"minute",
|
|
517
|
+
"hour"
|
|
518
|
+
],
|
|
519
|
+
"description": "Time window unit"
|
|
520
|
+
},
|
|
521
|
+
"max_retries": {
|
|
522
|
+
"type": "number",
|
|
523
|
+
"description": "Max retries on 429 (default: 3)"
|
|
524
|
+
},
|
|
525
|
+
"backoff": {
|
|
526
|
+
"type": "string",
|
|
527
|
+
"enum": [
|
|
528
|
+
"fixed",
|
|
529
|
+
"exponential"
|
|
530
|
+
],
|
|
531
|
+
"description": "Backoff strategy (default: exponential)"
|
|
532
|
+
},
|
|
533
|
+
"initial_delay_ms": {
|
|
534
|
+
"type": "number",
|
|
535
|
+
"description": "Base delay for backoff in ms (default: 1000)"
|
|
536
|
+
}
|
|
537
|
+
},
|
|
538
|
+
"required": [
|
|
539
|
+
"requests",
|
|
540
|
+
"per"
|
|
541
|
+
],
|
|
542
|
+
"additionalProperties": false,
|
|
543
|
+
"description": "Rate limit configuration for HTTP/API requests.",
|
|
544
|
+
"patternProperties": {
|
|
545
|
+
"^x-": {}
|
|
546
|
+
}
|
|
547
|
+
},
|
|
497
548
|
"WorkflowInput": {
|
|
498
549
|
"type": "object",
|
|
499
550
|
"properties": {
|
|
@@ -600,6 +651,10 @@
|
|
|
600
651
|
"$ref": "#/definitions/Record%3Cstring%2Cstring%3E",
|
|
601
652
|
"description": "HTTP headers"
|
|
602
653
|
},
|
|
654
|
+
"rate_limit": {
|
|
655
|
+
"$ref": "#/definitions/RateLimitConfig",
|
|
656
|
+
"description": "Rate limiting configuration for http_client checks"
|
|
657
|
+
},
|
|
603
658
|
"endpoint": {
|
|
604
659
|
"type": "string",
|
|
605
660
|
"description": "HTTP endpoint path - required for http_input checks"
|
|
@@ -1037,7 +1092,7 @@
|
|
|
1037
1092
|
"description": "Arguments/inputs for the workflow"
|
|
1038
1093
|
},
|
|
1039
1094
|
"overrides": {
|
|
1040
|
-
"$ref": "#/definitions/Record%3Cstring%2CPartial%3Cinterface-src_types_config.ts-
|
|
1095
|
+
"$ref": "#/definitions/Record%3Cstring%2CPartial%3Cinterface-src_types_config.ts-14532-29218-src_types_config.ts-0-57785%3E%3E",
|
|
1041
1096
|
"description": "Override specific step configurations in the workflow"
|
|
1042
1097
|
},
|
|
1043
1098
|
"output_mapping": {
|
|
@@ -1053,7 +1108,7 @@
|
|
|
1053
1108
|
"description": "Config file path - alternative to workflow ID (loads a Visor config file as workflow)"
|
|
1054
1109
|
},
|
|
1055
1110
|
"workflow_overrides": {
|
|
1056
|
-
"$ref": "#/definitions/Record%3Cstring%2CPartial%3Cinterface-src_types_config.ts-
|
|
1111
|
+
"$ref": "#/definitions/Record%3Cstring%2CPartial%3Cinterface-src_types_config.ts-14532-29218-src_types_config.ts-0-57785%3E%3E",
|
|
1057
1112
|
"description": "Alias for overrides - workflow step overrides (backward compatibility)"
|
|
1058
1113
|
},
|
|
1059
1114
|
"ref": {
|
|
@@ -1792,7 +1847,7 @@
|
|
|
1792
1847
|
"description": "Custom output name (defaults to workflow name)"
|
|
1793
1848
|
},
|
|
1794
1849
|
"overrides": {
|
|
1795
|
-
"$ref": "#/definitions/Record%3Cstring%2CPartial%3Cinterface-src_types_config.ts-
|
|
1850
|
+
"$ref": "#/definitions/Record%3Cstring%2CPartial%3Cinterface-src_types_config.ts-14532-29218-src_types_config.ts-0-57785%3E%3E",
|
|
1796
1851
|
"description": "Step overrides"
|
|
1797
1852
|
},
|
|
1798
1853
|
"output_mapping": {
|
|
@@ -1809,13 +1864,13 @@
|
|
|
1809
1864
|
"^x-": {}
|
|
1810
1865
|
}
|
|
1811
1866
|
},
|
|
1812
|
-
"Record<string,Partial<interface-src_types_config.ts-
|
|
1867
|
+
"Record<string,Partial<interface-src_types_config.ts-14532-29218-src_types_config.ts-0-57785>>": {
|
|
1813
1868
|
"type": "object",
|
|
1814
1869
|
"additionalProperties": {
|
|
1815
|
-
"$ref": "#/definitions/Partial%3Cinterface-src_types_config.ts-
|
|
1870
|
+
"$ref": "#/definitions/Partial%3Cinterface-src_types_config.ts-14532-29218-src_types_config.ts-0-57785%3E"
|
|
1816
1871
|
}
|
|
1817
1872
|
},
|
|
1818
|
-
"Partial<interface-src_types_config.ts-
|
|
1873
|
+
"Partial<interface-src_types_config.ts-14532-29218-src_types_config.ts-0-57785>": {
|
|
1819
1874
|
"type": "object",
|
|
1820
1875
|
"additionalProperties": false
|
|
1821
1876
|
},
|
|
@@ -21,11 +21,14 @@ export interface CommentMetadata {
|
|
|
21
21
|
commitSha?: string;
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
|
-
* Manages GitHub PR comments with dynamic updating capabilities
|
|
24
|
+
* Manages GitHub PR comments with dynamic updating capabilities.
|
|
25
|
+
* All write operations are serialized through an internal queue to prevent
|
|
26
|
+
* concurrent GitHub API calls from racing against each other.
|
|
25
27
|
*/
|
|
26
28
|
export declare class CommentManager {
|
|
27
29
|
private octokit;
|
|
28
30
|
private retryConfig;
|
|
31
|
+
private _writeQueue;
|
|
29
32
|
constructor(octokit: Octokit, retryConfig?: Partial<RetryConfig>);
|
|
30
33
|
/**
|
|
31
34
|
* Find existing Visor comment by comment ID marker
|
|
@@ -42,6 +45,7 @@ export declare class CommentManager {
|
|
|
42
45
|
/** Cached GitHub comment ID to use for updates when listComments may not return it yet (eventual consistency) */
|
|
43
46
|
cachedGithubCommentId?: number;
|
|
44
47
|
}): Promise<Comment>;
|
|
48
|
+
private _doUpdateOrCreate;
|
|
45
49
|
/**
|
|
46
50
|
* Format comment content with metadata markers
|
|
47
51
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/github-comments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAKxC,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAYD
|
|
1
|
+
{"version":3,"file":"","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/github-comments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAKxC,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAYD;;;;GAIG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAAC,WAAW,CAAc;IAGjC,OAAO,CAAC,WAAW,CAAoC;gBAE3C,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC;IAWhE;;OAEG;IACU,gBAAgB,CAC3B,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAChB,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,O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