@adhdev/mesh-shared 1.0.82-rc.12 → 1.0.82-rc.14

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/dist/index.mjs CHANGED
@@ -307,7 +307,7 @@ function hasUsableWindow(window) {
307
307
  return !!window && typeof window.usedPercent === "number" && Number.isFinite(window.usedPercent);
308
308
  }
309
309
  function hasReading(quota) {
310
- if (hasUsableWindow(quota.session) || hasUsableWindow(quota.weekly)) return true;
310
+ if (hasUsableWindow(quota.session) || hasUsableWindow(quota.weekly) || hasUsableWindow(quota.monthly)) return true;
311
311
  return Array.isArray(quota.buckets) && quota.buckets.some((b) => !!b && typeof b.usedPercent === "number" && Number.isFinite(b.usedPercent));
312
312
  }
313
313
  function finiteMs(value) {
@@ -1438,6 +1438,7 @@ var MESH_THINKING_LEVELS = ["low", "medium", "high"];
1438
1438
  var MESH_DELIVERY_MODES = ["when_idle", "interrupt"];
1439
1439
  var MESH_SESSION_CLEANUP_MODES = ["preserve", "stop", "delete_stopped", "stop_and_delete"];
1440
1440
  var WORKER_REPORT_OUTCOMES = ["completed", "blocked", "failed"];
1441
+ var WORKER_REPORT_SUMMARY_MAX_CHARS = 8e3;
1441
1442
  var WORKER_BRANCH_STATES = [
1442
1443
  "merged_to_main",
1443
1444
  "pushed_feature_branch_needs_merge",
@@ -1860,7 +1861,8 @@ var HOLD_REASONS = [
1860
1861
  // — a turn_end commits the report (R9t), expiry commits it anyway (R13t) so
1861
1862
  // a session whose FSM never shows the idle edge again does not wait for
1862
1863
  // liveness / hard_ceiling.
1863
- "await_end"
1864
+ "await_end",
1865
+ "report_correction"
1864
1866
  ];
1865
1867
  var TURN_OUTCOMES = ["completed", "failed", "cancelled"];
1866
1868
  var COMMIT_STRENGTHS = ["genuine", "weak", "tool_report", "operator"];
@@ -1871,6 +1873,9 @@ var TURN_REASONS = [
1871
1873
  "transcript_final",
1872
1874
  "worker_reported",
1873
1875
  "finalization_timeout_no_response",
1876
+ "weak_end_liveness_unconfirmed",
1877
+ "weak_end_probe_unobserved",
1878
+ "report_correction_expired",
1874
1879
  "session_error",
1875
1880
  "provider_auth_failed",
1876
1881
  "provider_billing_failed",
@@ -1978,7 +1983,7 @@ var TURN_EVIDENCE_FIELD_SPECS = {
1978
1983
  },
1979
1984
  transcript_activity: { newestActivityAt: ms },
1980
1985
  no_progress: { stalledMs: ms, observedStatus: en(NO_PROGRESS_OBSERVED_STATUSES), finalAssistantPresent: bool },
1981
- liveness: { result: en(LIVENESS_RESULTS) },
1986
+ liveness: { result: en(LIVENESS_RESULTS), probeStartedAtMs: msOpt },
1982
1987
  process_exit: { exitCode: { t: "int", nullable: true }, providerFailure: enOpt(PROVIDER_FAILURES) },
1983
1988
  session_error: { reason: en(SESSION_ERROR_REASONS) },
1984
1989
  worker_report: {
@@ -1988,6 +1993,7 @@ var TURN_EVIDENCE_FIELD_SPECS = {
1988
1993
  branchState: enOpt(WORKER_BRANCH_STATES),
1989
1994
  touchedFileCount: intOpt
1990
1995
  },
1996
+ worker_report_correction_requested: { deliveryId: { t: "id", optional: true } },
1991
1997
  worker_progress: { note: { t: "summary_ref", optional: true } },
1992
1998
  git_side_effect: { dirty: bool, commitsSinceDispatch: { t: "int" }, attributable: bool },
1993
1999
  cancel: { reason: en(CANCEL_REASONS) },
@@ -3647,6 +3653,7 @@ export {
3647
3653
  WORKER_BRANCH_STATES,
3648
3654
  WORKER_PROTOCOL_FOOTER_MARKER,
3649
3655
  WORKER_REPORT_OUTCOMES,
3656
+ WORKER_REPORT_SUMMARY_MAX_CHARS,
3650
3657
  WORKER_TOOLS,
3651
3658
  appendWorkerProtocolFooter,
3652
3659
  argsCarryStatusProbeMarker,