nolo-cli 0.29.2 → 0.30.0-alpha.10
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/{_executeModel-BFVTGZXE.js → _executeModel-5ARVVUIK.js} +64 -69
- package/{action-LG32A6DJ.js → action-HI3VRQLP.js} +15 -16
- package/{addContentAction-MPGMBJTQ.js → addContentAction-NCURJ6PK.js} +13 -13
- package/{addDialogAgentAction-ZH23WDID.js → addDialogAgentAction-RCY4ECF4.js} +12 -12
- package/{agentDeleteCommand-4S4STG42.js → agentDeleteCommand-5Q6TDCJU.js} +62 -40
- package/{agentEmailCommands-3F4IP4DI.js → agentEmailCommands-DSX4BJ2I.js} +77 -81
- package/{agentGrantCommands-JNDE4RWR.js → agentGrantCommands-E7ZZFRHK.js} +2 -1
- package/{agentListCommands-JCRV2XF6.js → agentListCommands-S66HL5RO.js} +59 -41
- package/{agentMachineCommands-KYXPYSFP.js → agentMachineCommands-ULCQ5ZNN.js} +55 -36
- package/{agentPullCommand-ZZGU5KOY.js → agentPullCommand-4V36XNGV.js} +4 -3
- package/{agentRecordCommands-UADUPIXO.js → agentRecordCommands-2AA3GEGO.js} +75 -79
- package/{agentRunCommand-MJWSR53W.js → agentRunCommand-3KOT77XY.js} +79 -83
- package/{agentRunControl-SNUKXN6J.js → agentRunControl-AKBN2366.js} +13 -1
- package/{agentRuntimeLocal-PC5RRRPT.js → agentRuntimeLocal-7TMDJD4S.js} +50 -31
- package/{agentSlice-C5OYLNBT.js → agentSlice-6IQRQZX3.js} +13 -14
- package/{appDeleteCommands-ZXODZ5AD.js → appDeleteCommands-UUDIWLNE.js} +55 -36
- package/{appDeployCommands-AWC6JPZH.js → appDeployCommands-CO6SZ7YP.js} +55 -36
- package/{appDeployStatusCommands-74NXMDAI.js → appDeployStatusCommands-QEVKVECJ.js} +55 -36
- package/{appGetCommands-6YGIAP5L.js → appGetCommands-3YSCCLK4.js} +55 -36
- package/{appListCommands-DZWBHMNK.js → appListCommands-FBJAFZKK.js} +55 -36
- package/{authCommand-XMQHBK5L.js → authCommand-3ADNCFKD.js} +16 -16
- package/{authCommands-JSOG2H4E.js → authCommands-CXJ6PI2O.js} +7 -7
- package/{chunk-TOGGHWHI.js → chunk-2CYGIPJH.js} +3 -3
- package/{chunk-HRJEPMZY.js → chunk-2HQ4OG6N.js} +2 -2
- package/{chunk-XMLRJUU5.js → chunk-2IJAKBK2.js} +12 -10
- package/{chunk-OLWMGSW2.js → chunk-2SOQY5L6.js} +41 -39
- package/{chunk-7H3UTGPM.js → chunk-3AUWC6EM.js} +82 -3
- package/{chunk-6HTWA77J.js → chunk-43EPBPZ2.js} +1 -1
- package/{chunk-RJBTU7AS.js → chunk-4F77PJBR.js} +302 -14
- package/{chunk-RZNYL4LW.js → chunk-4SAV7BD7.js} +65 -1
- package/{chunk-R5V5G73M.js → chunk-5RDLGLAP.js} +0 -1
- package/{chunk-VKBTAQWT.js → chunk-6JH2DF7J.js} +6 -6
- package/{chunk-DZ3XJVET.js → chunk-AOS5IN2I.js} +1 -1
- package/{chunk-5ZXNLOAG.js → chunk-ARPAHODF.js} +17 -10
- package/{chunk-IC7W63RM.js → chunk-ATK5WJOA.js} +4 -4
- package/{chunk-OEWEE4VW.js → chunk-BIPRFBC2.js} +4 -2
- package/{chunk-YTA2QOEE.js → chunk-CAENRKNJ.js} +15 -0
- package/chunk-CYRMUTGB.js +1707 -0
- package/chunk-DCDL3GC4.js +171 -0
- package/{chunk-WX3ZOSTL.js → chunk-EBNSAABL.js} +24 -26
- package/{chunk-2TYLTEAH.js → chunk-EDWM6D6L.js} +1 -1
- package/{chunk-GT3GG2H7.js → chunk-EIQDGAAE.js} +148 -2
- package/chunk-F3MP7CP6.js +73 -0
- package/{chunk-R7LOFGRE.js → chunk-G5GVZAXF.js} +19 -15
- package/{chunk-KEF5OBOZ.js → chunk-GKXS4F2I.js} +33 -27
- package/{chunk-R3JSTDQO.js → chunk-GVPMJPCT.js} +1 -1
- package/{chunk-WMB7GVPN.js → chunk-IPSPETAL.js} +152 -1177
- package/{chunk-MQRZ5QUH.js → chunk-IXZX5CJK.js} +1 -1
- package/{chunk-2FX23RGA.js → chunk-J3LHGBNO.js} +5 -5
- package/{chunk-VHBWHNVT.js → chunk-K6QEHQZ3.js} +8 -4
- package/{chunk-HRPWRVBI.js → chunk-KGEVMUMI.js} +11 -11
- package/{chunk-L65QKSVJ.js → chunk-L3GCUVOH.js} +1 -1
- package/{chunk-G2BZ43DV.js → chunk-LAXMH7JY.js} +14 -14
- package/chunk-LEVCXTDN.js +5558 -0
- package/{chunk-HEXXIS77.js → chunk-N2IX3ZYK.js} +1 -1
- package/{chunk-32ZM6HVI.js → chunk-NZBH7FTB.js} +95 -95
- package/{chunk-XOIF2TNF.js → chunk-OB6FBSH3.js} +13 -0
- package/{chunk-PSK2RUHV.js → chunk-OIW2RJ74.js} +360 -2
- package/{chunk-FRN5QOKN.js → chunk-PACNSC37.js} +19 -4
- package/{chunk-QC6ZWDSV.js → chunk-PIC6Z7VI.js} +3 -3
- package/{chunk-H5S4XUGI.js → chunk-Q243PXRU.js} +185 -158
- package/{chunk-BBGRJB5E.js → chunk-QBOW6RZN.js} +4 -4
- package/{chunk-FVOSIYXM.js → chunk-R5Y4XELF.js} +43 -394
- package/{chunk-DF7SMWEV.js → chunk-RWJPDKPB.js} +1 -1
- package/{chunk-NXMJ55RU.js → chunk-S2BMRBR2.js} +3 -3
- package/{chunk-GC34RRTQ.js → chunk-SWYMCHM7.js} +1 -69
- package/chunk-T27IEBNQ.js +149 -0
- package/{chunk-GMJS5AYP.js → chunk-T4X4GCYT.js} +19 -179
- package/{chunk-4BDPDTJU.js → chunk-TXVSNFHC.js} +8 -8
- package/{chunk-JSB4N6NU.js → chunk-V54H24CQ.js} +3 -3
- package/chunk-VQ4QPCKE.js +3226 -0
- package/{chunk-Q5RXHXKU.js → chunk-W3UDJJMA.js} +189 -122
- package/{chunk-L3QFIBZG.js → chunk-WTGCTVJG.js} +1 -1
- package/{chunk-XS7UPVR7.js → chunk-WTPC3XD4.js} +5 -5
- package/{chunk-WSQLK2KR.js → chunk-XFGM5PJP.js} +6 -6
- package/{chunk-HALKDXKP.js → chunk-XORE26Z4.js} +8 -4
- package/chunk-YLC42PIE.js +7889 -0
- package/{chunk-SKDNBYZK.js → chunk-ZJ2WITOO.js} +2 -2
- package/{chunk-L6RBX4L4.js → chunk-ZJH3LKEW.js} +21 -9
- package/{codingSkills-EN6Z6G6U.js → codingSkills-V35TRR4Y.js} +1 -2
- package/{createAgentAutomationAction-BK4UZJKU.js → createAgentAutomationAction-EYNYY2LB.js} +31 -37
- package/{createDialogAction-MJJUI2MK.js → createDialogAction-OUIRWYZP.js} +34 -39
- package/{createPageAction-YMZ7K363.js → createPageAction-2I5PHJFF.js} +45 -51
- package/{dbSlice-6QJYQUBV.js → dbSlice-BBL3PEVW.js} +12 -12
- package/{deleteFile-WDZ3VM7B.js → deleteFile-RJTEPOT4.js} +6 -6
- package/{dialogCommands-OKH45ASS.js → dialogCommands-5CL4QYQ7.js} +55 -38
- package/{dialogSlice-UDOKNDHB.js → dialogSlice-EKKVFKBJ.js} +28 -35
- package/{docCreateCommands-MCLMR4TE.js → docCreateCommands-QHCLYGNW.js} +54 -37
- package/{docDeleteCommands-ONDHI7JV.js → docDeleteCommands-DS6KOU6N.js} +56 -39
- package/{docReadCommands-FCXBMISW.js → docReadCommands-FRI5DAKH.js} +54 -37
- package/{docStore-N66O4CGH.js → docStore-V7EJS4PX.js} +30 -36
- package/{docUpdateCommands-T3XN6XOX.js → docUpdateCommands-RQO5ZTXT.js} +57 -40
- package/{fetchMessages-W4IKHPCS.js → fetchMessages-VPPQDDZ4.js} +3 -3
- package/{getPricing-X6I23RN6.js → getPricing-67TQVKFV.js} +6 -7
- package/{handleSendMessageAction-KC4AYUZP.js → handleSendMessageAction-KCF7KII4.js} +30 -37
- package/index.js +72 -72
- package/{localDialogRead-UFLBS6OT.js → localDialogRead-P72W2U2R.js} +1 -1
- package/{machineCommands-DIMRFA3Y.js → machineCommands-IAGAKTHV.js} +78 -82
- package/{machineWsRunDispatch-2DYJZI6Z.js → machineWsRunDispatch-JGKC2HEK.js} +73 -77
- package/{models-YT32CTT5.js → models-WDUTTYFS.js} +2 -2
- package/{offlineMarxistsAgentCommand-5OOWZLJI.js → offlineMarxistsAgentCommand-E6LUG63A.js} +6 -2
- package/package.json +1 -1
- package/{read-C7Y6LSBM.js → read-64OQDO3I.js} +7 -7
- package/{readDocTool-TOHRYJHP.js → readDocTool-MXM3T6PE.js} +2 -1
- package/{readlineWorkspace-HUPHMLDG.js → readlineWorkspace-5AQHHIBK.js} +209 -183
- package/{removeDialogAgentAction-WZXPOH5S.js → removeDialogAgentAction-NEKVAMSH.js} +16 -17
- package/{runAgentClientLoop-5TGSUKHV.js → runAgentClientLoop-6OGPS6SI.js} +63 -67
- package/{setDialogExtraReferencesAction-INZY2ENI.js → setDialogExtraReferencesAction-WTOHQDIV.js} +13 -13
- package/{setPrimaryDialogAgentAction-WCVLPYCF.js → setPrimaryDialogAgentAction-LDJOYC4F.js} +16 -17
- package/{settingSlice-IDUM4LWU.js → settingSlice-4M37TN7V.js} +14 -15
- package/{skillDiscovery-ITA7BI7A.js → skillDiscovery-I3QRA7NE.js} +2 -2
- package/{spaceCommands-XSSDB3YK.js → spaceCommands-VTDNKTSF.js} +240 -41
- package/{spaceSlice-BXDCO6PT.js → spaceSlice-LGUZMB7Y.js} +29 -35
- package/{streamAgentChatTurn-HRFMVSVC.js → streamAgentChatTurn-TIGCZUNZ.js} +133 -1301
- package/{switchDialogAgentAction-YBFFCBOD.js → switchDialogAgentAction-XVWGKR2Z.js} +12 -12
- package/{tableCommands-QSZILI7I.js → tableCommands-RJZ3V4TF.js} +7 -7
- package/{toolApiClient-WVTUYOFM.js → toolApiClient-ARGFDJAG.js} +2 -2
- package/{tools-5V6FHWQU.js → tools-BQAOPYMR.js} +51 -56
- package/{tuiSummaryLlmCaller-GCUPULOV.js → tuiSummaryLlmCaller-YQBN5IMG.js} +12 -12
- package/{updateDialogTitleAction-W62C4W4K.js → updateDialogTitleAction-E6HMEDPH.js} +39 -45
- package/chunk-5CS33IBL.js +0 -301
- package/chunk-5MMAK75Q.js +0 -15
- package/chunk-HYSJHRWD.js +0 -669
- package/chunk-MRC4Q34M.js +0 -188
- package/chunk-SIZQB7BD.js +0 -91
- package/chunk-UEOPA6MV.js +0 -641
- package/chunk-UFL6WHHJ.js +0 -15419
- package/chunk-VIDPVFP3.js +0 -20
- package/chunk-W2LZV5GE.js +0 -231
- package/chunk-Y5GCAMGP.js +0 -9
- package/chunk-YYLHWIW6.js +0 -48
- package/chunk-Z54ZAZZC.js +0 -1791
- package/chunk-ZZ2MH7LE.js +0 -84
- package/{chunk-OMP5L5NF.js → chunk-44HACRCK.js} +3 -3
- package/{chunk-ZVZMT3EA.js → chunk-KWCLUYGQ.js} +3 -3
- package/{chunk-NRY4GCKJ.js → chunk-WHLVPK32.js} +3 -3
- package/{chunk-RQSOAMPJ.js → chunk-Z5MXSEOJ.js} +2 -2
- package/{runtimeDoctorCommands-HSU632DY.js → runtimeDoctorCommands-E2OUORHK.js} +3 -3
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
|
-
};
|