Update
This commit is contained in:
@@ -18,6 +18,8 @@ export interface MainResult {
|
|||||||
error?: string | undefined;
|
error?: string | undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type PromptJSON = {};
|
||||||
|
|
||||||
export async function main(inputs: Inputs): Promise<MainResult> {
|
export async function main(inputs: Inputs): Promise<MainResult> {
|
||||||
try {
|
try {
|
||||||
log.info("Starting agent run...");
|
log.info("Starting agent run...");
|
||||||
@@ -36,6 +38,10 @@ export async function main(inputs: Inputs): Promise<MainResult> {
|
|||||||
log.info("Running Claude Agent SDK...");
|
log.info("Running Claude Agent SDK...");
|
||||||
log.box(inputs.prompt, { title: "Prompt" });
|
log.box(inputs.prompt, { title: "Prompt" });
|
||||||
|
|
||||||
|
// TODO: check if `inputs.prompts` is JSON
|
||||||
|
// if yes, check if it's a webhook payload or toJSON(github.event)
|
||||||
|
// for webhook payloads, check the specified `agent` field
|
||||||
|
|
||||||
const result = await claude.run({
|
const result = await claude.run({
|
||||||
prompt: inputs.prompt,
|
prompt: inputs.prompt,
|
||||||
mcpServers,
|
mcpServers,
|
||||||
|
|||||||
Reference in New Issue
Block a user