@downcity/plugins 1.0.174 → 1.0.193
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/bin/BuiltinPlugins.d.ts +4 -9
- package/bin/BuiltinPlugins.d.ts.map +1 -1
- package/bin/BuiltinPlugins.js +4 -8
- package/bin/BuiltinPlugins.js.map +1 -1
- package/bin/chat/Action.d.ts +8 -2
- package/bin/chat/Action.d.ts.map +1 -1
- package/bin/chat/Action.js +9 -5
- package/bin/chat/Action.js.map +1 -1
- package/bin/chat/ChatPlugin.d.ts +2 -22
- package/bin/chat/ChatPlugin.d.ts.map +1 -1
- package/bin/chat/ChatPlugin.js +2 -21
- package/bin/chat/ChatPlugin.js.map +1 -1
- package/bin/chat/Index.d.ts +1 -1
- package/bin/chat/Index.d.ts.map +1 -1
- package/bin/chat/channels/BaseChatChannel.js +1 -1
- package/bin/chat/channels/BaseChatChannel.js.map +1 -1
- package/bin/chat/channels/Configuration.d.ts +1 -1
- package/bin/chat/channels/Configuration.js +1 -1
- package/bin/chat/channels/RuntimeChannel.d.ts +2 -3
- package/bin/chat/channels/RuntimeChannel.d.ts.map +1 -1
- package/bin/chat/channels/RuntimeChannel.js +0 -8
- package/bin/chat/channels/RuntimeChannel.js.map +1 -1
- package/bin/chat/channels/feishu/Feishu.d.ts.map +1 -1
- package/bin/chat/channels/feishu/Feishu.js +2 -1
- package/bin/chat/channels/feishu/Feishu.js.map +1 -1
- package/bin/chat/runtime/ChannelContextStore.d.ts.map +1 -1
- package/bin/chat/runtime/ChannelContextStore.js +13 -12
- package/bin/chat/runtime/ChannelContextStore.js.map +1 -1
- package/bin/chat/runtime/ChatActionExecution.d.ts +26 -1
- package/bin/chat/runtime/ChatActionExecution.d.ts.map +1 -1
- package/bin/chat/runtime/ChatActionExecution.js +31 -3
- package/bin/chat/runtime/ChatActionExecution.js.map +1 -1
- package/bin/chat/runtime/ChatActionInput.d.ts +1 -2
- package/bin/chat/runtime/ChatActionInput.d.ts.map +1 -1
- package/bin/chat/runtime/ChatActionInput.js +1 -27
- package/bin/chat/runtime/ChatActionInput.js.map +1 -1
- package/bin/chat/runtime/ChatChannelActions.d.ts +2 -66
- package/bin/chat/runtime/ChatChannelActions.d.ts.map +1 -1
- package/bin/chat/runtime/ChatChannelActions.js +3 -195
- package/bin/chat/runtime/ChatChannelActions.js.map +1 -1
- package/bin/chat/runtime/ChatChannelConfig.d.ts +2 -23
- package/bin/chat/runtime/ChatChannelConfig.d.ts.map +1 -1
- package/bin/chat/runtime/ChatChannelConfig.js +3 -116
- package/bin/chat/runtime/ChatChannelConfig.js.map +1 -1
- package/bin/chat/runtime/ChatChannelCore.d.ts +0 -14
- package/bin/chat/runtime/ChatChannelCore.d.ts.map +1 -1
- package/bin/chat/runtime/ChatChannelCore.js +1 -1
- package/bin/chat/runtime/ChatChannelCore.js.map +1 -1
- package/bin/chat/runtime/ChatChannelFacade.d.ts +1 -1
- package/bin/chat/runtime/ChatChannelFacade.d.ts.map +1 -1
- package/bin/chat/runtime/ChatChannelFacade.js +1 -1
- package/bin/chat/runtime/ChatChannelFacade.js.map +1 -1
- package/bin/chat/runtime/ChatHistoryStore.d.ts.map +1 -1
- package/bin/chat/runtime/ChatHistoryStore.js +4 -3
- package/bin/chat/runtime/ChatHistoryStore.js.map +1 -1
- package/bin/chat/runtime/ChatPluginActionRegistry.d.ts.map +1 -1
- package/bin/chat/runtime/ChatPluginActionRegistry.js +27 -89
- package/bin/chat/runtime/ChatPluginActionRegistry.js.map +1 -1
- package/bin/chat/runtime/ChatPluginSystem.d.ts +3 -2
- package/bin/chat/runtime/ChatPluginSystem.d.ts.map +1 -1
- package/bin/chat/runtime/ChatPluginSystem.js +5 -5
- package/bin/chat/runtime/ChatPluginSystem.js.map +1 -1
- package/bin/chat/runtime/ChatQueueStore.d.ts +1 -1
- package/bin/chat/runtime/ChatQueueStore.js +2 -2
- package/bin/chat/runtime/ChatQueueStore.js.map +1 -1
- package/bin/chat/runtime/ChatQueueWorker.js +1 -1
- package/bin/chat/runtime/ChatQueueWorker.js.map +1 -1
- package/bin/chat/runtime/ChatSessionDelete.d.ts.map +1 -1
- package/bin/chat/runtime/ChatSessionDelete.js +11 -20
- package/bin/chat/runtime/ChatSessionDelete.js.map +1 -1
- package/bin/chat/runtime/ChatStorage.d.ts +32 -0
- package/bin/chat/runtime/ChatStorage.d.ts.map +1 -0
- package/bin/chat/runtime/ChatStorage.js +158 -0
- package/bin/chat/runtime/ChatStorage.js.map +1 -0
- package/bin/chat/runtime/SystemPrompt.d.ts +3 -2
- package/bin/chat/runtime/SystemPrompt.d.ts.map +1 -1
- package/bin/chat/runtime/SystemPrompt.js +4 -5
- package/bin/chat/runtime/SystemPrompt.js.map +1 -1
- package/bin/chat/types/ChannelConfiguration.d.ts +2 -2
- package/bin/chat/types/ChatPluginActionPayload.d.ts +7 -45
- package/bin/chat/types/ChatPluginActionPayload.d.ts.map +1 -1
- package/bin/chat/types/ChatPluginOptions.d.ts +0 -21
- package/bin/chat/types/ChatPluginOptions.d.ts.map +1 -1
- package/bin/chat/types/ChatStorage.d.ts +36 -0
- package/bin/chat/types/ChatStorage.d.ts.map +1 -0
- package/bin/chat/types/ChatStorage.js +9 -0
- package/bin/chat/types/ChatStorage.js.map +1 -0
- package/bin/contact/Action.d.ts +3 -2
- package/bin/contact/Action.d.ts.map +1 -1
- package/bin/contact/Action.js +2 -2
- package/bin/contact/Action.js.map +1 -1
- package/bin/contact/ContactPlugin.d.ts.map +1 -1
- package/bin/contact/ContactPlugin.js +17 -14
- package/bin/contact/ContactPlugin.js.map +1 -1
- package/bin/contact/runtime/ChatRuntime.js +1 -1
- package/bin/contact/runtime/ChatRuntime.js.map +1 -1
- package/bin/contact/types/ContactPluginOptions.d.ts +4 -0
- package/bin/contact/types/ContactPluginOptions.d.ts.map +1 -1
- package/bin/index.d.ts +5 -5
- package/bin/index.d.ts.map +1 -1
- package/bin/index.js +2 -2
- package/bin/index.js.map +1 -1
- package/bin/memory/Action.d.ts.map +1 -1
- package/bin/memory/Action.js +16 -4
- package/bin/memory/Action.js.map +1 -1
- package/bin/memory/runtime/Store.d.ts.map +1 -1
- package/bin/memory/runtime/Store.js +0 -22
- package/bin/memory/runtime/Store.js.map +1 -1
- package/bin/memory/runtime/Writer.d.ts +1 -1
- package/bin/memory/runtime/Writer.d.ts.map +1 -1
- package/bin/memory/runtime/Writer.js +2 -4
- package/bin/memory/runtime/Writer.js.map +1 -1
- package/bin/skill/Command.d.ts +3 -11
- package/bin/skill/Command.d.ts.map +1 -1
- package/bin/skill/Command.js +3 -31
- package/bin/skill/Command.js.map +1 -1
- package/bin/skill/PROMPT.d.ts +1 -1
- package/bin/skill/PROMPT.d.ts.map +1 -1
- package/bin/skill/PROMPT.js +1 -1
- package/bin/skill/PROMPT.js.map +1 -1
- package/bin/skill/Plugin.d.ts +3 -2
- package/bin/skill/Plugin.d.ts.map +1 -1
- package/bin/skill/Plugin.js +37 -129
- package/bin/skill/Plugin.js.map +1 -1
- package/bin/skill/runtime/Prompt.d.ts +11 -2
- package/bin/skill/runtime/Prompt.d.ts.map +1 -1
- package/bin/skill/runtime/Prompt.js +93 -8
- package/bin/skill/runtime/Prompt.js.map +1 -1
- package/bin/skill/runtime/SystemProvider.d.ts +2 -1
- package/bin/skill/runtime/SystemProvider.d.ts.map +1 -1
- package/bin/skill/runtime/SystemProvider.js +4 -9
- package/bin/skill/runtime/SystemProvider.js.map +1 -1
- package/bin/skill/types/SkillPlugin.d.ts +6 -18
- package/bin/skill/types/SkillPlugin.d.ts.map +1 -1
- package/bin/skill/types/SkillPlugin.js +2 -2
- package/bin/sound/Plugin.d.ts +69 -0
- package/bin/sound/Plugin.d.ts.map +1 -0
- package/bin/sound/Plugin.js +623 -0
- package/bin/sound/Plugin.js.map +1 -0
- package/bin/sound/types/SoundPlugin.d.ts +150 -0
- package/bin/sound/types/SoundPlugin.d.ts.map +1 -0
- package/bin/sound/types/SoundPlugin.js +10 -0
- package/bin/sound/types/SoundPlugin.js.map +1 -0
- package/bin/task/Action.d.ts +2 -0
- package/bin/task/Action.d.ts.map +1 -1
- package/bin/task/Action.js +6 -0
- package/bin/task/Action.js.map +1 -1
- package/bin/task/runtime/Runner.d.ts +4 -0
- package/bin/task/runtime/Runner.d.ts.map +1 -1
- package/bin/task/runtime/Runner.js +15 -11
- package/bin/task/runtime/Runner.js.map +1 -1
- package/bin/task/runtime/TaskActionExecution.d.ts +2 -0
- package/bin/task/runtime/TaskActionExecution.d.ts.map +1 -1
- package/bin/task/runtime/TaskActionExecution.js +1 -0
- package/bin/task/runtime/TaskActionExecution.js.map +1 -1
- package/bin/task/runtime/TaskPluginActionRegistry.d.ts.map +1 -1
- package/bin/task/runtime/TaskPluginActionRegistry.js +1 -0
- package/bin/task/runtime/TaskPluginActionRegistry.js.map +1 -1
- package/bin/task/runtime/TaskRunChatDispatch.js +1 -1
- package/bin/task/runtime/TaskRunChatDispatch.js.map +1 -1
- package/bin/task/runtime/TaskRunnerRound.d.ts.map +1 -1
- package/bin/task/runtime/TaskRunnerRound.js +19 -26
- package/bin/task/runtime/TaskRunnerRound.js.map +1 -1
- package/bin/task/runtime/TaskRunnerSession.d.ts +6 -2
- package/bin/task/runtime/TaskRunnerSession.d.ts.map +1 -1
- package/bin/task/runtime/TaskRunnerSession.js +93 -72
- package/bin/task/runtime/TaskRunnerSession.js.map +1 -1
- package/bin/task/runtime/TaskRunnerTypes.d.ts +4 -4
- package/bin/task/runtime/TaskRunnerTypes.d.ts.map +1 -1
- package/bin/task/types/TaskPluginOptions.d.ts.map +1 -1
- package/bin/web/PROMPT.d.ts +1 -1
- package/bin/web/PROMPT.d.ts.map +1 -1
- package/bin/web/PROMPT.js +2 -2
- package/bin/web/PROMPT.js.map +1 -1
- package/bin/web/Plugin.d.ts +1 -21
- package/bin/web/Plugin.d.ts.map +1 -1
- package/bin/web/Plugin.js +14 -79
- package/bin/web/Plugin.js.map +1 -1
- package/bin/web/runtime/Prompt.d.ts +14 -0
- package/bin/web/runtime/Prompt.d.ts.map +1 -0
- package/bin/web/runtime/Prompt.js +77 -0
- package/bin/web/runtime/Prompt.js.map +1 -0
- package/bin/web/types/WebPlugin.d.ts +40 -29
- package/bin/web/types/WebPlugin.d.ts.map +1 -1
- package/bin/web/types/WebPlugin.js +11 -3
- package/bin/web/types/WebPlugin.js.map +1 -1
- package/bin/workboard/runtime/Collector.js +1 -1
- package/bin/workboard/runtime/Collector.js.map +1 -1
- package/bin/workboard/runtime/Normalizer.js +1 -1
- package/bin/workboard/runtime/Normalizer.js.map +1 -1
- package/bin/workboard/runtime/SessionSummary.d.ts.map +1 -1
- package/bin/workboard/runtime/SessionSummary.js +11 -38
- package/bin/workboard/runtime/SessionSummary.js.map +1 -1
- package/package.json +8 -4
- package/scripts/chat-access.test.mjs +1 -1
- package/scripts/chat-channel-config.test.mjs +15 -64
- package/scripts/chat-storage.test.mjs +92 -0
- package/scripts/skill-plugin.test.mjs +93 -0
- package/scripts/sound-plugin.test.mjs +250 -0
- package/scripts/web-plugin.test.mjs +85 -0
- package/src/BuiltinPlugins.ts +7 -17
- package/src/chat/Action.ts +16 -5
- package/src/chat/ChatPlugin.ts +6 -35
- package/src/chat/Index.ts +0 -1
- package/src/chat/channels/BaseChatChannel.ts +1 -1
- package/src/chat/channels/Configuration.ts +1 -1
- package/src/chat/channels/RuntimeChannel.ts +2 -14
- package/src/chat/channels/feishu/Feishu.ts +2 -1
- package/src/chat/runtime/ChannelContextStore.ts +16 -12
- package/src/chat/runtime/ChatActionExecution.ts +48 -3
- package/src/chat/runtime/ChatActionInput.ts +0 -31
- package/src/chat/runtime/ChatChannelActions.ts +3 -254
- package/src/chat/runtime/ChatChannelConfig.ts +4 -133
- package/src/chat/runtime/ChatChannelCore.ts +1 -15
- package/src/chat/runtime/ChatChannelFacade.ts +0 -4
- package/src/chat/runtime/ChatHistoryStore.ts +4 -3
- package/src/chat/runtime/ChatPluginActionRegistry.ts +26 -98
- package/src/chat/runtime/ChatPluginSystem.ts +9 -3
- package/src/chat/runtime/ChatQueueStore.ts +2 -2
- package/src/chat/runtime/ChatQueueWorker.ts +1 -1
- package/src/chat/runtime/ChatSessionDelete.ts +11 -21
- package/src/chat/runtime/ChatStorage.ts +203 -0
- package/src/chat/runtime/SystemPrompt.ts +8 -3
- package/src/chat/types/ChannelConfiguration.ts +2 -2
- package/src/chat/types/ChatPluginActionPayload.ts +8 -49
- package/src/chat/types/ChatPluginOptions.ts +0 -22
- package/src/chat/types/ChatStorage.ts +37 -0
- package/src/contact/Action.ts +9 -1
- package/src/contact/ContactPlugin.ts +38 -14
- package/src/contact/runtime/ChatRuntime.ts +1 -1
- package/src/contact/types/ContactPluginOptions.ts +6 -0
- package/src/index.ts +16 -14
- package/src/memory/Action.ts +19 -4
- package/src/memory/runtime/Store.ts +0 -27
- package/src/memory/runtime/Writer.ts +2 -5
- package/src/skill/Command.ts +3 -33
- package/src/skill/PROMPT.ts +1 -1
- package/src/skill/PROMPT.ts.txt +5 -1
- package/src/skill/Plugin.ts +49 -156
- package/src/skill/runtime/Prompt.ts +109 -9
- package/src/skill/runtime/SystemProvider.ts +5 -9
- package/src/skill/types/SkillPlugin.ts +6 -18
- package/src/sound/Plugin.ts +699 -0
- package/src/sound/types/SoundPlugin.ts +163 -0
- package/src/task/Action.ts +8 -0
- package/src/task/runtime/Runner.ts +19 -13
- package/src/task/runtime/TaskActionExecution.ts +3 -0
- package/src/task/runtime/TaskPluginActionRegistry.ts +1 -0
- package/src/task/runtime/TaskRunChatDispatch.ts +1 -1
- package/src/task/runtime/TaskRunnerRound.ts +20 -38
- package/src/task/runtime/TaskRunnerSession.ts +108 -72
- package/src/task/runtime/TaskRunnerTypes.ts +4 -4
- package/src/task/types/TaskPluginOptions.ts +1 -0
- package/src/web/PROMPT.ts +2 -2
- package/src/web/PROMPT.ts.txt +4 -2
- package/src/web/Plugin.ts +20 -90
- package/src/web/runtime/Prompt.ts +99 -0
- package/src/web/types/WebPlugin.ts +42 -29
- package/src/workboard/runtime/Collector.ts +1 -1
- package/src/workboard/runtime/Normalizer.ts +1 -1
- package/src/workboard/runtime/SessionSummary.ts +11 -42
- package/bin/asr/Plugin.d.ts +0 -63
- package/bin/asr/Plugin.d.ts.map +0 -1
- package/bin/asr/Plugin.js +0 -280
- package/bin/asr/Plugin.js.map +0 -1
- package/bin/asr/types/AsrPlugin.d.ts +0 -114
- package/bin/asr/types/AsrPlugin.d.ts.map +0 -1
- package/bin/asr/types/AsrPlugin.js +0 -10
- package/bin/asr/types/AsrPlugin.js.map +0 -1
- package/bin/chat/runtime/ChatSession.d.ts +0 -97
- package/bin/chat/runtime/ChatSession.d.ts.map +0 -1
- package/bin/chat/runtime/ChatSession.js +0 -91
- package/bin/chat/runtime/ChatSession.js.map +0 -1
- package/bin/chat/runtime/ChatSessionContextComposer.d.ts +0 -45
- package/bin/chat/runtime/ChatSessionContextComposer.d.ts.map +0 -1
- package/bin/chat/runtime/ChatSessionContextComposer.js +0 -60
- package/bin/chat/runtime/ChatSessionContextComposer.js.map +0 -1
- package/bin/chat/runtime/ChatSessionTypes.d.ts +0 -30
- package/bin/chat/runtime/ChatSessionTypes.d.ts.map +0 -1
- package/bin/chat/runtime/ChatSessionTypes.js +0 -9
- package/bin/chat/runtime/ChatSessionTypes.js.map +0 -1
- package/bin/tts/Plugin.d.ts +0 -49
- package/bin/tts/Plugin.d.ts.map +0 -1
- package/bin/tts/Plugin.js +0 -247
- package/bin/tts/Plugin.js.map +0 -1
- package/bin/tts/types/TtsPlugin.d.ts +0 -122
- package/bin/tts/types/TtsPlugin.d.ts.map +0 -1
- package/bin/tts/types/TtsPlugin.js +0 -10
- package/bin/tts/types/TtsPlugin.js.map +0 -1
- package/bin/web/runtime/Install.d.ts +0 -19
- package/bin/web/runtime/Install.d.ts.map +0 -1
- package/bin/web/runtime/Install.js +0 -178
- package/bin/web/runtime/Install.js.map +0 -1
- package/src/asr/Plugin.ts +0 -322
- package/src/asr/types/AsrPlugin.ts +0 -118
- package/src/chat/runtime/ChatSession.ts +0 -168
- package/src/chat/runtime/ChatSessionContextComposer.ts +0 -106
- package/src/chat/runtime/ChatSessionTypes.ts +0 -32
- package/src/tts/Plugin.ts +0 -284
- package/src/tts/types/TtsPlugin.ts +0 -129
- package/src/web/runtime/Install.ts +0 -241
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* - 不再读取/写入 pinnedSkillIds,不做会话级技能注入
|
|
7
7
|
* - `lookup` 行为为无状态:由 action 读取 SKILL.md 后通过协议注入 user message
|
|
8
8
|
*/
|
|
9
|
+
import type { PluginRunContext } from "@downcity/agent";
|
|
9
10
|
import type { SkillPluginOptions } from "../../skill/types/SkillPlugin.js";
|
|
10
11
|
type SkillSystemRuntime = {
|
|
11
12
|
rootPath: string;
|
|
@@ -19,6 +20,6 @@ type SkillSystemRuntime = {
|
|
|
19
20
|
* 2) 更新 session 的可用技能快照(仅用于观察态)
|
|
20
21
|
* 3) 输出 skills overview 文本
|
|
21
22
|
*/
|
|
22
|
-
export declare function buildSkillsSystemText(runtime: SkillSystemRuntime): Promise<string>;
|
|
23
|
+
export declare function buildSkillsSystemText(runtime: SkillSystemRuntime, run_context?: PluginRunContext): Promise<string>;
|
|
23
24
|
export {};
|
|
24
25
|
//# sourceMappingURL=SystemProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SystemProvider.d.ts","sourceRoot":"","sources":["../../../src/skill/runtime/SystemProvider.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"SystemProvider.d.ts","sourceRoot":"","sources":["../../../src/skill/runtime/SystemProvider.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAIxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,KAAK,kBAAkB,GAAG;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAC;CACrC,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,kBAAkB,EAC3B,WAAW,CAAC,EAAE,gBAAgB,GAC7B,OAAO,CAAC,MAAM,CAAC,CAgBjB"}
|
|
@@ -6,14 +6,9 @@
|
|
|
6
6
|
* - 不再读取/写入 pinnedSkillIds,不做会话级技能注入
|
|
7
7
|
* - `lookup` 行为为无状态:由 action 读取 SKILL.md 后通过协议注入 user message
|
|
8
8
|
*/
|
|
9
|
-
import { getSessionRunContext } from "@downcity/agent";
|
|
10
9
|
import { discoverSkillsSync } from "./Discovery.js";
|
|
11
|
-
import {
|
|
10
|
+
import { render_skills_prompt_section } from "./Prompt.js";
|
|
12
11
|
import { setSessionAvailableSkills } from "./Store.js";
|
|
13
|
-
function getCurrentSessionId() {
|
|
14
|
-
const run_context = getSessionRunContext();
|
|
15
|
-
return String(run_context?.sessionId || "").trim();
|
|
16
|
-
}
|
|
17
12
|
/**
|
|
18
13
|
* 构建 skill plugin system 文本。
|
|
19
14
|
*
|
|
@@ -22,12 +17,12 @@ function getCurrentSessionId() {
|
|
|
22
17
|
* 2) 更新 session 的可用技能快照(仅用于观察态)
|
|
23
18
|
* 3) 输出 skills overview 文本
|
|
24
19
|
*/
|
|
25
|
-
export async function buildSkillsSystemText(runtime) {
|
|
26
|
-
const sessionId =
|
|
20
|
+
export async function buildSkillsSystemText(runtime, run_context) {
|
|
21
|
+
const sessionId = String(run_context?.sessionId || "").trim();
|
|
27
22
|
const discoveredSkills = discoverSkillsSync(runtime.rootPath, runtime.options);
|
|
28
23
|
if (sessionId) {
|
|
29
24
|
setSessionAvailableSkills(sessionId, discoveredSkills);
|
|
30
25
|
}
|
|
31
|
-
return
|
|
26
|
+
return render_skills_prompt_section(runtime.rootPath, runtime.options, discoveredSkills).trim();
|
|
32
27
|
}
|
|
33
28
|
//# sourceMappingURL=SystemProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SystemProvider.js","sourceRoot":"","sources":["../../../src/skill/runtime/SystemProvider.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"SystemProvider.js","sourceRoot":"","sources":["../../../src/skill/runtime/SystemProvider.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAQvD;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,OAA2B,EAC3B,WAA8B;IAE9B,MAAM,SAAS,GAAG,MAAM,CAAC,WAAW,EAAE,SAAS,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IAC9D,MAAM,gBAAgB,GAAG,kBAAkB,CACzC,OAAO,CAAC,QAAQ,EAChB,OAAO,CAAC,OAAO,CAChB,CAAC;IAEF,IAAI,SAAS,EAAE,CAAC;QACd,yBAAyB,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC;IACzD,CAAC;IAED,OAAO,4BAA4B,CACjC,OAAO,CAAC,QAAQ,EAChB,OAAO,CAAC,OAAO,EACf,gBAAgB,CACjB,CAAC,IAAI,EAAE,CAAC;AACX,CAAC"}
|
|
@@ -13,11 +13,11 @@ import type { SkillRootSource } from "../../skill/types/SkillRoot.js";
|
|
|
13
13
|
*/
|
|
14
14
|
export declare const SKILL_PLUGIN_ACTIONS: {
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* 返回查找 skill 的 Shell 操作提示。
|
|
17
17
|
*/
|
|
18
18
|
readonly find: "find";
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* 返回扫描感知的安装提示。
|
|
21
21
|
*/
|
|
22
22
|
readonly install: "install";
|
|
23
23
|
/**
|
|
@@ -30,34 +30,22 @@ export declare const SKILL_PLUGIN_ACTIONS: {
|
|
|
30
30
|
readonly lookup: "lookup";
|
|
31
31
|
};
|
|
32
32
|
/**
|
|
33
|
-
* skill
|
|
33
|
+
* skill 查找提示 action 输入。
|
|
34
34
|
*/
|
|
35
35
|
export type SkillPluginFindPayload = {
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
37
|
+
* 需要查找的 skill 关键词。
|
|
38
38
|
*/
|
|
39
39
|
query: string;
|
|
40
40
|
};
|
|
41
41
|
/**
|
|
42
|
-
* skill
|
|
42
|
+
* skill 安装提示 action 输入。
|
|
43
43
|
*/
|
|
44
44
|
export type SkillPluginInstallPayload = {
|
|
45
45
|
/**
|
|
46
|
-
* skill
|
|
46
|
+
* `skills` CLI 接受的安装来源或 skill spec。
|
|
47
47
|
*/
|
|
48
48
|
spec: string;
|
|
49
|
-
/**
|
|
50
|
-
* 是否全局安装。
|
|
51
|
-
*/
|
|
52
|
-
global?: boolean;
|
|
53
|
-
/**
|
|
54
|
-
* 是否跳过确认。
|
|
55
|
-
*/
|
|
56
|
-
yes?: boolean;
|
|
57
|
-
/**
|
|
58
|
-
* 安装目标 agent 名称。
|
|
59
|
-
*/
|
|
60
|
-
agent?: string;
|
|
61
49
|
};
|
|
62
50
|
/**
|
|
63
51
|
* skill 读取输入。
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkillPlugin.d.ts","sourceRoot":"","sources":["../../../src/skill/types/SkillPlugin.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAElE;;GAEG;AACH,eAAO,MAAM,oBAAoB;IAC/B;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;CAEK,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC;;OA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,KAAK,CAAC,OAAO,CAAC,eAAe,EAAE,SAAS,GAAG,MAAM,CAAC,CAAC,CAAC;IACzD;;OAEG;IACH,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB;;OAEG;IACH,MAAM,EAAE,qBAAqB,EAAE,CAAC;CACjC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SoundPlugin:统一的语音识别与语音合成插件。
|
|
3
|
+
*
|
|
4
|
+
* 关键点(中文)
|
|
5
|
+
* - 对 Agent 暴露 `models`、`asr`、`tts` 三个 action。
|
|
6
|
+
* - 模型目录与真实 ASR/TTS 能力全部由 FED/City constructor 回调注入。
|
|
7
|
+
* - 本地音频只负责读取并转换为 data URL,不加载或运行任何本地语音模型。
|
|
8
|
+
* - TTS 返回 AI SDK UIMessage,音频 file part 由 agent 统一落盘。
|
|
9
|
+
*/
|
|
10
|
+
import { BasePlugin } from "@downcity/agent";
|
|
11
|
+
import type { AgentContext, JsonObject, JsonValue } from "@downcity/agent";
|
|
12
|
+
import type { SoundPluginOptions } from "../sound/types/SoundPlugin.js";
|
|
13
|
+
/**
|
|
14
|
+
* Agent 统一语音插件。
|
|
15
|
+
*/
|
|
16
|
+
export declare class SoundPlugin extends BasePlugin {
|
|
17
|
+
/** 当前 plugin 稳定名称。 */
|
|
18
|
+
readonly name: string;
|
|
19
|
+
/** Plugin 展示标题。 */
|
|
20
|
+
readonly title: string;
|
|
21
|
+
/** Plugin 用途说明。 */
|
|
22
|
+
readonly description: string;
|
|
23
|
+
private readonly asr_handler;
|
|
24
|
+
private readonly tts_handler;
|
|
25
|
+
private readonly list_models?;
|
|
26
|
+
private readonly default_asr_model?;
|
|
27
|
+
private readonly default_tts_model?;
|
|
28
|
+
private readonly auto_asr;
|
|
29
|
+
private readonly language?;
|
|
30
|
+
private readonly voice?;
|
|
31
|
+
private readonly format?;
|
|
32
|
+
constructor(options: SoundPluginOptions);
|
|
33
|
+
/**
|
|
34
|
+
* SoundPlugin 给 Agent 的使用说明。
|
|
35
|
+
*/
|
|
36
|
+
system(_context: AgentContext): string;
|
|
37
|
+
/**
|
|
38
|
+
* 执行一次 ASR 转写。
|
|
39
|
+
*/
|
|
40
|
+
private transcribe;
|
|
41
|
+
/**
|
|
42
|
+
* 执行一次 TTS 合成。
|
|
43
|
+
*/
|
|
44
|
+
private synthesize;
|
|
45
|
+
/**
|
|
46
|
+
* 自动转写 chat 入站语音附件。
|
|
47
|
+
*/
|
|
48
|
+
private auto_transcribe_inbound;
|
|
49
|
+
/**
|
|
50
|
+
* chat pipeline 扩展点。
|
|
51
|
+
*/
|
|
52
|
+
readonly hooks: {
|
|
53
|
+
pipeline: {
|
|
54
|
+
"chat.augmentInbound": (({ context, value }: {
|
|
55
|
+
context: AgentContext;
|
|
56
|
+
value: JsonValue;
|
|
57
|
+
}) => Promise<JsonValue>)[];
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* 显式 action 集合。
|
|
62
|
+
*/
|
|
63
|
+
readonly actions: {
|
|
64
|
+
models: import("@downcity/agent").PluginAction<JsonValue, JsonObject>;
|
|
65
|
+
asr: import("@downcity/agent").PluginAction<JsonValue, JsonObject>;
|
|
66
|
+
tts: import("@downcity/agent").PluginAction<JsonValue, JsonObject>;
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=Plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Plugin.d.ts","sourceRoot":"","sources":["../../src/sound/Plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAAE,UAAU,EAAgB,MAAM,iBAAiB,CAAC;AAE3D,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAM3E,OAAO,KAAK,EAOV,kBAAkB,EAGnB,MAAM,8BAA8B,CAAC;AA8XtC;;GAEG;AACH,qBAAa,WAAY,SAAQ,UAA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