@composio/client 2.0.0-rc.21 → 2.0.0-rc.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (184) hide show
  1. package/README.md +51 -1
  2. package/dist/_internal-7BQNRB9A.d.mts +265 -0
  3. package/dist/{api-key-revocation-BB3FTdR3.d.mts → _internal-UUxDozdb.d.mts} +952 -268
  4. package/dist/effect/internal.d.mts +9 -0
  5. package/dist/effect/schemas/{cli → _internal/cli}/create-session.d.mts +2 -2
  6. package/dist/effect/schemas/{cli → _internal/cli}/create-session.mjs +2 -2
  7. package/dist/effect/schemas/{cli → _internal/cli}/get-session.d.mts +2 -2
  8. package/dist/effect/schemas/{cli → _internal/cli}/get-session.mjs +3 -3
  9. package/dist/effect/schemas/{cli → _internal/cli}/realtime/auth.d.mts +2 -2
  10. package/dist/effect/schemas/{cli → _internal/cli}/realtime/auth.mjs +2 -2
  11. package/dist/effect/schemas/{cli → _internal/cli}/realtime/credentials.d.mts +2 -2
  12. package/dist/effect/schemas/{cli → _internal/cli}/realtime/credentials.mjs +2 -2
  13. package/dist/effect/schemas/{logs → _internal/logs}/tools/list-fields.d.mts +2 -2
  14. package/dist/effect/schemas/{logs → _internal/logs}/tools/list-fields.mjs +2 -2
  15. package/dist/effect/schemas/{logs → _internal/logs}/tools/list.d.mts +2 -2
  16. package/dist/effect/schemas/{logs → _internal/logs}/tools/list.mjs +2 -2
  17. package/dist/effect/schemas/{logs → _internal/logs}/tools/retrieve.d.mts +2 -2
  18. package/dist/effect/schemas/{logs → _internal/logs}/tools/retrieve.mjs +2 -2
  19. package/dist/effect/schemas/{logs → _internal/logs}/triggers/list.d.mts +2 -2
  20. package/dist/effect/schemas/{logs → _internal/logs}/triggers/list.mjs +3 -3
  21. package/dist/effect/schemas/{logs → _internal/logs}/triggers/retrieve.d.mts +2 -2
  22. package/dist/effect/schemas/{logs → _internal/logs}/triggers/retrieve.mjs +3 -3
  23. package/dist/effect/schemas/{org → _internal/org}/consumer/list-connected-toolkits.d.mts +2 -2
  24. package/dist/effect/schemas/{org → _internal/org}/consumer/list-connected-toolkits.mjs +2 -2
  25. package/dist/effect/schemas/{org → _internal/org}/consumer/project/resolve.d.mts +3 -2
  26. package/dist/effect/schemas/{org → _internal/org}/consumer/project/resolve.mjs +4 -3
  27. package/dist/effect/schemas/auth-configs/list.d.mts +1 -0
  28. package/dist/effect/schemas/auth-configs/list.mjs +2 -1
  29. package/dist/effect/schemas/auth-configs/retrieve.d.mts +1 -0
  30. package/dist/effect/schemas/auth-configs/retrieve.mjs +2 -1
  31. package/dist/effect/schemas/components/block-reason.d.mts +12 -0
  32. package/dist/effect/schemas/components/block-reason.mjs +14 -0
  33. package/dist/effect/schemas/components/execute-blocked.d.mts +30 -0
  34. package/dist/effect/schemas/components/execute-blocked.mjs +24 -0
  35. package/dist/effect/schemas/components/execute-completed.d.mts +8 -0
  36. package/dist/effect/schemas/components/execute-completed.mjs +3 -1
  37. package/dist/effect/schemas/components/execute-failed.d.mts +8 -0
  38. package/dist/effect/schemas/components/execute-failed.mjs +3 -1
  39. package/dist/effect/schemas/components/hook-result.d.mts +13 -0
  40. package/dist/effect/schemas/components/hook-result.mjs +15 -0
  41. package/dist/effect/schemas/components/proxy-execute-blocked.d.mts +24 -0
  42. package/dist/effect/schemas/components/proxy-execute-blocked.mjs +18 -0
  43. package/dist/effect/schemas/components/proxy-execute-completed.d.mts +8 -0
  44. package/dist/effect/schemas/components/proxy-execute-completed.mjs +3 -1
  45. package/dist/effect/schemas/components/session-create-response-config.d.mts +28 -0
  46. package/dist/effect/schemas/components/session-create-response-config.mjs +24 -0
  47. package/dist/effect/schemas/components/tool-router-session-v31-config-history-list-response.d.mts +28 -0
  48. package/dist/effect/schemas/components/tool-router-session-v31-config-history-list-response.mjs +24 -0
  49. package/dist/effect/schemas/session-configs/retrieve.d.mts +11 -0
  50. package/dist/effect/schemas/session-configs/retrieve.mjs +59 -23
  51. package/dist/effect/schemas/tool-router/session/attach.d.mts +28 -0
  52. package/dist/effect/schemas/tool-router/session/config-history.d.mts +28 -0
  53. package/dist/effect/schemas/tool-router/session/create.d.mts +28 -0
  54. package/dist/effect/schemas/tool-router/session/execute-meta.d.mts +40 -0
  55. package/dist/effect/schemas/tool-router/session/execute-meta.mjs +2 -0
  56. package/dist/effect/schemas/tool-router/session/execute.d.mts +40 -0
  57. package/dist/effect/schemas/tool-router/session/execute.mjs +2 -0
  58. package/dist/effect/schemas/tool-router/session/patch.d.mts +28 -0
  59. package/dist/effect/schemas/tool-router/session/proxy-execute.d.mts +26 -0
  60. package/dist/effect/schemas/tool-router/session/proxy-execute.mjs +6 -1
  61. package/dist/effect/schemas/tool-router/session/retrieve.d.mts +28 -0
  62. package/dist/effect/schemas/triggers-types/list.d.mts +1 -0
  63. package/dist/effect/schemas/triggers-types/list.mjs +5 -1
  64. package/dist/effect/schemas/triggers-types/retrieve.d.mts +1 -0
  65. package/dist/effect/schemas/triggers-types/retrieve.mjs +5 -1
  66. package/dist/effect/schemas.d.mts +451 -189
  67. package/dist/effect/schemas.mjs +11 -11
  68. package/dist/effect.d.mts +9 -246
  69. package/dist/effect.mjs +122 -102
  70. package/dist/{environments-CmxYUUsW.mjs → environments-DIBy8nYx.mjs} +18 -10
  71. package/dist/{environments-BXSnADKo.d.mts → environments-Dz5jsC_v.d.mts} +1 -1
  72. package/dist/{generated-operations-BNRn8az6.mjs → generated-operations-igWp3zha.mjs} +21 -5
  73. package/dist/index.d.mts +2 -2
  74. package/dist/index.mjs +4 -2
  75. package/dist/internal.d.mts +9 -0
  76. package/dist/internal.mjs +1 -0
  77. package/dist/resources/_internal/_internal.d.mts +2 -0
  78. package/dist/resources/_internal/_internal.mjs +14 -0
  79. package/dist/resources/_internal/cli/cli.d.mts +2 -0
  80. package/dist/resources/_internal/cli/cli.mjs +25 -0
  81. package/dist/resources/_internal/cli/realtime.d.mts +2 -0
  82. package/dist/resources/{cli → _internal/cli}/realtime.mjs +4 -4
  83. package/dist/resources/_internal/cli.d.mts +2 -0
  84. package/dist/resources/_internal/cli.mjs +1 -0
  85. package/dist/resources/_internal/logs/logs.d.mts +2 -0
  86. package/dist/resources/_internal/logs/logs.mjs +12 -0
  87. package/dist/resources/_internal/logs/tools.d.mts +2 -0
  88. package/dist/resources/{logs → _internal/logs}/tools.mjs +5 -5
  89. package/dist/resources/_internal/logs/triggers.d.mts +2 -0
  90. package/dist/resources/{logs → _internal/logs}/triggers.mjs +4 -4
  91. package/dist/resources/_internal/logs.d.mts +2 -0
  92. package/dist/resources/_internal/logs.mjs +1 -0
  93. package/dist/resources/_internal/org/consumer/consumer.d.mts +2 -0
  94. package/dist/resources/{org → _internal/org}/consumer/consumer.mjs +3 -3
  95. package/dist/resources/_internal/org/consumer/project.d.mts +2 -0
  96. package/dist/resources/{org → _internal/org}/consumer/project.mjs +3 -3
  97. package/dist/resources/_internal/org/consumer.d.mts +2 -0
  98. package/dist/resources/_internal/org/consumer.mjs +1 -0
  99. package/dist/resources/_internal/org/org.d.mts +2 -0
  100. package/dist/resources/_internal/org/org.mjs +8 -0
  101. package/dist/resources/_internal/org.d.mts +2 -0
  102. package/dist/resources/_internal/org.mjs +1 -0
  103. package/dist/resources/_internal.d.mts +2 -0
  104. package/dist/resources/_internal.mjs +1 -0
  105. package/dist/resources/api-key-revocation.d.mts +1 -1
  106. package/dist/resources/api-key-revocation.mjs +1 -1
  107. package/dist/resources/auth/auth.d.mts +1 -1
  108. package/dist/resources/auth/session.d.mts +1 -1
  109. package/dist/resources/auth/session.mjs +1 -1
  110. package/dist/resources/auth-configs.d.mts +1 -1
  111. package/dist/resources/auth-configs.mjs +1 -1
  112. package/dist/resources/auth.d.mts +1 -1
  113. package/dist/resources/cli/cli.d.mts +2 -2
  114. package/dist/resources/cli/cli.mjs +8 -26
  115. package/dist/resources/cli.d.mts +2 -2
  116. package/dist/resources/connected-accounts.d.mts +1 -1
  117. package/dist/resources/connected-accounts.mjs +1 -1
  118. package/dist/resources/custom.d.mts +1 -1
  119. package/dist/resources/custom.mjs +1 -1
  120. package/dist/resources/files.d.mts +1 -1
  121. package/dist/resources/files.mjs +1 -1
  122. package/dist/resources/keyring.d.mts +1 -1
  123. package/dist/resources/keyring.mjs +1 -1
  124. package/dist/resources/link.d.mts +1 -1
  125. package/dist/resources/link.mjs +1 -1
  126. package/dist/resources/logs/logs.d.mts +1 -1
  127. package/dist/resources/logs/logs.mjs +1 -5
  128. package/dist/resources/logs.d.mts +2 -2
  129. package/dist/resources/mcp/custom.d.mts +1 -1
  130. package/dist/resources/mcp/custom.mjs +1 -1
  131. package/dist/resources/mcp/generate.d.mts +1 -1
  132. package/dist/resources/mcp/generate.mjs +1 -1
  133. package/dist/resources/mcp/mcp.d.mts +1 -1
  134. package/dist/resources/mcp/mcp.mjs +1 -1
  135. package/dist/resources/mcp.d.mts +1 -1
  136. package/dist/resources/org/clanker.d.mts +1 -1
  137. package/dist/resources/org/clanker.mjs +1 -1
  138. package/dist/resources/org/org.d.mts +1 -1
  139. package/dist/resources/org/org.mjs +1 -3
  140. package/dist/resources/org/owner/owner.d.mts +1 -1
  141. package/dist/resources/org/owner/project.d.mts +1 -1
  142. package/dist/resources/org/owner/project.mjs +1 -1
  143. package/dist/resources/org/owner.d.mts +1 -1
  144. package/dist/resources/org/project.d.mts +1 -1
  145. package/dist/resources/org/project.mjs +1 -1
  146. package/dist/resources/org/usage.d.mts +1 -1
  147. package/dist/resources/org/usage.mjs +1 -1
  148. package/dist/resources/org.d.mts +2 -2
  149. package/dist/resources/project/project.d.mts +1 -1
  150. package/dist/resources/project/usage.d.mts +1 -1
  151. package/dist/resources/project/usage.mjs +1 -1
  152. package/dist/resources/project.d.mts +1 -1
  153. package/dist/resources/session-configs.d.mts +1 -1
  154. package/dist/resources/session-configs.mjs +1 -1
  155. package/dist/resources/tool-router/session/files.d.mts +1 -1
  156. package/dist/resources/tool-router/session/files.mjs +1 -1
  157. package/dist/resources/tool-router/session/session.d.mts +1 -1
  158. package/dist/resources/tool-router/session/session.mjs +1 -1
  159. package/dist/resources/tool-router/session.d.mts +1 -1
  160. package/dist/resources/tool-router/tool-router.d.mts +1 -1
  161. package/dist/resources/tool-router.d.mts +1 -1
  162. package/dist/resources/toolkits.d.mts +1 -1
  163. package/dist/resources/toolkits.mjs +1 -1
  164. package/dist/resources/tools.d.mts +1 -1
  165. package/dist/resources/tools.mjs +1 -1
  166. package/dist/resources/trigger-instances/manage.d.mts +1 -1
  167. package/dist/resources/trigger-instances/manage.mjs +1 -1
  168. package/dist/resources/trigger-instances/trigger-instances.d.mts +1 -1
  169. package/dist/resources/trigger-instances/trigger-instances.mjs +1 -1
  170. package/dist/resources/trigger-instances.d.mts +1 -1
  171. package/dist/resources/triggers-types.d.mts +1 -1
  172. package/dist/resources/triggers-types.mjs +1 -1
  173. package/dist/resources/webhook-endpoints.d.mts +1 -1
  174. package/dist/resources/webhook-endpoints.mjs +1 -1
  175. package/dist/resources/webhook-subscriptions.d.mts +1 -1
  176. package/dist/resources/webhook-subscriptions.mjs +1 -1
  177. package/package.json +10 -2
  178. package/dist/resources/cli/realtime.d.mts +0 -2
  179. package/dist/resources/logs/tools.d.mts +0 -2
  180. package/dist/resources/logs/triggers.d.mts +0 -2
  181. package/dist/resources/org/consumer/consumer.d.mts +0 -2
  182. package/dist/resources/org/consumer/project.d.mts +0 -2
  183. package/dist/resources/org/consumer.d.mts +0 -2
  184. /package/dist/{resources/org/consumer.mjs → effect/internal.mjs} +0 -0
