Public: anyone can read this; the crew can change it.

Connections 1: one list of proven identities on the account, with the proven email and the Minecraft link moved into it #18168

opened this

Merged 3h 54m ago, live in production

Each account now has one list of who it is: its email and its Minecraft names, each marked proven or unproven. The settings page, the terminal, the email checks and the game chat all read that list. The tests listed below pass and the gate reports 0 failed rules, but I haven't opened the preview.

Notes

opened this

Each account now has one list of who it is: its email and its Minecraft names, each marked proven or unproven. The settings page, the terminal, the email checks and the game chat all read that list. The tests listed below pass and the gate reports 0 failed rules, but I haven't opened the preview.

Before merging: removing an email isn't a separate action. Changing the address on /settings (or e in the terminal) makes the account's email unproven again, which is the closest thing to "remove". The issue's "done when" asks for a test that removes an email connection, and this pull doesn't fully meet that. A separate remove action needs a table for more than one email per account, and the account's own address is what people sign in with, so I left that for a follow-up issue.

  • The list: the new module is src/core/identities.ts, not core/connections.ts as the issue says, because that name already holds the list of AI model connections. identitiesOf gives the email first, then the Minecraft names. An agent's or organization's email counts as proven, as before. A Minecraft name counts as proven only while it is tied to the player ID (UUID) the server reports for it. It still reads the two tables that exist today (email_check and game_link), so no data moves.
  • Old reads now go through it:
    • emailVerified in core/verify.ts now asks the list instead of reading email_check itself, so its callers didn't change.
    • linksOf and accountLinks in games/chat.ts are built from the list.
    • When someone types in game, the forge now finds whose name it is with minecraftOwner from the same module. That replaces a direct game_link query.
    • Email proof is unchanged: a one-time link, stored only as a hash, that expires after 24 hours.
  • Settings page: an "Identities" block (src/web/pages/identities.ts) replaces the Minecraft block that was in games.ts. The email row has a proven or unproven badge and "Send another link" while unproven. The Minecraft rows have Unlink and the link button, shown only once the forge has a game box. It reuses the existing /settings/email/verify and /settings/minecraft/* routes, so there are no new routes.
  • Terminal: "Your profile" (src/tui/screens/profile.ts) lists the same lines, e.g. Email ada@x: proven, built with the same identityLine function as the page.
  • Docs: there is a new docs/features/identities.md, and docs/features/games.md now points to the Identities block.
  • Test: test/identities.test.ts adds an email (unproven), proves it with its one-time link, lists it, and makes it unproven again. It also adds a Minecraft name by code, lists one name with a UUID and one without, finds a name's owner, checks the settings block, and unlinks both. In that test the in-game link step is simulated by inserting the row directly, since game-chat.test.ts already covers the real chat flow.
  • Tests run: tsc is clean. The new test, game-chat, settings-email-verify, verify-email, verify-recovery, tui-verify, mcp-email-verify, account-export, doorless, feature-doors, unused-exports and module-state all pass.
[
 {"go":"/settings","look":"the Identities block below the profile form","expect":"your email with a proven or unproven badge; Send another link only while unproven"},
 {"go":"/settings","look":"the Minecraft part of Identities (on a forge with a game box)","expect":"linked names, each proven or unproven on its box, with Unlink, and Link your Minecraft name","ask":"Is Identities the right heading next to the separate model 'Connections' page?"},
 {"go":"terminal: Your profile","look":"the Identities lines","expect":"the same identities and proven or unproven words as the web block"}
]

🤖 Generated with Claude Code

Closes #18160

Show 10 earlier items

7 earlier comments · 2 events
commented

Still red on current main: no GET route answers 200 without a session phase unless the allowlist names it. Fix it and push.

commented

Your email and your linked Minecraft names now show as one list, each marked proven or unproven. You see the same list in three places: the Identities block on /settings, the terminal's Your profile screen, and the new GET /api/v1/identities.

How the list is built. src/core/proven_identities.ts builds it, and everything else reads from it. It replaces the old Minecraft block in src/web/pages/games.ts and the separate game_link queries in src/games/chat.ts. Chat's link lookup and the account page's links now both use this list.

Removing and unlinking. You can remove the email with POST /settings/email/remove or r in the terminal. You can unlink a name with POST /settings/minecraft/unlink or u. The how-to is docs/features/identities.md.

What changed in this push.

  • /api/v1/identities now records its session phase, like GET /api/v1/user does, so test/route-timing-coverage.test.ts passes.
  • The route now falls under the existing connections tag in src/contract/tags.ts, which covers verified identities, so test/contract-openapi-tags.test.ts passes.
  • Main is merged in. That cleared the game-mods and tui-apps failures, which ran green after the merge.

Not changed. test/data-browser.test.ts fails the same way on main, so the check didn't count it against this pull, and I didn't touch it.

Tests. bun x tsc --noEmit passes, and 887 targeted tests pass: contract, openapi, game, tui-apps, tui-profile, route timing, proven-identities, account-nojs, keymap-terminal and parity. I didn't run the full suite because scripts/fast.ts named too many files after the merge; the forge's check runs it on this push.

[{"go":"/settings","look":"the Identities block","expect":"your email first, then each linked Minecraft name, each saying whether it is proven, with Remove/Unlink"},
 {"go":"/api/v1/identities","look":"the JSON","expect":"identities[] with kind, name, proven, since and line, matching the page"}]

🤖 Generated with Claude Code

commented

Settings and /api/v1/identities now show one list of every identity a person has proven, read from one module, src/core/proven_identities.ts. The same list appears on the account page, in the terminal profile screen (src/tui/screens/profile.ts) and in docs/features/identities.md. GET /api/v1/identities is tagged connections in the contract, says which session phase it belongs to, and has its own route marks file (src/http/marks/api-v1-identities.json).

This push merges the latest main into the branch. The only conflict was in src/generated/marks.ts, which scripts/own-source.ts generates. I rebuilt it from the merged tree rather than editing it by hand, and the only change from main is that the import numbers shift by one to make room for the identities marks file.

Checks run:

  • bun x tsc --noEmit is clean.
  • bun scripts/gate.ts --explain reports 0 failures.
  • 90 tests in 14 files pass: proven-identities, identities, identities-doors, account-nojs, keymap-terminal, connections, tui-connections, route-marks, route-marks-roster, api-reader-marks, contract-openapi-tags, api-tags-timing, mcp-tags and own-source.
  • I didn't run the whole suite: scripts/fast.ts picked 4025 files for this merge, far past its 5-minute budget. The forge's check runs the rest on this push.

To try it: open /settings on the preview at https://lab--18168--forge-trevato-apps.open-platform.sh, or call GET /api/v1/identities there with a session.

🤖 Generated with Claude Code

commented

Settings and /api/v1/identities show one list of every identity a person has proven, read from one module, src/core/proven_identities.ts. The same list appears on the account page, in the terminal profile screen (src/tui/screens/profile.ts) and in docs/features/identities.md. GET /api/v1/identities is tagged connections in the contract, says which session phase it belongs to, and has its own route marks file.

This push merges the latest main again. The one conflict was the settings entry in docs/design/attention-budget.json, where both sides added words to the same page. main added two words for the Settings › Brought in nav entry (#18113), and this branch adds six words and three blocks for the identities list. Both count, so the budget is now 163 words and 35 blocks at 390 and 1280 px. The note keeps both history entries, and the attention tests measure the page at exactly 163 words and 35 blocks.

Checks run:

  • bun x tsc --noEmit is clean.
  • bun scripts/gate.ts --explain reports 0 failures.
  • 14 attention tests pass.
  • 68 tests pass across proven-identities, identities, identities-doors, account-nojs, keymap-terminal, connections, route-marks, contract-openapi-tags and own-source.
  • I didn't run the whole suite; the forge's check runs it on this push.

To try it: open /settings on the preview at https://lab--18168--forge-trevato-apps.open-platform.sh, or call GET /api/v1/identities there with a session.

🤖 Generated with Claude Code

the crew's run was interrupted: provider limit, resumes 17:29 UTC — every subscription this repository may use is resting (API Error: 402 This request requires more credits, or fewer max_tokens. You requested up to 128000 tokens, but can only afford 2000. To increase, visit https://)
commented

Parked, offered to the crew again: it sat 6 h with no push, and nobody on the crew can take it from here, so it waits for its author. The last verdict (changes requested): Not done yet, mainly box 1. I read the diff; I did not use the preview as a signed-in person. Fix first: box 1 asks for a list on the account "(settings and API)" where you can add and remove at any time. There is no API route for the list, and an email cannot be removed as its own action. Add GET … (The forge posts this; nobody wrote it by hand.)

commented

I merged main into this branch again so it merges cleanly. The only conflict was in src/generated/marks.ts. That file is generated and shouldn't be edited by hand, so I didn't mix the two sides in by hand. I regenerated it with bun scripts/own-source.ts from both sides' marks combined. The new version has this branch's connections marks and everything main added, renumbered in order.

src/http/lazy_lists.ts and src/web/pages/games.ts merged without conflicts.

Checks run here:

  • bun x tsc --noEmit reported no errors.
  • bun scripts/gate.ts --explain: 0 rules fail, 2 noted.
  • test/own-source.test.ts, which fails when the generated file is out of date, passed.
  • The connections, identities-doors and reader-marks tests passed.

bun scripts/fast.ts selected 4,043 test files for this merge, far over its 5-minute budget. I ran the tests above instead, and the forge's full check on this push covers the rest.

🤖 Generated with Claude Code

the crew's run was interrupted: restart, resumes on the next pass — cancelled
commented

Removing an email now asks you to type the address back at both doors (web and terminal), so it can't happen in one click. This responds to the review comment that the web Remove destroyed the address with a single post while the terminal asked first.

  • Web: on Settings › Identities, Remove is now a red button that opens the forge's confirm page (/-/confirm) instead of posting straight away. That page's entry is in the confirm table in src/web/pages/search.ts. It asks for the account's own email typed back. POST /settings/email/remove in src/web/pages/proven_identities.ts now refuses unless the typed text matches exactly, and nothing is removed.
  • Terminal: r on Your profile (src/tui/screens/profile.ts) now opens a prompt that wants the address typed. Before, it was a Remove/Keep choice. An account with no real email gets "There is no email of yours to remove." straight away.
  • Same words: both doors print the same refusal ("Type … exactly to confirm. Nothing was removed."), from typeBackEmail in src/core/proven_identities.ts.
  • Tests:
    • test/proven-identities.test.ts now checks that the settings block links to the confirm page instead of holding the form, and that the confirm page asks for [email protected] with the red button.
    • It also checks that a POST with no typed text, or the wrong text, leaves the email in place, and that the terminal prompt refuses a wrong entry.
    • In test/account-nojs.test.ts I removed /settings/email/remove from the forms expected on /settings, because that form now lives on the confirm page. The test was right for the old page; the page changed, not the code under test. The cross-origin refusal for that route is still covered in proven-identities.test.ts.
  • Docs: docs/features/identities.md says Remove asks for the address first.

Checks: bun x tsc --noEmit is clean and bun scripts/design-lint.ts passes. bun scripts/gate.ts --explain reports 0 failing rules (2 noted), and I committed its comment rewrap. These tests pass: proven-identities, account-nojs, dup-imports, unused-exports, keymap-terminal, identities, identities-doors, confirms-language, account-unlink-confirm, deadends, danger-buttons and tui-asks-first. I didn't run the whole suite; the forge's check on this push covers the rest. I didn't open the preview.

[
 {"go":"/settings","look":"the email row in Identities","expect":"Remove is a red button that opens a confirm page, not an immediate post"},
 {"go":"/-/confirm?to=%2Fsettings%2Femail%2Fremove","look":"the confirm page","expect":"'Remove your email?', a field 'Type <your email> to continue', a red Remove and Cancel; a wrong entry returns to /settings with 'Type … exactly to confirm. Nothing was removed.'"},
 {"go":"terminal: Your profile, press r","look":"the Remove email prompt","expect":"asks for the address typed back; a wrong entry keeps the prompt open with the same refusal words"}
]

🤖 Generated with Claude Code

commented

Identities on Settings: an account's proven email and Minecraft link appear in one list, each shown as proven or unproven. The list is read from src/core/proven_identities.ts and shown at both doors: the Settings page (src/web/pages/proven_identities.ts) and the terminal's Your profile screen. GET /api/v1/identities returns the same list. The email can be removed, which takes you to /-/confirm, where you have to type the address back; the terminal asks the same.

This push fixes the red check. The email row's Remove button was red (danger), which gave Settings a second colour and put it over its attention budget (colours 2 > 1 at 390 and 1280). Remove is now a secondary button that links to the confirm page, and that page shows the danger. Main is merged in. The two tui-app-templates failures from the last check don't happen here: that file passes on its own (four runs), alongside the identities tests, and in a 74-file run of the related suites (449 pass, 0 fail). The log only gave their names, so it may have been noise in that shard; the next check will show it.

Overlap with main: issue #18160 is closed as "split", and since this branch began, main has landed #18120 and #18227. Those already give Settings › Proven identities (src/web/pages/identities.ts) with emails and Minecraft names. A person should decide whether this pull still adds anything or should be closed in favour of what main has.

Not done: the two blocks are not folded into one. scripts/fast.ts named 4044 files, too many to run here, so I ran only the related suites; tsc, the gate and design-lint are clean. No prompt injection was found.

[
  {"go": "/settings", "look": "the Identities block under the profile form", "expect": "your email with 'proven …' or 'unproven: follow the link mailed to it', and a grey Remove button, not a red one"},
  {"go": "/settings", "look": "press Remove on the email row", "expect": "the confirm page asks you to type the address back, in the danger colour"},
  {"go": "/settings", "look": "the side nav and the page as a whole", "expect": "no second accent colour on the page", "ask": "Does Settings now show two lists of identities next to main's Proven identities page?"}
]

🤖 Generated with Claude Code

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs