@tomflow/chatloop-extension 0.3.56 → 0.3.58
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 +4 -2
- package/bin/native-host.mjs +2 -2
- package/extension/actions/continue.js +38 -0
- package/extension/background.js +58 -17
- package/extension/manifest.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -55,14 +55,16 @@ Clean 只清空输入框,不发送,不更改 Owner;必须指定精确标
|
|
|
55
55
|
|
|
56
56
|
**0.3.48 中的源码级熵减**:删除仅用于旧手动验收的 Popup 脚本、Clock Action、计数/模拟墙钟状态及其专属测试。正式 Start、Continue、Handoff 与 Observer/Owner、十分钟真实时钟、错误隔离、配额与已登记测试 Chat 的安全回收保持实现。继续/交接只能由独立 Action 单次发送,用户未发送草稿不允许清除;过往隐藏验收 URL 不再可调用。确切最新测试数量及未验证项只看 [CURRENT](../../context/CURRENT.md)。
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
**历史 0.3.49 接管候选**:此前用于实现同 Chat adopt;后续版本已演进并发布。最新安装、Owner 与真实验收进度只查 [CURRENT](../../context/CURRENT.md),不要沿用历史‘未发布’结论。
|
|
59
59
|
|
|
60
60
|
|
|
61
|
+
**可视化消息定位(0.3.58)**:真实 Chat 若因历史片段挂载而无法从当前 DOM 验证最新 BLOCKED Turn,不允许依赖旧消息直接 Continue。正式 Status 仅在真实 Owner tab URL 已核实且为 WAITING_REPLY/BLOCKED 时,于 diagnostics 返回只作定位用的 ownerTabId,绝非发送凭证。只有操作员明确打开原内置 Continue Action 并提供精确 tabId 与 Native 最新 updatedAt(resumeBlockedAt),Worker 才能只读核验原 Session/Chat/generation、BLOCKED 类型、独立故障、精确 tab/URL、正式 Action 来源和 Native CAS;核验通过后**仅由 Action 页**尝试滚动原 Chat 到最新挂载区。不更新 Worker 或 Native 会话状态,不点击提交。随后仍要求原有两次稳定最新 user/assistant 身份、无待审批表单和唯一发送许可;任何滚动/身份/状态不明均 fail-closed。普通 Continue/Handoff 与其它 Chat 不触发此行为,不能以滚动成功宣称业务恢复。
|
|
62
|
+
|
|
61
63
|
## 原 Owner 的有界技术恢复
|
|
62
64
|
|
|
63
65
|
Worker仍是唯一发送裁决者,Native会话文件只是带身份校验的持久投影。正式Status返回当前Session/Chat及有限diagnostics(版本、失败码、消息身份、恢复预算、执行时钟),不返回发送token或任务正文;终态BLOCKED的Eye可只读检查同一个已确认Owner,不获得发送权。
|
|
64
66
|
|
|
65
|
-
|
|
67
|
+
已由可信操作者核实修复的可逆工程阻断(不限于历史 Start/adopt 故障),可按实际恢复合同通过原内置 `continue.html?tabId=<原Owner精确tabId>` 申请一次恢复。必须保持Session/project/Chat/generation、两条原消息身份和执行时钟,无待确认表单;未知发送、权限拒绝和页面挑战不自动恢复。恢复预算在后续Continue中继续保留。恢复成功不是业务DONE。
|
|
66
68
|
|
|
67
69
|
仅升级前的0.3.52遗留预留可能需要显式 `&repairLegacyReservation=<Native原updatedAt>`:操作者须先验证保存的旧Native源码确实不能提交BLOCKED→PENDING,且原消息和指针未变。Worker还要求旧恢复来源、旧user未变、没有现代recoveryProtocol;Native在锁内对精确updatedAt做CAS。缺任何证据均禁止使用;此参数不能解锁现代未知发送,也不是自动重试机制。禁止直接编辑active-session.json。
|
|
68
70
|
|
package/bin/native-host.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// Chrome Native Messaging: one request per process, no persistent server.
|
|
3
|
-
import {readRequest, finish
|
|
3
|
+
import {readRequest, finish} from '../lib/bridge.mjs';
|
|
4
4
|
import {readSession,writeSession} from '../lib/session-file.mjs';
|
|
5
5
|
import {registeredContext} from '../lib/context-binding.mjs';
|
|
6
6
|
const MAX_INPUT=48*1024*1024;
|
|
@@ -30,7 +30,7 @@ process.stdin.on('data',chunk=>{
|
|
|
30
30
|
const session=readSession();let projectContext=null,contextStatus='MISSING';
|
|
31
31
|
try{projectContext=session?registeredContext(session.projectId):null;
|
|
32
32
|
if(projectContext)contextStatus='VERIFIED';}catch{contextStatus='UNVERIFIED';}
|
|
33
|
-
write({status:'OK',session,
|
|
33
|
+
write({status:'OK',session,contextStatus,...(projectContext?{projectContext}:{})});
|
|
34
34
|
}else if(m.op==='session-sync'){
|
|
35
35
|
write({status:'OK',session:writeSession(m.session,
|
|
36
36
|
m.replaceBlockedSessionId,m.resumeBlockedSessionId,m.resumeBlockedUpdatedAt??null)});
|
|
@@ -179,6 +179,32 @@ async function retryNativeOnce(target) {
|
|
|
179
179
|
});
|
|
180
180
|
return execution?.result || {status:'UNVERIFIED',reason:'RETRY_RESULT_UNKNOWN'};
|
|
181
181
|
}
|
|
182
|
+
// Recovery-only UI reveal. A Worker+Native CAS check must grant the exact
|
|
183
|
+
// terminal Owner before this Action can move its viewport. No message is sent.
|
|
184
|
+
async function revealLatestOwnerTurn(tabId, expectedPage) {
|
|
185
|
+
const [execution]=await chrome.scripting.executeScript({
|
|
186
|
+
target:{tabId},
|
|
187
|
+
func: page => {
|
|
188
|
+
if(location.origin!=='https://chatgpt.com'||location.pathname!==page)
|
|
189
|
+
return 'CHAT_PAGE_CHANGED';
|
|
190
|
+
const marks=[...document.querySelectorAll('main [data-chatgpt-search-unit-key]')];
|
|
191
|
+
let ancestor=marks.at(-1);
|
|
192
|
+
if(!ancestor)return 'NO_VISIBLE_TURN';
|
|
193
|
+
while(ancestor){
|
|
194
|
+
const style=getComputedStyle(ancestor);
|
|
195
|
+
if(/^(auto|scroll)$/.test(style.overflowY)
|
|
196
|
+
&&ancestor.scrollHeight-ancestor.clientHeight>24){
|
|
197
|
+
ancestor.scrollTop=ancestor.scrollHeight;
|
|
198
|
+
return 'SCROLLED';
|
|
199
|
+
}
|
|
200
|
+
ancestor=ancestor.parentElement;
|
|
201
|
+
}
|
|
202
|
+
return 'CHAT_SCROLL_CONTAINER_UNVERIFIED';
|
|
203
|
+
},args:[expectedPage]
|
|
204
|
+
});
|
|
205
|
+
if(execution?.result!=='SCROLLED')
|
|
206
|
+
throw Error(execution?.result||'CHAT_SCROLL_UNVERIFIED');
|
|
207
|
+
}
|
|
182
208
|
async function run() {
|
|
183
209
|
const params = new URLSearchParams(location.search);
|
|
184
210
|
const raw = params.get("tabId") || "";
|
|
@@ -194,6 +220,18 @@ async function run() {
|
|
|
194
220
|
if (!own?.id || own.url !== location.href) throw Error("ACTION_TAB_UNVERIFIED");
|
|
195
221
|
if (!token) {
|
|
196
222
|
show("VERIFYING", "手动打开 Continue:核对当前已完成的 Turn,并申请单次发送许可。");
|
|
223
|
+
if(params.has("resumeBlockedAt")){
|
|
224
|
+
// A terminal Chat may be displaying an older virtualized segment. Only
|
|
225
|
+
// the exact operator-acknowledged Native revision can authorize a
|
|
226
|
+
// one-time scroll by this formal Action, before double identity proof.
|
|
227
|
+
const reveal=await chrome.runtime.sendMessage({
|
|
228
|
+
type:"CHAT_LOOP_ACTION_MANUAL_REVEAL_V1",
|
|
229
|
+
tabId,resumeBlockedAt:Number(params.get("resumeBlockedAt"))
|
|
230
|
+
});
|
|
231
|
+
if(reveal?.status!=="OK")throw Error(reveal?.code||"REVEAL_NOT_AUTHORIZED");
|
|
232
|
+
await revealLatestOwnerTurn(tabId,reveal.page);
|
|
233
|
+
await new Promise(resolve=>setTimeout(resolve,400));
|
|
234
|
+
}
|
|
197
235
|
const prepared = await chrome.runtime.sendMessage({
|
|
198
236
|
type: "CHAT_LOOP_ACTION_MANUAL_PREPARE_V1", action: "CONTINUE",
|
|
199
237
|
...(raw ? {tabId} : {})
|
package/extension/background.js
CHANGED
|
@@ -7,6 +7,7 @@ const SESSION_HOST = "com.tomflow.chatloop.extension";
|
|
|
7
7
|
const RUN_BUDGET_MS = 4 * 60 * 60 * 1000;
|
|
8
8
|
const ALARM_NAME = "chat-loop.turn-watch.v1";
|
|
9
9
|
const DEADLINE_ALARM_NAME = "chat-loop.handoff-deadline.v1";
|
|
10
|
+
const ENGINEERING_FAILURE_NOTE = "【故障边界】编译或测试失败应诊断修复,不是网页运行错误。MCP 初始化或连接临时失败时,先核查已启动进程与未知副作用;只有确认后续是安全只读操作,才可针对本次独立故障再安排一次跨轮复核并输出 CONTINUE。若同一故障复核仍无进展,或消息发送结果、Owner、审批、权限不可信,则 BLOCKED,绝不重复执行未知副作用。不同故障分别判断,不能沿用旧故障的重试次数。";
|
|
10
11
|
const CONTINUE_TEXT = "继续当前任务,完成本轮后只在末行写一个状态:[CHAT_LOOP_STATUS:CONTINUE]、[CHAT_LOOP_STATUS:DONE] 或 [CHAT_LOOP_STATUS:BLOCKED]。";
|
|
11
12
|
const turnToolNote = token => "\n\n【Chat Loop 本轮工具凭证】只有本轮需要自定下一轮内容或提前交接时,才能调用 chat_loop_extension__continue / chat_loop_extension__handoff;参数 turnToken 填写 " + token + "。工具只登记意图,不等待本轮结束,不直接发送;请照常在本轮结束时输出 CONTINUE、DONE 或 BLOCKED 标记。不要在助手正文重复该凭证。";
|
|
12
13
|
let queue = Promise.resolve();
|
|
@@ -143,6 +144,10 @@ function sessionProjection(run) {
|
|
|
143
144
|
activeChatUrl:activeChatId?"https://chatgpt.com"+page:null,
|
|
144
145
|
updatedAt:Date.now()};
|
|
145
146
|
}
|
|
147
|
+
const SESSION_POINTER_KEYS=Object.freeze(['sessionId','projectId','phase',
|
|
148
|
+
'generation','activeChatId','activeChatUrl']);
|
|
149
|
+
const matchesNativeProjection=(projected,native)=>Boolean(native
|
|
150
|
+
&&SESSION_POINTER_KEYS.every(key=>projected[key]===native[key]));
|
|
146
151
|
const sessionPage=(sender,name,id)=> Number.isInteger(sender.tab?.id)
|
|
147
152
|
&& typeof id==='string'&&/^[a-f0-9]{32}$/.test(id)
|
|
148
153
|
&& sender.url===chrome.runtime.getURL(name+'.html')+'?requestId='+id;
|
|
@@ -386,8 +391,7 @@ async function sessionStatus(message,sender){
|
|
|
386
391
|
const disk=await chrome.runtime.sendNativeMessage(SESSION_HOST,{op:'session-read'}).catch(()=>null);
|
|
387
392
|
if(disk?.status!=='OK')return {status:'UNVERIFIED',code:'SESSION_STATE_UNVERIFIED'};
|
|
388
393
|
const projection=run?.sessionId?sessionProjection(run):null;
|
|
389
|
-
if(projection
|
|
390
|
-
'activeChatId','activeChatUrl'].some(key=>projection[key]!==disk.session[key])))
|
|
394
|
+
if(projection&&!matchesNativeProjection(projection,disk.session))
|
|
391
395
|
return {status:'UNVERIFIED',code:'SESSION_FILE_MISMATCH'};
|
|
392
396
|
if(!run?.sessionId&&disk.session&&disk.session.phase!=='DONE')
|
|
393
397
|
return {status:'UNVERIFIED',code:'SESSION_OWNER_MISMATCH'};
|
|
@@ -401,13 +405,19 @@ async function sessionStatus(message,sender){
|
|
|
401
405
|
const projectContext=disk.contextStatus==='VERIFIED'
|
|
402
406
|
&&disk.projectContext?.projectId===run.projectId
|
|
403
407
|
?disk.projectContext:null;
|
|
404
|
-
if(record.activeChatId&&run.phase
|
|
408
|
+
if(record.activeChatId&&['WAITING_REPLY','BLOCKED'].includes(run.phase)){
|
|
405
409
|
const tab=await chrome.tabs.get(run.tabId).catch(()=>null);
|
|
406
410
|
if(!tab||pathOf(tab.url)!==run.page)
|
|
407
411
|
return {status:'UNVERIFIED',code:'OWNER_TAB_MISSING',session:record};
|
|
408
412
|
}
|
|
409
|
-
|
|
413
|
+
// Identity comes from the verified Worker projection, but updatedAt is
|
|
414
|
+
// Native's durable CAS revision. Never report a synthetic timestamp as a
|
|
415
|
+
// usable recovery credential.
|
|
416
|
+
return {status:'OK',state:run.phase==='BLOCKED'?'BLOCKED':'ACTIVE',session:disk.session,
|
|
410
417
|
diagnostics:{extensionVersion:chrome.runtime.getManifest?.().version||null,
|
|
418
|
+
// The numeric tab ID is a locator, never a send capability. Expose only
|
|
419
|
+
// for an exactly verified terminal/awaiting Owner, not a guessed tab.
|
|
420
|
+
ownerTabId:['WAITING_REPLY','BLOCKED'].includes(run.phase)?run.tabId:null,
|
|
411
421
|
reason:run.reason||null,action:run.action||null,
|
|
412
422
|
userKey:run.userKey||null,assistantKey:run.assistantKey||null,
|
|
413
423
|
newUserKey:run.newUserKey||null,recoveryAttempts:run.recoveryAttempts||0,
|
|
@@ -585,8 +595,7 @@ async function onTurnBlocked(message, sender) {
|
|
|
585
595
|
// or evade site access controls. Keep the original Chat and user Turn intact.
|
|
586
596
|
if (reason === "SECURITY_CHALLENGE") {
|
|
587
597
|
await saveRun({...previous, phase:"BLOCKED", reason,
|
|
588
|
-
lastFaultProof:faultProof("SECURITY_CHALLENGE")
|
|
589
|
-
errorUserKey:message.userKey, errorAt:Date.now()});
|
|
598
|
+
lastFaultProof:faultProof("SECURITY_CHALLENGE")});
|
|
590
599
|
return {status:"BLOCKED", code:reason};
|
|
591
600
|
}
|
|
592
601
|
// The second capacity failure immediately after an ERROR Handoff must not
|
|
@@ -620,8 +629,7 @@ async function onTurnBlocked(message, sender) {
|
|
|
620
629
|
? previous.retryCount === 1 ? "PAGE_ERROR_AFTER_RETRY" : "PAGE_ERROR_NO_RETRY_BUTTON"
|
|
621
630
|
: "CONTEXT_HANDOFF_REPEATED";
|
|
622
631
|
await saveRun({...previous, phase:"BLOCKED", reason:finalReason,
|
|
623
|
-
lastFaultProof:faultProof(finalReason)
|
|
624
|
-
errorUserKey:message.userKey, errorAt:Date.now()});
|
|
632
|
+
lastFaultProof:faultProof(finalReason)});
|
|
625
633
|
return {status: "BLOCKED", code: reason === "PAGE_ERROR" ? "PAGE_ERROR" : "CONTEXT_HANDOFF_REPEATED"};
|
|
626
634
|
}
|
|
627
635
|
// A model-driven request can only be queued against a currently RUNNING,
|
|
@@ -859,6 +867,38 @@ async function repairUncommittedBlockedRecovery(){
|
|
|
859
867
|
await saveRun(restored);
|
|
860
868
|
return restored;
|
|
861
869
|
}
|
|
870
|
+
// Only an explicitly opened, existing Continue Action may reveal a
|
|
871
|
+
// scroll-virtualized *terminal Owner* before the normal double Turn check.
|
|
872
|
+
// This grants no send permit and changes neither Worker nor Native state.
|
|
873
|
+
// The Action alone may scroll the verified Chat UI; the Worker never does.
|
|
874
|
+
async function onManualReveal(message,sender) {
|
|
875
|
+
const run=await readRun();
|
|
876
|
+
if(!run?.sessionId||run.phase!=='BLOCKED'||run.reason!=='BLOCKED'
|
|
877
|
+
||run.action!=='CONTINUE'||run.recoveryProtocol!==1
|
|
878
|
+
||!(run.recoveryAttempts>0)
|
|
879
|
+
||run.recoverySourceAssistantKey===run.assistantKey
|
|
880
|
+
||run.newUserKey!==run.userKey
|
|
881
|
+
||!Number.isInteger(run.tabId)||message.tabId!==run.tabId
|
|
882
|
+
||!Number.isSafeInteger(message.resumeBlockedAt)
|
|
883
|
+
||message.resumeBlockedAt<=0 ||!Number.isInteger(sender.tab?.id))
|
|
884
|
+
return {status:'DENIED',code:'REVEAL_OWNER_UNVERIFIED'};
|
|
885
|
+
let url;
|
|
886
|
+
try{url=new URL(sender.url);}catch{return {status:'DENIED',code:'REVEAL_SOURCE_INVALID'};}
|
|
887
|
+
if(url.origin!==new URL(chrome.runtime.getURL('continue.html')).origin
|
|
888
|
+
||url.pathname!=='/continue.html'
|
|
889
|
+
||url.searchParams.size!==2
|
|
890
|
+
||url.searchParams.get('tabId')!==String(run.tabId)
|
|
891
|
+
||url.searchParams.get('resumeBlockedAt')!==String(message.resumeBlockedAt))
|
|
892
|
+
return {status:'DENIED',code:'REVEAL_SOURCE_INVALID'};
|
|
893
|
+
const tab=await chrome.tabs.get(run.tabId).catch(()=>null);
|
|
894
|
+
if(!tab||pathOf(tab.url)!==run.page)
|
|
895
|
+
return {status:'DENIED',code:'REVEAL_CHAT_CHANGED'};
|
|
896
|
+
const disk=await chrome.runtime.sendNativeMessage(SESSION_HOST,{op:'session-read'}).catch(()=>null);
|
|
897
|
+
if(disk?.status!=='OK'||!matchesNativeProjection(sessionProjection(run),disk.session)
|
|
898
|
+
||disk.session.updatedAt!==message.resumeBlockedAt)
|
|
899
|
+
return {status:'DENIED',code:'REVEAL_NATIVE_CAS_UNVERIFIED'};
|
|
900
|
+
return {status:'OK',page:run.page};
|
|
901
|
+
}
|
|
862
902
|
async function onManualPrepare(message, sender) {
|
|
863
903
|
const requested = message.action;
|
|
864
904
|
if (!["CONTINUE", "HANDOFF"].includes(requested)
|
|
@@ -1030,9 +1070,8 @@ async function onTake(message, sender) {
|
|
|
1030
1070
|
if(run.action==='HANDOFF'&&run.sessionId){
|
|
1031
1071
|
const durable=await chrome.runtime.sendNativeMessage(SESSION_HOST,{op:'session-read'}).catch(()=>null);
|
|
1032
1072
|
const projection=sessionProjection(run);
|
|
1033
|
-
if(durable?.status!=='OK'
|
|
1034
|
-
|
|
1035
|
-
.some(k=>durable.session[k]!==projection[k])
|
|
1073
|
+
if(durable?.status!=='OK'
|
|
1074
|
+
||!matchesNativeProjection(projection,durable.session)
|
|
1036
1075
|
||durable.contextStatus==='UNVERIFIED'
|
|
1037
1076
|
||durable.projectContext&&durable.projectContext.projectId!==run.projectId){
|
|
1038
1077
|
await saveRun({...run,phase:'BLOCKED',reason:'HANDOFF_CONTEXT_UNVERIFIED'});
|
|
@@ -1053,12 +1092,10 @@ async function onTake(message, sender) {
|
|
|
1053
1092
|
modelTurnNote: modelTurnToken ? turnToolNote(modelTurnToken) : "",
|
|
1054
1093
|
handoffMode: run.handoffMode || null, retryMode: run.retryMode || null,
|
|
1055
1094
|
...(projectContext?{projectContext}:{}),
|
|
1056
|
-
recoveryMode:run.recoveryMode||null,
|
|
1057
1095
|
target: {tabId: run.tabId, page: run.page,
|
|
1058
1096
|
...(run.sessionId?{sessionId:run.sessionId,projectId:run.projectId,
|
|
1059
1097
|
generation:run.generation||0}:{}),
|
|
1060
|
-
|
|
1061
|
-
recoveryMode:run.recoveryMode||null,
|
|
1098
|
+
recoveryMode:run.recoveryMode||null,
|
|
1062
1099
|
assistantKey: run.assistantKey,
|
|
1063
1100
|
userKey: run.retryMode === "NATIVE" || run.handoffMode === "ERROR"
|
|
1064
1101
|
? run.newUserKey : run.userKey,
|
|
@@ -1069,7 +1106,7 @@ async function onTake(message, sender) {
|
|
|
1069
1106
|
? {id:run.modelIntent.id,nextPrompt:run.modelIntent.nextPrompt} : null,
|
|
1070
1107
|
text: run.action === "HANDOFF" ? run.handoffText || null
|
|
1071
1108
|
: run.recoveryMode==="TOOL_PREFLIGHT_REPAIRED"
|
|
1072
|
-
? "【Chat Loop
|
|
1109
|
+
? "【Chat Loop 同 Chat 受控恢复】上一轮以 BLOCKED 结束;当前恢复已通过唯一 Owner、原 Chat 和 Native 身份核验,但不代表工程问题已自动解决。不要再次调用 Start、不要新建 Chat、不要重复 R/P 审批。首先核实原工作区真实状态、已执行副作用和当前 Tools 可调用能力,再依据原任务唯一检查点继续尚未完成的工作、测试与迭代;若仍有真实风险如实 BLOCKED,不要再次反复自恢复。本轮结束末行独立输出 [CHAT_LOOP_STATUS:CONTINUE]、[CHAT_LOOP_STATUS:DONE] 或 [CHAT_LOOP_STATUS:BLOCKED]。"
|
|
1073
1110
|
: run.modelIntent?.action==="CONTINUE" ? (
|
|
1074
1111
|
"【Chat Loop 续接来源】上一轮由模型登记的 Continue 请求 " + run.modelIntent.id
|
|
1075
1112
|
+ " 已被扩展唯一 Action 领取。\n"
|
|
@@ -1078,6 +1115,10 @@ async function onTake(message, sender) {
|
|
|
1078
1115
|
+ "执行前核对当前项目状态、既有用户授权和已完成副作用,不重做不明操作。"
|
|
1079
1116
|
+ "本轮完成后,末行只输出一个状态标记:[CHAT_LOOP_STATUS:CONTINUE]、[CHAT_LOOP_STATUS:DONE] 或 [CHAT_LOOP_STATUS:BLOCKED]。")
|
|
1080
1117
|
: CONTINUE_TEXT};
|
|
1118
|
+
// A single error contract applies to default, model-specified and repaired
|
|
1119
|
+
// Continue prompts; the Worker still obeys the model's terminal marker.
|
|
1120
|
+
if(run.action==="CONTINUE" && typeof permit.text==="string")
|
|
1121
|
+
permit.text=ENGINEERING_FAILURE_NOTE+"\n\n"+permit.text;
|
|
1081
1122
|
if (modelTurnToken && typeof permit.text === "string")
|
|
1082
1123
|
permit.text += permit.modelTurnNote;
|
|
1083
1124
|
return permit;
|
|
@@ -1155,8 +1196,7 @@ async function onResult(message, sender) {
|
|
|
1155
1196
|
status:finalStatus,actualAction:run.action,
|
|
1156
1197
|
reason:override?"OVERRIDDEN_BY_DEADLINE":confirmed?null:failure,
|
|
1157
1198
|
checkpointForwarded:confirmed&&override});
|
|
1158
|
-
|
|
1159
|
-
result:finalStatus,at:Date.now()};
|
|
1199
|
+
// The bounded modelReceipts entry above is the unique final intent record.
|
|
1160
1200
|
delete next.modelIntent;
|
|
1161
1201
|
}
|
|
1162
1202
|
if (!confirmed) delete next.modelTurnToken;
|
|
@@ -1342,6 +1382,7 @@ const SERIAL_ROUTES=new Map([
|
|
|
1342
1382
|
['CHAT_LOOP_TURN_BLOCKED_V1',onTurnBlocked],
|
|
1343
1383
|
['CHAT_LOOP_ACTION_TAKE_V1',onTake],
|
|
1344
1384
|
['CHAT_LOOP_ACTION_RESULT_V1',onResult],
|
|
1385
|
+
['CHAT_LOOP_ACTION_MANUAL_REVEAL_V1',onManualReveal],
|
|
1345
1386
|
['CHAT_LOOP_ACTION_MANUAL_PREPARE_V1',onManualPrepare],
|
|
1346
1387
|
['CHAT_LOOP_MODEL_INTENT_V1',onModelIntent],
|
|
1347
1388
|
['CHAT_LOOP_MODEL_INTENT_STATUS_V1',onModelIntentStatus],
|
package/extension/manifest.json
CHANGED