nolo-cli 0.29.2 → 0.30.0-alpha.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 (135) hide show
  1. package/{_executeModel-BFVTGZXE.js → _executeModel-VBHHG7LT.js} +62 -68
  2. package/{action-LG32A6DJ.js → action-FENWPT3C.js} +14 -15
  3. package/{addContentAction-MPGMBJTQ.js → addContentAction-Z5S5ZQ7I.js} +12 -12
  4. package/{addDialogAgentAction-ZH23WDID.js → addDialogAgentAction-VUNVD2XR.js} +11 -11
  5. package/{agentDeleteCommand-4S4STG42.js → agentDeleteCommand-LLGZXUYJ.js} +60 -39
  6. package/{agentEmailCommands-3F4IP4DI.js → agentEmailCommands-LC2FPN6G.js} +76 -81
  7. package/{agentGrantCommands-JNDE4RWR.js → agentGrantCommands-E7ZZFRHK.js} +2 -1
  8. package/{agentListCommands-JCRV2XF6.js → agentListCommands-A6OBQ3QX.js} +57 -40
  9. package/{agentMachineCommands-KYXPYSFP.js → agentMachineCommands-4O4Q5B5X.js} +53 -35
  10. package/{agentPullCommand-ZZGU5KOY.js → agentPullCommand-4V36XNGV.js} +4 -3
  11. package/{agentRecordCommands-UADUPIXO.js → agentRecordCommands-W22RIQRV.js} +73 -78
  12. package/{agentRunCommand-MJWSR53W.js → agentRunCommand-V4OBU4FB.js} +77 -82
  13. package/{agentRunControl-SNUKXN6J.js → agentRunControl-AKBN2366.js} +13 -1
  14. package/{agentRuntimeLocal-PC5RRRPT.js → agentRuntimeLocal-I57YSGH4.js} +48 -30
  15. package/{agentSlice-C5OYLNBT.js → agentSlice-3ZHY7RAO.js} +12 -13
  16. package/{appDeleteCommands-ZXODZ5AD.js → appDeleteCommands-DJJF466K.js} +53 -35
  17. package/{appDeployCommands-AWC6JPZH.js → appDeployCommands-WJZGIOEZ.js} +53 -35
  18. package/{appDeployStatusCommands-74NXMDAI.js → appDeployStatusCommands-ICYXUJNO.js} +53 -35
  19. package/{appGetCommands-6YGIAP5L.js → appGetCommands-UOCWYJPV.js} +53 -35
  20. package/{appListCommands-DZWBHMNK.js → appListCommands-EOKWTXPW.js} +53 -35
  21. package/{authCommand-XMQHBK5L.js → authCommand-H5KE7K7K.js} +16 -16
  22. package/{authCommands-JSOG2H4E.js → authCommands-CXJ6PI2O.js} +7 -7
  23. package/{chunk-OEWEE4VW.js → chunk-2XM5KUNE.js} +4 -2
  24. package/{chunk-7H3UTGPM.js → chunk-3AUWC6EM.js} +82 -3
  25. package/{chunk-HEXXIS77.js → chunk-3RIWR23B.js} +1 -1
  26. package/{chunk-R7LOFGRE.js → chunk-446VANPP.js} +18 -14
  27. package/{chunk-RZNYL4LW.js → chunk-4SAV7BD7.js} +65 -1
  28. package/{chunk-QC6ZWDSV.js → chunk-56IUA7RU.js} +3 -3
  29. package/{chunk-R3JSTDQO.js → chunk-66O5MZYH.js} +1 -1
  30. package/{chunk-PSK2RUHV.js → chunk-7CD24PU4.js} +360 -2
  31. package/{chunk-G2BZ43DV.js → chunk-A4JDTA5T.js} +13 -13
  32. package/{chunk-DZ3XJVET.js → chunk-AOS5IN2I.js} +1 -1
  33. package/{chunk-SKDNBYZK.js → chunk-BOL2D2JW.js} +1 -1
  34. package/{chunk-YTA2QOEE.js → chunk-CAENRKNJ.js} +15 -0
  35. package/{chunk-2TYLTEAH.js → chunk-CV6I4HBA.js} +1 -1
  36. package/chunk-DCDL3GC4.js +171 -0
  37. package/{chunk-FVOSIYXM.js → chunk-DCWBP2O7.js} +42 -393
  38. package/{chunk-OLWMGSW2.js → chunk-DI6MXJK5.js} +37 -37
  39. package/{chunk-HRPWRVBI.js → chunk-DKRT67FG.js} +11 -11
  40. package/{chunk-L6RBX4L4.js → chunk-DWQNDGO7.js} +20 -8
  41. package/{chunk-VKBTAQWT.js → chunk-FS5TTXPS.js} +6 -6
  42. package/chunk-G5JHHUAK.js +73 -0
  43. package/{chunk-TOGGHWHI.js → chunk-G6VITLCZ.js} +3 -3
  44. package/{chunk-RJBTU7AS.js → chunk-GAGUBI42.js} +302 -14
  45. package/{chunk-NXMJ55RU.js → chunk-GVKTKT3O.js} +3 -3
  46. package/{chunk-5ZXNLOAG.js → chunk-HI7QZNWX.js} +17 -10
  47. package/{chunk-DF7SMWEV.js → chunk-HLG6GAUD.js} +1 -1
  48. package/{chunk-MQRZ5QUH.js → chunk-IXZX5CJK.js} +1 -1
  49. package/{chunk-IC7W63RM.js → chunk-IZ3CBMD5.js} +3 -3
  50. package/{chunk-VHBWHNVT.js → chunk-K6QEHQZ3.js} +8 -4
  51. package/chunk-KW47OSRJ.js +3246 -0
  52. package/{chunk-Q5RXHXKU.js → chunk-KWKD3BCC.js} +189 -122
  53. package/{chunk-L65QKSVJ.js → chunk-L3GCUVOH.js} +1 -1
  54. package/{chunk-4BDPDTJU.js → chunk-L3VQOVKK.js} +8 -8
  55. package/{chunk-HALKDXKP.js → chunk-MEUZFIAJ.js} +8 -4
  56. package/{chunk-H5S4XUGI.js → chunk-MMCVBEAD.js} +174 -149
  57. package/{chunk-XOIF2TNF.js → chunk-OB6FBSH3.js} +13 -0
  58. package/chunk-OYK7PA5U.js +1707 -0
  59. package/{chunk-6HTWA77J.js → chunk-Q24P6TUS.js} +1 -1
  60. package/{chunk-GMJS5AYP.js → chunk-QLV2GKU5.js} +16 -178
  61. package/{chunk-WMB7GVPN.js → chunk-SWOTB2TX.js} +134 -1166
  62. package/{chunk-GC34RRTQ.js → chunk-SWYMCHM7.js} +1 -69
  63. package/{chunk-BBGRJB5E.js → chunk-SZ5CBYMZ.js} +4 -4
  64. package/chunk-T27IEBNQ.js +149 -0
  65. package/{chunk-WX3ZOSTL.js → chunk-T3Y5EMJS.js} +24 -26
  66. package/{chunk-UFL6WHHJ.js → chunk-THTAR67C.js} +1056 -137
  67. package/{chunk-2FX23RGA.js → chunk-TJYWZ3LO.js} +4 -4
  68. package/{chunk-KEF5OBOZ.js → chunk-UKC5HU2C.js} +33 -27
  69. package/{chunk-HRJEPMZY.js → chunk-UTQZ73QQ.js} +2 -2
  70. package/{chunk-GT3GG2H7.js → chunk-VSTUQGLT.js} +1 -1
  71. package/{chunk-32ZM6HVI.js → chunk-W2YKDXT7.js} +95 -95
  72. package/{chunk-L3QFIBZG.js → chunk-WTGCTVJG.js} +1 -1
  73. package/{chunk-XS7UPVR7.js → chunk-XD5NQEOH.js} +5 -5
  74. package/{chunk-WSQLK2KR.js → chunk-XFGM5PJP.js} +6 -6
  75. package/{chunk-JSB4N6NU.js → chunk-YLADSPDU.js} +3 -3
  76. package/{chunk-FRN5QOKN.js → chunk-YWGSCF37.js} +19 -4
  77. package/{codingSkills-EN6Z6G6U.js → codingSkills-V35TRR4Y.js} +1 -2
  78. package/{createAgentAutomationAction-BK4UZJKU.js → createAgentAutomationAction-3GMH6ORX.js} +30 -37
  79. package/{createDialogAction-MJJUI2MK.js → createDialogAction-R5MCL4RE.js} +32 -38
  80. package/{createPageAction-YMZ7K363.js → createPageAction-QYTG656R.js} +43 -50
  81. package/{dbSlice-6QJYQUBV.js → dbSlice-OBV7VFCF.js} +11 -11
  82. package/{deleteFile-WDZ3VM7B.js → deleteFile-AC45HYSM.js} +5 -5
  83. package/{dialogCommands-OKH45ASS.js → dialogCommands-NUQGIXVZ.js} +53 -37
  84. package/{dialogSlice-UDOKNDHB.js → dialogSlice-CFDECXEU.js} +27 -34
  85. package/{docCreateCommands-MCLMR4TE.js → docCreateCommands-UNFCXB5N.js} +52 -36
  86. package/{docDeleteCommands-ONDHI7JV.js → docDeleteCommands-NG5IVKE5.js} +54 -38
  87. package/{docReadCommands-FCXBMISW.js → docReadCommands-6J7MUUX6.js} +52 -36
  88. package/{docStore-N66O4CGH.js → docStore-MZZWJM4F.js} +28 -35
  89. package/{docUpdateCommands-T3XN6XOX.js → docUpdateCommands-6AW3VZOX.js} +55 -39
  90. package/{fetchMessages-W4IKHPCS.js → fetchMessages-VPPQDDZ4.js} +3 -3
  91. package/{getPricing-X6I23RN6.js → getPricing-XQYSSVV6.js} +6 -7
  92. package/{handleSendMessageAction-KC4AYUZP.js → handleSendMessageAction-IU2QNTLM.js} +30 -37
  93. package/index.js +72 -72
  94. package/{localDialogRead-UFLBS6OT.js → localDialogRead-P72W2U2R.js} +1 -1
  95. package/{machineCommands-DIMRFA3Y.js → machineCommands-Z2QEWTHZ.js} +76 -81
  96. package/{machineWsRunDispatch-2DYJZI6Z.js → machineWsRunDispatch-SJTYHZHN.js} +71 -76
  97. package/{models-YT32CTT5.js → models-WDUTTYFS.js} +2 -2
  98. package/{offlineMarxistsAgentCommand-5OOWZLJI.js → offlineMarxistsAgentCommand-E6LUG63A.js} +6 -2
  99. package/package.json +1 -1
  100. package/{read-C7Y6LSBM.js → read-QK7ZRX6G.js} +6 -6
  101. package/{readDocTool-TOHRYJHP.js → readDocTool-EYDMVRBL.js} +2 -1
  102. package/{readlineWorkspace-HUPHMLDG.js → readlineWorkspace-EY3BPXIU.js} +150 -162
  103. package/{removeDialogAgentAction-WZXPOH5S.js → removeDialogAgentAction-TBW3UZJW.js} +15 -16
  104. package/{runAgentClientLoop-5TGSUKHV.js → runAgentClientLoop-N3YDLTMS.js} +61 -66
  105. package/{setDialogExtraReferencesAction-INZY2ENI.js → setDialogExtraReferencesAction-Q3ANF2NR.js} +12 -12
  106. package/{setPrimaryDialogAgentAction-WCVLPYCF.js → setPrimaryDialogAgentAction-FQ5R3EFJ.js} +15 -16
  107. package/{settingSlice-IDUM4LWU.js → settingSlice-JKKV2T7O.js} +13 -14
  108. package/{skillDiscovery-ITA7BI7A.js → skillDiscovery-I3QRA7NE.js} +2 -2
  109. package/{spaceCommands-XSSDB3YK.js → spaceCommands-R6AEQNLG.js} +57 -40
  110. package/{spaceSlice-BXDCO6PT.js → spaceSlice-MCH7RLLP.js} +27 -34
  111. package/{streamAgentChatTurn-HRFMVSVC.js → streamAgentChatTurn-Q4U2CVMI.js} +130 -1300
  112. package/{switchDialogAgentAction-YBFFCBOD.js → switchDialogAgentAction-QQGVE4SL.js} +11 -11
  113. package/{toolApiClient-WVTUYOFM.js → toolApiClient-ARGFDJAG.js} +2 -2
  114. package/{tools-5V6FHWQU.js → tools-Y3UBLLYW.js} +50 -56
  115. package/{tuiSummaryLlmCaller-GCUPULOV.js → tuiSummaryLlmCaller-4474IBTI.js} +12 -12
  116. package/{updateDialogTitleAction-W62C4W4K.js → updateDialogTitleAction-3J7GH67I.js} +35 -43
  117. package/chunk-5CS33IBL.js +0 -301
  118. package/chunk-5MMAK75Q.js +0 -15
  119. package/chunk-HYSJHRWD.js +0 -669
  120. package/chunk-MRC4Q34M.js +0 -188
  121. package/chunk-SIZQB7BD.js +0 -91
  122. package/chunk-UEOPA6MV.js +0 -641
  123. package/chunk-VIDPVFP3.js +0 -20
  124. package/chunk-W2LZV5GE.js +0 -231
  125. package/chunk-Y5GCAMGP.js +0 -9
  126. package/chunk-YYLHWIW6.js +0 -48
  127. package/chunk-Z54ZAZZC.js +0 -1791
  128. package/chunk-ZZ2MH7LE.js +0 -84
  129. package/{chunk-OMP5L5NF.js → chunk-44HACRCK.js} +3 -3
  130. package/{chunk-ZVZMT3EA.js → chunk-KWCLUYGQ.js} +3 -3
  131. package/{chunk-NRY4GCKJ.js → chunk-WHLVPK32.js} +3 -3
  132. package/{chunk-RQSOAMPJ.js → chunk-Z5MXSEOJ.js} +2 -2
  133. package/{chunk-XMLRJUU5.js → chunk-ZFTCLBEX.js} +9 -9
  134. package/{runtimeDoctorCommands-HSU632DY.js → runtimeDoctorCommands-E2OUORHK.js} +3 -3
  135. package/{tableCommands-QSZILI7I.js → tableCommands-PRJNWN6Q.js} +6 -6
