@tomflow/chatloop-extension 0.4.2 → 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.2",
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,6 +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 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. */}
117
130
  chrome.runtime.reload();
118
131
  } catch (error) {reply({status: "FAILED", code: error.message});}
119
132
  })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tomflow/chatloop-extension",
3
- "version": "0.4.2",
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": {