betterwithage Claude Opus 4.7 commited on
Commit
303d0d2
·
verified ·
1 Parent(s): 5823178

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

Browse files

Reusable Dockerfile-COPY-derived deploy from szl-holdings/a11oy dfe49d77e89440501eb4e499e4da12fe5412c113.
Files: 1353 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>

Files changed (2) hide show
  1. a11oy_command_center.py +27 -56
  2. pages/second-brain.html +77 -0
a11oy_command_center.py CHANGED
@@ -6,22 +6,11 @@
6
  Product host: a-11-oy.com (this surface)
7
  Proof host: a11oy.net (do not serve this surface there)
8
 
9
- The canonical /command surface now prefers the existing 20-tab Elite Console,
10
- which is backed by real /api/a11oy/... endpoints through szl_elite_console.py.
11
- The older public command-center SPA remains an explicit fallback only if the
12
- Elite Console asset is absent from a constrained build.
13
-
14
- /command/constellation is an additive tab: 49 estates probing live /api/a11oy
15
- endpoints. It does not replace Elite Console and does not steal /console.
16
-
17
- Bound path only. Does not edit the landing door and does not steal /console,
18
- which remains the operator runtime. Mounts:
19
-
20
  GET+HEAD /command
21
  GET+HEAD /command/constellation
 
22
  GET+HEAD /command/{rest}
23
-
24
- /command-center is 307'd onto /command by serve.py.
25
  """
26
  from pathlib import Path
27
  from typing import List
@@ -30,7 +19,6 @@ MOUNTS = ("/command",)
30
 
31
 
32
  def _spa_path() -> Path:
33
- """Resolve the richest shipped Command Center, fail-soft to legacy UI."""
34
  here = Path(__file__).resolve().parent
35
  candidates = (
36
  here / "web" / "elite_console.html",
@@ -45,15 +33,12 @@ def _spa_path() -> Path:
45
  return here / "web" / "elite_console.html"
46
 
47
 
48
- def _constellation_path() -> Path:
49
  here = Path(__file__).resolve().parent
50
- for cand in (
51
- here / "pages" / "constellation.html",
52
- Path("/app/pages/constellation.html"),
53
- ):
54
  if cand.is_file():
55
  return cand
56
- return here / "pages" / "constellation.html"
57
 
58
 
59
  def _existing_paths(app) -> set:
@@ -82,8 +67,7 @@ def _front_move(app, paths: set) -> None:
82
 
83
 
84
  def register(app, ns: str = "a11oy") -> List[str]:
85
- """Mount the canonical Command Center. Additive; skips existing paths."""
86
- del ns # surface is host-level, not namespaced
87
  spa = _spa_path()
88
  registered: List[str] = []
89
  if not spa.is_file():
@@ -96,11 +80,13 @@ def register(app, ns: str = "a11oy") -> List[str]:
96
  del rest
97
  return FileResponse(spa, media_type="text/html; charset=utf-8")
98
 
99
- async def _constellation(_request=None):
100
- page = _constellation_path()
101
- if page.is_file():
102
- return FileResponse(page, media_type="text/html; charset=utf-8")
103
- return FileResponse(spa, media_type="text/html; charset=utf-8")
 
 
104
 
105
  existing = _existing_paths(app)
106
  mounted: set = set()
@@ -120,16 +106,14 @@ def register(app, ns: str = "a11oy") -> List[str]:
120
 
121
  for path in MOUNTS:
122
  _add(path, _spa, ["GET", "HEAD"])
123
- _add("/command/constellation", _constellation, ["GET", "HEAD"])
 
124
  _add("/command/{rest:path}", _spa, ["GET", "HEAD"])
125
  _front_move(
126
  app,
127
- mounted | set(MOUNTS) | {"/command/constellation", "/command/{rest:path}"},
128
- )
129
- flavor = "elite-20-tab" if spa.name == "elite_console.html" else "legacy-fallback"
130
- registered.append(
131
- f"command-center {flavor} on /command (does not steal /console; not a landing door)"
132
  )
 
133
  return registered
134
 
135
 
@@ -157,31 +141,18 @@ def _selftest() -> None:
157
  out = register(app, ns="a11oy")
158
  assert any("/command" in row for row in out), out
159
  c = TestClient(app)
160
- for path in (
161
- "/command",
162
- "/command/overview",
163
- "/command/gates",
164
- "/command/alerts",
165
- "/command/anatomy",
166
- "/command/honest",
167
- ):
168
  r = c.get(path)
169
  assert r.status_code == 200, (path, r.status_code)
170
- assert ("Elite Console" in r.text) or ("a11oy Command Center" in r.text)
171
- h = c.head(path)
172
- assert h.status_code == 200, (path, h.status_code)
173
- page = _constellation_path()
174
- if page.is_file():
175
- cr = c.get("/command/constellation")
176
- assert cr.status_code == 200, cr.status_code
177
- assert "Constellation" in cr.text
178
- assert "cdnjs" not in cr.text
179
- op = c.get("/console")
180
- assert op.status_code == 200 and "operator console" in op.text
181
- print(
182
- "a11oy_command_center: ALL OK "
183
- f"({spa.name} on /command; constellation tab additive; /console untouched; 0 runtime CDN)"
184
- )
185
 
186
 
187
  if __name__ == "__main__":
 
6
  Product host: a-11-oy.com (this surface)
7
  Proof host: a11oy.net (do not serve this surface there)
8
 
9
+ Additive tabs:
 
 
 
 
 
 
 
 
 
 
10
  GET+HEAD /command
11
  GET+HEAD /command/constellation
12
+ GET+HEAD /command/brain
13
  GET+HEAD /command/{rest}
 
 
14
  """