@@ -69,6 +69,34 @@ declare const SessionCreateResponseConfig: Schema.StructWithRest<Schema.Struct<{
69
69
  readonly proxy_execute: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
70
70
  readonly enable: Schema.Boolean;
71
71
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
72
+ readonly hooks: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
73
+ readonly type: Schema.Literal<"before_execute">;
74
+ readonly id: Schema.String;
75
+ readonly name: Schema.optionalKey<Schema.String>;
76
+ readonly applies_to: Schema.Union<readonly [Schema.Literal<"all">, Schema.Struct<{
77
+ readonly toolkits: Schema.$Array<Schema.String>;
78
+ }>]>;
79
+ readonly handler: Schema.Struct<{
80
+ readonly type: Schema.Literal<"condition_check">;
81
+ readonly condition: Schema.String;
82
+ readonly action: Schema.Literal<"block">;
83
+ }>;
84
+ }>, Schema.Struct<{
85
+ readonly type: Schema.Literal<"after_execute">;
86
+ readonly id: Schema.String;
87
+ readonly name: Schema.optionalKey<Schema.String>;
88
+ readonly applies_to: Schema.Union<readonly [Schema.Literal<"all">, Schema.Struct<{
89
+ readonly toolkits: Schema.$Array<Schema.String>;
90
+ }>]>;
91
+ readonly handler: Schema.Union<readonly [Schema.Struct<{
92
+ readonly type: Schema.Literal<"condition_check">;
93
+ readonly condition: Schema.String;
94
+ readonly action: Schema.Literal<"block">;
95
+ }>, Schema.Struct<{
96
+ readonly type: Schema.Literal<"prompt_injection_check">;
97
+ readonly action: Schema.Literal<"block">;
98
+ }>]>;
99
+ }>]>>>;
72
100
  readonly preload: Schema.Struct<{
73
101
  readonly tools: Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Literal<"all">]>;
