@downcity/agent 1.1.210 → 1.1.215
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/README.md +3 -3
- package/bin/agent/local/AgentRuntimeAssembly.d.ts.map +1 -1
- package/bin/agent/local/AgentRuntimeAssembly.js +2 -2
- package/bin/agent/local/AgentRuntimeAssembly.js.map +1 -1
- package/bin/agent/local/ProjectSetup.d.ts +0 -1
- package/bin/agent/local/ProjectSetup.d.ts.map +1 -1
- package/bin/agent/local/ProjectSetup.js +4 -17
- package/bin/agent/local/ProjectSetup.js.map +1 -1
- package/bin/agent/local/services/AgentAssemblyService.d.ts.map +1 -1
- package/bin/agent/local/services/AgentAssemblyService.js +6 -11
- package/bin/agent/local/services/AgentAssemblyService.js.map +1 -1
- package/bin/config/AgentEnv.d.ts +9 -0
- package/bin/config/AgentEnv.d.ts.map +1 -0
- package/bin/config/AgentEnv.js +48 -0
- package/bin/config/AgentEnv.js.map +1 -0
- package/bin/config/AgentInitializer.d.ts +2 -10
- package/bin/config/AgentInitializer.d.ts.map +1 -1
- package/bin/config/AgentInitializer.js +17 -49
- package/bin/config/AgentInitializer.js.map +1 -1
- package/bin/config/EnvFile.d.ts +1 -1
- package/bin/config/EnvFile.js +1 -1
- package/bin/config/ExecutionBinding.d.ts +1 -1
- package/bin/config/ExecutionBinding.js +2 -2
- package/bin/config/ExecutionBinding.js.map +1 -1
- package/bin/config/Paths.d.ts +0 -66
- package/bin/config/Paths.d.ts.map +1 -1
- package/bin/config/Paths.js +0 -80
- package/bin/config/Paths.js.map +1 -1
- package/bin/index.d.ts +4 -5
- package/bin/index.d.ts.map +1 -1
- package/bin/index.js +2 -3
- package/bin/index.js.map +1 -1
- package/bin/plugin/core/PluginLocalExecution.js +2 -2
- package/bin/plugin/core/PluginLocalExecution.js.map +1 -1
- package/bin/session/runtime/SessionPromptRuntime.d.ts +14 -0
- package/bin/session/runtime/SessionPromptRuntime.d.ts.map +1 -1
- package/bin/session/runtime/SessionPromptRuntime.js +11 -0
- package/bin/session/runtime/SessionPromptRuntime.js.map +1 -1
- package/bin/session/services/SessionTurnService.d.ts.map +1 -1
- package/bin/session/services/SessionTurnService.js +9 -0
- package/bin/session/services/SessionTurnService.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/common/EnvFile.d.ts +1 -1
- package/bin/types/common/EnvFile.js +1 -1
- package/bin/types/config/DowncityConfig.d.ts +3 -21
- package/bin/types/config/DowncityConfig.d.ts.map +1 -1
- package/bin/types/config/ExecutionBinding.d.ts +1 -1
- package/bin/types/config/ExecutionBinding.js +1 -1
- package/bin/types/runtime/platform/Platform.d.ts +4 -12
- package/bin/types/runtime/platform/Platform.d.ts.map +1 -1
- package/bin/types/runtime/platform/PlatformGateway.d.ts +2 -122
- package/bin/types/runtime/platform/PlatformGateway.d.ts.map +1 -1
- package/bin/types/runtime/platform/PlatformGateway.js +0 -7
- package/bin/types/runtime/platform/PlatformGateway.js.map +1 -1
- package/bin/utils/logger/FormatRequest.js +1 -1
- package/bin/utils/logger/FormatRequest.js.map +1 -1
- package/package.json +3 -3
- package/scripts/agent-env.test.mjs +101 -0
- package/scripts/session-prompt-runtime.test.mjs +22 -0
- package/src/agent/local/AgentRuntimeAssembly.ts +4 -2
- package/src/agent/local/ProjectSetup.ts +3 -22
- package/src/agent/local/services/AgentAssemblyService.ts +6 -10
- package/src/config/AgentEnv.ts +49 -0
- package/src/config/AgentInitializer.ts +18 -61
- package/src/config/EnvFile.ts +1 -1
- package/src/config/ExecutionBinding.ts +2 -2
- package/src/config/Paths.ts +0 -89
- package/src/index.ts +12 -16
- package/src/plugin/core/PluginLocalExecution.ts +2 -2
- package/src/session/runtime/SessionPromptRuntime.ts +29 -4
- package/src/session/services/SessionTurnService.ts +9 -0
- package/src/types/agent/AgentOptions.ts +13 -3
- package/src/types/common/EnvFile.ts +1 -1
- package/src/types/config/DowncityConfig.ts +3 -22
- package/src/types/config/ExecutionBinding.ts +1 -1
- package/src/types/runtime/platform/Platform.ts +4 -14
- package/src/types/runtime/platform/PlatformGateway.ts +2 -138
- package/src/utils/logger/FormatRequest.ts +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/bin/config/Config.d.ts +0 -27
- package/bin/config/Config.d.ts.map +0 -1
- package/bin/config/Config.js +0 -128
- package/bin/config/Config.js.map +0 -1
- package/bin/executor/composer/system/default/InitPromptAssets.d.ts +0 -16
- package/bin/executor/composer/system/default/InitPromptAssets.d.ts.map +0 -1
- package/bin/executor/composer/system/default/InitPromptAssets.js +0 -18
- package/bin/executor/composer/system/default/InitPromptAssets.js.map +0 -1
- package/bin/executor/composer/system/default/InitPrompts.d.ts +0 -9
- package/bin/executor/composer/system/default/InitPrompts.d.ts.map +0 -1
- package/bin/executor/composer/system/default/InitPrompts.js +0 -9
- package/bin/executor/composer/system/default/InitPrompts.js.map +0 -1
- package/bin/executor/composer/system/default/StaticPromptCatalog.d.ts +0 -50
- package/bin/executor/composer/system/default/StaticPromptCatalog.d.ts.map +0 -1
- package/bin/executor/composer/system/default/StaticPromptCatalog.js +0 -227
- package/bin/executor/composer/system/default/StaticPromptCatalog.js.map +0 -1
- package/bin/executor/composer/system/default/assets/init/PROFILE.md.d.ts +0 -7
- package/bin/executor/composer/system/default/assets/init/PROFILE.md.d.ts.map +0 -1
- package/bin/executor/composer/system/default/assets/init/PROFILE.md.js +0 -8
- package/bin/executor/composer/system/default/assets/init/PROFILE.md.js.map +0 -1
- package/bin/executor/composer/system/default/assets/init/SOUL.md.d.ts +0 -7
- package/bin/executor/composer/system/default/assets/init/SOUL.md.d.ts.map +0 -1
- package/bin/executor/composer/system/default/assets/init/SOUL.md.js +0 -8
- package/bin/executor/composer/system/default/assets/init/SOUL.md.js.map +0 -1
- package/src/config/Config.ts +0 -146
- package/src/executor/composer/system/default/InitPromptAssets.ts +0 -20
- package/src/executor/composer/system/default/InitPrompts.ts +0 -11
- package/src/executor/composer/system/default/StaticPromptCatalog.ts +0 -291
- package/src/executor/composer/system/default/assets/init/PROFILE.md.ts +0 -9
- package/src/executor/composer/system/default/assets/init/PROFILE.md.ts.txt +0 -16
- package/src/executor/composer/system/default/assets/init/SOUL.md.ts +0 -9
- package/src/executor/composer/system/default/assets/init/SOUL.md.ts.txt +0 -87
|
@@ -1,146 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 平台控制面读取
|
|
2
|
+
* 平台控制面读取 Agent runtime 状态时使用的宽松类型。
|
|
3
3
|
*
|
|
4
4
|
* 关键点(中文)
|
|
5
5
|
* - 仅承载平台 gateway / control plane 内部使用的结构化类型。
|
|
6
|
-
* -
|
|
6
|
+
* - 所有字段保持宽松输入,便于兼容运行时 API 的非强约束数据。
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* downcity.json 中的 ACP agent 配置。
|
|
11
|
-
*/
|
|
12
|
-
export interface PlatformAgentShipExecutionAgentConfig {
|
|
13
|
-
/**
|
|
14
|
-
* ACP agent 类型。
|
|
15
|
-
*/
|
|
16
|
-
type?: unknown;
|
|
17
|
-
/**
|
|
18
|
-
* 自定义启动命令。
|
|
19
|
-
*/
|
|
20
|
-
command?: unknown;
|
|
21
|
-
/**
|
|
22
|
-
* 自定义启动参数。
|
|
23
|
-
*/
|
|
24
|
-
args?: unknown;
|
|
25
|
-
/**
|
|
26
|
-
* 自定义环境变量。
|
|
27
|
-
*/
|
|
28
|
-
env?: unknown;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* downcity.json 中的 execution 配置。
|
|
33
|
-
*/
|
|
34
|
-
export interface PlatformAgentShipExecutionConfig {
|
|
35
|
-
/**
|
|
36
|
-
* 执行模式。
|
|
37
|
-
*/
|
|
38
|
-
type?: unknown;
|
|
39
|
-
/**
|
|
40
|
-
* 模型执行模式下的模型 ID。
|
|
41
|
-
*/
|
|
42
|
-
modelId?: unknown;
|
|
43
|
-
/**
|
|
44
|
-
* ACP 执行模式下的 agent 配置。
|
|
45
|
-
*/
|
|
46
|
-
agent?: PlatformAgentShipExecutionAgentConfig;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* 单个聊天渠道配置。
|
|
51
|
-
*/
|
|
52
|
-
export interface PlatformAgentShipSingleChannelConfig {
|
|
53
|
-
/**
|
|
54
|
-
* 渠道是否启用。
|
|
55
|
-
*/
|
|
56
|
-
enabled?: unknown;
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* 绑定的渠道账户 id。
|
|
60
|
-
*/
|
|
61
|
-
channelAccountId?: unknown;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* 聊天插件渠道配置集合。
|
|
66
|
-
*/
|
|
67
|
-
export interface PlatformAgentShipChatChannelsConfig {
|
|
68
|
-
/**
|
|
69
|
-
* Telegram 渠道配置。
|
|
70
|
-
*/
|
|
71
|
-
telegram?: PlatformAgentShipSingleChannelConfig;
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* 飞书渠道配置。
|
|
75
|
-
*/
|
|
76
|
-
feishu?: PlatformAgentShipSingleChannelConfig;
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* QQ 渠道配置。
|
|
80
|
-
*/
|
|
81
|
-
qq?: PlatformAgentShipSingleChannelConfig;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* 聊天插件配置。
|
|
86
|
-
*/
|
|
87
|
-
export interface PlatformAgentShipChatPluginConfig {
|
|
88
|
-
/**
|
|
89
|
-
* 渠道配置集合。
|
|
90
|
-
*/
|
|
91
|
-
channels?: PlatformAgentShipChatChannelsConfig;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* downcity.json 中的 plugins 配置。
|
|
96
|
-
*/
|
|
97
|
-
export interface PlatformAgentShipPluginsConfig {
|
|
98
|
-
/**
|
|
99
|
-
* chat 插件配置。
|
|
100
|
-
*/
|
|
101
|
-
chat?: PlatformAgentShipChatPluginConfig;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* downcity.json 中的启动配置。
|
|
106
|
-
*/
|
|
107
|
-
export interface PlatformAgentShipStartConfig {
|
|
108
|
-
/**
|
|
109
|
-
* downcity Agent HTTP gateway host。
|
|
110
|
-
*/
|
|
111
|
-
host?: unknown;
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* downcity Agent HTTP gateway port。
|
|
115
|
-
*/
|
|
116
|
-
port?: unknown;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* downcity.json 宽松结构。
|
|
121
|
-
*/
|
|
122
|
-
export interface PlatformAgentShipJson {
|
|
123
|
-
/**
|
|
124
|
-
* agent 稳定标识。
|
|
125
|
-
*/
|
|
126
|
-
id?: unknown;
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* 执行配置。
|
|
130
|
-
*/
|
|
131
|
-
execution?: PlatformAgentShipExecutionConfig;
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* 插件配置。
|
|
135
|
-
*/
|
|
136
|
-
plugins?: PlatformAgentShipPluginsConfig;
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* 启动配置。
|
|
140
|
-
*/
|
|
141
|
-
start?: PlatformAgentShipStartConfig;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
8
|
/**
|
|
145
9
|
* chat plugin status 返回中的单渠道状态。
|
|
146
10
|
*/
|
|
@@ -335,7 +335,7 @@ export function parseFetchRequestForLog(
|
|
|
335
335
|
} | null {
|
|
336
336
|
// 关键注释:这里的 maxChars 不用于“整体截断请求日志”,仅作为 payload 兜底 stringify 的保护上限。
|
|
337
337
|
const maxChars = 12000;
|
|
338
|
-
//
|
|
338
|
+
// 统一开关:只由宿主配置的 llm.logMessages 控制(由宿主模型工厂读取)。
|
|
339
339
|
// 这里不支持额外的“更敏感 payload”开关,避免不一致与误配置。
|
|
340
340
|
const includePayload = false;
|
|
341
341
|
|