@axiom-lattice/protocols 4.7.0 → 4.8.0

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
@@ -891,10 +891,11 @@ function parseTrustedRunContext(value) {
891
891
  "role",
892
892
  "title"
893
893
  ];
894
- const projectRoomValues = snapshotExactRecord(projectRoomValue, requiredKeys, ["responsibility", "source"]);
894
+ const projectRoomValues = snapshotExactRecord(projectRoomValue, requiredKeys, ["responsibility", "source", "rosterExempt"]);
895
895
  const hasResponsibility = projectRoomValues !== void 0 && Object.prototype.hasOwnProperty.call(projectRoomValues, "responsibility");
896
896
  const hasSource = projectRoomValues !== void 0 && Object.prototype.hasOwnProperty.call(projectRoomValues, "source");
897
- if (!projectRoomValues || requiredKeys.some((key) => typeof projectRoomValues[key] !== "string" || projectRoomValues[key].length === 0) || hasResponsibility && projectRoomValues.responsibility !== void 0 && (typeof projectRoomValues.responsibility !== "string" || projectRoomValues.responsibility.length === 0) || hasSource && projectRoomValues.source !== void 0 && (typeof projectRoomValues.source !== "string" || projectRoomValues.source.length === 0) || projectRoomValues.role !== "coordinator" && projectRoomValues.role !== "specialist") {
897
+ const hasRosterExempt = projectRoomValues !== void 0 && Object.prototype.hasOwnProperty.call(projectRoomValues, "rosterExempt");
898
+ if (!projectRoomValues || requiredKeys.some((key) => typeof projectRoomValues[key] !== "string" || projectRoomValues[key].length === 0) || hasResponsibility && projectRoomValues.responsibility !== void 0 && (typeof projectRoomValues.responsibility !== "string" || projectRoomValues.responsibility.length === 0) || hasSource && projectRoomValues.source !== void 0 && (typeof projectRoomValues.source !== "string" || projectRoomValues.source.length === 0) || hasRosterExempt && projectRoomValues.rosterExempt !== void 0 && typeof projectRoomValues.rosterExempt !== "boolean" || projectRoomValues.role !== "coordinator" && projectRoomValues.role !== "specialist") {
898
899
  throw new Error("Invalid trusted agent run context");
899
900
  }
900
901
  const parsedProjectRoom = {
@@ -915,6 +916,9 @@ function parseTrustedRunContext(value) {
915
916
  if (hasSource && typeof projectRoomValues.source === "string") {
916
917
  parsedProjectRoom.source = projectRoomValues.source;
917
918
  }
919
+ if (hasRosterExempt && projectRoomValues.rosterExempt === true) {
920
+ parsedProjectRoom.rosterExempt = true;
921
+ }
918
922
  return { projectRoom: parsedProjectRoom };
919
923
  }
920
924
  function parseQueuedExecutionMode(value) {