@downcity/agent 1.1.174 → 1.1.178
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/agent/local/AgentPluginFactory.d.ts +4 -2
- package/bin/agent/local/AgentPluginFactory.d.ts.map +1 -1
- package/bin/agent/local/AgentPluginFactory.js +4 -6
- package/bin/agent/local/AgentPluginFactory.js.map +1 -1
- package/bin/agent/local/AgentRuntimeAssembly.d.ts.map +1 -1
- package/bin/agent/local/AgentRuntimeAssembly.js +3 -8
- package/bin/agent/local/AgentRuntimeAssembly.js.map +1 -1
- package/bin/agent/local/ProjectSetup.d.ts +1 -1
- package/bin/agent/local/ProjectSetup.d.ts.map +1 -1
- package/bin/agent/local/ProjectSetup.js +2 -6
- package/bin/agent/local/ProjectSetup.js.map +1 -1
- package/bin/agent/local/services/AgentAssemblyService.d.ts +2 -3
- package/bin/agent/local/services/AgentAssemblyService.d.ts.map +1 -1
- package/bin/agent/local/services/AgentAssemblyService.js +9 -14
- package/bin/agent/local/services/AgentAssemblyService.js.map +1 -1
- package/bin/agent/local/services/AgentBackgroundService.d.ts.map +1 -1
- package/bin/agent/local/services/AgentBackgroundService.js +5 -6
- package/bin/agent/local/services/AgentBackgroundService.js.map +1 -1
- package/bin/agent/local/services/AgentSessionManager.d.ts +2 -2
- package/bin/agent/local/services/AgentSessionManager.d.ts.map +1 -1
- package/bin/agent/local/services/AgentSessionManager.js +1 -28
- package/bin/agent/local/services/AgentSessionManager.js.map +1 -1
- package/bin/config/AgentInitializer.d.ts +4 -4
- package/bin/config/AgentInitializer.d.ts.map +1 -1
- package/bin/config/AgentInitializer.js +7 -49
- package/bin/config/AgentInitializer.js.map +1 -1
- package/bin/config/DowncitySchema.d.ts +3 -4
- package/bin/config/DowncitySchema.d.ts.map +1 -1
- package/bin/config/DowncitySchema.js +1 -2
- package/bin/config/DowncitySchema.js.map +1 -1
- package/bin/executor/Executor.d.ts.map +1 -1
- package/bin/executor/Executor.js +1 -1
- package/bin/executor/Executor.js.map +1 -1
- package/bin/executor/composer/system/default/SystemDomain.d.ts.map +1 -1
- package/bin/executor/composer/system/default/SystemDomain.js +1 -2
- package/bin/executor/composer/system/default/SystemDomain.js.map +1 -1
- package/bin/executor/composer/system/default/assets/core.prompt.d.ts +1 -1
- package/bin/executor/composer/system/default/assets/core.prompt.d.ts.map +1 -1
- package/bin/executor/composer/system/default/assets/core.prompt.js +1 -1
- package/bin/executor/composer/system/default/assets/core.prompt.js.map +1 -1
- package/bin/index.d.ts +0 -2
- package/bin/index.d.ts.map +1 -1
- package/bin/index.js +1 -4
- package/bin/index.js.map +1 -1
- package/bin/plugin/core/Activation.d.ts +6 -5
- package/bin/plugin/core/Activation.d.ts.map +1 -1
- package/bin/plugin/core/Activation.js +9 -9
- package/bin/plugin/core/Activation.js.map +1 -1
- package/bin/plugin/core/BasePlugin.d.ts +5 -4
- package/bin/plugin/core/BasePlugin.d.ts.map +1 -1
- package/bin/plugin/core/BasePlugin.js +7 -4
- package/bin/plugin/core/BasePlugin.js.map +1 -1
- package/bin/plugin/core/HookRegistry.d.ts +4 -0
- package/bin/plugin/core/HookRegistry.d.ts.map +1 -1
- package/bin/plugin/core/HookRegistry.js +40 -0
- package/bin/plugin/core/HookRegistry.js.map +1 -1
- package/bin/plugin/core/Manager.d.ts +1 -1
- package/bin/plugin/core/Manager.d.ts.map +1 -1
- package/bin/plugin/core/Manager.js +1 -1
- package/bin/plugin/core/Manager.js.map +1 -1
- package/bin/plugin/core/PluginActionRunner.d.ts +13 -7
- package/bin/plugin/core/PluginActionRunner.d.ts.map +1 -1
- package/bin/plugin/core/PluginActionRunner.js +46 -111
- package/bin/plugin/core/PluginActionRunner.js.map +1 -1
- package/bin/plugin/core/PluginCatalog.d.ts +1 -1
- package/bin/plugin/core/PluginCatalog.d.ts.map +1 -1
- package/bin/plugin/core/PluginCatalog.js +1 -21
- package/bin/plugin/core/PluginCatalog.js.map +1 -1
- package/bin/plugin/core/PluginLocalExecution.d.ts +12 -2
- package/bin/plugin/core/PluginLocalExecution.d.ts.map +1 -1
- package/bin/plugin/core/PluginLocalExecution.js +18 -24
- package/bin/plugin/core/PluginLocalExecution.js.map +1 -1
- package/bin/plugin/core/PluginRegistry.d.ts +60 -7
- package/bin/plugin/core/PluginRegistry.d.ts.map +1 -1
- package/bin/plugin/core/PluginRegistry.js +269 -42
- package/bin/plugin/core/PluginRegistry.js.map +1 -1
- package/bin/plugin/core/PluginStateController.d.ts +11 -36
- package/bin/plugin/core/PluginStateController.d.ts.map +1 -1
- package/bin/plugin/core/PluginStateController.js +45 -190
- package/bin/plugin/core/PluginStateController.js.map +1 -1
- package/bin/plugin/types/Plugin.d.ts +1 -1
- package/bin/plugin/types/Plugin.d.ts.map +1 -1
- package/bin/plugin/types/PluginState.d.ts +1 -1
- package/bin/plugin/types/PluginState.d.ts.map +1 -1
- package/bin/plugin/types/Plugins.d.ts +12 -12
- package/bin/plugin/types/Plugins.d.ts.map +1 -1
- package/bin/session/services/SessionStateService.d.ts.map +1 -1
- package/bin/session/services/SessionStateService.js +1 -1
- package/bin/session/services/SessionStateService.js.map +1 -1
- package/bin/types/agent/AgentOptions.d.ts +12 -3
- package/bin/types/agent/AgentOptions.d.ts.map +1 -1
- package/bin/types/agent/AgentRuntimeAssembly.d.ts +1 -1
- package/bin/types/config/AgentProject.d.ts +6 -14
- package/bin/types/config/AgentProject.d.ts.map +1 -1
- package/bin/types/plugin/PluginRuntime.d.ts +23 -2
- package/bin/types/plugin/PluginRuntime.d.ts.map +1 -1
- package/bin/types/plugin/PluginState.d.ts +47 -36
- package/bin/types/plugin/PluginState.d.ts.map +1 -1
- package/bin/types/plugin/PluginState.js +4 -3
- package/bin/types/plugin/PluginState.js.map +1 -1
- package/bin/types/runtime/agent/AgentContext.d.ts +3 -3
- package/bin/types/runtime/agent/AgentContext.d.ts.map +1 -1
- package/bin/types/runtime/agent/AgentContext.js.map +1 -1
- package/package.json +3 -3
- package/src/agent/local/AgentPluginFactory.ts +8 -8
- package/src/agent/local/AgentRuntimeAssembly.ts +3 -9
- package/src/agent/local/ProjectSetup.ts +1 -8
- package/src/agent/local/services/AgentAssemblyService.ts +13 -23
- package/src/agent/local/services/AgentBackgroundService.ts +5 -6
- package/src/agent/local/services/AgentSessionManager.ts +4 -26
- package/src/config/AgentInitializer.ts +7 -57
- package/src/config/DowncitySchema.ts +3 -4
- package/src/executor/Executor.ts +1 -3
- package/src/executor/composer/system/default/SystemDomain.ts +1 -2
- package/src/executor/composer/system/default/assets/core.prompt.ts +1 -1
- package/src/executor/composer/system/default/assets/core.prompt.ts.txt +1 -1
- package/src/index.ts +1 -8
- package/src/plugin/core/Activation.ts +10 -10
- package/src/plugin/core/BasePlugin.ts +9 -6
- package/src/plugin/core/HookRegistry.ts +41 -0
- package/src/plugin/core/Manager.ts +0 -2
- package/src/plugin/core/PluginActionRunner.ts +52 -133
- package/src/plugin/core/PluginCatalog.ts +1 -23
- package/src/plugin/core/PluginLocalExecution.ts +30 -25
- package/src/plugin/core/PluginRegistry.ts +298 -44
- package/src/plugin/core/PluginStateController.ts +45 -235
- package/src/plugin/types/Plugin.ts +2 -1
- package/src/plugin/types/PluginState.ts +2 -1
- package/src/plugin/types/Plugins.ts +12 -12
- package/src/session/services/SessionStateService.ts +1 -3
- package/src/types/agent/AgentOptions.ts +13 -3
- package/src/types/agent/AgentRuntimeAssembly.ts +1 -1
- package/src/types/config/AgentProject.ts +7 -15
- package/src/types/plugin/PluginRuntime.ts +23 -2
- package/src/types/plugin/PluginState.ts +50 -43
- package/src/types/runtime/agent/AgentContext.ts +3 -3
- package/tsconfig.tsbuildinfo +1 -1
- package/bin/config/Defaults.d.ts +0 -21
- package/bin/config/Defaults.d.ts.map +0 -1
- package/bin/config/Defaults.js +0 -47
- package/bin/config/Defaults.js.map +0 -1
- package/bin/plugin/core/ProjectConfigStore.d.ts +0 -84
- package/bin/plugin/core/ProjectConfigStore.d.ts.map +0 -1
- package/bin/plugin/core/ProjectConfigStore.js +0 -89
- package/bin/plugin/core/ProjectConfigStore.js.map +0 -1
- package/src/config/Defaults.ts +0 -49
- package/src/plugin/core/ProjectConfigStore.ts +0 -155
|
@@ -65,7 +65,7 @@ export interface AgentPathRuntime {
|
|
|
65
65
|
*/
|
|
66
66
|
export interface AgentPluginConfigRuntime {
|
|
67
67
|
/**
|
|
68
|
-
* 将当前 `plugins`
|
|
68
|
+
* 将当前 `plugins` 配置块写回宿主配置存储。
|
|
69
69
|
*/
|
|
70
70
|
persistProjectPlugins(plugins: DowncityConfig["plugins"] | undefined): Promise<string>;
|
|
71
71
|
}
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
* - 所有字段都面向"项目骨架创建"语义,不掺杂 runtime 状态。
|
|
7
7
|
*/
|
|
8
8
|
import type { ExecutionBindingConfig } from "../../types/config/ExecutionBinding.js";
|
|
9
|
-
import type { DowncityConfig } from "../../types/config/DowncityConfig.js";
|
|
10
9
|
/**
|
|
11
10
|
* 可选的 chat channel 标识。
|
|
12
11
|
*/
|
|
@@ -24,7 +23,7 @@ export interface AgentProjectInitializationInput {
|
|
|
24
23
|
*
|
|
25
24
|
* 关键点(中文)
|
|
26
25
|
* - 为空时会自动回退到目录名推导出的默认 id。
|
|
27
|
-
* -
|
|
26
|
+
* - CLI 可把该字段写入自己的全局配置存储。
|
|
28
27
|
*/
|
|
29
28
|
id?: string;
|
|
30
29
|
/**
|
|
@@ -34,24 +33,13 @@ export interface AgentProjectInitializationInput {
|
|
|
34
33
|
* - 绑定 City AIService 暴露的模型 ID。
|
|
35
34
|
*/
|
|
36
35
|
execution: ExecutionBindingConfig;
|
|
37
|
-
/**
|
|
38
|
-
* 需要一并写入项目的 plugin 配置补丁。
|
|
39
|
-
*
|
|
40
|
-
* 说明(中文)
|
|
41
|
-
* - 这里只承载初始化时的最小配置,不负责 city 级 plugin lifecycle。
|
|
42
|
-
*/
|
|
43
|
-
plugins?: DowncityConfig["plugins"];
|
|
44
36
|
/**
|
|
45
37
|
* 需要启用的 chat channels。
|
|
46
38
|
*
|
|
47
39
|
* 关键点(中文)
|
|
48
|
-
* -
|
|
40
|
+
* - SDK 初始化器只返回选择结果,不负责配置持久化。
|
|
49
41
|
*/
|
|
50
42
|
channels?: AgentProjectChannel[];
|
|
51
|
-
/**
|
|
52
|
-
* 是否允许覆盖已存在的 `downcity.json`。
|
|
53
|
-
*/
|
|
54
|
-
forceOverwriteShipJson?: boolean;
|
|
55
43
|
}
|
|
56
44
|
/**
|
|
57
45
|
* 初始化完成后的摘要结果。
|
|
@@ -69,6 +57,10 @@ export interface AgentProjectInitializationResult {
|
|
|
69
57
|
* 最终启用的 chat channels。
|
|
70
58
|
*/
|
|
71
59
|
channels: AgentProjectChannel[];
|
|
60
|
+
/**
|
|
61
|
+
* 最终选择的 City AIService 模型 ID。
|
|
62
|
+
*/
|
|
63
|
+
modelId?: string;
|
|
72
64
|
/**
|
|
73
65
|
* 本次实际创建/写入的文件列表。
|
|
74
66
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentProject.d.ts","sourceRoot":"","sources":["../../../src/types/config/AgentProject.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"AgentProject.d.ts","sourceRoot":"","sources":["../../../src/types/config/AgentProject.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAEjF;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,UAAU,GAAG,QAAQ,GAAG,IAAI,CAAC;AAE/D;;GAEG;AACH,MAAM,WAAW,+BAA+B;IAC9C;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;;;OAMG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;;;;OAKG;IACH,SAAS,EAAE,sBAAsB,CAAC;IAElC;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,mBAAmB,EAAE,CAAC;CAElC;AAED;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAC/C;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,QAAQ,EAAE,mBAAmB,EAAE,CAAC;IAEhC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,YAAY,EAAE,MAAM,EAAE,CAAC;IAEvB;;OAEG;IACH,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB"}
|
|
@@ -9,6 +9,9 @@ import type { AgentContext, StructuredConfig } from "../../types/runtime/agent/A
|
|
|
9
9
|
import type { JsonValue } from "../../types/common/Json.js";
|
|
10
10
|
import type { PluginActionResult } from "../../types/plugin/PluginAction.js";
|
|
11
11
|
import type { PluginActionExample } from "../../types/plugin/PluginAction.js";
|
|
12
|
+
import type { Plugin } from "../../types/plugin/PluginDefinition.js";
|
|
13
|
+
import type { AgentSessionSystemBlock } from "../../types/agent/AgentTypes.js";
|
|
14
|
+
import type { PluginSnapshot } from "../../types/plugin/PluginState.js";
|
|
12
15
|
/**
|
|
13
16
|
* Plugin 概览视图。
|
|
14
17
|
*/
|
|
@@ -72,9 +75,9 @@ export interface PluginReadView {
|
|
|
72
75
|
* Plugin 可用性结果。
|
|
73
76
|
*/
|
|
74
77
|
export interface PluginAvailability {
|
|
75
|
-
/** Plugin
|
|
78
|
+
/** Plugin 是否已注册。 */
|
|
76
79
|
enabled: boolean;
|
|
77
|
-
/** Plugin
|
|
80
|
+
/** Plugin 当前环境是否可用。 */
|
|
78
81
|
available: boolean;
|
|
79
82
|
/** 不可用原因列表。 */
|
|
80
83
|
reasons: string[];
|
|
@@ -83,6 +86,22 @@ export interface PluginAvailability {
|
|
|
83
86
|
* 当前 Agent 可用的 plugin 调用面。
|
|
84
87
|
*/
|
|
85
88
|
export interface AgentPlugins {
|
|
89
|
+
/** 注册或替换一个 plugin。 */
|
|
90
|
+
register(plugin: Plugin): Promise<PluginSnapshot>;
|
|
91
|
+
/** 卸载一个 plugin。 */
|
|
92
|
+
unregister(pluginName: string): Promise<boolean>;
|
|
93
|
+
/** 启动全部已挂载 plugin lifecycle。 */
|
|
94
|
+
startAll(): Promise<PluginSnapshot[]>;
|
|
95
|
+
/** 卸载全部 plugin。 */
|
|
96
|
+
unregisterAll(): Promise<void>;
|
|
97
|
+
/** 判断 plugin 是否已注册。 */
|
|
98
|
+
has(pluginName: string): boolean;
|
|
99
|
+
/** 读取单个 plugin 定义。 */
|
|
100
|
+
get(pluginName: string): Plugin | null;
|
|
101
|
+
/** 读取单个 plugin 注册快照。 */
|
|
102
|
+
status(pluginName: string): PluginSnapshot | null;
|
|
103
|
+
/** 列出全部已注册 plugin 快照。 */
|
|
104
|
+
snapshots(): PluginSnapshot[];
|
|
86
105
|
/** 列出全部已注册 plugin。 */
|
|
87
106
|
list(): PluginView[];
|
|
88
107
|
/** 读取 plugin / action metadata。 */
|
|
@@ -105,6 +124,8 @@ export interface AgentPlugins {
|
|
|
105
124
|
/** Action Payload(可选)。 */
|
|
106
125
|
payload?: JsonValue;
|
|
107
126
|
}): Promise<PluginActionResult<JsonValue>>;
|
|
127
|
+
/** 读取当前生效的 plugin system blocks。 */
|
|
128
|
+
systemBlocks(): Promise<AgentSessionSystemBlock[]>;
|
|
108
129
|
/** 运行 pipeline 点,按顺序链式变换值。 */
|
|
109
130
|
pipeline<T = JsonValue>(pointName: string, value: T): Promise<T>;
|
|
110
131
|
/** 运行 guard 点;任一插件抛错即终止。 */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PluginRuntime.d.ts","sourceRoot":"","sources":["../../../src/types/plugin/PluginRuntime.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,YAAY,EACZ,gBAAgB,EACjB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,KAAK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AC;CAChB,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AAE3B;;GAEG;AACH,MAAM,MAAM,iBAAiB,CAC3B,MAAM,SAAS,SAAS,GAAG,SAAS,EACpC,OAAO,SAAS,SAAS,GAAG,SAAS,IACnC,CAAC,MAAM,EAAE;IACX,eAAe;IACf,OAAO,EAAE,YAAY,CAAC;IACtB,aAAa;IACb,KAAK,EAAE,MAAM,CAAC;IACd,cAAc;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,KAAK,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;AAEjC;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,oBAAoB;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;IAC3D,iBAAiB;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;IACrD,kBAAkB;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;CACxD;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,CAAC,SAAS,EAAE,MAAM,GAAG,iBAAiB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;CAC9D,CAAC"}
|
|
@@ -1,68 +1,79 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Plugin
|
|
2
|
+
* Plugin 注册状态类型。
|
|
3
3
|
*
|
|
4
4
|
* 关键点(中文)
|
|
5
|
-
* -
|
|
6
|
-
* -
|
|
5
|
+
* - Plugin 只属于 Agent:注册即生效,卸载即不可见。
|
|
6
|
+
* - 不再暴露 start / stop / restart 这类生命周期状态。
|
|
7
|
+
* - `error` 只表示最近一次注册后运行发生错误,方便开发者诊断。
|
|
7
8
|
*/
|
|
9
|
+
import type { Plugin } from "../../types/plugin/PluginDefinition.js";
|
|
8
10
|
/**
|
|
9
|
-
* Plugin
|
|
10
|
-
*
|
|
11
|
-
* 说明(中文)
|
|
12
|
-
* - `starting` / `stopping` 仅用于生命周期过渡态。
|
|
13
|
-
* - `error` 表示最近一次 lifecycle / command / action 执行失败后留下的状态标记。
|
|
11
|
+
* Plugin 当前可观察状态。
|
|
14
12
|
*/
|
|
15
|
-
export type PluginState = "
|
|
13
|
+
export type PluginState = "ready" | "error";
|
|
16
14
|
/**
|
|
17
|
-
*
|
|
15
|
+
* 单个已注册 plugin 的运行时记录。
|
|
18
16
|
*/
|
|
19
|
-
export interface
|
|
20
|
-
/**
|
|
17
|
+
export interface PluginRuntimeRecord {
|
|
18
|
+
/** 当前 plugin 实例。 */
|
|
19
|
+
plugin: Plugin;
|
|
20
|
+
/** 当前可观察状态。 */
|
|
21
21
|
state: PluginState;
|
|
22
|
+
/** plugin 注册时间(毫秒时间戳)。 */
|
|
23
|
+
registered_at: number;
|
|
22
24
|
/** 最近一次状态更新时间(毫秒时间戳)。 */
|
|
23
|
-
|
|
25
|
+
updated_at: number;
|
|
24
26
|
/** 最近一次错误信息。 */
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
lastCommand?: string;
|
|
28
|
-
/** 最近一次执行命令的时间(毫秒时间戳)。 */
|
|
29
|
-
lastCommandAt?: number;
|
|
30
|
-
/** 当前串行控制链。 */
|
|
27
|
+
last_error?: string;
|
|
28
|
+
/** 当前串行变更链。 */
|
|
31
29
|
chain: Promise<void>;
|
|
30
|
+
/** lifecycle.start 是否已经执行成功。 */
|
|
31
|
+
lifecycle_started: boolean;
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
34
|
-
* 单个 plugin
|
|
34
|
+
* 单个 plugin 注册快照。
|
|
35
35
|
*/
|
|
36
|
-
export interface
|
|
36
|
+
export interface PluginSnapshot {
|
|
37
37
|
/** plugin 名称。 */
|
|
38
38
|
name: string;
|
|
39
|
-
/**
|
|
39
|
+
/** plugin 标题。 */
|
|
40
|
+
title: string;
|
|
41
|
+
/** plugin 描述。 */
|
|
42
|
+
description: string;
|
|
43
|
+
/** 当前注册后的可用状态。 */
|
|
44
|
+
status: PluginState;
|
|
45
|
+
/** 兼容旧字段的状态别名。 */
|
|
40
46
|
state: PluginState;
|
|
41
|
-
/**
|
|
47
|
+
/** 注册时间(毫秒时间戳)。 */
|
|
48
|
+
registered_at: number;
|
|
49
|
+
/** 最近更新时间(毫秒时间戳)。 */
|
|
50
|
+
updated_at: number;
|
|
51
|
+
/** 兼容旧字段的最近更新时间。 */
|
|
42
52
|
updatedAt: number;
|
|
43
|
-
/**
|
|
53
|
+
/** 最近错误。 */
|
|
54
|
+
last_error?: string;
|
|
55
|
+
/** 兼容旧字段的最近错误。 */
|
|
44
56
|
lastError?: string;
|
|
45
|
-
/** 最近一次执行的命令名。 */
|
|
46
|
-
lastCommand?: string;
|
|
47
|
-
/** 最近一次执行命令的时间(毫秒时间戳)。 */
|
|
48
|
-
lastCommandAt?: number;
|
|
49
|
-
/** 是否支持主动生命周期。 */
|
|
50
|
-
supportsLifecycle: boolean;
|
|
51
|
-
/** 是否支持 command/action。 */
|
|
52
|
-
supportsCommand: boolean;
|
|
53
57
|
}
|
|
54
58
|
/**
|
|
55
|
-
* plugin
|
|
59
|
+
* 兼容旧名称的 plugin 快照类型。
|
|
60
|
+
*/
|
|
61
|
+
export type PluginStateSnapshot = PluginSnapshot;
|
|
62
|
+
/**
|
|
63
|
+
* 兼容旧控制动作类型。
|
|
64
|
+
*
|
|
65
|
+
* 说明(中文)
|
|
66
|
+
* - 控制面只保留状态查询与卸载。
|
|
56
67
|
*/
|
|
57
|
-
export type PluginStateControlAction = "
|
|
68
|
+
export type PluginStateControlAction = "register" | "unregister" | "status";
|
|
58
69
|
/**
|
|
59
|
-
* plugin
|
|
70
|
+
* plugin 控制结果。
|
|
60
71
|
*/
|
|
61
72
|
export interface PluginStateControlResult {
|
|
62
73
|
/** 控制动作是否成功。 */
|
|
63
74
|
success: boolean;
|
|
64
75
|
/** 成功或失败后返回的最新 plugin 快照。 */
|
|
65
|
-
plugin?:
|
|
76
|
+
plugin?: PluginSnapshot;
|
|
66
77
|
/** 失败时的错误信息。 */
|
|
67
78
|
error?: string;
|
|
68
79
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PluginState.d.ts","sourceRoot":"","sources":["../../../src/types/plugin/PluginState.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"PluginState.d.ts","sourceRoot":"","sources":["../../../src/types/plugin/PluginState.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAEjE;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,OAAO,CAAC;AAE5C;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,oBAAoB;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe;IACf,KAAK,EAAE,WAAW,CAAC;IACnB,0BAA0B;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,yBAAyB;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe;IACf,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IACrB,gCAAgC;IAChC,iBAAiB,EAAE,OAAO,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,iBAAiB;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,iBAAiB;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB;IAClB,MAAM,EAAE,WAAW,CAAC;IACpB,kBAAkB;IAClB,KAAK,EAAE,WAAW,CAAC;IACnB,mBAAmB;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,qBAAqB;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,oBAAoB;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kBAAkB;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC;AAEjD;;;;;GAKG;AACH,MAAM,MAAM,wBAAwB,GAChC,UAAU,GACV,YAAY,GACZ,QAAQ,CAAC;AAEb;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,gBAAgB;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,6BAA6B;IAC7B,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,gBAAgB;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Plugin
|
|
2
|
+
* Plugin 注册状态类型。
|
|
3
3
|
*
|
|
4
4
|
* 关键点(中文)
|
|
5
|
-
* -
|
|
6
|
-
* -
|
|
5
|
+
* - Plugin 只属于 Agent:注册即生效,卸载即不可见。
|
|
6
|
+
* - 不再暴露 start / stop / restart 这类生命周期状态。
|
|
7
|
+
* - `error` 只表示最近一次注册后运行发生错误,方便开发者诊断。
|
|
7
8
|
*/
|
|
8
9
|
export {};
|
|
9
10
|
//# sourceMappingURL=PluginState.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PluginState.js","sourceRoot":"","sources":["../../../src/types/plugin/PluginState.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"PluginState.js","sourceRoot":"","sources":["../../../src/types/plugin/PluginState.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG"}
|
|
@@ -12,7 +12,7 @@ import type { AgentPathRuntime, AgentPluginConfigRuntime } from "../../../types/
|
|
|
12
12
|
import type { DowncityConfig } from "../../../types/config/DowncityConfig.js";
|
|
13
13
|
import type { JsonValue } from "../../../types/common/Json.js";
|
|
14
14
|
import type { AgentPlugins } from "../../../plugin/types/Plugin.js";
|
|
15
|
-
import type {
|
|
15
|
+
import type { Plugin } from "../../../types/plugin/PluginDefinition.js";
|
|
16
16
|
import type { SessionMetadataV1, SessionMessageV1 } from "../../../executor/types/SessionMessages.js";
|
|
17
17
|
import type { SessionRunInput, SessionRunResult } from "../../../executor/types/SessionRun.js";
|
|
18
18
|
import type { SessionHistoryStore } from "../../../executor/store/history/SessionHistoryStore.js";
|
|
@@ -227,7 +227,7 @@ export interface AgentContextOptions {
|
|
|
227
227
|
/** 当前可见的 plugin 配置持久化能力集合。 */
|
|
228
228
|
pluginConfig: AgentPluginConfigRuntime;
|
|
229
229
|
/** 当前 agent 持有的插件实例集合。 */
|
|
230
|
-
pluginInstances: Map<string,
|
|
230
|
+
pluginInstances: Map<string, Plugin>;
|
|
231
231
|
/** Session 能力入口。 */
|
|
232
232
|
session: SessionCollectionPort;
|
|
233
233
|
/** Plugin 调用入口。 */
|
|
@@ -259,7 +259,7 @@ export declare class AgentContext {
|
|
|
259
259
|
/** 当前可见的 plugin 配置持久化能力集合。 */
|
|
260
260
|
readonly pluginConfig: AgentPluginConfigRuntime;
|
|
261
261
|
/** 当前 agent 持有的插件实例集合。 */
|
|
262
|
-
readonly pluginInstances: Map<string,
|
|
262
|
+
readonly pluginInstances: Map<string, Plugin>;
|
|
263
263
|
/** Session 能力入口。 */
|
|
264
264
|
readonly session: SessionCollectionPort;
|
|
265
265
|
/** Plugin 调用入口。 */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentContext.d.ts","sourceRoot":"","sources":["../../../../src/types/runtime/agent/AgentContext.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AACxC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,KAAK,EACV,gBAAgB,EAChB,wBAAwB,EACzB,MAAM,uC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H,wBAAwB,IAAI,MAAM;IAIlC;;;;;;OAMG;YACW,oBAAoB;CAmBnC;AAED;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;CACtC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentContext.js","sourceRoot":"","sources":["../../../../src/types/runtime/agent/AgentContext.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AA2PH;;;;;;;GAOG;AACH,MAAM,OAAO,YAAY;IACvB,gBAAgB;IACP,GAAG,CAAS;IACrB,eAAe;IACN,QAAQ,CAAS;IAC1B,aAAa;IACJ,MAAM,CAAS;IACxB,kBAAkB;IACT,MAAM,CAAiB;IAChC,oBAAoB;IACX,GAAG,CAAyB;IACrC,yBAAyB;IAChB,OAAO,CAAW;IAC3B,mBAAmB;IACV,KAAK,CAAmB;IACjC,8BAA8B;IACrB,YAAY,CAA2B;IAChD,0BAA0B;IACjB,eAAe,
|
|
1
|
+
{"version":3,"file":"AgentContext.js","sourceRoot":"","sources":["../../../../src/types/runtime/agent/AgentContext.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AA2PH;;;;;;;GAOG;AACH,MAAM,OAAO,YAAY;IACvB,gBAAgB;IACP,GAAG,CAAS;IACrB,eAAe;IACN,QAAQ,CAAS;IAC1B,aAAa;IACJ,MAAM,CAAS;IACxB,kBAAkB;IACT,MAAM,CAAiB;IAChC,oBAAoB;IACX,GAAG,CAAyB;IACrC,yBAAyB;IAChB,OAAO,CAAW;IAC3B,mBAAmB;IACV,KAAK,CAAmB;IACjC,8BAA8B;IACrB,YAAY,CAA2B;IAChD,0BAA0B;IACjB,eAAe,CAAsB;IAC9C,oBAAoB;IACX,OAAO,CAAwB;IACxC,mBAAmB;IACV,OAAO,CAAe;IAC/B,8BAA8B;IACrB,MAAM,CAAmB;IAElC,YAAY,OAA4B;QACtC,IAAI,CAAC,GAA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rB,GAAG,CAAC,MAAM,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACrE,CAAC,CAAC;QACH,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACpB,OAAO;gBACL,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,OAAO,IAAI,sBAAsB;aAChE,CAAC;QACJ,CAAC;QACD,OAAO;YACL,OAAO,EAAE,IAAI;YACb,GAAG,CAAC,MAAM,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC5D,CAAC;IACJ,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@downcity/agent",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.178",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Downcity Agent 运行时 — 单 Agent 执行壳与本机 RPC 能力",
|
|
6
6
|
"main": "./bin/index.js",
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@ai-sdk/openai-compatible": "^2.0.48",
|
|
20
|
-
"@downcity/shell": "^0.1.
|
|
21
|
-
"@downcity/type": "0.1.
|
|
20
|
+
"@downcity/shell": "^0.1.50",
|
|
21
|
+
"@downcity/type": "0.1.84",
|
|
22
22
|
"ai": "^6.0.193",
|
|
23
23
|
"commander": "^15.0.0",
|
|
24
24
|
"dotenv": "^17.4.2",
|
|
@@ -6,18 +6,19 @@
|
|
|
6
6
|
* - Agent 仍然持有长期状态;这里不创建新的运行时层级。
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import type {
|
|
9
|
+
import type { Plugin } from "@/types/plugin/PluginDefinition.js";
|
|
10
10
|
import type { AgentContext } from "@/types/runtime/agent/AgentContext.js";
|
|
11
11
|
import { HookRegistry } from "@/plugin/core/HookRegistry.js";
|
|
12
12
|
import { PluginRegistry } from "@/plugin/core/PluginRegistry.js";
|
|
13
|
-
import { isPluginEnabled } from "@/plugin/core/Activation.js";
|
|
14
13
|
|
|
15
14
|
/**
|
|
16
15
|
* 创建 plugin registry 的参数。
|
|
17
16
|
*/
|
|
18
17
|
export interface CreateAgentPluginRegistryOptions {
|
|
19
18
|
/** 当前 agent 显式注册的 plugin 实例。 */
|
|
20
|
-
plugins:
|
|
19
|
+
plugins: Plugin[];
|
|
20
|
+
/** 当前 agent plugin 实例集合。 */
|
|
21
|
+
plugin_instances: Map<string, Plugin>;
|
|
21
22
|
/** 延迟读取当前 AgentContext。 */
|
|
22
23
|
get_context: () => AgentContext;
|
|
23
24
|
}
|
|
@@ -32,20 +33,19 @@ export function createAgentPluginRegistry(
|
|
|
32
33
|
const hook_registry = new HookRegistry({
|
|
33
34
|
contextResolver: options.get_context,
|
|
34
35
|
pluginEnabledChecker: (plugin_name) => {
|
|
35
|
-
|
|
36
|
-
return
|
|
37
|
-
? isPluginEnabled({ plugin, context: options.get_context() })
|
|
38
|
-
: false;
|
|
36
|
+
void options;
|
|
37
|
+
return plugin_registry_ref?.isReady(plugin_name) || false;
|
|
39
38
|
},
|
|
40
39
|
});
|
|
41
40
|
const registry = new PluginRegistry({
|
|
42
41
|
contextResolver: options.get_context,
|
|
43
42
|
hookRegistry: hook_registry,
|
|
43
|
+
pluginInstances: options.plugin_instances,
|
|
44
44
|
});
|
|
45
45
|
plugin_registry_ref = registry;
|
|
46
46
|
|
|
47
47
|
for (const plugin of options.plugins) {
|
|
48
|
-
registry.
|
|
48
|
+
registry.mount(plugin);
|
|
49
49
|
}
|
|
50
50
|
return registry;
|
|
51
51
|
}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* - agent runtime 负责创建这些宿主能力对象,再注入到 AgentRuntime。
|
|
6
6
|
* - plugin runtime / session / plugin 作者 API 只消费这些对象,不直接依赖具体宿主实现。
|
|
7
7
|
* - 当前先收敛路径与 plugin 配置持久化两类宿主能力。
|
|
8
|
+
* - SDK 默认不把 plugin 配置写回项目文件;宿主如 CLI 可接管持久化。
|
|
8
9
|
*/
|
|
9
10
|
import {
|
|
10
11
|
getCacheDirPath,
|
|
@@ -18,12 +19,10 @@ import {
|
|
|
18
19
|
getDowncitySessionDirPath,
|
|
19
20
|
getDowncitySessionRootDirPath,
|
|
20
21
|
} from "@/config/Paths.js";
|
|
21
|
-
import { persistProjectPluginConfig } from "@/plugin/core/ProjectConfigStore.js";
|
|
22
22
|
import type {
|
|
23
23
|
AgentPathRuntime,
|
|
24
24
|
AgentPluginConfigRuntime,
|
|
25
25
|
} from "@/types/agent/AgentRuntimeAssembly.js";
|
|
26
|
-
import type { DowncityConfig } from "@/types/config/DowncityConfig.js";
|
|
27
26
|
|
|
28
27
|
/**
|
|
29
28
|
* 创建当前项目的路径能力集合。
|
|
@@ -57,13 +56,8 @@ export function createAgentPathRuntime(
|
|
|
57
56
|
export function createAgentPluginConfigRuntime(projectRoot: string): AgentPluginConfigRuntime {
|
|
58
57
|
const rootPath = String(projectRoot || "").trim();
|
|
59
58
|
return {
|
|
60
|
-
async persistProjectPlugins(
|
|
61
|
-
return
|
|
62
|
-
projectRoot: rootPath,
|
|
63
|
-
sections: {
|
|
64
|
-
...(plugins !== undefined ? { plugins } : {}),
|
|
65
|
-
},
|
|
66
|
-
});
|
|
59
|
+
async persistProjectPlugins(): Promise<string> {
|
|
60
|
+
return rootPath;
|
|
67
61
|
},
|
|
68
62
|
};
|
|
69
63
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* ProjectSetup:本地 Agent 启动前项目结构准备模块。
|
|
3
3
|
*
|
|
4
4
|
* 关键点(中文)
|
|
5
|
-
* - 统一校验初始化必要文件(PROFILE.md
|
|
5
|
+
* - 统一校验初始化必要文件(PROFILE.md)。
|
|
6
6
|
* - 统一确保 `.downcity/*` 目录结构存在,避免调用方重复拼装目录逻辑。
|
|
7
7
|
*/
|
|
8
8
|
|
|
@@ -17,7 +17,6 @@ import {
|
|
|
17
17
|
getDowncityDataDirPath,
|
|
18
18
|
getDowncityDebugDirPath,
|
|
19
19
|
getDowncityDirPath,
|
|
20
|
-
getDowncityJsonPath,
|
|
21
20
|
getDowncityProfileDirPath,
|
|
22
21
|
getDowncityPublicDirPath,
|
|
23
22
|
getDowncityTasksDirPath,
|
|
@@ -35,12 +34,6 @@ function ensureContextFiles(projectRoot: string): void {
|
|
|
35
34
|
process.exit(1);
|
|
36
35
|
}
|
|
37
36
|
|
|
38
|
-
if (!fs.existsSync(getDowncityJsonPath(projectRoot))) {
|
|
39
|
-
console.error(
|
|
40
|
-
'❌ downcity.json does not exist. Please run "downcity agent create" first',
|
|
41
|
-
);
|
|
42
|
-
process.exit(1);
|
|
43
|
-
}
|
|
44
37
|
}
|
|
45
38
|
|
|
46
39
|
/**
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import type { LanguageModel, Tool } from "ai";
|
|
11
|
-
import type {
|
|
11
|
+
import type { Plugin } from "@/types/plugin/PluginDefinition.js";
|
|
12
12
|
import { AgentContext } from "@/types/runtime/agent/AgentContext.js";
|
|
13
13
|
import type { DowncityConfig } from "@/types/config/DowncityConfig.js";
|
|
14
14
|
import type { AgentPlugins } from "@/plugin/types/Plugin.js";
|
|
@@ -101,7 +101,7 @@ export interface AgentAssemblyResult {
|
|
|
101
101
|
/**
|
|
102
102
|
* 当前 plugin 实例集合。
|
|
103
103
|
*/
|
|
104
|
-
plugin_instances: Map<string,
|
|
104
|
+
plugin_instances: Map<string, Plugin>;
|
|
105
105
|
|
|
106
106
|
/**
|
|
107
107
|
* 当前 plugin 注册表。
|
|
@@ -165,16 +165,15 @@ export class AgentAssemblyService {
|
|
|
165
165
|
const env = resolveAgentEnv(path, this.options.env);
|
|
166
166
|
const instruction = normalizeInstructionInput(this.options.instruction);
|
|
167
167
|
const config = this.load_config(id, path);
|
|
168
|
-
const plugin_instances = new Map<string,
|
|
169
|
-
|
|
170
|
-
this.register_plugins(plugin_instances, this.options.plugins || []);
|
|
168
|
+
const plugin_instances = new Map<string, Plugin>();
|
|
171
169
|
|
|
172
170
|
// 关键点(中文)
|
|
173
171
|
// - plugin_registry 仍然延迟读取 agent_context(避免循环依赖)。
|
|
174
172
|
// - context 一构造完就赋值,registry 第一次读 get_context 时已经是非空。
|
|
175
173
|
let agent_context: AgentContext | undefined;
|
|
176
174
|
const plugin_registry = createAgentPluginRegistry({
|
|
177
|
-
plugins: [
|
|
175
|
+
plugins: this.options.plugins || [],
|
|
176
|
+
plugin_instances,
|
|
178
177
|
get_context: () => {
|
|
179
178
|
if (!agent_context) {
|
|
180
179
|
throw new Error("AgentContext is not assembled yet");
|
|
@@ -248,6 +247,13 @@ export class AgentAssemblyService {
|
|
|
248
247
|
}
|
|
249
248
|
|
|
250
249
|
private load_config(agent_id: string, project_root: string): DowncityConfig {
|
|
250
|
+
if (this.options.config) {
|
|
251
|
+
return {
|
|
252
|
+
...this.options.config,
|
|
253
|
+
id: String(this.options.config.id || "").trim() || agent_id,
|
|
254
|
+
version: String(this.options.config.version || "").trim() || "1.0.0",
|
|
255
|
+
};
|
|
256
|
+
}
|
|
251
257
|
try {
|
|
252
258
|
return loadDowncityConfig(project_root);
|
|
253
259
|
} catch {
|
|
@@ -255,27 +261,11 @@ export class AgentAssemblyService {
|
|
|
255
261
|
}
|
|
256
262
|
}
|
|
257
263
|
|
|
258
|
-
private register_plugins(
|
|
259
|
-
plugin_instances: Map<string, BasePlugin>,
|
|
260
|
-
plugins: BasePlugin[],
|
|
261
|
-
): void {
|
|
262
|
-
for (const plugin of plugins) {
|
|
263
|
-
const name = String(plugin?.name || "").trim();
|
|
264
|
-
if (!name) {
|
|
265
|
-
throw new Error("Agent received a plugin without a valid name");
|
|
266
|
-
}
|
|
267
|
-
if (plugin_instances.has(name)) {
|
|
268
|
-
throw new Error(`Duplicate plugin registration: ${name}`);
|
|
269
|
-
}
|
|
270
|
-
plugin_instances.set(name, plugin);
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
|
|
274
264
|
/**
|
|
275
265
|
* 判断是否需要自动注册 plugin_call tool。
|
|
276
266
|
*/
|
|
277
267
|
private should_register_plugin_call_tool(
|
|
278
|
-
plugin_instances: Map<string,
|
|
268
|
+
plugin_instances: Map<string, Plugin>,
|
|
279
269
|
): boolean {
|
|
280
270
|
for (const plugin of plugin_instances.values()) {
|
|
281
271
|
if (
|
|
@@ -11,7 +11,6 @@ import type { AgentContext } from "@/types/runtime/agent/AgentContext.js";
|
|
|
11
11
|
import type { Logger } from "@/utils/logger/Logger.js";
|
|
12
12
|
import type { ActionScheduleRuntimeHandle } from "@/plugin/core/ActionScheduleRuntime.js";
|
|
13
13
|
import { startActionScheduleRuntime } from "@/plugin/core/ActionScheduleRuntime.js";
|
|
14
|
-
import { startAllPlugins, stopAllPlugins } from "@/plugin/core/Manager.js";
|
|
15
14
|
import type { Shell } from "@downcity/shell";
|
|
16
15
|
|
|
17
16
|
type AgentBackgroundServiceOptions = {
|
|
@@ -73,7 +72,7 @@ export class AgentBackgroundService {
|
|
|
73
72
|
}
|
|
74
73
|
if (this.plugins_started) {
|
|
75
74
|
await this.stop_action_schedule_runtime();
|
|
76
|
-
await
|
|
75
|
+
await this.agent_context.plugins.unregisterAll();
|
|
77
76
|
this.plugins_started = false;
|
|
78
77
|
}
|
|
79
78
|
await this.get_shell?.()?.dispose();
|
|
@@ -85,12 +84,12 @@ export class AgentBackgroundService {
|
|
|
85
84
|
|
|
86
85
|
private async ensure_plugins_started(): Promise<void> {
|
|
87
86
|
if (this.plugins_started) return;
|
|
88
|
-
const
|
|
87
|
+
const snapshots = await this.agent_context.plugins.startAll();
|
|
89
88
|
this.plugins_started = true;
|
|
90
|
-
for (const item of
|
|
91
|
-
if (
|
|
89
|
+
for (const item of snapshots) {
|
|
90
|
+
if (item.status === "error") {
|
|
92
91
|
this.logger.error(
|
|
93
|
-
`Plugin start failed: ${item.
|
|
92
|
+
`Plugin start failed: ${item.name} - ${item.last_error || "unknown error"}`,
|
|
94
93
|
);
|
|
95
94
|
}
|
|
96
95
|
}
|