scream-code 0.18.6 → 0.18.7
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/{app-Ca2pwAk7.mjs → app-IU7G9gs0.mjs} +52 -17
- package/dist/{dispatch-BgO7wAf9.mjs → dispatch-7Mas_Tvb.mjs} +132 -114
- package/dist/{dispatch-0mihbsV3.mjs → dispatch-BqBnrIMj.mjs} +1 -1
- package/dist/main.mjs +1 -1
- package/dist/{src-C3oCiVNb.mjs → src-CFHysu0q.mjs} +11 -11
- package/dist/{src-C7C9e5Ds.mjs → src-CQwXASmd.mjs} +3096 -14
- package/dist/{src-qit_jRUM.mjs → src-ChTWl9Cn.mjs} +1 -1
- package/dist/{text-input-dialog-DWepgNF4.mjs → text-input-dialog-D7dm6kak.mjs} +1 -1
- package/dist/{text-input-dialog-BvbqjvzB.mjs → text-input-dialog-gDr3i7xz.mjs} +2 -0
- package/package.json +1 -1
|
@@ -4,25 +4,25 @@ import { dirname as __cjsShimDirname } from 'node:path';
|
|
|
4
4
|
const __filename = __cjsShimFileURLToPath(import.meta.url);
|
|
5
5
|
const __dirname = __cjsShimDirname(__filename);
|
|
6
6
|
import { i as __require, o as __toESM, r as __exportAll, t as __commonJSMin } from "./chunk-D90kvbyJ.mjs";
|
|
7
|
-
import { A as sharedMemoStore, B as buildProjectTagCloud, C as applyConsolidation, D as parseMemoryMemos, E as buildExitExtractionPrompt, F as probeLocalEmbeddingSupport, G as join$1, H as basename$1, I as createMemoryMemo, J as relative$1, K as normalize, L as toSummary, M as clearEmbeddingModelCache, N as createFastEmbedEngine, O as stripMemoryTags, P as hasEmbeddingModelCache$1, R as generateTags, S as DreamTracker, T as EXIT_EXTRACTION_SYSTEM_PROMPT, U as dirname$2, V as rankMemos, W as isAbsolute$1, Y as resolve$2, a as isSupportedFile, b as sharedKnowledgeStoreReady, i as ingestFile, j as classifyEmbeddingFailure, k as MemoryMemoStore, q as parse$7, r as ingestDirectory, t as multiSearch, w as buildConsolidationPlan, y as sharedKnowledgeStore, z as normalizeTags } from "./src-
|
|
7
|
+
import { A as sharedMemoStore, B as buildProjectTagCloud, C as applyConsolidation, D as parseMemoryMemos, E as buildExitExtractionPrompt, F as probeLocalEmbeddingSupport, G as join$1, H as basename$1, I as createMemoryMemo, J as relative$1, K as normalize, L as toSummary, M as clearEmbeddingModelCache, N as createFastEmbedEngine, O as stripMemoryTags, P as hasEmbeddingModelCache$1, R as generateTags, S as DreamTracker, T as EXIT_EXTRACTION_SYSTEM_PROMPT, U as dirname$2, V as rankMemos, W as isAbsolute$1, Y as resolve$2, a as isSupportedFile, b as sharedKnowledgeStoreReady, i as ingestFile, j as classifyEmbeddingFailure, k as MemoryMemoStore, q as parse$7, r as ingestDirectory, t as multiSearch, w as buildConsolidationPlan, y as sharedKnowledgeStore, z as normalizeTags } from "./src-CQwXASmd.mjs";
|
|
8
8
|
import { n as require_base64_js, t as XMLParser } from "./XMLParser-DFAnGqkc.mjs";
|
|
9
|
-
import { a as assertScreamHostIdentity, i as t, n as getLocale, o as createScreamDefaultHeaders, r as setLocale, t as TextInputDialogComponent } from "./text-input-dialog-
|
|
9
|
+
import { a as assertScreamHostIdentity, i as t, n as getLocale, o as createScreamDefaultHeaders, r as setLocale, t as TextInputDialogComponent } from "./text-input-dialog-gDr3i7xz.mjs";
|
|
10
10
|
import { createRequire } from "node:module";
|
|
11
11
|
import { createHash, randomBytes, randomInt, randomUUID } from "node:crypto";
|
|
12
12
|
import * as fs$1 from "node:fs/promises";
|
|
13
|
-
import
|
|
13
|
+
import ro, { access, appendFile, chmod, copyFile, cp, lstat, mkdir, mkdtemp, open, opendir, readFile, readdir, realpath, rename, rm, stat, unlink, writeFile } from "node:fs/promises";
|
|
14
14
|
import I, { createWriteStream } from "fs";
|
|
15
|
-
import
|
|
15
|
+
import Qr, { EventEmitter } from "events";
|
|
16
16
|
import * as path$1$1 from "path";
|
|
17
|
-
import
|
|
17
|
+
import js, { dirname, parse } from "path";
|
|
18
18
|
import { Buffer as Buffer$1 } from "buffer";
|
|
19
19
|
import * as fs$11 from "fs/promises";
|
|
20
20
|
import { writeFile as writeFile$1 } from "fs/promises";
|
|
21
|
-
import
|
|
21
|
+
import Cs, { PassThrough, Readable } from "node:stream";
|
|
22
22
|
import { finished, pipeline as pipeline$1 } from "node:stream/promises";
|
|
23
23
|
import * as NodeWs from "ws";
|
|
24
24
|
import * as fs$10 from "node:fs";
|
|
25
|
-
import
|
|
25
|
+
import Kt, { appendFileSync, chmodSync, closeSync, constants, createReadStream, createWriteStream as createWriteStream$1, existsSync, fchmodSync, fsyncSync, mkdirSync, openSync, promises, readFileSync, readSync, readdirSync, renameSync, statSync, unlinkSync, writeFileSync, writeSync } from "node:fs";
|
|
26
26
|
import * as path$8 from "node:path";
|
|
27
27
|
import path, { basename, dirname as dirname$1, extname, isAbsolute, join, posix, relative, resolve, sep, win32 } from "node:path";
|
|
28
28
|
import * as nodeOs from "node:os";
|
|
@@ -30,13 +30,13 @@ import { homedir, release, tmpdir } from "node:os";
|
|
|
30
30
|
import { z } from "zod";
|
|
31
31
|
import { exec, execFile, execSync, spawn, spawnSync } from "node:child_process";
|
|
32
32
|
import { promisify } from "node:util";
|
|
33
|
-
import * as vs from "zlib";
|
|
34
|
-
import Qr from "zlib";
|
|
35
|
-
import { diffLines, diffWords } from "diff";
|
|
36
33
|
import { EventEmitter as EventEmitter$1 } from "node:events";
|
|
37
34
|
import { StringDecoder } from "node:string_decoder";
|
|
38
|
-
import
|
|
39
|
-
import
|
|
35
|
+
import zi from "assert";
|
|
36
|
+
import * as vs from "zlib";
|
|
37
|
+
import en from "zlib";
|
|
38
|
+
import co from "node:assert";
|
|
39
|
+
import { diffLines, diffWords } from "diff";
|
|
40
40
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
41
41
|
import { CodemodeSandbox, CodemodeSourceError, parseCodemodeSource, renderDeclarations } from "@earendil-works/pi-codemode";
|
|
42
42
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
@@ -10494,7 +10494,7 @@ var require_gaxios = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10494
10494
|
}
|
|
10495
10495
|
static async #getFetch() {
|
|
10496
10496
|
const hasWindow = typeof window !== "undefined" && !!window;
|
|
10497
|
-
this.#fetch ||= hasWindow ? window.fetch : (await import("./src-
|
|
10497
|
+
this.#fetch ||= hasWindow ? window.fetch : (await import("./src-CFHysu0q.mjs")).default;
|
|
10498
10498
|
return this.#fetch;
|
|
10499
10499
|
}
|
|
10500
10500
|
/**
|
|
@@ -62231,7 +62231,7 @@ var KnowledgeLookupTool = class {
|
|
|
62231
62231
|
const llm = { generate: async (systemPrompt, userPrompt) => {
|
|
62232
62232
|
return this.agent.generateText(systemPrompt, userPrompt);
|
|
62233
62233
|
} };
|
|
62234
|
-
const { multiSearchWithTrace } = await import("./src-
|
|
62234
|
+
const { multiSearchWithTrace } = await import("./src-ChTWl9Cn.mjs");
|
|
62235
62235
|
const { results, trace } = await multiSearchWithTrace(store, llm, query, {
|
|
62236
62236
|
topK,
|
|
62237
62237
|
skipLlm: args.deep !== true
|
|
@@ -71416,7 +71416,7 @@ var Mr = (s, t) => {
|
|
|
71416
71416
|
var Ts = typeof process == "object" && process ? process : {
|
|
71417
71417
|
stdout: null,
|
|
71418
71418
|
stderr: null
|
|
71419
|
-
}, Pr = (s) => !!s && typeof s == "object" && (s instanceof A || s instanceof
|
|
71419
|
+
}, Pr = (s) => !!s && typeof s == "object" && (s instanceof A || s instanceof Cs || zr(s) || Ur(s)), zr = (s) => !!s && typeof s == "object" && s instanceof EventEmitter$1 && typeof s.pipe == "function" && s.pipe !== Cs.Writable.prototype.pipe, Ur = (s) => !!s && typeof s == "object" && s instanceof EventEmitter$1 && typeof s.write == "function" && typeof s.end == "function", q = Symbol("EOF"), Q = Symbol("maybeEmitEnd"), rt = Symbol("emittedEnd"), Ne = Symbol("emittingEnd"), Qt = Symbol("emittedError"), De = Symbol("closed"), xs = Symbol("read"), Ae = Symbol("flush"), Ls = Symbol("flushChunk"), z$2 = Symbol("encoding"), Mt = Symbol("decoder"), g = Symbol("flowing"), Jt = Symbol("paused"), Bt = Symbol("resume"), b = Symbol("buffer"), D = Symbol("pipes"), _ = Symbol("bufferLength"), gi = Symbol("bufferPush"), Ie = Symbol("bufferShift"), L = Symbol("objectMode"), w = Symbol("destroyed"), bi = Symbol("error"), _i = Symbol("emitData"), Ns = Symbol("emitEnd"), Oi = Symbol("emitEnd2"), Z = Symbol("async"), Ti = Symbol("abort"), Ce = Symbol("aborted"), jt = Symbol("signal"), Rt = Symbol("dataListeners"), C = Symbol("discarded"), te = (s) => Promise.resolve().then(s), Hr = (s) => s(), Wr = (s) => s === "end" || s === "finish" || s === "prefinish", Gr = (s) => s instanceof ArrayBuffer || !!s && typeof s == "object" && s.constructor && s.constructor.name === "ArrayBuffer" && s.byteLength >= 0, Zr = (s) => !Buffer.isBuffer(s) && ArrayBuffer.isView(s), ke = class {
|
|
71420
71420
|
src;
|
|
71421
71421
|
dest;
|
|
71422
71422
|
opts;
|
|
@@ -71834,7 +71834,7 @@ var $r = I.writev, ot = Symbol("_autoClose"), H = Symbol("_close"), ee = Symbol(
|
|
|
71834
71834
|
this[m] = void 0, I.closeSync(t), this.emit("close");
|
|
71835
71835
|
}
|
|
71836
71836
|
}
|
|
71837
|
-
}, tt = class extends
|
|
71837
|
+
}, tt = class extends Qr {
|
|
71838
71838
|
readable = !1;
|
|
71839
71839
|
writable = !0;
|
|
71840
71840
|
[bt] = !1;
|
|
@@ -71953,7 +71953,7 @@ var Xr = new Map([
|
|
|
71953
71953
|
["L", "follow"],
|
|
71954
71954
|
["h", "follow"],
|
|
71955
71955
|
["onentry", "onReadEntry"]
|
|
71956
|
-
]), As = (s) => !!s.sync && !!s.file, Is = (s) => !s.sync && !!s.file, Cs = (s) => !!s.sync && !s.file, ks = (s) => !s.sync && !s.file;
|
|
71956
|
+
]), As = (s) => !!s.sync && !!s.file, Is = (s) => !s.sync && !!s.file, Cs$1 = (s) => !!s.sync && !s.file, ks = (s) => !s.sync && !s.file;
|
|
71957
71957
|
var Fs = (s) => !!s.file;
|
|
71958
71958
|
var qr = (s) => {
|
|
71959
71959
|
return Xr.get(s) || s;
|
|
@@ -71975,7 +71975,7 @@ var K = (s, t, e, i, r) => Object.assign((n = [], o, h) => {
|
|
|
71975
71975
|
} else if (Is(a)) {
|
|
71976
71976
|
let l = t(a, o);
|
|
71977
71977
|
return h ? l.then(() => h(), h) : l;
|
|
71978
|
-
} else if (Cs(a)) {
|
|
71978
|
+
} else if (Cs$1(a)) {
|
|
71979
71979
|
if (typeof h == "function") throw new TypeError("callback not supported for sync tar functions");
|
|
71980
71980
|
return e(a, o);
|
|
71981
71981
|
} else if (ks(a)) {
|
|
@@ -71990,7 +71990,7 @@ var K = (s, t, e, i, r) => Object.assign((n = [], o, h) => {
|
|
|
71990
71990
|
asyncNoFile: i,
|
|
71991
71991
|
validate: r
|
|
71992
71992
|
});
|
|
71993
|
-
var Jr =
|
|
71993
|
+
var Jr = en.constants || { ZLIB_VERNUM: 4736 }, M = Object.freeze(Object.assign(Object.create(null), {
|
|
71994
71994
|
Z_NO_FLUSH: 0,
|
|
71995
71995
|
Z_PARTIAL_FLUSH: 1,
|
|
71996
71996
|
Z_SYNC_FLUSH: 2,
|
|
@@ -72142,7 +72142,7 @@ var jr = Buffer$1.concat, Ms = Object.getOwnPropertyDescriptor(Buffer$1, "concat
|
|
|
72142
72142
|
this.#e && (this.#e.close(), this.#e = void 0, this.emit("close"));
|
|
72143
72143
|
}
|
|
72144
72144
|
reset() {
|
|
72145
|
-
if (!this.#t) return
|
|
72145
|
+
if (!this.#t) return zi(this.#e, "zlib binding closed"), this.#e.reset?.();
|
|
72146
72146
|
}
|
|
72147
72147
|
flush(t) {
|
|
72148
72148
|
this.ended || (typeof t != "number" && (t = this.#r), this.write(Object.assign(Buffer$1.alloc(0), { [Bi]: t })));
|
|
@@ -72158,7 +72158,7 @@ var jr = Buffer$1.concat, Ms = Object.getOwnPropertyDescriptor(Buffer$1, "concat
|
|
|
72158
72158
|
}
|
|
72159
72159
|
write(t, e, i) {
|
|
72160
72160
|
if (typeof e == "function" && (i = e, e = "utf8"), typeof t == "string" && (t = Buffer$1.from(t, e)), this.#t) return;
|
|
72161
|
-
|
|
72161
|
+
zi(this.#e, "zlib binding closed");
|
|
72162
72162
|
let r = this.#e._handle, n = r.close;
|
|
72163
72163
|
r.close = () => {};
|
|
72164
72164
|
let o = this.#e.close;
|
|
@@ -72192,7 +72192,7 @@ var jr = Buffer$1.concat, Ms = Object.getOwnPropertyDescriptor(Buffer$1, "concat
|
|
|
72192
72192
|
if (!this.handle) throw new Error("cannot switch params when binding is closed");
|
|
72193
72193
|
if (!this.handle.params) throw new Error("not supported in this implementation");
|
|
72194
72194
|
if (this.#t !== t || this.#i !== e) {
|
|
72195
|
-
this.flush(M.Z_SYNC_FLUSH),
|
|
72195
|
+
this.flush(M.Z_SYNC_FLUSH), zi(this.handle, "zlib binding closed");
|
|
72196
72196
|
let i = this.handle.flush;
|
|
72197
72197
|
this.handle.flush = (r, n) => {
|
|
72198
72198
|
typeof r == "function" && (n = r, r = this.flushFlag), this.flush(r), n?.();
|
|
@@ -72541,7 +72541,7 @@ var On = 1024 * 1024, Ki = Buffer.from([31, 139]), Vi = Buffer.from([
|
|
|
72541
72541
|
181,
|
|
72542
72542
|
47,
|
|
72543
72543
|
253
|
|
72544
|
-
]), Tn = Math.max(Ki.length, Vi.length), B = Symbol("state"), Dt = Symbol("writeEntry"), et = Symbol("readEntry"), Wi = Symbol("nextEntry"), Hs = Symbol("processEntry"), V = Symbol("extendedHeader"), ae = Symbol("globalExtendedHeader"), ft = Symbol("meta"), Ws = Symbol("emitMeta"), p = Symbol("buffer"), it = Symbol("queue"), dt = Symbol("ended"), Gi = Symbol("emittedEnd"), At = Symbol("emit"), y = Symbol("unzip"), $e = Symbol("consumeChunk"), Xe = Symbol("consumeChunkSub"), Zi = Symbol("consumeBody"), Gs = Symbol("consumeMeta"), Zs = Symbol("consumeHeader"), le = Symbol("consuming"), Yi = Symbol("bufferConcat"), qe = Symbol("maybeEnd"), Kt = Symbol("writing"), ut = Symbol("aborted"), Qe = Symbol("onDone"), It = Symbol("sawValidEntry"), Je = Symbol("sawNullBlock"), je = Symbol("sawEOF"), Ys = Symbol("closeStream"), xn = () => !0, st = class extends EventEmitter {
|
|
72544
|
+
]), Tn = Math.max(Ki.length, Vi.length), B = Symbol("state"), Dt = Symbol("writeEntry"), et = Symbol("readEntry"), Wi = Symbol("nextEntry"), Hs = Symbol("processEntry"), V = Symbol("extendedHeader"), ae = Symbol("globalExtendedHeader"), ft = Symbol("meta"), Ws = Symbol("emitMeta"), p = Symbol("buffer"), it = Symbol("queue"), dt = Symbol("ended"), Gi = Symbol("emittedEnd"), At = Symbol("emit"), y = Symbol("unzip"), $e = Symbol("consumeChunk"), Xe = Symbol("consumeChunkSub"), Zi = Symbol("consumeBody"), Gs = Symbol("consumeMeta"), Zs = Symbol("consumeHeader"), le = Symbol("consuming"), Yi = Symbol("bufferConcat"), qe = Symbol("maybeEnd"), Kt$1 = Symbol("writing"), ut = Symbol("aborted"), Qe = Symbol("onDone"), It = Symbol("sawValidEntry"), Je = Symbol("sawNullBlock"), je = Symbol("sawEOF"), Ys = Symbol("closeStream"), xn = () => !0, st = class extends EventEmitter {
|
|
72545
72545
|
file;
|
|
72546
72546
|
strict;
|
|
72547
72547
|
maxMetaEntrySize;
|
|
@@ -72564,7 +72564,7 @@ var On = 1024 * 1024, Ki = Buffer.from([31, 139]), Vi = Buffer.from([
|
|
|
72564
72564
|
[It];
|
|
72565
72565
|
[Je] = !1;
|
|
72566
72566
|
[je] = !1;
|
|
72567
|
-
[Kt] = !1;
|
|
72567
|
+
[Kt$1] = !1;
|
|
72568
72568
|
[le] = !1;
|
|
72569
72569
|
[Gi] = !1;
|
|
72570
72570
|
constructor(t = {}) {
|
|
@@ -72625,7 +72625,7 @@ var On = 1024 * 1024, Ki = Buffer.from([31, 139]), Vi = Buffer.from([
|
|
|
72625
72625
|
while (this[Hs](this[it].shift()));
|
|
72626
72626
|
if (this[it].length === 0) {
|
|
72627
72627
|
let t = this[et];
|
|
72628
|
-
!t || t.flowing || t.size === t.remain ? this[Kt] || this.emit("drain") : t.once("drain", () => this.emit("drain"));
|
|
72628
|
+
!t || t.flowing || t.size === t.remain ? this[Kt$1] || this.emit("drain") : t.once("drain", () => this.emit("drain"));
|
|
72629
72629
|
}
|
|
72630
72630
|
}
|
|
72631
72631
|
[Zi](t, e) {
|
|
@@ -72696,12 +72696,12 @@ while (this[Hs](this[it].shift()));
|
|
|
72696
72696
|
let a = this[dt];
|
|
72697
72697
|
this[dt] = !1, this[y] = this[y] === void 0 ? new Ue({}) : o ? new Ke({}) : new Ge({}), this[y].on("data", (c) => this[$e](c)), this[y].on("error", (c) => this.abort(c)), this[y].on("end", () => {
|
|
72698
72698
|
this[dt] = !0, this[$e]();
|
|
72699
|
-
}), this[Kt] = !0;
|
|
72699
|
+
}), this[Kt$1] = !0;
|
|
72700
72700
|
let l = !!this[y][a ? "end" : "write"](t);
|
|
72701
|
-
return this[Kt] = !1, i?.(), l;
|
|
72701
|
+
return this[Kt$1] = !1, i?.(), l;
|
|
72702
72702
|
}
|
|
72703
72703
|
}
|
|
72704
|
-
this[Kt] = !0, this[y] ? this[y].write(t) : this[$e](t), this[Kt] = !1;
|
|
72704
|
+
this[Kt$1] = !0, this[y] ? this[y].write(t) : this[$e](t), this[Kt$1] = !1;
|
|
72705
72705
|
let n = this[it].length > 0 ? !1 : this[et] ? this[et].flowing : !0;
|
|
72706
72706
|
return !n && this[it].length === 0 && this[et]?.once("drain", () => this.emit("drain")), i?.(), n;
|
|
72707
72707
|
}
|
|
@@ -72782,15 +72782,15 @@ var Dn = (s) => {
|
|
|
72782
72782
|
}, An = (s) => {
|
|
72783
72783
|
let t = new st(s), e = s.file, i;
|
|
72784
72784
|
try {
|
|
72785
|
-
i =
|
|
72786
|
-
let r =
|
|
72785
|
+
i = Kt.openSync(e, "r");
|
|
72786
|
+
let r = Kt.fstatSync(i), n = s.maxReadSize || 16 * 1024 * 1024;
|
|
72787
72787
|
if (r.size < n) {
|
|
72788
|
-
let o = Buffer.allocUnsafe(r.size), h =
|
|
72788
|
+
let o = Buffer.allocUnsafe(r.size), h = Kt.readSync(i, o, 0, r.size, 0);
|
|
72789
72789
|
t.end(h === o.byteLength ? o : o.subarray(0, h));
|
|
72790
72790
|
} else {
|
|
72791
72791
|
let o = 0, h = Buffer.allocUnsafe(n);
|
|
72792
72792
|
for (; o < r.size;) {
|
|
72793
|
-
let a =
|
|
72793
|
+
let a = Kt.readSync(i, h, 0, n, o);
|
|
72794
72794
|
if (a === 0) break;
|
|
72795
72795
|
o += a, t.write(h.subarray(0, a));
|
|
72796
72796
|
}
|
|
@@ -72798,13 +72798,13 @@ var Dn = (s) => {
|
|
|
72798
72798
|
}
|
|
72799
72799
|
} finally {
|
|
72800
72800
|
if (typeof i == "number") try {
|
|
72801
|
-
|
|
72801
|
+
Kt.closeSync(i);
|
|
72802
72802
|
} catch {}
|
|
72803
72803
|
}
|
|
72804
72804
|
}, In = (s, t) => {
|
|
72805
72805
|
let e = new st(s), i = s.maxReadSize || 16 * 1024 * 1024, r = s.file;
|
|
72806
72806
|
return new Promise((o, h) => {
|
|
72807
|
-
e.on("error", h), e.on("end", o),
|
|
72807
|
+
e.on("error", h), e.on("end", o), Kt.stat(r, (a, l) => {
|
|
72808
72808
|
if (a) h(a);
|
|
72809
72809
|
else {
|
|
72810
72810
|
let c = new _t(r, {
|
|
@@ -72834,7 +72834,7 @@ var ti = [
|
|
|
72834
72834
|
"?",
|
|
72835
72835
|
":"
|
|
72836
72836
|
], qi = ti.map((s) => String.fromCodePoint(61440 + Number(s.codePointAt(0)))), Fn = new Map(ti.map((s, t) => [s, qi[t]])), vn = new Map(qi.map((s, t) => [s, ti[t]])), Qi = (s) => ti.reduce((t, e) => t.split(e).join(Fn.get(e)), s), Vs = (s) => qi.reduce((t, e) => t.split(e).join(vn.get(e)), s);
|
|
72837
|
-
var tr = (s, t) => t ? (s = f(s).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s) : f(s), Mn = 16 * 1024 * 1024, qs = Symbol("process"), Qs = Symbol("file"), Js = Symbol("directory"), ji = Symbol("symlink"), js = Symbol("hardlink"), fe = Symbol("header"), ei = Symbol("read"), ts = Symbol("lstat"), ii = Symbol("onlstat"), es = Symbol("onread"), is$2 = Symbol("onreadlink"), ss = Symbol("openfile"), rs = Symbol("onopenfile"), pt = Symbol("close"), si = Symbol("mode"), ns = Symbol("awaitDrain"), Ji = Symbol("ondrain"), X = Symbol("prefix"), de = class extends A {
|
|
72837
|
+
var tr = (s, t) => t ? (s = f(s).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s) : f(s), Mn = 16 * 1024 * 1024, qs = Symbol("process"), Qs = Symbol("file"), Js = Symbol("directory"), ji = Symbol("symlink"), js$1 = Symbol("hardlink"), fe = Symbol("header"), ei = Symbol("read"), ts = Symbol("lstat"), ii = Symbol("onlstat"), es = Symbol("onread"), is$2 = Symbol("onreadlink"), ss = Symbol("openfile"), rs = Symbol("onopenfile"), pt = Symbol("close"), si = Symbol("mode"), ns = Symbol("awaitDrain"), Ji = Symbol("ondrain"), X = Symbol("prefix"), de = class extends A {
|
|
72838
72838
|
path;
|
|
72839
72839
|
portable;
|
|
72840
72840
|
myuid = process.getuid && process.getuid() || 0;
|
|
@@ -72873,7 +72873,7 @@ var tr = (s, t) => t ? (s = f(s).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s) : f(
|
|
|
72873
72873
|
let [o, h] = ce(this.path);
|
|
72874
72874
|
o && typeof h == "string" && (this.path = h, r = o);
|
|
72875
72875
|
}
|
|
72876
|
-
this.win32 = !!i.win32 || process.platform === "win32", this.win32 && (this.path = Vs(this.path.replaceAll(/\\/g, "/")), t = t.replaceAll(/\\/g, "/")), this.absolute = f(i.absolute ||
|
|
72876
|
+
this.win32 = !!i.win32 || process.platform === "win32", this.win32 && (this.path = Vs(this.path.replaceAll(/\\/g, "/")), t = t.replaceAll(/\\/g, "/")), this.absolute = f(i.absolute || js.resolve(this.cwd, t)), this.path === "" && (this.path = "./"), r && this.warn("TAR_ENTRY_INFO", `stripping ${r} from absolute path`, {
|
|
72877
72877
|
entry: this,
|
|
72878
72878
|
path: r + this.path
|
|
72879
72879
|
});
|
|
@@ -72954,15 +72954,15 @@ var tr = (s, t) => t ? (s = f(s).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s) : f(
|
|
|
72954
72954
|
[is$2](t) {
|
|
72955
72955
|
this.linkpath = f(t), this[fe](), this.end();
|
|
72956
72956
|
}
|
|
72957
|
-
[js](t) {
|
|
72957
|
+
[js$1](t) {
|
|
72958
72958
|
if (!this.stat) throw new Error("cannot create link entry without stat");
|
|
72959
|
-
this.type = "Link", this.linkpath = f(
|
|
72959
|
+
this.type = "Link", this.linkpath = f(js.relative(this.cwd, t)), this.stat.size = 0, this[fe](), this.end();
|
|
72960
72960
|
}
|
|
72961
72961
|
[Qs]() {
|
|
72962
72962
|
if (!this.stat) throw new Error("cannot create file entry without stat");
|
|
72963
72963
|
if (this.stat.nlink > 1) {
|
|
72964
72964
|
let t = `${this.stat.dev}:${this.stat.ino}`, e = this.linkCache.get(t);
|
|
72965
|
-
if (e?.indexOf(this.cwd) === 0) return this[js](e);
|
|
72965
|
+
if (e?.indexOf(this.cwd) === 0) return this[js$1](e);
|
|
72966
72966
|
this.linkCache.set(t, this.absolute);
|
|
72967
72967
|
}
|
|
72968
72968
|
if (this[fe](), this.stat.size === 0) return this.end();
|
|
@@ -73376,7 +73376,7 @@ var mi = class {
|
|
|
73376
73376
|
return t instanceof Yt ? this[ir](t) : this[li](t), this.flowing;
|
|
73377
73377
|
}
|
|
73378
73378
|
[ir](t) {
|
|
73379
|
-
let e = f(
|
|
73379
|
+
let e = f(js.resolve(this.cwd, t.path));
|
|
73380
73380
|
if (!this.filter(t.path, t)) t.resume();
|
|
73381
73381
|
else {
|
|
73382
73382
|
let i = new mi(t.path, e);
|
|
@@ -73385,7 +73385,7 @@ var mi = class {
|
|
|
73385
73385
|
this[kt]();
|
|
73386
73386
|
}
|
|
73387
73387
|
[li](t) {
|
|
73388
|
-
let e = f(
|
|
73388
|
+
let e = f(js.resolve(this.cwd, t));
|
|
73389
73389
|
this[W].push(new mi(t, e)), this[kt]();
|
|
73390
73390
|
}
|
|
73391
73391
|
[ls](t) {
|
|
@@ -73575,12 +73575,12 @@ K(Hn, Wn, Gn, Zn, (s, t) => {
|
|
|
73575
73575
|
var dr = (process.env.__FAKE_PLATFORM__ || process.platform) === "win32", { O_CREAT: ur, O_NOFOLLOW: lr, O_TRUNC: mr, O_WRONLY: pr } = I.constants, Er = Number(process.env.__FAKE_FS_O_FILENAME__) || I.constants.UV_FS_O_FILEMAP || 0, Vn = dr && !!Er, $n = 512 * 1024, Xn = Er | mr | ur | pr, cr = !dr && typeof lr == "number" ? lr | mr | ur | pr : null, fs$5 = cr !== null ? () => cr : Vn ? (s) => s < $n ? Xn : "w" : () => "w";
|
|
73576
73576
|
var ds = (s, t, e) => {
|
|
73577
73577
|
try {
|
|
73578
|
-
return
|
|
73578
|
+
return Kt.lchownSync(s, t, e);
|
|
73579
73579
|
} catch (i) {
|
|
73580
73580
|
if (i?.code !== "ENOENT") throw i;
|
|
73581
73581
|
}
|
|
73582
73582
|
}, pi = (s, t, e, i) => {
|
|
73583
|
-
|
|
73583
|
+
Kt.lchown(s, t, e, (r) => {
|
|
73584
73584
|
i(r && r?.code !== "ENOENT" ? r : null);
|
|
73585
73585
|
});
|
|
73586
73586
|
}, qn = (s, t, e, i, r) => {
|
|
@@ -73590,7 +73590,7 @@ var ds = (s, t, e) => {
|
|
|
73590
73590
|
});
|
|
73591
73591
|
else pi(path.resolve(s, t.name), e, i, r);
|
|
73592
73592
|
}, us = (s, t, e, i) => {
|
|
73593
|
-
|
|
73593
|
+
Kt.readdir(s, { withFileTypes: !0 }, (r, n) => {
|
|
73594
73594
|
if (r) {
|
|
73595
73595
|
if (r.code === "ENOENT") return i();
|
|
73596
73596
|
if (r.code !== "ENOTDIR" && r.code !== "ENOTSUP") return i(r);
|
|
@@ -73609,7 +73609,7 @@ var ds = (s, t, e) => {
|
|
|
73609
73609
|
}, ms = (s, t, e) => {
|
|
73610
73610
|
let i;
|
|
73611
73611
|
try {
|
|
73612
|
-
i =
|
|
73612
|
+
i = Kt.readdirSync(s, { withFileTypes: !0 });
|
|
73613
73613
|
} catch (r) {
|
|
73614
73614
|
let n = r;
|
|
73615
73615
|
if (n?.code === "ENOENT") return;
|
|
@@ -73643,16 +73643,16 @@ var St = class extends Error {
|
|
|
73643
73643
|
}
|
|
73644
73644
|
};
|
|
73645
73645
|
var jn = (s, t) => {
|
|
73646
|
-
|
|
73646
|
+
Kt.stat(s, (e, i) => {
|
|
73647
73647
|
(e || !i.isDirectory()) && (e = new Se(s, e?.code || "ENOTDIR")), t(e);
|
|
73648
73648
|
});
|
|
73649
73649
|
}, wr = (s, t, e) => {
|
|
73650
73650
|
s = f(s);
|
|
73651
73651
|
let i = t.umask ?? 18, r = t.mode | 448, n = (r & i) !== 0, o = t.uid, h = t.gid, a = typeof o == "number" && typeof h == "number" && (o !== t.processUid || h !== t.processGid), l = t.preserve, c = t.unlink, d = f(t.cwd), S = (E, x) => {
|
|
73652
|
-
E ? e(E) : x && a ? us(x, o, h, (Le) => S(Le)) : n ?
|
|
73652
|
+
E ? e(E) : x && a ? us(x, o, h, (Le) => S(Le)) : n ? Kt.chmod(s, r, e) : e();
|
|
73653
73653
|
};
|
|
73654
73654
|
if (s === d) return jn(s, S);
|
|
73655
|
-
if (l) return
|
|
73655
|
+
if (l) return ro.mkdir(s, {
|
|
73656
73656
|
mode: r,
|
|
73657
73657
|
recursive: !0
|
|
73658
73658
|
}).then((E) => S(null, E ?? void 0), S);
|
|
@@ -73660,14 +73660,14 @@ var jn = (s, t) => {
|
|
|
73660
73660
|
}, ps = (s, t, e, i, r, n, o) => {
|
|
73661
73661
|
if (t.length === 0) return o(null, n);
|
|
73662
73662
|
let h = t.shift(), a = f(path.resolve(s + "/" + h));
|
|
73663
|
-
|
|
73663
|
+
Kt.mkdir(a, e, Sr(a, t, e, i, r, n, o));
|
|
73664
73664
|
}, Sr = (s, t, e, i, r, n, o) => (h) => {
|
|
73665
|
-
h ?
|
|
73665
|
+
h ? Kt.lstat(s, (a, l) => {
|
|
73666
73666
|
if (a) a.path = a.path && f(a.path), o(a);
|
|
73667
73667
|
else if (l.isDirectory()) ps(s, t, e, i, r, n, o);
|
|
73668
|
-
else if (i)
|
|
73668
|
+
else if (i) Kt.unlink(s, (c) => {
|
|
73669
73669
|
if (c) return o(c);
|
|
73670
|
-
|
|
73670
|
+
Kt.mkdir(s, e, Sr(s, t, e, i, r, n, o));
|
|
73671
73671
|
});
|
|
73672
73672
|
else {
|
|
73673
73673
|
if (l.isSymbolicLink()) return o(new St(s, s + "/" + t.join("/")));
|
|
@@ -73677,7 +73677,7 @@ var jn = (s, t) => {
|
|
|
73677
73677
|
}, to = (s) => {
|
|
73678
73678
|
let t = !1, e;
|
|
73679
73679
|
try {
|
|
73680
|
-
t =
|
|
73680
|
+
t = Kt.statSync(s).isDirectory();
|
|
73681
73681
|
} catch (i) {
|
|
73682
73682
|
e = i?.code;
|
|
73683
73683
|
} finally {
|
|
@@ -73686,10 +73686,10 @@ var jn = (s, t) => {
|
|
|
73686
73686
|
}, yr = (s, t) => {
|
|
73687
73687
|
s = f(s);
|
|
73688
73688
|
let e = t.umask ?? 18, i = t.mode | 448, r = (i & e) !== 0, n = t.uid, o = t.gid, h = typeof n == "number" && typeof o == "number" && (n !== t.processUid || o !== t.processGid), a = t.preserve, l = t.unlink, c = f(t.cwd), d = (E) => {
|
|
73689
|
-
E && h && ms(E, n, o), r &&
|
|
73689
|
+
E && h && ms(E, n, o), r && Kt.chmodSync(s, i);
|
|
73690
73690
|
};
|
|
73691
73691
|
if (s === c) return to(c), d();
|
|
73692
|
-
if (a) return d(
|
|
73692
|
+
if (a) return d(Kt.mkdirSync(s, {
|
|
73693
73693
|
mode: i,
|
|
73694
73694
|
recursive: !0
|
|
73695
73695
|
}) ?? void 0);
|
|
@@ -73697,12 +73697,12 @@ var jn = (s, t) => {
|
|
|
73697
73697
|
for (let E = T.shift(), x = c; E && (x += "/" + E); E = T.shift()) {
|
|
73698
73698
|
x = f(path.resolve(x));
|
|
73699
73699
|
try {
|
|
73700
|
-
|
|
73700
|
+
Kt.mkdirSync(x, i), N = N || x;
|
|
73701
73701
|
} catch {
|
|
73702
|
-
let Le =
|
|
73702
|
+
let Le = Kt.lstatSync(x);
|
|
73703
73703
|
if (Le.isDirectory()) continue;
|
|
73704
73704
|
if (l) {
|
|
73705
|
-
|
|
73705
|
+
Kt.unlinkSync(x), Kt.mkdirSync(x, i), N = N || x;
|
|
73706
73706
|
continue;
|
|
73707
73707
|
} else if (Le.isSymbolicLink()) return new St(x, x + "/" + T.join("/"));
|
|
73708
73708
|
}
|
|
@@ -73792,16 +73792,16 @@ var io = (process.env.TESTING_TAR_FAKE_PLATFORM || process.platform) === "win32"
|
|
|
73792
73792
|
};
|
|
73793
73793
|
var _r = () => process.umask();
|
|
73794
73794
|
var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs = Symbol("isReusable"), P = Symbol("makeFs"), bs = Symbol("file"), _s = Symbol("directory"), Ri = Symbol("link"), xr = Symbol("symlink"), Lr = Symbol("hardlink"), Re = Symbol("ensureNoSymlink"), Nr = Symbol("unsupported"), Dr = Symbol("checkPath"), ws = Symbol("stripAbsolutePath"), yt = Symbol("mkdir"), O = Symbol("onError"), yi = Symbol("pending"), Ar = Symbol("pend"), Xt = Symbol("unpend"), Ss = Symbol("ended"), ys = Symbol("maybeClose"), Os = Symbol("skip"), ge = Symbol("doChown"), be = Symbol("uid"), _e = Symbol("gid"), Oe = Symbol("checkedCwd"), Te = (process.env.TESTING_TAR_FAKE_PLATFORM || process.platform) === "win32", oo = 1024, ho = (s, t) => {
|
|
73795
|
-
if (!Te) return
|
|
73795
|
+
if (!Te) return Kt.unlink(s, t);
|
|
73796
73796
|
let e = s + ".DELETE." + randomBytes(16).toString("hex");
|
|
73797
|
-
|
|
73797
|
+
Kt.rename(s, e, (i) => {
|
|
73798
73798
|
if (i) return t(i);
|
|
73799
|
-
|
|
73799
|
+
Kt.unlink(e, t);
|
|
73800
73800
|
});
|
|
73801
73801
|
}, ao = (s) => {
|
|
73802
|
-
if (!Te) return
|
|
73802
|
+
if (!Te) return Kt.unlinkSync(s);
|
|
73803
73803
|
let t = s + ".DELETE." + randomBytes(16).toString("hex");
|
|
73804
|
-
|
|
73804
|
+
Kt.renameSync(s, t), Kt.unlinkSync(t);
|
|
73805
73805
|
}, Ir = (s, t, e) => s !== void 0 && s === s >>> 0 ? s : t !== void 0 && t === t >>> 0 ? t : e, qt = class extends st {
|
|
73806
73806
|
[Ss] = !1;
|
|
73807
73807
|
[Oe] = !1;
|
|
@@ -73902,7 +73902,7 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
|
|
|
73902
73902
|
}
|
|
73903
73903
|
[Or](t) {
|
|
73904
73904
|
if (!this[Dr](t)) return t.resume();
|
|
73905
|
-
switch (
|
|
73905
|
+
switch (co.equal(typeof t.absolute, "string"), t.type) {
|
|
73906
73906
|
case "Directory":
|
|
73907
73907
|
case "GNUDumpDir": t.mode && (t.mode = t.mode | 448);
|
|
73908
73908
|
case "File":
|
|
@@ -73945,14 +73945,14 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
|
|
|
73945
73945
|
autoClose: !1
|
|
73946
73946
|
});
|
|
73947
73947
|
r.on("error", (a) => {
|
|
73948
|
-
r.fd &&
|
|
73948
|
+
r.fd && Kt.close(r.fd, () => {}), r.write = () => !0, this[O](a, t), e();
|
|
73949
73949
|
});
|
|
73950
73950
|
let n = 1, o = (a) => {
|
|
73951
73951
|
if (a) {
|
|
73952
|
-
r.fd &&
|
|
73952
|
+
r.fd && Kt.close(r.fd, () => {}), this[O](a, t), e();
|
|
73953
73953
|
return;
|
|
73954
73954
|
}
|
|
73955
|
-
--n === 0 && r.fd !== void 0 &&
|
|
73955
|
+
--n === 0 && r.fd !== void 0 && Kt.close(r.fd, (l) => {
|
|
73956
73956
|
l ? this[O](l, t) : this[Xt](), e();
|
|
73957
73957
|
});
|
|
73958
73958
|
};
|
|
@@ -73961,12 +73961,12 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
|
|
|
73961
73961
|
if (typeof l == "number" && t.mtime && !this.noMtime) {
|
|
73962
73962
|
n++;
|
|
73963
73963
|
let c = t.atime || /* @__PURE__ */ new Date(), d = t.mtime;
|
|
73964
|
-
|
|
73964
|
+
Kt.futimes(l, c, d, (S) => S ? Kt.utimes(a, c, d, (T) => o(T && S)) : o());
|
|
73965
73965
|
}
|
|
73966
73966
|
if (typeof l == "number" && this[ge](t)) {
|
|
73967
73967
|
n++;
|
|
73968
73968
|
let c = this[be](t), d = this[_e](t);
|
|
73969
|
-
typeof c == "number" && typeof d == "number" &&
|
|
73969
|
+
typeof c == "number" && typeof d == "number" && Kt.fchown(l, c, d, (S) => S ? Kt.chown(a, c, d, (T) => o(T && S)) : o());
|
|
73970
73970
|
}
|
|
73971
73971
|
o();
|
|
73972
73972
|
});
|
|
@@ -73985,7 +73985,7 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
|
|
|
73985
73985
|
let n = 1, o = () => {
|
|
73986
73986
|
--n === 0 && (e(), this[Xt](), t.resume());
|
|
73987
73987
|
};
|
|
73988
|
-
t.mtime && !this.noMtime && (n++,
|
|
73988
|
+
t.mtime && !this.noMtime && (n++, Kt.utimes(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime, o)), this[ge](t) && (n++, Kt.chown(String(t.absolute), Number(this[be](t)), Number(this[_e](t)), o)), o();
|
|
73989
73989
|
});
|
|
73990
73990
|
}
|
|
73991
73991
|
[Nr](t) {
|
|
@@ -74007,7 +74007,7 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
|
|
|
74007
74007
|
let o = i.shift();
|
|
74008
74008
|
if (this.preservePaths || o === void 0) return r();
|
|
74009
74009
|
let h = path.resolve(e, o);
|
|
74010
|
-
|
|
74010
|
+
Kt.lstat(h, (a, l) => {
|
|
74011
74011
|
if (a) return r();
|
|
74012
74012
|
if (l?.isSymbolicLink()) return n(new St(h, path.resolve(h, i.join("/"))));
|
|
74013
74013
|
this[Re](t, h, i, r, n);
|
|
@@ -74054,7 +74054,7 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
|
|
|
74054
74054
|
}
|
|
74055
74055
|
o();
|
|
74056
74056
|
}, o = () => {
|
|
74057
|
-
|
|
74057
|
+
Kt.lstat(String(t.absolute), (h, a) => {
|
|
74058
74058
|
if (a && (this.keep || this.newer && a.mtime > (t.mtime ?? a.mtime))) {
|
|
74059
74059
|
this[Os](t), i();
|
|
74060
74060
|
return;
|
|
@@ -74063,9 +74063,9 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
|
|
|
74063
74063
|
if (a.isDirectory()) {
|
|
74064
74064
|
if (t.type === "Directory") {
|
|
74065
74065
|
let l = this.chmod && t.mode && (a.mode & 4095) !== t.mode, c = (d) => this[P](d ?? null, t, i);
|
|
74066
|
-
return l ?
|
|
74066
|
+
return l ? Kt.chmod(String(t.absolute), Number(t.mode), c) : c();
|
|
74067
74067
|
}
|
|
74068
|
-
if (t.absolute !== this.cwd) return
|
|
74068
|
+
if (t.absolute !== this.cwd) return Kt.rmdir(String(t.absolute), (l) => this[P](l ?? null, t, i));
|
|
74069
74069
|
}
|
|
74070
74070
|
if (t.absolute === this.cwd) return this[P](null, t, i);
|
|
74071
74071
|
ho(String(t.absolute), (l) => this[P](l ?? null, t, i));
|
|
@@ -74089,7 +74089,7 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
|
|
|
74089
74089
|
}
|
|
74090
74090
|
}
|
|
74091
74091
|
[Ri](t, e, i, r) {
|
|
74092
|
-
|
|
74092
|
+
Kt[i](e, String(t.absolute), (n) => {
|
|
74093
74093
|
n ? this[O](n, t) : (this[Xt](), t.resume()), r();
|
|
74094
74094
|
});
|
|
74095
74095
|
}
|
|
@@ -74117,17 +74117,17 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
|
|
|
74117
74117
|
if (o) return this[O](o, t);
|
|
74118
74118
|
}
|
|
74119
74119
|
}
|
|
74120
|
-
let [e, i] = ye(() =>
|
|
74120
|
+
let [e, i] = ye(() => Kt.lstatSync(String(t.absolute)));
|
|
74121
74121
|
if (i && (this.keep || this.newer && i.mtime > (t.mtime ?? i.mtime))) return this[Os](t);
|
|
74122
74122
|
if (e || this[gs](t, i)) return this[P](null, t);
|
|
74123
74123
|
if (i.isDirectory()) {
|
|
74124
74124
|
if (t.type === "Directory") {
|
|
74125
74125
|
let [h] = this.chmod && t.mode && (i.mode & 4095) !== t.mode ? ye(() => {
|
|
74126
|
-
|
|
74126
|
+
Kt.chmodSync(String(t.absolute), Number(t.mode));
|
|
74127
74127
|
}) : [];
|
|
74128
74128
|
return this[P](h, t);
|
|
74129
74129
|
}
|
|
74130
|
-
let [n] = ye(() =>
|
|
74130
|
+
let [n] = ye(() => Kt.rmdirSync(String(t.absolute)));
|
|
74131
74131
|
this[P](n, t);
|
|
74132
74132
|
}
|
|
74133
74133
|
let [r] = t.absolute === this.cwd ? [] : ye(() => ao(String(t.absolute)));
|
|
@@ -74137,21 +74137,21 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
|
|
|
74137
74137
|
let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = (h) => {
|
|
74138
74138
|
let a;
|
|
74139
74139
|
try {
|
|
74140
|
-
|
|
74140
|
+
Kt.closeSync(n);
|
|
74141
74141
|
} catch (l) {
|
|
74142
74142
|
a = l;
|
|
74143
74143
|
}
|
|
74144
74144
|
(h || a) && this[O](h || a, t), e();
|
|
74145
74145
|
}, n;
|
|
74146
74146
|
try {
|
|
74147
|
-
n =
|
|
74147
|
+
n = Kt.openSync(String(t.absolute), fs$5(t.size), i);
|
|
74148
74148
|
} catch (h) {
|
|
74149
74149
|
return r(h);
|
|
74150
74150
|
}
|
|
74151
74151
|
let o = this.transform && this.transform(t) || t;
|
|
74152
74152
|
o !== t && (o.on("error", (h) => this[O](h, t)), t.pipe(o)), o.on("data", (h) => {
|
|
74153
74153
|
try {
|
|
74154
|
-
|
|
74154
|
+
Kt.writeSync(n, h, 0, h.length);
|
|
74155
74155
|
} catch (a) {
|
|
74156
74156
|
r(a);
|
|
74157
74157
|
}
|
|
@@ -74160,10 +74160,10 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
|
|
|
74160
74160
|
if (t.mtime && !this.noMtime) {
|
|
74161
74161
|
let a = t.atime || /* @__PURE__ */ new Date(), l = t.mtime;
|
|
74162
74162
|
try {
|
|
74163
|
-
|
|
74163
|
+
Kt.futimesSync(n, a, l);
|
|
74164
74164
|
} catch (c) {
|
|
74165
74165
|
try {
|
|
74166
|
-
|
|
74166
|
+
Kt.utimesSync(String(t.absolute), a, l);
|
|
74167
74167
|
} catch {
|
|
74168
74168
|
h = c;
|
|
74169
74169
|
}
|
|
@@ -74172,10 +74172,10 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
|
|
|
74172
74172
|
if (this[ge](t)) {
|
|
74173
74173
|
let a = this[be](t), l = this[_e](t);
|
|
74174
74174
|
try {
|
|
74175
|
-
|
|
74175
|
+
Kt.fchownSync(n, Number(a), Number(l));
|
|
74176
74176
|
} catch (c) {
|
|
74177
74177
|
try {
|
|
74178
|
-
|
|
74178
|
+
Kt.chownSync(String(t.absolute), Number(a), Number(l));
|
|
74179
74179
|
} catch {
|
|
74180
74180
|
h = h || c;
|
|
74181
74181
|
}
|
|
@@ -74191,10 +74191,10 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
|
|
|
74191
74191
|
return;
|
|
74192
74192
|
}
|
|
74193
74193
|
if (t.mtime && !this.noMtime) try {
|
|
74194
|
-
|
|
74194
|
+
Kt.utimesSync(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime);
|
|
74195
74195
|
} catch {}
|
|
74196
74196
|
if (this[ge](t)) try {
|
|
74197
|
-
|
|
74197
|
+
Kt.chownSync(String(t.absolute), Number(this[be](t)), Number(this[_e](t)));
|
|
74198
74198
|
} catch {}
|
|
74199
74199
|
e(), t.resume();
|
|
74200
74200
|
}
|
|
@@ -74220,7 +74220,7 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
|
|
|
74220
74220
|
let o = e;
|
|
74221
74221
|
for (let h of i) {
|
|
74222
74222
|
o = path.resolve(o, h);
|
|
74223
|
-
let [a, l] = ye(() =>
|
|
74223
|
+
let [a, l] = ye(() => Kt.lstatSync(o));
|
|
74224
74224
|
if (a) return r();
|
|
74225
74225
|
if (l.isSymbolicLink()) return n(new St(o, path.resolve(e, i.join("/"))));
|
|
74226
74226
|
}
|
|
@@ -74229,22 +74229,22 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
|
|
|
74229
74229
|
[Ri](t, e, i, r) {
|
|
74230
74230
|
let n = `${i}Sync`;
|
|
74231
74231
|
try {
|
|
74232
|
-
|
|
74232
|
+
Kt[n](e, String(t.absolute)), r(), t.resume();
|
|
74233
74233
|
} catch (o) {
|
|
74234
74234
|
return this[O](o, t);
|
|
74235
74235
|
}
|
|
74236
74236
|
}
|
|
74237
74237
|
};
|
|
74238
74238
|
var lo = (s) => {
|
|
74239
|
-
let t = new xe(s), e = s.file, i =
|
|
74239
|
+
let t = new xe(s), e = s.file, i = Kt.statSync(e);
|
|
74240
74240
|
new Be(e, {
|
|
74241
74241
|
readSize: s.maxReadSize || 16 * 1024 * 1024,
|
|
74242
74242
|
size: i.size
|
|
74243
74243
|
}).pipe(t);
|
|
74244
|
-
}, co = (s, t) => {
|
|
74244
|
+
}, co$1 = (s, t) => {
|
|
74245
74245
|
let e = new qt(s), i = s.maxReadSize || 16 * 1024 * 1024, r = s.file;
|
|
74246
74246
|
return new Promise((o, h) => {
|
|
74247
|
-
e.on("error", h), e.on("close", o),
|
|
74247
|
+
e.on("error", h), e.on("close", o), Kt.stat(r, (a, l) => {
|
|
74248
74248
|
if (a) h(a);
|
|
74249
74249
|
else {
|
|
74250
74250
|
let c = new _t(r, {
|
|
@@ -74255,22 +74255,22 @@ var lo = (s) => {
|
|
|
74255
74255
|
}
|
|
74256
74256
|
});
|
|
74257
74257
|
});
|
|
74258
|
-
}, fo = K(lo, co, (s) => new xe(s), (s) => new qt(s), (s, t) => {
|
|
74258
|
+
}, fo = K(lo, co$1, (s) => new xe(s), (s) => new qt(s), (s, t) => {
|
|
74259
74259
|
t?.length && $i(s, t);
|
|
74260
74260
|
});
|
|
74261
74261
|
var uo = (s, t) => {
|
|
74262
74262
|
let e = new Ft(s), i = !0, r, n;
|
|
74263
74263
|
try {
|
|
74264
74264
|
try {
|
|
74265
|
-
r =
|
|
74265
|
+
r = Kt.openSync(s.file, "r+");
|
|
74266
74266
|
} catch (a) {
|
|
74267
|
-
if (a?.code === "ENOENT") r =
|
|
74267
|
+
if (a?.code === "ENOENT") r = Kt.openSync(s.file, "w+");
|
|
74268
74268
|
else throw a;
|
|
74269
74269
|
}
|
|
74270
|
-
let o =
|
|
74270
|
+
let o = Kt.fstatSync(r), h = Buffer.alloc(512);
|
|
74271
74271
|
t: for (n = 0; n < o.size; n += 512) {
|
|
74272
74272
|
for (let c = 0, d = 0; c < 512; c += d) {
|
|
74273
|
-
if (d =
|
|
74273
|
+
if (d = Kt.readSync(r, h, c, h.length - c, n + c), n === 0 && h[0] === 31 && h[1] === 139) throw new Error("cannot append to compressed archives");
|
|
74274
74274
|
if (!d) break t;
|
|
74275
74275
|
}
|
|
74276
74276
|
let a = new k(h);
|
|
@@ -74282,7 +74282,7 @@ var uo = (s, t) => {
|
|
|
74282
74282
|
i = !1, mo(s, e, n, r, t);
|
|
74283
74283
|
} finally {
|
|
74284
74284
|
if (i) try {
|
|
74285
|
-
|
|
74285
|
+
Kt.closeSync(r);
|
|
74286
74286
|
} catch {}
|
|
74287
74287
|
}
|
|
74288
74288
|
}, mo = (s, t, e, i, r) => {
|
|
@@ -74295,29 +74295,29 @@ var uo = (s, t) => {
|
|
|
74295
74295
|
t = Array.from(t);
|
|
74296
74296
|
let e = new wt(s), i = (n, o, h) => {
|
|
74297
74297
|
let a = (T, N) => {
|
|
74298
|
-
T ?
|
|
74298
|
+
T ? Kt.close(n, (E) => h(T)) : h(null, N);
|
|
74299
74299
|
}, l = 0;
|
|
74300
74300
|
if (o === 0) return a(null, 0);
|
|
74301
74301
|
let c = 0, d = Buffer.alloc(512), S = (T, N) => {
|
|
74302
74302
|
if (T || N === void 0) return a(T);
|
|
74303
|
-
if (c += N, c < 512 && N) return
|
|
74303
|
+
if (c += N, c < 512 && N) return Kt.read(n, d, c, d.length - c, l + c, S);
|
|
74304
74304
|
if (l === 0 && d[0] === 31 && d[1] === 139) return a(/* @__PURE__ */ new Error("cannot append to compressed archives"));
|
|
74305
74305
|
if (c < 512) return a(null, l);
|
|
74306
74306
|
let E = new k(d);
|
|
74307
74307
|
if (!E.cksumValid) return a(null, l);
|
|
74308
74308
|
let x = 512 * Math.ceil((E.size ?? 0) / 512);
|
|
74309
74309
|
if (l + x + 512 > o || (l += x + 512, l >= o)) return a(null, l);
|
|
74310
|
-
s.mtimeCache && E.mtime && s.mtimeCache.set(String(E.path), E.mtime), c = 0,
|
|
74310
|
+
s.mtimeCache && E.mtime && s.mtimeCache.set(String(E.path), E.mtime), c = 0, Kt.read(n, d, 0, 512, l, S);
|
|
74311
74311
|
};
|
|
74312
|
-
|
|
74312
|
+
Kt.read(n, d, 0, 512, l, S);
|
|
74313
74313
|
};
|
|
74314
74314
|
return new Promise((n, o) => {
|
|
74315
74315
|
e.on("error", o);
|
|
74316
74316
|
let h = "r+", a = (l, c) => {
|
|
74317
|
-
if (l && l.code === "ENOENT" && h === "r+") return h = "w+",
|
|
74317
|
+
if (l && l.code === "ENOENT" && h === "r+") return h = "w+", Kt.open(s.file, h, a);
|
|
74318
74318
|
if (l || !c) return o(l);
|
|
74319
|
-
|
|
74320
|
-
if (d) return
|
|
74319
|
+
Kt.fstat(c, (d, S) => {
|
|
74320
|
+
if (d) return Kt.close(c, () => o(d));
|
|
74321
74321
|
i(c, S.size, (T, N) => {
|
|
74322
74322
|
if (T) return o(T);
|
|
74323
74323
|
let E = new tt(s.file, {
|
|
@@ -74328,7 +74328,7 @@ var uo = (s, t) => {
|
|
|
74328
74328
|
});
|
|
74329
74329
|
});
|
|
74330
74330
|
};
|
|
74331
|
-
|
|
74331
|
+
Kt.open(s.file, h, a);
|
|
74332
74332
|
});
|
|
74333
74333
|
}, Eo = (s, t) => {
|
|
74334
74334
|
t.forEach((e) => {
|
|
@@ -129634,17 +129634,29 @@ function resolveModelCapabilities(alias, provider) {
|
|
|
129634
129634
|
max_context_tokens: alias.maxContextSize
|
|
129635
129635
|
};
|
|
129636
129636
|
}
|
|
129637
|
-
function sessionHeaderFields(provider, sessionId
|
|
129637
|
+
function sessionHeaderFields(provider, sessionId) {
|
|
129638
129638
|
const name = provider.sessionHeader;
|
|
129639
129639
|
if (name === void 0 || sessionId === void 0 || sessionId.length === 0) return {};
|
|
129640
|
-
|
|
129640
|
+
return { [name]: sessionId };
|
|
129641
|
+
}
|
|
129642
|
+
/**
|
|
129643
|
+
* The first-party product identity handed to third-party provider SDKs.
|
|
129644
|
+
*
|
|
129645
|
+
* The OpenAI/Anthropic JS SDKs stamp their own default User-Agent
|
|
129646
|
+
* (`OpenAI/JS x.y.z`) whenever the client sends none, so gateway operators
|
|
129647
|
+
* see the SDK instead of the product. Only the UA is carried over here —
|
|
129648
|
+
* the `X-Msh-*` device headers in `screamRequestHeaders` stay host-scoped
|
|
129649
|
+
* and must not leak to third-party endpoints. Providers can still override
|
|
129650
|
+
* it via `customHeaders` (merged later by the callers).
|
|
129651
|
+
*/
|
|
129652
|
+
function firstPartyUserAgentFields(screamRequestHeaders) {
|
|
129641
129653
|
const userAgent = screamRequestHeaders?.["User-Agent"];
|
|
129642
|
-
|
|
129643
|
-
return out;
|
|
129654
|
+
return userAgent === void 0 ? {} : { "User-Agent": userAgent };
|
|
129644
129655
|
}
|
|
129645
129656
|
function resolvedHeaderFields(provider, sessionId, screamRequestHeaders) {
|
|
129646
129657
|
const headers = {
|
|
129647
|
-
...sessionHeaderFields(provider, sessionId
|
|
129658
|
+
...sessionHeaderFields(provider, sessionId),
|
|
129659
|
+
...firstPartyUserAgentFields(screamRequestHeaders),
|
|
129648
129660
|
...provider.customHeaders
|
|
129649
129661
|
};
|
|
129650
129662
|
return Object.keys(headers).length > 0 ? headers : void 0;
|
|
@@ -134175,9 +134187,15 @@ const EXIT_CONFIRM_WINDOW_MS = 1500;
|
|
|
134175
134187
|
/** Repository page opened by Ctrl+F while the chat is empty (feedback / star). */
|
|
134176
134188
|
const EMPTY_SESSION_HINT_URL = "https://github.com/LIUTod/scream-code";
|
|
134177
134189
|
const SESSION_TIPS = [
|
|
134190
|
+
{
|
|
134191
|
+
i18nKey: "editor.tip_offer",
|
|
134192
|
+
isAd: true,
|
|
134193
|
+
url: "https://todapi.work"
|
|
134194
|
+
},
|
|
134178
134195
|
{
|
|
134179
134196
|
i18nKey: "editor.tip_ad",
|
|
134180
|
-
isAd: true
|
|
134197
|
+
isAd: true,
|
|
134198
|
+
url: EMPTY_SESSION_HINT_URL
|
|
134181
134199
|
},
|
|
134182
134200
|
{
|
|
134183
134201
|
i18nKey: "editor.tip_1",
|
|
@@ -140592,7 +140610,7 @@ async function guidedGoalSetup(host) {
|
|
|
140592
140610
|
host.showNotice(t("goal.storm_breaker"), t("goal.conflict_loop"));
|
|
140593
140611
|
return;
|
|
140594
140612
|
}
|
|
140595
|
-
const { TextInputDialogComponent } = await import("./text-input-dialog-
|
|
140613
|
+
const { TextInputDialogComponent } = await import("./text-input-dialog-D7dm6kak.mjs");
|
|
140596
140614
|
const initialDesc = await promptText(host, TextInputDialogComponent, {
|
|
140597
140615
|
title: t("goal.setup_title_initial"),
|
|
140598
140616
|
subtitle: t("goal.setup_desc_hint"),
|
|
@@ -140613,7 +140631,7 @@ async function guidedGoalSetup(host) {
|
|
|
140613
140631
|
await showGoalConfigWizard(host, session, confirmed.trim() || objective, false);
|
|
140614
140632
|
}
|
|
140615
140633
|
async function showGoalConfigWizard(host, session, objective, replace) {
|
|
140616
|
-
const { TextInputDialogComponent } = await import("./text-input-dialog-
|
|
140634
|
+
const { TextInputDialogComponent } = await import("./text-input-dialog-D7dm6kak.mjs");
|
|
140617
140635
|
const turnInput = await promptNumber(host, TextInputDialogComponent, {
|
|
140618
140636
|
title: t("goal.wizard_title", { objective }),
|
|
140619
140637
|
subtitle: t("goal.budget_turns_hint"),
|