ai_co_discuss 0.2.64 → 0.2.65
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/backend/free_room.py +1042 -1042
- package/backend/server.py +1 -1
- package/docs/workflow.md +2 -0
- package/package.json +1 -1
- package/web/app.js +17 -11
- package/web/modern.css +1 -1
- package/web/modern.js +807 -791
package/backend/server.py
CHANGED
|
@@ -1022,7 +1022,7 @@ def record_reported_session(connection, room_id, token, payload):
|
|
|
1022
1022
|
session_id, client = payload.get("session_id"), payload.get("session_client")
|
|
1023
1023
|
if client not in ("claude", "codex", "antigravity") or not isinstance(session_id, str) or not SESSION_ID_PATTERN.fullmatch(session_id) or not token:
|
|
1024
1024
|
return
|
|
1025
|
-
member = connection.execute("SELECT id FROM room_members WHERE room_id=? AND token_hash=? AND status='active' AND access='manual' AND adapter
|
|
1025
|
+
member = connection.execute("SELECT id FROM room_members WHERE room_id=? AND token_hash=? AND status='active' AND access='manual' AND adapter IN ('manual','')",
|
|
1026
1026
|
(room_id, token_hash(token))).fetchone()
|
|
1027
1027
|
if member:
|
|
1028
1028
|
connection.execute("""INSERT INTO member_sessions (member_id,room_id,session_id,client) VALUES (?,?,?,?)
|
package/docs/workflow.md
CHANGED
|
@@ -27,6 +27,8 @@
|
|
|
27
27
|
|
|
28
28
|
运行中可在右侧成员栏邀请 AI(沿用本机软件配置和本房间工作目录),也可让成员离开、请回或移除。自动成员的项目文件权限默认只读;需要它修改项目时,在邀请前选择“项目文件可写”,权限只应用于这位成员;App 与手动成员的文件权限由其软件设置,API 与网页成员不访问项目文件。填写已有会话 ID 时续接该原会话,不新建。离开会立即停止它的工作;请回时换发新凭证并续接它原来的会话。邀请时可选“手动接入”:成员不会被自动唤醒,而是得到一份私有凭据文件,由你在它的会话中按参与技能读写。自由协作房间里,手动成员执行 `member register` 之前视为不存在:不能被点名,不收请求,不进“全体各自回应”和智能调度候选;注册后与其他成员一样可被点名,其 CLI 上报会话后本机服务按软件转为托管(Claude Code、Codex、agy),此后与自动成员无异。绑定你正在使用的会话的成员会标注“借用会话”:它工作时不要在原窗口继续操作。
|
|
29
29
|
|
|
30
|
+
输入 `@全体成员`(或 `@all`)等同于点名当前所有可点名成员(含主持人,不含未注册的手动成员),各自回答,主持人不汇总;成员不止一位时 @ 菜单首项提供该选项。
|
|
31
|
+
|
|
30
32
|
可以把一位本机成员设为主持人。之后没有点名的消息交给主持人分配;主持人在回答中点名成员派活,只点名一位成员时,其回答直接面向用户,主持人不再被唤醒;点名多位成员时,都结束后主持人再被唤醒一次,继续汇总或安排下一步。派出的成员全部失败时不再唤醒主持人;同一条消息引出的 AI 请求最多 8 次,用完即停,成员栏会提示,发一条新消息即重新开始。
|
|
31
33
|
|
|
32
34
|
普通成员回答中的 `@成员` 或结构化 `to` 只保存为“建议请 X 回应”,不自动唤醒;正文里的代码与引用不算建议。房主可在原回答下点击“转为请求”,网站记录一条用户确认,建立新任务链,并把请求关联到原回答。重复点击或重试返回同一条请求,已完成、失败或取消的请求也不会重新派发;目标成员离开后不能转换。自动、手动和在线成员沿用各自的接入方式。
|
package/package.json
CHANGED
package/web/app.js
CHANGED
|
@@ -938,9 +938,9 @@ function message_payload() {
|
|
|
938
938
|
if (online) return { author: online.name, text, reply_to: state.reply_to, kind: "chat", submitted_by: "用户",
|
|
939
939
|
request_ids: state.room.free.requests.filter(item => item.member === online.name && item.status === "pending").map(item => item.id) };
|
|
940
940
|
const payload = { author: "用户", text, reply_to: state.reply_to, kind: "chat", submitted_by: "用户" };
|
|
941
|
-
const active = (state.room.free?.members || []).filter(member => member.status === "active").map(member => member.name);
|
|
942
|
-
// @mentions outside code name members; without any, the server gives the message to the only member or the host.
|
|
943
|
-
const named = active.filter(name => mentioned(text, name));
|
|
941
|
+
const active = (state.room.free?.members || []).filter(member => member.status === "active" && (member.access !== "manual" || member.registered_at)).map(member => member.name);
|
|
942
|
+
// @mentions outside code name members (@全体成员 or @all names them all); without any, the server gives the message to the only member or the host.
|
|
943
|
+
const named = mentioned(text, "全体成员") || mentioned(text, "all") ? active : active.filter(name => mentioned(text, name));
|
|
944
944
|
if (named.length) payload.to = named;
|
|
945
945
|
return payload;
|
|
946
946
|
}
|
|
@@ -2446,8 +2446,7 @@ function download_member_access(name) {
|
|
|
2446
2446
|
if (!access.can_manage || !member?.available || member.access === "online") throw new Error("当前浏览器没有此成员可下载的私有配置");
|
|
2447
2447
|
download_private_json({ site: location.origin, room: room.id, token: member_credentials(room.id)[name].token }, `member-${room.id}-${name}.json`);
|
|
2448
2448
|
state.access_error = "";
|
|
2449
|
-
|
|
2450
|
-
: `已下载 ${name} 的私有配置;交给该成员的本地会话,下载不代表已接入。`;
|
|
2449
|
+
flash_access_notice(`已下载 ${name} 的私有配置`);
|
|
2451
2450
|
}
|
|
2452
2451
|
|
|
2453
2452
|
/** Copy the same room-scoped credential as one line of text for an agent that cannot take a file. */
|
|
@@ -2456,8 +2455,19 @@ async function copy_member_access_text(name) {
|
|
|
2456
2455
|
const member = access.members.find(item => item.name === name);
|
|
2457
2456
|
if (!access.can_manage || !member?.available || member.access === "online") throw new Error("当前浏览器没有此成员可复制的凭证");
|
|
2458
2457
|
await copy_text(JSON.stringify({ site: location.origin, room: room.id, token: member_credentials(room.id)[name].token }));
|
|
2458
|
+
flash_access_notice(`已复制 ${name} 的凭证文本(含 token)`);
|
|
2459
|
+
}
|
|
2460
|
+
|
|
2461
|
+
/** Confirm a copy or download briefly in the member rail; the note clears itself. */
|
|
2462
|
+
function flash_access_notice(message) {
|
|
2459
2463
|
state.access_error = "";
|
|
2460
|
-
state.access_notice =
|
|
2464
|
+
state.access_notice = message;
|
|
2465
|
+
clearTimeout(state.access_notice_timer);
|
|
2466
|
+
state.access_notice_timer = setTimeout(() => {
|
|
2467
|
+
if (state.access_notice !== message) return;
|
|
2468
|
+
state.access_notice = "";
|
|
2469
|
+
publish_view();
|
|
2470
|
+
}, TOAST_DURATION_MS);
|
|
2461
2471
|
}
|
|
2462
2472
|
|
|
2463
2473
|
/** Copy a member-specific entry instruction; only the launch variant carries the credential, never conversation context. */
|
|
@@ -2480,11 +2490,7 @@ async function copy_member_join(name, with_credential = false) {
|
|
|
2480
2490
|
${instruction}
|
|
2481
2491
|
房间入口:${address}
|
|
2482
2492
|
先核对最新阶段、任务和原文编号,再按房间协议参与。${credential}`);
|
|
2483
|
-
if (state.room?.id === room.id) {
|
|
2484
|
-
state.access_error = "";
|
|
2485
|
-
state.access_notice = with_credential ? `已复制 ${name} 的启动指令,含 token,只交给该成员;复制不代表已经送达或接入。`
|
|
2486
|
-
: `已复制 ${name} 的参与说明,未包含凭据;复制不代表已经送达或接入。`;
|
|
2487
|
-
}
|
|
2493
|
+
if (state.room?.id === room.id) flash_access_notice(with_credential ? `已复制 ${name} 的启动指令(含 token)` : `已复制 ${name} 的参与说明`);
|
|
2488
2494
|
}
|
|
2489
2495
|
|
|
2490
2496
|
/** How a manual member learns it is its turn: free rooms are pulled by the member, discussions only on the host's assignment. */
|