Files
jobboard/app/templates/agents.html
T
WolfandClaude Opus 5.5 59a301c351 Wire the app like the boilerplate: door, queue, schedules, eight tabs
app/main.py assembles it in the boilerplate's order, auth.connect first,
then the queue with the scheduler and the pages. TABS is Roles,
Applications, Agents, Companies, Jobs, Schedules, Messages and Account:
the alpha page's three views become templates on the boilerplate's
base.html, driven by static/roles.js (the old app.js) through api() and
toasts.js, over the unchanged JSON routes. Companies lists every board with
its open roles and the affinity control. A 422 is one sentence, so a toast
never reads [object Object].

Config takes the boilerplate's shape: APP_CONFIG or config.yaml, a missing
file is the defaults, an unknown key is an error. roles.yaml is gone;
config.yaml is the committed default and carries the starter agents.

pull is now a job that asks for the pull cascade, because a schedule
enqueues a job kind; its default schedule, every 6h, is declared beside it
in app/jobs/cascade.py. pull_batch's targets are keyword-only so the Jobs
tab offers no batch button. `app worker` is the boilerplate's; `app job`
still drains a queue of its own and fires no schedules.

test_coupling holds pipeline, auth and desk apart (desk may import
pipeline) and plugins to desk; test_architecture keeps app's layers, now
with main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-23 12:48:12 +02:00

38 lines
1.9 KiB
HTML

{% extends "base.html" %}
{% block title %}Agents — roledesk{% endblock %}
{% block content %}
<h1>Search agents</h1>
<p class="lede">A search agent is a named search: an intent that <code>fit</code> is measured against, gates that require or prefer a column value, and the weights of each term. Saving one rescores it; the Roles tab orders by it when it is picked there.</p>
<p id="agents-count" class="count" role="status"></p>
<ul id="agents-list" class="agents"></ul>
<form id="agent-form" class="agent-form" autocomplete="off">
<h2 id="agent-form-title">New agent</h2>
<input type="hidden" id="a-id">
<label>Name <input type="text" id="a-name" required></label>
<label>Intent <span class="hint">a CV paragraph, or what this search is for</span>
<textarea id="a-intent" rows="5"></textarea></label>
<label>Gates <span class="hint">JSON: [{"field": "place", "values": ["Berlin"], "mode": "require"}, {"field": "remote", "values": ["remote"], "mode": "prefer", "weight": 0.2}]</span>
<textarea id="a-gates" rows="5" spellcheck="false">[]</textarea></label>
<fieldset class="weights">
<legend>Weights</legend>
<label>Fit <input type="number" id="a-fit" min="0" step="0.05" value="0.6"></label>
<label>Recency <input type="number" id="a-recency" min="0" step="0.05" value="0.2"></label>
<label>Affinity <input type="number" id="a-affinity" min="0" step="0.05" value="0.2"></label>
</fieldset>
<label class="inline"><input type="checkbox" id="a-enabled" checked> Enabled</label>
<div class="agent-actions">
<button type="submit">Save and score</button>
<button type="button" id="a-new" class="secondary">New</button>
<button type="button" id="a-delete" class="secondary" hidden>Delete</button>
</div>
<p id="agent-status" class="count" role="status"></p>
</form>
{% endblock %}
{% block scripts %}
<script src="{{ asset('roles.js') }}"></script>
{% endblock %}