mirror of
https://github.com/tinyhumansai/openhuman.git
synced 2026-07-27 21:08:00 +00:00
Add agent task orchestration (#1768)
Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai>
This commit is contained in:
co-authored by
Steven Enamakel
parent
86b57281dc
commit
f90a337bc0
@@ -144,6 +144,15 @@ export function handleIntegrations(ctx) {
|
||||
// (chat/completions is handled by routes/llm.mjs ahead of this route)
|
||||
|
||||
// ── Composio ───────────────────────────────────────────────
|
||||
if (
|
||||
method === "GET" &&
|
||||
/^\/agent-integrations\/composio\/toolkits\/?(\?.*)?$/.test(url)
|
||||
) {
|
||||
const toolkits = parseBehaviorJson("composioToolkits", ["gmail"]);
|
||||
json(res, 200, { success: true, data: { toolkits } });
|
||||
return true;
|
||||
}
|
||||
|
||||
if (
|
||||
method === "GET" &&
|
||||
/^\/agent-integrations\/composio\/connections\/?(\?.*)?$/.test(url)
|
||||
@@ -262,6 +271,31 @@ export function handleIntegrations(ctx) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (
|
||||
method === "POST" &&
|
||||
/^\/agent-integrations\/composio\/execute\/?$/.test(url)
|
||||
) {
|
||||
const action =
|
||||
typeof parsedBody?.action === "string"
|
||||
? parsedBody.action
|
||||
: typeof parsedBody?.tool === "string"
|
||||
? parsedBody.tool
|
||||
: "";
|
||||
const data =
|
||||
action === "GMAIL_FETCH_EMAILS"
|
||||
? {
|
||||
messages: [
|
||||
{
|
||||
id: "e2e-gmail-message-1",
|
||||
snippet: "Welcome to OpenHuman. No profile link is required for this run.",
|
||||
},
|
||||
],
|
||||
}
|
||||
: { ok: true };
|
||||
json(res, 200, { success: true, data: { successful: true, data, error: null } });
|
||||
return true;
|
||||
}
|
||||
|
||||
// ── Apify ──────────────────────────────────────────────────
|
||||
// Gap fill — minimal stubs for run polling.
|
||||
const apifyMatch = url.match(
|
||||
|
||||
Reference in New Issue
Block a user