openpod

An opencode plugin that spins up a dedicated virtual machine for each session to isolate agent work.
git clone https://unitehenry.com/git/openpod.git
Log | Files | Refs | README

index.ts (432B)


      1 import type { Plugin } from "@opencode/plugin";
      2 
      3 import type { OpenpodContext } from "../context";
      4 
      5 import { wrap } from "./wrap";
      6 
      7 export async function registerShell(
      8   ctx: Plugin.Context,
      9   deps: OpenpodContext,
     10 ): Promise<void> {
     11   const { logger } = deps;
     12 
     13   logger.log("registering create.before");
     14 
     15   await ctx.shell.hook("create.before", async (event) => {
     16     event.command = wrap(deps, event.cwd, event.command);
     17   });
     18 }