ai-project-manage-cli 8.0.5 → 8.0.7
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.
|
@@ -2921,6 +2921,9 @@ var WEBIDE_CODE_CHANGE_ACTIONS = /* @__PURE__ */ new Set([
|
|
|
2921
2921
|
function shouldCommitAfterWebIdeMessage(action) {
|
|
2922
2922
|
return WEBIDE_CODE_CHANGE_ACTIONS.has(action);
|
|
2923
2923
|
}
|
|
2924
|
+
function isStartLocalServicesAction(action) {
|
|
2925
|
+
return action === "enter-manual-test" || action === "skip-test";
|
|
2926
|
+
}
|
|
2924
2927
|
function syncLocalTaskStatus(workdir, taskId, msg, status) {
|
|
2925
2928
|
syncWebIdeTaskState(workdir, taskId, {
|
|
2926
2929
|
messageId: msg.messageId,
|
|
@@ -3129,7 +3132,8 @@ async function handleWebIdeInboundMessage(cfg, msg, signal) {
|
|
|
3129
3132
|
"running"
|
|
3130
3133
|
);
|
|
3131
3134
|
await syncPrepLog();
|
|
3132
|
-
const
|
|
3135
|
+
const startLocalServices = isStartLocalServicesAction(msg.action);
|
|
3136
|
+
const savedAgentId = startLocalServices ? void 0 : loadWebIdeAgentId(workdir, taskId);
|
|
3133
3137
|
const outcome = await runCursorAgent(
|
|
3134
3138
|
cfg,
|
|
3135
3139
|
{
|
|
@@ -3146,17 +3150,21 @@ async function handleWebIdeInboundMessage(cfg, msg, signal) {
|
|
|
3146
3150
|
forceSend: true,
|
|
3147
3151
|
eventSession,
|
|
3148
3152
|
appendMessageContent: (content) => appendContent(cfg, messageId, content),
|
|
3149
|
-
askQuestionExecute: createWebIdeAskQuestionExecute({
|
|
3153
|
+
askQuestionExecute: startLocalServices ? void 0 : createWebIdeAskQuestionExecute({
|
|
3150
3154
|
cfg,
|
|
3151
3155
|
taskId,
|
|
3152
3156
|
signal
|
|
3153
3157
|
}),
|
|
3154
|
-
|
|
3158
|
+
enableAskQuestion: !startLocalServices,
|
|
3159
|
+
enableWebIdePlanTools: !startLocalServices,
|
|
3160
|
+
enablePtySessionMcp: startLocalServices,
|
|
3155
3161
|
enableSandbox: false,
|
|
3156
|
-
onInvalidatePersistedAgentId: () => clearWebIdeAgentId(workdir, taskId),
|
|
3162
|
+
onInvalidatePersistedAgentId: startLocalServices ? void 0 : () => clearWebIdeAgentId(workdir, taskId),
|
|
3157
3163
|
taskId,
|
|
3158
3164
|
createRemoteLogSync: (agentId) => {
|
|
3159
|
-
|
|
3165
|
+
if (!startLocalServices) {
|
|
3166
|
+
saveWebIdeAgentId(workdir, taskId, agentId);
|
|
3167
|
+
}
|
|
3160
3168
|
logSyncRef.current = createThrottledWebIdeMessageLogSync(
|
|
3161
3169
|
cfg,
|
|
3162
3170
|
{ taskId, messageId, agentId },
|
|
@@ -3170,7 +3178,9 @@ async function handleWebIdeInboundMessage(cfg, msg, signal) {
|
|
|
3170
3178
|
return logSyncRef.current;
|
|
3171
3179
|
},
|
|
3172
3180
|
onRunStarted: async ({ agentId, runId }) => {
|
|
3173
|
-
|
|
3181
|
+
if (!startLocalServices) {
|
|
3182
|
+
saveWebIdeAgentId(workdir, taskId, agentId);
|
|
3183
|
+
}
|
|
3174
3184
|
eventSession.addCliStep(
|
|
3175
3185
|
"\u542F\u52A8 Cursor Agent",
|
|
3176
3186
|
`agentId=${agentId} runId=${runId}`,
|
|
@@ -3182,7 +3192,9 @@ async function handleWebIdeInboundMessage(cfg, msg, signal) {
|
|
|
3182
3192
|
}
|
|
3183
3193
|
}
|
|
3184
3194
|
);
|
|
3185
|
-
|
|
3195
|
+
if (!startLocalServices) {
|
|
3196
|
+
saveWebIdeAgentId(workdir, taskId, outcome.agentId);
|
|
3197
|
+
}
|
|
3186
3198
|
const tokenUsage = outcome.usage != null ? {
|
|
3187
3199
|
modelId: outcome.modelId ?? (msg.model?.trim() || void 0),
|
|
3188
3200
|
inputTokens: outcome.usage.inputTokens,
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
会话与 WebIDE「终端」面板共用同一套 `pty-session-mcp serve`。工具名:`create` / `write` / `read` / `resize` / `kill` / `list`。
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
本地服务由用户在顶栏「启动项目」触发,或在进入手工测试时由启动指令触发(独立 Agent)。**开发/修码任务不要自行起或重启长驻进程**。
|
|
8
8
|
|
|
9
9
|
## 工具
|
|
10
10
|
|
|
@@ -26,14 +26,15 @@
|
|
|
26
26
|
3. 按文档中的 cwd / command / 服务划分创建会话。
|
|
27
27
|
4. 文档不存在或未写明启动方式 → 结束任务,**禁止猜测命令**。
|
|
28
28
|
|
|
29
|
-
## 时机(顶栏启动 /
|
|
29
|
+
## 时机(顶栏启动 / 重启 / 进入手工测试)
|
|
30
30
|
|
|
31
31
|
固定顺序:
|
|
32
32
|
|
|
33
33
|
1. **`list`**
|
|
34
|
-
2.
|
|
35
|
-
3.
|
|
36
|
-
4. `
|
|
34
|
+
2. 顶栏启动:无对应 `name` 的活会话 → 按部署文档 `create` + `write`;已有同名活会话则结束,不重起
|
|
35
|
+
3. 顶栏重启:先 `kill` 目标 `name`,再按部署文档 `create` + `write`(不要杀掉其它端)
|
|
36
|
+
4. 进入手工测试:文档写明的每一端,无对应 `name` 则启动;**已有同名活会话则重启**(只 kill 该 name,再 `create` + `write`)
|
|
37
|
+
5. `read` 等待就绪日志 / 端口即可
|
|
37
38
|
|
|
38
39
|
用户在「终端」面板看日志,在「浏览器」面板看客户机外网地址。
|
|
39
40
|
|