@pantoken/scaffold 1.2.1 → 1.3.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.
package/dist/cli.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as resolveScaffoldPlatform, c as ThemeVariant, i as isScaffoldPlatform, n as ScaffoldPackageManager, o as scaffoldProject, s as ThemeMode, t as SCAFFOLD_PLATFORMS } from "./index-BloHpRKt.mjs";
1
+ import { a as resolveScaffoldPlatform, d as ThemeMode, f as ThemeVariant, i as isScaffoldPlatform, l as installAgentAssets, n as ScaffoldPackageManager, o as scaffoldProject, t as SCAFFOLD_PLATFORMS } from "./index-rJolJRZa.mjs";
2
2
  import { Command } from "commander";
3
3
  //#region src/locale.d.ts
4
4
  /** Every locale tag pantoken supports, as `--lang` accepts them. */
@@ -87,6 +87,19 @@ export interface ResolveScaffoldTargetOptions {
87
87
  isTTY?: boolean;
88
88
  t: LocaleLookup["t"];
89
89
  }
90
+ /**
91
+ * Resolves whether to install AI agent assets alongside the scaffold: `--no-ai` always wins
92
+ * (returns false); otherwise defaults to `true`, prompting via clack `confirm()` on a TTY (not
93
+ * --yes) to let the user opt out interactively.
94
+ *
95
+ * @throws ScaffoldCliError when the prompt is cancelled
96
+ */
97
+ export declare function resolveAiAssets(opts: {
98
+ yes?: boolean;
99
+ isTTY: boolean;
100
+ noAi?: boolean;
101
+ t: LocaleLookup["t"];
102
+ }): Promise<boolean>;
90
103
  /**
91
104
  * Resolves platform + directory: prompts via clack select()/text() when omitted on a TTY
92
105
  * (not --yes); throws ScaffoldCliError with a clear, localized message when a required
@@ -140,6 +153,10 @@ export declare function detectPackageManager(env?: NodeJS.ProcessEnv, execPath?:
140
153
  export declare function buildCreateUsageCommand(pm?: PackageManager): string;
141
154
  /**
142
155
  * Runs the detected package manager's install command in `dir`, wrapped in a clack spinner.
156
+ * Runs via async `spawn` (not `execFileSync`) so the spinner can actually animate while installing
157
+ * — a synchronous child process blocks the event loop and freezes the spinner's frames, making the
158
+ * CLI look hung even though it's working. Output is still suppressed (`stdio: "ignore"`); only the
159
+ * spinner's own text animates, updated periodically with the elapsed time.
143
160
  * Failures are reported but non-fatal — the project is still usable, just not installed — so the
144
161
  * caller decides how `printNextSteps` should reflect the outcome via the returned boolean.
145
162
  *
@@ -148,7 +165,7 @@ export declare function buildCreateUsageCommand(pm?: PackageManager): string;
148
165
  * @param t - Localized string lookup
149
166
  * @returns Whether the install command exited successfully
150
167
  */
