File size: 9,880 Bytes
a6a5d8e
 
 
 
 
 
 
84b51c5
a6a5d8e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cb2accd
 
 
 
 
 
a6a5d8e
cb2accd
a6a5d8e
 
 
 
 
84b51c5
 
a6a5d8e
 
84b51c5
 
a6a5d8e
 
84b51c5
a6a5d8e
 
 
 
 
 
 
 
 
 
 
 
 
 
84b51c5
a6a5d8e
 
 
 
 
 
 
 
 
 
84b51c5
a6a5d8e
 
84b51c5
a6a5d8e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cb2accd
a6a5d8e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84b51c5
a6a5d8e
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<!DOCTYPE html>
<!-- SPDX-License-Identifier: Apache-2.0 © 2026 Lutar, Stephen P. — SZL Holdings · Doctrine v13 -->
<!-- CHASKI surface — reception/onboarding/first-touch organ. ADDITIVE per Doctrine v13 §2.1. -->
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>a11oy · Smart Routing — Intelligent Request Dispatch</title>
<style>
:root{--bg:#0b0d12;--panel:#12151d;--ink:#e7ecf3;--mut:#8a93a6;--acc:#7cc4ff;--ok:#54d18c;--warn:#ffcf5c;--bad:#ff6b6b;--line:#222838;--mono:'SF Mono',ui-monospace,'JetBrains Mono',Menlo,Consolas,monospace}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--ink);font:15px/1.55 -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif}
a{color:var(--acc)}
.wrap{max-width:1040px;margin:0 auto;padding:28px 20px 80px}
.top{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;border-bottom:1px solid var(--line);padding-bottom:16px}
.brand{font-weight:700;letter-spacing:.5px}.tag{font-size:12px;color:var(--mut)}
.nav a{margin-left:14px;font-size:13px;text-decoration:none;color:var(--mut)}.nav a:hover{color:var(--acc)}
h1{font-size:26px;margin:24px 0 6px}.sub{color:var(--mut);margin:0 0 18px}
.card{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:18px;margin:14px 0;border-left:3px solid var(--ok)}
.path{font-family:var(--mono);font-size:12.5px;color:var(--acc);margin:6px 0}
pre{width:100%;background:#0a0c11;color:var(--ink);border:1px solid var(--line);border-radius:8px;font-family:var(--mono);font-size:12.5px;padding:10px;overflow:auto;max-height:280px;white-space:pre-wrap;word-break:break-word}
button{background:var(--acc);color:#06121f;border:0;border-radius:8px;padding:9px 16px;font-weight:600;cursor:pointer;font-size:13px;margin:8px 8px 8px 0}
input,select{background:#0a0c11;color:var(--ink);border:1px solid var(--line);border-radius:8px;padding:8px 10px;font-size:13px}
.mut{color:var(--mut);font-size:13px}
.scene{width:100%;height:340px;border:1px solid var(--line);border-radius:12px;background:radial-gradient(circle at 50% 40%,#10131c,#080a0f);margin:14px 0}
.flag{display:inline-block;font-family:var(--mono);font-size:12px;color:var(--ok);background:#0f2a1c;border-radius:14px;padding:2px 10px;margin:3px}
.honest{background:#0e1117;border:1px solid #2a2030;border-left:3px solid var(--warn);border-radius:10px;padding:14px 16px;margin:22px 0;font-size:13px}
.honest b{color:var(--warn)} code{font-family:var(--mono);color:var(--acc);font-size:12.5px}
footer{margin-top:34px;border-top:1px solid var(--line);padding-top:14px;color:var(--mut);font-size:12px}
</style>
<!-- 0-CDN (Doctrine G7): three.js + addons resolved to same-origin vendored r170 under
     /static/3d/vendor/three/* (served by szl3d_holographic.py). NO external module CDN.
     The R3F authoring recipe is rendered directly with three.js core, so react /
     @react-three deps are not loaded at runtime (the tab is dep-light). -->
<link rel="modulepreload" href="/static/3d/vendor/three/three.module.min.js" />
<link rel="modulepreload" href="/static/3d/vendor/three/addons/controls/OrbitControls.js" />
<script type="importmap">
{"imports":{"three":"/static/3d/vendor/three/three.module.min.js","three/addons/":"/static/3d/vendor/three/addons/"}}
</script>
</head>
<body>
<div class="wrap">
  <div class="top">
    <div><span class="brand">a11oy</span> <span class="tag">· Reception &amp; Routing · Doctrine v13 §2.1</span></div>
    <div class="nav"><a href="/">home</a><a href="/chaski">routing</a><a href="/willay">willay</a><a href="/verify">verify</a></div>
  </div>

  <h1>Intelligent Request Routing</h1>
  <p class="sub">The a11oy reception layer: greets visitors, explains what a11oy does in one breath, and routes each request to the right capability by stated need. Routing factor: <code>exp(-κ·backpressure)·𝟙[routable] ∈ [0,1]</code> — the F7 admission gate (admissible multiplier: can only gate harder, never inflate utility).</p>

  <div class="scene"><canvas id="welcome3d" style="width:100%;height:100%;display:block;border-radius:12px"></canvas></div>
  <p class="mut" style="text-align:center;margin-top:-6px">The router delivers each visitor to the right capability node. Drag to orbit.</p>

  <div class="card">
    <h3>Welcome + organ map</h3>
    <div class="path">GET /api/a11oy/chaski/welcome</div>
    <button onclick="callWelcome()">Greet me</button>
    <div id="flags"></div>
    <pre id="welcomeout">— click to receive the first-touch greeting + flagship map —</pre>
  </div>

  <div class="card">
    <h3>Onboard — route by stated need</h3>
    <div class="path">GET /onboard/start · POST /onboard/step</div>
    <input id="need" placeholder="what do you want to do? e.g. 'sync data', 'fly a drone'" size="46"/>
    <button onclick="runOnboard()">Run onboarding → route me</button>
    <pre id="onboardout">— enter a need and the router will dispatch you, applying the reception gate —</pre>
  </div>

  <div class="card">
    <h3>First-touch heatmap (UX metrics)</h3>
    <div class="path">GET /api/a11oy/chaski/heatmap</div>
    <button onclick="callHeat()">Load heatmap</button>
    <pre id="heatout">— first-touch event counts, route distribution, completion rate, Khipu depth —</pre>
  </div>

  <div class="honest">
    <b>Honest labels (Doctrine v13 §5):</b> every routing action emits a <b>signed-receipt</b> (SHA3-256 hash-chain). The routing factor is an <b>admissible</b> multiplier ∈ [0,1] — it can only gate harder, never inflate utility. The memory-cortex sync courier is a distinct lower layer.
  </div>

  <footer>a11oy · reception &amp; routing layer · Doctrine v13 (additive over v12 / v11 LOCKED 749/14/163 · 13-axis · replay <code>bacf5443…631fc5</code>) · — Yachay</footer>
</div>

<script>
const API='/api/a11oy/chaski';
function show(id,o){document.getElementById(id).textContent=typeof o==='string'?o:JSON.stringify(o,null,2);}
async function callWelcome(){try{const r=await fetch(API+'/welcome');const j=await r.json();show('welcomeout',j);
  document.getElementById('flags').innerHTML=Object.entries(j.flagships||{}).map(([k,v])=>`<span class="flag">${k} · ${v.organ}</span>`).join('');
}catch(e){show('welcomeout','error: '+e);}}
async function runOnboard(){try{const need=document.getElementById('need').value||'route an llm';
  const s=await(await fetch(API+'/onboard/start')).json();const sid=s.session_id;let last;
  last=await(await fetch(API+'/onboard/step',{method:'POST',headers:{'content-type':'application/json'},body:JSON.stringify({session_id:sid,answer:need,backpressure:0})})).json();
  await fetch(API+'/onboard/step',{method:'POST',headers:{'content-type':'application/json'},body:JSON.stringify({session_id:sid,answer:'quickstart',backpressure:0})});
  last=await(await fetch(API+'/onboard/step',{method:'POST',headers:{'content-type':'application/json'},body:JSON.stringify({session_id:sid,answer:need,backpressure:0})})).json();
  show('onboardout',last);
}catch(e){show('onboardout','error: '+e);}}
async function callHeat(){try{show('heatout',await(await fetch(API+'/heatmap')).json());}catch(e){show('heatout','error: '+e);}}
</script>
<script type="module">
import * as THREE from 'three';
import {OrbitControls} from 'three/addons/controls/OrbitControls.js';
// Lightweight R3F-recipe scene rendered with three.js core (R3F is the authoring
// recipe per anatomy-3d V2; three.js renders it directly so the tab is dep-light).
const canvas=document.getElementById('welcome3d');
const renderer=new THREE.WebGLRenderer({canvas,antialias:true,alpha:true});
function size(){renderer.setSize(canvas.clientWidth,canvas.clientHeight,false);}
const scene=new THREE.Scene();
const cam=new THREE.PerspectiveCamera(50,canvas.clientWidth/canvas.clientHeight,0.1,100);cam.position.set(0,1.2,6);
const ctrl=new OrbitControls(cam,renderer.domElement);ctrl.enableDamping=true;ctrl.enablePan=false;
scene.add(new THREE.AmbientLight(0x6688ff,0.5));
const key=new THREE.PointLight(0x7cc4ff,2.4,40);key.position.set(2,4,4);scene.add(key);
// Glowing messenger figure (body + head + a trailing message glyph)
const mat=new THREE.MeshStandardMaterial({color:0x7cc4ff,emissive:0x2b6bd1,emissiveIntensity:1.1,roughness:0.3});
const body=new THREE.Mesh(new THREE.CapsuleGeometry(0.35,0.9,8,16),mat);scene.add(body);
const head=new THREE.Mesh(new THREE.SphereGeometry(0.28,24,24),mat);head.position.y=0.95;scene.add(head);
const glow=new THREE.Mesh(new THREE.SphereGeometry(0.16,16,16),new THREE.MeshStandardMaterial({color:0x54d18c,emissive:0x54d18c,emissiveIntensity:1.6}));glow.position.set(0.55,1.0,0);scene.add(glow);
// Five flagship nodes arranged in an arc (the chaskiwasi the messenger runs between)
const labels=['governed inference','agents','killinchu','observability','a11oy'];const nodes=[];
labels.forEach((lab,i)=>{const a=(-0.9+i*0.45);const x=Math.sin(a)*3.4,z=Math.cos(a)*-1.0-1.0;
  const n=new THREE.Mesh(new THREE.IcosahedronGeometry(0.26,0),new THREE.MeshStandardMaterial({color:0xffcf5c,emissive:0x6b5410,emissiveIntensity:0.7}));
  n.position.set(x,0.2,z);scene.add(n);nodes.push(n);
  const line=new THREE.Line(new THREE.BufferGeometry().setFromPoints([new THREE.Vector3(0,0.4,0),n.position]),new THREE.LineBasicMaterial({color:0x335577}));scene.add(line);});
let t=0;function loop(){t+=0.016;body.position.y=0.05*Math.sin(t*1.6);head.position.y=0.95+0.05*Math.sin(t*1.6);
  glow.position.x=0.55+0.25*Math.sin(t*2.0);glow.position.z=0.25*Math.cos(t*2.0);
  nodes.forEach((n,i)=>n.rotation.y+=0.01+0.002*i);ctrl.update();renderer.render(scene,cam);requestAnimationFrame(loop);}
size();window.addEventListener('resize',()=>{size();cam.aspect=canvas.clientWidth/canvas.clientHeight;cam.updateProjectionMatrix();});loop();
</script>
</body>
</html>