betterwithage Claude Opus 4.7 commited on
Commit
369d4c4
·
verified ·
1 Parent(s): 4d30465

deploy(hf): sync szl-holdings/a11oy@main derived COPY set

Browse files

Reusable Dockerfile-COPY-derived deploy from szl-holdings/a11oy main.
Files: 896 Pruned: 0
Derived from Dockerfile COPY sources (NO hand-maintained allowlist).

Signed-off-by: SZL Holdings <noreply@szlholdings.ai>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

a11oy_code_as_action.py CHANGED
@@ -113,7 +113,10 @@ def evaluate_gate(code: str, intensity: str = "full") -> dict:
113
  verdict dict. DENY iff hard_block OR Λ tripwire HALT. Λ is advisory and can
114
  only tighten (add a DENY); it never overrides a hard DENY."""
115
  import a11oy_code_engine as ce
116
- import szl_restraint as restraint
 
 
 
117
 
118
  # 1) HARD security gate (deterministic, deny-by-default, model-independent).
119
  hard = ce.hard_security_screen(code)
 
113
  verdict dict. DENY iff hard_block OR Λ tripwire HALT. Λ is advisory and can
114
  only tighten (add a DENY); it never overrides a hard DENY."""
115
  import a11oy_code_engine as ce
116
+ try: # prefer the extracted substrate package; fall back to local copy
117
+ from szl_substrate import szl_restraint as restraint
118
+ except Exception:
119
+ import szl_restraint as restraint
120
 
121
  # 1) HARD security gate (deterministic, deny-by-default, model-independent).
122
  hard = ce.hard_security_screen(code)
a11oy_code_orchestrator.py CHANGED
@@ -82,7 +82,10 @@ except Exception as _exc: # pragma: no cover
82
  else:
83
  _ORGRAG_IMPORT_ERROR = ""
84
  try:
85
- import szl_llm_registry as _llmreg # A11OY_CODE_LLM_KEY resolver
 
 
 
86
  except Exception: # pragma: no cover
87
  _llmreg = None
88
  try:
 
82
  else:
83
  _ORGRAG_IMPORT_ERROR = ""
84
  try:
85
+ try: # prefer the extracted substrate package; fall back to local copy
86
+ from szl_substrate import szl_llm_registry as _llmreg # A11OY_CODE_LLM_KEY resolver
87
+ except Exception:
88
+ import szl_llm_registry as _llmreg
89
  except Exception: # pragma: no cover
90
  _llmreg = None
91
  try:
a11oy_frontier_patch.py CHANGED
@@ -106,7 +106,10 @@ async def _a11oy_frontier_agent_loop(request: Request):
106
 
107
  # Lambda passed — try to delegate to szl_ken agent loop
108
  try:
109
- import szl_ken as _ken
 
 
 
110
  tools = _ken.get_default_tools("a11oy")
111
  state = _ken.init_state(session_id, "a11oy", body.get("max_steps", 3))
112
  state = _ken._state_copy(state, lambda_score=lambda_score)
 
106
 
107
  # Lambda passed — try to delegate to szl_ken agent loop
108
  try:
109
+ try: # prefer the extracted substrate package; fall back to local copy
110
+ from szl_substrate import szl_ken as _ken
111
+ except Exception:
112
+ import szl_ken as _ken
113
  tools = _ken.get_default_tools("a11oy")
114
  state = _ken.init_state(session_id, "a11oy", body.get("max_steps", 3))
115
  state = _ken._state_copy(state, lambda_score=lambda_score)
benchmarks/restraint/run_bench.py CHANGED
@@ -140,7 +140,10 @@ def _measured_arm(model: str, system: Optional[str], task: str, repeat: int) ->
140
 
141
  def _sample_arm(task: str, arm: str, intensity: str) -> Dict[str, Any]:
142
  """SAMPLE arm via OUR ladder model — internally consistent, clearly NOT measured."""
143
- import szl_restraint as R
 
 
 
144
  dec = R.descend_ladder(task, intensity)
145
  s = dec["lines_saved_estimate"]
146
  tpl = R.TOKENS_PER_LOC
@@ -169,7 +172,10 @@ def run(model: Optional[str], repeat: int, intensity: str) -> Dict[str, Any]:
169
  # SAMPLE mode needs szl_restraint importable.
170
  if not measured:
171
  try:
172
- import szl_restraint # noqa: F401
 
 
 
173
  except Exception as e:
174
  print("[run_bench] szl_restraint not importable: %s" % e, file=sys.stderr)
175
 
 
140
 
141
  def _sample_arm(task: str, arm: str, intensity: str) -> Dict[str, Any]:
142
  """SAMPLE arm via OUR ladder model — internally consistent, clearly NOT measured."""
143
+ try: # prefer the extracted substrate package; fall back to local copy
144
+ from szl_substrate import szl_restraint as R
145
+ except Exception:
146
+ import szl_restraint as R
147
  dec = R.descend_ladder(task, intensity)
148
  s = dec["lines_saved_estimate"]
149
  tpl = R.TOKENS_PER_LOC
 
172
  # SAMPLE mode needs szl_restraint importable.
173
  if not measured:
174
  try:
175
+ try: # prefer the extracted substrate package; fall back to local copy
176
+ from szl_substrate import szl_restraint # noqa: F401
177
+ except Exception:
178
+ import szl_restraint # noqa: F401
179
  except Exception as e:
180
  print("[run_bench] szl_restraint not importable: %s" % e, file=sys.stderr)
181
 
serve.py CHANGED
@@ -765,7 +765,10 @@ except Exception as _anat3d_e: # pragma: no cover
765
  # stayed in-image but unwired, so the live endpoint 404'd. Restores the missing wiring
766
  # (additive, try/except-guarded).
767
  try:
768
- import szl_restraint as _szl_restraint
 
 
 
769
  _szl_restraint.register(app, ns="a11oy")
770
  print("[a11oy] Restraint registered: /api/a11oy/v1/restraint/{info,evaluate,bench}", file=__import__("sys").stderr)
771
  except Exception as _szl_rs_e: # pragma: no cover
@@ -1983,7 +1986,10 @@ except Exception as _th_e:
1983
  # when the SZL_COSIGN_PRIVATE_PEM runtime secret is present (else honestly UNSIGNED).
1984
  # Sign: Yachay. Perplexity Computer Agent.
1985
  try:
1986
- import szl_provenance as _prov
 
 
 
1987
  _prov_status = _prov.register_provenance(app, "a11oy")
1988
  import sys as _sys_pv
1989
  print(f"[a11oy] Provenance Hardening registered: {_prov_status}", file=_sys_pv.stderr)
@@ -2861,7 +2867,10 @@ if ASSETS_DIR.exists():
2861
  # ---------------------------------------------------------------------------
2862
  _WH_ERR = None
2863
  try:
2864
- import szl_warhacker_aliases as _wh_aliases
 
 
 
2865
  import os as _wh_os
