@promptscript/cli 1.15.0 → 1.17.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.
Files changed (37) hide show
  1. package/README.md +17 -5
  2. package/bin/prs.js +1 -1
  3. package/index.js +12739 -2279
  4. package/package.json +9 -9
  5. package/skills/promptscript/SKILL.md +267 -15
  6. package/src/cli.d.ts +1 -1
  7. package/src/cli.d.ts.map +1 -1
  8. package/src/commands/compile.d.ts.map +1 -1
  9. package/src/commands/hooks.d.ts.map +1 -1
  10. package/src/commands/telemetry.d.ts +3 -0
  11. package/src/commands/telemetry.d.ts.map +1 -0
  12. package/src/config/env-config.d.ts +1 -0
  13. package/src/config/env-config.d.ts.map +1 -1
  14. package/src/config/loader.d.ts.map +1 -1
  15. package/src/config/merge-config.d.ts.map +1 -1
  16. package/src/hooks/detect-marker.d.ts.map +1 -1
  17. package/src/hooks/extract-file-path.d.ts +6 -5
  18. package/src/hooks/extract-file-path.d.ts.map +1 -1
  19. package/src/hooks/tool-configs/claude.d.ts +4 -2
  20. package/src/hooks/tool-configs/claude.d.ts.map +1 -1
  21. package/src/hooks/tool-configs/cline.d.ts.map +1 -1
  22. package/src/hooks/tool-configs/copilot.d.ts.map +1 -1
  23. package/src/hooks/tool-configs/factory.d.ts.map +1 -1
  24. package/src/hooks/tool-configs/index.d.ts +2 -0
  25. package/src/hooks/tool-configs/index.d.ts.map +1 -1
  26. package/src/hooks/tool-configs/types.d.ts +1 -0
  27. package/src/hooks/tool-configs/types.d.ts.map +1 -1
  28. package/src/telemetry/config.d.ts +10 -0
  29. package/src/telemetry/config.d.ts.map +1 -0
  30. package/src/telemetry/session.d.ts +14 -0
  31. package/src/telemetry/session.d.ts.map +1 -0
  32. package/src/types.d.ts +2 -0
  33. package/src/types.d.ts.map +1 -1
  34. package/src/utils/legacy-factory-hooks.d.ts +42 -0
  35. package/src/utils/legacy-factory-hooks.d.ts.map +1 -0
  36. package/src/utils/managed-output-cleanup.d.ts +16 -0
  37. package/src/utils/managed-output-cleanup.d.ts.map +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptscript/cli",
3
- "version": "1.15.0",
3
+ "version": "1.17.0",
4
4
  "description": "CLI for PromptScript - standardize AI instructions across GitHub Copilot, Claude, Cursor and other AI tools",
5
5
  "keywords": [
6
6
  "cli",
@@ -41,18 +41,18 @@
41
41
  },
42
42
  "dependencies": {
43
43
  "@inquirer/prompts": "^8.5.2",
44
- "chalk": "^5.6.2",
44
+ "chalk": "^6.0.0",
45
45
  "chokidar": "^5.0.0",
46
46
  "commander": "^15.0.0",
47
- "minimatch": "^10.2.5",
48
- "ora": "^9.4.0",
49
- "prettier": "^3.8.4",
47
+ "minimatch": "^10.2.6",
48
+ "ora": "^9.4.1",
49
+ "prettier": "^3.9.6",
50
50
  "yaml": "^2.9.0",
51
51
  "simple-git": "3.36.0",
52
- "fastify": "^5.8.5",
53
- "@fastify/cors": "^11.0.0",
54
- "@fastify/websocket": "^11.0.0",
55
- "ws": "^8.21.0",
52
+ "fastify": "^5.11.2",
53
+ "@fastify/cors": "^11.3.0",
54
+ "@fastify/websocket": "^11.3.0",
55
+ "ws": "^8.21.2",
56
56
  "fast-glob": "^3.3.0"
57
57
  }
58
58
  }
@@ -6,7 +6,8 @@ description: >-
6
6
  creating or editing .prs files, adding blocks like @identity, @standards,
7
7
  @restrictions, @shortcuts, @skills, or @agents, configuring
8
8
  promptscript.yaml, resolving compilation errors, understanding inheritance
9
- (@inherit) and composition (@use, @extend), or migrating AI instructions
9
+ (@inherit), composition (@use, @extend, @override), contextual @header
10
+ metadata, or migrating AI instructions
10
11
  to PromptScript. Also use when asked about the 48 built-in compilation
11
12
  targets, including GitHub Copilot, Claude Code, Cursor, Antigravity,
12
13
  Factory AI, and AGENTS.md-based platforms.
@@ -48,7 +49,9 @@ PromptScript is a domain-specific language that compiles `.prs` files into nativ
48
49
 
49
50
  ## File Structure
50
51
 
