@runeya/runeya 2.0.13 → 2.0.14

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.
@@ -408,7 +408,7 @@ function requireEnvAction(ctx, environmentId, action, serviceId) {
408
408
  });
409
409
  }
410
410
  var startedAt = Date.now();
411
- var appVersion = process.env["RUNEYA_VERSION"] ?? (true ? "2.0.11" : "dev");
411
+ var appVersion = process.env["RUNEYA_VERSION"] ?? (true ? "2.0.14" : "dev");
412
412
  var healthRouter = router({
413
413
  check: publicProcedure.meta({ openapi: { method: "GET", path: "/health", tags: ["health"], summary: "Health check" } }).output(z.object({ status: z.literal("ok"), uptime: z.number(), version: z.string() })).query(() => {
414
414
  return {
@@ -6733,6 +6733,19 @@ var chatRouter = router({
6733
6733
  delete: protectedProcedure.input(z14.object({ id: Id128Schema })).mutation(async ({ input }) => {
6734
6734
  const existing = await conversationStore.get(input.id);
6735
6735
  if (!existing) throw new TRPCError10({ code: "NOT_FOUND", message: "Conversation not found" });
6736
+ for (const agent of agentManager.listAgents()) {
6737
+ const agentId = agent.config.id;
6738
+ agentManager.agentQuery(
6739
+ agentId,
6740
+ "ai.findPtyBySession",
6741
+ { sessionId: input.id }
6742
+ ).then((pty3) => {
6743
+ if (pty3?.status === "running") {
6744
+ return agentManager.agentMutation(agentId, "ai.kill", { spawnId: pty3.spawnId });
6745
+ }
6746
+ }).catch(() => {
6747
+ });
6748
+ }
6736
6749
  await conversationStore.delete(input.id);
6737
6750
  await scenarioRunStore.deleteRunDir(input.id);
6738
6751
  imageStorageService.deleteByContextId(input.id).catch(
@@ -11989,4 +12002,4 @@ export {
11989
12002
  createLocalServer,
11990
12003
  pullEnv
11991
12004
  };
11992
- //# sourceMappingURL=dist-HGCFHXO4.js.map
12005
+ //# sourceMappingURL=dist-TI3HFRUW.js.map