viagen 0.0.49 → 0.0.50
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/index.js +5 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -110,7 +110,7 @@ function registerHealthRoutes(server, env, errorRef) {
|
|
|
110
110
|
);
|
|
111
111
|
}
|
|
112
112
|
});
|
|
113
|
-
const currentVersion = true ? "0.0.
|
|
113
|
+
const currentVersion = true ? "0.0.50" : "0.0.0";
|
|
114
114
|
debug("health", `version resolved: ${currentVersion}`);
|
|
115
115
|
let versionCache = null;
|
|
116
116
|
server.middlewares.use("/via/version", (_req, res) => {
|
|
@@ -18450,9 +18450,7 @@ function createViagenTools(config2) {
|
|
|
18450
18450
|
"Update a task's status on the viagen platform. Use status 'review' after creating a PR (ready for human review) or 'completed' when the task is fully done. If no taskId is provided, updates the current task (requires VIAGEN_TASK_ID env var).",
|
|
18451
18451
|
{
|
|
18452
18452
|
taskId: external_exports.string().optional().describe("Task ID to update. Defaults to the current task from VIAGEN_TASK_ID env var."),
|
|
18453
|
-
status: external_exports.
|
|
18454
|
-
"'review' = PR created, ready for review. 'completed' = task fully done."
|
|
18455
|
-
),
|
|
18453
|
+
status: external_exports.string().optional().describe("Task status to set (e.g. 'review', 'completed'). Omit to update other fields without changing status."),
|
|
18456
18454
|
prUrl: external_exports.string().optional().describe("Full URL of the pull request, if one was created."),
|
|
18457
18455
|
result: external_exports.string().describe("Brief one-line summary of what was done."),
|
|
18458
18456
|
inputTokens: external_exports.number().optional().describe("Total input tokens used."),
|
|
@@ -18469,7 +18467,7 @@ function createViagenTools(config2) {
|
|
|
18469
18467
|
}
|
|
18470
18468
|
const callbackUrl = process.env["VIAGEN_CALLBACK_URL"];
|
|
18471
18469
|
const authToken = process.env["VIAGEN_AUTH_TOKEN"];
|
|
18472
|
-
const internalStatus = args.status === "review" ? "validating" : "completed";
|
|
18470
|
+
const internalStatus = args.status === "review" ? "validating" : args.status === "completed" ? "completed" : args.status;
|
|
18473
18471
|
const res = await fetch(callbackUrl, {
|
|
18474
18472
|
method: "POST",
|
|
18475
18473
|
headers: {
|
|
@@ -18478,7 +18476,7 @@ function createViagenTools(config2) {
|
|
|
18478
18476
|
},
|
|
18479
18477
|
body: JSON.stringify({
|
|
18480
18478
|
taskId,
|
|
18481
|
-
status: internalStatus,
|
|
18479
|
+
...internalStatus && { status: internalStatus },
|
|
18482
18480
|
...args.prUrl && { prUrl: args.prUrl },
|
|
18483
18481
|
result: args.result,
|
|
18484
18482
|
...args.inputTokens != null && { inputTokens: args.inputTokens },
|
|
@@ -18494,7 +18492,7 @@ function createViagenTools(config2) {
|
|
|
18494
18492
|
};
|
|
18495
18493
|
}
|
|
18496
18494
|
return {
|
|
18497
|
-
content: [{ type: "text", text: `Task ${taskId} status
|
|
18495
|
+
content: [{ type: "text", text: `Task ${taskId} updated.${args.status ? ` Status: '${args.status}'.` : ""}${args.prReviewStatus ? ` PR review: '${args.prReviewStatus}'.` : ""}` }]
|
|
18498
18496
|
};
|
|
18499
18497
|
}
|
|
18500
18498
|
)
|