@devries-cameron20 / composio-1 / commits / 8c0f80e7e
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.

docs: update toolkits, API spec, and meta tools data (#5073)

## Summary Automated sync of backend data into the docs site. - Trigger: `schedule` - Dispatch action: `n/a` - Source commit: `n/a` ## What changed - **Toolkit catalog** (`docs/public/data/toolkits.json`, `toolkits-list.json`) — refreshed list of available toolkits, auth schemes, and tools from the backend API - **OpenAPI specs** (`docs/public/openapi.json`, `docs/public/openapi-v3.json`, `docs/public/openapi-webhooks.json`) — latest v3.1 and v3.0 API specifications plus the webhook-events spec, fetched from production - **API reference pages** (`docs/content/reference/api-reference/`, `docs/content/reference/v3/api-reference/`) — regenerated index pages for both API versions - **Meta tools reference** (`docs/public/data/meta-tools.json`, `docs/content/toolkits/meta-tools/*.mdx`) — updated meta tool schemas and reference docs Co-authored-by: Sushmithamallesh <19796925+Sushmithamallesh@users.noreply.github.com>

sdkrelease[bot] committed Oct 23, 2026 at 13:15 UTC 8c0f80e7e73ff64bddc4b726f843e65aa521be08
4 files changed +3054 -1070
docs/public/data/toolkits-list.json
-8
@@ -127,14 +127,6 @@
127 "toolCount": 28,
128 "triggerCount": 6
129 },
130 - {
131 - "slug": "codeinterpreter",
132 - "name": "Code Interpreter",
133 - "logo": "https://logos.composio.dev/api/codeinterpreter",
134 - "category": "developer tools",
135 - "toolCount": 5,
136 - "triggerCount": 0
137 - },
130 {
131 "slug": "serpapi",
132 "name": "SerpApi",
docs/public/data/toolkits.json
+8 -58
@@ -13903,63 +13903,6 @@
13903 }
13904 ]
13905 },
13906 - {
13907 - "slug": "codeinterpreter",
13908 - "name": "Code Interpreter",
13909 - "logo": "https://logos.composio.dev/api/codeinterpreter",
13910 - "description": "CodeInterpreter extends Python-based coding environments with integrated data analysis, enabling developers to run scripts, visualize results, and prototype solutions inside supported platforms",
13911 - "category": "developer tools",
13912 - "authSchemes": [
13913 - "NO_AUTH"
13914 - ],
13915 - "toolCount": 5,
13916 - "triggerCount": 0,
13917 - "version": "20260925_00",
13918 - "tools": [
13919 - {
13920 - "slug": "CODEINTERPRETER_CREATE_SANDBOX",
13921 - "name": "Create Sandbox",
13922 - "description": "Create a sandbox to execute python code in a Jupyter notebook cell. This is useful for agents to communicate, execute code, see output, read files, write files, etc. It's like you own personal computer, but in the cloud. Use /home/user folder to write/read files."
13923 - },
13924 - {
13925 - "slug": "CODEINTERPRETER_EXECUTE_CODE",
13926 - "name": "Execute Code",
13927 - "description": "Execute python code in a sandbox and return any result, stdout, stderr, and error. Use /home/user folder to write/read files. Try to not use plt.show() as the code is executed remotely. Use files for image/chart output instead."
13928 - },
13929 - {
13930 - "slug": "CODEINTERPRETER_GET_FILE_CMD",
13931 - "name": "Get File",
13932 - "description": "Get a file from the sandbox and returns the file. The files should be read from /home/user folder."
13933 - },
13934 - {
13935 - "slug": "CODEINTERPRETER_RUN_TERMINAL_CMD",
13936 - "name": "Run Terminal Command",
13937 - "description": "Run a command in the terminal and returns the stdout, stderr, and error code. Use /home/user folder to write/read files."
13938 - },
13939 - {
13940 - "slug": "CODEINTERPRETER_UPLOAD_FILE_CMD",
13941 - "name": "Upload File",
13942 - "description": "Upload a file to the sandbox environment. The files should be uploaded to the /home/user folder."
13943 - }
13944 - ],
13945 - "triggers": [],
13946 - "authConfigDetails": [
13947 - {
13948 - "mode": "NO_AUTH",
13949 - "name": "CodeInterpreter",
13950 - "fields": {
13951 - "auth_config_creation": {
13952 - "required": [],
13953 - "optional": []
13954 - },
13955 - "connected_account_initiation": {
13956 - "required": [],
13957 - "optional": []
13958 - }
13959 - }
13960 - }
13961 - ]
13962 - },
13906 {
13907 "slug": "serpapi",
13908 "name": "SerpApi",
@@ -181372,7 +181315,14 @@
181315 {
181316 "slug": "CONTEXT_DEV_SEARCH_NEWS",
181317 "name": "Search News",
181375 - "description": "Search current and historical news with a natural-language query or one company identified by name, domain, ticker, or ISIN. Returns one cursor-controlled page."
181318 + "description": "Search current and historical news with a natural-language query or one company identified by name, domain, ticker, or ISIN. Returns one cursor-controlled page.",
181319 + "instant": {
181320 + "supported": true,
181321 + "price": {
181322 + "description": "From $0.002 per news search; each 10 results uses one credit",
181323 + "discount": "80"
181324 + }
181325 + }
181326 }
181327 ],
181328 "triggers": [],
docs/public/openapi-v3.json
+1161 -347
@@ -1492,216 +1492,6 @@
1492 "deprecated"
1493 ]
1494 },
1495 - "SessionHooks": {
1496 - "type": "array",
1497 - "items": {
1498 - "oneOf": [
1499 - {
1500 - "type": "object",
1501 - "properties": {
1502 - "type": {
1503 - "type": "string",
1504 - "enum": [
1505 - "before_execute"
1506 - ]
1507 - },
1508 - "id": {
1509 - "type": "string",
1510 - "pattern": "^[a-z0-9_-]{1,64}$",
1511 - "description": "Unique within the session. Shows up in results and logs."
1512 - },
1513 - "name": {
1514 - "type": "string",
1515 - "minLength": 1,
1516 - "maxLength": 120,
1517 - "description": "A readable name. The agent sees it when this hook blocks a call."
1518 - },
1519 - "applies_to": {
1520 - "anyOf": [
1521 - {
1522 - "type": "string",
1523 - "enum": [
1524 - "all"
1525 - ]
1526 - },
1527 - {
1528 - "type": "object",
1529 - "properties": {
1530 - "toolkits": {
1531 - "type": "array",
1532 - "items": {
1533 - "type": "string",
1534 - "minLength": 1
1535 - },
1536 - "minItems": 1,
1537 - "description": "Toolkit slugs"
1538 - }
1539 - },
1540 - "required": [
1541 - "toolkits"
1542 - ],
1543 - "additionalProperties": false
1544 - }
1545 - ],
1546 - "description": "Which tools the hook covers: \"all\" for all of them, or only the listed toolkits."
1547 - },
1548 - "handler": {
1549 - "type": "object",
1550 - "properties": {
1551 - "type": {
1552 - "type": "string",
1553 - "enum": [
1554 - "condition_check"
1555 - ]
1556 - },
1557 - "condition": {
1558 - "type": "string",
1559 - "minLength": 1,
1560 - "maxLength": 2000,
1561 - "description": "What to block, written as a plain sentence. For example: \"Sending email to anyone outside example.org\"."
1562 - },
1563 - "action": {
1564 - "type": "string",
1565 - "enum": [
1566 - "block"
1567 - ]
1568 - }
1569 - },
1570 - "required": [
1571 - "type",
1572 - "condition",
1573 - "action"
1574 - ],
1575 - "additionalProperties": false
1576 - }
1577 - },
1578 - "required": [
1579 - "type",
1580 - "id",
1581 - "applies_to",
1582 - "handler"
1583 - ],
1584 - "additionalProperties": false
1585 - },
1586 - {
1587 - "type": "object",
1588 - "properties": {
1589 - "type": {
1590 - "type": "string",
1591 - "enum": [
1592 - "after_execute"
1593 - ]
1594 - },
1595 - "id": {
1596 - "type": "string",
1597 - "pattern": "^[a-z0-9_-]{1,64}$",
1598 - "description": "Unique within the session. Shows up in results and logs."
1599 - },
1600 - "name": {
1601 - "type": "string",
1602 - "minLength": 1,
1603 - "maxLength": 120,
1604 - "description": "A readable name. The agent sees it when this hook blocks a call."
1605 - },
1606 - "applies_to": {
1607 - "anyOf": [
1608 - {
1609 - "type": "string",
1610 - "enum": [
1611 - "all"
1612 - ]
1613 - },
1614 - {
1615 - "type": "object",
1616 - "properties": {
1617 - "toolkits": {
1618 - "type": "array",
1619 - "items": {
1620 - "type": "string",
1621 - "minLength": 1
1622 - },
1623 - "minItems": 1,
1624 - "description": "Toolkit slugs"
1625 - }
1626 - },
1627 - "required": [
1628 - "toolkits"
1629 - ],
1630 - "additionalProperties": false
1631 - }
1632 - ],
1633 - "description": "Which tools the hook covers: \"all\" for all of them, or only the listed toolkits."
1634 - },
1635 - "handler": {
1636 - "oneOf": [
1637 - {
1638 - "type": "object",
1639 - "properties": {
1640 - "type": {
1641 - "type": "string",
1642 - "enum": [
1643 - "condition_check"
1644 - ]
1645 - },
1646 - "condition": {
1647 - "type": "string",
1648 - "minLength": 1,
1649 - "maxLength": 2000,
1650 - "description": "What to block, written as a plain sentence. For example: \"Sending email to anyone outside example.org\"."
1651 - },
1652 - "action": {
1653 - "type": "string",
1654 - "enum": [
1655 - "block"
1656 - ]
1657 - }
1658 - },
1659 - "required": [
1660 - "type",
1661 - "condition",
1662 - "action"
1663 - ],
1664 - "additionalProperties": false
1665 - },
1666 - {
1667 - "type": "object",
1668 - "properties": {
1669 - "type": {
1670 - "type": "string",
1671 - "enum": [
1672 - "prompt_injection_check"
1673 - ]
1674 - },
1675 - "action": {
1676 - "type": "string",
1677 - "enum": [
1678 - "block"
1679 - ]
1680 - }
1681 - },
1682 - "required": [
1683 - "type",
1684 - "action"
1685 - ],
1686 - "additionalProperties": false,
1687 - "description": "Blocks a tool response that tries to manipulate the agent: override its instructions, change its role, or make it take actions the user didn't ask for."
1688 - }
1689 - ]
1690 - }
1691 - },
1692 - "required": [
1693 - "type",
1694 - "id",
1695 - "applies_to",
1696 - "handler"
1697 - ],
1698 - "additionalProperties": false
1699 - }
1700 - ]
1701 - },
1702 - "maxItems": 20,
1703 - "description": "Hooks that run on this session's tool calls."
1704 - },
1495 "HookResult": {
1496 "oneOf": [
1497 {
@@ -7273,6 +7063,10 @@
7063 "additionalProperties": {},
7064 "description": "Link-auth theme for the hosted connect page. Opaque to the API; the dashboard owns the token vocabulary and all value validation."
7065 },
7066 + "enable_instant": {
7067 + "type": "boolean",
7068 + "description": "Enable Instant Toolkits for this project."
7069 + },
7070 "zdr_enabled": {
7071 "type": "boolean",
7072 "description": "Enable Zero Data Retention for the new project. Hobby cannot enable it. Enterprise defaults to enabled; other paid plans default to disabled. An explicit value overrides the default."
@@ -18967,130 +18761,330 @@
18761 "description": "Preload configuration for Composio tools. Controls which tools appear in `session.tools` and the MCP server tool list so the agent can call them directly without going through search first. Custom tools use `preload` on the custom tool/toolkit definition instead. Not supported when multi-account is enabled. Each preloaded tool adds to the agent context window, so keep the list at or under ~20 tools."
18762 },
18763 "hooks": {
18970 - "allOf": [
18971 - {
18972 - "$ref": "#/components/schemas/SessionHooks"
18973 - },
18974 - {
18975 - "description": "Hooks that run on this session's tool calls. A hook can block a call before it runs, or block its result before the agent sees it."
18976 - }
18977 - ]
18978 - }
18979 - },
18980 - "required": [
18981 - "user_id"
18982 - ]
18983 - },
18984 - "examples": {
18985 - "Session with all toolkits": {
18986 - "value": {
18987 - "user_id": "user_123456789"
18988 - }
18989 - },
18990 - "Session with only specific toolkits": {
18991 - "value": {
18992 - "user_id": "user_123456789",
18993 - "toolkits": {
18994 - "enable": [
18995 - "gmail",
18996 - "slack"
18997 - ]
18998 - }
18999 - }
19000 - },
19001 - "Session with only specific toolkits disabled": {
19002 - "value": {
19003 - "user_id": "user_123456789",
19004 - "toolkits": {
19005 - "disable": [
19006 - "gmail",
19007 - "slack"
19008 - ]
19009 - }
19010 - }
19011 - },
19012 - "Session with connection manager enabled": {
19013 - "value": {
19014 - "user_id": "user_123456789",
19015 - "manage_connections": {
19016 - "enable": true
19017 - }
19018 - }
19019 - },
19020 - "Session with connection manager and specific toolkits": {
19021 - "value": {
19022 - "user_id": "user_123456789",
19023 - "toolkits": {
19024 - "enable": [
19025 - "gmail",
19026 - "slack"
19027 - ]
19028 - },
19029 - "manage_connections": {
19030 - "enable": true
19031 - }
19032 - }
19033 - },
19034 - "Session with custom callback URL": {
19035 - "value": {
19036 - "user_id": "user_123456789",
19037 - "toolkits": {
19038 - "enable": [
19039 - "github",
19040 - "slack"
19041 - ]
19042 - },
19043 - "manage_connections": {
19044 - "enable": true,
19045 - "callback_url": "https://your-app.com/auth/callback"
19046 - }
19047 - }
19048 - },
19049 - "Session with workbench configuration": {
19050 - "value": {
19051 - "user_id": "user_123456789",
19052 - "toolkits": {
19053 - "enable": [
19054 - "gmail"
19055 - ]
19056 - },
19057 - "workbench": {
19058 - "enable_proxy_execution": true,
19059 - "auto_offload_threshold": 10000
19060 - }
19061 - }
19062 - },
19063 - "Session with global tags filter": {
19064 - "value": {
19065 - "user_id": "user_123456789",
19066 - "toolkits": {
19067 - "enable": [
19068 - "gmail",
19069 - "slack"
19070 - ]
19071 - },
19072 - "tags": [
19073 - "readOnlyHint",
19074 - "idempotentHint"
19075 - ]
19076 - }
19077 - },
19078 - "Session with auth config overrides": {
19079 - "value": {
19080 - "user_id": "user_123456789",
19081 - "toolkits": {
19082 - "enable": [
19083 - "gmail",
19084 - "slack"
19085 - ]
19086 - },
19087 - "auth_configs": {
19088 - "gmail": "ac_1a2b3c4d5e6f",
19089 - "slack": "ac_7g8h9i0j1k2l"
19090 - }
19091 - }
19092 - },
19093 - "Session with connected account overrides": {
18764 + "type": "array",
18765 + "items": {
18766 + "oneOf": [
18767 + {
18768 + "type": "object",
18769 + "properties": {
18770 + "type": {
18771 + "type": "string",
18772 + "enum": [
18773 + "before_execute"
18774 + ]
18775 + },
18776 + "id": {
18777 + "type": "string",
18778 + "pattern": "^[a-z0-9_-]{1,64}$",
18779 + "description": "Unique within the session. Shows up in results and logs."
18780 + },
18781 + "name": {
18782 + "type": "string",
18783 + "minLength": 1,
18784 + "maxLength": 120,
18785 + "description": "A readable name. The agent sees it when this hook blocks a call."
18786 + },
18787 + "applies_to": {
18788 + "anyOf": [
18789 + {
18790 + "type": "string",
18791 + "enum": [
18792 + "all"
18793 + ]
18794 + },
18795 + {
18796 + "type": "object",
18797 + "properties": {
18798 + "toolkits": {
18799 + "type": "array",
18800 + "items": {
18801 + "type": "string",
18802 + "minLength": 1
18803 + },
18804 + "minItems": 1,
18805 + "description": "Toolkit slugs"
18806 + }
18807 + },
18808 + "required": [
18809 + "toolkits"
18810 + ],
18811 + "additionalProperties": false
18812 + }
18813 + ],
18814 + "description": "Which tools the hook covers: \"all\" for all of them, or only the listed toolkits."
18815 + },
18816 + "handler": {
18817 + "type": "object",
18818 + "properties": {
18819 + "type": {
18820 + "type": "string",
18821 + "enum": [
18822 + "condition_check"
18823 + ]
18824 + },
18825 + "condition": {
18826 + "type": "string",
18827 + "minLength": 1,
18828 + "maxLength": 2000,
18829 + "description": "What to block, written as a plain sentence. For example: \"Sending email to anyone outside example.org\"."
18830 + },
18831 + "action": {
18832 + "type": "string",
18833 + "enum": [
18834 + "block"
18835 + ]
18836 + }
18837 + },
18838 + "required": [
18839 + "type",
18840 + "condition",
18841 + "action"
18842 + ],
18843 + "additionalProperties": false
18844 + }
18845 + },
18846 + "required": [
18847 + "type",
18848 + "id",
18849 + "applies_to",
18850 + "handler"
18851 + ],
18852 + "additionalProperties": false
18853 + },
18854 + {
18855 + "type": "object",
18856 + "properties": {
18857 + "type": {
18858 + "type": "string",
18859 + "enum": [
18860 + "after_execute"
18861 + ]
18862 + },
18863 + "id": {
18864 + "type": "string",
18865 + "pattern": "^[a-z0-9_-]{1,64}$",
18866 + "description": "Unique within the session. Shows up in results and logs."
18867 + },
18868 + "name": {
18869 + "type": "string",
18870 + "minLength": 1,
18871 + "maxLength": 120,
18872 + "description": "A readable name. The agent sees it when this hook blocks a call."
18873 + },
18874 + "applies_to": {
18875 + "anyOf": [
18876 + {
18877 + "type": "string",
18878 + "enum": [
18879 + "all"
18880 + ]
18881 + },
18882 + {
18883 + "type": "object",
18884 + "properties": {
18885 + "toolkits": {
18886 + "type": "array",
18887 + "items": {
18888 + "type": "string",
18889 + "minLength": 1
18890 + },
18891 + "minItems": 1,
18892 + "description": "Toolkit slugs"
18893 + }
18894 + },
18895 + "required": [
18896 + "toolkits"
18897 + ],
18898 + "additionalProperties": false
18899 + }
18900 + ],
18901 + "description": "Which tools the hook covers: \"all\" for all of them, or only the listed toolkits."
18902 + },
18903 + "handler": {
18904 + "oneOf": [
18905 + {
18906 + "type": "object",
18907 + "properties": {
18908 + "type": {
18909 + "type": "string",
18910 + "enum": [
18911 + "condition_check"
18912 + ]
18913 + },
18914 + "condition": {
18915 + "type": "string",
18916 + "minLength": 1,
18917 + "maxLength": 2000,
18918 + "description": "What to block, written as a plain sentence. For example: \"Sending email to anyone outside example.org\"."
18919 + },
18920 + "action": {
18921 + "type": "string",
18922 + "enum": [
18923 + "block"
18924 + ]
18925 + }
18926 + },
18927 + "required": [
18928 + "type",
18929 + "condition",
18930 + "action"
18931 + ],
18932 + "additionalProperties": false
18933 + },
18934 + {
18935 + "type": "object",
18936 + "properties": {
18937 + "type": {
18938 + "type": "string",
18939 + "enum": [
18940 + "prompt_injection_check"
18941 + ]
18942 + },
18943 + "action": {
18944 + "type": "string",
18945 + "enum": [
18946 + "block"
18947 + ]
18948 + }
18949 + },
18950 + "required": [
18951 + "type",
18952 + "action"
18953 + ],
18954 + "additionalProperties": false,
18955 + "description": "Blocks a tool response that tries to manipulate the agent: override its instructions, change its role, or make it take actions the user didn't ask for."
18956 + }
18957 + ]
18958 + }
18959 + },
18960 + "required": [
18961 + "type",
18962 + "id",
18963 + "applies_to",
18964 + "handler"
18965 + ],
18966 + "additionalProperties": false
18967 + }
18968 + ]
18969 + },
18970 + "maxItems": 20,
18971 + "description": "Hooks that run on this session's tool calls. A hook can block a call before it runs, or block its result before the agent sees it."
18972 + }
18973 + },
18974 + "required": [
18975 + "user_id"
18976 + ]
18977 + },
18978 + "examples": {
18979 + "Session with all toolkits": {
18980 + "value": {
18981 + "user_id": "user_123456789"
18982 + }
18983 + },
18984 + "Session with only specific toolkits": {
18985 + "value": {
18986 + "user_id": "user_123456789",
18987 + "toolkits": {
18988 + "enable": [
18989 + "gmail",
18990 + "slack"
18991 + ]
18992 + }
18993 + }
18994 + },
18995 + "Session with only specific toolkits disabled": {
18996 + "value": {
18997 + "user_id": "user_123456789",
18998 + "toolkits": {
18999 + "disable": [
19000 + "gmail",
19001 + "slack"
19002 + ]
19003 + }
19004 + }
19005 + },
19006 + "Session with connection manager enabled": {
19007 + "value": {
19008 + "user_id": "user_123456789",
19009 + "manage_connections": {
19010 + "enable": true
19011 + }
19012 + }
19013 + },
19014 + "Session with connection manager and specific toolkits": {
19015 + "value": {
19016 + "user_id": "user_123456789",
19017 + "toolkits": {
19018 + "enable": [
19019 + "gmail",
19020 + "slack"
19021 + ]
19022 + },
19023 + "manage_connections": {
19024 + "enable": true
19025 + }
19026 + }
19027 + },
19028 + "Session with custom callback URL": {
19029 + "value": {
19030 + "user_id": "user_123456789",
19031 + "toolkits": {
19032 + "enable": [
19033 + "github",
19034 + "slack"
19035 + ]
19036 + },
19037 + "manage_connections": {
19038 + "enable": true,
19039 + "callback_url": "https://your-app.com/auth/callback"
19040 + }
19041 + }
19042 + },
19043 + "Session with workbench configuration": {
19044 + "value": {
19045 + "user_id": "user_123456789",
19046 + "toolkits": {
19047 + "enable": [
19048 + "gmail"
19049 + ]
19050 + },
19051 + "workbench": {
19052 + "enable_proxy_execution": true,
19053 + "auto_offload_threshold": 10000
19054 + }
19055 + }
19056 + },
19057 + "Session with global tags filter": {
19058 + "value": {
19059 + "user_id": "user_123456789",
19060 + "toolkits": {
19061 + "enable": [
19062 + "gmail",
19063 + "slack"
19064 + ]
19065 + },
19066 + "tags": [
19067 + "readOnlyHint",
19068 + "idempotentHint"
19069 + ]
19070 + }
19071 + },
19072 + "Session with auth config overrides": {
19073 + "value": {
19074 + "user_id": "user_123456789",
19075 + "toolkits": {
19076 + "enable": [
19077 + "gmail",
19078 + "slack"
19079 + ]
19080 + },
19081 + "auth_configs": {
19082 + "gmail": "ac_1a2b3c4d5e6f",
19083 + "slack": "ac_7g8h9i0j1k2l"
19084 + }
19085 + }
19086 + },
19087 + "Session with connected account overrides": {
19088 "value": {
19089 "user_id": "user_123456789",
19090 "toolkits": {
@@ -19707,7 +19701,214 @@
19701 "description": "Proxy execute configuration for this session. Omitted when not set."
19702 },
19703 "hooks": {
19710 - "$ref": "#/components/schemas/SessionHooks"
19704 + "type": "array",
19705 + "items": {
19706 + "oneOf": [
19707 + {
19708 + "type": "object",
19709 + "properties": {
19710 + "type": {
19711 + "type": "string",
19712 + "enum": [
19713 + "before_execute"
19714 + ]
19715 + },
19716 + "id": {
19717 + "type": "string",
19718 + "pattern": "^[a-z0-9_-]{1,64}$",
19719 + "description": "Unique within the session. Shows up in results and logs."
19720 + },
19721 + "name": {
19722 + "type": "string",
19723 + "minLength": 1,
19724 + "maxLength": 120,
19725 + "description": "A readable name. The agent sees it when this hook blocks a call."
19726 + },
19727 + "applies_to": {
19728 + "anyOf": [
19729 + {
19730 + "type": "string",
19731 + "enum": [
19732 + "all"
19733 + ]
19734 + },
19735 + {
19736 + "type": "object",
19737 + "properties": {
19738 + "toolkits": {
19739 + "type": "array",
19740 + "items": {
19741 + "type": "string",
19742 + "minLength": 1
19743 + },
19744 + "minItems": 1,
19745 + "description": "Toolkit slugs"
19746 + }
19747 + },
19748 + "required": [
19749 + "toolkits"
19750 + ],
19751 + "additionalProperties": false
19752 + }
19753 + ],
19754 + "description": "Which tools the hook covers: \"all\" for all of them, or only the listed toolkits."
19755 + },
19756 + "handler": {
19757 + "type": "object",
19758 + "properties": {
19759 + "type": {
19760 + "type": "string",
19761 + "enum": [
19762 + "condition_check"
19763 + ]
19764 + },
19765 + "condition": {
19766 + "type": "string",
19767 + "minLength": 1,
19768 + "maxLength": 2000,
19769 + "description": "What to block, written as a plain sentence. For example: \"Sending email to anyone outside example.org\"."
19770 + },
19771 + "action": {
19772 + "type": "string",
19773 + "enum": [
19774 + "block"
19775 + ]
19776 + }
19777 + },
19778 + "required": [
19779 + "type",
19780 + "condition",
19781 + "action"
19782 + ],
19783 + "additionalProperties": false
19784 + }
19785 + },
19786 + "required": [
19787 + "type",
19788 + "id",
19789 + "applies_to",
19790 + "handler"
19791 + ],
19792 + "additionalProperties": false
19793 + },
19794 + {
19795 + "type": "object",
19796 + "properties": {
19797 + "type": {
19798 + "type": "string",
19799 + "enum": [
19800 + "after_execute"
19801 + ]
19802 + },
19803 + "id": {
19804 + "type": "string",
19805 + "pattern": "^[a-z0-9_-]{1,64}$",
19806 + "description": "Unique within the session. Shows up in results and logs."
19807 + },
19808 + "name": {
19809 + "type": "string",
19810 + "minLength": 1,
19811 + "maxLength": 120,
19812 + "description": "A readable name. The agent sees it when this hook blocks a call."
19813 + },
19814 + "applies_to": {
19815 + "anyOf": [
19816 + {
19817 + "type": "string",
19818 + "enum": [
19819 + "all"
19820 + ]
19821 + },
19822 + {
19823 + "type": "object",
19824 + "properties": {
19825 + "toolkits": {
19826 + "type": "array",
19827 + "items": {
19828 + "type": "string",
19829 + "minLength": 1
19830 + },
19831 + "minItems": 1,
19832 + "description": "Toolkit slugs"
19833 + }
19834 + },
19835 + "required": [
19836 + "toolkits"
19837 + ],
19838 + "additionalProperties": false
19839 + }
19840 + ],
19841 + "description": "Which tools the hook covers: \"all\" for all of them, or only the listed toolkits."
19842 + },
19843 + "handler": {
19844 + "oneOf": [
19845 + {
19846 + "type": "object",
19847 + "properties": {
19848 + "type": {
19849 + "type": "string",
19850 + "enum": [
19851 + "condition_check"
19852 + ]
19853 + },
19854 + "condition": {
19855 + "type": "string",
19856 + "minLength": 1,
19857 + "maxLength": 2000,
19858 + "description": "What to block, written as a plain sentence. For example: \"Sending email to anyone outside example.org\"."
19859 + },
19860 + "action": {
19861 + "type": "string",
19862 + "enum": [
19863 + "block"
19864 + ]
19865 + }
19866 + },
19867 + "required": [
19868 + "type",
19869 + "condition",
19870 + "action"
19871 + ],
19872 + "additionalProperties": false
19873 + },
19874 + {
19875 + "type": "object",
19876 + "properties": {
19877 + "type": {
19878 + "type": "string",
19879 + "enum": [
19880 + "prompt_injection_check"
19881 + ]
19882 + },
19883 + "action": {
19884 + "type": "string",
19885 + "enum": [
19886 + "block"
19887 + ]
19888 + }
19889 + },
19890 + "required": [
19891 + "type",
19892 + "action"
19893 + ],
19894 + "additionalProperties": false,
19895 + "description": "Blocks a tool response that tries to manipulate the agent: override its instructions, change its role, or make it take actions the user didn't ask for."
19896 + }
19897 + ]
19898 + }
19899 + },
19900 + "required": [
19901 + "type",
19902 + "id",
19903 + "applies_to",
19904 + "handler"
19905 + ],
19906 + "additionalProperties": false
19907 + }
19908 + ]
19909 + },
19910 + "maxItems": 20,
19911 + "description": "Hooks that run on this session's tool calls."
19912 },
19913 "preload": {
19914 "type": "object",
@@ -21048,7 +21249,214 @@
21249 "description": "Proxy execute configuration for this session. Omitted when not set."
21250 },
21251 "hooks": {
21051 - "$ref": "#/components/schemas/SessionHooks"
21252 + "type": "array",
21253 + "items": {
21254 + "oneOf": [
21255 + {
21256 + "type": "object",
21257 + "properties": {
21258 + "type": {
21259 + "type": "string",
21260 + "enum": [
21261 + "before_execute"
21262 + ]
21263 + },
21264 + "id": {
21265 + "type": "string",
21266 + "pattern": "^[a-z0-9_-]{1,64}$",
21267 + "description": "Unique within the session. Shows up in results and logs."
21268 + },
21269 + "name": {
21270 + "type": "string",
21271 + "minLength": 1,
21272 + "maxLength": 120,
21273 + "description": "A readable name. The agent sees it when this hook blocks a call."
21274 + },
21275 + "applies_to": {
21276 + "anyOf": [
21277 + {
21278 + "type": "string",
21279 + "enum": [
21280 + "all"
21281 + ]
21282 + },
21283 + {
21284 + "type": "object",
21285 + "properties": {
21286 + "toolkits": {
21287 + "type": "array",
21288 + "items": {
21289 + "type": "string",
21290 + "minLength": 1
21291 + },
21292 + "minItems": 1,
21293 + "description": "Toolkit slugs"
21294 + }
21295 + },
21296 + "required": [
21297 + "toolkits"
21298 + ],
21299 + "additionalProperties": false
21300 + }
21301 + ],
21302 + "description": "Which tools the hook covers: \"all\" for all of them, or only the listed toolkits."
21303 + },
21304 + "handler": {
21305 + "type": "object",
21306 + "properties": {
21307 + "type": {
21308 + "type": "string",
21309 + "enum": [
21310 + "condition_check"
21311 + ]
21312 + },
21313 + "condition": {
21314 + "type": "string",
21315 + "minLength": 1,
21316 + "maxLength": 2000,
21317 + "description": "What to block, written as a plain sentence. For example: \"Sending email to anyone outside example.org\"."
21318 + },
21319 + "action": {
21320 + "type": "string",
21321 + "enum": [
21322 + "block"
21323 + ]
21324 + }
21325 + },
21326 + "required": [
21327 + "type",
21328 + "condition",
21329 + "action"
21330 + ],
21331 + "additionalProperties": false
21332 + }
21333 + },
21334 + "required": [
21335 + "type",
21336 + "id",
21337 + "applies_to",
21338 + "handler"
21339 + ],
21340 + "additionalProperties": false
21341 + },
21342 + {
21343 + "type": "object",
21344 + "properties": {
21345 + "type": {
21346 + "type": "string",
21347 + "enum": [
21348 + "after_execute"
21349 + ]
21350 + },
21351 + "id": {
21352 + "type": "string",
21353 + "pattern": "^[a-z0-9_-]{1,64}$",
21354 + "description": "Unique within the session. Shows up in results and logs."
21355 + },
21356 + "name": {
21357 + "type": "string",
21358 + "minLength": 1,
21359 + "maxLength": 120,
21360 + "description": "A readable name. The agent sees it when this hook blocks a call."
21361 + },
21362 + "applies_to": {
21363 + "anyOf": [
21364 + {
21365 + "type": "string",
21366 + "enum": [
21367 + "all"
21368 + ]
21369 + },
21370 + {
21371 + "type": "object",
21372 + "properties": {
21373 + "toolkits": {
21374 + "type": "array",
21375 + "items": {
21376 + "type": "string",
21377 + "minLength": 1
21378 + },
21379 + "minItems": 1,
21380 + "description": "Toolkit slugs"
21381 + }
21382 + },
21383 + "required": [
21384 + "toolkits"
21385 + ],
21386 + "additionalProperties": false
21387 + }
21388 + ],
21389 + "description": "Which tools the hook covers: \"all\" for all of them, or only the listed toolkits."
21390 + },
21391 + "handler": {
21392 + "oneOf": [
21393 + {
21394 + "type": "object",
21395 + "properties": {
21396 + "type": {
21397 + "type": "string",
21398 + "enum": [
21399 + "condition_check"
21400 + ]
21401 + },
21402 + "condition": {
21403 + "type": "string",
21404 + "minLength": 1,
21405 + "maxLength": 2000,
21406 + "description": "What to block, written as a plain sentence. For example: \"Sending email to anyone outside example.org\"."
21407 + },
21408 + "action": {
21409 + "type": "string",
21410 + "enum": [
21411 + "block"
21412 + ]
21413 + }
21414 + },
21415 + "required": [
21416 + "type",
21417 + "condition",
21418 + "action"
21419 + ],
21420 + "additionalProperties": false
21421 + },
21422 + {
21423 + "type": "object",
21424 + "properties": {
21425 + "type": {
21426 + "type": "string",
21427 + "enum": [
21428 + "prompt_injection_check"
21429 + ]
21430 + },
21431 + "action": {
21432 + "type": "string",
21433 + "enum": [
21434 + "block"
21435 + ]
21436 + }
21437 + },
21438 + "required": [
21439 + "type",
21440 + "action"
21441 + ],
21442 + "additionalProperties": false,
21443 + "description": "Blocks a tool response that tries to manipulate the agent: override its instructions, change its role, or make it take actions the user didn't ask for."
21444 + }
21445 + ]
21446 + }
21447 + },
21448 + "required": [
21449 + "type",
21450 + "id",
21451 + "applies_to",
21452 + "handler"
21453 + ],
21454 + "additionalProperties": false
21455 + }
21456 + ]
21457 + },
21458 + "maxItems": 20,
21459 + "description": "Hooks that run on this session's tool calls."
21460 },
21461 "preload": {
21462 "type": "object",
@@ -21980,16 +22388,215 @@
22388 "description": "Preload configuration for Composio tools. Controls which tools appear in `session.tools` and the MCP server tool list so the agent can call them directly without going through search first. Custom tools use `preload` on the custom tool/toolkit definition instead. Not supported when multi-account is enabled. Each preloaded tool adds to the agent context window, so keep the list at or under ~20 tools."
22389 },
22390 "hooks": {
21983 - "allOf": [
21984 - {
21985 - "$ref": "#/components/schemas/SessionHooks"
21986 - },
21987 - {
21988 - "nullable": true,
21989 - "description": "Hooks that run on this session's tool calls. A hook can block a call before it runs, or block its result before the agent sees it.",
21990 - "type": "object"
21991 - }
21992 - ]
22391 + "type": "array",
22392 + "nullable": true,
22393 + "items": {
22394 + "oneOf": [
22395 + {
22396 + "type": "object",
22397 + "properties": {
22398 + "type": {
22399 + "type": "string",
22400 + "enum": [
22401 + "before_execute"
22402 + ]
22403 + },
22404 + "id": {
22405 + "type": "string",
22406 + "pattern": "^[a-z0-9_-]{1,64}$",
22407 + "description": "Unique within the session. Shows up in results and logs."
22408 + },
22409 + "name": {
22410 + "type": "string",
22411 + "minLength": 1,
22412 + "maxLength": 120,
22413 + "description": "A readable name. The agent sees it when this hook blocks a call."
22414 + },
22415 + "applies_to": {
22416 + "anyOf": [
22417 + {
22418 + "type": "string",
22419 + "enum": [
22420 + "all"
22421 + ]
22422 + },
22423 + {
22424 + "type": "object",
22425 + "properties": {
22426 + "toolkits": {
22427 + "type": "array",
22428 + "items": {
22429 + "type": "string",
22430 + "minLength": 1
22431 + },
22432 + "minItems": 1,
22433 + "description": "Toolkit slugs"
22434 + }
22435 + },
22436 + "required": [
22437 + "toolkits"
22438 + ],
22439 + "additionalProperties": false
22440 + }
22441 + ],
22442 + "description": "Which tools the hook covers: \"all\" for all of them, or only the listed toolkits."
22443 + },
22444 + "handler": {
22445 + "type": "object",
22446 + "properties": {
22447 + "type": {
22448 + "type": "string",
22449 + "enum": [
22450 + "condition_check"
22451 + ]
22452 + },
22453 + "condition": {
22454 + "type": "string",
22455 + "minLength": 1,
22456 + "maxLength": 2000,
22457 + "description": "What to block, written as a plain sentence. For example: \"Sending email to anyone outside example.org\"."
22458 + },
22459 + "action": {
22460 + "type": "string",
22461 + "enum": [
22462 + "block"
22463 + ]
22464 + }
22465 + },
22466 + "required": [
22467 + "type",
22468 + "condition",
22469 + "action"
22470 + ],
22471 + "additionalProperties": false
22472 + }
22473 + },
22474 + "required": [
22475 + "type",
22476 + "id",
22477 + "applies_to",
22478 + "handler"
22479 + ],
22480 + "additionalProperties": false
22481 + },
22482 + {
22483 + "type": "object",
22484 + "properties": {
22485 + "type": {
22486 + "type": "string",
22487 + "enum": [
22488 + "after_execute"
22489 + ]
22490 + },
22491 + "id": {
22492 + "type": "string",
22493 + "pattern": "^[a-z0-9_-]{1,64}$",
22494 + "description": "Unique within the session. Shows up in results and logs."
22495 + },
22496 + "name": {
22497 + "type": "string",
22498 + "minLength": 1,
22499 + "maxLength": 120,
22500 + "description": "A readable name. The agent sees it when this hook blocks a call."
22501 + },
22502 + "applies_to": {
22503 + "anyOf": [
22504 + {
22505 + "type": "string",
22506 + "enum": [
22507 + "all"
22508 + ]
22509 + },
22510 + {
22511 + "type": "object",
22512 + "properties": {
22513 + "toolkits": {
22514 + "type": "array",
22515 + "items": {
22516 + "type": "string",
22517 + "minLength": 1
22518 + },
22519 + "minItems": 1,
22520 + "description": "Toolkit slugs"
22521 + }
22522 + },
22523 + "required": [
22524 + "toolkits"
22525 + ],
22526 + "additionalProperties": false
22527 + }
22528 + ],
22529 + "description": "Which tools the hook covers: \"all\" for all of them, or only the listed toolkits."
22530 + },
22531 + "handler": {
22532 + "oneOf": [
22533 + {
22534 + "type": "object",
22535 + "properties": {
22536 + "type": {
22537 + "type": "string",
22538 + "enum": [
22539 + "condition_check"
22540 + ]
22541 + },
22542 + "condition": {
22543 + "type": "string",
22544 + "minLength": 1,
22545 + "maxLength": 2000,
22546 + "description": "What to block, written as a plain sentence. For example: \"Sending email to anyone outside example.org\"."
22547 + },
22548 + "action": {
22549 + "type": "string",
22550 + "enum": [
22551 + "block"
22552 + ]
22553 + }
22554 + },
22555 + "required": [
22556 + "type",
22557 + "condition",
22558 + "action"
22559 + ],
22560 + "additionalProperties": false
22561 + },
22562 + {
22563 + "type": "object",
22564 + "properties": {
22565 + "type": {
22566 + "type": "string",
22567 + "enum": [
22568 + "prompt_injection_check"
22569 + ]
22570 + },
22571 + "action": {
22572 + "type": "string",
22573 + "enum": [
22574 + "block"
22575 + ]
22576 + }
22577 + },
22578 + "required": [
22579 + "type",
22580 + "action"
22581 + ],
22582 + "additionalProperties": false,
22583 + "description": "Blocks a tool response that tries to manipulate the agent: override its instructions, change its role, or make it take actions the user didn't ask for."
22584 + }
22585 + ]
22586 + }
22587 + },
22588 + "required": [
22589 + "type",
22590 + "id",
22591 + "applies_to",
22592 + "handler"
22593 + ],
22594 + "additionalProperties": false
22595 + }
22596 + ]
22597 + },
22598 + "maxItems": 20,
22599 + "description": "Hooks that run on this session's tool calls. A hook can block a call before it runs, or block its result before the agent sees it."
22600 },
22601 "experimental": {
22602 "type": "object",
@@ -22607,7 +23214,214 @@
23214 "description": "Proxy execute configuration for this session. Omitted when not set."
23215 },
23216 "hooks": {
22610 - "$ref": "#/components/schemas/SessionHooks"
23217 + "type": "array",
23218 + "items": {
23219 + "oneOf": [
23220 + {
23221 + "type": "object",
23222 + "properties": {
23223 + "type": {
23224 + "type": "string",
23225 + "enum": [
23226 + "before_execute"
23227 + ]
23228 + },
23229 + "id": {
23230 + "type": "string",
23231 + "pattern": "^[a-z0-9_-]{1,64}$",
23232 + "description": "Unique within the session. Shows up in results and logs."
23233 + },
23234 + "name": {
23235 + "type": "string",
23236 + "minLength": 1,
23237 + "maxLength": 120,
23238 + "description": "A readable name. The agent sees it when this hook blocks a call."
23239 + },
23240 + "applies_to": {
23241 + "anyOf": [
23242 + {
23243 + "type": "string",
23244 + "enum": [
23245 + "all"
23246 + ]
23247 + },
23248 + {
23249 + "type": "object",
23250 + "properties": {
23251 + "toolkits": {
23252 + "type": "array",
23253 + "items": {
23254 + "type": "string",
23255 + "minLength": 1
23256 + },
23257 + "minItems": 1,
23258 + "description": "Toolkit slugs"
23259 + }
23260 + },
23261 + "required": [
23262 + "toolkits"
23263 + ],
23264 + "additionalProperties": false
23265 + }
23266 + ],
23267 + "description": "Which tools the hook covers: \"all\" for all of them, or only the listed toolkits."
23268 + },
23269 + "handler": {
23270 + "type": "object",
23271 + "properties": {
23272 + "type": {
23273 + "type": "string",
23274 + "enum": [
23275 + "condition_check"
23276 + ]
23277 + },
23278 + "condition": {
23279 + "type": "string",
23280 + "minLength": 1,
23281 + "maxLength": 2000,
23282 + "description": "What to block, written as a plain sentence. For example: \"Sending email to anyone outside example.org\"."
23283 + },
23284 + "action": {
23285 + "type": "string",
23286 + "enum": [
23287 + "block"
23288 + ]
23289 + }
23290 + },
23291 + "required": [
23292 + "type",
23293 + "condition",
23294 + "action"
23295 + ],
23296 + "additionalProperties": false
23297 + }
23298 + },
23299 + "required": [
23300 + "type",
23301 + "id",
23302 + "applies_to",
23303 + "handler"
23304 + ],
23305 + "additionalProperties": false
23306 + },
23307 + {
23308 + "type": "object",
23309 + "properties": {
23310 + "type": {
23311 + "type": "string",
23312 + "enum": [
23313 + "after_execute"
23314 + ]
23315 + },
23316 + "id": {
23317 + "type": "string",
23318 + "pattern": "^[a-z0-9_-]{1,64}$",
23319 + "description": "Unique within the session. Shows up in results and logs."
23320 + },
23321 + "name": {
23322 + "type": "string",
23323 + "minLength": 1,
23324 + "maxLength": 120,
23325 + "description": "A readable name. The agent sees it when this hook blocks a call."
23326 + },
23327 + "applies_to": {
23328 + "anyOf": [
23329 + {
23330 + "type": "string",
23331 + "enum": [
23332 + "all"
23333 + ]
23334 + },
23335 + {
23336 + "type": "object",
23337 + "properties": {
23338 + "toolkits": {
23339 + "type": "array",
23340 + "items": {
23341 + "type": "string",
23342 + "minLength": 1
23343 + },
23344 + "minItems": 1,
23345 + "description": "Toolkit slugs"
23346 + }
23347 + },
23348 + "required": [
23349 + "toolkits"
23350 + ],
23351 + "additionalProperties": false
23352 + }
23353 + ],
23354 + "description": "Which tools the hook covers: \"all\" for all of them, or only the listed toolkits."
23355 + },
23356 + "handler": {
23357 + "oneOf": [
23358 + {
23359 + "type": "object",
23360 + "properties": {
23361 + "type": {
23362 + "type": "string",
23363 + "enum": [
23364 + "condition_check"
23365 + ]
23366 + },
23367 + "condition": {
23368 + "type": "string",
23369 + "minLength": 1,
23370 + "maxLength": 2000,
23371 + "description": "What to block, written as a plain sentence. For example: \"Sending email to anyone outside example.org\"."
23372 + },
23373 + "action": {
23374 + "type": "string",
23375 + "enum": [
23376 + "block"
23377 + ]
23378 + }
23379 + },
23380 + "required": [
23381 + "type",
23382 + "condition",
23383 + "action"
23384 + ],
23385 + "additionalProperties": false
23386 + },
23387 + {
23388 + "type": "object",
23389 + "properties": {
23390 + "type": {
23391 + "type": "string",
23392 + "enum": [
23393 + "prompt_injection_check"
23394 + ]
23395 + },
23396 + "action": {
23397 + "type": "string",
23398 + "enum": [
23399 + "block"
23400 + ]
23401 + }
23402 + },
23403 + "required": [
23404 + "type",
23405 + "action"
23406 + ],
23407 + "additionalProperties": false,
23408 + "description": "Blocks a tool response that tries to manipulate the agent: override its instructions, change its role, or make it take actions the user didn't ask for."
23409 + }
23410 + ]
23411 + }
23412 + },
23413 + "required": [
23414 + "type",
23415 + "id",
23416 + "applies_to",
23417 + "handler"
23418 + ],
23419 + "additionalProperties": false
23420 + }
23421 + ]
23422 + },
23423 + "maxItems": 20,
23424 + "description": "Hooks that run on this session's tool calls."
23425 },
23426 "preload": {
23427 "type": "object",
docs/public/openapi.json
+1885 -657
@@ -880,216 +880,6 @@
880 "deprecated"
881 ]
882 },
883 - "SessionHooks": {
884 - "type": "array",
885 - "items": {
886 - "oneOf": [
887 - {
888 - "type": "object",
889 - "properties": {
890 - "type": {
891 - "type": "string",
892 - "enum": [
893 - "before_execute"
894 - ]
895 - },
896 - "id": {
897 - "type": "string",
898 - "pattern": "^[a-z0-9_-]{1,64}$",
899 - "description": "Unique within the session. Shows up in results and logs."
900 - },
901 - "name": {
902 - "type": "string",
903 - "minLength": 1,
904 - "maxLength": 120,
905 - "description": "A readable name. The agent sees it when this hook blocks a call."
906 - },
907 - "applies_to": {
908 - "anyOf": [
909 - {
910 - "type": "string",
911 - "enum": [
912 - "all"
913 - ]
914 - },
915 - {
916 - "type": "object",
917 - "properties": {
918 - "toolkits": {
919 - "type": "array",
920 - "items": {
921 - "type": "string",
922 - "minLength": 1
923 - },
924 - "minItems": 1,
925 - "description": "Toolkit slugs"
926 - }
927 - },
928 - "required": [
929 - "toolkits"
930 - ],
931 - "additionalProperties": false
932 - }
933 - ],
934 - "description": "Which tools the hook covers: \"all\" for all of them, or only the listed toolkits."
935 - },
936 - "handler": {
937 - "type": "object",
938 - "properties": {
939 - "type": {
940 - "type": "string",
941 - "enum": [
942 - "condition_check"
943 - ]
944 - },
945 - "condition": {
946 - "type": "string",
947 - "minLength": 1,
948 - "maxLength": 2000,
949 - "description": "What to block, written as a plain sentence. For example: \"Sending email to anyone outside example.org\"."
950 - },
951 - "action": {
952 - "type": "string",
953 - "enum": [
954 - "block"
955 - ]
956 - }
957 - },
958 - "required": [
959 - "type",
960 - "condition",
961 - "action"
962 - ],
963 - "additionalProperties": false
964 - }
965 - },
966 - "required": [
967 - "type",
968 - "id",
969 - "applies_to",
970 - "handler"
971 - ],
972 - "additionalProperties": false
973 - },
974 - {
975 - "type": "object",
976 - "properties": {
977 - "type": {
978 - "type": "string",
979 - "enum": [
980 - "after_execute"
981 - ]
982 - },
983 - "id": {
984 - "type": "string",
985 - "pattern": "^[a-z0-9_-]{1,64}$",
986 - "description": "Unique within the session. Shows up in results and logs."
987 - },
988 - "name": {
989 - "type": "string",
990 - "minLength": 1,
991 - "maxLength": 120,
992 - "description": "A readable name. The agent sees it when this hook blocks a call."
993 - },
994 - "applies_to": {
995 - "anyOf": [
996 - {
997 - "type": "string",
998 - "enum": [
999 - "all"
1000 - ]
1001 - },
1002 - {
1003 - "type": "object",
1004 - "properties": {
1005 - "toolkits": {
1006 - "type": "array",
1007 - "items": {
1008 - "type": "string",
1009 - "minLength": 1
1010 - },
1011 - "minItems": 1,
1012 - "description": "Toolkit slugs"
1013 - }
1014 - },
1015 - "required": [
1016 - "toolkits"
1017 - ],
1018 - "additionalProperties": false
1019 - }
1020 - ],
1021 - "description": "Which tools the hook covers: \"all\" for all of them, or only the listed toolkits."
1022 - },
1023 - "handler": {
1024 - "oneOf": [
1025 - {
1026 - "type": "object",
1027 - "properties": {
1028 - "type": {
1029 - "type": "string",
1030 - "enum": [
1031 - "condition_check"
1032 - ]
1033 - },
1034 - "condition": {
1035 - "type": "string",
1036 - "minLength": 1,
1037 - "maxLength": 2000,
1038 - "description": "What to block, written as a plain sentence. For example: \"Sending email to anyone outside example.org\"."
1039 - },
1040 - "action": {
1041 - "type": "string",
1042 - "enum": [
1043 - "block"
1044 - ]
1045 - }
1046 - },
1047 - "required": [
1048 - "type",
1049 - "condition",
1050 - "action"
1051 - ],
1052 - "additionalProperties": false
1053 - },
1054 - {
1055 - "type": "object",
1056 - "properties": {
1057 - "type": {
1058 - "type": "string",
1059 - "enum": [
1060 - "prompt_injection_check"
1061 - ]
1062 - },
1063 - "action": {
1064 - "type": "string",
1065 - "enum": [
1066 - "block"
1067 - ]
1068 - }
1069 - },
1070 - "required": [
1071 - "type",
1072 - "action"
1073 - ],
1074 - "additionalProperties": false,
1075 - "description": "Blocks a tool response that tries to manipulate the agent: override its instructions, change its role, or make it take actions the user didn't ask for."
1076 - }
1077 - ]
1078 - }
1079 - },
1080 - "required": [
1081 - "type",
1082 - "id",
1083 - "applies_to",
1084 - "handler"
1085 - ],
1086 - "additionalProperties": false
1087 - }
1088 - ]
1089 - },
1090 - "maxItems": 20,
1091 - "description": "Hooks that run on this session's tool calls."
1092 - },
883 "ToolRouterSessionV31ConfigHistoryListResponse": {
884 "type": "object",
885 "properties": {
@@ -1580,77 +1370,284 @@
1370 "description": "Proxy execute configuration for this session. Omitted when not set."
1371 },
1372 "hooks": {
1583 - "$ref": "#/components/schemas/SessionHooks"
1584 - },
1585 - "preload": {
1586 - "type": "object",
1587 - "properties": {
1588 - "tools": {
1589 - "anyOf": [
1590 - {
1591 - "type": "array",
1592 - "items": {
1593 - "type": "string"
1373 + "type": "array",
1374 + "items": {
1375 + "oneOf": [
1376 + {
1377 + "type": "object",
1378 + "properties": {
1379 + "type": {
1380 + "type": "string",
1381 + "enum": [
1382 + "before_execute"
1383 + ]
1384 + },
1385 + "id": {
1386 + "type": "string",
1387 + "pattern": "^[a-z0-9_-]{1,64}$",
1388 + "description": "Unique within the session. Shows up in results and logs."
1389 + },
1390 + "name": {
1391 + "type": "string",
1392 + "minLength": 1,
1393 + "maxLength": 120,
1394 + "description": "A readable name. The agent sees it when this hook blocks a call."
1395 + },
1396 + "applies_to": {
1397 + "anyOf": [
1398 + {
1399 + "type": "string",
1400 + "enum": [
1401 + "all"
1402 + ]
1403 + },
1404 + {
1405 + "type": "object",
1406 + "properties": {
1407 + "toolkits": {
1408 + "type": "array",
1409 + "items": {
1410 + "type": "string",
1411 + "minLength": 1
1412 + },
1413 + "minItems": 1,
1414 + "description": "Toolkit slugs"
1415 + }
1416 + },
1417 + "required": [
1418 + "toolkits"
1419 + ],
1420 + "additionalProperties": false
1421 + }
1422 + ],
1423 + "description": "Which tools the hook covers: \"all\" for all of them, or only the listed toolkits."
1424 + },
1425 + "handler": {
1426 + "type": "object",
1427 + "properties": {
1428 + "type": {
1429 + "type": "string",
1430 + "enum": [
1431 + "condition_check"
1432 + ]
1433 + },
1434 + "condition": {
1435 + "type": "string",
1436 + "minLength": 1,
1437 + "maxLength": 2000,
1438 + "description": "What to block, written as a plain sentence. For example: \"Sending email to anyone outside example.org\"."
1439 + },
1440 + "action": {
1441 + "type": "string",
1442 + "enum": [
1443 + "block"
1444 + ]
1445 + }
1446 + },
1447 + "required": [
1448 + "type",
1449 + "condition",
1450 + "action"
1451 + ],
1452 + "additionalProperties": false
1453 }
1454 },
1596 - {
1597 - "type": "string",
1598 - "enum": [
1599 - "all"
1600 - ]
1601 - }
1602 - ],
1603 - "description": "Explicit preloaded tool slugs, or \"all\" when the session dynamically exposes all app tools allowed by its filters."
1604 - }
1605 - },
1606 - "required": [
1607 - "tools"
1608 - ],
1609 - "additionalProperties": false,
1610 - "description": "Preload configuration. Explicit slugs are returned as an array; dynamic preload is returned as \"all\"."
1611 - },
1612 - "connected_accounts": {
1613 - "type": "object",
1614 - "additionalProperties": {
1615 - "type": "array",
1616 - "items": {
1617 - "type": "string",
1618 - "format": "connectedAccountId"
1619 - },
1620 - "minItems": 1
1621 - },
1622 - "description": "Per-toolkit connected account overrides (array of nano-IDs). Multi-account sessions can pin more than one account per toolkit; otherwise length is 1."
1623 - },
1624 - "search": {
1625 - "type": "object",
1626 - "properties": {
1627 - "enable": {
1628 - "type": "boolean",
1629 - "default": true
1630 - }
1631 - },
1632 - "description": "Search helper configuration"
1633 - },
1634 - "execute": {
1635 - "type": "object",
1636 - "properties": {
1637 - "enable_multi_execute": {
1638 - "type": "boolean",
1639 - "default": true
1640 - }
1641 - },
1642 - "description": "Execute helper configuration"
1643 - }
1644 - },
1645 - "required": [
1646 - "user_id",
1647 - "instant",
1648 - "preload",
1649 - "search",
1650 - "execute"
1651 - ],
1652 - "description": "The session configuration at this version"
1653 - },
1455 + "required": [
1456 + "type",
1457 + "id",
1458 + "applies_to",
1459 + "handler"
1460 + ],
1461 + "additionalProperties": false
1462 + },
1463 + {
1464 + "type": "object",
1465 + "properties": {
1466 + "type": {
1467 + "type": "string",
1468 + "enum": [
1469 + "after_execute"
1470 + ]
1471 + },
1472 + "id": {
1473 + "type": "string",
1474 + "pattern": "^[a-z0-9_-]{1,64}$",
1475 + "description": "Unique within the session. Shows up in results and logs."
1476 + },
1477 + "name": {
1478 + "type": "string",
1479 + "minLength": 1,
1480 + "maxLength": 120,
1481 + "description": "A readable name. The agent sees it when this hook blocks a call."
1482 + },
1483 + "applies_to": {
1484 + "anyOf": [
1485 + {
1486 + "type": "string",
1487 + "enum": [
1488 + "all"
1489 + ]
1490 + },
1491 + {
1492 + "type": "object",
1493 + "properties": {
1494 + "toolkits": {
1495 + "type": "array",
1496 + "items": {
1497 + "type": "string",
1498 + "minLength": 1
1499 + },
1500 + "minItems": 1,
1501 + "description": "Toolkit slugs"
1502 + }
1503 + },
1504 + "required": [
1505 + "toolkits"
1506 + ],
1507 + "additionalProperties": false
1508 + }
1509 + ],
1510 + "description": "Which tools the hook covers: \"all\" for all of them, or only the listed toolkits."
1511 + },
1512 + "handler": {
1513 + "oneOf": [
1514 + {
1515 + "type": "object",
1516 + "properties": {
1517 + "type": {
1518 + "type": "string",
1519 + "enum": [
1520 + "condition_check"
1521 + ]
1522 + },
1523 + "condition": {
1524 + "type": "string",
1525 + "minLength": 1,
1526 + "maxLength": 2000,
1527 + "description": "What to block, written as a plain sentence. For example: \"Sending email to anyone outside example.org\"."
1528 + },
1529 + "action": {
1530 + "type": "string",
1531 + "enum": [
1532 + "block"
1533 + ]
1534 + }
1535 + },
1536 + "required": [
1537 + "type",
1538 + "condition",
1539 + "action"
1540 + ],
1541 + "additionalProperties": false
1542 + },
1543 + {
1544 + "type": "object",
1545 + "properties": {
1546 + "type": {
1547 + "type": "string",
1548 + "enum": [
1549 + "prompt_injection_check"
1550 + ]
1551 + },
1552 + "action": {
1553 + "type": "string",
1554 + "enum": [
1555 + "block"
1556 + ]
1557 + }
1558 + },
1559 + "required": [
1560 + "type",
1561 + "action"
1562 + ],
1563 + "additionalProperties": false,
1564 + "description": "Blocks a tool response that tries to manipulate the agent: override its instructions, change its role, or make it take actions the user didn't ask for."
1565 + }
1566 + ]
1567 + }
1568 + },
1569 + "required": [
1570 + "type",
1571 + "id",
1572 + "applies_to",
1573 + "handler"
1574 + ],
1575 + "additionalProperties": false
1576 + }
1577 + ]
1578 + },
1579 + "maxItems": 20,
1580 + "description": "Hooks that run on this session's tool calls."
1581 + },
1582 + "preload": {
1583 + "type": "object",
1584 + "properties": {
1585 + "tools": {
1586 + "anyOf": [
1587 + {
1588 + "type": "array",
1589 + "items": {
1590 + "type": "string"
1591 + }
1592 + },
1593 + {
1594 + "type": "string",
1595 + "enum": [
1596 + "all"
1597 + ]
1598 + }
1599 + ],
1600 + "description": "Explicit preloaded tool slugs, or \"all\" when the session dynamically exposes all app tools allowed by its filters."
1601 + }
1602 + },
1603 + "required": [
1604 + "tools"
1605 + ],
1606 + "additionalProperties": false,
1607 + "description": "Preload configuration. Explicit slugs are returned as an array; dynamic preload is returned as \"all\"."
1608 + },
1609 + "connected_accounts": {
1610 + "type": "object",
1611 + "additionalProperties": {
1612 + "type": "array",
1613 + "items": {
1614 + "type": "string",
1615 + "format": "connectedAccountId"
1616 + },
1617 + "minItems": 1
1618 + },
1619 + "description": "Per-toolkit connected account overrides (array of nano-IDs). Multi-account sessions can pin more than one account per toolkit; otherwise length is 1."
1620 + },
1621 + "search": {
1622 + "type": "object",
1623 + "properties": {
1624 + "enable": {
1625 + "type": "boolean",
1626 + "default": true
1627 + }
1628 + },
1629 + "description": "Search helper configuration"
1630 + },
1631 + "execute": {
1632 + "type": "object",
1633 + "properties": {
1634 + "enable_multi_execute": {
1635 + "type": "boolean",
1636 + "default": true
1637 + }
1638 + },
1639 + "description": "Execute helper configuration"
1640 + }
1641 + },
1642 + "required": [
1643 + "user_id",
1644 + "instant",
1645 + "preload",
1646 + "search",
1647 + "execute"
1648 + ],
1649 + "description": "The session configuration at this version"
1650 + },
1651 "is_current": {
1652 "type": "boolean",
1653 "description": "True only for the live (current) session config, present on the first page. False for archived history rows."
@@ -8253,112 +8250,312 @@
8250 "description": "Preload configuration. Use an explicit list for frequently used tool slugs, or \"all\" to dynamically expose every app tool allowed by positive toolkits/tools/tags filters."
8251 },
8252 "hooks": {
8256 - "allOf": [
8257 - {
8258 - "$ref": "#/components/schemas/SessionHooks"
8259 - },
8260 - {
8261 - "description": "Hooks that run on this session's tool calls. A hook can block a call before it runs, or block its result before the agent sees it."
8262 - }
8263 - ]
8264 - },
8265 - "search": {
8266 - "type": "object",
8267 - "properties": {
8268 - "enable": {
8269 - "type": "boolean",
8270 - "default": true
8271 - }
8272 - },
8273 - "default": {
8274 - "enable": true
8275 - },
8276 - "additionalProperties": false
8277 - },
8278 - "execute": {
8279 - "type": "object",
8280 - "properties": {
8281 - "enable_multi_execute": {
8282 - "type": "boolean",
8283 - "default": true
8284 - }
8285 - },
8286 - "default": {
8287 - "enable_multi_execute": true
8288 - },
8289 - "additionalProperties": false
8290 - }
8291 - },
8292 - "required": [
8293 - "user_id"
8294 - ]
8295 - },
8296 - "examples": {
8297 - "Session with all toolkits": {
8298 - "value": {
8299 - "user_id": "user_123456789"
8300 - }
8301 - },
8302 - "Session with only specific toolkits": {
8303 - "value": {
8304 - "user_id": "user_123456789",
8305 - "toolkits": {
8306 - "enable": [
8307 - "gmail",
8308 - "slack"
8309 - ]
8310 - }
8311 - }
8312 - },
8313 - "Session with only specific toolkits disabled": {
8314 - "value": {
8315 - "user_id": "user_123456789",
8316 - "toolkits": {
8317 - "disable": [
8318 - "gmail",
8319 - "slack"
8320 - ]
8321 - }
8322 - }
8323 - },
8324 - "Session with connection manager enabled": {
8325 - "value": {
8326 - "user_id": "user_123456789",
8327 - "manage_connections": {
8328 - "enable": true
8329 - }
8330 - }
8331 - },
8332 - "Session with connection manager and specific toolkits": {
8333 - "value": {
8334 - "user_id": "user_123456789",
8335 - "toolkits": {
8336 - "enable": [
8337 - "gmail",
8338 - "slack"
8339 - ]
8340 - },
8341 - "manage_connections": {
8342 - "enable": true
8343 - }
8344 - }
8345 - },
8346 - "Session with custom callback URL": {
8347 - "value": {
8348 - "user_id": "user_123456789",
8349 - "toolkits": {
8350 - "enable": [
8351 - "github",
8352 - "slack"
8353 - ]
8354 - },
8355 - "manage_connections": {
8356 - "enable": true,
8357 - "callback_url": "https://your-app.com/auth/callback"
8358 - }
8359 - }
8360 - },
8361 - "Session with workbench configuration": {
8253 + "type": "array",
8254 + "items": {
8255 + "oneOf": [
8256 + {
8257 + "type": "object",
8258 + "properties": {
8259 + "type": {
8260 + "type": "string",
8261 + "enum": [
8262 + "before_execute"
8263 + ]
8264 + },
8265 + "id": {
8266 + "type": "string",
8267 + "pattern": "^[a-z0-9_-]{1,64}$",
8268 + "description": "Unique within the session. Shows up in results and logs."
8269 + },
8270 + "name": {
8271 + "type": "string",
8272 + "minLength": 1,
8273 + "maxLength": 120,
8274 + "description": "A readable name. The agent sees it when this hook blocks a call."
8275 + },
8276 + "applies_to": {
8277 + "anyOf": [
8278 + {
8279 + "type": "string",
8280 + "enum": [
8281 + "all"
8282 + ]
8283 + },
8284 + {
8285 + "type": "object",
8286 + "properties": {
8287 + "toolkits": {
8288 + "type": "array",
8289 + "items": {
8290 + "type": "string",
8291 + "minLength": 1
8292 + },
8293 + "minItems": 1,
8294 + "description": "Toolkit slugs"
8295 + }
8296 + },
8297 + "required": [
8298 + "toolkits"
8299 + ],
8300 + "additionalProperties": false
8301 + }
8302 + ],
8303 + "description": "Which tools the hook covers: \"all\" for all of them, or only the listed toolkits."
8304 + },
8305 + "handler": {
8306 + "type": "object",
8307 + "properties": {
8308 + "type": {
8309 + "type": "string",
8310 + "enum": [
8311 + "condition_check"
8312 + ]
8313 + },
8314 + "condition": {
8315 + "type": "string",
8316 + "minLength": 1,
8317 + "maxLength": 2000,
8318 + "description": "What to block, written as a plain sentence. For example: \"Sending email to anyone outside example.org\"."
8319 + },
8320 + "action": {
8321 + "type": "string",
8322 + "enum": [
8323 + "block"
8324 + ]
8325 + }
8326 + },
8327 + "required": [
8328 + "type",
8329 + "condition",
8330 + "action"
8331 + ],
8332 + "additionalProperties": false
8333 + }
8334 + },
8335 + "required": [
8336 + "type",
8337 + "id",
8338 + "applies_to",
8339 + "handler"
8340 + ],
8341 + "additionalProperties": false
8342 + },
8343 + {
8344 + "type": "object",
8345 + "properties": {
8346 + "type": {
8347 + "type": "string",
8348 + "enum": [
8349 + "after_execute"
8350 + ]
8351 + },
8352 + "id": {
8353 + "type": "string",
8354 + "pattern": "^[a-z0-9_-]{1,64}$",
8355 + "description": "Unique within the session. Shows up in results and logs."
8356 + },
8357 + "name": {
8358 + "type": "string",
8359 + "minLength": 1,
8360 + "maxLength": 120,
8361 + "description": "A readable name. The agent sees it when this hook blocks a call."
8362 + },
8363 + "applies_to": {
8364 + "anyOf": [
8365 + {
8366 + "type": "string",
8367 + "enum": [
8368 + "all"
8369 + ]
8370 + },
8371 + {
8372 + "type": "object",
8373 + "properties": {
8374 + "toolkits": {
8375 + "type": "array",
8376 + "items": {
8377 + "type": "string",
8378 + "minLength": 1
8379 + },
8380 + "minItems": 1,
8381 + "description": "Toolkit slugs"
8382 + }
8383 + },
8384 + "required": [
8385 + "toolkits"
8386 + ],
8387 + "additionalProperties": false
8388 + }
8389 + ],
8390 + "description": "Which tools the hook covers: \"all\" for all of them, or only the listed toolkits."
8391 + },
8392 + "handler": {
8393 + "oneOf": [
8394 + {
8395 + "type": "object",
8396 + "properties": {
8397 + "type": {
8398 + "type": "string",
8399 + "enum": [
8400 + "condition_check"
8401 + ]
8402 + },
8403 + "condition": {
8404 + "type": "string",
8405 + "minLength": 1,
8406 + "maxLength": 2000,
8407 + "description": "What to block, written as a plain sentence. For example: \"Sending email to anyone outside example.org\"."
8408 + },
8409 + "action": {
8410 + "type": "string",
8411 + "enum": [
8412 + "block"
8413 + ]
8414 + }
8415 + },
8416 + "required": [
8417 + "type",
8418 + "condition",
8419 + "action"
8420 + ],
8421 + "additionalProperties": false
8422 + },
8423 + {
8424 + "type": "object",
8425 + "properties": {
8426 + "type": {
8427 + "type": "string",
8428 + "enum": [
8429 + "prompt_injection_check"
8430 + ]
8431 + },
8432 + "action": {
8433 + "type": "string",
8434 + "enum": [
8435 + "block"
8436 + ]
8437 + }
8438 + },
8439 + "required": [
8440 + "type",
8441 + "action"
8442 + ],
8443 + "additionalProperties": false,
8444 + "description": "Blocks a tool response that tries to manipulate the agent: override its instructions, change its role, or make it take actions the user didn't ask for."
8445 + }
8446 + ]
8447 + }
8448 + },
8449 + "required": [
8450 + "type",
8451 + "id",
8452 + "applies_to",
8453 + "handler"
8454 + ],
8455 + "additionalProperties": false
8456 + }
8457 + ]
8458 + },
8459 + "maxItems": 20,
8460 + "description": "Hooks that run on this session's tool calls. A hook can block a call before it runs, or block its result before the agent sees it."
8461 + },
8462 + "search": {
8463 + "type": "object",
8464 + "properties": {
8465 + "enable": {
8466 + "type": "boolean",
8467 + "default": true
8468 + }
8469 + },
8470 + "default": {
8471 + "enable": true
8472 + },
8473 + "additionalProperties": false
8474 + },
8475 + "execute": {
8476 + "type": "object",
8477 + "properties": {
8478 + "enable_multi_execute": {
8479 + "type": "boolean",
8480 + "default": true
8481 + }
8482 + },
8483 + "default": {
8484 + "enable_multi_execute": true
8485 + },
8486 + "additionalProperties": false
8487 + }
8488 + },
8489 + "required": [
8490 + "user_id"
8491 + ]
8492 + },
8493 + "examples": {
8494 + "Session with all toolkits": {
8495 + "value": {
8496 + "user_id": "user_123456789"
8497 + }
8498 + },
8499 + "Session with only specific toolkits": {
8500 + "value": {
8501 + "user_id": "user_123456789",
8502 + "toolkits": {
8503 + "enable": [
8504 + "gmail",
8505 + "slack"
8506 + ]
8507 + }
8508 + }
8509 + },
8510 + "Session with only specific toolkits disabled": {
8511 + "value": {
8512 + "user_id": "user_123456789",
8513 + "toolkits": {
8514 + "disable": [
8515 + "gmail",
8516 + "slack"
8517 + ]
8518 + }
8519 + }
8520 + },
8521 + "Session with connection manager enabled": {
8522 + "value": {
8523 + "user_id": "user_123456789",
8524 + "manage_connections": {
8525 + "enable": true
8526 + }
8527 + }
8528 + },
8529 + "Session with connection manager and specific toolkits": {
8530 + "value": {
8531 + "user_id": "user_123456789",
8532 + "toolkits": {
8533 + "enable": [
8534 + "gmail",
8535 + "slack"
8536 + ]
8537 + },
8538 + "manage_connections": {
8539 + "enable": true
8540 + }
8541 + }
8542 + },
8543 + "Session with custom callback URL": {
8544 + "value": {
8545 + "user_id": "user_123456789",
8546 + "toolkits": {
8547 + "enable": [
8548 + "github",
8549 + "slack"
8550 + ]
8551 + },
8552 + "manage_connections": {
8553 + "enable": true,
8554 + "callback_url": "https://your-app.com/auth/callback"
8555 + }
8556 + }
8557 + },
8558 + "Session with workbench configuration": {
8559 "value": {
8560 "user_id": "user_123456789",
8561 "toolkits": {
@@ -8999,20 +9196,227 @@
9196 "description": "Proxy execute configuration for this session. Omitted when not set."
9197 },
9198 "hooks": {
9002 - "$ref": "#/components/schemas/SessionHooks"
9003 - },
9004 - "preload": {
9005 - "type": "object",
9006 - "properties": {
9007 - "tools": {
9008 - "anyOf": [
9009 - {
9010 - "type": "array",
9011 - "items": {
9012 - "type": "string"
9013 - }
9014 - },
9015 - {
9199 + "type": "array",
9200 + "items": {
9201 + "oneOf": [
9202 + {
9203 + "type": "object",
9204 + "properties": {
9205 + "type": {
9206 + "type": "string",
9207 + "enum": [
9208 + "before_execute"
9209 + ]
9210 + },
9211 + "id": {
9212 + "type": "string",
9213 + "pattern": "^[a-z0-9_-]{1,64}$",
9214 + "description": "Unique within the session. Shows up in results and logs."
9215 + },
9216 + "name": {
9217 + "type": "string",
9218 + "minLength": 1,
9219 + "maxLength": 120,
9220 + "description": "A readable name. The agent sees it when this hook blocks a call."
9221 + },
9222 + "applies_to": {
9223 + "anyOf": [
9224 + {
9225 + "type": "string",
9226 + "enum": [
9227 + "all"
9228 + ]
9229 + },
9230 + {
9231 + "type": "object",
9232 + "properties": {
9233 + "toolkits": {
9234 + "type": "array",
9235 + "items": {
9236 + "type": "string",
9237 + "minLength": 1
9238 + },
9239 + "minItems": 1,
9240 + "description": "Toolkit slugs"
9241 + }
9242 + },
9243 + "required": [
9244 + "toolkits"
9245 + ],
9246 + "additionalProperties": false
9247 + }
9248 + ],
9249 + "description": "Which tools the hook covers: \"all\" for all of them, or only the listed toolkits."
9250 + },
9251 + "handler": {
9252 + "type": "object",
9253 + "properties": {
9254 + "type": {
9255 + "type": "string",
9256 + "enum": [
9257 + "condition_check"
9258 + ]
9259 + },
9260 + "condition": {
9261 + "type": "string",
9262 + "minLength": 1,
9263 + "maxLength": 2000,
9264 + "description": "What to block, written as a plain sentence. For example: \"Sending email to anyone outside example.org\"."
9265 + },
9266 + "action": {
9267 + "type": "string",
9268 + "enum": [
9269 + "block"
9270 + ]
9271 + }
9272 + },
9273 + "required": [
9274 + "type",
9275 + "condition",
9276 + "action"
9277 + ],
9278 + "additionalProperties": false
9279 + }
9280 + },
9281 + "required": [
9282 + "type",
9283 + "id",
9284 + "applies_to",
9285 + "handler"
9286 + ],
9287 + "additionalProperties": false
9288 + },
9289 + {
9290 + "type": "object",
9291 + "properties": {
9292 + "type": {
9293 + "type": "string",
9294 + "enum": [
9295 + "after_execute"
9296 + ]
9297 + },
9298 + "id": {
9299 + "type": "string",
9300 + "pattern": "^[a-z0-9_-]{1,64}$",
9301 + "description": "Unique within the session. Shows up in results and logs."
9302 + },
9303 + "name": {
9304 + "type": "string",
9305 + "minLength": 1,
9306 + "maxLength": 120,
9307 + "description": "A readable name. The agent sees it when this hook blocks a call."
9308 + },
9309 + "applies_to": {
9310 + "anyOf": [
9311 + {
9312 + "type": "string",
9313 + "enum": [
9314 + "all"
9315 + ]
9316 + },
9317 + {
9318 + "type": "object",
9319 + "properties": {
9320 + "toolkits": {
9321 + "type": "array",
9322 + "items": {
9323 + "type": "string",
9324 + "minLength": 1
9325 + },
9326 + "minItems": 1,
9327 + "description": "Toolkit slugs"
9328 + }
9329 + },
9330 + "required": [
9331 + "toolkits"
9332 + ],
9333 + "additionalProperties": false
9334 + }
9335 + ],
9336 + "description": "Which tools the hook covers: \"all\" for all of them, or only the listed toolkits."
9337 + },
9338 + "handler": {
9339 + "oneOf": [
9340 + {
9341 + "type": "object",
9342 + "properties": {
9343 + "type": {
9344 + "type": "string",
9345 + "enum": [
9346 + "condition_check"
9347 + ]
9348 + },
9349 + "condition": {
9350 + "type": "string",
9351 + "minLength": 1,
9352 + "maxLength": 2000,
9353 + "description": "What to block, written as a plain sentence. For example: \"Sending email to anyone outside example.org\"."
9354 + },
9355 + "action": {
9356 + "type": "string",
9357 + "enum": [
9358 + "block"
9359 + ]
9360 + }
9361 + },
9362 + "required": [
9363 + "type",
9364 + "condition",
9365 + "action"
9366 + ],
9367 + "additionalProperties": false
9368 + },
9369 + {
9370 + "type": "object",
9371 + "properties": {
9372 + "type": {
9373 + "type": "string",
9374 + "enum": [
9375 + "prompt_injection_check"
9376 + ]
9377 + },
9378 + "action": {
9379 + "type": "string",
9380 + "enum": [
9381 + "block"
9382 + ]
9383 + }
9384 + },
9385 + "required": [
9386 + "type",
9387 + "action"
9388 + ],
9389 + "additionalProperties": false,
9390 + "description": "Blocks a tool response that tries to manipulate the agent: override its instructions, change its role, or make it take actions the user didn't ask for."
9391 + }
9392 + ]
9393 + }
9394 + },
9395 + "required": [
9396 + "type",
9397 + "id",
9398 + "applies_to",
9399 + "handler"
9400 + ],
9401 + "additionalProperties": false
9402 + }
9403 + ]
9404 + },
9405 + "maxItems": 20,
9406 + "description": "Hooks that run on this session's tool calls."
9407 + },
9408 + "preload": {
9409 + "type": "object",
9410 + "properties": {
9411 + "tools": {
9412 + "anyOf": [
9413 + {
9414 + "type": "array",
9415 + "items": {
9416 + "type": "string"
9417 + }
9418 + },
9419 + {
9420 "type": "string",
9421 "enum": [
9422 "all"
@@ -9899,124 +10303,331 @@
10303 "description": "Proxy execute configuration for this session. Omitted when not set."
10304 },
10305 "hooks": {
9902 - "$ref": "#/components/schemas/SessionHooks"
9903 - },
9904 - "preload": {
9905 - "type": "object",
9906 - "properties": {
9907 - "tools": {
9908 - "anyOf": [
9909 - {
9910 - "type": "array",
9911 - "items": {
9912 - "type": "string"
9913 - }
9914 - },
9915 - {
9916 - "type": "string",
9917 - "enum": [
9918 - "all"
9919 - ]
9920 - }
9921 - ],
9922 - "description": "Explicit preloaded tool slugs, or \"all\" when the session dynamically exposes all app tools allowed by its filters."
9923 - }
9924 - },
9925 - "required": [
9926 - "tools"
9927 - ],
9928 - "additionalProperties": false,
9929 - "description": "Preload configuration. Explicit slugs are returned as an array; dynamic preload is returned as \"all\"."
9930 - },
9931 - "connected_accounts": {
9932 - "type": "object",
9933 - "additionalProperties": {
9934 - "type": "array",
9935 - "items": {
9936 - "type": "string",
9937 - "format": "connectedAccountId"
9938 - },
9939 - "minItems": 1
9940 - },
9941 - "description": "Per-toolkit connected account overrides (array of nano-IDs). Multi-account sessions can pin more than one account per toolkit; otherwise length is 1."
9942 - },
9943 - "search": {
9944 - "type": "object",
9945 - "properties": {
9946 - "enable": {
9947 - "type": "boolean",
9948 - "default": true
9949 - }
9950 - },
9951 - "description": "Search helper configuration"
9952 - },
9953 - "execute": {
9954 - "type": "object",
9955 - "properties": {
9956 - "enable_multi_execute": {
9957 - "type": "boolean",
9958 - "default": true
9959 - }
9960 - },
9961 - "description": "Execute helper configuration"
9962 - }
9963 - },
9964 - "required": [
9965 - "user_id",
9966 - "instant",
9967 - "preload",
9968 - "search",
9969 - "execute"
9970 - ],
9971 - "description": "The configuration used to create this session"
9972 - },
9973 - "config_version": {
9974 - "type": "integer",
9975 - "description": "Monotonic version of the config. Incremented on each PATCH. Use for optimistic concurrency control."
9976 - },
9977 - "experimental": {
9978 - "type": "object",
9979 - "properties": {
9980 - "assistive_prompt": {
9981 - "type": "string",
9982 - "description": "The assistive system prompt for the tool router session"
9983 - },
9984 - "custom_toolkits": {
10306 "type": "array",
10307 "items": {
9987 - "type": "object",
9988 - "properties": {
9989 - "slug": {
9990 - "type": "string",
9991 - "minLength": 1,
9992 - "pattern": "^[a-zA-Z0-9_-]+$"
9993 - },
9994 - "name": {
9995 - "type": "string",
9996 - "minLength": 1,
9997 - "maxLength": 128
9998 - },
9999 - "description": {
10000 - "type": "string",
10001 - "minLength": 1,
10002 - "maxLength": 2048
10003 - },
10004 - "tools": {
10005 - "type": "array",
10006 - "items": {
10007 - "type": "object",
10008 - "properties": {
10009 - "slug": {
10010 - "type": "string",
10011 - "description": "Prefixed tool slug (e.g. LOCAL_CRM_FIND_CUSTOMER)"
10012 - },
10013 - "name": {
10014 - "type": "string",
10015 - "minLength": 1,
10016 - "maxLength": 128
10017 - },
10018 - "description": {
10019 - "type": "string",
10308 + "oneOf": [
10309 + {
10310 + "type": "object",
10311 + "properties": {
10312 + "type": {
10313 + "type": "string",
10314 + "enum": [
10315 + "before_execute"
10316 + ]
10317 + },
10318 + "id": {
10319 + "type": "string",
10320 + "pattern": "^[a-z0-9_-]{1,64}$",
10321 + "description": "Unique within the session. Shows up in results and logs."
10322 + },
10323 + "name": {
10324 + "type": "string",
10325 + "minLength": 1,
10326 + "maxLength": 120,
10327 + "description": "A readable name. The agent sees it when this hook blocks a call."
10328 + },
10329 + "applies_to": {
10330 + "anyOf": [
10331 + {
10332 + "type": "string",
10333 + "enum": [
10334 + "all"
10335 + ]
10336 + },
10337 + {
10338 + "type": "object",
10339 + "properties": {
10340 + "toolkits": {
10341 + "type": "array",
10342 + "items": {
10343 + "type": "string",
10344 + "minLength": 1
10345 + },
10346 + "minItems": 1,
10347 + "description": "Toolkit slugs"
10348 + }
10349 + },
10350 + "required": [
10351 + "toolkits"
10352 + ],
10353 + "additionalProperties": false
10354 + }
10355 + ],
10356 + "description": "Which tools the hook covers: \"all\" for all of them, or only the listed toolkits."
10357 + },
10358 + "handler": {
10359 + "type": "object",
10360 + "properties": {
10361 + "type": {
10362 + "type": "string",
10363 + "enum": [
10364 + "condition_check"
10365 + ]
10366 + },
10367 + "condition": {
10368 + "type": "string",
10369 + "minLength": 1,
10370 + "maxLength": 2000,
10371 + "description": "What to block, written as a plain sentence. For example: \"Sending email to anyone outside example.org\"."
10372 + },
10373 + "action": {
10374 + "type": "string",
10375 + "enum": [
10376 + "block"
10377 + ]
10378 + }
10379 + },
10380 + "required": [
10381 + "type",
10382 + "condition",
10383 + "action"
10384 + ],
10385 + "additionalProperties": false
10386 + }
10387 + },
10388 + "required": [
10389 + "type",
10390 + "id",
10391 + "applies_to",
10392 + "handler"
10393 + ],
10394 + "additionalProperties": false
10395 + },
10396 + {
10397 + "type": "object",
10398 + "properties": {
10399 + "type": {
10400 + "type": "string",
10401 + "enum": [
10402 + "after_execute"
10403 + ]
10404 + },
10405 + "id": {
10406 + "type": "string",
10407 + "pattern": "^[a-z0-9_-]{1,64}$",
10408 + "description": "Unique within the session. Shows up in results and logs."
10409 + },
10410 + "name": {
10411 + "type": "string",
10412 + "minLength": 1,
10413 + "maxLength": 120,
10414 + "description": "A readable name. The agent sees it when this hook blocks a call."
10415 + },
10416 + "applies_to": {
10417 + "anyOf": [
10418 + {
10419 + "type": "string",
10420 + "enum": [
10421 + "all"
10422 + ]
10423 + },
10424 + {
10425 + "type": "object",
10426 + "properties": {
10427 + "toolkits": {
10428 + "type": "array",
10429 + "items": {
10430 + "type": "string",
10431 + "minLength": 1
10432 + },
10433 + "minItems": 1,
10434 + "description": "Toolkit slugs"
10435 + }
10436 + },
10437 + "required": [
10438 + "toolkits"
10439 + ],
10440 + "additionalProperties": false
10441 + }
10442 + ],
10443 + "description": "Which tools the hook covers: \"all\" for all of them, or only the listed toolkits."
10444 + },
10445 + "handler": {
10446 + "oneOf": [
10447 + {
10448 + "type": "object",
10449 + "properties": {
10450 + "type": {
10451 + "type": "string",
10452 + "enum": [
10453 + "condition_check"
10454 + ]
10455 + },
10456 + "condition": {
10457 + "type": "string",
10458 + "minLength": 1,
10459 + "maxLength": 2000,
10460 + "description": "What to block, written as a plain sentence. For example: \"Sending email to anyone outside example.org\"."
10461 + },
10462 + "action": {
10463 + "type": "string",
10464 + "enum": [
10465 + "block"
10466 + ]
10467 + }
10468 + },
10469 + "required": [
10470 + "type",
10471 + "condition",
10472 + "action"
10473 + ],
10474 + "additionalProperties": false
10475 + },
10476 + {
10477 + "type": "object",
10478 + "properties": {
10479 + "type": {
10480 + "type": "string",
10481 + "enum": [
10482 + "prompt_injection_check"
10483 + ]
10484 + },
10485 + "action": {
10486 + "type": "string",
10487 + "enum": [
10488 + "block"
10489 + ]
10490 + }
10491 + },
10492 + "required": [
10493 + "type",
10494 + "action"
10495 + ],
10496 + "additionalProperties": false,
10497 + "description": "Blocks a tool response that tries to manipulate the agent: override its instructions, change its role, or make it take actions the user didn't ask for."
10498 + }
10499 + ]
10500 + }
10501 + },
10502 + "required": [
10503 + "type",
10504 + "id",
10505 + "applies_to",
10506 + "handler"
10507 + ],
10508 + "additionalProperties": false
10509 + }
10510 + ]
10511 + },
10512 + "maxItems": 20,
10513 + "description": "Hooks that run on this session's tool calls."
10514 + },
10515 + "preload": {
10516 + "type": "object",
10517 + "properties": {
10518 + "tools": {
10519 + "anyOf": [
10520 + {
10521 + "type": "array",
10522 + "items": {
10523 + "type": "string"
10524 + }
10525 + },
10526 + {
10527 + "type": "string",
10528 + "enum": [
10529 + "all"
10530 + ]
10531 + }
10532 + ],
10533 + "description": "Explicit preloaded tool slugs, or \"all\" when the session dynamically exposes all app tools allowed by its filters."
10534 + }
10535 + },
10536 + "required": [
10537 + "tools"
10538 + ],
10539 + "additionalProperties": false,
10540 + "description": "Preload configuration. Explicit slugs are returned as an array; dynamic preload is returned as \"all\"."
10541 + },
10542 + "connected_accounts": {
10543 + "type": "object",
10544 + "additionalProperties": {
10545 + "type": "array",
10546 + "items": {
10547 + "type": "string",
10548 + "format": "connectedAccountId"
10549 + },
10550 + "minItems": 1
10551 + },
10552 + "description": "Per-toolkit connected account overrides (array of nano-IDs). Multi-account sessions can pin more than one account per toolkit; otherwise length is 1."
10553 + },
10554 + "search": {
10555 + "type": "object",
10556 + "properties": {
10557 + "enable": {
10558 + "type": "boolean",
10559 + "default": true
10560 + }
10561 + },
10562 + "description": "Search helper configuration"
10563 + },
10564 + "execute": {
10565 + "type": "object",
10566 + "properties": {
10567 + "enable_multi_execute": {
10568 + "type": "boolean",
10569 + "default": true
10570 + }
10571 + },
10572 + "description": "Execute helper configuration"
10573 + }
10574 + },
10575 + "required": [
10576 + "user_id",
10577 + "instant",
10578 + "preload",
10579 + "search",
10580 + "execute"
10581 + ],
10582 + "description": "The configuration used to create this session"
10583 + },
10584 + "config_version": {
10585 + "type": "integer",
10586 + "description": "Monotonic version of the config. Incremented on each PATCH. Use for optimistic concurrency control."
10587 + },
10588 + "experimental": {
10589 + "type": "object",
10590 + "properties": {
10591 + "assistive_prompt": {
10592 + "type": "string",
10593 + "description": "The assistive system prompt for the tool router session"
10594 + },
10595 + "custom_toolkits": {
10596 + "type": "array",
10597 + "items": {
10598 + "type": "object",
10599 + "properties": {
10600 + "slug": {
10601 + "type": "string",
10602 + "minLength": 1,
10603 + "pattern": "^[a-zA-Z0-9_-]+$"
10604 + },
10605 + "name": {
10606 + "type": "string",
10607 + "minLength": 1,
10608 + "maxLength": 128
10609 + },
10610 + "description": {
10611 + "type": "string",
10612 + "minLength": 1,
10613 + "maxLength": 2048
10614 + },
10615 + "tools": {
10616 + "type": "array",
10617 + "items": {
10618 + "type": "object",
10619 + "properties": {
10620 + "slug": {
10621 + "type": "string",
10622 + "description": "Prefixed tool slug (e.g. LOCAL_CRM_FIND_CUSTOMER)"
10623 + },
10624 + "name": {
10625 + "type": "string",
10626 + "minLength": 1,
10627 + "maxLength": 128
10628 + },
10629 + "description": {
10630 + "type": "string",
10631 "minLength": 1,
10632 "maxLength": 5120
10633 },
@@ -10915,22 +11526,221 @@
11526 "additionalProperties": false
11527 },
11528 "hooks": {
10918 - "allOf": [
10919 - {
10920 - "$ref": "#/components/schemas/SessionHooks"
10921 - },
10922 - {
10923 - "nullable": true,
10924 - "description": "Hooks that run on this session's tool calls. A hook can block a call before it runs, or block its result before the agent sees it.",
10925 - "type": "object"
10926 - }
10927 - ]
10928 - },
10929 - "experimental": {
10930 - "type": "object",
11529 + "type": "array",
11530 "nullable": true,
10932 - "properties": {
10933 - "permissions": {
11531 + "items": {
11532 + "oneOf": [
11533 + {
11534 + "type": "object",
11535 + "properties": {
11536 + "type": {
11537 + "type": "string",
11538 + "enum": [
11539 + "before_execute"
11540 + ]
11541 + },
11542 + "id": {
11543 + "type": "string",
11544 + "pattern": "^[a-z0-9_-]{1,64}$",
11545 + "description": "Unique within the session. Shows up in results and logs."
11546 + },
11547 + "name": {
11548 + "type": "string",
11549 + "minLength": 1,
11550 + "maxLength": 120,
11551 + "description": "A readable name. The agent sees it when this hook blocks a call."
11552 + },
11553 + "applies_to": {
11554 + "anyOf": [
11555 + {
11556 + "type": "string",
11557 + "enum": [
11558 + "all"
11559 + ]
11560 + },
11561 + {
11562 + "type": "object",
11563 + "properties": {
11564 + "toolkits": {
11565 + "type": "array",
11566 + "items": {
11567 + "type": "string",
11568 + "minLength": 1
11569 + },
11570 + "minItems": 1,
11571 + "description": "Toolkit slugs"
11572 + }
11573 + },
11574 + "required": [
11575 + "toolkits"
11576 + ],
11577 + "additionalProperties": false
11578 + }
11579 + ],
11580 + "description": "Which tools the hook covers: \"all\" for all of them, or only the listed toolkits."
11581 + },
11582 + "handler": {
11583 + "type": "object",
11584 + "properties": {
11585 + "type": {
11586 + "type": "string",
11587 + "enum": [
11588 + "condition_check"
11589 + ]
11590 + },
11591 + "condition": {
11592 + "type": "string",
11593 + "minLength": 1,
11594 + "maxLength": 2000,
11595 + "description": "What to block, written as a plain sentence. For example: \"Sending email to anyone outside example.org\"."
11596 + },
11597 + "action": {
11598 + "type": "string",
11599 + "enum": [
11600 + "block"
11601 + ]
11602 + }
11603 + },
11604 + "required": [
11605 + "type",
11606 + "condition",
11607 + "action"
11608 + ],
11609 + "additionalProperties": false
11610 + }
11611 + },
11612 + "required": [
11613 + "type",
11614 + "id",
11615 + "applies_to",
11616 + "handler"
11617 + ],
11618 + "additionalProperties": false
11619 + },
11620 + {
11621 + "type": "object",
11622 + "properties": {
11623 + "type": {
11624 + "type": "string",
11625 + "enum": [
11626 + "after_execute"
11627 + ]
11628 + },
11629 + "id": {
11630 + "type": "string",
11631 + "pattern": "^[a-z0-9_-]{1,64}$",
11632 + "description": "Unique within the session. Shows up in results and logs."
11633 + },
11634 + "name": {
11635 + "type": "string",
11636 + "minLength": 1,
11637 + "maxLength": 120,
11638 + "description": "A readable name. The agent sees it when this hook blocks a call."
11639 + },
11640 + "applies_to": {
11641 + "anyOf": [
11642 + {
11643 + "type": "string",
11644 + "enum": [
11645 + "all"
11646 + ]
11647 + },
11648 + {
11649 + "type": "object",
11650 + "properties": {
11651 + "toolkits": {
11652 + "type": "array",
11653 + "items": {
11654 + "type": "string",
11655 + "minLength": 1
11656 + },
11657 + "minItems": 1,
11658 + "description": "Toolkit slugs"
11659 + }
11660 + },
11661 + "required": [
11662 + "toolkits"
11663 + ],
11664 + "additionalProperties": false
11665 + }
11666 + ],
11667 + "description": "Which tools the hook covers: \"all\" for all of them, or only the listed toolkits."
11668 + },
11669 + "handler": {
11670 + "oneOf": [
11671 + {
11672 + "type": "object",
11673 + "properties": {
11674 + "type": {
11675 + "type": "string",
11676 + "enum": [
11677 + "condition_check"
11678 + ]
11679 + },
11680 + "condition": {
11681 + "type": "string",
11682 + "minLength": 1,
11683 + "maxLength": 2000,
11684 + "description": "What to block, written as a plain sentence. For example: \"Sending email to anyone outside example.org\"."
11685 + },
11686 + "action": {
11687 + "type": "string",
11688 + "enum": [
11689 + "block"
11690 + ]
11691 + }
11692 + },
11693 + "required": [
11694 + "type",
11695 + "condition",
11696 + "action"
11697 + ],
11698 + "additionalProperties": false
11699 + },
11700 + {
11701 + "type": "object",
11702 + "properties": {
11703 + "type": {
11704 + "type": "string",
11705 + "enum": [
11706 + "prompt_injection_check"
11707 + ]
11708 + },
11709 + "action": {
11710 + "type": "string",
11711 + "enum": [
11712 + "block"
11713 + ]
11714 + }
11715 + },
11716 + "required": [
11717 + "type",
11718 + "action"
11719 + ],
11720 + "additionalProperties": false,
11721 + "description": "Blocks a tool response that tries to manipulate the agent: override its instructions, change its role, or make it take actions the user didn't ask for."
11722 + }
11723 + ]
11724 + }
11725 + },
11726 + "required": [
11727 + "type",
11728 + "id",
11729 + "applies_to",
11730 + "handler"
11731 + ],
11732 + "additionalProperties": false
11733 + }
11734 + ]
11735 + },
11736 + "maxItems": 20,
11737 + "description": "Hooks that run on this session's tool calls. A hook can block a call before it runs, or block its result before the agent sees it."
11738 + },
11739 + "experimental": {
11740 + "type": "object",
11741 + "nullable": true,
11742 + "properties": {
11743 + "permissions": {
11744 "type": "object",
11745 "properties": {
11746 "default": {
@@ -11398,137 +12208,344 @@
12208 }
12209 },
12210 "required": [
11401 - "require_approval"
12211 + "require_approval"
12212 + ],
12213 + "additionalProperties": false
12214 + }
12215 + ]
12216 + },
12217 + "description": "Tool-level configuration per toolkit: tools to enable or disable, or tools that need approval"
12218 + },
12219 + "tags": {
12220 + "type": "object",
12221 + "properties": {
12222 + "enabled": {
12223 + "type": "array",
12224 + "items": {
12225 + "type": "string",
12226 + "enum": [
12227 + "readOnlyHint",
12228 + "createHint",
12229 + "updateHint",
12230 + "destructiveHint",
12231 + "idempotentHint",
12232 + "openWorldHint"
12233 + ]
12234 + },
12235 + "description": "Tags that the tool must have at least one of"
12236 + },
12237 + "disabled": {
12238 + "type": "array",
12239 + "items": {
12240 + "type": "string",
12241 + "enum": [
12242 + "readOnlyHint",
12243 + "createHint",
12244 + "updateHint",
12245 + "destructiveHint",
12246 + "idempotentHint",
12247 + "openWorldHint"
12248 + ]
12249 + },
12250 + "description": "Tags that the tool must NOT have any of"
12251 + },
12252 + "require_approval": {
12253 + "type": "array",
12254 + "items": {
12255 + "type": "string",
12256 + "enum": [
12257 + "readOnlyHint",
12258 + "createHint",
12259 + "updateHint",
12260 + "destructiveHint",
12261 + "idempotentHint",
12262 + "openWorldHint"
12263 + ]
12264 + },
12265 + "description": "Tool calls matched here pause until the user approves them.",
12266 + "x-experimental": true
12267 + }
12268 + },
12269 + "description": "MCP tool annotation hints for filtering tools with enabled/disabled support, and experimentally the tags whose tools need approval. enabled: tags that the tool must have at least one of. disabled: tags that the tool must NOT have any of. Both conditions must be satisfied."
12270 + },
12271 + "workbench": {
12272 + "type": "object",
12273 + "properties": {
12274 + "enable": {
12275 + "type": "boolean",
12276 + "description": "Whether the workbench (code execution sandbox) is enabled. When false, COMPOSIO_REMOTE_WORKBENCH and COMPOSIO_REMOTE_BASH_TOOL are not exposed."
12277 + },
12278 + "tool_execution_enabled": {
12279 + "type": "boolean",
12280 + "description": "Whether tool execution is enabled in the workbench"
12281 + },
12282 + "proxy_execution_enabled": {
12283 + "type": "boolean",
12284 + "description": "Whether proxy execution is enabled in the workbench"
12285 + },
12286 + "auto_offload_threshold": {
12287 + "type": "number",
12288 + "minimum": 0,
12289 + "exclusiveMinimum": true,
12290 + "description": "Character threshold after which tool execution response are saved to a file in workbench. Default is 20k."
12291 + },
12292 + "sandbox_size": {
12293 + "type": "string",
12294 + "enum": [
12295 + "standard",
12296 + "medium",
12297 + "large",
12298 + "xlarge"
12299 + ],
12300 + "description": "Sandbox compute tier: standard (1 vCPU / 1 GB), medium (2 vCPU / 2 GB), large (4 vCPU / 4 GB), xlarge (8 vCPU / 8 GB). Defaults to standard."
12301 + }
12302 + },
12303 + "default": {
12304 + "enable": true,
12305 + "proxy_execution_enabled": true
12306 + },
12307 + "description": "Workbench configuration"
12308 + },
12309 + "multi_account": {
12310 + "type": "object",
12311 + "properties": {
12312 + "enable": {
12313 + "type": "boolean",
12314 + "description": "When true, enables multi-account mode for this session. When not set, falls back to org/project-level configuration."
12315 + },
12316 + "max_accounts_per_toolkit": {
12317 + "type": "integer",
12318 + "description": "Maximum number of connected accounts allowed per toolkit. Defaults to 5 when multi-account is enabled."
12319 + },
12320 + "require_explicit_selection": {
12321 + "type": "boolean",
12322 + "description": "When true, require explicit account selection when multiple accounts are connected. When false (default), use the first/default account."
12323 + }
12324 + },
12325 + "description": "Multi-account configuration for this session."
12326 + },
12327 + "proxy_execute": {
12328 + "type": "object",
12329 + "properties": {
12330 + "enable": {
12331 + "type": "boolean",
12332 + "description": "When true, enables proxy execute outside the workbench. When false, also disables proxy execution inside the workbench."
12333 + }
12334 + },
12335 + "required": [
12336 + "enable"
12337 + ],
12338 + "description": "Proxy execute configuration for this session. Omitted when not set."
12339 + },
12340 + "hooks": {
12341 + "type": "array",
12342 + "items": {
12343 + "oneOf": [
12344 + {
12345 + "type": "object",
12346 + "properties": {
12347 + "type": {
12348 + "type": "string",
12349 + "enum": [
12350 + "before_execute"
12351 + ]
12352 + },
12353 + "id": {
12354 + "type": "string",
12355 + "pattern": "^[a-z0-9_-]{1,64}$",
12356 + "description": "Unique within the session. Shows up in results and logs."
12357 + },
12358 + "name": {
12359 + "type": "string",
12360 + "minLength": 1,
12361 + "maxLength": 120,
12362 + "description": "A readable name. The agent sees it when this hook blocks a call."
12363 + },
12364 + "applies_to": {
12365 + "anyOf": [
12366 + {
12367 + "type": "string",
12368 + "enum": [
12369 + "all"
12370 + ]
12371 + },
12372 + {
12373 + "type": "object",
12374 + "properties": {
12375 + "toolkits": {
12376 + "type": "array",
12377 + "items": {
12378 + "type": "string",
12379 + "minLength": 1
12380 + },
12381 + "minItems": 1,
12382 + "description": "Toolkit slugs"
12383 + }
12384 + },
12385 + "required": [
12386 + "toolkits"
12387 + ],
12388 + "additionalProperties": false
12389 + }
12390 + ],
12391 + "description": "Which tools the hook covers: \"all\" for all of them, or only the listed toolkits."
12392 + },
12393 + "handler": {
12394 + "type": "object",
12395 + "properties": {
12396 + "type": {
12397 + "type": "string",
12398 + "enum": [
12399 + "condition_check"
12400 + ]
12401 + },
12402 + "condition": {
12403 + "type": "string",
12404 + "minLength": 1,
12405 + "maxLength": 2000,
12406 + "description": "What to block, written as a plain sentence. For example: \"Sending email to anyone outside example.org\"."
12407 + },
12408 + "action": {
12409 + "type": "string",
12410 + "enum": [
12411 + "block"
12412 + ]
12413 + }
12414 + },
12415 + "required": [
12416 + "type",
12417 + "condition",
12418 + "action"
12419 + ],
12420 + "additionalProperties": false
12421 + }
12422 + },
12423 + "required": [
12424 + "type",
12425 + "id",
12426 + "applies_to",
12427 + "handler"
12428 + ],
12429 + "additionalProperties": false
12430 + },
12431 + {
12432 + "type": "object",
12433 + "properties": {
12434 + "type": {
12435 + "type": "string",
12436 + "enum": [
12437 + "after_execute"
12438 + ]
12439 + },
12440 + "id": {
12441 + "type": "string",
12442 + "pattern": "^[a-z0-9_-]{1,64}$",
12443 + "description": "Unique within the session. Shows up in results and logs."
12444 + },
12445 + "name": {
12446 + "type": "string",
12447 + "minLength": 1,
12448 + "maxLength": 120,
12449 + "description": "A readable name. The agent sees it when this hook blocks a call."
12450 + },
12451 + "applies_to": {
12452 + "anyOf": [
12453 + {
12454 + "type": "string",
12455 + "enum": [
12456 + "all"
12457 + ]
12458 + },
12459 + {
12460 + "type": "object",
12461 + "properties": {
12462 + "toolkits": {
12463 + "type": "array",
12464 + "items": {
12465 + "type": "string",
12466 + "minLength": 1
12467 + },
12468 + "minItems": 1,
12469 + "description": "Toolkit slugs"
12470 + }
12471 + },
12472 + "required": [
12473 + "toolkits"
12474 + ],
12475 + "additionalProperties": false
12476 + }
12477 + ],
12478 + "description": "Which tools the hook covers: \"all\" for all of them, or only the listed toolkits."
12479 + },
12480 + "handler": {
12481 + "oneOf": [
12482 + {
12483 + "type": "object",
12484 + "properties": {
12485 + "type": {
12486 + "type": "string",
12487 + "enum": [
12488 + "condition_check"
12489 + ]
12490 + },
12491 + "condition": {
12492 + "type": "string",
12493 + "minLength": 1,
12494 + "maxLength": 2000,
12495 + "description": "What to block, written as a plain sentence. For example: \"Sending email to anyone outside example.org\"."
12496 + },
12497 + "action": {
12498 + "type": "string",
12499 + "enum": [
12500 + "block"
12501 + ]
12502 + }
12503 + },
12504 + "required": [
12505 + "type",
12506 + "condition",
12507 + "action"
12508 + ],
12509 + "additionalProperties": false
12510 + },
12511 + {
12512 + "type": "object",
12513 + "properties": {
12514 + "type": {
12515 + "type": "string",
12516 + "enum": [
12517 + "prompt_injection_check"
12518 + ]
12519 + },
12520 + "action": {
12521 + "type": "string",
12522 + "enum": [
12523 + "block"
12524 + ]
12525 + }
12526 + },
12527 + "required": [
12528 + "type",
12529 + "action"
12530 + ],
12531 + "additionalProperties": false,
12532 + "description": "Blocks a tool response that tries to manipulate the agent: override its instructions, change its role, or make it take actions the user didn't ask for."
12533 + }
12534 + ]
12535 + }
12536 + },
12537 + "required": [
12538 + "type",
12539 + "id",
12540 + "applies_to",
12541 + "handler"
12542 ],
12543 "additionalProperties": false
12544 }
12545 ]
12546 },
11407 - "description": "Tool-level configuration per toolkit: tools to enable or disable, or tools that need approval"
11408 - },
11409 - "tags": {
11410 - "type": "object",
11411 - "properties": {
11412 - "enabled": {
11413 - "type": "array",
11414 - "items": {
11415 - "type": "string",
11416 - "enum": [
11417 - "readOnlyHint",
11418 - "createHint",
11419 - "updateHint",
11420 - "destructiveHint",
11421 - "idempotentHint",
11422 - "openWorldHint"
11423 - ]
11424 - },
11425 - "description": "Tags that the tool must have at least one of"
11426 - },
11427 - "disabled": {
11428 - "type": "array",
11429 - "items": {
11430 - "type": "string",
11431 - "enum": [
11432 - "readOnlyHint",
11433 - "createHint",
11434 - "updateHint",
11435 - "destructiveHint",
11436 - "idempotentHint",
11437 - "openWorldHint"
11438 - ]
11439 - },
11440 - "description": "Tags that the tool must NOT have any of"
11441 - },
11442 - "require_approval": {
11443 - "type": "array",
11444 - "items": {
11445 - "type": "string",
11446 - "enum": [
11447 - "readOnlyHint",
11448 - "createHint",
11449 - "updateHint",
11450 - "destructiveHint",
11451 - "idempotentHint",
11452 - "openWorldHint"
11453 - ]
11454 - },
11455 - "description": "Tool calls matched here pause until the user approves them.",
11456 - "x-experimental": true
11457 - }
11458 - },
11459 - "description": "MCP tool annotation hints for filtering tools with enabled/disabled support, and experimentally the tags whose tools need approval. enabled: tags that the tool must have at least one of. disabled: tags that the tool must NOT have any of. Both conditions must be satisfied."
11460 - },
11461 - "workbench": {
11462 - "type": "object",
11463 - "properties": {
11464 - "enable": {
11465 - "type": "boolean",
11466 - "description": "Whether the workbench (code execution sandbox) is enabled. When false, COMPOSIO_REMOTE_WORKBENCH and COMPOSIO_REMOTE_BASH_TOOL are not exposed."
11467 - },
11468 - "tool_execution_enabled": {
11469 - "type": "boolean",
11470 - "description": "Whether tool execution is enabled in the workbench"
11471 - },
11472 - "proxy_execution_enabled": {
11473 - "type": "boolean",
11474 - "description": "Whether proxy execution is enabled in the workbench"
11475 - },
11476 - "auto_offload_threshold": {
11477 - "type": "number",
11478 - "minimum": 0,
11479 - "exclusiveMinimum": true,
11480 - "description": "Character threshold after which tool execution response are saved to a file in workbench. Default is 20k."
11481 - },
11482 - "sandbox_size": {
11483 - "type": "string",
11484 - "enum": [
11485 - "standard",
11486 - "medium",
11487 - "large",
11488 - "xlarge"
11489 - ],
11490 - "description": "Sandbox compute tier: standard (1 vCPU / 1 GB), medium (2 vCPU / 2 GB), large (4 vCPU / 4 GB), xlarge (8 vCPU / 8 GB). Defaults to standard."
11491 - }
11492 - },
11493 - "default": {
11494 - "enable": true,
11495 - "proxy_execution_enabled": true
11496 - },
11497 - "description": "Workbench configuration"
11498 - },
11499 - "multi_account": {
11500 - "type": "object",
11501 - "properties": {
11502 - "enable": {
11503 - "type": "boolean",
11504 - "description": "When true, enables multi-account mode for this session. When not set, falls back to org/project-level configuration."
11505 - },
11506 - "max_accounts_per_toolkit": {
11507 - "type": "integer",
11508 - "description": "Maximum number of connected accounts allowed per toolkit. Defaults to 5 when multi-account is enabled."
11509 - },
11510 - "require_explicit_selection": {
11511 - "type": "boolean",
11512 - "description": "When true, require explicit account selection when multiple accounts are connected. When false (default), use the first/default account."
11513 - }
11514 - },
11515 - "description": "Multi-account configuration for this session."
11516 - },
11517 - "proxy_execute": {
11518 - "type": "object",
11519 - "properties": {
11520 - "enable": {
11521 - "type": "boolean",
11522 - "description": "When true, enables proxy execute outside the workbench. When false, also disables proxy execution inside the workbench."
11523 - }
11524 - },
11525 - "required": [
11526 - "enable"
11527 - ],
11528 - "description": "Proxy execute configuration for this session. Omitted when not set."
11529 - },
11530 - "hooks": {
11531 - "$ref": "#/components/schemas/SessionHooks"
12547 + "maxItems": 20,
12548 + "description": "Hooks that run on this session's tool calls."
12549 },
12550 "preload": {
12551 "type": "object",
@@ -12726,7 +13743,214 @@
13743 "description": "Proxy execute configuration for this session. Omitted when not set."
13744 },
13745 "hooks": {
12729 - "$ref": "#/components/schemas/SessionHooks"
13746 + "type": "array",
13747 + "items": {
13748 + "oneOf": [
13749 + {
13750 + "type": "object",
13751 + "properties": {
13752 + "type": {
13753 + "type": "string",
13754 + "enum": [
13755 + "before_execute"
13756 + ]
13757 + },
13758 + "id": {
13759 + "type": "string",
13760 + "pattern": "^[a-z0-9_-]{1,64}$",
13761 + "description": "Unique within the session. Shows up in results and logs."
13762 + },
13763 + "name": {
13764 + "type": "string",
13765 + "minLength": 1,
13766 + "maxLength": 120,
13767 + "description": "A readable name. The agent sees it when this hook blocks a call."
13768 + },
13769 + "applies_to": {
13770 + "anyOf": [
13771 + {
13772 + "type": "string",
13773 + "enum": [
13774 + "all"
13775 + ]
13776 + },
13777 + {
13778 + "type": "object",
13779 + "properties": {
13780 + "toolkits": {
13781 + "type": "array",
13782 + "items": {
13783 + "type": "string",
13784 + "minLength": 1
13785 + },
13786 + "minItems": 1,
13787 + "description": "Toolkit slugs"
13788 + }
13789 + },
13790 + "required": [
13791 + "toolkits"
13792 + ],
13793 + "additionalProperties": false
13794 + }
13795 + ],
13796 + "description": "Which tools the hook covers: \"all\" for all of them, or only the listed toolkits."
13797 + },
13798 + "handler": {
13799 + "type": "object",
13800 + "properties": {
13801 + "type": {
13802 + "type": "string",
13803 + "enum": [
13804 + "condition_check"
13805 + ]
13806 + },
13807 + "condition": {
13808 + "type": "string",
13809 + "minLength": 1,
13810 + "maxLength": 2000,
13811 + "description": "What to block, written as a plain sentence. For example: \"Sending email to anyone outside example.org\"."
13812 + },
13813 + "action": {
13814 + "type": "string",
13815 + "enum": [
13816 + "block"
13817 + ]
13818 + }
13819 + },
13820 + "required": [
13821 + "type",
13822 + "condition",
13823 + "action"
13824 + ],
13825 + "additionalProperties": false
13826 + }
13827 + },
13828 + "required": [
13829 + "type",
13830 + "id",
13831 + "applies_to",
13832 + "handler"
13833 + ],
13834 + "additionalProperties": false
13835 + },
13836 + {
13837 + "type": "object",
13838 + "properties": {
13839 + "type": {
13840 + "type": "string",
13841 + "enum": [
13842 + "after_execute"
13843 + ]
13844 + },
13845 + "id": {
13846 + "type": "string",
13847 + "pattern": "^[a-z0-9_-]{1,64}$",
13848 + "description": "Unique within the session. Shows up in results and logs."
13849 + },
13850 + "name": {
13851 + "type": "string",
13852 + "minLength": 1,
13853 + "maxLength": 120,
13854 + "description": "A readable name. The agent sees it when this hook blocks a call."
13855 + },
13856 + "applies_to": {
13857 + "anyOf": [
13858 + {
13859 + "type": "string",
13860 + "enum": [
13861 + "all"
13862 + ]
13863 + },
13864 + {
13865 + "type": "object",
13866 + "properties": {
13867 + "toolkits": {
13868 + "type": "array",
13869 + "items": {
13870 + "type": "string",
13871 + "minLength": 1
13872 + },
13873 + "minItems": 1,
13874 + "description": "Toolkit slugs"
13875 + }
13876 + },
13877 + "required": [
13878 + "toolkits"
13879 + ],
13880 + "additionalProperties": false
13881 + }
13882 + ],
13883 + "description": "Which tools the hook covers: \"all\" for all of them, or only the listed toolkits."
13884 + },
13885 + "handler": {
13886 + "oneOf": [
13887 + {
13888 + "type": "object",
13889 + "properties": {
13890 + "type": {
13891 + "type": "string",
13892 + "enum": [
13893 + "condition_check"
13894 + ]
13895 + },
13896 + "condition": {
13897 + "type": "string",
13898 + "minLength": 1,
13899 + "maxLength": 2000,
13900 + "description": "What to block, written as a plain sentence. For example: \"Sending email to anyone outside example.org\"."
13901 + },
13902 + "action": {
13903 + "type": "string",
13904 + "enum": [
13905 + "block"
13906 + ]
13907 + }
13908 + },
13909 + "required": [
13910 + "type",
13911 + "condition",
13912 + "action"
13913 + ],
13914 + "additionalProperties": false
13915 + },
13916 + {
13917 + "type": "object",
13918 + "properties": {
13919 + "type": {
13920 + "type": "string",
13921 + "enum": [
13922 + "prompt_injection_check"
13923 + ]
13924 + },
13925 + "action": {
13926 + "type": "string",
13927 + "enum": [
13928 + "block"
13929 + ]
13930 + }
13931 + },
13932 + "required": [
13933 + "type",
13934 + "action"
13935 + ],
13936 + "additionalProperties": false,
13937 + "description": "Blocks a tool response that tries to manipulate the agent: override its instructions, change its role, or make it take actions the user didn't ask for."
13938 + }
13939 + ]
13940 + }
13941 + },
13942 + "required": [
13943 + "type",
13944 + "id",
13945 + "applies_to",
13946 + "handler"
13947 + ],
13948 + "additionalProperties": false
13949 + }
13950 + ]
13951 + },
13952 + "maxItems": 20,
13953 + "description": "Hooks that run on this session's tool calls."
13954 },
13955 "preload": {
13956 "type": "object",
@@ -20523,6 +21747,10 @@
21747 "additionalProperties": {},
21748 "description": "Link-auth theme for the hosted connect page. Opaque to the API; the dashboard owns the token vocabulary and all value validation."
21749 },
21750 + "enable_instant": {
21751 + "type": "boolean",
21752 + "description": "Enable Instant Toolkits for this project."
21753 + },
21754 "zdr_enabled": {
21755 "type": "boolean",
21756 "description": "Enable Zero Data Retention for the new project. Hobby cannot enable it. Enterprise defaults to enabled; other paid plans default to disabled. An explicit value overrides the default."