package/chunk-MRC4Q34M.js DELETED
@@ -1,188 +0,0 @@
1
- import {
2
- API_VERSION
3
- } from "./chunk-LCBAMY2M.js";
4
-
5
- // packages/auth/routes.ts
6
- var authRoutes = {
7
- login: {
8
- path: `${API_VERSION}/users/login`,
9
- method: "POST",
10
- createPath: () => `${API_VERSION}/users/login`
11
- },
12
- signup: {
13
- path: `${API_VERSION}/users/signup`,
14
- method: "POST",
15
- createPath: () => `${API_VERSION}/users/signup`
16
- },
17
- users: {
18
- cliLoginStart: {
19
- path: `${API_VERSION}/users/cli-login/start`,
20
- method: "POST",
21
- createPath: () => `${API_VERSION}/users/cli-login/start`
22
- },
23
- cliLoginAuthorize: {
24
- path: `${API_VERSION}/users/cli-login/authorize`,
25
- method: "POST",
26
- createPath: () => `${API_VERSION}/users/cli-login/authorize`
27
- },
28
- cliLoginPoll: {
29
- path: `${API_VERSION}/users/cli-login/poll`,
30
- method: "POST",
31
- createPath: () => `${API_VERSION}/users/cli-login/poll`
32
- },
33
- list: {
34
- path: `${API_VERSION}/users`,
35
- method: "GET",
36
- createPath: () => `${API_VERSION}/users`
37
- },
38
- usageReport: {
39
- path: `${API_VERSION}/users/usage-report`,
40
- method: "GET",
41
- createPath: () => `${API_VERSION}/users/usage-report`
42
- },
43
- growthReport: {
44
- path: `${API_VERSION}/users/growth-report`,
45
- method: "GET",
46
- createPath: () => `${API_VERSION}/users/growth-report`
47
- },
48
- providerBillingHealth: {
49
- path: `${API_VERSION}/users/provider-billing-health`,
50
- method: "GET",
51
- createPath: () => `${API_VERSION}/users/provider-billing-health`
52
- },
53
- providerBillingDrilldown: {
54
- path: `${API_VERSION}/users/provider-billing-drilldown`,
55
- method: "GET",
56
- createPath: () => `${API_VERSION}/users/provider-billing-drilldown`
57
- },
58
- providerCredentials: {
59
- path: `${API_VERSION}/users/provider-credentials`,
60
- method: "GET",
61
- createPath: () => `${API_VERSION}/users/provider-credentials`
62
- },
63
- providerCredentialLifecycle: {
64
- path: `${API_VERSION}/users/provider-credentials/lifecycle`,
65
- method: "POST",
66
- createPath: () => `${API_VERSION}/users/provider-credentials/lifecycle`
67
- },
68
- billingAnomalyLifecycle: {
69
- path: `${API_VERSION}/users/billing-anomalies/lifecycle`,
70
- method: "POST",
71
- createPath: () => `${API_VERSION}/users/billing-anomalies/lifecycle`
72
- },
73
- billingAnomalyDrilldown: {
74
- path: `${API_VERSION}/users/billing-anomalies/drilldown`,
75
- method: "GET",
76
- createPath: () => `${API_VERSION}/users/billing-anomalies/drilldown`
77
- },
78
- billingAnomalyAudit: {
79
- path: `${API_VERSION}/users/billing-anomalies/audit`,
80
- method: "POST",
81
- createPath: () => `${API_VERSION}/users/billing-anomalies/audit`
82
- },
83
- detail: {
84
- path: `${API_VERSION}/users/:userId`,
85
- method: "GET",
86
- createPath: (params) => `${API_VERSION}/users/${params.userId}`
87
- },
88
- sessionRevoke: {
89
- path: `${API_VERSION}/users/session-revoke`,
90
- method: "POST",
91
- createPath: () => `${API_VERSION}/users/session-revoke`
92
- },
93
- transfer: {
94
- path: `${API_VERSION}/users/:userId/transfer`,
95
- method: "POST",
96
- createPath: (params) => `${API_VERSION}/users/${params.userId}/transfer`
97
- },
98
- delete: {
99
- path: `${API_VERSION}/users/:userId`,
100
- method: "DELETE",
101
- createPath: (params) => `${API_VERSION}/users/${params.userId}`
102
- },
103
- disable: {
104
- path: `${API_VERSION}/users/:userId/disable`,
105
- method: "POST",
106
- createPath: (params) => `${API_VERSION}/users/${params.userId}/disable`
107
- },
108
- enable: {
109
- path: `${API_VERSION}/users/:userId/enable`,
110
- method: "POST",
111
- createPath: (params) => `${API_VERSION}/users/${params.userId}/enable`
112
- },
113
- adminPermissions: {
114
- path: `${API_VERSION}/users/:userId/admin-permissions`,
115
- method: "POST",
116
- createPath: (params) => `${API_VERSION}/users/${params.userId}/admin-permissions`
117
- },
118
- sendEmail: {
119
- path: `${API_VERSION}/users/send-email`,
120
- method: "POST",
121
- createPath: () => `${API_VERSION}/users/send-email`
122
- },
123
- spaceInvite: {
124
- path: `${API_VERSION}/users/space-invite`,
125
- method: "POST",
126
- createPath: () => `${API_VERSION}/users/space-invite`
127
- },
128
- spaceInviteStatus: {
129
- path: `${API_VERSION}/users/space-invite/status`,
130
- method: "GET",
131
- createPath: () => `${API_VERSION}/users/space-invite/status`
132
- },
133
- spaceInviteAccept: {
134
- path: `${API_VERSION}/users/space-invite/accept`,
135
- method: "POST",
136
- createPath: () => `${API_VERSION}/users/space-invite/accept`
137
- },
138
- emailPreferencesGet: {
139
- path: `${API_VERSION}/users/email-preferences`,
140
- method: "GET",
141
- createPath: () => `${API_VERSION}/users/email-preferences`
142
- },
143
- emailPreferencesUpdate: {
144
- path: `${API_VERSION}/users/email-preferences`,
145
- method: "POST",
146
- createPath: () => `${API_VERSION}/users/email-preferences`
147
- },
148
- emailReport: {
149
- path: `${API_VERSION}/users/email-report`,
150
- method: "GET",
151
- createPath: () => `${API_VERSION}/users/email-report`
152
- },
153
- emailRetryRun: {
154
- path: `${API_VERSION}/users/email-retry/run`,
155
- method: "POST",
156
- createPath: () => `${API_VERSION}/users/email-retry/run`
157
- },
158
- emailReplayFailures: {
159
- path: `${API_VERSION}/users/email-replay-failures`,
160
- method: "POST",
161
- createPath: () => `${API_VERSION}/users/email-replay-failures`
162
- },
163
- emailConfigGet: {
164
- path: `${API_VERSION}/users/email-config`,
165
- method: "GET",
166
- createPath: () => `${API_VERSION}/users/email-config`
167
- },
168
- emailConfigUpdate: {
169
- path: `${API_VERSION}/users/email-config`,
170
- method: "POST",
171
- createPath: () => `${API_VERSION}/users/email-config`
172
- },
173
- emailUnsubscribe: {
174
- path: `${API_VERSION}/users/email-unsubscribe`,
175
- method: "GET",
176
- createPath: () => `${API_VERSION}/users/email-unsubscribe`
177
- },
178
- rechargeHistory: {
179
- path: `${API_VERSION}/users/:userId/recharge-history`,
180
- method: "POST",
181
- createPath: (params) => `${API_VERSION}/users/${params.userId}/recharge-history`
182
- }
183
- }
184
- };
185
-
186
- export {
187
- authRoutes
188
- };
package/chunk-SIZQB7BD.js DELETED
@@ -1,91 +0,0 @@
1
- import {
2
- dialogMessageKey
3
- } from "./chunk-NRY4GCKJ.js";
4
- import {
5
- asOptionalFiniteNumber
6
- } from "./chunk-WWC7I6TA.js";
7
- import {
8
- asOptionalTrimmedString
9
- } from "./chunk-G3SUCT4W.js";
10
-
11
- // packages/core/chat/dialogAttachmentCleanup.ts
12
- var FILE_CONTENT_RE = /(?:https?:\/\/[^/"'\s]+)?\/api\/v1\/db\/file\/content\/([^?#"'\s)]+)/g;
13
- function extractFileContentIds(value) {
14
- const ids = /* @__PURE__ */ new Set();
15
- const visit = (input) => {
16
- if (typeof input === "string") {
17
- for (const match of input.matchAll(FILE_CONTENT_RE)) {
18
- const fileId = decodeURIComponent(match[1] ?? "").trim();
19
- if (fileId) ids.add(fileId);
20
- }
21
- return;
22
- }
23
- if (Array.isArray(input)) {
24
- for (const item of input) visit(item);
25
- return;
26
- }
27
- if (input && typeof input === "object") {
28
- for (const item of Object.values(input)) visit(item);
29
- }
30
- };
31
- visit(value);
32
- return [...ids];
33
- }
34
- function messageDbKey(dialogId, message) {
35
- const dbKey = asOptionalTrimmedString(message.dbKey);
36
- if (dbKey) return dbKey;
37
- const id = asOptionalTrimmedString(message.id);
38
- if (id) return dialogMessageKey(dialogId, id);
39
- return null;
40
- }
41
- function asText(value) {
42
- return asOptionalTrimmedString(value) ?? null;
43
- }
44
- function buildDialogAttachmentPlan(args) {
45
- const messageKeys = new Set(
46
- args.messages.map((message) => messageDbKey(args.dialogId, message)).filter((key) => Boolean(key))
47
- );
48
- const referencedFileIds = [
49
- ...new Set(args.messages.flatMap((message) => extractFileContentIds(message)))
50
- ];
51
- const candidates = referencedFileIds.map((fileId) => {
52
- const metadata = args.metadataByFileId[fileId];
53
- const ownerType = asText(metadata?.ownerType);
54
- const ownerId = asText(metadata?.ownerId);
55
- const ownerDbKey = asText(metadata?.ownerDbKey);
56
- const fileDbKey = asText(metadata?.dbKey);
57
- const source = asText(metadata?.source);
58
- const ownedByDialog = ownerType === "dialog" && ownerId === args.dialogId;
59
- const ownedByMessage = Boolean(ownerDbKey && messageKeys.has(ownerDbKey));
60
- const userOwnedReferenced = args.includeUserOwnedReferenced === true && Boolean(args.ownerId) && ownerType === "user" && ownerId === args.ownerId;
61
- const canDelete = Boolean(fileDbKey && (ownedByDialog || ownedByMessage || userOwnedReferenced));
62
- return {
63
- fileId,
64
- fileDbKey,
65
- size: asOptionalFiniteNumber(metadata?.size) ?? null,
66
- ownerType,
67
- ownerId,
68
- ownerDbKey,
69
- source,
70
- status: canDelete ? "delete" : "retain",
71
- reason: canDelete ? ownedByMessage ? "ownerDbKey matches a message in this dialog" : userOwnedReferenced ? "user-owned file is referenced by this dialog and explicit referenced-attachment deletion is enabled" : "ownerType/ownerId matches this dialog" : fileDbKey ? "file ownership is not exclusive to this dialog" : "file metadata not found"
72
- };
73
- });
74
- const deleteCandidates = candidates.filter((candidate) => candidate.status === "delete");
75
- const retainedCandidates = candidates.filter((candidate) => candidate.status === "retain");
76
- return {
77
- dialogId: args.dialogId,
78
- messageCount: args.messages.length,
79
- referencedFileIds,
80
- candidates,
81
- deleteCandidates,
82
- retainedCandidates,
83
- bytesToDelete: deleteCandidates.reduce((sum, candidate) => sum + (candidate.size ?? 0), 0),
84
- metadataReadFailures: args.metadataReadFailures ?? []
85
- };
86
- }
87
-
88
- export {
89
- extractFileContentIds,
90
- buildDialogAttachmentPlan
91
- };