@extenshi/mcp 0.18.1 → 0.20.0

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.
@@ -0,0 +1,349 @@
1
+ /**
2
+ * Pin guide captions — the step titles, bodies and alt text of the "find the
3
+ * extension and pin it" sequence, in every language our end-user pages ship in.
4
+ *
5
+ * SELF-CONTAINED ON PURPOSE — no imports, so it can be copied verbatim into the
6
+ * published `@extenshi/mcp` and `@extenshi/cli` packages, which cannot depend on
7
+ * unpublished workspace packages (same constraint as welcome-agent-brief.ts).
8
+ *
9
+ * SINGLE SOURCE, THREE COPIES. The three pin-guide files (pin-guide.ts,
10
+ * pin-guide-strings.ts, pin-guide-kit.ts) live canonically in shared-types and
11
+ * are copied into tools/extenshi-mcp/src and tools/extenshi-cli/src with their
12
+ * `shared-types/` import specifiers rewritten to `./` — otherwise identical.
13
+ * After editing any of them, run from the repo root:
14
+ * for f in pin-guide pin-guide-strings pin-guide-kit; do for d in tools/extenshi-mcp/src tools/extenshi-cli/src; do
15
+ * sed "s#from 'shared-types\/#from './#" shared-types/$f.ts > $d/$f.ts
16
+ * done; done
17
+ * Sync tests in both packages fail CI on drift.
18
+ *
19
+ * The English text is the text the hosted welcome pages have always rendered,
20
+ * byte for byte — `buildPinGuideBlocks` without a locale must not change.
21
+ *
22
+ * Naming the browser's own controls is the part that has to be right: a guide
23
+ * that tells the user to click a menu item their browser does not have is
24
+ * worse than no guide. So a control is quoted only where we hold the browser's
25
+ * actual string for that language:
26
+ * - Firefox "Pin to Toolbar" — from Mozilla's localization repository
27
+ * (mozilla-l10n/firefox-l10n, browser/browser/unifiedExtensions.ftl,
28
+ * `unified-extensions-context-menu-pin-to-toolbar`, checked 2026-11-04).
29
+ * - Edge "Show in toolbar" — Edge is closed source, so outside English the
30
+ * eye is described by what it does, never quoted.
31
+ * - Chrome — the control is a pushpin glyph with no visible label.
32
+ */
33
+ /** Same list as END_USER_LOCALES (shared-types/end-user-locale.ts), pinned by a test. */
34
+ export const PIN_GUIDE_LOCALES = [
35
+ 'en',
36
+ 'es',
37
+ 'pt-BR',
38
+ 'fr',
39
+ 'de',
40
+ 'it',
41
+ 'ru',
42
+ 'ja',
43
+ 'ko',
44
+ 'zh-CN',
45
+ 'ar',
46
+ ];
47
+ const EN_MISS = 'This is the step most people miss — opening the menu is not the same as pinning.';
48
+ export const PIN_GUIDE_STRINGS = {
49
+ en: {
50
+ step1Title: 'Click the puzzle icon in the {browser} toolbar',
51
+ step1Body: '{browser} hides newly installed extensions behind it.',
52
+ step1Alt: 'The {browser} toolbar with the puzzle icon highlighted in the top right',
53
+ step2Title: 'Find {name} in the list',
54
+ step2Alt: 'The open extensions menu with {name} highlighted',
55
+ step3Title: {
56
+ chrome: 'Click the pin icon next to it',
57
+ edge: 'Click the eye icon next to it',
58
+ firefox: 'Open the ⋯ menu next to it and choose “Pin to Toolbar”',
59
+ },
60
+ step3Body: {
61
+ chrome: EN_MISS,
62
+ edge: `Edge calls it “Show in toolbar”. ${EN_MISS}`,
63
+ firefox: EN_MISS,
64
+ },
65
+ step3Alt: {
66
+ chrome: 'Close-up of the {name} row in the extensions menu, with the pin toggle highlighted',
67
+ edge: 'Close-up of the {name} row in the extensions menu, with the “Show in toolbar” eye toggle highlighted',
68
+ firefox: 'Close-up of the {name} row in the extensions menu, with the ⋯ overflow button highlighted',
69
+ },
70
+ step4Title: 'Done — the icon now sits in your toolbar',
71
+ step4Body: 'Click it any time to open the extension.',
72
+ step4Alt: 'The {browser} toolbar with the {name} icon pinned next to the address bar',
73
+ },
74
+ es: {
75
+ step1Title: 'Haz clic en el icono de la pieza de puzle en la barra de herramientas de {browser}',
76
+ step1Body: '{browser} oculta ahí las extensiones recién instaladas.',
77
+ step1Alt: 'La barra de herramientas de {browser} con el icono de la pieza de puzle resaltado arriba a la derecha',
78
+ step2Title: 'Busca {name} en la lista',
79
+ step2Alt: 'El menú de extensiones abierto con la fila de {name} resaltada',
80
+ step3Title: {
81
+ chrome: 'Haz clic en el icono de la chincheta que está al lado',
82
+ edge: 'Haz clic en el icono del ojo que está al lado',
83
+ firefox: 'Abre el menú ⋯ que está al lado y elige «Fijar a la barra de herramientas»',
84
+ },
85
+ step3Body: {
86
+ chrome: 'Es el paso que casi todo el mundo se salta: abrir el menú no es lo mismo que fijar la extensión.',
87
+ edge: 'Así Edge la muestra en la barra de herramientas. Es el paso que casi todo el mundo se salta: abrir el menú no es lo mismo que fijar la extensión.',
88
+ firefox: 'Es el paso que casi todo el mundo se salta: abrir el menú no es lo mismo que fijar la extensión.',
89
+ },
90
+ step3Alt: {
91
+ chrome: 'Vista ampliada de la fila de {name} en el menú de extensiones, con el botón de fijar resaltado',
92
+ edge: 'Vista ampliada de la fila de {name} en el menú de extensiones, con el icono del ojo resaltado',
93
+ firefox: 'Vista ampliada de la fila de {name} en el menú de extensiones, con el botón ⋯ resaltado',
94
+ },
95
+ step4Title: 'Listo: el icono ya está en tu barra de herramientas',
96
+ step4Body: 'Haz clic en él cuando quieras para abrir la extensión.',
97
+ step4Alt: 'La barra de herramientas de {browser} con el icono de {name} fijado junto a la barra de direcciones',
98
+ },
99
+ 'pt-BR': {
100
+ step1Title: 'Clique no ícone de quebra-cabeça na barra de ferramentas do {browser}',
101
+ step1Body: 'O {browser} esconde ali as extensões recém-instaladas.',
102
+ step1Alt: 'A barra de ferramentas do {browser} com o ícone de quebra-cabeça destacado no canto superior direito',
103
+ step2Title: 'Encontre {name} na lista',
104
+ step2Alt: 'O menu de extensões aberto com a linha de {name} destacada',
105
+ step3Title: {
106
+ chrome: 'Clique no ícone de alfinete ao lado',
107
+ edge: 'Clique no ícone de olho ao lado',
108
+ firefox: 'Abra o menu ⋯ ao lado e escolha “Fixar na barra de ferramentas”',
109
+ },
110
+ step3Body: {
111
+ chrome: 'É a etapa que quase todo mundo pula: abrir o menu não é o mesmo que fixar a extensão.',
112
+ edge: 'É assim que o Edge mostra a extensão na barra de ferramentas. É a etapa que quase todo mundo pula: abrir o menu não é o mesmo que fixar a extensão.',
113
+ firefox: 'É a etapa que quase todo mundo pula: abrir o menu não é o mesmo que fixar a extensão.',
114
+ },
115
+ step3Alt: {
116
+ chrome: 'Detalhe da linha de {name} no menu de extensões, com o botão de fixar destacado',
117
+ edge: 'Detalhe da linha de {name} no menu de extensões, com o ícone de olho destacado',
118
+ firefox: 'Detalhe da linha de {name} no menu de extensões, com o botão ⋯ destacado',
119
+ },
120
+ step4Title: 'Pronto: o ícone agora fica na sua barra de ferramentas',
121
+ step4Body: 'Clique nele a qualquer momento para abrir a extensão.',
122
+ step4Alt: 'A barra de ferramentas do {browser} com o ícone de {name} fixado ao lado da barra de endereços',
123
+ },
124
+ fr: {
125
+ step1Title: 'Cliquez sur l’icône en forme de pièce de puzzle dans la barre d’outils de {browser}',
126
+ step1Body: '{browser} y range les extensions qui viennent d’être installées.',
127
+ step1Alt: 'La barre d’outils de {browser} avec l’icône de puzzle mise en évidence en haut à droite',
128
+ step2Title: 'Trouvez {name} dans la liste',
129
+ step2Alt: 'Le menu des extensions ouvert, avec la ligne de {name} mise en évidence',
130
+ step3Title: {
131
+ chrome: 'Cliquez sur l’icône en forme d’épingle à côté',
132
+ edge: 'Cliquez sur l’icône en forme d’œil à côté',
133
+ firefox: 'Ouvrez le menu ⋯ à côté et choisissez « Épingler à la barre d’outils »',
134
+ },
135
+ step3Body: {
136
+ chrome: 'C’est l’étape que presque tout le monde oublie : ouvrir le menu ne suffit pas à épingler l’extension.',
137
+ edge: 'C’est ainsi qu’Edge affiche l’extension dans la barre d’outils. C’est l’étape que presque tout le monde oublie : ouvrir le menu ne suffit pas à épingler l’extension.',
138
+ firefox: 'C’est l’étape que presque tout le monde oublie : ouvrir le menu ne suffit pas à épingler l’extension.',
139
+ },
140
+ step3Alt: {
141
+ chrome: 'Gros plan sur la ligne de {name} dans le menu des extensions, avec le bouton d’épingle mis en évidence',
142
+ edge: 'Gros plan sur la ligne de {name} dans le menu des extensions, avec l’icône en forme d’œil mise en évidence',
143
+ firefox: 'Gros plan sur la ligne de {name} dans le menu des extensions, avec le bouton ⋯ mis en évidence',
144
+ },
145
+ step4Title: 'C’est fait : l’icône est maintenant dans votre barre d’outils',
146
+ step4Body: 'Cliquez dessus à tout moment pour ouvrir l’extension.',
147
+ step4Alt: 'La barre d’outils de {browser} avec l’icône de {name} épinglée à côté de la barre d’adresse',
148
+ },
149
+ de: {
150
+ step1Title: 'Klicken Sie in der {browser}-Symbolleiste auf das Puzzle-Symbol',
151
+ step1Body: '{browser} legt neu installierte Erweiterungen dort ab.',
152
+ step1Alt: 'Die {browser}-Symbolleiste, oben rechts ist das Puzzle-Symbol hervorgehoben',
153
+ step2Title: 'Suchen Sie {name} in der Liste',
154
+ step2Alt: 'Das geöffnete Erweiterungsmenü, die Zeile von {name} ist hervorgehoben',
155
+ step3Title: {
156
+ chrome: 'Klicken Sie daneben auf das Pin-Symbol',
157
+ edge: 'Klicken Sie daneben auf das Augen-Symbol',
158
+ firefox: 'Öffnen Sie daneben das Menü ⋯ und wählen Sie „An Symbolleiste anheften“',
159
+ },
160
+ step3Body: {
161
+ chrome: 'Diesen Schritt übersehen die meisten: Das Menü zu öffnen heißt noch nicht, die Erweiterung anzuheften.',
162
+ edge: 'So zeigt Edge die Erweiterung in der Symbolleiste an. Diesen Schritt übersehen die meisten: Das Menü zu öffnen heißt noch nicht, die Erweiterung anzuheften.',
163
+ firefox: 'Diesen Schritt übersehen die meisten: Das Menü zu öffnen heißt noch nicht, die Erweiterung anzuheften.',
164
+ },
165
+ step3Alt: {
166
+ chrome: 'Nahansicht der Zeile von {name} im Erweiterungsmenü, der Pin-Schalter ist hervorgehoben',
167
+ edge: 'Nahansicht der Zeile von {name} im Erweiterungsmenü, das Augen-Symbol ist hervorgehoben',
168
+ firefox: 'Nahansicht der Zeile von {name} im Erweiterungsmenü, die Schaltfläche ⋯ ist hervorgehoben',
169
+ },
170
+ step4Title: 'Fertig – das Symbol ist jetzt in Ihrer Symbolleiste',
171
+ step4Body: 'Klicken Sie jederzeit darauf, um die Erweiterung zu öffnen.',
172
+ step4Alt: 'Die {browser}-Symbolleiste mit dem angehefteten Symbol von {name} neben der Adressleiste',
173
+ },
174
+ it: {
175
+ step1Title: 'Fai clic sull’icona del puzzle nella barra degli strumenti di {browser}',
176
+ step1Body: '{browser} nasconde lì le estensioni appena installate.',
177
+ step1Alt: 'La barra degli strumenti di {browser} con l’icona del puzzle evidenziata in alto a destra',
178
+ step2Title: 'Trova {name} nell’elenco',
179
+ step2Alt: 'Il menu delle estensioni aperto con la riga di {name} evidenziata',
180
+ step3Title: {
181
+ chrome: 'Fai clic sull’icona della puntina accanto',
182
+ edge: 'Fai clic sull’icona dell’occhio accanto',
183
+ firefox: 'Apri il menu ⋯ accanto e scegli «Aggiungi alla barra degli strumenti»',
184
+ },
185
+ step3Body: {
186
+ chrome: 'È il passaggio che quasi tutti saltano: aprire il menu non significa fissare l’estensione.',
187
+ edge: 'Così Edge mostra l’estensione nella barra degli strumenti. È il passaggio che quasi tutti saltano: aprire il menu non significa fissare l’estensione.',
188
+ firefox: 'È il passaggio che quasi tutti saltano: aprire il menu non significa fissare l’estensione.',
189
+ },
190
+ step3Alt: {
191
+ chrome: 'Primo piano della riga di {name} nel menu delle estensioni, con il pulsante della puntina evidenziato',
192
+ edge: 'Primo piano della riga di {name} nel menu delle estensioni, con l’icona dell’occhio evidenziata',
193
+ firefox: 'Primo piano della riga di {name} nel menu delle estensioni, con il pulsante ⋯ evidenziato',
194
+ },
195
+ step4Title: 'Fatto: ora l’icona è nella barra degli strumenti',
196
+ step4Body: 'Fai clic quando vuoi per aprire l’estensione.',
197
+ step4Alt: 'La barra degli strumenti di {browser} con l’icona di {name} fissata accanto alla barra degli indirizzi',
198
+ },
199
+ ru: {
200
+ step1Title: 'Нажмите на значок пазла на панели инструментов {browser}',
201
+ step1Body: '{browser} прячет туда только что установленные расширения.',
202
+ step1Alt: 'Панель инструментов {browser}, справа вверху выделен значок пазла',
203
+ step2Title: 'Найдите {name} в списке',
204
+ step2Alt: 'Открытое меню расширений, выделена строка {name}',
205
+ step3Title: {
206
+ chrome: 'Нажмите на значок булавки рядом',
207
+ edge: 'Нажмите на значок глаза рядом',
208
+ firefox: 'Откройте меню ⋯ рядом и выберите «Закрепить на панели инструментов»',
209
+ },
210
+ step3Body: {
211
+ chrome: 'Этот шаг пропускают чаще всего: открыть меню — ещё не значит закрепить расширение.',
212
+ edge: 'Так Edge показывает расширение на панели инструментов. Этот шаг пропускают чаще всего: открыть меню — ещё не значит закрепить расширение.',
213
+ firefox: 'Этот шаг пропускают чаще всего: открыть меню — ещё не значит закрепить расширение.',
214
+ },
215
+ step3Alt: {
216
+ chrome: 'Крупный план строки {name} в меню расширений, выделена кнопка закрепления',
217
+ edge: 'Крупный план строки {name} в меню расширений, выделен значок глаза',
218
+ firefox: 'Крупный план строки {name} в меню расширений, выделена кнопка ⋯',
219
+ },
220
+ step4Title: 'Готово — значок теперь на панели инструментов',
221
+ step4Body: 'Нажимайте на него, когда нужно открыть расширение.',
222
+ step4Alt: 'Панель инструментов {browser}, значок {name} закреплён рядом с адресной строкой',
223
+ },
224
+ ja: {
225
+ step1Title: '{browser} のツールバーにあるパズルのアイコンをクリックします',
226
+ step1Body: '{browser} では、インストールしたばかりの拡張機能はここにまとめられます。',
227
+ step1Alt: '{browser} のツールバー。右上のパズルのアイコンが強調表示されています',
228
+ step2Title: '一覧から {name} を探します',
229
+ step2Alt: '開いた拡張機能メニュー。{name} の行が強調表示されています',
230
+ step3Title: {
231
+ chrome: '横にあるピンのアイコンをクリックします',
232
+ edge: '横にある目のアイコンをクリックします',
233
+ firefox: '横にある ⋯ メニューを開き、「ツールバーにピン留め」を選びます',
234
+ },
235
+ step3Body: {
236
+ chrome: '多くの人が見落とす手順です。メニューを開いただけではピン留めされません。',
237
+ edge: 'これで Edge のツールバーに拡張機能が表示されます。多くの人が見落とす手順です。メニューを開いただけではピン留めされません。',
238
+ firefox: '多くの人が見落とす手順です。メニューを開いただけではピン留めされません。',
239
+ },
240
+ step3Alt: {
241
+ chrome: '拡張機能メニューの {name} の行の拡大図。ピンのボタンが強調表示されています',
242
+ edge: '拡張機能メニューの {name} の行の拡大図。目のアイコンが強調表示されています',
243
+ firefox: '拡張機能メニューの {name} の行の拡大図。⋯ ボタンが強調表示されています',
244
+ },
245
+ step4Title: '完了です。アイコンがツールバーに表示されました',
246
+ step4Body: 'いつでもクリックして拡張機能を開けます。',
247
+ step4Alt: '{browser} のツールバー。{name} のアイコンがアドレスバーの横にピン留めされています',
248
+ },
249
+ ko: {
250
+ step1Title: '{browser} 도구 모음에서 퍼즐 아이콘을 클릭하세요',
251
+ step1Body: '새로 설치한 확장 프로그램은 {browser}에서 이 아이콘 안에 숨겨집니다.',
252
+ step1Alt: '{browser} 도구 모음, 오른쪽 위의 퍼즐 아이콘이 강조 표시됨',
253
+ step2Title: '목록에서 {name} 항목을 찾으세요',
254
+ step2Alt: '열린 확장 프로그램 메뉴, {name} 행이 강조 표시됨',
255
+ step3Title: {
256
+ chrome: '옆에 있는 핀 아이콘을 클릭하세요',
257
+ edge: '옆에 있는 눈 아이콘을 클릭하세요',
258
+ firefox: '옆에 있는 ⋯ 메뉴를 열고 “도구 모음에 고정”을 선택하세요',
259
+ },
260
+ step3Body: {
261
+ chrome: '가장 많이 놓치는 단계입니다. 메뉴를 여는 것만으로는 고정되지 않습니다.',
262
+ edge: '이렇게 하면 Edge 도구 모음에 확장 프로그램이 표시됩니다. 가장 많이 놓치는 단계입니다. 메뉴를 여는 것만으로는 고정되지 않습니다.',
263
+ firefox: '가장 많이 놓치는 단계입니다. 메뉴를 여는 것만으로는 고정되지 않습니다.',
264
+ },
265
+ step3Alt: {
266
+ chrome: '확장 프로그램 메뉴의 {name} 행 확대 화면, 고정 버튼이 강조 표시됨',
267
+ edge: '확장 프로그램 메뉴의 {name} 행 확대 화면, 눈 아이콘이 강조 표시됨',
268
+ firefox: '확장 프로그램 메뉴의 {name} 행 확대 화면, ⋯ 버튼이 강조 표시됨',
269
+ },
270
+ step4Title: '완료되었습니다. 이제 아이콘이 도구 모음에 표시됩니다',
271
+ step4Body: '언제든지 아이콘을 클릭해 확장 프로그램을 여세요.',
272
+ step4Alt: '{browser} 도구 모음, 주소 표시줄 옆에 {name} 아이콘이 고정됨',
273
+ },
274
+ 'zh-CN': {
275
+ step1Title: '点击 {browser} 工具栏中的拼图图标',
276
+ step1Body: '{browser} 会把新安装的扩展程序收在这里。',
277
+ step1Alt: '{browser} 工具栏,右上角的拼图图标已突出显示',
278
+ step2Title: '在列表中找到 {name}',
279
+ step2Alt: '已打开的扩展程序菜单,{name} 所在行已突出显示',
280
+ step3Title: {
281
+ chrome: '点击旁边的图钉图标',
282
+ edge: '点击旁边的眼睛图标',
283
+ firefox: '打开旁边的 ⋯ 菜单,选择“固定到工具栏”',
284
+ },
285
+ step3Body: {
286
+ chrome: '这是最容易漏掉的一步:打开菜单并不等于固定扩展程序。',
287
+ edge: '这样 Edge 就会在工具栏中显示该扩展程序。这是最容易漏掉的一步:打开菜单并不等于固定扩展程序。',
288
+ firefox: '这是最容易漏掉的一步:打开菜单并不等于固定扩展程序。',
289
+ },
290
+ step3Alt: {
291
+ chrome: '扩展程序菜单中 {name} 所在行的特写,图钉按钮已突出显示',
292
+ edge: '扩展程序菜单中 {name} 所在行的特写,眼睛图标已突出显示',
293
+ firefox: '扩展程序菜单中 {name} 所在行的特写,⋯ 按钮已突出显示',
294
+ },
295
+ step4Title: '完成,图标现在固定在工具栏中',
296
+ step4Body: '随时点击它即可打开扩展程序。',
297
+ step4Alt: '{browser} 工具栏,{name} 的图标已固定在地址栏旁边',
298
+ },
299
+ // "تثبيت" means both "install" and "pin" in Arabic browser UIs, so the copy
300
+ // says "new extensions" for installs and anchors every pin to the toolbar.
301
+ ar: {
302
+ step1Title: 'انقر على أيقونة قطعة الأحجية في شريط أدوات {browser}',
303
+ step1Body: 'يُخفي {browser} الإضافات الجديدة خلفها.',
304
+ step1Alt: 'شريط أدوات {browser} مع إبراز أيقونة قطعة الأحجية في أعلى النافذة',
305
+ step2Title: 'ابحث عن {name} في القائمة',
306
+ step2Alt: 'قائمة الإضافات مفتوحة مع إبراز صف {name}',
307
+ step3Title: {
308
+ chrome: 'انقر على أيقونة الدبوس بجانبها',
309
+ edge: 'انقر على أيقونة العين بجانبها',
310
+ firefox: 'افتح قائمة ⋯ بجانبها واختر «ثبّته في شريط الأدوات»',
311
+ },
312
+ step3Body: {
313
+ chrome: 'هذه هي الخطوة التي يفوّتها معظم الناس: فتح القائمة لا يعني تثبيت الإضافة في شريط الأدوات.',
314
+ edge: 'بهذه الطريقة يعرض Edge الإضافة في شريط الأدوات. هذه هي الخطوة التي يفوّتها معظم الناس: فتح القائمة لا يعني تثبيت الإضافة في شريط الأدوات.',
315
+ firefox: 'هذه هي الخطوة التي يفوّتها معظم الناس: فتح القائمة لا يعني تثبيت الإضافة في شريط الأدوات.',
316
+ },
317
+ step3Alt: {
318
+ chrome: 'لقطة مقرّبة لصف {name} في قائمة الإضافات مع إبراز زر الدبوس',
319
+ edge: 'لقطة مقرّبة لصف {name} في قائمة الإضافات مع إبراز أيقونة العين',
320
+ firefox: 'لقطة مقرّبة لصف {name} في قائمة الإضافات مع إبراز زر ⋯',
321
+ },
322
+ step4Title: 'تمّ — أصبحت الأيقونة الآن في شريط الأدوات',
323
+ step4Body: 'انقر عليها في أي وقت لفتح الإضافة.',
324
+ step4Alt: 'شريط أدوات {browser} وأيقونة {name} مثبّتة بجانب شريط العنوان',
325
+ },
326
+ };
327
+ /** Resolve a BCP 47 tag (`pt_BR`, `zh-cn`, `fr-CA`) to a supported locale, else English. */
328
+ export function pinGuideLocale(tag) {
329
+ const t = (tag ?? '').trim().replaceAll('_', '-').toLowerCase();
330
+ const exact = PIN_GUIDE_LOCALES.find((l) => l.toLowerCase() === t);
331
+ if (exact)
332
+ return exact;
333
+ const [base, ...rest] = t.split('-');
334
+ if (base === 'pt')
335
+ return 'pt-BR';
336
+ // Simplified script only: a Traditional-script reader is better served by
337
+ // English than by characters they were not taught.
338
+ if (base === 'zh')
339
+ return rest.some((p) => ['hant', 'tw', 'hk', 'mo'].includes(p)) ? 'en' : 'zh-CN';
340
+ return PIN_GUIDE_LOCALES.find((l) => l === base) ?? 'en';
341
+ }
342
+ /**
343
+ * Fill `{name}` and `{browser}` in one pass, so a name that itself contains
344
+ * `{browser}` is printed literally rather than substituted twice.
345
+ */
346
+ export function pinGuideText(template, vars) {
347
+ return template.replace(/\{(name|browser)\}/g, (_, key) => vars[key]);
348
+ }
349
+ //# sourceMappingURL=pin-guide-strings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pin-guide-strings.js","sourceRoot":"","sources":["../src/pin-guide-strings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,yFAAyF;AACzF,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAChC,IAAI;IACJ,IAAI;IACJ,OAAO;IACP,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,OAAO;IACP,IAAI;CACK,CAAA;AAwBV,MAAM,OAAO,GAAG,kFAAkF,CAAA;AAElG,MAAM,CAAC,MAAM,iBAAiB,GAA4C;IACzE,EAAE,EAAE;QACH,UAAU,EAAE,gDAAgD;QAC5D,SAAS,EAAE,uDAAuD;QAClE,QAAQ,EAAE,yEAAyE;QACnF,UAAU,EAAE,yBAAyB;QACrC,QAAQ,EAAE,kDAAkD;QAC5D,UAAU,EAAE;YACX,MAAM,EAAE,+BAA+B;YACvC,IAAI,EAAE,+BAA+B;YACrC,OAAO,EAAE,wDAAwD;SACjE;QACD,SAAS,EAAE;YACV,MAAM,EAAE,OAAO;YACf,IAAI,EAAE,oCAAoC,OAAO,EAAE;YACnD,OAAO,EAAE,OAAO;SAChB;QACD,QAAQ,EAAE;YACT,MAAM,EAAE,oFAAoF;YAC5F,IAAI,EAAE,sGAAsG;YAC5G,OAAO,EAAE,2FAA2F;SACpG;Q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E,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAA;IACnG,OAAO,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,IAAI,IAAI,CAAA;AACzD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,QAAgB,EAAE,IAAuC;IACrF,OAAO,QAAQ,CAAC,OAAO,CAAC,qBAAqB,EAAE,CAAC,CAAC,EAAE,GAAuB,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAA;AAC1F,CAAC"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Static content for the free `generate_pin_guide` MCP tool.
3
+ *
4
+ * Like `generate_icon_workflow`, this spends ZERO Extenshi credits and touches
5
+ * no Extenshi infrastructure: the kit is a pure function of its arguments
6
+ * (./pin-guide-kit.ts, a synced copy of the shared-types generator the
7
+ * Dojo pin-guide tool and the hosted welcome pages use), so it works offline
8
+ * and on the remote connector alike.
9
+ *
10
+ * Size (directory policy 5B): a full kit for three browsers and eleven
11
+ * languages is ~80 KB, far past a proportionate default. So the default
12
+ * response is an overview — what the kit contains, how big each part is, how
13
+ * it is wired — and each part (`html`, `messages`, `script`, `css`) comes back
14
+ * only when asked for, narrowed by `browsers` / `locales`. The CLI writes the
15
+ * whole kit to disk in one go.
16
+ */
17
+ import { type PinGuideKitTheme } from './pin-guide-kit.js';
18
+ export declare const PIN_GUIDE_PARTS: readonly ["overview", "html", "messages", "script", "css"];
19
+ export type PinGuidePart = (typeof PIN_GUIDE_PARTS)[number];
20
+ export interface PinGuideToolArgs {
21
+ extensionName?: string;
22
+ browsers?: string[];
23
+ locales?: string[];
24
+ theme?: PinGuideKitTheme;
25
+ iconHref?: string;
26
+ accentColor?: string;
27
+ keyPrefix?: string;
28
+ part?: PinGuidePart;
29
+ }
30
+ /** Throws PinGuideKitError (an authored, user-facing message) on unusable input. */
31
+ export declare function renderPinGuide(args: PinGuideToolArgs): string;
32
+ //# sourceMappingURL=pin-guide-tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pin-guide-tool.d.ts","sourceRoot":"","sources":["../src/pin-guide-tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAIN,KAAK,gBAAgB,EACrB,MAAM,oBAAoB,CAAA;AAE3B,eAAO,MAAM,eAAe,4DAA6D,CAAA;AACzF,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAA;AAE3D,MAAM,WAAW,gBAAgB;IAChC,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAClB,KAAK,CAAC,EAAE,gBAAgB,CAAA;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,YAAY,CAAA;CACnB;AA6BD,oFAAoF;AACpF,wBAAgB,cAAc,CAAC,IAAI,EAAE,gBAAgB,GAAG,MAAM,CAuB7D"}
@@ -0,0 +1,132 @@
1
+ /**
2
+ * Static content for the free `generate_pin_guide` MCP tool.
3
+ *
4
+ * Like `generate_icon_workflow`, this spends ZERO Extenshi credits and touches
5
+ * no Extenshi infrastructure: the kit is a pure function of its arguments
6
+ * (./pin-guide-kit.ts, a synced copy of the shared-types generator the
7
+ * Dojo pin-guide tool and the hosted welcome pages use), so it works offline
8
+ * and on the remote connector alike.
9
+ *
10
+ * Size (directory policy 5B): a full kit for three browsers and eleven
11
+ * languages is ~80 KB, far past a proportionate default. So the default
12
+ * response is an overview — what the kit contains, how big each part is, how
13
+ * it is wired — and each part (`html`, `messages`, `script`, `css`) comes back
14
+ * only when asked for, narrowed by `browsers` / `locales`. The CLI writes the
15
+ * whole kit to disk in one go.
16
+ */
17
+ import { buildPinGuideKit, chromeLocaleDir, } from './pin-guide-kit.js';
18
+ export const PIN_GUIDE_PARTS = ['overview', 'html', 'messages', 'script', 'css'];
19
+ function kb(s) {
20
+ const k = Buffer.byteLength(s, 'utf8') / 1024;
21
+ return k < 1 ? '<1 KB' : `${Math.round(k)} KB`;
22
+ }
23
+ function messagesJson(kit) {
24
+ const byFolder = {};
25
+ for (const l of kit.locales)
26
+ byFolder[chromeLocaleDir(l)] = kit.messages[l];
27
+ return JSON.stringify(byFolder, null, 2);
28
+ }
29
+ function shellQuote(s) {
30
+ return `'${s.replaceAll("'", "'\\''")}'`;
31
+ }
32
+ function cliCommand(args, kit) {
33
+ const parts = ['npx @extenshi/cli pin-guide', `--name ${shellQuote(kit.extensionName)}`];
34
+ if (args.browsers?.length)
35
+ parts.push(`--browsers ${kit.browsers.join(',')}`);
36
+ if (args.locales?.length)
37
+ parts.push(`--locales ${kit.locales.join(',')}`);
38
+ if (args.theme)
39
+ parts.push(`--theme ${args.theme}`);
40
+ if (args.accentColor)
41
+ parts.push(`--accent ${shellQuote(args.accentColor)}`);
42
+ if (args.keyPrefix)
43
+ parts.push(`--key-prefix ${args.keyPrefix}`);
44
+ parts.push(args.iconHref ? `--icon-href ${shellQuote(args.iconHref)}` : '--icon <icon.png>');
45
+ parts.push('--out welcome/pin-guide');
46
+ return parts.join(' ');
47
+ }
48
+ /** Throws PinGuideKitError (an authored, user-facing message) on unusable input. */
49
+ export function renderPinGuide(args) {
50
+ const kit = buildPinGuideKit({
51
+ extensionName: args.extensionName ?? '',
52
+ browsers: args.browsers,
53
+ locales: args.locales,
54
+ theme: args.theme,
55
+ iconHref: args.iconHref,
56
+ accentColor: args.accentColor,
57
+ keyPrefix: args.keyPrefix,
58
+ });
59
+ switch (args.part ?? 'overview') {
60
+ case 'html':
61
+ return kit.html;
62
+ case 'messages':
63
+ return messagesJson(kit);
64
+ case 'script':
65
+ return kit.script;
66
+ case 'css':
67
+ return kit.css;
68
+ default:
69
+ return renderOverview(args, kit);
70
+ }
71
+ }
72
+ function renderOverview(args, kit) {
73
+ const browserNames = kit.browsers.map((b) => b.charAt(0).toUpperCase() + b.slice(1)).join(', ');
74
+ const prefix = args.keyPrefix?.trim() || 'pinGuide';
75
+ const perLanguage = Object.keys(kit.messages.en ?? {}).length;
76
+ const icon = args.iconHref?.trim()
77
+ ? `\`${args.iconHref.trim().slice(0, 80)}${args.iconHref.trim().length > 80 ? '…' : ''}\``
78
+ : 'none (a neutral tile is drawn in its place)';
79
+ return [
80
+ `# Pin guide kit for "${kit.extensionName}"`,
81
+ '',
82
+ `Browsers: ${browserNames}. Languages: ${kit.locales.join(', ')}. Theme: ${kit.theme}. Icon: ${icon}.`,
83
+ '',
84
+ 'Four illustrated steps per browser: open the puzzle (extensions) menu, find the extension,',
85
+ 'pin it (a pushpin in Chrome, an eye in Edge, ⋯ → "Pin to Toolbar" in Firefox), see the icon',
86
+ 'in the toolbar. The icon and the numbered markers are drawn inside each SVG, so the pictures',
87
+ 'need no overlay renderer, no network access and no inline script — they suit a welcome page',
88
+ 'bundled in the extension package and running under its CSP. Firefox captions quote the',
89
+ "menu label from Firefox's own translations.",
90
+ '',
91
+ '## Parts (`part` argument)',
92
+ '',
93
+ '| part | content | size |',
94
+ '|---|---|---|',
95
+ `| \`html\` | One \`<section data-pin-guide-browser>\` per browser with inline SVGs and English captions marked \`data-i18n\`. No scripts, event handlers or inline styles. The first browser is visible, the rest carry \`hidden\`. | ${kb(kit.html)} |`,
96
+ `| \`messages\` | \`chrome.i18n\` entries per language, keyed by \`_locales\` folder (\`pt_BR\`, \`zh_CN\`), ready to merge into \`_locales/<folder>/messages.json\`. | ${kb(messagesJson(kit))} |`,
97
+ `| \`script\` | ES module for a separate file next to the page (the extension CSP forbids inline scripts). | ${kb(kit.script)} |`,
98
+ `| \`css\` | Layout${kit.theme === 'auto' ? ', plus the light/dark switch' : ''}. | ${kb(kit.css)} |`,
99
+ '',
100
+ 'Narrowing `browsers` or `locales` shrinks `html` and `messages` proportionally.',
101
+ '',
102
+ '## Message names',
103
+ '',
104
+ `\`${prefix}<Browser><step><Title|Body|Alt>\`, e.g. \`${prefix}Chrome1Title\`; step 2 has no Body.`,
105
+ `${perLanguage} names per language for this selection. \`$\` in the extension name is written \`$$\`,`,
106
+ 'as `chrome.i18n` requires.',
107
+ '',
108
+ '## Wiring in an extension page',
109
+ '',
110
+ '1. The `html` goes where the pin step sits on the welcome page; `css` loads with `<link>`,',
111
+ ' `script` with `<script type="module">`.',
112
+ '2. `showPinGuide()` unhides the section for the current browser (Firefox via',
113
+ ' `runtime.getBrowserInfo`, Edge via `navigator.userAgentData.brands`, otherwise Chrome).',
114
+ ' `applyPinGuideMessages()` swaps the English captions for `chrome.i18n` messages.',
115
+ '3. `isPinnedToToolbar()` reads `action.getUserSettings().isOnToolbar` (Chrome and Edge 91+,',
116
+ ' Firefox 116+) and returns `null` where the browser cannot tell — the guide then stays',
117
+ ' visible. `onPinnedChange(callback)` re-checks on `action.onUserSettingsChanged` (Chrome',
118
+ ' 130+, Firefox 142+), on `focus` and on `visibilitychange`, so the step can collapse to a',
119
+ ' "pinned" confirmation.',
120
+ '',
121
+ '## The same kit as files',
122
+ '',
123
+ '```bash',
124
+ cliCommand(args, kit),
125
+ '```',
126
+ '',
127
+ 'writes `pin-guide.html`, `pin-guide.css`, `pin-guide.js`, `svg/<browser>-<n>.svg` (standalone',
128
+ 'pictures for `<img>`), `messages/<folder>.json` and `pin-guide.json`. `--icon <file>` embeds',
129
+ 'the icon as a data URI; `--icon-href` references the copy already in the package.',
130
+ ].join('\n');
131
+ }
132
+ //# sourceMappingURL=pin-guide-tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pin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