ppagent 0.0.22 → 0.0.24
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/lib.d.ts +17 -2
- package/dist/lib.js +19 -19
- package/package.json +1 -1
package/dist/lib.d.ts
CHANGED
|
@@ -71,7 +71,7 @@ declare class AsyncFile implements IAsyncFile {
|
|
|
71
71
|
protected loadBufferFromPath(localPath: string): Promise<Buffer$1>;
|
|
72
72
|
protected saveFile(uri?: string): Promise<string>;
|
|
73
73
|
saveAs(dir: string, bucket: string, name?: string, onCompleted?: () => void): string;
|
|
74
|
-
getFormat(): "
|
|
74
|
+
getFormat(): "text" | "binary";
|
|
75
75
|
asBuffer(): Promise<Buffer$1 | undefined>;
|
|
76
76
|
asPath(): Promise<string>;
|
|
77
77
|
asBase64(): Promise<string>;
|
|
@@ -1343,6 +1343,13 @@ declare class SourceManager extends InstanceBaseManager<ISource, SourceCreator,
|
|
|
1343
1343
|
}
|
|
1344
1344
|
|
|
1345
1345
|
declare class BotManager extends InstanceBaseManager<IBot, BotCreator, IBotOptions, IBotParams> {
|
|
1346
|
+
runBot(instanceName: string, type: SourceChatMessageType, content: SourceChatContent, customData?: IAgentChatEventData, onStream?: (type: SourceChatMessageType, content: SourceChatContent) => void): Promise<{
|
|
1347
|
+
text: string;
|
|
1348
|
+
all?: {
|
|
1349
|
+
content: SourceChatContent;
|
|
1350
|
+
type: SourceChatMessageType;
|
|
1351
|
+
}[];
|
|
1352
|
+
}>;
|
|
1346
1353
|
}
|
|
1347
1354
|
|
|
1348
1355
|
declare class TaskRunnerManager extends InstanceBaseManager<ITaskRunner, TaskRunnerCreator, ITaskRunnerOptions, ITaskRunnerParams> {
|
|
@@ -3414,6 +3421,7 @@ declare class ChatMessage {
|
|
|
3414
3421
|
raw: string;
|
|
3415
3422
|
sourceName: string;
|
|
3416
3423
|
sourceInstanceName: string;
|
|
3424
|
+
text?: string;
|
|
3417
3425
|
static fromMessage(message: ISourceChatMessage, source: ISource): ChatMessage;
|
|
3418
3426
|
static toMessage(chatMessage: ChatMessage): ISourceChatMessage;
|
|
3419
3427
|
}
|
|
@@ -3464,6 +3472,13 @@ declare function installAndGetPluginInfo(name: string, version?: string, registr
|
|
|
3464
3472
|
declare function uninstallDep(name: string): Promise<IOnlinePluginInfo>;
|
|
3465
3473
|
declare function getEnvNumber(key: string): number | undefined;
|
|
3466
3474
|
declare function extractMessageContentText(content: SourceChatContent): string;
|
|
3475
|
+
declare function directRunBot(bot: IBot, type: SourceChatMessageType, content: SourceChatContent, customData?: IAgentChatEventData, onStream?: (type: SourceChatMessageType, content: SourceChatContent) => void): Promise<{
|
|
3476
|
+
text: string;
|
|
3477
|
+
all?: {
|
|
3478
|
+
content: SourceChatContent;
|
|
3479
|
+
type: SourceChatMessageType;
|
|
3480
|
+
}[];
|
|
3481
|
+
}>;
|
|
3467
3482
|
|
|
3468
3483
|
/**
|
|
3469
3484
|
* 按照进来顺序回调输出
|
|
@@ -3474,4 +3489,4 @@ declare class SortedPromise extends Emittery {
|
|
|
3474
3489
|
add<T>(p: Promise<T>): Promise<T>;
|
|
3475
3490
|
}
|
|
3476
3491
|
|
|
3477
|
-
export { Agent, type AgentChatMessageReplyType, AgentService, AsyncFile, type AsyncFileLoader, BaiduSTTSkill, BaiduTTSSkill, BaseDrawSkill, BaseSTTSkill, BaseTTSSkill, BasicBot, type BotCreator, BotManager, ChatMessage, ChatMessageTaskRunner, CogVideoDrawSkill, CogviewDrawSkill, CozeBot, CozeService, CronTaskTrigger, DifyAgentBot, DingRobotSource, EchoTaskRunner, EventTaskTrigger, FastGPTBot, FeishuSource, FishAudioTTSSkill, GlobalEvent, GlobalEventNames, GlobalEventTaskTrigger, HistoryMessageManager, type IAgentChatEventData, type IAgentModels, type IAgentOptions, type IAgentServiceOptions, type IAsyncFile, type IAsyncFileSource, type IBaiduSTTSkillOptions, type IBaiduTTSSkillOptions, type IBaseDrawSkillOptions, type IBaseSTTSkillOptions, type IBaseTTSSkillOptions, type IBasicBotOptions, type IBot, type IBotEventData, type IBotFileInfo, type IBotHistoryMessage, type IBotHistoryRecordEventData, type IBotOptions, type IBotParams, type IBotReadyMessage, type IChatMessageTaskRunnerOptions, type ICogVideoDrawSkillOptions, type ICogviewDrawSkillOptions, type IConfigParams, type IConfigSchema, type ICozeBotOptions, type ICozeServiceOptions, type ICronTaskTriggerOptions, type IDifyAgentBotOptions, type IDingRobotSourceOptions, type IDingRobotSourceParams, type IDisposable, type IDrawResult, type IEventTaskTriggerOptions, type IFastGPTBotOptions, type IFeishuSourceOptions, type IFishAudioTTSSkillOptions, type IGlobalEventData, type IGlobalNotifyEventData, type IHisotryMessageManagerOptions, type IInstance, type IInstanceBaseMangerOptions, type IInstanceCreateOptions, type ILastBotMessageInfo, type ILogger, type ILoggerEmitContent, type IMessageContentReceiver, type IMessageContentRule, type IMessageRule, type IModelInfo, type IOllamaBotOptions, type IOnlinePluginInfo, type IOpenAIBotOptions, type IOpenAIDrawSkillOptions, type IOpenAISTTSkillOptions, type IOpenAITTSSkillOptions, type IPPAgentOptions, type IPPAgentPlugin, type IPPAgentPluginHandler, type IPPAgentPluginOptions, type IQAnythingBotOptions, type IQQSourceOptions, type ISenseVoiceSTTSkillOptions, type ISiliconFlowDrawSkillOptions, type ISiliconFlowSTTSkillOptions, type ISiliconFlowTTSSkillOptions, type ISimpleSchemaItem, type ISkill, type ISkillOptions, type ISkillParams, type ISource, type ISourceActionInfo, type ISourceApiAction, type ISourceApiResponseType, type ISourceChatMessage, type ISourceChatMessageEventData, type ISourceEventData, type ISourceEventTaskTriggerOptions, type ISourceGroupChatMessage, type ISourceGroupInfoChangedEventData, type ISourceLoginEventData, type ISourceLogoutEventData, type ISourceOptions, type ISourceParamas, type ISourceResponseMessageEventData, type ISourceSystemEventData, type ISourceTodoEventData, type ISourceUserInfo, type ISourceWSNormalInMessage, type ISourceWSNormalOutMessage, type ISoviteTTSSkillOptions, type ITaskConfig, type ITaskEventTriggerData, type ITaskRunResult, type ITaskRunner, type ITaskRunnerOptions, type ITaskRunnerParams, type ITaskServiceOptions, type ITaskTrigger, type ITaskTriggerData, type ITaskTriggerOptions, type ITaskTriggerParams, type ITencentSTTSkillOptions, type ITencentTTSSkillOptions, type IWCAISourceOptions, type IWCOASourceOptions, type IWeWorkSourceOptions, type IWenxinAgentBotOptions, type IXunfeiBotOptions, type IXunfeiSTTSkillOptions, type IXunfeiTTSSkillOptions, type IYuanQiBotOptions, type IZhipuBotOptions, type IZhipuQingyanBotOptions, InstanceBaseManager, OllamaBot, OpenAIBot, OpenAIDrawSkill, OpenAISTTSkill, OpenAITTSSkill, OpenRouterBot, PPAgent, QAnythingBot, QQSource, SchemaBaseProperties, SenseVoiceSTTSkill, SiliconFlowBot, SiliconFlowDrawSkill, SiliconFlowSTTSkill, SiliconFlowTTSSkill, SimpleSchemaType, type SkillCreator, SkillManager, SkillSchemaBaseProperties, SortedPromise, SourceApiMissingParamsError, SourceApiNotFoundError, SourceApiUnAuthorizedError, type SourceChatArticleContent, type SourceChatAudioContent, type SourceChatCardContent, type SourceChatContactContent, type SourceChatContent, type SourceChatEmotionContent, type SourceChatFileContent, type SourceChatImageContent, type SourceChatMPContent, SourceChatMessageType, type SourceChatMusicContent, type SourceChatPatContentType, type SourceChatPhoneContent, type SourceChatPositionContent, type SourceChatRecallContent, type SourceChatRefContent, type SourceChatRichTextContent, type SourceChatSubscribeContent, type SourceChatSystemContent, type SourceChatTextContent, type SourceChatVideoContent, type SourceCreator, SourceEventTaskTrigger, SourceEventType, SourceManager, type SourceWSCustomAction, type SourceWSNormalAction, SoviteTTSSkill, type TaskRunnerCreator, TaskRunnerManager, TaskRunnerSchemaBaseProperties, TaskService, TaskTrigger, type TaskTriggerCreator, TaskTriggerManager, TencentSTTSkill, TencentTTSSkill, WCAISource, WCOASource, WeWorkSource, WenxinAgentBot, XunfeiBot, XunfeiSTTSkill, XunfeiTTSSkill, YuanQiBot, ZhipuBot, ZhipuQingyanBot, addWavHeader, apiPlugin, arm2wav, betterMarkdown, chatMessageRepo, chatSource, checkMessageRule, config, createCacheManager, createFormilySchema, defaultPlugin, detectName, disposeObjects, extractArticleInfo, extractImageUrls, extractMarkdownImageTags, extractMessageContentText, extractPositionInfo, filterContentRule, generateRandomString, getEnvNumber, getFromMessageSummary, getLogger, getSecret, getToMessageSummary, hasEmoji, hasMarkdown, installAndGetPluginInfo, installDep, isPhoneNumber, removeEmoji, removeMarkdown, richText2Markdown, sleep, sse, stream2buffer, transFileFormat, transFormat, uninstallDep, wav2amr };
|
|
3492
|
+
export { Agent, type AgentChatMessageReplyType, AgentService, AsyncFile, type AsyncFileLoader, BaiduSTTSkill, BaiduTTSSkill, BaseDrawSkill, BaseSTTSkill, BaseTTSSkill, BasicBot, type BotCreator, BotManager, ChatMessage, ChatMessageTaskRunner, CogVideoDrawSkill, CogviewDrawSkill, CozeBot, CozeService, CronTaskTrigger, DifyAgentBot, DingRobotSource, EchoTaskRunner, EventTaskTrigger, FastGPTBot, FeishuSource, FishAudioTTSSkill, GlobalEvent, GlobalEventNames, GlobalEventTaskTrigger, HistoryMessageManager, type IAgentChatEventData, type IAgentModels, type IAgentOptions, type IAgentServiceOptions, type IAsyncFile, type IAsyncFileSource, type IBaiduSTTSkillOptions, type IBaiduTTSSkillOptions, type IBaseDrawSkillOptions, type IBaseSTTSkillOptions, type IBaseTTSSkillOptions, type IBasicBotOptions, type IBot, type IBotEventData, type IBotFileInfo, type IBotHistoryMessage, type IBotHistoryRecordEventData, type IBotOptions, type IBotParams, type IBotReadyMessage, type IChatMessageTaskRunnerOptions, type ICogVideoDrawSkillOptions, type ICogviewDrawSkillOptions, type IConfigParams, type IConfigSchema, type ICozeBotOptions, type ICozeServiceOptions, type ICronTaskTriggerOptions, type IDifyAgentBotOptions, type IDingRobotSourceOptions, type IDingRobotSourceParams, type IDisposable, type IDrawResult, type IEventTaskTriggerOptions, type IFastGPTBotOptions, type IFeishuSourceOptions, type IFishAudioTTSSkillOptions, type IGlobalEventData, type IGlobalNotifyEventData, type IHisotryMessageManagerOptions, type IInstance, type IInstanceBaseMangerOptions, type IInstanceCreateOptions, type ILastBotMessageInfo, type ILogger, type ILoggerEmitContent, type IMessageContentReceiver, type IMessageContentRule, type IMessageRule, type IModelInfo, type IOllamaBotOptions, type IOnlinePluginInfo, type IOpenAIBotOptions, type IOpenAIDrawSkillOptions, type IOpenAISTTSkillOptions, type IOpenAITTSSkillOptions, type IPPAgentOptions, type IPPAgentPlugin, type IPPAgentPluginHandler, type IPPAgentPluginOptions, type IQAnythingBotOptions, type IQQSourceOptions, type ISenseVoiceSTTSkillOptions, type ISiliconFlowDrawSkillOptions, type ISiliconFlowSTTSkillOptions, type ISiliconFlowTTSSkillOptions, type ISimpleSchemaItem, type ISkill, type ISkillOptions, type ISkillParams, type ISource, type ISourceActionInfo, type ISourceApiAction, type ISourceApiResponseType, type ISourceChatMessage, type ISourceChatMessageEventData, type ISourceEventData, type ISourceEventTaskTriggerOptions, type ISourceGroupChatMessage, type ISourceGroupInfoChangedEventData, type ISourceLoginEventData, type ISourceLogoutEventData, type ISourceOptions, type ISourceParamas, type ISourceResponseMessageEventData, type ISourceSystemEventData, type ISourceTodoEventData, type ISourceUserInfo, type ISourceWSNormalInMessage, type ISourceWSNormalOutMessage, type ISoviteTTSSkillOptions, type ITaskConfig, type ITaskEventTriggerData, type ITaskRunResult, type ITaskRunner, type ITaskRunnerOptions, type ITaskRunnerParams, type ITaskServiceOptions, type ITaskTrigger, type ITaskTriggerData, type ITaskTriggerOptions, type ITaskTriggerParams, type ITencentSTTSkillOptions, type ITencentTTSSkillOptions, type IWCAISourceOptions, type IWCOASourceOptions, type IWeWorkSourceOptions, type IWenxinAgentBotOptions, type IXunfeiBotOptions, type IXunfeiSTTSkillOptions, type IXunfeiTTSSkillOptions, type IYuanQiBotOptions, type IZhipuBotOptions, type IZhipuQingyanBotOptions, InstanceBaseManager, OllamaBot, OpenAIBot, OpenAIDrawSkill, OpenAISTTSkill, OpenAITTSSkill, OpenRouterBot, PPAgent, QAnythingBot, QQSource, SchemaBaseProperties, SenseVoiceSTTSkill, SiliconFlowBot, SiliconFlowDrawSkill, SiliconFlowSTTSkill, SiliconFlowTTSSkill, SimpleSchemaType, type SkillCreator, SkillManager, SkillSchemaBaseProperties, SortedPromise, SourceApiMissingParamsError, SourceApiNotFoundError, SourceApiUnAuthorizedError, type SourceChatArticleContent, type SourceChatAudioContent, type SourceChatCardContent, type SourceChatContactContent, type SourceChatContent, type SourceChatEmotionContent, type SourceChatFileContent, type SourceChatImageContent, type SourceChatMPContent, SourceChatMessageType, type SourceChatMusicContent, type SourceChatPatContentType, type SourceChatPhoneContent, type SourceChatPositionContent, type SourceChatRecallContent, type SourceChatRefContent, type SourceChatRichTextContent, type SourceChatSubscribeContent, type SourceChatSystemContent, type SourceChatTextContent, type SourceChatVideoContent, type SourceCreator, SourceEventTaskTrigger, SourceEventType, SourceManager, type SourceWSCustomAction, type SourceWSNormalAction, SoviteTTSSkill, type TaskRunnerCreator, TaskRunnerManager, TaskRunnerSchemaBaseProperties, TaskService, TaskTrigger, type TaskTriggerCreator, TaskTriggerManager, TencentSTTSkill, TencentTTSSkill, WCAISource, WCOASource, WeWorkSource, WenxinAgentBot, XunfeiBot, XunfeiSTTSkill, XunfeiTTSSkill, YuanQiBot, ZhipuBot, ZhipuQingyanBot, addWavHeader, apiPlugin, arm2wav, betterMarkdown, chatMessageRepo, chatSource, checkMessageRule, config, createCacheManager, createFormilySchema, defaultPlugin, detectName, directRunBot, disposeObjects, extractArticleInfo, extractImageUrls, extractMarkdownImageTags, extractMessageContentText, extractPositionInfo, filterContentRule, generateRandomString, getEnvNumber, getFromMessageSummary, getLogger, getSecret, getToMessageSummary, hasEmoji, hasMarkdown, installAndGetPluginInfo, installDep, isPhoneNumber, removeEmoji, removeMarkdown, richText2Markdown, sleep, sse, stream2buffer, transFileFormat, transFormat, uninstallDep, wav2amr };
|