| @@ -23,7 +23,9 @@ import { · 22 unmodified lines |
| 23 | 23 | type OpenApiToolDefinition, |
| 24 | 24 | type OpenApiToolManifest, |
| 25 | 25 | } from "@executor/codemode-openapi"; |
| 26 | | −import { makeDenoSubprocessExecutor } from "@executor/runtime-deno-subprocess"; |
| 26 | +import { isDenoAvailable, |
| 27 | + makeDenoSubprocessExecutor } from "@executor/runtime-deno-subprocess"; |
| 28 | +import { makeSesExecutor } from "@executor/runtime-ses"; |
| 27 | 29 | import { |
| 28 | 30 | SqlControlPlaneRowsService, |
| 29 | 31 | type SqlControlPlaneRows, |
| @@ -389,7 +391,7 @@ const loadOpenApiWorkspaceTools = (input: { · 359 unmodified lines |
| 389 | 391 | description: definition.description, |
| 390 | 392 | interaction: |
| 391 | 393 | definition.method.toUpperCase() === "GET" |
| 392 | | − || definition.method.toUpperCase() === "HEAD" |
| 394 | + || definition.method.toUpperCase() === "HEAD" |
| 393 | 395 | ? "auto" |
| 394 | 396 | : "required", |
| 395 | 397 | inputType: presentation.inputType, |
| @@ -627,13 +629,13 @@ const authorizePersistedToolInvocation = (input: { · 231 unmodified lines |
| 627 | 629 | ); |
| 628 | 630 | const policies = Option.isSome(workspace) |
| 629 | 631 | ? yield* input.rows.policies.listForWorkspaceContext({ |
| 630 | | − organizationId: workspace.value.organizationId, |
| 631 | | − workspaceId: input.workspaceId, |
| 632 | | − }).pipe( |
| 633 | | − Effect.mapError((cause) => |
| 634 | | − cause instanceof Error ? cause : new Error(String(cause)), |
| 635 | | − ), |
| 636 | | − ) |
| 632 | + organizationId: workspace.value.organizationId, |
| 633 | + workspaceId: input.workspaceId, |
| 634 | + }).pipe( |
| 635 | + Effect.mapError((cause) => |
| 636 | + cause instanceof Error ? cause : new Error(String(cause)), |
| 637 | + ), |
| 638 | + ) |
| 637 | 639 | : []; |
| 638 | 640 | |
| 639 | 641 | const decision = evaluateInvocationPolicy({ |
| @@ -648,7 +650,7 @@ const authorizePersistedToolInvocation = (input: { · 8 unmodified lines |
| 648 | 650 | accountId: input.accountId, |
| 649 | 651 | clientId: |
| 650 | 652 | typeof input.context?.clientId === "string" |
| 651 | | − && input.context.clientId.length > 0 |
| 653 | + && input.context.clientId.length > 0 |
| 652 | 654 | ? input.context.clientId |
| 653 | 655 | : null, |
| 654 | 656 | }, |
| @@ -1214,8 +1216,12 @@ export const createWorkspaceExecutionEnvironmentResolver = (input: { · 559 unmodified lines |
| 1214 | 1216 | onElicitation, |
| 1215 | 1217 | }); |
| 1216 | 1218 | |
| 1219 | + const executor = isDenoAvailable() |
| 1220 | + ? makeDenoSubprocessExecutor() |
| 1221 | + : makeSesExecutor(); |
| 1222 | + |
| 1217 | 1223 | return { |
| 1218 | | − executor: makeDenoSubprocessExecutor(), |
| 1224 | + executor, |
| 1219 | 1225 | toolInvoker, |
| 1220 | 1226 | catalog, |
| 1221 | 1227 | } satisfies ExecutionEnvironment; |