@downcity/plugins 1.0.57 → 1.0.60
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 +24 -2
- package/bin/BuiltinPlugins.d.ts.map +1 -1
- package/bin/BuiltinPlugins.js +18 -5
- package/bin/BuiltinPlugins.js.map +1 -1
- package/bin/auth/types/AuthPlugin.d.ts +12 -16
- package/bin/auth/types/AuthPlugin.d.ts.map +1 -1
- package/bin/auth/types/AuthPlugin.js +9 -13
- package/bin/auth/types/AuthPlugin.js.map +1 -1
- package/bin/chat/ChatPlugin.d.ts +37 -6
- package/bin/chat/ChatPlugin.d.ts.map +1 -1
- package/bin/chat/ChatPlugin.js +58 -80
- package/bin/chat/ChatPlugin.js.map +1 -1
- package/bin/chat/Index.d.ts +4 -1
- package/bin/chat/Index.d.ts.map +1 -1
- package/bin/chat/Index.js +2 -1
- package/bin/chat/Index.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 +145 -0
- package/bin/chat/channels/RuntimeChannel.d.ts.map +1 -0
- package/bin/chat/channels/RuntimeChannel.js +148 -0
- package/bin/chat/channels/RuntimeChannel.js.map +1 -0
- package/bin/chat/runtime/ChatAuthorizationRuntime.d.ts +22 -0
- package/bin/chat/runtime/ChatAuthorizationRuntime.d.ts.map +1 -0
- package/bin/chat/runtime/ChatAuthorizationRuntime.js +189 -0
- package/bin/chat/runtime/ChatAuthorizationRuntime.js.map +1 -0
- package/bin/chat/runtime/ChatChannelActions.d.ts.map +1 -1
- package/bin/chat/runtime/ChatChannelActions.js +19 -9
- package/bin/chat/runtime/ChatChannelActions.js.map +1 -1
- package/bin/chat/runtime/ChatChannelConfig.d.ts +2 -18
- package/bin/chat/runtime/ChatChannelConfig.d.ts.map +1 -1
- package/bin/chat/runtime/ChatChannelConfig.js +2 -73
- package/bin/chat/runtime/ChatChannelConfig.js.map +1 -1
- package/bin/chat/runtime/ChatChannelCore.d.ts +22 -1
- package/bin/chat/runtime/ChatChannelCore.d.ts.map +1 -1
- package/bin/chat/runtime/ChatChannelCore.js +5 -5
- package/bin/chat/runtime/ChatChannelCore.js.map +1 -1
- package/bin/chat/runtime/ChatPluginActionRegistry.js +1 -1
- package/bin/chat/runtime/ChatPluginActionRegistry.js.map +1 -1
- package/bin/chat/runtime/PluginPoints.d.ts +3 -3
- package/bin/chat/runtime/PluginPoints.js +3 -3
- package/bin/chat/types/ChannelStatus.d.ts +1 -1
- package/bin/chat/types/ChatPluginOptions.d.ts +76 -0
- package/bin/chat/types/ChatPluginOptions.d.ts.map +1 -0
- package/bin/chat/types/ChatPluginOptions.js +10 -0
- package/bin/chat/types/ChatPluginOptions.js.map +1 -0
- package/bin/contact/ContactPlugin.d.ts +6 -1
- package/bin/contact/ContactPlugin.d.ts.map +1 -1
- package/bin/contact/ContactPlugin.js +9 -8
- package/bin/contact/ContactPlugin.js.map +1 -1
- package/bin/contact/types/ContactPluginOptions.d.ts +29 -0
- package/bin/contact/types/ContactPluginOptions.d.ts.map +1 -0
- package/bin/contact/types/ContactPluginOptions.js +9 -0
- package/bin/contact/types/ContactPluginOptions.js.map +1 -0
- package/bin/index.d.ts +7 -4
- package/bin/index.d.ts.map +1 -1
- package/bin/index.js +3 -2
- package/bin/index.js.map +1 -1
- package/bin/skill/Action.d.ts.map +1 -1
- package/bin/skill/Action.js +2 -2
- package/bin/skill/Action.js.map +1 -1
- package/bin/skill/Command.js +5 -5
- package/bin/skill/Command.js.map +1 -1
- package/bin/skill/Plugin.js +1 -1
- package/bin/skill/Plugin.js.map +1 -1
- package/bin/skill/runtime/Discovery.d.ts +4 -4
- package/bin/skill/runtime/Discovery.d.ts.map +1 -1
- package/bin/skill/runtime/Discovery.js +5 -5
- package/bin/skill/runtime/Discovery.js.map +1 -1
- package/bin/skill/runtime/Paths.d.ts +1 -5
- package/bin/skill/runtime/Paths.d.ts.map +1 -1
- package/bin/skill/runtime/Paths.js +1 -9
- package/bin/skill/runtime/Paths.js.map +1 -1
- package/bin/skill/runtime/Prompt.d.ts +2 -2
- package/bin/skill/runtime/Prompt.d.ts.map +1 -1
- package/bin/skill/runtime/Prompt.js +3 -3
- package/bin/skill/runtime/Prompt.js.map +1 -1
- package/bin/skill/runtime/Store.d.ts +2 -2
- package/bin/skill/runtime/Store.d.ts.map +1 -1
- package/bin/skill/runtime/Store.js.map +1 -1
- package/bin/skill/runtime/SystemProvider.js +4 -4
- package/bin/skill/runtime/SystemProvider.js.map +1 -1
- package/bin/skill/runtime/Types.d.ts +3 -3
- package/bin/skill/runtime/Types.d.ts.map +1 -1
- package/bin/skill/types/{ClaudeSkill.d.ts → SkillDefinition.d.ts} +4 -4
- package/bin/skill/types/SkillDefinition.d.ts.map +1 -0
- package/bin/skill/types/{ClaudeSkill.js → SkillDefinition.js} +2 -2
- package/bin/skill/types/SkillDefinition.js.map +1 -0
- package/bin/skill/types/SkillPlugin.d.ts +2 -2
- package/bin/skill/types/SkillPlugin.d.ts.map +1 -1
- package/bin/web/Plugin.js +1 -1
- package/bin/web/Plugin.js.map +1 -1
- package/bin/web/runtime/Install.js +2 -2
- package/bin/web/runtime/Install.js.map +1 -1
- package/bin/web/types/WebPlugin.d.ts +2 -1
- package/bin/web/types/WebPlugin.d.ts.map +1 -1
- package/bin/workboard/Plugin.d.ts +23 -3
- package/bin/workboard/Plugin.d.ts.map +1 -1
- package/bin/workboard/Plugin.js +66 -85
- package/bin/workboard/Plugin.js.map +1 -1
- package/package.json +2 -2
- package/src/BuiltinPlugins.ts +41 -5
- package/src/auth/types/AuthPlugin.ts +12 -17
- package/src/chat/ChatPlugin.ts +92 -89
- package/src/chat/Index.ts +18 -1
- package/src/chat/channels/Configuration.ts +1 -1
- package/src/chat/channels/RuntimeChannel.ts +264 -0
- package/src/chat/runtime/ChatAuthorizationRuntime.ts +229 -0
- package/src/chat/runtime/ChatChannelActions.ts +24 -9
- package/src/chat/runtime/ChatChannelConfig.ts +2 -100
- package/src/chat/runtime/ChatChannelCore.ts +20 -8
- package/src/chat/runtime/ChatPluginActionRegistry.ts +1 -1
- package/src/chat/runtime/PluginPoints.ts +3 -3
- package/src/chat/types/ChannelStatus.ts +1 -1
- package/src/chat/types/ChatPluginOptions.ts +79 -0
- package/src/contact/ContactPlugin.ts +17 -9
- package/src/contact/types/ContactPluginOptions.ts +30 -0
- package/src/index.ts +23 -7
- package/src/skill/Action.ts +10 -7
- package/src/skill/Command.ts +5 -5
- package/src/skill/Plugin.ts +1 -1
- package/src/skill/runtime/Discovery.ts +14 -11
- package/src/skill/runtime/Paths.ts +1 -13
- package/src/skill/runtime/Prompt.ts +5 -5
- package/src/skill/runtime/Store.ts +6 -3
- package/src/skill/runtime/SystemProvider.ts +4 -4
- package/src/skill/runtime/Types.ts +3 -3
- package/src/skill/types/{ClaudeSkill.ts → SkillDefinition.ts} +3 -3
- package/src/skill/types/SkillPlugin.ts +2 -2
- package/src/web/Plugin.ts +1 -1
- package/src/web/runtime/Install.ts +3 -3
- package/src/web/types/WebPlugin.ts +2 -2
- package/src/workboard/Plugin.ts +80 -95
- package/bin/auth/Plugin.d.ts +0 -17
- package/bin/auth/Plugin.d.ts.map +0 -1
- package/bin/auth/Plugin.js +0 -199
- package/bin/auth/Plugin.js.map +0 -1
- package/bin/chat/ChatPluginTypes.d.ts +0 -122
- package/bin/chat/ChatPluginTypes.d.ts.map +0 -1
- package/bin/chat/ChatPluginTypes.js +0 -10
- package/bin/chat/ChatPluginTypes.js.map +0 -1
- package/bin/skill/types/ClaudeSkill.d.ts.map +0 -1
- package/bin/skill/types/ClaudeSkill.js.map +0 -1
- package/src/auth/Plugin.ts +0 -237
- package/src/chat/ChatPluginTypes.ts +0 -126
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ChatPlugin SDK / runtime 配置类型。
|
|
3
|
-
*
|
|
4
|
-
* 关键点(中文)
|
|
5
|
-
* - 这里定义 `new ChatPlugin({...})` 的显式注入接口。
|
|
6
|
-
* - 构造参数只承载显式渠道配置与 queue 行为,不再承载自定义存储/解析器注入。
|
|
7
|
-
* - 若未显式提供渠道凭据,ChatPlugin 会直接回退到默认全局账号池 `~/.downcity/downcity.db`。
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
import type { ChatQueueWorkerConfig } from "@/chat/types/ChatQueueWorker.js";
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Telegram 显式渠道配置。
|
|
14
|
-
*/
|
|
15
|
-
export interface ChatPluginTelegramOptions {
|
|
16
|
-
/**
|
|
17
|
-
* 是否启用当前渠道。
|
|
18
|
-
*
|
|
19
|
-
* 说明(中文)
|
|
20
|
-
* - 省略时,若显式提供了 `botToken`,默认视为启用。
|
|
21
|
-
* - 传入 `false` 时会强制关闭,即使提供了凭据也不会启动。
|
|
22
|
-
*/
|
|
23
|
-
enabled?: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* Telegram Bot Token。
|
|
26
|
-
*/
|
|
27
|
-
botToken: string;
|
|
28
|
-
/**
|
|
29
|
-
* 可选的显式账户 ID。
|
|
30
|
-
*
|
|
31
|
-
* 说明(中文)
|
|
32
|
-
* - 主要用于让上层产品把 runtime 渠道与自己的 account 池关联起来。
|
|
33
|
-
* - 省略时会使用 runtime 合成的临时 ID。
|
|
34
|
-
*/
|
|
35
|
-
channelAccountId?: string;
|
|
36
|
-
/**
|
|
37
|
-
* 渠道展示名。
|
|
38
|
-
*/
|
|
39
|
-
name?: string;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Feishu 显式渠道配置。
|
|
44
|
-
*/
|
|
45
|
-
export interface ChatPluginFeishuOptions {
|
|
46
|
-
/**
|
|
47
|
-
* 是否启用当前渠道。
|
|
48
|
-
*/
|
|
49
|
-
enabled?: boolean;
|
|
50
|
-
/**
|
|
51
|
-
* Feishu / Lark App ID。
|
|
52
|
-
*/
|
|
53
|
-
appId: string;
|
|
54
|
-
/**
|
|
55
|
-
* Feishu / Lark App Secret。
|
|
56
|
-
*/
|
|
57
|
-
appSecret: string;
|
|
58
|
-
/**
|
|
59
|
-
* 可选的 Open API 域名。
|
|
60
|
-
*/
|
|
61
|
-
domain?: string;
|
|
62
|
-
/**
|
|
63
|
-
* 可选的显式账户 ID。
|
|
64
|
-
*/
|
|
65
|
-
channelAccountId?: string;
|
|
66
|
-
/**
|
|
67
|
-
* 渠道展示名。
|
|
68
|
-
*/
|
|
69
|
-
name?: string;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* QQ 显式渠道配置。
|
|
74
|
-
*/
|
|
75
|
-
export interface ChatPluginQqOptions {
|
|
76
|
-
/**
|
|
77
|
-
* 是否启用当前渠道。
|
|
78
|
-
*/
|
|
79
|
-
enabled?: boolean;
|
|
80
|
-
/**
|
|
81
|
-
* QQ Bot App ID。
|
|
82
|
-
*/
|
|
83
|
-
appId: string;
|
|
84
|
-
/**
|
|
85
|
-
* QQ Bot App Secret。
|
|
86
|
-
*/
|
|
87
|
-
appSecret: string;
|
|
88
|
-
/**
|
|
89
|
-
* 是否使用 QQ 沙箱模式。
|
|
90
|
-
*/
|
|
91
|
-
sandbox?: boolean;
|
|
92
|
-
/**
|
|
93
|
-
* 可选的显式账户 ID。
|
|
94
|
-
*/
|
|
95
|
-
channelAccountId?: string;
|
|
96
|
-
/**
|
|
97
|
-
* 渠道展示名。
|
|
98
|
-
*/
|
|
99
|
-
name?: string;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* ChatPlugin 显式构造参数。
|
|
104
|
-
*/
|
|
105
|
-
export interface ChatPluginOptions {
|
|
106
|
-
/**
|
|
107
|
-
* Chat queue worker 运行配置。
|
|
108
|
-
*
|
|
109
|
-
* 说明(中文)
|
|
110
|
-
* - 显式传入时优先级高于 `downcity.json.plugins.chat.queue`。
|
|
111
|
-
* - 可用于不同 client 定制并发、突发合并等行为。
|
|
112
|
-
*/
|
|
113
|
-
queue?: Partial<ChatQueueWorkerConfig>;
|
|
114
|
-
/**
|
|
115
|
-
* Telegram 渠道显式配置。
|
|
116
|
-
*/
|
|
117
|
-
telegram?: ChatPluginTelegramOptions;
|
|
118
|
-
/**
|
|
119
|
-
* Feishu 渠道显式配置。
|
|
120
|
-
*/
|
|
121
|
-
feishu?: ChatPluginFeishuOptions;
|
|
122
|
-
/**
|
|
123
|
-
* QQ 渠道显式配置。
|
|
124
|
-
*/
|
|
125
|
-
qq?: ChatPluginQqOptions;
|
|
126
|
-
}
|