create_app() |
Lazy-import the FastAPI factory so importing attune doesn't pull FastAPI. |
src/attune/ops/__init__.py |
build_config() |
Lazy import of the config builder. |
src/attune/ops/__init__.py |
clear_cache() |
Empty the in-memory cache. Test-only convenience. |
src/attune/ops/anthropic_cost.py |
load_admin_key() |
Return the admin API key, or None if unavailable. |
src/attune/ops/anthropic_cost.py |
fetch_summary() |
Return the current cost summary or a categorized error. |
src/attune/ops/anthropic_cost.py |
add_subparser() |
Register the ops subparser on the main attune CLI parser. |
src/attune/ops/cli.py |
cmd_ops() |
Run the dashboard server (blocking). |
src/attune/ops/cli.py |
main() |
Standalone entry: python -m attune.ops. |
src/attune/ops/cli.py |
clear_cache() |
Reset the in-memory caches. Test helper. |
src/attune/ops/completion_candidates.py |
detect_candidates() |
Return all completion candidates across the configured spec roots. |
src/attune/ops/completion_candidates.py |
attune_home() |
Resolve the user's attune home dir (env override -> ~/.attune). |
src/attune/ops/config.py |
build_config() |
Build a Config from inputs and environment defaults. |
src/attune/ops/config.py |
list_features() |
Return features parsed from <project_root>/.help/features.yaml. |
src/attune/ops/data.py |
first_feature() |
Return the alphabetically-first feature with a renderable scope. |
src/attune/ops/data.py |
workflow_default_scope() |
Return the default scope for one workflow on first paint. |
src/attune/ops/data.py |
derive_project_name() |
Return a human-readable project name for the dashboard header. |
src/attune/ops/data.py |
claude_sessions_dir() |
Return the canonical directory Claude Code stores sessions for this project in. |
src/attune/ops/data.py |
enumerate_project_encoded_keys() |
Return all ~/.claude/projects/ dirs belonging to this logical project. |
src/attune/ops/data.py |
list_recent_sessions_with_paths() |
Same as :func:list_recent_sessions but also returns each |
src/attune/ops/data.py |
list_recent_sessions() |
Return Session records for this project's last days of activity. |
src/attune/ops/data.py |
home_kpis() |
Derive home-page KPIs from a telemetry summary. |
src/attune/ops/data.py |
sparkline_points() |
Render values as an SVG polyline points string. |
src/attune/ops/data.py |
read_telemetry_summary() |
Aggregate usage.jsonl into a UI-friendly summary. |
src/attune/ops/data.py |
read_sweep_chip_counts() |
Read the latest persisted sweep result for scope_path and tally chips. |
src/attune/ops/data.py |
list_workflows() |
Return the registered workflow catalog. Empty if the registry is unavailable. |
src/attune/ops/data.py |
family_versions() |
Resolve installed versions for every related attune package. |
src/attune/ops/data.py |
env_health() |
Lightweight environment snapshot for the Health page. |
src/attune/ops/data.py |
store_path() |
Return the absolute path to the dismiss-store JSON file. |
src/attune/ops/dismiss_store.py |
load() |
Read the dismiss store. Missing or corrupt file → {}. |
src/attune/ops/dismiss_store.py |
save() |
Persist a dismiss entry for slug (overwrites prior entry). |
src/attune/ops/dismiss_store.py |
clear() |
Remove the entry for slug. No-op if absent. |
src/attune/ops/dismiss_store.py |
is_active() |
True iff a dismiss for slug is currently suppressing it. |
src/attune/ops/dismiss_store.py |
corpus_root() |
Return the .help/templates/ directory for this project. |
src/attune/ops/help_data.py |
list_features() |
All features in the corpus, alphabetical. |
src/attune/ops/help_data.py |
get_template() |
Load one template by feature + kind. None if missing. |
src/attune/ops/help_data.py |
search() |
Run a keyword search against the corpus. |
src/attune/ops/help_data.py |
coverage_gaps() |
Compute incomplete sets + stale templates across the corpus. |
src/attune/ops/help_data.py |
recently_regenerated() |
N most-recently-generated templates across the corpus. |
src/attune/ops/help_data.py |
featured_topics() |
Curated list of high-leverage features for the home page. |
src/attune/ops/help_data.py |
compute_allowlist() |
Compute the default + user-supplied Host allowlist. |
src/attune/ops/middleware.py |
settings_path() |
Return the absolute path to the ops settings file. |
src/attune/ops/ops_config_store.py |
load_settings() |
Read persisted ops settings. Missing or corrupt file → {}. |
src/attune/ops/ops_config_store.py |
save_setting() |
Persist a single setting; returns True on success, False on failure. |
src/attune/ops/ops_config_store.py |
resolve_specs_candidates_enabled() |
Resolve the specs_candidates_enabled setting. |
src/attune/ops/ops_config_store.py |
compute_file_sha256() |
Compute sha256 of a file's contents. |
src/attune/ops/pending_writes.py |
make_entry() |
Construct a JournalEntry, filling in defaults from runtime context. |
src/attune/ops/pending_writes.py |
append_entry() |
Append a journal entry to the JSONL journal. |
src/attune/ops/pending_writes.py |
list_active() |
Return active bulletin entries across all actors. |
src/attune/ops/routes/bulletin.py |
home() |
— |
src/attune/ops/routes/dashboard.py |
workflows_page() |
— |
src/attune/ops/routes/dashboard.py |
telemetry_page() |
— |
src/attune/ops/routes/dashboard.py |
health_page() |
— |
src/attune/ops/routes/dashboard.py |
help_home_page() |
Help home — user-first browse + search entry point. |
src/attune/ops/routes/dashboard.py |
help_search_page() |
Help search results page. |
src/attune/ops/routes/dashboard.py |
help_admin_page() |
Admin tools — coverage gaps + stale templates. |
src/attune/ops/routes/dashboard.py |
help_template_page() |
One template — markdown-rendered. |
src/attune/ops/routes/dashboard.py |
help_feature_page() |
Feature index — list of available kinds, click to read. |
src/attune/ops/routes/dashboard.py |
sessions_page() |
Sessions page — recent Claude Code sessions for this project. |
src/attune/ops/routes/dashboard.py |
run_view_page() |
Full-page view for one workflow run. |
src/attune/ops/routes/dashboard.py |
specs_page() |
Specs tab — federated listing of all specs across configured roots. |
src/attune/ops/routes/dashboard.py |
spec_detail_page() |
Drill-in for a single spec: show every phase file's content (read-only). |
src/attune/ops/routes/dashboard.py |
help_index() |
Top-level summary — features list + corpus stats. |
src/attune/ops/routes/help.py |
help_search() |
Ranked search hits. |
src/attune/ops/routes/help.py |
help_feature() |
All kinds available for a single feature. |
src/attune/ops/routes/help.py |
help_template() |
One template — metadata + full markdown body. |
src/attune/ops/routes/help.py |
help_gaps() |
Coverage gaps + stale templates — admin-tools surface. |
src/attune/ops/routes/help.py |
help_featured() |
Curated featured-topics list for the home page. |
src/attune/ops/routes/help.py |
help_recent() |
Recently-regenerated templates. |
src/attune/ops/routes/help.py |
help_regen_start() |
Start an attune-author regen job. |
src/attune/ops/routes/help.py |
help_regen_status() |
Poll a regen job's status + captured output. |
src/attune/ops/routes/help.py |
help_regen_recent() |
Recent regen jobs — used by the Admin tools UI to surface |
src/attune/ops/routes/help.py |
record_interaction() |
Increment a UI interaction counter. |
src/attune/ops/routes/interaction_counters.py |
read_interactions() |
Return the full counter snapshot + per-event totals. |
src/attune/ops/routes/interaction_counters.py |
list_pending_writes() |
Return all journal entries enriched with computed status fields. |
src/attune/ops/routes/pending_writes.py |
start_run() |
— |
src/attune/ops/routes/runner.py |
get_run() |
— |
src/attune/ops/routes/runner.py |
stream_run() |
— |
src/attune/ops/routes/runner.py |
list_runs() |
Return up to 20 newest runs for workflow, newest first. |
src/attune/ops/routes/runs_history.py |
get_run_record() |
Return one persisted run record (metadata + log). |
src/attune/ops/routes/runs_history.py |
enrich_with_summaries() |
Public helper used by both the JSON route and the HTML page. |
src/attune/ops/routes/sessions.py |
list_sessions() |
GET /api/sessions — JSON listing of recent sessions. |
src/attune/ops/routes/sessions.py |
list_specs() |
Federated listing across all configured spec roots. |
src/attune/ops/routes/specs.py |
list_completion_candidates() |
Return "Ready to close?" candidates for the Specs page. |
src/attune/ops/routes/specs.py |
get_spec() |
Return phase-file contents for one spec. |
src/attune/ops/routes/specs.py |
update_phase_status() |
Rewrite the **Status** line in the named phase file. |
src/attune/ops/routes/specs.py |
dismiss_completion_candidate() |
Suppress a completion candidate for the default TTL (14 days). |
src/attune/ops/routes/specs.py |
get_sweep_result() |
Return the latest sweep result for a scope-hash, or 404. |
src/attune/ops/routes/sweep_results.py |
get_sweep_chips() |
Return chip counts for an arbitrary scope path. |
src/attune/ops/routes/sweep_results.py |
sweep_detail_page() |
Scope-keyed detail page for the latest discovery-sweep result. |
src/attune/ops/routes/sweep_results.py |
is_emission_enabled() |
True when ATTUNE_RUN_META_EMIT is set to any non-empty value. |
src/attune/ops/run_meta_stdout.py |
emit_version_line() |
Write the schema-version line. Parsers refuse unknown versions. |
src/attune/ops/run_meta_stdout.py |
emit_field_line() |
Write one ATTUNE_RUN_META line for a named field. |
src/attune/ops/run_meta_stdout.py |
encode_stderr() |
Base64-encode a multi-line stderr string for wire-safe transit. |
src/attune/ops/run_meta_stdout.py |
decode_stderr() |
Inverse of :func:encode_stderr. Returns empty string on |
src/attune/ops/run_meta_stdout.py |
parse_line() |
Parse one ATTUNE_RUN_META line back into a dict. None on no match. |
src/attune/ops/run_meta_stdout.py |
echo_command_builder() |
Test helper: produce a portable subprocess that prints two lines + exits 0. |
src/attune/ops/runner.py |
prune_old_runs() |
Delete persisted run files older than days. Returns the deletion count. |
src/attune/ops/runner.py |
create_app() |
Build the FastAPI app, wiring config + templates into request state. |
src/attune/ops/server.py |
redact() |
Run all redaction passes over text and return the result. |
src/attune/ops/session_redaction.py |
redact_json_line() |
Redact one JSON-serialized line in-place, preserving structure. |
src/attune/ops/session_redaction.py |
new_budget() |
Build a :class:Budget from the env override or default. |
src/attune/ops/session_summarizer.py |
llm_enabled() |
Return True iff the Haiku path is enabled this run. |
src/attune/ops/session_summarizer.py |
summarize_session() |
Return a Haiku-or-cached summary for one session JSONL. |
src/attune/ops/session_summarizer.py |
compute_cache_key() |
Build a :class:CacheKey for one JSONL file. None on I/O failure. |
src/attune/ops/session_summary_cache.py |
cache_path_for() |
Return the on-disk cache path for one session id. |
src/attune/ops/session_summary_cache.py |
load() |
Return the cached summary iff the on-disk record matches expected. |
src/attune/ops/session_summary_cache.py |
save() |
Write a summary to the on-disk cache, atomically. |
src/attune/ops/session_summary_cache.py |
derive_lifecycle() |
Return the lifecycle bucket label for one spec. |
src/attune/ops/spec_lifecycle.py |
is_persistence_enabled() |
True when ATTUNE_OPS_SWEEP_RESULTS is set to a non-empty value. |
src/attune/ops/sweep_results.py |
results_dir() |
Return <attune_home>/ops/sweep-results/ (created if missing). |
src/attune/ops/sweep_results.py |
scope_hash() |
Hash a scope path to a fixed-length hex identifier. |
src/attune/ops/sweep_results.py |
parse_lines() |
Parse a captured stdout buffer into the final SweepResult JSON. |
src/attune/ops/sweep_results.py |
persist_result() |
Atomically write sweep_result to <results_dir>/<hash>.json. |
src/attune/ops/sweep_results.py |
read_result() |
Read a previously-persisted result by its scope-hash digest. |
src/attune/ops/sweep_results.py |
persist_from_lines() |
Parse captured stdout lines and persist the result for scope_path. |
src/attune/ops/sweep_results.py |
watch_and_persist() |
Subscribe to a discovery-sweep run; persist its result on success. |
src/attune/ops/sweep_results_watcher.py |
derive_concern() |
Return the concern bucket for one workflow. |
src/attune/ops/workflow_concern.py |
group_by_concern() |
Group a list of workflow names by their concern bucket. |
src/attune/ops/workflow_concern.py |
concern_counts() |
Return per-concern counts for a list of workflow names. |
src/attune/ops/workflow_concern.py |