51
- A `.prs` file is made of blocks. Order doesn't matter except `@meta` should come first by convention.
52
+ A `.prs` file contains ordered declarations. Syntax `1.5.0` applies `@inherit`,
53
+ `@use`, local blocks, `@extend`, and `@override` in source order. Put `@meta`
54
+ first.
52
55
 
53
56
  ```
54
57
  # Comments start with #
@@ -65,17 +68,25 @@ A `.prs` file is made of blocks. Order doesn't matter except `@meta` should come
65
68
  @knowledge { ... } # Reference documentation
66
69
  @skills { ... } # Reusable skill definitions
67
70
  @agents { ... } # Subagent definitions
71
+ @workflows { ... } # Repeatable agent procedures
68
72
  @examples { ... } # Few-shot input/output examples (syntax 1.2.0+)
69
73
  @params { ... } # Template parameters
70
74
  @guards { ... } # File globs and priorities
75
+ @hooks { ... } # Portable lifecycle hooks (syntax 1.4.0+)
76
+ @mcpServers { ... } # MCP server configurations (syntax 1.4.0+)
77
+ @plugins { ... } # Capability bundles (syntax 1.4.0+)
71
78
  @local { ... } # Private config (not committed)
72
79
  @extend path { ... } # Modify imported blocks
80
+ @override path { ... } # Replace one complete existing target (syntax 1.5.0+)
73
81
  @custom-name { ... } # Arbitrary named blocks
74
82
  ```
75
83
 
84
+ Contextual `@header` entries appear inside supported owner blocks, not at the
85
+ top level.
86
+
76
87
  ## Content Types
77
88
 
78
- PromptScript has three content types inside blocks:
89
+ PromptScript has four canonical content shapes inside blocks:
79
90
 
80
91
  ### Text Content
81
92
 
@@ -166,6 +177,29 @@ Category-based conventions. Any category name is valid:
166
177
  }