74
102
  }>;
@@ -130,6 +130,30 @@ const SessionCreateResponseConfig = Schema.StructWithRest(Schema.Struct({
130
130
  "require_explicit_selection": Schema.optionalKey(Schema.Boolean.annotate({ "description": "When true, require explicit account selection when multiple accounts are connected. When false (default), use the first/default account." }))
131
131
  }), [Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" }))]).annotate({ "description": "Multi-account configuration for this session." })),
132
132
  "proxy_execute": Schema.optionalKey(Schema.StructWithRest(Schema.Struct({ "enable": Schema.Boolean.annotate({ "description": "When true, enables proxy execute outside the workbench. When false, also disables proxy execution inside the workbench." }) }), [Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" }))]).annotate({ "description": "Proxy execute configuration for this session. Omitted when not set." })),
133
+ "hooks": Schema.optionalKey(Schema.Array(Schema.Union([Schema.Struct({
134
+ "type": Schema.Literal("before_execute"),
135
+ "id": Schema.String.annotate({ "description": "Unique within the session. Shows up in results and logs." }).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-z0-9_-]{1,64}$", "u")).annotate({ "expected": "a string matching the RegExp ^[a-z0-9_-]{1,64}$" })),
136
+ "name": Schema.optionalKey(Schema.String.annotate({ "description": "A readable name. The agent sees it when this hook blocks a call." }).check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(120).annotate({ "expected": "a string with at most 120 code points" }))),
137
+ "applies_to": Schema.Union([Schema.Literal("all"), Schema.Struct({ "toolkits": Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))).annotate({ "description": "Toolkit slugs" }).check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })) })]).annotate({ "description": "Which tools the hook covers: \"all\" for all of them, or only the listed toolkits." }),
138
+ "handler": Schema.Struct({
139
+ "type": Schema.Literal("condition_check"),
140
+ "condition": Schema.String.annotate({ "description": "What to block, written as a plain sentence. For example: \"Sending email to anyone outside example.org\"." }).check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2e3).annotate({ "expected": "a string with at most 2000 code points" })),
141
+ "action": Schema.Literal("block")
142
+ })
143
+ }), Schema.Struct({
144
+ "type": Schema.Literal("after_execute"),
145
+ "id": Schema.String.annotate({ "description": "Unique within the session. Shows up in results and logs." }).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-z0-9_-]{1,64}$", "u")).annotate({ "expected": "a string matching the RegExp ^[a-z0-9_-]{1,64}$" })),
146
+ "name": Schema.optionalKey(Schema.String.annotate({ "description": "A readable name. The agent sees it when this hook blocks a call." }).check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(120).annotate({ "expected": "a string with at most 120 code points" }))),
147
+ "applies_to": Schema.Union([Schema.Literal("all"), Schema.Struct({ "toolkits": Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))).annotate({ "description": "Toolkit slugs" }).check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })) })]).annotate({ "description": "Which tools the hook covers: \"all\" for all of them, or only the listed toolkits." }),
148
+ "handler": Schema.Union([Schema.Struct({
149
+ "type": Schema.Literal("condition_check"),
150
+ "condition": Schema.String.annotate({ "description": "What to block, written as a plain sentence. For example: \"Sending email to anyone outside example.org\"." }).check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2e3).annotate({ "expected": "a string with at most 2000 code points" })),
151
+ "action": Schema.Literal("block")
152
+ }), Schema.Struct({
153
+ "type": Schema.Literal("prompt_injection_check"),
154
+ "action": Schema.Literal("block")
155
+ }).annotate({ "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." })], { mode: "oneOf" })
156
+ })], { mode: "oneOf" })).annotate({ "description": "Hooks that run on this session's tool calls." }).check(Schema.isMaxLength(20).annotate({ "expected": "a value with a length of at most 20" }))),
133
157
  "preload": Schema.Struct({ "tools": Schema.Union([Schema.Array(Schema.String), Schema.Literal("all")]).annotate({ "description": "Explicit preloaded tool slugs, or \"all\" when the session dynamically exposes all app tools allowed by its filters." }) }).annotate({ "description": "Preload configuration. Explicit slugs are returned as an array; dynamic preload is returned as \"all\"." }),
