@wirecat/tg-cli 0.120.0 → 0.121.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/contracts/wirecat.json +25 -3
- package/dist/bin/tg.js +2 -2
- package/dist/bundle/{adapter-OJKHXGBC.js → adapter-GVSBFSBY.js} +53 -49
- package/dist/bundle/{all-profiles-URIWNL23.js → all-profiles-CTOGU4XR.js} +6 -6
- package/dist/bundle/{anthropic-YUKNB63B.js → anthropic-7472H6ES.js} +13 -4
- package/dist/bundle/{app-server-H5QNHGH4.js → app-server-GZWV4NPR.js} +43 -42
- package/dist/bundle/{bot-api-27GN4Y3D.js → bot-api-PPVAKICN.js} +47 -44
- package/dist/bundle/{bot-history-VVSWLVZM.js → bot-history-7YY7MCR4.js} +12 -12
- package/dist/bundle/{bun-PAAJX3GU.js → bun-KCN62RMD.js} +2 -2
- package/dist/bundle/{bun-sqlite-TPEBWFZH.js → bun-sqlite-2BNE56MY.js} +2 -2
- package/dist/bundle/{chunk-FPWXG53C.js → chunk-24DWSW6H.js} +35 -120
- package/dist/bundle/{chunk-DDKFAUQD.js → chunk-3E35VJME.js} +1 -1
- package/dist/bundle/{chunk-KP26Y5OA.js → chunk-3EGVR7OF.js} +4883 -4825
- package/dist/bundle/{chunk-CYWV2RLN.js → chunk-3HNI6GI7.js} +4 -4
- package/dist/bundle/{chunk-U2TPRUWK.js → chunk-4HJCWFPN.js} +81 -81
- package/dist/bundle/{chunk-KW6JZGG3.js → chunk-4J34T6IQ.js} +1 -1
- package/dist/bundle/{chunk-MMPISXSU.js → chunk-54KFRAHF.js} +1 -1
- package/dist/bundle/{chunk-ZRRZTPSB.js → chunk-5P43K3GL.js} +1418 -742
- package/dist/bundle/{chunk-3GLLWDM6.js → chunk-6LRKWXCS.js} +16 -16
- package/dist/bundle/{chunk-3FPFRDG2.js → chunk-6SQAE7NM.js} +6 -6
- package/dist/bundle/{chunk-WLBPNLDF.js → chunk-7MXRFFIT.js} +2 -2
- package/dist/bundle/{chunk-KRCMKFUV.js → chunk-7UIMMQOV.js} +1 -1
- package/dist/bundle/{chunk-DH7VKHTZ.js → chunk-AYDLA27G.js} +3 -3
- package/dist/bundle/{chunk-7N4IUEX3.js → chunk-BJTJBNR7.js} +6 -6
- package/dist/bundle/{chunk-JJY3TQTM.js → chunk-CLMRF6XR.js} +2 -2
- package/dist/bundle/{chunk-JQLGS3SG.js → chunk-CMEWPXKU.js} +1 -1
- package/dist/bundle/{chunk-THJHYMFR.js → chunk-CPDYPZIG.js} +3599 -3595
- package/dist/bundle/{chunk-WQ55F4Y3.js → chunk-DAK2J3FG.js} +7 -7
- package/dist/bundle/{chunk-YDROJG2Y.js → chunk-DG44ORQ3.js} +4 -4
- package/dist/bundle/{chunk-D2WNQJUQ.js → chunk-ESLV57MC.js} +1 -1
- package/dist/bundle/{chunk-CLTMVPGT.js → chunk-FERGNQYA.js} +12 -12
- package/dist/bundle/{chunk-KTV5Y5EX.js → chunk-GB55EDOF.js} +1 -1
- package/dist/bundle/chunk-GNGYV5NX.js +116 -0
- package/dist/bundle/{chunk-4OWY7QBE.js → chunk-KKD5ZPGD.js} +5 -5
- package/dist/bundle/{chunk-4JATS2J5.js → chunk-KPAUPIC3.js} +2 -2
- package/dist/bundle/chunk-KVW7LCZK.js +109 -0
- package/dist/bundle/{chunk-LLCGOZ44.js → chunk-LTAHG7BO.js} +2 -2
- package/dist/bundle/{chunk-DE7QIEUP.js → chunk-M47CXY5J.js} +30 -49
- package/dist/bundle/{chunk-DQTQO6PB.js → chunk-M73VM67N.js} +1209 -851
- package/dist/bundle/{chunk-6XHZV7AQ.js → chunk-MAPJUOTD.js} +3 -3
- package/dist/bundle/{chunk-S6OC367D.js → chunk-MKAKM3V7.js} +2 -2
- package/dist/bundle/{chunk-LS72R7DN.js → chunk-NR7PGYPO.js} +37 -35
- package/dist/bundle/chunk-PLBEUSZP.js +18 -0
- package/dist/bundle/{chunk-B7B65ZLU.js → chunk-QMNUQTA2.js} +1 -1
- package/dist/bundle/{chunk-3SANNNWS.js → chunk-QNNUNGPL.js} +2 -2
- package/dist/bundle/{chunk-YQKEPT22.js → chunk-QQ264PXQ.js} +1 -1
- package/dist/bundle/{chunk-JSEIT2WO.js → chunk-R6KXHBMW.js} +1 -1
- package/dist/bundle/{chunk-YBOVL25O.js → chunk-RPBO5XL3.js} +16 -16
- package/dist/bundle/{chunk-VUUR2SRS.js → chunk-RZX7RDXY.js} +33 -16
- package/dist/bundle/{chunk-7VNV426X.js → chunk-S7P5X23R.js} +26 -22
- package/dist/bundle/{chunk-HDSKBXAF.js → chunk-SHIHW2YN.js} +2 -2
- package/dist/bundle/{chunk-7WS3ULOO.js → chunk-SQWTUENZ.js} +1155 -800
- package/dist/bundle/{chunk-34DSPJNN.js → chunk-T7ONSJAA.js} +2 -2
- package/dist/bundle/{chunk-HIBYYKGO.js → chunk-TEMCXODM.js} +1 -1
- package/dist/bundle/{chunk-MTD6WZKV.js → chunk-VAAZL6OD.js} +6 -6
- package/dist/bundle/{chunk-PDYTNTQI.js → chunk-VPNLTNQD.js} +5 -5
- package/dist/bundle/{chunk-ZON7K5QE.js → chunk-W77WC6ZK.js} +2 -2
- package/dist/bundle/{chunk-KLHOQ6XQ.js → chunk-Y4CSR5RP.js} +3 -1
- package/dist/bundle/{chunk-CGUDXNJE.js → chunk-YMJKHMHX.js} +1 -1
- package/dist/bundle/{chunk-CLURRDNU.js → chunk-YRY752BB.js} +4 -4
- package/dist/bundle/{chunk-H5XC2WYO.js → chunk-ZSW7LN7T.js} +22 -22
- package/dist/bundle/{command-contract-KW6FNOJO.js → command-contract-3W73W27G.js} +12 -12
- package/dist/bundle/command-server-entry-37PKBJ5A.js +146 -0
- package/dist/bundle/{decode-RVWSCZW4.js → decode-F7KC7WT4.js} +2 -2
- package/dist/bundle/{echarts-6VNUD3JF.js → echarts-4VYG66GX.js} +2 -2
- package/dist/bundle/{embed-LWLCQKIK.js → embed-ENZ6R4HF.js} +3 -3
- package/dist/bundle/{embedder-CXKHLRJT.js → embedder-4CBICMFO.js} +6 -6
- package/dist/bundle/{entry-HV4NSX3Z.js → entry-XQ562EDO.js} +7 -4
- package/dist/bundle/{first-run-OPI6NIWQ.js → first-run-PPXOC6ID.js} +5 -5
- package/dist/bundle/{first-screen-BVQLF4LN.js → first-screen-JC6BYZYD.js} +13 -13
- package/dist/bundle/{instructions-TK4HXL3A.js → instructions-XLCMJ5PJ.js} +1 -1
- package/dist/bundle/{node-WFPNBUCU.js → node-SSAC67R5.js} +2 -2
- package/dist/bundle/{node-sqlite-L5BRGJLK.js → node-sqlite-SUUUSYSZ.js} +3 -3
- package/dist/bundle/{oauth-CGVWL35B.js → oauth-2ZNHMPEX.js} +4 -4
- package/dist/bundle/{open-HLL55C5S.js → open-EFNT7V2Q.js} +2 -2
- package/dist/bundle/{openai-YFCNXIJ4.js → openai-7STFVJXA.js} +13 -13
- package/dist/bundle/{process-4A5JP5LO.js → process-63F4PNWH.js} +1 -1
- package/dist/bundle/{program-IFGQGSUF.js → program-C2E3TQNK.js} +63 -60
- package/dist/bundle/{prompt-B5FYE2DQ.js → prompt-QPO7EKD5.js} +2 -2
- package/dist/bundle/{recognize-ZHMHGIV3.js → recognize-MLXEHFYL.js} +1 -1
- package/dist/bundle/{remote-A3W5HE52.js → remote-DO7FLJEF.js} +4 -4
- package/dist/bundle/{rerank-HWJAQOZM.js → rerank-W3WSBDAM.js} +4 -4
- package/dist/bundle/{serve-PP326Q2F.js → serve-Z3TOTEMQ.js} +11 -11
- package/dist/bundle/{server-MV6CL63L.js → server-BYSOJCUA.js} +32 -32
- package/dist/bundle/server-IRUVLXD4.js +61 -0
- package/dist/bundle/{state-Y3RJ7ZXB.js → state-PKRPBCMY.js} +3 -3
- package/dist/bundle/{store-EVNI2MHZ.js → store-Y4G7CNJT.js} +9 -9
- package/dist/bundle/store-maintenance-command-PHK43OSM.js +49 -0
- package/dist/bundle/tg.js +4 -4
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/dist/bundle/server-TZGGOJ26.js +0 -60
- package/dist/bundle/store-maintenance-command-XPQE47RE.js +0 -49
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
__name
|
|
8
8
|
} from "./chunk-ZVVMGPBJ.js";
|
|
9
9
|
|
|
10
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/search/languages.js
|
|
11
11
|
var LANGUAGES = [
|
|
12
12
|
{ name: "russian", code: "ru", label: "Russian", script: "cyrillic", dictionary: "dictionary-ru" },
|
|
13
13
|
{ name: "english", code: "en", label: "English", script: "latin", dictionary: "dictionary-en" },
|
|
@@ -15,12 +15,12 @@ var LANGUAGES = [
|
|
|
15
15
|
];
|
|
16
16
|
var languagesOf = /* @__PURE__ */ __name((script) => LANGUAGES.filter((one) => one.script === script).map(({ name }) => name), "languagesOf");
|
|
17
17
|
|
|
18
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/store/normalize.js
|
|
19
19
|
var NORMALIZER_VERSION = 1;
|
|
20
20
|
var fold = /* @__PURE__ */ __name((text) => text.normalize("NFKD").replace(new RegExp("\\p{M}+", "gu"), "").normalize("NFC").toLowerCase(), "fold");
|
|
21
21
|
var normalize = /* @__PURE__ */ __name((text) => fold(text).replace(new RegExp("\\p{Cc}", "gu"), " ").replace(/\s+/gu, " ").trim(), "normalize");
|
|
22
22
|
|
|
23
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/search/snowball/base-stemmer.js
|
|
24
24
|
var BaseStemmer = class {
|
|
25
25
|
static {
|
|
26
26
|
__name(this, "BaseStemmer");
|
|
@@ -395,7 +395,7 @@ var BaseStemmer = class {
|
|
|
395
395
|
}
|
|
396
396
|
};
|
|
397
397
|
|
|
398
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
398
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/search/snowball/english-stemmer.js
|
|
399
399
|
var a_0 = [
|
|
400
400
|
["arsen", -1],
|
|
401
401
|
["commun", -1],
|
|
@@ -1096,7 +1096,7 @@ var english_stemmer_default = class extends BaseStemmer {
|
|
|
1096
1096
|
stemWord = this.stem;
|
|
1097
1097
|
};
|
|
1098
1098
|
|
|
1099
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1099
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/search/snowball/russian-stemmer.js
|
|
1100
1100
|
var a_02 = [
|
|
1101
1101
|
["\u0432", 1],
|
|
1102
1102
|
["\u0438\u0432", 2, 1],
|
|
@@ -1519,7 +1519,7 @@ var russian_stemmer_default = class extends BaseStemmer {
|
|
|
1519
1519
|
stemWord = this.stem;
|
|
1520
1520
|
};
|
|
1521
1521
|
|
|
1522
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1522
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/search/snowball/spanish-stemmer.js
|
|
1523
1523
|
var a_03 = [
|
|
1524
1524
|
["", 6],
|
|
1525
1525
|
["\xE1", 1, 1],
|
|
@@ -2195,7 +2195,7 @@ var spanish_stemmer_default = class extends BaseStemmer {
|
|
|
2195
2195
|
stemWord = this.stem;
|
|
2196
2196
|
};
|
|
2197
2197
|
|
|
2198
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2198
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/search/stem.js
|
|
2199
2199
|
var SNOWBALL_VERSION = "3.1.1";
|
|
2200
2200
|
var CYRILLIC_STEMMERS = [...languagesOf("cyrillic"), "none"];
|
|
2201
2201
|
var LATIN_STEMMERS = [...languagesOf("latin"), "none"];
|
|
@@ -2,12 +2,12 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
openSqlite
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-5P43K3GL.js";
|
|
6
6
|
import {
|
|
7
7
|
__name
|
|
8
8
|
} from "./chunk-ZVVMGPBJ.js";
|
|
9
9
|
|
|
10
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/store/damage.js
|
|
11
11
|
var DERIVED = /* @__PURE__ */ new Set(["mentions", "involvements", "embeddings"]);
|
|
12
12
|
var named = /* @__PURE__ */ __name((tables) => tables.length <= 5 ? tables.join(", ") : `${tables.slice(0, 5).join(", ")} and ${tables.length - 5} more`, "named");
|
|
13
13
|
var isDerivedTable = /* @__PURE__ */ __name((table, searchIndexes) => DERIVED.has(table) || table.startsWith("vector_index_") || searchIndexes.some((index) => table === index || table.startsWith(`${index}_`)), "isDerivedTable");
|
|
@@ -110,7 +110,7 @@ var storeDamageReport = /* @__PURE__ */ __name(({ health, command, mark = null,
|
|
|
110
110
|
};
|
|
111
111
|
}, "storeDamageReport");
|
|
112
112
|
|
|
113
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
113
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/store/health.js
|
|
114
114
|
import { existsSync, statSync } from "node:fs";
|
|
115
115
|
var JSON_COLUMNS = {
|
|
116
116
|
accounts: ["settings"],
|
|
@@ -252,7 +252,7 @@ var storeHealth = /* @__PURE__ */ __name(async (path, { deep = false } = {}) =>
|
|
|
252
252
|
}
|
|
253
253
|
}, "storeHealth");
|
|
254
254
|
|
|
255
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
255
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/snapshot.js
|
|
256
256
|
var MAX_BYTES = 16 * 1024 * 1024;
|
|
257
257
|
|
|
258
258
|
export {
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
__name
|
|
5
5
|
} from "./chunk-ZVVMGPBJ.js";
|
|
6
6
|
|
|
7
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/http/listen.js
|
|
8
8
|
import { createServer } from "node:http";
|
|
9
9
|
import { Readable } from "node:stream";
|
|
10
10
|
var MAX_BODY = 4 * 1024 * 1024;
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
__name
|
|
8
8
|
} from "./chunk-ZVVMGPBJ.js";
|
|
9
9
|
|
|
10
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/files/ordinary-file.js
|
|
11
11
|
import { constants } from "node:fs";
|
|
12
12
|
import { lstat, open } from "node:fs/promises";
|
|
13
13
|
var deviceOf = /* @__PURE__ */ __name((dev) => process.platform === "win32" ? BigInt.asUintN(32, dev) : dev, "deviceOf");
|
|
@@ -73,7 +73,7 @@ var syncDirectory = /* @__PURE__ */ __name(async (path) => {
|
|
|
73
73
|
}
|
|
74
74
|
}, "syncDirectory");
|
|
75
75
|
|
|
76
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
76
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/files/atomic-write.js
|
|
77
77
|
import { randomUUID } from "node:crypto";
|
|
78
78
|
import { constants as constants2 } from "node:fs";
|
|
79
79
|
import { link, open as open2, realpath, rename, unlink } from "node:fs/promises";
|
|
@@ -111,7 +111,7 @@ var writeFileAtomic = /* @__PURE__ */ __name(async (path, content, { mode = 384,
|
|
|
111
111
|
}
|
|
112
112
|
}, "writeFileAtomic");
|
|
113
113
|
|
|
114
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
114
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/files/bounded-utf8.js
|
|
115
115
|
var readBoundedUtf8File = /* @__PURE__ */ __name(async (path, { maxBytes }) => {
|
|
116
116
|
if (!Number.isSafeInteger(maxBytes) || maxBytes < 1 || maxBytes > 16 * 1024 * 1024)
|
|
117
117
|
throw new CliError("validation_error", "file maxBytes takes 1\u201316777216 bytes");
|
|
@@ -140,21 +140,21 @@ var readBoundedUtf8File = /* @__PURE__ */ __name(async (path, { maxBytes }) => {
|
|
|
140
140
|
}
|
|
141
141
|
}, "readBoundedUtf8File");
|
|
142
142
|
|
|
143
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
143
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/files/lock.js
|
|
144
144
|
import { mkdir as mkdir2 } from "node:fs/promises";
|
|
145
145
|
import { basename as basename2, dirname as dirname2 } from "node:path";
|
|
146
146
|
|
|
147
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
147
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/files/native-writer-lease.js
|
|
148
148
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
149
149
|
import { lstat as lstat3, mkdir, open as open3, realpath as realpath3, rmdir as rmdir2, unlink as unlink4 } from "node:fs/promises";
|
|
150
150
|
import { hostname as hostname2 } from "node:os";
|
|
151
151
|
import { join as join3 } from "node:path";
|
|
152
152
|
|
|
153
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
153
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/files/native-lease-inspection.js
|
|
154
154
|
import { lstat as lstat2, readdir, realpath as realpath2, unlink as unlink2 } from "node:fs/promises";
|
|
155
155
|
import { join as join2 } from "node:path";
|
|
156
156
|
|
|
157
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
157
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/files/native-lease-owner.js
|
|
158
158
|
import { hostname } from "node:os";
|
|
159
159
|
var missingLeaseFile = /* @__PURE__ */ __name((error) => typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT", "missingLeaseFile");
|
|
160
160
|
var readLeaseOwner = /* @__PURE__ */ __name(async (path, name, signal) => {
|
|
@@ -199,7 +199,7 @@ var leaseOwnerStatus = /* @__PURE__ */ __name((owner) => {
|
|
|
199
199
|
}
|
|
200
200
|
}, "leaseOwnerStatus");
|
|
201
201
|
|
|
202
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
202
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/files/native-lease-inspection.js
|
|
203
203
|
var leaseInspection = /* @__PURE__ */ __name((markerDirectory) => {
|
|
204
204
|
const inspect = /* @__PURE__ */ __name(async (destination, options = {}) => {
|
|
205
205
|
options.signal?.throwIfAborted();
|
|
@@ -258,7 +258,7 @@ var leaseInspection = /* @__PURE__ */ __name((markerDirectory) => {
|
|
|
258
258
|
return { inspect, recover };
|
|
259
259
|
}, "leaseInspection");
|
|
260
260
|
|
|
261
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
261
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/files/native-lease-release.js
|
|
262
262
|
import { rmdir, unlink as unlink3 } from "node:fs/promises";
|
|
263
263
|
var ownedNativeLease = /* @__PURE__ */ __name((path, name, owner, folder, identity) => {
|
|
264
264
|
let releasing;
|
|
@@ -283,7 +283,7 @@ var ownedNativeLease = /* @__PURE__ */ __name((path, name, owner, folder, identi
|
|
|
283
283
|
};
|
|
284
284
|
}, "ownedNativeLease");
|
|
285
285
|
|
|
286
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
286
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/files/native-writer-lease.js
|
|
287
287
|
var validName = /* @__PURE__ */ __name((value) => typeof value === "string" && value.length > 0 && value !== "." && value !== ".." && !/[\\/\0:]/.test(value), "validName");
|
|
288
288
|
var nativeWriterLeaseStore = /* @__PURE__ */ __name((layout) => {
|
|
289
289
|
const { markerDirectory, legacyMarker } = layout;
|
|
@@ -354,7 +354,7 @@ var nativeWriterLeaseStore = /* @__PURE__ */ __name((layout) => {
|
|
|
354
354
|
};
|
|
355
355
|
}, "nativeWriterLeaseStore");
|
|
356
356
|
|
|
357
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
357
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/files/lock.js
|
|
358
358
|
var acquireLock = /* @__PURE__ */ __name(async (path, { signal } = {}) => {
|
|
359
359
|
const folder = dirname2(path);
|
|
360
360
|
await mkdir2(folder, { recursive: true, mode: 448 });
|
|
@@ -369,7 +369,7 @@ var acquireLock = /* @__PURE__ */ __name(async (path, { signal } = {}) => {
|
|
|
369
369
|
});
|
|
370
370
|
}, "acquireLock");
|
|
371
371
|
|
|
372
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
372
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/files/safe-name.js
|
|
373
373
|
import { basename as basename3 } from "node:path";
|
|
374
374
|
var safeName = /* @__PURE__ */ __name((name, platform = process.platform) => {
|
|
375
375
|
let plain = name === void 0 ? "" : basename3(name.replaceAll("\\", "/")).replace(/[\p{Cc}---]/gu, "").replace(/^\.+/, "");
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
__name
|
|
8
8
|
} from "./chunk-ZVVMGPBJ.js";
|
|
9
9
|
|
|
10
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/cli/input-policy.js
|
|
11
11
|
var MAX_BUFFERED_INPUT = 16 * 1024 * 1024;
|
|
12
12
|
var MAX_SECRET_INPUT = 64 * 1024;
|
|
13
13
|
var policies = /* @__PURE__ */ new WeakMap();
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
stdinFieldOf
|
|
5
|
+
} from "./chunk-PLBEUSZP.js";
|
|
6
|
+
import {
|
|
7
|
+
isCommandServer
|
|
8
|
+
} from "./chunk-KVW7LCZK.js";
|
|
9
|
+
import {
|
|
10
|
+
commandPathOf
|
|
11
|
+
} from "./chunk-LTAHG7BO.js";
|
|
12
|
+
import {
|
|
13
|
+
metaOf
|
|
14
|
+
} from "./chunk-CPDYPZIG.js";
|
|
15
|
+
import {
|
|
16
|
+
errorObjectOf,
|
|
17
|
+
renderError
|
|
18
|
+
} from "./chunk-WGGSFGNZ.js";
|
|
19
|
+
import {
|
|
20
|
+
CliError
|
|
21
|
+
} from "./chunk-VUBZFMGP.js";
|
|
22
|
+
import {
|
|
23
|
+
__name
|
|
24
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
25
|
+
|
|
26
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/cli/command-server.js
|
|
27
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
28
|
+
import { createInterface } from "node:readline";
|
|
29
|
+
var COMMAND_SERVER_PROTOCOL = 1;
|
|
30
|
+
var COMMAND_SERVER_IDLE_MS = 10 * 6e4;
|
|
31
|
+
var requests = new AsyncLocalStorage();
|
|
32
|
+
var inCommandServerRequest = /* @__PURE__ */ __name((work) => requests.run(true, work), "inCommandServerRequest");
|
|
33
|
+
var refuseInCommandServer = /* @__PURE__ */ __name((command, cli) => {
|
|
34
|
+
if (requests.getStore() !== true)
|
|
35
|
+
return;
|
|
36
|
+
const typed = [cli, ...commandPathOf(command)].join(" ");
|
|
37
|
+
const { lifetime } = metaOf(command);
|
|
38
|
+
if (lifetime)
|
|
39
|
+
throw new CliError("validation_error", `\`${typed}\` ${lifetime === "persistent" ? "runs until it is stopped" : "waits on a person"}; the command server runs only commands that return \u2014 start it as a process of its own`);
|
|
40
|
+
if (stdinFieldOf(command))
|
|
41
|
+
throw new CliError("validation_error", `\`${typed}\` reads its input on stdin, which the command server does not pass on \u2014 start it as a process of its own`);
|
|
42
|
+
}, "refuseInCommandServer");
|
|
43
|
+
var refusal = /* @__PURE__ */ __name((cli, message) => `${renderError(errorObjectOf(new CliError("validation_error", message)), { cli, interactive: false })}
|
|
44
|
+
`, "refusal");
|
|
45
|
+
var requestOf = /* @__PURE__ */ __name((line, cli) => {
|
|
46
|
+
let parsed;
|
|
47
|
+
try {
|
|
48
|
+
parsed = JSON.parse(line);
|
|
49
|
+
} catch {
|
|
50
|
+
return { id: null, error: "a request is one JSON object per line" };
|
|
51
|
+
}
|
|
52
|
+
const { id, argv } = parsed ?? {};
|
|
53
|
+
const known = typeof id === "number" && Number.isFinite(id) ? id : null;
|
|
54
|
+
if (known === null)
|
|
55
|
+
return { id: null, error: 'a request needs a numeric "id"' };
|
|
56
|
+
if (!Array.isArray(argv) || !argv.every((word) => typeof word === "string"))
|
|
57
|
+
return { id: known, error: '"argv" is a list of strings' };
|
|
58
|
+
if (isCommandServer(argv))
|
|
59
|
+
return { id: known, error: `\`${cli} commands --serve\` cannot run inside itself` };
|
|
60
|
+
return { id: known, argv };
|
|
61
|
+
}, "requestOf");
|
|
62
|
+
var serveCommands = /* @__PURE__ */ __name(async ({ input, write, run, cli, version, idleMs = COMMAND_SERVER_IDLE_MS, signal }) => {
|
|
63
|
+
const send = /* @__PURE__ */ __name((value) => write(`${JSON.stringify(value)}
|
|
64
|
+
`), "send");
|
|
65
|
+
await send({ ready: true, protocol: COMMAND_SERVER_PROTOCOL, version });
|
|
66
|
+
const lines = createInterface({ input, crlfDelay: Number.POSITIVE_INFINITY });
|
|
67
|
+
return new Promise((resolve) => {
|
|
68
|
+
let queue = Promise.resolve();
|
|
69
|
+
let waiting = 0;
|
|
70
|
+
let timer;
|
|
71
|
+
let done = false;
|
|
72
|
+
const finish = /* @__PURE__ */ __name(() => {
|
|
73
|
+
if (done)
|
|
74
|
+
return;
|
|
75
|
+
done = true;
|
|
76
|
+
clearTimeout(timer);
|
|
77
|
+
lines.close();
|
|
78
|
+
resolve(0);
|
|
79
|
+
}, "finish");
|
|
80
|
+
const idle = /* @__PURE__ */ __name(() => {
|
|
81
|
+
clearTimeout(timer);
|
|
82
|
+
timer = setTimeout(finish, idleMs);
|
|
83
|
+
}, "idle");
|
|
84
|
+
const answer = /* @__PURE__ */ __name(async (line) => {
|
|
85
|
+
const request = requestOf(line, cli);
|
|
86
|
+
if ("error" in request)
|
|
87
|
+
return send({ id: request.id, code: 2, stdout: "", stderr: refusal(cli, request.error) });
|
|
88
|
+
const answered = await run(request.argv);
|
|
89
|
+
return send({ id: request.id, ...answered });
|
|
90
|
+
}, "answer");
|
|
91
|
+
lines.on("line", (line) => {
|
|
92
|
+
if (done || line.trim() === "")
|
|
93
|
+
return;
|
|
94
|
+
waiting += 1;
|
|
95
|
+
clearTimeout(timer);
|
|
96
|
+
queue = queue.then(() => answer(line)).catch(finish).then(() => {
|
|
97
|
+
waiting -= 1;
|
|
98
|
+
if (waiting === 0 && !done)
|
|
99
|
+
idle();
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
lines.on("close", () => {
|
|
103
|
+
queue = queue.then(finish);
|
|
104
|
+
});
|
|
105
|
+
if (signal?.aborted)
|
|
106
|
+
finish();
|
|
107
|
+
signal?.addEventListener("abort", () => queue = queue.then(finish), { once: true });
|
|
108
|
+
idle();
|
|
109
|
+
});
|
|
110
|
+
}, "serveCommands");
|
|
111
|
+
|
|
112
|
+
export {
|
|
113
|
+
inCommandServerRequest,
|
|
114
|
+
refuseInCommandServer,
|
|
115
|
+
serveCommands
|
|
116
|
+
};
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
installFiles,
|
|
6
6
|
megabytes,
|
|
7
7
|
sharedModelsDirectory
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-AYDLA27G.js";
|
|
9
9
|
import {
|
|
10
10
|
importFrom
|
|
11
11
|
} from "./chunk-Y5E2WNWB.js";
|
|
@@ -16,12 +16,12 @@ import {
|
|
|
16
16
|
__name
|
|
17
17
|
} from "./chunk-ZVVMGPBJ.js";
|
|
18
18
|
|
|
19
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/embeddings/embed.js
|
|
20
20
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
21
21
|
import { availableParallelism } from "node:os";
|
|
22
22
|
import { basename, join as join2 } from "node:path";
|
|
23
23
|
|
|
24
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/embeddings/onnx-runtime.js
|
|
25
25
|
import { createHash } from "node:crypto";
|
|
26
26
|
import { copyFileSync, mkdirSync, mkdtempSync, readFileSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
27
27
|
import { join } from "node:path";
|
|
@@ -678,7 +678,7 @@ var Unzip = /* @__PURE__ */ (function() {
|
|
|
678
678
|
return Unzip2;
|
|
679
679
|
})();
|
|
680
680
|
|
|
681
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
681
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/embeddings/onnx-runtime.js
|
|
682
682
|
var ONNX_RUNTIME_VERSION = "1.30.0";
|
|
683
683
|
var release = /* @__PURE__ */ __name((name, sha256, bytes) => ({
|
|
684
684
|
name,
|
|
@@ -858,7 +858,7 @@ var openSession = /* @__PURE__ */ __name(async (bytes, threads, options = {}) =>
|
|
|
858
858
|
return { ort, session: await ort.InferenceSession.create(bytes, options) };
|
|
859
859
|
}, "openSession");
|
|
860
860
|
|
|
861
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
861
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/embeddings/embed.js
|
|
862
862
|
var textModelsDirectory = /* @__PURE__ */ __name((env = process.env) => sharedModelsDirectory("text", env), "textModelsDirectory");
|
|
863
863
|
var placedText = /* @__PURE__ */ __name((model, directory) => model.files.map((file) => [file, join2(directory, model.id, file.name)]), "placedText");
|
|
864
864
|
var isTextModelInstalled = /* @__PURE__ */ __name((model, directory) => filesPresent(placedText(model, directory)), "isTextModelInstalled");
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
id,
|
|
6
6
|
text,
|
|
7
7
|
time
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-3EGVR7OF.js";
|
|
9
9
|
import {
|
|
10
10
|
array,
|
|
11
11
|
nullable,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
unknown
|
|
19
19
|
} from "./chunk-WGGSFGNZ.js";
|
|
20
20
|
|
|
21
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/entities/note.js
|
|
22
22
|
var link = {
|
|
23
23
|
target_text: nullable(text),
|
|
24
24
|
kind: text,
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
CAPABILITY_STATEMENTS,
|
|
5
|
+
storeCapable
|
|
6
|
+
} from "./chunk-VPNLTNQD.js";
|
|
7
|
+
import {
|
|
8
|
+
importFrom
|
|
9
|
+
} from "./chunk-Y5E2WNWB.js";
|
|
10
|
+
import {
|
|
11
|
+
__name
|
|
12
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
13
|
+
|
|
14
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/sqlite-runtime.js
|
|
15
|
+
import { spawn, spawnSync } from "node:child_process";
|
|
16
|
+
import { readFileSync } from "node:fs";
|
|
17
|
+
import { dirname } from "node:path";
|
|
18
|
+
var RESTARTED = "CLI_MESSAGING_SQLITE_RESTARTED";
|
|
19
|
+
var USER_LIBRARY_PATH = "CLI_MESSAGING_USER_LD_LIBRARY_PATH";
|
|
20
|
+
var FORWARDED = ["SIGTERM", "SIGHUP", "SIGQUIT"];
|
|
21
|
+
var ensureSqlite = /* @__PURE__ */ __name(async (runtime = nodeRuntime()) => {
|
|
22
|
+
const { env } = runtime;
|
|
23
|
+
if (env[RESTARTED]) {
|
|
24
|
+
if (env[USER_LIBRARY_PATH] === void 0)
|
|
25
|
+
delete env.LD_LIBRARY_PATH;
|
|
26
|
+
else
|
|
27
|
+
env.LD_LIBRARY_PATH = env[USER_LIBRARY_PATH];
|
|
28
|
+
delete env[USER_LIBRARY_PATH];
|
|
29
|
+
delete env[RESTARTED];
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
if (runtime.bun || runtime.platform !== "linux")
|
|
33
|
+
return;
|
|
34
|
+
const maps = runtime.maps();
|
|
35
|
+
if (!maps.includes("libsqlite3"))
|
|
36
|
+
return;
|
|
37
|
+
if (await runtime.capable())
|
|
38
|
+
return;
|
|
39
|
+
const library = await runtime.library(maps.includes("ld-musl"));
|
|
40
|
+
if (!library)
|
|
41
|
+
return;
|
|
42
|
+
const restarted = {
|
|
43
|
+
...env,
|
|
44
|
+
LD_LIBRARY_PATH: [dirname(library.path), env.LD_LIBRARY_PATH].filter(Boolean).join(":"),
|
|
45
|
+
[RESTARTED]: "1"
|
|
46
|
+
};
|
|
47
|
+
if (env.LD_LIBRARY_PATH !== void 0)
|
|
48
|
+
restarted[USER_LIBRARY_PATH] = env.LD_LIBRARY_PATH;
|
|
49
|
+
if (!runtime.works(restarted, library.version))
|
|
50
|
+
return;
|
|
51
|
+
await runtime.restart(restarted);
|
|
52
|
+
}, "ensureSqlite");
|
|
53
|
+
var trialScript = /* @__PURE__ */ __name((version) => `
|
|
54
|
+
const { DatabaseSync } = await import("node:sqlite")
|
|
55
|
+
const database = new DatabaseSync(":memory:")
|
|
56
|
+
if (database.prepare("SELECT sqlite_version() AS v").get().v !== ${JSON.stringify(version)}) process.exit(1)
|
|
57
|
+
for (const statement of ${JSON.stringify(CAPABILITY_STATEMENTS)}) database.exec(statement)
|
|
58
|
+
`, "trialScript");
|
|
59
|
+
var nodeRuntime = /* @__PURE__ */ __name(() => ({
|
|
60
|
+
env: process.env,
|
|
61
|
+
platform: process.platform,
|
|
62
|
+
bun: "Bun" in globalThis,
|
|
63
|
+
maps: /* @__PURE__ */ __name(() => {
|
|
64
|
+
try {
|
|
65
|
+
return readFileSync("/proc/self/maps", "utf8");
|
|
66
|
+
} catch {
|
|
67
|
+
return "";
|
|
68
|
+
}
|
|
69
|
+
}, "maps"),
|
|
70
|
+
capable: /* @__PURE__ */ __name(() => storeCapable().then(() => true, () => false), "capable"),
|
|
71
|
+
library: /* @__PURE__ */ __name(async (musl) => {
|
|
72
|
+
try {
|
|
73
|
+
const { libraryFor, SQLITE_VERSION } = await importFrom(new URL("sqlite-runtime.js", import.meta.resolve("@wirecat/cli-core")).href, "@wirecat/cli-core-sqlite");
|
|
74
|
+
const path = libraryFor({ musl });
|
|
75
|
+
return path === void 0 ? void 0 : { path, version: SQLITE_VERSION };
|
|
76
|
+
} catch {
|
|
77
|
+
return void 0;
|
|
78
|
+
}
|
|
79
|
+
}, "library"),
|
|
80
|
+
works: /* @__PURE__ */ __name((env, version) => spawnSync(process.execPath, ["--no-warnings", "--input-type=module", "-e", trialScript(version)], {
|
|
81
|
+
env,
|
|
82
|
+
stdio: "ignore",
|
|
83
|
+
timeout: 1e4
|
|
84
|
+
}).status === 0, "works"),
|
|
85
|
+
restart: /* @__PURE__ */ __name((env) => relay(spawn(process.execPath, [...process.execArgv, ...process.argv.slice(1)], { env, stdio: "inherit" })), "restart")
|
|
86
|
+
}), "nodeRuntime");
|
|
87
|
+
var relay = /* @__PURE__ */ __name((child, host = process) => new Promise(() => {
|
|
88
|
+
for (const signal of FORWARDED)
|
|
89
|
+
host.on(signal, () => child.kill(signal));
|
|
90
|
+
host.on("SIGINT", () => {
|
|
91
|
+
});
|
|
92
|
+
child.on("error", () => host.exit(1));
|
|
93
|
+
child.on("exit", (code, signal) => {
|
|
94
|
+
if (signal) {
|
|
95
|
+
host.removeAllListeners(signal);
|
|
96
|
+
host.kill(host.pid, signal);
|
|
97
|
+
} else
|
|
98
|
+
host.exit(code ?? 1);
|
|
99
|
+
});
|
|
100
|
+
}), "relay");
|
|
101
|
+
|
|
102
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/cli/command-server-argv.js
|
|
103
|
+
var COMMAND_SERVER_ARGV = ["commands", "--serve"];
|
|
104
|
+
var isCommandServer = /* @__PURE__ */ __name((args) => args.length === COMMAND_SERVER_ARGV.length && COMMAND_SERVER_ARGV.every((word, at) => args[at] === word), "isCommandServer");
|
|
105
|
+
|
|
106
|
+
export {
|
|
107
|
+
ensureSqlite,
|
|
108
|
+
isCommandServer
|
|
109
|
+
};
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
describeOptions,
|
|
8
8
|
keyForCommand,
|
|
9
9
|
metaOf
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-CPDYPZIG.js";
|
|
11
11
|
import {
|
|
12
12
|
jsonSchemaOf
|
|
13
13
|
} from "./chunk-WGGSFGNZ.js";
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
__name
|
|
19
19
|
} from "./chunk-ZVVMGPBJ.js";
|
|
20
20
|
|
|
21
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/cli/command-contract.js
|
|
22
22
|
var SCHEMA_DIALECT = "https://json-schema.org/draft/2020-12/schema";
|
|
23
23
|
var outputOf = /* @__PURE__ */ __name((command) => {
|
|
24
24
|
const entity = answerEntitySchema(command);
|