167
178
  ```
168
179
 
180
+ Category names are arbitrary. `@standards` can also contain free-form text:
181
+
182
+ ```
183
+ @standards {
184
+ """
185
+ ## Formatting
186
+ Preserve heading structure and use four-space indentation.
187
+
188
+ ## Testing
189
+ Add regression coverage for every behavior change.
190
+ """
191
+ typescript: ["Strict mode", "Named exports only"]
192
+ git: {
193
+ format: "Conventional Commits"
194
+ }
195
+ }
196
+ ```
197
+
198
+ Free-form text is dedented and rendered with its Markdown heading structure. Factory
199
+ monolith output nests it under `Conventions & Patterns`; split Factory rules adjust
200
+ heading levels relative to the generated section. Custom structured categories remain
201
+ available to formatters that support them.
202
+
169
203
  ### @restrictions
170
204
 
171
205
  Hard rules as a list of dash-prefixed strings:
@@ -365,6 +399,26 @@ Factory AI droids support additional properties: `model` (any model ID or "inher
365
399
  `reasoningEffort` ("low", "medium", "high"), and `tools` (category name like "read-only"
366
400
  or array of tool IDs).
367
401
 
402
+ ### @workflows
403
+
404
+ Repeatable multi-step agent procedures. Requires syntax `1.1.0`.
405
+
406
+ ```
407
+ @workflows {
408
+ release: {
409
+ description: "Prepare a validated release"
410
+ content: """
411
+ 1. Run formatting, linting, type checks, and tests.
412
+ 2. Validate compiled output.
413
+ 3. Stop before publishing and request approval.
414
+ """
415
+ }
416
+ }
417
+ ```
418
+
419
+ Targets with native workflow discovery emit dedicated workflow files. Other targets
420
+ retain workflow instructions in their main output when supported.
421
+
368
422
  ### @examples
369
423
 
370
424
  Structured few-shot examples for AI assistants (requires syntax `1.2.0`):
@@ -418,6 +472,141 @@ Optional parameters use `?` suffix. Defaults use `= value`.
418
472
 
419
473
  File glob patterns and priority rules for path-specific instructions.
420
474
 
475
+ ### @hooks
476
+
477
+ Portable lifecycle hooks. Requires syntax `1.4.0`. Each hook needs exactly one of
478
+ `command` or `script`.
479
+
480
+ ```
481
+ @hooks {
482
+ validate-types: {
483
+ event: "post-tool-use"
484
+ matcher: "Edit|Write"
485
+ script: {
486
+ path: ".promptscript/scripts/validate.py"
487
+ interpreter: "python3"
488
+ args: ["--strict"]
489
+ }
490
+ cwd: "project"
491
+ timeoutMs: 120000
492
+ statusMessage: "Checking TypeScript"
493
+ continueOnFailure: false
494
+ enabled: true
495
+ targets: {
496
+ factory: { matcher: "Execute" }
497
+ vscode: { matcher: "run_in_terminal" }
498
+ github: { enabled: false }
499
+ }
500
+ }
501
+ }
502
+ ```
503
+
504
+ Portable events:
505
+
506
+ | Event | Meaning |
507
+ | ---------------------- | ------------------------- |
508
+ | `pre-terminal-command` | Before a terminal command |
509
+ | `pre-tool-use` | Before a tool invocation |
510
+ | `post-tool-use` | After a tool invocation |
511
+ | `session-start` | Agent session start |
512
+ | `setup` | Session setup |
513
+ | `subagent-start` | Subagent start |
514
+ | `notification` | Agent notification |
515
+ | `stop` | Agent stop |
516
+
517
+ `command` is a non-empty string array. Shell interpolation (`$()`, backticks,
518
+ `${...}`) is forbidden. `script` requires:
519
+
520
+ - `path` under `.promptscript/scripts/`, using forward slashes.
521
+ - Existing regular file at compile time.
522
+ - No traversal, absolute path, invalid segment, or symlink escape.
523
+ - Explicit interpreter: `python3`, `python`, `node`, `deno`, `bun`, `ruby`, `php`,
524
+ `perl`, `bash`, `sh`, `zsh`, `pwsh`, or `powershell`.
525
+ - Optional `args` string array; each argument remains one argument.
526
+
527
+ `cwd: "project"` runs from project root. Other values are portable forward-slash
528
+ paths relative to project root. Hook config file location does not set command cwd.
529
+ Environment-root and Git-root wrappers exit before script or command execution when
530
+ the required root is unavailable. Native-cwd and workspace-cwd targets retain host
531
+ cwd fields and report `PS4002` when PromptScript cannot verify that cwd.
532
+ `timeoutMs` range is 100-600000. `matcher` uses target-native tool names, so a
533
+ matcher valid for one target may match nothing on another.
534
+
535
+ `pre-terminal-command` supplies native defaults: Factory `Execute`, Claude and
536
+ Codex `Bash`, Windsurf `pre_run_command`, Cursor `run_terminal_cmd`, Gemini
537
+ `run_shell_command`, and VS Code `run_in_terminal`. Override a native tool name
538
+ with `targets.<name>.matcher`. Cursor, Gemini, and VS Code report best-effort
539
+ `PS4002` warnings. GitHub and Grok omit the event with `PS4002`.
540
+
541
+ Target overrides may change `event`, `matcher`, `timeoutMs`, `statusMessage`,
542
+ `continueOnFailure`, `enabled`, or `cwd`. Native hook files are emitted only in
543
+ target modes that support additional files:
544
+
545
+ | Target | Hook output | Mode |
546
+ | -------------- | ---------------------------------------------------------------------- | ------------------- |
547
+ | Claude Code | `.claude/settings.json` | `full` |
548
+ | Factory AI | `.factory/hooks.json` | `multifile`, `full` |
549
+ | GitHub Copilot | `.github/hooks/promptscript.json` | `multifile`, `full` |
550
+ | Cursor | `.cursor/hooks.json` | `full` |
551
+ | Codex | `.codex/hooks.json` | `multifile`, `full` |
552
+ | Gemini CLI | `.gemini/settings.json` | `multifile`, `full` |
553
+ | Windsurf | `.windsurf/hooks.json` | `multifile`, `full` |
554
+ | Grok Build | `.grok/hooks/promptscript.json` | `full` |
555
+ | VS Code Agent | `.github/hooks/promptscript-vscode.json` when `vscode` override exists | target-specific |
556
+
557
+ Simple mode and targets without native project hooks report `PS4002` instead of
558
+ silently dropping hooks. Use `prs compile --watch` as fallback. Plugin-only and
559
+ agent-scoped integrations are not emitted as universal project hooks.
560
+
561
+ Each generated command carries a PromptScript ownership marker. CLI cleanup removes
562
+ only marked entries and preserves user hooks/settings. Removing `@hooks` removes a
563
+ fully owned generated hook file and prunes directories left empty. `prs hooks install factory`
564
+ migrates unambiguous legacy hooks from `.factory/settings.json`; ambiguous
565
+ entries remain for manual review.
566
+
567
+ Factory compilation performs the same migration when `.factory/hooks.json` is
568
+ absent. Use `prs compile --dry-run` to preview the changes or
569
+ `--no-migrate-factory-hooks` to keep warning-only behavior. Unknown events,
570
+ malformed entries, and mixed ownership abort without a partial migration.
571
+
572
+ `@hooks` compilation is separate from `prs hooks install`. The latter installs
573
+ auto-compilation and generated-output protection for supported AI tools. Copilot VS
574
+ Code Agent hooks use `promptscript-vscode.json`; GitHub Copilot repository hooks use
575
+ `promptscript.json`.
576
+
577
+ ### @mcpServers
578
+
579
+ Project-local Model Context Protocol servers. Requires syntax `1.4.0`.
580
+
581
+ ```
582
+ @mcpServers {
583
+ issue-tracker: {
584
+ transport: "stdio"
585
+ command: ["node", "./tools/issues.mjs"]
586
+ env: { LOG_LEVEL: "info" }
587
+ }
588
+ }
589
+ ```
590
+
591
+ Use `stdio` with `command`, or `http`/`sse` with `url`. Keep credentials out of
592
+ `.prs` files and provide them through target-native secret management.
593
+
594
+ ### @plugins
595
+
596
+ Portable capability bundles. Requires syntax `1.4.0`.
597
+
598
+ ```
599
+ @plugins {
600
+ security-suite: {
601
+ description: "Security review tooling"
602
+ version: "1.0.0"
603
+ skills: ["security-review"]
604
+ hooks: ["validate-types"]
605
+ mcpServers: ["issue-tracker"]
606
+ }
607
+ }
608
+ ```
609
+
421
610
  ### @local
422
611
 
423
612
  Private local configuration. Not included in compiled output or committed to git.
@@ -482,8 +671,12 @@ Then use the alias as scope prefix:
482
671
  Merge rules:
483
672
 
484
673
  - Text: concatenated with deduplication
485
- - Objects: deep merged (target wins on conflicts)
674
+ - Objects: deep merged (imported source wins same-shape conflicts)
486
675
  - Arrays: unique concatenation
676
+ - Shape mismatch: existing target body wins
677
+
678
+ Under syntax `1.5.0`, later local blocks, `@extend`, and `@override`
679
+ operations apply to the accumulated import result in declaration order.
487
680
 
488
681
  ### Block Filtering
489
682
 
@@ -565,16 +758,38 @@ Replacement works after `@inherit` and `@use`, including aliases and nested targ
565
758
  A missing field is set. The modifier is rejected for `@skills`, which retain their dedicated
566
759
  merge and sealing semantics.
567
760
 
761
+ #### Replacing complete targets with @override
762
+
763
+ Syntax `1.5.0` adds atomic replacement for an existing block or nested value:
764
+
765
+ ```
766
+ @meta { id: "project" syntax: "1.5.0" }
767
+
768
+ @standards {
769
+ testing: ["Use Jest", "Use Mocha"]
770
+ }
771
+
772
+ @override standards.testing {
773
+ ["Use Vitest"]
774
+ }
775
+ ```
776
+
777
+ `@override` requires the complete target path to exist, applies in declaration
778
+ order, and cannot bypass sealed skill properties. Later `@extend` declarations
779
+ merge into the replacement. Use `@extend` for additive changes, `field!` for
780
+ compatibility replacement of one direct regular field, and `@override` for
781
+ intentional complete replacement.
782
+
568
783
  #### Skill-aware @extend semantics
569
784
 
570
785
  When extending a skill definition via `@extend`, individual skill properties follow specific merge
571
786
  strategies rather than the generic block merge rules:
572
787
 
573
- | Strategy | Properties |
574
- | ----------------- | -------------------------------------------------------------------------------------------------- |
575
- | **Replace** | content, description, trigger, userInvocable, allowedTools, disableModelInvocation, context, agent |
576
- | **Append** | references, examples, requires |
577
- | **Shallow merge** | params, inputs, outputs |
788
+ | Strategy | Properties |
789
+ | ----------------- | ----------------------------------------------------------------------------------------------------------- |
790
+ | **Replace** | content, description, trigger, userInvocable, allowedTools, disableModelInvocation, context, agent, license |
791
+ | **Append** | references, examples, requires |
792
+ | **Shallow merge** | params, inputs, outputs |
578
793
 
579
794
  Example — extending a base skill to add references and override content:
580
795
 
@@ -771,11 +986,11 @@ policies:
771
986
 
772
987
  ### Lockfile: `promptscript.lock`
773
988
 
774
- When remote imports are used, `prs compile` automatically generates a lockfile
775
- recording the exact resolved commit for each dependency. Integrity hashes
776
- (SHA-256) are included for registry references to detect tampering or drift.
777
- This enables reproducible builds across machines and CI. Commit `promptscript.lock`
778
- to version control.
989
+ When remote imports are used, run `prs lock` to generate or update the lockfile
990
+ before compilation. It records the exact resolved commit for each dependency.
991
+ Integrity hashes (SHA-256) are included for registry references to detect
992
+ tampering or drift. This enables reproducible builds across machines and CI.
993
+ Commit `promptscript.lock` to version control.
779
994
 
780
995
  Use `--ignore-hashes` on `prs compile` or `prs validate` to skip integrity
781
996
  hash verification when needed.
@@ -824,6 +1039,7 @@ The `syntax` field in `@meta` declares the PromptScript language version (semver
824
1039
  | `1.2.0` | Adds `@examples` (few-shot input/output pairs) |
825
1040
  | `1.3.0` | Adds explicit regular block field replacement in `@extend` |
826
1041
  | `1.4.0` | Adds `@hooks`, `@mcpServers`, and `@plugins` |
1042
+ | `1.5.0` | Adds `@header` section titles, `@override` replacement, and unquoted `${VAR}` values |
827
1043
 
828
1044
  ### Block Version Requirements
829
1045
 
@@ -838,11 +1054,40 @@ The `syntax` field in `@meta` declares the PromptScript language version (semver
838
1054
 
839
1055
  All other built-in blocks are available from `1.0.0`.
840
1056
  Regular block field replacement with `field!: value` requires syntax `1.3.0`.
1057
+ Generated section title overrides with `@header` require syntax `1.5.0`.
1058
+ Atomic replacement with `@override` requires syntax `1.5.0`.
1059
+ Unquoted `${VAR}` references as values require syntax `1.5.0`.
1060
+
1061
+ ### Generated Section Headers
1062
+
1063
+ Use `@header` inside a registered owner block to rename human-readable output
1064
+ sections without changing filenames, frontmatter, XML tags, or structured keys:
1065
+
1066
+ ```promptscript
1067
+ @meta { id: "localized" syntax: "1.5.0" }
1068
+
1069
+ @standards {
1070
+ @header "Coding Rules"
1071
+ @header git-commits "Commit Rules"
1072
+ code: ["Use strict TypeScript"]
1073
+ }
1074
+ ```
1075
+
1076
+ - `@header "Title"` targets the block's primary section.
1077
+ - `@header <section-key> "Title"` targets an owned derived section.
1078
+ - Titles must be non-empty, single-line strings.
1079
+ - Source overrides take precedence over formatter configuration and target defaults.
1080
+ - Child inheritance, imported source, and the latest root extension take precedence.
1081
+ - An initial `## Heading` in a registered text-only primary owner is a syntax
1082
+ `1.5.0` compatibility fallback. Explicit `@header` metadata wins.
1083
+ - Ordinary `header` and `headers` fields remain domain data.
841
1084
 