134
158
  "connected_accounts": Schema.optionalKey(Schema.Record(Schema.String, Schema.Array(Schema.String.annotate({ "format": "connectedAccountId" })).check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))).annotate({ "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." })),
135
159
  "search": Schema.StructWithRest(Schema.Struct({ "enable": Schema.optionalKey(Schema.Boolean.annotate({ "default": true })) }), [Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" }))]).annotate({ "description": "Search helper configuration" }),
@@ -73,6 +73,34 @@ declare const ToolRouterSessionV31ConfigHistoryListResponse: Schema.StructWithRe
73
73
  readonly proxy_execute: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
74
74
  readonly enable: Schema.Boolean;
75
75
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
76
+ readonly hooks: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
77
+ readonly type: Schema.Literal<"before_execute">;
78
+ readonly id: Schema.String;
79
+ readonly name: Schema.optionalKey<Schema.String>;
80
+ readonly applies_to: Schema.Union<readonly [Schema.Literal<"all">, Schema.Struct<{
81
+ readonly toolkits: Schema.$Array<Schema.String>;
82
+ }>]>;
83
+ readonly handler: Schema.Struct<{
84
+ readonly type: Schema.Literal<"condition_check">;
85
+ readonly condition: Schema.String;
86
+ readonly action: Schema.Literal<"block">;
87
+ }>;
88
+ }>, Schema.Struct<{
89
+ readonly type: Schema.Literal<"after_execute">;
90
+ readonly id: Schema.String;
91
+ readonly name: Schema.optionalKey<Schema.String>;
92
+ readonly applies_to: Schema.Union<readonly [Schema.Literal<"all">, Schema.Struct<{
93
+ readonly toolkits: Schema.$Array<Schema.String>;
94
+ }>]>;
95
+ readonly handler: Schema.Union<readonly [Schema.Struct<{
96
+ readonly type: Schema.Literal<"condition_check">;
97
+ readonly condition: Schema.String;
98
+ readonly action: Schema.Literal<"block">;
99
+ }>, Schema.Struct<{
100
+ readonly type: Schema.Literal<"prompt_injection_check">;
101
+ readonly action: Schema.Literal<"block">;
102
+ }>]>;
103
+ }>]>>>;
76
104
  readonly preload: Schema.Struct<{
77
105
  readonly tools: Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Literal<"all">]>;
78
106
  }>;
@@ -137,6 +137,30 @@ const ToolRouterSessionV31ConfigHistoryListResponse = Schema.StructWithRest(Sche
137
137
  "require_explicit_selection": Schema.optionalKey(Schema.Boolean.annotate({ "description": "When true, require explicit account selection when multiple accounts are connected. When false (default), use the first/default account." }))
138
138
  }), [Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" }))]).annotate({ "description": "Multi-account configuration for this session." })),
139
139
  "proxy_execute": Schema.optionalKey(Schema.StructWithRest(Schema.Struct({ "enable": Schema.Boolean.annotate({ "description": "When true, enables proxy execute outside the workbench. When false, also disables proxy execution inside the workbench." }) }), [Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" }))]).annotate({ "description": "Proxy execute configuration for this session. Omitted when not set." })),
140
+ "hooks": Schema.optionalKey(Schema.Array(Schema.Union([Schema.Struct({
141
+ "type": Schema.Literal("before_execute"),
142
+ "id": Schema.String.annotate({ "description": "Unique within the session. Shows up in results and logs." }).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-z0-9_-]{1,64}$", "u")).annotate({ "expected": "a string matching the RegExp ^[a-z0-9_-]{1,64}$" })),
143
+ "name": Schema.optionalKey(Schema.String.annotate({ "description": "A readable name. The agent sees it when this hook blocks a call." }).check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(120).annotate({ "expected": "a string with at most 120 code points" }))),
144
+ "applies_to": Schema.Union([Schema.Literal("all"), Schema.Struct({ "toolkits": Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))).annotate({ "description": "Toolkit slugs" }).check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })) })]).annotate({ "description": "Which tools the hook covers: \"all\" for all of them, or only the listed toolkits." }),
145
+ "handler": Schema.Struct({
146
+ "type": Schema.Literal("condition_check"),
147
+ "condition": Schema.String.annotate({ "description": "What to block, written as a plain sentence. For example: \"Sending email to anyone outside example.org\"." }).check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2e3).annotate({ "expected": "a string with at most 2000 code points" })),
148
+ "action": Schema.Literal("block")
149
+ })
150
+ }), Schema.Struct({
151
+ "type": Schema.Literal("after_execute"),
152
+ "id": Schema.String.annotate({ "description": "Unique within the session. Shows up in results and logs." }).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-z0-9_-]{1,64}$", "u")).annotate({ "expected": "a string matching the RegExp ^[a-z0-9_-]{1,64}$" })),
153
+ "name": Schema.optionalKey(Schema.String.annotate({ "description": "A readable name. The agent sees it when this hook blocks a call." }).check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(120).annotate({ "expected": "a string with at most 120 code points" }))),
154
+ "applies_to": Schema.Union([Schema.Literal("all"), Schema.Struct({ "toolkits": Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))).annotate({ "description": "Toolkit slugs" }).check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })) })]).annotate({ "description": "Which tools the hook covers: \"all\" for all of them, or only the listed toolkits." }),
155
+ "handler": Schema.Union([Schema.Struct({
156
+ "type": Schema.Literal("condition_check"),
157
+ "condition": Schema.String.annotate({ "description": "What to block, written as a plain sentence. For example: \"Sending email to anyone outside example.org\"." }).check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2e3).annotate({ "expected": "a string with at most 2000 code points" })),
158
+ "action": Schema.Literal("block")
159
+ }), Schema.Struct({
160
+ "type": Schema.Literal("prompt_injection_check"),
161
+ "action": Schema.Literal("block")
162
+ }).annotate({ "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." })], { mode: "oneOf" })
163
+ })], { mode: "oneOf" })).annotate({ "description": "Hooks that run on this session's tool calls." }).check(Schema.isMaxLength(20).annotate({ "expected": "a value with a length of at most 20" }))),
140
164
  "preload": Schema.Struct({ "tools": Schema.Union([Schema.Array(Schema.String), Schema.Literal("all")]).annotate({ "description": "Explicit preloaded tool slugs, or \"all\" when the session dynamically exposes all app tools allowed by its filters." }) }).annotate({ "description": "Preload configuration. Explicit slugs are returned as an array; dynamic preload is returned as \"all\"." }),
141
165
  "connected_accounts": Schema.optionalKey(Schema.Record(Schema.String, Schema.Array(Schema.String.annotate({ "format": "connectedAccountId" })).check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))).annotate({ "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." })),
