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>
This commit is contained in:
1 parent
24508dd6fc
commit
59a301c351
42 files changed
+2407
-998
No files matched your search
+40
-17
@@ -1,10 +1,36 @@
|
||||
# roledesk configuration. `roles.yaml` is the one the app reads by default
|
||||
# (or $ROLEDESK_CONFIG, or `app -c path`). Every key here is optional.
|
||||
# roledesk configuration. The app reads --config, else $APP_CONFIG, else
|
||||
# config.yaml beside the checkout (committed: these defaults plus the starter
|
||||
# agents). Every value below is the default, so a copy with nothing changed
|
||||
# behaves exactly like no file at all. An unknown key is an error, not a
|
||||
# shrug; see app/config.py.
|
||||
|
||||
# The SQLite file: roles, companies, subscriptions, applications, and the
|
||||
# job queue's own table. Not shared with newsdesk.
|
||||
server:
|
||||
# 0.0.0.0 in a container -- the proxy is what is in front of it.
|
||||
host: 127.0.0.1
|
||||
port: 8790
|
||||
|
||||
# The SQLite file: roles, companies, subscriptions, applications, agents and
|
||||
# scores, the job queue and its schedules, the notice log, and auth's
|
||||
# sessions. Not shared with newsdesk.
|
||||
database: roledesk.db
|
||||
|
||||
# What a clock on screen means, and what `daily at 06:00` is 06:00 in.
|
||||
timezone: Europe/Berlin
|
||||
|
||||
log_level: INFO
|
||||
|
||||
# One password on a public hostname; see auth/README.md and
|
||||
# docs/password-protection.md. The password is never in this file.
|
||||
auth:
|
||||
enabled: auto # auto: open on loopback, locked on anything else
|
||||
session_days: 30
|
||||
secure_cookie: auto # always, behind a TLS-terminating proxy
|
||||
rp_id: "" # roledesk.example.com -- passkeys are bound to it
|
||||
rp_name: app # what the authenticator shows you
|
||||
origin: "" # https://roledesk.example.com
|
||||
password_env: APP_PASSWORD
|
||||
cookie: app_session # unique per app sharing a hostname
|
||||
|
||||
# Any .py file in these directories defining a desk `Source` subclass is a
|
||||
# plugin. A plugin imports `desk` only.
|
||||
plugin_paths:
|
||||
@@ -16,9 +42,10 @@ workers:
|
||||
http: 8
|
||||
cpu: 1
|
||||
|
||||
# Who answers when a job needs a model. See desk/tools/agent.py in ../news.
|
||||
# Who answers when a job needs a model. See desk/tools/agent.py; needs the
|
||||
# `agent` extra.
|
||||
agent:
|
||||
backend: auto # auto | api | claude_code | off
|
||||
backend: auto # auto | api | claude_code | off
|
||||
|
||||
# Title and description in, gate columns out (app/jobs/extract.py). Off by
|
||||
# default: on the API backend every batch of 20 roles is a paid call.
|
||||
@@ -27,22 +54,18 @@ extract:
|
||||
model: claude-haiku-4-5-20251001
|
||||
|
||||
# A role and each agent's intent as vectors, for the fit term of a score
|
||||
# (app/jobs/embed.py). Needs sentence-transformers; without it `embed`
|
||||
# posts a notice and scores leave fit out. Changing the model re-embeds.
|
||||
# (app/jobs/embed.py). Needs the `embeddings` extra; without it `embed` posts
|
||||
# a notice and scores leave fit out. Changing the model re-embeds.
|
||||
embed:
|
||||
model: sentence-transformers/all-MiniLM-L6-v2
|
||||
per_run: 50000
|
||||
|
||||
# One block per plugin, keyed by the plugin's name. The ats plugin reads its
|
||||
# boards from the subscriptions table, so it needs none.
|
||||
sources: {}
|
||||
|
||||
# Starter search agents, imported once into an empty `agents` table. Each gate
|
||||
# is {field, values, mode: require|prefer, weight}; fields are place, country,
|
||||
# remote, seniority, function, salary_min, currency, permit, languages and
|
||||
# company. weights default to {fit: 0.6, recency: 0.2, affinity: 0.2}.
|
||||
agents:
|
||||
- name: Berlin backend
|
||||
intent: Senior backend engineer, Python services and PostgreSQL.
|
||||
gates:
|
||||
- {field: place, values: [Berlin], mode: require}
|
||||
- {field: remote, values: [hybrid, remote], mode: prefer, weight: 0.2}
|
||||
|
||||
# One block per plugin. Empty until the ats plugin lands.
|
||||
sources: {}
|
||||
agents: []
|
||||
Reference in new issue
Block a user