@yrpri/api 9.0.98 → 9.0.99

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.
@@ -28,11 +28,11 @@ export class AgentModels {
28
28
  }
29
29
  convertToUnderscoresWithMaxLength(str) {
30
30
  const converted = str
31
- .replace(/\s+/g, '_') // Replace spaces with underscores
32
- .replace(/([A-Z])/g, '_$1') // Add underscore before capital letters
33
- .replace(/^_/, '') // Remove leading underscore
34
- .replace(/-/g, '_') // Replace hyphens with underscores
35
- .replace(/_+/g, '_') // Replace multiple underscores with single
31
+ .replace(/\s+/g, "_") // Replace spaces with underscores
32
+ .replace(/([A-Z])/g, "_$1") // Add underscore before capital letters
33
+ .replace(/^_/, "") // Remove leading underscore
34
+ .replace(/-/g, "_") // Replace hyphens with underscores
35
+ .replace(/_+/g, "_") // Replace multiple underscores with single
36
36
  .toLowerCase();
37
37
  return converted.length > 34 ? converted.slice(0, 34) : converted;
38
38
  }
@@ -76,6 +76,8 @@ export class AgentModels {
76
76
  await agentRunToUpdate.save();
77
77
  return {
78
78
  agentRun: agentRunToUpdate,
79
+ previousStep: currentStep,
80
+ currentStep: workflow.steps[currentStepIndex],
79
81
  message: "Agent workflow started successfully",
80
82
  };
81
83
  }
@@ -97,7 +99,8 @@ export class AgentModels {
97
99
  if (agentRun.run.workflow.currentStepIndex === 0) {
98
100
  return agentRun.run.workflow.steps[0];
99
101
  }
100
- if (agentRun.run.workflow.currentStepIndex >= agentRun.run.workflow.steps.length - 1) {
102
+ if (agentRun.run.workflow.currentStepIndex >=
103
+ agentRun.run.workflow.steps.length - 1) {
101
104
  return undefined;
102
105
  }
103
106
  return agentRun.run.workflow.steps[agentRun.run.workflow.currentStepIndex + 1];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yrpri/api",
3
- "version": "9.0.98",
3
+ "version": "9.0.99",
4
4
  "license": "MIT",
5
5
  "author": "Robert Bjarnason & Citizens Foundation",
6
6
  "repository": {