@curless/hotel-storefront 0.92.0 → 0.93.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.
- package/README.md +5 -2
- package/dist/cidr.d.ts +3 -21
- package/dist/cidr.d.ts.map +1 -1
- package/dist/cidr.js +9 -56
- package/dist/cidr.js.map +1 -1
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/dist/openai-conversation.d.ts +50 -0
- package/dist/openai-conversation.d.ts.map +1 -0
- package/dist/openai-conversation.js +83 -0
- package/dist/openai-conversation.js.map +1 -0
- package/dist/out-of-list.d.ts +74 -0
- package/dist/out-of-list.d.ts.map +1 -0
- package/dist/out-of-list.js +150 -0
- package/dist/out-of-list.js.map +1 -0
- package/dist/ranges-check-cli.js +19 -7
- package/dist/ranges-check-cli.js.map +1 -1
- package/dist/ranges-check.d.ts +19 -15
- package/dist/ranges-check.d.ts.map +1 -1
- package/dist/ranges-check.js +57 -109
- package/dist/ranges-check.js.map +1 -1
- package/dist/server.d.ts +14 -18
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +100 -148
- package/dist/server.js.map +1 -1
- package/dist/source-allowlist.d.ts +4 -10
- package/dist/source-allowlist.d.ts.map +1 -1
- package/dist/source-allowlist.js +28 -45
- package/dist/source-allowlist.js.map +1 -1
- package/dist/source-ranges.d.ts.map +1 -1
- package/dist/source-ranges.js +23 -418
- package/dist/source-ranges.js.map +1 -1
- package/dist/source-refusal-log.d.ts +13 -0
- package/dist/source-refusal-log.d.ts.map +1 -0
- package/dist/source-refusal-log.js +50 -0
- package/dist/source-refusal-log.js.map +1 -0
- package/dist/usage/boot.d.ts +3 -0
- package/dist/usage/boot.d.ts.map +1 -1
- package/dist/usage/boot.js +2 -1
- package/dist/usage/boot.js.map +1 -1
- package/dist/usage/platform.d.ts +7 -1
- package/dist/usage/platform.d.ts.map +1 -1
- package/dist/usage/platform.js +6 -2
- package/dist/usage/platform.js.map +1 -1
- package/dist/usage/recorder.d.ts +2 -0
- package/dist/usage/recorder.d.ts.map +1 -1
- package/dist/usage/recorder.js +1 -0
- package/dist/usage/recorder.js.map +1 -1
- package/package.json +3 -2
package/dist/source-ranges.js
CHANGED
|
@@ -1,28 +1,33 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
1
|
+
// What is known of each AI platform's ranges - the platforms `sourceAllowlist` can name
|
|
2
|
+
// (source-allowlist.ts), and where each publishes them.
|
|
3
|
+
//
|
|
4
|
+
// ⚠️ THE RANGES THEMSELVES ARE NOT KEPT HERE. OpenAI's and Anthropic's lists are read
|
|
5
|
+
// at runtime from their two official URLs by @curless/platform-ranges (at start and
|
|
6
|
+
// daily, kept in `<HOTEL_STATE_DIR>/platform-ranges`), and the one copy of the
|
|
7
|
+
// snapshot they start from is that package's. `cidrs` below is that snapshot: what a
|
|
8
|
+
// caller that has no running list (a test, `ranges-check` with no state directory)
|
|
9
|
+
// compares against - never what a running server lets in.
|
|
10
|
+
//
|
|
11
|
+
// What this file does keep is what the package cannot know: where each platform says
|
|
12
|
+
// its ranges are for, the notes, and the platforms that publish none (`unpublished`) -
|
|
13
|
+
// their guests are refused under enforce until there is something official, or until
|
|
14
|
+
// robin decides otherwise, written down where it is decided.
|
|
3
15
|
//
|
|
4
16
|
// ⚠️ ONLY WHAT A PLATFORM PUBLISHES ITSELF, ON ITS OWN DOMAIN, AS THE SOURCE OF
|
|
5
17
|
// ITS MCP / CONNECTOR CALLS. Not its crawlers' ranges, not its inbound API
|
|
6
18
|
// addresses, not a cloud provider's whole block, not an ASN, not a forum post.
|
|
7
|
-
|
|
8
|
-
// its guests are refused under enforce until there is something official - or
|
|
9
|
-
// until robin decides otherwise, written down where it is decided.
|
|
10
|
-
//
|
|
11
|
-
// ⚠️ EVERY RANGE CARRIES WHERE IT CAME FROM AND WHEN IT WAS READ (`sources`).
|
|
12
|
-
// Updated by hand from `ranges-check`'s output (src/ranges-check.ts, `node
|
|
13
|
-
// dist/ranges-check-cli.js`), never fetched while serving. A test holds every range
|
|
14
|
-
// here to being written exactly (cidr.ts).
|
|
19
|
+
import { BUILTIN_SNAPSHOT, SOURCES } from '@curless/platform-ranges';
|
|
15
20
|
export const PLATFORM_RANGES = [
|
|
16
21
|
{
|
|
17
22
|
id: 'anthropic',
|
|
18
23
|
name: 'Claude (Anthropic)',
|
|
19
24
|
sources: [
|
|
20
25
|
{
|
|
21
|
-
url:
|
|
22
|
-
checked:
|
|
26
|
+
url: SOURCES.anthropic.page,
|
|
27
|
+
checked: BUILTIN_SNAPSHOT.anthropic.readOn,
|
|
23
28
|
format: 'anthropic-ip-page',
|
|
24
29
|
says: 'Outbound IP addresses - "for example, when making MCP tool calls to external servers"',
|
|
25
|
-
cidrs: [
|
|
30
|
+
cidrs: [...BUILTIN_SNAPSHOT.anthropic.ranges],
|
|
26
31
|
},
|
|
27
32
|
],
|
|
28
33
|
note: "claude.ai, Claude Desktop and mobile remote connectors connect 'from Anthropic's cloud infrastructure' (support.claude.com/en/articles/11175166), and the API MCP connector's tool calls 'originate from the Anthropic ranges listed on this page' (the page above). ⚠️ So does anyone with an Anthropic API key, through the Messages API MCP connector: these ranges keep out scripts run from elsewhere, not a script that calls through Anthropic. The page lists no outbound IPv6; its inbound ranges (160.79.104.0/23, 153.61.224.0/22, 2607:6bc0::/48) are where the API is reached, not where calls come from, and are not here. Its phased-out 34.162.x.x/32 are not here either. A Claude Code or Claude Desktop LOCAL server connection comes from the user's own machine and is in none of these.",
|
|
@@ -32,415 +37,15 @@ export const PLATFORM_RANGES = [
|
|
|
32
37
|
name: 'ChatGPT (OpenAI)',
|
|
33
38
|
sources: [
|
|
34
39
|
{
|
|
35
|
-
url:
|
|
36
|
-
checked:
|
|
40
|
+
url: SOURCES.openai.page,
|
|
41
|
+
checked: BUILTIN_SNAPSHOT.openai.readOn,
|
|
37
42
|
format: 'openai-prefixes-json',
|
|
38
|
-
version:
|
|
43
|
+
...(BUILTIN_SNAPSHOT.openai.version ? { version: BUILTIN_SNAPSHOT.openai.version } : {}),
|
|
39
44
|
says: 'ChatGPT integrations - "Plugins, connectors, GPT Actions, and agentic commerce" (developers.openai.com/api/docs/guides/ip-addresses)',
|
|
40
|
-
cidrs: [
|
|
41
|
-
'100.31.168.162/32',
|
|
42
|
-
'104.192.219.204/30',
|
|
43
|
-
'104.208.184.192/28',
|
|
44
|
-
'104.210.139.192/28',
|
|
45
|
-
'104.210.139.224/28',
|
|
46
|
-
'104.210.140.16/28',
|
|
47
|
-
'104.44.128.240/28',
|
|
48
|
-
'108.179.20.6/31',
|
|
49
|
-
'112.220.228.112/29',
|
|
50
|
-
'115.42.241.224/29',
|
|
51
|
-
'12.105.90.64/27',
|
|
52
|
-
'12.108.172.96/28',
|
|
53
|
-
'12.117.245.68/30',
|
|
54
|
-
'12.12.47.194/32',
|
|
55
|
-
'12.12.56.224/28',
|
|
56
|
-
'12.12.56.24/29',
|
|
57
|
-
'12.12.56.240/28',
|
|
58
|
-
'12.12.56.32/29',
|
|
59
|
-
'12.129.184.64/26',
|
|
60
|
-
'12.162.186.200/29',
|
|
61
|
-
'12.77.42.78/32',
|
|
62
|
-
'12.79.201.188/30',
|
|
63
|
-
'12.79.202.152/30',
|
|
64
|
-
'12.79.202.156/30',
|
|
65
|
-
'12.79.202.228/30',
|
|
66
|
-
'12.79.202.232/30',
|
|
67
|
-
'12.79.225.144/30',
|
|
68
|
-
'12.79.34.30/32',
|
|
69
|
-
'128.177.174.162/32',
|
|
70
|
-
'128.177.85.168/30',
|
|
71
|
-
'13.223.161.115/32',
|
|
72
|
-
'13.237.176.161/32',
|
|
73
|
-
'13.238.110.96/32',
|
|
74
|
-
'13.65.138.112/28',
|
|
75
|
-
'13.67.72.16/28',
|
|
76
|
-
'13.71.2.208/28',
|
|
77
|
-
'13.76.116.80/28',
|
|
78
|
-
'13.76.32.208/28',
|
|
79
|
-
'13.78.76.112/28',
|
|
80
|
-
'13.83.237.176/28',
|
|
81
|
-
'130.33.24.99/32',
|
|
82
|
-
'132.196.82.48/28',
|
|
83
|
-
'134.138.52.16/28',
|
|
84
|
-
'134.138.52.64/28',
|
|
85
|
-
'134.138.57.64/28',
|
|
86
|
-
'134.138.57.80/28',
|
|
87
|
-
'134.149.233.80/28',
|
|
88
|
-
'134.33.102.192/28',
|
|
89
|
-
'135.116.136.160/28',
|
|
90
|
-
'135.116.84.112/28',
|
|
91
|
-
'135.119.98.112/28',
|
|
92
|
-
'135.13.64.240/28',
|
|
93
|
-
'135.220.208.92/32',
|
|
94
|
-
'135.220.73.208/28',
|
|
95
|
-
'135.222.99.32/28',
|
|
96
|
-
'135.233.181.16/28',
|
|
97
|
-
'135.234.27.89/32',
|
|
98
|
-
'135.237.133.48/28',
|
|
99
|
-
'137.135.191.176/28',
|
|
100
|
-
'145.132.136.96/28',
|
|
101
|
-
'148.109.10.28/30',
|
|
102
|
-
'148.109.36.240/28',
|
|
103
|
-
'148.76.185.192/27',
|
|
104
|
-
'149.97.160.16/28',
|
|
105
|
-
'15.168.252.168/32',
|
|
106
|
-
'152.44.170.32/29',
|
|
107
|
-
'158.158.103.32/28',
|
|
108
|
-
'158.158.7.32/28',
|
|
109
|
-
'159.180.234.92/30',
|
|
110
|
-
'172.132.67.96/28',
|
|
111
|
-
'172.134.248.0/28',
|
|
112
|
-
'172.134.248.16/28',
|
|
113
|
-
'172.162.248.64/28',
|
|
114
|
-
'172.167.161.96/32',
|
|
115
|
-
'172.167.32.228/32',
|
|
116
|
-
'172.170.1.80/28',
|
|
117
|
-
'172.170.225.0/28',
|
|
118
|
-
'172.170.241.80/28',
|
|
119
|
-
'172.171.234.186/32',
|
|
120
|
-
'172.172.206.48/28',
|
|
121
|
-
'172.175.152.224/28',
|
|
122
|
-
'172.177.53.240/28',
|
|
123
|
-
'172.183.143.224/28',
|
|
124
|
-
'172.191.238.68/32',
|
|
125
|
-
'172.191.70.179/32',
|
|
126
|
-
'172.192.112.208/28',
|
|
127
|
-
'172.197.163.32/28',
|
|
128
|
-
'172.197.202.176/28',
|
|
129
|
-
'172.198.52.224/28',
|
|
130
|
-
'172.198.52.240/28',
|
|
131
|
-
'172.198.58.176/28',
|
|
132
|
-
'172.198.79.112/28',
|
|
133
|
-
'172.199.137.80/28',
|
|
134
|
-
'172.202.52.96/28',
|
|
135
|
-
'172.204.18.48/28',
|
|
136
|
-
'172.204.29.176/28',
|
|
137
|
-
'172.204.29.192/28',
|
|
138
|
-
'172.204.96.80/28',
|
|
139
|
-
'172.206.38.240/28',
|
|
140
|
-
'172.207.1.32/28',
|
|
141
|
-
'172.212.231.112/28',
|
|
142
|
-
'172.212.231.96/28',
|
|
143
|
-
'172.215.215.32/28',
|
|
144
|
-
'173.195.76.0/26',
|
|
145
|
-
'18.218.234.253/32',
|
|
146
|
-
'180.222.194.124/30',
|
|
147
|
-
'184.73.124.134/32',
|
|
148
|
-
'191.232.238.96/28',
|
|
149
|
-
'191.234.167.144/28',
|
|
150
|
-
'191.237.249.64/28',
|
|
151
|
-
'194.46.223.16/28',
|
|
152
|
-
'195.171.64.176/28',
|
|
153
|
-
'199.241.201.152/29',
|
|
154
|
-
'199.47.142.0/23',
|
|
155
|
-
'20.102.212.144/28',
|
|
156
|
-
'20.118.254.192/28',
|
|
157
|
-
'20.118.254.208/28',
|
|
158
|
-
'20.118.254.224/28',
|
|
159
|
-
'20.118.254.240/28',
|
|
160
|
-
'20.125.112.224/28',
|
|
161
|
-
'20.125.40.252/32',
|
|
162
|
-
'20.15.237.208/28',
|
|
163
|
-
'20.165.109.32/28',
|
|
164
|
-
'20.168.7.192/28',
|
|
165
|
-
'20.169.118.16/28',
|
|
166
|
-
'20.169.78.48/28',
|
|
167
|
-
'20.169.78.64/28',
|
|
168
|
-
'20.169.86.224/28',
|
|
169
|
-
'20.17.108.192/28',
|
|
170
|
-
'20.170.184.16/28',
|
|
171
|
-
'20.170.184.32/28',
|
|
172
|
-
'20.170.184.48/28',
|
|
173
|
-
'20.170.184.64/28',
|
|
174
|
-
'20.170.184.80/28',
|
|
175
|
-
'20.171.137.175/32',
|
|
176
|
-
'20.172.29.32/28',
|
|
177
|
-
'20.189.206.112/28',
|
|
178
|
-
'20.192.5.176/28',
|
|
179
|
-
'20.194.1.0/28',
|
|
180
|
-
'20.195.206.224/28',
|
|
181
|
-
'20.195.206.240/28',
|
|
182
|
-
'20.196.213.160/28',
|
|
183
|
-
'20.196.92.176/28',
|
|
184
|
-
'20.197.251.144/28',
|
|
185
|
-
'20.199.243.192/28',
|
|
186
|
-
'20.203.190.208/28',
|
|
187
|
-
'20.204.112.64/28',
|
|
188
|
-
'20.206.101.192/28',
|
|
189
|
-
'20.206.103.80/28',
|
|
190
|
-
'20.208.196.80/28',
|
|
191
|
-
'20.212.62.208/28',
|
|
192
|
-
'20.215.187.208/28',
|
|
193
|
-
'20.215.219.208/28',
|
|
194
|
-
'20.218.31.128/28',
|
|
195
|
-
'20.218.47.192/28',
|
|
196
|
-
'20.218.47.208/28',
|
|
197
|
-
'20.218.47.224/28',
|
|
198
|
-
'20.218.47.240/28',
|
|
199
|
-
'20.219.161.192/28',
|
|
200
|
-
'20.219.184.96/28',
|
|
201
|
-
'20.219.29.208/28',
|
|
202
|
-
'20.219.30.112/28',
|
|
203
|
-
'20.221.78.80/28',
|
|
204
|
-
'20.222.28.96/28',
|
|
205
|
-
'20.222.59.224/28',
|
|
206
|
-
'20.226.108.176/28',
|
|
207
|
-
'20.227.140.32/28',
|
|
208
|
-
'20.228.106.176/28',
|
|
209
|
-
'20.235.167.48/28',
|
|
210
|
-
'20.235.87.224/28',
|
|
211
|
-
'20.24.18.144/28',
|
|
212
|
-
'20.24.189.176/28',
|
|
213
|
-
'20.241.32.36/32',
|
|
214
|
-
'20.249.63.208/28',
|
|
215
|
-
'20.250.136.64/28',
|
|
216
|
-
'20.254.201.208/28',
|
|
217
|
-
'20.41.226.160/28',
|
|
218
|
-
'20.44.100.224/28',
|
|
219
|
-
'20.45.178.144/28',
|
|
220
|
-
'20.52.118.0/28',
|
|
221
|
-
'20.55.229.144/28',
|
|
222
|
-
'20.56.38.160/28',
|
|
223
|
-
'20.57.199.192/28',
|
|
224
|
-
'20.59.229.32/28',
|
|
225
|
-
'20.63.221.64/28',
|
|
226
|
-
'20.65.156.80/28',
|
|
227
|
-
'20.65.170.144/28',
|
|
228
|
-
'20.68.151.224/28',
|
|
229
|
-
'20.70.48.32/28',
|
|
230
|
-
'20.78.100.240/28',
|
|
231
|
-
'20.78.130.48/28',
|
|
232
|
-
'20.78.132.48/28',
|
|
233
|
-
'20.78.197.96/28',
|
|
234
|
-
'20.80.77.144/28',
|
|
235
|
-
'20.83.39.160/28',
|
|
236
|
-
'20.89.220.64/28',
|
|
237
|
-
'20.98.18.80/28',
|
|
238
|
-
'203.125.229.136/29',
|
|
239
|
-
'203.149.223.128/29',
|
|
240
|
-
'208.184.8.104/29',
|
|
241
|
-
'208.184.8.84/30',
|
|
242
|
-
'208.52.97.112/29',
|
|
243
|
-
'208.69.43.136/29',
|
|
244
|
-
'208.80.35.32/27',
|
|
245
|
-
'209.247.142.56/30',
|
|
246
|
-
'209.247.151.176/28',
|
|
247
|
-
'209.249.246.178/31',
|
|
248
|
-
'209.249.37.128/26',
|
|
249
|
-
'213.122.44.84/31',
|
|
250
|
-
'216.64.170.234/32',
|
|
251
|
-
'217.111.182.45/32',
|
|
252
|
-
'217.111.242.24/29',
|
|
253
|
-
'23.101.217.176/28',
|
|
254
|
-
'23.102.141.32/28',
|
|
255
|
-
'23.98.186.64/28',
|
|
256
|
-
'23.98.186.96/28',
|
|
257
|
-
'24.82.185.0/29',
|
|
258
|
-
'3.12.200.18/32',
|
|
259
|
-
'3.140.2.201/32',
|
|
260
|
-
'35.164.191.49/32',
|
|
261
|
-
'35.164.6.66/32',
|
|
262
|
-
'35.85.104.4/32',
|
|
263
|
-
'4.14.111.0/28',
|
|
264
|
-
'4.151.119.48/28',
|
|
265
|
-
'4.151.71.176/28',
|
|
266
|
-
'4.17.25.128/29',
|
|
267
|
-
'4.184.61.192/28',
|
|
268
|
-
'4.185.216.109/32',
|
|
269
|
-
'4.189.118.208/28',
|
|
270
|
-
'4.19.160.0/28',
|
|
271
|
-
'4.193.45.192/28',
|
|
272
|
-
'4.197.115.112/28',
|
|
273
|
-
'4.197.64.0/28',
|
|
274
|
-
'4.197.64.48/28',
|
|
275
|
-
'4.201.102.32/28',
|
|
276
|
-
'4.201.102.48/28',
|
|
277
|
-
'4.201.102.96/28',
|
|
278
|
-
'4.201.232.64/28',
|
|
279
|
-
'4.201.52.48/28',
|
|
280
|
-
'4.201.58.144/28',
|
|
281
|
-
'4.201.67.144/28',
|
|
282
|
-
'4.201.67.32/28',
|
|
283
|
-
'4.205.128.176/28',
|
|
284
|
-
'4.205.27.128/28',
|
|
285
|
-
'4.218.24.64/28',
|
|
286
|
-
'4.226.200.16/28',
|
|
287
|
-
'4.226.226.32/28',
|
|
288
|
-
'4.228.101.112/28',
|
|
289
|
-
'4.232.94.208/28',
|
|
290
|
-
'4.38.166.228/30',
|
|
291
|
-
'4.53.139.144/28',
|
|
292
|
-
'4.7.10.112/30',
|
|
293
|
-
'4.7.11.196/30',
|
|
294
|
-
'40.119.36.240/28',
|
|
295
|
-
'40.122.118.119/32',
|
|
296
|
-
'40.122.118.202/32',
|
|
297
|
-
'40.122.118.93/32',
|
|
298
|
-
'40.124.155.160/28',
|
|
299
|
-
'40.124.161.0/28',
|
|
300
|
-
'40.124.164.32/28',
|
|
301
|
-
'40.124.218.208/28',
|
|
302
|
-
'40.124.218.224/28',
|
|
303
|
-
'40.124.227.208/28',
|
|
304
|
-
'40.124.234.176/28',
|
|
305
|
-
'40.124.249.160/28',
|
|
306
|
-
'40.124.249.176/28',
|
|
307
|
-
'40.67.164.144/28',
|
|
308
|
-
'40.74.202.80/28',
|
|
309
|
-
'40.88.27.77/32',
|
|
310
|
-
'43.202.230.227/32',
|
|
311
|
-
'44.221.134.118/32',
|
|
312
|
-
'44.249.227.138/32',
|
|
313
|
-
'45.147.211.96/29',
|
|
314
|
-
'48.210.238.0/28',
|
|
315
|
-
'48.215.128.176/28',
|
|
316
|
-
'48.215.128.192/28',
|
|
317
|
-
'48.218.181.198/32',
|
|
318
|
-
'48.221.184.80/28',
|
|
319
|
-
'48.221.184.96/28',
|
|
320
|
-
'48.221.40.176/28',
|
|
321
|
-
'50.145.17.208/30',
|
|
322
|
-
'50.145.17.212/30',
|
|
323
|
-
'50.145.17.216/29',
|
|
324
|
-
'50.145.17.224/29',
|
|
325
|
-
'50.151.105.128/30',
|
|
326
|
-
'50.151.105.136/29',
|
|
327
|
-
'50.213.205.80/29',
|
|
328
|
-
'50.235.235.72/29',
|
|
329
|
-
'51.107.73.176/28',
|
|
330
|
-
'51.142.84.16/28',
|
|
331
|
-
'51.57.0.96/28',
|
|
332
|
-
'51.57.158.112/28',
|
|
333
|
-
'51.57.158.128/28',
|
|
334
|
-
'51.57.158.144/28',
|
|
335
|
-
'51.57.163.16/28',
|
|
336
|
-
'51.57.163.32/28',
|
|
337
|
-
'51.59.24.64/28',
|
|
338
|
-
'51.59.24.80/28',
|
|
339
|
-
'51.59.48.80/28',
|
|
340
|
-
'52.119.123.85/32',
|
|
341
|
-
'52.141.1.0/28',
|
|
342
|
-
'52.141.1.208/28',
|
|
343
|
-
'52.141.20.16/28',
|
|
344
|
-
'52.147.52.144/28',
|
|
345
|
-
'52.148.129.32/28',
|
|
346
|
-
'52.148.4.16/28',
|
|
347
|
-
'52.165.212.48/28',
|
|
348
|
-
'52.17.188.55/32',
|
|
349
|
-
'52.172.129.160/28',
|
|
350
|
-
'52.173.221.16/28',
|
|
351
|
-
'52.173.234.16/28',
|
|
352
|
-
'52.173.234.80/28',
|
|
353
|
-
'52.173.235.0/28',
|
|
354
|
-
'52.176.139.64/28',
|
|
355
|
-
'52.190.137.144/28',
|
|
356
|
-
'52.190.137.16/28',
|
|
357
|
-
'52.190.139.48/28',
|
|
358
|
-
'52.190.142.64/28',
|
|
359
|
-
'52.190.251.112/28',
|
|
360
|
-
'52.2.184.223/32',
|
|
361
|
-
'52.208.217.159/32',
|
|
362
|
-
'52.231.30.48/28',
|
|
363
|
-
'52.231.39.144/28',
|
|
364
|
-
'52.242.132.224/28',
|
|
365
|
-
'52.242.132.240/28',
|
|
366
|
-
'52.248.46.224/28',
|
|
367
|
-
'52.253.140.64/28',
|
|
368
|
-
'52.255.109.144/28',
|
|
369
|
-
'52.255.109.80/28',
|
|
370
|
-
'52.255.109.96/28',
|
|
371
|
-
'52.255.111.0/28',
|
|
372
|
-
'52.43.161.225/32',
|
|
373
|
-
'52.6.94.121/32',
|
|
374
|
-
'54.180.197.31/32',
|
|
375
|
-
'54.186.130.118/32',
|
|
376
|
-
'54.227.131.66/32',
|
|
377
|
-
'56.155.71.179/32',
|
|
378
|
-
'57.133.92.112/31',
|
|
379
|
-
'57.153.213.64/28',
|
|
380
|
-
'57.154.174.112/28',
|
|
381
|
-
'57.154.187.32/28',
|
|
382
|
-
'61.105.58.228/30',
|
|
383
|
-
'62.96.221.184/29',
|
|
384
|
-
'64.124.191.96/28',
|
|
385
|
-
'64.124.21.196/32',
|
|
386
|
-
'64.71.12.112/28',
|
|
387
|
-
'66.193.99.66/32',
|
|
388
|
-
'67.207.103.240/28',
|
|
389
|
-
'68.154.28.96/28',
|
|
390
|
-
'68.220.57.64/28',
|
|
391
|
-
'68.221.180.96/28',
|
|
392
|
-
'68.221.77.176/28',
|
|
393
|
-
'70.153.32.16/28',
|
|
394
|
-
'70.153.32.32/28',
|
|
395
|
-
'70.156.152.96/28',
|
|
396
|
-
'74.152.51.224/28',
|
|
397
|
-
'74.152.65.144/28',
|
|
398
|
-
'74.152.67.176/28',
|
|
399
|
-
'74.159.127.128/28',
|
|
400
|
-
'74.159.51.96/28',
|
|
401
|
-
'74.159.8.16/28',
|
|
402
|
-
'74.161.200.96/28',
|
|
403
|
-
'74.224.217.64/28',
|
|
404
|
-
'74.226.253.160/28',
|
|
405
|
-
'74.248.37.160/28',
|
|
406
|
-
'74.7.104.240/28',
|
|
407
|
-
'74.7.108.96/28',
|
|
408
|
-
'74.7.35.112/28',
|
|
409
|
-
'74.7.35.48/28',
|
|
410
|
-
'74.7.36.128/28',
|
|
411
|
-
'74.7.36.144/28',
|
|
412
|
-
'74.7.36.224/28',
|
|
413
|
-
'74.7.36.64/28',
|
|
414
|
-
'74.7.36.80/28',
|
|
415
|
-
'74.7.36.96/28',
|
|
416
|
-
'76.77.188.112/29',
|
|
417
|
-
'77.75.96.48/29',
|
|
418
|
-
'79.244.198.212/30',
|
|
419
|
-
'8.244.149.100/30',
|
|
420
|
-
'80.169.53.32/28',
|
|
421
|
-
'85.211.128.16/28',
|
|
422
|
-
'85.211.128.32/28',
|
|
423
|
-
'9.129.0.0/16',
|
|
424
|
-
'9.160.107.112/28',
|
|
425
|
-
'9.160.107.48/28',
|
|
426
|
-
'9.160.128.16/28',
|
|
427
|
-
'9.160.128.64/28',
|
|
428
|
-
'9.160.96.16/28',
|
|
429
|
-
'9.205.128.32/28',
|
|
430
|
-
'9.205.128.48/28',
|
|
431
|
-
'9.205.8.48/28',
|
|
432
|
-
'9.205.8.64/28',
|
|
433
|
-
'9.205.93.224/28',
|
|
434
|
-
'9.205.93.240/28',
|
|
435
|
-
'9.205.94.0/28',
|
|
436
|
-
'9.205.94.144/28',
|
|
437
|
-
'9.234.96.192/28',
|
|
438
|
-
'9.234.97.96/28',
|
|
439
|
-
'98.87.72.221/32',
|
|
440
|
-
],
|
|
45
|
+
cidrs: [...BUILTIN_SNAPSHOT.openai.ranges],
|
|
441
46
|
},
|
|
442
47
|
],
|
|
443
|
-
note: 'OpenAI: "The ranges can change as OpenAI infrastructure changes" -
|
|
48
|
+
note: 'OpenAI: "The ranges can change as OpenAI infrastructure changes" - the package reads the file again at start and daily, and `ranges-check` says how old the list in use is. Not chatgpt-agents.json (Codex cloud), not chatgpt-user.json / gptbot.json / searchbot.json (fetchers and crawlers). The Responses API remote MCP tool has no published ranges of its own.',
|
|
444
49
|
},
|
|
445
50
|
{
|
|
446
51
|
id: 'google',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source-ranges.js","sourceRoot":"","sources":["../src/source-ranges.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"source-ranges.js","sourceRoot":"","sources":["../src/source-ranges.ts"],"names":[],"mappings":"AAAA,wFAAwF;AACxF,wDAAwD;AACxD,EAAE;AACF,sFAAsF;AACtF,oFAAoF;AACpF,+EAA+E;AAC/E,qFAAqF;AACrF,mFAAmF;AACnF,0DAA0D;AAC1D,EAAE;AACF,qFAAqF;AACrF,uFAAuF;AACvF,qFAAqF;AACrF,6DAA6D;AAC7D,EAAE;AACF,gFAAgF;AAChF,2EAA2E;AAC3E,+EAA+E;AAE/E,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AA8BrE,MAAM,CAAC,MAAM,eAAe,GAA8B;IACxD;QACE,EAAE,EAAE,WAAW;QACf,IAAI,EAAE,oBAAoB;QAC1B,OAAO,EAAE;YACP;gBACE,GAAG,EAAE,OAAO,CAAC,SAAS,CAAC,IAAI;gBAC3B,OAAO,EAAE,gBAAgB,CAAC,SAAS,CAAC,MAAM;gBAC1C,MAAM,EAAE,mBAAmB;gBAC3B,IAAI,EAAE,uFAAuF;gBAC7F,KAAK,EAAE,CAAC,GAAG,gBAAgB,CAAC,SAAS,CAAC,MAAM,CAAC;aAC9C;SACF;QACD,IAAI,EAAE,+wBAA+wB;KACtxB;IACD;QACE,EAAE,EAAE,QAAQ;QACZ,IAAI,EAAE,kBAAkB;QACxB,OAAO,EAAE;YACP;gBACE,GAAG,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI;gBACxB,OAAO,EAAE,gBAAgB,CAAC,MAAM,CAAC,MAAM;gBACvC,MAAM,EAAE,sBAAsB;gBAC9B,GAAG,CAAC,gBAAgB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,gBAAgB,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;gBACxF,IAAI,EAAE,sIAAsI;gBAC5I,KAAK,EAAE,CAAC,GAAG,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAAC;aAC3C;SACF;QACD,IAAI,EAAE,wWAAwW;KAC/W;IACD;QACE,EAAE,EAAE,QAAQ;QACZ,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,EAAE;QACX,WAAW,EAAE;YACX,OAAO,EAAE,YAAY;YACrB,MAAM,EAAE;gBACN,8CAA8C;gBAC9C,kDAAkD;gBAClD,4FAA4F;aAC7F;YACD,IAAI,EAAE,yOAAyO;SAChP;KACF;IACD;QACE,EAAE,EAAE,OAAO;QACX,IAAI,EAAE,OAAO;QACb,OAAO,EAAE,EAAE;QACX,WAAW,EAAE;YACX,OAAO,EAAE,YAAY;YACrB,MAAM,EAAE;gBACN,+CAA+C;gBAC/C,+CAA+C;aAChD;YACD,IAAI,EAAE,0DAA0D;SACjE;KACF;IACD;QACE,EAAE,EAAE,MAAM;QACV,IAAI,EAAE,aAAa;QACnB,OAAO,EAAE,EAAE;QACX,WAAW,EAAE;YACX,OAAO,EAAE,YAAY;YACrB,MAAM,EAAE;gBACN,+BAA+B;gBAC/B,uEAAuE;aACxE;YACD,IAAI,EAAE,iIAAiI;SACxI;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** Refusals logged per network in `REFUSED_LOG_WINDOW_MS`; every one is still counted. */
|
|
2
|
+
export declare const REFUSED_LOGS_PER_NETWORK = 3;
|
|
3
|
+
export declare const REFUSED_LOG_WINDOW_MS: number;
|
|
4
|
+
/**
|
|
5
|
+
* Refusal lines in a minute, from every network together (0.69.1, 总线程's
|
|
6
|
+
* review P3-3): a limit by network alone is no limit to someone with many
|
|
7
|
+
* networks - an IPv6 /48 each, ten thousand of them, and the map that keeps
|
|
8
|
+
* them is cleared. Past it the rest are counted, and one line says how many.
|
|
9
|
+
*/
|
|
10
|
+
export declare const REFUSED_LOGS_PER_MINUTE = 60;
|
|
11
|
+
/** Whether a refusal from `network` may be written to the log now - and writes the "N more" line when a minute that held some ends. */
|
|
12
|
+
export declare const refusalLogger: (now: () => number, log: (line: string) => void) => ((network: string) => boolean);
|
|
13
|
+
//# sourceMappingURL=source-refusal-log.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source-refusal-log.d.ts","sourceRoot":"","sources":["../src/source-refusal-log.ts"],"names":[],"mappings":"AAIA,0FAA0F;AAC1F,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAC1C,eAAO,MAAM,qBAAqB,QAAc,CAAC;AACjD;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAE1C,uIAAuI;AACvI,eAAO,MAAM,aAAa,GACxB,KAAK,MAAM,MAAM,EACjB,KAAK,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,KAC1B,CAAC,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAiC/B,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// How many lines a refusal under enforce may write: a few per network, and a few per
|
|
2
|
+
// minute from every network together. Every refusal is still counted (source-allowlist.ts);
|
|
3
|
+
// this only decides which are also written to the log.
|
|
4
|
+
/** Refusals logged per network in `REFUSED_LOG_WINDOW_MS`; every one is still counted. */
|
|
5
|
+
export const REFUSED_LOGS_PER_NETWORK = 3;
|
|
6
|
+
export const REFUSED_LOG_WINDOW_MS = 10 * 60_000;
|
|
7
|
+
/**
|
|
8
|
+
* Refusal lines in a minute, from every network together (0.69.1, 总线程's
|
|
9
|
+
* review P3-3): a limit by network alone is no limit to someone with many
|
|
10
|
+
* networks - an IPv6 /48 each, ten thousand of them, and the map that keeps
|
|
11
|
+
* them is cleared. Past it the rest are counted, and one line says how many.
|
|
12
|
+
*/
|
|
13
|
+
export const REFUSED_LOGS_PER_MINUTE = 60;
|
|
14
|
+
/** Whether a refusal from `network` may be written to the log now - and writes the "N more" line when a minute that held some ends. */
|
|
15
|
+
export const refusalLogger = (now, log) => {
|
|
16
|
+
const perNetwork = new Map();
|
|
17
|
+
let minuteAt = Number.NEGATIVE_INFINITY;
|
|
18
|
+
let minuteLines = 0;
|
|
19
|
+
let minuteHeld = 0;
|
|
20
|
+
return (network) => {
|
|
21
|
+
const t = now();
|
|
22
|
+
const seen = perNetwork.get(network);
|
|
23
|
+
if (!seen || t - seen.at > REFUSED_LOG_WINDOW_MS) {
|
|
24
|
+
if (perNetwork.size > 10_000)
|
|
25
|
+
perNetwork.clear();
|
|
26
|
+
perNetwork.set(network, { at: t, n: 1 });
|
|
27
|
+
}
|
|
28
|
+
else if (seen.n < REFUSED_LOGS_PER_NETWORK) {
|
|
29
|
+
seen.n += 1;
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
if (t - minuteAt >= 60_000) {
|
|
35
|
+
if (minuteHeld) {
|
|
36
|
+
log(`[source] enforce refused: ${minuteHeld} more not logged in the minute before (over ${REFUSED_LOGS_PER_MINUTE} a minute) - every one is counted on /healthz/detail`);
|
|
37
|
+
}
|
|
38
|
+
minuteAt = t;
|
|
39
|
+
minuteLines = 0;
|
|
40
|
+
minuteHeld = 0;
|
|
41
|
+
}
|
|
42
|
+
if (minuteLines >= REFUSED_LOGS_PER_MINUTE) {
|
|
43
|
+
minuteHeld += 1;
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
minuteLines += 1;
|
|
47
|
+
return true;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=source-refusal-log.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source-refusal-log.js","sourceRoot":"","sources":["../src/source-refusal-log.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,4FAA4F;AAC5F,uDAAuD;AAEvD,0FAA0F;AAC1F,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC;AAC1C,MAAM,CAAC,MAAM,qBAAq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W,IAAI,uBAAuB,EAAE,CAAC;YAC3C,UAAU,IAAI,CAAC,CAAC;YAChB,OAAO,KAAK,CAAC;QACf,CAAC;QACD,WAAW,IAAI,CAAC,CAAC;QACjB,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;AACJ,CAAC,CAAC"}
|
package/dist/usage/boot.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ToolRole, type UsageStore } from '@curless/connector-usage';
|
|
2
|
+
import type { PlatformRanges as PlatformLists } from '@curless/platform-ranges';
|
|
2
3
|
import { UsageRecorder } from './recorder.js';
|
|
3
4
|
export declare const USAGE_KEY_ENV = "HOTEL_USAGE_KEY";
|
|
4
5
|
/** The usage directory: `HOTEL_USAGE_DIR`, or one per deployment under the state directory. */
|
|
@@ -27,6 +28,8 @@ export type UsageBootOptions = {
|
|
|
27
28
|
now?: () => number;
|
|
28
29
|
/** Tests: no timers (the country files are still read once). */
|
|
29
30
|
quiet?: boolean;
|
|
31
|
+
/** The running lists of OpenAI's and Anthropic's ranges (@curless/platform-ranges); default: the built-in snapshot. */
|
|
32
|
+
ranges?: Pick<PlatformLists, 'has'>;
|
|
30
33
|
};
|
|
31
34
|
export declare const startUsage: (o: UsageBootOptions) => UsageBoot | null;
|
|
32
35
|
//# sourceMappingURL=boot.d.ts.map
|
package/dist/usage/boot.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boot.d.ts","sourceRoot":"","sources":["../../src/usage/boot.ts"],"names":[],"mappings":"AAaA,OAAO,EAGL,KAAK,QAAQ,EACb,KAAK,UAAU,EAIhB,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"boot.d.ts","sourceRoot":"","sources":["../../src/usage/boot.ts"],"names":[],"mappings":"AAaA,OAAO,EAGL,KAAK,QAAQ,EACb,KAAK,UAAU,EAIhB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,cAAc,IAAI,aAAa,EAAE,MAA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B,uHAAuH;IACvH,MAAM,CAAC,EAAE,IAAI,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;CACrC,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,GAAG,gBAAgB,KAAG,SAAS,GAAG,IAmE5D,CAAC"}
|
package/dist/usage/boot.js
CHANGED
|
@@ -66,7 +66,8 @@ export const startUsage = (o) => {
|
|
|
66
66
|
store,
|
|
67
67
|
pseudo: new Pseudonyms(key),
|
|
68
68
|
geo: core.geo,
|
|
69
|
-
openai: OPENAI,
|
|
69
|
+
openai: o.ranges ? { has: (ip) => o.ranges?.has('openai', ip) === true } : OPENAI,
|
|
70
|
+
...(o.ranges ? { anthropic: { has: (ip) => o.ranges?.has('anthropic', ip) === true } } : {}),
|
|
70
71
|
roleOf: o.roleOf,
|
|
71
72
|
...(o.now ? { now: o.now } : {}),
|
|
72
73
|
});
|
package/dist/usage/boot.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boot.js","sourceRoot":"","sources":["../../src/usage/boot.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,8EAA8E;AAC9E,kEAAkE;AAClE,EAAE;AACF,2EAA2E;AAC3E,0FAA0F;AAC1F,2FAA2F;AAC3F,+FAA+F;AAC/F,gGAAgG;AAChG,8FAA8F;AAC9F,iGAAiG;AACjG,sFAAsF;AACtF,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EACL,aAAa,EACb,UAAU,EAGV,YAAY,EACZ,YAAY,EACZ,cAAc,GACf,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"boot.js","sourceRoot":"","sources":["../../src/usage/boot.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,8EAA8E;AAC9E,kEAAkE;AAClE,EAAE;AACF,2EAA2E;AAC3E,0FAA0F;AAC1F,2FAA2F;AAC3F,+FAA+F;AAC/F,gGAAgG;AAChG,8FAA8F;AAC9F,iGAAiG;AACjG,sF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,KAAK;QACjB,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;YACb,UAAU,EAAE,CAAC,CAAC,UAAU;YACxB,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC,KAAK;SAC5B,CAAC;QACF,KAAK,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE;KAC3B,CAAC;AACJ,CAAC,CAAC"}
|
package/dist/usage/platform.d.ts
CHANGED
|
@@ -8,7 +8,11 @@ export declare class Ranges {
|
|
|
8
8
|
constructor(list: readonly string[]);
|
|
9
9
|
has(ip: string | undefined): boolean;
|
|
10
10
|
}
|
|
11
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* A platform's ranges as source-ranges.ts holds them - the built-in snapshot of
|
|
13
|
+
* @curless/platform-ranges, not the running list: the server passes the running list
|
|
14
|
+
* (`startUsage`'s `ranges`); this is what a caller without one gets.
|
|
15
|
+
*/
|
|
12
16
|
export declare const rangesOf: (id: PlatformId) => Ranges;
|
|
13
17
|
/** OpenAI's published ChatGPT connector ranges: the only source a guest's address is taken from. */
|
|
14
18
|
export declare const OPENAI: Ranges;
|
|
@@ -20,6 +24,8 @@ export type PlatformSignals = {
|
|
|
20
24
|
openaiSession?: boolean;
|
|
21
25
|
/** The address our proxy saw (server.ts `sourceOf`). */
|
|
22
26
|
peer?: string | undefined;
|
|
27
|
+
/** Anthropic's ranges as they are now (the running list); default: the built-in snapshot. */
|
|
28
|
+
anthropic?: Pick<Ranges, 'has'>;
|
|
23
29
|
};
|
|
24
30
|
/**
|
|
25
31
|
* By the marks the connector already goes by (sessions.ts CARD_HOSTS): ChatGPT's
|