@downcity/agent 1.1.212 → 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/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/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/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
package/src/index.ts
CHANGED
|
@@ -146,11 +146,6 @@ export type {
|
|
|
146
146
|
SessionComposerOptions,
|
|
147
147
|
} from "./types/session/SessionComposerOptions.js";
|
|
148
148
|
export { transformPromptsIntoSystemMessages } from "./executor/composer/system/default/PromptRenderer.js";
|
|
149
|
-
export {
|
|
150
|
-
loadStaticSystemPrompts,
|
|
151
|
-
StaticPromptCatalog,
|
|
152
|
-
} from "./executor/composer/system/default/StaticPromptCatalog.js";
|
|
153
|
-
|
|
154
149
|
// 通用 plugin 宿主工具
|
|
155
150
|
export {
|
|
156
151
|
buildStaticPluginAvailability,
|
|
@@ -198,10 +193,12 @@ export type {
|
|
|
198
193
|
// 项目与配置集成
|
|
199
194
|
export {
|
|
200
195
|
initializeAgentProject,
|
|
201
|
-
isAgentProjectInitialized,
|
|
202
196
|
normalizeDefaultAgentId,
|
|
203
197
|
} from "./config/AgentInitializer.js";
|
|
204
|
-
export {
|
|
198
|
+
export {
|
|
199
|
+
load_project_dotenv,
|
|
200
|
+
resolve_agent_env,
|
|
201
|
+
} from "./config/AgentEnv.js";
|
|
205
202
|
export {
|
|
206
203
|
getDowncityChatHistoryPath,
|
|
207
204
|
getDowncitySessionMessagesPath,
|
|
@@ -238,7 +235,14 @@ export type {
|
|
|
238
235
|
export type { ExecutionBindingConfig } from "./types/config/ExecutionBinding.js";
|
|
239
236
|
|
|
240
237
|
// 配置与模型类型
|
|
241
|
-
export type {
|
|
238
|
+
export type {
|
|
239
|
+
DowncityChatChannelConfig,
|
|
240
|
+
DowncityChatPluginChannelsConfig,
|
|
241
|
+
DowncityChatPluginConfig,
|
|
242
|
+
DowncityChatPluginQueueConfig,
|
|
243
|
+
DowncityConfig,
|
|
244
|
+
DowncityPluginConfigMap,
|
|
245
|
+
} from "./types/config/DowncityConfig.js";
|
|
242
246
|
export type {
|
|
243
247
|
LlmConfig,
|
|
244
248
|
LlmModelConfig,
|
|
@@ -266,14 +270,6 @@ export type {
|
|
|
266
270
|
|
|
267
271
|
export type {
|
|
268
272
|
PlatformAgentChatChannelStatus,
|
|
269
|
-
PlatformAgentShipChatChannelsConfig,
|
|
270
|
-
PlatformAgentShipChatPluginConfig,
|
|
271
|
-
PlatformAgentShipExecutionAgentConfig,
|
|
272
|
-
PlatformAgentShipExecutionConfig,
|
|
273
|
-
PlatformAgentShipJson,
|
|
274
|
-
PlatformAgentShipPluginsConfig,
|
|
275
|
-
PlatformAgentShipSingleChannelConfig,
|
|
276
|
-
PlatformAgentShipStartConfig,
|
|
277
273
|
} from "./types/runtime/platform/PlatformGateway.js";
|
|
278
274
|
|
|
279
275
|
// Inline instant 协议类型
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
import path from "node:path";
|
|
11
11
|
import { logger as defaultLogger } from "@/utils/logger/Logger.js";
|
|
12
|
-
import {
|
|
12
|
+
import { resolve_agent_env } from "@/config/AgentEnv.js";
|
|
13
13
|
import { findPluginByName } from "@/plugin/core/PluginCatalog.js";
|
|
14
14
|
import {
|
|
15
15
|
createAgentPathRuntime,
|
|
@@ -39,7 +39,7 @@ export function createLocalPluginCommandContext(
|
|
|
39
39
|
): PluginCommandContext {
|
|
40
40
|
const projectRoot = typeof input === "string" ? input : input.projectRoot;
|
|
41
41
|
const rootPath = path.resolve(String(projectRoot || "").trim() || ".");
|
|
42
|
-
const env =
|
|
42
|
+
const env = resolve_agent_env(rootPath);
|
|
43
43
|
const config = typeof input === "string" || !input.config
|
|
44
44
|
? createFallbackSdkConfig(path.basename(rootPath) || "agent")
|
|
45
45
|
: input.config;
|
|
@@ -11,6 +11,7 @@ import type { Shell } from "@downcity/shell";
|
|
|
11
11
|
import type { Plugin } from "@/types/plugin/PluginDefinition.js";
|
|
12
12
|
import type { AgentModel } from "@/model/CityModelAdapter.js";
|
|
13
13
|
import type { DowncityConfig } from "@/types/config/DowncityConfig.js";
|
|
14
|
+
import type { AgentPluginConfigRuntime } from "@/types/agent/AgentRuntimeAssembly.js";
|
|
14
15
|
import type {
|
|
15
16
|
AgentManagedSession,
|
|
16
17
|
SessionOptions,
|
|
@@ -66,7 +67,7 @@ export interface AgentOptions {
|
|
|
66
67
|
*
|
|
67
68
|
* 关键点(中文)
|
|
68
69
|
* - `instruction` 是稳定、缓存友好的 system 前缀,不做动态变量替换。
|
|
69
|
-
* -
|
|
70
|
+
* - 项目目录不再提供隐式 prompt 文件;调用方需要的指令必须显式传入。
|
|
70
71
|
* - 未传入时,SDK 会使用包内最小 core instruction 作为 fallback。
|
|
71
72
|
*/
|
|
72
73
|
instruction?: string | string[];
|
|
@@ -116,8 +117,17 @@ export interface AgentOptions {
|
|
|
116
117
|
* 宿主显式传入的运行时配置。
|
|
117
118
|
*
|
|
118
119
|
* 关键点(中文)
|
|
119
|
-
* - SDK
|
|
120
|
-
* - CLI / Console
|
|
120
|
+
* - SDK 不读取项目配置文件。
|
|
121
|
+
* - CLI / Console 从自己的全局配置存储读取后传入这里。
|
|
121
122
|
*/
|
|
122
123
|
config?: DowncityConfig;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* 宿主提供的 plugin 配置持久化能力。
|
|
127
|
+
*
|
|
128
|
+
* 关键点(中文)
|
|
129
|
+
* - SDK 默认会拒绝持久化操作;CLI 等宿主可在这里接入自己的全局数据库。
|
|
130
|
+
* - plugin 只依赖该稳定接口,不感知 SQLite、文件或远端服务等具体实现。
|
|
131
|
+
*/
|
|
132
|
+
plugin_config?: AgentPluginConfigRuntime;
|
|
123
133
|
}
|
|
@@ -74,20 +74,6 @@ export interface DowncityChatPluginQueueConfig {
|
|
|
74
74
|
mergeMaxWaitMs?: number;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
/**
|
|
78
|
-
* 聊天插件出站控制配置。
|
|
79
|
-
*/
|
|
80
|
-
export interface DowncityChatPluginEgressConfig {
|
|
81
|
-
/**
|
|
82
|
-
* 单次 agent run 内,`chat_send` 允许调用的最大次数。
|
|
83
|
-
*/
|
|
84
|
-
chatSendMaxCallsPerRun?: number;
|
|
85
|
-
/**
|
|
86
|
-
* 是否启用 `chat_send` 幂等去重(基于 inbound messageId + 回复内容 hash)。
|
|
87
|
-
*/
|
|
88
|
-
chatSendIdempotency?: boolean;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
77
|
/**
|
|
92
78
|
* 聊天插件配置。
|
|
93
79
|
*/
|
|
@@ -96,10 +82,6 @@ export interface DowncityChatPluginConfig {
|
|
|
96
82
|
* Chat 调度队列(按 chatKey 分 lane)。
|
|
97
83
|
*/
|
|
98
84
|
queue?: DowncityChatPluginQueueConfig;
|
|
99
|
-
/**
|
|
100
|
-
* 出站(egress)控制:用于限制工具发送、避免重复与无限循环刷屏。
|
|
101
|
-
*/
|
|
102
|
-
egress?: DowncityChatPluginEgressConfig;
|
|
103
85
|
/**
|
|
104
86
|
* 消息平台 channel 配置。
|
|
105
87
|
*/
|
|
@@ -107,7 +89,7 @@ export interface DowncityChatPluginConfig {
|
|
|
107
89
|
}
|
|
108
90
|
|
|
109
91
|
/**
|
|
110
|
-
*
|
|
92
|
+
* Agent 全局配置中的插件配置映射。
|
|
111
93
|
*/
|
|
112
94
|
export interface DowncityPluginConfigMap {
|
|
113
95
|
/**
|
|
@@ -124,7 +106,6 @@ export interface DowncityPluginConfigMap {
|
|
|
124
106
|
}
|
|
125
107
|
|
|
126
108
|
export interface DowncityConfig {
|
|
127
|
-
$schema?: string;
|
|
128
109
|
/**
|
|
129
110
|
* agent 唯一标识。
|
|
130
111
|
*
|
|
@@ -147,7 +128,7 @@ export interface DowncityConfig {
|
|
|
147
128
|
*
|
|
148
129
|
* 关键点(中文)
|
|
149
130
|
* - 所有可配置能力统一收敛到 `plugins`,不再保留独立 `services` 域。
|
|
150
|
-
* -
|
|
131
|
+
* - 需要持久化的 plugin 配置(例如 `plugins.chat.channels`)由宿主写入全局配置存储。
|
|
151
132
|
* - key 为 plugin 名称,value 为对应插件的结构化配置对象。
|
|
152
133
|
* - 当前阶段允许各 plugin 自定义字段,但必须保持 JSON 可序列化。
|
|
153
134
|
*/
|
|
@@ -166,7 +147,7 @@ export interface DowncityConfig {
|
|
|
166
147
|
* 关键点(中文)
|
|
167
148
|
* - `@downcity/agent` 本地 SDK 不直接消费该字段。
|
|
168
149
|
* - 宿主侧(例如 `downcity`)可读取该字段控制模型工厂行为,例如 `llm.logMessages`。
|
|
169
|
-
* -
|
|
150
|
+
* - 该字段通常由宿主平台装配,不由 Agent SDK 解析。
|
|
170
151
|
*/
|
|
171
152
|
llm?: LlmConfig;
|
|
172
153
|
}
|
|
@@ -17,7 +17,7 @@ export interface PlatformAgentOption {
|
|
|
17
17
|
id: string;
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* Agent 全局配置中的稳定标识。
|
|
21
21
|
*/
|
|
22
22
|
agentId: string;
|
|
23
23
|
|
|
@@ -90,7 +90,7 @@ export interface PlatformAgentOption {
|
|
|
90
90
|
}>;
|
|
91
91
|
|
|
92
92
|
/**
|
|
93
|
-
* 当前
|
|
93
|
+
* 当前 Agent 全局配置绑定的模型 ID。
|
|
94
94
|
*/
|
|
95
95
|
modelId?: string;
|
|
96
96
|
}
|
|
@@ -154,16 +154,6 @@ export interface PlatformAgentDirectoryInspection {
|
|
|
154
154
|
*/
|
|
155
155
|
initialized: boolean;
|
|
156
156
|
|
|
157
|
-
/**
|
|
158
|
-
* `downcity.json` 是否存在。
|
|
159
|
-
*/
|
|
160
|
-
hasShipJson: boolean;
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* `PROFILE.md` 是否存在。
|
|
164
|
-
*/
|
|
165
|
-
hasProfileMd: boolean;
|
|
166
|
-
|
|
167
157
|
/** 该目录是否已出现在 managed agent registry 中。 */
|
|
168
158
|
knownAgent: boolean;
|
|
169
159
|
|
|
@@ -266,7 +256,7 @@ export interface ControlPlaneRuntimeStatus {
|
|
|
266
256
|
*/
|
|
267
257
|
export interface PlatformConfigFileStatusItem {
|
|
268
258
|
/**
|
|
269
|
-
*
|
|
259
|
+
* 配置状态逻辑名称(例如 `agent_config`、`control_plane_pid`)。
|
|
270
260
|
*/
|
|
271
261
|
key: string;
|
|
272
262
|
|
|
@@ -336,7 +326,7 @@ export interface PlatformConfigStatusResponse {
|
|
|
336
326
|
selectedAgentId: string;
|
|
337
327
|
|
|
338
328
|
/**
|
|
339
|
-
* 当前选中的
|
|
329
|
+
* 当前选中的 Agent 配置 id(可能为空)。
|
|
340
330
|
*/
|
|
341
331
|
selectedAgentProjectId: string;
|
|
342
332
|
|
|
@@ -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
|
|