lody 0.114.1 → 0.115.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.
Files changed (86) hide show
  1. package/README.md +2 -0
  2. package/dist/{session-access-DBWXcozo.js → access-Sut1_1-c.js} +263 -130
  3. package/dist/{acp-http-proxy-CEqdfPIb.js → acp-http-proxy-BeNRWwOZ.js} +2 -2
  4. package/dist/{acp-interaction-owner-C9DnwDek.js → acp-interaction-owner-uSfNzpiU.js} +14 -13
  5. package/dist/{agent-execution-KNblr7op.js → agent-execution-D1-dEIN6.js} +5 -5
  6. package/dist/{analytics-events-DgubpwYf.js → analytics-events-BQIrmfJp.js} +2 -2
  7. package/dist/{app-DO6nxrTQ.js → app-J2sTmsZo.js} +15 -14
  8. package/dist/{auth-BzBqWcHJ.js → auth-CTegS0TL.js} +2 -2
  9. package/dist/{automation-CaVyvwqU.js → automation-BL7x_nUm.js} +15 -14
  10. package/dist/chunks/{vendor-loro-repo-KiPOxZ47.js → vendor-loro-repo-B1zdQ8Qd.js} +3 -2
  11. package/dist/chunks/{vendor-undici-D9lUGEXQ.js → vendor-undici-Cm00wA7x.js} +3 -2
  12. package/dist/chunks/{vendor-undici-Dkj-EYtJ.js → vendor-undici-aSjjVk9-.js} +4 -3
  13. package/dist/claude-acp.js +3 -2
  14. package/dist/{cli-presence-application-BPo9zPWo.js → cli-presence-application-D2Dn0fPM.js} +7 -6
  15. package/dist/{client-CG7iYu4O.js → client-BsIzN-iC.js} +14 -13
  16. package/dist/codex-acp.js +3 -2
  17. package/dist/{command-runtime-CU9xs2mb.js → command-runtime-C7EPuHLe.js} +283 -153
  18. package/dist/{control-IZGSPxqh.js → control-CgRxpxvc.js} +18 -17
  19. package/dist/{fs-atomic-sI-5rfuh.js → cross-workspace-D6-aE1-w.js} +67 -7
  20. package/dist/{daemon-ChBsVK29.js → daemon-DWm2IzH9.js} +11 -10
  21. package/dist/{daemon-runner-Czhapxd-.js → daemon-runner-Bn8O9-a0.js} +9 -8
  22. package/dist/{daemon-session-tools-BkNAXJte.js → daemon-session-tools-BSAgq4O1.js} +25 -24
  23. package/dist/{daemon-shared-lCH0JHQD.js → daemon-shared-NcwWGSEj.js} +2 -2
  24. package/dist/{device-preview-rocdCptj.js → device-preview-BjqAbZ9g.js} +50 -25
  25. package/dist/devin-acp.js +3 -2
  26. package/dist/{discovery-query-hcHHutEn.js → discovery-query-C_7lyBI8.js} +2 -2
  27. package/dist/{dsh-BBMJN1_w.js → dsh-DVyIAYZ9.js} +5 -5
  28. package/dist/{dsh-plugins-DyDJ4nyX.js → dsh-plugins-Dfsqsiu7.js} +5 -4
  29. package/dist/{e2ee-Rp-kqqRV.js → e2ee-CslOKVIM.js} +2 -2
  30. package/dist/{e2ee-execution-intent-kcGw6188.js → e2ee-execution-intent-DYBEG410.js} +4 -4
  31. package/dist/{export-CW3tgEh5.js → export-C-zeWP1i.js} +19 -18
  32. package/dist/{feedback-DXHiE_SV.js → feedback-Dde39k5W.js} +15 -14
  33. package/dist/{feedback-wAp0AIne.js → feedback-jvl2Dz8w.js} +2 -2
  34. package/dist/{github-Ds3oR20B.js → github-BtMkInqL.js} +14 -13
  35. package/dist/grok-acp.js +3 -2
  36. package/dist/{http-transport-DDAJ_zUL.js → http-transport-C1f1XEnB.js} +3 -3
  37. package/dist/{index-BR78_63y.js → index-BTgKuz44.js} +7 -7
  38. package/dist/{index-cUL6BMen.js → index-BUam8GIX.js} +15 -14
  39. package/dist/{index-Z-zMjsvr.js → index-BsfKnSuo.js} +629 -731
  40. package/dist/{index-vrW0djgm.js → index-Ce9khNjj.js} +29 -28
  41. package/dist/{index-DNfm72S8.js → index-Dy-FYtdl.js} +20 -19
  42. package/dist/index.js +7 -6
  43. package/dist/{internal-BlRJVTRc.js → internal-BPOwohVc.js} +25 -24
  44. package/dist/{local-ipc-BQZPuSjl.js → local-ipc-B8vySppK.js} +12 -3
  45. package/dist/{local-project-control-client-vC7RtUIF.js → local-project-control-client-CIBpaXbo.js} +3 -3
  46. package/dist/{lody-mcp-http-protocol-d_6zEbk9.js → lody-mcp-http-protocol-DBLKn7SZ.js} +4 -4
  47. package/dist/{lody-mcp-server-DOkbYw6c.js → lody-mcp-server-B4OeNPT4.js} +22 -19
  48. package/dist/{login-Nwpcfzb7.js → login-Df1IkdeV.js} +7 -6
  49. package/dist/{login-shell-env-DiOZ-bog.js → login-shell-env-HKDW5zwx.js} +2 -2
  50. package/dist/{logout-C13Nc5pT.js → logout-gDuSiB0l.js} +7 -6
  51. package/dist/{machine-DJ0Pn0js.js → machine-bjdZ1hmy.js} +23 -22
  52. package/dist/{machine-protocol-capabilities-LN7bzFSN.js → machine-protocol-capabilities-DEhAj9SH.js} +80 -77
  53. package/dist/{mcp-z0JBqqIQ.js → mcp-DTnh_PAT.js} +20 -19
  54. package/dist/{migrate-DxEEhXQ9.js → migrate-CUdZ3XBR.js} +231 -73
  55. package/dist/{operation-CuFKC3x2.js → operation-CzLcjV3W.js} +16 -15
  56. package/dist/{operation-store-D1TdJgBc.js → operation-store-rllAX2mr.js} +3 -3
  57. package/dist/{presence-BGW-7JQJ.js → presence-CZco7UQH.js} +4 -4
  58. package/dist/{presence-legacy-BI0h0kBA.js → presence-legacy-DIYBtj5j.js} +3 -3
  59. package/dist/{project-BPuPcKZT.js → project-C_EZ2dLN.js} +21 -20
  60. package/dist/{register-hqq68K_S.js → register-VLBUVPh5.js} +26 -26
  61. package/dist/{remote-pairing-BixLRGZN.js → remote-pairing-D24xSpRh.js} +19 -18
  62. package/dist/{reset-identity-Arhv456z.js → reset-identity-DVubJrt0.js} +19 -18
  63. package/dist/{review-DDMytOEX.js → review-6aCgWEdv.js} +2 -2
  64. package/dist/{review-viewer-CkjhHGL8.js → review-viewer-CRYK94SE.js} +3 -3
  65. package/dist/{schedule-C2ooWjeY.js → schedule-CGTbG70S.js} +20 -19
  66. package/dist/{schedule-command-client-Dp2K-GDf.js → schedule-command-client-C6matZWn.js} +19 -18
  67. package/dist/{schedule-command-service-D7OwaAhZ.js → schedule-command-service-2gToipBI.js} +20 -19
  68. package/dist/{schedule-documents-7GqM7IcI.js → schedule-documents-DRc0byQm.js} +3 -3
  69. package/dist/{schedule-recurrence-CGZIb0Pu.js → schedule-recurrence-BVxMRfp4.js} +3 -3
  70. package/dist/{schedule-repository-D8Ui2jvb.js → schedule-repository-dz9iwR0x.js} +3 -3
  71. package/dist/{schedule-run-preparation-BEKS3RjW.js → schedule-run-preparation-1oSQ5i-A.js} +5 -5
  72. package/dist/{schedule-types-DTul4K9c.js → schedule-types-BquxGfza.js} +537 -391
  73. package/dist/{service-CTj21Cv2.js → service-D9xJKmI-.js} +4 -58
  74. package/dist/{session-file-blob-store-bjZk_Pby.js → session-file-blob-store-CBHDgf4e.js} +2 -2
  75. package/dist/{session-image-download-Bz47jmHy.js → session-image-download-DUwc2Fb4.js} +3 -3
  76. package/dist/{session-input-Bm4DZ_ah.js → session-input-MeZheBJ0.js} +2 -2
  77. package/dist/{session-link-CZ1z8J8d.js → session-link-demCF_Y_.js} +2 -2
  78. package/dist/{session-link-export-CF0aLI3O.js → session-link-export-BM1zZQRs.js} +3 -3
  79. package/dist/{session-p5D9mnGA.js → session-npaRR-y3.js} +170 -39
  80. package/dist/{session-operation-targets-yk7bQTAn.js → session-operation-targets-lq3rsTnV.js} +3 -3
  81. package/dist/{setting-CO0xphaD.js → setting-Cq6nKJgF.js} +8 -6
  82. package/dist/{start-DjcjoPvR.js → start-BolVcMOA.js} +391 -142
  83. package/dist/{sync-CUa0QP_M.js → sync-BrDYKZ4H.js} +15 -14
  84. package/dist/{workspace-DA-wPD10.js → workspace-Bthb-nhu.js} +17 -16
  85. package/dist/{workspace-legacy-UCwDS1Zb.js → workspace-legacy-jZ0D5Xl-.js} +184 -66
  86. package/package.json +1 -1
