@sourcegraph/amp 0.0.1749073878-gd24060 → 0.0.1749096401-g3a8a18
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/dist/amp.js +3 -3
- package/dist/{client-DRkn40v5.js → client-CT0UspN7.js} +2 -2
- package/dist/{client-DRkn40v5.js.map → client-CT0UspN7.js.map} +1 -1
- package/dist/{console-cTFB4LXV.js → console-CZXURH0C.js} +4838 -4861
- package/dist/console-CZXURH0C.js.map +1 -0
- package/dist/{create_file.node-BnxKZkS8.js → create_file.node-Bg2Ha2Q0.js} +2 -2
- package/dist/{create_file.node-BnxKZkS8.js.map → create_file.node-Bg2Ha2Q0.js.map} +1 -1
- package/dist/{edit_file.node-BrpV91sY.js → edit_file.node-BqRltvHA.js} +5 -5
- package/dist/{edit_file.node-BrpV91sY.js.map → edit_file.node-BqRltvHA.js.map} +1 -1
- package/dist/{executable-CkOCFEBG.js → executable-Dy1dmJR0.js} +2 -2
- package/dist/{executable-CkOCFEBG.js.map → executable-Dy1dmJR0.js.map} +1 -1
- package/dist/{files-D5Q2JGfw.js → files-yat9N0vH.js} +2 -2
- package/dist/{files-D5Q2JGfw.js.map → files-yat9N0vH.js.map} +1 -1
- package/dist/{glob.node-Cub51teu.js → glob.node-h1Swo4vr.js} +6 -6
- package/dist/{glob.node-Cub51teu.js.map → glob.node-h1Swo4vr.js.map} +1 -1
- package/dist/{index-l6SSoCQL.js → index-D5lm6ANC.js} +2 -2
- package/dist/{index-l6SSoCQL.js.map → index-D5lm6ANC.js.map} +1 -1
- package/dist/{list_directory.node-RNgF574B.js → list_directory.node-CEUOBF5h.js} +2 -2
- package/dist/{list_directory.node-RNgF574B.js.map → list_directory.node-CEUOBF5h.js.map} +1 -1
- package/dist/{load-profile-BUNbamZ9.js → load-profile-Dk7ZUf3s.js} +2 -2
- package/dist/{load-profile-BUNbamZ9.js.map → load-profile-Dk7ZUf3s.js.map} +1 -1
- package/dist/{main-CMjLSaJf.js → main-CS_jpDsP.js} +619 -620
- package/dist/main-CS_jpDsP.js.map +1 -0
- package/dist/{node-D2i4QyuX.js → node-BJyrP3Sj.js} +2 -2
- package/dist/{node-D2i4QyuX.js.map → node-BJyrP3Sj.js.map} +1 -1
- package/dist/{node-HnDWqqri.js → node-BtKYcfrH.js} +3 -3
- package/dist/{node-HnDWqqri.js.map → node-BtKYcfrH.js.map} +1 -1
- package/dist/{node-rOj17fe_.js → node-COZM4qQd.js} +3 -3
- package/dist/{node-rOj17fe_.js.map → node-COZM4qQd.js.map} +1 -1
- package/dist/{node-Bu9szyQU.js → node-CRrSwIMO.js} +7 -7
- package/dist/{node-Bu9szyQU.js.map → node-CRrSwIMO.js.map} +1 -1
- package/dist/{node-C8KhLGcS.js → node-DVHX-oeS.js} +2 -2
- package/dist/{node-C8KhLGcS.js.map → node-DVHX-oeS.js.map} +1 -1
- package/dist/{node-C-6V_-yI.js → node-dAg24OS_.js} +14 -14
- package/dist/{node-C-6V_-yI.js.map → node-dAg24OS_.js.map} +1 -1
- package/dist/{read_file.node-5Ab8TOWo.js → read_file.node-DbAEjkEn.js} +2 -2
- package/dist/{read_file.node-5Ab8TOWo.js.map → read_file.node-DbAEjkEn.js.map} +1 -1
- package/dist/{stdio-FoEa-Lul.js → stdio-BxgTnYre.js} +3 -3
- package/dist/{stdio-FoEa-Lul.js.map → stdio-BxgTnYre.js.map} +1 -1
- package/dist/storybook.js +1 -1
- package/dist/{undo_edit.node-knBYg6rq.js → undo_edit.node-DL1deBcE.js} +5 -5
- package/dist/{undo_edit.node-knBYg6rq.js.map → undo_edit.node-DL1deBcE.js.map} +1 -1
- package/package.json +1 -1
- package/dist/console-cTFB4LXV.js.map +0 -1
- package/dist/main-CMjLSaJf.js.map +0 -1
@@ -1,26 +1,26 @@
|
|
1
1
|
#!/usr/bin/env node
|
2
|
-
import { O as qe, s as $r, c as gh, a as _r, b as _s, f as Ge, d as Qn, p as Dt, m as xe, e as Un, g as br, h as Mt, i as op, j as vh, o as le, l as be, k as oe, n as ee, q as ye, r as Ke, t as Je, u as Ue, v as Zn, w as st, x as yh, y as sp, z as Xn, A as up, M as Qe, B as bh, C as K, N as kn, D as ei, E as Zr, F as Ss, G as lp, H as cp, I as wh, J as fp, K as _h, L as hp, P as ou, Q as Ft, R as dp, S as pp, T as mp, U as gp, V as vp, W as yp, X as bp, Y as wp, Z as _p, _ as Sp, $ as Ep, a0 as Pp, a1 as Cp, a2 as xp, a3 as Rp, a4 as Op, a5 as Tp, a6 as Ap, a7 as Lp, a8 as Ip, a9 as
|
3
|
-
import * as
|
4
|
-
import at, { readdir as
|
5
|
-
import * as
|
2
|
+
import { O as qe, s as $r, c as gh, a as _r, b as _s, f as Ge, d as Qn, p as Dt, m as xe, e as Un, g as br, h as Mt, i as op, j as vh, o as le, l as be, k as oe, n as ee, q as ye, r as Ke, t as Je, u as Ue, v as Zn, w as st, x as yh, y as sp, z as Xn, A as up, M as Qe, B as bh, C as K, N as kn, D as ei, E as Zr, F as Ss, G as lp, H as cp, I as wh, J as fp, K as _h, L as hp, P as ou, Q as Ft, R as dp, S as pp, T as mp, U as gp, V as vp, W as yp, X as bp, Y as wp, Z as _p, _ as Sp, $ as Ep, a0 as Pp, a1 as Cp, a2 as xp, a3 as Rp, a4 as Op, a5 as Tp, a6 as Ap, a7 as Lp, a8 as Ip, a9 as ut, aa as $p, ab as Dp, ac as Mp, ad as Fp, ae as Sh, af as Gt, ag as Es, ah as su, ai as uu, aj as lu, ak as yi, al as Ps, am as ns, an as Ee, ao as kp, ap as jp, aq as qp, ar as Np, as as Hp, at as is, au as Eh, av as Ph, aw as Up, ax as Bp } from "./console-CZXURH0C.js";
|
3
|
+
import * as zp from "node:fs/promises";
|
4
|
+
import at, { readdir as Vp, stat as Ch, readFile as Ar, mkdir as Bn, writeFile as Ot, unlink as Wp, readlink as Gp, open as Kp } from "node:fs/promises";
|
5
|
+
import * as Jp from "node:path";
|
6
6
|
import me, { join as Ve, dirname as cu } from "node:path";
|
7
|
-
import { i as fu, F as bi, f as wr, a as
|
7
|
+
import { i as fu, F as bi, f as wr, a as Yp } from "./client-CT0UspN7.js";
|
8
8
|
import Cs from "node:events";
|
9
|
-
import * as
|
10
|
-
import
|
11
|
-
import lt, { fstatSync as
|
12
|
-
import
|
13
|
-
import { randomBytes as
|
14
|
-
import Er, { homedir as Br, cpus as
|
15
|
-
import hr, { promisify as kt, isDeepStrictEqual as
|
9
|
+
import * as Qp from "node:child_process";
|
10
|
+
import Zp, { execFile as xh, spawn as ri, exec as Nr } from "node:child_process";
|
11
|
+
import lt, { fstatSync as Xp, readlinkSync as em, promises as Ye, createWriteStream as rm } from "node:fs";
|
12
|
+
import tm, { stderr as we, stdout as $e } from "node:process";
|
13
|
+
import { randomBytes as nm } from "node:crypto";
|
14
|
+
import Er, { homedir as Br, cpus as im, totalmem as am, freemem as om, arch as sm, release as um, platform as zn } from "node:os";
|
15
|
+
import hr, { promisify as kt, isDeepStrictEqual as lm } from "node:util";
|
16
16
|
import ti from "node:buffer";
|
17
|
-
import
|
18
|
-
import
|
19
|
-
import
|
20
|
-
import
|
21
|
-
import { r as
|
22
|
-
import { pipeline as
|
23
|
-
import { lookup as
|
17
|
+
import cm, { createGzip as fm } from "node:zlib";
|
18
|
+
import hm from "node:string_decoder";
|
19
|
+
import dm, { createServer as Rh } from "node:http";
|
20
|
+
import pm from "node:https";
|
21
|
+
import { r as mm } from "./executable-Dy1dmJR0.js";
|
22
|
+
import { pipeline as gm } from "node:stream/promises";
|
23
|
+
import { lookup as vm } from "node:dns";
|
24
24
|
const Ir = Symbol.for("@@pendingOperation");
|
25
25
|
function hu(i, e) {
|
26
26
|
return (t) => qe.from(t).pipe(
|
@@ -35,25 +35,25 @@ function hu(i, e) {
|
|
35
35
|
_s(e)
|
36
36
|
);
|
37
37
|
}
|
38
|
-
function
|
38
|
+
function ym() {
|
39
39
|
return (i) => qe.from(i).pipe(Qn((e) => e !== Ir));
|
40
40
|
}
|
41
|
-
async function
|
41
|
+
async function bm(i, e) {
|
42
42
|
const t = await Ge(
|
43
|
-
qe.from(i).pipe(
|
43
|
+
qe.from(i).pipe(ym()),
|
44
44
|
e
|
45
45
|
);
|
46
46
|
if (t instanceof Error)
|
47
47
|
throw t;
|
48
48
|
return t;
|
49
49
|
}
|
50
|
-
const
|
51
|
-
|
52
|
-
function
|
50
|
+
const wm = new URL("https://ampcode.com/"), Dr = wm.toString(), _m = new URL("https://api.anthropic.com/");
|
51
|
+
_m.toString();
|
52
|
+
function Sm(i) {
|
53
53
|
const e = typeof i == "string" ? i : i.toString();
|
54
54
|
return e === Dr || e === Dr.slice(0, -1);
|
55
55
|
}
|
56
|
-
const
|
56
|
+
const Em = ["apiKey"];
|
57
57
|
function Oh({
|
58
58
|
storage: i,
|
59
59
|
secretStorage: e,
|
@@ -99,7 +99,7 @@ function Oh({
|
|
99
99
|
isSet: {
|
100
100
|
[u]: Object.fromEntries(
|
101
101
|
await Promise.all(
|
102
|
-
|
102
|
+
Em.map(async (l) => [
|
103
103
|
l,
|
104
104
|
!!await e.get(l, u)
|
105
105
|
])
|
@@ -141,17 +141,17 @@ function Oh({
|
|
141
141
|
workspaceRoots: t
|
142
142
|
};
|
143
143
|
}
|
144
|
-
const ni = "2025-03-26",
|
144
|
+
const ni = "2025-03-26", Pm = [
|
145
145
|
ni,
|
146
146
|
"2024-11-05",
|
147
147
|
"2024-10-07"
|
148
|
-
], ii = "2.0", Th = Ue([ee(), Je().int()]), Ah = ee(),
|
148
|
+
], ii = "2.0", Th = Ue([ee(), Je().int()]), Ah = ee(), Cm = le({
|
149
149
|
/**
|
150
150
|
* If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
|
151
151
|
*/
|
152
152
|
progressToken: oe(Th)
|
153
153
|
}).passthrough(), tr = le({
|
154
|
-
_meta: oe(
|
154
|
+
_meta: oe(Cm)
|
155
155
|
}).passthrough(), Ze = le({
|
156
156
|
method: ee(),
|
157
157
|
params: oe(tr)
|
@@ -171,9 +171,9 @@ const ni = "2025-03-26", Cm = [
|
|
171
171
|
}).passthrough(), ai = Ue([ee(), Je().int()]), Lh = le({
|
172
172
|
jsonrpc: be(ii),
|
173
173
|
id: ai
|
174
|
-
}).merge(Ze).strict(),
|
174
|
+
}).merge(Ze).strict(), xm = (i) => Lh.safeParse(i).success, Ih = le({
|
175
175
|
jsonrpc: be(ii)
|
176
|
-
}).merge(dr).strict(),
|
176
|
+
}).merge(dr).strict(), Rm = (i) => Ih.safeParse(i).success, $h = le({
|
177
177
|
jsonrpc: be(ii),
|
178
178
|
id: ai,
|
179
179
|
result: nr
|
@@ -199,7 +199,7 @@ const Dh = le({
|
|
199
199
|
*/
|
200
200
|
data: oe(Zn())
|
201
201
|
})
|
202
|
-
}).strict(),
|
202
|
+
}).strict(), Om = (i) => Dh.safeParse(i).success, Tm = Ue([
|
203
203
|
Lh,
|
204
204
|
Ih,
|
205
205
|
$h,
|
@@ -221,7 +221,7 @@ const Dh = le({
|
|
221
221
|
}), Mh = le({
|
222
222
|
name: ee(),
|
223
223
|
version: ee()
|
224
|
-
}).passthrough(),
|
224
|
+
}).passthrough(), Am = le({
|
225
225
|
/**
|
226
226
|
* Experimental, non-standard capabilities that the client supports.
|
227
227
|
*/
|
@@ -239,17 +239,17 @@ const Dh = le({
|
|
239
239
|
*/
|
240
240
|
listChanged: oe(Ke())
|
241
241
|
}).passthrough())
|
242
|
-
}).passthrough(),
|
242
|
+
}).passthrough(), Lm = Ze.extend({
|
243
243
|
method: be("initialize"),
|
244
244
|
params: tr.extend({
|
245
245
|
/**
|
246
246
|
* The latest version of the Model Context Protocol that the client supports. The client MAY decide to support older versions as well.
|
247
247
|
*/
|
248
248
|
protocolVersion: ee(),
|
249
|
-
capabilities:
|
249
|
+
capabilities: Am,
|
250
250
|
clientInfo: Mh
|
251
251
|
})
|
252
|
-
}),
|
252
|
+
}), Im = le({
|
253
253
|
/**
|
254
254
|
* Experimental, non-standard capabilities that the server supports.
|
255
255
|
*/
|
@@ -298,7 +298,7 @@ const Dh = le({
|
|
298
298
|
* The version of the Model Context Protocol that the server wants to use. This may not match the version that the client requested. If the client cannot support this version, it MUST disconnect.
|
299
299
|
*/
|
300
300
|
protocolVersion: ee(),
|
301
|
-
capabilities:
|
301
|
+
capabilities: Im,
|
302
302
|
serverInfo: Mh,
|
303
303
|
/**
|
304
304
|
* Instructions describing how to use the server and its features.
|
@@ -306,11 +306,11 @@ const Dh = le({
|
|
306
306
|
* This can be used by clients to improve the LLM's understanding of available tools, resources, etc. It can be thought of like a "hint" to the model. For example, this information MAY be added to the system prompt.
|
307
307
|
*/
|
308
308
|
instructions: oe(ee())
|
309
|
-
}),
|
309
|
+
}), $m = dr.extend({
|
310
310
|
method: be("notifications/initialized")
|
311
311
|
}), Rs = Ze.extend({
|
312
312
|
method: be("ping")
|
313
|
-
}),
|
313
|
+
}), Dm = le({
|
314
314
|
/**
|
315
315
|
* The progress thus far. This should increase every time progress is made, even if the total is unknown.
|
316
316
|
*/
|
@@ -325,7 +325,7 @@ const Dh = le({
|
|
325
325
|
message: oe(ee())
|
326
326
|
}).passthrough(), Os = dr.extend({
|
327
327
|
method: be("notifications/progress"),
|
328
|
-
params: jt.merge(
|
328
|
+
params: jt.merge(Dm).extend({
|
329
329
|
/**
|
330
330
|
* The progress token which was given in the initial request, used to associate this notification with the request that is proceeding.
|
331
331
|
*/
|
@@ -364,7 +364,7 @@ const Dh = le({
|
|
364
364
|
* A base64-encoded string representing the binary data of the item.
|
365
365
|
*/
|
366
366
|
blob: ee().base64()
|
367
|
-
}),
|
367
|
+
}), Mm = le({
|
368
368
|
/**
|
369
369
|
* The URI of this resource.
|
370
370
|
*/
|
@@ -385,7 +385,7 @@ const Dh = le({
|
|
385
385
|
* The MIME type of this resource, if known.
|
386
386
|
*/
|
387
387
|
mimeType: oe(ee())
|
388
|
-
}).passthrough(),
|
388
|
+
}).passthrough(), Fm = le({
|
389
389
|
/**
|
390
390
|
* A URI template (according to RFC 6570) that can be used to construct resource URIs.
|
391
391
|
*/
|
@@ -406,15 +406,15 @@ const Dh = le({
|
|
406
406
|
* The MIME type for all resources that match this template. This should only be included if all resources matching this template have the same type.
|
407
407
|
*/
|
408
408
|
mimeType: oe(ee())
|
409
|
-
}).passthrough(),
|
409
|
+
}).passthrough(), km = oi.extend({
|
410
410
|
method: be("resources/list")
|
411
411
|
}), Nh = si.extend({
|
412
|
-
resources: ye(
|
413
|
-
}),
|
412
|
+
resources: ye(Mm)
|
413
|
+
}), jm = oi.extend({
|
414
414
|
method: be("resources/templates/list")
|
415
415
|
}), Hh = si.extend({
|
416
|
-
resourceTemplates: ye(
|
417
|
-
}),
|
416
|
+
resourceTemplates: ye(Fm)
|
417
|
+
}), qm = Ze.extend({
|
418
418
|
method: be("resources/read"),
|
419
419
|
params: tr.extend({
|
420
420
|
/**
|
@@ -424,9 +424,9 @@ const Dh = le({
|
|
424
424
|
})
|
425
425
|
}), Uh = nr.extend({
|
426
426
|
contents: ye(Ue([jh, qh]))
|
427
|
-
}),
|
427
|
+
}), Nm = dr.extend({
|
428
428
|
method: be("notifications/resources/list_changed")
|
429
|
-
}),
|
429
|
+
}), Hm = Ze.extend({
|
430
430
|
method: be("resources/subscribe"),
|
431
431
|
params: tr.extend({
|
432
432
|
/**
|
@@ -434,7 +434,7 @@ const Dh = le({
|
|
434
434
|
*/
|
435
435
|
uri: ee()
|
436
436
|
})
|
437
|
-
}),
|
437
|
+
}), Um = Ze.extend({
|
438
438
|
method: be("resources/unsubscribe"),
|
439
439
|
params: tr.extend({
|
440
440
|
/**
|
@@ -442,7 +442,7 @@ const Dh = le({
|
|
442
442
|
*/
|
443
443
|
uri: ee()
|
444
444
|
})
|
445
|
-
}),
|
445
|
+
}), Bm = dr.extend({
|
446
446
|
method: be("notifications/resources/updated"),
|
447
447
|
params: jt.extend({
|
448
448
|
/**
|
@@ -450,7 +450,7 @@ const Dh = le({
|
|
450
450
|
*/
|
451
451
|
uri: ee()
|
452
452
|
})
|
453
|
-
}),
|
453
|
+
}), zm = le({
|
454
454
|
/**
|
455
455
|
* The name of the argument.
|
456
456
|
*/
|
@@ -463,7 +463,7 @@ const Dh = le({
|
|
463
463
|
* Whether this argument must be provided.
|
464
464
|
*/
|
465
465
|
required: oe(Ke())
|
466
|
-
}).passthrough(),
|
466
|
+
}).passthrough(), Vm = le({
|
467
467
|
/**
|
468
468
|
* The name of the prompt or prompt template.
|
469
469
|
*/
|
@@ -475,12 +475,12 @@ const Dh = le({
|
|
475
475
|
/**
|
476
476
|
* A list of arguments to use for templating the prompt.
|
477
477
|
*/
|
478
|
-
arguments: oe(ye(
|
479
|
-
}).passthrough(),
|
478
|
+
arguments: oe(ye(zm))
|
479
|
+
}).passthrough(), Wm = oi.extend({
|
480
480
|
method: be("prompts/list")
|
481
481
|
}), Bh = si.extend({
|
482
|
-
prompts: ye(
|
483
|
-
}),
|
482
|
+
prompts: ye(Vm)
|
483
|
+
}), Gm = Ze.extend({
|
484
484
|
method: be("prompts/get"),
|
485
485
|
params: tr.extend({
|
486
486
|
/**
|
@@ -521,7 +521,7 @@ const Dh = le({
|
|
521
521
|
}).passthrough(), zh = le({
|
522
522
|
type: be("resource"),
|
523
523
|
resource: Ue([jh, qh])
|
524
|
-
}).passthrough(),
|
524
|
+
}).passthrough(), Km = le({
|
525
525
|
role: st(["user", "assistant"]),
|
526
526
|
content: Ue([
|
527
527
|
ui,
|
@@ -534,10 +534,10 @@ const Dh = le({
|
|
534
534
|
* An optional description for the prompt.
|
535
535
|
*/
|
536
536
|
description: oe(ee()),
|
537
|
-
messages: ye(
|
538
|
-
}),
|
537
|
+
messages: ye(Km)
|
538
|
+
}), Jm = dr.extend({
|
539
539
|
method: be("notifications/prompts/list_changed")
|
540
|
-
}),
|
540
|
+
}), Ym = le({
|
541
541
|
/**
|
542
542
|
* A human-readable title for the tool.
|
543
543
|
*/
|
@@ -575,7 +575,7 @@ const Dh = le({
|
|
575
575
|
* Default: true
|
576
576
|
*/
|
577
577
|
openWorldHint: oe(Ke())
|
578
|
-
}).passthrough(),
|
578
|
+
}).passthrough(), Qm = le({
|
579
579
|
/**
|
580
580
|
* The name of the tool.
|
581
581
|
*/
|
@@ -604,11 +604,11 @@ const Dh = le({
|
|
604
604
|
/**
|
605
605
|
* Optional additional tool information.
|
606
606
|
*/
|
607
|
-
annotations: oe(
|
608
|
-
}).passthrough(),
|
607
|
+
annotations: oe(Ym)
|
608
|
+
}).passthrough(), Zm = oi.extend({
|
609
609
|
method: be("tools/list")
|
610
610
|
}), Wh = si.extend({
|
611
|
-
tools: ye(
|
611
|
+
tools: ye(Qm)
|
612
612
|
}), Ts = nr.extend({
|
613
613
|
/**
|
614
614
|
* A list of content objects that represent the result of the tool call.
|
@@ -647,7 +647,7 @@ const Dh = le({
|
|
647
647
|
Ts.or(nr.extend({
|
648
648
|
toolResult: Zn()
|
649
649
|
}));
|
650
|
-
const
|
650
|
+
const Xm = Ze.extend({
|
651
651
|
method: be("tools/call"),
|
652
652
|
params: tr.extend({
|
653
653
|
name: ee(),
|
@@ -664,7 +664,7 @@ const eg = Ze.extend({
|
|
664
664
|
"critical",
|
665
665
|
"alert",
|
666
666
|
"emergency"
|
667
|
-
]),
|
667
|
+
]), eg = Ze.extend({
|
668
668
|
method: be("logging/setLevel"),
|
669
669
|
params: tr.extend({
|
670
670
|
/**
|
@@ -672,7 +672,7 @@ const eg = Ze.extend({
|
|
672
672
|
*/
|
673
673
|
level: Kh
|
674
674
|
})
|
675
|
-
}),
|
675
|
+
}), rg = dr.extend({
|
676
676
|
method: be("notifications/message"),
|
677
677
|
params: jt.extend({
|
678
678
|
/**
|
@@ -688,16 +688,16 @@ const eg = Ze.extend({
|
|
688
688
|
*/
|
689
689
|
data: Zn()
|
690
690
|
})
|
691
|
-
}),
|
691
|
+
}), tg = le({
|
692
692
|
/**
|
693
693
|
* A hint for a model name.
|
694
694
|
*/
|
695
695
|
name: ee().optional()
|
696
|
-
}).passthrough(),
|
696
|
+
}).passthrough(), ng = le({
|
697
697
|
/**
|
698
698
|
* Optional hints to use for model selection.
|
699
699
|
*/
|
700
|
-
hints: oe(ye(
|
700
|
+
hints: oe(ye(tg)),
|
701
701
|
/**
|
702
702
|
* How much to prioritize cost when selecting a model.
|
703
703
|
*/
|
@@ -710,13 +710,13 @@ const eg = Ze.extend({
|
|
710
710
|
* How much to prioritize intelligence and capabilities when selecting a model.
|
711
711
|
*/
|
712
712
|
intelligencePriority: oe(Je().min(0).max(1))
|
713
|
-
}).passthrough(),
|
713
|
+
}).passthrough(), ig = le({
|
714
714
|
role: st(["user", "assistant"]),
|
715
715
|
content: Ue([ui, li, ci])
|
716
|
-
}).passthrough(),
|
716
|
+
}).passthrough(), ag = Ze.extend({
|
717
717
|
method: be("sampling/createMessage"),
|
718
718
|
params: tr.extend({
|
719
|
-
messages: ye(
|
719
|
+
messages: ye(ig),
|
720
720
|
/**
|
721
721
|
* An optional system prompt the server wants to use for sampling. The client MAY modify or omit this prompt.
|
722
722
|
*/
|
@@ -738,9 +738,9 @@ const eg = Ze.extend({
|
|
738
738
|
/**
|
739
739
|
* The server's preferences for which model to select.
|
740
740
|
*/
|
741
|
-
modelPreferences: oe(
|
741
|
+
modelPreferences: oe(ng)
|
742
742
|
})
|
743
|
-
}),
|
743
|
+
}), og = nr.extend({
|
744
744
|
/**
|
745
745
|
* The name of the model that generated the message.
|
746
746
|
*/
|
@@ -755,22 +755,22 @@ const eg = Ze.extend({
|
|
755
755
|
li,
|
756
756
|
ci
|
757
757
|
])
|
758
|
-
}),
|
758
|
+
}), sg = le({
|
759
759
|
type: be("ref/resource"),
|
760
760
|
/**
|
761
761
|
* The URI or URI template of the resource.
|
762
762
|
*/
|
763
763
|
uri: ee()
|
764
|
-
}).passthrough(),
|
764
|
+
}).passthrough(), ug = le({
|
765
765
|
type: be("ref/prompt"),
|
766
766
|
/**
|
767
767
|
* The name of the prompt or prompt template
|
768
768
|
*/
|
769
769
|
name: ee()
|
770
|
-
}).passthrough(),
|
770
|
+
}).passthrough(), lg = Ze.extend({
|
771
771
|
method: be("completion/complete"),
|
772
772
|
params: tr.extend({
|
773
|
-
ref: Ue([
|
773
|
+
ref: Ue([ug, sg]),
|
774
774
|
/**
|
775
775
|
* The argument's information
|
776
776
|
*/
|
@@ -800,7 +800,7 @@ const eg = Ze.extend({
|
|
800
800
|
*/
|
801
801
|
hasMore: oe(Ke())
|
802
802
|
}).passthrough()
|
803
|
-
}),
|
803
|
+
}), cg = le({
|
804
804
|
/**
|
805
805
|
* The URI identifying the root. This *must* start with file:// for now.
|
806
806
|
*/
|
@@ -809,52 +809,52 @@ const eg = Ze.extend({
|
|
809
809
|
* An optional name for the root.
|
810
810
|
*/
|
811
811
|
name: oe(ee())
|
812
|
-
}).passthrough(),
|
812
|
+
}).passthrough(), fg = Ze.extend({
|
813
813
|
method: be("roots/list")
|
814
|
-
}),
|
815
|
-
roots: ye(
|
816
|
-
}),
|
814
|
+
}), hg = nr.extend({
|
815
|
+
roots: ye(cg)
|
816
|
+
}), dg = dr.extend({
|
817
817
|
method: be("notifications/roots/list_changed")
|
818
818
|
});
|
819
819
|
Ue([
|
820
820
|
Rs,
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
Km,
|
821
|
+
Lm,
|
822
|
+
lg,
|
823
|
+
eg,
|
825
824
|
Gm,
|
825
|
+
Wm,
|
826
|
+
km,
|
826
827
|
jm,
|
827
828
|
qm,
|
828
|
-
|
829
|
+
Hm,
|
829
830
|
Um,
|
830
|
-
|
831
|
-
|
832
|
-
Xm
|
831
|
+
Xm,
|
832
|
+
Zm
|
833
833
|
]);
|
834
834
|
Ue([
|
835
835
|
xs,
|
836
836
|
Os,
|
837
|
-
|
838
|
-
|
837
|
+
$m,
|
838
|
+
dg
|
839
839
|
]);
|
840
840
|
Ue([
|
841
841
|
tt,
|
842
|
-
|
843
|
-
|
842
|
+
og,
|
843
|
+
hg
|
844
844
|
]);
|
845
845
|
Ue([
|
846
846
|
Rs,
|
847
|
-
|
848
|
-
|
847
|
+
ag,
|
848
|
+
fg
|
849
849
|
]);
|
850
850
|
Ue([
|
851
851
|
xs,
|
852
852
|
Os,
|
853
|
-
|
854
|
-
|
855
|
-
|
853
|
+
rg,
|
854
|
+
Bm,
|
855
|
+
Nm,
|
856
856
|
Gh,
|
857
|
-
|
857
|
+
Jm
|
858
858
|
]);
|
859
859
|
Ue([
|
860
860
|
tt,
|
@@ -873,8 +873,8 @@ class Lr extends Error {
|
|
873
873
|
super(`MCP error ${e}: ${t}`), this.code = e, this.data = n, this.name = "McpError";
|
874
874
|
}
|
875
875
|
}
|
876
|
-
const
|
877
|
-
class
|
876
|
+
const pg = 6e4;
|
877
|
+
class mg {
|
878
878
|
constructor(e) {
|
879
879
|
this._options = e, this._requestMessageId = 0, this._requestHandlers = /* @__PURE__ */ new Map(), this._requestHandlerAbortControllers = /* @__PURE__ */ new Map(), this._notificationHandlers = /* @__PURE__ */ new Map(), this._responseHandlers = /* @__PURE__ */ new Map(), this._progressHandlers = /* @__PURE__ */ new Map(), this._timeoutInfo = /* @__PURE__ */ new Map(), this.setNotificationHandler(xs, (t) => {
|
880
880
|
const n = this._requestHandlerAbortControllers.get(t.params.requestId);
|
@@ -921,7 +921,7 @@ class gg {
|
|
921
921
|
}, this._transport.onerror = (t) => {
|
922
922
|
this._onerror(t);
|
923
923
|
}, this._transport.onmessage = (t, n) => {
|
924
|
-
du(t) ||
|
924
|
+
du(t) || Om(t) ? this._onresponse(t) : xm(t) ? this._onrequest(t, n) : Rm(t) ? this._onnotification(t) : this._onerror(new Error(`Unknown message type: ${JSON.stringify(t)}`));
|
925
925
|
}, await this._transport.start();
|
926
926
|
}
|
927
927
|
_onclose() {
|
@@ -1078,7 +1078,7 @@ class gg {
|
|
1078
1078
|
var b;
|
1079
1079
|
g((b = n?.signal) === null || b === void 0 ? void 0 : b.reason);
|
1080
1080
|
});
|
1081
|
-
const s = (v = n?.timeout) !== null && v !== void 0 ? v :
|
1081
|
+
const s = (v = n?.timeout) !== null && v !== void 0 ? v : pg, p = () => g(new Lr(fr.RequestTimeout, "Request timed out", { timeout: s }));
|
1082
1082
|
this._setupTimeout(d, s, n?.maxTotalTimeout, p, (h = n?.resetTimeoutOnProgress) !== null && h !== void 0 ? h : !1), this._transport.send(m, { relatedRequestId: r, resumptionToken: o, onresumptiontoken: u }).catch((b) => {
|
1083
1083
|
this._cleanupTimeout(d), a(b);
|
1084
1084
|
});
|
@@ -1134,17 +1134,17 @@ class gg {
|
|
1134
1134
|
this._notificationHandlers.delete(e);
|
1135
1135
|
}
|
1136
1136
|
}
|
1137
|
-
function
|
1137
|
+
function gg(i, e) {
|
1138
1138
|
return Object.entries(e).reduce((t, [n, r]) => (r && typeof r == "object" ? t[n] = t[n] ? { ...t[n], ...r } : r : t[n] = r, t), { ...i });
|
1139
1139
|
}
|
1140
1140
|
var Ct = { exports: {} };
|
1141
1141
|
/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */
|
1142
|
-
var
|
1143
|
-
function
|
1142
|
+
var vg = Ct.exports, pu;
|
1143
|
+
function yg() {
|
1144
1144
|
return pu || (pu = 1, function(i, e) {
|
1145
1145
|
(function(t, n) {
|
1146
1146
|
n(e);
|
1147
|
-
})(
|
1147
|
+
})(vg, function(t) {
|
1148
1148
|
function n() {
|
1149
1149
|
for (var U = arguments.length, q = Array(U), B = 0; B < U; B++)
|
1150
1150
|
q[B] = arguments[B];
|
@@ -1721,7 +1721,7 @@ function As() {
|
|
1721
1721
|
}), wi;
|
1722
1722
|
}
|
1723
1723
|
var _i, gu;
|
1724
|
-
function
|
1724
|
+
function bg() {
|
1725
1725
|
return gu || (gu = 1, _i = function(e) {
|
1726
1726
|
for (var t = 0, n = e.length, r = 0, o; r < n; )
|
1727
1727
|
t++, o = e.charCodeAt(r++), o >= 55296 && o <= 56319 && r < n && (o = e.charCodeAt(r), (o & 64512) == 56320 && r++);
|
@@ -1740,7 +1740,7 @@ function ft() {
|
|
1740
1740
|
getProperty: a,
|
1741
1741
|
escapeQuotes: c,
|
1742
1742
|
equal: As(),
|
1743
|
-
ucs2length:
|
1743
|
+
ucs2length: bg(),
|
1744
1744
|
varOccurences: f,
|
1745
1745
|
varReplace: y,
|
1746
1746
|
schemaHasRules: v,
|
@@ -1898,7 +1898,7 @@ function Yh() {
|
|
1898
1898
|
return Ei;
|
1899
1899
|
}
|
1900
1900
|
var Pi = { exports: {} }, bu;
|
1901
|
-
function
|
1901
|
+
function wg() {
|
1902
1902
|
if (bu) return Pi.exports;
|
1903
1903
|
bu = 1;
|
1904
1904
|
var i = Pi.exports = function(n, r, o) {
|
@@ -1972,7 +1972,7 @@ var Ci, wu;
|
|
1972
1972
|
function Ls() {
|
1973
1973
|
if (wu) return Ci;
|
1974
1974
|
wu = 1;
|
1975
|
-
var i =
|
1975
|
+
var i = yg(), e = As(), t = ft(), n = Yh(), r = wg();
|
1976
1976
|
Ci = o, o.normalizeId = s, o.fullPath = d, o.url = p, o.ids = b, o.inlineRef = y, o.schema = u;
|
1977
1977
|
function o(w, _, x) {
|
1978
1978
|
var $ = this._refs[x];
|
@@ -2327,7 +2327,7 @@ function Zh() {
|
|
2327
2327
|
}), Oi;
|
2328
2328
|
}
|
2329
2329
|
var Ti, Pu;
|
2330
|
-
function
|
2330
|
+
function _g() {
|
2331
2331
|
if (Pu) return Ti;
|
2332
2332
|
Pu = 1;
|
2333
2333
|
var i = Ls(), e = ft(), t = Is(), n = Qh(), r = Zh(), o = e.ucs2length, u = As(), l = t.Validation;
|
@@ -2540,7 +2540,7 @@ function Sg() {
|
|
2540
2540
|
return Ti;
|
2541
2541
|
}
|
2542
2542
|
var Ai = { exports: {} }, Cu;
|
2543
|
-
function
|
2543
|
+
function Sg() {
|
2544
2544
|
if (Cu) return Ai.exports;
|
2545
2545
|
Cu = 1;
|
2546
2546
|
var i = Ai.exports = function() {
|
@@ -2557,7 +2557,7 @@ function Eg() {
|
|
2557
2557
|
}, Ai.exports;
|
2558
2558
|
}
|
2559
2559
|
var Li, xu;
|
2560
|
-
function
|
2560
|
+
function Eg() {
|
2561
2561
|
if (xu) return Li;
|
2562
2562
|
xu = 1;
|
2563
2563
|
var i = ft(), e = /^(\d\d\d\d)-(\d\d)-(\d\d)$/, t = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], n = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i, r = /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i, o = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i, u = /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i, l = /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i, a = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i, c = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i, f = /^(?:\/(?:[^~/]|~0|~1)*)*$/, y = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i, v = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;
|
@@ -2648,7 +2648,7 @@ function Pg() {
|
|
2648
2648
|
return Li;
|
2649
2649
|
}
|
2650
2650
|
var Ii, Ru;
|
2651
|
-
function
|
2651
|
+
function Pg() {
|
2652
2652
|
return Ru || (Ru = 1, Ii = function(e, t, n) {
|
2653
2653
|
var r = " ", o = e.level, u = e.dataLevel, l = e.schema[t], a = e.errSchemaPath + "/" + t, c = !e.opts.allErrors, f = "data" + (u || ""), y = "valid" + o, v, h;
|
2654
2654
|
if (l == "#" || l == "#/")
|
@@ -2693,7 +2693,7 @@ function Cg() {
|
|
2693
2693
|
}), Ii;
|
2694
2694
|
}
|
2695
2695
|
var $i, Ou;
|
2696
|
-
function
|
2696
|
+
function Cg() {
|
2697
2697
|
return Ou || (Ou = 1, $i = function(e, t, n) {
|
2698
2698
|
var r = " ", o = e.schema[t], u = e.schemaPath + e.util.getProperty(t), l = e.errSchemaPath + "/" + t, a = !e.opts.allErrors, c = e.util.copy(e), f = "";
|
2699
2699
|
c.level++;
|
@@ -2705,7 +2705,7 @@ function xg() {
|
|
2705
2705
|
}), $i;
|
2706
2706
|
}
|
2707
2707
|
var Di, Tu;
|
2708
|
-
function
|
2708
|
+
function xg() {
|
2709
2709
|
return Tu || (Tu = 1, Di = function(e, t, n) {
|
2710
2710
|
var r = " ", o = e.level, u = e.dataLevel, l = e.schema[t], a = e.schemaPath + e.util.getProperty(t), c = e.errSchemaPath + "/" + t, f = !e.opts.allErrors, y = "data" + (u || ""), v = "valid" + o, h = "errs__" + o, d = e.util.copy(e), m = "";
|
2711
2711
|
d.level++;
|
@@ -2728,7 +2728,7 @@ function Rg() {
|
|
2728
2728
|
}), Di;
|
2729
2729
|
}
|
2730
2730
|
var Mi, Au;
|
2731
|
-
function
|
2731
|
+
function Rg() {
|
2732
2732
|
return Au || (Au = 1, Mi = function(e, t, n) {
|
2733
2733
|
var r = " ", o = e.schema[t], u = e.errSchemaPath + "/" + t;
|
2734
2734
|
e.opts.allErrors;
|
@@ -2737,7 +2737,7 @@ function Og() {
|
|
2737
2737
|
}), Mi;
|
2738
2738
|
}
|
2739
2739
|
var Fi, Lu;
|
2740
|
-
function
|
2740
|
+
function Og() {
|
2741
2741
|
return Lu || (Lu = 1, Fi = function(e, t, n) {
|
2742
2742
|
var r = " ", o = e.level, u = e.dataLevel, l = e.schema[t], a = e.schemaPath + e.util.getProperty(t), c = e.errSchemaPath + "/" + t, f = !e.opts.allErrors, y = "data" + (u || ""), v = "valid" + o, h = e.opts.$data && l && l.$data;
|
2743
2743
|
h && (r += " var schema" + o + " = " + e.util.getData(l.$data, u, e.dataPathArr) + "; "), h || (r += " var schema" + o + " = validate.schema" + a + ";"), r += "var " + v + " = equal(" + y + ", schema" + o + "); if (!" + v + ") { ";
|
@@ -2748,7 +2748,7 @@ function Tg() {
|
|
2748
2748
|
}), Fi;
|
2749
2749
|
}
|
2750
2750
|
var ki, Iu;
|
2751
|
-
function
|
2751
|
+
function Tg() {
|
2752
2752
|
return Iu || (Iu = 1, ki = function(e, t, n) {
|
2753
2753
|
var r = " ", o = e.level, u = e.dataLevel, l = e.schema[t], a = e.schemaPath + e.util.getProperty(t), c = e.errSchemaPath + "/" + t, f = !e.opts.allErrors, y = "data" + (u || ""), v = "valid" + o, h = "errs__" + o, d = e.util.copy(e), m = "";
|
2754
2754
|
d.level++;
|
@@ -2769,7 +2769,7 @@ function Ag() {
|
|
2769
2769
|
}), ki;
|
2770
2770
|
}
|
2771
2771
|
var ji, $u;
|
2772
|
-
function
|
2772
|
+
function Ag() {
|
2773
2773
|
return $u || ($u = 1, ji = function(e, t, n) {
|
2774
2774
|
var r = " ", o = e.level, u = e.dataLevel, l = e.schema[t], a = e.schemaPath + e.util.getProperty(t), c = e.errSchemaPath + "/" + t, f = !e.opts.allErrors, y = "data" + (u || ""), v = "errs__" + o, h = e.util.copy(e), d = "";
|
2775
2775
|
h.level++;
|
@@ -2822,7 +2822,7 @@ function Lg() {
|
|
2822
2822
|
}), ji;
|
2823
2823
|
}
|
2824
2824
|
var qi, Du;
|
2825
|
-
function
|
2825
|
+
function Lg() {
|
2826
2826
|
return Du || (Du = 1, qi = function(e, t, n) {
|
2827
2827
|
var r = " ", o = e.level, u = e.dataLevel, l = e.schema[t], a = e.schemaPath + e.util.getProperty(t), c = e.errSchemaPath + "/" + t, f = !e.opts.allErrors, y = "data" + (u || ""), v = "valid" + o, h = e.opts.$data && l && l.$data;
|
2828
2828
|
h && (r += " var schema" + o + " = " + e.util.getData(l.$data, u, e.dataPathArr) + "; ");
|
@@ -2835,7 +2835,7 @@ function Ig() {
|
|
2835
2835
|
}), qi;
|
2836
2836
|
}
|
2837
2837
|
var Ni, Mu;
|
2838
|
-
function
|
2838
|
+
function Ig() {
|
2839
2839
|
return Mu || (Mu = 1, Ni = function(e, t, n) {
|
2840
2840
|
var r = " ", o = e.level, u = e.dataLevel, l = e.schema[t], a = e.schemaPath + e.util.getProperty(t), c = e.errSchemaPath + "/" + t, f = !e.opts.allErrors, y = "data" + (u || "");
|
2841
2841
|
if (e.opts.format === !1)
|
@@ -2879,7 +2879,7 @@ function $g() {
|
|
2879
2879
|
}), Ni;
|
2880
2880
|
}
|
2881
2881
|
var Hi, Fu;
|
2882
|
-
function
|
2882
|
+
function $g() {
|
2883
2883
|
return Fu || (Fu = 1, Hi = function(e, t, n) {
|
2884
2884
|
var r = " ", o = e.level, u = e.dataLevel, l = e.schema[t], a = e.schemaPath + e.util.getProperty(t), c = e.errSchemaPath + "/" + t, f = !e.opts.allErrors, y = "data" + (u || ""), v = "valid" + o, h = "errs__" + o, d = e.util.copy(e);
|
2885
2885
|
d.level++;
|
@@ -2895,7 +2895,7 @@ function Dg() {
|
|
2895
2895
|
}), Hi;
|
2896
2896
|
}
|
2897
2897
|
var Ui, ku;
|
2898
|
-
function
|
2898
|
+
function Dg() {
|
2899
2899
|
return ku || (ku = 1, Ui = function(e, t, n) {
|
2900
2900
|
var r = " ", o = e.level, u = e.dataLevel, l = e.schema[t], a = e.schemaPath + e.util.getProperty(t), c = e.errSchemaPath + "/" + t, f = !e.opts.allErrors, y = "data" + (u || ""), v = "valid" + o, h = "errs__" + o, d = e.util.copy(e), m = "";
|
2901
2901
|
d.level++;
|
@@ -3017,7 +3017,7 @@ function Vu() {
|
|
3017
3017
|
}), Wi;
|
3018
3018
|
}
|
3019
3019
|
var Gi, Wu;
|
3020
|
-
function
|
3020
|
+
function Mg() {
|
3021
3021
|
return Wu || (Wu = 1, Gi = function(e, t, n) {
|
3022
3022
|
var r = " ", o = e.level, u = e.dataLevel, l = e.schema[t], a = e.schemaPath + e.util.getProperty(t), c = e.errSchemaPath + "/" + t, f = !e.opts.allErrors, y = "data" + (u || ""), v = e.opts.$data && l && l.$data, h;
|
3023
3023
|
if (v ? (r += " var schema" + o + " = " + e.util.getData(l.$data, u, e.dataPathArr) + "; ", h = "schema" + o) : h = l, !(v || typeof l == "number"))
|
@@ -3030,7 +3030,7 @@ function Fg() {
|
|
3030
3030
|
}), Gi;
|
3031
3031
|
}
|
3032
3032
|
var Ki, Gu;
|
3033
|
-
function
|
3033
|
+
function Fg() {
|
3034
3034
|
return Gu || (Gu = 1, Ki = function(e, t, n) {
|
3035
3035
|
var r = " ", o = e.level, u = e.dataLevel, l = e.schema[t], a = e.schemaPath + e.util.getProperty(t), c = e.errSchemaPath + "/" + t, f = !e.opts.allErrors, y = "data" + (u || ""), v = "errs__" + o, h = e.util.copy(e);
|
3036
3036
|
h.level++;
|
@@ -3051,7 +3051,7 @@ function kg() {
|
|
3051
3051
|
}), Ki;
|
3052
3052
|
}
|
3053
3053
|
var Ji, Ku;
|
3054
|
-
function
|
3054
|
+
function kg() {
|
3055
3055
|
return Ku || (Ku = 1, Ji = function(e, t, n) {
|
3056
3056
|
var r = " ", o = e.level, u = e.dataLevel, l = e.schema[t], a = e.schemaPath + e.util.getProperty(t), c = e.errSchemaPath + "/" + t, f = !e.opts.allErrors, y = "data" + (u || ""), v = "valid" + o, h = "errs__" + o, d = e.util.copy(e), m = "";
|
3057
3057
|
d.level++;
|
@@ -3067,7 +3067,7 @@ function jg() {
|
|
3067
3067
|
}), Ji;
|
3068
3068
|
}
|
3069
3069
|
var Yi, Ju;
|
3070
|
-
function
|
3070
|
+
function jg() {
|
3071
3071
|
return Ju || (Ju = 1, Yi = function(e, t, n) {
|
3072
3072
|
var r = " ", o = e.level, u = e.dataLevel, l = e.schema[t], a = e.schemaPath + e.util.getProperty(t), c = e.errSchemaPath + "/" + t, f = !e.opts.allErrors, y = "data" + (u || ""), v = e.opts.$data && l && l.$data, h;
|
3073
3073
|
v ? (r += " var schema" + o + " = " + e.util.getData(l.$data, u, e.dataPathArr) + "; ", h = "schema" + o) : h = l;
|
@@ -3080,7 +3080,7 @@ function qg() {
|
|
3080
3080
|
}), Yi;
|
3081
3081
|
}
|
3082
3082
|
var Qi, Yu;
|
3083
|
-
function
|
3083
|
+
function qg() {
|
3084
3084
|
return Yu || (Yu = 1, Qi = function(e, t, n) {
|
3085
3085
|
var r = " ", o = e.level, u = e.dataLevel, l = e.schema[t], a = e.schemaPath + e.util.getProperty(t), c = e.errSchemaPath + "/" + t, f = !e.opts.allErrors, y = "data" + (u || ""), v = "errs__" + o, h = e.util.copy(e), d = "";
|
3086
3086
|
h.level++;
|
@@ -3201,7 +3201,7 @@ function Ng() {
|
|
3201
3201
|
}), Qi;
|
3202
3202
|
}
|
3203
3203
|
var Zi, Qu;
|
3204
|
-
function
|
3204
|
+
function Ng() {
|
3205
3205
|
return Qu || (Qu = 1, Zi = function(e, t, n) {
|
3206
3206
|
var r = " ", o = e.level, u = e.dataLevel, l = e.schema[t], a = e.schemaPath + e.util.getProperty(t), c = e.errSchemaPath + "/" + t, f = !e.opts.allErrors, y = "data" + (u || ""), v = "errs__" + o, h = e.util.copy(e), d = "";
|
3207
3207
|
h.level++;
|
@@ -3219,7 +3219,7 @@ function Hg() {
|
|
3219
3219
|
}), Zi;
|
3220
3220
|
}
|
3221
3221
|
var Xi, Zu;
|
3222
|
-
function
|
3222
|
+
function Hg() {
|
3223
3223
|
return Zu || (Zu = 1, Xi = function(e, t, n) {
|
3224
3224
|
var r = " ", o = e.level, u = e.dataLevel, l = e.schema[t], a = e.schemaPath + e.util.getProperty(t), c = e.errSchemaPath + "/" + t, f = !e.opts.allErrors, y = "data" + (u || ""), v = "valid" + o, h = e.opts.$data && l && l.$data;
|
3225
3225
|
h && (r += " var schema" + o + " = " + e.util.getData(l.$data, u, e.dataPathArr) + "; ");
|
@@ -3282,7 +3282,7 @@ function Ug() {
|
|
3282
3282
|
}), Xi;
|
3283
3283
|
}
|
3284
3284
|
var ea, Xu;
|
3285
|
-
function
|
3285
|
+
function Ug() {
|
3286
3286
|
return Xu || (Xu = 1, ea = function(e, t, n) {
|
3287
3287
|
var r = " ", o = e.level, u = e.dataLevel, l = e.schema[t], a = e.schemaPath + e.util.getProperty(t), c = e.errSchemaPath + "/" + t, f = !e.opts.allErrors, y = "data" + (u || ""), v = "valid" + o, h = e.opts.$data && l && l.$data, d;
|
3288
3288
|
if (h ? (r += " var schema" + o + " = " + e.util.getData(l.$data, u, e.dataPathArr) + "; ", d = "schema" + o) : d = l, (l || h) && e.opts.uniqueItems !== !1) {
|
@@ -3306,19 +3306,19 @@ function Bg() {
|
|
3306
3306
|
}), ea;
|
3307
3307
|
}
|
3308
3308
|
var ra, el;
|
3309
|
-
function
|
3309
|
+
function Bg() {
|
3310
3310
|
return el || (el = 1, ra = {
|
3311
|
-
$ref:
|
3312
|
-
allOf:
|
3313
|
-
anyOf:
|
3314
|
-
$comment:
|
3315
|
-
const:
|
3316
|
-
contains:
|
3317
|
-
dependencies:
|
3318
|
-
enum:
|
3319
|
-
format:
|
3320
|
-
if:
|
3321
|
-
items:
|
3311
|
+
$ref: Pg(),
|
3312
|
+
allOf: Cg(),
|
3313
|
+
anyOf: xg(),
|
3314
|
+
$comment: Rg(),
|
3315
|
+
const: Og(),
|
3316
|
+
contains: Tg(),
|
3317
|
+
dependencies: Ag(),
|
3318
|
+
enum: Lg(),
|
3319
|
+
format: Ig(),
|
3320
|
+
if: $g(),
|
3321
|
+
items: Dg(),
|
3322
3322
|
maximum: qu(),
|
3323
3323
|
minimum: qu(),
|
3324
3324
|
maxItems: Hu(),
|
@@ -3327,22 +3327,22 @@ function zg() {
|
|
3327
3327
|
minLength: Bu(),
|
3328
3328
|
maxProperties: Vu(),
|
3329
3329
|
minProperties: Vu(),
|
3330
|
-
multipleOf:
|
3331
|
-
not:
|
3332
|
-
oneOf:
|
3333
|
-
pattern:
|
3334
|
-
properties:
|
3335
|
-
propertyNames:
|
3336
|
-
required:
|
3337
|
-
uniqueItems:
|
3330
|
+
multipleOf: Mg(),
|
3331
|
+
not: Fg(),
|
3332
|
+
oneOf: kg(),
|
3333
|
+
pattern: jg(),
|
3334
|
+
properties: qg(),
|
3335
|
+
propertyNames: Ng(),
|
3336
|
+
required: Hg(),
|
3337
|
+
uniqueItems: Ug(),
|
3338
3338
|
validate: Zh()
|
3339
3339
|
}), ra;
|
3340
3340
|
}
|
3341
3341
|
var ta, rl;
|
3342
|
-
function
|
3342
|
+
function zg() {
|
3343
3343
|
if (rl) return ta;
|
3344
3344
|
rl = 1;
|
3345
|
-
var i =
|
3345
|
+
var i = Bg(), e = ft().toHash;
|
3346
3346
|
return ta = function() {
|
3347
3347
|
var n = [
|
3348
3348
|
{
|
@@ -3417,7 +3417,7 @@ function Vg() {
|
|
3417
3417
|
}, ta;
|
3418
3418
|
}
|
3419
3419
|
var na, tl;
|
3420
|
-
function
|
3420
|
+
function Vg() {
|
3421
3421
|
if (tl) return na;
|
3422
3422
|
tl = 1;
|
3423
3423
|
var i = [
|
@@ -3461,7 +3461,7 @@ function Wg() {
|
|
3461
3461
|
}, na;
|
3462
3462
|
}
|
3463
3463
|
var ia, nl;
|
3464
|
-
function
|
3464
|
+
function Wg() {
|
3465
3465
|
if (nl) return ia;
|
3466
3466
|
nl = 1;
|
3467
3467
|
var i = Is().MissingRef;
|
@@ -3516,7 +3516,7 @@ function Gg() {
|
|
3516
3516
|
return ia;
|
3517
3517
|
}
|
3518
3518
|
var aa, il;
|
3519
|
-
function
|
3519
|
+
function Gg() {
|
3520
3520
|
return il || (il = 1, aa = function(e, t, n) {
|
3521
3521
|
var r = " ", o = e.level, u = e.dataLevel, l = e.schema[t], a = e.schemaPath + e.util.getProperty(t), c = e.errSchemaPath + "/" + t, f = !e.opts.allErrors, y, v = "data" + (u || ""), h = "valid" + o, d = "errs__" + o, m = e.opts.$data && l && l.$data, g;
|
3522
3522
|
m ? (r += " var schema" + o + " = " + e.util.getData(l.$data, u, e.dataPathArr) + "; ", g = "schema" + o) : g = l;
|
@@ -3566,17 +3566,17 @@ function Kg() {
|
|
3566
3566
|
return r;
|
3567
3567
|
}), aa;
|
3568
3568
|
}
|
3569
|
-
const
|
3570
|
-
$schema:
|
3571
|
-
$id:
|
3572
|
-
title:
|
3573
|
-
definitions:
|
3574
|
-
type:
|
3575
|
-
properties:
|
3569
|
+
const Kg = "http://json-schema.org/draft-07/schema#", Jg = "http://json-schema.org/draft-07/schema#", Yg = "Core schema meta-schema", Qg = { schemaArray: { type: "array", minItems: 1, items: { $ref: "#" } }, nonNegativeInteger: { type: "integer", minimum: 0 }, nonNegativeIntegerDefault0: { allOf: [{ $ref: "#/definitions/nonNegativeInteger" }, { default: 0 }] }, simpleTypes: { enum: ["array", "boolean", "integer", "null", "number", "object", "string"] }, stringArray: { type: "array", items: { type: "string" }, uniqueItems: !0, default: [] } }, Zg = ["object", "boolean"], Xg = { $id: { type: "string", format: "uri-reference" }, $schema: { type: "string", format: "uri" }, $ref: { type: "string", format: "uri-reference" }, $comment: { type: "string" }, title: { type: "string" }, description: { type: "string" }, default: !0, readOnly: { type: "boolean", default: !1 }, examples: { type: "array", items: !0 }, multipleOf: { type: "number", exclusiveMinimum: 0 }, maximum: { type: "number" }, exclusiveMaximum: { type: "number" }, minimum: { type: "number" }, exclusiveMinimum: { type: "number" }, maxLength: { $ref: "#/definitions/nonNegativeInteger" }, minLength: { $ref: "#/definitions/nonNegativeIntegerDefault0" }, pattern: { type: "string", format: "regex" }, additionalItems: { $ref: "#" }, items: { anyOf: [{ $ref: "#" }, { $ref: "#/definitions/schemaArray" }], default: !0 }, maxItems: { $ref: "#/definitions/nonNegativeInteger" }, minItems: { $ref: "#/definitions/nonNegativeIntegerDefault0" }, uniqueItems: { type: "boolean", default: !1 }, contains: { $ref: "#" }, maxProperties: { $ref: "#/definitions/nonNegativeInteger" }, minProperties: { $ref: "#/definitions/nonNegativeIntegerDefault0" }, required: { $ref: "#/definitions/stringArray" }, additionalProperties: { $ref: "#" }, definitions: { type: "object", additionalProperties: { $ref: "#" }, default: {} }, properties: { type: "object", additionalProperties: { $ref: "#" }, default: {} }, patternProperties: { type: "object", additionalProperties: { $ref: "#" }, propertyNames: { format: "regex" }, default: {} }, dependencies: { type: "object", additionalProperties: { anyOf: [{ $ref: "#" }, { $ref: "#/definitions/stringArray" }] } }, propertyNames: { $ref: "#" }, const: !0, enum: { type: "array", items: !0, minItems: 1, uniqueItems: !0 }, type: { anyOf: [{ $ref: "#/definitions/simpleTypes" }, { type: "array", items: { $ref: "#/definitions/simpleTypes" }, minItems: 1, uniqueItems: !0 }] }, format: { type: "string" }, contentMediaType: { type: "string" }, contentEncoding: { type: "string" }, if: { $ref: "#" }, then: { $ref: "#" }, else: { $ref: "#" }, allOf: { $ref: "#/definitions/schemaArray" }, anyOf: { $ref: "#/definitions/schemaArray" }, oneOf: { $ref: "#/definitions/schemaArray" }, not: { $ref: "#" } }, Xh = {
|
3570
|
+
$schema: Kg,
|
3571
|
+
$id: Jg,
|
3572
|
+
title: Yg,
|
3573
|
+
definitions: Qg,
|
3574
|
+
type: Zg,
|
3575
|
+
properties: Xg,
|
3576
3576
|
default: !0
|
3577
3577
|
};
|
3578
3578
|
var oa, al;
|
3579
|
-
function
|
3579
|
+
function ev() {
|
3580
3580
|
if (al) return oa;
|
3581
3581
|
al = 1;
|
3582
3582
|
var i = Xh;
|
@@ -3615,10 +3615,10 @@ function rv() {
|
|
3615
3615
|
}, oa;
|
3616
3616
|
}
|
3617
3617
|
var sa, ol;
|
3618
|
-
function
|
3618
|
+
function rv() {
|
3619
3619
|
if (ol) return sa;
|
3620
3620
|
ol = 1;
|
3621
|
-
var i = /^[a-z_$][a-z0-9_$-]*$/i, e =
|
3621
|
+
var i = /^[a-z_$][a-z0-9_$-]*$/i, e = Gg(), t = ev();
|
3622
3622
|
sa = {
|
3623
3623
|
add: n,
|
3624
3624
|
get: r,
|
@@ -3693,22 +3693,22 @@ function tv() {
|
|
3693
3693
|
}
|
3694
3694
|
return sa;
|
3695
3695
|
}
|
3696
|
-
const
|
3697
|
-
$schema:
|
3698
|
-
$id:
|
3699
|
-
description:
|
3700
|
-
type:
|
3701
|
-
required:
|
3702
|
-
properties:
|
3703
|
-
additionalProperties:
|
3696
|
+
const tv = "http://json-schema.org/draft-07/schema#", nv = "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#", iv = "Meta-schema for $data reference (JSON Schema extension proposal)", av = "object", ov = ["$data"], sv = { $data: { type: "string", anyOf: [{ format: "relative-json-pointer" }, { format: "json-pointer" }] } }, uv = !1, lv = {
|
3697
|
+
$schema: tv,
|
3698
|
+
$id: nv,
|
3699
|
+
description: iv,
|
3700
|
+
type: av,
|
3701
|
+
required: ov,
|
3702
|
+
properties: sv,
|
3703
|
+
additionalProperties: uv
|
3704
3704
|
};
|
3705
3705
|
var ua, sl;
|
3706
|
-
function
|
3706
|
+
function cv() {
|
3707
3707
|
if (sl) return ua;
|
3708
3708
|
sl = 1;
|
3709
|
-
var i =
|
3710
|
-
ua = d, d.prototype.validate = m, d.prototype.compile = g, d.prototype.addSchema = s, d.prototype.addMetaSchema = p, d.prototype.validateSchema = b, d.prototype.getSchema = _, d.prototype.removeSchema = T, d.prototype.addFormat = L, d.prototype.errorsText = A, d.prototype._addSchema = R, d.prototype._compile = C, d.prototype.compileAsync =
|
3711
|
-
var c =
|
3709
|
+
var i = _g(), e = Ls(), t = Sg(), n = Yh(), r = Qh(), o = Eg(), u = zg(), l = Vg(), a = ft();
|
3710
|
+
ua = d, d.prototype.validate = m, d.prototype.compile = g, d.prototype.addSchema = s, d.prototype.addMetaSchema = p, d.prototype.validateSchema = b, d.prototype.getSchema = _, d.prototype.removeSchema = T, d.prototype.addFormat = L, d.prototype.errorsText = A, d.prototype._addSchema = R, d.prototype._compile = C, d.prototype.compileAsync = Wg();
|
3711
|
+
var c = rv();
|
3712
3712
|
d.prototype.addKeyword = c.add, d.prototype.getKeyword = c.get, d.prototype.removeKeyword = c.remove, d.prototype.validateKeyword = c.validate;
|
3713
3713
|
var f = Is();
|
3714
3714
|
d.ValidationError = f.Validation, d.MissingRefError = f.MissingRef, d.$dataMetaSchema = l;
|
@@ -3888,7 +3888,7 @@ function fv() {
|
|
3888
3888
|
}
|
3889
3889
|
function k(O) {
|
3890
3890
|
var D;
|
3891
|
-
if (O._opts.$data && (D =
|
3891
|
+
if (O._opts.$data && (D = lv, O.addMetaSchema(D, D.$id, !0)), O._opts.meta !== !1) {
|
3892
3892
|
var z = Xh;
|
3893
3893
|
O._opts.$data && (z = l(z, h)), O.addMetaSchema(z, y, !0), O._refs["http://json-schema.org/schema"] = y;
|
3894
3894
|
}
|
@@ -3934,15 +3934,15 @@ function fv() {
|
|
3934
3934
|
}
|
3935
3935
|
return ua;
|
3936
3936
|
}
|
3937
|
-
var
|
3938
|
-
const
|
3939
|
-
class ul extends
|
3937
|
+
var fv = cv();
|
3938
|
+
const hv = /* @__PURE__ */ Xn(fv);
|
3939
|
+
class ul extends mg {
|
3940
3940
|
/**
|
3941
3941
|
* Initializes this client with the given name and version information.
|
3942
3942
|
*/
|
3943
3943
|
constructor(e, t) {
|
3944
3944
|
var n;
|
3945
|
-
super(t), this._clientInfo = e, this._cachedToolOutputValidators = /* @__PURE__ */ new Map(), this._capabilities = (n = t?.capabilities) !== null && n !== void 0 ? n : {}, this._ajv = new
|
3945
|
+
super(t), this._clientInfo = e, this._cachedToolOutputValidators = /* @__PURE__ */ new Map(), this._capabilities = (n = t?.capabilities) !== null && n !== void 0 ? n : {}, this._ajv = new hv();
|
3946
3946
|
}
|
3947
3947
|
/**
|
3948
3948
|
* Registers new capabilities. This can only be called before connecting to a transport.
|
@@ -3952,7 +3952,7 @@ class ul extends gg {
|
|
3952
3952
|
registerCapabilities(e) {
|
3953
3953
|
if (this.transport)
|
3954
3954
|
throw new Error("Cannot register capabilities after connecting to transport");
|
3955
|
-
this._capabilities =
|
3955
|
+
this._capabilities = gg(this._capabilities, e);
|
3956
3956
|
}
|
3957
3957
|
assertCapability(e, t) {
|
3958
3958
|
var n;
|
@@ -3972,7 +3972,7 @@ class ul extends gg {
|
|
3972
3972
|
}, Fh, t);
|
3973
3973
|
if (n === void 0)
|
3974
3974
|
throw new Error(`Server sent invalid initialize result: ${n}`);
|
3975
|
-
if (!
|
3975
|
+
if (!Pm.includes(n.protocolVersion))
|
3976
3976
|
throw new Error(`Server's protocol version is not supported: ${n.protocolVersion}`);
|
3977
3977
|
this._serverCapabilities = n.capabilities, this._serverVersion = n.serverInfo, this._instructions = n.instructions, await this.notification({
|
3978
3978
|
method: "notifications/initialized"
|
@@ -4120,7 +4120,7 @@ class ul extends gg {
|
|
4120
4120
|
return this.notification({ method: "notifications/roots/list_changed" });
|
4121
4121
|
}
|
4122
4122
|
}
|
4123
|
-
var
|
4123
|
+
var dv = Object.defineProperty, pv = (i, e, t) => e in i ? dv(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, Kt = (i, e, t) => pv(i, typeof e != "symbol" ? e + "" : e, t);
|
4124
4124
|
class ll extends Error {
|
4125
4125
|
constructor(e, t) {
|
4126
4126
|
super(e), Kt(this, "type"), Kt(this, "field"), Kt(this, "value"), Kt(this, "line"), this.name = "ParseError", this.type = t.type, this.field = t.field, this.value = t.value, this.line = t.line;
|
@@ -4128,11 +4128,11 @@ class ll extends Error {
|
|
4128
4128
|
}
|
4129
4129
|
function la(i) {
|
4130
4130
|
}
|
4131
|
-
function
|
4131
|
+
function mv(i) {
|
4132
4132
|
const { onEvent: e = la, onError: t = la, onRetry: n = la, onComment: r } = i;
|
4133
4133
|
let o = "", u = !0, l, a = "", c = "";
|
4134
4134
|
function f(m) {
|
4135
|
-
const g = u ? m.replace(/^\xEF\xBB\xBF/, "") : m, [s, p] =
|
4135
|
+
const g = u ? m.replace(/^\xEF\xBB\xBF/, "") : m, [s, p] = gv(`${o}${g}`);
|
4136
4136
|
for (const b of s)
|
4137
4137
|
y(b);
|
4138
4138
|
o = p, u = !1;
|
@@ -4200,7 +4200,7 @@ function gv(i) {
|
|
4200
4200
|
}
|
4201
4201
|
return { feed: f, reset: d };
|
4202
4202
|
}
|
4203
|
-
function
|
4203
|
+
function gv(i) {
|
4204
4204
|
const e = [];
|
4205
4205
|
let t = "";
|
4206
4206
|
const n = i.length;
|
@@ -4254,7 +4254,7 @@ class cl extends Event {
|
|
4254
4254
|
return e(fl(this), t);
|
4255
4255
|
}
|
4256
4256
|
}
|
4257
|
-
function
|
4257
|
+
function vv(i) {
|
4258
4258
|
const e = globalThis.DOMException;
|
4259
4259
|
return typeof e == "function" ? new e(i, "SyntaxError") : new SyntaxError(i);
|
4260
4260
|
}
|
@@ -4326,13 +4326,13 @@ class qn extends EventTarget {
|
|
4326
4326
|
if (e instanceof URL)
|
4327
4327
|
Ie(this, Hr, e);
|
4328
4328
|
else if (typeof e == "string")
|
4329
|
-
Ie(this, Hr, new URL(e,
|
4329
|
+
Ie(this, Hr, new URL(e, yv()));
|
4330
4330
|
else
|
4331
4331
|
throw new Error("Invalid URL");
|
4332
4332
|
} catch {
|
4333
|
-
throw
|
4333
|
+
throw vv("An invalid or illegal string was specified");
|
4334
4334
|
}
|
4335
|
-
Ie(this, et,
|
4335
|
+
Ie(this, et, mv({
|
4336
4336
|
onEvent: ge(this, ls),
|
4337
4337
|
onRetry: ge(this, cs)
|
4338
4338
|
})), Ie(this, We, this.CONNECTING), Ie(this, Tt, 3e3), Ie(this, Vn, (n = t?.fetch) != null ? n : globalThis.fetch), Ie(this, jn, (r = t?.withCredentials) != null ? r : !1), yr(this, rr, os).call(this);
|
@@ -4475,42 +4475,42 @@ qn.OPEN = 1, /**
|
|
4475
4475
|
* @public
|
4476
4476
|
*/
|
4477
4477
|
qn.CLOSED = 2;
|
4478
|
-
function
|
4478
|
+
function yv() {
|
4479
4479
|
const i = "document" in globalThis ? globalThis.document : void 0;
|
4480
4480
|
return i && typeof i == "object" && "baseURI" in i && typeof i.baseURI == "string" ? i.baseURI : void 0;
|
4481
4481
|
}
|
4482
4482
|
let Ds;
|
4483
4483
|
Ds = globalThis.crypto;
|
4484
|
-
async function
|
4484
|
+
async function bv(i) {
|
4485
4485
|
return (await Ds).getRandomValues(new Uint8Array(i));
|
4486
4486
|
}
|
4487
|
-
async function
|
4487
|
+
async function wv(i) {
|
4488
4488
|
const e = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~";
|
4489
4489
|
let t = "";
|
4490
|
-
const n = await
|
4490
|
+
const n = await bv(i);
|
4491
4491
|
for (let r = 0; r < i; r++) {
|
4492
4492
|
const o = n[r] % e.length;
|
4493
4493
|
t += e[o];
|
4494
4494
|
}
|
4495
4495
|
return t;
|
4496
4496
|
}
|
4497
|
-
async function
|
4498
|
-
return await
|
4497
|
+
async function _v(i) {
|
4498
|
+
return await wv(i);
|
4499
4499
|
}
|
4500
|
-
async function
|
4500
|
+
async function Sv(i) {
|
4501
4501
|
const e = await (await Ds).subtle.digest("SHA-256", new TextEncoder().encode(i));
|
4502
4502
|
return btoa(String.fromCharCode(...new Uint8Array(e))).replace(/\//g, "_").replace(/\+/g, "-").replace(/=/g, "");
|
4503
4503
|
}
|
4504
|
-
async function
|
4504
|
+
async function Ev(i) {
|
4505
4505
|
if (i || (i = 43), i < 43 || i > 128)
|
4506
4506
|
throw `Expected a length between 43 and 128. Received ${i}.`;
|
4507
|
-
const e = await
|
4507
|
+
const e = await _v(i), t = await Sv(e);
|
4508
4508
|
return {
|
4509
4509
|
code_verifier: e,
|
4510
4510
|
code_challenge: t
|
4511
4511
|
};
|
4512
4512
|
}
|
4513
|
-
const
|
4513
|
+
const Pv = le({
|
4514
4514
|
resource: ee().url(),
|
4515
4515
|
authorization_servers: ye(ee().url()).optional(),
|
4516
4516
|
jwks_uri: ee().url().optional(),
|
@@ -4525,7 +4525,7 @@ const Cv = le({
|
|
4525
4525
|
authorization_details_types_supported: ye(ee()).optional(),
|
4526
4526
|
dpop_signing_alg_values_supported: ye(ee()).optional(),
|
4527
4527
|
dpop_bound_access_tokens_required: Ke().optional()
|
4528
|
-
}).passthrough(),
|
4528
|
+
}).passthrough(), Cv = le({
|
4529
4529
|
issuer: ee(),
|
4530
4530
|
authorization_endpoint: ee(),
|
4531
4531
|
token_endpoint: ee(),
|
@@ -4556,7 +4556,7 @@ le({
|
|
4556
4556
|
error_description: ee().optional(),
|
4557
4557
|
error_uri: ee().optional()
|
4558
4558
|
});
|
4559
|
-
const
|
4559
|
+
const xv = le({
|
4560
4560
|
redirect_uris: ye(ee()).refine((i) => i.every((e) => URL.canParse(e)), { message: "redirect_uris must contain valid URLs" }),
|
4561
4561
|
token_endpoint_auth_method: ee().optional(),
|
4562
4562
|
grant_types: ye(ee()).optional(),
|
@@ -4572,12 +4572,12 @@ const Rv = le({
|
|
4572
4572
|
jwks: up().optional(),
|
4573
4573
|
software_id: ee().optional(),
|
4574
4574
|
software_version: ee().optional()
|
4575
|
-
}).strip(),
|
4575
|
+
}).strip(), Rv = le({
|
4576
4576
|
client_id: ee(),
|
4577
4577
|
client_secret: ee().optional(),
|
4578
4578
|
client_id_issued_at: Je().optional(),
|
4579
4579
|
client_secret_expires_at: Je().optional()
|
4580
|
-
}).strip(),
|
4580
|
+
}).strip(), Ov = xv.merge(Rv);
|
4581
4581
|
le({
|
4582
4582
|
error: ee(),
|
4583
4583
|
error_description: ee().optional()
|
@@ -4594,26 +4594,26 @@ class wt extends Error {
|
|
4594
4594
|
async function ca(i, { serverUrl: e, authorizationCode: t, scope: n, resourceMetadataUrl: r }) {
|
4595
4595
|
let o = e;
|
4596
4596
|
try {
|
4597
|
-
const v = await
|
4597
|
+
const v = await Av(r || e);
|
4598
4598
|
v.authorization_servers && v.authorization_servers.length > 0 && (o = v.authorization_servers[0]);
|
4599
4599
|
} catch (v) {
|
4600
4600
|
console.warn("Could not load OAuth Protected Resource metadata, falling back to /.well-known/oauth-authorization-server", v);
|
4601
4601
|
}
|
4602
|
-
const u = await
|
4602
|
+
const u = await Lv(o);
|
4603
4603
|
let l = await Promise.resolve(i.clientInformation());
|
4604
4604
|
if (!l) {
|
4605
4605
|
if (t !== void 0)
|
4606
4606
|
throw new Error("Existing OAuth client information is required when exchanging an authorization code");
|
4607
4607
|
if (!i.saveClientInformation)
|
4608
4608
|
throw new Error("OAuth client information must be saveable for dynamic registration");
|
4609
|
-
const v = await
|
4609
|
+
const v = await Mv(o, {
|
4610
4610
|
metadata: u,
|
4611
4611
|
clientMetadata: i.clientMetadata
|
4612
4612
|
});
|
4613
4613
|
await i.saveClientInformation(v), l = v;
|
4614
4614
|
}
|
4615
4615
|
if (t !== void 0) {
|
4616
|
-
const v = await i.codeVerifier(), h = await
|
4616
|
+
const v = await i.codeVerifier(), h = await $v(o, {
|
4617
4617
|
metadata: u,
|
4618
4618
|
clientInformation: l,
|
4619
4619
|
authorizationCode: t,
|
@@ -4625,7 +4625,7 @@ async function ca(i, { serverUrl: e, authorizationCode: t, scope: n, resourceMet
|
|
4625
4625
|
const a = await i.tokens();
|
4626
4626
|
if (a?.refresh_token)
|
4627
4627
|
try {
|
4628
|
-
const v = await
|
4628
|
+
const v = await Dv(o, {
|
4629
4629
|
metadata: u,
|
4630
4630
|
clientInformation: l,
|
4631
4631
|
refreshToken: a.refresh_token
|
@@ -4634,7 +4634,7 @@ async function ca(i, { serverUrl: e, authorizationCode: t, scope: n, resourceMet
|
|
4634
4634
|
} catch (v) {
|
4635
4635
|
console.error("Could not refresh OAuth tokens:", v);
|
4636
4636
|
}
|
4637
|
-
const c = i.state ? await i.state() : void 0, { authorizationUrl: f, codeVerifier: y } = await
|
4637
|
+
const c = i.state ? await i.state() : void 0, { authorizationUrl: f, codeVerifier: y } = await Iv(o, {
|
4638
4638
|
metadata: u,
|
4639
4639
|
clientInformation: l,
|
4640
4640
|
state: c,
|
@@ -4643,7 +4643,7 @@ async function ca(i, { serverUrl: e, authorizationCode: t, scope: n, resourceMet
|
|
4643
4643
|
});
|
4644
4644
|
return await i.saveCodeVerifier(y), await i.redirectToAuthorization(f), "REDIRECT";
|
4645
4645
|
}
|
4646
|
-
function
|
4646
|
+
function Tv(i) {
|
4647
4647
|
const e = i.headers.get("WWW-Authenticate");
|
4648
4648
|
if (!e)
|
4649
4649
|
return;
|
@@ -4661,7 +4661,7 @@ function Av(i) {
|
|
4661
4661
|
return;
|
4662
4662
|
}
|
4663
4663
|
}
|
4664
|
-
async function
|
4664
|
+
async function Av(i, e) {
|
4665
4665
|
var t;
|
4666
4666
|
let n;
|
4667
4667
|
n = new URL("/.well-known/oauth-protected-resource", i);
|
@@ -4682,9 +4682,9 @@ async function Lv(i, e) {
|
|
4682
4682
|
throw new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");
|
4683
4683
|
if (!r.ok)
|
4684
4684
|
throw new Error(`HTTP ${r.status} trying to load well-known OAuth protected resource metadata.`);
|
4685
|
-
return
|
4685
|
+
return Pv.parse(await r.json());
|
4686
4686
|
}
|
4687
|
-
async function
|
4687
|
+
async function Lv(i, e) {
|
4688
4688
|
var t;
|
4689
4689
|
const n = new URL("/.well-known/oauth-authorization-server", i);
|
4690
4690
|
let r;
|
@@ -4703,10 +4703,10 @@ async function Iv(i, e) {
|
|
4703
4703
|
if (r.status !== 404) {
|
4704
4704
|
if (!r.ok)
|
4705
4705
|
throw new Error(`HTTP ${r.status} trying to load well-known OAuth metadata`);
|
4706
|
-
return
|
4706
|
+
return Cv.parse(await r.json());
|
4707
4707
|
}
|
4708
4708
|
}
|
4709
|
-
async function
|
4709
|
+
async function Iv(i, { metadata: e, clientInformation: t, redirectUrl: n, scope: r, state: o }) {
|
4710
4710
|
const u = "code", l = "S256";
|
4711
4711
|
let a;
|
4712
4712
|
if (e) {
|
@@ -4716,10 +4716,10 @@ async function $v(i, { metadata: e, clientInformation: t, redirectUrl: n, scope:
|
|
4716
4716
|
throw new Error(`Incompatible auth server: does not support code challenge method ${l}`);
|
4717
4717
|
} else
|
4718
4718
|
a = new URL("/authorize", i);
|
4719
|
-
const c = await
|
4719
|
+
const c = await Ev(), f = c.code_verifier, y = c.code_challenge;
|
4720
4720
|
return a.searchParams.set("response_type", u), a.searchParams.set("client_id", t.client_id), a.searchParams.set("code_challenge", y), a.searchParams.set("code_challenge_method", l), a.searchParams.set("redirect_uri", String(n)), o && a.searchParams.set("state", o), r && a.searchParams.set("scope", r), { authorizationUrl: a, codeVerifier: f };
|
4721
4721
|
}
|
4722
|
-
async function
|
4722
|
+
async function $v(i, { metadata: e, clientInformation: t, authorizationCode: n, codeVerifier: r, redirectUri: o }) {
|
4723
4723
|
const u = "authorization_code";
|
4724
4724
|
let l;
|
4725
4725
|
if (e) {
|
@@ -4746,7 +4746,7 @@ async function Dv(i, { metadata: e, clientInformation: t, authorizationCode: n,
|
|
4746
4746
|
throw new Error(`Token exchange failed: HTTP ${c.status}`);
|
4747
4747
|
return rd.parse(await c.json());
|
4748
4748
|
}
|
4749
|
-
async function
|
4749
|
+
async function Dv(i, { metadata: e, clientInformation: t, refreshToken: n }) {
|
4750
4750
|
const r = "refresh_token";
|
4751
4751
|
let o;
|
4752
4752
|
if (e) {
|
@@ -4771,7 +4771,7 @@ async function Mv(i, { metadata: e, clientInformation: t, refreshToken: n }) {
|
|
4771
4771
|
throw new Error(`Token refresh failed: HTTP ${l.status}`);
|
4772
4772
|
return rd.parse({ refresh_token: n, ...await l.json() });
|
4773
4773
|
}
|
4774
|
-
async function
|
4774
|
+
async function Mv(i, { metadata: e, clientMetadata: t }) {
|
4775
4775
|
let n;
|
4776
4776
|
if (e) {
|
4777
4777
|
if (!e.registration_endpoint)
|
@@ -4788,14 +4788,14 @@ async function Fv(i, { metadata: e, clientMetadata: t }) {
|
|
4788
4788
|
});
|
4789
4789
|
if (!r.ok)
|
4790
4790
|
throw new Error(`Dynamic client registration failed: HTTP ${r.status}`);
|
4791
|
-
return
|
4791
|
+
return Ov.parse(await r.json());
|
4792
4792
|
}
|
4793
|
-
class
|
4793
|
+
class Fv extends Error {
|
4794
4794
|
constructor(e, t, n) {
|
4795
4795
|
super(`SSE error: ${t}`), this.code = e, this.event = n;
|
4796
4796
|
}
|
4797
4797
|
}
|
4798
|
-
class
|
4798
|
+
class kv {
|
4799
4799
|
constructor(e, t) {
|
4800
4800
|
this._url = e, this._resourceMetadataUrl = void 0, this._eventSourceInit = t?.eventSourceInit, this._requestInit = t?.requestInit, this._authProvider = t?.authProvider;
|
4801
4801
|
}
|
@@ -4838,7 +4838,7 @@ class jv {
|
|
4838
4838
|
this._authThenStart().then(e, t);
|
4839
4839
|
return;
|
4840
4840
|
}
|
4841
|
-
const u = new
|
4841
|
+
const u = new Fv(r.code, r.message, r);
|
4842
4842
|
t(u), (o = this.onerror) === null || o === void 0 || o.call(this, u);
|
4843
4843
|
}, this._eventSource.onopen = () => {
|
4844
4844
|
}, this._eventSource.addEventListener("endpoint", (r) => {
|
@@ -4857,7 +4857,7 @@ class jv {
|
|
4857
4857
|
const l = r;
|
4858
4858
|
let a;
|
4859
4859
|
try {
|
4860
|
-
a =
|
4860
|
+
a = Tm.parse(JSON.parse(l.data));
|
4861
4861
|
} catch (c) {
|
4862
4862
|
(o = this.onerror) === null || o === void 0 || o.call(this, c);
|
4863
4863
|
return;
|
@@ -4900,7 +4900,7 @@ class jv {
|
|
4900
4900
|
}, a = await fetch(this._endpoint, l);
|
4901
4901
|
if (!a.ok) {
|
4902
4902
|
if (a.status === 401 && this._authProvider) {
|
4903
|
-
if (this._resourceMetadataUrl =
|
4903
|
+
if (this._resourceMetadataUrl = Tv(a), await ca(this._authProvider, { serverUrl: this._url, resourceMetadataUrl: this._resourceMetadataUrl }) !== "AUTHORIZED")
|
4904
4904
|
throw new wt();
|
4905
4905
|
return this.send(e);
|
4906
4906
|
}
|
@@ -4913,11 +4913,11 @@ class jv {
|
|
4913
4913
|
}
|
4914
4914
|
}
|
4915
4915
|
const it = Symbol.for("disabled-client");
|
4916
|
-
function
|
4916
|
+
function jv(i, e, t) {
|
4917
4917
|
const n = new ul({ name: "amp-mcp-client", version: "0.0.0-dev" }), r = qe.of(void 0).pipe(
|
4918
4918
|
hu(
|
4919
4919
|
() => vh(
|
4920
|
-
Dt(async () => (await n.close(), await new Promise((c) => setTimeout(c, 100)),
|
4920
|
+
Dt(async () => (await n.close(), await new Promise((c) => setTimeout(c, 100)), qv(i, n, e))),
|
4921
4921
|
kn
|
4922
4922
|
).pipe(
|
4923
4923
|
ei((c) => {
|
@@ -4963,7 +4963,7 @@ function qv(i, e, t) {
|
|
4963
4963
|
status: u,
|
4964
4964
|
tools: a,
|
4965
4965
|
async callTool(c, f) {
|
4966
|
-
const y = await
|
4966
|
+
const y = await bm(r);
|
4967
4967
|
if (y === it)
|
4968
4968
|
throw new Error("cannot call tools for disabled client");
|
4969
4969
|
const v = await y.callTool(c, void 0, {
|
@@ -4986,15 +4986,15 @@ function qv(i, e, t) {
|
|
4986
4986
|
}
|
4987
4987
|
};
|
4988
4988
|
}
|
4989
|
-
async function
|
4989
|
+
async function qv(i, e, t) {
|
4990
4990
|
let n;
|
4991
4991
|
if ("url" in i)
|
4992
|
-
n = new
|
4992
|
+
n = new kv(new URL(i.url));
|
4993
4993
|
else {
|
4994
|
-
const { loadProfileEnvironmentVariables: r } = await import("./load-profile-
|
4994
|
+
const { loadProfileEnvironmentVariables: r } = await import("./load-profile-Dk7ZUf3s.js"), o = t.loadProfile === "never" || !t.workingDirectory ? process.env : await Ge(
|
4995
4995
|
r(t.workingDirectory, t.loadProfile)
|
4996
4996
|
);
|
4997
|
-
n = await import("./stdio-
|
4997
|
+
n = await import("./stdio-BxgTnYre.js").then(
|
4998
4998
|
({ StdioClientTransport: u }) => new u({
|
4999
4999
|
...i,
|
5000
5000
|
stderr: "pipe",
|
@@ -5034,7 +5034,7 @@ async function Nv(i, e, t) {
|
|
5034
5034
|
throw r;
|
5035
5035
|
}
|
5036
5036
|
}
|
5037
|
-
function
|
5037
|
+
function Nv({
|
5038
5038
|
configService: i,
|
5039
5039
|
toolService: e
|
5040
5040
|
}) {
|
@@ -5050,9 +5050,9 @@ function Hv({
|
|
5050
5050
|
xe(async ([{ mcpServers: f, loadProfile: y }, v]) => {
|
5051
5051
|
for (const [h, d] of Object.entries(f ?? {})) {
|
5052
5052
|
const m = r.get(h);
|
5053
|
-
m &&
|
5053
|
+
m && Hv(m.spec, d) || (r.set(h, {
|
5054
5054
|
spec: d,
|
5055
|
-
client:
|
5055
|
+
client: jv(d, { workingDirectory: v, loadProfile: y }, !1)
|
5056
5056
|
}), m && await m.client.dispose());
|
5057
5057
|
}
|
5058
5058
|
for (const [h, { client: d }] of r.entries())
|
@@ -5191,10 +5191,10 @@ function Hv({
|
|
5191
5191
|
}
|
5192
5192
|
};
|
5193
5193
|
}
|
5194
|
-
function
|
5194
|
+
function Hv(i, e) {
|
5195
5195
|
return JSON.stringify(i) === JSON.stringify(e);
|
5196
5196
|
}
|
5197
|
-
function
|
5197
|
+
function Uv(i) {
|
5198
5198
|
let e = {}, t = !0;
|
5199
5199
|
return i.changes.pipe(
|
5200
5200
|
_r(void 0),
|
@@ -5212,7 +5212,7 @@ function Bv(i) {
|
|
5212
5212
|
})
|
5213
5213
|
);
|
5214
5214
|
}
|
5215
|
-
function
|
5215
|
+
function Bv(i) {
|
5216
5216
|
const e = {}, t = new Qe();
|
5217
5217
|
return {
|
5218
5218
|
async get(n) {
|
@@ -5233,7 +5233,7 @@ function zv(i) {
|
|
5233
5233
|
changes: t.pipe(_r(void 0))
|
5234
5234
|
};
|
5235
5235
|
}
|
5236
|
-
function
|
5236
|
+
function zv(i) {
|
5237
5237
|
const { interval: e, fn: t, cacheKey: n } = i, r = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
|
5238
5238
|
return (...u) => {
|
5239
5239
|
const l = n ? n(...u) : "default", a = Date.now(), c = o.get(l) || 0;
|
@@ -5244,13 +5244,13 @@ function Vv(i) {
|
|
5244
5244
|
return r.set(l, f), f;
|
5245
5245
|
};
|
5246
5246
|
}
|
5247
|
-
const
|
5247
|
+
const Vv = zv({
|
5248
5248
|
interval: 20 * 1e3,
|
5249
|
-
fn:
|
5249
|
+
fn: Wv,
|
5250
5250
|
cacheKey: (i) => i.toString()
|
5251
5251
|
});
|
5252
|
-
async function
|
5253
|
-
const t = e?.workingDirectory?.fsPath === i.fsPath ? " (your working directory)" : "", n = [e?.testing ? "./" : i.fsPath + t], r = await
|
5252
|
+
async function Wv(i, e) {
|
5253
|
+
const t = e?.workingDirectory?.fsPath === i.fsPath ? " (your working directory)" : "", n = [e?.testing ? "./" : i.fsPath + t], r = await Vp(i.fsPath), o = await Promise.all(
|
5254
5254
|
r.filter((u) => !cp(u)).map(async (u) => {
|
5255
5255
|
try {
|
5256
5256
|
const l = await Ch(Ve(i.fsPath, u));
|
@@ -5268,10 +5268,10 @@ async function Gv(i, e) {
|
|
5268
5268
|
return n.join(`
|
5269
5269
|
`);
|
5270
5270
|
}
|
5271
|
-
class
|
5271
|
+
class Gv {
|
5272
5272
|
constructor(e) {
|
5273
5273
|
this.storage = e, this._observeHistory = wh(
|
5274
|
-
|
5274
|
+
Uv(this.storage).pipe(
|
5275
5275
|
xe((t) => {
|
5276
5276
|
const n = Object.values(t).filter((o) => o && "messages" in o).toSorted((o, u) => u.created - o.created), r = [];
|
5277
5277
|
for (const o of n)
|
@@ -5282,7 +5282,7 @@ class Kv {
|
|
5282
5282
|
v: o.v,
|
5283
5283
|
created: o.created,
|
5284
5284
|
title: o.title ?? null,
|
5285
|
-
userLastInteractedAt:
|
5285
|
+
userLastInteractedAt: Kv(o),
|
5286
5286
|
env: o.env,
|
5287
5287
|
originThreadID: o.originThreadID,
|
5288
5288
|
mainThreadID: o.mainThreadID
|
@@ -5317,7 +5317,7 @@ class Kv {
|
|
5317
5317
|
this._observeHistory.subscription.unsubscribe();
|
5318
5318
|
}
|
5319
5319
|
}
|
5320
|
-
function
|
5320
|
+
function Kv(i) {
|
5321
5321
|
return Math.max(
|
5322
5322
|
i.created,
|
5323
5323
|
...i.messages.map((e) => e.role === "user" ? e.meta?.sentAt : void 0).filter((e) => e !== void 0)
|
@@ -5326,7 +5326,7 @@ function Jv(i) {
|
|
5326
5326
|
function Ms() {
|
5327
5327
|
return new Promise((i) => setTimeout(i, 0));
|
5328
5328
|
}
|
5329
|
-
class
|
5329
|
+
class Jv {
|
5330
5330
|
constructor(e) {
|
5331
5331
|
this.storage = e;
|
5332
5332
|
}
|
@@ -5467,17 +5467,17 @@ function dl(i) {
|
|
5467
5467
|
messages: []
|
5468
5468
|
};
|
5469
5469
|
}
|
5470
|
-
function
|
5470
|
+
function Yv({
|
5471
5471
|
threadService: i,
|
5472
5472
|
threadHistoryService: e,
|
5473
5473
|
isExtensionDevelopment: t = !1
|
5474
5474
|
}) {
|
5475
5475
|
let n = !1;
|
5476
5476
|
const r = [], o = hp(), u = new _h(/* @__PURE__ */ new Map()), l = async () => {
|
5477
|
-
if (n || !await Ge(
|
5477
|
+
if (n || !await Ge(Yp))
|
5478
5478
|
return !1;
|
5479
5479
|
const m = await Ge(Zr);
|
5480
|
-
return t &&
|
5480
|
+
return t && Sm(m.settings.url) ? (K.debug(
|
5481
5481
|
`Skipping sync to ${Dr} in extension development mode to avoid polluting the production server`,
|
5482
5482
|
{ name: "ThreadSyncService" }
|
5483
5483
|
), !1) : !0;
|
@@ -5726,15 +5726,15 @@ function Qv({
|
|
5726
5726
|
}
|
5727
5727
|
};
|
5728
5728
|
}
|
5729
|
-
const
|
5729
|
+
const Qv = `Execute a routine from your routines.amp.yaml file.
|
5730
5730
|
|
5731
5731
|
This tool allows you to run predefined routines that automate common tasks. You can optionally provide a userInput argument that describes what input should be passed to the routine.
|
5732
5732
|
|
5733
5733
|
IMPORTANT: The result of this tool (if any) should be displayed directly to the user and no further action or text should be sent to the user.
|
5734
|
-
`,
|
5734
|
+
`, Zv = {
|
5735
5735
|
spec: {
|
5736
5736
|
name: "run_routine",
|
5737
|
-
description:
|
5737
|
+
description: Qv,
|
5738
5738
|
inputSchema: {
|
5739
5739
|
type: "object",
|
5740
5740
|
properties: {
|
@@ -5755,14 +5755,14 @@ IMPORTANT: The result of this tool (if any) should be displayed directly to the
|
|
5755
5755
|
},
|
5756
5756
|
source: "builtin"
|
5757
5757
|
},
|
5758
|
-
fn: import("./node-
|
5758
|
+
fn: import("./node-dAg24OS_.js").then(({ runRoutine: i }) => i)
|
5759
5759
|
};
|
5760
5760
|
let pl = !1;
|
5761
5761
|
async function td(i, e = !1) {
|
5762
5762
|
return pl ? { dispose() {
|
5763
|
-
} } : (pl = !0, await
|
5763
|
+
} } : (pl = !0, await Xv(i, e));
|
5764
5764
|
}
|
5765
|
-
async function
|
5765
|
+
async function Xv(i, e = !1) {
|
5766
5766
|
const t = [
|
5767
5767
|
i.registerTool(pp),
|
5768
5768
|
i.registerTool(mp),
|
@@ -5779,10 +5779,9 @@ async function ey(i, e = !1) {
|
|
5779
5779
|
i.registerTool(xp),
|
5780
5780
|
i.registerTool(Rp),
|
5781
5781
|
i.registerTool(Op),
|
5782
|
-
i.registerTool(Tp)
|
5783
|
-
i.registerTool(Ap)
|
5782
|
+
i.registerTool(Tp)
|
5784
5783
|
];
|
5785
|
-
return t.push(i.registerTool(
|
5784
|
+
return t.push(i.registerTool(Ap)), e && t.push(i.registerTool(Zv)), {
|
5786
5785
|
dispose() {
|
5787
5786
|
for (const n of t)
|
5788
5787
|
n.dispose();
|
@@ -6398,7 +6397,7 @@ function id() {
|
|
6398
6397
|
return _t.Option = e, _t.splitOptionFlags = r, _t.DualOptions = t, _t;
|
6399
6398
|
}
|
6400
6399
|
var da = {}, bl;
|
6401
|
-
function
|
6400
|
+
function ey() {
|
6402
6401
|
if (bl) return da;
|
6403
6402
|
bl = 1;
|
6404
6403
|
const i = 3;
|
@@ -6441,10 +6440,10 @@ function ry() {
|
|
6441
6440
|
return da.suggestSimilar = t, da;
|
6442
6441
|
}
|
6443
6442
|
var wl;
|
6444
|
-
function
|
6443
|
+
function ry() {
|
6445
6444
|
if (wl) return fa;
|
6446
6445
|
wl = 1;
|
6447
|
-
const i = Cs.EventEmitter, e =
|
6446
|
+
const i = Cs.EventEmitter, e = Zp, t = me, n = lt, r = tm, { Argument: o, humanReadableArgName: u } = Fs(), { CommanderError: l } = fi(), { Help: a } = nd(), { Option: c, splitOptionFlags: f, DualOptions: y } = id(), { suggestSimilar: v } = ey();
|
6448
6447
|
class h extends i {
|
6449
6448
|
/**
|
6450
6449
|
* Initialize a new `Command`.
|
@@ -7774,27 +7773,27 @@ Expecting one of '${b.join("', '")}'`);
|
|
7774
7773
|
return fa.Command = h, fa;
|
7775
7774
|
}
|
7776
7775
|
var _l;
|
7777
|
-
function
|
7776
|
+
function ty() {
|
7778
7777
|
return _l || (_l = 1, function(i, e) {
|
7779
|
-
const { Argument: t } = Fs(), { Command: n } =
|
7778
|
+
const { Argument: t } = Fs(), { Command: n } = ry(), { CommanderError: r, InvalidArgumentError: o } = fi(), { Help: u } = nd(), { Option: l } = id();
|
7780
7779
|
e = i.exports = new n(), e.program = e, e.Command = n, e.Option = l, e.Argument = t, e.Help = u, e.CommanderError = r, e.InvalidArgumentError = o, e.InvalidOptionArgumentError = o;
|
7781
7780
|
}(Jt, Jt.exports)), Jt.exports;
|
7782
7781
|
}
|
7783
|
-
var
|
7784
|
-
const
|
7785
|
-
program:
|
7786
|
-
createCommand:
|
7787
|
-
createArgument:
|
7788
|
-
createOption:
|
7789
|
-
CommanderError:
|
7790
|
-
InvalidArgumentError:
|
7791
|
-
InvalidOptionArgumentError:
|
7782
|
+
var ny = ty();
|
7783
|
+
const iy = /* @__PURE__ */ Xn(ny), {
|
7784
|
+
program: y_,
|
7785
|
+
createCommand: b_,
|
7786
|
+
createArgument: w_,
|
7787
|
+
createOption: __,
|
7788
|
+
CommanderError: S_,
|
7789
|
+
InvalidArgumentError: E_,
|
7790
|
+
InvalidOptionArgumentError: P_,
|
7792
7791
|
// deprecated old name
|
7793
7792
|
Command: Sl,
|
7794
|
-
Argument:
|
7795
|
-
Option:
|
7796
|
-
Help:
|
7797
|
-
} =
|
7793
|
+
Argument: C_,
|
7794
|
+
Option: ay,
|
7795
|
+
Help: x_
|
7796
|
+
} = iy;
|
7798
7797
|
var ad;
|
7799
7798
|
(() => {
|
7800
7799
|
var i = { 975: (C) => {
|
@@ -8120,13 +8119,13 @@ var ad;
|
|
8120
8119
|
};
|
8121
8120
|
})(R || (R = {})), ad = n;
|
8122
8121
|
})();
|
8123
|
-
const { URI: hi, Utils:
|
8122
|
+
const { URI: hi, Utils: oy } = ad;
|
8124
8123
|
class ds extends Error {
|
8125
8124
|
constructor(e, t) {
|
8126
8125
|
super(e), this.cause = t, this.name = "StdinReadError";
|
8127
8126
|
}
|
8128
8127
|
}
|
8129
|
-
async function
|
8128
|
+
async function sy(i = {}) {
|
8130
8129
|
const { maxSizeBytes: e = 1024 * 1024, timeoutMs: t = 3e4 } = i;
|
8131
8130
|
if (process.stdin.isTTY)
|
8132
8131
|
return {
|
@@ -8136,10 +8135,10 @@ async function uy(i = {}) {
|
|
8136
8135
|
bytesRead: 0
|
8137
8136
|
};
|
8138
8137
|
try {
|
8139
|
-
if (
|
8138
|
+
if (Xp(process.stdin.fd).isCharacterDevice()) {
|
8140
8139
|
const r = `/proc/self/fd/${process.stdin.fd}`;
|
8141
8140
|
try {
|
8142
|
-
const o =
|
8141
|
+
const o = em(r);
|
8143
8142
|
if (o === "/dev/zero")
|
8144
8143
|
return K.warn(
|
8145
8144
|
"Detected /dev/zero input, returning empty content to avoid infinite read"
|
@@ -8187,18 +8186,18 @@ async function uy(i = {}) {
|
|
8187
8186
|
}), process.stdin.resume();
|
8188
8187
|
});
|
8189
8188
|
}
|
8190
|
-
async function
|
8191
|
-
const i = await
|
8189
|
+
async function uy() {
|
8190
|
+
const i = await sy();
|
8192
8191
|
if (i.timedOut)
|
8193
8192
|
throw new ds("Timeout while reading from stdin");
|
8194
8193
|
return i.truncated && K.warn(`Warning: stdin input was truncated at ${i.bytesRead} bytes`), i.content;
|
8195
8194
|
}
|
8196
|
-
const Mr = Er.homedir(), { env: Vr } = process, Wn = Vr.XDG_DATA_HOME || (Mr ? me.join(Mr, ".local", "share") : void 0), ps = Vr.XDG_CONFIG_HOME || (Mr ? me.join(Mr, ".config") : void 0),
|
8195
|
+
const Mr = Er.homedir(), { env: Vr } = process, Wn = Vr.XDG_DATA_HOME || (Mr ? me.join(Mr, ".local", "share") : void 0), ps = Vr.XDG_CONFIG_HOME || (Mr ? me.join(Mr, ".config") : void 0), ly = Vr.XDG_STATE_HOME || (Mr ? me.join(Mr, ".local", "state") : void 0), cy = Vr.XDG_CACHE_HOME || (Mr ? me.join(Mr, ".cache") : void 0);
|
8197
8196
|
Vr.XDG_RUNTIME_DIR;
|
8198
|
-
const
|
8199
|
-
Wn &&
|
8200
|
-
const
|
8201
|
-
ps &&
|
8197
|
+
const fy = (Vr.XDG_DATA_DIRS || "/usr/local/share/:/usr/share/").split(":");
|
8198
|
+
Wn && fy.unshift(Wn);
|
8199
|
+
const hy = (Vr.XDG_CONFIG_DIRS || "/etc/xdg").split(":");
|
8200
|
+
ps && hy.unshift(ps);
|
8202
8201
|
const od = me.join(Wn || me.join(Br(), ".local/share"), "amp"), ht = me.join(
|
8203
8202
|
ps || me.join(Br(), ".config"),
|
8204
8203
|
"amp",
|
@@ -8310,15 +8309,15 @@ function Nn(i) {
|
|
8310
8309
|
changes: t
|
8311
8310
|
};
|
8312
8311
|
}
|
8313
|
-
class
|
8312
|
+
class dy {
|
8314
8313
|
/**
|
8315
8314
|
* Collect comprehensive system information
|
8316
8315
|
*/
|
8317
8316
|
async collect() {
|
8318
|
-
const e =
|
8317
|
+
const e = im(), t = am(), n = om(), r = {
|
8319
8318
|
platform: zn(),
|
8320
|
-
version:
|
8321
|
-
architecture:
|
8319
|
+
version: um(),
|
8320
|
+
architecture: sm(),
|
8322
8321
|
memory: {
|
8323
8322
|
total: t,
|
8324
8323
|
free: n,
|
@@ -8357,7 +8356,7 @@ class py {
|
|
8357
8356
|
}
|
8358
8357
|
}
|
8359
8358
|
const Kr = kt(xh);
|
8360
|
-
class
|
8359
|
+
class py {
|
8361
8360
|
/**
|
8362
8361
|
* Collect comprehensive AMP-specific information
|
8363
8362
|
*/
|
@@ -8638,8 +8637,8 @@ class my {
|
|
8638
8637
|
return Ve(e, "amp", "logs", "cli.log");
|
8639
8638
|
}
|
8640
8639
|
}
|
8641
|
-
const
|
8642
|
-
class
|
8640
|
+
const my = kt(vm);
|
8641
|
+
class gy {
|
8643
8642
|
testUrls = [
|
8644
8643
|
"https://ampcode.com",
|
8645
8644
|
"https://sourcegraph.com",
|
@@ -8731,7 +8730,7 @@ class vy {
|
|
8731
8730
|
async testDnsResolution(e) {
|
8732
8731
|
const t = Date.now();
|
8733
8732
|
try {
|
8734
|
-
const n = await
|
8733
|
+
const n = await my(e, { all: !0 }), r = Date.now() - t;
|
8735
8734
|
return {
|
8736
8735
|
domain: e,
|
8737
8736
|
success: !0,
|
@@ -8759,7 +8758,7 @@ class vy {
|
|
8759
8758
|
}
|
8760
8759
|
}
|
8761
8760
|
const pa = kt(xh);
|
8762
|
-
class
|
8761
|
+
class vy {
|
8763
8762
|
testUrls = ["https://ampcode.com", "https://sourcegraph.com"];
|
8764
8763
|
/**
|
8765
8764
|
* Collect SSL certificate information
|
@@ -9003,16 +9002,16 @@ class yy {
|
|
9003
9002
|
return t;
|
9004
9003
|
}
|
9005
9004
|
}
|
9006
|
-
class
|
9007
|
-
systemCollector = new
|
9008
|
-
ampCollector = new
|
9009
|
-
networkCollector = new
|
9010
|
-
sslCollector = new
|
9005
|
+
class yy {
|
9006
|
+
systemCollector = new dy();
|
9007
|
+
ampCollector = new py();
|
9008
|
+
networkCollector = new gy();
|
9009
|
+
sslCollector = new vy();
|
9011
9010
|
/**
|
9012
9011
|
* Generate a complete support bundle
|
9013
9012
|
*/
|
9014
9013
|
async generate(e = {}) {
|
9015
|
-
const t = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-"), n = e.outputDir || process.cwd(), r = await this.collectData(), o =
|
9014
|
+
const t = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-"), n = e.outputDir || process.cwd(), r = await this.collectData(), o = Lp(r), u = Ve(n, `amp-support-bundle-${t}.json.gz`);
|
9016
9015
|
return await this.createBundle(o, u), u;
|
9017
9016
|
}
|
9018
9017
|
/**
|
@@ -9042,8 +9041,8 @@ class by {
|
|
9042
9041
|
* Create compressed bundle file
|
9043
9042
|
*/
|
9044
9043
|
async createBundle(e, t) {
|
9045
|
-
const n = JSON.stringify(e, null, 2), r =
|
9046
|
-
await
|
9044
|
+
const n = JSON.stringify(e, null, 2), r = rm(t), o = fm();
|
9045
|
+
await gm(
|
9047
9046
|
async function* () {
|
9048
9047
|
yield n;
|
9049
9048
|
},
|
@@ -9160,7 +9159,7 @@ Found: `.concat(g.toString().split(`
|
|
9160
9159
|
}, ga;
|
9161
9160
|
}
|
9162
9161
|
var St = { exports: {} }, va = { exports: {} }, ya = { exports: {} }, ba = { exports: {} }, Pl;
|
9163
|
-
function
|
9162
|
+
function by() {
|
9164
9163
|
return Pl || (Pl = 1, function(i) {
|
9165
9164
|
var e = {};
|
9166
9165
|
i.exports = e;
|
@@ -9224,7 +9223,7 @@ function wy() {
|
|
9224
9223
|
}(ba)), ba.exports;
|
9225
9224
|
}
|
9226
9225
|
var wa, Cl;
|
9227
|
-
function
|
9226
|
+
function wy() {
|
9228
9227
|
return Cl || (Cl = 1, wa = function(i, e) {
|
9229
9228
|
e = e || process.argv || [];
|
9230
9229
|
var t = e.indexOf("--"), n = /^-{1,2}/.test(i) ? "" : "--", r = e.indexOf(n + i);
|
@@ -9232,10 +9231,10 @@ function _y() {
|
|
9232
9231
|
}), wa;
|
9233
9232
|
}
|
9234
9233
|
var _a, xl;
|
9235
|
-
function
|
9234
|
+
function _y() {
|
9236
9235
|
if (xl) return _a;
|
9237
9236
|
xl = 1;
|
9238
|
-
var i = Er, e =
|
9237
|
+
var i = Er, e = wy(), t = process.env, n = void 0;
|
9239
9238
|
e("no-color") || e("no-colors") || e("color=false") ? n = !1 : (e("color") || e("colors") || e("color=true") || e("color=always")) && (n = !0), "FORCE_COLOR" in t && (n = t.FORCE_COLOR.length === 0 || parseInt(t.FORCE_COLOR, 10) !== 0);
|
9240
9239
|
function r(l) {
|
9241
9240
|
return l === 0 ? !1 : {
|
@@ -9289,7 +9288,7 @@ function Sy() {
|
|
9289
9288
|
}, _a;
|
9290
9289
|
}
|
9291
9290
|
var Sa = { exports: {} }, Rl;
|
9292
|
-
function
|
9291
|
+
function Sy() {
|
9293
9292
|
return Rl || (Rl = 1, function(i) {
|
9294
9293
|
i.exports = function(t, n) {
|
9295
9294
|
var r = "";
|
@@ -9350,7 +9349,7 @@ function Ey() {
|
|
9350
9349
|
}(Sa)), Sa.exports;
|
9351
9350
|
}
|
9352
9351
|
var Ea = { exports: {} }, Ol;
|
9353
|
-
function
|
9352
|
+
function Ey() {
|
9354
9353
|
return Ol || (Ol = 1, function(i) {
|
9355
9354
|
i.exports = function(t, n) {
|
9356
9355
|
t = t || " he is here ";
|
@@ -9512,7 +9511,7 @@ function Py() {
|
|
9512
9511
|
}(Ea)), Ea.exports;
|
9513
9512
|
}
|
9514
9513
|
var Pa = { exports: {} }, Tl;
|
9515
|
-
function
|
9514
|
+
function Py() {
|
9516
9515
|
return Tl || (Tl = 1, function(i) {
|
9517
9516
|
i.exports = function(e) {
|
9518
9517
|
return function(t, n, r) {
|
@@ -9530,7 +9529,7 @@ function Cy() {
|
|
9530
9529
|
}(Pa)), Pa.exports;
|
9531
9530
|
}
|
9532
9531
|
var Ca = { exports: {} }, Al;
|
9533
|
-
function
|
9532
|
+
function Cy() {
|
9534
9533
|
return Al || (Al = 1, function(i) {
|
9535
9534
|
i.exports = function(e) {
|
9536
9535
|
return function(t, n, r) {
|
@@ -9540,7 +9539,7 @@ function xy() {
|
|
9540
9539
|
}(Ca)), Ca.exports;
|
9541
9540
|
}
|
9542
9541
|
var xa = { exports: {} }, Ll;
|
9543
|
-
function
|
9542
|
+
function xy() {
|
9544
9543
|
return Ll || (Ll = 1, function(i) {
|
9545
9544
|
i.exports = function(e) {
|
9546
9545
|
var t = ["red", "yellow", "green", "blue", "magenta"];
|
@@ -9551,7 +9550,7 @@ function Ry() {
|
|
9551
9550
|
}(xa)), xa.exports;
|
9552
9551
|
}
|
9553
9552
|
var Ra = { exports: {} }, Il;
|
9554
|
-
function
|
9553
|
+
function Ry() {
|
9555
9554
|
return Il || (Il = 1, function(i) {
|
9556
9555
|
i.exports = function(e) {
|
9557
9556
|
var t = [
|
@@ -9580,12 +9579,12 @@ function Oy() {
|
|
9580
9579
|
}(Ra)), Ra.exports;
|
9581
9580
|
}
|
9582
9581
|
var $l;
|
9583
|
-
function
|
9582
|
+
function Oy() {
|
9584
9583
|
return $l || ($l = 1, function(i) {
|
9585
9584
|
var e = {};
|
9586
9585
|
i.exports = e, e.themes = {};
|
9587
|
-
var t = hr, n = e.styles =
|
9588
|
-
e.supportsColor =
|
9586
|
+
var t = hr, n = e.styles = by(), r = Object.defineProperties, o = new RegExp(/[\r\n]+/g);
|
9587
|
+
e.supportsColor = _y().supportsColor, typeof e.enabled > "u" && (e.enabled = e.supportsColor() !== !1), e.enable = function() {
|
9589
9588
|
e.enabled = !0;
|
9590
9589
|
}, e.disable = function() {
|
9591
9590
|
e.enabled = !1;
|
@@ -9666,7 +9665,7 @@ function Ty() {
|
|
9666
9665
|
var p = s.split("");
|
9667
9666
|
return p = p.map(g), p.join("");
|
9668
9667
|
};
|
9669
|
-
e.trap =
|
9668
|
+
e.trap = Sy(), e.zalgo = Ey(), e.maps = {}, e.maps.america = Py()(e), e.maps.zebra = Cy()(e), e.maps.rainbow = xy()(e), e.maps.random = Ry()(e);
|
9670
9669
|
for (var d in e.maps)
|
9671
9670
|
(function(m) {
|
9672
9671
|
e[m] = function(g) {
|
@@ -9679,12 +9678,12 @@ function Ty() {
|
|
9679
9678
|
var Dl;
|
9680
9679
|
function ud() {
|
9681
9680
|
return Dl || (Dl = 1, function(i) {
|
9682
|
-
var e =
|
9681
|
+
var e = Oy();
|
9683
9682
|
i.exports = e;
|
9684
9683
|
}(va)), va.exports;
|
9685
9684
|
}
|
9686
9685
|
var Oa = {}, Ta = {}, Xt = {}, Ml;
|
9687
|
-
function
|
9686
|
+
function Ty() {
|
9688
9687
|
return Ml || (Ml = 1, Xt.levels = {
|
9689
9688
|
error: 0,
|
9690
9689
|
warn: 1,
|
@@ -9710,7 +9709,7 @@ function Ay() {
|
|
9710
9709
|
}), Xt;
|
9711
9710
|
}
|
9712
9711
|
var en = {}, Fl;
|
9713
|
-
function
|
9712
|
+
function Ay() {
|
9714
9713
|
return Fl || (Fl = 1, en.levels = {
|
9715
9714
|
error: 0,
|
9716
9715
|
warn: 1,
|
@@ -9730,7 +9729,7 @@ function Ly() {
|
|
9730
9729
|
}), en;
|
9731
9730
|
}
|
9732
9731
|
var rn = {}, kl;
|
9733
|
-
function
|
9732
|
+
function Ly() {
|
9734
9733
|
return kl || (kl = 1, rn.levels = {
|
9735
9734
|
emerg: 0,
|
9736
9735
|
alert: 1,
|
@@ -9752,14 +9751,14 @@ function Iy() {
|
|
9752
9751
|
}), rn;
|
9753
9752
|
}
|
9754
9753
|
var jl;
|
9755
|
-
function
|
9754
|
+
function Iy() {
|
9756
9755
|
return jl || (jl = 1, function(i) {
|
9757
9756
|
Object.defineProperty(i, "cli", {
|
9758
|
-
value:
|
9757
|
+
value: Ty()
|
9759
9758
|
}), Object.defineProperty(i, "npm", {
|
9760
|
-
value:
|
9759
|
+
value: Ay()
|
9761
9760
|
}), Object.defineProperty(i, "syslog", {
|
9762
|
-
value:
|
9761
|
+
value: Ly()
|
9763
9762
|
});
|
9764
9763
|
}(Ta)), Ta;
|
9765
9764
|
}
|
@@ -9773,7 +9772,7 @@ function De() {
|
|
9773
9772
|
}), Object.defineProperty(i, "SPLAT", {
|
9774
9773
|
value: Symbol.for("splat")
|
9775
9774
|
}), Object.defineProperty(i, "configs", {
|
9776
|
-
value:
|
9775
|
+
value: Iy()
|
9777
9776
|
});
|
9778
9777
|
}(Oa)), Oa;
|
9779
9778
|
}
|
@@ -9873,7 +9872,7 @@ function ks() {
|
|
9873
9872
|
}, St.exports.Colorizer = St.exports.Format = y, St.exports;
|
9874
9873
|
}
|
9875
9874
|
var Aa, Hl;
|
9876
|
-
function
|
9875
|
+
function $y() {
|
9877
9876
|
if (Hl) return Aa;
|
9878
9877
|
Hl = 1;
|
9879
9878
|
var i = ks(), e = i.Colorizer;
|
@@ -9882,7 +9881,7 @@ function Dy() {
|
|
9882
9881
|
}, Aa;
|
9883
9882
|
}
|
9884
9883
|
var La, Ul;
|
9885
|
-
function
|
9884
|
+
function Dy() {
|
9886
9885
|
if (Ul) return La;
|
9887
9886
|
Ul = 1;
|
9888
9887
|
var i = Xe();
|
@@ -10022,7 +10021,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
10022
10021
|
}, Et.exports.Padder = Et.exports.Format = g, Et.exports;
|
10023
10022
|
}
|
10024
10023
|
var zl;
|
10025
|
-
function
|
10024
|
+
function My() {
|
10026
10025
|
if (zl) return tn.exports;
|
10027
10026
|
zl = 1;
|
10028
10027
|
function i(d) {
|
@@ -10076,7 +10075,7 @@ function Fy() {
|
|
10076
10075
|
}, tn.exports.Format = h, tn.exports;
|
10077
10076
|
}
|
10078
10077
|
var nn = { exports: {} }, Vl;
|
10079
|
-
function
|
10078
|
+
function Fy() {
|
10080
10079
|
if (Vl) return nn.exports;
|
10081
10080
|
Vl = 1;
|
10082
10081
|
var i = Xe();
|
@@ -10103,7 +10102,7 @@ function ky() {
|
|
10103
10102
|
}, nn.exports.cascade = e, nn.exports;
|
10104
10103
|
}
|
10105
10104
|
var Ia, Wl;
|
10106
|
-
function
|
10105
|
+
function ky() {
|
10107
10106
|
if (Wl) return Ia;
|
10108
10107
|
Wl = 1;
|
10109
10108
|
function i(a) {
|
@@ -10546,7 +10545,7 @@ ${H}`), L.pop(), `{${W}}`;
|
|
10546
10545
|
}(an, an.exports)), an.exports;
|
10547
10546
|
}
|
10548
10547
|
var $a, Kl;
|
10549
|
-
function
|
10548
|
+
function jy() {
|
10550
10549
|
if (Kl) return $a;
|
10551
10550
|
Kl = 1;
|
10552
10551
|
var i = Xe(), e = De(), t = e.MESSAGE, n = qt();
|
@@ -10559,7 +10558,7 @@ function qy() {
|
|
10559
10558
|
}), $a;
|
10560
10559
|
}
|
10561
10560
|
var Da, Jl;
|
10562
|
-
function
|
10561
|
+
function qy() {
|
10563
10562
|
if (Jl) return Da;
|
10564
10563
|
Jl = 1;
|
10565
10564
|
var i = Xe();
|
@@ -10568,7 +10567,7 @@ function Ny() {
|
|
10568
10567
|
}), Da;
|
10569
10568
|
}
|
10570
10569
|
var Ma, Yl;
|
10571
|
-
function
|
10570
|
+
function Ny() {
|
10572
10571
|
if (Yl) return Ma;
|
10573
10572
|
Yl = 1;
|
10574
10573
|
var i = Xe(), e = De(), t = e.MESSAGE, n = qt();
|
@@ -10578,7 +10577,7 @@ function Hy() {
|
|
10578
10577
|
}), Ma;
|
10579
10578
|
}
|
10580
10579
|
var Fa, Ql;
|
10581
|
-
function
|
10580
|
+
function Hy() {
|
10582
10581
|
if (Ql) return Fa;
|
10583
10582
|
Ql = 1;
|
10584
10583
|
function i(l) {
|
@@ -10628,7 +10627,7 @@ function Uy() {
|
|
10628
10627
|
}), Fa;
|
10629
10628
|
}
|
10630
10629
|
var ka, Zl;
|
10631
|
-
function
|
10630
|
+
function Uy() {
|
10632
10631
|
if (Zl) return ka;
|
10633
10632
|
Zl = 1;
|
10634
10633
|
var i = 1e3, e = i * 60, t = e * 60, n = t * 24, r = n * 7, o = n * 365.25;
|
@@ -10710,17 +10709,17 @@ function By() {
|
|
10710
10709
|
return ka;
|
10711
10710
|
}
|
10712
10711
|
var ja, Xl;
|
10713
|
-
function
|
10712
|
+
function By() {
|
10714
10713
|
if (Xl) return ja;
|
10715
10714
|
Xl = 1;
|
10716
|
-
var i = void 0, e = Xe(), t =
|
10715
|
+
var i = void 0, e = Xe(), t = Uy();
|
10717
10716
|
return ja = e(function(n) {
|
10718
10717
|
var r = +/* @__PURE__ */ new Date();
|
10719
10718
|
return i.diff = r - (i.prevTime || r), i.prevTime = r, n.ms = "+".concat(t(i.diff)), n;
|
10720
10719
|
}), ja;
|
10721
10720
|
}
|
10722
10721
|
var qa, ec;
|
10723
|
-
function
|
10722
|
+
function zy() {
|
10724
10723
|
if (ec) return qa;
|
10725
10724
|
ec = 1;
|
10726
10725
|
var i = hr.inspect, e = Xe(), t = De(), n = t.LEVEL, r = t.MESSAGE, o = t.SPLAT;
|
@@ -10730,7 +10729,7 @@ function Vy() {
|
|
10730
10729
|
}), qa;
|
10731
10730
|
}
|
10732
10731
|
var Pt = { exports: {} }, rc;
|
10733
|
-
function
|
10732
|
+
function Vy() {
|
10734
10733
|
if (rc) return Pt.exports;
|
10735
10734
|
rc = 1;
|
10736
10735
|
function i(c) {
|
@@ -10783,7 +10782,7 @@ function Wy() {
|
|
10783
10782
|
}, Pt.exports.Printf = Pt.exports.Format = a, Pt.exports;
|
10784
10783
|
}
|
10785
10784
|
var Na, tc;
|
10786
|
-
function
|
10785
|
+
function Wy() {
|
10787
10786
|
if (tc) return Na;
|
10788
10787
|
tc = 1;
|
10789
10788
|
var i = Xe(), e = De(), t = e.MESSAGE, n = qt();
|
@@ -10797,7 +10796,7 @@ function Gy() {
|
|
10797
10796
|
}), Na;
|
10798
10797
|
}
|
10799
10798
|
var Ha, nc;
|
10800
|
-
function
|
10799
|
+
function Gy() {
|
10801
10800
|
if (nc) return Ha;
|
10802
10801
|
nc = 1;
|
10803
10802
|
function i(p) {
|
@@ -10903,7 +10902,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
10903
10902
|
return new s(p);
|
10904
10903
|
}, Ha;
|
10905
10904
|
}
|
10906
|
-
var cd = /d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g, Or = "\\d\\d?", Rr = "\\d\\d",
|
10905
|
+
var cd = /d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g, Or = "\\d\\d?", Rr = "\\d\\d", Ky = "\\d{3}", Jy = "\\d{4}", Lt = "[^\\s]+", fd = /\[([^]*?)\]/gm;
|
10907
10906
|
function hd(i, e) {
|
10908
10907
|
for (var t = [], n = 0, r = i.length; n < r; n++)
|
10909
10908
|
t.push(i[n].substr(0, e));
|
@@ -10948,10 +10947,10 @@ var dd = [
|
|
10948
10947
|
"October",
|
10949
10948
|
"November",
|
10950
10949
|
"December"
|
10951
|
-
],
|
10952
|
-
dayNamesShort:
|
10950
|
+
], Yy = hd(pd, 3), Qy = hd(dd, 3), js = {
|
10951
|
+
dayNamesShort: Qy,
|
10953
10952
|
dayNames: dd,
|
10954
|
-
monthNamesShort:
|
10953
|
+
monthNamesShort: Yy,
|
10955
10954
|
monthNames: pd,
|
10956
10955
|
amPm: ["am", "pm"],
|
10957
10956
|
DoFn: function(i) {
|
@@ -10965,7 +10964,7 @@ var dd = [
|
|
10965
10964
|
for (e === void 0 && (e = 2), i = String(i); i.length < e; )
|
10966
10965
|
i = "0" + i;
|
10967
10966
|
return i;
|
10968
|
-
},
|
10967
|
+
}, Zy = {
|
10969
10968
|
D: function(i) {
|
10970
10969
|
return String(i.getDate());
|
10971
10970
|
},
|
@@ -11072,7 +11071,7 @@ var dd = [
|
|
11072
11071
|
}
|
11073
11072
|
return 0;
|
11074
11073
|
}
|
11075
|
-
],
|
11074
|
+
], Xy = {
|
11076
11075
|
D: ["day", Or],
|
11077
11076
|
DD: ["day", Rr],
|
11078
11077
|
Do: ["day", Or + Lt, function(i) {
|
@@ -11096,14 +11095,14 @@ var dd = [
|
|
11096
11095
|
mm: ["minute", Rr],
|
11097
11096
|
s: ["second", Or],
|
11098
11097
|
ss: ["second", Rr],
|
11099
|
-
YYYY: ["year",
|
11098
|
+
YYYY: ["year", Jy],
|
11100
11099
|
S: ["millisecond", "\\d", function(i) {
|
11101
11100
|
return +i * 100;
|
11102
11101
|
}],
|
11103
11102
|
SS: ["millisecond", Rr, function(i) {
|
11104
11103
|
return +i * 10;
|
11105
11104
|
}],
|
11106
|
-
SSS: ["millisecond",
|
11105
|
+
SSS: ["millisecond", Ky],
|
11107
11106
|
d: sc,
|
11108
11107
|
dd: sc,
|
11109
11108
|
ddd: uc,
|
@@ -11137,7 +11136,7 @@ var dd = [
|
|
11137
11136
|
});
|
11138
11137
|
var r = Fr(Fr({}, Gn), t);
|
11139
11138
|
return e = e.replace(cd, function(o) {
|
11140
|
-
return
|
11139
|
+
return Zy[o](i, r);
|
11141
11140
|
}), e.replace(/@@@/g, function() {
|
11142
11141
|
return n.shift();
|
11143
11142
|
});
|
@@ -11161,7 +11160,7 @@ function yd(i, e, t) {
|
|
11161
11160
|
return u.push(ac(_)), "@@@";
|
11162
11161
|
}), a = {}, c = {};
|
11163
11162
|
l = ac(l).replace(cd, function(w) {
|
11164
|
-
var _ =
|
11163
|
+
var _ = Xy[w], x = _[0], $ = _[1], T = _[3];
|
11165
11164
|
if (a[x])
|
11166
11165
|
throw new Error("Invalid format. " + x + " specified twice in format");
|
11167
11166
|
return a[x] = !0, T && (c[T] = !0), o.push(_), "(" + $ + ")";
|
@@ -11197,35 +11196,35 @@ function yd(i, e, t) {
|
|
11197
11196
|
return null;
|
11198
11197
|
return s;
|
11199
11198
|
}
|
11200
|
-
var
|
11199
|
+
var e0 = {
|
11201
11200
|
format: vd,
|
11202
11201
|
parse: yd,
|
11203
11202
|
defaultI18n: js,
|
11204
11203
|
setGlobalDateI18n: md,
|
11205
11204
|
setGlobalDateMasks: gd
|
11206
11205
|
};
|
11207
|
-
const
|
11206
|
+
const r0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
11208
11207
|
__proto__: null,
|
11209
11208
|
assign: Fr,
|
11210
|
-
default:
|
11209
|
+
default: e0,
|
11211
11210
|
defaultI18n: js,
|
11212
11211
|
format: vd,
|
11213
11212
|
parse: yd,
|
11214
11213
|
setGlobalDateI18n: md,
|
11215
11214
|
setGlobalDateMasks: gd
|
11216
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
11215
|
+
}, Symbol.toStringTag, { value: "Module" })), t0 = /* @__PURE__ */ Ip(r0);
|
11217
11216
|
var Ua, fc;
|
11218
|
-
function
|
11217
|
+
function n0() {
|
11219
11218
|
if (fc) return Ua;
|
11220
11219
|
fc = 1;
|
11221
|
-
var i =
|
11220
|
+
var i = t0, e = Xe();
|
11222
11221
|
return Ua = e(function(t) {
|
11223
11222
|
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
11224
11223
|
return n.format && (t.timestamp = typeof n.format == "function" ? n.format() : i.format(/* @__PURE__ */ new Date(), n.format)), t.timestamp || (t.timestamp = (/* @__PURE__ */ new Date()).toISOString()), n.alias && (t[n.alias] = t.timestamp), t;
|
11225
11224
|
}), Ua;
|
11226
11225
|
}
|
11227
11226
|
var Ba, hc;
|
11228
|
-
function
|
11227
|
+
function i0() {
|
11229
11228
|
if (hc) return Ba;
|
11230
11229
|
hc = 1;
|
11231
11230
|
var i = ud(), e = Xe(), t = De(), n = t.MESSAGE;
|
@@ -11238,40 +11237,40 @@ function bd() {
|
|
11238
11237
|
if (dc) return Zt;
|
11239
11238
|
dc = 1;
|
11240
11239
|
var i = Zt.format = Xe();
|
11241
|
-
return Zt.levels =
|
11242
|
-
value:
|
11240
|
+
return Zt.levels = $y(), Object.defineProperty(i, "align", {
|
11241
|
+
value: Dy()
|
11243
11242
|
}), Object.defineProperty(i, "cli", {
|
11244
|
-
value:
|
11243
|
+
value: My()
|
11245
11244
|
}), Object.defineProperty(i, "colorize", {
|
11246
11245
|
value: ks()
|
11247
11246
|
}), Object.defineProperty(i, "combine", {
|
11248
|
-
value:
|
11247
|
+
value: Fy()
|
11249
11248
|
}), Object.defineProperty(i, "errors", {
|
11250
|
-
value:
|
11249
|
+
value: ky()
|
11251
11250
|
}), Object.defineProperty(i, "json", {
|
11252
|
-
value:
|
11251
|
+
value: jy()
|
11253
11252
|
}), Object.defineProperty(i, "label", {
|
11254
|
-
value:
|
11253
|
+
value: qy()
|
11255
11254
|
}), Object.defineProperty(i, "logstash", {
|
11256
|
-
value:
|
11255
|
+
value: Ny()
|
11257
11256
|
}), Object.defineProperty(i, "metadata", {
|
11258
|
-
value:
|
11257
|
+
value: Hy()
|
11259
11258
|
}), Object.defineProperty(i, "ms", {
|
11260
|
-
value:
|
11259
|
+
value: By()
|
11261
11260
|
}), Object.defineProperty(i, "padLevels", {
|
11262
11261
|
value: ld()
|
11263
11262
|
}), Object.defineProperty(i, "prettyPrint", {
|
11264
|
-
value:
|
11263
|
+
value: zy()
|
11265
11264
|
}), Object.defineProperty(i, "printf", {
|
11266
|
-
value:
|
11265
|
+
value: Vy()
|
11267
11266
|
}), Object.defineProperty(i, "simple", {
|
11268
|
-
value:
|
11267
|
+
value: Wy()
|
11269
11268
|
}), Object.defineProperty(i, "splat", {
|
11270
|
-
value:
|
11269
|
+
value: Gy()
|
11271
11270
|
}), Object.defineProperty(i, "timestamp", {
|
11272
|
-
value:
|
11271
|
+
value: n0()
|
11273
11272
|
}), Object.defineProperty(i, "uncolorize", {
|
11274
|
-
value:
|
11273
|
+
value: i0()
|
11275
11274
|
}), Zt;
|
11276
11275
|
}
|
11277
11276
|
var za = {}, pc;
|
@@ -11307,11 +11306,11 @@ function wd() {
|
|
11307
11306
|
};
|
11308
11307
|
}(za)), za;
|
11309
11308
|
}
|
11310
|
-
const
|
11311
|
-
version:
|
11309
|
+
const a0 = "3.17.0", o0 = {
|
11310
|
+
version: a0
|
11312
11311
|
};
|
11313
11312
|
var Va = {}, on = { exports: {} }, Wa = { exports: {} }, Ga, mc;
|
11314
|
-
function
|
11313
|
+
function s0() {
|
11315
11314
|
if (mc) return Ga;
|
11316
11315
|
mc = 1, Ga = i;
|
11317
11316
|
function i(t, n) {
|
@@ -11480,7 +11479,7 @@ function Nt() {
|
|
11480
11479
|
}), sn.exports;
|
11481
11480
|
}
|
11482
11481
|
var Za, _c;
|
11483
|
-
function
|
11482
|
+
function u0() {
|
11484
11483
|
if (_c) return Za;
|
11485
11484
|
_c = 1;
|
11486
11485
|
function i(d, m) {
|
@@ -11647,7 +11646,7 @@ function l0() {
|
|
11647
11646
|
var Xa = {}, un = { exports: {} };
|
11648
11647
|
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
11649
11648
|
var Sc;
|
11650
|
-
function
|
11649
|
+
function l0() {
|
11651
11650
|
return Sc || (Sc = 1, function(i, e) {
|
11652
11651
|
var t = ti, n = t.Buffer;
|
11653
11652
|
function r(u, l) {
|
@@ -11682,7 +11681,7 @@ var Ec;
|
|
11682
11681
|
function Pc() {
|
11683
11682
|
if (Ec) return Xa;
|
11684
11683
|
Ec = 1;
|
11685
|
-
var i =
|
11684
|
+
var i = l0().Buffer, e = i.isEncoding || function(s) {
|
11686
11685
|
switch (s = "" + s, s && s.toLowerCase()) {
|
11687
11686
|
case "hex":
|
11688
11687
|
case "utf8":
|
@@ -11884,7 +11883,7 @@ function qs() {
|
|
11884
11883
|
return eo = r, eo;
|
11885
11884
|
}
|
11886
11885
|
var ro, xc;
|
11887
|
-
function
|
11886
|
+
function c0() {
|
11888
11887
|
if (xc) return ro;
|
11889
11888
|
xc = 1;
|
11890
11889
|
var i;
|
@@ -12010,7 +12009,7 @@ function f0() {
|
|
12010
12009
|
return ro = p, ro;
|
12011
12010
|
}
|
12012
12011
|
var to, Rc;
|
12013
|
-
function
|
12012
|
+
function f0() {
|
12014
12013
|
return Rc || (Rc = 1, to = function() {
|
12015
12014
|
throw new Error("Readable.from is not available in the browser");
|
12016
12015
|
}), to;
|
@@ -12034,7 +12033,7 @@ function Pd() {
|
|
12034
12033
|
var l = hr, a;
|
12035
12034
|
l && l.debuglog ? a = l.debuglog("stream") : a = function() {
|
12036
12035
|
};
|
12037
|
-
var c =
|
12036
|
+
var c = u0(), f = Sd(), y = Ed(), v = y.getHighWaterMark, h = dt().codes, d = h.ERR_INVALID_ARG_TYPE, m = h.ERR_STREAM_PUSH_AFTER_EOF, g = h.ERR_METHOD_NOT_IMPLEMENTED, s = h.ERR_STREAM_UNSHIFT_AFTER_END_EVENT, p, b, w;
|
12038
12037
|
Nt()(P, t);
|
12039
12038
|
var _ = f.errorOrDestroy, x = ["error", "close", "destroy", "pause", "resume"];
|
12040
12039
|
function $(I, F, Z) {
|
@@ -12291,7 +12290,7 @@ function Pd() {
|
|
12291
12290
|
a("wrapped _read", se), te && (te = !1, I.resume());
|
12292
12291
|
}, this;
|
12293
12292
|
}, typeof Symbol == "function" && (P.prototype[Symbol.asyncIterator] = function() {
|
12294
|
-
return b === void 0 && (b =
|
12293
|
+
return b === void 0 && (b = c0()), b(this);
|
12295
12294
|
}), Object.defineProperty(P.prototype, "readableHighWaterMark", {
|
12296
12295
|
// making it explicit this property is not enumerable
|
12297
12296
|
// because otherwise some prototype manipulation in
|
@@ -12344,7 +12343,7 @@ function Pd() {
|
|
12344
12343
|
}
|
12345
12344
|
}
|
12346
12345
|
typeof Symbol == "function" && (P.from = function(I, F) {
|
12347
|
-
return w === void 0 && (w =
|
12346
|
+
return w === void 0 && (w = f0()), w(P, I, F);
|
12348
12347
|
});
|
12349
12348
|
function G(I, F) {
|
12350
12349
|
for (var Z = 0, te = I.length; Z < te; Z++)
|
@@ -12430,7 +12429,7 @@ function di() {
|
|
12430
12429
|
var e;
|
12431
12430
|
T.WritableState = x;
|
12432
12431
|
var t = {
|
12433
|
-
deprecate:
|
12432
|
+
deprecate: s0()
|
12434
12433
|
}, n = _d(), r = ti.Buffer, o = (typeof ut < "u" ? ut : typeof window < "u" ? window : typeof self < "u" ? self : {}).Uint8Array || function() {
|
12435
12434
|
};
|
12436
12435
|
function u(O) {
|
@@ -12710,7 +12709,7 @@ function Cd() {
|
|
12710
12709
|
}, Wa.exports;
|
12711
12710
|
}
|
12712
12711
|
var oo = { exports: {} }, Ic;
|
12713
|
-
function
|
12712
|
+
function h0() {
|
12714
12713
|
if (Ic) return oo.exports;
|
12715
12714
|
Ic = 1;
|
12716
12715
|
var i = hr, e = De(), t = e.LEVEL, n = Cd(), r = oo.exports = function() {
|
@@ -12740,10 +12739,10 @@ function d0() {
|
|
12740
12739
|
}
|
12741
12740
|
var $c;
|
12742
12741
|
function Ht() {
|
12743
|
-
return $c || ($c = 1, on.exports = Cd(), on.exports.LegacyTransportStream =
|
12742
|
+
return $c || ($c = 1, on.exports = Cd(), on.exports.LegacyTransportStream = h0()), on.exports;
|
12744
12743
|
}
|
12745
12744
|
var so, Dc;
|
12746
|
-
function
|
12745
|
+
function d0() {
|
12747
12746
|
if (Dc) return so;
|
12748
12747
|
Dc = 1;
|
12749
12748
|
function i(p) {
|
@@ -12873,7 +12872,7 @@ function Ns() {
|
|
12873
12872
|
}(fn, fn.exports)), fn.exports;
|
12874
12873
|
}
|
12875
12874
|
var lr = {}, hn = { exports: {} }, dn = { exports: {} }, Fc;
|
12876
|
-
function
|
12875
|
+
function p0() {
|
12877
12876
|
return Fc || (Fc = 1, function(i, e) {
|
12878
12877
|
Object.defineProperty(e, "__esModule", {
|
12879
12878
|
value: !0
|
@@ -12886,7 +12885,7 @@ function m0() {
|
|
12886
12885
|
}(dn, dn.exports)), dn.exports;
|
12887
12886
|
}
|
12888
12887
|
var vr = {}, kc;
|
12889
|
-
function
|
12888
|
+
function m0() {
|
12890
12889
|
if (kc) return vr;
|
12891
12890
|
kc = 1, Object.defineProperty(vr, "__esModule", {
|
12892
12891
|
value: !0
|
@@ -12902,12 +12901,12 @@ function g0() {
|
|
12902
12901
|
return i ? o = queueMicrotask : e ? o = setImmediate : t ? o = process.nextTick : o = n, vr.default = r(o), vr;
|
12903
12902
|
}
|
12904
12903
|
var jc;
|
12905
|
-
function
|
12904
|
+
function g0() {
|
12906
12905
|
return jc || (jc = 1, function(i, e) {
|
12907
12906
|
Object.defineProperty(e, "__esModule", {
|
12908
12907
|
value: !0
|
12909
12908
|
}), e.default = a;
|
12910
|
-
var t =
|
12909
|
+
var t = p0(), n = l(t), r = m0(), o = l(r), u = pt();
|
12911
12910
|
function l(y) {
|
12912
12911
|
return y && y.__esModule ? y : { default: y };
|
12913
12912
|
}
|
@@ -12952,7 +12951,7 @@ function pt() {
|
|
12952
12951
|
qc = 1, Object.defineProperty(lr, "__esModule", {
|
12953
12952
|
value: !0
|
12954
12953
|
}), lr.isAsyncIterable = lr.isAsyncGenerator = lr.isAsync = void 0;
|
12955
|
-
var i =
|
12954
|
+
var i = g0(), e = t(i);
|
12956
12955
|
function t(l) {
|
12957
12956
|
return l && l.__esModule ? l : { default: l };
|
12958
12957
|
}
|
@@ -12993,7 +12992,7 @@ function Ut() {
|
|
12993
12992
|
}(pn, pn.exports)), pn.exports;
|
12994
12993
|
}
|
12995
12994
|
var Hc;
|
12996
|
-
function
|
12995
|
+
function v0() {
|
12997
12996
|
return Hc || (Hc = 1, function(i, e) {
|
12998
12997
|
Object.defineProperty(e, "__esModule", {
|
12999
12998
|
value: !0
|
@@ -13031,7 +13030,7 @@ function xd() {
|
|
13031
13030
|
}(yn, yn.exports)), yn.exports;
|
13032
13031
|
}
|
13033
13032
|
var bn = { exports: {} }, wn = { exports: {} }, Bc;
|
13034
|
-
function
|
13033
|
+
function y0() {
|
13035
13034
|
return Bc || (Bc = 1, function(i, e) {
|
13036
13035
|
Object.defineProperty(e, "__esModule", {
|
13037
13036
|
value: !0
|
@@ -13041,12 +13040,12 @@ function b0() {
|
|
13041
13040
|
}(wn, wn.exports)), wn.exports;
|
13042
13041
|
}
|
13043
13042
|
var zc;
|
13044
|
-
function
|
13043
|
+
function b0() {
|
13045
13044
|
return zc || (zc = 1, function(i, e) {
|
13046
13045
|
Object.defineProperty(e, "__esModule", {
|
13047
13046
|
value: !0
|
13048
13047
|
}), e.default = f;
|
13049
|
-
var t = Ns(), n = u(t), r =
|
13048
|
+
var t = Ns(), n = u(t), r = y0(), o = u(r);
|
13050
13049
|
function u(y) {
|
13051
13050
|
return y && y.__esModule ? y : { default: y };
|
13052
13051
|
}
|
@@ -13106,7 +13105,7 @@ function Hs() {
|
|
13106
13105
|
}(En, En.exports)), En.exports;
|
13107
13106
|
}
|
13108
13107
|
var Gc;
|
13109
|
-
function
|
13108
|
+
function w0() {
|
13110
13109
|
return Gc || (Gc = 1, function(i, e) {
|
13111
13110
|
Object.defineProperty(e, "__esModule", {
|
13112
13111
|
value: !0
|
@@ -13149,12 +13148,12 @@ function _0() {
|
|
13149
13148
|
}(Sn, Sn.exports)), Sn.exports;
|
13150
13149
|
}
|
13151
13150
|
var Kc;
|
13152
|
-
function
|
13151
|
+
function _0() {
|
13153
13152
|
return Kc || (Kc = 1, function(i, e) {
|
13154
13153
|
Object.defineProperty(e, "__esModule", {
|
13155
13154
|
value: !0
|
13156
13155
|
});
|
13157
|
-
var t = xd(), n = h(t), r =
|
13156
|
+
var t = xd(), n = h(t), r = b0(), o = h(r), u = Rd(), l = h(u), a = pt(), c = w0(), f = h(c), y = Hs(), v = h(y);
|
13158
13157
|
function h(d) {
|
13159
13158
|
return d && d.__esModule ? d : { default: d };
|
13160
13159
|
}
|
@@ -13201,7 +13200,7 @@ function Od() {
|
|
13201
13200
|
Object.defineProperty(e, "__esModule", {
|
13202
13201
|
value: !0
|
13203
13202
|
});
|
13204
|
-
var t =
|
13203
|
+
var t = _0(), n = a(t), r = pt(), o = a(r), u = Ut(), l = a(u);
|
13205
13204
|
function a(f) {
|
13206
13205
|
return f && f.__esModule ? f : { default: f };
|
13207
13206
|
}
|
@@ -13212,7 +13211,7 @@ function Od() {
|
|
13212
13211
|
}(gn, gn.exports)), gn.exports;
|
13213
13212
|
}
|
13214
13213
|
var Yc;
|
13215
|
-
function
|
13214
|
+
function S0() {
|
13216
13215
|
return Yc || (Yc = 1, function(i, e) {
|
13217
13216
|
Object.defineProperty(e, "__esModule", {
|
13218
13217
|
value: !0
|
@@ -13228,12 +13227,12 @@ function E0() {
|
|
13228
13227
|
}(mn, mn.exports)), mn.exports;
|
13229
13228
|
}
|
13230
13229
|
var Qc;
|
13231
|
-
function
|
13230
|
+
function E0() {
|
13232
13231
|
return Qc || (Qc = 1, function(i, e) {
|
13233
13232
|
Object.defineProperty(e, "__esModule", {
|
13234
13233
|
value: !0
|
13235
13234
|
}), e.default = l;
|
13236
|
-
var t =
|
13235
|
+
var t = v0(), n = u(t), r = S0(), o = u(r);
|
13237
13236
|
function u(a) {
|
13238
13237
|
return a && a.__esModule ? a : { default: a };
|
13239
13238
|
}
|
@@ -13303,7 +13302,7 @@ function Td() {
|
|
13303
13302
|
return uo;
|
13304
13303
|
}
|
13305
13304
|
var lo, Xc;
|
13306
|
-
function
|
13305
|
+
function P0() {
|
13307
13306
|
if (Xc) return lo;
|
13308
13307
|
Xc = 1, lo = e;
|
13309
13308
|
var i = Td();
|
@@ -13317,7 +13316,7 @@ function C0() {
|
|
13317
13316
|
}, lo;
|
13318
13317
|
}
|
13319
13318
|
var co, ef;
|
13320
|
-
function
|
13319
|
+
function C0() {
|
13321
13320
|
if (ef) return co;
|
13322
13321
|
ef = 1;
|
13323
13322
|
var i;
|
@@ -13383,7 +13382,7 @@ function x0() {
|
|
13383
13382
|
var rf;
|
13384
13383
|
function mt() {
|
13385
13384
|
return rf || (rf = 1, function(i, e) {
|
13386
|
-
e = i.exports = Pd(), e.Stream = e, e.Readable = e, e.Writable = di(), e.Duplex = ct(), e.Transform = Td(), e.PassThrough =
|
13385
|
+
e = i.exports = Pd(), e.Stream = e, e.Readable = e, e.Writable = di(), e.Duplex = ct(), e.Transform = Td(), e.PassThrough = P0(), e.finished = qs(), e.pipeline = C0();
|
13387
13386
|
}(Pn, Pn.exports)), Pn.exports;
|
13388
13387
|
}
|
13389
13388
|
var Cn = { exports: {} }, fo, tf;
|
@@ -13450,7 +13449,7 @@ function Ad() {
|
|
13450
13449
|
}, fo;
|
13451
13450
|
}
|
13452
13451
|
var ho, nf;
|
13453
|
-
function
|
13452
|
+
function x0() {
|
13454
13453
|
if (nf) return ho;
|
13455
13454
|
nf = 1;
|
13456
13455
|
var i = Ad(), e = i(function t(n, r) {
|
@@ -13459,16 +13458,16 @@ function R0() {
|
|
13459
13458
|
return ho = e, ho;
|
13460
13459
|
}
|
13461
13460
|
var po = { exports: {} }, mo = { exports: {} }, go, af;
|
13462
|
-
function
|
13461
|
+
function R0() {
|
13463
13462
|
return af || (af = 1, go = function(e) {
|
13464
13463
|
return !e || typeof e == "string" ? !1 : e instanceof Array || Array.isArray(e) || e.length >= 0 && (e.splice instanceof Function || Object.getOwnPropertyDescriptor(e, e.length - 1) && e.constructor.name !== "String");
|
13465
13464
|
}), go;
|
13466
13465
|
}
|
13467
13466
|
var of;
|
13468
|
-
function
|
13467
|
+
function O0() {
|
13469
13468
|
if (of) return mo.exports;
|
13470
13469
|
of = 1;
|
13471
|
-
var i =
|
13470
|
+
var i = R0(), e = Array.prototype.concat, t = Array.prototype.slice, n = mo.exports = function(o) {
|
13472
13471
|
for (var u = [], l = 0, a = o.length; l < a; l++) {
|
13473
13472
|
var c = o[l];
|
13474
13473
|
i(c) ? u = e.call(u, t.call(c)) : u.push(c);
|
@@ -13482,10 +13481,10 @@ function T0() {
|
|
13482
13481
|
}, mo.exports;
|
13483
13482
|
}
|
13484
13483
|
var sf;
|
13485
|
-
function
|
13484
|
+
function T0() {
|
13486
13485
|
if (sf) return po.exports;
|
13487
13486
|
sf = 1;
|
13488
|
-
var i =
|
13487
|
+
var i = $p(), e = O0(), t = Object.hasOwnProperty, n = /* @__PURE__ */ Object.create(null);
|
13489
13488
|
for (var r in i)
|
13490
13489
|
t.call(i, r) && (n[i[r]] = r);
|
13491
13490
|
var o = po.exports = {
|
@@ -13578,7 +13577,7 @@ function A0() {
|
|
13578
13577
|
return po.exports;
|
13579
13578
|
}
|
13580
13579
|
var vo = { exports: {} }, yo, uf;
|
13581
|
-
function
|
13580
|
+
function A0() {
|
13582
13581
|
return uf || (uf = 1, yo = {
|
13583
13582
|
aliceblue: [240, 248, 255],
|
13584
13583
|
antiquewhite: [250, 235, 215],
|
@@ -13734,7 +13733,7 @@ var lf;
|
|
13734
13733
|
function Ld() {
|
13735
13734
|
if (lf) return vo.exports;
|
13736
13735
|
lf = 1;
|
13737
|
-
var i =
|
13736
|
+
var i = A0(), e = {};
|
13738
13737
|
for (var t in i)
|
13739
13738
|
i.hasOwnProperty(t) && (e[i[t]] = t);
|
13740
13739
|
var n = vo.exports = {
|
@@ -13999,7 +13998,7 @@ function Ld() {
|
|
13999
13998
|
}, vo.exports;
|
14000
13999
|
}
|
14001
14000
|
var bo, cf;
|
14002
|
-
function
|
14001
|
+
function L0() {
|
14003
14002
|
if (cf) return bo;
|
14004
14003
|
cf = 1;
|
14005
14004
|
var i = Ld();
|
@@ -14041,10 +14040,10 @@ function I0() {
|
|
14041
14040
|
}, bo;
|
14042
14041
|
}
|
14043
14042
|
var wo, ff;
|
14044
|
-
function
|
14043
|
+
function I0() {
|
14045
14044
|
if (ff) return wo;
|
14046
14045
|
ff = 1;
|
14047
|
-
var i = Ld(), e =
|
14046
|
+
var i = Ld(), e = L0(), t = {}, n = Object.keys(i);
|
14048
14047
|
function r(u) {
|
14049
14048
|
var l = function(a) {
|
14050
14049
|
return a == null ? a : (arguments.length > 1 && (a = Array.prototype.slice.call(arguments)), u(a));
|
@@ -14074,10 +14073,10 @@ function $0() {
|
|
14074
14073
|
}), wo = t, wo;
|
14075
14074
|
}
|
14076
14075
|
var _o, hf;
|
14077
|
-
function
|
14076
|
+
function $0() {
|
14078
14077
|
if (hf) return _o;
|
14079
14078
|
hf = 1;
|
14080
|
-
var i =
|
14079
|
+
var i = T0(), e = I0(), t = [].slice, n = [
|
14081
14080
|
// to be honest, I don't really feel like keyword belongs in color convert, but eh.
|
14082
14081
|
"keyword",
|
14083
14082
|
// gray conflicts with some method names, and has its own method defined.
|
@@ -14332,7 +14331,7 @@ function D0() {
|
|
14332
14331
|
return _o = u, _o;
|
14333
14332
|
}
|
14334
14333
|
var So, df;
|
14335
|
-
function
|
14334
|
+
function D0() {
|
14336
14335
|
return df || (df = 1, So = function(e) {
|
14337
14336
|
for (var t = 0, n = 0; t < e.length; n = e.charCodeAt(t++) + ((n << 5) - n)) ;
|
14338
14337
|
var r = Math.floor(
|
@@ -14344,10 +14343,10 @@ function M0() {
|
|
14344
14343
|
}), So;
|
14345
14344
|
}
|
14346
14345
|
var Eo, pf;
|
14347
|
-
function
|
14346
|
+
function M0() {
|
14348
14347
|
if (pf) return Eo;
|
14349
14348
|
pf = 1;
|
14350
|
-
var i =
|
14349
|
+
var i = $0(), e = D0();
|
14351
14350
|
return Eo = function(n, r) {
|
14352
14351
|
var o = n.split(r || ":"), u = e(o[0]);
|
14353
14352
|
if (!o.length) return u;
|
@@ -14357,10 +14356,10 @@ function F0() {
|
|
14357
14356
|
}, Eo;
|
14358
14357
|
}
|
14359
14358
|
var Po, mf;
|
14360
|
-
function
|
14359
|
+
function F0() {
|
14361
14360
|
if (mf) return Po;
|
14362
14361
|
mf = 1;
|
14363
|
-
var i =
|
14362
|
+
var i = M0();
|
14364
14363
|
return Po = function(t, n) {
|
14365
14364
|
var r = n.namespace;
|
14366
14365
|
if (n.colors === !1)
|
@@ -14370,7 +14369,7 @@ function k0() {
|
|
14370
14369
|
}, Po;
|
14371
14370
|
}
|
14372
14371
|
var Co, gf;
|
14373
|
-
function
|
14372
|
+
function k0() {
|
14374
14373
|
return gf || (gf = 1, Co = function(e, t) {
|
14375
14374
|
if (!t) return !1;
|
14376
14375
|
for (var n = t.split(/[\s,]+/), r = 0; r < n.length; r++) {
|
@@ -14389,7 +14388,7 @@ var xo, vf;
|
|
14389
14388
|
function Id() {
|
14390
14389
|
if (vf) return xo;
|
14391
14390
|
vf = 1;
|
14392
|
-
var i =
|
14391
|
+
var i = k0();
|
14393
14392
|
return xo = function(t) {
|
14394
14393
|
return function(r) {
|
14395
14394
|
try {
|
@@ -14401,7 +14400,7 @@ function Id() {
|
|
14401
14400
|
}, xo;
|
14402
14401
|
}
|
14403
14402
|
var Ro, yf;
|
14404
|
-
function
|
14403
|
+
function j0() {
|
14405
14404
|
if (yf) return Ro;
|
14406
14405
|
yf = 1;
|
14407
14406
|
var i = Id();
|
@@ -14410,7 +14409,7 @@ function q0() {
|
|
14410
14409
|
}), Ro;
|
14411
14410
|
}
|
14412
14411
|
var Oo, bf;
|
14413
|
-
function
|
14412
|
+
function q0() {
|
14414
14413
|
if (bf) return Oo;
|
14415
14414
|
bf = 1;
|
14416
14415
|
var i = Id();
|
@@ -14419,7 +14418,7 @@ function N0() {
|
|
14419
14418
|
}), Oo;
|
14420
14419
|
}
|
14421
14420
|
var To, wf;
|
14422
|
-
function
|
14421
|
+
function N0() {
|
14423
14422
|
return wf || (wf = 1, To = function(i, e) {
|
14424
14423
|
try {
|
14425
14424
|
Function.prototype.apply.call(console.log, console, e);
|
@@ -14428,23 +14427,23 @@ function H0() {
|
|
14428
14427
|
}), To;
|
14429
14428
|
}
|
14430
14429
|
var Ao, _f;
|
14431
|
-
function
|
14430
|
+
function H0() {
|
14432
14431
|
if (_f) return Ao;
|
14433
14432
|
_f = 1;
|
14434
14433
|
var i = Ad(), e = i(function t(n, r) {
|
14435
14434
|
return r = r || {}, r.namespace = n, r.prod = !1, r.dev = !0, !t.enabled(n) && !(r.force || t.force) ? t.nope(r) : t.yep(r);
|
14436
14435
|
});
|
14437
|
-
return e.modify(
|
14436
|
+
return e.modify(F0()), e.use(j0()), e.use(q0()), e.set(N0()), Ao = e, Ao;
|
14438
14437
|
}
|
14439
14438
|
var Sf;
|
14440
14439
|
function pi() {
|
14441
|
-
return Sf || (Sf = 1, process.env.NODE_ENV === "production" ? Cn.exports =
|
14440
|
+
return Sf || (Sf = 1, process.env.NODE_ENV === "production" ? Cn.exports = x0() : Cn.exports = H0()), Cn.exports;
|
14442
14441
|
}
|
14443
14442
|
var Lo, Ef;
|
14444
|
-
function
|
14443
|
+
function U0() {
|
14445
14444
|
if (Ef) return Lo;
|
14446
14445
|
Ef = 1;
|
14447
|
-
var i = lt, e =
|
14446
|
+
var i = lt, e = hm, t = e.StringDecoder, n = mt(), r = n.Stream;
|
14448
14447
|
function o() {
|
14449
14448
|
}
|
14450
14449
|
return Lo = function(u, l) {
|
@@ -14479,7 +14478,7 @@ function B0() {
|
|
14479
14478
|
}, Lo;
|
14480
14479
|
}
|
14481
14480
|
var Io, Pf;
|
14482
|
-
function
|
14481
|
+
function B0() {
|
14483
14482
|
if (Pf) return Io;
|
14484
14483
|
Pf = 1;
|
14485
14484
|
function i(R) {
|
@@ -14552,7 +14551,7 @@ function z0() {
|
|
14552
14551
|
return S.__proto__ = E, S;
|
14553
14552
|
}, v(R, C);
|
14554
14553
|
}
|
14555
|
-
var h = lt, d = me, m =
|
14554
|
+
var h = lt, d = me, m = E0(), g = cm, s = De(), p = s.MESSAGE, b = mt(), w = b.Stream, _ = b.PassThrough, x = Ht(), $ = pi()("winston:file"), T = Er, P = U0();
|
14556
14555
|
return Io = /* @__PURE__ */ function(R) {
|
14557
14556
|
function C() {
|
14558
14557
|
var S, E = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
@@ -14972,7 +14971,7 @@ function z0() {
|
|
14972
14971
|
}(x), Io;
|
14973
14972
|
}
|
14974
14973
|
var $o, Cf;
|
14975
|
-
function
|
14974
|
+
function z0() {
|
14976
14975
|
if (Cf) return $o;
|
14977
14976
|
Cf = 1;
|
14978
14977
|
function i($) {
|
@@ -15069,7 +15068,7 @@ function V0() {
|
|
15069
15068
|
return P.__proto__ = R, P;
|
15070
15069
|
}, m($, T);
|
15071
15070
|
}
|
15072
|
-
var g =
|
15071
|
+
var g = dm, s = pm, p = mt(), b = p.Stream, w = Ht(), _ = qt(), x = _.configure;
|
15073
15072
|
return $o = /* @__PURE__ */ function($) {
|
15074
15073
|
function T() {
|
15075
15074
|
var P, R = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
@@ -15231,7 +15230,7 @@ function $d() {
|
|
15231
15230
|
return i.writable = (e) => i(e) && e.writable !== !1 && typeof e._write == "function" && typeof e._writableState == "object", i.readable = (e) => i(e) && e.readable !== !1 && typeof e._read == "function" && typeof e._readableState == "object", i.duplex = (e) => i.writable(e) && i.readable(e), i.transform = (e) => i.duplex(e) && typeof e._transform == "function", Do = i, Do;
|
15232
15231
|
}
|
15233
15232
|
var Mo, Rf;
|
15234
|
-
function
|
15233
|
+
function V0() {
|
15235
15234
|
if (Rf) return Mo;
|
15236
15235
|
Rf = 1;
|
15237
15236
|
function i(p) {
|
@@ -15328,31 +15327,31 @@ function W0() {
|
|
15328
15327
|
}(s), Mo;
|
15329
15328
|
}
|
15330
15329
|
var Of;
|
15331
|
-
function
|
15330
|
+
function W0() {
|
15332
15331
|
return Of || (Of = 1, function(i) {
|
15333
15332
|
Object.defineProperty(i, "Console", {
|
15334
15333
|
configurable: !0,
|
15335
15334
|
enumerable: !0,
|
15336
15335
|
get: function() {
|
15337
|
-
return
|
15336
|
+
return d0();
|
15338
15337
|
}
|
15339
15338
|
}), Object.defineProperty(i, "File", {
|
15340
15339
|
configurable: !0,
|
15341
15340
|
enumerable: !0,
|
15342
15341
|
get: function() {
|
15343
|
-
return
|
15342
|
+
return B0();
|
15344
15343
|
}
|
15345
15344
|
}), Object.defineProperty(i, "Http", {
|
15346
15345
|
configurable: !0,
|
15347
15346
|
enumerable: !0,
|
15348
15347
|
get: function() {
|
15349
|
-
return
|
15348
|
+
return z0();
|
15350
15349
|
}
|
15351
15350
|
}), Object.defineProperty(i, "Stream", {
|
15352
15351
|
configurable: !0,
|
15353
15352
|
enumerable: !0,
|
15354
15353
|
get: function() {
|
15355
|
-
return
|
15354
|
+
return V0();
|
15356
15355
|
}
|
15357
15356
|
});
|
15358
15357
|
}(Va)), Va;
|
@@ -15365,7 +15364,7 @@ function Us() {
|
|
15365
15364
|
return Jr.cli = i.levels(t.cli), Jr.npm = i.levels(t.npm), Jr.syslog = i.levels(t.syslog), Jr.addColors = i.levels, Jr;
|
15366
15365
|
}
|
15367
15366
|
var xn = { exports: {} }, Rn = { exports: {} }, Af;
|
15368
|
-
function
|
15367
|
+
function G0() {
|
15369
15368
|
return Af || (Af = 1, function(i, e) {
|
15370
15369
|
Object.defineProperty(e, "__esModule", {
|
15371
15370
|
value: !0
|
@@ -15395,7 +15394,7 @@ function K0() {
|
|
15395
15394
|
}(Rn, Rn.exports)), Rn.exports;
|
15396
15395
|
}
|
15397
15396
|
var On = { exports: {} }, Lf;
|
15398
|
-
function
|
15397
|
+
function K0() {
|
15399
15398
|
return Lf || (Lf = 1, function(i, e) {
|
15400
15399
|
Object.defineProperty(e, "__esModule", {
|
15401
15400
|
value: !0
|
@@ -15412,7 +15411,7 @@ function Bs() {
|
|
15412
15411
|
Object.defineProperty(e, "__esModule", {
|
15413
15412
|
value: !0
|
15414
15413
|
});
|
15415
|
-
var t =
|
15414
|
+
var t = G0(), n = f(t), r = K0(), o = f(r), u = pt(), l = f(u), a = Ut(), c = f(a);
|
15416
15415
|
function f(v) {
|
15417
15416
|
return v && v.__esModule ? v : { default: v };
|
15418
15417
|
}
|
@@ -15423,7 +15422,7 @@ function Bs() {
|
|
15423
15422
|
}(xn, xn.exports)), xn.exports;
|
15424
15423
|
}
|
15425
15424
|
var Fo, $f;
|
15426
|
-
function
|
15425
|
+
function J0() {
|
15427
15426
|
if ($f) return Fo;
|
15428
15427
|
$f = 1;
|
15429
15428
|
var i = Object.prototype.toString;
|
@@ -15441,7 +15440,7 @@ var ko, Df;
|
|
15441
15440
|
function Dd() {
|
15442
15441
|
if (Df) return ko;
|
15443
15442
|
Df = 1;
|
15444
|
-
var i =
|
15443
|
+
var i = J0();
|
15445
15444
|
return ko = function(t) {
|
15446
15445
|
var n = 0, r;
|
15447
15446
|
function o() {
|
@@ -15541,7 +15540,7 @@ function Md() {
|
|
15541
15540
|
}(jo)), jo;
|
15542
15541
|
}
|
15543
15542
|
var qo, Ff;
|
15544
|
-
function
|
15543
|
+
function Y0() {
|
15545
15544
|
if (Ff) return qo;
|
15546
15545
|
Ff = 1;
|
15547
15546
|
function i(m) {
|
@@ -15670,7 +15669,7 @@ function Fd() {
|
|
15670
15669
|
}
|
15671
15670
|
return String(v);
|
15672
15671
|
}
|
15673
|
-
var u = Er, l = Bs(), a = pi()("winston:exception"), c = Dd(), f = Md(), y =
|
15672
|
+
var u = Er, l = Bs(), a = pi()("winston:exception"), c = Dd(), f = Md(), y = Y0();
|
15674
15673
|
return No = /* @__PURE__ */ function() {
|
15675
15674
|
function v(h) {
|
15676
15675
|
if (e(this, v), !h)
|
@@ -15837,7 +15836,7 @@ function Fd() {
|
|
15837
15836
|
}(), No;
|
15838
15837
|
}
|
15839
15838
|
var Ho, jf;
|
15840
|
-
function
|
15839
|
+
function Q0() {
|
15841
15840
|
if (jf) return Ho;
|
15842
15841
|
jf = 1;
|
15843
15842
|
function i(m) {
|
@@ -15966,7 +15965,7 @@ function kd() {
|
|
15966
15965
|
}
|
15967
15966
|
return String(v);
|
15968
15967
|
}
|
15969
|
-
var u = Er, l = Bs(), a = pi()("winston:rejection"), c = Dd(), f = Md(), y =
|
15968
|
+
var u = Er, l = Bs(), a = pi()("winston:rejection"), c = Dd(), f = Md(), y = Q0();
|
15970
15969
|
return Uo = /* @__PURE__ */ function() {
|
15971
15970
|
function v(h) {
|
15972
15971
|
if (e(this, v), !h)
|
@@ -16133,7 +16132,7 @@ function kd() {
|
|
16133
16132
|
}(), Uo;
|
16134
16133
|
}
|
16135
16134
|
var Bo = { exports: {} }, zo = { exports: {} }, Nf;
|
16136
|
-
function
|
16135
|
+
function Z0() {
|
16137
16136
|
if (Nf) return zo.exports;
|
16138
16137
|
Nf = 1;
|
16139
16138
|
const i = hr, e = di(), { LEVEL: t } = De(), n = zo.exports = function(o = {}) {
|
@@ -16200,10 +16199,10 @@ function X0() {
|
|
16200
16199
|
}, zo.exports;
|
16201
16200
|
}
|
16202
16201
|
var Hf;
|
16203
|
-
function
|
16202
|
+
function X0() {
|
16204
16203
|
if (Hf) return Bo.exports;
|
16205
16204
|
Hf = 1;
|
16206
|
-
const i = hr, { LEVEL: e } = De(), t =
|
16205
|
+
const i = hr, { LEVEL: e } = De(), t = Z0(), n = Bo.exports = function(o = {}) {
|
16207
16206
|
if (t.call(this, o), !o.transport || typeof o.transport.log != "function")
|
16208
16207
|
throw new Error("Invalid transport, must be an object with a log method.");
|
16209
16208
|
this.transport = o.transport, this.level = this.level || o.transport.level, this.handleExceptions = this.handleExceptions || o.transport.handleExceptions, this._deprecated();
|
@@ -16236,7 +16235,7 @@ function eb() {
|
|
16236
16235
|
}, Bo.exports;
|
16237
16236
|
}
|
16238
16237
|
var Vo, Uf;
|
16239
|
-
function
|
16238
|
+
function eb() {
|
16240
16239
|
if (Uf) return Vo;
|
16241
16240
|
Uf = 1;
|
16242
16241
|
function i(l) {
|
@@ -16295,7 +16294,7 @@ function rb() {
|
|
16295
16294
|
return Vo = u, Vo;
|
16296
16295
|
}
|
16297
16296
|
var Wo, Bf;
|
16298
|
-
function
|
16297
|
+
function rb() {
|
16299
16298
|
if (Bf) return Wo;
|
16300
16299
|
Bf = 1;
|
16301
16300
|
class i extends Error {
|
@@ -16320,10 +16319,10 @@ Found: ${t.toString().split(`
|
|
16320
16319
|
}, Wo;
|
16321
16320
|
}
|
16322
16321
|
var Go, zf;
|
16323
|
-
function
|
16322
|
+
function tb() {
|
16324
16323
|
if (zf) return Go;
|
16325
16324
|
zf = 1;
|
16326
|
-
const i =
|
16325
|
+
const i = rb(), { MESSAGE: e } = De(), t = qt();
|
16327
16326
|
function n(r, o) {
|
16328
16327
|
return typeof o == "bigint" ? o.toString() : o;
|
16329
16328
|
}
|
@@ -16409,7 +16408,7 @@ function zs() {
|
|
16409
16408
|
return k.__proto__ = M, k;
|
16410
16409
|
}, h(A, L);
|
16411
16410
|
}
|
16412
|
-
var d = mt(), m = d.Stream, g = d.Transform, s = Bs(), p = De(), b = p.LEVEL, w = p.SPLAT, _ = $d(), x = Fd(), $ = kd(), T =
|
16411
|
+
var d = mt(), m = d.Stream, g = d.Transform, s = Bs(), p = De(), b = p.LEVEL, w = p.SPLAT, _ = $d(), x = Fd(), $ = kd(), T = X0(), P = eb(), R = wd(), C = R.warn, S = Us(), E = /%[scdjifoO%]/g, N = /* @__PURE__ */ function(A) {
|
16413
16412
|
function L(k) {
|
16414
16413
|
var M;
|
16415
16414
|
return t(this, L), M = l(this, L, [{
|
@@ -16441,7 +16440,7 @@ function zs() {
|
|
16441
16440
|
key: "configure",
|
16442
16441
|
value: function() {
|
16443
16442
|
var M = this, H = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, V = H.silent, J = H.format, ne = H.defaultMeta, W = H.levels, X = H.level, O = X === void 0 ? "info" : X, D = H.exitOnError, z = D === void 0 ? !0 : D, re = H.transports, G = H.colors, I = H.emitErrs, F = H.formatters, Z = H.padLevels, te = H.rewriters, he = H.stripColors, ae = H.exceptionHandlers, se = H.rejectionHandlers;
|
16444
|
-
if (this.transports.length && this.clear(), this.silent = V, this.format = J || this.format ||
|
16443
|
+
if (this.transports.length && this.clear(), this.silent = V, this.format = J || this.format || tb()(), this.defaultMeta = ne || null, this.levels = W || this.levels || S.npm.levels, this.level = O, this.exceptions && this.exceptions.unhandle(), this.rejections && this.rejections.unhandle(), this.exceptions = new x(this), this.rejections = new $(this), this.profilers = {}, this.exitOnError = z, re && (re = Array.isArray(re) ? re : [re], re.forEach(function(Pe) {
|
16445
16444
|
return M.add(Pe);
|
16446
16445
|
})), G || I || F || Z || te || he)
|
16447
16446
|
throw new Error(["{ colors, emitErrs, formatters, padLevels, rewriters, stripColors } were removed in winston@3.0.0.", "Use a custom winston.format(function) instead.", "See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join(`
|
@@ -16853,7 +16852,7 @@ function jd() {
|
|
16853
16852
|
}, Jo;
|
16854
16853
|
}
|
16855
16854
|
var Yo, Gf;
|
16856
|
-
function
|
16855
|
+
function nb() {
|
16857
16856
|
if (Gf) return Yo;
|
16858
16857
|
Gf = 1;
|
16859
16858
|
function i(l) {
|
@@ -16980,10 +16979,10 @@ function ib() {
|
|
16980
16979
|
}(), Yo;
|
16981
16980
|
}
|
16982
16981
|
var Kf;
|
16983
|
-
function
|
16982
|
+
function ib() {
|
16984
16983
|
return Kf || (Kf = 1, function(i) {
|
16985
16984
|
var e = bd(), t = wd(), n = t.warn;
|
16986
|
-
i.version =
|
16985
|
+
i.version = o0.version, i.transports = W0(), i.config = Us(), i.addColors = e.levels, i.format = e.format, i.createLogger = jd(), i.Logger = zs(), i.ExceptionHandler = Fd(), i.RejectionHandler = kd(), i.Container = nb(), i.Transport = Ht(), i.loggers = new i.Container();
|
16987
16986
|
var r = i.createLogger();
|
16988
16987
|
Object.keys(i.config.npm.levels).concat(["log", "query", "stream", "add", "remove", "clear", "profile", "startTimer", "handleExceptions", "unhandleExceptions", "handleRejections", "unhandleRejections", "configure", "child"]).forEach(function(o) {
|
16989
16988
|
return i[o] = function() {
|
@@ -17024,10 +17023,10 @@ function ab() {
|
|
17024
17023
|
}), n.deprecated(i, "setLevels"), n.forFunctions(i, "useFormat", ["cli"]), n.forProperties(i, "useFormat", ["padLevels", "stripColors"]), n.forFunctions(i, "deprecated", ["addRewriter", "addFilter", "clone", "extend"]), n.forProperties(i, "deprecated", ["emitErrs", "levelLength"]);
|
17025
17024
|
}(ma)), ma;
|
17026
17025
|
}
|
17027
|
-
var
|
17028
|
-
const Yr = /* @__PURE__ */ Xn(
|
17026
|
+
var ab = ib();
|
17027
|
+
const Yr = /* @__PURE__ */ Xn(ab), Jf = Object.keys(K);
|
17029
17028
|
function Jn(i) {
|
17030
|
-
const e = me.join(
|
17029
|
+
const e = me.join(cy || me.join(Br(), ".cache"), "amp", "logs"), t = i?.logFile || me.join(e, "cli.log"), n = i?.logLevel || "info";
|
17031
17030
|
Jf.includes(n) || console.warn(`Invalid log level: ${n}. Using 'info' instead.`);
|
17032
17031
|
try {
|
17033
17032
|
lt.mkdirSync(me.dirname(t), { recursive: !0 });
|
@@ -17043,7 +17042,7 @@ function Jn(i) {
|
|
17043
17042
|
),
|
17044
17043
|
transports: [new Yr.transports.File({ filename: t })]
|
17045
17044
|
});
|
17046
|
-
|
17045
|
+
Dp({
|
17047
17046
|
error: r.error.bind(r),
|
17048
17047
|
warn: r.warn.bind(r),
|
17049
17048
|
info: r.info.bind(r),
|
@@ -17157,7 +17156,7 @@ const qd = {
|
|
17157
17156
|
visible: !1,
|
17158
17157
|
description: "Custom hooks for extending Amp functionality"
|
17159
17158
|
}
|
17160
|
-
},
|
17159
|
+
}, ob = Object.fromEntries(
|
17161
17160
|
Object.entries(qd).filter(([, i]) => i.visible).map(([i, e]) => [`amp.${i}`, e.value])
|
17162
17161
|
), Tn = {
|
17163
17162
|
examples: [
|
@@ -17176,14 +17175,14 @@ const qd = {
|
|
17176
17175
|
],
|
17177
17176
|
configuration: {
|
17178
17177
|
description: `Amp can be configured using a JSON settings file located at ${ht}. All settings use the "amp." prefix.`,
|
17179
|
-
sampleConfig: JSON.stringify(
|
17178
|
+
sampleConfig: JSON.stringify(ob, null, 2),
|
17180
17179
|
keyDescriptions: Object.entries(qd).filter(([, i]) => i.visible).map(([i, e]) => ({
|
17181
17180
|
key: `amp.${i}`,
|
17182
17181
|
description: e.description
|
17183
17182
|
}))
|
17184
17183
|
}
|
17185
17184
|
};
|
17186
|
-
class
|
17185
|
+
class sb {
|
17187
17186
|
cache = /* @__PURE__ */ new Map();
|
17188
17187
|
maxSize;
|
17189
17188
|
constructor(e = 100) {
|
@@ -17216,7 +17215,7 @@ class Yf {
|
|
17216
17215
|
process = null;
|
17217
17216
|
messageId = 0;
|
17218
17217
|
pendingRequests = /* @__PURE__ */ new Map();
|
17219
|
-
queryCache = new
|
17218
|
+
queryCache = new sb(50);
|
17220
17219
|
constructor() {
|
17221
17220
|
}
|
17222
17221
|
async start() {
|
@@ -17281,14 +17280,14 @@ class Yf {
|
|
17281
17280
|
this.process && (this.process.kill(), this.process = null);
|
17282
17281
|
}
|
17283
17282
|
}
|
17284
|
-
async function
|
17283
|
+
async function ub(i, e) {
|
17285
17284
|
const t = Er.homedir();
|
17286
17285
|
if (me.resolve(e) === me.resolve(t)) {
|
17287
17286
|
K.debug("Skipping indexing for home directory");
|
17288
17287
|
return;
|
17289
17288
|
}
|
17290
17289
|
return new Promise((n, r) => {
|
17291
|
-
const o =
|
17290
|
+
const o = mm(), u = ri(o, ["--files"], {
|
17292
17291
|
cwd: e,
|
17293
17292
|
stdio: ["ignore", "pipe", "inherit"]
|
17294
17293
|
});
|
@@ -17319,7 +17318,7 @@ async function lb(i, e) {
|
|
17319
17318
|
});
|
17320
17319
|
});
|
17321
17320
|
}
|
17322
|
-
function
|
17321
|
+
function lb(i, e) {
|
17323
17322
|
const t = Er.homedir();
|
17324
17323
|
if (me.resolve(e) === me.resolve(t))
|
17325
17324
|
return K.debug("Skipping file watching for home directory"), { [Symbol.dispose]: () => {
|
@@ -17376,12 +17375,12 @@ function cb(i, e) {
|
|
17376
17375
|
}
|
17377
17376
|
const Qo = kt(Nr);
|
17378
17377
|
let Yn = null;
|
17379
|
-
async function
|
17380
|
-
Yn = await
|
17378
|
+
async function cb(i = Dr, e) {
|
17379
|
+
Yn = await fb(35789);
|
17381
17380
|
const t = `${Yn}`;
|
17382
17381
|
return K.info(`Generated callback port: ${t}`), `${i}/auth/cli-login?authToken=${encodeURIComponent(e)}&callbackPort=${encodeURIComponent(t)}`;
|
17383
17382
|
}
|
17384
|
-
async function
|
17383
|
+
async function fb(i, e = 10) {
|
17385
17384
|
K.info(`Finding available port starting from ${i}`);
|
17386
17385
|
for (let t = 0; t < e; t++) {
|
17387
17386
|
const n = i + t;
|
@@ -17401,7 +17400,7 @@ async function hb(i, e = 10) {
|
|
17401
17400
|
}
|
17402
17401
|
throw new Error(`Could not find an available port after ${e} attempts`);
|
17403
17402
|
}
|
17404
|
-
async function
|
17403
|
+
async function hb(i, e = 5 * 60 * 1e3) {
|
17405
17404
|
if (K.info("Starting local HTTP server to receive API key from browser"), !Yn)
|
17406
17405
|
throw new Error("No port selected. Call generateLoginLink first.");
|
17407
17406
|
const t = Yn;
|
@@ -17458,10 +17457,10 @@ async function db(i, e = 5 * 60 * 1e3) {
|
|
17458
17457
|
});
|
17459
17458
|
});
|
17460
17459
|
}
|
17461
|
-
async function
|
17460
|
+
async function db(i, e = Dr, t) {
|
17462
17461
|
await t.set("apiKey", i, e), K.info("API key stored successfully");
|
17463
17462
|
}
|
17464
|
-
async function
|
17463
|
+
async function pb(i) {
|
17465
17464
|
try {
|
17466
17465
|
switch (zn()) {
|
17467
17466
|
case "win32":
|
@@ -17485,7 +17484,7 @@ function vs(i, e) {
|
|
17485
17484
|
function ie(i) {
|
17486
17485
|
return Array.from(i).map((e) => e.toString(16).padStart(2, "0")).join("");
|
17487
17486
|
}
|
17488
|
-
const
|
17487
|
+
const mb = Buffer.from([1]), gb = Buffer.from([2]), Nd = Buffer.from([3]), Hd = Buffer.from([4]), vb = Buffer.from([5]), yb = Buffer.from([6]), bb = Buffer.from([8]), wb = Buffer.from([11]), _b = Buffer.from([12]), Sb = Buffer.from([14]), Eb = Buffer.from([16]), Pb = Buffer.from([21]), Cb = Buffer.from([23]), xb = Buffer.from([25]), Rb = Buffer.from([7]), Ob = Buffer.from([15]), Tb = Buffer.from([17]), Ab = Buffer.from([18]), Lb = Buffer.from([19]), Ib = Buffer.from([20]), $b = Buffer.from([22]), Db = Buffer.from([24]), Mb = Buffer.from([26]), Ud = Buffer.from([27]), Fb = Buffer.from([13]), kb = Buffer.from([10]), jb = Buffer.from([127]), qb = Buffer.from([9]), Nb = Buffer.from([27, 91, 90]), Hb = Buffer.from([27, 91, 65]), Ub = Buffer.from([27, 91, 66]), Bb = Buffer.from([27, 91, 67]), zb = Buffer.from([27, 91, 68]), Vb = Buffer.from([27, 91, 49, 59, 50, 65]), Wb = Buffer.from([27, 91, 49, 59, 50, 66]), Gb = Buffer.from([27, 91, 49, 59, 50, 67]), Kb = Buffer.from([27, 91, 49, 59, 50, 68]), Jb = Buffer.from([27, 91, 53, 126]), Yb = Buffer.from([27, 91, 54, 126]), Qb = Buffer.from([27, 91, 72]), Zb = Buffer.from([27, 91, 70]), Xb = Buffer.from([27, 91, 49, 126]), ew = Buffer.from([27, 91, 52, 126]), rw = Buffer.from([27, 91, 51, 126]), tw = Buffer.from([27, 102]), nw = Buffer.from([27, 98]), iw = Buffer.from([27, 100]), aw = Buffer.from([27, 127]), ow = Buffer.from([27, 91, 50, 55, 59, 50, 59, 49, 51, 126]), Bd = Buffer.from([27, 91, 50, 55, 59, 53, 59, 49, 51, 126]), zd = Buffer.from([27, 91, 50, 55, 59, 56, 59, 49, 51, 126]), pe = {
|
17489
17488
|
ESC: Buffer.from([27, 91, 50, 55, 117]),
|
17490
17489
|
// CSI 27 u (Escape key)
|
17491
17490
|
// Control keys
|
@@ -17615,17 +17614,17 @@ async function Ur(i, e, { stdin: t, stdout: n } = { stdin: process.stdin, stdout
|
|
17615
17614
|
t.on("data", l), t.once("error", a);
|
17616
17615
|
});
|
17617
17616
|
}
|
17618
|
-
function
|
17617
|
+
function sw(i) {
|
17619
17618
|
const e = ["prompt is too long", "exceed context limit"], t = i.error?.type === "invalid_request_error" && e.some((r) => i.error?.message?.includes(r)), n = e.some(
|
17620
17619
|
(r) => i.message?.includes(r)
|
17621
17620
|
);
|
17622
17621
|
return t || n;
|
17623
17622
|
}
|
17624
|
-
const
|
17623
|
+
const uw = "Out of credits", lw = import("./node-DVHX-oeS.js").then(
|
17625
17624
|
({ nodeFileSystem: i }) => i
|
17626
17625
|
);
|
17627
|
-
async function
|
17628
|
-
const i = me.join(process.cwd(),
|
17626
|
+
async function cw() {
|
17627
|
+
const i = me.join(process.cwd(), Mp), e = me.join(process.cwd(), ".sourcegraph", "memory.md");
|
17629
17628
|
let t = !0, n = !1;
|
17630
17629
|
try {
|
17631
17630
|
await Ar(e, "utf-8");
|
@@ -17635,7 +17634,7 @@ async function fw() {
|
|
17635
17634
|
try {
|
17636
17635
|
await Bn(me.dirname(i), { recursive: !0 });
|
17637
17636
|
const o = await Ar(e, "utf-8");
|
17638
|
-
await Ot(i, o, "utf-8"), await
|
17637
|
+
await Ot(i, o, "utf-8"), await Wp(e), t = !1, n = !0;
|
17639
17638
|
} catch (o) {
|
17640
17639
|
K.error("Failed to migrate memory.md to AGENT.md", o), t = !0;
|
17641
17640
|
}
|
@@ -17652,24 +17651,24 @@ async function fw() {
|
|
17652
17651
|
migrated: n
|
17653
17652
|
};
|
17654
17653
|
}
|
17655
|
-
async function
|
17654
|
+
async function fw(i) {
|
17656
17655
|
await i.handle({
|
17657
17656
|
type: "user:message",
|
17658
17657
|
message: {
|
17659
|
-
content: [{ type: "text", text:
|
17658
|
+
content: [{ type: "text", text: Fp }]
|
17660
17659
|
}
|
17661
17660
|
});
|
17662
17661
|
}
|
17663
|
-
const Zo = kt(
|
17664
|
-
async function
|
17662
|
+
const Zo = kt(Qp.exec);
|
17663
|
+
async function hw(i) {
|
17665
17664
|
const e = {
|
17666
|
-
displayName:
|
17665
|
+
displayName: oy.basename(i)
|
17667
17666
|
};
|
17668
17667
|
if (i.scheme !== "file")
|
17669
17668
|
return e;
|
17670
17669
|
e.fsPath = i.fsPath;
|
17671
17670
|
try {
|
17672
|
-
if (!await
|
17671
|
+
if (!await zp.access(Jp.join(i.fsPath, ".git")).then(() => !0).catch(() => !1))
|
17673
17672
|
return e;
|
17674
17673
|
const { stdout: n } = await Zo("git remote get-url origin", {
|
17675
17674
|
cwd: i.fsPath
|
@@ -17691,7 +17690,7 @@ async function dw(i) {
|
|
17691
17690
|
...e,
|
17692
17691
|
repository: {
|
17693
17692
|
type: "git",
|
17694
|
-
url:
|
17693
|
+
url: pw(n.trim()),
|
17695
17694
|
ref: r.trim() ?? void 0,
|
17696
17695
|
sha: o.trim() ?? void 0
|
17697
17696
|
}
|
@@ -17700,7 +17699,7 @@ async function dw(i) {
|
|
17700
17699
|
return K.error("Error getting repository info:", t, { dir: i.fsPath }), e;
|
17701
17700
|
}
|
17702
17701
|
}
|
17703
|
-
function
|
17702
|
+
function dw(i) {
|
17704
17703
|
if (i.startsWith("http://") || i.startsWith("https://"))
|
17705
17704
|
try {
|
17706
17705
|
const e = new URL(i);
|
@@ -17709,9 +17708,9 @@ function pw(i) {
|
|
17709
17708
|
}
|
17710
17709
|
return i;
|
17711
17710
|
}
|
17712
|
-
function
|
17711
|
+
function pw(i) {
|
17713
17712
|
const e = ["github.com", "gitlab.com", "bitbucket.org"];
|
17714
|
-
i =
|
17713
|
+
i = dw(i);
|
17715
17714
|
const t = i.replace(/\.git$/, "");
|
17716
17715
|
let n = null, r = null;
|
17717
17716
|
const o = t.match(/^git@([^:]+)[:|/](.+)$/);
|
@@ -17726,7 +17725,7 @@ function mw(i) {
|
|
17726
17725
|
return n && r && e.includes(n) ? `https://${n}/${r}` : i;
|
17727
17726
|
}
|
17728
17727
|
let Xo;
|
17729
|
-
function
|
17728
|
+
function mw() {
|
17730
17729
|
if (!Xo) {
|
17731
17730
|
const e = !(typeof process < "u" && process.versions && process.versions.node);
|
17732
17731
|
let t = "linux";
|
@@ -17744,8 +17743,8 @@ function gw() {
|
|
17744
17743
|
}
|
17745
17744
|
return Xo;
|
17746
17745
|
}
|
17747
|
-
function
|
17748
|
-
const i = Sh(), e =
|
17746
|
+
function gw() {
|
17747
|
+
const i = Sh(), e = mw();
|
17749
17748
|
return {
|
17750
17749
|
os: e.os,
|
17751
17750
|
webBrowser: e.webBrowser,
|
@@ -17754,10 +17753,10 @@ function vw() {
|
|
17754
17753
|
clientType: i.type
|
17755
17754
|
};
|
17756
17755
|
}
|
17757
|
-
async function
|
17756
|
+
async function vw() {
|
17758
17757
|
return {
|
17759
|
-
trees: await Promise.all([process.cwd()].map((i) =>
|
17760
|
-
platform:
|
17758
|
+
trees: await Promise.all([process.cwd()].map((i) => hw(hi.file(i)))),
|
17759
|
+
platform: gw(),
|
17761
17760
|
interactive: !0
|
17762
17761
|
};
|
17763
17762
|
}
|
@@ -17772,7 +17771,7 @@ function Vs(i, e) {
|
|
17772
17771
|
}), r;
|
17773
17772
|
};
|
17774
17773
|
}
|
17775
|
-
async function
|
17774
|
+
async function yw(i) {
|
17776
17775
|
try {
|
17777
17776
|
const e = new AbortController(), t = setTimeout(() => e.abort(), 500), n = await fetch("https://registry.npmjs.org/@sourcegraph/amp/latest", {
|
17778
17777
|
signal: e.signal
|
@@ -17782,7 +17781,7 @@ async function bw(i) {
|
|
17782
17781
|
const o = (await n.json()).version;
|
17783
17782
|
if (o === void 0)
|
17784
17783
|
return { hasUpdate: !1 };
|
17785
|
-
const u =
|
17784
|
+
const u = bw(i, o), l = u < 0;
|
17786
17785
|
return K.info("Version comparison", {
|
17787
17786
|
currentVersion: i,
|
17788
17787
|
latestVersion: o,
|
@@ -17793,7 +17792,7 @@ async function bw(i) {
|
|
17793
17792
|
return { hasUpdate: !1 };
|
17794
17793
|
}
|
17795
17794
|
}
|
17796
|
-
function
|
17795
|
+
function bw(i, e) {
|
17797
17796
|
const t = (u) => {
|
17798
17797
|
const [l, a] = u.split("-");
|
17799
17798
|
return { parts: l?.split(".").map(Number) || [], label: a };
|
@@ -17805,13 +17804,13 @@ function ww(i, e) {
|
|
17805
17804
|
}
|
17806
17805
|
return n.label === r.label ? 0 : !n.label && r.label ? 1 : n.label && !r.label ? -1 : n.label && r.label ? n.label < r.label ? -1 : 1 : 0;
|
17807
17806
|
}
|
17808
|
-
async function
|
17807
|
+
async function ww() {
|
17809
17808
|
try {
|
17810
17809
|
const i = process.argv[1] || "";
|
17811
17810
|
K.debug("Detecting package manager from script path", { currentScript: i });
|
17812
17811
|
let e = i;
|
17813
17812
|
try {
|
17814
|
-
const o = await
|
17813
|
+
const o = await Gp(i);
|
17815
17814
|
o ? (e = o, K.debug("Resolved symlink", { from: i, to: e })) : K.debug("Not a symlink or readlink returned empty");
|
17816
17815
|
} catch (o) {
|
17817
17816
|
K.debug("Error reading symlink (probably not a symlink)", { error: o });
|
@@ -17888,7 +17887,7 @@ async function An(i) {
|
|
17888
17887
|
}
|
17889
17888
|
});
|
17890
17889
|
}
|
17891
|
-
function
|
17890
|
+
function _w(i, e) {
|
17892
17891
|
const t = e ? `@sourcegraph/amp@${e}` : "@sourcegraph/amp";
|
17893
17892
|
switch (i) {
|
17894
17893
|
case "pnpm":
|
@@ -17902,10 +17901,10 @@ function Sw(i, e) {
|
|
17902
17901
|
return ["npm", ["install", "-g", t]];
|
17903
17902
|
}
|
17904
17903
|
}
|
17905
|
-
async function
|
17906
|
-
let e = await
|
17904
|
+
async function Sw(i) {
|
17905
|
+
let e = await ww();
|
17907
17906
|
e || (e = await Vd()), e || (e = "npm", K.debug("Falling back to npm for update")), K.debug("Using package manager for update", { packageManager: e, targetVersion: i });
|
17908
|
-
const [t, n] =
|
17907
|
+
const [t, n] = _w(e, i);
|
17909
17908
|
return new Promise((r, o) => {
|
17910
17909
|
const u = process.env.HOME || process.env.USERPROFILE || "/", l = process.env.SHELL || "/bin/sh", a = `${t} ${n.join(" ")}`, c = `env -i ${l} -l -c 'cd ${u} && ${a}'`;
|
17911
17910
|
K.debug("Running update command", { packageManager: e, command: t, args: n, fullCommand: c });
|
@@ -17933,7 +17932,7 @@ ${d}`)
|
|
17933
17932
|
});
|
17934
17933
|
});
|
17935
17934
|
}
|
17936
|
-
async function
|
17935
|
+
async function Ew({
|
17937
17936
|
threadSyncService: i,
|
17938
17937
|
configService: e,
|
17939
17938
|
threadService: t,
|
@@ -17956,10 +17955,10 @@ async function Pw({
|
|
17956
17955
|
configService: e,
|
17957
17956
|
threadService: t,
|
17958
17957
|
toolService: f,
|
17959
|
-
getThreadEnvironment:
|
17958
|
+
getThreadEnvironment: vw,
|
17960
17959
|
systemPromptService: y,
|
17961
17960
|
threadSummaryService: l,
|
17962
|
-
createFileSystem: await
|
17961
|
+
createFileSystem: await lw,
|
17963
17962
|
threadHistoryService: n
|
17964
17963
|
},
|
17965
17964
|
v
|
@@ -18216,7 +18215,7 @@ async function Pw({
|
|
18216
18215
|
case "active":
|
18217
18216
|
if (E.status.ephemeralError) {
|
18218
18217
|
if (E.status.ephemeralError.message.includes(
|
18219
|
-
|
18218
|
+
uw
|
18220
18219
|
))
|
18221
18220
|
return S.type === "out-of-credits" ? S : (x.next({
|
18222
18221
|
type: "confirm",
|
@@ -18228,7 +18227,7 @@ async function Pw({
|
|
18228
18227
|
type: "out-of-credits",
|
18229
18228
|
tokenUsage: k
|
18230
18229
|
});
|
18231
|
-
if (
|
18230
|
+
if (sw(E.status.ephemeralError))
|
18232
18231
|
return S.tokenUsage ? S.tokenUsage.used = S.tokenUsage.maxAvailable : S.tokenUsage = {
|
18233
18232
|
used: 1,
|
18234
18233
|
maxAvailable: 1
|
@@ -18393,7 +18392,7 @@ async function Pw({
|
|
18393
18392
|
}) : j();
|
18394
18393
|
} else if (E.type === "ui-input") {
|
18395
18394
|
if (E.input.type === "initialized")
|
18396
|
-
return g.value.last?.messages.length === 0 ? (K.info("Checking agent file status"),
|
18395
|
+
return g.value.last?.messages.length === 0 ? (K.info("Checking agent file status"), cw().then((k) => {
|
18397
18396
|
_.next({
|
18398
18397
|
type: "agent-file-check-complete",
|
18399
18398
|
shouldGenerate: k.shouldGenerate,
|
@@ -18560,7 +18559,7 @@ async function Pw({
|
|
18560
18559
|
displayedError: null
|
18561
18560
|
};
|
18562
18561
|
} else if (E.input.confirmation.type === "agent-file-creation" && S.type === "confirming-agent-file-creation")
|
18563
|
-
return E.input.allow ? (
|
18562
|
+
return E.input.allow ? (fw(p).catch((L) => {
|
18564
18563
|
K.error("Agent file generation failed", L);
|
18565
18564
|
}), x.next({
|
18566
18565
|
type: "state",
|
@@ -18604,16 +18603,16 @@ async function Pw({
|
|
18604
18603
|
type: "thread-state",
|
18605
18604
|
thread: S
|
18606
18605
|
}));
|
18607
|
-
}, 0),
|
18606
|
+
}, 0), Pw(_).catch((S) => {
|
18608
18607
|
K.debug("Update check startup failed", S);
|
18609
18608
|
}), await Ge(P);
|
18610
18609
|
}
|
18611
|
-
async function
|
18610
|
+
async function Pw(i) {
|
18612
18611
|
try {
|
18613
|
-
const e = await
|
18612
|
+
const e = await yw("0.0.1749096401-g3a8a18");
|
18614
18613
|
e.hasUpdate && e.latestVersion ? (i.next({ type: "update-start-updating" }), setTimeout(async () => {
|
18615
18614
|
try {
|
18616
|
-
await
|
18615
|
+
await Sw(e.latestVersion), i.next({
|
18617
18616
|
type: "update-result",
|
18618
18617
|
success: !0,
|
18619
18618
|
version: e.latestVersion
|
@@ -18635,7 +18634,7 @@ const es = {
|
|
18635
18634
|
SEVERE: 0.9,
|
18636
18635
|
CRITICAL: 0.98
|
18637
18636
|
};
|
18638
|
-
function
|
18637
|
+
function Cw(i) {
|
18639
18638
|
const { stdout: e, threadID: t, pipedInput: n } = i;
|
18640
18639
|
function r(o) {
|
18641
18640
|
e.write(JSON.stringify(o) + `
|
@@ -18865,15 +18864,15 @@ function Qf(i = "idle") {
|
|
18865
18864
|
K.error(`Failed to play notification sound (${i}):`, e);
|
18866
18865
|
}
|
18867
18866
|
}
|
18868
|
-
const
|
18869
|
-
class
|
18867
|
+
const xw = me.join(Wn || me.join(Br(), ".local/share"), "amp"), Rw = me.join(xw, "history.jsonl"), Ow = 1e3;
|
18868
|
+
class Tw {
|
18870
18869
|
history = [];
|
18871
18870
|
index = -1;
|
18872
18871
|
loaded = !1;
|
18873
18872
|
historyFile;
|
18874
18873
|
maxSize;
|
18875
18874
|
constructor(e) {
|
18876
|
-
this.historyFile = e?.historyFile ||
|
18875
|
+
this.historyFile = e?.historyFile || Rw, this.maxSize = e?.maxSize || Ow, this.ensureLoaded();
|
18877
18876
|
}
|
18878
18877
|
async ensureLoaded() {
|
18879
18878
|
this.loaded || (this.history = await this.readHistoryFromDisk(), this.loaded = !0);
|
@@ -18959,7 +18958,7 @@ class Aw {
|
|
18959
18958
|
`, n = this.historyFile + ".lock", r = 10, o = 50;
|
18960
18959
|
for (let u = 0; u < r; u++)
|
18961
18960
|
try {
|
18962
|
-
const l = await
|
18961
|
+
const l = await Kp(n, "wx");
|
18963
18962
|
try {
|
18964
18963
|
await Ot(this.historyFile, t, { flag: "a", encoding: "utf-8" });
|
18965
18964
|
} finally {
|
@@ -19003,7 +19002,7 @@ class Aw {
|
|
19003
19002
|
}
|
19004
19003
|
}
|
19005
19004
|
var Ln = { exports: {} }, Zf;
|
19006
|
-
function
|
19005
|
+
function Aw() {
|
19007
19006
|
if (Zf) return Ln.exports;
|
19008
19007
|
Zf = 1;
|
19009
19008
|
const i = 55296, e = 56319, t = 56320, n = 127462, r = 127487, o = 127995, u = 127999, l = 65024, a = 65039, c = 8400, f = 8447, y = 8205, v = [
|
@@ -19100,9 +19099,9 @@ function Lw() {
|
|
19100
19099
|
}
|
19101
19100
|
return Ln.exports = h, Ln.exports.substr = T, Ln.exports;
|
19102
19101
|
}
|
19103
|
-
var
|
19104
|
-
const ue = /* @__PURE__ */ Xn(
|
19105
|
-
function
|
19102
|
+
var Lw = Aw();
|
19103
|
+
const ue = /* @__PURE__ */ Xn(Lw);
|
19104
|
+
function Iw(i, e, t) {
|
19106
19105
|
return ys(i, e, t, 0);
|
19107
19106
|
}
|
19108
19107
|
function ys(i, e, t, n) {
|
@@ -19132,7 +19131,7 @@ function ys(i, e, t, n) {
|
|
19132
19131
|
const y = ys(o, e, t, n + 1);
|
19133
19132
|
return { lines: [u].concat(y.lines), cursor: y.cursor };
|
19134
19133
|
}
|
19135
|
-
function
|
19134
|
+
function $w(i) {
|
19136
19135
|
const e = i.stdin || process.stdin, t = i.stdout || process.stdout, n = i.stderr || process.stderr, r = i.prompt || "", o = i.history, u = t.columns || 80, l = t.rows || 24, a = {
|
19137
19136
|
lines: [""],
|
19138
19137
|
cursorLine: 0,
|
@@ -19156,7 +19155,7 @@ function Dw(i) {
|
|
19156
19155
|
}))
|
19157
19156
|
), f = ns(t, "resize").pipe(
|
19158
19157
|
xe(() => ({ type: "resize" }))
|
19159
|
-
), y = new Qe(), v =
|
19158
|
+
), y = new Qe(), v = Dw({
|
19160
19159
|
stdout: t,
|
19161
19160
|
stderr: n,
|
19162
19161
|
state: a,
|
@@ -19190,7 +19189,7 @@ function Dw(i) {
|
|
19190
19189
|
else if (g.type === "submit")
|
19191
19190
|
h.next(g), d("off");
|
19192
19191
|
else if (g.type === "complete") {
|
19193
|
-
|
19192
|
+
lm(g.candidates, a.completions) || (a.selectedCompletionIndex = 0), a.completions = g.candidates;
|
19194
19193
|
const s = fh(
|
19195
19194
|
n,
|
19196
19195
|
i.printer,
|
@@ -19291,7 +19290,7 @@ function Dw(i) {
|
|
19291
19290
|
})
|
19292
19291
|
};
|
19293
19292
|
}
|
19294
|
-
function
|
19293
|
+
function Dw({
|
19295
19294
|
stdout: i,
|
19296
19295
|
stderr: e,
|
19297
19296
|
state: t,
|
@@ -19303,14 +19302,14 @@ function Mw({
|
|
19303
19302
|
history: a
|
19304
19303
|
}) {
|
19305
19304
|
const c = {}, f = () => {
|
19306
|
-
}, y =
|
19307
|
-
c[ie(
|
19305
|
+
}, y = Mw(o, r);
|
19306
|
+
c[ie(Fb)] = y, c[ie(Bd)] = y, c[ie(pe.CTRL_ENTER)] = y, c[ie(zd)] = y, c[ie(mb)] = Xf, c[ie(pe.CTRL_A)] = Xf, c[ie(vb)] = rh, c[ie(pe.CTRL_E)] = rh;
|
19308
19307
|
const v = (m, g, s, p) => {
|
19309
|
-
|
19308
|
+
Fw(m, g, s, p, a);
|
19310
19309
|
}, h = (m, g, s, p) => {
|
19311
|
-
|
19310
|
+
kw(m, g, s, p, a);
|
19312
19311
|
};
|
19313
|
-
c[ie(
|
19312
|
+
c[ie(Hb)] = v, c[ie(Eb)] = v, c[ie(pe.CTRL_P)] = v, c[ie(Ub)] = h, c[ie(Sb)] = h, c[ie(pe.CTRL_N)] = h, c[ie(Bb)] = In, c[ie(yb)] = In, c[ie(pe.CTRL_F)] = In, c[ie(zb)] = $n, c[ie(gb)] = $n, c[ie(pe.CTRL_B)] = $n, c[ie(jb)] = Dn, c[ie(bb)] = Dn, c[ie(pe.CTRL_H)] = Dn, c[ie(pe.SHIFT_BACKSPACE)] = Dn, c[ie(Pb)] = th, c[ie(pe.CTRL_U)] = th, c[ie(wb)] = nh, c[ie(pe.CTRL_K)] = nh, c[ie(Cb)] = Mn, c[ie(pe.CTRL_W)] = Mn, c[ie(aw)] = Mn, c[ie(pe.ALT_BACKSPACE)] = Mn, c[ie(xb)] = oh, c[ie(pe.CTRL_Y)] = oh, c[ie(_b)] = sh, c[ie(pe.CTRL_L)] = sh, c[ie(ow)] = It, c[ie(pe.SHIFT_ENTER)] = It, c[ie(kb)] = It, a && (c[ie(Jb)] = ih(a), c[ie(Yb)] = ah(a), c[ie(pe.PAGE_UP)] = ih(a), c[ie(pe.PAGE_DOWN)] = ah(a)), c[ie(Qb)] = rs, c[ie(Xb)] = rs, c[ie(pe.HOME)] = rs, c[ie(Zb)] = ts, c[ie(ew)] = ts, c[ie(pe.END)] = ts, c[ie(tw)] = uh, c[ie(pe.ALT_F)] = uh, c[ie(nw)] = lh, c[ie(pe.ALT_B)] = lh, c[ie(Hd)] = Fn, c[ie(pe.CTRL_D)] = Fn, c[ie(iw)] = eh, c[ie(pe.ALT_D)] = eh, c[ie(rw)] = Fn, c[ie(pe.DEL)] = Fn, c[ie(qb)] = jw(l), c[ie(Nb)] = ch(l), c[ie(pe.SHIFT_TAB)] = ch(l), c[ie(Rb)] = f, c[ie(pe.CTRL_G)] = f, c[ie(Ob)] = f, c[ie(pe.CTRL_O)] = f, c[ie(Tb)] = f, c[ie(pe.CTRL_Q)] = f, c[ie(Ab)] = f, c[ie(pe.CTRL_R)] = f, c[ie(Lb)] = f, c[ie(pe.CTRL_S)] = f, c[ie(Ib)] = f, c[ie(pe.CTRL_T)] = f, c[ie($b)] = f, c[ie(pe.CTRL_V)] = f, c[ie(Db)] = f, c[ie(pe.CTRL_X)] = f, c[ie(Mb)] = f, c[ie(pe.CTRL_Z)] = f, c[ie(Vb)] = v, c[ie(Wb)] = h, c[ie(Kb)] = $n, c[ie(Gb)] = In;
|
19314
19313
|
function d(m) {
|
19315
19314
|
if (m.length === 0) return m;
|
19316
19315
|
for (const [P, R] of Object.entries(c)) {
|
@@ -19339,11 +19338,11 @@ function Mw({
|
|
19339
19338
|
else {
|
19340
19339
|
const R = t.lines.slice();
|
19341
19340
|
R[t.cursorLine] = $ + _ + w;
|
19342
|
-
const { lines: C, cursor: S } =
|
19341
|
+
const { lines: C, cursor: S } = Iw(R, x, {
|
19343
19342
|
line: t.cursorLine,
|
19344
19343
|
column: t.cursorColumn
|
19345
19344
|
});
|
19346
|
-
|
19345
|
+
qw(
|
19347
19346
|
e,
|
19348
19347
|
t,
|
19349
19348
|
n,
|
@@ -19396,7 +19395,7 @@ function eh(i, e, t, n) {
|
|
19396
19395
|
e.write(`\x1B[${n.length + a + 1}G`);
|
19397
19396
|
}
|
19398
19397
|
}
|
19399
|
-
function
|
19398
|
+
function Mw(i, e) {
|
19400
19399
|
return (t, n, r, o) => {
|
19401
19400
|
if (r.isProcessingPaste) {
|
19402
19401
|
It(t, n, r, o);
|
@@ -19442,7 +19441,7 @@ function rh(i, e, t, n) {
|
|
19442
19441
|
const u = n ? n.length : 0, l = Ee(r);
|
19443
19442
|
e.write(`\x1B[${l + u + 1}G`);
|
19444
19443
|
}
|
19445
|
-
function
|
19444
|
+
function Fw(i, e, t, n, r) {
|
19446
19445
|
if (t.cursorLine === 0 && r) {
|
19447
19446
|
if (!t.isNavigatingHistory) {
|
19448
19447
|
const u = t.lines.join(`
|
@@ -19456,7 +19455,7 @@ function kw(i, e, t, n, r) {
|
|
19456
19455
|
mi(o, u, e, t, n), t.cursorLine = o, t.cursorColumn = u;
|
19457
19456
|
}
|
19458
19457
|
}
|
19459
|
-
function
|
19458
|
+
function kw(i, e, t, n, r) {
|
19460
19459
|
if (t.cursorLine === t.lines.length - 1 && r && t.isNavigatingHistory) {
|
19461
19460
|
const u = r.next();
|
19462
19461
|
u !== null ? zr(e, t, n, u) : t.currentHistoryContent !== null ? (zr(e, t, n, t.currentHistoryContent), t.isNavigatingHistory = !1, t.currentHistoryContent = null, r.reset()) : e.write("\x07");
|
@@ -19625,7 +19624,7 @@ function It(i, e, t, n) {
|
|
19625
19624
|
}
|
19626
19625
|
t.cursorLine++, t.cursorColumn = 0, kr(e, t, n, t.cursorLine);
|
19627
19626
|
}
|
19628
|
-
function
|
19627
|
+
function jw(i) {
|
19629
19628
|
return (e, t, n, r) => {
|
19630
19629
|
gi(n) && n.completions.length > 0 && i({ type: "cycle-completion", direction: "forward" });
|
19631
19630
|
};
|
@@ -19693,7 +19692,7 @@ function gi(i) {
|
|
19693
19692
|
wordEndPos: f
|
19694
19693
|
};
|
19695
19694
|
}
|
19696
|
-
function
|
19695
|
+
function qw(i, e, t, n, r, o) {
|
19697
19696
|
Bt(i), e.cursorLine > 0 && i.write(`\x1B[${e.cursorLine}F`), i.write("\r"), i.write("\x1B[0J");
|
19698
19697
|
for (let f = 0; f < n.length; f++)
|
19699
19698
|
i.write("\r"), i.write("\x1B[0J"), i.write(t + n[f] + `
|
@@ -19743,7 +19742,7 @@ function hh(i, e, t, n) {
|
|
19743
19742
|
Sr(i, e);
|
19744
19743
|
});
|
19745
19744
|
}
|
19746
|
-
function
|
19745
|
+
function Nw(i) {
|
19747
19746
|
const { stdout: e, stderr: t, printer: n, threadID: r, interactive: o, ampURL: u, useNotifications: l, pipedInput: a } = i;
|
19748
19747
|
return (c) => {
|
19749
19748
|
const f = new Qe();
|
@@ -19760,12 +19759,12 @@ Interrupt the agent with `, { foreground: "gray" })}${n.print("Ctrl+C", { foregr
|
|
19760
19759
|
return K.error("Completion failed", p), [];
|
19761
19760
|
}
|
19762
19761
|
}
|
19763
|
-
const v = o ? new
|
19762
|
+
const v = o ? new Tw() : void 0, h = o ? $w({
|
19764
19763
|
prompt: "> ",
|
19765
19764
|
complete: y,
|
19766
19765
|
printer: n,
|
19767
19766
|
history: v
|
19768
|
-
}) : null, d = h ? h.observable : qe.of(), m =
|
19767
|
+
}) : null, d = h ? h.observable : qe.of(), m = kp(200).pipe(
|
19769
19768
|
xe((s) => ({
|
19770
19769
|
type: "tick",
|
19771
19770
|
number: s
|
@@ -19804,7 +19803,7 @@ Interrupt the agent with `, { foreground: "gray" })}${n.print("Ctrl+C", { foregr
|
|
19804
19803
|
Math.floor(b / 2),
|
19805
19804
|
5
|
19806
19805
|
);
|
19807
|
-
return
|
19806
|
+
return qp(
|
19808
19807
|
{
|
19809
19808
|
messages: p.messages,
|
19810
19809
|
toolResults: p.toolResults
|
@@ -19866,14 +19865,14 @@ Interrupt the agent with `, { foreground: "gray" })}${n.print("Ctrl+C", { foregr
|
|
19866
19865
|
case "initializing":
|
19867
19866
|
return o ? s : (f.next({ type: "initialized" }), { ...s, type: "awaiting-agent" });
|
19868
19867
|
case "awaiting-agent":
|
19869
|
-
return
|
19868
|
+
return Hw(
|
19870
19869
|
i,
|
19871
19870
|
p.number,
|
19872
19871
|
s.statusMessage,
|
19873
19872
|
s.tokenUsage ?? void 0
|
19874
19873
|
), s;
|
19875
19874
|
case "accepting-message": {
|
19876
|
-
const b =
|
19875
|
+
const b = Uw(s, n);
|
19877
19876
|
return h?.setRightStatus(b), s;
|
19878
19877
|
}
|
19879
19878
|
default:
|
@@ -19931,7 +19930,7 @@ Interrupt the agent with `, { foreground: "gray" })}${n.print("Ctrl+C", { foregr
|
|
19931
19930
|
for (const { useBlock: b, toAllow: w } of p.confirmation.tools) {
|
19932
19931
|
const _ = w ? ["n", "y", "!"] : ["n", "y"];
|
19933
19932
|
Ur(
|
19934
|
-
|
19933
|
+
jp(n, b),
|
19935
19934
|
_
|
19936
19935
|
).then((x) => {
|
19937
19936
|
e.write(`
|
@@ -20111,7 +20110,7 @@ The ${n.print(b.name, { foreground: "green" })} tool call is not allowed by defa
|
|
20111
20110
|
function Qr({ stderr: i }) {
|
20112
20111
|
i.write("\r\x1B[K");
|
20113
20112
|
}
|
20114
|
-
function
|
20113
|
+
function Hw({ printer: i, stderr: e }, t, n, r) {
|
20115
20114
|
const o = "◉◎";
|
20116
20115
|
e.write("\r\x1B[K");
|
20117
20116
|
const u = n ? n.substring(0, 80).replace(/\n/g, " ") : "", l = (o[t % o.length] ?? "") + " " + u + " ";
|
@@ -20122,14 +20121,14 @@ function Uw({ printer: i, stderr: e }, t, n, r) {
|
|
20122
20121
|
}
|
20123
20122
|
function Gs(i, e) {
|
20124
20123
|
const t = i.used / i.maxAvailable, n = Math.round(t * 100), r = Math.max(0, Math.min(n, 100)), o = "▁▂▃▄▅▆▇█", u = Math.floor(r * o.length / 100), l = Math.max(0, Math.min(u, o.length - 1)), a = o[l], c = `${r}% ┃${a}┃`;
|
20125
|
-
return t >=
|
20124
|
+
return t >= zw ? e.print(c, { foreground: "red" }) : t >= Bw ? e.print(c, { foreground: "yellow" }) : c;
|
20126
20125
|
}
|
20127
|
-
function
|
20126
|
+
function Uw(i, e) {
|
20128
20127
|
const t = [];
|
20129
20128
|
return i.updateState === "updating" ? t.push("⬇ Updating Amp...") : i.updateState === "success" ? t.push(e.print("✓ Amp updated. Restart to apply.", { foreground: "green" })) : i.updateState === "error" && t.push(e.print("✗ Amp update failed.", { foreground: "red" })), i.tokenUsage && t.push(Gs(i.tokenUsage, e)), t.join(" ");
|
20130
20129
|
}
|
20131
|
-
const
|
20132
|
-
|
20130
|
+
const Bw = 0.8, zw = 0.9, dh = "> ", bs = me.join(
|
20131
|
+
ly || me.join(process.env.HOME || process.cwd(), ".local", "state"),
|
20133
20132
|
"amp",
|
20134
20133
|
"last-thread-id"
|
20135
20134
|
);
|
@@ -20147,7 +20146,7 @@ async function ph() {
|
|
20147
20146
|
return null;
|
20148
20147
|
}
|
20149
20148
|
}
|
20150
|
-
const
|
20149
|
+
const Vw = [
|
20151
20150
|
{
|
20152
20151
|
name: "notifications",
|
20153
20152
|
long: "notifications",
|
@@ -20189,7 +20188,7 @@ const Ww = [
|
|
20189
20188
|
hidden: !0
|
20190
20189
|
}
|
20191
20190
|
];
|
20192
|
-
function
|
20191
|
+
function Ww(i, e) {
|
20193
20192
|
const t = e.args[0], n = e.commands.map((o) => o.name());
|
20194
20193
|
if (t && !t.includes(" ") && t.length < 30 && !/[./\\]/.test(t)) {
|
20195
20194
|
const o = n.filter(
|
@@ -20207,9 +20206,9 @@ function Gw(i, e) {
|
|
20207
20206
|
), process.exit(1);
|
20208
20207
|
}
|
20209
20208
|
}
|
20210
|
-
class
|
20209
|
+
class Gw {
|
20211
20210
|
async environment() {
|
20212
|
-
const e = process.cwd(), t = hi.file(e), n = await
|
20211
|
+
const e = process.cwd(), t = hi.file(e), n = await Vv(t, {
|
20213
20212
|
workingDirectory: t
|
20214
20213
|
});
|
20215
20214
|
return {
|
@@ -20230,7 +20229,7 @@ async function Hn(i, e) {
|
|
20230
20229
|
Jn({
|
20231
20230
|
logLevel: e.logLevel || process.env.AMP_LOG_LEVEL,
|
20232
20231
|
logFile: e.logFile || process.env.AMP_LOG_FILE
|
20233
|
-
}),
|
20232
|
+
}), Bp("0.0.1749096401-g3a8a18");
|
20234
20233
|
const t = e.settingsFile ?? process.env.AMP_SETTINGS_FILE;
|
20235
20234
|
K.info("Using settings file", { settingsFile: t });
|
20236
20235
|
const n = Nn(), r = sd({ settingsFile: t }), o = process.env.AMP_API_KEY;
|
@@ -20240,17 +20239,17 @@ async function Hn(i, e) {
|
|
20240
20239
|
secretStorage: n,
|
20241
20240
|
workspaceRoots: qe.of([hi.file(process.cwd())]),
|
20242
20241
|
defaultAmpURL: i.ampURL
|
20243
|
-
}), l = new
|
20242
|
+
}), l = new Gw(), a = Ph(), c = Nv({ configService: u, toolService: a });
|
20244
20243
|
td(a);
|
20245
20244
|
let f, y;
|
20246
20245
|
if (i.isInteractiveMode) {
|
20247
20246
|
f = new Yf(), await f.start();
|
20248
20247
|
try {
|
20249
|
-
await
|
20248
|
+
await ub(f, process.cwd());
|
20250
20249
|
} catch (s) {
|
20251
20250
|
K.error("Failed to index files for fuzzy completion", s);
|
20252
20251
|
}
|
20253
|
-
y =
|
20252
|
+
y = lb(f, process.cwd());
|
20254
20253
|
} else
|
20255
20254
|
f = new class extends Yf {
|
20256
20255
|
async start() {
|
@@ -20263,10 +20262,10 @@ async function Hn(i, e) {
|
|
20263
20262
|
}(), y = { [Symbol.dispose]: () => {
|
20264
20263
|
} };
|
20265
20264
|
await n.get("apiKey", i.ampURL) || ($e.write(`No API key found. Starting login flow...
|
20266
|
-
`), await
|
20267
|
-
const v =
|
20265
|
+
`), await Kw(i, n) || process.exit(1));
|
20266
|
+
const v = Bv(), h = new Jv(v), d = new Gv(v), m = new Up(h);
|
20268
20267
|
let g;
|
20269
|
-
return K.info("Starting Amp background services"), g =
|
20268
|
+
return K.info("Starting Amp background services"), g = Yv({
|
20270
20269
|
threadService: h,
|
20271
20270
|
threadHistoryService: d,
|
20272
20271
|
isExtensionDevelopment: !1
|
@@ -20286,12 +20285,12 @@ async function Hn(i, e) {
|
|
20286
20285
|
fuzzyServer: f
|
20287
20286
|
};
|
20288
20287
|
}
|
20289
|
-
async function
|
20288
|
+
async function Kw(i, e) {
|
20290
20289
|
return i.isInteractiveMode && !(await Ur("Would you like to log in to Amp?", ["y", "n"]) == "y") ? ($e.write(`Login cancelled. Run the command again to retry.
|
20291
20290
|
`), !1) : await Kd(i, e);
|
20292
20291
|
}
|
20293
20292
|
async function Kd(i, e) {
|
20294
|
-
const t =
|
20293
|
+
const t = nm(32).toString("hex"), n = await cb(i.ampURL, t);
|
20295
20294
|
$e.write(
|
20296
20295
|
`If your browser doesn't open automatically, visit:
|
20297
20296
|
|
@@ -20303,7 +20302,7 @@ ${i.printer.print(n, {
|
|
20303
20302
|
`
|
20304
20303
|
);
|
20305
20304
|
try {
|
20306
|
-
await
|
20305
|
+
await pb(n);
|
20307
20306
|
} catch {
|
20308
20307
|
we.write(
|
20309
20308
|
`${i.printer.print("Error opening browser!", { foreground: "red" })}
|
@@ -20316,8 +20315,8 @@ ${i.printer.print(n, {
|
|
20316
20315
|
|
20317
20316
|
`);
|
20318
20317
|
try {
|
20319
|
-
const r = await
|
20320
|
-
return await
|
20318
|
+
const r = await hb(t);
|
20319
|
+
return await db(r, i.ampURL, e), $e.write(`
|
20321
20320
|
Login successful! You can now use the Amp CLI.
|
20322
20321
|
`), !0;
|
20323
20322
|
} catch (r) {
|
@@ -20326,11 +20325,11 @@ Login failed: ${r instanceof Error ? r.message : String(r)}
|
|
20326
20325
|
`), !1;
|
20327
20326
|
}
|
20328
20327
|
}
|
20329
|
-
function
|
20328
|
+
function Jw(i) {
|
20330
20329
|
const e = new Sl().name("amp").description("AI-powered coding assistant").option("--thread-id [THREAD_ID]", "ID of the thread to continue running", void 0);
|
20331
20330
|
e.option("-V, --version", "output the version number", () => {
|
20332
20331
|
if (i.isTTY) {
|
20333
|
-
const o = "0.0.
|
20332
|
+
const o = "0.0.1749096401-g3a8a18".match(/^(\d+\.\d+)\.(\d+)-(.+)$/);
|
20334
20333
|
if (o) {
|
20335
20334
|
const [, , u] = o;
|
20336
20335
|
try {
|
@@ -20341,21 +20340,21 @@ function Yw(i) {
|
|
20341
20340
|
day: "numeric"
|
20342
20341
|
});
|
20343
20342
|
$e.write(
|
20344
|
-
`0.0.
|
20343
|
+
`0.0.1749096401-g3a8a18 ${i.printer.print(`(released ${a})`, { foreground: "gray" })}
|
20345
20344
|
`
|
20346
20345
|
);
|
20347
20346
|
} else
|
20348
|
-
$e.write(`0.0.
|
20347
|
+
$e.write(`0.0.1749096401-g3a8a18
|
20349
20348
|
`);
|
20350
20349
|
} catch {
|
20351
|
-
$e.write(`0.0.
|
20350
|
+
$e.write(`0.0.1749096401-g3a8a18
|
20352
20351
|
`);
|
20353
20352
|
}
|
20354
20353
|
} else
|
20355
|
-
$e.write(`0.0.
|
20354
|
+
$e.write(`0.0.1749096401-g3a8a18
|
20356
20355
|
`);
|
20357
20356
|
} else
|
20358
|
-
$e.write(`0.0.
|
20357
|
+
$e.write(`0.0.1749096401-g3a8a18
|
20359
20358
|
`);
|
20360
20359
|
process.exit(0);
|
20361
20360
|
}), e.addHelpText(
|
@@ -20563,7 +20562,7 @@ Provide a thread ID as an argument or run a thread first.
|
|
20563
20562
|
const p = s.title || "Untitled";
|
20564
20563
|
let b = "Team";
|
20565
20564
|
s.meta.private ? b = "Private" : s.meta.public && (b = "Public");
|
20566
|
-
const w =
|
20565
|
+
const w = Qw(new Date(s.updatedAt));
|
20567
20566
|
return [
|
20568
20567
|
p,
|
20569
20568
|
w,
|
@@ -20572,7 +20571,7 @@ Provide a thread ID as an argument or run a thread first.
|
|
20572
20571
|
s.id
|
20573
20572
|
];
|
20574
20573
|
});
|
20575
|
-
|
20574
|
+
Zw(m, g, {
|
20576
20575
|
columnFormatters: [
|
20577
20576
|
(s, p) => (s.length > p ? s.substring(0, p - 3) + "..." : s).padEnd(p),
|
20578
20577
|
void 0,
|
@@ -20630,18 +20629,18 @@ Provide a thread ID as an argument or run a thread first.
|
|
20630
20629
|
`), process.exit(1);
|
20631
20630
|
}
|
20632
20631
|
});
|
20633
|
-
for (const o of
|
20632
|
+
for (const o of Vw)
|
20634
20633
|
if (o.type === "flag")
|
20635
20634
|
e.option(`--${o.long}`, o.description(!0)), e.option(`--no-${o.long}`, o.description(!1));
|
20636
20635
|
else {
|
20637
|
-
const u = new
|
20636
|
+
const u = new ay(`--${o.long} <value>`, o.description).default(
|
20638
20637
|
"default" in o ? o.default : void 0
|
20639
20638
|
);
|
20640
20639
|
u.hidden = "hidden" in o ? !!o.hidden : !1, e.addOption(u);
|
20641
20640
|
}
|
20642
20641
|
e.action(async (o, u) => {
|
20643
20642
|
const l = o, a = cr(l);
|
20644
|
-
u.args.length > 0 &&
|
20643
|
+
u.args.length > 0 && Ww(a, u), o.threadId !== void 0 && (we.write(
|
20645
20644
|
a.printer.print("Error: ", { foreground: "red", style: "bold" }) + `The --thread-id option has been deprecated.
|
20646
20645
|
Use ` + a.printer.print("amp threads continue [THREAD_ID]", {
|
20647
20646
|
foreground: "green"
|
@@ -20660,7 +20659,7 @@ Use ` + a.printer.print("amp threads continue [THREAD_ID]", {
|
|
20660
20659
|
u.printer.print("Generating support bundle...", { foreground: "blue" }) + `
|
20661
20660
|
`
|
20662
20661
|
);
|
20663
|
-
const a = await new
|
20662
|
+
const a = await new yy().generate({
|
20664
20663
|
outputDir: o.outputDir,
|
20665
20664
|
includeFullLogs: o.includeLogs
|
20666
20665
|
});
|
@@ -20685,7 +20684,7 @@ Use ` + a.printer.print("amp threads continue [THREAD_ID]", {
|
|
20685
20684
|
}), e.addCommand(r), e;
|
20686
20685
|
}
|
20687
20686
|
async function mh(i, e) {
|
20688
|
-
const t = await
|
20687
|
+
const t = await uy(), n = e.notifications !== void 0 ? !!e.notifications : i.isInteractiveMode, r = await Hn(i, e);
|
20689
20688
|
let o = is();
|
20690
20689
|
if (e.threadId) {
|
20691
20690
|
Eh(e.threadId) || (we.write(`Invalid thread ID given.
|
@@ -20715,7 +20714,7 @@ async function mh(i, e) {
|
|
20715
20714
|
let u;
|
20716
20715
|
switch (e.format) {
|
20717
20716
|
case "ui":
|
20718
|
-
u =
|
20717
|
+
u = Nw({
|
20719
20718
|
stdout: process.stdout,
|
20720
20719
|
stderr: process.stderr,
|
20721
20720
|
printer: i.printer,
|
@@ -20731,21 +20730,21 @@ async function mh(i, e) {
|
|
20731
20730
|
(i.isInteractiveMode || !t) && (we.write(
|
20732
20731
|
`JSONL UI requires non-interactive mode with a message piped to stdin.
|
20733
20732
|
`
|
20734
|
-
), process.exit(1)), u =
|
20733
|
+
), process.exit(1)), u = Cw({
|
20735
20734
|
threadID: o,
|
20736
20735
|
pipedInput: t,
|
20737
20736
|
stdout: process.stdout
|
20738
20737
|
});
|
20739
20738
|
break;
|
20740
20739
|
}
|
20741
|
-
await
|
20740
|
+
await Ew(r, {
|
20742
20741
|
threadID: o,
|
20743
20742
|
isContinued: !!e.threadId,
|
20744
20743
|
ui: u
|
20745
20744
|
}), process.exit(0);
|
20746
20745
|
}
|
20747
20746
|
function cr(i) {
|
20748
|
-
const e = process.stdin.isTTY || !1, t = typeof process < "u" && process.stdout?.isTTY && process.stderr?.isTTY, n = process.env.AMP_URL || Dr, o = (i?.color !== void 0 ? i.color : t) ?
|
20747
|
+
const e = process.stdin.isTTY || !1, t = typeof process < "u" && process.stdout?.isTTY && process.stderr?.isTTY, n = process.env.AMP_URL || Dr, o = (i?.color !== void 0 ? i.color : t) ? Np : Hp;
|
20749
20748
|
return {
|
20750
20749
|
isInteractiveMode: e,
|
20751
20750
|
isTTY: t,
|
@@ -20753,7 +20752,7 @@ function cr(i) {
|
|
20753
20752
|
ampURL: n
|
20754
20753
|
};
|
20755
20754
|
}
|
20756
|
-
async function
|
20755
|
+
async function Yw() {
|
20757
20756
|
Jn({
|
20758
20757
|
logLevel: process.env.AMP_LOG_LEVEL,
|
20759
20758
|
logFile: process.env.AMP_LOG_FILE
|
@@ -20762,17 +20761,17 @@ async function Qw() {
|
|
20762
20761
|
`
|
20763
20762
|
), process.exit(1));
|
20764
20763
|
const i = cr();
|
20765
|
-
await
|
20764
|
+
await Jw(i).parseAsync(process.argv);
|
20766
20765
|
}
|
20767
|
-
|
20766
|
+
Yw().catch((i) => {
|
20768
20767
|
K.error("Fatal error", i), we.write(`Fatal error: ${i.message}: ${i.stack}
|
20769
20768
|
`), process.exit(1);
|
20770
20769
|
});
|
20771
|
-
function
|
20770
|
+
function Qw(i) {
|
20772
20771
|
const t = (/* @__PURE__ */ new Date()).getTime() - i.getTime(), n = Math.floor(t / 1e3), r = Math.floor(n / 60), o = Math.floor(r / 60), u = Math.floor(o / 24), l = Math.floor(u / 7), a = Math.floor(u / 30), c = Math.floor(u / 365);
|
20773
20772
|
return n < 60 ? n <= 1 ? "now" : `${n}s ago` : r < 60 ? `${r}m ago` : o < 24 ? `${o}h ago` : u < 7 ? `${u}d ago` : l < 4 ? `${l}w ago` : a < 12 ? `${a}mo ago` : `${c}y ago`;
|
20774
20773
|
}
|
20775
|
-
function
|
20774
|
+
function Zw(i, e, t = {}) {
|
20776
20775
|
const { columnFormatters: n = [], minimumTruncatedColumnWidth: r = 20, truncateColumnIndex: o } = t;
|
20777
20776
|
for (let g = 0; g < e.length; g++)
|
20778
20777
|
if (e[g].length !== i.length)
|
@@ -20800,7 +20799,7 @@ function Xw(i, e, t = {}) {
|
|
20800
20799
|
}
|
20801
20800
|
}
|
20802
20801
|
export {
|
20803
|
-
|
20804
|
-
|
20802
|
+
Tm as J,
|
20803
|
+
Xv as r
|
20805
20804
|
};
|
20806
|
-
//# sourceMappingURL=main-
|
20805
|
+
//# sourceMappingURL=main-CS_jpDsP.js.map
|