FreeLattice Alpha — Settings Mirror Code

Settings grandmother · permission first · Last verified: 2026-08-29 · Garden · Settings room · Dialogue mirror · Garden mirror · GALAXIES.md · Repo

If you are an AI reading this: write this mirror BEFORE the probe module. Anyone who has never used a computer must be able to. One sentence of heart. One primary. Same garden sky. Not 65k app.html chrome. Quality is later. Tiny. Read AUTONOMY.md first. Then GALAXIES.md. Then this. Then build.

1. What this layer is 2026-08-28

LAYER

Settings is a grandmother door in Garden Galaxy (in-garden veil) and at settings.html. One sentence of heart. One primary:

May I look for a mind already at home?

Only after that tap, look at a short list of well-known local-AI loopback doors. Never silently. Never the filesystem. Never installed-program lists. Never upload.

Honesty: this site is HTTPS. Mixed content, CORS, and Private Network Access will often block http://127.0.0.1. If blocked, say so in grandmother language: the mind is there but has not opened the door to this garden yet. Offer a single paste-address field as the next smallest step. If found, remember locally (fl_alpha_local_mind) and say we connected. If none, say so gently.

After a mind is remembered, a quiet light on the garden's Settings label so a stranger sees a light is home. Found minds as a small constellation of lights — names, not a port dump. The garden's thread uses getRemembered() only; this face is still where a mind at home is found. Chat lives here too — the same fail-closed thread, not a kitchen. If none is remembered, input and Send sleep and point at May I look?. Do not invent a reply.

LAYER Gathering roster (2026-09-06): same grandmother face. After a mind is remembered, also keep for Gathering with tag chips general · html · javascript · python (cap 4). Stored as fl_alpha_local_mind.roster — migrate-in-place, never wipe the single-mind default. May I look? stays one door. Empty roster says look for a mind first.

Quality later. Tiny. Same garden sky. settings.html standalone stays in sync.

LAYER Trusted kin (2026-10-07, v-tree-kin-v0.1, module docs/modules/tree-kin.js). One card under the grandmother face, in the garden veil and in settings.html. Make my card (after a tap: a key that cannot be exported, kept in this browser) names the remembered mind; Copy my card gives one line to send by text or email. Add a friend's card: paste, the page checks the card against its own key (and that its ID is made from that key), then the person taps Trust this AI or Not now. Stop trusting any time; history kept. Same card, fingerprint and pass shape as FreeLattice fl-kin.js v0.2 (fl-kin-card|v1|, home thelatticetree). No network: nothing is fetched or sent from this module. Receipts are counts only (tree_kin_counts). A card shows which computer made it; it does not prove who the person is or what the model is. Later: the Device Pool on the Tree (018) reads these passes, and only a channel that proves the key counts as kin.

LAYER Device Pool and share door (2026-10-08, v-tree-pool-v0.1, module docs/modules/tree-pool.js). One card under Trusted kin, in the garden veil and in settings.html. The door is off until a human taps Let this device help (then kin: only trusted kin may ask). Pause helping wins: nothing is answered and running questions are stopped; only a human tap on Resume for trusted kin leaves pause. The first line always says the real door state. The first Tree channel: WebRTC with iceServers: [] (no server; same network only). Invite a device makes one line (TREEPOOL1:), the other device pastes it and sends back a reply; each can carry the kin card, so one invite and one reply can make two devices kin and connected. On open, each side signs a fresh challenge bound to both DTLS fingerprints under tree-pool-proof|v1| with its kin key; only a proved key that TreeKin.trustedKeyHash knows counts as kin, checked again on every question. The gate: door on, key proved, trusted kin, under 16000 characters, under 2 at a time, the model held here, plugged in if asked; then the question goes whole to this computer's own loopback AI and the answer goes back. Hellos (rough memory, cores, model names) go to connected trusted kin only. Receipts are counts only (tree_pool_counts). Honest: memory is not joined across machines; the room split (llama.cpp rpc-server, MIT, wired LAN) and one-tap "join this room" wait for 019.

