@tomflow/proflow-execution-browser-extension 0.1.48 → 0.1.49

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.
@@ -53,7 +53,7 @@ export declare const behaviorAdapter: {
53
53
  ok: true;
54
54
  status: "SUCCEEDED";
55
55
  moduleRef: "execution-browser-extension";
56
- moduleVersion: "0.1.48";
56
+ moduleVersion: "0.1.49";
57
57
  data: {
58
58
  loadDir: string;
59
59
  };
@@ -66,7 +66,7 @@ export declare const behaviorAdapter: {
66
66
  readonly ok: true;
67
67
  readonly status: "SUCCEEDED";
68
68
  readonly moduleRef: "execution-browser-extension";
69
- readonly moduleVersion: "0.1.48";
69
+ readonly moduleVersion: "0.1.49";
70
70
  };
71
71
  observedEffects: never[];
72
72
  }>;
@@ -76,7 +76,7 @@ export declare const behaviorAdapter: {
76
76
  ok: true;
77
77
  status: "SUCCEEDED";
78
78
  moduleRef: "execution-browser-extension";
79
- moduleVersion: "0.1.48";
79
+ moduleVersion: "0.1.49";
80
80
  data: {
81
81
  setupStatus: "ACTION_REQUIRED" | "READY";
82
82
  runtimeStatus: "NOT_APPLICABLE";
@@ -101,7 +101,7 @@ export declare const behaviorAdapter: {
101
101
  result: {
102
102
  contract: "deployment.result.v1";
103
103
  moduleRef: "execution-browser-extension";
104
- moduleVersion: "0.1.48";
104
+ moduleVersion: "0.1.49";
105
105
  ok: false;
106
106
  status: "ACTION_REQUIRED";
107
107
  data: {
@@ -133,14 +133,14 @@ export declare const behaviorAdapter: {
133
133
  readonly ok: true;
134
134
  readonly status: "SUCCEEDED";
135
135
  readonly moduleRef: "execution-browser-extension";
136
- readonly moduleVersion: "0.1.48";
136
+ readonly moduleVersion: "0.1.49";
137
137
  };
138
138
  observedEffects: string[];
139
139
  } | {
140
140
  result: {
141
141
  contract: "deployment.result.v1";
142
142
  moduleRef: "execution-browser-extension";
143
- moduleVersion: "0.1.48";
143
+ moduleVersion: "0.1.49";
144
144
  ok: false;
145
145
  status: "FAILED";
146
146
  error: {
@@ -173,7 +173,7 @@ export declare const behaviorAdapter: {
173
173
  ok: true;
174
174
  status: "SUCCEEDED";
175
175
  moduleRef: "execution-browser-extension";
176
- moduleVersion: "0.1.48";
176
+ moduleVersion: "0.1.49";
177
177
  data: {
178
178
  docs: string;
179
179
  };
@@ -186,11 +186,11 @@ export declare const behaviorAdapter: {
186
186
  readonly ok: true;
187
187
  readonly status: "SUCCEEDED";
188
188
  readonly moduleRef: "execution-browser-extension";
189
- readonly moduleVersion: "0.1.48";
189
+ readonly moduleVersion: "0.1.49";
190
190
  } | {
191
191
  contract: "deployment.result.v1";
192
192
  moduleRef: "execution-browser-extension";
193
- moduleVersion: "0.1.48";
193
+ moduleVersion: "0.1.49";
194
194
  ok: false;
195
195
  status: "FAILED";
196
196
  error: {
@@ -207,7 +207,7 @@ export declare const behaviorAdapter: {
207
207
  readonly ok: true;
208
208
  readonly status: "SUCCEEDED";
209
209
  readonly moduleRef: "execution-browser-extension";
210
- readonly moduleVersion: "0.1.48";
210
+ readonly moduleVersion: "0.1.49";
211
211
  };
212
212
  observedEffects: never[];
213
213
  }>;
@@ -3,7 +3,7 @@ export declare const descriptor: {
3
3
  readonly contractVersion: "1.0.0";
4
4
  readonly moduleRef: "execution-browser-extension";
5
5
  readonly packageName: "@tomflow/proflow-execution-browser-extension";
6
- readonly moduleVersion: "0.1.48";
6
+ readonly moduleVersion: "0.1.49";
7
7
  readonly kind: "browser-extension";
8
8
  readonly templateVersion: "1.0.0";
9
9
  readonly platformCompatibility: ">=1.0.0 <2.0.0";
@@ -3,7 +3,7 @@ export const descriptor = {
3
3
  contractVersion: "1.0.0",
4
4
  moduleRef: "execution-browser-extension",
5
5
  packageName: "@tomflow/proflow-execution-browser-extension",
6
- moduleVersion: "0.1.48",
6
+ moduleVersion: "0.1.49",
7
7
  kind: "browser-extension",
8
8
  templateVersion: "1.0.0",
9
9
  platformCompatibility: ">=1.0.0 <2.0.0",
@@ -13843,6 +13843,29 @@ function createCollaborationCarrierApplication(options) {
13843
13843
  return Object.freeze({ deliverMessage, recoverPending });
13844
13844
  }
13845
13845
 
13846
+ // packages/execution-browser-extension/src/observer-recovery-rearm.ts
13847
+ function createObserverRecoveryRearm(recover) {
13848
+ let startupReady = false;
13849
+ let latestBridgeSessionEpoch = 0;
13850
+ const startupReadyAfterDenialRestore = () => {
13851
+ startupReady = true;
13852
+ recover();
13853
+ };
13854
+ const bridgeSessionEstablished = (epoch) => {
13855
+ if (!Number.isInteger(epoch) || epoch <= 0)
13856
+ throw new TypeError("bridge session epoch must be a positive integer");
13857
+ if (epoch <= latestBridgeSessionEpoch) return false;
13858
+ latestBridgeSessionEpoch = epoch;
13859
+ if (!startupReady) return false;
13860
+ recover();
13861
+ return true;
13862
+ };
13863
+ return Object.freeze({
13864
+ startupReady: startupReadyAfterDenialRestore,
13865
+ bridgeSessionEstablished
13866
+ });
13867
+ }
13868
+
13846
13869
  // packages/execution-browser-extension/src/recovery-trigger.ts
13847
13870
  async function boundedRecoveryObservation(observe, timeoutMs) {
13848
13871
  if (!Number.isFinite(timeoutMs) || timeoutMs <= 0)
@@ -14695,6 +14718,9 @@ function runObserverRecovery() {
14695
14718
  });
14696
14719
  return observerRecoveryInFlight;
14697
14720
  }
14721
+ var observerRecoveryRearm = createObserverRecoveryRearm(() => {
14722
+ void runObserverRecovery();
14723
+ });
14698
14724
  function observationFor(tabId) {
14699
14725
  const observed = sessions.get(tabId);
14700
14726
  if (!observed) throw new Error("CONTENT_SESSION_NOT_READY");
@@ -15274,6 +15300,7 @@ async function bridgeFetch(config2, path, init = {}) {
15274
15300
  });
15275
15301
  }
15276
15302
  var bridgeLoopStarted = false;
15303
+ var bridgeSessionEpoch = 0;
15277
15304
  async function runBridgeLoop() {
15278
15305
  if (bridgeLoopStarted) return;
15279
15306
  bridgeLoopStarted = true;
@@ -15294,6 +15321,8 @@ async function runBridgeLoop() {
15294
15321
  })
15295
15322
  });
15296
15323
  if (!hello.ok) throw new Error("BRIDGE_HELLO_REJECTED");
15324
+ bridgeSessionEpoch += 1;
15325
+ observerRecoveryRearm.bridgeSessionEstablished(bridgeSessionEpoch);
15297
15326
  await publishCarrierAttentions();
15298
15327
  let lastHeartbeatAt = Date.now();
15299
15328
  let lastExtensionKeepaliveAt = Date.now();
@@ -15627,7 +15656,7 @@ async function startBackgroundRuntime() {
15627
15656
  void runProvisioningBridgeLoop();
15628
15657
  const suppressedContinuations = await rebuildCarrierAttentionsFromTabs();
15629
15658
  suppressNextObserverRecovery(suppressedContinuations);
15630
- void runObserverRecovery();
15659
+ observerRecoveryRearm.startupReady();
15631
15660
  }
15632
15661
  chrome.action.onClicked.addListener(() => {
15633
15662
  void openTaskPage();
@@ -15639,7 +15668,7 @@ chrome.runtime.onInstalled.addListener(() => {
15639
15668
  void runBridgeLoop();
15640
15669
  const suppressedContinuations = await rebuildCarrierAttentionsFromTabs();
15641
15670
  suppressNextObserverRecovery(suppressedContinuations);
15642
- void runObserverRecovery();
15671
+ observerRecoveryRearm.startupReady();
15643
15672
  });
15644
15673
  });
15645
15674
  chrome.runtime.onStartup.addListener(() => {
@@ -15650,7 +15679,7 @@ chrome.runtime.onStartup.addListener(() => {
15650
15679
  void runBridgeLoop();
15651
15680
  const suppressedContinuations = await rebuildCarrierAttentionsFromTabs();
15652
15681
  suppressNextObserverRecovery(suppressedContinuations);
15653
- void runObserverRecovery();
15682
+ observerRecoveryRearm.startupReady();
15654
15683
  });
15655
15684
  });
15656
15685
  void startBackgroundRuntime();
@@ -0,0 +1,4 @@
1
+ export declare function createObserverRecoveryRearm(recover: () => void): Readonly<{
2
+ startupReady: () => void;
3
+ bridgeSessionEstablished: (epoch: number) => boolean;
4
+ }>;
@@ -0,0 +1,23 @@
1
+ export function createObserverRecoveryRearm(recover) {
2
+ let startupReady = false;
3
+ let latestBridgeSessionEpoch = 0;
4
+ const startupReadyAfterDenialRestore = () => {
5
+ startupReady = true;
6
+ recover();
7
+ };
8
+ const bridgeSessionEstablished = (epoch) => {
9
+ if (!Number.isInteger(epoch) || epoch <= 0)
10
+ throw new TypeError("bridge session epoch must be a positive integer");
11
+ if (epoch <= latestBridgeSessionEpoch)
12
+ return false;
13
+ latestBridgeSessionEpoch = epoch;
14
+ if (!startupReady)
15
+ return false;
16
+ recover();
17
+ return true;
18
+ };
19
+ return Object.freeze({
20
+ startupReady: startupReadyAfterDenialRestore,
21
+ bridgeSessionEstablished,
22
+ });
23
+ }
@@ -18,6 +18,7 @@ import {
18
18
  resolveRoutineCarrierPermission,
19
19
  } from "../src/carrier-permission-lifecycle.js";
20
20
  import { createCollaborationCarrierApplication } from "../src/collaboration-carrier.js";
21
+ import { createObserverRecoveryRearm } from "../src/observer-recovery-rearm.js";
21
22
  import {
22
23
  boundedRecoveryObservation,
23
24
  shouldTriggerObserverRecovery,
@@ -867,6 +868,10 @@ function runObserverRecovery() {
867
868
  return observerRecoveryInFlight;
868
869
  }
869
870
 
871
+ const observerRecoveryRearm = createObserverRecoveryRearm(() => {
872
+ void runObserverRecovery();
873
+ });
874
+
870
875
  function observationFor(tabId: number): ContentObservation {
871
876
  const observed = sessions.get(tabId);
872
877
  if (!observed) throw new Error("CONTENT_SESSION_NOT_READY");
@@ -1623,6 +1628,7 @@ async function bridgeFetch(
1623
1628
  }
1624
1629
 
1625
1630
  let bridgeLoopStarted = false;
1631
+ let bridgeSessionEpoch = 0;
1626
1632
  async function runBridgeLoop() {
1627
1633
  if (bridgeLoopStarted) return;
1628
1634
  bridgeLoopStarted = true;
@@ -1643,6 +1649,8 @@ async function runBridgeLoop() {
1643
1649
  }),
1644
1650
  });
1645
1651
  if (!hello.ok) throw new Error("BRIDGE_HELLO_REJECTED");
1652
+ bridgeSessionEpoch += 1;
1653
+ observerRecoveryRearm.bridgeSessionEstablished(bridgeSessionEpoch);
1646
1654
  await publishCarrierAttentions();
1647
1655
  // Hello only establishes a session. The first inner-loop action must be
1648
1656
  // a real command poll so Runtime readiness cannot be granted by hello alone.
@@ -2046,7 +2054,7 @@ async function startBackgroundRuntime(): Promise<void> {
2046
2054
  void runProvisioningBridgeLoop();
2047
2055
  const suppressedContinuations = await rebuildCarrierAttentionsFromTabs();
2048
2056
  suppressNextObserverRecovery(suppressedContinuations);
2049
- void runObserverRecovery();
2057
+ observerRecoveryRearm.startupReady();
2050
2058
  }
2051
2059
 
2052
2060
  chrome.action.onClicked.addListener(() => {
@@ -2059,7 +2067,7 @@ chrome.runtime.onInstalled.addListener(() => {
2059
2067
  void runBridgeLoop();
2060
2068
  const suppressedContinuations = await rebuildCarrierAttentionsFromTabs();
2061
2069
  suppressNextObserverRecovery(suppressedContinuations);
2062
- void runObserverRecovery();
2070
+ observerRecoveryRearm.startupReady();
2063
2071
  });
2064
2072
  });
2065
2073
  chrome.runtime.onStartup.addListener(() => {
@@ -2070,7 +2078,7 @@ chrome.runtime.onStartup.addListener(() => {
2070
2078
  void runBridgeLoop();
2071
2079
  const suppressedContinuations = await rebuildCarrierAttentionsFromTabs();
2072
2080
  suppressNextObserverRecovery(suppressedContinuations);
2073
- void runObserverRecovery();
2081
+ observerRecoveryRearm.startupReady();
2074
2082
  });
2075
2083
  });
2076
2084
  void startBackgroundRuntime();
package/manifest.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "manifest_version": 3,
3
3
  "name": "ProFlow Execution Browser",
4
- "version": "0.1.48",
4
+ "version": "0.1.49",
5
5
  "permissions": [
6
6
  "tabs",
7
7
  "storage"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tomflow/proflow-execution-browser-extension",
3
- "version": "0.1.48",
3
+ "version": "0.1.49",
4
4
  "description": "Execution-owned MV3 Browser executor, evidence provider and browser application surface.",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -27,8 +27,8 @@
27
27
  "SETUP.md"
28
28
  ],
29
29
  "dependencies": {
30
- "@tomflow/proflow-execution-contracts": "^0.1.10",
31
- "@tomflow/proflow-module-contract": "^0.1.13"
30
+ "@tomflow/proflow-module-contract": "^0.1.13",
31
+ "@tomflow/proflow-execution-contracts": "^0.1.10"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@tomflow/proflow-deployment-conformance": "^0.1.13",
@@ -3,7 +3,7 @@
3
3
  "contractVersion": "1.0.0",
4
4
  "moduleRef": "execution-browser-extension",
5
5
  "packageName": "@tomflow/proflow-execution-browser-extension",
6
- "moduleVersion": "0.1.48",
6
+ "moduleVersion": "0.1.49",
7
7
  "kind": "browser-extension",
8
8
  "templateVersion": "1.0.0",
9
9
  "platformCompatibility": ">=1.0.0 <2.0.0",