feat(agent): add controlled task execution
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
export const getInternalBridgeConfig = () => {
|
||||
const baseUrl =
|
||||
process.env.TJWATER_AGENT_INTERNAL_BASE_URL ?? "http://127.0.0.1:8787";
|
||||
const internalToken = (
|
||||
process.env.AGENT_INTERNAL_TOKEN ??
|
||||
process.env.TJWATER_AGENT_INTERNAL_TOKEN ??
|
||||
""
|
||||
).trim();
|
||||
|
||||
if (!internalToken) {
|
||||
throw new Error(
|
||||
"internal Agent tool bridge is not configured; set the same AGENT_INTERNAL_TOKEN on the Agent and OpenCode processes",
|
||||
);
|
||||
}
|
||||
|
||||
return { baseUrl, internalToken };
|
||||
};
|
||||
Reference in New Issue
Block a user