@volter/twin-x 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -104,6 +104,39 @@ lookahead and the timeline rules need a trailing segment, so `/2/users/me` match
104
104
  and no request is claimable by both. An unclaimed path on that claimed host is refused loudly rather than mis-routed into a
105
105
  twin that cannot serve it.
106
106
 
107
+ ## x.com's public pages
108
+
109
+ An app that posts links the person to the post where it was published (Postiz:
110
+ `https://twitter.com/<handle>/status/<id>`). Inside a World that link opens here: this pack claims
111
+ `x.com` and `twitter.com` for exactly two anchored path shapes and serves them from its store
112
+ (`src/x-web.ts`), with no sign-in, as X shows a public page to anyone:
113
+
114
+ - `/<handle>/status/<id>` — the post's page: the author's name, `@handle` and verified mark, the
115
+ text with its mentions and links, its images or video, a quoted post, and the full time (drawn in
116
+ UTC — the page has no viewer's zone). Under another handle, or the author's in another case, it is
117
+ a 307 to the author's own URL, as x.com answers; a deleted post or an id no post has is a 404 with
118
+ X's "this page doesn't exist" words; a protected account's post shows X's protected notice.
119
+ - `/<handle>` — the profile (name, handle, bio, location, website, joined date) over its posts, newest
120
+ first, each linking to its page; replies stay off it (X's Posts tab). The handle is
121
+ case-insensitive; a handle no account has is a 404 ("This account doesn't exist").
122
+ - An account without a photo is drawn with X's default avatar — the grey silhouette at the default
123
+ `profile_image_url` the API answers for it, redrawn inline (the pack claims no `abs.twimg.com`). A
124
+ photo an account set is not drawn yet (todo `x.web.profile_photo`): it keeps a lettered placeholder.
125
+ - A trailing slash is a 307 to the path without it. `twitter.com` answers with a 301 to `x.com`,
126
+ `www.x.com` and `www.twitter.com` with a 301 to `twitter.com`, `mobile.twitter.com` with a 302 to
127
+ `twitter.com` and `mobile.x.com` with a 302 to `x.com`.
128
+
129
+ Those status codes are x.com's own, observed logged out on 2026-09-28 (`curl -A 'Mozilla/5.0'`; the
130
+ requests are in `src/x-web.ts`). X's top-level routes (`home`, `grok`, `premium`, …) are never read
131
+ as a handle.
132
+
133
+ Images and video on those pages load from `pbs.twimg.com` and `video.twimg.com` — X's own media
134
+ hosts — which this pack also claims, for exactly the paths it serves from its blob store. `x.com` is
135
+ shared with xidentity (its OAuth consent screen at `/i/oauth2/authorize` and its `/_twin/` doors);
136
+ the handle rule never admits `i` or `_twin`, so the two claims are disjoint
137
+ (`scripts/vendor-hosts.test.ts`). Replies under a post and x.com's logged-out chrome are manifest
138
+ todos (`x.web.*`).
139
+
107
140
  ## The mirror — x.com's view of the twin
108
141
 
109
142
  A person doing X's core job opens a browser, so this pack ships a mirror: x.com's own look over the