hugpy-engine 0.3.7__tar.gz → 0.3.8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/PKG-INFO +1 -1
  2. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/pyproject.toml +1 -1
  3. hugpy_engine-0.3.8/src/hugpy_engine/core_auth.py +14 -0
  4. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine/llama/runners/fitevict_runner.py +2 -1
  5. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine/resolvers/task_resolution.py +2 -1
  6. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine/task_endpoints.py +62 -2
  7. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine.egg-info/PKG-INFO +1 -1
  8. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine.egg-info/SOURCES.txt +1 -0
  9. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/README.md +0 -0
  10. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/setup.cfg +0 -0
  11. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine/__init__.py +0 -0
  12. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine/categories.py +0 -0
  13. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine/config/__init__.py +0 -0
  14. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine/config/main.py +0 -0
  15. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine/config/models/__init__.py +0 -0
  16. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine/config/models/models_config.py +0 -0
  17. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine/config/models/models_default.py +0 -0
  18. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine/dispatch/__init__.py +0 -0
  19. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine/dispatch/dispatch.py +0 -0
  20. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine/fit/__init__.py +0 -0
  21. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine/fit/types.py +0 -0
  22. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine/imports/__init__.py +0 -0
  23. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine/imports/classes.py +0 -0
  24. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine/imports/constants.py +0 -0
  25. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine/imports/functions.py +0 -0
  26. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine/imports/init_imports.py +0 -0
  27. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine/llama/__init__.py +0 -0
  28. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine/llama/runners/__init__.py +0 -0
  29. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine/name_match.py +0 -0
  30. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine/placement.py +0 -0
  31. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine/py.typed +0 -0
  32. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine/resolvers/__init__.py +0 -0
  33. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine/resolvers/assure_model_key.py +0 -0
  34. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine/resolvers/categories/__init__.py +0 -0
  35. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine/resolvers/categories/builders.py +0 -0
  36. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine/resolvers/categories/frameworks.py +0 -0
  37. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine/resolvers/model_resolver.py +0 -0
  38. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine/schemas/__init__.py +0 -0
  39. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine/schemas/chat_schemas.py +0 -0
  40. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine/schemas/event_schemas.py +0 -0
  41. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine/schemas/metadata_schemas.py +0 -0
  42. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine/schemas/model_schemas.py +0 -0
  43. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine/schemas/runner_schemas.py +0 -0
  44. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine/schemas/task_schemas.py +0 -0
  45. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine/task_deps.py +0 -0
  46. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine/tasks.py +0 -0
  47. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine/utils/__init__.py +0 -0
  48. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine/utils/json_scavenge.py +0 -0
  49. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine/utils/model_marker.py +0 -0
  50. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine/utils/no_think.py +0 -0
  51. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine.egg-info/dependency_links.txt +0 -0
  52. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine.egg-info/requires.txt +0 -0
  53. {hugpy_engine-0.3.7 → hugpy_engine-0.3.8}/src/hugpy_engine.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hugpy-engine
3
- Version: 0.3.7
3
+ Version: 0.3.8
4
4
  Summary: Hugpy engine: model discovery and classification, allocation and eviction, native llama.cpp and GGUF runners, and the prompt-to-reply inference path with task and placement seams
5
5
  Author-email: putkoff <support@hugpy.ai>
6
6
  License-Expression: LicenseRef-Proprietary
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "hugpy-engine"
7
- version = "0.3.7"
7
+ version = "0.3.8"
8
8
  description = "Hugpy engine: model discovery and classification, allocation and eviction, native llama.cpp and GGUF runners, and the prompt-to-reply inference path with task and placement seams"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -0,0 +1,14 @@
