ai_co_discuss 0.3.93 → 0.3.94
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/docs/runner.md +1 -1
- package/package.json +1 -1
- package/runner/free_runner.mjs +10 -7
- package/web/modern.js +1 -1
package/docs/runner.md
CHANGED
|
@@ -159,7 +159,7 @@ API 成员可以担任专家或主持人。房间指定了项目目录时,它
|
|
|
159
159
|
|
|
160
160
|
## 常见问题
|
|
161
161
|
|
|
162
|
-
-
|
|
162
|
+
- **软件送达失败**:查看成员状态与原位失败卡,在对应软件中处理登录或权限;倒计时期间可以立即重试或停止。本机接入程序重启或异常退出、导致进行中的软件进程随之结束时,同样自动重新投递同一执行,间隔缩短为 5 秒。三次重试用尽后,讨论专家的失败交给主持人处理;也可跳过本次发言。
|
|
163
163
|
- **Codex 提示会话被占用**:原聊天仍被 Codex App 占用,可在进度看板切换到 App 接入。
|
|
164
164
|
- **Windows 报告两处数据路径**:从普通终端管理服务,或设置环境变量 `DISCUSS_SERVICE_HOME`。
|
|
165
165
|
- **结果不明**:已交付但无法确认的任务不会自动重发,请先在原会话与房间中核对。
|
package/package.json
CHANGED
package/runner/free_runner.mjs
CHANGED
|
@@ -25,6 +25,8 @@ export const GOAL_IDLE_MS = 30_000;
|
|
|
25
25
|
// A manual member's session that refuses a delivery is retried in the same execution, after a wait the owner can cut short.
|
|
26
26
|
const MAX_DELIVERY_RETRIES = 3;
|
|
27
27
|
const RETRY_DELAY_SECONDS = 60;
|
|
28
|
+
// The cause is gone once the restarted runner is back, so its retry needs no long wait.
|
|
29
|
+
const RESTART_RETRY_DELAY_SECONDS = 5;
|
|
28
30
|
const MAX_RETRY_REASON = 500;
|
|
29
31
|
const LIVE = ['reserving', 'delivering', 'sidecar_pending', 'running', 'retry_wait'];
|
|
30
32
|
// The longest private chat reply the site keeps.
|
|
@@ -912,9 +914,10 @@ export class FreeRoomRunner {
|
|
|
912
914
|
}
|
|
913
915
|
// A restart between persisting and invoking cannot prove non-delivery, so it never resends.
|
|
914
916
|
if (row.status === 'delivering') return this.fail(member.name, execution.id, '上次投递结果不明,未自动重发;请核对原会话后重新发送');
|
|
915
|
-
// Inherited from a runner that stopped or crashed: once its software processes are gone, no answer can come
|
|
917
|
+
// Inherited from a runner that stopped or crashed: once its software processes are gone, no answer can come, so the
|
|
918
|
+
// same execution is delivered again after the retry wait instead of handing the failure to the host.
|
|
916
919
|
if (row.status === 'running' && this.orphan(execution.id)?.alive === false) {
|
|
917
|
-
return this.
|
|
920
|
+
return this.retry_or_fail(member.name, execution, '本机接入程序重启或异常退出,这次执行的软件进程已结束,未提交回答', { restarted: true });
|
|
918
921
|
}
|
|
919
922
|
if (row.error) return this.retry_or_fail(member.name, execution, row.error);
|
|
920
923
|
if (this.exited.has(execution.id)) {
|
|
@@ -1073,19 +1076,19 @@ export class FreeRoomRunner {
|
|
|
1073
1076
|
}
|
|
1074
1077
|
/**
|
|
1075
1078
|
* A manual member's session refused the delivery, or the software failed before any turn ran: keep the execution and
|
|
1076
|
-
* deliver again after a wait shown on the website, up to MAX_DELIVERY_RETRIES times;
|
|
1077
|
-
* attempt, fails as before.
|
|
1079
|
+
* deliver again after a wait shown on the website, up to MAX_DELIVERY_RETRIES times; so is an execution whose software
|
|
1080
|
+
* ended with the previous runner process (`restarted`). Anything else, or the last attempt, fails as before.
|
|
1078
1081
|
*/
|
|
1079
|
-
async retry_or_fail(name, execution, reason) {
|
|
1082
|
+
async retry_or_fail(name, execution, reason, { restarted = false } = {}) {
|
|
1080
1083
|
const attempt = (execution.retry?.attempt || 0) + 1;
|
|
1081
1084
|
const not_started = this.not_started.delete(execution.id);
|
|
1082
1085
|
if (this.not_retryable.delete(execution.id)) return this.fail(name, execution.id, reason);
|
|
1083
|
-
if (this.config.participants[name]?.project_access !== 'own' && !not_started) return this.fail(name, execution.id, reason);
|
|
1086
|
+
if (!restarted && this.config.participants[name]?.project_access !== 'own' && !not_started) return this.fail(name, execution.id, reason);
|
|
1084
1087
|
if (attempt > MAX_DELIVERY_RETRIES) return this.fail(name, execution.id, `${reason}(已自动重试 ${MAX_DELIVERY_RETRIES} 次)`);
|
|
1085
1088
|
this.stop_member(name);
|
|
1086
1089
|
this.exited.delete(execution.id);
|
|
1087
1090
|
await api(this.config, `/executions/${execution.id}`, { action: 'retry_wait', attempt,
|
|
1088
|
-
retry_at: Math.floor(Date.now() / 1000) + RETRY_DELAY_SECONDS, reason: reason.slice(0, MAX_RETRY_REASON) });
|
|
1091
|
+
retry_at: Math.floor(Date.now() / 1000) + (restarted ? RESTART_RETRY_DELAY_SECONDS : RETRY_DELAY_SECONDS), reason: reason.slice(0, MAX_RETRY_REASON) });
|
|
1089
1092
|
this.save(name, { status: 'retry_wait', error: '' });
|
|
1090
1093
|
}
|
|
1091
1094
|
/** Record the cause on the website, then stop this member's own processes. */
|