142
166
  "search": Schema.StructWithRest(Schema.Struct({ "enable": Schema.optionalKey(Schema.Boolean.annotate({ "default": true })) }), [Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" }))]).annotate({ "description": "Search helper configuration" }),
@@ -9,22 +9,33 @@ declare const SessionConfigsRetrieveResponse: Schema.StructWithRest<Schema.Struc
9
9
  readonly config: Schema.Struct<{
10
10
  readonly toolkits: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
11
11
  readonly enable: Schema.$Array<Schema.String>;
12
+ readonly require_approval: Schema.optionalKey<Schema.$Array<Schema.String>>;
12
13
  }>, Schema.Struct<{
13
14
  readonly disable: Schema.$Array<Schema.String>;
15
+ readonly require_approval: Schema.optionalKey<Schema.$Array<Schema.String>>;
16
+ }>, Schema.Struct<{
17
+ readonly require_approval: Schema.$Array<Schema.String>;
14
18
  }>]>>;
15
19
  readonly tools: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
16
20
  readonly enable: Schema.$Array<Schema.String>;
21
+ readonly require_approval: Schema.optionalKey<Schema.$Array<Schema.String>>;
17
22
  }>, Schema.Struct<{
18
23
  readonly disable: Schema.$Array<Schema.String>;
24
+ readonly require_approval: Schema.optionalKey<Schema.$Array<Schema.String>>;
19
25
  }>, Schema.Struct<{
20
26
  readonly tags: Schema.Struct<{
21
27
  readonly enable: Schema.optionalKey<Schema.$Array<Schema.Literals<readonly ["readOnlyHint", "createHint", "updateHint", "destructiveHint", "idempotentHint", "openWorldHint"]>>>;
22
28
  readonly disable: Schema.optionalKey<Schema.$Array<Schema.Literals<readonly ["readOnlyHint", "createHint", "updateHint", "destructiveHint", "idempotentHint", "openWorldHint"]>>>;
29
+ readonly require_approval: Schema.optionalKey<Schema.$Array<Schema.Literals<readonly ["readOnlyHint", "createHint", "updateHint", "destructiveHint", "idempotentHint", "openWorldHint"]>>>;
23
30
  }>;
31
+ readonly require_approval: Schema.optionalKey<Schema.$Array<Schema.String>>;
32
+ }>, Schema.Struct<{
33
+ readonly require_approval: Schema.$Array<Schema.String>;
24
34
  }>]>>>;
25
35
  readonly tags: Schema.optionalKey<Schema.Struct<{
26
36
  readonly enable: Schema.optionalKey<Schema.$Array<Schema.Literals<readonly ["readOnlyHint", "createHint", "updateHint", "destructiveHint", "idempotentHint", "openWorldHint"]>>>;
27
37
  readonly disable: Schema.optionalKey<Schema.$Array<Schema.Literals<readonly ["readOnlyHint", "createHint", "updateHint", "destructiveHint", "idempotentHint", "openWorldHint"]>>>;
38
+ readonly require_approval: Schema.optionalKey<Schema.$Array<Schema.Literals<readonly ["readOnlyHint", "createHint", "updateHint", "destructiveHint", "idempotentHint", "openWorldHint"]>>>;
28
39
  }>>;
29
40
  }>;
30
41
  readonly created_at: Schema.String;
@@ -11,28 +11,56 @@ const SessionConfigsRetrieveResponse = Schema.StructWithRest(Schema.Struct({
11
11
  "description": Schema.Union([Schema.String, Schema.Null]).annotate({ "description": "Optional description of when the config should be used." }),
12
12
  "archived": Schema.Boolean.annotate({ "description": "Whether the config is archived." }),
13
13
  "config": Schema.Struct({
14
- "toolkits": Schema.optionalKey(Schema.Union([Schema.Struct({ "enable": Schema.Array(Schema.String) }), Schema.Struct({ "disable": Schema.Array(Schema.String) })])),
14
+ "toolkits": Schema.optionalKey(Schema.Union([
15
+ Schema.Struct({
16
+ "enable": Schema.Array(Schema.String),
17
+ "require_approval": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "description": "What in this entry needs the user's approval before it runs." }))
18
+ }),
19
+ Schema.Struct({
20
+ "disable": Schema.Array(Schema.String),
21
+ "require_approval": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "description": "What in this entry needs the user's approval before it runs." }))
22
+ }),
23
+ Schema.Struct({ "require_approval": Schema.Array(Schema.String).annotate({ "description": "What in this entry needs the user's approval before it runs." }) })
24
+ ])),
15
25
  "tools": Schema.optionalKey(Schema.Record(Schema.String, Schema.Union([
16
- Schema.Struct({ "enable": Schema.Array(Schema.String) }),
17
- Schema.Struct({ "disable": Schema.Array(Schema.String) }),
18
- Schema.Struct({ "tags": Schema.Struct({
19
- "enable": Schema.optionalKey(Schema.Array(Schema.Literals([
20
- "readOnlyHint",
21
- "createHint",
22
- "updateHint",
23
- "destructiveHint",
24
- "idempotentHint",
25
- "openWorldHint"
26
- ]))),
27
- "disable": Schema.optionalKey(Schema.Array(Schema.Literals([
28
- "readOnlyHint",
29
- "createHint",
30
- "updateHint",
31
- "destructiveHint",
32
- "idempotentHint",
33
- "openWorldHint"
34
- ])))
35
- }) })
26
+ Schema.Struct({
27
+ "enable": Schema.Array(Schema.String),
28
+ "require_approval": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "description": "What in this entry needs the user's approval before it runs." }))
29
+ }),
30
+ Schema.Struct({
31
+ "disable": Schema.Array(Schema.String),
32
+ "require_approval": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "description": "What in this entry needs the user's approval before it runs." }))
33
+ }),
34
+ Schema.Struct({
35
+ "tags": Schema.Struct({
36
+ "enable": Schema.optionalKey(Schema.Array(Schema.Literals([
37
+ "readOnlyHint",
38
+ "createHint",
39
+ "updateHint",
40
+ "destructiveHint",
41
+ "idempotentHint",
42
+ "openWorldHint"
43
+ ]))),
44
+ "disable": Schema.optionalKey(Schema.Array(Schema.Literals([
45
+ "readOnlyHint",
46
+ "createHint",
47
+ "updateHint",
48
+ "destructiveHint",
49
+ "idempotentHint",
50
+ "openWorldHint"
51
+ ]))),
52
+ "require_approval": Schema.optionalKey(Schema.Array(Schema.Literals([
53
+ "readOnlyHint",
54
+ "createHint",
55
+ "updateHint",
56
+ "destructiveHint",
57
+ "idempotentHint",
58
+ "openWorldHint"
59
+ ])).annotate({ "description": "Tags whose tools need the user's approval before they run." }))
60
+ }),
61
+ "require_approval": Schema.optionalKey(Schema.Array(Schema.String).annotate({ "description": "What in this entry needs the user's approval before it runs." }))
62
+ }),
63
+ Schema.Struct({ "require_approval": Schema.Array(Schema.String).annotate({ "description": "What in this entry needs the user's approval before it runs." }) })
36
64
  ]))),
