pupt-lib 1.3.5 → 1.3.6

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 (32) hide show
  1. package/README.md +24 -345
  2. package/dist/components/structural/Prompt.d.ts.map +1 -1
  3. package/dist/components/structural/Role.d.ts.map +1 -1
  4. package/dist/index.js +788 -129
  5. package/dist/src/api.d.ts +9 -0
  6. package/dist/src/api.d.ts.map +1 -1
  7. package/dist/src/index.d.ts +6 -3
  8. package/dist/src/index.d.ts.map +1 -1
  9. package/dist/src/render.d.ts.map +1 -1
  10. package/dist/src/services/module-loader.d.ts +58 -7
  11. package/dist/src/services/module-loader.d.ts.map +1 -1
  12. package/dist/src/services/prompt-sources/github-prompt-source.d.ts +35 -0
  13. package/dist/src/services/prompt-sources/github-prompt-source.d.ts.map +1 -0
  14. package/dist/src/services/prompt-sources/index.d.ts +8 -0
  15. package/dist/src/services/prompt-sources/index.d.ts.map +1 -0
  16. package/dist/src/services/prompt-sources/local-prompt-source.d.ts +13 -0
  17. package/dist/src/services/prompt-sources/local-prompt-source.d.ts.map +1 -0
  18. package/dist/src/services/prompt-sources/npm-local-prompt-source.d.ts +18 -0
  19. package/dist/src/services/prompt-sources/npm-local-prompt-source.d.ts.map +1 -0
  20. package/dist/src/services/prompt-sources/npm-registry-prompt-source.d.ts +36 -0
  21. package/dist/src/services/prompt-sources/npm-registry-prompt-source.d.ts.map +1 -0
  22. package/dist/src/services/prompt-sources/tar-utils.d.ts +30 -0
  23. package/dist/src/services/prompt-sources/tar-utils.d.ts.map +1 -0
  24. package/dist/src/types/index.d.ts +4 -1
  25. package/dist/src/types/index.d.ts.map +1 -1
  26. package/dist/src/types/module.d.ts +12 -1
  27. package/dist/src/types/module.d.ts.map +1 -1
  28. package/dist/src/types/prompt-source.d.ts +12 -0
  29. package/dist/src/types/prompt-source.d.ts.map +1 -0
  30. package/dist/src/types/render.d.ts +11 -1
  31. package/dist/src/types/render.d.ts.map +1 -1
  32. package/package.json +8 -2
package/dist/src/api.d.ts CHANGED
@@ -4,6 +4,7 @@ import { InputIterator } from './services/input-iterator';
4
4
  * A discovered prompt with render and input iterator capabilities
5
5
  */