842
1085
  ### Validation Rules
843
1086
 
844
1087
  - **PS018 (`syntax-version-compat`)**: warns when resolved blocks or syntax features require a higher version than declared. Requirements from inheritance, imports, and skill composition are included. Suggestion: run `prs validate --fix`.
845
1088
  - **PS019 (`unknown-block-name`)**: warns when a block name is not a known PromptScript type, with fuzzy-match suggestions for typos.
1089
+ - **PS037 (`valid-section-headers`)**: rejects invalid titles, unknown or unowned section keys, duplicate overrides, and nested extension overrides.
1090
+ - **PS038 (`valid-block-shape`)**: rejects unsupported built-in block shapes and warns about formatter-sensitive legacy shapes or multiline shortcut scalars.
846
1091
  - **PS021 (`use-block-filter`)**: errors when `only` and `exclude` are both specified in `@use` parameters.
847
1092
  - **PS025 (`valid-skill-references`)**: errors when a `references` entry points to a file with a disallowed extension or a path that cannot be resolved.
848
1093
  - **PS026 (`safe-reference-content`)**: warns when a referenced file contains potentially sensitive content (e.g., secrets, credentials).
@@ -850,6 +1095,11 @@ Regular block field replacement with `field!: value` requires syntax `1.3.0`.
850
1095
  - **PS028 (`valid-append-negation`)**: warns when negation prefix `!` appears in base skill definitions (only effective in `@extend`).