1
+ """Server-side authentication for calls to the configured Core, never other URLs."""
2
+ import os
3
+ from urllib.parse import urlsplit
4
+
5
+
6
+ def core_headers(url, headers=None):
7
+ result = dict(headers or {})
8
+ core = (os.environ.get("HUGPY_CORE_URL") or os.environ.get("HUGPY_FITEVICT_FRONT_DOOR")
9
+ or "http://127.0.0.1:7020").rstrip("/")
10
+ target, expected = urlsplit(url), urlsplit(core)
11
+ key = os.environ.get("HUGPY_PUBLIC_API_KEY") or os.environ.get("HUGPY_ROUTER_KEY")
12
+ if key and (target.scheme, target.netloc) == (expected.scheme, expected.netloc) and target.path.startswith(expected.path.rstrip("/") + "/"):
13
+ result["Authorization"] = "Bearer " + key
14
+ return result
@@ -116,9 +116,10 @@ class FitevictChatRunner:
116
116
  return body
117
117
 
118
118
  def _post(self, body: dict) -> "tuple[int, dict]":
119
+ from hugpy_engine.core_auth import core_headers
119
120
  req = urllib.request.Request(FRONT_DOOR + "/v1/chat/completions",
120
121
  data=json.dumps(body).encode("utf-8"),
121
- headers={"Content-Type": "application/json"},
122
+ headers=core_headers(FRONT_DOOR + "/v1/chat/completions", {"Content-Type": "application/json"}),
122
123
  method="POST")
123
124
  try:
124
125
  with urllib.request.urlopen(req, timeout=TIMEOUT_S) as r:
@@ -507,7 +507,8 @@ def resolve(task=None, model_key=None, media_type=None, *, catalog=None,
507
507
  # LOADERS — thin stdlib fetchers (core_url, timeout). Never raise.
508
508
  # ---------------------------------------------------------------------------
509
509
  def _get_json(url, timeout):
510
- req = urllib.request.Request(url, headers={"Accept": "application/json"})
510
+ from hugpy_engine.core_auth import core_headers
511
+ req = urllib.request.Request(url, headers=core_headers(url, {"Accept": "application/json"}))
511
512
  with urllib.request.urlopen(req, timeout=timeout) as r:
512
513
  return json.loads(r.read().decode("utf-8") or "null")
513
514
 
@@ -67,6 +67,18 @@ TASK_ROUTES: dict[str, tuple[str, str]] = {
67
67
  "inpainting": ("/v1/images/generations", "image"),
68
68
  "text-to-video": ("/v1/videos/generations", "video"),
69
69
  "image-to-video": ("/v1/videos/generations", "video"),
70
+ # ADDITIVE (2026-10-21, wrapper 0.1.149 batch C): VACE video-to-video rides the
71
+ # same videogen route (operation="v2v" + a video input); the LTX latent
72
+ # upsampler is its own runner/route (videoupres, task "video-upscale").
73
+ "video-to-video": ("/v1/videos/generations", "video"),
74
+ "video-upscale": ("/v1/videos/upscale", "video"),
75
+ # ADDITIVE (2026-10-21, wrapper 0.1.149 batch F — abstract-identity GPU
76
+ # execution): Hunyuan3D image-to-3d (a GLB mesh artifact), and the ONE char360
77
+ # child's two routes (person-tracking over a clip, and face embeddings over a
78
+ # list of images) — both return JSON (dets/faces + an .npy embeddings artifact).
79
+ "image-to-3d": ("/v1/meshes/generations", "mesh"),
80
+ "video-person-tracking": ("/v1/videos/track", "json"),
81
+ "face-embeddings": ("/v1/faces/embeddings", "json"),
70
82
  }
71
83
 
72
84
 
@@ -112,9 +124,56 @@ _BODY_SPECS: dict[str, dict] = {
112
124
  },
113
125
  "/v1/videos/generations": {
114
126
  "input_key": "prompt", "sources": ("prompt", "input", "text"),
127
+ # ADDITIVE (2026-10-21, hugpy-video render-path hardening): forward the
128
+ # observability/placement knobs the videogen front door honours —
129
+ # * metadata -> fitevict records metadata.parent_request_id on the
130
+ # call_log row, so the studio orbit client can find its
131
+ # own in-flight call while it blocks (serve/front_door
132
+ # _placement reads body["metadata"]["parent_request_id"]).
133
+ # * max_wait_s -> the per-call front-door contract budget (cold loads).
134
+ # * placement_intent-> a recorded placement hint (pair knobs stay authoritative).
135
+ # * keep_artifacts -> keep the wrapper's mp4 on disk for a same-box PATH read.
136
+ # None of these are task-resolution inputs; they are passthrough body fields.
115
137
  "passthrough": ("num_frames", "fps", "seed", "width", "height", "steps",
116
138
  "num_inference_steps", "guidance_scale", "image", "image_b64",
117
- "negative_prompt", "response_format"),
139
+ "negative_prompt", "response_format",
140
+ "metadata", "max_wait_s", "placement_intent", "keep_artifacts",
141
+ # ADDITIVE (2026-10-21, wrapper batch C W2a — VACE v2v inputs):
142
+ "video", "video_b64", "reference_images", "control_kind",
143
+ "control_image", "mask", "source_frames", "context_frames",
144
+ "operation", "flow_shift"),
145
+ },
146
+ # ADDITIVE (2026-10-21, wrapper batch C W2b): the LTX latent upsampler route.
147
+ "/v1/videos/upscale": {
148
+ "input_key": None, "sources": (),
149
+ "passthrough": ("video", "video_b64", "scale", "width", "height", "fps",
150
+ "response_format", "metadata", "max_wait_s",
151
+ "placement_intent", "keep_artifacts"),
152
+ },
153
+ # ADDITIVE (2026-10-21, wrapper batch F): Hunyuan3D image-to-3d. No single
154
+ # prompt — the payload is the ``views`` object ({front[,back,left,right]},
155
+ # each {b64|artifact_id}); the rest are generation/placement knobs.
156
+ "/v1/meshes/generations": {
157
+ "input_key": None, "sources": (),
158
+ "passthrough": ("views", "texture", "remove_background", "subfolder",
159
+ "octree_resolution", "steps", "num_inference_steps",
160
+ "guidance_scale", "seed", "output_name", "response_format",
161
+ "metadata", "max_wait_s", "placement_intent", "keep_artifacts"),
162
+ },
163
+ # ADDITIVE (2026-10-21, wrapper batch F): char360 person-tracking over a clip.
164
+ # ``video`` is a {b64|artifact_id} object (bounded, wrapper §1).
165
+ "/v1/videos/track": {
166
+ "input_key": None, "sources": (),
167
+ "passthrough": ("video", "video_b64", "stride", "min_h_frac", "scenes",
168
+ "crops", "response_format", "metadata", "max_wait_s",
169
+ "placement_intent", "keep_artifacts"),
170
+ },
171
+ # ADDITIVE (2026-10-21, wrapper batch F): char360 face embeddings over a list
172
+ # of {b64|artifact_id} images.
173
+ "/v1/faces/embeddings": {
174
+ "input_key": None, "sources": (),
175
+ "passthrough": ("images", "det_size", "response_format", "metadata",
176
+ "max_wait_s", "placement_intent", "keep_artifacts"),
118
177
  },
