Kind
{% for key, label in kinds.items() %}
{{ label }}
{% endfor %}
{{ input("name", form.name, "Name", form.kind ~ "_alpha", mono=true, error="required · a policy name") }}
required · filled in as {{ form.kind }}_alpha, {{ form.kind }}_beta… · unique among {{ form.kind }} policies · shown in every list instead of the id
{% if form.kind == "mount" %}
WORKSPACE
{{ input("workspace", form.workspace, "Host path", "/srv/alpha", mono=true, error="required", inline=false) }}
{{ choose("workspace_mode", form.workspace_mode, modes, "Mode") }}
required · a host directory under an allowed root
{{ workspace_hint }}
{% set items = form.items("home") %}
HOME · {{ items | length }} OF {{ limits.home }}
{% if items %}
Host path
Guest path under /home/naos
Mode
{% endif %}
{% for item in items %}
{{ input("home." ~ loop.index0 ~ ".host_path", item.host_path, mono=true) }}
{{ input("home." ~ loop.index0 ~ ".guest_path", item.guest_path, mono=true) }}
{{ choose("home." ~ loop.index0 ~ ".mode", item.mode, modes) }}
{{ step("drop:home:" ~ loop.index0, "×", "policy__drop") }}
{% endfor %}
{% if not form.full("home") %}{{ step('add:home', '+ Add home mount') }}{% endif %}
{% elif form.kind == "network" %}
{{ rules('allow', 'ALLOW') }}
{{ rules('deny', 'DENY') }}
{% elif form.kind == "shell" %}
CAPABILITIES · {{ form.allow | length }} SELECTED
{% for name, note in capabilities.items() %}
{% endfor %}
{% elif form.kind == "model" %}
BUDGET · PER RUN
{{ input("max_input", form.max_input, "Max input tokens", "2000000", mono=true) }}
{{ input("max_output", form.max_output, "Max output tokens", "200000", mono=true) }}
{% set items = form.items("providers") %}
PROVIDERS · {{ items | length }}
{% for item in items %}
{% set at = "providers." ~ loop.index0 ~ "." %}
Provider {{ item.name or loop.index }}
{{ step("drop:providers:" ~ loop.index0, "Remove", "policy__remove") }}
{{ input(at ~ "name", item.name, "Name", "alpha", mono=true, error="required") }}
{{ input(at ~ "url", item.url, "URL", "https://api.example.com", mono=true, error="required") }}
{{ choose(at ~ "api", item.api, dialects, "API", "dialect:providers:" ~ loop.index0) }}
{{ input(at ~ "models", item.models, "Models", "alpha-large, alpha-mini", mono=true, error="required · at least one model") }}
{% set offered = form.suggested(item) %}
{% set adding = "model:providers:" ~ loop.index0 ~ ":" %}
{% if offered %}
add a model
{% for model in offered %}
{{ step(adding ~ model, model, "policy__model") }}
{% endfor %}
{% endif %}
{{ credential(at ~ "credential", item.credential) }}
{{ input(at ~ "timeout", item.timeout, "Timeout, s") }}
{{ input(at ~ "requests", item.requests, "Requests / min") }}
{% endfor %}
{% if not form.full("providers") %}{{ step('add:providers', '+ Add provider') }}{% endif %}
{% else %}
{{ mcp.rules(form, servers, effects) }}
{{ mcp.grants(form, secrets) }}
{% endif %}
{{ form_hint }}