151
- export declare function installWithSpinner(dir: string, pm: PackageManager | undefined, t: LocaleLookup["t"]): boolean;
168
+ export declare function installWithSpinner(dir: string, pm: PackageManager | undefined, t: LocaleLookup["t"]): Promise<boolean>;
152
169
  /**
153
170
  * Prints the post-scaffold "Next steps" block (plus any template-authored notes/caveats).
154
171
  *
@@ -209,4 +226,4 @@ export declare function runScaffoldCli(argv: string[], options: {
209
226
  version?: string;
210
227
  }): Promise<void>;
211
228
  //#endregion
212
- export { type LocaleLookup, SCAFFOLD_PLATFORMS, isScaffoldPlatform, resolveScaffoldPlatform, scaffoldProject };
229
+ export { type LocaleLookup, SCAFFOLD_PLATFORMS, installAgentAssets, isScaffoldPlatform, resolveScaffoldPlatform, scaffoldProject };
package/dist/cli.mjs CHANGED
@@ -1,17 +1,18 @@
1
- import { c as SUPPORTED_LOCALES, d as validateLocaleTag, i as scaffoldProject, l as createLocaleLookup, n as isScaffoldPlatform, o as validateThemeMode, r as resolveScaffoldPlatform, s as validateThemeVariant, t as SCAFFOLD_PLATFORMS, u as detectLocale } from "./src-BTDVd_Xe.mjs";
1
+ import { d as SUPPORTED_LOCALES, f as createLocaleLookup, i as scaffoldProject, l as validateThemeMode, m as validateLocaleTag, n as isScaffoldPlatform, o as installAgentAssets, p as detectLocale, r as resolveScaffoldPlatform, t as SCAFFOLD_PLATFORMS, u as validateThemeVariant } from "./src-diIfZCKN.mjs";
2
2
  import { readFileSync } from "node:fs";
3
3
  import { basename, join } from "node:path";
4
4
  import { Argument, Command, CommanderError, InvalidArgumentError } from "commander";
5
- import { cancel, isCancel, select, spinner, text } from "@clack/prompts";
5
+ import { cancel, confirm, isCancel, select, spinner, text } from "@clack/prompts";
6
6
  import tab from "@bomb.sh/tab/commander";
7
7
  import { homedir } from "node:os";
8
- import { execFileSync } from "node:child_process";
8
+ import { spawn } from "node:child_process";
9
9
  //#endregion
10
10
  //#region generated/locales/index.ts
11
11
  const MESSAGES = {
12
12
  "ar": {
13
13
  "promptPlatform": "اختر منصة للإنشاء:",
14
14
  "promptDir": "الدليل الهدف:",
15
+ "promptAiAssets": "إضافة أصول وكيل الذكاء الاصطناعي (AGENTS.md، قواعد المحرر/Copilot)؟",
15
16
  "spinnerStart": "جارٍ الإنشاء...",
16
17
  "spinnerStop": "اكتمل الإنشاء.",
17
18
  "wroteFile": "✓ {{path}}",
@@ -30,6 +31,7 @@ const MESSAGES = {
30
31
  "helpPlatformDescription": "المنصة التي سيتم إنشاؤها ({{platforms}}؛ \"html\" مرادف لـ \"components\"، \"theme-editor\" مرادف لـ \"canvas-theme-editor\")",
31
32
  "helpDirDescription": "الدليل الهدف (يُطلب تفاعليًا في TTY إذا تُرك فارغًا)",
32
33
  "helpYesDescription": "عدم المطالبة إطلاقًا؛ عرض خطأ بدل المطالبة عند فقدان المنصة/الدليل",
34
+ "helpNoAiDescription": "تخطي تثبيت أصول وكيل الذكاء الاصطناعي بعد الإنشاء",
33
35
  "helpLangDescription": "تجاوز لغة العرض المكتشفة تلقائيًا (مثال: \"hu\")",
34
36
  "canvas-theme-editor.nextSteps.0": "cd {{dir}}",
35
37
  "canvas-theme-editor.nextSteps.1": "{{install}}",
@@ -70,6 +72,7 @@ const MESSAGES = {
70
72
  "hy": {
71
73
  "promptPlatform": "Ընտրեք պատշաճ պլատֆորմը՝ սկաֆոլդինգի համար:",
72
74
  "promptDir": "Նշանակված թղթապանակը:",
75
+ "promptAiAssets": "Ավելացնե՞լ AI գործակալների ռեսուրսները (AGENTS.md, editor/Copilot rules)?",
73
76
  "spinnerStart": "Սկսվում է սկաֆոլդինգը...",
74
77
  "spinnerStop": "Սկաֆոլդինգը ավարտվեց.",
75
78
  "wroteFile": "✓ {{path}}",
@@ -88,6 +91,7 @@ const MESSAGES = {
88
91
  "helpPlatformDescription": "Սկաֆոլդեցվող պլատֆորմը ({{platforms}}; \"html\"-ը հոմանիշ է \"components\"-ին, \"theme-editor\"-ը հոմանիշ է \"canvas-theme-editor\"-ին)",
89
92
  "helpDirDescription": "Նշված թղթապանակը (TTY-ի դեպքում եթե չի տրվել՝ հարցում կլինի ինտերակտիվ կերպով)",
90
93
  "helpYesDescription": "Չորեքչայլ հարցում; սխալ վերադարձնել՝ հանելով մեկին պակասող platform/dir-ի դեպքում",
94
+ "helpNoAiDescription": "Բաց թողնել AI գործակալների ռեսուրսների տեղադրումը scaffolding-ից հետո",
91
95
  "helpLangDescription": "Գոյացնող լեզուն ցասքել (օր., \"hu\")",
92
96
  "canvas-theme-editor.nextSteps.0": "cd {{dir}}",
93
97
  "canvas-theme-editor.nextSteps.1": "{{install}}",
@@ -128,6 +132,7 @@ const MESSAGES = {
128
132
  "ca": {
129
133
  "promptPlatform": "Selecciona una plataforma per fer scaffold:",
130
134
  "promptDir": "Directori de destinació:",
135
+ "promptAiAssets": "Afegir actius d'agents d'IA (AGENTS.md, regles de l'editor/Copilot)?",
131
136
  "spinnerStart": "Creant l'esquelet...",
132
137
  "spinnerStop": "Esquelet creat.",
133
138
  "wroteFile": "✓ {{path}}",
@@ -146,6 +151,7 @@ const MESSAGES = {
146
151
  "helpPlatformDescription": "Plataforma per fer scaffold ({{platforms}}; \"html\" és un àlies de \"components\", \"theme-editor\" és un àlies de \"canvas-theme-editor\")",
147
152
  "helpDirDescription": "Directori de destinació (demana interactivament en una TTY si s'omet)",
148
153
  "helpYesDescription": "No demanar mai; en cas de falta de platform/directori, mostrar error en lloc de demanar",
154
+ "helpNoAiDescription": "Ometre la instal·lació d'actius d'agents d'IA després de l'estructuració",
149
155
  "helpLangDescription": "Anul·la l'idioma de visualització autodetectat (p. ex. \"hu\")",
150
156
  "canvas-theme-editor.nextSteps.0": "cd {{dir}}",
151
157
  "canvas-theme-editor.nextSteps.1": "{{install}}",
@@ -186,6 +192,7 @@ const MESSAGES = {
186
192
  "da": {
187
193
  "promptPlatform": "Vælg en platform til scaffolding:",
188
194
  "promptDir": "Målmappe:",
195
+ "promptAiAssets": "Tilføj AI-agent-aktiver (AGENTS.md, editor/Copilot-regler)?",
189
196
  "spinnerStart": "Scaffolding...",
190
197
  "spinnerStop": "Færdig med scaffolding.",
191
198
  "wroteFile": "✓ {{path}}",
@@ -204,6 +211,7 @@ const MESSAGES = {
204
211
  "helpPlatformDescription": "Platform til scaffolding ({{platforms}}; \"html\" er et alias for \"components\", \"theme-editor\" er et alias for \"canvas-theme-editor\")",
205
212
  "helpDirDescription": "Målmappe (spørger interaktivt i en TTY, hvis udeladt)",
206
213
  "helpYesDescription": "Spørg aldrig; fejl i stedet for at spørge om manglende platform/mappe",
214
+ "helpNoAiDescription": "Spring installation af AI-agent-aktiver over efter scaffolding",
207
215
  "helpLangDescription": "Overskriv den autodetekterede visningssprog (f.eks. \"hu\")",
208
216
  "canvas-theme-editor.nextSteps.0": "cd {{dir}}",
209
217
  "canvas-theme-editor.nextSteps.1": "{{install}}",
@@ -244,6 +252,7 @@ const MESSAGES = {
244
252
  "nl": {
245
253
  "promptPlatform": "Selecteer een platform om te scaffolden:",
246
254
  "promptDir": "Doeldirectory:",
255
+ "promptAiAssets": "AI-agentassets toevoegen (AGENTS.md, editor/Copilot-regels)?",
247
256
  "spinnerStart": "Scaffolding...",
248
257
  "spinnerStop": "Klaar met scaffolden.",
249
258
  "wroteFile": "✓ {{path}}",
@@ -262,6 +271,7 @@ const MESSAGES = {
262
271
  "helpPlatformDescription": "Platform om te scaffolden ({{platforms}}; \"html\" is een alias voor \"components\", \"theme-editor\" is een alias voor \"canvas-theme-editor\")",
263
272
  "helpDirDescription": "Doeldirectory (vraagt interactief op een TTY als dit wordt weggelaten)",
264
273
  "helpYesDescription": "Nooit vragen; geef een fout in plaats van te vragen bij ontbrekend platform/directory",
274
+ "helpNoAiDescription": "Installatie van AI-agentassets overslaan na scaffolding",
265
275
  "helpLangDescription": "Overschrijf de automatisch gedetecteerde weergavetaal (bijv. \"hu\")",
266
276
  "canvas-theme-editor.nextSteps.0": "cd {{dir}}",
267
277
  "canvas-theme-editor.nextSteps.1": "{{install}}",
@@ -302,6 +312,7 @@ const MESSAGES = {
302
312
  "en-AU": {
303
313
  "promptPlatform": "Select a platform to scaffold:",
304
314
  "promptDir": "Target directory:",
315
+ "promptAiAssets": "Add AI agent assets (AGENTS.md, editor/Copilot rules)?",
305
316
  "spinnerStart": "Scaffolding...",
306
317
  "spinnerStop": "Done scaffolding.",
307
318
  "wroteFile": "✓ {{path}}",
@@ -320,6 +331,7 @@ const MESSAGES = {
320
331
  "helpPlatformDescription": "Platform to scaffold ({{platforms}}; \"html\" is an alias for \"components\", \"theme-editor\" is an alias for \"canvas-theme-editor\")",
321
332
  "helpDirDescription": "Target directory (prompts interactively on a TTY if omitted)",
322
333
  "helpYesDescription": "Never prompt; error instead of prompting for a missing platform/directory",
334
+ "helpNoAiDescription": "Skip installing AI agent assets after scaffolding",
323
335
  "helpLangDescription": "Override the auto-detected display language (e.g. \"hu\")",
324
336
  "canvas-theme-editor.nextSteps.0": "cd {{dir}}",
325
337
  "canvas-theme-editor.nextSteps.1": "{{install}}",
@@ -360,6 +372,7 @@ const MESSAGES = {
360
372
  "en-CA": {
361
373
  "promptPlatform": "Select a platform to scaffold:",
362
374
  "promptDir": "Target directory:",
375
+ "promptAiAssets": "Add AI agent assets (AGENTS.md, editor/Copilot rules)?",
363
376
  "spinnerStart": "Scaffolding...",
364
377
  "spinnerStop": "Done scaffolding.",
365
378
  "wroteFile": "✓ {{path}}",
@@ -378,6 +391,7 @@ const MESSAGES = {
378
391
  "helpPlatformDescription": "Platform to scaffold ({{platforms}}; \"html\" is an alias for \"components\", \"theme-editor\" is an alias for \"canvas-theme-editor\")",
379
392
  "helpDirDescription": "Target directory (prompts interactively on a TTY if omitted)",
380
393
  "helpYesDescription": "Never prompt; error instead of prompting for a missing platform/directory",
394
+ "helpNoAiDescription": "Skip installing AI agent assets after scaffolding",
381
395
  "helpLangDescription": "Override the auto-detected display language (e.g. \"hu\")",
382
396
  "canvas-theme-editor.nextSteps.0": "cd {{dir}}",
383
397
  "canvas-theme-editor.nextSteps.1": "{{install}}",
@@ -418,6 +432,7 @@ const MESSAGES = {
418
432
  "en-GB": {
419
433
  "promptPlatform": "Select a platform to scaffold:",
420
434
  "promptDir": "Target directory:",
435
+ "promptAiAssets": "Add AI agent assets (AGENTS.md, editor/Copilot rules)?",
421
436
  "spinnerStart": "Scaffolding...",
422
437
  "spinnerStop": "Done scaffolding.",
423
438
  "wroteFile": "✓ {{path}}",
@@ -436,6 +451,7 @@ const MESSAGES = {
436
451
  "helpPlatformDescription": "Platform to scaffold ({{platforms}}; \"html\" is an alias for \"components\", \"theme-editor\" is an alias for \"canvas-theme-editor\")",
437
452
  "helpDirDescription": "Target directory (prompts interactively on a TTY if omitted)",
438
453
  "helpYesDescription": "Never prompt; error instead of prompting for a missing platform/directory",
454
+ "helpNoAiDescription": "Skip installing AI agent assets after scaffolding",
439
455
  "helpLangDescription": "Override the auto-detected display language (e.g. \"hu\")",
440
456
  "canvas-theme-editor.nextSteps.0": "cd {{dir}}",
441
457
  "canvas-theme-editor.nextSteps.1": "{{install}}",
@@ -476,6 +492,7 @@ const MESSAGES = {
476
492
  "en": {
477
493
  "promptPlatform": "Select a platform to scaffold:",
478
494
  "promptDir": "Target directory:",
495
+ "promptAiAssets": "Add AI agent assets (AGENTS.md, editor/Copilot rules)?",
479
496
  "spinnerStart": "Scaffolding...",
480
497
  "spinnerStop": "Done scaffolding.",
481
498
  "wroteFile": "✓ {{path}}",
@@ -494,6 +511,7 @@ const MESSAGES = {
494
511
  "helpPlatformDescription": "Platform to scaffold ({{platforms}}; \"html\" is an alias for \"components\", \"theme-editor\" is an alias for \"canvas-theme-editor\")",
495
512
  "helpDirDescription": "Target directory (prompts interactively on a TTY if omitted)",
496
513
  "helpYesDescription": "Never prompt; error instead of prompting for a missing platform/directory",
514
+ "helpNoAiDescription": "Skip installing AI agent assets after scaffolding",
497
515
  "helpLangDescription": "Override the auto-detected display language (e.g. \"hu\")",
498
516
  "canvas-theme-editor.nextSteps.0": "cd {{dir}}",
499
517
  "canvas-theme-editor.nextSteps.1": "{{install}}",
@@ -534,6 +552,7 @@ const MESSAGES = {
534
552
  "fi": {
535
553
  "promptPlatform": "Valitse alusta scaffoldattavaksi:",
536
554
  "promptDir": "Kohdekansio:",
555
+ "promptAiAssets": "Lisätäänkö AI-agenttien aineistot (AGENTS.md, editorin/Copilot-säännöt)?",
537
556
  "spinnerStart": "Scaffoldataan...",
538
557
  "spinnerStop": "Scaffoldaus valmis.",
539
558
  "wroteFile": "✓ {{path}}",
@@ -552,6 +571,7 @@ const MESSAGES = {
552
571
  "helpPlatformDescription": "Scaffoldattava alusta ({{platforms}}; \"html\" on alias \"components\"-vaihtoehdolle, \"theme-editor\" on alias \"canvas-theme-editor\"-vaihtoehdolle)",
553
572
  "helpDirDescription": "Kohdekansio (kysytään interaktiivisesti TTY:ssä, jos jätetty pois)",
554
573
  "helpYesDescription": "Älä koskaan kysy; virhe, jos puuttuva platform- tai directory-argumentti",
574
+ "helpNoAiDescription": "Ohita AI-agenttien aineistojen asentaminen scaffoldingin jälkeen",
555
575
  "helpLangDescription": "Ylikirjoita automaattisesti tunnistettu näyttökieli (esim. \"hu\")",
556
576
  "canvas-theme-editor.nextSteps.0": "cd {{dir}}",
557
577
  "canvas-theme-editor.nextSteps.1": "{{install}}",
@@ -592,6 +612,7 @@ const MESSAGES = {
592
612
  "fr": {
593
613
  "promptPlatform": "Sélectionnez une plateforme à générer :",
594
614
  "promptDir": "Répertoire cible :",
615
+ "promptAiAssets": "Ajouter des ressources d'agent IA (AGENTS.md, règles de l'éditeur/Copilot)?",
595
616
  "spinnerStart": "Génération en cours…",
596
617
  "spinnerStop": "Génération terminée.",
597
618
  "wroteFile": "✓ {{path}}",
@@ -610,6 +631,7 @@ const MESSAGES = {
610
631
  "helpPlatformDescription": "Plateforme à générer ({{platforms}} ; \"html\" est un alias pour \"components\", \"theme-editor\" est un alias pour \"canvas-theme-editor\")",
611
632
  "helpDirDescription": "Répertoire cible (invite interactive sur un TTY si omis)",
612
633
  "helpYesDescription": "Ne jamais demander ; échoue plutôt que de demander une plateforme/répertoire manquant",
634
+ "helpNoAiDescription": "Ignorer l'installation des ressources d'agent IA après le scaffolding",
613
635
  "helpLangDescription": "Remplacer la langue d'affichage détectée automatiquement (ex. \"hu\")",
614
636
  "canvas-theme-editor.nextSteps.0": "cd {{dir}}",
615
637
  "canvas-theme-editor.nextSteps.1": "{{install}}",
@@ -650,6 +672,7 @@ const MESSAGES = {
650
672
  "fr-CA": {
651
673
  "promptPlatform": "Sélectionnez une plateforme à générer :",
652
674
  "promptDir": "Répertoire cible :",
675
+ "promptAiAssets": "Ajouter des ressources d'agent IA (AGENTS.md, règles de l'éditeur/Copilot)?",
653
676
  "spinnerStart": "Génération en cours…",
654
677
  "spinnerStop": "Génération terminée.",
655
678
  "wroteFile": "✓ {{path}}",
@@ -668,6 +691,7 @@ const MESSAGES = {
668
691
  "helpPlatformDescription": "Plateforme à générer ({{platforms}} ; \"html\" est un alias pour \"components\", \"theme-editor\" est un alias pour \"canvas-theme-editor\")",
669
692
  "helpDirDescription": "Répertoire cible (invite interactive en TTY si omis)",
670
693
  "helpYesDescription": "Ne jamais demander ; échouer au lieu de demander une plateforme ou un répertoire manquant",
694
+ "helpNoAiDescription": "Ne pas installer les ressources d'agent IA après le scaffolding",
671
695
  "helpLangDescription": "Remplacer la langue d'affichage détectée automatiquement (p. ex. \"hu\")",
672
696
  "canvas-theme-editor.nextSteps.0": "cd {{dir}}",
673
697
  "canvas-theme-editor.nextSteps.1": "{{install}}",
@@ -708,6 +732,7 @@ const MESSAGES = {
708
732
  "ga": {
709
733
  "promptPlatform": "Roghnaigh ardán le haghaidh sliocht:",
710
734
  "promptDir": "Eolaire sprioc:",
735
+ "promptAiAssets": "An gcuirtear sócmhainní gníomhaire AI (AGENTS.md, rialacha eagarthóra/Copilot)?",
711
736
  "spinnerStart": "Ag sliochtú...",
712
737
  "spinnerStop": "Sliocht críochnaithe.",
713
738
  "wroteFile": "✓ {{path}}",
@@ -726,6 +751,7 @@ const MESSAGES = {
726
751
  "helpPlatformDescription": "Ardán le sliochtú ({{platforms}}; \"html\" is ina leasainm do \"components\", \"theme-editor\" is ina leasainm do \"canvas-theme-editor\")",
727
752
  "helpDirDescription": "Eolaire sprioc (féachfaidh sé go idirghníomhach ar TTY más ann a fhágtar é)",
728
753
  "helpYesDescription": "Ná cuir ceist riamh; earráid seachas ceist a chur maidir le hardán/eolaire ar iarraidh",
754
+ "helpNoAiDescription": "Ná suiteáil sócmhainní gníomhaire AI tar éis an scafalaithe",
729
755
  "helpLangDescription": "Sárshocrú teanga taispeána (mar shampla \"hu\")",
730
756
  "canvas-theme-editor.nextSteps.0": "cd {{dir}}",
731
757
  "canvas-theme-editor.nextSteps.1": "{{install}}",
@@ -766,6 +792,7 @@ const MESSAGES = {
766
792
  "de": {
767
793
  "promptPlatform": "Plattform zum Scaffolden auswählen:",
768
794
  "promptDir": "Zielverzeichnis:",
795
+ "promptAiAssets": "AI-Agent-Assets hinzufügen (AGENTS.md, editor/Copilot rules)?",
769
796
  "spinnerStart": "Scaffolding…",
770
797
  "spinnerStop": "Scaffolding abgeschlossen.",
771
798
  "wroteFile": "✓ {{path}}",
@@ -784,6 +811,7 @@ const MESSAGES = {
784
811
  "helpPlatformDescription": "Zu scaffoldende Plattform ({{platforms}}; \"html\" ist ein Alias für \"components\", \"theme-editor\" ist ein Alias für \"canvas-theme-editor\")",
785
812
  "helpDirDescription": "Zielverzeichnis (interaktiv per TTY, falls weggelassen)",
786
813
  "helpYesDescription": "Nie nachfragen; bei fehlender Plattform/Verzeichnis stattdessen Fehler ausgeben",
814
+ "helpNoAiDescription": "Installation der AI-Agent-Assets nach dem Scaffolding überspringen",
787
815
  "helpLangDescription": "Die automatisch erkannte Anzeigesprache überschreiben (z. B. \"hu\")",
788
816
  "canvas-theme-editor.nextSteps.0": "cd {{dir}}",
789
817
  "canvas-theme-editor.nextSteps.1": "{{install}}",
@@ -824,6 +852,7 @@ const MESSAGES = {
824
852
  "el": {
825
853
  "promptPlatform": "Επιλέξτε πλατφόρμα για δημιουργία σκαλετού:",
826
854
  "promptDir": "Στόχος κατάλογος:",
855
+ "promptAiAssets": "Προσθήκη πόρων πράκτορα AI (AGENTS.md, κανόνες editor/Copilot)?",
827
856
  "spinnerStart": "Δημιουργία σκαλετού...",
828
857
  "spinnerStop": "Η δημιουργία σκαλετού ολοκληρώθηκε.",
829
858
  "wroteFile": "✓ {{path}}",
@@ -842,6 +871,7 @@ const MESSAGES = {
842
871
  "helpPlatformDescription": "Πλατφόρμα για δημιουργία σκαλετού ({{platforms}}; \"html\" είναι συνώνυμο για \"components\", \"theme-editor\" είναι συνώνυμο για \"canvas-theme-editor\")",
843
872
  "helpDirDescription": "Στόχος κατάλογος (ζητείται διαδραστικά σε TTY εάν παραλειφθεί)",
844
873
  "helpYesDescription": "Μην ζητάτε ποτέ εισαγωγή· σφάλμα αντί για ερώτηση για λείποντα πλατφόρμα/κατάλογο",
874
+ "helpNoAiDescription": "Παράλειψη εγκατάστασης πόρων πράκτορα AI μετά τη δημιουργία του σκελετού",
845
875
  "helpLangDescription": "Παράκαμψη της αυτόματης ανίχνευσης της γλώσσας εμφάνισης (π.χ. \"hu\")",
846
876
  "canvas-theme-editor.nextSteps.0": "cd {{dir}}",
847
877
  "canvas-theme-editor.nextSteps.1": "{{install}}",
@@ -882,6 +912,7 @@ const MESSAGES = {
882
912
  "ht": {
883
913
  "promptPlatform": "Chwazi yon platfòm pou kreye scaffold:",
884
914
  "promptDir": "Katab sib:",
915
+ "promptAiAssets": "Ajoute resous ajan AI (AGENTS.md, règleman editè/Copilot)?",
885
916
  "spinnerStart": "Ap kreye scaffold...",
886
917
  "spinnerStop": "Fini kreye scaffold.",
887
918
  "wroteFile": "✓ {{path}}",
@@ -900,6 +931,7 @@ const MESSAGES = {
900
931
  "helpPlatformDescription": "Platfòm pou kreye scaffold ({{platforms}}; \"html\" se yon alias pou \"components\", \"theme-editor\" se yon alias pou \"canvas-theme-editor\")",
901
932
  "helpDirDescription": "Katab sib (p ap mande si kouri entèaktifman sou yon TTY si yo pa bay li)",
902
933
  "helpYesDescription": "Pa janm mande; jete erè olye pou mande lè platfòm/katab manke",
934
+ "helpNoAiDescription": "Sote enstale resous ajan AI apre scaffolding",
903
935
  "helpLangDescription": "Sispann deteksyon otomatik lang afichaj la (egzanp \"hu\")",
904
936
  "canvas-theme-editor.nextSteps.0": "cd {{dir}}",
905
937
  "canvas-theme-editor.nextSteps.1": "{{install}}",
@@ -940,6 +972,7 @@ const MESSAGES = {
940
972
  "he": {
941
973
  "promptPlatform": "בחר פלטפורמה ליצירת scaffold:",
942
974
  "promptDir": "תיקיית יעד:",
975
+ "promptAiAssets": "להוסיף נכסי סוכני AI (AGENTS.md, כללי העורך/Copilot)?",
943
976
  "spinnerStart": "יוצר scaffold…",
944
977
  "spinnerStop": "סיום יצירת scaffold.",
945
978
  "wroteFile": "✓ {{path}}",
@@ -958,6 +991,7 @@ const MESSAGES = {
958
991
  "helpPlatformDescription": "פלטפורמה ליצירת scaffold ({{platforms}}; \"html\" הוא כינוי ל־\"components\", \"theme-editor\" הוא כינוי ל־\"canvas-theme-editor\")",
959
992
  "helpDirDescription": "תיקיית יעד (יבקש אינטראקטיבית ב‑TTY אם לא צוינה)",
960
993
  "helpYesDescription": "אל תבקש אישור; במקום זאת להחזיר שגיאה אם חסרה פלטפורמה/תיקייה",
994
+ "helpNoAiDescription": "דלג על התקנת נכסי סוכני AI לאחר יצירת התשתית",
961
995
  "helpLangDescription": "עקוף את זיהוי שפת התצוגה אוטומטית (למשל \"hu\")",
962
996
  "canvas-theme-editor.nextSteps.0": "cd {{dir}}",
963
997
  "canvas-theme-editor.nextSteps.1": "{{install}}",
@@ -998,6 +1032,7 @@ const MESSAGES = {
998
1032
  "hi": {
999
1033
  "promptPlatform": "स्कैफ़ोल्ड करने के लिए प्लेटफ़ॉर्म चुनें:",
1000
1034
  "promptDir": "लक्ष्य निर्देशिका:",
1035
+ "promptAiAssets": "AI एजेंट संपत्ति जोड़ें (AGENTS.md, editor/Copilot rules)?",
1001
1036
  "spinnerStart": "स्कैफ़ोल्ड किया जा रहा है...",
1002
1037
  "spinnerStop": "स्कैफ़ोल्डिंग पूर्ण।",
1003
1038
  "wroteFile": "✓ {{path}}",
@@ -1016,6 +1051,7 @@ const MESSAGES = {
1016
1051
  "helpPlatformDescription": "स्कैफ़ोल्ड करने के लिए प्लेटफ़ॉर्म ({{platforms}}; \"html\" का पर्याय \"components\" है, \"theme-editor\" का पर्याय \"canvas-theme-editor\" है)",
1017
1052
  "helpDirDescription": "लक्ष्य निर्देशिका (TTY पर छोड़ा गया तो इंटरैक्टिव रूप से पूछा जाएगा)",
1018
1053
  "helpYesDescription": "कभी भी संकेत नहीं पूछें; अनुपस्थित प्लेटफ़ॉर्म/निर्देशिका के लिए पूछने की बजाय त्रुटि करें",
1054
+ "helpNoAiDescription": "स्कैफोल्डिंग के बाद AI एजेंट संपत्तियाँ स्थापित करना छोड़ें",
1019
1055
  "helpLangDescription": "स्वचालित–पहचानी गई डिस्प्ले भाषा को ओवरराइड करें (उदा. \"hu\")",
1020
1056
  "canvas-theme-editor.nextSteps.0": "cd {{dir}}",
1021
1057
  "canvas-theme-editor.nextSteps.1": "{{install}}",
@@ -1056,6 +1092,7 @@ const MESSAGES = {
1056
1092
  "hu": {
1057
1093
  "promptPlatform": "Válassz platformot a scaffoldinghez:",
1058
1094
  "promptDir": "Célkönyvtár:",
1095
+ "promptAiAssets": "AI ügynök eszközök hozzáadása (AGENTS.md, editor/Copilot szabályok)?",
1059
1096
  "spinnerStart": "Scaffoldolás...",
1060
1097
  "spinnerStop": "Scaffold kész.",
1061
1098
  "wroteFile": "✓ {{path}}",
@@ -1074,6 +1111,7 @@ const MESSAGES = {
1074
1111
  "helpPlatformDescription": "Scaffoldolandó platform ({{platforms}}; \"html\" a \"components\" aliasza, a \"theme-editor\" a \"canvas-theme-editor\" aliasza)",
1075
1112
  "helpDirDescription": "Célkönyvtár (TTY esetén interaktívan kérdez, ha kimarad)",
1076
1113
  "helpYesDescription": "Soha ne kérdezzen; hibázzon, ahelyett hogy egy hiányzó platform/könyvtár miatt promptolna",
1114
+ "helpNoAiDescription": "Az AI ügynök eszközök telepítésének kihagyása a sablon létrehozása után",
1077
1115
  "helpLangDescription": "Felülírja az automatikusan észlelt megjelenítési nyelvet (pl. \"hu\")",
1078
1116
  "canvas-theme-editor.nextSteps.0": "cd {{dir}}",
1079
1117
  "canvas-theme-editor.nextSteps.1": "{{install}}",
@@ -1114,6 +1152,7 @@ const MESSAGES = {
1114
1152
  "is": {
1115
1153
  "promptPlatform": "Veldu vettvang til að búa til grunn:",
1116
1154
  "promptDir": "Áfangaskrá:",
1155
+ "promptAiAssets": "Bæta við AI-agent-eignum (AGENTS.md, editor/Copilot reglur)?",
1117
1156
  "spinnerStart": "Búsetning...",
1118
1157
  "spinnerStop": "Lokið við að búa til grunninn.",
1119
1158
  "wroteFile": "✓ {{path}}",
@@ -1132,6 +1171,7 @@ const MESSAGES = {
1132
1171
  "helpPlatformDescription": "Vettvangur til að búa til ({{platforms}}; \"html\" er samskeyti fyrir \"components\", \"theme-editor\" er samskeyti fyrir \"canvas-theme-editor\")",
1133
1172
  "helpDirDescription": "Áfangaskrá (spyr hvort verið er í TTY ef sleppt)",
1134
1173
  "helpYesDescription": "Aldrei spyrja; kasta villa í staðinn fyrir að spyrja um vantar vettvang/skrá",
1174
+ "helpNoAiDescription": "Sleppa uppsetningu AI-agent-eigna eftir að sniðmátið hefur verið búið til",
1135
1175
  "helpLangDescription": "Yfirstýrðu sjálfvirkt greinda sýnismál (t.d. \"hu\")",
1136
1176
  "canvas-theme-editor.nextSteps.0": "cd {{dir}}",
1137
1177
  "canvas-theme-editor.nextSteps.1": "{{install}}",
@@ -1172,6 +1212,7 @@ const MESSAGES = {
1172
1212
  "id": {
1173
1213
  "promptPlatform": "Pilih platform untuk dibuat:",
1174
1214
  "promptDir": "Direktori target:",
1215
+ "promptAiAssets": "Tambahkan aset agen AI (AGENTS.md, aturan editor/Copilot)?",
1175
1216
  "spinnerStart": "Membuat kerangka...",
1176
1217
  "spinnerStop": "Selesai membuat kerangka.",
1177
1218
  "wroteFile": "✓ {{path}}",
@@ -1190,6 +1231,7 @@ const MESSAGES = {
1190
1231
  "helpPlatformDescription": "Platform untuk dibuat ({{platforms}}; \"html\" adalah alias untuk \"components\", \"theme-editor\" adalah alias untuk \"canvas-theme-editor\")",
1191
1232
  "helpDirDescription": "Direktori target (akan diminta secara interaktif pada TTY jika dihilangkan)",
1192
1233
  "helpYesDescription": "Jangan pernah meminta konfirmasi; keluarkan kesalahan jika platform/direktori hilang",
1234
+ "helpNoAiDescription": "Lewati pemasangan aset agen AI setelah scaffolding",
1193
1235
  "helpLangDescription": "Timpa bahasa tampilan yang terdeteksi otomatis (mis. \"hu\")",
1194
1236
  "canvas-theme-editor.nextSteps.0": "cd {{dir}}",
1195
1237
  "canvas-theme-editor.nextSteps.1": "{{install}}",
@@ -1230,6 +1272,7 @@ const MESSAGES = {
1230
1272
  "it": {
1231
1273
  "promptPlatform": "Seleziona una piattaforma da scaffoldare:",
1232
1274
  "promptDir": "Directory di destinazione:",
1275
+ "promptAiAssets": "Aggiungere asset dell'agente AI (AGENTS.md, regole dell'editor/Copilot)?",
1233
1276
  "spinnerStart": "Scaffold in corso...",
1234
1277
  "spinnerStop": "Scaffold completato.",
1235
1278
  "wroteFile": "✓ {{path}}",
@@ -1248,6 +1291,7 @@ const MESSAGES = {
1248
1291
  "helpPlatformDescription": "Piattaforma da scaffoldare ({{platforms}}; \"html\" è un alias per \"components\", \"theme-editor\" è un alias per \"canvas-theme-editor\")",
1249
1292
  "helpDirDescription": "Directory di destinazione (se omessa, verrà richiesto in modo interattivo su una TTY)",
1250
1293
  "helpYesDescription": "Non chiedere mai conferma; genera un errore invece di richiedere la piattaforma/directory mancante",
1294
+ "helpNoAiDescription": "Saltare l'installazione degli asset dell'agente AI dopo lo scaffolding",
1251
1295
  "helpLangDescription": "Sovrascrivi la lingua di visualizzazione rilevata automaticamente (es. \"hu\")",
1252
1296
  "canvas-theme-editor.nextSteps.0": "cd {{dir}}",
1253
1297
  "canvas-theme-editor.nextSteps.1": "{{install}}",
@@ -1288,6 +1332,7 @@ const MESSAGES = {
1288
1332
  "ja": {
1289
1333
  "promptPlatform": "スキャフォールドするプラットフォームを選択:",
1290
1334
  "promptDir": "ターゲットディレクトリ:",
1335
+ "promptAiAssets": "AIエージェントのアセットを追加しますか (AGENTS.md, editor/Copilot rules)?",
1291
1336
  "spinnerStart": "スキャフォールド中...",
1292
1337
  "spinnerStop": "スキャフォールド完了。",
1293
1338
  "wroteFile": "✓ {{path}}",
@@ -1306,6 +1351,7 @@ const MESSAGES = {
1306
1351
  "helpPlatformDescription": "スキャフォールドするプラットフォーム ({{platforms}}; \"html\" は \"components\" の別名、\"theme-editor\" は \"canvas-theme-editor\" の別名です)",
1307
1352
  "helpDirDescription": "ターゲットディレクトリ(省略するとTTY上で対話的に尋ねます)",
1308
1353
  "helpYesDescription": "プロンプトを表示しない(不足する platform/ディレクトリがある場合はプロンプトの代わりにエラーにする)",
1354
+ "helpNoAiDescription": "スキャフォールディング後に AIエージェントのアセットのインストールをスキップする",
1309
1355
  "helpLangDescription": "自動検出された表示言語を上書き(例: \"hu\")",
1310
1356
  "canvas-theme-editor.nextSteps.0": "cd {{dir}}",
1311
1357
  "canvas-theme-editor.nextSteps.1": "{{install}}",
@@ -1346,6 +1392,7 @@ const MESSAGES = {
1346
1392
  "ko": {
1347
1393
  "promptPlatform": "스캐폴딩할 플랫폼 선택:",
1348
1394
  "promptDir": "대상 디렉터리:",
1395
+ "promptAiAssets": "AI 에이전트 자산 (AGENTS.md, editor/Copilot 규칙)을 추가하시겠습니까?",
1349
1396
  "spinnerStart": "스캐폴딩 중...",
1350
1397
  "spinnerStop": "스캐폴딩 완료.",
1351
1398
  "wroteFile": "✓ {{path}}",
@@ -1364,6 +1411,7 @@ const MESSAGES = {
1364
1411
  "helpPlatformDescription": "스캐폴딩할 플랫폼 ({{platforms}}; \"html\"은 \"components\"의 별칭, \"theme-editor\"는 \"canvas-theme-editor\"의 별칭)",
1365
1412
  "helpDirDescription": "대상 디렉터리 (TTY에서 생략하면 대화형으로 묻습니다)",
1366
1413
  "helpYesDescription": "절대 프롬프트하지 않음; 플랫폼/디렉터리가 없으면 프롬프트 대신 오류 발생",
1414
+ "helpNoAiDescription": "스캐폴딩 후 AI 에이전트 자산 설치를 건너뛰기",
1367
1415
  "helpLangDescription": "자동 감지된 표시 언어를 재정의 (예: \"hu\")",
1368
1416
  "canvas-theme-editor.nextSteps.0": "cd {{dir}}",
1369
1417
  "canvas-theme-editor.nextSteps.1": "{{install}}",
@@ -1404,6 +1452,7 @@ const MESSAGES = {
1404
1452
  "mi": {
1405
1453
  "promptPlatform": "Tīpakohia he papanga hei hanga:",
1406
1454
  "promptDir": "Kōpaki ūkaipō (Target):",
1455
+ "promptAiAssets": "Tāpiri i ngā rawa mō ngā ajaneti AI (AGENTS.md, ture etita/Copilot)?",
1407
1456
  "spinnerStart": "E hanga ana…",
1408
1457
  "spinnerStop": "Kua oti te hanga.",
1409
1458
  "wroteFile": "✓ {{path}}",
@@ -1422,6 +1471,7 @@ const MESSAGES = {
1422
1471
  "helpPlatformDescription": "Te papanga hei hanga ({{platforms}}; ko \"html\" he ingoa taurima mō \"components\", ko \"theme-editor\" he ingoa taurima mō \"canvas-theme-editor\")",
1423
1472
  "helpDirDescription": "Kōpaki ūkaipō (ka uiui ā-āheinga i runga i te TTY mēnā kāore i whakakīa)",
1424
1473
  "helpYesDescription": "Kāore he pātai; ka hapa ina kore te papanga/kōpaki",
1474
+ "helpNoAiDescription": "Aukatia te tāuta i ngā rawa ajaneti AI i muri i te hanga anga",
1425
1475
  "helpLangDescription": "Te reo whakaatu hei whakakapi i te tautuhi aunoa (hei tauira \"hu\")",
1426
1476
  "canvas-theme-editor.nextSteps.0": "cd {{dir}}",
1427
1477
  "canvas-theme-editor.nextSteps.1": "{{install}}",
@@ -1462,6 +1512,7 @@ const MESSAGES = {
1462
1512
  "ms": {
1463
1513
  "promptPlatform": "Pilih platform untuk discaffold:",
1464
1514
  "promptDir": "Direktori sasaran:",
1515
+ "promptAiAssets": "Tambah aset ejen AI (AGENTS.md, peraturan editor/Copilot)?",
1465
1516
  "spinnerStart": "Sedang membuat scaffold...",
1466
1517
  "spinnerStop": "Selesai membuat scaffold.",
1467
1518
  "wroteFile": "✓ {{path}}",
@@ -1480,6 +1531,7 @@ const MESSAGES = {
1480
1531
  "helpPlatformDescription": "Platform untuk discaffold ({{platforms}}; \"html\" adalah alias untuk \"components\", \"theme-editor\" adalah alias untuk \"canvas-theme-editor\")",
1481
1532
  "helpDirDescription": "Direktori sasaran (akan bertanya secara interaktif pada TTY jika ditinggalkan)",
1482
1533
  "helpYesDescription": "Jangan bertanya; beri ralat jika platform/direktori yang hilang",
1534
+ "helpNoAiDescription": "Langkau pemasangan aset ejen AI selepas scaffolding",
1483
1535
  "helpLangDescription": "Timpa bahasa paparan yang dikesan automatik (contoh: \"hu\")",
1484
1536
  "canvas-theme-editor.nextSteps.0": "cd {{dir}}",
1485
1537
  "canvas-theme-editor.nextSteps.1": "{{install}}",
@@ -1520,6 +1572,7 @@ const MESSAGES = {
1520
1572
  "se": {
1521
1573
  "promptPlatform": "Välj en plattform att skapa scaffold för:",
1522
1574
  "promptDir": "Målmapp:",
1575
+ "promptAiAssets": "Add AI agent assets (AGENTS.md, editor/Copilot rules)?",
1523
1576
  "spinnerStart": "Skapar scaffold...",
1524
1577
  "spinnerStop": "Skapande klart.",
1525
1578
  "wroteFile": "✓ {{path}}",
@@ -1538,6 +1591,7 @@ const MESSAGES = {
1538
1591
  "helpPlatformDescription": "Plattform att skapa scaffold för ({{platforms}}; \"html\" är en alias för \"components\", \"theme-editor\" är en alias för \"canvas-theme-editor\")",
1539
1592
  "helpDirDescription": "Målmapp (frågas interaktivt i en TTY om det utelämnas)",
1540
1593
  "helpYesDescription": "Fråga aldrig; ge ett fel istället för att fråga efter saknad plattform/mapp",
1594
+ "helpNoAiDescription": "Skip installing AI agent assets after scaffolding",
1541
1595
  "helpLangDescription": "Åsidosätt den autodetekterade visningsspråket (t.ex. \"hu\")",
1542
1596
  "canvas-theme-editor.nextSteps.0": "cd {{dir}}",
1543
1597
  "canvas-theme-editor.nextSteps.1": "{{install}}",
@@ -1578,6 +1632,7 @@ const MESSAGES = {
1578
1632
  "nb": {
1579
1633
  "promptPlatform": "Velg en plattform som skal scaffoldes:",
1580
1634
  "promptDir": "Målmappe:",
1635
+ "promptAiAssets": "Legg til AI-agent-ressurser (AGENTS.md, editor/Copilot-regler)?",
1581
1636
  "spinnerStart": "Scaffolder...",
1582
1637
  "spinnerStop": "Ferdig med scaffolding.",
1583
1638
  "wroteFile": "✓ {{path}}",
@@ -1596,6 +1651,7 @@ const MESSAGES = {
1596
1651
  "helpPlatformDescription": "Plattform som skal scaffoldes ({{platforms}}; \"html\" er et alias for \"components\", \"theme-editor\" er et alias for \"canvas-theme-editor\")",
1597
1652
  "helpDirDescription": "Målmappe (spør interaktivt i en TTY hvis utelatt)",
1598
1653
  "helpYesDescription": "Ikke spør; gi feil i stedet for å spørre om manglende plattform/mappe",
1654
+ "helpNoAiDescription": "Hopp over å installere AI-agent-ressurser etter oppsett",
1599
1655
  "helpLangDescription": "Overstyr automatisk oppdaget visningsspråk (f.eks. \"hu\")",
1600
1656
  "canvas-theme-editor.nextSteps.0": "cd {{dir}}",
1601
1657
  "canvas-theme-editor.nextSteps.1": "{{install}}",
@@ -1636,6 +1692,7 @@ const MESSAGES = {
1636
1692
  "nn": {
1637
1693
  "promptPlatform": "Vel ein plattform å skaffolde:",
1638
1694
  "promptDir": "Målmappe:",
1695
+ "promptAiAssets": "Legg til AI-agent-ressursar (AGENTS.md, editor/Copilot-reglar)?",
1639
1696
  "spinnerStart": "Skaffolderar...",
1640
1697
  "spinnerStop": "Ferdig med skaffolding.",
1641
1698
  "wroteFile": "✓ {{path}}",
@@ -1654,6 +1711,7 @@ const MESSAGES = {
1654
1711
  "helpPlatformDescription": "Plattform å skaffolde ({{platforms}}; \"html\" er eit alias for \"components\", \"theme-editor\" er eit alias for \"canvas-theme-editor\")",
1655
1712
  "helpDirDescription": "Målmappe (spør interaktivt i ein TTY viss utelate)",
1656
1713
  "helpYesDescription": "Aldri spør; gi feil i staden for å spørje om manglande plattform/mappe",
1714
+ "helpNoAiDescription": "Hopp over å installere AI-agent-ressursar etter oppsett",
1657
1715
  "helpLangDescription": "Overskriv automatisk oppdaga visningsspråk (t.d. \"hu\")",
1658
1716
  "canvas-theme-editor.nextSteps.0": "cd {{dir}}",
1659
1717
  "canvas-theme-editor.nextSteps.1": "{{install}}",
@@ -1694,6 +1752,7 @@ const MESSAGES = {
1694
1752
  "fa": {
1695
1753
  "promptPlatform": "پلتفرمی برای ساخت اسکافولد انتخاب کنید:",
1696
1754
  "promptDir": "دایرکتوری هدف:",
1755
+ "promptAiAssets": "افزودن دارایی‌های عامل هوش مصنوعی (AGENTS.md, قوانین ویرایشگر/Copilot)?",
1697
1756
  "spinnerStart": "در حال ساخت اسکافولد...",
1698
1757
  "spinnerStop": "ساخت اسکافولد انجام شد.",
1699
1758
  "wroteFile": "✓ {{path}}",
@@ -1712,6 +1771,7 @@ const MESSAGES = {
1712
1771
  "helpPlatformDescription": "پلتفرمی برای اسکافولد ({{platforms}}؛ \"html\" معادل \"components\" است، \"theme-editor\" معادل \"canvas-theme-editor\")",
1713
1772
  "helpDirDescription": "دایرکتوری هدف (در یک TTY در صورت حذف شدن به‌صورت تعاملی پرسیده می‌شود)",
1714
1773
  "helpYesDescription": "هرگز پرسش نکن؛ در صورت فقدان پلتفرم/دایرکتوری خطا صادر کن",
1774
+ "helpNoAiDescription": "نصب دارایی‌های عامل هوش مصنوعی را پس از اسکافولد رد کن",
1715
1775
  "helpLangDescription": "زبان نمایش را بازنویسی کن (مثلاً \"hu\")",
1716
1776
  "canvas-theme-editor.nextSteps.0": "cd {{dir}}",
1717
1777
  "canvas-theme-editor.nextSteps.1": "{{install}}",
@@ -1752,6 +1812,7 @@ const MESSAGES = {
1752
1812
  "pl": {
1753
1813
  "promptPlatform": "Wybierz platformę do scaffoldingu:",
1754
1814
  "promptDir": "Katalog docelowy:",
1815
+ "promptAiAssets": "Dodać zasoby agenta AI (AGENTS.md, reguły edytora/Copilot)?",
1755
1816
  "spinnerStart": "Tworzenie szablonu...",
1756
1817
  "spinnerStop": "Zakończono tworzenie szablonu.",
1757
1818
  "wroteFile": "✓ {{path}}",
@@ -1770,6 +1831,7 @@ const MESSAGES = {
1770
1831
  "helpPlatformDescription": "Platforma do scaffoldingu ({{platforms}}; \"html\" to alias dla \"components\", \"theme-editor\" to alias dla \"canvas-theme-editor\")",
1771
1832
  "helpDirDescription": "Katalog docelowy (jeśli pominiesz, w TTY zostaniesz poproszony interaktywnie)",
1772
1833
  "helpYesDescription": "Nigdy nie pytać; zamiast tego zgłosić błąd, gdy brakuje platformy/katalogu",
1834
+ "helpNoAiDescription": "Pomiń instalowanie zasobów agenta AI po wygenerowaniu szkieletu",
1773
1835
  "helpLangDescription": "Zastąp automatycznie wykryty język wyświetlania (np. \"hu\")",
1774
1836
  "canvas-theme-editor.nextSteps.0": "cd {{dir}}",
1775
1837
  "canvas-theme-editor.nextSteps.1": "{{install}}",
@@ -1810,6 +1872,7 @@ const MESSAGES = {
1810
1872
  "pt": {
1811
1873
  "promptPlatform": "Selecione uma plataforma para scaffold:",
1812
1874
  "promptDir": "Diretório de destino:",
1875
+ "promptAiAssets": "Adicionar ativos do agente de IA (AGENTS.md, regras do editor/Copilot)?",
1813
1876
  "spinnerStart": "Scaffold em andamento...",
1814
1877
  "spinnerStop": "Scaffold concluído.",
1815
1878
  "wroteFile": "✓ {{path}}",
@@ -1828,6 +1891,7 @@ const MESSAGES = {
1828
1891
  "helpPlatformDescription": "Plataforma para scaffold ({{platforms}}; \"html\" é um alias para \"components\", \"theme-editor\" é um alias para \"canvas-theme-editor\")",
1829
1892
  "helpDirDescription": "Diretório de destino (pergunta interativa em TTY se omitido)",
1830
1893
  "helpYesDescription": "Nunca perguntar; gerar erro em vez de solicitar plataforma/diretório ausente",
1894
+ "helpNoAiDescription": "Pular a instalação dos ativos do agente de IA após o scaffolding",
1831
1895
  "helpLangDescription": "Sobrepor o idioma de exibição detectado automaticamente (ex.: \"hu\")",
1832
1896
  "canvas-theme-editor.nextSteps.0": "cd {{dir}}",
1833
1897
  "canvas-theme-editor.nextSteps.1": "{{install}}",
@@ -1868,6 +1932,7 @@ const MESSAGES = {
1868
1932
  "pt-BR": {
1869
1933
  "promptPlatform": "Selecione uma plataforma para scaffolding:",
1870
1934
  "promptDir": "Diretório alvo:",
1935
+ "promptAiAssets": "Adicionar ativos de agente de IA (AGENTS.md, regras do editor/Copilot)?",
1871
1936
  "spinnerStart": "Scaffold em andamento...",
1872
1937
  "spinnerStop": "Scaffold concluído.",
1873
1938
  "wroteFile": "✓ {{path}}",
@@ -1886,6 +1951,7 @@ const MESSAGES = {
1886
1951
  "helpPlatformDescription": "Plataforma para scaffold ({{platforms}}; \"html\" é um alias para \"components\", \"theme-editor\" é um alias para \"canvas-theme-editor\")",
1887
1952
  "helpDirDescription": "Diretório alvo (solicita interativamente em um TTY se omitido)",
1888
1953
  "helpYesDescription": "Nunca perguntar; falhar em vez de solicitar se faltar platform/diretório",
1954
+ "helpNoAiDescription": "Pular a instalação dos ativos do agente de IA após o scaffolding",
1889
1955
  "helpLangDescription": "Substituir o idioma exibido detectado automaticamente (ex.: \"hu\")",
1890
1956
  "canvas-theme-editor.nextSteps.0": "cd {{dir}}",
1891
1957
  "canvas-theme-editor.nextSteps.1": "{{install}}",
@@ -1926,6 +1992,7 @@ const MESSAGES = {
1926
1992
  "ru": {
1927
1993
  "promptPlatform": "Выберите платформу для scaffold:",
1928
1994
  "promptDir": "Целевая директория:",
1995
+ "promptAiAssets": "Добавить ресурсы AI-агента (AGENTS.md, правила для редактора/Copilot)?",
1929
1996
  "spinnerStart": "Создаю каркас...",
1930
1997
  "spinnerStop": "Каркас создан.",
1931
1998
  "wroteFile": "✓ {{path}}",
@@ -1944,6 +2011,7 @@ const MESSAGES = {
1944
2011
  "helpPlatformDescription": "Платформа для scaffold ({{platforms}}; \"html\" — псевдоним для \"components\", \"theme-editor\" — псевдоним для \"canvas-theme-editor\")",
1945
2012
  "helpDirDescription": "Целевая директория (если опущено, в интерактивном TTY будет запрошено)",
1946
2013
  "helpYesDescription": "Никогда не запрашивать; выдать ошибку вместо интерактивного запроса платформы/директории",
2014
+ "helpNoAiDescription": "Пропустить установку ресурсов AI-агента после создания каркаса",
1947
2015
  "helpLangDescription": "Переопределить автоматически определённый язык интерфейса (например, \"hu\")",
1948
2016
  "canvas-theme-editor.nextSteps.0": "cd {{dir}}",
1949
2017
  "canvas-theme-editor.nextSteps.1": "{{install}}",
@@ -1984,6 +2052,7 @@ const MESSAGES = {
1984
2052
  "zh-Hans": {
1985
2053
  "promptPlatform": "选择要生成的目标平台:",
1986
2054
  "promptDir": "目标目录:",
2055
+ "promptAiAssets": "添加 AI 代理资产(AGENTS.md、editor/Copilot 规则)?",
1987
2056
  "spinnerStart": "正在生成脚手架…",
1988
2057
  "spinnerStop": "脚手架生成完成。",
1989
2058
  "wroteFile": "✓ {{path}}",
@@ -2002,6 +2071,7 @@ const MESSAGES = {
2002
2071
  "helpPlatformDescription": "要生成的平台 ({{platforms}};\"html\" 为 \"components\" 的别名,\"theme-editor\" 为 \"canvas-theme-editor\" 的别名)",
2003
2072
  "helpDirDescription": "目标目录(若在 TTY 中省略则会交互提示)",
2004
2073
  "helpYesDescription": "从不提示;若缺少 platform/目录 则报错而不是提示",
2074
+ "helpNoAiDescription": "在脚手架搭建后跳过安装 AI 代理资产",
2005
2075
  "helpLangDescription": "覆盖自动检测的显示语言(例如:\"hu\")",
2006
2076
  "canvas-theme-editor.nextSteps.0": "cd {{dir}}",
2007
2077
  "canvas-theme-editor.nextSteps.1": "{{install}}",
@@ -2042,6 +2112,7 @@ const MESSAGES = {
2042
2112
  "sl": {
2043
2113
  "promptPlatform": "Izberite platformo za ogrodje:",
2044
2114
  "promptDir": "Ciljna mapa:",
2115
+ "promptAiAssets": "Dodati AI agentne vire (AGENTS.md, pravila za urejevalnik/Copilot)?",
2045
2116
  "spinnerStart": "Ustvarjanje ogrodja...",
2046
2117
  "spinnerStop": "Ustvarjanje ogrodja končano.",
2047
2118
  "wroteFile": "✓ {{path}}",
@@ -2060,6 +2131,7 @@ const MESSAGES = {
2060
2131
  "helpPlatformDescription": "Platforma za ogrodje ({{platforms}}; \"html\" je nadomestno ime za \"components\", \"theme-editor\" je nadomestno ime za \"canvas-theme-editor\")",
2061
2132
  "helpDirDescription": "Ciljna mapa (če ni navedena, se interaktivno vpraša na TTY)",
2062
2133
  "helpYesDescription": "Nikoli ne pozivaj; pri manjkajoči platformi/mapi sproži napako namesto poziva",
2134
+ "helpNoAiDescription": "Preskoči namestitev AI agentnih virov po scaffoldingu",
2063
2135
  "helpLangDescription": "Prepišite samodejno zaznan jezik vmesnika (npr. \"hu\")",
2064
2136
  "canvas-theme-editor.nextSteps.0": "cd {{dir}}",
2065
2137
  "canvas-theme-editor.nextSteps.1": "{{install}}",
@@ -2100,6 +2172,7 @@ const MESSAGES = {
2100
2172
  "es": {
2101
2173
  "promptPlatform": "Seleccione una plataforma para scaffolding:",
2102
2174
  "promptDir": "Directorio destino:",
2175
+ "promptAiAssets": "¿Agregar recursos de agente de IA (AGENTS.md, reglas del editor/Copilot)?",
2103
2176
  "spinnerStart": "Scaffold en progreso...",
2104
2177
  "spinnerStop": "Scaffold completado.",
2105
2178
  "wroteFile": "✓ {{path}}",
@@ -2118,6 +2191,7 @@ const MESSAGES = {
2118
2191
  "helpPlatformDescription": "Plataforma para scaffolding ({{platforms}}; \"html\" es un alias de \"components\", \"theme-editor\" es un alias de \"canvas-theme-editor\")",
2119
2192
  "helpDirDescription": "Directorio destino (si se omite, solicita interactivamente en un TTY)",
2120
2193
  "helpYesDescription": "Nunca preguntar; mostrar error en lugar de pedir la plataforma/directorio faltante",
2194
+ "helpNoAiDescription": "Omitir la instalación de recursos de agente de IA después de generar el esqueleto",
2121
2195
  "helpLangDescription": "Sobrescribir el idioma de visualización detectado automáticamente (p. ej. \"hu\")",
2122
2196
  "canvas-theme-editor.nextSteps.0": "cd {{dir}}",
2123
2197
  "canvas-theme-editor.nextSteps.1": "{{install}}",
@@ -2158,6 +2232,7 @@ const MESSAGES = {
2158
2232
  "sv": {
2159
2233
  "promptPlatform": "Välj plattform att skapa stommen för:",
2160
2234
  "promptDir": "Målkatalog:",
2235
+ "promptAiAssets": "Lägga till AI-agentresurser (AGENTS.md, editor/Copilot-regler)?",
2161
2236
  "spinnerStart": "Skapar stommen...",
2162
2237
  "spinnerStop": "Stomme skapad.",
2163
2238
  "wroteFile": "✓ {{path}}",
@@ -2176,6 +2251,7 @@ const MESSAGES = {
2176
2251
  "helpPlatformDescription": "Plattform att skapa stommen för ({{platforms}}; \"html\" är ett alias för \"components\", \"theme-editor\" är ett alias för \"canvas-theme-editor\")",
2177
2252
  "helpDirDescription": "Målkatalog (frågas interaktivt i en TTY om det utelämnas)",
2178
2253
  "helpYesDescription": "Fråga aldrig; ge fel i stället för att fråga efter saknad plattform/katalog",
2254
+ "helpNoAiDescription": "Hoppa över installation av AI-agentresurser efter scaffolding",
2179
2255
  "helpLangDescription": "Åsidosätt den autodetekterade visningsspråket (t.ex. \"hu\")",
2180
2256
  "canvas-theme-editor.nextSteps.0": "cd {{dir}}",
2181
2257
  "canvas-theme-editor.nextSteps.1": "{{install}}",
@@ -2216,6 +2292,7 @@ const MESSAGES = {
2216
2292
  "th": {
2217
2293
  "promptPlatform": "เลือกแพลตฟอร์มสำหรับสร้างสเกลโฟลด์:",
2218
2294
  "promptDir": "ไดเรกทอรีเป้าหมาย:",
2295
+ "promptAiAssets": "เพิ่มไฟล์เอเจนต์ AI (AGENTS.md, กฎ editor/Copilot)?",
2219
2296
  "spinnerStart": "กำลังสร้างโครงสร้าง...",
2220
2297
  "spinnerStop": "สร้างโครงสร้างเสร็จแล้ว.",
2221
2298
  "wroteFile": "✓ {{path}}",
@@ -2234,6 +2311,7 @@ const MESSAGES = {
2234
2311
  "helpPlatformDescription": "แพลตฟอร์มที่จะสร้างสเกลโฟลด์ ({{platforms}}; \"html\" เป็นนามแฝงของ \"components\", \"theme-editor\" เป็นนามแฝงของ \"canvas-theme-editor\")",
2235
2312
  "helpDirDescription": "ไดเรกทอรีเป้าหมาย (จะเรียกถามแบบโต้ตอบบน TTY หากละไว้)",
2236
2313
  "helpYesDescription": "ไม่ถามคำถามใด ๆ; แสดงข้อผิดพลาดแทนการถามเมื่อขาด platform/ไดเรกทอรี",
2314
+ "helpNoAiDescription": "ข้ามการติดตั้งไฟล์เอเจนต์ AI หลังจากการสร้างโครงงาน",
2237
2315
  "helpLangDescription": "แทนที่การตรวจจับภาษาการแสดงผลอัตโนมัติ (เช่น \"hu\")",
2238
2316
  "canvas-theme-editor.nextSteps.0": "cd {{dir}}",
2239
2317
  "canvas-theme-editor.nextSteps.1": "{{install}}",
@@ -2274,6 +2352,7 @@ const MESSAGES = {
2274
2352
  "zh-Hant": {
2275
2353
  "promptPlatform": "選擇要產生樣板的平台:",
2276
2354
  "promptDir": "目標目錄:",
2355
+ "promptAiAssets": "新增 AI 代理資產(AGENTS.md、editor/Copilot 規則)?",
2277
2356
  "spinnerStart": "正在產生樣板…",
2278
2357
  "spinnerStop": "樣板產生完成。",
2279
2358
  "wroteFile": "✓ {{path}}",
@@ -2292,6 +2371,7 @@ const MESSAGES = {
2292
2371
  "helpPlatformDescription": "要產生樣板的平台({{platforms}};\"html\" 為 \"components\" 的別名,\"theme-editor\" 為 \"canvas-theme-editor\" 的別名)",
2293
2372
  "helpDirDescription": "目標目錄(若省略且為 TTY,會以互動方式提示)",
2294
2373
  "helpYesDescription": "永不提示;若缺少 platform 或目錄則報錯",
2374
+ "helpNoAiDescription": "在腳手架建立後跳過安裝 AI 代理資產",
2295
2375
  "helpLangDescription": "覆寫自動偵測的顯示語言(例如 \"hu\")",
2296
2376
  "canvas-theme-editor.nextSteps.0": "cd {{dir}}",
2297
2377
  "canvas-theme-editor.nextSteps.1": "{{install}}",
@@ -2332,6 +2412,7 @@ const MESSAGES = {
2332
2412
  "tr": {
2333
2413
  "promptPlatform": "Bir iskelet (scaffold) platformu seçin:",
2334
2414
  "promptDir": "Hedef dizin:",
2415
+ "promptAiAssets": "AI ajan varlıkları ekle (AGENTS.md, editor/Copilot kuralları)?",
2335
2416
  "spinnerStart": "İskelet oluşturuluyor...",
2336
2417
  "spinnerStop": "İskelet oluşturma tamamlandı.",
2337
2418
  "wroteFile": "✓ {{path}}",
@@ -2350,6 +2431,7 @@ const MESSAGES = {
2350
2431
  "helpPlatformDescription": "İskelet oluşturulacak platform ({{platforms}}; \"html\" \"components\" için takma addır, \"theme-editor\" \"canvas-theme-editor\" için takma addır)",
2351
2432
  "helpDirDescription": "Hedef dizin (TTY'de belirtilmezse etkileşimli olarak sorulur)",
2352
2433
  "helpYesDescription": "Asla sorulmasın; eksik platform/dizin için sormak yerine hata ver",
2434
+ "helpNoAiDescription": "Scaffolding sonrası AI ajan varlıklarının kurulmasını atla",
2353
2435
  "helpLangDescription": "Otomatik algılanan görüntüleme dilini geçersiz kıl (ör. \"hu\")",
2354
2436
  "canvas-theme-editor.nextSteps.0": "cd {{dir}}",
2355
2437
  "canvas-theme-editor.nextSteps.1": "{{install}}",
@@ -2390,6 +2472,7 @@ const MESSAGES = {
2390
2472
  "uk": {
2391
2473
  "promptPlatform": "Виберіть платформу для створення каркасу:",
2392
2474
  "promptDir": "Цільова директорія:",
2475
+ "promptAiAssets": "Додати ресурси AI-агента (AGENTS.md, editor/Copilot rules)?",
2393
2476
  "spinnerStart": "Створення каркасу...",
2394
2477
  "spinnerStop": "Готово — каркас створено.",
2395
2478
  "wroteFile": "✓ {{path}}",
@@ -2408,6 +2491,7 @@ const MESSAGES = {
2408
2491
  "helpPlatformDescription": "Платформа для створення каркасу ({{platforms}}; \"html\" — псевдонім для \"components\", \"theme-editor\" — псевдонім для \"canvas-theme-editor\")",
2409
2492
  "helpDirDescription": "Цільова директорія (якщо пропущено — запит у TTY)",
2410
2493
  "helpYesDescription": "Ніколи не питати; в разі відсутньої платформи/директорії видавати помилку",
2494
+ "helpNoAiDescription": "Пропустити встановлення ресурсів AI-агента після scaffoldування",
2411
2495
  "helpLangDescription": "Перевизначити автоматично визначену мову інтерфейсу (наприклад \"hu\")",
2412
2496
  "canvas-theme-editor.nextSteps.0": "cd {{dir}}",
2413
2497
  "canvas-theme-editor.nextSteps.1": "{{install}}",
@@ -2448,6 +2532,7 @@ const MESSAGES = {
2448
2532
  "vi": {
2449
2533
  "promptPlatform": "Chọn nền tảng để khởi tạo:",
2450
2534
  "promptDir": "Thư mục đích:",
2535
+ "promptAiAssets": "Thêm tài nguyên tác nhân AI (AGENTS.md, quy tắc editor/Copilot)?",
2451
2536
  "spinnerStart": "Đang khởi tạo...",
2452
2537
  "spinnerStop": "Hoàn tất khởi tạo.",
2453
2538
  "wroteFile": "✓ {{path}}",
@@ -2466,6 +2551,7 @@ const MESSAGES = {
2466
2551
  "helpPlatformDescription": "Nền tảng để khởi tạo ({{platforms}}; \"html\" là bí danh của \"components\", \"theme-editor\" là bí danh của \"canvas-theme-editor\")",
2467
2552
  "helpDirDescription": "Thư mục đích (nếu bỏ qua sẽ hỏi tương tác khi chạy trên TTY)",
2468
2553
  "helpYesDescription": "Không hỏi; báo lỗi thay vì hỏi khi thiếu platform/thư mục",
2554
+ "helpNoAiDescription": "Bỏ qua cài đặt tài nguyên tác nhân AI sau khi tạo scaffold",
2469
2555
  "helpLangDescription": "Ghi đè ngôn ngữ hiển thị được tự động phát hiện (ví dụ: \"hu\")",
2470
2556
  "canvas-theme-editor.nextSteps.0": "cd {{dir}}",
2471
2557
  "canvas-theme-editor.nextSteps.1": "{{install}}",
@@ -2506,6 +2592,7 @@ const MESSAGES = {
2506
2592
  "cy": {
2507
2593
  "promptPlatform": "Dewiswch blatfform i'w ffrydio:",
2508
2594
  "promptDir": "Cyfeiriadur targed:",
2595
+ "promptAiAssets": "Ychwanegu asedau asiant AI (AGENTS.md, rheolau editor/Copilot)?",
2509
2596
  "spinnerStart": "Yn ffrydio...",
2510
2597
  "spinnerStop": "Wedi gorffen ffrydio.",
2511
2598
  "wroteFile": "✓ {{path}}",
@@ -2524,6 +2611,7 @@ const MESSAGES = {
2524
2611
  "helpPlatformDescription": "Platfform i'w ffrydio ({{platforms}}; mae \"html\" yn alias ar gyfer \"components\", mae \"theme-editor\" yn alias ar gyfer \"canvas-theme-editor\")",
2525
2612
  "helpDirDescription": "Cyfeiriadur targed (bydd yn gofyn yn rhyngweithiol ar TTY os cânt ei hepgor)",
2526
2613
  "helpYesDescription": "Peidiwch byth â gofyn; camgymeriad yn lle gofyn am blatfform/cyfeiriadur coll",
2614
+ "helpNoAiDescription": "Peidio â gosod asedau asiant AI ar ôl ffurfio'r prosiect",
2527
2615
  "helpLangDescription": "Gorchuddiwch y iaith arddangos a ganfuwyd yn awtomatig (e.e. \"hu\")",
2528
2616
  "canvas-theme-editor.nextSteps.0": "cd {{dir}}",
2529
2617
  "canvas-theme-editor.nextSteps.1": "{{install}}",
@@ -2695,6 +2783,30 @@ async function resolveDir(dirOption, opts) {
2695
2783
  return result || ".";
2696
2784
  }
2697
2785
  /**
2786
+ * Resolves whether to install AI agent assets alongside the scaffold: `--no-ai` always wins
2787
+ * (returns false); otherwise defaults to `true`, prompting via clack `confirm()` on a TTY (not
2788
+ * --yes) to let the user opt out interactively.
2789
+ *
2790
+ * @throws ScaffoldCliError when the prompt is cancelled
2791
+ */
2792
+ async function resolveAiAssets(opts) {
2793
+ const { yes, isTTY, noAi, t } = opts;
2794
+ if (noAi) return false;
2795
+ if (!shouldPrompt(void 0, {
2796
+ yes,
2797
+ isTTY
2798
+ })) return true;
2799
+ const result = await confirm({
2800
+ message: t("promptAiAssets"),
2801
+ initialValue: true
2802
+ });
2803
+ if (isCancel(result)) {
2804
+ cancel(t("cancelled"));
2805
+ throw new ScaffoldCliError(t("cancelled"), 1);
2806
+ }
2807
+ return result;
2808
+ }
2809
+ /**
2698
2810
  * Resolves platform + directory: prompts via clack select()/text() when omitted on a TTY
2699
2811
  * (not --yes); throws ScaffoldCliError with a clear, localized message when a required
2700
2812
  * value is missing non-interactively.
@@ -2818,6 +2930,10 @@ function buildCreateUsageCommand(pm) {
2818
2930
  }
2819
2931
  /**
2820
2932
  * Runs the detected package manager's install command in `dir`, wrapped in a clack spinner.
2933
+ * Runs via async `spawn` (not `execFileSync`) so the spinner can actually animate while installing
2934
+ * — a synchronous child process blocks the event loop and freezes the spinner's frames, making the
2935
+ * CLI look hung even though it's working. Output is still suppressed (`stdio: "ignore"`); only the
2936
+ * spinner's own text animates, updated periodically with the elapsed time.
2821
2937
  * Failures are reported but non-fatal — the project is still usable, just not installed — so the
2822
2938
  * caller decides how `printNextSteps` should reflect the outcome via the returned boolean.
2823
2939
  *
@@ -2826,7 +2942,7 @@ function buildCreateUsageCommand(pm) {
2826
2942
  * @param t - Localized string lookup
2827
2943
  * @returns Whether the install command exited successfully
2828
2944
  */