@@ -7,23 +7,23 @@ import inquirer from "./chunks/vendor-inquirer-CDSL6r3k.js";
7
7
  import { a as getInstallationProfile, g as getLodyDataDir } from "./installation-profile-BgCqPyUj.js";
8
8
  import { a as acquireLocalCliHostLease, g as getLocalCliHostEndpoint } from "./local-cli-host-lease-Chm4-jV0.js";
9
9
  import { g as getCliPlatformKind, f as fileLocksLegacy } from "./cli-platform-Cfc6A61f.js";
10
- import { A as AuthClient, c as performLogin } from "./auth-BzBqWcHJ.js";
11
- import { c6 as WorkspaceStreamsConfigurationError, c7 as requirePlaintextWorkspaceStreamsContent, c8 as prepareCliStreamsGatewayBaseUrl, c9 as streamsSnapshotCodec, a6 as runOneShotCommand, a9 as getAuthContextOrThrow, aa as listWorkspacesForToken, ca as selectWorkspaceSummary, cb as createCloudStreamsTokenPort, cc as registerMachineAccessForCliToken, cd as SessionAttachmentTransfer } from "./command-runtime-CU9xs2mb.js";
10
+ import { A as AuthClient, c as performLogin } from "./auth-CTegS0TL.js";
11
+ import { c6 as requirePlaintextWorkspaceStreamsContent, c7 as prepareCliStreamsGatewayBaseUrl, c8 as encryptedWorkspaceNamespace, c9 as streamsSnapshotCodec, a6 as runOneShotCommand, a9 as getAuthContextOrThrow, aa as listWorkspacesForToken, ca as selectWorkspaceSummary, cb as assertRetainedE2eeModeAllowsOpen, cc as registerMachineAccessForCliToken, cd as createCloudE2eePort, ce as describeEncryptedCommandFailure, cf as createCloudStreamsTokenPort, cg as SessionAttachmentTransfer } from "./command-runtime-C7EPuHLe.js";
12
12
  import { g as getLogger } from "./logger-C-G7jpWR.js";
13
13
  import { L as LODY_AUTH_URL, d as LODY_SERVER_URL, a as LODY_AUTH_SITE_URL } from "./const-LYLptZ7f.js";
14
14
  import { L as LoroDoc } from "./chunks/vendor-loro-crdt-2CFvB1HS.js";
15
- import { c as string, r as record, B as json, o as object, e as array, a as literal, u as union, n as number, d as boolean, f as _enum } from "./chunks/vendor-zod-DAcQjQuC.js";
16
- import { D as isSessionDocRoomId, m as getMachineRoomId, E as parseTodayDocId, F as getTodayDocId, z as buildScheduleRegistryRow, G as getLoroStreamIdForDocId, H as getLoroStreamsShardUrls, h as getLoroMetaStreamId, d as createLoroStreamUrl, f as LORO_STREAMS_BUCKET_ID, x as createLoroStreamsTokenProviderLegacy } from "./presence-BGW-7JQJ.js";
15
+ import { s as sessionImportFence, a as scheduleImportFence, c as createSessionMirror, b as atomicJson } from "./cross-workspace-D6-aE1-w.js";
16
+ import { c as string, r as record, B as json, o as object, e as array, a as literal, u as union, n as number, f as _enum, d as boolean } from "./chunks/vendor-zod-DAcQjQuC.js";
17
+ import { D as isSessionDocRoomId, m as getMachineRoomId, E as parseTodayDocId, F as getTodayDocId, z as buildScheduleRegistryRow, f as LORO_STREAMS_BUCKET_ID, G as getLoroStreamsShardUrls, H as getLoroStreamIdForDocId, h as getLoroMetaStreamId, d as createLoroStreamUrl, x as createLoroStreamsTokenProviderLegacy } from "./presence-CZco7UQH.js";
17
18
  import { constants } from "node:fs";
