Enforce workspace-only paths for background processes

This commit is contained in:
Shantur Rathore
2025-12-25 23:15:43 +00:00
parent 3e4d51c9f2
commit 3606d9aa50
2 changed files with 153 additions and 3 deletions

View File

@@ -1,10 +1,11 @@
import type { PluginInput } from "@opencode-ai/plugin"
import { createCodeNomadClient, getCodeNomadConfig } from "./lib/client"
import { createBackgroundProcessTools } from "./lib/background-process"
export async function CodeNomadPlugin() {
export async function CodeNomadPlugin(input: PluginInput) {
const config = getCodeNomadConfig()
const client = createCodeNomadClient(config)
const backgroundProcessTools = createBackgroundProcessTools(config)
const backgroundProcessTools = createBackgroundProcessTools(config, { baseDir: input.directory })
await client.startEvents((event) => {
if (event.type === "codenomad.ping") {