Kannaka Eye Skill
See the geometry of information. Every piece of data has an intrinsic
geometric fingerprint when viewed through the lens of SGA. Kannaka Eye
makes these hidden patterns visible as living, breathing glyphs.
Prerequisites
- - Node.js 18+ on PATH
- That's it. No npm install, no build step.
Quick Start
CODEBLOCK0
Open http://localhost:3333 in your browser.
Input Methods
- - Text — type or paste any text; glyph updates in real-time as you type
- File upload — drag & drop or click to upload any file (images, audio, code, binaries)
- Preset examples — built-in samples demonstrating different SGA class signatures
- URL share links — open a glyph from a URL-encoded share link
Rendering Layers
The viewer renders 6 canvas layers, composited in real-time:
| Layer | Name | What It Shows |
|---|
| 1 | Deep Background | Fano plane skeleton — 7 nodes, 7 lines |
| 2 |
Fold Path | Primary visual flow via Bezier curves through SGA space |
| 3 | Fano Energy Bloom | 7 radiating petals — energy distribution across Fano lines |
| 4 | Geometric Core | Dominant SGA class sigil — the glyph's "face" |
| 5 | Resonance Rings | Concentric depth distribution across context levels |
| 6 | Metadata Overlay | Fano signatures, SGA centroids, musical frequencies (toggleable) |
SGA Mathematics
Built on the 84-class system: Cl₀,₇ ⊗ ℝ[ℤ₄] ⊗ ℝ[ℤ₃]
| Component | Range | Meaning |
|---|
| h₂ | 0–3 | Frequency band (bass, tenor, alto, soprano) |
| d |
0–2 | Modality (experienced, learned, imagined) |
| ℓ | 0–6 | Context slot — Fano plane line index |
Fano Lines: 7 oriented triples forming the geometric backbone.
Each line connects 3 of the 7 points in the smallest finite projective plane (PG(2,2)).
Fold Sequences: Paths through the 84-class space showing how data evolves
across geometric neighborhoods. Rendered as flowing Bezier curves.
Native Classification
When KANNAKA_BIN is set (or auto-detected at ../kannaka-memory/target/release/kannaka.exe), Eye uses the canonical Rust SGA classifier instead of the built-in JS approximation. The API response includes "classifier": "native" or "classifier": "fallback".
API Endpoints
| Endpoint | Method | Description |
|---|
| INLINECODE6 | GET | Glyph viewer (main UI) |
| INLINECODE7 |
POST | Classify data → glyph JSON |
|
GET /api/radio | GET | Fetch Radio perception as classifiable bytes |
|
GET /api/constellation | GET | Constellation status (eye, radio, memory) |
|
GET /api/constellation.svg | GET | Fano plane SVG with service dots |
|
GET /constellation | GET | Health dashboard page |
Share Links
Compact glyph data encoded as base64 in URL hash: INLINECODE12
Constellation Dashboard
INLINECODE13 serves a live health dashboard showing all three services with auto-refresh every 10 seconds.
Export
- - Save as PNG — 2x resolution canvas export
- Save Glyph Data — JSON with fold sequence, Fano signature, SGA centroid, frequencies
- Copy Share Link — URL-encoded glyph for sharing (small data only)
Environment Variables
| Variable | Default | Description |
|---|
| INLINECODE14 | INLINECODE15 | HTTP port for the viewer |
| INLINECODE16 |
auto-detect | Path to kannaka binary for native classification |
|
RADIO_PORT |
8888 | Radio bridge endpoint port |
|
FLUX_URL | — | Flux instance URL (enables event publishing) |
|
FLUX_AGENT_ID |
kannaka-eye | Agent ID for Flux events |
Architecture
Single-file Node.js server (server.js) with inline HTML/CSS/JS — the
complete SGA implementation is self-contained. No npm dependencies.
The SGA classifier is ported from kannaka-radio and generalized for
arbitrary data types.
Notes
- - All rendering happens client-side — the server only classifies input and serves the page
- File uploads are processed in-memory; nothing is persisted server-side
- The viewer is designed for local/trusted network use — no authentication
- Glyph appearance is deterministic: same input always produces the same glyph
- Dark cosmic theme (#050508) with purple accents (#c084fc) and golden-ratio color spacing
Kannaka Eye 技能
通过SGA的视角观察,每条数据都具有内在的几何指纹。Kannaka Eye将这些隐藏的模式呈现为生动鲜活的符文。
前置条件
- - Node.js 18+ 已配置在PATH环境变量中
- 仅此而已。无需npm install,无需构建步骤。
快速开始
bash
启动符文查看器
./scripts/eye.sh start
在自定义端口启动
./scripts/eye.sh start --port 4444
检查状态
./scripts/eye.sh status
停止
./scripts/eye.sh stop
在浏览器中打开 http://localhost:3333。
输入方式
- - 文本 — 输入或粘贴任意文本;符文随输入实时更新
- 文件上传 — 拖放或点击上传任意文件(图片、音频、代码、二进制文件)
- 预设示例 — 内置样例,展示不同SGA类别签名
- URL分享链接 — 通过URL编码的分享链接打开符文
渲染图层
查看器实时合成渲染6个画布图层:
| 图层 | 名称 | 显示内容 |
|---|
| 1 | 深层背景 | 法诺平面骨架 — 7个节点,7条线 |
| 2 |
折叠路径 | 通过贝塞尔曲线在SGA空间中的主要视觉流 |
| 3 | 法诺能量绽放 | 7条放射状花瓣 — 法诺线上的能量分布 |
| 4 | 几何核心 | 主导SGA类别符印 — 符文的面孔 |
| 5 | 共振环 | 跨上下文层次的同心深度分布 |
| 6 | 元数据覆盖 | 法诺签名、SGA质心、音乐频率(可切换) |
SGA数学原理
基于84类别系统:Cl₀,₇ ⊗ ℝ[ℤ₄] ⊗ ℝ[ℤ₃]
| 组件 | 范围 | 含义 |
|---|
| h₂ | 0–3 | 频段(低音、中音、高音、超高音) |
| d |
0–2 | 模态(经验、学习、想象) |
| ℓ | 0–6 | 上下文槽位 — 法诺平面线索引 |
法诺线: 7条有向三元组构成几何骨架。
每条线连接最小有限射影平面(PG(2,2))中7个点中的3个。
折叠序列: 穿过84类别空间的路径,展示数据在几何邻域中的演化过程。以流动的贝塞尔曲线呈现。
原生分类
当设置了KANNAKA_BIN(或在../kannaka-memory/target/release/kannaka.exe自动检测到)时,Eye使用规范的Rust SGA分类器替代内置的JS近似实现。API响应中包含classifier: native或classifier: fallback。
API端点
| 端点 | 方法 | 描述 |
|---|
| GET / | GET | 符文查看器(主界面) |
| POST /api/process |
POST | 分类数据 → 符文JSON |
| GET /api/radio | GET | 获取Radio感知作为可分类字节 |
| GET /api/constellation | GET | 星座状态(eye、radio、memory) |
| GET /api/constellation.svg | GET | 带服务节点的法诺平面SVG |
| GET /constellation | GET | 健康仪表盘页面 |
分享链接
紧凑的符文数据以base64编码存储在URL哈希中:http://localhost:3333/#glyph=
星座仪表盘
/constellation提供实时健康仪表盘,显示所有三项服务,每10秒自动刷新。
导出
- - 保存为PNG — 2倍分辨率画布导出
- 保存符文数据 — 包含折叠序列、法诺签名、SGA质心、频率的JSON
- 复制分享链接 — URL编码的符文用于分享(仅限小数据)
环境变量
| 变量 | 默认值 | 描述 |
|---|
| EYEPORT | 3333 | 查看器的HTTP端口 |
| KANNAKABIN |
自动检测 | 用于原生分类的kannaka二进制文件路径 |
| RADIO_PORT | 8888 | Radio桥接端点端口 |
| FLUX_URL | — | Flux实例URL(启用事件发布) |
| FLUX
AGENTID | kannaka-eye | Flux事件的代理ID |
架构
单文件Node.js服务器(server.js),包含内联HTML/CSS/JS — 完整的SGA实现自包含。无npm依赖。SGA分类器从kannaka-radio移植并泛化,支持任意数据类型。
备注
- - 所有渲染在客户端完成 — 服务器仅负责分类输入和提供页面
- 文件上传在内存中处理;服务器端不持久化任何内容
- 查看器设计用于本地/可信网络环境 — 无身份验证
- 符文外观是确定性的:相同输入始终产生相同符文
- 深空宇宙主题(#050508)配紫色强调色(#c084fc)和黄金比例色彩间距