ai 7.0.157 → 7.0.158

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.
package/src/index.ts CHANGED
@@ -26,6 +26,8 @@ export {
26
26
  type InferToolOutput,
27
27
  type Experimental_SandboxSession,
28
28
  type Experimental_SandboxProcess,
29
+ type Experimental_SandboxFileStat,
30
+ type Experimental_SandboxDirectoryEntry,
29
31
  type Experimental_ToolCallerTool,
30
32
  type Schema,
31
33
  type Tool,
@@ -1,7 +1,7 @@
1
1
  import type { Experimental_SandboxSession } from '@ai-sdk/provider-utils';
2
2
 
3
3
  /**
4
- * File stubs and an unimplemented spawn method on `Experimental_SandboxSession`,
4
+ * File and path stubs and an unimplemented spawn method on `Experimental_SandboxSession`,
5
5
  * intended to be spread into test fixtures that only care about `run`.
6
6
  */
7
7
  export const mockSandboxSessionFileStubs: Pick<
@@ -12,6 +12,9 @@ export const mockSandboxSessionFileStubs: Pick<
12
12
  | 'writeFile'
13
13
  | 'writeBinaryFile'
14
14
  | 'writeTextFile'
15
+ | 'stat'
16
+ | 'listDirectory'
17
+ | 'deleteFile'
15
18
  | 'spawn'
16
19
  > = {
17
20
  readFile: async () => null,
@@ -20,6 +23,9 @@ export const mockSandboxSessionFileStubs: Pick<
20
23
  writeFile: async () => {},
21
24
  writeBinaryFile: async () => {},
22
25
  writeTextFile: async () => {},
26
+ stat: async () => null,
27
+ listDirectory: async () => null,
28
+ deleteFile: async () => false,
23
29
  spawn: async () => {
24
30
  throw new Error('spawn is not implemented in this mock.');
25
31
  },
@@ -232,7 +232,6 @@ export function fixJson(input: string): string {
232
232
  }
233
233
 
234
234
  default: {
235
- lastValidIndex = i;
236
235
  processValueStart(char, i, 'INSIDE_ARRAY_AFTER_VALUE');
237
236
  break;
238
237
  }