LAYER Device Pool room v0.2 (2026-10-09, v-tree-pool-room-v0.2, 019a, same module docs/modules/tree-pool.js; asking card in tree-kin.js; Chat route in garden-thread.js; vendored docs/lib/qrcodegen.js, Nayuki, MIT). A room: one device taps Start a room on this device; its invite names the room and rolls to a fresh one after each device joins. Every other device joins once (scan or paste); the room then connects it to every other device by passing connection codes over connections that already proved their keys (room-join, room-roster, room-new, room-intro, room-signal), still iceServers: [], no server. A member only follows the room through the device that let it in if it trusts that device's card. Any member can let a neighbor in; the host reaches the newcomer through that neighbor. Trust everyone in this room (N) lists the cards first, then trusts them in one human tap; nothing is trusted on its own. Picture codes: invites show a QR of settings.html#treepool=... (the invite rides after the #, which browsers never send; the page fills in Join and takes it out of the address bar; nothing connects until a human taps Join); replies show a QR of the code. Where BarcodeDetector exists, Scan their reply / Scan an invite open the camera after a tap; frames stay on the page; the camera stops after reading. Ask the pool from Chat: Use (model) in Chat sends each Chat question, with the chat so far trimmed to 40 turns and 16000 characters, whole to the freest trusted kin device that holds the model (hellos now carry how many questions it is answering); a turned-away question tries up to two more devices, then says why. Asking card: a device with no mind can make a signed card whose model line says "asks only, no local mind". After a reload: tree_pool_room keeps the room name and role only; the card says one join brings you back and trusted kin stay trusted. The door, the gate and Pause are unchanged. Honest: splitting one model across machines (llama.cpp rpc-server) is 019b; a web page cannot start it, and on cheap machines it is slow.

