diff --git a/docs/decisions.md b/docs/decisions.md index 40b7de5..6846533 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -58,3 +58,4 @@ Format: date · decision · why. Add at the bottom. Never edit an old entry; sup - 2026-10-15 · **The tapkey stays beside Taproot, and Orgchain shows every secret.** The operator likes the npub ↔ tapkey link (Nosft's model, from the Deezy thread) and wants Orgchain to be the full platform for running lineage LLCs, with secrets shown as on the key tree page. Both pages now list each npub's tapkey (its nostr key with the BIP-86 tweak) beside the Taproot and SegWit accounts, and the key tree page's keyring and `lineage.json` carry it. A node's inscription stays at its standard BIP-86 key: the tapkey is where anyone can send to an npub, while the key that carries an org's authority is not one that nostr clients hold. Orgchain v1.4 adds a Reveal panel to every node (the seed for holdings and orgs, the nsec, Taproot, SegWit and Tapkey descriptors with test-network WIF and BIP-380 checksums, and the leaves' private keys), hidden again on every selection. Its output matches the key tree page byte for byte (the tests pin hashes of the page's own output), BIP-84's WIF vector and BIP-380's checksum vector, and `ssh-keygen` reads its OpenSSH keys. The key tree page's descriptors gain checksums too. `lineage/orgchain` main `17b8692`, time's `gh-pages` `d481ba9`; 56 unit tests and Playwright 6/6. Token 50 (`lineage-secrets-20261015`, `write:repository`) did the pushes and is deleted right after; the table is checked. Why: Orgchain is meant to run the LLCs, not only draw them, and an npub should reach the chain on its own. - 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. diff --git a/docs/lineage.md b/docs/lineage.md index 52e4993..387e92b 100644 --- a/docs/lineage.md +++ b/docs/lineage.md @@ -22,11 +22,14 @@ this tree is a drawing, and nothing derived from it may be presented as a real k **Operate it:** [lineage.yolopreneur.lol/orgchain/](https://lineage.yolopreneur.lol/orgchain/) is Orgchain, lineage's app ([`lineage/orgchain`](https://teahub.xyz/lineage/orgchain)). Found a holding, then birth orgs and agents, award -belts, record decisions, 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. Every +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 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), lists its SegWit address, its tapkey (the npub as a Taproot address) +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, dkim and wg for agents; ssh-ca, mtls and noise for orgs), and keeps every secret behind a Reveal, as the key tree does. Each act is signed by whichever key holds the authorizing inscription, and graduation is a claim by the org's fresh