@ljoukov/llm 3.0.6 → 3.0.10
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/README.md +70 -0
- package/dist/index.cjs +2082 -825
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +225 -25
- package/dist/index.d.ts +225 -25
- package/dist/index.js +2078 -825
- package/dist/index.js.map +1 -1
- package/package.json +6 -1
package/dist/index.d.cts
CHANGED
|
@@ -74,13 +74,39 @@ type LlmModelEvent = {
|
|
|
74
74
|
type LlmBlockedEvent = {
|
|
75
75
|
readonly type: "blocked";
|
|
76
76
|
};
|
|
77
|
-
type
|
|
77
|
+
type LlmToolCallStartedEvent = {
|
|
78
|
+
readonly type: "tool_call";
|
|
79
|
+
readonly phase: "started";
|
|
80
|
+
readonly turn: number;
|
|
81
|
+
readonly toolIndex: number;
|
|
82
|
+
readonly toolName: string;
|
|
83
|
+
readonly toolId: string;
|
|
84
|
+
readonly callKind: "function" | "custom";
|
|
85
|
+
readonly callId?: string;
|
|
86
|
+
readonly input: unknown;
|
|
87
|
+
};
|
|
88
|
+
type LlmToolCallCompletedEvent = {
|
|
89
|
+
readonly type: "tool_call";
|
|
90
|
+
readonly phase: "completed";
|
|
91
|
+
readonly turn: number;
|
|
92
|
+
readonly toolIndex: number;
|
|
93
|
+
readonly toolName: string;
|
|
94
|
+
readonly toolId: string;
|
|
95
|
+
readonly callKind: "function" | "custom";
|
|
96
|
+
readonly callId?: string;
|
|
97
|
+
readonly input: unknown;
|
|
98
|
+
readonly output: unknown;
|
|
99
|
+
readonly error?: string;
|
|
100
|
+
readonly durationMs?: number;
|
|
101
|
+
};
|
|
102
|
+
type LlmToolCallStreamEvent = LlmToolCallStartedEvent | LlmToolCallCompletedEvent;
|
|
103
|
+
type LlmStreamEvent = LlmTextDeltaEvent | LlmUsageEvent | LlmModelEvent | LlmBlockedEvent | LlmToolCallStreamEvent;
|
|
78
104
|
type LlmProvider = "openai" | "chatgpt" | "gemini" | "fireworks";
|
|
79
|
-
declare const LLM_TEXT_MODEL_IDS: readonly ["gpt-5.3-codex", "gpt-5.
|
|
105
|
+
declare const LLM_TEXT_MODEL_IDS: readonly ["gpt-5.3-codex", "gpt-5.2", "gpt-5.1-codex-mini", "chatgpt-gpt-5.3-codex", "chatgpt-gpt-5.3-codex-spark", "chatgpt-gpt-5.2", "chatgpt-gpt-5.1-codex-mini", "kimi-k2.5", "glm-5", "minimax-m2.1", "gpt-oss-120b", "gemini-3-pro-preview", "gemini-3.1-pro-preview", "gemini-3-flash-preview", "gemini-2.5-pro", "gemini-flash-latest", "gemini-flash-lite-latest"];
|
|
80
106
|
type LlmTextModelId = (typeof LLM_TEXT_MODEL_IDS)[number];
|
|
81
|
-
declare const LLM_IMAGE_MODEL_IDS: readonly ["gemini-3-pro-image-preview"];
|
|
107
|
+
declare const LLM_IMAGE_MODEL_IDS: readonly ["gemini-3-pro-image-preview", "gemini-3.1-flash-image-preview"];
|
|
82
108
|
type LlmImageModelId = (typeof LLM_IMAGE_MODEL_IDS)[number];
|
|
83
|
-
declare const LLM_MODEL_IDS: readonly ["gpt-5.3-codex", "gpt-5.
|
|
109
|
+
declare const LLM_MODEL_IDS: readonly ["gpt-5.3-codex", "gpt-5.2", "gpt-5.1-codex-mini", "chatgpt-gpt-5.3-codex", "chatgpt-gpt-5.3-codex-spark", "chatgpt-gpt-5.2", "chatgpt-gpt-5.1-codex-mini", "kimi-k2.5", "glm-5", "minimax-m2.1", "gpt-oss-120b", "gemini-3-pro-preview", "gemini-3.1-pro-preview", "gemini-3-flash-preview", "gemini-2.5-pro", "gemini-flash-latest", "gemini-flash-lite-latest", "gemini-3-pro-image-preview", "gemini-3.1-flash-image-preview"];
|
|
84
110
|
type LlmModelId = (typeof LLM_MODEL_IDS)[number];
|
|
85
111
|
declare function isLlmTextModelId(value: string): value is LlmTextModelId;
|
|
86
112
|
declare function isLlmImageModelId(value: string): value is LlmImageModelId;
|
|
@@ -274,15 +300,39 @@ type LlmToolLoopResult = {
|
|
|
274
300
|
readonly steps: readonly LlmToolLoopStep[];
|
|
275
301
|
readonly totalCostUsd: number;
|
|
276
302
|
};
|
|
303
|
+
type LlmToolLoopSteeringMessage = {
|
|
304
|
+
readonly role?: "user";
|
|
305
|
+
readonly content: string | readonly LlmContentPart[];
|
|
306
|
+
};
|
|
307
|
+
type LlmToolLoopSteeringInput = string | LlmToolLoopSteeringMessage | readonly LlmToolLoopSteeringMessage[];
|
|
308
|
+
type LlmToolLoopSteeringAppendResult = {
|
|
309
|
+
readonly accepted: boolean;
|
|
310
|
+
readonly queuedCount: number;
|
|
311
|
+
};
|
|
312
|
+
type LlmToolLoopSteeringChannel = {
|
|
313
|
+
readonly append: (input: LlmToolLoopSteeringInput) => LlmToolLoopSteeringAppendResult;
|
|
314
|
+
readonly steer: (input: LlmToolLoopSteeringInput) => LlmToolLoopSteeringAppendResult;
|
|
315
|
+
readonly pendingCount: () => number;
|
|
316
|
+
readonly close: () => void;
|
|
317
|
+
};
|
|
277
318
|
type LlmToolLoopRequest = LlmInput & {
|
|
278
319
|
readonly model: LlmTextModelId;
|
|
279
320
|
readonly tools: LlmToolSet;
|
|
280
321
|
readonly modelTools?: readonly LlmToolConfig[];
|
|
281
322
|
readonly maxSteps?: number;
|
|
282
323
|
readonly openAiReasoningEffort?: OpenAiReasoningEffort;
|
|
324
|
+
readonly steering?: LlmToolLoopSteeringChannel;
|
|
283
325
|
readonly onEvent?: (event: LlmStreamEvent) => void;
|
|
284
326
|
readonly signal?: AbortSignal;
|
|
285
327
|
};
|
|
328
|
+
type LlmToolLoopStream = {
|
|
329
|
+
readonly events: AsyncIterable<LlmStreamEvent>;
|
|
330
|
+
readonly result: Promise<LlmToolLoopResult>;
|
|
331
|
+
readonly append: (input: LlmToolLoopSteeringInput) => LlmToolLoopSteeringAppendResult;
|
|
332
|
+
readonly steer: (input: LlmToolLoopSteeringInput) => LlmToolLoopSteeringAppendResult;
|
|
333
|
+
readonly pendingSteeringCount: () => number;
|
|
334
|
+
readonly abort: () => void;
|
|
335
|
+
};
|
|
286
336
|
declare function toGeminiJsonSchema(schema: z.ZodType, options?: {
|
|
287
337
|
name?: string;
|
|
288
338
|
}): JsonSchema;
|
|
@@ -297,7 +347,9 @@ declare function generateJson<T>(request: LlmJsonRequest<T>): Promise<{
|
|
|
297
347
|
readonly rawText: string;
|
|
298
348
|
readonly result: LlmTextResult;
|
|
299
349
|
}>;
|
|
350
|
+
declare function createToolLoopSteeringChannel(): LlmToolLoopSteeringChannel;
|
|
300
351
|
declare function runToolLoop(request: LlmToolLoopRequest): Promise<LlmToolLoopResult>;
|
|
352
|
+
declare function streamToolLoop(request: LlmToolLoopRequest): LlmToolLoopStream;
|
|
301
353
|
declare function generateImages(request: LlmGenerateImagesRequest): Promise<LlmImageData[]>;
|
|
302
354
|
declare function generateImageInBatches(request: LlmGenerateImagesRequest & {
|
|
303
355
|
batchSize: number;
|
|
@@ -335,6 +387,7 @@ type AgentSubagentToolConfig = {
|
|
|
335
387
|
readonly enabled?: boolean;
|
|
336
388
|
readonly maxAgents?: number;
|
|
337
389
|
readonly maxDepth?: number;
|
|
390
|
+
readonly minWaitTimeoutMs?: number;
|
|
338
391
|
readonly defaultWaitTimeoutMs?: number;
|
|
339
392
|
readonly maxWaitTimeoutMs?: number;
|
|
340
393
|
readonly promptPattern?: AgentSubagentToolPromptPattern;
|
|
@@ -406,31 +459,31 @@ type AgentFilesystemToolsOptions = {
|
|
|
406
459
|
};
|
|
407
460
|
declare const codexReadFileInputSchema: z.ZodObject<{
|
|
408
461
|
file_path: z.ZodString;
|
|
409
|
-
offset: z.ZodOptional<z.ZodNumber
|
|
410
|
-
limit: z.ZodOptional<z.ZodNumber
|
|
411
|
-
mode: z.ZodOptional<z.ZodEnum<{
|
|
462
|
+
offset: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
463
|
+
limit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
464
|
+
mode: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
412
465
|
slice: "slice";
|
|
413
466
|
indentation: "indentation";
|
|
414
|
-
}
|
|
415
|
-
indentation: z.ZodOptional<z.ZodObject<{
|
|
416
|
-
anchor_line: z.ZodOptional<z.ZodNumber
|
|
417
|
-
max_levels: z.ZodOptional<z.ZodNumber
|
|
418
|
-
include_siblings: z.ZodOptional<z.ZodBoolean
|
|
419
|
-
include_header: z.ZodOptional<z.ZodBoolean
|
|
420
|
-
max_lines: z.ZodOptional<z.ZodNumber
|
|
421
|
-
}, z.core.$strip
|
|
467
|
+
}>>>;
|
|
468
|
+
indentation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
469
|
+
anchor_line: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
470
|
+
max_levels: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
471
|
+
include_siblings: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
472
|
+
include_header: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
473
|
+
max_lines: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
474
|
+
}, z.core.$strip>>>;
|
|
422
475
|
}, z.core.$strip>;
|
|
423
476
|
declare const codexListDirInputSchema: z.ZodObject<{
|
|
424
477
|
dir_path: z.ZodString;
|
|
425
|
-
offset: z.ZodOptional<z.ZodNumber
|
|
426
|
-
limit: z.ZodOptional<z.ZodNumber
|
|
427
|
-
depth: z.ZodOptional<z.ZodNumber
|
|
478
|
+
offset: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
479
|
+
limit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
480
|
+
depth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
428
481
|
}, z.core.$strip>;
|
|
429
482
|
declare const codexGrepFilesInputSchema: z.ZodObject<{
|
|
430
483
|
pattern: z.ZodString;
|
|
431
|
-
include: z.ZodOptional<z.ZodString
|
|
432
|
-
path: z.ZodOptional<z.ZodString
|
|
433
|
-
limit: z.ZodOptional<z.ZodNumber
|
|
484
|
+
include: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
485
|
+
path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
486
|
+
limit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
434
487
|
}, z.core.$strip>;
|
|
435
488
|
declare const applyPatchInputSchema: z.ZodObject<{
|
|
436
489
|
input: z.ZodString;
|
|
@@ -539,7 +592,16 @@ type RunAgentLoopRequest = Omit<LlmToolLoopRequest, "tools"> & {
|
|
|
539
592
|
readonly subagents?: AgentSubagentToolSelection;
|
|
540
593
|
readonly telemetry?: AgentTelemetrySelection;
|
|
541
594
|
};
|
|
595
|
+
type AgentLoopStream = {
|
|
596
|
+
readonly events: AsyncIterable<LlmStreamEvent>;
|
|
597
|
+
readonly result: Promise<LlmToolLoopResult>;
|
|
598
|
+
readonly append: (input: LlmToolLoopSteeringInput) => LlmToolLoopSteeringAppendResult;
|
|
599
|
+
readonly steer: (input: LlmToolLoopSteeringInput) => LlmToolLoopSteeringAppendResult;
|
|
600
|
+
readonly pendingSteeringCount: () => number;
|
|
601
|
+
readonly abort: () => void;
|
|
602
|
+
};
|
|
542
603
|
declare function runAgentLoop(request: RunAgentLoopRequest): Promise<LlmToolLoopResult>;
|
|
604
|
+
declare function streamAgentLoop(request: RunAgentLoopRequest): AgentLoopStream;
|
|
543
605
|
type AgentTelemetryBaseEvent = {
|
|
544
606
|
readonly timestamp: string;
|
|
545
607
|
readonly runId: string;
|
|
@@ -616,6 +678,144 @@ type ApplyPatchToolInput = z.output<typeof applyPatchToolInputSchema>;
|
|
|
616
678
|
declare function createApplyPatchTool(options?: CreateApplyPatchToolOptions): LlmFunctionTool<typeof applyPatchToolInputSchema, ApplyPatchResult>;
|
|
617
679
|
declare function applyPatch(request: ApplyPatchRequest): Promise<ApplyPatchResult>;
|
|
618
680
|
|
|
681
|
+
type CandidateIssue = {
|
|
682
|
+
readonly issueId?: string;
|
|
683
|
+
readonly issueType?: string;
|
|
684
|
+
readonly summary?: string;
|
|
685
|
+
};
|
|
686
|
+
type CandidateAssessment<TIssue extends CandidateIssue = CandidateIssue> = {
|
|
687
|
+
readonly score: number;
|
|
688
|
+
readonly trainableIssues: readonly TIssue[];
|
|
689
|
+
readonly holdoutIssues?: readonly TIssue[];
|
|
690
|
+
readonly isViable?: boolean;
|
|
691
|
+
readonly issueTypeWeights?: Readonly<Record<string, number>>;
|
|
692
|
+
};
|
|
693
|
+
type CandidateProposal<TCandidate> = {
|
|
694
|
+
readonly candidate: TCandidate;
|
|
695
|
+
readonly changeSummary?: string;
|
|
696
|
+
};
|
|
697
|
+
type CandidateFeedbackEntry = {
|
|
698
|
+
readonly id: string;
|
|
699
|
+
readonly candidateId: string;
|
|
700
|
+
readonly attemptedChange: string;
|
|
701
|
+
readonly observedOutcome: string;
|
|
702
|
+
};
|
|
703
|
+
type CandidateRecord<TCandidate, TIssue extends CandidateIssue = CandidateIssue, TAssessment extends CandidateAssessment<TIssue> = CandidateAssessment<TIssue>> = {
|
|
704
|
+
readonly id: string;
|
|
705
|
+
readonly candidate: TCandidate;
|
|
706
|
+
readonly assessment: TAssessment;
|
|
707
|
+
readonly createdAtIteration: number;
|
|
708
|
+
readonly parentId?: string;
|
|
709
|
+
readonly generatorName?: string;
|
|
710
|
+
readonly sampledIssueIds?: readonly string[];
|
|
711
|
+
readonly sampledFeedbackEntryIds?: readonly string[];
|
|
712
|
+
readonly changeSummary?: string;
|
|
713
|
+
};
|
|
714
|
+
type GenerationSubagentInput<TCandidate, TIssue extends CandidateIssue, TAssessment extends CandidateAssessment<TIssue>> = {
|
|
715
|
+
readonly parent: CandidateRecord<TCandidate, TIssue, TAssessment>;
|
|
716
|
+
readonly sampledIssues: readonly TIssue[];
|
|
717
|
+
readonly feedbackEntries: readonly CandidateFeedbackEntry[];
|
|
718
|
+
readonly iteration: number;
|
|
719
|
+
};
|
|
720
|
+
type GenerationSubagent<TCandidate, TIssue extends CandidateIssue = CandidateIssue, TAssessment extends CandidateAssessment<TIssue> = CandidateAssessment<TIssue>> = {
|
|
721
|
+
readonly name: string;
|
|
722
|
+
readonly supportsIssueBatch?: boolean;
|
|
723
|
+
generate: (input: GenerationSubagentInput<TCandidate, TIssue, TAssessment>) => Promise<readonly CandidateProposal<TCandidate>[]>;
|
|
724
|
+
};
|
|
725
|
+
type AssessmentSubagentInput<TCandidate, TIssue extends CandidateIssue, TAssessment extends CandidateAssessment<TIssue>> = {
|
|
726
|
+
readonly candidate: TCandidate;
|
|
727
|
+
readonly iteration: number;
|
|
728
|
+
readonly parent?: CandidateRecord<TCandidate, TIssue, TAssessment>;
|
|
729
|
+
readonly generatorName?: string;
|
|
730
|
+
readonly sampledIssues?: readonly TIssue[];
|
|
731
|
+
};
|
|
732
|
+
type PostGenerationCheckInput<TCandidate, TIssue extends CandidateIssue, TAssessment extends CandidateAssessment<TIssue>> = {
|
|
733
|
+
readonly proposal: CandidateProposal<TCandidate>;
|
|
734
|
+
readonly parent: CandidateRecord<TCandidate, TIssue, TAssessment>;
|
|
735
|
+
readonly generatorName: string;
|
|
736
|
+
readonly sampledIssues: readonly TIssue[];
|
|
737
|
+
readonly iteration: number;
|
|
738
|
+
};
|
|
739
|
+
type ParentSelectionMidpoint = {
|
|
740
|
+
readonly mode: "fixed";
|
|
741
|
+
readonly value: number;
|
|
742
|
+
} | {
|
|
743
|
+
readonly mode: "percentile";
|
|
744
|
+
readonly percentile: number;
|
|
745
|
+
};
|
|
746
|
+
type ParentSelectionConfig = {
|
|
747
|
+
readonly sharpness?: number;
|
|
748
|
+
readonly midpoint?: ParentSelectionMidpoint;
|
|
749
|
+
readonly noveltyWeight?: number;
|
|
750
|
+
readonly replace?: boolean;
|
|
751
|
+
};
|
|
752
|
+
type FeedbackScope = {
|
|
753
|
+
readonly mode: "none";
|
|
754
|
+
} | {
|
|
755
|
+
readonly mode: "ancestors";
|
|
756
|
+
readonly maxDepth?: number;
|
|
757
|
+
} | {
|
|
758
|
+
readonly mode: "neighborhood";
|
|
759
|
+
readonly maxDistance: number;
|
|
760
|
+
};
|
|
761
|
+
type CandidateEvolutionStats = {
|
|
762
|
+
generationCalls: number;
|
|
763
|
+
issuesSupplied: number;
|
|
764
|
+
proposalsGenerated: number;
|
|
765
|
+
proposalsAfterPostCheck: number;
|
|
766
|
+
assessmentCalls: number;
|
|
767
|
+
postCheckCalls: number;
|
|
768
|
+
feedbackEntriesSupplied: number;
|
|
769
|
+
};
|
|
770
|
+
type CandidateEvolutionSnapshot<TCandidate, TIssue extends CandidateIssue = CandidateIssue, TAssessment extends CandidateAssessment<TIssue> = CandidateAssessment<TIssue>> = {
|
|
771
|
+
readonly iteration: number;
|
|
772
|
+
readonly archiveSize: number;
|
|
773
|
+
readonly bestCandidateId: string;
|
|
774
|
+
readonly bestScore: number;
|
|
775
|
+
readonly scorePercentiles: Readonly<Record<number, number>>;
|
|
776
|
+
readonly stats: CandidateEvolutionStats;
|
|
777
|
+
readonly bestCandidate: CandidateRecord<TCandidate, TIssue, TAssessment>;
|
|
778
|
+
};
|
|
779
|
+
type PostCheckRejection<TCandidate> = {
|
|
780
|
+
readonly id: string;
|
|
781
|
+
readonly candidate: TCandidate;
|
|
782
|
+
readonly parentId: string;
|
|
783
|
+
readonly generatorName: string;
|
|
784
|
+
readonly iteration: number;
|
|
785
|
+
readonly sampledIssueIds: readonly string[];
|
|
786
|
+
readonly changeSummary?: string;
|
|
787
|
+
};
|
|
788
|
+
type CandidateEvolutionOptions<TCandidate, TIssue extends CandidateIssue = CandidateIssue, TAssessment extends CandidateAssessment<TIssue> = CandidateAssessment<TIssue>> = {
|
|
789
|
+
readonly seedCandidate: TCandidate;
|
|
790
|
+
readonly assessCandidate: (input: AssessmentSubagentInput<TCandidate, TIssue, TAssessment>) => Promise<TAssessment>;
|
|
791
|
+
readonly generators: readonly GenerationSubagent<TCandidate, TIssue, TAssessment>[];
|
|
792
|
+
readonly iterations: number;
|
|
793
|
+
readonly parentsPerIteration: number;
|
|
794
|
+
readonly batchSize?: number;
|
|
795
|
+
readonly generationConcurrency?: number;
|
|
796
|
+
readonly assessmentConcurrency?: number;
|
|
797
|
+
readonly parentSelection?: ParentSelectionConfig;
|
|
798
|
+
readonly feedbackScope?: FeedbackScope;
|
|
799
|
+
readonly verifyGeneratedCandidate?: (input: PostGenerationCheckInput<TCandidate, TIssue, TAssessment>) => Promise<boolean>;
|
|
800
|
+
readonly describeObservedOutcome?: (input: {
|
|
801
|
+
readonly assessment: TAssessment;
|
|
802
|
+
readonly parentAssessment: TAssessment | null;
|
|
803
|
+
}) => string;
|
|
804
|
+
readonly scorePercentiles?: readonly number[];
|
|
805
|
+
readonly random?: () => number;
|
|
806
|
+
readonly onSnapshot?: (snapshot: CandidateEvolutionSnapshot<TCandidate, TIssue, TAssessment>) => void | Promise<void>;
|
|
807
|
+
};
|
|
808
|
+
type CandidateEvolutionResult<TCandidate, TIssue extends CandidateIssue = CandidateIssue, TAssessment extends CandidateAssessment<TIssue> = CandidateAssessment<TIssue>> = {
|
|
809
|
+
readonly archive: readonly CandidateRecord<TCandidate, TIssue, TAssessment>[];
|
|
810
|
+
readonly feedbackEntries: readonly CandidateFeedbackEntry[];
|
|
811
|
+
readonly postCheckRejections: readonly PostCheckRejection<TCandidate>[];
|
|
812
|
+
readonly snapshots: readonly CandidateEvolutionSnapshot<TCandidate, TIssue, TAssessment>[];
|
|
813
|
+
readonly bestCandidate: CandidateRecord<TCandidate, TIssue, TAssessment>;
|
|
814
|
+
readonly totalStats: CandidateEvolutionStats;
|
|
815
|
+
readonly stoppedEarly: boolean;
|
|
816
|
+
};
|
|
817
|
+
declare function runCandidateEvolution<TCandidate, TIssue extends CandidateIssue = CandidateIssue, TAssessment extends CandidateAssessment<TIssue> = CandidateAssessment<TIssue>>(options: CandidateEvolutionOptions<TCandidate, TIssue, TAssessment>): Promise<CandidateEvolutionResult<TCandidate, TIssue, TAssessment>>;
|
|
818
|
+
|
|
619
819
|
type ChatGptAuthProfile = {
|
|
620
820
|
readonly access: string;
|
|
621
821
|
readonly refresh: string;
|
|
@@ -636,7 +836,7 @@ declare function refreshChatGptOauthToken(refreshToken: string, fallback?: {
|
|
|
636
836
|
}): Promise<ChatGptAuthProfile>;
|
|
637
837
|
declare function getChatGptAuthProfile(): Promise<ChatGptAuthProfile>;
|
|
638
838
|
|
|
639
|
-
declare const OPENAI_MODEL_IDS: readonly ["gpt-5.3-codex", "gpt-5.
|
|
839
|
+
declare const OPENAI_MODEL_IDS: readonly ["gpt-5.3-codex", "gpt-5.2", "gpt-5.1-codex-mini"];
|
|
640
840
|
type OpenAiModelId = (typeof OPENAI_MODEL_IDS)[number];
|
|
641
841
|
declare function isOpenAiModelId(value: string): value is OpenAiModelId;
|
|
642
842
|
declare const CHATGPT_MODEL_IDS: readonly ["chatgpt-gpt-5.3-codex", "chatgpt-gpt-5.3-codex-spark", "chatgpt-gpt-5.2", "chatgpt-gpt-5.1-codex-mini"];
|
|
@@ -644,8 +844,8 @@ type ChatGptModelId = (typeof CHATGPT_MODEL_IDS)[number];
|
|
|
644
844
|
declare function isChatGptModelId(value: string): value is ChatGptModelId;
|
|
645
845
|
|
|
646
846
|
declare const GEMINI_TEXT_MODEL_IDS: readonly ["gemini-3-pro-preview", "gemini-3.1-pro-preview", "gemini-3-flash-preview", "gemini-2.5-pro", "gemini-flash-latest", "gemini-flash-lite-latest"];
|
|
647
|
-
declare const GEMINI_IMAGE_MODEL_IDS: readonly ["gemini-3-pro-image-preview"];
|
|
648
|
-
declare const GEMINI_MODEL_IDS: readonly ["gemini-3-pro-preview", "gemini-3.1-pro-preview", "gemini-3-flash-preview", "gemini-2.5-pro", "gemini-flash-latest", "gemini-flash-lite-latest", "gemini-3-pro-image-preview"];
|
|
847
|
+
declare const GEMINI_IMAGE_MODEL_IDS: readonly ["gemini-3-pro-image-preview", "gemini-3.1-flash-image-preview"];
|
|
848
|
+
declare const GEMINI_MODEL_IDS: readonly ["gemini-3-pro-preview", "gemini-3.1-pro-preview", "gemini-3-flash-preview", "gemini-2.5-pro", "gemini-flash-latest", "gemini-flash-lite-latest", "gemini-3-pro-image-preview", "gemini-3.1-flash-image-preview"];
|
|
649
849
|
type GeminiModelId = (typeof GEMINI_MODEL_IDS)[number];
|
|
650
850
|
type GeminiTextModelId = (typeof GEMINI_TEXT_MODEL_IDS)[number];
|
|
651
851
|
type GeminiImageModelId = (typeof GEMINI_IMAGE_MODEL_IDS)[number];
|
|
@@ -667,4 +867,4 @@ declare const FIREWORKS_DEFAULT_GPT_OSS_120B_MODEL: FireworksModelId;
|
|
|
667
867
|
declare function isFireworksModelId(value: string): value is FireworksModelId;
|
|
668
868
|
declare function resolveFireworksModelId(model: string): string | undefined;
|
|
669
869
|
|
|
670
|
-
export { type AgentDirectoryEntry, type AgentFilesystem, type AgentFilesystemToolAccessContext, type AgentFilesystemToolAccessHook, type AgentFilesystemToolAction, type AgentFilesystemToolConfig, type AgentFilesystemToolName, type AgentFilesystemToolProfile, type AgentFilesystemToolSelection, type AgentFilesystemToolsOptions, type AgentPathInfo, type AgentPathKind, type AgentRunCompletedTelemetryEvent, type AgentRunStartedTelemetryEvent, type AgentRunStreamTelemetryEvent, type AgentSubagentToolConfig, type AgentSubagentToolPromptPattern, type AgentSubagentToolSelection, type AgentTelemetryConfig, type AgentTelemetryEvent, type AgentTelemetrySelection, type AgentTelemetrySink, type ApplyPatchAccessContext, type ApplyPatchAccessHook, type ApplyPatchRequest, type ApplyPatchResult, type ApplyPatchToolInput, CHATGPT_MODEL_IDS, CODEX_APPLY_PATCH_FREEFORM_TOOL_DESCRIPTION, CODEX_APPLY_PATCH_JSON_TOOL_DESCRIPTION, CODEX_APPLY_PATCH_LARK_GRAMMAR, type ChatGptAuthProfile, type ChatGptModelId, type CodexApplyPatchToolInput, type CodexGrepFilesToolInput, type CodexListDirToolInput, type CodexReadFileToolInput, type CreateApplyPatchToolOptions, FIREWORKS_DEFAULT_GLM_MODEL, FIREWORKS_DEFAULT_GPT_OSS_120B_MODEL, FIREWORKS_DEFAULT_KIMI_MODEL, FIREWORKS_DEFAULT_MINIMAX_MODEL, FIREWORKS_MODEL_IDS, type FireworksModelId, GEMINI_IMAGE_MODEL_IDS, GEMINI_MODEL_IDS, GEMINI_TEXT_MODEL_IDS, type GeminiGlobToolInput, type GeminiGrepSearchToolInput, type GeminiImageModelId, type GeminiListDirectoryToolInput, type GeminiModelId, type GeminiReadFileToolInput, type GeminiReadFilesToolInput, type GeminiReplaceToolInput, type GeminiRgSearchToolInput, type GeminiTextModelId, type GeminiWriteFileToolInput, InMemoryAgentFilesystem, type JsonSchema, LLM_IMAGE_MODEL_IDS, LLM_MODEL_IDS, LLM_TEXT_MODEL_IDS, type LlmBaseRequest, type LlmBlockedEvent, type LlmContent, type LlmContentPart, type LlmCustomTool, type LlmCustomToolInputFormat, type LlmExecutableTool, type LlmFunctionTool, type LlmImageData, type LlmImageModelId, type LlmImageSize, type LlmInput, type LlmInputMessage, LlmJsonCallError, type LlmJsonRequest, type LlmJsonStream, type LlmJsonStreamEvent, type LlmJsonStreamRequest, type LlmModelEvent, type LlmModelId, type LlmProvider, type LlmStreamEvent, type LlmTextDeltaEvent, type LlmTextModelId, type LlmTextRequest, type LlmTextResult, type LlmTextStream, type LlmToolCallContext, type LlmToolCallResult, type LlmToolConfig, type LlmToolLoopRequest, type LlmToolLoopResult, type LlmToolLoopStep, type LlmToolSet, type LlmUsageEvent, type LlmUsageTokens, type LlmWebSearchMode, type ModelConcurrencyConfig, type ModelConcurrencyProvider, OPENAI_MODEL_IDS, type OpenAiModelId, type RunAgentLoopRequest, appendMarkdownSourcesSection, applyPatch, configureGemini, configureModelConcurrency, convertGooglePartsToLlmParts, createApplyPatchTool, createCodexApplyPatchTool, createCodexFilesystemToolSet, createCodexReadFileTool, createFilesystemToolSetForModel, createGeminiFilesystemToolSet, createGeminiReadFileTool, createGlobTool, createGrepFilesTool, createGrepSearchTool, createInMemoryAgentFilesystem, createListDirTool, createListDirectoryTool, createModelAgnosticFilesystemToolSet, createNodeAgentFilesystem, createReadFilesTool, createReplaceTool, createRgSearchTool, createWriteFileTool, customTool, encodeChatGptAuthJson, encodeChatGptAuthJsonB64, estimateCallCostUsd, exchangeChatGptOauthCode, generateImageInBatches, generateImages, generateJson, generateText, getChatGptAuthProfile, getCurrentToolCallContext, isChatGptModelId, isFireworksModelId, isGeminiImageModelId, isGeminiModelId, isGeminiTextModelId, isLlmImageModelId, isLlmModelId, isLlmTextModelId, isOpenAiModelId, loadEnvFromFile, loadLocalEnv, parseJsonFromLlmText, refreshChatGptOauthToken, resetModelConcurrencyConfig, resolveFilesystemToolProfile, resolveFireworksModelId, runAgentLoop, runToolLoop, sanitisePartForLogging, streamJson, streamText, stripCodexCitationMarkers, toGeminiJsonSchema, tool };
|
|
870
|
+
export { type AgentDirectoryEntry, type AgentFilesystem, type AgentFilesystemToolAccessContext, type AgentFilesystemToolAccessHook, type AgentFilesystemToolAction, type AgentFilesystemToolConfig, type AgentFilesystemToolName, type AgentFilesystemToolProfile, type AgentFilesystemToolSelection, type AgentFilesystemToolsOptions, type AgentLoopStream, type AgentPathInfo, type AgentPathKind, type AgentRunCompletedTelemetryEvent, type AgentRunStartedTelemetryEvent, type AgentRunStreamTelemetryEvent, type AgentSubagentToolConfig, type AgentSubagentToolPromptPattern, type AgentSubagentToolSelection, type AgentTelemetryConfig, type AgentTelemetryEvent, type AgentTelemetrySelection, type AgentTelemetrySink, type ApplyPatchAccessContext, type ApplyPatchAccessHook, type ApplyPatchRequest, type ApplyPatchResult, type ApplyPatchToolInput, type AssessmentSubagentInput, CHATGPT_MODEL_IDS, CODEX_APPLY_PATCH_FREEFORM_TOOL_DESCRIPTION, CODEX_APPLY_PATCH_JSON_TOOL_DESCRIPTION, CODEX_APPLY_PATCH_LARK_GRAMMAR, type CandidateAssessment, type CandidateEvolutionOptions, type CandidateEvolutionResult, type CandidateEvolutionSnapshot, type CandidateEvolutionStats, type CandidateFeedbackEntry, type CandidateIssue, type CandidateProposal, type CandidateRecord, type ChatGptAuthProfile, type ChatGptModelId, type CodexApplyPatchToolInput, type CodexGrepFilesToolInput, type CodexListDirToolInput, type CodexReadFileToolInput, type CreateApplyPatchToolOptions, FIREWORKS_DEFAULT_GLM_MODEL, FIREWORKS_DEFAULT_GPT_OSS_120B_MODEL, FIREWORKS_DEFAULT_KIMI_MODEL, FIREWORKS_DEFAULT_MINIMAX_MODEL, FIREWORKS_MODEL_IDS, type FeedbackScope, type FireworksModelId, GEMINI_IMAGE_MODEL_IDS, GEMINI_MODEL_IDS, GEMINI_TEXT_MODEL_IDS, type GeminiGlobToolInput, type GeminiGrepSearchToolInput, type GeminiImageModelId, type GeminiListDirectoryToolInput, type GeminiModelId, type GeminiReadFileToolInput, type GeminiReadFilesToolInput, type GeminiReplaceToolInput, type GeminiRgSearchToolInput, type GeminiTextModelId, type GeminiWriteFileToolInput, type GenerationSubagent, type GenerationSubagentInput, InMemoryAgentFilesystem, type JsonSchema, LLM_IMAGE_MODEL_IDS, LLM_MODEL_IDS, LLM_TEXT_MODEL_IDS, type LlmBaseRequest, type LlmBlockedEvent, type LlmContent, type LlmContentPart, type LlmCustomTool, type LlmCustomToolInputFormat, type LlmExecutableTool, type LlmFunctionTool, type LlmImageData, type LlmImageModelId, type LlmImageSize, type LlmInput, type LlmInputMessage, LlmJsonCallError, type LlmJsonRequest, type LlmJsonStream, type LlmJsonStreamEvent, type LlmJsonStreamRequest, type LlmModelEvent, type LlmModelId, type LlmProvider, type LlmStreamEvent, type LlmTextDeltaEvent, type LlmTextModelId, type LlmTextRequest, type LlmTextResult, type LlmTextStream, type LlmToolCallCompletedEvent, type LlmToolCallContext, type LlmToolCallResult, type LlmToolCallStartedEvent, type LlmToolCallStreamEvent, type LlmToolConfig, type LlmToolLoopRequest, type LlmToolLoopResult, type LlmToolLoopSteeringAppendResult, type LlmToolLoopSteeringChannel, type LlmToolLoopSteeringInput, type LlmToolLoopSteeringMessage, type LlmToolLoopStep, type LlmToolLoopStream, type LlmToolSet, type LlmUsageEvent, type LlmUsageTokens, type LlmWebSearchMode, type ModelConcurrencyConfig, type ModelConcurrencyProvider, OPENAI_MODEL_IDS, type OpenAiModelId, type ParentSelectionConfig, type ParentSelectionMidpoint, type PostCheckRejection, type PostGenerationCheckInput, type RunAgentLoopRequest, appendMarkdownSourcesSection, applyPatch, configureGemini, configureModelConcurrency, convertGooglePartsToLlmParts, createApplyPatchTool, createCodexApplyPatchTool, createCodexFilesystemToolSet, createCodexReadFileTool, createFilesystemToolSetForModel, createGeminiFilesystemToolSet, createGeminiReadFileTool, createGlobTool, createGrepFilesTool, createGrepSearchTool, createInMemoryAgentFilesystem, createListDirTool, createListDirectoryTool, createModelAgnosticFilesystemToolSet, createNodeAgentFilesystem, createReadFilesTool, createReplaceTool, createRgSearchTool, createToolLoopSteeringChannel, createWriteFileTool, customTool, encodeChatGptAuthJson, encodeChatGptAuthJsonB64, estimateCallCostUsd, exchangeChatGptOauthCode, generateImageInBatches, generateImages, generateJson, generateText, getChatGptAuthProfile, getCurrentToolCallContext, isChatGptModelId, isFireworksModelId, isGeminiImageModelId, isGeminiModelId, isGeminiTextModelId, isLlmImageModelId, isLlmModelId, isLlmTextModelId, isOpenAiModelId, loadEnvFromFile, loadLocalEnv, parseJsonFromLlmText, refreshChatGptOauthToken, resetModelConcurrencyConfig, resolveFilesystemToolProfile, resolveFireworksModelId, runAgentLoop, runCandidateEvolution, runToolLoop, sanitisePartForLogging, streamAgentLoop, streamJson, streamText, streamToolLoop, stripCodexCitationMarkers, toGeminiJsonSchema, tool };
|