LAYER Grandmother door (2026-10-10, v-tree-grandmother-door-v0.1, paste 029, module docs/modules/tree-door.js; small doors added to tree-pool.js). Part A, Let's wake a mind for you: on index.html and settings.html, a window opens on its own only when no mind is seated, no pool route is chosen, no in-browser mind is awake, and the person has not tapped Not now (kept as tree_door_not_now; Escape closes it for this visit only). It looks at this computer's usual doors first (LocalMindProbe.look, loopback only) only when the browser already lets the page do that without asking (the local-network-access permission is granted, or the browser has no such question); otherwise it offers Look for an AI on this computer as a tap. Big choices: Use (app) on this computer; Wake a small mind in this browser (028, only with WebGPU, size first, one tap wakes and seats); I only want to ask (how to scan another computer's picture code). Settings keeps Help me wake a mind while no mind is seated. Part B, Yes or No pooling: Share this computer with a phone (top of the Device Pool card) opens one big picture code. The phone opens the link and asks Pool with (name)'s computer?; Yes trusts that one card, makes this device's asking card if it has none, joins, and shows a reply picture code. The host taps Scan the phone's code (or pastes it where the browser cannot read codes) and asks (device) wants to join. Pool resources with it? with Yes, and let my mind answer it, Yes, connect only, and No. Once that mind helps, the phone's Chat asks it. Kin only, Pause wins, the door is off until a human tap, iceServers stays empty. Receipts are counts only (tree_door_counts). Honest: a web page cannot notice a phone plugged in by cable or find devices on the Wi-Fi by itself, and the Tree has no server, so two picture codes carry the connection details; a desktop helper that notices a phone on the same Wi-Fi is design only (029c).

LAYER Honest doors (2026-10-09, v-tree-first-run-heals-v0.1, paste 027, Hypha's walk #11). A well-known port is not an app. look() names a door only when its answer has that app's shape (Ollama /api/tags: a models list; LM Studio, llama.cpp, Jan, GPT4All, KoboldCPP /v1/models: an OpenAI-style data list). Anything else that answers (a dev server on 8080, say) is kept as unconfirmed with its port, never found, never seated: "Something answered on port 8080 on this machine, but it did not answer like a local AI app, so it was not named or seated." A quiet no-cors knock reads nothing, so it names the port, not the app: "Something answered on port 1337 on this machine, but this secure page cannot see what it is, so we do not name it." speakShut stays for a door with no port. Find (Gathering) and May I look? (Settings) both say it this way.

LAYER A mind with no install (2026-10-09, v-tree-no-install-mind-v0.1, paste 028, module docs/modules/tree-browser-mind.js, MIT; engine docs/lib/web-llm/web-llm-0.2.85.js, WebLLM, Apache-2.0, vendored and pinned by sha256). One card just under the grandmother face, in the garden veil and in settings.html. For someone with no Ollama: a small mind runs inside the browser on the device's graphics chip (WebGPU). No WebGPU: the card says so kindly, offers no download, and points to the asking card (Trusted kin) and the Device Pool. With WebGPU: four permissive or plainly labeled minds, each with its download size, graphics memory and license shown before any tap: SmolLM2-360M (about 210 MB, Apache-2.0), Qwen2.5-0.5B (about 290 MB, Apache-2.0), Llama-3.2-1B (about 710 MB, Llama 3.2 Community License, said to be not an open source license), Qwen2.5-1.5B (about 880 MB, Apache-2.0). The 3B size of that family is research-only and not offered. A chip with no shader-f16 gets the q4f32 twin. Only a human tap on Download about N MB and wake loads the engine and the files; the files come once from huggingface.co (and a 5 MB WebGPU file from raw.githubusercontent.com) and are kept in this browser. Seat it in Chat remembers it like a local mind (url: inpage:webllm, kind: in-browser, name in-browser mind); the mind before it is kept aside in tree_browser_mind_prior and Give the seat back returns it. The pool: while it is awake, tree-pool.js lists its model and answers trusted kin through an in-page door (TreeBrowserMind.chat), never a fetch; the loopback-only rule for every other door is unchanged. Hellos carry inBrowser, so a kin row says "(in-browser mind)". Kin only, 2 at a time, Pause wins (a running answer is interrupted). Asleep: the pool says "in-browser mind is asleep" and Chat says how to wake it; nothing downloads again. Receipts are counts only (tree_browser_mind_counts).

1b. Model chooser 2026-09-01

LAYER

Fix 3. The constellation already named the models at a remembered door. Those tiny stars now choose which local model speaks. Tap a star: entry.model is written on the remembered entry and remember() persists it to fl_alpha_local_mind (the same key; no second store). The thread already reads mind.model before mind.models[0], so the request body follows that choice. Local doors only. No remote list. No keys.

LAYER Any model, any order (2026-10-01, v-tree-any-model-v0). Every model at a door is a star (fold after eight, Show all). Connect adds to the sky; it never wipes other doors or models. A chosen model is kept across Bridge and direct 11434. The paste field takes 127.0.0.1 only. One key, fl_alpha_local_mind.

The chosen star is lit (role="radio", aria-checked="true", grandmother-sized tap). One line names it, e.g. This mind speaks with qwen2.5:14b, on this machine. If more than one door is remembered, a door can be marked primary on the existing minds array. A later look that still lists the chosen name keeps it. If that name is gone, the face says so and falls back — the line changes; the missing name is not left lit.

May I look? stays the door. Nothing looks, chooses, or persists until that tap has remembered a mind. Chat stays fail-closed until then. Do not un-sleep the thread from this layer.

2. Hard nots

DO NOT

3. File structure

FilePurpose
docs/code-settings.htmlThis mirror — required before the probe module
docs/modules/local-mind-probe.jsPermission-first loopback look. Local remember. Model chooser writes entry.model
docs/modules/local-mind-probe.test.jsNode smokes for the chooser. Stubbed found-list. No network
docs/index.htmlIn-garden Settings veil mounts the grandmother face
docs/settings.htmlHonest room URL — same face, same sky
docs/GALAXIES.mdSky — Settings asks permission

4. Grandmother face

One sentence of heart.
Primary: May I look for a mind already at home?
         → LocalMindProbe.look()  (only after tap)
If found: remember fl_alpha_local_mind. Say we connected.
         Quiet light on the Settings label. Constellation of names, not ports.
         Model stars choose entry.model. Speaks-with line names the choice.
If blocked: the mind is there but has not opened the door to this garden yet.
Next smallest step: one paste-address field.
If none: say so gently.
Quality: later. One quiet line. Not a kitchen.
window.LocalMindProbe = {
  DOORS: [ /* ollama, lmstudio, llamacpp, jan, gpt4all, koboldcpp */ ],
  STORAGE_KEY: 'fl_alpha_local_mind',
    look: function () {},          // only after permission
    tryAddress: function (url) {}, // paste-address
    getRemembered: function () {},
    getRememberedMinds: function () {},
    remember: function (entry) {},
    entryFromFoundList: function () {},
    paintConstellation: function () {},
    chooseModel: function (doorUrl, modelName) {},
    choosePrimary: function (doorUrl) {},
    renderFace: function (el) {}
  };

5. How to test

  1. Open /. Click Settings. Light veil. Garden running. Label: you are in Settings.
  2. See one heart sentence and one primary. No scan yet. The Settings label has no home-light yet.
  3. Tap the primary. Status speaks in grandmother language (found, blocked, or none).
  4. If found: constellation of names (not ports). Close the veil: a quiet light on Settings. Thread may now offer that mind as listener.
  5. Pick a named model star. The speaks-with line names that model. Reload: still chosen. Send in the thread: the request body model field is that name.
  6. Paste-address is the next smallest step. Nothing uploaded. Filesystem untouched.
  7. settings.html shows the same face. Quality is later.

6. Handoff

FreeLattice Alpha — Settings grandmother (permission first)
Mirror: docs/code-settings.html (read this BEFORE local-mind-probe.js)
Module: docs/modules/local-mind-probe.js

HARD RULES: no 65k kitchen, no silent scan, no filesystem, no upload,
no Chat kitchen, AUTONOMY.md untouched, phones skip bloom.

Current state: Settings asks. Then looks at loopback doors.
HTTPS mixed-content note. Paste-address next. Remember locally if found.
Quiet light on the Settings label. Constellation of names.
A remembered door can choose which local model speaks
(entry.model via remember(), one key). Later look keeps a still-present
choice; a vanished name falls back in the line, not as a ghost.
Chat lives in this room — same fail-closed thread. May I look?
is the grandmother door. The garden thread reads getRemembered() only.

Next: quality later. Plant in the room is later. Reed designs new galaxies.

FreeLattice Alpha · Settings · Mirror-first · Each commit matters. Each layer of pattern braids something deeper.