@ljoukov/llm 3.0.3 → 3.0.4

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
@@ -302,6 +302,22 @@ declare function loadEnvFromFile(filePath: string, { override }?: {
302
302
  override?: boolean;
303
303
  }): void;
304
304
 
305
+ type AgentSubagentToolPromptPattern = "codex" | "none";
306
+ type AgentSubagentToolConfig = {
307
+ readonly enabled?: boolean;
308
+ readonly maxAgents?: number;
309
+ readonly maxDepth?: number;
310
+ readonly defaultWaitTimeoutMs?: number;
311
+ readonly maxWaitTimeoutMs?: number;
312
+ readonly promptPattern?: AgentSubagentToolPromptPattern;
313
+ readonly instructions?: string;
314
+ readonly model?: LlmTextModelId;
315
+ readonly maxSteps?: number;
316
+ readonly inheritTools?: boolean;
317
+ readonly inheritFilesystemTool?: boolean;
318
+ };
319
+ type AgentSubagentToolSelection = boolean | AgentSubagentToolConfig;
320
+
305
321
  type AgentPathKind = "file" | "directory" | "symlink" | "other";
306
322
  type AgentPathInfo = {
307
323
  readonly kind: AgentPathKind;
@@ -485,10 +501,14 @@ type AgentFilesystemToolConfig = {
485
501
  readonly options?: AgentFilesystemToolsOptions;
486
502
  };
487
503
  type AgentFilesystemToolSelection = boolean | AgentFilesystemToolProfile | AgentFilesystemToolConfig;
504
+
488
505
  type RunAgentLoopRequest = Omit<LlmToolLoopRequest, "tools"> & {
489
506
  readonly tools?: LlmToolSet;
490
507
  readonly filesystemTool?: AgentFilesystemToolSelection;
491
508
  readonly filesystem_tool?: AgentFilesystemToolSelection;
509
+ readonly subagentTool?: AgentSubagentToolSelection;
510
+ readonly subagent_tool?: AgentSubagentToolSelection;
511
+ readonly subagents?: AgentSubagentToolSelection;
492
512
  };
493
513
  declare function runAgentLoop(request: RunAgentLoopRequest): Promise<LlmToolLoopResult>;
494
514
 
@@ -579,4 +599,4 @@ declare const FIREWORKS_DEFAULT_GPT_OSS_120B_MODEL: FireworksModelId;
579
599
  declare function isFireworksModelId(value: string): value is FireworksModelId;
580
600
  declare function resolveFireworksModelId(model: string): string | undefined;
581
601
 
582
- 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 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, OPENAI_MODEL_IDS, type OpenAiModelId, type RunAgentLoopRequest, appendMarkdownSourcesSection, applyPatch, configureGemini, 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, resolveFilesystemToolProfile, resolveFireworksModelId, runAgentLoop, runToolLoop, sanitisePartForLogging, streamJson, streamText, stripCodexCitationMarkers, toGeminiJsonSchema, tool };
602
+ 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 AgentSubagentToolConfig, type AgentSubagentToolPromptPattern, type AgentSubagentToolSelection, 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, OPENAI_MODEL_IDS, type OpenAiModelId, type RunAgentLoopRequest, appendMarkdownSourcesSection, applyPatch, configureGemini, 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, resolveFilesystemToolProfile, resolveFireworksModelId, runAgentLoop, runToolLoop, sanitisePartForLogging, streamJson, streamText, stripCodexCitationMarkers, toGeminiJsonSchema, tool };
package/dist/index.d.ts CHANGED
@@ -302,6 +302,22 @@ declare function loadEnvFromFile(filePath: string, { override }?: {
302
302
  override?: boolean;
303
303
  }): void;
304
304
 
305
+ type AgentSubagentToolPromptPattern = "codex" | "none";
306
+ type AgentSubagentToolConfig = {
307
+ readonly enabled?: boolean;
308
+ readonly maxAgents?: number;
309
+ readonly maxDepth?: number;
310
+ readonly defaultWaitTimeoutMs?: number;
311
+ readonly maxWaitTimeoutMs?: number;
312
+ readonly promptPattern?: AgentSubagentToolPromptPattern;
313
+ readonly instructions?: string;
314
+ readonly model?: LlmTextModelId;
315
+ readonly maxSteps?: number;
316
+ readonly inheritTools?: boolean;
317
+ readonly inheritFilesystemTool?: boolean;
318
+ };
319
+ type AgentSubagentToolSelection = boolean | AgentSubagentToolConfig;
320
+
305
321
  type AgentPathKind = "file" | "directory" | "symlink" | "other";
306
322
  type AgentPathInfo = {
307
323
  readonly kind: AgentPathKind;
@@ -485,10 +501,14 @@ type AgentFilesystemToolConfig = {
485
501
  readonly options?: AgentFilesystemToolsOptions;
486
502
  };
487
503
  type AgentFilesystemToolSelection = boolean | AgentFilesystemToolProfile | AgentFilesystemToolConfig;
504
+
488
505
  type RunAgentLoopRequest = Omit<LlmToolLoopRequest, "tools"> & {
489
506
  readonly tools?: LlmToolSet;
490
507
  readonly filesystemTool?: AgentFilesystemToolSelection;
491
508
  readonly filesystem_tool?: AgentFilesystemToolSelection;
509
+ readonly subagentTool?: AgentSubagentToolSelection;
510
+ readonly subagent_tool?: AgentSubagentToolSelection;
511
+ readonly subagents?: AgentSubagentToolSelection;
492
512
  };
493
513
  declare function runAgentLoop(request: RunAgentLoopRequest): Promise<LlmToolLoopResult>;
494
514
 
@@ -579,4 +599,4 @@ declare const FIREWORKS_DEFAULT_GPT_OSS_120B_MODEL: FireworksModelId;
579
599
  declare function isFireworksModelId(value: string): value is FireworksModelId;
580
600
  declare function resolveFireworksModelId(model: string): string | undefined;
581
601
 
582
- 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 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, OPENAI_MODEL_IDS, type OpenAiModelId, type RunAgentLoopRequest, appendMarkdownSourcesSection, applyPatch, configureGemini, 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, resolveFilesystemToolProfile, resolveFireworksModelId, runAgentLoop, runToolLoop, sanitisePartForLogging, streamJson, streamText, stripCodexCitationMarkers, toGeminiJsonSchema, tool };
602
+ 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 AgentSubagentToolConfig, type AgentSubagentToolPromptPattern, type AgentSubagentToolSelection, 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, OPENAI_MODEL_IDS, type OpenAiModelId, type RunAgentLoopRequest, appendMarkdownSourcesSection, applyPatch, configureGemini, 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, resolveFilesystemToolProfile, resolveFireworksModelId, runAgentLoop, runToolLoop, sanitisePartForLogging, streamJson, streamText, stripCodexCitationMarkers, toGeminiJsonSchema, tool };