18
19
  import Database from "better-sqlite3";
19
- import { S as SqliteRepoStore, L as LoroRepo } from "./chunks/vendor-loro-repo-KiPOxZ47.js";
20
- import { c as createSessionMirror, a as atomicJson } from "./fs-atomic-sI-5rfuh.js";
20
+ import { S as SqliteRepoStore, L as LoroRepo, e as encodeStreamsRoomAdditionalData } from "./chunks/vendor-loro-repo-B1zdQ8Qd.js";
21
21
  import { a as SESSION_FILE_MAX_SIZE_BYTES } from "./magpie-import-IrqfCF6i.js";
22
- import { I as ScheduleDefinitionSchema } from "./schedule-types-DTul4K9c.js";
22
+ import { n as assertEncryptedAttachmentReference, I as ScheduleDefinitionSchema } from "./schedule-types-BquxGfza.js";
23
+ import { F as Flock } from "./chunks/vendor-@loro-dev-flock-wasm-BH1ts_Xn.js";
23
24
  import { c as createLoroDocAdapter, a as createFlockAdapter, S as StreamsCrdt } from "./chunks/vendor-@loro-dev-streams-crdt-BOuVa3yO.js";
24
25
  import { S as StreamsClient } from "./chunks/vendor-@loro-dev-streams-client-DPTfaXHE.js";
25
- import { F as Flock } from "./chunks/vendor-@loro-dev-flock-wasm-BH1ts_Xn.js";
26
- import { av as TaggedError, aw as Service, cW as fn, c as callback, s as succeed, j as fail, aG as promise, d2 as timeout, E as orDie, C as acquireRelease, b as flatMap, a_ as provideService, cl as scoped, cd as runPromiseExit, ad as isFailure, bM as squash, a2 as gen, d as sync, de as Effect } from "./chunks/vendor-effect-CNM-5PoN.js";
26
+ import { av as TaggedError, aw as Service, cW as fn, c as callback, s as succeed, j as fail, aG as promise, d2 as timeout, E as orDie, a2 as gen, C as acquireRelease, b as flatMap, a_ as provideService, cl as scoped, cd as runPromiseExit, ad as isFailure, bM as squash, d as sync, de as Effect } from "./chunks/vendor-effect-CNM-5PoN.js";
27
27
  import "node:events";
28
28
  import "node:child_process";
29
29
  import "node:process";
@@ -100,9 +100,9 @@ import "node:zlib";
100
100
  import "fs/promises";
101
101
  import "./capabilities-Btwk4R--.js";
102
102
  import "./time-sync-D63wG9u-.js";
103
- import "./http-transport-DDAJ_zUL.js";
103
+ import "./http-transport-C1f1XEnB.js";
104
104
  import "node:diagnostics_channel";
105
- import "./chunks/vendor-undici-D9lUGEXQ.js";
105
+ import "./chunks/vendor-undici-Cm00wA7x.js";
106
106
  import "node:assert";
107
107
  import "node:http";
108
108
  import "node:util";
@@ -110,6 +110,7 @@ import "node:querystring";
110
110
  import "node:perf_hooks";
111
111
  import "node:util/types";
112
112
  import "node:worker_threads";
113
+ import "node:http2";
113
114
  import "node:console";
114
115
  import "node:dns";
115
116
  import "./chunks/vendor-https-proxy-agent-BQxHfk42.js";
@@ -141,27 +142,27 @@ import "./chunks/vendor-@better-fetch-fetch-Cuh8CnyA.js";
141
142
  import "./chunks/vendor-@better-auth-api-key-D0bKvhcn.js";
142
143
  import "./chunks/vendor-@convex-dev-better-auth-DvFvwHmk.js";
143
144
  import "./convex-site-url-Ca_MfzFd.js";
144
- import "./login-shell-env-DiOZ-bog.js";
145
+ import "./login-shell-env-HKDW5zwx.js";
145
146
  import "./chunks/vendor-posthog-node-CwZyUQxO.js";
146
147
  import "./chunks/vendor-@posthog-core-BB1ZGy3x.js";
147
- import "./local-ipc-BQZPuSjl.js";
148
+ import "./local-ipc-B8vySppK.js";
148
149
  import "./rpc-secret-CPdan_XW.js";
149
150
  import "node:string_decoder";
150
151
  import "./code-collab-Cgso3Ix3.js";
151
152
  import "./project-path-CAQE9bes.js";
152
153
  import "./ios-simulator-BduF_qia.js";
153
- import "./session-access-DBWXcozo.js";
154
+ import "./access-Sut1_1-c.js";
154
155
  import "./chunks/vendor-immer-F2vkwr8n.js";
155
156
  import "./chunks/vendor-loro-mirror-kwb2EtZx.js";
156
157
  import "perf_hooks";
157
158
  import "./chunks/vendor-ws-D1QOrWHI.js";
158
- import "./presence-legacy-BI0h0kBA.js";
159
+ import "./presence-legacy-DIYBtj5j.js";
159
160
  import "./chunks/vendor-uuid-ZvTlSCzA.js";
160
161
  import "./chunks/vendor-convex-wRAQitRr.js";
161
162
  import "module";
162
163
  import "./runtime-artifacts-CjowfwNS.js";
163
164
  import "./github-credential-runtime-Vuv6HxRs.js";
164
- import "./machine-protocol-capabilities-LN7bzFSN.js";
165
+ import "./machine-protocol-capabilities-DEhAj9SH.js";
165
166
  import "./chunks/vendor-winston-LrGS-jQo.js";
166
167
  import "./chunks/vendor-logform-BH1Pfpxu.js";
167
168
  import "./chunks/vendor-@colors-colors-7IEFuFeu.js";