851
1096
  - **PS029 (`valid-sealed-property`)**: warns when `sealed` contains non-replace-strategy property names.
852
1097
  - **PS030 (`policy-compliance`)**: validates skill extensions against organizational policies defined in `promptscript.yaml`.
1098
+ - **PS034 (`valid-hooks`)**: validates portable hook events, commands/scripts, paths, interpreters, timeouts, cwd, and target overrides.
1099
+
1100
+ Target formatters report **PS4002** when a hook event or field has no native equivalent,
1101
+ when a target cannot guarantee project-root execution, or when output mode cannot emit
1102
+ the additional hook file.
853
1103
 
854
1104
  ### Fixing Syntax Versions
855
1105
 
@@ -887,6 +1137,8 @@ prs inspect <skill> # Show skill composition provenance
887
1137
  prs inspect <skill> --layers # Show layer-level breakdown
888
1138
  prs hooks install # Install auto-compilation hooks for AI tools
889
1139
  prs hooks install claude # Install hooks for a specific tool
1140
+ prs hooks uninstall # Remove installed auto-compilation hooks
1141
+ prs hooks uninstall claude # Remove hooks for a specific tool
890
1142
  prs skills add <source> # Add a remote skill (@use + lock update + SKILL.md validation)
891
1143
  prs skills add <source> --strict # Treat validation warnings as errors
892
1144
  prs skills add <source> --skip-validation # Bypass Agent Skills spec checks (not recommended)
