@volter/twin-googlefonts 0.0.0-stage → 1.0.1
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/LICENSE +202 -0
- package/README.md +15 -2
- package/api/spec/SOURCE.md +17 -0
- package/api/spec/discovery.json +306 -0
- package/api/spec/openapi.json +647 -0
- package/api/spec/sources.json +6 -0
- package/api/src/fetch.ts +16 -0
- package/api/src/generated/surface.gen.json +1 -0
- package/api/src/generated/ui.gen.json +1 -0
- package/api/src/index.ts +3 -0
- package/api/src/manifest.ts +31 -0
- package/api/src/semantics/doors.ts +131 -0
- package/api/src/semantics/index.ts +8 -0
- package/api/src/semantics/shared.ts +1 -0
- package/api/src/semantics/states.ts +6 -0
- package/api/src/semantics/webfonts.ts +32 -0
- package/assets/spec/SOURCE.md +11 -0
- package/assets/spec/openapi.json +162 -0
- package/assets/spec/sources.json +1 -0
- package/assets/src/fetch.ts +14 -0
- package/assets/src/generated/surface.gen.json +1 -0
- package/assets/src/generated/ui.gen.json +1 -0
- package/assets/src/index.ts +3 -0
- package/assets/src/manifest.ts +19 -0
- package/assets/src/semantics/index.ts +10 -0
- package/assets/src/semantics/l.ts +4 -0
- package/assets/src/semantics/s.ts +4 -0
- package/assets/src/semantics/shared.ts +13 -0
- package/css/spec/SOURCE.md +15 -0
- package/css/spec/openapi.json +142 -0
- package/css/spec/sources.json +1 -0
- package/css/src/fetch.ts +14 -0
- package/css/src/generated/surface.gen.json +1 -0
- package/css/src/generated/ui.gen.json +1 -0
- package/css/src/index.ts +3 -0
- package/css/src/manifest.ts +19 -0
- package/css/src/semantics/css.ts +19 -0
- package/css/src/semantics/css2.ts +20 -0
- package/css/src/semantics/index.ts +10 -0
- package/css/src/semantics/shared.ts +1 -0
- package/dist/api/spec/SOURCE.md +17 -0
- package/dist/api/spec/discovery.json +306 -0
- package/dist/api/spec/openapi.json +647 -0
- package/dist/api/spec/sources.json +6 -0
- package/dist/api/src/fetch.d.ts +2 -0
- package/dist/api/src/fetch.js +15 -0
- package/dist/api/src/fetch.ts +16 -0
- package/dist/api/src/generated/surface.gen.json +1 -0
- package/dist/api/src/generated/ui.gen.json +1 -0
- package/dist/api/src/index.d.ts +2 -0
- package/dist/api/src/index.js +3 -0
- package/dist/api/src/index.ts +3 -0
- package/dist/api/src/manifest.d.ts +2 -0
- package/dist/api/src/manifest.js +29 -0
- package/dist/api/src/manifest.ts +31 -0
- package/dist/api/src/semantics/doors.d.ts +3 -0
- package/dist/api/src/semantics/doors.js +138 -0
- package/dist/api/src/semantics/doors.ts +131 -0
- package/dist/api/src/semantics/index.d.ts +2 -0
- package/dist/api/src/semantics/index.js +4 -0
- package/dist/api/src/semantics/index.ts +8 -0
- package/dist/api/src/semantics/shared.d.ts +1 -0
- package/dist/api/src/semantics/shared.js +1 -0
- package/dist/api/src/semantics/shared.ts +1 -0
- package/dist/api/src/semantics/states.d.ts +8 -0
- package/dist/api/src/semantics/states.js +6 -0
- package/dist/api/src/semantics/states.ts +6 -0
- package/dist/api/src/semantics/webfonts.d.ts +2 -0
- package/dist/api/src/semantics/webfonts.js +34 -0
- package/dist/api/src/semantics/webfonts.ts +32 -0
- package/dist/assets/spec/SOURCE.md +11 -0
- package/dist/assets/spec/openapi.json +162 -0
- package/dist/assets/spec/sources.json +1 -0
- package/dist/assets/src/fetch.d.ts +2 -0
- package/dist/assets/src/fetch.js +13 -0
- package/dist/assets/src/fetch.ts +14 -0
- package/dist/assets/src/generated/surface.gen.json +1 -0
- package/dist/assets/src/generated/ui.gen.json +1 -0
- package/dist/assets/src/index.d.ts +2 -0
- package/dist/assets/src/index.js +3 -0
- package/dist/assets/src/index.ts +3 -0
- package/dist/assets/src/manifest.d.ts +2 -0
- package/dist/assets/src/manifest.js +17 -0
- package/dist/assets/src/manifest.ts +19 -0
- package/dist/assets/src/semantics/index.d.ts +2 -0
- package/dist/assets/src/semantics/index.js +6 -0
- package/dist/assets/src/semantics/index.ts +10 -0
- package/dist/assets/src/semantics/l.d.ts +2 -0
- package/dist/assets/src/semantics/l.js +3 -0
- package/dist/assets/src/semantics/l.ts +4 -0
- package/dist/assets/src/semantics/s.d.ts +2 -0
- package/dist/assets/src/semantics/s.js +3 -0
- package/dist/assets/src/semantics/s.ts +4 -0
- package/dist/assets/src/semantics/shared.d.ts +2 -0
- package/dist/assets/src/semantics/shared.js +13 -0
- package/dist/assets/src/semantics/shared.ts +13 -0
- package/dist/css/spec/SOURCE.md +15 -0
- package/dist/css/spec/openapi.json +142 -0
- package/dist/css/spec/sources.json +1 -0
- package/dist/css/src/fetch.d.ts +2 -0
- package/dist/css/src/fetch.js +13 -0
- package/dist/css/src/fetch.ts +14 -0
- package/dist/css/src/generated/surface.gen.json +1 -0
- package/dist/css/src/generated/ui.gen.json +1 -0
- package/dist/css/src/index.d.ts +2 -0
- package/dist/css/src/index.js +3 -0
- package/dist/css/src/index.ts +3 -0
- package/dist/css/src/manifest.d.ts +2 -0
- package/dist/css/src/manifest.js +16 -0
- package/dist/css/src/manifest.ts +19 -0
- package/dist/css/src/semantics/css.d.ts +2 -0
- package/dist/css/src/semantics/css.js +19 -0
- package/dist/css/src/semantics/css.ts +19 -0
- package/dist/css/src/semantics/css2.d.ts +2 -0
- package/dist/css/src/semantics/css2.js +21 -0
- package/dist/css/src/semantics/css2.ts +20 -0
- package/dist/css/src/semantics/index.d.ts +2 -0
- package/dist/css/src/semantics/index.js +6 -0
- package/dist/css/src/semantics/index.ts +10 -0
- package/dist/css/src/semantics/shared.d.ts +1 -0
- package/dist/css/src/semantics/shared.js +1 -0
- package/dist/css/src/semantics/shared.ts +1 -0
- package/dist/journeys/customer-life.json +463 -0
- package/dist/journeys/customer-life.outline.md +24 -0
- package/dist/journeys/customer-life.outline.verdict.json +82 -0
- package/dist/journeys/customer-life.verdict.json +149 -0
- package/dist/journeys/decisions.json +54 -0
- package/dist/journeys/demand.json +67 -0
- package/dist/journeys/first-use.json +20 -0
- package/dist/src/cli.d.ts +2 -0
- package/dist/src/cli.js +21 -0
- package/dist/src/fetch.d.ts +2 -0
- package/dist/src/fetch.js +10 -0
- package/dist/src/index.d.ts +5 -0
- package/dist/src/index.js +15 -0
- package/dist/src/manifest.d.ts +2 -0
- package/dist/src/manifest.js +25 -0
- package/dist/src/semantics/seed.d.ts +2 -0
- package/dist/src/semantics/seed.js +141 -0
- package/dist/src/semantics/shared.d.ts +9 -0
- package/dist/src/semantics/shared.js +23 -0
- package/dist/src/server.d.ts +7 -0
- package/dist/src/server.js +7 -0
- package/dist/vendor/Inter-OFL.txt +93 -0
- package/dist/vendor/OFL.txt +94 -0
- package/dist/vendor/SOURCE.md +33 -0
- package/dist/vendor/antic.json +93 -0
- package/dist/vendor/inputs.json +460 -0
- package/dist/vendor/inter.json +44 -0
- package/dist/vendor/noto-sans-sc-text.json +24 -0
- package/generated/pack-facts.json +65 -0
- package/journeys/customer-life.json +463 -0
- package/journeys/customer-life.outline.md +24 -0
- package/journeys/customer-life.outline.verdict.json +82 -0
- package/journeys/customer-life.verdict.json +149 -0
- package/journeys/decisions.json +54 -0
- package/journeys/demand.json +67 -0
- package/journeys/first-use.json +20 -0
- package/package.json +41 -4
- package/src/cli.ts +22 -0
- package/src/fetch.ts +11 -0
- package/src/index.ts +17 -0
- package/src/manifest.ts +27 -0
- package/src/semantics/seed.ts +143 -0
- package/src/semantics/shared.ts +25 -0
- package/src/server.ts +8 -0
- package/vendor/Inter-OFL.txt +93 -0
- package/vendor/OFL.txt +94 -0
- package/vendor/SOURCE.md +33 -0
- package/vendor/antic.json +93 -0
- package/vendor/inputs.json +460 -0
- package/vendor/inter.json +44 -0
- package/vendor/noto-sans-sc-text.json +24 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Google Fonts used by google-webfonts-helper, Dub and Rallly
|
|
2
|
+
|
|
3
|
+
1. Google publishes the attributed Antic reference snapshot via the publisher
|
|
4
|
+
door (no Developer API font-creation endpoint exists). Actual item fields,
|
|
5
|
+
browser CSS and font bytes enter the shared World store.
|
|
6
|
+
2. The World asks appCredentials for its issued key.
|
|
7
|
+
3. The unchanged helper fetches the popularity-sorted catalog with that query
|
|
8
|
+
key; it consumes family/variants/subsets/category/version/lastModified and
|
|
9
|
+
chooses the returned Antic regular/latin record.
|
|
10
|
+
4. Each of its five exact UAs asks for Antic:regular/latin. The twin returns the
|
|
11
|
+
corresponding real CSS, preserving @font-face style/weight and gstatic URL.
|
|
12
|
+
5. Download every returned URL. The genuine EOT/WOFF/WOFF2/SVG/TTF bytes can feed
|
|
13
|
+
its ordinary JSZip archive.
|
|
14
|
+
6. Dub's Open Graph route asks CSS2 for Inter at one weight from its server; the
|
|
15
|
+
twin answers Google's retained truetype CSS and the returned gstatic URL
|
|
16
|
+
downloads the genuine Inter bytes.
|
|
17
|
+
7. Rallly's Open Graph image asks CSS2 for the glyphs of its CJK title (text=) from
|
|
18
|
+
its server; the twin answers Google's retained CSS for that request and the
|
|
19
|
+
returned URL downloads the genuine truetype subset.
|
|
20
|
+
|
|
21
|
+
The customer entry uses its pinned axios 1.20.0 and the ordinary env name.
|
|
22
|
+
Its prerequisite publisher operation uses the included actual source snapshot.
|
|
23
|
+
No journey, customer entry or application execution has been performed while
|
|
24
|
+
building; executable recipe data is retained for the final qualification phase.
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"judge": {
|
|
3
|
+
"agent": "Claude journey judge (Opus)",
|
|
4
|
+
"name": "Independent journey judge"
|
|
5
|
+
},
|
|
6
|
+
"authors": [
|
|
7
|
+
"yueranyuan",
|
|
8
|
+
"Aaron (A-001)",
|
|
9
|
+
"Claude Opus 5.5",
|
|
10
|
+
"Codex"
|
|
11
|
+
],
|
|
12
|
+
"sha256": "0eac01045d8500b03363a11644b863adf041b345d6f3edf1e11bd8a3944d80e3",
|
|
13
|
+
"judgedAt": "2026-10-15",
|
|
14
|
+
"plausible": true,
|
|
15
|
+
"rulings": [
|
|
16
|
+
{
|
|
17
|
+
"id": "refusals-without-cause",
|
|
18
|
+
"steps": [
|
|
19
|
+
"act 2",
|
|
20
|
+
"act 5",
|
|
21
|
+
"act 6",
|
|
22
|
+
"act 7"
|
|
23
|
+
],
|
|
24
|
+
"barItem": "a refusal without a cause the story shows, or the same cause drawn twice; a run of refusals",
|
|
25
|
+
"reason": "Act 2 refuses 'a key never issued by this World', act 5 refuses 'a URL without a published blob', act 6 refuses text= given twice and act 7 keeps 'an unpublished CSS representation' as a refused gap, but no actor in the story sends any of these: the pinned helper always sends the World's issued key (demand.json, fetchGoogleFonts.ts:62) and downloads only URLs Google's CSS returned, Dub sends no text= and Rallly sends one (https://developers.google.com/fonts/docs/css2: \"the 'text=' parameter can only be specified once\", so nobody here sends two). Together with act 6's other refusals they make a closing run of refusals.",
|
|
26
|
+
"correction": "Remove these four refusals from acts 2, 5, 6 and 7; keep a refusal only where an actor in the story has a reason to send that request."
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": "refusals-google-answers",
|
|
30
|
+
"steps": [
|
|
31
|
+
"act 6"
|
|
32
|
+
],
|
|
33
|
+
"barItem": "vendor behaviour the vendor's documentation contradicts",
|
|
34
|
+
"reason": "Act 6 says a browser asking CSS2 and Rallly's CJK text subset 'are refused'. Google documents text= for exactly this case: \"This feature also works for international fonts, allowing you to specify UTF-8 characters\" (https://developers.google.com/fonts/docs/css2, https://developers.google.com/fonts/docs/getting_started). It also documents the stylesheet link as something placed in an HTML document for the browser to fetch (getting_started: 'add a special stylesheet link to your HTML document'). Google answers both requests with a stylesheet, and Rallly, named in the outline's title, is left with no successful call.",
|
|
35
|
+
"correction": "In act 6, have Rallly's Noto Sans SC wght@700 text= request answered with Google's retained CSS2 response and its truetype file (published in act 1), or take Rallly out of the title and story. Drop the browser refusal."
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"id": "read-backs-without-need",
|
|
39
|
+
"steps": [
|
|
40
|
+
"act 2",
|
|
41
|
+
"act 6"
|
|
42
|
+
],
|
|
43
|
+
"barItem": "a read-back with no need: a list or get of what the story already holds, unless someone who does not hold it reads it",
|
|
44
|
+
"reason": "In act 2 the World asks for the key it was just issued again in the same sitting, before any resume. In act 6 the same CSS2 stylesheet is read a second time under a second server agent ('the same for node and undici'), but Dub is the only CSS2 caller and already holds it. That the two agents get the same answer is evidence for vendor/inter.json, not an act of anyone in the story.",
|
|
45
|
+
"correction": "Move the repeated key read into act 7's resume, where a re-booted World genuinely asks again, and drop the undici comparison from act 6."
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
"applied": {
|
|
49
|
+
"from": "7aa0eb6d1749ce9a2a716d778332a6a61257c666bcb5c50a4c89ecd333182ec4",
|
|
50
|
+
"wasPlausible": false,
|
|
51
|
+
"steps": [
|
|
52
|
+
"act 2",
|
|
53
|
+
"act 5",
|
|
54
|
+
"act 6",
|
|
55
|
+
"act 7"
|
|
56
|
+
],
|
|
57
|
+
"rulings": [
|
|
58
|
+
{
|
|
59
|
+
"steps": [
|
|
60
|
+
"act 2",
|
|
61
|
+
"act 5",
|
|
62
|
+
"act 6",
|
|
63
|
+
"act 7"
|
|
64
|
+
],
|
|
65
|
+
"why": "Remove these four refusals from acts 2, 5, 6 and 7; keep a refusal only where an actor in the story has a reason to send that request."
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"steps": [
|
|
69
|
+
"act 6"
|
|
70
|
+
],
|
|
71
|
+
"why": "In act 6, have Rallly's Noto Sans SC wght@700 text= request answered with Google's retained CSS2 response and its truetype file (published in act 1), or take Rallly out of the title and story. Drop the browser refusal."
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"steps": [
|
|
75
|
+
"act 2",
|
|
76
|
+
"act 6"
|
|
77
|
+
],
|
|
78
|
+
"why": "Move the repeated key read into act 7's resume, where a re-booted World genuinely asks again, and drop the undici comparison from act 6."
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
{
|
|
2
|
+
"judge": {
|
|
3
|
+
"agent": "Claude journey judge (Opus)",
|
|
4
|
+
"name": "Independent journey judge"
|
|
5
|
+
},
|
|
6
|
+
"authors": [
|
|
7
|
+
"yueranyuan",
|
|
8
|
+
"Aaron (A-001)",
|
|
9
|
+
"Claude Opus 5.5",
|
|
10
|
+
"Codex"
|
|
11
|
+
],
|
|
12
|
+
"sha256": "972a67216217fd8b66ec8e08aea3ae853be3ed61f79bf5774811cbcead2e56b9",
|
|
13
|
+
"judgedAt": "2026-10-15",
|
|
14
|
+
"plausible": true,
|
|
15
|
+
"rulings": [
|
|
16
|
+
{
|
|
17
|
+
"id": "resume-never-performed",
|
|
18
|
+
"steps": [
|
|
19
|
+
2,
|
|
20
|
+
"act 7"
|
|
21
|
+
],
|
|
22
|
+
"barItem": "a stated cause that never happens, and a promise never kept",
|
|
23
|
+
"reason": "Step 2 is named 'A repeat boot reads the same key', but the life has no repeat boot: it runs without a break from step 0 to step 24. The outline's act 7 ('Resume and read the same catalog/key/bytes without reseeding') is never performed by any step; the life ends on refusals.",
|
|
24
|
+
"correction": "Move step 2 after step 24, behind a wait (for example `1d`) and the World's resume. Follow it with the restarted helper's startup catalog fetch (www.googleapis.com/webfonts/v1/webfonts?sort=popularity&key={key}) and one download of a stored font URL, with no reseed. Alternatively, delete step 2 and act 7."
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"id": "key-refusals-without-cause",
|
|
28
|
+
"steps": [
|
|
29
|
+
3,
|
|
30
|
+
4
|
|
31
|
+
],
|
|
32
|
+
"barItem": "a refusal without a cause the story shows, or the same cause drawn twice; a run of refusals",
|
|
33
|
+
"reason": "Step 3 (no key, 403) and step 4 (key=not-issued, 400) are two refusals in a row that no actor causes. The developer API page requires the key on every request (https://developers.google.com/fonts/docs/developer_api: 'including an API key with each request'), and the pinned helper always sends the World's issued key (demand.json, fetchGoogleFonts.ts:62). Nobody in the story sends a request without one or with a foreign key.",
|
|
34
|
+
"correction": "Remove steps 3 and 4."
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"id": "discovery-read-back",
|
|
38
|
+
"steps": [
|
|
39
|
+
6
|
|
40
|
+
],
|
|
41
|
+
"barItem": "a read-back with no need: a list or get of what the story already holds, unless someone who does not hold it reads it",
|
|
42
|
+
"reason": "Step 6 reads the same catalog again through the Discovery base webfonts.googleapis.com/v1/webfonts directly after step 5 returned it. No application in demand.json calls that host, and the reader already holds the catalog; the step only shows that a second door exists.",
|
|
43
|
+
"correction": "Remove step 6."
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"id": "second-agent-read-back",
|
|
47
|
+
"steps": [
|
|
48
|
+
19
|
|
49
|
+
],
|
|
50
|
+
"barItem": "a read-back with no need: a list or get of what the story already holds, unless someone who does not hold it reads it",
|
|
51
|
+
"reason": "Step 19 repeats step 17's CSS2 request for Inter wght@600 under User-Agent 'undici'. Dub's Open Graph route is the only CSS2 caller and already holds that stylesheet from step 17. No actor in the story sends 'undici'; that the two agents get the same answer is recorded in vendor/inter.json, not an act of the story.",
|
|
52
|
+
"correction": "Remove step 19."
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"id": "browser-refused",
|
|
56
|
+
"steps": [
|
|
57
|
+
20
|
|
58
|
+
],
|
|
59
|
+
"barItem": "vendor behaviour the vendor's documentation contradicts",
|
|
60
|
+
"reason": "Step 20 expects 400 when Chrome requests css2?family=Inter:wght@600. Google documents the CSS API as a stylesheet link 'add[ed] to your HTML document' that the browser fetches (https://developers.google.com/fonts/docs/getting_started; https://developers.google.com/fonts/docs/css2 uses the same link form), and Google answers a browser with a stylesheet. No browser acts anywhere in this story, so the refusal also has no cause.",
|
|
61
|
+
"correction": "Remove step 20."
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"id": "rallly-text-subset-refused",
|
|
65
|
+
"steps": [
|
|
66
|
+
21
|
|
67
|
+
],
|
|
68
|
+
"barItem": "vendor behaviour the vendor's documentation contradicts",
|
|
69
|
+
"reason": "Step 21 expects 400 for Rallly's demanded request css2?family=Noto+Sans+SC:wght@700&text=%E6%8A%95%E7%A5%A8 (demand.json, opengraph-image.tsx:26-27). Google documents that text= \"also works for international fonts, allowing you to specify UTF-8 characters\" (https://developers.google.com/fonts/docs/css2; https://developers.google.com/fonts/docs/getting_started), so Google answers this request with a truetype stylesheet. The life's title and outline name Rallly as a customer, yet Rallly's only call is refused.",
|
|
70
|
+
"correction": "Publish Google's retained CSS2 answer for this query and its truetype file in step 0. Then have step 21 expect 200 with that CSS, followed by Rallly downloading the returned URL. Alternatively, remove Rallly from the life and its outline."
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"id": "closing-refusal-run",
|
|
74
|
+
"steps": [
|
|
75
|
+
22,
|
|
76
|
+
23,
|
|
77
|
+
24
|
|
78
|
+
],
|
|
79
|
+
"barItem": "a refusal without a cause the story shows, or the same cause drawn twice; a run of refusals",
|
|
80
|
+
"reason": "Steps 20 to 24 end the life with five refusals in a row. No actor causes the last three. Step 22 sends text= twice; css2 says \"the 'text=' parameter can only be specified once\" (https://developers.google.com/fonts/docs/css2), but Dub sends no text= and Rallly sends one. Step 23 fetches a gstatic path that no returned CSS named. Step 24 asks /css for an unknown family with no User-Agent, and its name ('Unsupported CSS representation') does not describe that content.",
|
|
81
|
+
"correction": "Remove steps 22, 23 and 24."
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
"applied": {
|
|
85
|
+
"from": "dce73bf66e60fd8002ddad46300d59d0872d4db74aed76d1317ad2fe5392ef9b",
|
|
86
|
+
"wasPlausible": false,
|
|
87
|
+
"steps": [
|
|
88
|
+
"19",
|
|
89
|
+
"2",
|
|
90
|
+
"20",
|
|
91
|
+
"21",
|
|
92
|
+
"22",
|
|
93
|
+
"23",
|
|
94
|
+
"24",
|
|
95
|
+
"3",
|
|
96
|
+
"4",
|
|
97
|
+
"6",
|
|
98
|
+
"act 7"
|
|
99
|
+
],
|
|
100
|
+
"rulings": [
|
|
101
|
+
{
|
|
102
|
+
"steps": [
|
|
103
|
+
2,
|
|
104
|
+
"act 7"
|
|
105
|
+
],
|
|
106
|
+
"why": "Move step 2 after step 24, behind a wait (for example `1d`) and the World's resume. Follow it with the restarted helper's startup catalog fetch (www.googleapis.com/webfonts/v1/webfonts?sort=popularity&key={key}) and one download of a stored font URL, with no reseed. Alternatively, delete step 2 and act 7."
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"steps": [
|
|
110
|
+
3,
|
|
111
|
+
4
|
|
112
|
+
],
|
|
113
|
+
"why": "Remove steps 3 and 4."
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"steps": [
|
|
117
|
+
6
|
|
118
|
+
],
|
|
119
|
+
"why": "Remove step 6."
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"steps": [
|
|
123
|
+
19
|
|
124
|
+
],
|
|
125
|
+
"why": "Remove step 19."
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"steps": [
|
|
129
|
+
20
|
|
130
|
+
],
|
|
131
|
+
"why": "Remove step 20."
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"steps": [
|
|
135
|
+
21
|
|
136
|
+
],
|
|
137
|
+
"why": "Publish Google's retained CSS2 answer for this query and its truetype file in step 0. Then have step 21 expect 200 with that CSS, followed by Rallly downloading the returned URL. Alternatively, remove Rallly from the life and its outline."
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"steps": [
|
|
141
|
+
22,
|
|
142
|
+
23,
|
|
143
|
+
24
|
|
144
|
+
],
|
|
145
|
+
"why": "Remove steps 22, 23 and 24."
|
|
146
|
+
}
|
|
147
|
+
]
|
|
148
|
+
}
|
|
149
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"about": "Source-bound decisions before handler implementation; each lane shares one googlefonts store. Qualification remains separate.",
|
|
3
|
+
"decisions": [
|
|
4
|
+
{
|
|
5
|
+
"operation": "webfonts.webfonts.list",
|
|
6
|
+
"lane": "api",
|
|
7
|
+
"mechanism": "handler",
|
|
8
|
+
"demand": "Pinned production startup",
|
|
9
|
+
"why": "Read unchanged vendor font items in the stored catalog order; alpha/date/style sorting and family/subset/category filtering consume the Developer API fields. first-use axios catalog call asserts the list and derives all later selections from its returned item. Never return a full-live-catalog claim."
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"operation": "getStylesheet",
|
|
13
|
+
"lane": "css",
|
|
14
|
+
"mechanism": "handler",
|
|
15
|
+
"demand": "All five pinned config.ts UAs",
|
|
16
|
+
"why": "Use exact published CSS per request/UA, with the real font-family/style/weight/src consumed by fetchCSS; first-use downloads every returned src. Unsupported representations answer a refusal."
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"operation": "getStylesheet2",
|
|
20
|
+
"lane": "css",
|
|
21
|
+
"mechanism": "handler",
|
|
22
|
+
"demand": "Dub's Inter weights and Rallly's CJK text subsets, both from a server",
|
|
23
|
+
"why": "Use the exact published CSS per ordered CSS2 query and User-Agent; a non-browser agent without its own representation reads the one published for no agent, as Google answered the same CSS to none, node and undici. Unpublished families, text subsets and browser representations answer a refusal; text= and display= given twice, or another parameter, are a bad request."
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"operation": "getFontFile",
|
|
27
|
+
"lane": "assets",
|
|
28
|
+
"mechanism": "handler",
|
|
29
|
+
"demand": "Archive stream for returned /s URL",
|
|
30
|
+
"why": "Resolve the actual vendor URL to its resource blob and preserve Content-Type/bytes; no conversion or placeholder font."
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"operation": "getLegacyFontFile",
|
|
34
|
+
"lane": "assets",
|
|
35
|
+
"mechanism": "handler",
|
|
36
|
+
"demand": "EOT/SVG src uses /l/font query URL",
|
|
37
|
+
"why": "Same blob mechanism; preserve kit/skey/v and ignore the SVG fragment as HTTP does."
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"operation": "door:appCredentials",
|
|
41
|
+
"lane": "api",
|
|
42
|
+
"mechanism": "door",
|
|
43
|
+
"demand": "World boot credential fill",
|
|
44
|
+
"why": "Google key issuance is outside the Fonts read-only API. ctx.secret supplies the opaque per-World key; only its hash is recorded. Repeated boot retains that key."
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"operation": "door:publishCatalog",
|
|
48
|
+
"lane": "api",
|
|
49
|
+
"mechanism": "door",
|
|
50
|
+
"demand": "Vendor-side prerequisite for a reference-data World",
|
|
51
|
+
"why": "There is no Developer API create-font endpoint. Validate a complete vendor-shaped catalog/CSS/blob publication before recording it; the default seed and first-use supply retained genuine bytes. This is an explicit publisher door, not a handler pretending a vendor mutation."
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"measured": "2026-10-12: source-only read of every non-test server TS file at ff245dc87cfcbaeacd4120cf1b4a7443b59db42f, image 77e89ea9. No application or vendor-key request was executed. The normal start fetches the Developer API catalog; font detail/download reaches CSS for all five configured UAs and downloads its returned URLs. GOOGLE_FONTS_USE_TEST_JSON is excluded, and is not set. 2026-10-15: source-only read of Dub 7e01013 and Rallly 3e63239 Open Graph routes; Google's CSS2 answers retained with no User-Agent, node and undici (vendor/inter.json).",
|
|
3
|
+
"applications": [
|
|
4
|
+
{
|
|
5
|
+
"name": "majodev/google-webfonts-helper",
|
|
6
|
+
"commit": "ff245dc87cfcbaeacd4120cf1b4a7443b59db42f",
|
|
7
|
+
"client": "axios 1.20.0, unchanged production server",
|
|
8
|
+
"backend": [
|
|
9
|
+
{
|
|
10
|
+
"call": "GET www.googleapis.com/webfonts/v1/webfonts?sort=popularity&key=<issued key>",
|
|
11
|
+
"operation": "webfonts.webfonts.list",
|
|
12
|
+
"evidence": "server/logic/fetchGoogleFonts.ts:62"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"call": "GET fonts.googleapis.com/css?family=<family>:<variant>&subset=<subsets>, User-Agent from config.ts",
|
|
16
|
+
"operation": "getStylesheet",
|
|
17
|
+
"evidence": "server/logic/fetchCSS.ts:19"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"call": "GET fonts.gstatic.com/s/... bytes returned in the CSS",
|
|
21
|
+
"operation": "getFontFile",
|
|
22
|
+
"evidence": "server/logic/fetchFontSubsetArchive.ts:104"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"call": "GET fonts.gstatic.com/l/font?kit=...&skey=...&v=... for EOT/SVG representations",
|
|
26
|
+
"operation": "getLegacyFontFile",
|
|
27
|
+
"evidence": "server/logic/fetchFontURLs.ts:61; vendor/inputs.json retained Google EOT/SVG CSS"
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "dubinc/dub",
|
|
33
|
+
"commit": "7e01013",
|
|
34
|
+
"client": "Next.js server fetch, no browser User-Agent",
|
|
35
|
+
"backend": [
|
|
36
|
+
{
|
|
37
|
+
"call": "GET fonts.googleapis.com/css2?family=Inter:wght@<500|600|700>",
|
|
38
|
+
"operation": "getStylesheet2",
|
|
39
|
+
"evidence": "apps/web/app/api/og/load-google-font.ts:2-3; callers apps/web/app/api/og/program/route.tsx:29, analytics/route.tsx:18, partner-earnings/route.tsx:27, program/categories/route.tsx:34, partner-rewind/route.tsx:29"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"call": "GET fonts.gstatic.com/s/... truetype URL returned in the CSS",
|
|
43
|
+
"operation": "getFontFile",
|
|
44
|
+
"evidence": "apps/web/app/api/og/load-google-font.ts:9"
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "lukevella/rallly",
|
|
50
|
+
"commit": "3e63239",
|
|
51
|
+
"client": "Next.js server fetch, no browser User-Agent",
|
|
52
|
+
"backend": [
|
|
53
|
+
{
|
|
54
|
+
"call": "GET fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@<400|700>&text=<rendered CJK text>",
|
|
55
|
+
"operation": "getStylesheet2",
|
|
56
|
+
"evidence": "apps/landing/src/app/[locale]/opengraph-image.tsx:26-27 (CJK locales only)"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"call": "GET fonts.gstatic.com truetype URL returned in the CSS",
|
|
60
|
+
"operation": "getFontFile",
|
|
61
|
+
"evidence": "apps/landing/src/app/[locale]/opengraph-image.tsx:38"
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
"notDemanded": "OAuth, font submission/publishing UI, effects and advanced catalog capabilities are outside these client paths."
|
|
67
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"source": "majodev/google-webfonts-helper ff245dc87cfcbaeacd4120cf1b4a7443b59db42f package.json axios1.20.0 and server/logic/fetchGoogleFonts.ts, fetchCSS.ts, fetchFontSubsetArchive.ts; Google Developer API guide",
|
|
4
|
+
"about": "The default seed publishes the attributed vendor snapshot through its publisher door. The customer reads the issued key and authenticates with the real axios client, consuming metadata/CSS/src bytes. Retention re-reads without writes. This entry is not run during source construction.",
|
|
5
|
+
"files": {
|
|
6
|
+
"package.json": "{\"type\": \"module\", \"dependencies\": {\"axios\": \"1.20.0\"}}\n",
|
|
7
|
+
".env.example": "GOOGLE_FONTS_API_KEY=\n",
|
|
8
|
+
"app.mjs": "import axios from 'axios';\nimport assert from 'node:assert/strict';\nconst key = process.env.GOOGLE_FONTS_API_KEY;\nassert.ok(key, 'World-issued GOOGLE_FONTS_API_KEY is required');\nconst res = await axios.get(`https://www.googleapis.com/webfonts/v1/webfonts?sort=popularity&key=${key}`, { responseType: 'json', maxRedirects: 0 });\nassert.equal(res.data.kind, 'webfonts#webfontList');\nconst item = res.data.items.find(f => f.family === 'Antic');\nassert.ok(item); assert.ok(item.variants.includes('regular')); assert.ok(item.subsets.includes('latin'));\nconst agents = {\"0\": \"Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0)\", \"1\": \"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0\", \"2\": \"Mozilla/5.0 (Windows NT 6.3; rv:39.0) Gecko/20100101 Firefox/39.0\", \"3\": \"Mozilla/4.0 (iPad; CPU OS 4_0_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/4.1 Mobile/9A405 Safari/7534.48.3\", \"4\": \"Mozilla/5.0 (Unknown; Linux x86_64) AppleWebKit/538.1 (KHTML, like Gecko) Safari/538.1 Daum/4.1\"};\nfor (const agent of Object.values(agents)) {\n const css = await axios.get('http://fonts.googleapis.com/css?family='+encodeURIComponent(item.family+':regular')+'&subset=latin', { responseType: 'text', maxRedirects: 0, headers: { Accept: 'text/css,*/*;q=0.1', 'User-Agent': agent } });\n assert.match(css.data, /@font-face/);\n const url = css.data.match(/url\\((https?:\\/\\/[^)]+)\\)/)?.[1]; assert.ok(url);\n const file = await axios.get(url.replace('http://','https://'), { responseType: 'arraybuffer', maxRedirects: 0 });\n assert.ok(file.data.length > 0); assert.ok(file.headers['content-type']);\n}\nconsole.log('Read retained Google Fonts catalog, CSS and bytes through unchanged axios calls');\n"
|
|
9
|
+
},
|
|
10
|
+
"run": [
|
|
11
|
+
"node",
|
|
12
|
+
"app.mjs"
|
|
13
|
+
],
|
|
14
|
+
"retention": {
|
|
15
|
+
"readback": [
|
|
16
|
+
"node",
|
|
17
|
+
"app.mjs"
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
}
|
package/dist/src/cli.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// world-googlefonts: serve the googlefonts twin.
|
|
3
|
+
import { hasFlag, optionValue } from '@volter/world-core/args';
|
|
4
|
+
import { keepProcessAlive } from '@volter/world-core/lifecycle';
|
|
5
|
+
import { createGooglefontsTwinServer } from "./server.js";
|
|
6
|
+
const [cmd, ...rest] = process.argv.slice(2);
|
|
7
|
+
const port = Number(optionValue(rest, '--port', '0')) || undefined;
|
|
8
|
+
const root = optionValue(rest, '--root') || undefined;
|
|
9
|
+
const readOnly = hasFlag(rest, '--read-only');
|
|
10
|
+
// the selected twin's private Postgres, which the runtime binds a pack declaring managedDatabase to
|
|
11
|
+
const database = optionValue(rest, '--database') || undefined;
|
|
12
|
+
// the World's scenario file, for a model vendor's turns
|
|
13
|
+
const scenarioPath = optionValue(rest, '--scenario') || undefined;
|
|
14
|
+
if (cmd === 'serve' || cmd === undefined) {
|
|
15
|
+
const s = await createGooglefontsTwinServer({ readOnly, ...(root ? { root } : {}), ...(port ? { port } : {}), ...(database ? { database } : {}), ...(scenarioPath ? { scenarioPath } : {}) });
|
|
16
|
+
process.stdout.write(`googlefonts twin${readOnly ? ' [read-only]' : ''} at http://127.0.0.1:${s.port}\n`);
|
|
17
|
+
await keepProcessAlive();
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
process.stdout.write('Usage: world-googlefonts serve [--port N] [--root DIR] [--read-only] [--database URL] [--scenario FILE]\n');
|
|
21
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// GENERATED by scripts/create-pack.ts (--init, --index): a fixed file. The kernel serves the vendor's discovery door and
|
|
2
|
+
// sends each request to the lane its manifest's routes name (architecture, "Other wires: lanes").
|
|
3
|
+
import { createVendorFetch } from '@volter/world-core';
|
|
4
|
+
import { manifest } from "./manifest.js";
|
|
5
|
+
import { createApiLaneFetch, manifest as api_manifest } from "../api/src/index.js";
|
|
6
|
+
import { createAssetsLaneFetch, manifest as assets_manifest } from "../assets/src/index.js";
|
|
7
|
+
import { createCssLaneFetch, manifest as css_manifest } from "../css/src/index.js";
|
|
8
|
+
export function createGooglefontsFetch(options = {}) {
|
|
9
|
+
return createVendorFetch(manifest, { "api": { fetch: createApiLaneFetch(options), manifest: api_manifest }, "assets": { fetch: createAssetsLaneFetch(options), manifest: assets_manifest }, "css": { fetch: createCssLaneFetch(options), manifest: css_manifest } });
|
|
10
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// @volter/twin-googlefonts — the googlefonts twin (Protocol 3). A fixed file (create-pack): the descriptor is the manifest's, and the
|
|
2
|
+
// kernel derives the vendor-backed half from the generated surface, unless the manifest declares none (vendorBacked.none;
|
|
3
|
+
// architecture, "The real-system adapters").
|
|
4
|
+
import { packOf, registerPack } from '@volter/world-core';
|
|
5
|
+
import { manifest } from "./manifest.js";
|
|
6
|
+
import { manifest as apiManifest } from "../api/src/manifest.js";
|
|
7
|
+
import apiSurface from '../api/src/generated/surface.gen.json' with { type: 'json' };
|
|
8
|
+
import { manifest as assetsManifest } from "../assets/src/manifest.js";
|
|
9
|
+
import assetsSurface from '../assets/src/generated/surface.gen.json' with { type: 'json' };
|
|
10
|
+
import { manifest as cssManifest } from "../css/src/manifest.js";
|
|
11
|
+
import cssSurface from '../css/src/generated/surface.gen.json' with { type: 'json' };
|
|
12
|
+
export { createGooglefontsFetch } from "./fetch.js";
|
|
13
|
+
export { createGooglefontsTwinServer } from "./server.js";
|
|
14
|
+
export { manifest };
|
|
15
|
+
export const pack = registerPack(packOf(manifest, { "api": { manifest: apiManifest, surface: apiSurface }, "assets": { manifest: assetsManifest, surface: assetsSurface }, "css": { manifest: cssManifest, surface: cssSurface } }));
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export const manifest = {
|
|
2
|
+
vendor: 'googlefonts',
|
|
3
|
+
discovery: { twinOf: 'Google Fonts Developer API, the CSS and CSS2 APIs and the font URLs they return',
|
|
4
|
+
stores: 'published vendor-shaped font items, exact browser CSS, font blobs and World-issued key hashes' },
|
|
5
|
+
lanes: { routes: [
|
|
6
|
+
{ lane: 'css', host: '^fonts[.]googleapis[.]com$' },
|
|
7
|
+
{ lane: 'assets', host: '^fonts[.]gstatic[.]com$' },
|
|
8
|
+
{ lane: 'api', host: '^(www|webfonts)[.]googleapis[.]com$' },
|
|
9
|
+
], default: 'api' },
|
|
10
|
+
descriptor: {
|
|
11
|
+
protocol: '3', transport: 'rest', archetype: 'crud', bin: 'world-googlefonts',
|
|
12
|
+
resources: ['webfont', '_api_key', '_font_catalog', '_stylesheet', '_font_file'],
|
|
13
|
+
specSource: 'api/spec/SOURCE.md: unchanged Google Discovery; css/spec/SOURCE.md and assets/spec/SOURCE.md: Google documentation and retained font responses',
|
|
14
|
+
description: 'Google Fonts catalog, exact published CSS representations and genuine font bytes; a World-issued query API key. Seed data is the attributed Antic reference catalog and the CSS2 weights 500-700 of Inter, not the complete live Google catalog.',
|
|
15
|
+
adoption: { sdks: [], envStems: ['GOOGLE_FONTS'] },
|
|
16
|
+
hosts: [
|
|
17
|
+
{ host: 'www.googleapis.com', pathPattern: '^/webfonts/v1/webfonts$' },
|
|
18
|
+
{ host: 'webfonts.googleapis.com', pathPattern: '^/v1/webfonts$' },
|
|
19
|
+
{ host: 'fonts.googleapis.com', pathPattern: '^/css2?$' },
|
|
20
|
+
{ host: 'fonts.gstatic.com', pathPattern: '^/(s/|l/font$)' },
|
|
21
|
+
],
|
|
22
|
+
credentialDoor: { path: '/_twin/app-credentials', body: {}, account: { field: 'account', tenancy: 'Google Cloud project', source: 'https://developers.google.com/fonts/docs/developer_api' }, deployment: { field: 'deployment', object: 'Project API key', source: 'https://cloud.google.com/docs/authentication/api-keys' }, fill: { GOOGLE_FONTS_API_KEY: 'api_key' } },
|
|
23
|
+
endpointEnvNone: 'Pinned helper hardcodes the vendor API and CSS hosts, then downloads their returned gstatic URLs. Scoped host routing preserves these URLs.',
|
|
24
|
+
},
|
|
25
|
+
};
|