Skip to content

Commit deb6cf1

Browse files
committed
feat: Rename error response to workflowErrorResponse and update related prompts
1 parent 2d0fc7a commit deb6cf1

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

packages/core/deno.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mcpc/core",
3-
"version": "0.1.1-beta.5",
3+
"version": "0.1.1-beta.6",
44
"tasks": {
55
"server:compile": "echo \"no need to compile\"",
66
"test": "deno test --allow-env --allow-read tests/",

packages/core/src/executors/sampling/workflow-sampling-executor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export class WorkflowSamplingExecutor extends BaseSamplingExecutor {
5454
content: [
5555
{
5656
type: "text",
57-
text: CompiledPrompts.errorResponse({
57+
text: CompiledPrompts.workflowErrorResponse({
5858
errorMessage: validationResult.error || "Validation failed",
5959
}),
6060
},

packages/core/src/executors/workflow/workflow-executor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ export class WorkflowExecutor {
159159
content: [
160160
{
161161
type: "text",
162-
text: CompiledPrompts.errorResponse({
162+
text: CompiledPrompts.workflowErrorResponse({
163163
errorMessage: validationResult.error ||
164164
"Arguments validation failed",
165165
}),

packages/core/src/prompts/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,9 @@ Choose the next action that best advances toward completing the user's request.`
304304
/**
305305
* Error response template
306306
*/
307-
ERROR_RESPONSE: `Action/Function argument validation failed: {errorMessage}`,
307+
ERROR_RESPONSE: `Action argument validation failed: {errorMessage}`,
308+
WORKFLOW_ERROR_RESPONSE: `Action argument validation failed: {errorMessage}
309+
Set \`proceed: false\` to retry the current step.`,
308310

309311
/**
310312
* Completion message
@@ -364,6 +366,7 @@ export const CompiledPrompts = {
364366
actionSuccess: p(ResponseTemplates.ACTION_SUCCESS),
365367
planningPrompt: p(ResponseTemplates.PLANNING_PROMPT),
366368
errorResponse: p(ResponseTemplates.ERROR_RESPONSE),
369+
workflowErrorResponse: p(ResponseTemplates.ERROR_RESPONSE),
367370
securityPassed: p(ResponseTemplates.SECURITY_VALIDATION.PASSED),
368371
securityFailed: p(ResponseTemplates.SECURITY_VALIDATION.FAILED),
369372
auditLog: p(ResponseTemplates.AUDIT_LOG),

0 commit comments

Comments
 (0)