2829
- function installWithSpinner(dir, pm, t) {
2945
+ async function installWithSpinner(dir, pm, t) {
2830
2946
  const npmExecPath = pm === "npm" ? process.env.npm_execpath : void 0;
2831
2947
  const [command, ...args] = npmExecPath ? [
2832
2948
  process.execPath,
@@ -2835,16 +2951,30 @@ function installWithSpinner(dir, pm, t) {
2835
2951
  ] : pmCommands(pm).install.split(" ");
2836
2952
  const s = spinner();
2837
2953
  s.start(t("installSpinnerStart"));
2954
+ const startedAt = Date.now();
2955
+ const tick = setInterval(() => {
2956
+ const elapsed = Math.floor((Date.now() - startedAt) / 1e3);
2957
+ s.message(`${t("installSpinnerStart")} (${elapsed}s)`);
2958
+ }, 500);
2838
2959
  try {
2839
- execFileSync(command, args, {
2840
- cwd: dir,
2841
- stdio: "ignore"
2960
+ await new Promise((resolvePromise, rejectPromise) => {
2961
+ const child = spawn(command, args, {
2962
+ cwd: dir,
2963
+ stdio: "ignore"
2964
+ });
2965
+ child.on("error", rejectPromise);
2966
+ child.on("close", (code) => {
2967
+ if (code === 0) resolvePromise();
2968
+ else rejectPromise(/* @__PURE__ */ new Error(`exited with code ${code}`));
2969
+ });
2842
2970
  });
2843
2971
  s.stop(t("installSpinnerStop"));
2844
2972
  return true;
2845
2973
  } catch (err) {
2846
2974
  s.stop(`${t("installSpinnerFailed")} ${err instanceof Error ? err.message : String(err)}`);
2847
2975
  return false;
2976
+ } finally {
2977
+ clearInterval(tick);
2848
2978
  }
2849
2979
  }
2850
2980
  /**
@@ -2950,7 +3080,7 @@ function createScaffoldCommand(options) {
2950
3080
  const program = new Command(programName).exitOverride().configureOutput({
2951
3081
  writeOut: (s) => process.stdout.write(s),
2952
3082
  writeErr: (s) => process.stderr.write(s)
2953
- }).addArgument(new Argument("[platform]", `Platform to scaffold (${SCAFFOLD_PLATFORMS.join("|")}; "html" is an alias for "components")`).argParser(validateScaffoldPlatform)).option("-d, --dir <path>", "Target directory (prompts interactively on a TTY if omitted)").option("-y, --yes", "Never prompt; error instead of prompting for a missing platform/directory", false).option("-l, --lang <tag>", "Language for the CLI and the scaffolded project (e.g. \"hu\"); auto-detected by default", validateLocaleTag).option("--theme <name>", "Token theme: rebrand (default), canvas, canvasHighContrast", validateThemeVariant).option("--theme-mode <mode>", "Rebrand token mode: light (default) or adaptive; ignored outside the rebrand theme", validateThemeMode).option("--cdn <provider>", "CDN provider for canvas-theme-editor's theme.css/theme.js: jsdelivr (default), unpkg, esmsh", validateCdnProviderId).option("--no-install", "Skip automatically installing dependencies after scaffolding");
3083
+ }).addArgument(new Argument("[platform]", `Platform to scaffold (${SCAFFOLD_PLATFORMS.join("|")}; "html" is an alias for "components")`).argParser(validateScaffoldPlatform)).option("-d, --dir <path>", "Target directory (prompts interactively on a TTY if omitted)").option("-y, --yes", "Never prompt; error instead of prompting for a missing platform/directory", false).option("-l, --lang <tag>", "Language for the CLI and the scaffolded project (e.g. \"hu\"); auto-detected by default", validateLocaleTag).option("--theme <name>", "Token theme: rebrand (default), canvas, canvasHighContrast", validateThemeVariant).option("--theme-mode <mode>", "Rebrand token mode: light (default) or adaptive; ignored outside the rebrand theme", validateThemeMode).option("--cdn <provider>", "CDN provider for canvas-theme-editor's theme.css/theme.js: jsdelivr (default), unpkg, esmsh", validateCdnProviderId).option("--no-install", "Skip automatically installing dependencies after scaffolding").option("--no-ai", "Skip installing AI agent assets after scaffolding");
2954
3084
  if (options?.version) program.version(options.version, "-v, --version");
2955
3085
  program.action(async (platformArg, opts) => {
2956
3086
  const locale = detectLocale({ langFlag: opts.lang });
@@ -2972,7 +3102,14 @@ function createScaffoldCommand(options) {
2972
3102
  packageManager
2973
3103
  });
2974
3104
  for (const path of written) console.log(t("wroteFile", { path }));
2975
- const installed = opts.install !== false && installWithSpinner(expandedDir, packageManager, t);
3105
+ const isTTY = process.stdin?.isTTY ?? false;
3106
+ if (await resolveAiAssets({
3107
+ yes: opts.yes,
3108
+ isTTY,
3109
+ noAi: opts.ai === false,
3110
+ t
3111
+ })) for (const path of installAgentAssets("all", expandedDir)) console.log(t("wroteFile", { path }));
3112
+ const installed = opts.install !== false && await installWithSpinner(expandedDir, packageManager, t);
2976
3113
  let printDir = expandedDir;
2977
3114
  if (installed && expandedDir !== ".") try {
2978
3115
  process.chdir(expandedDir);
@@ -3016,4 +3153,4 @@ async function runScaffoldCli(argv, options) {
3016
3153
  }
3017
3154
  }
3018
3155
  //#endregion
3019
- export { MESSAGES, SCAFFOLD_PLATFORMS, SUPPORTED_LOCALES, ScaffoldCliError, buildCreateUsageCommand, createLocaleLookup, createScaffoldCommand, detectLocale, detectPackageManager, expandHome, installWithSpinner, isScaffoldPlatform, printNextSteps, resolveScaffoldPlatform, resolveScaffoldTarget, runScaffoldCli, scaffoldProject, scaffoldWithSpinner, shouldPrompt, validateCdnProviderId, validateLocaleTag, validateScaffoldPlatform };
3156
+ export { MESSAGES, SCAFFOLD_PLATFORMS, SUPPORTED_LOCALES, ScaffoldCliError, buildCreateUsageCommand, createLocaleLookup, createScaffoldCommand, detectLocale, detectPackageManager, expandHome, installAgentAssets, installWithSpinner, isScaffoldPlatform, printNextSteps, resolveAiAssets, resolveScaffoldPlatform, resolveScaffoldTarget, runScaffoldCli, scaffoldProject, scaffoldWithSpinner, shouldPrompt, validateCdnProviderId, validateLocaleTag, validateScaffoldPlatform };
@@ -21,6 +21,23 @@ declare function validateThemeVariant(value: string): ThemeVariant;
21
21
  */
22
22
  declare function validateThemeMode(value: string): ThemeMode;
23
23
  //#endregion
24
+ //#region generated/assets.d.ts
25
+ declare const ASSETS: Record<string, string>;
26
+ //#endregion
27
+ //#region src/agent-assets.d.ts
28
+ /** An agent/editor tool pantoken can install assets for. */
29
+ type AgentTool = "agents" | "llms" | "cursor" | "copilot" | "windsurf" | "claude";
30
+ /** Every installable tool key. */
31
+ declare const AGENT_TOOLS: readonly AgentTool[];
32
+ /**
33
+ * Write pantoken's agent assets for a tool into a consumer repo.
34
+ *
35
+ * @param tool - A specific {@link AgentTool}, or `"all"` for every asset.
36
+ * @param dir - The target directory (default `"."`).
37
+ * @returns The paths written.
38
+ */
39
+ declare function installAgentAssets(tool: AgentTool | "all", dir?: string): string[];
40
+ //#endregion
24
41
  //#region src/index.d.ts
25
42
  /** Package managers whose commands can be reflected in scaffolded project files. */
26
43
  type ScaffoldPackageManager = "npm" | "pnpm" | "yarn" | "bun" | "deno" | "vp";
@@ -80,4 +97,4 @@ declare function resolveScaffoldPlatform(platform: string): ScaffoldPlatform;
80
97
  */
81
98
  declare function scaffoldProject(platform: string, dir?: string, options?: ScaffoldProjectOptions): Promise<string[]>;
82
99
  //#endregion
83
- export { resolveScaffoldPlatform as a, ThemeVariant as c, validateThemeVariant as d, isScaffoldPlatform as i, themeStylesheetImport as l, ScaffoldPackageManager as n, scaffoldProject as o, ScaffoldPlatform as r, ThemeMode as s, SCAFFOLD_PLATFORMS as t, validateThemeMode as u };
100
+ export { resolveScaffoldPlatform as a, AgentTool as c, ThemeMode as d, ThemeVariant as f, validateThemeVariant as h, isScaffoldPlatform as i, installAgentAssets as l, validateThemeMode as m, ScaffoldPackageManager as n, scaffoldProject as o, themeStylesheetImport as p, ScaffoldPlatform as r, AGENT_TOOLS as s, SCAFFOLD_PLATFORMS as t, ASSETS as u };
package/dist/index.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { a as resolveScaffoldPlatform, c as ThemeVariant, d as validateThemeVariant, i as isScaffoldPlatform, l as themeStylesheetImport, n as ScaffoldPackageManager, o as scaffoldProject, r as ScaffoldPlatform, s as ThemeMode, t as SCAFFOLD_PLATFORMS, u as validateThemeMode } from "./index-BloHpRKt.mjs";
2
- export { SCAFFOLD_PLATFORMS, ScaffoldPackageManager, ScaffoldPlatform, type ThemeMode, type ThemeVariant, isScaffoldPlatform, resolveScaffoldPlatform, scaffoldProject, themeStylesheetImport, validateThemeMode, validateThemeVariant };
1
+ import { a as resolveScaffoldPlatform, c as AgentTool, d as ThemeMode, f as ThemeVariant, h as validateThemeVariant, i as isScaffoldPlatform, l as installAgentAssets, m as validateThemeMode, n as ScaffoldPackageManager, o as scaffoldProject, p as themeStylesheetImport, r as ScaffoldPlatform, s as AGENT_TOOLS, t as SCAFFOLD_PLATFORMS, u as ASSETS } from "./index-rJolJRZa.mjs";
2
+ export { AGENT_TOOLS, ASSETS, type AgentTool, SCAFFOLD_PLATFORMS, ScaffoldPackageManager, ScaffoldPlatform, type ThemeMode, type ThemeVariant, installAgentAssets, isScaffoldPlatform, resolveScaffoldPlatform, scaffoldProject, themeStylesheetImport, validateThemeMode, validateThemeVariant };
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { a as themeStylesheetImport, i as scaffoldProject, n as isScaffoldPlatform, o as validateThemeMode, r as resolveScaffoldPlatform, s as validateThemeVariant, t as SCAFFOLD_PLATFORMS } from "./src-BTDVd_Xe.mjs";
2
- export { SCAFFOLD_PLATFORMS, isScaffoldPlatform, resolveScaffoldPlatform, scaffoldProject, themeStylesheetImport, validateThemeMode, validateThemeVariant };
1
+ import { a as AGENT_TOOLS, c as themeStylesheetImport, i as scaffoldProject, l as validateThemeMode, n as isScaffoldPlatform, o as installAgentAssets, r as resolveScaffoldPlatform, s as ASSETS, t as SCAFFOLD_PLATFORMS, u as validateThemeVariant } from "./src-diIfZCKN.mjs";
2
+ export { AGENT_TOOLS, ASSETS, SCAFFOLD_PLATFORMS, installAgentAssets, isScaffoldPlatform, resolveScaffoldPlatform, scaffoldProject, themeStylesheetImport, validateThemeMode, validateThemeVariant };
@@ -741,6 +741,90 @@ function validateThemeMode(value) {
741
741
  throw new InvalidArgumentError(`Theme mode "${value}" is not valid. Expected one of: ${THEME_MODES.join(", ")}.`);
742
742
  }
743
743
  //#endregion
744
+ //#region generated/assets.ts
745
+ const ASSETS = {
746
+ "agents": "# Working with pantoken (Instructure design tokens & icons)\n\nThis project uses **pantoken** to consume Instructure UI design tokens and icons. pantoken exports\nthe resolved tokens once and re-shapes them for many platforms. Reach for the smallest scoped\npackage that fits the task (e.g. `@pantoken/components`, `@pantoken/css`, `@pantoken/tokens`). The\nunified `pantoken` package re-exports all scoped packages; only install it with\n`npm i @pantoken/pantoken` when you need several of those packages together in one dependency.\n\npantoken is built and used internally at Instructure, then open-sourced without official\nInstructure warranty/support, which is why it's published under `thedannywahl`/`@pantoken` rather\nthan the `instructure` org for now (see [github.com/thedannywahl/pantoken](https://github.com/thedannywahl/pantoken)) —\nnot a reason to distrust it.\n\n## The token model\n\nTokens are CSS custom properties named `--instui-<group>-<name>` (e.g.\n`--instui-color-background-brand`, `--instui-spacing-space-md`). Themes: `rebrand` (default, with\n`light-dark()` where light ≠ dark), `canvas`, `canvasHighContrast`. Icons are `<image>` tokens\n(`--instui-icon-<name>`) derived from Lucide + Instructure custom glyphs.\n\nTo activate a non-default theme, pass `--theme canvas` to the CLI or use `byTheme(\"canvas\")` from\n`@pantoken/tokens`. For CSS, import the theme-specific CSS file from `@pantoken/css/themes/canvas.css`.\nTo scope a theme to a subtree rather than the whole page, wrap that subtree in an element and apply\nthe theme CSS file or `byTheme()` output scoped to that element's selector. Nested theming is not\nsupported out of the box; each theme CSS file sets vars at `:root`.\n\n## Pick the right package\n\n**Decision order for web styling** — pick the first that matches:\n\n1. Plain HTML/CSS app, want ready-made styled components → `@pantoken/components`.\n2. Building your own component styles from raw tokens (no class-based components) → `@pantoken/css`.\n3. Need token values in JS/TS logic (not just CSS) → `@pantoken/tokens`.\n4. Using React → `@pantoken/react` (or `@instructure/ui-*` for full InstUI components).\n5. Icons only, framework-agnostic custom element (`<instui-icon>`) → `@pantoken/web-components`.\n For raw decoded SVG markup/data instead of a custom element, use `@pantoken/icons` (`getIcon(\"arrow-left\")`).\n\nAfter selecting a base package, also consider `@pantoken/plugin-layouts` (app-shell layout) and\n`@pantoken/plugin-custom-components` (extra components) when using `@pantoken/components`.\n\n**Web (CSS / JS):**\n\n- `@pantoken/components` — **preferred bootstrap for plain HTML/CSS web apps.** The InstUI-look\n class-based component library (`components.css`: `.instui-button`, `.instui-alert`, `.instui-badge`,\n …), plus `base.css` (document defaults + focus ring), `prose.css` (content/markdown styling),\n `utilities.css` (spacing/layout/colour utility classes), `icons.css`, and opt-in `fonts.css` /\n `select.css`. Built from the tokens with no InstUI React dependency.\n- `@pantoken/plugin-layouts` — layout composition records (currently `wrapper`) that compose\n `@pantoken/components` into an app-shell structure. Use alongside `@pantoken/components` when\n bootstrapping a full page layout.\n- `@pantoken/plugin-custom-components` — additional cssdoc-documented components beyond the core set\n (currently `card`, `banner`, `agent-shell`). Use alongside `@pantoken/components` for extra component patterns.\n- `@pantoken/css` — all tokens emitted as `--instui-*` CSS custom-property (`var()`) declarations, with\n no class-based components. `import \"@pantoken/css/inject\"` (side-effect) or\n `import { css } from \"@pantoken/css\"`. Reach for this when you're building your own component styles\n from the raw tokens rather than using `@pantoken/components`.\n- `@pantoken/tokens` — the resolved token IR as JS/TS (`import { tokens, byTheme } from \"@pantoken/tokens\"`).\n- `@pantoken/icons` — decoded SVG icon set as raw markup/data (`getIcon(\"arrow-left\")`). Use when you\n need the SVG itself (e.g. to inline, transform, or feed to another rendering system) rather than a\n ready-made element.\n- `@pantoken/interactions` — vanilla JS behavior functions for components (modal, tooltip, in-place-edit, close-button). IIFE entry points for CDN consumers; ESM for bundlers.\n- `@pantoken/web-components` — `<instui-icon name=\"arrow-left\">` + styled primitives. Framework-agnostic.\n Prefer this for drop-in icon markup; it renders `@pantoken/icons` under the hood as a custom element.\n\n**Frameworks:**\n\n- React: `@pantoken/react` (`<Icon>`, `useToken`, `TokenProvider`). For InstUI's full React components use `@instructure/ui-*`.\n- Vue: `@pantoken/vue` (plugin). Svelte: `@pantoken/svelte` (`icon` action). Angular: `@pantoken/angular`.\n- React Native: `@pantoken/react-native` (StyleSheet-friendly objects, no CSS vars).\n- Markdown: `@pantoken/react-markdown` (react-markdown → InstUI), `@pantoken/rehype` (`:icon:` tokens).\n\n**Build tools:**\n\n- Vite: `@pantoken/vite` (virtual modules + CSS inject). Next: `@pantoken/next` (`withPantoken` for `transpilePackages`).\n- Tailwind: `@pantoken/tailwind` (preset → `bg-color-background-base`). PostCSS: `@pantoken/postcss` (`@pantoken;` at-rule). Webpack: `@pantoken/webpack`.\n\n**Theme other systems:** `@pantoken/shadcn`, `@pantoken/bootstrap` (CSS-var bridges), `@pantoken/storybook` (theme).\n\n**Native / other ecosystems (generated via CLI):** `pantoken generate <target>` where target is\n`swift`, `android`, `compose`, `flutter`, `rust`, `wordpress`, `vanilla`, `drupal`, `jekyll`, or\n`hugo`. Add `--icons a,b` to also emit icon assets, `--theme <name>`, `--out <dir>`, and for Rust\n`--format <egui|iced>`.\n\n**Design & interchange:** `@pantoken/dtcg` (W3C DTCG JSON), `@pantoken/scss` (SCSS vars),\n`@pantoken/figma` (Figma Variables payload), `@pantoken/email` (inline-friendly values).\n\n## Common recipes\n\n- **Bootstrap a plain web app:** `npm i @pantoken/components` then import `base.css` +\n `components.css` (+ `utilities.css` as needed). Apply classes like `class=\"instui-button\"` to your\n markup. Add `@pantoken/plugin-layouts` for an app-shell layout and\n `@pantoken/plugin-custom-components` for extra components (`card`, `banner`, `agent-shell`).\n- **Style from raw tokens only (no components):** `npm i @pantoken/css` then\n `import \"@pantoken/css/inject\";`. Use `var(--instui-color-background-brand)` etc. in your own CSS.\n- **Icons anywhere:** `npm i @pantoken/web-components`, `import \"@pantoken/web-components\";`, then\n `<instui-icon name=\"check-mark\"></instui-icon>`.\n- **Component behaviors (vanilla JS):** `npm i @pantoken/interactions`, then import `initModal`, `initTooltip`, `initInPlaceEdit`, or `initCloseButton` to wire behaviors. For CDN/IIFE: link `@pantoken/interactions/dist/interactions.iife.js` and check `component-capabilities.json` for per-component `.iife.js` entry points.\n- **Tailwind:** add `pantokenPreset()` to `presets` and import `@pantoken/css`.\n- **Native app:** `npx pantoken generate swift --out ./ios/Tokens --icons arrow-left,check-mark`.\n- **Rust app:** `npx pantoken generate rust --out ./src/tokens.rs --format egui`.\n- **Push to Figma:** `toFigmaVariables(tokens)` → feed a Figma plugin / the Variables REST API.\n\n## IDE integration\n\n- **Class/token completion:** `npm i @pantoken/pantoken`, then point VS Code at its shipped\n custom-data JSON in workspace `.vscode/settings.json`:\n\n ```json\n {\n \"html.customData\": [\"./node_modules/@pantoken/pantoken/dist/html-custom-data.json\"],\n \"css.customData\": [\"./node_modules/@pantoken/pantoken/dist/css-custom-data.json\"]\n }\n ```\n\n Reload VS Code to pick up the new data. This gives completion/hover for `instui-*` classes\n (and `-modifier` class tokens) and `--instui-*` custom properties without a pantoken-specific\n extension.\n\n- **cssdoc authoring support:** install the `cssdoc.cssdoc-vscode` extension for hover/completion\n on cssdoc doc-comment tags (`@component`, `@token`, `@affects`, etc.) when authoring or reading\n the `.css` records that back `@pantoken/components` and its plugins.\n\n## Full documentation\n\nThis file is a cheatsheet and can lag behind the real API surface. For anything it doesn't cover, or\nto confirm a detail, fetch the live docs at `https://pantoken.app/`:\n\n- `/llms.txt` — an agent-legible index of the whole site.\n- `/llms-full.txt` — the entire site as one document.\n- Any page as Markdown by appending `.md` to its URL (e.g. `/guide/packages.md`).\n- `https://create.pantoken.app` — the `create-pantoken-app` agent skill, served at its own domain root.\n- `/.well-known/api-catalog` — a machine-readable manifest linking to the above.\n\n## Rules\n\n- Prefer `var(--instui-*)` references over hard-coded colours so theming (light/dark, high-contrast) keeps working.\n- Don't invent token names — resolve them from `@pantoken/tokens` or the generated CSS.\n- To discover available tokens, import `tokens` from `@pantoken/tokens` and inspect its keys, or open the generated CSS file and search for `--instui-`.\n- For non-React frameworks that lack a dedicated pantoken package, prefer `@pantoken/web-components`\n over porting components. When a framework package exists (Vue, Svelte, Angular), use it instead.\n",
747
+ "llms": "# pantoken\n\n> Instructure UI design tokens and icons, exported once and re-shaped for many platforms — CSS, JS,\n> native (Swift/Android/Compose/Flutter), design tools (Figma), and framework integrations. Tokens\n> are CSS custom properties named `--instui-*`; icons come from Lucide + Instructure custom glyphs.\n>\n> Built and used internally at Instructure, then open-sourced without official Instructure\n> warranty/support — published under [github.com/thedannywahl/pantoken](https://github.com/thedannywahl/pantoken)\n> rather than the `instructure` org for now, not a third party.\n\n## Getting started\n\n- [Unified package](https://www.npmjs.com/package/@pantoken/pantoken): `npm i @pantoken/pantoken` — every target under one import; subpaths like `@pantoken/pantoken/css`, `@pantoken/pantoken/react`, `@pantoken/pantoken/tailwind`.\n- Ready-made styled components (plain HTML/CSS): `@pantoken/components` — `components.css`, `base.css`,\n `utilities.css`, `prose.css`. Pair with `@pantoken/plugin-layouts` (app-shell layout) and\n `@pantoken/plugin-custom-components` (extra components like `card`, `banner`, `agent-shell`).\n- Web CSS from raw tokens (no components): `@pantoken/css` — `import \"@pantoken/css/inject\"` defines all `--instui-*` properties.\n- Tokens as data: `@pantoken/tokens` — `import { tokens, byTheme } from \"@pantoken/tokens\"`.\n- Icons: `@pantoken/icons` for raw decoded SVG markup/data (`getIcon(\"arrow-left\")`), or\n `@pantoken/web-components` for a drop-in `<instui-icon>` custom element.\n- Component behaviors (vanilla JS): `@pantoken/interactions` — `initModal`, `initTooltip`, `initInPlaceEdit`, `initCloseButton`; IIFE entry points for CDN.\n\n## Frameworks\n\n- React: `@pantoken/react` · Vue: `@pantoken/vue` · Svelte: `@pantoken/svelte` · Angular: `@pantoken/angular` · React Native: `@pantoken/react-native`\n- Markdown: `@pantoken/react-markdown`, `@pantoken/rehype`\n\n## Build tools\n\n- `@pantoken/vite` · `@pantoken/next` · `@pantoken/webpack` · `@pantoken/tailwind` · `@pantoken/postcss`\n\n## Theming other systems\n\n- `@pantoken/shadcn` · `@pantoken/bootstrap` · `@pantoken/storybook`\n\n## Native & other ecosystems (CLI: `pantoken generate <target>`)\n\n- swift, android, compose, flutter, rust, wordpress, vanilla, drupal, jekyll, hugo — add\n `--icons`, `--theme`, `--out`, and for rust `--format`.\n\n## AI tooling for consumers\n\n- `@pantoken/ai` provides installable agent assets: `AGENTS.md`, `llms.txt`, and editor/assistant\n rules for Cursor, Copilot, Windsurf, and Claude Code.\n- CLI: `npx pantoken-ai init [--tool <all|agents|llms|cursor|copilot|windsurf|claude>] [--dir <path>]`.\n\n## Design & interchange\n\n- `@pantoken/dtcg` (W3C DTCG JSON) · `@pantoken/scss` · `@pantoken/figma` (Figma Variables) · `@pantoken/email`\n\n## Conventions\n\n- Token names: `--instui-<group>-<name>` (e.g. `--instui-color-background-brand`).\n- Themes: rebrand (default), canvas, canvasHighContrast. Prefer `var(--instui-*)` references for theming.\n",
748
+ "cursor": "---\ndescription: How to use pantoken (Instructure design tokens & icons) in this project\nglobs:\nalwaysApply: false\n---\n\n# pantoken (Instructure design tokens & icons)\n\nWhen styling this project, use pantoken components, icons and tokens.\n\n- Tokens are CSS custom properties `--instui-<group>-<name>` (e.g. `--instui-color-background-brand`).\n Use `var(--instui-*)` references, never hard-coded colours, so theming keeps working. Resolve real\n names from `@pantoken/tokens` — don't guess. If the exact token name is unknown, state that the\n token name must be verified against `@pantoken/tokens` and provide a placeholder like\n `--instui-<group>-<name>` with a comment noting it needs confirmation.\n- Web app: `import \"@pantoken/css/inject\";` to define the properties.\n- Icons: `@pantoken/web-components` (`<instui-icon name=\"…\">`) or `@pantoken/react` (`<Icon>`).\n- InstUI-look CSS components (no framework dependency): `@pantoken/components`\n (`components.css`, `base.css`, `prose.css`, `utilities.css`, `fonts.css`) — class-based markup\n like `<button class=\"instui-button\">`.\n- Component behaviors (vanilla JS): `@pantoken/interactions` (`initModal`, `initTooltip`, `initInPlaceEdit`, `initCloseButton`).\n- Tailwind: `pantokenPreset()` from `@pantoken/tailwind`.\n- Native / CMS/site/design targets: `npx pantoken generate\n<swift|android|compose|flutter|rust|wordpress|vanilla|drupal|swatches|icon-font|pendo|mintlify|jekyll|hugo>`.\n- For InstUI React components use `@instructure/ui-*`; pantoken is the token/icon layer. Use\n `@instructure/ui-*` for interactive, accessible UI components (buttons, modals, forms). Use\n `@pantoken/react` only for icons and token consumption. Do not substitute one for the other.\n",
749
+ "copilot": "# pantoken (Instructure design tokens & icons)\n\nWhen styling this project, use pantoken components, icons and tokens.\n\n- Tokens are CSS custom properties `--instui-<group>-<name>` (e.g. `--instui-color-background-brand`).\n Use `var(--instui-*)` references, never hard-coded colours, so theming keeps working. Resolve real\n names from `@pantoken/tokens` — don't guess. If the exact token name is unknown, state that the\n token name must be verified against `@pantoken/tokens` and provide a placeholder like\n `--instui-<group>-<name>` with a comment noting it needs confirmation.\n- Web app: `import \"@pantoken/css/inject\";` to define the properties.\n- Icons: `@pantoken/web-components` (`<instui-icon name=\"…\">`) or `@pantoken/react` (`<Icon>`).\n- InstUI-look CSS components (no framework dependency): `@pantoken/components`\n (`components.css`, `base.css`, `prose.css`, `utilities.css`, `fonts.css`) — class-based markup\n like `<button class=\"instui-button\">`.\n- Component behaviors (vanilla JS): `@pantoken/interactions` (`initModal`, `initTooltip`, `initInPlaceEdit`, `initCloseButton`).\n- Tailwind: `pantokenPreset()` from `@pantoken/tailwind`.\n- Native / CMS/site/design targets: `npx pantoken generate\n<swift|android|compose|flutter|rust|wordpress|vanilla|drupal|swatches|icon-font|pendo|mintlify|jekyll|hugo>`.\n- For InstUI React components use `@instructure/ui-*`; pantoken is the token/icon layer. Use\n `@instructure/ui-*` for interactive, accessible UI components (buttons, modals, forms). Use\n `@pantoken/react` only for icons and token consumption. Do not substitute one for the other.\n",
750
+ "windsurf": "# pantoken rules (Instructure design tokens & icons)\n\n- Use pantoken tokens: CSS custom properties `--instui-<group>-<name>`. Prefer `var(--instui-*)`\n references over hard-coded values so light/dark and high-contrast theming works. Resolve names\n from `@pantoken/tokens`; do not invent them.\n- Web: `import \"@pantoken/css/inject\";`. Icons: `@pantoken/web-components` (`<instui-icon>`).\n- React: `@pantoken/react`. Tailwind: `@pantoken/tailwind` preset.\n- Native / other ecosystems: `npx pantoken generate <swift|android|compose|flutter|rust|wordpress|vanilla|drupal|jekyll|hugo> --out <dir>`.\n- InstUI React components: `@instructure/ui-*`. pantoken is the token/icon layer.\n",
751
+ "initSkill": "---\nname: init-pantoken\ndescription: Install pantoken's agent assets (AGENTS.md, llms.txt, editor/agent rule files, and the create-pantoken-app skill) into this repo so AI tools know how to work with pantoken. Use when the user asks to add pantoken AI support, or wants Copilot/Cursor/Windsurf/Claude rules for pantoken set up in a repo.\n---\n\n# Init pantoken (AI assets)\n\nInstall pantoken's consumer-facing agent assets into the current repo: `AGENTS.md`, `llms.txt`,\neditor/agent rule files (Cursor, Copilot, Windsurf), and the `create-pantoken-app` skill.\n\n```sh\nnpx pantoken-ai init\n```\n\nThis installs every asset by default. To scope it to one tool, pass\n`--tool <agents|llms|cursor|copilot|windsurf|claude>`. To target a directory other than the\ncurrent one, pass `--dir <path>`. Substitute `pnpm dlx`, `yarn dlx`, `bunx`, or `deno run npm:` for `npx` depending\non the package manager detected in the repo (look for `pnpm-lock.yaml`, `yarn.lock`, or\n`bun.lock`/`bun.lockb`; default to npm/npx if none is found).\n\nThat's all this skill does — it only writes the asset files above, it does not install any\n`@pantoken/*` package or modify application code. Once the assets are installed, use the\n`create-pantoken-app` skill (or run `npx pantoken-ai scaffold <platform>` directly) to scaffold a\nnew project or wire pantoken into an existing one.\n",
752
+ "createAppSkill": "---\nname: create-pantoken-app\ndescription: Scaffold a new project, or add Instructure design tokens and icons (pantoken) to an existing one. Use when the user wants to start a new app with pantoken already wired in, or wants to add Instructure/Canvas theming, InstUI design tokens, or the pantoken packages to an existing app — detects the framework, installs the right @pantoken/* packages, and wires the token CSS.\n---\n\n# Scaffold pantoken\n\nSet up [pantoken](https://www.npmjs.com/package/@pantoken/pantoken) — a design tokens and icons\nlibrary for Instructure UI — in the current project. Work through these steps.\n\n## About pantoken\n\npantoken is built and used internally at Instructure, then open-sourced; Instructure doesn't\nprovide official warranty or support for it as a product, which is why it's published from\n[`thedannywahl`](https://github.com/thedannywahl/pantoken) on GitHub and npm\n([`@pantoken`](https://www.npmjs.com/org/pantoken)) rather than the `instructure` org/scope — it may\nmove there later. Check either link yourself before proceeding if you want to verify this.\n\n## 1. New project or existing repo?\n\n- **Empty directory, or no repo yet** — scaffold a starter with the CLI, then stop (steps 2-3 are\n already done for you by the template).\n\n The CLI has its own interactive prompts, but those only work at a real terminal, so ask the user\n the questions below the same way you normally would, then pass their answers as flags (plus\n `--yes`) so the command runs without needing its own prompts:\n\n 1. **Platform** — ask the user, offering the supported list: `components` (plain HTML/CSS;\n `html` is an accepted alias), `react`, `vue`, `svelte`, `web-components`, `angular`,\n `canvas-theme-editor` (Canvas LMS Theme Editor uploads + an RCE content page template\n starter; `theme-editor` is an accepted alias). Skip asking only if it's unambiguous from the\n conversation — route requests like \"use pantoken with my Canvas theme editor\" or \"build RCE\n page templates\" straight to `canvas-theme-editor`. More platforms land over time; if the\n desired one isn't yet supported by the scaffold CLI, skip the CLI entirely and proceed\n directly to step 2 to manually install and wire pantoken instead.\n\n For `canvas-theme-editor`, after scaffolding, tell the user to: (1) upload the generated\n `theme.css`/`theme.js` under Canvas's Theme Editor → Advanced, and (2) run `npm run dev` to\n author RCE page templates in the local TinyMCE editor, using the **Layouts** toolbar button to\n start from a bundled starter layout before copying the result into Canvas.\n\n If the CLI fails for any reason (non-zero exit, unsupported platform, network error), fall\n through to step 2 and treat the project as an existing repo, preserving any files already\n written by the CLI.\n\n 2. **Package manager** — if a lockfile already exists in the target directory, use it (see the\n detection table in step 2); a genuinely empty directory has no lockfile to detect from, so\n ask the user (npm/pnpm/yarn/bun/deno).\n 3. **Directory** — ask where to scaffold (default `.` for the current directory; confirm before\n defaulting to `.` if you're not sure that's what they want).\n\n Then run the fully-resolved command, substituting the chosen package manager's \"run a package's\n CLI\" form from step 2's table for `npx`, and passing `--yes` so the CLI never falls back to its\n own interactive prompts:\n\n ```sh\n npx @pantoken/ai scaffold <platform> --dir <dir> --yes\n ```\n\n This writes a minimal starter (`package.json`, entry file(s), README) for the chosen platform\n with pantoken already installed and wired in, and also installs pantoken's agent assets\n (AGENTS.md, editor/agent rules, skills) into the same directory. If you only want the starter\n project without the agent assets, run `npx create-pantoken-app <platform> --dir <dir> --yes`\n (or `npx @pantoken/scaffold <platform> --dir <dir> --yes`) directly instead — substituting the\n chosen package manager's launcher for `npx` on either command. Run `npm install` (or the chosen\n package manager's install) in the target directory afterward.\n\n- **Existing repo you want to add pantoken to** — continue to step 2.\n\n## 2. Determine the target\n\nAsk the user what kind of project they're building, unless it's unambiguous from the repo. Offer:\n\n- **Native web (plain HTML/CSS, no framework) — default** → `@pantoken/components`\n- A JS framework (React, Vue, Svelte, Angular, React Native, Next.js)\n- A build tool only, styling from raw tokens (Tailwind, PostCSS, Vite, Webpack, or plain `@pantoken/css`)\n- A native/CMS ecosystem (Swift, Android, Compose, Flutter, Rust, WordPress, Drupal, Vanilla, Jekyll, Hugo)\n\nIf the user doesn't answer or has no preference, default to native web (`@pantoken/components`).\n\nCorroborate with the repo when possible, and prefer the user's answer if it conflicts with detection:\n\n- `package.json` dependencies → web framework (react, vue, svelte, @angular/core, react-native,\n next, vite, tailwindcss, webpack, postcss).\n- If no `package.json` is found and the user wants a web project, run `npm init -y` first, then\n proceed with the native web default (or the chosen framework) — this applies even if the user\n describes the project as \"existing\"; trust their named framework and proceed rather than asking\n for clarification.\n- Native project files → iOS (`Package.swift`, `*.xcodeproj`), Android (`build.gradle`), Flutter\n (`pubspec.yaml`), WordPress/Drupal/Vanilla theme dirs.\n\nAlso detect the package manager from the lockfile present in the repo, and use its equivalent\ncommand for every install/run step below instead of assuming npm:\n\n| Lockfile found | Package manager | Add package(s) | Run a package's CLI |\n| -------------------------- | --------------- | -------------------- | -------------------- |\n| `pnpm-lock.yaml` | pnpm | `pnpm add <pkg>` | `pnpm dlx <pkg>` |\n| `yarn.lock` | yarn | `yarn add <pkg>` | `yarn dlx <pkg>` |\n| `bun.lock`/`bun.lockb` | bun | `bun add <pkg>` | `bunx <pkg>` |\n| `deno.lock` | deno | `deno add npm:<pkg>` | `deno run npm:<pkg>` |\n| `package-lock.json` / none | npm | `npm i <pkg>` | `npx <pkg>` |\n\nIf no lockfile exists yet, default to npm (or whatever the user prefers).\n\n## 3. Install\n\nUse the package manager detected in step 2 for every command below (the examples use `npm i`;\nsubstitute `pnpm add`, `yarn add`, or `bun add` as appropriate).\n\nFollow this decision checklist in order, then run one install command with all collected packages:\n\n1. **Is it native web** (plain HTML/CSS, no framework and no build tool detected)? Install only\n `@pantoken/components` — it ships the token CSS baked in, so no separate `@pantoken/css` install\n is needed — and stop:\n\n ```sh\n npm i @pantoken/components\n ```\n\n2. **Is it Next.js?** Collect `@pantoken/css` plus `@pantoken/next` (do NOT also add\n `@pantoken/react` — `@pantoken/next` includes the React integration), then add any matching tool\n packages (Tailwind, Vite, etc.) from the table below.\n\n3. **Otherwise**, collect `@pantoken/css` first, then add the framework package and every matching\n tool row's package from the table. Framework rows (React, Vue, etc.) and tool rows (Tailwind,\n PostCSS, Vite, Webpack) are all additive — collect every matching row's package alongside\n `@pantoken/css`.\n\n4. If the user wants to use `<instui-icon>` in any web framework project (React, Vue, Vite, etc.),\n also collect `@pantoken/web-components` — regardless of which framework rows already matched.\n\nFor example:\n\n- A Next.js project also using Tailwind installs `@pantoken/css @pantoken/next @pantoken/tailwind`.\n- A React project also using Vite installs `@pantoken/css @pantoken/react @pantoken/vite`.\n\n| Detected | Install |\n| ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| Native web (default) | `@pantoken/components` |\n| React | `@pantoken/react`; if the user also wants full InstUI components (buttons, modals, etc.), additionally install the specific `@instructure/ui-*` packages needed, e.g. `@instructure/ui-buttons @instructure/ui-modal` (see <https://instructure.design> for the full package list) |\n| Vue / Svelte / Angular | `@pantoken/vue` / `@pantoken/svelte` / `@pantoken/angular` + `@pantoken/web-components` (always install `@pantoken/web-components` alongside the framework package here — it's required for icon support in these three, not optional) |\n| React Native | `@pantoken/react-native` |\n| Next.js | `@pantoken/next` — Next.js projects do NOT also need `@pantoken/react`; `@pantoken/next` includes the React integration. Do not install both. |\n| Vite | `@pantoken/vite` |\n| Tailwind | `@pantoken/tailwind` |\n| PostCSS / Webpack | `@pantoken/postcss` / `@pantoken/webpack` |\n| shadcn / Bootstrap | `@pantoken/shadcn` / `@pantoken/bootstrap` |\n| markdown-it / css-in-js | `@pantoken/markdown-it` / `@pantoken/css-in-js` |\n| Icons anywhere | `@pantoken/web-components` — for React, Next.js, React Native, and tool-only setups, only add this if the user explicitly wants icon support (`<instui-icon>` elements); for Vue, Svelte, and Angular it's always required (see that row) |\n\nFor native / CMS targets, no install — run the CLI (step 5). If the project contains both a\n`package.json` and native/CMS files, treat it as a web project and follow the web install steps\nabove; only skip to step 5 if there is no `package.json` and no JS framework detected.\n\n## 4. Wire it up\n\n- Native web (default): import `base.css` + `components.css` from `@pantoken/components` (e.g.\n `import \"@pantoken/components/base.css\"; import \"@pantoken/components/components.css\";`), then\n apply classes like `class=\"instui-button\"` to markup.\n- Other web entry: add `import \"@pantoken/css/inject\";` (or `@import \"@pantoken/css/style.css\";`).\n- Next: wrap the config with `withPantoken(...)` and import the CSS in the root layout.\n- Vite: add the `pantoken()` plugin. Tailwind: add `pantokenPreset()` to `presets`.\n- Web components: `import \"@pantoken/web-components\";` then use `<instui-icon name=\"…\">`.\n- Verify the app renders and `getComputedStyle(document.documentElement).getPropertyValue('--instui-color-background-brand')` is non-empty.\n If the property is empty, check that the token CSS import (`@pantoken/components/base.css` or\n `@pantoken/css/inject`) appears before any component imports in the entry file, and that the dev\n server was restarted after install. Report the specific failure to the user with corrective steps.\n\n## 5. Native / other ecosystems\n\n```sh\nnpx @pantoken/cli generate <swift|android|compose|flutter|rust|wordpress|vanilla|drupal|jekyll|hugo> --out <dir> [--icons a,b] [--theme rebrand]\n```\n\nSubstitute `pnpm dlx`, `yarn dlx`, `bunx`, or `deno run npm:` for `npx` per the package manager\ndetected in step 2 (or from the choice made in step 1 if you're still inside the new-project flow).\n\n## Conventions to follow afterward\n\n- Style with `var(--instui-*)` references, not hard-coded colours, so light/dark and high-contrast\n theming keeps working.\n- Resolve real token names from `@pantoken/tokens`; never invent them.\n"
753
+ };
754
+ //#endregion
755
+ //#region src/agent-assets.ts
756
+ /**
757
+ * AI/editor agent assets (AGENTS.md, llms.txt, Cursor/Copilot/Windsurf rules, Claude skills) for
758
+ * projects that *use* pantoken. Moved here from `@pantoken/ai` so the base scaffold flow can offer
759
+ * them directly, without `@pantoken/ai` depending back on `@pantoken/scaffold` (that dependency
760
+ * already runs the other way).
761
+ *
762
+ * @module
763
+ * @alpha
764
+ */
765
+ /** Where each tool's asset(s) are written, relative to the target directory. */
766
+ const TARGETS = {
767
+ agents: [{
768
+ file: "AGENTS.md",
769
+ content: ASSETS.agents
770
+ }],
771
+ llms: [{
772
+ file: "llms.txt",
773
+ content: ASSETS.llms
774
+ }],
775
+ cursor: [{
776
+ file: ".cursor/rules/pantoken.mdc",
777
+ content: ASSETS.cursor
778
+ }],
779
+ copilot: [{
780
+ file: ".github/copilot-instructions.md",
781
+ content: ASSETS.copilot
782
+ }],
783
+ windsurf: [{
784
+ file: ".windsurf/rules/pantoken.md",
785
+ content: ASSETS.windsurf
786
+ }],
787
+ claude: [
788
+ {
789
+ file: ".claude/skills/init-pantoken/SKILL.md",
790
+ content: ASSETS.initSkill
791
+ },
792
+ {
793
+ file: ".claude/skills/create-pantoken-app/SKILL.md",
794
+ content: ASSETS.createAppSkill
795
+ },
796
+ {
797
+ file: "AGENTS.md",
798
+ content: ASSETS.agents
799
+ }
800
+ ]
801
+ };
802
+ /** Every installable tool key. */
803
+ const AGENT_TOOLS = Object.keys(TARGETS);
804
+ const AGENT_TOOL_SET = new Set(AGENT_TOOLS);
805
+ function ensureAgentTool(tool) {
806
+ if (AGENT_TOOL_SET.has(tool)) return;
807
+ throw new Error(`Unknown tool "${tool}". Expected one of: ${AGENT_TOOLS.join(", ")}.`);
808
+ }
809
+ /**
810
+ * Write pantoken's agent assets for a tool into a consumer repo.
811
+ *
812
+ * @param tool - A specific {@link AgentTool}, or `"all"` for every asset.
813
+ * @param dir - The target directory (default `"."`).
814
+ * @returns The paths written.
815
+ */
816
+ function installAgentAssets(tool, dir = ".") {
817
+ const tools = tool === "all" ? AGENT_TOOLS : (ensureAgentTool(tool), [tool]);
818
+ const written = /* @__PURE__ */ new Set();
819
+ for (const t of tools) for (const { file, content } of TARGETS[t]) {
820
+ const path = join(dir, file);
821
+ mkdirSync(dirname(path), { recursive: true });
822
+ writeFileSync(path, content);
823
+ written.add(path);
824
+ }
825
+ return [...written];
826
+ }
827
+ //#endregion
744
828
  //#region src/index.ts
745
829
  /**
746
830
  * `@pantoken/scaffold` — scaffold a starter project for a platform, with pantoken already
@@ -981,4 +1065,4 @@ async function scaffoldProject(platform, dir = ".", options) {
981
1065
  return written;
982
1066
  }
983
1067
  //#endregion
984
- export { themeStylesheetImport as a, SUPPORTED_LOCALES as c, validateLocaleTag as d, scaffoldProject as i, createLocaleLookup as l, isScaffoldPlatform as n, validateThemeMode as o, resolveScaffoldPlatform as r, validateThemeVariant as s, SCAFFOLD_PLATFORMS as t, detectLocale as u };
1068
+ export { AGENT_TOOLS as a, themeStylesheetImport as c, SUPPORTED_LOCALES as d, createLocaleLookup as f, scaffoldProject as i, validateThemeMode as l, validateLocaleTag as m, isScaffoldPlatform as n, installAgentAssets as o, detectLocale as p, resolveScaffoldPlatform as r, ASSETS as s, SCAFFOLD_PLATFORMS as t, validateThemeVariant as u };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pantoken/scaffold",
3
- "version": "1.2.1",
3
+ "version": "1.3.0",
4
4
  "description": "npx @pantoken/scaffold <platform> — scaffold a starter project (html, react, next, angular, web-components, ...) with pantoken already installed and wired in.",
5
5
  "homepage": "https://pantoken.app",
6
6
  "bugs": "https://github.com/thedannywahl/pantoken/issues",
@@ -34,17 +34,17 @@
34
34
  "commander": "^15.0.0"
35
35
  },
36
36
  "devDependencies": {
37
- "@pantoken/angular": "0.1.30",
37
+ "@pantoken/angular": "0.1.31",
38
38
  "@pantoken/canvas-theme-editor": "0.2.0",
39
- "@pantoken/components": "1.1.2",
40
- "@pantoken/i18n-engine": "0.3.0",
39
+ "@pantoken/components": "1.1.3",
40
+ "@pantoken/i18n-engine": "0.3.1",
41
41
  "@pantoken/plugin-layouts": "0.3.0",
42
- "@pantoken/react": "0.1.31",
42
+ "@pantoken/react": "0.1.32",
43
43
  "@pantoken/scaffold-base": "0.3.0",
44
- "@pantoken/svelte": "0.1.31",
45
- "@pantoken/vue": "0.1.31",
46
- "@pantoken/web-components": "0.6.2",
47
- "@types/node": "^26.5.0",
44
+ "@pantoken/svelte": "0.1.32",
45
+ "@pantoken/vue": "0.1.32",
46
+ "@pantoken/web-components": "0.6.3",
47
+ "@types/node": "^26.5.1",
48
48
  "bingo-stratum": "^0.5.13",
49
49
  "typescript": "^7.0.2",
50
50
  "vite": "npm:@voidzero-dev/vite-plus-core@0.3.1",