feat(agent): add controlled task execution

This commit is contained in:
2026-09-24 04:19:02 +08:00
parent d018bcae67
commit b31033e9ce
48 changed files with 14498 additions and 86 deletions
+2 -4
View File
@@ -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`,
{