pupt-lib 1.3.0 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ask/Choice.d.ts +155 -0
- package/dist/components/ask/Choice.d.ts.map +1 -0
- package/dist/components/ask/Confirm.d.ts +61 -0
- package/dist/components/ask/Confirm.d.ts.map +1 -0
- package/dist/components/ask/Date.d.ts +78 -0
- package/dist/components/ask/Date.d.ts.map +1 -0
- package/dist/components/ask/Editor.d.ts +66 -0
- package/dist/components/ask/Editor.d.ts.map +1 -0
- package/dist/components/ask/File.d.ts +84 -0
- package/dist/components/ask/File.d.ts.map +1 -0
- package/dist/components/ask/Label.d.ts +27 -0
- package/dist/components/ask/Label.d.ts.map +1 -0
- package/dist/components/ask/MultiSelect.d.ts +147 -0
- package/dist/components/ask/MultiSelect.d.ts.map +1 -0
- package/dist/components/ask/Number.d.ts +72 -0
- package/dist/components/ask/Number.d.ts.map +1 -0
- package/dist/components/ask/Option.d.ts +28 -0
- package/dist/components/ask/Option.d.ts.map +1 -0
- package/dist/components/ask/Path.d.ts +72 -0
- package/dist/components/ask/Path.d.ts.map +1 -0
- package/dist/components/ask/Rating.d.ts +78 -0
- package/dist/components/ask/Rating.d.ts.map +1 -0
- package/dist/components/ask/ReviewFile.d.ts +78 -0
- package/dist/components/ask/ReviewFile.d.ts.map +1 -0
- package/dist/components/ask/Secret.d.ts +66 -0
- package/dist/components/ask/Secret.d.ts.map +1 -0
- package/dist/components/ask/Select.d.ts +135 -0
- package/dist/components/ask/Select.d.ts.map +1 -0
- package/dist/components/ask/Text.d.ts +66 -0
- package/dist/components/ask/Text.d.ts.map +1 -0
- package/dist/components/ask/index.d.ts +34 -0
- package/dist/components/ask/index.d.ts.map +1 -0
- package/dist/components/ask/utils.d.ts +26 -0
- package/dist/components/ask/utils.d.ts.map +1 -0
- package/dist/components/control/ForEach.d.ts +31 -0
- package/dist/components/control/ForEach.d.ts.map +1 -0
- package/dist/components/control/If.d.ts +35 -0
- package/dist/components/control/If.d.ts.map +1 -0
- 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 +30 -0
- package/dist/components/data/Code.d.ts.map +1 -0
- package/dist/components/data/Data.d.ts +30 -0
- package/dist/components/data/Data.d.ts.map +1 -0
- package/dist/components/data/File.d.ts +37 -0
- package/dist/components/data/File.d.ts.map +1 -0
- package/dist/components/data/Json.d.ts +24 -0
- package/dist/components/data/Json.d.ts.map +1 -0
- package/dist/components/data/Xml.d.ts +24 -0
- package/dist/components/data/Xml.d.ts.map +1 -0
- package/dist/components/data/index.d.ts +6 -0
- package/dist/components/data/index.d.ts.map +1 -0
- package/dist/components/examples/Example.d.ts +16 -0
- package/dist/components/examples/Example.d.ts.map +1 -0
- package/dist/components/examples/ExampleInput.d.ts +12 -0
- package/dist/components/examples/ExampleInput.d.ts.map +1 -0
- package/dist/components/examples/ExampleOutput.d.ts +12 -0
- package/dist/components/examples/ExampleOutput.d.ts.map +1 -0
- package/dist/components/examples/Examples.d.ts +12 -0
- package/dist/components/examples/Examples.d.ts.map +1 -0
- 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 +6 -0
- package/dist/components/examples/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +10 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/manifest.d.ts +15 -0
- package/dist/components/manifest.d.ts.map +1 -0
- package/dist/components/meta/Uses.d.ts +97 -0
- package/dist/components/meta/Uses.d.ts.map +1 -0
- package/dist/components/meta/index.d.ts +2 -0
- package/dist/components/meta/index.d.ts.map +1 -0
- package/dist/components/post-execution/OpenUrl.d.ts +28 -0
- package/dist/components/post-execution/OpenUrl.d.ts.map +1 -0
- package/dist/components/post-execution/PostExecution.d.ts +12 -0
- package/dist/components/post-execution/PostExecution.d.ts.map +1 -0
- package/dist/components/post-execution/ReviewFile.d.ts +29 -0
- package/dist/components/post-execution/ReviewFile.d.ts.map +1 -0
- package/dist/components/post-execution/RunCommand.d.ts +34 -0
- package/dist/components/post-execution/RunCommand.d.ts.map +1 -0
- package/dist/components/post-execution/index.d.ts +5 -0
- package/dist/components/post-execution/index.d.ts.map +1 -0
- 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 +24 -0
- package/dist/components/reasoning/Step.d.ts.map +1 -0
- package/dist/components/reasoning/Steps.d.ts +69 -0
- package/dist/components/reasoning/Steps.d.ts.map +1 -0
- package/dist/components/reasoning/index.d.ts +4 -0
- package/dist/components/reasoning/index.d.ts.map +1 -0
- package/dist/components/structural/Audience.d.ts +55 -0
- package/dist/components/structural/Audience.d.ts.map +1 -0
- package/dist/components/structural/Constraint.d.ts +49 -0
- package/dist/components/structural/Constraint.d.ts.map +1 -0
- 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 +72 -0
- package/dist/components/structural/Context.d.ts.map +1 -0
- 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 +36 -0
- package/dist/components/structural/Criterion.d.ts.map +1 -0
- 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 +79 -0
- package/dist/components/structural/Format.d.ts.map +1 -0
- 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 +243 -0
- package/dist/components/structural/Prompt.d.ts.map +1 -0
- 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 +74 -0
- package/dist/components/structural/Role.d.ts.map +1 -0
- package/dist/components/structural/Section.d.ts +30 -0
- package/dist/components/structural/Section.d.ts.map +1 -0
- 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 +96 -0
- package/dist/components/structural/SuccessCriteria.d.ts.map +1 -0
- package/dist/components/structural/Task.d.ts +60 -0
- package/dist/components/structural/Task.d.ts.map +1 -0
- package/dist/components/structural/Tone.d.ts +61 -0
- package/dist/components/structural/Tone.d.ts.map +1 -0
- 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 +25 -0
- package/dist/components/structural/index.d.ts.map +1 -0
- package/dist/components/utility/Cwd.d.ts +10 -0
- package/dist/components/utility/Cwd.d.ts.map +1 -0
- package/dist/components/utility/DateTime.d.ts +22 -0
- package/dist/components/utility/DateTime.d.ts.map +1 -0
- package/dist/components/utility/Hostname.d.ts +10 -0
- package/dist/components/utility/Hostname.d.ts.map +1 -0
- package/dist/components/utility/Timestamp.d.ts +10 -0
- package/dist/components/utility/Timestamp.d.ts.map +1 -0
- package/dist/components/utility/UUID.d.ts +10 -0
- package/dist/components/utility/UUID.d.ts.map +1 -0
- package/dist/components/utility/Username.d.ts +10 -0
- package/dist/components/utility/Username.d.ts.map +1 -0
- package/dist/components/utility/index.d.ts +7 -0
- package/dist/components/utility/index.d.ts.map +1 -0
- package/dist/index.js +1 -1
- package/dist/src/api.d.ts +38 -0
- package/dist/src/api.d.ts.map +1 -0
- package/dist/src/component.d.ts +112 -0
- package/dist/src/component.d.ts.map +1 -0
- package/dist/src/create-prompt.d.ts +118 -0
- package/dist/src/create-prompt.d.ts.map +1 -0
- package/dist/src/index.d.ts +39 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/jsx-runtime/index.d.ts +29 -0
- package/dist/src/jsx-runtime/index.d.ts.map +1 -0
- package/dist/src/jsx-runtime/jsx-dev-runtime.d.ts +26 -0
- package/dist/src/jsx-runtime/jsx-dev-runtime.d.ts.map +1 -0
- package/dist/src/render.d.ts +19 -0
- package/dist/src/render.d.ts.map +1 -0
- package/dist/src/services/babel-plugins/index.d.ts +3 -0
- package/dist/src/services/babel-plugins/index.d.ts.map +1 -0
- package/dist/src/services/babel-plugins/name-hoisting.d.ts +8 -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 +16 -0
- package/dist/src/services/babel-plugins/uses-to-import.d.ts.map +1 -0
- package/dist/src/services/browser-support.d.ts +185 -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 +162 -0
- package/dist/src/services/file-search-engine.d.ts.map +1 -0
- package/dist/src/services/formula-parser.d.ts +9 -0
- package/dist/src/services/formula-parser.d.ts.map +1 -0
- package/dist/src/services/input-iterator.d.ts +54 -0
- package/dist/src/services/input-iterator.d.ts.map +1 -0
- package/dist/src/services/module-evaluator.d.ts +38 -0
- package/dist/src/services/module-evaluator.d.ts.map +1 -0
- package/dist/src/services/module-loader.d.ts +92 -0
- package/dist/src/services/module-loader.d.ts.map +1 -0
- package/dist/src/services/preprocessor.d.ts +39 -0
- package/dist/src/services/preprocessor.d.ts.map +1 -0
- package/dist/src/services/prop-validator.d.ts +21 -0
- package/dist/src/services/prop-validator.d.ts.map +1 -0
- package/dist/src/services/search-engine.d.ts +10 -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/{index.d.ts → src/types/context.d.ts} +425 -458
- package/dist/src/types/context.d.ts.map +1 -0
- package/dist/src/types/element.d.ts +47 -0
- package/dist/src/types/element.d.ts.map +1 -0
- package/dist/src/types/index.d.ts +10 -0
- package/dist/src/types/index.d.ts.map +1 -0
- package/dist/src/types/input.d.ts +51 -0
- package/dist/src/types/input.d.ts.map +1 -0
- package/dist/src/types/module.d.ts +61 -0
- package/dist/src/types/module.d.ts.map +1 -0
- package/dist/src/types/render.d.ts +82 -0
- package/dist/src/types/render.d.ts.map +1 -0
- package/dist/src/types/search.d.ts +59 -0
- package/dist/src/types/search.d.ts.map +1 -0
- package/dist/src/types/symbols.d.ts +9 -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 +4 -4
- package/dist/jsx-dev-runtime.d.ts +0 -483
- package/dist/jsx-runtime/index.d.ts +0 -2
- package/dist/jsx-runtime/jsx-dev-runtime.d.ts +0 -2
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Component, PuptNode } from '../../src/index.ts';
|
|
3
|
+
declare const constraintsSchema: z.ZodObject<{
|
|
4
|
+
extend: z.ZodOptional<z.ZodBoolean>;
|
|
5
|
+
exclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
6
|
+
presets: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
7
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
8
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
9
|
+
extend: z.ZodOptional<z.ZodBoolean>;
|
|
10
|
+
exclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
11
|
+
presets: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
12
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
13
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
14
|
+
extend: z.ZodOptional<z.ZodBoolean>;
|
|
15
|
+
exclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
16
|
+
presets: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
17
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
18
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
19
|
+
type ConstraintsProps = z.infer<typeof constraintsSchema> & {
|
|
20
|
+
children?: PuptNode;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Container component that groups Constraint children.
|
|
24
|
+
* Supports additive composition when used inside Prompt:
|
|
25
|
+
* - No props: replaces default constraints entirely
|
|
26
|
+
* - extend={true}: merges with default constraints
|
|
27
|
+
* - exclude={['preset-name']}: removes specific defaults
|
|
28
|
+
* - presets={['be-concise']}: auto-generates Constraint elements from presets
|
|
29
|
+
*/
|
|
30
|
+
export declare class Constraints extends Component<ConstraintsProps> {
|
|
31
|
+
static schema: z.ZodObject<{
|
|
32
|
+
extend: z.ZodOptional<z.ZodBoolean>;
|
|
33
|
+
exclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
34
|
+
presets: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
35
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
36
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
37
|
+
extend: z.ZodOptional<z.ZodBoolean>;
|
|
38
|
+
exclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
39
|
+
presets: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
40
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
41
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
42
|
+
extend: z.ZodOptional<z.ZodBoolean>;
|
|
43
|
+
exclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
44
|
+
presets: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
45
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
46
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
47
|
+
render(props: ConstraintsProps): PuptNode;
|
|
48
|
+
}
|
|
49
|
+
export {};
|
|
50
|
+
//# sourceMappingURL=Constraints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Constraints.d.ts","sourceRoot":"","sources":["../../../components/structural/Constraints.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAqB,MAAM,UAAU,CAAC;AAExD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC,QAAA,MAAM,iBAAiB;;;;;;;;;;;;;;;gCAKP,CAAC;AAEjB,KAAK,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,GAAG;IAAE,QAAQ,CAAC,EAAE,QAAQ,CAAA;CAAE,CAAC;AAEpF;;;;;;;GAOG;AACH,qBAAa,WAAY,SAAQ,SAAS,CAAC,gBAAgB,CAAC;IAC1D,MAAM,CAAC,MAAM;;;;;;;;;;;;;;;qCAAqB;IAElC,MAAM,CAAC,KAAK,EAAE,gBAAgB,GAAG,QAAQ;CA8B1C"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Component, PuptNode, RenderContext } from '../../src/index.ts';
|
|
3
|
+
export declare const contextSchema: z.ZodObject<{
|
|
4
|
+
type: z.ZodOptional<z.ZodEnum<["background", "situational", "domain", "data", "historical", "reference", "constraints", "user"]>>;
|
|
5
|
+
label: z.ZodOptional<z.ZodString>;
|
|
6
|
+
source: z.ZodOptional<z.ZodString>;
|
|
7
|
+
priority: z.ZodOptional<z.ZodEnum<["critical", "important", "helpful", "optional"]>>;
|
|
8
|
+
relevance: z.ZodOptional<z.ZodString>;
|
|
9
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
10
|
+
truncate: z.ZodOptional<z.ZodBoolean>;
|
|
11
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
12
|
+
preserveFormatting: z.ZodOptional<z.ZodBoolean>;
|
|
13
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
14
|
+
type: z.ZodOptional<z.ZodEnum<["background", "situational", "domain", "data", "historical", "reference", "constraints", "user"]>>;
|
|
15
|
+
label: z.ZodOptional<z.ZodString>;
|
|
16
|
+
source: z.ZodOptional<z.ZodString>;
|
|
17
|
+
priority: z.ZodOptional<z.ZodEnum<["critical", "important", "helpful", "optional"]>>;
|
|
18
|
+
relevance: z.ZodOptional<z.ZodString>;
|
|
19
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
20
|
+
truncate: z.ZodOptional<z.ZodBoolean>;
|
|
21
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
preserveFormatting: z.ZodOptional<z.ZodBoolean>;
|
|
23
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
24
|
+
type: z.ZodOptional<z.ZodEnum<["background", "situational", "domain", "data", "historical", "reference", "constraints", "user"]>>;
|
|
25
|
+
label: z.ZodOptional<z.ZodString>;
|
|
26
|
+
source: z.ZodOptional<z.ZodString>;
|
|
27
|
+
priority: z.ZodOptional<z.ZodEnum<["critical", "important", "helpful", "optional"]>>;
|
|
28
|
+
relevance: z.ZodOptional<z.ZodString>;
|
|
29
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
30
|
+
truncate: z.ZodOptional<z.ZodBoolean>;
|
|
31
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
32
|
+
preserveFormatting: z.ZodOptional<z.ZodBoolean>;
|
|
33
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
34
|
+
type ContextProps = z.infer<typeof contextSchema> & {
|
|
35
|
+
children?: PuptNode;
|
|
36
|
+
};
|
|
37
|
+
export declare class Context extends Component<ContextProps> {
|
|
38
|
+
static schema: z.ZodObject<{
|
|
39
|
+
type: z.ZodOptional<z.ZodEnum<["background", "situational", "domain", "data", "historical", "reference", "constraints", "user"]>>;
|
|
40
|
+
label: z.ZodOptional<z.ZodString>;
|
|
41
|
+
source: z.ZodOptional<z.ZodString>;
|
|
42
|
+
priority: z.ZodOptional<z.ZodEnum<["critical", "important", "helpful", "optional"]>>;
|
|
43
|
+
relevance: z.ZodOptional<z.ZodString>;
|
|
44
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
45
|
+
truncate: z.ZodOptional<z.ZodBoolean>;
|
|
46
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
47
|
+
preserveFormatting: z.ZodOptional<z.ZodBoolean>;
|
|
48
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
49
|
+
type: z.ZodOptional<z.ZodEnum<["background", "situational", "domain", "data", "historical", "reference", "constraints", "user"]>>;
|
|
50
|
+
label: z.ZodOptional<z.ZodString>;
|
|
51
|
+
source: z.ZodOptional<z.ZodString>;
|
|
52
|
+
priority: z.ZodOptional<z.ZodEnum<["critical", "important", "helpful", "optional"]>>;
|
|
53
|
+
relevance: z.ZodOptional<z.ZodString>;
|
|
54
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
55
|
+
truncate: z.ZodOptional<z.ZodBoolean>;
|
|
56
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
57
|
+
preserveFormatting: z.ZodOptional<z.ZodBoolean>;
|
|
58
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
59
|
+
type: z.ZodOptional<z.ZodEnum<["background", "situational", "domain", "data", "historical", "reference", "constraints", "user"]>>;
|
|
60
|
+
label: z.ZodOptional<z.ZodString>;
|
|
61
|
+
source: z.ZodOptional<z.ZodString>;
|
|
62
|
+
priority: z.ZodOptional<z.ZodEnum<["critical", "important", "helpful", "optional"]>>;
|
|
63
|
+
relevance: z.ZodOptional<z.ZodString>;
|
|
64
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
65
|
+
truncate: z.ZodOptional<z.ZodBoolean>;
|
|
66
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
67
|
+
preserveFormatting: z.ZodOptional<z.ZodBoolean>;
|
|
68
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
69
|
+
render(props: ContextProps, _resolvedValue: void, _context: RenderContext): PuptNode;
|
|
70
|
+
}
|
|
71
|
+
export {};
|
|
72
|
+
//# sourceMappingURL=Context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Context.d.ts","sourceRoot":"","sources":["../../../components/structural/Context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAqB,MAAM,UAAU,CAAC;AACxD,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAExD,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAUV,CAAC;AAEjB,KAAK,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,GAAG;IAAE,QAAQ,CAAC,EAAE,QAAQ,CAAA;CAAE,CAAC;AAE5E,qBAAa,OAAQ,SAAQ,SAAS,CAAC,YAAY,CAAC;IAClD,MAAM,CAAC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qCAAiB;IAE9B,MAAM,CAAC,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,IAAI,EAAE,QAAQ,EAAE,aAAa,GAAG,QAAQ;CAkDrF"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Component, PuptNode, RenderContext } from '../../src/index.ts';
|
|
3
|
+
declare const contextsSchema: z.ZodObject<{
|
|
4
|
+
extend: z.ZodOptional<z.ZodBoolean>;
|
|
5
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
6
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
7
|
+
extend: z.ZodOptional<z.ZodBoolean>;
|
|
8
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
9
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
10
|
+
extend: z.ZodOptional<z.ZodBoolean>;
|
|
11
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
12
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
13
|
+
type ContextsProps = z.infer<typeof contextsSchema> & {
|
|
14
|
+
children?: PuptNode;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Container component that groups Context children.
|
|
18
|
+
* Supports additive composition when used inside Prompt:
|
|
19
|
+
* - No props: replaces any default contexts
|
|
20
|
+
* - extend={true}: merges with default contexts
|
|
21
|
+
*/
|
|
22
|
+
export declare class Contexts extends Component<ContextsProps> {
|
|
23
|
+
static schema: z.ZodObject<{
|
|
24
|
+
extend: z.ZodOptional<z.ZodBoolean>;
|
|
25
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
26
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
27
|
+
extend: z.ZodOptional<z.ZodBoolean>;
|
|
28
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
29
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
30
|
+
extend: z.ZodOptional<z.ZodBoolean>;
|
|
31
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
32
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
33
|
+
render(props: ContextsProps, _resolvedValue: void, _context: RenderContext): PuptNode;
|
|
34
|
+
}
|
|
35
|
+
export {};
|
|
36
|
+
//# sourceMappingURL=Contexts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Contexts.d.ts","sourceRoot":"","sources":["../../../components/structural/Contexts.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAqB,MAAM,UAAU,CAAC;AACxD,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAExD,QAAA,MAAM,cAAc;;;;;;;;;gCAGJ,CAAC;AAEjB,KAAK,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,GAAG;IAAE,QAAQ,CAAC,EAAE,QAAQ,CAAA;CAAE,CAAC;AAE9E;;;;;GAKG;AACH,qBAAa,QAAS,SAAQ,SAAS,CAAC,aAAa,CAAC;IACpD,MAAM,CAAC,MAAM;;;;;;;;;qCAAkB;IAE/B,MAAM,CAAC,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,IAAI,EAAE,QAAQ,EAAE,aAAa,GAAG,QAAQ;CAStF"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Component, PuptNode, RenderContext } from '../../src/index.ts';
|
|
3
|
+
export declare const criterionSchema: z.ZodObject<{
|
|
4
|
+
category: z.ZodOptional<z.ZodEnum<["accuracy", "completeness", "relevance", "clarity", "format", "tone", "efficiency"]>>;
|
|
5
|
+
metric: z.ZodOptional<z.ZodString>;
|
|
6
|
+
weight: z.ZodOptional<z.ZodEnum<["critical", "important", "nice-to-have"]>>;
|
|
7
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
8
|
+
category: z.ZodOptional<z.ZodEnum<["accuracy", "completeness", "relevance", "clarity", "format", "tone", "efficiency"]>>;
|
|
9
|
+
metric: z.ZodOptional<z.ZodString>;
|
|
10
|
+
weight: z.ZodOptional<z.ZodEnum<["critical", "important", "nice-to-have"]>>;
|
|
11
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
12
|
+
category: z.ZodOptional<z.ZodEnum<["accuracy", "completeness", "relevance", "clarity", "format", "tone", "efficiency"]>>;
|
|
13
|
+
metric: z.ZodOptional<z.ZodString>;
|
|
14
|
+
weight: z.ZodOptional<z.ZodEnum<["critical", "important", "nice-to-have"]>>;
|
|
15
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
16
|
+
type CriterionProps = z.infer<typeof criterionSchema> & {
|
|
17
|
+
children: PuptNode;
|
|
18
|
+
};
|
|
19
|
+
export declare class Criterion extends Component<CriterionProps> {
|
|
20
|
+
static schema: z.ZodObject<{
|
|
21
|
+
category: z.ZodOptional<z.ZodEnum<["accuracy", "completeness", "relevance", "clarity", "format", "tone", "efficiency"]>>;
|
|
22
|
+
metric: z.ZodOptional<z.ZodString>;
|
|
23
|
+
weight: z.ZodOptional<z.ZodEnum<["critical", "important", "nice-to-have"]>>;
|
|
24
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
25
|
+
category: z.ZodOptional<z.ZodEnum<["accuracy", "completeness", "relevance", "clarity", "format", "tone", "efficiency"]>>;
|
|
26
|
+
metric: z.ZodOptional<z.ZodString>;
|
|
27
|
+
weight: z.ZodOptional<z.ZodEnum<["critical", "important", "nice-to-have"]>>;
|
|
28
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
29
|
+
category: z.ZodOptional<z.ZodEnum<["accuracy", "completeness", "relevance", "clarity", "format", "tone", "efficiency"]>>;
|
|
30
|
+
metric: z.ZodOptional<z.ZodString>;
|
|
31
|
+
weight: z.ZodOptional<z.ZodEnum<["critical", "important", "nice-to-have"]>>;
|
|
32
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
33
|
+
render(props: CriterionProps, _resolvedValue: void, _context: RenderContext): PuptNode;
|
|
34
|
+
}
|
|
35
|
+
export {};
|
|
36
|
+
//# sourceMappingURL=Criterion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Criterion.d.ts","sourceRoot":"","sources":["../../../components/structural/Criterion.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAExD,eAAO,MAAM,eAAe;;;;;;;;;;;;gCAIZ,CAAC;AAEjB,KAAK,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,GAAG;IAAE,QAAQ,EAAE,QAAQ,CAAA;CAAE,CAAC;AAE/E,qBAAa,SAAU,SAAQ,SAAS,CAAC,cAAc,CAAC;IACtD,MAAM,CAAC,MAAM;;;;;;;;;;;;qCAAmB;IAEhC,MAAM,CAAC,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,IAAI,EAAE,QAAQ,EAAE,aAAa,GAAG,QAAQ;CA4BvF"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Component, PuptNode, RenderContext } from '../../src/index.ts';
|
|
3
|
+
export declare const edgeCasesSchema: z.ZodObject<{
|
|
4
|
+
extend: z.ZodOptional<z.ZodBoolean>;
|
|
5
|
+
preset: z.ZodOptional<z.ZodEnum<["standard", "minimal"]>>;
|
|
6
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
7
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
8
|
+
extend: z.ZodOptional<z.ZodBoolean>;
|
|
9
|
+
preset: z.ZodOptional<z.ZodEnum<["standard", "minimal"]>>;
|
|
10
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
11
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
12
|
+
extend: z.ZodOptional<z.ZodBoolean>;
|
|
13
|
+
preset: z.ZodOptional<z.ZodEnum<["standard", "minimal"]>>;
|
|
14
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
15
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
16
|
+
type EdgeCasesProps = z.infer<typeof edgeCasesSchema> & {
|
|
17
|
+
children?: PuptNode;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Container component for handling edge cases explicitly.
|
|
21
|
+
* Groups When children that describe condition → action pairs.
|
|
22
|
+
*
|
|
23
|
+
* Usage:
|
|
24
|
+
* <EdgeCases>
|
|
25
|
+
* <When condition="input is empty">Ask for input</When>
|
|
26
|
+
* </EdgeCases>
|
|
27
|
+
* <EdgeCases preset="standard" />
|
|
28
|
+
*/
|
|
29
|
+
export declare class EdgeCases extends Component<EdgeCasesProps> {
|
|
30
|
+
static schema: z.ZodObject<{
|
|
31
|
+
extend: z.ZodOptional<z.ZodBoolean>;
|
|
32
|
+
preset: z.ZodOptional<z.ZodEnum<["standard", "minimal"]>>;
|
|
33
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
34
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
35
|
+
extend: z.ZodOptional<z.ZodBoolean>;
|
|
36
|
+
preset: z.ZodOptional<z.ZodEnum<["standard", "minimal"]>>;
|
|
37
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
38
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
39
|
+
extend: z.ZodOptional<z.ZodBoolean>;
|
|
40
|
+
preset: z.ZodOptional<z.ZodEnum<["standard", "minimal"]>>;
|
|
41
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
42
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
43
|
+
render(props: EdgeCasesProps, _resolvedValue: void, _context: RenderContext): PuptNode;
|
|
44
|
+
}
|
|
45
|
+
export {};
|
|
46
|
+
//# sourceMappingURL=EdgeCases.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EdgeCases.d.ts","sourceRoot":"","sources":["../../../components/structural/EdgeCases.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAqB,MAAM,UAAU,CAAC;AAExD,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAExD,eAAO,MAAM,eAAe;;;;;;;;;;;;gCAIZ,CAAC;AAEjB,KAAK,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,GAAG;IAAE,QAAQ,CAAC,EAAE,QAAQ,CAAA;CAAE,CAAC;AAEhF;;;;;;;;;GASG;AACH,qBAAa,SAAU,SAAQ,SAAS,CAAC,cAAc,CAAC;IACtD,MAAM,CAAC,MAAM;;;;;;;;;;;;qCAAmB;IAEhC,MAAM,CAAC,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,IAAI,EAAE,QAAQ,EAAE,aAAa,GAAG,QAAQ;CA2BvF"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Component, PuptNode, RenderContext } from '../../src/index.ts';
|
|
3
|
+
export declare const fallbackSchema: z.ZodObject<{
|
|
4
|
+
when: z.ZodString;
|
|
5
|
+
then: z.ZodString;
|
|
6
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
7
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
8
|
+
when: z.ZodString;
|
|
9
|
+
then: z.ZodString;
|
|
10
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
11
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
12
|
+
when: z.ZodString;
|
|
13
|
+
then: z.ZodString;
|
|
14
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
15
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
16
|
+
type FallbackProps = z.infer<typeof fallbackSchema> & {
|
|
17
|
+
children?: PuptNode;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Describes a fallback behavior for a specific situation.
|
|
21
|
+
* Typically used as a child of Fallbacks.
|
|
22
|
+
*
|
|
23
|
+
* Usage:
|
|
24
|
+
* <Fallback when="unable to complete the request" then="explain why and suggest alternatives" />
|
|
25
|
+
*/
|
|
26
|
+
export declare class Fallback extends Component<FallbackProps> {
|
|
27
|
+
static schema: z.ZodObject<{
|
|
28
|
+
when: z.ZodString;
|
|
29
|
+
then: z.ZodString;
|
|
30
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
31
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
32
|
+
when: z.ZodString;
|
|
33
|
+
then: z.ZodString;
|
|
34
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
35
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
36
|
+
when: z.ZodString;
|
|
37
|
+
then: z.ZodString;
|
|
38
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
39
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
40
|
+
render(props: FallbackProps, _resolvedValue: void, _context: RenderContext): PuptNode;
|
|
41
|
+
}
|
|
42
|
+
export {};
|
|
43
|
+
//# sourceMappingURL=Fallback.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Fallback.d.ts","sourceRoot":"","sources":["../../../components/structural/Fallback.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAqB,MAAM,UAAU,CAAC;AACxD,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAExD,eAAO,MAAM,cAAc;;;;;;;;;;;;gCAIX,CAAC;AAEjB,KAAK,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,GAAG;IAAE,QAAQ,CAAC,EAAE,QAAQ,CAAA;CAAE,CAAC;AAE9E;;;;;;GAMG;AACH,qBAAa,QAAS,SAAQ,SAAS,CAAC,aAAa,CAAC;IACpD,MAAM,CAAC,MAAM;;;;;;;;;;;;qCAAkB;IAE/B,MAAM,CAAC,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,IAAI,EAAE,QAAQ,EAAE,aAAa,GAAG,QAAQ;CAQtF"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Component, PuptNode, RenderContext } from '../../src/index.ts';
|
|
3
|
+
export declare const fallbacksSchema: z.ZodObject<{
|
|
4
|
+
extend: z.ZodOptional<z.ZodBoolean>;
|
|
5
|
+
preset: z.ZodOptional<z.ZodEnum<["standard"]>>;
|
|
6
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
7
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
8
|
+
extend: z.ZodOptional<z.ZodBoolean>;
|
|
9
|
+
preset: z.ZodOptional<z.ZodEnum<["standard"]>>;
|
|
10
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
11
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
12
|
+
extend: z.ZodOptional<z.ZodBoolean>;
|
|
13
|
+
preset: z.ZodOptional<z.ZodEnum<["standard"]>>;
|
|
14
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
15
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
16
|
+
type FallbacksProps = z.infer<typeof fallbacksSchema> & {
|
|
17
|
+
children?: PuptNode;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Container component for fallback behaviors.
|
|
21
|
+
* Groups Fallback children that describe when/then pairs.
|
|
22
|
+
*
|
|
23
|
+
* Usage:
|
|
24
|
+
* <Fallbacks>
|
|
25
|
+
* <Fallback when="unable to complete" then="explain why" />
|
|
26
|
+
* </Fallbacks>
|
|
27
|
+
* <Fallbacks preset="standard" />
|
|
28
|
+
*/
|
|
29
|
+
export declare class Fallbacks extends Component<FallbacksProps> {
|
|
30
|
+
static schema: z.ZodObject<{
|
|
31
|
+
extend: z.ZodOptional<z.ZodBoolean>;
|
|
32
|
+
preset: z.ZodOptional<z.ZodEnum<["standard"]>>;
|
|
33
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
34
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
35
|
+
extend: z.ZodOptional<z.ZodBoolean>;
|
|
36
|
+
preset: z.ZodOptional<z.ZodEnum<["standard"]>>;
|
|
37
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
38
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
39
|
+
extend: z.ZodOptional<z.ZodBoolean>;
|
|
40
|
+
preset: z.ZodOptional<z.ZodEnum<["standard"]>>;
|
|
41
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
42
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
43
|
+
render(props: FallbacksProps, _resolvedValue: void, _context: RenderContext): PuptNode;
|
|
44
|
+
}
|
|
45
|
+
export {};
|
|
46
|
+
//# sourceMappingURL=Fallbacks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Fallbacks.d.ts","sourceRoot":"","sources":["../../../components/structural/Fallbacks.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAqB,MAAM,UAAU,CAAC;AAExD,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAExD,eAAO,MAAM,eAAe;;;;;;;;;;;;gCAIZ,CAAC;AAEjB,KAAK,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,GAAG;IAAE,QAAQ,CAAC,EAAE,QAAQ,CAAA;CAAE,CAAC;AAEhF;;;;;;;;;GASG;AACH,qBAAa,SAAU,SAAQ,SAAS,CAAC,cAAc,CAAC;IACtD,MAAM,CAAC,MAAM;;;;;;;;;;;;qCAAmB;IAEhC,MAAM,CAAC,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,IAAI,EAAE,QAAQ,EAAE,aAAa,GAAG,QAAQ;CA2BvF"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Component, PuptNode, RenderContext } from '../../src/index.ts';
|
|
3
|
+
export declare const formatSchema: z.ZodObject<{
|
|
4
|
+
type: z.ZodOptional<z.ZodEnum<["json", "markdown", "xml", "text", "code", "yaml", "csv", "list", "table"]>>;
|
|
5
|
+
language: z.ZodOptional<z.ZodString>;
|
|
6
|
+
schema: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
|
|
7
|
+
template: z.ZodOptional<z.ZodString>;
|
|
8
|
+
example: z.ZodOptional<z.ZodString>;
|
|
9
|
+
strict: z.ZodOptional<z.ZodBoolean>;
|
|
10
|
+
validate: z.ZodOptional<z.ZodBoolean>;
|
|
11
|
+
maxLength: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
12
|
+
minLength: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
13
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
14
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
15
|
+
type: z.ZodOptional<z.ZodEnum<["json", "markdown", "xml", "text", "code", "yaml", "csv", "list", "table"]>>;
|
|
16
|
+
language: z.ZodOptional<z.ZodString>;
|
|
17
|
+
schema: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
|
|
18
|
+
template: z.ZodOptional<z.ZodString>;
|
|
19
|
+
example: z.ZodOptional<z.ZodString>;
|
|
20
|
+
strict: z.ZodOptional<z.ZodBoolean>;
|
|
21
|
+
validate: z.ZodOptional<z.ZodBoolean>;
|
|
22
|
+
maxLength: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
23
|
+
minLength: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
24
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
25
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
26
|
+
type: z.ZodOptional<z.ZodEnum<["json", "markdown", "xml", "text", "code", "yaml", "csv", "list", "table"]>>;
|
|
27
|
+
language: z.ZodOptional<z.ZodString>;
|
|
28
|
+
schema: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
|
|
29
|
+
template: z.ZodOptional<z.ZodString>;
|
|
30
|
+
example: z.ZodOptional<z.ZodString>;
|
|
31
|
+
strict: z.ZodOptional<z.ZodBoolean>;
|
|
32
|
+
validate: z.ZodOptional<z.ZodBoolean>;
|
|
33
|
+
maxLength: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
34
|
+
minLength: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
35
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
36
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
37
|
+
type FormatProps = z.infer<typeof formatSchema> & {
|
|
38
|
+
children?: PuptNode;
|
|
39
|
+
};
|
|
40
|
+
export declare class Format extends Component<FormatProps> {
|
|
41
|
+
static schema: z.ZodObject<{
|
|
42
|
+
type: z.ZodOptional<z.ZodEnum<["json", "markdown", "xml", "text", "code", "yaml", "csv", "list", "table"]>>;
|
|
43
|
+
language: z.ZodOptional<z.ZodString>;
|
|
44
|
+
schema: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
|
|
45
|
+
template: z.ZodOptional<z.ZodString>;
|
|
46
|
+
example: z.ZodOptional<z.ZodString>;
|
|
47
|
+
strict: z.ZodOptional<z.ZodBoolean>;
|
|
48
|
+
validate: z.ZodOptional<z.ZodBoolean>;
|
|
49
|
+
maxLength: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
50
|
+
minLength: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
51
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
52
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
53
|
+
type: z.ZodOptional<z.ZodEnum<["json", "markdown", "xml", "text", "code", "yaml", "csv", "list", "table"]>>;
|
|
54
|
+
language: z.ZodOptional<z.ZodString>;
|
|
55
|
+
schema: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
|
|
56
|
+
template: z.ZodOptional<z.ZodString>;
|
|
57
|
+
example: z.ZodOptional<z.ZodString>;
|
|
58
|
+
strict: z.ZodOptional<z.ZodBoolean>;
|
|
59
|
+
validate: z.ZodOptional<z.ZodBoolean>;
|
|
60
|
+
maxLength: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
61
|
+
minLength: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
62
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
63
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
64
|
+
type: z.ZodOptional<z.ZodEnum<["json", "markdown", "xml", "text", "code", "yaml", "csv", "list", "table"]>>;
|
|
65
|
+
language: z.ZodOptional<z.ZodString>;
|
|
66
|
+
schema: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
|
|
67
|
+
template: z.ZodOptional<z.ZodString>;
|
|
68
|
+
example: z.ZodOptional<z.ZodString>;
|
|
69
|
+
strict: z.ZodOptional<z.ZodBoolean>;
|
|
70
|
+
validate: z.ZodOptional<z.ZodBoolean>;
|
|
71
|
+
maxLength: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
72
|
+
minLength: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
73
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
74
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
75
|
+
render(props: FormatProps, _resolvedValue: void, context: RenderContext): PuptNode;
|
|
76
|
+
private getPreferredFormat;
|
|
77
|
+
}
|
|
78
|
+
export {};
|
|
79
|
+
//# sourceMappingURL=Format.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Format.d.ts","sourceRoot":"","sources":["../../../components/structural/Format.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAqB,MAAM,UAAU,CAAC;AAExD,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAExD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAWT,CAAC;AAEjB,KAAK,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,GAAG;IAAE,QAAQ,CAAC,EAAE,QAAQ,CAAA;CAAE,CAAC;AAE1E,qBAAa,MAAO,SAAQ,SAAS,CAAC,WAAW,CAAC;IAChD,MAAM,CAAC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qCAAgB;IAE7B,MAAM,CAAC,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,GAAG,QAAQ;IAwElF,OAAO,CAAC,kBAAkB;CAM3B"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Component, PuptNode, RenderContext } from '../../src/index.ts';
|
|
3
|
+
export declare const guardrailsSchema: z.ZodObject<{
|
|
4
|
+
preset: z.ZodOptional<z.ZodEnum<["standard", "strict", "minimal"]>>;
|
|
5
|
+
extend: z.ZodOptional<z.ZodBoolean>;
|
|
6
|
+
exclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
7
|
+
prohibit: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
8
|
+
require: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
9
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
10
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
11
|
+
preset: z.ZodOptional<z.ZodEnum<["standard", "strict", "minimal"]>>;
|
|
12
|
+
extend: z.ZodOptional<z.ZodBoolean>;
|
|
13
|
+
exclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
14
|
+
prohibit: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
15
|
+
require: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
16
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
17
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
18
|
+
preset: z.ZodOptional<z.ZodEnum<["standard", "strict", "minimal"]>>;
|
|
19
|
+
extend: z.ZodOptional<z.ZodBoolean>;
|
|
20
|
+
exclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
21
|
+
prohibit: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
22
|
+
require: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
23
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
24
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
25
|
+
type GuardrailsProps = z.infer<typeof guardrailsSchema> & {
|
|
26
|
+
children?: PuptNode;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Safety constraints and prohibited actions component.
|
|
30
|
+
* Supports presets, custom prohibitions, and required behaviors.
|
|
31
|
+
*
|
|
32
|
+
* Usage:
|
|
33
|
+
* <Guardrails preset="standard" />
|
|
34
|
+
* <Guardrails preset="standard" prohibit={['Discuss competitors']} />
|
|
35
|
+
* <Guardrails extend require={['Always cite sources']} />
|
|
36
|
+
*/
|
|
37
|
+
export declare class Guardrails extends Component<GuardrailsProps> {
|
|
38
|
+
static schema: z.ZodObject<{
|
|
39
|
+
preset: z.ZodOptional<z.ZodEnum<["standard", "strict", "minimal"]>>;
|
|
40
|
+
extend: z.ZodOptional<z.ZodBoolean>;
|
|
41
|
+
exclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
42
|
+
prohibit: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
43
|
+
require: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
44
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
45
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
46
|
+
preset: z.ZodOptional<z.ZodEnum<["standard", "strict", "minimal"]>>;
|
|
47
|
+
extend: z.ZodOptional<z.ZodBoolean>;
|
|
48
|
+
exclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
49
|
+
prohibit: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
50
|
+
require: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
51
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
52
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
53
|
+
preset: z.ZodOptional<z.ZodEnum<["standard", "strict", "minimal"]>>;
|
|
54
|
+
extend: z.ZodOptional<z.ZodBoolean>;
|
|
55
|
+
exclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
56
|
+
prohibit: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
57
|
+
require: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
58
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
59
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
60
|
+
render(props: GuardrailsProps, _resolvedValue: void, _context: RenderContext): PuptNode;
|
|
61
|
+
}
|
|
62
|
+
export {};
|
|
63
|
+
//# sourceMappingURL=Guardrails.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Guardrails.d.ts","sourceRoot":"","sources":["../../../components/structural/Guardrails.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAqB,MAAM,UAAU,CAAC;AAExD,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAExD,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;gCAOb,CAAC;AAEjB,KAAK,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,GAAG;IAAE,QAAQ,CAAC,EAAE,QAAQ,CAAA;CAAE,CAAC;AAElF;;;;;;;;GAQG;AACH,qBAAa,UAAW,SAAQ,SAAS,CAAC,eAAe,CAAC;IACxD,MAAM,CAAC,MAAM;;;;;;;;;;;;;;;;;;;;;qCAAoB;IAEjC,MAAM,CAAC,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,IAAI,EAAE,QAAQ,EAAE,aAAa,GAAG,QAAQ;CA6CxF"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Component, PuptNode, RenderContext } from '../../src/index.ts';
|
|
3
|
+
export declare const objectiveSchema: z.ZodObject<{
|
|
4
|
+
primary: z.ZodString;
|
|
5
|
+
secondary: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
6
|
+
metrics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
7
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
8
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
9
|
+
primary: z.ZodString;
|
|
10
|
+
secondary: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
11
|
+
metrics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
12
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
13
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
14
|
+
primary: z.ZodString;
|
|
15
|
+
secondary: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
16
|
+
metrics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
17
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
18
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
19
|
+
type ObjectiveProps = z.infer<typeof objectiveSchema> & {
|
|
20
|
+
children?: PuptNode;
|
|
21
|
+
};
|
|
22
|
+
export declare class Objective extends Component<ObjectiveProps> {
|
|
23
|
+
static schema: z.ZodObject<{
|
|
24
|
+
primary: z.ZodString;
|
|
25
|
+
secondary: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
26
|
+
metrics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
27
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
28
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
29
|
+
primary: z.ZodString;
|
|
30
|
+
secondary: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
31
|
+
metrics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
32
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
33
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
34
|
+
primary: z.ZodString;
|
|
35
|
+
secondary: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
36
|
+
metrics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
37
|
+
delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
|
|
38
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
39
|
+
render(props: ObjectiveProps, _resolvedValue: void, _context: RenderContext): PuptNode;
|
|
40
|
+
}
|
|
41
|
+
export {};
|
|
42
|
+
//# sourceMappingURL=Objective.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Objective.d.ts","sourceRoot":"","sources":["../../../components/structural/Objective.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAqB,MAAM,UAAU,CAAC;AACxD,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAExD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;gCAKZ,CAAC;AAEjB,KAAK,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,GAAG;IAAE,QAAQ,CAAC,EAAE,QAAQ,CAAA;CAAE,CAAC;AAEhF,qBAAa,SAAU,SAAQ,SAAS,CAAC,cAAc,CAAC;IACtD,MAAM,CAAC,MAAM;;;;;;;;;;;;;;;qCAAmB;IAEhC,MAAM,CAAC,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,IAAI,EAAE,QAAQ,EAAE,aAAa,GAAG,QAAQ;CA8BvF"}
|