@promptscript/cli 1.3.1 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptscript/cli",
3
- "version": "1.3.1",
3
+ "version": "1.4.1",
4
4
  "description": "CLI for PromptScript - standardize AI instructions across GitHub Copilot, Claude, Cursor and other AI tools",
5
5
  "keywords": [
6
6
  "cli",
@@ -211,7 +211,108 @@ Reusable skill definitions with metadata:
211
211
  ```
212
212
 
213
213
  Properties: description (required), content (required), trigger, disableModelInvocation,
214
- userInvocable, allowedTools, context ("fork" or "inherit"), agent.
214
+ userInvocable, allowedTools, context ("fork" or "inherit"), agent, requires, inputs, outputs.
215
+
216
+ ### Parameterized Skills
217
+
218
+ Skills in `.promptscript/skills/<name>/SKILL.md` support template parameters via
219
+ YAML frontmatter. Define `params` in frontmatter and use `{{variable}}` in content:
220
+
221
+ ```yaml
222
+ ---
223
+ name: review
224
+ description: 'Review {{language}} code for {{standard}}'
225
+ params:
226
+ language:
227
+ type: string
228
+ standard:
229
+ type: string
230
+ default: 'best practices'
231
+ ---
232
+ Review the code using {{language}} conventions following {{standard}}.
233
+ ```
234
+
235
+ Pass values in `@skills` block:
236
+
237
+ ```
238
+ @skills {
239
+ review: {
240
+ description: "Review code"
241
+ language: "typescript"
242
+ standard: "strict mode"
243
+ }
244
+ }
245
+ ```
246
+
247
+ Non-reserved properties (anything other than description, content, trigger,
248
+ userInvocable, allowedTools, disableModelInvocation, context, agent, requires,
249
+ inputs, outputs) are treated as skill parameter arguments.
250
+
251
+ ### Skill Dependencies
252
+
253
+ Skills can declare dependencies on other skills via `requires`:
254
+
255
+ ```
256
+ @skills {
257
+ deploy: {
258
+ description: "Deploy service"
259
+ requires: ["lint-check", "test-suite"]
260
+ content: (triple-quoted text)
261
+ }
262
+ }
263
+ ```
264
+
265
+ The validator (PS016) checks that required skills exist, detects self-references,
266
+ and catches circular dependency chains.
267
+
268
+ ### Skill Contracts (Inputs/Outputs)
269
+
270
+ Skills can declare typed inputs and outputs in SKILL.md frontmatter:
271
+
272
+ ```yaml
273
+ ---
274
+ name: security-scan
275
+ description: 'Scan for vulnerabilities'
276
+ inputs:
277
+ files:
278
+ description: 'Files to scan'
279
+ type: string
280
+ severity:
281
+ description: 'Minimum severity'
282
+ type: enum
283
+ options: [low, medium, high]
284
+ default: medium
285
+ outputs:
286
+ report:
287
+ description: 'Scan report'
288
+ type: string
289
+ passed:
290
+ description: 'Whether scan passed'
291
+ type: boolean
292
+ ---
293
+ ```
294
+
295
+ Field types: `string`, `number`, `boolean`, `enum` (with `options` list).
296
+ The validator (PS017) checks field types, ensures enum fields have options,
297
+ and warns if param names collide with input names.
298
+
299
+ ### Shared Resources
300
+
301
+ Skills in a folder can share common resources via `.promptscript/shared/`:
302
+
303
+ ```
304
+ .promptscript/
305
+ shared/
306
+ templates.md # Shared across all skills
307
+ style-guide.md
308
+ skills/
309
+ review/
310
+ SKILL.md # Gets @shared/templates.md, @shared/style-guide.md
311
+ deploy/
312
+ SKILL.md # Also gets shared resources
313
+ ```
314
+
315
+ Files in `shared/` are automatically included in every skill with `@shared/` prefix.
215
316
 
216
317
  ### @agents
217
318
 
@@ -297,8 +398,75 @@ Requires an aliased @use:
297
398
  }
298
399
  ```
299
400
 
401
+ ### Parameterized Inheritance (Template Variables)
402
+
403
+ Use `{{variable}}` placeholders in a **parent/template** file, and pass values
404
+ from the **child** file via `@inherit` or `@use` with `(key: value)` syntax.
405
+
406
+ **IMPORTANT:** Variables are NOT set from `promptscript.yaml` or CLI. They are
407
+ passed from one `.prs` file to another through `@inherit` or `@use`.
408
+
409
+ **Step 1: Create the template** (parent file with `params` in `@meta`):
410
+
411
+ ```
412
+ # base.prs — reusable template
413
+ @meta {
414
+ id: "service-template"
415
+ syntax: "1.0.0"
416
+ params: {
417
+ serviceName: string
418
+ port?: number = 3000
419
+ }
420
+ }
421
+
422
+ @identity {
423
+ """
424
+ You are working on {{serviceName}} running on port {{port}}.
425
+ """
426
+ }
427
+ ```
428
+
429
+ **Step 2: Inherit with values** (child file passes params):
430
+
431
+ ```
432
+ # project.prs — concrete project
433
+ @meta { id: "user-api" syntax: "1.0.0" }
434
+
435
+ @inherit ./base(serviceName: "user-api", port: 8080)
436
+ ```
437
+
438
+ After compilation, `{{serviceName}}` becomes `user-api` and `{{port}}` becomes `8080`.
439
+
440
+ The same works with `@use`:
441
+
442
+ ```
443
+ @use ./base(serviceName: "auth-service") as auth
444
+ ```
445
+
446
+ **Parameter types:** `string`, `number`, `boolean`, `enum("a", "b")`.
447
+ Optional params use `?` suffix. Defaults use `= value`.
448
+ Missing required params produce a compile error.
449
+
450
+ **Multi-service pattern** — reuse one template across many projects:
451
+
452
+ ```
453
+ services/
454
+ base.prs # template with params
455
+ user-api/
456
+ promptscript.yaml # source: project.prs
457
+ project.prs # @inherit ../base(serviceName: "user-api")
458
+ auth-service/
459
+ promptscript.yaml
460
+ project.prs # @inherit ../base(serviceName: "auth-service")
461
+ ```
462
+
300
463
  ## Configuration: promptscript.yaml
301
464
 
465
+ ### Auto-injection
466
+
467
+ This skill is automatically included when compiling with `prs compile`. No manual copying needed.
468
+ To disable, set `includePromptScriptSkill: false` in your `promptscript.yaml`.
469
+
302
470
  ```
303
471
  id: my-project
304
472
  syntax: "1.1.0"
@@ -334,6 +502,8 @@ prs init --migrate # Initialize + migration skills
334
502
  prs compile # Compile to all targets
335
503
  prs compile --watch # Watch mode
336
504
  prs validate --strict # Validate syntax
505
+ prs import CLAUDE.md # Import existing AI instructions
506
+ prs import --dry-run # Preview import conversion
337
507
  prs pull # Update registry
338
508
  prs diff --target claude # Show compilation diff
339
509
  ```
@@ -358,6 +528,15 @@ prs diff --target claude # Show compilation diff
358
528
  | Continue | .continue/rules/project.md | .continue/skills/\*/SKILL.md |
359
529
  | + 26 more | | See full list in documentation |
360
530
 
531
+ ### Formatter Documentation
532
+
533
+ For detailed information about each formatter's output paths, supported features, quirks, and example outputs:
534
+
535
+ - **Full formatter reference:** `docs/reference/formatters/` (7 dedicated pages + index of all 37)
536
+ - **llms-full.txt:** Available at the docs site root — contains all documentation in a single file for LLM consumption
537
+ - **Dedicated pages exist for:** Claude Code, GitHub Copilot, Cursor, Antigravity, Factory AI, Gemini CLI, OpenCode
538
+ - **All 37 formatters indexed at:** `docs/reference/formatters/index.md` with output paths, tier, and feature flags
539
+
361
540
  ## Project Organization
362
541
 
363
542
  Typical modular structure:
@@ -381,40 +560,44 @@ The entry file uses `@use ./context`, `@use ./standards`, etc. to compose them.
381
560
  4. Unquoted strings with special chars - quote strings containing `:`, `#`, `{`, `}`
382
561
  5. Forgetting to compile - `.prs` changes need `prs compile` to take effect
383
562
  6. Triple quotes inside triple quotes - not supported; describe content textually instead
563
+ 7. Using `{{var}}` in the root file without `@inherit` - template variables only work
564
+ in a parent file that defines `params` in `@meta`, with values passed by the child
565
+ via `@inherit ./parent(key: value)` or `@use ./fragment(key: value)`. They are NOT
566
+ set from `promptscript.yaml` or CLI flags
384
567
 
385
568
  ## Migrating Existing AI Instructions to PromptScript
386
569
 
387
- Use this workflow when converting existing AI instruction files (CLAUDE.md, .cursorrules, copilot-instructions.md, etc.) to PromptScript `.prs` format.
570
+ ### Automated: `prs import`
388
571
 
389
- ### Step 1: Discovery
572
+ The fastest way to convert existing AI instructions to PromptScript:
573
+
574
+ ```
575
+ prs import CLAUDE.md # Convert a single file
576
+ prs import .github/copilot-instructions.md
577
+ prs import AGENTS.md --output ./imported.prs
578
+ prs import --dry-run CLAUDE.md # Preview without writing
579
+ ```
390
580
 
391
- Find all existing AI instruction files in the project:
581
+ `prs import` automatically:
582
+
583
+ - Detects the source format (Claude, GitHub Copilot, Cursor, Factory, etc.)
584
+ - Maps content to appropriate PromptScript blocks (@identity, @standards, etc.)
585
+ - Generates a valid `.prs` file with `@meta` block
586
+ - Preserves the original intent and structure
587
+
588
+ Supported source formats:
392
589
 
393
590
  - `CLAUDE.md` (Claude Code)
394
591
  - `.github/copilot-instructions.md` (GitHub Copilot)
395
592
  - `.cursorrules` or `.cursor/rules/*.mdc` (Cursor)
396
- - `.agent/rules/*.md` (Antigravity)
397
593
  - `AGENTS.md` (Factory AI / Codex)
398
- - `.clinerules` (Cline)
399
- - `.roorules` (Roo Code)
594
+ - `.clinerules` (Cline), `.roorules` (Roo Code)
400
595
  - `.windsurf/rules/*.md` (Windsurf)
401
- - Any other AI instruction files
402
-
403
- ### Step 2: Read and Analyze
404
-
405
- Read each discovered file and identify:
406
-
407
- - Identity/persona instructions ("You are...")
408
- - Project context (tech stack, architecture)
409
- - Coding standards and conventions
410
- - Hard restrictions and rules
411
- - Command shortcuts or slash commands
412
- - Skill definitions
413
- - Agent/subagent definitions
596
+ - Any Markdown-based AI instruction file
414
597
 
415
- ### Step 3: Content Mapping
598
+ ### Manual Migration
416
599
 
417
- Map content from source files to PromptScript blocks:
600
+ For complex migrations or when `prs import` needs refinement:
418
601
 
419
602
  | Source Pattern | PromptScript Block |
420
603
  | ----------------------------------- | ------------------ |
@@ -427,33 +610,6 @@ Map content from source files to PromptScript blocks:
427
610
  | Agent/subagent configs | `@agents` |
428
611
  | Reference docs, API specs | `@knowledge` |
429
612
 
430
- ### Step 4: Generate PromptScript
431
-
432
- Create `.prs` files in `.promptscript/` directory using the mapped content. Start with `project.prs` containing `@meta` with project id and syntax version.
433
-
434
- ### Step 5: File Organization
435
-
436
- Split content into logical files:
437
-
438
- - `project.prs` - entry point with `@meta`, `@inherit`, `@use`, `@identity`
439
- - `context.prs` - `@context` block
440
- - `standards.prs` - `@standards` block
441
- - `restrictions.prs` - `@restrictions` block
442
- - `commands.prs` - `@shortcuts` and `@knowledge` blocks
443
-
444
- Use `@use ./context`, `@use ./standards`, etc. in `project.prs` to compose them.
445
-
446
- ### Step 6: Configuration
447
-
448
- Create or update `promptscript.yaml` with appropriate targets matching the original AI tools being used.
449
-
450
- ### Step 7: Validation
451
-
452
- Run `prs validate --strict` to check syntax, then `prs compile` to generate output files. Compare compiled output with original files to verify content was preserved.
453
-
454
- ### Migration Tips
455
-
456
- - Preserve the original intent and tone of instructions
457
- - Don't lose any rules or restrictions during mapping
458
- - Use `@knowledge` for large reference sections that don't fit other blocks
459
- - Back up original files before overwriting with compiled output
613
+ After import, split into modular files (`context.prs`, `standards.prs`, etc.)
614
+ and compose with `@use` in `project.prs`. Run `prs validate --strict` then
615
+ `prs compile` to verify output matches the original.
package/src/cli.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../../../packages/cli/src/cli.ts"],"names":[],"mappings":";AAmIA;;;GAGG;AACH,wBAAgB,GAAG,CAAC,IAAI,GAAE,MAAM,EAAiB,GAAG,IAAI,CAEvD"}
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../../../packages/cli/src/cli.ts"],"names":[],"mappings":";AAyJA;;;GAGG;AACH,wBAAgB,GAAG,CAAC,IAAI,GAAE,MAAM,EAAiB,GAAG,IAAI,CAEvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/commands/compile.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAQlD,OAAO,EAAE,KAAK,WAAW,EAAyB,MAAM,gBAAgB,CAAC;AAgVzE;;GAEG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,cAAc,EACvB,QAAQ,GAAE,WAAqC,GAC9C,OAAO,CAAC,IAAI,CAAC,CA8Gf"}
1
+ {"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/commands/compile.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AASlD,OAAO,EAAE,KAAK,WAAW,EAAyB,MAAM,gBAAgB,CAAC;AAmXzE;;GAEG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,cAAc,EACvB,QAAQ,GAAE,WAAqC,GAC9C,OAAO,CAAC,IAAI,CAAC,CAwHf"}
@@ -0,0 +1,8 @@
1
+ export interface ImportCommandOptions {
2
+ format?: string;
3
+ output?: string;
4
+ dryRun?: boolean;
5
+ validate?: boolean;
6
+ }
7
+ export declare function importCommand(file: string, options: ImportCommandOptions): Promise<void>;
8
+ //# sourceMappingURL=import.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"import.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/commands/import.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,oBAAoB;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,wBAAsB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CAwD9F"}
@@ -3,4 +3,5 @@ export { compileCommand } from './compile.js';
3
3
  export { validateCommand } from './validate.js';
4
4
  export { pullCommand } from './pull.js';
5
5
  export { diffCommand } from './diff.js';
6
+ export { importCommand } from './import.js';
6
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
@@ -1,8 +1,13 @@
1
1
  import { type CliServices } from '../services.js';
2
2
  import type { InitOptions } from '../types.js';
3
+ import { type AIToolTarget } from '../utils/ai-tools-detector.js';
3
4
  /**
4
5
  * Initialize PromptScript in the current directory.
5
6
  * Creates configuration file and initial project structure.
6
7
  */
7
8
  export declare function initCommand(options: InitOptions, services?: CliServices): Promise<void>;
9
+ /**
10
+ * Format target name for display using the formatter's description.
11
+ */
12
+ export declare function formatTargetName(target: AIToolTarget): string;
8
13
  //# sourceMappingURL=init.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/commands/init.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,WAAW,EAAyB,MAAM,gBAAgB,CAAC;AAmBzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAyD/C;;;GAGG;AACH,wBAAsB,WAAW,CAC/B,OAAO,EAAE,WAAW,EACpB,QAAQ,GAAE,WAAqC,GAC9C,OAAO,CAAC,IAAI,CAAC,CAwKf"}
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/commands/init.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,WAAW,EAAyB,MAAM,gBAAgB,CAAC;AAmBzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG/C,OAAO,EAOL,KAAK,YAAY,EAClB,MAAM,+BAA+B,CAAC;AA+CvC;;;GAGG;AACH,wBAAsB,WAAW,CAC/B,OAAO,EAAE,WAAW,EACpB,QAAQ,GAAE,WAAqC,GAC9C,OAAO,CAAC,IAAI,CAAC,CA6Kf;AA8SD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAM7D"}
@@ -1 +1 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../../../packages/cli/src/commands/registry/init.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,KAAK,WAAW,EAAyB,MAAM,mBAAmB,CAAC;AAM5E;;GAEG;AACH,wBAAsB,mBAAmB,CACvC,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,OAAO,EAAE,mBAAmB,EAC5B,QAAQ,GAAE,WAAqC,GAC9C,OAAO,CAAC,IAAI,CAAC,CAyFf"}
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../../../packages/cli/src/commands/registry/init.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,KAAK,WAAW,EAAyB,MAAM,mBAAmB,CAAC;AAO5E;;GAEG;AACH,wBAAsB,mBAAmB,CACvC,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,OAAO,EAAE,mBAAmB,EAC5B,QAAQ,GAAE,WAAqC,GAC9C,OAAO,CAAC,IAAI,CAAC,CAiGf"}
@@ -0,0 +1,9 @@
1
+ interface ServeOptions {
2
+ port?: string;
3
+ host?: string;
4
+ readOnly?: boolean;
5
+ corsOrigin?: string;
6
+ }
7
+ export declare function serveCommand(options: ServeOptions): Promise<void>;
8
+ export {};
9
+ //# sourceMappingURL=serve.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/commands/serve.ts"],"names":[],"mappings":"AAAA,UAAU,YAAY;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,wBAAsB,YAAY,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CASvE"}
@@ -1,8 +1,8 @@
1
1
  import { type CliServices } from '../services.js';
2
2
  /**
3
- * Supported AI tool targets.
3
+ * AI tool target identifier — corresponds to a registered formatter name.
4
4
  */
5
- export type AIToolTarget = 'github' | 'claude' | 'cursor' | 'antigravity' | 'factory' | 'opencode' | 'gemini';
5
+ export type AIToolTarget = string;
6
6
  /**
7
7
  * AI tool detection result.
8
8
  */
@@ -10,7 +10,7 @@ export interface AIToolsDetection {
10
10
  /** Detected AI tools with existing configuration */
11
11
  detected: AIToolTarget[];
12
12
  /** Details about detected files */
13
- details: Record<AIToolTarget, string[]>;
13
+ details: Record<string, string[]>;
14
14
  /** Files that exist but were NOT generated by PromptScript (candidates for migration) */
15
15
  migrationCandidates: string[];
16
16
  }
@@ -19,12 +19,12 @@ export interface AIToolsDetection {
19
19
  */
20
20
  export declare function detectAITools(services?: CliServices): Promise<AIToolsDetection>;
21
21
  /**
22
- * Get all available targets.
22
+ * Get all available targets from the FormatterRegistry.
23
23
  */
24
24
  export declare function getAllTargets(): AIToolTarget[];
25
25
  /**
26
26
  * Get suggested targets based on detection.
27
- * If no tools detected, suggest all. Otherwise, suggest detected ones.
27
+ * If no tools detected, suggest common defaults. Otherwise, suggest detected ones.
28
28
  */
29
29
  export declare function getSuggestedTargets(detection: AIToolsDetection): AIToolTarget[];
30
30
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ai-tools-detector.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/utils/ai-tools-detector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAyB,MAAM,gBAAgB,CAAC;AAEzE;;GAEG;AACH,MAAM,MAAM,YAAY,GACpB,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,aAAa,GACb,SAAS,GACT,UAAU,GACV,QAAQ,CAAC;AAEb;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,oDAAoD;IACpD,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,mCAAmC;IACnC,OAAO,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,CAAC,CAAC;IACxC,yFAAyF;IACzF,mBAAmB,EAAE,MAAM,EAAE,CAAC;CAC/B;AAiGD;;GAEG;AACH,wBAAsB,aAAa,CACjC,QAAQ,GAAE,WAAqC,GAC9C,OAAO,CAAC,gBAAgB,CAAC,CA+C3B;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,YAAY,EAAE,CAE9C;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,gBAAgB,GAAG,YAAY,EAAE,CAE/E;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,gBAAgB,GAAG,MAAM,EAAE,CAgB5E;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,gBAAgB,GAAG,OAAO,CAE3E;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,gBAAgB,GAAG,MAAM,EAAE,CAiBzE"}
1
+ {"version":3,"file":"ai-tools-detector.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/utils/ai-tools-detector.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,WAAW,EAAyB,MAAM,gBAAgB,CAAC;AAEzE;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC;AAElC;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,oDAAoD;IACpD,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,mCAAmC;IACnC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAClC,yFAAyF;IACzF,mBAAmB,EAAE,MAAM,EAAE,CAAC;CAC/B;AAkKD;;GAEG;AACH,wBAAsB,aAAa,CACjC,QAAQ,GAAE,WAAqC,GAC9C,OAAO,CAAC,gBAAgB,CAAC,CAuC3B;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,YAAY,EAAE,CAE9C;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,gBAAgB,GAAG,YAAY,EAAE,CAQ/E;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,gBAAgB,GAAG,MAAM,EAAE,CAkB5E;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,gBAAgB,GAAG,OAAO,CAE3E;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,gBAAgB,GAAG,MAAM,EAAE,CAiBzE"}
@@ -0,0 +1,22 @@
1
+ import type { FileSystem, PromptSystem } from '../services.js';
2
+ export interface ResolveTargetDirectoryOptions {
3
+ cwd: string;
4
+ directoryArg?: string;
5
+ registryName: string;
6
+ nonInteractive: boolean;
7
+ }
8
+ interface ResolveServices {
9
+ fs: Pick<FileSystem, 'readdir'>;
10
+ prompts: Pick<PromptSystem, 'select'>;
11
+ }
12
+ /**
13
+ * Determine where to scaffold the registry.
14
+ *
15
+ * - Explicit directory arg: use it directly
16
+ * - Empty CWD + interactive: ask user "here or subdirectory?"
17
+ * - Empty CWD + non-interactive: scaffold in CWD
18
+ * - Non-empty CWD: create slugified subdirectory
19
+ */
20
+ export declare function resolveTargetDirectory(options: ResolveTargetDirectoryOptions, services: ResolveServices): Promise<string>;
21
+ export {};
22
+ //# sourceMappingURL=resolve-target-directory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-target-directory.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/utils/resolve-target-directory.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG/D,MAAM,WAAW,6BAA6B;IAC5C,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,OAAO,CAAC;CACzB;AAED,UAAU,eAAe;IACvB,EAAE,EAAE,IAAI,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;IAChC,OAAO,EAAE,IAAI,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;CACvC;AAED;;;;;;;GAOG;AACH,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,6BAA6B,EACtC,QAAQ,EAAE,eAAe,GACxB,OAAO,CAAC,MAAM,CAAC,CAyBjB"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Convert a string to a filesystem-safe slug.
3
+ *
4
+ * Lowercases, replaces non-alphanumeric characters with hyphens,
5
+ * deduplicates consecutive hyphens, and trims hyphens from edges.
6
+ */
7
+ export declare function slugify(name: string): string;
8
+ //# sourceMappingURL=slugify.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slugify.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/utils/slugify.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAO5C"}