119
178
  }
120
179
 
@@ -180,8 +239,9 @@ class TaskEndpointRunner:
180
239
  self.model_key = getattr(cfg, "model_key", None)
181
240
 
182
241
  def _post(self, url: str, body: dict, timeout: float) -> "tuple[int, dict]":
242
+ from hugpy_engine.core_auth import core_headers
183
243
  req = urllib.request.Request(url, data=json.dumps(body).encode("utf-8"),
184
- headers={"Content-Type": "application/json"},
244
+ headers=core_headers(url, {"Content-Type": "application/json"}),
185
245
  method="POST")
186
246
  try:
187
247
  with urllib.request.urlopen(req, timeout=timeout) as r:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hugpy-engine
3
- Version: 0.3.7
3
+ Version: 0.3.8
4
4
  Summary: Hugpy engine: model discovery and classification, allocation and eviction, native llama.cpp and GGUF runners, and the prompt-to-reply inference path with task and placement seams
5
5
  Author-email: putkoff <support@hugpy.ai>
6
6
  License-Expression: LicenseRef-Proprietary
@@ -2,6 +2,7 @@ README.md
2
2
  pyproject.toml
3
3
  src/hugpy_engine/__init__.py
4
4
  src/hugpy_engine/categories.py
5
+ src/hugpy_engine/core_auth.py
5
6
  src/hugpy_engine/name_match.py
6
7
  src/hugpy_engine/placement.py
7
8
  src/hugpy_engine/py.typed
File without changes
File without changes