@wirecat/drive-cli 0.62.0 → 0.63.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/dist/bin/drive.js +2 -2
- package/dist/bundle/{all-profiles-CKD2DWUK.js → all-profiles-GZJS3UKC.js} +6 -7
- package/dist/bundle/{anthropic-E3T4USLA.js → anthropic-RGV3WXX5.js} +3 -3
- package/dist/bundle/{app-server-JB2AEWWL.js → app-server-AA2PJ7PV.js} +40 -41
- package/dist/bundle/{bun-CC44AAND.js → bun-OXZYIA3R.js} +2 -2
- package/dist/bundle/{bun-sqlite-AUMFKYVR.js → bun-sqlite-D45NSDM3.js} +2 -2
- package/dist/bundle/{chunk-WZKEU7WR.js → chunk-2NIC72HH.js} +1 -1
- package/dist/bundle/{chunk-HCNQT3QE.js → chunk-2TDUGC5D.js} +331 -280
- package/dist/bundle/{chunk-DWJHL6DV.js → chunk-2TFXK3R4.js} +4 -4
- package/dist/bundle/{chunk-PEQA6LA5.js → chunk-33MGFUED.js} +169 -140
- package/dist/bundle/{chunk-YPFUYQDP.js → chunk-3BZRKLJ6.js} +12 -12
- package/dist/bundle/{chunk-YALI4C7C.js → chunk-3HK5WMI5.js} +5 -5
- package/dist/bundle/{chunk-R347FPYU.js → chunk-3QINVLZI.js} +1 -1
- package/dist/bundle/{chunk-LQKD257P.js → chunk-44SBK6KB.js} +938 -532
- package/dist/bundle/{chunk-XZUS7XRO.js → chunk-4CIZWCXV.js} +1 -1
- package/dist/bundle/{chunk-XS5POQST.js → chunk-4S4JMW6I.js} +1 -1
- package/dist/bundle/{chunk-YMWENGKH.js → chunk-534OBX5Y.js} +1 -1
- package/dist/bundle/{chunk-4SIZEJ3M.js → chunk-5PPL7JDM.js} +1 -1
- package/dist/bundle/{chunk-L7K2MOIC.js → chunk-6KQJSFYF.js} +18 -18
- package/dist/bundle/{chunk-VAYB52HF.js → chunk-6MQSQ4LX.js} +20 -20
- package/dist/bundle/{chunk-DJOAMGF4.js → chunk-7EMQ26BA.js} +9 -9
- package/dist/bundle/{chunk-TDX4GZFO.js → chunk-ABYGSJZ4.js} +4 -4
- package/dist/bundle/{chunk-FNWIJ6EJ.js → chunk-AEX37ETW.js} +1 -1
- package/dist/bundle/{chunk-SVPCHFKI.js → chunk-BKYMKVHT.js} +2 -2
- package/dist/bundle/{chunk-OBH5BA62.js → chunk-CE2TJBLP.js} +2 -2
- package/dist/bundle/{chunk-QTI6IVHZ.js → chunk-DJ3SDJZY.js} +6 -6
- package/dist/bundle/{chunk-XFRRKZHQ.js → chunk-DJHLVUL6.js} +16 -13
- package/dist/bundle/{chunk-JK3U25QZ.js → chunk-E4SDKMBJ.js} +59 -1
- package/dist/bundle/{chunk-HG6CAYJH.js → chunk-FRIJUILO.js} +2 -2
- package/dist/bundle/{chunk-RPMKG63Z.js → chunk-HZZCEQTH.js} +3 -3
- package/dist/bundle/{chunk-YXYTY4GF.js → chunk-J24ZFCWM.js} +16 -16
- package/dist/bundle/{chunk-E43ENLJJ.js → chunk-J4DIHPZ6.js} +1 -1
- package/dist/bundle/{chunk-SW4I5BR7.js → chunk-L37LMMRJ.js} +1 -1
- package/dist/bundle/{chunk-Q2LRPOKL.js → chunk-LMAVCYLQ.js} +3 -3
- package/dist/bundle/{chunk-T7X53FCJ.js → chunk-LZEOQW7S.js} +31 -31
- package/dist/bundle/{chunk-T5NWWXS2.js → chunk-MOTRI3SY.js} +1 -1
- package/dist/bundle/{chunk-ONP2IBHY.js → chunk-ND6LLYGF.js} +97 -80
- package/dist/bundle/{chunk-2KN35F32.js → chunk-NEFSGCVA.js} +8 -8
- package/dist/bundle/{chunk-JN5TVEEL.js → chunk-OXY6SSZG.js} +101 -14
- package/dist/bundle/{chunk-W4RTIL7S.js → chunk-PDCCYHCH.js} +2 -2
- package/dist/bundle/{chunk-AH5C3D3D.js → chunk-PO5RQQIG.js} +4 -4
- package/dist/bundle/{chunk-CZ2GJHLL.js → chunk-Q5DJTRKV.js} +2 -2
- package/dist/bundle/{chunk-O7ALBI2I.js → chunk-RKELRWH7.js} +3 -3
- package/dist/bundle/{chunk-67ZQCWBV.js → chunk-S4RXABDR.js} +2 -2
- package/dist/bundle/{chunk-QCX6XZLA.js → chunk-SXM6MHRR.js} +9 -9
- package/dist/bundle/{chunk-RIDQNVZM.js → chunk-TF23BZW5.js} +2 -2
- package/dist/bundle/{chunk-N7OZPKU7.js → chunk-TWUH22Z5.js} +1 -1
- package/dist/bundle/chunk-UPOSDTPT.js +87 -0
- package/dist/bundle/{chunk-CJHY5YIF.js → chunk-V3NVXIQR.js} +353 -114
- package/dist/bundle/{chunk-QH7DOVO3.js → chunk-VAUMOZU5.js} +44 -28
- package/dist/bundle/{chunk-VQDD64A4.js → chunk-VJEOGKAN.js} +7 -9
- package/dist/bundle/{chunk-MN4VXU3M.js → chunk-VKPCONDQ.js} +3 -3
- package/dist/bundle/{chunk-LWE4JGRN.js → chunk-WYGWWHZP.js} +2 -2
- package/dist/bundle/{chunk-EW7PKB4M.js → chunk-XDC3TWTL.js} +25 -25
- package/dist/bundle/{chunk-KLFSRKHB.js → chunk-XIUDS3OK.js} +1 -1
- package/dist/bundle/{chunk-U2BFYSQV.js → chunk-XNVFKMVR.js} +8559 -3343
- package/dist/bundle/{chunk-IR4SQLBR.js → chunk-XR6ESRU6.js} +1 -1
- package/dist/bundle/{chunk-RWSXVCSG.js → chunk-Y6GNA7HE.js} +2 -2
- package/dist/bundle/{chunk-7ZXIWZQ6.js → chunk-YGU6ULU5.js} +10 -10
- package/dist/bundle/{chunk-UGXN5D7U.js → chunk-YIP7ELON.js} +108 -62
- package/dist/bundle/{chunk-XEW2EN6F.js → chunk-Z42YYLTS.js} +31 -23
- package/dist/bundle/{chunk-DRZZBN3V.js → chunk-Z5KC7XBR.js} +1 -1
- package/dist/bundle/{chunk-7W5HYGVW.js → chunk-ZM5J6ZMB.js} +1 -1
- package/dist/bundle/{chunk-YOJDGAPT.js → chunk-ZOJU7ZFI.js} +7 -7
- package/dist/bundle/{command-contract-OB5BRABN.js → command-contract-BRW3AP44.js} +13 -14
- package/dist/bundle/{decode-WIIX3Y2X.js → decode-G5YEIPNC.js} +2 -2
- package/dist/bundle/drive.js +3 -3
- package/dist/bundle/{echarts-OYINM4C4.js → echarts-W2CWHNXR.js} +2 -2
- package/dist/bundle/{embed-DWZIYMBX.js → embed-OBFFPVF4.js} +3 -3
- package/dist/bundle/{embedder-ILWH7ZRM.js → embedder-NGCBQHIG.js} +6 -6
- package/dist/bundle/{entry-V5V3TOTY.js → entry-ET6HGM7A.js} +5 -5
- package/dist/bundle/{first-run-V3VVLQF4.js → first-run-JG52UZVO.js} +5 -5
- package/dist/bundle/{first-screen-Y3RIN7FU.js → first-screen-CIL3GFAA.js} +14 -15
- package/dist/bundle/{google-KLZSUAVY.js → google-CIWUVJ5C.js} +4 -4
- package/dist/bundle/{google-api-HZQ5R4ZO.js → google-api-Z3NSTBBR.js} +44 -45
- package/dist/bundle/{grants-L7XLHLUT.js → grants-3S4RL3WB.js} +49 -50
- package/dist/bundle/{identity-J2DON4IO.js → identity-OM6GFZ7T.js} +1 -1
- package/dist/bundle/{instructions-HGOJ23AJ.js → instructions-YQBQSYSS.js} +1 -1
- package/dist/bundle/{login-BD2TS4GY.js → login-7RYSDVN3.js} +48 -49
- package/dist/bundle/{node-CPKTDPH7.js → node-IVU33RL7.js} +2 -2
- package/dist/bundle/{node-sqlite-IXDCRLSX.js → node-sqlite-SIH5BEW2.js} +3 -3
- package/dist/bundle/{oauth-HOGY4YBB.js → oauth-PT4JEHLL.js} +4 -4
- package/dist/bundle/{open-O7P3ZV3Y.js → open-IAO2SNII.js} +2 -2
- package/dist/bundle/{openai-RCFQKCXC.js → openai-SGOUBHXP.js} +10 -10
- package/dist/bundle/{process-KXDRJO22.js → process-BPBMV3AT.js} +1 -1
- package/dist/bundle/{program-UCHFC7JQ.js → program-MYKKJ4F6.js} +68 -67
- package/dist/bundle/{prompt-EVPPBN5W.js → prompt-3ZM64DCB.js} +2 -2
- package/dist/bundle/{recognize-MRCYGP2J.js → recognize-A5C5RPB3.js} +1 -1
- package/dist/bundle/{remote-L3L4PHKF.js → remote-VWYFLRGO.js} +4 -4
- package/dist/bundle/{rerank-PSOE6XFT.js → rerank-4NGQWREA.js} +4 -4
- package/dist/bundle/{serve-72OGS3BF.js → serve-Y6LQTFH5.js} +6 -6
- package/dist/bundle/{server-SCXKYHBO.js → server-6AUHIIUA.js} +32 -33
- package/dist/bundle/server-PFHI35HA.js +69 -0
- package/dist/bundle/{services-YAFTELBI.js → services-2W4J7EMW.js} +26 -21
- package/dist/bundle/{sqlite-runtime-DLK4SU33.js → sqlite-runtime-P6BBDX2H.js} +3 -3
- package/dist/bundle/{state-T5VNAJSZ.js → state-PXKKXR3R.js} +3 -3
- package/dist/bundle/{store-R6MSY2IM.js → store-CN6JEUC4.js} +18 -10
- package/dist/bundle/{store-4OFK7PKQ.js → store-IVV2BAGZ.js} +42 -12
- package/dist/bundle/store-maintenance-command-MSY2QNEH.js +59 -0
- package/dist/bundle/tokens-P4LPNUFW.js +102 -0
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +5 -1
- package/dist/commands/config.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/dist/bundle/chunk-AQVUEZEP.js +0 -22
- package/dist/bundle/chunk-UOXOLGNG.js +0 -42
- package/dist/bundle/server-C5TGNFXW.js +0 -70
- package/dist/bundle/store-maintenance-command-QDMCXGV6.js +0 -60
- package/dist/bundle/tokens-HIG36RNS.js +0 -103
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { createRequire as __bundleRequire } from "node:module";
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
|
+
ADDED_PROVIDER,
|
|
4
5
|
MIGRATIONS,
|
|
5
6
|
SnapshotBudget,
|
|
6
7
|
assertReadCompatible,
|
|
@@ -27,10 +28,13 @@ import {
|
|
|
27
28
|
tagMemberIds,
|
|
28
29
|
thingOf,
|
|
29
30
|
write
|
|
30
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-XNVFKMVR.js";
|
|
32
|
+
import {
|
|
33
|
+
damagedFile
|
|
34
|
+
} from "./chunk-E4SDKMBJ.js";
|
|
31
35
|
import {
|
|
32
36
|
fold
|
|
33
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-ZOJU7ZFI.js";
|
|
34
38
|
import {
|
|
35
39
|
CliError
|
|
36
40
|
} from "./chunk-4OSSOWDM.js";
|
|
@@ -38,13 +42,14 @@ import {
|
|
|
38
42
|
__name
|
|
39
43
|
} from "./chunk-ZVVMGPBJ.js";
|
|
40
44
|
|
|
41
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
45
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/store/damage.js
|
|
42
46
|
var DERIVED = /* @__PURE__ */ new Set(["mentions", "involvements", "embeddings"]);
|
|
43
47
|
var named = /* @__PURE__ */ __name((tables) => tables.length <= 5 ? tables.join(", ") : `${tables.slice(0, 5).join(", ")} and ${tables.length - 5} more`, "named");
|
|
44
48
|
var isDerivedTable = /* @__PURE__ */ __name((table, searchIndexes) => DERIVED.has(table) || table.startsWith("vector_index_") || searchIndexes.some((index) => table === index || table.startsWith(`${index}_`)), "isDerivedTable");
|
|
45
49
|
var WIRECAT_UNITS = ["memo-*", "mail-*", "tg-*", "max-*", "wirecat-*"];
|
|
46
|
-
var
|
|
47
|
-
|
|
50
|
+
var seen = /* @__PURE__ */ __name((mark) => `\`${mark.command}\` found the store damaged at ${mark.at} (${mark.error})`, "seen");
|
|
51
|
+
var explainDamage = /* @__PURE__ */ __name((health, command, mark = null) => {
|
|
52
|
+
if (health.ok && !mark)
|
|
48
53
|
return null;
|
|
49
54
|
const indexNames = (health.searchIndexes ?? []).map((index) => index.name);
|
|
50
55
|
const badIndexes = (health.searchIndexes ?? []).filter((index) => !index.ok).map((index) => index.name);
|
|
@@ -53,12 +58,13 @@ var explainDamage = /* @__PURE__ */ __name((health, command) => {
|
|
|
53
58
|
const derived = [.../* @__PURE__ */ new Set([...tables.filter((table) => isDerivedTable(table, indexNames)), ...badIndexes])];
|
|
54
59
|
const unopened = health.error !== void 0;
|
|
55
60
|
const json = (health.invalidJson ?? []).map(({ table, column }) => `${table}.${column}`);
|
|
56
|
-
const
|
|
61
|
+
const checked = health.ok ? `${seen(mark)}; the quick check reads too little to see it, and a deep check that passes clears it` : unopened ? `the store file cannot be opened: ${health.error}` : health.checked === "quick" ? "the store file's header or schema is damaged" : `the store file is damaged: ${health.problems ?? 0} problems` + (sources.length ? ` in the data of ${named(sources)}` : "") + (derived.length ? `${sources.length ? ", and" : " in"} the search data of ${named(derived)}` : "") + (json.length ? `; values that are not valid JSON in ${named(json)}` : "");
|
|
62
|
+
const what = mark && !health.ok ? `${checked}; ${seen(mark)}` : checked;
|
|
57
63
|
const impact = [
|
|
58
64
|
...sources.length ? [`some rows of ${named(sources)} cannot be read; a recovery keeps every row it can read and names the rest`] : [],
|
|
59
65
|
...derived.length ? [`searches may miss results or fail; ${named(derived)} hold nothing that is not elsewhere, and are rebuilt`] : [],
|
|
60
66
|
...json.length ? [`a read of a row with a broken JSON value fails ("malformed JSON"); a recovery clears those values`] : [],
|
|
61
|
-
"reads that do not touch a damaged page work; a write that touches one fails until the store is recovered"
|
|
67
|
+
mark ? "reads that do not touch a damaged page work; every command that writes the store refuses until it is recovered" : "reads that do not touch a damaged page work; a write that touches one fails until the store is recovered"
|
|
62
68
|
];
|
|
63
69
|
return {
|
|
64
70
|
what,
|
|
@@ -71,7 +77,7 @@ var explainDamage = /* @__PURE__ */ __name((health, command) => {
|
|
|
71
77
|
`journalctl --user ${WIRECAT_UNITS.map((unit) => `-u '${unit}'`).join(" ")} --since -14d | grep -i -e malformed -e corrupt -e 'disk full'`,
|
|
72
78
|
"journalctl -k --since -14d | grep -i -e 'I/O error' -e nvme -e ata",
|
|
73
79
|
`df -h ${health.path.replace(/\/[^/]*$/, "")}`,
|
|
74
|
-
...health.checked === "quick" ? [`${command} store recover`] : []
|
|
80
|
+
...health.checked === "quick" || health.ok ? [`${command} store recover`] : []
|
|
75
81
|
],
|
|
76
82
|
impact,
|
|
77
83
|
externalUnaffected: "only this computer's copy is damaged: Telegram, MAX, the mail servers and Google Drive keep their own data, so whatever is lost here can be fetched again by a sync",
|
|
@@ -83,11 +89,11 @@ var explainDamage = /* @__PURE__ */ __name((health, command) => {
|
|
|
83
89
|
};
|
|
84
90
|
}, "explainDamage");
|
|
85
91
|
|
|
86
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
92
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/store/document-transfer/index.js
|
|
87
93
|
import { realpathSync, statSync } from "node:fs";
|
|
88
94
|
import { resolve } from "node:path";
|
|
89
95
|
|
|
90
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
96
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/people.js
|
|
91
97
|
var planPeople = /* @__PURE__ */ __name((database, snapshot, mappings, bindings, conflicts) => {
|
|
92
98
|
const creatable = /* @__PURE__ */ new Set();
|
|
93
99
|
let people = 0, identities = 0;
|
|
@@ -150,11 +156,11 @@ var copyPeople = /* @__PURE__ */ __name((database, snapshot, mappings, now) => {
|
|
|
150
156
|
}
|
|
151
157
|
}, "copyPeople");
|
|
152
158
|
|
|
153
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
159
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/store/document-transfer/digest.js
|
|
154
160
|
import { createHash } from "node:crypto";
|
|
155
161
|
var digest = /* @__PURE__ */ __name((value) => createHash("sha256").update(JSON.stringify(value)).digest("hex"), "digest");
|
|
156
162
|
|
|
157
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
163
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/collection.js
|
|
158
164
|
var documentsKeyOf = /* @__PURE__ */ __name((collection) => {
|
|
159
165
|
const colon = collection.indexOf(":");
|
|
160
166
|
const provider = collection.slice(0, colon);
|
|
@@ -198,7 +204,7 @@ var currentCollection = /* @__PURE__ */ __name((row) => {
|
|
|
198
204
|
};
|
|
199
205
|
}, "currentCollection");
|
|
200
206
|
|
|
201
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
207
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/plan.js
|
|
202
208
|
var planTransfer = /* @__PURE__ */ __name((database, snapshot, sourceKey, bindings) => {
|
|
203
209
|
const mappings = /* @__PURE__ */ new Map();
|
|
204
210
|
const missing = /* @__PURE__ */ new Set(), conflicts = /* @__PURE__ */ new Set();
|
|
@@ -365,7 +371,7 @@ var planTransfer = /* @__PURE__ */ __name((database, snapshot, sourceKey, bindin
|
|
|
365
371
|
};
|
|
366
372
|
}, "planTransfer");
|
|
367
373
|
|
|
368
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
374
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/snapshot.js
|
|
369
375
|
var TRANSFER_TABLES = { document: "documents", note: "notes", memory: "memories", fact: "facts" };
|
|
370
376
|
var MAX_ENTITIES = 1e3;
|
|
371
377
|
var MAX_AUXILIARY = 1e4;
|
|
@@ -507,7 +513,7 @@ var transferSnapshot = /* @__PURE__ */ __name((database, collection) => read(dat
|
|
|
507
513
|
item.bot = { name: String(bot.name), kind: String(bot.kind) };
|
|
508
514
|
}
|
|
509
515
|
if (thing.type === "document") {
|
|
510
|
-
const doc = database.prepare(`SELECT a.provider,a.external_id AS account,a.name,d.external_id,d.body,d.content_hash,d.deleted_at FROM documents d JOIN accounts a ON a.id=d.account_id WHERE d.id=? AND ${filesAccountSql("a.provider")}`).get(thing.id);
|
|
516
|
+
const doc = database.prepare(`SELECT a.provider,a.external_id AS account,a.name,d.external_id,d.body,d.content_hash,d.deleted_at FROM documents d JOIN accounts a ON a.id=d.account_id WHERE d.id=? AND ${filesAccountSql("a.provider")} AND a.provider<>'${ADDED_PROVIDER}'`).get(thing.id);
|
|
511
517
|
if (doc) {
|
|
512
518
|
item.collection = collectionNameOf({ provider: doc.provider, external_id: doc.account, name: doc.name });
|
|
513
519
|
item.external_id = String(doc.external_id);
|
|
@@ -527,7 +533,7 @@ var transferSnapshot = /* @__PURE__ */ __name((database, collection) => read(dat
|
|
|
527
533
|
};
|
|
528
534
|
}), "transferSnapshot");
|
|
529
535
|
|
|
530
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
536
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/apply.js
|
|
531
537
|
var providerHere = /* @__PURE__ */ __name(({ provider, name, settings }) => {
|
|
532
538
|
if (provider !== "folder" || String(name ?? "").startsWith("google-drive:"))
|
|
533
539
|
return provider ?? null;
|
|
@@ -699,7 +705,7 @@ var remapEntity = /* @__PURE__ */ __name((database, entity, id, mappings) => {
|
|
|
699
705
|
database.prepare(`UPDATE ${TRANSFER_TABLES[entity.kind]} SET ${columns.join(",")} WHERE id=?`).run(...values, id);
|
|
700
706
|
}, "remapEntity");
|
|
701
707
|
|
|
702
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
708
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/store/document-transfer/index.js
|
|
703
709
|
var locations = /* @__PURE__ */ __name((options) => {
|
|
704
710
|
for (const value of [options.source, options.destination, options.collection])
|
|
705
711
|
if (typeof value !== "string" || !value.trim())
|
|
@@ -752,6 +758,9 @@ var openPreviewTarget = /* @__PURE__ */ __name(async (path) => {
|
|
|
752
758
|
}, "openPreviewTarget");
|
|
753
759
|
var previewDocumentTransfer = /* @__PURE__ */ __name(async (options) => {
|
|
754
760
|
const location = locations(options);
|
|
761
|
+
return damagedFile([location.source, location.destination], () => previewWith(location, options));
|
|
762
|
+
}, "previewDocumentTransfer");
|
|
763
|
+
var previewWith = /* @__PURE__ */ __name(async (location, options) => {
|
|
755
764
|
const source = await openSource(location.source);
|
|
756
765
|
try {
|
|
757
766
|
const target = await openPreviewTarget(location.destination);
|
|
@@ -763,11 +772,14 @@ var previewDocumentTransfer = /* @__PURE__ */ __name(async (options) => {
|
|
|
763
772
|
} finally {
|
|
764
773
|
source.database.close();
|
|
765
774
|
}
|
|
766
|
-
}, "
|
|
775
|
+
}, "previewWith");
|
|
767
776
|
var applyDocumentTransfer = /* @__PURE__ */ __name(async (options) => {
|
|
768
777
|
if (!/^[a-f0-9]{64}$/.test(options.expected_fingerprint))
|
|
769
778
|
throw new CliError("validation_error", "apply requires the fingerprint returned by a transfer preview");
|
|
770
779
|
const location = locations(options);
|
|
780
|
+
return damagedFile([location.source, location.destination], () => applyWith(location, options));
|
|
781
|
+
}, "applyDocumentTransfer");
|
|
782
|
+
var applyWith = /* @__PURE__ */ __name(async (location, options) => {
|
|
771
783
|
const source = await openSource(location.source);
|
|
772
784
|
try {
|
|
773
785
|
const snapshot = transferSnapshot(source.database, options.collection);
|
|
@@ -793,9 +805,9 @@ var applyDocumentTransfer = /* @__PURE__ */ __name(async (options) => {
|
|
|
793
805
|
} finally {
|
|
794
806
|
source.database.close();
|
|
795
807
|
}
|
|
796
|
-
}, "
|
|
808
|
+
}, "applyWith");
|
|
797
809
|
|
|
798
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
810
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/store/health.js
|
|
799
811
|
import { existsSync, statSync as statSync2 } from "node:fs";
|
|
800
812
|
var JSON_COLUMNS = {
|
|
801
813
|
accounts: ["settings"],
|
|
@@ -937,7 +949,7 @@ var storeHealth = /* @__PURE__ */ __name(async (path, { deep = false } = {}) =>
|
|
|
937
949
|
}
|
|
938
950
|
}, "storeHealth");
|
|
939
951
|
|
|
940
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
952
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/store/project-transfer/preview.js
|
|
941
953
|
var previewProjectAnnotationSnapshot = /* @__PURE__ */ __name(async (options) => {
|
|
942
954
|
if (!options || typeof options !== "object" || Array.isArray(options))
|
|
943
955
|
throw new CliError("validation_error", "project preview options are required");
|
|
@@ -951,15 +963,19 @@ var previewProjectAnnotationSnapshot = /* @__PURE__ */ __name(async (options) =>
|
|
|
951
963
|
if (typeof options.project !== "string" || !/^project:[1-9]\d*$/.test(options.project) || !Number.isSafeInteger(Number(options.project.slice(8))))
|
|
952
964
|
throw new CliError("validation_error", "project preview project is a project:<safe integer id> reference");
|
|
953
965
|
const budget = new SnapshotBudget(options.maxReadBytes ?? 4 * 1024 * 1024);
|
|
954
|
-
const
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
966
|
+
const target = options.target;
|
|
967
|
+
const project2 = options.project;
|
|
968
|
+
return damagedFile([target], async () => {
|
|
969
|
+
const context = await openStoreContext({ path: target, env: options.env, readOnly: true });
|
|
970
|
+
try {
|
|
971
|
+
return previewAnnotationSnapshot(context.database, Number(project2.slice(8)), snapshot, options.bindings, budget);
|
|
972
|
+
} finally {
|
|
973
|
+
context.database.close();
|
|
974
|
+
}
|
|
975
|
+
});
|
|
960
976
|
}, "previewProjectAnnotationSnapshot");
|
|
961
977
|
|
|
962
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
978
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot.js
|
|
963
979
|
var snapshotProjectAnnotations = /* @__PURE__ */ __name(async (options) => {
|
|
964
980
|
if (!options || typeof options !== "object" || Array.isArray(options))
|
|
965
981
|
throw new CliError("validation_error", "snapshot options are required");
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { createRequire as __bundleRequire } from "node:module";
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
|
-
isCliFailure
|
|
5
|
-
} from "./chunk-AQVUEZEP.js";
|
|
6
|
-
import {
|
|
4
|
+
isCliFailure,
|
|
7
5
|
secretNamed,
|
|
8
6
|
withoutSecrets
|
|
9
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-E4SDKMBJ.js";
|
|
10
8
|
import {
|
|
11
9
|
isContentKey
|
|
12
10
|
} from "./chunk-6EY46GAN.js";
|
|
@@ -14,14 +12,14 @@ import {
|
|
|
14
12
|
__name
|
|
15
13
|
} from "./chunk-ZVVMGPBJ.js";
|
|
16
14
|
|
|
17
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/runs/run-context.js
|
|
18
16
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
19
17
|
import { createHash } from "node:crypto";
|
|
20
18
|
|
|
21
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/runs/error-detail.js
|
|
22
20
|
import { homedir } from "node:os";
|
|
23
21
|
|
|
24
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/runs/events.js
|
|
25
23
|
var providerErrorKey = /* @__PURE__ */ __name((value) => typeof value === "string" && /^[A-Za-z][A-Za-z0-9._-]{0,63}$/.test(value) ? value : void 0, "providerErrorKey");
|
|
26
24
|
var renderEvent = /* @__PURE__ */ __name((event) => {
|
|
27
25
|
if (event.event === "warning") {
|
|
@@ -69,7 +67,7 @@ var MARK = { request: "\u2192", response: "\u2190", cache: "\u2022", warning: "!
|
|
|
69
67
|
var age = /* @__PURE__ */ __name((ms) => ms < 1e3 ? `${ms}ms` : `${Math.round(ms / 1e3)}s`, "age");
|
|
70
68
|
var size = /* @__PURE__ */ __name((bytes) => bytes < 1e3 ? `${bytes} B` : `${(bytes / 1e3).toFixed(1)} kB`, "size");
|
|
71
69
|
|
|
72
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
70
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/runs/error-detail.js
|
|
73
71
|
var MESSAGE_AT_MOST = 500;
|
|
74
72
|
var CAUSES_AT_MOST = 5;
|
|
75
73
|
var FRAMES_AT_MOST = 15;
|
|
@@ -178,7 +176,7 @@ var redactText = /* @__PURE__ */ __name((text) => {
|
|
|
178
176
|
return out.length > MESSAGE_AT_MOST ? `${out.slice(0, MESSAGE_AT_MOST)}\u2026` : out;
|
|
179
177
|
}, "redactText");
|
|
180
178
|
|
|
181
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
179
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/runs/run-context.js
|
|
182
180
|
var REDACTED = "[redacted]";
|
|
183
181
|
var keepsSuccess = /* @__PURE__ */ __name(({ record, fromFlag, env, caller, persistent = false }) => {
|
|
184
182
|
if (!record)
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
readSharedSection,
|
|
5
5
|
sharedConfigPath,
|
|
6
6
|
writeSharedSection
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ABYGSJZ4.js";
|
|
8
8
|
import {
|
|
9
9
|
storePath
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-AEX37ETW.js";
|
|
11
11
|
import {
|
|
12
12
|
CliError
|
|
13
13
|
} from "./chunk-4OSSOWDM.js";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
__name
|
|
16
16
|
} from "./chunk-ZVVMGPBJ.js";
|
|
17
17
|
|
|
18
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/cli/setup-answers.js
|
|
19
19
|
var PERMISSION_ANSWERS = ["readonly", "allow"];
|
|
20
20
|
var QUESTIONS = ["languages", "tools", "permissions"];
|
|
21
21
|
var SECTION = "setup";
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
agentOf,
|
|
30
30
|
clientHash,
|
|
31
31
|
currentCaller
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-VJEOGKAN.js";
|
|
33
33
|
import {
|
|
34
34
|
__name
|
|
35
35
|
} from "./chunk-ZVVMGPBJ.js";
|
|
@@ -541,7 +541,7 @@ function toError(value) {
|
|
|
541
541
|
}
|
|
542
542
|
__name(toError, "toError");
|
|
543
543
|
|
|
544
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
544
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/mcp/caller.js
|
|
545
545
|
var callingAgent = /* @__PURE__ */ __name((fallback, caller = currentCaller()) => {
|
|
546
546
|
const client = caller?.agent?.client?.name;
|
|
547
547
|
if (client && client !== "unknown")
|
|
@@ -2,7 +2,7 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
refuseLacking
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-J24ZFCWM.js";
|
|
6
6
|
import {
|
|
7
7
|
asFirstWord,
|
|
8
8
|
baseContext,
|
|
@@ -13,17 +13,17 @@ import {
|
|
|
13
13
|
recalledAccount,
|
|
14
14
|
rememberAccount,
|
|
15
15
|
rootOf2 as rootOf
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-33MGFUED.js";
|
|
17
17
|
import {
|
|
18
18
|
providerErrorKey
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-VJEOGKAN.js";
|
|
20
20
|
import {
|
|
21
21
|
MESSENGER_CHANGE_REFUSAL,
|
|
22
22
|
readOnlyRefusal
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-ZM5J6ZMB.js";
|
|
24
24
|
import {
|
|
25
25
|
servingProfiles
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-FRIJUILO.js";
|
|
27
27
|
import {
|
|
28
28
|
OFFLINE,
|
|
29
29
|
capability,
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
profilesOnAccount,
|
|
37
37
|
servicesFor,
|
|
38
38
|
throughWrapper
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-44SBK6KB.js";
|
|
40
40
|
import {
|
|
41
41
|
AUTHORITY_KEY,
|
|
42
42
|
CEILING_KEY,
|
|
@@ -54,13 +54,13 @@ import {
|
|
|
54
54
|
logAttributes,
|
|
55
55
|
readKeysForCommand,
|
|
56
56
|
skipFlagFor
|
|
57
|
-
} from "./chunk-
|
|
58
|
-
import {
|
|
59
|
-
isCliFailure
|
|
60
|
-
} from "./chunk-AQVUEZEP.js";
|
|
57
|
+
} from "./chunk-6MQSQ4LX.js";
|
|
61
58
|
import {
|
|
62
59
|
openStore
|
|
63
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-XNVFKMVR.js";
|
|
61
|
+
import {
|
|
62
|
+
isCliFailure
|
|
63
|
+
} from "./chunk-E4SDKMBJ.js";
|
|
64
64
|
import {
|
|
65
65
|
logRecordOf,
|
|
66
66
|
realSleep,
|
|
@@ -74,7 +74,7 @@ import {
|
|
|
74
74
|
__name
|
|
75
75
|
} from "./chunk-ZVVMGPBJ.js";
|
|
76
76
|
|
|
77
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
77
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/cli/messenger/ask.js
|
|
78
78
|
import { openSync } from "node:fs";
|
|
79
79
|
import { createInterface } from "node:readline";
|
|
80
80
|
import { ReadStream } from "node:tty";
|
|
@@ -129,10 +129,10 @@ var terminalAsker = /* @__PURE__ */ __name((command) => async (key, request) =>
|
|
|
129
129
|
throw new CliError("cancelled", `${key}: not done \u2014 the answer was no`);
|
|
130
130
|
}, "terminalAsker");
|
|
131
131
|
|
|
132
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
132
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/sends/guard.js
|
|
133
133
|
import { randomUUID } from "node:crypto";
|
|
134
134
|
|
|
135
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
135
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/sends/flood.js
|
|
136
136
|
import { mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
137
137
|
import { dirname, join } from "node:path";
|
|
138
138
|
var MOST_DEADLINES = 50;
|
|
@@ -216,11 +216,11 @@ var FloodMemory = class {
|
|
|
216
216
|
}
|
|
217
217
|
};
|
|
218
218
|
|
|
219
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
219
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/sends/journal.js
|
|
220
220
|
import { appendFileSync, mkdirSync as mkdirSync3, readFileSync as readFileSync2 } from "node:fs";
|
|
221
221
|
import { dirname as dirname3, join as join2 } from "node:path";
|
|
222
222
|
|
|
223
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
223
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/sends/file-lock.js
|
|
224
224
|
import { closeSync, mkdirSync as mkdirSync2, openSync as openSync2, statSync, unlinkSync } from "node:fs";
|
|
225
225
|
import { dirname as dirname2 } from "node:path";
|
|
226
226
|
var LOCK_WAIT_MS = 5e3;
|
|
@@ -287,7 +287,7 @@ var lockTime = /* @__PURE__ */ __name((lock) => {
|
|
|
287
287
|
}
|
|
288
288
|
}, "lockTime");
|
|
289
289
|
|
|
290
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
290
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/sends/journal.js
|
|
291
291
|
var sendsPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join2(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "sends", `${profile}.jsonl`), "sendsPathFor");
|
|
292
292
|
var SendJournal = class {
|
|
293
293
|
static {
|
|
@@ -364,7 +364,7 @@ var withSendId = /* @__PURE__ */ __name((entry) => {
|
|
|
364
364
|
return cid === void 0 || rest.sendId !== void 0 ? rest : { ...rest, sendId: String(cid) };
|
|
365
365
|
}, "withSendId");
|
|
366
366
|
|
|
367
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
367
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/sends/recipients.js
|
|
368
368
|
import { existsSync, readFileSync as readFileSync3, rmSync } from "node:fs";
|
|
369
369
|
import { join as join3 } from "node:path";
|
|
370
370
|
var recipientsPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join3(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "profiles", `${profile}.recipients.json`), "recipientsPathFor");
|
|
@@ -476,7 +476,7 @@ var RecipientList = class {
|
|
|
476
476
|
}
|
|
477
477
|
};
|
|
478
478
|
|
|
479
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
479
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/sends/guard.js
|
|
480
480
|
var HOUR_MS = 60 * 60 * 1e3;
|
|
481
481
|
var READS_UNDER_HOLD = /* @__PURE__ */ new Set([
|
|
482
482
|
"attachments.extract",
|
|
@@ -669,7 +669,7 @@ var guardFor = /* @__PURE__ */ __name((app, settings, warn, env = process.env, a
|
|
|
669
669
|
}), "guardFor");
|
|
670
670
|
var journalFailure = /* @__PURE__ */ __name((error) => error?.code ?? (error instanceof Error ? error.name : "error"), "journalFailure");
|
|
671
671
|
|
|
672
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
672
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/sends/pace.js
|
|
673
673
|
import { readFileSync as readFileSync4, renameSync as renameSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
674
674
|
import { join as join4 } from "node:path";
|
|
675
675
|
var DEFAULT_PACE = { perMinute: 60, burst: 20 };
|
|
@@ -759,7 +759,7 @@ var waitForTurn = /* @__PURE__ */ __name(async (pacer, options) => {
|
|
|
759
759
|
await (options.sleep ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms))))(waitMs);
|
|
760
760
|
}, "waitForTurn");
|
|
761
761
|
|
|
762
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
762
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/cli/permission-keys.js
|
|
763
763
|
var HOUSEKEEPING = /* @__PURE__ */ new Set([
|
|
764
764
|
"help",
|
|
765
765
|
"guide",
|
|
@@ -839,7 +839,7 @@ var refuseUnknownPermissionKeys = /* @__PURE__ */ __name((command, settings, too
|
|
|
839
839
|
throw new CliError("validation_error", `--permission ${key} names no command`, { permission: key });
|
|
840
840
|
}, "refuseUnknownPermissionKeys");
|
|
841
841
|
|
|
842
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
842
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/cli/messenger/flooded.js
|
|
843
843
|
var LONG_LIVED = /* @__PURE__ */ new Set(["self", "newSendId", "close", "formatMarkdown", "formatHtml", "storedChats"]);
|
|
844
844
|
var LISTENING = /* @__PURE__ */ new Set(["watch", "feed", "listen", "listenHistory"]);
|
|
845
845
|
var BLOCKING = /* @__PURE__ */ new Set(["frozen", "limited", "banned"]);
|
|
@@ -936,7 +936,7 @@ var flooded = /* @__PURE__ */ __name((messenger, memory, { name, warn, pacer })
|
|
|
936
936
|
});
|
|
937
937
|
}, "flooded");
|
|
938
938
|
|
|
939
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
939
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/cli/messenger/observed.js
|
|
940
940
|
var observed = /* @__PURE__ */ __name((messenger, events) => {
|
|
941
941
|
const timed = /* @__PURE__ */ __name(async (operation, named, work, after) => {
|
|
942
942
|
const write = currentOperation();
|
|
@@ -1035,7 +1035,7 @@ var byPart = /* @__PURE__ */ __name((batch, counts) => {
|
|
|
1035
1035
|
counts[part] = (counts[part] ?? 0) + items.length;
|
|
1036
1036
|
}, "byPart");
|
|
1037
1037
|
|
|
1038
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1038
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/cli/messenger/stored.js
|
|
1039
1039
|
var REKEY_PACING = { lockMs: 50, pauseMs: 25 };
|
|
1040
1040
|
var stored = /* @__PURE__ */ __name((messenger, { account, store, warn, events, pending, announcing, deletedWithoutChat, profile, rekeyed, rekeyPacing = REKEY_PACING, closing, namesFromStore, recipientIds, countsUnread = false, historyLimits, command = "cli" }) => {
|
|
1041
1041
|
let warned = false;
|
|
@@ -1611,7 +1611,7 @@ var keep = /* @__PURE__ */ __name(async (store, account, event, seenAt, among, c
|
|
|
1611
1611
|
}
|
|
1612
1612
|
}, "keep");
|
|
1613
1613
|
|
|
1614
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1614
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/cli/messenger/context.js
|
|
1615
1615
|
var lazyStore = /* @__PURE__ */ __name((env, command, version) => {
|
|
1616
1616
|
let opened;
|
|
1617
1617
|
return {
|
|
@@ -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.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/mcp/bot/instructions.js
|
|
8
8
|
var botInstructions = /* @__PURE__ */ __name(({ command, name, profile, writes, skill }) => [
|
|
9
9
|
`The owner's ${name} bot "${profile}", through the official Bot API \u2014 not the owner's personal account. What it writes, people see as the bot.`,
|
|
10
10
|
"Use these tools to read the chats this bot is in, find a message or a person, and \u2014 when the profile allows \u2014 write as the bot.",
|