@ljoukov/llm 3.0.13 → 3.0.14

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/dist/index.d.cts CHANGED
@@ -473,12 +473,12 @@ type AgentFilesystemToolsOptions = {
473
473
  readonly maxPatchBytes?: number;
474
474
  };
475
475
  };
476
- declare const codexReadFileInputSchema: z.ZodObject<{
477
- file_path: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
476
+ declare const codexReadFileInputSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
477
+ file_path: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodString>;
478
478
  path: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
479
479
  offset: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
480
480
  limit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
481
- }, z.core.$strict>;
481
+ }, z.core.$strict>>;
482
482
  declare const codexListDirInputSchema: z.ZodObject<{
483
483
  dir_path: z.ZodString;
484
484
  offset: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
package/dist/index.d.ts CHANGED
@@ -473,12 +473,12 @@ type AgentFilesystemToolsOptions = {
473
473
  readonly maxPatchBytes?: number;
474
474
  };
475
475
  };
476
- declare const codexReadFileInputSchema: z.ZodObject<{
477
- file_path: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
476
+ declare const codexReadFileInputSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
477
+ file_path: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodString>;
478
478
  path: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
479
479
  offset: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
480
480
  limit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
481
- }, z.core.$strict>;
481
+ }, z.core.$strict>>;
482
482
  declare const codexListDirInputSchema: z.ZodObject<{
483
483
  dir_path: z.ZodString;
484
484
  offset: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
package/dist/index.js CHANGED
@@ -7896,39 +7896,48 @@ function parseOptionalString(value) {
7896
7896
  }
7897
7897
  return trimmed;
7898
7898
  }
7899
- var codexReadFileInputSchema = z6.object({
7900
- file_path: z6.preprocess(
7901
- (value) => parseOptionalString(value),
7902
- z6.string().min(1).optional().describe(
7903
- "Path to the file (relative to cwd, or absolute. In sandbox mode, / maps to the sandbox root)."
7904
- )
7905
- ),
7906
- path: z6.preprocess(
7907
- (value) => parseOptionalString(value),
7908
- z6.string().min(1).optional().describe(
7909
- "Alias for file_path. If both file_path and path are provided they must be identical."
7910
- )
7911
- ),
7912
- offset: z6.number().int().min(1).nullish().describe("The line number to start reading from. Must be 1 or greater."),
7913
- limit: z6.number().int().min(1).nullish().describe("The maximum number of lines to return.")
7914
- }).strict().superRefine((value, context) => {
7915
- const filePath = value.file_path?.trim() ?? "";
7916
- const aliasPath = value.path?.trim() ?? "";
7917
- if (filePath.length === 0 && aliasPath.length === 0) {
7918
- context.addIssue({
7919
- code: z6.ZodIssueCode.custom,
7920
- message: "read_file requires file_path (or path alias).",
7921
- path: ["file_path"]
7922
- });
7923
- }
7924
- if (filePath.length > 0 && aliasPath.length > 0 && filePath !== aliasPath) {
7925
- context.addIssue({
7926
- code: z6.ZodIssueCode.custom,
7927
- message: "file_path and path must match when both are provided.",
7928
- path: ["path"]
7929
- });
7930
- }
7931
- });
7899
+ var codexReadFileInputSchema = z6.preprocess(
7900
+ (value) => {
7901
+ if (!value || typeof value !== "object" || Array.isArray(value)) {
7902
+ return value;
7903
+ }
7904
+ const record = value;
7905
+ const filePath = parseOptionalString(record.file_path);
7906
+ const aliasPath = parseOptionalString(record.path);
7907
+ if (!filePath && aliasPath) {
7908
+ return {
7909
+ ...record,
7910
+ file_path: aliasPath
7911
+ };
7912
+ }
7913
+ return value;
7914
+ },
7915
+ z6.object({
7916
+ file_path: z6.preprocess(
7917
+ (value) => parseOptionalString(value),
7918
+ z6.string().min(1).describe(
7919
+ "Path to the file (relative to cwd, or absolute. In sandbox mode, / maps to the sandbox root)."
7920
+ )
7921
+ ),
7922
+ path: z6.preprocess(
7923
+ (value) => parseOptionalString(value),
7924
+ z6.string().min(1).optional().describe(
7925
+ "Alias for file_path. If both file_path and path are provided they must be identical."
7926
+ )
7927
+ ),
7928
+ offset: z6.number().int().min(1).nullish().describe("The line number to start reading from. Must be 1 or greater."),
7929
+ limit: z6.number().int().min(1).nullish().describe("The maximum number of lines to return.")
7930
+ }).strict().superRefine((value, context) => {
7931
+ const aliasPath = value.path?.trim() ?? "";
7932
+ if (aliasPath.length > 0 && value.file_path !== aliasPath) {
7933
+ context.addIssue({
7934
+ code: z6.ZodIssueCode.custom,
7935
+ message: "file_path and path must match when both are provided.",
7936
+ path: ["path"]
7937
+ });
7938
+ }
7939
+ })
7940
+ );
7932
7941
  var codexListDirInputSchema = z6.object({
7933
7942
  dir_path: z6.string().min(1).describe(
7934
7943
  "Path to the directory to list (relative to cwd, or absolute. In sandbox mode, / maps to the sandbox root)."