@@ -214,6 +215,8 @@ const manifestSchema = object({
214
215
  sourceUserId: string().startsWith("local:"),
215
216
  sourceName: string(),
216
217
  targetWorkspaceId: safeId,
218
+ targetContentMode: _enum(["plaintext", "protected"]).default("plaintext"),
219
+ targetGenesisHash: string().regex(/^[0-9a-f]{64}$/).optional(),
217
220
  targetMachineId: safeId,
218
221
  targetUserId: string(),
219
222
  deployment: string(),
@@ -222,6 +225,13 @@ const manifestSchema = object({
222
225
  flocks: array(object({ id: string(), rows: array(rowSchema) })),
223
226
  machineMeta: jsonObject,
224
227
  createdAt: string()
228
+ }).superRefine((manifest, context) => {
229
+ if (manifest.targetContentMode === "protected" && !manifest.targetGenesisHash)
230
+ context.addIssue({
231
+ code: "custom",
232
+ path: ["targetGenesisHash"],
233
+ message: "Encrypted migration requires the pinned target genesis"
234
+ });
225
235
  });
226
236
  const journalSchema = object({
227
237
  version: literal(2),
@@ -265,6 +275,15 @@ function prepareDocument(bytes, entry, manifest) {
265
275
  const doc = new LoroDoc();
266
276
  doc.import(bytes);
267
277
  if (doc.isShallow()) throw new Error(`Cannot migrate shallow history: ${entry.id}`);
278
+ if (manifest.targetContentMode === "protected") {
279
+ const fence = isSessionDocRoomId(entry.id) ? sessionImportFence(
280
+ doc,
281
+ (field) => entry.meta[field],
282
+ manifest.targetWorkspaceId,
283
+ manifest.targetUserId
284
+ ) : entry.id.startsWith("schedule-") ? scheduleImportFence(doc, manifest.targetWorkspaceId) : void 0;
285
+ if (fence) doc.getMap(receiptRoot).set("importFence", fence);
286
+ }
268
287
  if (isSessionDocRoomId(entry.id)) {
269
288
  if (entry.meta.historyBackend && entry.meta.historyBackend !== "loro")
270
289
  throw new Error(
@@ -455,6 +474,8 @@ async function validateAttachments(doc, sessionId, directory, sourceMachineId) {
455
474
  );
456
475
  }
457
476
  async function migrateAttachments(doc, sessionId, directory, manifest, journal, transfer, signal) {
477
+ if (manifest.targetContentMode === "protected" && transfer.contentMode !== "protected")
478
+ throw new Error("E2EE migration requires a protected attachment transfer before upload");
458
479
  const mirror = createSessionMirror({ doc, initialState: {} });
459
480
  try {
460
481
  const history = mirror.historyWriter.readStored();
@@ -466,6 +487,8 @@ async function migrateAttachments(doc, sessionId, directory, manifest, journal,
466
487
  if (receipt) {
467
488
  if (receipt.sha256 !== file.sha256 || receipt.sizeBytes !== file.sizeBytes)
468
489
  throw new Error("Attachment receipt does not match frozen history");
490
+ if (manifest.targetContentMode === "protected")
491
+ assertEncryptedAttachmentReference("file", String(receipt.fileId), receipt.encryption);
469
492
  continue;
470
493
  }
471
494
  const absolutePath = path__default.join(directory, "blobs", key);
@@ -486,7 +509,10 @@ async function migrateAttachments(doc, sessionId, directory, manifest, journal,
486
509
  if (uploaded.sha256 !== file.sha256 || uploaded.sizeBytes !== file.sizeBytes) {
487
510
  throw new Error("Uploaded attachment integrity metadata does not match the frozen source");
488
511
  }
512
+ if (manifest.targetContentMode === "protected")
513
+ assertEncryptedAttachmentReference("file", uploaded.fileId, uploaded.encryption);
489
514
  journal.attachments[key] = {
515
+ ...uploaded.encryption ? { encryption: uploaded.encryption } : {},
490
516
  fileId: uploaded.fileId,
491
517
  sha256: file.sha256,
492
518
  sizeBytes: file.sizeBytes
@@ -506,6 +532,7 @@ async function migrateAttachments(doc, sessionId, directory, manifest, journal,
506
532
  ...original,
507
533
  fileId: receipt.fileId,
508
534
  transport: "r2",
535
+ ...receipt.encryption ? { encryption: receipt.encryption } : {},
509
536
  storageSessionId: file.storageSessionId ?? sessionId
510
537
  }
511
538
  });
@@ -516,7 +543,13 @@ async function migrateAttachments(doc, sessionId, directory, manifest, journal,
516
543
  const uploaded = journal.attachments[attachmentKey(file, sessionId)];
517
544
  if (!uploaded || typeof uploaded.fileId !== "string")
518
545
  throw new Error("Missing uploaded attachment receipt");
519
- const result = { ...item, fileId: uploaded.fileId, transport: "r2", machineId: void 0 };
546
+ const result = {
547
+ ...item,
548
+ fileId: uploaded.fileId,
549
+ transport: "r2",
550
+ machineId: void 0,
551
+ ...uploaded.encryption ? { encryption: uploaded.encryption } : {}
552
+ };
520
553
  delete result.machineId;
521
554
  return result;
522
555
  };
@@ -755,14 +788,91 @@ function checkMeta(meta, entry, manifest) {
755
788
  if (existence !== void 0 && owner !== manifest.migrationId)
756
789
  throw new Error(`Document ID collision: ${entry.id}. Existing cloud data is unchanged.`);
757
790
  }
758
- async function openMigrationTarget(provider, workspaceId, content) {
759
- if (content?.mode === "protected")
760
- throw new WorkspaceStreamsConfigurationError("加密工作区不支持导入");
761
- requirePlaintextWorkspaceStreamsContent(content);
791
+ async function openMigrationTarget(provider, workspaceId, content, protectedTarget) {
792
+ if (content.mode === "protected") {
793
+ if (!protectedTarget)
794
+ throw new Error("E2EE migration requires an approved paired CLI machine.");
795
+ await protectedTarget.authorize();
796
+ } else requirePlaintextWorkspaceStreamsContent(content);
762
797
  const baseUrl = await prepareCliStreamsGatewayBaseUrl(provider);
798
+ const bucketId = content.mode === "protected" ? protectedTarget?.bucketId() : LORO_STREAMS_BUCKET_ID;
799
+ if (!bucketId || content.mode === "protected" && bucketId === LORO_STREAMS_BUCKET_ID)
800
+ throw new Error("E2EE content bucket is unavailable");
763
801
  const lifetime = new AbortController();
764
802
  const streams = /* @__PURE__ */ new Set();
765
- const urlFor = (id) => createLoroStreamUrl({ baseUrl, bucketId: LORO_STREAMS_BUCKET_ID, streamId: id });
803
+ const urlFor = (id) => createLoroStreamUrl({ baseUrl, bucketId, streamId: id });
804
+ const rooms = /* @__PURE__ */ new Map([
805
+ [getLoroMetaStreamId(workspaceId), { kind: "meta" }]
806
+ ]);
807
+ const documentStreamId = (entry) => {
808
+ const id = getLoroStreamIdForDocId(workspaceId, entry.id);
809
+ rooms.set(id, { kind: "doc", docId: entry.id });
810
+ return id;
811
+ };
812
+ const protectionFor = (id) => {
813
+ if (content.mode !== "protected") return void 0;
814
+ const room = rooms.get(id) ?? { kind: "flock", flockDocId: id };
815
+ const selected = content.resolve(room);
816
+ if (selected.mode !== "protected") throw new Error("E2EE migration room must be protected");
817
+ const provider2 = selected.config.provider;
818
+ return {
819
+ readPolicy: "encrypted-only",
820
+ writePolicy: "encrypt",
821
+ provider: {
822
+ maxSealOverheadBytes: provider2.maxSealOverheadBytes,
823
+ seal: (input) => provider2.seal({
824
+ ...input,
825
+ additionalData: (header) => encodeStreamsRoomAdditionalData(
826
+ content.namespace,
827
+ room,
828
+ input.additionalData(header)
829
+ )
830
+ }),
831
+ open: (input) => provider2.open({
832
+ ...input,
833
+ additionalData: encodeStreamsRoomAdditionalData(
834
+ content.namespace,
835
+ room,
836
+ input.additionalData
837
+ )
838
+ })
839
+ }
840
+ };
841
+ };
842
+ const writePart = async (id, updates) => {
843
+ if (content.mode !== "protected") return part(updates);
844
+ await protectedTarget?.authorize();
845
+ const provider2 = protectionFor(id)?.provider;
846
+ if (!provider2) throw new Error("E2EE migration protection unavailable");
847
+ let authenticated;
848
+ const sealed = await provider2.seal({
849
+ plaintext: part(updates).body,
850
+ context: {
851
+ protocol: "loro-streams-crdt-payload-protection",
852
+ version: 2,
853
+ kind: "update_batch"
854
+ },
855
+ additionalData: (header) => {
856
+ if (authenticated || !header.length || header.length > 512)
857
+ throw new Error("Invalid protected migration header");
858
+ authenticated = new Uint8Array(10 + header.length);
859
+ authenticated.set([76, 83, 67, 69, 2, 1]);
860
+ new DataView(authenticated.buffer).setUint16(6, header.length, false);
861
+ authenticated.set(header, 10);
862
+ const domain = new TextEncoder().encode("loro-streams-crdt-payload-protection/v2\0");
863
+ const aad = new Uint8Array(domain.length + authenticated.length);
864
+ aad.set(domain);
865
+ aad.set(authenticated, domain.length);
866
+ return aad;
867
+ }
868
+ });
869
+ if (!authenticated || sealed.header.length !== authenticated.length - 10 || !sealed.header.every((byte, index) => authenticated?.[10 + index] === byte) || !sealed.sealed.length || sealed.header.length + sealed.sealed.length - part(updates).body.length > provider2.maxSealOverheadBytes)
870
+ throw new Error("Invalid protected migration envelope");
871
+ const envelope = new Uint8Array(authenticated.length + sealed.sealed.length);
872
+ envelope.set(authenticated);
873
+ envelope.set(sealed.sealed, authenticated.length);
874
+ return part([envelope]);
875
+ };
766
876
  const fetchFor = (signal) => (input, init) => fetch(input, {
767
877
  ...init,
768
878
  signal: AbortSignal.any([
@@ -784,7 +894,10 @@ async function openMigrationTarget(provider, workspaceId, content) {
784
894
  adapter,
785
895
  auth: provider.createAuthCallback(),
786
896
  fetch: fetchFor(signal),
787
- snapshotCodec: streamsSnapshotCodec,
897
+ snapshotCodec: content.mode === "protected" ? content.snapshotCodec ?? streamsSnapshotCodec : streamsSnapshotCodec,
898
+ snapshotUpload: content.mode === "protected" ? content.snapshotUpload : void 0,
899
+ e2ee: protectionFor(id),
900
+ payloadProtectionRequired: content.mode === "protected",
788
901
  shardUrls: getLoroStreamsShardUrls(baseUrl, provider.getShardHostSuffix())
789
902
  });
790
903
  streams.add(stream);
@@ -815,11 +928,7 @@ async function openMigrationTarget(provider, workspaceId, content) {
815
928
  };
816
929
  const readDoc = async (entry, signal) => {
817
930
  const doc = new LoroDoc();
818
- const cursor = await read(
819
- getLoroStreamIdForDocId(workspaceId, entry.id),
820
- createLoroDocAdapter(doc),
821
- signal
822
- );
931
+ const cursor = await read(documentStreamId(entry), createLoroDocAdapter(doc), signal);
823
932
  return { doc, exists: cursor !== null };
824
933
  };
825
934
  const transact = async (id, mutate, signal) => {
@@ -835,12 +944,13 @@ async function openMigrationTarget(provider, workspaceId, content) {
835
944
  );
836
945
  if (!batch?.updates.length) return;
837
946
  if (!cursor) {
838
- if (unwrap(await client(id, signal).create({ part: part(batch.updates) })).created) return;
947
+ if (unwrap(await client(id, signal).create({ part: await writePart(id, batch.updates) })).created)
948
+ return;
839
949
  } else {
840
950
  const result = unwrap(
841
951
  await client(id, signal).appendCas({
842
952
  expectedOffset: cursor.nextOffset,
843
- part: part(batch.updates)
953
+ part: await writePart(id, batch.updates)
844
954
  })
845
955
  );
846
956
  if (result.kind === "ok") return;
@@ -850,6 +960,19 @@ async function openMigrationTarget(provider, workspaceId, content) {
850
960
  };
851
961
  return {
852
962
  async preflight(manifest, _reserved, signal) {
963
+ if (manifest.targetContentMode !== content.mode)
964
+ throw new Error("Migration target mode changed");
965
+ if (content.mode === "protected") {
966
+ if (!manifest.targetGenesisHash || content.namespace !== encryptedWorkspaceNamespace(manifest.targetGenesisHash))
967
+ throw new Error("Migration target encrypted identity changed");
968
+ await protectedTarget?.authorize();
969
+ for (const entry of manifest.documents) {
970
+ if (entry.id.startsWith("task-") || entry.meta.historyBackend && entry.meta.historyBackend !== "loro")
971
+ throw new Error("E2EE migration does not support legacy task or Roost history");
972
+ protectionFor(documentStreamId(entry));
973
+ }
974
+ for (const index of manifest.flocks) protectionFor(index.id);
975
+ }
853
976
  if (!unwrap(
854
977
  await client(getLoroMetaStreamId(workspaceId), signal).bucketSupportsAppendCas({ signal })
855
978
  ))
@@ -880,23 +1003,20 @@ async function openMigrationTarget(provider, workspaceId, content) {
880
1003
  doc.getMap(receiptRoot).set("sourceSha256", entry.sha256);
881
1004
  doc.commit();
882
1005
  const created = unwrap(
883
- await client(getLoroStreamIdForDocId(workspaceId, entry.id), signal).create({
884
- part: part([doc.export({ mode: "update" })])
1006
+ await client(documentStreamId(entry), signal).create({
1007
+ part: await writePart(documentStreamId(entry), [doc.export({ mode: "update" })])
885
1008
  })
886
1009
  );
887
1010
  if (!created.created)
888
1011
  assertOwnedDocument((await readDoc(entry, signal)).doc, entry, manifest.migrationId);
889
1012
  },
890
1013
  async upload(entry, manifest, bytes, signal) {
1014
+ if (content.mode === "protected") await protectedTarget?.authorize();
891
1015
  const remote = await readDoc(entry, signal);
892
1016
  if (!remote.exists) throw new Error(`Migration reservation disappeared: ${entry.id}`);
893
1017
  assertOwnedDocument(remote.doc, entry, manifest.migrationId);
894
1018
  remote.doc.import(bytes);
895
- const stream = make(
896
- getLoroStreamIdForDocId(workspaceId, entry.id),
897
- createLoroDocAdapter(remote.doc),
898
- signal
899
- );
1019
+ const stream = make(documentStreamId(entry), createLoroDocAdapter(remote.doc), signal);
900
1020
  try {
901
1021
  const result = await stream.sync();
902
1022
  if (!result.ok)
@@ -956,12 +1076,16 @@ async function openMigrationTarget(provider, workspaceId, content) {
956
1076
  );
957
1077
  },
958
1078
  async publish(entry, manifest, signal) {
1079
+ const fence = content.mode === "protected" ? (await readDoc(entry, signal)).doc.getMap(receiptRoot).get("importFence") : void 0;
1080
+ if (content.mode === "protected" && isSessionDocRoomId(entry.id) && (!fence || typeof fence !== "object" || !("workspaceId" in fence) || fence.workspaceId !== workspaceId))
1081
+ throw new Error("Missing E2EE session import fence");
959
1082
  await transact(
960
1083
  getLoroMetaStreamId(workspaceId),
961
1084
  (meta) => {
962
1085
  checkMeta(meta, entry, manifest);
963
1086
  if (meta.get(["m", entry.id, "ossMigrationId"]) === manifest.migrationId) return;
964
1087
  const values = isSessionDocRoomId(entry.id) ? migratedMetadata(entry.meta, manifest) : { ...entry.meta, ossMigrationId: manifest.migrationId };
1088
+ if (fence) values.importFence = jsonObject.parse(fence);
965
1089
  meta.set(["e", entry.id], true);
966
1090
  for (const [key, value] of Object.entries(values)) meta.set(["m", entry.id, key], value);
967
1091
  },
@@ -1153,8 +1277,8 @@ const migrateCommand = new Command("migrate").description("Import a frozen OSS s
1153
1277
  }
1154
1278
  ])).workspace;
1155
1279
  const workspace = selectWorkspaceSummary(candidates, selector);
1156
- if ("contentMode" in workspace && workspace.contentMode === "e2ee")
1157
- throw new Error("加密工作区不支持导入");
1280
+ assertRetainedE2eeModeAllowsOpen(auth.userId, workspace);
1281
+ const encrypted = workspace.contentMode === "e2ee";
1158
1282
  const sourcePath = await fs__default.realpath(
1159
1283
  options.source ?? path__default.join(os__default.homedir(), getInstallationProfile("local").dataDirectoryName)
1160
1284
  );
@@ -1174,6 +1298,8 @@ const migrateCommand = new Command("migrate").description("Import a frozen OSS s
1174
1298
  sourceUserId: catalog.identity.userId,
1175
1299
  sourceName: sourceWorkspace.name,
1176
1300
  targetWorkspaceId: workspace.id,
1301
+ targetContentMode: encrypted ? "protected" : "plaintext",
1302
+ ...encrypted ? { targetGenesisHash: workspace.genesisHash } : {},
1177
1303
  targetMachineId: auth.machineId,
1178
1304
  targetUserId: auth.userId,
1179
1305
  deployment: authBaseUrl,
@@ -1231,43 +1357,75 @@ Documents: ${manifest.documents.length}`
1231
1357
  }
1232
1358
  }
1233
1359
  const journal = await loadJournal(directory, migrationId);
1234
- const tokenProvider = createCloudStreamsTokenPort({
1235
- token: auth.token,
1236
- authBaseUrl,
1237
- authSiteUrl: LODY_AUTH_SITE_URL,
1238
- logger
1239
- }).createTokenProvider({ workspaceId: workspace.id });
1240
1360
  if (!manifest.documents.length) {
1241
1361
  console.log("No records to migrate.");
1242
1362
  return;
1243
1363
  }
1244
- await registerMachineAccessForCliToken({
1245
- token: auth.token,
1246
- workspaceId: workspace.id,
1247
- machineId: auth.machineId
1248
- });
1249
- const program = withMigrationTokens(
1250
- tokenProvider,
1251
- (tokens) => acquireRelease(
1252
- migrationStep(
1253
- () => openMigrationTarget(tokens, workspace.id, {
1254
- mode: "contentMode" in workspace && workspace.contentMode === "e2ee" ? "protected" : "plaintext"
1255
- })
1256
- ),
1257
- (target) => migrationStep(() => target.close()).pipe(orDie)
1258
- ).pipe(
1259
- flatMap(
1260
- (target) => migrateSnapshot(manifest, journal, directory).pipe(
1261
- provideService(MigrationRuntime, {
1262
- target,
1263
- transfer: new SessionAttachmentTransfer(auth.token, serverBaseUrl),
1264
- progress: console.log
1265
- })
1266
- )
1267
- ),
1268
- scoped
1269
- )
1270
- );
1364
+ if (!encrypted)
1365
+ await registerMachineAccessForCliToken({
1366
+ token: auth.token,
1367
+ workspaceId: workspace.id,
1368
+ machineId: auth.machineId
1369
+ });
1370
+ const program = gen(function* () {
1371
+ const e2ee = encrypted ? yield* acquireRelease(
1372
+ migrationStep(async () => {
1373
+ const { openCliE2eeWorkspaceLegacy } = await import("./workspace-legacy-jZ0D5Xl-.js").then((n) => n.b_);
1374
+ return openCliE2eeWorkspaceLegacy({
1375
+ accountId: auth.userId,
1376
+ workspaceId: workspace.id,
1377
+ machineId: auth.machineId,
1378
+ genesisHash: workspace.genesisHash ?? "",
1379
+ cloud: createCloudE2eePort({ token: auth.token, authBaseUrl, logger }),
1380
+ onUnavailable: () => logger.debug("e2ee_migration_unavailable")
1381
+ }).catch((error) => {
1382
+ throw describeEncryptedCommandFailure(workspace.id, error);
1383
+ });
1384
+ }),
1385
+ (owner) => migrationStep(() => owner.close()).pipe(orDie)
1386
+ ) : void 0;
1387
+ if (e2ee) yield* migrationStep(() => e2ee.authorizeImport());
1388
+ const tokenProvider = (e2ee?.tokens ?? createCloudStreamsTokenPort({
1389
+ token: auth.token,
1390
+ authBaseUrl,
1391
+ authSiteUrl: LODY_AUTH_SITE_URL,
1392
+ logger
1393
+ })).createTokenProvider({ workspaceId: workspace.id });
1394
+ yield* withMigrationTokens(
1395
+ tokenProvider,
1396
+ (tokens) => acquireRelease(
1397
+ migrationStep(
1398
+ () => openMigrationTarget(
1399
+ tokens,
1400
+ workspace.id,
1401
+ e2ee?.content ?? { mode: "plaintext" },
1402
+ e2ee ? { authorize: e2ee.authorizeImport, bucketId: e2ee.bucketId } : void 0
1403
+ )
1404
+ ),
1405
+ (target) => migrationStep(() => target.close()).pipe(orDie)
1406
+ ).pipe(
1407
+ flatMap(
1408
+ (target) => migrateSnapshot(manifest, journal, directory).pipe(
1409
+ provideService(MigrationRuntime, {
1410
+ target,
1411
+ transfer: new SessionAttachmentTransfer(
1412
+ auth.token,
1413
+ serverBaseUrl,
1414
+ e2ee ? {
1415
+ token: async () => {
1416
+ await e2ee.authorizeImport();
1417
+ return e2ee.attachmentToken();
1418
+ }
1419
+ } : void 0
1420
+ ),
1421
+ progress: console.log
1422
+ })
1423
+ )
1424
+ ),
1425
+ scoped
1426
+ )
1427
+ );
1428
+ }).pipe(scoped);
1271
1429
  const exit = await runPromiseExit(program, { signal });
1272
1430
  if (isFailure(exit)) throw squash(exit.cause);
1273
1431
  console.log(`Migration backup and resume journal: ${directory}`);
@@ -1279,4 +1437,4 @@ export {
1279
1437
  withMigrationLock,
1280
1438
  withMigrationTokens
1281
1439
  };
1282
- //# sourceMappingURL=migrate-DxEEhXQ9.js.map
1440
+ //# sourceMappingURL=migrate-CUdZ3XBR.js.map
@@ -1,7 +1,7 @@
1
1
  import { C as Command } from "./chunks/vendor-commander-BkZcYyor.js";
2
- import { a6 as runOneShotCommand, a9 as getAuthContextOrThrow, ab as resolveWorkspaceOrThrow, a7 as printJson } from "./command-runtime-CU9xs2mb.js";
2
+ import { a6 as runOneShotCommand, a9 as getAuthContextOrThrow, ab as resolveWorkspaceOrThrow, a7 as printJson } from "./command-runtime-C7EPuHLe.js";
3
3
  import { g as getCliPlatformKind } from "./cli-platform-Cfc6A61f.js";
4
- import { O as OperationListQuerySchema, L as LodyOperationStore, g as getLodyOperationStorePath, r as runWithOperationStoreBusyRetry } from "./operation-store-D1TdJgBc.js";
4
+ import { O as OperationListQuerySchema, L as LodyOperationStore, g as getLodyOperationStorePath, r as runWithOperationStoreBusyRetry } from "./operation-store-rllAX2mr.js";
5
5
  import { r as renderTerminalTable } from "./terminal-table-DSTeeT1J.js";
6
6
  import "node:events";
7
7
  import "node:child_process";
@@ -9,7 +9,7 @@ import "node:path";
9
9
  import "node:fs";
10
10
  import "node:process";
11
11
  import "./chunks/commonjs-helpers-CCIqAdii.js";
12
- import "./login-shell-env-DiOZ-bog.js";
12
+ import "./login-shell-env-HKDW5zwx.js";
13
13
  import "./chunks/vendor-posthog-node-CwZyUQxO.js";
14
14
  import "path";
15
15
  import "./chunks/vendor-@posthog-core-BB1ZGy3x.js";
@@ -17,7 +17,7 @@ import "node:readline";
17
17
  import "node:async_hooks";
18
18
  import "./installation-profile-BgCqPyUj.js";
19
19
  import "node:os";
20
- import "./http-transport-DDAJ_zUL.js";
20
+ import "./http-transport-C1f1XEnB.js";
21
21
  import "./process-DrX1wZZk.js";
22
22
  import "node:url";
23
23
  import "./chunks/vendor-cross-spawn-DYIHnyej.js";
@@ -48,7 +48,7 @@ import "util";
48
48
  import "node:crypto";
49
49
  import "node:zlib";
50
50
  import "node:diagnostics_channel";
51
- import "./chunks/vendor-undici-D9lUGEXQ.js";
51
+ import "./chunks/vendor-undici-Cm00wA7x.js";
52
52
  import "node:assert";
53
53
  import "node:http";
54
54
  import "node:util";
@@ -56,6 +56,7 @@ import "node:querystring";
56
56
  import "node:perf_hooks";
57
57
  import "node:util/types";
58
58
  import "node:worker_threads";
59
+ import "node:http2";
59
60
  import "node:console";
60
61
  import "node:dns";
61
62
  import "string_decoder";
@@ -99,8 +100,8 @@ import "./chunks/vendor-proxy-from-env-agT35mrt.js";
99
100
  import "./const-LYLptZ7f.js";
100
101
  import "./chunks/vendor-zod-DAcQjQuC.js";
101
102
  import "./time-sync-D63wG9u-.js";
102
- import "./local-ipc-BQZPuSjl.js";
103
- import "./schedule-types-DTul4K9c.js";
103
+ import "./local-ipc-B8vySppK.js";
104
+ import "./schedule-types-BquxGfza.js";
104
105
  import "./daemon-update-qOLnkZcv.js";
105
106
  import "./magpie-import-IrqfCF6i.js";
106
107
  import "./project-path-CAQE9bes.js";
@@ -109,7 +110,7 @@ import "./rpc-secret-CPdan_XW.js";
109
110
  import "node:string_decoder";
110
111
  import "./code-collab-Cgso3Ix3.js";
111
112
  import "./ios-simulator-BduF_qia.js";
112
- import "./auth-BzBqWcHJ.js";
113
+ import "./auth-CTegS0TL.js";
113
114
  import "./chunks/vendor-chalk-MVIUzg44.js";
114
115
  import "./chunks/vendor-ora-VZtLV0pD.js";
115
116
  import "./chunks/vendor-cli-cursor-BxGMzrFe.js";
@@ -138,19 +139,19 @@ import "./chunks/vendor-@better-fetch-fetch-Cuh8CnyA.js";
138
139
  import "./chunks/vendor-@better-auth-api-key-D0bKvhcn.js";
139
140
  import "./chunks/vendor-@convex-dev-better-auth-DvFvwHmk.js";
140
141
  import "./convex-site-url-Ca_MfzFd.js";
141
- import "./session-access-DBWXcozo.js";
142
+ import "./access-Sut1_1-c.js";
142
143
  import "./chunks/vendor-immer-F2vkwr8n.js";
143
144
  import "./chunks/vendor-loro-crdt-2CFvB1HS.js";
144
145
  import "./chunks/vendor-loro-mirror-kwb2EtZx.js";
145
146
  import "perf_hooks";
146
147
  import "./chunks/vendor-ws-D1QOrWHI.js";
147
- import "./chunks/vendor-loro-repo-KiPOxZ47.js";
148
+ import "./chunks/vendor-loro-repo-B1zdQ8Qd.js";
148
149
  import "./chunks/vendor-@loro-dev-flock-wasm-BH1ts_Xn.js";
149
150
  import "better-sqlite3";
150
151
  import "./chunks/vendor-@loro-dev-streams-crdt-BOuVa3yO.js";
151
152
  import "./chunks/vendor-@loro-dev-streams-client-DPTfaXHE.js";
152
- import "./presence-legacy-BI0h0kBA.js";
153
- import "./presence-BGW-7JQJ.js";
153
+ import "./presence-legacy-DIYBtj5j.js";
154
+ import "./presence-CZco7UQH.js";
154
155
  import "./chunks/vendor-croner-B5ClZHUj.js";
155
156
  import "fs/promises";
156
157
  import "./chunks/vendor-uuid-ZvTlSCzA.js";
@@ -159,8 +160,8 @@ import "module";
159
160
  import "./capabilities-Btwk4R--.js";
160
161
  import "./runtime-artifacts-CjowfwNS.js";
161
162
  import "./github-credential-runtime-Vuv6HxRs.js";
162
- import "./machine-protocol-capabilities-LN7bzFSN.js";
163
- import "./discovery-query-hcHHutEn.js";
163
+ import "./machine-protocol-capabilities-DEhAj9SH.js";
164
+ import "./discovery-query-C_7lyBI8.js";
164
165
  import "./chunks/vendor-cli-table3-B99hA5do.js";
165
166
  const operationCommand = new Command("operation").description("Inspect Operations on this machine").addCommand(
166
167
  new Command("list").description("List Operations owned by a requester Session and the authenticated user").option("--workspace <selector>", "Workspace id, slug or name").option("--session <id>", "Requester session id (defaults to LODY_SESSION_ID)").option("--state <state>", "active or finished").option("--limit <count>", "Page size (1-100, default 20)", Number).option("--cursor <cursor>", "Next page cursor").option("--json", "Print JSON").option("--debug", "Enable debug output").action(
@@ -211,4 +212,4 @@ const operationCommand = new Command("operation").description("Inspect Operation
211
212
  export {
212
213
  operationCommand
213
214
  };
214
- //# sourceMappingURL=operation-CuFKC3x2.js.map
215
+ //# sourceMappingURL=operation-CzLcjV3W.js.map
@@ -1,4 +1,4 @@
1
- import { D as DiscoveryPageShape, d as discoveryCursor, S as SessionInputAttachmentsSchema } from "./discovery-query-hcHHutEn.js";
1
+ import { D as DiscoveryPageShape, d as discoveryCursor, S as SessionInputAttachmentsSchema } from "./discovery-query-C_7lyBI8.js";
2
2
  import { randomUUID, createHash } from "node:crypto";
3
3
  import os__default from "node:os";
4
4
  import path__default from "node:path";
@@ -9,7 +9,7 @@ import { o as object, c as string, n as number, f as _enum, e as array, a as lit
9
9
  import Database from "better-sqlite3";
10
10
  import { mkdirSync, chmodSync } from "node:fs";
11
11
  import { g as getLodyDataDir } from "./installation-profile-BgCqPyUj.js";
12
- import { O as LodyOperationIdSchema, P as AgentRoleSnapshotSchema, Q as AgentMessageAuthorSchema, R as buildAgentMessageAuthor, T as LodyOperationCompletionSchema, U as LODY_OPERATION_COMPLETION_MAX_BYTES, V as LODY_OPERATION_COMMAND_MAX_BYTES, W as MemoryBindingSchema, X as LodyOperationItemSchema } from "./schedule-types-DTul4K9c.js";
12
+ import { O as LodyOperationIdSchema, P as AgentRoleSnapshotSchema, Q as AgentMessageAuthorSchema, R as buildAgentMessageAuthor, T as LodyOperationCompletionSchema, U as LODY_OPERATION_COMPLETION_MAX_BYTES, V as LODY_OPERATION_COMMAND_MAX_BYTES, W as MemoryBindingSchema, X as LodyOperationItemSchema } from "./schedule-types-BquxGfza.js";
13
13
  const INBOX_PREVIEW_BYTES = 64 * 1024;
14
14
  const INBOX_INLINE_MEMBERS = 50;
15
15
  const inboxScopeKey = (scope) => JSON.stringify([scope.workspaceId, scope.sessionId]);
@@ -1926,4 +1926,4 @@ export {
1926
1926
  inboxScopeKey as i,
1927
1927
  runWithOperationStoreBusyRetry as r
1928
1928
  };
1929
- //# sourceMappingURL=operation-store-D1TdJgBc.js.map
1929
+ //# sourceMappingURL=operation-store-rllAX2mr.js.map