@codebolt/agent 5.0.7 → 5.0.9
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/processor-pieces/base/basePreToolCallProcessor.js +5 -2
- package/dist/processor-pieces/messageModifiers/argumentProcessorModifier.d.ts +1 -1
- package/dist/processor-pieces/messageModifiers/argumentProcessorModifier.js +2 -2
- package/dist/processor-pieces/messageModifiers/atFileProcessorModifier.js +24 -34
- package/dist/processor-pieces/messageModifiers/chatRecordingModifier.d.ts +1 -1
- package/dist/processor-pieces/messageModifiers/chatRecordingModifier.js +2 -2
- package/dist/processor-pieces/messageModifiers/coreSystemPromptModifier.d.ts +1 -1
- package/dist/processor-pieces/messageModifiers/coreSystemPromptModifier.js +2 -2
- package/dist/processor-pieces/messageModifiers/directoryContextModifier.d.ts +1 -1
- package/dist/processor-pieces/messageModifiers/directoryContextModifier.js +8 -3
- package/dist/processor-pieces/messageModifiers/environmentContextModifier.d.ts +1 -1
- package/dist/processor-pieces/messageModifiers/environmentContextModifier.js +1 -1
- package/dist/processor-pieces/messageModifiers/ideContextModifier.js +114 -17
- package/dist/processor-pieces/messageModifiers/memoryImportModifier.d.ts +1 -1
- package/dist/processor-pieces/messageModifiers/memoryImportModifier.js +13 -5
- package/dist/processor-pieces/messageModifiers/toolInjectionModifier.d.ts +5 -0
- package/dist/processor-pieces/messageModifiers/toolInjectionModifier.js +4 -0
- package/dist/processor-pieces/postInferenceProcessors/loopDetectionModifier.js +24 -8
- package/dist/processor-pieces/postToolCallProcessors/conversationCompactorModifier.d.ts +202 -5
- package/dist/processor-pieces/postToolCallProcessors/conversationCompactorModifier.js +826 -19
- package/dist/processor-pieces/postToolCallProcessors/index.d.ts +1 -1
- package/dist/processor-pieces/postToolCallProcessors/index.js +2 -1
- package/dist/processor-pieces/postToolCallProcessors/shellProcessorModifier.js +7 -4
- package/dist/processor-pieces/preInferenceProcessors/chatCompressionModifier.d.ts +1 -1
- package/dist/processor-pieces/preInferenceProcessors/chatCompressionModifier.js +12 -16
- package/dist/processor-pieces/pretoolCallProcessors/toolParameterModifier.d.ts +2 -3
- package/dist/processor-pieces/pretoolCallProcessors/toolParameterModifier.js +1 -2
- package/dist/processor-pieces/utils/messageModifierHelper.js +5 -2
- package/dist/types/InternalTypes.d.ts +8 -6
- package/dist/unified/agent/agent.js +1 -2
- package/dist/unified/agent/codeboltAgent.d.ts +23 -2
- package/dist/unified/agent/codeboltAgent.js +55 -12
- package/dist/unified/agent/tools.d.ts +7 -11
- package/dist/unified/agent/tools.js +12 -3
- package/dist/unified/agent/workflow.js +38 -20
- package/dist/unified/agent/workflowSteps.d.ts +1 -1
- package/dist/unified/agent/workflowSteps.js +58 -23
- package/dist/unified/base/agentStep.js +20 -1
- package/dist/unified/base/initialPromptGenerator.js +3 -1
- package/dist/unified/base/responseExecutor.d.ts +3 -0
- package/dist/unified/base/responseExecutor.js +47 -21
- package/dist/unified/index.d.ts +1 -0
- package/dist/unified/index.js +4 -1
- package/dist/unified/services/LoopDetectionService.d.ts +44 -0
- package/dist/unified/services/LoopDetectionService.js +79 -0
- package/dist/unified/utils/utils.d.ts +20 -1
- package/dist/unified/utils/utils.js +8 -4
- package/package.json +5 -5
- package/dist/agent.d.ts +0 -86
- package/dist/agent.js +0 -324
- package/dist/builderpattern/agent.d.ts +0 -86
- package/dist/builderpattern/agent.js +0 -324
- package/dist/builderpattern/followupquestionbuilder.d.ts +0 -75
- package/dist/builderpattern/followupquestionbuilder.js +0 -197
- package/dist/builderpattern/index.d.ts +0 -14
- package/dist/builderpattern/index.js +0 -23
- package/dist/builderpattern/llmoutputhandler.d.ts +0 -102
- package/dist/builderpattern/llmoutputhandler.js +0 -452
- package/dist/builderpattern/promptbuilder.d.ts +0 -382
- package/dist/builderpattern/promptbuilder.js +0 -805
- package/dist/builderpattern/systemprompt.d.ts +0 -20
- package/dist/builderpattern/systemprompt.js +0 -48
- package/dist/builderpattern/taskInstruction.d.ts +0 -37
- package/dist/builderpattern/taskInstruction.js +0 -57
- package/dist/builderpattern/usermessage.d.ts +0 -70
- package/dist/builderpattern/usermessage.js +0 -123
- package/dist/composablepattern/agent.d.ts +0 -169
- package/dist/composablepattern/agent.js +0 -598
- package/dist/composablepattern/codebolt-storage.d.ts +0 -67
- package/dist/composablepattern/codebolt-storage.js +0 -320
- package/dist/composablepattern/document.d.ts +0 -149
- package/dist/composablepattern/document.js +0 -405
- package/dist/composablepattern/examples/codebolt-integration-example.d.ts +0 -12
- package/dist/composablepattern/examples/codebolt-integration-example.js +0 -218
- package/dist/composablepattern/examples/codebolt-storage-example.d.ts +0 -40
- package/dist/composablepattern/examples/codebolt-storage-example.js +0 -223
- package/dist/composablepattern/examples/custom-steps-example.d.ts +0 -20
- package/dist/composablepattern/examples/custom-steps-example.js +0 -455
- package/dist/composablepattern/examples/document-agent.d.ts +0 -17
- package/dist/composablepattern/examples/document-agent.js +0 -107
- package/dist/composablepattern/examples/simple-codebolt-integration.d.ts +0 -8
- package/dist/composablepattern/examples/simple-codebolt-integration.js +0 -164
- package/dist/composablepattern/examples/weather-agent.d.ts +0 -18
- package/dist/composablepattern/examples/weather-agent.js +0 -86
- package/dist/composablepattern/examples/workflow-example.d.ts +0 -12
- package/dist/composablepattern/examples/workflow-example.js +0 -463
- package/dist/composablepattern/index.d.ts +0 -63
- package/dist/composablepattern/index.js +0 -115
- package/dist/composablepattern/memory.d.ts +0 -89
- package/dist/composablepattern/memory.js +0 -141
- package/dist/composablepattern/tool.d.ts +0 -84
- package/dist/composablepattern/tool.js +0 -260
- package/dist/composablepattern/types.d.ts +0 -194
- package/dist/composablepattern/types.js +0 -6
- package/dist/composablepattern/user-context.d.ts +0 -214
- package/dist/composablepattern/user-context.js +0 -275
- package/dist/composablepattern/workflow.d.ts +0 -388
- package/dist/composablepattern/workflow.js +0 -562
- package/dist/followupquestionbuilder.d.ts +0 -75
- package/dist/followupquestionbuilder.js +0 -197
- package/dist/index.d.ts +0 -14
- package/dist/index.js +0 -23
- package/dist/llmoutputhandler.d.ts +0 -102
- package/dist/llmoutputhandler.js +0 -452
- package/dist/processor/agent/agentStep.d.ts +0 -49
- package/dist/processor/agent/agentStep.js +0 -241
- package/dist/processor/agent/toolExecutor.d.ts +0 -19
- package/dist/processor/agent/toolExecutor.js +0 -90
- package/dist/processor/index.d.ts +0 -7
- package/dist/processor/index.js +0 -36
- package/dist/processor/messageModifiers/baseMessageModifier.d.ts +0 -20
- package/dist/processor/messageModifiers/baseMessageModifier.js +0 -55
- package/dist/processor/processors/baseProcessor.d.ts +0 -14
- package/dist/processor/processors/baseProcessor.js +0 -29
- package/dist/processor/tools/baseTool.d.ts +0 -10
- package/dist/processor/tools/baseTool.js +0 -20
- package/dist/processor/tools/toolList.d.ts +0 -9
- package/dist/processor/tools/toolList.js +0 -22
- package/dist/processor/types/interfaces.d.ts +0 -94
- package/dist/processor/types/interfaces.js +0 -2
- package/dist/processor-pieces/messageModifiers/addToolsListMessageModifier.d.ts +0 -22
- package/dist/processor-pieces/messageModifiers/addToolsListMessageModifier.js +0 -144
- package/dist/processor-pieces/messageModifiers/baseContextMessageModifier.d.ts +0 -15
- package/dist/processor-pieces/messageModifiers/baseContextMessageModifier.js +0 -75
- package/dist/processor-pieces/messageModifiers/baseSystemInstructionMessageModifier.d.ts +0 -11
- package/dist/processor-pieces/messageModifiers/baseSystemInstructionMessageModifier.js +0 -46
- package/dist/processor-pieces/messageModifiers/handleUrlMessageModifier.d.ts +0 -12
- package/dist/processor-pieces/messageModifiers/handleUrlMessageModifier.js +0 -60
- package/dist/processor-pieces/messageModifiers/imageAttachmentMessageModifier.d.ts +0 -18
- package/dist/processor-pieces/messageModifiers/imageAttachmentMessageModifier.js +0 -222
- package/dist/processor-pieces/messageModifiers/workingDirectoryMessageModifier.d.ts +0 -22
- package/dist/processor-pieces/messageModifiers/workingDirectoryMessageModifier.js +0 -194
- package/dist/processor-pieces/processors/advancedLoopDetectionProcessor.d.ts +0 -41
- package/dist/processor-pieces/processors/advancedLoopDetectionProcessor.js +0 -197
- package/dist/processor-pieces/processors/chatCompressionProcessor.d.ts +0 -26
- package/dist/processor-pieces/processors/chatCompressionProcessor.js +0 -90
- package/dist/processor-pieces/processors/chatRecordingProcessor.d.ts +0 -81
- package/dist/processor-pieces/processors/chatRecordingProcessor.js +0 -329
- package/dist/processor-pieces/processors/contextManagementProcessor.d.ts +0 -40
- package/dist/processor-pieces/processors/contextManagementProcessor.js +0 -305
- package/dist/processor-pieces/processors/loopDetectionProcessor.d.ts +0 -30
- package/dist/processor-pieces/processors/loopDetectionProcessor.js +0 -137
- package/dist/processor-pieces/processors/responseValidationProcessor.d.ts +0 -30
- package/dist/processor-pieces/processors/responseValidationProcessor.js +0 -228
- package/dist/processor-pieces/processors/telemetryProcessor.d.ts +0 -99
- package/dist/processor-pieces/processors/telemetryProcessor.js +0 -311
- package/dist/processor-pieces/processors/tokenManagementProcessor.d.ts +0 -37
- package/dist/processor-pieces/processors/tokenManagementProcessor.js +0 -178
- package/dist/processor-pieces/processors/toolExecutionProcessor.d.ts +0 -43
- package/dist/processor-pieces/processors/toolExecutionProcessor.js +0 -207
- package/dist/processor-pieces/tools/fileTools.d.ts +0 -26
- package/dist/processor-pieces/tools/fileTools.js +0 -162
- package/dist/promptbuilder.d.ts +0 -382
- package/dist/promptbuilder.js +0 -805
- package/dist/systemprompt.d.ts +0 -20
- package/dist/systemprompt.js +0 -48
- package/dist/taskInstruction.d.ts +0 -37
- package/dist/taskInstruction.js +0 -57
- package/dist/usermessage.d.ts +0 -70
- package/dist/usermessage.js +0 -123
|
@@ -1,463 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* @fileoverview Workflow Examples
|
|
4
|
-
* @description Examples showing how to create and execute workflows with multiple agents
|
|
5
|
-
*/
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.dataProcessingWorkflow = exports.customerSupportWorkflow = exports.contentCreationWorkflow = void 0;
|
|
8
|
-
exports.runContentWorkflowExample = runContentWorkflowExample;
|
|
9
|
-
exports.runCustomerSupportExample = runCustomerSupportExample;
|
|
10
|
-
exports.runDataProcessingExample = runDataProcessingExample;
|
|
11
|
-
exports.runAllWorkflowExamples = runAllWorkflowExamples;
|
|
12
|
-
const index_1 = require("../index");
|
|
13
|
-
const workflow_1 = require("../workflow");
|
|
14
|
-
// ================================
|
|
15
|
-
// Example: Content Creation Workflow
|
|
16
|
-
// ================================
|
|
17
|
-
// Create research agent
|
|
18
|
-
const researchAgent = new index_1.ComposableAgent({
|
|
19
|
-
name: 'Research Agent',
|
|
20
|
-
instructions: `
|
|
21
|
-
You are a research assistant that gathers information on topics.
|
|
22
|
-
When given a topic, provide key facts, statistics, and insights.
|
|
23
|
-
Structure your response with clear sections and bullet points.
|
|
24
|
-
`,
|
|
25
|
-
model: 'gpt-4o-mini', // References configuration in codeboltagents.yaml
|
|
26
|
-
memory: (0, index_1.createCodeBoltAgentMemory)()
|
|
27
|
-
});
|
|
28
|
-
// Create writing agent
|
|
29
|
-
const writingAgent = new index_1.ComposableAgent({
|
|
30
|
-
name: 'Writing Agent',
|
|
31
|
-
instructions: `
|
|
32
|
-
You are a professional content writer.
|
|
33
|
-
Take research information and create engaging, well-structured content.
|
|
34
|
-
Use clear headings, compelling introductions, and actionable conclusions.
|
|
35
|
-
`,
|
|
36
|
-
model: 'gpt-4o-mini', // References configuration in codeboltagents.yaml
|
|
37
|
-
memory: (0, index_1.createCodeBoltAgentMemory)()
|
|
38
|
-
});
|
|
39
|
-
// Create review agent
|
|
40
|
-
const reviewAgent = new index_1.ComposableAgent({
|
|
41
|
-
name: 'Review Agent',
|
|
42
|
-
instructions: `
|
|
43
|
-
You are an editor that reviews content for quality.
|
|
44
|
-
Check for clarity, grammar, structure, and engagement.
|
|
45
|
-
Provide a quality score (1-10) and specific improvement suggestions.
|
|
46
|
-
`,
|
|
47
|
-
model: 'gpt-4o-mini', // References configuration in codeboltagents.yaml
|
|
48
|
-
memory: (0, index_1.createCodeBoltAgentMemory)()
|
|
49
|
-
});
|
|
50
|
-
// Content creation workflow
|
|
51
|
-
exports.contentCreationWorkflow = (0, workflow_1.createWorkflow)({
|
|
52
|
-
name: 'Content Creation Pipeline',
|
|
53
|
-
description: 'Research, write, and review content creation workflow',
|
|
54
|
-
initialData: {
|
|
55
|
-
topic: 'The Future of AI in Healthcare'
|
|
56
|
-
},
|
|
57
|
-
steps: [
|
|
58
|
-
// Step 1: Research the topic
|
|
59
|
-
(0, workflow_1.createAgentStep)({
|
|
60
|
-
id: 'research',
|
|
61
|
-
name: 'Research Topic',
|
|
62
|
-
agent: researchAgent,
|
|
63
|
-
messageTemplate: 'Research the topic: {{topic}}. Provide comprehensive information including key trends, statistics, and expert insights.',
|
|
64
|
-
outputMapping: {
|
|
65
|
-
'researchData': 'agentResult.message'
|
|
66
|
-
}
|
|
67
|
-
}),
|
|
68
|
-
// Step 2: Write initial draft
|
|
69
|
-
(0, workflow_1.createAgentStep)({
|
|
70
|
-
id: 'write-draft',
|
|
71
|
-
name: 'Write Initial Draft',
|
|
72
|
-
agent: writingAgent,
|
|
73
|
-
messageTemplate: 'Write a comprehensive article about {{topic}} using this research: {{researchData}}',
|
|
74
|
-
outputMapping: {
|
|
75
|
-
'firstDraft': 'agentResult.message'
|
|
76
|
-
}
|
|
77
|
-
}),
|
|
78
|
-
// Step 3: Review the content
|
|
79
|
-
(0, workflow_1.createAgentStep)({
|
|
80
|
-
id: 'review',
|
|
81
|
-
name: 'Review Content',
|
|
82
|
-
agent: reviewAgent,
|
|
83
|
-
messageTemplate: 'Review this article and provide a quality score and suggestions: {{firstDraft}}',
|
|
84
|
-
outputMapping: {
|
|
85
|
-
'reviewFeedback': 'agentResult.message'
|
|
86
|
-
}
|
|
87
|
-
}),
|
|
88
|
-
// Step 4: Extract quality score
|
|
89
|
-
(0, workflow_1.createTransformStep)({
|
|
90
|
-
id: 'extract-score',
|
|
91
|
-
name: 'Extract Quality Score',
|
|
92
|
-
transform: (data) => {
|
|
93
|
-
var _a;
|
|
94
|
-
// Simple regex to extract score (in real implementation, you might use more sophisticated parsing)
|
|
95
|
-
const scoreMatch = (_a = data.reviewFeedback) === null || _a === void 0 ? void 0 : _a.match(/score[:\s]*(\d+)/i);
|
|
96
|
-
const qualityScore = scoreMatch ? parseInt(scoreMatch[1]) : 5;
|
|
97
|
-
return { qualityScore };
|
|
98
|
-
}
|
|
99
|
-
}),
|
|
100
|
-
// Step 5: Conditional improvement
|
|
101
|
-
(0, workflow_1.createConditionalStep)({
|
|
102
|
-
id: 'improvement-check',
|
|
103
|
-
name: 'Check if Improvement Needed',
|
|
104
|
-
condition: (context) => context.data.qualityScore < 8,
|
|
105
|
-
trueBranch: [
|
|
106
|
-
(0, workflow_1.createAgentStep)({
|
|
107
|
-
id: 'improve-content',
|
|
108
|
-
name: 'Improve Content',
|
|
109
|
-
agent: writingAgent,
|
|
110
|
-
messageTemplate: 'Improve this article based on the feedback: {{reviewFeedback}}\n\nOriginal article: {{firstDraft}}',
|
|
111
|
-
outputMapping: {
|
|
112
|
-
'finalDraft': 'agentResult.message'
|
|
113
|
-
}
|
|
114
|
-
})
|
|
115
|
-
],
|
|
116
|
-
falseBranch: [
|
|
117
|
-
(0, workflow_1.createTransformStep)({
|
|
118
|
-
id: 'use-original',
|
|
119
|
-
name: 'Use Original Draft',
|
|
120
|
-
transform: (data) => ({ finalDraft: data.firstDraft })
|
|
121
|
-
})
|
|
122
|
-
]
|
|
123
|
-
}),
|
|
124
|
-
// Step 6: Final formatting
|
|
125
|
-
(0, workflow_1.createTransformStep)({
|
|
126
|
-
id: 'format-output',
|
|
127
|
-
name: 'Format Final Output',
|
|
128
|
-
transform: (data) => ({
|
|
129
|
-
result: {
|
|
130
|
-
topic: data.topic,
|
|
131
|
-
finalContent: data.finalDraft,
|
|
132
|
-
qualityScore: data.qualityScore,
|
|
133
|
-
researchData: data.researchData,
|
|
134
|
-
reviewFeedback: data.reviewFeedback
|
|
135
|
-
}
|
|
136
|
-
})
|
|
137
|
-
})
|
|
138
|
-
]
|
|
139
|
-
});
|
|
140
|
-
// ================================
|
|
141
|
-
// Example: Customer Support Workflow
|
|
142
|
-
// ================================
|
|
143
|
-
// Create classification agent
|
|
144
|
-
const classificationAgent = new index_1.ComposableAgent({
|
|
145
|
-
name: 'Classification Agent',
|
|
146
|
-
instructions: `
|
|
147
|
-
You are a customer support classifier.
|
|
148
|
-
Analyze customer messages and classify them into categories:
|
|
149
|
-
- technical_issue
|
|
150
|
-
- billing_question
|
|
151
|
-
- feature_request
|
|
152
|
-
- general_inquiry
|
|
153
|
-
|
|
154
|
-
Also determine urgency level: low, medium, high, critical
|
|
155
|
-
|
|
156
|
-
Respond in JSON format: {"category": "...", "urgency": "...", "summary": "..."}
|
|
157
|
-
`,
|
|
158
|
-
model: 'gpt-4o-mini', // References configuration in codeboltagents.yaml
|
|
159
|
-
memory: (0, index_1.createCodeBoltAgentMemory)()
|
|
160
|
-
});
|
|
161
|
-
// Create technical support agent
|
|
162
|
-
const technicalAgent = new index_1.ComposableAgent({
|
|
163
|
-
name: 'Technical Support Agent',
|
|
164
|
-
instructions: `
|
|
165
|
-
You are a technical support specialist.
|
|
166
|
-
Provide detailed troubleshooting steps and solutions for technical issues.
|
|
167
|
-
Be clear, step-by-step, and ask clarifying questions if needed.
|
|
168
|
-
`,
|
|
169
|
-
model: 'gpt-4o-mini', // References configuration in codeboltagents.yaml
|
|
170
|
-
memory: (0, index_1.createCodeBoltAgentMemory)()
|
|
171
|
-
});
|
|
172
|
-
// Create billing agent
|
|
173
|
-
const billingAgent = new index_1.ComposableAgent({
|
|
174
|
-
name: 'Billing Support Agent',
|
|
175
|
-
instructions: `
|
|
176
|
-
You are a billing support specialist.
|
|
177
|
-
Help customers with billing questions, payment issues, and account inquiries.
|
|
178
|
-
Be helpful and provide clear explanations of charges and policies.
|
|
179
|
-
`,
|
|
180
|
-
model: 'gpt-4o-mini', // References configuration in codeboltagents.yaml
|
|
181
|
-
memory: (0, index_1.createCodeBoltAgentMemory)()
|
|
182
|
-
});
|
|
183
|
-
// Customer support workflow
|
|
184
|
-
exports.customerSupportWorkflow = (0, workflow_1.createWorkflow)({
|
|
185
|
-
name: 'Customer Support Pipeline',
|
|
186
|
-
description: 'Automated customer support classification and routing',
|
|
187
|
-
initialData: {
|
|
188
|
-
customerMessage: "I'm having trouble logging into my account and I'm getting an error message",
|
|
189
|
-
customerId: "CUST-12345"
|
|
190
|
-
},
|
|
191
|
-
steps: [
|
|
192
|
-
// Step 1: Classify the inquiry
|
|
193
|
-
(0, workflow_1.createAgentStep)({
|
|
194
|
-
id: 'classify',
|
|
195
|
-
name: 'Classify Customer Inquiry',
|
|
196
|
-
agent: classificationAgent,
|
|
197
|
-
messageTemplate: 'Classify this customer message: {{customerMessage}}',
|
|
198
|
-
outputMapping: {
|
|
199
|
-
'classification': 'agentResult.message'
|
|
200
|
-
}
|
|
201
|
-
}),
|
|
202
|
-
// Step 2: Parse classification result
|
|
203
|
-
(0, workflow_1.createTransformStep)({
|
|
204
|
-
id: 'parse-classification',
|
|
205
|
-
name: 'Parse Classification',
|
|
206
|
-
transform: (data) => {
|
|
207
|
-
try {
|
|
208
|
-
const parsed = JSON.parse(data.classification);
|
|
209
|
-
return {
|
|
210
|
-
category: parsed.category,
|
|
211
|
-
urgency: parsed.urgency,
|
|
212
|
-
summary: parsed.summary
|
|
213
|
-
};
|
|
214
|
-
}
|
|
215
|
-
catch (error) {
|
|
216
|
-
return {
|
|
217
|
-
category: 'general_inquiry',
|
|
218
|
-
urgency: 'medium',
|
|
219
|
-
summary: 'Classification parsing failed'
|
|
220
|
-
};
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
}),
|
|
224
|
-
// Step 3: Add delay for high priority items (simulate escalation)
|
|
225
|
-
(0, workflow_1.createConditionalStep)({
|
|
226
|
-
id: 'urgency-check',
|
|
227
|
-
name: 'Check Urgency Level',
|
|
228
|
-
condition: (context) => context.data.urgency === 'critical' || context.data.urgency === 'high',
|
|
229
|
-
trueBranch: [
|
|
230
|
-
(0, workflow_1.createTransformStep)({
|
|
231
|
-
id: 'escalate',
|
|
232
|
-
name: 'Escalate to Human Agent',
|
|
233
|
-
transform: (data) => ({
|
|
234
|
-
escalated: true,
|
|
235
|
-
escalationReason: `High urgency ${data.urgency} issue: ${data.summary}`
|
|
236
|
-
})
|
|
237
|
-
})
|
|
238
|
-
]
|
|
239
|
-
}),
|
|
240
|
-
// Step 4: Route to appropriate agent based on category
|
|
241
|
-
(0, workflow_1.createConditionalStep)({
|
|
242
|
-
id: 'route-by-category',
|
|
243
|
-
name: 'Route by Category',
|
|
244
|
-
condition: (context) => !context.data.escalated,
|
|
245
|
-
trueBranch: [
|
|
246
|
-
(0, workflow_1.createConditionalStep)({
|
|
247
|
-
id: 'technical-routing',
|
|
248
|
-
name: 'Handle Technical Issues',
|
|
249
|
-
condition: (context) => context.data.category === 'technical_issue',
|
|
250
|
-
trueBranch: [
|
|
251
|
-
(0, workflow_1.createAgentStep)({
|
|
252
|
-
id: 'technical-support',
|
|
253
|
-
name: 'Technical Support Response',
|
|
254
|
-
agent: technicalAgent,
|
|
255
|
-
messageTemplate: 'Help with this technical issue: {{customerMessage}}\nCustomer ID: {{customerId}}',
|
|
256
|
-
outputMapping: {
|
|
257
|
-
'supportResponse': 'agentResult.message'
|
|
258
|
-
}
|
|
259
|
-
})
|
|
260
|
-
]
|
|
261
|
-
}),
|
|
262
|
-
(0, workflow_1.createConditionalStep)({
|
|
263
|
-
id: 'billing-routing',
|
|
264
|
-
name: 'Handle Billing Questions',
|
|
265
|
-
condition: (context) => context.data.category === 'billing_question',
|
|
266
|
-
trueBranch: [
|
|
267
|
-
(0, workflow_1.createAgentStep)({
|
|
268
|
-
id: 'billing-support',
|
|
269
|
-
name: 'Billing Support Response',
|
|
270
|
-
agent: billingAgent,
|
|
271
|
-
messageTemplate: 'Help with this billing question: {{customerMessage}}\nCustomer ID: {{customerId}}',
|
|
272
|
-
outputMapping: {
|
|
273
|
-
'supportResponse': 'agentResult.message'
|
|
274
|
-
}
|
|
275
|
-
})
|
|
276
|
-
]
|
|
277
|
-
})
|
|
278
|
-
]
|
|
279
|
-
}),
|
|
280
|
-
// Step 5: Generate final response
|
|
281
|
-
(0, workflow_1.createTransformStep)({
|
|
282
|
-
id: 'generate-response',
|
|
283
|
-
name: 'Generate Final Response',
|
|
284
|
-
transform: (data) => ({
|
|
285
|
-
finalResponse: {
|
|
286
|
-
customerId: data.customerId,
|
|
287
|
-
category: data.category,
|
|
288
|
-
urgency: data.urgency,
|
|
289
|
-
escalated: data.escalated || false,
|
|
290
|
-
response: data.supportResponse || 'Your inquiry has been escalated to a human agent.',
|
|
291
|
-
timestamp: new Date().toISOString()
|
|
292
|
-
}
|
|
293
|
-
})
|
|
294
|
-
})
|
|
295
|
-
]
|
|
296
|
-
});
|
|
297
|
-
// ================================
|
|
298
|
-
// Example: Data Processing Workflow
|
|
299
|
-
// ================================
|
|
300
|
-
// Create data analysis agent
|
|
301
|
-
const analysisAgent = new index_1.ComposableAgent({
|
|
302
|
-
name: 'Data Analysis Agent',
|
|
303
|
-
instructions: `
|
|
304
|
-
You are a data analyst. Analyze datasets and provide insights.
|
|
305
|
-
Look for patterns, trends, and anomalies.
|
|
306
|
-
Provide statistical summaries and recommendations.
|
|
307
|
-
`,
|
|
308
|
-
model: 'gpt-4o-mini', // References configuration in codeboltagents.yaml
|
|
309
|
-
tools: {
|
|
310
|
-
processData: (0, index_1.createTool)({
|
|
311
|
-
id: 'process-data',
|
|
312
|
-
description: 'Process and analyze data',
|
|
313
|
-
inputSchema: index_1.z.object({
|
|
314
|
-
data: index_1.z.array(index_1.z.record(index_1.z.any())),
|
|
315
|
-
analysisType: index_1.z.string()
|
|
316
|
-
}),
|
|
317
|
-
outputSchema: index_1.z.object({
|
|
318
|
-
summary: index_1.z.string(),
|
|
319
|
-
insights: index_1.z.array(index_1.z.string()),
|
|
320
|
-
recommendations: index_1.z.array(index_1.z.string())
|
|
321
|
-
}),
|
|
322
|
-
execute: async ({ context }) => {
|
|
323
|
-
// Mock data processing
|
|
324
|
-
const { data, analysisType } = context;
|
|
325
|
-
return {
|
|
326
|
-
summary: `Analyzed ${data.length} records using ${analysisType}`,
|
|
327
|
-
insights: ['Trend 1: Increasing pattern', 'Trend 2: Seasonal variation'],
|
|
328
|
-
recommendations: ['Recommendation 1: Optimize process', 'Recommendation 2: Monitor metrics']
|
|
329
|
-
};
|
|
330
|
-
}
|
|
331
|
-
})
|
|
332
|
-
},
|
|
333
|
-
memory: (0, index_1.createCodeBoltAgentMemory)()
|
|
334
|
-
});
|
|
335
|
-
exports.dataProcessingWorkflow = (0, workflow_1.createWorkflow)({
|
|
336
|
-
name: 'Data Processing Pipeline',
|
|
337
|
-
description: 'Process, analyze, and generate reports from data',
|
|
338
|
-
initialData: {
|
|
339
|
-
rawData: [
|
|
340
|
-
{ date: '2024-01-01', value: 100, category: 'A' },
|
|
341
|
-
{ date: '2024-01-02', value: 150, category: 'B' },
|
|
342
|
-
{ date: '2024-01-03', value: 120, category: 'A' }
|
|
343
|
-
]
|
|
344
|
-
},
|
|
345
|
-
steps: [
|
|
346
|
-
// Step 1: Data validation
|
|
347
|
-
(0, workflow_1.createTransformStep)({
|
|
348
|
-
id: 'validate-data',
|
|
349
|
-
name: 'Validate Input Data',
|
|
350
|
-
inputSchema: index_1.z.object({
|
|
351
|
-
rawData: index_1.z.array(index_1.z.record(index_1.z.any()))
|
|
352
|
-
}),
|
|
353
|
-
transform: (data) => {
|
|
354
|
-
const validRecords = data.rawData.filter((record) => record.date && record.value !== undefined);
|
|
355
|
-
return {
|
|
356
|
-
validData: validRecords,
|
|
357
|
-
invalidCount: data.rawData.length - validRecords.length
|
|
358
|
-
};
|
|
359
|
-
}
|
|
360
|
-
}),
|
|
361
|
-
// Step 2: Data preprocessing
|
|
362
|
-
(0, workflow_1.createTransformStep)({
|
|
363
|
-
id: 'preprocess',
|
|
364
|
-
name: 'Preprocess Data',
|
|
365
|
-
transform: (data) => {
|
|
366
|
-
const processedData = data.validData.map((record) => ({
|
|
367
|
-
...record,
|
|
368
|
-
normalizedValue: record.value / 100,
|
|
369
|
-
timestamp: new Date(record.date).getTime()
|
|
370
|
-
}));
|
|
371
|
-
return { processedData };
|
|
372
|
-
}
|
|
373
|
-
}),
|
|
374
|
-
// Step 3: Statistical analysis
|
|
375
|
-
(0, workflow_1.createAgentStep)({
|
|
376
|
-
id: 'analyze',
|
|
377
|
-
name: 'Analyze Data',
|
|
378
|
-
agent: analysisAgent,
|
|
379
|
-
messageTemplate: 'Analyze this dataset and provide insights: {{processedData}}',
|
|
380
|
-
outputMapping: {
|
|
381
|
-
'analysis': 'agentResult.message'
|
|
382
|
-
}
|
|
383
|
-
}),
|
|
384
|
-
// Step 4: Generate report
|
|
385
|
-
(0, workflow_1.createTransformStep)({
|
|
386
|
-
id: 'generate-report',
|
|
387
|
-
name: 'Generate Final Report',
|
|
388
|
-
transform: (data) => {
|
|
389
|
-
var _a, _b;
|
|
390
|
-
return ({
|
|
391
|
-
report: {
|
|
392
|
-
dataQuality: {
|
|
393
|
-
totalRecords: ((_a = data.rawData) === null || _a === void 0 ? void 0 : _a.length) || 0,
|
|
394
|
-
validRecords: ((_b = data.validData) === null || _b === void 0 ? void 0 : _b.length) || 0,
|
|
395
|
-
invalidRecords: data.invalidCount || 0
|
|
396
|
-
},
|
|
397
|
-
analysis: data.analysis,
|
|
398
|
-
processedAt: new Date().toISOString(),
|
|
399
|
-
recommendations: 'See analysis for detailed recommendations'
|
|
400
|
-
}
|
|
401
|
-
});
|
|
402
|
-
}
|
|
403
|
-
})
|
|
404
|
-
]
|
|
405
|
-
});
|
|
406
|
-
// ================================
|
|
407
|
-
// Example Usage Functions
|
|
408
|
-
// ================================
|
|
409
|
-
async function runContentWorkflowExample() {
|
|
410
|
-
console.log('Running content creation workflow...');
|
|
411
|
-
const result = await exports.contentCreationWorkflow.execute();
|
|
412
|
-
if (result.success) {
|
|
413
|
-
console.log('Workflow completed successfully!');
|
|
414
|
-
console.log('Final result:', result.data.result);
|
|
415
|
-
}
|
|
416
|
-
else {
|
|
417
|
-
console.error('Workflow failed:', result.error);
|
|
418
|
-
}
|
|
419
|
-
return result;
|
|
420
|
-
}
|
|
421
|
-
async function runCustomerSupportExample() {
|
|
422
|
-
console.log('Running customer support workflow...');
|
|
423
|
-
const result = await exports.customerSupportWorkflow.execute();
|
|
424
|
-
if (result.success) {
|
|
425
|
-
console.log('Support workflow completed!');
|
|
426
|
-
console.log('Response:', result.data.finalResponse);
|
|
427
|
-
}
|
|
428
|
-
else {
|
|
429
|
-
console.error('Support workflow failed:', result.error);
|
|
430
|
-
}
|
|
431
|
-
return result;
|
|
432
|
-
}
|
|
433
|
-
async function runDataProcessingExample() {
|
|
434
|
-
console.log('Running data processing workflow...');
|
|
435
|
-
const result = await exports.dataProcessingWorkflow.execute();
|
|
436
|
-
if (result.success) {
|
|
437
|
-
console.log('Data processing completed!');
|
|
438
|
-
console.log('Report:', result.data.report);
|
|
439
|
-
}
|
|
440
|
-
else {
|
|
441
|
-
console.error('Data processing failed:', result.error);
|
|
442
|
-
}
|
|
443
|
-
return result;
|
|
444
|
-
}
|
|
445
|
-
// Run all examples
|
|
446
|
-
async function runAllWorkflowExamples() {
|
|
447
|
-
try {
|
|
448
|
-
console.log('=== Running All Workflow Examples ===\n');
|
|
449
|
-
await runContentWorkflowExample();
|
|
450
|
-
console.log('\n' + '='.repeat(50) + '\n');
|
|
451
|
-
await runCustomerSupportExample();
|
|
452
|
-
console.log('\n' + '='.repeat(50) + '\n');
|
|
453
|
-
await runDataProcessingExample();
|
|
454
|
-
console.log('\n=== All Examples Completed ===');
|
|
455
|
-
}
|
|
456
|
-
catch (error) {
|
|
457
|
-
console.error('Example execution failed:', error);
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
// Run examples if this file is executed directly
|
|
461
|
-
if (require.main === module) {
|
|
462
|
-
runAllWorkflowExamples().catch(console.error);
|
|
463
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview Composable Agent Pattern - Main exports
|
|
3
|
-
* @description Provides a simple, composable API for creating and managing agents
|
|
4
|
-
*
|
|
5
|
-
* @example
|
|
6
|
-
* ```typescript
|
|
7
|
-
* import { ComposableAgent, createTool, Memory, LibSQLStore, MDocument } from '@codebolt/agent/composable';
|
|
8
|
-
* import { z } from 'zod';
|
|
9
|
-
*
|
|
10
|
-
* // Create a weather tool
|
|
11
|
-
* const weatherTool = createTool({
|
|
12
|
-
* id: 'get-weather',
|
|
13
|
-
* description: 'Get current weather for a location',
|
|
14
|
-
* inputSchema: z.object({
|
|
15
|
-
* location: z.string().describe('City name'),
|
|
16
|
-
* }),
|
|
17
|
-
* outputSchema: z.object({
|
|
18
|
-
* temperature: z.number(),
|
|
19
|
-
* feelsLike: z.number(),
|
|
20
|
-
* humidity: z.number(),
|
|
21
|
-
* windSpeed: z.number(),
|
|
22
|
-
* conditions: z.string(),
|
|
23
|
-
* location: z.string(),
|
|
24
|
-
* }),
|
|
25
|
-
* execute: async ({ context }) => {
|
|
26
|
-
* return await getWeather(context.location);
|
|
27
|
-
* },
|
|
28
|
-
* });
|
|
29
|
-
*
|
|
30
|
-
* // Create memory with LibSQL storage
|
|
31
|
-
* const memory = new Memory({
|
|
32
|
-
* storage: new LibSQLStore({
|
|
33
|
-
* url: 'file:../mastra.db',
|
|
34
|
-
* }),
|
|
35
|
-
* });
|
|
36
|
-
*
|
|
37
|
-
* // Create agent
|
|
38
|
-
* const codeboltagent = new ComposableAgent({
|
|
39
|
-
* name: 'Weather Agent',
|
|
40
|
-
* instructions: `
|
|
41
|
-
* You are a helpful weather assistant that provides accurate weather information.
|
|
42
|
-
* Use the weatherTool to fetch current weather data.
|
|
43
|
-
* `,
|
|
44
|
-
* model: 'gpt-4o-mini', // References configuration in codeboltagents.yaml
|
|
45
|
-
* tools: { weatherTool },
|
|
46
|
-
* memory,
|
|
47
|
-
* });
|
|
48
|
-
*
|
|
49
|
-
* // Execute a task
|
|
50
|
-
* const result = await codeboltagent.execute('What is the weather in New York?');
|
|
51
|
-
* console.log(result.message);
|
|
52
|
-
* ```
|
|
53
|
-
*/
|
|
54
|
-
export { ComposableAgent, createAgent } from './agent';
|
|
55
|
-
export { createTool, toolToOpenAIFunction, toolsToOpenAIFunctions, executeTool, createDefaultTools, attemptCompletionTool, askFollowUpTool } from './tool';
|
|
56
|
-
export { Memory, createCodeBoltMemory, createCodeBoltAgentMemory, createCodeBoltProjectMemory, createCodeBoltDbMemory } from './memory';
|
|
57
|
-
export { CodeBoltAgentStore, CodeBoltMemoryStore, CodeBoltProjectStore, createCodeBoltStore, type CodeBoltStoreConfig } from './codebolt-storage';
|
|
58
|
-
export { MDocument } from './document';
|
|
59
|
-
export { Workflow, createWorkflow, createAgentStep, createTransformStep, createConditionalStep, createDelayStep, createStep, createSimpleStep, createAsyncStep, createValidationStep, createLoggingStep } from './workflow';
|
|
60
|
-
export { saveUserMessage, getUserMessage, getUserConfig, getMentionedMCPs, getMentionedFiles, getMentionedAgents, getRemixPrompt, getMessageText, getSimpleMessage, setSessionData, getSessionData, clearUserContext } from './user-context';
|
|
61
|
-
export type { ComposableAgent as IComposableAgent, ComposableAgentConfig, Tool, ToolConfig, Message, MessageContent, ToolCall, ExecutionResult, ExecutionContext, StreamCallback, StreamChunk, MemoryConfig, StorageProvider, LibSQLStoreConfig, DocumentConfig, ProcessedDocument, CodeBoltMessage, AgentProcessingConfig } from './types';
|
|
62
|
-
export type { WorkflowContext, WorkflowStep, WorkflowStepResult, WorkflowConfig, WorkflowResult, AgentStepConfig, ConditionalStepConfig, ParallelStepConfig, LoopStepConfig } from './workflow';
|
|
63
|
-
export { z } from 'zod';
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* @fileoverview Composable Agent Pattern - Main exports
|
|
4
|
-
* @description Provides a simple, composable API for creating and managing agents
|
|
5
|
-
*
|
|
6
|
-
* @example
|
|
7
|
-
* ```typescript
|
|
8
|
-
* import { ComposableAgent, createTool, Memory, LibSQLStore, MDocument } from '@codebolt/agent/composable';
|
|
9
|
-
* import { z } from 'zod';
|
|
10
|
-
*
|
|
11
|
-
* // Create a weather tool
|
|
12
|
-
* const weatherTool = createTool({
|
|
13
|
-
* id: 'get-weather',
|
|
14
|
-
* description: 'Get current weather for a location',
|
|
15
|
-
* inputSchema: z.object({
|
|
16
|
-
* location: z.string().describe('City name'),
|
|
17
|
-
* }),
|
|
18
|
-
* outputSchema: z.object({
|
|
19
|
-
* temperature: z.number(),
|
|
20
|
-
* feelsLike: z.number(),
|
|
21
|
-
* humidity: z.number(),
|
|
22
|
-
* windSpeed: z.number(),
|
|
23
|
-
* conditions: z.string(),
|
|
24
|
-
* location: z.string(),
|
|
25
|
-
* }),
|
|
26
|
-
* execute: async ({ context }) => {
|
|
27
|
-
* return await getWeather(context.location);
|
|
28
|
-
* },
|
|
29
|
-
* });
|
|
30
|
-
*
|
|
31
|
-
* // Create memory with LibSQL storage
|
|
32
|
-
* const memory = new Memory({
|
|
33
|
-
* storage: new LibSQLStore({
|
|
34
|
-
* url: 'file:../mastra.db',
|
|
35
|
-
* }),
|
|
36
|
-
* });
|
|
37
|
-
*
|
|
38
|
-
* // Create agent
|
|
39
|
-
* const codeboltagent = new ComposableAgent({
|
|
40
|
-
* name: 'Weather Agent',
|
|
41
|
-
* instructions: `
|
|
42
|
-
* You are a helpful weather assistant that provides accurate weather information.
|
|
43
|
-
* Use the weatherTool to fetch current weather data.
|
|
44
|
-
* `,
|
|
45
|
-
* model: 'gpt-4o-mini', // References configuration in codeboltagents.yaml
|
|
46
|
-
* tools: { weatherTool },
|
|
47
|
-
* memory,
|
|
48
|
-
* });
|
|
49
|
-
*
|
|
50
|
-
* // Execute a task
|
|
51
|
-
* const result = await codeboltagent.execute('What is the weather in New York?');
|
|
52
|
-
* console.log(result.message);
|
|
53
|
-
* ```
|
|
54
|
-
*/
|
|
55
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
56
|
-
exports.z = exports.clearUserContext = exports.getSessionData = exports.setSessionData = exports.getSimpleMessage = exports.getMessageText = exports.getRemixPrompt = exports.getMentionedAgents = exports.getMentionedFiles = exports.getMentionedMCPs = exports.getUserConfig = exports.getUserMessage = exports.saveUserMessage = exports.createLoggingStep = exports.createValidationStep = exports.createAsyncStep = exports.createSimpleStep = exports.createStep = exports.createDelayStep = exports.createConditionalStep = exports.createTransformStep = exports.createAgentStep = exports.createWorkflow = exports.Workflow = exports.MDocument = exports.createCodeBoltStore = exports.CodeBoltProjectStore = exports.CodeBoltMemoryStore = exports.CodeBoltAgentStore = exports.createCodeBoltDbMemory = exports.createCodeBoltProjectMemory = exports.createCodeBoltAgentMemory = exports.createCodeBoltMemory = exports.Memory = exports.askFollowUpTool = exports.attemptCompletionTool = exports.createDefaultTools = exports.executeTool = exports.toolsToOpenAIFunctions = exports.toolToOpenAIFunction = exports.createTool = exports.createAgent = exports.ComposableAgent = void 0;
|
|
57
|
-
// Core agent
|
|
58
|
-
var agent_1 = require("./agent");
|
|
59
|
-
Object.defineProperty(exports, "ComposableAgent", { enumerable: true, get: function () { return agent_1.ComposableAgent; } });
|
|
60
|
-
Object.defineProperty(exports, "createAgent", { enumerable: true, get: function () { return agent_1.createAgent; } });
|
|
61
|
-
// Tool system
|
|
62
|
-
var tool_1 = require("./tool");
|
|
63
|
-
Object.defineProperty(exports, "createTool", { enumerable: true, get: function () { return tool_1.createTool; } });
|
|
64
|
-
Object.defineProperty(exports, "toolToOpenAIFunction", { enumerable: true, get: function () { return tool_1.toolToOpenAIFunction; } });
|
|
65
|
-
Object.defineProperty(exports, "toolsToOpenAIFunctions", { enumerable: true, get: function () { return tool_1.toolsToOpenAIFunctions; } });
|
|
66
|
-
Object.defineProperty(exports, "executeTool", { enumerable: true, get: function () { return tool_1.executeTool; } });
|
|
67
|
-
Object.defineProperty(exports, "createDefaultTools", { enumerable: true, get: function () { return tool_1.createDefaultTools; } });
|
|
68
|
-
Object.defineProperty(exports, "attemptCompletionTool", { enumerable: true, get: function () { return tool_1.attemptCompletionTool; } });
|
|
69
|
-
Object.defineProperty(exports, "askFollowUpTool", { enumerable: true, get: function () { return tool_1.askFollowUpTool; } });
|
|
70
|
-
// Memory and storage
|
|
71
|
-
var memory_1 = require("./memory");
|
|
72
|
-
Object.defineProperty(exports, "Memory", { enumerable: true, get: function () { return memory_1.Memory; } });
|
|
73
|
-
Object.defineProperty(exports, "createCodeBoltMemory", { enumerable: true, get: function () { return memory_1.createCodeBoltMemory; } });
|
|
74
|
-
Object.defineProperty(exports, "createCodeBoltAgentMemory", { enumerable: true, get: function () { return memory_1.createCodeBoltAgentMemory; } });
|
|
75
|
-
Object.defineProperty(exports, "createCodeBoltProjectMemory", { enumerable: true, get: function () { return memory_1.createCodeBoltProjectMemory; } });
|
|
76
|
-
Object.defineProperty(exports, "createCodeBoltDbMemory", { enumerable: true, get: function () { return memory_1.createCodeBoltDbMemory; } });
|
|
77
|
-
// CodeBolt Storage
|
|
78
|
-
var codebolt_storage_1 = require("./codebolt-storage");
|
|
79
|
-
Object.defineProperty(exports, "CodeBoltAgentStore", { enumerable: true, get: function () { return codebolt_storage_1.CodeBoltAgentStore; } });
|
|
80
|
-
Object.defineProperty(exports, "CodeBoltMemoryStore", { enumerable: true, get: function () { return codebolt_storage_1.CodeBoltMemoryStore; } });
|
|
81
|
-
Object.defineProperty(exports, "CodeBoltProjectStore", { enumerable: true, get: function () { return codebolt_storage_1.CodeBoltProjectStore; } });
|
|
82
|
-
Object.defineProperty(exports, "createCodeBoltStore", { enumerable: true, get: function () { return codebolt_storage_1.createCodeBoltStore; } });
|
|
83
|
-
// Document handling
|
|
84
|
-
var document_1 = require("./document");
|
|
85
|
-
Object.defineProperty(exports, "MDocument", { enumerable: true, get: function () { return document_1.MDocument; } });
|
|
86
|
-
// Workflow system
|
|
87
|
-
var workflow_1 = require("./workflow");
|
|
88
|
-
Object.defineProperty(exports, "Workflow", { enumerable: true, get: function () { return workflow_1.Workflow; } });
|
|
89
|
-
Object.defineProperty(exports, "createWorkflow", { enumerable: true, get: function () { return workflow_1.createWorkflow; } });
|
|
90
|
-
Object.defineProperty(exports, "createAgentStep", { enumerable: true, get: function () { return workflow_1.createAgentStep; } });
|
|
91
|
-
Object.defineProperty(exports, "createTransformStep", { enumerable: true, get: function () { return workflow_1.createTransformStep; } });
|
|
92
|
-
Object.defineProperty(exports, "createConditionalStep", { enumerable: true, get: function () { return workflow_1.createConditionalStep; } });
|
|
93
|
-
Object.defineProperty(exports, "createDelayStep", { enumerable: true, get: function () { return workflow_1.createDelayStep; } });
|
|
94
|
-
Object.defineProperty(exports, "createStep", { enumerable: true, get: function () { return workflow_1.createStep; } });
|
|
95
|
-
Object.defineProperty(exports, "createSimpleStep", { enumerable: true, get: function () { return workflow_1.createSimpleStep; } });
|
|
96
|
-
Object.defineProperty(exports, "createAsyncStep", { enumerable: true, get: function () { return workflow_1.createAsyncStep; } });
|
|
97
|
-
Object.defineProperty(exports, "createValidationStep", { enumerable: true, get: function () { return workflow_1.createValidationStep; } });
|
|
98
|
-
Object.defineProperty(exports, "createLoggingStep", { enumerable: true, get: function () { return workflow_1.createLoggingStep; } });
|
|
99
|
-
// User Context Management
|
|
100
|
-
var user_context_1 = require("./user-context");
|
|
101
|
-
Object.defineProperty(exports, "saveUserMessage", { enumerable: true, get: function () { return user_context_1.saveUserMessage; } });
|
|
102
|
-
Object.defineProperty(exports, "getUserMessage", { enumerable: true, get: function () { return user_context_1.getUserMessage; } });
|
|
103
|
-
Object.defineProperty(exports, "getUserConfig", { enumerable: true, get: function () { return user_context_1.getUserConfig; } });
|
|
104
|
-
Object.defineProperty(exports, "getMentionedMCPs", { enumerable: true, get: function () { return user_context_1.getMentionedMCPs; } });
|
|
105
|
-
Object.defineProperty(exports, "getMentionedFiles", { enumerable: true, get: function () { return user_context_1.getMentionedFiles; } });
|
|
106
|
-
Object.defineProperty(exports, "getMentionedAgents", { enumerable: true, get: function () { return user_context_1.getMentionedAgents; } });
|
|
107
|
-
Object.defineProperty(exports, "getRemixPrompt", { enumerable: true, get: function () { return user_context_1.getRemixPrompt; } });
|
|
108
|
-
Object.defineProperty(exports, "getMessageText", { enumerable: true, get: function () { return user_context_1.getMessageText; } });
|
|
109
|
-
Object.defineProperty(exports, "getSimpleMessage", { enumerable: true, get: function () { return user_context_1.getSimpleMessage; } });
|
|
110
|
-
Object.defineProperty(exports, "setSessionData", { enumerable: true, get: function () { return user_context_1.setSessionData; } });
|
|
111
|
-
Object.defineProperty(exports, "getSessionData", { enumerable: true, get: function () { return user_context_1.getSessionData; } });
|
|
112
|
-
Object.defineProperty(exports, "clearUserContext", { enumerable: true, get: function () { return user_context_1.clearUserContext; } });
|
|
113
|
-
// Re-export zod for convenience
|
|
114
|
-
var zod_1 = require("zod");
|
|
115
|
-
Object.defineProperty(exports, "z", { enumerable: true, get: function () { return zod_1.z; } });
|