@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 +11 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -2
- package/dist/index.mjs.map +1 -1
- package/dist/mesh-tool-names.d.ts +2 -2
- package/dist/turn-ipc-mission.d.ts +3 -1
- package/dist/turn-ipc-queue.d.ts +4 -0
- package/package.json +1 -1
- package/src/mesh-tool-names.ts +2 -0
- package/src/turn-ipc-mission.ts +5 -2
- package/src/turn-ipc-queue.ts +12 -3
package/dist/index.mjs
CHANGED
|
@@ -779,9 +779,11 @@ var CANONICAL_MESH_TOOL_NAMES = [
|
|
|
779
779
|
"mesh_add_node",
|
|
780
780
|
"mesh_reattach_source_parent",
|
|
781
781
|
"mesh_attach_remote",
|
|
782
|
+
"mesh_host_pairing",
|
|
782
783
|
"mesh_clone_node",
|
|
783
784
|
"mesh_remove_node",
|
|
784
785
|
"mesh_retry_node_bootstrap",
|
|
786
|
+
"mesh_recover_node_identity",
|
|
785
787
|
"mesh_cleanup_worktree_nodes",
|
|
786
788
|
"mesh_refine_node",
|
|
787
789
|
"mesh_refine_batch",
|
|
@@ -3123,7 +3125,7 @@ function isLedgerQueryEntryWire(value) {
|
|
|
3123
3125
|
return true;
|
|
3124
3126
|
}
|
|
3125
3127
|
function isLedgerQuerySummaryWire(value) {
|
|
3126
|
-
const keys = ["meshId", "totalEntries", "taskDispatched", "taskCompleted", "taskFailed", "taskBlocked", "taskStalled", "sessionLaunched", "checkpointCreated", "lastActivityAt", "recentFailures", "taskBlocked", "refineFailed"];
|
|
3128
|
+
const keys = ["meshId", "totalEntries", "taskDispatched", "taskCompleted", "taskFailed", "taskBlocked", "taskStalled", "sessionLaunched", "checkpointCreated", "lastActivityAt", "recentFailures", "taskBlocked", "refineFailed", "recentRefineFailures"];
|
|
3127
3129
|
if (!isRecord(value) || !hasOnlyKeys2(value, keys)) return false;
|
|
3128
3130
|
if (!isEvidenceIdentifier(value.meshId)) return false;
|
|
3129
3131
|
for (const k of ["totalEntries", "taskDispatched", "taskCompleted", "taskFailed", "taskStalled", "sessionLaunched", "checkpointCreated", "recentFailures"]) {
|
|
@@ -3131,6 +3133,7 @@ function isLedgerQuerySummaryWire(value) {
|
|
|
3131
3133
|
}
|
|
3132
3134
|
if (value.taskBlocked !== void 0 && !isNonNegativeInt(value.taskBlocked)) return false;
|
|
3133
3135
|
if (value.refineFailed !== void 0 && !isNonNegativeInt(value.refineFailed)) return false;
|
|
3136
|
+
if (value.recentRefineFailures !== void 0 && !isNonNegativeInt(value.recentRefineFailures)) return false;
|
|
3134
3137
|
if (value.lastActivityAt !== null && typeof value.lastActivityAt !== "string") return false;
|
|
3135
3138
|
return true;
|
|
3136
3139
|
}
|
|
@@ -3300,11 +3303,17 @@ function decodeRecoveryContextQueryResponse(value) {
|
|
|
3300
3303
|
return isRecoveryContextQueryResponse(value) ? value : null;
|
|
3301
3304
|
}
|
|
3302
3305
|
function decodeQueueReviseRequest(value) {
|
|
3303
|
-
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;
|
|
3306
|
+
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;
|
|
3307
|
+
if (value.dryRun !== void 0 && typeof value.dryRun !== "boolean") return null;
|
|
3308
|
+
if (value.deferScheduling !== void 0 && typeof value.deferScheduling !== "boolean") return null;
|
|
3304
3309
|
const p = value.patch;
|
|
3310
|
+
if (p.requestQuotaOverride && (value.dryRun !== void 0 || value.deferScheduling !== void 0)) return null;
|
|
3305
3311
|
if (p.requestQuotaOverride !== void 0 && (p.requestQuotaOverride !== true || Object.keys(p).length !== 1)) return null;
|
|
3312
|
+
if (p.attestActiveOwnership && (value.dryRun !== void 0 || value.deferScheduling !== void 0)) return null;
|
|
3313
|
+
if (p.attestActiveOwnership !== void 0 && (p.attestActiveOwnership !== true || Object.keys(p).length !== 1)) return null;
|
|
3306
3314
|
if (p.message !== void 0 && (typeof p.message !== "string" || !p.message.trim())) return null;
|
|
3307
3315
|
if (p.phase !== void 0 && p.phase !== "source" && p.phase !== "integration") return null;
|
|
3316
|
+
if (p.difficulty !== void 0 && p.difficulty !== "easy" && p.difficulty !== "medium" && p.difficulty !== "difficult" && p.difficulty !== "freeform") return null;
|
|
3308
3317
|
for (const key of ["ownedPaths", "dependsOn"]) {
|
|
3309
3318
|
if (p[key] !== void 0 && (!Array.isArray(p[key]) || !p[key].every((x) => typeof x === "string" && !!x.trim()))) return null;
|
|
3310
3319
|
}
|