Add set_output tool (#205)

This commit is contained in:
Mateusz Burzyński
2026-01-29 22:49:00 +00:00
committed by pullfrog[bot]
parent 2daab6fc78
commit c1f8247077
9 changed files with 116 additions and 7 deletions
+20
View File
@@ -0,0 +1,20 @@
import { type } from "arktype";
import type { ToolContext } from "./server.ts";
import { execute, tool } from "./shared.ts";
export const SetOutputParams = type({
value: type.string.describe("the output value to expose as a GitHub Action output"),
});
export function SetOutputTool(ctx: ToolContext) {
return tool({
name: "set_output",
description:
"Set the action output for consumption by subsequent workflow steps. The value will be available as the 'result' output of the action.",
parameters: SetOutputParams,
execute: execute(async (params) => {
ctx.toolState.output = params.value;
return { success: true };
}),
});
}