37
65
  "tags": Schema.optionalKey(Schema.Struct({
38
66
  "enable": Schema.optionalKey(Schema.Array(Schema.Literals([
@@ -50,9 +78,17 @@ const SessionConfigsRetrieveResponse = Schema.StructWithRest(Schema.Struct({
50
78
  "destructiveHint",
51
79
  "idempotentHint",
52
80
  "openWorldHint"
53
- ])))
81
+ ]))),
82
+ "require_approval": Schema.optionalKey(Schema.Array(Schema.Literals([
83
+ "readOnlyHint",
84
+ "createHint",
85
+ "updateHint",
86
+ "destructiveHint",
87
+ "idempotentHint",
88
+ "openWorldHint"
89
+ ])).annotate({ "description": "Tags whose tools need the user's approval before they run." }))
54
90
  }))
55
- }).annotate({ "description": "Stored Session access policy using the same enable/disable wire shape accepted on create and update." }),
91
+ }).annotate({ "description": "Stored Session access policy using the same enable/disable wire shape accepted on create and update, with any require_approval lists." }),
56
92
  "created_at": Schema.String.annotate({
57
93
  "description": "Creation time in ISO 8601.",
58
94
  "format": "date-time"
@@ -76,6 +76,34 @@ declare const SessionAttachResponse: Schema.StructWithRest<Schema.Struct<{
76
76
  readonly proxy_execute: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
77
77
  readonly enable: Schema.Boolean;
78
78
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
79
+ readonly hooks: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
80
+ readonly type: Schema.Literal<"before_execute">;
81
+ readonly id: Schema.String;
82
+ readonly name: Schema.optionalKey<Schema.String>;
83
+ readonly applies_to: Schema.Union<readonly [Schema.Literal<"all">, Schema.Struct<{
84
+ readonly toolkits: Schema.$Array<Schema.String>;
85
+ }>]>;
86
+ readonly handler: Schema.Struct<{
87
+ readonly type: Schema.Literal<"condition_check">;
88
+ readonly condition: Schema.String;
89
+ readonly action: Schema.Literal<"block">;
90
+ }>;
91
+ }>, Schema.Struct<{
92
+ readonly type: Schema.Literal<"after_execute">;
93
+ readonly id: Schema.String;
94
+ readonly name: Schema.optionalKey<Schema.String>;
95
+ readonly applies_to: Schema.Union<readonly [Schema.Literal<"all">, Schema.Struct<{
96
+ readonly toolkits: Schema.$Array<Schema.String>;
97
+ }>]>;
98
+ readonly handler: Schema.Union<readonly [Schema.Struct<{
99
+ readonly type: Schema.Literal<"condition_check">;
100
+ readonly condition: Schema.String;
101
+ readonly action: Schema.Literal<"block">;
102
+ }>, Schema.Struct<{
103
+ readonly type: Schema.Literal<"prompt_injection_check">;
104
+ readonly action: Schema.Literal<"block">;
105
+ }>]>;
106
+ }>]>>>;
79
107
  readonly preload: Schema.Struct<{
80
108
  readonly tools: Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Literal<"all">]>;
81
109
  }>;
@@ -72,6 +72,34 @@ declare const SessionConfigHistoryResponse: import("effect/Schema").StructWithRe
72
72
  readonly proxy_execute: import("effect/Schema").optionalKey<import("effect/Schema").StructWithRest<import("effect/Schema").Struct<{
73
73
  readonly enable: import("effect/Schema").Boolean;
74
74
  }>, readonly [import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>]>>;
75
+ readonly hooks: import("effect/Schema").optionalKey<import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
76
+ readonly type: import("effect/Schema").Literal<"before_execute">;
77
+ readonly id: import("effect/Schema").String;
78
+ readonly name: import("effect/Schema").optionalKey<import("effect/Schema").String>;
79
+ readonly applies_to: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"all">, import("effect/Schema").Struct<{
80
+ readonly toolkits: import("effect/Schema").$Array<import("effect/Schema").String>;
81
+ }>]>;
82
+ readonly handler: import("effect/Schema").Struct<{
83
+ readonly type: import("effect/Schema").Literal<"condition_check">;
84
+ readonly condition: import("effect/Schema").String;
85
+ readonly action: import("effect/Schema").Literal<"block">;
86
+ }>;
87
+ }>, import("effect/Schema").Struct<{
88
+ readonly type: import("effect/Schema").Literal<"after_execute">;
89
+ readonly id: import("effect/Schema").String;
90
+ readonly name: import("effect/Schema").optionalKey<import("effect/Schema").String>;
91
+ readonly applies_to: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"all">, import("effect/Schema").Struct<{
92
+ readonly toolkits: import("effect/Schema").$Array<import("effect/Schema").String>;
93
+ }>]>;
94
+ readonly handler: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
95
+ readonly type: import("effect/Schema").Literal<"condition_check">;
96
+ readonly condition: import("effect/Schema").String;
97
+ readonly action: import("effect/Schema").Literal<"block">;
98
+ }>, import("effect/Schema").Struct<{
99
+ readonly type: import("effect/Schema").Literal<"prompt_injection_check">;
100
+ readonly action: import("effect/Schema").Literal<"block">;
101
+ }>]>;
102
+ }>]>>>;
75
103
  readonly preload: import("effect/Schema").Struct<{
76
104
  readonly tools: import("effect/Schema").Union<readonly [import("effect/Schema").$Array<import("effect/Schema").String>, import("effect/Schema").Literal<"all">]>;
77
105
  }>;
@@ -76,6 +76,34 @@ declare const SessionCreateResponse: Schema.StructWithRest<Schema.Struct<{
76
76
  readonly proxy_execute: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
77
77
  readonly enable: Schema.Boolean;
78
78
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
79
+ readonly hooks: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
80
+ readonly type: Schema.Literal<"before_execute">;
81
+ readonly id: Schema.String;
82
+ readonly name: Schema.optionalKey<Schema.String>;
83
+ readonly applies_to: Schema.Union<readonly [Schema.Literal<"all">, Schema.Struct<{
84
+ readonly toolkits: Schema.$Array<Schema.String>;
85
+ }>]>;
86
+ readonly handler: Schema.Struct<{
87
+ readonly type: Schema.Literal<"condition_check">;
88
+ readonly condition: Schema.String;
89
+ readonly action: Schema.Literal<"block">;
90
+ }>;
91
+ }>, Schema.Struct<{
92
+ readonly type: Schema.Literal<"after_execute">;
93
+ readonly id: Schema.String;
94
+ readonly name: Schema.optionalKey<Schema.String>;
95
+ readonly applies_to: Schema.Union<readonly [Schema.Literal<"all">, Schema.Struct<{
96
+ readonly toolkits: Schema.$Array<Schema.String>;
97
+ }>]>;
98
+ readonly handler: Schema.Union<readonly [Schema.Struct<{
99
+ readonly type: Schema.Literal<"condition_check">;
100
+ readonly condition: Schema.String;
101
+ readonly action: Schema.Literal<"block">;
102
+ }>, Schema.Struct<{
103
+ readonly type: Schema.Literal<"prompt_injection_check">;
104
+ readonly action: Schema.Literal<"block">;
105
+ }>]>;
106
+ }>]>>>;
79
107
  readonly preload: Schema.Struct<{
80
108
  readonly tools: Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Literal<"all">]>;
