ident
All repositories: gitoria
3.9 KB
# Mission 001 (old 003) — ident.worldapi.org MVP in Hybriel (ticket #2)One-shot worker. Architect (Claude Code on Byrodin) verifies your report.Read first: `/CONTAINERS/projects/antcolony/README.md`, `STATUS.md`, `loreana:/media/STORAGE/projects/tickets.worldapi.org/missions/001-tickets-mvp.md`and its result: the tickets app `loreana:/media/STORAGE/projects/tickets.worldapi.org`(README, STATUS, project.hl, store.hl, tests/) — same stack, same conventions, copy its setup.## Where- Host Loreana (`ssh loreana`, fish login shell → `bash -c '…'` or script files).- New app folder: `/media/STORAGE/projects/ident.worldapi.org`. Vendor `bin/hybriel` + pluginsexactly like the tickets app does (same binary, sha256 c51d163d…).- Hybriel repo `/media/STORAGE/projects/hybriel` READ ONLY. Reference for login:`projects/demo-social-network` (mail.hl, login_form.hl, signup_form.hl, store.hl, tests/).- Dev port **8351**, bind 0.0.0.0. Gate ports: pick your own range, not 8352 and not the socialgate's 8600-8619 (another worker runs the tickets gate at the same time).## What ident isLogin for all worldapi apps (tickets, gitoria, …). Email one-time codes only, no passwords.Accent orange `--color-accent: #ce9178` (tokens: `/CONTAINERS/projects/layouts.worldapi.org/css/foundation/tokens.css`on Byrodin, read only; markup rules in `docs/conventions.md` there).## Scope1. Users: email (unique, lowercased), display name, created. Sign up = first login with a new email(ask for a name once). Codes: 6 digits, expire after 10 min, single use, max 5 attempts, ratelimit sends per email.2. Pages: `/` (signed out: login form; signed in: "signed in as …", sign out), code entry,name prompt for new users.3. **Login for other apps — architect decision, redirect + code exchange (OAuth-code style,works across domains and dev ports):**- App sends browser to `ident/login?return=<url>&app=<name>`.- After successful OTP, ident redirects to `<return>?ident_code=<one-time code>` (code valid 60 s,single use). Only return URLs whose origin is on an allow list (config, for now: the tickets devorigins `http://100.77.141.84:8350`, `http://192.168.178.75:8350`, `http://127.0.0.1:8350`, pluswhatever your test client uses). Unknown origin → error page, no redirect.- App's server calls `POST ident/api/exchange {code}` → `{ user: { id, email, name } }` or 400.- ident keeps its own session cookie so a second app login does not need a new OTP.- Write this down as a short spec in the app README ("How apps use ident").4. Mail: do NOT send real mail in this mission. Use a file sink like the social app(`HL_SOCIAL_MAIL_SINK` pattern) configured via `.env`; tests read the code from the sink.Leave the hl:smtp path wired and configurable (SMTP_* env) for mail.byrod.in later.5. A minimal test client (a tiny second hybriel app or a route in the gate) that proves the wholeredirect → OTP → return → exchange flow end to end.Out of scope: wiring tickets to ident (next mission), deploy, Docker.## Rules- No git. Don't touch other project folders (read the tickets app only). Only kill your own PIDs.Clean up every headless Chrome (`--disable-gpu`, GPU is wedged). Scratch in `.scratch/`.- A test is the whole process: real headless browser drives login, observe the result;plus API negative cases (expired/reused code, wrong code 5x, bad return origin, reused exchange code).- Strict API from day one: unknown/missing fields → 400 naming the field.- Hybriel bugs: don't fix in the repo; report with repro.- Leave the dev server RUNNING on 8351 (setsid/nohup, `server.pid`, `server.log`).- Deliver `README.md`, `STATUS.md`, `tests/browser.mjs`.## Report (final answer, this structure)```## Done## Verified (each: command run + observed output)## Not verified / open## Hybriel issues (repro, observed, expected)## Questions for the creator## Running (URL, PID, log path)```
Branches
Latest commits
- c3a40ff6|||PR ident#40 one shell for the app and /start (account part off on /start, #40.1); startshell.hl removed; unused signOut faces gone (#40.4)mre
- 060f3870ident#40.4: use the shell sign-out faces in regression gatesmre
- 9b94aa6aMerge branch 'f1b-cleanup' into mainIdent
- edcfce3f|||PR ident#41 ident#43 ident#44 login error page as a component (same status codes and text, pixel-identical), declarations and route wiring cleaned upmre
- 3ac85995ident#43 ident#44: plain declarations for never-reassigned lets, one envString helper, named route functions and audience rule out of project.hlmre
- c7eef14aMerge branch 'nv1-navigate' into mainIdent
- 644f9775|||PR ident#36 navigate() instead of window.location in the shell, start shell and homemre
- 4ca2f921deploy.sh: tar --hard-dereference so backups hold no hard linksmre
- 23971fb7ident#49: media queries in the language's @media formmre
- 73f4f97dident: re-vendor to hybriel day38b (mpackdb store-open fix)mre
- aa056c03ident: a startup error prints its message before exit 1 (hybriel#247)mre
- ee37a861ident#G48: gitoria's registration gets the wildcard origin of its repo addresses at load (gate tests/gitoria-origin.mjs)mre
- dc6d486fident#27: the docs gate expects the new Access entry in the main menumre
- d277633cident#27: README: identity access and the introspect endpointmre
- e999b0d3ident#27: the Access tab — one key per identity for all its apps: give access in three steps, the overview matrix, a cell's sheet (since, last use, level, rotate, revoke), the app's check POST /api/introspect, agent identities hidden from the login picker, an inbox icon in the header's icon style (gate: tests/access.mjs)mre
- 436206fcident#47: deploy.sh runs the sign-in gate on the deploy's own port slot, like the sessionwrites and docs gates (the default 8700 can be taken by another process)mre
- a4887ea3ident#47: the selector's sign-in frame no longer has a Continue button; the identity row itself is the link (gate tests/signin.mjs fails on the old code)mre
- d8ec703dident#45: /docs shows docs/IDENT.md (hl:markdown, vendored from ac1ed9da), one Docs entry in the main menu, README for developers only, gates tests/docs.mjs and tests/sessionwrites.mjs in deploy.shmre
- ec6aad35Merge branch 'a28g-amp-callsites' into d45-docsmre
- 6bfbd3f2ident#45: docs/IDENT.md, what ident is and how it works; CONCEPT.md marks one id per app as droppedmre