@@ -994,7 +1246,7 @@ The fastest way to convert existing AI instructions to PromptScript:
994
1246
  ```
995
1247
  prs import CLAUDE.md # Convert a single file
996
1248
  prs import .github/copilot-instructions.md
997
- prs import AGENTS.md --output ./imported.prs
1249
+ prs import AGENTS.md --output ./imported
998
1250
  prs import --dry-run CLAUDE.md # Preview without writing
999
1251
  ```
1000
1252
 
package/src/cli.d.ts CHANGED
@@ -3,5 +3,5 @@
3
3
  * Run the CLI.
4
4
  * @param args - Command line arguments (defaults to process.argv)
5
5
  */
6
- export declare function run(args?: string[]): void;
6
+ export declare function run(args?: string[]): Promise<void>;
7
7
  //# sourceMappingURL=cli.d.ts.map
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":";AAkTA;;;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":";AAuVA;;;GAGG;AACH,wBAAsB,GAAG,CAAC,IAAI,GAAE,MAAM,EAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAStE"}
@@ -1 +1 @@
1
- {"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/commands/compile.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAkBlD,OAAO,EAAE,KAAK,WAAW,EAAyB,MAAM,gBAAgB,CAAC;AAmhBzE;;GAEG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,cAAc,EACvB,QAAQ,GAAE,WAAqC,GAC9C,OAAO,CAAC,IAAI,CAAC,CAEf"}
1
+ {"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/commands/compile.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAkBlD,OAAO,EAAE,KAAK,WAAW,EAAyB,MAAM,gBAAgB,CAAC;AA0wBzE;;GAEG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,cAAc,EACvB,QAAQ,GAAE,WAAqC,GAC9C,OAAO,CAAC,IAAI,CAAC,CAEf"}
@@ -1 +1 @@
1
- {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/commands/hooks.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,+CAA+C;IAC/C,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAsBD;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAuBrF;AAuLD;;GAEG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,MAAM,EACd,IAAI,CAAC,EAAE,MAAM,EACb,OAAO,GAAE,YAAiB,GACzB,OAAO,CAAC,IAAI,CAAC,CA0Bf"}
1
+ {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/commands/hooks.ts"],"names":[],"mappings":"AAUA;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,+CAA+C;IAC/C,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAsBD;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAuBrF;AA0RD;;GAEG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,MAAM,EACd,IAAI,CAAC,EAAE,MAAM,EACb,OAAO,GAAE,YAAiB,GACzB,OAAO,CAAC,IAAI,CAAC,CA0Bf"}
@@ -0,0 +1,3 @@
1
+ export type TelemetryAction = 'status' | 'enable' | 'disable';
2
+ export declare function telemetryCommand(action: string): Promise<void>;
3
+ //# sourceMappingURL=telemetry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/commands/telemetry.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE9D,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA4BpE"}
@@ -8,6 +8,7 @@ import type { PromptScriptConfig } from '@promptscript/core';
8
8
  * - PROMPTSCRIPT_REGISTRY_URL → registry.url
9
9
  * - PROMPTSCRIPT_CACHE_TTL → registry.cache.ttl (parsed as number)
10
10
  * - PROMPTSCRIPT_CACHE_ENABLED → registry.cache.enabled (parsed as boolean)
11
+ * - PROMPTSCRIPT_TELEMETRY → telemetry (parsed as boolean)
11
12
  */
12
13
  export declare function loadEnvOverrides(): Partial<PromptScriptConfig>;
13
14
  //# sourceMappingURL=env-config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"env-config.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/config/env-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAE7D;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAAC,kBAAkB,CAAC,CA6C9D"}
1
+ {"version":3,"file":"env-config.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/config/env-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAE7D;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAAC,kBAAkB,CAAC,CA0D9D"}
@@ -1 +1 @@
1
- {"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/config/loader.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAK7D;;GAEG;AACH,eAAO,MAAM,YAAY,UAKxB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAoBvD;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAmBjE;AAED;;;;;GAKG;AACH,wBAAsB,UAAU,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAqBjF;AAED;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CACvC,UAAU,CAAC,EAAE,MAAM,EACnB,QAAQ,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,GACrC,OAAO,CAAC,kBAAkB,CAAC,CAM7B"}
1
+ {"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/config/loader.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAK7D;;GAEG;AACH,eAAO,MAAM,YAAY,UAKxB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAmBjE;AAED;;;;;GAKG;AACH,wBAAsB,UAAU,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAqBjF;AAED;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CACvC,UAAU,CAAC,EAAE,MAAM,EACnB,QAAQ,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,GACrC,OAAO,CAAC,kBAAkB,CAAC,CAM7B"}
@@ -1 +1 @@
1
- {"version":3,"file":"merge-config.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/config/merge-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAoEzE;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,kBAAkB,EACjC,YAAY,EAAE,OAAO,CAAC,kBAAkB,CAAC,EACzC,QAAQ,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,GACrC,kBAAkB,CA0BpB"}
1
+ {"version":3,"file":"merge-config.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/config/merge-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAoEzE;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,kBAAkB,EACjC,YAAY,EAAE,OAAO,CAAC,kBAAkB,CAAC,EACzC,QAAQ,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,GACrC,kBAAkB,CA2CpB"}
@@ -1 +1 @@
1
- {"version":3,"file":"detect-marker.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/hooks/detect-marker.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE,OAAO,CAAC;IACrB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAUD,wBAAsB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAqB1E"}
1
+ {"version":3,"file":"detect-marker.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/hooks/detect-marker.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE,OAAO,CAAC;IACrB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAeD,wBAAsB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAsB1E"}
@@ -2,11 +2,12 @@
2
2
  * Extracts the edited file path from AI tool hook JSON payloads.
3
3
  *
4
4
  * Supports:
5
- * - Claude Code / Factory AI / Copilot — tool_input.file_path
6
- * - Gemini CLI — arguments.file_path (write_* / edit_* tools only)
7
- * - Cursor — filePath (camelCase top-level)
8
- * - Windsurf — file_path (top-level, no tool_input wrapper)
9
- * - Cline — file (top-level)
5
+ * - Claude Code / Factory AI - tool_input.file_path
6
+ * - VS Code Copilot Agent Hooks - tool_input.filePath
7
+ * - Gemini CLI - arguments.file_path (write_* / edit_* tools only)
8
+ * - Cursor - filePath (camelCase top-level)
9
+ * - Windsurf - file_path (top-level, no tool_input wrapper)
10
+ * - Cline - file (top-level)
10
11
  */
11
12
  export declare function extractFilePath(input: unknown): string | null;
12
13
  //# sourceMappingURL=extract-file-path.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"extract-file-path.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/hooks/extract-file-path.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CA+B7D"}
1
+ {"version":3,"file":"extract-file-path.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/hooks/extract-file-path.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAmC7D"}
@@ -1,8 +1,10 @@
1
1
  import type { ToolHookConfig } from './types.js';
2
+ export declare function isPromptScriptHookCommand(command: string): boolean;
2
3
  /**
3
- * Returns true if the given hook array entry contains a `prs hook` command,
4
- * indicating it was installed by PromptScript.
4
+ * Returns true if the given hook array entry contains a PromptScript hook
5
+ * command, indicating it was installed by PromptScript.
5
6
  */
6
7
  export declare function isPrsHookEntry(entry: unknown): boolean;
8
+ export declare function removePromptScriptHooks(entry: unknown): unknown | undefined;
7
9
  export declare const claudeConfig: ToolHookConfig;
8
10
  //# sourceMappingURL=claude.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"claude.d.ts","sourceRoot":"","sources":["../../../../../../packages/cli/src/hooks/tool-configs/claude.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CActD;AAeD,eAAO,MAAM,YAAY,EAAE,cA0E1B,CAAC"}
1
+ {"version":3,"file":"claude.d.ts","sourceRoot":"","sources":["../../../../../../packages/cli/src/hooks/tool-configs/claude.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAKjD,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAElE;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CActD;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,CAqB3E;AAeD,eAAO,MAAM,YAAY,EAAE,cAgF1B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"cline.d.ts","sourceRoot":"","sources":["../../../../../../packages/cli/src/hooks/tool-configs/cline.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,eAAO,MAAM,WAAW,EAAE,cA2BzB,CAAC"}
1
+ {"version":3,"file":"cline.d.ts","sourceRoot":"","sources":["../../../../../../packages/cli/src/hooks/tool-configs/cline.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAajD,eAAO,MAAM,WAAW,EAAE,cA+BzB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"copilot.d.ts","sourceRoot":"","sources":["../../../../../../packages/cli/src/hooks/tool-configs/copilot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAgBjD,eAAO,MAAM,aAAa,EAAE,cAuE3B,CAAC"}
1
+ {"version":3,"file":"copilot.d.ts","sourceRoot":"","sources":["../../../../../../packages/cli/src/hooks/tool-configs/copilot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAgBjD,eAAO,MAAM,aAAa,EAAE,cA6E3B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../../../packages/cli/src/hooks/tool-configs/factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAgBjD,eAAO,MAAM,aAAa,EAAE,cAuE3B,CAAC"}
1
+ {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../../../packages/cli/src/hooks/tool-configs/factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAgBjD,eAAO,MAAM,aAAa,EAAE,cA6E3B,CAAC"}
@@ -7,6 +7,8 @@ export { copilotConfig } from './copilot.js';
7
7
  export { geminiConfig } from './gemini.js';
8
8
  export type { ToolHookConfig } from './types.js';
9
9
  import type { ToolHookConfig } from './types.js';
10
+ import { type HookCapability } from '@promptscript/core';
10
11
  export declare const ALL_TOOL_CONFIGS: ToolHookConfig[];
11
12
  export declare function getToolConfig(name: string): ToolHookConfig | undefined;
13
+ export declare function getToolHookCapability(name: string): HookCapability | undefined;
12
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/cli/src/hooks/tool-configs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,YAAY,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AASjD,eAAO,MAAM,gBAAgB,EAAE,cAAc,EAQ5C,CAAC;AAEF,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAEtE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/cli/src/hooks/tool-configs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,YAAY,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAQjD,OAAO,EAAqB,KAAK,cAAc,EAAoB,MAAM,oBAAoB,CAAC;AAY9F,eAAO,MAAM,gBAAgB,EAAE,cAAc,EAQ5C,CAAC;AAEF,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAEtE;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAG9E"}
@@ -5,6 +5,7 @@ export interface ToolHookConfig {
5
5
  timeoutUnit: 'seconds' | 'milliseconds' | 'n/a';
6
6
  generatePreEditHook(prsPath: string): Record<string, unknown>;
7
7
  generatePostEditHook(prsPath: string): Record<string, unknown>;
8
+ isOwnedScript?(content: string, action: 'pre-edit' | 'post-edit'): boolean;
8
9
  mergeIntoSettings(existing: Record<string, unknown>, prsPath: string): Record<string, unknown>;
9
10
  removeFromSettings(existing: Record<string, unknown>): Record<string, unknown>;
10
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/cli/src/hooks/tool-configs/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,SAAS,GAAG,cAAc,GAAG,KAAK,CAAC;IAChD,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9D,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/D,iBAAiB,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/F,kBAAkB,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChF"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/cli/src/hooks/tool-configs/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,SAAS,GAAG,cAAc,GAAG,KAAK,CAAC;IAChD,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9D,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/D,aAAa,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC;IAC3E,iBAAiB,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/F,kBAAkB,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChF"}
@@ -0,0 +1,10 @@
1
+ import { type ResolvedTelemetryConfig } from '@promptscript/telemetry';
2
+ export interface CliTelemetryConfigOptions {
3
+ cwd?: string;
4
+ config?: string;
5
+ cacheDirectory?: string;
6
+ userConfigPath?: string;
7
+ }
8
+ export declare function resolveCliTelemetryConfig(options?: CliTelemetryConfigOptions): Promise<ResolvedTelemetryConfig>;
9
+ export declare function setUserTelemetryEnabled(enabled: boolean, configPath?: string): Promise<void>;
10
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/telemetry/config.ts"],"names":[],"mappings":"AAIA,OAAO,EAA0B,KAAK,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAI/F,MAAM,WAAW,yBAAyB;IACxC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAsDD,wBAAsB,yBAAyB,CAC7C,OAAO,GAAE,yBAA8B,GACtC,OAAO,CAAC,uBAAuB,CAAC,CAgClC;AAED,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,OAAO,EAChB,UAAU,GAAE,MAAyB,GACpC,OAAO,CAAC,IAAI,CAAC,CAkBf"}
@@ -0,0 +1,14 @@
1
+ import type { Command } from 'commander';
2
+ import { getSpoolInfo, readFlushState, type ResolvedTelemetryConfig, type TelemetryOutcome } from '@promptscript/telemetry';
3
+ export declare function normalizedCommandName(command: Command): string;
4
+ export declare function commandFeatures(command: Command): string[];
5
+ export declare function exitOutcome(code: number): TelemetryOutcome;
6
+ export declare function prepareCliTelemetry(command: Command, appVersion: string): Promise<void>;
7
+ export declare function finishCliTelemetry(outcome?: TelemetryOutcome): void;
8
+ export declare function flushCliTelemetry(): Promise<void>;
9
+ export declare function telemetryStatus(): Promise<{
10
+ config: ResolvedTelemetryConfig;
11
+ spool: ReturnType<typeof getSpoolInfo>;
12
+ state: ReturnType<typeof readFlushState>;
13
+ }>;
14
+ //# sourceMappingURL=session.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/telemetry/session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EACL,YAAY,EAGZ,cAAc,EAKd,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,EACtB,MAAM,yBAAyB,CAAC;AAMjC,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAU9D;AAYD,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,EAAE,CA0B1D;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB,CAK1D;AA4BD,wBAAsB,mBAAmB,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAkB7F;AAED,wBAAgB,kBAAkB,CAAC,OAAO,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAMnE;AAED,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,CAGvD;AAED,wBAAsB,eAAe,IAAI,OAAO,CAAC;IAC/C,MAAM,EAAE,uBAAuB,CAAC;IAChC,KAAK,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;IACvC,KAAK,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;CAC1C,CAAC,CAOD"}
package/src/types.d.ts CHANGED
@@ -70,6 +70,8 @@ export interface CompileOptions {
70
70
  output?: string;
71
71
  /** Preview changes without writing files */
72
72
  dryRun?: boolean;
73
+ /** Migrate unambiguous legacy Factory settings hooks during compilation */
74
+ migrateFactoryHooks?: boolean;
73
75
  /** Registry path or URL (overrides config) */
74
76
  registry?: string;
75
77
  /** Path to custom config file */