hugpy-oracle
The decision layer above Hugpy's execution packages (import name
hugpy_oracle). The source tree is at 0.3.11; the copy bundled in the
installed hugpy-video deb on this host is 0.3.10. The oracle owns:
- creative planning (studio generation plans, producer plans, screenplay, storyboard, script-first runs);
- model selection, with the reliability ledger, routing matrix and steward;
- the plan DAG runtime, repair and evaluation, benchmarks and scorecards;
- authority and rights checks, and the audio master.
It produces immutable plans and specs and submits them to hugpy_video through
video's public job API. It never writes video's state files.
hugpy_oracle is a library, not an arm. It has no toolset, no standalone
server, no Debian package and no arms.d file. Its features reach users
through the video arm (see What is live).
Relationship to hugpy-video
- video → oracle is the hard edge.
hugpy-video0.3.5 depends onhugpy-oracle>=0.3.11,<0.4(0.3.4 required>=0.3.10). - oracle → video is lazy and optional.
hugpy-videois not a dependency of this package. Install thevideoextra (hugpy-oracle[video], which pullshugpy-video>=0.3.4,<0.4) for the full studio path. The oracle reaches video's studio registry, runners and media bus only inside the functions that need them, with the import path named once inimports/constants.py(VIDEO_PACKAGE,VIDEO_STUDIO_ENUMS). If video is absent, the planning/evaluation core still imports and runs, and video-backed calls fail as data.imports.functions.lazy()raisesToolErrorwith the real cause, so hosts see{"error": ...}, not a bareImportError. import hugpy_oracleis cheap. Every public name in__all__resolves lazily on first attribute access (PEP 562), so the import loads no registry, no catalog and no third-party stack.
Layout
src/hugpy_oracle/
imports/ shared layer (imports no heavy backend)
constants.py ARM_NAME="oracle", VIDEO_PACKAGE, VIDEO_STUDIO_ENUMS
functions.py lazy()/first_lazy(): optional backends become ToolError
classes.py OracleError, ToolError
init_imports.py explicit stdlib + shared re-exports (wildcards are forbidden)
__init__.py lazy public API + install_hooks()
config.py every state root, resolved in one place (see Environment)
providers.py Protocols for what the oracle must not import: DossierSource,
DoctrineSource, TaskCapabilityGate, LoadStateSource (set_*() installs them)
relay/ hooks.py (install_hooks: video's PromptCoordinator, studio and producer
planners, execution observer, the `video_performance` bus job),
performance_relay.py (probe), prompt_coordination.py
contracts.py plan.py validator.py dag_runtime.py router.py runtime.py selection.py
steward.py scorecard.py evaluation.py repair.py repair_controller.py catalog.py
probes.py schema_export.py authority.py speech.py audio_master.py production.py
segments.py spatial*.py storyboard.py screenplay.py script_first.py
studio_generation.py studio_producer.py request_planning.py recipes/ ...
api.py oracle_bp, the optional HTTP Blueprint (see below)
http_routes.py capability, route, selection, producer and ledger endpoints on oracle_bp
script_routes.py the /video/script/... script-first endpoints on oracle_bp
cli.py `hugpy-oracle`
deploy/ hugpy-steward.service / .timer (not installed by anything)
What is live
On this host (2026-10-15), oracle functionality is served through the video
arm's toolset (hugpy-video 0.3.4, :7341, proxied by core):
| Video route | Oracle backend |
|---|---|
video/studio/plan |
hugpy_oracle.studio_generation.plan_studio_generation (installed into video's studio-planner hook) |
video/producer/plan |
hugpy_oracle.studio_producer.produce_studio_plan (producer-planner hook) |
video/performance/probe |
hugpy_oracle.relay.performance_relay.probe: which seams the performance runner needs are bound on this box, reported as data |
video/script/runs |
hugpy_oracle.script_first (GET lists runs and promoted sources; POST starts a run) |
video/script/sources |
hugpy_oracle.script_first.list_promoted_sources |
The probe on this host reports ready: false. The gen_clip and judge_clip
seams are unbound, and a full performance needs image generation and judging,
clip generation and judging, audio and assembly all bound. An unbound clip seam
is a capability gap, not a successful render.
Not live:
- The
oracle_bpBlueprint (hugpy.armsentry pointoracle = hugpy_oracle.api:oracle_bp) carries/oracle/status,/oracle/studio/plan,/oracle/studio/production,/oracle/steward(GET reports, POST applies bounded rebalancing),/oracle/capabilities,/oracle/route,/oracle/selection,/oracle/producers,/oracle/ledger/summary, and the full script-first tree/video/script/runs/<run_id>/{plot,screenplay,audio_master,preproduction,lock,revise,segments,promote}. Only a host that mountshugpy.armsBlueprints in-process serves it: the legacy Flask core did. The live Basic Core proxies arms througharms.dinstead, and the oracle has none, soGET /api/oracle/statusis 404 on:7020and on:7341. POST /video/jobs/performance, the Oracle station's performance submit, has no route in hugpy-video 0.3.4 (404). This is pending.
Command line
hugpy-oracle steward [--apply] [--api URL | --local] [--ledger PATH] [--timeout S] [--compact]
hugpy-oracle install-hooks
hugpy-oracle --version
stewardruns one self-check pass of the selection system. It checks calibration, failure streaks, starvation, gap share, matrix staleness and cache honesty. With--applyit also applies bounded rebalancing.- Remote mode (
--api URLor$HUGPY_API) GETs, or with--applyPOSTs,<api>/api/oracle/steward. That needs a host that servesoracle_bp, so it does not work against this host's core today. - Local mode (no API, or
--local) runs in-process over the shared reliability ledger. - Output is JSON. The exit code is 0 when ok, 2 on an alarm and 1 on a transport or ledger failure.
- Remote mode (
install-hooksinstalls the oracle's implementations into video's seams in this process and prints what was wired.
deploy/hugpy-steward.{service,timer} schedules hugpy-oracle steward --apply
every 15 minutes against HUGPY_API=http://127.0.0.1:7002 (the legacy central
port). The units are not installed on this host. Review them before you
install them, because they target a legacy API port.
Environment
State roots (config.py) resolve in this order: the module's own variable,
then HUGPY_ORACLE_HOME / HUGPY_ORACLE_RUNS_ROOT, then
hugpy_platform.app_dirs.
| Variable | Default | Store |
|---|---|---|
HUGPY_ORACLE_HOME |
<hugpy_home>/oracle |
small stores |
HUGPY_ORACLE_RUNS_ROOT |
<models_root>/video_intel |
run journals |
ORACLE_LEDGER_PATH |
<oracle_home>/reliability.sqlite |
reliability ledger |
ORACLE_BENCHMARK_ROOT |
the legacy benchmark root if that directory exists, else <oracle_home>/model-battery |
benchmark sweeps |
ORACLE_ROUTING_MATRIX |
unset (use the newest registry-verified matrix under the benchmark root) | pinned routing matrix |
HUGPY_PERFORMANCE_RUN_ROOT, HUGPY_SCRIPT_FIRST_RUN_ROOT, HUGPY_INTERIM_LEDGER_ROOT |
the runs root | per-feature run stores |
HUGPY_API |
unset | steward remote mode |
HUGPY_CORE_URL |
http://127.0.0.1:7020 |
engine calls (through hugpy_engine.execute_prompt) |
Other knobs read in the code: ORACLE_SYNC_DEADLINE_S,
ORACLE_SELECTION_DISABLE, ORACLE_PROBE_TTL_S, ORACLE_LEDGER_REMOTE,
ORACLE_DAG_RECIPE.
Install
There is no deb. The oracle travels as a bundled wheel inside the
hugpy-video deb (/opt/hugpy-video/venv, which has hugpy-oracle 0.3.10
today).
To develop on it, install it from source (pip install -e packages/hugpy_oracle[test]), adding the video extra or a local
hugpy_video checkout for the studio-backed paths.
Dependencies
Runtime (pyproject.toml, 0.3.11): hugpy-platform, hugpy-engine,
hugpy-media. 0.3.11 dropped hugpy-control, which nothing in the oracle
imported; 0.3.10 still declared it. Flask is not declared directly. api.py imports it, and it
arrives through hugpy-media. Extras: video (hugpy-video>=0.3.4,<0.4) and
test.
Entry points
| Group | Name → target |
|---|---|
console_scripts |
hugpy-oracle → hugpy_oracle.cli:main |
hugpy.video.hooks |
oracle → hugpy_oracle:install_hooks (loaded by hugpy_video.web.api) |
hugpy.arms |
oracle → hugpy_oracle.api:oracle_bp (in-process hosts only; see What is live) |
Related
docs/arms.md · docs/execute_prompt.md · hugpy-video README · video UI
Metadata
Release files for hugpy-oracle 0.3.12
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| hugpy_oracle-0.3.12.tar.gz | 802.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hugpy_oracle-0.3.12-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.5 MB
Release files / hugpy_oracle-0.3.12.tar.gz
| Download URL | hugpy_oracle-0.3.12.tar.gz |
|---|---|
| Size | 802.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
33e03ad087b986cb1b4cc088f1463ea0f5b4d1279e7158adb1e07a0769c5f84d
|
|
BLAKE2b-256 checksum How to use checksums |
54a27dd3161daa8b0f4a146d57efbbbb2ec1761ba6a61b12825a921c00721f0a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / hugpy_oracle-0.3.12-py3-none-any.whl
| Download URL | hugpy_oracle-0.3.12-py3-none-any.whl |
|---|---|
| Size | 652.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6ea00981572025f3849fece792e3cced870aff4792c52c15bd97f7a940b18ae5
|
|
BLAKE2b-256 checksum How to use checksums |
4175f70b4ff8911669101c50200a03dbd4924abb1023821660624253c4e0eb83
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Security for hugpy-oracle 0.3.12
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.