From 5320a6445f112b7b58e2eeebedf042b83c59e23a Mon Sep 17 00:00:00 2001 From: Taylor AI Date: Fri, 9 Jan 2026 01:28:42 +0500 Subject: [PATCH] Fixed status control --- .opencode/plugin/build.ts | 45 +++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/.opencode/plugin/build.ts b/.opencode/plugin/build.ts index 120a4f6..5e2bbf4 100644 --- a/.opencode/plugin/build.ts +++ b/.opencode/plugin/build.ts @@ -4,32 +4,31 @@ import { Axios } from "axios"; import { promises as fs } from "fs"; import { z } from "zod"; -// const { vmOrchestrationStatusUpdateUrl } = z -// .object({ -// vmOrchestrationStatusUpdateUrl: z.string(), -// }) -// .parse({ -// vmOrchestrationStatusUpdateUrl: -// process.env.TAYLORDB_VM_ORCHESTRATION_STATUS_UPDATE_URL, -// }); +const { vmOrchestrationStatusUpdateUrl } = z + .object({ + vmOrchestrationStatusUpdateUrl: z.string(), + }) + .parse({ + vmOrchestrationStatusUpdateUrl: + process.env.TAYLORDB_VM_ORCHESTRATION_STATUS_UPDATE_URL, + }); -// const axios = new Axios({ -// baseURL: vmOrchestrationStatusUpdateUrl, -// }); +const axios = new Axios({ + baseURL: vmOrchestrationStatusUpdateUrl, +}); const updateAppStatus = async (status: "Errored" | "Active" | "Pending") => { - console.log(status); - // await axios.put( - // "/", - // JSON.stringify({ - // status, - // }), - // { - // headers: { - // "Content-Type": "application/json", - // }, - // } - // ); + await axios.put( + "/", + JSON.stringify({ + status, + }), + { + headers: { + "Content-Type": "application/json", + }, + } + ); }; const sessionRetries: Record = {};