feat(agent): add controlled task execution
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
import { tool } from "@opencode-ai/plugin";
|
||||
|
||||
const internalBaseUrl =
|
||||
process.env.TJWATER_AGENT_INTERNAL_BASE_URL ?? "http://127.0.0.1:8787";
|
||||
const internalToken = process.env.TJWATER_AGENT_INTERNAL_TOKEN ?? "";
|
||||
import { getInternalBridgeConfig } from "../internalBridge.js";
|
||||
|
||||
export default tool({
|
||||
description:
|
||||
@@ -22,6 +19,7 @@ export default tool({
|
||||
.describe("Optional maximum number of hits to return."),
|
||||
},
|
||||
async execute(args, context) {
|
||||
const { baseUrl: internalBaseUrl, internalToken } = getInternalBridgeConfig();
|
||||
const response = await fetch(
|
||||
`${internalBaseUrl}/internal/tools/session-search`,
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user