appostle-installer 0.0.17 → 0.0.18

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/appostle.js CHANGED
@@ -2409,6 +2409,13 @@ var ChatRoomSchema = z4.object({
2409
2409
  id: z4.string(),
2410
2410
  name: z4.string(),
2411
2411
  purpose: z4.string().nullable(),
2412
+ /**
2413
+ * Auth-server user-id of the user who created the room. `null` = legacy
2414
+ * room (created before multi-tenant scoping) — visible to all users on
2415
+ * the daemon. New rooms get the creator's userId and are scoped to that
2416
+ * user only. See gitlab issue #25.
2417
+ */
2418
+ ownerUserId: z4.string().nullable().default(null),
2412
2419
  createdAt: z4.string(),
2413
2420
  updatedAt: z4.string()
2414
2421
  });
@@ -44886,7 +44893,8 @@ ${details}`.trim());
44886
44893
  try {
44887
44894
  const room = await this.chatService.createRoom({
44888
44895
  name: request.name,
44889
- purpose: request.purpose
44896
+ purpose: request.purpose,
44897
+ ownerUserId: this.ownerUserId
44890
44898
  });
44891
44899
  this.emit({
44892
44900
  type: "chat/create/response",
@@ -44902,7 +44910,7 @@ ${details}`.trim());
44902
44910
  }
44903
44911
  async handleChatListRequest(request) {
44904
44912
  try {
44905
- const rooms = await this.chatService.listRooms();
44913
+ const rooms = await this.chatService.listRooms(this.ownerUserId);
44906
44914
  this.emit({
44907
44915
  type: "chat/list/response",
44908
44916
  payload: {
@@ -44918,7 +44926,8 @@ ${details}`.trim());
44918
44926
  async handleChatInspectRequest(request) {
44919
44927
  try {
44920
44928
  const result = await this.chatService.inspectRoom({
44921
- room: request.room
44929
+ room: request.room,
44930
+ requesterUserId: this.ownerUserId
44922
44931
  });
44923
44932
  this.emit({
44924
44933
  type: "chat/inspect/response",
@@ -44935,7 +44944,8 @@ ${details}`.trim());
44935
44944
  async handleChatDeleteRequest(request) {
44936
44945
  try {
44937
44946
  const result = await this.chatService.deleteRoom({
44938
- room: request.room
44947
+ room: request.room,
44948
+ requesterUserId: this.ownerUserId
44939
44949
  });
44940
44950
  this.emit({
44941
44951
  type: "chat/delete/response",
@@ -44956,7 +44966,8 @@ ${details}`.trim());
44956
44966
  room: request.room,
44957
44967
  authorAgentId,
44958
44968
  body: request.body,
44959
- replyToMessageId: request.replyToMessageId
44969
+ replyToMessageId: request.replyToMessageId,
44970
+ requesterUserId: this.ownerUserId
44960
44971
  });
44961
44972
  this.emit({
44962
44973
  type: "chat/post/response",
@@ -44989,7 +45000,8 @@ ${details}`.trim());
44989
45000
  room: request.room,
44990
45001
  limit: request.limit,
44991
45002
  since: request.since,
44992
- authorAgentId: request.authorAgentId
45003
+ authorAgentId: request.authorAgentId,
45004
+ requesterUserId: this.ownerUserId
44993
45005
  });
44994
45006
  this.emit({
44995
45007
  type: "chat/read/response",
@@ -45008,7 +45020,8 @@ ${details}`.trim());
45008
45020
  const messages = await this.chatService.waitForMessages({
45009
45021
  room: request.room,
45010
45022
  afterMessageId: request.afterMessageId,
45011
- timeoutMs: request.timeoutMs
45023
+ timeoutMs: request.timeoutMs,
45024
+ requesterUserId: this.ownerUserId
45012
45025
  });
45013
45026
  this.emit({
45014
45027
  type: "chat/wait/response",