veryfront 0.1.570 → 0.1.572
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/esm/cli/commands/workflow/command.d.ts +5 -0
- package/esm/cli/commands/workflow/command.d.ts.map +1 -1
- package/esm/cli/commands/workflow/command.js +16 -0
- package/esm/deno.js +1 -1
- package/esm/src/agent/runtime/text-generation-runtime-message-converter.d.ts.map +1 -1
- package/esm/src/agent/runtime/text-generation-runtime-message-converter.js +7 -1
- package/esm/src/utils/version-constant.d.ts +1 -1
- package/esm/src/utils/version-constant.js +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import type { WorkflowArgs } from "./handler.js";
|
|
2
2
|
export interface WorkflowOptions extends WorkflowArgs {
|
|
3
3
|
}
|
|
4
|
+
export interface WorkflowDiscoveryError {
|
|
5
|
+
filePath: string;
|
|
6
|
+
error: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function formatWorkflowDiscoveryErrors(errors: WorkflowDiscoveryError[]): string[];
|
|
4
9
|
export declare function workflowCommand(options: WorkflowOptions): Promise<void>;
|
|
5
10
|
//# sourceMappingURL=command.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/workflow/command.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/workflow/command.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAKjD,MAAM,WAAW,eAAgB,SAAQ,YAAY;CAAG;AAExD,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,sBAAsB,EAAE,GAC/B,MAAM,EAAE,CAUV;AA8DD,wBAAsB,eAAe,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAyF7E"}
|
|
@@ -6,6 +6,16 @@ import { sanitizeJobOutputForLogging } from "../../utils/sanitize-job-output.js"
|
|
|
6
6
|
import { writeJobResultIfConfigured } from "../../utils/write-job-result.js";
|
|
7
7
|
import { getEnv } from "../../../src/platform/index.js";
|
|
8
8
|
const WORKFLOW_STATUS_POLL_INTERVAL_MS = 1_000;
|
|
9
|
+
const MAX_DISCOVERY_ERRORS_TO_PRINT = 5;
|
|
10
|
+
export function formatWorkflowDiscoveryErrors(errors) {
|
|
11
|
+
const visibleErrors = errors.slice(0, MAX_DISCOVERY_ERRORS_TO_PRINT);
|
|
12
|
+
const lines = visibleErrors.map((err) => ` - ${err.filePath}: ${err.error}`);
|
|
13
|
+
const hiddenCount = errors.length - visibleErrors.length;
|
|
14
|
+
if (hiddenCount > 0) {
|
|
15
|
+
lines.push(` - ${hiddenCount} more workflow file${hiddenCount === 1 ? "" : "s"} failed to load`);
|
|
16
|
+
}
|
|
17
|
+
return lines;
|
|
18
|
+
}
|
|
9
19
|
async function createWorkflowClient(debug) {
|
|
10
20
|
const { createWorkflowClient } = await import("../../../src/workflow/api/workflow-client.js");
|
|
11
21
|
const redisUrl = getEnv("REDIS_URL")?.trim();
|
|
@@ -91,6 +101,12 @@ export async function workflowCommand(options) {
|
|
|
91
101
|
const workflow = discovery.workflows.find((candidate) => candidate.id === workflowId);
|
|
92
102
|
if (!workflow) {
|
|
93
103
|
cliLogger.error(`Workflow "${workflowId}" not found.`);
|
|
104
|
+
if (discovery.errors.length > 0 && !options.debug) {
|
|
105
|
+
cliLogger.warn("Some workflow files could not be loaded:");
|
|
106
|
+
for (const line of formatWorkflowDiscoveryErrors(discovery.errors)) {
|
|
107
|
+
cliLogger.warn(line);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
94
110
|
if (discovery.workflows.length > 0) {
|
|
95
111
|
cliLogger.info("Available workflows:");
|
|
96
112
|
for (const candidate of discovery.workflows) {
|
package/esm/deno.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-generation-runtime-message-converter.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/runtime/text-generation-runtime-message-converter.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAGV,4BAA4B,EAI7B,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAGL,KAAK,OAAO,EAGb,MAAM,aAAa,CAAC;AA0ErB;;GAEG;AACH,wBAAgB,qCAAqC,CAAC,GAAG,EAAE,OAAO,GAAG,4BAA4B,CA2FhG;AAgBD;;GAEG;AACH,wBAAgB,sCAAsC,CACpD,QAAQ,EAAE,OAAO,EAAE,GAClB,4BAA4B,EAAE,
|
|
1
|
+
{"version":3,"file":"text-generation-runtime-message-converter.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/runtime/text-generation-runtime-message-converter.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAGV,4BAA4B,EAI7B,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAGL,KAAK,OAAO,EAGb,MAAM,aAAa,CAAC;AA0ErB;;GAEG;AACH,wBAAgB,qCAAqC,CAAC,GAAG,EAAE,OAAO,GAAG,4BAA4B,CA2FhG;AAgBD;;GAEG;AACH,wBAAgB,sCAAsC,CACpD,QAAQ,EAAE,OAAO,EAAE,GAClB,4BAA4B,EAAE,CAoBhC"}
|
|
@@ -174,7 +174,13 @@ export function convertToTextGenerationRuntimeMessages(messages) {
|
|
|
174
174
|
if (!hasProviderSendableAssistantContent(message)) {
|
|
175
175
|
continue;
|
|
176
176
|
}
|
|
177
|
-
|
|
177
|
+
const convertedMessage = convertToTextGenerationRuntimeMessage(message);
|
|
178
|
+
const previousMessage = textGenerationRuntimeMessages.at(-1);
|
|
179
|
+
if (previousMessage?.role === "tool" && convertedMessage.role === "tool") {
|
|
180
|
+
previousMessage.content.push(...convertedMessage.content);
|
|
181
|
+
continue;
|
|
182
|
+
}
|
|
183
|
+
textGenerationRuntimeMessages.push(convertedMessage);
|
|
178
184
|
}
|
|
179
185
|
return textGenerationRuntimeMessages;
|
|
180
186
|
}
|