@vite-hub/comments 0.3.0 → 0.4.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.
Files changed (56) hide show
  1. package/README.md +20 -10
  2. package/dist/anchor.d.ts +2 -2
  3. package/dist/{client-diagnostics-CcFpkbAk.js → client-diagnostics-Bubm7Shd.js} +20 -5
  4. package/dist/client-files-CJZl5Kc4.js +53 -0
  5. package/dist/client.d.ts +151 -10
  6. package/dist/client.js +807 -32
  7. package/dist/database.js +1 -1
  8. package/dist/{define-B3TF9zzn.d.ts → define-CHTWfHPo.d.ts} +1 -1
  9. package/dist/{define-43mMR39K.js → define-CX_Yr_hz.js} +1 -1
  10. package/dist/{errors-CyQyKAvy.d.ts → errors-BEChnUo7.d.ts} +14 -2
  11. package/dist/{errors-C6qptPoG.js → errors-BHsVXlpd.js} +7 -3
  12. package/dist/{index-DNhy69Wt.d.ts → index-iPGlSAgj.d.ts} +13 -4
  13. package/dist/index.d.ts +7 -7
  14. package/dist/index.js +41 -7
  15. package/dist/{install-W9ghhGoh.d.ts → install-96NXWnrw.d.ts} +3 -3
  16. package/dist/{install-BcMPgPk_.js → install-jRKmuLHK.js} +72 -26
  17. package/dist/{installed-B-PfERBU.js → installed-g6nDr5ac.js} +1 -1
  18. package/dist/{migrate-BDQ8xqUs.js → migrate-Bpw3xL5e.js} +1 -1
  19. package/dist/{operations-D4A1Fcgf.d.ts → operations-7ycAhDCw.d.ts} +5 -0
  20. package/dist/{operations-DMMIfYPW.js → operations-9tskoLsk.js} +22 -11
  21. package/dist/{operations-GLeOqgMt.d.ts → operations-D93EV10O.d.ts} +5 -4
  22. package/dist/operations.d.ts +2 -2
  23. package/dist/operations.js +2 -2
  24. package/dist/overlay/client-lZesR40x.js +4 -0
  25. package/dist/overlay/overlay.js +20 -40
  26. package/dist/{page-DtbMOEMd.d.ts → page-CWwnmF3K.d.ts} +1 -1
  27. package/dist/{page-B41ozN63.js → page-DRz_sDY4.js} +1 -1
  28. package/dist/{plugin-PS8PMYus.js → plugin-BNFd1zGz.js} +27 -6
  29. package/dist/realtime.d.ts +2 -2
  30. package/dist/realtime.js +2 -2
  31. package/dist/reply-id-P_bSuEng.js +12 -0
  32. package/dist/{rpc-RKPAusHp.js → rpc-BQqYx8kb.js} +23 -7
  33. package/dist/{rpc-HBcWtg0T.d.ts → rpc-BZ1QNkCC.d.ts} +1 -1
  34. package/dist/rpc.d.ts +1 -1
  35. package/dist/rpc.js +1 -1
  36. package/dist/runtime/auth.d.ts +2 -2
  37. package/dist/runtime/auth.js +2 -2
  38. package/dist/runtime/console.js +3 -3
  39. package/dist/runtime/index.d.ts +38 -11
  40. package/dist/runtime/index.js +83 -15
  41. package/dist/{server-D8k-0GXe.js → server-CqyzrqTI.js} +1 -1
  42. package/dist/server.d.ts +5 -5
  43. package/dist/server.js +6 -6
  44. package/dist/{service-GHhhyQj4.js → service-C8ZgFWvy.js} +34 -5
  45. package/dist/{service-CFVm23k7.d.ts → service-wC9kx9EX.d.ts} +11 -4
  46. package/dist/{session-EkudzUmm.js → session-ByjMyTak.js} +1 -1
  47. package/dist/{session-DVx-1Tym.d.ts → session-CKfW6DGE.d.ts} +3 -3
  48. package/dist/table-names-DfiKUlOV.js +14 -0
  49. package/dist/testing.d.ts +1 -1
  50. package/dist/testing.js +37 -4
  51. package/dist/{types-BIS0hCEl.d.ts → types-C1qzObs2.d.ts} +12 -3
  52. package/dist/{types-CZujrMFd.d.ts → types-C7LzhgRb.d.ts} +47 -3
  53. package/dist/vite.d.ts +6 -6
  54. package/dist/vite.js +187 -113
  55. package/package.json +9 -9
  56. package/dist/overlay/client-DmsSMOzi.js +0 -4