2866
  _wh_status = _wh_aliases.register(
2867
  app, "a11oy",
@@ -3931,7 +3940,10 @@ except Exception as _ke:
3931
  # szl_dsse (cosign ECDSA-P256/DSSE). Doctrine v11 LOCKED 749/14/163 (public).
3932
  # ---------------------------------------------------------------------------
3933
  try:
3934
- import operator_shell_v4 as _osh_v4
 
 
 
3935
  _osh_v4_status = _osh_v4.register(app, "a11oy", web_dir="/app/web")
3936
  import sys as _osh_sys
3937
  print(f"[a11oy] Operator Shell v4 registered: {_osh_v4_status}", file=_osh_sys.stderr)
@@ -5162,7 +5174,10 @@ except Exception as _parity_e:
5162
  # Doctrine v11 LOCKED 749/14/163 · Λ = Conjecture 1 (NEVER a theorem).
5163
  # ===========================================================================
5164
  try:
5165
- import szl_llm_registry as _llm_reg
 
 
 
5166
  _llm_reg_info = _llm_reg.register(app)
5167
  print(
5168
  f"[a11oy] LLM Hub Registry mounted: {len(_llm_reg.MODEL_REGISTRY)} models, "
@@ -10206,7 +10221,10 @@ async def spa_fallback(full_path: str) -> Response:
10206
  # Co-Authored-By: Perplexity Computer Agent <agent@perplexity.ai>
10207
  # ============================================================================
10208
  try:
10209
- import szl_ken as _ken
 
 
 
10210
  import sys as _sys
10211
  # Detect flagship from FastAPI app title
10212
  _kf = "unknown"
 
765
  # stayed in-image but unwired, so the live endpoint 404'd. Restores the missing wiring
766
  # (additive, try/except-guarded).
767
  try:
768
+ try: # prefer the extracted substrate package; fall back to local vendored copy
769
+ from szl_substrate import szl_restraint as _szl_restraint
770
+ except Exception:
771
+ import szl_restraint as _szl_restraint
772
  _szl_restraint.register(app, ns="a11oy")
773
  print("[a11oy] Restraint registered: /api/a11oy/v1/restraint/{info,evaluate,bench}", file=__import__("sys").stderr)
774
  except Exception as _szl_rs_e: # pragma: no cover
 
1986
  # when the SZL_COSIGN_PRIVATE_PEM runtime secret is present (else honestly UNSIGNED).
1987
  # Sign: Yachay. Perplexity Computer Agent.
1988
  try:
1989
+ try: # prefer the extracted substrate package; fall back to local vendored copy
1990
+ from szl_substrate import szl_provenance as _prov
1991
+ except Exception:
1992
+ import szl_provenance as _prov
1993
  _prov_status = _prov.register_provenance(app, "a11oy")
1994
  import sys as _sys_pv
1995
  print(f"[a11oy] Provenance Hardening registered: {_prov_status}", file=_sys_pv.stderr)
 
2867
  # ---------------------------------------------------------------------------
2868
  _WH_ERR = None
2869
  try:
2870
+ try: # prefer the extracted substrate package; fall back to local vendored copy
2871
+ from szl_substrate import szl_warhacker_aliases as _wh_aliases
2872
+ except Exception:
2873
+ import szl_warhacker_aliases as _wh_aliases
2874
  import os as _wh_os
2875
  _wh_status = _wh_aliases.register(
2876
  app, "a11oy",
 
3940
  # szl_dsse (cosign ECDSA-P256/DSSE). Doctrine v11 LOCKED 749/14/163 (public).
3941
  # ---------------------------------------------------------------------------
3942
  try:
3943
+ try: # prefer the extracted substrate package; fall back to local vendored copy
3944
+ from szl_substrate import operator_shell_v4 as _osh_v4
3945
+ except Exception:
3946
+ import operator_shell_v4 as _osh_v4
3947
  _osh_v4_status = _osh_v4.register(app, "a11oy", web_dir="/app/web")
3948
  import sys as _osh_sys
3949
  print(f"[a11oy] Operator Shell v4 registered: {_osh_v4_status}", file=_osh_sys.stderr)
 
5174
  # Doctrine v11 LOCKED 749/14/163 · Λ = Conjecture 1 (NEVER a theorem).
5175
  # ===========================================================================
5176
  try:
5177
+ try: # prefer the extracted substrate package; fall back to local vendored copy
5178
+ from szl_substrate import szl_llm_registry as _llm_reg
5179
+ except Exception:
5180
+ import szl_llm_registry as _llm_reg
5181
  _llm_reg_info = _llm_reg.register(app)
5182
  print(
5183
  f"[a11oy] LLM Hub Registry mounted: {len(_llm_reg.MODEL_REGISTRY)} models, "
 
10221
  # Co-Authored-By: Perplexity Computer Agent <agent@perplexity.ai>
10222
  # ============================================================================
10223
  try:
10224
+ try: # prefer the extracted substrate package; fall back to local vendored copy
10225
+ from szl_substrate import szl_ken as _ken
10226
+ except Exception:
10227
+ import szl_ken as _ken
10228
  import sys as _sys
10229
  # Detect flagship from FastAPI app title
10230
  _kf = "unknown"
static/3d/surfaces/interpretability.js CHANGED
@@ -39,10 +39,14 @@
39
  const ID = "interpretability";
40
  const TITLE = "Interpretability · Sparse-Autoencoder Features (live)";
41
 
42
- // Endpoint is hosted on the dedicated killinchu Space (isolated compute), reached
43
- // cross-origin (killinchu returns access-control-allow-origin: https://a-11-oy.com).
44
- // This keeps the interpretability organ's rebuilds/faults isolated from the flagship.
45
- const EP = "https://szlholdings-killinchu.hf.space/api/killinchu/v1/interpretability/features?seed=42&top_k=8&d_model=512&n_features=4096";
 
 
 
 
46
 
47
  // data-viz hues — purple BANNED
48
  const C_NODE = 0x5b8dee; // lattice-blue (fired feature)
@@ -96,7 +100,22 @@ export function mount(ctx) {
96
  if (!_frameReg) { _stage.onFrame(_onFrame); _frameReg = true; }
97
 
98
  _badge = ctx.live.createBadge();
99
- _polls.push(ctx.live.poll(EP, 5000, _onFeatures, { badge: _badge, onState: (m) => { S.state = m.state; _paintOverlay(); } }));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
100
 
101
  _buildOverlay();
102
  return { id: ID, started: true };
@@ -411,4 +430,4 @@ export function unmount() {
411
  _flash.fill(0);
412
  }
413
 
414
- export default { id: ID, title: TITLE, endpoints: [EP], mount, unmount };
 
39
  const ID = "interpretability";
40
  const TITLE = "Interpretability · Sparse-Autoencoder Features (live)";
41
 
42
+ // PRIMARY endpoint is the a11oy-NATIVE self-hosted SAE surface (same-origin, no CORS):
43
+ // GET /api/a11oy/v1/interpretability/features (szl_a11oy_interpretability.py, MODELED).
44
+ // FALLBACK stays the dedicated killinchu Space (isolated compute, reached cross-origin —
45
+ // killinchu returns access-control-allow-origin: https://a-11-oy.com) so a rebuild/fault
46
+ // on EITHER path never darkens the organ (fault isolation preserved). If the primary
47
+ // reports missing/error we transparently swap to the Space fallback (see mount()).
48
+ const EP = "/api/a11oy/v1/interpretability/features?seed=42&top_k=8&d_model=512&n_features=4096";
49
+ const EP_FALLBACK = "https://szlholdings-killinchu.hf.space/api/killinchu/v1/interpretability/features?seed=42&top_k=8&d_model=512&n_features=4096";
50
 
51
  // data-viz hues — purple BANNED
52
  const C_NODE = 0x5b8dee; // lattice-blue (fired feature)
 
100
  if (!_frameReg) { _stage.onFrame(_onFrame); _frameReg = true; }
101
 
102
  _badge = ctx.live.createBadge();
103
+ // Guarded primary -> fallback: poll the a11oy-native endpoint; if it goes
104
+ // missing/error, swap ONCE to the isolated killinchu Space (fault isolation).
105
+ let _swapped = false;
106
+ const _startPoll = (ep) => ctx.live.poll(ep, 5000, _onFeatures, {
107
+ badge: _badge,
108
+ onState: (m) => {
109
+ S.state = m.state;
110
+ if (!_swapped && (m.state === "missing" || m.state === "error")) {
111
+ _swapped = true;
112
+ try { _polls.forEach((p) => { try { p.stop(); } catch (_) {} }); _polls = []; } catch (_) {}
113
+ _polls.push(_startPoll(EP_FALLBACK));
114
+ }
115
+ _paintOverlay();
116
+ },
117
+ });
118
+ _polls.push(_startPoll(EP));
119
 
120
  _buildOverlay();
121
  return { id: ID, started: true };
 
430
  _flash.fill(0);
431
  }
432
 
433
+ export default { id: ID, title: TITLE, endpoints: [EP, EP_FALLBACK], mount, unmount };
szl_frontier_manifest.py CHANGED
@@ -275,7 +275,10 @@ def _tile_compute_fabric() -> dict:
275
 
276
 
277
  def _tile_governance() -> dict:
278
- import szl_restraint as rs
 
 
 
279
  info = rs.info()
280
  doctrine = info.get("doctrine", {}) or {}
281
  return _tile(
 
275
 
276
 
277
  def _tile_governance() -> dict:
278
+ try: # prefer the extracted substrate package; fall back to local copy
279
+ from szl_substrate import szl_restraint as rs
280
+ except Exception:
281
+ import szl_restraint as rs
282
  info = rs.info()
283
  doctrine = info.get("doctrine", {}) or {}
284
  return _tile(
szl_nemo_agents.py CHANGED
@@ -228,7 +228,10 @@ def _qhawaq_status() -> dict:
228
  n_receipts = None
229
  trust = 0.97
230
  try:
231
- import szl_qhawaq as q
 
 
 
232
  spec = q.invariants_spec()
233
  inv = {"count": spec.get("count") or len(spec.get("invariants", [])),
234
  "ids": [i.get("id") for i in spec.get("invariants", [])]}
@@ -407,7 +410,10 @@ def register(app, ns: str = "a11oy", sign_fn=None) -> dict:
407
  result["errors"][modname] = repr(e)
408
 
409
  try:
410
- import szl_qhawaq as _q
 
 
 
411
  _wire("szl_qhawaq", lambda: _q.register(app, ns=ns, sign_fn=sign_fn))
412
  except Exception as e: # noqa: BLE001
413
  result["errors"]["szl_qhawaq_import"] = repr(e)
 
228
  n_receipts = None
229
  trust = 0.97
230
  try:
231
+ try: # prefer the extracted substrate package; fall back to local copy
232
+ from szl_substrate import szl_qhawaq as q
233
+ except Exception:
234
+ import szl_qhawaq as q
235
  spec = q.invariants_spec()
236
  inv = {"count": spec.get("count") or len(spec.get("invariants", [])),
237
  "ids": [i.get("id") for i in spec.get("invariants", [])]}
 
410
  result["errors"][modname] = repr(e)
411
 
412
  try:
413
+ try: # prefer the extracted substrate package; fall back to local copy
414
+ from szl_substrate import szl_qhawaq as _q
415
+ except Exception:
416
+ import szl_qhawaq as _q
417
  _wire("szl_qhawaq", lambda: _q.register(app, ns=ns, sign_fn=sign_fn))
418
  except Exception as e: # noqa: BLE001
419
  result["errors"]["szl_qhawaq_import"] = repr(e)
szl_parity_gaps.py CHANGED
@@ -327,7 +327,10 @@ def register(app: Any, gates_list: list[dict], gates_by_name: dict[str, dict],
327
  signing_available = False
328
 
329
  try:
330
- import szl_provenance as _prov
 
 
 
331
  # Access the module-level DAG directly
332
  dag = _prov._KHIPU_DAG # type: ignore[attr-defined]
333
  dag_count = len(dag.nodes)
 
327
  signing_available = False
328
 
329
  try:
330
+ try: # prefer the extracted substrate package; fall back to local copy
331
+ from szl_substrate import szl_provenance as _prov
332
+ except Exception:
333
+ import szl_provenance as _prov
334
  # Access the module-level DAG directly
335
  dag = _prov._KHIPU_DAG # type: ignore[attr-defined]
336
  dag_count = len(dag.nodes)
szl_restraint_energy.py CHANGED
@@ -84,7 +84,10 @@ _RESULTS_PATHS = [
84
  # Soft imports of sibling modules (consumed, never edited). All optional.
85
  # ---------------------------------------------------------------------------
86
  try:
87
- import szl_restraint as _restraint # R1's module (a11oy Restraint ladder)
 
 
 
88
  except Exception: # pragma: no cover - honest degrade
89
  _restraint = None # type: ignore
90
 
 
84
  # Soft imports of sibling modules (consumed, never edited). All optional.
85
  # ---------------------------------------------------------------------------
86
  try:
87
+ try: # prefer the extracted substrate package; fall back to local copy
88
+ from szl_substrate import szl_restraint as _restraint # R1's module (a11oy Restraint ladder)
89
+ except Exception:
90
+ import szl_restraint as _restraint
91
  except Exception: # pragma: no cover - honest degrade
92
  _restraint = None # type: ignore
93
 
szl_willay_gateway.py CHANGED
@@ -277,7 +277,10 @@ def _khipu_consensus(action_hash: str, ctx: Dict[str, Any]) -> Dict[str, Any]:
277
  # ---------------------------------------------------------------------------
278
  def _restraint_note(prompt: str) -> Dict[str, Any]:
279
  try:
280
- import szl_restraint as r
 
 
 
281
  dec = r.descend_ladder(prompt, "full")
282
  return {"available": True, "rung_key": dec.get("rung_key"),
283
  "ceiling": dec.get("ceiling"), "why": dec.get("answer")}
 
277
  # ---------------------------------------------------------------------------
278
  def _restraint_note(prompt: str) -> Dict[str, Any]:
279
  try:
280
+ try: # prefer the extracted substrate package; fall back to local copy
281
+ from szl_substrate import szl_restraint as r
282
+ except Exception:
283
+ import szl_restraint as r
284
  dec = r.descend_ladder(prompt, "full")
285
  return {"available": True, "rung_key": dec.get("rung_key"),
286
  "ceiling": dec.get("ceiling"), "why": dec.get("answer")}