Skip to content

Commit dfa8d7c

Browse files
committed
fix(sandbox): type the certification run helper to the fields both boundaries accept
1 parent f6587ea commit dfa8d7c

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

‎apps/sim/lib/execution/remote-sandbox/session-input-certification.integration.ts‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,11 @@ import {
5252
initializeSessionFileProvenance,
5353
isSessionFileProvenanceClean,
5454
} from '@/lib/execution/remote-sandbox/session-file-provenance'
55-
import type { SandboxHandle, SandboxProvider } from '@/lib/execution/remote-sandbox/types'
55+
import type {
56+
SandboxExecutionRequest,
57+
SandboxHandle,
58+
SandboxProvider,
59+
} from '@/lib/execution/remote-sandbox/types'
5660

5761
remoteSandboxProviderMockFns.mockResolveProvider.mockImplementation(
5862
() =>
@@ -92,7 +96,13 @@ function trackHistoryKey(key: string, sandboxId: string) {
9296
)
9397
}
9498

95-
function run(kind: 'code' | 'shell', request: Parameters<typeof executeInSandbox>[0]) {
99+
/** The fields both the code and the shell boundary accept. */
100+
type SessionRunRequest = Pick<
101+
SandboxExecutionRequest,
102+
'code' | 'language' | 'timeoutMs' | 'session' | 'signal'
103+
>
104+
105+
function run(kind: 'code' | 'shell', request: SessionRunRequest) {
96106
return observeSandboxSessionInputs(
97107
() => true,
98108
() =>

0 commit comments

Comments
 (0)