Policy Export
ivyx✓
Export the workspace policy as something an external agent gateway can enforce
Policy Export
You wrote the agent here, and it ran under the rules you set. This turns those rules into the files a production gateway needs, so the same policy governs the agent after it leaves your machine.
What you can do
- Choose which gateway you are exporting for, Obot or Arcade, or export the neutral rule bundle on its own.
- Preview the policy before anything is written.
- Read exactly which rules had to be tightened, refused or left out, and why.
- Decide whether a rule that asks for approval stops the export or is exported as a denial.
- Write the export into your workspace.
- Write the hook service that enforces it, next to the export.
Getting started
Run Policy Export: Open from the command palette, choose the gateway you are exporting for, and press Preview. The panel then names every rule that had to be tightened, refused or left out. When the notes read the way you expect, press the Write button, which says how many files it will write, and confirm them.
Both gateways decide by calling a hook, so something has to answer it. The Write the hook service button in the panel header, or Policy Export: Write Hook Service from the command palette, puts that service in your workspace next to the export and shows you every file first. Its own README carries the command that starts it.
Requirements
- An external agent gateway to enforce the result, Obot or Arcade. The export itself needs nothing installed.
- Node.js wherever you run the hook service, which is next to your gateway rather than inside Studio.
Good to know
- An exported policy is never more permissive than the local one. Where a rule cannot cross, the export tightens it, or refuses and names the rule.
- Nothing is written while anything is refused, because a partial policy leaves you believing the rest is enforced.
- A rule that asks a person first cannot cross, because neither gateway can ask a human. It is refused unless you choose to export it as a denial.
- An allow rule that tests a secret field cannot cross either. At a gateway the real value is visible, so the same rule would let a call through with nobody asked.
- The hook evaluates the policy with Studio's own rule matcher, so the same rules give the same verdicts in both places.
- Policy Export is not a gateway and calls no vendor API. You register the hook with your gateway yourself.
- Arcade sends every tool in the project to the hook, and the hooks are registered to fail closed, so while they are active every tool call in that project depends on the hook being reachable.