@devries-cameron20 / composio Mirror · read-only
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 21, 06:00 UTC

next
md 30 lines 1.43 KB
Rendered Raw
1 # Tool Router Proxy Execute Option E2E Test
2
3 End-to-end test for the `proxyExecute` session option on `sessions.create()` and `session.update()`.
4
5 ## Prerequisites
6
7 - Docker (for running tests in containers)
8 - `COMPOSIO_API_KEY` environment variable (any Composio project works)
9 - `COMPOSIO_BASE_URL` (optional) to target a non-production backend
10
11 ## Running
12
13 ```bash
14 # From repo root
15 COMPOSIO_API_KEY=your_key pnpm test:e2e:node --filter=@e2e-tests/node-tool-router-proxy-execute
16
17 # Or from this directory
18 COMPOSIO_API_KEY=your_key bun test e2e.test.ts
19 ```
20
21 ## What it tests
22
23 Unit tests mock the transport, so they cannot tell whether the API accepts the `proxy_execute` block, stores it, or lists the `COMPOSIO_PROXY_EXECUTE` meta tool. This suite sends the real requests.
24
25 1. **Create on** – `sessions.create(userId, { proxyExecute: true })` stores `{ enable: true }` and `session.tools()` lists `COMPOSIO_PROXY_EXECUTE`
26 2. **Update off** – `session.update({ proxyExecute: false })` stores `{ enable: false }` and the tool is no longer listed
27 3. **Update block, then remove** – `session.update({ proxyExecute: { enable: true } })` stores the block; `session.update({ proxyExecute: null })` removes it
28 4. **Default** – `sessions.create(userId)` leaves `proxy_execute` unset and does not list the tool
29 5. **Conflict** – `proxyExecute: false` with `sandbox: { enableProxyExecution: true }` is rejected at creation
30 6. **Cleanup** – Delete the sessions