pupt-lib 1.2.6 → 1.3.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/README.md +292 -256
- package/dist/components/ask/Choice.d.ts +1 -2
- package/dist/components/ask/Choice.d.ts.map +1 -1
- package/dist/components/ask/Confirm.d.ts +1 -2
- package/dist/components/ask/Confirm.d.ts.map +1 -1
- package/dist/components/ask/Date.d.ts +1 -2
- package/dist/components/ask/Date.d.ts.map +1 -1
- package/dist/components/ask/Editor.d.ts +1 -2
- package/dist/components/ask/Editor.d.ts.map +1 -1
- package/dist/components/ask/File.d.ts +1 -2
- package/dist/components/ask/File.d.ts.map +1 -1
- package/dist/components/ask/Label.d.ts +1 -2
- package/dist/components/ask/Label.d.ts.map +1 -1
- package/dist/components/ask/MultiSelect.d.ts +1 -2
- package/dist/components/ask/MultiSelect.d.ts.map +1 -1
- package/dist/components/ask/Number.d.ts +1 -2
- package/dist/components/ask/Number.d.ts.map +1 -1
- package/dist/components/ask/Option.d.ts +1 -2
- package/dist/components/ask/Option.d.ts.map +1 -1
- package/dist/components/ask/Path.d.ts +1 -2
- package/dist/components/ask/Path.d.ts.map +1 -1
- package/dist/components/ask/Rating.d.ts +1 -2
- package/dist/components/ask/Rating.d.ts.map +1 -1
- package/dist/components/ask/ReviewFile.d.ts +1 -2
- package/dist/components/ask/ReviewFile.d.ts.map +1 -1
- package/dist/components/ask/Secret.d.ts +1 -2
- package/dist/components/ask/Secret.d.ts.map +1 -1
- package/dist/components/ask/Select.d.ts +1 -2
- package/dist/components/ask/Select.d.ts.map +1 -1
- package/dist/components/ask/Text.d.ts +1 -2
- package/dist/components/ask/Text.d.ts.map +1 -1
- package/dist/components/ask/index.d.ts.map +1 -1
- package/dist/components/ask/utils.d.ts +1 -1
- package/dist/components/ask/utils.d.ts.map +1 -1
- package/dist/components/control/ForEach.d.ts +1 -2
- package/dist/components/control/ForEach.d.ts.map +1 -1
- package/dist/components/control/If.d.ts +20 -9
- package/dist/components/control/If.d.ts.map +1 -1
- package/dist/components/control/index.d.ts +3 -0
- package/dist/components/control/index.d.ts.map +1 -0
- package/dist/components/data/Code.d.ts +1 -2
- package/dist/components/data/Code.d.ts.map +1 -1
- package/dist/components/data/Data.d.ts +1 -2
- package/dist/components/data/Data.d.ts.map +1 -1
- package/dist/components/data/File.d.ts +2 -2
- package/dist/components/data/File.d.ts.map +1 -1
- package/dist/components/data/Json.d.ts +1 -2
- package/dist/components/data/Json.d.ts.map +1 -1
- package/dist/components/data/Xml.d.ts +1 -2
- package/dist/components/data/Xml.d.ts.map +1 -1
- package/dist/components/data/index.d.ts.map +1 -1
- package/dist/components/examples/Example.d.ts +3 -4
- package/dist/components/examples/Example.d.ts.map +1 -1
- package/dist/components/examples/ExampleInput.d.ts +1 -2
- package/dist/components/examples/ExampleInput.d.ts.map +1 -1
- package/dist/components/examples/ExampleOutput.d.ts +1 -2
- package/dist/components/examples/ExampleOutput.d.ts.map +1 -1
- package/dist/components/examples/Examples.d.ts +1 -2
- package/dist/components/examples/Examples.d.ts.map +1 -1
- package/dist/components/examples/NegativeExample.d.ts +24 -0
- package/dist/components/examples/NegativeExample.d.ts.map +1 -0
- package/dist/components/examples/index.d.ts +1 -0
- package/dist/components/examples/index.d.ts.map +1 -1
- package/dist/components/index.d.ts +1 -2
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/manifest.d.ts +15 -0
- package/dist/components/manifest.d.ts.map +1 -0
- package/dist/components/meta/Uses.d.ts +1 -2
- package/dist/components/meta/Uses.d.ts.map +1 -1
- package/dist/components/meta/index.d.ts.map +1 -1
- package/dist/components/post-execution/OpenUrl.d.ts +1 -2
- package/dist/components/post-execution/OpenUrl.d.ts.map +1 -1
- package/dist/components/post-execution/PostExecution.d.ts +1 -2
- package/dist/components/post-execution/PostExecution.d.ts.map +1 -1
- package/dist/components/post-execution/ReviewFile.d.ts +2 -2
- package/dist/components/post-execution/ReviewFile.d.ts.map +1 -1
- package/dist/components/post-execution/RunCommand.d.ts +1 -2
- package/dist/components/post-execution/RunCommand.d.ts.map +1 -1
- package/dist/components/post-execution/index.d.ts.map +1 -1
- package/dist/components/presets/constraint-presets.d.ts +13 -0
- package/dist/components/presets/constraint-presets.d.ts.map +1 -0
- package/dist/components/presets/default-constraints.d.ts +6 -0
- package/dist/components/presets/default-constraints.d.ts.map +1 -0
- package/dist/components/presets/guardrail-presets.d.ts +22 -0
- package/dist/components/presets/guardrail-presets.d.ts.map +1 -0
- package/dist/components/presets/index.d.ts +13 -0
- package/dist/components/presets/index.d.ts.map +1 -0
- package/dist/components/presets/provider-adaptations.d.ts +30 -0
- package/dist/components/presets/provider-adaptations.d.ts.map +1 -0
- package/dist/components/presets/role-presets.d.ts +19 -0
- package/dist/components/presets/role-presets.d.ts.map +1 -0
- package/dist/components/presets/steps-presets.d.ts +12 -0
- package/dist/components/presets/steps-presets.d.ts.map +1 -0
- package/dist/components/presets/task-presets.d.ts +14 -0
- package/dist/components/presets/task-presets.d.ts.map +1 -0
- package/dist/components/reasoning/ChainOfThought.d.ts +36 -0
- package/dist/components/reasoning/ChainOfThought.d.ts.map +1 -0
- package/dist/components/reasoning/Step.d.ts +1 -2
- package/dist/components/reasoning/Step.d.ts.map +1 -1
- package/dist/components/reasoning/Steps.d.ts +62 -7
- package/dist/components/reasoning/Steps.d.ts.map +1 -1
- package/dist/components/reasoning/index.d.ts +1 -0
- package/dist/components/reasoning/index.d.ts.map +1 -1
- package/dist/components/structural/Audience.d.ts +34 -4
- package/dist/components/structural/Audience.d.ts.map +1 -1
- package/dist/components/structural/Constraint.d.ts +28 -10
- package/dist/components/structural/Constraint.d.ts.map +1 -1
- package/dist/components/structural/Constraints.d.ts +50 -0
- package/dist/components/structural/Constraints.d.ts.map +1 -0
- package/dist/components/structural/Context.d.ts +51 -4
- package/dist/components/structural/Context.d.ts.map +1 -1
- package/dist/components/structural/Contexts.d.ts +36 -0
- package/dist/components/structural/Contexts.d.ts.map +1 -0
- package/dist/components/structural/Criterion.d.ts +28 -5
- package/dist/components/structural/Criterion.d.ts.map +1 -1
- package/dist/components/structural/EdgeCases.d.ts +46 -0
- package/dist/components/structural/EdgeCases.d.ts.map +1 -0
- package/dist/components/structural/Fallback.d.ts +43 -0
- package/dist/components/structural/Fallback.d.ts.map +1 -0
- package/dist/components/structural/Fallbacks.d.ts +46 -0
- package/dist/components/structural/Fallbacks.d.ts.map +1 -0
- package/dist/components/structural/Format.d.ts +51 -9
- package/dist/components/structural/Format.d.ts.map +1 -1
- package/dist/components/structural/Guardrails.d.ts +63 -0
- package/dist/components/structural/Guardrails.d.ts.map +1 -0
- package/dist/components/structural/Objective.d.ts +42 -0
- package/dist/components/structural/Objective.d.ts.map +1 -0
- package/dist/components/structural/Prompt.d.ts +203 -3
- package/dist/components/structural/Prompt.d.ts.map +1 -1
- package/dist/components/structural/Reference.d.ts +50 -0
- package/dist/components/structural/Reference.d.ts.map +1 -0
- package/dist/components/structural/References.d.ts +123 -0
- package/dist/components/structural/References.d.ts.map +1 -0
- package/dist/components/structural/Role.d.ts +47 -10
- package/dist/components/structural/Role.d.ts.map +1 -1
- package/dist/components/structural/Section.d.ts +1 -2
- package/dist/components/structural/Section.d.ts.map +1 -1
- package/dist/components/structural/Specialization.d.ts +36 -0
- package/dist/components/structural/Specialization.d.ts.map +1 -0
- package/dist/components/structural/Style.d.ts +43 -0
- package/dist/components/structural/Style.d.ts.map +1 -0
- package/dist/components/structural/SuccessCriteria.d.ts +75 -4
- package/dist/components/structural/SuccessCriteria.d.ts.map +1 -1
- package/dist/components/structural/Task.d.ts +39 -4
- package/dist/components/structural/Task.d.ts.map +1 -1
- package/dist/components/structural/Tone.d.ts +40 -4
- package/dist/components/structural/Tone.d.ts.map +1 -1
- package/dist/components/structural/When.d.ts +44 -0
- package/dist/components/structural/When.d.ts.map +1 -0
- package/dist/components/structural/WhenUncertain.d.ts +30 -0
- package/dist/components/structural/WhenUncertain.d.ts.map +1 -0
- package/dist/components/structural/index.d.ts +13 -0
- package/dist/components/structural/index.d.ts.map +1 -1
- package/dist/components/utility/Cwd.d.ts +1 -2
- package/dist/components/utility/Cwd.d.ts.map +1 -1
- package/dist/components/utility/DateTime.d.ts +1 -2
- package/dist/components/utility/DateTime.d.ts.map +1 -1
- package/dist/components/utility/Hostname.d.ts +1 -2
- package/dist/components/utility/Hostname.d.ts.map +1 -1
- package/dist/components/utility/Timestamp.d.ts +1 -2
- package/dist/components/utility/Timestamp.d.ts.map +1 -1
- package/dist/components/utility/UUID.d.ts +1 -2
- package/dist/components/utility/UUID.d.ts.map +1 -1
- package/dist/components/utility/Username.d.ts +1 -2
- package/dist/components/utility/Username.d.ts.map +1 -1
- package/dist/components/utility/index.d.ts.map +1 -1
- package/dist/index.js +2030 -360
- package/dist/src/api.d.ts.map +1 -0
- package/dist/{component.d.ts → src/component.d.ts} +29 -0
- package/dist/src/component.d.ts.map +1 -0
- package/dist/src/create-prompt.d.ts.map +1 -0
- package/dist/{index.d.ts → src/index.d.ts} +13 -3
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/jsx-runtime/index.d.ts.map +1 -0
- package/dist/src/jsx-runtime/jsx-dev-runtime.d.ts.map +1 -0
- package/dist/src/render.d.ts.map +1 -0
- package/dist/src/services/babel-plugins/index.d.ts.map +1 -0
- package/dist/src/services/babel-plugins/name-hoisting.d.ts.map +1 -0
- package/dist/src/services/babel-plugins/uses-to-import.d.ts.map +1 -0
- package/dist/src/services/browser-support.d.ts.map +1 -0
- package/dist/src/services/component-discovery.d.ts +42 -0
- package/dist/src/services/component-discovery.d.ts.map +1 -0
- package/dist/src/services/file-search-engine.d.ts.map +1 -0
- package/dist/src/services/formula-parser.d.ts.map +1 -0
- package/dist/src/services/input-iterator.d.ts.map +1 -0
- package/dist/src/services/module-evaluator.d.ts.map +1 -0
- package/dist/src/services/module-loader.d.ts.map +1 -0
- package/dist/{services → src/services}/preprocessor.d.ts +0 -13
- package/dist/src/services/preprocessor.d.ts.map +1 -0
- package/dist/src/services/prop-validator.d.ts.map +1 -0
- package/dist/src/services/search-engine.d.ts.map +1 -0
- package/dist/src/services/transformer.d.ts +19 -0
- package/dist/src/services/transformer.d.ts.map +1 -0
- package/dist/{types → src/types}/context.d.ts +90 -6
- package/dist/src/types/context.d.ts.map +1 -0
- package/dist/src/types/element.d.ts.map +1 -0
- package/dist/{types → src/types}/index.d.ts +4 -5
- package/dist/src/types/index.d.ts.map +1 -0
- package/dist/{types → src/types}/input.d.ts +4 -14
- package/dist/src/types/input.d.ts.map +1 -0
- package/dist/src/types/module.d.ts.map +1 -0
- package/dist/{types → src/types}/render.d.ts +3 -13
- package/dist/src/types/render.d.ts.map +1 -0
- package/dist/src/types/search.d.ts.map +1 -0
- package/dist/src/types/symbols.d.ts.map +1 -0
- package/dist/src/utils/children.d.ts +29 -0
- package/dist/src/utils/children.d.ts.map +1 -0
- package/dist/src/utils/delimiter.d.ts +13 -0
- package/dist/src/utils/delimiter.d.ts.map +1 -0
- package/package.json +7 -7
- package/dist/api.d.ts.map +0 -1
- package/dist/component.d.ts.map +0 -1
- package/dist/create-prompt.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/jsx-runtime/index.d.ts.map +0 -1
- package/dist/jsx-runtime/jsx-dev-runtime.d.ts.map +0 -1
- package/dist/render.d.ts.map +0 -1
- package/dist/services/babel-plugins/index.d.ts.map +0 -1
- package/dist/services/babel-plugins/name-hoisting.d.ts.map +0 -1
- package/dist/services/babel-plugins/uses-to-import.d.ts.map +0 -1
- package/dist/services/browser-support.d.ts.map +0 -1
- package/dist/services/file-search-engine.d.ts.map +0 -1
- package/dist/services/formula-parser.d.ts.map +0 -1
- package/dist/services/input-iterator.d.ts.map +0 -1
- package/dist/services/module-evaluator.d.ts.map +0 -1
- package/dist/services/module-loader.d.ts.map +0 -1
- package/dist/services/preprocessor.d.ts.map +0 -1
- package/dist/services/prop-validator.d.ts.map +0 -1
- package/dist/services/search-engine.d.ts.map +0 -1
- package/dist/services/transformer.d.ts +0 -38
- package/dist/services/transformer.d.ts.map +0 -1
- package/dist/types/component.d.ts +0 -30
- package/dist/types/component.d.ts.map +0 -1
- package/dist/types/context.d.ts.map +0 -1
- package/dist/types/element.d.ts.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/input.d.ts.map +0 -1
- package/dist/types/module.d.ts.map +0 -1
- package/dist/types/render.d.ts.map +0 -1
- package/dist/types/search.d.ts.map +0 -1
- package/dist/types/symbols.d.ts.map +0 -1
- /package/dist/{api.d.ts → src/api.d.ts} +0 -0
- /package/dist/{create-prompt.d.ts → src/create-prompt.d.ts} +0 -0
- /package/dist/{jsx-runtime → src/jsx-runtime}/index.d.ts +0 -0
- /package/dist/{jsx-runtime → src/jsx-runtime}/jsx-dev-runtime.d.ts +0 -0
- /package/dist/{render.d.ts → src/render.d.ts} +0 -0
- /package/dist/{services → src/services}/babel-plugins/index.d.ts +0 -0
- /package/dist/{services → src/services}/babel-plugins/name-hoisting.d.ts +0 -0
- /package/dist/{services → src/services}/babel-plugins/uses-to-import.d.ts +0 -0
- /package/dist/{services → src/services}/browser-support.d.ts +0 -0
- /package/dist/{services → src/services}/file-search-engine.d.ts +0 -0
- /package/dist/{services → src/services}/formula-parser.d.ts +0 -0
- /package/dist/{services → src/services}/input-iterator.d.ts +0 -0
- /package/dist/{services → src/services}/module-evaluator.d.ts +0 -0
- /package/dist/{services → src/services}/module-loader.d.ts +0 -0
- /package/dist/{services → src/services}/prop-validator.d.ts +0 -0
- /package/dist/{services → src/services}/search-engine.d.ts +0 -0
- /package/dist/{types → src/types}/element.d.ts +0 -0
- /package/dist/{types → src/types}/module.d.ts +0 -0
- /package/dist/{types → src/types}/search.d.ts +0 -0
- /package/dist/{types → src/types}/symbols.d.ts +0 -0
|
@@ -0,0 +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,aA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Context } from './types';
|
|
3
|
+
import { LlmProvider } from './types/context';
|
|
3
4
|
/**
|
|
4
5
|
* Symbol used to mark Component classes for identification
|
|
5
6
|
*/
|
|
@@ -48,6 +49,14 @@ export declare abstract class Component<Props = Record<string, unknown>, Resolve
|
|
|
48
49
|
static schema: ZodObject<ZodRawShape>;
|
|
49
50
|
/** Optional Zod schema for validating the resolved value */
|
|
50
51
|
static resolveSchema?: ZodObject<ZodRawShape>;
|
|
52
|
+
/**
|
|
53
|
+
* When true, the name-hoisting Babel plugin will hoist this component's
|
|
54
|
+
* `name` prop to a variable declaration. Components that use `name` for
|
|
55
|
+
* variable creation (e.g., File, ReviewFile) should set this to true.
|
|
56
|
+
* Components that use `name` for identification (e.g., Section, Role)
|
|
57
|
+
* leave this unset.
|
|
58
|
+
*/
|
|
59
|
+
static hoistName?: boolean;
|
|
51
60
|
/**
|
|
52
61
|
* Optional: Compute the resolved value for this component.
|
|
53
62
|
*
|
|
@@ -59,6 +68,26 @@ export declare abstract class Component<Props = Record<string, unknown>, Resolve
|
|
|
59
68
|
* @returns The resolved value, or a Promise resolving to the value for async components
|
|
60
69
|
*/
|
|
61
70
|
resolve?(props: Props, context: RenderContext): ResolveType | Promise<ResolveType>;
|
|
71
|
+
/**
|
|
72
|
+
* Get the LLM provider from the render context.
|
|
73
|
+
*
|
|
74
|
+
* @param context - The render context
|
|
75
|
+
* @returns The LLM provider string
|
|
76
|
+
*/
|
|
77
|
+
protected getProvider(context: RenderContext): LlmProvider;
|
|
78
|
+
/**
|
|
79
|
+
* Get the appropriate delimiter based on the output format in the render context.
|
|
80
|
+
* Returns 'markdown' if the output format is markdown, otherwise 'xml'.
|
|
81
|
+
*
|
|
82
|
+
* @param context - The render context
|
|
83
|
+
* @returns The delimiter style to use
|
|
84
|
+
*/
|
|
85
|
+
protected getDelimiter(context: RenderContext): 'xml' | 'markdown' | 'none';
|
|
86
|
+
/**
|
|
87
|
+
* Check if children has meaningful content.
|
|
88
|
+
* Returns false for undefined, null, empty arrays, and empty strings.
|
|
89
|
+
*/
|
|
90
|
+
protected hasContent(children: PuptNode): boolean;
|
|
62
91
|
/**
|
|
63
92
|
* Optional: Render the component with the given props and resolved value.
|
|
64
93
|
*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/component.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAClD,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD;;GAEG;AACH,eAAO,MAAM,gBAAgB,eAAsC,CAAC;AAEpE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,8BAAsB,SAAS,CAC7B,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,WAAW,GAAG,IAAI;IAElB,MAAM,CAAC,CAAC,gBAAgB,CAAC,UAAQ;IAEjC,qEAAqE;IACrE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC;IAEtC,4DAA4D;IAC5D,MAAM,CAAC,aAAa,CAAC,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC;IAE9C;;;;;;OAMG;IACH,MAAM,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAE3B;;;;;;;;;OASG;IACH,OAAO,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,aAAa,GAAG,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;IAElF;;;;;OAKG;IACH,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,WAAW;IAI1D;;;;;;OAMG;IACH,SAAS,CAAC,YAAY,CAAC,OAAO,EAAE,aAAa,GAAG,KAAK,GAAG,UAAU,GAAG,MAAM;IAI3E;;;OAGG;IACH,S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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, EnvironmentContext, RenderContext, RenderOptions, RenderResult, RenderSuccess, RenderFailure, RenderError,
|
|
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
5
|
export { LLM_PROVIDERS, inferProviderFromModel, DEFAULT_ENVIRONMENT, createEnvironment, createRuntimeConfig, ensureRuntimeCacheReady, } from './types';
|
|
6
6
|
export { Component, isComponentClass, COMPONENT_MARKER } from './component';
|
|
7
7
|
export { render } from './render';
|
|
8
|
+
export { wrapWithDelimiter } from './utils/delimiter';
|
|
9
|
+
export { findChildrenOfType, partitionChildren, isElementOfType } from './utils/children';
|
|
10
|
+
export { PROVIDER_ADAPTATIONS, LANGUAGE_CONVENTIONS, ROLE_PRESETS, TASK_PRESETS, CONSTRAINT_PRESETS, STEPS_PRESETS, DEFAULT_CONSTRAINTS, STANDARD_GUARDRAILS, EDGE_CASE_PRESETS, FALLBACK_PRESETS, } from '../components/presets';
|
|
11
|
+
export type { ProviderAdaptations } from '../components/presets';
|
|
12
|
+
export type { RolePresetConfig } from '../components/presets';
|
|
13
|
+
export type { TaskPresetConfig } from '../components/presets';
|
|
14
|
+
export type { ConstraintPresetConfig } from '../components/presets';
|
|
15
|
+
export type { StepsPresetConfig } from '../components/presets';
|
|
8
16
|
export { createInputIterator } from './services/input-iterator';
|
|
9
17
|
export type { InputIterator, InputIteratorOptions, OnMissingDefaultStrategy } from './services/input-iterator';
|
|
10
18
|
export { evaluateFormula } from './services/formula-parser';
|
|
11
19
|
export { Transformer } from './services/transformer';
|
|
12
20
|
export { evaluateModule } from './services/module-evaluator';
|
|
13
21
|
export type { EvaluateOptions } from './services/module-evaluator';
|
|
14
|
-
export { preprocessSource, isPromptFile, needsPreprocessing
|
|
22
|
+
export { preprocessSource, isPromptFile, needsPreprocessing } from './services/preprocessor';
|
|
15
23
|
export type { PreprocessOptions } from './services/preprocessor';
|
|
24
|
+
export { getBuiltinComponents, getAskComponents, getAskShorthand, getStructuralComponents, } from './services/component-discovery';
|
|
16
25
|
export { ModuleLoader } from './services/module-loader';
|
|
17
26
|
export type { SourceType, LoadedLibrary, ParsedPackageSource } from './services/module-loader';
|
|
18
27
|
export { resolveCdn, generateImportMap, serializeImportMap, generateImportMapScript, generatePuptLibImportMap, generatePuptLibImportMapScript, } from './services/browser-support';
|
|
19
28
|
export type { CdnProvider, CdnOptions, Dependency, ImportMap, PuptLibImportMapOptions, } from './services/browser-support';
|
|
20
|
-
export * from '
|
|
29
|
+
export * from '../components';
|
|
30
|
+
export { askBaseSchema, attachRequirement } from '../components/ask/utils';
|
|
21
31
|
export { createPromptFromSource, createPrompt } from './create-prompt';
|
|
22
32
|
export type { CreatePromptOptions } from './create-prompt';
|
|
23
33
|
export { Pupt } from './api';
|
|
@@ -0,0 +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,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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,MAAM,+BAA+B,CAAC;AACzF,YAAY,EACV,QAAQ,EACR,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,+BAA+B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jsx-runtime/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,aAAa,EAAe,MAAM,UAAU,CAAC;AAGlF;;GAEG;AACH,eAAO,MAAM,QAAQ,eAA8B,CAAC;AA6IpD;;;;;;;GAOG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACnD,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,aAAa,CAAC,CAAC,CAAC,EACxC,KAAK,EAAE,CAAC,GAAG;IAAE,QAAQ,CAAC,EAAE,QAAQ,CAAA;CAAE,GACjC,WAAW,CAAC,CAAC,CAAC,CAQhB;AAED;;;;;;;;GAQG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACpD,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,aAAa,CAAC,CAAC,CAAC,EACxC,KAAK,EAAE,CAAC,GAAG;IAAE,QAAQ,CAAC,EAAE,QAAQ,CAAA;CAAE,GACjC,WAAW,CAAC,CAAC,CAAC,CAEhB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsx-dev-runtime.d.ts","sourceRoot":"","sources":["../../../src/jsx-runtime/jsx-dev-runtime.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGrE,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,MAAM,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACtD,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,aAAa,CAAC,CAAC,CAAC,EACxC,KAAK,EAAE,CAAC,GAAG;IAAE,QAAQ,CAAC,EAAE,QAAQ,CAAA;CAAE,EAClC,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,iBAAiB,EAAE,OAAO,EAC1B,OAAO,EAAE,SAAS,EAClB,KAAK,EAAE,OAAO,GACb,WAAW,CAAC,CAAC,CAAC,CAIhB"}
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/services/babel-plugins/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"name-hoisting.d.ts","sourceRoot":"","sources":["../../../../src/services/babel-plugins/name-hoisting.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,IAAI,UAAU,EAAY,MAAM,aAAa,CAAC;AAuJ5E;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;IAAE,KAAK,EAAE,OAAO,UAAU,CAAA;CAAE,GAAG,SAAS,CA0GxF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uses-to-import.d.ts","sourceRoot":"","sources":["../../../../src/services/babel-plugins/uses-to-import.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,IAAI,UAAU,EAAE,MAAM,aAAa,CAAC;AAElE,UAAU,WAAW;IACnB,IAAI,EAAE;QACJ,IAAI,EAAE;YACJ,gBAAgB,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,CAAC,SAAS,GAAG,UAAU,CAAC,SAAS,EAAE,KAAK,IAAI,CAAC;SAC9F,CAAC;KACH,CAAC;CACH;AA0GD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;IAAE,KAAK,EAAE,OAAO,UAAU,CAAA;CAAE,GAAG,SAAS,CAAC,WAAW,CAAC,CA6CrG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser-support.d.ts","sourceRoot":"","sources":["../../../src/services/browser-support.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,CAAC;AAYtE;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,0BAA0B;IAC1B,GAAG,CAAC,EAAE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AsB,CAAC,EAAE,UAAU,EAAE,CAAC;CACvC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,GAAE,uBAA4B,GACpC,SAAS,CA2BX;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,8BAA8B,CAC5C,OAAO,GAAE,uBAA4B,GACpC,MAAM,CAIR"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dynamic component discovery for the preprocessor and babel plugins.
|
|
3
|
+
*
|
|
4
|
+
* Instead of importing a static manifest from components/, this module
|
|
5
|
+
* builds component lists lazily from the actual component exports.
|
|
6
|
+
* src/index.ts registers a thunk that provides the exports; the lists
|
|
7
|
+
* are computed on first access (at runtime, when all modules are loaded).
|
|
8
|
+
*/
|
|
9
|
+
type ExportMap = Record<string, unknown>;
|
|
10
|
+
type ExportThunk = () => ExportMap;
|
|
11
|
+
/**
|
|
12
|
+
* Register a thunk that returns the component exports.
|
|
13
|
+
* Called by src/index.ts during module initialization.
|
|
14
|
+
* The thunk is evaluated lazily to avoid circular dependency issues.
|
|
15
|
+
*/
|
|
16
|
+
export declare function setComponentExportsThunk(thunk: ExportThunk): void;
|
|
17
|
+
/**
|
|
18
|
+
* All built-in non-Ask component names, derived from actual exports.
|
|
19
|
+
* Includes 'Component' (the base class).
|
|
20
|
+
*/
|
|
21
|
+
export declare function getBuiltinComponents(): readonly string[];
|
|
22
|
+
/**
|
|
23
|
+
* All Ask component names (Ask namespace + individual AskX exports).
|
|
24
|
+
*/
|
|
25
|
+
export declare function getAskComponents(): readonly string[];
|
|
26
|
+
/**
|
|
27
|
+
* Shorthand aliases: short name → AskX full name.
|
|
28
|
+
* e.g., { Text: 'AskText', Number: 'AskNumber', ... }
|
|
29
|
+
*
|
|
30
|
+
* Skips shorthands that would conflict with builtin component names.
|
|
31
|
+
*/
|
|
32
|
+
export declare function getAskShorthand(): Record<string, string>;
|
|
33
|
+
/**
|
|
34
|
+
* Structural component names whose `name` prop is for identification,
|
|
35
|
+
* not variable creation. The name-hoisting Babel plugin skips these.
|
|
36
|
+
*
|
|
37
|
+
* Computed as: all builtins minus Component (base class), minus components
|
|
38
|
+
* with `static hoistName = true`, plus Fragment.
|
|
39
|
+
*/
|
|
40
|
+
export declare function getStructuralComponents(): readonly string[];
|
|
41
|
+
export {};
|
|
42
|
+
//# sourceMappingURL=component-discovery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-discovery.d.ts","sourceRoot":"","sources":["../../../src/services/component-discovery.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,KAAK,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACzC,KAAK,WAAW,GAAG,MAAM,SAAS,CAAC;AAUnC;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI,CAOjE;AAWD;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,SAAS,MAAM,EAAE,CAcxD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,SAAS,MAAM,EAAE,CAapD;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAgBxD;AAUD;;;;;;GAMG;AACH,wBAAgB,uBAAuB,IAAI,SAAS,MAAM,EAAE,CAa3D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-search-engine.d.ts","sourceRoot":"","sources":["../../../src/services/file-search-engine.ts"],"names":[],"mappings":"AAIA,KAAK,UAAU,GAAG,cAAc,MAAM,CAAC,CAAC;AACxC,KAAK,QAAQ,GAAG,cAAc,IAAI,CAAC,CAAC;AACpC,KAAK,QAAQ,GAAG,cAAc,IAAI,CAAC,CAAC;AAkCpC;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE;IAAE,IAAI,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O,CAAC,QAAQ,EAAE,CAAC;IActE;;;;;OAKG;IACG,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IAKzD;;;;;OAKG;IACH,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE;IAwB3E;;;;;OAKG;IACH,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAkBzC;;;;;OAKG;IACH,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAM5C;;;;;OAKG;IACH,cAAc,CAAC,QAAQ,EAAE,QAAQ,GAAG,gBAAgB;IAWpD;;;;OAIG;IACH,yBAAyB,IAAI,OAAO;IAIpC;;OAEG;IACH,UAAU,IAAI,IAAI;IAKlB;;OAEG;IACH,WAAW,IAAI,MAAM;IAIrB;;;;OAIG;IACH,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;YAMrB,iBAAiB;IA8D/B,OAAO,CAAC,aAAa;IAYrB,OAAO,CAAC,aAAa;IAiCrB;;OAEG;IACH,OAAO,CAAC,WAAW;IAWnB;;;OAGG;IACH,OAAO,CAAC,UAAU;IAclB,OAAO,CAAC,YAAY;IAWpB,OAAO,CAAC,UAAU;CAYnB;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,CAAC,EAAE,sBAAsB,GAAG,gBAAgB,CAExF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formula-parser.d.ts","sourceRoot":"","sources":["../../../src/services/formula-parser.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,GAC3B,OAAO,CAsET"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-iterator.d.ts","sourceRoot":"","sources":["../../../src/services/input-iterator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAY,gBAAgB,EAAE,gBAAgB,EAAiB,MAAM,UAAU,CAAC;AASzG,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,SAAS,CAAC;AA6CpD;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,OAAO,GAAG,MAAM,CAAC;AAExD,MAAM,WAAW,oBAAoB;IACnC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,0DAA0D;IAC1D,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,wBAAwB,CAAC;CAC7C;AAED,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,OAAO,IAAI,gBAAgB,GAAG,IAAI,CAAC;IACnC,MAAM,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAClD;;;OAGG;IACH,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACzB,MAAM,IAAI,OAAO,CAAC;IAClB,SAAS,IAAI,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC;;;;;;OAMG;IACH,iBAAiB,IAAI,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACpD;AAID,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,WAAW,EACpB,OAAO,GAAE,oBAAyB,GACjC,aAAa,CA4sBf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module-evaluator.d.ts","sourceRoot":"","sources":["../../../src/services/module-evaluator.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAgBH,MAAM,WAAW,eAAe;IAC9B,kCAAkC;IAClC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAmMD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,cAAc,CAClC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,CAAC,CAexD"}
|
|
@@ -0,0 +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,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,MAAM,CAAoC;IAClD,OAAO,CAAC,OAAO,CAA6C;IAC5D,OAAO,CAAC,QAAQ,CAA6B;IAE7C;;OAEG;IACH,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU;IAa7C;;OAEG;IACH,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,mBAAmB;IAyBvD;;;OAGG;IACG,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IA2ClD;;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;;OAEG;IACH,OAAO,CAAC,eAAe;IAMvB;;;OAGG;YACW,MAAM;IAiBpB;;OAEG;YACW,SAAS;IAoBvB;;OAEG;YACW,OAAO;IAmBrB;;OAEG;YACW,OAAO;IAiBrB;;OAEG;YACW,UAAU;IAaxB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAK3B;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAW1B;;OAEG;IACH,KAAK,IAAI,IAAI;CAKd"}
|
|
@@ -2,19 +2,6 @@
|
|
|
2
2
|
* Preprocessor for .prompt files.
|
|
3
3
|
* Injects imports for built-in components and wraps raw JSX with export default.
|
|
4
4
|
*/
|
|
5
|
-
/**
|
|
6
|
-
* List of all built-in components that should be auto-imported for .prompt files.
|
|
7
|
-
*/
|
|
8
|
-
export declare const BUILTIN_COMPONENTS: readonly ["Component", "Prompt", "Section", "Role", "Task", "Context", "Constraint", "Format", "Audience", "Tone", "SuccessCriteria", "Criterion", "UUID", "Timestamp", "DateTime", "Hostname", "Username", "Cwd", "Uses", "If", "ForEach", "Example", "Examples", "ExampleInput", "ExampleOutput", "Steps", "Step", "Code", "Data", "File", "Json", "Xml", "PostExecution", "ReviewFile", "OpenUrl", "RunCommand"];
|
|
9
|
-
/**
|
|
10
|
-
* Ask components that need special handling (Ask namespace + individual exports)
|
|
11
|
-
*/
|
|
12
|
-
export declare const ASK_COMPONENTS: readonly ["Ask", "AskOption", "AskLabel", "AskText", "AskNumber", "AskSelect", "AskConfirm", "AskEditor", "AskMultiSelect", "AskFile", "AskPath", "AskDate", "AskSecret", "AskChoice", "AskRating", "AskReviewFile"];
|
|
13
|
-
/**
|
|
14
|
-
* Shorthand component names that map to Ask.* components.
|
|
15
|
-
* These allow using <Text> instead of <Ask.Text> in .prompt files.
|
|
16
|
-
*/
|
|
17
|
-
export declare const ASK_SHORTHAND: Record<string, string>;
|
|
18
5
|
export interface PreprocessOptions {
|
|
19
6
|
/** Original filename for error messages */
|
|
20
7
|
filename: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preprocessor.d.ts","sourceRoot":"","sources":["../../../src/services/preprocessor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,MAAM,WAAW,iBAAiB;IAChC,2CAA2C;IAC3C,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEtD;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAI5D;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAG1D;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE1D;AAkCD;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,GAAG,MAAM,CAuBnF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prop-validator.d.ts","sourceRoot":"","sources":["../../../src/services/prop-validator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAY,MAAM,KAAK,CAAC;AAC5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAC3B,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,MAAM,EAAE,SAAS,CAAC,WAAW,CAAC,GAC7B,WAAW,EAAE,CAmBf;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,OAAO,GAAG,SAAS,CAAC,WAAW,CAAC,GAAG,SAAS,CAS3E;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAQtD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-engine.d.ts","sourceRoot":"","sources":["../../../src/services/search-engine.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAElG,MAAM,WAAW,YAAY;IAC3B,KAAK,CAAC,OAAO,EAAE,gBAAgB,EAAE,GAAG,IAAI,CAAC;IACzC,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,YAAY,EAAE,CAAC;IACxE,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAAC;IAC1C,UAAU,IAAI,MAAM,EAAE,CAAC;IACvB,KAAK,IAAI,IAAI,CAAC;CACf;AAED,wBAAgB,kBAAkB,CAAC,MAAM,CAAC,EAAE,kBAAkB,GAAG,YAAY,CAmF5E"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transformer class for compiling TSX source code at runtime.
|
|
3
|
+
* Uses @babel/standalone to transform JSX syntax into jsx() function calls.
|
|
4
|
+
*
|
|
5
|
+
* Works in both Node.js and browser environments.
|
|
6
|
+
*/
|
|
7
|
+
export declare class Transformer {
|
|
8
|
+
/**
|
|
9
|
+
* Transform a source string containing TSX code.
|
|
10
|
+
* Works in both Node.js and browser environments.
|
|
11
|
+
*
|
|
12
|
+
* @param source - The TSX source code to transform
|
|
13
|
+
* @param filename - Filename used for error messages and source maps
|
|
14
|
+
* @returns The transformed JavaScript code
|
|
15
|
+
* @throws Error if transformation fails
|
|
16
|
+
*/
|
|
17
|
+
transformSourceAsync(source: string, filename: string): Promise<string>;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=transformer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transformer.d.ts","sourceRoot":"","sources":["../../../src/services/transformer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA6EH,qBAAa,WAAW;IACtB;;;;;;;;OAQG;IACG,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAG9E"}
|
|
@@ -60,11 +60,11 @@ export declare const outputConfigSchema: z.ZodObject<{
|
|
|
60
60
|
trim: z.ZodDefault<z.ZodBoolean>;
|
|
61
61
|
indent: z.ZodDefault<z.ZodString>;
|
|
62
62
|
}, "strip", z.ZodTypeAny, {
|
|
63
|
-
format: "
|
|
63
|
+
format: "unspecified" | "xml" | "markdown" | "json" | "text";
|
|
64
64
|
trim: boolean;
|
|
65
65
|
indent: string;
|
|
66
66
|
}, {
|
|
67
|
-
format?: "
|
|
67
|
+
format?: "unspecified" | "xml" | "markdown" | "json" | "text" | undefined;
|
|
68
68
|
trim?: boolean | undefined;
|
|
69
69
|
indent?: string | undefined;
|
|
70
70
|
}>;
|
|
@@ -128,6 +128,37 @@ export declare const runtimeConfigSchema: z.ZodObject<{
|
|
|
128
128
|
time: z.ZodString;
|
|
129
129
|
uuid: z.ZodString;
|
|
130
130
|
}, z.ZodTypeAny, "passthrough">>;
|
|
131
|
+
/**
|
|
132
|
+
* Schema for prompt configuration (controls Prompt component default sections)
|
|
133
|
+
*/
|
|
134
|
+
export declare const promptConfigSchema: z.ZodObject<{
|
|
135
|
+
includeRole: z.ZodDefault<z.ZodBoolean>;
|
|
136
|
+
includeFormat: z.ZodDefault<z.ZodBoolean>;
|
|
137
|
+
includeConstraints: z.ZodDefault<z.ZodBoolean>;
|
|
138
|
+
includeSuccessCriteria: z.ZodDefault<z.ZodBoolean>;
|
|
139
|
+
includeGuardrails: z.ZodDefault<z.ZodBoolean>;
|
|
140
|
+
defaultRole: z.ZodDefault<z.ZodString>;
|
|
141
|
+
defaultExpertise: z.ZodDefault<z.ZodString>;
|
|
142
|
+
delimiter: z.ZodDefault<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
143
|
+
}, "strip", z.ZodTypeAny, {
|
|
144
|
+
includeRole: boolean;
|
|
145
|
+
includeFormat: boolean;
|
|
146
|
+
includeConstraints: boolean;
|
|
147
|
+
includeSuccessCriteria: boolean;
|
|
148
|
+
includeGuardrails: boolean;
|
|
149
|
+
defaultRole: string;
|
|
150
|
+
defaultExpertise: string;
|
|
151
|
+
delimiter: "xml" | "markdown" | "none";
|
|
152
|
+
}, {
|
|
153
|
+
includeRole?: boolean | undefined;
|
|
154
|
+
includeFormat?: boolean | undefined;
|
|
155
|
+
includeConstraints?: boolean | undefined;
|
|
156
|
+
includeSuccessCriteria?: boolean | undefined;
|
|
157
|
+
includeGuardrails?: boolean | undefined;
|
|
158
|
+
defaultRole?: string | undefined;
|
|
159
|
+
defaultExpertise?: string | undefined;
|
|
160
|
+
delimiter?: "xml" | "markdown" | "none" | undefined;
|
|
161
|
+
}>;
|
|
131
162
|
/**
|
|
132
163
|
* Schema for the full environment context
|
|
133
164
|
*/
|
|
@@ -163,11 +194,11 @@ export declare const environmentContextSchema: z.ZodObject<{
|
|
|
163
194
|
trim: z.ZodDefault<z.ZodBoolean>;
|
|
164
195
|
indent: z.ZodDefault<z.ZodString>;
|
|
165
196
|
}, "strip", z.ZodTypeAny, {
|
|
166
|
-
format: "
|
|
197
|
+
format: "unspecified" | "xml" | "markdown" | "json" | "text";
|
|
167
198
|
trim: boolean;
|
|
168
199
|
indent: string;
|
|
169
200
|
}, {
|
|
170
|
-
format?: "
|
|
201
|
+
format?: "unspecified" | "xml" | "markdown" | "json" | "text" | undefined;
|
|
171
202
|
trim?: boolean | undefined;
|
|
172
203
|
indent?: string | undefined;
|
|
173
204
|
}>>;
|
|
@@ -222,6 +253,34 @@ export declare const environmentContextSchema: z.ZodObject<{
|
|
|
222
253
|
time: z.ZodOptional<z.ZodString>;
|
|
223
254
|
uuid: z.ZodOptional<z.ZodString>;
|
|
224
255
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
256
|
+
prompt: z.ZodDefault<z.ZodObject<{
|
|
257
|
+
includeRole: z.ZodDefault<z.ZodBoolean>;
|
|
258
|
+
includeFormat: z.ZodDefault<z.ZodBoolean>;
|
|
259
|
+
includeConstraints: z.ZodDefault<z.ZodBoolean>;
|
|
260
|
+
includeSuccessCriteria: z.ZodDefault<z.ZodBoolean>;
|
|
261
|
+
includeGuardrails: z.ZodDefault<z.ZodBoolean>;
|
|
262
|
+
defaultRole: z.ZodDefault<z.ZodString>;
|
|
263
|
+
defaultExpertise: z.ZodDefault<z.ZodString>;
|
|
264
|
+
delimiter: z.ZodDefault<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
265
|
+
}, "strip", z.ZodTypeAny, {
|
|
266
|
+
includeRole: boolean;
|
|
267
|
+
includeFormat: boolean;
|
|
268
|
+
includeConstraints: boolean;
|
|
269
|
+
includeSuccessCriteria: boolean;
|
|
270
|
+
includeGuardrails: boolean;
|
|
271
|
+
defaultRole: string;
|
|
272
|
+
defaultExpertise: string;
|
|
273
|
+
delimiter: "xml" | "markdown" | "none";
|
|
274
|
+
}, {
|
|
275
|
+
includeRole?: boolean | undefined;
|
|
276
|
+
includeFormat?: boolean | undefined;
|
|
277
|
+
includeConstraints?: boolean | undefined;
|
|
278
|
+
includeSuccessCriteria?: boolean | undefined;
|
|
279
|
+
includeGuardrails?: boolean | undefined;
|
|
280
|
+
defaultRole?: string | undefined;
|
|
281
|
+
defaultExpertise?: string | undefined;
|
|
282
|
+
delimiter?: "xml" | "markdown" | "none" | undefined;
|
|
283
|
+
}>>;
|
|
225
284
|
}, "strip", z.ZodTypeAny, {
|
|
226
285
|
code: {
|
|
227
286
|
language: string;
|
|
@@ -234,7 +293,7 @@ export declare const environmentContextSchema: z.ZodObject<{
|
|
|
234
293
|
temperature?: number | undefined;
|
|
235
294
|
};
|
|
236
295
|
output: {
|
|
237
|
-
format: "
|
|
296
|
+
format: "unspecified" | "xml" | "markdown" | "json" | "text";
|
|
238
297
|
trim: boolean;
|
|
239
298
|
indent: string;
|
|
240
299
|
};
|
|
@@ -255,6 +314,16 @@ export declare const environmentContextSchema: z.ZodObject<{
|
|
|
255
314
|
} & {
|
|
256
315
|
[k: string]: unknown;
|
|
257
316
|
};
|
|
317
|
+
prompt: {
|
|
318
|
+
includeRole: boolean;
|
|
319
|
+
includeFormat: boolean;
|
|
320
|
+
includeConstraints: boolean;
|
|
321
|
+
includeSuccessCriteria: boolean;
|
|
322
|
+
includeGuardrails: boolean;
|
|
323
|
+
defaultRole: string;
|
|
324
|
+
defaultExpertise: string;
|
|
325
|
+
delimiter: "xml" | "markdown" | "none";
|
|
326
|
+
};
|
|
258
327
|
}, {
|
|
259
328
|
code?: {
|
|
260
329
|
language?: string | undefined;
|
|
@@ -267,7 +336,7 @@ export declare const environmentContextSchema: z.ZodObject<{
|
|
|
267
336
|
temperature?: number | undefined;
|
|
268
337
|
} | undefined;
|
|
269
338
|
output?: {
|
|
270
|
-
format?: "
|
|
339
|
+
format?: "unspecified" | "xml" | "markdown" | "json" | "text" | undefined;
|
|
271
340
|
trim?: boolean | undefined;
|
|
272
341
|
indent?: string | undefined;
|
|
273
342
|
} | undefined;
|
|
@@ -286,6 +355,16 @@ export declare const environmentContextSchema: z.ZodObject<{
|
|
|
286
355
|
time: z.ZodOptional<z.ZodString>;
|
|
287
356
|
uuid: z.ZodOptional<z.ZodString>;
|
|
288
357
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
358
|
+
prompt?: {
|
|
359
|
+
includeRole?: boolean | undefined;
|
|
360
|
+
includeFormat?: boolean | undefined;
|
|
361
|
+
includeConstraints?: boolean | undefined;
|
|
362
|
+
includeSuccessCriteria?: boolean | undefined;
|
|
363
|
+
includeGuardrails?: boolean | undefined;
|
|
364
|
+
defaultRole?: string | undefined;
|
|
365
|
+
defaultExpertise?: string | undefined;
|
|
366
|
+
delimiter?: "xml" | "markdown" | "none" | undefined;
|
|
367
|
+
} | undefined;
|
|
289
368
|
}>;
|
|
290
369
|
/**
|
|
291
370
|
* LLM configuration for prompt rendering
|
|
@@ -303,6 +382,10 @@ export type CodeConfig = z.infer<typeof codeConfigSchema>;
|
|
|
303
382
|
* User/caller context configuration
|
|
304
383
|
*/
|
|
305
384
|
export type UserConfig = z.infer<typeof userConfigSchema>;
|
|
385
|
+
/**
|
|
386
|
+
* Prompt configuration for default section behavior
|
|
387
|
+
*/
|
|
388
|
+
export type PromptConfig = z.infer<typeof promptConfigSchema>;
|
|
306
389
|
/**
|
|
307
390
|
* Runtime configuration gathered from the environment
|
|
308
391
|
*/
|
|
@@ -319,6 +402,7 @@ export interface RenderContext {
|
|
|
319
402
|
env: EnvironmentContext;
|
|
320
403
|
postExecution: PostExecutionAction[];
|
|
321
404
|
errors: RenderError[];
|
|
405
|
+
metadata: Map<string, unknown>;
|
|
322
406
|
}
|
|
323
407
|
/**
|
|
324
408
|
* Default environment configuration
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/types/context.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAkEjE;;;;;;GAMG;AACH,wBAAsB,uBAAuB,IAAI,OAAO,CAAC,IAAI,CAAC,CAQ7D;AAYD;;;;;GAKG;AACH,eAAO,MAAM,aAAa,2GAUhB,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,OAAO,aAAa,CAAC,MAAM,C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C;IACtD,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;IAC3C,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACX,CAAC,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC;CACxB;AAED;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,CAAC,YAAY,CAAC,EAAE,IAAI,CAAC;IACrB,OAAO,EAAE,WAAW,CAAC;IACrB,IAAI,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;CAC3B;AAED;;;GAGG;AACH,MAAM,MAAM,aAAa,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IACjD,CAAC,UAAU,SAAS,CAAC,CAAC,CAAC,CAAC,GACxB,CAAC,CAAC,KAAK,EAAE,CAAC,GAAG;IAAE,QAAQ,CAAC,EAAE,QAAQ,CAAA;CAAE,KAAK,QAAQ,CAAC,CAAC;AAEvD;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,WAAW,CAElE;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,WAAW,CAElE"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
export { TYPE, PROPS, CHILDREN, DEFERRED_REF } from './symbols';
|
|
2
2
|
export type { PuptNode, PuptElement, ComponentType, DeferredRef, } from './element';
|
|
3
3
|
export { isPuptElement, isDeferredRef } from './element';
|
|
4
|
-
export type { LlmConfig, LlmProvider, OutputConfig, CodeConfig, UserConfig, RuntimeConfig, EnvironmentContext, RenderContext, } from './context';
|
|
5
|
-
export { LLM_PROVIDERS, inferProviderFromModel, DEFAULT_ENVIRONMENT, createEnvironment, createRuntimeConfig, ensureRuntimeCacheReady, llmConfigSchema, outputConfigSchema, codeConfigSchema, userConfigSchema, runtimeConfigSchema, environmentContextSchema, } from './context';
|
|
6
|
-
export type { RenderOptions, RenderResult, RenderSuccess, RenderFailure, RenderError,
|
|
7
|
-
export type { InputRequirement, ValidationResult, ValidationError,
|
|
8
|
-
export type { ComponentProps, PromptProps, StructuralProps, CommonProps, } from './component';
|
|
4
|
+
export type { LlmConfig, LlmProvider, OutputConfig, CodeConfig, UserConfig, RuntimeConfig, PromptConfig, EnvironmentContext, RenderContext, } from './context';
|
|
5
|
+
export { LLM_PROVIDERS, inferProviderFromModel, DEFAULT_ENVIRONMENT, createEnvironment, createRuntimeConfig, ensureRuntimeCacheReady, llmConfigSchema, outputConfigSchema, codeConfigSchema, userConfigSchema, runtimeConfigSchema, promptConfigSchema, environmentContextSchema, } from './context';
|
|
6
|
+
export type { RenderOptions, RenderResult, RenderSuccess, RenderFailure, RenderError, PostExecutionAction, ReviewFileAction, OpenUrlAction, RunCommandAction, } from './render';
|
|
7
|
+
export type { InputRequirement, ValidationResult, ValidationError, } from './input';
|
|
9
8
|
export type { SearchablePrompt, SearchOptions, SearchResult, SearchResultMatch, SearchEngineConfig, } from './search';
|
|
10
9
|
export type { PuptConfig, PuptLibrary, DiscoveredPrompt, LibraryLoadResult, PuptInitConfig, } from './module';
|
|
11
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -35,7 +35,10 @@ export interface InputRequirement {
|
|
|
35
35
|
export interface ValidationResult {
|
|
36
36
|
valid: boolean;
|
|
37
37
|
errors: ValidationError[];
|
|
38
|
-
warnings:
|
|
38
|
+
warnings: Array<{
|
|
39
|
+
field: string;
|
|
40
|
+
message: string;
|
|
41
|
+
}>;
|
|
39
42
|
}
|
|
40
43
|
/**
|
|
41
44
|
* Validation error details
|
|
@@ -45,17 +48,4 @@ export interface ValidationError {
|
|
|
45
48
|
message: string;
|
|
46
49
|
code: string;
|
|
47
50
|
}
|
|
48
|
-
/**
|
|
49
|
-
* Validation warning details
|
|
50
|
-
*/
|
|
51
|
-
export interface ValidationWarning {
|
|
52
|
-
field: string;
|
|
53
|
-
message: string;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Collected inputs from Ask components
|
|
57
|
-
*/
|
|
58
|
-
export interface CollectedInputs {
|
|
59
|
-
[key: string]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C;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,MAAM,EAAE,CAAC;IACnB,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"}
|
|
@@ -3,10 +3,7 @@ import { EnvironmentContext } from './context';
|
|
|
3
3
|
* Options for rendering a prompt
|
|
4
4
|
*/
|
|
5
5
|
export interface RenderOptions {
|
|
6
|
-
format?: 'xml' | 'markdown' | 'json' | 'text' | 'unspecified';
|
|
7
6
|
trim?: boolean;
|
|
8
|
-
indent?: string;
|
|
9
|
-
maxDepth?: number;
|
|
10
7
|
inputs?: Map<string, unknown> | Record<string, unknown>;
|
|
11
8
|
env?: EnvironmentContext;
|
|
12
9
|
}
|
|
@@ -30,11 +27,13 @@ export interface RenderError {
|
|
|
30
27
|
expected?: string;
|
|
31
28
|
}
|
|
32
29
|
/**
|
|
33
|
-
* Successful render result — no validation errors
|
|
30
|
+
* Successful render result — no validation errors (may contain non-fatal warnings)
|
|
34
31
|
*/
|
|
35
32
|
export interface RenderSuccess {
|
|
36
33
|
ok: true;
|
|
37
34
|
text: string;
|
|
35
|
+
/** Non-fatal validation warnings (code: 'validation_warning') */
|
|
36
|
+
errors?: RenderError[];
|
|
38
37
|
postExecution: PostExecutionAction[];
|
|
39
38
|
}
|
|
40
39
|
/**
|
|
@@ -51,15 +50,6 @@ export interface RenderFailure {
|
|
|
51
50
|
* Result of rendering a prompt — discriminated union on `ok`
|
|
52
51
|
*/
|
|
53
52
|
export type RenderResult = RenderSuccess | RenderFailure;
|
|
54
|
-
/**
|
|
55
|
-
* Metadata collected during rendering
|
|
56
|
-
*/
|
|
57
|
-
export interface RenderMetadata {
|
|
58
|
-
componentCount: number;
|
|
59
|
-
depth: number;
|
|
60
|
-
renderTime: number;
|
|
61
|
-
warnings?: string[];
|
|
62
|
-
}
|
|
63
53
|
/**
|
|
64
54
|
* Actions to be executed after the LLM response
|
|
65
55
|
*/
|
|
@@ -0,0 +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,EA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W,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;CAC5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"symbols.d.ts","sourceRoot":"","sources":["../../../src/types/symbols.ts"],"names":[],"mappings":"AAEA,8BAA8B;AAC9B,eAAO,MAAM,IAAI,eAA0B,CAAC;AAE5C,+BAA+B;AAC/B,eAAO,MAAM,KAAK,eAA2B,CAAC;AAE9C,kCAAkC;AAClC,eAAO,MAAM,QAAQ,eAA8B,CAAC;AAEpD,yEAAyE;AACzE,eAAO,MAAM,YAAY,eAAiC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { PuptNode, PuptElement, ComponentType } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Check if a PuptElement matches a given type (class reference or string name).
|
|
4
|
+
*
|
|
5
|
+
* @param element - The element to check
|
|
6
|
+
* @param type - A component class/function reference, or a string name
|
|
7
|
+
* @returns true if the element matches the given type
|
|
8
|
+
*/
|
|
9
|
+
export declare function isElementOfType(element: PuptElement, type: ComponentType | string): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Find all children that match a given type.
|
|
12
|
+
* Searches through Fragments transparently.
|
|
13
|
+
*
|
|
14
|
+
* @param children - The children to search (PuptNode - can be array, element, string, etc.)
|
|
15
|
+
* @param type - A component class/function reference, or a string name
|
|
16
|
+
* @returns Array of matching PuptElements
|
|
17
|
+
*/
|
|
18
|
+
export declare function findChildrenOfType(children: PuptNode, type: ComponentType | string): PuptElement[];
|
|
19
|
+
/**
|
|
20
|
+
* Partition children into two groups: those matching the type and the rest.
|
|
21
|
+
* Unlike findChildrenOfType, this does not unwrap Fragments - it operates
|
|
22
|
+
* on the direct children array.
|
|
23
|
+
*
|
|
24
|
+
* @param children - Array of children to partition
|
|
25
|
+
* @param type - A component class/function reference, or a string name
|
|
26
|
+
* @returns Tuple of [matching elements, non-matching nodes]
|
|
27
|
+
*/
|
|
28
|
+
export declare function partitionChildren(children: PuptNode[], type: ComponentType | string): [PuptElement[], PuptNode[]];
|
|
29
|
+
//# sourceMappingURL=children.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"children.d.ts","sourceRoot":"","sources":["../../../src/utils/children.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAKrE;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,WAAW,EACpB,IAAI,EAAE,aAAa,GAAG,MAAM,GAC3B,OAAO,CAaT;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,aAAa,GAAG,MAAM,GAC3B,WAAW,EAAE,CAIf;AA2CD;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,QAAQ,EAAE,EACpB,IAAI,EAAE,aAAa,GAAG,MAAM,GAC3B,CAAC,WAAW,EAAE,EAAE,QAAQ,EAAE,CAAC,CAa7B"}
|