@@ -1,5 +1,5 @@
1
- import { S as CommentThread, _ as CommentMetadata, h as CommentListQuery, n as CommentActor, r as CommentAnchor, s as CommentContext, w as CommentUser, x as CommentSubject, y as CommentStatus } from "./types-CZujrMFd.js";
2
- import { d as CommentsPeople, g as CommentsUser, l as CommentsDefinition } from "./define-B3TF9zzn.js";
1
+ import { D as CommentUser, S as CommentStatus, T as CommentThread, b as CommentMetadata, n as CommentActor, r as CommentAnchor, s as CommentContext, v as CommentListQuery, w as CommentSubject } from "./types-C7LzhgRb.js";
2
+ import { d as CommentsPeople, g as CommentsUser, l as CommentsDefinition } from "./define-CHTWfHPo.js";
3
3
  import { i as commentThreads, r as commentMessages, t as commentCounters } from "./database-CA1aHKN7.js";
4
4
  import "valibot";
5
5
  import { LibSQLDatabase } from "drizzle-orm/libsql";
@@ -77,7 +77,7 @@ interface CommentsStore {
77
77
  createThread: (input: NewThread) => Promise<CommentThread>;
78
78
  /**
79
79
  * Adds a message. A resolved thread takes it only with `allowResolved`; otherwise it fails with `COMMENTS_R0016`,
80
- * checked in the same statement as the insert.
80
+ * checked in the same statement as the insert. A message id that is already stored fails with `COMMENTS_R0022`.
81
81
  */
82
82
  addMessage: (threadId: string, input: NewMessage, options?: {
83
83
  allowResolved?: boolean;
@@ -90,9 +90,16 @@ interface CommentsStore {
90
90
  deleteMessage: (threadId: string, messageId: string, now: number) => Promise<CommentThread>;
91
91
  /** With `ownerId`, delete only if every message still belongs to that owner at mutation time. */
92
92
  deleteThread: (threadId: string, ownerId?: string) => Promise<boolean>;
93
- setStatus: (threadId: string, status: CommentStatus, by: CommentUser, now: number) => Promise<CommentThread>;
93
+ /** `actor`: the agent that resolves it for `by`. Reopening clears both. */
94
+ setStatus: (threadId: string, status: CommentStatus, by: CommentUser, now: number, actor?: CommentActor) => Promise<CommentThread>;
94
95
  /** Deletes every thread of a scope with its messages, and returns their ids. Numbers of the scope are never reused. */
95
96
  deleteScope: (scope: string) => Promise<string[]>;
97
+ /**
98
+ * Deletes the messages of one person. A thread with no message left goes too. A thread that they started keeps the
99
+ * replies of other people, without the person's name and image, and a thread that they resolved forgets who resolved
100
+ * it. Returns the ids of the threads that changed or went.
101
+ */
102
+ deleteUser: (userId: string) => Promise<string[]>;
96
103
  /**
97
104
  * The people that wrote in a thread, for a store without an Auth adapter. Only authors of threads that `canRead`
98
105
  * accepts count, and a message without a thread never shows.
@@ -1,4 +1,4 @@
1
- import { o as normalizeCommentPage } from "./page-B41ozN63.js";
1
+ import { o as normalizeCommentPage } from "./page-DRz_sDY4.js";
2
2
  import { c as viteHubPageToolsInlineStart, f as viteHubPageToolsWanted, l as viteHubPageToolsLoader, n as viteHubBasePath, o as viteHubPageToolsHintCookie, p as withViteHubBase, r as viteHubPageSessionPath, s as viteHubPageToolsInlineScript, t as readViteHubPageAccount, u as viteHubPageToolsMarker } from "./page-tools-shared-NHUjKI8E.js";
3
3
  import { getStandardContext } from "@vite-hub/runtime/internal/h3";
4
4
  //#region ../internal/src/runtime/page-tools-html.ts
@@ -1,6 +1,6 @@
1
- import { g as CommentsUser } from "./define-B3TF9zzn.js";
2
- import { s as CommentsRequestEvent } from "./types-BIS0hCEl.js";
3
- import "./index-DNhy69Wt.js";
1
+ import { g as CommentsUser } from "./define-CHTWfHPo.js";
2
+ import { s as CommentsRequestEvent } from "./types-C1qzObs2.js";
3
+ import "./index-iPGlSAgj.js";
4
4
  //#region src/runtime/session.d.ts
5
5
  interface CommentsSessionOptions {
6
6
  /** Reads the ViteHub Auth user only when no custom `identify` is configured. */
@@ -0,0 +1,14 @@
1
+ //#region src/table-names.ts
2
+ /**
3
+ * The tables of `commentsSchema` and `commentsPostgresSchema`: each schema key and its SQL name. The Comments
4
+ * contribution gives them to the Database, so resolving the Vite config loads neither the schema nor drizzle-orm. A
5
+ * test keeps them equal to both schemas.
6
+ */
7
+ const commentsTableNames = {
8
+ vitehubCommentThreads: "vitehub_comment_threads",
9
+ vitehubCommentMessages: "vitehub_comment_messages",
10
+ vitehubCommentCounters: "vitehub_comment_counters",
11
+ vitehubCommentForge: "vitehub_comment_forge"
12
+ };
13
+ //#endregion
14
+ export { commentsTableNames as t };
package/dist/testing.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { E as CommentsTransport, S as CommentThread, w as CommentUser, x as CommentSubject } from "./types-CZujrMFd.js";
1
+ import { D as CommentUser, T as CommentThread, k as CommentsTransport, w as CommentSubject } from "./types-C7LzhgRb.js";
2
2
  //#region src/operations-core/testing.d.ts
3
3
  export interface MemoryTransportOptions {
4
4
  /** The signed-in user. Every call acts as this user. */
package/dist/testing.js CHANGED
@@ -1,8 +1,17 @@
1
- import { t as commentsErrorDiagnostics } from "./errors-C6qptPoG.js";
1
+ import { t as replyMessageId } from "./reply-id-P_bSuEng.js";
2
+ import { t as commentsErrorDiagnostics } from "./errors-BHsVXlpd.js";
2
3
  //#region src/operations-core/testing.ts
4
+ function checkOutboxAccount(input, user) {
5
+ if (input.outbox && input.outbox.account !== user.id) throw Object.assign(commentsErrorDiagnostics.COMMENTS_OUTBOX_ACCOUNT_CHANGED(), { status: 401 });
6
+ }
3
7
  function copy(value) {
4
8
  return JSON.parse(JSON.stringify(value));
5
9
  }
10
+ /** The attachment keys of a message: the keys that it names, then one made-up key for each file that it brings. */
11
+ function attachmentsOf(input) {
12
+ const files = (input.files ?? []).map((file) => `memory/${crypto.randomUUID()}/${file instanceof File ? file.name : "file"}`);
13
+ return [...input.attachments ?? [], ...files];
14
+ }
6
15
  function sameSubject(a, b) {
7
16
  return a.kind === b.kind && a.id === b.id;
8
17
  }
@@ -39,7 +48,7 @@ function message(store, user, input) {
39
48
  const body = input.body.trim();
40
49
  if (!body && !input.attachments?.length) throw commentsErrorDiagnostics.COMMENTS_R0005();
41
50
  return {
42
- id: `message-${crypto.randomUUID()}`,
51
+ id: input.id ?? `message-${crypto.randomUUID()}`,
43
52
  threadId: input.threadId,
44
53
  body,
45
54
  author: copy(user),
@@ -93,6 +102,7 @@ function view(store, user) {
93
102
  return found ? copy(found) : null;
94
103
  },
95
104
  async create(input) {
105
+ checkOutboxAccount(input, user);
96
106
  const scope = store.scope(input.subject);
97
107
  const request = input.requestId === void 0 ? void 0 : JSON.stringify([scope, input.requestId]);
98
108
  const earlier = request === void 0 ? void 0 : store.threads.get(store.requests.get(request) ?? "");
@@ -104,6 +114,7 @@ function view(store, user) {
104
114
  const id = `thread-${crypto.randomUUID()}`;
105
115
  const first = message(store, user, {
106
116
  ...input,
117
+ attachments: attachmentsOf(input),
107
118
  threadId: id
108
119
  });
109
120
  store.counters.set(scope, n);
@@ -115,6 +126,7 @@ function view(store, user) {
115
126
  subject: copy(input.subject),
116
127
  ...input.metadata === void 0 ? {} : { metadata: copy(input.metadata) },
117
128
  ...input.revision === void 0 ? {} : { revision: input.revision },
129
+ ...input.requestId === void 0 ? {} : { requestId: input.requestId },
118
130
  anchor: copy(input.anchor),
119
131
  status: "open",
120
132
  author: copy(user),
@@ -123,9 +135,28 @@ function view(store, user) {
123
135
  updatedAt: first.createdAt
124
136
  });
125
137
  },
126
- async reply(input) {
138
+ async reply(draft) {
139
+ checkOutboxAccount(draft, user);
140
+ const id = draft.requestId === void 0 ? void 0 : await replyMessageId(draft.threadId, draft.requestId);
141
+ const input = {
142
+ ...draft,
143
+ id,
144
+ attachments: attachmentsOf(draft)
145
+ };
127
146
  const found = copy(thread(store, input.threadId));
128
- found.messages.push(message(store, user, input));
147
+ const request = input.requestId === void 0 ? void 0 : JSON.stringify([
148
+ "reply",
149
+ input.threadId,
150
+ input.requestId
151
+ ]);
152
+ const earlier = request === void 0 ? void 0 : found.messages.find((entry) => entry.id === store.requests.get(request));
153
+ if (earlier) {
154
+ if (earlier.author.id !== user.id) throw commentsErrorDiagnostics.COMMENTS_R0022();
155
+ return found;
156
+ }
157
+ const added = message(store, user, input);
158
+ if (request !== void 0) store.requests.set(request, added.id);
159
+ found.messages.push(added);
129
160
  return save(found);
130
161
  },
131
162
  async edit(input) {
@@ -161,6 +192,7 @@ function view(store, user) {
161
192
  const found = copy(thread(store, input.threadId));
162
193
  found.status = "resolved";
163
194
  found.resolvedBy = copy(user);
195
+ delete found.resolvedActor;
164
196
  found.resolvedAt = store.now();
165
197
  return save(found);
166
198
  },
@@ -168,6 +200,7 @@ function view(store, user) {
168
200
  const found = copy(thread(store, input.threadId));
169
201
  found.status = "open";
170
202
  delete found.resolvedBy;
203
+ delete found.resolvedActor;
171
204
  delete found.resolvedAt;
172
205
  return save(found);
173
206
  },
@@ -1,5 +1,5 @@
1
- import { S as CommentThread, _ as CommentMetadata, m as CommentListCursor, r as CommentAnchor, s as CommentContext, w as CommentUser, x as CommentSubject, y as CommentStatus } from "./types-CZujrMFd.js";
2
- import { g as CommentsUser, l as CommentsDefinition } from "./define-B3TF9zzn.js";
1
+ import { D as CommentUser, S as CommentStatus, T as CommentThread, _ as CommentListCursor, b as CommentMetadata, r as CommentAnchor, s as CommentContext, w as CommentSubject } from "./types-C7LzhgRb.js";
2
+ import { g as CommentsUser, l as CommentsDefinition } from "./define-CHTWfHPo.js";
3
3
  import { ViteHubContext } from "@vite-hub/runtime";
4
4
  //#region src/types.d.ts
5
5
  interface CommentsForgeTarget {
@@ -113,6 +113,15 @@ interface ReplyInput {
113
113
  author: CommentUser;
114
114
  mentions?: string[];
115
115
  attachments?: string[];
116
+ /** A retry key. A second reply with the same key and author in the same thread returns the first message. */
117
+ requestId?: string;
118
+ }
119
+ interface FindCommentThreadInput {
120
+ /** The subject that the create named. Or set `page`. */
121
+ subject?: CommentSubject;
122
+ /** An app path, for a thread on a page. */
123
+ page?: string;
124
+ requestId: string;
116
125
  }
117
126
  interface ReplyOptions {
118
127
  /** Reply to a resolved thread, and keep it resolved. Default `false`: the reply fails with `COMMENTS_RESOLVED`. */
@@ -121,4 +130,4 @@ interface ReplyOptions {
121
130
  /** Codes of the errors that Comments methods return in the `[error, data]` tuple. */
122
131
  type CommentsErrorCode = "COMMENTS_NOT_INSTALLED" | "COMMENTS_NOT_FOUND" | "COMMENTS_INVALID_INPUT" | "COMMENTS_FORBIDDEN" | "COMMENTS_POLICY_MISSING" | "COMMENTS_RESOLVED" | "COMMENTS_CONTENT_MISSING" | "COMMENTS_FIELD_INVALID" | "COMMENTS_FIELD_NOT_EDITABLE" | "COMMENTS_FIELD_FORBIDDEN" | "COMMENTS_FIELD_CONFLICT" | "COMMENTS_FIELD_LOCKED";
123
132
  //#endregion
124
- export { CommentsPageContext as a, CreateCommentThreadInput as c, ListCommentThreadsOptions as d, ReplyInput as f, CommentsIdentifyContext as i, DefineCommentsOptions as l, CommentsForgeOptions as n, CommentsPageSubject as o, ReplyOptions as p, CommentsForgeTarget as r, CommentsRequestEvent as s, CommentsErrorCode as t, EditCommentInput as u };
133
+ export { CommentsPageContext as a, CreateCommentThreadInput as c, FindCommentThreadInput as d, ListCommentThreadsOptions as f, CommentsIdentifyContext as i, DefineCommentsOptions as l, ReplyOptions as m, CommentsForgeOptions as n, CommentsPageSubject as o, ReplyInput as p, CommentsForgeTarget as r, CommentsRequestEvent as s, CommentsErrorCode as t, EditCommentInput as u };
@@ -168,6 +168,8 @@ interface CommentMessage {
168
168
  /** Milliseconds since the epoch. */
169
169
  createdAt: number;
170
170
  editedAt?: number;
171
+ /** Set only by the client's outbox: the message has a local `id` and is not on the server yet. */
172
+ delivery?: CommentDelivery;
171
173
  }
172
174
  interface CommentThread {
173
175
  id: string;
@@ -179,6 +181,8 @@ interface CommentThread {
179
181
  anchor: CommentAnchor;
180
182
  status: CommentStatus;
181
183
  resolvedBy?: CommentUser;
184
+ /** The agent that resolved it for `resolvedBy`, such as through an MCP client. Like `actor` for the author. */
185
+ resolvedActor?: CommentActor;
182
186
  resolvedAt?: number;
183
187
  author: CommentUser;
184
188
  actor?: CommentActor;
@@ -194,6 +198,29 @@ interface CommentThread {
194
198
  forge?: CommentForgeLink | null;
195
199
  createdAt: number;
196
200
  updatedAt: number;
201
+ /** The retry key of the `create` that started it, when it had one. The client matches its own waiting comment by it. */
202
+ requestId?: string;
203
+ /** Set only by the client's outbox: the thread has a local `id` and its `n` is 0. */
204
+ delivery?: CommentDelivery;
205
+ }
206
+ /** A comment or reply that the outbox of the client holds. */
207
+ interface CommentDelivery {
208
+ /** `pending` while it waits or goes out, `failed` when the server refused it. */
209
+ status: "pending" | "failed";
210
+ requestId: string;
211
+ /** The files that go with it, to show before the server stores them. */
212
+ files: Blob[];
213
+ /** Why the last try did not go out. A `pending` message with an error waits to try again. */
214
+ error?: CommentDeliveryError;
215
+ }
216
+ /** A failure that the outbox keeps with the entry. Plain data, so it is stored with the entry. */
217
+ interface CommentDeliveryError {
218
+ /** Such as `COMMENTS_R0013`. Absent when the error had no code. */
219
+ code?: string;
220
+ why: string;
221
+ fix?: string;
222
+ /** The HTTP status. 0 when the request got no answer. */
223
+ status: number;
197
224
  }
198
225
  interface CommentListQuery {
199
226
  subject?: CommentSubject;
@@ -247,6 +274,11 @@ interface CommentReplyInput {
247
274
  body: string;
248
275
  mentions?: string[];
249
276
  attachments?: string[];
277
+ /**
278
+ * A retry key, such as `crypto.randomUUID()`, kept for one draft. A second reply with the same key in the same
279
+ * thread returns the thread with the first message and adds nothing.
280
+ */
281
+ requestId?: string;
250
282
  }
251
283
  interface CommentEditInput {
252
284
  threadId: string;
@@ -301,13 +333,25 @@ type CommentEvent = {
301
333
  * The seam between the browser and the server. Each method has the name and the input of one `comments.*` operation.
302
334
  * A mutation returns the thread as it is afterwards, and `delete` returns `null` when the thread is gone.
303
335
  */
336
+ interface CommentFiles {
337
+ /** Files that the transport stores and adds to `attachments` before sending the message. */
338
+ files?: Blob[];
339
+ /** The subject of the thread for reply file uploads. */
340
+ subject?: CommentSubject;
341
+ /** For queued writes, check the authenticated author on every write and save each completed upload before the next request. */
342
+ outbox?: {
343
+ account: string;
344
+ uploaded: (key: string) => Promise<void>;
345
+ };
346
+ }
304
347
  interface CommentsTransport {
305
348
  /** Whether the server accepts attachment keys. Defaults to true for custom transports. */
306
349
  supportsAttachments?: boolean;
307
350
  list: (query: CommentListQuery) => Promise<CommentThread[]>;
308
351
  get: (input: CommentGetInput) => Promise<CommentThread | null>;
309
- create: (input: CommentCreateInput) => Promise<CommentThread>;
310
- reply: (input: CommentReplyInput) => Promise<CommentThread>;
352
+ /** Gets the client's `requestId` and the files of the comment, which it stores first. */
353
+ create: (input: CommentCreateInput & CommentFiles) => Promise<CommentThread>;
354
+ reply: (input: CommentReplyInput & CommentFiles) => Promise<CommentThread>;
311
355
  edit: (input: CommentEditInput) => Promise<CommentThread>;
312
356
  delete: (input: CommentDeleteInput) => Promise<CommentThread | null>;
313
357
  resolve: (input: CommentStatusInput) => Promise<CommentThread>;
@@ -319,4 +363,4 @@ interface CommentsTransport {
319
363
  subscribe?: (listener: (event: CommentEvent) => void) => () => void;
320
364
  }
321
365
  //#endregion
322
- export { TextAnchor as A, CommentUploadInput as C, ElementAnchor as D, CommentsTransport as E, ImageAnchor as O, CommentThread as S, CommentUsersInput as T, CommentMetadata as _, CommentBuild as a, CommentStatusInput as b, CommentCreateInput as c, CommentEvent as d, CommentForgeLink as f, CommentMessage as g, CommentListQuery as h, CommentAttachment as i, PageAnchor as k, CommentDeleteInput as l, CommentListCursor as m, CommentActor as n, CommentComponent as o, CommentGetInput as p, CommentAnchor as r, CommentContext as s, AreaAnchor as t, CommentEditInput as u, CommentReplyInput as v, CommentUser as w, CommentSubject as x, CommentStatus as y };
366
+ export { ElementAnchor as A, CommentStatusInput as C, CommentUser as D, CommentUploadInput as E, PageAnchor as M, TextAnchor as N, CommentUsersInput as O, CommentStatus as S, CommentThread as T, CommentListCursor as _, CommentBuild as a, CommentMetadata as b, CommentCreateInput as c, CommentDeliveryError as d, CommentEditInput as f, CommentGetInput as g, CommentForgeLink as h, CommentAttachment as i, ImageAnchor as j, CommentsTransport as k, CommentDeleteInput as l, CommentFiles as m, CommentActor as n, CommentComponent as o, CommentEvent as p, CommentAnchor as r, CommentContext as s, AreaAnchor as t, CommentDelivery as u, CommentListQuery as v, CommentSubject as w, CommentReplyInput as x, CommentMessage as y };
package/dist/vite.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { a as CommentBuild } from "./types-CZujrMFd.js";
2
- import "./types-BIS0hCEl.js";
3
- import { a as mountedCommentsRoute } from "./page-DtbMOEMd.js";
4
- import { n as OperationContributions } from "./operations-D4A1Fcgf.js";
1
+ import { a as CommentBuild } from "./types-C7LzhgRb.js";
2
+ import "./types-C1qzObs2.js";
3
+ import { a as mountedCommentsRoute } from "./page-CWwnmF3K.js";
4
+ import { n as OperationContributions } from "./operations-7ycAhDCw.js";
5
5
  import { i as ViteHubInspectionPluginMetadata, r as ViteHubConsoleRuntimeRecordTableSection, t as ViteHubConsoleOperationSection } from "./console-h4KlhIik.js";
6
6
  import { Plugin, PluginOption } from "vite";
7
7
  import { githubRepository } from "@vite-hub/forge/build/node";
@@ -237,8 +237,8 @@ interface CommentsOverlayAssets {
237
237
  /** File name of the overlay, such as `overlay.5e6f7a8b.js`. */
238
238
  overlay: string;
239
239
  }
240
- /** Where the loader and overlay are served, below the app mount. */
241
- export declare const overlayRoute = "/_vitehub/comments";
240
+ /** Where the loader and overlay are served, below the app mount: the assets folder of the Comments API route. */
241
+ export declare const overlayRoute = "/_vitehub/comments/assets";
242
242
  /** The path the app is mounted at: `""` for the root, `"/portal"` below it. A relative or empty Vite base is the root. */
243
243
  export declare function mountPath(base: string | undefined): string;
244
244
  /** The URL of the loader. Its query names the overlay file, says whether the app can edit pages, and carries the page filter and when to ask. */