@probelabs/visor 0.1.129 → 0.1.130
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/README.md +23 -0
- package/dist/cli-main.d.ts.map +1 -1
- package/dist/config.d.ts +4 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/docs/author-permissions.md +20 -0
- package/dist/docs/enterprise-policy.md +1325 -0
- package/dist/docs/index.md +10 -0
- package/dist/docs/scheduler-storage.md +433 -0
- package/dist/docs/scheduler.md +12 -2
- package/dist/enterprise/license/validator.d.ts +39 -0
- package/dist/enterprise/license/validator.d.ts.map +1 -0
- package/dist/enterprise/loader.d.ts +25 -0
- package/dist/enterprise/loader.d.ts.map +1 -0
- package/dist/enterprise/policy/opa-compiler.d.ts +37 -0
- package/dist/enterprise/policy/opa-compiler.d.ts.map +1 -0
- package/dist/enterprise/policy/opa-http-evaluator.d.ts +36 -0
- package/dist/enterprise/policy/opa-http-evaluator.d.ts.map +1 -0
- package/dist/enterprise/policy/opa-policy-engine.d.ts +48 -0
- package/dist/enterprise/policy/opa-policy-engine.d.ts.map +1 -0
- package/dist/enterprise/policy/opa-wasm-evaluator.d.ts +34 -0
- package/dist/enterprise/policy/opa-wasm-evaluator.d.ts.map +1 -0
- package/dist/enterprise/policy/policy-input-builder.d.ts +120 -0
- package/dist/enterprise/policy/policy-input-builder.d.ts.map +1 -0
- package/dist/enterprise/scheduler/knex-store.d.ts +41 -0
- package/dist/enterprise/scheduler/knex-store.d.ts.map +1 -0
- package/dist/examples/README.md +23 -0
- package/dist/examples/enterprise-policy/README.md +344 -0
- package/dist/examples/enterprise-policy/policies/capability_resolve.rego +29 -0
- package/dist/examples/enterprise-policy/policies/capability_resolve_test.rego +230 -0
- package/dist/examples/enterprise-policy/policies/check_execute.rego +71 -0
- package/dist/examples/enterprise-policy/policies/check_execute_test.rego +321 -0
- package/dist/examples/enterprise-policy/policies/deploy_production.rego +33 -0
- package/dist/examples/enterprise-policy/policies/deploy_production_test.rego +29 -0
- package/dist/examples/enterprise-policy/policies/slack_channel_gate.rego +17 -0
- package/dist/examples/enterprise-policy/policies/slack_tool_restrict.rego +16 -0
- package/dist/examples/enterprise-policy/policies/tool_invoke.rego +24 -0
- package/dist/examples/enterprise-policy/policies/tool_invoke_test.rego +227 -0
- package/dist/examples/enterprise-policy/visor.yaml +64 -0
- package/dist/failure-condition-evaluator.d.ts +18 -0
- package/dist/failure-condition-evaluator.d.ts.map +1 -1
- package/dist/frontends/slack-frontend.d.ts +1 -0
- package/dist/frontends/slack-frontend.d.ts.map +1 -1
- package/dist/generated/config-schema.d.ts +139 -0
- package/dist/generated/config-schema.d.ts.map +1 -1
- package/dist/index.js +12121 -7169
- package/dist/liquid-extensions.d.ts.map +1 -1
- package/dist/output/traces/{run-2026-02-08T18-16-04-160Z.ndjson → run-2026-02-11T16-20-59-999Z.ndjson} +84 -84
- package/dist/{traces/run-2026-02-08T18-16-51-253Z.ndjson → output/traces/run-2026-02-11T16-21-47-711Z.ndjson} +1032 -1032
- package/dist/policy/default-engine.d.ts +17 -0
- package/dist/policy/default-engine.d.ts.map +1 -0
- package/dist/policy/index.d.ts +4 -0
- package/dist/policy/index.d.ts.map +1 -0
- package/dist/policy/policy-check-command.d.ts +65 -0
- package/dist/policy/policy-check-command.d.ts.map +1 -0
- package/dist/policy/types.d.ts +81 -0
- package/dist/policy/types.d.ts.map +1 -0
- package/dist/providers/ai-check-provider.d.ts.map +1 -1
- package/dist/providers/check-provider.interface.d.ts +2 -0
- package/dist/providers/check-provider.interface.d.ts.map +1 -1
- package/dist/providers/claude-code-check-provider.d.ts.map +1 -1
- package/dist/providers/mcp-check-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/scheduler/index.d.ts +2 -0
- package/dist/scheduler/index.d.ts.map +1 -1
- package/dist/scheduler/schedule-store.d.ts +33 -59
- package/dist/scheduler/schedule-store.d.ts.map +1 -1
- package/dist/scheduler/schedule-tool.d.ts.map +1 -1
- package/dist/scheduler/scheduler.d.ts +24 -3
- package/dist/scheduler/scheduler.d.ts.map +1 -1
- package/dist/scheduler/store/index.d.ts +7 -0
- package/dist/scheduler/store/index.d.ts.map +1 -0
- package/dist/scheduler/store/json-migrator.d.ts +10 -0
- package/dist/scheduler/store/json-migrator.d.ts.map +1 -0
- package/dist/scheduler/store/sqlite-store.d.ts +32 -0
- package/dist/scheduler/store/sqlite-store.d.ts.map +1 -0
- package/dist/scheduler/store/types.d.ts +127 -0
- package/dist/scheduler/store/types.d.ts.map +1 -0
- package/dist/sdk/check-provider-registry-M3Y6JMTW.mjs +28 -0
- package/dist/sdk/check-provider-registry-PANIXYRB.mjs +28 -0
- package/dist/sdk/{chunk-D5KI4YQ4.mjs → chunk-DIND4ZCV.mjs} +2 -2
- package/dist/sdk/{chunk-DGZPPGJJ.mjs → chunk-EUUAQBTW.mjs} +1463 -568
- package/dist/sdk/chunk-EUUAQBTW.mjs.map +1 -0
- package/dist/sdk/{chunk-XDLQ3UNF.mjs → chunk-GEW6LS32.mjs} +2 -2
- package/dist/sdk/{chunk-N7HO6KKC.mjs → chunk-HOKQOO3G.mjs} +11 -6
- package/dist/sdk/chunk-HOKQOO3G.mjs.map +1 -0
- package/dist/sdk/{chunk-XR7XXGL7.mjs → chunk-JL7JXCET.mjs} +2 -2
- package/dist/sdk/{chunk-6W75IMDC.mjs → chunk-LG4AUKHB.mjs} +2 -2
- package/dist/sdk/{chunk-BDGUM6BA.mjs → chunk-S6CD7GFM.mjs} +1463 -568
- package/dist/sdk/chunk-S6CD7GFM.mjs.map +1 -0
- package/dist/sdk/{chunk-PO7X5XI7.mjs → chunk-SZXICFQ3.mjs} +2 -2
- package/dist/sdk/{chunk-HEX3RL32.mjs → chunk-UCMJJ3IM.mjs} +5 -2
- package/dist/sdk/{chunk-HEX3RL32.mjs.map → chunk-UCMJJ3IM.mjs.map} +1 -1
- package/dist/sdk/{chunk-7YSOINAQ.mjs → chunk-UCNT3PDT.mjs} +342 -5
- package/dist/sdk/chunk-UCNT3PDT.mjs.map +1 -0
- package/dist/sdk/{chunk-R5Z7YWPB.mjs → chunk-V2IV3ILA.mjs} +7 -5
- package/dist/sdk/chunk-V2IV3ILA.mjs.map +1 -0
- package/dist/sdk/{chunk-SGS2VMEL.mjs → chunk-VMLORODQ.mjs} +107 -20
- package/dist/sdk/chunk-VMLORODQ.mjs.map +1 -0
- package/dist/sdk/{chunk-2KB35MB7.mjs → chunk-VPC3QSPW.mjs} +2 -2
- package/dist/sdk/{chunk-J5RGJQ53.mjs → chunk-YJRBN3XS.mjs} +2 -2
- package/dist/sdk/{command-executor-DVVXERLR.mjs → command-executor-TOYBBE7S.mjs} +4 -4
- package/dist/sdk/{config-7VTT64SQ.mjs → config-OGOS4ZU4.mjs} +4 -4
- package/dist/sdk/failure-condition-evaluator-HC3M5377.mjs +17 -0
- package/dist/sdk/{github-frontend-3N2NLO66.mjs → github-frontend-E2KJSC3Y.mjs} +7 -7
- package/dist/sdk/{host-ONVMEHAA.mjs → host-EE6EJ2FM.mjs} +4 -4
- package/dist/sdk/lazy-otel-5NH4ZJJM.mjs +24 -0
- package/dist/sdk/{liquid-extensions-5IZLTFSZ.mjs → liquid-extensions-E4EUOCES.mjs} +5 -5
- package/dist/sdk/memory-store-AAPL2MTE.mjs +12 -0
- package/dist/sdk/{metrics-GXQ2EDXA.mjs → metrics-I6A7IHG4.mjs} +3 -3
- package/dist/sdk/{prompt-state-YHGXB2OA.mjs → prompt-state-VAKKC773.mjs} +4 -4
- package/dist/sdk/{renderer-schema-CMXOLNIG.mjs → renderer-schema-HXEW6BRJ.mjs} +3 -3
- package/dist/sdk/{routing-S3Y7T2X3.mjs → routing-OZQWAGAI.mjs} +9 -8
- package/dist/sdk/schedule-tool-handler-B7TMSG6A.mjs +38 -0
- package/dist/sdk/schedule-tool-handler-IEB2VS7O.mjs +38 -0
- package/dist/sdk/sdk.d.mts +134 -4
- package/dist/sdk/sdk.d.ts +134 -4
- package/dist/sdk/sdk.js +2509 -1085
- package/dist/sdk/sdk.js.map +1 -1
- package/dist/sdk/sdk.mjs +14 -14
- package/dist/sdk/{slack-frontend-R3M2CACB.mjs → slack-frontend-LAY45IBR.mjs} +119 -29
- package/dist/sdk/slack-frontend-LAY45IBR.mjs.map +1 -0
- package/dist/sdk/{trace-helpers-YHNPC7MR.mjs → trace-helpers-PP3YHTAM.mjs} +3 -3
- package/dist/sdk/{tui-frontend-S546M7A7.mjs → tui-frontend-T56PZB67.mjs} +25 -16
- package/dist/sdk/tui-frontend-T56PZB67.mjs.map +1 -0
- package/dist/sdk/workflow-check-provider-2ET3SFZH.mjs +28 -0
- package/dist/sdk/workflow-check-provider-2ET3SFZH.mjs.map +1 -0
- package/dist/sdk/workflow-check-provider-HB4XTD4Z.mjs +28 -0
- package/dist/sdk/workflow-check-provider-HB4XTD4Z.mjs.map +1 -0
- package/dist/sdk/workflow-registry-AAD37XKZ.mjs +12 -0
- package/dist/sdk/workflow-registry-AAD37XKZ.mjs.map +1 -0
- package/dist/slack/client.d.ts +12 -0
- package/dist/slack/client.d.ts.map +1 -1
- package/dist/slack/slack-output-adapter.d.ts.map +1 -1
- package/dist/slack/socket-runner.d.ts.map +1 -1
- package/dist/state-machine/dispatch/execution-invoker.d.ts.map +1 -1
- package/dist/state-machine/dispatch/policy-gate.d.ts +28 -0
- package/dist/state-machine/dispatch/policy-gate.d.ts.map +1 -0
- package/dist/state-machine/states/level-dispatch.d.ts.map +1 -1
- package/dist/state-machine/states/routing.d.ts.map +1 -1
- package/dist/state-machine/states/wave-planning.d.ts.map +1 -1
- package/dist/state-machine-execution-engine.d.ts.map +1 -1
- package/dist/test-runner/core/flow-stage.d.ts.map +1 -1
- package/dist/test-runner/validator.d.ts.map +1 -1
- package/dist/traces/{run-2026-02-08T18-16-04-160Z.ndjson → run-2026-02-11T16-20-59-999Z.ndjson} +84 -84
- package/dist/{output/traces/run-2026-02-08T18-16-51-253Z.ndjson → traces/run-2026-02-11T16-21-47-711Z.ndjson} +1032 -1032
- package/dist/tui/chat-runner.d.ts.map +1 -1
- package/dist/tui/chat-state.d.ts +1 -0
- package/dist/tui/chat-state.d.ts.map +1 -1
- package/dist/tui/chat-tui.d.ts +3 -2
- package/dist/tui/chat-tui.d.ts.map +1 -1
- package/dist/tui/components/chat-box.d.ts +9 -0
- package/dist/tui/components/chat-box.d.ts.map +1 -1
- package/dist/tui/components/input-bar.d.ts +18 -1
- package/dist/tui/components/input-bar.d.ts.map +1 -1
- package/dist/tui/components/status-bar.d.ts +5 -2
- package/dist/tui/components/status-bar.d.ts.map +1 -1
- package/dist/tui/components/trace-viewer.d.ts +1 -0
- package/dist/tui/components/trace-viewer.d.ts.map +1 -1
- package/dist/tui/tui-frontend.d.ts.map +1 -1
- package/dist/types/config.d.ts +107 -3
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/engine.d.ts +5 -0
- package/dist/types/engine.d.ts.map +1 -1
- package/dist/types/execution.d.ts +1 -1
- package/dist/types/execution.d.ts.map +1 -1
- package/package.json +14 -4
- package/dist/sdk/check-provider-registry-ACRGIYOB.mjs +0 -28
- package/dist/sdk/check-provider-registry-VYHKFHK2.mjs +0 -28
- package/dist/sdk/chunk-7YSOINAQ.mjs.map +0 -1
- package/dist/sdk/chunk-BDGUM6BA.mjs.map +0 -1
- package/dist/sdk/chunk-DGZPPGJJ.mjs.map +0 -1
- package/dist/sdk/chunk-N7HO6KKC.mjs.map +0 -1
- package/dist/sdk/chunk-R5Z7YWPB.mjs.map +0 -1
- package/dist/sdk/chunk-SGS2VMEL.mjs.map +0 -1
- package/dist/sdk/failure-condition-evaluator-4WMDF4Q3.mjs +0 -17
- package/dist/sdk/memory-store-3N4AZCYB.mjs +0 -12
- package/dist/sdk/slack-frontend-R3M2CACB.mjs.map +0 -1
- package/dist/sdk/tui-frontend-S546M7A7.mjs.map +0 -1
- package/dist/sdk/workflow-check-provider-4F3432ZP.mjs +0 -28
- package/dist/sdk/workflow-check-provider-A44PBPG2.mjs +0 -28
- package/dist/sdk/workflow-registry-ZAYYXLEP.mjs +0 -12
- /package/dist/sdk/{check-provider-registry-ACRGIYOB.mjs.map → check-provider-registry-M3Y6JMTW.mjs.map} +0 -0
- /package/dist/sdk/{check-provider-registry-VYHKFHK2.mjs.map → check-provider-registry-PANIXYRB.mjs.map} +0 -0
- /package/dist/sdk/{chunk-D5KI4YQ4.mjs.map → chunk-DIND4ZCV.mjs.map} +0 -0
- /package/dist/sdk/{chunk-XDLQ3UNF.mjs.map → chunk-GEW6LS32.mjs.map} +0 -0
- /package/dist/sdk/{chunk-XR7XXGL7.mjs.map → chunk-JL7JXCET.mjs.map} +0 -0
- /package/dist/sdk/{chunk-6W75IMDC.mjs.map → chunk-LG4AUKHB.mjs.map} +0 -0
- /package/dist/sdk/{chunk-PO7X5XI7.mjs.map → chunk-SZXICFQ3.mjs.map} +0 -0
- /package/dist/sdk/{chunk-2KB35MB7.mjs.map → chunk-VPC3QSPW.mjs.map} +0 -0
- /package/dist/sdk/{chunk-J5RGJQ53.mjs.map → chunk-YJRBN3XS.mjs.map} +0 -0
- /package/dist/sdk/{command-executor-DVVXERLR.mjs.map → command-executor-TOYBBE7S.mjs.map} +0 -0
- /package/dist/sdk/{config-7VTT64SQ.mjs.map → config-OGOS4ZU4.mjs.map} +0 -0
- /package/dist/sdk/{failure-condition-evaluator-4WMDF4Q3.mjs.map → failure-condition-evaluator-HC3M5377.mjs.map} +0 -0
- /package/dist/sdk/{github-frontend-3N2NLO66.mjs.map → github-frontend-E2KJSC3Y.mjs.map} +0 -0
- /package/dist/sdk/{host-ONVMEHAA.mjs.map → host-EE6EJ2FM.mjs.map} +0 -0
- /package/dist/sdk/{liquid-extensions-5IZLTFSZ.mjs.map → lazy-otel-5NH4ZJJM.mjs.map} +0 -0
- /package/dist/sdk/{memory-store-3N4AZCYB.mjs.map → liquid-extensions-E4EUOCES.mjs.map} +0 -0
- /package/dist/sdk/{metrics-GXQ2EDXA.mjs.map → memory-store-AAPL2MTE.mjs.map} +0 -0
- /package/dist/sdk/{prompt-state-YHGXB2OA.mjs.map → metrics-I6A7IHG4.mjs.map} +0 -0
- /package/dist/sdk/{routing-S3Y7T2X3.mjs.map → prompt-state-VAKKC773.mjs.map} +0 -0
- /package/dist/sdk/{renderer-schema-CMXOLNIG.mjs.map → renderer-schema-HXEW6BRJ.mjs.map} +0 -0
- /package/dist/sdk/{trace-helpers-YHNPC7MR.mjs.map → routing-OZQWAGAI.mjs.map} +0 -0
- /package/dist/sdk/{workflow-check-provider-4F3432ZP.mjs.map → schedule-tool-handler-B7TMSG6A.mjs.map} +0 -0
- /package/dist/sdk/{workflow-check-provider-A44PBPG2.mjs.map → schedule-tool-handler-IEB2VS7O.mjs.map} +0 -0
- /package/dist/sdk/{workflow-registry-ZAYYXLEP.mjs.map → trace-helpers-PP3YHTAM.mjs.map} +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
package visor.check.execute
|
|
2
|
+
|
|
3
|
+
# Block deploy checks when triggered from Slack DMs.
|
|
4
|
+
# Deploy checks should only run from designated channels.
|
|
5
|
+
is_from_dm {
|
|
6
|
+
input.actor.slack.channelType == "dm"
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
allowed = false {
|
|
10
|
+
startswith(input.check.id, "deploy-")
|
|
11
|
+
is_from_dm
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
reason = "deploy checks cannot be triggered from Slack DMs" {
|
|
15
|
+
startswith(input.check.id, "deploy-")
|
|
16
|
+
is_from_dm
|
|
17
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
package visor.tool.invoke
|
|
2
|
+
|
|
3
|
+
default allowed = true
|
|
4
|
+
|
|
5
|
+
# Block destructive tool methods for non-admins
|
|
6
|
+
is_admin { input.actor.roles[_] == "admin" }
|
|
7
|
+
|
|
8
|
+
allowed = false {
|
|
9
|
+
endswith(input.tool.methodName, "_delete")
|
|
10
|
+
not is_admin
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
reason = "destructive tool methods require the admin role" {
|
|
14
|
+
endswith(input.tool.methodName, "_delete")
|
|
15
|
+
not is_admin
|
|
16
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# MCP tool access control policy (Visor Enterprise Edition)
|
|
2
|
+
# Controls which MCP methods each role can invoke.
|
|
3
|
+
# Contact hello@probelabs.com for licensing.
|
|
4
|
+
|
|
5
|
+
package visor.tool.invoke
|
|
6
|
+
|
|
7
|
+
default allowed = true
|
|
8
|
+
|
|
9
|
+
# Helper: actor has admin role
|
|
10
|
+
is_admin { input.actor.roles[_] == "admin" }
|
|
11
|
+
|
|
12
|
+
# Block destructive methods for non-admins
|
|
13
|
+
allowed = false {
|
|
14
|
+
endswith(input.tool.methodName, "_delete")
|
|
15
|
+
not is_admin
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
# Block bash execution tool for externals
|
|
19
|
+
allowed = false {
|
|
20
|
+
input.tool.methodName == "bash"
|
|
21
|
+
input.actor.roles[_] == "external"
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
reason = "tool access denied by policy" { not allowed }
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
# Tests for MCP tool access control policy
|
|
2
|
+
# Run with: opa test examples/enterprise-policy/policies/
|
|
3
|
+
|
|
4
|
+
package visor.tool.invoke
|
|
5
|
+
|
|
6
|
+
# ---------------------------------------------------------------------------
|
|
7
|
+
# Default allow – most tools are permitted by default
|
|
8
|
+
# ---------------------------------------------------------------------------
|
|
9
|
+
|
|
10
|
+
test_default_allowed_for_developer {
|
|
11
|
+
allowed with input as {
|
|
12
|
+
"scope": "tool.invoke",
|
|
13
|
+
"tool": {"serverName": "github", "methodName": "search_issues"},
|
|
14
|
+
"actor": {"roles": ["developer"], "isLocalMode": false}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
test_default_allowed_for_reviewer {
|
|
19
|
+
allowed with input as {
|
|
20
|
+
"scope": "tool.invoke",
|
|
21
|
+
"tool": {"serverName": "github", "methodName": "list_repos"},
|
|
22
|
+
"actor": {"roles": ["reviewer"], "isLocalMode": false}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
test_default_allowed_for_external_non_destructive {
|
|
27
|
+
allowed with input as {
|
|
28
|
+
"scope": "tool.invoke",
|
|
29
|
+
"tool": {"serverName": "github", "methodName": "get_pull_request"},
|
|
30
|
+
"actor": {"roles": ["external"], "isLocalMode": false}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
test_default_allowed_for_empty_roles {
|
|
35
|
+
allowed with input as {
|
|
36
|
+
"scope": "tool.invoke",
|
|
37
|
+
"tool": {"serverName": "github", "methodName": "search_issues"},
|
|
38
|
+
"actor": {"roles": [], "isLocalMode": false}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
# ---------------------------------------------------------------------------
|
|
43
|
+
# _delete methods blocked for non-admins
|
|
44
|
+
# ---------------------------------------------------------------------------
|
|
45
|
+
|
|
46
|
+
test_delete_blocked_for_developer {
|
|
47
|
+
not allowed with input as {
|
|
48
|
+
"scope": "tool.invoke",
|
|
49
|
+
"tool": {"serverName": "github", "methodName": "repo_delete"},
|
|
50
|
+
"actor": {"roles": ["developer"], "isLocalMode": false}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
test_delete_blocked_for_external {
|
|
55
|
+
not allowed with input as {
|
|
56
|
+
"scope": "tool.invoke",
|
|
57
|
+
"tool": {"serverName": "github", "methodName": "branch_delete"},
|
|
58
|
+
"actor": {"roles": ["external"], "isLocalMode": false}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
test_delete_blocked_for_reviewer {
|
|
63
|
+
not allowed with input as {
|
|
64
|
+
"scope": "tool.invoke",
|
|
65
|
+
"tool": {"serverName": "github", "methodName": "comment_delete"},
|
|
66
|
+
"actor": {"roles": ["reviewer"], "isLocalMode": false}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
test_delete_blocked_for_empty_roles {
|
|
71
|
+
not allowed with input as {
|
|
72
|
+
"scope": "tool.invoke",
|
|
73
|
+
"tool": {"serverName": "github", "methodName": "resource_delete"},
|
|
74
|
+
"actor": {"roles": [], "isLocalMode": false}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
# ---------------------------------------------------------------------------
|
|
79
|
+
# Admin can call _delete methods
|
|
80
|
+
# ---------------------------------------------------------------------------
|
|
81
|
+
|
|
82
|
+
test_admin_allowed_delete {
|
|
83
|
+
allowed with input as {
|
|
84
|
+
"scope": "tool.invoke",
|
|
85
|
+
"tool": {"serverName": "github", "methodName": "repo_delete"},
|
|
86
|
+
"actor": {"roles": ["admin"], "isLocalMode": false}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
test_admin_allowed_branch_delete {
|
|
91
|
+
allowed with input as {
|
|
92
|
+
"scope": "tool.invoke",
|
|
93
|
+
"tool": {"serverName": "github", "methodName": "branch_delete"},
|
|
94
|
+
"actor": {"roles": ["admin"], "isLocalMode": false}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
test_admin_allowed_any_tool {
|
|
99
|
+
allowed with input as {
|
|
100
|
+
"scope": "tool.invoke",
|
|
101
|
+
"tool": {"serverName": "shell", "methodName": "bash"},
|
|
102
|
+
"actor": {"roles": ["admin"], "isLocalMode": false}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
# ---------------------------------------------------------------------------
|
|
107
|
+
# Bash blocked for external contributors
|
|
108
|
+
# ---------------------------------------------------------------------------
|
|
109
|
+
|
|
110
|
+
test_bash_blocked_for_external {
|
|
111
|
+
not allowed with input as {
|
|
112
|
+
"scope": "tool.invoke",
|
|
113
|
+
"tool": {"serverName": "shell", "methodName": "bash"},
|
|
114
|
+
"actor": {"roles": ["external"], "isLocalMode": false}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
test_bash_allowed_for_developer {
|
|
119
|
+
allowed with input as {
|
|
120
|
+
"scope": "tool.invoke",
|
|
121
|
+
"tool": {"serverName": "shell", "methodName": "bash"},
|
|
122
|
+
"actor": {"roles": ["developer"], "isLocalMode": false}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
test_bash_allowed_for_reviewer {
|
|
127
|
+
allowed with input as {
|
|
128
|
+
"scope": "tool.invoke",
|
|
129
|
+
"tool": {"serverName": "shell", "methodName": "bash"},
|
|
130
|
+
"actor": {"roles": ["reviewer"], "isLocalMode": false}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
# ---------------------------------------------------------------------------
|
|
135
|
+
# External with _delete – blocked by both rules
|
|
136
|
+
# ---------------------------------------------------------------------------
|
|
137
|
+
|
|
138
|
+
test_external_with_delete_denied {
|
|
139
|
+
not allowed with input as {
|
|
140
|
+
"scope": "tool.invoke",
|
|
141
|
+
"tool": {"serverName": "github", "methodName": "repo_delete"},
|
|
142
|
+
"actor": {"roles": ["external"], "isLocalMode": false}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
# ---------------------------------------------------------------------------
|
|
147
|
+
# Method name edge cases
|
|
148
|
+
# ---------------------------------------------------------------------------
|
|
149
|
+
|
|
150
|
+
test_method_containing_delete_in_middle_not_blocked {
|
|
151
|
+
allowed with input as {
|
|
152
|
+
"scope": "tool.invoke",
|
|
153
|
+
"tool": {"serverName": "github", "methodName": "delete_branch"},
|
|
154
|
+
"actor": {"roles": ["developer"], "isLocalMode": false}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
test_method_exactly_delete_suffix {
|
|
159
|
+
not allowed with input as {
|
|
160
|
+
"scope": "tool.invoke",
|
|
161
|
+
"tool": {"serverName": "github", "methodName": "file_delete"},
|
|
162
|
+
"actor": {"roles": ["developer"], "isLocalMode": false}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
# ---------------------------------------------------------------------------
|
|
167
|
+
# Reason message
|
|
168
|
+
# ---------------------------------------------------------------------------
|
|
169
|
+
|
|
170
|
+
test_reason_present_when_denied {
|
|
171
|
+
reason == "tool access denied by policy" with input as {
|
|
172
|
+
"scope": "tool.invoke",
|
|
173
|
+
"tool": {"serverName": "github", "methodName": "repo_delete"},
|
|
174
|
+
"actor": {"roles": ["external"], "isLocalMode": false}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
test_reason_not_defined_when_allowed {
|
|
179
|
+
not reason with input as {
|
|
180
|
+
"scope": "tool.invoke",
|
|
181
|
+
"tool": {"serverName": "github", "methodName": "search_issues"},
|
|
182
|
+
"actor": {"roles": ["developer"], "isLocalMode": false}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
# ---------------------------------------------------------------------------
|
|
187
|
+
# Multi-role actor – admin role in list overrides restrictions
|
|
188
|
+
# ---------------------------------------------------------------------------
|
|
189
|
+
|
|
190
|
+
test_multi_role_with_admin_allows_delete {
|
|
191
|
+
allowed with input as {
|
|
192
|
+
"scope": "tool.invoke",
|
|
193
|
+
"tool": {"serverName": "github", "methodName": "repo_delete"},
|
|
194
|
+
"actor": {"roles": ["developer", "admin"], "isLocalMode": false}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
test_multi_role_external_and_developer_bash_blocked {
|
|
199
|
+
# external role triggers bash block even if other roles are present
|
|
200
|
+
not allowed with input as {
|
|
201
|
+
"scope": "tool.invoke",
|
|
202
|
+
"tool": {"serverName": "shell", "methodName": "bash"},
|
|
203
|
+
"actor": {"roles": ["external", "developer"], "isLocalMode": false}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
# ---------------------------------------------------------------------------
|
|
208
|
+
# is_admin helper rule
|
|
209
|
+
# ---------------------------------------------------------------------------
|
|
210
|
+
|
|
211
|
+
test_is_admin_true_for_admin_role {
|
|
212
|
+
is_admin with input as {
|
|
213
|
+
"actor": {"roles": ["admin"], "isLocalMode": false}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
test_is_admin_false_for_developer_role {
|
|
218
|
+
not is_admin with input as {
|
|
219
|
+
"actor": {"roles": ["developer"], "isLocalMode": false}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
test_is_admin_false_for_empty_roles {
|
|
224
|
+
not is_admin with input as {
|
|
225
|
+
"actor": {"roles": [], "isLocalMode": false}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# OPA Policy Engine example configuration
|
|
2
|
+
# Requires Visor Enterprise Edition (EE) and a valid license.
|
|
3
|
+
# Contact hello@probelabs.com for licensing.
|
|
4
|
+
|
|
5
|
+
version: "1.0"
|
|
6
|
+
|
|
7
|
+
policy:
|
|
8
|
+
engine: local
|
|
9
|
+
rules: ./policies/
|
|
10
|
+
fallback: deny
|
|
11
|
+
timeout: 5000
|
|
12
|
+
|
|
13
|
+
roles:
|
|
14
|
+
admin:
|
|
15
|
+
author_association: [OWNER]
|
|
16
|
+
users: [cto-username]
|
|
17
|
+
slack_users: [U0123ADMIN]
|
|
18
|
+
emails: [admin@company.com]
|
|
19
|
+
developer:
|
|
20
|
+
author_association: [MEMBER, COLLABORATOR]
|
|
21
|
+
emails: [alice@co.com, bob@co.com]
|
|
22
|
+
reviewer:
|
|
23
|
+
author_association: [MEMBER, COLLABORATOR, CONTRIBUTOR]
|
|
24
|
+
external:
|
|
25
|
+
author_association: [FIRST_TIME_CONTRIBUTOR, FIRST_TIMER, NONE]
|
|
26
|
+
eng-channel:
|
|
27
|
+
slack_channels: [C0123ENG]
|
|
28
|
+
slack_users: [U0123ALICE, U0123BOB]
|
|
29
|
+
|
|
30
|
+
steps:
|
|
31
|
+
security-scan:
|
|
32
|
+
type: ai
|
|
33
|
+
prompt: "Review for security issues"
|
|
34
|
+
policy:
|
|
35
|
+
require: reviewer
|
|
36
|
+
|
|
37
|
+
deploy-staging:
|
|
38
|
+
type: command
|
|
39
|
+
exec: ./deploy.sh staging
|
|
40
|
+
criticality: external
|
|
41
|
+
assume: "deployment approved"
|
|
42
|
+
policy:
|
|
43
|
+
require: [developer, admin]
|
|
44
|
+
deny: [external]
|
|
45
|
+
|
|
46
|
+
deploy-production:
|
|
47
|
+
type: command
|
|
48
|
+
exec: ./deploy.sh production
|
|
49
|
+
criticality: external
|
|
50
|
+
assume: "production deployment approved"
|
|
51
|
+
policy:
|
|
52
|
+
require: admin
|
|
53
|
+
rule: visor/deploy/production
|
|
54
|
+
|
|
55
|
+
ai-code-review:
|
|
56
|
+
type: ai
|
|
57
|
+
prompt: "Review code quality"
|
|
58
|
+
ai:
|
|
59
|
+
allowBash: true
|
|
60
|
+
allowEdit: true
|
|
61
|
+
mcpServers:
|
|
62
|
+
github:
|
|
63
|
+
command: gh-mcp
|
|
64
|
+
allowedMethods: ["search_*", "get_*"]
|
|
@@ -39,6 +39,24 @@ export declare class FailureConditionEvaluator {
|
|
|
39
39
|
workflowInputs?: Record<string, unknown>;
|
|
40
40
|
/** Current step's output for guarantee evaluation */
|
|
41
41
|
output?: unknown;
|
|
42
|
+
/** Conversation context for TUI/CLI/Slack messages */
|
|
43
|
+
conversation?: {
|
|
44
|
+
transport?: string;
|
|
45
|
+
thread?: {
|
|
46
|
+
id: string;
|
|
47
|
+
};
|
|
48
|
+
messages?: Array<{
|
|
49
|
+
role: string;
|
|
50
|
+
text: string;
|
|
51
|
+
timestamp: string;
|
|
52
|
+
}>;
|
|
53
|
+
current?: {
|
|
54
|
+
role: string;
|
|
55
|
+
text: string;
|
|
56
|
+
timestamp: string;
|
|
57
|
+
};
|
|
58
|
+
attributes?: Record<string, unknown>;
|
|
59
|
+
};
|
|
42
60
|
}): Promise<boolean>;
|
|
43
61
|
/**
|
|
44
62
|
* Evaluate all failure conditions for a check result
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/failure-condition-evaluator.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAG3C,OAAO,EACL,iBAAiB,EAGjB,sBAAsB,EAEvB,MAAM,gBAAgB,CAAC;AAMxB;;GAEG;AACH,qBAAa,yBAAyB;IACpC,OAAO,CAAC,OAAO,CAAC,CAAU;;IAI1B;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAI3B;;OAEG;IACG,uBAAuB,CAC3B,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,aAAa,EAC5B,UAAU,EAAE,MAAM,EAClB,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,EAC/C,iBAAiB,CAAC,EAAE,MAAM,GACzB,OAAO,CAAC,OAAO,CAAC;IA2DnB;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAO9B;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAOxB;;OAEG;IACG,mBAAmB,CACvB,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,WAAW,CAAC,EAAE;QACZ,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;QACxB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACrC,eAAe,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;QAC7C,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACzC,qDAAqD;QACrD,MAAM,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/failure-condition-evaluator.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAG3C,OAAO,EACL,iBAAiB,EAGjB,sBAAsB,EAEvB,MAAM,gBAAgB,CAAC;AAMxB;;GAEG;AACH,qBAAa,yBAAyB;IACpC,OAAO,CAAC,OAAO,CAAC,CAAU;;IAI1B;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAI3B;;OAEG;IACG,uBAAuB,CAC3B,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,aAAa,EAC5B,UAAU,EAAE,MAAM,EAClB,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,EAC/C,iBAAiB,CAAC,EAAE,MAAM,GACzB,OAAO,CAAC,OAAO,CAAC;IA2DnB;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAO9B;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAOxB;;OAEG;IACG,mBAAmB,CACvB,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,WAAW,CAAC,EAAE;QACZ,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;QACxB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACrC,eAAe,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;QAC7C,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,cAA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ACH,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,sBAAsB,EAAE,GAAG,OAAO;IAItE;;OAEG;IACH,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,sBAAsB,EAAE,GAAG,sBAAsB,EAAE;IAIvF;;OAEG;IACH,MAAM,CAAC,sBAAsB,CAAC,OAAO,EAAE,sBAAsB,EAAE,GAAG;QAChE,KAAK,EAAE,sBAAsB,EAAE,CAAC;QAChC,OAAO,EAAE,sBAAsB,EAAE,CAAC;QAClC,IAAI,EAAE,sBAAsB,EAAE,CAAC;KAChC;IASD;;OAEG;IACH,MAAM,CAAC,aAAa,CAAC,OAAO,EAAE,sBAAsB,EAAE,GAAG,MAAM;CAiChE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slack-frontend.d.ts","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/frontends/slack-frontend.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAUxD,KAAK,mBAAmB,GAAG;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,SAAS,CAAC,EAAE;QACV,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB,CAAC;CACH,CAAC;AAEF,qBAAa,aAAc,YAAW,QAAQ;IAC5C,SAAgB,IAAI,WAAW;IAC/B,OAAO,CAAC,IAAI,CAAsC;IAClD,OAAO,CAAC,GAAG,CAAsB;IAEjC,OAAO,CAAC,KAAK,CAAkB;IAC/B,OAAO,CAAC,MAAM,CAAgD;IAC9D,OAAO,CAAC,OAAO,CAAkB;IACjC,OAAO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,oBAAoB;IAsMlC,OAAO,CAAC,YAAY;CAWrB"}
|
|
@@ -154,6 +154,10 @@ export declare const configSchema: {
|
|
|
154
154
|
readonly $ref: "#/definitions/SchedulerConfig";
|
|
155
155
|
readonly description: "Scheduler configuration for scheduled workflow execution";
|
|
156
156
|
};
|
|
157
|
+
readonly policy: {
|
|
158
|
+
readonly $ref: "#/definitions/PolicyConfig";
|
|
159
|
+
readonly description: "Enterprise policy engine configuration (EE feature)";
|
|
160
|
+
};
|
|
157
161
|
};
|
|
158
162
|
readonly required: readonly ["version"];
|
|
159
163
|
readonly patternProperties: {
|
|
@@ -785,6 +789,10 @@ export declare const configSchema: {
|
|
|
785
789
|
readonly type: "boolean";
|
|
786
790
|
readonly description: "Keep worktree after workflow completion (default: false)";
|
|
787
791
|
};
|
|
792
|
+
readonly policy: {
|
|
793
|
+
readonly $ref: "#/definitions/StepPolicyOverride";
|
|
794
|
+
readonly description: "Per-step policy override (enterprise)";
|
|
795
|
+
};
|
|
788
796
|
};
|
|
789
797
|
readonly additionalProperties: false;
|
|
790
798
|
readonly description: "Configuration for a single check";
|
|
@@ -2058,6 +2066,55 @@ export declare const configSchema: {
|
|
|
2058
2066
|
readonly '^x-': {};
|
|
2059
2067
|
};
|
|
2060
2068
|
};
|
|
2069
|
+
readonly PolicyConfig: {
|
|
2070
|
+
readonly type: "object";
|
|
2071
|
+
readonly properties: {
|
|
2072
|
+
readonly engine: {
|
|
2073
|
+
readonly type: "string";
|
|
2074
|
+
readonly enum: readonly ["local", "remote", "disabled"];
|
|
2075
|
+
readonly description: "Policy engine mode: 'local' (WASM), 'remote' (HTTP OPA server), or 'disabled'";
|
|
2076
|
+
};
|
|
2077
|
+
readonly rules: {
|
|
2078
|
+
readonly anyOf: readonly [{
|
|
2079
|
+
readonly type: "string";
|
|
2080
|
+
}, {
|
|
2081
|
+
readonly type: "array";
|
|
2082
|
+
readonly items: {
|
|
2083
|
+
readonly type: "string";
|
|
2084
|
+
};
|
|
2085
|
+
}];
|
|
2086
|
+
readonly description: "Path to .rego files or .wasm bundle (local mode)";
|
|
2087
|
+
};
|
|
2088
|
+
readonly data: {
|
|
2089
|
+
readonly type: "string";
|
|
2090
|
+
readonly description: "Path to a JSON file to load as OPA data document (local mode)";
|
|
2091
|
+
};
|
|
2092
|
+
readonly url: {
|
|
2093
|
+
readonly type: "string";
|
|
2094
|
+
readonly description: "OPA server URL (remote mode)";
|
|
2095
|
+
};
|
|
2096
|
+
readonly fallback: {
|
|
2097
|
+
readonly type: "string";
|
|
2098
|
+
readonly enum: readonly ["allow", "deny", "warn"];
|
|
2099
|
+
readonly description: "Default decision when policy evaluation fails (default: 'deny'). Use 'warn' for audit mode: violations are logged but not enforced.";
|
|
2100
|
+
};
|
|
2101
|
+
readonly timeout: {
|
|
2102
|
+
readonly type: "number";
|
|
2103
|
+
readonly description: "Evaluation timeout in milliseconds (default: 5000)";
|
|
2104
|
+
};
|
|
2105
|
+
readonly roles: {
|
|
2106
|
+
readonly type: "object";
|
|
2107
|
+
readonly additionalProperties: {
|
|
2108
|
+
readonly $ref: "#/definitions/PolicyRoleConfig";
|
|
2109
|
+
};
|
|
2110
|
+
readonly description: "Role definitions: map role names to conditions";
|
|
2111
|
+
};
|
|
2112
|
+
};
|
|
2113
|
+
readonly additionalProperties: false;
|
|
2114
|
+
readonly patternProperties: {
|
|
2115
|
+
readonly '^x-': {};
|
|
2116
|
+
};
|
|
2117
|
+
};
|
|
2061
2118
|
readonly SchedulerLimitsConfig: {
|
|
2062
2119
|
readonly type: "object";
|
|
2063
2120
|
readonly properties: {
|
|
@@ -2116,6 +2173,57 @@ export declare const configSchema: {
|
|
|
2116
2173
|
readonly '^x-': {};
|
|
2117
2174
|
};
|
|
2118
2175
|
};
|
|
2176
|
+
readonly PolicyRoleConfig: {
|
|
2177
|
+
readonly type: "object";
|
|
2178
|
+
readonly properties: {
|
|
2179
|
+
readonly author_association: {
|
|
2180
|
+
readonly type: "array";
|
|
2181
|
+
readonly items: {
|
|
2182
|
+
readonly type: "string";
|
|
2183
|
+
};
|
|
2184
|
+
readonly description: "GitHub author associations that map to this role";
|
|
2185
|
+
};
|
|
2186
|
+
readonly teams: {
|
|
2187
|
+
readonly type: "array";
|
|
2188
|
+
readonly items: {
|
|
2189
|
+
readonly type: "string";
|
|
2190
|
+
};
|
|
2191
|
+
readonly description: "GitHub team slugs";
|
|
2192
|
+
};
|
|
2193
|
+
readonly users: {
|
|
2194
|
+
readonly type: "array";
|
|
2195
|
+
readonly items: {
|
|
2196
|
+
readonly type: "string";
|
|
2197
|
+
};
|
|
2198
|
+
readonly description: "Explicit GitHub usernames";
|
|
2199
|
+
};
|
|
2200
|
+
readonly slack_users: {
|
|
2201
|
+
readonly type: "array";
|
|
2202
|
+
readonly items: {
|
|
2203
|
+
readonly type: "string";
|
|
2204
|
+
};
|
|
2205
|
+
readonly description: "Slack user IDs (e.g., U0123ABC)";
|
|
2206
|
+
};
|
|
2207
|
+
readonly emails: {
|
|
2208
|
+
readonly type: "array";
|
|
2209
|
+
readonly items: {
|
|
2210
|
+
readonly type: "string";
|
|
2211
|
+
};
|
|
2212
|
+
readonly description: "Email addresses for identity matching";
|
|
2213
|
+
};
|
|
2214
|
+
readonly slack_channels: {
|
|
2215
|
+
readonly type: "array";
|
|
2216
|
+
readonly items: {
|
|
2217
|
+
readonly type: "string";
|
|
2218
|
+
};
|
|
2219
|
+
readonly description: "Slack channel IDs — role only applies when triggered from these channels";
|
|
2220
|
+
};
|
|
2221
|
+
};
|
|
2222
|
+
readonly additionalProperties: false;
|
|
2223
|
+
readonly patternProperties: {
|
|
2224
|
+
readonly '^x-': {};
|
|
2225
|
+
};
|
|
2226
|
+
};
|
|
2119
2227
|
readonly 'Record<string,StaticCronJob>': {
|
|
2120
2228
|
readonly type: "object";
|
|
2121
2229
|
readonly additionalProperties: {
|
|
@@ -2181,6 +2289,37 @@ export declare const configSchema: {
|
|
|
2181
2289
|
readonly '^x-': {};
|
|
2182
2290
|
};
|
|
2183
2291
|
};
|
|
2292
|
+
readonly StepPolicyOverride: {
|
|
2293
|
+
readonly type: "object";
|
|
2294
|
+
readonly properties: {
|
|
2295
|
+
readonly require: {
|
|
2296
|
+
readonly anyOf: readonly [{
|
|
2297
|
+
readonly type: "string";
|
|
2298
|
+
}, {
|
|
2299
|
+
readonly type: "array";
|
|
2300
|
+
readonly items: {
|
|
2301
|
+
readonly type: "string";
|
|
2302
|
+
};
|
|
2303
|
+
}];
|
|
2304
|
+
readonly description: "Required role(s) — any of these roles suffices";
|
|
2305
|
+
};
|
|
2306
|
+
readonly deny: {
|
|
2307
|
+
readonly type: "array";
|
|
2308
|
+
readonly items: {
|
|
2309
|
+
readonly type: "string";
|
|
2310
|
+
};
|
|
2311
|
+
readonly description: "Explicit deny for roles";
|
|
2312
|
+
};
|
|
2313
|
+
readonly rule: {
|
|
2314
|
+
readonly type: "string";
|
|
2315
|
+
readonly description: "Custom OPA rule path for this step";
|
|
2316
|
+
};
|
|
2317
|
+
};
|
|
2318
|
+
readonly additionalProperties: false;
|
|
2319
|
+
readonly patternProperties: {
|
|
2320
|
+
readonly '^x-': {};
|
|
2321
|
+
};
|
|
2322
|
+
};
|
|
2184
2323
|
};
|
|
2185
2324
|
};
|
|
2186
2325
|
export default configSchema;
|
|
@@ -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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