{% extends "curb_base.html" %} {# This machine › Activity: logging per agent, what each was seen using, and the records. #} {% block part %}
{% call k.head("A log of each tool call your agents make.", "It records the tool and the kind of thing it touched, never the content. Kept 30 days.") %} {% if view.total %}{{ ico.icon('shield', 14) }} Check the log is intact{% endif %} {% endcall %} {% if checked %}
{% if checked.ok %}The log is intact. {{ checked.said }} {% else %}The log was changed. {{ checked.said }} Records after that one cannot be trusted.{% endif %}
{% endif %} {% if view.logging %}
Logging adds Curb's logging hooks to the agent's settings
{% for item in view.logging %}
{{ item.label }} {% if item.on %}{{ k.st("on", "On") }} {% if item.records %}{{ "{:,}".format(item.records) }} records since {{ day(item.since) }}{% else %}Records start with its next session.{% endif %} {% else %}Off, so Curb knows nothing about what it uses.{% endif %}
{% if item.on %}{{ k.act("Turn off…", "logging-off", "btn-sm", "&key=" ~ item.agent) }} {% else %}{{ k.act("Turn on…", "logging-on", "btn-sm", "&key=" ~ item.agent) }}{% endif %}
{% endfor %}
{% endif %} {% for agent in view.used %}
What {{ agent.label }} used {{ agent.days }} {{ "day" if agent.days == 1 else "days" }} · {{ agent.sessions }} {{ "session" if agent.sessions == 1 else "sessions" }}
{% if not agent.whole %}
This is part of the picture. {{ agent.gaps | join(" ") }} Not seen is not the same as not needed.
{% endif %}
WhatUsedWorth knowing
{% for row in agent.rows %}
{{ row.what }} {{ row.used }} {% if row.blind %}Its hooks cannot see this.{% endif %}
{% endfor %} {% if agent.ideas %}

Worth a look: {{ agent.ideas | join(" ") }}

{% endif %}
{% endfor %} {% if view.rows %}
Records {{ k.tally() }} {% call k.tools("Search records") %} {% endcall %}
TimeToolWhat it touchedDecision
{% for row in table.rows %}
{{ row.when }} {{ row.tool }}{{ row.agent }} {{ row.what }} {% if row.bad %}{{ row.decision }}{% else %}{{ k.st("quiet", row.decision) }}{% endif %}
{% endfor %} {{ k.foot("No record matches that search.") }}
{% elif not view.any_on %} {% call empty.state("", "Nothing logged yet") %}

Turn on the log for an agent above. Its next session starts the log, and what it uses shows here.

{% endcall %} {% else %} {% call empty.state("", "No records yet") %}

Logging is on. Records start with the agent's next session.

{% endcall %} {% endif %} {% call k.explain("What the log is for", "It shows what your agents really use, so you can close the rest.") %}

Each record is chained to the one before it and signed by this machine. If anyone edits, removes or reorders a record, Check the log is intact names the record.

The log covers every session on this machine. It does not record which project a session was in, and it never holds a path, a command or any content.

Curb needs 14 days and 20 sessions before it suggests closing anything.

{{ k.cmd("flanner curb log --verify") }} {% endcall %}
{% endblock %} {% block reviews %} {% set key = request.query_params.get("key", "") %} {% set who = {"claude": "Claude Code", "codex": "Codex"}.get(key, "this agent") %} {% call k.review_box("logging-on", "Log what " ~ who ~ " uses?", "/curb/machine/activity/logging", {"agent": key, "on": "1"}) %}

Curb adds its logging hooks to {{ who }}'s own settings.

Curb backs up the settings file for 7 days. Turn the log off here at any time.

{% endcall %} {% call k.review_box("logging-off", "Stop logging " ~ who ~ "?", "/curb/machine/activity/logging", {"agent": key, "on": ""}) %}

Curb removes its logging hooks from {{ who }}'s own settings.

Curb backs up the settings file for 7 days.

{% endcall %} {% endblock %}