llmist 16.2.3 → 16.2.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.cjs +46 -46
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +24 -24
- package/dist/index.d.ts +24 -24
- package/dist/index.js +44 -44
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1896,7 +1896,7 @@ interface Observers {
|
|
|
1896
1896
|
onRateLimitThrottle?: (context: ObserveRateLimitThrottleContext) => void | Promise<void>;
|
|
1897
1897
|
/** Called when a retry attempt is made after a failed LLM call */
|
|
1898
1898
|
onRetryAttempt?: (context: ObserveRetryAttemptContext) => void | Promise<void>;
|
|
1899
|
-
/** Called when a skill is activated (via
|
|
1899
|
+
/** Called when a skill is activated (via LoadSkill gadget or pre-activation) */
|
|
1900
1900
|
onSkillActivated?: (context: ObserveSkillActivatedContext) => void | Promise<void>;
|
|
1901
1901
|
}
|
|
1902
1902
|
/**
|
|
@@ -10047,6 +10047,28 @@ declare function resolveInstructions(instructions: string, options?: {
|
|
|
10047
10047
|
enableShellPreprocessing?: boolean;
|
|
10048
10048
|
}): string;
|
|
10049
10049
|
|
|
10050
|
+
/**
|
|
10051
|
+
* LoadSkill meta-gadget — bridges the skill system into the gadget execution pipeline.
|
|
10052
|
+
*
|
|
10053
|
+
* When skills are registered with an agent, this gadget is auto-created and added
|
|
10054
|
+
* to the gadget registry. The LLM can invoke it like any other gadget, and the
|
|
10055
|
+
* skill's instructions are returned as the gadget result.
|
|
10056
|
+
*
|
|
10057
|
+
* This approach requires zero changes to the stream processor or agent loop.
|
|
10058
|
+
*
|
|
10059
|
+
* @module skills/load-skill-gadget
|
|
10060
|
+
*/
|
|
10061
|
+
|
|
10062
|
+
/** Name for the auto-generated LoadSkill gadget. */
|
|
10063
|
+
declare const LOAD_SKILL_GADGET_NAME = "LoadSkill";
|
|
10064
|
+
/**
|
|
10065
|
+
* Create the LoadSkill meta-gadget from a skill registry.
|
|
10066
|
+
*
|
|
10067
|
+
* The gadget description includes a summary of all available skills,
|
|
10068
|
+
* so the LLM knows what skills exist and when to load them.
|
|
10069
|
+
*/
|
|
10070
|
+
declare function createLoadSkillGadget(registry: SkillRegistry): AbstractGadget;
|
|
10071
|
+
|
|
10050
10072
|
/**
|
|
10051
10073
|
* Filesystem-based skill discovery and loading.
|
|
10052
10074
|
*
|
|
@@ -10133,28 +10155,6 @@ declare function parseSkillContent(content: string, sourcePath: string, source:
|
|
|
10133
10155
|
*/
|
|
10134
10156
|
declare function validateMetadata(metadata: SkillMetadata): string[];
|
|
10135
10157
|
|
|
10136
|
-
/**
|
|
10137
|
-
* UseSkill meta-gadget — bridges the skill system into the gadget execution pipeline.
|
|
10138
|
-
*
|
|
10139
|
-
* When skills are registered with an agent, this gadget is auto-created and added
|
|
10140
|
-
* to the gadget registry. The LLM can invoke it like any other gadget, and the
|
|
10141
|
-
* skill's instructions are returned as the gadget result.
|
|
10142
|
-
*
|
|
10143
|
-
* This approach requires zero changes to the stream processor or agent loop.
|
|
10144
|
-
*
|
|
10145
|
-
* @module skills/use-skill-gadget
|
|
10146
|
-
*/
|
|
10147
|
-
|
|
10148
|
-
/** Name for the auto-generated UseSkill gadget. */
|
|
10149
|
-
declare const USE_SKILL_GADGET_NAME = "UseSkill";
|
|
10150
|
-
/**
|
|
10151
|
-
* Create the UseSkill meta-gadget from a skill registry.
|
|
10152
|
-
*
|
|
10153
|
-
* The gadget description includes a summary of all available skills,
|
|
10154
|
-
* so the LLM knows what skills exist and when to use them.
|
|
10155
|
-
*/
|
|
10156
|
-
declare function createUseSkillGadget(registry: SkillRegistry): AbstractGadget;
|
|
10157
|
-
|
|
10158
10158
|
/**
|
|
10159
10159
|
* Config resolution utility for subagent gadgets.
|
|
10160
10160
|
*
|
|
@@ -10584,4 +10584,4 @@ declare const timing: {
|
|
|
10584
10584
|
*/
|
|
10585
10585
|
declare function getHostExports(ctx: ExecutionContext): HostExports;
|
|
10586
10586
|
|
|
10587
|
-
export { AbortException, AbstractGadget, type AddGadgetParams, type AddLLMCallParams, type AfterGadgetExecutionAction, type AfterGadgetExecutionControllerContext, type AfterLLMCallAction, type AfterLLMCallControllerContext, type AfterLLMErrorAction, Agent, AgentBuilder, type AgentHooks, type AgentOptions, AnthropicMessagesProvider, type AudioContentPart, type AudioMimeType, type AudioSource, type BaseExecutionEvent, BaseSessionManager, type BeforeGadgetExecutionAction, type BeforeLLMCallAction, type BeforeSkillActivationAction, BudgetPricingUnavailableError, type CachingConfig, type CachingScope, type ChunkInterceptorContext, type CompactionConfig, type CompactionContext, type CompactionEvent, CompactionManager, type CompactionResult, type CompactionStats, type CompactionStrategy, type CompleteGadgetParams, type CompleteLLMCallParams, type ContentPart, type Controllers, ConversationManager, type CostEstimate, type CostReportingLLMist, type CreateGadgetConfig, DEFAULT_COMPACTION_CONFIG, DEFAULT_HINTS, DEFAULT_PROMPTS, DEFAULT_RATE_LIMIT_CONFIG, DEFAULT_RETRY_CONFIG, DEFAULT_SUMMARIZATION_PROMPT, type EventHandlers, type ExecutionContext, type ExecutionEvent, type ExecutionEventType, type ExecutionNode, type ExecutionNodeType, ExecutionTree, FALLBACK_CHARS_PER_TOKEN, type FileLoggingOptions, type FileLoggingState, type FileWrittenInfo, type FormatLLMErrorContext, GADGET_ARG_PREFIX, GADGET_END_PREFIX, GADGET_START_PREFIX, Gadget, type GadgetCallEvent, GadgetCallParser, type GadgetClass, type GadgetCompleteEvent, type GadgetConfig, type GadgetErrorEvent, type GadgetEvent, type GadgetExample, type GadgetExecuteResult, type GadgetExecuteResultWithMedia, type GadgetExecuteReturn, type GadgetExecutionControllerContext, type GadgetExecutionMode, type GadgetExecutionResult, GadgetExecutor, type GadgetExecutorOptions, type GadgetFactoryExports, type GadgetMediaOutput, type GadgetNode, type GadgetOrClass, GadgetOutputStore, type GadgetParameterInterceptorContext, GadgetRegistry, type GadgetResultInterceptorContext, type GadgetSkippedEvent, type GadgetStartEvent, type GadgetState, GeminiGenerativeProvider, type HintContext, type HintTemplate, type HintsConfig, type HistoryMessage, HookPresets, type HostExports, HuggingFaceProvider, type HumanInputRequiredEvent, HumanInputRequiredException, HybridStrategy, type IConversationManager, type ISessionManager, type ImageBase64Source, type ImageContentPart, type ImageGenerationOptions, type ImageGenerationResult, type ImageMimeType, type ImageModelSpec, type ImageSource, type ImageUrlSource, type Interceptors, type IterationHintOptions, type LLMCallCompleteEvent, type LLMCallControllerContext, type LLMCallErrorEvent, type LLMCallNode, type LLMCallStartEvent, type LLMCallStreamEvent, type LLMErrorControllerContext, type LLMEvent, type LLMGenerationOptions, type LLMMessage, LLMMessageBuilder, type LLMResponseEndEvent, type LLMStream, type LLMStreamChunk, LLMist, type LLMistOptions, type LLMistPackageManifest, type LoggerOptions, type LoggingOptions, MODEL_ALIASES, type MediaKind, type MediaMetadata, MediaStore, type MessageContent, type MessageInterceptorContext, type MessageRole, type MessageTurn, type ModelDescriptor, type ModelFeatures, ModelIdentifierParser, type ModelLimits, type ModelPricing, ModelRegistry, type ModelSpec, type NodeId, type ObserveChunkContext, type ObserveCompactionContext, type ObserveGadgetCompleteContext, type ObserveGadgetStartContext, type ObserveLLMCallContext, type ObserveLLMCompleteContext, type ObserveLLMErrorContext, type ObserveRateLimitThrottleContext, type ObserveRetryAttemptContext, type ObserveSkillActivatedContext, type Observers, OpenAIChatProvider, type OpenAICompatibleConfig, OpenAICompatibleProvider, type OpenRouterConfig, OpenRouterProvider, type OpenRouterRouting, type OutputLimitConfig, type ParallelGadgetHintOptions, type ParsedGadgetCall, type ParsedSkill, type PrefixConfig, type PresetDefinition, type PromptContext, type PromptTemplate, type PromptTemplateConfig, type ProviderAdapter, type ProviderIdentifier, type RateLimitConfig, type RateLimitStats, RateLimitTracker, type ReasoningConfig, type ReasoningEffort, type ResolveValueOptions, type ResolvedCompactionConfig, type ResolvedRateLimitConfig, type ResolvedRetryConfig, type RetryConfig, type RetryOptions, type SessionManifestEntry, SimpleSessionManager, Skill, type SkillActivation, type SkillActivationControllerContext, type SkillActivationOptions, type SkillInstructionInterceptorContext, type SkillMetadata, SkillRegistry, type SkillResource, type SkillSource, SlidingWindowStrategy, type SpeechGenerationOptions, type SpeechGenerationResult, type SpeechModelSpec, type StoredMedia, type StoredOutput, type StreamCompleteEvent, type StreamEvent, type StreamProcessingResult, StreamProcessor, type StreamProcessorOptions, type SubagentConfig, type SubagentConfigMap, type SubagentContext, type SubagentManifestEntry, type SubagentOptions, SummarizationStrategy, TaskCompletionSignal, type TextContentPart, type TextEvent, type TextGenerationOptions, type TextOnlyAction, type TextOnlyContext, type TextOnlyCustomHandler, type TextOnlyGadgetConfig, type TextOnlyHandler, type TextOnlyStrategy, type ThinkingChunk, type ThinkingEvent, TimeoutException, type TokenUsage, type TrailingMessage, type TrailingMessageContext, type CompactionEvent$1 as TreeCompactionEvent, type TreeConfig, type GadgetSkippedEvent$1 as TreeGadgetSkippedEvent, type TriggeredLimitInfo,
|
|
10587
|
+
export { AbortException, AbstractGadget, type AddGadgetParams, type AddLLMCallParams, type AfterGadgetExecutionAction, type AfterGadgetExecutionControllerContext, type AfterLLMCallAction, type AfterLLMCallControllerContext, type AfterLLMErrorAction, Agent, AgentBuilder, type AgentHooks, type AgentOptions, AnthropicMessagesProvider, type AudioContentPart, type AudioMimeType, type AudioSource, type BaseExecutionEvent, BaseSessionManager, type BeforeGadgetExecutionAction, type BeforeLLMCallAction, type BeforeSkillActivationAction, BudgetPricingUnavailableError, type CachingConfig, type CachingScope, type ChunkInterceptorContext, type CompactionConfig, type CompactionContext, type CompactionEvent, CompactionManager, type CompactionResult, type CompactionStats, type CompactionStrategy, type CompleteGadgetParams, type CompleteLLMCallParams, type ContentPart, type Controllers, ConversationManager, type CostEstimate, type CostReportingLLMist, type CreateGadgetConfig, DEFAULT_COMPACTION_CONFIG, DEFAULT_HINTS, DEFAULT_PROMPTS, DEFAULT_RATE_LIMIT_CONFIG, DEFAULT_RETRY_CONFIG, DEFAULT_SUMMARIZATION_PROMPT, type EventHandlers, type ExecutionContext, type ExecutionEvent, type ExecutionEventType, type ExecutionNode, type ExecutionNodeType, ExecutionTree, FALLBACK_CHARS_PER_TOKEN, type FileLoggingOptions, type FileLoggingState, type FileWrittenInfo, type FormatLLMErrorContext, GADGET_ARG_PREFIX, GADGET_END_PREFIX, GADGET_START_PREFIX, Gadget, type GadgetCallEvent, GadgetCallParser, type GadgetClass, type GadgetCompleteEvent, type GadgetConfig, type GadgetErrorEvent, type GadgetEvent, type GadgetExample, type GadgetExecuteResult, type GadgetExecuteResultWithMedia, type GadgetExecuteReturn, type GadgetExecutionControllerContext, type GadgetExecutionMode, type GadgetExecutionResult, GadgetExecutor, type GadgetExecutorOptions, type GadgetFactoryExports, type GadgetMediaOutput, type GadgetNode, type GadgetOrClass, GadgetOutputStore, type GadgetParameterInterceptorContext, GadgetRegistry, type GadgetResultInterceptorContext, type GadgetSkippedEvent, type GadgetStartEvent, type GadgetState, GeminiGenerativeProvider, type HintContext, type HintTemplate, type HintsConfig, type HistoryMessage, HookPresets, type HostExports, HuggingFaceProvider, type HumanInputRequiredEvent, HumanInputRequiredException, HybridStrategy, type IConversationManager, type ISessionManager, type ImageBase64Source, type ImageContentPart, type ImageGenerationOptions, type ImageGenerationResult, type ImageMimeType, type ImageModelSpec, type ImageSource, type ImageUrlSource, type Interceptors, type IterationHintOptions, type LLMCallCompleteEvent, type LLMCallControllerContext, type LLMCallErrorEvent, type LLMCallNode, type LLMCallStartEvent, type LLMCallStreamEvent, type LLMErrorControllerContext, type LLMEvent, type LLMGenerationOptions, type LLMMessage, LLMMessageBuilder, type LLMResponseEndEvent, type LLMStream, type LLMStreamChunk, LLMist, type LLMistOptions, type LLMistPackageManifest, LOAD_SKILL_GADGET_NAME, type LoggerOptions, type LoggingOptions, MODEL_ALIASES, type MediaKind, type MediaMetadata, MediaStore, type MessageContent, type MessageInterceptorContext, type MessageRole, type MessageTurn, type ModelDescriptor, type ModelFeatures, ModelIdentifierParser, type ModelLimits, type ModelPricing, ModelRegistry, type ModelSpec, type NodeId, type ObserveChunkContext, type ObserveCompactionContext, type ObserveGadgetCompleteContext, type ObserveGadgetStartContext, type ObserveLLMCallContext, type ObserveLLMCompleteContext, type ObserveLLMErrorContext, type ObserveRateLimitThrottleContext, type ObserveRetryAttemptContext, type ObserveSkillActivatedContext, type Observers, OpenAIChatProvider, type OpenAICompatibleConfig, OpenAICompatibleProvider, type OpenRouterConfig, OpenRouterProvider, type OpenRouterRouting, type OutputLimitConfig, type ParallelGadgetHintOptions, type ParsedGadgetCall, type ParsedSkill, type PrefixConfig, type PresetDefinition, type PromptContext, type PromptTemplate, type PromptTemplateConfig, type ProviderAdapter, type ProviderIdentifier, type RateLimitConfig, type RateLimitStats, RateLimitTracker, type ReasoningConfig, type ReasoningEffort, type ResolveValueOptions, type ResolvedCompactionConfig, type ResolvedRateLimitConfig, type ResolvedRetryConfig, type RetryConfig, type RetryOptions, type SessionManifestEntry, SimpleSessionManager, Skill, type SkillActivation, type SkillActivationControllerContext, type SkillActivationOptions, type SkillInstructionInterceptorContext, type SkillMetadata, SkillRegistry, type SkillResource, type SkillSource, SlidingWindowStrategy, type SpeechGenerationOptions, type SpeechGenerationResult, type SpeechModelSpec, type StoredMedia, type StoredOutput, type StreamCompleteEvent, type StreamEvent, type StreamProcessingResult, StreamProcessor, type StreamProcessorOptions, type SubagentConfig, type SubagentConfigMap, type SubagentContext, type SubagentManifestEntry, type SubagentOptions, SummarizationStrategy, TaskCompletionSignal, type TextContentPart, type TextEvent, type TextGenerationOptions, type TextOnlyAction, type TextOnlyContext, type TextOnlyCustomHandler, type TextOnlyGadgetConfig, type TextOnlyHandler, type TextOnlyStrategy, type ThinkingChunk, type ThinkingEvent, TimeoutException, type TokenUsage, type TrailingMessage, type TrailingMessageContext, type CompactionEvent$1 as TreeCompactionEvent, type TreeConfig, type GadgetSkippedEvent$1 as TreeGadgetSkippedEvent, type TriggeredLimitInfo, type ValidationIssue, type ValidationResult, type VisionAnalyzeOptions, type VisionAnalyzeResult, audioFromBase64, audioFromBuffer, collectEvents, collectText, complete, createAnthropicProviderFromEnv, createFileLoggingState, createGadget, createGadgetOutputViewer, createGeminiProviderFromEnv, createHints, createHuggingFaceProviderFromEnv, createLoadSkillGadget, createLogger, createMediaOutput, createOpenAIProviderFromEnv, createOpenRouterProviderFromEnv, createSubagent, defaultLogger, detectAudioMimeType, detectImageMimeType, discoverProviderAdapters, discoverSkills, extractMessageText, extractRetryAfterMs, filterByDepth, filterByParent, filterRootEvents, format, formatBytes, formatCallNumber, formatDate, formatDuration, formatLLMError, formatLlmRequest, gadgetError, gadgetSuccess, getErrorMessage, getHostExports, getModelId, getPresetGadgets, getProvider, getSubagent, groupByParent, hasHostExports, hasPreset, hasProviderPrefix, hasSubagents, humanDelay, imageFromBase64, imageFromBuffer, imageFromUrl, isAbortError, isAudioPart, isDataUrl, isGadgetEvent, isImagePart, isLLMEvent, isLikelyContextOverflow, isRetryableError, isRootEvent, isSubagentEvent, isTextPart, iterationProgressHint, listPresets, listSubagents, loadSkillsFromDirectory, normalizeMessageContent, parallelGadgetHint, parseDataUrl, parseFrontmatter, parseManifest, parseMetadata, parseRetryAfterHeader, parseSkillContent, parseSkillFile, randomDelay, resetFileLoggingState, resolveConfig, resolveHintTemplate, resolveInstructions, resolveModel, resolvePromptTemplate, resolveRateLimitConfig, resolveRetryConfig, resolveRulesTemplate, resolveSubagentModel, resolveSubagentTimeout, resolveValue, resultWithAudio, resultWithFile, resultWithImage, resultWithImages, resultWithMedia, runWithHandlers, scanResources, schemaToJSONSchema, stream, stripProviderPrefix, substituteArguments, substituteVariables, text, timing, toBase64, truncate, validateAndApplyDefaults, validateGadgetParams, validateGadgetSchema, validateMetadata, withErrorHandling, withRetry, withTimeout };
|
package/dist/index.d.ts
CHANGED
|
@@ -1896,7 +1896,7 @@ interface Observers {
|
|
|
1896
1896
|
onRateLimitThrottle?: (context: ObserveRateLimitThrottleContext) => void | Promise<void>;
|
|
1897
1897
|
/** Called when a retry attempt is made after a failed LLM call */
|
|
1898
1898
|
onRetryAttempt?: (context: ObserveRetryAttemptContext) => void | Promise<void>;
|
|
1899
|
-
/** Called when a skill is activated (via
|
|
1899
|
+
/** Called when a skill is activated (via LoadSkill gadget or pre-activation) */
|
|
1900
1900
|
onSkillActivated?: (context: ObserveSkillActivatedContext) => void | Promise<void>;
|
|
1901
1901
|
}
|
|
1902
1902
|
/**
|
|
@@ -10047,6 +10047,28 @@ declare function resolveInstructions(instructions: string, options?: {
|
|
|
10047
10047
|
enableShellPreprocessing?: boolean;
|
|
10048
10048
|
}): string;
|
|
10049
10049
|
|
|
10050
|
+
/**
|
|
10051
|
+
* LoadSkill meta-gadget — bridges the skill system into the gadget execution pipeline.
|
|
10052
|
+
*
|
|
10053
|
+
* When skills are registered with an agent, this gadget is auto-created and added
|
|
10054
|
+
* to the gadget registry. The LLM can invoke it like any other gadget, and the
|
|
10055
|
+
* skill's instructions are returned as the gadget result.
|
|
10056
|
+
*
|
|
10057
|
+
* This approach requires zero changes to the stream processor or agent loop.
|
|
10058
|
+
*
|
|
10059
|
+
* @module skills/load-skill-gadget
|
|
10060
|
+
*/
|
|
10061
|
+
|
|
10062
|
+
/** Name for the auto-generated LoadSkill gadget. */
|
|
10063
|
+
declare const LOAD_SKILL_GADGET_NAME = "LoadSkill";
|
|
10064
|
+
/**
|
|
10065
|
+
* Create the LoadSkill meta-gadget from a skill registry.
|
|
10066
|
+
*
|
|
10067
|
+
* The gadget description includes a summary of all available skills,
|
|
10068
|
+
* so the LLM knows what skills exist and when to load them.
|
|
10069
|
+
*/
|
|
10070
|
+
declare function createLoadSkillGadget(registry: SkillRegistry): AbstractGadget;
|
|
10071
|
+
|
|
10050
10072
|
/**
|
|
10051
10073
|
* Filesystem-based skill discovery and loading.
|
|
10052
10074
|
*
|
|
@@ -10133,28 +10155,6 @@ declare function parseSkillContent(content: string, sourcePath: string, source:
|
|
|
10133
10155
|
*/
|
|
10134
10156
|
declare function validateMetadata(metadata: SkillMetadata): string[];
|
|
10135
10157
|
|
|
10136
|
-
/**
|
|
10137
|
-
* UseSkill meta-gadget — bridges the skill system into the gadget execution pipeline.
|
|
10138
|
-
*
|
|
10139
|
-
* When skills are registered with an agent, this gadget is auto-created and added
|
|
10140
|
-
* to the gadget registry. The LLM can invoke it like any other gadget, and the
|
|
10141
|
-
* skill's instructions are returned as the gadget result.
|
|
10142
|
-
*
|
|
10143
|
-
* This approach requires zero changes to the stream processor or agent loop.
|
|
10144
|
-
*
|
|
10145
|
-
* @module skills/use-skill-gadget
|
|
10146
|
-
*/
|
|
10147
|
-
|
|
10148
|
-
/** Name for the auto-generated UseSkill gadget. */
|
|
10149
|
-
declare const USE_SKILL_GADGET_NAME = "UseSkill";
|
|
10150
|
-
/**
|
|
10151
|
-
* Create the UseSkill meta-gadget from a skill registry.
|
|
10152
|
-
*
|
|
10153
|
-
* The gadget description includes a summary of all available skills,
|
|
10154
|
-
* so the LLM knows what skills exist and when to use them.
|
|
10155
|
-
*/
|
|
10156
|
-
declare function createUseSkillGadget(registry: SkillRegistry): AbstractGadget;
|
|
10157
|
-
|
|
10158
10158
|
/**
|
|
10159
10159
|
* Config resolution utility for subagent gadgets.
|
|
10160
10160
|
*
|
|
@@ -10584,4 +10584,4 @@ declare const timing: {
|
|
|
10584
10584
|
*/
|
|
10585
10585
|
declare function getHostExports(ctx: ExecutionContext): HostExports;
|
|
10586
10586
|
|
|
10587
|
-
export { AbortException, AbstractGadget, type AddGadgetParams, type AddLLMCallParams, type AfterGadgetExecutionAction, type AfterGadgetExecutionControllerContext, type AfterLLMCallAction, type AfterLLMCallControllerContext, type AfterLLMErrorAction, Agent, AgentBuilder, type AgentHooks, type AgentOptions, AnthropicMessagesProvider, type AudioContentPart, type AudioMimeType, type AudioSource, type BaseExecutionEvent, BaseSessionManager, type BeforeGadgetExecutionAction, type BeforeLLMCallAction, type BeforeSkillActivationAction, BudgetPricingUnavailableError, type CachingConfig, type CachingScope, type ChunkInterceptorContext, type CompactionConfig, type CompactionContext, type CompactionEvent, CompactionManager, type CompactionResult, type CompactionStats, type CompactionStrategy, type CompleteGadgetParams, type CompleteLLMCallParams, type ContentPart, type Controllers, ConversationManager, type CostEstimate, type CostReportingLLMist, type CreateGadgetConfig, DEFAULT_COMPACTION_CONFIG, DEFAULT_HINTS, DEFAULT_PROMPTS, DEFAULT_RATE_LIMIT_CONFIG, DEFAULT_RETRY_CONFIG, DEFAULT_SUMMARIZATION_PROMPT, type EventHandlers, type ExecutionContext, type ExecutionEvent, type ExecutionEventType, type ExecutionNode, type ExecutionNodeType, ExecutionTree, FALLBACK_CHARS_PER_TOKEN, type FileLoggingOptions, type FileLoggingState, type FileWrittenInfo, type FormatLLMErrorContext, GADGET_ARG_PREFIX, GADGET_END_PREFIX, GADGET_START_PREFIX, Gadget, type GadgetCallEvent, GadgetCallParser, type GadgetClass, type GadgetCompleteEvent, type GadgetConfig, type GadgetErrorEvent, type GadgetEvent, type GadgetExample, type GadgetExecuteResult, type GadgetExecuteResultWithMedia, type GadgetExecuteReturn, type GadgetExecutionControllerContext, type GadgetExecutionMode, type GadgetExecutionResult, GadgetExecutor, type GadgetExecutorOptions, type GadgetFactoryExports, type GadgetMediaOutput, type GadgetNode, type GadgetOrClass, GadgetOutputStore, type GadgetParameterInterceptorContext, GadgetRegistry, type GadgetResultInterceptorContext, type GadgetSkippedEvent, type GadgetStartEvent, type GadgetState, GeminiGenerativeProvider, type HintContext, type HintTemplate, type HintsConfig, type HistoryMessage, HookPresets, type HostExports, HuggingFaceProvider, type HumanInputRequiredEvent, HumanInputRequiredException, HybridStrategy, type IConversationManager, type ISessionManager, type ImageBase64Source, type ImageContentPart, type ImageGenerationOptions, type ImageGenerationResult, type ImageMimeType, type ImageModelSpec, type ImageSource, type ImageUrlSource, type Interceptors, type IterationHintOptions, type LLMCallCompleteEvent, type LLMCallControllerContext, type LLMCallErrorEvent, type LLMCallNode, type LLMCallStartEvent, type LLMCallStreamEvent, type LLMErrorControllerContext, type LLMEvent, type LLMGenerationOptions, type LLMMessage, LLMMessageBuilder, type LLMResponseEndEvent, type LLMStream, type LLMStreamChunk, LLMist, type LLMistOptions, type LLMistPackageManifest, type LoggerOptions, type LoggingOptions, MODEL_ALIASES, type MediaKind, type MediaMetadata, MediaStore, type MessageContent, type MessageInterceptorContext, type MessageRole, type MessageTurn, type ModelDescriptor, type ModelFeatures, ModelIdentifierParser, type ModelLimits, type ModelPricing, ModelRegistry, type ModelSpec, type NodeId, type ObserveChunkContext, type ObserveCompactionContext, type ObserveGadgetCompleteContext, type ObserveGadgetStartContext, type ObserveLLMCallContext, type ObserveLLMCompleteContext, type ObserveLLMErrorContext, type ObserveRateLimitThrottleContext, type ObserveRetryAttemptContext, type ObserveSkillActivatedContext, type Observers, OpenAIChatProvider, type OpenAICompatibleConfig, OpenAICompatibleProvider, type OpenRouterConfig, OpenRouterProvider, type OpenRouterRouting, type OutputLimitConfig, type ParallelGadgetHintOptions, type ParsedGadgetCall, type ParsedSkill, type PrefixConfig, type PresetDefinition, type PromptContext, type PromptTemplate, type PromptTemplateConfig, type ProviderAdapter, type ProviderIdentifier, type RateLimitConfig, type RateLimitStats, RateLimitTracker, type ReasoningConfig, type ReasoningEffort, type ResolveValueOptions, type ResolvedCompactionConfig, type ResolvedRateLimitConfig, type ResolvedRetryConfig, type RetryConfig, type RetryOptions, type SessionManifestEntry, SimpleSessionManager, Skill, type SkillActivation, type SkillActivationControllerContext, type SkillActivationOptions, type SkillInstructionInterceptorContext, type SkillMetadata, SkillRegistry, type SkillResource, type SkillSource, SlidingWindowStrategy, type SpeechGenerationOptions, type SpeechGenerationResult, type SpeechModelSpec, type StoredMedia, type StoredOutput, type StreamCompleteEvent, type StreamEvent, type StreamProcessingResult, StreamProcessor, type StreamProcessorOptions, type SubagentConfig, type SubagentConfigMap, type SubagentContext, type SubagentManifestEntry, type SubagentOptions, SummarizationStrategy, TaskCompletionSignal, type TextContentPart, type TextEvent, type TextGenerationOptions, type TextOnlyAction, type TextOnlyContext, type TextOnlyCustomHandler, type TextOnlyGadgetConfig, type TextOnlyHandler, type TextOnlyStrategy, type ThinkingChunk, type ThinkingEvent, TimeoutException, type TokenUsage, type TrailingMessage, type TrailingMessageContext, type CompactionEvent$1 as TreeCompactionEvent, type TreeConfig, type GadgetSkippedEvent$1 as TreeGadgetSkippedEvent, type TriggeredLimitInfo,
|
|
10587
|
+
export { AbortException, AbstractGadget, type AddGadgetParams, type AddLLMCallParams, type AfterGadgetExecutionAction, type AfterGadgetExecutionControllerContext, type AfterLLMCallAction, type AfterLLMCallControllerContext, type AfterLLMErrorAction, Agent, AgentBuilder, type AgentHooks, type AgentOptions, AnthropicMessagesProvider, type AudioContentPart, type AudioMimeType, type AudioSource, type BaseExecutionEvent, BaseSessionManager, type BeforeGadgetExecutionAction, type BeforeLLMCallAction, type BeforeSkillActivationAction, BudgetPricingUnavailableError, type CachingConfig, type CachingScope, type ChunkInterceptorContext, type CompactionConfig, type CompactionContext, type CompactionEvent, CompactionManager, type CompactionResult, type CompactionStats, type CompactionStrategy, type CompleteGadgetParams, type CompleteLLMCallParams, type ContentPart, type Controllers, ConversationManager, type CostEstimate, type CostReportingLLMist, type CreateGadgetConfig, DEFAULT_COMPACTION_CONFIG, DEFAULT_HINTS, DEFAULT_PROMPTS, DEFAULT_RATE_LIMIT_CONFIG, DEFAULT_RETRY_CONFIG, DEFAULT_SUMMARIZATION_PROMPT, type EventHandlers, type ExecutionContext, type ExecutionEvent, type ExecutionEventType, type ExecutionNode, type ExecutionNodeType, ExecutionTree, FALLBACK_CHARS_PER_TOKEN, type FileLoggingOptions, type FileLoggingState, type FileWrittenInfo, type FormatLLMErrorContext, GADGET_ARG_PREFIX, GADGET_END_PREFIX, GADGET_START_PREFIX, Gadget, type GadgetCallEvent, GadgetCallParser, type GadgetClass, type GadgetCompleteEvent, type GadgetConfig, type GadgetErrorEvent, type GadgetEvent, type GadgetExample, type GadgetExecuteResult, type GadgetExecuteResultWithMedia, type GadgetExecuteReturn, type GadgetExecutionControllerContext, type GadgetExecutionMode, type GadgetExecutionResult, GadgetExecutor, type GadgetExecutorOptions, type GadgetFactoryExports, type GadgetMediaOutput, type GadgetNode, type GadgetOrClass, GadgetOutputStore, type GadgetParameterInterceptorContext, GadgetRegistry, type GadgetResultInterceptorContext, type GadgetSkippedEvent, type GadgetStartEvent, type GadgetState, GeminiGenerativeProvider, type HintContext, type HintTemplate, type HintsConfig, type HistoryMessage, HookPresets, type HostExports, HuggingFaceProvider, type HumanInputRequiredEvent, HumanInputRequiredException, HybridStrategy, type IConversationManager, type ISessionManager, type ImageBase64Source, type ImageContentPart, type ImageGenerationOptions, type ImageGenerationResult, type ImageMimeType, type ImageModelSpec, type ImageSource, type ImageUrlSource, type Interceptors, type IterationHintOptions, type LLMCallCompleteEvent, type LLMCallControllerContext, type LLMCallErrorEvent, type LLMCallNode, type LLMCallStartEvent, type LLMCallStreamEvent, type LLMErrorControllerContext, type LLMEvent, type LLMGenerationOptions, type LLMMessage, LLMMessageBuilder, type LLMResponseEndEvent, type LLMStream, type LLMStreamChunk, LLMist, type LLMistOptions, type LLMistPackageManifest, LOAD_SKILL_GADGET_NAME, type LoggerOptions, type LoggingOptions, MODEL_ALIASES, type MediaKind, type MediaMetadata, MediaStore, type MessageContent, type MessageInterceptorContext, type MessageRole, type MessageTurn, type ModelDescriptor, type ModelFeatures, ModelIdentifierParser, type ModelLimits, type ModelPricing, ModelRegistry, type ModelSpec, type NodeId, type ObserveChunkContext, type ObserveCompactionContext, type ObserveGadgetCompleteContext, type ObserveGadgetStartContext, type ObserveLLMCallContext, type ObserveLLMCompleteContext, type ObserveLLMErrorContext, type ObserveRateLimitThrottleContext, type ObserveRetryAttemptContext, type ObserveSkillActivatedContext, type Observers, OpenAIChatProvider, type OpenAICompatibleConfig, OpenAICompatibleProvider, type OpenRouterConfig, OpenRouterProvider, type OpenRouterRouting, type OutputLimitConfig, type ParallelGadgetHintOptions, type ParsedGadgetCall, type ParsedSkill, type PrefixConfig, type PresetDefinition, type PromptContext, type PromptTemplate, type PromptTemplateConfig, type ProviderAdapter, type ProviderIdentifier, type RateLimitConfig, type RateLimitStats, RateLimitTracker, type ReasoningConfig, type ReasoningEffort, type ResolveValueOptions, type ResolvedCompactionConfig, type ResolvedRateLimitConfig, type ResolvedRetryConfig, type RetryConfig, type RetryOptions, type SessionManifestEntry, SimpleSessionManager, Skill, type SkillActivation, type SkillActivationControllerContext, type SkillActivationOptions, type SkillInstructionInterceptorContext, type SkillMetadata, SkillRegistry, type SkillResource, type SkillSource, SlidingWindowStrategy, type SpeechGenerationOptions, type SpeechGenerationResult, type SpeechModelSpec, type StoredMedia, type StoredOutput, type StreamCompleteEvent, type StreamEvent, type StreamProcessingResult, StreamProcessor, type StreamProcessorOptions, type SubagentConfig, type SubagentConfigMap, type SubagentContext, type SubagentManifestEntry, type SubagentOptions, SummarizationStrategy, TaskCompletionSignal, type TextContentPart, type TextEvent, type TextGenerationOptions, type TextOnlyAction, type TextOnlyContext, type TextOnlyCustomHandler, type TextOnlyGadgetConfig, type TextOnlyHandler, type TextOnlyStrategy, type ThinkingChunk, type ThinkingEvent, TimeoutException, type TokenUsage, type TrailingMessage, type TrailingMessageContext, type CompactionEvent$1 as TreeCompactionEvent, type TreeConfig, type GadgetSkippedEvent$1 as TreeGadgetSkippedEvent, type TriggeredLimitInfo, type ValidationIssue, type ValidationResult, type VisionAnalyzeOptions, type VisionAnalyzeResult, audioFromBase64, audioFromBuffer, collectEvents, collectText, complete, createAnthropicProviderFromEnv, createFileLoggingState, createGadget, createGadgetOutputViewer, createGeminiProviderFromEnv, createHints, createHuggingFaceProviderFromEnv, createLoadSkillGadget, createLogger, createMediaOutput, createOpenAIProviderFromEnv, createOpenRouterProviderFromEnv, createSubagent, defaultLogger, detectAudioMimeType, detectImageMimeType, discoverProviderAdapters, discoverSkills, extractMessageText, extractRetryAfterMs, filterByDepth, filterByParent, filterRootEvents, format, formatBytes, formatCallNumber, formatDate, formatDuration, formatLLMError, formatLlmRequest, gadgetError, gadgetSuccess, getErrorMessage, getHostExports, getModelId, getPresetGadgets, getProvider, getSubagent, groupByParent, hasHostExports, hasPreset, hasProviderPrefix, hasSubagents, humanDelay, imageFromBase64, imageFromBuffer, imageFromUrl, isAbortError, isAudioPart, isDataUrl, isGadgetEvent, isImagePart, isLLMEvent, isLikelyContextOverflow, isRetryableError, isRootEvent, isSubagentEvent, isTextPart, iterationProgressHint, listPresets, listSubagents, loadSkillsFromDirectory, normalizeMessageContent, parallelGadgetHint, parseDataUrl, parseFrontmatter, parseManifest, parseMetadata, parseRetryAfterHeader, parseSkillContent, parseSkillFile, randomDelay, resetFileLoggingState, resolveConfig, resolveHintTemplate, resolveInstructions, resolveModel, resolvePromptTemplate, resolveRateLimitConfig, resolveRetryConfig, resolveRulesTemplate, resolveSubagentModel, resolveSubagentTimeout, resolveValue, resultWithAudio, resultWithFile, resultWithImage, resultWithImages, resultWithMedia, runWithHandlers, scanResources, schemaToJSONSchema, stream, stripProviderPrefix, substituteArguments, substituteVariables, text, timing, toBase64, truncate, validateAndApplyDefaults, validateGadgetParams, validateGadgetSchema, validateMetadata, withErrorHandling, withRetry, withTimeout };
|
package/dist/index.js
CHANGED
|
@@ -5298,6 +5298,45 @@ var init_activation = __esm({
|
|
|
5298
5298
|
}
|
|
5299
5299
|
});
|
|
5300
5300
|
|
|
5301
|
+
// src/skills/load-skill-gadget.ts
|
|
5302
|
+
import { z as z4 } from "zod";
|
|
5303
|
+
function createLoadSkillGadget(registry) {
|
|
5304
|
+
const summaries = registry.getMetadataSummaries();
|
|
5305
|
+
const skillNames = registry.getModelInvocable().map((s) => s.name);
|
|
5306
|
+
const description = [
|
|
5307
|
+
"Load a skill's specialized instructions into context for a task.",
|
|
5308
|
+
"Available skills:",
|
|
5309
|
+
summaries
|
|
5310
|
+
].join("\n");
|
|
5311
|
+
return createGadget({
|
|
5312
|
+
name: LOAD_SKILL_GADGET_NAME,
|
|
5313
|
+
description,
|
|
5314
|
+
schema: z4.object({
|
|
5315
|
+
skill: z4.enum(skillNames).describe("Name of the skill to load"),
|
|
5316
|
+
arguments: z4.string().optional().describe("Arguments for the skill (e.g., a filename, issue number, or search query)")
|
|
5317
|
+
}),
|
|
5318
|
+
execute: async ({ skill: skillName, arguments: args }) => {
|
|
5319
|
+
const skill = registry.get(skillName);
|
|
5320
|
+
if (!skill) {
|
|
5321
|
+
return `Unknown skill: "${skillName}". Available skills: ${skillNames.join(", ")}`;
|
|
5322
|
+
}
|
|
5323
|
+
const activation = await skill.activate({
|
|
5324
|
+
arguments: args,
|
|
5325
|
+
cwd: process.cwd()
|
|
5326
|
+
});
|
|
5327
|
+
return activation.resolvedInstructions;
|
|
5328
|
+
}
|
|
5329
|
+
});
|
|
5330
|
+
}
|
|
5331
|
+
var LOAD_SKILL_GADGET_NAME;
|
|
5332
|
+
var init_load_skill_gadget = __esm({
|
|
5333
|
+
"src/skills/load-skill-gadget.ts"() {
|
|
5334
|
+
"use strict";
|
|
5335
|
+
init_create_gadget();
|
|
5336
|
+
LOAD_SKILL_GADGET_NAME = "LoadSkill";
|
|
5337
|
+
}
|
|
5338
|
+
});
|
|
5339
|
+
|
|
5301
5340
|
// src/skills/parser.ts
|
|
5302
5341
|
import fs from "fs";
|
|
5303
5342
|
import path from "path";
|
|
@@ -5791,45 +5830,6 @@ var init_loader = __esm({
|
|
|
5791
5830
|
}
|
|
5792
5831
|
});
|
|
5793
5832
|
|
|
5794
|
-
// src/skills/use-skill-gadget.ts
|
|
5795
|
-
import { z as z4 } from "zod";
|
|
5796
|
-
function createUseSkillGadget(registry) {
|
|
5797
|
-
const summaries = registry.getMetadataSummaries();
|
|
5798
|
-
const skillNames = registry.getModelInvocable().map((s) => s.name);
|
|
5799
|
-
const description = [
|
|
5800
|
-
"Activate a skill to get specialized instructions for a task.",
|
|
5801
|
-
"Available skills:",
|
|
5802
|
-
summaries
|
|
5803
|
-
].join("\n");
|
|
5804
|
-
return createGadget({
|
|
5805
|
-
name: USE_SKILL_GADGET_NAME,
|
|
5806
|
-
description,
|
|
5807
|
-
schema: z4.object({
|
|
5808
|
-
skill: z4.enum(skillNames).describe("Name of the skill to activate"),
|
|
5809
|
-
arguments: z4.string().optional().describe("Arguments for the skill (e.g., a filename, issue number, or search query)")
|
|
5810
|
-
}),
|
|
5811
|
-
execute: async ({ skill: skillName, arguments: args }) => {
|
|
5812
|
-
const skill = registry.get(skillName);
|
|
5813
|
-
if (!skill) {
|
|
5814
|
-
return `Unknown skill: "${skillName}". Available skills: ${skillNames.join(", ")}`;
|
|
5815
|
-
}
|
|
5816
|
-
const activation = await skill.activate({
|
|
5817
|
-
arguments: args,
|
|
5818
|
-
cwd: process.cwd()
|
|
5819
|
-
});
|
|
5820
|
-
return activation.resolvedInstructions;
|
|
5821
|
-
}
|
|
5822
|
-
});
|
|
5823
|
-
}
|
|
5824
|
-
var USE_SKILL_GADGET_NAME;
|
|
5825
|
-
var init_use_skill_gadget = __esm({
|
|
5826
|
-
"src/skills/use-skill-gadget.ts"() {
|
|
5827
|
-
"use strict";
|
|
5828
|
-
init_create_gadget();
|
|
5829
|
-
USE_SKILL_GADGET_NAME = "UseSkill";
|
|
5830
|
-
}
|
|
5831
|
-
});
|
|
5832
|
-
|
|
5833
5833
|
// src/agent/builder-utils.ts
|
|
5834
5834
|
function formatGadgetCall(gadgetName, invocationId, parameters, prefixes) {
|
|
5835
5835
|
const startPrefix = prefixes?.start ?? GADGET_START_PREFIX;
|
|
@@ -12846,9 +12846,9 @@ var init_builder = __esm({
|
|
|
12846
12846
|
init_model_shortcuts();
|
|
12847
12847
|
init_registry();
|
|
12848
12848
|
init_activation();
|
|
12849
|
+
init_load_skill_gadget();
|
|
12849
12850
|
init_loader();
|
|
12850
12851
|
init_parser();
|
|
12851
|
-
init_use_skill_gadget();
|
|
12852
12852
|
init_agent();
|
|
12853
12853
|
init_agent_internal_key();
|
|
12854
12854
|
init_builder_utils();
|
|
@@ -13183,7 +13183,7 @@ ${resolved}`);
|
|
|
13183
13183
|
const skillRegistry = this.resolveSkillRegistry();
|
|
13184
13184
|
if (skillRegistry && skillRegistry.size > 0) {
|
|
13185
13185
|
if (skillRegistry.getModelInvocable().length > 0) {
|
|
13186
|
-
registry.registerByClass(
|
|
13186
|
+
registry.registerByClass(createLoadSkillGadget(skillRegistry));
|
|
13187
13187
|
}
|
|
13188
13188
|
const preActivatedBlock = this.resolvePreActivatedInstructions(skillRegistry);
|
|
13189
13189
|
if (preActivatedBlock) {
|
|
@@ -17587,11 +17587,11 @@ var SimpleSessionManager = class extends BaseSessionManager {
|
|
|
17587
17587
|
|
|
17588
17588
|
// src/skills/index.ts
|
|
17589
17589
|
init_activation();
|
|
17590
|
+
init_load_skill_gadget();
|
|
17590
17591
|
init_loader();
|
|
17591
17592
|
init_parser();
|
|
17592
17593
|
init_registry2();
|
|
17593
17594
|
init_skill();
|
|
17594
|
-
init_use_skill_gadget();
|
|
17595
17595
|
|
|
17596
17596
|
// src/utils/format.ts
|
|
17597
17597
|
function truncate(text3, maxLength, suffix = "...") {
|
|
@@ -17779,6 +17779,7 @@ export {
|
|
|
17779
17779
|
HybridStrategy,
|
|
17780
17780
|
LLMMessageBuilder,
|
|
17781
17781
|
LLMist,
|
|
17782
|
+
LOAD_SKILL_GADGET_NAME,
|
|
17782
17783
|
MODEL_ALIASES,
|
|
17783
17784
|
MediaStore,
|
|
17784
17785
|
ModelIdentifierParser,
|
|
@@ -17795,7 +17796,6 @@ export {
|
|
|
17795
17796
|
SummarizationStrategy,
|
|
17796
17797
|
TaskCompletionSignal,
|
|
17797
17798
|
TimeoutException,
|
|
17798
|
-
USE_SKILL_GADGET_NAME,
|
|
17799
17799
|
audioFromBase64,
|
|
17800
17800
|
audioFromBuffer,
|
|
17801
17801
|
collectEvents,
|
|
@@ -17808,12 +17808,12 @@ export {
|
|
|
17808
17808
|
createGeminiProviderFromEnv,
|
|
17809
17809
|
createHints,
|
|
17810
17810
|
createHuggingFaceProviderFromEnv,
|
|
17811
|
+
createLoadSkillGadget,
|
|
17811
17812
|
createLogger,
|
|
17812
17813
|
createMediaOutput,
|
|
17813
17814
|
createOpenAIProviderFromEnv,
|
|
17814
17815
|
createOpenRouterProviderFromEnv,
|
|
17815
17816
|
createSubagent,
|
|
17816
|
-
createUseSkillGadget,
|
|
17817
17817
|
defaultLogger,
|
|
17818
17818
|
detectAudioMimeType,
|
|
17819
17819
|
detectImageMimeType,
|