@tomflow/chatloop-tools 0.4.25 → 0.4.26
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 +2 -0
- package/lib/trace-gateway.mjs +8 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -48,6 +48,8 @@ npx --yes --package=@tomflow/chatloop-tools@latest chatloop-tools upgrade
|
|
|
48
48
|
|
|
49
49
|
**0.4.25 Trace 真实会话关联修复**:Tunnel 显式继承唯一 Tools Supervisor 的 Context/Trace opt-in Gateway 配置(不继承其它账号密钥),避免线上 Gateway 无法暴露 `chat_loop_trace_diagnose`。Trace Gateway 兼容 Chrome Status 的真实嵌套 `session.sessionId` 回执,对 BLOCKED Status 记录故障码和助手消息身份引用(不写原文、不冒充 Native 发送确认)。专项真实 Supervisor/Gateway 桥接测试覆盖同一 Session 的日志、诊断和不泄漏消息正文。生产必须分别验证 Runtime 环境、Tunnel MCP tools/list、Trace writerHealth 和 Chrome DOM/文字回执。旧日志仍保留,缺失的历史事件不能补造成已确认事件。
|
|
50
50
|
|
|
51
|
+
**0.4.26 Trace 精确 Start 阻断原因**:真实 Extension Status 同时给出泛化 Owner 原因与更精确的 `lastStartFailureCode` 时,Trace 只在 `BLOCKED + action=START` 的情况下优先记录经过严格格式验证的故障码;无精确故障码仍使用原理由,不提权、不补发,不将 DOM 中的用户消息当作 Native 成功回执。真实 Gateway→Supervisor→唯一 Trace Writer 集成测试覆盖 `FIRST_SEND_RECEIPT_UNKNOWN`。
|
|
52
|
+
|
|
51
53
|
**Start 长页面准备(0.4.17)**:私人 MCP `chat_loop_extension__start` 的 CLI 子调用等待窗口最多 330 秒,仅用于允许 Chrome 安全校验和 ChatGPT 编辑器自然就绪。超时仍返回不确定错误,不重新启动或重发,必须单独查询 Status。
|
|
52
54
|
|
|
53
55
|
|
package/lib/trace-gateway.mjs
CHANGED
|
@@ -94,9 +94,14 @@ export async function observeExtensionResult(name,args,result){
|
|
|
94
94
|
?proof.status==='QUEUED'?'BEGIN'
|
|
95
95
|
:proof.phase==='SENT_CONFIRMED'&&matchingAction?'CONFIRMED':'UNKNOWN'
|
|
96
96
|
:blocked?'BLOCKED':proof.status==='OK'?'CONFIRMED':'UNKNOWN';
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
// Status may contain a specific Start failure beneath the generic
|
|
98
|
+
// START_SEND_UNVERIFIED owner reason. Keep the specific code in Trace
|
|
99
|
+
// without treating DOM observation as a Native send receipt.
|
|
100
|
+
const codes=proof.diagnostics?.action==='START'
|
|
101
|
+
?[proof.diagnostics?.lastStartFailureCode,proof.diagnostics?.reason]
|
|
102
|
+
:[proof.diagnostics?.reason];
|
|
103
|
+
const errorCode=blocked?codes.find(value=>typeof value==='string'&&
|
|
104
|
+
/^[A-Z][A-Z0-9_]{0,95}$/.test(value))||null:null;
|
|
100
105
|
// Observer message identity is an opaque DOM evidence reference, not chat
|
|
101
106
|
// content and not a Native send acknowledgement.
|
|
102
107
|
const assistantKey=proof.diagnostics?.assistantKey;
|