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

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.js CHANGED
@@ -144,6 +144,7 @@ __export(index_exports, {
144
144
  WORKER_BRANCH_STATES: () => WORKER_BRANCH_STATES,
145
145
  WORKER_PROTOCOL_FOOTER_MARKER: () => WORKER_PROTOCOL_FOOTER_MARKER,
146
146
  WORKER_REPORT_OUTCOMES: () => WORKER_REPORT_OUTCOMES,
147
+ WORKER_REPORT_SUMMARY_MAX_CHARS: () => WORKER_REPORT_SUMMARY_MAX_CHARS,
147
148
  WORKER_TOOLS: () => WORKER_TOOLS,
148
149
  appendWorkerProtocolFooter: () => appendWorkerProtocolFooter,
149
150
  argsCarryStatusProbeMarker: () => argsCarryStatusProbeMarker,
@@ -672,7 +673,7 @@ function hasUsableWindow(window) {
672
673
  return !!window && typeof window.usedPercent === "number" && Number.isFinite(window.usedPercent);
673
674
  }
674
675
  function hasReading(quota) {
675
- if (hasUsableWindow(quota.session) || hasUsableWindow(quota.weekly)) return true;
676
+ if (hasUsableWindow(quota.session) || hasUsableWindow(quota.weekly) || hasUsableWindow(quota.monthly)) return true;
676
677
  return Array.isArray(quota.buckets) && quota.buckets.some((b) => !!b && typeof b.usedPercent === "number" && Number.isFinite(b.usedPercent));
677
678
  }
678
679
  function finiteMs(value) {
@@ -1803,6 +1804,7 @@ var MESH_THINKING_LEVELS = ["low", "medium", "high"];
1803
1804
  var MESH_DELIVERY_MODES = ["when_idle", "interrupt"];
1804
1805
  var MESH_SESSION_CLEANUP_MODES = ["preserve", "stop", "delete_stopped", "stop_and_delete"];
1805
1806
  var WORKER_REPORT_OUTCOMES = ["completed", "blocked", "failed"];
1807
+ var WORKER_REPORT_SUMMARY_MAX_CHARS = 8e3;
1806
1808
  var WORKER_BRANCH_STATES = [
1807
1809
  "merged_to_main",
1808
1810
  "pushed_feature_branch_needs_merge",
@@ -2225,7 +2227,8 @@ var HOLD_REASONS = [
2225
2227
  // — a turn_end commits the report (R9t), expiry commits it anyway (R13t) so
2226
2228
  // a session whose FSM never shows the idle edge again does not wait for
2227
2229
  // liveness / hard_ceiling.
2228
- "await_end"
2230
+ "await_end",
2231
+ "report_correction"
2229
2232
  ];
2230
2233
  var TURN_OUTCOMES = ["completed", "failed", "cancelled"];
2231
2234
  var COMMIT_STRENGTHS = ["genuine", "weak", "tool_report", "operator"];
@@ -2236,6 +2239,9 @@ var TURN_REASONS = [
2236
2239
  "transcript_final",
2237
2240
  "worker_reported",
2238
2241
  "finalization_timeout_no_response",
2242
+ "weak_end_liveness_unconfirmed",
2243
+ "weak_end_probe_unobserved",
2244
+ "report_correction_expired",
2239
2245
  "session_error",
2240
2246
  "provider_auth_failed",
2241
2247
  "provider_billing_failed",
@@ -2343,7 +2349,7 @@ var TURN_EVIDENCE_FIELD_SPECS = {
2343
2349
  },
2344
2350
  transcript_activity: { newestActivityAt: ms },
2345
2351
  no_progress: { stalledMs: ms, observedStatus: en(NO_PROGRESS_OBSERVED_STATUSES), finalAssistantPresent: bool },
2346
- liveness: { result: en(LIVENESS_RESULTS) },
2352
+ liveness: { result: en(LIVENESS_RESULTS), probeStartedAtMs: msOpt },
2347
2353
  process_exit: { exitCode: { t: "int", nullable: true }, providerFailure: enOpt(PROVIDER_FAILURES) },
2348
2354
  session_error: { reason: en(SESSION_ERROR_REASONS) },
2349
2355
  worker_report: {
@@ -2353,6 +2359,7 @@ var TURN_EVIDENCE_FIELD_SPECS = {
2353
2359
  branchState: enOpt(WORKER_BRANCH_STATES),
2354
2360
  touchedFileCount: intOpt
2355
2361
  },
2362
+ worker_report_correction_requested: { deliveryId: { t: "id", optional: true } },
2356
2363
  worker_progress: { note: { t: "summary_ref", optional: true } },
2357
2364
  git_side_effect: { dirty: bool, commitsSinceDispatch: { t: "int" }, attributable: bool },
2358
2365
  cancel: { reason: en(CANCEL_REASONS) },
@@ -4013,6 +4020,7 @@ function isProviderQuestionBinding(value) {
4013
4020
  WORKER_BRANCH_STATES,
4014
4021
  WORKER_PROTOCOL_FOOTER_MARKER,
4015
4022
  WORKER_REPORT_OUTCOMES,
4023
+ WORKER_REPORT_SUMMARY_MAX_CHARS,
4016
4024
  WORKER_TOOLS,
4017
4025
  appendWorkerProtocolFooter,
4018
4026
  argsCarryStatusProbeMarker,