@mirrowel/opencode-openshare 0.3.0-dev.14 → 0.3.0-dev.15

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/ci/openshare.js CHANGED
@@ -1393,10 +1393,11 @@ function createEngine(deps) {
1393
1393
  const scheduleBindingWrite = (st) => {
1394
1394
  if (st.metaTimer)
1395
1395
  return;
1396
+ const debounce = Number(process.env.OPENSHARE_BINDING_WRITE_MS) > 0 ? Number(process.env.OPENSHARE_BINDING_WRITE_MS) : 30000;
1396
1397
  st.metaTimer = setTimeout(() => {
1397
1398
  st.metaTimer = null;
1398
1399
  chain = chain.then(() => writeBinding(st)).catch(() => {});
1399
- }, 30000);
1400
+ }, debounce);
1400
1401
  };
1401
1402
  const h8 = (url) => {
1402
1403
  let h = 5381;
package/dist/core.js CHANGED
@@ -778,10 +778,14 @@ export function createEngine(deps) {
778
778
  const scheduleBindingWrite = (st) => {
779
779
  if (st.metaTimer)
780
780
  return;
781
+ // env knob exists for the mock suites: their two-remote scenarios
782
+ // assert the SETTLED binding, and waiting out the production 30s
783
+ // coalescing window per scenario would dominate suite time
784
+ const debounce = Number(process.env.OPENSHARE_BINDING_WRITE_MS) > 0 ? Number(process.env.OPENSHARE_BINDING_WRITE_MS) : 30000;
781
785
  st.metaTimer = setTimeout(() => {
782
786
  st.metaTimer = null;
783
787
  chain = chain.then(() => writeBinding(st)).catch(() => { });
784
- }, 30000);
788
+ }, debounce);
785
789
  };
786
790
  // ---- spool (temporary buffer for unacked frames) ----------------------
787
791
  // One spool per session per server: `<sid>.<h8(url)>.meta/queue`. The
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mirrowel/opencode-openshare",
3
- "version": "0.3.0-dev.14",
3
+ "version": "0.3.0-dev.15",
4
4
  "type": "module",
5
5
  "description": "Open(code)Share — re:share: self-hosted session sharing for opencode. Server plugin (single file or package), optional TUI for interactive opt-in sharing.",
6
6
  "license": "MIT",
package/src/core.ts CHANGED
@@ -925,10 +925,14 @@ export function createEngine(deps: EngineDeps): Engine {
925
925
 
926
926
  const scheduleBindingWrite = (st: SessionState) => {
927
927
  if (st.metaTimer) return
928
+ // env knob exists for the mock suites: their two-remote scenarios
929
+ // assert the SETTLED binding, and waiting out the production 30s
930
+ // coalescing window per scenario would dominate suite time
931
+ const debounce = Number(process.env.OPENSHARE_BINDING_WRITE_MS) > 0 ? Number(process.env.OPENSHARE_BINDING_WRITE_MS) : 30000
928
932
  st.metaTimer = setTimeout(() => {
929
933
  st.metaTimer = null
930
934
  chain = chain.then(() => writeBinding(st)).catch(() => {})
931
- }, 30000)
935
+ }, debounce)
932
936
  }
933
937
 
934
938
  // ---- spool (temporary buffer for unacked frames) ----------------------