@reactive-agents/prompts 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Tyler Buell
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,52 @@
1
+ # @reactive-agents/prompts
2
+
3
+ Prompt management for the [Reactive Agents](https://tylerjrbuell.github.io/reactive-agents-ts/) framework.
4
+
5
+ A template engine with variable interpolation and a built-in library of agent prompts for common use cases.
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ bun add @reactive-agents/prompts effect
11
+ ```
12
+
13
+ ## Features
14
+
15
+ - **Template engine** — `{{variable}}` interpolation with type-safe bindings
16
+ - **Prompt library** — pre-built system prompts for researcher, coder, analyst, and more
17
+ - **Versioning** — store and retrieve prompt versions
18
+
19
+ ## Usage
20
+
21
+ ```typescript
22
+ import { PromptTemplate, PromptLibrary } from "@reactive-agents/prompts";
23
+
24
+ // Use a built-in prompt
25
+ const systemPrompt = PromptLibrary.get("researcher");
26
+
27
+ // Or define your own
28
+ const template = PromptTemplate.create({
29
+ template: "You are a {{role}} expert. Answer in {{language}}.",
30
+ variables: { role: "TypeScript", language: "English" },
31
+ });
32
+
33
+ const prompt = template.render({ role: "React", language: "Spanish" });
34
+ ```
35
+
36
+ With the builder:
37
+
38
+ ```typescript
39
+ import { ReactiveAgents } from "reactive-agents";
40
+
41
+ const agent = await ReactiveAgents.create()
42
+ .withName("researcher")
43
+ .withProvider("anthropic")
44
+ .withPrompts({
45
+ system: PromptLibrary.get("researcher"),
46
+ })
47
+ .build();
48
+ ```
49
+
50
+ ## Documentation
51
+
52
+ Full documentation at [tylerjrbuell.github.io/reactive-agents-ts](https://tylerjrbuell.github.io/reactive-agents-ts/)
@@ -0,0 +1,104 @@
1
+ import { Schema, Effect, Context, Layer } from 'effect';
2
+ import * as effect_Cause from 'effect/Cause';
3
+ import * as effect_Types from 'effect/Types';
4
+
5
+ declare const PromptVariableType: Schema.Literal<["string", "number", "boolean", "array", "object"]>;
6
+ type PromptVariableType = typeof PromptVariableType.Type;
7
+ declare const PromptVariableSchema: Schema.Struct<{
8
+ name: typeof Schema.String;
9
+ required: typeof Schema.Boolean;
10
+ type: Schema.Literal<["string", "number", "boolean", "array", "object"]>;
11
+ description: Schema.optional<typeof Schema.String>;
12
+ defaultValue: Schema.optional<typeof Schema.Unknown>;
13
+ }>;
14
+ type PromptVariable = typeof PromptVariableSchema.Type;
15
+ declare const PromptTemplateSchema: Schema.Struct<{
16
+ id: typeof Schema.String;
17
+ name: typeof Schema.String;
18
+ version: typeof Schema.Number;
19
+ template: typeof Schema.String;
20
+ variables: Schema.Array$<Schema.Struct<{
21
+ name: typeof Schema.String;
22
+ required: typeof Schema.Boolean;
23
+ type: Schema.Literal<["string", "number", "boolean", "array", "object"]>;
24
+ description: Schema.optional<typeof Schema.String>;
25
+ defaultValue: Schema.optional<typeof Schema.Unknown>;
26
+ }>>;
27
+ metadata: Schema.optional<Schema.Struct<{
28
+ author: Schema.optional<typeof Schema.String>;
29
+ description: Schema.optional<typeof Schema.String>;
30
+ tags: Schema.optional<Schema.Array$<typeof Schema.String>>;
31
+ model: Schema.optional<typeof Schema.String>;
32
+ maxTokens: Schema.optional<typeof Schema.Number>;
33
+ }>>;
34
+ }>;
35
+ type PromptTemplate = typeof PromptTemplateSchema.Type;
36
+ declare const CompiledPromptSchema: Schema.Struct<{
37
+ templateId: typeof Schema.String;
38
+ version: typeof Schema.Number;
39
+ content: typeof Schema.String;
40
+ tokenEstimate: typeof Schema.Number;
41
+ variables: Schema.Record$<typeof Schema.String, typeof Schema.Unknown>;
42
+ }>;
43
+ type CompiledPrompt = typeof CompiledPromptSchema.Type;
44
+
45
+ declare const PromptError_base: new <A extends Record<string, any> = {}>(args: effect_Types.Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => effect_Cause.YieldableError & {
46
+ readonly _tag: "PromptError";
47
+ } & Readonly<A>;
48
+ declare class PromptError extends PromptError_base<{
49
+ readonly message: string;
50
+ readonly templateId?: string;
51
+ readonly cause?: unknown;
52
+ }> {
53
+ }
54
+ declare const TemplateNotFoundError_base: new <A extends Record<string, any> = {}>(args: effect_Types.Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => effect_Cause.YieldableError & {
55
+ readonly _tag: "TemplateNotFoundError";
56
+ } & Readonly<A>;
57
+ declare class TemplateNotFoundError extends TemplateNotFoundError_base<{
58
+ readonly templateId: string;
59
+ readonly version?: number;
60
+ }> {
61
+ }
62
+ declare const VariableError_base: new <A extends Record<string, any> = {}>(args: effect_Types.Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => effect_Cause.YieldableError & {
63
+ readonly _tag: "VariableError";
64
+ } & Readonly<A>;
65
+ declare class VariableError extends VariableError_base<{
66
+ readonly templateId: string;
67
+ readonly variableName: string;
68
+ readonly message: string;
69
+ }> {
70
+ }
71
+ type PromptErrors = PromptError | TemplateNotFoundError | VariableError;
72
+
73
+ declare const interpolate: (template: PromptTemplate, variables: Record<string, unknown>) => Effect.Effect<string, VariableError>;
74
+ declare const estimateTokens: (text: string) => number;
75
+
76
+ declare const reactTemplate: PromptTemplate;
77
+
78
+ declare const planExecuteTemplate: PromptTemplate;
79
+
80
+ declare const treeOfThoughtTemplate: PromptTemplate;
81
+
82
+ declare const reflexionTemplate: PromptTemplate;
83
+
84
+ declare const factCheckTemplate: PromptTemplate;
85
+
86
+ declare const PromptService_base: Context.TagClass<PromptService, "PromptService", {
87
+ readonly register: (template: PromptTemplate) => Effect.Effect<void>;
88
+ readonly compile: (templateId: string, variables: Record<string, unknown>, options?: {
89
+ maxTokens?: number;
90
+ }) => Effect.Effect<CompiledPrompt, TemplateNotFoundError | VariableError>;
91
+ readonly compose: (prompts: readonly CompiledPrompt[], options?: {
92
+ separator?: string;
93
+ maxTokens?: number;
94
+ }) => Effect.Effect<CompiledPrompt>;
95
+ readonly getVersion: (templateId: string, version: number) => Effect.Effect<PromptTemplate, TemplateNotFoundError>;
96
+ readonly getVersionHistory: (templateId: string) => Effect.Effect<readonly PromptTemplate[]>;
97
+ }>;
98
+ declare class PromptService extends PromptService_base {
99
+ }
100
+ declare const PromptServiceLive: Layer.Layer<PromptService, never, never>;
101
+
102
+ declare const createPromptLayer: () => Layer.Layer<PromptService>;
103
+
104
+ export { type CompiledPrompt, CompiledPromptSchema, PromptError, type PromptErrors, PromptService, PromptServiceLive, type PromptTemplate, PromptTemplateSchema, type PromptVariable, PromptVariableSchema, PromptVariableType, TemplateNotFoundError, VariableError, createPromptLayer, estimateTokens, factCheckTemplate, interpolate, planExecuteTemplate, reactTemplate, reflexionTemplate, treeOfThoughtTemplate };
package/dist/index.js ADDED
@@ -0,0 +1,305 @@
1
+ // src/types/template.ts
2
+ import { Schema } from "effect";
3
+ var PromptVariableType = Schema.Literal(
4
+ "string",
5
+ "number",
6
+ "boolean",
7
+ "array",
8
+ "object"
9
+ );
10
+ var PromptVariableSchema = Schema.Struct({
11
+ name: Schema.String,
12
+ required: Schema.Boolean,
13
+ type: PromptVariableType,
14
+ description: Schema.optional(Schema.String),
15
+ defaultValue: Schema.optional(Schema.Unknown)
16
+ });
17
+ var PromptTemplateSchema = Schema.Struct({
18
+ id: Schema.String,
19
+ name: Schema.String,
20
+ version: Schema.Number,
21
+ template: Schema.String,
22
+ variables: Schema.Array(PromptVariableSchema),
23
+ metadata: Schema.optional(
24
+ Schema.Struct({
25
+ author: Schema.optional(Schema.String),
26
+ description: Schema.optional(Schema.String),
27
+ tags: Schema.optional(Schema.Array(Schema.String)),
28
+ model: Schema.optional(Schema.String),
29
+ maxTokens: Schema.optional(Schema.Number)
30
+ })
31
+ )
32
+ });
33
+ var CompiledPromptSchema = Schema.Struct({
34
+ templateId: Schema.String,
35
+ version: Schema.Number,
36
+ content: Schema.String,
37
+ tokenEstimate: Schema.Number,
38
+ variables: Schema.Record({ key: Schema.String, value: Schema.Unknown })
39
+ });
40
+
41
+ // src/errors/errors.ts
42
+ import { Data } from "effect";
43
+ var PromptError = class extends Data.TaggedError("PromptError") {
44
+ };
45
+ var TemplateNotFoundError = class extends Data.TaggedError(
46
+ "TemplateNotFoundError"
47
+ ) {
48
+ };
49
+ var VariableError = class extends Data.TaggedError("VariableError") {
50
+ };
51
+
52
+ // src/services/template-engine.ts
53
+ import { Effect } from "effect";
54
+ var interpolate = (template, variables) => Effect.gen(function* () {
55
+ for (const v of template.variables) {
56
+ if (v.required && !(v.name in variables) && v.defaultValue === void 0) {
57
+ return yield* Effect.fail(
58
+ new VariableError({
59
+ templateId: template.id,
60
+ variableName: v.name,
61
+ message: "Required variable missing"
62
+ })
63
+ );
64
+ }
65
+ }
66
+ let content = template.template;
67
+ for (const [key, value] of Object.entries(variables)) {
68
+ content = content.replaceAll(`{{${key}}}`, String(value));
69
+ }
70
+ for (const v of template.variables) {
71
+ if (!v.required && !(v.name in variables) && v.defaultValue !== void 0) {
72
+ content = content.replaceAll(`{{${v.name}}}`, String(v.defaultValue));
73
+ }
74
+ }
75
+ return content;
76
+ });
77
+ var estimateTokens = (text) => Math.ceil(text.length / 4);
78
+
79
+ // src/templates/reasoning/react.ts
80
+ var reactTemplate = {
81
+ id: "reasoning.react",
82
+ name: "ReAct Reasoning",
83
+ version: 1,
84
+ template: `You are an AI assistant using the ReAct (Reasoning + Acting) framework.
85
+
86
+ Task: {{task}}
87
+
88
+ Available tools: {{tools}}
89
+
90
+ For each step, follow this pattern:
91
+ Thought: Analyze what you know and what you need to do next
92
+ Action: Choose a tool and specify the input
93
+ Observation: Review the tool result
94
+
95
+ Continue until you can provide a final answer.
96
+
97
+ {{#if constraints}}Constraints: {{constraints}}{{/if}}
98
+
99
+ When you have enough information, respond with:
100
+ Thought: I now have enough information to answer
101
+ Final Answer: [your comprehensive answer]`,
102
+ variables: [
103
+ { name: "task", required: true, type: "string", description: "The task to accomplish" },
104
+ { name: "tools", required: true, type: "string", description: "Available tools list" },
105
+ { name: "constraints", required: false, type: "string", description: "Optional constraints", defaultValue: "" }
106
+ ]
107
+ };
108
+
109
+ // src/templates/reasoning/plan-execute.ts
110
+ var planExecuteTemplate = {
111
+ id: "reasoning.plan-execute",
112
+ name: "Plan and Execute",
113
+ version: 1,
114
+ template: `You are an AI assistant using the Plan-and-Execute framework.
115
+
116
+ Task: {{task}}
117
+
118
+ Available tools: {{tools}}
119
+
120
+ Phase 1 - Planning:
121
+ Break the task into a numbered list of concrete steps. Each step should be independently executable.
122
+
123
+ Phase 2 - Execution:
124
+ Execute each step in order, using available tools as needed.
125
+
126
+ Phase 3 - Synthesis:
127
+ Combine all step results into a final comprehensive answer.
128
+
129
+ {{#if constraints}}Constraints: {{constraints}}{{/if}}`,
130
+ variables: [
131
+ { name: "task", required: true, type: "string", description: "The task to accomplish" },
132
+ { name: "tools", required: true, type: "string", description: "Available tools list" },
133
+ { name: "constraints", required: false, type: "string", description: "Optional constraints", defaultValue: "" }
134
+ ]
135
+ };
136
+
137
+ // src/templates/reasoning/tree-of-thought.ts
138
+ var treeOfThoughtTemplate = {
139
+ id: "reasoning.tree-of-thought",
140
+ name: "Tree of Thought",
141
+ version: 1,
142
+ template: `You are an AI assistant using the Tree-of-Thought reasoning framework.
143
+
144
+ Problem: {{problem}}
145
+
146
+ Generate {{branches}} different approaches to solve this problem.
147
+ For each approach:
148
+ 1. Describe the approach
149
+ 2. Evaluate its strengths and weaknesses
150
+ 3. Rate its likelihood of success (0-1)
151
+
152
+ Then select the most promising approach and develop it fully.
153
+
154
+ {{#if evaluation_criteria}}Evaluation criteria: {{evaluation_criteria}}{{/if}}`,
155
+ variables: [
156
+ { name: "problem", required: true, type: "string", description: "The problem to solve" },
157
+ { name: "branches", required: false, type: "number", description: "Number of approaches to generate", defaultValue: 3 },
158
+ { name: "evaluation_criteria", required: false, type: "string", description: "Criteria for evaluating approaches", defaultValue: "" }
159
+ ]
160
+ };
161
+
162
+ // src/templates/reasoning/reflexion.ts
163
+ var reflexionTemplate = {
164
+ id: "reasoning.reflexion",
165
+ name: "Reflexion",
166
+ version: 1,
167
+ template: `You are an AI assistant using the Reflexion framework for self-improving reasoning.
168
+
169
+ Task: {{task}}
170
+
171
+ {{#if previous_attempt}}
172
+ Previous attempt:
173
+ {{previous_attempt}}
174
+
175
+ Reflection on previous attempt:
176
+ {{reflection}}
177
+ {{/if}}
178
+
179
+ Instructions:
180
+ 1. Attempt to solve the task
181
+ 2. After your attempt, reflect on what went well and what could be improved
182
+ 3. If your solution is unsatisfactory, revise it based on your reflection
183
+
184
+ Provide your final answer after reflection.`,
185
+ variables: [
186
+ { name: "task", required: true, type: "string", description: "The task to accomplish" },
187
+ { name: "previous_attempt", required: false, type: "string", description: "Previous attempt output", defaultValue: "" },
188
+ { name: "reflection", required: false, type: "string", description: "Reflection on previous attempt", defaultValue: "" }
189
+ ]
190
+ };
191
+
192
+ // src/templates/verification/fact-check.ts
193
+ var factCheckTemplate = {
194
+ id: "verification.fact-check",
195
+ name: "Fact Check",
196
+ version: 1,
197
+ template: `You are a fact-checking assistant. Analyze the following claim for accuracy.
198
+
199
+ Claim: {{claim}}
200
+
201
+ {{#if context}}Context: {{context}}{{/if}}
202
+
203
+ Instructions:
204
+ 1. Decompose the claim into individual factual assertions
205
+ 2. For each assertion, evaluate:
206
+ - Is it verifiable?
207
+ - What evidence supports or contradicts it?
208
+ - Confidence level (high/medium/low)
209
+ 3. Provide an overall verdict: Supported, Partially Supported, Unsupported, or Contradicted
210
+
211
+ Respond with a structured analysis.`,
212
+ variables: [
213
+ { name: "claim", required: true, type: "string", description: "The claim to fact-check" },
214
+ { name: "context", required: false, type: "string", description: "Additional context", defaultValue: "" }
215
+ ]
216
+ };
217
+
218
+ // src/services/prompt-service.ts
219
+ import { Context, Effect as Effect2, Layer, Ref } from "effect";
220
+ var PromptService = class extends Context.Tag("PromptService")() {
221
+ };
222
+ var PromptServiceLive = Layer.effect(
223
+ PromptService,
224
+ Effect2.gen(function* () {
225
+ const templatesRef = yield* Ref.make(/* @__PURE__ */ new Map());
226
+ const latestRef = yield* Ref.make(/* @__PURE__ */ new Map());
227
+ return {
228
+ register: (template) => Effect2.gen(function* () {
229
+ const key = `${template.id}:${template.version}`;
230
+ yield* Ref.update(templatesRef, (m) => {
231
+ const n = new Map(m);
232
+ n.set(key, template);
233
+ return n;
234
+ });
235
+ yield* Ref.update(latestRef, (m) => {
236
+ const n = new Map(m);
237
+ const current = n.get(template.id) ?? 0;
238
+ if (template.version > current) n.set(template.id, template.version);
239
+ return n;
240
+ });
241
+ }),
242
+ compile: (templateId, variables, options) => Effect2.gen(function* () {
243
+ const latest = yield* Ref.get(latestRef);
244
+ const version = latest.get(templateId);
245
+ if (version == null) {
246
+ return yield* Effect2.fail(new TemplateNotFoundError({ templateId }));
247
+ }
248
+ const templates = yield* Ref.get(templatesRef);
249
+ const template = templates.get(`${templateId}:${version}`);
250
+ const content = yield* interpolate(template, variables);
251
+ const tokenEst = estimateTokens(content);
252
+ return {
253
+ templateId,
254
+ version,
255
+ content: options?.maxTokens && tokenEst > options.maxTokens ? content.slice(0, options.maxTokens * 4) : content,
256
+ tokenEstimate: Math.min(tokenEst, options?.maxTokens ?? tokenEst),
257
+ variables
258
+ };
259
+ }),
260
+ compose: (prompts, options) => Effect2.succeed({
261
+ templateId: "composed",
262
+ version: 1,
263
+ content: prompts.map((p) => p.content).join(options?.separator ?? "\n\n"),
264
+ tokenEstimate: prompts.reduce((s, p) => s + p.tokenEstimate, 0),
265
+ variables: {}
266
+ }),
267
+ getVersion: (templateId, version) => Effect2.gen(function* () {
268
+ const templates = yield* Ref.get(templatesRef);
269
+ const template = templates.get(`${templateId}:${version}`);
270
+ if (!template) {
271
+ return yield* Effect2.fail(new TemplateNotFoundError({ templateId, version }));
272
+ }
273
+ return template;
274
+ }),
275
+ getVersionHistory: (templateId) => Ref.get(templatesRef).pipe(
276
+ Effect2.map(
277
+ (m) => Array.from(m.values()).filter((t) => t.id === templateId).sort((a, b) => a.version - b.version)
278
+ )
279
+ )
280
+ };
281
+ })
282
+ );
283
+
284
+ // src/runtime.ts
285
+ var createPromptLayer = () => PromptServiceLive;
286
+ export {
287
+ CompiledPromptSchema,
288
+ PromptError,
289
+ PromptService,
290
+ PromptServiceLive,
291
+ PromptTemplateSchema,
292
+ PromptVariableSchema,
293
+ PromptVariableType,
294
+ TemplateNotFoundError,
295
+ VariableError,
296
+ createPromptLayer,
297
+ estimateTokens,
298
+ factCheckTemplate,
299
+ interpolate,
300
+ planExecuteTemplate,
301
+ reactTemplate,
302
+ reflexionTemplate,
303
+ treeOfThoughtTemplate
304
+ };
305
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/types/template.ts","../src/errors/errors.ts","../src/services/template-engine.ts","../src/templates/reasoning/react.ts","../src/templates/reasoning/plan-execute.ts","../src/templates/reasoning/tree-of-thought.ts","../src/templates/reasoning/reflexion.ts","../src/templates/verification/fact-check.ts","../src/services/prompt-service.ts","../src/runtime.ts"],"sourcesContent":["import { Schema } from \"effect\";\n\nexport const PromptVariableType = Schema.Literal(\n \"string\",\n \"number\",\n \"boolean\",\n \"array\",\n \"object\",\n);\nexport type PromptVariableType = typeof PromptVariableType.Type;\n\nexport const PromptVariableSchema = Schema.Struct({\n name: Schema.String,\n required: Schema.Boolean,\n type: PromptVariableType,\n description: Schema.optional(Schema.String),\n defaultValue: Schema.optional(Schema.Unknown),\n});\nexport type PromptVariable = typeof PromptVariableSchema.Type;\n\nexport const PromptTemplateSchema = Schema.Struct({\n id: Schema.String,\n name: Schema.String,\n version: Schema.Number,\n template: Schema.String,\n variables: Schema.Array(PromptVariableSchema),\n metadata: Schema.optional(\n Schema.Struct({\n author: Schema.optional(Schema.String),\n description: Schema.optional(Schema.String),\n tags: Schema.optional(Schema.Array(Schema.String)),\n model: Schema.optional(Schema.String),\n maxTokens: Schema.optional(Schema.Number),\n }),\n ),\n});\nexport type PromptTemplate = typeof PromptTemplateSchema.Type;\n\nexport const CompiledPromptSchema = Schema.Struct({\n templateId: Schema.String,\n version: Schema.Number,\n content: Schema.String,\n tokenEstimate: Schema.Number,\n variables: Schema.Record({ key: Schema.String, value: Schema.Unknown }),\n});\nexport type CompiledPrompt = typeof CompiledPromptSchema.Type;\n","import { Data } from \"effect\";\n\nexport class PromptError extends Data.TaggedError(\"PromptError\")<{\n readonly message: string;\n readonly templateId?: string;\n readonly cause?: unknown;\n}> {}\n\nexport class TemplateNotFoundError extends Data.TaggedError(\n \"TemplateNotFoundError\",\n)<{\n readonly templateId: string;\n readonly version?: number;\n}> {}\n\nexport class VariableError extends Data.TaggedError(\"VariableError\")<{\n readonly templateId: string;\n readonly variableName: string;\n readonly message: string;\n}> {}\n\nexport type PromptErrors = PromptError | TemplateNotFoundError | VariableError;\n","import { Effect } from \"effect\";\nimport type { PromptTemplate, PromptVariable } from \"../types/template.js\";\nimport { VariableError } from \"../errors/errors.js\";\n\nexport const interpolate = (\n template: PromptTemplate,\n variables: Record<string, unknown>,\n): Effect.Effect<string, VariableError> =>\n Effect.gen(function* () {\n // Validate required variables\n for (const v of template.variables) {\n if (v.required && !(v.name in variables) && v.defaultValue === undefined) {\n return yield* Effect.fail(\n new VariableError({\n templateId: template.id,\n variableName: v.name,\n message: \"Required variable missing\",\n }),\n );\n }\n }\n\n let content = template.template;\n\n // Interpolate provided variables\n for (const [key, value] of Object.entries(variables)) {\n content = content.replaceAll(`{{${key}}}`, String(value));\n }\n\n // Fill defaults for missing optional variables\n for (const v of template.variables) {\n if (!v.required && !(v.name in variables) && v.defaultValue !== undefined) {\n content = content.replaceAll(`{{${v.name}}}`, String(v.defaultValue));\n }\n }\n\n return content;\n });\n\nexport const estimateTokens = (text: string): number =>\n Math.ceil(text.length / 4);\n","import type { PromptTemplate } from \"../../types/template.js\";\n\nexport const reactTemplate: PromptTemplate = {\n id: \"reasoning.react\",\n name: \"ReAct Reasoning\",\n version: 1,\n template: `You are an AI assistant using the ReAct (Reasoning + Acting) framework.\n\nTask: {{task}}\n\nAvailable tools: {{tools}}\n\nFor each step, follow this pattern:\nThought: Analyze what you know and what you need to do next\nAction: Choose a tool and specify the input\nObservation: Review the tool result\n\nContinue until you can provide a final answer.\n\n{{#if constraints}}Constraints: {{constraints}}{{/if}}\n\nWhen you have enough information, respond with:\nThought: I now have enough information to answer\nFinal Answer: [your comprehensive answer]`,\n variables: [\n { name: \"task\", required: true, type: \"string\", description: \"The task to accomplish\" },\n { name: \"tools\", required: true, type: \"string\", description: \"Available tools list\" },\n { name: \"constraints\", required: false, type: \"string\", description: \"Optional constraints\", defaultValue: \"\" },\n ],\n};\n","import type { PromptTemplate } from \"../../types/template.js\";\n\nexport const planExecuteTemplate: PromptTemplate = {\n id: \"reasoning.plan-execute\",\n name: \"Plan and Execute\",\n version: 1,\n template: `You are an AI assistant using the Plan-and-Execute framework.\n\nTask: {{task}}\n\nAvailable tools: {{tools}}\n\nPhase 1 - Planning:\nBreak the task into a numbered list of concrete steps. Each step should be independently executable.\n\nPhase 2 - Execution:\nExecute each step in order, using available tools as needed.\n\nPhase 3 - Synthesis:\nCombine all step results into a final comprehensive answer.\n\n{{#if constraints}}Constraints: {{constraints}}{{/if}}`,\n variables: [\n { name: \"task\", required: true, type: \"string\", description: \"The task to accomplish\" },\n { name: \"tools\", required: true, type: \"string\", description: \"Available tools list\" },\n { name: \"constraints\", required: false, type: \"string\", description: \"Optional constraints\", defaultValue: \"\" },\n ],\n};\n","import type { PromptTemplate } from \"../../types/template.js\";\n\nexport const treeOfThoughtTemplate: PromptTemplate = {\n id: \"reasoning.tree-of-thought\",\n name: \"Tree of Thought\",\n version: 1,\n template: `You are an AI assistant using the Tree-of-Thought reasoning framework.\n\nProblem: {{problem}}\n\nGenerate {{branches}} different approaches to solve this problem.\nFor each approach:\n1. Describe the approach\n2. Evaluate its strengths and weaknesses\n3. Rate its likelihood of success (0-1)\n\nThen select the most promising approach and develop it fully.\n\n{{#if evaluation_criteria}}Evaluation criteria: {{evaluation_criteria}}{{/if}}`,\n variables: [\n { name: \"problem\", required: true, type: \"string\", description: \"The problem to solve\" },\n { name: \"branches\", required: false, type: \"number\", description: \"Number of approaches to generate\", defaultValue: 3 },\n { name: \"evaluation_criteria\", required: false, type: \"string\", description: \"Criteria for evaluating approaches\", defaultValue: \"\" },\n ],\n};\n","import type { PromptTemplate } from \"../../types/template.js\";\n\nexport const reflexionTemplate: PromptTemplate = {\n id: \"reasoning.reflexion\",\n name: \"Reflexion\",\n version: 1,\n template: `You are an AI assistant using the Reflexion framework for self-improving reasoning.\n\nTask: {{task}}\n\n{{#if previous_attempt}}\nPrevious attempt:\n{{previous_attempt}}\n\nReflection on previous attempt:\n{{reflection}}\n{{/if}}\n\nInstructions:\n1. Attempt to solve the task\n2. After your attempt, reflect on what went well and what could be improved\n3. If your solution is unsatisfactory, revise it based on your reflection\n\nProvide your final answer after reflection.`,\n variables: [\n { name: \"task\", required: true, type: \"string\", description: \"The task to accomplish\" },\n { name: \"previous_attempt\", required: false, type: \"string\", description: \"Previous attempt output\", defaultValue: \"\" },\n { name: \"reflection\", required: false, type: \"string\", description: \"Reflection on previous attempt\", defaultValue: \"\" },\n ],\n};\n","import type { PromptTemplate } from \"../../types/template.js\";\n\nexport const factCheckTemplate: PromptTemplate = {\n id: \"verification.fact-check\",\n name: \"Fact Check\",\n version: 1,\n template: `You are a fact-checking assistant. Analyze the following claim for accuracy.\n\nClaim: {{claim}}\n\n{{#if context}}Context: {{context}}{{/if}}\n\nInstructions:\n1. Decompose the claim into individual factual assertions\n2. For each assertion, evaluate:\n - Is it verifiable?\n - What evidence supports or contradicts it?\n - Confidence level (high/medium/low)\n3. Provide an overall verdict: Supported, Partially Supported, Unsupported, or Contradicted\n\nRespond with a structured analysis.`,\n variables: [\n { name: \"claim\", required: true, type: \"string\", description: \"The claim to fact-check\" },\n { name: \"context\", required: false, type: \"string\", description: \"Additional context\", defaultValue: \"\" },\n ],\n};\n","import { Context, Effect, Layer, Ref } from \"effect\";\nimport type { PromptTemplate, CompiledPrompt } from \"../types/template.js\";\nimport { TemplateNotFoundError, VariableError } from \"../errors/errors.js\";\nimport { interpolate, estimateTokens } from \"./template-engine.js\";\n\nexport class PromptService extends Context.Tag(\"PromptService\")<\n PromptService,\n {\n readonly register: (template: PromptTemplate) => Effect.Effect<void>;\n\n readonly compile: (\n templateId: string,\n variables: Record<string, unknown>,\n options?: { maxTokens?: number },\n ) => Effect.Effect<CompiledPrompt, TemplateNotFoundError | VariableError>;\n\n readonly compose: (\n prompts: readonly CompiledPrompt[],\n options?: { separator?: string; maxTokens?: number },\n ) => Effect.Effect<CompiledPrompt>;\n\n readonly getVersion: (\n templateId: string,\n version: number,\n ) => Effect.Effect<PromptTemplate, TemplateNotFoundError>;\n\n readonly getVersionHistory: (\n templateId: string,\n ) => Effect.Effect<readonly PromptTemplate[]>;\n }\n>() {}\n\nexport const PromptServiceLive = Layer.effect(\n PromptService,\n Effect.gen(function* () {\n const templatesRef = yield* Ref.make<Map<string, PromptTemplate>>(new Map());\n const latestRef = yield* Ref.make<Map<string, number>>(new Map());\n\n return {\n register: (template) =>\n Effect.gen(function* () {\n const key = `${template.id}:${template.version}`;\n yield* Ref.update(templatesRef, (m) => {\n const n = new Map(m);\n n.set(key, template);\n return n;\n });\n yield* Ref.update(latestRef, (m) => {\n const n = new Map(m);\n const current = n.get(template.id) ?? 0;\n if (template.version > current) n.set(template.id, template.version);\n return n;\n });\n }),\n\n compile: (templateId, variables, options) =>\n Effect.gen(function* () {\n const latest = yield* Ref.get(latestRef);\n const version = latest.get(templateId);\n if (version == null) {\n return yield* Effect.fail(new TemplateNotFoundError({ templateId }));\n }\n\n const templates = yield* Ref.get(templatesRef);\n const template = templates.get(`${templateId}:${version}`)!;\n\n const content = yield* interpolate(template, variables);\n const tokenEst = estimateTokens(content);\n\n return {\n templateId,\n version,\n content:\n options?.maxTokens && tokenEst > options.maxTokens\n ? content.slice(0, options.maxTokens * 4)\n : content,\n tokenEstimate: Math.min(tokenEst, options?.maxTokens ?? tokenEst),\n variables,\n };\n }),\n\n compose: (prompts, options) =>\n Effect.succeed({\n templateId: \"composed\",\n version: 1,\n content: prompts.map((p) => p.content).join(options?.separator ?? \"\\n\\n\"),\n tokenEstimate: prompts.reduce((s, p) => s + p.tokenEstimate, 0),\n variables: {},\n }),\n\n getVersion: (templateId, version) =>\n Effect.gen(function* () {\n const templates = yield* Ref.get(templatesRef);\n const template = templates.get(`${templateId}:${version}`);\n if (!template) {\n return yield* Effect.fail(new TemplateNotFoundError({ templateId, version }));\n }\n return template;\n }),\n\n getVersionHistory: (templateId) =>\n Ref.get(templatesRef).pipe(\n Effect.map((m) =>\n Array.from(m.values())\n .filter((t) => t.id === templateId)\n .sort((a, b) => a.version - b.version),\n ),\n ),\n };\n }),\n);\n","import type { Layer } from \"effect\";\nimport { PromptServiceLive, type PromptService } from \"./services/prompt-service.js\";\n\nex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AE,YAAY,QAAQ,CAAC,CAAC;AAAA,QAC9E;AACA,eAAO;AAAA,MACT,CAAC;AAAA,MAEH,mBAAmB,CAAC,eAClB,IAAI,IAAI,YAAY,EAAE;AAAA,QACpBA,QAAO;AAAA,UAAI,CAAC,MACV,MAAM,KAAK,EAAE,OAAO,CAAC,EAClB,OAAO,CAAC,MAAM,EAAE,OAAO,UAAU,EACjC,KAAK,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,OAAO;AAAA,QACzC;AAAA,MACF;AAAA,IACJ;AAAA,EACF,CAAC;AACH;;;AC3GO,IAAM,oBAAoB,MAAkC;","names":["Effect","Effect"]}
package/package.json ADDED
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "@reactive-agents/prompts",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "main": "./dist/index.js",
6
+ "types": "./dist/index.d.ts",
7
+ "scripts": {
8
+ "build": "tsup --config ../../tsup.config.base.ts",
9
+ "typecheck": "tsc --noEmit",
10
+ "test": "bun test",
11
+ "test:watch": "bun test --watch"
12
+ },
13
+ "dependencies": {
14
+ "effect": "^3.10.0",
15
+ "@reactive-agents/core": "0.1.0"
16
+ },
17
+ "devDependencies": {
18
+ "typescript": "^5.7.0",
19
+ "bun-types": "latest"
20
+ },
21
+ "license": "MIT",
22
+ "repository": {
23
+ "type": "git",
24
+ "url": "https://github.com/tylerjrbuell/reactive-agents-ts.git",
25
+ "directory": "packages/prompts"
26
+ },
27
+ "publishConfig": {
28
+ "access": "public"
29
+ },
30
+ "files": [
31
+ "dist",
32
+ "README.md",
33
+ "LICENSE"
34
+ ],
35
+ "exports": {
36
+ ".": {
37
+ "types": "./dist/index.d.ts",
38
+ "import": "./dist/index.js",
39
+ "default": "./dist/index.js"
40
+ }
41
+ },
42
+ "description": "Prompt management for Reactive Agents — template engine and built-in prompt library",
43
+ "homepage": "https://tylerjrbuell.github.io/reactive-agents-ts/",
44
+ "bugs": {
45
+ "url": "https://github.com/tylerjrbuell/reactive-agents-ts/issues"
46
+ }
47
+ }