@adhdev/mesh-shared 1.0.82-rc.49 → 1.0.82-rc.50

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
@@ -1277,9 +1277,11 @@ var CANONICAL_MESH_TOOL_NAMES = [
1277
1277
  "mesh_add_node",
1278
1278
  "mesh_reattach_source_parent",
1279
1279
  "mesh_attach_remote",
1280
+ "mesh_host_pairing",
1280
1281
  "mesh_clone_node",
1281
1282
  "mesh_remove_node",
1282
1283
  "mesh_retry_node_bootstrap",
1284
+ "mesh_recover_node_identity",
1283
1285
  "mesh_cleanup_worktree_nodes",
1284
1286
  "mesh_refine_node",
1285
1287
  "mesh_refine_batch",
@@ -3621,7 +3623,7 @@ function isLedgerQueryEntryWire(value) {
3621
3623
  return true;
3622
3624
  }
3623
3625
  function isLedgerQuerySummaryWire(value) {
3624
- const keys = ["meshId", "totalEntries", "taskDispatched", "taskCompleted", "taskFailed", "taskBlocked", "taskStalled", "sessionLaunched", "checkpointCreated", "lastActivityAt", "recentFailures", "taskBlocked", "refineFailed"];
3626
+ const keys = ["meshId", "totalEntries", "taskDispatched", "taskCompleted", "taskFailed", "taskBlocked", "taskStalled", "sessionLaunched", "checkpointCreated", "lastActivityAt", "recentFailures", "taskBlocked", "refineFailed", "recentRefineFailures"];
3625
3627
  if (!isRecord(value) || !hasOnlyKeys2(value, keys)) return false;
3626
3628
  if (!isEvidenceIdentifier(value.meshId)) return false;
3627
3629
  for (const k of ["totalEntries", "taskDispatched", "taskCompleted", "taskFailed", "taskStalled", "sessionLaunched", "checkpointCreated", "recentFailures"]) {
@@ -3629,6 +3631,7 @@ function isLedgerQuerySummaryWire(value) {
3629
3631
  }
3630
3632
  if (value.taskBlocked !== void 0 && !isNonNegativeInt(value.taskBlocked)) return false;
3631
3633
  if (value.refineFailed !== void 0 && !isNonNegativeInt(value.refineFailed)) return false;
3634
+ if (value.recentRefineFailures !== void 0 && !isNonNegativeInt(value.recentRefineFailures)) return false;
3632
3635
  if (value.lastActivityAt !== null && typeof value.lastActivityAt !== "string") return false;
3633
3636
  return true;
3634
3637
  }
@@ -3798,11 +3801,17 @@ function decodeRecoveryContextQueryResponse(value) {
3798
3801
  return isRecoveryContextQueryResponse(value) ? value : null;
3799
3802
  }
3800
3803
  function decodeQueueReviseRequest(value) {
3801
- if (!isRecord(value) || !hasOnlyKeys2(value, ["v", "meshId", "taskId", "expectedRevision", "patch"]) || value.v !== TURN_IPC_PROTOCOL_VERSION || !isEvidenceIdentifier(value.meshId) || !isEvidenceIdentifier(value.taskId) || !Number.isSafeInteger(value.expectedRevision) || value.expectedRevision < 0 || !isRecord(value.patch) || !Object.keys(value.patch).length || !hasOnlyKeys2(value.patch, ["message", "ownedPaths", "phase", "dependsOn", "routingPreferences", "review", "requestQuotaOverride"])) return null;
3804
+ if (!isRecord(value) || !hasOnlyKeys2(value, ["v", "meshId", "taskId", "expectedRevision", "patch", "dryRun", "deferScheduling"]) || value.v !== TURN_IPC_PROTOCOL_VERSION || !isEvidenceIdentifier(value.meshId) || !isEvidenceIdentifier(value.taskId) || !Number.isSafeInteger(value.expectedRevision) || value.expectedRevision < 0 || !isRecord(value.patch) || !Object.keys(value.patch).length || !hasOnlyKeys2(value.patch, ["message", "ownedPaths", "phase", "dependsOn", "routingPreferences", "review", "difficulty", "requestQuotaOverride", "attestActiveOwnership"])) return null;
3805
+ if (value.dryRun !== void 0 && typeof value.dryRun !== "boolean") return null;
3806
+ if (value.deferScheduling !== void 0 && typeof value.deferScheduling !== "boolean") return null;
3802
3807
  const p = value.patch;
3808
+ if (p.requestQuotaOverride && (value.dryRun !== void 0 || value.deferScheduling !== void 0)) return null;
3803
3809
  if (p.requestQuotaOverride !== void 0 && (p.requestQuotaOverride !== true || Object.keys(p).length !== 1)) return null;
3810
+ if (p.attestActiveOwnership && (value.dryRun !== void 0 || value.deferScheduling !== void 0)) return null;
3811
+ if (p.attestActiveOwnership !== void 0 && (p.attestActiveOwnership !== true || Object.keys(p).length !== 1)) return null;
3804
3812
  if (p.message !== void 0 && (typeof p.message !== "string" || !p.message.trim())) return null;
3805
3813
  if (p.phase !== void 0 && p.phase !== "source" && p.phase !== "integration") return null;
3814
+ if (p.difficulty !== void 0 && p.difficulty !== "easy" && p.difficulty !== "medium" && p.difficulty !== "difficult" && p.difficulty !== "freeform") return null;
3806
3815
  for (const key of ["ownedPaths", "dependsOn"]) {
3807
3816
  if (p[key] !== void 0 && (!Array.isArray(p[key]) || !p[key].every((x) => typeof x === "string" && !!x.trim()))) return null;
3808
3817
  }