@axiom-lattice/protocols 4.1.4 → 4.2.1

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
@@ -629,6 +629,11 @@ function parseProjectRoomEventId(value) {
629
629
  function isProjectRoomEventId(value) {
630
630
  return parseProjectRoomEventId(value) !== void 0;
631
631
  }
632
+ var PROJECT_ROOM_USER_CHANNEL_PROJECT = "__user_channel__";
633
+ function projectRoomUserEventScope(tenantId, userId) {
634
+ if (!tenantId || !userId) throw new TypeError("Project Room user scope requires non-empty identifiers");
635
+ return { tenantId, roomId: `__user__:${userId}`, projectId: PROJECT_ROOM_USER_CHANNEL_PROJECT };
636
+ }
632
637
  function isoDate(value) {
633
638
  if (typeof value !== "object" || value === null) return void 0;
634
639
  try {
@@ -852,6 +857,15 @@ function parseQueuedExecutionMode(value) {
852
857
  if (value !== "followup") throw new Error("Invalid queued execution mode");
853
858
  return value;
854
859
  }
860
+
861
+ // src/OpenProtocol.ts
862
+ function effectiveGrants(record) {
863
+ if (record.grants && record.grants.length > 0) return record.grants;
864
+ if (record.assistantIds && record.assistantIds.length > 0) {
865
+ return [{ domain: "agent", items: record.assistantIds }];
866
+ }
867
+ return [{ domain: "agent" }];
868
+ }
855
869
  export {
856
870
  AgentType,
857
871
  ChannelBindingMigrationConflictError,
@@ -865,6 +879,7 @@ export {
865
879
  McpMessageType,
866
880
  MemoryType,
867
881
  MessageChunkTypes,
882
+ PROJECT_ROOM_USER_CHANNEL_PROJECT,
868
883
  PROJECT_TASK_LIFECYCLE_ACTIONS,
869
884
  ProjectRoomBrokerCapacityError,
870
885
  ProjectRoomCursorError,
@@ -877,6 +892,7 @@ export {
877
892
  assertGenericProjectConfig,
878
893
  createAgentWebAppStreamProjectionContext,
879
894
  descriptorDataValue,
895
+ effectiveGrants,
880
896
  getSubAgentsFromConfig,
881
897
  getToolsFromConfig,
882
898
  hasTools,
@@ -893,6 +909,7 @@ export {
893
909
  parseTaskBeliefState,
894
910
  parseTrustedRunContext,
895
911
  projectAgentWebAppChunk,
912
+ projectRoomUserEventScope,
896
913
  replaceTaskBeliefState,
897
914
  requireProjectTaskWorkItemStore,
898
915
  snapshotExactArray,