{% extends "curb_base.html" %} {# This machine › Fixes: what Curb can change, what only the person can, and the undo. #} {% block part %} {% if machine_held.value is none %} {% if machine_held.error %}{{ k.failed(machine_held.error) }}{% else %}{{ k.checking("Working out what Curb can fix…") }}{% endif %} {% else %} {% set ready = view.ready | length %}
{% call k.head("Changes that close what your agents can reach. Each one only makes a setting stricter.", "They change each agent's own settings, so they apply in every project.", machine_held) %} {% if ready %}{{ k.act("Apply " ~ ready ~ (" fix" if ready == 1 else " fixes"), "fixes", "btn-primary") }}{% endif %} {% endcall %} {% if ready %}
Ready to apply {{ ready }}
FixAgent
{% for fix in view.ready %}
{{ fix.text }} {{ fix.agent }}
{% endfor %}
See the exact lines {% if shown %} {% for edit in view.lines %}

{{ edit.file }}

{% for line in edit.lines %}{{ line.text }}
{% endfor %}
{% endfor %} {% else %}

The lines name credential locations. {{ k.ask_names() }} to read them.

{% endif %}
{% else %} {% call empty.state("clear", "Nothing left that Curb can fix for you") %}

Every change Curb can make safely is in place. Test the blocks next, so you know they hold.

Open tests {% endcall %} {% endif %} {% if view.yours %}
Only you can do these {{ view.yours | length }} Curb says what to change, and cannot change it for you
{% for line in view.yours %}
{{ line }}
{% endfor %}
{% endif %} {% if view.refused %}
Left out {{ view.refused | length }} Curb could not show these only make things stricter
{% for line in view.refused %}
{{ line }}
{% endfor %}
{% endif %}
Applied each backup is kept 7 days
{% if view.applied %}
WhenWhat changedUndo until
{% for row in view.applied %}
{{ ago(row.at) | said }} {{ row.what }}{{ row.files }} {{ "file" if row.files == 1 else "files" }} backed up Undo until {{ day(row.until) }} {{ k.act("Undo", "undo", "btn-sm", "&backup=" ~ row.id) }}
{% endfor %} {% else %}

Nothing applied yet. A fix you apply shows here, with its undo.

{% endif %}
{% call k.explain("What a fix changes", "Only each agent's own settings, and only to make them stricter.") %}
Sandbox
A fence around the commands an agent runs. It limits the files and sites they can reach.

A fix edits the settings file that belongs to you, for one agent. It never edits a project, and it never loosens anything. If Curb cannot show that a change only tightens, it leaves the change out and says why.

Before it writes, Curb copies each file to a backup that no agent can read, and keeps it for 7 days. Undo puts the copy back.

These fixes cover the credentials every project shares. To close one project's own files too, such as its .env file, run this inside the project:

{{ k.cmd("flanner curb fix") }} {% endcall %}
{% endif %} {% endblock %} {% block reviews %} {% if machine_held.value is not none %} {% set ready = view.ready | length %} {% call k.review_box("fixes", "Apply " ~ ready ~ (" fix?" if ready == 1 else " fixes?"), "/curb/machine/fixes/apply") %}

Afterwards, a command that needs a file or a site you have not allowed will fail until you allow it.

Curb backs up each file for 7 days. Undo puts it back.

{% endcall %} {% call k.review_box("undo", "Undo this fix?", "/curb/machine/fixes/undo", {"backup": backup}) %}

Curb puts each file back as it was before the fix.

{% endcall %} {% endif %} {% endblock %}