@ljoukov/llm 3.0.8 → 3.0.11
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.cjs +679 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +145 -7
- package/dist/index.d.ts +145 -7
- package/dist/index.js +678 -9
- package/dist/index.js.map +1 -1
- package/package.json +5 -1
package/dist/index.d.cts
CHANGED
|
@@ -102,11 +102,11 @@ type LlmToolCallCompletedEvent = {
|
|
|
102
102
|
type LlmToolCallStreamEvent = LlmToolCallStartedEvent | LlmToolCallCompletedEvent;
|
|
103
103
|
type LlmStreamEvent = LlmTextDeltaEvent | LlmUsageEvent | LlmModelEvent | LlmBlockedEvent | LlmToolCallStreamEvent;
|
|
104
104
|
type LlmProvider = "openai" | "chatgpt" | "gemini" | "fireworks";
|
|
105
|
-
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"];
|
|
106
106
|
type LlmTextModelId = (typeof LLM_TEXT_MODEL_IDS)[number];
|
|
107
|
-
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"];
|
|
108
108
|
type LlmImageModelId = (typeof LLM_IMAGE_MODEL_IDS)[number];
|
|
109
|
-
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"];
|
|
110
110
|
type LlmModelId = (typeof LLM_MODEL_IDS)[number];
|
|
111
111
|
declare function isLlmTextModelId(value: string): value is LlmTextModelId;
|
|
112
112
|
declare function isLlmImageModelId(value: string): value is LlmImageModelId;
|
|
@@ -678,6 +678,144 @@ type ApplyPatchToolInput = z.output<typeof applyPatchToolInputSchema>;
|
|
|
678
678
|
declare function createApplyPatchTool(options?: CreateApplyPatchToolOptions): LlmFunctionTool<typeof applyPatchToolInputSchema, ApplyPatchResult>;
|
|
679
679
|
declare function applyPatch(request: ApplyPatchRequest): Promise<ApplyPatchResult>;
|
|
680
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
|
+
|
|
681
819
|
type ChatGptAuthProfile = {
|
|
682
820
|
readonly access: string;
|
|
683
821
|
readonly refresh: string;
|
|
@@ -698,7 +836,7 @@ declare function refreshChatGptOauthToken(refreshToken: string, fallback?: {
|
|
|
698
836
|
}): Promise<ChatGptAuthProfile>;
|
|
699
837
|
declare function getChatGptAuthProfile(): Promise<ChatGptAuthProfile>;
|
|
700
838
|
|
|
701
|
-
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"];
|
|
702
840
|
type OpenAiModelId = (typeof OPENAI_MODEL_IDS)[number];
|
|
703
841
|
declare function isOpenAiModelId(value: string): value is OpenAiModelId;
|
|
704
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"];
|
|
@@ -706,8 +844,8 @@ type ChatGptModelId = (typeof CHATGPT_MODEL_IDS)[number];
|
|
|
706
844
|
declare function isChatGptModelId(value: string): value is ChatGptModelId;
|
|
707
845
|
|
|
708
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"];
|
|
709
|
-
declare const GEMINI_IMAGE_MODEL_IDS: readonly ["gemini-3-pro-image-preview"];
|
|
710
|
-
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"];
|
|
711
849
|
type GeminiModelId = (typeof GEMINI_MODEL_IDS)[number];
|
|
712
850
|
type GeminiTextModelId = (typeof GEMINI_TEXT_MODEL_IDS)[number];
|
|
713
851
|
type GeminiImageModelId = (typeof GEMINI_IMAGE_MODEL_IDS)[number];
|
|
@@ -729,4 +867,4 @@ declare const FIREWORKS_DEFAULT_GPT_OSS_120B_MODEL: FireworksModelId;
|
|
|
729
867
|
declare function isFireworksModelId(value: string): value is FireworksModelId;
|
|
730
868
|
declare function resolveFireworksModelId(model: string): string | undefined;
|
|
731
869
|
|
|
732
|
-
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, 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 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 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, runToolLoop, sanitisePartForLogging, streamAgentLoop, streamJson, streamText, streamToolLoop, 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -102,11 +102,11 @@ type LlmToolCallCompletedEvent = {
|
|
|
102
102
|
type LlmToolCallStreamEvent = LlmToolCallStartedEvent | LlmToolCallCompletedEvent;
|
|
103
103
|
type LlmStreamEvent = LlmTextDeltaEvent | LlmUsageEvent | LlmModelEvent | LlmBlockedEvent | LlmToolCallStreamEvent;
|
|
104
104
|
type LlmProvider = "openai" | "chatgpt" | "gemini" | "fireworks";
|
|
105
|
-
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"];
|
|
106
106
|
type LlmTextModelId = (typeof LLM_TEXT_MODEL_IDS)[number];
|
|
107
|
-
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"];
|
|
108
108
|
type LlmImageModelId = (typeof LLM_IMAGE_MODEL_IDS)[number];
|
|
109
|
-
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"];
|
|
110
110
|
type LlmModelId = (typeof LLM_MODEL_IDS)[number];
|
|
111
111
|
declare function isLlmTextModelId(value: string): value is LlmTextModelId;
|
|
112
112
|
declare function isLlmImageModelId(value: string): value is LlmImageModelId;
|
|
@@ -678,6 +678,144 @@ type ApplyPatchToolInput = z.output<typeof applyPatchToolInputSchema>;
|
|
|
678
678
|
declare function createApplyPatchTool(options?: CreateApplyPatchToolOptions): LlmFunctionTool<typeof applyPatchToolInputSchema, ApplyPatchResult>;
|
|
679
679
|
declare function applyPatch(request: ApplyPatchRequest): Promise<ApplyPatchResult>;
|
|
680
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
|
+
|
|
681
819
|
type ChatGptAuthProfile = {
|
|
682
820
|
readonly access: string;
|
|
683
821
|
readonly refresh: string;
|
|
@@ -698,7 +836,7 @@ declare function refreshChatGptOauthToken(refreshToken: string, fallback?: {
|
|
|
698
836
|
}): Promise<ChatGptAuthProfile>;
|
|
699
837
|
declare function getChatGptAuthProfile(): Promise<ChatGptAuthProfile>;
|
|
700
838
|
|
|
701
|
-
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"];
|
|
702
840
|
type OpenAiModelId = (typeof OPENAI_MODEL_IDS)[number];
|
|
703
841
|
declare function isOpenAiModelId(value: string): value is OpenAiModelId;
|
|
704
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"];
|
|
@@ -706,8 +844,8 @@ type ChatGptModelId = (typeof CHATGPT_MODEL_IDS)[number];
|
|
|
706
844
|
declare function isChatGptModelId(value: string): value is ChatGptModelId;
|
|
707
845
|
|
|
708
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"];
|
|
709
|
-
declare const GEMINI_IMAGE_MODEL_IDS: readonly ["gemini-3-pro-image-preview"];
|
|
710
|
-
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"];
|
|
711
849
|
type GeminiModelId = (typeof GEMINI_MODEL_IDS)[number];
|
|
712
850
|
type GeminiTextModelId = (typeof GEMINI_TEXT_MODEL_IDS)[number];
|
|
713
851
|
type GeminiImageModelId = (typeof GEMINI_IMAGE_MODEL_IDS)[number];
|
|
@@ -729,4 +867,4 @@ declare const FIREWORKS_DEFAULT_GPT_OSS_120B_MODEL: FireworksModelId;
|
|
|
729
867
|
declare function isFireworksModelId(value: string): value is FireworksModelId;
|
|
730
868
|
declare function resolveFireworksModelId(model: string): string | undefined;
|
|
731
869
|
|
|
732
|
-
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, 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 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 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, runToolLoop, sanitisePartForLogging, streamAgentLoop, streamJson, streamText, streamToolLoop, 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 };
|