MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / wiki_backfill

Function wiki_backfill

paperflow/cli.py:343–359  ·  view source on GitHub ↗

Backfill existing behavior logs into the local wiki.

(
    user_id: Optional[str] = typer.Option(None, "--user-id", "-u", help="PaperFlow user ID."),
    all_users: bool = typer.Option(False, "--all", help="Backfill every user found in the database."),
    dry_run: bool = typer.Option(False, "--dry-run", help="Count work without writing wiki data."),
    json_output: bool = typer.Option(False, "--json", help="Print JSON instead of text."),
)

Source from the content-addressed store, hash-verified

341 json_output: bool = typer.Option(False, "--json", help="Print JSON instead of text."),
342) -> None:
343 """Ask a RAG question over the local wiki."""
344 args = ["ask", question, "--user-id", user_id, "--limit", str(limit)]
345 if json_output:
346 args.append("--json")
347 raise typer.Exit(code=_run_wiki(*args))
348
349
350@wiki_app.command("backfill")
351def wiki_backfill(
352 user_id: Optional[str] = typer.Option(None, "--user-id", "-u", help="PaperFlow user ID."),
353 all_users: bool = typer.Option(False, "--all", help="Backfill every user found in the database."),
354 dry_run: bool = typer.Option(False, "--dry-run", help="Count work without writing wiki data."),
355 json_output: bool = typer.Option(False, "--json", help="Print JSON instead of text."),
356) -> None:
357 """Backfill existing behavior logs into the local wiki."""
358 args = ["backfill"]
359 if user_id:
360 args.extend(["--user-id", user_id])
361 if all_users:
362 args.append("--all")

Callers

nothing calls this directly

Calls 1

_run_wikiFunction · 0.85

Tested by

no test coverage detected