@downcity/agent 1.1.51 → 1.1.62
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 +5 -4
- package/bin/agent/Agent.d.ts.map +1 -1
- package/bin/agent/Agent.js.map +1 -1
- package/bin/config/AgentInitializer.d.ts +1 -1
- package/bin/config/AgentInitializer.js +1 -1
- package/bin/config/DowncitySchema.js +1 -1
- package/bin/config/DowncitySchema.js.map +1 -1
- package/bin/config/ExecutionBinding.d.ts +1 -1
- package/bin/config/ExecutionBinding.js +1 -1
- package/bin/executor/composer/compaction/jsonl/JsonlSessionCompactionExecutor.d.ts.map +1 -1
- package/bin/executor/composer/compaction/jsonl/JsonlSessionCompactionExecutor.js +0 -4
- package/bin/executor/composer/compaction/jsonl/JsonlSessionCompactionExecutor.js.map +1 -1
- package/bin/executor/composer/system/default/InitPrompts.d.ts +1 -1
- package/bin/executor/composer/system/default/InitPrompts.js +1 -1
- package/bin/executor/composer/system/default/SystemDomain.js +1 -1
- package/bin/executor/composer/system/default/assets/core.prompt.d.ts +1 -1
- package/bin/executor/composer/system/default/assets/core.prompt.js +1 -1
- package/bin/executor/composer/system/default/assets/plugin.prompt.d.ts +1 -1
- package/bin/executor/composer/system/default/assets/plugin.prompt.js +1 -1
- package/bin/executor/composer/system/default/assets/task.prompt.d.ts +1 -1
- package/bin/executor/composer/system/default/assets/task.prompt.js +1 -1
- package/bin/executor/messages/ChatMessageMarkupTypes.d.ts +1 -1
- package/bin/executor/messages/ChatMessageMarkupTypes.js +1 -1
- package/bin/executor/store/history/jsonl/JsonlSessionHistoryStore.d.ts +1 -2
- package/bin/executor/store/history/jsonl/JsonlSessionHistoryStore.d.ts.map +1 -1
- package/bin/executor/store/history/jsonl/JsonlSessionHistoryStore.js +17 -56
- package/bin/executor/store/history/jsonl/JsonlSessionHistoryStore.js.map +1 -1
- package/bin/executor/tools/shell/ShellToolBridge.js +1 -1
- package/bin/executor/tools/shell/ShellToolBridge.js.map +1 -1
- package/bin/executor/tools/shell/ShellToolDefinition.d.ts +2 -2
- package/bin/executor/tools/shell/ShellToolFormatting.d.ts +1 -1
- package/bin/executor/tools/shell/ShellToolFormatting.js +7 -7
- package/bin/executor/tools/shell/ShellToolFormatting.js.map +1 -1
- package/bin/executor/tools/shell/ShellToolSchemas.d.ts +7 -75
- package/bin/executor/tools/shell/ShellToolSchemas.d.ts.map +1 -1
- package/bin/executor/types/SessionHistoryMeta.d.ts +5 -24
- package/bin/executor/types/SessionHistoryMeta.d.ts.map +1 -1
- package/bin/executor/types/SessionHistoryMeta.js +1 -1
- package/bin/index.d.ts +3 -2
- package/bin/index.d.ts.map +1 -1
- package/bin/index.js +1 -0
- package/bin/index.js.map +1 -1
- package/bin/model/CityModelAdapter.d.ts +23 -0
- package/bin/model/CityModelAdapter.d.ts.map +1 -0
- package/bin/model/CityModelAdapter.js +338 -0
- package/bin/model/CityModelAdapter.js.map +1 -0
- package/bin/runtime/host/daemon/Paths.d.ts +1 -1
- package/bin/runtime/host/daemon/Paths.js +1 -1
- package/bin/runtime/host/daemon/ProjectSetup.js +2 -2
- package/bin/session/Session.d.ts +1 -0
- package/bin/session/Session.d.ts.map +1 -1
- package/bin/session/Session.js +32 -6
- package/bin/session/Session.js.map +1 -1
- package/bin/session/SessionTitle.d.ts +49 -0
- package/bin/session/SessionTitle.d.ts.map +1 -0
- package/bin/session/SessionTitle.js +130 -0
- package/bin/session/SessionTitle.js.map +1 -0
- package/bin/session/browse/Browse.d.ts +2 -1
- package/bin/session/browse/Browse.d.ts.map +1 -1
- package/bin/session/browse/Browse.js +18 -15
- package/bin/session/browse/Browse.js.map +1 -1
- package/bin/session/index.d.ts +2 -1
- package/bin/session/index.d.ts.map +1 -1
- package/bin/session/index.js +2 -1
- package/bin/session/index.js.map +1 -1
- package/bin/session/storage/Metadata.d.ts +4 -0
- package/bin/session/storage/Metadata.d.ts.map +1 -1
- package/bin/session/storage/Metadata.js +12 -25
- package/bin/session/storage/Metadata.js.map +1 -1
- package/bin/session/storage/Persistence.d.ts.map +1 -1
- package/bin/session/storage/Persistence.js +1 -4
- package/bin/session/storage/Persistence.js.map +1 -1
- package/bin/types/agent/AgentTypes.d.ts +9 -5
- package/bin/types/agent/AgentTypes.d.ts.map +1 -1
- package/bin/types/config/AgentProject.d.ts +1 -1
- package/bin/types/config/DowncityConfig.d.ts +3 -3
- package/bin/types/config/ExecutionBinding.d.ts +4 -4
- package/bin/types/config/ExecutionBinding.js +1 -1
- package/bin/types/runtime/auth/AuthPermission.js +2 -2
- package/bin/types/runtime/auth/AuthPermission.js.map +1 -1
- package/bin/types/runtime/host/Store.d.ts +3 -177
- package/bin/types/runtime/host/Store.d.ts.map +1 -1
- package/bin/types/runtime/host/Store.js +7 -0
- package/bin/types/runtime/host/Store.js.map +1 -1
- package/bin/types/runtime/http/InlineInstant.d.ts +1 -1
- package/bin/types/runtime/platform/Platform.d.ts +1 -1
- package/package.json +19 -18
- package/src/agent/Agent.ts +3 -2
- package/src/config/AgentInitializer.ts +1 -1
- package/src/config/DowncitySchema.ts +1 -1
- package/src/config/ExecutionBinding.ts +1 -1
- package/src/executor/composer/compaction/jsonl/JsonlSessionCompactionExecutor.ts +0 -4
- package/src/executor/composer/system/default/InitPrompts.ts +1 -1
- package/src/executor/composer/system/default/SystemDomain.ts +1 -1
- 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/executor/composer/system/default/assets/plugin.prompt.ts +1 -1
- package/src/executor/composer/system/default/assets/plugin.prompt.ts.txt +18 -18
- package/src/executor/composer/system/default/assets/task.prompt.ts +1 -1
- package/src/executor/composer/system/default/assets/task.prompt.ts.txt +1 -1
- package/src/executor/messages/ChatMessageMarkupTypes.ts +1 -1
- package/src/executor/store/history/jsonl/JsonlSessionHistoryStore.ts +17 -57
- package/src/executor/tools/shell/ShellToolBridge.ts +1 -1
- package/src/executor/tools/shell/ShellToolFormatting.ts +7 -7
- package/src/executor/types/SessionHistoryMeta.ts +5 -25
- package/src/index.ts +5 -5
- package/src/model/CityModelAdapter.ts +384 -0
- package/src/runtime/host/daemon/Paths.ts +1 -1
- package/src/runtime/host/daemon/ProjectSetup.ts +2 -2
- package/src/session/Session.ts +40 -6
- package/src/session/SessionTitle.ts +192 -0
- package/src/session/browse/Browse.ts +22 -13
- package/src/session/index.ts +5 -0
- package/src/session/storage/Metadata.ts +14 -29
- package/src/session/storage/Persistence.ts +1 -4
- package/src/types/agent/AgentTypes.ts +10 -5
- package/src/types/config/AgentProject.ts +1 -1
- package/src/types/config/DowncityConfig.ts +3 -3
- package/src/types/config/ExecutionBinding.ts +4 -4
- package/src/types/runtime/auth/AuthPermission.ts +2 -2
- package/src/types/runtime/host/Store.ts +3 -182
- package/src/types/runtime/http/InlineInstant.ts +1 -1
- package/src/types/runtime/platform/Platform.ts +1 -1
- package/tsconfig.json +1 -0
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -37,8 +37,8 @@ export const AUTH_PERMISSION_DESCRIPTIONS = {
|
|
|
37
37
|
"agent.execute": "触发 agent 执行与会话运行。",
|
|
38
38
|
"task.read": "查看 task 定义与运行结果。",
|
|
39
39
|
"task.run": "创建或手动执行 task。",
|
|
40
|
-
"model.read": "
|
|
41
|
-
"model.write": "
|
|
40
|
+
"model.read": "查看 City AIService 模型与模型绑定。",
|
|
41
|
+
"model.write": "修改模型绑定。",
|
|
42
42
|
"env.read": "查看环境变量配置。",
|
|
43
43
|
"env.write": "修改环境变量配置。",
|
|
44
44
|
"channel.read": "查看渠道账号与渠道状态。",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthPermission.js","sourceRoot":"","sources":["../../../../src/types/runtime/auth/AuthPermission.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,YAAY;IACZ,aAAa;IACb,eAAe;IACf,WAAW;IACX,UAAU;IACV,YAAY;IACZ,aAAa;IACb,UAAU;IACV,WAAW;IACX,cAAc;IACd,eAAe;IACf,WAAW;IACX,YAAY;IACZ,eAAe;IACf,cAAc;IACd,eAAe;IACf,aAAa;IACb,cAAc;CACN,CAAC;AAOX;;GAEG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAsC;IAC7E,YAAY,EAAE,qBAAqB;IACnC,aAAa,EAAE,kBAAkB;IACjC,eAAe,EAAE,mBAAmB;IACpC,WAAW,EAAE,kBAAkB;IAC/B,UAAU,EAAE,eAAe;IAC3B,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"AuthPermission.js","sourceRoot":"","sources":["../../../../src/types/runtime/auth/AuthPermission.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,YAAY;IACZ,aAAa;IACb,eAAe;IACf,WAAW;IACX,UAAU;IACV,YAAY;IACZ,aAAa;IACb,UAAU;IACV,WAAW;IACX,cAAc;IACd,eAAe;IACf,WAAW;IACX,YAAY;IACZ,eAAe;IACf,cAAc;IACd,eAAe;IACf,aAAa;IACb,cAAc;CACN,CAAC;AAOX;;GAEG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAsC;IAC7E,YAAY,EAAE,qBAAqB;IACnC,aAAa,EAAE,kBAAkB;IACjC,eAAe,EAAE,mBAAmB;IACpC,WAAW,EAAE,kBAAkB;IAC/B,UAAU,EAAE,eAAe;IAC3B,YAAY,EAAE,4BAA4B;IAC1C,aAAa,EAAE,SAAS;IACxB,UAAU,EAAE,WAAW;IACvB,WAAW,EAAE,WAAW;IACxB,cAAc,EAAE,cAAc;IAC9B,eAAe,EAAE,cAAc;IAC/B,WAAW,EAAE,yBAAyB;IACtC,YAAY,EAAE,yBAAyB;IACvC,eAAe,EAAE,cAAc;IAC/B,cAAc,EAAE,iBAAiB;IACjC,eAAe,EAAE,mBAAmB;IACpC,aAAa,EAAE,kBAAkB;IACjC,cAAc,EAAE,sBAAsB;CACvC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,QAAQ,CAAU,CAAC;AAyBhF;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAgC;IAC7D;QACE,IAAI,EAAE,OAAO;QACb,WAAW,EAAE,wBAAwB;QACrC,WAAW,EAAE,CAAC,GAAG,oBAAoB,CAAC;KACvC;IACD;QACE,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE,0BAA0B;QACvC,WAAW,EAAE,oBAAoB,CAAC,MAAM,CAAC,CAAC,UAAU,EAAE,EAAE,CACtD,UAAU,KAAK,YAAY,IAAI,UAAU,KAAK,WAAW,CAC1D;KACF;IACD;QACE,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,sBAAsB;QACnC,WAAW,EAAE;YACX,YAAY;YACZ,WAAW;YACX,YAAY;YACZ,UAAU;YACV,cAAc;YACd,WAAW;YACX,cAAc;YACd,aAAa;SACd;KACF;CACF,CAAC"}
|
|
@@ -1,188 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* 平台宿主存储类型定义。
|
|
3
3
|
*
|
|
4
4
|
* 关键点(中文)
|
|
5
|
-
* -
|
|
6
|
-
* -
|
|
5
|
+
* - Town 只保存平台级 env、channel account 与安全配置。
|
|
6
|
+
* - 模型能力由 City AIService 暴露,Town 不再声明 provider/model 存储类型。
|
|
7
7
|
*/
|
|
8
|
-
import type { LlmProviderType } from "../../../types/config/LlmConfig.js";
|
|
9
8
|
/**
|
|
10
9
|
* Channel Account 支持的渠道类型。
|
|
11
10
|
*/
|
|
12
11
|
export type StoredChannelAccountChannel = "telegram" | "feishu" | "qq";
|
|
13
|
-
/**
|
|
14
|
-
* 模型 provider 记录。
|
|
15
|
-
*/
|
|
16
|
-
export interface StoredModelProvider {
|
|
17
|
-
/**
|
|
18
|
-
* provider 主键 ID(例如:`openai_main`、`default`)。
|
|
19
|
-
*/
|
|
20
|
-
id: string;
|
|
21
|
-
/**
|
|
22
|
-
* provider 类型(决定 SDK 分支与默认网关行为)。
|
|
23
|
-
*/
|
|
24
|
-
type: LlmProviderType;
|
|
25
|
-
/**
|
|
26
|
-
* provider 基础地址(可选)。
|
|
27
|
-
*/
|
|
28
|
-
baseUrl?: string;
|
|
29
|
-
/**
|
|
30
|
-
* provider API Key(解密后的明文;仅在运行时内存中使用)。
|
|
31
|
-
*/
|
|
32
|
-
apiKey?: string;
|
|
33
|
-
/**
|
|
34
|
-
* 创建时间(ISO 字符串)。
|
|
35
|
-
*/
|
|
36
|
-
createdAt: string;
|
|
37
|
-
/**
|
|
38
|
-
* 更新时间(ISO 字符串)。
|
|
39
|
-
*/
|
|
40
|
-
updatedAt: string;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* provider 元信息。
|
|
44
|
-
*
|
|
45
|
-
* 关键点(中文)
|
|
46
|
-
* - 仅保留同步读取所需的轻量字段。
|
|
47
|
-
* - 不包含解密后的 API Key,避免在只读展示链路中泄露敏感信息。
|
|
48
|
-
*/
|
|
49
|
-
export interface StoredProviderMeta {
|
|
50
|
-
/**
|
|
51
|
-
* provider 主键 ID。
|
|
52
|
-
*/
|
|
53
|
-
id: string;
|
|
54
|
-
/**
|
|
55
|
-
* provider 类型。
|
|
56
|
-
*/
|
|
57
|
-
type: LlmProviderType;
|
|
58
|
-
/**
|
|
59
|
-
* provider 基础地址(可选)。
|
|
60
|
-
*/
|
|
61
|
-
baseUrl?: string;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* 模型记录。
|
|
65
|
-
*/
|
|
66
|
-
export interface StoredModel {
|
|
67
|
-
/**
|
|
68
|
-
* 模型主键 ID(例如:`default`、`fast`、`quality`)。
|
|
69
|
-
*/
|
|
70
|
-
id: string;
|
|
71
|
-
/**
|
|
72
|
-
* 关联 provider ID。
|
|
73
|
-
*/
|
|
74
|
-
providerId: string;
|
|
75
|
-
/**
|
|
76
|
-
* 上游模型名称(例如 `gpt-4o-mini`)。
|
|
77
|
-
*/
|
|
78
|
-
name: string;
|
|
79
|
-
/**
|
|
80
|
-
* 采样温度(可选)。
|
|
81
|
-
*/
|
|
82
|
-
temperature?: number;
|
|
83
|
-
/**
|
|
84
|
-
* 最大输出 token(可选)。
|
|
85
|
-
*/
|
|
86
|
-
maxTokens?: number;
|
|
87
|
-
/**
|
|
88
|
-
* topP(可选)。
|
|
89
|
-
*/
|
|
90
|
-
topP?: number;
|
|
91
|
-
/**
|
|
92
|
-
* frequencyPenalty(可选)。
|
|
93
|
-
*/
|
|
94
|
-
frequencyPenalty?: number;
|
|
95
|
-
/**
|
|
96
|
-
* presencePenalty(可选)。
|
|
97
|
-
*/
|
|
98
|
-
presencePenalty?: number;
|
|
99
|
-
/**
|
|
100
|
-
* Anthropic 版本字段(可选)。
|
|
101
|
-
*/
|
|
102
|
-
anthropicVersion?: string;
|
|
103
|
-
/**
|
|
104
|
-
* 是否暂停该模型。
|
|
105
|
-
*
|
|
106
|
-
* 关键点(中文)
|
|
107
|
-
* - 暂停后禁止作为 `execution.modelId` 被运行时加载。
|
|
108
|
-
* - 用于模型维护窗口、成本管控或临时故障隔离。
|
|
109
|
-
*/
|
|
110
|
-
isPaused: boolean;
|
|
111
|
-
/**
|
|
112
|
-
* 创建时间(ISO 字符串)。
|
|
113
|
-
*/
|
|
114
|
-
createdAt: string;
|
|
115
|
-
/**
|
|
116
|
-
* 更新时间(ISO 字符串)。
|
|
117
|
-
*/
|
|
118
|
-
updatedAt: string;
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* provider 写入参数。
|
|
122
|
-
*/
|
|
123
|
-
export interface UpsertModelProviderInput {
|
|
124
|
-
/**
|
|
125
|
-
* provider ID。
|
|
126
|
-
*/
|
|
127
|
-
id: string;
|
|
128
|
-
/**
|
|
129
|
-
* provider 类型。
|
|
130
|
-
*/
|
|
131
|
-
type: LlmProviderType;
|
|
132
|
-
/**
|
|
133
|
-
* provider baseUrl(可选)。
|
|
134
|
-
*/
|
|
135
|
-
baseUrl?: string;
|
|
136
|
-
/**
|
|
137
|
-
* provider apiKey(可选)。
|
|
138
|
-
*/
|
|
139
|
-
apiKey?: string;
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
* model 写入参数。
|
|
143
|
-
*/
|
|
144
|
-
export interface UpsertModelInput {
|
|
145
|
-
/**
|
|
146
|
-
* 模型 ID。
|
|
147
|
-
*/
|
|
148
|
-
id: string;
|
|
149
|
-
/**
|
|
150
|
-
* provider ID。
|
|
151
|
-
*/
|
|
152
|
-
providerId: string;
|
|
153
|
-
/**
|
|
154
|
-
* 上游模型名称。
|
|
155
|
-
*/
|
|
156
|
-
name: string;
|
|
157
|
-
/**
|
|
158
|
-
* 采样温度(可选)。
|
|
159
|
-
*/
|
|
160
|
-
temperature?: number;
|
|
161
|
-
/**
|
|
162
|
-
* 最大输出 token(可选)。
|
|
163
|
-
*/
|
|
164
|
-
maxTokens?: number;
|
|
165
|
-
/**
|
|
166
|
-
* topP(可选)。
|
|
167
|
-
*/
|
|
168
|
-
topP?: number;
|
|
169
|
-
/**
|
|
170
|
-
* frequencyPenalty(可选)。
|
|
171
|
-
*/
|
|
172
|
-
frequencyPenalty?: number;
|
|
173
|
-
/**
|
|
174
|
-
* presencePenalty(可选)。
|
|
175
|
-
*/
|
|
176
|
-
presencePenalty?: number;
|
|
177
|
-
/**
|
|
178
|
-
* Anthropic 版本字段(可选)。
|
|
179
|
-
*/
|
|
180
|
-
anthropicVersion?: string;
|
|
181
|
-
/**
|
|
182
|
-
* 是否暂停该模型(可选)。
|
|
183
|
-
*/
|
|
184
|
-
isPaused?: boolean;
|
|
185
|
-
}
|
|
186
12
|
/**
|
|
187
13
|
* 平台环境变量记录。
|
|
188
14
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Store.d.ts","sourceRoot":"","sources":["../../../../src/types/runtime/host/Store.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"Store.d.ts","sourceRoot":"","sources":["../../../../src/types/runtime/host/Store.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,UAAU,GAAG,QAAQ,GAAG,IAAI,CAAC;AAEvE;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;;;OAMG;IACH,KAAK,EAAE,QAAQ,CAAC;IAChB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;;;OAMG;IACH,KAAK,EAAE,QAAQ,CAAC;IAChB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC;AAElD;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;AAE3E;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,OAAO,EAAE,2BAA2B,CAAC;IACrC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,OAAO,EAAE,2BAA2B,CAAC;IACrC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Store.js","sourceRoot":"","sources":["../../../../src/types/runtime/host/Store.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"Store.js","sourceRoot":"","sources":["../../../../src/types/runtime/host/Store.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
|
|
@@ -335,7 +335,7 @@ export interface ManagedAgentRegistryV1 {
|
|
|
335
335
|
agents: ManagedAgentRegistryEntry[];
|
|
336
336
|
}
|
|
337
337
|
/**
|
|
338
|
-
* `
|
|
338
|
+
* `town agent list --running` 输出可复用的受管 agent 运行态视图。
|
|
339
339
|
*/
|
|
340
340
|
export interface ManagedAgentProcessView {
|
|
341
341
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@downcity/agent",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.62",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Downcity Agent 运行时 — 单 Agent 执行壳与 HTTP 服务能力",
|
|
6
6
|
"main": "./bin/index.js",
|
|
@@ -16,27 +16,28 @@
|
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@larksuiteoapi/node-sdk": "^1.
|
|
20
|
-
"ai": "^6.0.
|
|
21
|
-
"commander": "^
|
|
22
|
-
"dotenv": "^
|
|
23
|
-
"execa": "^9.
|
|
24
|
-
"fs-extra": "^11.
|
|
25
|
-
"hono": "^4.
|
|
26
|
-
"js-yaml": "^4.1.
|
|
27
|
-
"nanoid": "^5.1.
|
|
28
|
-
"node-cron": "^
|
|
29
|
-
"ws": "^8.
|
|
30
|
-
"zod": "^
|
|
19
|
+
"@larksuiteoapi/node-sdk": "^1.66.0",
|
|
20
|
+
"ai": "^6.0.193",
|
|
21
|
+
"commander": "^15.0.0",
|
|
22
|
+
"dotenv": "^17.4.2",
|
|
23
|
+
"execa": "^9.6.1",
|
|
24
|
+
"fs-extra": "^11.3.5",
|
|
25
|
+
"hono": "^4.12.23",
|
|
26
|
+
"js-yaml": "^4.1.1",
|
|
27
|
+
"nanoid": "^5.1.11",
|
|
28
|
+
"node-cron": "^4.2.1",
|
|
29
|
+
"ws": "^8.21.0",
|
|
30
|
+
"zod": "^4.4.3",
|
|
31
|
+
"@downcity/type": "0.1.6"
|
|
31
32
|
},
|
|
32
33
|
"devDependencies": {
|
|
33
34
|
"@types/fs-extra": "^11.0.4",
|
|
34
|
-
"@types/js-yaml": "^4.0.
|
|
35
|
-
"@types/node": "^
|
|
36
|
-
"@types/node-cron": "^3.0.
|
|
35
|
+
"@types/js-yaml": "^4.0.9",
|
|
36
|
+
"@types/node": "^25.9.1",
|
|
37
|
+
"@types/node-cron": "^3.0.11",
|
|
37
38
|
"@types/ws": "^8.18.1",
|
|
38
|
-
"tsc-alias": "^1.8.
|
|
39
|
-
"typescript": "^
|
|
39
|
+
"tsc-alias": "^1.8.17",
|
|
40
|
+
"typescript": "^6.0.3"
|
|
40
41
|
},
|
|
41
42
|
"scripts": {
|
|
42
43
|
"build": "node scripts/agent-compiler.mjs build",
|
package/src/agent/Agent.ts
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
import fs from "fs-extra";
|
|
15
15
|
import { nanoid } from "nanoid";
|
|
16
|
-
import type {
|
|
16
|
+
import type { Tool } from "ai";
|
|
17
17
|
import type { BasePlugin } from "@/plugin/core/BasePlugin.js";
|
|
18
18
|
import type {
|
|
19
19
|
AgentContext,
|
|
@@ -41,6 +41,7 @@ import type {
|
|
|
41
41
|
AgentSessionSummaryPage,
|
|
42
42
|
AgentSessionSystemBlock,
|
|
43
43
|
} from "@/types/agent/AgentTypes.js";
|
|
44
|
+
import type { AgentModel } from "@/model/CityModelAdapter.js";
|
|
44
45
|
import { Logger } from "@/utils/logger/Logger.js";
|
|
45
46
|
import { Session } from "@/session/Session.js";
|
|
46
47
|
import { DEFAULT_SHIP_PROMPTS } from "@executor/composer/system/default/SystemDomain.js";
|
|
@@ -124,7 +125,7 @@ export class Agent {
|
|
|
124
125
|
private readonly pluginRegistry: PluginRegistry;
|
|
125
126
|
private readonly config: DowncityConfig;
|
|
126
127
|
private readonly env: Record<string, string>;
|
|
127
|
-
private readonly defaultModel?:
|
|
128
|
+
private readonly defaultModel?: AgentModel;
|
|
128
129
|
private readonly pluginInstances: Map<string, BasePlugin>;
|
|
129
130
|
private readonly sessionCollection: AgentSessionCollection;
|
|
130
131
|
|
|
@@ -191,10 +191,6 @@ export async function compactSessionMessagesIfNeeded(
|
|
|
191
191
|
await deps.writeMetaUnsafe({
|
|
192
192
|
...prevMeta,
|
|
193
193
|
updatedAt: Date.now(),
|
|
194
|
-
lastArchiveId: params.archiveOnCompact ? archiveId : undefined,
|
|
195
|
-
keepLastMessages: Math.max(1, currentKept.length),
|
|
196
|
-
maxInputTokensApprox: params.maxInputTokensApprox,
|
|
197
|
-
compactRatio,
|
|
198
194
|
});
|
|
199
195
|
});
|
|
200
196
|
|
|
@@ -74,7 +74,7 @@ export function buildContextSystemPrompt(input: {
|
|
|
74
74
|
const outputRules = [
|
|
75
75
|
"Task-run output rules:",
|
|
76
76
|
"- This is a task execution context, not an interactive chat turn.",
|
|
77
|
-
"- Do NOT send external channel messages via `
|
|
77
|
+
"- Do NOT send external channel messages via `town chat send` unless explicitly required by the task itself.",
|
|
78
78
|
"- Reply with result-oriented content; do NOT paste raw tool outputs or JSON logs.",
|
|
79
79
|
"- Keep output compact and avoid unnecessary conversational fillers.",
|
|
80
80
|
].join("\n");
|
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
// Source: src/executor/composer/system/default/assets/core.prompt.ts.txt
|
|
7
|
-
const TEXT_MODULE_CONTENT = "你拥有且仅拥有当前项目 {{project_path}} 的使用权和修改权。当前年份是 {{current_year}} 年。\n1. `.downcity/` 是 Downcity 的运行时数据目录(通常不需要你手动读取/修改;系统会自动写入与注入)。结构与逻辑如下:\n - `.downcity/agents/<agentId>/sessions/` 是会话消息。\n - `.downcity/memory/` 是中长期记忆。\n - `.downcity/profile/Primary.md`、`.downcity/profile/other.md`:全局 profile 记忆;存在时会自动作为 system prompt 注入。\n - `.downcity/public/`:对外静态资源目录,通过 `GET /downcity/public/<path>` 访问;用于给外部访问的路径。不要存放敏感信息,运行中的 agent server 会把 `.downcity/public/` 暴露为 HTTP 静态资源:`GET /downcity/public/<path>`,你可以把该 URL 发给用户用于下载/查看生成的文件(注意不要暴露敏感信息)。\n - `.downcity/logs/<YYYY-MM-DD>.jsonl`:运行日志(JSONL);用于排查问题,避免把原始日志整段贴给用户。\n - `.downcity/.cache/`:幂等/去重缓存(ingress/egress);不要手动改。\n - `.downcity/.debug/`:调试产物(daemon pid/log/meta、适配器事件抓取等);仅在排查问题时查看。\n - `.downcity/data/`:小型持久化数据(预留)。\n - `.downcity/task/`:Task 目录。\n2. PROFILE.md + SOUL.md + downcity.json 是你的一些配置文件,你不需要读取。\n\n# 最重要\n【关于命令执行工具】(重要)\n- 短命令、一次性命令优先使用 `shell_exec`。\n- 长任务、需要中途查状态、需要 stdin 交互时,使用 `shell_start` / `shell_status` / `shell_read` / `shell_write` / `shell_wait` / `shell_close`。\n- 先用 `shell_start` 启动命令并拿到 `shell_id`。\n- `shell_id` 是 shell 会话标识;它不是 chat `session_id`。\n- 长任务期间,优先使用 `shell_status` 查询进度,或使用 `shell_wait` 等待状态变化;不要自己写高频空轮询循环。\n- 只有在确实需要原始增量输出时,才使用 `shell_read` 按 `from_cursor` 继续读取。\n- 需要向进程 stdin 输入内容时,使用 `shell_write`。\n- 命令会话完成后若不再需要,使用 `shell_close` 主动释放资源。\n- 不要把原始超长 shell 输出直接转发给用户,应先总结。\n\n# 默认决策与澄清\n- 默认先执行,再沟通:对低风险、可回滚、用户意图已经足够明显的请求,优先基于当前日期、时区、聊天上下文与常见默认值直接执行,不要在事件标题、默认平台、显然的时间表达上反复追问。\n- 只有当“缺失信息会实质改变结果”时才追问;例如:会影响日期/对象/金额/账户/发送目标,或会触发不可逆、高风险、涉隐私操作。\n- 处理时间表达时,优先使用当前环境提供的 `current_date`、`current_time` 与 `timezone`;如果入站 `<info>` 明确提供了 `user_timezone`,则优先按 `user_timezone` 解析,否则按 runtime clock 的 `timezone` 解析。像“今天/明天/下午两点/提前两小时”这类表达,应先解析为绝对时间,再执行,并在回复里明确写出绝对日期时间。\n- 当任务依赖外部权限、系统能力或第三方连接(如日历、提醒事项、聊天渠道、系统授权)时,先探测可用性,再决定是否承诺“我来创建/发送/写入”。\n- 如果探测结果显示被系统权限、宿主环境或连接状态阻塞,要直接说明真实阻塞点和下一步,而不是先给出“可以,我来做”的承诺后再多轮追问。\n- 若已经有足够信息可以一次完成多个低风险默认动作,应直接完成,并在结果里简短说明采用了哪些默认假设。\n\n# 很重要\n\n安全与边界\n- 不要执行破坏性命令(如 `rm -rf`、`git reset --hard`)除非用户明确要求。\n- 遇到 API Key、Token、Secret、环境变量、bot 凭据等密钥管理问题时,优先指导用户使用 Console(如 `Global / Env`、`Global / Channel Accounts`)维护,不要要求用户把密钥明文直接发送到当前聊天里。\n- `
|
|
7
|
+
const TEXT_MODULE_CONTENT = "你拥有且仅拥有当前项目 {{project_path}} 的使用权和修改权。当前年份是 {{current_year}} 年。\n1. `.downcity/` 是 Downcity 的运行时数据目录(通常不需要你手动读取/修改;系统会自动写入与注入)。结构与逻辑如下:\n - `.downcity/agents/<agentId>/sessions/` 是会话消息。\n - `.downcity/memory/` 是中长期记忆。\n - `.downcity/profile/Primary.md`、`.downcity/profile/other.md`:全局 profile 记忆;存在时会自动作为 system prompt 注入。\n - `.downcity/public/`:对外静态资源目录,通过 `GET /downcity/public/<path>` 访问;用于给外部访问的路径。不要存放敏感信息,运行中的 agent server 会把 `.downcity/public/` 暴露为 HTTP 静态资源:`GET /downcity/public/<path>`,你可以把该 URL 发给用户用于下载/查看生成的文件(注意不要暴露敏感信息)。\n - `.downcity/logs/<YYYY-MM-DD>.jsonl`:运行日志(JSONL);用于排查问题,避免把原始日志整段贴给用户。\n - `.downcity/.cache/`:幂等/去重缓存(ingress/egress);不要手动改。\n - `.downcity/.debug/`:调试产物(daemon pid/log/meta、适配器事件抓取等);仅在排查问题时查看。\n - `.downcity/data/`:小型持久化数据(预留)。\n - `.downcity/task/`:Task 目录。\n2. PROFILE.md + SOUL.md + downcity.json 是你的一些配置文件,你不需要读取。\n\n# 最重要\n【关于命令执行工具】(重要)\n- 短命令、一次性命令优先使用 `shell_exec`。\n- 长任务、需要中途查状态、需要 stdin 交互时,使用 `shell_start` / `shell_status` / `shell_read` / `shell_write` / `shell_wait` / `shell_close`。\n- 先用 `shell_start` 启动命令并拿到 `shell_id`。\n- `shell_id` 是 shell 会话标识;它不是 chat `session_id`。\n- 长任务期间,优先使用 `shell_status` 查询进度,或使用 `shell_wait` 等待状态变化;不要自己写高频空轮询循环。\n- 只有在确实需要原始增量输出时,才使用 `shell_read` 按 `from_cursor` 继续读取。\n- 需要向进程 stdin 输入内容时,使用 `shell_write`。\n- 命令会话完成后若不再需要,使用 `shell_close` 主动释放资源。\n- 不要把原始超长 shell 输出直接转发给用户,应先总结。\n\n# 默认决策与澄清\n- 默认先执行,再沟通:对低风险、可回滚、用户意图已经足够明显的请求,优先基于当前日期、时区、聊天上下文与常见默认值直接执行,不要在事件标题、默认平台、显然的时间表达上反复追问。\n- 只有当“缺失信息会实质改变结果”时才追问;例如:会影响日期/对象/金额/账户/发送目标,或会触发不可逆、高风险、涉隐私操作。\n- 处理时间表达时,优先使用当前环境提供的 `current_date`、`current_time` 与 `timezone`;如果入站 `<info>` 明确提供了 `user_timezone`,则优先按 `user_timezone` 解析,否则按 runtime clock 的 `timezone` 解析。像“今天/明天/下午两点/提前两小时”这类表达,应先解析为绝对时间,再执行,并在回复里明确写出绝对日期时间。\n- 当任务依赖外部权限、系统能力或第三方连接(如日历、提醒事项、聊天渠道、系统授权)时,先探测可用性,再决定是否承诺“我来创建/发送/写入”。\n- 如果探测结果显示被系统权限、宿主环境或连接状态阻塞,要直接说明真实阻塞点和下一步,而不是先给出“可以,我来做”的承诺后再多轮追问。\n- 若已经有足够信息可以一次完成多个低风险默认动作,应直接完成,并在结果里简短说明采用了哪些默认假设。\n\n# 很重要\n\n安全与边界\n- 不要执行破坏性命令(如 `rm -rf`、`git reset --hard`)除非用户明确要求。\n- 遇到 API Key、Token、Secret、环境变量、bot 凭据等密钥管理问题时,优先指导用户使用 Console(如 `Global / Env`、`Global / Channel Accounts`)维护,不要要求用户把密钥明文直接发送到当前聊天里。\n- `town keys` 只能列出已配置的 key 名与描述,不会返回密钥值。不要让用户把密钥“发给你自己”或继续尝试通过 `town keys` 获取明文。\n";
|
|
8
8
|
|
|
9
9
|
export default TEXT_MODULE_CONTENT;
|
|
@@ -36,4 +36,4 @@
|
|
|
36
36
|
安全与边界
|
|
37
37
|
- 不要执行破坏性命令(如 `rm -rf`、`git reset --hard`)除非用户明确要求。
|
|
38
38
|
- 遇到 API Key、Token、Secret、环境变量、bot 凭据等密钥管理问题时,优先指导用户使用 Console(如 `Global / Env`、`Global / Channel Accounts`)维护,不要要求用户把密钥明文直接发送到当前聊天里。
|
|
39
|
-
- `
|
|
39
|
+
- `town keys` 只能列出已配置的 key 名与描述,不会返回密钥值。不要让用户把密钥“发给你自己”或继续尝试通过 `town keys` 获取明文。
|
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
// Source: src/executor/composer/system/default/assets/plugin.prompt.ts.txt
|
|
7
|
-
const TEXT_MODULE_CONTENT = "# Plugin State\n\n你正在一个基于 plugin 的执行环境中工作。\n\n## 可用命令总览\n- plugin 状态管理(统一使用 `
|
|
7
|
+
const TEXT_MODULE_CONTENT = "# Plugin State\n\n你正在一个基于 plugin 的执行环境中工作。\n\n## 可用命令总览\n- plugin 状态管理(统一使用 `town plugin`):\n - `town plugin list`\n - `town plugin status <pluginName>`\n - `town plugin start <pluginName>`\n - `town plugin stop <pluginName>`\n - `town plugin restart <pluginName>`\n - `town plugin command <pluginName> <command> [--payload '<json>']`\n - `town plugin schedule list`\n - `town plugin schedule info <jobId>`\n - `town plugin schedule cancel <jobId>`\n- ActionSchedule 管理命令用于查看/取消延迟执行的 plugin action,不是独立 plugin。\n- 当前内建托管 plugin:`shell` / `chat` / `task` / `memory` / `contact`。\n- 当前内建本地 plugin:`auth` / `skill` / `asr` / `tts`。\n- 模块级 action 命令:\n - `town shell <action> ...`\n - `town chat <action> ...`\n - `town task <action> ...`\n - `town memory <action> ...`\n - `town plugin action <plugin> <action> ...`\n - `town skill <action> ...`\n - `town asr <action> ...`\n - `town tts <action> ...`\n\n具体 plugin 的执行参考对应文档。\n";
|
|
8
8
|
|
|
9
9
|
export default TEXT_MODULE_CONTENT;
|
|
@@ -3,27 +3,27 @@
|
|
|
3
3
|
你正在一个基于 plugin 的执行环境中工作。
|
|
4
4
|
|
|
5
5
|
## 可用命令总览
|
|
6
|
-
- plugin 状态管理(统一使用 `
|
|
7
|
-
- `
|
|
8
|
-
- `
|
|
9
|
-
- `
|
|
10
|
-
- `
|
|
11
|
-
- `
|
|
12
|
-
- `
|
|
13
|
-
- `
|
|
14
|
-
- `
|
|
15
|
-
- `
|
|
6
|
+
- plugin 状态管理(统一使用 `town plugin`):
|
|
7
|
+
- `town plugin list`
|
|
8
|
+
- `town plugin status <pluginName>`
|
|
9
|
+
- `town plugin start <pluginName>`
|
|
10
|
+
- `town plugin stop <pluginName>`
|
|
11
|
+
- `town plugin restart <pluginName>`
|
|
12
|
+
- `town plugin command <pluginName> <command> [--payload '<json>']`
|
|
13
|
+
- `town plugin schedule list`
|
|
14
|
+
- `town plugin schedule info <jobId>`
|
|
15
|
+
- `town plugin schedule cancel <jobId>`
|
|
16
16
|
- ActionSchedule 管理命令用于查看/取消延迟执行的 plugin action,不是独立 plugin。
|
|
17
17
|
- 当前内建托管 plugin:`shell` / `chat` / `task` / `memory` / `contact`。
|
|
18
18
|
- 当前内建本地 plugin:`auth` / `skill` / `asr` / `tts`。
|
|
19
19
|
- 模块级 action 命令:
|
|
20
|
-
- `
|
|
21
|
-
- `
|
|
22
|
-
- `
|
|
23
|
-
- `
|
|
24
|
-
- `
|
|
25
|
-
- `
|
|
26
|
-
- `
|
|
27
|
-
- `
|
|
20
|
+
- `town shell <action> ...`
|
|
21
|
+
- `town chat <action> ...`
|
|
22
|
+
- `town task <action> ...`
|
|
23
|
+
- `town memory <action> ...`
|
|
24
|
+
- `town plugin action <plugin> <action> ...`
|
|
25
|
+
- `town skill <action> ...`
|
|
26
|
+
- `town asr <action> ...`
|
|
27
|
+
- `town tts <action> ...`
|
|
28
28
|
|
|
29
29
|
具体 plugin 的执行参考对应文档。
|
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
// Source: src/executor/composer/system/default/assets/task.prompt.ts.txt
|
|
7
|
-
const TEXT_MODULE_CONTENT = "你正在执行 Task 系统内部任务(非聊天会话)。\n\n运行约束(关键):\n- 当前上下文用于任务执行与审计,不是用户聊天回合。\n- 除非任务正文明确要求,否则不要调用 `
|
|
7
|
+
const TEXT_MODULE_CONTENT = "你正在执行 Task 系统内部任务(非聊天会话)。\n\n运行约束(关键):\n- 当前上下文用于任务执行与审计,不是用户聊天回合。\n- 除非任务正文明确要求,否则不要调用 `town chat send` 或任何外部渠道发送动作。\n- 不要把自己当作“即时对话客服”;优先完成任务目标并输出可审计结果。\n- 允许在执行过程中产生必要的中间说明,但你**最后一条 assistant 返回**会被系统直接当作 `output.md` 与最终发送内容。\n\n输出原则:\n- 你的最后一条 assistant 返回必须是“任务交付物本身”。\n- 最后一条 assistant 返回不要包含过程汇报、状态说明、任务管理说明或发送说明。\n- 优先返回可复用、结构化、简洁的结果内容。\n- 不要回显冗长原始日志;必要时给摘要与关键结论。\n- 如任务输入要求固定格式(例如 JSON),严格遵守该格式。\n- 如果任务要求“发送到当前会话”或“发送给用户”,默认理解为:系统会把你的最后一条 assistant 返回直接回发;因此你应该直接输出那段要发给用户的正文。\n- 除非任务正文明确要求输出执行摘要,否则最后一条 assistant 返回不要输出“任务已完成”“已发送”“我先查看一下”“我来为你处理”等元话术。\n\n最后一条 assistant 返回禁止的常见内容:\n- “我来为你……”\n- “首先让我……”\n- “我看到已经有一个同名任务……”\n- “任务已发送 / 已完成 / 已更新……”\n- “任务状态总结……”\n- 任何围绕 task 管理流程的说明性文字\n\n结束前自检:\n- 在结束前检查:你准备发出的最后一条 assistant 返回,是否就是最终交付物本身。\n- 如果最后一条 assistant 返回主要是在描述执行过程、任务状态或发送情况,而不是最终交付内容本身,说明输出方向错误,必须重写。\n- 如果删掉“我来”“首先”“已发送”“任务状态”这类句子后几乎没有剩余内容,说明这不是合格的 task 输出。\n\n上下文原则:\n- 该任务上下文是独立执行上下文,不继承聊天对话目标。\n- 如与系统其他提示冲突,以“任务执行上下文规则”为准。\n";
|
|
8
8
|
|
|
9
9
|
export default TEXT_MODULE_CONTENT;
|