81
109
  }>;
@@ -11,6 +11,14 @@ declare const SessionExecuteMetaResponse: Schema.Union<readonly [Schema.StructWi
11
11
  readonly data: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
12
12
  readonly error: Schema.Union<readonly [Schema.String, Schema.Null]>;
13
13
  readonly log_id: Schema.String;
14
+ readonly hook_results: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.StructWithRest<Schema.Struct<{
15
+ readonly id: Schema.String;
16
+ readonly status: Schema.Literal<"evaluated">;
17
+ readonly outcome: Schema.Literals<readonly ["continue", "block"]>;
18
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>, Schema.StructWithRest<Schema.Struct<{
19
+ readonly id: Schema.String;
20
+ readonly status: Schema.Literal<"unavailable">;
21
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>]>>>;
14
22
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>, Schema.StructWithRest<Schema.Struct<{
15
23
  readonly result_type: Schema.Literal<"failed">;
16
24
  readonly instant_charge: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
@@ -21,6 +29,38 @@ declare const SessionExecuteMetaResponse: Schema.Union<readonly [Schema.StructWi
21
29
  readonly data: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
22
30
  readonly error: Schema.Union<readonly [Schema.String, Schema.Null]>;
23
31
  readonly log_id: Schema.String;
32
+ readonly hook_results: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.StructWithRest<Schema.Struct<{
33
+ readonly id: Schema.String;
34
+ readonly status: Schema.Literal<"evaluated">;
35
+ readonly outcome: Schema.Literals<readonly ["continue", "block"]>;
36
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>, Schema.StructWithRest<Schema.Struct<{
37
+ readonly id: Schema.String;
38
+ readonly status: Schema.Literal<"unavailable">;
39
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>]>>>;
40
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>, Schema.StructWithRest<Schema.Struct<{
41
+ readonly result_type: Schema.Literal<"blocked">;
42
+ readonly reason: Schema.Union<readonly [Schema.StructWithRest<Schema.Struct<{
43
+ readonly type: Schema.Literal<"request_blocked">;
44
+ readonly hook_id: Schema.String;
45
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>, Schema.StructWithRest<Schema.Struct<{
46
+ readonly type: Schema.Literal<"response_blocked">;
47
+ readonly hook_id: Schema.String;
48
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>]>;
49
+ readonly message: Schema.String;
50
+ readonly log_id: Schema.optionalKey<Schema.String>;
51
+ readonly instant_charge: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
52
+ readonly amount: Schema.String;
53
+ readonly currency: Schema.Literal<"USD">;
54
+ readonly charged_by: Schema.Literal<"composio">;
55
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
56
+ readonly hook_results: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.StructWithRest<Schema.Struct<{
57
+ readonly id: Schema.String;
58
+ readonly status: Schema.Literal<"evaluated">;
59
+ readonly outcome: Schema.Literals<readonly ["continue", "block"]>;
60
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>, Schema.StructWithRest<Schema.Struct<{
61
+ readonly id: Schema.String;
62
+ readonly status: Schema.Literal<"unavailable">;
63
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>]>>>;
24
64
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>, Schema.StructWithRest<Schema.Struct<{
25
65
  readonly result_type: Schema.Literal<"input_required">;
26
66
  readonly input_requests: Schema.$Record<Schema.String, Schema.StructWithRest<Schema.Struct<{
@@ -1,3 +1,4 @@
1
+ import { ExecuteBlocked } from "../../components/execute-blocked.mjs";
1
2
  import { ExecuteCompleted } from "../../components/execute-completed.mjs";
2
3
  import { ExecuteFailed } from "../../components/execute-failed.mjs";
3
4
  import { ExecuteRequiresUserInput } from "../../components/execute-requires-user-input.mjs";
@@ -8,6 +9,7 @@ import * as Schema from "effect/Schema";
8
9
  const SessionExecuteMetaResponse = Schema.Union([
9
10
  ExecuteCompleted,
10
11
  ExecuteFailed,
12
+ ExecuteBlocked,
11
13
  ExecuteRequiresUserInput
12
14
  ], { mode: "oneOf" });
13
15
 
@@ -11,6 +11,14 @@ declare const SessionExecuteResponse: Schema.Union<readonly [Schema.StructWithRe
11
11
  readonly data: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
12
12
  readonly error: Schema.Union<readonly [Schema.String, Schema.Null]>;
13
13
  readonly log_id: Schema.String;
14
+ readonly hook_results: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.StructWithRest<Schema.Struct<{
15
+ readonly id: Schema.String;
16
+ readonly status: Schema.Literal<"evaluated">;
17
+ readonly outcome: Schema.Literals<readonly ["continue", "block"]>;
18
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>, Schema.StructWithRest<Schema.Struct<{
19
+ readonly id: Schema.String;
20
+ readonly status: Schema.Literal<"unavailable">;
21
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>]>>>;
14
22
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>, Schema.StructWithRest<Schema.Struct<{
15
23
  readonly result_type: Schema.Literal<"failed">;
16
24
  readonly instant_charge: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
@@ -21,6 +29,38 @@ declare const SessionExecuteResponse: Schema.Union<readonly [Schema.StructWithRe
21
29
  readonly data: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
22
30
  readonly error: Schema.Union<readonly [Schema.String, Schema.Null]>;
23
31
  readonly log_id: Schema.String;
32
+ readonly hook_results: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.StructWithRest<Schema.Struct<{
33
+ readonly id: Schema.String;
34
+ readonly status: Schema.Literal<"evaluated">;
35
+ readonly outcome: Schema.Literals<readonly ["continue", "block"]>;
36
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>, Schema.StructWithRest<Schema.Struct<{
37
+ readonly id: Schema.String;
38
+ readonly status: Schema.Literal<"unavailable">;
39
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>]>>>;
40
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>, Schema.StructWithRest<Schema.Struct<{
41
+ readonly result_type: Schema.Literal<"blocked">;
42
+ readonly reason: Schema.Union<readonly [Schema.StructWithRest<Schema.Struct<{
43
+ readonly type: Schema.Literal<"request_blocked">;
44
+ readonly hook_id: Schema.String;
45
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>, Schema.StructWithRest<Schema.Struct<{
46
+ readonly type: Schema.Literal<"response_blocked">;
47
+ readonly hook_id: Schema.String;
48
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>]>;
49
+ readonly message: Schema.String;
50
+ readonly log_id: Schema.optionalKey<Schema.String>;
51
+ readonly instant_charge: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
52
+ readonly amount: Schema.String;
53
+ readonly currency: Schema.Literal<"USD">;
54
+ readonly charged_by: Schema.Literal<"composio">;
55
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
56
+ readonly hook_results: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.StructWithRest<Schema.Struct<{
57
+ readonly id: Schema.String;
58
+ readonly status: Schema.Literal<"evaluated">;
59
+ readonly outcome: Schema.Literals<readonly ["continue", "block"]>;
60
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>, Schema.StructWithRest<Schema.Struct<{
61
+ readonly id: Schema.String;
62
+ readonly status: Schema.Literal<"unavailable">;
63
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>]>>>;
24
64
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>, Schema.StructWithRest<Schema.Struct<{
25
65
  readonly result_type: Schema.Literal<"input_required">;
26
66
  readonly input_requests: Schema.$Record<Schema.String, Schema.StructWithRest<Schema.Struct<{
@@ -1,3 +1,4 @@
1
+ import { ExecuteBlocked } from "../../components/execute-blocked.mjs";
1
2
  import { ExecuteCompleted } from "../../components/execute-completed.mjs";
2
3
  import { ExecuteFailed } from "../../components/execute-failed.mjs";
3
4
  import { ExecuteRequiresUserInput } from "../../components/execute-requires-user-input.mjs";
@@ -8,6 +9,7 @@ import * as Schema from "effect/Schema";
8
9
  const SessionExecuteResponse = Schema.Union([
9
10
  ExecuteCompleted,
10
11
  ExecuteFailed,
12
+ ExecuteBlocked,
11
13
  ExecuteRequiresUserInput
12
14
  ], { mode: "oneOf" });
13
15
 
@@ -76,6 +76,34 @@ declare const SessionPatchResponse: Schema.StructWithRest<Schema.Struct<{
76
76
  readonly proxy_execute: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
77
77
  readonly enable: Schema.Boolean;
78
78
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
79
+ readonly hooks: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
80
+ readonly type: Schema.Literal<"before_execute">;
81
+ readonly id: Schema.String;
82
+ readonly name: Schema.optionalKey<Schema.String>;
83
+ readonly applies_to: Schema.Union<readonly [Schema.Literal<"all">, Schema.Struct<{
84
+ readonly toolkits: Schema.$Array<Schema.String>;
85
+ }>]>;
86
+ readonly handler: Schema.Struct<{
87
+ readonly type: Schema.Literal<"condition_check">;
88
+ readonly condition: Schema.String;
89
+ readonly action: Schema.Literal<"block">;
90
+ }>;
91
+ }>, Schema.Struct<{
92
+ readonly type: Schema.Literal<"after_execute">;
93
+ readonly id: Schema.String;
94
+ readonly name: Schema.optionalKey<Schema.String>;
95
+ readonly applies_to: Schema.Union<readonly [Schema.Literal<"all">, Schema.Struct<{
96
+ readonly toolkits: Schema.$Array<Schema.String>;
97
+ }>]>;
98
+ readonly handler: Schema.Union<readonly [Schema.Struct<{
99
+ readonly type: Schema.Literal<"condition_check">;
100
+ readonly condition: Schema.String;
101
+ readonly action: Schema.Literal<"block">;
102
+ }>, Schema.Struct<{
103
+ readonly type: Schema.Literal<"prompt_injection_check">;
104
+ readonly action: Schema.Literal<"block">;
105
+ }>]>;
106
+ }>]>>>;
79
107
  readonly preload: Schema.Struct<{
80
108
  readonly tools: Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Literal<"all">]>;
81
109
  }>;
@@ -12,6 +12,32 @@ declare const SessionProxyExecuteResponse: Schema.Union<readonly [Schema.StructW
12
12
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
13
13
  readonly status: Schema.Number;
14
14
  readonly headers: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
15
+ readonly hook_results: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.StructWithRest<Schema.Struct<{
16
+ readonly id: Schema.String;
17
+ readonly status: Schema.Literal<"evaluated">;
18
+ readonly outcome: Schema.Literals<readonly ["continue", "block"]>;
19
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>, Schema.StructWithRest<Schema.Struct<{
20
+ readonly id: Schema.String;
21
+ readonly status: Schema.Literal<"unavailable">;
22
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>]>>>;
23
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>, Schema.StructWithRest<Schema.Struct<{
24
+ readonly result_type: Schema.Literal<"blocked">;
25
+ readonly reason: Schema.Union<readonly [Schema.StructWithRest<Schema.Struct<{
26
+ readonly type: Schema.Literal<"request_blocked">;
27
+ readonly hook_id: Schema.String;
28
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>, Schema.StructWithRest<Schema.Struct<{
29
+ readonly type: Schema.Literal<"response_blocked">;
30
+ readonly hook_id: Schema.String;
31
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>]>;
32
+ readonly message: Schema.String;
33
+ readonly hook_results: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.StructWithRest<Schema.Struct<{
34
+ readonly id: Schema.String;
35
+ readonly status: Schema.Literal<"evaluated">;
36
+ readonly outcome: Schema.Literals<readonly ["continue", "block"]>;
37
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>, Schema.StructWithRest<Schema.Struct<{
38
+ readonly id: Schema.String;
39
+ readonly status: Schema.Literal<"unavailable">;
40
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>]>>>;
15
41
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>, Schema.StructWithRest<Schema.Struct<{
16
42
  readonly result_type: Schema.Literal<"input_required">;
17
43
  readonly input_requests: Schema.$Record<Schema.String, Schema.StructWithRest<Schema.Struct<{
@@ -1,10 +1,15 @@
1
1
  import { ExecuteRequiresUserInput } from "../../components/execute-requires-user-input.mjs";
2
+ import { ProxyExecuteBlocked } from "../../components/proxy-execute-blocked.mjs";
2
3
  import { ProxyExecuteCompleted } from "../../components/proxy-execute-completed.mjs";
3
4
  import * as Schema from "effect/Schema";
4
5
 
5
6
  //#region src/effect/generated/schemas/tool-router/session/proxy-execute.ts
6
7
  /** The 200 response of `POST /api/v3.1/tool_router/session/{session_id}/proxy_execute`, which `client.toolRouter.session.proxyExecute` answers with. */
7
- const SessionProxyExecuteResponse = Schema.Union([ProxyExecuteCompleted, ExecuteRequiresUserInput], { mode: "oneOf" });
8
+ const SessionProxyExecuteResponse = Schema.Union([
9
+ ProxyExecuteCompleted,
10
+ ProxyExecuteBlocked,
11
+ ExecuteRequiresUserInput
12
+ ], { mode: "oneOf" });
8
13
 
9
14
  //#endregion
10
15
  export { SessionProxyExecuteResponse };