15
  from pathlib import Path
16
  from typing import List
 
19
 
20
 
21
  def _spa_path() -> Path:
 
22
  here = Path(__file__).resolve().parent
23
  candidates = (
24
  here / "web" / "elite_console.html",
 
33
  return here / "web" / "elite_console.html"
34
 
35
 
36
+ def _page(name: str) -> Path:
37
  here = Path(__file__).resolve().parent
38
+ for cand in (here / "pages" / name, Path("/app/pages") / name):
 
 
 
39
  if cand.is_file():
40
  return cand
41
+ return here / "pages" / name
42
 
43
 
44
  def _existing_paths(app) -> set:
 
67
 
68
 
69
  def register(app, ns: str = "a11oy") -> List[str]:
70
+ del ns
 
71
  spa = _spa_path()
72
  registered: List[str] = []
73
  if not spa.is_file():
 
80
  del rest
81
  return FileResponse(spa, media_type="text/html; charset=utf-8")
82
 
83
+ def _file(name: str):
84
+ async def _handler(_request=None):
85
+ page = _page(name)
86
+ if page.is_file():
87
+ return FileResponse(page, media_type="text/html; charset=utf-8")
88
+ return FileResponse(spa, media_type="text/html; charset=utf-8")
89
+ return _handler
90
 
91
  existing = _existing_paths(app)
92
  mounted: set = set()
 
106
 
107
  for path in MOUNTS:
108
  _add(path, _spa, ["GET", "HEAD"])
109
+ _add("/command/constellation", _file("constellation.html"), ["GET", "HEAD"])
110
+ _add("/command/brain", _file("second-brain.html"), ["GET", "HEAD"])
111
  _add("/command/{rest:path}", _spa, ["GET", "HEAD"])
112
  _front_move(
113
  app,
114
+ mounted | set(MOUNTS) | {"/command/constellation", "/command/brain", "/command/{rest:path}"},
 
 
 
 
115
  )
116
+ registered.append("command-center on /command (does not steal /console; not a landing door)")
117
  return registered
118
 
119
 
 
141
  out = register(app, ns="a11oy")
142
  assert any("/command" in row for row in out), out
143
  c = TestClient(app)
144
+ for path in ("/command", "/command/anatomy", "/command/honest"):
 
 
 
 
 
 
 
145
  r = c.get(path)
146
  assert r.status_code == 200, (path, r.status_code)
147
+ if _page("constellation.html").is_file():
148
+ assert "Constellation" in c.get("/command/constellation").text
149
+ if _page("second-brain.html").is_file():
150
+ br = c.get("/command/brain")
151
+ assert br.status_code == 200
152
+ assert "Second Brain" in br.text
153
+ assert "F1" in br.text
154
+ assert c.get("/console").status_code == 200
155
+ print("a11oy_command_center: ALL OK (brain + constellation additive; /console untouched)")
 
 
 
 
 
 
156
 
157
 
158
  if __name__ == "__main__":
pages/second-brain.html ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8"/>
5
+ <meta name="viewport" content="width=device-width, initial-scale=1"/>
6
+ <title>a11oy Second Brain</title>
7
+ <link rel="canonical" href="https://a-11-oy.com/command/brain"/>
8
+ <style>
9
+ :root{--bg:#070b0c;--fg:#eaf6f9;--muted:#8fb3bd;--line:#1b3a44;--teal:#7ad0c6}
10
+ *{box-sizing:border-box}html,body{margin:0;background:var(--bg);color:var(--fg);font:16px/1.45 ui-sans-serif,system-ui,sans-serif}
11
+ a{color:var(--teal)}header,main{max-width:1100px;margin:0 auto;padding:1.25rem}
12
+ .sub{color:var(--muted);font-size:.8rem;letter-spacing:.14em;text-transform:uppercase}
13
+ .row{display:flex;flex-wrap:wrap;gap:.5rem;margin:1rem 0}
14
+ .chip{border:1px solid var(--line);padding:.7rem;min-height:2.75rem}
15
+ canvas{display:block;width:100%;height:320px;border:1px solid var(--line);background:#070b0c}
16
+ pre{white-space:pre-wrap;border:1px solid var(--line);padding:.75rem;font:12px ui-monospace,monospace;color:var(--muted)}
17
+ </style>
18
+ </head>
19
+ <body>
20
+ <header>
21
+ <p class="sub">a-11-oy.com / command / brain</p>
22
+ <h1>Second Brain</h1>
23
+ <p>Kernel formulas from /api/a11oy/v1/honest. Locked-proven is exactly 8. Capabilities from /api/a11oy/v1/brain/capabilities. Source: szl-holdings/szl-second-brain and szl-formulas. Lambda is Conjecture 1.</p>
24
+ <p><a href="/command">Elite Console</a> / <a href="/command/constellation">Constellation</a> / <a href="/command/anatomy">Anatomy</a> / <a href="/api/a11oy/v1/formulas/selftest">Formulas selftest</a></p>
25
+ </header>
26
+ <main>
27
+ <canvas id="brain" width="1100" height="320" aria-label="Second brain"></canvas>
28
+ <div class="row" id="chips"></div>
29
+ <pre id="raw">probing Lean-8 and brain capabilities</pre>
30
+ </main>
31
+ <script>
32
+ const LOCKED=["F1","F4","F7","F11","F12","F18","F19","F22"];
33
+ async function load(url){
34
+ try{const r=await fetch(url,{cache:"no-store"});if(!r.ok)return {ok:false};return {ok:true,json:await r.json().catch(function(){return null})};}
35
+ catch(e){return {ok:false};}
36
+ }
37
+ (async function(){
38
+ const honest=await load("/api/a11oy/v1/honest");
39
+ const brain=await load("/api/a11oy/v1/brain/capabilities");
40
+ const formulas=await load("/api/a11oy/v1/formulas/selftest");
41
+ const box=document.getElementById("chips");
42
+ const ids=(honest.json&&honest.json.locked_formula_ids)||LOCKED;
43
+ const count=honest.json&&honest.json.locked_formula_count;
44
+ box.appendChild(Object.assign(document.createElement("span"),{className:"chip",textContent:"honest · "+(honest.ok?"MEASURED":"UNAVAILABLE")}));
45
+ box.appendChild(Object.assign(document.createElement("span"),{className:"chip",textContent:"brain · "+(brain.ok?"MEASURED":"UNAVAILABLE")}));
46
+ box.appendChild(Object.assign(document.createElement("span"),{className:"chip",textContent:"formulas · "+(formulas.ok?"MEASURED":"UNAVAILABLE")}));
47
+ box.appendChild(Object.assign(document.createElement("span"),{className:"chip",textContent:"locked_formula_count · "+(count===8?"8":"UNAVAILABLE")}));
48
+ ids.forEach(function(id){const s=document.createElement("span");s.className="chip";s.textContent=id;box.appendChild(s);});
49
+ document.getElementById("raw").textContent=JSON.stringify({
50
+ locked_formula_count:count||null,
51
+ locked_formula_ids:ids,
52
+ brain_ok:brain.ok,
53
+ formulas_ok:formulas.ok,
54
+ lambda:"Conjecture 1",
55
+ source:"szl-holdings/szl-formulas + szl-second-brain"
56
+ },null,2);
57
+ })();
58
+ const c=document.getElementById("brain");const x=c.getContext("2d");let t=0;
59
+ function draw(){
60
+ t+=0.012;const w=c.width,h=c.height;
61
+ x.fillStyle="#070b0c";x.fillRect(0,0,w,h);
62
+ const cx=w*0.5,cy=h*0.5;
63
+ x.strokeStyle="rgba(122,208,198,0.4)";x.beginPath();x.ellipse(cx,cy,70,46,0,0,Math.PI*2);x.stroke();
64
+ LOCKED.forEach(function(id,i){
65
+ const ang=i*(Math.PI*2/LOCKED.length)+t;
66
+ const px=cx+Math.cos(ang)*120;const py=cy+Math.sin(ang)*70;
67
+ x.strokeStyle="rgba(122,208,198,0.2)";x.beginPath();x.moveTo(cx,cy);x.lineTo(px,py);x.stroke();
68
+ x.fillStyle="#7ad0c6";x.beginPath();x.arc(px,py,5,0,Math.PI*2);x.fill();
69
+ x.fillStyle="#eaf6f9";x.font="12px ui-monospace,monospace";x.fillText(id,px+8,py+4);
70
+ });
71
+ x.fillStyle="#7ad0c6";x.font="13px sans-serif";x.fillText("Second brain",cx-42,cy-58);
72
+ requestAnimationFrame(draw);
73
+ }
74
+ draw();
75
+ </script>
76
+ </body>
77
+ </html>