6
6
  export interface DiscoveredPromptWithMethods {
7
+ id: string;
7
8
  name: string;
8
9
  description: string;
9
10
  tags: string[];
@@ -20,6 +21,7 @@ export declare class Pupt {
20
21
  private moduleLoader;
21
22
  private searchEngine;
22
23
  private prompts;
24
+ private warnings;
23
25
  private initialized;
24
26
  constructor(config: PuptInitConfig);
25
27
  init(): Promise<void>;
@@ -27,10 +29,17 @@ export declare class Pupt {
27
29
  tags?: string[];
28
30
  }): DiscoveredPromptWithMethods[];
29
31
  getPrompt(name: string): DiscoveredPromptWithMethods | undefined;
32
+ getPromptById(id: string): DiscoveredPromptWithMethods | undefined;
30
33
  searchPrompts(query: string, options?: Partial<SearchOptions>): SearchResult[];
31
34
  getTags(): string[];
32
35
  getPromptsByTag(tag: string): DiscoveredPromptWithMethods[];
36
+ getWarnings(): string[];
33
37
  private discoverPrompts;
38
+ /**
39
+ * Get a deduplication key for a module entry.
40
+ * Returns null for PromptSource instances (cannot be deduplicated).
41
+ */
42
+ private getEntryDedupKey;
34
43
  private loadModuleExports;
35
44
  private isPromptElement;
36
45
  private createDiscoveredPrompt;
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,YAAY,EACZ,aAAa,EACb,aAAa,EACb,YAAY,EACZ,WAAW,EACZ,MAAM,SAAS,CAAC;AAKjB,OAAO,EAAuB,KAAK,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAGpF;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,WA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M,EAAE,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,WAAW,CAAC;IACrB,MAAM,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAChE,gBAAgB,IAAI,aAAa,CAAC;CACnC;AAED;;GAEG;AACH,qBAAa,IAAI;IAOH,OAAO,CAAC,MAAM;IAN1B,OAAO,CAAC,YAAY,CAAsB;IAC1C,OAAO,CAAC,YAAY,CAAe;IACnC,OAAO,CAAC,OAAO,CAAqC;IACpD,OAAO,CAAC,QAAQ,CAAgB;IAChC,OAAO,CAAC,WAAW,CAAS;gBAER,MAAM,EAAE,cAAc;IAIpC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAmB3B,UAAU,CAAC,MAAM,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,GAAG,2BAA2B,EAAE;IAOvE,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,2BAA2B,GAAG,SAAS;IAIhE,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,2BAA2B,GAAG,SAAS;IAIlE,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,YAAY,EAAE;IAI9E,OAAO,IAAI,MAAM,EAAE;IAInB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,2BAA2B,EAAE;IAI3D,WAAW,IAAI,MAAM,EAAE;YAIT,eAAe;IA2E7B;;;OAGG;IACH,OAAO,CAAC,gBAAgB;YAmBV,iBAAiB;IAe/B,OAAO,CAAC,eAAe;IAYvB,OAAO,CAAC,sBAAsB;CAgC/B"}
@@ -1,8 +1,9 @@
1
1
  export declare const VERSION = "0.0.0-development";
2
2
  export { TYPE, PROPS, CHILDREN, DEFERRED_REF } from './types/symbols';
3
3
  export { isPuptElement, isDeferredRef } from './types/element';
4
- export type { PuptNode, PuptElement, ComponentType, DeferredRef, LlmConfig, LlmProvider, OutputConfig, CodeConfig, UserConfig, RuntimeConfig, PromptConfig, EnvironmentContext, RenderContext, RenderOptions, RenderResult, RenderSuccess, RenderFailure, RenderError, PostExecutionAction, ReviewFileAction, OpenUrlAction, RunCommandAction, InputRequirement, ValidationResult, ValidationError, SearchablePrompt, SearchOptions, SearchResult, SearchResultMatch, SearchEngineConfig, PuptConfig, PuptLibrary, DiscoveredPrompt, LibraryLoadResult, PuptInitConfig, } from './types';
5
- export { LLM_PROVIDERS, inferProviderFromModel, DEFAULT_ENVIRONMENT, createEnvironment, createRuntimeConfig, ensureRuntimeCacheReady, } from './types';
4
+ export type { PuptNode, PuptElement, ComponentType, DeferredRef, LlmConfig, LlmProvider, OutputConfig, CodeConfig, UserConfig, RuntimeConfig, PromptConfig, EnvironmentContext, RenderContext, RenderOptions, RenderResult, RenderSuccess, RenderFailure, RenderError, PostExecutionAction, ReviewFileAction, OpenUrlAction, RunCommandAction, InputRequirement, ValidationResult, ValidationError, SearchablePrompt, SearchOptions, SearchResult, SearchResultMatch, SearchEngineConfig, ModuleEntry, PuptConfig, PuptLibrary, DiscoveredPrompt, LibraryLoadResult, PuptInitConfig, DiscoveredPromptFile, PromptSource, } from './types';
5
+ export { isPromptSource } from './types';
6
+ export { LLM_PROVIDERS, inferProviderFromModel, DEFAULT_ENVIRONMENT, createEnvironment, createRuntimeConfig, ensureRuntimeCacheReady, isWarningCode, } from './types';
6
7
  export { Component, isComponentClass, COMPONENT_MARKER } from './component';
7
8
  export { render } from './render';
8
9
  export { wrapWithDelimiter } from './utils/delimiter';
@@ -23,7 +24,9 @@ export { preprocessSource, isPromptFile } from './services/preprocessor';
23
24
  export type { PreprocessOptions } from './services/preprocessor';
24
25
  export { getBuiltinComponents, getAskComponents, getAskShorthand, getStructuralComponents, } from './services/component-discovery';
25
26
  export { ModuleLoader } from './services/module-loader';
26
- export type { SourceType, LoadedLibrary, ParsedPackageSource } from './services/module-loader';
27
+ export type { SourceType, LoadedLibrary, CompiledPrompt, ParsedPackageSource } from './services/module-loader';
28
+ export { LocalPromptSource, NpmLocalPromptSource, GitHubPromptSource, parseGitHubSource, NpmRegistryPromptSource } from './services/prompt-sources';
29
+ export type { GitHubPromptSourceOptions } from './services/prompt-sources';
27
30
  export { resolveCdn, generateImportMap, serializeImportMap, generateImportMapScript, generatePuptLibImportMap, generatePuptLibImportMapScript, } from './services/browser-support';
28
31
  export type { CdnProvider, CdnOptions, Dependency, ImportMap, PuptLibImportMapOptions, } from './services/browser-support';
29
32
  export * from '../components';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,sBAAsB,CAAC;AAG3C,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAGtE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAG/D,YAAY,EACV,QAAQ,EACR,WAAW,EACX,aAAa,EACb,WAAW,EACX,SAAS,EACT,WAAW,EACX,YAAY,EACZ,UAAU,EACV,UAAU,EACV,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,aAAa,EACb,aAAa,EACb,YAAY,EACZ,aAAa,EACb,aAAa,EACb,WAAW,EACX,mBAAmB,EACnB,gBAAgB,EAChB,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,GACf,MAAM,SAAS,CAAC;AAGjB,OAAO,EACL,aAAa,EACb,sBAAsB,EACtB,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,uBAAuB,GACxB,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,SAAS,EAAE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AAE,MAAM,yBAAyB,CAAC;AAG3E,OAAO,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACvE,YAAY,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAG3D,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAC7B,YAAY,EAAE,2BAA2B,EAAE,MAAM,OAAO,CAAC;AAGzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,YAAY,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAG7D,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAC1G,YAAY,EACV,QAAQ,EACR,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,+BAA+B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../src/render.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAY,YAAY,EAAE,aAAa,EAAmD,MAAM,SAAS,CAAC;AAuInI;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,MAAM,CAC1B,OAAO,EAAE,WAAW,EACpB,OAAO,GAAE,aAAkB,GAC1B,OAAO,CAAC,YAAY,CAAC,CA2DvB"}
1
+ {"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../src/render.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAY,YAAY,EAAE,aAAa,EAAmD,MAAM,SAAS,CAAC;AAwInI;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,MAAM,CAC1B,OAAO,EAAE,WAAW,EACpB,OAAO,GAAE,aAAkB,GAC1B,OAAO,CAAC,YAAY,CAAC,CA2EvB"}
@@ -1,14 +1,25 @@
1
- import { ComponentType, PuptElement } from '../types';
1
+ import { ComponentType, PuptElement, ModuleEntry } from '../types';
2
+ import { PromptSource } from '../types/prompt-source';
2
3
  /**
3
4
  * Represents the source type of a module
4
5
  */
5
6
  export type SourceType = 'npm' | 'url' | 'github' | 'local';
7
+ /** A compiled prompt from a discovered .prompt file */
8
+ export interface CompiledPrompt {
9
+ element: PuptElement;
10
+ id: string;
11
+ name: string;
12
+ description: string;
13
+ tags: string[];
14
+ version?: string;
15
+ }
6
16
  /**
7
- * Represents a loaded library with its components
17
+ * Represents a loaded library with its components and prompts
8
18
  */
9
19
  export interface LoadedLibrary {
10
20
  name: string;
11
21
  components: Record<string, ComponentType>;
22
+ prompts: Record<string, CompiledPrompt>;
12
23
  dependencies: string[];
13
24
  }
14
25
  /**
@@ -39,6 +50,24 @@ export declare class ModuleLoader {
39
50
  * Handles deduplication and version conflict detection.
40
51
  */
41
52
  load(source: string): Promise<LoadedLibrary>;
53
+ /**
54
+ * Load a module entry of any type (string, PromptSource, or package reference).
55
+ * Dispatches to the appropriate loading strategy based on entry type.
56
+ */
57
+ loadEntry(entry: ModuleEntry): Promise<LoadedLibrary>;
58
+ /**
59
+ * Load prompts from a PromptSource instance.
60
+ */
61
+ loadPromptSource(source: PromptSource, name?: string): Promise<LoadedLibrary>;
62
+ /**
63
+ * Load prompts from a dynamic package reference.
64
+ * Imports the source module, instantiates its default export with the config,
65
+ * and calls getPrompts() on it.
66
+ */
67
+ loadPackageReference(ref: {
68
+ source: string;
69
+ config: Record<string, unknown>;
70
+ }): Promise<LoadedLibrary>;
42
71
  /**
43
72
  * Detect Component classes in module exports
44
73
  */
@@ -52,28 +81,50 @@ export declare class ModuleLoader {
52
81
  */
53
82
  private isPromptElement;
54
83
  /**
55
- * Normalize a source string for consistent caching
84
+ * Normalize a source string for consistent deduplication.
85
+ * Resolves relative paths to absolute, normalizes package names to lowercase.
56
86
  */
57
- private normalizeSource;
87
+ normalizeSource(source: string): string;
58
88
  /**
59
89
  * Actually load the module from the source.
60
90
  * This is the internal implementation that can be mocked in tests.
61
91
  */
62
92
  private doLoad;
93
+ /**
94
+ * Discover and compile .prompt files from a PromptSource.
95
+ * Each file is compiled through createPromptFromSource() and metadata extracted.
96
+ */
97
+ discoverAndCompilePrompts(source: PromptSource): Promise<Record<string, CompiledPrompt>>;
98
+ /**
99
+ * Compile an array of discovered prompt files into CompiledPrompt records.
100
+ */
101
+ private compilePromptFiles;
63
102
  /**
64
103
  * Load a local module
65
104
  */
66
105
  private loadLocal;
67
106
  /**
68
- * Load an npm package
107
+ * Load an npm package.
108
+ * Tries to import as a JS module and additionally discovers .prompt files.
69
109
  */
70
110
  private loadNpm;
71
111
  /**
72
- * Load a module from a URL
112
+ * Check if a URL looks like an npm tarball or CDN package URL.
113
+ */
114
+ private isTarballOrCdnUrl;
115
+ /**
116
+ * Load a module from a URL.
117
+ * Routes tarball/CDN URLs to NpmRegistryPromptSource for prompt discovery.
118
+ * Other URLs are loaded as JS modules via dynamic import.
73
119
  */
74
120
  private loadUrl;
75
121
  /**
76
- * Load a module from GitHub
122
+ * Load prompts from a tarball or CDN URL via NpmRegistryPromptSource.
123
+ */
124
+ private loadUrlAsPromptSource;
125
+ /**
126
+ * Load a module from GitHub.
127
+ * Tries to import index.js and additionally discovers .prompt files via GitHubPromptSource.
77
128
  */
78
129
  private loadGithub;
79
130
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"module-loader.d.ts","sourceRoot":"","sources":["../../../src/services/module-loader.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAqB3D;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IAC1C,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,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AAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,GAAG,OAAO,CAAC,aAAa,CAAC;IA+B5G;;OAEG;IACH,gBAAgB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC;IAcjF;;OAEG;IACH,aAAa,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC;IAY5E;;OAEG;IACH,OAAO,CAAC,eAAe;IAYvB;;;OAGG;IACH,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IA8BvC;;;OAGG;YACW,MAAM;IAiBpB;;;OAGG;IACG,yBAAyB,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAK9F;;OAEG;YACW,kBAAkB;IAoBhC;;OAEG;YACW,SAAS;IAyCvB;;;OAGG;YACW,OAAO;IA2CrB;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAiBzB;;;;OAIG;YACW,OAAO;IAuBrB;;OAEG;YACW,qBAAqB;IAanC;;;OAGG;YACW,UAAU;IAgDxB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAK3B;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAW1B;;OAEG;IACH,KAAK,IAAI,IAAI;CAKd"}
@@ -0,0 +1,35 @@
1
+ import { PromptSource, DiscoveredPromptFile } from '../../types/prompt-source';
2
+ /** Configuration options for GitHubPromptSource */
3
+ export interface GitHubPromptSourceOptions {
4
+ /** Git ref (branch, tag, or commit SHA). Defaults to 'main'. */
5
+ ref?: string;
6
+ /** GitHub personal access token for private repos or to avoid rate limiting. */
7
+ token?: string;
8
+ }
9
+ /**
10
+ * Parse a "owner/repo" string into its parts.
11
+ */
12
+ export declare function parseGitHubSource(source: string): {
13
+ owner: string;
14
+ repo: string;
15
+ ref?: string;
16
+ };
17
+ /**
18
+ * Discovers .prompt files from a GitHub repository using the Git Trees API.
19
+ *
20
+ * Fetches the repository tree and filters for files matching `prompts/*.prompt`,
21
+ * then fetches each file's content from raw.githubusercontent.com.
22
+ */
23
+ export declare class GitHubPromptSource implements PromptSource {
24
+ private owner;
25
+ private repo;
26
+ private ref;
27
+ private token?;
28
+ constructor(ownerRepo: string, options?: GitHubPromptSourceOptions);
29
+ getPrompts(): Promise<DiscoveredPromptFile[]>;
30
+ private fetchTree;
31
+ private filterPromptFiles;
32
+ private fetchFileContent;
33
+ private getHeaders;
34
+ }
35
+ //# sourceMappingURL=github-prompt-source.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"github-prompt-source.d.ts","sourceRoot":"","sources":["../../../../src/services/prompt-sources/github-prompt-source.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEpF,mDAAmD;AACnD,MAAM,WAAW,yBAAyB;IACxC,gEAAgE;IAChE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,gFAAgF;IAChF,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAeD;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,CAqB/F;AAED;;;;;GAKG;AACH,qBAAa,kBAAmB,YAAW,YAAY;IACrD,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,IAAI,CAAS;IACrB,OAAO,CAAC,GAAG,CAAS;IACpB,OAAO,CAAC,KAAK,CAAC,CAAS;gBAEX,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,yBAAyB;IAQ5D,UAAU,IAAI,OAAO,CAAC,oBAAoB,EAAE,CAAC;YAkBrC,SAAS;IA8BvB,OAAO,CAAC,iBAAiB;YAQX,gBAAgB;IAqB9B,OAAO,CAAC,UAAU;CAWnB"}
@@ -0,0 +1,8 @@
1
+ export { LocalPromptSource } from './local-prompt-source';
2
+ export { NpmLocalPromptSource } from './npm-local-prompt-source';
3
+ export { GitHubPromptSource } from './github-prompt-source';
4
+ export type { GitHubPromptSourceOptions } from './github-prompt-source';
5
+ export { parseGitHubSource } from './github-prompt-source';
6
+ export { NpmRegistryPromptSource } from './npm-registry-prompt-source';
7
+ export { extractPromptFiles, decompressGzip, parseTar } from './tar-utils';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/services/prompt-sources/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,YAAY,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { PromptSource, DiscoveredPromptFile } from '../../types/prompt-source';
2
+ /**
3
+ * Discovers .prompt files from a local filesystem directory.
4
+ *
5
+ * Accepts either a direct path to a directory containing .prompt files,
6
+ * or a package root path that has a `prompts/` subdirectory.
7
+ */
8
+ export declare class LocalPromptSource implements PromptSource {
9
+ private dirPath;
10
+ constructor(dirPath: string);
11
+ getPrompts(): Promise<DiscoveredPromptFile[]>;
12
+ }
13
+ //# sourceMappingURL=local-prompt-source.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-prompt-source.d.ts","sourceRoot":"","sources":["../../../../src/services/prompt-sources/local-prompt-source.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEpF;;;;;GAKG;AACH,qBAAa,iBAAkB,YAAW,YAAY;IACpD,OAAO,CAAC,OAAO,CAAS;gBAEZ,OAAO,EAAE,MAAM;IAIrB,UAAU,IAAI,OAAO,CAAC,oBAAoB,EAAE,CAAC;CA6CpD"}
@@ -0,0 +1,18 @@
1
+ import { PromptSource, DiscoveredPromptFile } from '../../types/prompt-source';
2
+ /**
3
+ * Discovers .prompt files from locally installed npm packages.
4
+ *
5
+ * Resolves the package to its location in node_modules/,
6
+ * then looks for a `prompts/` subdirectory containing .prompt files.
7
+ */
8
+ export declare class NpmLocalPromptSource implements PromptSource {
9
+ private packageName;
10
+ constructor(packageName: string);
11
+ getPrompts(): Promise<DiscoveredPromptFile[]>;
12
+ /**
13
+ * Resolve a bare package name to its directory path in node_modules.
14
+ * Uses import.meta.resolve() when available, with createRequire fallback.
15
+ */
16
+ resolvePackagePath(packageName: string): Promise<string>;
17
+ }
18
+ //# sourceMappingURL=npm-local-prompt-source.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"npm-local-prompt-source.d.ts","sourceRoot":"","sources":["../../../../src/services/prompt-sources/npm-local-prompt-source.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEpF;;;;;GAKG;AACH,qBAAa,oBAAqB,YAAW,YAAY;IACvD,OAAO,CAAC,WAAW,CAAS;gBAEhB,WAAW,EAAE,MAAM;IAIzB,UAAU,IAAI,OAAO,CAAC,oBAAoB,EAAE,CAAC;IA8BnD;;;OAGG;IACG,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CA8B/D"}
@@ -0,0 +1,36 @@
1
+ import { PromptSource, DiscoveredPromptFile } from '../../types/prompt-source';
2
+ /**
3
+ * Discovers .prompt files from npm packages by fetching tarballs from the registry.
4
+ *
5
+ * Supports:
6
+ * - Package specifiers: "package-name" or "package-name@version"
7
+ * - Direct tarball URLs: "https://registry.npmjs.org/pkg/-/pkg-1.0.0.tgz"
8
+ * - Custom registry URLs for enterprise registries
9
+ */
10
+ export declare class NpmRegistryPromptSource implements PromptSource {
11
+ private packageName?;
12
+ private version?;
13
+ private tarballUrl?;
14
+ private registryUrl;
15
+ constructor(specifier: string, options?: {
16
+ registryUrl?: string;
17
+ });
18
+ /**
19
+ * Create an NpmRegistryPromptSource from a direct tarball URL.
20
+ */
21
+ static fromUrl(url: string): NpmRegistryPromptSource;
22
+ getPrompts(): Promise<DiscoveredPromptFile[]>;
23
+ /**
24
+ * Parse a package specifier into name and optional version.
25
+ */
26
+ private parseSpecifier;
27
+ /**
28
+ * Resolve the tarball URL by fetching package metadata from the registry.
29
+ */
30
+ private resolveTarballUrl;
31
+ /**
32
+ * Download a tarball from the given URL.
33
+ */
34
+ private downloadTarball;
35
+ }
36
+ //# sourceMappingURL=npm-registry-prompt-source.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"npm-registry-prompt-source.d.ts","sourceRoot":"","sources":["../../../../src/services/prompt-sources/npm-registry-prompt-source.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAGpF;;;;;;;GAOG;AACH,qBAAa,uBAAwB,YAAW,YAAY;IAC1D,OAAO,CAAC,WAAW,CAAC,CAAS;IAC7B,OAAO,CAAC,OAAO,CAAC,CAAS;IACzB,OAAO,CAAC,UAAU,CAAC,CAAS;IAC5B,OAAO,CAAC,WAAW,CAAS;gBAEhB,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE;IAcjE;;OAEG;IACH,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,uBAAuB;IAI9C,UAAU,IAAI,OAAO,CAAC,oBAAoB,EAAE,CAAC;IAMnD;;OAEG;IACH,OAAO,CAAC,cAAc;IAyBtB;;OAEG;YACW,iBAAiB;IA6B/B;;OAEG;YACW,eAAe;CAiB9B"}
@@ -0,0 +1,30 @@
1
+ import { DiscoveredPromptFile } from '../../types/prompt-source';
2
+ /**
3
+ * Decompress a gzipped ArrayBuffer using the native DecompressionStream API.
4
+ * Available in Node.js 18+ and all modern browsers.
5
+ */
6
+ export declare function decompressGzip(compressed: ArrayBuffer): Promise<ArrayBuffer>;
7
+ /**
8
+ * Minimal tar parser for read-only extraction of file entries.
9
+ *
10
+ * The tar format uses 512-byte header blocks followed by file data
11
+ * aligned to 512-byte boundaries. We only need to iterate entries
12
+ * and extract their content.
13
+ */
14
+ export interface TarEntry {
15
+ name: string;
16
+ size: number;
17
+ content: Uint8Array;
18
+ }
19
+ /**
20
+ * Parse a tar archive (uncompressed) and yield file entries.
21
+ */
22
+ export declare function parseTar(buffer: ArrayBuffer): TarEntry[];
23
+ /**
24
+ * Extract .prompt files from a gzipped tarball (e.g., from npm registry).
25
+ *
26
+ * Looks for files matching `package/prompts/*.prompt` or `prompts/*.prompt`
27
+ * within the tar archive.
28
+ */
29
+ export declare function extractPromptFiles(tarballBuffer: ArrayBuffer): Promise<DiscoveredPromptFile[]>;
30
+ //# sourceMappingURL=tar-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tar-utils.d.ts","sourceRoot":"","sources":["../../../../src/services/prompt-sources/tar-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEtE;;;GAGG;AACH,wBAAsB,cAAc,CAAC,UAAU,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CAyBlF;AAED;;;;;;GAMG;AACH,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,UAAU,CAAC;CACrB;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,WAAW,GAAG,QAAQ,EAAE,CAoCxD;AAaD;;;;;GAKG;AACH,wBAAsB,kBAAkB,CAAC,aAAa,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,EAAE,CAAC,CAmBpG"}
@@ -4,7 +4,10 @@ export { isPuptElement, isDeferredRef } from './element';
4
4
  export type { LlmConfig, LlmProvider, OutputConfig, CodeConfig, UserConfig, RuntimeConfig, PromptConfig, EnvironmentContext, RenderContext, } from './context';
5
5
  export { LLM_PROVIDERS, inferProviderFromModel, DEFAULT_ENVIRONMENT, createEnvironment, createRuntimeConfig, ensureRuntimeCacheReady, llmConfigSchema, outputConfigSchema, codeConfigSchema, userConfigSchema, runtimeConfigSchema, promptConfigSchema, environmentContextSchema, } from './context';
6
6
  export type { RenderOptions, RenderResult, RenderSuccess, RenderFailure, RenderError, PostExecutionAction, ReviewFileAction, OpenUrlAction, RunCommandAction, } from './render';
7
+ export { isWarningCode } from './render';
7
8
  export type { InputRequirement, ValidationResult, ValidationError, } from './input';
8
9
  export type { SearchablePrompt, SearchOptions, SearchResult, SearchResultMatch, SearchEngineConfig, } from './search';
9
- export type { PuptConfig, PuptLibrary, DiscoveredPrompt, LibraryLoadResult, PuptInitConfig, } from './module';
10
+ export type { ModuleEntry, PuptConfig, PuptLibrary, DiscoveredPrompt, LibraryLoadResult, PuptInitConfig, } from './module';
11
+ export type { DiscoveredPromptFile, PromptSource, } from './prompt-source';
12
+ export { isPromptSource } from './prompt-source';
10
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAGhE,YAAY,EACV,QAAQ,EACR,WAAW,EACX,aAAa,EACb,WAAW,GACZ,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAGzD,YAAY,EACV,SAAS,EACT,WAAW,EACX,YAAY,EACZ,UAAU,EACV,UAAU,EACV,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,aAAa,GACd,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,aAAa,EACb,sBAAsB,EACtB,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,uBAAuB,EAEvB,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,WAAW,CAAC;AAGnB,YAAY,EACV,aAAa,EACb,YAAY,EACZ,aAAa,EACb,aAAa,EACb,WAAW,EACX,mBAAmB,EACnB,gBAAgB,EAChB,aAAa,EACb,gBAAgB,GACjB,MAAM,UAAU,CAAC;AAGlB,YAAY,EACV,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,GAChB,MAAM,SAAS,CAAC;AAGjB,YAAY,EACV,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,UAAU,CAAC;AAGlB,YAAY,EACV,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,GACf,MAAM,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAGhE,YAAY,EACV,QAAQ,EACR,WAAW,EACX,aAAa,EACb,WAAW,GACZ,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAGzD,YAAY,EACV,SAAS,EACT,WAAW,EACX,YAAY,EACZ,UAAU,EACV,UAAU,EACV,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,aAAa,GACd,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,aAAa,EACb,sBAAsB,EACtB,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,uBAAuB,EAEvB,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,WAAW,CAAC;AAGnB,YAAY,EACV,aAAa,EACb,YAAY,EACZ,aAAa,EACb,aAAa,EACb,WAAW,EACX,mBAAmB,EACnB,gBAAgB,EAChB,aAAa,EACb,gBAAgB,GACjB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC,YAAY,EACV,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,GAChB,MAAM,SAAS,CAAC;AAGjB,YAAY,EACV,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,UAAU,CAAC;AAGlB,YAAY,EACV,WAAW,EACX,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,GACf,MAAM,UAAU,CAAC;AAGlB,YAAY,EACV,oBAAoB,EACpB,YAAY,GACb,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC"}
@@ -1,4 +1,15 @@
1
1
  import { ComponentType } from './element';
2
+ import { PromptSource } from './prompt-source';
3
+ /**
4
+ * A module entry can be:
5
+ * - A string (routed to built-in sources: local path, npm, URL, or GitHub)
6
+ * - A PromptSource instance (self-resolving prompt discovery)
7
+ * - A package reference with dynamic source loader and config
8
+ */
9
+ export type ModuleEntry = string | PromptSource | {
10
+ source: string;
11
+ config: Record<string, unknown>;
12
+ };
2
13
  /**
3
14
  * Configuration for a pupt library
4
15
  */
@@ -45,7 +56,7 @@ export interface LibraryLoadResult {
45
56
  * Configuration for initializing the Pupt class
46
57
  */
47
58
  export interface PuptInitConfig {
48
- modules?: string[];
59
+ modules?: ModuleEntry[];
49
60
  searchConfig?: {
50
61
  threshold?: number;
51
62
  weights?: {
@@ -1 +1 @@
1
- {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../src/types/module.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACvC;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,UAAU,CAAC;IACnB,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IACvC,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACvC,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,SAAS,EAAE,aAAa,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,OAAO,EA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H,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,UAAU,CAAC;IACnB,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IACvC,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACvC,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,SAAS,EAAE,aAAa,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;IACxB,YAAY,CAAC,EAAE;QACb,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE;YACR,IAAI,CAAC,EAAE,MAAM,CAAC;YACd,WAAW,CAAC,EAAE,MAAM,CAAC;YACrB,IAAI,CAAC,EAAE,MAAM,CAAC;YACd,OAAO,CAAC,EAAE,MAAM,CAAC;SAClB,CAAC;QACF,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH"}
@@ -0,0 +1,12 @@
1
+ /** A raw .prompt file discovered from a source */
2
+ export interface DiscoveredPromptFile {
3
+ filename: string;
4
+ content: string;
5
+ }
6
+ /** Interface for all prompt discovery backends */
7
+ export interface PromptSource {
8
+ getPrompts(): Promise<DiscoveredPromptFile[]>;
9
+ }
10
+ /** Type guard to check if a value implements the PromptSource interface */
11
+ export declare function isPromptSource(value: unknown): value is PromptSource;
12
+ //# sourceMappingURL=prompt-source.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt-source.d.ts","sourceRoot":"","sources":["../../../src/types/prompt-source.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,kDAAkD;AAClD,MAAM,WAAW,YAAY;IAC3B,UAAU,IAAI,OAAO,CAAC,oBAAoB,EAAE,CAAC,CAAC;CAC/C;AAED,2EAA2E;AAC3E,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,YAAY,CAOpE"}
@@ -6,6 +6,10 @@ export interface RenderOptions {
6
6
  trim?: boolean;
7
7
  inputs?: Map<string, unknown> | Record<string, unknown>;
8
8
  env?: EnvironmentContext;
9
+ /** When true, warnings (codes matching `warn_*`) are promoted to hard errors, causing `ok: false` */
10
+ throwOnWarnings?: boolean;
11
+ /** Warning codes to suppress entirely (e.g. `['warn_missing_task']`) */
12
+ ignoreWarnings?: string[];
9
13
  }
10
14
  /**
11
15
  * A validation or runtime error encountered during rendering
@@ -32,7 +36,7 @@ export interface RenderError {
32
36
  export interface RenderSuccess {
33
37
  ok: true;
34
38
  text: string;
35
- /** Non-fatal validation warnings (code: 'validation_warning') */
39
+ /** Non-fatal validation warnings (codes starting with `warn_` or legacy `validation_warning`) */
36
40
  errors?: RenderError[];
37
41
  postExecution: PostExecutionAction[];
38
42
  }
@@ -79,4 +83,10 @@ export interface RunCommandAction {
79
83
  cwd?: string;
80
84
  env?: Record<string, string>;
81
85
  }
86
+ /**
87
+ * Check whether a RenderError code represents a warning rather than a hard error.
88
+ * Warning codes use the `warn_` prefix by convention, with `validation_warning`
89
+ * supported as a legacy alias.
90
+ */
91
+ export declare function isWarningCode(code: string): boolean;
82
92
  //# sourceMappingURL=render.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../../src/types/render.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAEpD;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxD,GAAG,CAAC,EAAE,kBAAkB,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,4DAA4D;IAC5D,SAAS,EAAE,MAAM,CAAC;IAClB,uFAAuF;IACvF,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,mCAAmC;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,wEAAwE;IACxE,IAAI,EAAE,MAAM,CAAC;IACb,mCAAmC;IACnC,IAAI,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAC1B,kCAAkC;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sCAAsC;IACtC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,IAAI,CAAC;IACT,IAAI,EAAE,MAAM,CAAC;IACb,iEAAiE;IACjE,MAAM,CAAC,EAAE,WAAW,EAAE,CAAC;IACvB,aAAa,EAAE,mBAAmB,EAAE,CAAC;CACtC;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,KAAK,CAAC;IACV,yFAAyF;IACzF,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,aAAa,EAAE,mBAAmB,EAAE,CAAC;CACtC;AAED;;GAEG;AACH,MAAM,MAAM,Y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AC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9B;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEnD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pupt-lib",
3
- "version": "1.3.5",
3
+ "version": "1.3.6",
4
4
  "description": "TypeScript library for creating AI prompts using JSX syntax",
5
5
  "license": "MIT",
6
6
  "author": "",
@@ -61,9 +61,14 @@
61
61
  "test:ci": "vitest run --no-coverage --passWithNoTests",
62
62
  "test:ci:node": "vitest run --project=node --no-coverage --passWithNoTests",
63
63
  "test:ci:browser": "vitest run --project=browser --no-coverage --passWithNoTests",
64
+ "test:ci:node:cov": "vitest run --project=node --coverage --coverage.reportsDirectory=coverage-node --passWithNoTests",
65
+ "test:ci:browser:cov": "vitest run --project=browser --coverage --coverage.reportsDirectory=coverage-browser --passWithNoTests",
64
66
  "test:coverage": "vitest run --coverage",
65
67
  "lint": "eslint src test components && tsc --noEmit && knip",
66
68
  "lint:fix": "eslint src test components --fix",
69
+ "docs:dev": "vitepress dev docs",
70
+ "docs:build": "vitepress build docs",
71
+ "docs:preview": "npm run docs:build && vitepress preview docs --port 9010",
67
72
  "prepare": "husky",
68
73
  "release": "semantic-release"
69
74
  },
@@ -103,12 +108,13 @@
103
108
  "minisearch": "^7.2.0",
104
109
  "msw": "^2.12.7",
105
110
  "playwright": "^1.50.0",
106
- "pupt": "^2.0.1",
111
+ "pupt": "^2.2.1",
107
112
  "semantic-release": "^25.0.0",
108
113
  "tsx": "^4.21.0",
109
114
  "typescript": "^5.7.3",
110
115
  "typescript-eslint": "^8.22.0",
111
116
  "vite": "^6.0.11",
117
+ "vitepress": "^1.6.4",
112
118
  "vite-plugin-dts": "^4.5.0",
113
119
  "vitest": "^3.0.4",
114
120
  "zod": "^3.22.0"