@tomflow/chatloop-extension 0.4.3 → 0.4.4

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "manifest_version": 3,
3
3
  "name": "Chat Loop Extension",
4
- "version": "0.4.3",
4
+ "version": "0.4.4",
5
5
  "description": "Chat Loop browser companion: Eye actions, Turn observer, Continue and Handoff Actions",
6
6
  "permissions": [
7
7
  "activeTab",
@@ -114,12 +114,19 @@ const onBrowserMessage=(message, sender, reply) => {
114
114
  throw Error("INVALID_RELOAD_SOURCE");
115
115
  reply({status: "ACCEPTED"});
116
116
  await chrome.tabs.remove(id);
117
- // Reload destroys the MV3 Worker immediately. Its dispatch/reply AOP
118
- // terminal records have already been enqueued after the business reply,
119
- // but async Native transport may still be in flight. Drain only that
120
- // soft evidence before teardown; timeout/failure never retries the
121
- // Action or changes the accepted business result.
122
- try{await workerApi.audit.drain(300)}catch{/* Audit is non-authoritative. */}
117
+ // Reload terminates pending MV3 Native Messaging Promises immediately.
118
+ // Each span's terminal record follows its BEGIN across a one-shot
119
+ // Native process, which can take longer than a single 300-ms drain.
120
+ // The business receipt is already sent; only soft audit transport
121
+ // may run until this bounded teardown deadline (never retry Action).
122
+ try{
123
+ const deadline=Date.now()+2300;
124
+ while(Date.now()<deadline){
125
+ if(await workerApi.audit.drain(Math.min(700,deadline-Date.now())))break;
126
+ const health=workerApi.audit.health();
127
+ if(health.pending===0&&health.inFlight===0)break;
128
+ }
129
+ }catch{/* Audit cannot change the accepted business result. */}
123
130
  chrome.runtime.reload();
124
131
  } catch (error) {reply({status: "FAILED", code: error.message});}
125
132
  })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tomflow/chatloop-extension",
3
- "version": "0.4.3",
3
+ "version": "0.4.4",
4
4
  "type": "module",
5
5
  "description": "Chat Loop Extension package: nine formal Action pages and its own native CLI bridge",
6
6
  "bin": {