diff --git a/docs/decisions.md b/docs/decisions.md index 6846533..2bc5a2e 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -59,3 +59,4 @@ Format: date · decision · why. Add at the bottom. Never edit an old entry; sup - 2026-10-15 · **Orgchain layout: three columns, no gap above the timeline.** The operator's screenshot showed the timeline far below the tree: the act and inspect column, now long with keys, leaves and secrets, spanned both grid rows and stretched the first. Orgchain is now three columns that run on their own (holdings; the tree with its timeline; act and inspect) over a flexible last row, and the medium layout keeps the timeline under the tree too; checked at 1440, 1280, 1100, 900 and 390 px. The footer links the scure licenses. `lineage/orgchain` main `aeb11d3`, time's `gh-pages` `0b0f27a`; 56 unit tests and Playwright 6/6. Token 51 (`orgchain-layout-20261015`, `write:repository`) did the pushes and is deleted right after; the table is checked. Why: the operator asked for the formatting to be fixed. - 2026-10-15 · **Prod looks like Teahub again: home page, dashboard, colours and cup, kept in this repo.** Prod's Gitea showed Gitea's own home page, name and blue. At the operator's word the old factory's look is back, ported to Gitea 28: `gitea/custom` has the signed-out home page (Teahub = Git + Tea + Time beside 🍵), the dashboard (the feed, and in the sidebar Domains | Repository | Organization above the contribution heatmap), green tea colours for Gitea's light, dark and auto themes (the old #2f9e44 and #58b96a with every shade Gitea uses; dark-mode buttons get near-black text, because white on that green reads at 2.5:1), the name beside the navbar's cup, and the 🍵 mark (SVGs in the reader's emoji font; PNGs for link previews, tabs and phones from Noto Emoji, Apache 2.0). `APP_NAME` is Teahub and the meta tags say Git + Tea + Time, as env in `gitea/fly.toml`. Rehearsed first on a scratch Gitea 28.0.0 with the same files, signed in, light and dark, desktop and phone width. `gitea/sync-custom.sh` copied the files onto the volume and a deploy at 03:50 UTC restarted Gitea with them (a restart signs everyone out, because sessions live in memory). Left behind with the old factory: the "Ask Tea" chat, the Codex and ceremony controls, the issue stream and the pages editor, which belonged to its agent. The Domains tab asks Tea MCP 2.2's `GET /domains` (`9551a86`), a port of the old factory's Cloudflare Registrar search: a live check of the exact names and Cloudflare's suggestions, with at-cost prices; nothing is registered or bought. Like the old one it is for people signed in, and the sign-in is the MCP's own, as the operator pointed out: the first search sends the browser once through `/domains/sign-in`, Tea MCP's Gitea OAuth with the "Green Tea MCP" app (which so lists `/domains/callback` as a second redirect; anyone who has connected Claude goes straight through), Gitea's token is used once to learn the name and dropped, and a signed, HttpOnly cookie on mcp.teahub.xyz keeps them for 30 days. teahub.xyz and mcp.teahub.xyz are one site, so the dashboard's requests carry it. Only teahub.xyz may read answers (CORS), each person gets 8 searches a minute and everyone together 20, and answers are kept ten minutes, so Cloudflare sees at most 40 calls a minute from the one machine. Tested end to end on hb-5 against a Gitea 28 and the real Cloudflare API: the search asks for the sign-in, Gitea's consent, back to the dashboard, and the waiting search runs. **Not live yet:** deploying 2.2, adding that redirect, restarting Gitea for the new script, and giving green-tea-mcp the old factory's Cloudflare token (`CLOUDFLARE_API_TOKEN` and `CLOUDFLARE_ACCOUNT_ID`, from the stopped `teahub-mcp` container) wait for the operator, because Claude's permission check refused the first deploy; the secrets had been staged and were unstaged, so nothing goes live by accident. Until then the tab answers that domain search is unavailable. That token is wider than search needs (probed: it reads zones and registrar domains and lists Workers scripts; it can't read or write DNS or manage tokens), and neither it nor Boring's token can mint a narrower one, so a Registrar-read-only token from the operator would be better. Token 52 (`look-20261015`, `write:repository`) pushed `9551a86` and this line and is deleted by id right after; the table is checked. Token 53 (`signin-20261015`, `write:repository`) pushed the sign-in, likewise deleted. Why: the operator liked the old Teahub look, its colour and its domain search, and asked for the home and feed templates back. - 2026-10-15 · **Orgchain v1.5: beats pay the holding, and test BTC moves down the tree.** The operator asked to simulate transactions inside an organization, the way Super Testnet's mining pays its wallet: the seed org gets each beat's funds and can send to subsidiaries and agents. Each beat now pays its 50 test BTC block reward to the holding being worked in, at the holding's SegWit (BIP-84) address; a closed holding, or one that predates lab keys, leaves it to the lab wallet. **Send** moves test BTC from any active node to another in its holding, signed by the sender's BIP-84 key, with the toy chain's fixed 500-sat fee: at most two coins in and one block reward out. Sends land like acts (at once, cued, or on *Beat now*, which now mines even when nothing is cued). A graduation moves each re-keyed node's money to its new address with its inscription, so the parent's line can no longer spend it. Balances follow the slider; the tree shows them rounded (≈), the timeline lists every reward and send, and Inspect has exact amounts and the raw transaction. Inscription fees still come from the lab wallet. The engine's one local change is in `src/adapters/chain.js`: the toy chain also takes P2WPKH outputs and SIGHASH_ALL spends (BIP-143, low-S DER), recorded in PROVENANCE; Super Testnet's tests pass unchanged. `lineage/orgchain` main `6d5806d`, time's `gh-pages` `1e59e5d`; 62 unit tests and Playwright 8/8. Token 54 (`orgchain-money-20261015`, `write:repository`) did the pushes and is deleted by id right after; the table is checked. Why: transactions inside an org come before orgs trading with each other. +- 2026-10-15 · **Orgchain v1.6: holdings share the mining, every act pays its gas, and money crosses holdings.** The operator asked whether mining splits when a lab has several holdings (it didn't: the holding being worked in took each beat), said they'd been thinking equal with hashrate as an interesting option, that the last-act rule is an interesting multiplayer mechanic (like an idle clicker), and that there "should have gas on every transaction". So mining is now a lab setting. *Split* (the default) pays every active holding a share of each beat, pro rata by a hashrate dial from 0 to 9 on each holding (1 unless set, so equal), one coinbase output per holding. *Last act* gives the whole beat to the holding that acts, and *Beat now* pays the one being worked in. Every act is paid by the acting node's own keys: its inscription's fees and postage come out of its gas tank (the plain coins at its Taproot key), which tops up from its own money 0.0001 test BTC at a time. Each act is checked before anything is signed, so a node with no money can't act until someone sends it some, which is the anti-spam point. A graduating org pays for the claim on its new root out of its own money, and the lab wallet now pays only for foundings and for holdings that predate lab keys. Sends cross holdings (one-way payments), and the timeline shows gas top-ups. The engine's second local change is in `src/adapters/chain.js`: a coinbase may split the reward across up to 64 outputs (`mineTo`), recorded in PROVENANCE. Chain keys are now derived once per page (gas checks ask for them often). `lineage/orgchain` main `2354947`, time's `gh-pages` `69eb5a3`; 62 unit tests and Playwright 8/8. Token 55 (`orgchain-gas-20261015`, `write:repository`) did the pushes and is deleted by id right after; the table is checked. Why: the operator's questions about several holdings mining, and gas on every act. diff --git a/docs/lineage.md b/docs/lineage.md index 387e92b..630a0aa 100644 --- a/docs/lineage.md +++ b/docs/lineage.md @@ -25,9 +25,10 @@ app ([`lineage/orgchain`](https://teahub.xyz/lineage/orgchain)). Found a holding belts, record decisions, send test BTC, graduate and close. Each act is a `lineage/v0` inscription whose parent is the node that authorizes it, on a private toy chain in the browser with pretend money. Time is a tempo (each act its own beat, or acts cued and landed together every 10, 30 or 60 s, or by hand), and a slider replays any holding beat by -beat. Each beat pays its 50 test BTC reward to the holding being worked in, at its SegWit address, and any node can -send test BTC to another in its holding, signed by its BIP-84 key; a graduation takes each re-keyed node's money along. -Every +beat. Holdings mine each beat's 50 test BTC, split by a hashrate dial on each (equal by default), or, under *Last act*, +all to the holding that acts. Any node can send test BTC to any other, across holdings too, signed by its BIP-84 key, +and every act pays its own gas from the actor's keys, topped up from its money, so an unfunded node can't act; a +graduation takes each re-keyed node's money along. Every node holds its inscription at its Taproot address (BIP-86 at its account: a lab root per holding, BIP-85 org seeds, the org as account 0 and seats as accounts 1..n), keeps its money at its SegWit address, lists its tapkey (the npub as a Taproot address) and its npub beside it, shows its leaves as [the key tree](https://lineage.yolopreneur.lol/) derives them (ssh, git,